diff --git a/.ai/INDEX.md b/.ai/INDEX.md index ab9cbbcc19..1e4f4a191a 100644 --- a/.ai/INDEX.md +++ b/.ai/INDEX.md @@ -3,13 +3,13 @@ ## Overview This is the canonical entrypoint for repository AI context. -Read this file first at the start of each session, then follow the linked knowledge index and context files. +Read this file first at the start of each session, then use the knowledge index to choose the relevant context files. Repository AI context lives under `.ai/knowledge/`. ## Start Here 1. `.ai/INDEX.md` (this file) -2. `.ai/knowledge/INDEX.md` (module mapping and dependency flows) +2. `.ai/knowledge/INDEX.md` (context map and repository guardrails) ## Navigation diff --git a/.ai/knowledge/INDEX.md b/.ai/knowledge/INDEX.md index ee746ef207..736fd9556b 100644 --- a/.ai/knowledge/INDEX.md +++ b/.ai/knowledge/INDEX.md @@ -3,39 +3,27 @@ ## Overview Repository AI context lives under `.ai/knowledge/`. -Use this file only to choose the next context file to read. +Use this file to choose the next context file to read. Do not load every context file by default. -## Start Here +## Repository Guardrails -1. `.ai/knowledge/application/apps/indexer/gui/application/AGENTS.md` -2. `.ai/knowledge/application/apps/indexer/AGENTS.md` -3. `.ai/knowledge/application/apps/indexer/stypes/AGENTS.md` +- Main code lives in the root Rust workspace under `crates/`. +- `plugins/` is intentionally outside the main workspace validation path. +- The root `justfile` is the developer entrypoint, but do not run `just` recipes unless the user explicitly asks for them. +- Run build, test, lint, or validation commands only when the user requests validation or when needed to verify a change. -## Primary Application Context +## Primary Context -- Native GUI: `.ai/knowledge/application/apps/indexer/gui/application/AGENTS.md` - - Use for egui/eframe desktop UI, host/session UI, filters, charts, logs, and search. -- Rust core: `.ai/knowledge/application/apps/indexer/AGENTS.md` - - Use for ingestion, parsing, indexing, search, plugins host, and backend session behavior. -- Shared types: `.ai/knowledge/application/apps/indexer/stypes/AGENTS.md` - - Use for shared Rust/TS type definitions and protocol-facing data models. +- Native GUI: `.ai/knowledge/crates/chipmunk-app/AGENTS.md` + - Use for egui/eframe desktop UI, host/session UI, filters, charts, logs, search, plugin UI, app state, and app services. +- Rust core: `.ai/knowledge/crates/core/AGENTS.md` + - Use for ingestion, parsing, indexing, search, session behavior, plugin host runtime, sources, and exports. +- Shared types: `.ai/knowledge/crates/stypes/AGENTS.md` + - Use for Rust data types shared across app, core, CLI, and plugin-facing flows. -## Legacy Reference Context +## Targeted Context -Load only when explicitly needed for comparison, migration, or historical behavior. +Load only when the task explicitly targets that area. -- Electron host: `.ai/knowledge/application/holder/AGENTS.md` -- Angular client: `.ai/knowledge/application/client/AGENTS.md` -- Shared TS platform: `.ai/knowledge/application/platform/AGENTS.md` -- Protocol bridge: `.ai/knowledge/application/apps/protocol/AGENTS.md` -- Native Node binding: `.ai/knowledge/application/apps/rustcore/rs-bindings/AGENTS.md` -- TS wrapper: `.ai/knowledge/application/apps/rustcore/ts-bindings/AGENTS.md` -- WASM bindings: `.ai/knowledge/application/apps/rustcore/wasm-bindings/AGENTS.md` -- Legacy repo orchestration: `.ai/knowledge/cli/development-cli/AGENTS.md` - -## Peripheral Context - -Side code outside the desktop application path. Load only when the task explicitly targets that package. - -- CLI parser/export: `.ai/knowledge/cli/chipmunk-cli/AGENTS.md` +- CLI parser/export: `.ai/knowledge/crates/chipmunk-cli/AGENTS.md` - Plugins: `.ai/knowledge/plugins/AGENTS.md` diff --git a/.ai/knowledge/application/apps/indexer/AGENTS.md b/.ai/knowledge/application/apps/indexer/AGENTS.md deleted file mode 100644 index b13c5588f7..0000000000 --- a/.ai/knowledge/application/apps/indexer/AGENTS.md +++ /dev/null @@ -1,67 +0,0 @@ -# Indexer Rust Core Context - -## Overview - -Indexer is the Rust backend core for parsing, ingestion, indexing, search, merging, and plugin execution. -The native GUI uses this workspace directly through Rust crates, not through the legacy Node/TS binding path. - -## Start Here - -1. `application/apps/indexer/Cargo.toml` -2. `application/apps/indexer/session/src/` -3. `application/apps/indexer/processor/src/` -4. `application/apps/indexer/stypes/src/` - -## Crate Map - -- `session`: Rust API boundary used by the native GUI and legacy bindings. -- `processor`: ingestion/search pipeline; `MessageProducer` coordinates `ByteSource` + `Parser`. -- `sources`: byte ingestion from File/TCP/UDP/Serial/Process/Pcap. -- `parsers`: DLT/SOME-IP/Text parsing. -- `indexer_base`: shared chunk/time/progress primitives. -- `stypes`: shared type source; see `.ai/knowledge/application/apps/indexer/stypes/AGENTS.md` before changing it. -- `plugins_host`: runtime support for loading and executing plugins. -- `merging`: multi-source chronological merge logic. - -## If You Need X, Go to Y - -- Change native GUI/backend coordination: `application/apps/indexer/session/src/`. -- Add or modify ingestion sources: `application/apps/indexer/sources/src/` and `application/apps/indexer/processor/src/producer/`. -- Add or modify parser formats: `application/apps/indexer/parsers/src/` and `application/apps/indexer/processor/src/`. -- Change search/filter behavior: `application/apps/indexer/processor/src/search/`. -- Adjust random-access/file-windowing: `application/apps/indexer/processor/src/grabber/` and `application/apps/indexer/indexer_base/src/`. -- Change plugin runtime/lifecycle: `application/apps/indexer/plugins_host/src/`. -- Change plugin contracts or package artifacts: `.ai/knowledge/plugins/AGENTS.md`. -- Add or change shared data types: `.ai/knowledge/application/apps/indexer/stypes/AGENTS.md`. -- Investigate pipeline failures: start in `application/apps/indexer/processor/src/producer/`. - -## Native GUI Integration - -The native GUI crate lives at `application/apps/indexer/gui/application` and depends directly on `session`, `processor`, and `stypes`. -Prefer this Rust-to-Rust flow over the legacy Node/TS binding flow. - -## Landmarks and Hotspots - -- `MessageProducer` in `processor` for pipeline orchestration. -- `Session` APIs in `session` for frontend/backend coordination. -- `spawn_blocking` boundaries in parse/search-heavy paths. -- `TimedLine` and chunk/progress types in `indexer_base`. -- `PluginsManager` and plugin host wrappers in `plugins_host`. - -## Legacy Reference - -The old desktop stack consumed this core through `session` -> `rs-bindings` -> `ts-bindings` -> Electron/Angular. -Use those context files only when explicitly comparing behavior or migrating old semantics. - -## Validation - -Run commands from the repository root: - -- Build a crate: `cargo build --manifest-path application/apps/indexer/Cargo.toml -p ` -- Test a crate: `cargo test --manifest-path application/apps/indexer/Cargo.toml -p ` -- Lint a crate: `cargo clippy --manifest-path application/apps/indexer/Cargo.toml -p ` - -Testing notes: - -- Snapshots use `insta`; set `CI=true` in CI-style runs. -- Property/fuzz-style tests use `proptest`. diff --git a/.ai/knowledge/application/apps/indexer/gui/application/AGENTS.md b/.ai/knowledge/application/apps/indexer/gui/application/AGENTS.md deleted file mode 100644 index 8a5aeab639..0000000000 --- a/.ai/knowledge/application/apps/indexer/gui/application/AGENTS.md +++ /dev/null @@ -1,76 +0,0 @@ -# Native GUI Application (Rust) Context - -## Overview - -This crate implements Chipmunk's native desktop GUI using Rust, `egui`, and `eframe`. -It is the primary desktop application surface and integrates directly with the indexer Rust runtime. - -## Start Here - -1. `application/apps/indexer/gui/application/src/host/ui/` -2. `application/apps/indexer/gui/application/src/session/ui/` -3. `application/apps/indexer/gui/application/src/host/service/` -4. `application/apps/indexer/gui/application/src/session/service/` -5. `application/apps/indexer/gui/application/src/host/ui/state/` -6. `.ai/knowledge/application/apps/indexer/AGENTS.md` -7. `.ai/knowledge/application/apps/indexer/stypes/AGENTS.md` - -## If You Need X, Start Here - -- App frame loop, tabs, top-level UI state: `src/host/ui/` -- Host async commands, startup, opening sources: `src/host/service/` -- One live session UI: `src/session/ui/` -- Session backend coordination: `src/session/service/` -- Global filters, search values, presets: `src/host/ui/registry/` -- Session-local filters, search, search values: `src/session/ui/shared/searching/` -- Main logs table: `src/session/ui/logs_table/` -- Shared table behavior: `src/session/ui/common/log_table/` -- Side panel session tools: `src/session/ui/side_panel/` -- Bottom panel search/chart/details/presets: `src/session/ui/bottom_panel/` -- Session setup/source/parser forms: `src/host/ui/session_setup/` -- Plugin management and plugin-backed setup: `src/host/service/plugin/`, `src/host/ui/plugin_manager/` -- Export workflows: `src/session/ui/shared/export/`, `src/session/service/export.rs` -- Recent sessions, favorite folders, and service-backed storage: `src/host/ui/storage/`, `src/host/service/storage/` -- Lightweight host UI preferences: `src/host/ui/persist.rs`, `src/host/ui/state/preferences.rs` - -## Ownership Model - -- UI state structs are the source of truth for native application/UI state. -- Services do not own canonical app/UI state; they only run backend work and copied request data. -- `Host` is the `eframe::App` and owns top-level rendering, message polling, tabs, storage, notifications, and global UI actions. -- `HostState` owns active tabs, open sessions, setup tabs, preferences, shortcuts, app info, top-level modals, plugin UI state, and `HostRegistry`. -- `HostRegistry` owns global filter/search-value definitions and presets. -- `HostStorage` owns UI-facing service-backed storage domains: recent sessions and file explorer/favorite folders. -- `persist` owns only lightweight host UI preferences saved through `eframe` storage. -- `PluginService` owns `PluginsManager`; UI code consumes published `PluginsState` and must not load or mutate plugin runtime state directly. -- `Session` owns one live session UI shell and its component UIs. -- `SessionShared` owns canonical per-session state: applied filters, temp search, search/chart operation state, log selection, bookmarks, observe state, attachments, exports, signals, and view state. -- Component UIs should keep only local render/edit/cache state unless they already own a specific domain. -- Backend/UI integration crosses `HostCommand`/`HostMessage` and `SessionCommand`/`SessionMessage`. - -## Coding Guidelines - -- Treat egui render paths as hot loops. Do not do expensive parsing, filtering, sorting, validation, formatting, filesystem work, plugin loading, or backend coordination directly in render code. Cache derived data and invalidate it through explicit state changes or revision counters. -- Prefer direct mutable state access when ownership allows it. Pass `&mut` state into helper/render functions when the borrow checker allows it, and avoid inventing enum action outputs that bubble upward only to work around avoidable ownership structure. -- Keep component UI state narrow. Component structs may own edit drafts, focus flags, scroll/prefetch state, throttles, pending dialogs, and render caches; do not duplicate canonical host/session state there. -- Keep file dialogs, confirmations, and modal state in the existing `UiActions`, `HostModalState`, or workflow state that owns the operation. -- Throttle repeated interactive backend requests. Use existing throttle/retry/send helpers for high-frequency UI interactions. -- Reuse local shared utilities. Before adding helpers or shared types, look for existing code under `src/common/`, `src/host/common/`, `src/session/ui/common/`, and nearby `shared/` modules. - -## Change Entry Points - -- For filter/search/chart behavior, start from `SessionShared` and `src/session/ui/shared/searching/`. -- For global filter or preset definitions, start from `HostRegistry`. -- For plugin behavior, keep runtime work in `src/host/service/plugin/` and host UI state in `HostState.plugins`. -- For export behavior, start from `src/session/ui/shared/export/` and `src/session/service/export.rs`. -- For recent-session persistence, keep changes flowing through `SessionShared` revision tracking, `RecentSessionRuntime`, and `src/host/ui/storage/recent/`. -- For favorite folders/file explorer persistence, start from `src/host/ui/storage/`, `src/host/ui/home/`, and `src/host/service/storage/`. -- For table selection/bookmarks, keep semantic state in `LogsState`; table modules should own table-local scroll/prefetch state. - -## Validation - -Run from the repository root: - -- Build: `cargo build --manifest-path application/apps/indexer/Cargo.toml -p application` -- Test: `cargo test --manifest-path application/apps/indexer/Cargo.toml -p application` -- Lint: `cargo clippy --manifest-path application/apps/indexer/Cargo.toml -p application` diff --git a/.ai/knowledge/application/apps/indexer/stypes/AGENTS.md b/.ai/knowledge/application/apps/indexer/stypes/AGENTS.md deleted file mode 100644 index 0da5411b53..0000000000 --- a/.ai/knowledge/application/apps/indexer/stypes/AGENTS.md +++ /dev/null @@ -1,47 +0,0 @@ -# Shared Types (stypes) Context - -## Overview - -`stypes` is the source of truth for shared data structures used by the Rust core and native GUI. -It also contains legacy TypeScript export support for old Electron/Node surfaces. - -## Start Here - -1. `application/apps/indexer/stypes/Cargo.toml` -2. `application/apps/indexer/stypes/src/` - -## Native Rust Use - -- Consumed directly by `application/apps/indexer` crates. -- Consumed directly by the native GUI through Rust dependencies. -- Treat type changes as cross-crate API changes even when they do not affect generated TypeScript. - -## If You Need X, Go to Y - -- Add or modify a shared type: `application/apps/indexer/stypes/src/`. -- Change serialization behavior: serde/bincode implementations and derives in `application/apps/indexer/stypes/src/`. -- Add robustness coverage for new types: `proptest` tests near the relevant type or module. -- Change TypeScript export shape: legacy `TS` derives/attributes in `application/apps/indexer/stypes/src/`. -- Regenerate legacy TS bindings: `application/apps/indexer/stypes/generate.sh`. - -## Legacy TS Export - -Use only when explicitly changing TypeScript compatibility or old Electron/Node contracts. - -- Source: `application/apps/indexer/stypes/src/` -- Generation script: `application/apps/indexer/stypes/generate.sh` -- Generated output: `application/apps/indexer/stypes/bindings/` -- Protocol bridge: `.ai/knowledge/application/apps/protocol/AGENTS.md` -- Platform copy target: `application/platform/types/` - -## Feature Notes - -- `rustcore`: enables dependencies used by Rust core/native GUI integration. -- `nodejs`: legacy Node binding support. -- `test_and_gen`: generation/test support. - -## Tech Stack - -- `serde` and `bincode` for Rust serialization. -- `proptest` for property-based robustness. -- `ts-rs` for legacy TypeScript generation. diff --git a/.ai/knowledge/application/apps/protocol/AGENTS.md b/.ai/knowledge/application/apps/protocol/AGENTS.md deleted file mode 100644 index 4cbf73e13f..0000000000 --- a/.ai/knowledge/application/apps/protocol/AGENTS.md +++ /dev/null @@ -1,44 +0,0 @@ -# Protocol WASM Context - -## Overview - -`protocol` is the WASM encode/decode bridge around shared `stypes`, used by Node/Electron/TypeScript layers. - -## Start Here (First Files to Open) - -1. `application/apps/protocol/Cargo.toml` -2. `application/apps/protocol/src/lib.rs` -3. `application/apps/protocol/src/generate.rs` -4. `application/apps/protocol/src/err.rs` -5. `application/apps/protocol/test.sh` -6. `.ai/knowledge/application/apps/indexer/stypes/AGENTS.md` -7. `application/apps/rustcore/ts-bindings/spec/session.protocol.spec.ts` - -## If You Need X, Go to Y - -- Expose a new shared message type: `application/apps/protocol/src/lib.rs` macro invocations. -- Change encode/decode wrapper generation: `application/apps/protocol/src/generate.rs` (`gen_encode_decode_fns!`). -- Investigate WASM boundary errors: `application/apps/protocol/src/err.rs` and caller expectations in `application/apps/rustcore/ts-bindings`. -- Validate protocol compatibility: run `cargo chipmunk test protocol -u print` and inspect TS protocol specs. - -## Cross-Module Dependency Map - -- Upstream schema source: `application/apps/indexer/stypes`. -- Protocol output consumed by `application/apps/rustcore/ts-bindings`. -- Indirectly feeds `application/holder` and `application/client` through TS bindings. - -## Landmarks and Hotspots - -- `gen_encode_decode_fns!` macro wiring in `application/apps/protocol/src/lib.rs`. -- `serde-wasm-bindgen` conversion boundaries. -- Type additions are high-context because they require synchronized updates across `stypes`, protocol, and TS tests. - -## Quick Commands - -- Build: `cargo chipmunk build protocol -u print` -- Test: `cargo chipmunk test protocol -u print` -- Lint: `cargo chipmunk lint protocol -u print` - -## Additional Notes (Not Default Workflow) - -- `application/apps/protocol/test.sh` can run property-test-heavy paths and may take significantly longer than typical target tests. diff --git a/.ai/knowledge/application/apps/rustcore/rs-bindings/AGENTS.md b/.ai/knowledge/application/apps/rustcore/rs-bindings/AGENTS.md deleted file mode 100644 index e072ed7b0b..0000000000 --- a/.ai/knowledge/application/apps/rustcore/rs-bindings/AGENTS.md +++ /dev/null @@ -1,41 +0,0 @@ -# Rust Bindings (FFI) Context - -## Overview - -`rs-bindings` is the native Node addon boundary between Rust core (`application/apps/indexer/session`) and Node/Electron. - -## Start Here (First Files to Open) - -1. `application/apps/rustcore/rs-bindings/Cargo.toml` -2. `application/apps/rustcore/rs-bindings/src/lib.rs` -3. `application/apps/rustcore/rs-bindings/src/js/session/` -4. `application/apps/rustcore/rs-bindings/src/js/jobs/` -5. `application/apps/rustcore/rs-bindings/src/js/converting/` -6. `application/apps/indexer/session/src/` -7. `application/apps/rustcore/ts-bindings/src/` - -## If You Need X, Go to Y - -- Add or modify session-facing operation: `application/apps/rustcore/rs-bindings/src/js/session/` plus matching `application/apps/indexer/session` API. -- Add static job without active session: `application/apps/rustcore/rs-bindings/src/js/jobs/` (`UnboundJobs` path). -- Debug Node-side lifecycle or callback bridging: `RustSession` flow in `application/apps/rustcore/rs-bindings/src/js/session/`. -- Investigate Rust type translation to JS payloads: conversion paths in `application/apps/rustcore/rs-bindings/src/js/converting/`. - -## Cross-Module Dependency Map - -- Upstream Rust API comes from `application/apps/indexer/session`. -- Exposes native addon consumed by `application/apps/rustcore/ts-bindings`. -- Downstream UI surfaces are `application/holder` and `application/client` through TS wrappers. - -## Landmarks and Hotspots - -- `RustSession` lifecycle methods. -- `UnboundJobs` APIs. -- Runtime/thread boundaries (Tokio runtime interaction with Node threads). -- Memory allocator configuration (`tikv-jemallocator`/`mimalloc`) is high-context and global-impact. - -## Development - -- Target: `binding` -- Build: `cargo chipmunk build binding -u print` -- Lint: `cargo chipmunk lint binding -u print` diff --git a/.ai/knowledge/application/apps/rustcore/ts-bindings/AGENTS.md b/.ai/knowledge/application/apps/rustcore/ts-bindings/AGENTS.md deleted file mode 100644 index 08b86e1546..0000000000 --- a/.ai/knowledge/application/apps/rustcore/ts-bindings/AGENTS.md +++ /dev/null @@ -1,45 +0,0 @@ -# TypeScript Bindings Context - -## Overview - -`ts-bindings` is the high-level TypeScript API over the native Rust addon, used by Electron holder and Angular client. - -## Start Here (First Files to Open) - -1. `application/apps/rustcore/ts-bindings/src/api/` -2. `application/apps/rustcore/ts-bindings/src/api/executors/` -3. `application/apps/rustcore/ts-bindings/src/native/` -4. `application/apps/rustcore/ts-bindings/src/services/` -5. `application/apps/rustcore/ts-bindings/spec/` -6. `.ai/knowledge/application/apps/rustcore/rs-bindings/AGENTS.md` -7. `.ai/knowledge/application/apps/protocol/AGENTS.md` - -## If You Need X, Go to Y - -- Change session flow (`grab`, `search`, filters): `application/apps/rustcore/ts-bindings/src/api/` and related executors. -- Add or modify static utility jobs: `application/apps/rustcore/ts-bindings/src/services/` and provider/native wrappers. -- Adjust progress reporting behavior: `application/apps/rustcore/ts-bindings/src/api/` and `application/apps/rustcore/ts-bindings/src/services/` tracker-related flow. -- Debug binary protocol translation issues: `application/apps/rustcore/ts-bindings/src/native/` and `application/apps/rustcore/ts-bindings/spec/session.protocol.spec.ts`. -- Validate end-to-end behavior with native addon: `application/apps/rustcore/ts-bindings/spec/` tests using Electron runtime. - -## Cross-Module Dependency Map - -- Consumes native APIs from `rs-bindings`. -- Consumes protocol encoders/decoders from `application/apps/protocol`. -- Provides API used by `application/holder` and `application/client`. - -## Landmarks and Hotspots - -- `Session`, `SessionStream`, `SessionSearch` classes. -- `CancelablePromise` usage in long-running operations. -- Executor classes for operation-specific orchestration. -- Protocol and addon version drift is a high-context boundary. - -## Development & Testing - -- Target: `wrapper` -- Build: `cargo chipmunk build wrapper -u print` -- Test: `cargo chipmunk test wrapper -u print` -- Lint: `cargo chipmunk lint wrapper -u print` -- Benchmarks: `application/apps/rustcore/ts-bindings/spec/_session.benchmark.spec.ts` -- Test defaults: `application/apps/rustcore/ts-bindings/spec/defaults.json` diff --git a/.ai/knowledge/application/apps/rustcore/wasm-bindings/AGENTS.md b/.ai/knowledge/application/apps/rustcore/wasm-bindings/AGENTS.md deleted file mode 100644 index 09d39855f9..0000000000 --- a/.ai/knowledge/application/apps/rustcore/wasm-bindings/AGENTS.md +++ /dev/null @@ -1,43 +0,0 @@ -# WASM Bindings Context - -## Overview - -`wasm-bindings` provides browser-facing Rust WASM utilities for fuzzy matching, ANSI rendering, and filter validation. - -## Start Here (First Files to Open) - -1. `application/apps/rustcore/wasm-bindings/Cargo.toml` -2. `application/apps/rustcore/wasm-bindings/src/lib.rs` -3. `application/apps/rustcore/wasm-bindings/src/` -4. `application/apps/rustcore/wasm-bindings/spec/` -5. `application/apps/rustcore/wasm-bindings/package.json` -6. `.ai/knowledge/application/client/AGENTS.md` - -## If You Need X, Go to Y - -- Tune fuzzy matching output/scoring: matcher code in `application/apps/rustcore/wasm-bindings/src/`. -- Change ANSI conversion or stripping behavior: ANSI conversion code in `application/apps/rustcore/wasm-bindings/src/`. -- Update regex/filter validation behavior/results: filter validation code in `application/apps/rustcore/wasm-bindings/src/`. -- Validate browser compatibility regressions: WASM-facing specs in `application/apps/rustcore/wasm-bindings/spec/`. - -## Cross-Module Dependency Map - -- Built as a WASM package consumed by `application/client`. -- Interacts with frontend behavior, not the Node native addon path. - -## Landmarks and Hotspots - -- `matcher` integration with `skim` scoring. -- `ansi` HTML conversion rules and escaping. -- `filter` regex validation and error messaging. -- Browser runtime compatibility (Karma/ChromeHeadless) is the critical hotspot. - -## Quick Commands - -- Build: `cargo chipmunk build wasm -u print` -- Test: `cargo chipmunk test wasm -u print` -- Lint: `cargo chipmunk lint wasm -u print` - -## Additional Notes - -- `application/apps/rustcore/wasm-bindings/pkg/` contains generated package output; inspect it only for packaging or runtime artifact issues. diff --git a/.ai/knowledge/application/client/AGENTS.md b/.ai/knowledge/application/client/AGENTS.md deleted file mode 100644 index e068238485..0000000000 --- a/.ai/knowledge/application/client/AGENTS.md +++ /dev/null @@ -1,44 +0,0 @@ -# Angular Client Context - -## Overview - -The Angular client is the Electron-era UI for viewing logs, managing filters, and visualizing data. - -## Start Here (First Files to Open) - -1. `application/client/angular.json` -2. `application/client/src/app/` -3. `application/client/src/app/service/` -4. `application/client/src/app/ui/` -5. `application/client/src/app/ui/styles/` -6. `.ai/knowledge/application/platform/AGENTS.md` -7. `.ai/knowledge/application/apps/rustcore/ts-bindings/AGENTS.md` - -## If You Need X, Go to Y - -- Change screen-level behavior: UI features in `application/client/src/app/ui/`. -- Change shared UI state or backend calls: `application/client/src/app/service/`. -- Update app-wide styling rules: `application/client/src/app/ui/styles/` and component styles. -- Trace backend data into UI: follow `ts-bindings` calls through services and component subscriptions. - -## Cross-Module Dependency Map - -- Consumes APIs through `application/apps/rustcore/ts-bindings`. -- Exchanges contracts with Electron via `application/platform/ipc/` and shared `application/platform/types/`. -- Runs inside Electron holder in desktop distribution. - -## Landmarks and Hotspots - -- Observable-based service/component interactions. -- Filter/search and chart rendering flows are high-context UI surfaces. -- IPC contract drift with `platform` or `holder` is a common integration hotspot. - -## Tech Stack & Conventions - -- Target: `client` -- Build: `cargo chipmunk build client -u print` -- Test: `cargo chipmunk test client -u print` -- Lint: `cargo chipmunk lint client -u print` -- Framework: Angular 19 -- Styling: Vanilla CSS (preferred) -- Naming: `camelCase` for vars/functions, `PascalCase` for classes/interfaces diff --git a/.ai/knowledge/application/holder/AGENTS.md b/.ai/knowledge/application/holder/AGENTS.md deleted file mode 100644 index 158b027ca0..0000000000 --- a/.ai/knowledge/application/holder/AGENTS.md +++ /dev/null @@ -1,40 +0,0 @@ -# Electron Holder Context - -## Overview - -`holder` is the Electron desktop host process. It owns lifecycle, windowing, and IPC bridging between UI and Rust-backed services. - -## Start Here (First Files to Open) - -1. `application/holder/package.json` -2. `application/holder/src/controller/` -3. `application/holder/src/service/bridge/` -4. `application/holder/src/service/electron/` -5. `.ai/knowledge/application/platform/AGENTS.md` -6. `.ai/knowledge/application/apps/rustcore/ts-bindings/AGENTS.md` - -## If You Need X, Go to Y - -- Change startup/shutdown/update behavior: lifecycle/controller flow in `application/holder/src/controller/` and `application/holder/src/register/`. -- Change IPC forwarding between client and backend: bridge/service flow in `application/holder/src/service/bridge/` plus `application/platform/ipc/` contracts. -- Change native menus/dialog/window behavior: Electron integration code in `application/holder/src/service/electron/`. -- Trace backend call flow: holder IPC handlers -> `application/apps/rustcore/ts-bindings` APIs -> Rust boundary. - -## Cross-Module Dependency Map - -- Consumes `application/apps/rustcore/ts-bindings` for Rust-backed operations. -- Shares IPC contract/types with `application/platform`. -- Hosts and serves Angular client runtime. - -## Landmarks and Hotspots - -- Electron lifecycle hooks. -- IPC channel registration/forwarding. -- Window state/menu/dialog integration. -- IPC contract drift between holder/client/platform is the main hotspot. - -## Development - -- Target: `app` -- Build: `cargo chipmunk build app -u print` -- Lint: `cargo chipmunk lint app -u print` diff --git a/.ai/knowledge/application/platform/AGENTS.md b/.ai/knowledge/application/platform/AGENTS.md deleted file mode 100644 index a9d42681f4..0000000000 --- a/.ai/knowledge/application/platform/AGENTS.md +++ /dev/null @@ -1,41 +0,0 @@ -# Shared Platform Context - -## Overview - -`platform` contains shared TypeScript contracts and utilities used by holder/client and bridge layers. - -## Start Here (First Files to Open) - -1. `application/platform/ipc/` -2. `application/platform/types/` -3. `application/platform/env/` -4. `application/platform/log/` -5. `.ai/knowledge/application/client/AGENTS.md` -6. `.ai/knowledge/application/holder/AGENTS.md` - -## If You Need X, Go to Y - -- Change IPC message contracts: `application/platform/ipc/`. -- Change shared domain interfaces/enums: `application/platform/types/`. -- Change runtime environment detection/config: `application/platform/env/`. -- Change shared frontend logging utilities: `application/platform/log/`. -- Trace cross-app type issues: start in `application/platform/types/`, then check `application/apps/indexer/stypes` and protocol/bindings if data originates in Rust. - -## Cross-Module Dependency Map - -- Consumed by both `application/client` and `application/holder`. -- Some `application/platform/types/` entries are generated from `application/apps/indexer/stypes`. -- IPC contracts here define holder <-> client communication boundaries. - -## Landmarks and Hotspots - -- IPC contract definitions and channel naming. -- Shared type evolution affecting multiple targets. -- Generated-vs-manual type changes in `application/platform/types/` are a high-context hotspot. - -## Development - -- Target: `shared` -- Build: `cargo chipmunk build shared -u print` -- Lint: `cargo chipmunk lint shared -u print` -- Note: platform changes can affect multiple targets. diff --git a/.ai/knowledge/cli/chipmunk-cli/AGENTS.md b/.ai/knowledge/cli/chipmunk-cli/AGENTS.md deleted file mode 100644 index 01ed265836..0000000000 --- a/.ai/knowledge/cli/chipmunk-cli/AGENTS.md +++ /dev/null @@ -1,45 +0,0 @@ -# Chipmunk CLI Context - -## Overview -`chipmunk-cli` is the user-facing CLI for connecting sources, parsing logs, and exporting output. - -## Start Here (First Files to Open) - -1. `cli/chipmunk-cli/Cargo.toml` -2. `cli/chipmunk-cli/src/main.rs` -3. `cli/chipmunk-cli/src/cli_args/` -4. `cli/chipmunk-cli/src/session/` -5. `cli/chipmunk-cli/src/session/format/` -6. `.ai/knowledge/application/apps/indexer/AGENTS.md` - -## If You Need X, Go to Y - -- Change command syntax/options: `cli/chipmunk-cli/src/cli_args/`. -- Change ingestion/parsing runtime behavior: `cli/chipmunk-cli/src/session/` and underlying indexer interactions. -- Change output formatting: `cli/chipmunk-cli/src/session/format/`. -- Debug parser/source compatibility from CLI path: trace CLI args -> session wiring -> indexer source/parser. - -## Cross-Module Dependency Map - -- CLI orchestrates indexer capabilities for terminal use. -- Output format logic is local, while parsing/ingestion logic is rooted in core indexer crates. - -## Landmarks and Hotspots - -- Hierarchical `clap` command structure in `cli/chipmunk-cli/src/cli_args/`. -- Session flow that wires parser/source/output. -- Connection resilience behavior (reconnect/keepalive) in source-related paths. - -## Development - -- Target: `cli-chipmunk` -- Build: `cargo build` -- Test: `cargo test` -- Lint: `cargo clippy` -- Install: `cargo install --path cli/chipmunk-cli` - -## Usage Example - -```bash -chipmunk-cli -o logs.dlt -f binary dlt -f file1.xml tcp 127.0.0.1:7777 -m 1000 -``` diff --git a/.ai/knowledge/cli/development-cli/AGENTS.md b/.ai/knowledge/cli/development-cli/AGENTS.md deleted file mode 100644 index d770b6ab8c..0000000000 --- a/.ai/knowledge/cli/development-cli/AGENTS.md +++ /dev/null @@ -1,43 +0,0 @@ -# Development CLI (`cargo chipmunk`) Context - -## Overview -`development-cli` is the developer task orchestrator for build/test/lint/release workflows across this repo. - -## Start Here (First Files to Open) - -1. `cli/development-cli/Cargo.toml` -2. `cli/development-cli/src/main.rs` -3. `cli/development-cli/src/jobs_runner/` -4. `cli/development-cli/src/target/` -5. `cli/development-cli/src/dev_environment/` -6. `cli/development-cli/src/release/` -7. `cli/development-cli/src/benchmark/` - -## If You Need X, Go to Y - -- Change dependency resolution or job scheduling: `cli/development-cli/src/jobs_runner/`. -- Change target definitions (build/test/lint commands): `cli/development-cli/src/target/`. -- Change smart rebuild/cache behavior: checksum and job-state logic in `cli/development-cli/src/build_state_records.rs`, `cli/development-cli/src/jobs_runner/`, and `cli/development-cli/dir_checksum/`. -- Change output modes/progress UI/logging behavior: output handling in `cli/development-cli/src/tracker.rs`, `cli/development-cli/src/jobs_runner/`, and target execution flow. -- Change tool/version validation: `cli/development-cli/src/dev_environment/`. -- Investigate command orchestration regressions: trace `cli/development-cli/src/main.rs` -> target resolution -> jobs runner -> command output. - -## Cross-Module Dependency Map - -- Drives tasks for all major targets (`core`, `client`, `app`, `shared`, `binding`, `wrapper`, CLI targets). -- Encodes project-wide target dependency graph and execution policy. - -## Landmarks and Hotspots - -- Target graph and concurrency logic in `cli/development-cli/src/jobs_runner/`. -- Incremental rebuild state handling (`.build_last_state`) in `cli/development-cli/src/build_state_records.rs`. -- Output mode behavior (`bars`, `report`, `print`, `immediate`) in `cli/development-cli/src/tracker.rs`. - -## Development - -- Target: `cli-dev` -- Build: `cargo build` -- Test: `cargo test` -- Lint: `cargo clippy` -- Install: `cargo install --path cli/development-cli` -- Integration tests: `python cli/development-cli/integration_tests/run_all.py` diff --git a/.ai/knowledge/crates/chipmunk-app/AGENTS.md b/.ai/knowledge/crates/chipmunk-app/AGENTS.md new file mode 100644 index 0000000000..74d015d47c --- /dev/null +++ b/.ai/knowledge/crates/chipmunk-app/AGENTS.md @@ -0,0 +1,79 @@ +# Native GUI Application Context + +## Overview + +`crates/chipmunk-app` implements Chipmunk's native desktop GUI using Rust, `egui`, and `eframe`. +It owns the desktop application shell and integrates directly with the core runtime crates. + +## Start Here + +1. `crates/chipmunk-app/src/host/ui/` +2. `crates/chipmunk-app/src/session/ui/` +3. `crates/chipmunk-app/src/host/service/` +4. `crates/chipmunk-app/src/session/service/` +5. `crates/chipmunk-app/src/host/ui/state/` +6. `.ai/knowledge/crates/core/AGENTS.md` +7. `.ai/knowledge/crates/stypes/AGENTS.md` + +## If You Need X, Start Here + +- App frame loop, tabs, top-level UI state: `crates/chipmunk-app/src/host/ui/` +- Host async commands, startup, opening sources: `crates/chipmunk-app/src/host/service/` +- One live session UI: `crates/chipmunk-app/src/session/ui/` +- Session backend coordination: `crates/chipmunk-app/src/session/service/` +- Global filters, search values, presets: `crates/chipmunk-app/src/host/ui/registry/` +- Session-local filters, search, search values: `crates/chipmunk-app/src/session/ui/shared/searching/` +- Main logs table: `crates/chipmunk-app/src/session/ui/logs_table/` +- Shared table behavior: `crates/chipmunk-app/src/session/ui/common/log_table/` +- Side panel session tools: `crates/chipmunk-app/src/session/ui/side_panel/` +- Bottom panel search/chart/details/presets: `crates/chipmunk-app/src/session/ui/bottom_panel/` +- Session setup/source/parser forms: `crates/chipmunk-app/src/host/ui/session_setup/` +- Multi-file setup: `crates/chipmunk-app/src/host/ui/multi_setup/` +- Plugin management and plugin-backed setup: `crates/chipmunk-app/src/host/service/plugin/`, `crates/chipmunk-app/src/host/ui/plugin_manager/` +- Export workflows: `crates/chipmunk-app/src/session/ui/shared/export/`, `crates/chipmunk-app/src/session/service/export.rs` +- Recent sessions, favorite folders, and service-backed storage: `crates/chipmunk-app/src/host/ui/storage/`, `crates/chipmunk-app/src/host/service/storage/` +- Lightweight host UI preferences: `crates/chipmunk-app/src/host/ui/persist.rs`, `crates/chipmunk-app/src/host/ui/state/preferences.rs` +- Command palette and shortcuts: `crates/chipmunk-app/src/host/ui/command_palette/`, `crates/chipmunk-app/src/host/ui/shortcuts/` + +## Ownership Model + +- UI state structs are the source of truth for native application/UI state. +- Services do not own canonical app/UI state; they only run backend work and copied request data. +- `Host` is the `eframe::App` and owns top-level rendering, message polling, tabs, storage, notifications, and global UI actions. +- `HostState` owns active tabs, open sessions, setup tabs, preferences, shortcuts, app info, top-level modals, plugin UI state, and `HostRegistry`. +- `HostRegistry` owns global filter/search-value definitions and presets. +- `HostStorage` owns UI-facing service-backed storage domains: recent sessions and file explorer/favorite folders. +- `persist` owns only lightweight host UI preferences saved through `eframe` storage. +- `PluginService` owns `PluginsManager`; UI code consumes published `PluginsState` and must not load or mutate plugin runtime state directly. +- `Session` owns one live session UI shell and its component UIs. +- `SessionShared` owns canonical per-session state: applied filters, temp search, search/chart operation state, log selection, bookmarks, observe state, attachments, exports, signals, and view state. +- Component UIs should keep only local render/edit/cache state unless they already own a specific domain. +- Backend/UI integration crosses `HostCommand`/`HostMessage` and `SessionCommand`/`SessionMessage`. + +## Coding Guidelines + +- Treat egui render paths as hot loops. Do not do expensive parsing, filtering, sorting, validation, formatting, filesystem work, plugin loading, or backend coordination directly in render code. Cache derived data and invalidate it through explicit state changes or revision counters. +- Prefer direct mutable state access when ownership allows it. Pass `&mut` state into helper/render functions when the borrow checker allows it, and avoid inventing enum action outputs that bubble upward only to work around avoidable ownership structure. +- Keep component UI state narrow. Component structs may own edit drafts, focus flags, scroll/prefetch state, throttles, pending dialogs, and render caches; do not duplicate canonical host/session state there. +- Keep file dialogs, confirmations, and modal state in the existing `UiActions`, `HostModalState`, or workflow state that owns the operation. +- Throttle repeated interactive backend requests. Use existing throttle/retry/send helpers for high-frequency UI interactions. +- Reuse local shared utilities. Before adding helpers or shared types, look for existing code under `crates/chipmunk-app/src/common/`, `crates/chipmunk-app/src/host/common/`, `crates/chipmunk-app/src/session/ui/common/`, and nearby `shared/` modules. + +## Change Entry Points + +- For filter/search/chart behavior, start from `SessionShared` and `crates/chipmunk-app/src/session/ui/shared/searching/`. +- For global filter or preset definitions, start from `HostRegistry`. +- For plugin behavior, keep runtime work in `crates/chipmunk-app/src/host/service/plugin/` and host UI state in `HostState.plugins`. +- For export behavior, start from `crates/chipmunk-app/src/session/ui/shared/export/` and `crates/chipmunk-app/src/session/service/export.rs`. +- For recent-session persistence, keep changes flowing through `SessionShared` revision tracking, `RecentSessionRuntime`, and `crates/chipmunk-app/src/host/ui/storage/recent/`. +- For favorite folders/file explorer persistence, start from `crates/chipmunk-app/src/host/ui/storage/`, `crates/chipmunk-app/src/host/ui/home/`, and `crates/chipmunk-app/src/host/service/storage/`. +- For table selection/bookmarks, keep semantic state in `LogsState`; table modules should own table-local scroll/prefetch state. + +## Validation + +Run validation only when requested or needed to verify a change. +Use targeted Cargo commands from the repository root, for example: + +- Check: `cargo check -p chipmunk-app` +- Test: `cargo test -p chipmunk-app` +- Lint: `cargo clippy -p chipmunk-app` diff --git a/.ai/knowledge/crates/chipmunk-cli/AGENTS.md b/.ai/knowledge/crates/chipmunk-cli/AGENTS.md new file mode 100644 index 0000000000..26f68cddfb --- /dev/null +++ b/.ai/knowledge/crates/chipmunk-cli/AGENTS.md @@ -0,0 +1,46 @@ +# Chipmunk CLI Context + +## Overview + +`crates/chipmunk-cli` is the terminal interface for connecting sources, parsing logs, and exporting output. +It orchestrates core runtime crates and owns CLI argument parsing and output formatting. + +## Start Here + +1. `crates/chipmunk-cli/Cargo.toml` +2. `crates/chipmunk-cli/src/main.rs` +3. `crates/chipmunk-cli/src/cli_args/` +4. `crates/chipmunk-cli/src/session/` +5. `crates/chipmunk-cli/src/session/format/` +6. `.ai/knowledge/crates/core/AGENTS.md` + +## If You Need X, Go to Y + +- Change command syntax/options: `crates/chipmunk-cli/src/cli_args/`. +- Change ingestion/parsing runtime behavior: `crates/chipmunk-cli/src/session/` and underlying core crates. +- Change output formatting: `crates/chipmunk-cli/src/session/format/`. +- Change parser-specific CLI behavior: `crates/chipmunk-cli/src/session/parser/`. +- Debug parser/source compatibility from CLI path: trace CLI args -> session wiring -> core source/parser setup. + +## Cross-Module Dependency Map + +- CLI orchestrates core capabilities for terminal use. +- Output format logic is local to `crates/chipmunk-cli`. +- Parsing, ingestion, and source behavior are rooted in `crates/core`. + +## Landmarks and Hotspots + +- Hierarchical `clap` command structure in `crates/chipmunk-cli/src/cli_args/`. +- Session flow that wires parser/source/output in `crates/chipmunk-cli/src/session/`. +- Binary and text output formatting under `crates/chipmunk-cli/src/session/format/`. +- Connection behavior in source-related paths. + +## Validation + +Run validation only when requested or needed to verify a change. +Use targeted Cargo commands from the repository root, for example: + +- Check: `cargo check -p chipmunk-cli` +- Test: `cargo test -p chipmunk-cli` +- Lint: `cargo clippy -p chipmunk-cli` +- Install: `cargo install --path crates/chipmunk-cli` diff --git a/.ai/knowledge/crates/core/AGENTS.md b/.ai/knowledge/crates/core/AGENTS.md new file mode 100644 index 0000000000..da97addefe --- /dev/null +++ b/.ai/knowledge/crates/core/AGENTS.md @@ -0,0 +1,75 @@ +# Core Runtime Context + +## Overview + +The core crates under `crates/core/` implement parsing, ingestion, indexing, search, merging, exports, source handling, and plugin execution. +The native app and CLI depend on these crates directly through Rust APIs. + +## Start Here + +1. `crates/core/session/src/` +2. `crates/core/processor/src/` +3. `crates/core/sources/src/` +4. `crates/core/parsers/src/` +5. `crates/stypes/src/` + +## Crate Map + +- `session`: API boundary for live sessions, operations, observing, search, exports, attachments, and unbound utility commands. +- `processor`: ingestion/search pipeline; `MessageProducer` coordinates `ByteSource` and `Parser` implementations. +- `sources`: byte ingestion from files, TCP, UDP, serial, processes, and pcap inputs. +- `parsers`: DLT, SOME/IP, text, and plugin parser integration. +- `indexer_base`: shared chunk, time, progress, and indexing primitives. +- `plugins_host`: runtime support for loading and executing WASM plugins. +- `merging`: multi-source chronological merge logic. +- `dlt-tools`: DLT-specific utility operations. +- `someip-tools`: SOME/IP-specific parsing helpers. +- `text_grep`: text search helpers used by processor search paths. + +## If You Need X, Go to Y + +- Change app/backend coordination: `crates/core/session/src/`. +- Add or modify session operations: `crates/core/session/src/handlers/`, `crates/core/session/src/unbound/commands/`, and `crates/stypes/src/operations/`. +- Add or modify ingestion sources: `crates/core/sources/src/` and `crates/core/processor/src/producer/`. +- Add or modify parser formats: `crates/core/parsers/src/` and `crates/core/processor/src/`. +- Change search/filter behavior: `crates/core/processor/src/search/` and `crates/core/session/src/state/searchers/`. +- Change search value extraction/chart values: `crates/core/session/src/state/values/` and `crates/core/processor/src/search/`. +- Adjust random-access/file-windowing: `crates/core/processor/src/grabber/` and `crates/core/indexer_base/src/`. +- Change observing/tailing behavior: `crates/core/session/src/handlers/observe.rs`, `crates/core/session/src/handlers/observing/`, and `crates/core/session/src/tail/`. +- Change plugin runtime/lifecycle: `crates/core/plugins_host/src/`. +- Change plugin contracts or package artifacts: `.ai/knowledge/plugins/AGENTS.md`. +- Add or change shared data types: `.ai/knowledge/crates/stypes/AGENTS.md`. +- Investigate pipeline failures: start in `crates/core/processor/src/producer/`. + +## Cross-Crate Flow + +- App/CLI request setup produces source and parser configuration from `stypes` types. +- `session` owns operation state and coordinates processor work for live sessions. +- `processor` reads bytes from `sources`, parses them with `parsers` or plugin-backed parsers, indexes chunks, and serves search/grab/export paths. +- `plugins_host` loads plugin components and adapts them into parser/source flows. +- `stypes` carries shared command, callback, progress, plugin, observe, and error types across crate boundaries. + +## Landmarks and Hotspots + +- `MessageProducer` in `crates/core/processor/src/producer/` for pipeline orchestration. +- `Session` APIs in `crates/core/session/src/session.rs` for frontend/backend coordination. +- Operation handlers in `crates/core/session/src/handlers/`. +- State controllers under `crates/core/session/src/state/`. +- `TimedLine` and chunk/progress types in `crates/core/indexer_base/src/`. +- `PluginsManager` and plugin host wrappers in `crates/core/plugins_host/src/`. +- Pcap handling under `crates/core/sources/src/binary/pcap/`. + +## Testing Notes + +- Snapshot tests live under `crates/core/session/tests/snapshot_tests/` and use `insta`. +- Property-style tests use `proptest`. +- Processor benchmarks and mocks live under `crates/core/processor/benches/`. + +## Validation + +Run validation only when requested or needed to verify a change. +Use targeted Cargo commands from the repository root, for example: + +- Check one crate: `cargo check -p ` +- Test one crate: `cargo test -p ` +- Lint one crate: `cargo clippy -p ` diff --git a/.ai/knowledge/crates/stypes/AGENTS.md b/.ai/knowledge/crates/stypes/AGENTS.md new file mode 100644 index 0000000000..5d80577d0b --- /dev/null +++ b/.ai/knowledge/crates/stypes/AGENTS.md @@ -0,0 +1,48 @@ +# Shared Types Context + +## Overview + +`crates/stypes` is the source of truth for Rust data structures shared by the native app, core runtime crates, CLI, and plugin-facing flows. +Treat changes here as cross-crate API changes. + +## Start Here + +1. `crates/stypes/Cargo.toml` +2. `crates/stypes/src/lib.rs` +3. `crates/stypes/src/command/` +4. `crates/stypes/src/callback/` +5. `crates/stypes/src/plugins/` +6. `crates/stypes/src/error/` + +## If You Need X, Go to Y + +- Add or modify command/config types: `crates/stypes/src/command/`. +- Add or modify callback/result payloads: `crates/stypes/src/callback/`. +- Change progress reporting types: `crates/stypes/src/progress/`. +- Change plugin-facing metadata/config/result types: `crates/stypes/src/plugins/`. +- Change observe/session source types: `crates/stypes/src/observe/`. +- Change attachment types: `crates/stypes/src/attachment/`. +- Change operation identifiers or operation payloads: `crates/stypes/src/operations/`. +- Change shared error types or formatting: `crates/stypes/src/error/`. +- Change folder/profile utility command types: `crates/stypes/src/command/folders/`, `crates/stypes/src/command/profiles/`. + +## Coding Guidelines + +- Keep shared types focused on domain contracts, not UI-specific state. +- Preserve serialization behavior deliberately; `serde` shape changes can affect persisted data and cross-crate messages. +- Prefer adding domain-specific types over passing loosely structured strings or maps across crate boundaries. +- Keep conversion and extension helpers near the type they belong to. +- Update call sites in `crates/chipmunk-app`, `crates/core`, and `crates/chipmunk-cli` when changing public types. + +## Technology Stack + +- `serde` for Rust serialization. +- `uuid`, `dlt-core`, `walkdir`, and core Rust types for shared data models. + +## Validation + +Run validation only when requested or needed to verify a change. +Use targeted Cargo commands from the repository root, for example: + +- Check: `cargo check -p stypes` +- Test dependents when public contracts change, usually the directly affected `chipmunk-app`, `session`, `processor`, or `chipmunk-cli` crate. diff --git a/.ai/knowledge/plugins/AGENTS.md b/.ai/knowledge/plugins/AGENTS.md index 2f7c6e6162..19e0d8853f 100644 --- a/.ai/knowledge/plugins/AGENTS.md +++ b/.ai/knowledge/plugins/AGENTS.md @@ -1,37 +1,46 @@ # Plugins System Context ## Overview + The plugin system extends Chipmunk with sandboxed WASM parser and bytesource components. +The plugin API crate is part of the main Rust workspace, while plugin examples and templates under `plugins/` are intentionally outside the main workspace validation path. -## Start Here (First Files to Open) +## Start Here -1. `plugins/plugins_api/Cargo.toml` (core plugin API crate) -2. `plugins/plugins_api/src/` (parser/bytesource traits, export macros, shared helpers) -3. `plugins/plugins_api/wit/v0.1.0/` (WIT contracts and worlds) -4. `plugins/examples/rust/` and `plugins/templates/rust/parser/` (reference and starter implementations) -5. `application/apps/indexer/plugins_host/src/` -6. `.ai/knowledge/application/apps/indexer/AGENTS.md` +1. `crates/plugins_api/Cargo.toml` +2. `crates/plugins_api/src/` +3. `crates/plugins_api/wit/v0.1.0/` +4. `plugins/examples/rust/` +5. `plugins/templates/rust/parser/` +6. `crates/core/plugins_host/src/` +7. `.ai/knowledge/crates/core/AGENTS.md` ## If You Need X, Go to Y -- Implement a Rust parser plugin: crate based on `plugins/templates/rust/parser/` or `plugins/examples/rust/` using `plugins_api` + `parser_export!`. -- Implement a Rust bytesource plugin: follow `plugins/examples/rust/file_source/` using `plugins_api` + `bytesource_export!`. -- Implement C/C++ plugin bindings: generate headers from `plugins/plugins_api/wit/v0.1.0/` via `wit-bindgen`. -- Debug load/runtime issues: plugin component artifacts plus host-side logic in `application/apps/indexer/plugins_host/`. +- Change plugin API traits, exports, or shared helpers: `crates/plugins_api/src/`. +- Change WIT contracts: `crates/plugins_api/wit/v0.1.0/`. +- Implement a Rust parser plugin: start from `plugins/templates/rust/parser/` or `plugins/examples/rust/` using `plugins_api` and `parser_export!`. +- Implement a Rust bytesource plugin: follow `plugins/examples/rust/file_source/` using `plugins_api` and `bytesource_export!`. +- Implement C/C++ plugin bindings: generate headers from `crates/plugins_api/wit/v0.1.0/` via `wit-bindgen`. +- Debug load/runtime issues: inspect plugin component artifacts plus host-side logic in `crates/core/plugins_host/src/`. - Verify install/discovery behavior: plugin output layout under `~/.chipmunk/plugins/...`. +- Change plugin UI behavior: `crates/chipmunk-app/src/host/ui/plugin_manager/` and `crates/chipmunk-app/src/host/service/plugin/`. ## Cross-Module Dependency Map -- Contracts/components are authored in `plugins`. -- Runtime loading/execution is handled by `application/apps/indexer/plugins_host` via `wasmtime`. -- Plugin outputs feed indexer ingestion/parsing pipelines. +- Contracts and export macros are authored in `crates/plugins_api`. +- Examples and templates live under `plugins/` and are built separately from the main workspace. +- Runtime loading/execution is handled by `crates/core/plugins_host` via `wasmtime`. +- Plugin outputs feed core ingestion/parsing pipelines. +- The native app owns plugin management UI and service coordination. ## Landmarks and Hotspots -- WIT interface definitions under `plugins/plugins_api/wit/v0.1.0/` and generated bindings. +- WIT interface definitions under `crates/plugins_api/wit/v0.1.0/` and generated bindings. - Export macros: `parser_export!`, `bytesource_export!`. -- WASM component model and WASI boundaries. -- Memory ownership rules (incoming/outgoing buffers) are critical hotspots. +- WASM Component Model and WASI boundaries. +- Memory ownership rules for incoming/outgoing buffers. +- Plugin cache, validation, and discovery in `crates/core/plugins_host/src/plugins_manager/`. ## Technology Stack @@ -42,6 +51,15 @@ The plugin system extends Chipmunk with sandboxed WASM parser and bytesource com ## Build and Installation -- Build (Rust component, from the plugin crate): `cargo component build -r` +- Build a Rust component from the plugin crate directory: `cargo component build -r` - Install parser plugin: `~/.chipmunk/plugins/parsers//` - Install bytesource plugin: `~/.chipmunk/plugins/bytesources//` + +## Validation + +Run validation only when requested or needed to verify a change. +Use targeted commands for the area changed: + +- Main workspace plugin API: `cargo test -p plugins_api` +- Plugin host runtime: `cargo test -p plugins_host` +- Plugin examples/templates under `plugins/`: run commands from the specific plugin crate directory. diff --git a/.github/workflows/chipmunk_alpha_release.yml b/.github/workflows/chipmunk_alpha_release.yml index 8d118fdcce..1a8807525a 100644 --- a/.github/workflows/chipmunk_alpha_release.yml +++ b/.github/workflows/chipmunk_alpha_release.yml @@ -71,7 +71,9 @@ jobs: uses: Swatinem/rust-cache@v2 with: workspaces: | - application/apps/indexer -> target + . -> target + - name: Install just + run: cargo install just --locked - name: Setup keychain for signing and notarizing if: runner.os == 'macOS' run: | @@ -96,24 +98,24 @@ jobs: shell: bash run: | if [ "${{ runner.os }}" = "macOS" ]; then - python3 scripts/release_app.py --code-sign + just release-signed else - python3 scripts/release_app.py + just release fi - name: List app release files - working-directory: ./application/apps/indexer/gui/application/release + working-directory: ./target/dist run: ls - name: Upload CI artifact uses: actions/upload-artifact@v4 with: name: chipmunk-alpha-${{ matrix.os }} path: | - ./application/apps/indexer/gui/application/release/*.tgz - ./application/apps/indexer/gui/application/release/*.zip + ./target/dist/*.tgz + ./target/dist/*.zip - name: Upload release asset uses: softprops/action-gh-release@v2 with: tag_name: ${{ github.ref_name }} files: | - ./application/apps/indexer/gui/application/release/*.tgz - ./application/apps/indexer/gui/application/release/*.zip + ./target/dist/*.tgz + ./target/dist/*.zip diff --git a/.github/workflows/lint_master.yml b/.github/workflows/lint_master.yml index 3218059b47..398083b083 100644 --- a/.github/workflows/lint_master.yml +++ b/.github/workflows/lint_master.yml @@ -6,7 +6,7 @@ on: - master jobs: - rust_and_ts_lint: + validate: runs-on: ubuntu-latest env: RUSTC_WRAPPER: sccache @@ -29,98 +29,25 @@ jobs: run: | sudo apt-get update sudo apt-get install -y libudev-dev - - name: install node - uses: actions/setup-node@master - with: - node-version: "lts/*" - name: Set up Rust toolchain uses: actions-rs/toolchain@v1 with: toolchain: stable override: true - components: clippy - - name: Install cargo-binstall - uses: cargo-bins/cargo-binstall@v1.9.0 + components: rustfmt, clippy - name: Run sccache-cache uses: mozilla-actions/sccache-action@v0.0.9 - - name: Install nj-cli - run: cargo binstall nj-cli - - name: enable corepack for yarnpkg upgrade - run: corepack enable - - name: Install Build CLI tool - run: cargo install --path=cli/development-cli --locked - - name: install wasm-pack - run: cargo binstall wasm-pack - - name: JS/TS linting - timeout-minutes: 30 - run: cargo chipmunk lint -u immediate - - name: TypeScript Check - Client Application - working-directory: application/client - run: yarn run check - - name: TypeScript Check - Holder Application - working-directory: application/holder - run: yarn run check - - name: TypeScript Check - Platform Application - working-directory: application/platform - run: yarn run check - - name: Show sccache stats - run: sccache --show-stats || true - - name: Stop sccache - run: sccache --stop-server || true - - integration_and_unit_tests: - runs-on: ubuntu-latest - env: - RUSTC_WRAPPER: sccache - SCCACHE_GHA_ENABLED: "true" - SCCACHE_DIR: /mnt/sccache - SCCACHE_CACHE_SIZE: "8G" - CARGO_TARGET_DIR: /mnt/target - TMPDIR: /mnt/tmp - TEMP: /mnt/tmp - TMP: /mnt/tmp - steps: - - name: Checkout - uses: actions/checkout@v2 - - name: Prepare build directories - run: | - sudo mkdir -p /mnt/target /mnt/sccache /mnt/tmp - sudo chown -R runner:runner /mnt - df -h - - name: libudev-dev - run: | - sudo apt-get update - sudo apt-get install -y libudev-dev - - name: install node - uses: actions/setup-node@master - with: - node-version: "lts/*" - - name: Set up Rust toolchain - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - override: true - - name: Install cargo-binstall - uses: cargo-bins/cargo-binstall@v1.9.0 - - name: Run sccache-cache - uses: mozilla-actions/sccache-action@v0.0.9 - - name: Install nj-cli - run: cargo binstall nj-cli - - name: enable corepack for yarnpkg upgrade - run: | - npm install tslib - corepack enable - - name: Install Build CLI tool - run: cargo install --path=cli/development-cli --locked - - name: install wasm-pack - run: cargo binstall wasm-pack - - name: Execute tests + - name: Install just + run: cargo install just --locked + - name: Validate workspace timeout-minutes: 30 env: # Environment variable is needed for snapshot testing in Rust via `insta` crate CI: true - run: cargo chipmunk test -u immediate + run: just validate - name: Show sccache stats + if: always() run: sccache --show-stats || true - name: Stop sccache - run: sccache --stop-server || true \ No newline at end of file + if: always() + run: sccache --stop-server || true diff --git a/.github/workflows/pullrequest_check.yml b/.github/workflows/pullrequest_check.yml index 4b45aa083d..048f532528 100644 --- a/.github/workflows/pullrequest_check.yml +++ b/.github/workflows/pullrequest_check.yml @@ -11,8 +11,8 @@ on: workflow_dispatch: jobs: - ts_and_rust_lint: - if: github.event.pull_request.draft == false && github.event.pull_request.base.ref == 'master' + validate: + if: github.event_name == 'workflow_dispatch' || (github.event.pull_request.draft == false && github.event.pull_request.base.ref == 'master') runs-on: ubuntu-latest env: RUSTC_WRAPPER: sccache @@ -35,100 +35,25 @@ jobs: run: | sudo apt-get update sudo apt-get install -y libudev-dev - - name: install node - uses: actions/setup-node@master - with: - node-version: "lts/*" - name: Set up Rust toolchain uses: actions-rs/toolchain@v1 with: toolchain: stable override: true - components: clippy - - name: Install cargo-binstall - uses: cargo-bins/cargo-binstall@v1.9.0 + components: rustfmt, clippy - name: Run sccache-cache uses: mozilla-actions/sccache-action@v0.0.9 - - name: Install nj-cli - run: cargo binstall nj-cli - - name: enable corepack for yarnpkg upgrade - run: corepack enable - - name: Install Build CLI tool - run: cargo install --path=cli/development-cli --locked - - name: install wasm-pack - run: cargo binstall wasm-pack - - name: JS/TS linting - timeout-minutes: 30 - run: cargo chipmunk lint -u immediate - - name: TypeScript Check - Client Application - working-directory: application/client - run: yarn run check - - name: TypeScript Check - Holder Application - working-directory: application/holder - run: yarn run check - - name: TypeScript Check - Platform Application - working-directory: application/platform - run: yarn run check - - integration_and_unit_tests: - if: github.event.pull_request.draft == false && github.event.pull_request.base.ref == 'master' - runs-on: ubuntu-latest - env: - RUSTC_WRAPPER: sccache - SCCACHE_GHA_ENABLED: "true" - SCCACHE_DIR: /mnt/sccache - SCCACHE_CACHE_SIZE: "8G" - CARGO_TARGET_DIR: /mnt/target - TMPDIR: /mnt/tmp - TEMP: /mnt/tmp - TMP: /mnt/tmp - steps: - - name: Checkout - uses: actions/checkout@v2 - - name: Prepare build directories - run: | - sudo mkdir -p /mnt/target /mnt/sccache /mnt/tmp - sudo chown -R runner:runner /mnt - df -h - - name: libudev-dev - run: | - sudo apt-get update - sudo apt-get install -y libudev-dev - - name: install node - uses: actions/setup-node@master - with: - node-version: "lts/*" - - name: Set up Rust toolchain - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - override: true - - name: Install cargo-binstall - uses: cargo-bins/cargo-binstall@v1.9.0 - - name: Run sccache-cache - uses: mozilla-actions/sccache-action@v0.0.9 - - name: Install nj-cli - run: cargo binstall nj-cli - - name: enable corepack for yarnpkg upgrade - run: | - npm install tslib - corepack enable - - name: Install Build CLI tool - run: cargo install --path=cli/development-cli --locked - - name: install wasm-pack - run: cargo binstall wasm-pack - - name: Execute tests + - name: Install just + run: cargo install just --locked + - name: Validate workspace timeout-minutes: 30 env: # Environment variable is needed for snapshot testing in Rust via `insta` crate CI: true - run: cargo chipmunk test -u immediate - - name: Execute cli tests - if: contains(github.event.pull_request.labels.*.name, 'build-cli') - timeout-minutes: 30 - run: python3 integration_tests/run_all.py - working-directory: ./cli/development-cli + run: just validate - name: Show sccache stats + if: always() run: sccache --show-stats || true - name: Stop sccache + if: always() run: sccache --stop-server || true diff --git a/.gitignore b/.gitignore index 2143ec5bf4..b3347fb000 100644 --- a/.gitignore +++ b/.gitignore @@ -1,20 +1,18 @@ -# Yarn stuff # -################### -.yarn -**/.yarn -# Compiled source # -################### +# Rust build artifacts +/target/ +**/target/ +**/*.rs.bk + +# Native build outputs *.com *.class *.dll *.exe *.o *.so +*.wasm -# Packages # -############ -# it's better to unpack these files and commit the raw source -# git has its own built in compression methods +# Archives and release artifacts *.7z *.dmg *.gz @@ -23,15 +21,18 @@ *.rar *.tar *.zip +*portable.tgz -# Logs and databases # -###################### -#*.log # application/apps/indexer/merging/test_samples includes logs for testing +# Logs and databases +# Do not ignore *.log; crate fixtures include committed log samples. *.sql *.sqlite -# OS generated files # -###################### +# Python cache +__pycache__/ +*.py[cod] + +# OS/editor files .DS_Store .DS_Store? ._* @@ -39,42 +40,13 @@ .Trashes ehthumbs.db Thumbs.db -# Others # -########## -**/node_modules -**/*.js -**/*.js.map -!application/holder/hooks/*.js -**/.vscode -**/vscode -**/.DS_store -**/dist -**/build -**/.angular -application/apps/**/target/* -application/apps/rustcore/ts-cli -.vscode -!webpack.config.js -.idea -!application/platform -./external -TODO.md +.idea/ +.vscode/ +**/.vscode/ +**/vscode/ vim-markdown-preview.html -local/**/* -**/.env -**/*.node -application/apps/indexer-neon/native/artifacts.json -*portable.tgz -**/*.metadata.json -application/apps/indexer-neon/out/ -application/sandbox/serial/render/lib/views/dialog/port.available -sandbox -sandbox.backup -**/holder/release -**/apps/indexer/gui/application/release -scripts/tools/file_checklists/*.* -# CLI build tool files # -######################## -.build_chksum_* -.build_last_state +# Local-only files +local/ +**/.env +TODO.md diff --git a/.rubocop.yml b/.rubocop.yml deleted file mode 100644 index 8ba0d824e2..0000000000 --- a/.rubocop.yml +++ /dev/null @@ -1,10 +0,0 @@ -AllCops: - NewCops: enable - -Metrics/BlockLength: - Max: 120 - Enabled: true - -Metrics/MethodLength: - Max: 30 - Enabled: true diff --git a/application/apps/indexer/Cargo.lock b/Cargo.lock similarity index 88% rename from application/apps/indexer/Cargo.lock rename to Cargo.lock index 9bfb7c03b5..fce4b0d6b9 100644 --- a/application/apps/indexer/Cargo.lock +++ b/Cargo.lock @@ -2,16 +2,6 @@ # It is not intended for manual editing. version = 4 -[[package]] -name = "Inflector" -version = "0.11.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe438c63458706e03479442743baae6c88256498e6431708f6dfc520a26515d3" -dependencies = [ - "lazy_static", - "regex", -] - [[package]] name = "ab_glyph" version = "0.2.32" @@ -41,12 +31,12 @@ dependencies = [ [[package]] name = "accesskit_atspi_common" -version = "0.18.0" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "842fd8203e6dfcf531d24f5bac792088edfba7d6b35844fead191603fb32a260" +checksum = "1e8c61bee90b42a772d39d06a740207dc71a4e780004ace1db8d99fb1baaa954" dependencies = [ "accesskit", - "accesskit_consumer", + "accesskit_consumer 0.36.0", "atspi-common", "phf 0.13.1", "serde", @@ -63,14 +53,24 @@ dependencies = [ "hashbrown 0.16.1", ] +[[package]] +name = "accesskit_consumer" +version = "0.36.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "25e0d7e25d06f4dc21d1774d67146e9e80d6789216cbd4d1e88185b0095dba60" +dependencies = [ + "accesskit", + "hashbrown 0.16.1", +] + [[package]] name = "accesskit_macos" -version = "0.26.0" +version = "0.26.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "534bc3fdc89a64a1db3c46b33c198fde2b7c3c7d094e5809c8c8bf2970c18243" +checksum = "4c5c87e8d94f2ec10cce590aadff24c76f576dab5502d45d0aed9fc3065d4451" dependencies = [ "accesskit", - "accesskit_consumer", + "accesskit_consumer 0.36.0", "hashbrown 0.16.1", "objc2 0.5.2", "objc2-app-kit 0.2.2", @@ -79,13 +79,13 @@ dependencies = [ [[package]] name = "accesskit_unix" -version = "0.21.0" +version = "0.21.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90e549dd7c6562b6a2ea807b44726e6241707db054a817dc4c7e2b8d3b39bfac" +checksum = "b016ca8db0ea0ea2ceff29a9d6240391492d960716aa471967c00e8cc8cb197c" dependencies = [ "accesskit", "accesskit_atspi_common", - "async-channel 2.5.0", + "async-channel", "async-executor", "async-task", "atspi", @@ -102,7 +102,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "eff7009f1a532e917d66970a1e80c965140c6cfbbabbdde3d64e5431e6c78e21" dependencies = [ "accesskit", - "accesskit_consumer", + "accesskit_consumer 0.35.0", "hashbrown 0.16.1", "static_assertions", "windows", @@ -161,15 +161,6 @@ dependencies = [ "memchr", ] -[[package]] -name = "aligned" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee4508988c62edf04abd8d92897fca0c2995d907ce1dfeaf369dac3716a40685" -dependencies = [ - "as-slice", -] - [[package]] name = "allocator-api2" version = "0.2.21" @@ -189,7 +180,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0f2a1bb052857d5dd49572219344a7332b31b76405648eabac5bc68978251bcd" dependencies = [ "android-properties", - "bitflags 2.11.0", + "bitflags 2.11.1", "cc", "jni", "libc", @@ -224,12 +215,12 @@ checksum = "4b46cbb362ab8752921c97e041f5e366ee6297bd428a31275b9fcf1e380f7299" [[package]] name = "anstream" -version = "0.6.21" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43d5b281e737544384e969a5ccad3f1cdd24b48086a0fc1b2a5262a26b8f4f4a" +checksum = "824a212faf96e9acacdbd09febd34438f8f711fb84e09a8916013cd7815ca28d" dependencies = [ "anstyle", - "anstyle-parse 0.2.7", + "anstyle-parse", "anstyle-query", "anstyle-wincon", "colorchoice", @@ -239,18 +230,9 @@ dependencies = [ [[package]] name = "anstyle" -version = "1.0.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5192cca8006f1fd4f7237516f40fa183bb07f8fbdfedaa0036de5ea9b0b45e78" - -[[package]] -name = "anstyle-parse" -version = "0.2.7" +version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e7644824f0aa2c7b9384579234ef10eb7efb6a0deb83f9630a49594dd9c15c2" -dependencies = [ - "utf8parse", -] +checksum = "940b3a0ca603d1eade50a4846a2afffd5ef57a9feac2c0e2ec2e14f9ead76000" [[package]] name = "anstyle-parse" @@ -287,57 +269,6 @@ version = "1.0.102" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7f202df86484c868dbad7eaa557ef785d5c66295e41b460ef922eca0723b842c" -[[package]] -name = "application" -version = "4.0.0-alpha.1" -dependencies = [ - "anstyle-parse 1.0.0", - "anyhow", - "blake3", - "chrono", - "chrono-tz 0.8.6", - "clap", - "dirs", - "dlt-core", - "eframe", - "egui", - "egui-phosphor", - "egui_commonmark", - "egui_extras", - "egui_plot", - "egui_table", - "enum-iterator", - "env_logger", - "file-tools", - "image", - "itertools 0.14.0", - "log", - "memchr", - "merging", - "nucleo-matcher", - "parsers", - "plugins_host", - "processor", - "regex", - "regex-syntax", - "reqwest", - "rfd", - "rustc-hash 2.1.1", - "semver", - "serde", - "serde_json", - "serialport", - "session", - "shell-tools", - "sources", - "stypes", - "thiserror 2.0.18", - "tokio", - "unicode-segmentation", - "uuid", - "winit", -] - [[package]] name = "ar_archive_writer" version = "0.5.1" @@ -369,7 +300,7 @@ dependencies = [ "objc2-foundation 0.3.2", "parking_lot", "percent-encoding", - "windows-sys 0.59.0", + "windows-sys 0.60.2", "x11rb", ] @@ -391,15 +322,6 @@ version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "175571dd1d178ced59193a6fc02dde1b972eb0bc56c892cde9beeceac5bf0f6b" -[[package]] -name = "as-slice" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "516b6b4f0e40d50dcda9365d53964ec74560ad4284da2e7fc97122cd83174516" -dependencies = [ - "stable_deref_trait", -] - [[package]] name = "ash" version = "0.38.0+1.3.281" @@ -415,23 +337,12 @@ version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "435a87a52755b8f27fcf321ac4f04b2802e337c8c4872923137471ec39c37532" dependencies = [ - "event-listener 5.4.1", + "event-listener", "event-listener-strategy", "futures-core", "pin-project-lite", ] -[[package]] -name = "async-channel" -version = "1.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81953c529336010edd6d8e358f886d9581267795c61b19475b71314bffa46d35" -dependencies = [ - "concurrent-queue", - "event-listener 2.5.3", - "futures-core", -] - [[package]] name = "async-channel" version = "2.5.0" @@ -458,21 +369,6 @@ dependencies = [ "slab", ] -[[package]] -name = "async-global-executor" -version = "2.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05b1b633a2115cd122d73b955eadd9916c18c8f510ec9cd1686404c60ad1c29c" -dependencies = [ - "async-channel 2.5.0", - "async-executor", - "async-io", - "async-lock", - "blocking", - "futures-lite", - "once_cell", -] - [[package]] name = "async-io" version = "2.6.0" @@ -497,7 +393,7 @@ version = "3.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "290f7f2596bd5b78a9fec8088ccd89180d7f9f55b94b0576823bbbdc72ee8311" dependencies = [ - "event-listener 5.4.1", + "event-listener", "event-listener-strategy", "pin-project-lite", ] @@ -508,14 +404,14 @@ version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fc50921ec0055cdd8a16de48773bfeec5c972598674347252c0399676be7da75" dependencies = [ - "async-channel 2.5.0", + "async-channel", "async-io", "async-lock", "async-signal", "async-task", "blocking", "cfg-if", - "event-listener 5.4.1", + "event-listener", "futures-lite", "rustix 1.1.4", ] @@ -528,14 +424,14 @@ checksum = "3b43422f69d8ff38f95f1b2bb76517c91589a924d1559a0e935d7c8ce0274c11" dependencies = [ "proc-macro2", "quote", - "syn 2.0.117", + "syn", ] [[package]] name = "async-signal" -version = "0.2.13" +version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43c070bbf59cd3570b6b2dd54cd772527c7c3620fce8be898406dd3ed6adc64c" +checksum = "52b5aaafa020cf5053a01f2a60e8ff5dccf550f0f77ec54a4e47285ac2bab485" dependencies = [ "async-io", "async-lock", @@ -549,33 +445,6 @@ dependencies = [ "windows-sys 0.61.2", ] -[[package]] -name = "async-std" -version = "1.13.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c8e079a4ab67ae52b7403632e4618815d6db36d2a010cfe41b02c1b1578f93b" -dependencies = [ - "async-channel 1.9.0", - "async-global-executor", - "async-io", - "async-lock", - "async-process", - "crossbeam-utils", - "futures-channel", - "futures-core", - "futures-io", - "futures-lite", - "gloo-timers", - "kv-log-macro", - "log", - "memchr", - "once_cell", - "pin-project-lite", - "pin-utils", - "slab", - "wasm-bindgen-futures", -] - [[package]] name = "async-task" version = "4.7.1" @@ -590,7 +459,7 @@ checksum = "9035ad2d096bed7955a320ee7e2230574d28fd3c3a0f186cbea1ff3c7eed5dbb" dependencies = [ "proc-macro2", "quote", - "syn 2.0.117", + "syn", ] [[package]] @@ -638,9 +507,9 @@ dependencies = [ [[package]] name = "autocfg" -version = "1.5.0" +version = "1.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8" +checksum = "f2032f911046de80f0a198e0901378627c33f59ea0ac00e363d481118bd70a53" [[package]] name = "base64" @@ -695,25 +564,25 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.11.0" +version = "2.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "843867be96c8daad0d758b57df9392b6d8d271134fce549de6ce169ff98a92af" +checksum = "c4512299f36f043ab09a583e57bceb5a5aab7a73db1805848e8fef3c9e8c78b3" dependencies = [ "serde_core", ] [[package]] name = "blake3" -version = "1.8.3" +version = "1.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2468ef7d57b3fb7e16b576e8377cdbde2320c60e1491e961d11da40fc4f02a2d" +checksum = "0aa83c34e62843d924f905e0f5c866eb1dd6545fc4d719e803d9ba6030371fce" dependencies = [ "arrayref", "arrayvec", "cc", "cfg-if", "constant_time_eq", - "cpufeatures", + "cpufeatures 0.3.0", "rayon-core", ] @@ -750,7 +619,7 @@ version = "1.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e83f8d02be6967315521be875afa792a316e28d57b5a2d401897e2a7921b7f21" dependencies = [ - "async-channel 2.5.0", + "async-channel", "async-task", "futures-io", "futures-lite", @@ -774,7 +643,7 @@ version = "4.0.0-alpha.1" dependencies = [ "criterion", "proptest", - "rand 0.9.2", + "rand 0.9.4", ] [[package]] @@ -809,7 +678,7 @@ checksum = "f9abbd1bc6865053c427f7198e6af43bfdedc55ab791faed4fbd361d789575ff" dependencies = [ "proc-macro2", "quote", - "syn 2.0.117", + "syn", ] [[package]] @@ -836,7 +705,7 @@ version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b99da2f8558ca23c71f4fd15dc57c906239752dd27ff3c00a1d56b685b7cbfec" dependencies = [ - "bitflags 2.11.0", + "bitflags 2.11.1", "log", "polling", "rustix 0.38.44", @@ -850,7 +719,7 @@ version = "0.14.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4dbf9978365bac10f54d1d4b04f7ce4427e51f71d61f2fe15e3fed5166474df7" dependencies = [ - "bitflags 2.11.0", + "bitflags 2.11.1", "polling", "rustix 1.1.4", "slab", @@ -930,7 +799,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d8144c22e24bbcf26ade86cb6501a0916c46b7e4787abdb0045a467eb1645a1d" dependencies = [ "ambient-authority", - "rand 0.8.5", + "rand 0.8.6", ] [[package]] @@ -967,9 +836,9 @@ checksum = "37b2a672a2cb129a2e41c10b1224bb368f9f37a2b16b612598138befd7b37eb5" [[package]] name = "cc" -version = "1.2.56" +version = "1.2.62" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aebf35691d1bfb0ac386a69bac2fde4dd276fb618cf8bf4f5318fe285e821bb2" +checksum = "a1dce859f0832a7d088c4f1119888ab94ef4b5d6795d1ce05afb7fe159d79f98" dependencies = [ "find-msvc-tools", "jobserver", @@ -998,6 +867,71 @@ dependencies = [ "libc", ] +[[package]] +name = "chipmunk-app" +version = "4.0.0-alpha.1" +dependencies = [ + "anstyle-parse", + "anyhow", + "blake3", + "chrono", + "chrono-tz", + "clap", + "dirs", + "dlt-core", + "eframe", + "egui", + "egui-phosphor", + "egui_commonmark", + "egui_extras", + "egui_plot", + "egui_table", + "enum-iterator", + "env_logger", + "file-tools", + "image", + "itertools 0.14.0", + "log", + "memchr", + "merging", + "nucleo-matcher", + "parsers", + "plugins_host", + "processor", + "regex", + "regex-syntax", + "reqwest", + "rfd", + "rustc-hash 2.1.2", + "semver", + "serde", + "serde_json", + "serialport", + "session", + "shell-tools", + "sources", + "stypes", + "thiserror 2.0.18", + "tokio", + "unicode-segmentation", + "uuid", + "winit", +] + +[[package]] +name = "chipmunk-cli" +version = "0.2.2" +dependencies = [ + "anyhow", + "clap", + "futures", + "parsers", + "processor", + "sources", + "tokio", + "tokio-util", +] + [[package]] name = "chrono" version = "0.4.44" @@ -1011,17 +945,6 @@ dependencies = [ "windows-link", ] -[[package]] -name = "chrono-tz" -version = "0.8.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d59ae0466b83e838b81a54256c39d5d7c20b9d7daa10510a242d9b75abd5936e" -dependencies = [ - "chrono", - "chrono-tz-build", - "phf 0.11.3", -] - [[package]] name = "chrono-tz" version = "0.10.4" @@ -1032,17 +955,6 @@ dependencies = [ "phf 0.12.1", ] -[[package]] -name = "chrono-tz-build" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "433e39f13c9a060046954e0592a8d0a4bcb1040125cbf91cb8ee58964cfb350f" -dependencies = [ - "parse-zoneinfo", - "phf 0.11.3", - "phf_codegen", -] - [[package]] name = "ciborium" version = "0.2.2" @@ -1078,9 +990,9 @@ checksum = "b0fc239e0f6cb375d2402d48afb92f76f5404fd1df208a41930ec81eda078bea" [[package]] name = "clap" -version = "4.5.60" +version = "4.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2797f34da339ce31042b27d23607e051786132987f595b02ba4f6a6dffb7030a" +checksum = "1ddb117e43bbf7dacf0a4190fef4d345b9bad68dfc649cb349e7d17d28428e51" dependencies = [ "clap_builder", "clap_derive", @@ -1088,9 +1000,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.5.60" +version = "4.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24a241312cea5059b13574bb9b3861cabf758b879c15190b37b6d6fd63ab6876" +checksum = "714a53001bf66416adb0e2ef5ac857140e7dc3a0c48fb28b2f10762fc4b5069f" dependencies = [ "anstream", "anstyle", @@ -1100,21 +1012,21 @@ dependencies = [ [[package]] name = "clap_derive" -version = "4.5.55" +version = "4.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a92793da1a46a5f2a02a6f4c46c6496b28c43638adea8306fcb0caa1634f24e5" +checksum = "f2ce8604710f6733aa641a2b3731eaa1e8b3d9973d5e3565da11800813f997a9" dependencies = [ "heck", "proc-macro2", "quote", - "syn 2.0.117", + "syn", ] [[package]] name = "clap_lex" -version = "1.0.0" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3a822ea5bc7590f9d40f1ba12c0dc3c2760f3482c6984db1573ad11031420831" +checksum = "c8d4a3bb8b1e0c1050499d1815f5ab16d04f0959b233085fb31653fbfc9d98f9" [[package]] name = "clipboard-win" @@ -1147,9 +1059,9 @@ dependencies = [ [[package]] name = "color" -version = "0.3.2" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a18ef4657441fb193b65f34dc39b3781f0dfec23d3bd94d0eeb4e88cde421edb" +checksum = "2ec7c5eb7a16992b1904d76c517d170ab353b0e0b3d5a0c81a8a0cd1037893cf" dependencies = [ "bytemuck", ] @@ -1162,9 +1074,9 @@ checksum = "3d7b894f5411737b7867f4827955924d7c254fc9f4d91a6aad6b097804b1018b" [[package]] name = "colorchoice" -version = "1.0.4" +version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b05b61dc5112cbb17e4b6cd61790d9845d13888356391624cbe7e41efeac1e75" +checksum = "1d07550c9036bf2ae0c684c4297d503f838287c83c53686d05370d0e139ae570" [[package]] name = "combine" @@ -1187,14 +1099,13 @@ dependencies = [ [[package]] name = "console" -version = "0.15.11" +version = "0.16.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "054ccb5b10f9f2cbf51eb355ca1d05c2d279ce1804688d0db74b4733a5aeafd8" +checksum = "d64e8af5551369d19cf50138de61f1c42074ab970f74e99be916646777f8fc87" dependencies = [ "encode_unicode", "libc", - "once_cell", - "windows-sys 0.59.0", + "windows-sys 0.61.2", ] [[package]] @@ -1215,9 +1126,9 @@ dependencies = [ [[package]] name = "core-foundation" -version = "0.10.0" +version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b55271e5c8c478ad3f38ad24ef34923091e0548492a266d19b3c0b4d82574c63" +checksum = "b2a6cd9ae233e7f62ba4e9353e81a88df7fc8a5987b8d445b4d90c879bd156f6" dependencies = [ "core-foundation-sys", "libc", @@ -1271,6 +1182,15 @@ dependencies = [ "libc", ] +[[package]] +name = "cpufeatures" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b2a41393f66f16b0823bb79094d54ac5fbd34ab292ddafb9a0456ac9f87d201" +dependencies = [ + "libc", +] + [[package]] name = "cranelift-assembler-x64" version = "0.120.2" @@ -1328,7 +1248,7 @@ dependencies = [ "log", "pulley-interpreter", "regalloc2", - "rustc-hash 2.1.1", + "rustc-hash 2.1.2", "serde", "smallvec", "target-lexicon", @@ -1495,41 +1415,12 @@ dependencies = [ "typenum", ] -[[package]] -name = "ctor" -version = "0.1.26" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d2301688392eb071b0bf1a37be05c469d3cc4dbbd95df672fe28ab021e6a096" -dependencies = [ - "quote", - "syn 1.0.109", -] - -[[package]] -name = "ctor" -version = "0.2.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32a2785755761f3ddc1492979ce1e48d2c00d09311c39e4466429188f3dd6501" -dependencies = [ - "quote", - "syn 2.0.117", -] - [[package]] name = "cursor-icon" version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f27ae1dd37df86211c42e150270f82743308803d90a6f6e6651cd730d5e1732f" -[[package]] -name = "cvt" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2ae9bf77fbf2d39ef573205d554d87e86c12f1994e9ea335b0651b9b278bcf1" -dependencies = [ - "cfg-if", -] - [[package]] name = "darling" version = "0.20.11" @@ -1551,7 +1442,7 @@ dependencies = [ "proc-macro2", "quote", "strsim", - "syn 2.0.117", + "syn", ] [[package]] @@ -1562,7 +1453,7 @@ checksum = "fc34b93ccb385b40dc71c6fceac4b2ad23662c7eeb248cf10d529b7e055b6ead" dependencies = [ "darling_core", "quote", - "syn 2.0.117", + "syn", ] [[package]] @@ -1592,7 +1483,7 @@ dependencies = [ "darling", "proc-macro2", "quote", - "syn 2.0.117", + "syn", ] [[package]] @@ -1602,7 +1493,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ab63b0e2bf4d5928aff72e83a7dace85d7bba5fe12dcc3c5a572d78caffd3f3c" dependencies = [ "derive_builder_core", - "syn 2.0.117", + "syn", ] [[package]] @@ -1625,11 +1516,14 @@ dependencies = [ name = "dir_checksum" version = "0.1.0" dependencies = [ + "anyhow", "blake3", "ignore", "log", "memmap2", + "pretty_assertions", "rayon", + "tempdir", "thiserror 2.0.18", ] @@ -1687,7 +1581,7 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1e0e367e4e7da84520dedcac1901e4da967309406d1e51017ae1abfb97adbd38" dependencies = [ - "bitflags 2.11.0", + "bitflags 2.11.1", "block2 0.6.2", "libc", "objc2 0.6.4", @@ -1701,7 +1595,7 @@ checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.117", + "syn", ] [[package]] @@ -1726,7 +1620,7 @@ dependencies = [ "memchr", "nom", "quick-xml 0.29.0", - "rustc-hash 2.1.1", + "rustc-hash 2.1.2", "serde", "serde_json", "thiserror 1.0.69", @@ -1822,7 +1716,7 @@ source = "git+https://github.com/AmmarAbouZor/egui?rev=a9f3a3e4ce95e014d46bae8ab dependencies = [ "accesskit", "ahash", - "bitflags 2.11.0", + "bitflags 2.11.1", "emath", "epaint", "log", @@ -1961,9 +1855,9 @@ dependencies = [ [[package]] name = "either" -version = "1.15.0" +version = "1.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "48c757948c5ede0e46177b7add2e67155f70e33c07fea8284df6576da70b3719" +checksum = "91622ff5e7162018101f2fea40d6ebf4a78bbe5a49736a2020649edf9693679e" [[package]] name = "emath" @@ -2033,7 +1927,7 @@ checksum = "685adfa4d6f3d765a26bc5dbc936577de9abf756c1feeb3089b01dd395034842" dependencies = [ "proc-macro2", "quote", - "syn 2.0.117", + "syn", ] [[package]] @@ -2053,7 +1947,7 @@ checksum = "f282cfdfe92516eb26c2af8589c274c7c17681f5ecc03c18255fe741c6aa64eb" dependencies = [ "proc-macro2", "quote", - "syn 2.0.117", + "syn", ] [[package]] @@ -2074,7 +1968,7 @@ checksum = "67c78a4d8fdf9953a5c9d458f9efe940fd97a0cab0941c075a813ac594733827" dependencies = [ "proc-macro2", "quote", - "syn 2.0.117", + "syn", ] [[package]] @@ -2085,14 +1979,14 @@ checksum = "2f9ed6b3789237c8a0c1c505af1c7eb2c560df6186f01b098c3a1064ea532f38" dependencies = [ "proc-macro2", "quote", - "syn 2.0.117", + "syn", ] [[package]] name = "env_filter" -version = "1.0.0" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a1c3cc8e57274ec99de65301228b537f1e4eedc1b8e0f9411c6caac8ae7308f" +checksum = "32e90c2accc4b07a8456ea0debdc2e7587bdd890680d71173a15d4ae604f6eef" dependencies = [ "log", "regex", @@ -2100,9 +1994,9 @@ dependencies = [ [[package]] name = "env_logger" -version = "0.11.9" +version = "0.11.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2daee4ea451f429a58296525ddf28b45a3b64f1acf6587e2067437bb11e218d" +checksum = "0621c04f2196ac3f488dd583365b9c09be011a4ab8b9f37248ffcc8f6198b56a" dependencies = [ "anstream", "anstyle", @@ -2179,12 +2073,6 @@ dependencies = [ "num-traits", ] -[[package]] -name = "event-listener" -version = "2.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0206175f82b8d6bf6652ff7d71a1e27fd2e4efde587fd368662814d6ec1d9ce0" - [[package]] name = "event-listener" version = "5.4.1" @@ -2202,19 +2090,10 @@ version = "0.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8be9f3dfaaffdae2972880079a491a1a8bb7cbed0b8dd7a347f668b4150a3b93" dependencies = [ - "event-listener 5.4.1", + "event-listener", "pin-project-lite", ] -[[package]] -name = "extend" -version = "0.1.0" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.117", -] - [[package]] name = "fallible-iterator" version = "0.3.0" @@ -2223,29 +2102,15 @@ checksum = "2acce4a10f12dc2fb14a218589d4f1f62ef011b2d0cc4b3cb1bba8e94da14649" [[package]] name = "fastrand" -version = "2.3.0" +version = "2.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37909eebbb50d72f9059c3b6d82c0463f2ff062c9e95845c43a6c9c0355411be" +checksum = "9f1f227452a390804cdb637b74a86990f2a7d7ba4b7d5693aac9b4dd6defd8d6" [[package]] name = "fax" -version = "0.2.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f05de7d48f37cd6730705cbca900770cab77a89f413d23e100ad7fad7795a0ab" -dependencies = [ - "fax_derive", -] - -[[package]] -name = "fax_derive" -version = "0.2.0" +version = "0.2.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a0aca10fb742cb43f9e7bb8467c91aa9bcb8e3ffbc6a6f7389bb93ffc920577d" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.117", -] +checksum = "caf1079563223d5d59d83c85886a56e586cfd5c1a26292e971a0fa266531ac5a" [[package]] name = "fd-lock" @@ -2290,27 +2155,13 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5baebc0774151f905a1a2cc41989300b1e6fbb29aff0ceffa1064fdd3088d582" [[package]] -name = "flate2" -version = "1.1.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "843fba2746e448b37e26a819579957415c8cef339bf08564fe8b7ddbd959573c" -dependencies = [ - "crc32fast", - "miniz_oxide", -] - -[[package]] -name = "fluvio-future" -version = "0.7.2" +name = "flate2" +version = "1.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aeb6426efa0dc4cc12226634b5b2657237b67028837e79ef4ad4706c4f211bd9" +checksum = "843fba2746e448b37e26a819579957415c8cef339bf08564fe8b7ddbd959573c" dependencies = [ - "anyhow", - "async-std", - "cfg-if", - "thiserror 2.0.18", - "tracing", - "tracing-subscriber", + "crc32fast", + "miniz_oxide", ] [[package]] @@ -2368,7 +2219,7 @@ checksum = "1a5c6c585bc94aaf2c7b51dd4c2ba22680844aba4c687be581871a6f518c5742" dependencies = [ "proc-macro2", "quote", - "syn 2.0.117", + "syn", ] [[package]] @@ -2404,18 +2255,10 @@ dependencies = [ ] [[package]] -name = "fs_at" -version = "0.2.1" +name = "fuchsia-cprng" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14af6c9694ea25db25baa2a1788703b9e7c6648dcaeeebeb98f7561b5384c036" -dependencies = [ - "aligned", - "cfg-if", - "cvt", - "libc", - "nix 0.29.0", - "windows-sys 0.52.0", -] +checksum = "a06f77d526c1a601b7c4cdd98f54b5eaabffc14d5f2f0296febdc7f357c6d3ba" [[package]] name = "futures" @@ -2486,7 +2329,7 @@ checksum = "e835b70203e41293343137df5c0664546da5745f82ec9b84d40be8336958447b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.117", + "syn", ] [[package]] @@ -2533,7 +2376,7 @@ version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "27d12c0aed7f1e24276a241aadc4cb8ea9f83000f34bc062b7cc2d51e3b0fabd" dependencies = [ - "bitflags 2.11.0", + "bitflags 2.11.1", "debugid", "fxhash", "serde", @@ -2596,22 +2439,11 @@ dependencies = [ "wasip3", ] -[[package]] -name = "ghost" -version = "0.1.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d1323e4e10ffd5d48a21ea37f8d4e3b15dd841121d1301a86122fa0984bedf0a" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.117", -] - [[package]] name = "gif" -version = "0.14.1" +version = "0.14.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f5df2ba84018d80c213569363bdcd0c64e6933c67fe4c1d60ecf822971a3c35e" +checksum = "ee8cfcc411d9adbbaba82fb72661cc1bcca13e8bba98b364e62b2dba8f960159" dependencies = [ "color_quant", "weezl", @@ -2639,6 +2471,12 @@ dependencies = [ "xml-rs", ] +[[package]] +name = "glob" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0cc23270f6e1808e30a928bdc84dea0b9b4136a8bc82338574f23baf47bbd280" + [[package]] name = "globset" version = "0.4.18" @@ -2652,18 +2490,6 @@ dependencies = [ "regex-syntax", ] -[[package]] -name = "gloo-timers" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbb143cf96099802033e0d4f4963b19fd2e0b728bcf076cd9cf7f6634f092994" -dependencies = [ - "futures-channel", - "futures-core", - "js-sys", - "wasm-bindgen", -] - [[package]] name = "glow" version = "0.17.0" @@ -2682,7 +2508,7 @@ version = "0.32.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "12124de845cacfebedff80e877bb37b5b75c34c5a4c89e47e1cdd67fb6041325" dependencies = [ - "bitflags 2.11.0", + "bitflags 2.11.1", "cfg_aliases", "cgl", "dispatch2", @@ -2762,7 +2588,7 @@ version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b89c83349105e3732062a895becfc71a8f921bb71ecbbdd8ff99263e3b53a0ca" dependencies = [ - "bitflags 2.11.0", + "bitflags 2.11.1", "gpu-descriptor-types", "hashbrown 0.15.5", ] @@ -2773,7 +2599,7 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fdf242682df893b86f33a73828fb09ca4b2d3bb6cc95249707fc684d27484b91" dependencies = [ - "bitflags 2.11.0", + "bitflags 2.11.1", ] [[package]] @@ -2815,9 +2641,9 @@ dependencies = [ [[package]] name = "h2" -version = "0.4.13" +version = "0.4.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f44da3a8150a6703ed5d34e164b875fd14c2cdab9af1252a9a1020bde2bdc54" +checksum = "171fefbc92fe4a4de27e0698d6a5b392d6a0e333506bc49133760b3bcf948733" dependencies = [ "atomic-waker", "bytes", @@ -2865,6 +2691,12 @@ dependencies = [ "foldhash 0.2.0", ] +[[package]] +name = "hashbrown" +version = "0.17.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed5909b6e89a2db4456e54cd5f673791d7eca6732202bbf2a9cc504fe2f9b84a" + [[package]] name = "heck" version = "0.5.0" @@ -3040,12 +2872,13 @@ dependencies = [ [[package]] name = "icu_collections" -version = "2.1.1" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c6b649701667bbe825c3b7e6388cb521c23d88644678e83c0c4d0a621a34b43" +checksum = "2984d1cd16c883d7935b9e07e44071dca8d917fd52ecc02c04d5fa0b5a3f191c" dependencies = [ "displaydoc", "potential_utf", + "utf8_iter", "yoke", "zerofrom", "zerovec", @@ -3053,9 +2886,9 @@ dependencies = [ [[package]] name = "icu_locale_core" -version = "2.1.1" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "edba7861004dd3714265b4db54a3c390e880ab658fec5f7db895fae2046b5bb6" +checksum = "92219b62b3e2b4d88ac5119f8904c10f8f61bf7e95b640d25ba3075e6cac2c29" dependencies = [ "displaydoc", "litemap", @@ -3066,9 +2899,9 @@ dependencies = [ [[package]] name = "icu_normalizer" -version = "2.1.1" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f6c8828b67bf8908d82127b2054ea1b4427ff0230ee9141c54251934ab1b599" +checksum = "c56e5ee99d6e3d33bd91c5d85458b6005a22140021cc324cea84dd0e72cff3b4" dependencies = [ "icu_collections", "icu_normalizer_data", @@ -3080,15 +2913,15 @@ dependencies = [ [[package]] name = "icu_normalizer_data" -version = "2.1.1" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7aedcccd01fc5fe81e6b489c15b247b8b0690feb23304303a9e560f37efc560a" +checksum = "da3be0ae77ea334f4da67c12f149704f19f81d1adf7c51cf482943e84a2bad38" [[package]] name = "icu_properties" -version = "2.1.2" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "020bfc02fe870ec3a66d93e677ccca0562506e5872c650f893269e08615d74ec" +checksum = "bee3b67d0ea5c2cca5003417989af8996f8604e34fb9ddf96208a033901e70de" dependencies = [ "icu_collections", "icu_locale_core", @@ -3100,15 +2933,15 @@ dependencies = [ [[package]] name = "icu_properties_data" -version = "2.1.2" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "616c294cf8d725c6afcd8f55abc17c56464ef6211f9ed59cccffe534129c77af" +checksum = "8e2bbb201e0c04f7b4b3e14382af113e17ba4f63e2c9d2ee626b720cbce54a14" [[package]] name = "icu_provider" -version = "2.1.1" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85962cf0ce02e1e0a629cc34e7ca3e373ce20dda4c4d7294bbd0bf1fdb59e614" +checksum = "139c4cf31c8b5f33d7e199446eff9c1e02decfc2f0eec2c8d71f65befa45b421" dependencies = [ "displaydoc", "icu_locale_core", @@ -3144,9 +2977,9 @@ dependencies = [ [[package]] name = "idna_adapter" -version = "1.2.1" +version = "1.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3acae9609540aa318d1bc588455225fb2085b9ed0c4f6bd0d9d5bcd86f1a0344" +checksum = "cb68373c0d6620ef8105e855e7745e18b0d00d3bdb07fb532e434244cdb9a714" dependencies = [ "icu_normalizer", "icu_properties", @@ -3208,21 +3041,21 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.13.0" +version = "2.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7714e70437a7dc3ac8eb7e6f8df75fd8eb422675fc7678aff7364301092b1017" +checksum = "d466e9454f08e4a911e14806c24e16fba1b4c121d1ea474396f396069cf949d9" dependencies = [ "equivalent", - "hashbrown 0.16.1", + "hashbrown 0.17.1", "serde", "serde_core", ] [[package]] name = "insta" -version = "1.46.3" +version = "1.47.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e82db8c87c7f1ccecb34ce0c24399b8a73081427f3c7c50a5d597925356115e4" +checksum = "7b4a6248eb93a4401ed2f37dfe8ea592d3cf05b7cf4f8efa867b6895af7e094e" dependencies = [ "console", "once_cell", @@ -3231,28 +3064,6 @@ dependencies = [ "tempfile", ] -[[package]] -name = "inventory" -version = "0.1.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0eb5160c60ba1e809707918ee329adb99d222888155835c6feedba19f6c3fd4" -dependencies = [ - "ctor 0.1.26", - "ghost", - "inventory-impl", -] - -[[package]] -name = "inventory-impl" -version = "0.1.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e41b53715c6f0c4be49510bb82dee2c1e51c8586d885abe65396e82ed518548" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - [[package]] name = "io-extras" version = "0.18.4" @@ -3285,16 +3096,6 @@ version = "2.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d98f6fed1fde3f8c21bc40a1abb88dd75e67924f9cffc3ef95607bad8017f8e2" -[[package]] -name = "iri-string" -version = "0.7.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25e659a4bb38e810ebc252e53b5814ff908a8c58c2a9ce2fae1bbec24cbf4e20" -dependencies = [ - "memchr", - "serde", -] - [[package]] name = "is-terminal" version = "0.4.17" @@ -3332,9 +3133,9 @@ dependencies = [ [[package]] name = "itoa" -version = "1.0.17" +version = "1.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92ecc6618181def0457392ccd0ee51198e065e016d1d527a7ac1b6dc7c1f09d2" +checksum = "8f42a60cbdf9a97f5d2305f08a87dc4e09308d1276d28c869c684d7777685682" [[package]] name = "ittapi" @@ -3358,9 +3159,9 @@ dependencies = [ [[package]] name = "jiff" -version = "0.2.23" +version = "0.2.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a3546dc96b6d42c5f24902af9e2538e82e39ad350b0c766eb3fbf2d8f3d8359" +checksum = "f00b5dbd620d61dfdcb6007c9c1f6054ebd75319f163d886a9055cec1155073d" dependencies = [ "jiff-static", "log", @@ -3371,13 +3172,13 @@ dependencies = [ [[package]] name = "jiff-static" -version = "0.2.23" +version = "0.2.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a8c8b344124222efd714b73bb41f8b5120b27a7cc1c75593a6ff768d9d05aa4" +checksum = "e000de030ff8022ea1da3f466fbb0f3a809f5e51ed31f6dd931c35181ad8e6d7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.117", + "syn", ] [[package]] @@ -3407,7 +3208,7 @@ dependencies = [ "quote", "rustc_version", "simd_cesu8", - "syn 2.0.117", + "syn", ] [[package]] @@ -3435,7 +3236,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "38c0b942f458fe50cdac086d2f946512305e5631e720728f2a61aabcd47a6264" dependencies = [ "quote", - "syn 2.0.117", + "syn", ] [[package]] @@ -3450,10 +3251,12 @@ dependencies = [ [[package]] name = "js-sys" -version = "0.3.91" +version = "0.3.98" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b49715b7073f385ba4bc528e5747d02e66cb39c6146efb66b781f131f0fb399c" +checksum = "67df7112613f8bfd9150013a0314e196f4800d3201ae742489d999db2f979f08" dependencies = [ + "cfg-if", + "futures-util", "once_cell", "wasm-bindgen", ] @@ -3477,24 +3280,16 @@ checksum = "e2db585e1d738fc771bf08a151420d3ed193d9d895a36df7f6f8a9456b911ddc" [[package]] name = "kurbo" -version = "0.13.0" +version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7564e90fe3c0d5771e1f0bc95322b21baaeaa0d9213fa6a0b61c99f8b17b3bfb" +checksum = "4b60dfc32f652b926df6192e55525b16d186c69d47876c3ead4da5cc9f8450e2" dependencies = [ "arrayvec", "euclid", + "polycool", "smallvec", ] -[[package]] -name = "kv-log-macro" -version = "1.0.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0de8b303297635ad57c9f5059fd9cee7a47f8e8daa09df0fcd07dd39fb22977f" -dependencies = [ - "log", -] - [[package]] name = "lazy_static" version = "1.5.0" @@ -3503,9 +3298,9 @@ checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" [[package]] name = "leb128" -version = "0.2.5" +version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "884e2677b40cc8c339eaefcb701c32ef1fd2493d71118dc0ca4b6a736c93bd67" +checksum = "6cc46bac87ef8093eed6f272babb833b6443374399985ac8ed28471ee0918545" [[package]] name = "leb128fmt" @@ -3515,9 +3310,9 @@ checksum = "09edd9e8b54e49e587e4f6295a7d29c3ea94d469cb40ab8ca70b288248a81db2" [[package]] name = "libc" -version = "0.2.183" +version = "0.2.186" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5b646652bf6661599e1da8901b3b9522896f01e736bad5f723fe7a3a27f899d" +checksum = "68ab91017fe16c622486840e4c83c9a37afeff978bd239b5293d61ece587de66" [[package]] name = "libloading" @@ -3537,14 +3332,14 @@ checksum = "b6d2cec3eae94f9f509c767b45932f1ada8350c4bdb85af2fcab4a3c14807981" [[package]] name = "libredox" -version = "0.1.14" +version = "0.1.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1744e39d1d6a9948f4f388969627434e31128196de472883b39f148769bfe30a" +checksum = "e02f3bb43d335493c96bf3fd3a321600bf6bd07ed34bc64118e9293bdffea46c" dependencies = [ - "bitflags 2.11.0", + "bitflags 2.11.1", "libc", "plain", - "redox_syscall 0.7.4", + "redox_syscall 0.7.5", ] [[package]] @@ -3587,9 +3382,9 @@ checksum = "32a66949e030da00e8c7d4434b251670a91556f4144941d37452769c25d58a53" [[package]] name = "litemap" -version = "0.8.1" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6373607a59f0be73a39b6fe456b8192fcc3585f602af20751600e974dd455e77" +checksum = "92daf443525c4cce67b150400bc2316076100ce0b3686209eb8cf3c31612e6f0" [[package]] name = "litrs" @@ -3611,9 +3406,6 @@ name = "log" version = "0.4.29" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5e5032e24019045c762d3c0f28f5b6b8bbf38563a65908389bf7978758920897" -dependencies = [ - "value-bag", -] [[package]] name = "mach2" @@ -3624,15 +3416,6 @@ dependencies = [ "libc", ] -[[package]] -name = "matchers" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d1525a2a28c7f4fa0fc98bb91ae755d1e2d1505079e05539e35bc876b5d65ae9" -dependencies = [ - "regex-automata", -] - [[package]] name = "maybe-owned" version = "0.3.4" @@ -3728,9 +3511,9 @@ dependencies = [ [[package]] name = "mio" -version = "1.1.1" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a69bcab0ad47271a0234d9422b131806bf3968021e5dc9328caf2d4cd58557fc" +checksum = "50b7e5b27aa02a74bac8c3f23f448f8d87ff11f92d3aac1a6ed369ee08cc56c1" dependencies = [ "libc", "log", @@ -3763,13 +3546,13 @@ dependencies = [ [[package]] name = "naga" -version = "29.0.1" +version = "29.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa2630921705b9b01dcdd0b6864b9562ca3c1951eecd0f0c4f5f04f61e412647" +checksum = "0dd91265cc2454558f659b3b4b9640f0ddb8cc6521277f166b8a8c181c898079" dependencies = [ "arrayvec", "bit-set 0.9.1", - "bitflags 2.11.0", + "bitflags 2.11.1", "cfg-if", "cfg_aliases", "codespan-reporting", @@ -3810,7 +3593,7 @@ version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c3f42e7bbe13d351b6bead8286a43aac9534b82bd3cc43e47037f012ebfd62d4" dependencies = [ - "bitflags 2.11.0", + "bitflags 2.11.1", "jni-sys 0.3.1", "log", "ndk-sys", @@ -3851,55 +3634,12 @@ version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "71e2746dc3a24dd78b3cfcb7be93368c6de9963d30f43a6a73998a9cf4b17b46" dependencies = [ - "bitflags 2.11.0", + "bitflags 2.11.1", "cfg-if", "cfg_aliases", "libc", ] -[[package]] -name = "nj-core" -version = "6.1.0" -source = "git+https://github.com/infinyon/node-bindgen.git?branch=master#1c6f19b658b0acaf71a25f5f2e4d8b4d970363ad" -dependencies = [ - "async-trait", - "ctor 0.2.9", - "fluvio-future", - "futures-lite", - "inventory", - "libc", - "nj-sys", - "num-bigint", - "pin-utils", - "tracing", -] - -[[package]] -name = "nj-derive" -version = "3.4.3" -source = "git+https://github.com/infinyon/node-bindgen.git?branch=master#1c6f19b658b0acaf71a25f5f2e4d8b4d970363ad" -dependencies = [ - "Inflector", - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "nj-sys" -version = "4.0.0" -source = "git+https://github.com/infinyon/node-bindgen.git?branch=master#1c6f19b658b0acaf71a25f5f2e4d8b4d970363ad" - -[[package]] -name = "node-bindgen" -version = "6.1.0" -source = "git+https://github.com/infinyon/node-bindgen.git?branch=master#1c6f19b658b0acaf71a25f5f2e4d8b4d970363ad" -dependencies = [ - "nj-core", - "nj-derive", - "nj-sys", -] - [[package]] name = "nohash-hasher" version = "0.2.0" @@ -3916,24 +3656,6 @@ dependencies = [ "minimal-lexical", ] -[[package]] -name = "normpath" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf23ab2b905654b4cb177e30b629937b3868311d4e1cba859f899c041046e69b" -dependencies = [ - "windows-sys 0.61.2", -] - -[[package]] -name = "nu-ansi-term" -version = "0.50.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7957b9740744892f114936ab4a57b3f487491bbeafaf8083688b16841a4240e5" -dependencies = [ - "windows-sys 0.61.2", -] - [[package]] name = "nucleo-matcher" version = "0.3.1" @@ -3944,25 +3666,6 @@ dependencies = [ "unicode-segmentation", ] -[[package]] -name = "num-bigint" -version = "0.4.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a5e44f723f1133c9deac646763579fdb3ac745e418f2a7af9cd0c431da1f20b9" -dependencies = [ - "num-integer", - "num-traits", -] - -[[package]] -name = "num-integer" -version = "0.1.46" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7969661fd2958a5cb096e56c8e1ad0444ac2bbcd0061bd28660485a44879858f" -dependencies = [ - "num-traits", -] - [[package]] name = "num-traits" version = "0.2.19" @@ -3992,7 +3695,7 @@ dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn 2.0.117", + "syn", ] [[package]] @@ -4026,7 +3729,7 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e4e89ad9e3d7d297152b17d39ed92cd50ca8063a89a9fa569046d41568891eff" dependencies = [ - "bitflags 2.11.0", + "bitflags 2.11.1", "block2 0.5.1", "libc", "objc2 0.5.2", @@ -4042,7 +3745,7 @@ version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d49e936b501e5c5bf01fda3a9452ff86dc3ea98ad5f283e1455153142d97518c" dependencies = [ - "bitflags 2.11.0", + "bitflags 2.11.1", "block2 0.6.2", "objc2 0.6.4", "objc2-core-foundation", @@ -4056,7 +3759,7 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "74dd3b56391c7a0596a295029734d3c1c5e7e510a4cb30245f8221ccea96b009" dependencies = [ - "bitflags 2.11.0", + "bitflags 2.11.1", "block2 0.5.1", "objc2 0.5.2", "objc2-core-location", @@ -4080,7 +3783,7 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "617fbf49e071c178c0b24c080767db52958f716d9eabdf0890523aeae54773ef" dependencies = [ - "bitflags 2.11.0", + "bitflags 2.11.1", "block2 0.5.1", "objc2 0.5.2", "objc2-foundation 0.2.2", @@ -4092,7 +3795,7 @@ version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2a180dd8642fa45cdb7dd721cd4c11b1cadd4929ce112ebd8b9f5803cc79d536" dependencies = [ - "bitflags 2.11.0", + "bitflags 2.11.1", "dispatch2", "objc2 0.6.4", ] @@ -4103,7 +3806,7 @@ version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e022c9d066895efa1345f8e33e584b9f958da2fd4cd116792e15e07e4720a807" dependencies = [ - "bitflags 2.11.0", + "bitflags 2.11.1", "dispatch2", "objc2 0.6.4", "objc2-core-foundation", @@ -4146,7 +3849,7 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0ee638a5da3799329310ad4cfa62fbf045d5f56e3ef5ba4149e7452dcf89d5a8" dependencies = [ - "bitflags 2.11.0", + "bitflags 2.11.1", "block2 0.5.1", "dispatch", "libc", @@ -4159,7 +3862,7 @@ version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e3e0adef53c21f888deb4fa59fc59f7eb17404926ee8a6f59f5df0fd7f9f3272" dependencies = [ - "bitflags 2.11.0", + "bitflags 2.11.1", "block2 0.6.2", "objc2 0.6.4", "objc2-core-foundation", @@ -4171,7 +3874,7 @@ version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "180788110936d59bab6bd83b6060ffdfffb3b922ba1396b312ae795e1de9d81d" dependencies = [ - "bitflags 2.11.0", + "bitflags 2.11.1", "objc2 0.6.4", "objc2-core-foundation", ] @@ -4194,7 +3897,7 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dd0cba1276f6023976a406a14ffa85e1fdd19df6b0f737b063b95f6c8c7aadd6" dependencies = [ - "bitflags 2.11.0", + "bitflags 2.11.1", "block2 0.5.1", "objc2 0.5.2", "objc2-foundation 0.2.2", @@ -4206,7 +3909,7 @@ version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a0125f776a10d00af4152d74616409f0d4a2053a6f57fa5b7d6aa2854ac04794" dependencies = [ - "bitflags 2.11.0", + "bitflags 2.11.1", "block2 0.6.2", "objc2 0.6.4", "objc2-foundation 0.3.2", @@ -4218,7 +3921,7 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e42bee7bff906b14b167da2bac5efe6b6a07e6f7c0a21a7308d40c960242dc7a" dependencies = [ - "bitflags 2.11.0", + "bitflags 2.11.1", "block2 0.5.1", "objc2 0.5.2", "objc2-foundation 0.2.2", @@ -4231,7 +3934,7 @@ version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "96c1358452b371bf9f104e21ec536d37a650eb10f7ee379fff67d2e08d537f1f" dependencies = [ - "bitflags 2.11.0", + "bitflags 2.11.1", "objc2 0.6.4", "objc2-core-foundation", "objc2-foundation 0.3.2", @@ -4254,7 +3957,7 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b8bb46798b20cd6b91cbd113524c490f1686f4c4e8f49502431415f3512e2b6f" dependencies = [ - "bitflags 2.11.0", + "bitflags 2.11.1", "block2 0.5.1", "objc2 0.5.2", "objc2-cloud-kit", @@ -4275,7 +3978,7 @@ version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d87d638e33c06f577498cbcc50491496a3ed4246998a7fbba7ccb98b1e7eab22" dependencies = [ - "bitflags 2.11.0", + "bitflags 2.11.1", "objc2 0.6.4", "objc2-core-foundation", "objc2-foundation 0.3.2", @@ -4298,7 +4001,7 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "76cfcbf642358e8689af64cee815d139339f3ed8ad05103ed5eaf73db8d84cb3" dependencies = [ - "bitflags 2.11.0", + "bitflags 2.11.1", "block2 0.5.1", "objc2 0.5.2", "objc2-core-location", @@ -4328,9 +4031,9 @@ dependencies = [ [[package]] name = "once_cell" -version = "1.21.3" +version = "1.21.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d" +checksum = "9f7c3e4beb33f85d45ae3e3a1792185706c8e16d043238c593331cc7cd313b50" [[package]] name = "once_cell_polyfill" @@ -4346,15 +4049,14 @@ checksum = "d6790f58c7ff633d8771f42965289203411a5e5c68388703c06e14f24770b41e" [[package]] name = "openssl" -version = "0.10.78" +version = "0.10.80" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f38c4372413cdaaf3cc79dd92d29d7d9f5ab09b51b10dded508fb90bb70b9222" +checksum = "a45fa2aa886c42762255da344f0a0d313e254066c46aad76f300c3d3da62d967" dependencies = [ - "bitflags 2.11.0", + "bitflags 2.11.1", "cfg-if", "foreign-types 0.3.2", "libc", - "once_cell", "openssl-macros", "openssl-sys", ] @@ -4367,7 +4069,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.117", + "syn", ] [[package]] @@ -4378,9 +4080,9 @@ checksum = "7c87def4c32ab89d880effc9e097653c8da5d6ef28e6b539d313baaacfbafcbe" [[package]] name = "openssl-sys" -version = "0.9.114" +version = "0.9.116" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13ce1245cd07fcc4cfdb438f7507b0c7e4f3849a69fd84d52374c66d83741bb6" +checksum = "f28a22dc7140cda5f096e5e7724a6962ca81a7f8bfd2979f9b18c11af56318c4" dependencies = [ "cc", "libc", @@ -4396,9 +4098,9 @@ checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d" [[package]] name = "orbclient" -version = "0.3.53" +version = "0.3.54" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12c6933ddbbd16539a7672e697bb8d41ac3a4e99ac43eeb40c07236bd7fcb2dd" +checksum = "a570f6bca41d29acb2139229a7c873ec99bc9a313bd10804081d89bfac8ff329" dependencies = [ "libc", "libredox", @@ -4461,27 +4163,18 @@ dependencies = [ "windows-link", ] -[[package]] -name = "parse-zoneinfo" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f2a05b18d44e2957b88f96ba460715e295bc1d7510468a2f3d3b44535d26c24" -dependencies = [ - "regex", -] - [[package]] name = "parsers" version = "4.0.0-alpha.1" dependencies = [ "byteorder", "chrono", - "chrono-tz 0.10.4", + "chrono-tz", "dlt-core", "lazy_static", "log", "memchr", - "rand 0.9.2", + "rand 0.9.4", "regex", "serde", "someip-messages", @@ -4491,12 +4184,6 @@ dependencies = [ "thiserror 2.0.18", ] -[[package]] -name = "paste" -version = "1.0.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" - [[package]] name = "pcap-parser" version = "0.16.0" @@ -4510,9 +4197,9 @@ dependencies = [ [[package]] name = "peniko" -version = "0.6.0" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a2b6aadb221872732e87d465213e9be5af2849b0e8cc5300a8ba98fffa2e00a" +checksum = "839c8299360d2e998bdb106dc0a6cd71dcc5f4df51df1b620361bf50e283cca6" dependencies = [ "bytemuck", "color", @@ -4557,16 +4244,6 @@ dependencies = [ "serde", ] -[[package]] -name = "phf_codegen" -version = "0.11.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aef8048c789fa5e851558d709946d6d79a8ff88c0440c587967f8e94bfb1216a" -dependencies = [ - "phf_generator 0.11.3", - "phf_shared 0.11.3", -] - [[package]] name = "phf_generator" version = "0.11.3" @@ -4574,7 +4251,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3c80231409c20246a13fddb31776fb942c38553c51e871f8cbd687a4cfb5843d" dependencies = [ "phf_shared 0.11.3", - "rand 0.8.5", + "rand 0.8.6", ] [[package]] @@ -4597,7 +4274,7 @@ dependencies = [ "phf_shared 0.11.3", "proc-macro2", "quote", - "syn 2.0.117", + "syn", "unicase", ] @@ -4611,7 +4288,7 @@ dependencies = [ "phf_shared 0.13.1", "proc-macro2", "quote", - "syn 2.0.117", + "syn", ] [[package]] @@ -4644,22 +4321,22 @@ dependencies = [ [[package]] name = "pin-project" -version = "1.1.11" +version = "1.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1749c7ed4bcaf4c3d0a3efc28538844fb29bcdd7d2b67b2be7e20ba861ff517" +checksum = "2466b2336ed02bcdca6b294417127b90ec92038d1d5c4fbeac971a922e0e0924" dependencies = [ "pin-project-internal", ] [[package]] name = "pin-project-internal" -version = "1.1.11" +version = "1.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9b20ed30f105399776b9c883e68e536ef602a16ae6f596d2c473591d6ad64c6" +checksum = "c96395f0a926bc13b1c17622aaddda1ecb55d49c8f1bf9777e4d877800a43f8b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.117", + "syn", ] [[package]] @@ -4668,12 +4345,6 @@ version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a89322df9ebe1c1578d689c92318e070967d1042b512afbe49518723f4e6d5cd" -[[package]] -name = "pin-utils" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" - [[package]] name = "piper" version = "0.2.5" @@ -4687,9 +4358,9 @@ dependencies = [ [[package]] name = "pkg-config" -version = "0.3.32" +version = "0.3.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7edddbd0b52d732b21ad9a5fab5c704c14cd949e5e9a1ec5929a24fded1b904c" +checksum = "19f132c84eca552bf34cab8ec81f1c1dcc229b811638f9d283dceabe58c5569e" [[package]] name = "plain" @@ -4725,6 +4396,15 @@ dependencies = [ "plotters-backend", ] +[[package]] +name = "plugins_api" +version = "0.1.0" +dependencies = [ + "log", + "trybuild", + "wit-bindgen 0.42.1", +] + [[package]] name = "plugins_host" version = "4.0.0-alpha.1" @@ -4737,13 +4417,13 @@ dependencies = [ "log", "parsers", "processor", - "rand 0.9.2", + "rand 0.9.4", "serde", "serde_json", "stypes", "thiserror 2.0.18", "tokio", - "toml", + "toml 0.8.23", "wasmtime", "wasmtime-wasi", ] @@ -4754,7 +4434,7 @@ version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "60769b8b31b2a9f263dae2776c37b1b28ae246943cf719eb6946a1db05128a61" dependencies = [ - "bitflags 2.11.0", + "bitflags 2.11.1", "crc32fast", "fdeflate", "flate2", @@ -4781,6 +4461,15 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2f3a9f18d041e6d0e102a0a46750538147e5e8992d3b4873aaafee2520b00ce3" +[[package]] +name = "polycool" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "50596ddc09eb5ad5f75cacd40209568e66df71baf86e1499a0e99c4cff12a5a6" +dependencies = [ + "arrayvec", +] + [[package]] name = "portable-atomic" version = "1.13.1" @@ -4789,9 +4478,9 @@ checksum = "c33a9471896f1c69cecef8d20cbe2f7accd12527ce60845ff44c153bb2a21b49" [[package]] name = "portable-atomic-util" -version = "0.2.5" +version = "0.2.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a9db96d7fa8782dd8c15ce32ffe8680bbd1e978a43bf51a34d39483540495f5" +checksum = "c2a106d1259c23fac8e543272398ae0e3c0b8d33c88ed73d0cc71b0f1d902618" dependencies = [ "portable-atomic", ] @@ -4810,9 +4499,9 @@ dependencies = [ [[package]] name = "potential_utf" -version = "0.1.4" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b73949432f5e2a09657003c25bca5e19a0e9c84f8058ca374f49e0ebe605af77" +checksum = "0103b1cef7ec0cf76490e969665504990193874ea05c85ff9bab8b911d0a0564" dependencies = [ "zerovec", ] @@ -4849,7 +4538,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "479ca8adacdd7ce8f1fb39ce9ecccbfe93a3f1344b3d0d97f20bc0196208f62b" dependencies = [ "proc-macro2", - "syn 2.0.117", + "syn", ] [[package]] @@ -4888,7 +4577,7 @@ dependencies = [ "parsers", "plugins_host", "pretty_assertions", - "rand 0.9.2", + "rand 0.9.4", "regex", "serde", "serde_json", @@ -4899,26 +4588,26 @@ dependencies = [ "thiserror 2.0.18", "tokio", "tokio-util", - "toml", + "toml 0.8.23", ] [[package]] name = "profiling" -version = "1.0.17" +version = "1.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3eb8486b569e12e2c32ad3e204dbaba5e4b5b216e9367044f25f1dba42341773" +checksum = "3d595e54a326bc53c1c197b32d295e14b169e3cfeaa8dc82b529f947fba6bcf5" [[package]] name = "proptest" -version = "1.10.0" +version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37566cb3fdacef14c0737f9546df7cfeadbfbc9fef10991038bf5015d0c80532" +checksum = "4b45fcc2344c680f5025fe57779faef368840d0bd1f42f216291f0dc4ace4744" dependencies = [ "bit-set 0.8.0", "bit-vec 0.8.0", - "bitflags 2.11.0", + "bitflags 2.11.1", "num-traits", - "rand 0.9.2", + "rand 0.9.4", "rand_chacha 0.9.0", "rand_xorshift", "regex-syntax", @@ -4929,9 +4618,9 @@ dependencies = [ [[package]] name = "psm" -version = "0.1.30" +version = "0.1.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3852766467df634d74f0b2d7819bf8dc483a0eb2e3b0f50f756f9cfe8b0d18d8" +checksum = "645dbe486e346d9b5de3ef16ede18c26e6c70ad97418f4874b8b1889d6e761ea" dependencies = [ "ar_archive_writer", "cc", @@ -4939,11 +4628,11 @@ dependencies = [ [[package]] name = "pulldown-cmark" -version = "0.13.3" +version = "0.13.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c3a14896dfa883796f1cb410461aef38810ea05f2b2c33c5aded3649095fdad" +checksum = "e9f068eba8e7071c5f9511831b44f32c740d5adf574e990f946ddb53db2f314e" dependencies = [ - "bitflags 2.11.0", + "bitflags 2.11.1", "memchr", "unicase", ] @@ -4997,28 +4686,19 @@ dependencies = [ [[package]] name = "quick-xml" -version = "0.38.4" +version = "0.39.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b66c2058c55a409d601666cffe35f04333cf1013010882cec174a7467cd4e21c" +checksum = "cdcc8dd4e2f670d309a5f0e83fe36dfdc05af317008fea29144da1a2ac858e5e" dependencies = [ "memchr", "serde", ] -[[package]] -name = "quick-xml" -version = "0.39.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "958f21e8e7ceb5a1aa7fa87fab28e7c75976e0bfe7e23ff069e0a260f894067d" -dependencies = [ - "memchr", -] - [[package]] name = "quote" -version = "1.0.40" +version = "1.0.45" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1885c039570dc00dcb4ff087a89e185fd56bae234ddc7f056a945bf36467248d" +checksum = "41f2619966050689382d2b44f664f4bc593e129785a36d6ee376ddf37259b924" dependencies = [ "proc-macro2", ] @@ -5037,9 +4717,22 @@ checksum = "f8dcc9c7d52a811697d2151c701e0d08956f92b0e24136cf4cf27b57a6a0d9bf" [[package]] name = "rand" -version = "0.8.5" +version = "0.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "552840b97013b1a26992c11eac34bdd778e464601a4c2054b5f0bff7c6761293" +dependencies = [ + "fuchsia-cprng", + "libc", + "rand_core 0.3.1", + "rdrand", + "winapi", +] + +[[package]] +name = "rand" +version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" +checksum = "5ca0ecfa931c29007047d1bc58e623ab12e5590e8c7cc53200d5202b69266d8a" dependencies = [ "libc", "rand_chacha 0.3.1", @@ -5048,9 +4741,9 @@ dependencies = [ [[package]] name = "rand" -version = "0.9.2" +version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6db2770f06117d490610c7488547d543617b21bfa07796d7a12f6f1bd53850d1" +checksum = "44c5af06bb1b7d3216d91932aed5265164bf384dc89cd6ba05cf59a35f5f76ea" dependencies = [ "rand_chacha 0.9.0", "rand_core 0.9.5", @@ -5076,6 +4769,21 @@ dependencies = [ "rand_core 0.9.5", ] +[[package]] +name = "rand_core" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a6fdeb83b075e8266dcc8762c22776f6877a63111121f5f8c7411e5be7eed4b" +dependencies = [ + "rand_core 0.4.2", +] + +[[package]] +name = "rand_core" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c33a3c44ca05fa6f1807d8e6743f3824e8509beca625669633be0acbdf509dc" + [[package]] name = "rand_core" version = "0.6.4" @@ -5129,9 +4837,9 @@ dependencies = [ [[package]] name = "rayon" -version = "1.11.0" +version = "1.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "368f01d005bf8fd9b1206fb6fa653e6c4a81ceb1466406b81792d87c5677a58f" +checksum = "fb39b166781f92d482534ef4b4b1b2568f42613b53e5b6c160e24cfbfa30926d" dependencies = [ "either", "rayon-core", @@ -5147,6 +4855,15 @@ dependencies = [ "crossbeam-utils", ] +[[package]] +name = "rdrand" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "678054eb77286b51581ba43620cc911abf02758c91f93f479767aed0f90458b2" +dependencies = [ + "rand_core 0.3.1", +] + [[package]] name = "read-fonts" version = "0.37.0" @@ -5172,16 +4889,16 @@ version = "0.5.18" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ed2bf2547551a7053d6fdfafda3f938979645c44812fbfcda098faae3f1a362d" dependencies = [ - "bitflags 2.11.0", + "bitflags 2.11.1", ] [[package]] name = "redox_syscall" -version = "0.7.4" +version = "0.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f450ad9c3b1da563fb6948a8e0fb0fb9269711c9c73d9ea1de5058c79c8d643a" +checksum = "4666a1a60d8412eab19d94f6d13dcc9cea0a5ef4fdf6a5db306537413c661b1b" dependencies = [ - "bitflags 2.11.0", + "bitflags 2.11.1", ] [[package]] @@ -5216,7 +4933,7 @@ dependencies = [ "bumpalo", "hashbrown 0.15.5", "log", - "rustc-hash 2.1.1", + "rustc-hash 2.1.2", "smallvec", ] @@ -5251,16 +4968,11 @@ checksum = "dc897dd8d9e8bd1ed8cdad82b5966c3e0ecae09fb1907d58efaa013543185d0a" [[package]] name = "remove_dir_all" -version = "1.0.0" +version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "808cc0b475acf76adf36f08ca49429b12aad9f678cb56143d5b3cb49b9a1dd08" +checksum = "3acd125665422973a33ac9d3dd2df85edad0f4ae9b00dafb1a05e43a9f5ef8e7" dependencies = [ - "cfg-if", - "cvt", - "fs_at", - "libc", - "normpath", - "windows-sys 0.59.0", + "winapi", ] [[package]] @@ -5356,7 +5068,7 @@ version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4147b952f3f819eca0e99527022f7d6a8d05f111aeb0a62960c74eb283bec8fc" dependencies = [ - "bitflags 2.11.0", + "bitflags 2.11.1", "once_cell", "serde", "serde_derive", @@ -5378,9 +5090,9 @@ checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" [[package]] name = "rustc-hash" -version = "2.1.1" +version = "2.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "357703d41365b4b27c590e3ed91eabb1b663f07c4c084095e60cbed4362dff0d" +checksum = "94300abf3f1ae2e2b8ffb7b58043de3d399c73fa6f4b73826402a5c457614dbe" [[package]] name = "rustc_version" @@ -5406,7 +5118,7 @@ version = "0.38.44" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fdb5bc1ae2baa591800df16c9ca78619bf65c0488b41b96ccec5d11220d8c154" dependencies = [ - "bitflags 2.11.0", + "bitflags 2.11.1", "errno", "libc", "linux-raw-sys 0.4.15", @@ -5419,7 +5131,7 @@ version = "1.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b6fe4565b9518b83ef4f91bb47ce29620ca828bd32cb7e408f0062e9930ba190" dependencies = [ - "bitflags 2.11.0", + "bitflags 2.11.1", "errno", "libc", "linux-raw-sys 0.12.1", @@ -5438,9 +5150,9 @@ dependencies = [ [[package]] name = "rustls" -version = "0.23.39" +version = "0.23.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c2c118cb077cca2822033836dfb1b975355dfb784b5e8da48f7b6c5db74e60e" +checksum = "ef86cd5876211988985292b91c96a8f2d298df24e75989a43a3c73f2d4d8168b" dependencies = [ "once_cell", "rustls-pki-types", @@ -5542,8 +5254,8 @@ version = "3.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b7f4bc775c73d9a02cde8bf7b2ec4c9d12743edf609006c7facc23998404cd1d" dependencies = [ - "bitflags 2.11.0", - "core-foundation 0.10.0", + "bitflags 2.11.1", + "core-foundation 0.10.1", "core-foundation-sys", "libc", "security-framework-sys", @@ -5567,9 +5279,9 @@ checksum = "b12e76d157a900eb52e81bc6e9f3069344290341720e9178cde2407113ac8d89" [[package]] name = "semver" -version = "1.0.27" +version = "1.0.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d767eb0aabc880b29956c35734170f26ed551a859dbd361d140cdbeca61ab1e2" +checksum = "8a7852d02fc848982e0c167ef163aaff9cd91dc640ba85e263cb1ce46fae51cd" dependencies = [ "serde", "serde_core", @@ -5602,14 +5314,14 @@ checksum = "d540f220d3187173da220f885ab66608367b6574e925011a9353e4badda91d79" dependencies = [ "proc-macro2", "quote", - "syn 2.0.117", + "syn", ] [[package]] name = "serde_json" -version = "1.0.149" +version = "1.0.150" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83fc039473c5595ace860d8c4fafa220ff474b3fc6bfdb4293327f1a37e94d86" +checksum = "e8014e44b4736ed0538adeecded0fce2a272f22dc9578a7eb6b2d9993c74cfb9" dependencies = [ "itoa", "memchr", @@ -5626,7 +5338,7 @@ checksum = "175ee3e80ae9982737ca543e96133087cbd9a485eecc3bc4de9c1a37b47ea59c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.117", + "syn", ] [[package]] @@ -5638,6 +5350,15 @@ dependencies = [ "serde", ] +[[package]] +name = "serde_spanned" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6662b5879511e06e8999a8a235d848113e942c9124f211511b16466ee2995f26" +dependencies = [ + "serde_core", +] + [[package]] name = "serde_urlencoded" version = "0.7.1" @@ -5652,19 +5373,18 @@ dependencies = [ [[package]] name = "serialport" -version = "4.8.1" +version = "4.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21f60a586160667241d7702c420fc223939fb3c0bb8d3fac84f78768e8970dee" +checksum = "a4d91116f97173694f1642263b2ff837f80d933aa837e2314969f6728f661df3" dependencies = [ - "bitflags 2.11.0", + "bitflags 2.11.1", "cfg-if", - "core-foundation 0.10.0", + "core-foundation 0.10.1", "core-foundation-sys", "io-kit-sys", "libudev", "mach2", "nix 0.26.4", - "quote", "scopeguard", "unescaper", "windows-sys 0.52.0", @@ -5674,6 +5394,7 @@ dependencies = [ name = "session" version = "4.0.0-alpha.1" dependencies = [ + "bincode", "blake3", "dirs", "dlt-core", @@ -5688,7 +5409,7 @@ dependencies = [ "parsers", "plugins_host", "processor", - "rustc-hash 2.1.1", + "rustc-hash 2.1.2", "serde", "serde_json", "serialport", @@ -5711,19 +5432,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a7507d819769d01a365ab707794a4084392c824f54a7a6a7862f8c3d0892b283" dependencies = [ "cfg-if", - "cpufeatures", + "cpufeatures 0.2.17", "digest", ] -[[package]] -name = "sharded-slab" -version = "0.1.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f40ca3c46823713e0d4209592e8d6e826aa57e928f09752619fc696c499637f6" -dependencies = [ - "lazy_static", -] - [[package]] name = "shell-tools" version = "0.1.0" @@ -5779,9 +5491,9 @@ checksum = "bbbb5d9659141646ae647b42fe094daf6c6192d1620870b449d9557f748b2daa" [[package]] name = "siphasher" -version = "1.0.2" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2aa850e253778c88a04c3d7323b043aeda9d3e30d5971937c1855769763678e" +checksum = "8ee5873ec9cce0195efcb7a4e9507a04cd49aec9c83d0389df45b1ef7ba2e649" [[package]] name = "skrifa" @@ -5823,7 +5535,7 @@ version = "0.19.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3457dea1f0eb631b4034d61d4d8c32074caa6cd1ab2d59f2327bd8461e2c0016" dependencies = [ - "bitflags 2.11.0", + "bitflags 2.11.1", "calloop 0.13.0", "calloop-wayland-source 0.3.0", "cursor-icon", @@ -5848,7 +5560,7 @@ version = "0.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0512da38f5e2b31201a93524adb8d3136276fa4fe4aafab4e1f727a82b534cc0" dependencies = [ - "bitflags 2.11.0", + "bitflags 2.11.1", "calloop 0.14.4", "calloop-wayland-source 0.4.1", "cursor-icon", @@ -5970,7 +5682,7 @@ version = "0.4.0+sdk-1.4.341.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d9571ea910ebd84c86af4b3ed27f9dbdc6ad06f17c5f96146b2b671e2976744f" dependencies = [ - "bitflags 2.11.0", + "bitflags 2.11.1", ] [[package]] @@ -6020,17 +5732,10 @@ name = "stypes" version = "4.0.0-alpha.1" dependencies = [ "anyhow", - "bincode", "dlt-core", - "extend", - "node-bindgen", - "paste", - "proptest", - "remove_dir_all", "serde", "thiserror 2.0.18", "tokio", - "ts-rs", "uuid", "walkdir", ] @@ -6041,17 +5746,6 @@ version = "2.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" -[[package]] -name = "syn" -version = "1.0.109" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" -dependencies = [ - "proc-macro2", - "quote", - "unicode-ident", -] - [[package]] name = "syn" version = "2.0.117" @@ -6080,7 +5774,7 @@ checksum = "728a70f3dbaf5bab7f0c4b1ac8d7ae5ea60a4b5549c8a5914361c99147a709d2" dependencies = [ "proc-macro2", "quote", - "syn 2.0.117", + "syn", ] [[package]] @@ -6089,7 +5783,7 @@ version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a13f3d0daba03132c0aa9767f98351b3488edc2c100cda2d2ec2b04f3d8d3c8b" dependencies = [ - "bitflags 2.11.0", + "bitflags 2.11.1", "core-foundation 0.9.4", "system-configuration-sys", ] @@ -6110,7 +5804,7 @@ version = "0.27.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cc4592f674ce18521c2a81483873a49596655b179f71c5e05d10c1fe66c78745" dependencies = [ - "bitflags 2.11.0", + "bitflags 2.11.1", "cap-fs-ext", "cap-std", "fd-lock", @@ -6126,11 +5820,27 @@ version = "0.13.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "adb6935a6f5c20170eeceb1a3835a49e12e19d792f6dd344ccc76a985ca5a6ca" +[[package]] +name = "target-triple" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "591ef38edfb78ca4771ee32cf494cb8771944bee237a9b91fc9c1424ac4b777b" + +[[package]] +name = "tempdir" +version = "0.3.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "15f2b5fb00ccdf689e0149d1b1b3c03fead81c2b37735d812fa8bddbbf41b6d8" +dependencies = [ + "rand 0.4.6", + "remove_dir_all", +] + [[package]] name = "tempfile" -version = "3.26.0" +version = "3.27.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82a72c767771b47409d2345987fda8628641887d5466101319899796367354a0" +checksum = "32497e9a4c7b38532efcdebeef879707aa9f794296a4f0244f6f69e9bc8574bd" dependencies = [ "fastrand", "getrandom 0.4.2", @@ -6188,7 +5898,7 @@ checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" dependencies = [ "proc-macro2", "quote", - "syn 2.0.117", + "syn", ] [[package]] @@ -6199,16 +5909,7 @@ checksum = "ebc4ee7f67670e9b64d05fa4253e753e016c6c95ff35b89b7941d6b856dec1d5" dependencies = [ "proc-macro2", "quote", - "syn 2.0.117", -] - -[[package]] -name = "thread_local" -version = "1.1.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f60246a4944f24f6e018aa17cdeffb7818b76356965d03b07d6a9886e8962185" -dependencies = [ - "cfg-if", + "syn", ] [[package]] @@ -6252,9 +5953,9 @@ dependencies = [ [[package]] name = "tinystr" -version = "0.8.2" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42d3e9c45c09de15d06dd8acf5f4e0e399e85927b7f00711024eb7ae10fa4869" +checksum = "c8323304221c2a851516f22236c5722a72eaa19749016521d6dff0824447d96d" dependencies = [ "displaydoc", "zerovec", @@ -6272,9 +5973,9 @@ dependencies = [ [[package]] name = "tokio" -version = "1.50.0" +version = "1.52.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "27ad5e34374e03cfffefc301becb44e9dc3c17584f414349ebe29ed26661822d" +checksum = "8fc7f01b389ac15039e4dc9531aa973a135d7a4135281b12d7c1bc79fd57fffe" dependencies = [ "bytes", "libc", @@ -6289,13 +5990,13 @@ dependencies = [ [[package]] name = "tokio-macros" -version = "2.6.1" +version = "2.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c55a2eff8b69ce66c84f85e1da1c233edc36ceb85a2058d11b0d6a3c7e7569c" +checksum = "385a6cb71ab9ab790c5fe8d67f1645e6c450a7ce006a33de03daa956cf70a496" dependencies = [ "proc-macro2", "quote", - "syn 2.0.117", + "syn", ] [[package]] @@ -6367,11 +6068,26 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dc1beb996b9d83529a9e75c17a1686767d148d70663143c7854d8b4a09ced362" dependencies = [ "serde", - "serde_spanned", + "serde_spanned 0.6.9", "toml_datetime 0.6.11", "toml_edit 0.22.27", ] +[[package]] +name = "toml" +version = "1.1.2+spec-1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "81f3d15e84cbcd896376e6730314d59fb5a87f31e4b038454184435cd57defee" +dependencies = [ + "indexmap", + "serde_core", + "serde_spanned 1.1.1", + "toml_datetime 1.1.1+spec-1.1.0", + "toml_parser", + "toml_writer", + "winnow 1.0.3", +] + [[package]] name = "toml_datetime" version = "0.6.11" @@ -6398,7 +6114,7 @@ checksum = "41fe8c660ae4257887cf66394862d21dbca4a6ddd26f04a3560410406a2f819a" dependencies = [ "indexmap", "serde", - "serde_spanned", + "serde_spanned 0.6.9", "toml_datetime 0.6.11", "toml_write", "winnow 0.7.15", @@ -6413,7 +6129,7 @@ dependencies = [ "indexmap", "toml_datetime 1.1.1+spec-1.1.0", "toml_parser", - "winnow 1.0.1", + "winnow 1.0.3", ] [[package]] @@ -6422,7 +6138,7 @@ version = "1.1.2+spec-1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a2abe9b86193656635d2411dc43050282ca48aa31c2451210f4202550afb7526" dependencies = [ - "winnow 1.0.1", + "winnow 1.0.3", ] [[package]] @@ -6431,6 +6147,12 @@ version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5d99f8c9a7727884afe522e9bd5edbfc91a3312b36a77b5fb8926e4c31a41801" +[[package]] +name = "toml_writer" +version = "1.1.1+spec-1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "756daf9b1013ebe47a8776667b466417e2d4c5679d441c26230efd9ef78692db" + [[package]] name = "tower" version = "0.5.3" @@ -6448,20 +6170,20 @@ dependencies = [ [[package]] name = "tower-http" -version = "0.6.8" +version = "0.6.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4e6559d53cc268e5031cd8429d05415bc4cb4aefc4aa5d6cc35fbf5b924a1f8" +checksum = "4cfcf7e2740e6fc6d4d688b4ef00650406bb94adf4731e43c096c3a19fe40840" dependencies = [ - "bitflags 2.11.0", + "bitflags 2.11.1", "bytes", "futures-util", "http", "http-body", - "iri-string", "pin-project-lite", "tower", "tower-layer", "tower-service", + "url", ] [[package]] @@ -6496,7 +6218,7 @@ checksum = "7490cfa5ec963746568740651ac6781f701c9c5ea257c58e057f3ba8cf69e8da" dependencies = [ "proc-macro2", "quote", - "syn 2.0.117", + "syn", ] [[package]] @@ -6506,36 +6228,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "db97caf9d906fbde555dd62fa95ddba9eecfd14cb388e4f491a66d74cd5fb79a" dependencies = [ "once_cell", - "valuable", -] - -[[package]] -name = "tracing-log" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee855f1f400bd0e5c02d150ae5de3840039a3f54b025156404e34c23c03f47c3" -dependencies = [ - "log", - "once_cell", - "tracing-core", -] - -[[package]] -name = "tracing-subscriber" -version = "0.3.22" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f30143827ddab0d256fd843b7a66d164e9f271cfa0dde49142c5ca0ca291f1e" -dependencies = [ - "matchers", - "nu-ansi-term", - "once_cell", - "regex-automata", - "sharded-slab", - "smallvec", - "thread_local", - "tracing", - "tracing-core", - "tracing-log", ] [[package]] @@ -6546,7 +6238,7 @@ checksum = "70977707304198400eb4835a78f6a9f928bf41bba420deb8fdb175cd965d77a7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.117", + "syn", ] [[package]] @@ -6556,27 +6248,18 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" [[package]] -name = "ts-rs" -version = "10.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e640d9b0964e9d39df633548591090ab92f7a4567bc31d3891af23471a3365c6" -dependencies = [ - "lazy_static", - "thiserror 2.0.18", - "ts-rs-macros", - "uuid", -] - -[[package]] -name = "ts-rs-macros" -version = "10.1.0" +name = "trybuild" +version = "1.0.116" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e9d8656589772eeec2cf7a8264d9cda40fb28b9bc53118ceb9e8c07f8f38730" +checksum = "47c635f0191bd3a2941013e5062667100969f8c4e9cd787c14f977265d73616e" dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.117", + "glob", + "serde", + "serde_derive", + "serde_json", + "target-triple", "termcolor", + "toml 1.1.2+spec-1.1.0", ] [[package]] @@ -6591,7 +6274,7 @@ version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cb30dbbd9036155e74adad6812e9898d03ec374946234fbcebd5dfc7b9187b90" dependencies = [ - "rustc-hash 2.1.1", + "rustc-hash 2.1.2", ] [[package]] @@ -6602,9 +6285,9 @@ checksum = "bc7d623258602320d5c55d1bc22793b57daff0ec7efc270ea7d55ce1d5f5471c" [[package]] name = "typenum" -version = "1.19.0" +version = "1.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "562d481066bde0658276a35467c4af00bdc6ee726305698a55b86e61d7ad82bb" +checksum = "40ce102ab67701b8526c123c1bab5cbe42d7040ccfd0f64af1a385808d2f43de" [[package]] name = "uds_windows" @@ -6694,9 +6377,9 @@ checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" [[package]] name = "uuid" -version = "1.22.0" +version = "1.23.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a68d3c8f01c0cfa54a75291d83601161799e4a89a39e0929f4b0354d88757a37" +checksum = "ddd74a9687298c6858e9b88ec8935ec45d22e8fd5e6394fa1bd4e99a87789c76" dependencies = [ "getrandom 0.4.2", "js-sys", @@ -6710,18 +6393,6 @@ version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3b59fc5417e036e53226bbebd90196825d358624fd5577432c4e486c95b1b096" -[[package]] -name = "valuable" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba73ea9cf16a25df0c8caa16c51acb937d5712a8429db78a3ee29d5dcacd3a65" - -[[package]] -name = "value-bag" -version = "1.12.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ba6f5989077681266825251a52748b8c1d8a4ad098cc37e440103d0ea717fc0" - [[package]] name = "vcpkg" version = "0.2.15" @@ -6813,11 +6484,11 @@ checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b" [[package]] name = "wasip2" -version = "1.0.2+wasi-0.2.9" +version = "1.0.3+wasi-0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9517f9239f02c069db75e65f174b3da828fe5f5b945c4dd26bd25d89c03ebcf5" +checksum = "20064672db26d7cdc89c7798c48a0fdfac8213434a1186e5ef29fd560ae223d6" dependencies = [ - "wit-bindgen", + "wit-bindgen 0.57.1", ] [[package]] @@ -6826,14 +6497,14 @@ version = "0.4.0+wasi-0.3.0-rc-2026-01-06" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5428f8bf88ea5ddc08faddef2ac4a67e390b88186c703ce6dbd955e1c145aca5" dependencies = [ - "wit-bindgen", + "wit-bindgen 0.51.0", ] [[package]] name = "wasm-bindgen" -version = "0.2.114" +version = "0.2.121" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6532f9a5c1ece3798cb1c2cfdba640b9b3ba884f5db45973a6f442510a87d38e" +checksum = "49ace1d07c165b0864824eee619580c4689389afa9dc9ed3a4c75040d82e6790" dependencies = [ "cfg-if", "once_cell", @@ -6844,23 +6515,19 @@ dependencies = [ [[package]] name = "wasm-bindgen-futures" -version = "0.4.64" +version = "0.4.71" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e9c5522b3a28661442748e09d40924dfb9ca614b21c00d3fd135720e48b67db8" +checksum = "96492d0d3ffba25305a7dc88720d250b1401d7edca02cc3bcd50633b424673b8" dependencies = [ - "cfg-if", - "futures-util", "js-sys", - "once_cell", "wasm-bindgen", - "web-sys", ] [[package]] name = "wasm-bindgen-macro" -version = "0.2.114" +version = "0.2.121" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "18a2d50fcf105fb33bb15f00e7a77b772945a2ee45dcf454961fd843e74c18e6" +checksum = "8e68e6f4afd367a562002c05637acb8578ff2dea1943df76afb9e83d177c8578" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -6868,22 +6535,22 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.114" +version = "0.2.121" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03ce4caeaac547cdf713d280eda22a730824dd11e6b8c3ca9e42247b25c631e3" +checksum = "d95a9ec35c64b2a7cb35d3fead40c4238d0940c86d107136999567a4703259f2" dependencies = [ "bumpalo", "proc-macro2", "quote", - "syn 2.0.117", + "syn", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.114" +version = "0.2.121" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75a326b8c223ee17883a4251907455a2431acc2791c98c26279376490c378c16" +checksum = "c4e0100b01e9f0d03189a92b96772a1fb998639d981193d7dbab487302513441" dependencies = [ "unicode-ident", ] @@ -6898,6 +6565,16 @@ dependencies = [ "wasmparser 0.229.0", ] +[[package]] +name = "wasm-encoder" +version = "0.230.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d4349d0943718e6e434b51b9639e876293093dca4b96384fb136ab5bd5ce6660" +dependencies = [ + "leb128fmt", + "wasmparser 0.230.0", +] + [[package]] name = "wasm-encoder" version = "0.244.0" @@ -6910,12 +6587,24 @@ dependencies = [ [[package]] name = "wasm-encoder" -version = "0.245.1" +version = "0.250.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f9dca005e69bf015e45577e415b9af8c67e8ee3c0e38b5b0add5aa92581ed5c" +checksum = "2271adb766023046af314460f1fae02cc34ea16d736d93404d3b65be44270923" dependencies = [ "leb128fmt", - "wasmparser 0.245.1", + "wasmparser 0.250.0", +] + +[[package]] +name = "wasm-metadata" +version = "0.230.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a52e010df5494f4289ccc68ce0c2a8c17555225a5e55cc41b98f5ea28d0844b" +dependencies = [ + "anyhow", + "indexmap", + "wasm-encoder 0.230.0", + "wasmparser 0.230.0", ] [[package]] @@ -6936,20 +6625,32 @@ version = "0.229.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0cc3b1f053f5d41aa55640a1fa9b6d1b8a9e4418d118ce308d20e24ff3575a8c" dependencies = [ - "bitflags 2.11.0", + "bitflags 2.11.1", "hashbrown 0.15.5", "indexmap", "semver", "serde", ] +[[package]] +name = "wasmparser" +version = "0.230.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "808198a69b5a0535583370a51d459baa14261dfab04800c4864ee9e1a14346ed" +dependencies = [ + "bitflags 2.11.1", + "hashbrown 0.15.5", + "indexmap", + "semver", +] + [[package]] name = "wasmparser" version = "0.244.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "47b807c72e1bac69382b3a6fb3dbe8ea4c0ed87ff5629b8685ae6b9a611028fe" dependencies = [ - "bitflags 2.11.0", + "bitflags 2.11.1", "hashbrown 0.15.5", "indexmap", "semver", @@ -6957,11 +6658,11 @@ dependencies = [ [[package]] name = "wasmparser" -version = "0.245.1" +version = "0.250.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f08c9adee0428b7bddf3890fc27e015ac4b761cc608c822667102b8bfd6995e" +checksum = "071d99cdfb8111603ed05500506c3298a940b58d609dd0259d3981785dd33556" dependencies = [ - "bitflags 2.11.0", + "bitflags 2.11.1", "indexmap", "semver", ] @@ -6986,7 +6687,7 @@ dependencies = [ "addr2line", "anyhow", "async-trait", - "bitflags 2.11.0", + "bitflags 2.11.1", "bumpalo", "cc", "cfg-if", @@ -7058,7 +6759,7 @@ dependencies = [ "serde", "serde_derive", "sha2", - "toml", + "toml 0.8.23", "windows-sys 0.59.0", "zstd", ] @@ -7072,7 +6773,7 @@ dependencies = [ "anyhow", "proc-macro2", "quote", - "syn 2.0.117", + "syn", "wasmtime-component-util", "wasmtime-wit-bindgen", "wit-parser 0.229.0", @@ -7199,7 +6900,7 @@ checksum = "d0963c1438357a3d8c0efe152b4ef5259846c1cf8b864340270744fe5b3bae5e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.117", + "syn", ] [[package]] @@ -7210,7 +6911,7 @@ checksum = "4ae951b72c7c6749a1c15dcdfb6d940a2614c932b4a54f474636e78e2c744b4c" dependencies = [ "anyhow", "async-trait", - "bitflags 2.11.0", + "bitflags 2.11.1", "bytes", "cap-fs-ext", "cap-net-ext", @@ -7286,24 +6987,24 @@ dependencies = [ [[package]] name = "wast" -version = "245.0.1" +version = "250.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28cf1149285569120b8ce39db8b465e8a2b55c34cbb586bd977e43e2bc7300bf" +checksum = "69e9294a1f0204aeb5c47e95165517f43ef3cc895918c4f3e939380d4c290f4a" dependencies = [ "bumpalo", "leb128fmt", "memchr", "unicode-width", - "wasm-encoder 0.245.1", + "wasm-encoder 0.250.0", ] [[package]] name = "wat" -version = "1.245.1" +version = "1.250.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd48d1679b6858988cb96b154dda0ec5bbb09275b71db46057be37332d5477be" +checksum = "0a549ed329a70e444e0f7796391ab2a87d0aef30ddde9f60e16e429224fafd02" dependencies = [ - "wast 245.0.1", + "wast 250.0.0", ] [[package]] @@ -7326,7 +7027,7 @@ version = "0.31.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "645c7c96bb74690c3189b5c9cb4ca1627062bb23693a4fad9d8c3de958260144" dependencies = [ - "bitflags 2.11.0", + "bitflags 2.11.1", "rustix 1.1.4", "wayland-backend", "wayland-scanner", @@ -7338,7 +7039,7 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "625c5029dbd43d25e6aa9615e88b829a5cad13b2819c4ae129fdbb7c31ab4c7e" dependencies = [ - "bitflags 2.11.0", + "bitflags 2.11.1", "cursor-icon", "wayland-backend", ] @@ -7360,7 +7061,7 @@ version = "0.32.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "563a85523cade2429938e790815fd7319062103b9f4a2dc806e9b53b95982d8f" dependencies = [ - "bitflags 2.11.0", + "bitflags 2.11.1", "wayland-backend", "wayland-client", "wayland-scanner", @@ -7372,7 +7073,7 @@ version = "20250721.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "40a1f863128dcaaec790d7b4b396cc9b9a7a079e878e18c47e6c2d2c5a8dcbb1" dependencies = [ - "bitflags 2.11.0", + "bitflags 2.11.1", "wayland-backend", "wayland-client", "wayland-protocols", @@ -7385,7 +7086,7 @@ version = "0.3.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6e9567599ef23e09b8dad6e429e5738d4509dfc46b3b21f32841a304d16b29c8" dependencies = [ - "bitflags 2.11.0", + "bitflags 2.11.1", "wayland-backend", "wayland-client", "wayland-protocols", @@ -7398,7 +7099,7 @@ version = "0.3.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2b6d8cf1eb2c1c31ed1f5643c88a6e53538129d4af80030c8cabd1f9fa884d91" dependencies = [ - "bitflags 2.11.0", + "bitflags 2.11.1", "wayland-backend", "wayland-client", "wayland-protocols", @@ -7411,7 +7112,7 @@ version = "0.3.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "eb04e52f7836d7c7976c78ca0250d61e33873c34156a2a1fc9474828ec268234" dependencies = [ - "bitflags 2.11.0", + "bitflags 2.11.1", "wayland-backend", "wayland-client", "wayland-protocols", @@ -7425,7 +7126,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9c324a910fd86ebdc364a3e61ec1f11737d3b1d6c273c0239ee8ff4bc0d24b4a" dependencies = [ "proc-macro2", - "quick-xml 0.39.2", + "quick-xml 0.39.4", "quote", ] @@ -7443,9 +7144,9 @@ dependencies = [ [[package]] name = "web-sys" -version = "0.3.91" +version = "0.3.98" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "854ba17bb104abfb26ba36da9729addc7ce7f06f5c0f90f3c391f8461cca21f9" +checksum = "4b572dff8bcf38bad0fa19729c89bb5748b2b9b1d8be70cf90df697e3a8f32aa" dependencies = [ "js-sys", "wasm-bindgen", @@ -7467,7 +7168,7 @@ version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0fc95580916af1e68ff6a7be07446fc5db73ebf71cf092de939bbf5f7e189f72" dependencies = [ - "core-foundation 0.10.0", + "core-foundation 0.10.1", "jni", "log", "ndk-context", @@ -7485,12 +7186,12 @@ checksum = "a28ac98ddc8b9274cb41bb4d9d4d5c425b6020c50c46f25559911905610b4a88" [[package]] name = "wgpu" -version = "29.0.1" +version = "29.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72c239a9a747bbd379590985bac952c2e53cb19873f7072b3370c6a6a8e06837" +checksum = "bb3feacc458f7bee8bc1737149b42b6c731aa461039a4264a67bb6681646b250" dependencies = [ "arrayvec", - "bitflags 2.11.0", + "bitflags 2.11.1", "bytemuck", "cfg-if", "cfg_aliases", @@ -7515,14 +7216,14 @@ dependencies = [ [[package]] name = "wgpu-core" -version = "29.0.1" +version = "29.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e80ac6cf1895df6342f87d975162108f9d98772a0d74bc404ab7304ac29469e" +checksum = "02da3ad1b568337f25513b317870960ef87073ea0945502e44b864b67a8c77b7" dependencies = [ "arrayvec", "bit-set 0.9.1", "bit-vec 0.9.1", - "bitflags 2.11.0", + "bitflags 2.11.1", "bytemuck", "cfg_aliases", "document-features", @@ -7549,51 +7250,51 @@ dependencies = [ [[package]] name = "wgpu-core-deps-apple" -version = "29.0.0" +version = "29.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43acd053312501689cd92a01a9638d37f3e41a5fd9534875efa8917ee2d11ac0" +checksum = "62e51b5447e144b3dbba4feb01f80f4fa21696fa0cd99afb2c3df1affd6fdb28" dependencies = [ "wgpu-hal", ] [[package]] name = "wgpu-core-deps-emscripten" -version = "29.0.0" +version = "29.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef043bf135cc68b6f667c55ff4e345ce2b5924d75bad36a47921b0287ca4b24a" +checksum = "3487cd6293a963bc5c0c0396f6a2192043c50003c07f4efdccbad3d90ec9d819" dependencies = [ "wgpu-hal", ] [[package]] name = "wgpu-core-deps-wasm" -version = "29.0.0" +version = "29.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f7b75e72f49035f000dd5262e4126242e92a090a4fd75931ecfe7e60784e6fa" +checksum = "0c2f2fb042f36920771deb0b966543c5751b18f3d327760ffc90f74e20b2dcd4" dependencies = [ "wgpu-hal", ] [[package]] name = "wgpu-core-deps-windows-linux-android" -version = "29.0.0" +version = "29.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "725d5c006a8c02967b6d93ef04f6537ec4593313e330cfe86d9d3f946eb90f28" +checksum = "1bfb01076d0aa08b0ba9bd741e178b5cc440f5abe99d9581323a4c8b5d1a1916" dependencies = [ "wgpu-hal", ] [[package]] name = "wgpu-hal" -version = "29.0.1" +version = "29.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89a47aef47636562f3937285af4c44b4b5b404b46577471411cc5313a921da7e" +checksum = "31f8e1a9e7a8512f276f7c62e018c7fa8d60954303fed2e5750114332049193f" dependencies = [ "android_system_properties", "arrayvec", "ash", "bit-set 0.9.1", - "bitflags 2.11.0", + "bitflags 2.11.1", "block2 0.6.2", "bytemuck", "cfg-if", @@ -7634,13 +7335,14 @@ dependencies = [ "wgpu-types", "windows", "windows-core", + "windows-result", ] [[package]] name = "wgpu-naga-bridge" -version = "29.0.1" +version = "29.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b4684f4410da0cf95a4cb63bb5edaac022461dedb6adf0b64d0d9b5f6890d51" +checksum = "59c654c483f058800972c3645e95388a7eca31bf9fe1933bc20e036588a0be02" dependencies = [ "naga", "wgpu-types", @@ -7648,11 +7350,11 @@ dependencies = [ [[package]] name = "wgpu-types" -version = "29.0.1" +version = "29.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec2675540fb1a5cfa5ef122d3d5f390e2c75711a0b946410f2d6ac3a0f77d1f6" +checksum = "a9bcc31518a0e9735aefebedb5f7a9ef3ed1c42549c9f4c882fa9060ceaac639" dependencies = [ - "bitflags 2.11.0", + "bitflags 2.11.1", "bytemuck", "js-sys", "log", @@ -7677,7 +7379,7 @@ checksum = "649c1aca13ef9e9dccf2d5efbbebf12025bc5521c3fb7754355ef60f5eb810be" dependencies = [ "anyhow", "async-trait", - "bitflags 2.11.0", + "bitflags 2.11.1", "thiserror 2.0.18", "tracing", "wasmtime", @@ -7694,7 +7396,7 @@ dependencies = [ "heck", "proc-macro2", "quote", - "syn 2.0.117", + "syn", "witx", ] @@ -7706,7 +7408,7 @@ checksum = "d873bb5b59ca703b5e41562e96a4796d1af61bf4cf80bf8a7abda755a380ec1c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.117", + "syn", "wiggle-generate", ] @@ -7813,7 +7515,7 @@ checksum = "053e2e040ab57b9dc951b72c264860db7eb3b0200ba345b4e4c3b14f67855ddf" dependencies = [ "proc-macro2", "quote", - "syn 2.0.117", + "syn", ] [[package]] @@ -7824,7 +7526,7 @@ checksum = "3f316c4a2570ba26bbec722032c4099d8c8bc095efccdc15688708623367e358" dependencies = [ "proc-macro2", "quote", - "syn 2.0.117", + "syn", ] [[package]] @@ -7878,7 +7580,7 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" dependencies = [ - "windows-targets", + "windows-targets 0.52.6", ] [[package]] @@ -7887,7 +7589,16 @@ version = "0.59.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" dependencies = [ - "windows-targets", + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-sys" +version = "0.60.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2f500e4d28234f72040990ec9d39e3a6b950f9f22d3dba18416c35882612bcb" +dependencies = [ + "windows-targets 0.53.5", ] [[package]] @@ -7905,14 +7616,31 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" dependencies = [ - "windows_aarch64_gnullvm", - "windows_aarch64_msvc", - "windows_i686_gnu", - "windows_i686_gnullvm", - "windows_i686_msvc", - "windows_x86_64_gnu", - "windows_x86_64_gnullvm", - "windows_x86_64_msvc", + "windows_aarch64_gnullvm 0.52.6", + "windows_aarch64_msvc 0.52.6", + "windows_i686_gnu 0.52.6", + "windows_i686_gnullvm 0.52.6", + "windows_i686_msvc 0.52.6", + "windows_x86_64_gnu 0.52.6", + "windows_x86_64_gnullvm 0.52.6", + "windows_x86_64_msvc 0.52.6", +] + +[[package]] +name = "windows-targets" +version = "0.53.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4945f9f551b88e0d65f3db0bc25c33b8acea4d9e41163edf90dcd0b19f9069f3" +dependencies = [ + "windows-link", + "windows_aarch64_gnullvm 0.53.1", + "windows_aarch64_msvc 0.53.1", + "windows_i686_gnu 0.53.1", + "windows_i686_gnullvm 0.53.1", + "windows_i686_msvc 0.53.1", + "windows_x86_64_gnu 0.53.1", + "windows_x86_64_gnullvm 0.53.1", + "windows_x86_64_msvc 0.53.1", ] [[package]] @@ -7930,48 +7658,96 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a9d8416fa8b42f5c947f8482c43e7d89e73a173cead56d044f6a56104a6d1b53" + [[package]] name = "windows_aarch64_msvc" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" +[[package]] +name = "windows_aarch64_msvc" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9d782e804c2f632e395708e99a94275910eb9100b2114651e04744e9b125006" + [[package]] name = "windows_i686_gnu" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" +[[package]] +name = "windows_i686_gnu" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "960e6da069d81e09becb0ca57a65220ddff016ff2d6af6a223cf372a506593a3" + [[package]] name = "windows_i686_gnullvm" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" +[[package]] +name = "windows_i686_gnullvm" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa7359d10048f68ab8b09fa71c3daccfb0e9b559aed648a8f95469c27057180c" + [[package]] name = "windows_i686_msvc" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" +[[package]] +name = "windows_i686_msvc" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e7ac75179f18232fe9c285163565a57ef8d3c89254a30685b57d83a38d326c2" + [[package]] name = "windows_x86_64_gnu" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" +[[package]] +name = "windows_x86_64_gnu" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c3842cdd74a865a8066ab39c8a7a473c0778a3f29370b5fd6b4b9aa7df4a499" + [[package]] name = "windows_x86_64_gnullvm" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ffa179e2d07eee8ad8f57493436566c7cc30ac536a3379fdf008f47f6bb7ae1" + [[package]] name = "windows_x86_64_msvc" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" +[[package]] +name = "windows_x86_64_msvc" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d6bbff5f0aada427a1e5a6da5f1f98158182f26556f345ac9e04d36d0ebed650" + [[package]] name = "winit" version = "0.30.13" @@ -7981,7 +7757,7 @@ dependencies = [ "ahash", "android-activity", "atomic-waker", - "bitflags 2.11.0", + "bitflags 2.11.1", "block2 0.5.1", "bytemuck", "calloop 0.13.0", @@ -8035,9 +7811,9 @@ dependencies = [ [[package]] name = "winnow" -version = "1.0.1" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09dac053f1cd375980747450bfc7250c264eaae0583872e845c0c7cd578872b5" +checksum = "0592e1c9d151f854e6fd382574c3a0855250e1d9b2f99d9281c6e6391af352f1" dependencies = [ "memchr", ] @@ -8048,17 +7824,44 @@ version = "0.36.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3f3fd376f71958b862e7afb20cfe5a22830e1963462f3a17f49d82a6c1d1f42d" dependencies = [ - "bitflags 2.11.0", + "bitflags 2.11.1", "windows-sys 0.59.0", ] +[[package]] +name = "wit-bindgen" +version = "0.42.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa5b79cd8cb4b27a9be3619090c03cbb87fe7b1c6de254b4c9b4477188828af8" +dependencies = [ + "wit-bindgen-rt", + "wit-bindgen-rust-macro 0.42.1", +] + [[package]] name = "wit-bindgen" version = "0.51.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d7249219f66ced02969388cf2bb044a09756a083d0fab1e566056b04d9fbcaa5" dependencies = [ - "wit-bindgen-rust-macro", + "wit-bindgen-rust-macro 0.51.0", +] + +[[package]] +name = "wit-bindgen" +version = "0.57.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ebf944e87a7c253233ad6766e082e3cd714b5d03812acc24c318f549614536e" + +[[package]] +name = "wit-bindgen-core" +version = "0.42.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e35e550f614e16db196e051d22b0d4c94dd6f52c90cb1016240f71b9db332631" +dependencies = [ + "anyhow", + "heck", + "wit-parser 0.230.0", ] [[package]] @@ -8072,6 +7875,33 @@ dependencies = [ "wit-parser 0.244.0", ] +[[package]] +name = "wit-bindgen-rt" +version = "0.42.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "051105bab12bc78e161f8dfb3596e772dd6a01ebf9c4840988e00347e744966a" +dependencies = [ + "bitflags 2.11.1", + "futures", + "once_cell", +] + +[[package]] +name = "wit-bindgen-rust" +version = "0.42.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb1e0a91fc85f4ef70e0b81cd86c2b49539d3cd14766fd82396184aadf8cb7d7" +dependencies = [ + "anyhow", + "heck", + "indexmap", + "prettyplease", + "syn", + "wasm-metadata 0.230.0", + "wit-bindgen-core 0.42.1", + "wit-component 0.230.0", +] + [[package]] name = "wit-bindgen-rust" version = "0.51.0" @@ -8082,10 +7912,25 @@ dependencies = [ "heck", "indexmap", "prettyplease", - "syn 2.0.117", - "wasm-metadata", - "wit-bindgen-core", - "wit-component", + "syn", + "wasm-metadata 0.244.0", + "wit-bindgen-core 0.51.0", + "wit-component 0.244.0", +] + +[[package]] +name = "wit-bindgen-rust-macro" +version = "0.42.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce69f52c5737705881d5da5a1dd06f47f8098d094a8d65a3e44292942edb571f" +dependencies = [ + "anyhow", + "prettyplease", + "proc-macro2", + "quote", + "syn", + "wit-bindgen-core 0.42.1", + "wit-bindgen-rust 0.42.1", ] [[package]] @@ -8098,9 +7943,28 @@ dependencies = [ "prettyplease", "proc-macro2", "quote", - "syn 2.0.117", - "wit-bindgen-core", - "wit-bindgen-rust", + "syn", + "wit-bindgen-core 0.51.0", + "wit-bindgen-rust 0.51.0", +] + +[[package]] +name = "wit-component" +version = "0.230.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b607b15ead6d0e87f5d1613b4f18c04d4e80ceeada5ffa608d8360e6909881df" +dependencies = [ + "anyhow", + "bitflags 2.11.1", + "indexmap", + "log", + "serde", + "serde_derive", + "serde_json", + "wasm-encoder 0.230.0", + "wasm-metadata 0.230.0", + "wasmparser 0.230.0", + "wit-parser 0.230.0", ] [[package]] @@ -8110,14 +7974,14 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9d66ea20e9553b30172b5e831994e35fbde2d165325bec84fc43dbf6f4eb9cb2" dependencies = [ "anyhow", - "bitflags 2.11.0", + "bitflags 2.11.1", "indexmap", "log", "serde", "serde_derive", "serde_json", "wasm-encoder 0.244.0", - "wasm-metadata", + "wasm-metadata 0.244.0", "wasmparser 0.244.0", "wit-parser 0.244.0", ] @@ -8140,6 +8004,24 @@ dependencies = [ "wasmparser 0.229.0", ] +[[package]] +name = "wit-parser" +version = "0.230.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "679fde5556495f98079a8e6b9ef8c887f731addaffa3d48194075c1dd5cd611b" +dependencies = [ + "anyhow", + "id-arena", + "indexmap", + "log", + "semver", + "serde", + "serde_derive", + "serde_json", + "unicode-xid", + "wasmparser 0.230.0", +] + [[package]] name = "wit-parser" version = "0.244.0" @@ -8172,9 +8054,9 @@ dependencies = [ [[package]] name = "writeable" -version = "0.6.2" +version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9edde0db4769d2dc68579893f2306b26c6ecfbe0ef499b013d731b7b9247e0b9" +checksum = "1ffae5123b2d3fc086436f8834ae3ab053a283cfac8fe0a0b8eaae044768a4c4" [[package]] name = "x11-dl" @@ -8220,7 +8102,7 @@ version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d039de8032a9a8856a6be89cea3e5d12fdd82306ab7c94d74e6deab2460651c5" dependencies = [ - "bitflags 2.11.0", + "bitflags 2.11.1", "dlib", "log", "once_cell", @@ -8247,9 +8129,9 @@ checksum = "cfe53a6657fd280eaa890a3bc59152892ffa3e30101319d168b781ed6529b049" [[package]] name = "yoke" -version = "0.8.1" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72d6e5c6afb84d73944e5cedb052c4680d5657337201555f9f2a16b7406d4954" +checksum = "abe8c5fda708d9ca3df187cae8bfb9ceda00dd96231bed36e445a1a48e66f9ca" dependencies = [ "stable_deref_trait", "yoke-derive", @@ -8258,21 +8140,21 @@ dependencies = [ [[package]] name = "yoke-derive" -version = "0.8.1" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b659052874eb698efe5b9e8cf382204678a0086ebf46982b79d6ca3182927e5d" +checksum = "de844c262c8848816172cef550288e7dc6c7b7814b4ee56b3e1553f275f1858e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.117", + "syn", "synstructure", ] [[package]] name = "zbus" -version = "5.14.0" +version = "5.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca82f95dbd3943a40a53cfded6c2d0a2ca26192011846a1810c4256ef92c60bc" +checksum = "c3bcbf15c8708d7fc1be0c993622e0a5cbd5e8b52bfa40afa4c3e0cd8d724ac1" dependencies = [ "async-broadcast", "async-executor", @@ -8284,7 +8166,7 @@ dependencies = [ "async-trait", "blocking", "enumflags2", - "event-listener 5.4.1", + "event-listener", "futures-core", "futures-lite", "hex", @@ -8297,7 +8179,7 @@ dependencies = [ "uds_windows", "uuid", "windows-sys 0.61.2", - "winnow 0.7.15", + "winnow 1.0.3", "zbus_macros", "zbus_names", "zvariant", @@ -8321,7 +8203,7 @@ checksum = "10da05367f3a7b7553c8cdf8fa91aee6b64afebe32b51c95177957efc47ca3a0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.117", + "syn", "zbus-lockstep", "zbus_xml", "zvariant", @@ -8329,14 +8211,14 @@ dependencies = [ [[package]] name = "zbus_macros" -version = "5.14.0" +version = "5.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "897e79616e84aac4b2c46e9132a4f63b93105d54fe8c0e8f6bffc21fa8d49222" +checksum = "51fa5406ad9175a8c825a931f8cf347116b531b3634fcb0b627c290f1f2516ff" dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn 2.0.117", + "syn", "zbus_names", "zvariant", "zvariant_utils", @@ -8344,22 +8226,22 @@ dependencies = [ [[package]] name = "zbus_names" -version = "4.3.1" +version = "4.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffd8af6d5b78619bab301ff3c560a5bd22426150253db278f164d6cf3b72c50f" +checksum = "7074f3e50b894eac91750142016d30d0a89be8e67dbfd9704fb875825760e52d" dependencies = [ "serde", - "winnow 0.7.15", + "winnow 1.0.3", "zvariant", ] [[package]] name = "zbus_xml" -version = "5.1.0" +version = "5.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "441a0064125265655bccc3a6af6bef56814d9277ac83fce48b1cd7e160b80eac" +checksum = "a8067892e940ed1727dea64690378601603b31d62dfde019a5335fbb7c0e0ed9" dependencies = [ - "quick-xml 0.38.4", + "quick-xml 0.39.4", "serde", "zbus_names", "zvariant", @@ -8367,42 +8249,42 @@ dependencies = [ [[package]] name = "zerocopy" -version = "0.8.41" +version = "0.8.48" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96e13bc581734df6250836c59a5f44f3c57db9f9acb9dc8e3eaabdaf6170254d" +checksum = "eed437bf9d6692032087e337407a86f04cd8d6a16a37199ed57949d415bd68e9" dependencies = [ "zerocopy-derive", ] [[package]] name = "zerocopy-derive" -version = "0.8.41" +version = "0.8.48" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3545ea9e86d12ab9bba9fcd99b54c1556fd3199007def5a03c375623d05fac1c" +checksum = "70e3cd084b1788766f53af483dd21f93881ff30d7320490ec3ef7526d203bad4" dependencies = [ "proc-macro2", "quote", - "syn 2.0.117", + "syn", ] [[package]] name = "zerofrom" -version = "0.1.6" +version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50cc42e0333e05660c3587f3bf9d0478688e15d870fab3346451ce7f8c9fbea5" +checksum = "0ec05a11813ea801ff6d75110ad09cd0824ddba17dfe17128ea0d5f68e6c5272" dependencies = [ "zerofrom-derive", ] [[package]] name = "zerofrom-derive" -version = "0.1.6" +version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d71e5d6e06ab090c67b5e44993ec16b72dcbaabc526db883a360057678b48502" +checksum = "11532158c46691caf0f2593ea8358fed6bbf68a0315e80aae9bd41fbade684a1" dependencies = [ "proc-macro2", "quote", - "syn 2.0.117", + "syn", "synstructure", ] @@ -8414,9 +8296,9 @@ checksum = "b97154e67e32c85465826e8bcc1c59429aaaf107c1e4a9e53c8d8ccd5eff88d0" [[package]] name = "zerotrie" -version = "0.2.3" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a59c17a5562d507e4b54960e8569ebee33bee890c70aa3fe7b97e85a9fd7851" +checksum = "0f9152d31db0792fa83f70fb2f83148effb5c1f5b8c7686c3459e361d9bc20bf" dependencies = [ "displaydoc", "yoke", @@ -8425,9 +8307,9 @@ dependencies = [ [[package]] name = "zerovec" -version = "0.11.5" +version = "0.11.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c28719294829477f525be0186d13efa9a3c602f7ec202ca9e353d310fb9a002" +checksum = "90f911cbc359ab6af17377d242225f4d75119aec87ea711a880987b18cd7b239" dependencies = [ "yoke", "zerofrom", @@ -8436,13 +8318,13 @@ dependencies = [ [[package]] name = "zerovec-derive" -version = "0.11.2" +version = "0.11.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eadce39539ca5cb3985590102671f2567e659fca9666581ad3411d59207951f3" +checksum = "625dc425cab0dca6dc3c3319506e6593dcb08a9f387ea3b284dbd52a92c40555" dependencies = [ "proc-macro2", "quote", - "syn 2.0.117", + "syn", ] [[package]] @@ -8496,40 +8378,40 @@ dependencies = [ [[package]] name = "zvariant" -version = "5.10.0" +version = "5.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5708299b21903bbe348e94729f22c49c55d04720a004aa350f1f9c122fd2540b" +checksum = "1c1567a6ec68df868cbbfde844cfc6d81649fe5109a62b116b19fabd53e618ee" dependencies = [ "endi", "enumflags2", "serde", - "winnow 0.7.15", + "winnow 1.0.3", "zvariant_derive", "zvariant_utils", ] [[package]] name = "zvariant_derive" -version = "5.10.0" +version = "5.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b59b012ebe9c46656f9cc08d8da8b4c726510aef12559da3e5f1bf72780752c" +checksum = "c7d5b780599bbde114e39d9a0799577fad1ced5105d38515745f7b3099d8ceda" dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn 2.0.117", + "syn", "zvariant_utils", ] [[package]] name = "zvariant_utils" -version = "3.3.0" +version = "3.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f75c23a64ef8f40f13a6989991e643554d9bef1d682a281160cf0c1bc389c5e9" +checksum = "6d464f5733ffa07a3164d656f18533caace9d0638596721355d73256a410d691" dependencies = [ "proc-macro2", "quote", "serde", - "syn 2.0.117", - "winnow 0.7.15", + "syn", + "winnow 1.0.3", ] diff --git a/application/apps/indexer/Cargo.toml b/Cargo.toml similarity index 53% rename from application/apps/indexer/Cargo.toml rename to Cargo.toml index 55921507f3..401dd5c953 100644 --- a/application/apps/indexer/Cargo.toml +++ b/Cargo.toml @@ -1,22 +1,36 @@ [workspace] resolver = "3" +default-members = ["crates/chipmunk-app"] members = [ - "gui/application", - "addons/dlt-tools", - "addons/someip-tools", - "addons/shell-tools", - "addons/file-tools", - "addons/text_grep", - "addons/bufread", - "indexer_base", - "merging", - "parsers", - "plugins_host", - "processor", - "session", - "sources", - "stypes" + "crates/chipmunk-app", + "crates/chipmunk-cli", + "crates/plugins_api", + + "crates/stypes", + "crates/bufread", + "crates/dir_checksum", + "crates/file-tools", + "crates/shell-tools", + + "crates/core/dlt-tools", + "crates/core/someip-tools", + "crates/core/text_grep", + "crates/core/indexer_base", + "crates/core/merging", + "crates/core/parsers", + "crates/core/plugins_host", + "crates/core/processor", + "crates/core/session", + "crates/core/sources", +] + +exclude = [ + "plugins/examples/rust/dlt_parser", + "plugins/examples/rust/file_source", + "plugins/examples/rust/protobuf", + "plugins/examples/rust/string_parser", + "plugins/templates/rust/parser", ] [workspace.package] @@ -27,21 +41,24 @@ authors = ["esrlabs.com"] [workspace.dependencies] # Internal crates -application = { path = "gui/application" } -dlt-tools = { path = "addons/dlt-tools"} -someip-tools = { path = "addons/someip-tools"} -file-tools = { path = "addons/file-tools"} -shell-tools = { path = "addons/shell-tools"} -text_grep = { path = "addons/text_grep"} -bufread = { path = "addons/bufread"} -indexer_base = { path = "indexer_base"} -merging = { path = "merging"} -parsers = { path = "parsers"} -plugins_host = { path = "plugins_host"} -processor = { path = "processor"} -session = { path = "session"} -sources = { path = "sources"} -stypes = { path = "stypes"} +chipmunk-app = { path = "crates/chipmunk-app" } +plugins_api = { path = "crates/plugins_api" } +dlt-tools = { path = "crates/core/dlt-tools" } +someip-tools = { path = "crates/core/someip-tools" } +file-tools = { path = "crates/file-tools" } +shell-tools = { path = "crates/shell-tools" } +text_grep = { path = "crates/core/text_grep" } +bufread = { path = "crates/bufread" } +dir_checksum = { path = "crates/dir_checksum" } +indexer_base = { path = "crates/core/indexer_base" } +merging = { path = "crates/core/merging" } +parsers = { path = "crates/core/parsers" } +plugins_host = { path = "crates/core/plugins_host" } +processor = { path = "crates/core/processor" } +session = { path = "crates/core/session" } +session_core = { package = "session", path = "crates/core/session" } +sources = { path = "crates/core/sources" } +stypes = { path = "crates/stypes" } # External dependencies log = "0.4" @@ -50,14 +67,20 @@ serde_json = "1.0" thiserror = "2.0" lazy_static = "1.5" memchr = "2.7" -tokio = { version = "1", features = ["full"] } +bincode = "1.3" +bytecount = "0.6" +byteorder = "1.5" +bytes = "1.3" +tokio = { version = "1.45", features = ["full"] } reqwest = "0.12" semver = "1" tokio-stream = "0.1" dlt-core = "0.20.2" +etherparse = "0.16" crossbeam-channel = "0.5" futures = "0.3" tokio-util = "0.7" +tokio-serial = "5.4" regex = "1" regex-syntax = "0.8" grep-regex = "0.1" @@ -65,6 +88,11 @@ rand = "0.9" dirs = "6.0" uuid = "1.3" grep-searcher = "0.1" +ignore = "0.4" +memmap2 = "0.9" +mime_guess = "2.0" +nom = "7.1" +pcap-parser = "0.16" tempfile = "3.14" env_logger = "0.11" walkdir = "2.5" @@ -74,15 +102,26 @@ blake3 = "1.8" which = "8" itertools = "0.14" chrono = "0.4" -chrono-tz = "0.8" +chrono-tz = "0.10" serialport = "4.8" rustc-hash = "2.1" enum-iterator = "2" nucleo-matcher = "0.3" anstyle-parse = "1.0" unicode-segmentation = "1.13" +rayon = "1" +socket2 = "0.5.8" +someip-messages = { git = "https://github.com/esrlabs/someip" } -clap = { version = "4", features = ["derive"] } +# NOTE: Pinned to a specific commit because our unsafe code in `someip.rs` +# depends on the internal implementation of this library. +# Verify safety contract on update. +someip-payload = { git = "https://github.com/esrlabs/someip-payload", rev = "b9aa52c96fcbdb0e5aa1ee5258299f0ff7e3a094" } +stringreader = "0.1" +wasmtime = "33.0" +wasmtime-wasi = "33.0" +wit-bindgen = "0.42" +clap = { version = "4.5", features = ["derive"] } egui = "0.34" eframe = { version = "0.34", default-features = false } @@ -91,10 +130,10 @@ egui_extras = { version = "0.34", default-features = false } image = { version = "0.25", default-features = false } egui_table = "0.8" egui_plot = "0.35" -# We don't have direct dependency to winit but we need to specify it here to activate -# its default features which won't be activated otherwise without activating egui default +# We don't have direct dependency to winit but we need to specify it here to activate +# its default features which won't be activated otherwise without activating egui default # features. -winit = { version = "0.30"} +winit = { version = "0.30" } egui-phosphor = "0.12" egui_commonmark = "0.23" @@ -103,6 +142,9 @@ egui_commonmark = "0.23" criterion = { version = "0.5", features = ["html_reports"] } insta = { version = "1.41", features = ["yaml"] } proptest = "1.6" +pretty_assertions = "1.4" +tempdir = "0.3" +trybuild = "1.0" [patch.crates-io] # Dependencies patches before they are released can be defined here. diff --git a/README.md b/README.md index 7b9801544d..08a047ea86 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ Chipmunk 4 Alpha is now available as a preview of the next generation of Chipmun During the alpha phase, Chipmunk 4 lives on the `native-ui` branch and will continue to evolve there. Alpha builds are published as pre-releases. -- [Read the Chipmunk 4 Alpha README](https://github.com/esrlabs/chipmunk/blob/native-ui/application/apps/indexer/gui/application/README.md) +- [Read the Chipmunk 4 Alpha README](https://github.com/esrlabs/chipmunk/blob/native-ui/crates/chipmunk-app/README.md) - [Download Chipmunk 4 Alpha builds](https://github.com/esrlabs/chipmunk/releases) Look for release versions such as `4.0.0-alpha.*` on the releases page. The current stable Chipmunk documentation continues below. diff --git a/application/.prettierrc b/application/.prettierrc deleted file mode 100644 index bb4cd83969..0000000000 --- a/application/.prettierrc +++ /dev/null @@ -1,16 +0,0 @@ -{ - "semi": true, - "trailingComma": "all", - "tabWidth": 4, - "printWidth": 100, - "singleQuote": true, - "overrides": [ - { - "files": ["*.json", ".prettierrc"], - "options": { - "tabWidth": 2, - "printWidth": 60 - } - } - ] -} diff --git a/application/apps/indexer/.gitignore b/application/apps/indexer/.gitignore deleted file mode 100644 index 488b9dc8fd..0000000000 --- a/application/apps/indexer/.gitignore +++ /dev/null @@ -1,7 +0,0 @@ -/target -**/*.rs.bk -**/proptest-regressions -*.out -lineMetadata.json -vim-markdown-preview.html -.DS_Store diff --git a/application/apps/indexer/.vscode/launch.json b/application/apps/indexer/.vscode/launch.json deleted file mode 100644 index fc00367abb..0000000000 --- a/application/apps/indexer/.vscode/launch.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - // Use IntelliSense to learn about possible attributes. - // Hover to view descriptions of existing attributes. - // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 - "version": "0.2.0", - "configurations": [ - { - "type": "lldb", - "request": "launch", - "name": "Debug executable 'chip'", - "cargo": { - "args": ["build", "--bin=chip", "--package=chip"], - "filter": { - "name": "chip", - "kind": "bin" - } - }, - "args": ["-s", "2", "${workspaceRoot}/test.txt", "tag"], - "cwd": "${workspaceFolder}" - }, - { - "type": "lldb", - "request": "launch", - "name": "Debug unit tests in executable 'chip'", - "cargo": { - "args": ["test", "--no-run"], - "filter": { - "name": "chip", - "kind": "bin" - } - }, - "args": [], - "cwd": "${workspaceFolder}" - } - ] -} diff --git a/application/apps/indexer/addons/text_grep/.gitignore b/application/apps/indexer/addons/text_grep/.gitignore deleted file mode 100644 index ae6fa9c2f5..0000000000 --- a/application/apps/indexer/addons/text_grep/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ -.* -!.gitignore -target/ -Cargo.lock diff --git a/application/apps/indexer/indexer_base/.gitignore b/application/apps/indexer/indexer_base/.gitignore deleted file mode 100644 index 693699042b..0000000000 --- a/application/apps/indexer/indexer_base/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -/target -**/*.rs.bk -Cargo.lock diff --git a/application/apps/indexer/logical.md b/application/apps/indexer/logical.md deleted file mode 100644 index 68e9555e25..0000000000 --- a/application/apps/indexer/logical.md +++ /dev/null @@ -1,8 +0,0 @@ -physical: was transmitted over bus -e.g. transmitting degree celcius -quantization = 0.01 -offset = - 50 = -50 -log_v=27.85 -phy_v = (log_v - offset)/quantization = 7,785 -//phy_v is transmitted (unsigned) -//log_v is real value diff --git a/application/apps/indexer/merging/.gitignore b/application/apps/indexer/merging/.gitignore deleted file mode 100644 index 693699042b..0000000000 --- a/application/apps/indexer/merging/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -/target -**/*.rs.bk -Cargo.lock diff --git a/application/apps/indexer/processor/.gitignore b/application/apps/indexer/processor/.gitignore deleted file mode 100644 index 5f7ff35d49..0000000000 --- a/application/apps/indexer/processor/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ -/target -**/*.rs.bk -**/proptest-regressions -Cargo.lock diff --git a/application/apps/indexer/rakefile.rb b/application/apps/indexer/rakefile.rb deleted file mode 100644 index 75bb6161f6..0000000000 --- a/application/apps/indexer/rakefile.rb +++ /dev/null @@ -1,161 +0,0 @@ -# frozen_string_literal: true - -require 'rake' -CLI_EXE_NAME = 'indexer_cli' - -LEVEL_WARN = 1 -LEVEL_INFO = 2 -LEVEL_DEBUG = 3 -LEVEL_TRACE = 4 -VERBOSITY = LEVEL_DEBUG - -def debug(content) - puts("DEBUG: #{content}") unless VERBOSITY < LEVEL_DEBUG -end - -namespace :bench do - desc 'run parse benchmarks' - task :parse do - sh 'cargo bench --bench parse_benchmarks' - end - desc 'run parse benchmarks, compare to baseline' - task :parse_master do - sh 'cargo bench --bench parse_benchmarks -- --baseline master' - end - desc 'record new parse baseline' - task :parse_baseline do - sh 'cargo bench --bench parse_benchmarks -- --save-baseline master' - end -end -desc 'run tests with printing to stdout' -task :test_nocapture do - sh 'cargo test -q -- --nocapture' -end - -def create_changelog(current_version, next_version) - raw_log = `git log --format=%B #{current_version}..HEAD`.strip - log_lines = raw_log.split(/\n/) - log = log_lines - .reject { |x| x.strip == '' } - .collect { |line| " * #{line}" }.join("\n") - - date = Time.now.strftime('%m/%d/%Y') - log_entry = "### [#{next_version}] - #{date}\n#{log}" - puts "logmessages: #{log}" - ['README.md'].each do |file| - text = File.read(file) - new_contents = text.gsub(/^#\sChangelog/, "# Changelog\n\n#{log_entry}") - File.open(file, 'w') { |f| f.puts new_contents } - end -end - -namespace :version do - desc 'bump patch level' - task :patch do - next_version = get_next_version(:patch) - debug "next_version=#{next_version}" - create_new_version(next_version) - end - desc 'bump minor level' - task :minor do - next_version = get_next_version(:minor) - debug "next_version=#{next_version}" - create_new_version(next_version) - end - desc 'bump major level' - task :major do - next_version = get_next_version(:major) - debug "next_version=#{next_version}" - create_new_version(next_version) - end -end - -def get_next_version(jump) - current_version = read_current_version - v = Version.new(current_version) - v.send(jump) -end - -def read_current_version - current_version = nil - cd CLI_EXE_NAME, verbose: false do - ['Cargo.toml'].each do |file| - text = File.read(file) - match = text.match(/^version\s=\s"(.*)"/i) - current_version = match.captures[0] if match - end - end - current_version -end - -def update_toml(new_version) - cd CLI_EXE_NAME, verbose: false do - ['Cargo.toml'].each do |file| - text = File.read(file) - new_contents = text.gsub(/^version\s=\s"\d+\.\d+\.\d+"/, "version = \"#{new_version}\"") - File.open(file, 'w') { |f| f.puts new_contents } - end - end -end - -def create_new_version(next_version) - sh 'cargo test -q' - update_toml(next_version) - sh 'cargo build' -end - -class Version < Array - def initialize(s) - super(s.split('.').map(&:to_i)) - end - - def as_version_code - get_major * 1000 * 1000 + get_minor * 1000 + get_patch - end - - def <(other) - (self <=> other).negative? - end - - def >(other) - (self <=> other).positive? - end - - def ==(other) - (self <=> other).zero? - end - - def patch - patch = last - self[0...-1].concat([patch + 1]) - end - - def minor - self[1] = self[1] + 1 - self[2] = 0 - self - end - - def major - self[0] = self[0] + 1 - self[1] = 0 - self[2] = 0 - self - end - - def get_major - self[0] - end - - def get_minor - self[1] - end - - def get_patch - self[2] - end - - def to_s - join('.') - end -end diff --git a/application/apps/indexer/stypes/.gitignore b/application/apps/indexer/stypes/.gitignore deleted file mode 100644 index ea8c4bf7f3..0000000000 --- a/application/apps/indexer/stypes/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/target diff --git a/application/apps/indexer/stypes/Cargo.toml b/application/apps/indexer/stypes/Cargo.toml deleted file mode 100644 index b2ee9d74ba..0000000000 --- a/application/apps/indexer/stypes/Cargo.toml +++ /dev/null @@ -1,45 +0,0 @@ -[package] -name = "stypes" -description = "Shared types" -version.workspace = true -edition.workspace = true - -[lints] -workspace = true - -[features] -test_and_gen = [] -rustcore = [ - "dep:tokio", - "dep:walkdir", - "dlt-core/fibex", - "dlt-core/statistics", - "dlt-core/serialization", - "dep:anyhow", -] -nodejs = [ - "dep:node-bindgen" -] - -[dependencies] -serde = { workspace = true , features = ["derive"] } -dlt-core = { workspace = true, features = ["fibex", "serialization"] } -bincode = "1.3" -extend = { path = "../tools/extend"} -uuid = { workspace = true, features = ["serde"] } -tokio = { workspace = true, optional = true } -node-bindgen = { git = "https://github.com/infinyon/node-bindgen.git", branch="master", optional = true} -thiserror.workspace = true -walkdir = { workspace = true, optional = true } -anyhow = { workspace = true, optional = true } - -[dev-dependencies] -tokio = { workspace = true } -walkdir = { workspace = true } -node-bindgen = { git = "https://github.com/infinyon/node-bindgen.git", branch="master" } -proptest = { workspace = true } -paste = "1.0" -uuid = { workspace = true, features = ["serde", "v4"] } -remove_dir_all = "1.0" -ts-rs = { version = "10.1", features = ["uuid-impl"] } - diff --git a/application/apps/indexer/stypes/bindings/attachment.ts b/application/apps/indexer/stypes/bindings/attachment.ts deleted file mode 100644 index 44e19feb97..0000000000 --- a/application/apps/indexer/stypes/bindings/attachment.ts +++ /dev/null @@ -1,42 +0,0 @@ -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -/** - * Describes the content of attached data found in the `payload` of a `dlt` message. - */ -export type AttachmentInfo = { -/** - * A unique identifier for the attachment. - */ -uuid: string, -/** - * The full path to the file. Note that `chipmunk` serializes the file name to ensure proper - * saving to disk, so the actual file name may differ from the value in the `name` field. - */ -filepath: string, -/** - * The name of the application, usually corresponding to the file name. - */ -name: string, -/** - * The file extension, if available. - */ -ext: string | null, -/** - * The size of the file in bytes. - */ -size: number, -/** - * The `mime` type of the file, if it could be determined. - */ -mime: string | null, -/** - * The log entry numbers containing the application data. Note that the application - * data may be contained in a single log entry or split into parts distributed - * across sequential log entries. - */ -messages: number[], }; - -/** - * A list of attachments. - */ -export type AttachmentList = Array; diff --git a/application/apps/indexer/stypes/bindings/callback.ts b/application/apps/indexer/stypes/bindings/callback.ts deleted file mode 100644 index 96d5e7d479..0000000000 --- a/application/apps/indexer/stypes/bindings/callback.ts +++ /dev/null @@ -1,61 +0,0 @@ -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { AttachmentInfo } from "./attachment"; -import type { FilterMatchList } from "./miscellaneous"; -import type { NativeError } from "./error"; -import type { Progress } from "./progress"; - -/** - * Represents events sent to the client. - */ -export type CallbackEvent = { "StreamUpdated": number } | "FileRead" | { "SearchUpdated": { -/** - * The number of logs with matches. Can be `0` if the search is reset on the client side. - */ -found: number, -/** - * A map of search conditions and their global match counts within the session. - * - `String`: The search condition. - * - `u64`: The count of matches. - */ -stat: Map, } } | { "IndexedMapUpdated": { -/** - * The number of log entries from search results available for reading. - */ -len: number, } } | { "SearchMapUpdated": FilterMatchList | null } | { "SearchValuesUpdated": Map } | { "AttachmentsUpdated": { -/** - * The size of the attachment in bytes. - */ -len: number, -/** - * The description of the attachment. - */ -attachment: AttachmentInfo, } } | { "Progress": { -/** - * The unique identifier of the operation. - */ -uuid: string, -/** - * Information about the progress. - */ -progress: Progress, } } | { "SessionError": NativeError } | { "OperationError": { -/** - * The unique identifier of the operation that caused the error. - */ -uuid: string, -/** - * The error details. - */ -error: NativeError, } } | { "OperationStarted": string } | { "OperationProcessing": string } | { "OperationDone": OperationDone } | "SessionDestroyed"; - -/** - * Contains the results of an operation. - */ -export type OperationDone = { -/** - * The unique identifier of the operation. - */ -uuid: string, -/** - * The results of the operation, if available. - */ -result: Array | null, }; diff --git a/application/apps/indexer/stypes/bindings/command.ts b/application/apps/indexer/stypes/bindings/command.ts deleted file mode 100644 index 5a3c88e73c..0000000000 --- a/application/apps/indexer/stypes/bindings/command.ts +++ /dev/null @@ -1,159 +0,0 @@ -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -/** - * Represents the result of a command execution. - * At the core level, this type is used for all commands invoked within an `UnboundSession`. - * It is only used to indicate the successful completion or interruption of a command. - */ -export type CommandOutcomeBool = { "Finished": boolean } | "Cancelled"; - -/** - * Represents the result of a command execution. - * At the core level, this type is used for all commands invoked within an `UnboundSession`. - * It is only used to indicate the successful completion or interruption of a command. - */ -export type CommandOutcomeDltStatisticInfoResult = { "Finished": DltStatisticInfo } | "Cancelled"; - -/** - * Represents the result of a command execution. - * At the core level, this type is used for all commands invoked within an `UnboundSession`. - * It is only used to indicate the successful completion or interruption of a command. - */ -export type CommandOutcomeFoldersScanningResult = { "Finished": FoldersScanningResult } | "Cancelled"; - -/** - * Represents the result of a command execution. - * At the core level, this type is used for all commands invoked within an `UnboundSession`. - * It is only used to indicate the successful completion or interruption of a command. - */ -export type CommandOutcomeOptionalString = { "Finished": string | null } | "Cancelled"; - -/** - * Represents the result of a command execution. - * At the core level, this type is used for all commands invoked within an `UnboundSession`. - * It is only used to indicate the successful completion or interruption of a command. - */ -export type CommandOutcomeProfilesResult = { "Finished": ProfileList } | "Cancelled"; - -/** - * Represents the result of a command execution. - * At the core level, this type is used for all commands invoked within an `UnboundSession`. - * It is only used to indicate the successful completion or interruption of a command. - */ -export type CommandOutcomeSerialPortsList = { "Finished": SerialPortsList } | "Cancelled"; - -/** - * Represents the result of a command execution. - * At the core level, this type is used for all commands invoked within an `UnboundSession`. - * It is only used to indicate the successful completion or interruption of a command. - */ -export type CommandOutcomeString = { "Finished": string } | "Cancelled"; - -/** - * Represents the result of a command execution. - * At the core level, this type is used for all commands invoked within an `UnboundSession`. - * It is only used to indicate the successful completion or interruption of a command. - */ -export type CommandOutcomeVoid = "Finished" | "Cancelled"; - -/** - * Represents the result of a command execution. - * At the core level, this type is used for all commands invoked within an `UnboundSession`. - * It is only used to indicate the successful completion or interruption of a command. - */ -export type CommandOutcomei64 = { "Finished": number } | "Cancelled"; - -export type DltLevelDistribution = { non_log: number, log_fatal: number, log_error: number, log_warning: number, log_info: number, log_debug: number, log_verbose: number, log_invalid: number, }; - -export type DltStatisticInfo = { app_ids: Array<[string, DltLevelDistribution]>, context_ids: Array<[string, DltLevelDistribution]>, ecu_ids: Array<[string, DltLevelDistribution]>, contained_non_verbose: boolean, }; - -/** - * Represents a folder entity in the file system. - */ -export type FolderEntity = { -/** - * The name of the entity (file or folder). - */ -name: string, -/** - * The full path of the entity. - */ -fullname: string, -/** - * The type of the entity (e.g., file, directory, symbolic link). - */ -kind: FolderEntityType, -/** - * Optional detailed information about the entity. - */ -details: FolderEntityDetails | null, }; - -/** - * Contains detailed information about a folder entity. - */ -export type FolderEntityDetails = { -/** - * The name of the file or folder. - */ -filename: string, -/** - * The full path to the file or folder. - */ -full: string, -/** - * The directory path containing the file or folder. - */ -path: string, -/** - * The base name of the file or folder. - */ -basename: string, -/** - * The file extension, if applicable. - */ -ext: string, }; - -/** - * Represents the type of a folder entity in the file system. - */ -export type FolderEntityType = "BlockDevice" | "CharacterDevice" | "Directory" | "FIFO" | "File" | "Socket" | "SymbolicLink"; - -/** - * Represents the result of scanning a folder. - */ -export type FoldersScanningResult = { -/** - * A list of folder entities found during the scan. - */ -list: Array, -/** - * Indicates whether the maximum length of results was reached. - */ -max_len_reached: boolean, }; - -/** - * Represents a list of serial ports. - * - * This structure contains a vector of strings, where each string represents the name - * or identifier of a serial port available on the system. - */ -export type ProfileList = Array; - -/** - * Represents a list of serial ports. - * - * This structure contains a vector of strings, where each string represents the name - * or identifier of a serial port available on the system. - */ -export type SerialPortsList = Array; - -export type ShellProfile = { shell: ShellType, -/** - * Path to executable file of shell - */ -path: string, }; - -/** - * Represents most well known shells that are not used by default on OS. - */ -export type ShellType = "Bash" | "Zsh" | "Fish" | "NuShell" | "Elvish" | "Pwsh"; diff --git a/application/apps/indexer/stypes/bindings/dlt.ts b/application/apps/indexer/stypes/bindings/dlt.ts deleted file mode 100644 index 4db3b1d986..0000000000 --- a/application/apps/indexer/stypes/bindings/dlt.ts +++ /dev/null @@ -1,28 +0,0 @@ -/** - * ATTENTION: - * THIS FILE IS MANUALLY CREATED BECAUSE `ts_rs` CANNOT BE APPLIED - * TO FOREIGN TYPES (`DltFilterConfig` comes from the `dlt-core` crate). - * DO NOT REMOVE THIS FILE. - */ -export interface DltFilterConfig { - /// only select log entries with level MIN_LEVEL and more severe - /// - /// ``` text - /// 1 => FATAL - /// 2 => ERROR - /// 3 => WARN - /// 4 => INFO - /// 5 => DEBUG - /// 6 => VERBOSE - /// ``` min_log_level?: number, - /// what app ids should be allowed. - app_ids?: string[]; - /// what ecu ids should be allowed - ecu_ids?: string[]; - /// what context ids should be allowed - context_ids?: string[]; - /// how many app ids exist in total - app_id_count: number; - /// how many context ids exist in total - context_id_count: number; -} diff --git a/application/apps/indexer/stypes/bindings/error.ts b/application/apps/indexer/stypes/bindings/error.ts deleted file mode 100644 index 2d678c253d..0000000000 --- a/application/apps/indexer/stypes/bindings/error.ts +++ /dev/null @@ -1,33 +0,0 @@ -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -/** - * Describes the type and details of an error. - */ -export type ComputationError = "DestinationPath" | "SessionCreatingFail" | { "Communication": string } | { "OperationNotSupported": string } | { "IoOperation": string } | "InvalidData" | { "InvalidArgs": string } | { "Process": string } | { "Protocol": string } | { "SearchError": string } | "MultipleInitCall" | "SessionUnavailable" | { "NativeError": NativeError } | { "Grabbing": string } | { "Sde": string } | { "Decoding": string } | { "Encoding": string }; - -/** - * Describes the details of an error. - */ -export type NativeError = { -/** - * The severity level of the error. - */ -severity: Severity, -/** - * The type or source of the error. - */ -kind: NativeErrorKind, -/** - * A detailed message describing the error. - */ -message: string | null, }; - -/** - * Defines the source or type of an error. - */ -export type NativeErrorKind = "FileNotFound" | "UnsupportedFileType" | "ComputationFailed" | "Configuration" | "Interrupted" | "OperationSearch" | "NotYetImplemented" | "ChannelError" | "Io" | "Grabber" | "Plugins"; - -/** - * Indicates the severity level of an error. - */ -export type Severity = "WARNING" | "ERROR"; diff --git a/application/apps/indexer/stypes/bindings/index.ts b/application/apps/indexer/stypes/bindings/index.ts deleted file mode 100644 index 2541212052..0000000000 --- a/application/apps/indexer/stypes/bindings/index.ts +++ /dev/null @@ -1,16 +0,0 @@ -/** - * ATTENTION: - * THIS FILE IS MANUALLY CREATED TO MANAGE TYPE EXPORTS. - * DO NOT DELETE. ADD EXPORT STATEMENTS FOR ANY NEW TYPES. - */ -export * from './attachment'; -export * from './callback'; -export * from './command'; -export * from './error'; -export * from './lf_transition'; -export * from './miscellaneous'; -export * from './observe'; -export * from './progress'; -export * from './dlt'; -export * from './operations'; -export * from './plugins'; diff --git a/application/apps/indexer/stypes/bindings/lf_transition.ts b/application/apps/indexer/stypes/bindings/lf_transition.ts deleted file mode 100644 index de4a4003ee..0000000000 --- a/application/apps/indexer/stypes/bindings/lf_transition.ts +++ /dev/null @@ -1,23 +0,0 @@ -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { Ticks } from "./progress"; - -/** - * Describes the progress of an operation. - */ -export type LifecycleTransition = { "Started": { -/** - * The unique identifier of the operation. - */ -uuid: string, -/** - * A user-friendly name of the operation for display purposes. - */ -alias: string, } } | { "Ticks": { -/** - * The unique identifier of the operation. - */ -uuid: string, -/** - * The progress data associated with the operation. - */ -ticks: Ticks, } } | { "Stopped": string }; diff --git a/application/apps/indexer/stypes/bindings/miscellaneous.ts b/application/apps/indexer/stypes/bindings/miscellaneous.ts deleted file mode 100644 index 59ab592e7d..0000000000 --- a/application/apps/indexer/stypes/bindings/miscellaneous.ts +++ /dev/null @@ -1,105 +0,0 @@ -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -/** - * Data about indices (log entry numbers). Used to provide information about - * the nearest search results relative to a specific log entry number. - */ -export type AroundIndexes = [number | undefined | null, number | undefined | null]; - -/** - * Describes a match for a search condition. - */ -export type FilterMatch = { -/** - * The index (number) of the matching log entry. - */ -index: number, -/** - * The identifiers of the filters (search conditions) that matched - * the specified log entry. - */ -filters: Array, }; - -/** - * A list of matches for a search condition. - */ -export type FilterMatchList = Array; - -/** - * Information about a log entry. - */ -export type GrabbedElement = { -/** - * The unique identifier of the source. - */ -source_id: number, -/** - * The textual content of the log entry. - */ -content: string, -/** - * The position of the log entry in the overall stream. - */ -pos: number, -/** - * The nature of the log entry, represented as a bitmask. Possible values include: - * - `SEARCH`: Nature = Nature(1) - * - `BOOKMARK`: Nature = Nature(1 << 1) - * - `EXPANDED`: Nature = Nature(1 << 5) - * - `BREADCRUMB`: Nature = Nature(1 << 6) - * - `BREADCRUMB_SEPARATOR`: Nature = Nature(1 << 7) - */ -nature: number, }; - -/** - * A list of log entries. - */ -export type GrabbedElementList = Array; - -export type MapKeyValue = { [key in string]?: string }; - -/** - * Representation of ranges. We cannot use std ranges as soon as no way - * to derive Serialize, Deserialize - */ -export type Range = { start: number, end: number, }; - -/** - * A list of ranges to read. - */ -export type Ranges = Array; - -/** - * A request to a stream that supports feedback, such as a terminal command - * that accepts input through `stdin`. - */ -export type SdeRequest = { "WriteText": string } | { "WriteBytes": Array }; - -/** - * The response from a source to a sent `SdeRequest`. Note that sending data - * with `SdeRequest` does not guarantee a response, as the behavior depends - * on the source. - */ -export type SdeResponse = { -/** - * The number of bytes received. - */ -bytes: number, }; - -/** - * Describes a data source. - */ -export type SourceDefinition = { -/** - * The unique identifier of the source. - */ -id: number, -/** - * The user-friendly name of the source for display purposes. - */ -alias: string, }; - -/** - * A list of data sources. - */ -export type Sources = Array; diff --git a/application/apps/indexer/stypes/bindings/observe.ts b/application/apps/indexer/stypes/bindings/observe.ts deleted file mode 100644 index 4abee2409e..0000000000 --- a/application/apps/indexer/stypes/bindings/observe.ts +++ /dev/null @@ -1,185 +0,0 @@ -/** - * ATTENTION: - * REFERENCE TO `DltFilterConfig` HAS BEEN ADDED MANUALLY - * BECAUSE THIS TYPE IS NOT GENERATED BY `ts_rs`. - */ -import { DltFilterConfig } from './dlt'; -import type { PluginParserSettings } from './plugins'; - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { ShellProfile } from './command'; - -/** - * Settings for the DLT parser. - */ -export type DltParserSettings = { - /** - * Configuration for filtering DLT messages. - */ - filter_config: DltFilterConfig; - /** - * Paths to FIBEX files for additional interpretation of `payload` content. - */ - fibex_file_paths: Array | null; - /** - * Indicates whether the source contains a `StorageHeader`. Set to `true` if applicable. - */ - with_storage_header: boolean; - /** - * Timezone for timestamp adjustment. If specified, timestamps are converted to this timezone. - */ - tz: string | null; -}; - -/** - * Supported file formats for observation. - */ -export type FileFormat = 'PcapNG' | 'PcapLegacy' | 'Text' | 'Binary'; - -/** - * Multicast configuration information. - * - `multiaddr`: A valid multicast address. - * - `interface`: The address of the local interface used to join the multicast group. - * If set to `INADDR_ANY`, the system selects an appropriate interface. - */ -export type MulticastInfo = { multiaddr: string; interface: string | null }; - -/** - * Options for observing data within a session. - */ -export type ObserveOptions = { - /** - * The description of the data source. - */ - origin: ObserveOrigin; - /** - * The parser configuration to be applied. - */ - parser: ParserType; -}; - -/** - * Describes the source of data for observation. - */ -export type ObserveOrigin = - | { File: [string, FileFormat, string] } - | { Concat: Array<[string, FileFormat, string]> } - | { Stream: [string, Transport] }; - -/** - * Specifies the parser to be used for processing session data. - */ -export type ParserType = - | { Dlt: DltParserSettings } - | { SomeIp: SomeIpParserSettings } - | { Text: null } - | { Plugin: PluginParserSettings }; - -/** - * Configuration for executing terminal commands. - */ -export type ProcessTransportConfig = { - /** - * The working directory for the command. - */ - cwd: string; - /** - * The command to execute. - */ - command: string; - /** - * Optional shell infos if user selected one other than the default shells - */ - shell: ShellProfile | null; -}; - -/** - * Configuration for serial port connections. - */ -export type SerialTransportConfig = { - /** - * The path to the serial port. - */ - path: string; - /** - * The baud rate for the connection. - */ - baud_rate: number; - /** - * The number of data bits per frame. - */ - data_bits: number; - /** - * The flow control setting. - */ - flow_control: number; - /** - * The parity setting. - */ - parity: number; - /** - * The number of stop bits. - */ - stop_bits: number; - /** - * The delay in sending data, in milliseconds. - */ - send_data_delay: number; - /** - * Whether the connection is exclusive. - */ - exclusive: boolean; -}; - -/** - * Settings for the SomeIp parser. - */ -export type SomeIpParserSettings = { - /** - * Paths to FIBEX files for additional interpretation of `payload` content. - */ - fibex_file_paths: Array | null; -}; - -/** - * Configuration for TCP connections. - */ -export type TCPTransportConfig = { - /** - * The address to bind the TCP connection to. - */ - bind_addr: string; -}; - -/** - * Describes the transport source for a session. - */ -export type Transport = - | { Process: ProcessTransportConfig } - | { TCP: TCPTransportConfig } - | { UDP: UDPTransportConfig } - | { Serial: SerialTransportConfig }; - -/** - * Configuration for UDP connections. - */ -export type UDPTransportConfig = { - /** - * The address to bind the UDP connection to. - */ - bind_addr: string; - /** - * A list of multicast configurations. - */ - multicast: Array; -}; - -/** - * Configuration for UDP connections. - */ -export type UdpConnectionInfo = { - /** - * A list of multicast addresses to listen on. - */ - multicast_addr: Array; -}; diff --git a/application/apps/indexer/stypes/bindings/operations.ts b/application/apps/indexer/stypes/bindings/operations.ts deleted file mode 100644 index 5989527ca1..0000000000 --- a/application/apps/indexer/stypes/bindings/operations.ts +++ /dev/null @@ -1,48 +0,0 @@ -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -/** - * Used to delivery results of extracting values. That's used in the scope - * of chart feature - */ -export type ExtractedMatchValue = { -/** - * The index of log entry (row number) - */ -index: number, -/** - * List of matches: - * `usize` - index of filter - * `Vec` - list of extracted values - */ -values: Array<[number, Array]>, }; - -export type NearestPosition = { index: number, position: number, }; - -/** - *(row_number, min_value_in_range, max_value_in_range, value) - * value - can be last value in range or some kind of average - */ -export type Point = { row: number, min: number, max: number, y_value: number, }; - -export type ResultBool = boolean; - -/** - * The list of `ExtractedMatchValue` - */ -export type ResultExtractedMatchValues = Array; - -export type ResultNearestPosition = NearestPosition | null; - -/** - * Scaled chart data - */ -export type ResultScaledDistribution = Array>; - -export type ResultSearchValues = Map; - -/** - * Used only for debug session lifecycle - */ -export type ResultSleep = { sleep_well: boolean, }; - -export type ResultU64 = number; diff --git a/application/apps/indexer/stypes/bindings/plugins.ts b/application/apps/indexer/stypes/bindings/plugins.ts deleted file mode 100644 index fdd9107ec8..0000000000 --- a/application/apps/indexer/stypes/bindings/plugins.ts +++ /dev/null @@ -1,241 +0,0 @@ -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -/** - * Represents the infos of a column that will be used in the render options. - */ -export type ColumnInfo = { - /** - * Header title to be rendered on the top of the column in log view. - */ - caption: string; - /** - * Description to be shown as tooltip for the column. - */ - description: string; - /** - * Width of column (-1) for unlimited. - */ - width: number; -}; - -/** - * Represents the options needs to render columns information if they exist. - */ -export type ColumnsRenderOptions = { - /** - * List of columns infos providing the needed information for each column in log view. - * - * Note: The count of this list must match the count of the column of each log message. - */ - columns: Array; - /** - * Minimum column width. - */ - min_width: number; - /** - * Maximum column width. - */ - max_width: number; -}; - -/** - * Represents the informations of an invalid plugin. - */ -export type InvalidPluginEntity = { - /** - * Directory path of the plugin. Qualify as ID for the plugin. - */ - dir_path: string; - /** - * Represents the plugin type. - */ - plugin_type: PluginType; -}; - -/** - * Represents a list of [`InvalidPluginEntity`]. - */ -export type InvalidPluginsList = Array; - -/** - * Provides additional information to be rendered in the log view. - */ -export type ParserRenderOptions = { - /** - * Rendering information for the column if log messages have multiple columns. - * - * # Note: - * The count of the provided columns must match the count of the columns of each log message as well. - */ - columns_options: ColumnsRenderOptions | null; -}; - -/** - * General settings for all byte-sources as plugins - */ -export type PluginByteSourceGeneralSettings = { placeholder: string }; - -/** - * Settings for the Plugin Byte-Sources. - */ -export type PluginByteSourceSettings = { - plugin_path: string; - general_settings: PluginByteSourceGeneralSettings; - plugin_configs: Array; -}; - -/** - * Represents a configuration item, which includes an identifier and its corresponding value. - */ -export type PluginConfigItem = { id: string; value: PluginConfigValue }; - -/** - * Represents the schema for a configuration item. - */ -export type PluginConfigSchemaItem = { - id: string; - title: string; - description: string | null; - input_type: PluginConfigSchemaType; -}; - -/** - * Defines the possible input types for configuration schemas. - */ -export type PluginConfigSchemaType = - | { Boolean: boolean } - | { Integer: number } - | { Float: number } - | { Text: string } - | 'Directories' - | { Files: Array } - | { Dropdown: [Array, string] }; - -/** - * Represents the value of a configuration item. - */ -export type PluginConfigValue = - | { Boolean: boolean } - | { Integer: number } - | { Float: number } - | { Text: string } - | { Directories: Array } - | { Files: Array } - | { Dropdown: string }; - -/** - * Represents an installed plugin entity informations and configurations. - */ -export type PluginEntity = { - /** - * Directory path of the plugin. Qualify as ID for the plugin. - */ - dir_path: string; - /** - * Represents the plugin type. - */ - plugin_type: PluginType; - /** - * Include various information about the plugin. - */ - info: PluginInfo; - /** - * Provides Plugins Metadata from separate source than the plugin binary. - * Currently they are saved inside plugin `*.toml` file. - */ - metadata: PluginMetadata; - /** - * Path of the readme file for the plugin to be rendered on the front-end - */ - readme_path: string | null; -}; - -/** - * Contains the infos and options for a valid plugin. - */ -export type PluginInfo = { - wasm_file_path: string; - api_version: SemanticVersion; - plugin_version: SemanticVersion; - config_schemas: Array; - render_options: RenderOptions; -}; - -/** - * Represents different levels of logging severity for a plugin. - */ -export type PluginLogLevel = 'Err' | 'Warn' | 'Debug' | 'Info'; - -/** - * Represents a log message generated by a plugin. - */ -export type PluginLogMessage = { - /** - * The severity level of the log message. - */ - level: PluginLogLevel; - /** - * The timestamp of when the log message was generated, represented as a Unix timestamp. - */ - timestamp: bigint; - /** - * The actual content of the log message. - */ - msg: string; -}; - -/** - * Represents the plugins metadata like title, description... - */ -export type PluginMetadata = { title: string; description: string | null }; - -/** - * General settings for all parsers as plugins - */ -export type PluginParserGeneralSettings = { placeholder: string }; - -/** - * Settings for the Plugins parser. - */ -export type PluginParserSettings = { - plugin_path: string; - general_settings: PluginParserGeneralSettings; - plugin_configs: Array; -}; - -/** - * Maintains the state of a plugin, including its log messages. - * Represented as a struct (but not just a vector) to reserve - * a space for a future fields. - */ -export type PluginRunData = { - /** - * A collection of log messages associated with the plugin. - */ - logs: Array; -}; - -/** - * Represents plugins main types - */ -export type PluginType = 'Parser' | 'ByteSource'; - -/** - * Represents a list of [`PluginEntity`]. - */ -export type PluginsList = Array; - -/** - * Represents a list of [`InvalidPluginEntity`]. - */ -export type PluginsPathsList = Array; - -/** - * Represents the render options (columns headers, etc.) for the plugins. - */ -export type RenderOptions = { Parser: ParserRenderOptions } | 'ByteSource'; - -/** - * Represents the semantic version used in the plugins system. - */ -export type SemanticVersion = { major: number; minor: number; patch: number }; diff --git a/application/apps/indexer/stypes/bindings/progress.ts b/application/apps/indexer/stypes/bindings/progress.ts deleted file mode 100644 index e02a8793ee..0000000000 --- a/application/apps/indexer/stypes/bindings/progress.ts +++ /dev/null @@ -1,43 +0,0 @@ -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { Severity } from "./error"; - -/** - * Represents a notification about an event (including potential errors) - * related to processing a specific log entry, if such data is available. - */ -export type Notification = { -/** - * The severity level of the event. - */ -severity: Severity, -/** - * The content or message describing the event. - */ -content: string, -/** - * The log entry number that triggered the event, if applicable. - */ -line: number | null, }; - -/** - * Describes the progress of an operation. - */ -export type Progress = { "Ticks": Ticks } | { "Notification": Notification } | "Stopped"; - -/** - * Provides detailed information about the progress of an operation. - */ -export type Ticks = { -/** - * The current progress count, typically representing `n` out of `100%`. - */ -count: number, -/** - * The name of the current progress stage, for user display purposes. - */ -state: string | null, -/** - * The total progress counter. Usually `100`, but for file operations, - * it might represent the file size, where `count` indicates the number of bytes read. - */ -total: number | null | undefined, }; diff --git a/application/apps/indexer/stypes/generate.sh b/application/apps/indexer/stypes/generate.sh deleted file mode 100755 index 40b453ce51..0000000000 --- a/application/apps/indexer/stypes/generate.sh +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/bash - -echo " -This script generates TypeScript types from Rust types by executing special unit tests. -After running these tests, the types will be generated, and existing types will be overwritten -in the 'bindings' directory. -Please copy only the newly generated types to the 'application/platform/types' directory. - -Notes: -* The generated files in 'bindings' are not part of the communication protocol; only the types in - 'platform' are part of the protocol. -* Please commit only the new changes and exclude the overwritten versions of existing types. -" -read -p "Do you want to continue? (y/N): " response - -response=${response,,} -if [[ "$response" != "y" ]]; then - echo "Operation aborted." - exit 1 -fi - -echo "Generating types" -cargo test --release --features "test_and_gen" -- --nocapture diff --git a/application/apps/indexer/stypes/src/attachment/nodejs.rs b/application/apps/indexer/stypes/src/attachment/nodejs.rs deleted file mode 100644 index 798b648753..0000000000 --- a/application/apps/indexer/stypes/src/attachment/nodejs.rs +++ /dev/null @@ -1,4 +0,0 @@ -use crate::*; - -try_into_js!(AttachmentInfo); -try_into_js!(AttachmentList); diff --git a/application/apps/indexer/stypes/src/attachment/proptest.rs b/application/apps/indexer/stypes/src/attachment/proptest.rs deleted file mode 100644 index b22b071d65..0000000000 --- a/application/apps/indexer/stypes/src/attachment/proptest.rs +++ /dev/null @@ -1,65 +0,0 @@ -use crate::*; -use std::path::PathBuf; -use uuid::Uuid; - -/// Implements the `Arbitrary` trait for `AttachmentInfo` to generate random instances -/// for property-based testing using the `proptest` framework. -/// -/// # Details -/// - This implementation generates random values for all fields of `AttachmentInfo`, -/// including: -/// - A randomly generated `Uuid`. -/// - A random `PathBuf` for the file path. -/// - A random `String` for the file name. -/// - An optional random file extension (`Option`). -/// - A random file size (`u32`, converted to `usize`). -/// - An optional random MIME type (`Option`). -/// - A vector of random log entry indices (`Vec`, converted to `Vec`). -impl Arbitrary for AttachmentInfo { - type Parameters = (); - type Strategy = BoxedStrategy; - - fn arbitrary_with(_: Self::Parameters) -> Self::Strategy { - ( - Just(Uuid::new_v4()), - any::(), - any::(), - any::>(), - any::(), - any::>(), - prop::collection::vec(any::(), 0..10), - ) - .prop_map( - |(uuid, filepath, name, ext, size, mime, messages)| AttachmentInfo { - uuid, - filepath, - name, - ext, - size: size as usize, - mime, - messages: messages.into_iter().map(|p| p as usize).collect(), - }, - ) - .boxed() - } -} - -/// Implements the `Arbitrary` trait for `AttachmentList` to generate random instances -/// for property-based testing using the `proptest` framework. -/// -/// # Details -/// - This implementation generates a vector of random `AttachmentInfo` objects with -/// up to 10 elements, which is then wrapped into an `AttachmentList`. -impl Arbitrary for AttachmentList { - type Parameters = (); - type Strategy = BoxedStrategy; - - fn arbitrary_with(_: Self::Parameters) -> Self::Strategy { - prop::collection::vec(any::(), 0..10) - .prop_map(AttachmentList) - .boxed() - } -} - -test_msg!(AttachmentInfo, TESTS_USECASE_COUNT); -test_msg!(AttachmentList, TESTS_USECASE_COUNT); diff --git a/application/apps/indexer/stypes/src/callback/nodejs.rs b/application/apps/indexer/stypes/src/callback/nodejs.rs deleted file mode 100644 index dc1a1fadc0..0000000000 --- a/application/apps/indexer/stypes/src/callback/nodejs.rs +++ /dev/null @@ -1,4 +0,0 @@ -use crate::*; - -try_into_js!(OperationDone); -try_into_js!(CallbackEvent); diff --git a/application/apps/indexer/stypes/src/callback/proptest.rs b/application/apps/indexer/stypes/src/callback/proptest.rs deleted file mode 100644 index 6d8d70b8c5..0000000000 --- a/application/apps/indexer/stypes/src/callback/proptest.rs +++ /dev/null @@ -1,85 +0,0 @@ -use crate::*; -use uuid::Uuid; - -impl Arbitrary for OperationDone { - /// Implements the `Arbitrary` trait for `OperationDone` to generate random instances - /// for property-based testing using the `proptest` framework. - /// - /// # Details - /// - Randomly generates a `Uuid` for the `uuid` field. - /// - Optionally generates a random `String` for the `result` field. - type Parameters = (); - type Strategy = BoxedStrategy; - - fn arbitrary_with(_: Self::Parameters) -> Self::Strategy { - (Just(Uuid::new_v4()), any::>>()) - .prop_map(|(uuid, result)| OperationDone { uuid, result }) - .boxed() - } -} - -impl Arbitrary for CallbackEvent { - /// Implements the `Arbitrary` trait for `CallbackEvent` to generate random instances - /// for property-based testing using the `proptest` framework. - /// - /// # Details - /// This implementation supports the generation of all variants of `CallbackEvent`, - /// including: - /// - `StreamUpdated` with a random `u64` value. - /// - `FileRead` as a predefined constant. - /// - `SearchUpdated` with random values for `found` and a map of search conditions. - /// - `IndexedMapUpdated` with a random `u64` length. - /// - `SearchMapUpdated` with an optional `FilterMatchList`. - /// - `SearchValuesUpdated` with a map of random values, converting `f32` to `f64`. - /// - `AttachmentsUpdated` with random attachment information. - /// - `Progress` with a random `Uuid` and `Progress` instance. - /// - `SessionError` with a random `NativeError`. - /// - `OperationError` with random `Uuid` and `NativeError`. - /// - `OperationStarted` with a random `Uuid`. - /// - `OperationProcessing` with a random `Uuid`. - /// - `OperationDone` with a random `OperationDone` instance. - /// - `SessionDestroyed` as a predefined constant. - type Parameters = (); - type Strategy = BoxedStrategy; - - fn arbitrary_with(_: Self::Parameters) -> Self::Strategy { - prop_oneof![ - any::().prop_map(|n| CallbackEvent::StreamUpdated(n as u64)), - Just(CallbackEvent::FileRead), - (any::(), any::>(),).prop_map(|(found, stat)| { - CallbackEvent::SearchUpdated { - found: found as u64, - stat: stat.into_iter().map(|(k, v)| (k, v as u64)).collect(), - } - }), - any::().prop_map(|len| CallbackEvent::IndexedMapUpdated { len: len as u64 }), - any::>().prop_map(CallbackEvent::SearchMapUpdated), - any::>>().prop_map(|ev| { - CallbackEvent::SearchValuesUpdated(ev.map(|ev| { - ev.into_iter() - .map(|(k, (l, r))| (k, (l as f64, r as f64))) - .collect() - })) - }), - (any::(), any::(),).prop_map(|(len, attachment)| { - CallbackEvent::AttachmentsUpdated { - len: len as u64, - attachment, - } - }), - (Just(Uuid::new_v4()), any::(),) - .prop_map(|(uuid, progress)| CallbackEvent::Progress { uuid, progress }), - any::().prop_map(CallbackEvent::SessionError), - (Just(Uuid::new_v4()), any::(),) - .prop_map(|(uuid, error)| CallbackEvent::OperationError { uuid, error }), - Just(Uuid::new_v4()).prop_map(CallbackEvent::OperationStarted), - Just(Uuid::new_v4()).prop_map(CallbackEvent::OperationProcessing), - any::().prop_map(CallbackEvent::OperationDone), - Just(CallbackEvent::SessionDestroyed), - ] - .boxed() - } -} - -test_msg!(OperationDone, TESTS_USECASE_COUNT); -test_msg!(CallbackEvent, TESTS_USECASE_COUNT); diff --git a/application/apps/indexer/stypes/src/command/dltstat/nodejs.rs b/application/apps/indexer/stypes/src/command/dltstat/nodejs.rs deleted file mode 100644 index e3ee5c08ed..0000000000 --- a/application/apps/indexer/stypes/src/command/dltstat/nodejs.rs +++ /dev/null @@ -1,4 +0,0 @@ -use crate::*; - -try_into_js!(DltLevelDistribution); -try_into_js!(DltStatisticInfo); diff --git a/application/apps/indexer/stypes/src/command/dltstat/proptest.rs b/application/apps/indexer/stypes/src/command/dltstat/proptest.rs deleted file mode 100644 index 00d2f3f47a..0000000000 --- a/application/apps/indexer/stypes/src/command/dltstat/proptest.rs +++ /dev/null @@ -1,67 +0,0 @@ -use crate::*; - -impl Arbitrary for DltLevelDistribution { - type Parameters = (); - type Strategy = BoxedStrategy; - - fn arbitrary_with(_: Self::Parameters) -> Self::Strategy { - ( - any::(), - any::(), - any::(), - any::(), - any::(), - any::(), - any::(), - any::(), - ) - .prop_map( - |( - non_log, - log_fatal, - log_error, - log_warning, - log_info, - log_debug, - log_verbose, - log_invalid, - )| DltLevelDistribution { - non_log: non_log as usize, - log_fatal: log_fatal as usize, - log_error: log_error as usize, - log_warning: log_warning as usize, - log_info: log_info as usize, - log_debug: log_debug as usize, - log_verbose: log_verbose as usize, - log_invalid: log_invalid as usize, - }, - ) - .boxed() - } -} - -impl Arbitrary for DltStatisticInfo { - type Parameters = (); - type Strategy = BoxedStrategy; - - fn arbitrary_with(_: Self::Parameters) -> Self::Strategy { - ( - prop::collection::vec(any::<(String, DltLevelDistribution)>(), 0..10), - prop::collection::vec(any::<(String, DltLevelDistribution)>(), 0..10), - prop::collection::vec(any::<(String, DltLevelDistribution)>(), 0..10), - any::(), - ) - .prop_map( - |(app_ids, context_ids, ecu_ids, contained_non_verbose)| DltStatisticInfo { - contained_non_verbose, - context_ids, - app_ids, - ecu_ids, - }, - ) - .boxed() - } -} - -test_msg!(DltLevelDistribution, TESTS_USECASE_COUNT); -test_msg!(DltStatisticInfo, TESTS_USECASE_COUNT); diff --git a/application/apps/indexer/stypes/src/command/folders/nodejs.rs b/application/apps/indexer/stypes/src/command/folders/nodejs.rs deleted file mode 100644 index d001336a20..0000000000 --- a/application/apps/indexer/stypes/src/command/folders/nodejs.rs +++ /dev/null @@ -1,6 +0,0 @@ -use crate::*; - -try_into_js!(FolderEntityType); -try_into_js!(FolderEntityDetails); -try_into_js!(FoldersScanningResult); -try_into_js!(FolderEntity); diff --git a/application/apps/indexer/stypes/src/command/folders/proptest.rs b/application/apps/indexer/stypes/src/command/folders/proptest.rs deleted file mode 100644 index 1b29abf005..0000000000 --- a/application/apps/indexer/stypes/src/command/folders/proptest.rs +++ /dev/null @@ -1,124 +0,0 @@ -use crate::*; - -impl Arbitrary for FolderEntityType { - /// Implements the `Arbitrary` trait for `FolderEntityType` to generate random variants - /// for property-based testing using the `proptest` framework. - /// - /// # Details - /// This implementation generates random variants of `FolderEntityType`, including: - /// - `BlockDevice` - /// - `CharacterDevice` - /// - `Directory` - /// - `FIFO` - /// - `File` - /// - `Socket` - /// - `SymbolicLink` - type Parameters = (); - type Strategy = BoxedStrategy; - - fn arbitrary_with(_: Self::Parameters) -> Self::Strategy { - prop_oneof![ - Just(FolderEntityType::BlockDevice), - Just(FolderEntityType::CharacterDevice), - Just(FolderEntityType::Directory), - Just(FolderEntityType::FIFO), - Just(FolderEntityType::File), - Just(FolderEntityType::Socket), - Just(FolderEntityType::SymbolicLink), - ] - .boxed() - } -} - -impl Arbitrary for FolderEntityDetails { - /// Implements the `Arbitrary` trait for `FolderEntityDetails` to generate random instances - /// for property-based testing using the `proptest` framework. - /// - /// # Details - /// Generates random values for all fields: - /// - `filename`: A random `String`. - /// - `full`: A random `String`. - /// - `path`: A random `String`. - /// - `basename`: A random `String`. - /// - `ext`: A random `String`. - type Parameters = (); - type Strategy = BoxedStrategy; - - fn arbitrary_with(_: Self::Parameters) -> Self::Strategy { - ( - any::(), - any::(), - any::(), - any::(), - any::(), - ) - .prop_map( - |(filename, full, path, basename, ext)| FolderEntityDetails { - filename, - full, - path, - basename, - ext, - }, - ) - .boxed() - } -} - -impl Arbitrary for FolderEntity { - /// Implements the `Arbitrary` trait for `FolderEntity` to generate random instances - /// for property-based testing using the `proptest` framework. - /// - /// # Details - /// Generates random values for all fields: - /// - `name`: A random `String`. - /// - `fullname`: A random `String`. - /// - `kind`: A random `FolderEntityType`. - /// - `details`: An optional random `FolderEntityDetails`. - type Parameters = (); - type Strategy = BoxedStrategy; - - fn arbitrary_with(_: Self::Parameters) -> Self::Strategy { - ( - any::(), - any::(), - any::(), - any::>(), - ) - .prop_map(|(name, fullname, kind, details)| FolderEntity { - name, - fullname, - kind, - details, - }) - .boxed() - } -} - -impl Arbitrary for FoldersScanningResult { - /// Implements the `Arbitrary` trait for `FoldersScanningResult` to generate random instances - /// for property-based testing using the `proptest` framework. - /// - /// # Details - /// - Generates a random list of up to 10 `FolderEntity` instances. - /// - Generates a random `bool` to indicate whether the maximum length was reached. - type Parameters = (); - type Strategy = BoxedStrategy; - - fn arbitrary_with(_: Self::Parameters) -> Self::Strategy { - ( - prop::collection::vec(any::(), 0..10), - any::(), - ) - .prop_map(|(list, max_len_reached)| FoldersScanningResult { - list, - max_len_reached, - }) - .boxed() - } -} - -test_msg!(FolderEntityType, TESTS_USECASE_COUNT); -test_msg!(FolderEntityDetails, TESTS_USECASE_COUNT); -test_msg!(FoldersScanningResult, TESTS_USECASE_COUNT); -test_msg!(FolderEntity, TESTS_USECASE_COUNT); diff --git a/application/apps/indexer/stypes/src/command/nodejs.rs b/application/apps/indexer/stypes/src/command/nodejs.rs deleted file mode 100644 index a56f0b30e4..0000000000 --- a/application/apps/indexer/stypes/src/command/nodejs.rs +++ /dev/null @@ -1,18 +0,0 @@ -use crate::*; - -try_into_js!(CommandOutcome); -try_into_js!(CommandOutcome); -try_into_js!(CommandOutcome); -try_into_js!(CommandOutcome); -try_into_js!(CommandOutcome); -try_into_js!(CommandOutcome<()>); -try_into_js!(CommandOutcome); -try_into_js!(CommandOutcome>); -try_into_js!(CommandOutcome); -try_into_js!(CommandOutcome); -try_into_js!(CommandOutcome); -try_into_js!(CommandOutcome); -try_into_js!(CommandOutcome); -try_into_js!(CommandOutcome>); -try_into_js!(CommandOutcome>); -try_into_js!(CommandOutcome>); diff --git a/application/apps/indexer/stypes/src/command/profiles/converting.rs b/application/apps/indexer/stypes/src/command/profiles/converting.rs deleted file mode 100644 index 43f35105a3..0000000000 --- a/application/apps/indexer/stypes/src/command/profiles/converting.rs +++ /dev/null @@ -1,13 +0,0 @@ -use crate::*; - -/// Converts a `envvars::Profile` into an `Profile`. -impl From for Profile { - fn from(pro: envvars::Profile) -> Self { - Profile { - name: pro.name, - path: pro.path, - envvars: pro.envvars, - symlink: pro.symlink, - } - } -} diff --git a/application/apps/indexer/stypes/src/command/profiles/nodejs.rs b/application/apps/indexer/stypes/src/command/profiles/nodejs.rs deleted file mode 100644 index e1e00f92e5..0000000000 --- a/application/apps/indexer/stypes/src/command/profiles/nodejs.rs +++ /dev/null @@ -1,5 +0,0 @@ -use crate::*; - -try_into_js!(ShellType); -try_into_js!(ShellProfile); -try_into_js!(ProfileList); diff --git a/application/apps/indexer/stypes/src/command/profiles/proptest.rs b/application/apps/indexer/stypes/src/command/profiles/proptest.rs deleted file mode 100644 index b7642073d3..0000000000 --- a/application/apps/indexer/stypes/src/command/profiles/proptest.rs +++ /dev/null @@ -1,54 +0,0 @@ -use crate::*; - -impl Arbitrary for ShellType { - type Parameters = (); - type Strategy = BoxedStrategy; - - fn arbitrary_with(_: Self::Parameters) -> Self::Strategy { - // Reminder to add new fields here. - match Self::Bash { - ShellType::Bash => {} - ShellType::Zsh => {} - ShellType::Fish => {} - ShellType::NuShell => {} - ShellType::Elvish => {} - ShellType::Pwsh => {} - }; - - prop_oneof![ - Just(Self::Bash), - Just(Self::Zsh), - Just(Self::Fish), - Just(Self::NuShell), - Just(Self::Elvish), - Just(Self::Pwsh) - ] - .boxed() - } -} - -impl Arbitrary for ShellProfile { - type Parameters = (); - type Strategy = BoxedStrategy; - - fn arbitrary_with(_: Self::Parameters) -> Self::Strategy { - (any::(), any::()) - .prop_map(|(shell, path)| ShellProfile { shell, path }) - .boxed() - } -} - -impl Arbitrary for ProfileList { - type Parameters = (); - type Strategy = BoxedStrategy; - - fn arbitrary_with(_: Self::Parameters) -> Self::Strategy { - prop::collection::vec(ShellProfile::arbitrary(), 0..10) - .prop_map(ProfileList) - .boxed() - } -} - -test_msg!(ShellType, TESTS_USECASE_COUNT); -test_msg!(ShellProfile, TESTS_USECASE_COUNT); -test_msg!(ProfileList, TESTS_USECASE_COUNT); diff --git a/application/apps/indexer/stypes/src/command/proptest.rs b/application/apps/indexer/stypes/src/command/proptest.rs deleted file mode 100644 index c636c4450a..0000000000 --- a/application/apps/indexer/stypes/src/command/proptest.rs +++ /dev/null @@ -1,195 +0,0 @@ -use crate::*; - -impl Arbitrary for CommandOutcome { - /// Implements the `Arbitrary` trait for `CommandOutcome` to generate random instances - /// for property-based testing using the `proptest` framework. - /// - /// # Details - /// - Generates either: - /// - `CommandOutcome::Finished` with a random `String`. - /// - `CommandOutcome::Cancelled`. - type Parameters = (); - type Strategy = BoxedStrategy; - - fn arbitrary_with(_: Self::Parameters) -> Self::Strategy { - prop_oneof![ - any::().prop_map(CommandOutcome::Finished), - Just(CommandOutcome::Cancelled), - ] - .boxed() - } -} - -impl Arbitrary for CommandOutcome { - /// Implements the `Arbitrary` trait for `CommandOutcome` to generate random instances. - /// - /// # Details - /// - Generates either: - /// - `CommandOutcome::Finished` with a random `FoldersScanningResult`. - /// - `CommandOutcome::Cancelled`. - type Parameters = (); - type Strategy = BoxedStrategy; - - fn arbitrary_with(_: Self::Parameters) -> Self::Strategy { - prop_oneof![ - any::().prop_map(CommandOutcome::Finished), - Just(CommandOutcome::Cancelled), - ] - .boxed() - } -} - -impl Arbitrary for CommandOutcome { - /// Implements the `Arbitrary` trait for `CommandOutcome` to generate random instances. - /// - /// # Details - /// - Generates either: - /// - `CommandOutcome::Finished` with a random `SerialPortsList`. - /// - `CommandOutcome::Cancelled`. - type Parameters = (); - type Strategy = BoxedStrategy; - - fn arbitrary_with(_: Self::Parameters) -> Self::Strategy { - prop_oneof![ - any::().prop_map(CommandOutcome::Finished), - Just(CommandOutcome::Cancelled), - ] - .boxed() - } -} - -impl Arbitrary for CommandOutcome { - /// Implements the `Arbitrary` trait for `CommandOutcome` to generate random instances. - /// - /// # Details - /// - Generates either: - /// - `CommandOutcome::Finished` with a random `ProfileList`. - /// - `CommandOutcome::Cancelled`. - type Parameters = (); - type Strategy = BoxedStrategy; - - fn arbitrary_with(_: Self::Parameters) -> Self::Strategy { - prop_oneof![ - any::().prop_map(CommandOutcome::Finished), - Just(CommandOutcome::Cancelled), - ] - .boxed() - } -} - -impl Arbitrary for CommandOutcome { - /// Implements the `Arbitrary` trait for `CommandOutcome` to generate random instances. - /// - /// # Details - /// - Generates either: - /// - `CommandOutcome::Finished` with a random `DltStatisticInfo`. - /// - `CommandOutcome::Cancelled`. - type Parameters = (); - type Strategy = BoxedStrategy; - - fn arbitrary_with(_: Self::Parameters) -> Self::Strategy { - prop_oneof![ - any::().prop_map(CommandOutcome::Finished), - Just(CommandOutcome::Cancelled), - ] - .boxed() - } -} -impl Arbitrary for CommandOutcome<()> { - /// Implements the `Arbitrary` trait for `CommandOutcome<()>` to generate random instances. - /// - /// # Details - /// - Generates either: - /// - `CommandOutcome::Finished` with `()`. - /// - `CommandOutcome::Cancelled`. - type Parameters = (); - type Strategy = BoxedStrategy; - - fn arbitrary_with(_: Self::Parameters) -> Self::Strategy { - prop_oneof![ - Just(()).prop_map(CommandOutcome::Finished), - Just(CommandOutcome::Cancelled), - ] - .boxed() - } -} - -impl Arbitrary for CommandOutcome { - /// Implements the `Arbitrary` trait for `CommandOutcome` to generate random instances. - /// - /// # Details - /// - Generates either: - /// - `CommandOutcome::Finished` with a random `i64` value converted from `i32`. - /// - `CommandOutcome::Cancelled`. - type Parameters = (); - type Strategy = BoxedStrategy; - - fn arbitrary_with(_: Self::Parameters) -> Self::Strategy { - prop_oneof![ - any::().prop_map(|v| CommandOutcome::Finished(v as i64)), - Just(CommandOutcome::Cancelled), - ] - .boxed() - } -} - -impl Arbitrary for CommandOutcome> { - /// Implements the `Arbitrary` trait for `CommandOutcome>` to generate random instances. - /// - /// # Details - /// - Generates either: - /// - `CommandOutcome::Finished` with a random `Option`. - /// - `CommandOutcome::Cancelled`. - type Parameters = (); - type Strategy = BoxedStrategy; - - fn arbitrary_with(_: Self::Parameters) -> Self::Strategy { - prop_oneof![ - any::>().prop_map(CommandOutcome::Finished), - Just(CommandOutcome::Cancelled), - ] - .boxed() - } -} - -impl Arbitrary for CommandOutcome { - /// Implements the `Arbitrary` trait for `CommandOutcome` to generate random instances. - /// - /// # Details - /// - Generates either: - /// - `CommandOutcome::Finished` with a random `bool`. - /// - `CommandOutcome::Cancelled`. - type Parameters = (); - type Strategy = BoxedStrategy; - - fn arbitrary_with(_: Self::Parameters) -> Self::Strategy { - prop_oneof![ - any::().prop_map(CommandOutcome::Finished), - Just(CommandOutcome::Cancelled), - ] - .boxed() - } -} - -impl Arbitrary for CommandOutcome { - type Parameters = (); - type Strategy = BoxedStrategy; - - fn arbitrary_with(_: Self::Parameters) -> Self::Strategy { - prop_oneof![ - any::().prop_map(CommandOutcome::Finished), - Just(CommandOutcome::Cancelled), - ] - .boxed() - } -} - -test_msg!(CommandOutcome<()>, TESTS_USECASE_COUNT); -test_msg!(CommandOutcome, TESTS_USECASE_COUNT); -test_msg!(CommandOutcome>, TESTS_USECASE_COUNT); -test_msg!(CommandOutcome, TESTS_USECASE_COUNT); -test_msg!(CommandOutcome, TESTS_USECASE_COUNT); -test_msg!(CommandOutcome, TESTS_USECASE_COUNT); -test_msg!(CommandOutcome, TESTS_USECASE_COUNT); -test_msg!(CommandOutcome, TESTS_USECASE_COUNT); -test_msg!(CommandOutcome, TESTS_USECASE_COUNT); diff --git a/application/apps/indexer/stypes/src/command/serial/proptest.rs b/application/apps/indexer/stypes/src/command/serial/proptest.rs deleted file mode 100644 index 8183b7a917..0000000000 --- a/application/apps/indexer/stypes/src/command/serial/proptest.rs +++ /dev/null @@ -1,21 +0,0 @@ -use crate::*; - -impl Arbitrary for SerialPortsList { - /// Implements the `Arbitrary` trait for `SerialPortsList` to generate random instances - /// for property-based testing using the `proptest` framework. - /// - /// # Details - /// - Generates a vector of up to 10 random `String` values, where each string represents - /// the name or identifier of a serial port. - /// - Wraps the generated vector into a `SerialPortsList`. - type Parameters = (); - type Strategy = BoxedStrategy; - - fn arbitrary_with(_: Self::Parameters) -> Self::Strategy { - prop::collection::vec(any::(), 0..10) - .prop_map(SerialPortsList) - .boxed() - } -} - -test_msg!(SerialPortsList, TESTS_USECASE_COUNT); diff --git a/application/apps/indexer/stypes/src/command/ts.rs b/application/apps/indexer/stypes/src/command/ts.rs deleted file mode 100644 index cb57492931..0000000000 --- a/application/apps/indexer/stypes/src/command/ts.rs +++ /dev/null @@ -1,146 +0,0 @@ -use crate::*; - -/// Represents the result of a command execution. -/// At the core level, this type is used for all commands invoked within an `UnboundSession`. -/// It is only used to indicate the successful completion or interruption of a command. -#[derive(Clone, Serialize, Deserialize, Debug)] -#[cfg_attr( - all(test, feature = "test_and_gen"), - derive(TS), - ts(export, export_to = "command.ts") -)] -pub enum CommandOutcomeDltStatisticInfoResult { - /// Indicates that the command was successfully completed. - Finished(DltStatisticInfo), - /// Indicates that the command execution was interrupted. - Cancelled, -} - -/// Represents the result of a command execution. -/// At the core level, this type is used for all commands invoked within an `UnboundSession`. -/// It is only used to indicate the successful completion or interruption of a command. -#[derive(Clone, Serialize, Deserialize, Debug)] -#[cfg_attr( - all(test, feature = "test_and_gen"), - derive(TS), - ts(export, export_to = "command.ts") -)] -pub enum CommandOutcomeProfilesResult { - /// Indicates that the command was successfully completed. - Finished(ProfileList), - /// Indicates that the command execution was interrupted. - Cancelled, -} - -/// Represents the result of a command execution. -/// At the core level, this type is used for all commands invoked within an `UnboundSession`. -/// It is only used to indicate the successful completion or interruption of a command. -#[derive(Clone, Serialize, Deserialize, Debug)] -#[cfg_attr( - all(test, feature = "test_and_gen"), - derive(TS), - ts(export, export_to = "command.ts") -)] -pub enum CommandOutcomeFoldersScanningResult { - /// Indicates that the command was successfully completed. - Finished(FoldersScanningResult), - /// Indicates that the command execution was interrupted. - Cancelled, -} - -/// Represents the result of a command execution. -/// At the core level, this type is used for all commands invoked within an `UnboundSession`. -/// It is only used to indicate the successful completion or interruption of a command. -#[derive(Clone, Serialize, Deserialize, Debug)] -#[cfg_attr( - all(test, feature = "test_and_gen"), - derive(TS), - ts(export, export_to = "command.ts") -)] -pub enum CommandOutcomeSerialPortsList { - /// Indicates that the command was successfully completed. - Finished(SerialPortsList), - /// Indicates that the command execution was interrupted. - Cancelled, -} - -/// Represents the result of a command execution. -/// At the core level, this type is used for all commands invoked within an `UnboundSession`. -/// It is only used to indicate the successful completion or interruption of a command. -#[derive(Clone, Serialize, Deserialize, Debug)] -#[cfg_attr( - all(test, feature = "test_and_gen"), - derive(TS), - ts(export, export_to = "command.ts") -)] -pub enum CommandOutcomeVoid { - /// Indicates that the command was successfully completed. - Finished, - /// Indicates that the command execution was interrupted. - Cancelled, -} - -/// Represents the result of a command execution. -/// At the core level, this type is used for all commands invoked within an `UnboundSession`. -/// It is only used to indicate the successful completion or interruption of a command. -#[derive(Clone, Serialize, Deserialize, Debug)] -#[cfg_attr( - all(test, feature = "test_and_gen"), - derive(TS), - ts(export, export_to = "command.ts") -)] -pub enum CommandOutcomei64 { - /// Indicates that the command was successfully completed. - #[cfg_attr(all(test, feature = "test_and_gen"), ts(type = "number"))] - Finished(i64), - /// Indicates that the command execution was interrupted. - Cancelled, -} - -/// Represents the result of a command execution. -/// At the core level, this type is used for all commands invoked within an `UnboundSession`. -/// It is only used to indicate the successful completion or interruption of a command. -#[derive(Clone, Serialize, Deserialize, Debug)] -#[cfg_attr( - all(test, feature = "test_and_gen"), - derive(TS), - ts(export, export_to = "command.ts") -)] -pub enum CommandOutcomeOptionalString { - /// Indicates that the command was successfully completed. - Finished(Option), - /// Indicates that the command execution was interrupted. - Cancelled, -} - -/// Represents the result of a command execution. -/// At the core level, this type is used for all commands invoked within an `UnboundSession`. -/// It is only used to indicate the successful completion or interruption of a command. -#[derive(Clone, Serialize, Deserialize, Debug)] -#[cfg_attr( - all(test, feature = "test_and_gen"), - derive(TS), - ts(export, export_to = "command.ts") -)] -pub enum CommandOutcomeString { - /// Indicates that the command was successfully completed. - Finished(String), - /// Indicates that the command execution was interrupted. - Cancelled, -} - -/// Represents the result of a command execution. -/// At the core level, this type is used for all commands invoked within an `UnboundSession`. -/// It is only used to indicate the successful completion or interruption of a command. -#[derive(Clone, Serialize, Deserialize, Debug)] -#[cfg_attr( - all(test, feature = "test_and_gen"), - derive(TS), - ts(export, export_to = "command.ts") -)] -pub enum CommandOutcomeBool { - /// Indicates that the command was successfully completed. - Finished(bool), - /// Indicates that the command execution was interrupted. - Cancelled, -} diff --git a/application/apps/indexer/stypes/src/error/nodejs.rs b/application/apps/indexer/stypes/src/error/nodejs.rs deleted file mode 100644 index 75dd572ab8..0000000000 --- a/application/apps/indexer/stypes/src/error/nodejs.rs +++ /dev/null @@ -1,6 +0,0 @@ -use crate::*; - -try_into_js!(Severity); -try_into_js!(NativeErrorKind); -try_into_js!(NativeError); -try_into_js!(ComputationError); diff --git a/application/apps/indexer/stypes/src/error/proptest.rs b/application/apps/indexer/stypes/src/error/proptest.rs deleted file mode 100644 index aef7315841..0000000000 --- a/application/apps/indexer/stypes/src/error/proptest.rs +++ /dev/null @@ -1,128 +0,0 @@ -use crate::*; -// Arbitrary implementations for Severity, NativeErrorKind, NativeError, and ComputationError. - -impl Arbitrary for Severity { - /// Implements the `Arbitrary` trait for `Severity` to generate random values - /// for property-based testing using the `proptest` framework. - /// - /// # Details - /// - Generates random variants of `Severity`: - /// - `Severity::WARNING` - /// - `Severity::ERROR` - type Parameters = (); - - type Strategy = BoxedStrategy; - - fn arbitrary_with(_: Self::Parameters) -> Self::Strategy { - prop_oneof![Just(Severity::WARNING), Just(Severity::ERROR)].boxed() - } -} - -impl Arbitrary for NativeErrorKind { - /// Implements the `Arbitrary` trait for `NativeErrorKind` to generate random values - /// for property-based testing using the `proptest` framework. - /// - /// # Details - /// - Generates random variants of `NativeErrorKind`, including: - /// - `FileNotFound` - /// - `UnsupportedFileType` - /// - `ComputationFailed` - /// - `Configuration` - /// - `Interrupted` - /// - `OperationSearch` - /// - `NotYetImplemented` - /// - `ChannelError` - /// - `Io` - /// - `Grabber` - /// - `Plugins` - type Parameters = (); - - type Strategy = BoxedStrategy; - - fn arbitrary_with(_: Self::Parameters) -> Self::Strategy { - prop_oneof![ - Just(NativeErrorKind::FileNotFound), - Just(NativeErrorKind::UnsupportedFileType), - Just(NativeErrorKind::ComputationFailed), - Just(NativeErrorKind::Configuration), - Just(NativeErrorKind::Interrupted), - Just(NativeErrorKind::OperationSearch), - Just(NativeErrorKind::NotYetImplemented), - Just(NativeErrorKind::ChannelError), - Just(NativeErrorKind::Io), - Just(NativeErrorKind::Grabber), - Just(NativeErrorKind::Plugins) - ] - .boxed() - } -} - -impl Arbitrary for NativeError { - /// Implements the `Arbitrary` trait for `NativeError` to generate random values - /// for property-based testing using the `proptest` framework. - /// - /// # Details - /// - Generates: - /// - A random `Severity` value. - /// - A random `NativeErrorKind` value. - /// - An optional random `String` for the message. - type Parameters = (); - - type Strategy = BoxedStrategy; - - fn arbitrary_with(_: Self::Parameters) -> Self::Strategy { - ( - Severity::arbitrary().boxed(), - NativeErrorKind::arbitrary().boxed(), - prop::option::of(any::()), - ) - .prop_map(|(severity, kind, message)| NativeError { - severity, - kind, - message, - }) - .boxed() - } -} - -impl Arbitrary for ComputationError { - /// Implements the `Arbitrary` trait for `ComputationError` to generate random values - /// for property-based testing using the `proptest` framework. - /// - /// # Details - /// - Generates random variants of `ComputationError`, including: - /// - Fixed errors such as `DestinationPath`, `SessionCreatingFail`, etc. - /// - Errors with random `String` values for fields like `Communication`, `IoOperation`, etc. - /// - Nested errors, such as `NativeError`. - type Parameters = (); - - type Strategy = BoxedStrategy; - - fn arbitrary_with(_: Self::Parameters) -> Self::Strategy { - prop_oneof![ - Just(ComputationError::DestinationPath), - Just(ComputationError::SessionCreatingFail), - any::().prop_map(ComputationError::Communication), - any::().prop_map(ComputationError::OperationNotSupported), - any::().prop_map(ComputationError::IoOperation), - Just(ComputationError::InvalidData), - any::().prop_map(ComputationError::InvalidArgs), - any::().prop_map(ComputationError::Process), - any::().prop_map(ComputationError::Protocol), - any::().prop_map(ComputationError::SearchError), - Just(ComputationError::MultipleInitCall), - Just(ComputationError::SessionUnavailable), - NativeError::arbitrary().prop_map(ComputationError::NativeError), - any::().prop_map(ComputationError::Grabbing), - any::().prop_map(ComputationError::Sde), - any::().prop_map(ComputationError::Decoding), - any::().prop_map(ComputationError::Encoding), - ] - .boxed() - } -} - -test_msg!(Severity, TESTS_USECASE_COUNT); -test_msg!(NativeErrorKind, TESTS_USECASE_COUNT); -test_msg!(NativeError, TESTS_USECASE_COUNT); -test_msg!(ComputationError, TESTS_USECASE_COUNT); diff --git a/application/apps/indexer/stypes/src/lf_transition/nodejs.rs b/application/apps/indexer/stypes/src/lf_transition/nodejs.rs deleted file mode 100644 index f837b321e8..0000000000 --- a/application/apps/indexer/stypes/src/lf_transition/nodejs.rs +++ /dev/null @@ -1,3 +0,0 @@ -use crate::*; - -try_into_js!(LifecycleTransition); diff --git a/application/apps/indexer/stypes/src/lf_transition/proptest.rs b/application/apps/indexer/stypes/src/lf_transition/proptest.rs deleted file mode 100644 index e58797c3c0..0000000000 --- a/application/apps/indexer/stypes/src/lf_transition/proptest.rs +++ /dev/null @@ -1,28 +0,0 @@ -use crate::*; -use uuid::Uuid; - -impl Arbitrary for LifecycleTransition { - /// Implements the `Arbitrary` trait for `LifecycleTransition` to generate random values - /// for property-based testing using the `proptest` framework. - /// - /// # Details - /// - Randomly generates one of the `LifecycleTransition` variants: - /// - `Started`: Generates a random `Uuid` and a random alias (`String`). - /// - `Ticks`: Generates a random `Uuid` and a random `Ticks` value. - /// - `Stopped`: Generates a random `Uuid`. - type Parameters = (); - type Strategy = BoxedStrategy; - - fn arbitrary_with(_: Self::Parameters) -> Self::Strategy { - prop_oneof![ - (Just(Uuid::new_v4()), any::()) - .prop_map(|(uuid, alias)| LifecycleTransition::Started { uuid, alias }), - (Just(Uuid::new_v4()), any::()) - .prop_map(|(uuid, ticks)| LifecycleTransition::Ticks { uuid, ticks }), - Just(Uuid::new_v4()).prop_map(LifecycleTransition::Stopped), - ] - .boxed() - } -} - -test_msg!(LifecycleTransition, TESTS_USECASE_COUNT); diff --git a/application/apps/indexer/stypes/src/lib.rs b/application/apps/indexer/stypes/src/lib.rs deleted file mode 100644 index eec6a7fd06..0000000000 --- a/application/apps/indexer/stypes/src/lib.rs +++ /dev/null @@ -1,137 +0,0 @@ -/// The `stypes` crate provides data types used at the `rustcore` level and passed to clients. -/// While the `stypes` crate does not impose restrictions on the client type, some features are -/// specifically defined to support certain types of clients. This does not mean that `stypes` cannot -/// be used with other client types. -/// -/// ## Features -/// - `nodejs`: Includes the implementation of the `TryIntoJs` trait, required for transferring data -/// into the Node.js context when using the `node_bindgen` crate. -/// - `rustcore`: Includes additional utilities and extensions for using `stypes` within the -/// `indexer` crate group. -/// -/// ## Proptest Integration -/// The crate includes tests based on `proptest`. These tests not only validate the crate itself -/// but also generate binary files containing variations of each message in a predefined directory. -/// These files can later be used to test encoding/decoding on the client side. -/// -/// The `test_msg` macro is used to generate tests for specific data types. For example: -/// -/// ```ignore -/// test_msg!(ObserveOptions, 100); -/// ``` -/// -/// The above code generates 100 variations of `ObserveOptions`. During tests, the generated data -/// is saved to files in the specified path. To set the output path, use the `CHIPMUNK_PROTOCOL_TEST_OUTPUT` -/// environment variable: -/// -/// ```ignore -/// export CHIPMUNK_PROTOCOL_TEST_OUTPUT="/tmp/test_data" -/// cargo test --release -- --nocapture -/// ``` -/// -/// If `CHIPMUNK_PROTOCOL_TEST_OUTPUT` is not set, the default path `$TMP/stypes_test` will be used. -/// It is recommended to run tests with the `--release` flag to speed up random variation generation, -/// as the process is significantly slower in debug mode. -/// -/// Each data type will have its own directory, and each variation will be stored in files with -/// sequential names (`1.bin`, `2.bin`, etc.). -/// -/// ## WARNING -/// When tests are run, the folder specified in `CHIPMUNK_PROTOCOL_TEST_OUTPUT` is completely deleted. -/// Be extremely cautious when setting the value of this environment variable. -/// -/// ## Limitations -/// The current version of `stypes` uses `bincode` for encoding and decoding types. `bincode` requires -/// both serialization and deserialization implementations. However, using custom `serde` attributes -/// may lead to protocol instability, especially during decoding. For instance, the attribute -/// `#[serde(tag = "type", content = "value")]` makes decoding messages with these settings impossible. -/// Unfortunately, `bincode` does not raise compile-time or serialization-time errors, but only fails -/// during decoding. Therefore, it is strongly recommended to test encoding/decoding when using additional -/// attributes on types. -/// -/// ## Implementation of `encode` and `decode` Methods -/// The `encode` and `decode` methods are added to each declared data type using the `encode_decode` -/// macro from the `extend` crate. This macro implements encoding and decoding for the data type -/// using `bincode`. -/// -/// For example, the following code: -/// -/// ```ignore -/// #[derive(Debug, Serialize, Deserialize, Clone)] -/// #[extend::encode_decode] -/// pub struct Notification { -/// pub severity: Severity, -/// pub content: String, -/// pub line: Option, -/// } -/// ``` -/// -/// Is transformed into: -/// -/// ```ignore -/// #[derive(Debug, Serialize, Deserialize, Clone)] -/// pub struct Notification { -/// pub severity: Severity, -/// pub content: String, -/// pub line: Option, -/// } -/// -/// impl Notification { -/// pub fn encode(&self) -> Result, String> { -/// bincode::serialize(self).map_err(|e| e.to_string()) -/// } -/// -/// pub fn decode(buf: &[u8]) -> Result { -/// bincode::deserialize(buf).map_err(|e| e.to_string()) -/// } -/// } -/// ``` -#[cfg(test)] -mod tests; - -#[cfg(feature = "nodejs")] -mod nodejs; - -mod attachment; -mod callback; -mod command; -mod error; -mod lf_transition; -mod miscellaneous; -mod observe; -mod operations; -mod plugins; -mod progress; - -pub use attachment::*; -pub use callback::*; -pub use command::*; -pub use error::*; -pub use lf_transition::*; -pub use miscellaneous::*; -pub use observe::*; -pub use operations::*; -pub use plugins::*; -pub use progress::*; - -pub(crate) use serde::{Deserialize, Serialize, de::DeserializeOwned}; -pub(crate) use std::{collections::HashMap, path::PathBuf}; -#[cfg(all(test, feature = "test_and_gen"))] -pub(crate) use ts_rs::TS; -pub(crate) use uuid::Uuid; - -#[cfg(feature = "nodejs")] -pub(crate) use node_bindgen::{ - core::{NjError, TryIntoJs, safebuffer::SafeArrayBuffer, val::JsEnv}, - sys::napi_value, -}; - -#[cfg(test)] -pub(crate) use proptest::prelude::*; -#[cfg(all(test, feature = "test_and_gen"))] -pub(crate) use tests::*; - -#[cfg(feature = "rustcore")] -pub fn serialize(v: &T) -> Result, bincode::Error> { - bincode::serialize(v) -} diff --git a/application/apps/indexer/stypes/src/miscellaneous/nodejs.rs b/application/apps/indexer/stypes/src/miscellaneous/nodejs.rs deleted file mode 100644 index e11995a2ef..0000000000 --- a/application/apps/indexer/stypes/src/miscellaneous/nodejs.rs +++ /dev/null @@ -1,12 +0,0 @@ -use crate::*; - -try_into_js!(GrabbedElement); -try_into_js!(GrabbedElementList); -try_into_js!(Ranges); -try_into_js!(SourceDefinition); -try_into_js!(Sources); -try_into_js!(SdeRequest); -try_into_js!(SdeResponse); -try_into_js!(AroundIndexes); -try_into_js!(FilterMatch); -try_into_js!(FilterMatchList); diff --git a/application/apps/indexer/stypes/src/miscellaneous/proptest.rs b/application/apps/indexer/stypes/src/miscellaneous/proptest.rs deleted file mode 100644 index e9b901fc1a..0000000000 --- a/application/apps/indexer/stypes/src/miscellaneous/proptest.rs +++ /dev/null @@ -1,202 +0,0 @@ -use crate::*; - -impl Arbitrary for Range { - /// Implements the `Arbitrary` trait for `Ranges` to generate random values for - /// property-based testing using the `proptest` framework. - /// - /// # Details - /// - Generates a vector of random `RangeInclusive` instances, with up to 10 ranges. - type Parameters = (); - type Strategy = BoxedStrategy; - - fn arbitrary_with(_: Self::Parameters) -> Self::Strategy { - (any::(), any::()) - .prop_map(|(start, end)| Range { - start: start as u64, - end: end as u64, - }) - .boxed() - } -} - -impl Arbitrary for Ranges { - /// Implements the `Arbitrary` trait for `Ranges` to generate random values for - /// property-based testing using the `proptest` framework. - /// - /// # Details - /// - Generates a vector of random `RangeInclusive` instances, with up to 10 ranges. - type Parameters = (); - type Strategy = BoxedStrategy; - - fn arbitrary_with(_: Self::Parameters) -> Self::Strategy { - prop::collection::vec(Range::arbitrary(), 0..10) - .prop_map(Ranges) - .boxed() - } -} - -impl Arbitrary for SourceDefinition { - /// Implements the `Arbitrary` trait for `SourceDefinition` to generate random instances. - /// - /// # Details - /// - Generates random `id` (`u16`) and `alias` (`String`) values. - type Parameters = (); - type Strategy = BoxedStrategy; - - fn arbitrary_with(_: Self::Parameters) -> Self::Strategy { - (any::(), any::()) - .prop_map(|(id, alias)| SourceDefinition { id, alias }) - .boxed() - } -} - -impl Arbitrary for Sources { - /// Implements the `Arbitrary` trait for `Sources` to generate random instances. - /// - /// # Details - /// - Generates a vector of up to 10 random `SourceDefinition` instances. - type Parameters = (); - type Strategy = BoxedStrategy; - - fn arbitrary_with(_: Self::Parameters) -> Self::Strategy { - prop::collection::vec(any::(), 0..10) - .prop_map(Sources) - .boxed() - } -} - -impl Arbitrary for SdeRequest { - /// Implements the `Arbitrary` trait for `SdeRequest` to generate random instances. - /// - /// # Details - /// - Generates either: - /// - `WriteText` with a random `String`. - /// - `WriteBytes` with a random vector of `u8` values (up to 100 bytes). - type Parameters = (); - type Strategy = BoxedStrategy; - - fn arbitrary_with(_: Self::Parameters) -> Self::Strategy { - prop_oneof![ - any::().prop_map(SdeRequest::WriteText), - prop::collection::vec(any::(), 0..100).prop_map(SdeRequest::WriteBytes), - ] - .boxed() - } -} - -impl Arbitrary for SdeResponse { - /// Implements the `Arbitrary` trait for `SdeResponse` to generate random instances. - /// - /// # Details - /// - Generates a random `u32` for the `bytes` field. - type Parameters = (); - type Strategy = BoxedStrategy; - - fn arbitrary_with(_: Self::Parameters) -> Self::Strategy { - any::() - .prop_map(|n| n as usize) - .prop_map(|bytes| SdeResponse { bytes }) - .boxed() - } -} - -impl Arbitrary for GrabbedElement { - /// Implements the `Arbitrary` trait for `GrabbedElement` to generate random instances. - /// - /// # Details - /// - Generates: - /// - A random `source_id` (`u16`). - /// - A random `content` (`String`). - /// - A random `pos` (`usize`). - /// - A random `nature` (`u8`). - type Parameters = (); - type Strategy = BoxedStrategy; - - fn arbitrary_with(_: Self::Parameters) -> Self::Strategy { - (any::(), any::(), any::(), any::()) - .prop_map(|(source_id, content, pos, nature)| GrabbedElement { - source_id, - content, - pos: pos as usize, - nature, - }) - .boxed() - } -} - -impl Arbitrary for GrabbedElementList { - /// Implements the `Arbitrary` trait for `GrabbedElementList` to generate random instances. - /// - /// # Details - /// - Generates a vector of up to 10 random `GrabbedElement` instances. - type Parameters = (); - type Strategy = BoxedStrategy; - - fn arbitrary_with(_: Self::Parameters) -> Self::Strategy { - prop::collection::vec(any::(), 0..10) - .prop_map(GrabbedElementList) - .boxed() - } -} - -impl Arbitrary for AroundIndexes { - /// Implements the `Arbitrary` trait for `AroundIndexes` to generate random instances. - /// - /// # Details - /// - Generates a tuple of two optional `u32` values, mapped to `u64`. - type Parameters = (); - type Strategy = BoxedStrategy; - - fn arbitrary_with(_: Self::Parameters) -> Self::Strategy { - (any::>(), any::>()) - .prop_map(|(start, end)| { - AroundIndexes((start.map(|n| n as u64), end.map(|n| n as u64))) - }) - .boxed() - } -} - -impl Arbitrary for FilterMatch { - /// Implements the `Arbitrary` trait for `FilterMatch` to generate random instances. - /// - /// # Details - /// - Generates: - /// - A random `index` (`u64`). - /// - A random vector of `u8` filter IDs (up to 10 filters). - type Parameters = (); - type Strategy = BoxedStrategy; - - fn arbitrary_with(_: Self::Parameters) -> Self::Strategy { - (any::(), prop::collection::vec(any::(), 0..10)) - .prop_map(|(index, filters)| FilterMatch { - index: index as u64, - filters, - }) - .boxed() - } -} - -impl Arbitrary for FilterMatchList { - /// Implements the `Arbitrary` trait for `FilterMatchList` to generate random instances. - /// - /// # Details - /// - Generates a vector of up to 10 random `FilterMatch` instances. - type Parameters = (); - type Strategy = BoxedStrategy; - - fn arbitrary_with(_: Self::Parameters) -> Self::Strategy { - prop::collection::vec(any::(), 0..10) - .prop_map(FilterMatchList) - .boxed() - } -} - -test_msg!(SourceDefinition, TESTS_USECASE_COUNT); -test_msg!(Sources, TESTS_USECASE_COUNT); -test_msg!(SdeRequest, TESTS_USECASE_COUNT); -test_msg!(SdeResponse, TESTS_USECASE_COUNT); -test_msg!(GrabbedElement, TESTS_USECASE_COUNT); -test_msg!(GrabbedElementList, TESTS_USECASE_COUNT); -test_msg!(AroundIndexes, TESTS_USECASE_COUNT); -test_msg!(FilterMatch, TESTS_USECASE_COUNT); -test_msg!(FilterMatchList, TESTS_USECASE_COUNT); diff --git a/application/apps/indexer/stypes/src/nodejs.rs b/application/apps/indexer/stypes/src/nodejs.rs deleted file mode 100644 index 40161b76f9..0000000000 --- a/application/apps/indexer/stypes/src/nodejs.rs +++ /dev/null @@ -1,25 +0,0 @@ -/// This macro is used with the `feature=nodejs`. It allows adding an implementation of the `TryIntoJs` trait, -/// enabling seamless data conversion for use in a Node.js context when using the `node_bindgen` crate. -/// -/// It's important to note that data can still be passed without implementing this trait; however, its use -/// significantly simplifies the code and improves readability by allowing explicit type annotations in function outputs. -/// -/// Example code from a trait using `node_bindgen`: -/// ```ignore -/// // OutputType implements TryIntoJs -/// pub fn public_api_call() -> Result { ... } -/// -/// // OutputType doesn't implement TryIntoJs -/// pub fn public_api_call() -> Result { ... } -/// ``` -#[macro_export] -macro_rules! try_into_js { - ($($t:tt)+) => { - impl TryIntoJs for $($t)+ { - fn try_to_js(self, js_env: &JsEnv) -> Result { - SafeArrayBuffer::new(self.encode().map_err(NjError::Other)?) - .try_to_js(js_env) - } - } - }; -} diff --git a/application/apps/indexer/stypes/src/observe/nodejs.rs b/application/apps/indexer/stypes/src/observe/nodejs.rs deleted file mode 100644 index b79f2bd9d4..0000000000 --- a/application/apps/indexer/stypes/src/observe/nodejs.rs +++ /dev/null @@ -1,14 +0,0 @@ -use crate::*; - -try_into_js!(MulticastInfo); -try_into_js!(ParserType); -try_into_js!(DltParserSettings); -try_into_js!(SomeIpParserSettings); -try_into_js!(Transport); -try_into_js!(ProcessTransportConfig); -try_into_js!(SerialTransportConfig); -try_into_js!(TCPTransportConfig); -try_into_js!(UDPTransportConfig); -try_into_js!(FileFormat); -try_into_js!(ObserveOrigin); -try_into_js!(ObserveOptions); diff --git a/application/apps/indexer/stypes/src/observe/proptest.rs b/application/apps/indexer/stypes/src/observe/proptest.rs deleted file mode 100644 index cdaff3fa20..0000000000 --- a/application/apps/indexer/stypes/src/observe/proptest.rs +++ /dev/null @@ -1,284 +0,0 @@ -use crate::*; -use dlt_core::filtering::DltFilterConfig; - -impl Arbitrary for MulticastInfo { - type Parameters = (); - type Strategy = BoxedStrategy; - - fn arbitrary_with(_: Self::Parameters) -> Self::Strategy { - (any::(), any::>()) - .prop_map(|(multiaddr, interface)| MulticastInfo { - multiaddr, - interface, - }) - .boxed() - } -} - -impl Arbitrary for UdpConnectionInfo { - type Parameters = (); - type Strategy = BoxedStrategy; - - fn arbitrary_with(_: Self::Parameters) -> Self::Strategy { - prop::collection::vec(any::(), 0..10) - .prop_map(|multicast_addr| UdpConnectionInfo { multicast_addr }) - .boxed() - } -} - -impl Arbitrary for ParserType { - type Parameters = (); - type Strategy = BoxedStrategy; - - fn arbitrary_with(_: Self::Parameters) -> Self::Strategy { - prop_oneof![ - any::().prop_map(ParserType::Dlt), - any::().prop_map(ParserType::SomeIp), - Just(ParserType::Text(())), - any::().prop_map(ParserType::Plugin) - ] - .boxed() - } -} - -#[derive(Debug)] -struct DltFilterConfigWrapper(pub DltFilterConfig); - -impl Arbitrary for DltFilterConfigWrapper { - type Parameters = (); - type Strategy = BoxedStrategy; - - fn arbitrary_with(_: Self::Parameters) -> Self::Strategy { - ( - any::>(), - any::>>(), - any::>>(), - any::>>(), - any::(), - any::(), - ) - .prop_map( - |(min_log_level, app_ids, ecu_ids, context_ids, app_id_count, context_id_count)| { - DltFilterConfigWrapper(DltFilterConfig { - min_log_level, - app_ids, - ecu_ids, - context_ids, - app_id_count: app_id_count as i64, - context_id_count: context_id_count as i64, - }) - }, - ) - .boxed() - } -} - -impl Arbitrary for DltParserSettings { - type Parameters = (); - type Strategy = BoxedStrategy; - - fn arbitrary_with(_: Self::Parameters) -> Self::Strategy { - ( - any::>().prop_map(|wrp| wrp.map(|wrp| wrp.0)), - any::>>(), - any::(), - any::>(), - Just(None), // fibex_metadata is skipped - ) - .prop_map( - |(filter_config, fibex_file_paths, with_storage_header, tz, fibex_metadata)| { - DltParserSettings { - filter_config, - fibex_file_paths, - with_storage_header, - tz, - fibex_metadata, - } - }, - ) - .boxed() - } -} - -impl Arbitrary for SomeIpParserSettings { - type Parameters = (); - type Strategy = BoxedStrategy; - - fn arbitrary_with(_: Self::Parameters) -> Self::Strategy { - any::>>() - .prop_map(|fibex_file_paths| SomeIpParserSettings { fibex_file_paths }) - .boxed() - } -} - -impl Arbitrary for Transport { - type Parameters = (); - type Strategy = BoxedStrategy; - - fn arbitrary_with(_: Self::Parameters) -> Self::Strategy { - prop_oneof![ - any::().prop_map(Transport::Process), - any::().prop_map(Transport::TCP), - any::().prop_map(Transport::UDP), - any::().prop_map(Transport::Serial), - ] - .boxed() - } -} - -impl Arbitrary for ProcessTransportConfig { - type Parameters = (); - type Strategy = BoxedStrategy; - - fn arbitrary_with(_: Self::Parameters) -> Self::Strategy { - ( - any::(), - any::(), - any::>(), - ) - .prop_map(|(cwd, command, shell)| ProcessTransportConfig { - cwd, - command, - shell, - }) - .boxed() - } -} - -impl Arbitrary for SerialTransportConfig { - type Parameters = (); - type Strategy = BoxedStrategy; - - fn arbitrary_with(_: Self::Parameters) -> Self::Strategy { - ( - any::(), - any::(), - any::(), - any::(), - any::(), - any::(), - any::(), - any::(), - ) - .prop_map( - |( - path, - baud_rate, - data_bits, - flow_control, - parity, - stop_bits, - send_data_delay, - exclusive, - )| { - SerialTransportConfig { - path, - baud_rate, - data_bits, - flow_control, - parity, - stop_bits, - send_data_delay, - exclusive, - } - }, - ) - .boxed() - } -} - -impl Arbitrary for TCPTransportConfig { - type Parameters = (); - type Strategy = BoxedStrategy; - - fn arbitrary_with(_: Self::Parameters) -> Self::Strategy { - any::() - .prop_map(|bind_addr| TCPTransportConfig { bind_addr }) - .boxed() - } -} - -impl Arbitrary for UDPTransportConfig { - type Parameters = (); - type Strategy = BoxedStrategy; - - fn arbitrary_with(_: Self::Parameters) -> Self::Strategy { - ( - any::(), - prop::collection::vec(any::(), 0..10), - ) - .prop_map(|(bind_addr, multicast)| UDPTransportConfig { - bind_addr, - multicast, - }) - .boxed() - } -} - -impl Arbitrary for FileFormat { - type Parameters = (); - type Strategy = BoxedStrategy; - - fn arbitrary_with(_: Self::Parameters) -> Self::Strategy { - // Reminder to extend tests here when new items are added. - match FileFormat::Text { - FileFormat::PcapNG => {} - FileFormat::PcapLegacy => {} - FileFormat::Text => {} - FileFormat::Binary => {} - }; - - prop_oneof![ - Just(FileFormat::PcapNG), - Just(FileFormat::PcapLegacy), - Just(FileFormat::Text), - Just(FileFormat::Binary), - ] - .boxed() - } -} - -impl Arbitrary for ObserveOrigin { - type Parameters = (); - type Strategy = BoxedStrategy; - - fn arbitrary_with(_: Self::Parameters) -> Self::Strategy { - prop_oneof![ - (any::(), any::(), any::(),) - .prop_map(|(filename, format, path)| ObserveOrigin::File(filename, format, path)), - prop::collection::vec( - (any::(), any::(), any::(),), - 0..10, - ) - .prop_map(ObserveOrigin::Concat), - (any::(), any::(),) - .prop_map(|(stream, transport)| ObserveOrigin::Stream(stream, transport)), - ] - .boxed() - } -} - -impl Arbitrary for ObserveOptions { - type Parameters = (); - type Strategy = BoxedStrategy; - - fn arbitrary_with(_: Self::Parameters) -> Self::Strategy { - (any::(), any::()) - .prop_map(|(origin, parser)| ObserveOptions { origin, parser }) - .boxed() - } -} - -test_msg!(ObserveOptions, TESTS_USECASE_COUNT); -test_msg!(ObserveOrigin, TESTS_USECASE_COUNT); -test_msg!(FileFormat, TESTS_USECASE_COUNT); -test_msg!(UDPTransportConfig, TESTS_USECASE_COUNT); -test_msg!(TCPTransportConfig, TESTS_USECASE_COUNT); -test_msg!(SerialTransportConfig, TESTS_USECASE_COUNT); -test_msg!(ProcessTransportConfig, TESTS_USECASE_COUNT); -test_msg!(Transport, TESTS_USECASE_COUNT); -test_msg!(SomeIpParserSettings, TESTS_USECASE_COUNT); -test_msg!(DltParserSettings, TESTS_USECASE_COUNT); -test_msg!(ParserType, TESTS_USECASE_COUNT); -test_msg!(UdpConnectionInfo, TESTS_USECASE_COUNT); -test_msg!(MulticastInfo, TESTS_USECASE_COUNT); diff --git a/application/apps/indexer/stypes/src/operations/mod.rs b/application/apps/indexer/stypes/src/operations/mod.rs deleted file mode 100644 index 03c8e26b89..0000000000 --- a/application/apps/indexer/stypes/src/operations/mod.rs +++ /dev/null @@ -1,126 +0,0 @@ -#[cfg(feature = "nodejs")] -mod nodejs; -#[cfg(test)] -mod proptest; - -use crate::*; - -#[derive(Debug, Clone, Serialize, Deserialize)] -#[extend::encode_decode] -#[cfg_attr( - all(test, feature = "test_and_gen"), - derive(TS), - ts(export, export_to = "operations.ts") -)] -pub struct NearestPosition { - #[cfg_attr(all(test, feature = "test_and_gen"), ts(type = "number"))] - pub index: u64, // Position in search results - #[cfg_attr(all(test, feature = "test_and_gen"), ts(type = "number"))] - pub position: u64, // Position in original stream/file -} - -#[derive(Debug, Clone, Serialize, Deserialize)] -#[extend::encode_decode] -#[cfg_attr( - all(test, feature = "test_and_gen"), - derive(TS), - ts(export, export_to = "operations.ts") -)] -pub struct ResultNearestPosition(pub Option); - -///(row_number, min_value_in_range, max_value_in_range, value) -/// value - can be last value in range or some kind of average -#[derive(Debug, Clone, Serialize, Deserialize)] -#[extend::encode_decode] -#[cfg_attr( - all(test, feature = "test_and_gen"), - derive(TS), - ts(export, export_to = "operations.ts") -)] -pub struct Point { - #[cfg_attr(all(test, feature = "test_and_gen"), ts(type = "number"))] - pub row: u64, - pub min: f64, - pub max: f64, - pub y_value: f64, -} - -#[derive(Debug, Clone, Serialize, Deserialize)] -#[extend::encode_decode] -#[cfg_attr( - all(test, feature = "test_and_gen"), - derive(TS), - ts(export, export_to = "operations.ts") -)] -#[cfg_attr(all(test, feature = "test_and_gen"), ts(type = "Map"))] -pub struct ResultSearchValues(pub HashMap>); - -/// Scaled chart data -#[derive(Debug, Clone, Serialize, Deserialize)] -#[extend::encode_decode] -#[cfg_attr( - all(test, feature = "test_and_gen"), - derive(TS), - ts(export, export_to = "operations.ts") -)] -pub struct ResultScaledDistribution(pub Vec>); - -/// Used to delivery results of extracting values. That's used in the scope -/// of chart feature -#[derive(Debug, Clone, Serialize, Deserialize)] -#[extend::encode_decode] -#[cfg_attr( - all(test, feature = "test_and_gen"), - derive(TS), - ts(export, export_to = "operations.ts") -)] -pub struct ExtractedMatchValue { - /// The index of log entry (row number) - #[cfg_attr(all(test, feature = "test_and_gen"), ts(type = "number"))] - pub index: u64, - /// List of matches: - /// `usize` - index of filter - /// `Vec` - list of extracted values - pub values: Vec<(usize, Vec)>, -} - -/// The list of `ExtractedMatchValue` -#[derive(Debug, Clone, Serialize, Deserialize)] -#[extend::encode_decode] -#[cfg_attr( - all(test, feature = "test_and_gen"), - derive(TS), - ts(export, export_to = "operations.ts") -)] -pub struct ResultExtractedMatchValues(pub Vec); - -#[derive(Debug, Clone, Serialize, Deserialize)] -#[extend::encode_decode] -#[cfg_attr( - all(test, feature = "test_and_gen"), - derive(TS), - ts(export, export_to = "operations.ts") -)] -#[cfg_attr(all(test, feature = "test_and_gen"), ts(type = "number"))] -pub struct ResultU64(pub u64); - -#[derive(Debug, Clone, Serialize, Deserialize)] -#[extend::encode_decode] -#[cfg_attr( - all(test, feature = "test_and_gen"), - derive(TS), - ts(export, export_to = "operations.ts") -)] -pub struct ResultBool(pub bool); - -/// Used only for debug session lifecycle -#[derive(Debug, Clone, Serialize, Deserialize)] -#[extend::encode_decode] -#[cfg_attr( - all(test, feature = "test_and_gen"), - derive(TS), - ts(export, export_to = "operations.ts") -)] -pub struct ResultSleep { - pub sleep_well: bool, -} diff --git a/application/apps/indexer/stypes/src/operations/nodejs.rs b/application/apps/indexer/stypes/src/operations/nodejs.rs deleted file mode 100644 index eb6e60c052..0000000000 --- a/application/apps/indexer/stypes/src/operations/nodejs.rs +++ /dev/null @@ -1,12 +0,0 @@ -use crate::*; - -try_into_js!(NearestPosition); -try_into_js!(ResultNearestPosition); -try_into_js!(Point); -try_into_js!(ResultSearchValues); -try_into_js!(ResultScaledDistribution); -try_into_js!(ExtractedMatchValue); -try_into_js!(ResultExtractedMatchValues); -try_into_js!(ResultU64); -try_into_js!(ResultBool); -try_into_js!(ResultSleep); diff --git a/application/apps/indexer/stypes/src/operations/proptest.rs b/application/apps/indexer/stypes/src/operations/proptest.rs deleted file mode 100644 index a5c50a681c..0000000000 --- a/application/apps/indexer/stypes/src/operations/proptest.rs +++ /dev/null @@ -1,166 +0,0 @@ -use crate::*; - -impl Arbitrary for NearestPosition { - /// Implements the `Arbitrary` trait for `ExtractedMatchValue` to generate random values for - /// property-based testing using the `proptest` framework. - type Parameters = (); - type Strategy = BoxedStrategy; - - fn arbitrary_with(_: Self::Parameters) -> Self::Strategy { - ( - any::().prop_map(|n| n as u64), - any::().prop_map(|n| n as u64), - ) - .prop_map(|(index, position)| NearestPosition { index, position }) - .boxed() - } -} - -impl Arbitrary for ResultNearestPosition { - /// Implements the `Arbitrary` trait for `ExtractedMatchValue` to generate random values for - /// property-based testing using the `proptest` framework. - type Parameters = (); - type Strategy = BoxedStrategy; - - fn arbitrary_with(_: Self::Parameters) -> Self::Strategy { - prop::option::of(NearestPosition::arbitrary()) - .prop_map(ResultNearestPosition) - .boxed() - } -} - -impl Arbitrary for Point { - /// Implements the `Arbitrary` trait for `ExtractedMatchValue` to generate random values for - /// property-based testing using the `proptest` framework. - type Parameters = (); - type Strategy = BoxedStrategy; - - fn arbitrary_with(_: Self::Parameters) -> Self::Strategy { - ( - any::().prop_map(|n| n as u64), - any::().prop_map(|n| n as f64), - any::().prop_map(|n| n as f64), - any::().prop_map(|n| n as f64), - ) - .prop_map(|(row, min, max, y_value)| Point { - row, - min, - max, - y_value, - }) - .boxed() - } -} - -impl Arbitrary for ResultSearchValues { - /// Implements the `Arbitrary` trait for `ExtractedMatchValue` to generate random values for - /// property-based testing using the `proptest` framework. - type Parameters = (); - type Strategy = BoxedStrategy; - - fn arbitrary_with(_: Self::Parameters) -> Self::Strategy { - any::>>() - .prop_map(ResultSearchValues) - .boxed() - } -} - -impl Arbitrary for ResultScaledDistribution { - /// Implements the `Arbitrary` trait for `ExtractedMatchValue` to generate random values for - /// property-based testing using the `proptest` framework. - type Parameters = (); - type Strategy = BoxedStrategy; - - fn arbitrary_with(_: Self::Parameters) -> Self::Strategy { - prop::collection::vec( - prop::collection::vec((any::(), any::()), 0..10), - 0..10, - ) - .prop_map(ResultScaledDistribution) - .boxed() - } -} - -impl Arbitrary for ExtractedMatchValue { - /// Implements the `Arbitrary` trait for `ExtractedMatchValue` to generate random values for - /// property-based testing using the `proptest` framework. - type Parameters = (); - type Strategy = BoxedStrategy; - - fn arbitrary_with(_: Self::Parameters) -> Self::Strategy { - ( - any::().prop_map(|n| n as u64), - prop::collection::vec( - ( - any::().prop_map(|n| n as usize), - prop::collection::vec(any::(), 0..10), - ), - 0..10, - ), - ) - .prop_map(|(index, values)| ExtractedMatchValue { index, values }) - .boxed() - } -} - -impl Arbitrary for ResultExtractedMatchValues { - /// Implements the `Arbitrary` trait for `ResultExtractedMatchValues` to generate random values for - /// property-based testing using the `proptest` framework. - type Parameters = (); - type Strategy = BoxedStrategy; - - fn arbitrary_with(_: Self::Parameters) -> Self::Strategy { - prop::collection::vec(ExtractedMatchValue::arbitrary(), 0..10) - .prop_map(ResultExtractedMatchValues) - .boxed() - } -} - -impl Arbitrary for ResultU64 { - /// Implements the `Arbitrary` trait for `ResultU64` to generate random values for - /// property-based testing using the `proptest` framework. - type Parameters = (); - type Strategy = BoxedStrategy; - - fn arbitrary_with(_: Self::Parameters) -> Self::Strategy { - any::() - .prop_map(|n| n as u64) - .prop_map(ResultU64) - .boxed() - } -} - -impl Arbitrary for ResultBool { - /// Implements the `Arbitrary` trait for `ResultBool` to generate random values for - /// property-based testing using the `proptest` framework. - type Parameters = (); - type Strategy = BoxedStrategy; - - fn arbitrary_with(_: Self::Parameters) -> Self::Strategy { - any::().prop_map(ResultBool).boxed() - } -} - -impl Arbitrary for ResultSleep { - /// Implements the `Arbitrary` trait for `ResultBool` to generate random values for - /// property-based testing using the `proptest` framework. - type Parameters = (); - type Strategy = BoxedStrategy; - - fn arbitrary_with(_: Self::Parameters) -> Self::Strategy { - any::() - .prop_map(|sleep_well| ResultSleep { sleep_well }) - .boxed() - } -} - -test_msg!(NearestPosition, TESTS_USECASE_COUNT); -test_msg!(ResultNearestPosition, TESTS_USECASE_COUNT); -test_msg!(Point, TESTS_USECASE_COUNT); -test_msg!(ResultSearchValues, TESTS_USECASE_COUNT); -test_msg!(ResultScaledDistribution, TESTS_USECASE_COUNT); -test_msg!(ExtractedMatchValue, TESTS_USECASE_COUNT); -test_msg!(ResultExtractedMatchValues, TESTS_USECASE_COUNT); -test_msg!(ResultU64, TESTS_USECASE_COUNT); -test_msg!(ResultBool, TESTS_USECASE_COUNT); -test_msg!(ResultSleep, TESTS_USECASE_COUNT); diff --git a/application/apps/indexer/stypes/src/plugins/nodejs.rs b/application/apps/indexer/stypes/src/plugins/nodejs.rs deleted file mode 100644 index 575b3c23b4..0000000000 --- a/application/apps/indexer/stypes/src/plugins/nodejs.rs +++ /dev/null @@ -1,21 +0,0 @@ -use crate::*; - -try_into_js!(PluginParserSettings); -try_into_js!(PluginParserGeneralSettings); -try_into_js!(PluginByteSourceSettings); -try_into_js!(PluginByteSourceGeneralSettings); -try_into_js!(PluginConfigItem); -try_into_js!(PluginConfigValue); -try_into_js!(PluginConfigSchemaType); -try_into_js!(PluginConfigSchemaItem); -try_into_js!(PluginEntity); -try_into_js!(PluginMetadata); -try_into_js!(PluginType); -try_into_js!(PluginInfo); -try_into_js!(InvalidPluginEntity); -try_into_js!(SemanticVersion); -try_into_js!(RenderOptions); -try_into_js!(ParserRenderOptions); -try_into_js!(PluginsList); -try_into_js!(InvalidPluginsList); -try_into_js!(PluginsPathsList); diff --git a/application/apps/indexer/stypes/src/plugins/proptest.rs b/application/apps/indexer/stypes/src/plugins/proptest.rs deleted file mode 100644 index 939d9adf64..0000000000 --- a/application/apps/indexer/stypes/src/plugins/proptest.rs +++ /dev/null @@ -1,432 +0,0 @@ -use crate::*; - -impl Arbitrary for PluginParserSettings { - type Parameters = (); - type Strategy = BoxedStrategy; - - fn arbitrary_with(_: Self::Parameters) -> Self::Strategy { - ( - any::(), - any::(), - prop::collection::vec(any::(), 0..10), - ) - .prop_map( - |(plugin_path, general_settings, plugin_configs)| PluginParserSettings { - plugin_path, - general_settings, - plugin_configs, - }, - ) - .boxed() - } -} - -impl Arbitrary for PluginParserGeneralSettings { - type Parameters = (); - type Strategy = BoxedStrategy; - - fn arbitrary_with(_: Self::Parameters) -> Self::Strategy { - any::() - .prop_map(|placeholder| PluginParserGeneralSettings { placeholder }) - .boxed() - } -} - -impl Arbitrary for PluginByteSourceSettings { - type Parameters = (); - type Strategy = BoxedStrategy; - - fn arbitrary_with(_: Self::Parameters) -> Self::Strategy { - ( - any::(), - any::(), - prop::collection::vec(any::(), 0..10), - ) - .prop_map( - |(plugin_path, general_settings, plugin_configs)| PluginByteSourceSettings { - plugin_path, - general_settings, - plugin_configs, - }, - ) - .boxed() - } -} - -impl Arbitrary for PluginByteSourceGeneralSettings { - type Parameters = (); - type Strategy = BoxedStrategy; - - fn arbitrary_with(_: Self::Parameters) -> Self::Strategy { - any::() - .prop_map(|placeholder| PluginByteSourceGeneralSettings { placeholder }) - .boxed() - } -} - -impl Arbitrary for PluginConfigItem { - type Parameters = (); - type Strategy = BoxedStrategy; - - fn arbitrary_with(_: Self::Parameters) -> Self::Strategy { - (any::(), any::()) - .prop_map(|(id, value)| PluginConfigItem { id, value }) - .boxed() - } -} - -impl Arbitrary for PluginConfigValue { - type Parameters = (); - type Strategy = BoxedStrategy; - - fn arbitrary_with(_: Self::Parameters) -> Self::Strategy { - // Reminder to add new items to proptests here. - match PluginConfigValue::Boolean(true) { - PluginConfigValue::Boolean(_) => (), - PluginConfigValue::Integer(_) => (), - PluginConfigValue::Float(_) => (), - PluginConfigValue::Text(_) => (), - PluginConfigValue::Directories(_) => (), - PluginConfigValue::Files(_) => (), - PluginConfigValue::Dropdown(_) => (), - }; - - prop_oneof![ - any::().prop_map(PluginConfigValue::Boolean), - any::().prop_map(PluginConfigValue::Integer), - any::().prop_map(PluginConfigValue::Float), - any::().prop_map(PluginConfigValue::Text), - prop::collection::vec(any::(), 0..10).prop_map(PluginConfigValue::Directories), - prop::collection::vec(any::(), 0..10).prop_map(PluginConfigValue::Files), - any::().prop_map(PluginConfigValue::Dropdown), - ] - .boxed() - } -} - -impl Arbitrary for PluginConfigSchemaType { - type Parameters = (); - type Strategy = BoxedStrategy; - - fn arbitrary_with(_: Self::Parameters) -> Self::Strategy { - use PluginConfigSchemaType as T; - // Reminder to add new items to proptests here. - match T::Boolean(true) { - T::Boolean(_) => (), - T::Integer(_) => (), - T::Float(_) => (), - T::Text(_) => (), - T::Directories => (), - T::Files(_) => (), - T::Dropdown(_) => (), - }; - - prop_oneof![ - any::().prop_map(T::Boolean), - any::().prop_map(T::Integer), - any::().prop_map(T::Float), - any::().prop_map(T::Text), - Just(T::Directories), - prop::collection::vec(any::(), 0..10).prop_map(T::Files), - ( - prop::collection::vec(any::(), 0..10), - any::() - ) - .prop_map(T::Dropdown), - ] - .boxed() - } -} - -impl Arbitrary for PluginConfigSchemaItem { - type Parameters = (); - type Strategy = BoxedStrategy; - - fn arbitrary_with(_: Self::Parameters) -> Self::Strategy { - ( - any::(), - any::(), - prop::option::of(any::()), - any::(), - ) - .prop_map( - |(id, title, description, input_type)| PluginConfigSchemaItem { - id, - title, - description, - input_type, - }, - ) - .boxed() - } -} - -impl Arbitrary for PluginEntity { - type Parameters = (); - type Strategy = BoxedStrategy; - - fn arbitrary_with(_: Self::Parameters) -> Self::Strategy { - ( - any::(), - any::(), - any::(), - any::(), - prop::option::of(any::()), - ) - .prop_map( - |(dir_path, plugin_type, info, metadata, readme_path)| Self { - dir_path, - plugin_type, - info, - metadata, - readme_path, - }, - ) - .boxed() - } -} - -impl Arbitrary for PluginMetadata { - type Parameters = (); - type Strategy = BoxedStrategy; - - fn arbitrary_with(_: Self::Parameters) -> Self::Strategy { - (any::(), prop::option::of(any::())) - .prop_map(|(title, description)| Self { title, description }) - .boxed() - } -} - -impl Arbitrary for PluginType { - type Parameters = (); - type Strategy = BoxedStrategy; - - fn arbitrary_with(_: Self::Parameters) -> Self::Strategy { - // Reminder to add new fields here. - match Self::ByteSource { - PluginType::Parser => (), - PluginType::ByteSource => (), - }; - - prop_oneof![Just(Self::Parser), Just(Self::ByteSource)].boxed() - } -} - -impl Arbitrary for PluginInfo { - type Parameters = (); - type Strategy = BoxedStrategy; - - fn arbitrary_with(_: Self::Parameters) -> Self::Strategy { - ( - any::(), - any::(), - any::(), - prop::collection::vec(any::(), 0..10), - any::(), - ) - .prop_map( - |(wasm_file_path, api_version, plugin_version, config_schemas, render_options)| { - Self { - wasm_file_path, - api_version, - plugin_version, - config_schemas, - render_options, - } - }, - ) - .boxed() - } -} - -impl Arbitrary for InvalidPluginEntity { - type Parameters = (); - type Strategy = BoxedStrategy; - - fn arbitrary_with(_: Self::Parameters) -> Self::Strategy { - (any::(), any::()) - .prop_map(|(dir_path, plugin_type)| Self { - dir_path, - plugin_type, - }) - .boxed() - } -} - -impl Arbitrary for SemanticVersion { - type Parameters = (); - type Strategy = BoxedStrategy; - - fn arbitrary_with(_: Self::Parameters) -> Self::Strategy { - ( - prop::num::u16::ANY, - prop::num::u16::ANY, - prop::num::u16::ANY, - ) - .prop_map(|(major, minor, patch)| Self { - major, - minor, - patch, - }) - .boxed() - } -} - -impl Arbitrary for RenderOptions { - type Parameters = (); - type Strategy = BoxedStrategy; - - fn arbitrary_with(_: Self::Parameters) -> Self::Strategy { - // Reminder to update here on newly added items. - match Self::ByteSource { - RenderOptions::Parser(_) => (), - RenderOptions::ByteSource => (), - }; - - prop_oneof![ - any::>().prop_map(Self::Parser), - Just(Self::ByteSource), - ] - .boxed() - } -} - -impl Arbitrary for ParserRenderOptions { - type Parameters = (); - type Strategy = BoxedStrategy; - - fn arbitrary_with(_: Self::Parameters) -> Self::Strategy { - prop::option::of(any::()) - .prop_map(|columns_options| Self { columns_options }) - .boxed() - } -} - -impl Arbitrary for ColumnsRenderOptions { - type Parameters = (); - type Strategy = BoxedStrategy; - fn arbitrary_with(_: Self::Parameters) -> Self::Strategy { - ( - prop::collection::vec(any::(), 0..10), - any::(), - any::(), - ) - .prop_map(|(columns, min_width, max_width)| Self { - columns, - min_width, - max_width, - }) - .boxed() - } -} - -impl Arbitrary for ColumnInfo { - type Parameters = (); - type Strategy = BoxedStrategy; - fn arbitrary_with(_: Self::Parameters) -> Self::Strategy { - (any::(), any::(), any::()) - .prop_map(|(caption, description, width)| Self { - caption, - description, - width, - }) - .boxed() - } -} - -impl Arbitrary for PluginsList { - type Parameters = (); - type Strategy = BoxedStrategy; - - fn arbitrary_with(_: Self::Parameters) -> Self::Strategy { - prop::collection::vec(any::(), 0..7) - .prop_map(Self) - .boxed() - } -} - -impl Arbitrary for InvalidPluginsList { - type Parameters = (); - type Strategy = BoxedStrategy; - - fn arbitrary_with(_: Self::Parameters) -> Self::Strategy { - prop::collection::vec(any::(), 0..7) - .prop_map(Self) - .boxed() - } -} - -impl Arbitrary for PluginLogLevel { - type Parameters = (); - type Strategy = BoxedStrategy; - - fn arbitrary_with(_: Self::Parameters) -> Self::Strategy { - prop_oneof![ - Just(PluginLogLevel::Debug), - Just(PluginLogLevel::Err), - Just(PluginLogLevel::Warn), - Just(PluginLogLevel::Info) - ] - .boxed() - } -} - -impl Arbitrary for PluginLogMessage { - type Parameters = (); - type Strategy = BoxedStrategy; - - fn arbitrary_with(_: Self::Parameters) -> Self::Strategy { - (any::(), any::(), any::()) - .prop_map(|(level, msg, timestamp)| Self { - level, - msg, - timestamp: timestamp as u64, - }) - .boxed() - } -} - -impl Arbitrary for PluginRunData { - type Parameters = (); - type Strategy = BoxedStrategy; - - fn arbitrary_with(_: Self::Parameters) -> Self::Strategy { - prop::collection::vec(any::(), 0..7) - .prop_map(|logs| Self { logs }) - .boxed() - } -} - -impl Arbitrary for PluginsPathsList { - type Parameters = (); - type Strategy = BoxedStrategy; - - fn arbitrary_with(_: Self::Parameters) -> Self::Strategy { - prop::collection::vec(any::(), 0..7) - .prop_map(Self) - .boxed() - } -} - -test_msg!(PluginParserSettings, TESTS_USECASE_COUNT); -test_msg!(PluginParserGeneralSettings, TESTS_USECASE_COUNT); -test_msg!(PluginByteSourceSettings, TESTS_USECASE_COUNT); -test_msg!(PluginByteSourceGeneralSettings, TESTS_USECASE_COUNT); -test_msg!(PluginConfigItem, TESTS_USECASE_COUNT); -test_msg!(PluginConfigValue, TESTS_USECASE_COUNT); -test_msg!(PluginConfigSchemaType, TESTS_USECASE_COUNT); -test_msg!(PluginConfigSchemaItem, TESTS_USECASE_COUNT); -test_msg!(PluginEntity, TESTS_USECASE_COUNT); -test_msg!(PluginMetadata, TESTS_USECASE_COUNT); -test_msg!(PluginType, TESTS_USECASE_COUNT); -test_msg!(PluginInfo, TESTS_USECASE_COUNT); -test_msg!(InvalidPluginEntity, TESTS_USECASE_COUNT); -test_msg!(SemanticVersion, TESTS_USECASE_COUNT); -test_msg!(RenderOptions, TESTS_USECASE_COUNT); -test_msg!(ParserRenderOptions, TESTS_USECASE_COUNT); -test_msg!(ColumnsRenderOptions, TESTS_USECASE_COUNT); -test_msg!(ColumnInfo, TESTS_USECASE_COUNT); -test_msg!(PluginsList, TESTS_USECASE_COUNT); -test_msg!(InvalidPluginsList, TESTS_USECASE_COUNT); -test_msg!(PluginsPathsList, TESTS_USECASE_COUNT); -test_msg!(PluginLogMessage, TESTS_USECASE_COUNT); diff --git a/application/apps/indexer/stypes/src/progress/nodejs.rs b/application/apps/indexer/stypes/src/progress/nodejs.rs deleted file mode 100644 index 29a053090a..0000000000 --- a/application/apps/indexer/stypes/src/progress/nodejs.rs +++ /dev/null @@ -1,5 +0,0 @@ -use crate::*; - -try_into_js!(Notification); -try_into_js!(Progress); -try_into_js!(Ticks); diff --git a/application/apps/indexer/stypes/src/progress/proptest.rs b/application/apps/indexer/stypes/src/progress/proptest.rs deleted file mode 100644 index 65600daa67..0000000000 --- a/application/apps/indexer/stypes/src/progress/proptest.rs +++ /dev/null @@ -1,71 +0,0 @@ -use crate::*; - -impl Arbitrary for Notification { - /// Implements the `Arbitrary` trait for `Notification` to generate random instances - /// for property-based testing using the `proptest` framework. - /// - /// # Details - /// - Generates: - /// - `severity`: A random `Severity` value. - /// - `content`: A random `String`. - /// - `line`: An optional random `usize` value. - type Parameters = (); - type Strategy = BoxedStrategy; - - fn arbitrary_with(_: Self::Parameters) -> Self::Strategy { - (any::(), any::(), any::>()) - .prop_map(|(severity, content, line)| Notification { - severity, - content, - line: line.map(|n| n as usize), - }) - .boxed() - } -} - -impl Arbitrary for Ticks { - /// Implements the `Arbitrary` trait for `Ticks` to generate random instances - /// for property-based testing using the `proptest` framework. - /// - /// # Details - /// - Generates: - /// - `count`: A random `u64` value. - /// - `state`: An optional random `String`. - /// - `total`: An optional random `u64` value. - type Parameters = (); - type Strategy = BoxedStrategy; - - fn arbitrary_with(_: Self::Parameters) -> Self::Strategy { - (any::(), any::>(), any::>()) - .prop_map(|(count, state, total)| Ticks { - count: count as u64, - state, - total: total.map(|n| n as u64), - }) - .boxed() - } -} - -impl Arbitrary for Progress { - /// Implements the `Arbitrary` trait for `Progress` to generate random instances - /// for property-based testing using the `proptest` framework. - /// - /// # Details - /// - Randomly generates one of the following variants: - /// - `Ticks` with a random `Ticks` value. - /// - `Notification` with a random `Notification` value. - /// - `Stopped` as a constant value. - type Parameters = (); - type Strategy = BoxedStrategy; - - fn arbitrary_with(_: Self::Parameters) -> Self::Strategy { - prop_oneof![ - any::().prop_map(Progress::Ticks), - any::().prop_map(Progress::Notification), - Just(Progress::Stopped), - ] - .boxed() - } -} - -test_msg!(Progress, TESTS_USECASE_COUNT); diff --git a/application/apps/indexer/stypes/src/tests.rs b/application/apps/indexer/stypes/src/tests.rs deleted file mode 100644 index abba1c9947..0000000000 --- a/application/apps/indexer/stypes/src/tests.rs +++ /dev/null @@ -1,231 +0,0 @@ -#[cfg(feature = "test_and_gen")] -use std::path::PathBuf; -/// The number of test cases to generate for use in test scenarios. -#[cfg(feature = "test_and_gen")] -pub const TESTS_USECASE_COUNT: usize = 100; - -/// The name of the environment variable that specifies the path for storing test data. -/// If this variable is not set, the default path will be used. -#[cfg(feature = "test_and_gen")] -pub const OUTPUT_PATH_ENVVAR: &str = "CHIPMUNK_PROTOCOL_TEST_OUTPUT"; - -/// This function returns the path for writing test data (for testing in a different context). -/// The function checks the value of the `CHIPMUNK_PROTOCOL_TEST_OUTPUT` environment variable. -/// If the variable is defined, its value will be used as the path for writing test data. -#[cfg(feature = "test_and_gen")] -pub fn get_output_path() -> Result { - std::env::var(OUTPUT_PATH_ENVVAR) - .map_err(|err| err.to_string()) - .and_then(|s| { - if s.is_empty() { - Err(String::from("No valid path")) - } else { - Ok(s) - } - }) - .map(PathBuf::from) -} - -/// The `test_msg` macro creates a `proptest` for the specified data type. The macro also supports -/// generic types. For example: -/// ```ignore -/// test_msg!(Progress, 10); -/// test_msg!(CommandOutcome<()>, 10); -/// test_msg!(CommandOutcome, 10); -/// test_msg!(CommandOutcome>, 10); -/// ``` -/// The second numeric argument specifies the number of variants to generate for each type. -/// During testing, a separate directory is created for each type. For each variant of the type, -/// a file with a sequential name (e.g., `1.bin`, `2.bin`, ...) will be created. -/// -/// **WARNING**: When running tests, the folder specified in the `CHIPMUNK_PROTOCOL_TEST_OUTPUT` -/// environment variable will be completely deleted. Be extremely cautious when setting the value -/// of the `CHIPMUNK_PROTOCOL_TEST_OUTPUT` environment variable. -#[macro_export] -macro_rules! test_msg { - ($type:ident, $exp_count:expr) => { - paste::item! { - - #[cfg(feature = "test_and_gen")] - proptest! { - #![proptest_config(ProptestConfig { - max_shrink_iters: 50, - ..ProptestConfig::with_cases(500) - })] - - #[allow(non_snake_case)] - #[test] - #[ignore] - fn [< write_test_data_for_ $type >](cases in proptest::collection::vec($type::arbitrary(), $exp_count)) { - let Ok(output_path) = get_output_path() else { - return Ok(()); - }; - use std::fs::{File, create_dir_all}; - use std::io::{Write}; - use remove_dir_all::remove_dir_all; - - let dest = output_path.join(stringify!($type)); - if dest.exists() { - remove_dir_all(&dest).expect("Folder for tests has been cleaned"); - } - if !dest.exists() { - create_dir_all(&dest).expect("Folder for tests has been created"); - } - for (n, case) in cases.into_iter().enumerate() { - let bytes = case.encode(); - assert!(bytes.is_ok()); - let bytes = bytes.unwrap(); - let mut file = File::create(dest.join(format!("{n}.raw")))?; - assert!(file.write_all(&bytes).is_ok()); - assert!(file.flush().is_ok()); - let msg = $type::decode(&bytes); - if let Err(err) = &msg { - eprintln!("Decoding error: {err:?}"); - } - assert!(msg.is_ok()); - } - - } - - } - } - }; - - ($type:ident<()>, $exp_count:expr) => { - paste::item! { - - #[cfg(feature = "test_and_gen")] - proptest! { - #![proptest_config(ProptestConfig { - max_shrink_iters: 50, - ..ProptestConfig::with_cases(500) - })] - - #[allow(non_snake_case)] - #[test] - #[ignore] - fn [< write_test_data_for_ $type Void >](cases in proptest::collection::vec($type::<()>::arbitrary(), $exp_count)) { - let Ok(output_path) = get_output_path() else { - return Ok(()); - }; - use std::fs::{File, create_dir_all}; - use std::io::{Write}; - use remove_dir_all::remove_dir_all; - - let dest = output_path.join(format!("{}_Void",stringify!($type))); - if dest.exists() { - remove_dir_all(&dest).expect("Folder for tests has been cleaned"); - } - if !dest.exists() { - create_dir_all(&dest).expect("Folder for tests has been created"); - } - for (n, case) in cases.into_iter().enumerate() { - let bytes = case.encode(); - assert!(bytes.is_ok()); - let bytes = bytes.unwrap(); - let mut file = File::create(dest.join(format!("{n}.raw")))?; - assert!(file.write_all(&bytes).is_ok()); - assert!(file.flush().is_ok()); - let msg = $type::<()>::decode(&bytes); - if let Err(err) = &msg { - eprintln!("Decoding error: {err:?}"); - } - assert!(msg.is_ok()); - } - - } - - } - } - }; - - ($type:ident<$generic:ident>, $exp_count:expr) => { - paste::item! { - - #[cfg(feature = "test_and_gen")] - proptest! { - #![proptest_config(ProptestConfig { - max_shrink_iters: 50, - ..ProptestConfig::with_cases(500) - })] - - #[allow(non_snake_case)] - #[test] - #[ignore] - fn [< write_test_data_for_ $type $generic >](cases in proptest::collection::vec($type::<$generic>::arbitrary(), $exp_count)) { - let Ok(output_path) = get_output_path() else { - return Ok(()); - }; - use std::fs::{File, create_dir_all}; - use std::io::{Write}; - use remove_dir_all::remove_dir_all; - - let dest = output_path.join(format!("{}_{}",stringify!($type), stringify!($generic))); - if dest.exists() { - remove_dir_all(&dest).expect("Folder for tests has been cleaned"); - } - if !dest.exists() { - create_dir_all(&dest).expect("Folder for tests has been created"); - } - for (n, case) in cases.into_iter().enumerate() { - let bytes = case.encode(); - assert!(bytes.is_ok()); - let bytes = bytes.unwrap(); - let mut file = File::create(dest.join(format!("{n}.raw")))?; - assert!(file.write_all(&bytes).is_ok()); - assert!(file.flush().is_ok()); - let msg = $type::<$generic>::decode(&bytes); - if let Err(err) = &msg { - eprintln!("Decoding error: {err:?}"); - } - } - } - } - } - }; - - ($type:ident<$generic:ident<$nested:ident>>, $exp_count:expr) => { - paste::item! { - - #[cfg(feature = "test_and_gen")] - proptest! { - #![proptest_config(ProptestConfig { - max_shrink_iters: 50, - ..ProptestConfig::with_cases(500) - })] - - #[allow(non_snake_case)] - #[test] - #[ignore] - fn [< write_test_data_for_ $type $generic $nested>](cases in proptest::collection::vec($type::<$generic<$nested>>::arbitrary(), $exp_count)) { - let Ok(output_path) = get_output_path() else { - return Ok(()); - }; - use std::fs::{File, create_dir_all}; - use std::io::{Write}; - use remove_dir_all::remove_dir_all; - - let dest = output_path.join(format!("{}_{}_{}",stringify!($type), stringify!($generic), stringify!($nested))); - if dest.exists() { - remove_dir_all(&dest).expect("Folder for tests has been cleaned"); - } - if !dest.exists() { - create_dir_all(&dest).expect("Folder for tests has been created"); - } - for (n, case) in cases.into_iter().enumerate() { - let bytes = case.encode(); - assert!(bytes.is_ok()); - let bytes = bytes.unwrap(); - let mut file = File::create(dest.join(format!("{n}.raw")))?; - assert!(file.write_all(&bytes).is_ok()); - assert!(file.flush().is_ok()); - let msg = $type::<$generic<$nested>>::decode(&bytes); - if let Err(err) = &msg { - eprintln!("Decoding error: {err:?}"); - } - } - } - } - } - }; -} diff --git a/application/apps/indexer/tools/extend/.gitignore b/application/apps/indexer/tools/extend/.gitignore deleted file mode 100644 index 03314f77b5..0000000000 --- a/application/apps/indexer/tools/extend/.gitignore +++ /dev/null @@ -1 +0,0 @@ -Cargo.lock diff --git a/application/apps/indexer/tools/extend/Cargo.toml b/application/apps/indexer/tools/extend/Cargo.toml deleted file mode 100644 index 3ce3a25807..0000000000 --- a/application/apps/indexer/tools/extend/Cargo.toml +++ /dev/null @@ -1,15 +0,0 @@ -[package] -name = "extend" -version = "0.1.0" -edition = "2018" - -[lib] -proc-macro = true - -[lints] -workspace = true - -[dependencies] -proc-macro2 = "1.0" -quote = "1.0" -syn = { version="2.0", features=["full","fold"] } diff --git a/application/apps/indexer/tools/extend/src/lib.rs b/application/apps/indexer/tools/extend/src/lib.rs deleted file mode 100644 index 4e87171ad7..0000000000 --- a/application/apps/indexer/tools/extend/src/lib.rs +++ /dev/null @@ -1,75 +0,0 @@ -/// The `extend` crate is designed to simplify the generation of `encode` and `decode` methods -/// for every public type in the `stypes` crate. -/// -/// For example, the following code: -/// -/// ```ignore -/// #[derive(Debug, Serialize, Deserialize, Clone)] -/// #[extend::encode_decode] -/// pub struct Notification { -/// pub severity: Severity, -/// pub content: String, -/// pub line: Option, -/// } -/// ``` -/// -/// Is transformed into: -/// -/// ```ignore -/// #[derive(Debug, Serialize, Deserialize, Clone)] -/// pub struct Notification { -/// pub severity: Severity, -/// pub content: String, -/// pub line: Option, -/// } -/// -/// impl Notification { -/// pub fn encode(&self) -> Result, String> { -/// bincode::serialize(self).map_err(|e| e.to_string()) -/// } -/// -/// pub fn decode(buf: &[u8]) -> Result { -/// bincode::deserialize(buf).map_err(|e| e.to_string()) -/// } -/// } -/// ``` -use proc_macro::TokenStream; -use quote::quote; -use syn::{parse_macro_input, Item}; - -#[proc_macro_attribute] -pub fn encode_decode(_: TokenStream, input: TokenStream) -> TokenStream { - let item = parse_macro_input!(input as syn::Item); - - let item_clone = item.clone(); - - let (entity_name, generics) = match &item { - Item::Struct(s) => (&s.ident, &s.generics), - Item::Enum(e) => (&e.ident, &e.generics), - _ => { - return syn::Error::new_spanned( - &item, - "encode_decode can be applied only to structs and enums", - ) - .to_compile_error() - .into(); - } - }; - - let (impl_generics, ty_generics, where_clause) = generics.split_for_impl(); - - TokenStream::from(quote! { - - #item_clone - - impl #impl_generics #entity_name #ty_generics #where_clause { - pub fn encode(&self) -> Result, String> { - bincode::serialize(self).map_err(|e| e.to_string()) - } - - pub fn decode(buf: &[u8]) -> Result { - bincode::deserialize(buf).map_err(|e| e.to_string()) - } - } - }) -} diff --git a/application/apps/precompiled/updater/Cargo.lock b/application/apps/precompiled/updater/Cargo.lock deleted file mode 100644 index 428b2bd2a4..0000000000 --- a/application/apps/precompiled/updater/Cargo.lock +++ /dev/null @@ -1,1050 +0,0 @@ -# This file is automatically @generated by Cargo. -# It is not intended for manual editing. -version = 4 - -[[package]] -name = "adler2" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "512761e0bb2578dd7380c6baaa0f4ce03e84f95e960231d1dec8bf4d7d6e2627" - -[[package]] -name = "aho-corasick" -version = "1.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916" -dependencies = [ - "memchr", -] - -[[package]] -name = "android-tzdata" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0" - -[[package]] -name = "android_system_properties" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311" -dependencies = [ - "libc", -] - -[[package]] -name = "anyhow" -version = "1.0.98" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e16d2d3311acee920a9eb8d33b8cbc1787ce4a264e85f964c2404b969bdcd487" - -[[package]] -name = "arc-swap" -version = "1.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69f7f8c3906b62b754cd5326047894316021dcfe5a194c8ea52bdd94934a3457" - -[[package]] -name = "autocfg" -version = "1.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26" - -[[package]] -name = "bitflags" -version = "2.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b8e56985ec62d17e9c1001dc89c88ecd7dc08e47eba5ec7c29c7b5eeecde967" - -[[package]] -name = "bumpalo" -version = "3.17.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1628fb46dfa0b37568d12e5edd512553eccf6a22a78e8bde00bb4aed84d5bdbf" - -[[package]] -name = "cc" -version = "1.2.25" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0fc897dc1e865cc67c0e05a836d9d3f1df3cbe442aa4a9473b18e12624a4951" -dependencies = [ - "shlex", -] - -[[package]] -name = "cfg-if" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" - -[[package]] -name = "chrono" -version = "0.4.41" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c469d952047f47f91b68d1cba3f10d63c11d73e4636f24f08daf0278abf01c4d" -dependencies = [ - "android-tzdata", - "iana-time-zone", - "num-traits", - "windows-link", -] - -[[package]] -name = "core-foundation-sys" -version = "0.8.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" - -[[package]] -name = "crc32fast" -version = "1.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a97769d94ddab943e4510d138150169a2758b5ef3eb191a9ee688de3e23ef7b3" -dependencies = [ - "cfg-if", -] - -[[package]] -name = "derivative" -version = "2.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fcc3dd5e9e9c0b295d6e1e4d811fb6f157d5ffd784b8d202fc62eac8035a770b" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "destructure_traitobject" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c877555693c14d2f84191cfd3ad8582790fc52b5e2274b40b59cf5f5cea25c7" - -[[package]] -name = "dirs" -version = "6.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3e8aa94d75141228480295a7d0e7feb620b1a5ad9f12bc40be62411e38cce4e" -dependencies = [ - "dirs-sys", -] - -[[package]] -name = "dirs-sys" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e01a3366d27ee9890022452ee61b2b63a67e6f13f58900b651ff5665f0bb1fab" -dependencies = [ - "libc", - "option-ext", - "redox_users", - "windows-sys", -] - -[[package]] -name = "equivalent" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f" - -[[package]] -name = "errno" -version = "0.3.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cea14ef9355e3beab063703aa9dab15afd25f0667c341310c1e5274bb1d0da18" -dependencies = [ - "libc", - "windows-sys", -] - -[[package]] -name = "filetime" -version = "0.2.25" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35c0522e981e68cbfa8c3f978441a5f34b30b96e146b33cd3359176b50fe8586" -dependencies = [ - "cfg-if", - "libc", - "libredox", - "windows-sys", -] - -[[package]] -name = "flate2" -version = "1.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ced92e76e966ca2fd84c8f7aa01a4aea65b0eb6648d72f7c8f3e2764a67fece" -dependencies = [ - "crc32fast", - "miniz_oxide", -] - -[[package]] -name = "fnv" -version = "1.0.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" - -[[package]] -name = "fs_extra" -version = "1.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42703706b716c37f96a77aea830392ad231f44c9e9a67872fa5548707e11b11c" - -[[package]] -name = "getrandom" -version = "0.2.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "335ff9f135e4384c8150d6f27c6daed433577f86b4750418338c01a1a2528592" -dependencies = [ - "cfg-if", - "libc", - "wasi", -] - -[[package]] -name = "hashbrown" -version = "0.15.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "84b26c544d002229e640969970a2e74021aadf6e2f96372b9c58eff97de08eb3" - -[[package]] -name = "humantime" -version = "2.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b112acc8b3adf4b107a8ec20977da0273a8c386765a3ec0229bd500a1443f9f" - -[[package]] -name = "iana-time-zone" -version = "0.1.63" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0c919e5debc312ad217002b8048a17b7d83f80703865bbfcfebb0458b0b27d8" -dependencies = [ - "android_system_properties", - "core-foundation-sys", - "iana-time-zone-haiku", - "js-sys", - "log", - "wasm-bindgen", - "windows-core", -] - -[[package]] -name = "iana-time-zone-haiku" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f" -dependencies = [ - "cc", -] - -[[package]] -name = "indexmap" -version = "2.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cea70ddb795996207ad57735b50c5982d8844f38ba9ee5f1aedcfb708a2aa11e" -dependencies = [ - "equivalent", - "hashbrown", -] - -[[package]] -name = "itoa" -version = "1.0.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a5f13b858c8d314ee3e8f639011f7ccefe71f97f96e50151fb991f267928e2c" - -[[package]] -name = "js-sys" -version = "0.3.77" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1cfaf33c695fc6e08064efbc1f72ec937429614f25eef83af942d0e227c3a28f" -dependencies = [ - "once_cell", - "wasm-bindgen", -] - -[[package]] -name = "libc" -version = "0.2.172" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d750af042f7ef4f724306de029d18836c26c1765a54a6a3f094cbd23a7267ffa" - -[[package]] -name = "libredox" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0ff37bd590ca25063e35af745c343cb7a0271906fb7b37e4813e8f79f00268d" -dependencies = [ - "bitflags", - "libc", - "redox_syscall", -] - -[[package]] -name = "linux-raw-sys" -version = "0.9.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd945864f07fe9f5371a27ad7b52a172b4b499999f1d97574c9fa68373937e12" - -[[package]] -name = "lock_api" -version = "0.4.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96936507f153605bddfcda068dd804796c84324ed2510809e5b2a624c81da765" -dependencies = [ - "autocfg", - "scopeguard", -] - -[[package]] -name = "log" -version = "0.4.27" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13dc2df351e3202783a1fe0d44375f7295ffb4049267b0f3018346dc122a1d94" -dependencies = [ - "serde", -] - -[[package]] -name = "log-mdc" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a94d21414c1f4a51209ad204c1776a3d0765002c76c6abcb602a6f09f1e881c7" - -[[package]] -name = "log4rs" -version = "1.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0816135ae15bd0391cf284eab37e6e3ee0a6ee63d2ceeb659862bd8d0a984ca6" -dependencies = [ - "anyhow", - "arc-swap", - "chrono", - "derivative", - "fnv", - "humantime", - "libc", - "log", - "log-mdc", - "once_cell", - "parking_lot", - "rand", - "serde", - "serde-value", - "serde_json", - "serde_yaml", - "thiserror 1.0.69", - "thread-id", - "typemap-ors", - "winapi", -] - -[[package]] -name = "memchr" -version = "2.7.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" - -[[package]] -name = "miniz_oxide" -version = "0.8.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3be647b768db090acb35d5ec5db2b0e1f1de11133ca123b9eacf5137868f892a" -dependencies = [ - "adler2", -] - -[[package]] -name = "num-traits" -version = "0.2.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" -dependencies = [ - "autocfg", -] - -[[package]] -name = "once_cell" -version = "1.21.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d" - -[[package]] -name = "option-ext" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d" - -[[package]] -name = "ordered-float" -version = "2.10.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68f19d67e5a2795c94e73e0bb1cc1a7edeb2e28efd39e2e1c9b7a40c1108b11c" -dependencies = [ - "num-traits", -] - -[[package]] -name = "parking_lot" -version = "0.12.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70d58bf43669b5795d1576d0641cfb6fbb2057bf629506267a92807158584a13" -dependencies = [ - "lock_api", - "parking_lot_core", -] - -[[package]] -name = "parking_lot_core" -version = "0.9.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc838d2a56b5b1a6c25f55575dfc605fabb63bb2365f6c2353ef9159aa69e4a5" -dependencies = [ - "cfg-if", - "libc", - "redox_syscall", - "smallvec", - "windows-targets", -] - -[[package]] -name = "ppv-lite86" -version = "0.2.21" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85eae3c4ed2f50dcfe72643da4befc30deadb458a9b590d720cde2f2b1e97da9" -dependencies = [ - "zerocopy", -] - -[[package]] -name = "proc-macro2" -version = "1.0.95" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02b3e5e68a3a1a02aad3ec490a98007cbc13c37cbe84a3cd7b8e406d76e7f778" -dependencies = [ - "unicode-ident", -] - -[[package]] -name = "quote" -version = "1.0.40" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1885c039570dc00dcb4ff087a89e185fd56bae234ddc7f056a945bf36467248d" -dependencies = [ - "proc-macro2", -] - -[[package]] -name = "rand" -version = "0.8.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" -dependencies = [ - "libc", - "rand_chacha", - "rand_core", -] - -[[package]] -name = "rand_chacha" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" -dependencies = [ - "ppv-lite86", - "rand_core", -] - -[[package]] -name = "rand_core" -version = "0.6.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" -dependencies = [ - "getrandom", -] - -[[package]] -name = "redox_syscall" -version = "0.5.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "928fca9cf2aa042393a8325b9ead81d2f0df4cb12e1e24cef072922ccd99c5af" -dependencies = [ - "bitflags", -] - -[[package]] -name = "redox_users" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd6f9d3d47bdd2ad6945c5015a226ec6155d0bcdfd8f7cd29f86b71f8de99d2b" -dependencies = [ - "getrandom", - "libredox", - "thiserror 2.0.12", -] - -[[package]] -name = "regex" -version = "1.11.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b544ef1b4eac5dc2db33ea63606ae9ffcfac26c1416a2806ae0bf5f56b201191" -dependencies = [ - "aho-corasick", - "memchr", - "regex-automata", - "regex-syntax", -] - -[[package]] -name = "regex-automata" -version = "0.4.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "809e8dc61f6de73b46c85f4c96486310fe304c434cfa43669d7b40f711150908" -dependencies = [ - "aho-corasick", - "memchr", - "regex-syntax", -] - -[[package]] -name = "regex-syntax" -version = "0.8.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" - -[[package]] -name = "rustix" -version = "1.0.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c71e83d6afe7ff64890ec6b71d6a69bb8a610ab78ce364b3352876bb4c801266" -dependencies = [ - "bitflags", - "errno", - "libc", - "linux-raw-sys", - "windows-sys", -] - -[[package]] -name = "rustversion" -version = "1.0.21" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a0d197bd2c9dc6e53b84da9556a69ba4cdfab8619eb41a8bd1cc2027a0f6b1d" - -[[package]] -name = "ryu" -version = "1.0.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28d3b2b1366ec20994f1fd18c3c594f05c5dd4bc44d8bb0c1c632c8d6829481f" - -[[package]] -name = "scopeguard" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" - -[[package]] -name = "serde" -version = "1.0.219" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f0e2c6ed6606019b4e29e69dbaba95b11854410e5347d525002456dbbb786b6" -dependencies = [ - "serde_derive", -] - -[[package]] -name = "serde-value" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3a1a3341211875ef120e117ea7fd5228530ae7e7036a779fdc9117be6b3282c" -dependencies = [ - "ordered-float", - "serde", -] - -[[package]] -name = "serde_derive" -version = "1.0.219" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b0276cf7f2c73365f7157c8123c21cd9a50fbbd844757af28ca1f5925fc2a00" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.101", -] - -[[package]] -name = "serde_json" -version = "1.0.140" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "20068b6e96dc6c9bd23e01df8827e6c7e1f2fddd43c21810382803c136b99373" -dependencies = [ - "itoa", - "memchr", - "ryu", - "serde", -] - -[[package]] -name = "serde_spanned" -version = "0.6.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87607cb1398ed59d48732e575a4c28a7a8ebf2454b964fe3f224f2afc07909e1" -dependencies = [ - "serde", -] - -[[package]] -name = "serde_yaml" -version = "0.9.34+deprecated" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a8b1a1a2ebf674015cc02edccce75287f1a0130d394307b36743c2f5d504b47" -dependencies = [ - "indexmap", - "itoa", - "ryu", - "serde", - "unsafe-libyaml", -] - -[[package]] -name = "shlex" -version = "1.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" - -[[package]] -name = "smallvec" -version = "1.15.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8917285742e9f3e1683f0a9c4e6b57960b7314d0b08d30d1ecd426713ee2eee9" - -[[package]] -name = "syn" -version = "1.0.109" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" -dependencies = [ - "proc-macro2", - "quote", - "unicode-ident", -] - -[[package]] -name = "syn" -version = "2.0.101" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ce2b7fc941b3a24138a0a7cf8e858bfc6a992e7978a068a5c760deb0ed43caf" -dependencies = [ - "proc-macro2", - "quote", - "unicode-ident", -] - -[[package]] -name = "tar" -version = "0.4.44" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d863878d212c87a19c1a610eb53bb01fe12951c0501cf5a0d65f724914a667a" -dependencies = [ - "filetime", - "libc", - "xattr", -] - -[[package]] -name = "thiserror" -version = "1.0.69" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52" -dependencies = [ - "thiserror-impl 1.0.69", -] - -[[package]] -name = "thiserror" -version = "2.0.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "567b8a2dae586314f7be2a752ec7474332959c6460e02bde30d702a66d488708" -dependencies = [ - "thiserror-impl 2.0.12", -] - -[[package]] -name = "thiserror-impl" -version = "1.0.69" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.101", -] - -[[package]] -name = "thiserror-impl" -version = "2.0.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f7cf42b4507d8ea322120659672cf1b9dbb93f8f2d4ecfd6e51350ff5b17a1d" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.101", -] - -[[package]] -name = "thread-id" -version = "4.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cfe8f25bbdd100db7e1d34acf7fd2dc59c4bf8f7483f505eaa7d4f12f76cc0ea" -dependencies = [ - "libc", - "winapi", -] - -[[package]] -name = "toml" -version = "0.8.22" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05ae329d1f08c4d17a59bed7ff5b5a769d062e64a62d34a3261b219e62cd5aae" -dependencies = [ - "serde", - "serde_spanned", - "toml_datetime", - "toml_edit", -] - -[[package]] -name = "toml_datetime" -version = "0.6.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3da5db5a963e24bc68be8b17b6fa82814bb22ee8660f192bb182771d498f09a3" -dependencies = [ - "serde", -] - -[[package]] -name = "toml_edit" -version = "0.22.26" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "310068873db2c5b3e7659d2cc35d21855dbafa50d1ce336397c666e3cb08137e" -dependencies = [ - "indexmap", - "serde", - "serde_spanned", - "toml_datetime", - "toml_write", - "winnow", -] - -[[package]] -name = "toml_write" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfb942dfe1d8e29a7ee7fcbde5bd2b9a25fb89aa70caea2eba3bee836ff41076" - -[[package]] -name = "typemap-ors" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a68c24b707f02dd18f1e4ccceb9d49f2058c2fb86384ef9972592904d7a28867" -dependencies = [ - "unsafe-any-ors", -] - -[[package]] -name = "unicode-ident" -version = "1.0.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a5f39404a5da50712a4c1eecf25e90dd62b613502b7e925fd4e4d19b5c96512" - -[[package]] -name = "unsafe-any-ors" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0a303d30665362d9680d7d91d78b23f5f899504d4f08b3c4cf08d055d87c0ad" -dependencies = [ - "destructure_traitobject", -] - -[[package]] -name = "unsafe-libyaml" -version = "0.2.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "673aac59facbab8a9007c7f6108d11f63b603f7cabff99fabf650fea5c32b861" - -[[package]] -name = "updater" -version = "0.2.0" -dependencies = [ - "anyhow", - "dirs", - "flate2", - "fs_extra", - "log", - "log4rs", - "regex", - "tar", - "thiserror 2.0.12", - "toml", -] - -[[package]] -name = "wasi" -version = "0.11.0+wasi-snapshot-preview1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" - -[[package]] -name = "wasm-bindgen" -version = "0.2.100" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1edc8929d7499fc4e8f0be2262a241556cfc54a0bea223790e71446f2aab1ef5" -dependencies = [ - "cfg-if", - "once_cell", - "rustversion", - "wasm-bindgen-macro", -] - -[[package]] -name = "wasm-bindgen-backend" -version = "0.2.100" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f0a0651a5c2bc21487bde11ee802ccaf4c51935d0d3d42a6101f98161700bc6" -dependencies = [ - "bumpalo", - "log", - "proc-macro2", - "quote", - "syn 2.0.101", - "wasm-bindgen-shared", -] - -[[package]] -name = "wasm-bindgen-macro" -version = "0.2.100" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fe63fc6d09ed3792bd0897b314f53de8e16568c2b3f7982f468c0bf9bd0b407" -dependencies = [ - "quote", - "wasm-bindgen-macro-support", -] - -[[package]] -name = "wasm-bindgen-macro-support" -version = "0.2.100" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ae87ea40c9f689fc23f209965b6fb8a99ad69aeeb0231408be24920604395de" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.101", - "wasm-bindgen-backend", - "wasm-bindgen-shared", -] - -[[package]] -name = "wasm-bindgen-shared" -version = "0.2.100" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a05d73b933a847d6cccdda8f838a22ff101ad9bf93e33684f39c1f5f0eece3d" -dependencies = [ - "unicode-ident", -] - -[[package]] -name = "winapi" -version = "0.3.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" -dependencies = [ - "winapi-i686-pc-windows-gnu", - "winapi-x86_64-pc-windows-gnu", -] - -[[package]] -name = "winapi-i686-pc-windows-gnu" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" - -[[package]] -name = "winapi-x86_64-pc-windows-gnu" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" - -[[package]] -name = "windows-core" -version = "0.61.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0fdd3ddb90610c7638aa2b3a3ab2904fb9e5cdbecc643ddb3647212781c4ae3" -dependencies = [ - "windows-implement", - "windows-interface", - "windows-link", - "windows-result", - "windows-strings", -] - -[[package]] -name = "windows-implement" -version = "0.60.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a47fddd13af08290e67f4acabf4b459f647552718f683a7b415d290ac744a836" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.101", -] - -[[package]] -name = "windows-interface" -version = "0.59.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd9211b69f8dcdfa817bfd14bf1c97c9188afa36f4750130fcdf3f400eca9fa8" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.101", -] - -[[package]] -name = "windows-link" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76840935b766e1b0a05c0066835fb9ec80071d4c09a16f6bd5f7e655e3c14c38" - -[[package]] -name = "windows-result" -version = "0.3.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56f42bd332cc6c8eac5af113fc0c1fd6a8fd2aa08a0119358686e5160d0586c6" -dependencies = [ - "windows-link", -] - -[[package]] -name = "windows-strings" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56e6c93f3a0c3b36176cb1327a4958a0353d5d166c2a35cb268ace15e91d3b57" -dependencies = [ - "windows-link", -] - -[[package]] -name = "windows-sys" -version = "0.59.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" -dependencies = [ - "windows-targets", -] - -[[package]] -name = "windows-targets" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" -dependencies = [ - "windows_aarch64_gnullvm", - "windows_aarch64_msvc", - "windows_i686_gnu", - "windows_i686_gnullvm", - "windows_i686_msvc", - "windows_x86_64_gnu", - "windows_x86_64_gnullvm", - "windows_x86_64_msvc", -] - -[[package]] -name = "windows_aarch64_gnullvm" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" - -[[package]] -name = "windows_aarch64_msvc" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" - -[[package]] -name = "windows_i686_gnu" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" - -[[package]] -name = "windows_i686_gnullvm" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" - -[[package]] -name = "windows_i686_msvc" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" - -[[package]] -name = "windows_x86_64_gnu" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" - -[[package]] -name = "windows_x86_64_gnullvm" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" - -[[package]] -name = "windows_x86_64_msvc" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" - -[[package]] -name = "winnow" -version = "0.7.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c06928c8748d81b05c9be96aad92e1b6ff01833332f281e8cfca3be4b35fc9ec" -dependencies = [ - "memchr", -] - -[[package]] -name = "xattr" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d65cbf2f12c15564212d48f4e3dfb87923d25d611f2aed18f4cb23f0413d89e" -dependencies = [ - "libc", - "rustix", -] - -[[package]] -name = "zerocopy" -version = "0.8.25" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1702d9583232ddb9174e01bb7c15a2ab8fb1bc6f227aa1233858c351a3ba0cb" -dependencies = [ - "zerocopy-derive", -] - -[[package]] -name = "zerocopy-derive" -version = "0.8.25" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28a6e20d751156648aa063f3800b706ee209a32c0b4d9f24be3d980b01be55ef" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.101", -] diff --git a/application/apps/precompiled/updater/Cargo.toml b/application/apps/precompiled/updater/Cargo.toml deleted file mode 100644 index bec7da64eb..0000000000 --- a/application/apps/precompiled/updater/Cargo.toml +++ /dev/null @@ -1,17 +0,0 @@ -[package] -name = "updater" -version = "0.2.0" -authors = ["dmitry.astafyev ", "oliver.mueller "] -edition = "2024" - -[dependencies] -dirs = "6.0" -log = "0.4" -log4rs = "1.3" -anyhow = "1.0" -regex = "1.7" -fs_extra = "1.3" -thiserror = "2.0" -tar = "0.4" -flate2 = "1.1" -toml = "0.8" diff --git a/application/apps/precompiled/updater/log4rs.yaml b/application/apps/precompiled/updater/log4rs.yaml deleted file mode 100644 index 8b8da55cbe..0000000000 --- a/application/apps/precompiled/updater/log4rs.yaml +++ /dev/null @@ -1,29 +0,0 @@ -# chipmunk_logconf_version: 1.0 -refresh_rate: 30 seconds - -# The "appenders" map contains the set of appenders, indexed by their names. -appenders: - logger-root: - kind: file - path: $LOG_PATH - encoder: - kind: pattern - pattern: "{d} [{M}] {l}:: {m}\n" - -root: - # level: off - # level: error - level: trace - # level: info - # level: debug - # level: trace - - appenders: - - logger-root - -loggers: - updater: - level: trace - appenders: - - logger-root - additive: false diff --git a/application/apps/precompiled/updater/rustfmt.toml b/application/apps/precompiled/updater/rustfmt.toml deleted file mode 100644 index e86028b10d..0000000000 --- a/application/apps/precompiled/updater/rustfmt.toml +++ /dev/null @@ -1 +0,0 @@ -imports_granularity="Crate" diff --git a/application/apps/precompiled/updater/src/env/args.rs b/application/apps/precompiled/updater/src/env/args.rs deleted file mode 100644 index 27fe2df220..0000000000 --- a/application/apps/precompiled/updater/src/env/args.rs +++ /dev/null @@ -1,121 +0,0 @@ -use regex::Regex; -use std::path::PathBuf; -use thiserror::Error; - -const ARGUMENTS_SEPORATOR: &str = "%sep%"; - -#[derive(Error, Debug)] -pub enum ArgumentsError { - #[error("Deserialization error ({0})")] - Deserialization(String), - #[error("Format error ({0})")] - Format(String), - #[error("Validation error ({0})")] - Validation(String), - #[error("Location error ({0})")] - Location(String), -} -pub struct Arguments { - pub app: PathBuf, - pub app_name: String, - pub location: PathBuf, - pub compressed: PathBuf, - // `pid` and `ppid` aren't used yet but they can be used to check shutdown status by parent process. - #[allow(dead_code)] - pub pid: Option, - #[allow(dead_code)] - pub ppid: Option, -} - -impl Arguments { - pub fn new() -> Result { - let args = std::env::args().collect::>(); - log::debug!("Original arguments: {args:?}"); - let args_as_str = Self::deserialize_spaces(args.join(""))?; - log::debug!("Merged args: {args_as_str}"); - let from = args_as_str - .chars() - .position(|c| c == '[') - .ok_or(ArgumentsError::Format(String::from( - "Fail to find symbol [ in arguments", - )))?; - let to = args_as_str - .chars() - .position(|c| c == ']') - .ok_or(ArgumentsError::Format(String::from( - "Fail to find symbol ] in arguments", - )))?; - if args_as_str.len() <= to { - return Err(ArgumentsError::Format(format!( - "Len of merged string {}, but right border: {to}", - args_as_str.len() - ))); - } - let params_as_str = args_as_str[(from + 1)..to].to_string(); - log::debug!("extracted arguments: {params_as_str}"); - let params = params_as_str - .split(ARGUMENTS_SEPORATOR) - .collect::>(); - if params.len() < 2 { - return Err(ArgumentsError::Format(format!( - "Expecting at least 2 arguments; found {}", - params.len() - ))); - } - let app = PathBuf::from(params[0]); - let compressed = PathBuf::from(params[1]); - if !app.exists() { - return Err(ArgumentsError::Validation(format!( - "{app:?} doesn't exist." - ))); - } - if !compressed.exists() { - return Err(ArgumentsError::Validation(format!( - "{app:?} doesn't exist." - ))); - } - let pid = Self::extract_usize(¶ms, "PID", 2); - let ppid = Self::extract_usize(¶ms, "PPID", 3); - let location = app - .parent() - .ok_or(ArgumentsError::Location(format!("No parent for {app:?}")))? - .to_path_buf(); - let app_name = app - .file_name() - .ok_or(ArgumentsError::Location(format!( - "No application name for {app:?}" - )))? - .to_string_lossy() - .to_string(); - log::debug!( - "Summary of parsed arguments:\n- app: {app:?}\n- compressed: {compressed:?}\n- pid: {pid:?}\n- ppid: {ppid:?}\n- location: {location:?}\n- app_name: {app_name:?}" - ); - Ok(Self { - app, - compressed, - pid, - ppid, - location, - app_name, - }) - } - - fn deserialize_spaces(str: String) -> Result { - let re = Regex::new(r"%20").map_err(|e| ArgumentsError::Deserialization(e.to_string()))?; - Ok(re.replace_all(&str, " ").to_string()) - } - - fn extract_usize(params: &[&str], alias: &str, index: usize) -> Option { - if params.len() > index { - match params[index].parse::() { - Ok(v) => Some(v), - Err(e) => { - log::warn!("fail to parse {alias}; error: {e:?}"); - None - } - } - } else { - None - } - } -} diff --git a/application/apps/precompiled/updater/src/env/compressed.rs b/application/apps/precompiled/updater/src/env/compressed.rs deleted file mode 100644 index 7b6639cbdf..0000000000 --- a/application/apps/precompiled/updater/src/env/compressed.rs +++ /dev/null @@ -1,76 +0,0 @@ -use flate2::read::GzDecoder; -use std::{ - fs::{self, File}, - path::PathBuf, -}; -use tar::Archive; -use thiserror::Error; - -#[derive(Error, Debug)] -pub enum CompressedError { - #[error("Location error ({0})")] - Location(String), - #[error("Unpack error ({0})")] - Unpack(String), - #[error("Removing error ({0})")] - Removing(String), -} - -pub struct Compressed { - release_file: PathBuf, - pub location: PathBuf, -} - -impl Compressed { - pub fn new(release_file: &PathBuf) -> Result { - Ok(Self { - release_file: release_file.clone(), - location: release_file - .parent() - .ok_or(CompressedError::Location(format!( - "No parent for {release_file:?}" - )))? - .to_path_buf(), - }) - } - - pub fn unpack(&self, dest: &PathBuf) -> Result<(), CompressedError> { - log::debug!( - "File {:?} will be unpacked into {:?}", - self.release_file, - dest - ); - let tar_gz = File::open(&self.release_file).map_err(|e| { - CompressedError::Unpack(format!( - "Cannot open release file {:?}: {e:?}", - self.release_file - )) - })?; - let tar = GzDecoder::new(tar_gz); - let mut archive = Archive::new(tar); - archive.unpack(dest).map_err(|e| { - CompressedError::Unpack(format!( - "Cannot unpack release file {:?}: {e:?}", - self.release_file - )) - })?; - log::debug!( - "File {:?} has been unpacked into {:?}", - self.release_file, - dest - ); - if let Err(err) = self.clean() { - log::warn!( - "File {:?} has not been removed; error: {err}", - self.release_file, - ); - } else { - log::debug!("File {:?} has been removed", self.release_file,); - } - Ok(()) - } - - fn clean(&self) -> Result<(), CompressedError> { - fs::remove_file(&self.release_file).map_err(|e| CompressedError::Removing(e.to_string())) - } -} diff --git a/application/apps/precompiled/updater/src/env/fs.rs b/application/apps/precompiled/updater/src/env/fs.rs deleted file mode 100644 index 070f835042..0000000000 --- a/application/apps/precompiled/updater/src/env/fs.rs +++ /dev/null @@ -1,13 +0,0 @@ -use std::{fs, path::Path}; - -pub fn remove_entity(entity: &Path) -> Result<(), std::io::Error> { - if !entity.exists() { - return Ok(()); - } - if entity.is_dir() { - fs::remove_dir_all(entity)?; - } else if entity.is_file() { - fs::remove_file(entity)?; - } - Ok(()) -} diff --git a/application/apps/precompiled/updater/src/env/logs.rs b/application/apps/precompiled/updater/src/env/logs.rs deleted file mode 100644 index e19b17b202..0000000000 --- a/application/apps/precompiled/updater/src/env/logs.rs +++ /dev/null @@ -1,27 +0,0 @@ -use crate::env::fs::remove_entity; -use anyhow::{Result, *}; -use log4rs; -use std::path::PathBuf; - -pub fn chipmunk_home_dir() -> PathBuf { - dirs::home_dir() - .expect("we need to have access to home-dir") - .join(".chipmunk") -} - -pub fn chipmunk_log_config() -> PathBuf { - chipmunk_home_dir().join("log4rs_updater.yaml") -} - -pub fn initialize_from_fresh_yml() -> Result<()> { - let home_dir = dirs::home_dir().ok_or_else(|| anyhow!("Could not access home-directory"))?; - let log_config_path = chipmunk_log_config(); - let log_path = chipmunk_home_dir().join("chipmunk.updater.log"); - let log_config_content = std::include_str!("../../log4rs.yaml") - .replace("$LOG_PATH", &log_path.to_string_lossy()) - .replace("$HOME_DIR", &home_dir.to_string_lossy()); - remove_entity(&log_config_path)?; - std::fs::write(&log_config_path, log_config_content)?; - log4rs::init_file(&log_config_path, Default::default())?; - Ok(()) -} diff --git a/application/apps/precompiled/updater/src/env/mod.rs b/application/apps/precompiled/updater/src/env/mod.rs deleted file mode 100644 index 50e424a186..0000000000 --- a/application/apps/precompiled/updater/src/env/mod.rs +++ /dev/null @@ -1,6 +0,0 @@ -pub mod args; -pub mod compressed; -pub mod fs; -pub mod logs; -pub mod release_files; -pub mod sys; diff --git a/application/apps/precompiled/updater/src/env/release_files.rs b/application/apps/precompiled/updater/src/env/release_files.rs deleted file mode 100644 index 8b7f857bbb..0000000000 --- a/application/apps/precompiled/updater/src/env/release_files.rs +++ /dev/null @@ -1,95 +0,0 @@ -use crate::env; -use std::{fs, path::PathBuf, thread, time}; -use thiserror::Error; - -const RELEASE_FILE_NAME: &str = ".release"; -const PEDNING_CLOSING_APP_TIME_MS: u64 = 3000; -const ATTEMPTS_TO_REMOVE: u8 = 5; - -#[derive(Error, Debug)] -pub enum ReleaseFilesError { - #[error("NoReleaseFile error ({0})")] - NoReleaseFile(String), - #[error("Reading error ({0})")] - Reading(String), - #[error("Removing error ({0})")] - Removing(String), -} -pub struct ReleaseFiles { - app_folder: PathBuf, - entries: Vec, -} - -impl ReleaseFiles { - pub fn new(app_folder: &PathBuf) -> Result { - log::debug!("Looking for release file {RELEASE_FILE_NAME} in {app_folder:?}"); - let release_file: PathBuf = app_folder.to_path_buf().join(RELEASE_FILE_NAME); - if !release_file.exists() { - log::error!("Release file {release_file:?} doesn't exist"); - return Err(ReleaseFilesError::NoReleaseFile(format!( - "{RELEASE_FILE_NAME} doesn't exist in {app_folder:?}" - ))); - } - log::debug!("Reading release file {release_file:?}"); - match fs::read_to_string(&release_file) { - Err(e) => Err(ReleaseFilesError::Reading(format!( - "Fail to read {RELEASE_FILE_NAME}: {e:?}" - ))), - Ok(content) => Ok(ReleaseFiles { - app_folder: app_folder.clone(), - entries: content.lines().map(|s| s.to_string()).collect(), - }), - } - } - - pub fn remove(&self) -> Result<(), ReleaseFilesError> { - let mut attempts: u8 = 0; - loop { - log::info!( - "Will sleep {PEDNING_CLOSING_APP_TIME_MS}ms to let parent app to be closed." - ); - let waiting = time::Duration::from_millis(PEDNING_CLOSING_APP_TIME_MS); - thread::sleep(waiting); - log::debug!( - "Removing previous release files from {:?}; attempt #{}", - self.app_folder, - attempts + 1 - ); - match self.try_to_remove() { - Ok(_) => { - log::debug!( - "Previous release files has been removed from {:?} with attempt #{}", - self.app_folder, - attempts + 1 - ); - return Ok(()); - } - Err(e) => { - attempts += 1; - log::warn!("Attempt #{attempts} of removing application failed: {e}"); - if attempts > ATTEMPTS_TO_REMOVE { - log::error!("No more attempts to remove application will be done"); - return Err(ReleaseFilesError::Removing(format!( - "Fail to remove files with {attempts} attempts" - ))); - } - } - }; - } - } - - fn try_to_remove(&self) -> Result<(), ReleaseFilesError> { - for entity in self.entries.iter() { - let path = self.app_folder.join(entity); - if path.exists() { - env::fs::remove_entity(&path).map_err(|e| { - ReleaseFilesError::Removing(format!("Fail to remove {path:?}: {e:?}")) - })?; - log::info!("- [removed]: {path:?}"); - } else { - log::warn!("- [not found]: {path:?}"); - } - } - Ok(()) - } -} diff --git a/application/apps/precompiled/updater/src/env/sys.rs b/application/apps/precompiled/updater/src/env/sys.rs deleted file mode 100644 index 7f3c572313..0000000000 --- a/application/apps/precompiled/updater/src/env/sys.rs +++ /dev/null @@ -1,70 +0,0 @@ -use anyhow::{Result, *}; -use std::{ - path::PathBuf, - process::{Child, Command}, - result::Result::Ok, -}; -use toml::Value; - -fn spawn(exe: &str, args: &[&str]) -> Result { - Command::new(exe) - .args(args) - .spawn() - .map_err(|e| anyhow!("could not spawn {exe} as a process ({e})")) -} - -pub fn start(app: PathBuf) -> Result<()> { - let to_be_started: PathBuf = if cfg!(target_os = "macos") { - app.join("Contents/MacOS/chipmunk") - } else { - app - }; - log::debug!("restarting app: {to_be_started:?}"); - if !to_be_started.exists() { - Err(anyhow!("Failed to restart, couldn't find executable file")) - } else { - log::debug!("Starting: {:?}", &to_be_started); - spawn( - to_be_started - .to_str() - .expect("process for starting could not be spawned"), - &[], - ) - .map_err(|e| anyhow!("Fail to start app due error: {e}")) - .map(|_| ()) - } -} - -pub fn version() -> String { - let cargo_toml = std::include_str!("../../Cargo.toml"); - let defaults = String::from("not_found"); - if let Ok(value) = cargo_toml.parse::() { - let as_table = if let Some(as_table) = value.as_table() { - as_table - } else { - return defaults; - }; - let package = if let Some(package) = as_table.get("package") { - package - } else { - return defaults; - }; - let as_table = if let Some(as_table) = package.as_table() { - as_table - } else { - return defaults; - }; - let version = if let Some(version) = as_table.get("version") { - version - } else { - return defaults; - }; - if let Some(version) = version.as_str() { - version.to_owned() - } else { - defaults - } - } else { - String::from("unknown") - } -} diff --git a/application/apps/precompiled/updater/src/main.rs b/application/apps/precompiled/updater/src/main.rs deleted file mode 100644 index 4a8e63bb8a..0000000000 --- a/application/apps/precompiled/updater/src/main.rs +++ /dev/null @@ -1,50 +0,0 @@ -#[macro_use] -extern crate log; -extern crate log4rs; -mod env; -mod updater; - -use env::args::Arguments; -use thiserror::Error; - -#[derive(Error, Debug)] -pub enum GeneralError { - #[error("Logger error ({0})")] - Logger(String), - #[error("Arguments error ({0})")] - Arguments(env::args::ArgumentsError), - #[error("Update error ({0})")] - UpdateError(updater::UpdateError), - #[error("Sys error ({0})")] - SysError(String), -} - -fn main() -> Result<(), GeneralError> { - let version = env::sys::version(); - println!("[updater ver: {version}] Updating chipmunk..."); - println!( - "Please do not close this terminal, it will be closed as soon as chipmunk will be updated." - ); - env::logs::initialize_from_fresh_yml().map_err(|e| { - eprintln!("Couldn't initialize logging: {e}"); - GeneralError::Logger(e.to_string()) - })?; - log::debug!("Updater ver. {version} has been started"); - let args = Arguments::new().map_err(|e| { - log::error!("Fail to parse arguments: {e:?}"); - GeneralError::Arguments(e) - })?; - let app_path = args.app.clone(); - updater::update(args).map_err(|e| { - log::error!("Fail to update: {e:?}"); - GeneralError::UpdateError(e) - })?; - log::debug!("Chipmunk has been updated"); - env::sys::start(app_path).map_err(|e| { - log::error!("Fail to restart application: {e}"); - GeneralError::SysError(e.to_string()) - })?; - log::debug!("Restarting is triggered"); - log::debug!("Good buy!"); - Ok(()) -} diff --git a/application/apps/precompiled/updater/src/updater/linux.rs b/application/apps/precompiled/updater/src/updater/linux.rs deleted file mode 100644 index 16629762ed..0000000000 --- a/application/apps/precompiled/updater/src/updater/linux.rs +++ /dev/null @@ -1,35 +0,0 @@ -use crate::{ - env::{args::Arguments, compressed::Compressed, release_files::ReleaseFiles}, - updater::{UpdateError, Updater}, -}; - -pub struct PlatformUpdater { - args: Arguments, - compressed: Compressed, -} - -impl Updater for PlatformUpdater { - fn new(args: Arguments, compressed: Compressed) -> Result, UpdateError> { - if cfg!(target_os = "linux") { - Ok(Box::new(PlatformUpdater { args, compressed })) - } else { - Err(UpdateError::InvalidPlatform(String::from( - "Expecting linux platform", - ))) - } - } - - fn update(&self) -> Result<(), UpdateError> { - // Extract previous release files - let release_files = - ReleaseFiles::new(&self.args.location).map_err(UpdateError::ReleaseFilesError)?; - // Remove previous release files - release_files - .remove() - .map_err(UpdateError::ReleaseFilesError)?; - // Extract new release into location of previous release - self.compressed - .unpack(&self.args.location) - .map_err(UpdateError::CompressedError) - } -} diff --git a/application/apps/precompiled/updater/src/updater/macos.rs b/application/apps/precompiled/updater/src/updater/macos.rs deleted file mode 100644 index c5fdc0c9d2..0000000000 --- a/application/apps/precompiled/updater/src/updater/macos.rs +++ /dev/null @@ -1,70 +0,0 @@ -use crate::{ - env::{args::Arguments, compressed::Compressed}, - updater::{UpdateError, Updater}, -}; -use fs_extra::dir; -use std::fs; - -const DEFAULT_MAC_APP_FOLDER: &str = "chipmunk.app"; - -pub struct PlatformUpdater { - args: Arguments, - compressed: Compressed, -} - -impl Updater for PlatformUpdater { - fn new(args: Arguments, compressed: Compressed) -> Result, UpdateError> { - if cfg!(target_os = "macos") { - Ok(Box::new(PlatformUpdater { args, compressed })) - } else { - Err(UpdateError::InvalidPlatform(String::from( - "Expecting macos platform", - ))) - } - } - - fn update(&self) -> Result<(), UpdateError> { - // Extract new release into temp location - self.compressed - .unpack(&self.compressed.location) - .map_err(UpdateError::CompressedError)?; - // Rename application if it was renamed by user - if self.args.app_name != *DEFAULT_MAC_APP_FOLDER { - log::debug!( - "Chipmunk application folder had been renamed by user to {:?}; downloaded version of application should be renamed too.", - self.args.app_name - ); - let renamed_app_name = self.compressed.location.join(&self.args.app_name); - if renamed_app_name.exists() { - log::debug!("Detected {renamed_app_name:?}. This app-bundle will be removed",); - if let Err(err) = fs::remove_dir_all(&renamed_app_name) { - log::warn!("Fail to remove app-bundle {renamed_app_name:?} due error {err}",); - } else { - log::debug!("file {renamed_app_name:?} removed"); - } - } - fs::rename( - self.compressed.location.join(DEFAULT_MAC_APP_FOLDER), - &renamed_app_name, - ) - .map_err(|e| UpdateError::IO(format!("Fail to do renaming: {e}")))?; - log::debug!("Chipmunk application has been renamed to {renamed_app_name:?}"); - } - // Copy files - let mut options = dir::CopyOptions::new(); - options.overwrite = true; - let src = self.compressed.location.join(&self.args.app_name); - let dest = &self.args.location; - log::debug!("Will copy {src:?} to {dest:?}"); - dir::copy(&src, dest, &options) - .map_err(|e| UpdateError::IO(format!("Fail to copy folder: {e:?}")))?; - debug!("All copied from {src:?} to {dest:?}"); - // Clean up - if let Err(err) = fs::remove_dir_all(&src) { - log::warn!("Fail to remove app-bundle {src:?} due error {err}",); - } else { - log::debug!("file {src:?} removed"); - } - Ok(()) - } -} diff --git a/application/apps/precompiled/updater/src/updater/mod.rs b/application/apps/precompiled/updater/src/updater/mod.rs deleted file mode 100644 index 3cc628de44..0000000000 --- a/application/apps/precompiled/updater/src/updater/mod.rs +++ /dev/null @@ -1,42 +0,0 @@ -use crate::env::{ - args::Arguments, - compressed::{Compressed, CompressedError}, - release_files::ReleaseFilesError, -}; -use thiserror::Error; - -mod linux; -mod macos; -mod win; - -#[derive(Error, Debug)] -pub enum UpdateError { - #[error("InvalidPlatform error ({0})")] - InvalidPlatform(String), - #[error("UnsupportedPlatform error")] - UnsupportedPlatform, - #[error("CompressedError error ({0})")] - CompressedError(CompressedError), - #[error("ReleaseFilesError error ({0})")] - ReleaseFilesError(ReleaseFilesError), - #[error("IO error ({0})")] - IO(String), -} - -pub trait Updater { - fn new(args: Arguments, compressed: Compressed) -> Result, UpdateError>; - fn update(&self) -> Result<(), UpdateError>; -} - -pub fn update(args: Arguments) -> Result<(), UpdateError> { - let compressed = Compressed::new(&args.compressed).map_err(UpdateError::CompressedError)?; - if cfg!(target_os = "windows") { - win::PlatformUpdater::new(args, compressed)?.update() - } else if cfg!(target_os = "linux") { - linux::PlatformUpdater::new(args, compressed)?.update() - } else if cfg!(target_os = "macos") { - macos::PlatformUpdater::new(args, compressed)?.update() - } else { - Err(UpdateError::UnsupportedPlatform) - } -} diff --git a/application/apps/precompiled/updater/src/updater/win.rs b/application/apps/precompiled/updater/src/updater/win.rs deleted file mode 100644 index f21fd250c2..0000000000 --- a/application/apps/precompiled/updater/src/updater/win.rs +++ /dev/null @@ -1,34 +0,0 @@ -use crate::{ - env::{args::Arguments, compressed::Compressed, release_files::ReleaseFiles}, - updater::{UpdateError, Updater}, -}; -pub struct PlatformUpdater { - args: Arguments, - compressed: Compressed, -} - -impl Updater for PlatformUpdater { - fn new(args: Arguments, compressed: Compressed) -> Result, UpdateError> { - if cfg!(target_os = "windows") { - Ok(Box::new(PlatformUpdater { args, compressed })) - } else { - Err(UpdateError::InvalidPlatform(String::from( - "Expecting windows platform", - ))) - } - } - - fn update(&self) -> Result<(), UpdateError> { - // Extract previous release files - let release_files = - ReleaseFiles::new(&self.args.location).map_err(UpdateError::ReleaseFilesError)?; - // Remove previous release files - release_files - .remove() - .map_err(UpdateError::ReleaseFilesError)?; - // Extract new release into location of previous release - self.compressed - .unpack(&self.args.location) - .map_err(UpdateError::CompressedError) - } -} diff --git a/application/apps/protocol/.gitignore b/application/apps/protocol/.gitignore deleted file mode 100644 index 5c01e4e0c4..0000000000 --- a/application/apps/protocol/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ -./target -!./pkg -!*.js -Cargo.lock diff --git a/application/apps/protocol/Cargo.toml b/application/apps/protocol/Cargo.toml deleted file mode 100644 index ee1919cddc..0000000000 --- a/application/apps/protocol/Cargo.toml +++ /dev/null @@ -1,17 +0,0 @@ -[package] -name = "protocol" -version = "0.1.0" -edition = "2024" - -[lib] -crate-type = ["cdylib"] - -[dependencies] -serde-wasm-bindgen = "0.6" -wasm-bindgen = "0.2" -serde = { version = "1.0", features = ["derive"] } -thiserror = "2.0" -wasm-bindgen-test = "0.3" -stypes = { path = "../indexer/stypes"} -paste = "1.0" - diff --git a/application/apps/protocol/src/err.rs b/application/apps/protocol/src/err.rs deleted file mode 100644 index 7eb8ed8aab..0000000000 --- a/application/apps/protocol/src/err.rs +++ /dev/null @@ -1,34 +0,0 @@ -use thiserror::Error; -use wasm_bindgen::JsValue; - -#[derive(Error, Debug)] -pub enum E { - #[error("Missed field {0}")] - MissedField(String), - #[error("Invalid value of: {0}")] - InvalidValue(String), - #[error("Codec decode error: {0}")] - CodecDecodeError(String), - #[error("Codec encode error: {0}")] - CodecEncodeError(String), - #[error("Decode error: {0}")] - DecodeError(String), - #[error("Encode error: {0}")] - EncodeError(String), - #[error("Binding error: {0}")] - Binding(serde_wasm_bindgen::Error), - #[error("Not yet implemented feature")] - NotImplemented, -} - -impl From for E { - fn from(err: serde_wasm_bindgen::Error) -> Self { - Self::Binding(err) - } -} - -impl From for JsValue { - fn from(val: E) -> Self { - JsValue::from_str(&val.to_string()) - } -} diff --git a/application/apps/protocol/src/generate.rs b/application/apps/protocol/src/generate.rs deleted file mode 100644 index 40d8536720..0000000000 --- a/application/apps/protocol/src/generate.rs +++ /dev/null @@ -1,106 +0,0 @@ -#[macro_export] -macro_rules! gen_encode_decode_fns { - // All regular use cases: gen_encode_decode_fns!(ObserveOptions); - ($type:ident) => { - paste::item! { - #[wasm_bindgen] - #[allow(non_snake_case)] - pub fn [](buf: &[u8]) -> Result { - let serializer = Serializer::new() - .serialize_missing_as_null(true) - .serialize_maps_as_objects(false) - .serialize_large_number_types_as_bigints(false); - $type::decode(buf) - .map_err(E::CodecDecodeError)? - .serialize(&serializer) - .map_err(|e| E::DecodeError(e.to_string())) - } - - #[wasm_bindgen] - #[allow(non_snake_case)] - pub fn [](val: JsValue) -> Result, E> { - from_value::<$type>(val)? - .encode() - .map_err(E::DecodeError) - } - } - }; - - // Subtype returns void: gen_encode_decode_fns!(CommandOutcome<()>); - ($type:ident<()>) => { - paste::item! { - #[wasm_bindgen] - #[allow(non_snake_case)] - pub fn [](buf: &[u8]) -> Result { - let serializer = Serializer::new() - .serialize_missing_as_null(true) - .serialize_maps_as_objects(false) - .serialize_large_number_types_as_bigints(false); - $type::<()>::decode(buf) - .map_err(E::CodecDecodeError)? - .serialize(&serializer) - .map_err(|e| E::DecodeError(e.to_string())) - } - - #[wasm_bindgen] - #[allow(non_snake_case)] - pub fn [](val: JsValue) -> Result, E> { - from_value::<$type::<()>>(val)? - .encode() - .map_err(E::DecodeError) - } - } - }; - - // With subtypes: gen_encode_decode_fns!(CommandOutcome); - ($type:ident<$generic:ident>) => { - paste::item! { - #[wasm_bindgen] - #[allow(non_snake_case)] - pub fn [](buf: &[u8]) -> Result { - let serializer = Serializer::new() - .serialize_missing_as_null(true) - .serialize_maps_as_objects(false) - .serialize_large_number_types_as_bigints(false); - $type::<$generic>::decode(buf) - .map_err(E::CodecDecodeError)? - .serialize(&serializer) - .map_err(|e| E::DecodeError(e.to_string())) - } - - #[wasm_bindgen] - #[allow(non_snake_case)] - pub fn [](val: JsValue) -> Result, E> { - from_value::<$type::<$generic>>(val)? - .encode() - .map_err(E::DecodeError) - } - } - }; - - // With nested subtypes: gen_encode_decode_fns!(CommandOutcome>); - ($type:ident<$generic:ident<$nested:ident>>) => { - paste::item! { - #[wasm_bindgen] - #[allow(non_snake_case)] - pub fn [](buf: &[u8]) -> Result { - let serializer = Serializer::new() - .serialize_missing_as_null(true) - .serialize_maps_as_objects(false) - .serialize_large_number_types_as_bigints(false); - $type::<$generic<$nested>>::decode(buf) - .map_err(E::CodecDecodeError)? - .serialize(&serializer) - .map_err(|e| E::DecodeError(e.to_string())) - } - - #[wasm_bindgen] - #[allow(non_snake_case)] - pub fn [](val: JsValue) -> Result, E> { - from_value::<$type::<$generic<$nested>>>(val)? - .encode() - .map_err(E::DecodeError) - } - } - }; -} diff --git a/application/apps/protocol/src/lib.rs b/application/apps/protocol/src/lib.rs deleted file mode 100644 index 4239bd50aa..0000000000 --- a/application/apps/protocol/src/lib.rs +++ /dev/null @@ -1,208 +0,0 @@ -/// The `protocol` crate is a WebAssembly-wrapped version of the `stypes` crate, designed for encoding -/// and decoding message types used both on the Rust side and the Node.js side (including client-side code). -/// -/// Code generation for `wasm_bindgen` is handled by the `gen_encode_decode_fns` macro, which sets up -/// the necessary encode/decode functions. For example: -/// -/// ``` -/// gen_encode_decode_fns!(ObserveOptions); -/// ``` -/// -/// This will generate: -/// -/// ```ignore -/// #[wasm_bindgen] -/// #[allow(non_snake_case)] -/// pub fn decodeObserveOptions(buf: &[u8]) -> Result { -/// let serializer = Serializer::new() -/// .serialize_missing_as_null(true) -/// .serialize_maps_as_objects(false) -/// .serialize_large_number_types_as_bigints(false); -/// -/// ObserveOptions::decode(buf) -/// .map_err(E::CodecDecodeError)? -/// .serialize(&serializer) -/// .map_err(|e| E::DecodeError(e.to_string())) -/// } -/// -/// #[wasm_bindgen] -/// #[allow(non_snake_case)] -/// pub fn encodeObserveOptions(val: JsValue) -> Result, E> { -/// from_value::(val)? -/// .encode() -/// .map_err(E::DecodeError) -/// } -/// ``` -/// -/// As a result, on the Node.js side you can directly decode and encode `ObserveOptions`: -/// -/// ```ignore -/// import * as protocol from "protocol"; -/// -/// // Decoding -/// const bytes: Uint8Array = get_bytes(); -/// const msg = protocol.decodeObserveOptions(bytes); -/// -/// // Encoding -/// const obj: ObserveOptions = ...; -/// cosnt bytes = protocol.encodeObserveOptions(obj); -/// ``` -/// -/// It's important to note that `wasm_bindgen` does not generate type definitions (`.d.ts` files), -/// so the decoding function will return `any`, and the encoding function will accept `any`. -/// Ensuring that the correct types are passed is therefore beyond the scope of this crate. -/// While supplying an invalid byte sequence (one that doesn't match the expected data type) -/// will cause an error to be thrown, it is theoretically possible (though unlikely) -/// that an incorrect byte sequence could decode into a valid but unexpected type. -/// Therefore, when using this crate, ensure that the expected data type aligns with the chosen -/// decode function. -/// -/// ## Adding New Types -/// To add new types, follow the steps below. -/// -/// ### Updating `stypes` -/// - Add your new type to the `stypes` crate. -/// - **Important:** Ensure that `proptest` tests are implemented in `stypes` for the new type. -/// This is a mandatory requirement when introducing any new type. -/// - If the type is directly used in `rs-bindings`, add an implementation of the trait `TryIntoJs`. This can -/// be easily done by using the macro `try_into_js`. -/// - Add TypeScript definitions. This step can also be done mostly automatically by adding -/// `#[cfg_attr(test, derive(TS), ts(export, export_to = "module_name.ts"))]` above the -/// definition of your type. Make sure you are using the correct `module_name`. The TypeScript type -/// definition will be placed into `application/apps/indexer/stypes/bindings/module_name.ts`. -/// Writing of types happens by executing tests (`cargo test`). -/// As soon as a new TypeScript definition has been created, you have to manually copy it into -/// `application/platform/types/bindings`. -/// **Important:** Do not remove `application/apps/indexer/stypes/bindings/index.ts`. This file -/// isn't generated and is created manually. If you are introducing a new -/// module along with your type, please add a reference to it in the `index.ts` file. -/// -/// ### Updating `protocol` -/// Once the type is added to `stypes`, simply reference it in `protocol`: -/// ```ignore -/// gen_encode_decode_fns!(MyRecentlyAddedType); -/// ``` -/// -/// ### Updating test in `ts-bindings` -/// As soon as type was added, you have to update map in `application/apps/rustcore/ts-bindings/spec/session.protocol.spec.ts`. -/// Add name of your type and link it to related decode function -/// -/// ``` -/// const MAP: { [key: string]: (buf: Uint8Array) => any } = { -/// AroundIndexes: protocol.decodeAroundIndexes, -/// ... -/// AttachmentList: protocol.decodeAttachmentList, -/// } -/// ``` -/// -/// ### Verification -/// To verify your changes, run the `test.sh` script. This test uses `proptest` in `stypes` to -/// randomly generate values for all types, then serialize them as bytes to temporary files. Next, -/// it uses `proptest` within `ts-bindings` to decode all these messages. -/// -/// - If the process fails, `test.sh` will report an error. -/// - If it succeeds, you can consider the new type successfully integrated. -mod err; -mod generate; - -pub(crate) use err::*; -pub(crate) use serde::Serialize; -pub(crate) use serde_wasm_bindgen::{Serializer, from_value}; -pub(crate) use stypes::*; -pub(crate) use wasm_bindgen::prelude::*; - -gen_encode_decode_fns!(ObserveOptions); -gen_encode_decode_fns!(MulticastInfo); -gen_encode_decode_fns!(UdpConnectionInfo); -gen_encode_decode_fns!(ParserType); -gen_encode_decode_fns!(DltParserSettings); -gen_encode_decode_fns!(SomeIpParserSettings); -gen_encode_decode_fns!(Transport); -gen_encode_decode_fns!(ProcessTransportConfig); -gen_encode_decode_fns!(SerialTransportConfig); -gen_encode_decode_fns!(TCPTransportConfig); -gen_encode_decode_fns!(UDPTransportConfig); -gen_encode_decode_fns!(FileFormat); -gen_encode_decode_fns!(ObserveOrigin); -gen_encode_decode_fns!(FoldersScanningResult); -gen_encode_decode_fns!(DltStatisticInfo); -gen_encode_decode_fns!(ShellType); -gen_encode_decode_fns!(ShellProfile); -gen_encode_decode_fns!(ProfileList); -gen_encode_decode_fns!(PluginParserSettings); -gen_encode_decode_fns!(PluginParserGeneralSettings); -gen_encode_decode_fns!(PluginByteSourceSettings); -gen_encode_decode_fns!(PluginByteSourceGeneralSettings); -gen_encode_decode_fns!(PluginConfigItem); -gen_encode_decode_fns!(PluginConfigValue); -gen_encode_decode_fns!(PluginConfigSchemaType); -gen_encode_decode_fns!(PluginConfigSchemaItem); -gen_encode_decode_fns!(PluginEntity); -gen_encode_decode_fns!(PluginLogLevel); -gen_encode_decode_fns!(PluginLogMessage); -gen_encode_decode_fns!(PluginRunData); -gen_encode_decode_fns!(PluginMetadata); -gen_encode_decode_fns!(PluginType); -gen_encode_decode_fns!(PluginInfo); -gen_encode_decode_fns!(InvalidPluginEntity); -gen_encode_decode_fns!(SemanticVersion); -gen_encode_decode_fns!(RenderOptions); -gen_encode_decode_fns!(ParserRenderOptions); -gen_encode_decode_fns!(ColumnsRenderOptions); -gen_encode_decode_fns!(ColumnInfo); -gen_encode_decode_fns!(PluginsList); -gen_encode_decode_fns!(InvalidPluginsList); -gen_encode_decode_fns!(PluginsPathsList); -gen_encode_decode_fns!(CommandOutcome); -gen_encode_decode_fns!(CommandOutcome); -gen_encode_decode_fns!(CommandOutcome); -gen_encode_decode_fns!(CommandOutcome>); -gen_encode_decode_fns!(CommandOutcome>); -gen_encode_decode_fns!(CommandOutcome>); -gen_encode_decode_fns!(CommandOutcome); -gen_encode_decode_fns!(CommandOutcome); -gen_encode_decode_fns!(CommandOutcome); -gen_encode_decode_fns!(CommandOutcome); -gen_encode_decode_fns!(CommandOutcome); -gen_encode_decode_fns!(CommandOutcome<()>); -gen_encode_decode_fns!(CommandOutcome); -gen_encode_decode_fns!(CommandOutcome>); -gen_encode_decode_fns!(CommandOutcome); -gen_encode_decode_fns!(CommandOutcome); -gen_encode_decode_fns!(ComputationError); -gen_encode_decode_fns!(CallbackEvent); -gen_encode_decode_fns!(NativeError); -gen_encode_decode_fns!(NativeErrorKind); -gen_encode_decode_fns!(Severity); -gen_encode_decode_fns!(OperationDone); -gen_encode_decode_fns!(LifecycleTransition); -gen_encode_decode_fns!(AttachmentInfo); -gen_encode_decode_fns!(AttachmentList); -gen_encode_decode_fns!(Notification); -gen_encode_decode_fns!(Progress); -gen_encode_decode_fns!(Ticks); -gen_encode_decode_fns!(Ranges); -gen_encode_decode_fns!(SourceDefinition); -gen_encode_decode_fns!(Sources); -gen_encode_decode_fns!(SdeRequest); -gen_encode_decode_fns!(SdeResponse); -gen_encode_decode_fns!(GrabbedElement); -gen_encode_decode_fns!(GrabbedElementList); -gen_encode_decode_fns!(AroundIndexes); -gen_encode_decode_fns!(FilterMatch); -gen_encode_decode_fns!(FilterMatchList); -gen_encode_decode_fns!(FolderEntity); -gen_encode_decode_fns!(FolderEntityDetails); -gen_encode_decode_fns!(FolderEntityType); -gen_encode_decode_fns!(SerialPortsList); -gen_encode_decode_fns!(ExtractedMatchValue); -gen_encode_decode_fns!(ResultExtractedMatchValues); -gen_encode_decode_fns!(ResultU64); -gen_encode_decode_fns!(ResultBool); -gen_encode_decode_fns!(ResultSleep); -gen_encode_decode_fns!(NearestPosition); -gen_encode_decode_fns!(ResultNearestPosition); -gen_encode_decode_fns!(Point); -gen_encode_decode_fns!(ResultSearchValues); -gen_encode_decode_fns!(ResultScaledDistribution); -gen_encode_decode_fns!(DltLevelDistribution); diff --git a/application/apps/protocol/test.sh b/application/apps/protocol/test.sh deleted file mode 100755 index 4abf1550f0..0000000000 --- a/application/apps/protocol/test.sh +++ /dev/null @@ -1,35 +0,0 @@ -#!/bin/bash - -reset -echo " -====== WARNING =============================================================== -This script performs an operation to DELETE ALL the contents of -the folder specified in the environment variable CHIPMUNK_PROTOCOL_TEST_OUTPUT. -Before proceeding, make sure that the CHIPMUNK_PROTOCOL_TEST_OUTPUT variable -contains the correct path. If the CHIPMUNK_PROTOCOL_TEST_OUTPUT variable is -not defined, test data will be written to /\$TMP/stypes_tests. -====== WARNING =============================================================== -" -read -p "Do you want to continue? (y/N): " response - -response=${response,,} -if [[ "$response" != "y" ]]; then - echo "Operation aborted." - exit 1 -fi - -echo "Build wasm module" -cargo clean -wasm-pack build --target nodejs - -echo "Create test use-cases & Run Proptests" -cd ../indexer/stypes -export CHIPMUNK_PROTOCOL_TEST_OUTPUT="/tmp/stypes_test/" -cargo test --release --features "test_and_gen" -- --nocapture --ignored - -echo "Run tests" -export JASMIN_TEST_BLOCKS_LOGS=on -cd ../../rustcore/ts-bindings -rm -rf ./node_modules -rm -rf ./spec/build -cargo chipmunk test wrapper -u print -s spec/build/spec/session.protocol.spec.js diff --git a/application/apps/rustcore/rs-bindings/Cargo.lock b/application/apps/rustcore/rs-bindings/Cargo.lock deleted file mode 100644 index ae75cb162b..0000000000 --- a/application/apps/rustcore/rs-bindings/Cargo.lock +++ /dev/null @@ -1,4585 +0,0 @@ -# This file is automatically @generated by Cargo. -# It is not intended for manual editing. -version = 4 - -[[package]] -name = "Inflector" -version = "0.11.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe438c63458706e03479442743baae6c88256498e6431708f6dfc520a26515d3" -dependencies = [ - "lazy_static", - "regex", -] - -[[package]] -name = "addr2line" -version = "0.24.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfbe277e56a376000877090da837660b4427aad530e3028d44e0bffe4f89a1c1" -dependencies = [ - "gimli", -] - -[[package]] -name = "adler2" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "512761e0bb2578dd7380c6baaa0f4ce03e84f95e960231d1dec8bf4d7d6e2627" - -[[package]] -name = "aho-corasick" -version = "1.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916" -dependencies = [ - "memchr", -] - -[[package]] -name = "allocator-api2" -version = "0.2.21" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "683d7910e743518b0e34f1186f92494becacb047c7b6bf616c96772180fef923" - -[[package]] -name = "ambient-authority" -version = "0.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e9d4ee0d472d1cd2e28c97dfa124b3d8d992e10eb0a035f33f5d12e3a177ba3b" - -[[package]] -name = "android-tzdata" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0" - -[[package]] -name = "android_system_properties" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311" -dependencies = [ - "libc", -] - -[[package]] -name = "anyhow" -version = "1.0.98" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e16d2d3311acee920a9eb8d33b8cbc1787ce4a264e85f964c2404b969bdcd487" - -[[package]] -name = "arbitrary" -version = "1.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dde20b3d026af13f561bdd0f15edf01fc734f0dafcedbaf42bba506a9517f223" - -[[package]] -name = "arc-swap" -version = "1.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69f7f8c3906b62b754cd5326047894316021dcfe5a194c8ea52bdd94934a3457" - -[[package]] -name = "arrayref" -version = "0.3.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76a2e8124351fda1ef8aaaa3bbd7ebbcb486bbcd4225aca0aa0d84bb2db8fecb" - -[[package]] -name = "arrayvec" -version = "0.7.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50" - -[[package]] -name = "async-channel" -version = "1.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81953c529336010edd6d8e358f886d9581267795c61b19475b71314bffa46d35" -dependencies = [ - "concurrent-queue", - "event-listener 2.5.3", - "futures-core", -] - -[[package]] -name = "async-channel" -version = "2.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89b47800b0be77592da0afd425cc03468052844aff33b84e33cc696f64e77b6a" -dependencies = [ - "concurrent-queue", - "event-listener-strategy", - "futures-core", - "pin-project-lite", -] - -[[package]] -name = "async-executor" -version = "1.13.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb812ffb58524bdd10860d7d974e2f01cc0950c2438a74ee5ec2e2280c6c4ffa" -dependencies = [ - "async-task", - "concurrent-queue", - "fastrand", - "futures-lite", - "pin-project-lite", - "slab", -] - -[[package]] -name = "async-global-executor" -version = "2.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05b1b633a2115cd122d73b955eadd9916c18c8f510ec9cd1686404c60ad1c29c" -dependencies = [ - "async-channel 2.3.1", - "async-executor", - "async-io", - "async-lock", - "blocking", - "futures-lite", - "once_cell", -] - -[[package]] -name = "async-io" -version = "2.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1237c0ae75a0f3765f58910ff9cdd0a12eeb39ab2f4c7de23262f337f0aacbb3" -dependencies = [ - "async-lock", - "cfg-if", - "concurrent-queue", - "futures-io", - "futures-lite", - "parking", - "polling", - "rustix 1.0.7", - "slab", - "tracing", - "windows-sys 0.59.0", -] - -[[package]] -name = "async-lock" -version = "3.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff6e472cdea888a4bd64f342f09b3f50e1886d32afe8df3d663c01140b811b18" -dependencies = [ - "event-listener 5.4.0", - "event-listener-strategy", - "pin-project-lite", -] - -[[package]] -name = "async-process" -version = "2.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cde3f4e40e6021d7acffc90095cbd6dc54cb593903d1de5832f435eb274b85dc" -dependencies = [ - "async-channel 2.3.1", - "async-io", - "async-lock", - "async-signal", - "async-task", - "blocking", - "cfg-if", - "event-listener 5.4.0", - "futures-lite", - "rustix 1.0.7", - "tracing", -] - -[[package]] -name = "async-signal" -version = "0.2.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7605a4e50d4b06df3898d5a70bf5fde51ed9059b0434b73105193bc27acce0d" -dependencies = [ - "async-io", - "async-lock", - "atomic-waker", - "cfg-if", - "futures-core", - "futures-io", - "rustix 1.0.7", - "signal-hook-registry", - "slab", - "windows-sys 0.59.0", -] - -[[package]] -name = "async-std" -version = "1.13.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "730294c1c08c2e0f85759590518f6333f0d5a0a766a27d519c1b244c3dfd8a24" -dependencies = [ - "async-channel 1.9.0", - "async-global-executor", - "async-io", - "async-lock", - "async-process", - "crossbeam-utils", - "futures-channel", - "futures-core", - "futures-io", - "futures-lite", - "gloo-timers", - "kv-log-macro", - "log", - "memchr", - "once_cell", - "pin-project-lite", - "pin-utils", - "slab", - "wasm-bindgen-futures", -] - -[[package]] -name = "async-task" -version = "4.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b75356056920673b02621b35afd0f7dda9306d03c79a30f5c56c44cf256e3de" - -[[package]] -name = "async-trait" -version = "0.1.88" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e539d3fca749fcee5236ab05e93a52867dd549cc157c8cb7f99595f3cedffdb5" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.101", -] - -[[package]] -name = "atomic-waker" -version = "1.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" - -[[package]] -name = "autocfg" -version = "1.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26" - -[[package]] -name = "backtrace" -version = "0.3.75" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6806a6321ec58106fea15becdad98371e28d92ccbc7c8f1b3b6dd724fe8f1002" -dependencies = [ - "addr2line", - "cfg-if", - "libc", - "miniz_oxide", - "object", - "rustc-demangle", - "windows-targets", -] - -[[package]] -name = "base64" -version = "0.22.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" - -[[package]] -name = "bincode" -version = "1.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1f45e9417d87227c7a56d22e471c6206462cba514c7590c09aff4cf6d1ddcad" -dependencies = [ - "serde", -] - -[[package]] -name = "bitflags" -version = "1.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" - -[[package]] -name = "bitflags" -version = "2.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b8e56985ec62d17e9c1001dc89c88ecd7dc08e47eba5ec7c29c7b5eeecde967" - -[[package]] -name = "blake3" -version = "1.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3888aaa89e4b2a40fca9848e400f6a658a5a3978de7be858e209cafa8be9a4a0" -dependencies = [ - "arrayref", - "arrayvec", - "cc", - "cfg-if", - "constant_time_eq", - "rayon-core", -] - -[[package]] -name = "block-buffer" -version = "0.10.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" -dependencies = [ - "generic-array", -] - -[[package]] -name = "blocking" -version = "1.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "703f41c54fc768e63e091340b424302bb1c29ef4aa0c7f10fe849dfb114d29ea" -dependencies = [ - "async-channel 2.3.1", - "async-task", - "futures-io", - "futures-lite", - "piper", -] - -[[package]] -name = "bstr" -version = "1.12.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "234113d19d0d7d613b40e86fb654acf958910802bcceab913a4f9e7cda03b1a4" -dependencies = [ - "memchr", - "regex-automata 0.4.9", - "serde", -] - -[[package]] -name = "bufread" -version = "4.0.0-alpha.1" - -[[package]] -name = "bumpalo" -version = "3.17.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1628fb46dfa0b37568d12e5edd512553eccf6a22a78e8bde00bb4aed84d5bdbf" -dependencies = [ - "allocator-api2", -] - -[[package]] -name = "bytecount" -version = "0.6.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "175812e0be2bccb6abe50bb8d566126198344f707e304f45c648fd8f2cc0365e" - -[[package]] -name = "byteorder" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" - -[[package]] -name = "bytes" -version = "1.10.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d71b6127be86fdcfddb610f7182ac57211d4b18a3e9c82eb2d17662f2227ad6a" - -[[package]] -name = "cap-fs-ext" -version = "3.4.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e41cc18551193fe8fa6f15c1e3c799bc5ec9e2cfbfaa8ed46f37013e3e6c173c" -dependencies = [ - "cap-primitives", - "cap-std", - "io-lifetimes", - "windows-sys 0.59.0", -] - -[[package]] -name = "cap-net-ext" -version = "3.4.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f83833816c66c986e913b22ac887cec216ea09301802054316fc5301809702c" -dependencies = [ - "cap-primitives", - "cap-std", - "rustix 1.0.7", - "smallvec", -] - -[[package]] -name = "cap-primitives" -version = "3.4.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0a1e394ed14f39f8bc26f59d4c0c010dbe7f0a1b9bafff451b1f98b67c8af62a" -dependencies = [ - "ambient-authority", - "fs-set-times", - "io-extras", - "io-lifetimes", - "ipnet", - "maybe-owned", - "rustix 1.0.7", - "rustix-linux-procfs", - "windows-sys 0.59.0", - "winx", -] - -[[package]] -name = "cap-rand" -version = "3.4.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0acb89ccf798a28683f00089d0630dfaceec087234eae0d308c05ddeaa941b40" -dependencies = [ - "ambient-authority", - "rand 0.8.5", -] - -[[package]] -name = "cap-std" -version = "3.4.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07c0355ca583dd58f176c3c12489d684163861ede3c9efa6fd8bba314c984189" -dependencies = [ - "cap-primitives", - "io-extras", - "io-lifetimes", - "rustix 1.0.7", -] - -[[package]] -name = "cap-time-ext" -version = "3.4.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "491af520b8770085daa0466978c75db90368c71896523f2464214e38359b1a5b" -dependencies = [ - "ambient-authority", - "cap-primitives", - "iana-time-zone", - "once_cell", - "rustix 1.0.7", - "winx", -] - -[[package]] -name = "cc" -version = "1.2.25" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0fc897dc1e865cc67c0e05a836d9d3f1df3cbe442aa4a9473b18e12624a4951" -dependencies = [ - "jobserver", - "libc", - "shlex", -] - -[[package]] -name = "cfg-if" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" - -[[package]] -name = "cfg_aliases" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724" - -[[package]] -name = "chrono" -version = "0.4.41" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c469d952047f47f91b68d1cba3f10d63c11d73e4636f24f08daf0278abf01c4d" -dependencies = [ - "android-tzdata", - "iana-time-zone", - "js-sys", - "num-traits", - "wasm-bindgen", - "windows-link", -] - -[[package]] -name = "chrono-tz" -version = "0.10.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "efdce149c370f133a071ca8ef6ea340b7b88748ab0810097a9e2976eaa34b4f3" -dependencies = [ - "chrono", - "chrono-tz-build", - "phf", -] - -[[package]] -name = "chrono-tz-build" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f10f8c9340e31fc120ff885fcdb54a0b48e474bbd77cab557f0c30a3e569402" -dependencies = [ - "parse-zoneinfo", - "phf_codegen", -] - -[[package]] -name = "circular" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0fc239e0f6cb375d2402d48afb92f76f5404fd1df208a41930ec81eda078bea" - -[[package]] -name = "cobs" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67ba02a97a2bd10f4b59b25c7973101c79642302776489e030cd13cdab09ed15" - -[[package]] -name = "concurrent-queue" -version = "2.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ca0197aee26d1ae37445ee532fefce43251d24cc7c166799f4d46817f1d3973" -dependencies = [ - "crossbeam-utils", -] - -[[package]] -name = "constant_time_eq" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c74b8349d32d297c9134b8c88677813a227df8f779daa29bfc29c183fe3dca6" - -[[package]] -name = "core-foundation" -version = "0.9.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91e195e091a93c46f7102ec7818a2aa394e1e1771c3ab4825963fa03e45afb8f" -dependencies = [ - "core-foundation-sys", - "libc", -] - -[[package]] -name = "core-foundation" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b55271e5c8c478ad3f38ad24ef34923091e0548492a266d19b3c0b4d82574c63" -dependencies = [ - "core-foundation-sys", - "libc", -] - -[[package]] -name = "core-foundation-sys" -version = "0.8.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" - -[[package]] -name = "cpp_demangle" -version = "0.4.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96e58d342ad113c2b878f16d5d034c03be492ae460cdbc02b7f0f2284d310c7d" -dependencies = [ - "cfg-if", -] - -[[package]] -name = "cpufeatures" -version = "0.2.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59ed5838eebb26a2bb2e58f6d5b5316989ae9d08bab10e0e6d103e656d1b0280" -dependencies = [ - "libc", -] - -[[package]] -name = "cranelift-assembler-x64" -version = "0.120.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ff8e35182c7372df00447cb90a04e584e032c42b9b9b6e8c50ddaaf0d7900d5" -dependencies = [ - "cranelift-assembler-x64-meta", -] - -[[package]] -name = "cranelift-assembler-x64-meta" -version = "0.120.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14220f9c2698015c3b94dc6b84ae045c1c45509ddc406e43c6139252757fdb7a" -dependencies = [ - "cranelift-srcgen", -] - -[[package]] -name = "cranelift-bforest" -version = "0.120.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d372ef2777ceefd75829e1390211ac240e9196bc60699218f7ea2419038288ee" -dependencies = [ - "cranelift-entity", -] - -[[package]] -name = "cranelift-bitset" -version = "0.120.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56323783e423818fa89ce8078e90a3913d2a6e0810399bfce8ebd7ee87baa81f" -dependencies = [ - "serde", - "serde_derive", -] - -[[package]] -name = "cranelift-codegen" -version = "0.120.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74ffb780aab6186c6e9ba26519654b1ac55a09c0a866f6088a4efbbd84da68ed" -dependencies = [ - "bumpalo", - "cranelift-assembler-x64", - "cranelift-bforest", - "cranelift-bitset", - "cranelift-codegen-meta", - "cranelift-codegen-shared", - "cranelift-control", - "cranelift-entity", - "cranelift-isle", - "gimli", - "hashbrown", - "log", - "pulley-interpreter", - "regalloc2", - "rustc-hash", - "serde", - "smallvec", - "target-lexicon", -] - -[[package]] -name = "cranelift-codegen-meta" -version = "0.120.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c23ef13814d3b39c869650d5961128cbbecad83fbdff4e6836a03ecf6862d7ed" -dependencies = [ - "cranelift-assembler-x64-meta", - "cranelift-codegen-shared", - "cranelift-srcgen", - "pulley-interpreter", -] - -[[package]] -name = "cranelift-codegen-shared" -version = "0.120.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9f623300657679f847803ce80811454bfff89cea4f6bf684be5c468d4a73631" - -[[package]] -name = "cranelift-control" -version = "0.120.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31f4168af69989aa6b91fab46799ed4df6096f3209f4a6c8fb4358f49c60188f" -dependencies = [ - "arbitrary", -] - -[[package]] -name = "cranelift-entity" -version = "0.120.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca6fa9bae1c8de26d71ac2162f069447610fd91e7780cb480ee0d76ac81eabb8" -dependencies = [ - "cranelift-bitset", - "serde", - "serde_derive", -] - -[[package]] -name = "cranelift-frontend" -version = "0.120.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8219205608aa0b0e6769b580284a7e055c7e0c323c1041cde7ca078add3e412" -dependencies = [ - "cranelift-codegen", - "log", - "smallvec", - "target-lexicon", -] - -[[package]] -name = "cranelift-isle" -version = "0.120.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "588d0c5964f10860b04043e55aab26d7f7a206b0fd4f10c5260e8aa5773832bd" - -[[package]] -name = "cranelift-native" -version = "0.120.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19ed3c94cb97b14f92b6a94a1d45ef8c851f6a2ad9114e5d91d233f7da638fed" -dependencies = [ - "cranelift-codegen", - "libc", - "target-lexicon", -] - -[[package]] -name = "cranelift-srcgen" -version = "0.120.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85256fac1519a7d25a040c1d850fba67478f3f021ad5fdf738ba4425ee862dbf" - -[[package]] -name = "crc32fast" -version = "1.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a97769d94ddab943e4510d138150169a2758b5ef3eb191a9ee688de3e23ef7b3" -dependencies = [ - "cfg-if", -] - -[[package]] -name = "crossbeam-channel" -version = "0.5.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82b8f8f868b36967f9606790d1903570de9ceaf870a7bf9fbbd3016d636a2cb2" -dependencies = [ - "crossbeam-utils", -] - -[[package]] -name = "crossbeam-deque" -version = "0.8.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9dd111b7b7f7d55b72c0a6ae361660ee5853c9af73f70c3c2ef6858b950e2e51" -dependencies = [ - "crossbeam-epoch", - "crossbeam-utils", -] - -[[package]] -name = "crossbeam-epoch" -version = "0.9.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b82ac4a3c2ca9c3460964f020e1402edd5753411d7737aa39c3714ad1b5420e" -dependencies = [ - "crossbeam-utils", -] - -[[package]] -name = "crossbeam-utils" -version = "0.8.21" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0a5c400df2834b80a4c3327b3aad3a4c4cd4de0629063962b03235697506a28" - -[[package]] -name = "crypto-common" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" -dependencies = [ - "generic-array", - "typenum", -] - -[[package]] -name = "ctor" -version = "0.1.26" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d2301688392eb071b0bf1a37be05c469d3cc4dbbd95df672fe28ab021e6a096" -dependencies = [ - "quote", - "syn 1.0.109", -] - -[[package]] -name = "ctor" -version = "0.2.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32a2785755761f3ddc1492979ce1e48d2c00d09311c39e4466429188f3dd6501" -dependencies = [ - "quote", - "syn 2.0.101", -] - -[[package]] -name = "darling" -version = "0.20.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc7f46116c46ff9ab3eb1597a45688b6715c6e628b5c133e288e709a29bcb4ee" -dependencies = [ - "darling_core", - "darling_macro", -] - -[[package]] -name = "darling_core" -version = "0.20.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d00b9596d185e565c2207a0b01f8bd1a135483d02d9b7b0a54b11da8d53412e" -dependencies = [ - "fnv", - "ident_case", - "proc-macro2", - "quote", - "strsim", - "syn 2.0.101", -] - -[[package]] -name = "darling_macro" -version = "0.20.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc34b93ccb385b40dc71c6fceac4b2ad23662c7eeb248cf10d529b7e055b6ead" -dependencies = [ - "darling_core", - "quote", - "syn 2.0.101", -] - -[[package]] -name = "debugid" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bef552e6f588e446098f6ba40d89ac146c8c7b64aade83c051ee00bb5d2bc18d" -dependencies = [ - "uuid", -] - -[[package]] -name = "derivative" -version = "2.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fcc3dd5e9e9c0b295d6e1e4d811fb6f157d5ffd784b8d202fc62eac8035a770b" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "derive_builder" -version = "0.20.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "507dfb09ea8b7fa618fcf76e953f4f5e192547945816d5358edffe39f6f94947" -dependencies = [ - "derive_builder_macro", -] - -[[package]] -name = "derive_builder_core" -version = "0.20.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d5bcf7b024d6835cfb3d473887cd966994907effbe9227e8c8219824d06c4e8" -dependencies = [ - "darling", - "proc-macro2", - "quote", - "syn 2.0.101", -] - -[[package]] -name = "derive_builder_macro" -version = "0.20.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab63b0e2bf4d5928aff72e83a7dace85d7bba5fe12dcc3c5a572d78caffd3f3c" -dependencies = [ - "derive_builder_core", - "syn 2.0.101", -] - -[[package]] -name = "destructure_traitobject" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c877555693c14d2f84191cfd3ad8582790fc52b5e2274b40b59cf5f5cea25c7" - -[[package]] -name = "digest" -version = "0.10.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" -dependencies = [ - "block-buffer", - "crypto-common", -] - -[[package]] -name = "dir_checksum" -version = "0.1.0" -dependencies = [ - "blake3", - "ignore", - "log", - "memmap2", - "rayon", - "thiserror 2.0.12", -] - -[[package]] -name = "directories-next" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "339ee130d97a610ea5a5872d2bbb130fdf68884ff09d3028b81bec8a1ac23bbc" -dependencies = [ - "cfg-if", - "dirs-sys-next", -] - -[[package]] -name = "dirs" -version = "6.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3e8aa94d75141228480295a7d0e7feb620b1a5ad9f12bc40be62411e38cce4e" -dependencies = [ - "dirs-sys", -] - -[[package]] -name = "dirs-sys" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e01a3366d27ee9890022452ee61b2b63a67e6f13f58900b651ff5665f0bb1fab" -dependencies = [ - "libc", - "option-ext", - "redox_users 0.5.0", - "windows-sys 0.59.0", -] - -[[package]] -name = "dirs-sys-next" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ebda144c4fe02d1f7ea1a7d9641b6fc6b580adcfa024ae48797ecdeb6825b4d" -dependencies = [ - "libc", - "redox_users 0.4.6", - "winapi", -] - -[[package]] -name = "displaydoc" -version = "0.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.101", -] - -[[package]] -name = "dlt-core" -version = "0.20.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3360c83b1e02a2543d44fa9ba640f0199c43bcde51abd7fa113f1a25d11f17a1" -dependencies = [ - "byteorder", - "bytes", - "futures", - "log", - "memchr", - "nom", - "quick-xml 0.29.0", - "rustc-hash", - "serde", - "serde_json", - "thiserror 1.0.69", -] - -[[package]] -name = "either" -version = "1.15.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "48c757948c5ede0e46177b7add2e67155f70e33c07fea8284df6576da70b3719" - -[[package]] -name = "embedded-io" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef1a6892d9eef45c8fa6b9e0086428a2cca8491aca8f787c534a3d6d0bcb3ced" - -[[package]] -name = "embedded-io" -version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "edd0f118536f44f5ccd48bcb8b111bdc3de888b58c74639dfb034a357d0f206d" - -[[package]] -name = "encoding_rs" -version = "0.8.35" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75030f3c4f45dafd7586dd6780965a8c7e8e285a5ecb86713e63a79c5b2766f3" -dependencies = [ - "cfg-if", -] - -[[package]] -name = "encoding_rs_io" -version = "0.1.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1cc3c5651fb62ab8aa3103998dade57efdd028544bd300516baa31840c252a83" -dependencies = [ - "encoding_rs", -] - -[[package]] -name = "env_home" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7f84e12ccf0a7ddc17a6c41c93326024c42920d7ee630d04950e6926645c0fe" - -[[package]] -name = "equivalent" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f" - -[[package]] -name = "errno" -version = "0.3.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cea14ef9355e3beab063703aa9dab15afd25f0667c341310c1e5274bb1d0da18" -dependencies = [ - "libc", - "windows-sys 0.59.0", -] - -[[package]] -name = "etherparse" -version = "0.16.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8d8a704b617484e9d867a0423cd45f7577f008c4068e2e33378f8d3860a6d73" -dependencies = [ - "arrayvec", -] - -[[package]] -name = "event-listener" -version = "2.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0206175f82b8d6bf6652ff7d71a1e27fd2e4efde587fd368662814d6ec1d9ce0" - -[[package]] -name = "event-listener" -version = "5.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3492acde4c3fc54c845eaab3eed8bd00c7a7d881f78bfc801e43a93dec1331ae" -dependencies = [ - "concurrent-queue", - "parking", - "pin-project-lite", -] - -[[package]] -name = "event-listener-strategy" -version = "0.5.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8be9f3dfaaffdae2972880079a491a1a8bb7cbed0b8dd7a347f668b4150a3b93" -dependencies = [ - "event-listener 5.4.0", - "pin-project-lite", -] - -[[package]] -name = "extend" -version = "0.1.0" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.101", -] - -[[package]] -name = "fallible-iterator" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2acce4a10f12dc2fb14a218589d4f1f62ef011b2d0cc4b3cb1bba8e94da14649" - -[[package]] -name = "fastrand" -version = "2.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37909eebbb50d72f9059c3b6d82c0463f2ff062c9e95845c43a6c9c0355411be" - -[[package]] -name = "fd-lock" -version = "4.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ce92ff622d6dadf7349484f42c93271a0d49b7cc4d466a936405bacbe10aa78" -dependencies = [ - "cfg-if", - "rustix 1.0.7", - "windows-sys 0.59.0", -] - -[[package]] -name = "file-tools" -version = "4.0.0-alpha.1" -dependencies = [ - "anyhow", -] - -[[package]] -name = "fluvio-future" -version = "0.7.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aeb6426efa0dc4cc12226634b5b2657237b67028837e79ef4ad4706c4f211bd9" -dependencies = [ - "anyhow", - "async-std", - "cfg-if", - "thiserror 2.0.12", - "tracing", - "tracing-subscriber", -] - -[[package]] -name = "fnv" -version = "1.0.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" - -[[package]] -name = "foldhash" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9c4f5dac5e15c24eb999c26181a6ca40b39fe946cbe4c263c7209467bc83af2" - -[[package]] -name = "foreign-types" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" -dependencies = [ - "foreign-types-shared", -] - -[[package]] -name = "foreign-types-shared" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" - -[[package]] -name = "form_urlencoded" -version = "1.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e13624c2627564efccf4934284bdd98cbaa14e79b0b5a141218e507b3a823456" -dependencies = [ - "percent-encoding", -] - -[[package]] -name = "fs-set-times" -version = "0.20.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94e7099f6313ecacbe1256e8ff9d617b75d1bcb16a6fddef94866d225a01a14a" -dependencies = [ - "io-lifetimes", - "rustix 1.0.7", - "windows-sys 0.59.0", -] - -[[package]] -name = "futures" -version = "0.3.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "65bc07b1a8bc7c85c5f2e110c476c7389b4554ba72af57d8445ea63a576b0876" -dependencies = [ - "futures-channel", - "futures-core", - "futures-executor", - "futures-io", - "futures-sink", - "futures-task", - "futures-util", -] - -[[package]] -name = "futures-channel" -version = "0.3.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2dff15bf788c671c1934e366d07e30c1814a8ef514e1af724a602e8a2fbe1b10" -dependencies = [ - "futures-core", - "futures-sink", -] - -[[package]] -name = "futures-core" -version = "0.3.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e" - -[[package]] -name = "futures-executor" -version = "0.3.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e28d1d997f585e54aebc3f97d39e72338912123a67330d723fdbb564d646c9f" -dependencies = [ - "futures-core", - "futures-task", - "futures-util", -] - -[[package]] -name = "futures-io" -version = "0.3.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e5c1b78ca4aae1ac06c48a526a655760685149f0d465d21f37abfe57ce075c6" - -[[package]] -name = "futures-lite" -version = "2.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f5edaec856126859abb19ed65f39e90fea3a9574b9707f13539acf4abf7eb532" -dependencies = [ - "fastrand", - "futures-core", - "futures-io", - "parking", - "pin-project-lite", -] - -[[package]] -name = "futures-macro" -version = "0.3.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.101", -] - -[[package]] -name = "futures-sink" -version = "0.3.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e575fab7d1e0dcb8d0c7bcf9a63ee213816ab51902e6d244a95819acacf1d4f7" - -[[package]] -name = "futures-task" -version = "0.3.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f90f7dce0722e95104fcb095585910c0977252f286e354b5e3bd38902cd99988" - -[[package]] -name = "futures-util" -version = "0.3.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fa08315bb612088cc391249efdc3bc77536f16c91f6cf495e6fbe85b20a4a81" -dependencies = [ - "futures-channel", - "futures-core", - "futures-io", - "futures-macro", - "futures-sink", - "futures-task", - "memchr", - "pin-project-lite", - "pin-utils", - "slab", -] - -[[package]] -name = "fxhash" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c31b6d751ae2c7f11320402d34e41349dd1016f8d5d45e48c4312bc8625af50c" -dependencies = [ - "byteorder", -] - -[[package]] -name = "fxprof-processed-profile" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "27d12c0aed7f1e24276a241aadc4cb8ea9f83000f34bc062b7cc2d51e3b0fabd" -dependencies = [ - "bitflags 2.9.1", - "debugid", - "fxhash", - "serde", - "serde_json", -] - -[[package]] -name = "generic-array" -version = "0.14.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" -dependencies = [ - "typenum", - "version_check", -] - -[[package]] -name = "getrandom" -version = "0.2.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "335ff9f135e4384c8150d6f27c6daed433577f86b4750418338c01a1a2528592" -dependencies = [ - "cfg-if", - "libc", - "wasi 0.11.0+wasi-snapshot-preview1", -] - -[[package]] -name = "getrandom" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26145e563e54f2cadc477553f1ec5ee650b00862f0a58bcd12cbdc5f0ea2d2f4" -dependencies = [ - "cfg-if", - "libc", - "r-efi", - "wasi 0.14.2+wasi-0.2.4", -] - -[[package]] -name = "ghost" -version = "0.1.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a8661f18e73000bcea2f0d68262eb8ac1b1e951e10eb936d3f95b36201c136d" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.101", -] - -[[package]] -name = "gimli" -version = "0.31.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07e28edb80900c19c28f1072f2e8aeca7fa06b23cd4169cefe1af5aa3260783f" -dependencies = [ - "fallible-iterator", - "indexmap", - "stable_deref_trait", -] - -[[package]] -name = "globset" -version = "0.4.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54a1028dfc5f5df5da8a56a73e6c153c9a9708ec57232470703592a3f18e49f5" -dependencies = [ - "aho-corasick", - "bstr", - "log", - "regex-automata 0.4.9", - "regex-syntax 0.8.5", -] - -[[package]] -name = "gloo-timers" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbb143cf96099802033e0d4f4963b19fd2e0b728bcf076cd9cf7f6634f092994" -dependencies = [ - "futures-channel", - "futures-core", - "js-sys", - "wasm-bindgen", -] - -[[package]] -name = "grep-matcher" -version = "0.1.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "47a3141a10a43acfedc7c98a60a834d7ba00dfe7bec9071cbfc19b55b292ac02" -dependencies = [ - "memchr", -] - -[[package]] -name = "grep-regex" -version = "0.1.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9edd147c7e3296e7a26bd3a81345ce849557d5a8e48ed88f736074e760f91f7e" -dependencies = [ - "bstr", - "grep-matcher", - "log", - "regex-automata 0.4.9", - "regex-syntax 0.8.5", -] - -[[package]] -name = "grep-searcher" -version = "0.1.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9b6c14b3fc2e0a107d6604d3231dec0509e691e62447104bc385a46a7892cda" -dependencies = [ - "bstr", - "encoding_rs", - "encoding_rs_io", - "grep-matcher", - "log", - "memchr", - "memmap2", -] - -[[package]] -name = "hashbrown" -version = "0.15.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "84b26c544d002229e640969970a2e74021aadf6e2f96372b9c58eff97de08eb3" -dependencies = [ - "foldhash", - "serde", -] - -[[package]] -name = "heck" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" - -[[package]] -name = "hermit-abi" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f154ce46856750ed433c8649605bf7ed2de3bc35fd9d2a9f30cddd873c80cb08" - -[[package]] -name = "http_req" -version = "0.12.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92208b0986f414edaca8ede2c6962c979309346a9e8e19d07d0a7879aae1549e" -dependencies = [ - "native-tls", - "unicase", -] - -[[package]] -name = "humantime" -version = "2.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b112acc8b3adf4b107a8ec20977da0273a8c386765a3ec0229bd500a1443f9f" - -[[package]] -name = "iana-time-zone" -version = "0.1.63" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0c919e5debc312ad217002b8048a17b7d83f80703865bbfcfebb0458b0b27d8" -dependencies = [ - "android_system_properties", - "core-foundation-sys", - "iana-time-zone-haiku", - "js-sys", - "log", - "wasm-bindgen", - "windows-core", -] - -[[package]] -name = "iana-time-zone-haiku" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f" -dependencies = [ - "cc", -] - -[[package]] -name = "icu_collections" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "200072f5d0e3614556f94a9930d5dc3e0662a652823904c3a75dc3b0af7fee47" -dependencies = [ - "displaydoc", - "potential_utf", - "yoke", - "zerofrom", - "zerovec", -] - -[[package]] -name = "icu_locale_core" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0cde2700ccaed3872079a65fb1a78f6c0a36c91570f28755dda67bc8f7d9f00a" -dependencies = [ - "displaydoc", - "litemap", - "tinystr", - "writeable", - "zerovec", -] - -[[package]] -name = "icu_normalizer" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "436880e8e18df4d7bbc06d58432329d6458cc84531f7ac5f024e93deadb37979" -dependencies = [ - "displaydoc", - "icu_collections", - "icu_normalizer_data", - "icu_properties", - "icu_provider", - "smallvec", - "zerovec", -] - -[[package]] -name = "icu_normalizer_data" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00210d6893afc98edb752b664b8890f0ef174c8adbb8d0be9710fa66fbbf72d3" - -[[package]] -name = "icu_properties" -version = "2.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "016c619c1eeb94efb86809b015c58f479963de65bdb6253345c1a1276f22e32b" -dependencies = [ - "displaydoc", - "icu_collections", - "icu_locale_core", - "icu_properties_data", - "icu_provider", - "potential_utf", - "zerotrie", - "zerovec", -] - -[[package]] -name = "icu_properties_data" -version = "2.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "298459143998310acd25ffe6810ed544932242d3f07083eee1084d83a71bd632" - -[[package]] -name = "icu_provider" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03c80da27b5f4187909049ee2d72f276f0d9f99a42c306bd0131ecfe04d8e5af" -dependencies = [ - "displaydoc", - "icu_locale_core", - "stable_deref_trait", - "tinystr", - "writeable", - "yoke", - "zerofrom", - "zerotrie", - "zerovec", -] - -[[package]] -name = "id-arena" -version = "2.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25a2bc672d1148e28034f176e01fffebb08b35768468cc954630da77a1449005" - -[[package]] -name = "ident_case" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" - -[[package]] -name = "idna" -version = "1.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "686f825264d630750a544639377bae737628043f20d38bbc029e8f29ea968a7e" -dependencies = [ - "idna_adapter", - "smallvec", - "utf8_iter", -] - -[[package]] -name = "idna_adapter" -version = "1.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3acae9609540aa318d1bc588455225fb2085b9ed0c4f6bd0d9d5bcd86f1a0344" -dependencies = [ - "icu_normalizer", - "icu_properties", -] - -[[package]] -name = "ignore" -version = "0.4.23" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d89fd380afde86567dfba715db065673989d6253f42b88179abd3eae47bda4b" -dependencies = [ - "crossbeam-deque", - "globset", - "log", - "memchr", - "regex-automata 0.4.9", - "same-file", - "walkdir", - "winapi-util", -] - -[[package]] -name = "indexer_base" -version = "4.0.0-alpha.1" -dependencies = [ - "log", - "serde", - "thiserror 2.0.12", -] - -[[package]] -name = "indexmap" -version = "2.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cea70ddb795996207ad57735b50c5982d8844f38ba9ee5f1aedcfb708a2aa11e" -dependencies = [ - "equivalent", - "hashbrown", - "serde", -] - -[[package]] -name = "inventory" -version = "0.1.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0eb5160c60ba1e809707918ee329adb99d222888155835c6feedba19f6c3fd4" -dependencies = [ - "ctor 0.1.26", - "ghost", - "inventory-impl", -] - -[[package]] -name = "inventory-impl" -version = "0.1.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e41b53715c6f0c4be49510bb82dee2c1e51c8586d885abe65396e82ed518548" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "io-extras" -version = "0.18.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2285ddfe3054097ef4b2fe909ef8c3bcd1ea52a8f0d274416caebeef39f04a65" -dependencies = [ - "io-lifetimes", - "windows-sys 0.59.0", -] - -[[package]] -name = "io-kit-sys" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "617ee6cf8e3f66f3b4ea67a4058564628cde41901316e19f559e14c7c72c5e7b" -dependencies = [ - "core-foundation-sys", - "mach2", -] - -[[package]] -name = "io-lifetimes" -version = "2.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06432fb54d3be7964ecd3649233cddf80db2832f47fec34c01f65b3d9d774983" - -[[package]] -name = "ipnet" -version = "2.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "469fb0b9cefa57e3ef31275ee7cacb78f2fdca44e4765491884a2b119d4eb130" - -[[package]] -name = "itertools" -version = "0.14.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b192c782037fadd9cfa75548310488aabdbf3d2da73885b31bd0abd03351285" -dependencies = [ - "either", -] - -[[package]] -name = "itoa" -version = "1.0.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a5f13b858c8d314ee3e8f639011f7ccefe71f97f96e50151fb991f267928e2c" - -[[package]] -name = "ittapi" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b996fe614c41395cdaedf3cf408a9534851090959d90d54a535f675550b64b1" -dependencies = [ - "anyhow", - "ittapi-sys", - "log", -] - -[[package]] -name = "ittapi-sys" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52f5385394064fa2c886205dba02598013ce83d3e92d33dbdc0c52fe0e7bf4fc" -dependencies = [ - "cc", -] - -[[package]] -name = "jobserver" -version = "0.1.33" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38f262f097c174adebe41eb73d66ae9c06b2844fb0da69969647bbddd9b0538a" -dependencies = [ - "getrandom 0.3.3", - "libc", -] - -[[package]] -name = "js-sys" -version = "0.3.77" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1cfaf33c695fc6e08064efbc1f72ec937429614f25eef83af942d0e227c3a28f" -dependencies = [ - "once_cell", - "wasm-bindgen", -] - -[[package]] -name = "kv-log-macro" -version = "1.0.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0de8b303297635ad57c9f5059fd9cee7a47f8e8daa09df0fcd07dd39fb22977f" -dependencies = [ - "log", -] - -[[package]] -name = "lazy_static" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" - -[[package]] -name = "leb128" -version = "0.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "884e2677b40cc8c339eaefcb701c32ef1fd2493d71118dc0ca4b6a736c93bd67" - -[[package]] -name = "leb128fmt" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09edd9e8b54e49e587e4f6295a7d29c3ea94d469cb40ab8ca70b288248a81db2" - -[[package]] -name = "libc" -version = "0.2.172" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d750af042f7ef4f724306de029d18836c26c1765a54a6a3f094cbd23a7267ffa" - -[[package]] -name = "libm" -version = "0.2.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9fbbcab51052fe104eb5e5d351cf728d30a5be1fe14d9be8a3b097481fb97de" - -[[package]] -name = "libmimalloc-sys" -version = "0.1.42" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec9d6fac27761dabcd4ee73571cdb06b7022dc99089acbe5435691edffaac0f4" -dependencies = [ - "cc", - "libc", -] - -[[package]] -name = "libredox" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0ff37bd590ca25063e35af745c343cb7a0271906fb7b37e4813e8f79f00268d" -dependencies = [ - "bitflags 2.9.1", - "libc", -] - -[[package]] -name = "libudev" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78b324152da65df7bb95acfcaab55e3097ceaab02fb19b228a9eb74d55f135e0" -dependencies = [ - "libc", - "libudev-sys", -] - -[[package]] -name = "libudev-sys" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c8469b4a23b962c1396b9b451dda50ef5b283e8dd309d69033475fa9b334324" -dependencies = [ - "libc", - "pkg-config", -] - -[[package]] -name = "linux-raw-sys" -version = "0.4.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d26c52dbd32dccf2d10cac7725f8eae5296885fb5703b261f7d0a0739ec807ab" - -[[package]] -name = "linux-raw-sys" -version = "0.9.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd945864f07fe9f5371a27ad7b52a172b4b499999f1d97574c9fa68373937e12" - -[[package]] -name = "litemap" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "241eaef5fd12c88705a01fc1066c48c4b36e0dd4377dcdc7ec3942cea7a69956" - -[[package]] -name = "lock_api" -version = "0.4.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96936507f153605bddfcda068dd804796c84324ed2510809e5b2a624c81da765" -dependencies = [ - "autocfg", - "scopeguard", -] - -[[package]] -name = "log" -version = "0.4.27" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13dc2df351e3202783a1fe0d44375f7295ffb4049267b0f3018346dc122a1d94" -dependencies = [ - "serde", - "value-bag", -] - -[[package]] -name = "log-mdc" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a94d21414c1f4a51209ad204c1776a3d0765002c76c6abcb602a6f09f1e881c7" - -[[package]] -name = "log4rs" -version = "1.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0816135ae15bd0391cf284eab37e6e3ee0a6ee63d2ceeb659862bd8d0a984ca6" -dependencies = [ - "anyhow", - "arc-swap", - "chrono", - "derivative", - "fnv", - "humantime", - "libc", - "log", - "log-mdc", - "once_cell", - "parking_lot", - "rand 0.8.5", - "serde", - "serde-value", - "serde_json", - "serde_yaml", - "thiserror 1.0.69", - "thread-id", - "typemap-ors", - "winapi", -] - -[[package]] -name = "mach2" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19b955cdeb2a02b9117f121ce63aa52d08ade45de53e48fe6a38b39c10f6f709" -dependencies = [ - "libc", -] - -[[package]] -name = "matchers" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8263075bb86c5a1b1427b5ae862e8889656f126e9f77c484496e8b47cf5c5558" -dependencies = [ - "regex-automata 0.1.10", -] - -[[package]] -name = "maybe-owned" -version = "0.3.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4facc753ae494aeb6e3c22f839b158aebd4f9270f55cd3c79906c45476c47ab4" - -[[package]] -name = "memchr" -version = "2.7.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" - -[[package]] -name = "memfd" -version = "0.6.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2cffa4ad52c6f791f4f8b15f0c05f9824b2ced1160e88cc393d64fff9a8ac64" -dependencies = [ - "rustix 0.38.44", -] - -[[package]] -name = "memmap2" -version = "0.9.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd3f7eed9d3848f8b98834af67102b720745c4ec028fcd0aa0239277e7de374f" -dependencies = [ - "libc", -] - -[[package]] -name = "merging" -version = "4.0.0-alpha.1" -dependencies = [ - "log", - "serde", - "serde_json", - "thiserror 2.0.12", -] - -[[package]] -name = "mimalloc" -version = "0.1.46" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "995942f432bbb4822a7e9c3faa87a695185b0d09273ba85f097b54f4e458f2af" -dependencies = [ - "libmimalloc-sys", -] - -[[package]] -name = "mime" -version = "0.3.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" - -[[package]] -name = "mime_guess" -version = "2.0.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7c44f8e672c00fe5308fa235f821cb4198414e1c77935c1ab6948d3fd78550e" -dependencies = [ - "mime", - "unicase", -] - -[[package]] -name = "minimal-lexical" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" - -[[package]] -name = "miniz_oxide" -version = "0.8.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3be647b768db090acb35d5ec5db2b0e1f1de11133ca123b9eacf5137868f892a" -dependencies = [ - "adler2", -] - -[[package]] -name = "mio" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78bed444cc8a2160f01cbcf811ef18cac863ad68ae8ca62092e8db51d51c761c" -dependencies = [ - "libc", - "log", - "wasi 0.11.0+wasi-snapshot-preview1", - "windows-sys 0.59.0", -] - -[[package]] -name = "mio-serial" -version = "5.0.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "029e1f407e261176a983a6599c084efd322d9301028055c87174beac71397ba3" -dependencies = [ - "log", - "mio", - "nix 0.29.0", - "serialport", - "winapi", -] - -[[package]] -name = "native-tls" -version = "0.2.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87de3442987e9dbec73158d5c715e7ad9072fda936bb03d19d7fa10e00520f0e" -dependencies = [ - "libc", - "log", - "openssl", - "openssl-probe", - "openssl-sys", - "schannel", - "security-framework", - "security-framework-sys", - "tempfile", -] - -[[package]] -name = "nix" -version = "0.26.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "598beaf3cc6fdd9a5dfb1630c2800c7acd31df7aaf0f565796fba2b53ca1af1b" -dependencies = [ - "bitflags 1.3.2", - "cfg-if", - "libc", -] - -[[package]] -name = "nix" -version = "0.29.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "71e2746dc3a24dd78b3cfcb7be93368c6de9963d30f43a6a73998a9cf4b17b46" -dependencies = [ - "bitflags 2.9.1", - "cfg-if", - "cfg_aliases", - "libc", -] - -[[package]] -name = "nj-build" -version = "0.3.0" -source = "git+https://github.com/infinyon/node-bindgen.git?branch=master#1c6f19b658b0acaf71a25f5f2e4d8b4d970363ad" -dependencies = [ - "cc", - "http_req", -] - -[[package]] -name = "nj-core" -version = "6.1.0" -source = "git+https://github.com/infinyon/node-bindgen.git?branch=master#1c6f19b658b0acaf71a25f5f2e4d8b4d970363ad" -dependencies = [ - "async-trait", - "ctor 0.2.9", - "fluvio-future", - "futures-lite", - "inventory", - "libc", - "nj-sys", - "num-bigint", - "pin-utils", - "serde_json", - "tracing", -] - -[[package]] -name = "nj-derive" -version = "3.4.3" -source = "git+https://github.com/infinyon/node-bindgen.git?branch=master#1c6f19b658b0acaf71a25f5f2e4d8b4d970363ad" -dependencies = [ - "Inflector", - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "nj-sys" -version = "4.0.0" -source = "git+https://github.com/infinyon/node-bindgen.git?branch=master#1c6f19b658b0acaf71a25f5f2e4d8b4d970363ad" - -[[package]] -name = "node-bindgen" -version = "6.1.0" -source = "git+https://github.com/infinyon/node-bindgen.git?branch=master#1c6f19b658b0acaf71a25f5f2e4d8b4d970363ad" -dependencies = [ - "nj-build", - "nj-core", - "nj-derive", - "nj-sys", -] - -[[package]] -name = "node-bindings" -version = "0.1.0" -dependencies = [ - "anyhow", - "crossbeam-channel", - "dirs", - "indexer_base", - "log", - "log4rs", - "merging", - "mimalloc", - "node-bindgen", - "processor", - "serde", - "serde_json", - "session", - "sources", - "stypes", - "thiserror 2.0.12", - "tikv-jemallocator", - "tokio", - "tokio-util", - "uuid", -] - -[[package]] -name = "nom" -version = "7.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a" -dependencies = [ - "memchr", - "minimal-lexical", -] - -[[package]] -name = "nu-ansi-term" -version = "0.46.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77a8165726e8236064dbb45459242600304b42a5ea24ee2948e18e023bf7ba84" -dependencies = [ - "overload", - "winapi", -] - -[[package]] -name = "num-bigint" -version = "0.4.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a5e44f723f1133c9deac646763579fdb3ac745e418f2a7af9cd0c431da1f20b9" -dependencies = [ - "num-integer", - "num-traits", -] - -[[package]] -name = "num-integer" -version = "0.1.46" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7969661fd2958a5cb096e56c8e1ad0444ac2bbcd0061bd28660485a44879858f" -dependencies = [ - "num-traits", -] - -[[package]] -name = "num-traits" -version = "0.2.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" -dependencies = [ - "autocfg", -] - -[[package]] -name = "object" -version = "0.36.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62948e14d923ea95ea2c7c86c71013138b66525b86bdc08d2dcc262bdb497b87" -dependencies = [ - "crc32fast", - "hashbrown", - "indexmap", - "memchr", -] - -[[package]] -name = "once_cell" -version = "1.21.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d" - -[[package]] -name = "openssl" -version = "0.10.73" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8505734d46c8ab1e19a1dce3aef597ad87dcb4c37e7188231769bd6bd51cebf8" -dependencies = [ - "bitflags 2.9.1", - "cfg-if", - "foreign-types", - "libc", - "once_cell", - "openssl-macros", - "openssl-sys", -] - -[[package]] -name = "openssl-macros" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.101", -] - -[[package]] -name = "openssl-probe" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d05e27ee213611ffe7d6348b942e8f942b37114c00cc03cec254295a4a17852e" - -[[package]] -name = "openssl-sys" -version = "0.9.109" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90096e2e47630d78b7d1c20952dc621f957103f8bc2c8359ec81290d75238571" -dependencies = [ - "cc", - "libc", - "pkg-config", - "vcpkg", -] - -[[package]] -name = "option-ext" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d" - -[[package]] -name = "ordered-float" -version = "2.10.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68f19d67e5a2795c94e73e0bb1cc1a7edeb2e28efd39e2e1c9b7a40c1108b11c" -dependencies = [ - "num-traits", -] - -[[package]] -name = "overload" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" - -[[package]] -name = "parking" -version = "2.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f38d5652c16fde515bb1ecef450ab0f6a219d619a7274976324d5e377f7dceba" - -[[package]] -name = "parking_lot" -version = "0.12.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70d58bf43669b5795d1576d0641cfb6fbb2057bf629506267a92807158584a13" -dependencies = [ - "lock_api", - "parking_lot_core", -] - -[[package]] -name = "parking_lot_core" -version = "0.9.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc838d2a56b5b1a6c25f55575dfc605fabb63bb2365f6c2353ef9159aa69e4a5" -dependencies = [ - "cfg-if", - "libc", - "redox_syscall", - "smallvec", - "windows-targets", -] - -[[package]] -name = "parse-zoneinfo" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f2a05b18d44e2957b88f96ba460715e295bc1d7510468a2f3d3b44535d26c24" -dependencies = [ - "regex", -] - -[[package]] -name = "parsers" -version = "4.0.0-alpha.1" -dependencies = [ - "byteorder", - "chrono", - "chrono-tz", - "dlt-core", - "lazy_static", - "log", - "memchr", - "rand 0.9.1", - "regex", - "serde", - "someip-messages", - "someip-payload", - "someip-tools", - "thiserror 2.0.12", -] - -[[package]] -name = "pcap-parser" -version = "0.16.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f8d57cc6bdf76d7abd6d3cc1113278047dab29c2ff6d97190e8d1c29d4efdac" -dependencies = [ - "circular", - "nom", - "rusticata-macros", -] - -[[package]] -name = "percent-encoding" -version = "2.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" - -[[package]] -name = "phf" -version = "0.11.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fd6780a80ae0c52cc120a26a1a42c1ae51b247a253e4e06113d23d2c2edd078" -dependencies = [ - "phf_shared", -] - -[[package]] -name = "phf_codegen" -version = "0.11.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aef8048c789fa5e851558d709946d6d79a8ff88c0440c587967f8e94bfb1216a" -dependencies = [ - "phf_generator", - "phf_shared", -] - -[[package]] -name = "phf_generator" -version = "0.11.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c80231409c20246a13fddb31776fb942c38553c51e871f8cbd687a4cfb5843d" -dependencies = [ - "phf_shared", - "rand 0.8.5", -] - -[[package]] -name = "phf_shared" -version = "0.11.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67eabc2ef2a60eb7faa00097bd1ffdb5bd28e62bf39990626a582201b7a754e5" -dependencies = [ - "siphasher", -] - -[[package]] -name = "pin-project-lite" -version = "0.2.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b3cff922bd51709b605d9ead9aa71031d81447142d828eb4a6eba76fe619f9b" - -[[package]] -name = "pin-utils" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" - -[[package]] -name = "piper" -version = "0.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96c8c490f422ef9a4efd2cb5b42b76c8613d7e7dfc1caf667b8a3350a5acc066" -dependencies = [ - "atomic-waker", - "fastrand", - "futures-io", -] - -[[package]] -name = "pkg-config" -version = "0.3.32" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7edddbd0b52d732b21ad9a5fab5c704c14cd949e5e9a1ec5929a24fded1b904c" - -[[package]] -name = "plugins_host" -version = "4.0.0-alpha.1" -dependencies = [ - "anyhow", - "blake3", - "dir_checksum", - "dirs", - "log", - "parsers", - "rand 0.9.1", - "serde", - "serde_json", - "stypes", - "thiserror 2.0.12", - "tokio", - "toml", - "wasmtime", - "wasmtime-wasi", -] - -[[package]] -name = "polling" -version = "3.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b53a684391ad002dd6a596ceb6c74fd004fdce75f4be2e3f615068abbea5fd50" -dependencies = [ - "cfg-if", - "concurrent-queue", - "hermit-abi", - "pin-project-lite", - "rustix 1.0.7", - "tracing", - "windows-sys 0.59.0", -] - -[[package]] -name = "postcard" -version = "1.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "170a2601f67cc9dba8edd8c4870b15f71a6a2dc196daec8c83f72b59dff628a8" -dependencies = [ - "cobs", - "embedded-io 0.4.0", - "embedded-io 0.6.1", - "serde", -] - -[[package]] -name = "potential_utf" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5a7c30837279ca13e7c867e9e40053bc68740f988cb07f7ca6df43cc734b585" -dependencies = [ - "zerovec", -] - -[[package]] -name = "ppv-lite86" -version = "0.2.21" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85eae3c4ed2f50dcfe72643da4befc30deadb458a9b590d720cde2f2b1e97da9" -dependencies = [ - "zerocopy", -] - -[[package]] -name = "proc-macro2" -version = "1.0.95" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02b3e5e68a3a1a02aad3ec490a98007cbc13c37cbe84a3cd7b8e406d76e7f778" -dependencies = [ - "unicode-ident", -] - -[[package]] -name = "processor" -version = "4.0.0-alpha.1" -dependencies = [ - "bincode", - "bufread", - "bytecount", - "futures", - "grep-regex", - "grep-searcher", - "indexer_base", - "itertools", - "lazy_static", - "log", - "parsers", - "regex", - "serde", - "serde_json", - "sources", - "stypes", - "text_grep", - "thiserror 2.0.12", - "tokio-util", -] - -[[package]] -name = "psm" -version = "0.1.26" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e944464ec8536cd1beb0bbfd96987eb5e3b72f2ecdafdc5c769a37f1fa2ae1f" -dependencies = [ - "cc", -] - -[[package]] -name = "pulley-interpreter" -version = "33.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aeb99cb5a3ada8e95a246d09f5fdb609f021bf740efd3ca9bddf458e3293a6a0" -dependencies = [ - "cranelift-bitset", - "log", - "wasmtime-math", -] - -[[package]] -name = "quick-xml" -version = "0.23.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11bafc859c6815fbaffbbbf4229ecb767ac913fecb27f9ad4343662e9ef099ea" -dependencies = [ - "memchr", -] - -[[package]] -name = "quick-xml" -version = "0.29.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81b9228215d82c7b61490fec1de287136b5de6f5700f6e58ea9ad61a7964ca51" -dependencies = [ - "memchr", -] - -[[package]] -name = "quote" -version = "1.0.40" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1885c039570dc00dcb4ff087a89e185fd56bae234ddc7f056a945bf36467248d" -dependencies = [ - "proc-macro2", -] - -[[package]] -name = "r-efi" -version = "5.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74765f6d916ee2faa39bc8e68e4f3ed8949b48cccdac59983d287a7cb71ce9c5" - -[[package]] -name = "rand" -version = "0.8.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" -dependencies = [ - "libc", - "rand_chacha 0.3.1", - "rand_core 0.6.4", -] - -[[package]] -name = "rand" -version = "0.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fbfd9d094a40bf3ae768db9361049ace4c0e04a4fd6b359518bd7b73a73dd97" -dependencies = [ - "rand_chacha 0.9.0", - "rand_core 0.9.3", -] - -[[package]] -name = "rand_chacha" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" -dependencies = [ - "ppv-lite86", - "rand_core 0.6.4", -] - -[[package]] -name = "rand_chacha" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3022b5f1df60f26e1ffddd6c66e8aa15de382ae63b3a0c1bfc0e4d3e3f325cb" -dependencies = [ - "ppv-lite86", - "rand_core 0.9.3", -] - -[[package]] -name = "rand_core" -version = "0.6.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" -dependencies = [ - "getrandom 0.2.16", -] - -[[package]] -name = "rand_core" -version = "0.9.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "99d9a13982dcf210057a8a78572b2217b667c3beacbf3a0d8b454f6f82837d38" -dependencies = [ - "getrandom 0.3.3", -] - -[[package]] -name = "rayon" -version = "1.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b418a60154510ca1a002a752ca9714984e21e4241e804d32555251faf8b78ffa" -dependencies = [ - "either", - "rayon-core", -] - -[[package]] -name = "rayon-core" -version = "1.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1465873a3dfdaa8ae7cb14b4383657caab0b3e8a0aa9ae8e04b044854c8dfce2" -dependencies = [ - "crossbeam-deque", - "crossbeam-utils", -] - -[[package]] -name = "redox_syscall" -version = "0.5.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "928fca9cf2aa042393a8325b9ead81d2f0df4cb12e1e24cef072922ccd99c5af" -dependencies = [ - "bitflags 2.9.1", -] - -[[package]] -name = "redox_users" -version = "0.4.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba009ff324d1fc1b900bd1fdb31564febe58a8ccc8a6fdbb93b543d33b13ca43" -dependencies = [ - "getrandom 0.2.16", - "libredox", - "thiserror 1.0.69", -] - -[[package]] -name = "redox_users" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd6f9d3d47bdd2ad6945c5015a226ec6155d0bcdfd8f7cd29f86b71f8de99d2b" -dependencies = [ - "getrandom 0.2.16", - "libredox", - "thiserror 2.0.12", -] - -[[package]] -name = "regalloc2" -version = "0.12.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5216b1837de2149f8bc8e6d5f88a9326b63b8c836ed58ce4a0a29ec736a59734" -dependencies = [ - "allocator-api2", - "bumpalo", - "hashbrown", - "log", - "rustc-hash", - "smallvec", -] - -[[package]] -name = "regex" -version = "1.11.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b544ef1b4eac5dc2db33ea63606ae9ffcfac26c1416a2806ae0bf5f56b201191" -dependencies = [ - "aho-corasick", - "memchr", - "regex-automata 0.4.9", - "regex-syntax 0.8.5", -] - -[[package]] -name = "regex-automata" -version = "0.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c230d73fb8d8c1b9c0b3135c5142a8acee3a0558fb8db5cf1cb65f8d7862132" -dependencies = [ - "regex-syntax 0.6.29", -] - -[[package]] -name = "regex-automata" -version = "0.4.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "809e8dc61f6de73b46c85f4c96486310fe304c434cfa43669d7b40f711150908" -dependencies = [ - "aho-corasick", - "memchr", - "regex-syntax 0.8.5", -] - -[[package]] -name = "regex-syntax" -version = "0.6.29" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" - -[[package]] -name = "regex-syntax" -version = "0.8.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" - -[[package]] -name = "rustc-demangle" -version = "0.1.24" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f" - -[[package]] -name = "rustc-hash" -version = "2.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "357703d41365b4b27c590e3ed91eabb1b663f07c4c084095e60cbed4362dff0d" - -[[package]] -name = "rusticata-macros" -version = "4.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "faf0c4a6ece9950b9abdb62b1cfcf2a68b3b67a10ba445b3bb85be2a293d0632" -dependencies = [ - "nom", -] - -[[package]] -name = "rustix" -version = "0.38.44" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fdb5bc1ae2baa591800df16c9ca78619bf65c0488b41b96ccec5d11220d8c154" -dependencies = [ - "bitflags 2.9.1", - "errno", - "libc", - "linux-raw-sys 0.4.15", - "windows-sys 0.59.0", -] - -[[package]] -name = "rustix" -version = "1.0.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c71e83d6afe7ff64890ec6b71d6a69bb8a610ab78ce364b3352876bb4c801266" -dependencies = [ - "bitflags 2.9.1", - "errno", - "libc", - "linux-raw-sys 0.9.4", - "windows-sys 0.59.0", -] - -[[package]] -name = "rustix-linux-procfs" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2fc84bf7e9aa16c4f2c758f27412dc9841341e16aa682d9c7ac308fe3ee12056" -dependencies = [ - "once_cell", - "rustix 1.0.7", -] - -[[package]] -name = "rustversion" -version = "1.0.21" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a0d197bd2c9dc6e53b84da9556a69ba4cdfab8619eb41a8bd1cc2027a0f6b1d" - -[[package]] -name = "ryu" -version = "1.0.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28d3b2b1366ec20994f1fd18c3c594f05c5dd4bc44d8bb0c1c632c8d6829481f" - -[[package]] -name = "same-file" -version = "1.0.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" -dependencies = [ - "winapi-util", -] - -[[package]] -name = "schannel" -version = "0.1.27" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f29ebaa345f945cec9fbbc532eb307f0fdad8161f281b6369539c8d84876b3d" -dependencies = [ - "windows-sys 0.59.0", -] - -[[package]] -name = "scopeguard" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" - -[[package]] -name = "security-framework" -version = "2.11.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "897b2245f0b511c87893af39b033e5ca9cce68824c4d7e7630b5a1d339658d02" -dependencies = [ - "bitflags 2.9.1", - "core-foundation 0.9.4", - "core-foundation-sys", - "libc", - "security-framework-sys", -] - -[[package]] -name = "security-framework-sys" -version = "2.14.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49db231d56a190491cb4aeda9527f1ad45345af50b0851622a7adb8c03b01c32" -dependencies = [ - "core-foundation-sys", - "libc", -] - -[[package]] -name = "semver" -version = "1.0.26" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56e6fa9c48d24d85fb3de5ad847117517440f6beceb7798af16b4a87d616b8d0" -dependencies = [ - "serde", -] - -[[package]] -name = "serde" -version = "1.0.219" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f0e2c6ed6606019b4e29e69dbaba95b11854410e5347d525002456dbbb786b6" -dependencies = [ - "serde_derive", -] - -[[package]] -name = "serde-value" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3a1a3341211875ef120e117ea7fd5228530ae7e7036a779fdc9117be6b3282c" -dependencies = [ - "ordered-float", - "serde", -] - -[[package]] -name = "serde_derive" -version = "1.0.219" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b0276cf7f2c73365f7157c8123c21cd9a50fbbd844757af28ca1f5925fc2a00" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.101", -] - -[[package]] -name = "serde_json" -version = "1.0.140" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "20068b6e96dc6c9bd23e01df8827e6c7e1f2fddd43c21810382803c136b99373" -dependencies = [ - "itoa", - "memchr", - "ryu", - "serde", -] - -[[package]] -name = "serde_spanned" -version = "0.6.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87607cb1398ed59d48732e575a4c28a7a8ebf2454b964fe3f224f2afc07909e1" -dependencies = [ - "serde", -] - -[[package]] -name = "serde_yaml" -version = "0.9.34+deprecated" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a8b1a1a2ebf674015cc02edccce75287f1a0130d394307b36743c2f5d504b47" -dependencies = [ - "indexmap", - "itoa", - "ryu", - "serde", - "unsafe-libyaml", -] - -[[package]] -name = "serialport" -version = "4.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21f60a586160667241d7702c420fc223939fb3c0bb8d3fac84f78768e8970dee" -dependencies = [ - "bitflags 2.9.1", - "cfg-if", - "core-foundation 0.10.0", - "core-foundation-sys", - "io-kit-sys", - "libudev", - "mach2", - "nix 0.26.4", - "quote", - "scopeguard", - "unescaper", - "windows-sys 0.52.0", -] - -[[package]] -name = "session" -version = "4.0.0-alpha.1" -dependencies = [ - "blake3", - "dirs", - "dlt-core", - "file-tools", - "futures", - "indexer_base", - "lazy_static", - "log", - "merging", - "mime_guess", - "parsers", - "plugins_host", - "processor", - "rustc-hash", - "serde", - "serde_json", - "serialport", - "shell-tools", - "sources", - "stypes", - "thiserror 2.0.12", - "tokio", - "tokio-stream", - "tokio-util", - "uuid", - "walkdir", -] - -[[package]] -name = "sha2" -version = "0.10.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7507d819769d01a365ab707794a4084392c824f54a7a6a7862f8c3d0892b283" -dependencies = [ - "cfg-if", - "cpufeatures", - "digest", -] - -[[package]] -name = "sharded-slab" -version = "0.1.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f40ca3c46823713e0d4209592e8d6e826aa57e928f09752619fc696c499637f6" -dependencies = [ - "lazy_static", -] - -[[package]] -name = "shell-tools" -version = "0.1.0" -dependencies = [ - "log", - "stypes", - "which", -] - -[[package]] -name = "shlex" -version = "1.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" - -[[package]] -name = "signal-hook-registry" -version = "1.4.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9203b8055f63a2a00e2f593bb0510367fe707d7ff1e5c872de2f537b339e5410" -dependencies = [ - "libc", -] - -[[package]] -name = "siphasher" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56199f7ddabf13fe5074ce809e7d3f42b42ae711800501b5b16ea82ad029c39d" - -[[package]] -name = "slab" -version = "0.4.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67" -dependencies = [ - "autocfg", -] - -[[package]] -name = "smallvec" -version = "1.15.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8917285742e9f3e1683f0a9c4e6b57960b7314d0b08d30d1ecd426713ee2eee9" -dependencies = [ - "serde", -] - -[[package]] -name = "socket2" -version = "0.5.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e22376abed350d73dd1cd119b57ffccad95b4e585a7cda43e286245ce23c0678" -dependencies = [ - "libc", - "windows-sys 0.52.0", -] - -[[package]] -name = "someip-messages" -version = "0.3.1" -source = "git+https://github.com/esrlabs/someip#59b27a6689d72948c4569bc6037c2387c1a661ed" -dependencies = [ - "byteorder", - "derive_builder", - "thiserror 1.0.69", -] - -[[package]] -name = "someip-payload" -version = "0.1.5" -source = "git+https://github.com/esrlabs/someip-payload?rev=b9aa52c96fcbdb0e5aa1ee5258299f0ff7e3a094#b9aa52c96fcbdb0e5aa1ee5258299f0ff7e3a094" -dependencies = [ - "byteorder", - "log", - "quick-xml 0.23.1", - "regex", - "thiserror 1.0.69", - "ux", - "voca_rs", -] - -[[package]] -name = "someip-tools" -version = "4.0.0-alpha.1" -dependencies = [ - "nom", - "thiserror 2.0.12", -] - -[[package]] -name = "sources" -version = "4.0.0-alpha.1" -dependencies = [ - "bufread", - "bytes", - "etherparse", - "futures", - "log", - "pcap-parser", - "serde", - "shell-tools", - "socket2", - "stypes", - "thiserror 2.0.12", - "tokio", - "tokio-serial", - "tokio-stream", - "tokio-util", - "uuid", -] - -[[package]] -name = "sptr" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b9b39299b249ad65f3b7e96443bad61c02ca5cd3589f46cb6d610a0fd6c0d6a" - -[[package]] -name = "stable_deref_trait" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" - -[[package]] -name = "stfu8" -version = "0.2.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e51f1e89f093f99e7432c491c382b88a6860a5adbe6bf02574bf0a08efff1978" - -[[package]] -name = "strsim" -version = "0.11.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" - -[[package]] -name = "stypes" -version = "4.0.0-alpha.1" -dependencies = [ - "anyhow", - "bincode", - "dlt-core", - "extend", - "node-bindgen", - "serde", - "thiserror 2.0.12", - "tokio", - "uuid", - "walkdir", -] - -[[package]] -name = "syn" -version = "1.0.109" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" -dependencies = [ - "proc-macro2", - "quote", - "unicode-ident", -] - -[[package]] -name = "syn" -version = "2.0.101" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ce2b7fc941b3a24138a0a7cf8e858bfc6a992e7978a068a5c760deb0ed43caf" -dependencies = [ - "proc-macro2", - "quote", - "unicode-ident", -] - -[[package]] -name = "synstructure" -version = "0.13.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "728a70f3dbaf5bab7f0c4b1ac8d7ae5ea60a4b5549c8a5914361c99147a709d2" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.101", -] - -[[package]] -name = "system-interface" -version = "0.27.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc4592f674ce18521c2a81483873a49596655b179f71c5e05d10c1fe66c78745" -dependencies = [ - "bitflags 2.9.1", - "cap-fs-ext", - "cap-std", - "fd-lock", - "io-lifetimes", - "rustix 0.38.44", - "windows-sys 0.59.0", - "winx", -] - -[[package]] -name = "target-lexicon" -version = "0.13.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e502f78cdbb8ba4718f566c418c52bc729126ffd16baee5baa718cf25dd5a69a" - -[[package]] -name = "tempfile" -version = "3.20.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8a64e3985349f2441a1a9ef0b853f869006c3855f2cda6862a94d26ebb9d6a1" -dependencies = [ - "fastrand", - "getrandom 0.3.3", - "once_cell", - "rustix 1.0.7", - "windows-sys 0.59.0", -] - -[[package]] -name = "termcolor" -version = "1.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06794f8f6c5c898b3275aebefa6b8a1cb24cd2c6c79397ab15774837a0bc5755" -dependencies = [ - "winapi-util", -] - -[[package]] -name = "text_grep" -version = "4.0.0-alpha.1" -dependencies = [ - "bufread", - "grep-regex", - "grep-searcher", - "regex", - "thiserror 2.0.12", - "tokio", - "tokio-util", -] - -[[package]] -name = "thiserror" -version = "1.0.69" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52" -dependencies = [ - "thiserror-impl 1.0.69", -] - -[[package]] -name = "thiserror" -version = "2.0.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "567b8a2dae586314f7be2a752ec7474332959c6460e02bde30d702a66d488708" -dependencies = [ - "thiserror-impl 2.0.12", -] - -[[package]] -name = "thiserror-impl" -version = "1.0.69" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.101", -] - -[[package]] -name = "thiserror-impl" -version = "2.0.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f7cf42b4507d8ea322120659672cf1b9dbb93f8f2d4ecfd6e51350ff5b17a1d" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.101", -] - -[[package]] -name = "thread-id" -version = "4.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cfe8f25bbdd100db7e1d34acf7fd2dc59c4bf8f7483f505eaa7d4f12f76cc0ea" -dependencies = [ - "libc", - "winapi", -] - -[[package]] -name = "thread_local" -version = "1.1.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b9ef9bad013ada3808854ceac7b46812a6465ba368859a37e2100283d2d719c" -dependencies = [ - "cfg-if", - "once_cell", -] - -[[package]] -name = "tikv-jemalloc-sys" -version = "0.6.0+5.3.0-1-ge13ca993e8ccb9ba9847cc330696e02839f328f7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd3c60906412afa9c2b5b5a48ca6a5abe5736aec9eb48ad05037a677e52e4e2d" -dependencies = [ - "cc", - "libc", -] - -[[package]] -name = "tikv-jemallocator" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4cec5ff18518d81584f477e9bfdf957f5bb0979b0bac3af4ca30b5b3ae2d2865" -dependencies = [ - "libc", - "tikv-jemalloc-sys", -] - -[[package]] -name = "tinystr" -version = "0.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d4f6d1145dcb577acf783d4e601bc1d76a13337bb54e6233add580b07344c8b" -dependencies = [ - "displaydoc", - "zerovec", -] - -[[package]] -name = "tokio" -version = "1.45.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75ef51a33ef1da925cea3e4eb122833cb377c61439ca401b770f54902b806779" -dependencies = [ - "backtrace", - "bytes", - "libc", - "mio", - "parking_lot", - "pin-project-lite", - "signal-hook-registry", - "socket2", - "tokio-macros", - "windows-sys 0.52.0", -] - -[[package]] -name = "tokio-macros" -version = "2.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e06d43f1345a3bcd39f6a56dbb7dcab2ba47e68e8ac134855e7e2bdbaf8cab8" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.101", -] - -[[package]] -name = "tokio-serial" -version = "5.4.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa1d5427f11ba7c5e6384521cfd76f2d64572ff29f3f4f7aa0f496282923fdc8" -dependencies = [ - "cfg-if", - "futures", - "log", - "mio-serial", - "serialport", - "tokio", -] - -[[package]] -name = "tokio-stream" -version = "0.1.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eca58d7bba4a75707817a2c44174253f9236b2d5fbd055602e9d5c07c139a047" -dependencies = [ - "futures-core", - "pin-project-lite", - "tokio", -] - -[[package]] -name = "tokio-util" -version = "0.7.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "66a539a9ad6d5d281510d5bd368c973d636c02dbf8a67300bfb6b950696ad7df" -dependencies = [ - "bytes", - "futures-core", - "futures-io", - "futures-sink", - "futures-util", - "hashbrown", - "pin-project-lite", - "slab", - "tokio", -] - -[[package]] -name = "toml" -version = "0.8.22" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05ae329d1f08c4d17a59bed7ff5b5a769d062e64a62d34a3261b219e62cd5aae" -dependencies = [ - "serde", - "serde_spanned", - "toml_datetime", - "toml_edit", -] - -[[package]] -name = "toml_datetime" -version = "0.6.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3da5db5a963e24bc68be8b17b6fa82814bb22ee8660f192bb182771d498f09a3" -dependencies = [ - "serde", -] - -[[package]] -name = "toml_edit" -version = "0.22.26" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "310068873db2c5b3e7659d2cc35d21855dbafa50d1ce336397c666e3cb08137e" -dependencies = [ - "indexmap", - "serde", - "serde_spanned", - "toml_datetime", - "toml_write", - "winnow", -] - -[[package]] -name = "toml_write" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfb942dfe1d8e29a7ee7fcbde5bd2b9a25fb89aa70caea2eba3bee836ff41076" - -[[package]] -name = "tracing" -version = "0.1.41" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "784e0ac535deb450455cbfa28a6f0df145ea1bb7ae51b821cf5e7927fdcfbdd0" -dependencies = [ - "pin-project-lite", - "tracing-attributes", - "tracing-core", -] - -[[package]] -name = "tracing-attributes" -version = "0.1.28" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "395ae124c09f9e6918a2310af6038fba074bcf474ac352496d5910dd59a2226d" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.101", -] - -[[package]] -name = "tracing-core" -version = "0.1.33" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e672c95779cf947c5311f83787af4fa8fffd12fb27e4993211a84bdfd9610f9c" -dependencies = [ - "once_cell", - "valuable", -] - -[[package]] -name = "tracing-log" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee855f1f400bd0e5c02d150ae5de3840039a3f54b025156404e34c23c03f47c3" -dependencies = [ - "log", - "once_cell", - "tracing-core", -] - -[[package]] -name = "tracing-subscriber" -version = "0.3.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8189decb5ac0fa7bc8b96b7cb9b2701d60d48805aca84a238004d665fcc4008" -dependencies = [ - "matchers", - "nu-ansi-term", - "once_cell", - "regex", - "sharded-slab", - "smallvec", - "thread_local", - "tracing", - "tracing-core", - "tracing-log", -] - -[[package]] -name = "trait-variant" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70977707304198400eb4835a78f6a9f928bf41bba420deb8fdb175cd965d77a7" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.101", -] - -[[package]] -name = "typemap-ors" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a68c24b707f02dd18f1e4ccceb9d49f2058c2fb86384ef9972592904d7a28867" -dependencies = [ - "unsafe-any-ors", -] - -[[package]] -name = "typenum" -version = "1.18.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1dccffe3ce07af9386bfd29e80c0ab1a8205a2fc34e4bcd40364df902cfa8f3f" - -[[package]] -name = "unescaper" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c01d12e3a56a4432a8b436f293c25f4808bdf9e9f9f98f9260bba1f1bc5a1f26" -dependencies = [ - "thiserror 2.0.12", -] - -[[package]] -name = "unicase" -version = "2.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75b844d17643ee918803943289730bec8aac480150456169e647ed0b576ba539" - -[[package]] -name = "unicode-ident" -version = "1.0.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a5f39404a5da50712a4c1eecf25e90dd62b613502b7e925fd4e4d19b5c96512" - -[[package]] -name = "unicode-segmentation" -version = "1.12.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6ccf251212114b54433ec949fd6a7841275f9ada20dddd2f29e9ceea4501493" - -[[package]] -name = "unicode-width" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fc81956842c57dac11422a97c3b8195a1ff727f06e85c84ed2e8aa277c9a0fd" - -[[package]] -name = "unicode-xid" -version = "0.2.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ebc1c04c71510c7f702b52b7c350734c9ff1295c464a03335b00bb84fc54f853" - -[[package]] -name = "unsafe-any-ors" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0a303d30665362d9680d7d91d78b23f5f899504d4f08b3c4cf08d055d87c0ad" -dependencies = [ - "destructure_traitobject", -] - -[[package]] -name = "unsafe-libyaml" -version = "0.2.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "673aac59facbab8a9007c7f6108d11f63b603f7cabff99fabf650fea5c32b861" - -[[package]] -name = "url" -version = "2.5.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32f8b686cadd1473f4bd0117a5d28d36b1ade384ea9b5069a1c40aefed7fda60" -dependencies = [ - "form_urlencoded", - "idna", - "percent-encoding", -] - -[[package]] -name = "utf8_iter" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be" - -[[package]] -name = "uuid" -version = "1.17.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3cf4199d1e5d15ddd86a694e4d0dffa9c323ce759fea589f00fef9d81cc1931d" -dependencies = [ - "getrandom 0.3.3", - "js-sys", - "serde", - "wasm-bindgen", -] - -[[package]] -name = "ux" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b59fc5417e036e53226bbebd90196825d358624fd5577432c4e486c95b1b096" - -[[package]] -name = "valuable" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba73ea9cf16a25df0c8caa16c51acb937d5712a8429db78a3ee29d5dcacd3a65" - -[[package]] -name = "value-bag" -version = "1.11.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "943ce29a8a743eb10d6082545d861b24f9d1b160b7d741e0f2cdf726bec909c5" - -[[package]] -name = "vcpkg" -version = "0.2.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" - -[[package]] -name = "version_check" -version = "0.9.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" - -[[package]] -name = "voca_rs" -version = "1.15.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e44efbf25e32768d5ecd22244feacc3d3b3eca72d318f5ef0a4764c2c158e18" -dependencies = [ - "regex", - "stfu8", - "unicode-segmentation", -] - -[[package]] -name = "walkdir" -version = "2.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29790946404f91d9c5d06f9874efddea1dc06c5efe94541a7d6863108e3a5e4b" -dependencies = [ - "same-file", - "winapi-util", -] - -[[package]] -name = "wasi" -version = "0.11.0+wasi-snapshot-preview1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" - -[[package]] -name = "wasi" -version = "0.14.2+wasi-0.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9683f9a5a998d873c0d21fcbe3c083009670149a8fab228644b8bd36b2c48cb3" -dependencies = [ - "wit-bindgen-rt", -] - -[[package]] -name = "wasm-bindgen" -version = "0.2.100" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1edc8929d7499fc4e8f0be2262a241556cfc54a0bea223790e71446f2aab1ef5" -dependencies = [ - "cfg-if", - "once_cell", - "rustversion", - "wasm-bindgen-macro", -] - -[[package]] -name = "wasm-bindgen-backend" -version = "0.2.100" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f0a0651a5c2bc21487bde11ee802ccaf4c51935d0d3d42a6101f98161700bc6" -dependencies = [ - "bumpalo", - "log", - "proc-macro2", - "quote", - "syn 2.0.101", - "wasm-bindgen-shared", -] - -[[package]] -name = "wasm-bindgen-futures" -version = "0.4.50" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "555d470ec0bc3bb57890405e5d4322cc9ea83cebb085523ced7be4144dac1e61" -dependencies = [ - "cfg-if", - "js-sys", - "once_cell", - "wasm-bindgen", - "web-sys", -] - -[[package]] -name = "wasm-bindgen-macro" -version = "0.2.100" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fe63fc6d09ed3792bd0897b314f53de8e16568c2b3f7982f468c0bf9bd0b407" -dependencies = [ - "quote", - "wasm-bindgen-macro-support", -] - -[[package]] -name = "wasm-bindgen-macro-support" -version = "0.2.100" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ae87ea40c9f689fc23f209965b6fb8a99ad69aeeb0231408be24920604395de" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.101", - "wasm-bindgen-backend", - "wasm-bindgen-shared", -] - -[[package]] -name = "wasm-bindgen-shared" -version = "0.2.100" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a05d73b933a847d6cccdda8f838a22ff101ad9bf93e33684f39c1f5f0eece3d" -dependencies = [ - "unicode-ident", -] - -[[package]] -name = "wasm-encoder" -version = "0.229.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38ba1d491ecacb085a2552025c10a675a6fddcbd03b1fc9b36c536010ce265d2" -dependencies = [ - "leb128fmt", - "wasmparser 0.229.0", -] - -[[package]] -name = "wasm-encoder" -version = "0.233.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9679ae3cf7cfa2ca3a327f7fab97f27f3294d402fd1a76ca8ab514e17973e4d3" -dependencies = [ - "leb128fmt", - "wasmparser 0.233.0", -] - -[[package]] -name = "wasmparser" -version = "0.229.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0cc3b1f053f5d41aa55640a1fa9b6d1b8a9e4418d118ce308d20e24ff3575a8c" -dependencies = [ - "bitflags 2.9.1", - "hashbrown", - "indexmap", - "semver", - "serde", -] - -[[package]] -name = "wasmparser" -version = "0.233.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b51cb03afce7964bbfce46602d6cb358726f36430b6ba084ac6020d8ce5bc102" -dependencies = [ - "bitflags 2.9.1", - "indexmap", - "semver", -] - -[[package]] -name = "wasmprinter" -version = "0.229.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d25dac01892684a99b8fbfaf670eb6b56edea8a096438c75392daeb83156ae2e" -dependencies = [ - "anyhow", - "termcolor", - "wasmparser 0.229.0", -] - -[[package]] -name = "wasmtime" -version = "33.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "15396de4fce22e431aa913a9d17325665e72a39aaa7972c8aeae7507eff6144f" -dependencies = [ - "addr2line", - "anyhow", - "async-trait", - "bitflags 2.9.1", - "bumpalo", - "cc", - "cfg-if", - "encoding_rs", - "fxprof-processed-profile", - "gimli", - "hashbrown", - "indexmap", - "ittapi", - "libc", - "log", - "mach2", - "memfd", - "object", - "once_cell", - "postcard", - "psm", - "pulley-interpreter", - "rayon", - "rustix 1.0.7", - "semver", - "serde", - "serde_derive", - "serde_json", - "smallvec", - "sptr", - "target-lexicon", - "trait-variant", - "wasm-encoder 0.229.0", - "wasmparser 0.229.0", - "wasmtime-asm-macros", - "wasmtime-cache", - "wasmtime-component-macro", - "wasmtime-component-util", - "wasmtime-cranelift", - "wasmtime-environ", - "wasmtime-fiber", - "wasmtime-jit-debug", - "wasmtime-jit-icache-coherence", - "wasmtime-math", - "wasmtime-slab", - "wasmtime-versioned-export-macros", - "wasmtime-winch", - "wat", - "windows-sys 0.59.0", -] - -[[package]] -name = "wasmtime-asm-macros" -version = "33.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8d13b1a25d9b77ce42b4641a797e8c0bde0643b9ad5aaa36ce7e00cf373ffab" -dependencies = [ - "cfg-if", -] - -[[package]] -name = "wasmtime-cache" -version = "33.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfc77a5e7d358c0180745021735de789e0d8d64a9eb740d54cee525a164f0343" -dependencies = [ - "anyhow", - "base64", - "directories-next", - "log", - "postcard", - "rustix 1.0.7", - "serde", - "serde_derive", - "sha2", - "toml", - "windows-sys 0.59.0", - "zstd", -] - -[[package]] -name = "wasmtime-component-macro" -version = "33.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be73f1c13b25cf7c062ea2f3aba8a92abe4284a14b49e866e4962824802da5cf" -dependencies = [ - "anyhow", - "proc-macro2", - "quote", - "syn 2.0.101", - "wasmtime-component-util", - "wasmtime-wit-bindgen", - "wit-parser", -] - -[[package]] -name = "wasmtime-component-util" -version = "33.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1cba282555a9f2443f4e40e415772ea98acabbc341e9b3b905f541ff304cbc5e" - -[[package]] -name = "wasmtime-cranelift" -version = "33.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a0c2c2e083dc4c119cca61cc42ca6b3711b75ed9823f77b684ee009c74f939d8" -dependencies = [ - "anyhow", - "cfg-if", - "cranelift-codegen", - "cranelift-control", - "cranelift-entity", - "cranelift-frontend", - "cranelift-native", - "gimli", - "itertools", - "log", - "object", - "pulley-interpreter", - "smallvec", - "target-lexicon", - "thiserror 2.0.12", - "wasmparser 0.229.0", - "wasmtime-environ", - "wasmtime-versioned-export-macros", -] - -[[package]] -name = "wasmtime-environ" -version = "33.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "357542664493b1359727f235b615ae74f63bd46aa4d0c587b09e3b060eb0b8ef" -dependencies = [ - "anyhow", - "cpp_demangle", - "cranelift-bitset", - "cranelift-entity", - "gimli", - "indexmap", - "log", - "object", - "postcard", - "rustc-demangle", - "semver", - "serde", - "serde_derive", - "smallvec", - "target-lexicon", - "wasm-encoder 0.229.0", - "wasmparser 0.229.0", - "wasmprinter", - "wasmtime-component-util", -] - -[[package]] -name = "wasmtime-fiber" -version = "33.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d83e697b13d6ae9eff31edac86673aabaf8dbf20267f2aa20e831dd01da480a3" -dependencies = [ - "anyhow", - "cc", - "cfg-if", - "rustix 1.0.7", - "wasmtime-asm-macros", - "wasmtime-versioned-export-macros", - "windows-sys 0.59.0", -] - -[[package]] -name = "wasmtime-jit-debug" -version = "33.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6748fe974240d45e6bb25ac8e9a600be36f77347253cbbb35bd2d72e01ff0ece" -dependencies = [ - "cc", - "object", - "rustix 1.0.7", - "wasmtime-versioned-export-macros", -] - -[[package]] -name = "wasmtime-jit-icache-coherence" -version = "33.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "175e924dbc944c185808466d1e90b5a7feb610f3b9abdfe26f8ee25fd1086d1c" -dependencies = [ - "anyhow", - "cfg-if", - "libc", - "windows-sys 0.59.0", -] - -[[package]] -name = "wasmtime-math" -version = "33.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d9448adcd9c5980c0eac1630794bd1be3cf573c28d0630f7d3184405b36bcfe" -dependencies = [ - "libm", -] - -[[package]] -name = "wasmtime-slab" -version = "33.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b50f7c227d6a925d9dfd0fbfdbf06877cb2fe387bb3248049706b19b5f86e560" - -[[package]] -name = "wasmtime-versioned-export-macros" -version = "33.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55b39ffeda28be925babb2d45067d8ba2c67d2227328c5364d23b4152eba9950" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.101", -] - -[[package]] -name = "wasmtime-wasi" -version = "33.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d357e5699ed32103d0dab897c3965fd66f1ba29a37072d441199e7febe6324e" -dependencies = [ - "anyhow", - "async-trait", - "bitflags 2.9.1", - "bytes", - "cap-fs-ext", - "cap-net-ext", - "cap-rand", - "cap-std", - "cap-time-ext", - "fs-set-times", - "futures", - "io-extras", - "io-lifetimes", - "rustix 1.0.7", - "system-interface", - "thiserror 2.0.12", - "tokio", - "tracing", - "url", - "wasmtime", - "wasmtime-wasi-io", - "wiggle", - "windows-sys 0.59.0", -] - -[[package]] -name = "wasmtime-wasi-io" -version = "33.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43418871afd46c188231e4d822d375c0660c7a1484db3f7f247e552186e971a2" -dependencies = [ - "anyhow", - "async-trait", - "bytes", - "futures", - "wasmtime", -] - -[[package]] -name = "wasmtime-winch" -version = "33.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f180e6a8c0724608cd2d55ceb7d03ed3a729ca78fcd34a6756f36cf9a5fd546" -dependencies = [ - "anyhow", - "cranelift-codegen", - "gimli", - "object", - "target-lexicon", - "wasmparser 0.229.0", - "wasmtime-cranelift", - "wasmtime-environ", - "winch-codegen", -] - -[[package]] -name = "wasmtime-wit-bindgen" -version = "33.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f8d793a398e2974d562e65c8d366f39a942fe1ce7970244d9d6e5f96f29b534" -dependencies = [ - "anyhow", - "heck", - "indexmap", - "wit-parser", -] - -[[package]] -name = "wast" -version = "35.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ef140f1b49946586078353a453a1d28ba90adfc54dde75710bc1931de204d68" -dependencies = [ - "leb128", -] - -[[package]] -name = "wast" -version = "233.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2eaf4099d8d0c922b83bf3c90663f5666f0769db9e525184284ebbbdb1dd2180" -dependencies = [ - "bumpalo", - "leb128fmt", - "memchr", - "unicode-width", - "wasm-encoder 0.233.0", -] - -[[package]] -name = "wat" -version = "1.233.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d9bc80f5e4b25ea086ef41b91ccd244adde45d931c384d94a8ff64ab8bd7d87" -dependencies = [ - "wast 233.0.0", -] - -[[package]] -name = "web-sys" -version = "0.3.77" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33b6dd2ef9186f1f2072e409e99cd22a975331a6b3591b12c764e0e55c60d5d2" -dependencies = [ - "js-sys", - "wasm-bindgen", -] - -[[package]] -name = "which" -version = "8.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3fabb953106c3c8eea8306e4393700d7657561cb43122571b172bbfb7c7ba1d" -dependencies = [ - "env_home", - "rustix 1.0.7", - "winsafe", -] - -[[package]] -name = "wiggle" -version = "33.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73aed697b5eb6a5726dca57f85199f73c61dee669e58faab71086eb7eda6b077" -dependencies = [ - "anyhow", - "async-trait", - "bitflags 2.9.1", - "thiserror 2.0.12", - "tracing", - "wasmtime", - "wiggle-macro", -] - -[[package]] -name = "wiggle-generate" -version = "33.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d477015cda1d476b7e45d50eeb93d9038df8f24827007669065292651b26d225" -dependencies = [ - "anyhow", - "heck", - "proc-macro2", - "quote", - "syn 2.0.101", - "witx", -] - -[[package]] -name = "wiggle-macro" -version = "33.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "71ac603ee46847d2e3c142ba715d326f1045155c7758f4e8dd001d5f92810c12" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.101", - "wiggle-generate", -] - -[[package]] -name = "winapi" -version = "0.3.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" -dependencies = [ - "winapi-i686-pc-windows-gnu", - "winapi-x86_64-pc-windows-gnu", -] - -[[package]] -name = "winapi-i686-pc-windows-gnu" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" - -[[package]] -name = "winapi-util" -version = "0.1.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb" -dependencies = [ - "windows-sys 0.59.0", -] - -[[package]] -name = "winapi-x86_64-pc-windows-gnu" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" - -[[package]] -name = "winch-codegen" -version = "33.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad3072bf7c270d5e29a3d69744c81665dd3adb6e60f123925393a1c150bf9ec4" -dependencies = [ - "anyhow", - "cranelift-assembler-x64", - "cranelift-codegen", - "gimli", - "regalloc2", - "smallvec", - "target-lexicon", - "thiserror 2.0.12", - "wasmparser 0.229.0", - "wasmtime-cranelift", - "wasmtime-environ", -] - -[[package]] -name = "windows-core" -version = "0.61.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0fdd3ddb90610c7638aa2b3a3ab2904fb9e5cdbecc643ddb3647212781c4ae3" -dependencies = [ - "windows-implement", - "windows-interface", - "windows-link", - "windows-result", - "windows-strings", -] - -[[package]] -name = "windows-implement" -version = "0.60.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a47fddd13af08290e67f4acabf4b459f647552718f683a7b415d290ac744a836" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.101", -] - -[[package]] -name = "windows-interface" -version = "0.59.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd9211b69f8dcdfa817bfd14bf1c97c9188afa36f4750130fcdf3f400eca9fa8" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.101", -] - -[[package]] -name = "windows-link" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76840935b766e1b0a05c0066835fb9ec80071d4c09a16f6bd5f7e655e3c14c38" - -[[package]] -name = "windows-result" -version = "0.3.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56f42bd332cc6c8eac5af113fc0c1fd6a8fd2aa08a0119358686e5160d0586c6" -dependencies = [ - "windows-link", -] - -[[package]] -name = "windows-strings" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56e6c93f3a0c3b36176cb1327a4958a0353d5d166c2a35cb268ace15e91d3b57" -dependencies = [ - "windows-link", -] - -[[package]] -name = "windows-sys" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" -dependencies = [ - "windows-targets", -] - -[[package]] -name = "windows-sys" -version = "0.59.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" -dependencies = [ - "windows-targets", -] - -[[package]] -name = "windows-targets" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" -dependencies = [ - "windows_aarch64_gnullvm", - "windows_aarch64_msvc", - "windows_i686_gnu", - "windows_i686_gnullvm", - "windows_i686_msvc", - "windows_x86_64_gnu", - "windows_x86_64_gnullvm", - "windows_x86_64_msvc", -] - -[[package]] -name = "windows_aarch64_gnullvm" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" - -[[package]] -name = "windows_aarch64_msvc" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" - -[[package]] -name = "windows_i686_gnu" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" - -[[package]] -name = "windows_i686_gnullvm" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" - -[[package]] -name = "windows_i686_msvc" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" - -[[package]] -name = "windows_x86_64_gnu" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" - -[[package]] -name = "windows_x86_64_gnullvm" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" - -[[package]] -name = "windows_x86_64_msvc" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" - -[[package]] -name = "winnow" -version = "0.7.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c06928c8748d81b05c9be96aad92e1b6ff01833332f281e8cfca3be4b35fc9ec" -dependencies = [ - "memchr", -] - -[[package]] -name = "winsafe" -version = "0.0.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d135d17ab770252ad95e9a872d365cf3090e3be864a34ab46f48555993efc904" - -[[package]] -name = "winx" -version = "0.36.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f3fd376f71958b862e7afb20cfe5a22830e1963462f3a17f49d82a6c1d1f42d" -dependencies = [ - "bitflags 2.9.1", - "windows-sys 0.59.0", -] - -[[package]] -name = "wit-bindgen-rt" -version = "0.39.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f42320e61fe2cfd34354ecb597f86f413484a798ba44a8ca1165c58d42da6c1" -dependencies = [ - "bitflags 2.9.1", -] - -[[package]] -name = "wit-parser" -version = "0.229.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "459c6ba62bf511d6b5f2a845a2a736822e38059c1cfa0b644b467bbbfae4efa6" -dependencies = [ - "anyhow", - "id-arena", - "indexmap", - "log", - "semver", - "serde", - "serde_derive", - "serde_json", - "unicode-xid", - "wasmparser 0.229.0", -] - -[[package]] -name = "witx" -version = "0.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e366f27a5cabcddb2706a78296a40b8fcc451e1a6aba2fc1d94b4a01bdaaef4b" -dependencies = [ - "anyhow", - "log", - "thiserror 1.0.69", - "wast 35.0.2", -] - -[[package]] -name = "writeable" -version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea2f10b9bb0928dfb1b42b65e1f9e36f7f54dbdf08457afefb38afcdec4fa2bb" - -[[package]] -name = "yoke" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f41bb01b8226ef4bfd589436a297c53d118f65921786300e427be8d487695cc" -dependencies = [ - "serde", - "stable_deref_trait", - "yoke-derive", - "zerofrom", -] - -[[package]] -name = "yoke-derive" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38da3c9736e16c5d3c8c597a9aaa5d1fa565d0532ae05e27c24aa62fb32c0ab6" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.101", - "synstructure", -] - -[[package]] -name = "zerocopy" -version = "0.8.25" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1702d9583232ddb9174e01bb7c15a2ab8fb1bc6f227aa1233858c351a3ba0cb" -dependencies = [ - "zerocopy-derive", -] - -[[package]] -name = "zerocopy-derive" -version = "0.8.25" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28a6e20d751156648aa063f3800b706ee209a32c0b4d9f24be3d980b01be55ef" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.101", -] - -[[package]] -name = "zerofrom" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50cc42e0333e05660c3587f3bf9d0478688e15d870fab3346451ce7f8c9fbea5" -dependencies = [ - "zerofrom-derive", -] - -[[package]] -name = "zerofrom-derive" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d71e5d6e06ab090c67b5e44993ec16b72dcbaabc526db883a360057678b48502" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.101", - "synstructure", -] - -[[package]] -name = "zerotrie" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "36f0bbd478583f79edad978b407914f61b2972f5af6fa089686016be8f9af595" -dependencies = [ - "displaydoc", - "yoke", - "zerofrom", -] - -[[package]] -name = "zerovec" -version = "0.11.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a05eb080e015ba39cc9e23bbe5e7fb04d5fb040350f99f34e338d5fdd294428" -dependencies = [ - "yoke", - "zerofrom", - "zerovec-derive", -] - -[[package]] -name = "zerovec-derive" -version = "0.11.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b96237efa0c878c64bd89c436f661be4e46b2f3eff1ebb976f7ef2321d2f58f" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.101", -] - -[[package]] -name = "zstd" -version = "0.13.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e91ee311a569c327171651566e07972200e76fcfe2242a4fa446149a3881c08a" -dependencies = [ - "zstd-safe", -] - -[[package]] -name = "zstd-safe" -version = "7.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f49c4d5f0abb602a93fb8736af2a4f4dd9512e36f7f570d66e65ff867ed3b9d" -dependencies = [ - "zstd-sys", -] - -[[package]] -name = "zstd-sys" -version = "2.0.15+zstd.1.5.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb81183ddd97d0c74cedf1d50d85c8d08c1b8b68ee863bdee9e706eedba1a237" -dependencies = [ - "cc", - "pkg-config", -] diff --git a/application/apps/rustcore/rs-bindings/Cargo.toml b/application/apps/rustcore/rs-bindings/Cargo.toml deleted file mode 100644 index d50a3f3d5f..0000000000 --- a/application/apps/rustcore/rs-bindings/Cargo.toml +++ /dev/null @@ -1,50 +0,0 @@ -[package] -name = "node-bindings" -version = "0.1.0" -authors = ["Oliver Mueller "] -edition = "2024" - -[lib] -crate-type = ["cdylib"] - -[build-dependencies] -# node-bindgen = { version = "5.0", features = ["build"] } -# Added "default-features = false" becuase: https://github.com/rust-lang/rust/issues/98903 -# node-bindgen = {git = "https://github.com/DmitryAstafyev/node-bindgen.git", branch="master", default-features = false, features = ["build"] } -node-bindgen = {git = "https://github.com/infinyon/node-bindgen.git", branch="master", default-features = false, features = ["build"] } - -[dependencies] -anyhow = "1.0" -crossbeam-channel = "0.5" -dirs = "6.0" -indexer_base = { path = "../../indexer/indexer_base" } -log = "0.4" -log4rs = "1.3" -# node-bindgen = {git = "https://github.com/DmitryAstafyev/node-bindgen.git", branch="master", features = ["serde-json"] } -node-bindgen = {git = "https://github.com/infinyon/node-bindgen.git", branch="master", features = ["serde-json"] } -serde = { version = "1.0", features = ["derive"] } -thiserror = "2.0" -tokio = { version = "1.45", features = ["full"] } -tokio-util = "0.7" -uuid = { version = "1.3", features = ["serde", "v4"] } -serde_json = "1.0" - -merging = { path = "../../indexer/merging" } -processor = { path = "../../indexer/processor" } -session = { path = "../../indexer/session" } -sources = { path = "../../indexer/sources" } -stypes = { path = "../../indexer/stypes", features=["nodejs"] } - -[target.'cfg(unix)'.dependencies] -# Jemalloc combined with Node.js exceeds the default TLS memory limit on Linux. -tikv-jemallocator = { version = "0.6" , optional = true, features = ["disable_initial_exec_tls"] } - -[target.'cfg(windows)'.dependencies] -mimalloc = {version = "0.1" , optional = true } - -[features] -default = [] -# Feature to use optimized memory allocators per platform. -# Uses `jemalloc` on Unix-based targets and `mimalloc` on Windows. -# This feature won't be enabled by default since these allocators aren't well tested as the defaults. -custom-alloc = ['dep:mimalloc', 'dep:tikv-jemallocator'] diff --git a/application/apps/rustcore/rs-bindings/build.rs b/application/apps/rustcore/rs-bindings/build.rs deleted file mode 100644 index 9b831a3a56..0000000000 --- a/application/apps/rustcore/rs-bindings/build.rs +++ /dev/null @@ -1,3 +0,0 @@ -fn main() { - node_bindgen::build::configure(); -} diff --git a/application/apps/rustcore/rs-bindings/log4rs.yaml b/application/apps/rustcore/rs-bindings/log4rs.yaml deleted file mode 100644 index bfd90d45b2..0000000000 --- a/application/apps/rustcore/rs-bindings/log4rs.yaml +++ /dev/null @@ -1,47 +0,0 @@ -# chipmunk_logconf_version: $LOG_CONFIG_VERSION -refresh_rate: 30 seconds - -# The "appenders" map contains the set of appenders, indexed by their names. -appenders: - stdout: - kind: console - encoder: - kind: pattern - pattern: '[{l}][{t}: {M}][{d(%H:%M:%S)}] {m}{n}' - indexer-root: - kind: file - path: $INDEXER_LOG_PATH - append: false - encoder: - kind: pattern - pattern: "[{l}] [{t}: {M}] {d}:: {m}{n}\n" - startup-appender: - kind: file - path: $LAUNCHER_LOG_PATH - append: false - encoder: - kind: pattern - pattern: "{d} [{M}] {l}:: {m}\n" - -root: - # level: off - # level: error - level: warn - # level: info - # level: debug - # level: trace - appenders: - - indexer-root - - stdout - -loggers: - launcher: - level: warn - appenders: - - startup-appender - additive: false - updater: - level: warn - appenders: - - startup-appender - additive: false diff --git a/application/apps/rustcore/rs-bindings/rustfmt.toml b/application/apps/rustcore/rs-bindings/rustfmt.toml deleted file mode 100644 index f216078d96..0000000000 --- a/application/apps/rustcore/rs-bindings/rustfmt.toml +++ /dev/null @@ -1 +0,0 @@ -edition = "2024" diff --git a/application/apps/rustcore/rs-bindings/src/js/converting/concat.rs b/application/apps/rustcore/rs-bindings/src/js/converting/concat.rs deleted file mode 100644 index 084bb20546..0000000000 --- a/application/apps/rustcore/rs-bindings/src/js/converting/concat.rs +++ /dev/null @@ -1,46 +0,0 @@ -// use merging::concatenator::ConcatenatorInput; -// use node_bindgen::{ -// core::{ -// val::{JsEnv, JsObject}, -// JSValue, NjError, -// }, -// sys::napi_value, -// }; -// use serde::Serialize; - -// #[derive(Serialize, Debug, Clone)] -// pub struct WrappedConcatenatorInput(ConcatenatorInput); - -// // impl WrappedConcatenatorInput { -// // pub fn as_concatenator_input(&self) -> ConcatenatorInput { -// // self.0.clone() -// // } -// // } - -// impl JSValue<'_> for WrappedConcatenatorInput { -// fn convert_to_rust(env: &JsEnv, n_value: napi_value) -> Result { -// if let Ok(js_obj) = env.convert_to_rust::(n_value) { -// let path: String = match js_obj.get_property("path") { -// Ok(Some(value)) => value.as_value()?, -// Ok(None) => { -// return Err(NjError::Other("[path] property is not found".to_owned())); -// } -// Err(e) => { -// return Err(e); -// } -// }; -// let tag: String = match js_obj.get_property("tag") { -// Ok(Some(value)) => value.as_value()?, -// Ok(None) => { -// return Err(NjError::Other("[tag] property is not found".to_owned())); -// } -// Err(e) => { -// return Err(e); -// } -// }; -// Ok(WrappedConcatenatorInput(ConcatenatorInput { path, tag })) -// } else { -// Err(NjError::Other("not valid format".to_owned())) -// } -// } -// } diff --git a/application/apps/rustcore/rs-bindings/src/js/converting/filter.rs b/application/apps/rustcore/rs-bindings/src/js/converting/filter.rs deleted file mode 100644 index 119b096d56..0000000000 --- a/application/apps/rustcore/rs-bindings/src/js/converting/filter.rs +++ /dev/null @@ -1,72 +0,0 @@ -use node_bindgen::{ - core::{ - JSValue, NjError, - val::{JsEnv, JsObject}, - }, - sys::napi_value, -}; -use processor::search::filter::SearchFilter; -use serde::Serialize; -#[derive(Serialize, Debug, Clone)] -pub struct WrappedSearchFilter(SearchFilter); - -impl WrappedSearchFilter { - pub fn as_filter(&self) -> SearchFilter { - self.0.clone() - } -} - -impl JSValue<'_> for WrappedSearchFilter { - fn convert_to_rust(env: &JsEnv, n_value: napi_value) -> Result { - if let Ok(js_obj) = env.convert_to_rust::(n_value) { - let value: String = match js_obj.get_property("value") { - Ok(Some(value)) => value.as_value()?, - Ok(None) => { - return Err(NjError::Other("[value] property is not found".to_owned())); - } - Err(e) => { - return Err(e); - } - }; - let is_regex: bool = match js_obj.get_property("is_regex") { - Ok(Some(value)) => value.as_value()?, - Ok(None) => { - return Err(NjError::Other( - "[is_regex] property is not found".to_owned(), - )); - } - Err(e) => { - return Err(e); - } - }; - let is_word: bool = match js_obj.get_property("is_word") { - Ok(Some(value)) => value.as_value()?, - Ok(None) => { - return Err(NjError::Other("[is_word] property is not found".to_owned())); - } - Err(e) => { - return Err(e); - } - }; - let ignore_case: bool = match js_obj.get_property("ignore_case") { - Ok(Some(value)) => value.as_value()?, - Ok(None) => { - return Err(NjError::Other( - "[ignore_case] property is not found".to_owned(), - )); - } - Err(e) => { - return Err(e); - } - }; - Ok(WrappedSearchFilter( - SearchFilter::plain(value) - .regex(is_regex) - .ignore_case(ignore_case) - .word(is_word), - )) - } else { - Err(NjError::Other("not valid format".to_owned())) - } - } -} diff --git a/application/apps/rustcore/rs-bindings/src/js/converting/mod.rs b/application/apps/rustcore/rs-bindings/src/js/converting/mod.rs deleted file mode 100644 index 902f139e24..0000000000 --- a/application/apps/rustcore/rs-bindings/src/js/converting/mod.rs +++ /dev/null @@ -1,2 +0,0 @@ -// pub mod concat; -pub mod filter; diff --git a/application/apps/rustcore/rs-bindings/src/js/jobs/mod.rs b/application/apps/rustcore/rs-bindings/src/js/jobs/mod.rs deleted file mode 100644 index de3757f58a..0000000000 --- a/application/apps/rustcore/rs-bindings/src/js/jobs/mod.rs +++ /dev/null @@ -1,351 +0,0 @@ -use crate::js::converting::filter::WrappedSearchFilter; -use log::{debug, error}; -use node_bindgen::derive::node_bindgen; - -use session::unbound::{UnboundSession, api::UnboundSessionAPI}; -use std::{convert::TryFrom, thread}; -use tokio::runtime::Runtime; -use tokio_util::sync::CancellationToken; - -struct UnboundJobs { - api: Option, - finished: CancellationToken, -} - -fn u64_from_i64(id: i64) -> Result { - u64::try_from(id) - .map_err(|_| stypes::ComputationError::InvalidArgs(String::from("ID of job is invalid"))) -} - -fn usize_from_i64(id: i64) -> Result { - usize::try_from(id).map_err(|_| { - stypes::ComputationError::InvalidArgs(String::from("Fail to conver i64 to usize")) - }) -} - -#[node_bindgen] -impl UnboundJobs { - // Self methods - #[node_bindgen(constructor)] - pub fn new() -> Self { - Self { - api: None, - finished: CancellationToken::new(), - } - } - - #[node_bindgen(mt)] - async fn init(&mut self) -> Result<(), stypes::ComputationError> { - let rt = Runtime::new().map_err(|e| { - stypes::ComputationError::Process(format!("Could not start tokio runtime: {e}")) - })?; - - let (mut session, api) = UnboundSession::new(); - self.api = Some(api); - let confirmation = self.finished.clone(); - thread::spawn(move || { - rt.block_on(async { - if let Err(err) = session.init().await { - error!("Fail to init unbound session: {err}"); - } else { - debug!("Unbound session is started"); - session.finished.cancelled().await; - confirmation.cancel(); - debug!("Unbound session is closed"); - } - }) - }); - Ok(()) - } - - #[node_bindgen] - async fn destroy(&self) -> Result<(), stypes::ComputationError> { - self.api - .as_ref() - .ok_or(stypes::ComputationError::SessionUnavailable)? - .shutdown() - .await?; - self.finished.cancelled().await; - Ok(()) - } - - /// Cancel given operation/task - #[node_bindgen] - async fn abort(&self, id: i64) -> Result<(), stypes::ComputationError> { - self.api - .as_ref() - .ok_or(stypes::ComputationError::SessionUnavailable)? - .cancel_job(&u64_from_i64(id)?) - .await - } - - // Custom methods (jobs) - #[node_bindgen] - async fn list_folder_content( - &self, - id: i64, - depth: i64, - max_len: i64, - paths: Vec, - include_files: bool, - include_folders: bool, - ) -> Result, stypes::ComputationError> - { - self.api - .as_ref() - .ok_or(stypes::ComputationError::SessionUnavailable)? - .list_folder_content( - u64_from_i64(id)?, - usize_from_i64(depth)?, - usize_from_i64(max_len)?, - paths, - include_files, - include_folders, - ) - .await - } - - #[node_bindgen] - async fn is_file_binary( - &self, - id: i64, - file_path: String, - ) -> Result, stypes::ComputationError> { - self.api - .as_ref() - .ok_or(stypes::ComputationError::SessionUnavailable)? - .is_file_binary(u64_from_i64(id)?, file_path) - .await - } - - #[node_bindgen] - async fn get_file_checksum( - &self, - id: i64, - path: String, - ) -> Result, stypes::ComputationError> { - self.api - .as_ref() - .ok_or(stypes::ComputationError::SessionUnavailable)? - .get_file_checksum(u64_from_i64(id)?, path) - .await - } - - #[node_bindgen] - async fn get_dlt_stats( - &self, - id: i64, - files: Vec, - ) -> Result, stypes::ComputationError> { - self.api - .as_ref() - .ok_or(stypes::ComputationError::SessionUnavailable)? - .get_dlt_stats(u64_from_i64(id)?, files) - .await - } - - #[node_bindgen] - async fn get_someip_statistic( - &self, - id: i64, - files: Vec, - ) -> Result, stypes::ComputationError> { - self.api - .as_ref() - .ok_or(stypes::ComputationError::SessionUnavailable)? - .get_someip_statistic(u64_from_i64(id)?, files) - .await - } - - #[node_bindgen] - async fn get_shell_profiles( - &self, - id: i64, - ) -> Result, stypes::ComputationError> { - self.api - .as_ref() - .ok_or(stypes::ComputationError::SessionUnavailable)? - .get_shell_profiles(u64_from_i64(id)?) - .await - } - - #[node_bindgen] - async fn get_serial_ports_list( - &self, - id: i64, - ) -> Result, stypes::ComputationError> { - self.api - .as_ref() - .ok_or(stypes::ComputationError::SessionUnavailable)? - .get_serial_ports_list(u64_from_i64(id)?) - .await - } - - #[node_bindgen] - async fn get_regex_error( - &self, - id: i64, - filter: WrappedSearchFilter, - ) -> Result>, stypes::ComputationError> { - self.api - .as_ref() - .ok_or(stypes::ComputationError::SessionUnavailable)? - .get_regex_error(u64_from_i64(id)?, filter.as_filter()) - .await - } - - #[node_bindgen] - async fn installed_plugins_list( - &self, - id: i64, - ) -> Result, stypes::ComputationError> { - self.api - .as_ref() - .ok_or(stypes::ComputationError::SessionUnavailable)? - .installed_plugins_list(u64_from_i64(id)?) - .await - } - - #[node_bindgen] - async fn invalid_plugins_list( - &self, - id: i64, - ) -> Result, stypes::ComputationError> { - self.api - .as_ref() - .ok_or(stypes::ComputationError::SessionUnavailable)? - .invalid_plugins_list(u64_from_i64(id)?) - .await - } - - #[node_bindgen] - async fn installed_plugins_paths( - &self, - id: i64, - ) -> Result, stypes::ComputationError> { - self.api - .as_ref() - .ok_or(stypes::ComputationError::SessionUnavailable)? - .installed_plugins_paths(u64_from_i64(id)?) - .await - } - - #[node_bindgen] - async fn invalid_plugins_paths( - &self, - id: i64, - ) -> Result, stypes::ComputationError> { - self.api - .as_ref() - .ok_or(stypes::ComputationError::SessionUnavailable)? - .invalid_plugins_paths(u64_from_i64(id)?) - .await - } - - #[node_bindgen] - async fn installed_plugin_info( - &self, - id: i64, - plugin_path: String, - ) -> Result>, stypes::ComputationError> - { - self.api - .as_ref() - .ok_or(stypes::ComputationError::SessionUnavailable)? - .installed_plugin_info(u64_from_i64(id)?, plugin_path) - .await - } - - #[node_bindgen] - async fn invalid_plugin_info( - &self, - id: i64, - plugin_path: String, - ) -> Result>, stypes::ComputationError> - { - self.api - .as_ref() - .ok_or(stypes::ComputationError::SessionUnavailable)? - .invalid_plugin_info(u64_from_i64(id)?, plugin_path) - .await - } - - #[node_bindgen] - async fn get_plugin_run_data( - &self, - id: i64, - plugin_path: String, - ) -> Result>, stypes::ComputationError> - { - self.api - .as_ref() - .ok_or(stypes::ComputationError::SessionUnavailable)? - .get_plugin_run_data(u64_from_i64(id)?, plugin_path) - .await - } - - #[node_bindgen] - async fn reload_plugins( - &self, - id: i64, - ) -> Result, stypes::ComputationError> { - self.api - .as_ref() - .ok_or(stypes::ComputationError::SessionUnavailable)? - .reload_plugins(u64_from_i64(id)?) - .await - } - - #[node_bindgen] - async fn add_plugin( - &self, - id: i64, - plugin_path: String, - ) -> Result, stypes::ComputationError> { - self.api - .as_ref() - .ok_or(stypes::ComputationError::SessionUnavailable)? - .add_plugin(u64_from_i64(id)?, plugin_path, None) - .await - } - - #[node_bindgen] - async fn remove_plugin( - &self, - id: i64, - plugin_path: String, - ) -> Result, stypes::ComputationError> { - self.api - .as_ref() - .ok_or(stypes::ComputationError::SessionUnavailable)? - .remove_plugin(u64_from_i64(id)?, plugin_path) - .await - } - - #[node_bindgen] - async fn job_cancel_test( - &self, - id: i64, - custom_arg_a: i64, - custom_arg_b: i64, - ) -> Result, stypes::ComputationError> { - self.api - .as_ref() - .ok_or(stypes::ComputationError::SessionUnavailable)? - .cancel_test(u64_from_i64(id)?, custom_arg_a, custom_arg_b) - .await - } - - #[node_bindgen] - async fn sleep( - &self, - id: i64, - ms: i64, - ) -> Result, stypes::ComputationError> { - self.api - .as_ref() - .ok_or(stypes::ComputationError::SessionUnavailable)? - .sleep(u64_from_i64(id)?, u64_from_i64(ms)?) - .await - } -} diff --git a/application/apps/rustcore/rs-bindings/src/js/mod.rs b/application/apps/rustcore/rs-bindings/src/js/mod.rs deleted file mode 100644 index 1be11b72fd..0000000000 --- a/application/apps/rustcore/rs-bindings/src/js/mod.rs +++ /dev/null @@ -1,3 +0,0 @@ -pub mod converting; -pub mod jobs; -pub mod session; diff --git a/application/apps/rustcore/rs-bindings/src/js/session/mod.rs b/application/apps/rustcore/rs-bindings/src/js/session/mod.rs deleted file mode 100644 index eaedeae9f7..0000000000 --- a/application/apps/rustcore/rs-bindings/src/js/session/mod.rs +++ /dev/null @@ -1,767 +0,0 @@ -pub mod progress_tracker; - -use crate::{js::converting::filter::WrappedSearchFilter, logging::targets}; -use log::{debug, error, info, warn}; -use node_bindgen::{core::buffer::JSArrayBuffer, derive::node_bindgen}; -use processor::grabber::LineRange; -use session::{operations, session::Session}; -use std::{convert::TryFrom, ops::RangeInclusive, path::PathBuf, thread}; -use stypes::GrabbedElementList; -use tokio::{runtime::Runtime, sync::oneshot}; -use uuid::Uuid; - -struct RustSession { - session: Option, - uuid: Uuid, -} - -#[node_bindgen] -impl RustSession { - #[node_bindgen(constructor)] - pub fn new(id: String) -> Self { - let uuid = match operations::uuid_from_str(&id) { - Ok(uuid) => uuid, - Err(err) => { - // TODO: Should be replaced with error - panic!("Fail to convert UUID = {id}; error:{err}"); - } - }; - Self { - session: None, - uuid, - } - } - - #[node_bindgen(mt)] - async fn init( - &mut self, - callback: F, - ) -> Result<(), stypes::ComputationError> { - let rt = Runtime::new().map_err(|e| { - stypes::ComputationError::Process(format!("Could not start tokio runtime: {e}")) - })?; - let (tx_session, rx_session) = oneshot::channel(); - let uuid = self.uuid; - thread::spawn(move || { - rt.block_on(async { - match Session::new(uuid).await { - Ok((session, mut rx_callback_events)) => { - if tx_session.send(Some(session)).is_err() { - error!("Cannot setup session instance"); - return; - } - debug!("task is started"); - while let Some(event) = rx_callback_events.recv().await { - match &event { - stypes::CallbackEvent::OperationStarted(..) => {} - stypes::CallbackEvent::OperationProcessing(..) => {} - stypes::CallbackEvent::OperationDone(..) => {} - _ => { - println!( - "****************** DEBUG AAZ: Callback evnet: {event:?}" - ); - } - } - callback(event) - } - debug!("sending SessionDestroyed event"); - callback(stypes::CallbackEvent::SessionDestroyed); - debug!("task is finished"); - } - Err(e) => { - error!("Cannot create session instance: {e}"); - if tx_session.send(None).is_err() { - error!("Cannot setup session instance"); - } - } - } - }) - }); - self.session = rx_session.await.map_err(|_| { - stypes::ComputationError::Communication(String::from( - "Fail to get session instance to setup", - )) - })?; - Ok(()) - } - - #[node_bindgen] - fn get_uuid(&self) -> Result { - Ok(self - .session - .as_ref() - .ok_or(stypes::ComputationError::SessionUnavailable)? - .get_uuid() - .to_string()) - } - - #[node_bindgen] - fn abort( - &self, - operation_id: String, - target_id: String, - ) -> Result<(), stypes::ComputationError> { - self.session - .as_ref() - .ok_or(stypes::ComputationError::SessionUnavailable)? - .abort( - operations::uuid_from_str(&operation_id)?, - operations::uuid_from_str(&target_id)?, - ) - } - - #[node_bindgen] - async fn stop(&self, operation_id: String) -> Result<(), stypes::ComputationError> { - self.session - .as_ref() - .ok_or(stypes::ComputationError::SessionUnavailable)? - .stop(operations::uuid_from_str(&operation_id)?) - .await - } - - #[node_bindgen] - async fn get_session_file(&self) -> Result { - self.session - .as_ref() - .ok_or(stypes::ComputationError::SessionUnavailable)? - .get_state() - .get_session_file() - .await - .map(|p| p.to_string_lossy().to_string()) - .map_err(|e: stypes::NativeError| { - >::into( - stypes::ComputationError::NativeError(e), - ) - }) - } - - #[node_bindgen] - async fn get_stream_len(&self) -> Result { - self.session - .as_ref() - .ok_or(stypes::ComputationError::SessionUnavailable)? - .get_stream_len() - .await - .map(|r| r as i64) - } - - #[node_bindgen] - async fn get_search_len(&self) -> Result { - self.session - .as_ref() - .ok_or(stypes::ComputationError::SessionUnavailable)? - .get_search_result_len() - .await - .map(|r| r as i64) - } - - #[node_bindgen] - async fn details(&self, _index: i64) -> Result { - todo!("nyi"); - // Log - } - - /// Exports data to the specified output path with the given parameters. This method is used to export - /// only into text format. For exporting into raw format is using method `export_raw` - /// - /// # Arguments - /// - /// * `out_path` - A `String` representing the path to the output file where data will be exported. - /// * `ranges` - A `Vec<(i64, i64)>` specifying the ranges of data to export. - /// * `columns` - A `Vec` containing the column number to be exported. - /// * `spliter` - A `String` used as the record separator in session file to split log message to columns. - /// * `delimiter` - A `String` used as the field delimiter within each record in output file. - /// * `operation_id` - A `String` representing the unique identifier for the export operation, used for tracking. - /// - /// # Returns - /// - /// * `Result<(), stypes::ComputationError>`: - /// - `Ok(())` if the export is successful. - /// - `Err(ComputationErrorWrapper)` if an error occurs during the export process. - /// - #[node_bindgen] - async fn export( - &self, - out_path: String, - ranges: Vec<(i64, i64)>, - columns: Vec, - spliter: String, - delimiter: String, - operation_id: String, - ) -> Result<(), stypes::ComputationError> { - self.session - .as_ref() - .ok_or(stypes::ComputationError::SessionUnavailable)? - .export( - operations::uuid_from_str(&operation_id)?, - PathBuf::from(out_path), - ranges - .iter() - .map(|(s, e)| RangeInclusive::::new(*s as u64, *e as u64)) - .collect::>>(), - columns - .into_iter() - .map(usize::try_from) - .collect::, _>>() - .map_err(|_| { - stypes::ComputationError::NativeError(stypes::NativeError { - severity: stypes::Severity::ERROR, - kind: stypes::NativeErrorKind::Io, - message: Some(String::from( - "Fail to get valid columns list. Supported type: [u8]", - )), - }) - })?, - (!spliter.is_empty()).then_some(spliter), - (!delimiter.is_empty()).then_some(delimiter), - ) - } - - #[node_bindgen] - async fn export_raw( - &self, - out_path: String, - ranges: Vec<(i64, i64)>, - operation_id: String, - ) -> Result<(), stypes::ComputationError> { - self.session - .as_ref() - .ok_or(stypes::ComputationError::SessionUnavailable)? - .export_raw( - operations::uuid_from_str(&operation_id)?, - PathBuf::from(out_path), - ranges - .iter() - .map(|(s, e)| RangeInclusive::::new(*s as u64, *e as u64)) - .collect::>>(), - ) - } - - #[node_bindgen] - async fn is_raw_export_available(&self) -> Result { - self.session - .as_ref() - .ok_or(stypes::ComputationError::SessionUnavailable)? - .is_raw_export_available() - .await - } - - #[node_bindgen] - async fn grab( - &self, - start_line_index: i64, - number_of_lines: i64, - ) -> Result { - let start = - u64::try_from(start_line_index).map_err(|_| stypes::ComputationError::InvalidData)?; - let end = u64::try_from(start_line_index + number_of_lines - 1) - .map_err(|_| stypes::ComputationError::InvalidData)?; - self.session - .as_ref() - .ok_or(stypes::ComputationError::SessionUnavailable)? - .grab(LineRange::from(start..=end)) - .await - } - - #[node_bindgen] - async fn grab_indexed( - &self, - start_line_index: i64, - number_of_lines: i64, - ) -> Result { - let start = - u64::try_from(start_line_index).map_err(|_| stypes::ComputationError::InvalidData)?; - let end = u64::try_from(start_line_index + number_of_lines - 1) - .map_err(|_| stypes::ComputationError::InvalidData)?; - self.session - .as_ref() - .ok_or(stypes::ComputationError::SessionUnavailable)? - .grab_indexed(RangeInclusive::::new(start, end)) - .await - } - - #[node_bindgen] - async fn set_indexing_mode(&self, mode: i32) -> Result<(), stypes::ComputationError> { - let mode = u8::try_from(mode).map_err(|_| stypes::ComputationError::InvalidData)?; - self.session - .as_ref() - .ok_or(stypes::ComputationError::SessionUnavailable)? - .set_indexing_mode(mode) - .await - } - - #[node_bindgen] - async fn get_indexed_len(&self) -> Result { - self.session - .as_ref() - .ok_or(stypes::ComputationError::SessionUnavailable)? - .get_indexed_len() - .await - .map(|r| r as i64) - } - - #[node_bindgen] - async fn get_around_indexes( - &self, - position: i64, - ) -> Result { - self.session - .as_ref() - .ok_or(stypes::ComputationError::SessionUnavailable)? - .get_around_indexes(position as u64) - .await - } - - #[node_bindgen] - async fn add_bookmark(&self, row: i64) -> Result<(), stypes::ComputationError> { - let row = u64::try_from(row).map_err(|_| stypes::ComputationError::InvalidData)?; - self.session - .as_ref() - .ok_or(stypes::ComputationError::SessionUnavailable)? - .add_bookmark(row) - .await - } - - #[node_bindgen] - async fn set_bookmarks(&self, rows: Vec) -> Result<(), stypes::ComputationError> { - let mut converted: Vec = vec![]; - for row in rows.iter() { - converted.push(u64::try_from(*row).map_err(|_| stypes::ComputationError::InvalidData)?); - } - self.session - .as_ref() - .ok_or(stypes::ComputationError::SessionUnavailable)? - .set_bookmarks(converted) - .await - } - - #[node_bindgen] - async fn remove_bookmark(&self, row: i64) -> Result<(), stypes::ComputationError> { - let row = u64::try_from(row).map_err(|_| stypes::ComputationError::InvalidData)?; - self.session - .as_ref() - .ok_or(stypes::ComputationError::SessionUnavailable)? - .remove_bookmark(row) - .await - } - - #[node_bindgen] - async fn expand_breadcrumbs( - &self, - seporator: i64, - offset: i64, - above: bool, - ) -> Result<(), stypes::ComputationError> { - let seporator = - u64::try_from(seporator).map_err(|_| stypes::ComputationError::InvalidData)?; - let offset = u64::try_from(offset).map_err(|_| stypes::ComputationError::InvalidData)?; - self.session - .as_ref() - .ok_or(stypes::ComputationError::SessionUnavailable)? - .expand_breadcrumbs(seporator, offset, above) - .await - } - - #[node_bindgen] - async fn grab_search( - &self, - start_line_index: i64, - number_of_lines: i64, - ) -> Result { - let start = - u64::try_from(start_line_index).map_err(|_| stypes::ComputationError::InvalidData)?; - let end = u64::try_from(start_line_index + number_of_lines - 1) - .map_err(|_| stypes::ComputationError::InvalidData)?; - self.session - .as_ref() - .ok_or(stypes::ComputationError::SessionUnavailable)? - .grab_search(LineRange::from(start..=end)) - .await - } - - #[node_bindgen] - async fn grab_ranges( - &self, - ranges: Vec<(i64, i64)>, - ) -> Result { - self.session - .as_ref() - .ok_or(stypes::ComputationError::SessionUnavailable)? - .grab_ranges( - ranges - .iter() - .map(|(s, e)| RangeInclusive::::new(*s as u64, *e as u64)) - .collect::>>(), - ) - .await - } - - /// "nested" search. - /// A "nested" search refers to filtering matches within the primary search results. - /// - /// # Parameters - /// - /// * `filter` - The search filter used to specify the criteria for the nested search. - /// * `from` - The starting position (within the primary search results) for the nested search. - /// * `rev` - Specifies the direction of the search: - /// * `true` - Perform the search in reverse. - /// * `false` - Perform the search in forward order. - /// - /// # Returns - /// - /// If a match is found: - /// * `Some((search_result_line_index, session_file_line_index))` - A tuple containing: - /// - The line index within the search results. - /// - The corresponding line index in the session file. - /// - /// If no match is found: - /// * `None` - /// - /// On error: - /// * `Err(stypes::ComputationError)` - Describes the error encountered during the process. - #[node_bindgen] - async fn search_nested_match( - &self, - filter: WrappedSearchFilter, - from: i64, - rev: bool, - ) -> Result, stypes::ComputationError> { - let res = self - .session - .as_ref() - .ok_or(stypes::ComputationError::SessionUnavailable)? - .search_nested_match( - filter.as_filter(), - u64::try_from(from).map_err(|_| stypes::ComputationError::InvalidData)?, - rev, - ) - .await?; - Ok(if let Some((pos, srch_pos)) = res { - Some(( - i64::try_from(pos).map_err(|e| { - stypes::ComputationError::SearchError(format!("fail convert index: {e}")) - })?, - i64::try_from(srch_pos).map_err(|e| { - stypes::ComputationError::SearchError(format!("fail convert index: {e}")) - })?, - )) - } else { - None - }) - } - - #[node_bindgen] - async fn observe( - &self, - options: JSArrayBuffer, - operation_id: String, - ) -> Result<(), stypes::ComputationError> { - let options = - stypes::ObserveOptions::decode(&options).map_err(stypes::ComputationError::Decoding)?; - self.session - .as_ref() - .ok_or(stypes::ComputationError::SessionUnavailable)? - .observe(operations::uuid_from_str(&operation_id)?, options) - } - - #[node_bindgen] - async fn apply_search_filters( - &self, - filters: Vec, - operation_id: String, - ) -> Result<(), stypes::ComputationError> { - let session = self - .session - .as_ref() - .ok_or(stypes::ComputationError::SessionUnavailable)?; - info!( - target: targets::SESSION, - "Search (operation: {operation_id}) will be done withing next filters: {filters:?}" - ); - session.apply_search_filters( - operations::uuid_from_str(&operation_id)?, - filters.iter().map(|f| f.as_filter()).collect(), - ) - } - - #[node_bindgen] - async fn apply_search_values_filters( - &self, - filters: Vec, - operation_id: String, - ) -> Result<(), stypes::ComputationError> { - let session = self - .session - .as_ref() - .ok_or(stypes::ComputationError::SessionUnavailable)?; - info!( - target: targets::SESSION, - "Search values (operation: {operation_id}) will be done withing next filters: {filters:?}" - ); - session.apply_search_values_filters(operations::uuid_from_str(&operation_id)?, filters) - } - - #[node_bindgen] - async fn drop_search(&self) -> Result { - self.session - .as_ref() - .ok_or(stypes::ComputationError::SessionUnavailable)? - .drop_search() - .await - } - - #[node_bindgen] - async fn get_sources_definitions(&self) -> Result { - self.session - .as_ref() - .ok_or(stypes::ComputationError::SessionUnavailable)? - .get_sources() - .await - } - - #[node_bindgen] - async fn extract_matches( - &self, - filters: Vec, - operation_id: String, - ) -> Result<(), stypes::ComputationError> { - let session = self - .session - .as_ref() - .ok_or(stypes::ComputationError::SessionUnavailable)?; - info!( - target: targets::SESSION, - "Extract (operation: {operation_id}) will be done withing next filters: {filters:?}" - ); - session.extract_matches( - operations::uuid_from_str(&operation_id)?, - filters.iter().map(|f| f.as_filter()).collect(), - ) - } - - #[node_bindgen] - async fn get_map( - &self, - operation_id: String, - dataset_len: i32, - from: Option, - to: Option, - ) -> Result<(), stypes::ComputationError> { - let session = self - .session - .as_ref() - .ok_or(stypes::ComputationError::SessionUnavailable)?; - let mut range: Option<(u64, u64)> = None; - if let Some(from) = from - && let Some(to) = to - && from >= 0 - && to >= 0 - { - if from <= to { - range = Some((from as u64, to as u64)); - } else { - warn!( - target: targets::SESSION, - "Invalid range (operation: {operation_id}): from = {from}; to = {to}" - ); - } - } - info!( - target: targets::SESSION, - "Map requested (operation: {operation_id}). Range: {range:?}" - ); - session.get_map( - operations::uuid_from_str(&operation_id)?, - dataset_len as u16, - range, - ) - } - - #[node_bindgen] - async fn get_values( - &self, - operation_id: String, - dataset_len: i32, - from: Option, - to: Option, - ) -> Result<(), stypes::ComputationError> { - let session = self - .session - .as_ref() - .ok_or(stypes::ComputationError::SessionUnavailable)?; - let range: Option> = if let (Some(from), Some(to)) = (from, to) { - if from < 0 || to < 0 || from > to { - return Err(stypes::ComputationError::InvalidArgs(format!( - "Invalid range:from = {from}; to = {to}" - ))); - } - Some(RangeInclusive::new(from as u64, to as u64)) - } else { - None - }; - info!( - target: targets::SESSION, - "Values requested (operation: {operation_id}). Range: {range:?}" - ); - session.get_values( - operations::uuid_from_str(&operation_id)?, - dataset_len as u16, - range, - ) - } - - #[node_bindgen] - async fn get_nearest_to( - &self, - operation_id: String, - position_in_stream: i64, - ) -> Result<(), stypes::ComputationError> { - self.session - .as_ref() - .ok_or(stypes::ComputationError::SessionUnavailable)? - .get_nearest_to( - operations::uuid_from_str(&operation_id)?, - position_in_stream as u64, - ) - } - - #[node_bindgen] - async fn send_into_sde( - &self, - target: String, - request: JSArrayBuffer, - ) -> Result { - let request = - stypes::SdeRequest::decode(&request).map_err(stypes::ComputationError::Decoding)?; - let session = self - .session - .as_ref() - .ok_or(stypes::ComputationError::SessionUnavailable)?; - session - .send_into_sde(operations::uuid_from_str(&target)?, request) - .await - } - - #[node_bindgen] - async fn get_attachments(&self) -> Result { - let session = self - .session - .as_ref() - .ok_or(stypes::ComputationError::SessionUnavailable)?; - let attachments = - session - .state - .get_attachments() - .await - .map_err(|e: stypes::NativeError| { - >::into( - stypes::ComputationError::NativeError(e), - ) - })?; - Ok(stypes::AttachmentList(attachments)) - } - - #[node_bindgen] - async fn get_indexed_ranges(&self) -> Result { - let session = self - .session - .as_ref() - .ok_or(stypes::ComputationError::SessionUnavailable)?; - let ranges = - session - .state - .get_indexed_ranges() - .await - .map_err(|e: stypes::NativeError| { - >::into( - stypes::ComputationError::NativeError(e), - ) - })?; - Ok(ranges.into()) - } - - #[node_bindgen] - async fn set_debug(&self, debug: bool) -> Result<(), stypes::ComputationError> { - self.session - .as_ref() - .ok_or(stypes::ComputationError::SessionUnavailable)? - .state - .set_debug(debug) - .await - .map_err(|e: stypes::NativeError| stypes::ComputationError::NativeError(e)) - } - - #[node_bindgen] - async fn get_operations_stat(&self) -> Result { - self.session - .as_ref() - .ok_or(stypes::ComputationError::SessionUnavailable)? - .tracker - .get_operations_stat() - .await - .map_err(|e: stypes::NativeError| stypes::ComputationError::NativeError(e)) - } - - #[node_bindgen] - async fn sleep( - &self, - operation_id: String, - ms: i64, - ignore_cancellation: bool, - ) -> Result<(), stypes::ComputationError> { - self.session - .as_ref() - .ok_or(stypes::ComputationError::SessionUnavailable)? - .sleep( - operations::uuid_from_str(&operation_id)?, - ms as u64, - ignore_cancellation, - ) - } - - #[node_bindgen] - async fn trigger_state_error(&self) -> Result<(), stypes::ComputationError> { - self.session - .as_ref() - .ok_or(stypes::ComputationError::SessionUnavailable)? - .trigger_state_error() - .await - } - - #[node_bindgen] - async fn trigger_tracker_error(&self) -> Result<(), stypes::ComputationError> { - self.session - .as_ref() - .ok_or(stypes::ComputationError::SessionUnavailable)? - .trigger_tracker_error() - .await - } - - #[node_bindgen] - fn test_grab_els_as_json(&self) -> Result { - let mut els = Vec::new(); - for pos in 0..50 { - els.push(stypes::GrabbedElement { - source_id: 0, - nature: 0, - content: format!("{pos}Test line content:{}", " test ".repeat(pos + 1)), - pos, - }) - } - serde_json::to_string(&els).map_err(|_| stypes::ComputationError::InvalidData) - } - - #[node_bindgen] - fn test_grab_els_as_bin(&self) -> Result { - let mut els = Vec::new(); - for pos in 0..50 { - els.push(stypes::GrabbedElement { - source_id: 0, - nature: 0, - content: format!("{pos}Test line content:{}", " test ".repeat(pos + 1)), - pos, - }) - } - Ok(stypes::GrabbedElementList(els)) - } -} diff --git a/application/apps/rustcore/rs-bindings/src/js/session/progress_tracker.rs b/application/apps/rustcore/rs-bindings/src/js/session/progress_tracker.rs deleted file mode 100644 index 3fd87b7a16..0000000000 --- a/application/apps/rustcore/rs-bindings/src/js/session/progress_tracker.rs +++ /dev/null @@ -1,69 +0,0 @@ -use log::trace; -use node_bindgen::derive::node_bindgen; -use session::progress::{ProgressCommand, ProgressTrackerAPI, run_tracking}; -use std::thread; -use stypes::LifecycleTransition; -use tokio::{runtime::Runtime, sync::mpsc::UnboundedReceiver}; - -struct RustProgressTracker { - tracker_api: ProgressTrackerAPI, - rx_events: Option>, -} - -#[node_bindgen] -impl RustProgressTracker { - #[node_bindgen(constructor)] - pub fn new() -> Self { - let (tracker_api, rx_events) = ProgressTrackerAPI::new(); - Self { - tracker_api, - rx_events: Some(rx_events), - } - } - - #[node_bindgen(mt)] - async fn init( - &mut self, - callback: F, - ) -> Result<(), stypes::ComputationError> { - let rt = Runtime::new().map_err(|e| { - stypes::ComputationError::Process(format!("Could not start tokio runtime: {e}")) - })?; - if let Some(rx_events) = self.rx_events.take() { - let (result_tx, result_rx) = std::sync::mpsc::channel(); - thread::spawn(move || { - rt.block_on(async { - trace!("progress_tracker thread running"); - match run_tracking(rx_events).await { - Ok(mut rx) => { - let _ = result_tx.send(Ok(())); - while let Some(progress_report) = rx.recv().await { - callback(progress_report) - } - } - Err(e) => { - let _ = result_tx.send(Err(e)); - } - } - }) - }); - result_rx.recv().map_err(|_| { - stypes::ComputationError::Protocol("could not setup tracking".to_string()) - })? - } else { - Err(stypes::ComputationError::Protocol( - "Could not init progress_tracker".to_string(), - )) - } - } - - #[node_bindgen] - async fn stats(&self) -> Result { - self.tracker_api.content().await - } - - #[node_bindgen] - async fn destroy(&self) -> Result<(), stypes::ComputationError> { - self.tracker_api.abort().await - } -} diff --git a/application/apps/rustcore/rs-bindings/src/lib.rs b/application/apps/rustcore/rs-bindings/src/lib.rs deleted file mode 100644 index fce09fef63..0000000000 --- a/application/apps/rustcore/rs-bindings/src/lib.rs +++ /dev/null @@ -1,21 +0,0 @@ -mod js; -mod logging; - -// **************************************** -// *** Memory Allocators Configurations *** -// **************************************** - -// NOTE: In a Rust project, the memory allocator can only be set once, -// and it applies to the entire project, including all dependencies. -// We chose to configure the allocator in the highest-level library where the runtime is also set. - -// Using the mimalloc allocator resulted in an 20% performance improvement on windows -// But there are report of memory leaks and big difference in memory consumption using it. -#[cfg(all(feature = "custom-alloc", windows))] -#[global_allocator] -static GLOBAL: mimalloc::MiMalloc = mimalloc::MiMalloc; - -// Jemalloc currently supports UNIX based operating systems only and provides better performance. -#[cfg(all(feature = "custom-alloc", unix))] -#[global_allocator] -static GLOBAL: tikv_jemallocator::Jemalloc = tikv_jemallocator::Jemalloc; diff --git a/application/apps/rustcore/rs-bindings/src/logging.rs b/application/apps/rustcore/rs-bindings/src/logging.rs deleted file mode 100644 index e3dbfa3521..0000000000 --- a/application/apps/rustcore/rs-bindings/src/logging.rs +++ /dev/null @@ -1,177 +0,0 @@ -//! Module to manage setting up and configuring logging on Chipmunk Core. - -use anyhow::{Context, Result}; -use log::LevelFilter; -use log4rs::{ - append::file::FileAppender, - config::{Appender, Config, Root}, - encode::pattern::PatternEncoder, -}; -use node_bindgen::init::node_bindgen_init_once; -use std::{ - fs::{self, File}, - io::{BufRead, BufReader}, - path::{Path, PathBuf}, -}; - -/// The current version of logging configurations file. -pub const LOG_CONFIG_VERSION: &str = "2.0"; - -/// Logging targets. -pub mod targets { - /// Target for `session` module in chipmunk core. - pub const SESSION: &str = "session"; -} - -#[node_bindgen_init_once] -fn init_module() { - if let Err(e) = init_logging() { - eprintln!("Problems setting up logging: {e}"); - } -} - -/// Initialize logging reading logging configurations from `log4rs.yaml` file or generating -/// it with the default values if needed. -pub fn init_logging() -> Result<()> { - let log_config_path = chipmunk_log_config()?; - let init_log_result = if validate_log_config_file(&log_config_path) { - // log4rs.yaml exists with matching version, try to parse it - match log4rs::init_file(&log_config_path, Default::default()) { - Ok(()) => Ok(()), - Err(e) => { - eprintln!("problems with existing log config ({e}), write fresh"); - // log4rs.yaml exists, could not parse it - initialize_from_fresh_yml() - } - } - } else { - // log4rs.yaml did not exists - initialize_from_fresh_yml() - }; - - if let Err(err) = init_log_result { - eprintln!("Error while initializing logger from new config file: {err:?}"); - setup_fallback_logging()?; - } - - Ok(()) -} - -/// Return the path of log configurations file in chipmunk home directory. -pub fn chipmunk_log_config() -> Result { - chipmunk_home_dir() - .map(|home| home.join("log4rs.yaml")) - .context("Can't get the path of logging configurations file.") -} - -/// Return the path of chipmunk home directory, creating it if doesn't exist. -/// -/// It'll return an error if the home directory can't be determined in host environment -/// or if creating chipmunk directory fails. -pub fn chipmunk_home_dir() -> Result { - let home_dir = dirs::home_dir() - .context("Determining the path of home directory failed")? - .join(".chipmunk"); - if !home_dir.exists() { - fs::create_dir(&home_dir).context("Creating Chipmunk home directory failed")?; - } - - Ok(home_dir) -} - -/// Checks if log configurations file exists and has matching version to the current one. -/// This function assumes that the first line of the config file has the pattern -/// `# chipmunk_logconf_version: $LOG_CONFIG_VERSION` and it will return false if this pattern -/// doesn't match or on IO errors. -fn validate_log_config_file(file_path: &Path) -> bool { - if !file_path.exists() { - return false; - } - - let file = match File::open(file_path) { - Ok(file) => file, - Err(err) => { - eprintln!("Error while opening logging config file: {err}"); - return false; - } - }; - - let reader = BufReader::new(file); - let first_line = match reader.lines().next() { - Some(Ok(line)) => line, - Some(Err(err)) => { - eprintln!("Error while reading logging config file: {err}"); - return false; - } - None => { - eprintln!("Error: Logging config file is empty"); - return false; - } - }; - - let version = match first_line.split(": ").nth(1) { - Some(version) => version.trim(), - None => { - eprintln!("Parsing the version of logging config file failed"); - return false; - } - }; - - if version != LOG_CONFIG_VERSION { - println!( - "Logging configuration version mismatched. Expected: {LOG_CONFIG_VERSION}, found {version}" - ); - return false; - } - - true -} - -/// Creates a new configurations yaml file then initialize the logger with it. -pub fn initialize_from_fresh_yml() -> Result<()> { - println!("Initialization of logs is started on rs-bindings layer"); - let log_config_path = chipmunk_log_config()?; - let chipmunk_home_dir = chipmunk_home_dir()?; - let indexer_log_path = chipmunk_home_dir.join("chipmunk.indexer.log"); - let launcher_log_path = chipmunk_home_dir.join("chipmunk.launcher.log"); - let log_config_content = std::include_str!("../log4rs.yaml") - .replace("$LOG_CONFIG_VERSION", LOG_CONFIG_VERSION) - .replace("$INDEXER_LOG_PATH", &indexer_log_path.to_string_lossy()) - .replace("$LAUNCHER_LOG_PATH", &launcher_log_path.to_string_lossy()); - - if log_config_path.exists() { - std::fs::remove_file(&log_config_path) - .context("Error while removing invalid log configurations file")?; - } - - std::fs::write(&log_config_path, log_config_content) - .context("Error while writing to log configurations file")?; - - log4rs::init_file(&log_config_path, Default::default())?; - println!("Initialization of logs is finished:\n{indexer_log_path:?}\n{launcher_log_path:?}"); - - Ok(()) -} - -/// Initialize Logging with the hard coded configurations without using log configurations files. -pub fn setup_fallback_logging() -> Result<()> { - println!("[setup_fallback_logging]: Initialization of logs is started on rs-bindings layer"); - let log_path = chipmunk_home_dir()?.join("chipmunk.launcher.log"); - let appender_name = "startup-appender"; - let logfile = FileAppender::builder() - .encoder(Box::new(PatternEncoder::new("{d} - {l}:: {m}\n"))) - .build(log_path)?; - - let config = Config::builder() - .appender(Appender::builder().build(appender_name, Box::new(logfile))) - .build( - Root::builder() - .appender(appender_name) - .build(LevelFilter::Warn), - ) - .expect("log4rs config could not be created"); - - log4rs::init_config(config).expect("logging could not be initialized"); - println!("[setup_fallback_logging]:Initialization of logs is finished"); - Ok(()) -} diff --git a/application/apps/rustcore/ts-bindings/.eslintrc.json b/application/apps/rustcore/ts-bindings/.eslintrc.json deleted file mode 100644 index 05c8b93c6a..0000000000 --- a/application/apps/rustcore/ts-bindings/.eslintrc.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "env": { - "browser": true, - "es2021": true - }, - "extends": [ - "eslint:recommended", - "plugin:@typescript-eslint/recommended" - ], - "parser": "@typescript-eslint/parser", - "parserOptions": { - "ecmaVersion": "latest", - "sourceType": "module" - }, - "plugins": ["@typescript-eslint"], - "ignorePatterns": ["dist/**", "spec/**"], - "rules": { - "@typescript-eslint/no-unused-vars": [ - "error", - { - "argsIgnorePattern": "^_", - "varsIgnorePattern": "^_" - } - ], - "@typescript-eslint/no-empty-interface": "off", - "@typescript-eslint/no-explicit-any": "off", - "@typescript-eslint/no-inferrable-types": "off", - "@typescript-eslint/no-this-alias": "off" - } -} diff --git a/application/apps/rustcore/ts-bindings/.yarnrc.yml b/application/apps/rustcore/ts-bindings/.yarnrc.yml deleted file mode 100644 index 3186f3f079..0000000000 --- a/application/apps/rustcore/ts-bindings/.yarnrc.yml +++ /dev/null @@ -1 +0,0 @@ -nodeLinker: node-modules diff --git a/application/apps/rustcore/ts-bindings/eslint.config.mjs b/application/apps/rustcore/ts-bindings/eslint.config.mjs deleted file mode 100644 index 9d55dfcf49..0000000000 --- a/application/apps/rustcore/ts-bindings/eslint.config.mjs +++ /dev/null @@ -1,51 +0,0 @@ -import typescriptEslint from "@typescript-eslint/eslint-plugin"; -import globals from "globals"; -import tsParser from "@typescript-eslint/parser"; -import path from "node:path"; -import { fileURLToPath } from "node:url"; -import js from "@eslint/js"; -import { FlatCompat } from "@eslint/eslintrc"; - -const __filename = fileURLToPath(import.meta.url); -const __dirname = path.dirname(__filename); -const compat = new FlatCompat({ - baseDirectory: __dirname, - recommendedConfig: js.configs.recommended, - allConfig: js.configs.all -}); - -export default [{ - ignores: ["dist/**/*", "spec/**/*"], -}, ...compat.extends("eslint:recommended", "plugin:@typescript-eslint/recommended"), { - plugins: { - "@typescript-eslint": typescriptEslint, - }, - - languageOptions: { - globals: { - ...globals.browser, - }, - - parser: tsParser, - ecmaVersion: "latest", - sourceType: "module", - }, - - rules: { - "no-control-regex": "off", - - "@typescript-eslint/no-unused-vars": ["error", { - "argsIgnorePattern": "^_", - "varsIgnorePattern": "^_", - "caughtErrorsIgnorePattern": "^_" - }], - "@typescript-eslint/no-this-alias": "off", - "@typescript-eslint/no-explicit-any": "off", - "@typescript-eslint/no-empty-interface": "off", - "@typescript-eslint/no-inferrable-types": "off", - "@typescript-eslint/no-unsafe-declaration-merging": "off", - "@typescript-eslint/no-unused-expressions": "off", - "@typescript-eslint/no-empty-object-type": "off" - - }, -}]; \ No newline at end of file diff --git a/application/apps/rustcore/ts-bindings/launch.json b/application/apps/rustcore/ts-bindings/launch.json deleted file mode 100644 index 81c0359b7f..0000000000 --- a/application/apps/rustcore/ts-bindings/launch.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - // Use IntelliSense to learn about possible attributes. - // Hover to view descriptions of existing attributes. - // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 - "version": "0.2.0", - "configurations": [ - { - "type": "node", - "request": "launch", - "name": "Jasmine Current File", - "runtimeExecutable": "${workspaceFolder}/node_modules/.bin/electron", - "program": "${workspaceFolder}/node_modules/.bin/jasmine", - "args": ["${file}"], - "console": "integratedTerminal", - "internalConsoleOptions": "neverOpen" - } - ] -} diff --git a/application/apps/rustcore/ts-bindings/package.json b/application/apps/rustcore/ts-bindings/package.json deleted file mode 100644 index 06a1dacfe9..0000000000 --- a/application/apps/rustcore/ts-bindings/package.json +++ /dev/null @@ -1,45 +0,0 @@ -{ - "name": "rustcore", - "version": "3.9.0", - "description": "", - "main": "./dist/index.js", - "types": "./dist/index.d.ts", - "scripts": { - "build": "node_modules/.bin/tsc -p tsconfig.json", - "prod": "node_modules/.bin/tsc -p tsconfig.json", - "test_cancel": "node_modules/.bin/electron node_modules/jasmine-ts/lib/index.js ./spec/session.cancel.spec.ts", - "lint": "node_modules/.bin/eslint . --max-warnings=0", - "check": "node_modules/.bin/tsc -p tsconfig.json --noemit" - }, - "author": "Dmitry Astafyev", - "contributors": [], - "license": "MIT", - "devDependencies": { - "@electron/rebuild": "^4.0.3", - "@types/jasmine": "^5.1.5", - "@types/node": "^22.10.10", - "@types/tmp": "^0.2.4", - "@types/uuid": "^10.0.0", - "@typescript-eslint/eslint-plugin": "^8.21.0", - "@typescript-eslint/parser": "^8.21.0", - "custom.stdout": "^1.0.2", - "electron": "^34.0.1", - "electron-build-env": "0.2.0", - "eslint": "^9.18.0", - "eslint-plugin-import": "^2.31.0", - "eslint-plugin-node": "^11.1.0", - "eslint-plugin-promise": "^7.2.1", - "jasmine": "^5.5.0", - "loglevel": "^1.9.2", - "tmp": "^0.2.3", - "ts-node": "^10.4.0", - "typescript": "^5.7.3" - }, - "dependencies": { - "platform": "link:../../../platform", - "protocol": "link:../../protocol/pkg", - "tslib": "^2.8.1", - "uuid": "^11.0.5" - }, - "packageManager": "yarn@4.6.0" -} diff --git a/application/apps/rustcore/ts-bindings/spec/_session.benchmark.spec.ts b/application/apps/rustcore/ts-bindings/spec/_session.benchmark.spec.ts deleted file mode 100644 index f260d601c5..0000000000 --- a/application/apps/rustcore/ts-bindings/spec/_session.benchmark.spec.ts +++ /dev/null @@ -1,319 +0,0 @@ -// tslint:disable - -import { initLogger } from './logger'; -initLogger(); -import { Factory } from '../src/api/session'; -import { createSampleFile, finish, performanceReport, setMeasurement } from './common'; -import { readBenchmarkConfigurationFile } from './config_benchmarks'; -import { IndexingMode } from 'platform/types/content'; -import * as runners from './runners'; - -const config = readBenchmarkConfigurationFile().get().tests.benchmark; - -describe('Benchmark Tests', function () { - Object.keys(config).forEach((testId: string, index: number) => { - const test = config[testId]; - const testName = `${test.alias}`; - if (test.ignore) { - console.log(`Test "${testName}" has been ignored`); - return; - } - - it(testName, function () { - return runners.withSession( - { - open_as: '', - ignore: false, - alias: testName, - expectation_ms: 10000, - file: '', - }, - 1, - async (logger, done, { session, stream, events, search }) => { - const measurement = setMeasurement(); - let home_dir = (process.env as any)['SH_HOME_DIR']; - if (!home_dir || typeof home_dir !== 'string' || home_dir.trim() === '') { - throw new Error( - 'Environment variable SH_HOME_DIR is not set or is invalid.', - ); - } - - switch (testId) { - case 'test1': - stream - .observe( - new Factory.File() - .asText() - .type(Factory.FileType.Text) - .file(`${home_dir}/${test.file}`) - .get() - .sterilized(), - ) - .catch(finish.bind(null, session, done)); - break; - case 'test2': - stream - .observe( - new Factory.File() - .type(Factory.FileType.Binary) - .file(`${home_dir}/${test.file}`) - .asDlt({ - filter_config: undefined, - fibex_file_paths: [], - with_storage_header: true, - tz: undefined, - }) - .get() - .sterilized(), - ) - .catch(finish.bind(null, session, done)); - break; - case 'test3': - stream - .observe( - new Factory.File() - .type(Factory.FileType.PcapNG) - .file(`${home_dir}/${test.file}`) - .asDlt({ - filter_config: undefined, - fibex_file_paths: [], - with_storage_header: false, - tz: undefined, - }) - .get() - .sterilized(), - ) - .catch(finish.bind(null, session, done)); - break; - case 'test4': - const tmpobj1 = createSampleFile( - 5000, - logger, - (i: number) => `some line data: ${i}\n`, - ); - - let { - session: startupSession, - stream: startupStream, - events: startupEvents, - search: startupSearch, - } = await runners.initializeSession(testName); - - startupStream.observe( - new Factory.Stream() - .asText() - .process({ - command: `less ${tmpobj1.name}`, - cwd: process.cwd(), - shell: undefined, - }) - .get() - .sterilized(), - ); - const startupResults = measurement(); - const startupReport = performanceReport( - testName, - startupResults.ms, - test.expectation_ms, - `${home_dir}/${test.file}`, - ); - finish( - [startupSession, session], - done, - startupReport ? undefined : new Error(`${testName} is fail`), - ); - break; - case 'test5': - const tmpobj2 = createSampleFile( - 5000, - logger, - (i: number) => `some line data: ${i}\n`, - ); - - stream.observe( - new Factory.Stream() - .asText() - .process({ - command: `less ${tmpobj2.name}`, - cwd: process.cwd(), - shell: undefined, - }) - .get() - .sterilized(), - ); - const shutdownResult = measurement(); - const shutdownReport = performanceReport( - testName, - shutdownResult.ms, - test.expectation_ms, - `${home_dir}/${test.file}`, - ); - finish( - session, - done, - shutdownReport ? undefined : new Error(`${testName} is fail`), - ); - break; - case 'test6': - const multiSessions = [session]; - for (let i = 0; i < 50; i++) { - const file = createSampleFile( - 100, - logger, - (j: number) => `file ${i} line data: ${j}\n`, - ); - - let { - session: multiSession, - stream: multiSessionStream, - events: multiSessionEvents, - search: multiSessionSearch, - } = await runners.initializeSession(testName); - multiSessions.push(multiSession); - - multiSessionStream - .observe( - new Factory.Stream() - .asText() - .process({ - command: `less ${file.name}`, - cwd: process.cwd(), - shell: undefined, - }) - .get() - .sterilized(), - ) - .catch( - (err: Error) => `File ${i} failed to open: ${err.message}`, - ); - } - const testResult = measurement(); - const testReport = performanceReport( - testName, - testResult.ms, - test.expectation_ms, - `${home_dir}/${test.file}`, - ); - finish( - multiSessions, - done, - testReport ? undefined : new Error(`${testName} is fail`), - ); - break; - case 'test7': - let controlSum = 0; - let countMatches = 0; - let read: boolean = false; - stream - .observe( - new Factory.File() - .asText() - .type(Factory.FileType.Text) - .file(`${home_dir}/${test.file}`) - .get() - .sterilized(), - ) - .catch(finish.bind(null, session, done)); - const updates: number[] = []; - events.IndexedMapUpdated.subscribe((event: any) => { - event.len > 0 && updates.push(event.len); - }); - events.StreamUpdated.subscribe(async () => { - read = true; - try { - await search.search([ - { - filter: 'HTTP', - flags: { reg: true, word: true, cases: false }, - }, - ]); - let items = await stream.grabIndexed(0, countMatches); - await stream.setIndexingMode(IndexingMode.Breadcrumbs); - finish(session, done); - } catch (err) { - finish( - undefined, - done, - new Error( - `Fail to finish test due error: ${ - err instanceof Error ? err.message : err - }`, - ), - ); - } - }); - break; - case 'test8': - stream - .observe( - new Factory.File() - .asText() - .type(Factory.FileType.Text) - .file(`${home_dir}/${test.file}`) - .get() - .sterilized(), - ) - .on('processing', () => { - search - .search([ - { - filter: 'http', - flags: { reg: true, word: false, cases: false }, - }, - ]) - .catch(finish.bind(null, session, done)); - }) - .catch(finish.bind(null, session, done)); - break; - case 'test9': - stream - .observe( - new Factory.File() - .asText() - .type(Factory.FileType.Text) - .file(`${home_dir}/${test.file}`) - .get() - .sterilized(), - ) - .on('processing', () => { - search - .search([ - { - filter: 'http://www.almhuette-raith.at', - flags: { reg: true, word: false, cases: false }, - }, - { - filter: 'com.apple.hiservices-xpcservice', - flags: { reg: true, word: false, cases: false }, - }, - { - filter: 'Google Chrome Helper', - flags: { reg: true, word: false, cases: false }, - }, - ]) - .catch(finish.bind(null, session, done)); - }) - .catch(finish.bind(null, session, done)); - break; - default: - throw new Error(`Unsupported format or alias: ${test.alias}`); - } - events.FileRead.subscribe(() => { - const results = measurement(); - const reportResult = performanceReport( - testName, - results.ms, - test.expectation_ms, - `${home_dir}/${test.file}`, - ); - finish( - session, - done, - reportResult ? undefined : new Error(`${testName} is fail`), - ); - }); - }, - ); - }); - }); -}); diff --git a/application/apps/rustcore/ts-bindings/spec/benchmarks.json b/application/apps/rustcore/ts-bindings/spec/benchmarks.json deleted file mode 100644 index e8bbf4186b..0000000000 --- a/application/apps/rustcore/ts-bindings/spec/benchmarks.json +++ /dev/null @@ -1,52 +0,0 @@ -{ - "log_level": 1, - "tests": { - "benchmark": { - "test1": { - "alias": "Observe - grab content (text)", - "file": "test_files/temp_readings3.txt", - "expectation_ms": 20000 - }, - "test2": { - "alias": "Observe - grab content (dlt)", - "file": "test_files/FzgProg_SP21.dlt", - "expectation_ms": 1200000 - }, - "test3": { - "alias": "Observe - grab content (pcapng)", - "file": "test_files/someip.pcapng", - "expectation_ms": 20000 - }, - "test4": { - "alias": "Stream - startup measurement", - "file": "", - "expectation_ms": 20000 - }, - "test5": { - "alias": "Stream - shutdown measurement", - "file": "", - "expectation_ms": 200000 - }, - "test6": { - "alias": "Stream - Open 50 sessions", - "file": "", - "expectation_ms": 200000 - }, - "test7": { - "alias": "Indexes - Switch to breadcrumb mode", - "file": "test_files/indexing_access_huge.log", - "expectation_ms": 300000 - }, - "test8": { - "alias": "Assign & single search", - "file": "test_files/indexing_access_huge.log", - "expectation_ms": 30000 - }, - "test9": { - "alias": "Assign & multiple search", - "file": "test_files/indexing_access_huge.log", - "expectation_ms": 100000 - } - } - } -} diff --git a/application/apps/rustcore/ts-bindings/spec/common.ts b/application/apps/rustcore/ts-bindings/spec/common.ts deleted file mode 100644 index 5f6a65d2c6..0000000000 --- a/application/apps/rustcore/ts-bindings/spec/common.ts +++ /dev/null @@ -1,281 +0,0 @@ -// tslint:disable - -import { Jobs, Tracker, Session } from '../src/index'; -import { Logger } from './logger'; -import { error, numToLogLevel } from 'platform/log/utils'; -import { state } from 'platform/log'; - -import * as tmp from 'tmp'; -import * as fs from 'fs'; -import * as path from 'path'; - -const NS_PER_SEC = 1e9; -const NS_PER_MS = 1000000; -const MS_PER_SEC = 1000; - -// Get rid of default Jasmine timeout -jasmine.DEFAULT_TIMEOUT_INTERVAL = 900000; - -export function rootPath(): string { - const parts = path.dirname(module.filename).split(path.sep); - if (parts.length > 0 && parts[0].trim() === '') { - parts[0] = path.sep; - } - for (let i = parts.length - 1; i >= 0; i -= 1) { - const el = parts[i]; - parts.splice(i, 1); - if (el === 'application') { - break; - } - } - return path.join(...parts); -} -export function relativePath(dest: string): string { - return path.join(rootPath(), dest); -} - -export function readConfigFile(filenameEnvVar: string, defaultPaths: string[]): T | Error { - const defaults = (() => { - for (const target of defaultPaths) { - if (fs.existsSync(target)) { - return target; - } - } - return undefined; - })(); - - let filename = (process.env as any)[filenameEnvVar]; - if ((typeof filename !== 'string' || filename.trim() === '') && defaults === undefined) { - return new Error( - `To run test you should define a path to configuration file with ${filenameEnvVar}=path_to_config_json_file`, - ); - } else if (typeof filename !== 'string' || filename.trim() === '') { - filename = defaults; - } - - if (!fs.existsSync(filename)) { - return new Error(`Configuration file ${filename} doesn't exist`); - } - - const buffer = fs.readFileSync(filename); - try { - return JSON.parse(buffer.toString().replace(/\/\*.*\*\//gi, '')) as T; - } catch (err) { - return new Error( - `Fail to parse configuration file ${filename}; error: ${ - err instanceof Error ? err.message : err - }`, - ); - } -} - -export function finish( - sessions: Array | Session | Jobs | Tracker | undefined, - done: (...args: any[]) => void, - err?: Error, -): void { - if (err !== undefined) { - fail(err); - } - sessions = sessions instanceof Array ? sessions : [sessions]; - const filtered = sessions.filter((s) => s !== undefined); - if (filtered.length === 0) { - done(); - } else { - Promise.allSettled( - filtered.map((session) => - session === undefined ? Promise.resolve() : session.destroy(), - ), - ).then((results) => { - let reasons: any[] = []; - results.forEach((res) => { - if (res.status === 'rejected') { - reasons.push(res.reason); - } - }); - if (reasons.length === 0) { - const session = filtered.find((s) => s instanceof Session); - if (session !== undefined) { - checkSessionDebugger(session as Session, done); - } else { - done(); - } - } else { - fail(new Error(reasons.map((r) => error(r)).join('; '))); - } - }); - } -} - -export function checkSessionDebugger(session: Session, done: () => void) { - const stat = session.getDebugStat(); - if (stat.unsupported.length !== 0) { - fail(new Error(`Unsupported events:\n\t- ${stat.unsupported.join('\n\t- ')}`)); - } - if (stat.errors.length !== 0) { - fail(new Error(`Errors:\n\t- ${stat.errors.join('\n\t- ')}`)); - } - session.printDebugStat(true); - done(); -} - -(function () { - const loglevel: string | undefined = (process.env as any)['JASMIN_LOG_LEVEL']; - const numericLoglevel: number = loglevel === undefined ? 1 : parseInt(loglevel, 10); - if ( - isNaN(numericLoglevel) || - !isFinite(numericLoglevel) || - numericLoglevel < 0 || - numericLoglevel > 6 - ) { - return; - } - state.setLevel(numToLogLevel(numericLoglevel)); -})(); - -export function createSampleFile( - lines: number, - logger: Logger, - creator: (i: number) => string, -): tmp.FileResult { - const tmpobj = tmp.fileSync(); - var content = ''; - for (let i = 0; i < lines; i++) { - content += creator(i); - } - fs.appendFileSync(tmpobj.name, content); - const stats = fs.statSync(tmpobj.name); - logger.debug(`Created example grabber file of size: ${stats.size}`); - return tmpobj; -} - -export function appendToSampleFile( - tmpobj: tmp.FileResult, - lines: number, - logger: Logger, - creator: (i: number) => string, -): tmp.FileResult { - var content = ''; - for (let i = 0; i < lines; i++) { - content += creator(i); - } - fs.appendFileSync(tmpobj.name, content); - const stats = fs.statSync(tmpobj.name); - logger.debug(`Appened date to example file of size: ${stats.size}`); - return tmpobj; -} - -export function performanceReport( - name: string, - actual: number, - expectation: number, - filename?: string, -): boolean { - const output = console.log; - const LEN: number = 80; - const MAX = LEN + 2; - const SCALE = 10; - const format = (str: string, filler: string = ' '): string => { - return `│ ${str}${filler.repeat(MAX > str.length - 3 ? MAX - str.length - 3 : 0)}│`; - }; - const fill = (str: string, len: number, filler: string = ' '): string => { - if (len - str.length < 0) { - return str; - } - return `${filler.repeat(len - str.length)}${str}`; - }; - output(`\n┌${'─'.repeat(LEN)}┐`); - output(format(`▒▒▒ ${name} `, '▒')); - output(format(`Performance measurement: ${actual < expectation ? 'PASSED' : 'FAILED'}`)); - if (typeof filename === 'string') { - const stat = fs.statSync(filename); - output(format(`File size: ${(stat.size / 1024 / 1024).toFixed(2)}Mb`)); - } - output(`├${'─'.repeat(LEN)}┤`); - const step = Math.max(expectation, actual) / SCALE; - const scale_actual = Math.floor(actual / step); - const scale_expect = Math.floor(expectation / step); - const diff = Math.abs(expectation - actual); - const scale_diff = Math.floor(diff / step); - output( - format( - `${fill('Actual', 14)} [${fill(actual.toFixed(2), 8)}ms][${'■'.repeat( - scale_actual, - )}${'·'.repeat(SCALE - scale_actual < 0 ? 0 : SCALE - scale_actual)}]`, - ), - ); - output( - format( - `${fill('Expectation', 14)} [${fill(expectation.toFixed(2), 8)}ms][${'■'.repeat( - scale_expect, - )}${'·'.repeat(SCALE - scale_expect < 0 ? 0 : SCALE - scale_expect)}]`, - ), - ); - output( - format( - `${fill('Diff', 14)} [${fill(diff.toFixed(2), 8)}ms][${'■'.repeat( - scale_diff, - )}${'·'.repeat(SCALE - scale_diff < 0 ? 0 : SCALE - scale_diff)}]`, - ), - ); - output(`└${'─'.repeat(LEN)}┘`); - - const result = { - name, - actual, - expectation, - passed: actual <= expectation, - }; - - let performance_results_folder = (process.env as any)['PERFORMANCE_RESULTS_FOLDER']; - let performance_results = (process.env as any)['PERFORMANCE_RESULTS']; - let home_dir = (process.env as any)['SH_HOME_DIR']; - if (home_dir && performance_results_folder) { - const folderPath = path.join(home_dir, performance_results_folder); - const filePath = path.join(folderPath, performance_results); - // Ensure filePath is a real path - if (!fs.existsSync(folderPath)) { - // Create directory if it doesn't exist - fs.mkdirSync(folderPath, { recursive: true }); - output(`Created directory: ${folderPath}`); - } - - let results = []; - if (fs.existsSync(filePath)) { - let existingData = fs.readFileSync(filePath, 'utf-8'); - try { - results = JSON.parse(existingData); - } catch (error) { - output('Error parsing existing JSON data:'); - } - } - results.push(result); - const data = JSON.stringify(results, null, 2); // JSON format with indentation - fs.writeFileSync(filePath, data); - } else { - output(`Missing necessary environment variables for file path.`); - } - - return actual <= expectation; -} - -export interface ITimeMeasurement { - ns: number; - ms: number; - ms_str: string; - sec_str: string; -} -export function setMeasurement(): () => ITimeMeasurement { - const start = process.hrtime(); - return (): ITimeMeasurement => { - const end = process.hrtime(start); - const ns = end[0] * NS_PER_SEC + end[1]; - const ms = ns / NS_PER_MS; - return { - ns: ns, - ms: ms, - ms_str: ms.toFixed(2), - sec_str: (ms / MS_PER_SEC).toFixed(2), - }; - }; -} diff --git a/application/apps/rustcore/ts-bindings/spec/config.ts b/application/apps/rustcore/ts-bindings/spec/config.ts deleted file mode 100644 index 775deb23a1..0000000000 --- a/application/apps/rustcore/ts-bindings/spec/config.ts +++ /dev/null @@ -1,115 +0,0 @@ -import * as fs from 'fs'; -import * as path from 'path'; -import { readConfigFile } from './common'; - -export interface ICancelTestSpec { - terms: string[]; - interval_ms: number; - timeout_last_search_ms: number; - filesize: number; - datasetLength: number; -} - -export interface IMapTestSpec { - filesize: number; - datasetLength: number; -} - -export interface IRegularTests { - execute_only: number[]; - list: { [key: string]: string }; - files: { [key: string]: string }; - spec?: { - cancel?: { [key: string]: ICancelTestSpec }; - map?: { [key: string]: IMapTestSpec }; - }; -} - -export interface IConfiguration { - log_level: number; - tests: { - observe: { - regular: IRegularTests; - }; - protocol: { - regular: IRegularTests; - }; - stream: { - regular: IRegularTests; - }; - indexes: { - regular: IRegularTests; - }; - jobs: { - regular: IRegularTests; - }; - concat: { - regular: IRegularTests; - }; - search: { - regular: IRegularTests; - }; - values: { - regular: IRegularTests; - }; - ranges: { - regular: IRegularTests; - }; - extract: { - regular: IRegularTests; - }; - exporting: { - regular: IRegularTests; - }; - cancel: { - regular: IRegularTests; - }; - errors: { - regular: IRegularTests; - }; - map: { - regular: IRegularTests; - }; - promises: { - regular: IRegularTests; - }; - observing: { - regular: IRegularTests; - }; - }; -} - -export function readConfigurationFile(): Config { - const config = readConfigFile('JASMIN_TEST_CONFIGURATION', [ - path.resolve(path.dirname(module.filename), 'defaults.json'), - path.resolve(path.dirname(module.filename), '../../defaults.json'), - ]); - - if (config instanceof Error) { - console.warn(`\n`); - console.warn(`=`.repeat(81)); - console.warn(`**** ERROR ${'*'.repeat(68)}`); - console.warn(`=`.repeat(81)); - console.warn(`Fail to read configuration file due error: ${config.message}`); - console.warn( - `Test will be done in the scope of tasks, which do not require configuration.`, - ); - console.warn(`=`.repeat(81)); - console.warn(`\n`); - process.exit(1); - } else { - return new Config(config); - } -} - -export class Config { - private readonly _config: IConfiguration; - - constructor(config: IConfiguration) { - this._config = config; - } - - public get(): IConfiguration { - return this._config; - } -} diff --git a/application/apps/rustcore/ts-bindings/spec/config_benchmarks.ts b/application/apps/rustcore/ts-bindings/spec/config_benchmarks.ts deleted file mode 100644 index 86299a93f4..0000000000 --- a/application/apps/rustcore/ts-bindings/spec/config_benchmarks.ts +++ /dev/null @@ -1,53 +0,0 @@ -import * as fs from 'fs'; -import * as path from 'path'; -import { readConfigFile } from './common'; - -export interface IPerformanceTest { - open_as: 'text' | 'dlt' | 'pcapng' | ''; - ignore: boolean; - alias: string; - expectation_ms: number; - file: string; -} - -export interface IConfiguration { - log_level: number; - tests: { - benchmark: { [key: string]: IPerformanceTest }; - }; -} - -export function readBenchmarkConfigurationFile(): Config { - const config = readConfigFile('JASMIN_TEST_CONFIGURATION', [ - path.resolve(path.dirname(module.filename), 'benchmarks.json'), - path.resolve(path.dirname(module.filename), '../../benchmarks.json'), - ]); - - if (config instanceof Error) { - console.warn(`\n`); - console.warn(`=`.repeat(81)); - console.warn(`**** ERROR ${'*'.repeat(68)}`); - console.warn(`=`.repeat(81)); - console.warn(`Fail to read configuration file due error: ${config.message}`); - console.warn( - `Test will be done in the scope of tasks, which do not require configuration.`, - ); - console.warn(`=`.repeat(81)); - console.warn(`\n`); - process.exit(1); - } else { - return new Config(config); - } -} - -export class Config { - private readonly _config: IConfiguration; - - constructor(config: IConfiguration) { - this._config = config; - } - - public get(): IConfiguration { - return this._config; - } -} diff --git a/application/apps/rustcore/ts-bindings/spec/defaults.json b/application/apps/rustcore/ts-bindings/spec/defaults.json deleted file mode 100644 index 03f8288e96..0000000000 --- a/application/apps/rustcore/ts-bindings/spec/defaults.json +++ /dev/null @@ -1,290 +0,0 @@ -/* NOTE: in this JSON can be used comments placed between stars */ -{ - "log_level": 1, - "tests": { - "observe": { - "regular": { - /* With numbers you can define, which tests should be executed. "execute_only": [1, 3] will run ONLY tests 1 and 3*/ - /* If "execute_only" isn't empty, all performance tests will be ignored*/ - "execute_only": [1, 4, 5, 6, 7, 8, 9, 10], - "list": { - "1": "Test 1. Observe and grab content (text)", - "2": "Test 2. Observe and grab content (pcapng)", - "3": "Test 3. Observe and grab content (dlt)", - "4": "Test 4. Observe and grab content (attachments)", - "5": "Test 5. Observe and grab content (someip from pcapng)", - "6": "Test 6. Observe and grab content (someip from pcapng with fibex)", - "7": "Test 7. Observe and grab content (someip from pcap)", - "8": "Test 8. Observe and grab content (someip from pcap with fibex)", - "9": "Test 9. Observe and grab content (someip from dlt)", - "10": "Test 10. Observe and grab content (someip from dlt with fibex)" - }, - "files": { - "attachments": "../../../../application/developing/resources/attachments.dlt", - "someip-pcapng": "../../../../application/developing/resources/someip.pcapng", - "someip-pcap": "../../../../application/developing/resources/someip.pcap", - "someip-fibex": "../../../../application/developing/resources/someip.xml", - "someip-dlt": "../../../../application/developing/resources/someip.dlt" - } - } - }, - "protocol": { - "regular": { - "execute_only": [2,3], - "list": { - "1": "Test 1. CallbackEvent", - "2": "Test 2. Check all messages", - "3": "Test 3. Comparing JSON vs Protobuf" - }, - "files": { - } - } - }, - "stream": { - "regular": { - "execute_only": [], - "list": { - "1": "Test 1. Observe and grab", - "2": "Test 2. Life cycle", - "3": "Test 3. Invalid data source", - "4": "Test 4. Updated stream", - "5": "Test 5. Updated stream search", - "6": "Test 6. Aborting stream", - "7": "Test 7. Multiple stream & SDE test" - }, - "files": {} - } - }, - "indexes": { - "regular": { - "execute_only": [], - "list": { - "1": "Test 1. Observe and grab" - }, - "files": {} - } - }, - "jobs": { - "regular": { - "execute_only": [1, 2, 3, 4, 5, 7, 8], - "list": { - "1": "Test 1. Cancelation testing", - "2": "Test 2. Wrong sequence test", - "3": "Test 3. Folder content listing", - "4": "Test 4. Get profiles", - "5": "Test 5. Get envvars", - "6": "Test 6. Get Someip statistic", - "7": "Test 7. Check if file is binary", - "8": "Test 8. Closing session with running task" - }, - "files": { - "someip-pcapng": "../../../../application/developing/resources/someip.pcapng", - "sample-txt": "../../../../application/developing/resources/sample_utf_8.txt" - } - } - }, - "concat": { - "regular": { - "execute_only": [], - "list": { - "1": "Test 1. Concat and grab content (text)", - "2": "Test 2. Concat and grab content (pcapng)", - "3": "Test 3. Concat and grab content (dlt)" - }, - "files": {} - } - }, - "ranges": { - "regular": { - "execute_only": [], - "list": { - "1": "Test 1. Assign & grab ranges" - } - } - }, - "search": { - "regular": { - "execute_only": [], - "list": { - "1": "Test 1. Assign & single search", - "2": "Test 2. Assign & multiple search", - "3": "Test 3. Assign & zero search", - "4": "Test 4. Assign & single not case sensitive search", - "5": "Test 5. Assign & single word search", - "6": "Test 6. Assign & single search with crossing terms", - "7": "Test 7. Assign & repeated search", - "8": "Test 8. Assign & search and nested search" - } - } - }, - "values": { - "regular": { - "execute_only": [], - "list": { - "1": "Test 1. Assign & single search", - "2": "Test 2. Assign & single search, getting updates" - } - } - }, - "extract": { - "regular": { - "execute_only": [], - "list": { - "1": "Test 1. Assign & extract data", - "2": "Test 2. Assign & extract multiple data" - } - } - }, - "exporting": { - "regular": { - "execute_only": [], - "list": { - "1": "Test 1. Assign & export", - "2": "Test 2. Concat & export", - "3": "Test 3. Assign & export search", - "4": "Test 4. DLT: Assign & export", - "5": "Test 5. DLT: Assign & export raw", - "6": "Test 6. DLT: Concat & export", - "7": "Test 7. DLT: Concat & export raw", - "8": "Test 8. DLT: Concat & export raw (multiple ranges)", - "9": "Test 9. DLT: Assign & export columns (from left)", - "10": "Test 10. DLT: Assign & export columns (from right)", - "11": "Test 11. DLT: Assign & export columns (single)", - "12": "Test 12. DLT: Assign & export columns (stability)" - }, - "files": { - "dlt": [ - "./application/developing/resources/attachments.dlt", - "./application/developing/resources/someip.dlt" - ] - } - } - }, - "cancel": { - "regular": { - "execute_only": [1], - "list": { - "1": "Test 1. Cancel operation before done", - "2": "Test 2. Cancel operation after done", - /* Required text file*/ - "3": "Test 3. Multiple search" - }, - "files": {}, - "spec": { - "cancel": { - /* Specification for test #3*/ - "3": { - "terms": [ - "a", - "b", - "c", - "d", - "e", - "f", - "g", - "r", - "h", - "t" - ], - "interval_ms": 250, - "timeout_last_search_ms": 10000 - } - } - } - } - }, - "errors": { - "regular": { - "execute_only": [], - "list": { - "1": "Test 1. Error: search before observe", - "2": "Test 2. Error: Assign fake file", - "3": "Test 3. Error: Assign and grab invalid range", - "4": "Test 4. Error: Assign & single and grab invalid range", - "5": "Test 5. Error: Grab lines with negative length", - "6": "Test 6. Error: Grab lines with negative start", - "7": "Test 7. Error: Unexpected error on session state", - "8": "Test 8. Error: Unexpected error on session tracker", - "9": "Test 9. Destroy dead session", - "10": "Test 10. Search with invalid filters" - } - } - }, - "map": { - "regular": { - "execute_only": [], - "list": { - "1": "Test 1. Search map for file length < dataset length", - "2": "Test 2. Search map for 10 line file with match on first line", - "3": "Test 3. Search map for big file with multiple filters", - "4": "Test 4. Search map for file containing '>>'", - "5": "Test 5. Search map for file with ':'-match", - "6": "Test 6. Search map for file with '0.0:1'-match", - "7": "Test 7. Search map for file with 'word(0.0:1'-match" - }, - "spec": { - "map": { - "1": { - "filesize": 3000, - "datasetLength": 6000 - }, - "2": { - "filesize": 10, - "datasetLength": 10 - }, - "3": { - "filesize": 6000, - "datasetLength": 6000 - }, - "4": { - "filesize": 10, - "datasetLength": 10 - }, - "5": { - "filesize": 1000, - "datasetLength": 1000 - }, - "6": { - "filesize": 1000, - "datasetLength": 1000 - }, - "7": { - "filesize": 1000, - "datasetLength": 1000 - } - } - } - } - }, - "promises": { - "regular": { - "execute_only": [], - "list": { - "1": "Test 1. Regular", - "2": "Test 2. Cancellation", - "3": "Test 3. Cancellation delegation", - "4": "Test 4. Resolving bound", - "5": "Test 5. Rejecting bound", - "6": "Test 6. Cancel bound", - "7": "Test 7. Bound cancellation delegation", - "8": "Test 8. Events" - }, - "files": {} - } - }, - "observing": { - "regular": { - "execute_only": [], - "list": { - "1": "Test 1. Observer", - "2": "Test 2. Observe configuration (streams)", - "3": "Test 3. Observe configuration (origins)", - "4": "Test 4. Observe configuration (parsers)", - "5": "Test 5. Observe configuration updates (tracking)", - "6": "Test 6. Observe configuration (overwriting)" - }, - "files": {} - } - } - } -} diff --git a/application/apps/rustcore/ts-bindings/spec/logger.ts b/application/apps/rustcore/ts-bindings/spec/logger.ts deleted file mode 100644 index 60f6d3dc33..0000000000 --- a/application/apps/rustcore/ts-bindings/spec/logger.ts +++ /dev/null @@ -1,101 +0,0 @@ -import { Logger as Base, Level, state } from 'platform/log'; -import { scope } from 'platform/env/scope'; - -import * as fs from 'fs'; -import * as os from 'os'; -import * as path from 'path'; - -const LOG_FILE = 'chipmunk.indexer.log'; -const HOME = '.chipmunk'; -const FORCED_REPORT_TIMEOUT = 2 * 60 * 1000; - -const BLOCKS_LOGS = ((): boolean => { - const value = (process.env as any)['JASMIN_TEST_BLOCKS_LOGS']; - if (typeof value === 'string') { - return ['true', 'on', '1'].includes(value.toLowerCase()); - } else if (typeof value === 'number') { - return value > 0; - } else if (typeof value === 'boolean') { - return value; - } else { - return false; - } -})(); -export function getLogger(signature: string): Logger { - return new Logger(signature); -} - -const collected: string[] = []; -let inited: boolean = false; -let reported: boolean = false; -let timeout = setTimeout(() => { - Logger.report(); -}, FORCED_REPORT_TIMEOUT); - -export class Logger extends Base { - public static report() { - if (reported) { - return; - } - reported = true; - const border = '='.repeat(75); - console.log(`\n${border}\nNodeJS Level Logs\n${border}`); - collected.forEach((log) => { - console.log(log); - }); - const filename = path.join(os.homedir(), HOME, LOG_FILE); - console.log(`\n${border}\n${filename}\n${border}`); - if (!fs.statSync(filename)) { - console.log(`file isn't found`); - return; - } - try { - console.log(fs.readFileSync(filename, 'utf8')); - } catch (e) { - console.error(e); - } - } - - public override store(msg: string, _level: Level): void { - // For testing we are writing all logs. - collected.push(msg); - } -} - -export function initLogger() { - if (inited) { - return; - } - inited = true; - scope.setLogger(Logger); - state.setLevel(Level.ERROR); -} - -initLogger(); - -let failed: number = 0; -const jasmineLogger = getLogger(`Jasmine`); - -jasmine.getEnv().addReporter({ - specStarted: (result: any) => { - jasmineLogger.debug( - 'Spec started: ' + - result.description + - ' whose full description is: ' + - result.fullName, - ); - }, - specDone: function (result: any) { - if (result.status === 'passed') { - return; - } - failed += 1; - }, - suiteDone: function (_result: any) { - if (failed === 0) { - return; - } - clearTimeout(timeout); - !BLOCKS_LOGS && Logger.report(); - }, -}); diff --git a/application/apps/rustcore/ts-bindings/spec/runners.ts b/application/apps/rustcore/ts-bindings/spec/runners.ts deleted file mode 100644 index 161e9b0a66..0000000000 --- a/application/apps/rustcore/ts-bindings/spec/runners.ts +++ /dev/null @@ -1,143 +0,0 @@ -import { Jobs, Tracker, Session, SessionStream, ISessionEvents, SessionSearch } from '../src/index'; -import { Logger, getLogger } from './logger'; -import { error } from 'platform/log/utils'; -import { IRegularTests } from './config'; -import { IPerformanceTest } from './config_benchmarks'; -import { finish } from './common'; - -export interface SessionComponents { - session: Session; - stream: SessionStream; - events: ISessionEvents; - search: SessionSearch; -} - -export async function initializeSession(testName: string): Promise { - const session = await Session.create(); - session.debug(true, testName); - - let stream, events, search; - - stream = session.getStream(); - if (stream instanceof Error) throw stream; - - events = session.getEvents(); - if (events instanceof Error) throw events; - - search = session.getSearch(); - if (search instanceof Error) throw search; - - return { session, stream, events, search }; -} - -export type ScopeInjector = (s: T) => T; - -function validate( - config: IRegularTests | IPerformanceTest, - id: string | number, -): string | Promise { - let name: string; - let shouldExecute = true; - if ('list' in config) { - // Handling IRegularTests - name = config.list[id]; - shouldExecute = - config.execute_only.length === 0 || - config.execute_only.includes(typeof id === 'number' ? id : parseInt(id, 10)); - } else if ('alias' in config) { - // Handling IPerformanceTest - name = config.alias; - shouldExecute = !config.ignore; - } else { - // Log the type of config received - console.error('Invalid configuration passed to runner. Config:', config); - return Promise.reject(new Error('Invalid configuration passed to runner')); - } - if (!shouldExecute) { - console.log(`\nIgnored: ${name}`); - return Promise.resolve(void 0); - } else { - console.log(`\nStarted: ${name}`); - } - return name; -} - -export async function withSession( - config: IRegularTests | IPerformanceTest, - id: string | number, - test: (logger: Logger, done: () => void, components: SessionComponents) => Promise, -): Promise { - const name = validate(config, id); - if (typeof name !== 'string') { - return name; - } - const logger = getLogger(name); - return new Promise((done) => { - initializeSession(name) - .then((components) => { - const sessionRef = components.session; - try { - test(logger, done, components).catch((err: Error) => { - finish(sessionRef, done, err); - }); - } catch (err) { - finish(sessionRef, done, new Error(error(err))); - } - }) - .catch((err: Error) => { - logger.error(`Fail to init session due: ${err.message}`); - finish(undefined, done, new Error(error(err))); - }); - }); -} - -export async function noSession( - config: IRegularTests | IPerformanceTest, - id: string | number, - test: (logger: Logger, done: () => void) => Promise, -): Promise { - const name = validate(config, id); - if (typeof name !== 'string') { - return name; - } - const logger = getLogger(name); - return new Promise((done) => { - try { - test(logger, done).catch((err: Error) => { - finish(undefined, done, err); - }); - } catch (err) { - finish(undefined, done, new Error(error(err))); - } - }); -} - -export function unbound( - config: IRegularTests | IPerformanceTest, - id: string | number, - test: ( - logger: Logger, - done: () => void, - add: ScopeInjector, - ) => Promise, -): Promise { - const scope: Array = []; - const injector: ScopeInjector = (obj: Session | Tracker | Jobs) => { - scope.push(obj); - return obj; - }; - const name = validate(config, id); - if (typeof name !== 'string') { - return name; - } - const logger = getLogger(name); - return new Promise((done) => { - try { - test(logger, done, injector).catch((err: Error) => { - finish(scope, done, err); - }); - } catch (err) { - finish(scope, done, new Error(error(err))); - } - }); -} \ No newline at end of file diff --git a/application/apps/rustcore/ts-bindings/spec/session.cancel.spec.ts b/application/apps/rustcore/ts-bindings/spec/session.cancel.spec.ts deleted file mode 100644 index 70a21d1696..0000000000 --- a/application/apps/rustcore/ts-bindings/spec/session.cancel.spec.ts +++ /dev/null @@ -1,181 +0,0 @@ -// tslint:disable - -// We need to provide path to TypeScript types definitions -/// -/// - -import { initLogger } from './logger'; -initLogger(); -import { Factory } from '../src/api/session'; -import { finish } from './common'; -import { readConfigurationFile } from './config'; - -import * as runners from './runners'; - -const config = readConfigurationFile().get().tests.cancel; - -describe('Cancel', function () { - it(config.regular.list[1], function () { - return runners.withSession(config.regular, 1, async (_logger, done, comps) => { - let sleep = comps.session - .sleep(2000, false) - .then((results) => { - finish(comps.session, done, new Error(`Operation isn't canceled`)); - }) - .catch((err: Error) => { - finish(comps.session, done, err); - }) - .canceled((reason) => { - finish(comps.session, done); - }); - setTimeout(() => { - sleep.abort(); - }, 250); - }); - }); - it(config.regular.list[2], function () { - return runners.withSession(config.regular, 2, async (_logger, done, comps) => { - let sleep = comps.session - .sleep(250, false) - .then((results) => { - finish(comps.session, done); - }) - .catch((err: Error) => { - finish(comps.session, done, err); - }) - .canceled((reason) => { - finish(comps.session, done, new Error(`Operation cannot be canceled`)); - }); - setTimeout(() => { - sleep.abort(); - }, 1000); - }); - }); - it(config.regular.list[3], function () { - return runners.withSession(config.regular, 3, async (_logger, done, comps) => { - if (config.regular.files === undefined || config.regular.files['text'] === undefined) { - return finish( - undefined, - done, - new Error(`Text file should defined in settings: cancel.regular.files`), - ); - } - if ( - config.regular.spec === undefined || - config.regular.spec.cancel === undefined || - config.regular.spec.cancel[3] === undefined - ) { - return finish( - undefined, - done, - new Error(`For test #3 required specification: cancel.regular.spec`), - ); - } - const spec = config.regular.spec.cancel[3]; - comps.stream - .observe( - new Factory.File() - .file(config.regular.files['text']) - .type(Factory.FileType.Text) - .asText() - .get() - .sterilized(), - ) - .catch(finish.bind(null, comps.session, done)); - let canceled: number = 0; - let started: number = 0; - let processed: number = 0; - let resolved: number = 0; - const errors: Map = new Map(); - const searches = spec.terms.length; - const check_errors = (): boolean => { - if (started !== searches) { - finish( - comps.session, - done, - new Error( - `Total amount of search-requests ${searches}. Started - ${started}; Expectation: ${searches}`, - ), - ); - return false; - } - if (canceled !== searches - 1) { - finish( - comps.session, - done, - new Error( - `Total amount of search-requests ${searches}. Canceled - ${canceled}; Expectation: ${ - searches - 1 - }`, - ), - ); - return false; - } - if (errors.size !== 0) { - errors.forEach((error: Error) => { - console.log(`Error: ${error.message}`); - }); - finish(comps.session, done, new Error(`Has errors during searching`)); - return false; - } - return true; - }; - const runner = (terms: string[], index: number) => { - if (terms.length === 0) { - return; - } - let filter = terms.splice(0, 1)[0]; - started += 1; - let task = comps.search - .search([ - { - filter, - flags: { reg: true, word: false, cases: false }, - }, - ]) - .canceled(() => { - console.log( - `-> [..🗑..]\tsearch operation #${index} (${task.uuid()}) is canceled`, - ); - canceled += 1; - }) - .then(() => { - console.log( - `-> [..👝..]\tsearch operation #${index} (${task.uuid()}) is resolved`, - ); - resolved += 1; - }) - .catch((err: Error) => { - console.log( - `-> [..⚠..]\tsearch operation #${index} (${task.uuid()}) triggers error`, - ); - errors.set(index, err); - }) - .finally(() => { - processed += 1; - if (processed === searches) { - if (!check_errors()) { - // Failed - return; - } - if (resolved === 0) { - return finish( - comps.session, - done, - new Error(`At least one search should resolved`), - ); - } - finish(comps.session, done); - } - }); - setTimeout(() => { - runner(terms, index + 1); - }, spec.interval_ms); - }; - console.log(`Waiting until target file would be indexed.`); - comps.events.FileRead.subscribe(() => { - runner(spec.terms, 1); - }); - }); - }); -}); diff --git a/application/apps/rustcore/ts-bindings/spec/session.concat.spec.ts b/application/apps/rustcore/ts-bindings/spec/session.concat.spec.ts deleted file mode 100644 index a2a6ac2848..0000000000 --- a/application/apps/rustcore/ts-bindings/spec/session.concat.spec.ts +++ /dev/null @@ -1,228 +0,0 @@ -// tslint:disable -// We need to provide path to TypeScript types definitions -/// -/// - -import { initLogger } from './logger'; -initLogger(); -import { Factory } from '../src/api/session'; -import { GrabbedElement } from 'platform/types/bindings'; -import { createSampleFile, finish } from './common'; -import { readConfigurationFile } from './config'; - -import * as runners from './runners'; - -const config = readConfigurationFile().get().tests.concat; - -describe('Concat', function () { - it(config.regular.list[1], function () { - return runners.withSession(config.regular, 1, async (logger, done, comps) => { - const tmpobj_a = createSampleFile( - 100, - logger, - (i: number) => `file a: some line data: ${i}\n`, - ); - const tmpobj_b = createSampleFile( - 100, - logger, - (i: number) => `file b: some line data: ${i}\n`, - ); - comps.stream - .observe( - new Factory.Concat() - .type(Factory.FileType.Text) - .files([tmpobj_a.name, tmpobj_b.name]) - .asText() - .get() - .sterilized(), - ) - .catch(finish.bind(null, comps.session, done)); - let grabbing: boolean = false; - comps.events.StreamUpdated.subscribe((rows: number) => { - if (rows < 120 || grabbing) { - return; - } - grabbing = true; - comps.stream - .grab(98, 4) - .then((result: GrabbedElement[]) => { - logger.debug('result of grab was: ' + JSON.stringify(result)); - expect(result.map((i) => i.content)).toEqual([ - 'file a: some line data: 98', - 'file a: some line data: 99', - 'file b: some line data: 0', - 'file b: some line data: 1', - ]); - finish(comps.session, done); - }) - .catch((err: Error) => { - finish( - comps.session, - done, - new Error( - `Fail to grab data due error: ${ - err instanceof Error ? err.message : err - }`, - ), - ); - }); - }); - }); - }); - - // it(config.regular.list[2], function () { - // return runners.withSession(config.regular, 2, async (logger, done, collector) => { - // Session.create() - // .then((session: Session) => { - // // Set provider into debug mode - // session.debug(true); - // const stream = session.getStream(); - // if (stream instanceof Error) { - // finish(session, done, stream); - // return; - // } - // const events = session.getEvents(); - // if (events instanceof Error) { - // finish(session, done, events); - // return; - // } - // stream - // .observe( - // Observe.DataSource.file(config.regular.files['pcapng']).pcapng({ - // dlt: { - // filter_config: undefined, - // fibex_file_paths: undefined, - // with_storage_header: false, - // }, - // }), - // ) - // .catch(finish.bind(null, session, done)); - // let grabbing: boolean = false; - // let received: number = 0; - // const timeout = setTimeout(() => { - // finish( - // session, - // done, - // new Error( - // `Failed because timeout. Waited for at least 100 rows. Has been gotten: ${received}`, - // ), - // ); - // }, 20000); - // events.StreamUpdated.subscribe((rows: number) => { - // received = rows; - // if (rows < 100 || grabbing) { - // return; - // } - // clearTimeout(timeout); - // grabbing = true; - // stream - // .grab(1, 10) - // .then((result: GrabbedElement[]) => { - // expect(result.length).toEqual(10); - // logger.debug('result of grab was: ' + JSON.stringify(result)); - // finish(session, done); - // }) - // .catch((err: Error) => { - // finish( - // session, - // done, - // new Error( - // `Fail to grab data due error: ${ - // err instanceof Error ? err.message : err - // }`, - // ), - // ); - // }); - // }); - // }) - // .catch((err: Error) => { - // finish( - // undefined, - // done, - // new Error( - // `Fail to create session due error: ${ - // err instanceof Error ? err.message : err - // }`, - // ), - // ); - // }); - // }); - // }); - - // it(config.regular.list[3], function () { - // return runners.withSession(config.regular, 3, async (logger, done, collector) => { - // Session.create() - // .then((session: Session) => { - // // Set provider into debug mode - // session.debug(true); - // const stream = session.getStream(); - // if (stream instanceof Error) { - // finish(session, done, stream); - // return; - // } - // const events = session.getEvents(); - // if (events instanceof Error) { - // finish(session, done, events); - // return; - // } - // stream - // .observe( - // Observe.DataSource.file(config.regular.files['dlt']).dlt({ - // filter_config: undefined, - // fibex_file_paths: undefined, - // with_storage_header: true, - // }), - // ) - // .catch(finish.bind(null, session, done)); - // let grabbing: boolean = false; - // let received: number = 0; - // const timeout = setTimeout(() => { - // finish( - // session, - // done, - // new Error( - // `Failed because timeout. Waited for at least 100 rows. Has been gotten: ${received}`, - // ), - // ); - // }, 20000); - // events.StreamUpdated.subscribe((rows: number) => { - // received = rows; - // if (rows < 100 || grabbing) { - // return; - // } - // clearTimeout(timeout); - // grabbing = true; - // stream - // .grab(1, 10) - // .then((result: GrabbedElement[]) => { - // expect(result.length).toEqual(10); - // logger.debug('result of grab was: ' + JSON.stringify(result)); - // finish(session, done); - // }) - // .catch((err: Error) => { - // finish( - // session, - // done, - // new Error( - // `Fail to grab data due error: ${ - // err instanceof Error ? err.message : err - // }`, - // ), - // ); - // }); - // }); - // }) - // .catch((err: Error) => { - // finish( - // undefined, - // done, - // new Error( - // `Fail to create session due error: ${ - // err instanceof Error ? err.message : err - // }`, - // ), - // ); - // }); - // }); - // }); -}); diff --git a/application/apps/rustcore/ts-bindings/spec/session.errors.spec.ts b/application/apps/rustcore/ts-bindings/spec/session.errors.spec.ts deleted file mode 100644 index e73de8c107..0000000000 --- a/application/apps/rustcore/ts-bindings/spec/session.errors.spec.ts +++ /dev/null @@ -1,335 +0,0 @@ -// tslint:disable -// We need to provide path to TypeScript types definitions -/// -/// - -import { initLogger } from './logger'; -initLogger(); -import { Factory } from '../src/api/session'; -import { GrabbedElement } from 'platform/types/bindings'; -import { finish, createSampleFile } from './common'; -import { readConfigurationFile } from './config'; -import { error } from 'platform/log/utils'; - -import * as runners from './runners'; - -const config = readConfigurationFile().get().tests.errors; - -describe('Errors', () => { - it(config.regular.list[1], function () { - return runners.withSession(config.regular, 1, async (logger, done, comps) => { - comps.search - .search([ - { - filter: 'match', - flags: { reg: true, word: true, cases: false }, - }, - ]) - .then((_found: number) => - finish(comps.session, done, new Error('Search should not be available')), - ) - .catch((err: Error) => { - logger.debug(`Expected error: ${err.message}`); - finish(comps.session, done); - }); - }); - }); - it(config.regular.list[2], function () { - return runners.withSession(config.regular, 2, async (logger, done, comps) => { - comps.stream - .observe( - new Factory.File() - .type(Factory.FileType.Text) - .asText() - .file('/fake/path/to/fake/file') - .get() - .sterilized(), - ) - .then( - finish.bind( - null, - comps.session, - done, - new Error(`Not exist file cannot be opened`), - ), - ) - .catch((err: Error) => { - logger.debug(`Expected error: ${err.message}`); - finish(comps.session, done); - }); - }); - }); - - it(config.regular.list[3], function () { - return runners.withSession(config.regular, 3, async (logger, done, comps) => { - const tmpobj = createSampleFile(5000, logger, (i: number) => `some line data: ${i}\n`); - comps.stream - .observe( - new Factory.File() - .type(Factory.FileType.Text) - .asText() - .file(tmpobj.name) - .get() - .sterilized(), - ) - .catch(finish.bind(null, comps.session, done)); - let grabbing: boolean = false; - comps.events.StreamUpdated.subscribe((rows: number) => { - if (rows === 0 || grabbing) { - return; - } - grabbing = true; - // While we do not have operation id - comps.stream - .grab(6000, 1000) - .then((_result: GrabbedElement[]) => { - finish(comps.session, done, new Error(`grabber should not return results`)); - }) - .catch((err: Error) => { - logger.debug(`Expected error: ${err.message}`); - finish(comps.session, done); - }); - }); - }); - }); - - it(config.regular.list[4], function () { - return runners.withSession(config.regular, 4, async (logger, done, comps) => { - const tmpobj = createSampleFile( - 5000, - logger, - (i: number) => - `[${i}]:: ${ - i % 100 === 0 || i <= 5 ? `some match line data\n` : `some line data\n` - }`, - ); - comps.stream - .observe( - new Factory.File() - .type(Factory.FileType.Text) - .asText() - .file(tmpobj.name) - .get() - .sterilized(), - ) - .on('processing', () => { - comps.search - .search([ - { - filter: 'match', - flags: { reg: true, word: false, cases: false }, - }, - ]) - .then((found: number) => { - comps.search - .len() - .then((len: number) => { - expect(len).toEqual(55); - comps.search - .grab(6000, 1000) - .then((result: GrabbedElement[]) => { - finish( - comps.session, - done, - new Error( - `search grabber should not return results`, - ), - ); - }) - .catch((err: Error) => { - logger.debug(`Expected error: ${err.message}`); - finish(comps.session, done); - }); - }) - .catch((err: Error) => { - finish(comps.session, done, err); - }); - }) - .catch(finish.bind(null, comps.session, done)); - }) - .catch(finish.bind(null, comps.session, done)); - }); - }); - it(config.regular.list[5], function () { - return runners.withSession(config.regular, 5, async (logger, done, comps) => { - const tmpobj = createSampleFile(5, logger, (i: number) => `some line data: ${i}\n`); - comps.stream - .observe( - new Factory.File() - .type(Factory.FileType.Text) - .asText() - .file(tmpobj.name) - .get() - .sterilized(), - ) - .catch((err: Error) => { - finish( - comps.session, - done, - new Error(`Failed to observe file: ${err.message}`), - ); - }); - let grabbing: boolean = false; - comps.events.StreamUpdated.subscribe((rows: number) => { - if (rows === 0 || grabbing) { - return; - } - comps.stream - .grab(1, -2) - .then((_result: GrabbedElement[]) => { - finish( - comps.session, - done, - new Error('Grab from invalid range should not work'), - ); - }) - .catch((err: Error) => { - logger.debug(`Expected error: ${err.message}`); - finish(comps.session, done); - }); - }); - }); - }); - it(config.regular.list[6], function () { - return runners.withSession(config.regular, 6, async (logger, done, comps) => { - const tmpobj = createSampleFile(5, logger, (i: number) => `some line data: ${i}\n`); - comps.stream - .observe( - new Factory.File() - .type(Factory.FileType.Text) - .asText() - .file(tmpobj.name) - .get() - .sterilized(), - ) - .catch((err: Error) => - finish( - comps.session, - done, - new Error(`Failed to observe file: ${err.message}`), - ), - ); - let grabbing: boolean = false; - comps.events.StreamUpdated.subscribe((rows: number) => { - if (rows === 0 || grabbing) { - return; - } - grabbing = true; - comps.stream - .grab(-1, 2) - .then((_result: GrabbedElement[]) => - finish(comps.session, done, new Error('Grab from invalid start worked')), - ) - .catch((err: Error) => { - logger.debug(`Expected error: ${err.message}`); - finish(comps.session, done); - }); - }); - }); - }); - - it(config.regular.list[7], function () { - return runners.withSession(config.regular, 7, async (logger, done, comps) => { - comps.events.SessionDestroyed.subscribe(() => { - finish(undefined, done); - }); - comps.session - .getNativeSession() - .triggerStateError() - .catch((err: Error) => { - finish( - comps.session, - done, - new Error(`Fail to trigger state error due error: ${error(err)}`), - ); - }); - }); - }); - - it(config.regular.list[8], function () { - return runners.withSession(config.regular, 8, async (logger, done, comps) => { - comps.events.SessionDestroyed.subscribe(() => { - finish(undefined, done); - }); - comps.session - .getNativeSession() - .triggerTrackerError() - .catch((err: Error) => { - finish( - comps.session, - done, - new Error(`Fail to trigger tracker error due error: ${error(err)}`), - ); - }); - }); - }); - - it(config.regular.list[9], function () { - return runners.withSession(config.regular, 9, async (logger, done, comps) => { - comps.session - .sleep(10000, true) - .then(() => { - finish(comps.session, done, new Error(`Sleeping task should not finish.`)); - }) - .catch((err: Error) => { - finish( - comps.session, - done, - new Error(`Fail to start sleeping task: ${err.message}`), - ); - }); - setTimeout(() => { - comps.session - .destroy() - .then(() => { - finish(undefined, done); - }) - .catch((err: Error) => { - finish( - comps.session, - done, - new Error(`Fail to destroy session: ${err.message}`), - ); - }); - }, 500); - }); - }); - - it(config.regular.list[10], function () { - return runners.withSession(config.regular, 10, async (logger, done, comps) => { - const tmpobj = createSampleFile( - 5000, - logger, - (i: number) => - `[${i}]:: ${ - i % 100 === 0 || i <= 5 ? `some match line data\n` : `some line data\n` - }`, - ); - comps.stream - .observe( - new Factory.File() - .asText() - .type(Factory.FileType.Text) - .file(tmpobj.name) - .get() - .sterilized(), - ) - .on('processing', () => { - comps.search - .search([ - { - filter: 'invalid search { condition', - flags: { reg: true, word: false, cases: false }, - }, - ]) - .then((_) => { - finish(comps.session, done, new Error(`Search should be failed`)); - }) - .catch((_err: Error) => { - finish(comps.session, done); - }); - }) - .catch(finish.bind(null, comps.session, done)); - }); - }); -}); diff --git a/application/apps/rustcore/ts-bindings/spec/session.exporting.spec.ts b/application/apps/rustcore/ts-bindings/spec/session.exporting.spec.ts deleted file mode 100644 index 2ef458d57d..0000000000 --- a/application/apps/rustcore/ts-bindings/spec/session.exporting.spec.ts +++ /dev/null @@ -1,1311 +0,0 @@ -// tslint:disable -// We need to provide path to TypeScript types definitions -/// -/// - -import { initLogger } from './logger'; -initLogger(); -import { Factory } from '../src/api/session'; -import { GrabbedElement } from 'platform/types/bindings'; -import { createSampleFile, finish, relativePath, rootPath } from './common'; -import { readConfigurationFile } from './config'; -import { fromIndexes } from 'platform/types/range'; -import { v4 } from 'uuid'; - -import * as os from 'os'; -import * as fs from 'fs'; -import * as path from 'path'; -import * as runners from './runners'; - -const config = readConfigurationFile().get().tests.exporting; - -describe('Exporting', function () { - it(config.regular.list[1], function () { - return runners.withSession(config.regular, 1, async (logger, done, comps) => { - let controlSum = 0; - const ranges = [ - { - start: 50, - end: 100, - }, - { - start: 200, - end: 300, - }, - ]; - const tmpobj = createSampleFile(1000, logger, (i: number) => { - ranges.forEach((r) => { - if (i >= r.start && i <= r.end) { - controlSum += i; - } - }); - return `____${i}____\n`; - }); - comps.stream - .observe( - new Factory.File() - .type(Factory.FileType.Text) - .asText() - .file(tmpobj.name) - .get() - .sterilized(), - ) - .catch(finish.bind(null, comps.session, done)); - let gotten: boolean = false; - comps.events.StreamUpdated.subscribe((rows: number) => { - if (rows < 500 || gotten) { - return; - } - gotten = true; - const output = path.resolve(os.tmpdir(), `${v4()}.logs`); - comps.stream - .export(output, ranges, { - columns: [], - spliter: undefined, - delimiter: undefined, - }) - .then(() => { - fs.promises - .readFile(output, { encoding: 'utf-8' }) - .then((content) => { - const rows = content - .split('\n') - .map((r) => parseInt(r.replace(/_/gi, ''), 10)); - const sum = rows.reduce((partialSum, a) => partialSum + a, 0); - expect(sum).toEqual(controlSum); - finish(comps.session, done); - }) - .catch((err: Error) => { - finish( - comps.session, - done, - new Error( - `Fail to read output file due error: ${ - err instanceof Error ? err.message : err - }`, - ), - ); - }) - .finally(() => { - fs.unlinkSync(output); - }); - }) - .catch((err: Error) => { - finish( - comps.session, - done, - new Error( - `Fail to export data due error: ${ - err instanceof Error ? err.message : err - }`, - ), - ); - }); - }); - }); - }); - - it(config.regular.list[2], function () { - return runners.withSession(config.regular, 2, async (logger, done, comps) => { - const ranges = [ - { - start: 50, - end: 90, - }, - { - start: 101, - end: 150, - }, - ]; - let controlSum = 0; - const tmpobj_a = createSampleFile(100, logger, (i: number) => { - if (i >= ranges[0].start && i <= ranges[0].end) { - controlSum += i; - } - return `____${i}____\n`; - }); - const tmpobj_b = createSampleFile(100, logger, (i: number) => { - if (i >= ranges[1].start - 100 && i <= ranges[1].end - 100) { - controlSum += i * 1000; - } - return `____${i * 1000}____\n`; - }); - comps.stream - .observe( - new Factory.Concat() - .type(Factory.FileType.Text) - .files([tmpobj_a.name, tmpobj_b.name]) - .asText() - .get() - .sterilized(), - ) - .catch(finish.bind(null, comps.session, done)); - let gotten: boolean = false; - comps.events.StreamUpdated.subscribe((rows: number) => { - if (rows < 199 || gotten) { - return; - } - gotten = true; - const output = path.resolve(os.tmpdir(), `${v4()}.logs`); - comps.stream - .export(output, ranges, { - columns: [], - spliter: undefined, - delimiter: undefined, - }) - .then(() => { - fs.promises - .readFile(output, { encoding: 'utf-8' }) - .then((content) => { - const rows = content - .split('\n') - .map((r) => parseInt(r.replace(/_/gi, ''), 10)); - const sum = rows.reduce((partialSum, a) => partialSum + a, 0); - expect(sum).toEqual(controlSum); - finish(comps.session, done); - }) - .catch((err: Error) => { - finish( - comps.session, - done, - new Error( - `Fail to read output file due error: ${ - err instanceof Error ? err.message : err - }`, - ), - ); - }) - .finally(() => { - fs.unlinkSync(output); - }); - }) - .catch((err: Error) => { - finish( - comps.session, - done, - new Error( - `Fail to export data due error: ${ - err instanceof Error ? err.message : err - }`, - ), - ); - }); - }); - }); - }); - - it(config.regular.list[3], function () { - return runners.withSession(config.regular, 3, async (logger, done, comps) => { - let controlSum = 0; - const range = { - from: 0, - to: 50, - }; - let countOfMatches = 0; - const tmpobj = createSampleFile(5000, logger, (i: number) => { - if (i % 100 === 0 || i <= 5) { - if (countOfMatches < range.to) { - controlSum += i; - } - countOfMatches += 1; - } - return `${i % 100 === 0 || i <= 5 ? `_____${i}_____\n` : `some line data\n`}`; - }); - comps.stream - .observe( - new Factory.File() - .type(Factory.FileType.Text) - .asText() - .file(tmpobj.name) - .get() - .sterilized(), - ) - .on('processing', () => { - comps.search - .search([ - { - filter: '__\\d+__', - flags: { reg: true, word: false, cases: false }, - }, - ]) - .then((_found) => { - const output = path.resolve(os.tmpdir(), `${v4()}.logs`); - comps.search - .grab(range.from, range.to) - .then((grabbed: GrabbedElement[]) => { - comps.stream - .export(output, fromIndexes(grabbed.map((el) => el.pos)), { - columns: [], - spliter: undefined, - delimiter: undefined, - }) - .then((_done) => { - fs.promises - .readFile(output, { encoding: 'utf-8' }) - .then((content) => { - const rows = content - .split('\n') - .map((r) => - parseInt(r.replace(/_/gi, ''), 10), - ); - expect(grabbed.length).toEqual(rows.length); - const sum = rows.reduce( - (partialSum, a) => partialSum + a, - 0, - ); - expect(sum).toEqual(controlSum); - finish(comps.session, done); - }) - .catch((err: Error) => { - finish( - comps.session, - done, - new Error( - `Fail to read output file due error: ${ - err instanceof Error - ? err.message - : err - }`, - ), - ); - }) - .finally(() => { - fs.unlinkSync(output); - }); - }) - .catch((err: Error) => { - finish( - comps.session, - done, - new Error( - `Fail to export data due error: ${ - err instanceof Error ? err.message : err - }`, - ), - ); - }); - }) - .catch((err: Error) => { - finish( - comps.session, - done, - new Error( - `Fail to grab data due error: ${ - err instanceof Error ? err.message : err - }`, - ), - ); - }); - }) - .catch(finish.bind(null, comps.session, done)); - }) - .catch(finish.bind(null, comps.session, done)); - }); - }); - - it(config.regular.list[4], function () { - return runners.withSession(config.regular, 4, async (logger, done, comps) => { - const filename = relativePath(config.regular.files['dlt'][0]); - comps.stream - .observe( - new Factory.File() - .type(Factory.FileType.Binary) - .asDlt({ - fibex_file_paths: [], - filter_config: undefined, - with_storage_header: true, - tz: undefined, - }) - .file(filename) - .get() - .sterilized(), - ) - .catch(finish.bind(null, comps.session, done)); - let gotten: boolean = false; - comps.events.StreamUpdated.subscribe((rows: number) => { - if (rows < 9 || gotten) { - return; - } - gotten = true; - comps.stream - .grab(0, 9) - .then((grabbed) => { - const output = path.resolve(os.tmpdir(), `${v4()}.logs`); - comps.stream - .export(output, [{ start: 0, end: 8 }], { - columns: [], - spliter: undefined, - delimiter: undefined, - }) - .then(() => { - fs.promises - .readFile(output, { encoding: 'utf-8' }) - .then((content) => { - const rows = content.split('\n'); - expect(rows.length).toEqual(grabbed.length); - for (let i = 0; i < rows.length; i += 1) { - expect(rows[i]).toEqual(grabbed[i].content); - if (rows[i] !== grabbed[i].content) { - return finish( - comps.session, - done, - new Error( - `Rows are dismatch. Stream position ${grabbed[i].pos}.`, - ), - ); - } - } - finish(comps.session, done); - }) - .catch((err: Error) => { - finish( - comps.session, - done, - new Error( - `Fail to read output file due error: ${ - err instanceof Error ? err.message : err - }`, - ), - ); - }) - .finally(() => { - fs.unlinkSync(output); - }); - }) - .catch((err: Error) => { - finish( - comps.session, - done, - new Error( - `Fail to export data due error: ${ - err instanceof Error ? err.message : err - }`, - ), - ); - }); - }) - .catch((err: Error) => { - finish( - undefined, - done, - new Error( - `Fail to grab due error: ${ - err instanceof Error ? err.message : err - }`, - ), - ); - }); - }); - }); - }); - - it(config.regular.list[5], function () { - return runners.withSession(config.regular, 5, async (logger, done, comps) => { - const filename = relativePath(config.regular.files['dlt'][0]); - comps.stream - .observe( - new Factory.File() - .type(Factory.FileType.Binary) - .asDlt({ - fibex_file_paths: [], - filter_config: undefined, - with_storage_header: true, - tz: undefined, - }) - .file(filename) - .get() - .sterilized(), - ) - .catch(finish.bind(null, comps.session, done)); - let gotten: boolean = false; - comps.events.StreamUpdated.subscribe((rows: number) => { - if (rows < 9 || gotten) { - return; - } - gotten = true; - comps.stream - .grab(0, 9) - .then((grabbed) => { - const output = path.resolve(os.tmpdir(), `${v4()}.dlt`); - comps.stream - .exportRaw(output, [{ start: 0, end: 8 }]) - .then(async () => { - comps.session - .destroy() - .then(async () => { - const { session, stream, search, events } = - await runners.initializeSession(config.regular.list[5]); - stream - .observe( - new Factory.File() - .type(Factory.FileType.Binary) - .asDlt({ - fibex_file_paths: [], - filter_config: undefined, - with_storage_header: true, - tz: undefined, - }) - .file(output) - .get() - .sterilized(), - ) - .catch(finish.bind(null, session, done)); - let gotten: boolean = false; - gotten = false; - events.StreamUpdated.subscribe((rows: number) => { - if (rows < 9 || gotten) { - return; - } - gotten = true; - stream - .grab(0, 9) - .then((rows) => { - expect(rows.length).toEqual(grabbed.length); - for (let i = 0; i < rows.length; i += 1) { - expect(rows[i].content).toEqual( - grabbed[i].content, - ); - if ( - rows[i].content !== grabbed[i].content - ) { - return finish( - session, - done, - new Error( - `Rows are dismatch. Stream position ${grabbed[i].pos}.`, - ), - ); - } - } - finish(session, done); - }) - .catch((err: Error) => { - finish( - session, - done, - new Error( - `Fail to grab due error: ${ - err instanceof Error - ? err.message - : err - }`, - ), - ); - }); - }); - }) - .catch((err: Error) => { - finish( - undefined, - done, - new Error( - `Fail to destroy session due error: ${ - err instanceof Error ? err.message : err - }`, - ), - ); - }); - }) - .catch((err: Error) => { - finish( - comps.session, - done, - new Error( - `Fail to export data due error: ${ - err instanceof Error ? err.message : err - }`, - ), - ); - }); - }) - .catch((err: Error) => { - finish( - undefined, - done, - new Error( - `Fail to grab due error: ${ - err instanceof Error ? err.message : err - }`, - ), - ); - }); - }); - }); - }); - - it(config.regular.list[6], function () { - return runners.withSession(config.regular, 6, async (logger, done, comps) => { - const filename_a = relativePath(config.regular.files['dlt'][0]); - const filename_b = relativePath(config.regular.files['dlt'][1]); - comps.stream - .observe( - new Factory.Concat() - .type(Factory.FileType.Binary) - .asDlt({ - fibex_file_paths: [], - filter_config: undefined, - with_storage_header: true, - tz: undefined, - }) - .files([filename_a, filename_b]) - .get() - .sterilized(), - ) - .catch(finish.bind(null, comps.session, done)); - let gotten: boolean = false; - comps.events.StreamUpdated.subscribe((rows: number) => { - if (rows < 15 || gotten) { - return; - } - gotten = true; - comps.stream - .grab(0, 15) - .then((grabbed) => { - expect(grabbed[8].source_id).toEqual(0); - expect(grabbed[10].source_id).toEqual(1); - const output = path.resolve(os.tmpdir(), `${v4()}.logs`); - comps.stream - .export(output, [{ start: 0, end: 14 }], { - columns: [], - spliter: undefined, - delimiter: undefined, - }) - .then(() => { - fs.promises - .readFile(output, { encoding: 'utf-8' }) - .then((content) => { - const rows = content.split('\n'); - expect(rows.length).toEqual(grabbed.length); - for (let i = 0; i < rows.length; i += 1) { - expect(rows[i]).toEqual(grabbed[i].content); - if (rows[i] !== grabbed[i].content) { - return finish( - comps.session, - done, - new Error( - `Rows are dismatch. Stream position ${grabbed[i].pos}.`, - ), - ); - } - } - finish(comps.session, done); - }) - .catch((err: Error) => { - finish( - comps.session, - done, - new Error( - `Fail to read output file due error: ${ - err instanceof Error ? err.message : err - }`, - ), - ); - }) - .finally(() => { - fs.unlinkSync(output); - }); - }) - .catch((err: Error) => { - finish( - comps.session, - done, - new Error( - `Fail to export data due error: ${ - err instanceof Error ? err.message : err - }`, - ), - ); - }); - }) - .catch((err: Error) => { - finish( - undefined, - done, - new Error( - `Fail to grab due error: ${ - err instanceof Error ? err.message : err - }`, - ), - ); - }); - }); - }); - }); - - it(config.regular.list[7], function () { - return runners.withSession(config.regular, 7, async (logger, done, comps) => { - const filename_a = relativePath(config.regular.files['dlt'][0]); - const filename_b = relativePath(config.regular.files['dlt'][1]); - comps.stream - .observe( - new Factory.Concat() - .type(Factory.FileType.Binary) - .asDlt({ - fibex_file_paths: [], - filter_config: undefined, - with_storage_header: true, - tz: undefined, - }) - .files([filename_a, filename_b]) - .get() - .sterilized(), - ) - .catch(finish.bind(null, comps.session, done)); - let gotten: boolean = false; - comps.events.StreamUpdated.subscribe((rows: number) => { - if (rows < 15 || gotten) { - return; - } - gotten = true; - comps.stream - .grab(0, 15) - .then((grabbed) => { - expect(grabbed[8].source_id).toEqual(0); - expect(grabbed[10].source_id).toEqual(1); - const output = path.resolve(os.tmpdir(), `${v4()}.logs`); - comps.stream - .exportRaw(output, [{ start: 0, end: 14 }]) - .then(() => { - comps.session - .destroy() - .then(async () => { - const { session, stream, search, events } = - await runners.initializeSession(config.regular.list[7]); - if (stream instanceof Error) { - finish(session, done, stream); - return; - } - stream - .observe( - new Factory.File() - .type(Factory.FileType.Binary) - .asDlt({ - fibex_file_paths: [], - filter_config: undefined, - with_storage_header: true, - tz: undefined, - }) - .file(output) - .get() - .sterilized(), - ) - .catch(finish.bind(null, session, done)); - if (events instanceof Error) { - finish(session, done, events); - return; - } - gotten = false; - events.StreamUpdated.subscribe((rows: number) => { - if (rows < 15 || gotten) { - return; - } - gotten = true; - stream - .grab(0, 15) - .then((rows) => { - expect(rows.length).toEqual(grabbed.length); - for (let i = 0; i < rows.length; i += 1) { - expect(rows[i].content).toEqual( - grabbed[i].content, - ); - if ( - rows[i].content !== grabbed[i].content - ) { - return finish( - session, - done, - new Error( - `Rows are dismatch. Stream position ${grabbed[i].pos}.`, - ), - ); - } - } - finish(session, done); - }) - .catch((err: Error) => { - finish( - session, - done, - new Error( - `Fail to grab due error: ${ - err instanceof Error - ? err.message - : err - }`, - ), - ); - }); - }); - }) - .catch((err: Error) => { - finish( - undefined, - done, - new Error( - `Fail to destroy session due error: ${ - err instanceof Error ? err.message : err - }`, - ), - ); - }); - }) - .catch((err: Error) => { - finish( - comps.session, - done, - new Error( - `Fail to export data due error: ${ - err instanceof Error ? err.message : err - }`, - ), - ); - }); - }) - .catch((err: Error) => { - finish( - undefined, - done, - new Error( - `Fail to grab due error: ${ - err instanceof Error ? err.message : err - }`, - ), - ); - }); - }); - }); - }); - - it(config.regular.list[8], function () { - return runners.withSession(config.regular, 8, async (logger, done, comps) => { - const filename_a = relativePath(config.regular.files['dlt'][0]); - const filename_b = relativePath(config.regular.files['dlt'][1]); - comps.stream - .observe( - new Factory.Concat() - .type(Factory.FileType.Binary) - .asDlt({ - fibex_file_paths: [], - filter_config: undefined, - with_storage_header: true, - tz: undefined, - }) - .files([filename_a, filename_b]) - .get() - .sterilized(), - ) - .catch(finish.bind(null, comps.session, done)); - let gotten: boolean = false; - comps.events.StreamUpdated.subscribe((rows: number) => { - if (rows < 15 || gotten) { - return; - } - const ranges = [ - { - start: 0, - end: 5, - }, - { - start: 9, - end: 14, - }, - ]; - gotten = true; - Promise.all(ranges.map((r) => comps.stream.grab(r.start, r.end - r.start))) - .then((results) => { - let grabbed: GrabbedElement[] = []; - results.forEach((g) => (grabbed = grabbed.concat(g))); - grabbed.sort((a, b) => (a.pos > b.pos ? 1 : -1)); - const output = path.resolve(os.tmpdir(), `${v4()}.logs`); - comps.stream - .exportRaw( - output, - ranges.map((r) => { - return { start: r.start, end: r.end - 1 }; - }), - ) - .then(() => { - comps.session - .destroy() - .then(async () => { - const { session, stream, search, events } = - await runners.initializeSession(config.regular.list[8]); - stream - .observe( - new Factory.File() - .type(Factory.FileType.Binary) - .asDlt({ - fibex_file_paths: [], - filter_config: undefined, - with_storage_header: true, - tz: undefined, - }) - .file(output) - .get() - .sterilized(), - ) - .catch(finish.bind(null, session, done)); - gotten = false; - events.StreamUpdated.subscribe((rows: number) => { - if (rows < 5 || gotten) { - return; - } - gotten = true; - stream - .grab(0, 10) - .then((rows) => { - expect(rows.length).toEqual(grabbed.length); - for (let i = 0; i < rows.length; i += 1) { - expect(rows[i].content).toEqual( - grabbed[i].content, - ); - if ( - rows[i].content !== grabbed[i].content - ) { - return finish( - session, - done, - new Error( - `Rows are dismatch. Stream position ${grabbed[i].pos}.`, - ), - ); - } - } - finish(session, done); - }) - .catch((err: Error) => { - finish( - session, - done, - new Error( - `Fail to grab due error: ${ - err instanceof Error - ? err.message - : err - }`, - ), - ); - }); - }); - }) - .catch((err: Error) => { - finish( - undefined, - done, - new Error( - `Fail to destroy session due error: ${ - err instanceof Error ? err.message : err - }`, - ), - ); - }); - }) - .catch((err: Error) => { - finish( - comps.session, - done, - new Error( - `Fail to export data due error: ${ - err instanceof Error ? err.message : err - }`, - ), - ); - }); - }) - .catch((err: Error) => { - finish( - undefined, - done, - new Error( - `Fail to grab due error: ${ - err instanceof Error ? err.message : err - }`, - ), - ); - }); - }); - }); - }); - - it(config.regular.list[9], function () { - return runners.withSession(config.regular, 9, async (logger, done, comps) => { - const filename = relativePath(config.regular.files['dlt'][0]); - comps.stream - .observe( - new Factory.File() - .type(Factory.FileType.Binary) - .asDlt({ - fibex_file_paths: [], - filter_config: undefined, - with_storage_header: true, - tz: undefined, - }) - .file(filename) - .get() - .sterilized(), - ) - .catch(finish.bind(null, comps.session, done)); - let gotten: boolean = false; - comps.events.StreamUpdated.subscribe((rows: number) => { - if (rows < 9 || gotten) { - return; - } - gotten = true; - comps.stream - .grab(0, 9) - .then((grabbed) => { - const output = path.resolve(os.tmpdir(), `${v4()}.txt`); - comps.stream - .export(output, [{ start: 0, end: 8 }], { - columns: [0, 1], - spliter: '\u0004', - delimiter: ';', - }) - .then(async () => { - fs.promises - .readFile(output, { encoding: 'utf-8' }) - .then((content) => { - const rows = content.split('\n'); - expect(rows.length).toEqual(grabbed.length); - for (let i = 0; i < rows.length; i += 1) { - const columns = rows[i].split(';'); - const origin = grabbed[i].content.split('\u0004'); - expect(columns.length).toEqual(2); - for (let n = 0; n < columns.length; n += 1) { - expect(columns[n]).toEqual(origin[n]); - expect(columns[n].length > 0).toBe(true); - } - } - finish(comps.session, done); - }) - .catch((err: Error) => { - finish( - comps.session, - done, - new Error( - `Fail to read output file due error: ${ - err instanceof Error ? err.message : err - }`, - ), - ); - }) - .finally(() => { - fs.unlinkSync(output); - }); - }) - .catch((err: Error) => { - finish( - comps.session, - done, - new Error( - `Fail to export data due error: ${ - err instanceof Error ? err.message : err - }`, - ), - ); - }); - }) - .catch((err: Error) => { - finish( - undefined, - done, - new Error( - `Fail to grab due error: ${ - err instanceof Error ? err.message : err - }`, - ), - ); - }); - }); - }); - }); - - it(config.regular.list[10], function () { - return runners.withSession(config.regular, 10, async (logger, done, comps) => { - const filename = relativePath(config.regular.files['dlt'][0]); - comps.stream - .observe( - new Factory.File() - .type(Factory.FileType.Binary) - .asDlt({ - fibex_file_paths: [], - filter_config: undefined, - with_storage_header: true, - tz: undefined, - }) - .file(filename) - .get() - .sterilized(), - ) - .catch(finish.bind(null, comps.session, done)); - let gotten: boolean = false; - comps.events.StreamUpdated.subscribe((rows: number) => { - if (rows < 9 || gotten) { - return; - } - gotten = true; - comps.stream - .grab(0, 9) - .then((grabbed) => { - const output = path.resolve(os.tmpdir(), `${v4()}.txt`); - comps.stream - .export(output, [{ start: 0, end: 8 }], { - columns: [9, 10], - spliter: '\u0004', - delimiter: ';', - }) - .then(async () => { - fs.promises - .readFile(output, { encoding: 'utf-8' }) - .then((content) => { - const rows = content.split('\n'); - expect(rows.length).toEqual(grabbed.length); - for (let i = 0; i < rows.length; i += 1) { - const columns = rows[i].split(';'); - const origin = grabbed[i].content.split('\u0004'); - expect(columns.length).toEqual(2); - for (let n = 0; n < columns.length; n += 1) { - expect(columns[n]).toEqual(origin[9 + n]); - expect(columns[n].length > 0).toBe(true); - } - } - finish(comps.session, done); - }) - .catch((err: Error) => { - finish( - comps.session, - done, - new Error( - `Fail to read output file due error: ${ - err instanceof Error ? err.message : err - }`, - ), - ); - }) - .finally(() => { - fs.unlinkSync(output); - }); - }) - .catch((err: Error) => { - finish( - comps.session, - done, - new Error( - `Fail to export data due error: ${ - err instanceof Error ? err.message : err - }`, - ), - ); - }); - }) - .catch((err: Error) => { - finish( - undefined, - done, - new Error( - `Fail to grab due error: ${ - err instanceof Error ? err.message : err - }`, - ), - ); - }); - }); - }); - }); - it(config.regular.list[11], function () { - return runners.withSession(config.regular, 11, async (logger, done, comps) => { - const filename = relativePath(config.regular.files['dlt'][0]); - comps.stream - .observe( - new Factory.File() - .type(Factory.FileType.Binary) - .asDlt({ - fibex_file_paths: [], - filter_config: undefined, - with_storage_header: true, - tz: undefined, - }) - .file(filename) - .get() - .sterilized(), - ) - .catch(finish.bind(null, comps.session, done)); - let gotten: boolean = false; - comps.events.StreamUpdated.subscribe((rows: number) => { - if (rows < 9 || gotten) { - return; - } - gotten = true; - comps.stream - .grab(0, 9) - .then((grabbed) => { - const output = path.resolve(os.tmpdir(), `${v4()}.txt`); - comps.stream - .export(output, [{ start: 0, end: 8 }], { - columns: [10], - spliter: '\u0004', - delimiter: ';', - }) - .then(async () => { - fs.promises - .readFile(output, { encoding: 'utf-8' }) - .then((content) => { - const rows = content.split('\n'); - expect(rows.length).toEqual(grabbed.length); - for (let i = 0; i < rows.length; i += 1) { - const columns = rows[i].split(';'); - const origin = grabbed[i].content.split('\u0004'); - expect(columns.length).toEqual(1); - for (let n = 0; n < columns.length; n += 1) { - expect(columns[n]).toEqual(origin[10 + n]); - expect(columns[n].length > 0).toBe(true); - } - } - finish(comps.session, done); - }) - .catch((err: Error) => { - finish( - comps.session, - done, - new Error( - `Fail to read output file due error: ${ - err instanceof Error ? err.message : err - }`, - ), - ); - }) - .finally(() => { - fs.unlinkSync(output); - }); - }) - .catch((err: Error) => { - finish( - comps.session, - done, - new Error( - `Fail to export data due error: ${ - err instanceof Error ? err.message : err - }`, - ), - ); - }); - }) - .catch((err: Error) => { - finish( - undefined, - done, - new Error( - `Fail to grab due error: ${ - err instanceof Error ? err.message : err - }`, - ), - ); - }); - }); - }); - }); - - it(config.regular.list[12], function () { - return runners.withSession(config.regular, 12, async (logger, done, comps) => { - const filename = relativePath(config.regular.files['dlt'][0]); - comps.stream - .observe( - new Factory.File() - .type(Factory.FileType.Binary) - .asDlt({ - fibex_file_paths: [], - filter_config: undefined, - with_storage_header: true, - tz: undefined, - }) - .file(filename) - .get() - .sterilized(), - ) - .catch(finish.bind(null, comps.session, done)); - let gotten: boolean = false; - comps.events.StreamUpdated.subscribe((rows: number) => { - if (rows < 9 || gotten) { - return; - } - gotten = true; - const cases = [ - { - output: path.resolve(os.tmpdir(), `${v4()}.txt`), - options: { - columns: [], - spliter: '\u0004', - delimiter: ';', - }, - }, - { - output: path.resolve(os.tmpdir(), `${v4()}.txt`), - options: { - columns: [0, 1, 2], - spliter: undefined, - delimiter: ';', - }, - }, - { - output: path.resolve(os.tmpdir(), `${v4()}.txt`), - options: { - columns: [0, 1, 2], - spliter: '\u0004', - delimiter: undefined, - }, - }, - { - output: path.resolve(os.tmpdir(), `${v4()}.txt`), - options: { - columns: [0, 1, 2], - spliter: undefined, - delimiter: undefined, - }, - }, - { - output: path.resolve(os.tmpdir(), `${v4()}.txt`), - options: { - columns: [0, 0, 0, 0, 0, 1, 2, 3, 4, 1000000], - spliter: '\u0004', - delimiter: ';', - }, - }, - ]; - Promise.allSettled( - cases.map((usecase) => { - const output = usecase.output; - return comps.stream - .export(output, [{ start: 0, end: 8 }], usecase.options) - .then(async () => { - fs.promises - .readFile(output, { encoding: 'utf-8' }) - .then((content) => { - expect(content.length > 0).toBe(true); - }) - .catch((err: Error) => { - finish( - comps.session, - done, - new Error( - `Fail to read output file due error: ${ - err instanceof Error ? err.message : err - }`, - ), - ); - }) - .finally(() => { - fs.unlinkSync(output); - }); - }); - }), - ) - .then(() => { - finish(comps.session, done); - }) - .catch((err) => { - finish(comps.session, done, err); - }); - }); - }); - }); -}); diff --git a/application/apps/rustcore/ts-bindings/spec/session.extract.spec.ts b/application/apps/rustcore/ts-bindings/spec/session.extract.spec.ts deleted file mode 100644 index c134bce840..0000000000 --- a/application/apps/rustcore/ts-bindings/spec/session.extract.spec.ts +++ /dev/null @@ -1,148 +0,0 @@ -// tslint:disable -// We need to provide path to TypeScript types definitions -/// -/// - -import { initLogger } from './logger'; -initLogger(); -import { Factory } from '../src/api/session'; -import { createSampleFile, finish } from './common'; -import { readConfigurationFile } from './config'; - -import * as runners from './runners'; - -const config = readConfigurationFile().get().tests.extract; - -describe('Extracting', function () { - it(config.regular.list[1], function () { - return runners.withSession(config.regular, 1, async (logger, done, comps) => { - let controlSum = 0; - const tmpobj = createSampleFile(5000, logger, (i: number) => { - const value = i % 100 === 0 || i <= 5 ? i : -1; - controlSum += value !== -1 ? value : 0; - return `[${i}]:: ${ - value !== -1 ? `some CPU=${value}% line data\n` : `some line data\n` - }`; - }); - - comps.stream - .observe( - new Factory.File() - .asText() - .type(Factory.FileType.Text) - .file(tmpobj.name) - .get() - .sterilized(), - ) - .on('processing', () => { - const filter = 'cpu=(\\d{1,})'; - comps.search - .extract([ - { - filter, - flags: { reg: true, word: false, cases: false }, - }, - ]) - .then((results) => { - expect(results.length).toEqual(55); - for (let pos = 0; pos <= 5; pos += 1) { - expect(results[pos].position).toEqual(pos); - } - for (let pos = 1; pos <= 49; pos += 1) { - expect(results[pos + 5].position).toEqual(pos * 100); - } - let calculated = 0; - results.forEach((res) => { - expect(res.values.length).toEqual(1); - expect(res.values[0].filter.filter).toEqual(filter); - calculated += parseInt(res.values[0].values[0], 10); - }); - expect(calculated).toEqual(controlSum); - comps.search - .len() - .then((len: number) => { - expect(len).toEqual(0); - finish(comps.session, done); - }) - .catch((err: Error) => { - finish(comps.session, done, err); - }); - }) - .catch(finish.bind(null, comps.session, done)); - }) - .catch(finish.bind(null, comps.session, done)); - }); - }); - - it(config.regular.list[2], function () { - return runners.withSession(config.regular, 2, async (logger, done, comps) => { - let controlSumA = 0; - let controlSumB = 0; - const tmpobj = createSampleFile(5000, logger, (i: number) => { - const a = i % 100 === 0 || i <= 5 ? i : -1; - controlSumA += a !== -1 ? a : 0; - const b = a === -1 && i % 20 === 0 ? i : -1; - controlSumB += b !== -1 ? b : 0; - return `[${i}]:: ${ - a !== -1 - ? `some CPU=${a}% line data\n` - : b === -1 - ? `some line data\n` - : `some TEMP=${b}C line data\n` - }`; - }); - comps.stream - .observe( - new Factory.File() - .asText() - .type(Factory.FileType.Text) - .file(tmpobj.name) - .get() - .sterilized(), - ) - .on('processing', () => { - const filterA = 'cpu=(\\d{1,})'; - const filterB = 'temp=(\\d{1,})'; - comps.search - .extract([ - { - filter: filterA, - flags: { reg: true, word: false, cases: false }, - }, - { - filter: filterB, - flags: { reg: true, word: false, cases: false }, - }, - ]) - .then((results) => { - let calculatedA = 0; - let calculatedB = 0; - results.forEach((res) => { - res.values.forEach((match) => { - expect(match.values.length).toEqual(1); - if (match.filter.filter === filterA) { - calculatedA += parseInt(match.values[0], 10); - } - if (match.filter.filter === filterB) { - calculatedB += parseInt(match.values[0], 10); - } - }); - }); - expect(calculatedA).toEqual(controlSumA); - expect(calculatedB).toEqual(controlSumB); - comps.search - .len() - .then((len: number) => { - expect(len).toEqual(0); - finish(comps.session, done); - }) - .catch((err: Error) => { - finish(comps.session, done, err); - }); - }) - .catch(finish.bind(null, comps.session, done)); - }) - .catch(finish.bind(null, comps.session, done)); - }); - }); -}); diff --git a/application/apps/rustcore/ts-bindings/spec/session.indexes.spec.ts b/application/apps/rustcore/ts-bindings/spec/session.indexes.spec.ts deleted file mode 100644 index 1d2d26b63b..0000000000 --- a/application/apps/rustcore/ts-bindings/spec/session.indexes.spec.ts +++ /dev/null @@ -1,259 +0,0 @@ -// tslint:disable -// We need to provide path to TypeScript types definitions -/// -/// - -import { initLogger } from './logger'; -initLogger(); -import { Factory } from '../src/api/session'; -import { createSampleFile, finish } from './common'; -import { readConfigurationFile } from './config'; -import { Nature, IndexingMode, NatureTypes } from 'platform/types/content'; - -import * as runners from './runners'; - -const config = readConfigurationFile().get().tests.indexes; - -describe('Indexes', function () { - it(config.regular.list[1], function () { - return runners.withSession(config.regular, 1, async (logger, done, comps) => { - (async () => { - let controlSum = 0; - let countMatches = 0; - const tmpobj = createSampleFile(50, logger, (i: number) => { - controlSum += i % 10 == 0 ? i : 0; - countMatches += i % 10 == 0 ? 1 : 0; - return `${i}: some line data: ${i % 10 == 0 ? `match A` : ''}\n`; - }); - let read: boolean = false; - comps.stream - .observe( - new Factory.File() - .asText() - .type(Factory.FileType.Text) - .file(tmpobj.name) - .get() - .sterilized(), - ) - .catch(finish.bind(null, comps.session, done)); - const updates: number[] = []; - comps.events.IndexedMapUpdated.subscribe((event) => { - event.len > 0 && updates.push(event.len); - }); - comps.events.StreamUpdated.subscribe(async (rows: number) => { - if (rows < 50 || read) { - return; - } - read = true; - try { - await comps.search.search([ - { - filter: 'match A', - flags: { reg: true, word: true, cases: false }, - }, - ]); - let items = await comps.stream.grabIndexed(0, countMatches); - expect(items.length).toEqual(countMatches); - expect( - items - .map((item) => - parseInt( - (item.content.match(/\d*/) as unknown as string)[0], - 10, - ), - ) - .reduce((partialSum, a) => partialSum + a, 0), - ).toEqual(controlSum); - expect(items.map((i) => [i.pos, new Nature(i.nature).getTypes()])).toEqual([ - [0, [NatureTypes.Search]], - [10, [NatureTypes.Search]], - [20, [NatureTypes.Search]], - [30, [NatureTypes.Search]], - [40, [NatureTypes.Search]], - ]); - await comps.stream.setIndexingMode(IndexingMode.Breadcrumbs); - let len = await comps.stream.getIndexedLen(); - expect(len).toEqual(30); - items = await comps.stream.grabIndexed(0, len); - expect(items.length).toEqual(len); - expect(items.map((i) => [i.pos, new Nature(i.nature).getTypes()])).toEqual([ - [0, [NatureTypes.Search]], - [1, [NatureTypes.Breadcrumb]], - [2, [NatureTypes.Breadcrumb]], - [5, [NatureTypes.BreadcrumbSeporator]], - [8, [NatureTypes.Breadcrumb]], - [9, [NatureTypes.Breadcrumb]], - [10, [NatureTypes.Search]], - [11, [NatureTypes.Breadcrumb]], - [12, [NatureTypes.Breadcrumb]], - [15, [NatureTypes.BreadcrumbSeporator]], - [18, [NatureTypes.Breadcrumb]], - [19, [NatureTypes.Breadcrumb]], - [20, [NatureTypes.Search]], - [21, [NatureTypes.Breadcrumb]], - [22, [NatureTypes.Breadcrumb]], - [25, [NatureTypes.BreadcrumbSeporator]], - [28, [NatureTypes.Breadcrumb]], - [29, [NatureTypes.Breadcrumb]], - [30, [NatureTypes.Search]], - [31, [NatureTypes.Breadcrumb]], - [32, [NatureTypes.Breadcrumb]], - [35, [NatureTypes.BreadcrumbSeporator]], - [38, [NatureTypes.Breadcrumb]], - [39, [NatureTypes.Breadcrumb]], - [40, [NatureTypes.Search]], - [41, [NatureTypes.Breadcrumb]], - [42, [NatureTypes.Breadcrumb]], - [45, [NatureTypes.BreadcrumbSeporator]], - [48, [NatureTypes.Breadcrumb]], - [49, [NatureTypes.Breadcrumb]], - ]); - await comps.stream.expandBreadcrumbs(45, 2, false); - len = await comps.stream.getIndexedLen(); - expect(len).toEqual(32); - items = await comps.stream.grabIndexed(0, len); - expect(items.length).toEqual(len); - expect(items.map((i) => [i.pos, new Nature(i.nature).getTypes()])).toEqual([ - [0, [NatureTypes.Search]], - [1, [NatureTypes.Breadcrumb]], - [2, [NatureTypes.Breadcrumb]], - [5, [NatureTypes.BreadcrumbSeporator]], - [8, [NatureTypes.Breadcrumb]], - [9, [NatureTypes.Breadcrumb]], - [10, [NatureTypes.Search]], - [11, [NatureTypes.Breadcrumb]], - [12, [NatureTypes.Breadcrumb]], - [15, [NatureTypes.BreadcrumbSeporator]], - [18, [NatureTypes.Breadcrumb]], - [19, [NatureTypes.Breadcrumb]], - [20, [NatureTypes.Search]], - [21, [NatureTypes.Breadcrumb]], - [22, [NatureTypes.Breadcrumb]], - [25, [NatureTypes.BreadcrumbSeporator]], - [28, [NatureTypes.Breadcrumb]], - [29, [NatureTypes.Breadcrumb]], - [30, [NatureTypes.Search]], - [31, [NatureTypes.Breadcrumb]], - [32, [NatureTypes.Breadcrumb]], - [35, [NatureTypes.BreadcrumbSeporator]], - [38, [NatureTypes.Breadcrumb]], - [39, [NatureTypes.Breadcrumb]], - [40, [NatureTypes.Search]], - [41, [NatureTypes.Breadcrumb]], - [42, [NatureTypes.Breadcrumb]], - [44, [NatureTypes.BreadcrumbSeporator]], - [46, [NatureTypes.Breadcrumb]], - [47, [NatureTypes.Breadcrumb]], - [48, [NatureTypes.Breadcrumb]], - [49, [NatureTypes.Breadcrumb]], - ]); - await comps.stream.expandBreadcrumbs(44, 2, true); - len = await comps.stream.getIndexedLen(); - expect(len).toEqual(34); - items = await comps.stream.grabIndexed(0, len); - expect(items.length).toEqual(len); - expect(items.map((i) => [i.pos, new Nature(i.nature).getTypes()])).toEqual([ - [0, [NatureTypes.Search]], - [1, [NatureTypes.Breadcrumb]], - [2, [NatureTypes.Breadcrumb]], - [5, [NatureTypes.BreadcrumbSeporator]], - [8, [NatureTypes.Breadcrumb]], - [9, [NatureTypes.Breadcrumb]], - [10, [NatureTypes.Search]], - [11, [NatureTypes.Breadcrumb]], - [12, [NatureTypes.Breadcrumb]], - [15, [NatureTypes.BreadcrumbSeporator]], - [18, [NatureTypes.Breadcrumb]], - [19, [NatureTypes.Breadcrumb]], - [20, [NatureTypes.Search]], - [21, [NatureTypes.Breadcrumb]], - [22, [NatureTypes.Breadcrumb]], - [25, [NatureTypes.BreadcrumbSeporator]], - [28, [NatureTypes.Breadcrumb]], - [29, [NatureTypes.Breadcrumb]], - [30, [NatureTypes.Search]], - [31, [NatureTypes.Breadcrumb]], - [32, [NatureTypes.Breadcrumb]], - [35, [NatureTypes.BreadcrumbSeporator]], - [38, [NatureTypes.Breadcrumb]], - [39, [NatureTypes.Breadcrumb]], - [40, [NatureTypes.Search]], - [41, [NatureTypes.Breadcrumb]], - [42, [NatureTypes.Breadcrumb]], - [43, [NatureTypes.Breadcrumb]], - [44, [NatureTypes.Breadcrumb]], - [45, [NatureTypes.BreadcrumbSeporator]], - [46, [NatureTypes.Breadcrumb]], - [47, [NatureTypes.Breadcrumb]], - [48, [NatureTypes.Breadcrumb]], - [49, [NatureTypes.Breadcrumb]], - ]); - await comps.stream.expandBreadcrumbs(45, 1, true); - len = await comps.stream.getIndexedLen(); - expect(len).toEqual(34); - items = await comps.stream.grabIndexed(0, len); - expect(items.length).toEqual(len); - expect(items.map((i) => [i.pos, new Nature(i.nature).getTypes()])).toEqual([ - [0, [NatureTypes.Search]], - [1, [NatureTypes.Breadcrumb]], - [2, [NatureTypes.Breadcrumb]], - [5, [NatureTypes.BreadcrumbSeporator]], - [8, [NatureTypes.Breadcrumb]], - [9, [NatureTypes.Breadcrumb]], - [10, [NatureTypes.Search]], - [11, [NatureTypes.Breadcrumb]], - [12, [NatureTypes.Breadcrumb]], - [15, [NatureTypes.BreadcrumbSeporator]], - [18, [NatureTypes.Breadcrumb]], - [19, [NatureTypes.Breadcrumb]], - [20, [NatureTypes.Search]], - [21, [NatureTypes.Breadcrumb]], - [22, [NatureTypes.Breadcrumb]], - [25, [NatureTypes.BreadcrumbSeporator]], - [28, [NatureTypes.Breadcrumb]], - [29, [NatureTypes.Breadcrumb]], - [30, [NatureTypes.Search]], - [31, [NatureTypes.Breadcrumb]], - [32, [NatureTypes.Breadcrumb]], - [35, [NatureTypes.BreadcrumbSeporator]], - [38, [NatureTypes.Breadcrumb]], - [39, [NatureTypes.Breadcrumb]], - [40, [NatureTypes.Search]], - [41, [NatureTypes.Breadcrumb]], - [42, [NatureTypes.Breadcrumb]], - [43, [NatureTypes.Breadcrumb]], - [44, [NatureTypes.Breadcrumb]], - [45, [NatureTypes.Breadcrumb]], - [46, [NatureTypes.Breadcrumb]], - [47, [NatureTypes.Breadcrumb]], - [48, [NatureTypes.Breadcrumb]], - [49, [NatureTypes.Breadcrumb]], - ]); - finish(comps.session, done); - } catch (err) { - finish( - undefined, - done, - new Error( - `Fail to finish test due error: ${ - err instanceof Error ? err.message : err - }`, - ), - ); - } - }); - return Promise.resolve(); - })().catch((err: Error) => { - finish( - undefined, - done, - new Error( - `Fail to finish test due error: ${ - err instanceof Error ? err.message : err - }`, - ), - ); - }); - }); - }); -}); diff --git a/application/apps/rustcore/ts-bindings/spec/session.jobs.spec.ts b/application/apps/rustcore/ts-bindings/spec/session.jobs.spec.ts deleted file mode 100644 index 008e0b08d6..0000000000 --- a/application/apps/rustcore/ts-bindings/spec/session.jobs.spec.ts +++ /dev/null @@ -1,270 +0,0 @@ -// tslint:disable -// We need to provide path to TypeScript types definitions -/// -/// - -import { initLogger } from './logger'; -initLogger(); -import { Jobs, Tracker } from '../src/index'; -import { readConfigurationFile } from './config'; -import { finish } from './common'; - -import * as runners from './runners'; -import * as os from 'os'; - -const config = readConfigurationFile().get().tests.jobs; - -describe('Jobs', function () { - it(config.regular.list[1], function () { - return runners.unbound(config.regular, 1, async (logger, done, collector) => { - const jobs = collector(await Jobs.create()) as Jobs; - const tracker = collector(await Tracker.create()) as Tracker; - const operations: Map = new Map(); - tracker.provider.getEvents().Started.subscribe((event) => { - operations.set(event.uuid, true); - }); - tracker.provider.getEvents().Stopped.subscribe((uuid) => { - operations.set(uuid, false); - }); - jobs.cancelTest(50, 50) - .then((a) => { - // Job is resolved, but not cancelled - expect(a).toBe(100); - // Try to cancel job - const job = jobs - .cancelTest(50, 50) - .then((_res) => { - expect(operations.size).toBe(2); - expect( - Array.from(operations.values()).filter( - (running) => running === false, - ).length, - ).toBe(0); - finish( - [jobs, tracker], - done, - new Error(`This job should be cancelled, but not done`), - ); - }) - .canceled(async () => { - finish([jobs, tracker], done); - }) - .catch((err: Error) => { - finish([jobs, tracker], done, err); - }); - job.abort(); - }) - .catch((err: Error) => { - finish([jobs, tracker], done, err); - }); - }); - }); - - it(config.regular.list[2], function () { - return runners.unbound(config.regular, 2, async (logger, done, collector) => { - const jobs = collector(await Jobs.create()) as Jobs; - // Run 2 jobs with same sequence. One of jobs should be failed, because of sequence - Promise.allSettled([ - jobs.cancelTest(50, 50, 0).asPromise(), - jobs.cancelTest(50, 50, 0).asPromise(), - ]) - .then((res) => { - if ( - (res[0].status === 'rejected' && res[1].status === 'rejected') || - (res[0].status !== 'rejected' && res[1].status !== 'rejected') - ) { - finish(jobs, done, new Error(`Only one task should be rejected`)); - } - expect( - res[0].status !== 'rejected' - ? res[0].value - : res[1].status !== 'rejected' - ? res[1].value - : undefined, - ).toBe(100); - finish(jobs, done); - }) - .catch((err: Error) => { - finish(jobs, done, err); - }); - }); - }); - - it(config.regular.list[3], function () { - return runners.unbound(config.regular, 3, async (logger, done, collector) => { - const jobs = collector(await Jobs.create()) as Jobs; - const path = os.homedir(); - jobs.listContent({ - depth: 1, - max: 100, - paths: [path], - include: { files: true, folders: true }, - }) - .then((ls) => { - expect(ls.list instanceof Array).toEqual(true); - const job = jobs - .listContent({ - depth: 10, - max: 100, - paths: [path], - include: { files: true, folders: true }, - }) - .then((_res) => { - finish( - jobs, - done, - new Error(`This job should be cancelled, but not done`), - ); - }) - .canceled(async () => { - finish(jobs, done); - }) - .catch((err: Error) => { - finish(jobs, done, err); - }); - job.abort(); - }) - .catch((err: Error) => { - finish(jobs, done, err); - }); - }); - }); - - it(config.regular.list[4], function () { - return runners.unbound(config.regular, 4, async (logger, done, collector) => { - const jobs = collector(await Jobs.create()) as Jobs; - const profiles = await jobs.getShellProfiles(); - expect(profiles.length > 0).toBe(true); - finish(jobs, done); - }); - }); - - it(config.regular.list[5], function () { - return runners.unbound(config.regular, 6, async (logger, done, collector) => { - const jobs = collector(await Jobs.create()) as Jobs; - const path = config.regular.files['someip-pcapng']; - // test single source - jobs.getSomeipStatistic([path]) - .then((statistic) => { - expect(statistic.services.length).toEqual(2); - { - let service = statistic.services[0]; - expect(service.item.id).toEqual(123); - expect(service.item.num).toEqual(22); - expect(service.details.length).toEqual(1); - expect(service.details[0].id).toEqual(32773); - expect(service.details[0].num).toEqual(22); - } - { - let service = statistic.services[1]; - expect(service.item.id).toEqual(65535); - expect(service.item.num).toEqual(33); - expect(service.details.length).toEqual(1); - expect(service.details[0].id).toEqual(33024); - expect(service.details[0].num).toEqual(33); - } - expect(statistic.messages.length).toEqual(1); - { - let message = statistic.messages[0]; - expect(message.item.id).toEqual(2); - expect(message.item.num).toEqual(55); - expect(message.details.length).toEqual(1); - expect(message.details[0].id).toEqual(0); - expect(message.details[0].num).toEqual(55); - } - - // test multiple sources - jobs.getSomeipStatistic([path, path]) - .then((statistic) => { - expect(statistic.services.length).toEqual(2); - { - let service = statistic.services[0]; - expect(service.item.id).toEqual(123); - expect(service.item.num).toEqual(44); - expect(service.details.length).toEqual(1); - expect(service.details[0].id).toEqual(32773); - expect(service.details[0].num).toEqual(44); - } - { - let service = statistic.services[1]; - expect(service.item.id).toEqual(65535); - expect(service.item.num).toEqual(66); - expect(service.details.length).toEqual(1); - expect(service.details[0].id).toEqual(33024); - expect(service.details[0].num).toEqual(66); - } - expect(statistic.messages.length).toEqual(1); - { - let message = statistic.messages[0]; - expect(message.item.id).toEqual(2); - expect(message.item.num).toEqual(110); - expect(message.details.length).toEqual(1); - expect(message.details[0].id).toEqual(0); - expect(message.details[0].num).toEqual(110); - } - - // test cancel job - jobs.getSomeipStatistic([path]) - .then((_) => { - finish( - jobs, - done, - new Error(`This job should be cancelled, but not done`), - ); - }) - .canceled(async () => { - finish(jobs, done); - }) - .catch((err: Error) => { - finish(jobs, done, err); - }) - .abort(); - }) - .catch((err: Error) => { - finish(jobs, done, err); - }); - }) - .catch((err: Error) => { - finish(jobs, done, err); - }); - }); - }); - - it(config.regular.list[6], function () { - return runners.unbound(config.regular, 7, async (logger, done, collector) => { - const jobs = collector(await Jobs.create()) as Jobs; - const path = config.regular.files['sample-txt']; - jobs.isFileBinary({ - filePath: path, - }) - .then((isBinary) => { - expect(typeof isBinary).toEqual('boolean'); - expect(isBinary).toEqual(false); - finish(jobs, done); - }) - .catch((err: Error) => { - finish(jobs, done, err); - }); - }); - }); - - it(config.regular.list[7], function () { - return runners.unbound(config.regular, 8, async (logger, done, collector) => { - const jobs = collector(await Jobs.create()) as Jobs; - // Run sleeping, but do not wait for it - jobs.sleep(6000).then(() => { - finish(undefined, done, new Error('Get response from destroyed session')); - }); - setTimeout(() => { - // Closing session - jobs.destroy() - .then(() => { - finish(undefined, done); - }) - .catch((err: Error) => { - finish(undefined, done, err); - }); - }, 500); - }); - }); -}); diff --git a/application/apps/rustcore/ts-bindings/spec/session.map.spec.ts b/application/apps/rustcore/ts-bindings/spec/session.map.spec.ts deleted file mode 100644 index 504e3b5648..0000000000 --- a/application/apps/rustcore/ts-bindings/spec/session.map.spec.ts +++ /dev/null @@ -1,523 +0,0 @@ -// tslint:disable -// We need to provide path to TypeScript types definitions -/// -/// - -import { initLogger } from './logger'; -initLogger(); -import { Factory } from '../src/api/session'; -import { ISearchMap } from 'platform/types/filter'; -import { finish, createSampleFile } from './common'; -import { readConfigurationFile } from './config'; - -import * as runners from './runners'; - -const config = readConfigurationFile().get().tests.map; - -describe('Map', function () { - it(config.regular.list[1], function () { - return runners.withSession(config.regular, 1, async (logger, done, comps) => { - const index: number = 1; - if ( - config.regular.spec === undefined || - config.regular.spec.map === undefined || - config.regular.spec.map[index] === undefined - ) { - return finish( - undefined, - done, - new Error(`For test #${index} required specification: map.regular.spec`), - ); - } - const spec = config.regular.spec.map[index]; - const tmpobj = createSampleFile( - spec.filesize, - logger, - (i: number) => - `[${i}]:: some ${i % 100 === 0 || i < 5 ? 'match' : ''} line data }\n`, - ); - comps.stream - .observe( - new Factory.File() - .asText() - .type(Factory.FileType.Text) - .file(tmpobj.name) - .get() - .sterilized(), - ) - .on('processing', () => { - comps.search - .search([ - { - filter: 'match', - flags: { reg: false, word: false, cases: false }, - }, - ]) - .then((_) => { - comps.search - .getMap(spec.datasetLength) - .then((map: ISearchMap) => { - expect(map.length).toEqual(spec.filesize); - map.forEach((values: number[][], line: number) => { - if (line % 100 === 0 || line < 5) { - expect(values.length).toEqual(1); - values.forEach((matches: number[]) => { - expect(matches[0]).toEqual(0); - expect(matches[1]).toEqual(1); - }); - } else { - expect(values.length).toEqual(0); - } - }); - finish(comps.session, done); - }) - .catch(finish.bind(null, comps.session, done)); - }) - .catch(finish.bind(null, comps.session, done)); - }) - .catch(finish.bind(null, comps.session, done)); - }); - }); - - it(config.regular.list[2], function () { - return runners.withSession(config.regular, 2, async (logger, done, comps) => { - const index: number = 2; - if ( - config.regular.spec === undefined || - config.regular.spec.map === undefined || - config.regular.spec.map[index] === undefined - ) { - return finish( - undefined, - done, - new Error(`For test #${index} required specification: map.regular.spec`), - ); - } - const spec = config.regular.spec.map[index]; - const tmpobj = createSampleFile( - spec.filesize, - logger, - (i: number) => - `[${i}]:: some ${i % 100 === 0 || i < 5 ? 'match' : ''} line data }\n`, - ); - comps.stream - .observe( - new Factory.File() - .asText() - .type(Factory.FileType.Text) - .file(tmpobj.name) - .get() - .sterilized(), - ) - .on('processing', () => { - comps.search - .search([ - { - filter: 'match', - flags: { reg: false, word: false, cases: false }, - }, - ]) - .then((_) => { - comps.search - .getMap(spec.datasetLength) - .then((map: ISearchMap) => { - expect(map.length).toEqual(spec.datasetLength); - map.forEach((lineData: number[][], lineNumber: number) => { - if (lineNumber % 100 === 0 || lineNumber < 5) { - expect(lineData.length).toEqual(1); - lineData.forEach((matches: number[]) => { - expect(matches[0]).toEqual(0); - expect(matches[1]).toEqual(1); - }); - } else { - expect(lineData.length).toEqual(0); - } - }); - finish(comps.session, done); - }) - .catch(finish.bind(null, comps.session, done)); - }) - .catch(finish.bind(null, comps.session, done)); - }) - .catch(finish.bind(null, comps.session, done)); - }); - }); - - it(config.regular.list[3], function () { - return runners.withSession(config.regular, 3, async (logger, done, comps) => { - const index: number = 3; - if ( - config.regular.spec === undefined || - config.regular.spec.map === undefined || - config.regular.spec.map[index] === undefined - ) { - return finish( - undefined, - done, - new Error(`For test #${index} required specification: map.regular.spec`), - ); - } - const spec = config.regular.spec.map[index]; - const tmpobj = createSampleFile( - spec.filesize, - logger, - (i: number) => - `[${i}]:: some ${i % 100 === 0 ? 'match' : ''} line data ${ - i % 33 === 0 || i % 55 === 0 ? 'not' : '' - }\n`, - ); - comps.stream - .observe( - new Factory.File() - .asText() - .type(Factory.FileType.Text) - .file(tmpobj.name) - .get() - .sterilized(), - ) - .on('processing', () => { - comps.search - .search([ - { - filter: 'match', - flags: { reg: false, word: false, cases: true }, - }, - { - filter: 'not', - flags: { reg: false, word: false, cases: false }, - }, - { - filter: 'line', - flags: { reg: false, word: false, cases: true }, - }, - ]) - .then((_) => { - comps.search - .getMap(spec.datasetLength) - .then((map: ISearchMap) => { - expect(map.length).toEqual(spec.datasetLength); - map.forEach((lineData: number[][], lineNumber: number) => { - if ( - lineNumber % 100 === 0 && - (lineNumber % 33 === 0 || lineNumber % 55 === 0) - ) { - expect(lineData.length).toEqual(3); - lineData.forEach((matches: number[]) => { - if ( - matches[0] === 0 || - matches[0] === 1 || - matches[0] === 2 - ) { - expect(matches[1]).toEqual(1); - } else { - expect(matches[0]).toBeUndefined(); - expect(matches[1]).toBeUndefined(); - } - }); - } else if (lineNumber % 100 === 0) { - expect(lineData.length).toEqual(2); - lineData.forEach((matches: number[]) => { - if (matches[0] === 0) { - expect(matches[1]).toEqual(1); - } else if (matches[0] === 2) { - expect(matches[1]).toEqual(1); - } else { - expect(matches[0]).toBeUndefined(); - expect(matches[1]).toBeUndefined(); - } - }); - } else if ( - lineNumber % 33 === 0 || - lineNumber % 55 === 0 - ) { - expect(lineData.length).toEqual(2); - lineData.forEach((matches: number[]) => { - if (matches[0] === 1) { - expect(matches[1]).toEqual(1); - } else if (matches[0] === 2) { - expect(matches[1]).toEqual(1); - } else { - expect(matches[0]).toBeUndefined(); - expect(matches[1]).toBeUndefined(); - } - }); - } else { - expect(lineData.length).toEqual(1); - lineData.forEach((matches: number[]) => { - expect(matches[0]).toEqual(2); - expect(matches[1]).toEqual(1); - }); - } - }); - finish(comps.session, done); - }) - .catch(finish.bind(null, comps.session, done)); - }) - .catch(finish.bind(null, comps.session, done)); - }) - .catch(finish.bind(null, comps.session, done)); - }); - }); - - it(config.regular.list[4], function () { - return runners.withSession(config.regular, 4, async (logger, done, comps) => { - const index: number = 4; - if ( - config.regular.spec === undefined || - config.regular.spec.map === undefined || - config.regular.spec.map[index] === undefined - ) { - return finish( - undefined, - done, - new Error(`For test #${index} required specification: map.regular.spec`), - ); - } - const spec = config.regular.spec.map[index]; - const tmpobj = createSampleFile( - spec.filesize, - logger, - (i: number) => - `[${i}]:: Run command ${ - i % 100 === 0 || i < 5 ? 'echo "haha">>file.txt' : '' - }\n`, - ); - comps.stream - .observe( - new Factory.File() - .asText() - .type(Factory.FileType.Text) - .file(tmpobj.name) - .get() - .sterilized(), - ) - .on('processing', () => { - comps.search - .search([ - { - filter: 'file.txt', - flags: { reg: false, word: false, cases: false }, - }, - ]) - .then((_) => { - comps.search - .getMap(spec.datasetLength) - .then((map: ISearchMap) => { - expect(map.length).toEqual(spec.datasetLength); - map.forEach((lineData: number[][], lineNumber: number) => { - if (lineNumber % 100 === 0 || lineNumber < 5) { - expect(lineData.length).toEqual(1); - lineData.forEach((matches: number[]) => { - expect(matches[0]).toEqual(0); - expect(matches[1]).toEqual(1); - }); - } else { - expect(lineData.length).toEqual(0); - } - }); - finish(comps.session, done); - }) - .catch(finish.bind(null, comps.session, done)); - }) - .catch(finish.bind(null, comps.session, done)); - }) - .catch(finish.bind(null, comps.session, done)); - }); - }); - - it(config.regular.list[5], function () { - return runners.withSession(config.regular, 5, async (logger, done, comps) => { - const index: number = 5; - if ( - config.regular.spec === undefined || - config.regular.spec.map === undefined || - config.regular.spec.map[index] === undefined - ) { - return finish( - undefined, - done, - new Error(`For test #${index} required specification: map.regular.spec`), - ); - } - const spec = config.regular.spec.map[index]; - const tmpobj = createSampleFile( - spec.filesize, - logger, - (i: number) => - `[${i}]:: Random text ${i % 100 === 0 || i < 5 ? '1:1' : ''} as expected\n`, - ); - comps.stream - .observe( - new Factory.File() - .asText() - .type(Factory.FileType.Text) - .file(tmpobj.name) - .get() - .sterilized(), - ) - .on('processing', () => { - comps.search - .search([ - { - filter: '1:1', - flags: { reg: false, word: false, cases: false }, - }, - ]) - .then((_) => { - comps.search - .getMap(spec.datasetLength) - .then((map: ISearchMap) => { - expect(map.length).toEqual(spec.datasetLength); - map.forEach((lineData: number[][], lineNumber: number) => { - if (lineNumber % 100 === 0 || lineNumber < 5) { - expect(lineData.length).toEqual(1); - lineData.forEach((matches: number[]) => { - expect(matches[0]).toEqual(0); - expect(matches[1]).toEqual(1); - }); - } else { - expect(lineData.length).toEqual(0); - } - }); - finish(comps.session, done); - }) - .catch(finish.bind(null, comps.session, done)); - }) - .catch(finish.bind(null, comps.session, done)); - }) - .catch(finish.bind(null, comps.session, done)); - }); - }); - - it(config.regular.list[6], function () { - return runners.withSession(config.regular, 6, async (logger, done, comps) => { - const index: number = 6; - if ( - config.regular.spec === undefined || - config.regular.spec.map === undefined || - config.regular.spec.map[index] === undefined - ) { - return finish( - undefined, - done, - new Error(`For test #${index} required specification: map.regular.spec`), - ); - } - const spec = config.regular.spec.map[index]; - const tmpobj = createSampleFile( - spec.filesize, - logger, - (i: number) => - `[${i}]:: Timestamp is ${ - i % 15 === 0 || i < 7 ? '00:00.0:1' + i : 'unknown' - } right now.\n`, - ); - comps.stream - .observe( - new Factory.File() - .asText() - .type(Factory.FileType.Text) - .file(tmpobj.name) - .get() - .sterilized(), - ) - .on('processing', () => { - comps.search - .search([ - { - filter: '0.0:1', - flags: { reg: false, word: false, cases: false }, - }, - ]) - .then((_) => { - comps.search - .getMap(spec.datasetLength) - .then((map: ISearchMap) => { - expect(map.length).toEqual(spec.datasetLength); - map.forEach((lineData: number[][], lineNumber: number) => { - if (lineNumber % 15 === 0 || lineNumber < 7) { - expect(lineData.length).toEqual(1); - lineData.forEach((matches: number[]) => { - expect(matches[0]).toEqual(0); - expect(matches[1]).toEqual(1); - }); - } else { - expect(lineData.length).toEqual(0); - } - }); - finish(comps.session, done); - }) - .catch(finish.bind(null, comps.session, done)); - }) - .catch(finish.bind(null, comps.session, done)); - }) - .catch(finish.bind(null, comps.session, done)); - }); - }); - - it(config.regular.list[7], function () { - return runners.withSession(config.regular, 7, async (logger, done, comps) => { - const index: number = 7; - if ( - config.regular.spec === undefined || - config.regular.spec.map === undefined || - config.regular.spec.map[index] === undefined - ) { - return finish( - undefined, - done, - new Error(`For test #${index} required specification: map.regular.spec`), - ); - } - const spec = config.regular.spec.map[index]; - const tmpobj = createSampleFile( - spec.filesize, - logger, - (i: number) => - `[${i}]:: Timestamp in a longsword(${ - i % 3 === 0 || i > 700 ? '0.0:1' + i : 'unknown' - })\n`, - ); - comps.stream - .observe( - new Factory.File() - .asText() - .type(Factory.FileType.Text) - .file(tmpobj.name) - .get() - .sterilized(), - ) - .on('processing', () => { - comps.search - .search([ - { - filter: 'word(0.0:1', - flags: { reg: false, word: false, cases: false }, - }, - ]) - .then((_) => { - comps.search - .getMap(spec.datasetLength) - .then((map: ISearchMap) => { - expect(map.length).toEqual(spec.datasetLength); - map.forEach((lineData: number[][], lineNumber: number) => { - if (lineNumber % 3 === 0 || lineNumber > 700) { - expect(lineData.length).toEqual(1); - lineData.forEach((matches: number[]) => { - expect(matches[0]).toEqual(0); - expect(matches[1]).toEqual(1); - }); - } else { - expect(lineData.length).toEqual(0); - } - }); - finish(comps.session, done); - }) - .catch(finish.bind(null, comps.session, done)); - }) - .catch(finish.bind(null, comps.session, done)); - }) - .catch(finish.bind(null, comps.session, done)); - }); - }); -}); diff --git a/application/apps/rustcore/ts-bindings/spec/session.observe.spec.ts b/application/apps/rustcore/ts-bindings/spec/session.observe.spec.ts deleted file mode 100644 index 68e0a14d7e..0000000000 --- a/application/apps/rustcore/ts-bindings/spec/session.observe.spec.ts +++ /dev/null @@ -1,796 +0,0 @@ -// tslint:disable -// We need to provide path to TypeScript types definitions -/// -/// - -import { initLogger } from './logger'; -initLogger(); -import { Factory } from '../src/api/session'; -import { GrabbedElement, AttachmentInfo } from 'platform/types/bindings'; -import { IAttachmentsUpdatedUpdated } from '../src/api/session.provider'; -import { createSampleFile, finish } from './common'; -import { readConfigurationFile } from './config'; - -import * as fs from 'fs'; -import * as runners from './runners'; - -const config = readConfigurationFile().get().tests.observe; - -describe('Observe', function () { - it(config.regular.list[1], function () { - return runners.withSession(config.regular, 1, async (logger, done, comps) => { - const tmpobj = createSampleFile(5000, logger, (i: number) => `some line data: ${i}\n`); - comps.stream - .observe( - new Factory.File() - .asText() - .type(Factory.FileType.Text) - .file(tmpobj.name) - .get() - .sterilized(), - ) - .catch(finish.bind(null, comps.session, done)); - let grabbing: boolean = false; - comps.events.StreamUpdated.subscribe((rows: number) => { - console.log(`Event came: ${rows}`); - if (rows === 0 || grabbing) { - return; - } - grabbing = true; - comps.stream - .grab(500, 7) - .then((result: GrabbedElement[]) => { - logger.debug('result of grab was: ' + JSON.stringify(result)); - expect(result.map((i) => i.content)).toEqual([ - 'some line data: 500', - 'some line data: 501', - 'some line data: 502', - 'some line data: 503', - 'some line data: 504', - 'some line data: 505', - 'some line data: 506', - ]); - finish(comps.session, done); - }) - .catch((err: Error) => { - finish( - comps.session, - done, - new Error( - `Fail to grab data due error: ${ - err instanceof Error ? err.message : err - }`, - ), - ); - }); - }); - }); - }); - - it(config.regular.list[2], function () { - return runners.withSession(config.regular, 2, async (logger, done, comps) => { - comps.stream - .observe( - new Factory.File() - .type(Factory.FileType.PcapNG) - .file(config.regular.files['pcapng']) - .asDlt({ - filter_config: undefined, - fibex_file_paths: [], - with_storage_header: false, - tz: undefined, - }) - .get() - .sterilized(), - ) - .catch(finish.bind(null, comps.session, done)); - let grabbing: boolean = false; - let received: number = 0; - const timeout = setTimeout(() => { - finish( - comps.session, - done, - new Error( - `Failed because timeout. Waited for at least 100 rows. Has been gotten: ${received}`, - ), - ); - }, 20000); - comps.events.StreamUpdated.subscribe((rows: number) => { - received = rows; - if (rows < 100 || grabbing) { - return; - } - clearTimeout(timeout); - grabbing = true; - comps.stream - .grab(1, 10) - .then((result: GrabbedElement[]) => { - expect(result.length).toEqual(10); - logger.debug('result of grab was: ' + JSON.stringify(result)); - finish(comps.session, done); - }) - .catch((err: Error) => { - finish( - comps.session, - done, - new Error( - `Fail to grab data due error: ${ - err instanceof Error ? err.message : err - }`, - ), - ); - }); - }); - }); - }); - - it(config.regular.list[3], function () { - return runners.withSession(config.regular, 3, async (logger, done, comps) => { - comps.stream - .observe( - new Factory.File() - .type(Factory.FileType.Binary) - .file(config.regular.files['dlt']) - .asDlt({ - filter_config: undefined, - fibex_file_paths: [], - with_storage_header: true, - tz: undefined, - }) - .get() - .sterilized(), - ) - .catch(finish.bind(null, comps.session, done)); - let grabbing: boolean = false; - let received: number = 0; - const timeout = setTimeout(() => { - finish( - comps.session, - done, - new Error( - `Failed because timeout. Waited for at least 100 rows. Has been gotten: ${received}`, - ), - ); - }, 20000); - comps.events.StreamUpdated.subscribe((rows: number) => { - received = rows; - if (rows < 100 || grabbing) { - return; - } - clearTimeout(timeout); - grabbing = true; - comps.stream - .grab(1, 10) - .then((result: GrabbedElement[]) => { - expect(result.length).toEqual(10); - logger.debug('result of grab was: ' + JSON.stringify(result)); - finish(comps.session, done); - }) - .catch((err: Error) => { - finish( - comps.session, - done, - new Error( - `Fail to grab data due error: ${ - err instanceof Error ? err.message : err - }`, - ), - ); - }); - }); - }); - }); - - it(config.regular.list[4], function () { - return runners.withSession(config.regular, 4, async (logger, done, comps) => { - comps.stream - .observe( - new Factory.File() - .type(Factory.FileType.Binary) - .file(config.regular.files['attachments']) - .asDlt({ - filter_config: undefined, - fibex_file_paths: undefined, - with_storage_header: true, - tz: undefined, - }) - .get() - .sterilized(), - ) - .catch(finish.bind(null, comps.session, done)); - let updates: IAttachmentsUpdatedUpdated[] = []; - const timeout = setTimeout(() => { - finish( - comps.session, - done, - new Error( - `Failed because timeout. Waited for at least 3 attachments. Has been gotten: ${updates.length}`, - ), - ); - }, 20000); - comps.events.AttachmentsUpdated.subscribe((update: IAttachmentsUpdatedUpdated) => { - updates.push(update); - if (updates.length >= 3) { - clearTimeout(timeout); - expect(updates[0].len).toEqual(1); - expect(updates[1].len).toEqual(2); - expect(updates[2].len).toEqual(3); - { - let attachment: AttachmentInfo = updates[0].attachment; - expect(attachment.name).toEqual('test1.txt'); - expect(attachment.size).toEqual(5); - expect(attachment.ext).toEqual('txt'); - expect(attachment.mime).toEqual('text/plain'); - expect(attachment.messages).toEqual([0, 2, 6]); - expect(fs.readFileSync(attachment.filepath, 'utf8')).toEqual('test1'); - } - { - let attachment: AttachmentInfo = updates[1].attachment; - expect(attachment.name).toEqual('test2.txt'); - expect(attachment.size).toEqual(6); - expect(attachment.ext).toEqual('txt'); - expect(attachment.mime).toEqual('text/plain'); - expect(attachment.messages).toEqual([1, 3, 7]); - expect(fs.readFileSync(attachment.filepath, 'utf8')).toEqual('test22'); - } - { - let attachment: AttachmentInfo = updates[2].attachment; - expect(attachment.name).toEqual('test3.txt'); - expect(attachment.size).toEqual(7); - expect(attachment.ext).toEqual('txt'); - expect(attachment.mime).toEqual('text/plain'); - expect(attachment.messages).toEqual([4, 5, 8]); - expect(fs.readFileSync(attachment.filepath, 'utf8')).toEqual('test333'); - } - finish(comps.session, done); - } - }); - }); - }); - - it(config.regular.list[5], function () { - return runners.withSession(config.regular, 5, async (logger, done, comps) => { - comps.stream - .observe( - new Factory.File() - .type(Factory.FileType.PcapNG) - .file(config.regular.files['someip-pcapng']) - .asSomeip({ - fibex_file_paths: [], - }) - .get() - .sterilized(), - ) - .catch(finish.bind(null, comps.session, done)); - let grabbing: boolean = false; - let received: number = 0; - const timeout = setTimeout(() => { - finish( - comps.session, - done, - new Error( - `Failed because timeout. Waited for at least 55 rows. Has been gotten: ${received}`, - ), - ); - }, 20000); - comps.events.StreamUpdated.subscribe((rows: number) => { - received = rows; - if (rows < 55 || grabbing) { - return; - } - clearTimeout(timeout); - grabbing = true; - comps.stream - .grab(0, 4) - .then((result: GrabbedElement[]) => { - expect(result.length).toEqual(4); - expect(result[0].content.split('\u0004')).toEqual([ - 'SD', - /* Header */ - '65535', // Service-ID - '33024', // Method-ID - '60', // Length-Field - '0', // Client-ID - '0', // Session-ID - '1', // Interface-Version - '2', // Message-Type - '0', // Return-Type - /* Payload */ - 'Flags [C0], Offer 123 v1.0 Inst 1 Ttl 3 UDP 192.168.178.58:30000 TCP 192.168.178.58:30000', - ]); - expect(result[3].content.split('\u0004')).toEqual([ - 'RPC', - /* Header */ - '123', // Service-ID - '32773', // Method-ID - '16', // Length-Field - '1', // Client-ID - '0', // Session-ID - '1', // Interface-Version - '2', // Message-Type - '0', // Return-Type - /* Payload */ - '[00, 00, 01, 88, 01, C3, C4, 1D]', - ]); - logger.debug('result of grab was: ' + JSON.stringify(result)); - finish(comps.session, done); - }) - .catch((err: Error) => { - finish( - comps.session, - done, - new Error( - `Fail to grab data due error: ${ - err instanceof Error ? err.message : err - }`, - ), - ); - }); - }); - }); - }); - - it(config.regular.list[6], function () { - return runners.withSession(config.regular, 6, async (logger, done, comps) => { - comps.stream - .observe( - new Factory.File() - .type(Factory.FileType.PcapNG) - .file(config.regular.files['someip-pcapng']) - .asSomeip({ - fibex_file_paths: [config.regular.files['someip-fibex']], - }) - .get() - .sterilized(), - ) - .catch(finish.bind(null, comps.session, done)); - let grabbing: boolean = false; - let received: number = 0; - const timeout = setTimeout(() => { - finish( - comps.session, - done, - new Error( - `Failed because timeout. Waited for at least 55 rows. Has been gotten: ${received}`, - ), - ); - }, 20000); - comps.events.StreamUpdated.subscribe((rows: number) => { - received = rows; - if (rows < 55 || grabbing) { - return; - } - clearTimeout(timeout); - grabbing = true; - comps.stream - .grab(0, 4) - .then((result: GrabbedElement[]) => { - expect(result.length).toEqual(4); - expect(result[0].content.split('\u0004')).toEqual([ - 'SD', - /* Header */ - '65535', // Service-ID - '33024', // Method-ID - '60', // Length-Field - '0', // Client-ID - '0', // Session-ID - '1', // Interface-Version - '2', // Message-Type - '0', // Return-Type - /* Payload */ - 'Flags [C0], Offer 123 v1.0 Inst 1 Ttl 3 UDP 192.168.178.58:30000 TCP 192.168.178.58:30000', - ]); - expect(result[3].content.split('\u0004')).toEqual([ - 'RPC', - /* Header */ - '123', // Service-ID - '32773', // Method-ID - '16', // Length-Field - '1', // Client-ID - '0', // Session-ID - '1', // Interface-Version - '2', // Message-Type - '0', // Return-Type - /* Payload */ - 'TestService::timeEvent {\u0006\ttimestamp (INT64) : 1683656786973,\u0006}', - ]); - logger.debug('result of grab was: ' + JSON.stringify(result)); - finish(comps.session, done); - }) - .catch((err: Error) => { - finish( - comps.session, - done, - new Error( - `Fail to grab data due error: ${ - err instanceof Error ? err.message : err - }`, - ), - ); - }); - }); - }); - }); - - it(config.regular.list[7], function () { - return runners.withSession(config.regular, 7, async (logger, done, comps) => { - comps.stream - .observe( - new Factory.File() - .type(Factory.FileType.PcapLegacy) - .file(config.regular.files['someip-pcap']) - .asSomeip({ - fibex_file_paths: [], - }) - .get() - .sterilized(), - ) - .catch(finish.bind(null, comps.session, done)); - let grabbing: boolean = false; - let received: number = 0; - const timeout = setTimeout(() => { - finish( - comps.session, - done, - new Error( - `Failed because timeout. Waited for at least 55 rows. Has been gotten: ${received}`, - ), - ); - }, 20000); - comps.events.StreamUpdated.subscribe((rows: number) => { - received = rows; - if (rows < 55 || grabbing) { - return; - } - clearTimeout(timeout); - grabbing = true; - comps.stream - .grab(0, 4) - .then((result: GrabbedElement[]) => { - expect(result.length).toEqual(4); - expect(result[0].content.split('\u0004')).toEqual([ - 'SD', - /* Header */ - '65535', // Service-ID - '33024', // Method-ID - '60', // Length-Field - '0', // Client-ID - '0', // Session-ID - '1', // Interface-Version - '2', // Message-Type - '0', // Return-Type - /* Payload */ - 'Flags [C0], Offer 123 v1.0 Inst 1 Ttl 3 UDP 192.168.178.58:30000 TCP 192.168.178.58:30000', - ]); - expect(result[3].content.split('\u0004')).toEqual([ - 'RPC', - /* Header */ - '123', // Service-ID - '32773', // Method-ID - '16', // Length-Field - '1', // Client-ID - '0', // Session-ID - '1', // Interface-Version - '2', // Message-Type - '0', // Return-Type - /* Payload */ - '[00, 00, 01, 88, 01, C3, C4, 1D]', - ]); - logger.debug('result of grab was: ' + JSON.stringify(result)); - finish(comps.session, done); - }) - .catch((err: Error) => { - finish( - comps.session, - done, - new Error( - `Fail to grab data due error: ${ - err instanceof Error ? err.message : err - }`, - ), - ); - }); - }); - }); - }); - - it(config.regular.list[8], function () { - return runners.withSession(config.regular, 8, async (logger, done, comps) => { - comps.stream - .observe( - new Factory.File() - .type(Factory.FileType.PcapLegacy) - .file(config.regular.files['someip-pcap']) - .asSomeip({ - fibex_file_paths: [config.regular.files['someip-fibex']], - }) - .get() - .sterilized(), - ) - .catch(finish.bind(null, comps.session, done)); - let grabbing: boolean = false; - let received: number = 0; - const timeout = setTimeout(() => { - finish( - comps.session, - done, - new Error( - `Failed because timeout. Waited for at least 55 rows. Has been gotten: ${received}`, - ), - ); - }, 20000); - comps.events.StreamUpdated.subscribe((rows: number) => { - received = rows; - if (rows < 55 || grabbing) { - return; - } - clearTimeout(timeout); - grabbing = true; - comps.stream - .grab(0, 4) - .then((result: GrabbedElement[]) => { - expect(result.length).toEqual(4); - expect(result[0].content.split('\u0004')).toEqual([ - 'SD', - /* Header */ - '65535', // Service-ID - '33024', // Method-ID - '60', // Length-Field - '0', // Client-ID - '0', // Session-ID - '1', // Interface-Version - '2', // Message-Type - '0', // Return-Type - /* Payload */ - 'Flags [C0], Offer 123 v1.0 Inst 1 Ttl 3 UDP 192.168.178.58:30000 TCP 192.168.178.58:30000', - ]); - expect(result[3].content.split('\u0004')).toEqual([ - 'RPC', - /* Header */ - '123', // Service-ID - '32773', // Method-ID - '16', // Length-Field - '1', // Client-ID - '0', // Session-ID - '1', // Interface-Version - '2', // Message-Type - '0', // Return-Type - /* Payload */ - 'TestService::timeEvent {\u0006\ttimestamp (INT64) : 1683656786973,\u0006}', - ]); - logger.debug('result of grab was: ' + JSON.stringify(result)); - finish(comps.session, done); - }) - .catch((err: Error) => { - finish( - comps.session, - done, - new Error( - `Fail to grab data due error: ${ - err instanceof Error ? err.message : err - }`, - ), - ); - }); - }); - }); - }); - - it(config.regular.list[9], function () { - return runners.withSession(config.regular, 9, async (logger, done, comps) => { - comps.stream - .observe( - new Factory.File() - .type(Factory.FileType.Binary) - .file(config.regular.files['someip-dlt']) - .asDlt({ - filter_config: undefined, - fibex_file_paths: [], - with_storage_header: true, - tz: undefined, - }) - .get() - .sterilized(), - ) - .catch(finish.bind(null, comps.session, done)); - let grabbing: boolean = false; - let received: number = 0; - const timeout = setTimeout(() => { - finish( - comps.session, - done, - new Error( - `Failed because timeout. Waited for at least 55 rows. Has been gotten: ${received}`, - ), - ); - }, 20000); - comps.events.StreamUpdated.subscribe((rows: number) => { - received = rows; - if (rows < 6 || grabbing) { - return; - } - clearTimeout(timeout); - grabbing = true; - comps.stream - .grab(0, 6) - .then((result: GrabbedElement[]) => { - expect(result.length).toEqual(6); - expect(result[0].content.split('\u0004')).toEqual([ - '2024-02-20T13:17:26.713537000Z', - 'ECU1', - '1', - '571', - '204', - '28138506', - 'ECU1', - 'APP1', - 'C1', - 'IPC', - 'SOME/IP 0.0.0.0:0 >> INST:1 RPC SERV:123 METH:32773 LENG:16 CLID:0 SEID:58252 IVER:1 MSTP:2 RETC:0 [00, 00, 01, 88, 01, C3, C4, 1D]', - ]); - expect(result[5].content.split('\u0004')).toEqual([ - '2024-02-20T13:17:26.713537000Z', - 'ECU1', - '1', - '571', - '209', - '28138506', - 'ECU1', - 'APP1', - 'C1', - 'IPC', - "SOME/IP 'Incomplete, not enough data for a message' [00, 7B, 80, 05, 00, 00, 00, 11, 00, 00, E3, 8C, 01, 01, 02, 00, 00, 00, 01, 88, 01, C3, C4, 1D]", - ]); - logger.debug('result of grab was: ' + JSON.stringify(result)); - finish(comps.session, done); - }) - .catch((err: Error) => { - finish( - comps.session, - done, - new Error( - `Fail to grab data due error: ${ - err instanceof Error ? err.message : err - }`, - ), - ); - }); - }); - }); - }); - - it(config.regular.list[10], function () { - return runners.withSession(config.regular, 10, async (logger, done, comps) => { - comps.stream - .observe( - new Factory.File() - .type(Factory.FileType.Binary) - .file(config.regular.files['someip-dlt']) - .asDlt({ - filter_config: undefined, - fibex_file_paths: [config.regular.files['someip-fibex']], - with_storage_header: true, - tz: undefined, - }) - .get() - .sterilized(), - ) - .catch(finish.bind(null, comps.session, done)); - let grabbing: boolean = false; - let received: number = 0; - const timeout = setTimeout(() => { - finish( - comps.session, - done, - new Error( - `Failed because timeout. Waited for at least 55 rows. Has been gotten: ${received}`, - ), - ); - }, 20000); - comps.events.StreamUpdated.subscribe((rows: number) => { - received = rows; - if (rows < 6 || grabbing) { - return; - } - clearTimeout(timeout); - grabbing = true; - comps.stream - .grab(0, 6) - .then((result: GrabbedElement[]) => { - expect(result.length).toEqual(6); - expect(result[0].content.split('\u0004')).toEqual([ - '2024-02-20T13:17:26.713537000Z', - 'ECU1', - '1', - '571', - '204', - '28138506', - 'ECU1', - 'APP1', - 'C1', - 'IPC', - 'SOME/IP 0.0.0.0:0 >> INST:1 RPC SERV:123 METH:32773 LENG:16 CLID:0 SEID:58252 IVER:1 MSTP:2 RETC:0 TestService::timeEvent {\u0006\ttimestamp (INT64) : 1683656786973,\u0006}', - ]); - expect(result[1].content.split('\u0004')).toEqual([ - '2024-02-20T13:17:26.713537000Z', - 'ECU1', - '1', - '571', - '205', - '28138506', - 'ECU1', - 'APP1', - 'C1', - 'IPC', - 'SOME/IP 0.0.0.0:0 >> INST:1 RPC SERV:124 METH:32773 LENG:16 CLID:0 SEID:58252 IVER:1 MSTP:2 RETC:0 UnknownService [00, 00, 01, 88, 01, C3, C4, 1D]', - ]); - expect(result[2].content.split('\u0004')).toEqual([ - '2024-02-20T13:17:26.713537000Z', - 'ECU1', - '1', - '571', - '206', - '28138506', - 'ECU1', - 'APP1', - 'C1', - 'IPC', - 'SOME/IP 0.0.0.0:0 >> INST:1 RPC SERV:123 METH:32773 LENG:16 CLID:0 SEID:58252 IVER:3 MSTP:2 RETC:0 TestService<1?>::timeEvent {\u0006\ttimestamp (INT64) : 1683656786973,\u0006}', - ]); - expect(result[3].content.split('\u0004')).toEqual([ - '2024-02-20T13:17:26.713537000Z', - 'ECU1', - '1', - '571', - '207', - '28138506', - 'ECU1', - 'APP1', - 'C1', - 'IPC', - 'SOME/IP 0.0.0.0:0 >> INST:1 RPC SERV:123 METH:32774 LENG:16 CLID:0 SEID:58252 IVER:1 MSTP:2 RETC:0 TestService::UnknownMethod [00, 00, 01, 88, 01, C3, C4, 1D]', - ]); - expect(result[4].content.split('\u0004')).toEqual([ - '2024-02-20T13:17:26.713537000Z', - 'ECU1', - '1', - '571', - '208', - '28138506', - 'ECU1', - 'APP1', - 'C1', - 'IPC', - "SOME/IP 0.0.0.0:0 >> INST:1 RPC SERV:123 METH:32773 LENG:15 CLID:0 SEID:58252 IVER:1 MSTP:2 RETC:0 TestService::timeEvent 'SOME/IP Error: Parser exhausted at offset 0 for Object size 8' [00, 00, 01, 88, 01, C3, C4]", - ]); - expect(result[5].content.split('\u0004')).toEqual([ - '2024-02-20T13:17:26.713537000Z', - 'ECU1', - '1', - '571', - '209', - '28138506', - 'ECU1', - 'APP1', - 'C1', - 'IPC', - "SOME/IP 'Incomplete, not enough data for a message' [00, 7B, 80, 05, 00, 00, 00, 11, 00, 00, E3, 8C, 01, 01, 02, 00, 00, 00, 01, 88, 01, C3, C4, 1D]", - ]); - logger.debug('result of grab was: ' + JSON.stringify(result)); - finish(comps.session, done); - }) - .catch((err: Error) => { - finish( - comps.session, - done, - new Error( - `Fail to grab data due error: ${ - err instanceof Error ? err.message : err - }`, - ), - ); - }); - }); - }); - }); -}); diff --git a/application/apps/rustcore/ts-bindings/spec/session.observing.spec.ts b/application/apps/rustcore/ts-bindings/spec/session.observing.spec.ts deleted file mode 100644 index 628c807f6c..0000000000 --- a/application/apps/rustcore/ts-bindings/spec/session.observing.spec.ts +++ /dev/null @@ -1,462 +0,0 @@ -// We need to provide path to TypeScript types definitions -/// -/// - -import { initLogger } from './logger'; -initLogger(); -import { finish } from './common'; -import { readConfigurationFile } from './config'; -import { Observer } from 'platform/env/observer'; - -import * as $ from 'platform/types/observe'; -import * as Factory from 'platform/types/observe/factory'; -import * as runners from './runners'; - -const config = readConfigurationFile().get().tests.observing; - -function checkContext( - observe: $.Observe, - flags: { file: boolean; stream: boolean; concat: boolean }, -) { - expect( - observe.origin.as<$.Origin.Stream.Configuration>($.Origin.Stream.Configuration) instanceof - $.Origin.Stream.Configuration, - ).toEqual(flags.stream); - expect( - observe.origin.as<$.Origin.File.Configuration>($.Origin.File.Configuration) instanceof - $.Origin.File.Configuration, - ).toEqual(flags.file); - expect( - observe.origin.as<$.Origin.Concat.Configuration>($.Origin.Concat.Configuration) instanceof - $.Origin.Concat.Configuration, - ).toEqual(flags.concat); -} - -function checkStream( - observe: $.Observe, - flags: { udp: boolean; tcp: boolean; serial: boolean; process: boolean }, -) { - expect( - observe.origin.as<$.Origin.Stream.Stream.UDP.Configuration>( - $.Origin.Stream.Stream.UDP.Configuration, - ) instanceof $.Origin.Stream.Stream.UDP.Configuration, - ).toEqual(flags.udp); - expect( - observe.origin.as<$.Origin.Stream.Stream.TCP.Configuration>( - $.Origin.Stream.Stream.TCP.Configuration, - ) instanceof $.Origin.Stream.Stream.TCP.Configuration, - ).toEqual(flags.tcp); - expect( - observe.origin.as<$.Origin.Stream.Stream.Process.Configuration>( - $.Origin.Stream.Stream.Process.Configuration, - ) instanceof $.Origin.Stream.Stream.Process.Configuration, - ).toEqual(flags.process); - expect( - observe.origin.as<$.Origin.Stream.Stream.Serial.Configuration>( - $.Origin.Stream.Stream.Serial.Configuration, - ) instanceof $.Origin.Stream.Stream.Serial.Configuration, - ).toEqual(flags.serial); -} - -function checkParser(observe: $.Observe, flags: { text: boolean; dlt: boolean; someip: boolean }) { - expect( - observe.parser.as<$.Parser.Text.Configuration>($.Parser.Text.Configuration) instanceof - $.Parser.Text.Configuration, - ).toEqual(flags.text); - expect( - observe.parser.as<$.Parser.Dlt.Configuration>($.Parser.Dlt.Configuration) instanceof - $.Parser.Dlt.Configuration, - ).toEqual(flags.dlt); - expect( - observe.parser.as<$.Parser.SomeIp.Configuration>($.Parser.SomeIp.Configuration) instanceof - $.Parser.SomeIp.Configuration, - ).toEqual(flags.someip); -} - -describe('Platform: observing', function () { - it(config.regular.list[1], function () { - return runners.noSession(config.regular, 1, async (logger, done) => { - const entity = new Observer({ - a: 1, - b: 2, - c: [1, 2, 3], - d: [ - { a: 1, b: 2, c: [1, 2, 3] }, - { a: 1, b: 2, c: [1, 2, 3] }, - ], - }); - let changes: number = 0; - entity.watcher.subscribe((event) => { - changes += 1; - if (changes === 1) { - expect(entity.target.a).toEqual(2); - } else if (changes === 2) { - expect(entity.target.b).toEqual(3); - } else if (changes === 3) { - expect(entity.target.c.length).toEqual(4); - } - }); - entity.target.a += 1; - expect(entity.target.a).toEqual(2); - entity.target.b += 1; - expect(entity.target.b).toEqual(3); - entity.target.c.push(4); - expect(entity.target.c.length).toEqual(4); - entity.target.c.splice(1, 1); - expect(entity.target.c.length).toEqual(3); - entity.target.d[0].a += 1; - expect(entity.target.d[0].a).toEqual(2); - entity.target.d[0].b += 1; - expect(entity.target.d[0].b).toEqual(3); - entity.target.d[0].c.push(4); - expect(entity.target.d[0].c.length).toEqual(4); - entity.target.d.push({ a: 1, b: 2, c: [1, 2, 3] }); - expect(entity.target.d.length).toEqual(3); - entity.target.d[entity.target.d.length - 1].a += 1; - expect(entity.target.d[entity.target.d.length - 1].a).toEqual(2); - entity.target.d[entity.target.d.length - 1].b += 1; - expect(entity.target.d[entity.target.d.length - 1].b).toEqual(3); - entity.target.d[entity.target.d.length - 1].c.push(4); - expect(entity.target.d[entity.target.d.length - 1].c.length).toEqual(4); - entity.target.d.splice(1, 1); - expect(entity.target.d.length).toEqual(2); - (entity.target as any)['newProp'] = 'test'; - expect((entity.target as any)['newProp']).toEqual('test'); - (entity.target as any)['newObj'] = { a: 1, b: 2 }; - (entity.target as any)['newObj'].a += 1; - (entity.target as any)['newObj'].b += 1; - expect((entity.target as any)['newObj'].a).toEqual(2); - expect((entity.target as any)['newObj'].b).toEqual(3); - // Note: splice of array gives multiple changes: - // - change of position of each element - // - change of array's length - expect(changes).toEqual(19); - finish(undefined, done); - }); - }); - - it(config.regular.list[2], function () { - return runners.noSession(config.regular, 2, async (logger, done) => { - const observe = new Factory.Stream().asDlt().tcp().get(); - checkStream(observe, { udp: false, tcp: true, serial: false, process: false }); - const stream = observe.origin.as<$.Origin.Stream.Configuration>( - $.Origin.Stream.Configuration, - ) as $.Origin.Stream.Configuration; - expect(stream instanceof $.Origin.Stream.Configuration).toEqual(true); - stream.change( - new $.Origin.Stream.Stream.UDP.Configuration( - $.Origin.Stream.Stream.UDP.Configuration.initial(), - undefined, - ), - ); - expect( - stream.as<$.Origin.Stream.Stream.UDP.Configuration>( - $.Origin.Stream.Stream.UDP.Configuration, - ) instanceof $.Origin.Stream.Stream.UDP.Configuration, - ).toEqual(true); - checkStream(observe, { udp: true, tcp: false, serial: false, process: false }); - stream.change( - new $.Origin.Stream.Stream.Serial.Configuration( - $.Origin.Stream.Stream.Serial.Configuration.initial(), - undefined, - ), - ); - checkStream(observe, { udp: false, tcp: false, serial: true, process: false }); - expect( - stream.as<$.Origin.Stream.Stream.Serial.Configuration>( - $.Origin.Stream.Stream.Serial.Configuration, - ) instanceof $.Origin.Stream.Stream.Serial.Configuration, - ).toEqual(true); - stream.change( - new $.Origin.Stream.Stream.Process.Configuration( - $.Origin.Stream.Stream.Process.Configuration.initial(), - undefined, - ), - ); - checkStream(observe, { udp: false, tcp: false, serial: false, process: true }); - expect( - stream.as<$.Origin.Stream.Stream.Process.Configuration>( - $.Origin.Stream.Stream.Process.Configuration, - ) instanceof $.Origin.Stream.Stream.Process.Configuration, - ).toEqual(true); - // Command for process isn't defined; so validation should give error - expect(observe.validate() instanceof Error).toEqual(true); - const process = observe.origin.as<$.Origin.Stream.Stream.Process.Configuration>( - $.Origin.Stream.Stream.Process.Configuration, - ) as $.Origin.Stream.Stream.Process.Configuration; - expect(process !== undefined).toEqual(true); - process.configuration.command = 'ls -lsa'; - process.configuration.cwd = '/'; - // As soon as command and cwd are defined, validation should be OK - expect(observe.validate() instanceof Error).toEqual(false); - // Set invalid command - process.configuration.command = ''; - expect(observe.validate() instanceof Error).toEqual(true); - stream.change( - new $.Origin.Stream.Stream.TCP.Configuration( - $.Origin.Stream.Stream.TCP.Configuration.initial(), - undefined, - ), - ); - checkStream(observe, { udp: false, tcp: true, serial: false, process: false }); - expect( - stream.as<$.Origin.Stream.Stream.TCP.Configuration>( - $.Origin.Stream.Stream.TCP.Configuration, - ) instanceof $.Origin.Stream.Stream.TCP.Configuration, - ).toEqual(true); - const tcp = observe.origin.as<$.Origin.Stream.Stream.TCP.Configuration>( - $.Origin.Stream.Stream.TCP.Configuration, - ) as $.Origin.Stream.Stream.TCP.Configuration; - expect(tcp !== undefined).toEqual(true); - // No binding address, should be error - expect(observe.validate() instanceof Error).toEqual(true); - tcp.configuration.bind_addr = '0.0.0.0'; - // Valid IP address setup, no errors should be - expect(observe.validate() instanceof Error).toEqual(false); - stream.change( - new $.Origin.Stream.Stream.UDP.Configuration( - $.Origin.Stream.Stream.UDP.Configuration.initial(), - undefined, - ), - ); - checkStream(observe, { udp: true, tcp: false, serial: false, process: false }); - const udp = observe.origin.as<$.Origin.Stream.Stream.UDP.Configuration>( - $.Origin.Stream.Stream.UDP.Configuration, - ) as $.Origin.Stream.Stream.UDP.Configuration; - expect(udp !== undefined).toEqual(true); - // No binding address, should be error - expect(observe.validate() instanceof Error).toEqual(true); - udp.configuration.bind_addr = '0.0.0.0'; - // Valid IP address setup, no errors should be - expect(observe.validate() instanceof Error).toEqual(false); - udp.configuration.multicast.push({ - multiaddr: '', - interface: '', - }); - // Not valid multicast, should be error - expect(observe.validate() instanceof Error).toEqual(true); - udp.configuration.multicast[0].multiaddr = '0.0.0.0'; - udp.configuration.multicast[0].interface = '0.0.0.0'; - // Valid multicast setup, no errors should be - expect(observe.validate() instanceof Error).toEqual(false); - finish(undefined, done); - }); - }); - - it(config.regular.list[3], function () { - return runners.noSession(config.regular, 3, async (logger, done) => { - const observe = new Factory.File().type($.Types.File.FileType.Text).asText().get(); - checkContext(observe, { file: true, concat: false, stream: false }); - let file = observe.origin.as<$.Origin.File.Configuration>( - $.Origin.File.Configuration, - ) as $.Origin.File.Configuration; - expect(file.filetype()).toEqual($.Types.File.FileType.Text); - expect(observe.validate() instanceof Error).toEqual(true); - const filename = '/some_file_name'; - file.set().filename(filename); - expect(observe.validate() instanceof Error).toEqual(false); - file.set().type($.Types.File.FileType.Binary); - observe.parser.change( - new $.Parser.Dlt.Configuration($.Parser.Dlt.Configuration.initial(), undefined), - ); - expect(observe.validate() instanceof Error).toEqual(false); - file = observe.origin.as<$.Origin.File.Configuration>( - $.Origin.File.Configuration, - ) as $.Origin.File.Configuration; - expect(file.filename()).toEqual(filename); - expect(file.filetype()).toEqual($.Types.File.FileType.Binary); - finish(undefined, done); - }); - }); - - it(config.regular.list[4], function () { - return runners.noSession(config.regular, 4, async (logger, done) => { - const observe = new Factory.File().type($.Types.File.FileType.Text).asText().get(); - checkParser(observe, { text: true, dlt: false, someip: false }); - let file = observe.origin.as<$.Origin.File.Configuration>( - $.Origin.File.Configuration, - ) as $.Origin.File.Configuration; - expect(file.filetype()).toEqual($.Types.File.FileType.Text); - file.set().type($.Types.File.FileType.Binary); - observe.parser.change( - new $.Parser.Dlt.Configuration($.Parser.Dlt.Configuration.initial(), undefined), - ); - checkParser(observe, { text: false, dlt: true, someip: false }); - expect(observe.validate() instanceof Error).toEqual(true); - file.set().type($.Types.File.FileType.PcapNG); - observe.parser.change( - new $.Parser.SomeIp.Configuration( - $.Parser.SomeIp.Configuration.initial(), - undefined, - ), - ); - checkParser(observe, { text: false, dlt: false, someip: true }); - expect(observe.validate() instanceof Error).toEqual(true); - file.set().filename('some_file'); - expect(observe.validate() instanceof Error).toEqual(false); - finish(undefined, done); - }); - }); - - it(config.regular.list[5], function () { - return runners.noSession(config.regular, 5, async (logger, done) => { - const observe = new Factory.Stream().asDlt().tcp().get(); - checkStream(observe, { udp: false, tcp: true, serial: false, process: false }); - observe.subscribe(() => { - if (currentAction >= actions.length) { - console.log(`[warn] Update out of actions (this is NOT an error)`); - return; - } - actions[currentAction].check(); - next(); - }); - const actions = [ - { - action: () => { - const stream = observe.origin.as<$.Origin.Stream.Configuration>( - $.Origin.Stream.Configuration, - ) as $.Origin.Stream.Configuration; - expect(stream instanceof $.Origin.Stream.Configuration).toEqual(true); - stream.change( - new $.Origin.Stream.Stream.UDP.Configuration( - $.Origin.Stream.Stream.UDP.Configuration.initial(), - undefined, - ), - ); - }, - check: () => { - checkStream(observe, { - udp: true, - tcp: false, - serial: false, - process: false, - }); - expect(observe.validate() instanceof Error).toEqual(true); - }, - }, - { - action: () => { - const udp = observe.origin.as<$.Origin.Stream.Stream.UDP.Configuration>( - $.Origin.Stream.Stream.UDP.Configuration, - ) as $.Origin.Stream.Stream.UDP.Configuration; - expect(udp instanceof $.Origin.Stream.Stream.UDP.Configuration).toEqual( - true, - ); - udp.configuration.bind_addr = '0.0.0.0'; - }, - check: () => { - expect(observe.validate() instanceof Error).toEqual(false); - }, - }, - { - action: () => { - const udp = observe.origin.as<$.Origin.Stream.Stream.UDP.Configuration>( - $.Origin.Stream.Stream.UDP.Configuration, - ) as $.Origin.Stream.Stream.UDP.Configuration; - expect(udp instanceof $.Origin.Stream.Stream.UDP.Configuration).toEqual( - true, - ); - udp.configuration.multicast.push({ multiaddr: '', interface: '0.0.0.0' }); - }, - check: () => { - expect(observe.validate() instanceof Error).toEqual(true); - const udp = observe.origin.as<$.Origin.Stream.Stream.UDP.Configuration>( - $.Origin.Stream.Stream.UDP.Configuration, - ) as $.Origin.Stream.Stream.UDP.Configuration; - expect(udp instanceof $.Origin.Stream.Stream.UDP.Configuration).toEqual( - true, - ); - expect(udp.configuration.multicast.length).toEqual(1); - }, - }, - { - action: () => { - const udp = observe.origin.as<$.Origin.Stream.Stream.UDP.Configuration>( - $.Origin.Stream.Stream.UDP.Configuration, - ) as $.Origin.Stream.Stream.UDP.Configuration; - expect(udp instanceof $.Origin.Stream.Stream.UDP.Configuration).toEqual( - true, - ); - udp.configuration.multicast[0].multiaddr = '0.0.0.0'; - }, - check: () => { - const udp = observe.origin.as<$.Origin.Stream.Stream.UDP.Configuration>( - $.Origin.Stream.Stream.UDP.Configuration, - ) as $.Origin.Stream.Stream.UDP.Configuration; - expect(udp instanceof $.Origin.Stream.Stream.UDP.Configuration).toEqual( - true, - ); - expect(udp.configuration.multicast[0].multiaddr).toEqual('0.0.0.0'); - }, - }, - { - action: () => { - const udp = observe.origin.as<$.Origin.Stream.Stream.UDP.Configuration>( - $.Origin.Stream.Stream.UDP.Configuration, - ) as $.Origin.Stream.Stream.UDP.Configuration; - expect(udp instanceof $.Origin.Stream.Stream.UDP.Configuration).toEqual( - true, - ); - udp.configuration.multicast.splice(0, 1); - }, - check: () => { - const udp = observe.origin.as<$.Origin.Stream.Stream.UDP.Configuration>( - $.Origin.Stream.Stream.UDP.Configuration, - ) as $.Origin.Stream.Stream.UDP.Configuration; - expect(udp instanceof $.Origin.Stream.Stream.UDP.Configuration).toEqual( - true, - ); - expect(udp.configuration.multicast.length).toEqual(0); - }, - }, - ]; - let currentAction = -1; - const next = () => { - currentAction += 1; - if (currentAction >= actions.length) { - finish(undefined, done); - return; - } - actions[currentAction].action(); - }; - next(); - }); - }); - - it(config.regular.list[6], function () { - return runners.noSession(config.regular, 6, async (logger, done) => { - const observe = new Factory.Stream().asText().serial().get(); - checkContext(observe, { file: false, concat: false, stream: true }); - const serial = observe.origin.as<$.Origin.Stream.Stream.Serial.Configuration>( - $.Origin.Stream.Stream.Serial.Configuration, - ) as $.Origin.Stream.Stream.Serial.Configuration; - expect(serial instanceof $.Origin.Stream.Stream.Serial.Configuration).toEqual(true); - expect(typeof serial.configuration.path).toEqual('string'); - const initial = $.Origin.Stream.Stream.Serial.Configuration.initial(); - initial.path = '/dev/test'; - serial.overwrite(initial); - expect(typeof serial.configuration.path).toEqual('string'); - expect(serial.configuration.path).toEqual('/dev/test'); - const stream = observe.origin.as<$.Origin.Stream.Configuration>( - $.Origin.Stream.Configuration, - ) as $.Origin.Stream.Configuration; - expect(stream instanceof $.Origin.Stream.Configuration).toEqual(true); - stream.change( - new $.Origin.Stream.Stream.Process.Configuration( - $.Origin.Stream.Stream.Process.Configuration.initial(), - undefined, - ), - ); - const process = observe.origin.as<$.Origin.Stream.Stream.Process.Configuration>( - $.Origin.Stream.Stream.Process.Configuration, - ) as $.Origin.Stream.Stream.Process.Configuration; - expect(process instanceof $.Origin.Stream.Stream.Process.Configuration).toEqual(true); - const params = $.Origin.Stream.Stream.Process.Configuration.initial(); - params.command = 'test'; - process.overwrite(params); - expect(typeof process.configuration.command).toEqual('string'); - expect(process.configuration.command).toEqual('test'); - finish(undefined, done); - }); - }); -}); diff --git a/application/apps/rustcore/ts-bindings/spec/session.promises.spec.ts b/application/apps/rustcore/ts-bindings/spec/session.promises.spec.ts deleted file mode 100644 index d86d7ee513..0000000000 --- a/application/apps/rustcore/ts-bindings/spec/session.promises.spec.ts +++ /dev/null @@ -1,334 +0,0 @@ -// tslint:disable -// We need to provide path to TypeScript types definitions -/// -/// - -import { initLogger } from './logger'; -initLogger(); -import { finish } from './common'; -import { readConfigurationFile } from './config'; -import { CancelablePromise } from 'platform/env/promise'; - -import * as runners from './runners'; - -const config = readConfigurationFile().get().tests.promises; - -describe('Promises', function () { - it(config.regular.list[1], function () { - return runners.noSession(config.regular, 1, async (logger, done) => { - let resolved = 0; - let rejected = 0; - Promise.allSettled([ - new CancelablePromise((resolve, _reject) => { - setTimeout(resolve, 50); - }) - .then(() => { - resolved += 1; - }) - .asPromise(), - new CancelablePromise((_resolve, reject) => { - setTimeout(() => { - reject(new Error(`Dummy error`)); - }, 50); - }) - .catch(() => { - rejected += 1; - }) - .asPromise(), - ]) - .then(() => { - expect(resolved).toBe(1); - expect(rejected).toBe(1); - finish(undefined, done, undefined); - }) - .catch((err: Error) => { - finish(undefined, done, err); - }); - }); - }); - - it(config.regular.list[2], function () { - return runners.noSession(config.regular, 2, async (logger, done) => { - new CancelablePromise((_resolve, reject) => { - setTimeout(() => { - reject(new Error(`Dummy error`)); - }, 50); - }) - - .catch((err: Error) => { - finish(undefined, done, err); - }) - .then(() => { - finish(undefined, done, new Error(`Promise should be cancelled`)); - }) - .canceled(() => { - // Set timer to make sure - promise ONLY cancelled - setTimeout(() => { - finish(undefined, done, undefined); - }, 100); - }) - .abort(); - }); - }); - - it(config.regular.list[3], function () { - return runners.noSession(config.regular, 3, async (logger, done) => { - let delegated = false; - new CancelablePromise((_resolve, reject, cancel, setCancelDelegation) => { - setCancelDelegation(() => { - setTimeout(() => { - delegated = true; - cancel(); - }, 100); - }); - setTimeout(() => { - reject(new Error(`Dummy error`)); - }, 50); - }) - .catch((err: Error) => { - finish(undefined, done, err); - }) - .then(() => { - finish(undefined, done, new Error(`Promise should be cancelled`)); - }) - .canceled(() => { - // Set timer to make sure - promise ONLY cancelled - setTimeout(() => { - expect(delegated).toBe(true); - finish(undefined, done, undefined); - }, 100); - }) - .abort(); - }); - }); - - it(config.regular.list[4], function () { - return runners.noSession(config.regular, 4, async (logger, done) => { - let resolved = 0; - let rejected = 0; - const a = new CancelablePromise((resolve, _reject) => { - setTimeout(resolve, 50); - }) - .then(() => { - resolved += 1; - }) - .catch(() => { - rejected += 1; - }); - const b = new CancelablePromise((_resolve, _reject) => {}) - .then(() => { - resolved += 1; - }) - .catch(() => { - rejected += 1; - }); - a.bind(b); - Promise.allSettled([a.asPromise(), b.asPromise()]) - .then(() => { - expect(resolved).toBe(2); - expect(rejected).toBe(0); - finish(undefined, done, undefined); - }) - .catch((err: Error) => { - finish(undefined, done, err); - }); - }); - }); - - it(config.regular.list[5], function () { - return runners.noSession(config.regular, 5, async (logger, done) => { - let resolved = 0; - let rejected = 0; - const a = new CancelablePromise((_resolve, reject) => { - setTimeout(() => { - reject(new Error('Dummy error')); - }, 50); - }) - .then(() => { - resolved += 1; - }) - .catch(() => { - rejected += 1; - }); - const b = new CancelablePromise((_resolve, _reject) => {}) - .then(() => { - resolved += 1; - }) - .catch(() => { - rejected += 1; - }); - b.bind(a); - Promise.allSettled([a.asPromise(), b.asPromise()]) - .then(() => { - expect(resolved).toBe(0); - expect(rejected).toBe(2); - finish(undefined, done, undefined); - }) - .catch((err: Error) => { - finish(undefined, done, err); - }); - }); - }); - - it(config.regular.list[6], function () { - return runners.noSession(config.regular, 6, async (logger, done) => { - let resolved = 0; - let rejected = 0; - let canceled = 0; - const a = new CancelablePromise((_resolve, _reject, cancel) => { - setTimeout(cancel, 50); - }) - .then(() => { - resolved += 1; - }) - .canceled(() => { - canceled += 1; - }) - .catch(() => { - rejected += 1; - }); - const b = new CancelablePromise((_resolve, _reject) => {}) - .then(() => { - resolved += 1; - }) - .canceled(() => { - canceled += 1; - }) - .catch(() => { - rejected += 1; - }); - a.bind(b); - Promise.allSettled([a.asPromise(), b.asPromise()]) - .then(() => { - expect(resolved).toBe(0); - expect(canceled).toBe(2); - expect(rejected).toBe(0); - finish(undefined, done, undefined); - }) - .catch((err: Error) => { - finish(undefined, done, err); - }); - }); - }); - - it(config.regular.list[7], function () { - return runners.noSession(config.regular, 7, async (logger, done) => { - let resolved = 0; - let rejected = 0; - let canceled = 0; - let delegated = false; - const a = new CancelablePromise((_resolve, _reject, cancel, setCancelDelegation) => { - setCancelDelegation(() => { - setTimeout(() => { - delegated = true; - cancel(); - }, 100); - }); - }) - .then(() => { - resolved += 1; - }) - .canceled(() => { - canceled += 1; - }) - .catch(() => { - rejected += 1; - }); - const b = new CancelablePromise((_resolve, _reject) => {}) - .then(() => { - resolved += 1; - }) - .canceled(() => { - canceled += 1; - }) - .catch(() => { - rejected += 1; - }); - a.bind(b); - setTimeout(() => { - b.abort(); - }, 50); - Promise.allSettled([a.asPromise(), b.asPromise()]) - .then(() => { - expect(resolved).toBe(0); - expect(canceled).toBe(2); - expect(rejected).toBe(0); - expect(delegated).toBe(true); - finish(undefined, done, undefined); - }) - .catch((err: Error) => { - finish(undefined, done, err); - }); - }); - }); - - it(config.regular.list[8], function () { - return runners.noSession(config.regular, 8, async (logger, done) => { - let resolved = 0; - let rejected = 0; - let canceled = 0; - let emitted = 0; - let delegated = false; - const a = new CancelablePromise( - (_resolve, _reject, cancel, setCancelDelegation, self) => { - setCancelDelegation(() => { - setTimeout(() => { - delegated = true; - cancel(); - }, 100); - }); - }, - ) - .then(() => { - resolved += 1; - }) - .canceled(() => { - canceled += 1; - }) - .catch(() => { - rejected += 1; - }) - .on('test', (event) => { - expect(event).toBe(42); - emitted += 1; - }); - a.emit('test', 42); - const b = new CancelablePromise((_resolve, _reject) => {}) - .then(() => { - resolved += 1; - }) - .canceled(() => { - canceled += 1; - }) - .catch(() => { - rejected += 1; - }) - .on('test', (event) => { - expect(event).toBe(42); - emitted += 1; - }); - a.bind(b); - setTimeout(() => { - b.abort(); - }, 50); - Promise.allSettled([a.asPromise(), b.asPromise()]) - .then(() => { - // This event should ignored, because promise already finished - a.emit('test', 42); - b.emit('test', 42); - // Check results with delay to make sure nothing useless happens - setTimeout(() => { - expect(resolved).toBe(0); - expect(canceled).toBe(2); - expect(rejected).toBe(0); - expect(emitted).toBe(1); - expect(delegated).toBe(true); - finish(undefined, done, undefined); - }, 100); - }) - .catch((err: Error) => { - finish(undefined, done, err); - }); - }); - }); -}); diff --git a/application/apps/rustcore/ts-bindings/spec/session.protocol.spec.ts b/application/apps/rustcore/ts-bindings/spec/session.protocol.spec.ts deleted file mode 100644 index 006fe47feb..0000000000 --- a/application/apps/rustcore/ts-bindings/spec/session.protocol.spec.ts +++ /dev/null @@ -1,358 +0,0 @@ -// tslint:disable - -// We need to provide path to TypeScript types definitions -/// -/// -import { initLogger } from './logger'; -initLogger(); - -import { finish } from './common'; -import { readConfigurationFile } from './config'; - -import * as protocol from 'protocol'; -import * as $ from 'platform/types/observe'; -import * as runners from './runners'; -import * as fs from 'fs'; -import * as path from 'path'; - -const config = readConfigurationFile().get().tests.protocol; - -function deepEqualObj(a: any, b: any, depth = Infinity): boolean { - if (depth < 1 || (typeof a !== 'object' && typeof b !== 'object')) { - return a === b || (a == null && b == null); - } - if (a == null || b == null) { - return a == null && b == null; - } - if (Array.isArray(a) && Array.isArray(b)) { - if (a.length !== b.length) return false; - return a.every((item, index) => deepEqualObj(item, b[index], depth - 1)); - } - if (a instanceof Map && b instanceof Map) { - if (a.size !== b.size) { - return false; - } - for (let [key, value] of a) { - if (!b.has(key)) return false; - if (!deepEqualObj(b.get(key), value)) return false; - } - } else if (typeof a === 'object' && typeof b === 'object') { - const keys1 = Object.keys(a); - const keys2 = Object.keys(b); - - if (keys1.length !== keys2.length) return false; - if (!keys1.every((key) => keys2.includes(key))) return false; - - return keys1.every((key) => deepEqualObj(a[key], b[key], depth - 1)); - } - return a === b; -} - -const MAP: { [key: string]: (buf: Uint8Array) => any } = { - AroundIndexes: protocol.decodeAroundIndexes, - AttachmentInfo: protocol.decodeAttachmentInfo, - AttachmentList: protocol.decodeAttachmentList, - CallbackEvent: protocol.decodeCallbackEvent, - CommandOutcome_bool: protocol.decodeCommandOutcomeWithbool, - CommandOutcome_FoldersScanningResult: protocol.decodeCommandOutcomeWithFoldersScanningResult, - CommandOutcome_DltStatisticInfo: protocol.decodeCommandOutcomeWithDltStatisticInfo, - CommandOutcome_ProfileList: protocol.decodeCommandOutcomeWithProfileList, - CommandOutcome_MapKeyValue: protocol.decodeCommandOutcomeWithMapKeyValue, - CommandOutcome_i64: protocol.decodeCommandOutcomeWithi64, - CommandOutcome_Option_String: protocol.decodeCommandOutcomeWithOptionString, - CommandOutcome_SerialPortsList: protocol.decodeCommandOutcomeWithSerialPortsList, - CommandOutcome_String: protocol.decodeCommandOutcomeWithString, - CommandOutcome_Void: protocol.decodeCommandOutcomeWithVoid, - ComputationError: protocol.decodeComputationError, - DltParserSettings: protocol.decodeDltParserSettings, - FileFormat: protocol.decodeFileFormat, - FilterMatch: protocol.decodeFilterMatch, - FilterMatchList: protocol.decodeFilterMatchList, - FolderEntity: protocol.decodeFolderEntity, - FolderEntityDetails: protocol.decodeFolderEntityDetails, - FolderEntityType: protocol.decodeFolderEntityType, - FoldersScanningResult: protocol.decodeFoldersScanningResult, - GrabbedElement: protocol.decodeGrabbedElement, - GrabbedElementList: protocol.decodeGrabbedElementList, - LifecycleTransition: protocol.decodeLifecycleTransition, - MulticastInfo: protocol.decodeMulticastInfo, - NativeError: protocol.decodeNativeError, - NativeErrorKind: protocol.decodeNativeErrorKind, - ObserveOptions: protocol.decodeObserveOptions, - ObserveOrigin: protocol.decodeObserveOrigin, - OperationDone: protocol.decodeOperationDone, - ParserType: protocol.decodeParserType, - ProcessTransportConfig: protocol.decodeProcessTransportConfig, - Progress: protocol.decodeProgress, - Ranges: protocol.decodeRanges, - SdeRequest: protocol.decodeSdeRequest, - SdeResponse: protocol.decodeSdeResponse, - SerialPortsList: protocol.decodeSerialPortsList, - SerialTransportConfig: protocol.decodeSerialTransportConfig, - Severity: protocol.decodeSeverity, - SomeIpParserSettings: protocol.decodeSomeIpParserSettings, - SourceDefinition: protocol.decodeSourceDefinition, - Sources: protocol.decodeSources, - TCPTransportConfig: protocol.decodeTCPTransportConfig, - Transport: protocol.decodeTransport, - UdpConnectionInfo: protocol.decodeUdpConnectionInfo, - UDPTransportConfig: protocol.decodeUDPTransportConfig, - DltStatisticInfo: protocol.decodeDltStatisticInfo, - ShellType: protocol.decodeShellType, - ShellProfile: protocol.decodeShellProfile, - ProfileList: protocol.decodeProfileList, - ExtractedMatchValue: protocol.decodeExtractedMatchValue, - ResultExtractedMatchValues: protocol.decodeResultExtractedMatchValues, - ResultU64: protocol.decodeResultU64, - ResultBool: protocol.decodeResultBool, - ResultSleep: protocol.decodeResultSleep, - NearestPosition: protocol.decodeNearestPosition, - ResultNearestPosition: protocol.decodeResultNearestPosition, - Point: protocol.decodePoint, - ResultSearchValues: protocol.decodeResultSearchValues, - ResultScaledDistribution: protocol.decodeResultScaledDistribution, - DltLevelDistribution: protocol.decodeDltLevelDistribution, - PluginParserSettings: protocol.decodePluginParserSettings, - PluginParserGeneralSettings: protocol.decodePluginParserGeneralSettings, - PluginByteSourceSettings: protocol.decodePluginByteSourceSettings, - PluginByteSourceGeneralSettings: protocol.decodePluginByteSourceGeneralSettings, - PluginConfigItem: protocol.decodePluginConfigItem, - PluginConfigValue: protocol.decodePluginConfigValue, - PluginConfigSchemaType: protocol.decodePluginConfigSchemaType, - PluginConfigSchemaItem: protocol.decodePluginConfigSchemaItem, - PluginEntity: protocol.decodePluginEntity, - PluginMetadata: protocol.decodePluginMetadata, - PluginType: protocol.decodePluginType, - PluginInfo: protocol.decodePluginInfo, - PluginLogMessage: protocol.decodePluginLogMessage, - PluginLogLevel: protocol.decodePluginLogLevel, - InvalidPluginEntity: protocol.decodeInvalidPluginEntity, - SemanticVersion: protocol.decodeSemanticVersion, - RenderOptions: protocol.decodeRenderOptions, - ParserRenderOptions: protocol.decodeParserRenderOptions, - ColumnsRenderOptions: protocol.decodeColumnsRenderOptions, - ColumnInfo: protocol.decodeColumnInfo, - PluginsList: protocol.decodePluginsList, - InvalidPluginsList: protocol.decodeInvalidPluginsList, - PluginsPathsList: protocol.decodePluginsPathsList, - CommandOutcome_PluginsList: protocol.decodeCommandOutcomeWithPluginsList, - CommandOutcome_InvalidPluginsList: protocol.decodeCommandOutcomeWithInvalidPluginsList, - CommandOutcome_PluginsPathsList: protocol.decodeCommandOutcomeWithPluginsPathsList, - CommandOutcome_Option_PluginEntity: protocol.decodeCommandOutcomeWithOptionPluginEntity, - CommandOutcome_Option_InvalidPluginEntity: - protocol.decodeCommandOutcomeWithOptionInvalidPluginEntity, - CommandOutcome_Option_PluginRunData: protocol.decodeCommandOutcomeWithOptionPluginRunData, -}; - -const OUTPUT_PATH_ENVVAR = 'CHIPMUNK_PROTOCOL_TEST_OUTPUT'; - -describe('Protocol', function () { - it(config.regular.list[1], function () { - return runners.noSession(config.regular, 1, async (logger, done) => { - function check(origin: $.IObserve) { - const bytes = protocol.encodeObserveOptions(origin); - const decoded = protocol.decodeObserveOptions(bytes); - expect(deepEqualObj(decoded, origin)).toBe(true); - } - check({ - origin: { File: ['somefile', $.Types.File.FileType.Text, 'path_to_file'] }, - parser: { Text: null }, - }); - check({ - origin: { - Stream: ['stream', { TCP: { bind_addr: '0.0.0.0' } }], - }, - parser: { Text: null }, - }); - check({ - origin: { - Stream: [ - 'stream', - { - Process: { - command: 'command', - cwd: 'cwd', - shell: undefined, - }, - }, - ], - }, - parser: { Text: null }, - }); - check({ - origin: { - Concat: [ - ['somefile1', $.Types.File.FileType.Text, 'path_to_file'], - ['somefile2', $.Types.File.FileType.Text, 'path_to_file'], - ['somefile3', $.Types.File.FileType.Text, 'path_to_file'], - ], - }, - parser: { Text: null }, - }); - check({ - origin: { - File: ['somefile', $.Types.File.FileType.Binary, 'path_to_file'], - }, - parser: { - Dlt: { - fibex_file_paths: ['path'], - filter_config: undefined, - with_storage_header: true, - tz: 'zz', - }, - }, - }); - check({ - origin: { - File: ['somefile', $.Types.File.FileType.Binary, 'path_to_file'], - }, - parser: { - Dlt: { - fibex_file_paths: [], - filter_config: undefined, - with_storage_header: true, - tz: 'zz', - }, - }, - }); - check({ - origin: { - File: ['somefile', $.Types.File.FileType.Binary, 'path_to_file'], - }, - parser: { - Dlt: { - fibex_file_paths: undefined, - filter_config: undefined, - with_storage_header: true, - tz: 'zz', - }, - }, - }); - check({ - origin: { - File: ['somefile', $.Types.File.FileType.Binary, 'path_to_file'], - }, - parser: { - Dlt: { - fibex_file_paths: ['path'], - filter_config: { - min_log_level: 1, - app_id_count: 1, - context_id_count: 1, - app_ids: ['test'], - ecu_ids: ['test'], - context_ids: ['test'], - }, - with_storage_header: true, - tz: 'zz', - }, - }, - }); - check({ - origin: { - File: ['somefile', $.Types.File.FileType.PcapNG, 'path_to_file'], - }, - parser: { - SomeIp: { - fibex_file_paths: ['path'], - }, - }, - }); - check({ - origin: { - File: ['somefile', $.Types.File.FileType.PcapNG, 'path_to_file'], - }, - parser: { - SomeIp: { - fibex_file_paths: [], - }, - }, - }); - check({ - origin: { - File: ['somefile', $.Types.File.FileType.PcapNG, 'path_to_file'], - }, - parser: { - SomeIp: { - fibex_file_paths: undefined, - }, - }, - }); - finish(undefined, done); - }); - }); - it(config.regular.list[2], function () { - return runners.noSession(config.regular, 2, async (logger, done) => { - const casesPath = process.env[OUTPUT_PATH_ENVVAR]; - if (typeof casesPath !== 'string' || casesPath.trim() === '') { - console.log( - `${'='.repeat(50)}\n${logger.warn( - `Testing of all use-cases is skipped because ${OUTPUT_PATH_ENVVAR} isn't defined`, - )}\n${'='.repeat(50)}`, - ); - return finish(undefined, done); - } - if (!fs.existsSync(casesPath)) { - return finish( - undefined, - done, - new Error( - `Fail to find data passed due ${OUTPUT_PATH_ENVVAR}: ${casesPath} doesn't exist`, - ), - ); - } - const folders = fs.readdirSync(casesPath); - for (let typeOfMessage of folders) { - const targetFullPath = path.join(casesPath, typeOfMessage); - if (!fs.statSync(targetFullPath).isDirectory()) { - continue; - } - const cases = fs.readdirSync(targetFullPath); - for (let testCase of cases) { - const fullPath = path.join(targetFullPath, testCase); - if (!fs.statSync(fullPath).isFile()) { - continue; - } - const buffer = fs.readFileSync(fullPath); - const decoder = MAP[typeOfMessage]; - if (decoder === undefined) { - return finish( - undefined, - done, - new Error(`Fail to find decoder for ${typeOfMessage}`), - ); - } - const _msg = decoder(Uint8Array.from(buffer)); - } - console.log(`[OK]: ${typeOfMessage}`); - } - finish(undefined, done); - }); - }); - it(config.regular.list[3], function () { - return runners.withSession(config.regular, 3, async (logger, done, comps) => { - const MESSAGES_COUNT = 100; - const meausere: { json: number; bin: number } = { json: 0, bin: 0 }; - meausere.json = Date.now(); - for (let i = MESSAGES_COUNT; i >= 0; i -= 1) { - const msg = comps.session.getNativeSession().testGrabElsAsJson(); - expect(msg instanceof Array).toBe(true); - } - meausere.json = Date.now() - meausere.json; - meausere.bin = Date.now(); - for (let i = MESSAGES_COUNT; i >= 0; i -= 1) { - const msg = comps.session.getNativeSession().testGrabElsAsBin(); - expect(msg instanceof Array).toBe(true); - } - meausere.bin = Date.now() - meausere.bin; - console.log( - `Grabbing messages (with decoding) count: ${MESSAGES_COUNT}\nJSON: ${ - meausere.json - }ms (per msg ${(meausere.json / MESSAGES_COUNT).toFixed(4)});\nBIN: ${ - meausere.bin - }ms (per msg ${(meausere.bin / MESSAGES_COUNT).toFixed(4)})`, - ); - finish(comps.session, done); - }); - }); -}); diff --git a/application/apps/rustcore/ts-bindings/spec/session.ranges.spec.ts b/application/apps/rustcore/ts-bindings/spec/session.ranges.spec.ts deleted file mode 100644 index b04c5c48bc..0000000000 --- a/application/apps/rustcore/ts-bindings/spec/session.ranges.spec.ts +++ /dev/null @@ -1,100 +0,0 @@ -// tslint:disable -// We need to provide path to TypeScript types definitions -/// -/// - -import { initLogger } from './logger'; -initLogger(); -import { Factory } from '../src/api/session'; -import { GrabbedElement } from 'platform/types/bindings'; -import { createSampleFile, finish } from './common'; -import { readConfigurationFile } from './config'; - -import * as runners from './runners'; - -const config = readConfigurationFile().get().tests.ranges; - -function sum(from: number, to: number): number { - let s = 0; - for (let i = from; i <= to; i += 1) { - s += i; - } - return s; -} - -describe('Grab ranges', function () { - it(config.regular.list[1], function () { - return runners.withSession(config.regular, 1, async (logger, done, comps) => { - const tmpobj = createSampleFile(1000, logger, (i: number) => `${i}\n`); - comps.stream - .observe( - new Factory.File() - .asText() - .type(Factory.FileType.Text) - .file(tmpobj.name) - .get() - .sterilized(), - ) - .catch(finish.bind(null, comps.session, done)); - let grabbing: boolean = false; - comps.events.StreamUpdated.subscribe((rows: number) => { - if (rows === 0 || grabbing) { - return; - } - grabbing = true; - Promise.all([ - comps.stream - .grabRanges([{ start: 0, end: 99 }]) - .then((result: GrabbedElement[]) => { - logger.debug('result of grab was: ' + JSON.stringify(result)); - expect( - result - .map((v) => parseInt(v.content, 10)) - .reduce((partialSum, a) => partialSum + a, 0), - ).toEqual(sum(0, 99)); - }), - comps.stream - .grabRanges([ - { start: 0, end: 0 }, - { start: 10, end: 10 }, - ]) - .then((result: GrabbedElement[]) => { - logger.debug('result of grab was: ' + JSON.stringify(result)); - expect(result.length).toEqual(2); - expect(parseInt(result[0].content, 10)).toEqual(0); - expect(parseInt(result[1].content, 10)).toEqual(10); - }), - comps.stream - .grabRanges([ - { start: 0, end: 10 }, - { start: 99, end: 200 }, - { start: 299, end: 300 }, - { start: 599, end: 600 }, - ]) - .then((result: GrabbedElement[]) => { - logger.debug('result of grab was: ' + JSON.stringify(result)); - expect( - result - .map((v) => parseInt(v.content, 10)) - .reduce((partialSum, a) => partialSum + a, 0), - ).toEqual(sum(0, 10) + sum(99, 200) + sum(299, 300) + sum(599, 600)); - }), - ]) - .then(() => { - finish(comps.session, done); - }) - .catch((err: Error) => { - finish( - comps.session, - done, - new Error( - `Fail to grab data due error: ${ - err instanceof Error ? err.message : err - }`, - ), - ); - }); - }); - }); - }); -}); diff --git a/application/apps/rustcore/ts-bindings/spec/session.search.spec.ts b/application/apps/rustcore/ts-bindings/spec/session.search.spec.ts deleted file mode 100644 index 2f65d60b81..0000000000 --- a/application/apps/rustcore/ts-bindings/spec/session.search.spec.ts +++ /dev/null @@ -1,845 +0,0 @@ -// tslint:disable -// We need to provide path to TypeScript types definitions -/// -/// - -import { initLogger } from './logger'; -initLogger(); -import { Factory } from '../src/api/session'; -import { GrabbedElement } from 'platform/types/bindings'; -import { finish, createSampleFile } from './common'; -import { readConfigurationFile } from './config'; - -import * as runners from './runners'; - -const config = readConfigurationFile().get().tests.search; - -describe('Search', function () { - it(config.regular.list[1], function () { - return runners.withSession(config.regular, 1, async (logger, done, comps) => { - const tmpobj = createSampleFile( - 5000, - logger, - (i: number) => - `[${i}]:: ${ - i % 100 === 0 || i <= 5 ? `some match line data\n` : `some line data\n` - }`, - ); - comps.stream - .observe( - new Factory.File() - .asText() - .type(Factory.FileType.Text) - .file(tmpobj.name) - .get() - .sterilized(), - ) - .on('processing', () => { - comps.search - .search([ - { - filter: 'match', - flags: { reg: true, word: false, cases: false }, - }, - ]) - .then((_) => { - comps.search - .getMap(54) - .then((map) => { - logger.verbose(map); - comps.search - .grab(0, 11) - .then((result: GrabbedElement[]) => { - expect(result.map((i) => i.content)).toEqual([ - '[0]:: some match line data', - '[1]:: some match line data', - '[2]:: some match line data', - '[3]:: some match line data', - '[4]:: some match line data', - '[5]:: some match line data', - '[100]:: some match line data', - '[200]:: some match line data', - '[300]:: some match line data', - '[400]:: some match line data', - '[500]:: some match line data', - ]); - console.log(`GRABBED`); - console.log(result); - expect(result.map((i) => i.pos)).toEqual([ - 0, // 0 - 1, // 1 - 2, // 2 - 3, // 3 - 4, // 4 - 5, // 5 - 100, // 6 - 200, // 7 - 300, // 8 - 400, // 9 - 500, // 10 - ]); - Promise.allSettled( - [ - [10, 5, 5], - [110, 6, 100], - [390, 9, 400], - [600, 11, 600], - ].map((data) => { - return comps.search - .getNearest(data[0]) - .then((nearest) => { - expect(typeof nearest).toEqual( - 'object', - ); - expect((nearest as any).index).toEqual( - data[1], - ); - expect( - (nearest as any).position, - ).toEqual(data[2]); - }) - .catch((err: Error) => { - fail(err); - }); - }), - ) - .then(() => { - comps.search - .len() - .then((len: number) => { - expect(len).toEqual(55); - expect(searchStreamUpdated).toEqual( - true, - ); - comps.stream - .getIndexedRanges() - .then((ranges) => { - expect(ranges[0].start).toEqual( - 0, - ); - expect(ranges[0].end).toEqual( - 5, - ); - expect(ranges.length).toEqual( - 50, - ); - for ( - let i = 1; - i < 50; - i += 1 - ) { - expect( - ranges[i].start, - ).toEqual(i * 100); - expect( - ranges[i].end, - ).toEqual(i * 100); - } - finish(comps.session, done); - }) - .catch((err: Error) => { - finish( - comps.session, - done, - err, - ); - }); - }) - .catch((err: Error) => { - finish(comps.session, done, err); - }); - }) - .catch((err: Error) => { - finish(comps.session, done, err); - }); - }) - .catch((err: Error) => { - finish( - comps.session, - done, - new Error( - `Fail to grab data due error: ${ - err instanceof Error ? err.message : err - }`, - ), - ); - }); - }) - .catch(finish.bind(null, comps.session, done)); - }) - .catch(finish.bind(null, comps.session, done)); - }) - .catch(finish.bind(null, comps.session, done)); - let searchStreamUpdated = false; - comps.events.SearchUpdated.subscribe((event) => { - searchStreamUpdated = true; - }); - }); - }); - - it(config.regular.list[2], function () { - return runners.withSession(config.regular, 2, async (logger, done, comps) => { - const tmpobj = createSampleFile( - 5000, - logger, - (i: number) => - `[${i}]:: ${ - i % 100 === 0 || i <= 5 - ? `some match A line data\n` - : i % 50 === 0 - ? `some match B line data\n` - : i === 9 - ? `some 666 line data\n` - : `some line data\n` - }`, - ); - comps.stream - .observe( - new Factory.File() - .asText() - .type(Factory.FileType.Text) - .file(tmpobj.name) - .get() - .sterilized(), - ) - .on('processing', () => { - comps.search - .search([ - { - filter: 'match A', - flags: { reg: true, word: false, cases: false }, - }, - { - filter: 'match B', - flags: { reg: true, word: false, cases: false }, - }, - { - filter: '666', - flags: { reg: true, word: false, cases: false }, - }, - ]) - .then((result) => { - comps.search - .grab(0, 11) - .then((result: GrabbedElement[]) => { - expect(result.map((i) => i.content)).toEqual([ - '[0]:: some match A line data', - '[1]:: some match A line data', - '[2]:: some match A line data', - '[3]:: some match A line data', - '[4]:: some match A line data', - '[5]:: some match A line data', - '[9]:: some 666 line data', - '[50]:: some match B line data', - '[100]:: some match A line data', - '[150]:: some match B line data', - '[200]:: some match A line data', - ]); - expect(result.map((i) => i.pos)).toEqual([ - 0, // 0 - 1, // 1 - 2, // 2 - 3, // 3 - 4, // 4 - 5, // 5 - 9, // 6 - 50, // 7 - 100, // 8 - 150, // 9 - 200, // 10 - ]); - Promise.allSettled( - [ - [5, 5, 5], - [10, 6, 9], - [55, 7, 50], - [190, 10, 200], - ].map((data) => { - return comps.search - .getNearest(data[0]) - .then((nearest) => { - expect(typeof nearest).toEqual('object'); - expect((nearest as any).index).toEqual(data[1]); - expect((nearest as any).position).toEqual( - data[2], - ); - }) - .catch((err: Error) => { - fail(err); - }); - }), - ) - .then(() => { - comps.search - .len() - .then((len: number) => { - expect(len).toEqual(111); - finish(comps.session, done); - }) - .catch((err: Error) => { - finish(comps.session, done, err); - }); - }) - .catch((err: Error) => { - finish(comps.session, done, err); - }); - }) - .catch((err: Error) => { - finish( - comps.session, - done, - new Error( - `Fail to grab data due error: ${ - err instanceof Error ? err.message : err - }`, - ), - ); - }); - }) - .catch(finish.bind(null, comps.session, done)); - }) - .catch(finish.bind(null, comps.session, done)); - }); - }); - - it(config.regular.list[3], function () { - return runners.withSession(config.regular, 3, async (logger, done, comps) => { - const tmpobj = createSampleFile( - 5000, - logger, - (i: number) => `[${i}]:: some line data\n`, - ); - comps.stream - .observe( - new Factory.File() - .asText() - .type(Factory.FileType.Text) - .file(tmpobj.name) - .get() - .sterilized(), - ) - .on('processing', () => { - comps.search - .search([ - { - filter: 'not relevant search', - flags: { reg: true, word: false, cases: false }, - }, - ]) - .then((found) => { - expect(found).toEqual(0); - finish(comps.session, done); - }) - .catch(finish.bind(null, comps.session, done)); - }) - .catch(finish.bind(null, comps.session, done)); - }); - }); - - it(config.regular.list[4], function () { - return runners.withSession(config.regular, 4, async (logger, done, comps) => { - const tmpobj = createSampleFile( - 5000, - logger, - (i: number) => - `[${i}]:: ${ - i % 100 === 0 || i <= 5 ? `some mAtCh line data\n` : `some line data\n` - }`, - ); - comps.stream - .observe( - new Factory.File() - .asText() - .type(Factory.FileType.Text) - .file(tmpobj.name) - .get() - .sterilized(), - ) - .on('processing', () => { - comps.search - .search([ - { - filter: 'match', - flags: { reg: true, word: false, cases: false }, - }, - ]) - .then((_) => { - // search results available on rust side - comps.search - .getMap(54) - .then((map) => { - comps.search - .grab(0, 11) - .then((result: GrabbedElement[]) => { - expect(result.map((i) => i.content)).toEqual([ - '[0]:: some mAtCh line data', - '[1]:: some mAtCh line data', - '[2]:: some mAtCh line data', - '[3]:: some mAtCh line data', - '[4]:: some mAtCh line data', - '[5]:: some mAtCh line data', - '[100]:: some mAtCh line data', - '[200]:: some mAtCh line data', - '[300]:: some mAtCh line data', - '[400]:: some mAtCh line data', - '[500]:: some mAtCh line data', - ]); - expect(result.map((i) => i.pos)).toEqual([ - 0, // 0 - 1, // 1 - 2, // 2 - 3, // 3 - 4, // 4 - 5, // 5 - 100, // 6 - 200, // 7 - 300, // 8 - 400, // 9 - 500, // 10 - ]); - Promise.allSettled( - [ - [10, 5, 5], - [110, 6, 100], - [390, 9, 400], - [600, 11, 600], - ].map((data) => { - return comps.search - .getNearest(data[0]) - .then((nearest) => { - expect(typeof nearest).toEqual( - 'object', - ); - expect((nearest as any).index).toEqual( - data[1], - ); - expect( - (nearest as any).position, - ).toEqual(data[2]); - }) - .catch((err: Error) => { - fail(err); - }); - }), - ) - .then(() => { - comps.search - .len() - .then((len: number) => { - expect(len).toEqual(55); - finish(comps.session, done); - }) - .catch((err: Error) => { - finish(comps.session, done, err); - }); - }) - .catch((err: Error) => { - finish(comps.session, done, err); - }); - }) - .catch((err: Error) => { - finish( - comps.session, - done, - new Error( - `Fail to grab data due error: ${ - err instanceof Error ? err.message : err - }`, - ), - ); - }); - }) - .catch(finish.bind(null, comps.session, done)); - }) - .catch(finish.bind(null, comps.session, done)); - }) - .catch(finish.bind(null, comps.session, done)); - }); - }); - - it(config.regular.list[5], function () { - return runners.withSession(config.regular, 5, async (logger, done, comps) => { - const tmpobj = createSampleFile( - 5000, - logger, - (i: number) => - `[${i}]:: ${ - i % 100 === 0 || i <= 5 - ? `some match line data\n` - : `some line matchmatchmatch data\n` - }`, - ); - comps.stream - .observe( - new Factory.File() - .asText() - .type(Factory.FileType.Text) - .file(tmpobj.name) - .get() - .sterilized(), - ) - .on('processing', () => { - comps.search - .search([ - { - filter: 'match', - flags: { reg: true, word: true, cases: false }, - }, - ]) - .then((_) => { - // search results available on rust side - comps.search - .getMap(54) - .then((map) => { - comps.search - .grab(0, 11) - .then((result: GrabbedElement[]) => { - expect(result.map((i) => i.content)).toEqual([ - '[0]:: some match line data', - '[1]:: some match line data', - '[2]:: some match line data', - '[3]:: some match line data', - '[4]:: some match line data', - '[5]:: some match line data', - '[100]:: some match line data', - '[200]:: some match line data', - '[300]:: some match line data', - '[400]:: some match line data', - '[500]:: some match line data', - ]); - expect(result.map((i) => i.pos)).toEqual([ - 0, // 0 - 1, // 1 - 2, // 2 - 3, // 3 - 4, // 4 - 5, // 5 - 100, // 6 - 200, // 7 - 300, // 8 - 400, // 9 - 500, // 10 - ]); - Promise.allSettled( - [ - [10, 5, 5], - [110, 6, 100], - [390, 9, 400], - [600, 11, 600], - ].map((data) => { - return comps.search - .getNearest(data[0]) - .then((nearest) => { - expect(typeof nearest).toEqual( - 'object', - ); - expect((nearest as any).index).toEqual( - data[1], - ); - expect( - (nearest as any).position, - ).toEqual(data[2]); - }) - .catch((err: Error) => { - fail(err); - }); - }), - ) - .then(() => { - comps.search - .len() - .then((len: number) => { - expect(len).toEqual(55); - finish(comps.session, done); - }) - .catch((err: Error) => { - finish(comps.session, done, err); - }); - }) - .catch((err: Error) => { - finish(comps.session, done, err); - }); - }) - .catch((err: Error) => { - finish( - comps.session, - done, - new Error( - `Fail to grab data due error: ${ - err instanceof Error ? err.message : err - }`, - ), - ); - }); - }) - .catch(finish.bind(null, comps.session, done)); - }) - .catch(finish.bind(null, comps.session, done)); - }) - .catch(finish.bind(null, comps.session, done)); - }); - }); - - it(config.regular.list[6], function () { - return runners.withSession(config.regular, 6, async (logger, done, comps) => { - const tmpobj = createSampleFile( - 501, - logger, - (i: number) => - `[${i}]:: ${ - i % 100 === 0 || i <= 5 - ? `some match A ${i % 6 === 0 ? 'B' : ''} line data\n` - : `some line data\n` - }`, - ); - comps.stream - .observe( - new Factory.File() - .asText() - .type(Factory.FileType.Text) - .file(tmpobj.name) - .get() - .sterilized(), - ) - .on('processing', () => { - comps.search - .search([ - { - filter: 'match A', - flags: { reg: true, word: false, cases: false }, - }, - { - filter: 'match [A,B]', - flags: { reg: true, word: false, cases: false }, - }, - ]) - .then((_) => { - comps.search - .getMap(501) - .then((map) => { - expect(map[0].length).toEqual(2); - expect(map[0][0][0]).toEqual(0); - expect(map[0][1][0]).toEqual(1); - expect(map[500][0][0]).toEqual(0); - expect(map[500][1][0]).toEqual(1); - logger.verbose(map); - comps.search - .grab(0, 11) - .then((result: GrabbedElement[]) => { - expect(result.map((i) => i.content)).toEqual([ - '[0]:: some match A B line data', - '[1]:: some match A line data', - '[2]:: some match A line data', - '[3]:: some match A line data', - '[4]:: some match A line data', - '[5]:: some match A line data', - '[100]:: some match A line data', - '[200]:: some match A line data', - '[300]:: some match A B line data', - '[400]:: some match A line data', - '[500]:: some match A line data', - ]); - expect(result.map((i) => i.pos)).toEqual([ - 0, // 0 - 1, // 1 - 2, // 2 - 3, // 3 - 4, // 4 - 5, // 5 - 100, // 6 - 200, // 7 - 300, // 8 - 400, // 9 - 500, // 10 - ]); - comps.search - .len() - .then((len: number) => { - expect(len).toEqual(11); - expect(searchStreamUpdated).toEqual(true); - finish(comps.session, done); - }) - .catch((err: Error) => { - finish(comps.session, done, err); - }); - }) - .catch((err: Error) => { - finish( - comps.session, - done, - new Error( - `Fail to grab data due error: ${ - err instanceof Error ? err.message : err - }`, - ), - ); - }); - }) - .catch(finish.bind(null, comps.session, done)); - }) - .catch(finish.bind(null, comps.session, done)); - }) - .catch(finish.bind(null, comps.session, done)); - let searchStreamUpdated = false; - comps.events.SearchUpdated.subscribe((event) => { - searchStreamUpdated = true; - }); - }); - }); - - it(config.regular.list[7], function () { - return runners.withSession(config.regular, 7, async (logger, done, comps) => { - const tmpobj = createSampleFile( - 5000, - logger, - (i: number) => - `[${i}]:: ${ - i % 100 === 0 || i <= 5 - ? `some match ${ - i % 6 === 0 ? 'B' : i % 4 === 0 ? 'C' : i % 3 === 0 ? 'D' : 'A' - } line data\n` - : `some line data\n` - }`, - ); - comps.stream - .observe( - new Factory.File() - .asText() - .type(Factory.FileType.Text) - .file(tmpobj.name) - .get() - .sterilized(), - ) - .on('processing', () => { - const calls = ['match A', 'match D', 'match C', 'match B']; - let canceled = 0; - calls.forEach((filter) => { - comps.search - .search([ - { - filter, - flags: { reg: true, word: false, cases: false }, - }, - ]) - .then((_) => { - expect(canceled).toEqual(3); - comps.search - .grab(0, 16) - .then((result: GrabbedElement[]) => { - expect(result.map((i) => i.content)).toEqual([ - '[0]:: some match B line data', - '[300]:: some match B line data', - '[600]:: some match B line data', - '[900]:: some match B line data', - '[1200]:: some match B line data', - '[1500]:: some match B line data', - '[1800]:: some match B line data', - '[2100]:: some match B line data', - '[2400]:: some match B line data', - '[2700]:: some match B line data', - '[3000]:: some match B line data', - '[3300]:: some match B line data', - '[3600]:: some match B line data', - '[3900]:: some match B line data', - '[4200]:: some match B line data', - '[4500]:: some match B line data', - ]); - expect(result.map((i) => i.pos)).toEqual([ - 0, 300, 600, 900, 1200, 1500, 1800, 2100, 2400, 2700, - 3000, 3300, 3600, 3900, 4200, 4500, - ]); - comps.search - .len() - .then((len: number) => { - expect(len).toEqual(17); - expect(searchStreamUpdated).toEqual(true); - finish(comps.session, done); - }) - .catch((err: Error) => { - finish(comps.session, done, err); - }); - }) - .catch((err: Error) => { - finish( - comps.session, - done, - new Error( - `Fail to grab data due error: ${ - err instanceof Error ? err.message : err - }`, - ), - ); - }); - }) - .canceled(() => { - canceled += 1; - }) - .catch((err: Error) => { - finish(comps.session, done); - }); - }); - }) - .catch(finish.bind(null, comps.session, done)); - let searchStreamUpdated = false; - comps.events.SearchUpdated.subscribe((event) => { - searchStreamUpdated = true; - }); - }); - }); - - it(config.regular.list[8], function () { - return runners.withSession(config.regular, 8, async (logger, done, comps) => { - const tmpobj = createSampleFile( - 5000, - logger, - (i: number) => - `[${i}]:: ${ - i % 100 === 0 || i <= 5 - ? `some match line ${i % 500 === 0 ? 'Nested' : ''} data\n` - : `some line ${i % 500 === 0 ? 'Nested' : ''} data\n` - }`, - ); - comps.stream - .observe( - new Factory.File() - .asText() - .type(Factory.FileType.Text) - .file(tmpobj.name) - .get() - .sterilized(), - ) - .on('processing', () => { - comps.search - .search([ - { - filter: 'match', - flags: { reg: true, word: false, cases: false }, - }, - ]) - .then((_) => { - comps.search - .searchNestedMatch( - { - filter: 'Nested', - flags: { reg: true, cases: false, word: false }, - }, - 10, - false, - ) - .then((pos: [number, number] | undefined) => { - expect((pos as [number, number])[0]).toBe(500); - expect((pos as [number, number])[1]).toBe(10); - finish(comps.session, done); - }) - .catch(finish.bind(null, comps.session, done)); - }) - .catch(finish.bind(null, comps.session, done)); - }) - .catch(finish.bind(null, comps.session, done)); - let searchStreamUpdated = false; - comps.events.SearchUpdated.subscribe((event) => { - searchStreamUpdated = true; - }); - }); - }); -}); diff --git a/application/apps/rustcore/ts-bindings/spec/session.stream.spec.ts b/application/apps/rustcore/ts-bindings/spec/session.stream.spec.ts deleted file mode 100644 index 24c362624d..0000000000 --- a/application/apps/rustcore/ts-bindings/spec/session.stream.spec.ts +++ /dev/null @@ -1,488 +0,0 @@ -// tslint:disable -// We need to provide path to TypeScript types definitions -/// -/// - -import { initLogger } from './logger'; -initLogger(); -import { Factory } from '../src/api/session'; -import { GrabbedElement } from 'platform/types/bindings'; -import { createSampleFile, finish } from './common'; -import { readConfigurationFile } from './config'; -import { utils } from 'platform/log'; - -import * as fs from 'fs'; -import * as os from 'os'; -import * as path from 'path'; -import * as runners from './runners'; - -const config = readConfigurationFile().get().tests.stream; -// ================================== IMPORTANT ================================== -// THIS TEST WILL BE IGNORED ON WINDOWS -// =============================================================================== -if (process.platform === 'win32') { - console.log(`${'='.repeat(75)}`); - console.log(`TESTING OF STREAMS (session.stream.spec) are ignored on WINDOWS`); - console.log(`${'='.repeat(75)}`); - describe('Stream', function () { - it('dummy', function (done) { - done(); - }); - }); -} else { - describe('Stream', function () { - it(config.regular.list[1], function () { - return runners.withSession(config.regular, 1, async (logger, done, comps) => { - const tmpobj = createSampleFile( - 5000, - logger, - (i: number) => `some line data: ${i}\n`, - ); - - comps.stream - .observe( - new Factory.Stream() - .asText() - .process({ - command: `less ${tmpobj.name}`, - cwd: process.cwd(), - shell: undefined, - }) - .get() - .sterilized(), - ) - .catch(finish.bind(null, comps.session, done)); - comps.events.StreamUpdated.subscribe((rows: number) => { - if (rows < 5000) { - return; - } - comps.stream - .grab(500, 7) - .then((result: GrabbedElement[]) => { - logger.debug('result of grab was: ' + JSON.stringify(result)); - expect(result.map((i) => i.content)).toEqual([ - 'some line data: 500', - 'some line data: 501', - 'some line data: 502', - 'some line data: 503', - 'some line data: 504', - 'some line data: 505', - 'some line data: 506', - ]); - finish(comps.session, done); - }) - .catch((err: Error) => { - finish( - comps.session, - done, - new Error( - `Fail to grab data due error: ${ - err instanceof Error ? err.message : err - }`, - ), - ); - }); - }); - }); - }); - - it(config.regular.list[2], function () { - return runners.withSession(config.regular, 2, async (logger, done, comps) => { - const tmpobj = createSampleFile( - 5000, - logger, - (i: number) => `some line data: ${i}\n`, - ); - const lifeCycleEvents: string[] = []; - comps.stream - .observe( - new Factory.Stream() - .asText() - .process({ - command: `less ${tmpobj.name}`, - cwd: process.cwd(), - shell: undefined, - }) - .get() - .sterilized(), - ) - .on('confirmed', () => { - lifeCycleEvents.push('confirmed'); - }) - .on('processing', () => { - lifeCycleEvents.push('processing'); - }) - .catch(finish.bind(null, comps.session, done)); - comps.events.StreamUpdated.subscribe((rows: number) => { - if (rows < 5000) { - return; - } - expect(lifeCycleEvents).toEqual(['confirmed', 'processing']); - finish(comps.session, done); - }); - }); - }); - - it(config.regular.list[3], function () { - return runners.withSession(config.regular, 3, async (logger, done, comps) => { - const lifeCycleEvents: string[] = []; - comps.stream - .observe( - new Factory.Stream() - .asText() - .process({ - command: `some_invalid_command`, - cwd: process.cwd(), - shell: undefined, - }) - .get() - .sterilized(), - ) - .on('confirmed', () => { - lifeCycleEvents.push('confirmed'); - }) - .on('processing', () => { - lifeCycleEvents.push('processing'); - }) - .then(() => { - // Session will still start with the invalid command because spawned shell - // is the one responsible for evaluating command and not Chipmunk. - // In this case session will open with the error message from shell. - finish(comps.session, done); - }) - .catch((err: Error) => { - // Event 'processing' should not come, because stream was created (confirmed), but - // it cannot be processed as soon as command is invalid - expect(lifeCycleEvents).toEqual(['confirmed']); - finish(comps.session, done); - }); - }); - }); - - it(config.regular.list[4], function () { - return runners.withSession(config.regular, 4, async (logger, done, comps) => { - const tmpobj = createSampleFile( - 5000, - logger, - (i: number) => `some line data: ${i}\n`, - ); - comps.stream - .observe( - new Factory.Stream() - .asText() - .process({ - command: `tail --lines=5000 -f ${tmpobj.name}`, - cwd: process.cwd(), - shell: undefined, - }) - .get() - .sterilized(), - ) - .catch(finish.bind(null, comps.session, done)); - const append = () => { - comps.stream - .len() - .then((len) => { - expect(len).toBe(5000); - let chunk = []; - for (let i = 0; i < 5000; i += 1) { - chunk.push(`some line data: ${i}`); - } - fs.promises - .appendFile(tmpobj.name, `${'\n'}${chunk.join(`\n`)}`) - .then(() => { - fs.closeSync(tmpobj.fd); - }) - .catch((err: Error) => { - finish( - comps.session, - done, - new Error( - `Fail to grab data due error: ${ - err instanceof Error ? err.message : err - }`, - ), - ); - }); - }) - .catch((err: Error) => { - finish( - comps.session, - done, - new Error( - `Fail to grab data due error: ${ - err instanceof Error ? err.message : err - }`, - ), - ); - }); - }; - comps.events.StreamUpdated.subscribe((rows: number) => { - if (rows === 5000) { - append(); - return; - } - if (rows < 10000) { - return; - } - comps.stream - .grab(500, 7) - .then((result: GrabbedElement[]) => { - logger.debug('result of grab was: ' + JSON.stringify(result)); - expect(result.map((i) => i.content)).toEqual([ - 'some line data: 500', - 'some line data: 501', - 'some line data: 502', - 'some line data: 503', - 'some line data: 504', - 'some line data: 505', - 'some line data: 506', - ]); - finish(comps.session, done); - }) - .catch((err: Error) => { - finish( - comps.session, - done, - new Error( - `Fail to grab data due error: ${ - err instanceof Error ? err.message : err - }`, - ), - ); - }); - }); - }); - }); - - it(config.regular.list[5], function () { - return runners.withSession(config.regular, 5, async (logger, done, comps) => { - const tmpobj = createSampleFile( - 500, - logger, - (i: number) => `some line data: ${i}\n`, - ); - comps.stream - .observe( - new Factory.Stream() - .asText() - .process({ - command: `tail --lines=5000 -f ${tmpobj.name}`, - cwd: process.cwd(), - shell: undefined, - }) - .get() - .sterilized(), - ) - .catch(finish.bind(null, comps.session, done)); - const filter = 'match A'; - let expectedMatchesCount = 0; - const append = () => { - comps.stream - .len() - .then((len) => { - expect(len).toBe(500); - let chunk = []; - for (let i = 0; i < 500; i += 1) { - chunk.push( - `some line data ${((n) => { - if (n % 10 === 0) { - expectedMatchesCount += 1; - return filter; - } - return ''; - })(i)}: ${i}`, - ); - } - fs.promises - .appendFile(tmpobj.name, `${'\n'}${chunk.join(`\n`)}`) - .then(() => { - fs.closeSync(tmpobj.fd); - }) - .catch((err: Error) => { - finish( - comps.session, - done, - new Error( - `Fail to grab data due error: ${ - err instanceof Error ? err.message : err - }`, - ), - ); - }); - }) - .catch((err: Error) => { - finish( - comps.session, - done, - new Error( - `Fail to grab data due error: ${ - err instanceof Error ? err.message : err - }`, - ), - ); - }); - }; - comps.events.StreamUpdated.subscribe((rows: number) => { - if (rows === 500) { - comps.search - .search([ - { - filter, - flags: { reg: true, word: false, cases: false }, - }, - ]) - .then(() => { - // We are appending new data only after search was done to make sure, - // updated search results will come - append(); - }) - .catch((err: Error) => { - finish( - comps.session, - done, - new Error( - `Fail to search due error: ${ - err instanceof Error ? err.message : err - }`, - ), - ); - }); - return; - } - }); - comps.events.SearchUpdated.subscribe((updated) => { - if (updated.found <= 0) { - return; - } - expect(updated.found).toBe(expectedMatchesCount); - finish(comps.session, done); - }); - }); - }); - - it(config.regular.list[6], function () { - return runners.withSession(config.regular, 6, async (logger, done, comps) => { - const tmpobj = createSampleFile( - 5000, - logger, - (i: number) => `some line data: ${i}\n`, - ); - const tailing = comps.stream - .observe( - new Factory.Stream() - .asText() - .process({ - command: `tail --lines=5000 -f ${tmpobj.name}`, - cwd: process.cwd(), - shell: undefined, - }) - .get() - .sterilized(), - ) - .catch(finish.bind(null, comps.session, done)); - comps.events.StreamUpdated.subscribe((rows: number) => { - if (rows < 5000) { - return; - } - tailing - .canceled(() => { - finish(comps.session, done); - }) - .abort(); - }); - }); - }); - - it(config.regular.list[7], function () { - return runners.withSession(config.regular, 7, async (logger, done, comps) => { - const filename = path.join(os.tmpdir(), 'chipmunk_test_file.log'); - // Create or overwrite file - fs.writeFileSync(filename, ''); - let ready = 0; - const TEST_LINES = ['test A', 'test B']; - const procceed = async () => { - ready += 1; - if (ready < 2) { - return; - } - try { - // Send first message - await comps.stream.sde(sed.uuid(), { WriteText: `${TEST_LINES[0]}\n` }); - // Send second message - await comps.stream.sde(sed.uuid(), { WriteText: `${TEST_LINES[1]}\n` }); - } catch (e) { - finish(comps.session, done, new Error(utils.error(e))); - } - }; - const sed = comps.stream - .observe( - new Factory.Stream() - .asText() - .process({ - command: `sed -u "w ${filename}"`, - cwd: process.cwd(), - shell: undefined, - }) - .get() - .sterilized(), - ) - .on('processing', (e) => { - procceed(); - }) - .catch(finish.bind(null, comps.session, done)); - // Tail file - const _tail = comps.stream - .observe( - new Factory.Stream() - .asText() - .process({ - command: `tail -f ${filename}`, - cwd: process.cwd(), - shell: undefined, - }) - .get() - .sterilized(), - ) - .on('processing', () => { - procceed(); - }) - .catch(finish.bind(null, comps.session, done)); - comps.events.StreamUpdated.subscribe((rows: number) => { - if (rows < 4) { - return; - } - comps.stream - .grab(0, 4) - .then((result: GrabbedElement[]) => { - logger.debug('result of grab was: ' + JSON.stringify(result)); - expect( - result - .map((i) => i.source_id) - .reduce((partialSum, a) => partialSum + a, 0), - ).toBe(2); - expect(result.map((i) => i.pos)).toEqual([0, 1, 2, 3]); - expect(result.filter((i) => i.content === TEST_LINES[0]).length).toBe( - 2, - ); - expect(result.filter((i) => i.content === TEST_LINES[1]).length).toBe( - 2, - ); - finish(comps.session, done); - }) - .catch((err: Error) => { - finish( - comps.session, - done, - new Error( - `Fail to grab data due error: ${ - err instanceof Error ? err.message : err - }`, - ), - ); - }); - }); - }); - }); - }); -} diff --git a/application/apps/rustcore/ts-bindings/spec/session.values.spec.ts b/application/apps/rustcore/ts-bindings/spec/session.values.spec.ts deleted file mode 100644 index 8a1e32616f..0000000000 --- a/application/apps/rustcore/ts-bindings/spec/session.values.spec.ts +++ /dev/null @@ -1,140 +0,0 @@ -// tslint:disable -// We need to provide path to TypeScript types definitions -/// -/// - -import { initLogger } from './logger'; -initLogger(); -import { Factory } from '../src/api/session'; -import { finish, createSampleFile, appendToSampleFile } from './common'; -import { readConfigurationFile } from './config'; - -import * as runners from './runners'; - -const config = readConfigurationFile().get().tests.values; -const MAX_DATASET_LEN = 65000; - -describe('Values', function () { - it(config.regular.list[1], function () { - return runners.withSession(config.regular, 1, async (logger, done, comps) => { - let sum = 0; - const tmpobj = createSampleFile(5000, logger, (i: number) => { - if (i % 100 === 0 || i <= 5) { - sum += i; - return `[${i}]:: some data CPU=${i}% line data\n`; - } else { - return `[${i}]:: some line data\n`; - } - }); - comps.stream - .observe( - new Factory.File() - .asText() - .type(Factory.FileType.Text) - .file(tmpobj.name) - .get() - .sterilized(), - ) - .on('processing', () => { - comps.search - .values([`CPU=(\\d{1,})`]) - .catch(finish.bind(null, comps.session, done)); - }) - .catch(finish.bind(null, comps.session, done)); - comps.events.SearchValuesUpdated.subscribe((map) => { - if (map === null) { - // Before get results rustcore should inform FE about dropping results. - return; - } - comps.search - .getValues(MAX_DATASET_LEN) - .then((data) => { - let control = 0; - data.forEach((points, _k) => { - points.forEach((p) => { - control += p.y_value; - }); - }); - expect(control).toEqual(sum); - finish(comps.session, done); - }) - .catch(finish.bind(null, comps.session, done)); - }); - }); - }); - it(config.regular.list[2], function () { - return runners.withSession(config.regular, 2, async (logger, done, comps) => { - let sum = 0; - const tmpobj = createSampleFile(5000, logger, (i: number) => { - if (i % 100 === 0 || i <= 5) { - sum += i; - return `[${i}]:: some data CPU=${i}% line data\n`; - } else { - return `[${i}]:: some line data\n`; - } - }); - let iteration = 0; - comps.stream - .observe( - new Factory.File() - .asText() - .type(Factory.FileType.Text) - .file(tmpobj.name) - .get() - .sterilized(), - ) - .on('processing', () => { - comps.search - .values([`CPU=(\\d{1,})`]) - .catch(finish.bind(null, comps.session, done)); - }) - .catch(finish.bind(null, comps.session, done)); - comps.events.SearchValuesUpdated.subscribe((map) => { - if (map === null) { - // Before get results rustcore should inform FE about dropping results. - return; - } - if (iteration === 0) { - comps.search - .getValues(MAX_DATASET_LEN) - .then((data) => { - let control = 0; - data.forEach((points, _k) => { - points.forEach((p) => { - control += p.y_value; - }); - }); - expect(control).toEqual(sum); - const offset = 5000; - appendToSampleFile(tmpobj, 5000, logger, (i: number) => { - if (i % 100 === 0 || i <= 5) { - sum += i + offset; - return `[${i}]:: some data CPU=${i + offset}% line data\n`; - } else { - return `[${i}]:: some line data\n`; - } - }); - }) - .catch(finish.bind(null, comps.session, done)); - iteration += 1; - } else if (iteration === 1) { - comps.search - .getValues(MAX_DATASET_LEN) - .then((data) => { - let control = 0; - data.forEach((points, _k) => { - points.forEach((p) => { - control += p.y_value; - }); - }); - expect(control).toEqual(sum); - finish(comps.session, done); - }) - .catch(finish.bind(null, comps.session, done)); - } else { - expect(iteration).toEqual(1); - } - }); - }); - }); -}); diff --git a/application/apps/rustcore/ts-bindings/spec/setup_config.sh b/application/apps/rustcore/ts-bindings/spec/setup_config.sh deleted file mode 100755 index 42c1c4d606..0000000000 --- a/application/apps/rustcore/ts-bindings/spec/setup_config.sh +++ /dev/null @@ -1,8 +0,0 @@ -export JASMIN_TEST_CONFIGURATION="./spec/benchmarks.json" -export SH_HOME_DIR="/chipmunk" -if [ "$#" -gt 0 ]; then - export PERFORMANCE_RESULTS_FOLDER="chipmunk_performance_results" - export PERFORMANCE_RESULTS="Benchmark_$1.json" -else - echo "No arguments provided." -fi \ No newline at end of file diff --git a/application/apps/rustcore/ts-bindings/spec/support/jasmine.json b/application/apps/rustcore/ts-bindings/spec/support/jasmine.json deleted file mode 100644 index 2564c32c4f..0000000000 --- a/application/apps/rustcore/ts-bindings/spec/support/jasmine.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "spec_dir": "spec/", - "spec_files": ["**/*[sS]pec.js"], - "helpers": ["helpers/**/*.js", "helpers/**/*.ts"], - "stopSpecOnExpectationFailure": false, - "random": false -} diff --git a/application/apps/rustcore/ts-bindings/spec/tests.notes.md b/application/apps/rustcore/ts-bindings/spec/tests.notes.md deleted file mode 100644 index 83adb21cbe..0000000000 --- a/application/apps/rustcore/ts-bindings/spec/tests.notes.md +++ /dev/null @@ -1,85 +0,0 @@ -# Making TypeScript available for IDE -We need to provide path to TypeScript types definitions in each `*.spec.ts` file -``` -/// -/// -``` - -# Manual start of defined test: -``` -./node_modules/.bin/jasmine-ts src/something.spec.ts -``` - -# Debug -Add next configuration into `launch.json` of VSCode - -``` -{ - "version": "0.2.0", - "configurations": [ - - { - "type": "node", - "request": "launch", - "name": "Jasmine Current File", - "runtimeExecutable": "${workspaceFolder}/node_modules/.bin/electron", - "program": "${workspaceFolder}/node_modules/jasmine-ts/lib/index", - "args": ["--config=${workspaceFolder}/spec/support/jasmine.json", "${file}"], - "console": "integratedTerminal", - "internalConsoleOptions": "neverOpen" - } - ] -} -``` - -Take in account, jasmine should be started considering embedded version of node. That's why there parameter `runtimeExecutable` - -# Troubleshooting -## ts-node issue - -If you have error like next: - -``` -Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './dist' is not defined by "exports" in ./application/apps/rustcore/ts/node_modules/ts-node/package.json -``` - -You have to resolve it by hands. - -1. Open "./application/apps/rustcore/ts/node_modules/ts-node/package.json" -2. Add there ("./dist": "./dist/index.js") into "exports" sections. Like this: - -``` -"exports": { - ".": "./dist/index.js", - "./dist": "./dist/index.js", - ... -} -``` - -## Wrong version of node module -Test should be started in scope of embedded (into electron) version on node. To start test, just add next into `package.json` - -``` - "scripts": { - ... - "test": "./node_modules/.bin/electron ./node_modules/jasmine-ts/lib/index.js" - ... - }, -``` - -Make sure you have right version of electron as dependency - -``` -"dependencies": { - ... - "electron": "22.3.6" - ... -}, -``` - -## Jasmine timeout -To get rid of short Jasmine timeout (can be useful for testing async operation, which may take long time) just add it into `*.spec.ts` file - -``` -jasmine.DEFAULT_TIMEOUT_INTERVAL = 900000; -``` \ No newline at end of file diff --git a/application/apps/rustcore/ts-bindings/spec/tsconfig.json b/application/apps/rustcore/ts-bindings/spec/tsconfig.json deleted file mode 100644 index e0a96fbb16..0000000000 --- a/application/apps/rustcore/ts-bindings/spec/tsconfig.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "compilerOptions": { - "baseUrl": ".", - "outDir": "./build/", - "forceConsistentCasingInFileNames": true, - "strict": true, - "noImplicitOverride": true, - "noPropertyAccessFromIndexSignature": true, - "noImplicitReturns": true, - "noFallthroughCasesInSwitch": true, - "sourceMap": true, - "declaration": false, - "downlevelIteration": true, - "experimentalDecorators": true, - "moduleResolution": "node", - "importHelpers": true, - "target": "ESNext", - "module": "CommonJS", - "lib": ["ESNext"], - "paths": { - "*": ["./node_modules/*"] - }, - "types": ["node"] - }, - "include": ["./*.spec.ts"], - "exclude": ["node_modules"] -} diff --git a/application/apps/rustcore/ts-bindings/src/api/executors/executor.async.results.ts b/application/apps/rustcore/ts-bindings/src/api/executors/executor.async.results.ts deleted file mode 100644 index 58a058b9c9..0000000000 --- a/application/apps/rustcore/ts-bindings/src/api/executors/executor.async.results.ts +++ /dev/null @@ -1,167 +0,0 @@ -import { Logger, utils } from 'platform/log'; -import { cutUuid } from 'platform/log/utils'; -import { CancelablePromise } from 'platform/env/promise'; -import { RustSession } from '../../native/native.session'; -import { EventProvider, IErrorEvent, IOperationDoneEvent } from '../session.provider'; -import { ICancelablePromise, TCanceler } from 'platform/env/promise'; -import { v4 as uuidv4 } from 'uuid'; -import { NativeError } from '../../interfaces/errors'; -import { Subscriber } from 'platform/env/subscription'; - -export type TOperationRunner = ( - session: RustSession, - options: TOptions, - operationUuid: string, -) => Promise; - -export type TOperationResultReader = ( - result: any, - resolve: (res: TResult) => void, - reject: (err: Error) => void, -) => void; - -class LifeCycle extends Subscriber { - protected abortOperationId: string | undefined; - - constructor( - protected readonly session: RustSession, - protected readonly provider: EventProvider, - protected readonly logger: Logger, - protected readonly reader: TOperationResultReader, - protected readonly signature: string, - protected readonly resolve: (results: TResult) => void, - protected readonly reject: (err: Error) => void, - protected readonly cancel: (reason?: any) => void, - protected readonly refCancelCB: (cb: TCanceler) => void, - protected readonly task: ICancelablePromise, - ) { - super(); - this.register( - provider.getEvents().SessionDestroyed.subscribe(this.onSessionDestroyed.bind(this)), - ); - this.register( - provider.getEvents().OperationError.subscribe(this.onOperationError.bind(this)), - ); - this.register( - provider.getEvents().OperationDone.subscribe(this.onOperationDone.bind(this)), - ); - task.finally(() => { - this.logger.verbose(`${signature}: finished`); - this.unsubscribe(); - }); - refCancelCB(this.cancelling.bind(this)); - } - - protected onSessionDestroyed(): void { - this.reject(new Error(this.logger.warn(`${this.signature}: session was destroyed`))); - } - - protected onOperationError(event: IErrorEvent): void { - if (event.uuid !== this.task.uuid() && event.uuid !== this.abortOperationId) { - return; // Ignore. This is another operation - } - if (event.uuid === this.abortOperationId) { - if (this.task.isCompleted()) { - this.logger.warn( - `${this.signature}: cancellation was done with error: ${event.error.message}, but promise already completed.`, - ); - return; - } - this.logger.error( - `${this.signature}: cancellation was done with error: ${event.error.message}, but promise wasn't completed.`, - ); - } else { - this.logger.warn(`${this.signature}: (event) error ${event.error.message}`); - } - this.reject(new Error(event.error.message)); - } - - protected onOperationDone(event: IOperationDoneEvent): void { - if (event.uuid !== this.task.uuid() && event.uuid !== this.abortOperationId) { - return; // Ignore. This is another operation - } - this.logger.verbose(`${this.signature}: (event) done`); - if (event.uuid === this.abortOperationId || this.abortOperationId !== undefined) { - if (event.uuid !== this.abortOperationId) { - this.logger.warn( - `${this.signature}: promise was canceled, but results comes first; promise will be canceled in any way`, - ); - } - this.cancel(); - return; - } - if (this.task.isCanceling()) { - if (!this.task.tryToStopCancellation()) { - this.logger.warn(`${this.signature}: promise had been cancelled already`); - return; - } - this.logger.debug(`${this.signature}: cancellation is stopped`); - } - this.reader(event.result, this.resolve, this.reject); - } - - protected cancelling(): void { - this.logger.verbose(`${this.signature}: canceling`); - if (this.abortOperationId !== undefined) { - this.logger.warn(`${this.signature}: already canceled`); - return; - } - /** - * We do not need to listen event "done" for cancelation of this operation - * because we are listening event "destroyed" in the scope of operation's - * computation object - */ - this.abortOperationId = uuidv4(); - const state: NativeError | undefined = this.session.abort( - this.abortOperationId, - this.task.uuid(), - ); - if (state instanceof NativeError) { - this.logger.error(`${this.signature}: fail to cancel; error: ${state.message}`); - if (!this.task.tryToStopCancellation()) { - this.logger.error( - `${this.signature}: cancellation procudure of operation could not be stopped: promise had been cancelled already`, - ); - } else { - this.abortOperationId = undefined; - this.reject(new Error(`Fail to cancel operation. Error: ${state.message}`)); - } - return; - } - this.logger.debug(`${this.signature}: cancel signal has been sent`); - } -} - -// TODO: should be implemented timeout to prevent memory leaking -export function AsyncResultsExecutor( - session: RustSession, - provider: EventProvider, - logger: Logger, - options: TOptions, - runner: TOperationRunner, - reader: TOperationResultReader, - name: string, -): CancelablePromise { - return new CancelablePromise((resolve, reject, cancel, refCancelCB, self) => { - const signature = `${name} (${cutUuid(self.uuid())})`; - new LifeCycle( - session, - provider, - logger, - reader, - signature, - resolve, - reject, - cancel, - refCancelCB, - self, - ); - logger.verbose(`${signature}: started`); - // Call operation - runner(session, options, self.uuid()).catch((err: Error) => { - if (self.isProcessing()) { - reject(new Error(logger.error(`${signature}: fail to run: ${utils.error(err)}`))); - } - }); - }); -} diff --git a/application/apps/rustcore/ts-bindings/src/api/executors/executor.async.void.confirmed.ts b/application/apps/rustcore/ts-bindings/src/api/executors/executor.async.void.confirmed.ts deleted file mode 100644 index e0cd554cda..0000000000 --- a/application/apps/rustcore/ts-bindings/src/api/executors/executor.async.void.confirmed.ts +++ /dev/null @@ -1,189 +0,0 @@ -import { Logger, utils } from 'platform/log'; -import { cutUuid } from 'platform/log/utils'; -import { CancelablePromise, ICancelablePromise, TCanceler } from 'platform/env/promise'; -import { RustSession } from '../../native/native.session'; -import { EventProvider, IErrorEvent, IOperationDoneEvent } from '../session.provider'; -import { Subscriber } from 'platform/env/subscription'; -import { v4 as uuidv4 } from 'uuid'; -import { NativeError } from '../../interfaces/errors'; - -export type TOperationRunner = ( - session: RustSession, - options: TOptions, - operationUuid: string, -) => Promise; - -class LifeCycle extends Subscriber { - protected abortOperationId: string | undefined; - - constructor( - protected readonly session: RustSession, - protected readonly provider: EventProvider, - protected readonly logger: Logger, - protected readonly signature: string, - protected readonly resolve: () => void, - protected readonly reject: (err: Error) => void, - protected readonly cancel: (reason?: any) => void, - protected readonly refCancelCB: (cb: TCanceler) => void, - protected readonly getDebugInfo: () => string, - protected readonly task: ICancelablePromise, - ) { - super(); - this.register( - provider.getEvents().SessionDestroyed.subscribe(this.onSessionDestroyed.bind(this)), - ); - this.register( - provider.getEvents().OperationError.subscribe(this.onOperationError.bind(this)), - ); - this.register( - provider.getEvents().OperationDone.subscribe(this.onOperationDone.bind(this)), - ); - this.register( - provider.getEvents().OperationStarted.subscribe(this.onOperationStarted.bind(this)), - ); - this.register( - provider - .getEvents() - .OperationProcessing.subscribe(this.onOperationProcessing.bind(this)), - ); - task.finally(() => { - this.logger.verbose(`${signature}: finished`); - this.unsubscribe(); - }); - refCancelCB(this.cancelling.bind(this)); - } - - protected onSessionDestroyed(): void { - this.reject(new Error(this.logger.warn(`${this.signature}: session was destroyed`))); - } - - protected onOperationError(event: IErrorEvent): void { - if (event.uuid !== this.task.uuid() && event.uuid !== this.abortOperationId) { - return; // Ignore. This is another operation - } - if (event.uuid === this.abortOperationId) { - if (this.task.isCompleted()) { - this.logger.warn( - `${this.signature}: cancellation was done with error: ${event.error.message}, but promise already completed.`, - ); - return; - } - this.logger.error( - `${this.signature}: cancellation was done with error: ${ - event.error.message - }, but promise wasn't completed; info: ${this.getDebugInfo()}`, - ); - } else { - this.logger.warn( - `${this.signature}: (event) error ${ - event.error.message - }; info: ${this.getDebugInfo()}`, - ); - } - this.reject(new Error(event.error.message)); - } - - protected onOperationDone(event: IOperationDoneEvent): void { - if (event.uuid !== this.task.uuid() && event.uuid !== this.abortOperationId) { - return; // Ignore. This is another operation - } - this.logger.verbose(`${this.signature}: (event) done`); - if (event.uuid === this.abortOperationId || this.abortOperationId !== undefined) { - if (event.uuid !== this.abortOperationId) { - this.logger.warn( - `${this.signature}: promise was canceled, but results comes first; promise will be canceled in any way`, - ); - } - this.cancel(); - return; - } - if (this.task.isCanceling()) { - if (!this.task.tryToStopCancellation()) { - this.logger.warn(`${this.signature}: promise had been cancelled already`); - return; - } - this.logger.debug(`${this.signature}: cancellation is stopped`); - } - this.resolve(); - } - - protected onOperationStarted(uuid: string): void { - if (uuid !== this.task.uuid()) { - return; - } - this.logger.verbose(`${this.signature}: (event) confirmed; info: ${this.getDebugInfo()}`); - this.task.emit('confirmed'); - } - - protected onOperationProcessing(uuid: string): void { - if (uuid !== this.task.uuid()) { - return; - } - this.logger.verbose(`${this.signature}: (event) processing`); - this.task.emit('processing'); - } - - protected cancelling(): void { - this.logger.verbose(`${this.signature}: canceling`); - if (this.abortOperationId !== undefined) { - this.logger.warn(`${this.signature}: already canceled`); - return; - } - /** - * We do not need to listen event "done" for cancelation of this operation - * because we are listening event "destroyed" in the scope of operation's - * computation object - */ - this.abortOperationId = uuidv4(); - const state: NativeError | undefined = this.session.abort( - this.abortOperationId, - this.task.uuid(), - ); - if (state instanceof NativeError) { - this.logger.error(`${this.signature}: fail to cancel; error: ${state.message}`); - if (!this.task.tryToStopCancellation()) { - this.logger.error( - `${this.signature}: cancellation procudure of operation could not be stopped: promise had been cancelled already`, - ); - } else { - this.abortOperationId = undefined; - this.reject(new Error(`Fail to cancel operation. Error: ${state.message}`)); - } - return; - } - this.logger.debug(`${this.signature}: cancel signal has been sent`); - } -} - -export function AsyncVoidConfirmedExecutor( - session: RustSession, - provider: EventProvider, - logger: Logger, - options: TOptions, - runner: TOperationRunner, - getDebugInfo: () => string, - name: string, -): CancelablePromise { - return new CancelablePromise((resolve, reject, cancel, refCancelCB, self) => { - const signature = `${name} (${cutUuid(self.uuid())})`; - // Setup subscriptions - new LifeCycle( - session, - provider, - logger, - signature, - resolve, - reject, - cancel, - refCancelCB, - getDebugInfo, - self, - ); - logger.verbose(`${signature}: started`); - runner(session, options, self.uuid()).catch((err: Error) => { - if (self.isProcessing()) { - reject(new Error(logger.error(`${signature}: fail to run: ${utils.error(err)}`))); - } - }); - }); -} diff --git a/application/apps/rustcore/ts-bindings/src/api/executors/executor.ts b/application/apps/rustcore/ts-bindings/src/api/executors/executor.ts deleted file mode 100644 index c6e32d5522..0000000000 --- a/application/apps/rustcore/ts-bindings/src/api/executors/executor.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { Logger } from 'platform/log'; -import { CancelablePromise } from 'platform/env/promise'; -import { RustSession } from '../../native/native.session'; -import { EventProvider } from '../../api/session.provider'; -export { Logger, CancelablePromise }; - -export type TExecutor = ( - session: RustSession, - provider: EventProvider, - logger: Logger, - options: TOptions, -) => CancelablePromise; - -export { AsyncResultsExecutor } from './executor.async.results'; -export { AsyncVoidConfirmedExecutor } from './executor.async.void.confirmed'; diff --git a/application/apps/rustcore/ts-bindings/src/api/executors/session.executors.ts b/application/apps/rustcore/ts-bindings/src/api/executors/session.executors.ts deleted file mode 100644 index 5068476048..0000000000 --- a/application/apps/rustcore/ts-bindings/src/api/executors/session.executors.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { executor as SleepExecutor } from './session.sleep.executor'; - -export const Executors = { - sleep: SleepExecutor, -}; diff --git a/application/apps/rustcore/ts-bindings/src/api/executors/session.sleep.executor.ts b/application/apps/rustcore/ts-bindings/src/api/executors/session.sleep.executor.ts deleted file mode 100644 index 020793adee..0000000000 --- a/application/apps/rustcore/ts-bindings/src/api/executors/session.sleep.executor.ts +++ /dev/null @@ -1,51 +0,0 @@ -import { TExecutor, Logger, CancelablePromise, AsyncResultsExecutor } from './executor'; -import { RustSession } from '../../native/native.session'; -import { EventProvider } from '../../api/session.provider'; - -import * as protocol from 'protocol'; - -export interface IExecuteSleepOptions { - duration: number; - ignoreCancellation: boolean; -} -export interface ISleepResults { - sleep_well: boolean; -} - -export const executor: TExecutor = ( - session: RustSession, - provider: EventProvider, - logger: Logger, - options: IExecuteSleepOptions, -): CancelablePromise => { - return AsyncResultsExecutor( - session, - provider, - logger, - options, - function ( - session: RustSession, - options: IExecuteSleepOptions, - operationUuid: string, - ): Promise { - return session.sleep(operationUuid, options.duration, options.ignoreCancellation); - }, - function ( - data: Uint8Array, - resolve: (res: ISleepResults) => void, - reject: (err: Error) => void, - ) { - try { - const result: ISleepResults = protocol.decodeResultSleep(data); - resolve(result); - } catch (e) { - return reject( - new Error( - `Fail to parse sleep results. Error: ${e instanceof Error ? e.message : e}`, - ), - ); - } - }, - 'sleep', - ); -}; diff --git a/application/apps/rustcore/ts-bindings/src/api/executors/session.stream.executors.ts b/application/apps/rustcore/ts-bindings/src/api/executors/session.stream.executors.ts deleted file mode 100644 index 601f438980..0000000000 --- a/application/apps/rustcore/ts-bindings/src/api/executors/session.stream.executors.ts +++ /dev/null @@ -1,21 +0,0 @@ -import { executor as SearchExecutor } from './session.stream.search.executor'; -import { executor as SearchValuesExecutor } from './session.stream.searchvalues.executor'; -import { executor as MapExecutor } from './session.stream.map.executor'; -import { executor as ValuesGetterExecutor } from './session.stream.get_values.executor'; -import { executor as AssignExecutor } from './session.stream.observe.executor'; -import { executor as ExportExecutor } from './session.stream.export.executor'; -import { executor as ExportRawExecutor } from './session.stream.export_raw.executor'; -import { executor as ExtractExecutor } from './session.stream.extract.executor'; -import { executor as NearestExecutor } from './session.stream.nearest.executor'; - -export const Executors = { - search: SearchExecutor, - values: SearchValuesExecutor, - map: MapExecutor, - values_getter: ValuesGetterExecutor, - observe: AssignExecutor, - export: ExportExecutor, - exportRaw: ExportRawExecutor, - extract: ExtractExecutor, - nearest: NearestExecutor, -}; diff --git a/application/apps/rustcore/ts-bindings/src/api/executors/session.stream.export.executor.ts b/application/apps/rustcore/ts-bindings/src/api/executors/session.stream.export.executor.ts deleted file mode 100644 index 06201f131c..0000000000 --- a/application/apps/rustcore/ts-bindings/src/api/executors/session.stream.export.executor.ts +++ /dev/null @@ -1,46 +0,0 @@ -import { TExecutor, Logger, CancelablePromise, AsyncResultsExecutor } from './executor'; -import { RustSession } from '../../native/native.session'; -import { EventProvider } from '../../api/session.provider'; -import { IRange } from 'platform/types/range'; -import { TextExportOptions } from 'platform/types/exporting'; - -import * as protocol from 'protocol'; - -export interface Options { - dest: string; - ranges: IRange[]; - opt: TextExportOptions; -} - -export const executor: TExecutor = ( - session: RustSession, - provider: EventProvider, - logger: Logger, - opt: Options, -): CancelablePromise => { - return AsyncResultsExecutor( - session, - provider, - logger, - opt, - function (session: RustSession, opt: Options, operationUuid: string): Promise { - return session.export(opt.dest, opt.ranges, opt.opt, operationUuid); - }, - function ( - data: Uint8Array, - resolve: (done: boolean) => void, - reject: (err: Error) => void, - ) { - const result: boolean = protocol.decodeResultBool(data); - if (typeof result !== 'boolean') { - return reject( - new Error( - `Fail to parse export results. Invalid format. Expecting valid { boolean }; gotten: ${typeof data}`, - ), - ); - } - resolve(result); - }, - 'exporting', - ); -}; diff --git a/application/apps/rustcore/ts-bindings/src/api/executors/session.stream.export_raw.executor.ts b/application/apps/rustcore/ts-bindings/src/api/executors/session.stream.export_raw.executor.ts deleted file mode 100644 index e2c3027f35..0000000000 --- a/application/apps/rustcore/ts-bindings/src/api/executors/session.stream.export_raw.executor.ts +++ /dev/null @@ -1,44 +0,0 @@ -import { TExecutor, Logger, CancelablePromise, AsyncResultsExecutor } from './executor'; -import { RustSession } from '../../native/native.session'; -import { EventProvider } from '../session.provider'; -import { IRange } from 'platform/types/range'; - -import * as protocol from 'protocol'; - -export interface Options { - dest: string; - ranges: IRange[]; -} - -export const executor: TExecutor = ( - session: RustSession, - provider: EventProvider, - logger: Logger, - opt: Options, -): CancelablePromise => { - return AsyncResultsExecutor( - session, - provider, - logger, - opt, - function (session: RustSession, opt: Options, operationUuid: string): Promise { - return session.exportRaw(opt.dest, opt.ranges, operationUuid); - }, - function ( - data: Uint8Array, - resolve: (done: boolean) => void, - reject: (err: Error) => void, - ) { - const result: boolean = protocol.decodeResultBool(data); - if (typeof result !== 'boolean') { - return reject( - new Error( - `Fail to parse export results. Invalid format. Expecting valid { boolean }; gotten: ${typeof data}`, - ), - ); - } - resolve(result); - }, - 'exporting', - ); -}; diff --git a/application/apps/rustcore/ts-bindings/src/api/executors/session.stream.extract.executor.ts b/application/apps/rustcore/ts-bindings/src/api/executors/session.stream.extract.executor.ts deleted file mode 100644 index 4d2a5fcdbc..0000000000 --- a/application/apps/rustcore/ts-bindings/src/api/executors/session.stream.extract.executor.ts +++ /dev/null @@ -1,101 +0,0 @@ -import { TExecutor, Logger, CancelablePromise, AsyncResultsExecutor } from './executor'; -import { RustSession } from '../../native/native.session'; -import { EventProvider } from '../../api/session.provider'; -import { - IFilter, - TExtractedValuesSrc, - IExtractedValueSrc, - TExtractedValues, - IExtractedMatch, - IExtractedValue, -} from 'platform/types/filter'; - -import * as protocol from 'protocol'; - -export const executor: TExecutor = ( - session: RustSession, - provider: EventProvider, - logger: Logger, - filters: IFilter[], -): CancelablePromise => { - return AsyncResultsExecutor( - session, - provider, - logger, - filters, - function (session: RustSession, filters: IFilter[], operationUuid: string): Promise { - return session.extractMatchesValues(filters, operationUuid); - }, - function ( - data: Uint8Array, - resolve: (res: TExtractedValues) => void, - reject: (err: Error) => void, - ) { - try { - const src: TExtractedValuesSrc = protocol.decodeResultExtractedMatchValues(data); - if (!(src instanceof Array)) { - return reject( - new Error( - `Fail to parse extracting results. Invalid format. Expecting TExtractedValuesSrc (Array), but has been gotten: ${typeof src}`, - ), - ); - } - const results: TExtractedValues = src.map((value: IExtractedValueSrc) => { - if (typeof value !== 'object' || value === null) { - throw new Error( - `Invalid format of {value: IExtractedValueSrc}: ${typeof value}.`, - ); - } - if (typeof value.index !== 'number') { - throw new Error( - `Expecting value.index will be {number}, but it's: ${typeof value.index}`, - ); - } - if (!(value.values instanceof Array)) { - throw new Error( - `Expecting value.values will be an Array, but it's: ${typeof value.values}`, - ); - } - return { - position: value.index, - values: value.values.map((values: Array) => { - if (values.length !== 2) { - throw new Error( - `Expecting nested array in IExtractedValueSrc.values always will have len 2. But len is: ${values.length}`, - ); - } - if (typeof values[0] !== 'number') { - throw new Error( - `Expecting IExtractedValueSrc.values[0] will be {number} (index of filter). But it's: ${typeof values[0]} / ${ - values[0] - }`, - ); - } - if (!(values[1] instanceof Array)) { - throw new Error( - `Expecting IExtractedValueSrc.values[1] will be {string[]} (values of matches). But it's: ${typeof values[1]} / ${ - values[1] - }`, - ); - } - return { - filter: filters[values[0] as number], - values: values[1] as string[], - } as IExtractedMatch; - }), - } as IExtractedValue; - }); - resolve(results); - } catch (err) { - return reject( - new Error( - `Fail to parse extracting values results. Error: ${ - err instanceof Error ? err.message : err - }`, - ), - ); - } - }, - 'extract_matches_values', - ); -}; diff --git a/application/apps/rustcore/ts-bindings/src/api/executors/session.stream.get_values.executor.ts b/application/apps/rustcore/ts-bindings/src/api/executors/session.stream.get_values.executor.ts deleted file mode 100644 index b326764869..0000000000 --- a/application/apps/rustcore/ts-bindings/src/api/executors/session.stream.get_values.executor.ts +++ /dev/null @@ -1,62 +0,0 @@ -import { TExecutor, Logger, CancelablePromise, AsyncResultsExecutor } from './executor'; -import { RustSession } from '../../native/native.session'; -import { EventProvider } from '../session.provider'; -import { error } from 'platform/log/utils'; -import { ResultSearchValues } from 'platform/types/bindings'; - -import * as protocol from 'protocol'; - -export interface IOptions { - datasetLength: number; - from?: number; - to?: number; -} - -export const executor: TExecutor = ( - session: RustSession, - provider: EventProvider, - logger: Logger, - options: IOptions, -): CancelablePromise => { - return AsyncResultsExecutor( - session, - provider, - logger, - options, - function (session: RustSession, options: IOptions, operationUuid: string): Promise { - return new Promise((resolve, reject) => { - if (options.from !== undefined && options.to !== undefined) { - if ( - isNaN(options.from) || - isNaN(options.to) || - !isFinite(options.from) || - !isFinite(options.to) - ) { - return reject(new Error(`Range is invalid`)); - } - if (options.from > options.to) { - return reject( - new Error(`Range is invalid: "from" should not be less "to"`), - ); - } - } - session - .getValues(operationUuid, options.datasetLength, options.from, options.to) - .catch(reject); - }); - }, - function ( - data: Uint8Array, - resolve: (r: ResultSearchValues) => void, - reject: (e: Error) => void, - ) { - try { - const map: ResultSearchValues = protocol.decodeResultSearchValues(data); - resolve(map); - } catch (e) { - reject(new Error(error(e))); - } - }, - 'get_values', - ); -}; diff --git a/application/apps/rustcore/ts-bindings/src/api/executors/session.stream.map.executor.ts b/application/apps/rustcore/ts-bindings/src/api/executors/session.stream.map.executor.ts deleted file mode 100644 index c8841a83b0..0000000000 --- a/application/apps/rustcore/ts-bindings/src/api/executors/session.stream.map.executor.ts +++ /dev/null @@ -1,74 +0,0 @@ -import { TExecutor, Logger, CancelablePromise, AsyncResultsExecutor } from './executor'; -import { RustSession } from '../../native/native.session'; -import { EventProvider } from '../../api/session.provider'; -import { ISearchMap } from 'platform/types/filter'; - -import * as protocol from 'protocol'; - -export interface IOptions { - datasetLength: number; - from?: number; - to?: number; -} - -export const executor: TExecutor = ( - session: RustSession, - provider: EventProvider, - logger: Logger, - options: IOptions, -): CancelablePromise => { - return AsyncResultsExecutor( - session, - provider, - logger, - options, - function (session: RustSession, options: IOptions, operationUuid: string): Promise { - return new Promise((resolve, reject) => { - if (options.from !== undefined && options.to !== undefined) { - if ( - isNaN(options.from) || - isNaN(options.to) || - !isFinite(options.from) || - !isFinite(options.to) - ) { - return reject(new Error(`Range is invalid`)); - } - if (options.from > options.to) { - return reject( - new Error(`Range is invalid: "from" should not be less "to"`), - ); - } - } - session - .getMap(operationUuid, options.datasetLength, options.from, options.to) - .catch(reject); - }); - }, - function ( - data: Uint8Array, - resolve: (res: ISearchMap) => void, - reject: (err: Error) => void, - ) { - try { - const result: ISearchMap = protocol.decodeResultScaledDistribution(data); - if (!(result instanceof Array)) { - return reject( - new Error( - `Fail to parse search map. Invalid format. Expecting ISearchMap.`, - ), - ); - } - resolve(result); - } catch (err) { - return reject( - new Error( - `Fail to parse search map. Error: ${ - err instanceof Error ? err.message : err - }`, - ), - ); - } - }, - 'get_map', - ); -}; diff --git a/application/apps/rustcore/ts-bindings/src/api/executors/session.stream.nearest.executor.ts b/application/apps/rustcore/ts-bindings/src/api/executors/session.stream.nearest.executor.ts deleted file mode 100644 index 51b4206364..0000000000 --- a/application/apps/rustcore/ts-bindings/src/api/executors/session.stream.nearest.executor.ts +++ /dev/null @@ -1,50 +0,0 @@ -import { TExecutor, Logger, CancelablePromise, AsyncResultsExecutor } from './executor'; -import { RustSession } from '../../native/native.session'; -import { EventProvider } from '../../api/session.provider'; -import { NearestPosition, ResultNearestPosition } from 'platform/types/bindings'; - -import * as protocol from 'protocol'; - -export interface IExecuteNearestOptions { - positionInStream: number; -} - -export const executor: TExecutor = ( - session: RustSession, - provider: EventProvider, - logger: Logger, - options: IExecuteNearestOptions, -): CancelablePromise => { - return AsyncResultsExecutor( - session, - provider, - logger, - options, - function ( - session: RustSession, - options: IExecuteNearestOptions, - operationUuid: string, - ): Promise { - return session.getNearestTo(operationUuid, options.positionInStream); - }, - function ( - data: Uint8Array, - resolve: (res: NearestPosition | undefined) => void, - reject: (err: Error) => void, - ) { - try { - const result: ResultNearestPosition = protocol.decodeResultNearestPosition(data); - resolve(result === null ? undefined : result); - } catch (e) { - return reject( - new Error( - `Fail to parse getNearestTo results. Error: ${ - e instanceof Error ? e.message : e - }`, - ), - ); - } - }, - 'getNearestTo', - ); -}; diff --git a/application/apps/rustcore/ts-bindings/src/api/executors/session.stream.observe.executor.ts b/application/apps/rustcore/ts-bindings/src/api/executors/session.stream.observe.executor.ts deleted file mode 100644 index 86253a1d43..0000000000 --- a/application/apps/rustcore/ts-bindings/src/api/executors/session.stream.observe.executor.ts +++ /dev/null @@ -1,35 +0,0 @@ -import { TExecutor, Logger, CancelablePromise, AsyncVoidConfirmedExecutor } from './executor'; -import { RustSession } from '../../native/native.session'; -import { EventProvider } from '../../api/session.provider'; -import { IObserve } from 'platform/types/observe'; - -export interface IFileOptionsDLT {} - -export enum EFileOptionsRequirements { - DLTOptions = 'DLTOptions', - NoOptionsRequired = 'NoOptionsRequires', -} - -export type TFileOptions = IFileOptionsDLT | undefined; - -export const executor: TExecutor = ( - session: RustSession, - provider: EventProvider, - logger: Logger, - options: IObserve, -): CancelablePromise => { - const debugInfo = JSON.stringify(options); - return AsyncVoidConfirmedExecutor( - session, - provider, - logger, - options, - function (session: RustSession, options: IObserve, operationUuid: string): Promise { - return session.observe(options, operationUuid); - }, - (): string => { - return debugInfo; - }, - 'observe', - ); -}; diff --git a/application/apps/rustcore/ts-bindings/src/api/executors/session.stream.search.executor.ts b/application/apps/rustcore/ts-bindings/src/api/executors/session.stream.search.executor.ts deleted file mode 100644 index 2feadac343..0000000000 --- a/application/apps/rustcore/ts-bindings/src/api/executors/session.stream.search.executor.ts +++ /dev/null @@ -1,39 +0,0 @@ -import { TExecutor, Logger, CancelablePromise, AsyncResultsExecutor } from './executor'; -import { RustSession } from '../../native/native.session'; -import { EventProvider } from '../../api/session.provider'; -import { IFilter } from 'platform/types/filter'; - -import * as protocol from 'protocol'; - -export const executor: TExecutor = ( - session: RustSession, - provider: EventProvider, - logger: Logger, - filters: IFilter[], -): CancelablePromise => { - return AsyncResultsExecutor( - session, - provider, - logger, - filters, - function (session: RustSession, filters: IFilter[], operationUuid: string): Promise { - return session.search(filters, operationUuid); - }, - function ( - data: Uint8Array, - resolve: (found: number) => void, - reject: (err: Error) => void, - ) { - const found: number = protocol.decodeResultU64(data); - if (typeof found !== 'number' || isNaN(found) || !isFinite(found)) { - return reject( - new Error( - `Fail to parse search results. Invalid format. Expecting valid { number }.`, - ), - ); - } - resolve(found); - }, - 'search', - ); -}; diff --git a/application/apps/rustcore/ts-bindings/src/api/executors/session.stream.searchvalues.executor.ts b/application/apps/rustcore/ts-bindings/src/api/executors/session.stream.searchvalues.executor.ts deleted file mode 100644 index e00766be98..0000000000 --- a/application/apps/rustcore/ts-bindings/src/api/executors/session.stream.searchvalues.executor.ts +++ /dev/null @@ -1,24 +0,0 @@ -import { TExecutor, Logger, CancelablePromise, AsyncResultsExecutor } from './executor'; -import { RustSession } from '../../native/native.session'; -import { EventProvider } from '../session.provider'; - -export const executor: TExecutor = ( - session: RustSession, - provider: EventProvider, - logger: Logger, - filters: string[], -): CancelablePromise => { - return AsyncResultsExecutor( - session, - provider, - logger, - filters, - function (session: RustSession, filters: string[], operationUuid: string): Promise { - return session.searchValues(filters, operationUuid); - }, - function (_data: Uint8Array, resolve: () => void, _reject: (err: Error) => void) { - resolve(); - }, - 'search_values', - ); -}; diff --git a/application/apps/rustcore/ts-bindings/src/api/executors/single.task.extract.ts b/application/apps/rustcore/ts-bindings/src/api/executors/single.task.extract.ts deleted file mode 100644 index b6cdbac534..0000000000 --- a/application/apps/rustcore/ts-bindings/src/api/executors/single.task.extract.ts +++ /dev/null @@ -1,22 +0,0 @@ -import { RustSession } from '../../native/native.session'; -import { ICancelablePromise } from 'platform/env/promise'; -import { EventProvider } from '../../api/session.provider'; -import { IFilter, TExtractedValues } from 'platform/types/filter'; -import { Executors } from './session.stream.executors'; -import { TaskManager } from './single.task'; -import { scope } from 'platform/env/scope'; - -export class ExtractTaskManager extends TaskManager { - protected readonly provider: EventProvider; - protected readonly session: RustSession; - - constructor(provider: EventProvider, session: RustSession, uuid: string) { - super(scope.getLogger(`ExtractTaskManager: ${uuid}`)); - this.provider = provider; - this.session = session; - } - - executor(filters: IFilter[]): ICancelablePromise { - return Executors.extract(this.session, this.provider, this.logger, filters); - } -} diff --git a/application/apps/rustcore/ts-bindings/src/api/executors/single.task.search.ts b/application/apps/rustcore/ts-bindings/src/api/executors/single.task.search.ts deleted file mode 100644 index 0324ff4c59..0000000000 --- a/application/apps/rustcore/ts-bindings/src/api/executors/single.task.search.ts +++ /dev/null @@ -1,22 +0,0 @@ -import { scope } from 'platform/env/scope'; -import { RustSession } from '../../native/native.session'; -import { ICancelablePromise } from 'platform/env/promise'; -import { EventProvider } from '../../api/session.provider'; -import { IFilter } from 'platform/types/filter'; -import { Executors } from './session.stream.executors'; -import { TaskManager } from './single.task'; - -export class SearchTaskManager extends TaskManager { - protected readonly provider: EventProvider; - protected readonly session: RustSession; - - constructor(provider: EventProvider, session: RustSession, uuid: string) { - super(scope.getLogger(`SearchTaskManager: ${uuid}`)); - this.provider = provider; - this.session = session; - } - - executor(filters: IFilter[]): ICancelablePromise { - return Executors.search(this.session, this.provider, this.logger, filters); - } -} diff --git a/application/apps/rustcore/ts-bindings/src/api/executors/single.task.ts b/application/apps/rustcore/ts-bindings/src/api/executors/single.task.ts deleted file mode 100644 index 5c5e2756cc..0000000000 --- a/application/apps/rustcore/ts-bindings/src/api/executors/single.task.ts +++ /dev/null @@ -1,90 +0,0 @@ -import { ICancelablePromise, CancelablePromise } from 'platform/env/promise'; -import { Logger } from 'platform/log'; - -export abstract class TaskManager { - protected queue: { - args: T; - task: ICancelablePromise; - }[] = []; - protected running: ICancelablePromise | undefined; - protected dropping: boolean = false; - protected readonly logger: Logger; - - constructor(logger: Logger) { - this.logger = logger; - } - - public destroy(): Promise { - return this.drop(); - } - - public drop(): Promise { - this.dropping = true; - const pendings = this.queue.map((t) => t.task); - if (this.running !== undefined) { - pendings.push(this.running); - } - return Promise.all( - pendings.map((task) => { - return new Promise((resolve) => { - task.finally(() => resolve(undefined)); - task.abort(); - }); - }), - ) - .catch((err: Error) => { - this.logger.error(`Fail to drop all task: ${err.message}`); - }) - .then(() => { - return Promise.resolve(); - }) - .finally(() => { - this.dropping = false; - }); - } - - public run(args: T): ICancelablePromise { - if (this.dropping) { - return new CancelablePromise((_resolve, _reject, cancel, _refCancel, _self) => { - cancel(); - }); - } - // Check current task - if (this.running !== undefined) { - this.running.abort(); - } - return new CancelablePromise((_resolve, _reject, _cancel, _refCancel, self) => { - // Put task into queue - this.queue.push({ args, task: self }); - // Try to next - this.next(); - }); - } - - protected next(): void { - // Check current task - if (this.running !== undefined) { - return; - } - // Get latest task - const task = this.queue.pop(); - if (task === undefined) { - return; - } - // Drop rest task - this.queue.forEach((pending) => { - pending.task.abort(); - }); - this.queue = []; - // Run search - this.running = this.executor(task.args) - .finally(() => { - this.running = undefined; - this.next(); - }) - .bind(task.task); - task.task.uuid(this.running.uuid()); - } - - abstract executor(args: T): ICancelablePromise; -} diff --git a/application/apps/rustcore/ts-bindings/src/api/executors/single.task.values.ts b/application/apps/rustcore/ts-bindings/src/api/executors/single.task.values.ts deleted file mode 100644 index 93c7eed82c..0000000000 --- a/application/apps/rustcore/ts-bindings/src/api/executors/single.task.values.ts +++ /dev/null @@ -1,21 +0,0 @@ -import { RustSession } from '../../native/native.session'; -import { ICancelablePromise } from 'platform/env/promise'; -import { EventProvider } from '../session.provider'; -import { Executors } from './session.stream.executors'; -import { TaskManager } from './single.task'; -import { scope } from 'platform/env/scope'; - -export class ValuesTaskManager extends TaskManager { - protected readonly provider: EventProvider; - protected readonly session: RustSession; - - constructor(provider: EventProvider, session: RustSession, uuid: string) { - super(scope.getLogger(`ValuesTaskManager: ${uuid}`)); - this.provider = provider; - this.session = session; - } - - executor(filters: string[]): ICancelablePromise { - return Executors.values(this.session, this.provider, this.logger, filters); - } -} diff --git a/application/apps/rustcore/ts-bindings/src/api/jobs.ts b/application/apps/rustcore/ts-bindings/src/api/jobs.ts deleted file mode 100644 index 0e5be666d7..0000000000 --- a/application/apps/rustcore/ts-bindings/src/api/jobs.ts +++ /dev/null @@ -1,382 +0,0 @@ -import { CancelablePromise } from 'platform/env/promise'; -import { Base, Cancelled, decode } from '../native/native.jobs'; -import { error } from 'platform/log/utils'; -import { IFilter } from 'platform/types/filter'; -import { SomeipStatistic } from 'platform/types/observe/parser/someip'; -import { - FoldersScanningResult, - DltStatisticInfo, - ShellProfile, - ProfileList, -} from 'platform/types/bindings'; -import { - InvalidPluginEntity, - InvalidPluginsList, - PluginEntity, - PluginsList, - PluginsPathsList, - PluginRunData, -} from 'platform/types/bindings/plugins'; - -import * as protocol from 'protocol'; - -export class Jobs extends Base { - public static async create(): Promise { - const instance = new Jobs(); - await instance.init(); - return instance; - } - - // This method is used for testing - public cancelTest(num_a: number, num_b: number, seq?: number): CancelablePromise { - const sequence = seq === undefined ? this.sequence() : seq; - const job: CancelablePromise = this.execute( - // We should define validation callback. As argument it takes result of job, - // which should be checked for type. In case it type is correct, callback - // should return true - (buf: Uint8Array): number | Error => { - return decode(buf, protocol.decodeCommandOutcomeWithi64); - }, - // As second argument of executor we should provide native function of job. - this.native.jobCancelTest(sequence, num_a, num_b), - // Sequence of job - sequence, - // Alias of job for logs - 'cancelTest', - ); - return job; - } - - public listContent(options: { - depth: number; - max: number; - paths: string[]; - include: { files: boolean; folders: boolean }; - }): CancelablePromise { - const sequence = this.sequence(); - const job: CancelablePromise = this.execute( - (buf: Uint8Array): any | Error => { - const output = decode( - buf, - protocol.decodeCommandOutcomeWithFoldersScanningResult, - ); - if (output instanceof Error || output instanceof Cancelled) { - return output; - } else { - return output; - } - }, - this.native.listFolderContent( - sequence, - options.depth, - options.max, - options.paths, - options.include.files, - options.include.folders, - ), - sequence, - 'listContent', - ); - return job; - } - - public isFileBinary(options: { filePath: string }): CancelablePromise { - const sequence = this.sequence(); - const job: CancelablePromise = this.execute( - (buf: Uint8Array): boolean | Error => { - return decode(buf, protocol.decodeCommandOutcomeWithbool); - }, - this.native.isFileBinary(sequence, options.filePath), - sequence, - 'isFileBinary', - ); - return job; - } - - public getFileChecksum(path: string): CancelablePromise { - const sequence = this.sequence(); - const job: CancelablePromise = this.execute( - (buf: Uint8Array): string | Error => { - return decode(buf, protocol.decodeCommandOutcomeWithString); - }, - this.native.getFileChecksum(sequence, path), - sequence, - 'getFileChecksum', - ); - return job; - } - - public getDltStats(paths: string[]): CancelablePromise { - const sequence = this.sequence(); - const job: CancelablePromise = this.execute( - (buf: Uint8Array): any | Error => { - const decoded = decode( - buf, - protocol.decodeCommandOutcomeWithDltStatisticInfo, - ); - if (decoded instanceof Error) { - return decoded; - } - return decoded; - }, - this.native.getDltStats(sequence, paths), - sequence, - 'getDltStats', - ); - return job; - } - - public getSomeipStatistic(paths: string[]): CancelablePromise { - const sequence = this.sequence(); - const job: CancelablePromise = this.execute( - (buf: Uint8Array): any | Error => { - const decoded = decode(buf, protocol.decodeCommandOutcomeWithString); - if (decoded instanceof Error) { - return decoded; - } - try { - return JSON.parse(decoded) as SomeipStatistic; - } catch (e) { - return new Error(error(e)); - } - }, - this.native.getSomeipStatistic(sequence, paths), - sequence, - 'getSomeipStatistic', - ); - return job; - } - - public getShellProfiles(): CancelablePromise { - const sequence = this.sequence(); - const job: CancelablePromise = this.execute( - (buf: Uint8Array): any | Error => { - const decoded = decode( - buf, - protocol.decodeCommandOutcomeWithProfileList, - ); - return decoded; - }, - this.native.getShellProfiles(sequence), - sequence, - 'getShellProfiles', - ); - return job; - } - - public getSerialPortsList(): CancelablePromise { - const sequence = this.sequence(); - const job: CancelablePromise = this.execute( - (buf: Uint8Array): string[] | Error => { - return decode(buf, protocol.decodeCommandOutcomeWithSerialPortsList); - }, - this.native.getSerialPortsList(sequence), - sequence, - 'getSerialPortsList', - ); - return job; - } - - public getRegexError(filter: IFilter): CancelablePromise { - const sequence = this.sequence(); - const job: CancelablePromise = this.execute( - (buf: Uint8Array): any | Error => { - const decoded = decode( - buf, - protocol.decodeCommandOutcomeWithOptionString, - ); - if (decoded instanceof Error) { - return decoded; - } else if (typeof decoded === 'string' && decoded.trim() !== '') { - return decoded; - } else { - return undefined; - } - }, - this.native.getRegexError(sequence, { - value: filter.filter, - is_regex: filter.flags.reg, - ignore_case: !filter.flags.cases, - is_word: filter.flags.word, - }), - sequence, - 'getRegexError', - ); - return job; - } - - public sleep(ms: number): CancelablePromise { - const sequence = this.sequence(); - const job: CancelablePromise = this.execute( - (buf: Uint8Array): any | Error => { - return decode(buf, protocol.decodeCommandOutcomeWithVoid); - }, - this.native.sleep(sequence, ms), - sequence, - 'sleep', - ); - return job; - } - - public installedPluginsList(): CancelablePromise { - const sequence = this.sequence(); - const job: CancelablePromise = this.execute( - (buf: Uint8Array): PluginEntity[] | Error => { - const decoded = decode( - buf, - protocol.decodeCommandOutcomeWithPluginsList, - ); - return decoded; - }, - this.native.installedPluginsList(sequence), - sequence, - 'installedPluginsList', - ); - return job; - } - - public invalidPluginsList(): CancelablePromise { - const sequence = this.sequence(); - const job: CancelablePromise = this.execute( - (buf: Uint8Array): InvalidPluginEntity[] | Error => { - const decoded = decode( - buf, - protocol.decodeCommandOutcomeWithInvalidPluginsList, - ); - return decoded; - }, - this.native.invalidPluginsList(sequence), - sequence, - 'invalidPluginsList', - ); - return job; - } - - public installedPluginsPaths(): CancelablePromise { - const sequence = this.sequence(); - const job: CancelablePromise = this.execute( - (buf: Uint8Array): string[] | Error => { - const decoded = decode( - buf, - protocol.decodeCommandOutcomeWithPluginsPathsList, - ); - return decoded; - }, - this.native.installedPluginsPaths(sequence), - sequence, - 'installedPluginsPaths', - ); - return job; - } - - public invalidPluginsPaths(): CancelablePromise { - const sequence = this.sequence(); - const job: CancelablePromise = this.execute( - (buf: Uint8Array): string[] | Error => { - const decoded = decode( - buf, - protocol.decodeCommandOutcomeWithPluginsPathsList, - ); - return decoded; - }, - this.native.invalidPluginsPaths(sequence), - sequence, - 'invalidPluginsPaths', - ); - return job; - } - - public installedPluginsInfo(plugin_path: string): CancelablePromise { - const sequence = this.sequence(); - const job: CancelablePromise = this.execute( - (buf: Uint8Array): PluginEntity | undefined | Error => { - const decoded = decode( - buf, - protocol.decodeCommandOutcomeWithOptionPluginEntity, - ); - return decoded; - }, - this.native.installedPluginsInfo(sequence, plugin_path), - sequence, - 'installedPluginsInfo', - ); - return job; - } - - public invalidPluginsInfo( - plugin_path: string, - ): CancelablePromise { - const sequence = this.sequence(); - const job: CancelablePromise = this.execute( - (buf: Uint8Array): InvalidPluginEntity | undefined | Error => { - const decoded = decode( - buf, - protocol.decodeCommandOutcomeWithOptionInvalidPluginEntity, - ); - return decoded; - }, - this.native.invalidPluginsInfo(sequence, plugin_path), - sequence, - 'invalidPluginsInfo', - ); - return job; - } - - public getPluginRunData(plugin_path: string): CancelablePromise { - const sequence = this.sequence(); - const job: CancelablePromise = this.execute( - (buf: Uint8Array): PluginRunData | undefined | Error => { - const decoded = decode( - buf, - protocol.decodeCommandOutcomeWithOptionPluginRunData, - ); - return decoded; - }, - this.native.getPluginRunData(sequence, plugin_path), - sequence, - 'getPluginRunData', - ); - return job; - } - - public reloadPlugins(): CancelablePromise { - const sequence = this.sequence(); - const job: CancelablePromise = this.execute( - (buf: Uint8Array): any | Error => { - return decode(buf, protocol.decodeCommandOutcomeWithVoid); - }, - this.native.reloadPlugins(sequence), - sequence, - 'reloadPlugins', - ); - return job; - } - - public addPlugin(plugin_path: string): CancelablePromise { - const sequence = this.sequence(); - const job: CancelablePromise = this.execute( - (buf: Uint8Array): any | Error => { - return decode(buf, protocol.decodeCommandOutcomeWithVoid); - }, - this.native.addPlugin(sequence, plugin_path), - sequence, - 'addPlugin', - ); - - return job; - } - - public removePlugin(plugin_path: string): CancelablePromise { - const sequence = this.sequence(); - const job: CancelablePromise = this.execute( - (buf: Uint8Array): any | Error => { - return decode(buf, protocol.decodeCommandOutcomeWithVoid); - }, - this.native.removePlugin(sequence, plugin_path), - sequence, - `removePlugin`, - ); - - return job; - } -} diff --git a/application/apps/rustcore/ts-bindings/src/api/session.provider.ts b/application/apps/rustcore/ts-bindings/src/api/session.provider.ts deleted file mode 100644 index e561b8cc98..0000000000 --- a/application/apps/rustcore/ts-bindings/src/api/session.provider.ts +++ /dev/null @@ -1,226 +0,0 @@ -import { Subject } from 'platform/env/subscription'; -import { ISearchUpdated } from 'platform/types/filter'; -import { Computation } from '../provider/provider'; -import { EErrorKind, EErrorSeverity } from '../provider/provider.errors'; -import { IMapEntity, IMatchEntity, FilterMatch } from 'platform/types/filter'; -import { AttachmentInfo } from 'platform/types/bindings'; - -import * as protocol from 'protocol'; - -export interface IProgressState { - total: number; - count: number; -} - -export interface IProgressEvent { - uuid: string; - Progress: IProgressState; -} - -export interface IError { - severity: EErrorSeverity; - kind: EErrorKind; - message?: string; -} - -export interface IErrorEvent { - uuid: string; - error: IError; -} - -export interface IOperationDoneEvent { - uuid: string; - result: any; -} - -export interface IEventMapUpdated { - map: IMapEntity[]; -} - -export interface IEventIndexedMapUpdated { - len: number; -} - -export interface IEventMatchesUpdated { - matches: IMatchEntity[]; -} - -export interface IAttachmentsUpdatedUpdated { - len: number; - attachment: AttachmentInfo; -} - -export interface ISessionEvents { - StreamUpdated: Subject; - FileRead: Subject; - SearchUpdated: Subject; - SearchValuesUpdated: Subject | null>; - SearchMapUpdated: Subject; - MapUpdated: Subject; - IndexedMapUpdated: Subject; - MatchesUpdated: Subject; - Progress: Subject; - AttachmentsUpdated: Subject; - SessionError: Subject; - OperationError: Subject; - SessionDestroyed: Subject; - OperationStarted: Subject; - OperationProcessing: Subject; - OperationDone: Subject; -} - -export interface ISessionEventsConvertors {} - -interface ISessionEventsSignatures { - StreamUpdated: 'StreamUpdated'; - FileRead: 'FileRead'; - SearchUpdated: 'SearchUpdated'; - SearchValuesUpdated: 'SearchValuesUpdated'; - SearchMapUpdated: 'SearchMapUpdated'; - MapUpdated: 'MapUpdated'; - IndexedMapUpdated: 'IndexedMapUpdated'; - MatchesUpdated: 'MatchesUpdated'; - Progress: 'Progress'; - AttachmentsUpdated: 'AttachmentsUpdated'; - SessionError: 'SessionError'; - OperationError: 'OperationError'; - SessionDestroyed: 'SessionDestroyed'; - OperationStarted: 'OperationStarted'; - OperationProcessing: 'OperationProcessing'; - OperationDone: 'OperationDone'; -} - -const SessionEventsSignatures: ISessionEventsSignatures = { - StreamUpdated: 'StreamUpdated', - FileRead: 'FileRead', - SearchUpdated: 'SearchUpdated', - SearchValuesUpdated: 'SearchValuesUpdated', - SearchMapUpdated: 'SearchMapUpdated', - MapUpdated: 'MapUpdated', - IndexedMapUpdated: 'IndexedMapUpdated', - MatchesUpdated: 'MatchesUpdated', - AttachmentsUpdated: 'AttachmentsUpdated', - Progress: 'Progress', - SessionError: 'SessionError', - OperationError: 'OperationError', - SessionDestroyed: 'SessionDestroyed', - OperationStarted: 'OperationStarted', - OperationProcessing: 'OperationProcessing', - OperationDone: 'OperationDone', -}; - -interface ISessionEventsInterfaces { - StreamUpdated: { self: 'number' }; - FileRead: { self: null }; - SearchUpdated: { self: 'object'; found: 'number'; stat: typeof Map }; - SearchValuesUpdated: { self: ['object', null] }; - SearchMapUpdated: { self: [typeof Array, null] }; - MapUpdated: { self: 'object'; map: typeof Array }; - IndexedMapUpdated: { self: 'object'; len: 'number' }; - MatchesUpdated: { self: 'object'; matches: typeof Array }; - Progress: { - self: 'object'; - uuid: 'string'; - progress: [ - { self: 'object'; total: 'number'; count: 'number' }, - { self: 'object'; type: 'string' }, - ]; - }; - AttachmentsUpdated: { self: 'object'; len: 'number'; attachment: typeof Object }; - SessionError: { self: 'object'; severity: 'string'; message: 'string'; kind: 'string' }; - OperationError: { - self: 'object'; - uuid: 'string'; - error: { self: 'object'; severity: 'string'; message: 'string'; kind: 'string' }; - }; - SessionDestroyed: { self: null }; - OperationStarted: { self: 'string' }; - OperationProcessing: { self: 'string' }; - OperationDone: { self: 'object'; uuid: 'string'; result: 'any' }; -} - -const SessionEventsInterfaces: ISessionEventsInterfaces = { - StreamUpdated: { self: 'number' }, - FileRead: { self: null }, - SearchUpdated: { self: 'object', found: 'number', stat: Map }, - SearchValuesUpdated: { self: ['object', null] }, - SearchMapUpdated: { self: [Array, null] }, - MapUpdated: { self: 'object', map: Array }, - IndexedMapUpdated: { self: 'object', len: 'number' }, - MatchesUpdated: { self: 'object', matches: Array }, - Progress: { - self: 'object', - uuid: 'string', - progress: [ - { self: 'object', total: 'number', count: 'number' }, - { self: 'object', type: 'string' }, - ], - }, - AttachmentsUpdated: { self: 'object', len: 'number', attachment: Object }, - SessionError: { self: 'object', severity: 'string', message: 'string', kind: 'string' }, - OperationError: { - self: 'object', - uuid: 'string', - error: { self: 'object', severity: 'string', message: 'string', kind: 'string' }, - }, - SessionDestroyed: { self: null }, - OperationStarted: { self: 'string' }, - OperationProcessing: { self: 'string' }, - OperationDone: { self: 'object', uuid: 'string', result: 'any' }, -}; - -export class EventProvider extends Computation< - ISessionEvents, - ISessionEventsSignatures, - ISessionEventsInterfaces -> { - private readonly _events: ISessionEvents = { - StreamUpdated: new Subject(), - FileRead: new Subject(), - SearchUpdated: new Subject(), - SearchValuesUpdated: new Subject | null>(), - SearchMapUpdated: new Subject(), - MapUpdated: new Subject(), - IndexedMapUpdated: new Subject(), - MatchesUpdated: new Subject(), // dummy - Progress: new Subject(), - AttachmentsUpdated: new Subject(), - SessionError: new Subject(), - OperationError: new Subject(), - SessionDestroyed: new Subject(), - OperationStarted: new Subject(), - OperationProcessing: new Subject(), - OperationDone: new Subject(), - }; - - private readonly _convertors: ISessionEventsConvertors = {}; - - constructor(uuid: string) { - super(uuid, protocol.decodeCallbackEvent); - } - - public getName(): string { - return 'EventProvider'; - } - - public getEvents(): ISessionEvents { - return this._events; - } - - public getEventsSignatures(): ISessionEventsSignatures { - return SessionEventsSignatures; - } - - public getEventsInterfaces(): ISessionEventsInterfaces { - return SessionEventsInterfaces; - } - - public getConvertor(event: keyof ISessionEventsSignatures, data: T): T | O | Error { - const convertors = this._convertors as unknown as { [key: string]: (data: T) => T | O }; - if (typeof convertors[event] !== 'function') { - return data; - } else { - return convertors[event](data); - } - } -} diff --git a/application/apps/rustcore/ts-bindings/src/api/session.search.ts b/application/apps/rustcore/ts-bindings/src/api/session.search.ts deleted file mode 100644 index 269b5e844b..0000000000 --- a/application/apps/rustcore/ts-bindings/src/api/session.search.ts +++ /dev/null @@ -1,126 +0,0 @@ -import { Logger } from 'platform/log'; -import { scope } from 'platform/env/scope'; -import { RustSession } from '../native/native.session'; -import { ICancelablePromise } from 'platform/env/promise'; -import { EventProvider } from '../api/session.provider'; -import { GrabbedElement } from 'platform/types/bindings/miscellaneous'; -import { IFilter, ISearchMap, TExtractedValues } from 'platform/types/filter'; -import { ResultSearchValues, NearestPosition } from 'platform/types/bindings'; -import { Executors } from './executors/session.stream.executors'; -import { SearchTaskManager } from './executors/single.task.search'; -import { ValuesTaskManager } from './executors/single.task.values'; -import { ExtractTaskManager } from './executors/single.task.extract'; - -export class SessionSearch { - protected readonly provider: EventProvider; - protected readonly session: RustSession; - protected readonly logger: Logger; - protected readonly managers: { - search: SearchTaskManager; - values: ValuesTaskManager; - extract: ExtractTaskManager; - }; - - constructor(provider: EventProvider, session: RustSession, uuid: string) { - this.logger = scope.getLogger(`SessionSearch: ${uuid}`); - this.provider = provider; - this.session = session; - this.managers = { - search: new SearchTaskManager(provider, session, uuid), - values: new ValuesTaskManager(provider, session, uuid), - extract: new ExtractTaskManager(provider, session, uuid), - }; - } - - public destroy(): Promise { - return Promise.all([ - this.managers.search.destroy(), - this.managers.values.destroy(), - this.managers.extract.destroy(), - ]) - .catch((err: Error) => { - this.logger.error(`Fail to drop managers: ${err.message}`); - }) - .then(() => Promise.resolve()); - } - - /** - * Retruns a chunk of search results, which were gotten with filters by @method setFilters - * @param start { number } - first row number in search result - * @param len { number } - count of rows, which should be included into chank from @param start - */ - public grab(start: number, len: number): Promise { - return this.session.grabSearchChunk(start, len); - } - - /** - * Retruns a chunk of matches results, which were gotten with filters by @method setMatches - * @param start { number } - first row number in search result - * @param len { number } - count of rows, which should be included into chank from @param start - */ - public grabMatchesChunk(start: number, len: number): string[] | Error { - return this.session.grabMatchesChunk(start, len); - } - - public search(filters: IFilter[]): ICancelablePromise { - return this.managers.search.run(filters); - } - - public searchNestedMatch( - filter: IFilter, - from: number, - rev: boolean, - ): Promise<[number, number] | undefined> { - return this.session.searchNestedMatch(filter, from, rev); - } - - public values(filters: string[]): ICancelablePromise { - return this.managers.values.run(filters); - } - - public extract(filters: IFilter[]): ICancelablePromise { - return this.managers.extract.run(filters); - } - - public drop(): Promise { - return new Promise((resolve, reject) => { - this.managers.search.drop().finally(() => { - this.session.dropSearch().then(resolve).catch(reject); - }); - }); - } - - public getMap( - datasetLength: number, - from?: number, - to?: number, - ): ICancelablePromise { - return Executors.map(this.session, this.provider, this.logger, { - datasetLength, - from, - to, - }); - } - - public getValues( - datasetLength: number, - from?: number, - to?: number, - ): ICancelablePromise { - return Executors.values_getter(this.session, this.provider, this.logger, { - datasetLength, - from, - to, - }); - } - - public getNearest(positionInStream: number): ICancelablePromise { - return Executors.nearest(this.session, this.provider, this.logger, { - positionInStream, - }); - } - - public len(): Promise { - return this.session.getSearchLen(); - } -} diff --git a/application/apps/rustcore/ts-bindings/src/api/session.stream.ts b/application/apps/rustcore/ts-bindings/src/api/session.stream.ts deleted file mode 100644 index ec67b4fa2b..0000000000 --- a/application/apps/rustcore/ts-bindings/src/api/session.stream.ts +++ /dev/null @@ -1,121 +0,0 @@ -import { Logger } from 'platform/log'; -import { scope } from 'platform/env/scope'; -import { RustSession } from '../native/native.session'; -import { ICancelablePromise } from 'platform/env/promise'; -import { SdeRequest, SdeResponse } from 'platform/types/sde'; -import { EventProvider } from '../api/session.provider'; -import { Executors } from './executors/session.stream.executors'; -import { EFileOptionsRequirements } from './executors/session.stream.observe.executor'; -import { GrabbedElement } from 'platform/types/bindings/miscellaneous'; -import { IRange } from 'platform/types/range'; -import { ISourceLink } from 'platform/types/observe/types'; -import { Attachment, IndexingMode } from 'platform/types/content'; -import { IObserve } from 'platform/types/observe'; -import { TextExportOptions } from 'platform/types/exporting'; - -export class SessionStream { - private readonly _provider: EventProvider; - private readonly _session: RustSession; - private readonly _uuid: string; - private readonly _logger: Logger; - - constructor(provider: EventProvider, session: RustSession, uuid: string) { - this._logger = scope.getLogger(`SessionStream: ${uuid}`); - this._provider = provider; - this._session = session; - this._uuid = uuid; - } - - public destroy(): Promise { - return Promise.resolve(undefined); - } - - public grab(start: number, len: number): Promise { - return this._session.grabStreamChunk(start, len); - } - - public grabIndexed(start: number, len: number): Promise { - return this._session.grabIndexed(start, len); - } - - public setIndexingMode(mode: IndexingMode): Promise { - return this._session.setIndexingMode(mode); - } - - public getIndexedLen(): Promise { - return this._session.getIndexedLen(); - } - - public getAroundIndexes(position: number): Promise<{ - before: number | undefined; - after: number | undefined; - }> { - return this._session.getAroundIndexes(position); - } - - public addBookmark(row: number): Promise { - return this._session.addBookmark(row); - } - - public setBookmarks(rows: number[]): Promise { - return this._session.setBookmarks(rows); - } - - public removeBookmark(row: number): Promise { - return this._session.removeBookmark(row); - } - - public expandBreadcrumbs(seporator: number, offset: number, above: boolean): Promise { - return this._session.expandBreadcrumbs(seporator, offset, above); - } - - public grabRanges(ranges: IRange[]): Promise { - return this._session.grabStreamRanges(ranges); - } - - public getFileOptionsRequirements(filename: string): EFileOptionsRequirements { - return this._session.getFileOptionsRequirements(filename); - } - - public getSourcesDefinitions(): Promise { - return this._session.getSourcesDefinitions(); - } - - public observe(source: IObserve): ICancelablePromise { - return Executors.observe(this._session, this._provider, this._logger, source); - } - - public sde(operation: string, request: SdeRequest): Promise { - return this._session.sendIntoSde(operation, request).then((response) => { - try { - return response; - } catch (_err) { - return Promise.reject(new Error(`Fail to parse response`)); - } - }); - } - - public getAttachments(): Promise { - return this._session.getAttachments(); - } - - public getIndexedRanges(): Promise { - return this._session.getIndexedRanges(); - } - - public export( - dest: string, - ranges: IRange[], - opt: TextExportOptions, - ): ICancelablePromise { - return Executors.export(this._session, this._provider, this._logger, { dest, ranges, opt }); - } - - public exportRaw(dest: string, ranges: IRange[]): ICancelablePromise { - return Executors.exportRaw(this._session, this._provider, this._logger, { dest, ranges }); - } - - public len(): Promise { - return this._session.getStreamLen(); - } -} diff --git a/application/apps/rustcore/ts-bindings/src/api/session.ts b/application/apps/rustcore/ts-bindings/src/api/session.ts deleted file mode 100644 index 0a7dededa2..0000000000 --- a/application/apps/rustcore/ts-bindings/src/api/session.ts +++ /dev/null @@ -1,515 +0,0 @@ -import { Logger } from 'platform/log'; -import { scope } from 'platform/env/scope'; -import { v4 as uuid } from 'uuid'; -import { Subscription } from 'platform/env/subscription'; -import { RustSession, RustSessionConstructor } from '../native/native.session'; -import { EventProvider, ISessionEvents, IError } from '../api/session.provider'; -import { SessionStream } from '../api/session.stream'; -import { SessionSearch } from '../api/session.search'; -import { IOrderStat } from '../provider/provider'; -import { Executors } from './executors/session.executors'; -import { ISleepResults } from './executors/session.sleep.executor'; -import { ICancelablePromise } from 'platform/env/promise'; -import { OperationStat } from '../interfaces/index'; - -export { - ISessionEvents, - IProgressEvent, - IProgressState, - IEventMapUpdated, - IEventMatchesUpdated, - IEventIndexedMapUpdated, -} from '../api/session.provider'; -export { EventProvider, SessionStream, SessionSearch }; - -export * as $ from 'platform/types/observe'; -export * as Factory from 'platform/types/observe/factory'; - -enum ESessionState { - destroyed, - available, -} - -export class Session { - private readonly _session: RustSession; - private readonly _provider: EventProvider; - private _stream: SessionStream | undefined; - private _search: SessionSearch | undefined; - private readonly _uuid: string = uuid(); - private readonly _logger: Logger; - private readonly _subs: Map = new Map(); - private _state: ESessionState = ESessionState.available; - private _destroying: boolean = false; - private _debug: { - native: OperationStat[]; - } = { - native: [], - }; - - public static create(): Promise { - return new Promise((resolve, reject) => { - new Session((session: Error | Session) => { - if (session instanceof Error) { - reject(session); - } else { - resolve(session); - } - }); - }); - } - - constructor(cb: (err: Error | Session) => void) { - this._logger = scope.getLogger(`Session: ${this._uuid}`); - this._provider = new EventProvider(this._uuid); - this._session = new RustSessionConstructor( - this._uuid, - this._provider, - (err: Error | undefined) => { - if (err instanceof Error) { - cb(err); - } else { - this._stream = new SessionStream(this._provider, this._session, this._uuid); - this._search = new SessionSearch(this._provider, this._session, this._uuid); - this._subs.set( - 'SessionError', - this._provider.getEvents().SessionError.subscribe((err: IError) => { - this._logger.error( - `Session "${this._uuid}" would be destroyed because of error: [${ - err.kind - }/${err.severity}]:: ${err instanceof Error ? err.message : err}`, - ); - }), - ); - this._subs.set( - 'SessionDestroyed', - this._provider.getEvents().SessionDestroyed.subscribe(() => { - this._logger.warn( - `Destroy event has been gotten unexpectedly. Force destroy of session.`, - ); - this._state = ESessionState.destroyed; - this.destroy(); - }), - ); - cb(this); - } - }, - ); - } - - public destroy(): Promise { - const stream = this._stream; - const search = this._search; - const logger = this._logger; - function preparing(): Promise { - if (stream === undefined || search === undefined) { - logger.error(`Attempt to destroy session while it wasn't inited`); - } - return Promise.all([ - // Destroy stream controller - stream === undefined - ? Promise.resolve() - : stream.destroy().catch((err: Error) => { - logger.error( - `Fail correctly destroy SessionStream due error: ${ - err instanceof Error ? err.message : err - }`, - ); - }), - // Destroy search controller - search === undefined - ? Promise.resolve() - : search.destroy().catch((err: Error) => { - logger.error( - `Fail correctly destroy SessionSearch due error: ${ - err instanceof Error ? err.message : err - }`, - ); - }), - ]).then((_) => undefined); - } - return new Promise((resolve, reject) => { - this.requestNativeDebugStat() - .catch((err: Error) => { - this._logger.error(err.message); - }) - .finally(() => { - this._subs.forEach((subscription: Subscription) => { - subscription.destroy(); - }); - if (this._destroying) { - return reject(new Error(`Session is already destroyed or destroing`)); - } - this._destroying = true; - preparing() - .catch((err: Error) => { - this._logger.error( - `Error while destroying: ${ - err instanceof Error ? err.message : err - }`, - ); - }) - .finally(() => { - if (this._state !== ESessionState.destroyed) { - this._provider.getEvents().SessionDestroyed.subscribe(() => { - this._logger.debug( - `Confirmation of session destroying has been received`, - ); - }); - this._session.destroy().then(resolve).catch(reject); - } else { - this._provider.destroy().then(resolve).catch(reject); - } - }); - }); - }); - } - - public getUUID(): string { - return this._uuid; - } - - public getSessionFile(): Promise { - return this._session.getSessionFile(); - } - - public getEvents(): ISessionEvents { - if (this._provider === undefined) { - throw new Error(`EventProvider wasn't created`); - } - return this._provider.getEvents(); - } - - public getStream(): SessionStream { - if (this._stream === undefined) { - throw new Error(`SessionStream wasn't created`); - } - return this._stream; - } - - public getSearch(): SessionSearch { - if (this._search === undefined) { - throw new Error(`SessionSearch wasn't created`); - } - return this._search; - } - - public reset(): Promise { - return new Promise((resolve) => { - resolve(); - }); - } - - public getSocketPath(): string | Error { - if (this._session === undefined) { - return new Error(`RustSession wasn't created`); - } - return this._session.getSocketPath(); - } - - public async isRawExportAvailable(): Promise { - return await this._session.isRawExportAvailable(); - } - - public getNativeSession(): RustSession { - return this._session; - } - - /** - * Method sleep uses ONLY for cancellation testing - * @param duration - duration in ms - * @returns - */ - public sleep(duration: number, ignoreCancellation: boolean): ICancelablePromise { - return Executors.sleep(this._session, this._provider, this._logger, { - duration, - ignoreCancellation, - }); - } - - /** - * Switch session provider into debug mode - * Shows addition logs related to lifecircle - * @param state {boolean}: true - debug mode ON; false - debug mode OFF - */ - public debug(state: boolean, alias?: string) { - this._provider.debug().setStoring(state); - this._provider.debug().setTracking(state); - this._provider.debug().setCount(state); - this.getNativeSession() - .setDebug(true) - .catch((err: Error) => { - this._logger.error( - `Fail set debug mode on native: ${err instanceof Error ? err.message : err}`, - ); - }); - typeof alias === 'string' && this._provider.debug().setAlias(alias); - } - - /** - * Returns debug information: - * - unsupported - list of unsupported events. Events come from rust side to typescript side - * - error - list of errors on provider level - * Note: data will be available only if debug mode is ON - * @returns { - * unsupported: number; - * errors: number; - * } - */ - public getDebugStat(): { - alias: string | undefined; - unsupported: string[]; - errors: string[]; - order: IOrderStat[]; - counter: { [key: string]: number }; - operations: { [key: string]: number }; - } { - return { - alias: this._provider.debug().getAlias(), - unsupported: this._provider.debug().stat.unsupported(), - errors: this._provider.debug().stat.error(), - order: this._provider.debug().stat.order(), - counter: this._provider.debug().stat.counter(), - operations: this._provider.debug().stat.operations(), - }; - } - - public requestNativeDebugStat(): Promise { - if (this._state !== ESessionState.available) { - return Promise.resolve(); - } - return new Promise((resolve, reject) => { - if (this._provider.debug().isTracking()) { - this.getNativeSession() - .getOperationsStat() - .then((op: string) => { - try { - this._debug.native = JSON.parse(op); - resolve(undefined); - } catch (err) { - reject( - new Error( - `Fail get debug stat data from native: ${ - err instanceof Error ? err.message : err - }`, - ), - ); - } - }) - .catch(reject); - } else { - resolve(undefined); - } - }); - } - - public printDebugStat(stdout: boolean) { - const native: OperationStat[] = this._debug.native; - const stat = this.getDebugStat(); - const output = stdout ? console.log : this._logger.debug; - const LEN: number = 80; - const MAX = LEN + 2; - const SCALE = 10; - const format = (str: string, filler: string = ' '): string => { - return `│ ${str}${filler.repeat(MAX > str.length - 3 ? MAX - str.length - 3 : 0)}│`; - }; - const splitter = (): string => { - return `├${'─'.repeat(MAX - 2)}┤`; - }; - const fill = (str: string, len: number, filler: string = ' '): string => { - if (len - str.length < 0) { - return str; - } - return `${filler.repeat(len - str.length)}${str}`; - }; - output(`\n┌${'─'.repeat(LEN)}┐`); - stat.alias !== undefined && output(format(`▒▒▒ ${stat.alias} `, '▒')); - output(format(`Stat information. Session: ${this._uuid}`)); - output(`├${'─'.repeat(LEN)}┤`); - output(format(`Events:`)); - Object.keys(stat.counter).forEach((event: string) => { - output(format(` - [${event}]: ${stat.counter[event]}`)); - }); - output(format(`Operations:`)); - Object.keys(stat.operations).forEach((op: string) => { - output(format(` - [${op}]: ${stat.operations[op]}`)); - }); - const operations: IOrderStat[] = []; - stat.order.forEach((entity: IOrderStat) => { - if (entity.type === 'O' && entity.id !== undefined) { - operations.push(Object.assign({}, entity)); - } - }); - output(format(`Flow:`)); - stat.order.forEach((entity: IOrderStat, i: number) => { - let bound: IOrderStat | undefined; - if ( - entity.type === 'E' && - entity.id !== undefined && - operations.find((e) => e.id === entity.id) !== undefined - ) { - bound = operations.find((e) => e.id === entity.id); - } - output( - format( - `${fill((i + 1).toString(), 4)}. [${entity.type}][${ - entity.id === undefined ? ' ---- ' : entity.id.substr(0, 6) - }] ${entity.name}${bound !== undefined ? ` <-- ${bound.name}` : ''}`, - ), - ); - }); - const unboundEvents: IOrderStat[] = stat.order - .map((entity: IOrderStat) => { - if ( - entity.type !== 'E' || - entity.id === undefined || - operations.find((e) => e.id === entity.id) !== undefined || - native.find((op) => op.uuid == entity.id) !== undefined - ) { - return undefined; - } - return entity; - }) - .filter((ev) => ev !== undefined) as IOrderStat[]; - const jsOperationsScope = ( - stat.order - .map((op) => (op.type === 'O' ? op : undefined)) - .filter((op) => op !== undefined) as IOrderStat[] - ).filter((op) => op.id !== undefined); - const jsOperationsScopeValid = jsOperationsScope.filter((op) => op.duration >= 0); - const merged: Array<{ native: OperationStat; js: IOrderStat }> = []; - jsOperationsScopeValid.forEach((jsOp) => { - const natOp = native.find((op) => op.uuid === jsOp.id); - if (natOp !== undefined) { - merged.push({ - native: Object.assign({}, natOp), - js: Object.assign({}, jsOp), - }); - } - }); - if (merged.length > 0) { - output(format(`NodeJS / Rust scope:`)); - const step = Math.max(...merged.map((op) => op.js.duration)) / SCALE; - merged.forEach((operation: { native: OperationStat; js: IOrderStat }, i: number) => { - let scale = Math.floor(operation.native.duration / 1000 / step); - output( - format( - `${fill((i + 1).toString(), 4)}. [${( - operation.native.uuid as string - ).substr(0, 6)}][${fill( - (operation.native.duration / 1000).toFixed(2), - 8, - )}ms][${'■'.repeat(scale)}${'·'.repeat(SCALE - scale)}][ Rust ] ${ - operation.native.name - }`, - ), - ); - scale = Math.floor(operation.js.duration / step); - output( - format( - `${fill('', 14)}[${fill( - operation.js.duration.toFixed(2), - 8, - )}ms][${'■'.repeat(scale)}${'·'.repeat(SCALE - scale)}][ JS ] ${ - operation.js.name - }`, - ), - ); - const diff = operation.js.duration - operation.native.duration / 1000; - scale = diff <= 0 ? 0 : Math.floor(diff / step); - output( - format( - `${fill('', 14)}[${fill( - (diff < 0 ? 0 : diff).toFixed(2), - 8, - )}ms][${'■'.repeat(scale)}${'·'.repeat(SCALE - scale)}][ diff ]`, - ), - ); - }); - } - const jsOperationsScopeFiltered = jsOperationsScopeValid.filter( - (op) => merged.find((o) => o.js.id === op.id) === undefined, - ); - if (jsOperationsScopeFiltered.length > 0) { - output(format(`NodeJS scope:`)); - const step = Math.max(...jsOperationsScopeFiltered.map((op) => op.duration)) / SCALE; - jsOperationsScopeFiltered.forEach((operation: IOrderStat, i: number) => { - const scale = Math.floor(operation.duration / step); - output( - format( - `${fill((i + 1).toString(), 4)}. [${(operation.id as string).substr( - 0, - 6, - )}][${fill(operation.duration.toFixed(2), 8)}ms][${'■'.repeat( - scale, - )}${'·'.repeat(SCALE - scale)}][ T/R ] ${operation.name}`, - ), - ); - }); - } - const nativeFiltered = native.filter( - (op) => merged.find((o) => o.native.uuid === op.uuid) === undefined, - ); - if (nativeFiltered.length > 0) { - output(format(`Native scope:`)); - const isBound = (uuid: string): boolean => { - return operations.find((e) => e.id === uuid) !== undefined; - }; - const step = Math.max(...nativeFiltered.map((op) => op.duration)) / SCALE; - nativeFiltered.forEach((operation: OperationStat, i: number) => { - const scale = Math.floor(operation.duration / step); - output( - format( - `${fill((i + 1).toString(), 4)}. [${operation.uuid.substr(0, 6)}][${fill( - (operation.duration / 1000).toFixed(2), - 8, - )}ms][${'■'.repeat(scale)}${'·'.repeat(SCALE - scale)}][${ - isBound(operation.uuid) ? ' T/R ' : ' R ' - }] ${operation.name}`, - ), - ); - }); - } - if (unboundEvents.length === 0) { - output(format(`Unbound events: no events`)); - } else { - output(format(`Unbound events:`)); - unboundEvents.forEach((entity: IOrderStat, i: number) => { - output( - format( - `${fill((i + 1).toString(), 4)}. [${entity.type}][${ - entity.id === undefined ? ' ---- ' : entity.id.substr(0, 6) - }] ${entity.name}`, - ), - ); - }); - } - if (stat.unsupported.length === 0) { - output(format(`Unsupported events: nothing`)); - } else { - output(format(`Unsupported events:`)); - stat.unsupported.forEach((event: string) => { - output(format(` - ${event}`)); - }); - } - if (stat.errors.length === 0) { - output(format(`Errors: no errors`)); - } else { - output(format(`Errors:`)); - stat.errors.forEach((event: string) => { - output(format(` - ${event}`)); - }); - } - if (stat.order.length > 0 || native.length > 0) { - output(splitter()); - if (stat.order.length > 0) { - output(format(` - [O] - operation`)); - output(format(` - [E] - event`)); - } - if (native.length > 0) { - output(format(` - [T/R] - called like TS -> Rust`)); - output(format(` - [R] - called in Rust only`)); - } - } - output(`└${'─'.repeat(LEN)}┘`); - } -} diff --git a/application/apps/rustcore/ts-bindings/src/api/tracker.provider.ts b/application/apps/rustcore/ts-bindings/src/api/tracker.provider.ts deleted file mode 100644 index 84def0887f..0000000000 --- a/application/apps/rustcore/ts-bindings/src/api/tracker.provider.ts +++ /dev/null @@ -1,106 +0,0 @@ -import { Subject } from 'platform/env/subscription'; -import { Computation } from '../provider/provider'; - -import * as protocol from 'protocol'; - -export interface Job { - alias: string; - uuid: string; -} - -export interface JobProgress { - uuid: string; - ticks: Ticks; -} -export interface Ticks { - count: number; - state: string | undefined; - total: number | undefined; -} - -export interface ISessionEvents { - Started: Subject; - Stopped: Subject; - Ticks: Subject; -} - -interface ISessionEventsSignatures { - Started: 'Started'; - Stopped: 'Stopped'; - Ticks: 'Ticks'; -} - -const SessionEventsSignatures: ISessionEventsSignatures = { - Started: 'Started', - Stopped: 'Stopped', - Ticks: 'Ticks', -}; - -interface ISessionEventsInterfaces { - Started: { self: 'object'; uuid: 'string'; alias: 'string' }; - Stopped: { self: 'string' }; - Ticks: { - self: 'object'; - uuid: 'string'; - progress: [ - { self: 'object'; total: 'number'; count: 'number' }, - { self: 'object'; type: 'string' }, - ]; - }; -} - -const SessionEventsInterfaces: ISessionEventsInterfaces = { - Started: { self: 'object', uuid: 'string', alias: 'string' }, - Stopped: { self: 'string' }, - Ticks: { - self: 'object', - uuid: 'string', - progress: [ - { self: 'object', total: 'number', count: 'number' }, - { self: 'object', type: 'string' }, - ], - }, -}; - -export class EventProvider extends Computation< - ISessionEvents, - ISessionEventsSignatures, - ISessionEventsInterfaces -> { - private readonly _events: ISessionEvents = { - Started: new Subject(), - Stopped: new Subject(), - Ticks: new Subject(), - }; - - private readonly _convertors = {}; - - constructor(uuid: string) { - super(uuid, protocol.decodeLifecycleTransition); - } - - public getName(): string { - return 'EventProvider'; - } - - public getEvents(): ISessionEvents { - return this._events; - } - - public getEventsSignatures(): ISessionEventsSignatures { - return SessionEventsSignatures; - } - - public getEventsInterfaces(): ISessionEventsInterfaces { - return SessionEventsInterfaces; - } - - public getConvertor(event: keyof ISessionEventsSignatures, data: T): T | O | Error { - const convertors = this._convertors as unknown as { [key: string]: (data: T) => T | O }; - if (typeof convertors[event] !== 'function') { - return data; - } else { - return convertors[event](data); - } - } -} diff --git a/application/apps/rustcore/ts-bindings/src/api/tracker.ts b/application/apps/rustcore/ts-bindings/src/api/tracker.ts deleted file mode 100644 index c7b1f5af22..0000000000 --- a/application/apps/rustcore/ts-bindings/src/api/tracker.ts +++ /dev/null @@ -1,84 +0,0 @@ -import { Logger } from 'platform/log'; -import { scope } from 'platform/env/scope'; -import { getNativeModule } from '../native/native'; -import { TrackerNative } from '../native/native.tracker'; -import { EventProvider } from './tracker.provider'; -import { unique } from 'platform/env/sequence'; - -enum State { - destroyed, - destroying, - inited, - created, -} - -export class Tracker { - public static async create(): Promise { - const instance = new Tracker(); - await instance.init(); - return instance; - } - - protected readonly logger: Logger = scope.getLogger(`Tracker`); - protected readonly native: TrackerNative; - protected readonly uuid = unique(); - - public readonly provider: EventProvider; - - private _state: State = State.created; - - constructor() { - this.native = new (getNativeModule().RustProgressTracker)() as TrackerNative; - this.provider = new EventProvider(this.uuid); - this.logger.debug(`Rust Tracker native session is created`); - } - - public async init(): Promise { - return new Promise((resolve, reject) => { - this.native - .init(this.provider.getEmitter()) - .then(() => { - this.logger.debug(`Rust Tracker native session is inited`); - this._state = State.inited; - resolve(this); - }) - .catch((err: Error) => { - this.logger.error( - `Fail to init Tracker session: ${err instanceof Error ? err.message : err}`, - ); - reject(err); - }); - }); - } - - public async destroy(): Promise { - if (this._state !== State.inited) { - return Promise.reject(new Error(`Session isn't inited`)); - } - this._state = State.destroying; - return new Promise((resolve, reject) => { - const timeout = setTimeout(() => { - this.logger.error(`Timeout error. Session wasn't closed in 5 sec.`); - reject(new Error(`Timeout error. Session wasn't closed in 5 sec.`)); - }, 5000); - this.native - .destroy() - .then(() => { - this.logger.debug(`Session has been destroyed`); - resolve(); - }) - .catch((err: Error) => { - this.logger.error( - `Fail to close session due error: ${ - err instanceof Error ? err.message : err - }`, - ); - reject(err); - }) - .finally(() => { - this._state = State.destroyed; - clearTimeout(timeout); - }); - }); - } -} diff --git a/application/apps/rustcore/ts-bindings/src/index.ts b/application/apps/rustcore/ts-bindings/src/index.ts deleted file mode 100644 index da344f180b..0000000000 --- a/application/apps/rustcore/ts-bindings/src/index.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { v4 } from 'uuid'; -import { setUuidGenerator } from 'platform/env/sequence'; - -import * as Units from './util/units'; -import * as Interfaces from './interfaces/index'; -import * as Events from 'platform/env/subscription'; - -export { CancelablePromise, PromiseExecutor, ICancelablePromise } from 'platform/env/promise'; -export { - TFileOptions, - IFileOptionsDLT, - EFileOptionsRequirements, -} from './api/executors/session.stream.observe.executor'; -export { - Session, - SessionSearch, - SessionStream, - ISessionEvents, - IProgressEvent, - IProgressState, - IEventMapUpdated, - IEventMatchesUpdated, - IEventIndexedMapUpdated, -} from './api/session'; -export { Jobs } from './api/jobs'; -export { Tracker } from './api/tracker'; -export { Units, Events, Interfaces }; - -export * as $ from 'platform/types/observe'; - -setUuidGenerator(v4); diff --git a/application/apps/rustcore/ts-bindings/src/interfaces/debug.ts b/application/apps/rustcore/ts-bindings/src/interfaces/debug.ts deleted file mode 100644 index d91200e602..0000000000 --- a/application/apps/rustcore/ts-bindings/src/interfaces/debug.ts +++ /dev/null @@ -1,6 +0,0 @@ -export interface OperationStat { - uuid: string; - name: string; - duration: number; - started: number; -} diff --git a/application/apps/rustcore/ts-bindings/src/interfaces/errors.ts b/application/apps/rustcore/ts-bindings/src/interfaces/errors.ts deleted file mode 100644 index 9d5dc0583d..0000000000 --- a/application/apps/rustcore/ts-bindings/src/interfaces/errors.ts +++ /dev/null @@ -1,230 +0,0 @@ -import { Logger } from 'platform/log'; -import { scope } from 'platform/env/scope'; - -import * as utils from 'platform/log/utils'; -import * as protocol from 'protocol'; - -export enum Type { - NotImplemented = 'NotImplemented', - InvalidInput = 'InvalidInput', - InvalidOutput = 'InvalidOutput', - GrabbingSearch = 'GrabbingSearch', - GrabbingContent = 'GrabbingContent', - ParsingContentChunk = 'ParsingContentChunk', - ParsingSearchChunk = 'ParsingSearchChunk', - CancelationError = 'CancelationError', - ContentManipulation = 'ContentManipulation', - Communication = 'Communication', - DestinationPath = 'DestinationPath', - Grabbing = 'Grabbing', - InvalidArgs = 'InvalidArgs', - InvalidData = 'InvalidData', - IoOperation = 'IoOperation', - MultipleInitCall = 'MultipleInitCall', - NativeError = 'NativeError', - OperationNotSupported = 'OperationNotSupported', - Process = 'Process', - Protocol = 'Protocol', - Sde = 'Sde', - SearchError = 'SearchError', - SessionCreatingFail = 'SessionCreatingFail', - SessionUnavailable = 'SessionUnavailable', - Unrecognized = 'Unrecognized', - Decoding = 'Decoding', - Encoding = 'Encoding', - Other = 'Other', -} - -export enum Source { - Assign = 'Assign', - Search = 'Search', - SearchNested = 'SearchNested', - SearchValues = 'SearchValues', - GetMap = 'GetMap', - ExtractMatchesValues = 'ExtractMatchesValues', - GrabStreamChunk = 'GrabStreamChunk', - GrabSearchChunk = 'GrabSearchChunk', - GetSocketPath = 'GetSocketPath', - GetNearestTo = 'GetNearestTo', - GetStreamLen = 'GetStreamLen', - GetSearchLen = 'GetSearchLen', - GetFilters = 'GetFilters', - GetSourcesDefinitions = 'GetSourcesDefinitions', - GetOperationsStat = 'GetOperationsStat', - SetDebug = 'SetDebug', - SendIntoSde = 'SendIntoSde', - GetAttachments = 'GetAttachments', - GetIndexedRanges = 'GetIndexedRanges', - Concat = 'Concat', - Merge = 'Merge', - Extract = 'Extract', - Export = 'Export', - Detect = 'Detect', - Abort = 'Abort', - Sleep = 'Sleep', - TriggerStateError = 'TriggerStateError', - TriggerTrackerError = 'TriggerTrackerError', - AddBookmark = 'AddBookmark', - SetBookmarks = 'SetBookmarks', - RemoveSelection = 'RemoveSelection', - AddSelection = 'AddSelection', - RemoveBookmark = 'RemoveBookmark', - ExpandBreadcrumbs = 'ExpandBreadcrumbs', - SetIndexingMode = 'SetIndexingMode', - GetIndexedLen = 'GetIndexedLen', - getAroundIndexes = 'getAroundIndexes', - Native = 'Native', - Other = 'Other', -} - -export class NativeError extends Error { - private readonly _type: Type; - private readonly _source: Source; - private readonly _logger: Logger = scope.getLogger(`NativeError`); - - public static from(smth: any): Error { - if (smth instanceof Error) { - return smth; - } - if (typeof smth === 'string') { - return new Error(smth); - } - if (smth instanceof Buffer || smth instanceof Uint8Array) { - try { - const err = protocol.decodeComputationError( - smth instanceof Buffer ? Uint8Array.from(smth) : smth, - ); - if (err === null) { - return new NativeError( - new Error(`Fail decode error`), - Type.InvalidData, - Source.Native, - ); - } - if (typeof err === 'string') { - if ('DestinationPath' === err) { - return new NativeError( - new Error(`Destination path error`), - Type.Communication, - Source.Native, - ); - } else if ('SessionCreatingFail' === err) { - return new NativeError( - new Error(`Fail to create a session`), - Type.SessionCreatingFail, - Source.Native, - ); - } else if ('InvalidData' === err) { - return new NativeError( - new Error(`Invalid data`), - Type.InvalidData, - Source.Native, - ); - } else if ('MultipleInitCall' === err) { - return new NativeError( - new Error(`Multiple init call`), - Type.MultipleInitCall, - Source.Native, - ); - } else if ('SessionUnavailable' === err) { - return new NativeError( - new Error(`Session is unavailable`), - Type.SessionUnavailable, - Source.Native, - ); - } - } else if ('Communication' in err) { - return new NativeError( - new Error(err.Communication), - Type.Communication, - Source.Native, - ); - } else if ('OperationNotSupported' in err) { - return new NativeError( - new Error(err.OperationNotSupported), - Type.OperationNotSupported, - Source.Native, - ); - } else if ('IoOperation' in err) { - return new NativeError( - new Error(err.IoOperation), - Type.IoOperation, - Source.Native, - ); - } else if ('InvalidArgs' in err) { - return new NativeError( - new Error(err.InvalidArgs), - Type.InvalidArgs, - Source.Native, - ); - } else if ('Process' in err) { - return new NativeError(new Error(err.Process), Type.Process, Source.Native); - } else if ('Protocol' in err) { - return new NativeError(new Error(err.Protocol), Type.Protocol, Source.Native); - } else if ('SearchError' in err) { - return new NativeError( - new Error(`Search error: ${err.SearchError}`), - Type.SearchError, - Source.Native, - ); - } else if ('NativeError' in err) { - return new NativeError( - new Error(err.NativeError?.message), - Type.NativeError, - Source.Native, - ); - } else if ('Grabbing' in err) { - return new NativeError( - new Error(`Grabbing error: ${err.Grabbing}`), - Type.SearchError, - Source.Native, - ); - } else if ('Sde' in err) { - return new NativeError(new Error(err.Sde), Type.Sde, Source.Native); - } else if ('Decoding' in err) { - return new NativeError(new Error(err.Decoding), Type.Decoding, Source.Native); - } else if ('Encoding' in err) { - return new NativeError(new Error(err.Encoding), Type.Encoding, Source.Native); - } else { - return new NativeError( - new Error(`Fail to recognize error: ${JSON.stringify(err)}`), - Type.Unrecognized, - Source.Native, - ); - } - } catch (err) { - return new NativeError( - new Error(`Fail to decode error: ${utils.error(err)}`), - Type.Other, - Source.Other, - ); - } - } - return smth instanceof Error - ? smth - : new Error(`${typeof smth !== 'string' ? JSON.stringify(smth) : smth}`); - } - constructor(error: Error, kind: Type, source: Source) { - super(error.message); - this.stack = error.stack; - this._type = kind; - this._source = source; - this.log(); - } - - public getType(): Type { - return this._type; - } - - public getSource(): Source { - return this._source; - } - - public log(): void { - this._logger.error( - `\n\ttype: ${this.getType()};\n\tsource: ${this.getSource()};\n\tmessage: ${ - this.message - }`, - ); - } -} diff --git a/application/apps/rustcore/ts-bindings/src/interfaces/index.ts b/application/apps/rustcore/ts-bindings/src/interfaces/index.ts deleted file mode 100644 index 213f83454d..0000000000 --- a/application/apps/rustcore/ts-bindings/src/interfaces/index.ts +++ /dev/null @@ -1 +0,0 @@ -export { OperationStat } from '../interfaces/debug'; diff --git a/application/apps/rustcore/ts-bindings/src/native/native.jobs.ts b/application/apps/rustcore/ts-bindings/src/native/native.jobs.ts deleted file mode 100644 index 2ce5c1dbd3..0000000000 --- a/application/apps/rustcore/ts-bindings/src/native/native.jobs.ts +++ /dev/null @@ -1,248 +0,0 @@ -import { Logger } from 'platform/log'; -import { scope } from 'platform/env/scope'; -import { CancelablePromise } from 'platform/env/promise'; -import { error } from 'platform/log/utils'; -import { getNativeModule } from '../native/native'; -import { NativeError } from '../interfaces/errors'; - -export abstract class JobsNative { - public abstract abort(sequence: number): Promise; - - public abstract init(): Promise; - - public abstract destroy(): Promise; - - public abstract isFileBinary(sequence: number, filePath: string): Promise; - - public abstract jobCancelTest( - sequence: number, - num_a: number, - num_b: number, - ): Promise; - - public abstract listFolderContent( - sequence: number, - depth: number, - max: number, - paths: string[], - includeFiles: boolean, - includeFolders: boolean, - ): Promise; - - public abstract getFileChecksum(sequence: number, path: string): Promise; - public abstract getDltStats(sequence: number, files: string[]): Promise; - public abstract getSomeipStatistic(sequence: number, files: string[]): Promise; - public abstract getShellProfiles(sequence: number): Promise; - public abstract getSerialPortsList(sequence: number): Promise; - public abstract sleep(sequence: number, ms: number): Promise; - public abstract getRegexError( - sequence: number, - filter: { - value: string; - is_regex: boolean; - ignore_case: boolean; - is_word: boolean; - }, - ): Promise; - public abstract installedPluginsList(sequence: number): Promise; - public abstract invalidPluginsList(sequence: number): Promise; - public abstract installedPluginsPaths(sequence: number): Promise; - public abstract invalidPluginsPaths(sequence: number): Promise; - public abstract installedPluginsInfo( - sequence: number, - plugin_path: string, - ): Promise; - public abstract invalidPluginsInfo(sequence: number, plugin_path: string): Promise; - public abstract getPluginRunData(sequence: number, plugin_path: string): Promise; - public abstract reloadPlugins(sequence: number): Promise; - public abstract addPlugin(sequence: number, plugin_path: string): Promise; - public abstract removePlugin(sequence: number, plugin_path: string): Promise; -} - -interface Job { - started: number; - alias: string; -} - -export class Queue { - protected jobs: Map = new Map(); - private _sequence: number = 0; - - public add(sequence: number, alias: string): void { - this.jobs.set(sequence, { - started: Date.now(), - alias, - }); - } - - public remove(sequence: number): void { - this.jobs.delete(sequence); - } - - public sequence(): number { - return ++this._sequence; - } -} - -export type JobResult = { Finished: T } | 'Cancelled'; - -export type ConvertCallback = (input: Uint8Array) => Output | Error | Cancelled; - -enum State { - destroyed, - destroying, - inited, - created, -} - -export class Cancelled extends Error {} - -export function decode( - buf: Uint8Array, - decoder: (buf: Uint8Array) => any, -): Output | Error | Cancelled { - try { - const output = decoder(buf); - if (output === 'Cancelled') { - return new Cancelled(`Job has been cancelled`); - } else if ('Finished' in output) { - return output.Finished as Output; - } else { - return new Error(`Fail to detect job status.`); - } - } catch (err) { - return new Error(`Fail to decode job's results: ${error(err)}`); - } -} - -const DESTROY_TIMEOUT = 5000; - -export class Base { - protected readonly logger: Logger = scope.getLogger(`Jobs`); - protected readonly native: JobsNative; - protected readonly queue: Queue = new Queue(); - - private _state: State = State.created; - - constructor() { - this.native = new (getNativeModule().UnboundJobs)() as JobsNative; - this.logger.debug(`Rust Jobs native session is created`); - } - - public async init(): Promise { - return new Promise((resolve, reject) => { - this.native - .init() - .then(() => { - this.logger.debug(`Rust Jobs native session is inited`); - this._state = State.inited; - resolve(this); - }) - .catch((err: Error) => { - this.logger.error( - `Fail to init Jobs session: ${err instanceof Error ? err.message : err}`, - ); - reject(err); - }); - }); - } - - public async destroy(): Promise { - if (this._state !== State.inited) { - return Promise.reject(new Error(`Session isn't inited`)); - } - this._state = State.destroying; - return new Promise((resolve, reject) => { - const timeout = setTimeout(() => { - reject( - new Error( - this.logger.error( - `Timeout error. Session wasn't closed in ${ - DESTROY_TIMEOUT / 1000 - } sec.`, - ), - ), - ); - }, DESTROY_TIMEOUT); - this.native - .destroy() - .then(() => { - this.logger.debug(`Session has been destroyed`); - resolve(); - }) - .catch((err: Error) => { - this.logger.error( - `Fail to close session due error: ${ - err instanceof Error ? err.message : err - }`, - ); - reject(err); - }) - .finally(() => { - this._state = State.destroyed; - clearTimeout(timeout); - }); - }); - } - - protected async abort(sequence: number): Promise { - return new Promise((resolve, reject) => { - this.native - .abort(sequence) - .then(resolve) - .catch((err: Error) => { - this.logger.error( - `Fail to abort operation due error: ${ - err instanceof Error ? err.message : err - }`, - ); - reject(err); - }); - }); - } - - protected sequence(): number { - return this.queue.sequence(); - } - - protected execute( - convert: ConvertCallback, - task: Promise, - sequence: number, - alias: string, - ): CancelablePromise { - return new CancelablePromise((resolve, reject, cancel, refCancel, self) => { - if (this._state !== State.inited) { - return reject(new Error(`Session isn't inited`)); - } - this.queue.add(sequence, alias); - refCancel(() => { - this.abort(sequence).catch((err: Error) => { - if (self.isCompleted()) { - this.logger.warn('Job was already completed on aborting'); - return; - } - this.logger.error(`Fail to cancel ${error(err)}`); - }); - }); - task.then((buf: Uint8Array) => { - const decoded = convert(buf); - if (decoded instanceof Cancelled || self.isCanceling()) { - cancel(); - } else if (decoded instanceof Error) { - reject(decoded); - } else { - resolve(decoded); - } - }) - .catch((err: Error | Uint8Array) => { - const nerr = NativeError.from(err); - this.logger.error(`Fail to do "${alias}" operation due error: ${error(nerr)}`); - reject(nerr); - }) - .finally(() => { - this.queue.remove(sequence); - }); - }); - } -} diff --git a/application/apps/rustcore/ts-bindings/src/native/native.session.required.ts b/application/apps/rustcore/ts-bindings/src/native/native.session.required.ts deleted file mode 100644 index 2483146050..0000000000 --- a/application/apps/rustcore/ts-bindings/src/native/native.session.required.ts +++ /dev/null @@ -1,15 +0,0 @@ -/** - * TODO: - * Method destroy should be asynch on NodeJS level. It should returns standard (not cancelable) promise. - * Because from rust we cannot return a promise, method should be implemented here. Considering: - * - prevent multiple calls - * - listen event destroy and resolve on it - * - add timeout and reject on it - * - listen error and ? What to do it error was between calling destroy and getting event destroy? - * - naming: destroy good for NodeJS level, on Rust level probably shutdown would be fine - */ -export abstract class RustSessionRequiered { - - public abstract destroy(): void; - -} diff --git a/application/apps/rustcore/ts-bindings/src/native/native.session.ts b/application/apps/rustcore/ts-bindings/src/native/native.session.ts deleted file mode 100644 index eeece0c673..0000000000 --- a/application/apps/rustcore/ts-bindings/src/native/native.session.ts +++ /dev/null @@ -1,1206 +0,0 @@ -/* eslint-disable @typescript-eslint/no-unused-vars */ -import { RustSessionRequiered } from '../native/native.session.required'; -import { TEventEmitter } from '../provider/provider.general'; -import { Computation } from '../provider/provider'; -import { IFilter } from 'platform/types/filter'; -import { GrabbedElement } from 'platform/types/bindings/miscellaneous'; -import { getNativeModule } from '../native/native'; -import { EFileOptionsRequirements } from '../api/executors/session.stream.observe.executor'; -import { Type, Source, NativeError } from '../interfaces/errors'; -import { v4 as uuidv4 } from 'uuid'; -import { getValidNum } from '../util/numbers'; -import { IRange, fromTuple } from 'platform/types/range'; -import { ISourceLink } from 'platform/types/observe/types'; -import { IndexingMode, Attachment } from 'platform/types/content'; -import { Logger, utils } from 'platform/log'; -import { scope } from 'platform/env/scope'; -import { IObserve } from 'platform/types/observe'; -import { TextExportOptions } from 'platform/types/exporting'; - -import * as protocol from 'protocol'; -import * as types from 'platform/types'; - -export type RustSessionConstructorImpl = new ( - uuid: string, - provider: Computation, - cb: (err: Error | undefined) => void, -) => T; -export type TCanceler = () => void; - -// Create abstract class to declare available methods -export abstract class RustSession extends RustSessionRequiered { - constructor(uuid: string, provider: Computation) { - super(); - } - - public abstract override destroy(): Promise; - - /** - * Returns chunk of stream/session file. - * @param start { number } row number of range's start - * @param len { number } length of the chunk's range - * @returns { string } - * - * @error In case of incorrect range should return { NativeError } - */ - public abstract grabStreamChunk(start: number, len: number): Promise; - - public abstract grabStreamRanges(ranges: IRange[]): Promise; - - public abstract grabIndexed(start: number, len: number): Promise; - - public abstract setIndexingMode(mode: IndexingMode): Promise; - - public abstract getIndexedLen(): Promise; - - public abstract getAroundIndexes( - position: number, - ): Promise<{ before: number | undefined; after: number | undefined }>; - - public abstract expandBreadcrumbs( - seporator: number, - offset: number, - above: boolean, - ): Promise; - - public abstract removeBookmark(row: number): Promise; - - public abstract addBookmark(row: number): Promise; - - public abstract setBookmarks(rows: number[]): Promise; - - /** - * Returns chunk of stream/session file. - * @param start { number } row number of range's start - * @param len { number } length of the chunk's range - * @returns { string } - * @error In case of incorrect range should return { NativeError } - */ - public abstract grabSearchChunk(start: number, len: number): Promise; - - /** - * TODO: @return needs interface. It should not be a string - */ - public abstract grabMatchesChunk(start: number, len: number): string[] | NativeError; - - /** - * Returns list of observed sources. - * @returns { string } - */ - public abstract getSourcesDefinitions(): Promise; - - public abstract getUuid(): string; - - public abstract getSessionFile(): Promise; - - /** - * Returns reference to option's type, which should be defined for @method append - * Would be called each time before @method append - * @param filename { string } full filename - * @returns { EFileOptionsRequirements } - */ - public abstract getFileOptionsRequirements(filename: string): EFileOptionsRequirements; - - /** - * Returns length (count of rows) of session/stream file - * @returns { nummber } - */ - public abstract getStreamLen(): Promise; - - /** - * Returns length (count of rows) of search results stream - * @returns { nummber } - */ - public abstract getSearchLen(): Promise; - - /** - * Returns length (count of rows with matches) of getting matches in stream - * @returns { nummber } - */ - public abstract getMatchesLen(): number | NativeError; - - /** - * Returns path to socket, which can be used to pass data into session stream - * @returns { string } - */ - public abstract getSocketPath(): string | NativeError; - - /** - * Assigns session with the file. After the file was assigned, @method concat, @method merge cannot be used - * and should return @error NativeError. - * @param emitter { TEventEmitter } emitter to handle event related to lifecircle of this method only - * @param filename { string } file, which should be assigned to session - * @param options { TFileOptions } options to open file - * @returns { string | NativeError } - callback, which can be called on NodeJS level to cancel - * async operation. After TCanceler was called, @event destroy of @param emitter would be expected to - * confirm cancelation. - */ - public abstract observe(source: IObserve, operationUuid: string): Promise; - - public abstract export( - dest: string, - ranges: IRange[], - opt: TextExportOptions, - operationUuid: string, - ): Promise; - - public abstract exportRaw(dest: string, ranges: IRange[], operationUuid: string): Promise; - - public abstract isRawExportAvailable(): Promise; - - public abstract searchNestedMatch( - filter: IFilter, - from: number, - rev: boolean, - ): Promise<[number, number] | undefined>; - - public abstract search(filters: IFilter[], operationUuid: string): Promise; - - public abstract searchValues(filters: string[], operationUuid: string): Promise; - - public abstract dropSearch(): Promise; - - public abstract extractMatchesValues(filters: IFilter[], operationUuid: string): Promise; - - public abstract getMap( - operationUuid: string, - datasetLength: number, - from?: number, - to?: number, - ): Promise; - - public abstract getValues( - operationUuid: string, - datasetLength: number, - from?: number, - to?: number, - ): Promise; - - public abstract getNearestTo( - operationUuid: string, - positionInStream: number, - ): Promise<{ index: number; position: number } | undefined>; - - public abstract sendIntoSde( - targetOperationUuid: string, - request: types.sde.SdeRequest, - ): Promise; - - public abstract getAttachments(): Promise; - public abstract getIndexedRanges(): Promise; - - public abstract abort( - selfOperationUuid: string, - targetOperationUuid: string, - ): NativeError | undefined; - - public abstract setDebug(debug: boolean): Promise; - - public abstract getOperationsStat(): Promise; - - // Used only for testing and debug - public abstract sleep( - operationUuid: string, - duration: number, - ignoreCancellation: boolean, - ): Promise; - - // Used only for testing and debug - public abstract triggerStateError(): Promise; - - // Used only for testing and debug - public abstract triggerTrackerError(): Promise; - - // Used only for testing and debug - public abstract testGrabElsAsJson(): GrabbedElement[] | NativeError; - - // Used only for testing and debug - public abstract testGrabElsAsBin(): GrabbedElement[] | NativeError; -} - -export abstract class RustSessionNative { - public abstract stop(operationUuid: string): Promise; - - public abstract init(callback: TEventEmitter): Promise; - - public abstract getUuid(): string; - - public abstract getSessionFile(): Promise; - - public abstract observe(source: Uint8Array, operationUuid: string): Promise; - - public abstract getStreamLen(): Promise; - - public abstract getSourcesDefinitions(): Promise; - - public abstract grab(start: number, len: number): Promise; - - public abstract grabIndexed(start: number, len: number): Promise; - - public abstract setIndexingMode(mode: number): Promise; - - public abstract getIndexedLen(): Promise; - - public abstract getAroundIndexes(position: number): Promise<[number | null, number | null]>; - - public abstract expandBreadcrumbs( - seporator: number, - offset: number, - above: boolean, - ): Promise; - - public abstract removeBookmark(row: number): Promise; - - public abstract addBookmark(row: number): Promise; - - public abstract setBookmarks(rows: number[]): Promise; - - public abstract grabRanges(ranges: number[][]): Promise; - - public abstract grabSearch(start: number, len: number): Promise; - - public abstract getSearchLen(): Promise; - - public abstract export( - dest: string, - ranges: number[][], - columns: number[], - spliter: string, - delimiter: string, - operationUuid: string, - ): Promise; - - public abstract exportRaw( - dest: string, - ranges: number[][], - operationUuid: string, - ): Promise; - - public abstract isRawExportAvailable(): Promise; - - public abstract applySearchFilters( - filters: Array<{ - value: string; - is_regex: boolean; - ignore_case: boolean; - is_word: boolean; - }>, - operationUuid: string, - ): Promise; - - public abstract searchNestedMatch( - filter: { - value: string; - is_regex: boolean; - ignore_case: boolean; - is_word: boolean; - }, - from: number, - rev: boolean, - ): Promise<[number, number] | undefined>; - - public abstract applySearchValuesFilters( - filters: string[], - operationUuid: string, - ): Promise; - - public abstract dropSearch(): Promise; - - public abstract extractMatches( - filters: Array<{ - value: string; - is_regex: boolean; - ignore_case: boolean; - is_word: boolean; - }>, - operationUuid: string, - ): Promise; - - public abstract getMap( - operationUuid: string, - datasetLength: number, - from?: number, - to?: number, - ): Promise; - - public abstract getValues( - operationUuid: string, - datasetLength: number, - from?: number, - to?: number, - ): Promise; - - public abstract getNearestTo( - operationUuid: string, - positionInStream: number, - ): Promise; - - public abstract sendIntoSde( - targetOperationUuid: string, - request: Uint8Array, - ): Promise; - public abstract getAttachments(): Promise; - public abstract getIndexedRanges(): Promise; - - public abstract abort( - selfOperationUuid: string, - targetOperationUuid: string, - ): NativeError | undefined; - - public abstract setDebug(debug: boolean): Promise; - - public abstract getOperationsStat(): Promise; - - // Used only for testing and debug - public abstract sleep( - operationUuid: string, - duration: number, - ignoreCancellation: boolean, - ): Promise; - - // Used only for testing and debug - public abstract triggerStateError(): Promise; - - // Used only for testing and debug - public abstract triggerTrackerError(): Promise; - - // Used only for testing and debug - public abstract testGrabElsAsJson(): string; - - // Used only for testing and debug - public abstract testGrabElsAsBin(): number[]; -} - -export function rustSessionFactory( - uuid: string, - provider: Computation, -): Promise { - return new Promise((resolve, reject) => { - const session = new RustSessionConstructor(uuid, provider, (err: Error | undefined) => { - if (err instanceof Error) { - reject(err); - } else { - resolve(session); - } - }); - }); -} - -const DESTROY_TIMEOUT = 5000; - -export class RustSessionWrapper extends RustSession { - private readonly _logger: Logger = scope.getLogger(`RustSessionWrapper`); - private readonly _uuid: string; - private readonly _native: RustSessionNative; - private _assigned: boolean = false; - private _provider: Computation; - - constructor( - uuid: string, - provider: Computation, - cb: (err: Error | undefined) => void, - ) { - super(uuid, provider); - this._native = new (getNativeModule().RustSession)(uuid) as RustSessionNative; - this._logger.debug(`Rust native session is created`); - this._uuid = uuid; - this._provider = provider; - this._provider.debug().emit.operation('init'); - this._native - .init(provider.getEmitter()) - .then(() => { - this._logger.debug(`Rust native session is inited`); - cb(undefined); - }) - .catch((err: Error) => { - this._logger.error( - `Fail to init session: ${err instanceof Error ? err.message : err}`, - ); - cb(err); - }); - } - - public destroy(): Promise { - const destroyOperationId = uuidv4(); - this._provider.debug().emit.operation('stop', destroyOperationId); - return new Promise((resolve, reject) => { - const timeout = setTimeout(() => { - reject( - new Error( - this._logger.error( - `Timeout error. Session wasn't closed in ${ - DESTROY_TIMEOUT / 1000 - } sec.`, - ), - ), - ); - }, DESTROY_TIMEOUT); - this._native - .stop(destroyOperationId) - .then(() => { - this._logger.debug(`Session has been destroyed`); - resolve(); - }) - .catch((err: Error) => { - this._logger.error( - `Fail to close session due error: ${ - err instanceof Error ? err.message : err - }`, - ); - reject(err); - }) - .finally(() => { - clearTimeout(timeout); - }); - }); - } - - public getSessionFile(): Promise { - return this._native.getSessionFile(); - } - - public getUuid(): string { - return this._native.getUuid(); - } - - public getSourcesDefinitions(): Promise { - return new Promise((resolve, reject) => { - this._provider.debug().emit.operation('getSourcesDefinitions'); - this._native - .getSourcesDefinitions() - .then((buf: Uint8Array) => { - try { - resolve(protocol.decodeSources(buf)); - } catch (err) { - reject( - new NativeError( - new Error( - this._logger.error( - `Fail to decode message: ${utils.error(err)}`, - ), - ), - Type.InvalidOutput, - Source.GetSourcesDefinitions, - ), - ); - } - }) - .catch((err) => { - reject(NativeError.from(err)); - }); - }); - } - - public grabStreamChunk(start: number, len: number): Promise { - return new Promise((resolve, reject) => { - this._provider.debug().emit.operation('grab'); - this._native - .grab(start, len) - .then((buf: Uint8Array) => { - try { - resolve(protocol.decodeGrabbedElementList(buf)); - } catch (err) { - reject( - new NativeError( - new Error( - this._logger.error( - `Fail to decode message: ${utils.error(err)}`, - ), - ), - Type.InvalidOutput, - Source.GrabStreamChunk, - ), - ); - } - }) - .catch((err) => { - reject(NativeError.from(err)); - }); - }); - } - - public grabIndexed(start: number, len: number): Promise { - return new Promise((resolve, reject) => { - this._provider.debug().emit.operation('grabIndexed'); - this._native - .grabIndexed(start, len) - .then((buf: Uint8Array) => { - try { - resolve(protocol.decodeGrabbedElementList(buf)); - } catch (err) { - reject( - new NativeError( - new Error( - this._logger.error( - `Fail to decode message: ${utils.error(err)}`, - ), - ), - Type.InvalidOutput, - Source.GrabStreamChunk, - ), - ); - } - }) - .catch((err) => { - reject(NativeError.from(err)); - }); - }); - } - - public setIndexingMode(mode: IndexingMode): Promise { - return new Promise((resolve, reject) => { - this._provider.debug().emit.operation('setIndexingMode'); - this._native - .setIndexingMode(mode) - .then(resolve) - .catch((err) => { - reject(NativeError.from(err)); - }); - }); - } - - public getIndexedLen(): Promise { - return new Promise((resolve, reject) => { - this._provider.debug().emit.operation('getIndexedLen'); - this._native - .getIndexedLen() - .then(resolve) - .catch((err) => { - reject(NativeError.from(err)); - }); - }); - } - - public getAroundIndexes( - position: number, - ): Promise<{ before: number | undefined; after: number | undefined }> { - return new Promise((resolve, reject) => { - this._provider.debug().emit.operation('getAroundIndexes'); - this._native - .getAroundIndexes(position) - .then((result) => { - resolve({ - before: typeof result[0] !== 'number' ? undefined : result[0], - after: typeof result[1] !== 'number' ? undefined : result[1], - }); - }) - .catch((err) => { - reject(NativeError.from(err)); - }); - }); - } - - public expandBreadcrumbs(seporator: number, offset: number, above: boolean): Promise { - return new Promise((resolve, reject) => { - this._provider.debug().emit.operation('expandBreadcrumbs'); - this._native - .expandBreadcrumbs(seporator, offset, above) - .then(resolve) - .catch((err) => { - reject(NativeError.from(err)); - }); - }); - } - - public removeBookmark(row: number): Promise { - return new Promise((resolve, reject) => { - this._provider.debug().emit.operation('removeBookmark'); - this._native - .removeBookmark(row) - .then(resolve) - .catch((err) => { - reject(NativeError.from(err)); - }); - }); - } - - public addBookmark(row: number): Promise { - return new Promise((resolve, reject) => { - this._provider.debug().emit.operation('addBookmark'); - this._native - .addBookmark(row) - .then(resolve) - .catch((err) => { - reject(NativeError.from(err)); - }); - }); - } - - public setBookmarks(rows: number[]): Promise { - return new Promise((resolve, reject) => { - this._provider.debug().emit.operation('setBookmarks'); - this._native - .setBookmarks(rows) - .then(resolve) - .catch((err) => { - reject(NativeError.from(err)); - }); - }); - } - - public grabStreamRanges(ranges: IRange[]): Promise { - return new Promise((resolve, reject) => { - try { - this._provider.debug().emit.operation('grabRanges'); - this._native - .grabRanges(ranges.map((r) => [r.start, r.end])) - .then((buf: Uint8Array) => { - try { - resolve(protocol.decodeGrabbedElementList(buf)); - } catch (err) { - reject( - new NativeError( - new Error( - this._logger.error( - `Fail to decode message: ${utils.error(err)}`, - ), - ), - Type.InvalidOutput, - Source.GrabStreamChunk, - ), - ); - } - }) - .catch((err: Error) => { - reject(NativeError.from(err)); - }); - } catch (err) { - return reject( - new NativeError(NativeError.from(err), Type.Other, Source.GrabStreamChunk), - ); - } - }); - } - - public grabSearchChunk(start: number, len: number): Promise { - return new Promise((resolve, reject) => { - this._provider.debug().emit.operation('grabSearch'); - this._native - .grabSearch(start, len) - .then((buf: Uint8Array) => { - try { - resolve(protocol.decodeGrabbedElementList(buf)); - } catch (err) { - reject( - new NativeError( - new Error( - this._logger.error( - `Fail to decode message: ${utils.error(err)}`, - ), - ), - Type.InvalidOutput, - Source.GrabSearchChunk, - ), - ); - } - }) - .catch((err) => { - reject(NativeError.from(err)); - }); - }); - } - - public grabMatchesChunk(start: number, len: number): string[] | NativeError { - return new NativeError(new Error('Not implemented yet'), Type.Other, Source.GetSocketPath); - } - - public getFileOptionsRequirements(filename: string): EFileOptionsRequirements { - return EFileOptionsRequirements.NoOptionsRequired; - } - - public getStreamLen(): Promise { - return new Promise((resolve, reject) => { - this._provider.debug().emit.operation('getStreamLen'); - this._native - .getStreamLen() - .then(resolve) - .catch((err) => { - reject(NativeError.from(err)); - }); - }); - } - - public getSearchLen(): Promise { - return new Promise((resolve, reject) => { - this._provider.debug().emit.operation('getSearchLen'); - this._native - .getSearchLen() - .then(resolve) - .catch((err) => { - reject(NativeError.from(err)); - }); - }); - } - - public getMatchesLen(): number | NativeError { - return this._assigned ? 1000 : 0; - } - - public getSocketPath(): string | NativeError { - // return new NativeError(new Error('Not implemented yet'), Type.Other, Source.GetSocketPath); - return ''; - } - - public observe(source: IObserve, operationUuid: string): Promise { - return new Promise((resolve, reject) => { - try { - this._provider.debug().emit.operation('observe', operationUuid); - this._native - .observe(protocol.encodeObserveOptions(source), operationUuid) - .then(resolve) - .catch((err: Error) => { - reject(NativeError.from(err)); - }); - } catch (err) { - return reject(new NativeError(NativeError.from(err), Type.Other, Source.Assign)); - } - }); - } - - public export( - dest: string, - ranges: IRange[], - opt: TextExportOptions, - operationUuid: string, - ): Promise { - return new Promise((resolve, reject) => { - try { - this._provider.debug().emit.operation('export', operationUuid); - this._native - .export( - dest, - ranges.map((r) => [r.start, r.end]), - opt.columns, - opt.spliter === undefined ? '' : opt.spliter, - opt.delimiter === undefined ? '' : opt.delimiter, - operationUuid, - ) - .then(resolve) - .catch((err: Error) => { - reject(NativeError.from(err)); - }); - } catch (err) { - return reject(new NativeError(NativeError.from(err), Type.Other, Source.Assign)); - } - }); - } - - public exportRaw(dest: string, ranges: IRange[], operationUuid: string): Promise { - return new Promise((resolve, reject) => { - try { - this._provider.debug().emit.operation('exportRaw', operationUuid); - this._native - .exportRaw( - dest, - ranges.map((r) => [r.start, r.end]), - operationUuid, - ) - .then(resolve) - .catch((err: Error) => { - reject(NativeError.from(err)); - }); - } catch (err) { - return reject(new NativeError(NativeError.from(err), Type.Other, Source.Assign)); - } - }); - } - - public isRawExportAvailable(): Promise { - return new Promise((resolve, reject) => { - this._provider.debug().emit.operation('isRawExportAvailable'); - this._native - .isRawExportAvailable() - .then(resolve) - .catch((err) => { - reject(NativeError.from(err)); - }); - }); - } - - public search(filters: IFilter[], operationUuid: string): Promise { - return new Promise((resolve, reject) => { - try { - this._provider.debug().emit.operation('applySearchFilters', operationUuid); - this._native - .applySearchFilters( - filters.map((filter) => { - return { - value: filter.filter, - is_regex: filter.flags.reg, - ignore_case: !filter.flags.cases, - is_word: filter.flags.word, - }; - }), - operationUuid, - ) - .then(resolve) - .catch((err: Error) => { - reject(NativeError.from(err)); - }); - } catch (err) { - return reject(new NativeError(NativeError.from(err), Type.Other, Source.Search)); - } - }); - } - - public searchNestedMatch( - filter: IFilter, - from: number, - rev: boolean, - ): Promise<[number, number] | undefined> { - return new Promise((resolve, reject) => { - try { - this._native - .searchNestedMatch( - { - value: filter.filter, - is_regex: filter.flags.reg, - ignore_case: !filter.flags.cases, - is_word: filter.flags.word, - }, - from, - rev, - ) - .then(resolve) - .catch((err: Error) => { - reject(NativeError.from(err)); - }); - } catch (err) { - return reject( - new NativeError(NativeError.from(err), Type.Other, Source.SearchNested), - ); - } - }); - } - - public searchValues(filters: string[], operationUuid: string): Promise { - return new Promise((resolve, reject) => { - try { - this._provider.debug().emit.operation('applySearchValuesFilters', operationUuid); - this._native - .applySearchValuesFilters(filters, operationUuid) - .then(resolve) - .catch((err: Error) => { - reject(NativeError.from(err)); - }); - } catch (err) { - return reject( - new NativeError(NativeError.from(err), Type.Other, Source.SearchValues), - ); - } - }); - } - - public dropSearch(): Promise { - return this._native.dropSearch(); - } - - public extractMatchesValues(filters: IFilter[], operationUuid: string): Promise { - return new Promise((resolve, reject) => { - try { - this._provider.debug().emit.operation('extractMatches', operationUuid); - this._native - .extractMatches( - filters.map((filter) => { - return { - value: filter.filter, - is_regex: filter.flags.reg, - ignore_case: !filter.flags.cases, - is_word: filter.flags.word, - }; - }), - operationUuid, - ) - .then(resolve) - .catch((err: Error) => { - reject(NativeError.from(err)); - }); - } catch (err) { - return reject( - new NativeError(NativeError.from(err), Type.Other, Source.ExtractMatchesValues), - ); - } - }); - } - - public getMap( - operationUuid: string, - datasetLength: number, - from?: number, - to?: number, - ): Promise { - return new Promise((resolve, reject) => { - this._provider.debug().emit.operation('getMap', operationUuid); - (() => { - if (from === undefined || to === undefined) { - return this._native.getMap(operationUuid, datasetLength); - } else { - return this._native.getMap(operationUuid, datasetLength, from, to); - } - })() - .then(resolve) - .catch((err) => { - reject(NativeError.from(err)); - }); - }); - } - - public getValues( - operationUuid: string, - datasetLength: number, - from?: number, - to?: number, - ): Promise { - return new Promise((resolve, reject) => { - this._provider.debug().emit.operation('getValues', operationUuid); - (() => { - if (from === undefined || to === undefined) { - return this._native.getValues(operationUuid, datasetLength); - } else { - return this._native.getValues(operationUuid, datasetLength, from, to); - } - })() - .then(resolve) - .catch((err) => { - reject(NativeError.from(err)); - }); - }); - } - - public getNearestTo( - operationUuid: string, - positionInStream: number, - ): Promise<{ index: number; position: number } | undefined> { - return new Promise((resolve, reject) => { - this._provider.debug().emit.operation('getNearestTo', operationUuid); - this._native - .getNearestTo(operationUuid, positionInStream) - .then((nearest) => { - if (nearest instanceof Array && nearest.length !== 2) { - reject( - new NativeError( - new Error( - `Invalid format of data: ${nearest}. Expecting an array (size 2): [number, number]`, - ), - Type.InvalidOutput, - Source.GetNearestTo, - ), - ); - } else if (nearest === null) { - resolve(undefined); - } else if (nearest instanceof Array && nearest.length === 2) { - resolve({ index: nearest[0], position: nearest[1] }); - } - }) - .catch((err) => { - reject(NativeError.from(err)); - }); - }); - } - - public sendIntoSde( - targetOperationUuid: string, - request: types.sde.SdeRequest, - ): Promise { - return new Promise((resolve, reject) => { - this._native - .sendIntoSde(targetOperationUuid, protocol.encodeSdeRequest(request)) - .then((buf: Uint8Array) => { - try { - resolve(protocol.decodeSdeResponse(buf)); - } catch (err) { - reject( - new NativeError( - new Error( - this._logger.error( - `Fail to decode message: ${utils.error(err)}`, - ), - ), - Type.InvalidOutput, - Source.SendIntoSde, - ), - ); - } - }) - .catch((err) => { - reject(NativeError.from(err)); - }); - }); - } - - public getAttachments(): Promise { - return new Promise((resolve, reject) => { - this._native - .getAttachments() - .then((buf: Uint8Array) => { - try { - resolve(protocol.decodeAttachmentList(buf)); - } catch (err) { - reject( - new NativeError( - new Error( - this._logger.error( - `Fail to decode message: ${utils.error(err)}`, - ), - ), - Type.InvalidOutput, - Source.GetAttachments, - ), - ); - } - }) - .catch((err) => { - reject(NativeError.from(err)); - }); - }); - } - - public getIndexedRanges(): Promise { - return new Promise((resolve, reject) => { - this._native - .getIndexedRanges() - .then((buf: Uint8Array) => { - try { - resolve(protocol.decodeRanges(buf)); - } catch (err) { - reject( - new NativeError( - new Error( - this._logger.error( - `Fail to decode message: ${utils.error(err)}`, - ), - ), - Type.InvalidOutput, - Source.GetIndexedRanges, - ), - ); - } - }) - .catch((err) => { - reject(NativeError.from(err)); - }); - }); - } - - public abort(selfOperationUuid: string, targetOperationUuid: string): NativeError | undefined { - try { - this._provider.debug().emit.operation('abort', selfOperationUuid); - return this._native.abort(selfOperationUuid, targetOperationUuid); - } catch (err) { - return new NativeError(NativeError.from(err), Type.CancelationError, Source.Abort); - } - } - - public setDebug(debug: boolean): Promise { - return new Promise((resolve, reject) => { - this._native - .setDebug(debug) - .then(resolve) - .catch((err) => { - reject(NativeError.from(err)); - }); - }); - } - - public getOperationsStat(): Promise { - return new Promise((resolve, reject) => { - this._native - .getOperationsStat() - .then(resolve) - .catch((err) => { - reject(NativeError.from(err)); - }); - }); - } - - // Used only for testing and debug - public sleep( - operationUuid: string, - duration: number, - ignoreCancellation: boolean, - ): Promise { - return new Promise((resolve, reject) => { - this._provider.debug().emit.operation('sleep', operationUuid); - this._native - .sleep(operationUuid, duration, ignoreCancellation) - .then(resolve) - .catch((err) => { - reject(NativeError.from(err)); - }); - }); - } - - // Used only for testing and debug - public triggerStateError(): Promise { - return new Promise((resolve, reject) => { - this._provider.debug().emit.operation('triggerStateError'); - this._native - .triggerStateError() - .then(resolve) - .catch((err) => { - reject(NativeError.from(err)); - }); - }); - } - - // Used only for testing and debug - public triggerTrackerError(): Promise { - return new Promise((resolve, reject) => { - this._provider.debug().emit.operation('triggerTrackerError'); - this._native - .triggerTrackerError() - .then(resolve) - .catch((err) => { - reject(NativeError.from(err)); - }); - }); - } - - public testGrabElsAsJson(): GrabbedElement[] | NativeError { - try { - const lines: Array<{ - content: string; - source_id: number; - pos: number; - nature: number; - }> = JSON.parse(this._native.testGrabElsAsJson()); - const elements = lines.map( - ( - item: { - content: string; - source_id: number; - pos: number; - nature: number; - }, - i: number, - ) => { - return { - content: item.content, - source_id: item.source_id, - pos: getValidNum(item.pos), - nature: item.nature, - }; - }, - ); - return elements; - } catch (err) { - return new NativeError(new Error(utils.error(err)), Type.Other, Source.Other); - } - } - - public testGrabElsAsBin(): GrabbedElement[] | NativeError { - try { - const received = this._native.testGrabElsAsBin(); - const elements = protocol.decodeGrabbedElementList(Uint8Array.from(received)); - return elements; - } catch (err) { - return new NativeError(new Error(utils.error(err)), Type.Other, Source.Other); - } - } -} - -export const RustSessionWrapperConstructor: RustSessionConstructorImpl = - RustSessionWrapper; - -export const RustSessionConstructor: RustSessionConstructorImpl = - RustSessionWrapperConstructor; diff --git a/application/apps/rustcore/ts-bindings/src/native/native.tracker.ts b/application/apps/rustcore/ts-bindings/src/native/native.tracker.ts deleted file mode 100644 index 15e8202325..0000000000 --- a/application/apps/rustcore/ts-bindings/src/native/native.tracker.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { TEventEmitter } from '../provider/provider.general'; - -export abstract class TrackerNative { - public abstract init(callback: TEventEmitter): Promise; - public abstract destroy(): Promise; - public abstract stats(): Promise; -} diff --git a/application/apps/rustcore/ts-bindings/src/native/native.ts b/application/apps/rustcore/ts-bindings/src/native/native.ts deleted file mode 100644 index 46a6d9167f..0000000000 --- a/application/apps/rustcore/ts-bindings/src/native/native.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { v4 } from 'uuid'; -import { setUuidGenerator } from 'platform/env/sequence'; -import { scope } from 'platform/env/scope'; - -import * as path from 'path'; -import * as fs from 'fs'; - -export interface IRustModuleExports { - RustSession: any; - UnboundJobs: any; - RustProgressTracker: any; -} - -export function getNativeModule(): IRustModuleExports { - const modulePath = (() => { - const paths = [ - path.resolve(module.path, './index.node'), - // This path is actual for Jasmine tests use-cases - path.resolve(module.path, '../../../../src/native/index.node'), - ]; - for (const target of paths) { - if (fs.existsSync(target)) { - return target; - } - } - throw new Error(`Fail to find modules in:\n${paths.join('\n')}`); - })(); - scope.getLogger('Native module getter').verbose(`Target: ${modulePath}`); - // eslint-disable-next-line @typescript-eslint/no-require-imports - return require(modulePath); -} - -const { RustSession: RustSessionNoType, RustProgressTracker: ProgressTrackerNoType } = - getNativeModule(); - -export { RustSessionNoType, ProgressTrackerNoType }; - -setUuidGenerator(v4); diff --git a/application/apps/rustcore/ts-bindings/src/native/remarks.txt b/application/apps/rustcore/ts-bindings/src/native/remarks.txt deleted file mode 100644 index e41a33ed63..0000000000 --- a/application/apps/rustcore/ts-bindings/src/native/remarks.txt +++ /dev/null @@ -1,52 +0,0 @@ -12-11-2021 -- add time measurements for JS side too and compare it with Rust scope - -e.g. show text file content - -1. create session => RustSession - - -// TODO: -- rename computation to something like Emitter or EventsStore or EventSource or EventProvider etc... -- rename channel to just session. - -// Possible events -{ Progress: { uuid: string, ticks: { ... }}}, where uuid - reference to async operation -{ Done: { uuid: string, status: finished | canceled }} - - -// -//-js-------------------------> Rust: - -let text_session = new RustSession(emitter callback); - - ----------------------------> rust-session-channel - -JS -> RUST: assign file to session -// rust will build index asynchronically - - ----------------------------> rust-session-channel.file = "path/to/textfile.txt" - ----------------------------> rust is indexing - // [xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx] - // [xxxxx] => report progress 100 rows from 1000 rows - //... - JS <- RUST: Event::Progress (callback(PROGRESS, (100, 1000))) - ... - JS -> RUST: grabStreamChunk(20, 10) - JS <- RUST: content [20..30] - JS -> RUST: grabStreamChunk(900, 10) - JS <- RUST: Error(content not yet available) - ... - JS <- RUST: Event::Progress (callback(PROGRESS, 1000, 1000)) - JS <- RUST: Event::Finished (callback(FINISHED)) - ...fully initialized - - JS -> RUST: grabStreamChunk(900, 10) - JS <- RUST: content [900..910] - ... - Js -> RUST: setSearch(filters) - // Rust: session-file: Path, index-of-file, search-filters: [String], index-of-search-results - RUST -> RipGrep: create search result file & index - JS <- RUST: Event::Progress (callback(SEARCH_PROGRESS, 40)) - - diff --git a/application/apps/rustcore/ts-bindings/src/provider/provider.errors.ts b/application/apps/rustcore/ts-bindings/src/provider/provider.errors.ts deleted file mode 100644 index e13a3d45c0..0000000000 --- a/application/apps/rustcore/ts-bindings/src/provider/provider.errors.ts +++ /dev/null @@ -1,9 +0,0 @@ -export enum EErrorSeverity { - warn = 'warn', - error = 'error', - logs = 'logs', -} - -export enum EErrorKind { - something = 'something', -} \ No newline at end of file diff --git a/application/apps/rustcore/ts-bindings/src/provider/provider.general.ts b/application/apps/rustcore/ts-bindings/src/provider/provider.general.ts deleted file mode 100644 index 40e689e492..0000000000 --- a/application/apps/rustcore/ts-bindings/src/provider/provider.general.ts +++ /dev/null @@ -1 +0,0 @@ -export type TEventEmitter = (event: Uint8Array) => void; diff --git a/application/apps/rustcore/ts-bindings/src/provider/provider.ts b/application/apps/rustcore/ts-bindings/src/provider/provider.ts deleted file mode 100644 index 7afd6d5ac9..0000000000 --- a/application/apps/rustcore/ts-bindings/src/provider/provider.ts +++ /dev/null @@ -1,314 +0,0 @@ -/// 1. All RUST public methods should have operation ID -/// 2. In Summary (test) we should highlight link between operation caller and operation done event; -/// we should show IDs -/// 3. Add performance test (grabbing) - -import { Subject, validateEventDesc } from 'platform/env/subscription'; -import { error } from 'platform/log/utils'; -import { Logger } from 'platform/log'; -import { scope } from 'platform/env/scope'; -import { TEventEmitter } from '../provider/provider.general'; - -export interface IOrderStat { - type: 'E' | 'O'; - name: string; - id: string | undefined; - emitted: number; // Time of emitting event or operation - duration: number; -} -export abstract class Computation { - private _destroyed: boolean = false; - protected readonly uuid: string; - protected readonly tracking: { - subjects: { - unsupported: Subject; - error: Subject; - }; - stat: { - alias: string | undefined; - unsupported: string[]; - error: string[]; - counter: { [key: string]: number }; - order: IOrderStat[]; - operations: { [key: string]: number }; - }; - track: boolean; - store: boolean; - count: boolean; - } = { - subjects: { - unsupported: new Subject(), - error: new Subject(), - }, - stat: { - alias: undefined, - unsupported: [], - error: [], - counter: {}, - order: [], - operations: {}, - }, - track: false, - store: false, - count: false, - }; - protected readonly decoder: (buf: Uint8Array) => any; - public readonly logger: Logger; - - constructor(uuid: string, decoder: (buf: Uint8Array) => any) { - this.uuid = uuid; - this.decoder = decoder; - this._emitter = this._emitter.bind(this); - this.logger = scope.getLogger(`${this.getName()}: ${uuid}`); - } - - public destroy(): Promise { - if (this._destroyed) { - this.logger.warn(`Computation (${this.uuid}) is already destroying or destroyed`); - } else { - this._destroy(); - } - return Promise.resolve(); - } - - public abstract getName(): string; - - public abstract getEvents(): TEvents; - - public abstract getEventsSignatures(): IEventsSignatures; - - public abstract getEventsInterfaces(): IEventsInterfaces; - - public abstract getConvertor(event: string, data: T): T | O | Error; - - public debug(): { - getEvents(): { - unsupported: Subject; - error: Subject; - }; - isTracking(): boolean; - isStored(): boolean; - setTracking(value: boolean): void; - setStoring(value: boolean): void; - setCount(value: boolean): void; - setAlias(value: string): void; - getAlias(): string | undefined; - stat: { - unsupported(): string[]; - error(): string[]; - counter(): { [key: string]: number }; - order(): IOrderStat[]; - operations(): { [key: string]: number }; - }; - emit: { - unsupported(msg: string): void; - error(msg: string): void; - event(event: string, id?: string): void; - operation(operation: string, id?: string): void; - }; - } { - const self = this; - return { - getEvents() { - return { - unsupported: self.tracking.subjects.unsupported, - error: self.tracking.subjects.error, - }; - }, - isTracking(): boolean { - return self.tracking.track; - }, - isStored(): boolean { - return self.tracking.store; - }, - setTracking(value: boolean): void { - self.tracking.track = value; - }, - setStoring(value: boolean): void { - self.tracking.store = value; - }, - setCount(value: boolean): void { - self.tracking.count = value; - }, - setAlias(value: string): void { - self.tracking.stat.alias = value; - }, - getAlias(): string | undefined { - return self.tracking.stat.alias; - }, - stat: { - unsupported(): string[] { - return self.tracking.stat.unsupported; - }, - error(): string[] { - return self.tracking.stat.error; - }, - counter(): { [key: string]: number } { - return self.tracking.stat.counter; - }, - order(): IOrderStat[] { - return self.tracking.stat.order; - }, - operations(): { [key: string]: number } { - return self.tracking.stat.operations; - }, - }, - emit: { - unsupported(msg: string): void { - if (self.tracking.track) { - self.tracking.subjects.unsupported.emit(msg); - } - if (self.tracking.store) { - self.tracking.stat.unsupported.push(msg); - } - }, - error(msg: string): void { - if (self.tracking.track) { - self.tracking.subjects.error.emit(msg); - } - if (self.tracking.store) { - self.tracking.stat.error.push(msg); - } - }, - event(event: string, id?: string): void { - if (!self.tracking.count) { - return; - } - if (self.tracking.stat.counter[event] === undefined) { - self.tracking.stat.counter[event] = 0; - } - self.tracking.stat.counter[event] += 1; - const operation = - id === undefined - ? undefined - : self.tracking.stat.order.find((s) => s.id === id); - if (operation === undefined) { - self.tracking.stat.order.push({ - type: 'E', - name: event, - id, - emitted: -1, - duration: -1, - }); - } else { - const emitted = Date.now(); - self.tracking.stat.order.push({ - type: 'E', - name: event, - id, - emitted: emitted, - duration: -1, - }); - operation.duration = emitted - operation.emitted; - } - }, - operation(operation: string, id?: string): void { - if (!self.tracking.count) { - return; - } - if (self.tracking.stat.operations[operation] === undefined) { - self.tracking.stat.operations[operation] = 0; - } - self.tracking.stat.operations[operation] += 1; - self.tracking.stat.order.push({ - type: 'O', - name: operation, - id, - emitted: Date.now(), - duration: -1, - }); - }, - }, - }; - } - - /** - * We are expecting to get from rust event data as JSON string. Required format is: - * { [type: string]: string | undefined } - * @param data {string} - */ - private _emitter(buf: Uint8Array) { - let event: any; - try { - event = this.decoder(buf); - } catch (err) { - this.debug().emit.error( - this.logger.error(`Fail to decode CallbackEvent: ${error(err)}`), - ); - return; - } - if (typeof event === 'string') { - this._emit(event, null); - } else if (typeof event !== 'object' || event === null || Object.keys(event).length !== 1) { - this.debug().emit.error( - this.logger.error( - `Has been gotten incorrect event data: ${JSON.stringify( - event, - )}. No any props field found.\nExpecting type: { [type: string]: string | undefined }`, - ), - ); - } else { - const type: string = Object.keys(event)[0]; - const body: any = event[type]; - this._emit(type, body); - } - } - - private _destroy() { - this._destroyed = true; - // Unsubscribe all event listeners - Object.keys(this.getEvents() as unknown as object).forEach((key: string) => { - (this.getEvents() as any)[key].destroy(); - }); - Object.keys(this.tracking.subjects).forEach((key: string) => { - (this.tracking.subjects as any)[key].destroy(); - }); - this.logger.debug(`Provider has been destroyed.`); - } - - private _emit(event: string, data: any) { - // Callback (_emitter(data: TEventData)) is executed in rust scope. - // It means if we will have some JS exception it will make rust crash. - // To prevent it, we have to move event forward in separeted "JS-thread". - // That's why here used timer with 0 delay. - // Using of try { } catch() {} here isn't good idea as soon as it would not - // allow to localize an issue - setTimeout(() => { - if ((this.getEventsSignatures() as any)[event] === undefined) { - const msg: string = `Has been gotten unsupported event: "${event}".`; - this.debug().emit.unsupported(msg); - this.logger.error(msg); - this.debug().emit.event(event); - } else { - if (event === 'OperationDone' && typeof data.uuid === 'string') { - this.debug().emit.event(event, data.uuid); - } else { - this.debug().emit.event(event); - } - const err: Error | undefined = validateEventDesc( - (this.getEventsInterfaces() as any)[event], - data, - ); - if (err instanceof Error) { - this.debug().emit.error(`Error: ${error(err)}. Input: ${JSON.stringify(data)}`); - this.logger.error(`Failed to parse event "${event}" due error: ${error(err)}`); - } else { - const converted = data === null ? data : this.getConvertor(event, data); - if (converted instanceof Error) { - this.logger.error( - `Failed to convert results fro event "${event}" due error: ${error( - converted, - )}`, - ); - } - (this.getEvents() as any)[event].emit(converted); - this.logger.verbose(`Event "${event}" is processed`); - } - } - }, 0); - } - - public getEmitter(): TEventEmitter { - return this._emitter; - } -} diff --git a/application/apps/rustcore/ts-bindings/src/services/service.production.ts b/application/apps/rustcore/ts-bindings/src/services/service.production.ts deleted file mode 100644 index f885ef6704..0000000000 --- a/application/apps/rustcore/ts-bindings/src/services/service.production.ts +++ /dev/null @@ -1,19 +0,0 @@ -export interface IDebugSettings { - initChannelDelay: number, // {ms} Delay between creating channel and sending event "ready" -} - -export class ServiceProduction { - - public isProd(): boolean { - return false; - } - - public getDebugSettings(): IDebugSettings { - return { - initChannelDelay: 250 - } - } - -} - -export default new ServiceProduction(); \ No newline at end of file diff --git a/application/apps/rustcore/ts-bindings/src/util/numbers.ts b/application/apps/rustcore/ts-bindings/src/util/numbers.ts deleted file mode 100644 index e66fdb1e92..0000000000 --- a/application/apps/rustcore/ts-bindings/src/util/numbers.ts +++ /dev/null @@ -1,6 +0,0 @@ -export function getValidNum(val: unknown): number { - if (typeof val !== 'number' || isNaN(val) || !isFinite(val)) { - throw new Error(`Invalid number: ${val}`); - } - return val; -} diff --git a/application/apps/rustcore/ts-bindings/src/util/units.ts b/application/apps/rustcore/ts-bindings/src/util/units.ts deleted file mode 100644 index c68172d02f..0000000000 --- a/application/apps/rustcore/ts-bindings/src/util/units.ts +++ /dev/null @@ -1,53 +0,0 @@ -export class TimeUnit { - nanoseconds: number; - constructor(inNs: number) { - this.nanoseconds = inNs; - } - - setMilliseconds(ms: number): TimeUnit { - this.nanoseconds = 1000 * ms; - return this; - } - - setSeconds(s: number): TimeUnit { - this.nanoseconds = 1000 * 1000 * 1000 * s; - return this; - } - - /// create a TimeUnit that represents empty (0 ns) - static zero(): TimeUnit { - return new TimeUnit(0); - } - - /// create a TimeUnit by specifiing the amount of minutes it should represent - static fromMinutes(minutes: number): TimeUnit { - return TimeUnit.fromSeconds(60 * minutes); - } - - /// create a TimeUnit by specifiing the amount of seconds it should represent - static fromSeconds(seconds: number): TimeUnit { - return TimeUnit.fromMilliseconds(1000 * seconds); - } - - /// create a TimeUnit by specifiing the amount of milliseconds it should represent - static fromMilliseconds(ms: number): TimeUnit { - return TimeUnit.fromNanoseconds(1000 * ms); - } - - /// create a TimeUnit by specifiing the amount of nanoseconds it should represent - static fromNanoseconds(ns: number): TimeUnit { - return new TimeUnit(ns); - } - - inNanoseconds(): number { - return this.nanoseconds; - } - - inMilliseconds(): number { - return this.nanoseconds / 1000.0; - } - - inSeconds(): number { - return this.nanoseconds / 1000.0 / 1000.0; - } -} diff --git a/application/apps/rustcore/ts-bindings/tsconfig.json b/application/apps/rustcore/ts-bindings/tsconfig.json deleted file mode 100644 index bed594daa4..0000000000 --- a/application/apps/rustcore/ts-bindings/tsconfig.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "compilerOptions": { - "baseUrl": ".", - "outDir": "./dist/", - "forceConsistentCasingInFileNames": true, - "strict": true, - "noImplicitOverride": true, - "noPropertyAccessFromIndexSignature": true, - "noImplicitReturns": true, - "noFallthroughCasesInSwitch": true, - "sourceMap": true, - "declaration": true, - "downlevelIteration": true, - "experimentalDecorators": true, - "moduleResolution": "node", - "importHelpers": true, - "target": "ESNext", - "module": "CommonJS", - "lib": ["ESNext"], - "paths": { - "*": ["./node_modules/*"] - }, - "types": ["node"] - }, - "include": ["./src/**/*"], - "exclude": ["node_modules"] -} diff --git a/application/apps/rustcore/ts-bindings/yarn.lock b/application/apps/rustcore/ts-bindings/yarn.lock deleted file mode 100644 index 02f10c1472..0000000000 --- a/application/apps/rustcore/ts-bindings/yarn.lock +++ /dev/null @@ -1,4218 +0,0 @@ -# This file is generated by running "yarn install" inside your project. -# Manual changes might be lost - proceed with caution! - -__metadata: - version: 8 - cacheKey: 10c0 - -"@cspotcode/source-map-support@npm:^0.8.0": - version: 0.8.1 - resolution: "@cspotcode/source-map-support@npm:0.8.1" - dependencies: - "@jridgewell/trace-mapping": "npm:0.3.9" - checksum: 10c0/05c5368c13b662ee4c122c7bfbe5dc0b613416672a829f3e78bc49a357a197e0218d6e74e7c66cfcd04e15a179acab080bd3c69658c9fbefd0e1ccd950a07fc6 - languageName: node - linkType: hard - -"@electron/get@npm:^2.0.0": - version: 2.0.3 - resolution: "@electron/get@npm:2.0.3" - dependencies: - debug: "npm:^4.1.1" - env-paths: "npm:^2.2.0" - fs-extra: "npm:^8.1.0" - global-agent: "npm:^3.0.0" - got: "npm:^11.8.5" - progress: "npm:^2.0.3" - semver: "npm:^6.2.0" - sumchecker: "npm:^3.0.1" - dependenciesMeta: - global-agent: - optional: true - checksum: 10c0/148957d531bac50c29541515f2483c3e5c9c6ba9f0269a5d536540d2b8d849188a89588f18901f3a84c2b4fd376d1e0c5ea2159eb2d17bda68558f57df19015e - languageName: node - linkType: hard - -"@electron/rebuild@npm:^4.0.3": - version: 4.0.3 - resolution: "@electron/rebuild@npm:4.0.3" - dependencies: - "@malept/cross-spawn-promise": "npm:^2.0.0" - debug: "npm:^4.1.1" - detect-libc: "npm:^2.0.1" - got: "npm:^11.7.0" - graceful-fs: "npm:^4.2.11" - node-abi: "npm:^4.2.0" - node-api-version: "npm:^0.2.1" - node-gyp: "npm:^11.2.0" - ora: "npm:^5.1.0" - read-binary-file-arch: "npm:^1.0.6" - semver: "npm:^7.3.5" - tar: "npm:^7.5.6" - yargs: "npm:^17.0.1" - dependenciesMeta: - electron: - built: true - bin: - electron-rebuild: lib/cli.js - checksum: 10c0/43bdbf85cde13874a2185c161d1943c3c4f12323f25cc3534890b1b0ec451b5bb940aa80e2c42476fe0d8c854d2e62b0e56f0d98c482c03b0715305bf9688171 - languageName: node - linkType: hard - -"@eslint-community/eslint-utils@npm:^4.2.0, @eslint-community/eslint-utils@npm:^4.4.0": - version: 4.4.1 - resolution: "@eslint-community/eslint-utils@npm:4.4.1" - dependencies: - eslint-visitor-keys: "npm:^3.4.3" - peerDependencies: - eslint: ^6.0.0 || ^7.0.0 || >=8.0.0 - checksum: 10c0/2aa0ac2fc50ff3f234408b10900ed4f1a0b19352f21346ad4cc3d83a1271481bdda11097baa45d484dd564c895e0762a27a8240be7a256b3ad47129e96528252 - languageName: node - linkType: hard - -"@eslint-community/regexpp@npm:^4.10.0, @eslint-community/regexpp@npm:^4.12.1": - version: 4.12.1 - resolution: "@eslint-community/regexpp@npm:4.12.1" - checksum: 10c0/a03d98c246bcb9109aec2c08e4d10c8d010256538dcb3f56610191607214523d4fb1b00aa81df830b6dffb74c5fa0be03642513a289c567949d3e550ca11cdf6 - languageName: node - linkType: hard - -"@eslint/config-array@npm:^0.19.0": - version: 0.19.1 - resolution: "@eslint/config-array@npm:0.19.1" - dependencies: - "@eslint/object-schema": "npm:^2.1.5" - debug: "npm:^4.3.1" - minimatch: "npm:^3.1.2" - checksum: 10c0/43b01f596ddad404473beae5cf95c013d29301c72778d0f5bf8a6699939c8a9a5663dbd723b53c5f476b88b0c694f76ea145d1aa9652230d140fe1161e4a4b49 - languageName: node - linkType: hard - -"@eslint/core@npm:^0.10.0": - version: 0.10.0 - resolution: "@eslint/core@npm:0.10.0" - dependencies: - "@types/json-schema": "npm:^7.0.15" - checksum: 10c0/074018075079b3ed1f14fab9d116f11a8824cdfae3e822badf7ad546962fafe717a31e61459bad8cc59cf7070dc413ea9064ddb75c114f05b05921029cde0a64 - languageName: node - linkType: hard - -"@eslint/eslintrc@npm:^3.2.0": - version: 3.2.0 - resolution: "@eslint/eslintrc@npm:3.2.0" - dependencies: - ajv: "npm:^6.12.4" - debug: "npm:^4.3.2" - espree: "npm:^10.0.1" - globals: "npm:^14.0.0" - ignore: "npm:^5.2.0" - import-fresh: "npm:^3.2.1" - js-yaml: "npm:^4.1.0" - minimatch: "npm:^3.1.2" - strip-json-comments: "npm:^3.1.1" - checksum: 10c0/43867a07ff9884d895d9855edba41acf325ef7664a8df41d957135a81a477ff4df4196f5f74dc3382627e5cc8b7ad6b815c2cea1b58f04a75aced7c43414ab8b - languageName: node - linkType: hard - -"@eslint/js@npm:9.18.0": - version: 9.18.0 - resolution: "@eslint/js@npm:9.18.0" - checksum: 10c0/3938344c5ac7feef4b73fcb30f3c3e753570cea74c24904bb5d07e9c42fcd34fcbc40f545b081356a299e11f360c9c274b348c05fb0113fc3d492e5175eee140 - languageName: node - linkType: hard - -"@eslint/object-schema@npm:^2.1.5": - version: 2.1.5 - resolution: "@eslint/object-schema@npm:2.1.5" - checksum: 10c0/5320691ed41ecd09a55aff40ce8e56596b4eb81f3d4d6fe530c50fdd6552d88102d1c1a29d970ae798ce30849752a708772de38ded07a6f25b3da32ebea081d8 - languageName: node - linkType: hard - -"@eslint/plugin-kit@npm:^0.2.5": - version: 0.2.5 - resolution: "@eslint/plugin-kit@npm:0.2.5" - dependencies: - "@eslint/core": "npm:^0.10.0" - levn: "npm:^0.4.1" - checksum: 10c0/ba9832b8409af618cf61791805fe201dd62f3c82c783adfcec0f5cd391e68b40beaecb47b9a3209e926dbcab65135f410cae405b69a559197795793399f61176 - languageName: node - linkType: hard - -"@humanfs/core@npm:^0.19.1": - version: 0.19.1 - resolution: "@humanfs/core@npm:0.19.1" - checksum: 10c0/aa4e0152171c07879b458d0e8a704b8c3a89a8c0541726c6b65b81e84fd8b7564b5d6c633feadc6598307d34564bd53294b533491424e8e313d7ab6c7bc5dc67 - languageName: node - linkType: hard - -"@humanfs/node@npm:^0.16.6": - version: 0.16.6 - resolution: "@humanfs/node@npm:0.16.6" - dependencies: - "@humanfs/core": "npm:^0.19.1" - "@humanwhocodes/retry": "npm:^0.3.0" - checksum: 10c0/8356359c9f60108ec204cbd249ecd0356667359b2524886b357617c4a7c3b6aace0fd5a369f63747b926a762a88f8a25bc066fa1778508d110195ce7686243e1 - languageName: node - linkType: hard - -"@humanwhocodes/module-importer@npm:^1.0.1": - version: 1.0.1 - resolution: "@humanwhocodes/module-importer@npm:1.0.1" - checksum: 10c0/909b69c3b86d482c26b3359db16e46a32e0fb30bd306a3c176b8313b9e7313dba0f37f519de6aa8b0a1921349e505f259d19475e123182416a506d7f87e7f529 - languageName: node - linkType: hard - -"@humanwhocodes/retry@npm:^0.3.0": - version: 0.3.1 - resolution: "@humanwhocodes/retry@npm:0.3.1" - checksum: 10c0/f0da1282dfb45e8120480b9e2e275e2ac9bbe1cf016d046fdad8e27cc1285c45bb9e711681237944445157b430093412b4446c1ab3fc4bb037861b5904101d3b - languageName: node - linkType: hard - -"@humanwhocodes/retry@npm:^0.4.1": - version: 0.4.1 - resolution: "@humanwhocodes/retry@npm:0.4.1" - checksum: 10c0/be7bb6841c4c01d0b767d9bb1ec1c9359ee61421ce8ba66c249d035c5acdfd080f32d55a5c9e859cdd7868788b8935774f65b2caf24ec0b7bd7bf333791f063b - languageName: node - linkType: hard - -"@isaacs/cliui@npm:^8.0.2": - version: 8.0.2 - resolution: "@isaacs/cliui@npm:8.0.2" - dependencies: - string-width: "npm:^5.1.2" - string-width-cjs: "npm:string-width@^4.2.0" - strip-ansi: "npm:^7.0.1" - strip-ansi-cjs: "npm:strip-ansi@^6.0.1" - wrap-ansi: "npm:^8.1.0" - wrap-ansi-cjs: "npm:wrap-ansi@^7.0.0" - checksum: 10c0/b1bf42535d49f11dc137f18d5e4e63a28c5569de438a221c369483731e9dac9fb797af554e8bf02b6192d1e5eba6e6402cf93900c3d0ac86391d00d04876789e - languageName: node - linkType: hard - -"@isaacs/fs-minipass@npm:^4.0.0": - version: 4.0.1 - resolution: "@isaacs/fs-minipass@npm:4.0.1" - dependencies: - minipass: "npm:^7.0.4" - checksum: 10c0/c25b6dc1598790d5b55c0947a9b7d111cfa92594db5296c3b907e2f533c033666f692a3939eadac17b1c7c40d362d0b0635dc874cbfe3e70db7c2b07cc97a5d2 - languageName: node - linkType: hard - -"@jridgewell/resolve-uri@npm:^3.0.3": - version: 3.1.2 - resolution: "@jridgewell/resolve-uri@npm:3.1.2" - checksum: 10c0/d502e6fb516b35032331406d4e962c21fe77cdf1cbdb49c6142bcbd9e30507094b18972778a6e27cbad756209cfe34b1a27729e6fa08a2eb92b33943f680cf1e - languageName: node - linkType: hard - -"@jridgewell/sourcemap-codec@npm:^1.4.10": - version: 1.5.0 - resolution: "@jridgewell/sourcemap-codec@npm:1.5.0" - checksum: 10c0/2eb864f276eb1096c3c11da3e9bb518f6d9fc0023c78344cdc037abadc725172c70314bdb360f2d4b7bffec7f5d657ce006816bc5d4ecb35e61b66132db00c18 - languageName: node - linkType: hard - -"@jridgewell/trace-mapping@npm:0.3.9": - version: 0.3.9 - resolution: "@jridgewell/trace-mapping@npm:0.3.9" - dependencies: - "@jridgewell/resolve-uri": "npm:^3.0.3" - "@jridgewell/sourcemap-codec": "npm:^1.4.10" - checksum: 10c0/fa425b606d7c7ee5bfa6a31a7b050dd5814b4082f318e0e4190f991902181b4330f43f4805db1dd4f2433fd0ed9cc7a7b9c2683f1deeab1df1b0a98b1e24055b - languageName: node - linkType: hard - -"@malept/cross-spawn-promise@npm:^2.0.0": - version: 2.0.0 - resolution: "@malept/cross-spawn-promise@npm:2.0.0" - dependencies: - cross-spawn: "npm:^7.0.1" - checksum: 10c0/84d60b8d467f4252114849f0a33c3763f07898335269eec5c94978ccac9d5680e1e268d993dd1a6d25a91476f9e0992759d7e1f385f9f3a090d862f9bb949603 - languageName: node - linkType: hard - -"@nodelib/fs.scandir@npm:2.1.5": - version: 2.1.5 - resolution: "@nodelib/fs.scandir@npm:2.1.5" - dependencies: - "@nodelib/fs.stat": "npm:2.0.5" - run-parallel: "npm:^1.1.9" - checksum: 10c0/732c3b6d1b1e967440e65f284bd06e5821fedf10a1bea9ed2bb75956ea1f30e08c44d3def9d6a230666574edbaf136f8cfd319c14fd1f87c66e6a44449afb2eb - languageName: node - linkType: hard - -"@nodelib/fs.stat@npm:2.0.5, @nodelib/fs.stat@npm:^2.0.2": - version: 2.0.5 - resolution: "@nodelib/fs.stat@npm:2.0.5" - checksum: 10c0/88dafe5e3e29a388b07264680dc996c17f4bda48d163a9d4f5c1112979f0ce8ec72aa7116122c350b4e7976bc5566dc3ddb579be1ceaacc727872eb4ed93926d - languageName: node - linkType: hard - -"@nodelib/fs.walk@npm:^1.2.3": - version: 1.2.8 - resolution: "@nodelib/fs.walk@npm:1.2.8" - dependencies: - "@nodelib/fs.scandir": "npm:2.1.5" - fastq: "npm:^1.6.0" - checksum: 10c0/db9de047c3bb9b51f9335a7bb46f4fcfb6829fb628318c12115fbaf7d369bfce71c15b103d1fc3b464812d936220ee9bc1c8f762d032c9f6be9acc99249095b1 - languageName: node - linkType: hard - -"@npmcli/agent@npm:^3.0.0": - version: 3.0.0 - resolution: "@npmcli/agent@npm:3.0.0" - dependencies: - agent-base: "npm:^7.1.0" - http-proxy-agent: "npm:^7.0.0" - https-proxy-agent: "npm:^7.0.1" - lru-cache: "npm:^10.0.1" - socks-proxy-agent: "npm:^8.0.3" - checksum: 10c0/efe37b982f30740ee77696a80c196912c274ecd2cb243bc6ae7053a50c733ce0f6c09fda085145f33ecf453be19654acca74b69e81eaad4c90f00ccffe2f9271 - languageName: node - linkType: hard - -"@npmcli/fs@npm:^4.0.0": - version: 4.0.0 - resolution: "@npmcli/fs@npm:4.0.0" - dependencies: - semver: "npm:^7.3.5" - checksum: 10c0/c90935d5ce670c87b6b14fab04a965a3b8137e585f8b2a6257263bd7f97756dd736cb165bb470e5156a9e718ecd99413dccc54b1138c1a46d6ec7cf325982fe5 - languageName: node - linkType: hard - -"@pkgjs/parseargs@npm:^0.11.0": - version: 0.11.0 - resolution: "@pkgjs/parseargs@npm:0.11.0" - checksum: 10c0/5bd7576bb1b38a47a7fc7b51ac9f38748e772beebc56200450c4a817d712232b8f1d3ef70532c80840243c657d491cf6a6be1e3a214cff907645819fdc34aadd - languageName: node - linkType: hard - -"@rtsao/scc@npm:^1.1.0": - version: 1.1.0 - resolution: "@rtsao/scc@npm:1.1.0" - checksum: 10c0/b5bcfb0d87f7d1c1c7c0f7693f53b07866ed9fec4c34a97a8c948fb9a7c0082e416ce4d3b60beb4f5e167cbe04cdeefbf6771320f3ede059b9ce91188c409a5b - languageName: node - linkType: hard - -"@sindresorhus/is@npm:^4.0.0": - version: 4.6.0 - resolution: "@sindresorhus/is@npm:4.6.0" - checksum: 10c0/33b6fb1d0834ec8dd7689ddc0e2781c2bfd8b9c4e4bacbcb14111e0ae00621f2c264b8a7d36541799d74888b5dccdf422a891a5cb5a709ace26325eedc81e22e - languageName: node - linkType: hard - -"@szmarczak/http-timer@npm:^4.0.5": - version: 4.0.6 - resolution: "@szmarczak/http-timer@npm:4.0.6" - dependencies: - defer-to-connect: "npm:^2.0.0" - checksum: 10c0/73946918c025339db68b09abd91fa3001e87fc749c619d2e9c2003a663039d4c3cb89836c98a96598b3d47dec2481284ba85355392644911f5ecd2336536697f - languageName: node - linkType: hard - -"@tsconfig/node10@npm:^1.0.7": - version: 1.0.11 - resolution: "@tsconfig/node10@npm:1.0.11" - checksum: 10c0/28a0710e5d039e0de484bdf85fee883bfd3f6a8980601f4d44066b0a6bcd821d31c4e231d1117731c4e24268bd4cf2a788a6787c12fc7f8d11014c07d582783c - languageName: node - linkType: hard - -"@tsconfig/node12@npm:^1.0.7": - version: 1.0.11 - resolution: "@tsconfig/node12@npm:1.0.11" - checksum: 10c0/dddca2b553e2bee1308a056705103fc8304e42bb2d2cbd797b84403a223b25c78f2c683ec3e24a095e82cd435387c877239bffcb15a590ba817cd3f6b9a99fd9 - languageName: node - linkType: hard - -"@tsconfig/node14@npm:^1.0.0": - version: 1.0.3 - resolution: "@tsconfig/node14@npm:1.0.3" - checksum: 10c0/67c1316d065fdaa32525bc9449ff82c197c4c19092b9663b23213c8cbbf8d88b6ed6a17898e0cbc2711950fbfaf40388938c1c748a2ee89f7234fc9e7fe2bf44 - languageName: node - linkType: hard - -"@tsconfig/node16@npm:^1.0.2": - version: 1.0.4 - resolution: "@tsconfig/node16@npm:1.0.4" - checksum: 10c0/05f8f2734e266fb1839eb1d57290df1664fe2aa3b0fdd685a9035806daa635f7519bf6d5d9b33f6e69dd545b8c46bd6e2b5c79acb2b1f146e885f7f11a42a5bb - languageName: node - linkType: hard - -"@types/cacheable-request@npm:^6.0.1": - version: 6.0.3 - resolution: "@types/cacheable-request@npm:6.0.3" - dependencies: - "@types/http-cache-semantics": "npm:*" - "@types/keyv": "npm:^3.1.4" - "@types/node": "npm:*" - "@types/responselike": "npm:^1.0.0" - checksum: 10c0/10816a88e4e5b144d43c1d15a81003f86d649776c7f410c9b5e6579d0ad9d4ca71c541962fb403077388b446e41af7ae38d313e46692144985f006ac5e11fa03 - languageName: node - linkType: hard - -"@types/estree@npm:^1.0.6": - version: 1.0.6 - resolution: "@types/estree@npm:1.0.6" - checksum: 10c0/cdfd751f6f9065442cd40957c07fd80361c962869aa853c1c2fd03e101af8b9389d8ff4955a43a6fcfa223dd387a089937f95be0f3eec21ca527039fd2d9859a - languageName: node - linkType: hard - -"@types/http-cache-semantics@npm:*": - version: 4.0.4 - resolution: "@types/http-cache-semantics@npm:4.0.4" - checksum: 10c0/51b72568b4b2863e0fe8d6ce8aad72a784b7510d72dc866215642da51d84945a9459fa89f49ec48f1e9a1752e6a78e85a4cda0ded06b1c73e727610c925f9ce6 - languageName: node - linkType: hard - -"@types/jasmine@npm:^5.1.5": - version: 5.1.5 - resolution: "@types/jasmine@npm:5.1.5" - checksum: 10c0/904a2a6bfe7478478ec73d502708dc4b4cc46fa554c459cee3e0be01efda96fba7d26ef8bec2f246d9163cc517407b135acabcf6f076c11aa514ed9b79bc67e5 - languageName: node - linkType: hard - -"@types/json-schema@npm:^7.0.15": - version: 7.0.15 - resolution: "@types/json-schema@npm:7.0.15" - checksum: 10c0/a996a745e6c5d60292f36731dd41341339d4eeed8180bb09226e5c8d23759067692b1d88e5d91d72ee83dfc00d3aca8e7bd43ea120516c17922cbcb7c3e252db - languageName: node - linkType: hard - -"@types/json5@npm:^0.0.29": - version: 0.0.29 - resolution: "@types/json5@npm:0.0.29" - checksum: 10c0/6bf5337bc447b706bb5b4431d37686aa2ea6d07cfd6f79cc31de80170d6ff9b1c7384a9c0ccbc45b3f512bae9e9f75c2e12109806a15331dc94e8a8db6dbb4ac - languageName: node - linkType: hard - -"@types/keyv@npm:^3.1.4": - version: 3.1.4 - resolution: "@types/keyv@npm:3.1.4" - dependencies: - "@types/node": "npm:*" - checksum: 10c0/ff8f54fc49621210291f815fe5b15d809fd7d032941b3180743440bd507ecdf08b9e844625fa346af568c84bf34114eb378dcdc3e921a08ba1e2a08d7e3c809c - languageName: node - linkType: hard - -"@types/node@npm:*, @types/node@npm:^22.10.10": - version: 22.10.10 - resolution: "@types/node@npm:22.10.10" - dependencies: - undici-types: "npm:~6.20.0" - checksum: 10c0/3425772d4513cd5dbdd87c00acda088113c03a97445f84f6a89744c60a66990b56c9d3a7213d09d57b6b944ae8ff45f985565e0c1846726112588e33a22dd12b - languageName: node - linkType: hard - -"@types/node@npm:^20.9.0": - version: 20.17.16 - resolution: "@types/node@npm:20.17.16" - dependencies: - undici-types: "npm:~6.19.2" - checksum: 10c0/50c589dd6a377238bc51b6fb5b8fc60ff6d688df0bde621d4a9fc59f480eb956cdf6d46052e1cb9536f150bc62e9194ddc733aa78b65e812155b4d3a32717de2 - languageName: node - linkType: hard - -"@types/responselike@npm:^1.0.0": - version: 1.0.3 - resolution: "@types/responselike@npm:1.0.3" - dependencies: - "@types/node": "npm:*" - checksum: 10c0/a58ba341cb9e7d74f71810a88862da7b2a6fa42e2a1fc0ce40498f6ea1d44382f0640117057da779f74c47039f7166bf48fad02dc876f94e005c7afa50f5e129 - languageName: node - linkType: hard - -"@types/tmp@npm:^0.2.4": - version: 0.2.6 - resolution: "@types/tmp@npm:0.2.6" - checksum: 10c0/a11bfa2cd8eaa6c5d62f62a3569192d7a2c28efdc5c17af0b0551db85816b2afc8156f3ca15ac76f0b142ae1403f04f44279871424233a1f3390b2e5fc828cd0 - languageName: node - linkType: hard - -"@types/uuid@npm:^10.0.0": - version: 10.0.0 - resolution: "@types/uuid@npm:10.0.0" - checksum: 10c0/9a1404bf287164481cb9b97f6bb638f78f955be57c40c6513b7655160beb29df6f84c915aaf4089a1559c216557dc4d2f79b48d978742d3ae10b937420ddac60 - languageName: node - linkType: hard - -"@types/yauzl@npm:^2.9.1": - version: 2.10.3 - resolution: "@types/yauzl@npm:2.10.3" - dependencies: - "@types/node": "npm:*" - checksum: 10c0/f1b7c1b99fef9f2fe7f1985ef7426d0cebe48cd031f1780fcdc7451eec7e31ac97028f16f50121a59bcf53086a1fc8c856fd5b7d3e00970e43d92ae27d6b43dc - languageName: node - linkType: hard - -"@typescript-eslint/eslint-plugin@npm:^8.21.0": - version: 8.21.0 - resolution: "@typescript-eslint/eslint-plugin@npm:8.21.0" - dependencies: - "@eslint-community/regexpp": "npm:^4.10.0" - "@typescript-eslint/scope-manager": "npm:8.21.0" - "@typescript-eslint/type-utils": "npm:8.21.0" - "@typescript-eslint/utils": "npm:8.21.0" - "@typescript-eslint/visitor-keys": "npm:8.21.0" - graphemer: "npm:^1.4.0" - ignore: "npm:^5.3.1" - natural-compare: "npm:^1.4.0" - ts-api-utils: "npm:^2.0.0" - peerDependencies: - "@typescript-eslint/parser": ^8.0.0 || ^8.0.0-alpha.0 - eslint: ^8.57.0 || ^9.0.0 - typescript: ">=4.8.4 <5.8.0" - checksum: 10c0/4601d21ec35b9fa5cfc1ad0330733ab40d6c6822c7fc15c3584a16f678c9a72e077a1725a950823fe0f499a15f3981795b1ea5d1e7a1be5c7b8296ea9ae6327c - languageName: node - linkType: hard - -"@typescript-eslint/parser@npm:^8.21.0": - version: 8.21.0 - resolution: "@typescript-eslint/parser@npm:8.21.0" - dependencies: - "@typescript-eslint/scope-manager": "npm:8.21.0" - "@typescript-eslint/types": "npm:8.21.0" - "@typescript-eslint/typescript-estree": "npm:8.21.0" - "@typescript-eslint/visitor-keys": "npm:8.21.0" - debug: "npm:^4.3.4" - peerDependencies: - eslint: ^8.57.0 || ^9.0.0 - typescript: ">=4.8.4 <5.8.0" - checksum: 10c0/aadebd50ca7aa2d61ad85d890c0d7010f2c293ec4d50a7833ef9674f232f0bc7118faa93a898771fbea50f02d542d687cf3569421b23f72fe6fed6895d5506fc - languageName: node - linkType: hard - -"@typescript-eslint/scope-manager@npm:8.21.0": - version: 8.21.0 - resolution: "@typescript-eslint/scope-manager@npm:8.21.0" - dependencies: - "@typescript-eslint/types": "npm:8.21.0" - "@typescript-eslint/visitor-keys": "npm:8.21.0" - checksum: 10c0/ea405e79dc884ea1c76465604db52f9b0941d6cbb0bde6bce1af689ef212f782e214de69d46503c7c47bfc180d763369b7433f1965e3be3c442b417e8c9f8f75 - languageName: node - linkType: hard - -"@typescript-eslint/type-utils@npm:8.21.0": - version: 8.21.0 - resolution: "@typescript-eslint/type-utils@npm:8.21.0" - dependencies: - "@typescript-eslint/typescript-estree": "npm:8.21.0" - "@typescript-eslint/utils": "npm:8.21.0" - debug: "npm:^4.3.4" - ts-api-utils: "npm:^2.0.0" - peerDependencies: - eslint: ^8.57.0 || ^9.0.0 - typescript: ">=4.8.4 <5.8.0" - checksum: 10c0/617f5dfe83fd9a7c722b27fa4e7f0c84f29baa94f75a4e8e5ccfd5b0a373437f65724e21b9642870fb0960f204b1a7f516a038200a12f8118f21b1bf86315bf3 - languageName: node - linkType: hard - -"@typescript-eslint/types@npm:8.21.0": - version: 8.21.0 - resolution: "@typescript-eslint/types@npm:8.21.0" - checksum: 10c0/67dfd300cc614d7b02e94d0dacfb228a7f4c3fd4eede29c43adb9e9fcc16365ae3df8d6165018da3c123dce65545bef03e3e8183f35e9b3a911ffc727e3274c2 - languageName: node - linkType: hard - -"@typescript-eslint/typescript-estree@npm:8.21.0": - version: 8.21.0 - resolution: "@typescript-eslint/typescript-estree@npm:8.21.0" - dependencies: - "@typescript-eslint/types": "npm:8.21.0" - "@typescript-eslint/visitor-keys": "npm:8.21.0" - debug: "npm:^4.3.4" - fast-glob: "npm:^3.3.2" - is-glob: "npm:^4.0.3" - minimatch: "npm:^9.0.4" - semver: "npm:^7.6.0" - ts-api-utils: "npm:^2.0.0" - peerDependencies: - typescript: ">=4.8.4 <5.8.0" - checksum: 10c0/0cf5b0382524f4af54fb5ec71ca7e939ec922711f2d77b383740b28dd4b21407b0ab5dded62df6819d01c12c0b354e95667e3c7025a5d27d05b805161ab94855 - languageName: node - linkType: hard - -"@typescript-eslint/utils@npm:8.21.0": - version: 8.21.0 - resolution: "@typescript-eslint/utils@npm:8.21.0" - dependencies: - "@eslint-community/eslint-utils": "npm:^4.4.0" - "@typescript-eslint/scope-manager": "npm:8.21.0" - "@typescript-eslint/types": "npm:8.21.0" - "@typescript-eslint/typescript-estree": "npm:8.21.0" - peerDependencies: - eslint: ^8.57.0 || ^9.0.0 - typescript: ">=4.8.4 <5.8.0" - checksum: 10c0/d8347dbe9176417220aa62902cfc1b2007a9246bb7a8cccdf8590120903eb50ca14cb668efaab4646d086277f2367559985b62230e43ebd8b0723d237eeaa2f2 - languageName: node - linkType: hard - -"@typescript-eslint/visitor-keys@npm:8.21.0": - version: 8.21.0 - resolution: "@typescript-eslint/visitor-keys@npm:8.21.0" - dependencies: - "@typescript-eslint/types": "npm:8.21.0" - eslint-visitor-keys: "npm:^4.2.0" - checksum: 10c0/b3f1412f550e35c0d7ae0410db616951116b365167539f9b85710d8bc2b36b322c5e637caee84cc1ae5df8f1d961880250d52ffdef352b31e5bdbef74ba6fea9 - languageName: node - linkType: hard - -"abbrev@npm:^3.0.0": - version: 3.0.0 - resolution: "abbrev@npm:3.0.0" - checksum: 10c0/049704186396f571650eb7b22ed3627b77a5aedf98bb83caf2eac81ca2a3e25e795394b0464cfb2d6076df3db6a5312139eac5b6a126ca296ac53c5008069c28 - languageName: node - linkType: hard - -"acorn-jsx@npm:^5.3.2": - version: 5.3.2 - resolution: "acorn-jsx@npm:5.3.2" - peerDependencies: - acorn: ^6.0.0 || ^7.0.0 || ^8.0.0 - checksum: 10c0/4c54868fbef3b8d58927d5e33f0a4de35f59012fe7b12cf9dfbb345fb8f46607709e1c4431be869a23fb63c151033d84c4198fa9f79385cec34fcb1dd53974c1 - languageName: node - linkType: hard - -"acorn-walk@npm:^8.1.1": - version: 8.3.4 - resolution: "acorn-walk@npm:8.3.4" - dependencies: - acorn: "npm:^8.11.0" - checksum: 10c0/76537ac5fb2c37a64560feaf3342023dadc086c46da57da363e64c6148dc21b57d49ace26f949e225063acb6fb441eabffd89f7a3066de5ad37ab3e328927c62 - languageName: node - linkType: hard - -"acorn@npm:^8.11.0, acorn@npm:^8.14.0, acorn@npm:^8.4.1": - version: 8.14.0 - resolution: "acorn@npm:8.14.0" - bin: - acorn: bin/acorn - checksum: 10c0/6d4ee461a7734b2f48836ee0fbb752903606e576cc100eb49340295129ca0b452f3ba91ddd4424a1d4406a98adfb2ebb6bd0ff4c49d7a0930c10e462719bbfd7 - languageName: node - linkType: hard - -"agent-base@npm:^7.1.0, agent-base@npm:^7.1.2": - version: 7.1.3 - resolution: "agent-base@npm:7.1.3" - checksum: 10c0/6192b580c5b1d8fb399b9c62bf8343d76654c2dd62afcb9a52b2cf44a8b6ace1e3b704d3fe3547d91555c857d3df02603341ff2cb961b9cfe2b12f9f3c38ee11 - languageName: node - linkType: hard - -"ajv@npm:^6.12.4": - version: 6.12.6 - resolution: "ajv@npm:6.12.6" - dependencies: - fast-deep-equal: "npm:^3.1.1" - fast-json-stable-stringify: "npm:^2.0.0" - json-schema-traverse: "npm:^0.4.1" - uri-js: "npm:^4.2.2" - checksum: 10c0/41e23642cbe545889245b9d2a45854ebba51cda6c778ebced9649420d9205f2efb39cb43dbc41e358409223b1ea43303ae4839db682c848b891e4811da1a5a71 - languageName: node - linkType: hard - -"ansi-regex@npm:^5.0.1": - version: 5.0.1 - resolution: "ansi-regex@npm:5.0.1" - checksum: 10c0/9a64bb8627b434ba9327b60c027742e5d17ac69277960d041898596271d992d4d52ba7267a63ca10232e29f6107fc8a835f6ce8d719b88c5f8493f8254813737 - languageName: node - linkType: hard - -"ansi-regex@npm:^6.0.1": - version: 6.1.0 - resolution: "ansi-regex@npm:6.1.0" - checksum: 10c0/a91daeddd54746338478eef88af3439a7edf30f8e23196e2d6ed182da9add559c601266dbef01c2efa46a958ad6f1f8b176799657616c702b5b02e799e7fd8dc - languageName: node - linkType: hard - -"ansi-styles@npm:^4.0.0, ansi-styles@npm:^4.1.0": - version: 4.3.0 - resolution: "ansi-styles@npm:4.3.0" - dependencies: - color-convert: "npm:^2.0.1" - checksum: 10c0/895a23929da416f2bd3de7e9cb4eabd340949328ab85ddd6e484a637d8f6820d485f53933446f5291c3b760cbc488beb8e88573dd0f9c7daf83dccc8fe81b041 - languageName: node - linkType: hard - -"ansi-styles@npm:^6.1.0": - version: 6.2.1 - resolution: "ansi-styles@npm:6.2.1" - checksum: 10c0/5d1ec38c123984bcedd996eac680d548f31828bd679a66db2bdf11844634dde55fec3efa9c6bb1d89056a5e79c1ac540c4c784d592ea1d25028a92227d2f2d5c - languageName: node - linkType: hard - -"arg@npm:^4.1.0": - version: 4.1.3 - resolution: "arg@npm:4.1.3" - checksum: 10c0/070ff801a9d236a6caa647507bdcc7034530604844d64408149a26b9e87c2f97650055c0f049abd1efc024b334635c01f29e0b632b371ac3f26130f4cf65997a - languageName: node - linkType: hard - -"argparse@npm:^2.0.1": - version: 2.0.1 - resolution: "argparse@npm:2.0.1" - checksum: 10c0/c5640c2d89045371c7cedd6a70212a04e360fd34d6edeae32f6952c63949e3525ea77dbec0289d8213a99bbaeab5abfa860b5c12cf88a2e6cf8106e90dd27a7e - languageName: node - linkType: hard - -"array-buffer-byte-length@npm:^1.0.1, array-buffer-byte-length@npm:^1.0.2": - version: 1.0.2 - resolution: "array-buffer-byte-length@npm:1.0.2" - dependencies: - call-bound: "npm:^1.0.3" - is-array-buffer: "npm:^3.0.5" - checksum: 10c0/74e1d2d996941c7a1badda9cabb7caab8c449db9086407cad8a1b71d2604cc8abf105db8ca4e02c04579ec58b7be40279ddb09aea4784832984485499f48432d - languageName: node - linkType: hard - -"array-includes@npm:^3.1.8": - version: 3.1.8 - resolution: "array-includes@npm:3.1.8" - dependencies: - call-bind: "npm:^1.0.7" - define-properties: "npm:^1.2.1" - es-abstract: "npm:^1.23.2" - es-object-atoms: "npm:^1.0.0" - get-intrinsic: "npm:^1.2.4" - is-string: "npm:^1.0.7" - checksum: 10c0/5b1004d203e85873b96ddc493f090c9672fd6c80d7a60b798da8a14bff8a670ff95db5aafc9abc14a211943f05220dacf8ea17638ae0af1a6a47b8c0b48ce370 - languageName: node - linkType: hard - -"array.prototype.findlastindex@npm:^1.2.5": - version: 1.2.5 - resolution: "array.prototype.findlastindex@npm:1.2.5" - dependencies: - call-bind: "npm:^1.0.7" - define-properties: "npm:^1.2.1" - es-abstract: "npm:^1.23.2" - es-errors: "npm:^1.3.0" - es-object-atoms: "npm:^1.0.0" - es-shim-unscopables: "npm:^1.0.2" - checksum: 10c0/962189487728b034f3134802b421b5f39e42ee2356d13b42d2ddb0e52057ffdcc170b9524867f4f0611a6f638f4c19b31e14606e8bcbda67799e26685b195aa3 - languageName: node - linkType: hard - -"array.prototype.flat@npm:^1.3.2": - version: 1.3.3 - resolution: "array.prototype.flat@npm:1.3.3" - dependencies: - call-bind: "npm:^1.0.8" - define-properties: "npm:^1.2.1" - es-abstract: "npm:^1.23.5" - es-shim-unscopables: "npm:^1.0.2" - checksum: 10c0/d90e04dfbc43bb96b3d2248576753d1fb2298d2d972e29ca7ad5ec621f0d9e16ff8074dae647eac4f31f4fb7d3f561a7ac005fb01a71f51705a13b5af06a7d8a - languageName: node - linkType: hard - -"array.prototype.flatmap@npm:^1.3.2": - version: 1.3.3 - resolution: "array.prototype.flatmap@npm:1.3.3" - dependencies: - call-bind: "npm:^1.0.8" - define-properties: "npm:^1.2.1" - es-abstract: "npm:^1.23.5" - es-shim-unscopables: "npm:^1.0.2" - checksum: 10c0/ba899ea22b9dc9bf276e773e98ac84638ed5e0236de06f13d63a90b18ca9e0ec7c97d622d899796e3773930b946cd2413d098656c0c5d8cc58c6f25c21e6bd54 - languageName: node - linkType: hard - -"arraybuffer.prototype.slice@npm:^1.0.4": - version: 1.0.4 - resolution: "arraybuffer.prototype.slice@npm:1.0.4" - dependencies: - array-buffer-byte-length: "npm:^1.0.1" - call-bind: "npm:^1.0.8" - define-properties: "npm:^1.2.1" - es-abstract: "npm:^1.23.5" - es-errors: "npm:^1.3.0" - get-intrinsic: "npm:^1.2.6" - is-array-buffer: "npm:^3.0.4" - checksum: 10c0/2f2459caa06ae0f7f615003f9104b01f6435cc803e11bd2a655107d52a1781dc040532dc44d93026b694cc18793993246237423e13a5337e86b43ed604932c06 - languageName: node - linkType: hard - -"async-function@npm:^1.0.0": - version: 1.0.0 - resolution: "async-function@npm:1.0.0" - checksum: 10c0/669a32c2cb7e45091330c680e92eaeb791bc1d4132d827591e499cd1f776ff5a873e77e5f92d0ce795a8d60f10761dec9ddfe7225a5de680f5d357f67b1aac73 - languageName: node - linkType: hard - -"available-typed-arrays@npm:^1.0.7": - version: 1.0.7 - resolution: "available-typed-arrays@npm:1.0.7" - dependencies: - possible-typed-array-names: "npm:^1.0.0" - checksum: 10c0/d07226ef4f87daa01bd0fe80f8f310982e345f372926da2e5296aecc25c41cab440916bbaa4c5e1034b453af3392f67df5961124e4b586df1e99793a1374bdb2 - languageName: node - linkType: hard - -"balanced-match@npm:^1.0.0": - version: 1.0.2 - resolution: "balanced-match@npm:1.0.2" - checksum: 10c0/9308baf0a7e4838a82bbfd11e01b1cb0f0cf2893bc1676c27c2a8c0e70cbae1c59120c3268517a8ae7fb6376b4639ef81ca22582611dbee4ed28df945134aaee - languageName: node - linkType: hard - -"base64-js@npm:^1.3.1": - version: 1.5.1 - resolution: "base64-js@npm:1.5.1" - checksum: 10c0/f23823513b63173a001030fae4f2dabe283b99a9d324ade3ad3d148e218134676f1ee8568c877cd79ec1c53158dcf2d2ba527a97c606618928ba99dd930102bf - languageName: node - linkType: hard - -"bl@npm:^4.1.0": - version: 4.1.0 - resolution: "bl@npm:4.1.0" - dependencies: - buffer: "npm:^5.5.0" - inherits: "npm:^2.0.4" - readable-stream: "npm:^3.4.0" - checksum: 10c0/02847e1d2cb089c9dc6958add42e3cdeaf07d13f575973963335ac0fdece563a50ac770ac4c8fa06492d2dd276f6cc3b7f08c7cd9c7a7ad0f8d388b2a28def5f - languageName: node - linkType: hard - -"boolean@npm:^3.0.1": - version: 3.2.0 - resolution: "boolean@npm:3.2.0" - checksum: 10c0/6a0dc9668f6f3dda42a53c181fcbdad223169c8d87b6c4011b87a8b14a21770efb2934a778f063d7ece17280f8c06d313c87f7b834bb1dd526a867ffcd00febf - languageName: node - linkType: hard - -"brace-expansion@npm:^1.1.7": - version: 1.1.11 - resolution: "brace-expansion@npm:1.1.11" - dependencies: - balanced-match: "npm:^1.0.0" - concat-map: "npm:0.0.1" - checksum: 10c0/695a56cd058096a7cb71fb09d9d6a7070113c7be516699ed361317aca2ec169f618e28b8af352e02ab4233fb54eb0168460a40dc320bab0034b36ab59aaad668 - languageName: node - linkType: hard - -"brace-expansion@npm:^2.0.1": - version: 2.0.1 - resolution: "brace-expansion@npm:2.0.1" - dependencies: - balanced-match: "npm:^1.0.0" - checksum: 10c0/b358f2fe060e2d7a87aa015979ecea07f3c37d4018f8d6deb5bd4c229ad3a0384fe6029bb76cd8be63c81e516ee52d1a0673edbe2023d53a5191732ae3c3e49f - languageName: node - linkType: hard - -"braces@npm:^3.0.3": - version: 3.0.3 - resolution: "braces@npm:3.0.3" - dependencies: - fill-range: "npm:^7.1.1" - checksum: 10c0/7c6dfd30c338d2997ba77500539227b9d1f85e388a5f43220865201e407e076783d0881f2d297b9f80951b4c957fcf0b51c1d2d24227631643c3f7c284b0aa04 - languageName: node - linkType: hard - -"buffer-crc32@npm:~0.2.3": - version: 0.2.13 - resolution: "buffer-crc32@npm:0.2.13" - checksum: 10c0/cb0a8ddf5cf4f766466db63279e47761eb825693eeba6a5a95ee4ec8cb8f81ede70aa7f9d8aeec083e781d47154290eb5d4d26b3f7a465ec57fb9e7d59c47150 - languageName: node - linkType: hard - -"buffer@npm:^5.5.0": - version: 5.7.1 - resolution: "buffer@npm:5.7.1" - dependencies: - base64-js: "npm:^1.3.1" - ieee754: "npm:^1.1.13" - checksum: 10c0/27cac81cff434ed2876058d72e7c4789d11ff1120ef32c9de48f59eab58179b66710c488987d295ae89a228f835fc66d088652dffeb8e3ba8659f80eb091d55e - languageName: node - linkType: hard - -"cacache@npm:^19.0.1": - version: 19.0.1 - resolution: "cacache@npm:19.0.1" - dependencies: - "@npmcli/fs": "npm:^4.0.0" - fs-minipass: "npm:^3.0.0" - glob: "npm:^10.2.2" - lru-cache: "npm:^10.0.1" - minipass: "npm:^7.0.3" - minipass-collect: "npm:^2.0.1" - minipass-flush: "npm:^1.0.5" - minipass-pipeline: "npm:^1.2.4" - p-map: "npm:^7.0.2" - ssri: "npm:^12.0.0" - tar: "npm:^7.4.3" - unique-filename: "npm:^4.0.0" - checksum: 10c0/01f2134e1bd7d3ab68be851df96c8d63b492b1853b67f2eecb2c37bb682d37cb70bb858a16f2f0554d3c0071be6dfe21456a1ff6fa4b7eed996570d6a25ffe9c - languageName: node - linkType: hard - -"cacheable-lookup@npm:^5.0.3": - version: 5.0.4 - resolution: "cacheable-lookup@npm:5.0.4" - checksum: 10c0/a6547fb4954b318aa831cbdd2f7b376824bc784fb1fa67610e4147099e3074726072d9af89f12efb69121415a0e1f2918a8ddd4aafcbcf4e91fbeef4a59cd42c - languageName: node - linkType: hard - -"cacheable-request@npm:^7.0.2": - version: 7.0.4 - resolution: "cacheable-request@npm:7.0.4" - dependencies: - clone-response: "npm:^1.0.2" - get-stream: "npm:^5.1.0" - http-cache-semantics: "npm:^4.0.0" - keyv: "npm:^4.0.0" - lowercase-keys: "npm:^2.0.0" - normalize-url: "npm:^6.0.1" - responselike: "npm:^2.0.0" - checksum: 10c0/0834a7d17ae71a177bc34eab06de112a43f9b5ad05ebe929bec983d890a7d9f2bc5f1aa8bb67ea2b65e07a3bc74bea35fa62dd36dbac52876afe36fdcf83da41 - languageName: node - linkType: hard - -"call-bind-apply-helpers@npm:^1.0.0, call-bind-apply-helpers@npm:^1.0.1": - version: 1.0.1 - resolution: "call-bind-apply-helpers@npm:1.0.1" - dependencies: - es-errors: "npm:^1.3.0" - function-bind: "npm:^1.1.2" - checksum: 10c0/acb2ab68bf2718e68a3e895f0d0b73ccc9e45b9b6f210f163512ba76f91dab409eb8792f6dae188356f9095747512a3101646b3dea9d37fb8c7c6bf37796d18c - languageName: node - linkType: hard - -"call-bind@npm:^1.0.7, call-bind@npm:^1.0.8": - version: 1.0.8 - resolution: "call-bind@npm:1.0.8" - dependencies: - call-bind-apply-helpers: "npm:^1.0.0" - es-define-property: "npm:^1.0.0" - get-intrinsic: "npm:^1.2.4" - set-function-length: "npm:^1.2.2" - checksum: 10c0/a13819be0681d915144467741b69875ae5f4eba8961eb0bf322aab63ec87f8250eb6d6b0dcbb2e1349876412a56129ca338592b3829ef4343527f5f18a0752d4 - languageName: node - linkType: hard - -"call-bound@npm:^1.0.2, call-bound@npm:^1.0.3": - version: 1.0.3 - resolution: "call-bound@npm:1.0.3" - dependencies: - call-bind-apply-helpers: "npm:^1.0.1" - get-intrinsic: "npm:^1.2.6" - checksum: 10c0/45257b8e7621067304b30dbd638e856cac913d31e8e00a80d6cf172911acd057846572d0b256b45e652d515db6601e2974a1b1a040e91b4fc36fb3dd86fa69cf - languageName: node - linkType: hard - -"callsites@npm:^3.0.0": - version: 3.1.0 - resolution: "callsites@npm:3.1.0" - checksum: 10c0/fff92277400eb06c3079f9e74f3af120db9f8ea03bad0e84d9aede54bbe2d44a56cccb5f6cf12211f93f52306df87077ecec5b712794c5a9b5dac6d615a3f301 - languageName: node - linkType: hard - -"chalk@npm:^4.0.0, chalk@npm:^4.1.0": - version: 4.1.2 - resolution: "chalk@npm:4.1.2" - dependencies: - ansi-styles: "npm:^4.1.0" - supports-color: "npm:^7.1.0" - checksum: 10c0/4a3fef5cc34975c898ffe77141450f679721df9dde00f6c304353fa9c8b571929123b26a0e4617bde5018977eb655b31970c297b91b63ee83bb82aeb04666880 - languageName: node - linkType: hard - -"chownr@npm:^3.0.0": - version: 3.0.0 - resolution: "chownr@npm:3.0.0" - checksum: 10c0/43925b87700f7e3893296c8e9c56cc58f926411cce3a6e5898136daaf08f08b9a8eb76d37d3267e707d0dcc17aed2e2ebdf5848c0c3ce95cf910a919935c1b10 - languageName: node - linkType: hard - -"cli-cursor@npm:^3.1.0": - version: 3.1.0 - resolution: "cli-cursor@npm:3.1.0" - dependencies: - restore-cursor: "npm:^3.1.0" - checksum: 10c0/92a2f98ff9037d09be3dfe1f0d749664797fb674bf388375a2207a1203b69d41847abf16434203e0089212479e47a358b13a0222ab9fccfe8e2644a7ccebd111 - languageName: node - linkType: hard - -"cli-spinners@npm:^2.5.0": - version: 2.9.2 - resolution: "cli-spinners@npm:2.9.2" - checksum: 10c0/907a1c227ddf0d7a101e7ab8b300affc742ead4b4ebe920a5bf1bc6d45dce2958fcd195eb28fa25275062fe6fa9b109b93b63bc8033396ed3bcb50297008b3a3 - languageName: node - linkType: hard - -"cliui@npm:^8.0.1": - version: 8.0.1 - resolution: "cliui@npm:8.0.1" - dependencies: - string-width: "npm:^4.2.0" - strip-ansi: "npm:^6.0.1" - wrap-ansi: "npm:^7.0.0" - checksum: 10c0/4bda0f09c340cbb6dfdc1ed508b3ca080f12992c18d68c6be4d9cf51756033d5266e61ec57529e610dacbf4da1c634423b0c1b11037709cc6b09045cbd815df5 - languageName: node - linkType: hard - -"clone-response@npm:^1.0.2": - version: 1.0.3 - resolution: "clone-response@npm:1.0.3" - dependencies: - mimic-response: "npm:^1.0.0" - checksum: 10c0/06a2b611824efb128810708baee3bd169ec9a1bf5976a5258cd7eb3f7db25f00166c6eee5961f075c7e38e194f373d4fdf86b8166ad5b9c7e82bbd2e333a6087 - languageName: node - linkType: hard - -"clone@npm:^1.0.2": - version: 1.0.4 - resolution: "clone@npm:1.0.4" - checksum: 10c0/2176952b3649293473999a95d7bebfc9dc96410f6cbd3d2595cf12fd401f63a4bf41a7adbfd3ab2ff09ed60cb9870c58c6acdd18b87767366fabfc163700f13b - languageName: node - linkType: hard - -"color-convert@npm:^2.0.1": - version: 2.0.1 - resolution: "color-convert@npm:2.0.1" - dependencies: - color-name: "npm:~1.1.4" - checksum: 10c0/37e1150172f2e311fe1b2df62c6293a342ee7380da7b9cfdba67ea539909afbd74da27033208d01d6d5cfc65ee7868a22e18d7e7648e004425441c0f8a15a7d7 - languageName: node - linkType: hard - -"color-name@npm:~1.1.4": - version: 1.1.4 - resolution: "color-name@npm:1.1.4" - checksum: 10c0/a1a3f914156960902f46f7f56bc62effc6c94e84b2cae157a526b1c1f74b677a47ec602bf68a61abfa2b42d15b7c5651c6dbe72a43af720bc588dff885b10f95 - languageName: node - linkType: hard - -"commander@npm:^2.9.0": - version: 2.20.3 - resolution: "commander@npm:2.20.3" - checksum: 10c0/74c781a5248c2402a0a3e966a0a2bba3c054aad144f5c023364be83265e796b20565aa9feff624132ff629aa64e16999fa40a743c10c12f7c61e96a794b99288 - languageName: node - linkType: hard - -"concat-map@npm:0.0.1": - version: 0.0.1 - resolution: "concat-map@npm:0.0.1" - checksum: 10c0/c996b1cfdf95b6c90fee4dae37e332c8b6eb7d106430c17d538034c0ad9a1630cb194d2ab37293b1bdd4d779494beee7786d586a50bd9376fd6f7bcc2bd4c98f - languageName: node - linkType: hard - -"create-require@npm:^1.1.0": - version: 1.1.1 - resolution: "create-require@npm:1.1.1" - checksum: 10c0/157cbc59b2430ae9a90034a5f3a1b398b6738bf510f713edc4d4e45e169bc514d3d99dd34d8d01ca7ae7830b5b8b537e46ae8f3c8f932371b0875c0151d7ec91 - languageName: node - linkType: hard - -"cross-spawn@npm:^7.0.0, cross-spawn@npm:^7.0.1, cross-spawn@npm:^7.0.6": - version: 7.0.6 - resolution: "cross-spawn@npm:7.0.6" - dependencies: - path-key: "npm:^3.1.0" - shebang-command: "npm:^2.0.0" - which: "npm:^2.0.1" - checksum: 10c0/053ea8b2135caff68a9e81470e845613e374e7309a47731e81639de3eaeb90c3d01af0e0b44d2ab9d50b43467223b88567dfeb3262db942dc063b9976718ffc1 - languageName: node - linkType: hard - -"custom.stdout@npm:^1.0.2": - version: 1.0.2 - resolution: "custom.stdout@npm:1.0.2" - checksum: 10c0/17caebc82f48b347307df4c7accc075f9ccf245a45e370806860de21f05687f27eea5fdc577bfbede889f6789c82479f9fb0ab9a1c01e665f24482ea574105f9 - languageName: node - linkType: hard - -"data-view-buffer@npm:^1.0.2": - version: 1.0.2 - resolution: "data-view-buffer@npm:1.0.2" - dependencies: - call-bound: "npm:^1.0.3" - es-errors: "npm:^1.3.0" - is-data-view: "npm:^1.0.2" - checksum: 10c0/7986d40fc7979e9e6241f85db8d17060dd9a71bd53c894fa29d126061715e322a4cd47a00b0b8c710394854183d4120462b980b8554012acc1c0fa49df7ad38c - languageName: node - linkType: hard - -"data-view-byte-length@npm:^1.0.2": - version: 1.0.2 - resolution: "data-view-byte-length@npm:1.0.2" - dependencies: - call-bound: "npm:^1.0.3" - es-errors: "npm:^1.3.0" - is-data-view: "npm:^1.0.2" - checksum: 10c0/f8a4534b5c69384d95ac18137d381f18a5cfae1f0fc1df0ef6feef51ef0d568606d970b69e02ea186c6c0f0eac77fe4e6ad96fec2569cc86c3afcc7475068c55 - languageName: node - linkType: hard - -"data-view-byte-offset@npm:^1.0.1": - version: 1.0.1 - resolution: "data-view-byte-offset@npm:1.0.1" - dependencies: - call-bound: "npm:^1.0.2" - es-errors: "npm:^1.3.0" - is-data-view: "npm:^1.0.1" - checksum: 10c0/fa7aa40078025b7810dcffc16df02c480573b7b53ef1205aa6a61533011005c1890e5ba17018c692ce7c900212b547262d33279fde801ad9843edc0863bf78c4 - languageName: node - linkType: hard - -"debug@npm:4, debug@npm:^4.1.0, debug@npm:^4.1.1, debug@npm:^4.3.1, debug@npm:^4.3.2, debug@npm:^4.3.4": - version: 4.4.0 - resolution: "debug@npm:4.4.0" - dependencies: - ms: "npm:^2.1.3" - peerDependenciesMeta: - supports-color: - optional: true - checksum: 10c0/db94f1a182bf886f57b4755f85b3a74c39b5114b9377b7ab375dc2cfa3454f09490cc6c30f829df3fc8042bc8b8995f6567ce5cd96f3bc3688bd24027197d9de - languageName: node - linkType: hard - -"debug@npm:^3.2.7": - version: 3.2.7 - resolution: "debug@npm:3.2.7" - dependencies: - ms: "npm:^2.1.1" - checksum: 10c0/37d96ae42cbc71c14844d2ae3ba55adf462ec89fd3a999459dec3833944cd999af6007ff29c780f1c61153bcaaf2c842d1e4ce1ec621e4fc4923244942e4a02a - languageName: node - linkType: hard - -"decompress-response@npm:^6.0.0": - version: 6.0.0 - resolution: "decompress-response@npm:6.0.0" - dependencies: - mimic-response: "npm:^3.1.0" - checksum: 10c0/bd89d23141b96d80577e70c54fb226b2f40e74a6817652b80a116d7befb8758261ad073a8895648a29cc0a5947021ab66705cb542fa9c143c82022b27c5b175e - languageName: node - linkType: hard - -"deep-is@npm:^0.1.3": - version: 0.1.4 - resolution: "deep-is@npm:0.1.4" - checksum: 10c0/7f0ee496e0dff14a573dc6127f14c95061b448b87b995fc96c017ce0a1e66af1675e73f1d6064407975bc4ea6ab679497a29fff7b5b9c4e99cb10797c1ad0b4c - languageName: node - linkType: hard - -"defaults@npm:^1.0.3": - version: 1.0.4 - resolution: "defaults@npm:1.0.4" - dependencies: - clone: "npm:^1.0.2" - checksum: 10c0/9cfbe498f5c8ed733775db62dfd585780387d93c17477949e1670bfcfb9346e0281ce8c4bf9f4ac1fc0f9b851113bd6dc9e41182ea1644ccd97de639fa13c35a - languageName: node - linkType: hard - -"defer-to-connect@npm:^2.0.0": - version: 2.0.1 - resolution: "defer-to-connect@npm:2.0.1" - checksum: 10c0/625ce28e1b5ad10cf77057b9a6a727bf84780c17660f6644dab61dd34c23de3001f03cedc401f7d30a4ed9965c2e8a7336e220a329146f2cf85d4eddea429782 - languageName: node - linkType: hard - -"define-data-property@npm:^1.0.1, define-data-property@npm:^1.1.4": - version: 1.1.4 - resolution: "define-data-property@npm:1.1.4" - dependencies: - es-define-property: "npm:^1.0.0" - es-errors: "npm:^1.3.0" - gopd: "npm:^1.0.1" - checksum: 10c0/dea0606d1483eb9db8d930d4eac62ca0fa16738b0b3e07046cddfacf7d8c868bbe13fa0cb263eb91c7d0d527960dc3f2f2471a69ed7816210307f6744fe62e37 - languageName: node - linkType: hard - -"define-properties@npm:^1.2.1": - version: 1.2.1 - resolution: "define-properties@npm:1.2.1" - dependencies: - define-data-property: "npm:^1.0.1" - has-property-descriptors: "npm:^1.0.0" - object-keys: "npm:^1.1.1" - checksum: 10c0/88a152319ffe1396ccc6ded510a3896e77efac7a1bfbaa174a7b00414a1747377e0bb525d303794a47cf30e805c2ec84e575758512c6e44a993076d29fd4e6c3 - languageName: node - linkType: hard - -"detect-libc@npm:^2.0.1": - version: 2.0.3 - resolution: "detect-libc@npm:2.0.3" - checksum: 10c0/88095bda8f90220c95f162bf92cad70bd0e424913e655c20578600e35b91edc261af27531cf160a331e185c0ced93944bc7e09939143225f56312d7fd800fdb7 - languageName: node - linkType: hard - -"detect-node@npm:^2.0.4": - version: 2.1.0 - resolution: "detect-node@npm:2.1.0" - checksum: 10c0/f039f601790f2e9d4654e499913259a798b1f5246ae24f86ab5e8bd4aaf3bce50484234c494f11fb00aecb0c6e2733aa7b1cf3f530865640b65fbbd65b2c4e09 - languageName: node - linkType: hard - -"diff@npm:^4.0.1": - version: 4.0.2 - resolution: "diff@npm:4.0.2" - checksum: 10c0/81b91f9d39c4eaca068eb0c1eb0e4afbdc5bb2941d197f513dd596b820b956fef43485876226d65d497bebc15666aa2aa82c679e84f65d5f2bfbf14ee46e32c1 - languageName: node - linkType: hard - -"doctrine@npm:^2.1.0": - version: 2.1.0 - resolution: "doctrine@npm:2.1.0" - dependencies: - esutils: "npm:^2.0.2" - checksum: 10c0/b6416aaff1f380bf56c3b552f31fdf7a69b45689368deca72d28636f41c16bb28ec3ebc40ace97db4c1afc0ceeb8120e8492fe0046841c94c2933b2e30a7d5ac - languageName: node - linkType: hard - -"dunder-proto@npm:^1.0.0, dunder-proto@npm:^1.0.1": - version: 1.0.1 - resolution: "dunder-proto@npm:1.0.1" - dependencies: - call-bind-apply-helpers: "npm:^1.0.1" - es-errors: "npm:^1.3.0" - gopd: "npm:^1.2.0" - checksum: 10c0/199f2a0c1c16593ca0a145dbf76a962f8033ce3129f01284d48c45ed4e14fea9bbacd7b3610b6cdc33486cef20385ac054948fefc6272fcce645c09468f93031 - languageName: node - linkType: hard - -"eastasianwidth@npm:^0.2.0": - version: 0.2.0 - resolution: "eastasianwidth@npm:0.2.0" - checksum: 10c0/26f364ebcdb6395f95124fda411f63137a4bfb5d3a06453f7f23dfe52502905bd84e0488172e0f9ec295fdc45f05c23d5d91baf16bd26f0fe9acd777a188dc39 - languageName: node - linkType: hard - -"electron-build-env@npm:0.2.0": - version: 0.2.0 - resolution: "electron-build-env@npm:0.2.0" - dependencies: - commander: "npm:^2.9.0" - mkdirp: "npm:^0.5.1" - bin: - electron-build-env: ./cli.js - checksum: 10c0/fbd03925f3426003e7f7bd713ab041101b3555bb7b5cd35e526fa5c7d1d843e470b07044310fade1080b0d33ecbe46a31584a38d88b6c7c3e406d7e3c62242b6 - languageName: node - linkType: hard - -"electron@npm:^34.0.1": - version: 34.0.1 - resolution: "electron@npm:34.0.1" - dependencies: - "@electron/get": "npm:^2.0.0" - "@types/node": "npm:^20.9.0" - extract-zip: "npm:^2.0.1" - bin: - electron: cli.js - checksum: 10c0/0a63edd57633edac8e4f4d1310dbb82ac01287f1f9113a18cef310dfef7f266ef8be98eda7d01890e23b37d03f36811bbac0fe5c4e0a27c9f3719ba3b7841f83 - languageName: node - linkType: hard - -"emoji-regex@npm:^8.0.0": - version: 8.0.0 - resolution: "emoji-regex@npm:8.0.0" - checksum: 10c0/b6053ad39951c4cf338f9092d7bfba448cdfd46fe6a2a034700b149ac9ffbc137e361cbd3c442297f86bed2e5f7576c1b54cc0a6bf8ef5106cc62f496af35010 - languageName: node - linkType: hard - -"emoji-regex@npm:^9.2.2": - version: 9.2.2 - resolution: "emoji-regex@npm:9.2.2" - checksum: 10c0/af014e759a72064cf66e6e694a7fc6b0ed3d8db680427b021a89727689671cefe9d04151b2cad51dbaf85d5ba790d061cd167f1cf32eb7b281f6368b3c181639 - languageName: node - linkType: hard - -"encoding@npm:^0.1.13": - version: 0.1.13 - resolution: "encoding@npm:0.1.13" - dependencies: - iconv-lite: "npm:^0.6.2" - checksum: 10c0/36d938712ff00fe1f4bac88b43bcffb5930c1efa57bbcdca9d67e1d9d6c57cfb1200fb01efe0f3109b2ce99b231f90779532814a81370a1bd3274a0f58585039 - languageName: node - linkType: hard - -"end-of-stream@npm:^1.1.0": - version: 1.4.4 - resolution: "end-of-stream@npm:1.4.4" - dependencies: - once: "npm:^1.4.0" - checksum: 10c0/870b423afb2d54bb8d243c63e07c170409d41e20b47eeef0727547aea5740bd6717aca45597a9f2745525667a6b804c1e7bede41f856818faee5806dd9ff3975 - languageName: node - linkType: hard - -"env-paths@npm:^2.2.0": - version: 2.2.1 - resolution: "env-paths@npm:2.2.1" - checksum: 10c0/285325677bf00e30845e330eec32894f5105529db97496ee3f598478e50f008c5352a41a30e5e72ec9de8a542b5a570b85699cd63bd2bc646dbcb9f311d83bc4 - languageName: node - linkType: hard - -"err-code@npm:^2.0.2": - version: 2.0.3 - resolution: "err-code@npm:2.0.3" - checksum: 10c0/b642f7b4dd4a376e954947550a3065a9ece6733ab8e51ad80db727aaae0817c2e99b02a97a3d6cecc648a97848305e728289cf312d09af395403a90c9d4d8a66 - languageName: node - linkType: hard - -"es-abstract@npm:^1.23.2, es-abstract@npm:^1.23.5, es-abstract@npm:^1.23.9": - version: 1.23.9 - resolution: "es-abstract@npm:1.23.9" - dependencies: - array-buffer-byte-length: "npm:^1.0.2" - arraybuffer.prototype.slice: "npm:^1.0.4" - available-typed-arrays: "npm:^1.0.7" - call-bind: "npm:^1.0.8" - call-bound: "npm:^1.0.3" - data-view-buffer: "npm:^1.0.2" - data-view-byte-length: "npm:^1.0.2" - data-view-byte-offset: "npm:^1.0.1" - es-define-property: "npm:^1.0.1" - es-errors: "npm:^1.3.0" - es-object-atoms: "npm:^1.0.0" - es-set-tostringtag: "npm:^2.1.0" - es-to-primitive: "npm:^1.3.0" - function.prototype.name: "npm:^1.1.8" - get-intrinsic: "npm:^1.2.7" - get-proto: "npm:^1.0.0" - get-symbol-description: "npm:^1.1.0" - globalthis: "npm:^1.0.4" - gopd: "npm:^1.2.0" - has-property-descriptors: "npm:^1.0.2" - has-proto: "npm:^1.2.0" - has-symbols: "npm:^1.1.0" - hasown: "npm:^2.0.2" - internal-slot: "npm:^1.1.0" - is-array-buffer: "npm:^3.0.5" - is-callable: "npm:^1.2.7" - is-data-view: "npm:^1.0.2" - is-regex: "npm:^1.2.1" - is-shared-array-buffer: "npm:^1.0.4" - is-string: "npm:^1.1.1" - is-typed-array: "npm:^1.1.15" - is-weakref: "npm:^1.1.0" - math-intrinsics: "npm:^1.1.0" - object-inspect: "npm:^1.13.3" - object-keys: "npm:^1.1.1" - object.assign: "npm:^4.1.7" - own-keys: "npm:^1.0.1" - regexp.prototype.flags: "npm:^1.5.3" - safe-array-concat: "npm:^1.1.3" - safe-push-apply: "npm:^1.0.0" - safe-regex-test: "npm:^1.1.0" - set-proto: "npm:^1.0.0" - string.prototype.trim: "npm:^1.2.10" - string.prototype.trimend: "npm:^1.0.9" - string.prototype.trimstart: "npm:^1.0.8" - typed-array-buffer: "npm:^1.0.3" - typed-array-byte-length: "npm:^1.0.3" - typed-array-byte-offset: "npm:^1.0.4" - typed-array-length: "npm:^1.0.7" - unbox-primitive: "npm:^1.1.0" - which-typed-array: "npm:^1.1.18" - checksum: 10c0/1de229c9e08fe13c17fe5abaec8221545dfcd57e51f64909599a6ae896df84b8fd2f7d16c60cb00d7bf495b9298ca3581aded19939d4b7276854a4b066f8422b - languageName: node - linkType: hard - -"es-define-property@npm:^1.0.0, es-define-property@npm:^1.0.1": - version: 1.0.1 - resolution: "es-define-property@npm:1.0.1" - checksum: 10c0/3f54eb49c16c18707949ff25a1456728c883e81259f045003499efba399c08bad00deebf65cccde8c0e07908c1a225c9d472b7107e558f2a48e28d530e34527c - languageName: node - linkType: hard - -"es-errors@npm:^1.3.0": - version: 1.3.0 - resolution: "es-errors@npm:1.3.0" - checksum: 10c0/0a61325670072f98d8ae3b914edab3559b6caa980f08054a3b872052640d91da01d38df55df797fcc916389d77fc92b8d5906cf028f4db46d7e3003abecbca85 - languageName: node - linkType: hard - -"es-object-atoms@npm:^1.0.0": - version: 1.1.1 - resolution: "es-object-atoms@npm:1.1.1" - dependencies: - es-errors: "npm:^1.3.0" - checksum: 10c0/65364812ca4daf48eb76e2a3b7a89b3f6a2e62a1c420766ce9f692665a29d94fe41fe88b65f24106f449859549711e4b40d9fb8002d862dfd7eb1c512d10be0c - languageName: node - linkType: hard - -"es-set-tostringtag@npm:^2.1.0": - version: 2.1.0 - resolution: "es-set-tostringtag@npm:2.1.0" - dependencies: - es-errors: "npm:^1.3.0" - get-intrinsic: "npm:^1.2.6" - has-tostringtag: "npm:^1.0.2" - hasown: "npm:^2.0.2" - checksum: 10c0/ef2ca9ce49afe3931cb32e35da4dcb6d86ab02592cfc2ce3e49ced199d9d0bb5085fc7e73e06312213765f5efa47cc1df553a6a5154584b21448e9fb8355b1af - languageName: node - linkType: hard - -"es-shim-unscopables@npm:^1.0.2": - version: 1.0.2 - resolution: "es-shim-unscopables@npm:1.0.2" - dependencies: - hasown: "npm:^2.0.0" - checksum: 10c0/f495af7b4b7601a4c0cfb893581c352636e5c08654d129590386a33a0432cf13a7bdc7b6493801cadd990d838e2839b9013d1de3b880440cb537825e834fe783 - languageName: node - linkType: hard - -"es-to-primitive@npm:^1.3.0": - version: 1.3.0 - resolution: "es-to-primitive@npm:1.3.0" - dependencies: - is-callable: "npm:^1.2.7" - is-date-object: "npm:^1.0.5" - is-symbol: "npm:^1.0.4" - checksum: 10c0/c7e87467abb0b438639baa8139f701a06537d2b9bc758f23e8622c3b42fd0fdb5bde0f535686119e446dd9d5e4c0f238af4e14960f4771877cf818d023f6730b - languageName: node - linkType: hard - -"es6-error@npm:^4.1.1": - version: 4.1.1 - resolution: "es6-error@npm:4.1.1" - checksum: 10c0/357663fb1e845c047d548c3d30f86e005db71e122678f4184ced0693f634688c3f3ef2d7de7d4af732f734de01f528b05954e270f06aa7d133679fb9fe6600ef - languageName: node - linkType: hard - -"escalade@npm:^3.1.1": - version: 3.2.0 - resolution: "escalade@npm:3.2.0" - checksum: 10c0/ced4dd3a78e15897ed3be74e635110bbf3b08877b0a41be50dcb325ee0e0b5f65fc2d50e9845194d7c4633f327e2e1c6cce00a71b617c5673df0374201d67f65 - languageName: node - linkType: hard - -"escape-string-regexp@npm:^4.0.0": - version: 4.0.0 - resolution: "escape-string-regexp@npm:4.0.0" - checksum: 10c0/9497d4dd307d845bd7f75180d8188bb17ea8c151c1edbf6b6717c100e104d629dc2dfb687686181b0f4b7d732c7dfdc4d5e7a8ff72de1b0ca283a75bbb3a9cd9 - languageName: node - linkType: hard - -"eslint-import-resolver-node@npm:^0.3.9": - version: 0.3.9 - resolution: "eslint-import-resolver-node@npm:0.3.9" - dependencies: - debug: "npm:^3.2.7" - is-core-module: "npm:^2.13.0" - resolve: "npm:^1.22.4" - checksum: 10c0/0ea8a24a72328a51fd95aa8f660dcca74c1429806737cf10261ab90cfcaaf62fd1eff664b76a44270868e0a932711a81b250053942595bcd00a93b1c1575dd61 - languageName: node - linkType: hard - -"eslint-module-utils@npm:^2.12.0": - version: 2.12.0 - resolution: "eslint-module-utils@npm:2.12.0" - dependencies: - debug: "npm:^3.2.7" - peerDependenciesMeta: - eslint: - optional: true - checksum: 10c0/4d8b46dcd525d71276f9be9ffac1d2be61c9d54cc53c992e6333cf957840dee09381842b1acbbb15fc6b255ebab99cd481c5007ab438e5455a14abe1a0468558 - languageName: node - linkType: hard - -"eslint-plugin-es@npm:^3.0.0": - version: 3.0.1 - resolution: "eslint-plugin-es@npm:3.0.1" - dependencies: - eslint-utils: "npm:^2.0.0" - regexpp: "npm:^3.0.0" - peerDependencies: - eslint: ">=4.19.1" - checksum: 10c0/12ae730aa9603e680af048e1653aac15e529411b68b8d0da6e290700b17c695485af7c3f5360f531f80970786cab7288c2c1d4a58c35ec1bb89649897c016c4a - languageName: node - linkType: hard - -"eslint-plugin-import@npm:^2.31.0": - version: 2.31.0 - resolution: "eslint-plugin-import@npm:2.31.0" - dependencies: - "@rtsao/scc": "npm:^1.1.0" - array-includes: "npm:^3.1.8" - array.prototype.findlastindex: "npm:^1.2.5" - array.prototype.flat: "npm:^1.3.2" - array.prototype.flatmap: "npm:^1.3.2" - debug: "npm:^3.2.7" - doctrine: "npm:^2.1.0" - eslint-import-resolver-node: "npm:^0.3.9" - eslint-module-utils: "npm:^2.12.0" - hasown: "npm:^2.0.2" - is-core-module: "npm:^2.15.1" - is-glob: "npm:^4.0.3" - minimatch: "npm:^3.1.2" - object.fromentries: "npm:^2.0.8" - object.groupby: "npm:^1.0.3" - object.values: "npm:^1.2.0" - semver: "npm:^6.3.1" - string.prototype.trimend: "npm:^1.0.8" - tsconfig-paths: "npm:^3.15.0" - peerDependencies: - eslint: ^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0 || ^8 || ^9 - checksum: 10c0/e21d116ddd1900e091ad120b3eb68c5dd5437fe2c930f1211781cd38b246f090a6b74d5f3800b8255a0ed29782591521ad44eb21c5534960a8f1fb4040fd913a - languageName: node - linkType: hard - -"eslint-plugin-node@npm:^11.1.0": - version: 11.1.0 - resolution: "eslint-plugin-node@npm:11.1.0" - dependencies: - eslint-plugin-es: "npm:^3.0.0" - eslint-utils: "npm:^2.0.0" - ignore: "npm:^5.1.1" - minimatch: "npm:^3.0.4" - resolve: "npm:^1.10.1" - semver: "npm:^6.1.0" - peerDependencies: - eslint: ">=5.16.0" - checksum: 10c0/c7716adac4020cb852fd2410dcd8bdb13a227004de77f96d7f9806d0cf2274f24e0920a7ca73bcd72d90003696c1f17fdd9fe3ca218e64ee03dc2b840e4416fa - languageName: node - linkType: hard - -"eslint-plugin-promise@npm:^7.2.1": - version: 7.2.1 - resolution: "eslint-plugin-promise@npm:7.2.1" - dependencies: - "@eslint-community/eslint-utils": "npm:^4.4.0" - peerDependencies: - eslint: ^7.0.0 || ^8.0.0 || ^9.0.0 - checksum: 10c0/d494982faeeafbd2aa5fae9cbceca546169a8399000f72d5d940fa5c4ba554612903bcafbb8033647179e5d21ccf1d621b433d089695f7f47ce3d9fcf4cd0abf - languageName: node - linkType: hard - -"eslint-scope@npm:^8.2.0": - version: 8.2.0 - resolution: "eslint-scope@npm:8.2.0" - dependencies: - esrecurse: "npm:^4.3.0" - estraverse: "npm:^5.2.0" - checksum: 10c0/8d2d58e2136d548ac7e0099b1a90d9fab56f990d86eb518de1247a7066d38c908be2f3df477a79cf60d70b30ba18735d6c6e70e9914dca2ee515a729975d70d6 - languageName: node - linkType: hard - -"eslint-utils@npm:^2.0.0": - version: 2.1.0 - resolution: "eslint-utils@npm:2.1.0" - dependencies: - eslint-visitor-keys: "npm:^1.1.0" - checksum: 10c0/69521c5d6569384b24093125d037ba238d3d6e54367f7143af9928f5286369e912c26cad5016d730c0ffb9797ac9e83831059d7f1d863f7dc84330eb02414611 - languageName: node - linkType: hard - -"eslint-visitor-keys@npm:^1.1.0": - version: 1.3.0 - resolution: "eslint-visitor-keys@npm:1.3.0" - checksum: 10c0/10c91fdbbe36810dd4308e57f9a8bc7177188b2a70247e54e3af1fa05ebc66414ae6fd4ce3c6c6821591f43a556e9037bc6b071122e099b5f8b7d2f76df553e3 - languageName: node - linkType: hard - -"eslint-visitor-keys@npm:^3.4.3": - version: 3.4.3 - resolution: "eslint-visitor-keys@npm:3.4.3" - checksum: 10c0/92708e882c0a5ffd88c23c0b404ac1628cf20104a108c745f240a13c332a11aac54f49a22d5762efbffc18ecbc9a580d1b7ad034bf5f3cc3307e5cbff2ec9820 - languageName: node - linkType: hard - -"eslint-visitor-keys@npm:^4.2.0": - version: 4.2.0 - resolution: "eslint-visitor-keys@npm:4.2.0" - checksum: 10c0/2ed81c663b147ca6f578312919483eb040295bbab759e5a371953456c636c5b49a559883e2677112453728d66293c0a4c90ab11cab3428cf02a0236d2e738269 - languageName: node - linkType: hard - -"eslint@npm:^9.18.0": - version: 9.18.0 - resolution: "eslint@npm:9.18.0" - dependencies: - "@eslint-community/eslint-utils": "npm:^4.2.0" - "@eslint-community/regexpp": "npm:^4.12.1" - "@eslint/config-array": "npm:^0.19.0" - "@eslint/core": "npm:^0.10.0" - "@eslint/eslintrc": "npm:^3.2.0" - "@eslint/js": "npm:9.18.0" - "@eslint/plugin-kit": "npm:^0.2.5" - "@humanfs/node": "npm:^0.16.6" - "@humanwhocodes/module-importer": "npm:^1.0.1" - "@humanwhocodes/retry": "npm:^0.4.1" - "@types/estree": "npm:^1.0.6" - "@types/json-schema": "npm:^7.0.15" - ajv: "npm:^6.12.4" - chalk: "npm:^4.0.0" - cross-spawn: "npm:^7.0.6" - debug: "npm:^4.3.2" - escape-string-regexp: "npm:^4.0.0" - eslint-scope: "npm:^8.2.0" - eslint-visitor-keys: "npm:^4.2.0" - espree: "npm:^10.3.0" - esquery: "npm:^1.5.0" - esutils: "npm:^2.0.2" - fast-deep-equal: "npm:^3.1.3" - file-entry-cache: "npm:^8.0.0" - find-up: "npm:^5.0.0" - glob-parent: "npm:^6.0.2" - ignore: "npm:^5.2.0" - imurmurhash: "npm:^0.1.4" - is-glob: "npm:^4.0.0" - json-stable-stringify-without-jsonify: "npm:^1.0.1" - lodash.merge: "npm:^4.6.2" - minimatch: "npm:^3.1.2" - natural-compare: "npm:^1.4.0" - optionator: "npm:^0.9.3" - peerDependencies: - jiti: "*" - peerDependenciesMeta: - jiti: - optional: true - bin: - eslint: bin/eslint.js - checksum: 10c0/7f592ad228b9bd627a24870fdc875bacdab7bf535d4b67316c4cb791e90d0125130a74769f3c407b0c4b7027b3082ef33864a63ee1024552a60a17db60493f15 - languageName: node - linkType: hard - -"espree@npm:^10.0.1, espree@npm:^10.3.0": - version: 10.3.0 - resolution: "espree@npm:10.3.0" - dependencies: - acorn: "npm:^8.14.0" - acorn-jsx: "npm:^5.3.2" - eslint-visitor-keys: "npm:^4.2.0" - checksum: 10c0/272beeaca70d0a1a047d61baff64db04664a33d7cfb5d144f84bc8a5c6194c6c8ebe9cc594093ca53add88baa23e59b01e69e8a0160ab32eac570482e165c462 - languageName: node - linkType: hard - -"esquery@npm:^1.5.0": - version: 1.6.0 - resolution: "esquery@npm:1.6.0" - dependencies: - estraverse: "npm:^5.1.0" - checksum: 10c0/cb9065ec605f9da7a76ca6dadb0619dfb611e37a81e318732977d90fab50a256b95fee2d925fba7c2f3f0523aa16f91587246693bc09bc34d5a59575fe6e93d2 - languageName: node - linkType: hard - -"esrecurse@npm:^4.3.0": - version: 4.3.0 - resolution: "esrecurse@npm:4.3.0" - dependencies: - estraverse: "npm:^5.2.0" - checksum: 10c0/81a37116d1408ded88ada45b9fb16dbd26fba3aadc369ce50fcaf82a0bac12772ebd7b24cd7b91fc66786bf2c1ac7b5f196bc990a473efff972f5cb338877cf5 - languageName: node - linkType: hard - -"estraverse@npm:^5.1.0, estraverse@npm:^5.2.0": - version: 5.3.0 - resolution: "estraverse@npm:5.3.0" - checksum: 10c0/1ff9447b96263dec95d6d67431c5e0771eb9776427421260a3e2f0fdd5d6bd4f8e37a7338f5ad2880c9f143450c9b1e4fc2069060724570a49cf9cf0312bd107 - languageName: node - linkType: hard - -"esutils@npm:^2.0.2": - version: 2.0.3 - resolution: "esutils@npm:2.0.3" - checksum: 10c0/9a2fe69a41bfdade834ba7c42de4723c97ec776e40656919c62cbd13607c45e127a003f05f724a1ea55e5029a4cf2de444b13009f2af71271e42d93a637137c7 - languageName: node - linkType: hard - -"exponential-backoff@npm:^3.1.1": - version: 3.1.1 - resolution: "exponential-backoff@npm:3.1.1" - checksum: 10c0/160456d2d647e6019640bd07111634d8c353038d9fa40176afb7cd49b0548bdae83b56d05e907c2cce2300b81cae35d800ef92fefb9d0208e190fa3b7d6bb579 - languageName: node - linkType: hard - -"extract-zip@npm:^2.0.1": - version: 2.0.1 - resolution: "extract-zip@npm:2.0.1" - dependencies: - "@types/yauzl": "npm:^2.9.1" - debug: "npm:^4.1.1" - get-stream: "npm:^5.1.0" - yauzl: "npm:^2.10.0" - dependenciesMeta: - "@types/yauzl": - optional: true - bin: - extract-zip: cli.js - checksum: 10c0/9afbd46854aa15a857ae0341a63a92743a7b89c8779102c3b4ffc207516b2019337353962309f85c66ee3d9092202a83cdc26dbf449a11981272038443974aee - languageName: node - linkType: hard - -"fast-deep-equal@npm:^3.1.1, fast-deep-equal@npm:^3.1.3": - version: 3.1.3 - resolution: "fast-deep-equal@npm:3.1.3" - checksum: 10c0/40dedc862eb8992c54579c66d914635afbec43350afbbe991235fdcb4e3a8d5af1b23ae7e79bef7d4882d0ecee06c3197488026998fb19f72dc95acff1d1b1d0 - languageName: node - linkType: hard - -"fast-glob@npm:^3.3.2": - version: 3.3.3 - resolution: "fast-glob@npm:3.3.3" - dependencies: - "@nodelib/fs.stat": "npm:^2.0.2" - "@nodelib/fs.walk": "npm:^1.2.3" - glob-parent: "npm:^5.1.2" - merge2: "npm:^1.3.0" - micromatch: "npm:^4.0.8" - checksum: 10c0/f6aaa141d0d3384cf73cbcdfc52f475ed293f6d5b65bfc5def368b09163a9f7e5ec2b3014d80f733c405f58e470ee0cc451c2937685045cddcdeaa24199c43fe - languageName: node - linkType: hard - -"fast-json-stable-stringify@npm:^2.0.0": - version: 2.1.0 - resolution: "fast-json-stable-stringify@npm:2.1.0" - checksum: 10c0/7f081eb0b8a64e0057b3bb03f974b3ef00135fbf36c1c710895cd9300f13c94ba809bb3a81cf4e1b03f6e5285610a61abbd7602d0652de423144dfee5a389c9b - languageName: node - linkType: hard - -"fast-levenshtein@npm:^2.0.6": - version: 2.0.6 - resolution: "fast-levenshtein@npm:2.0.6" - checksum: 10c0/111972b37338bcb88f7d9e2c5907862c280ebf4234433b95bc611e518d192ccb2d38119c4ac86e26b668d75f7f3894f4ff5c4982899afced7ca78633b08287c4 - languageName: node - linkType: hard - -"fastq@npm:^1.6.0": - version: 1.18.0 - resolution: "fastq@npm:1.18.0" - dependencies: - reusify: "npm:^1.0.4" - checksum: 10c0/7be87ecc41762adbddf558d24182f50a4b1a3ef3ee807d33b7623da7aee5faecdcc94fce5aa13fe91df93e269f383232bbcdb2dc5338cd1826503d6063221f36 - languageName: node - linkType: hard - -"fd-slicer@npm:~1.1.0": - version: 1.1.0 - resolution: "fd-slicer@npm:1.1.0" - dependencies: - pend: "npm:~1.2.0" - checksum: 10c0/304dd70270298e3ffe3bcc05e6f7ade2511acc278bc52d025f8918b48b6aa3b77f10361bddfadfe2a28163f7af7adbdce96f4d22c31b2f648ba2901f0c5fc20e - languageName: node - linkType: hard - -"fdir@npm:^6.5.0": - version: 6.5.0 - resolution: "fdir@npm:6.5.0" - peerDependencies: - picomatch: ^3 || ^4 - peerDependenciesMeta: - picomatch: - optional: true - checksum: 10c0/e345083c4306b3aed6cb8ec551e26c36bab5c511e99ea4576a16750ddc8d3240e63826cc624f5ae17ad4dc82e68a253213b60d556c11bfad064b7607847ed07f - languageName: node - linkType: hard - -"file-entry-cache@npm:^8.0.0": - version: 8.0.0 - resolution: "file-entry-cache@npm:8.0.0" - dependencies: - flat-cache: "npm:^4.0.0" - checksum: 10c0/9e2b5938b1cd9b6d7e3612bdc533afd4ac17b2fc646569e9a8abbf2eb48e5eb8e316bc38815a3ef6a1b456f4107f0d0f055a614ca613e75db6bf9ff4d72c1638 - languageName: node - linkType: hard - -"fill-range@npm:^7.1.1": - version: 7.1.1 - resolution: "fill-range@npm:7.1.1" - dependencies: - to-regex-range: "npm:^5.0.1" - checksum: 10c0/b75b691bbe065472f38824f694c2f7449d7f5004aa950426a2c28f0306c60db9b880c0b0e4ed819997ffb882d1da02cfcfc819bddc94d71627f5269682edf018 - languageName: node - linkType: hard - -"find-up@npm:^5.0.0": - version: 5.0.0 - resolution: "find-up@npm:5.0.0" - dependencies: - locate-path: "npm:^6.0.0" - path-exists: "npm:^4.0.0" - checksum: 10c0/062c5a83a9c02f53cdd6d175a37ecf8f87ea5bbff1fdfb828f04bfa021441bc7583e8ebc0872a4c1baab96221fb8a8a275a19809fb93fbc40bd69ec35634069a - languageName: node - linkType: hard - -"flat-cache@npm:^4.0.0": - version: 4.0.1 - resolution: "flat-cache@npm:4.0.1" - dependencies: - flatted: "npm:^3.2.9" - keyv: "npm:^4.5.4" - checksum: 10c0/2c59d93e9faa2523e4fda6b4ada749bed432cfa28c8e251f33b25795e426a1c6dbada777afb1f74fcfff33934fdbdea921ee738fcc33e71adc9d6eca984a1cfc - languageName: node - linkType: hard - -"flatted@npm:^3.2.9": - version: 3.3.2 - resolution: "flatted@npm:3.3.2" - checksum: 10c0/24cc735e74d593b6c767fe04f2ef369abe15b62f6906158079b9874bdb3ee5ae7110bb75042e70cd3f99d409d766f357caf78d5ecee9780206f5fdc5edbad334 - languageName: node - linkType: hard - -"for-each@npm:^0.3.3": - version: 0.3.3 - resolution: "for-each@npm:0.3.3" - dependencies: - is-callable: "npm:^1.1.3" - checksum: 10c0/22330d8a2db728dbf003ec9182c2d421fbcd2969b02b4f97ec288721cda63eb28f2c08585ddccd0f77cb2930af8d958005c9e72f47141dc51816127a118f39aa - languageName: node - linkType: hard - -"foreground-child@npm:^3.1.0": - version: 3.3.0 - resolution: "foreground-child@npm:3.3.0" - dependencies: - cross-spawn: "npm:^7.0.0" - signal-exit: "npm:^4.0.1" - checksum: 10c0/028f1d41000553fcfa6c4bb5c372963bf3d9bf0b1f25a87d1a6253014343fb69dfb1b42d9625d7cf44c8ba429940f3d0ff718b62105d4d4a4f6ef8ca0a53faa2 - languageName: node - linkType: hard - -"fs-extra@npm:^8.1.0": - version: 8.1.0 - resolution: "fs-extra@npm:8.1.0" - dependencies: - graceful-fs: "npm:^4.2.0" - jsonfile: "npm:^4.0.0" - universalify: "npm:^0.1.0" - checksum: 10c0/259f7b814d9e50d686899550c4f9ded85c46c643f7fe19be69504888e007fcbc08f306fae8ec495b8b998635e997c9e3e175ff2eeed230524ef1c1684cc96423 - languageName: node - linkType: hard - -"fs-minipass@npm:^3.0.0": - version: 3.0.3 - resolution: "fs-minipass@npm:3.0.3" - dependencies: - minipass: "npm:^7.0.3" - checksum: 10c0/63e80da2ff9b621e2cb1596abcb9207f1cf82b968b116ccd7b959e3323144cce7fb141462200971c38bbf2ecca51695069db45265705bed09a7cd93ae5b89f94 - languageName: node - linkType: hard - -"function-bind@npm:^1.1.2": - version: 1.1.2 - resolution: "function-bind@npm:1.1.2" - checksum: 10c0/d8680ee1e5fcd4c197e4ac33b2b4dce03c71f4d91717292785703db200f5c21f977c568d28061226f9b5900cbcd2c84463646134fd5337e7925e0942bc3f46d5 - languageName: node - linkType: hard - -"function.prototype.name@npm:^1.1.6, function.prototype.name@npm:^1.1.8": - version: 1.1.8 - resolution: "function.prototype.name@npm:1.1.8" - dependencies: - call-bind: "npm:^1.0.8" - call-bound: "npm:^1.0.3" - define-properties: "npm:^1.2.1" - functions-have-names: "npm:^1.2.3" - hasown: "npm:^2.0.2" - is-callable: "npm:^1.2.7" - checksum: 10c0/e920a2ab52663005f3cbe7ee3373e3c71c1fb5558b0b0548648cdf3e51961085032458e26c71ff1a8c8c20e7ee7caeb03d43a5d1fa8610c459333323a2e71253 - languageName: node - linkType: hard - -"functions-have-names@npm:^1.2.3": - version: 1.2.3 - resolution: "functions-have-names@npm:1.2.3" - checksum: 10c0/33e77fd29bddc2d9bb78ab3eb854c165909201f88c75faa8272e35899e2d35a8a642a15e7420ef945e1f64a9670d6aa3ec744106b2aa42be68ca5114025954ca - languageName: node - linkType: hard - -"get-caller-file@npm:^2.0.5": - version: 2.0.5 - resolution: "get-caller-file@npm:2.0.5" - checksum: 10c0/c6c7b60271931fa752aeb92f2b47e355eac1af3a2673f47c9589e8f8a41adc74d45551c1bc57b5e66a80609f10ffb72b6f575e4370d61cc3f7f3aaff01757cde - languageName: node - linkType: hard - -"get-intrinsic@npm:^1.2.4, get-intrinsic@npm:^1.2.5, get-intrinsic@npm:^1.2.6, get-intrinsic@npm:^1.2.7": - version: 1.2.7 - resolution: "get-intrinsic@npm:1.2.7" - dependencies: - call-bind-apply-helpers: "npm:^1.0.1" - es-define-property: "npm:^1.0.1" - es-errors: "npm:^1.3.0" - es-object-atoms: "npm:^1.0.0" - function-bind: "npm:^1.1.2" - get-proto: "npm:^1.0.0" - gopd: "npm:^1.2.0" - has-symbols: "npm:^1.1.0" - hasown: "npm:^2.0.2" - math-intrinsics: "npm:^1.1.0" - checksum: 10c0/b475dec9f8bff6f7422f51ff4b7b8d0b68e6776ee83a753c1d627e3008c3442090992788038b37eff72e93e43dceed8c1acbdf2d6751672687ec22127933080d - languageName: node - linkType: hard - -"get-proto@npm:^1.0.0, get-proto@npm:^1.0.1": - version: 1.0.1 - resolution: "get-proto@npm:1.0.1" - dependencies: - dunder-proto: "npm:^1.0.1" - es-object-atoms: "npm:^1.0.0" - checksum: 10c0/9224acb44603c5526955e83510b9da41baf6ae73f7398875fba50edc5e944223a89c4a72b070fcd78beb5f7bdda58ecb6294adc28f7acfc0da05f76a2399643c - languageName: node - linkType: hard - -"get-stream@npm:^5.1.0": - version: 5.2.0 - resolution: "get-stream@npm:5.2.0" - dependencies: - pump: "npm:^3.0.0" - checksum: 10c0/43797ffd815fbb26685bf188c8cfebecb8af87b3925091dd7b9a9c915993293d78e3c9e1bce125928ff92f2d0796f3889b92b5ec6d58d1041b574682132e0a80 - languageName: node - linkType: hard - -"get-symbol-description@npm:^1.1.0": - version: 1.1.0 - resolution: "get-symbol-description@npm:1.1.0" - dependencies: - call-bound: "npm:^1.0.3" - es-errors: "npm:^1.3.0" - get-intrinsic: "npm:^1.2.6" - checksum: 10c0/d6a7d6afca375779a4b307738c9e80dbf7afc0bdbe5948768d54ab9653c865523d8920e670991a925936eb524b7cb6a6361d199a760b21d0ca7620194455aa4b - languageName: node - linkType: hard - -"glob-parent@npm:^5.1.2": - version: 5.1.2 - resolution: "glob-parent@npm:5.1.2" - dependencies: - is-glob: "npm:^4.0.1" - checksum: 10c0/cab87638e2112bee3f839ef5f6e0765057163d39c66be8ec1602f3823da4692297ad4e972de876ea17c44d652978638d2fd583c6713d0eb6591706825020c9ee - languageName: node - linkType: hard - -"glob-parent@npm:^6.0.2": - version: 6.0.2 - resolution: "glob-parent@npm:6.0.2" - dependencies: - is-glob: "npm:^4.0.3" - checksum: 10c0/317034d88654730230b3f43bb7ad4f7c90257a426e872ea0bf157473ac61c99bf5d205fad8f0185f989be8d2fa6d3c7dce1645d99d545b6ea9089c39f838e7f8 - languageName: node - linkType: hard - -"glob@npm:^10.2.2, glob@npm:^10.3.7": - version: 10.4.5 - resolution: "glob@npm:10.4.5" - dependencies: - foreground-child: "npm:^3.1.0" - jackspeak: "npm:^3.1.2" - minimatch: "npm:^9.0.4" - minipass: "npm:^7.1.2" - package-json-from-dist: "npm:^1.0.0" - path-scurry: "npm:^1.11.1" - bin: - glob: dist/esm/bin.mjs - checksum: 10c0/19a9759ea77b8e3ca0a43c2f07ecddc2ad46216b786bb8f993c445aee80d345925a21e5280c7b7c6c59e860a0154b84e4b2b60321fea92cd3c56b4a7489f160e - languageName: node - linkType: hard - -"global-agent@npm:^3.0.0": - version: 3.0.0 - resolution: "global-agent@npm:3.0.0" - dependencies: - boolean: "npm:^3.0.1" - es6-error: "npm:^4.1.1" - matcher: "npm:^3.0.0" - roarr: "npm:^2.15.3" - semver: "npm:^7.3.2" - serialize-error: "npm:^7.0.1" - checksum: 10c0/bb8750d026b25da437072762fd739098bad92ff72f66483c3929db4579e072f5523960f7e7fd70ee0d75db48898067b5dc1c9c1d17888128cff008fcc34d1bd3 - languageName: node - linkType: hard - -"globals@npm:^14.0.0": - version: 14.0.0 - resolution: "globals@npm:14.0.0" - checksum: 10c0/b96ff42620c9231ad468d4c58ff42afee7777ee1c963013ff8aabe095a451d0ceeb8dcd8ef4cbd64d2538cef45f787a78ba3a9574f4a634438963e334471302d - languageName: node - linkType: hard - -"globalthis@npm:^1.0.1, globalthis@npm:^1.0.4": - version: 1.0.4 - resolution: "globalthis@npm:1.0.4" - dependencies: - define-properties: "npm:^1.2.1" - gopd: "npm:^1.0.1" - checksum: 10c0/9d156f313af79d80b1566b93e19285f481c591ad6d0d319b4be5e03750d004dde40a39a0f26f7e635f9007a3600802f53ecd85a759b86f109e80a5f705e01846 - languageName: node - linkType: hard - -"gopd@npm:^1.0.1, gopd@npm:^1.2.0": - version: 1.2.0 - resolution: "gopd@npm:1.2.0" - checksum: 10c0/50fff1e04ba2b7737c097358534eacadad1e68d24cccee3272e04e007bed008e68d2614f3987788428fd192a5ae3889d08fb2331417e4fc4a9ab366b2043cead - languageName: node - linkType: hard - -"got@npm:^11.7.0, got@npm:^11.8.5": - version: 11.8.6 - resolution: "got@npm:11.8.6" - dependencies: - "@sindresorhus/is": "npm:^4.0.0" - "@szmarczak/http-timer": "npm:^4.0.5" - "@types/cacheable-request": "npm:^6.0.1" - "@types/responselike": "npm:^1.0.0" - cacheable-lookup: "npm:^5.0.3" - cacheable-request: "npm:^7.0.2" - decompress-response: "npm:^6.0.0" - http2-wrapper: "npm:^1.0.0-beta.5.2" - lowercase-keys: "npm:^2.0.0" - p-cancelable: "npm:^2.0.0" - responselike: "npm:^2.0.0" - checksum: 10c0/754dd44877e5cf6183f1e989ff01c648d9a4719e357457bd4c78943911168881f1cfb7b2cb15d885e2105b3ad313adb8f017a67265dd7ade771afdb261ee8cb1 - languageName: node - linkType: hard - -"graceful-fs@npm:^4.1.6, graceful-fs@npm:^4.2.0, graceful-fs@npm:^4.2.11, graceful-fs@npm:^4.2.6": - version: 4.2.11 - resolution: "graceful-fs@npm:4.2.11" - checksum: 10c0/386d011a553e02bc594ac2ca0bd6d9e4c22d7fa8cfbfc448a6d148c59ea881b092db9dbe3547ae4b88e55f1b01f7c4a2ecc53b310c042793e63aa44cf6c257f2 - languageName: node - linkType: hard - -"graphemer@npm:^1.4.0": - version: 1.4.0 - resolution: "graphemer@npm:1.4.0" - checksum: 10c0/e951259d8cd2e0d196c72ec711add7115d42eb9a8146c8eeda5b8d3ac91e5dd816b9cd68920726d9fd4490368e7ed86e9c423f40db87e2d8dfafa00fa17c3a31 - languageName: node - linkType: hard - -"has-bigints@npm:^1.0.2": - version: 1.1.0 - resolution: "has-bigints@npm:1.1.0" - checksum: 10c0/2de0cdc4a1ccf7a1e75ffede1876994525ac03cc6f5ae7392d3415dd475cd9eee5bceec63669ab61aa997ff6cceebb50ef75561c7002bed8988de2b9d1b40788 - languageName: node - linkType: hard - -"has-flag@npm:^4.0.0": - version: 4.0.0 - resolution: "has-flag@npm:4.0.0" - checksum: 10c0/2e789c61b7888d66993e14e8331449e525ef42aac53c627cc53d1c3334e768bcb6abdc4f5f0de1478a25beec6f0bd62c7549058b7ac53e924040d4f301f02fd1 - languageName: node - linkType: hard - -"has-property-descriptors@npm:^1.0.0, has-property-descriptors@npm:^1.0.2": - version: 1.0.2 - resolution: "has-property-descriptors@npm:1.0.2" - dependencies: - es-define-property: "npm:^1.0.0" - checksum: 10c0/253c1f59e80bb476cf0dde8ff5284505d90c3bdb762983c3514d36414290475fe3fd6f574929d84de2a8eec00d35cf07cb6776205ff32efd7c50719125f00236 - languageName: node - linkType: hard - -"has-proto@npm:^1.2.0": - version: 1.2.0 - resolution: "has-proto@npm:1.2.0" - dependencies: - dunder-proto: "npm:^1.0.0" - checksum: 10c0/46538dddab297ec2f43923c3d35237df45d8c55a6fc1067031e04c13ed8a9a8f94954460632fd4da84c31a1721eefee16d901cbb1ae9602bab93bb6e08f93b95 - languageName: node - linkType: hard - -"has-symbols@npm:^1.0.3, has-symbols@npm:^1.1.0": - version: 1.1.0 - resolution: "has-symbols@npm:1.1.0" - checksum: 10c0/dde0a734b17ae51e84b10986e651c664379018d10b91b6b0e9b293eddb32f0f069688c841fb40f19e9611546130153e0a2a48fd7f512891fb000ddfa36f5a20e - languageName: node - linkType: hard - -"has-tostringtag@npm:^1.0.2": - version: 1.0.2 - resolution: "has-tostringtag@npm:1.0.2" - dependencies: - has-symbols: "npm:^1.0.3" - checksum: 10c0/a8b166462192bafe3d9b6e420a1d581d93dd867adb61be223a17a8d6dad147aa77a8be32c961bb2f27b3ef893cae8d36f564ab651f5e9b7938ae86f74027c48c - languageName: node - linkType: hard - -"hasown@npm:^2.0.0, hasown@npm:^2.0.2": - version: 2.0.2 - resolution: "hasown@npm:2.0.2" - dependencies: - function-bind: "npm:^1.1.2" - checksum: 10c0/3769d434703b8ac66b209a4cca0737519925bbdb61dd887f93a16372b14694c63ff4e797686d87c90f08168e81082248b9b028bad60d4da9e0d1148766f56eb9 - languageName: node - linkType: hard - -"http-cache-semantics@npm:^4.0.0, http-cache-semantics@npm:^4.1.1": - version: 4.1.1 - resolution: "http-cache-semantics@npm:4.1.1" - checksum: 10c0/ce1319b8a382eb3cbb4a37c19f6bfe14e5bb5be3d09079e885e8c513ab2d3cd9214902f8a31c9dc4e37022633ceabfc2d697405deeaf1b8f3552bb4ed996fdfc - languageName: node - linkType: hard - -"http-proxy-agent@npm:^7.0.0": - version: 7.0.2 - resolution: "http-proxy-agent@npm:7.0.2" - dependencies: - agent-base: "npm:^7.1.0" - debug: "npm:^4.3.4" - checksum: 10c0/4207b06a4580fb85dd6dff521f0abf6db517489e70863dca1a0291daa7f2d3d2d6015a57bd702af068ea5cf9f1f6ff72314f5f5b4228d299c0904135d2aef921 - languageName: node - linkType: hard - -"http2-wrapper@npm:^1.0.0-beta.5.2": - version: 1.0.3 - resolution: "http2-wrapper@npm:1.0.3" - dependencies: - quick-lru: "npm:^5.1.1" - resolve-alpn: "npm:^1.0.0" - checksum: 10c0/6a9b72a033e9812e1476b9d776ce2f387bc94bc46c88aea0d5dab6bd47d0a539b8178830e77054dd26d1142c866d515a28a4dc7c3ff4232c88ff2ebe4f5d12d1 - languageName: node - linkType: hard - -"https-proxy-agent@npm:^7.0.1": - version: 7.0.6 - resolution: "https-proxy-agent@npm:7.0.6" - dependencies: - agent-base: "npm:^7.1.2" - debug: "npm:4" - checksum: 10c0/f729219bc735edb621fa30e6e84e60ee5d00802b8247aac0d7b79b0bd6d4b3294737a337b93b86a0bd9e68099d031858a39260c976dc14cdbba238ba1f8779ac - languageName: node - linkType: hard - -"iconv-lite@npm:^0.6.2": - version: 0.6.3 - resolution: "iconv-lite@npm:0.6.3" - dependencies: - safer-buffer: "npm:>= 2.1.2 < 3.0.0" - checksum: 10c0/98102bc66b33fcf5ac044099d1257ba0b7ad5e3ccd3221f34dd508ab4070edff183276221684e1e0555b145fce0850c9f7d2b60a9fcac50fbb4ea0d6e845a3b1 - languageName: node - linkType: hard - -"ieee754@npm:^1.1.13": - version: 1.2.1 - resolution: "ieee754@npm:1.2.1" - checksum: 10c0/b0782ef5e0935b9f12883a2e2aa37baa75da6e66ce6515c168697b42160807d9330de9a32ec1ed73149aea02e0d822e572bca6f1e22bdcbd2149e13b050b17bb - languageName: node - linkType: hard - -"ignore@npm:^5.1.1, ignore@npm:^5.2.0, ignore@npm:^5.3.1": - version: 5.3.2 - resolution: "ignore@npm:5.3.2" - checksum: 10c0/f9f652c957983634ded1e7f02da3b559a0d4cc210fca3792cb67f1b153623c9c42efdc1c4121af171e295444459fc4a9201101fb041b1104a3c000bccb188337 - languageName: node - linkType: hard - -"import-fresh@npm:^3.2.1": - version: 3.3.0 - resolution: "import-fresh@npm:3.3.0" - dependencies: - parent-module: "npm:^1.0.0" - resolve-from: "npm:^4.0.0" - checksum: 10c0/7f882953aa6b740d1f0e384d0547158bc86efbf2eea0f1483b8900a6f65c5a5123c2cf09b0d542cc419d0b98a759ecaeb394237e97ea427f2da221dc3cd80cc3 - languageName: node - linkType: hard - -"imurmurhash@npm:^0.1.4": - version: 0.1.4 - resolution: "imurmurhash@npm:0.1.4" - checksum: 10c0/8b51313850dd33605c6c9d3fd9638b714f4c4c40250cff658209f30d40da60f78992fb2df5dabee4acf589a6a82bbc79ad5486550754bd9ec4e3fc0d4a57d6a6 - languageName: node - linkType: hard - -"inherits@npm:^2.0.3, inherits@npm:^2.0.4": - version: 2.0.4 - resolution: "inherits@npm:2.0.4" - checksum: 10c0/4e531f648b29039fb7426fb94075e6545faa1eb9fe83c29f0b6d9e7263aceb4289d2d4557db0d428188eeb449cc7c5e77b0a0b2c4e248ff2a65933a0dee49ef2 - languageName: node - linkType: hard - -"internal-slot@npm:^1.1.0": - version: 1.1.0 - resolution: "internal-slot@npm:1.1.0" - dependencies: - es-errors: "npm:^1.3.0" - hasown: "npm:^2.0.2" - side-channel: "npm:^1.1.0" - checksum: 10c0/03966f5e259b009a9bf1a78d60da920df198af4318ec004f57b8aef1dd3fe377fbc8cce63a96e8c810010302654de89f9e19de1cd8ad0061d15be28a695465c7 - languageName: node - linkType: hard - -"ip-address@npm:^9.0.5": - version: 9.0.5 - resolution: "ip-address@npm:9.0.5" - dependencies: - jsbn: "npm:1.1.0" - sprintf-js: "npm:^1.1.3" - checksum: 10c0/331cd07fafcb3b24100613e4b53e1a2b4feab11e671e655d46dc09ee233da5011284d09ca40c4ecbdfe1d0004f462958675c224a804259f2f78d2465a87824bc - languageName: node - linkType: hard - -"is-array-buffer@npm:^3.0.4, is-array-buffer@npm:^3.0.5": - version: 3.0.5 - resolution: "is-array-buffer@npm:3.0.5" - dependencies: - call-bind: "npm:^1.0.8" - call-bound: "npm:^1.0.3" - get-intrinsic: "npm:^1.2.6" - checksum: 10c0/c5c9f25606e86dbb12e756694afbbff64bc8b348d1bc989324c037e1068695131930199d6ad381952715dad3a9569333817f0b1a72ce5af7f883ce802e49c83d - languageName: node - linkType: hard - -"is-async-function@npm:^2.0.0": - version: 2.1.1 - resolution: "is-async-function@npm:2.1.1" - dependencies: - async-function: "npm:^1.0.0" - call-bound: "npm:^1.0.3" - get-proto: "npm:^1.0.1" - has-tostringtag: "npm:^1.0.2" - safe-regex-test: "npm:^1.1.0" - checksum: 10c0/d70c236a5e82de6fc4d44368ffd0c2fee2b088b893511ce21e679da275a5ecc6015ff59a7d7e1bdd7ca39f71a8dbdd253cf8cce5c6b3c91cdd5b42b5ce677298 - languageName: node - linkType: hard - -"is-bigint@npm:^1.1.0": - version: 1.1.0 - resolution: "is-bigint@npm:1.1.0" - dependencies: - has-bigints: "npm:^1.0.2" - checksum: 10c0/f4f4b905ceb195be90a6ea7f34323bf1c18e3793f18922e3e9a73c684c29eeeeff5175605c3a3a74cc38185fe27758f07efba3dbae812e5c5afbc0d2316b40e4 - languageName: node - linkType: hard - -"is-boolean-object@npm:^1.2.1": - version: 1.2.1 - resolution: "is-boolean-object@npm:1.2.1" - dependencies: - call-bound: "npm:^1.0.2" - has-tostringtag: "npm:^1.0.2" - checksum: 10c0/2ef601d255a39fdbde79cfe6be80c27b47430ed6712407f29b17d002e20f64c1e3d6692f1d842ba16bf1e9d8ddf1c4f13cac3ed7d9a4a21290f44879ebb4e8f5 - languageName: node - linkType: hard - -"is-callable@npm:^1.1.3, is-callable@npm:^1.2.7": - version: 1.2.7 - resolution: "is-callable@npm:1.2.7" - checksum: 10c0/ceebaeb9d92e8adee604076971dd6000d38d6afc40bb843ea8e45c5579b57671c3f3b50d7f04869618242c6cee08d1b67806a8cb8edaaaf7c0748b3720d6066f - languageName: node - linkType: hard - -"is-core-module@npm:^2.13.0, is-core-module@npm:^2.15.1, is-core-module@npm:^2.16.0": - version: 2.16.1 - resolution: "is-core-module@npm:2.16.1" - dependencies: - hasown: "npm:^2.0.2" - checksum: 10c0/898443c14780a577e807618aaae2b6f745c8538eca5c7bc11388a3f2dc6de82b9902bcc7eb74f07be672b11bbe82dd6a6edded44a00cb3d8f933d0459905eedd - languageName: node - linkType: hard - -"is-data-view@npm:^1.0.1, is-data-view@npm:^1.0.2": - version: 1.0.2 - resolution: "is-data-view@npm:1.0.2" - dependencies: - call-bound: "npm:^1.0.2" - get-intrinsic: "npm:^1.2.6" - is-typed-array: "npm:^1.1.13" - checksum: 10c0/ef3548a99d7e7f1370ce21006baca6d40c73e9f15c941f89f0049c79714c873d03b02dae1c64b3f861f55163ecc16da06506c5b8a1d4f16650b3d9351c380153 - languageName: node - linkType: hard - -"is-date-object@npm:^1.0.5, is-date-object@npm:^1.1.0": - version: 1.1.0 - resolution: "is-date-object@npm:1.1.0" - dependencies: - call-bound: "npm:^1.0.2" - has-tostringtag: "npm:^1.0.2" - checksum: 10c0/1a4d199c8e9e9cac5128d32e6626fa7805175af9df015620ac0d5d45854ccf348ba494679d872d37301032e35a54fc7978fba1687e8721b2139aea7870cafa2f - languageName: node - linkType: hard - -"is-extglob@npm:^2.1.1": - version: 2.1.1 - resolution: "is-extglob@npm:2.1.1" - checksum: 10c0/5487da35691fbc339700bbb2730430b07777a3c21b9ebaecb3072512dfd7b4ba78ac2381a87e8d78d20ea08affb3f1971b4af629173a6bf435ff8a4c47747912 - languageName: node - linkType: hard - -"is-finalizationregistry@npm:^1.1.0": - version: 1.1.1 - resolution: "is-finalizationregistry@npm:1.1.1" - dependencies: - call-bound: "npm:^1.0.3" - checksum: 10c0/818dff679b64f19e228a8205a1e2d09989a98e98def3a817f889208cfcbf918d321b251aadf2c05918194803ebd2eb01b14fc9d0b2bea53d984f4137bfca5e97 - languageName: node - linkType: hard - -"is-fullwidth-code-point@npm:^3.0.0": - version: 3.0.0 - resolution: "is-fullwidth-code-point@npm:3.0.0" - checksum: 10c0/bb11d825e049f38e04c06373a8d72782eee0205bda9d908cc550ccb3c59b99d750ff9537982e01733c1c94a58e35400661f57042158ff5e8f3e90cf936daf0fc - languageName: node - linkType: hard - -"is-generator-function@npm:^1.0.10": - version: 1.1.0 - resolution: "is-generator-function@npm:1.1.0" - dependencies: - call-bound: "npm:^1.0.3" - get-proto: "npm:^1.0.0" - has-tostringtag: "npm:^1.0.2" - safe-regex-test: "npm:^1.1.0" - checksum: 10c0/fdfa96c8087bf36fc4cd514b474ba2ff404219a4dd4cfa6cf5426404a1eed259bdcdb98f082a71029a48d01f27733e3436ecc6690129a7ec09cb0434bee03a2a - languageName: node - linkType: hard - -"is-glob@npm:^4.0.0, is-glob@npm:^4.0.1, is-glob@npm:^4.0.3": - version: 4.0.3 - resolution: "is-glob@npm:4.0.3" - dependencies: - is-extglob: "npm:^2.1.1" - checksum: 10c0/17fb4014e22be3bbecea9b2e3a76e9e34ff645466be702f1693e8f1ee1adac84710d0be0bd9f967d6354036fd51ab7c2741d954d6e91dae6bb69714de92c197a - languageName: node - linkType: hard - -"is-interactive@npm:^1.0.0": - version: 1.0.0 - resolution: "is-interactive@npm:1.0.0" - checksum: 10c0/dd47904dbf286cd20aa58c5192161be1a67138485b9836d5a70433b21a45442e9611b8498b8ab1f839fc962c7620667a50535fdfb4a6bc7989b8858645c06b4d - languageName: node - linkType: hard - -"is-map@npm:^2.0.3": - version: 2.0.3 - resolution: "is-map@npm:2.0.3" - checksum: 10c0/2c4d431b74e00fdda7162cd8e4b763d6f6f217edf97d4f8538b94b8702b150610e2c64961340015fe8df5b1fcee33ccd2e9b62619c4a8a3a155f8de6d6d355fc - languageName: node - linkType: hard - -"is-number-object@npm:^1.1.1": - version: 1.1.1 - resolution: "is-number-object@npm:1.1.1" - dependencies: - call-bound: "npm:^1.0.3" - has-tostringtag: "npm:^1.0.2" - checksum: 10c0/97b451b41f25135ff021d85c436ff0100d84a039bb87ffd799cbcdbea81ef30c464ced38258cdd34f080be08fc3b076ca1f472086286d2aa43521d6ec6a79f53 - languageName: node - linkType: hard - -"is-number@npm:^7.0.0": - version: 7.0.0 - resolution: "is-number@npm:7.0.0" - checksum: 10c0/b4686d0d3053146095ccd45346461bc8e53b80aeb7671cc52a4de02dbbf7dc0d1d2a986e2fe4ae206984b4d34ef37e8b795ebc4f4295c978373e6575e295d811 - languageName: node - linkType: hard - -"is-regex@npm:^1.2.1": - version: 1.2.1 - resolution: "is-regex@npm:1.2.1" - dependencies: - call-bound: "npm:^1.0.2" - gopd: "npm:^1.2.0" - has-tostringtag: "npm:^1.0.2" - hasown: "npm:^2.0.2" - checksum: 10c0/1d3715d2b7889932349241680032e85d0b492cfcb045acb75ffc2c3085e8d561184f1f7e84b6f8321935b4aea39bc9c6ba74ed595b57ce4881a51dfdbc214e04 - languageName: node - linkType: hard - -"is-set@npm:^2.0.3": - version: 2.0.3 - resolution: "is-set@npm:2.0.3" - checksum: 10c0/f73732e13f099b2dc879c2a12341cfc22ccaca8dd504e6edae26484bd5707a35d503fba5b4daad530a9b088ced1ae6c9d8200fd92e09b428fe14ea79ce8080b7 - languageName: node - linkType: hard - -"is-shared-array-buffer@npm:^1.0.4": - version: 1.0.4 - resolution: "is-shared-array-buffer@npm:1.0.4" - dependencies: - call-bound: "npm:^1.0.3" - checksum: 10c0/65158c2feb41ff1edd6bbd6fd8403a69861cf273ff36077982b5d4d68e1d59278c71691216a4a64632bd76d4792d4d1d2553901b6666d84ade13bba5ea7bc7db - languageName: node - linkType: hard - -"is-string@npm:^1.0.7, is-string@npm:^1.1.1": - version: 1.1.1 - resolution: "is-string@npm:1.1.1" - dependencies: - call-bound: "npm:^1.0.3" - has-tostringtag: "npm:^1.0.2" - checksum: 10c0/2f518b4e47886bb81567faba6ffd0d8a8333cf84336e2e78bf160693972e32ad00fe84b0926491cc598dee576fdc55642c92e62d0cbe96bf36f643b6f956f94d - languageName: node - linkType: hard - -"is-symbol@npm:^1.0.4, is-symbol@npm:^1.1.1": - version: 1.1.1 - resolution: "is-symbol@npm:1.1.1" - dependencies: - call-bound: "npm:^1.0.2" - has-symbols: "npm:^1.1.0" - safe-regex-test: "npm:^1.1.0" - checksum: 10c0/f08f3e255c12442e833f75a9e2b84b2d4882fdfd920513cf2a4a2324f0a5b076c8fd913778e3ea5d258d5183e9d92c0cd20e04b03ab3df05316b049b2670af1e - languageName: node - linkType: hard - -"is-typed-array@npm:^1.1.13, is-typed-array@npm:^1.1.14, is-typed-array@npm:^1.1.15": - version: 1.1.15 - resolution: "is-typed-array@npm:1.1.15" - dependencies: - which-typed-array: "npm:^1.1.16" - checksum: 10c0/415511da3669e36e002820584e264997ffe277ff136643a3126cc949197e6ca3334d0f12d084e83b1994af2e9c8141275c741cf2b7da5a2ff62dd0cac26f76c4 - languageName: node - linkType: hard - -"is-unicode-supported@npm:^0.1.0": - version: 0.1.0 - resolution: "is-unicode-supported@npm:0.1.0" - checksum: 10c0/00cbe3455c3756be68d2542c416cab888aebd5012781d6819749fefb15162ff23e38501fe681b3d751c73e8ff561ac09a5293eba6f58fdf0178462ce6dcb3453 - languageName: node - linkType: hard - -"is-weakmap@npm:^2.0.2": - version: 2.0.2 - resolution: "is-weakmap@npm:2.0.2" - checksum: 10c0/443c35bb86d5e6cc5929cd9c75a4024bb0fff9586ed50b092f94e700b89c43a33b186b76dbc6d54f3d3d09ece689ab38dcdc1af6a482cbe79c0f2da0a17f1299 - languageName: node - linkType: hard - -"is-weakref@npm:^1.0.2, is-weakref@npm:^1.1.0": - version: 1.1.0 - resolution: "is-weakref@npm:1.1.0" - dependencies: - call-bound: "npm:^1.0.2" - checksum: 10c0/aa835f62e29cb60132ecb3ec7d11bd0f39ec7322325abe8412b805aef47153ec2daefdb21759b049711c674f49b13202a31d8d126bcdff7d8671c78babd4ae5b - languageName: node - linkType: hard - -"is-weakset@npm:^2.0.3": - version: 2.0.4 - resolution: "is-weakset@npm:2.0.4" - dependencies: - call-bound: "npm:^1.0.3" - get-intrinsic: "npm:^1.2.6" - checksum: 10c0/6491eba08acb8dc9532da23cb226b7d0192ede0b88f16199e592e4769db0a077119c1f5d2283d1e0d16d739115f70046e887e477eb0e66cd90e1bb29f28ba647 - languageName: node - linkType: hard - -"isarray@npm:^2.0.5": - version: 2.0.5 - resolution: "isarray@npm:2.0.5" - checksum: 10c0/4199f14a7a13da2177c66c31080008b7124331956f47bca57dd0b6ea9f11687aa25e565a2c7a2b519bc86988d10398e3049a1f5df13c9f6b7664154690ae79fd - languageName: node - linkType: hard - -"isexe@npm:^2.0.0": - version: 2.0.0 - resolution: "isexe@npm:2.0.0" - checksum: 10c0/228cfa503fadc2c31596ab06ed6aa82c9976eec2bfd83397e7eaf06d0ccf42cd1dfd6743bf9aeb01aebd4156d009994c5f76ea898d2832c1fe342da923ca457d - languageName: node - linkType: hard - -"isexe@npm:^3.1.1": - version: 3.1.1 - resolution: "isexe@npm:3.1.1" - checksum: 10c0/9ec257654093443eb0a528a9c8cbba9c0ca7616ccb40abd6dde7202734d96bb86e4ac0d764f0f8cd965856aacbff2f4ce23e730dc19dfb41e3b0d865ca6fdcc7 - languageName: node - linkType: hard - -"jackspeak@npm:^3.1.2": - version: 3.4.3 - resolution: "jackspeak@npm:3.4.3" - dependencies: - "@isaacs/cliui": "npm:^8.0.2" - "@pkgjs/parseargs": "npm:^0.11.0" - dependenciesMeta: - "@pkgjs/parseargs": - optional: true - checksum: 10c0/6acc10d139eaefdbe04d2f679e6191b3abf073f111edf10b1de5302c97ec93fffeb2fdd8681ed17f16268aa9dd4f8c588ed9d1d3bffbbfa6e8bf897cbb3149b9 - languageName: node - linkType: hard - -"jasmine-core@npm:~5.5.0": - version: 5.5.0 - resolution: "jasmine-core@npm:5.5.0" - checksum: 10c0/9914f45ce6bcc016d61ee591a8a71dd0d88902ddf5fa887b11966040ce0916379bc4d5f446c07c58226b16f8a0f9719fa201cd92a3f07b02e8c8aa4169448600 - languageName: node - linkType: hard - -"jasmine@npm:^5.5.0": - version: 5.5.0 - resolution: "jasmine@npm:5.5.0" - dependencies: - glob: "npm:^10.2.2" - jasmine-core: "npm:~5.5.0" - bin: - jasmine: bin/jasmine.js - checksum: 10c0/3b86e6f19987c9d49092dac783ac84a0429ba3786580573d57ffdca6bc21468476613ca94748cfc282f0adbcc2810c20420bee78ef8f37a897f34dd4cd83107e - languageName: node - linkType: hard - -"js-yaml@npm:^4.1.0": - version: 4.1.0 - resolution: "js-yaml@npm:4.1.0" - dependencies: - argparse: "npm:^2.0.1" - bin: - js-yaml: bin/js-yaml.js - checksum: 10c0/184a24b4eaacfce40ad9074c64fd42ac83cf74d8c8cd137718d456ced75051229e5061b8633c3366b8aada17945a7a356b337828c19da92b51ae62126575018f - languageName: node - linkType: hard - -"jsbn@npm:1.1.0": - version: 1.1.0 - resolution: "jsbn@npm:1.1.0" - checksum: 10c0/4f907fb78d7b712e11dea8c165fe0921f81a657d3443dde75359ed52eb2b5d33ce6773d97985a089f09a65edd80b11cb75c767b57ba47391fee4c969f7215c96 - languageName: node - linkType: hard - -"json-buffer@npm:3.0.1": - version: 3.0.1 - resolution: "json-buffer@npm:3.0.1" - checksum: 10c0/0d1c91569d9588e7eef2b49b59851f297f3ab93c7b35c7c221e288099322be6b562767d11e4821da500f3219542b9afd2e54c5dc573107c1126ed1080f8e96d7 - languageName: node - linkType: hard - -"json-schema-traverse@npm:^0.4.1": - version: 0.4.1 - resolution: "json-schema-traverse@npm:0.4.1" - checksum: 10c0/108fa90d4cc6f08243aedc6da16c408daf81793bf903e9fd5ab21983cda433d5d2da49e40711da016289465ec2e62e0324dcdfbc06275a607fe3233fde4942ce - languageName: node - linkType: hard - -"json-stable-stringify-without-jsonify@npm:^1.0.1": - version: 1.0.1 - resolution: "json-stable-stringify-without-jsonify@npm:1.0.1" - checksum: 10c0/cb168b61fd4de83e58d09aaa6425ef71001bae30d260e2c57e7d09a5fd82223e2f22a042dedaab8db23b7d9ae46854b08bb1f91675a8be11c5cffebef5fb66a5 - languageName: node - linkType: hard - -"json-stringify-safe@npm:^5.0.1": - version: 5.0.1 - resolution: "json-stringify-safe@npm:5.0.1" - checksum: 10c0/7dbf35cd0411d1d648dceb6d59ce5857ec939e52e4afc37601aa3da611f0987d5cee5b38d58329ceddf3ed48bd7215229c8d52059ab01f2444a338bf24ed0f37 - languageName: node - linkType: hard - -"json5@npm:^1.0.2": - version: 1.0.2 - resolution: "json5@npm:1.0.2" - dependencies: - minimist: "npm:^1.2.0" - bin: - json5: lib/cli.js - checksum: 10c0/9ee316bf21f000b00752e6c2a3b79ecf5324515a5c60ee88983a1910a45426b643a4f3461657586e8aeca87aaf96f0a519b0516d2ae527a6c3e7eed80f68717f - languageName: node - linkType: hard - -"jsonfile@npm:^4.0.0": - version: 4.0.0 - resolution: "jsonfile@npm:4.0.0" - dependencies: - graceful-fs: "npm:^4.1.6" - dependenciesMeta: - graceful-fs: - optional: true - checksum: 10c0/7dc94b628d57a66b71fb1b79510d460d662eb975b5f876d723f81549c2e9cd316d58a2ddf742b2b93a4fa6b17b2accaf1a738a0e2ea114bdfb13a32e5377e480 - languageName: node - linkType: hard - -"keyv@npm:^4.0.0, keyv@npm:^4.5.4": - version: 4.5.4 - resolution: "keyv@npm:4.5.4" - dependencies: - json-buffer: "npm:3.0.1" - checksum: 10c0/aa52f3c5e18e16bb6324876bb8b59dd02acf782a4b789c7b2ae21107fab95fab3890ed448d4f8dba80ce05391eeac4bfabb4f02a20221342982f806fa2cf271e - languageName: node - linkType: hard - -"levn@npm:^0.4.1": - version: 0.4.1 - resolution: "levn@npm:0.4.1" - dependencies: - prelude-ls: "npm:^1.2.1" - type-check: "npm:~0.4.0" - checksum: 10c0/effb03cad7c89dfa5bd4f6989364bfc79994c2042ec5966cb9b95990e2edee5cd8969ddf42616a0373ac49fac1403437deaf6e9050fbbaa3546093a59b9ac94e - languageName: node - linkType: hard - -"locate-path@npm:^6.0.0": - version: 6.0.0 - resolution: "locate-path@npm:6.0.0" - dependencies: - p-locate: "npm:^5.0.0" - checksum: 10c0/d3972ab70dfe58ce620e64265f90162d247e87159b6126b01314dd67be43d50e96a50b517bce2d9452a79409c7614054c277b5232377de50416564a77ac7aad3 - languageName: node - linkType: hard - -"lodash.merge@npm:^4.6.2": - version: 4.6.2 - resolution: "lodash.merge@npm:4.6.2" - checksum: 10c0/402fa16a1edd7538de5b5903a90228aa48eb5533986ba7fa26606a49db2572bf414ff73a2c9f5d5fd36b31c46a5d5c7e1527749c07cbcf965ccff5fbdf32c506 - languageName: node - linkType: hard - -"log-symbols@npm:^4.1.0": - version: 4.1.0 - resolution: "log-symbols@npm:4.1.0" - dependencies: - chalk: "npm:^4.1.0" - is-unicode-supported: "npm:^0.1.0" - checksum: 10c0/67f445a9ffa76db1989d0fa98586e5bc2fd5247260dafb8ad93d9f0ccd5896d53fb830b0e54dade5ad838b9de2006c826831a3c528913093af20dff8bd24aca6 - languageName: node - linkType: hard - -"loglevel@npm:^1.9.2": - version: 1.9.2 - resolution: "loglevel@npm:1.9.2" - checksum: 10c0/1e317fa4648fe0b4a4cffef6de037340592cee8547b07d4ce97a487abe9153e704b98451100c799b032c72bb89c9366d71c9fb8192ada8703269263ae77acdc7 - languageName: node - linkType: hard - -"lowercase-keys@npm:^2.0.0": - version: 2.0.0 - resolution: "lowercase-keys@npm:2.0.0" - checksum: 10c0/f82a2b3568910509da4b7906362efa40f5b54ea14c2584778ddb313226f9cbf21020a5db35f9b9a0e95847a9b781d548601f31793d736b22a2b8ae8eb9ab1082 - languageName: node - linkType: hard - -"lru-cache@npm:^10.0.1, lru-cache@npm:^10.2.0": - version: 10.4.3 - resolution: "lru-cache@npm:10.4.3" - checksum: 10c0/ebd04fbca961e6c1d6c0af3799adcc966a1babe798f685bb84e6599266599cd95d94630b10262f5424539bc4640107e8a33aa28585374abf561d30d16f4b39fb - languageName: node - linkType: hard - -"make-error@npm:^1.1.1": - version: 1.3.6 - resolution: "make-error@npm:1.3.6" - checksum: 10c0/171e458d86854c6b3fc46610cfacf0b45149ba043782558c6875d9f42f222124384ad0b468c92e996d815a8a2003817a710c0a160e49c1c394626f76fa45396f - languageName: node - linkType: hard - -"make-fetch-happen@npm:^14.0.3": - version: 14.0.3 - resolution: "make-fetch-happen@npm:14.0.3" - dependencies: - "@npmcli/agent": "npm:^3.0.0" - cacache: "npm:^19.0.1" - http-cache-semantics: "npm:^4.1.1" - minipass: "npm:^7.0.2" - minipass-fetch: "npm:^4.0.0" - minipass-flush: "npm:^1.0.5" - minipass-pipeline: "npm:^1.2.4" - negotiator: "npm:^1.0.0" - proc-log: "npm:^5.0.0" - promise-retry: "npm:^2.0.1" - ssri: "npm:^12.0.0" - checksum: 10c0/c40efb5e5296e7feb8e37155bde8eb70bc57d731b1f7d90e35a092fde403d7697c56fb49334d92d330d6f1ca29a98142036d6480a12681133a0a1453164cb2f0 - languageName: node - linkType: hard - -"matcher@npm:^3.0.0": - version: 3.0.0 - resolution: "matcher@npm:3.0.0" - dependencies: - escape-string-regexp: "npm:^4.0.0" - checksum: 10c0/2edf24194a2879690bcdb29985fc6bc0d003df44e04df21ebcac721fa6ce2f6201c579866bb92f9380bffe946f11ecd8cd31f34117fb67ebf8aca604918e127e - languageName: node - linkType: hard - -"math-intrinsics@npm:^1.1.0": - version: 1.1.0 - resolution: "math-intrinsics@npm:1.1.0" - checksum: 10c0/7579ff94e899e2f76ab64491d76cf606274c874d8f2af4a442c016bd85688927fcfca157ba6bf74b08e9439dc010b248ce05b96cc7c126a354c3bae7fcb48b7f - languageName: node - linkType: hard - -"merge2@npm:^1.3.0": - version: 1.4.1 - resolution: "merge2@npm:1.4.1" - checksum: 10c0/254a8a4605b58f450308fc474c82ac9a094848081bf4c06778200207820e5193726dc563a0d2c16468810516a5c97d9d3ea0ca6585d23c58ccfff2403e8dbbeb - languageName: node - linkType: hard - -"micromatch@npm:^4.0.8": - version: 4.0.8 - resolution: "micromatch@npm:4.0.8" - dependencies: - braces: "npm:^3.0.3" - picomatch: "npm:^2.3.1" - checksum: 10c0/166fa6eb926b9553f32ef81f5f531d27b4ce7da60e5baf8c021d043b27a388fb95e46a8038d5045877881e673f8134122b59624d5cecbd16eb50a42e7a6b5ca8 - languageName: node - linkType: hard - -"mimic-fn@npm:^2.1.0": - version: 2.1.0 - resolution: "mimic-fn@npm:2.1.0" - checksum: 10c0/b26f5479d7ec6cc2bce275a08f146cf78f5e7b661b18114e2506dd91ec7ec47e7a25bf4360e5438094db0560bcc868079fb3b1fb3892b833c1ecbf63f80c95a4 - languageName: node - linkType: hard - -"mimic-response@npm:^1.0.0": - version: 1.0.1 - resolution: "mimic-response@npm:1.0.1" - checksum: 10c0/c5381a5eae997f1c3b5e90ca7f209ed58c3615caeee850e85329c598f0c000ae7bec40196580eef1781c60c709f47258131dab237cad8786f8f56750594f27fa - languageName: node - linkType: hard - -"mimic-response@npm:^3.1.0": - version: 3.1.0 - resolution: "mimic-response@npm:3.1.0" - checksum: 10c0/0d6f07ce6e03e9e4445bee655202153bdb8a98d67ee8dc965ac140900d7a2688343e6b4c9a72cfc9ef2f7944dfd76eef4ab2482eb7b293a68b84916bac735362 - languageName: node - linkType: hard - -"minimatch@npm:^3.0.4, minimatch@npm:^3.1.2": - version: 3.1.2 - resolution: "minimatch@npm:3.1.2" - dependencies: - brace-expansion: "npm:^1.1.7" - checksum: 10c0/0262810a8fc2e72cca45d6fd86bd349eee435eb95ac6aa45c9ea2180e7ee875ef44c32b55b5973ceabe95ea12682f6e3725cbb63d7a2d1da3ae1163c8b210311 - languageName: node - linkType: hard - -"minimatch@npm:^9.0.4": - version: 9.0.5 - resolution: "minimatch@npm:9.0.5" - dependencies: - brace-expansion: "npm:^2.0.1" - checksum: 10c0/de96cf5e35bdf0eab3e2c853522f98ffbe9a36c37797778d2665231ec1f20a9447a7e567cb640901f89e4daaa95ae5d70c65a9e8aa2bb0019b6facbc3c0575ed - languageName: node - linkType: hard - -"minimist@npm:^1.2.0, minimist@npm:^1.2.6": - version: 1.2.8 - resolution: "minimist@npm:1.2.8" - checksum: 10c0/19d3fcdca050087b84c2029841a093691a91259a47def2f18222f41e7645a0b7c44ef4b40e88a1e58a40c84d2ef0ee6047c55594d298146d0eb3f6b737c20ce6 - languageName: node - linkType: hard - -"minipass-collect@npm:^2.0.1": - version: 2.0.1 - resolution: "minipass-collect@npm:2.0.1" - dependencies: - minipass: "npm:^7.0.3" - checksum: 10c0/5167e73f62bb74cc5019594709c77e6a742051a647fe9499abf03c71dca75515b7959d67a764bdc4f8b361cf897fbf25e2d9869ee039203ed45240f48b9aa06e - languageName: node - linkType: hard - -"minipass-fetch@npm:^4.0.0": - version: 4.0.0 - resolution: "minipass-fetch@npm:4.0.0" - dependencies: - encoding: "npm:^0.1.13" - minipass: "npm:^7.0.3" - minipass-sized: "npm:^1.0.3" - minizlib: "npm:^3.0.1" - dependenciesMeta: - encoding: - optional: true - checksum: 10c0/7fa30ce7c373fb6f94c086b374fff1589fd7e78451855d2d06c2e2d9df936d131e73e952163063016592ed3081444bd8d1ea608533313b0149156ce23311da4b - languageName: node - linkType: hard - -"minipass-flush@npm:^1.0.5": - version: 1.0.5 - resolution: "minipass-flush@npm:1.0.5" - dependencies: - minipass: "npm:^3.0.0" - checksum: 10c0/2a51b63feb799d2bb34669205eee7c0eaf9dce01883261a5b77410c9408aa447e478efd191b4de6fc1101e796ff5892f8443ef20d9544385819093dbb32d36bd - languageName: node - linkType: hard - -"minipass-pipeline@npm:^1.2.4": - version: 1.2.4 - resolution: "minipass-pipeline@npm:1.2.4" - dependencies: - minipass: "npm:^3.0.0" - checksum: 10c0/cbda57cea20b140b797505dc2cac71581a70b3247b84480c1fed5ca5ba46c25ecc25f68bfc9e6dcb1a6e9017dab5c7ada5eab73ad4f0a49d84e35093e0c643f2 - languageName: node - linkType: hard - -"minipass-sized@npm:^1.0.3": - version: 1.0.3 - resolution: "minipass-sized@npm:1.0.3" - dependencies: - minipass: "npm:^3.0.0" - checksum: 10c0/298f124753efdc745cfe0f2bdfdd81ba25b9f4e753ca4a2066eb17c821f25d48acea607dfc997633ee5bf7b6dfffb4eee4f2051eb168663f0b99fad2fa4829cb - languageName: node - linkType: hard - -"minipass@npm:^3.0.0": - version: 3.3.6 - resolution: "minipass@npm:3.3.6" - dependencies: - yallist: "npm:^4.0.0" - checksum: 10c0/a114746943afa1dbbca8249e706d1d38b85ed1298b530f5808ce51f8e9e941962e2a5ad2e00eae7dd21d8a4aae6586a66d4216d1a259385e9d0358f0c1eba16c - languageName: node - linkType: hard - -"minipass@npm:^5.0.0 || ^6.0.2 || ^7.0.0, minipass@npm:^7.0.2, minipass@npm:^7.0.3, minipass@npm:^7.0.4, minipass@npm:^7.1.2": - version: 7.1.2 - resolution: "minipass@npm:7.1.2" - checksum: 10c0/b0fd20bb9fb56e5fa9a8bfac539e8915ae07430a619e4b86ff71f5fc757ef3924b23b2c4230393af1eda647ed3d75739e4e0acb250a6b1eb277cf7f8fe449557 - languageName: node - linkType: hard - -"minizlib@npm:^3.0.1": - version: 3.0.1 - resolution: "minizlib@npm:3.0.1" - dependencies: - minipass: "npm:^7.0.4" - rimraf: "npm:^5.0.5" - checksum: 10c0/82f8bf70da8af656909a8ee299d7ed3b3372636749d29e105f97f20e88971be31f5ed7642f2e898f00283b68b701cc01307401cdc209b0efc5dd3818220e5093 - languageName: node - linkType: hard - -"minizlib@npm:^3.1.0": - version: 3.1.0 - resolution: "minizlib@npm:3.1.0" - dependencies: - minipass: "npm:^7.1.2" - checksum: 10c0/5aad75ab0090b8266069c9aabe582c021ae53eb33c6c691054a13a45db3b4f91a7fb1bd79151e6b4e9e9a86727b522527c0a06ec7d45206b745d54cd3097bcec - languageName: node - linkType: hard - -"mkdirp@npm:^0.5.1": - version: 0.5.6 - resolution: "mkdirp@npm:0.5.6" - dependencies: - minimist: "npm:^1.2.6" - bin: - mkdirp: bin/cmd.js - checksum: 10c0/e2e2be789218807b58abced04e7b49851d9e46e88a2f9539242cc8a92c9b5c3a0b9bab360bd3014e02a140fc4fbc58e31176c408b493f8a2a6f4986bd7527b01 - languageName: node - linkType: hard - -"mkdirp@npm:^3.0.1": - version: 3.0.1 - resolution: "mkdirp@npm:3.0.1" - bin: - mkdirp: dist/cjs/src/bin.js - checksum: 10c0/9f2b975e9246351f5e3a40dcfac99fcd0baa31fbfab615fe059fb11e51f10e4803c63de1f384c54d656e4db31d000e4767e9ef076a22e12a641357602e31d57d - languageName: node - linkType: hard - -"ms@npm:^2.1.1, ms@npm:^2.1.3": - version: 2.1.3 - resolution: "ms@npm:2.1.3" - checksum: 10c0/d924b57e7312b3b63ad21fc5b3dc0af5e78d61a1fc7cfb5457edaf26326bf62be5307cc87ffb6862ef1c2b33b0233cdb5d4f01c4c958cc0d660948b65a287a48 - languageName: node - linkType: hard - -"natural-compare@npm:^1.4.0": - version: 1.4.0 - resolution: "natural-compare@npm:1.4.0" - checksum: 10c0/f5f9a7974bfb28a91afafa254b197f0f22c684d4a1731763dda960d2c8e375b36c7d690e0d9dc8fba774c537af14a7e979129bca23d88d052fbeb9466955e447 - languageName: node - linkType: hard - -"negotiator@npm:^1.0.0": - version: 1.0.0 - resolution: "negotiator@npm:1.0.0" - checksum: 10c0/4c559dd52669ea48e1914f9d634227c561221dd54734070791f999c52ed0ff36e437b2e07d5c1f6e32909fc625fe46491c16e4a8f0572567d4dd15c3a4fda04b - languageName: node - linkType: hard - -"node-abi@npm:^4.2.0": - version: 4.28.0 - resolution: "node-abi@npm:4.28.0" - dependencies: - semver: "npm:^7.6.3" - checksum: 10c0/d734dc7d25247fdd7bba7f1f12ddadc23c6ada9c639cf2cd2b11a6e568591c82f609e41bf740077b838f2eb88ff4d9489eb111eef4e530c8dbdb41355e6f0343 - languageName: node - linkType: hard - -"node-api-version@npm:^0.2.1": - version: 0.2.1 - resolution: "node-api-version@npm:0.2.1" - dependencies: - semver: "npm:^7.3.5" - checksum: 10c0/3fe6c273e4f9dd184bb8b959ba3d8afae7eade663611d82c8538c79ac3a7b8f1d136632ceb4bf8cdc46a851fc169407746996cf7d1096de9a186e0e70fca95fa - languageName: node - linkType: hard - -"node-gyp@npm:^11.2.0": - version: 11.5.0 - resolution: "node-gyp@npm:11.5.0" - dependencies: - env-paths: "npm:^2.2.0" - exponential-backoff: "npm:^3.1.1" - graceful-fs: "npm:^4.2.6" - make-fetch-happen: "npm:^14.0.3" - nopt: "npm:^8.0.0" - proc-log: "npm:^5.0.0" - semver: "npm:^7.3.5" - tar: "npm:^7.4.3" - tinyglobby: "npm:^0.2.12" - which: "npm:^5.0.0" - bin: - node-gyp: bin/node-gyp.js - checksum: 10c0/31ff49586991b38287bb15c3d529dd689cfc32f992eed9e6997b9d712d5d21fe818a8b1bbfe3b76a7e33765c20210c5713212f4aa329306a615b87d8a786da3a - languageName: node - linkType: hard - -"nopt@npm:^8.0.0": - version: 8.1.0 - resolution: "nopt@npm:8.1.0" - dependencies: - abbrev: "npm:^3.0.0" - bin: - nopt: bin/nopt.js - checksum: 10c0/62e9ea70c7a3eb91d162d2c706b6606c041e4e7b547cbbb48f8b3695af457dd6479904d7ace600856bf923dd8d1ed0696f06195c8c20f02ac87c1da0e1d315ef - languageName: node - linkType: hard - -"normalize-url@npm:^6.0.1": - version: 6.1.0 - resolution: "normalize-url@npm:6.1.0" - checksum: 10c0/95d948f9bdd2cfde91aa786d1816ae40f8262946e13700bf6628105994fe0ff361662c20af3961161c38a119dc977adeb41fc0b41b1745eb77edaaf9cb22db23 - languageName: node - linkType: hard - -"object-inspect@npm:^1.13.3": - version: 1.13.3 - resolution: "object-inspect@npm:1.13.3" - checksum: 10c0/cc3f15213406be89ffdc54b525e115156086796a515410a8d390215915db9f23c8eab485a06f1297402f440a33715fe8f71a528c1dcbad6e1a3bcaf5a46921d4 - languageName: node - linkType: hard - -"object-keys@npm:^1.1.1": - version: 1.1.1 - resolution: "object-keys@npm:1.1.1" - checksum: 10c0/b11f7ccdbc6d406d1f186cdadb9d54738e347b2692a14439ca5ac70c225fa6db46db809711b78589866d47b25fc3e8dee0b4c722ac751e11180f9380e3d8601d - languageName: node - linkType: hard - -"object.assign@npm:^4.1.7": - version: 4.1.7 - resolution: "object.assign@npm:4.1.7" - dependencies: - call-bind: "npm:^1.0.8" - call-bound: "npm:^1.0.3" - define-properties: "npm:^1.2.1" - es-object-atoms: "npm:^1.0.0" - has-symbols: "npm:^1.1.0" - object-keys: "npm:^1.1.1" - checksum: 10c0/3b2732bd860567ea2579d1567525168de925a8d852638612846bd8082b3a1602b7b89b67b09913cbb5b9bd6e95923b2ae73580baa9d99cb4e990564e8cbf5ddc - languageName: node - linkType: hard - -"object.fromentries@npm:^2.0.8": - version: 2.0.8 - resolution: "object.fromentries@npm:2.0.8" - dependencies: - call-bind: "npm:^1.0.7" - define-properties: "npm:^1.2.1" - es-abstract: "npm:^1.23.2" - es-object-atoms: "npm:^1.0.0" - checksum: 10c0/cd4327e6c3369cfa805deb4cbbe919bfb7d3aeebf0bcaba291bb568ea7169f8f8cdbcabe2f00b40db0c20cd20f08e11b5f3a5a36fb7dd3fe04850c50db3bf83b - languageName: node - linkType: hard - -"object.groupby@npm:^1.0.3": - version: 1.0.3 - resolution: "object.groupby@npm:1.0.3" - dependencies: - call-bind: "npm:^1.0.7" - define-properties: "npm:^1.2.1" - es-abstract: "npm:^1.23.2" - checksum: 10c0/60d0455c85c736fbfeda0217d1a77525956f76f7b2495edeca9e9bbf8168a45783199e77b894d30638837c654d0cc410e0e02cbfcf445bc8de71c3da1ede6a9c - languageName: node - linkType: hard - -"object.values@npm:^1.2.0": - version: 1.2.1 - resolution: "object.values@npm:1.2.1" - dependencies: - call-bind: "npm:^1.0.8" - call-bound: "npm:^1.0.3" - define-properties: "npm:^1.2.1" - es-object-atoms: "npm:^1.0.0" - checksum: 10c0/3c47814fdc64842ae3d5a74bc9d06bdd8d21563c04d9939bf6716a9c00596a4ebc342552f8934013d1ec991c74e3671b26710a0c51815f0b603795605ab6b2c9 - languageName: node - linkType: hard - -"once@npm:^1.3.1, once@npm:^1.4.0": - version: 1.4.0 - resolution: "once@npm:1.4.0" - dependencies: - wrappy: "npm:1" - checksum: 10c0/5d48aca287dfefabd756621c5dfce5c91a549a93e9fdb7b8246bc4c4790aa2ec17b34a260530474635147aeb631a2dcc8b32c613df0675f96041cbb8244517d0 - languageName: node - linkType: hard - -"onetime@npm:^5.1.0": - version: 5.1.2 - resolution: "onetime@npm:5.1.2" - dependencies: - mimic-fn: "npm:^2.1.0" - checksum: 10c0/ffcef6fbb2692c3c40749f31ea2e22677a876daea92959b8a80b521d95cca7a668c884d8b2045d1d8ee7d56796aa405c405462af112a1477594cc63531baeb8f - languageName: node - linkType: hard - -"optionator@npm:^0.9.3": - version: 0.9.4 - resolution: "optionator@npm:0.9.4" - dependencies: - deep-is: "npm:^0.1.3" - fast-levenshtein: "npm:^2.0.6" - levn: "npm:^0.4.1" - prelude-ls: "npm:^1.2.1" - type-check: "npm:^0.4.0" - word-wrap: "npm:^1.2.5" - checksum: 10c0/4afb687a059ee65b61df74dfe87d8d6815cd6883cb8b3d5883a910df72d0f5d029821f37025e4bccf4048873dbdb09acc6d303d27b8f76b1a80dd5a7d5334675 - languageName: node - linkType: hard - -"ora@npm:^5.1.0": - version: 5.4.1 - resolution: "ora@npm:5.4.1" - dependencies: - bl: "npm:^4.1.0" - chalk: "npm:^4.1.0" - cli-cursor: "npm:^3.1.0" - cli-spinners: "npm:^2.5.0" - is-interactive: "npm:^1.0.0" - is-unicode-supported: "npm:^0.1.0" - log-symbols: "npm:^4.1.0" - strip-ansi: "npm:^6.0.0" - wcwidth: "npm:^1.0.1" - checksum: 10c0/10ff14aace236d0e2f044193362b22edce4784add08b779eccc8f8ef97195cae1248db8ec1ec5f5ff076f91acbe573f5f42a98c19b78dba8c54eefff983cae85 - languageName: node - linkType: hard - -"own-keys@npm:^1.0.1": - version: 1.0.1 - resolution: "own-keys@npm:1.0.1" - dependencies: - get-intrinsic: "npm:^1.2.6" - object-keys: "npm:^1.1.1" - safe-push-apply: "npm:^1.0.0" - checksum: 10c0/6dfeb3455bff92ec3f16a982d4e3e65676345f6902d9f5ded1d8265a6318d0200ce461956d6d1c70053c7fe9f9fe65e552faac03f8140d37ef0fdd108e67013a - languageName: node - linkType: hard - -"p-cancelable@npm:^2.0.0": - version: 2.1.1 - resolution: "p-cancelable@npm:2.1.1" - checksum: 10c0/8c6dc1f8dd4154fd8b96a10e55a3a832684c4365fb9108056d89e79fbf21a2465027c04a59d0d797b5ffe10b54a61a32043af287d5c4860f1e996cbdbc847f01 - languageName: node - linkType: hard - -"p-limit@npm:^3.0.2": - version: 3.1.0 - resolution: "p-limit@npm:3.1.0" - dependencies: - yocto-queue: "npm:^0.1.0" - checksum: 10c0/9db675949dbdc9c3763c89e748d0ef8bdad0afbb24d49ceaf4c46c02c77d30db4e0652ed36d0a0a7a95154335fab810d95c86153105bb73b3a90448e2bb14e1a - languageName: node - linkType: hard - -"p-locate@npm:^5.0.0": - version: 5.0.0 - resolution: "p-locate@npm:5.0.0" - dependencies: - p-limit: "npm:^3.0.2" - checksum: 10c0/2290d627ab7903b8b70d11d384fee714b797f6040d9278932754a6860845c4d3190603a0772a663c8cb5a7b21d1b16acb3a6487ebcafa9773094edc3dfe6009a - languageName: node - linkType: hard - -"p-map@npm:^7.0.2": - version: 7.0.3 - resolution: "p-map@npm:7.0.3" - checksum: 10c0/46091610da2b38ce47bcd1d8b4835a6fa4e832848a6682cf1652bc93915770f4617afc844c10a77d1b3e56d2472bb2d5622353fa3ead01a7f42b04fc8e744a5c - languageName: node - linkType: hard - -"package-json-from-dist@npm:^1.0.0": - version: 1.0.1 - resolution: "package-json-from-dist@npm:1.0.1" - checksum: 10c0/62ba2785eb655fec084a257af34dbe24292ab74516d6aecef97ef72d4897310bc6898f6c85b5cd22770eaa1ce60d55a0230e150fb6a966e3ecd6c511e23d164b - languageName: node - linkType: hard - -"parent-module@npm:^1.0.0": - version: 1.0.1 - resolution: "parent-module@npm:1.0.1" - dependencies: - callsites: "npm:^3.0.0" - checksum: 10c0/c63d6e80000d4babd11978e0d3fee386ca7752a02b035fd2435960ffaa7219dc42146f07069fb65e6e8bf1caef89daf9af7535a39bddf354d78bf50d8294f556 - languageName: node - linkType: hard - -"path-exists@npm:^4.0.0": - version: 4.0.0 - resolution: "path-exists@npm:4.0.0" - checksum: 10c0/8c0bd3f5238188197dc78dced15207a4716c51cc4e3624c44fc97acf69558f5ebb9a2afff486fe1b4ee148e0c133e96c5e11a9aa5c48a3006e3467da070e5e1b - languageName: node - linkType: hard - -"path-key@npm:^3.1.0": - version: 3.1.1 - resolution: "path-key@npm:3.1.1" - checksum: 10c0/748c43efd5a569c039d7a00a03b58eecd1d75f3999f5a28303d75f521288df4823bc057d8784eb72358b2895a05f29a070bc9f1f17d28226cc4e62494cc58c4c - languageName: node - linkType: hard - -"path-parse@npm:^1.0.7": - version: 1.0.7 - resolution: "path-parse@npm:1.0.7" - checksum: 10c0/11ce261f9d294cc7a58d6a574b7f1b935842355ec66fba3c3fd79e0f036462eaf07d0aa95bb74ff432f9afef97ce1926c720988c6a7451d8a584930ae7de86e1 - languageName: node - linkType: hard - -"path-scurry@npm:^1.11.1": - version: 1.11.1 - resolution: "path-scurry@npm:1.11.1" - dependencies: - lru-cache: "npm:^10.2.0" - minipass: "npm:^5.0.0 || ^6.0.2 || ^7.0.0" - checksum: 10c0/32a13711a2a505616ae1cc1b5076801e453e7aae6ac40ab55b388bb91b9d0547a52f5aaceff710ea400205f18691120d4431e520afbe4266b836fadede15872d - languageName: node - linkType: hard - -"pend@npm:~1.2.0": - version: 1.2.0 - resolution: "pend@npm:1.2.0" - checksum: 10c0/8a87e63f7a4afcfb0f9f77b39bb92374afc723418b9cb716ee4257689224171002e07768eeade4ecd0e86f1fa3d8f022994219fb45634f2dbd78c6803e452458 - languageName: node - linkType: hard - -"picomatch@npm:^2.3.1": - version: 2.3.1 - resolution: "picomatch@npm:2.3.1" - checksum: 10c0/26c02b8d06f03206fc2ab8d16f19960f2ff9e81a658f831ecb656d8f17d9edc799e8364b1f4a7873e89d9702dff96204be0fa26fe4181f6843f040f819dac4be - languageName: node - linkType: hard - -"picomatch@npm:^4.0.3": - version: 4.0.3 - resolution: "picomatch@npm:4.0.3" - checksum: 10c0/9582c951e95eebee5434f59e426cddd228a7b97a0161a375aed4be244bd3fe8e3a31b846808ea14ef2c8a2527a6eeab7b3946a67d5979e81694654f939473ae2 - languageName: node - linkType: hard - -"platform@link:../../../platform::locator=rustcore%40workspace%3A.": - version: 0.0.0-use.local - resolution: "platform@link:../../../platform::locator=rustcore%40workspace%3A." - languageName: node - linkType: soft - -"possible-typed-array-names@npm:^1.0.0": - version: 1.0.0 - resolution: "possible-typed-array-names@npm:1.0.0" - checksum: 10c0/d9aa22d31f4f7680e20269db76791b41c3a32c01a373e25f8a4813b4d45f7456bfc2b6d68f752dc4aab0e0bb0721cb3d76fb678c9101cb7a16316664bc2c73fd - languageName: node - linkType: hard - -"prelude-ls@npm:^1.2.1": - version: 1.2.1 - resolution: "prelude-ls@npm:1.2.1" - checksum: 10c0/b00d617431e7886c520a6f498a2e14c75ec58f6d93ba48c3b639cf241b54232d90daa05d83a9e9b9fef6baa63cb7e1e4602c2372fea5bc169668401eb127d0cd - languageName: node - linkType: hard - -"proc-log@npm:^5.0.0": - version: 5.0.0 - resolution: "proc-log@npm:5.0.0" - checksum: 10c0/bbe5edb944b0ad63387a1d5b1911ae93e05ce8d0f60de1035b218cdcceedfe39dbd2c697853355b70f1a090f8f58fe90da487c85216bf9671f9499d1a897e9e3 - languageName: node - linkType: hard - -"progress@npm:^2.0.3": - version: 2.0.3 - resolution: "progress@npm:2.0.3" - checksum: 10c0/1697e07cb1068055dbe9fe858d242368ff5d2073639e652b75a7eb1f2a1a8d4afd404d719de23c7b48481a6aa0040686310e2dac2f53d776daa2176d3f96369c - languageName: node - linkType: hard - -"promise-retry@npm:^2.0.1": - version: 2.0.1 - resolution: "promise-retry@npm:2.0.1" - dependencies: - err-code: "npm:^2.0.2" - retry: "npm:^0.12.0" - checksum: 10c0/9c7045a1a2928094b5b9b15336dcd2a7b1c052f674550df63cc3f36cd44028e5080448175b6f6ca32b642de81150f5e7b1a98b728f15cb069f2dd60ac2616b96 - languageName: node - linkType: hard - -"protocol@link:../../protocol/pkg::locator=rustcore%40workspace%3A.": - version: 0.0.0-use.local - resolution: "protocol@link:../../protocol/pkg::locator=rustcore%40workspace%3A." - languageName: node - linkType: soft - -"pump@npm:^3.0.0": - version: 3.0.2 - resolution: "pump@npm:3.0.2" - dependencies: - end-of-stream: "npm:^1.1.0" - once: "npm:^1.3.1" - checksum: 10c0/5ad655cb2a7738b4bcf6406b24ad0970d680649d996b55ad20d1be8e0c02394034e4c45ff7cd105d87f1e9b96a0e3d06fd28e11fae8875da26e7f7a8e2c9726f - languageName: node - linkType: hard - -"punycode@npm:^2.1.0": - version: 2.3.1 - resolution: "punycode@npm:2.3.1" - checksum: 10c0/14f76a8206bc3464f794fb2e3d3cc665ae416c01893ad7a02b23766eb07159144ee612ad67af5e84fa4479ccfe67678c4feb126b0485651b302babf66f04f9e9 - languageName: node - linkType: hard - -"queue-microtask@npm:^1.2.2": - version: 1.2.3 - resolution: "queue-microtask@npm:1.2.3" - checksum: 10c0/900a93d3cdae3acd7d16f642c29a642aea32c2026446151f0778c62ac089d4b8e6c986811076e1ae180a694cedf077d453a11b58ff0a865629a4f82ab558e102 - languageName: node - linkType: hard - -"quick-lru@npm:^5.1.1": - version: 5.1.1 - resolution: "quick-lru@npm:5.1.1" - checksum: 10c0/a24cba5da8cec30d70d2484be37622580f64765fb6390a928b17f60cd69e8dbd32a954b3ff9176fa1b86d86ff2ba05252fae55dc4d40d0291c60412b0ad096da - languageName: node - linkType: hard - -"read-binary-file-arch@npm:^1.0.6": - version: 1.0.6 - resolution: "read-binary-file-arch@npm:1.0.6" - dependencies: - debug: "npm:^4.3.4" - bin: - read-binary-file-arch: cli.js - checksum: 10c0/7665cb4ec61da1f4da7ba6c0fb64f53f6e739373d427dd0e1c4d19f240b3ebff0f596377c01e290a6370f611899b82df09edafa758200bf31216d855e3230058 - languageName: node - linkType: hard - -"readable-stream@npm:^3.4.0": - version: 3.6.2 - resolution: "readable-stream@npm:3.6.2" - dependencies: - inherits: "npm:^2.0.3" - string_decoder: "npm:^1.1.1" - util-deprecate: "npm:^1.0.1" - checksum: 10c0/e37be5c79c376fdd088a45fa31ea2e423e5d48854be7a22a58869b4e84d25047b193f6acb54f1012331e1bcd667ffb569c01b99d36b0bd59658fb33f513511b7 - languageName: node - linkType: hard - -"reflect.getprototypeof@npm:^1.0.6, reflect.getprototypeof@npm:^1.0.9": - version: 1.0.10 - resolution: "reflect.getprototypeof@npm:1.0.10" - dependencies: - call-bind: "npm:^1.0.8" - define-properties: "npm:^1.2.1" - es-abstract: "npm:^1.23.9" - es-errors: "npm:^1.3.0" - es-object-atoms: "npm:^1.0.0" - get-intrinsic: "npm:^1.2.7" - get-proto: "npm:^1.0.1" - which-builtin-type: "npm:^1.2.1" - checksum: 10c0/7facec28c8008876f8ab98e80b7b9cb4b1e9224353fd4756dda5f2a4ab0d30fa0a5074777c6df24e1e0af463a2697513b0a11e548d99cf52f21f7bc6ba48d3ac - languageName: node - linkType: hard - -"regexp.prototype.flags@npm:^1.5.3": - version: 1.5.4 - resolution: "regexp.prototype.flags@npm:1.5.4" - dependencies: - call-bind: "npm:^1.0.8" - define-properties: "npm:^1.2.1" - es-errors: "npm:^1.3.0" - get-proto: "npm:^1.0.1" - gopd: "npm:^1.2.0" - set-function-name: "npm:^2.0.2" - checksum: 10c0/83b88e6115b4af1c537f8dabf5c3744032cb875d63bc05c288b1b8c0ef37cbe55353f95d8ca817e8843806e3e150b118bc624e4279b24b4776b4198232735a77 - languageName: node - linkType: hard - -"regexpp@npm:^3.0.0": - version: 3.2.0 - resolution: "regexpp@npm:3.2.0" - checksum: 10c0/d1da82385c8754a1681416b90b9cca0e21b4a2babef159099b88f640637d789c69011d0bc94705dacab85b81133e929d027d85210e8b8b03f8035164dbc14710 - languageName: node - linkType: hard - -"require-directory@npm:^2.1.1": - version: 2.1.1 - resolution: "require-directory@npm:2.1.1" - checksum: 10c0/83aa76a7bc1531f68d92c75a2ca2f54f1b01463cb566cf3fbc787d0de8be30c9dbc211d1d46be3497dac5785fe296f2dd11d531945ac29730643357978966e99 - languageName: node - linkType: hard - -"resolve-alpn@npm:^1.0.0": - version: 1.2.1 - resolution: "resolve-alpn@npm:1.2.1" - checksum: 10c0/b70b29c1843bc39781ef946c8cd4482e6d425976599c0f9c138cec8209e4e0736161bf39319b01676a847000085dfdaf63583c6fb4427bf751a10635bd2aa0c4 - languageName: node - linkType: hard - -"resolve-from@npm:^4.0.0": - version: 4.0.0 - resolution: "resolve-from@npm:4.0.0" - checksum: 10c0/8408eec31a3112ef96e3746c37be7d64020cda07c03a920f5024e77290a218ea758b26ca9529fd7b1ad283947f34b2291c1c0f6aa0ed34acfdda9c6014c8d190 - languageName: node - linkType: hard - -"resolve@npm:^1.10.1, resolve@npm:^1.22.4": - version: 1.22.10 - resolution: "resolve@npm:1.22.10" - dependencies: - is-core-module: "npm:^2.16.0" - path-parse: "npm:^1.0.7" - supports-preserve-symlinks-flag: "npm:^1.0.0" - bin: - resolve: bin/resolve - checksum: 10c0/8967e1f4e2cc40f79b7e080b4582b9a8c5ee36ffb46041dccb20e6461161adf69f843b43067b4a375de926a2cd669157e29a29578191def399dd5ef89a1b5203 - languageName: node - linkType: hard - -"resolve@patch:resolve@npm%3A^1.10.1#optional!builtin, resolve@patch:resolve@npm%3A^1.22.4#optional!builtin": - version: 1.22.10 - resolution: "resolve@patch:resolve@npm%3A1.22.10#optional!builtin::version=1.22.10&hash=c3c19d" - dependencies: - is-core-module: "npm:^2.16.0" - path-parse: "npm:^1.0.7" - supports-preserve-symlinks-flag: "npm:^1.0.0" - bin: - resolve: bin/resolve - checksum: 10c0/52a4e505bbfc7925ac8f4cd91fd8c4e096b6a89728b9f46861d3b405ac9a1ccf4dcbf8befb4e89a2e11370dacd0160918163885cbc669369590f2f31f4c58939 - languageName: node - linkType: hard - -"responselike@npm:^2.0.0": - version: 2.0.1 - resolution: "responselike@npm:2.0.1" - dependencies: - lowercase-keys: "npm:^2.0.0" - checksum: 10c0/360b6deb5f101a9f8a4174f7837c523c3ec78b7ca8a7c1d45a1062b303659308a23757e318b1e91ed8684ad1205721142dd664d94771cd63499353fd4ee732b5 - languageName: node - linkType: hard - -"restore-cursor@npm:^3.1.0": - version: 3.1.0 - resolution: "restore-cursor@npm:3.1.0" - dependencies: - onetime: "npm:^5.1.0" - signal-exit: "npm:^3.0.2" - checksum: 10c0/8051a371d6aa67ff21625fa94e2357bd81ffdc96267f3fb0fc4aaf4534028343836548ef34c240ffa8c25b280ca35eb36be00b3cb2133fa4f51896d7e73c6b4f - languageName: node - linkType: hard - -"retry@npm:^0.12.0": - version: 0.12.0 - resolution: "retry@npm:0.12.0" - checksum: 10c0/59933e8501727ba13ad73ef4a04d5280b3717fd650408460c987392efe9d7be2040778ed8ebe933c5cbd63da3dcc37919c141ef8af0a54a6e4fca5a2af177bfe - languageName: node - linkType: hard - -"reusify@npm:^1.0.4": - version: 1.0.4 - resolution: "reusify@npm:1.0.4" - checksum: 10c0/c19ef26e4e188f408922c46f7ff480d38e8dfc55d448310dfb518736b23ed2c4f547fb64a6ed5bdba92cd7e7ddc889d36ff78f794816d5e71498d645ef476107 - languageName: node - linkType: hard - -"rimraf@npm:^5.0.5": - version: 5.0.10 - resolution: "rimraf@npm:5.0.10" - dependencies: - glob: "npm:^10.3.7" - bin: - rimraf: dist/esm/bin.mjs - checksum: 10c0/7da4fd0e15118ee05b918359462cfa1e7fe4b1228c7765195a45b55576e8c15b95db513b8466ec89129666f4af45ad978a3057a02139afba1a63512a2d9644cc - languageName: node - linkType: hard - -"roarr@npm:^2.15.3": - version: 2.15.4 - resolution: "roarr@npm:2.15.4" - dependencies: - boolean: "npm:^3.0.1" - detect-node: "npm:^2.0.4" - globalthis: "npm:^1.0.1" - json-stringify-safe: "npm:^5.0.1" - semver-compare: "npm:^1.0.0" - sprintf-js: "npm:^1.1.2" - checksum: 10c0/7d01d4c14513c461778dd673a8f9e53255221f8d04173aafeb8e11b23d8b659bb83f1c90cfe81af7f9c213b8084b404b918108fd792bda76678f555340cc64ec - languageName: node - linkType: hard - -"run-parallel@npm:^1.1.9": - version: 1.2.0 - resolution: "run-parallel@npm:1.2.0" - dependencies: - queue-microtask: "npm:^1.2.2" - checksum: 10c0/200b5ab25b5b8b7113f9901bfe3afc347e19bb7475b267d55ad0eb86a62a46d77510cb0f232507c9e5d497ebda569a08a9867d0d14f57a82ad5564d991588b39 - languageName: node - linkType: hard - -"rustcore@workspace:.": - version: 0.0.0-use.local - resolution: "rustcore@workspace:." - dependencies: - "@electron/rebuild": "npm:^4.0.3" - "@types/jasmine": "npm:^5.1.5" - "@types/node": "npm:^22.10.10" - "@types/tmp": "npm:^0.2.4" - "@types/uuid": "npm:^10.0.0" - "@typescript-eslint/eslint-plugin": "npm:^8.21.0" - "@typescript-eslint/parser": "npm:^8.21.0" - custom.stdout: "npm:^1.0.2" - electron: "npm:^34.0.1" - electron-build-env: "npm:0.2.0" - eslint: "npm:^9.18.0" - eslint-plugin-import: "npm:^2.31.0" - eslint-plugin-node: "npm:^11.1.0" - eslint-plugin-promise: "npm:^7.2.1" - jasmine: "npm:^5.5.0" - loglevel: "npm:^1.9.2" - platform: "link:../../../platform" - protocol: "link:../../protocol/pkg" - tmp: "npm:^0.2.3" - ts-node: "npm:^10.4.0" - tslib: "npm:^2.8.1" - typescript: "npm:^5.7.3" - uuid: "npm:^11.0.5" - languageName: unknown - linkType: soft - -"safe-array-concat@npm:^1.1.3": - version: 1.1.3 - resolution: "safe-array-concat@npm:1.1.3" - dependencies: - call-bind: "npm:^1.0.8" - call-bound: "npm:^1.0.2" - get-intrinsic: "npm:^1.2.6" - has-symbols: "npm:^1.1.0" - isarray: "npm:^2.0.5" - checksum: 10c0/43c86ffdddc461fb17ff8a17c5324f392f4868f3c7dd2c6a5d9f5971713bc5fd755667212c80eab9567595f9a7509cc2f83e590ddaebd1bd19b780f9c79f9a8d - languageName: node - linkType: hard - -"safe-buffer@npm:~5.2.0": - version: 5.2.1 - resolution: "safe-buffer@npm:5.2.1" - checksum: 10c0/6501914237c0a86e9675d4e51d89ca3c21ffd6a31642efeba25ad65720bce6921c9e7e974e5be91a786b25aa058b5303285d3c15dbabf983a919f5f630d349f3 - languageName: node - linkType: hard - -"safe-push-apply@npm:^1.0.0": - version: 1.0.0 - resolution: "safe-push-apply@npm:1.0.0" - dependencies: - es-errors: "npm:^1.3.0" - isarray: "npm:^2.0.5" - checksum: 10c0/831f1c9aae7436429e7862c7e46f847dfe490afac20d0ee61bae06108dbf5c745a0de3568ada30ccdd3eeb0864ca8331b2eef703abd69bfea0745b21fd320750 - languageName: node - linkType: hard - -"safe-regex-test@npm:^1.1.0": - version: 1.1.0 - resolution: "safe-regex-test@npm:1.1.0" - dependencies: - call-bound: "npm:^1.0.2" - es-errors: "npm:^1.3.0" - is-regex: "npm:^1.2.1" - checksum: 10c0/f2c25281bbe5d39cddbbce7f86fca5ea9b3ce3354ea6cd7c81c31b006a5a9fff4286acc5450a3b9122c56c33eba69c56b9131ad751457b2b4a585825e6a10665 - languageName: node - linkType: hard - -"safer-buffer@npm:>= 2.1.2 < 3.0.0": - version: 2.1.2 - resolution: "safer-buffer@npm:2.1.2" - checksum: 10c0/7e3c8b2e88a1841c9671094bbaeebd94448111dd90a81a1f606f3f67708a6ec57763b3b47f06da09fc6054193e0e6709e77325415dc8422b04497a8070fa02d4 - languageName: node - linkType: hard - -"semver-compare@npm:^1.0.0": - version: 1.0.0 - resolution: "semver-compare@npm:1.0.0" - checksum: 10c0/9ef4d8b81847556f0865f46ddc4d276bace118c7cb46811867af82e837b7fc473911981d5a0abc561fa2db487065572217e5b06e18701c4281bcdd2a1affaff1 - languageName: node - linkType: hard - -"semver@npm:^6.1.0, semver@npm:^6.2.0, semver@npm:^6.3.1": - version: 6.3.1 - resolution: "semver@npm:6.3.1" - bin: - semver: bin/semver.js - checksum: 10c0/e3d79b609071caa78bcb6ce2ad81c7966a46a7431d9d58b8800cfa9cb6a63699b3899a0e4bcce36167a284578212d9ae6942b6929ba4aa5015c079a67751d42d - languageName: node - linkType: hard - -"semver@npm:^7.3.2, semver@npm:^7.3.5, semver@npm:^7.6.0": - version: 7.6.3 - resolution: "semver@npm:7.6.3" - bin: - semver: bin/semver.js - checksum: 10c0/88f33e148b210c153873cb08cfe1e281d518aaa9a666d4d148add6560db5cd3c582f3a08ccb91f38d5f379ead256da9931234ed122057f40bb5766e65e58adaf - languageName: node - linkType: hard - -"semver@npm:^7.6.3": - version: 7.7.4 - resolution: "semver@npm:7.7.4" - bin: - semver: bin/semver.js - checksum: 10c0/5215ad0234e2845d4ea5bb9d836d42b03499546ddafb12075566899fc617f68794bb6f146076b6881d755de17d6c6cc73372555879ec7dce2c2feee947866ad2 - languageName: node - linkType: hard - -"serialize-error@npm:^7.0.1": - version: 7.0.1 - resolution: "serialize-error@npm:7.0.1" - dependencies: - type-fest: "npm:^0.13.1" - checksum: 10c0/7982937d578cd901276c8ab3e2c6ed8a4c174137730f1fb0402d005af209a0e84d04acc874e317c936724c7b5b26c7a96ff7e4b8d11a469f4924a4b0ea814c05 - languageName: node - linkType: hard - -"set-function-length@npm:^1.2.2": - version: 1.2.2 - resolution: "set-function-length@npm:1.2.2" - dependencies: - define-data-property: "npm:^1.1.4" - es-errors: "npm:^1.3.0" - function-bind: "npm:^1.1.2" - get-intrinsic: "npm:^1.2.4" - gopd: "npm:^1.0.1" - has-property-descriptors: "npm:^1.0.2" - checksum: 10c0/82850e62f412a258b71e123d4ed3873fa9377c216809551192bb6769329340176f109c2eeae8c22a8d386c76739855f78e8716515c818bcaef384b51110f0f3c - languageName: node - linkType: hard - -"set-function-name@npm:^2.0.2": - version: 2.0.2 - resolution: "set-function-name@npm:2.0.2" - dependencies: - define-data-property: "npm:^1.1.4" - es-errors: "npm:^1.3.0" - functions-have-names: "npm:^1.2.3" - has-property-descriptors: "npm:^1.0.2" - checksum: 10c0/fce59f90696c450a8523e754abb305e2b8c73586452619c2bad5f7bf38c7b6b4651895c9db895679c5bef9554339cf3ef1c329b66ece3eda7255785fbe299316 - languageName: node - linkType: hard - -"set-proto@npm:^1.0.0": - version: 1.0.0 - resolution: "set-proto@npm:1.0.0" - dependencies: - dunder-proto: "npm:^1.0.1" - es-errors: "npm:^1.3.0" - es-object-atoms: "npm:^1.0.0" - checksum: 10c0/ca5c3ccbba479d07c30460e367e66337cec825560b11e8ba9c5ebe13a2a0d6021ae34eddf94ff3dfe17a3104dc1f191519cb6c48378b503e5c3f36393938776a - languageName: node - linkType: hard - -"shebang-command@npm:^2.0.0": - version: 2.0.0 - resolution: "shebang-command@npm:2.0.0" - dependencies: - shebang-regex: "npm:^3.0.0" - checksum: 10c0/a41692e7d89a553ef21d324a5cceb5f686d1f3c040759c50aab69688634688c5c327f26f3ecf7001ebfd78c01f3c7c0a11a7c8bfd0a8bc9f6240d4f40b224e4e - languageName: node - linkType: hard - -"shebang-regex@npm:^3.0.0": - version: 3.0.0 - resolution: "shebang-regex@npm:3.0.0" - checksum: 10c0/1dbed0726dd0e1152a92696c76c7f06084eb32a90f0528d11acd764043aacf76994b2fb30aa1291a21bd019d6699164d048286309a278855ee7bec06cf6fb690 - languageName: node - linkType: hard - -"side-channel-list@npm:^1.0.0": - version: 1.0.0 - resolution: "side-channel-list@npm:1.0.0" - dependencies: - es-errors: "npm:^1.3.0" - object-inspect: "npm:^1.13.3" - checksum: 10c0/644f4ac893456c9490ff388bf78aea9d333d5e5bfc64cfb84be8f04bf31ddc111a8d4b83b85d7e7e8a7b845bc185a9ad02c052d20e086983cf59f0be517d9b3d - languageName: node - linkType: hard - -"side-channel-map@npm:^1.0.1": - version: 1.0.1 - resolution: "side-channel-map@npm:1.0.1" - dependencies: - call-bound: "npm:^1.0.2" - es-errors: "npm:^1.3.0" - get-intrinsic: "npm:^1.2.5" - object-inspect: "npm:^1.13.3" - checksum: 10c0/010584e6444dd8a20b85bc926d934424bd809e1a3af941cace229f7fdcb751aada0fb7164f60c2e22292b7fa3c0ff0bce237081fd4cdbc80de1dc68e95430672 - languageName: node - linkType: hard - -"side-channel-weakmap@npm:^1.0.2": - version: 1.0.2 - resolution: "side-channel-weakmap@npm:1.0.2" - dependencies: - call-bound: "npm:^1.0.2" - es-errors: "npm:^1.3.0" - get-intrinsic: "npm:^1.2.5" - object-inspect: "npm:^1.13.3" - side-channel-map: "npm:^1.0.1" - checksum: 10c0/71362709ac233e08807ccd980101c3e2d7efe849edc51455030327b059f6c4d292c237f94dc0685031dd11c07dd17a68afde235d6cf2102d949567f98ab58185 - languageName: node - linkType: hard - -"side-channel@npm:^1.1.0": - version: 1.1.0 - resolution: "side-channel@npm:1.1.0" - dependencies: - es-errors: "npm:^1.3.0" - object-inspect: "npm:^1.13.3" - side-channel-list: "npm:^1.0.0" - side-channel-map: "npm:^1.0.1" - side-channel-weakmap: "npm:^1.0.2" - checksum: 10c0/cb20dad41eb032e6c24c0982e1e5a24963a28aa6122b4f05b3f3d6bf8ae7fd5474ef382c8f54a6a3ab86e0cac4d41a23bd64ede3970e5bfb50326ba02a7996e6 - languageName: node - linkType: hard - -"signal-exit@npm:^3.0.2": - version: 3.0.7 - resolution: "signal-exit@npm:3.0.7" - checksum: 10c0/25d272fa73e146048565e08f3309d5b942c1979a6f4a58a8c59d5fa299728e9c2fcd1a759ec870863b1fd38653670240cd420dad2ad9330c71f36608a6a1c912 - languageName: node - linkType: hard - -"signal-exit@npm:^4.0.1": - version: 4.1.0 - resolution: "signal-exit@npm:4.1.0" - checksum: 10c0/41602dce540e46d599edba9d9860193398d135f7ff72cab629db5171516cfae628d21e7bfccde1bbfdf11c48726bc2a6d1a8fb8701125852fbfda7cf19c6aa83 - languageName: node - linkType: hard - -"smart-buffer@npm:^4.2.0": - version: 4.2.0 - resolution: "smart-buffer@npm:4.2.0" - checksum: 10c0/a16775323e1404dd43fabafe7460be13a471e021637bc7889468eb45ce6a6b207261f454e4e530a19500cc962c4cc5348583520843b363f4193cee5c00e1e539 - languageName: node - linkType: hard - -"socks-proxy-agent@npm:^8.0.3": - version: 8.0.5 - resolution: "socks-proxy-agent@npm:8.0.5" - dependencies: - agent-base: "npm:^7.1.2" - debug: "npm:^4.3.4" - socks: "npm:^2.8.3" - checksum: 10c0/5d2c6cecba6821389aabf18728325730504bf9bb1d9e342e7987a5d13badd7a98838cc9a55b8ed3cb866ad37cc23e1086f09c4d72d93105ce9dfe76330e9d2a6 - languageName: node - linkType: hard - -"socks@npm:^2.8.3": - version: 2.8.3 - resolution: "socks@npm:2.8.3" - dependencies: - ip-address: "npm:^9.0.5" - smart-buffer: "npm:^4.2.0" - checksum: 10c0/d54a52bf9325165770b674a67241143a3d8b4e4c8884560c4e0e078aace2a728dffc7f70150660f51b85797c4e1a3b82f9b7aa25e0a0ceae1a243365da5c51a7 - languageName: node - linkType: hard - -"sprintf-js@npm:^1.1.2, sprintf-js@npm:^1.1.3": - version: 1.1.3 - resolution: "sprintf-js@npm:1.1.3" - checksum: 10c0/09270dc4f30d479e666aee820eacd9e464215cdff53848b443964202bf4051490538e5dd1b42e1a65cf7296916ca17640aebf63dae9812749c7542ee5f288dec - languageName: node - linkType: hard - -"ssri@npm:^12.0.0": - version: 12.0.0 - resolution: "ssri@npm:12.0.0" - dependencies: - minipass: "npm:^7.0.3" - checksum: 10c0/caddd5f544b2006e88fa6b0124d8d7b28208b83c72d7672d5ade44d794525d23b540f3396108c4eb9280dcb7c01f0bef50682f5b4b2c34291f7c5e211fd1417d - languageName: node - linkType: hard - -"string-width-cjs@npm:string-width@^4.2.0, string-width@npm:^4.1.0, string-width@npm:^4.2.0, string-width@npm:^4.2.3": - version: 4.2.3 - resolution: "string-width@npm:4.2.3" - dependencies: - emoji-regex: "npm:^8.0.0" - is-fullwidth-code-point: "npm:^3.0.0" - strip-ansi: "npm:^6.0.1" - checksum: 10c0/1e525e92e5eae0afd7454086eed9c818ee84374bb80328fc41217ae72ff5f065ef1c9d7f72da41de40c75fa8bb3dee63d92373fd492c84260a552c636392a47b - languageName: node - linkType: hard - -"string-width@npm:^5.0.1, string-width@npm:^5.1.2": - version: 5.1.2 - resolution: "string-width@npm:5.1.2" - dependencies: - eastasianwidth: "npm:^0.2.0" - emoji-regex: "npm:^9.2.2" - strip-ansi: "npm:^7.0.1" - checksum: 10c0/ab9c4264443d35b8b923cbdd513a089a60de339216d3b0ed3be3ba57d6880e1a192b70ae17225f764d7adbf5994e9bb8df253a944736c15a0240eff553c678ca - languageName: node - linkType: hard - -"string.prototype.trim@npm:^1.2.10": - version: 1.2.10 - resolution: "string.prototype.trim@npm:1.2.10" - dependencies: - call-bind: "npm:^1.0.8" - call-bound: "npm:^1.0.2" - define-data-property: "npm:^1.1.4" - define-properties: "npm:^1.2.1" - es-abstract: "npm:^1.23.5" - es-object-atoms: "npm:^1.0.0" - has-property-descriptors: "npm:^1.0.2" - checksum: 10c0/8a8854241c4b54a948e992eb7dd6b8b3a97185112deb0037a134f5ba57541d8248dd610c966311887b6c2fd1181a3877bffb14d873ce937a344535dabcc648f8 - languageName: node - linkType: hard - -"string.prototype.trimend@npm:^1.0.8, string.prototype.trimend@npm:^1.0.9": - version: 1.0.9 - resolution: "string.prototype.trimend@npm:1.0.9" - dependencies: - call-bind: "npm:^1.0.8" - call-bound: "npm:^1.0.2" - define-properties: "npm:^1.2.1" - es-object-atoms: "npm:^1.0.0" - checksum: 10c0/59e1a70bf9414cb4c536a6e31bef5553c8ceb0cf44d8b4d0ed65c9653358d1c64dd0ec203b100df83d0413bbcde38b8c5d49e14bc4b86737d74adc593a0d35b6 - languageName: node - linkType: hard - -"string.prototype.trimstart@npm:^1.0.8": - version: 1.0.8 - resolution: "string.prototype.trimstart@npm:1.0.8" - dependencies: - call-bind: "npm:^1.0.7" - define-properties: "npm:^1.2.1" - es-object-atoms: "npm:^1.0.0" - checksum: 10c0/d53af1899959e53c83b64a5fd120be93e067da740e7e75acb433849aa640782fb6c7d4cd5b84c954c84413745a3764df135a8afeb22908b86a835290788d8366 - languageName: node - linkType: hard - -"string_decoder@npm:^1.1.1": - version: 1.3.0 - resolution: "string_decoder@npm:1.3.0" - dependencies: - safe-buffer: "npm:~5.2.0" - checksum: 10c0/810614ddb030e271cd591935dcd5956b2410dd079d64ff92a1844d6b7588bf992b3e1b69b0f4d34a3e06e0bd73046ac646b5264c1987b20d0601f81ef35d731d - languageName: node - linkType: hard - -"strip-ansi-cjs@npm:strip-ansi@^6.0.1, strip-ansi@npm:^6.0.0, strip-ansi@npm:^6.0.1": - version: 6.0.1 - resolution: "strip-ansi@npm:6.0.1" - dependencies: - ansi-regex: "npm:^5.0.1" - checksum: 10c0/1ae5f212a126fe5b167707f716942490e3933085a5ff6c008ab97ab2f272c8025d3aa218b7bd6ab25729ca20cc81cddb252102f8751e13482a5199e873680952 - languageName: node - linkType: hard - -"strip-ansi@npm:^7.0.1": - version: 7.1.0 - resolution: "strip-ansi@npm:7.1.0" - dependencies: - ansi-regex: "npm:^6.0.1" - checksum: 10c0/a198c3762e8832505328cbf9e8c8381de14a4fa50a4f9b2160138158ea88c0f5549fb50cb13c651c3088f47e63a108b34622ec18c0499b6c8c3a5ddf6b305ac4 - languageName: node - linkType: hard - -"strip-bom@npm:^3.0.0": - version: 3.0.0 - resolution: "strip-bom@npm:3.0.0" - checksum: 10c0/51201f50e021ef16672593d7434ca239441b7b760e905d9f33df6e4f3954ff54ec0e0a06f100d028af0982d6f25c35cd5cda2ce34eaebccd0250b8befb90d8f1 - languageName: node - linkType: hard - -"strip-json-comments@npm:^3.1.1": - version: 3.1.1 - resolution: "strip-json-comments@npm:3.1.1" - checksum: 10c0/9681a6257b925a7fa0f285851c0e613cc934a50661fa7bb41ca9cbbff89686bb4a0ee366e6ecedc4daafd01e83eee0720111ab294366fe7c185e935475ebcecd - languageName: node - linkType: hard - -"sumchecker@npm:^3.0.1": - version: 3.0.1 - resolution: "sumchecker@npm:3.0.1" - dependencies: - debug: "npm:^4.1.0" - checksum: 10c0/43c387be9dfe22dbeaf39dfa4ffb279847aeb37a42a8988c0b066f548bbd209aa8c65e03da29f2b29be1a66b577801bf89fff0007df4183db2f286263a9569e5 - languageName: node - linkType: hard - -"supports-color@npm:^7.1.0": - version: 7.2.0 - resolution: "supports-color@npm:7.2.0" - dependencies: - has-flag: "npm:^4.0.0" - checksum: 10c0/afb4c88521b8b136b5f5f95160c98dee7243dc79d5432db7efc27efb219385bbc7d9427398e43dd6cc730a0f87d5085ce1652af7efbe391327bc0a7d0f7fc124 - languageName: node - linkType: hard - -"supports-preserve-symlinks-flag@npm:^1.0.0": - version: 1.0.0 - resolution: "supports-preserve-symlinks-flag@npm:1.0.0" - checksum: 10c0/6c4032340701a9950865f7ae8ef38578d8d7053f5e10518076e6554a9381fa91bd9c6850193695c141f32b21f979c985db07265a758867bac95de05f7d8aeb39 - languageName: node - linkType: hard - -"tar@npm:^7.4.3": - version: 7.4.3 - resolution: "tar@npm:7.4.3" - dependencies: - "@isaacs/fs-minipass": "npm:^4.0.0" - chownr: "npm:^3.0.0" - minipass: "npm:^7.1.2" - minizlib: "npm:^3.0.1" - mkdirp: "npm:^3.0.1" - yallist: "npm:^5.0.0" - checksum: 10c0/d4679609bb2a9b48eeaf84632b6d844128d2412b95b6de07d53d8ee8baf4ca0857c9331dfa510390a0727b550fd543d4d1a10995ad86cdf078423fbb8d99831d - languageName: node - linkType: hard - -"tar@npm:^7.5.6": - version: 7.5.13 - resolution: "tar@npm:7.5.13" - dependencies: - "@isaacs/fs-minipass": "npm:^4.0.0" - chownr: "npm:^3.0.0" - minipass: "npm:^7.1.2" - minizlib: "npm:^3.1.0" - yallist: "npm:^5.0.0" - checksum: 10c0/5c65b8084799bde7a791593a1c1a45d3d6ee98182e3700b24c247b7b8f8654df4191642abbdb07ff25043d45dcff35620827c3997b88ae6c12040f64bed5076b - languageName: node - linkType: hard - -"tinyglobby@npm:^0.2.12": - version: 0.2.15 - resolution: "tinyglobby@npm:0.2.15" - dependencies: - fdir: "npm:^6.5.0" - picomatch: "npm:^4.0.3" - checksum: 10c0/869c31490d0d88eedb8305d178d4c75e7463e820df5a9b9d388291daf93e8b1eb5de1dad1c1e139767e4269fe75f3b10d5009b2cc14db96ff98986920a186844 - languageName: node - linkType: hard - -"tmp@npm:^0.2.3": - version: 0.2.3 - resolution: "tmp@npm:0.2.3" - checksum: 10c0/3e809d9c2f46817475b452725c2aaa5d11985cf18d32a7a970ff25b568438e2c076c2e8609224feef3b7923fa9749b74428e3e634f6b8e520c534eef2fd24125 - languageName: node - linkType: hard - -"to-regex-range@npm:^5.0.1": - version: 5.0.1 - resolution: "to-regex-range@npm:5.0.1" - dependencies: - is-number: "npm:^7.0.0" - checksum: 10c0/487988b0a19c654ff3e1961b87f471702e708fa8a8dd02a298ef16da7206692e8552a0250e8b3e8759270f62e9d8314616f6da274734d3b558b1fc7b7724e892 - languageName: node - linkType: hard - -"ts-api-utils@npm:^2.0.0": - version: 2.0.0 - resolution: "ts-api-utils@npm:2.0.0" - peerDependencies: - typescript: ">=4.8.4" - checksum: 10c0/6165e29a5b75bd0218e3cb0f9ee31aa893dbd819c2e46dbb086c841121eb0436ed47c2c18a20cb3463d74fd1fb5af62e2604ba5971cc48e5b38ebbdc56746dfc - languageName: node - linkType: hard - -"ts-node@npm:^10.4.0": - version: 10.9.2 - resolution: "ts-node@npm:10.9.2" - dependencies: - "@cspotcode/source-map-support": "npm:^0.8.0" - "@tsconfig/node10": "npm:^1.0.7" - "@tsconfig/node12": "npm:^1.0.7" - "@tsconfig/node14": "npm:^1.0.0" - "@tsconfig/node16": "npm:^1.0.2" - acorn: "npm:^8.4.1" - acorn-walk: "npm:^8.1.1" - arg: "npm:^4.1.0" - create-require: "npm:^1.1.0" - diff: "npm:^4.0.1" - make-error: "npm:^1.1.1" - v8-compile-cache-lib: "npm:^3.0.1" - yn: "npm:3.1.1" - peerDependencies: - "@swc/core": ">=1.2.50" - "@swc/wasm": ">=1.2.50" - "@types/node": "*" - typescript: ">=2.7" - peerDependenciesMeta: - "@swc/core": - optional: true - "@swc/wasm": - optional: true - bin: - ts-node: dist/bin.js - ts-node-cwd: dist/bin-cwd.js - ts-node-esm: dist/bin-esm.js - ts-node-script: dist/bin-script.js - ts-node-transpile-only: dist/bin-transpile.js - ts-script: dist/bin-script-deprecated.js - checksum: 10c0/5f29938489f96982a25ba650b64218e83a3357d76f7bede80195c65ab44ad279c8357264639b7abdd5d7e75fc269a83daa0e9c62fd8637a3def67254ecc9ddc2 - languageName: node - linkType: hard - -"tsconfig-paths@npm:^3.15.0": - version: 3.15.0 - resolution: "tsconfig-paths@npm:3.15.0" - dependencies: - "@types/json5": "npm:^0.0.29" - json5: "npm:^1.0.2" - minimist: "npm:^1.2.6" - strip-bom: "npm:^3.0.0" - checksum: 10c0/5b4f301a2b7a3766a986baf8fc0e177eb80bdba6e396792ff92dc23b5bca8bb279fc96517dcaaef63a3b49bebc6c4c833653ec58155780bc906bdbcf7dda0ef5 - languageName: node - linkType: hard - -"tslib@npm:^2.8.1": - version: 2.8.1 - resolution: "tslib@npm:2.8.1" - checksum: 10c0/9c4759110a19c53f992d9aae23aac5ced636e99887b51b9e61def52611732872ff7668757d4e4c61f19691e36f4da981cd9485e869b4a7408d689f6bf1f14e62 - languageName: node - linkType: hard - -"type-check@npm:^0.4.0, type-check@npm:~0.4.0": - version: 0.4.0 - resolution: "type-check@npm:0.4.0" - dependencies: - prelude-ls: "npm:^1.2.1" - checksum: 10c0/7b3fd0ed43891e2080bf0c5c504b418fbb3e5c7b9708d3d015037ba2e6323a28152ec163bcb65212741fa5d2022e3075ac3c76440dbd344c9035f818e8ecee58 - languageName: node - linkType: hard - -"type-fest@npm:^0.13.1": - version: 0.13.1 - resolution: "type-fest@npm:0.13.1" - checksum: 10c0/0c0fa07ae53d4e776cf4dac30d25ad799443e9eef9226f9fddbb69242db86b08584084a99885cfa5a9dfe4c063ebdc9aa7b69da348e735baede8d43f1aeae93b - languageName: node - linkType: hard - -"typed-array-buffer@npm:^1.0.3": - version: 1.0.3 - resolution: "typed-array-buffer@npm:1.0.3" - dependencies: - call-bound: "npm:^1.0.3" - es-errors: "npm:^1.3.0" - is-typed-array: "npm:^1.1.14" - checksum: 10c0/1105071756eb248774bc71646bfe45b682efcad93b55532c6ffa4518969fb6241354e4aa62af679ae83899ec296d69ef88f1f3763657cdb3a4d29321f7b83079 - languageName: node - linkType: hard - -"typed-array-byte-length@npm:^1.0.3": - version: 1.0.3 - resolution: "typed-array-byte-length@npm:1.0.3" - dependencies: - call-bind: "npm:^1.0.8" - for-each: "npm:^0.3.3" - gopd: "npm:^1.2.0" - has-proto: "npm:^1.2.0" - is-typed-array: "npm:^1.1.14" - checksum: 10c0/6ae083c6f0354f1fce18b90b243343b9982affd8d839c57bbd2c174a5d5dc71be9eb7019ffd12628a96a4815e7afa85d718d6f1e758615151d5f35df841ffb3e - languageName: node - linkType: hard - -"typed-array-byte-offset@npm:^1.0.4": - version: 1.0.4 - resolution: "typed-array-byte-offset@npm:1.0.4" - dependencies: - available-typed-arrays: "npm:^1.0.7" - call-bind: "npm:^1.0.8" - for-each: "npm:^0.3.3" - gopd: "npm:^1.2.0" - has-proto: "npm:^1.2.0" - is-typed-array: "npm:^1.1.15" - reflect.getprototypeof: "npm:^1.0.9" - checksum: 10c0/3d805b050c0c33b51719ee52de17c1cd8e6a571abdf0fffb110e45e8dd87a657e8b56eee94b776b13006d3d347a0c18a730b903cf05293ab6d92e99ff8f77e53 - languageName: node - linkType: hard - -"typed-array-length@npm:^1.0.7": - version: 1.0.7 - resolution: "typed-array-length@npm:1.0.7" - dependencies: - call-bind: "npm:^1.0.7" - for-each: "npm:^0.3.3" - gopd: "npm:^1.0.1" - is-typed-array: "npm:^1.1.13" - possible-typed-array-names: "npm:^1.0.0" - reflect.getprototypeof: "npm:^1.0.6" - checksum: 10c0/e38f2ae3779584c138a2d8adfa8ecf749f494af3cd3cdafe4e688ce51418c7d2c5c88df1bd6be2bbea099c3f7cea58c02ca02ed438119e91f162a9de23f61295 - languageName: node - linkType: hard - -"typescript@npm:^5.7.3": - version: 5.7.3 - resolution: "typescript@npm:5.7.3" - bin: - tsc: bin/tsc - tsserver: bin/tsserver - checksum: 10c0/b7580d716cf1824736cc6e628ab4cd8b51877408ba2be0869d2866da35ef8366dd6ae9eb9d0851470a39be17cbd61df1126f9e211d8799d764ea7431d5435afa - languageName: node - linkType: hard - -"typescript@patch:typescript@npm%3A^5.7.3#optional!builtin": - version: 5.7.3 - resolution: "typescript@patch:typescript@npm%3A5.7.3#optional!builtin::version=5.7.3&hash=5786d5" - bin: - tsc: bin/tsc - tsserver: bin/tsserver - checksum: 10c0/6fd7e0ed3bf23a81246878c613423730c40e8bdbfec4c6e4d7bf1b847cbb39076e56ad5f50aa9d7ebd89877999abaee216002d3f2818885e41c907caaa192cc4 - languageName: node - linkType: hard - -"unbox-primitive@npm:^1.1.0": - version: 1.1.0 - resolution: "unbox-primitive@npm:1.1.0" - dependencies: - call-bound: "npm:^1.0.3" - has-bigints: "npm:^1.0.2" - has-symbols: "npm:^1.1.0" - which-boxed-primitive: "npm:^1.1.1" - checksum: 10c0/7dbd35ab02b0e05fe07136c72cb9355091242455473ec15057c11430129bab38b7b3624019b8778d02a881c13de44d63cd02d122ee782fb519e1de7775b5b982 - languageName: node - linkType: hard - -"undici-types@npm:~6.19.2": - version: 6.19.8 - resolution: "undici-types@npm:6.19.8" - checksum: 10c0/078afa5990fba110f6824823ace86073b4638f1d5112ee26e790155f481f2a868cc3e0615505b6f4282bdf74a3d8caad715fd809e870c2bb0704e3ea6082f344 - languageName: node - linkType: hard - -"undici-types@npm:~6.20.0": - version: 6.20.0 - resolution: "undici-types@npm:6.20.0" - checksum: 10c0/68e659a98898d6a836a9a59e6adf14a5d799707f5ea629433e025ac90d239f75e408e2e5ff086afc3cace26f8b26ee52155293564593fbb4a2f666af57fc59bf - languageName: node - linkType: hard - -"unique-filename@npm:^4.0.0": - version: 4.0.0 - resolution: "unique-filename@npm:4.0.0" - dependencies: - unique-slug: "npm:^5.0.0" - checksum: 10c0/38ae681cceb1408ea0587b6b01e29b00eee3c84baee1e41fd5c16b9ed443b80fba90c40e0ba69627e30855570a34ba8b06702d4a35035d4b5e198bf5a64c9ddc - languageName: node - linkType: hard - -"unique-slug@npm:^5.0.0": - version: 5.0.0 - resolution: "unique-slug@npm:5.0.0" - dependencies: - imurmurhash: "npm:^0.1.4" - checksum: 10c0/d324c5a44887bd7e105ce800fcf7533d43f29c48757ac410afd42975de82cc38ea2035c0483f4de82d186691bf3208ef35c644f73aa2b1b20b8e651be5afd293 - languageName: node - linkType: hard - -"universalify@npm:^0.1.0": - version: 0.1.2 - resolution: "universalify@npm:0.1.2" - checksum: 10c0/e70e0339f6b36f34c9816f6bf9662372bd241714dc77508d231d08386d94f2c4aa1ba1318614f92015f40d45aae1b9075cd30bd490efbe39387b60a76ca3f045 - languageName: node - linkType: hard - -"uri-js@npm:^4.2.2": - version: 4.4.1 - resolution: "uri-js@npm:4.4.1" - dependencies: - punycode: "npm:^2.1.0" - checksum: 10c0/4ef57b45aa820d7ac6496e9208559986c665e49447cb072744c13b66925a362d96dd5a46c4530a6b8e203e5db5fe849369444440cb22ecfc26c679359e5dfa3c - languageName: node - linkType: hard - -"util-deprecate@npm:^1.0.1": - version: 1.0.2 - resolution: "util-deprecate@npm:1.0.2" - checksum: 10c0/41a5bdd214df2f6c3ecf8622745e4a366c4adced864bc3c833739791aeeeb1838119af7daed4ba36428114b5c67dcda034a79c882e97e43c03e66a4dd7389942 - languageName: node - linkType: hard - -"uuid@npm:^11.0.5": - version: 11.0.5 - resolution: "uuid@npm:11.0.5" - bin: - uuid: dist/esm/bin/uuid - checksum: 10c0/6f59f0c605e02c14515401084ca124b9cb462b4dcac866916a49862bcf831874508a308588c23a7718269226ad11a92da29b39d761ad2b86e736623e3a33b6e7 - languageName: node - linkType: hard - -"v8-compile-cache-lib@npm:^3.0.1": - version: 3.0.1 - resolution: "v8-compile-cache-lib@npm:3.0.1" - checksum: 10c0/bdc36fb8095d3b41df197f5fb6f11e3a26adf4059df3213e3baa93810d8f0cc76f9a74aaefc18b73e91fe7e19154ed6f134eda6fded2e0f1c8d2272ed2d2d391 - languageName: node - linkType: hard - -"wcwidth@npm:^1.0.1": - version: 1.0.1 - resolution: "wcwidth@npm:1.0.1" - dependencies: - defaults: "npm:^1.0.3" - checksum: 10c0/5b61ca583a95e2dd85d7078400190efd452e05751a64accb8c06ce4db65d7e0b0cde9917d705e826a2e05cc2548f61efde115ffa374c3e436d04be45c889e5b4 - languageName: node - linkType: hard - -"which-boxed-primitive@npm:^1.1.0, which-boxed-primitive@npm:^1.1.1": - version: 1.1.1 - resolution: "which-boxed-primitive@npm:1.1.1" - dependencies: - is-bigint: "npm:^1.1.0" - is-boolean-object: "npm:^1.2.1" - is-number-object: "npm:^1.1.1" - is-string: "npm:^1.1.1" - is-symbol: "npm:^1.1.1" - checksum: 10c0/aceea8ede3b08dede7dce168f3883323f7c62272b49801716e8332ff750e7ae59a511ae088840bc6874f16c1b7fd296c05c949b0e5b357bfe3c431b98c417abe - languageName: node - linkType: hard - -"which-builtin-type@npm:^1.2.1": - version: 1.2.1 - resolution: "which-builtin-type@npm:1.2.1" - dependencies: - call-bound: "npm:^1.0.2" - function.prototype.name: "npm:^1.1.6" - has-tostringtag: "npm:^1.0.2" - is-async-function: "npm:^2.0.0" - is-date-object: "npm:^1.1.0" - is-finalizationregistry: "npm:^1.1.0" - is-generator-function: "npm:^1.0.10" - is-regex: "npm:^1.2.1" - is-weakref: "npm:^1.0.2" - isarray: "npm:^2.0.5" - which-boxed-primitive: "npm:^1.1.0" - which-collection: "npm:^1.0.2" - which-typed-array: "npm:^1.1.16" - checksum: 10c0/8dcf323c45e5c27887800df42fbe0431d0b66b1163849bb7d46b5a730ad6a96ee8bfe827d078303f825537844ebf20c02459de41239a0a9805e2fcb3cae0d471 - languageName: node - linkType: hard - -"which-collection@npm:^1.0.2": - version: 1.0.2 - resolution: "which-collection@npm:1.0.2" - dependencies: - is-map: "npm:^2.0.3" - is-set: "npm:^2.0.3" - is-weakmap: "npm:^2.0.2" - is-weakset: "npm:^2.0.3" - checksum: 10c0/3345fde20964525a04cdf7c4a96821f85f0cc198f1b2ecb4576e08096746d129eb133571998fe121c77782ac8f21cbd67745a3d35ce100d26d4e684c142ea1f2 - languageName: node - linkType: hard - -"which-typed-array@npm:^1.1.16, which-typed-array@npm:^1.1.18": - version: 1.1.18 - resolution: "which-typed-array@npm:1.1.18" - dependencies: - available-typed-arrays: "npm:^1.0.7" - call-bind: "npm:^1.0.8" - call-bound: "npm:^1.0.3" - for-each: "npm:^0.3.3" - gopd: "npm:^1.2.0" - has-tostringtag: "npm:^1.0.2" - checksum: 10c0/0412f4a91880ca1a2a63056187c2e3de6b129b2b5b6c17bc3729f0f7041047ae48fb7424813e51506addb2c97320003ee18b8c57469d2cde37983ef62126143c - languageName: node - linkType: hard - -"which@npm:^2.0.1": - version: 2.0.2 - resolution: "which@npm:2.0.2" - dependencies: - isexe: "npm:^2.0.0" - bin: - node-which: ./bin/node-which - checksum: 10c0/66522872a768b60c2a65a57e8ad184e5372f5b6a9ca6d5f033d4b0dc98aff63995655a7503b9c0a2598936f532120e81dd8cc155e2e92ed662a2b9377cc4374f - languageName: node - linkType: hard - -"which@npm:^5.0.0": - version: 5.0.0 - resolution: "which@npm:5.0.0" - dependencies: - isexe: "npm:^3.1.1" - bin: - node-which: bin/which.js - checksum: 10c0/e556e4cd8b7dbf5df52408c9a9dd5ac6518c8c5267c8953f5b0564073c66ed5bf9503b14d876d0e9c7844d4db9725fb0dcf45d6e911e17e26ab363dc3965ae7b - languageName: node - linkType: hard - -"word-wrap@npm:^1.2.5": - version: 1.2.5 - resolution: "word-wrap@npm:1.2.5" - checksum: 10c0/e0e4a1ca27599c92a6ca4c32260e8a92e8a44f4ef6ef93f803f8ed823f486e0889fc0b93be4db59c8d51b3064951d25e43d434e95dc8c960cc3a63d65d00ba20 - languageName: node - linkType: hard - -"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0, wrap-ansi@npm:^7.0.0": - version: 7.0.0 - resolution: "wrap-ansi@npm:7.0.0" - dependencies: - ansi-styles: "npm:^4.0.0" - string-width: "npm:^4.1.0" - strip-ansi: "npm:^6.0.0" - checksum: 10c0/d15fc12c11e4cbc4044a552129ebc75ee3f57aa9c1958373a4db0292d72282f54373b536103987a4a7594db1ef6a4f10acf92978f79b98c49306a4b58c77d4da - languageName: node - linkType: hard - -"wrap-ansi@npm:^8.1.0": - version: 8.1.0 - resolution: "wrap-ansi@npm:8.1.0" - dependencies: - ansi-styles: "npm:^6.1.0" - string-width: "npm:^5.0.1" - strip-ansi: "npm:^7.0.1" - checksum: 10c0/138ff58a41d2f877eae87e3282c0630fc2789012fc1af4d6bd626eeb9a2f9a65ca92005e6e69a75c7b85a68479fe7443c7dbe1eb8fbaa681a4491364b7c55c60 - languageName: node - linkType: hard - -"wrappy@npm:1": - version: 1.0.2 - resolution: "wrappy@npm:1.0.2" - checksum: 10c0/56fece1a4018c6a6c8e28fbc88c87e0fbf4ea8fd64fc6c63b18f4acc4bd13e0ad2515189786dd2c30d3eec9663d70f4ecf699330002f8ccb547e4a18231fc9f0 - languageName: node - linkType: hard - -"y18n@npm:^5.0.5": - version: 5.0.8 - resolution: "y18n@npm:5.0.8" - checksum: 10c0/4df2842c36e468590c3691c894bc9cdbac41f520566e76e24f59401ba7d8b4811eb1e34524d57e54bc6d864bcb66baab7ffd9ca42bf1eda596618f9162b91249 - languageName: node - linkType: hard - -"yallist@npm:^4.0.0": - version: 4.0.0 - resolution: "yallist@npm:4.0.0" - checksum: 10c0/2286b5e8dbfe22204ab66e2ef5cc9bbb1e55dfc873bbe0d568aa943eb255d131890dfd5bf243637273d31119b870f49c18fcde2c6ffbb7a7a092b870dc90625a - languageName: node - linkType: hard - -"yallist@npm:^5.0.0": - version: 5.0.0 - resolution: "yallist@npm:5.0.0" - checksum: 10c0/a499c81ce6d4a1d260d4ea0f6d49ab4da09681e32c3f0472dee16667ed69d01dae63a3b81745a24bd78476ec4fcf856114cb4896ace738e01da34b2c42235416 - languageName: node - linkType: hard - -"yargs-parser@npm:^21.1.1": - version: 21.1.1 - resolution: "yargs-parser@npm:21.1.1" - checksum: 10c0/f84b5e48169479d2f402239c59f084cfd1c3acc197a05c59b98bab067452e6b3ea46d4dd8ba2985ba7b3d32a343d77df0debd6b343e5dae3da2aab2cdf5886b2 - languageName: node - linkType: hard - -"yargs@npm:^17.0.1": - version: 17.7.2 - resolution: "yargs@npm:17.7.2" - dependencies: - cliui: "npm:^8.0.1" - escalade: "npm:^3.1.1" - get-caller-file: "npm:^2.0.5" - require-directory: "npm:^2.1.1" - string-width: "npm:^4.2.3" - y18n: "npm:^5.0.5" - yargs-parser: "npm:^21.1.1" - checksum: 10c0/ccd7e723e61ad5965fffbb791366db689572b80cca80e0f96aad968dfff4156cd7cd1ad18607afe1046d8241e6fb2d6c08bf7fa7bfb5eaec818735d8feac8f05 - languageName: node - linkType: hard - -"yauzl@npm:^2.10.0": - version: 2.10.0 - resolution: "yauzl@npm:2.10.0" - dependencies: - buffer-crc32: "npm:~0.2.3" - fd-slicer: "npm:~1.1.0" - checksum: 10c0/f265002af7541b9ec3589a27f5fb8f11cf348b53cc15e2751272e3c062cd73f3e715bc72d43257de71bbaecae446c3f1b14af7559e8ab0261625375541816422 - languageName: node - linkType: hard - -"yn@npm:3.1.1": - version: 3.1.1 - resolution: "yn@npm:3.1.1" - checksum: 10c0/0732468dd7622ed8a274f640f191f3eaf1f39d5349a1b72836df484998d7d9807fbea094e2f5486d6b0cd2414aad5775972df0e68f8604db89a239f0f4bf7443 - languageName: node - linkType: hard - -"yocto-queue@npm:^0.1.0": - version: 0.1.0 - resolution: "yocto-queue@npm:0.1.0" - checksum: 10c0/dceb44c28578b31641e13695d200d34ec4ab3966a5729814d5445b194933c096b7ced71494ce53a0e8820685d1d010df8b2422e5bf2cdea7e469d97ffbea306f - languageName: node - linkType: hard diff --git a/application/apps/rustcore/wasm-bindings/.gitignore b/application/apps/rustcore/wasm-bindings/.gitignore deleted file mode 100644 index ecc5d281d5..0000000000 --- a/application/apps/rustcore/wasm-bindings/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ -test_output -package-lock.json - -!karma.conf.js diff --git a/application/apps/rustcore/wasm-bindings/.yarnrc.yml b/application/apps/rustcore/wasm-bindings/.yarnrc.yml deleted file mode 100644 index 3186f3f079..0000000000 --- a/application/apps/rustcore/wasm-bindings/.yarnrc.yml +++ /dev/null @@ -1 +0,0 @@ -nodeLinker: node-modules diff --git a/application/apps/rustcore/wasm-bindings/Cargo.lock b/application/apps/rustcore/wasm-bindings/Cargo.lock deleted file mode 100644 index c2b74b3d2c..0000000000 --- a/application/apps/rustcore/wasm-bindings/Cargo.lock +++ /dev/null @@ -1,465 +0,0 @@ -# This file is automatically @generated by Cargo. -# It is not intended for manual editing. -version = 4 - -[[package]] -name = "aho-corasick" -version = "1.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916" -dependencies = [ - "memchr", -] - -[[package]] -name = "ansi-to-html" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12e283a4fc285735ef99577e81a125f738429516161ac33977e466d0d8d40764" -dependencies = [ - "regex", - "thiserror", -] - -[[package]] -name = "bumpalo" -version = "3.17.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1628fb46dfa0b37568d12e5edd512553eccf6a22a78e8bde00bb4aed84d5bdbf" - -[[package]] -name = "cc" -version = "1.2.25" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0fc897dc1e865cc67c0e05a836d9d3f1df3cbe442aa4a9473b18e12624a4951" -dependencies = [ - "shlex", -] - -[[package]] -name = "cfg-if" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" - -[[package]] -name = "fuzzy-matcher" -version = "0.3.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54614a3312934d066701a80f20f15fa3b56d67ac7722b39eea5b4c9dd1d66c94" -dependencies = [ - "thread_local", -] - -[[package]] -name = "js-sys" -version = "0.3.77" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1cfaf33c695fc6e08064efbc1f72ec937429614f25eef83af942d0e227c3a28f" -dependencies = [ - "once_cell", - "wasm-bindgen", -] - -[[package]] -name = "log" -version = "0.4.27" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13dc2df351e3202783a1fe0d44375f7295ffb4049267b0f3018346dc122a1d94" - -[[package]] -name = "memchr" -version = "2.7.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" - -[[package]] -name = "minicov" -version = "0.3.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f27fe9f1cc3c22e1687f9446c2083c4c5fc7f0bcf1c7a86bdbded14985895b4b" -dependencies = [ - "cc", - "walkdir", -] - -[[package]] -name = "once_cell" -version = "1.21.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d" - -[[package]] -name = "proc-macro2" -version = "1.0.95" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02b3e5e68a3a1a02aad3ec490a98007cbc13c37cbe84a3cd7b8e406d76e7f778" -dependencies = [ - "unicode-ident", -] - -[[package]] -name = "quote" -version = "1.0.40" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1885c039570dc00dcb4ff087a89e185fd56bae234ddc7f056a945bf36467248d" -dependencies = [ - "proc-macro2", -] - -[[package]] -name = "regex" -version = "1.11.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b544ef1b4eac5dc2db33ea63606ae9ffcfac26c1416a2806ae0bf5f56b201191" -dependencies = [ - "aho-corasick", - "memchr", - "regex-automata", - "regex-syntax", -] - -[[package]] -name = "regex-automata" -version = "0.4.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "809e8dc61f6de73b46c85f4c96486310fe304c434cfa43669d7b40f711150908" -dependencies = [ - "aho-corasick", - "memchr", - "regex-syntax", -] - -[[package]] -name = "regex-syntax" -version = "0.8.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" - -[[package]] -name = "rustversion" -version = "1.0.21" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a0d197bd2c9dc6e53b84da9556a69ba4cdfab8619eb41a8bd1cc2027a0f6b1d" - -[[package]] -name = "same-file" -version = "1.0.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" -dependencies = [ - "winapi-util", -] - -[[package]] -name = "serde" -version = "1.0.219" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f0e2c6ed6606019b4e29e69dbaba95b11854410e5347d525002456dbbb786b6" -dependencies = [ - "serde_derive", -] - -[[package]] -name = "serde-wasm-bindgen" -version = "0.6.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8302e169f0eddcc139c70f139d19d6467353af16f9fce27e8c30158036a1e16b" -dependencies = [ - "js-sys", - "serde", - "wasm-bindgen", -] - -[[package]] -name = "serde_derive" -version = "1.0.219" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b0276cf7f2c73365f7157c8123c21cd9a50fbbd844757af28ca1f5925fc2a00" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "shlex" -version = "1.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" - -[[package]] -name = "strip-ansi-escapes" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a8f8038e7e7969abb3f1b7c2a811225e9296da208539e0f79c5251d6cac0025" -dependencies = [ - "vte", -] - -[[package]] -name = "syn" -version = "2.0.101" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ce2b7fc941b3a24138a0a7cf8e858bfc6a992e7978a068a5c760deb0ed43caf" -dependencies = [ - "proc-macro2", - "quote", - "unicode-ident", -] - -[[package]] -name = "thiserror" -version = "1.0.69" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52" -dependencies = [ - "thiserror-impl", -] - -[[package]] -name = "thiserror-impl" -version = "1.0.69" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "thread_local" -version = "1.1.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b9ef9bad013ada3808854ceac7b46812a6465ba368859a37e2100283d2d719c" -dependencies = [ - "cfg-if", - "once_cell", -] - -[[package]] -name = "unicode-ident" -version = "1.0.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a5f39404a5da50712a4c1eecf25e90dd62b613502b7e925fd4e4d19b5c96512" - -[[package]] -name = "vte" -version = "0.14.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "231fdcd7ef3037e8330d8e17e61011a2c244126acc0a982f4040ac3f9f0bc077" -dependencies = [ - "memchr", -] - -[[package]] -name = "walkdir" -version = "2.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29790946404f91d9c5d06f9874efddea1dc06c5efe94541a7d6863108e3a5e4b" -dependencies = [ - "same-file", - "winapi-util", -] - -[[package]] -name = "wasm-bindgen" -version = "0.2.100" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1edc8929d7499fc4e8f0be2262a241556cfc54a0bea223790e71446f2aab1ef5" -dependencies = [ - "cfg-if", - "once_cell", - "rustversion", - "wasm-bindgen-macro", -] - -[[package]] -name = "wasm-bindgen-backend" -version = "0.2.100" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f0a0651a5c2bc21487bde11ee802ccaf4c51935d0d3d42a6101f98161700bc6" -dependencies = [ - "bumpalo", - "log", - "proc-macro2", - "quote", - "syn", - "wasm-bindgen-shared", -] - -[[package]] -name = "wasm-bindgen-futures" -version = "0.4.50" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "555d470ec0bc3bb57890405e5d4322cc9ea83cebb085523ced7be4144dac1e61" -dependencies = [ - "cfg-if", - "js-sys", - "once_cell", - "wasm-bindgen", - "web-sys", -] - -[[package]] -name = "wasm-bindgen-macro" -version = "0.2.100" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fe63fc6d09ed3792bd0897b314f53de8e16568c2b3f7982f468c0bf9bd0b407" -dependencies = [ - "quote", - "wasm-bindgen-macro-support", -] - -[[package]] -name = "wasm-bindgen-macro-support" -version = "0.2.100" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ae87ea40c9f689fc23f209965b6fb8a99ad69aeeb0231408be24920604395de" -dependencies = [ - "proc-macro2", - "quote", - "syn", - "wasm-bindgen-backend", - "wasm-bindgen-shared", -] - -[[package]] -name = "wasm-bindgen-shared" -version = "0.2.100" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a05d73b933a847d6cccdda8f838a22ff101ad9bf93e33684f39c1f5f0eece3d" -dependencies = [ - "unicode-ident", -] - -[[package]] -name = "wasm-bindgen-test" -version = "0.3.50" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "66c8d5e33ca3b6d9fa3b4676d774c5778031d27a578c2b007f905acf816152c3" -dependencies = [ - "js-sys", - "minicov", - "wasm-bindgen", - "wasm-bindgen-futures", - "wasm-bindgen-test-macro", -] - -[[package]] -name = "wasm-bindgen-test-macro" -version = "0.3.50" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17d5042cc5fa009658f9a7333ef24291b1291a25b6382dd68862a7f3b969f69b" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "wasm-bindings" -version = "0.2.0" -dependencies = [ - "ansi-to-html", - "fuzzy-matcher", - "regex", - "serde", - "serde-wasm-bindgen", - "strip-ansi-escapes", - "wasm-bindgen", - "wasm-bindgen-test", -] - -[[package]] -name = "web-sys" -version = "0.3.77" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33b6dd2ef9186f1f2072e409e99cd22a975331a6b3591b12c764e0e55c60d5d2" -dependencies = [ - "js-sys", - "wasm-bindgen", -] - -[[package]] -name = "winapi-util" -version = "0.1.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb" -dependencies = [ - "windows-sys", -] - -[[package]] -name = "windows-sys" -version = "0.59.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" -dependencies = [ - "windows-targets", -] - -[[package]] -name = "windows-targets" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" -dependencies = [ - "windows_aarch64_gnullvm", - "windows_aarch64_msvc", - "windows_i686_gnu", - "windows_i686_gnullvm", - "windows_i686_msvc", - "windows_x86_64_gnu", - "windows_x86_64_gnullvm", - "windows_x86_64_msvc", -] - -[[package]] -name = "windows_aarch64_gnullvm" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" - -[[package]] -name = "windows_aarch64_msvc" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" - -[[package]] -name = "windows_i686_gnu" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" - -[[package]] -name = "windows_i686_gnullvm" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" - -[[package]] -name = "windows_i686_msvc" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" - -[[package]] -name = "windows_x86_64_gnu" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" - -[[package]] -name = "windows_x86_64_gnullvm" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" - -[[package]] -name = "windows_x86_64_msvc" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" diff --git a/application/apps/rustcore/wasm-bindings/Cargo.toml b/application/apps/rustcore/wasm-bindings/Cargo.toml deleted file mode 100644 index 62692e36e4..0000000000 --- a/application/apps/rustcore/wasm-bindings/Cargo.toml +++ /dev/null @@ -1,19 +0,0 @@ -[package] -name = "wasm-bindings" -version = "0.2.0" -edition = "2024" - -# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html - -[lib] -crate-type = ["cdylib"] - -[dependencies] -ansi-to-html = { version = "0.2", features = ["lazy-init"] } -fuzzy-matcher = "0.3" -regex = "1" -serde = { version = "1.0", features = ["derive"] } -serde-wasm-bindgen = "0.6" -strip-ansi-escapes = "0.2" -wasm-bindgen = "0.2" -wasm-bindgen-test = "0.3" diff --git a/application/apps/rustcore/wasm-bindings/karma.conf.js b/application/apps/rustcore/wasm-bindings/karma.conf.js deleted file mode 100644 index 72f28c13fe..0000000000 --- a/application/apps/rustcore/wasm-bindings/karma.conf.js +++ /dev/null @@ -1,71 +0,0 @@ -const path = require("path"); -const WasmPackPlugin = require('@wasm-tool/wasm-pack-plugin'); - -const outputPath = path.resolve(__dirname, 'test_output'); -module.exports = function (config) { - config.set({ - - frameworks: ["jasmine"], - - mime: { - 'application/wasm': ['wasm'] - }, - - files: [ - - { pattern: "node_modules/expect.js/index.js" }, - { pattern: "spec/**/*.ts" }, - { - pattern: `${outputPath}/**/*`, // <-- here - watched: false, - included: false, - }, - ], - - webpack: { - mode: "development", - module: { - rules: [ - { - test: /\.ts$/, - exclude: /node_modules/, - use: "ts-loader", - } - ], - }, - output: { - path: outputPath, - }, - plugins: [ - new WasmPackPlugin({ - crateDirectory: __dirname, - outDir: "pkg" - }) - ], - resolve: { - extensions: [".tsx", ".ts", ".js", ".wasm"], - }, - experiments: { - asyncWebAssembly: true, - }, - - }, - - preprocessors: { - "**/*.ts": ["webpack"] - }, - - browsers: ['ChromeHeadless'], - customLaunchers: { - ChromeHeadlessCustom: { - base: 'ChromeHeadless', - flags: ['--no-sandbox', '--disable-gpu'] - } - }, - - exprContextCritical: false, - - singleRun: true - - }); -}; \ No newline at end of file diff --git a/application/apps/rustcore/wasm-bindings/package.json b/application/apps/rustcore/wasm-bindings/package.json deleted file mode 100644 index 049b38de0e..0000000000 --- a/application/apps/rustcore/wasm-bindings/package.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "name": "wasm-bindings", - "version": "0.0.2", - "description": "Test env for wasm bindings", - "scripts": { - "build": "node_modules/.bin/webpack", - "start": "node_modules/.bin/webpack-dev-server", - "test": "node_modules/.bin/karma start", - "test_win": "node_modules\\.bin\\karma start" - }, - "author": "", - "license": "MIT", - "devDependencies": { - "@types/jasmine": "^5.1.5", - "@wasm-tool/wasm-pack-plugin": "^1.6.0", - "karma": "^6.4.0", - "karma-chrome-launcher": "^3.1.1", - "karma-jasmine": "^5.1.0", - "karma-spec-reporter": "^0.0.36", - "karma-typescript": "^5.5.3", - "karma-webpack": "^5.0.0", - "ts-loader": "^9.5.2", - "ts-node": "^10.8.2", - "typescript": "^5.7.3", - "webpack": "^5.97.1", - "webpack-cli": "^6.0.1", - "webpack-dev-server": "^5.2.0" - }, - "packageManager": "yarn@4.6.0" -} diff --git a/application/apps/rustcore/wasm-bindings/spec/ansi.spec.ts b/application/apps/rustcore/wasm-bindings/spec/ansi.spec.ts deleted file mode 100644 index 7ce6a0e2f8..0000000000 --- a/application/apps/rustcore/wasm-bindings/spec/ansi.spec.ts +++ /dev/null @@ -1,28 +0,0 @@ -describe('test', function () { - let wasm: typeof import('../pkg'); - - beforeAll(async function () { - wasm = await import('../pkg'); - }); - - it('converting', (done) => { - const { convert } = wasm; - const input = '

\x1b[1m Hello \x1b[31m world!

'; - const result = convert(input); - expect(result).toBe( - "<h1> Hello world! </h1>", - ); - done(); - }); - - it('escape', (done) => { - const { escape } = wasm; - const input = - '01-23 10:01:29.103 2116 2710 I chatty : uid=1000(system) Binder:2116_4 expire 4 lines'; - const result = escape(input); - const expected = - '01-23 10:01:29.103 2116 2710 I chatty : uid=1000(system) Binder:2116_4 expire 4 lines'; - expect(result).toEqual(expected); - done(); - }); -}); diff --git a/application/apps/rustcore/wasm-bindings/spec/filter.spec.ts b/application/apps/rustcore/wasm-bindings/spec/filter.spec.ts deleted file mode 100644 index 92bc30a378..0000000000 --- a/application/apps/rustcore/wasm-bindings/spec/filter.spec.ts +++ /dev/null @@ -1,51 +0,0 @@ - -describe('test', function () { - let wasm: typeof import('../pkg'); - beforeAll(async function () { - wasm = await import('../pkg'); - }); - - it('valid regex', (done) => { - const { get_filter_error } = wasm; - const filter = '[Warn]'; - const caseSensitive = true; - const wholeWord = false; - const regex = true; - const result = get_filter_error(filter, caseSensitive, wholeWord, regex); - expect(result).toBeUndefined(); - done(); - }); - - it('invalid regex', (done) => { - const { get_filter_error } = wasm; - const filter = '[Warn(]\\)('; - const caseSensitive = false; - const wholeWord = true; - const regex = true; - const result = get_filter_error(filter, caseSensitive, wholeWord, regex); - expect(typeof result).toEqual('string'); - done(); - }); - - it('plain_string_regex_off', (done) => { - const { get_filter_error } = wasm; - const filter = 'Some random stuff written'; - const caseSensitive = true; - const wholeWord = false; - const regex = false; - const result = get_filter_error(filter, caseSensitive, wholeWord, regex); - expect(result).toBeUndefined(); - done(); - }); - - it('plain_string_regex_on', (done) => { - const { get_filter_error } = wasm; - const filter = 'Another bunch of random stuff'; - const caseSensitive = false; - const wholeWord = false; - const regex = true; - const result = get_filter_error(filter, caseSensitive, wholeWord, regex); - expect(result).toBeUndefined(); - done(); - }); -}); diff --git a/application/apps/rustcore/wasm-bindings/spec/matcher.spec.ts b/application/apps/rustcore/wasm-bindings/spec/matcher.spec.ts deleted file mode 100644 index d7258d2972..0000000000 --- a/application/apps/rustcore/wasm-bindings/spec/matcher.spec.ts +++ /dev/null @@ -1,152 +0,0 @@ -class Item { - private _name: string; - private _size: string; - private _path: string; - private _index!: number; - - constructor(name: string, size: string, path: string) { - this._name = name; - this._size = size; - this._path = path; - } - - public set index(i: number) { - this._index = i; - } - - public get index(): number { - return this._index; - } - - public get(): { [key: string]: string } { - return { - name: this._name, - size: this._size, - path: this._path, - }; - } -} - -describe('test', function () { - let wasm: typeof import('../pkg'); - beforeAll(async function () { - wasm = await import('../pkg'); - }); - - function test(expected: { [key: string]: string }[], query: string, tag?: string) { - const { Matcher } = wasm; - const matcher = Matcher.new(); - const items: Item[] = [ - new Item('very_large_file.dlt', '20gb', '/home/user/Desktop/very_large_file.dlt'), - new Item('small_file.log', '630kb', '/home/user/Desktop/small_file.log'), - new Item('medium_sized_file.txt', '15mb', '/home/user/Desktop/medium_sized_file.txt'), - ]; - items.forEach((item: Item) => { - item.index = matcher.set_item(item.get()); - }); - matcher.search(query, tag); - items.sort((a: Item, b: Item) => { - const a_score: number = a.index === undefined ? 0 : Number(matcher.get_score(a.index)); - const b_score: number = b.index === undefined ? 0 : Number(matcher.get_score(b.index)); - return b_score - a_score; - }); - items.forEach((item: Item, index: number) => { - const keys: string[] = Object.keys(item.get()); - keys.forEach((key: string) => { - expect(matcher.get_html_of(item.index, `html_${key}`)).toBe( - expected[index][`html_${key}`], - ); - }); - }); - } - - it('should all match', () => { - const expected: { [key: string]: string }[] = [ - { - html_name: 'very_large_file.dlt', - html_size: '20gb', - html_path: '/home/user/Desktop/very_large_file.dlt', - }, - { - html_name: 'small_file.log', - html_size: '630kb', - html_path: '/home/user/Desktop/small_file.log', - }, - { - html_name: 'medium_sized_file.txt', - html_size: '15mb', - html_path: '/home/user/Desktop/medium_sized_file.txt', - }, - ]; - const query: string = 'l'; - test(expected, query); - }); - - it('should not match', () => { - const expected: { [key: string]: string }[] = [ - { - html_name: 'very_large_file.dlt', - html_size: '20gb', - html_path: '/home/user/Desktop/very_large_file.dlt', - }, - { - html_name: 'small_file.log', - html_size: '630kb', - html_path: '/home/user/Desktop/small_file.log', - }, - { - html_name: 'medium_sized_file.txt', - html_size: '15mb', - html_path: '/home/user/Desktop/medium_sized_file.txt', - }, - ]; - const query: string = 'c'; - test(expected, query); - }); - - it('should scattered match', () => { - const expected: { [key: string]: string }[] = [ - { - html_name: 'medium_sized_file.txt', - html_size: '15mb', - html_path: '/home/user/Desktop/medium_sized_file.txt', - }, - { - html_name: 'small_file.log', - html_size: '630kb', - html_path: - '/home/user/Desktop/small_file.log', - }, - { - html_name: 'very_large_file.dlt', - html_size: '20gb', - html_path: '/home/user/Desktop/very_large_file.dlt', - }, - ]; - const query: string = 'mel'; - test(expected, query); - }); - - it('should match few', () => { - const expected: { [key: string]: string }[] = [ - { - html_name: 'very_lar

g

e_file.dlt', - html_size: '20

g

b', - html_path: '/home/user/Desktop/very_lar

g

e_file.dlt', - }, - { - html_name: 'small_file.lo

g

', - html_size: '630kb', - html_path: '/home/user/Desktop/small_file.lo

g

', - }, - { - html_name: 'medium_sized_file.txt', - html_size: '15mb', - html_path: '/home/user/Desktop/medium_sized_file.txt', - }, - ]; - const query: string = 'g'; - const tag: string = 'p'; - test(expected, query, tag); - }); -}); diff --git a/application/apps/rustcore/wasm-bindings/src/ansi.rs b/application/apps/rustcore/wasm-bindings/src/ansi.rs deleted file mode 100644 index fc896410e0..0000000000 --- a/application/apps/rustcore/wasm-bindings/src/ansi.rs +++ /dev/null @@ -1,244 +0,0 @@ -extern crate ansi_to_html; -extern crate strip_ansi_escapes; -extern crate wasm_bindgen; - -use regex::Regex; -use serde::{Deserialize, Serialize}; -use std::str; -use strip_ansi_escapes::strip_str; -use wasm_bindgen::prelude::*; -use wasm_bindgen_test::*; - -#[wasm_bindgen] -pub fn convert(input: &str) -> Result { - ansi_to_html::convert(input).map_err(|e| e.to_string()) -} - -#[wasm_bindgen] -pub fn escape(input: &str) -> Result { - Ok(strip_str(input)) -} - -#[derive(Serialize, Deserialize, Debug)] -pub struct Slot { - pub from: usize, - pub to: usize, - pub color: Option, - pub background: Option, - pub bold: bool, - pub italic: bool, -} -impl Slot { - pub fn new(from: usize, to: usize, tag: String, mapper: &AnsiMapper) -> Self { - Slot { - from, - to, - color: mapper.get_color(&tag), - background: mapper.get_background(&tag), - bold: tag.starts_with(" bool { - &self.from == from && &self.to == to - } -} - -#[wasm_bindgen] -pub struct AnsiMapper { - color: Regex, - background: Regex, -} - -#[wasm_bindgen] -impl AnsiMapper { - #[wasm_bindgen] - pub fn new() -> Result { - Ok(AnsiMapper { - color: Regex::new(r"color:[^>]*?(#[\d\w]{1,})").map_err(|e| e.to_string())?, - background: Regex::new(r"background:[^>]*?(#[\d\w]{1,})").map_err(|e| e.to_string())?, - }) - } - #[wasm_bindgen] - pub fn get_map(&self, input: &str) -> Result { - let map = self.create_map(&convert(input)?)?; - serde_wasm_bindgen::to_value(&map).map_err(|e| e.to_string()) - } - - pub fn get_color(&self, input: &str) -> Option { - self.color.captures(input).map(|captures| { - if let Some(s) = captures.get(1) { - s.as_str().to_owned() - } else { - String::new() - } - }) - } - - pub fn get_background(&self, input: &str) -> Option { - self.background.captures(input).map(|captures| { - if let Some(s) = captures.get(1) { - s.as_str().to_owned() - } else { - String::new() - } - }) - } - - fn create_map(&self, input: &str) -> Result, String> { - let mut map: Vec<(usize, usize, String)> = Vec::new(); - let mut slots: Vec = Vec::new(); - let mut stack = Vec::new(); - let mut clean_length = 0; - let mut i = 0; - while i < input.len() { - // call of input[i..] unfriendly to Unicode, so we should make sure we are - // taking completed sequences - let Some(current) = input.get(i..) else { - clean_length += 1; - i += 1; - continue; - }; - if input[i..].starts_with('<') && !input[i..].starts_with("') { - let tag = ¤t[..=pos]; - stack.push((clean_length, tag.to_string())); - i += tag.len(); - } else { - return Err(String::from("Fail to find closing \">\" on opening tag")); - } - } else if input[i..].starts_with("') { - let tag = ¤t[..=pos]; - if let Some((start, tag)) = stack.pop() { - map.push((start, clean_length, tag)); - } - i += tag.len(); - } else { - return Err(String::from("Fail to find closing \">\" on closing tag")); - } - } else { - clean_length += 1; - i += 1; - } - } - for (from, to, _tag) in map.iter() { - if slots.iter().any(|s| s.is_same(from, to)) { - continue; - } - let tag = map - .iter() - .filter_map(|(start, end, tag)| { - if start == from && end == to { - Some(tag) - } else { - None - } - }) - .map(|s| s.as_str()) - .collect::>() - .join("|"); - slots.push(Slot::new(*from, *to, tag, self)) - } - Ok(slots) - } -} - -#[allow(dead_code)] -#[wasm_bindgen_test] -fn converting() { - assert_eq!( - convert("

\x1b[1m Hello \x1b[31m world!

") - .expect("Input string should be converted as well") - .as_str(), - "<h1> Hello world! </h1>" - ); -} - -#[allow(dead_code)] -#[wasm_bindgen_test] -fn error_handling() { - assert!( - convert("01-23 10:01:29.103 2116 2710 I chatty : uid=1000(system) Binder:2116_4 expire 4 lines").is_err() - ); -} - -#[allow(dead_code)] -#[wasm_bindgen_test] -fn escaping() { - assert_eq!( - escape("01-23 10:01:29.103 2116 2710 I chatty : uid=1000(system) Binder:2116_4 expire 4 lines") - .expect("Input string should be escaped as well") - .as_str(), - "01-23 10:01:29.103 2116 2710 I chatty : uid=1000(system) Binder:2116_4 expire 4 lines" - ); -} - -#[test] -fn creating_map() { - let mapper = AnsiMapper::new().expect("Asci mapper should be created"); - let cases = [ - ( - "01-23 10:01:25.642 2116 2711 I chatty : uid=1000(system) Binder:2116_5 expire 5 lines", - 0, - 88, - ), - ( - "01-23 10:01:25.642 2116 2711 I chatty : uid=1000(system) Binder:2116_5 expire 5 lines", - 0, - 18, - ), - ( - "01-23 10:01:25.642 2116 2711 I chatty : uid=1000(system) Binder:2116_5 expire 5 lines", - 15, - 18, - ), - ( - "01-23 10:01:25.642 2116 2711 I chatty : uid=1000(system) Binder:2116_5 expire 5 lines", - 83, - 88, - ), - ]; - cases.iter().for_each(|(content, from, to)| { - let converted = convert(content).expect("Input string should be parsed as well"); - let map = mapper.create_map(&converted).expect("Map should be built"); - assert_eq!(map.len(), 1); - assert_eq!(&map[0].from, from); - assert_eq!(&map[0].to, to); - assert_eq!(map[0].color, Some(String::from("#a0a"))); - assert_eq!(map[0].background, Some(String::from("#000"))); - }); - let cases = [( - "01-23 16:59:19.469 2116 5211 I chatty : uid=1000(system) Binder:2116_17 expire 2 lines", - 0, - 89, - )]; - cases.iter().for_each(|(content, from, to)| { - let converted = convert(content).expect("Input string should be parsed as well"); - let map = mapper.create_map(&converted).expect("Map should be built"); - assert_eq!(map.len(), 1); - assert_eq!(&map[0].from, from); - assert_eq!(&map[0].to, to); - assert!(map[0].color.is_some()); - assert!(map[0].background.is_none()); - }); - let cases = [ - ( - "lines01-23 10:01:25.642 2116 2711 I lineschatty : uid=1000(system) Binder:2116_5 expire 5 lines", - 3, - ), - ( - "lineslineslines01-23 10:01:25.642 2116 2711 I chatty : uid=1000(system) Binder:2116_5 expire 5 lines", - 4, - ), - ( - "lines01-23 10:01:25.642 lines2116 2711 I lineschatty : uid=1000(system) Binder:2116_5 expire 5 lines", - 4, - ), - ]; - cases.iter().for_each(|(content, count)| { - let converted = convert(content).expect("Input string should be parsed as well"); - let map = mapper.create_map(&converted).expect("Map should be built"); - assert_eq!(&map.len(), count); - }); -} diff --git a/application/apps/rustcore/wasm-bindings/src/filter.rs b/application/apps/rustcore/wasm-bindings/src/filter.rs deleted file mode 100644 index 1a4fab0816..0000000000 --- a/application/apps/rustcore/wasm-bindings/src/filter.rs +++ /dev/null @@ -1,84 +0,0 @@ -extern crate wasm_bindgen; - -use regex::Regex; -use std::str::FromStr; -use wasm_bindgen::prelude::*; -use wasm_bindgen_test::*; - -#[wasm_bindgen] -pub fn get_filter_error( - filter: String, - case_sensitive: bool, - whole_word: bool, - regex: bool, -) -> Option { - let regex_as_str = filter_as_regex(filter, case_sensitive, whole_word, regex); - Regex::from_str(®ex_as_str).map_or_else(|err| Some(err.to_string()), |_| None) -} - -fn filter_as_regex(filter: String, case_sensitive: bool, whole_word: bool, regex: bool) -> String { - let word_marker = if whole_word { "\\b" } else { "" }; - let ignore_case_start = if case_sensitive { "(?i)" } else { "" }; - let ignore_case_end = if case_sensitive { "(?-i)" } else { "" }; - let subject = if regex { - filter - } else { - regex::escape(&filter) - }; - format!("{ignore_case_start}{word_marker}{subject}{word_marker}{ignore_case_end}",) -} - -#[allow(dead_code)] -#[wasm_bindgen_test] -fn plain_string_regex_on() { - let filter = String::from("Some random filter"); - let case_sesitive = false; - let whole_word = false; - let regex = true; - assert_eq!( - get_filter_error(filter, case_sesitive, whole_word, regex), - None - ); -} - -#[allow(dead_code)] -#[wasm_bindgen_test] -fn plain_string_regex_off() { - let filter = String::from("Some random filter"); - let case_sesitive = false; - let whole_word = false; - let regex = false; - assert_eq!( - get_filter_error(filter, case_sesitive, whole_word, regex), - None - ); -} - -#[allow(dead_code)] -#[wasm_bindgen_test] -fn valid_regex() { - let filter = String::from(r"\[Warn\]"); - let case_sesitive = false; - let whole_word = false; - let regex = true; - assert_eq!( - get_filter_error(filter, case_sesitive, whole_word, regex), - None - ); -} - -#[allow(dead_code)] -#[wasm_bindgen_test] -fn invalid_regex() { - let filter = String::from(r"\[Warn(\]"); - let case_sesitive = false; - let whole_word = false; - let regex = true; - match get_filter_error(filter, case_sesitive, whole_word, regex) { - Some(result) => assert_eq!( - result, - "regex parse error:\n \\[Warn(\\]\n ^\nerror: unclosed group" - ), - None => panic!("Invalid regular expression should return error message"), - } -} diff --git a/application/apps/rustcore/wasm-bindings/src/lib.rs b/application/apps/rustcore/wasm-bindings/src/lib.rs deleted file mode 100644 index 330693e581..0000000000 --- a/application/apps/rustcore/wasm-bindings/src/lib.rs +++ /dev/null @@ -1,3 +0,0 @@ -pub mod ansi; -pub mod filter; -pub mod matcher; diff --git a/application/apps/rustcore/wasm-bindings/src/matcher.rs b/application/apps/rustcore/wasm-bindings/src/matcher.rs deleted file mode 100644 index 79bf54744e..0000000000 --- a/application/apps/rustcore/wasm-bindings/src/matcher.rs +++ /dev/null @@ -1,334 +0,0 @@ -extern crate fuzzy_matcher; -extern crate wasm_bindgen; - -use fuzzy_matcher::{FuzzyMatcher, skim::SkimMatcherV2}; -use std::{collections::HashMap, str::from_utf8}; -use wasm_bindgen::prelude::*; -use wasm_bindgen_test::*; - -#[wasm_bindgen] -pub struct Matcher { - matcher: SkimMatcherV2, - items_initial: Vec>, - items_scored: HashMap, i64)>, -} - -impl Default for Matcher { - fn default() -> Self { - Self::new() - } -} - -#[wasm_bindgen] -impl Matcher { - #[wasm_bindgen] - pub fn new() -> Self { - Self { - matcher: SkimMatcherV2::default(), - items_initial: Vec::new(), - items_scored: HashMap::new(), - } - } - - #[wasm_bindgen] - pub fn set_item(&mut self, item: JsValue) -> Result { - match serde_wasm_bindgen::from_value::>(item) { - Ok(item) => { - self.items_initial.push(item); - self.search(String::new(), None); - Ok(self.items_initial.len() - 1) - } - Err(err) => Err(format!("Parsing item into JSON String failed: {err}")), - } - } - - #[wasm_bindgen] - pub fn set_items(&mut self, items: JsValue) -> Result { - match serde_wasm_bindgen::from_value::>>(items) { - Ok(mut items) => { - let from = self.items_initial.len(); - self.items_initial.append(&mut items); - self.search(String::new(), None); - Ok(from) - } - Err(err) => Err(format!("Parsing item into JSON String failed: {err}")), - } - } - - #[wasm_bindgen] - pub fn len(&self) -> usize { - self.items_initial.len() - } - - #[wasm_bindgen] - pub fn is_empty(&self) -> bool { - self.items_initial.is_empty() - } - - #[wasm_bindgen] - pub fn search(&mut self, query: String, tag: Option) { - self.items_scored = HashMap::new(); - let mut total_score: i64; - let mut temp_hashmap: HashMap = HashMap::new(); - for (index, item) in self.items_initial.iter().enumerate() { - total_score = 0; - for (key, value) in item { - if query.is_empty() { - temp_hashmap.insert(key.clone(), value.clone()); - temp_hashmap.insert(format!("html_{key}"), value.to_string()); - total_score += (self.items_initial.len() - index) as i64; - } else { - match self.matcher.fuzzy_indices(value.as_str(), &query) { - Some(score) => { - let tagged_match = self.tag_match(value.to_owned(), score.1, &tag); - temp_hashmap.insert(key.clone(), value.to_owned()); - temp_hashmap.insert(format!("html_{key}"), tagged_match); - total_score += score.0; - } - None => { - temp_hashmap.insert(key.clone(), value.clone()); - temp_hashmap.insert(format!("html_{key}"), value.to_string()); - } - } - } - } - self.items_scored - .insert(index, (temp_hashmap.to_owned(), total_score)); - temp_hashmap.clear(); - } - } - - #[wasm_bindgen] - pub fn get_html_of(&self, index: usize, property: String) -> Option { - match self.items_scored.get(&index) { - Some(item) => item - .0 - .get(&property) - .as_ref() - .map(|html_value| html_value.to_string()), - None => None, - } - } - - #[wasm_bindgen] - pub fn get_score(&self, index: usize) -> i64 { - match self.items_scored.get(&index) { - Some(item) => item.1, - None => 0, - } - } - - fn tag_match(&self, mut value: String, indexes: Vec, tag: &Option) -> String { - let tag = tag.to_owned().unwrap_or_else(|| "span".to_string()); - let op_tag = format!("<{tag}>"); - let ed_tag = format!(""); - let value_clone = value.clone(); - let value_bytes = value_clone.as_bytes(); - let mut index = indexes.iter().rev(); - let mut start = 0; - let mut prev: usize = 0; - - if let Some(&curr) = index.next() { - start = curr; - prev = curr; - } - - for &curr in index { - if (curr + 1) != prev { - match from_utf8(&value_bytes[prev..start + 1]) { - Ok(substring) => { - value.replace_range( - prev..start + 1, - format!("{op_tag}{substring}{ed_tag}").as_str(), - ); - start = curr; - prev = curr; - } - Err(_err) => return value, - } - } else { - prev = curr; - } - } - match from_utf8(&value_bytes[prev..start + 1]) { - Ok(substring) => { - value.replace_range( - prev..start + 1, - format!("{op_tag}{substring}{ed_tag}").as_str(), - ); - value - } - Err(_err) => value, - } - } -} - -fn test(query: String, tag: Option, expected: Vec>) { - let mut matcher = Matcher::new(); - let items = Vec::from([ - HashMap::from([ - ("name", "very_large_file.dlt"), - ("size", "20gb"), - ("path", "/home/user/Desktop/very_large_file.dlt"), - ]), - HashMap::from([ - ("name", "medium_sized_file.txt"), - ("size", "15mb"), - ("path", "/home/user/Desktop/medium_sized_file.txt"), - ]), - HashMap::from([ - ("name", "small_file.log"), - ("size", "630kb"), - ("path", "/home/user/Desktop/small_file.log"), - ]), - ]); - for item in &items { - match serde_wasm_bindgen::to_value(&item) { - Ok(item) => { - if let Err(err) = matcher.set_item(item) { - panic!("{err}") - } - } - Err(err) => panic!("{err}"), - } - } - matcher.search(query, tag); - for (index, map) in expected.iter().enumerate() { - for (&key, &value) in map { - match matcher.get_html_of(index, key.to_string()) { - Some(html) => assert_eq!(html, value), - None => panic!("Failed to get html of {key}"), - } - } - } -} - -#[allow(dead_code)] -#[wasm_bindgen_test] -fn all_match() { - let query = "l".to_string(); - let tag: Option = None; - let expected = Vec::from([ - HashMap::from([ - ("html_name", "very_large_file.dlt"), - ("html_size", "20gb"), - ( - "html_path", - "/home/user/Desktop/very_large_file.dlt", - ), - ]), - HashMap::from([ - ("html_name", "medium_sized_file.txt"), - ("html_size", "15mb"), - ( - "html_path", - "/home/user/Desktop/medium_sized_file.txt", - ), - ]), - HashMap::from([ - ("html_name", "small_file.log"), - ("html_size", "630kb"), - ( - "html_path", - "/home/user/Desktop/small_file.log", - ), - ]), - ]); - test(query, tag, expected); -} - -#[allow(dead_code)] -#[wasm_bindgen_test] -fn no_match() { - let query = "c".to_string(); - let tag: Option = None; - let expected = Vec::from([ - HashMap::from([ - ("html_name", "very_large_file.dlt"), - ("html_size", "20gb"), - ("html_path", "/home/user/Desktop/very_large_file.dlt"), - ]), - HashMap::from([ - ("html_name", "medium_sized_file.txt"), - ("html_size", "15mb"), - ("html_path", "/home/user/Desktop/medium_sized_file.txt"), - ]), - HashMap::from([ - ("html_name", "small_file.log"), - ("html_size", "630kb"), - ("html_path", "/home/user/Desktop/small_file.log"), - ]), - ]); - test(query, tag, expected); -} - -#[allow(dead_code)] -#[wasm_bindgen_test] -fn scattered_match() { - let query = "mel".to_string(); - let tag: Option = None; - let expected = Vec::from([ - HashMap::from([ - ("html_name", "very_large_file.dlt"), - ("html_size", "20gb"), - ( - "html_path", - "/home/user/Desktop/very_large_file.dlt", - ), - ]), - HashMap::from([ - ( - "html_name", - "medium_sized_file.txt", - ), - ("html_size", "15mb"), - ( - "html_path", - "/home/user/Desktop/medium_sized_file.txt", - ), - ]), - HashMap::from([ - ( - "html_name", - "small_file.log", - ), - ("html_size", "630kb"), - ( - "html_path", - "/home/user/Desktop/small_file.log", - ), - ]), - ]); - test(query, tag, expected); -} - -#[allow(dead_code)] -#[wasm_bindgen_test] -fn few_match() { - let query = "g".to_string(); - let tag: Option = None; - let expected = Vec::from([ - HashMap::from([ - ("html_name", "very_large_file.dlt"), - ("html_size", "20gb"), - ( - "html_path", - "/home/user/Desktop/very_large_file.dlt", - ), - ]), - HashMap::from([ - ("html_name", "medium_sized_file.txt"), - ("html_size", "15mb"), - ("html_path", "/home/user/Desktop/medium_sized_file.txt"), - ]), - HashMap::from([ - ("html_name", "small_file.log"), - ("html_size", "630kb"), - ( - "html_path", - "/home/user/Desktop/small_file.log", - ), - ]), - ]); - test(query, tag, expected); -} diff --git a/application/apps/rustcore/wasm-bindings/tsconfig.json b/application/apps/rustcore/wasm-bindings/tsconfig.json deleted file mode 100644 index c84206e192..0000000000 --- a/application/apps/rustcore/wasm-bindings/tsconfig.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "compilerOptions": { - "forceConsistentCasingInFileNames": true, - "strict": true, - "noImplicitOverride": true, - "noPropertyAccessFromIndexSignature": true, - "noImplicitReturns": true, - "noFallthroughCasesInSwitch": true, - "sourceMap": true, - "declaration": false, - "downlevelIteration": true, - "experimentalDecorators": true, - "moduleResolution": "node", - "importHelpers": true, - "target": "ESNext", - "module": "ESNext", - "lib": ["ESNext", "DOM"], - "outDir": "./dist/out-tsc" - }, - "include": ["spec/**/*"] -} diff --git a/application/apps/rustcore/wasm-bindings/webpack.config.js b/application/apps/rustcore/wasm-bindings/webpack.config.js deleted file mode 100644 index 70e1044a76..0000000000 --- a/application/apps/rustcore/wasm-bindings/webpack.config.js +++ /dev/null @@ -1,36 +0,0 @@ -const path = require("path"); -const WasmPackPlugin = require('@wasm-tool/wasm-pack-plugin'); - -module.exports = { - devtool: "inline-source-map", - devServer: { - static: path.join(__dirname, 'dist'), - compress: true - }, - mode: "none", - module: { - rules: [ - { - test: /\.ts$/, - exclude: /node_modules/, - use: "ts-loader", - } - ], - }, - output: { - filename: "bundle.js", - path: path.resolve(__dirname, "dist"), - }, - plugins: [ - new WasmPackPlugin({ - crateDirectory: __dirname, - outDir: "pkg" - }), - ], - resolve: { - extensions: [".tsx", ".ts", ".js", ".wasm"], - }, - experiments: { - asyncWebAssembly: true - }, -}; \ No newline at end of file diff --git a/application/apps/rustcore/wasm-bindings/yarn.lock b/application/apps/rustcore/wasm-bindings/yarn.lock deleted file mode 100644 index d66210cb0e..0000000000 --- a/application/apps/rustcore/wasm-bindings/yarn.lock +++ /dev/null @@ -1,5821 +0,0 @@ -# This file is generated by running "yarn install" inside your project. -# Manual changes might be lost - proceed with caution! - -__metadata: - version: 8 - cacheKey: 10c0 - -"@ampproject/remapping@npm:^2.2.0": - version: 2.3.0 - resolution: "@ampproject/remapping@npm:2.3.0" - dependencies: - "@jridgewell/gen-mapping": "npm:^0.3.5" - "@jridgewell/trace-mapping": "npm:^0.3.24" - checksum: 10c0/81d63cca5443e0f0c72ae18b544cc28c7c0ec2cea46e7cb888bb0e0f411a1191d0d6b7af798d54e30777d8d1488b2ec0732aac2be342d3d7d3ffd271c6f489ed - languageName: node - linkType: hard - -"@babel/code-frame@npm:^7.25.9, @babel/code-frame@npm:^7.26.0, @babel/code-frame@npm:^7.26.2": - version: 7.26.2 - resolution: "@babel/code-frame@npm:7.26.2" - dependencies: - "@babel/helper-validator-identifier": "npm:^7.25.9" - js-tokens: "npm:^4.0.0" - picocolors: "npm:^1.0.0" - checksum: 10c0/7d79621a6849183c415486af99b1a20b84737e8c11cd55b6544f688c51ce1fd710e6d869c3dd21232023da272a79b91efb3e83b5bc2dc65c1187c5fcd1b72ea8 - languageName: node - linkType: hard - -"@babel/compat-data@npm:^7.26.5": - version: 7.26.5 - resolution: "@babel/compat-data@npm:7.26.5" - checksum: 10c0/9d2b41f0948c3dfc5de44d9f789d2208c2ea1fd7eb896dfbb297fe955e696728d6f363c600cd211e7f58ccbc2d834fe516bb1e4cf883bbabed8a32b038afc1a0 - languageName: node - linkType: hard - -"@babel/core@npm:^7.7.5": - version: 7.26.0 - resolution: "@babel/core@npm:7.26.0" - dependencies: - "@ampproject/remapping": "npm:^2.2.0" - "@babel/code-frame": "npm:^7.26.0" - "@babel/generator": "npm:^7.26.0" - "@babel/helper-compilation-targets": "npm:^7.25.9" - "@babel/helper-module-transforms": "npm:^7.26.0" - "@babel/helpers": "npm:^7.26.0" - "@babel/parser": "npm:^7.26.0" - "@babel/template": "npm:^7.25.9" - "@babel/traverse": "npm:^7.25.9" - "@babel/types": "npm:^7.26.0" - convert-source-map: "npm:^2.0.0" - debug: "npm:^4.1.0" - gensync: "npm:^1.0.0-beta.2" - json5: "npm:^2.2.3" - semver: "npm:^6.3.1" - checksum: 10c0/91de73a7ff5c4049fbc747930aa039300e4d2670c2a91f5aa622f1b4868600fc89b01b6278385fbcd46f9574186fa3d9b376a9e7538e50f8d118ec13cfbcb63e - languageName: node - linkType: hard - -"@babel/generator@npm:^7.26.0, @babel/generator@npm:^7.26.5": - version: 7.26.5 - resolution: "@babel/generator@npm:7.26.5" - dependencies: - "@babel/parser": "npm:^7.26.5" - "@babel/types": "npm:^7.26.5" - "@jridgewell/gen-mapping": "npm:^0.3.5" - "@jridgewell/trace-mapping": "npm:^0.3.25" - jsesc: "npm:^3.0.2" - checksum: 10c0/3be79e0aa03f38858a465d12ee2e468320b9122dc44fc85984713e32f16f4d77ce34a16a1a9505972782590e0b8d847b6f373621f9c6fafa1906d90f31416cb0 - languageName: node - linkType: hard - -"@babel/helper-compilation-targets@npm:^7.25.9": - version: 7.26.5 - resolution: "@babel/helper-compilation-targets@npm:7.26.5" - dependencies: - "@babel/compat-data": "npm:^7.26.5" - "@babel/helper-validator-option": "npm:^7.25.9" - browserslist: "npm:^4.24.0" - lru-cache: "npm:^5.1.1" - semver: "npm:^6.3.1" - checksum: 10c0/9da5c77e5722f1a2fcb3e893049a01d414124522bbf51323bb1a0c9dcd326f15279836450fc36f83c9e8a846f3c40e88be032ed939c5a9840922bed6073edfb4 - languageName: node - linkType: hard - -"@babel/helper-module-imports@npm:^7.25.9": - version: 7.25.9 - resolution: "@babel/helper-module-imports@npm:7.25.9" - dependencies: - "@babel/traverse": "npm:^7.25.9" - "@babel/types": "npm:^7.25.9" - checksum: 10c0/078d3c2b45d1f97ffe6bb47f61961be4785d2342a4156d8b42c92ee4e1b7b9e365655dd6cb25329e8fe1a675c91eeac7e3d04f0c518b67e417e29d6e27b6aa70 - languageName: node - linkType: hard - -"@babel/helper-module-transforms@npm:^7.26.0": - version: 7.26.0 - resolution: "@babel/helper-module-transforms@npm:7.26.0" - dependencies: - "@babel/helper-module-imports": "npm:^7.25.9" - "@babel/helper-validator-identifier": "npm:^7.25.9" - "@babel/traverse": "npm:^7.25.9" - peerDependencies: - "@babel/core": ^7.0.0 - checksum: 10c0/ee111b68a5933481d76633dad9cdab30c41df4479f0e5e1cc4756dc9447c1afd2c9473b5ba006362e35b17f4ebddd5fca090233bef8dfc84dca9d9127e56ec3a - languageName: node - linkType: hard - -"@babel/helper-string-parser@npm:^7.25.9": - version: 7.25.9 - resolution: "@babel/helper-string-parser@npm:7.25.9" - checksum: 10c0/7244b45d8e65f6b4338a6a68a8556f2cb161b782343e97281a5f2b9b93e420cad0d9f5773a59d79f61d0c448913d06f6a2358a87f2e203cf112e3c5b53522ee6 - languageName: node - linkType: hard - -"@babel/helper-validator-identifier@npm:^7.25.9": - version: 7.25.9 - resolution: "@babel/helper-validator-identifier@npm:7.25.9" - checksum: 10c0/4fc6f830177b7b7e887ad3277ddb3b91d81e6c4a24151540d9d1023e8dc6b1c0505f0f0628ae653601eb4388a8db45c1c14b2c07a9173837aef7e4116456259d - languageName: node - linkType: hard - -"@babel/helper-validator-option@npm:^7.25.9": - version: 7.25.9 - resolution: "@babel/helper-validator-option@npm:7.25.9" - checksum: 10c0/27fb195d14c7dcb07f14e58fe77c44eea19a6a40a74472ec05c441478fa0bb49fa1c32b2d64be7a38870ee48ef6601bdebe98d512f0253aea0b39756c4014f3e - languageName: node - linkType: hard - -"@babel/helpers@npm:^7.26.0": - version: 7.26.0 - resolution: "@babel/helpers@npm:7.26.0" - dependencies: - "@babel/template": "npm:^7.25.9" - "@babel/types": "npm:^7.26.0" - checksum: 10c0/343333cced6946fe46617690a1d0789346960910225ce359021a88a60a65bc0d791f0c5d240c0ed46cf8cc63b5fd7df52734ff14e43b9c32feae2b61b1647097 - languageName: node - linkType: hard - -"@babel/parser@npm:^7.25.9, @babel/parser@npm:^7.26.0, @babel/parser@npm:^7.26.5": - version: 7.26.5 - resolution: "@babel/parser@npm:7.26.5" - dependencies: - "@babel/types": "npm:^7.26.5" - bin: - parser: ./bin/babel-parser.js - checksum: 10c0/2e77dd99ee028ee3c10fa03517ae1169f2432751adf71315e4dc0d90b61639d51760d622f418f6ac665ae4ea65f8485232a112ea0e76f18e5900225d3d19a61e - languageName: node - linkType: hard - -"@babel/template@npm:^7.25.9": - version: 7.25.9 - resolution: "@babel/template@npm:7.25.9" - dependencies: - "@babel/code-frame": "npm:^7.25.9" - "@babel/parser": "npm:^7.25.9" - "@babel/types": "npm:^7.25.9" - checksum: 10c0/ebe677273f96a36c92cc15b7aa7b11cc8bc8a3bb7a01d55b2125baca8f19cae94ff3ce15f1b1880fb8437f3a690d9f89d4e91f16fc1dc4d3eb66226d128983ab - languageName: node - linkType: hard - -"@babel/traverse@npm:^7.25.9": - version: 7.26.5 - resolution: "@babel/traverse@npm:7.26.5" - dependencies: - "@babel/code-frame": "npm:^7.26.2" - "@babel/generator": "npm:^7.26.5" - "@babel/parser": "npm:^7.26.5" - "@babel/template": "npm:^7.25.9" - "@babel/types": "npm:^7.26.5" - debug: "npm:^4.3.1" - globals: "npm:^11.1.0" - checksum: 10c0/0779059ecf63e31446564cf31adf170e701e8017ef02c819c57924a9a83d6b2ce41dbff3ef295589da9410497a3e575655bb8084ca470e0ab1bc193128afa9fe - languageName: node - linkType: hard - -"@babel/types@npm:^7.25.9, @babel/types@npm:^7.26.0, @babel/types@npm:^7.26.5": - version: 7.26.5 - resolution: "@babel/types@npm:7.26.5" - dependencies: - "@babel/helper-string-parser": "npm:^7.25.9" - "@babel/helper-validator-identifier": "npm:^7.25.9" - checksum: 10c0/0278053b69d7c2b8573aa36dc5242cad95f0d965e1c0ed21ccacac6330092e59ba5949753448f6d6eccf6ad59baaef270295cc05218352e060ea8c68388638c4 - languageName: node - linkType: hard - -"@colors/colors@npm:1.5.0": - version: 1.5.0 - resolution: "@colors/colors@npm:1.5.0" - checksum: 10c0/eb42729851adca56d19a08e48d5a1e95efd2a32c55ae0323de8119052be0510d4b7a1611f2abcbf28c044a6c11e6b7d38f99fccdad7429300c37a8ea5fb95b44 - languageName: node - linkType: hard - -"@cspotcode/source-map-support@npm:^0.8.0": - version: 0.8.1 - resolution: "@cspotcode/source-map-support@npm:0.8.1" - dependencies: - "@jridgewell/trace-mapping": "npm:0.3.9" - checksum: 10c0/05c5368c13b662ee4c122c7bfbe5dc0b613416672a829f3e78bc49a357a197e0218d6e74e7c66cfcd04e15a179acab080bd3c69658c9fbefd0e1ccd950a07fc6 - languageName: node - linkType: hard - -"@discoveryjs/json-ext@npm:^0.6.1": - version: 0.6.3 - resolution: "@discoveryjs/json-ext@npm:0.6.3" - checksum: 10c0/778a9f9d5c3696da3c1f9fa4186613db95a1090abbfb6c2601430645c0d0158cd5e4ba4f32c05904e2dd2747d57710f6aab22bd2f8aa3c4e8feab9b247c65d85 - languageName: node - linkType: hard - -"@isaacs/cliui@npm:^8.0.2": - version: 8.0.2 - resolution: "@isaacs/cliui@npm:8.0.2" - dependencies: - string-width: "npm:^5.1.2" - string-width-cjs: "npm:string-width@^4.2.0" - strip-ansi: "npm:^7.0.1" - strip-ansi-cjs: "npm:strip-ansi@^6.0.1" - wrap-ansi: "npm:^8.1.0" - wrap-ansi-cjs: "npm:wrap-ansi@^7.0.0" - checksum: 10c0/b1bf42535d49f11dc137f18d5e4e63a28c5569de438a221c369483731e9dac9fb797af554e8bf02b6192d1e5eba6e6402cf93900c3d0ac86391d00d04876789e - languageName: node - linkType: hard - -"@isaacs/fs-minipass@npm:^4.0.0": - version: 4.0.1 - resolution: "@isaacs/fs-minipass@npm:4.0.1" - dependencies: - minipass: "npm:^7.0.4" - checksum: 10c0/c25b6dc1598790d5b55c0947a9b7d111cfa92594db5296c3b907e2f533c033666f692a3939eadac17b1c7c40d362d0b0635dc874cbfe3e70db7c2b07cc97a5d2 - languageName: node - linkType: hard - -"@istanbuljs/schema@npm:^0.1.2": - version: 0.1.3 - resolution: "@istanbuljs/schema@npm:0.1.3" - checksum: 10c0/61c5286771676c9ca3eb2bd8a7310a9c063fb6e0e9712225c8471c582d157392c88f5353581c8c9adbe0dff98892317d2fdfc56c3499aa42e0194405206a963a - languageName: node - linkType: hard - -"@jridgewell/gen-mapping@npm:^0.3.5": - version: 0.3.8 - resolution: "@jridgewell/gen-mapping@npm:0.3.8" - dependencies: - "@jridgewell/set-array": "npm:^1.2.1" - "@jridgewell/sourcemap-codec": "npm:^1.4.10" - "@jridgewell/trace-mapping": "npm:^0.3.24" - checksum: 10c0/c668feaf86c501d7c804904a61c23c67447b2137b813b9ce03eca82cb9d65ac7006d766c218685d76e3d72828279b6ee26c347aa1119dab23fbaf36aed51585a - languageName: node - linkType: hard - -"@jridgewell/resolve-uri@npm:^3.0.3, @jridgewell/resolve-uri@npm:^3.1.0": - version: 3.1.2 - resolution: "@jridgewell/resolve-uri@npm:3.1.2" - checksum: 10c0/d502e6fb516b35032331406d4e962c21fe77cdf1cbdb49c6142bcbd9e30507094b18972778a6e27cbad756209cfe34b1a27729e6fa08a2eb92b33943f680cf1e - languageName: node - linkType: hard - -"@jridgewell/set-array@npm:^1.2.1": - version: 1.2.1 - resolution: "@jridgewell/set-array@npm:1.2.1" - checksum: 10c0/2a5aa7b4b5c3464c895c802d8ae3f3d2b92fcbe84ad12f8d0bfbb1f5ad006717e7577ee1fd2eac00c088abe486c7adb27976f45d2941ff6b0b92b2c3302c60f4 - languageName: node - linkType: hard - -"@jridgewell/source-map@npm:^0.3.3": - version: 0.3.6 - resolution: "@jridgewell/source-map@npm:0.3.6" - dependencies: - "@jridgewell/gen-mapping": "npm:^0.3.5" - "@jridgewell/trace-mapping": "npm:^0.3.25" - checksum: 10c0/6a4ecc713ed246ff8e5bdcc1ef7c49aaa93f7463d948ba5054dda18b02dcc6a055e2828c577bcceee058f302ce1fc95595713d44f5c45e43d459f88d267f2f04 - languageName: node - linkType: hard - -"@jridgewell/sourcemap-codec@npm:^1.4.10, @jridgewell/sourcemap-codec@npm:^1.4.14": - version: 1.5.0 - resolution: "@jridgewell/sourcemap-codec@npm:1.5.0" - checksum: 10c0/2eb864f276eb1096c3c11da3e9bb518f6d9fc0023c78344cdc037abadc725172c70314bdb360f2d4b7bffec7f5d657ce006816bc5d4ecb35e61b66132db00c18 - languageName: node - linkType: hard - -"@jridgewell/trace-mapping@npm:0.3.9": - version: 0.3.9 - resolution: "@jridgewell/trace-mapping@npm:0.3.9" - dependencies: - "@jridgewell/resolve-uri": "npm:^3.0.3" - "@jridgewell/sourcemap-codec": "npm:^1.4.10" - checksum: 10c0/fa425b606d7c7ee5bfa6a31a7b050dd5814b4082f318e0e4190f991902181b4330f43f4805db1dd4f2433fd0ed9cc7a7b9c2683f1deeab1df1b0a98b1e24055b - languageName: node - linkType: hard - -"@jridgewell/trace-mapping@npm:^0.3.24, @jridgewell/trace-mapping@npm:^0.3.25": - version: 0.3.25 - resolution: "@jridgewell/trace-mapping@npm:0.3.25" - dependencies: - "@jridgewell/resolve-uri": "npm:^3.1.0" - "@jridgewell/sourcemap-codec": "npm:^1.4.14" - checksum: 10c0/3d1ce6ebc69df9682a5a8896b414c6537e428a1d68b02fcc8363b04284a8ca0df04d0ee3013132252ab14f2527bc13bea6526a912ecb5658f0e39fd2860b4df4 - languageName: node - linkType: hard - -"@jsonjoy.com/base64@npm:^1.1.1": - version: 1.1.2 - resolution: "@jsonjoy.com/base64@npm:1.1.2" - peerDependencies: - tslib: 2 - checksum: 10c0/88717945f66dc89bf58ce75624c99fe6a5c9a0c8614e26d03e406447b28abff80c69fb37dabe5aafef1862cf315071ae66e5c85f6018b437d95f8d13d235e6eb - languageName: node - linkType: hard - -"@jsonjoy.com/json-pack@npm:^1.0.3": - version: 1.1.1 - resolution: "@jsonjoy.com/json-pack@npm:1.1.1" - dependencies: - "@jsonjoy.com/base64": "npm:^1.1.1" - "@jsonjoy.com/util": "npm:^1.1.2" - hyperdyperid: "npm:^1.2.0" - thingies: "npm:^1.20.0" - peerDependencies: - tslib: 2 - checksum: 10c0/fd0d8baa0c8eba536924540717901e0d7eed742576991033cceeb32dcce801ee0a4318cf6eb40b444c9e78f69ddbd4f38b9eb0041e9e54c17e7b6d1219b12e1d - languageName: node - linkType: hard - -"@jsonjoy.com/util@npm:^1.1.2, @jsonjoy.com/util@npm:^1.3.0": - version: 1.5.0 - resolution: "@jsonjoy.com/util@npm:1.5.0" - peerDependencies: - tslib: 2 - checksum: 10c0/0065ae12c4108d8aede01a479c8d2b5a39bce99e9a449d235befc753f57e8385d9c1115720529f26597840b7398d512898155423d9859fd638319fb0c827365d - languageName: node - linkType: hard - -"@leichtgewicht/ip-codec@npm:^2.0.1": - version: 2.0.5 - resolution: "@leichtgewicht/ip-codec@npm:2.0.5" - checksum: 10c0/14a0112bd59615eef9e3446fea018045720cd3da85a98f801a685a818b0d96ef2a1f7227e8d271def546b2e2a0fe91ef915ba9dc912ab7967d2317b1a051d66b - languageName: node - linkType: hard - -"@npmcli/agent@npm:^3.0.0": - version: 3.0.0 - resolution: "@npmcli/agent@npm:3.0.0" - dependencies: - agent-base: "npm:^7.1.0" - http-proxy-agent: "npm:^7.0.0" - https-proxy-agent: "npm:^7.0.1" - lru-cache: "npm:^10.0.1" - socks-proxy-agent: "npm:^8.0.3" - checksum: 10c0/efe37b982f30740ee77696a80c196912c274ecd2cb243bc6ae7053a50c733ce0f6c09fda085145f33ecf453be19654acca74b69e81eaad4c90f00ccffe2f9271 - languageName: node - linkType: hard - -"@npmcli/fs@npm:^4.0.0": - version: 4.0.0 - resolution: "@npmcli/fs@npm:4.0.0" - dependencies: - semver: "npm:^7.3.5" - checksum: 10c0/c90935d5ce670c87b6b14fab04a965a3b8137e585f8b2a6257263bd7f97756dd736cb165bb470e5156a9e718ecd99413dccc54b1138c1a46d6ec7cf325982fe5 - languageName: node - linkType: hard - -"@pkgjs/parseargs@npm:^0.11.0": - version: 0.11.0 - resolution: "@pkgjs/parseargs@npm:0.11.0" - checksum: 10c0/5bd7576bb1b38a47a7fc7b51ac9f38748e772beebc56200450c4a817d712232b8f1d3ef70532c80840243c657d491cf6a6be1e3a214cff907645819fdc34aadd - languageName: node - linkType: hard - -"@rollup/rollup-linux-x64-gnu@npm:4.9.5": - version: 4.9.5 - resolution: "@rollup/rollup-linux-x64-gnu@npm:4.9.5" - conditions: os=linux & cpu=x64 & libc=glibc - languageName: node - linkType: hard - -"@socket.io/component-emitter@npm:~3.1.0": - version: 3.1.2 - resolution: "@socket.io/component-emitter@npm:3.1.2" - checksum: 10c0/c4242bad66f67e6f7b712733d25b43cbb9e19a595c8701c3ad99cbeb5901555f78b095e24852f862fffb43e96f1d8552e62def885ca82ae1bb05da3668fd87d7 - languageName: node - linkType: hard - -"@tsconfig/node10@npm:^1.0.7": - version: 1.0.11 - resolution: "@tsconfig/node10@npm:1.0.11" - checksum: 10c0/28a0710e5d039e0de484bdf85fee883bfd3f6a8980601f4d44066b0a6bcd821d31c4e231d1117731c4e24268bd4cf2a788a6787c12fc7f8d11014c07d582783c - languageName: node - linkType: hard - -"@tsconfig/node12@npm:^1.0.7": - version: 1.0.11 - resolution: "@tsconfig/node12@npm:1.0.11" - checksum: 10c0/dddca2b553e2bee1308a056705103fc8304e42bb2d2cbd797b84403a223b25c78f2c683ec3e24a095e82cd435387c877239bffcb15a590ba817cd3f6b9a99fd9 - languageName: node - linkType: hard - -"@tsconfig/node14@npm:^1.0.0": - version: 1.0.3 - resolution: "@tsconfig/node14@npm:1.0.3" - checksum: 10c0/67c1316d065fdaa32525bc9449ff82c197c4c19092b9663b23213c8cbbf8d88b6ed6a17898e0cbc2711950fbfaf40388938c1c748a2ee89f7234fc9e7fe2bf44 - languageName: node - linkType: hard - -"@tsconfig/node16@npm:^1.0.2": - version: 1.0.4 - resolution: "@tsconfig/node16@npm:1.0.4" - checksum: 10c0/05f8f2734e266fb1839eb1d57290df1664fe2aa3b0fdd685a9035806daa635f7519bf6d5d9b33f6e69dd545b8c46bd6e2b5c79acb2b1f146e885f7f11a42a5bb - languageName: node - linkType: hard - -"@types/body-parser@npm:*": - version: 1.19.5 - resolution: "@types/body-parser@npm:1.19.5" - dependencies: - "@types/connect": "npm:*" - "@types/node": "npm:*" - checksum: 10c0/aebeb200f25e8818d8cf39cd0209026750d77c9b85381cdd8deeb50913e4d18a1ebe4b74ca9b0b4d21952511eeaba5e9fbbf739b52731a2061e206ec60d568df - languageName: node - linkType: hard - -"@types/bonjour@npm:^3.5.13": - version: 3.5.13 - resolution: "@types/bonjour@npm:3.5.13" - dependencies: - "@types/node": "npm:*" - checksum: 10c0/eebedbca185ac3c39dd5992ef18d9e2a9f99e7f3c2f52f5561f90e9ed482c5d224c7962db95362712f580ed5713264e777a98d8f0bd8747f4eadf62937baed16 - languageName: node - linkType: hard - -"@types/connect-history-api-fallback@npm:^1.5.4": - version: 1.5.4 - resolution: "@types/connect-history-api-fallback@npm:1.5.4" - dependencies: - "@types/express-serve-static-core": "npm:*" - "@types/node": "npm:*" - checksum: 10c0/1b4035b627dcd714b05a22557f942e24a57ca48e7377dde0d2f86313fe685bc0a6566512a73257a55b5665b96c3041fb29228ac93331d8133011716215de8244 - languageName: node - linkType: hard - -"@types/connect@npm:*": - version: 3.4.38 - resolution: "@types/connect@npm:3.4.38" - dependencies: - "@types/node": "npm:*" - checksum: 10c0/2e1cdba2c410f25649e77856505cd60223250fa12dff7a503e492208dbfdd25f62859918f28aba95315251fd1f5e1ffbfca1e25e73037189ab85dd3f8d0a148c - languageName: node - linkType: hard - -"@types/cookie@npm:^0.4.1": - version: 0.4.1 - resolution: "@types/cookie@npm:0.4.1" - checksum: 10c0/f96afe12bd51be1ec61410b0641243d93fa3a494702407c787a4c872b5c8bcd39b224471452055e44a9ce42af1a636e87d161994226eaf4c2be9c30f60418409 - languageName: node - linkType: hard - -"@types/cors@npm:^2.8.12": - version: 2.8.17 - resolution: "@types/cors@npm:2.8.17" - dependencies: - "@types/node": "npm:*" - checksum: 10c0/457364c28c89f3d9ed34800e1de5c6eaaf344d1bb39af122f013322a50bc606eb2aa6f63de4e41a7a08ba7ef454473926c94a830636723da45bf786df032696d - languageName: node - linkType: hard - -"@types/eslint-scope@npm:^3.7.7": - version: 3.7.7 - resolution: "@types/eslint-scope@npm:3.7.7" - dependencies: - "@types/eslint": "npm:*" - "@types/estree": "npm:*" - checksum: 10c0/a0ecbdf2f03912679440550817ff77ef39a30fa8bfdacaf6372b88b1f931828aec392f52283240f0d648cf3055c5ddc564544a626bcf245f3d09fcb099ebe3cc - languageName: node - linkType: hard - -"@types/eslint@npm:*": - version: 9.6.1 - resolution: "@types/eslint@npm:9.6.1" - dependencies: - "@types/estree": "npm:*" - "@types/json-schema": "npm:*" - checksum: 10c0/69ba24fee600d1e4c5abe0df086c1a4d798abf13792d8cfab912d76817fe1a894359a1518557d21237fbaf6eda93c5ab9309143dee4c59ef54336d1b3570420e - languageName: node - linkType: hard - -"@types/estree@npm:*, @types/estree@npm:^1.0.6": - version: 1.0.6 - resolution: "@types/estree@npm:1.0.6" - checksum: 10c0/cdfd751f6f9065442cd40957c07fd80361c962869aa853c1c2fd03e101af8b9389d8ff4955a43a6fcfa223dd387a089937f95be0f3eec21ca527039fd2d9859a - languageName: node - linkType: hard - -"@types/express-serve-static-core@npm:*, @types/express-serve-static-core@npm:^5.0.0": - version: 5.0.5 - resolution: "@types/express-serve-static-core@npm:5.0.5" - dependencies: - "@types/node": "npm:*" - "@types/qs": "npm:*" - "@types/range-parser": "npm:*" - "@types/send": "npm:*" - checksum: 10c0/0b27f62835f55d061a41718c9eae5caf533f08a4d1f23107f15f929c64013e8ba43afc110a198bd70196ed2925932bdbd9da2cca802c7be8fc6ec0cc4292833d - languageName: node - linkType: hard - -"@types/express-serve-static-core@npm:^4.17.33": - version: 4.19.6 - resolution: "@types/express-serve-static-core@npm:4.19.6" - dependencies: - "@types/node": "npm:*" - "@types/qs": "npm:*" - "@types/range-parser": "npm:*" - "@types/send": "npm:*" - checksum: 10c0/4281f4ead71723f376b3ddf64868ae26244d434d9906c101cf8d436d4b5c779d01bd046e4ea0ed1a394d3e402216fabfa22b1fa4dba501061cd7c81c54045983 - languageName: node - linkType: hard - -"@types/express@npm:*": - version: 5.0.0 - resolution: "@types/express@npm:5.0.0" - dependencies: - "@types/body-parser": "npm:*" - "@types/express-serve-static-core": "npm:^5.0.0" - "@types/qs": "npm:*" - "@types/serve-static": "npm:*" - checksum: 10c0/0d74b53aefa69c3b3817ee9b5145fd50d7dbac52a8986afc2d7500085c446656d0b6dc13158c04e2d9f18f4324d4d93b0452337c5ff73dd086dca3e4ff11f47b - languageName: node - linkType: hard - -"@types/express@npm:^4.17.21": - version: 4.17.21 - resolution: "@types/express@npm:4.17.21" - dependencies: - "@types/body-parser": "npm:*" - "@types/express-serve-static-core": "npm:^4.17.33" - "@types/qs": "npm:*" - "@types/serve-static": "npm:*" - checksum: 10c0/12e562c4571da50c7d239e117e688dc434db1bac8be55613294762f84fd77fbd0658ccd553c7d3ab02408f385bc93980992369dd30e2ecd2c68c358e6af8fabf - languageName: node - linkType: hard - -"@types/http-errors@npm:*": - version: 2.0.4 - resolution: "@types/http-errors@npm:2.0.4" - checksum: 10c0/494670a57ad4062fee6c575047ad5782506dd35a6b9ed3894cea65830a94367bd84ba302eb3dde331871f6d70ca287bfedb1b2cf658e6132cd2cbd427ab56836 - languageName: node - linkType: hard - -"@types/http-proxy@npm:^1.17.8": - version: 1.17.15 - resolution: "@types/http-proxy@npm:1.17.15" - dependencies: - "@types/node": "npm:*" - checksum: 10c0/e2bf2fcdf23c88141b8d2c85ed5e5418b62ef78285884a2b5a717af55f4d9062136aa475489d10292093343df58fb81975f34bebd6b9df322288fd9821cbee07 - languageName: node - linkType: hard - -"@types/jasmine@npm:^5.1.5": - version: 5.1.5 - resolution: "@types/jasmine@npm:5.1.5" - checksum: 10c0/904a2a6bfe7478478ec73d502708dc4b4cc46fa554c459cee3e0be01efda96fba7d26ef8bec2f246d9163cc517407b135acabcf6f076c11aa514ed9b79bc67e5 - languageName: node - linkType: hard - -"@types/json-schema@npm:*, @types/json-schema@npm:^7.0.8, @types/json-schema@npm:^7.0.9": - version: 7.0.15 - resolution: "@types/json-schema@npm:7.0.15" - checksum: 10c0/a996a745e6c5d60292f36731dd41341339d4eeed8180bb09226e5c8d23759067692b1d88e5d91d72ee83dfc00d3aca8e7bd43ea120516c17922cbcb7c3e252db - languageName: node - linkType: hard - -"@types/mime@npm:^1": - version: 1.3.5 - resolution: "@types/mime@npm:1.3.5" - checksum: 10c0/c2ee31cd9b993804df33a694d5aa3fa536511a49f2e06eeab0b484fef59b4483777dbb9e42a4198a0809ffbf698081fdbca1e5c2218b82b91603dfab10a10fbc - languageName: node - linkType: hard - -"@types/node-forge@npm:^1.3.0": - version: 1.3.11 - resolution: "@types/node-forge@npm:1.3.11" - dependencies: - "@types/node": "npm:*" - checksum: 10c0/3d7d23ca0ba38ac0cf74028393bd70f31169ab9aba43f21deb787840170d307d662644bac07287495effe2812ddd7ac8a14dbd43f16c2936bbb06312e96fc3b9 - languageName: node - linkType: hard - -"@types/node@npm:*, @types/node@npm:>=10.0.0": - version: 22.10.7 - resolution: "@types/node@npm:22.10.7" - dependencies: - undici-types: "npm:~6.20.0" - checksum: 10c0/c941b4689dfc4044b64a5f601306cbcb0c7210be853ba378a5dd44137898c45accedd796ee002ad9407024cac7ecaf5049304951cb1d80ce3d7cebbbae56f20e - languageName: node - linkType: hard - -"@types/qs@npm:*": - version: 6.9.18 - resolution: "@types/qs@npm:6.9.18" - checksum: 10c0/790b9091348e06dde2c8e4118b5771ab386a8c22a952139a2eb0675360a2070d0b155663bf6f75b23f258fd0a1f7ffc0ba0f059d99a719332c03c40d9e9cd63b - languageName: node - linkType: hard - -"@types/range-parser@npm:*": - version: 1.2.7 - resolution: "@types/range-parser@npm:1.2.7" - checksum: 10c0/361bb3e964ec5133fa40644a0b942279ed5df1949f21321d77de79f48b728d39253e5ce0408c9c17e4e0fd95ca7899da36841686393b9f7a1e209916e9381a3c - languageName: node - linkType: hard - -"@types/retry@npm:0.12.2": - version: 0.12.2 - resolution: "@types/retry@npm:0.12.2" - checksum: 10c0/07481551a988cc90b423351919928b9ddcd14e3f5591cac3ab950851bb20646e55a10e89141b38bc3093d2056d4df73700b22ff2612976ac86a6367862381884 - languageName: node - linkType: hard - -"@types/send@npm:*": - version: 0.17.4 - resolution: "@types/send@npm:0.17.4" - dependencies: - "@types/mime": "npm:^1" - "@types/node": "npm:*" - checksum: 10c0/7f17fa696cb83be0a104b04b424fdedc7eaba1c9a34b06027239aba513b398a0e2b7279778af521f516a397ced417c96960e5f50fcfce40c4bc4509fb1a5883c - languageName: node - linkType: hard - -"@types/serve-index@npm:^1.9.4": - version: 1.9.4 - resolution: "@types/serve-index@npm:1.9.4" - dependencies: - "@types/express": "npm:*" - checksum: 10c0/94c1b9e8f1ea36a229e098e1643d5665d9371f8c2658521718e259130a237c447059b903bac0dcc96ee2c15fd63f49aa647099b7d0d437a67a6946527a837438 - languageName: node - linkType: hard - -"@types/serve-static@npm:*, @types/serve-static@npm:^1.15.5": - version: 1.15.7 - resolution: "@types/serve-static@npm:1.15.7" - dependencies: - "@types/http-errors": "npm:*" - "@types/node": "npm:*" - "@types/send": "npm:*" - checksum: 10c0/26ec864d3a626ea627f8b09c122b623499d2221bbf2f470127f4c9ebfe92bd8a6bb5157001372d4c4bd0dd37a1691620217d9dc4df5aa8f779f3fd996b1c60ae - languageName: node - linkType: hard - -"@types/sockjs@npm:^0.3.36": - version: 0.3.36 - resolution: "@types/sockjs@npm:0.3.36" - dependencies: - "@types/node": "npm:*" - checksum: 10c0/b20b7820ee813f22de4f2ce98bdd12c68c930e016a8912b1ed967595ac0d8a4cbbff44f4d486dd97f77f5927e7b5725bdac7472c9ec5b27f53a5a13179f0612f - languageName: node - linkType: hard - -"@types/ws@npm:^8.5.10": - version: 8.5.13 - resolution: "@types/ws@npm:8.5.13" - dependencies: - "@types/node": "npm:*" - checksum: 10c0/a5430aa479bde588e69cb9175518d72f9338b6999e3b2ae16fc03d3bdcff8347e486dc031e4ed14601260463c07e1f9a0d7511dfc653712b047c439c680b0b34 - languageName: node - linkType: hard - -"@wasm-tool/wasm-pack-plugin@npm:^1.6.0": - version: 1.7.0 - resolution: "@wasm-tool/wasm-pack-plugin@npm:1.7.0" - dependencies: - chalk: "npm:^2.4.1" - command-exists: "npm:^1.2.7" - watchpack: "npm:^2.1.1" - which: "npm:^2.0.2" - checksum: 10c0/657942706a742d914914ecf390ac498a44f556f296f54407813b9e9562bbbbd54360b598b72057d441de7f56f1a4f5d2d5edc9dc1b69772000bacb39d9ca39bc - languageName: node - linkType: hard - -"@webassemblyjs/ast@npm:1.14.1, @webassemblyjs/ast@npm:^1.14.1": - version: 1.14.1 - resolution: "@webassemblyjs/ast@npm:1.14.1" - dependencies: - "@webassemblyjs/helper-numbers": "npm:1.13.2" - "@webassemblyjs/helper-wasm-bytecode": "npm:1.13.2" - checksum: 10c0/67a59be8ed50ddd33fbb2e09daa5193ac215bf7f40a9371be9a0d9797a114d0d1196316d2f3943efdb923a3d809175e1563a3cb80c814fb8edccd1e77494972b - languageName: node - linkType: hard - -"@webassemblyjs/floating-point-hex-parser@npm:1.13.2": - version: 1.13.2 - resolution: "@webassemblyjs/floating-point-hex-parser@npm:1.13.2" - checksum: 10c0/0e88bdb8b50507d9938be64df0867f00396b55eba9df7d3546eb5dc0ca64d62e06f8d881ec4a6153f2127d0f4c11d102b6e7d17aec2f26bb5ff95a5e60652412 - languageName: node - linkType: hard - -"@webassemblyjs/helper-api-error@npm:1.13.2": - version: 1.13.2 - resolution: "@webassemblyjs/helper-api-error@npm:1.13.2" - checksum: 10c0/31be497f996ed30aae4c08cac3cce50c8dcd5b29660383c0155fce1753804fc55d47fcba74e10141c7dd2899033164e117b3bcfcda23a6b043e4ded4f1003dfb - languageName: node - linkType: hard - -"@webassemblyjs/helper-buffer@npm:1.14.1": - version: 1.14.1 - resolution: "@webassemblyjs/helper-buffer@npm:1.14.1" - checksum: 10c0/0d54105dc373c0fe6287f1091e41e3a02e36cdc05e8cf8533cdc16c59ff05a646355415893449d3768cda588af451c274f13263300a251dc11a575bc4c9bd210 - languageName: node - linkType: hard - -"@webassemblyjs/helper-numbers@npm:1.13.2": - version: 1.13.2 - resolution: "@webassemblyjs/helper-numbers@npm:1.13.2" - dependencies: - "@webassemblyjs/floating-point-hex-parser": "npm:1.13.2" - "@webassemblyjs/helper-api-error": "npm:1.13.2" - "@xtuc/long": "npm:4.2.2" - checksum: 10c0/9c46852f31b234a8fb5a5a9d3f027bc542392a0d4de32f1a9c0075d5e8684aa073cb5929b56df565500b3f9cc0a2ab983b650314295b9bf208d1a1651bfc825a - languageName: node - linkType: hard - -"@webassemblyjs/helper-wasm-bytecode@npm:1.13.2": - version: 1.13.2 - resolution: "@webassemblyjs/helper-wasm-bytecode@npm:1.13.2" - checksum: 10c0/c4355d14f369b30cf3cbdd3acfafc7d0488e086be6d578e3c9780bd1b512932352246be96e034e2a7fcfba4f540ec813352f312bfcbbfe5bcfbf694f82ccc682 - languageName: node - linkType: hard - -"@webassemblyjs/helper-wasm-section@npm:1.14.1": - version: 1.14.1 - resolution: "@webassemblyjs/helper-wasm-section@npm:1.14.1" - dependencies: - "@webassemblyjs/ast": "npm:1.14.1" - "@webassemblyjs/helper-buffer": "npm:1.14.1" - "@webassemblyjs/helper-wasm-bytecode": "npm:1.13.2" - "@webassemblyjs/wasm-gen": "npm:1.14.1" - checksum: 10c0/1f9b33731c3c6dbac3a9c483269562fa00d1b6a4e7133217f40e83e975e636fd0f8736e53abd9a47b06b66082ecc976c7384391ab0a68e12d509ea4e4b948d64 - languageName: node - linkType: hard - -"@webassemblyjs/ieee754@npm:1.13.2": - version: 1.13.2 - resolution: "@webassemblyjs/ieee754@npm:1.13.2" - dependencies: - "@xtuc/ieee754": "npm:^1.2.0" - checksum: 10c0/2e732ca78c6fbae3c9b112f4915d85caecdab285c0b337954b180460290ccd0fb00d2b1dc4bb69df3504abead5191e0d28d0d17dfd6c9d2f30acac8c4961c8a7 - languageName: node - linkType: hard - -"@webassemblyjs/leb128@npm:1.13.2": - version: 1.13.2 - resolution: "@webassemblyjs/leb128@npm:1.13.2" - dependencies: - "@xtuc/long": "npm:4.2.2" - checksum: 10c0/dad5ef9e383c8ab523ce432dfd80098384bf01c45f70eb179d594f85ce5db2f80fa8c9cba03adafd85684e6d6310f0d3969a882538975989919329ac4c984659 - languageName: node - linkType: hard - -"@webassemblyjs/utf8@npm:1.13.2": - version: 1.13.2 - resolution: "@webassemblyjs/utf8@npm:1.13.2" - checksum: 10c0/d3fac9130b0e3e5a1a7f2886124a278e9323827c87a2b971e6d0da22a2ba1278ac9f66a4f2e363ecd9fac8da42e6941b22df061a119e5c0335f81006de9ee799 - languageName: node - linkType: hard - -"@webassemblyjs/wasm-edit@npm:^1.14.1": - version: 1.14.1 - resolution: "@webassemblyjs/wasm-edit@npm:1.14.1" - dependencies: - "@webassemblyjs/ast": "npm:1.14.1" - "@webassemblyjs/helper-buffer": "npm:1.14.1" - "@webassemblyjs/helper-wasm-bytecode": "npm:1.13.2" - "@webassemblyjs/helper-wasm-section": "npm:1.14.1" - "@webassemblyjs/wasm-gen": "npm:1.14.1" - "@webassemblyjs/wasm-opt": "npm:1.14.1" - "@webassemblyjs/wasm-parser": "npm:1.14.1" - "@webassemblyjs/wast-printer": "npm:1.14.1" - checksum: 10c0/5ac4781086a2ca4b320bdbfd965a209655fe8a208ca38d89197148f8597e587c9a2c94fb6bd6f1a7dbd4527c49c6844fcdc2af981f8d793a97bf63a016aa86d2 - languageName: node - linkType: hard - -"@webassemblyjs/wasm-gen@npm:1.14.1": - version: 1.14.1 - resolution: "@webassemblyjs/wasm-gen@npm:1.14.1" - dependencies: - "@webassemblyjs/ast": "npm:1.14.1" - "@webassemblyjs/helper-wasm-bytecode": "npm:1.13.2" - "@webassemblyjs/ieee754": "npm:1.13.2" - "@webassemblyjs/leb128": "npm:1.13.2" - "@webassemblyjs/utf8": "npm:1.13.2" - checksum: 10c0/d678810d7f3f8fecb2e2bdadfb9afad2ec1d2bc79f59e4711ab49c81cec578371e22732d4966f59067abe5fba8e9c54923b57060a729d28d408e608beef67b10 - languageName: node - linkType: hard - -"@webassemblyjs/wasm-opt@npm:1.14.1": - version: 1.14.1 - resolution: "@webassemblyjs/wasm-opt@npm:1.14.1" - dependencies: - "@webassemblyjs/ast": "npm:1.14.1" - "@webassemblyjs/helper-buffer": "npm:1.14.1" - "@webassemblyjs/wasm-gen": "npm:1.14.1" - "@webassemblyjs/wasm-parser": "npm:1.14.1" - checksum: 10c0/515bfb15277ee99ba6b11d2232ddbf22aed32aad6d0956fe8a0a0a004a1b5a3a277a71d9a3a38365d0538ac40d1b7b7243b1a244ad6cd6dece1c1bb2eb5de7ee - languageName: node - linkType: hard - -"@webassemblyjs/wasm-parser@npm:1.14.1, @webassemblyjs/wasm-parser@npm:^1.14.1": - version: 1.14.1 - resolution: "@webassemblyjs/wasm-parser@npm:1.14.1" - dependencies: - "@webassemblyjs/ast": "npm:1.14.1" - "@webassemblyjs/helper-api-error": "npm:1.13.2" - "@webassemblyjs/helper-wasm-bytecode": "npm:1.13.2" - "@webassemblyjs/ieee754": "npm:1.13.2" - "@webassemblyjs/leb128": "npm:1.13.2" - "@webassemblyjs/utf8": "npm:1.13.2" - checksum: 10c0/95427b9e5addbd0f647939bd28e3e06b8deefdbdadcf892385b5edc70091bf9b92fa5faac3fce8333554437c5d85835afef8c8a7d9d27ab6ba01ffab954db8c6 - languageName: node - linkType: hard - -"@webassemblyjs/wast-printer@npm:1.14.1": - version: 1.14.1 - resolution: "@webassemblyjs/wast-printer@npm:1.14.1" - dependencies: - "@webassemblyjs/ast": "npm:1.14.1" - "@xtuc/long": "npm:4.2.2" - checksum: 10c0/8d7768608996a052545251e896eac079c98e0401842af8dd4de78fba8d90bd505efb6c537e909cd6dae96e09db3fa2e765a6f26492553a675da56e2db51f9d24 - languageName: node - linkType: hard - -"@webpack-cli/configtest@npm:^3.0.1": - version: 3.0.1 - resolution: "@webpack-cli/configtest@npm:3.0.1" - peerDependencies: - webpack: ^5.82.0 - webpack-cli: 6.x.x - checksum: 10c0/edd24ecfc429298fe86446f7d7daedfe82d72e7f6236c81420605484fdadade5d59c6bcef3d76bd724e11d9727f74e75de183223ae62d3a568b2d54199688cbe - languageName: node - linkType: hard - -"@webpack-cli/info@npm:^3.0.1": - version: 3.0.1 - resolution: "@webpack-cli/info@npm:3.0.1" - peerDependencies: - webpack: ^5.82.0 - webpack-cli: 6.x.x - checksum: 10c0/b23b94e7dc8c93e79248f20d5f1bd0fbb7b9ba4b012803e2fdc5440b8f2ee1f3eca7f4933bbca346c8168673bf572b1858169a3cb2c17d9b8bcd833d480c2170 - languageName: node - linkType: hard - -"@webpack-cli/serve@npm:^3.0.1": - version: 3.0.1 - resolution: "@webpack-cli/serve@npm:3.0.1" - peerDependencies: - webpack: ^5.82.0 - webpack-cli: 6.x.x - peerDependenciesMeta: - webpack-dev-server: - optional: true - checksum: 10c0/65245e45bfa35e11a5b30631b99cfed0c1b39b2cc8320fa2d2a4185264535618827d349ec032c58af4201d6236cbc43bec894fcb840fdd06314611537a80e210 - languageName: node - linkType: hard - -"@xtuc/ieee754@npm:^1.2.0": - version: 1.2.0 - resolution: "@xtuc/ieee754@npm:1.2.0" - checksum: 10c0/a8565d29d135039bd99ae4b2220d3e167d22cf53f867e491ed479b3f84f895742d0097f935b19aab90265a23d5d46711e4204f14c479ae3637fbf06c4666882f - languageName: node - linkType: hard - -"@xtuc/long@npm:4.2.2": - version: 4.2.2 - resolution: "@xtuc/long@npm:4.2.2" - checksum: 10c0/8582cbc69c79ad2d31568c412129bf23d2b1210a1dfb60c82d5a1df93334da4ee51f3057051658569e2c196d8dc33bc05ae6b974a711d0d16e801e1d0647ccd1 - languageName: node - linkType: hard - -"abbrev@npm:^2.0.0": - version: 2.0.0 - resolution: "abbrev@npm:2.0.0" - checksum: 10c0/f742a5a107473946f426c691c08daba61a1d15942616f300b5d32fd735be88fef5cba24201757b6c407fd564555fb48c751cfa33519b2605c8a7aadd22baf372 - languageName: node - linkType: hard - -"accepts@npm:~1.3.4, accepts@npm:~1.3.8": - version: 1.3.8 - resolution: "accepts@npm:1.3.8" - dependencies: - mime-types: "npm:~2.1.34" - negotiator: "npm:0.6.3" - checksum: 10c0/3a35c5f5586cfb9a21163ca47a5f77ac34fa8ceb5d17d2fa2c0d81f41cbd7f8c6fa52c77e2c039acc0f4d09e71abdc51144246900f6bef5e3c4b333f77d89362 - languageName: node - linkType: hard - -"acorn-walk@npm:^8.0.2, acorn-walk@npm:^8.1.1": - version: 8.3.4 - resolution: "acorn-walk@npm:8.3.4" - dependencies: - acorn: "npm:^8.11.0" - checksum: 10c0/76537ac5fb2c37a64560feaf3342023dadc086c46da57da363e64c6148dc21b57d49ace26f949e225063acb6fb441eabffd89f7a3066de5ad37ab3e328927c62 - languageName: node - linkType: hard - -"acorn@npm:^8.1.0, acorn@npm:^8.11.0, acorn@npm:^8.14.0, acorn@npm:^8.4.1, acorn@npm:^8.8.2": - version: 8.14.0 - resolution: "acorn@npm:8.14.0" - bin: - acorn: bin/acorn - checksum: 10c0/6d4ee461a7734b2f48836ee0fbb752903606e576cc100eb49340295129ca0b452f3ba91ddd4424a1d4406a98adfb2ebb6bd0ff4c49d7a0930c10e462719bbfd7 - languageName: node - linkType: hard - -"agent-base@npm:^7.1.0, agent-base@npm:^7.1.2": - version: 7.1.3 - resolution: "agent-base@npm:7.1.3" - checksum: 10c0/6192b580c5b1d8fb399b9c62bf8343d76654c2dd62afcb9a52b2cf44a8b6ace1e3b704d3fe3547d91555c857d3df02603341ff2cb961b9cfe2b12f9f3c38ee11 - languageName: node - linkType: hard - -"ajv-formats@npm:^2.1.1": - version: 2.1.1 - resolution: "ajv-formats@npm:2.1.1" - dependencies: - ajv: "npm:^8.0.0" - peerDependencies: - ajv: ^8.0.0 - peerDependenciesMeta: - ajv: - optional: true - checksum: 10c0/e43ba22e91b6a48d96224b83d260d3a3a561b42d391f8d3c6d2c1559f9aa5b253bfb306bc94bbeca1d967c014e15a6efe9a207309e95b3eaae07fcbcdc2af662 - languageName: node - linkType: hard - -"ajv-keywords@npm:^3.5.2": - version: 3.5.2 - resolution: "ajv-keywords@npm:3.5.2" - peerDependencies: - ajv: ^6.9.1 - checksum: 10c0/0c57a47cbd656e8cdfd99d7c2264de5868918ffa207c8d7a72a7f63379d4333254b2ba03d69e3c035e996a3fd3eb6d5725d7a1597cca10694296e32510546360 - languageName: node - linkType: hard - -"ajv-keywords@npm:^5.1.0": - version: 5.1.0 - resolution: "ajv-keywords@npm:5.1.0" - dependencies: - fast-deep-equal: "npm:^3.1.3" - peerDependencies: - ajv: ^8.8.2 - checksum: 10c0/18bec51f0171b83123ba1d8883c126e60c6f420cef885250898bf77a8d3e65e3bfb9e8564f497e30bdbe762a83e0d144a36931328616a973ee669dc74d4a9590 - languageName: node - linkType: hard - -"ajv@npm:^6.12.5": - version: 6.12.6 - resolution: "ajv@npm:6.12.6" - dependencies: - fast-deep-equal: "npm:^3.1.1" - fast-json-stable-stringify: "npm:^2.0.0" - json-schema-traverse: "npm:^0.4.1" - uri-js: "npm:^4.2.2" - checksum: 10c0/41e23642cbe545889245b9d2a45854ebba51cda6c778ebced9649420d9205f2efb39cb43dbc41e358409223b1ea43303ae4839db682c848b891e4811da1a5a71 - languageName: node - linkType: hard - -"ajv@npm:^8.0.0, ajv@npm:^8.9.0": - version: 8.17.1 - resolution: "ajv@npm:8.17.1" - dependencies: - fast-deep-equal: "npm:^3.1.3" - fast-uri: "npm:^3.0.1" - json-schema-traverse: "npm:^1.0.0" - require-from-string: "npm:^2.0.2" - checksum: 10c0/ec3ba10a573c6b60f94639ffc53526275917a2df6810e4ab5a6b959d87459f9ef3f00d5e7865b82677cb7d21590355b34da14d1d0b9c32d75f95a187e76fff35 - languageName: node - linkType: hard - -"ansi-html-community@npm:^0.0.8": - version: 0.0.8 - resolution: "ansi-html-community@npm:0.0.8" - bin: - ansi-html: bin/ansi-html - checksum: 10c0/45d3a6f0b4f10b04fdd44bef62972e2470bfd917bf00439471fa7473d92d7cbe31369c73db863cc45dda115cb42527f39e232e9256115534b8ee5806b0caeed4 - languageName: node - linkType: hard - -"ansi-regex@npm:^5.0.1": - version: 5.0.1 - resolution: "ansi-regex@npm:5.0.1" - checksum: 10c0/9a64bb8627b434ba9327b60c027742e5d17ac69277960d041898596271d992d4d52ba7267a63ca10232e29f6107fc8a835f6ce8d719b88c5f8493f8254813737 - languageName: node - linkType: hard - -"ansi-regex@npm:^6.0.1": - version: 6.1.0 - resolution: "ansi-regex@npm:6.1.0" - checksum: 10c0/a91daeddd54746338478eef88af3439a7edf30f8e23196e2d6ed182da9add559c601266dbef01c2efa46a958ad6f1f8b176799657616c702b5b02e799e7fd8dc - languageName: node - linkType: hard - -"ansi-styles@npm:^3.2.1": - version: 3.2.1 - resolution: "ansi-styles@npm:3.2.1" - dependencies: - color-convert: "npm:^1.9.0" - checksum: 10c0/ece5a8ef069fcc5298f67e3f4771a663129abd174ea2dfa87923a2be2abf6cd367ef72ac87942da00ce85bd1d651d4cd8595aebdb1b385889b89b205860e977b - languageName: node - linkType: hard - -"ansi-styles@npm:^4.0.0, ansi-styles@npm:^4.1.0": - version: 4.3.0 - resolution: "ansi-styles@npm:4.3.0" - dependencies: - color-convert: "npm:^2.0.1" - checksum: 10c0/895a23929da416f2bd3de7e9cb4eabd340949328ab85ddd6e484a637d8f6820d485f53933446f5291c3b760cbc488beb8e88573dd0f9c7daf83dccc8fe81b041 - languageName: node - linkType: hard - -"ansi-styles@npm:^6.1.0": - version: 6.2.1 - resolution: "ansi-styles@npm:6.2.1" - checksum: 10c0/5d1ec38c123984bcedd996eac680d548f31828bd679a66db2bdf11844634dde55fec3efa9c6bb1d89056a5e79c1ac540c4c784d592ea1d25028a92227d2f2d5c - languageName: node - linkType: hard - -"anymatch@npm:~3.1.2": - version: 3.1.3 - resolution: "anymatch@npm:3.1.3" - dependencies: - normalize-path: "npm:^3.0.0" - picomatch: "npm:^2.0.4" - checksum: 10c0/57b06ae984bc32a0d22592c87384cd88fe4511b1dd7581497831c56d41939c8a001b28e7b853e1450f2bf61992dfcaa8ae2d0d161a0a90c4fb631ef07098fbac - languageName: node - linkType: hard - -"arg@npm:^4.1.0": - version: 4.1.3 - resolution: "arg@npm:4.1.3" - checksum: 10c0/070ff801a9d236a6caa647507bdcc7034530604844d64408149a26b9e87c2f97650055c0f049abd1efc024b334635c01f29e0b632b371ac3f26130f4cf65997a - languageName: node - linkType: hard - -"array-flatten@npm:1.1.1": - version: 1.1.1 - resolution: "array-flatten@npm:1.1.1" - checksum: 10c0/806966c8abb2f858b08f5324d9d18d7737480610f3bd5d3498aaae6eb5efdc501a884ba019c9b4a8f02ff67002058749d05548fd42fa8643f02c9c7f22198b91 - languageName: node - linkType: hard - -"asn1.js@npm:^4.10.1": - version: 4.10.1 - resolution: "asn1.js@npm:4.10.1" - dependencies: - bn.js: "npm:^4.0.0" - inherits: "npm:^2.0.1" - minimalistic-assert: "npm:^1.0.0" - checksum: 10c0/afa7f3ab9e31566c80175a75b182e5dba50589dcc738aa485be42bdd787e2a07246a4b034d481861123cbe646a7656f318f4f1cad2e9e5e808a210d5d6feaa88 - languageName: node - linkType: hard - -"assert@npm:^2.0.0": - version: 2.1.0 - resolution: "assert@npm:2.1.0" - dependencies: - call-bind: "npm:^1.0.2" - is-nan: "npm:^1.3.2" - object-is: "npm:^1.1.5" - object.assign: "npm:^4.1.4" - util: "npm:^0.12.5" - checksum: 10c0/7271a5da883c256a1fa690677bf1dd9d6aa882139f2bed1cd15da4f9e7459683e1da8e32a203d6cc6767e5e0f730c77a9532a87b896b4b0af0dd535f668775f0 - languageName: node - linkType: hard - -"async@npm:^3.0.1": - version: 3.2.6 - resolution: "async@npm:3.2.6" - checksum: 10c0/36484bb15ceddf07078688d95e27076379cc2f87b10c03b6dd8a83e89475a3c8df5848859dd06a4c95af1e4c16fc973de0171a77f18ea00be899aca2a4f85e70 - languageName: node - linkType: hard - -"available-typed-arrays@npm:^1.0.7": - version: 1.0.7 - resolution: "available-typed-arrays@npm:1.0.7" - dependencies: - possible-typed-array-names: "npm:^1.0.0" - checksum: 10c0/d07226ef4f87daa01bd0fe80f8f310982e345f372926da2e5296aecc25c41cab440916bbaa4c5e1034b453af3392f67df5961124e4b586df1e99793a1374bdb2 - languageName: node - linkType: hard - -"balanced-match@npm:^1.0.0": - version: 1.0.2 - resolution: "balanced-match@npm:1.0.2" - checksum: 10c0/9308baf0a7e4838a82bbfd11e01b1cb0f0cf2893bc1676c27c2a8c0e70cbae1c59120c3268517a8ae7fb6376b4639ef81ca22582611dbee4ed28df945134aaee - languageName: node - linkType: hard - -"base64-js@npm:^1.3.1": - version: 1.5.1 - resolution: "base64-js@npm:1.5.1" - checksum: 10c0/f23823513b63173a001030fae4f2dabe283b99a9d324ade3ad3d148e218134676f1ee8568c877cd79ec1c53158dcf2d2ba527a97c606618928ba99dd930102bf - languageName: node - linkType: hard - -"base64id@npm:2.0.0, base64id@npm:~2.0.0": - version: 2.0.0 - resolution: "base64id@npm:2.0.0" - checksum: 10c0/6919efd237ed44b9988cbfc33eca6f173a10e810ce50292b271a1a421aac7748ef232a64d1e6032b08f19aae48dce6ee8f66c5ae2c9e5066c82b884861d4d453 - languageName: node - linkType: hard - -"batch@npm:0.6.1": - version: 0.6.1 - resolution: "batch@npm:0.6.1" - checksum: 10c0/925a13897b4db80d4211082fe287bcf96d297af38e26448c857cee3e095c9792e3b8f26b37d268812e7f38a589f694609de8534a018b1937d7dc9f84e6b387c5 - languageName: node - linkType: hard - -"binary-extensions@npm:^2.0.0": - version: 2.3.0 - resolution: "binary-extensions@npm:2.3.0" - checksum: 10c0/75a59cafc10fb12a11d510e77110c6c7ae3f4ca22463d52487709ca7f18f69d886aa387557cc9864fbdb10153d0bdb4caacabf11541f55e89ed6e18d12ece2b5 - languageName: node - linkType: hard - -"bn.js@npm:^4.0.0, bn.js@npm:^4.1.0, bn.js@npm:^4.11.9": - version: 4.12.1 - resolution: "bn.js@npm:4.12.1" - checksum: 10c0/b7f37a0cd5e4b79142b6f4292d518b416be34ae55d6dd6b0f66f96550c8083a50ffbbf8bda8d0ab471158cb81aa74ea4ee58fe33c7802e4a30b13810e98df116 - languageName: node - linkType: hard - -"bn.js@npm:^5.2.1": - version: 5.2.1 - resolution: "bn.js@npm:5.2.1" - checksum: 10c0/bed3d8bd34ec89dbcf9f20f88bd7d4a49c160fda3b561c7bb227501f974d3e435a48fb9b61bc3de304acab9215a3bda0803f7017ffb4d0016a0c3a740a283caa - languageName: node - linkType: hard - -"body-parser@npm:1.20.3, body-parser@npm:^1.19.0": - version: 1.20.3 - resolution: "body-parser@npm:1.20.3" - dependencies: - bytes: "npm:3.1.2" - content-type: "npm:~1.0.5" - debug: "npm:2.6.9" - depd: "npm:2.0.0" - destroy: "npm:1.2.0" - http-errors: "npm:2.0.0" - iconv-lite: "npm:0.4.24" - on-finished: "npm:2.4.1" - qs: "npm:6.13.0" - raw-body: "npm:2.5.2" - type-is: "npm:~1.6.18" - unpipe: "npm:1.0.0" - checksum: 10c0/0a9a93b7518f222885498dcecaad528cf010dd109b071bf471c93def4bfe30958b83e03496eb9c1ad4896db543d999bb62be1a3087294162a88cfa1b42c16310 - languageName: node - linkType: hard - -"bonjour-service@npm:^1.2.1": - version: 1.3.0 - resolution: "bonjour-service@npm:1.3.0" - dependencies: - fast-deep-equal: "npm:^3.1.3" - multicast-dns: "npm:^7.2.5" - checksum: 10c0/5721fd9f9bb968e9cc16c1e8116d770863dd2329cb1f753231de1515870648c225142b7eefa71f14a5c22bc7b37ddd7fdeb018700f28a8c936d50d4162d433c7 - languageName: node - linkType: hard - -"brace-expansion@npm:^1.1.7": - version: 1.1.11 - resolution: "brace-expansion@npm:1.1.11" - dependencies: - balanced-match: "npm:^1.0.0" - concat-map: "npm:0.0.1" - checksum: 10c0/695a56cd058096a7cb71fb09d9d6a7070113c7be516699ed361317aca2ec169f618e28b8af352e02ab4233fb54eb0168460a40dc320bab0034b36ab59aaad668 - languageName: node - linkType: hard - -"brace-expansion@npm:^2.0.1": - version: 2.0.1 - resolution: "brace-expansion@npm:2.0.1" - dependencies: - balanced-match: "npm:^1.0.0" - checksum: 10c0/b358f2fe060e2d7a87aa015979ecea07f3c37d4018f8d6deb5bd4c229ad3a0384fe6029bb76cd8be63c81e516ee52d1a0673edbe2023d53a5191732ae3c3e49f - languageName: node - linkType: hard - -"braces@npm:^3.0.2, braces@npm:^3.0.3, braces@npm:~3.0.2": - version: 3.0.3 - resolution: "braces@npm:3.0.3" - dependencies: - fill-range: "npm:^7.1.1" - checksum: 10c0/7c6dfd30c338d2997ba77500539227b9d1f85e388a5f43220865201e407e076783d0881f2d297b9f80951b4c957fcf0b51c1d2d24227631643c3f7c284b0aa04 - languageName: node - linkType: hard - -"brorand@npm:^1.0.1, brorand@npm:^1.1.0": - version: 1.1.0 - resolution: "brorand@npm:1.1.0" - checksum: 10c0/6f366d7c4990f82c366e3878492ba9a372a73163c09871e80d82fb4ae0d23f9f8924cb8a662330308206e6b3b76ba1d528b4601c9ef73c2166b440b2ea3b7571 - languageName: node - linkType: hard - -"browser-resolve@npm:^2.0.0": - version: 2.0.0 - resolution: "browser-resolve@npm:2.0.0" - dependencies: - resolve: "npm:^1.17.0" - checksum: 10c0/06c43adf3cb1939825ab9a4ac355b23272820ee421a20d04f62e0dabd9ea305e497b97f3ac027f87d53c366483aafe8673bbe1aaa5e41cd69eeafa65ac5fda6e - languageName: node - linkType: hard - -"browserify-aes@npm:^1.0.4, browserify-aes@npm:^1.2.0": - version: 1.2.0 - resolution: "browserify-aes@npm:1.2.0" - dependencies: - buffer-xor: "npm:^1.0.3" - cipher-base: "npm:^1.0.0" - create-hash: "npm:^1.1.0" - evp_bytestokey: "npm:^1.0.3" - inherits: "npm:^2.0.1" - safe-buffer: "npm:^5.0.1" - checksum: 10c0/967f2ae60d610b7b252a4cbb55a7a3331c78293c94b4dd9c264d384ca93354c089b3af9c0dd023534efdc74ffbc82510f7ad4399cf82bc37bc07052eea485f18 - languageName: node - linkType: hard - -"browserify-cipher@npm:^1.0.1": - version: 1.0.1 - resolution: "browserify-cipher@npm:1.0.1" - dependencies: - browserify-aes: "npm:^1.0.4" - browserify-des: "npm:^1.0.0" - evp_bytestokey: "npm:^1.0.0" - checksum: 10c0/aa256dcb42bc53a67168bbc94ab85d243b0a3b56109dee3b51230b7d010d9b78985ffc1fb36e145c6e4db151f888076c1cfc207baf1525d3e375cbe8187fe27d - languageName: node - linkType: hard - -"browserify-des@npm:^1.0.0": - version: 1.0.2 - resolution: "browserify-des@npm:1.0.2" - dependencies: - cipher-base: "npm:^1.0.1" - des.js: "npm:^1.0.0" - inherits: "npm:^2.0.1" - safe-buffer: "npm:^5.1.2" - checksum: 10c0/943eb5d4045eff80a6cde5be4e5fbb1f2d5002126b5a4789c3c1aae3cdddb1eb92b00fb92277f512288e5c6af330730b1dbabcf7ce0923e749e151fcee5a074d - languageName: node - linkType: hard - -"browserify-rsa@npm:^4.0.0, browserify-rsa@npm:^4.1.0": - version: 4.1.1 - resolution: "browserify-rsa@npm:4.1.1" - dependencies: - bn.js: "npm:^5.2.1" - randombytes: "npm:^2.1.0" - safe-buffer: "npm:^5.2.1" - checksum: 10c0/b650ee1192e3d7f3d779edc06dd96ed8720362e72ac310c367b9d7fe35f7e8dbb983c1829142b2b3215458be8bf17c38adc7224920843024ed8cf39e19c513c0 - languageName: node - linkType: hard - -"browserify-sign@npm:^4.2.3": - version: 4.2.3 - resolution: "browserify-sign@npm:4.2.3" - dependencies: - bn.js: "npm:^5.2.1" - browserify-rsa: "npm:^4.1.0" - create-hash: "npm:^1.2.0" - create-hmac: "npm:^1.1.7" - elliptic: "npm:^6.5.5" - hash-base: "npm:~3.0" - inherits: "npm:^2.0.4" - parse-asn1: "npm:^5.1.7" - readable-stream: "npm:^2.3.8" - safe-buffer: "npm:^5.2.1" - checksum: 10c0/30c0eba3f5970a20866a4d3fbba2c5bd1928cd24f47faf995f913f1499214c6f3be14bb4d6ec1ab5c6cafb1eca9cb76ba1c2e1c04ed018370634d4e659c77216 - languageName: node - linkType: hard - -"browserify-zlib@npm:^0.2.0": - version: 0.2.0 - resolution: "browserify-zlib@npm:0.2.0" - dependencies: - pako: "npm:~1.0.5" - checksum: 10c0/9ab10b6dc732c6c5ec8ebcbe5cb7fe1467f97402c9b2140113f47b5f187b9438f93a8e065d8baf8b929323c18324fbf1105af479ee86d9d36cab7d7ef3424ad9 - languageName: node - linkType: hard - -"browserslist@npm:^4.24.0": - version: 4.24.4 - resolution: "browserslist@npm:4.24.4" - dependencies: - caniuse-lite: "npm:^1.0.30001688" - electron-to-chromium: "npm:^1.5.73" - node-releases: "npm:^2.0.19" - update-browserslist-db: "npm:^1.1.1" - bin: - browserslist: cli.js - checksum: 10c0/db7ebc1733cf471e0b490b4f47e3e2ea2947ce417192c9246644e92c667dd56a71406cc58f62ca7587caf828364892e9952904a02b7aead752bc65b62a37cfe9 - languageName: node - linkType: hard - -"buffer-from@npm:^1.0.0": - version: 1.1.2 - resolution: "buffer-from@npm:1.1.2" - checksum: 10c0/124fff9d66d691a86d3b062eff4663fe437a9d9ee4b47b1b9e97f5a5d14f6d5399345db80f796827be7c95e70a8e765dd404b7c3ff3b3324f98e9b0c8826cc34 - languageName: node - linkType: hard - -"buffer-xor@npm:^1.0.3": - version: 1.0.3 - resolution: "buffer-xor@npm:1.0.3" - checksum: 10c0/fd269d0e0bf71ecac3146187cfc79edc9dbb054e2ee69b4d97dfb857c6d997c33de391696d04bdd669272751fa48e7872a22f3a6c7b07d6c0bc31dbe02a4075c - languageName: node - linkType: hard - -"buffer@npm:^5.4.3": - version: 5.7.1 - resolution: "buffer@npm:5.7.1" - dependencies: - base64-js: "npm:^1.3.1" - ieee754: "npm:^1.1.13" - checksum: 10c0/27cac81cff434ed2876058d72e7c4789d11ff1120ef32c9de48f59eab58179b66710c488987d295ae89a228f835fc66d088652dffeb8e3ba8659f80eb091d55e - languageName: node - linkType: hard - -"builtin-status-codes@npm:^3.0.0": - version: 3.0.0 - resolution: "builtin-status-codes@npm:3.0.0" - checksum: 10c0/c37bbba11a34c4431e56bd681b175512e99147defbe2358318d8152b3a01df7bf25e0305873947e5b350073d5ef41a364a22b37e48f1fb6d2fe6d5286a0f348c - languageName: node - linkType: hard - -"bundle-name@npm:^4.1.0": - version: 4.1.0 - resolution: "bundle-name@npm:4.1.0" - dependencies: - run-applescript: "npm:^7.0.0" - checksum: 10c0/8e575981e79c2bcf14d8b1c027a3775c095d362d1382312f444a7c861b0e21513c0bd8db5bd2b16e50ba0709fa622d4eab6b53192d222120305e68359daece29 - languageName: node - linkType: hard - -"bytes@npm:3.1.2": - version: 3.1.2 - resolution: "bytes@npm:3.1.2" - checksum: 10c0/76d1c43cbd602794ad8ad2ae94095cddeb1de78c5dddaa7005c51af10b0176c69971a6d88e805a90c2b6550d76636e43c40d8427a808b8645ede885de4a0358e - languageName: node - linkType: hard - -"cacache@npm:^19.0.1": - version: 19.0.1 - resolution: "cacache@npm:19.0.1" - dependencies: - "@npmcli/fs": "npm:^4.0.0" - fs-minipass: "npm:^3.0.0" - glob: "npm:^10.2.2" - lru-cache: "npm:^10.0.1" - minipass: "npm:^7.0.3" - minipass-collect: "npm:^2.0.1" - minipass-flush: "npm:^1.0.5" - minipass-pipeline: "npm:^1.2.4" - p-map: "npm:^7.0.2" - ssri: "npm:^12.0.0" - tar: "npm:^7.4.3" - unique-filename: "npm:^4.0.0" - checksum: 10c0/01f2134e1bd7d3ab68be851df96c8d63b492b1853b67f2eecb2c37bb682d37cb70bb858a16f2f0554d3c0071be6dfe21456a1ff6fa4b7eed996570d6a25ffe9c - languageName: node - linkType: hard - -"call-bind-apply-helpers@npm:^1.0.0, call-bind-apply-helpers@npm:^1.0.1": - version: 1.0.1 - resolution: "call-bind-apply-helpers@npm:1.0.1" - dependencies: - es-errors: "npm:^1.3.0" - function-bind: "npm:^1.1.2" - checksum: 10c0/acb2ab68bf2718e68a3e895f0d0b73ccc9e45b9b6f210f163512ba76f91dab409eb8792f6dae188356f9095747512a3101646b3dea9d37fb8c7c6bf37796d18c - languageName: node - linkType: hard - -"call-bind@npm:^1.0.0, call-bind@npm:^1.0.2, call-bind@npm:^1.0.7, call-bind@npm:^1.0.8": - version: 1.0.8 - resolution: "call-bind@npm:1.0.8" - dependencies: - call-bind-apply-helpers: "npm:^1.0.0" - es-define-property: "npm:^1.0.0" - get-intrinsic: "npm:^1.2.4" - set-function-length: "npm:^1.2.2" - checksum: 10c0/a13819be0681d915144467741b69875ae5f4eba8961eb0bf322aab63ec87f8250eb6d6b0dcbb2e1349876412a56129ca338592b3829ef4343527f5f18a0752d4 - languageName: node - linkType: hard - -"call-bound@npm:^1.0.2, call-bound@npm:^1.0.3": - version: 1.0.3 - resolution: "call-bound@npm:1.0.3" - dependencies: - call-bind-apply-helpers: "npm:^1.0.1" - get-intrinsic: "npm:^1.2.6" - checksum: 10c0/45257b8e7621067304b30dbd638e856cac913d31e8e00a80d6cf172911acd057846572d0b256b45e652d515db6601e2974a1b1a040e91b4fc36fb3dd86fa69cf - languageName: node - linkType: hard - -"caniuse-lite@npm:^1.0.30001688": - version: 1.0.30001692 - resolution: "caniuse-lite@npm:1.0.30001692" - checksum: 10c0/fca5105561ea12f3de593f3b0f062af82f7d07519e8dbcb97f34e7fd23349bcef1b1622a9a6cd2164d98e3d2f20059ef7e271edae46567aef88caf4c16c7708a - languageName: node - linkType: hard - -"chalk@npm:^2.4.1": - version: 2.4.2 - resolution: "chalk@npm:2.4.2" - dependencies: - ansi-styles: "npm:^3.2.1" - escape-string-regexp: "npm:^1.0.5" - supports-color: "npm:^5.3.0" - checksum: 10c0/e6543f02ec877732e3a2d1c3c3323ddb4d39fbab687c23f526e25bd4c6a9bf3b83a696e8c769d078e04e5754921648f7821b2a2acfd16c550435fd630026e073 - languageName: node - linkType: hard - -"chalk@npm:^4.1.0": - version: 4.1.2 - resolution: "chalk@npm:4.1.2" - dependencies: - ansi-styles: "npm:^4.1.0" - supports-color: "npm:^7.1.0" - checksum: 10c0/4a3fef5cc34975c898ffe77141450f679721df9dde00f6c304353fa9c8b571929123b26a0e4617bde5018977eb655b31970c297b91b63ee83bb82aeb04666880 - languageName: node - linkType: hard - -"chokidar@npm:^3.5.1, chokidar@npm:^3.6.0": - version: 3.6.0 - resolution: "chokidar@npm:3.6.0" - dependencies: - anymatch: "npm:~3.1.2" - braces: "npm:~3.0.2" - fsevents: "npm:~2.3.2" - glob-parent: "npm:~5.1.2" - is-binary-path: "npm:~2.1.0" - is-glob: "npm:~4.0.1" - normalize-path: "npm:~3.0.0" - readdirp: "npm:~3.6.0" - dependenciesMeta: - fsevents: - optional: true - checksum: 10c0/8361dcd013f2ddbe260eacb1f3cb2f2c6f2b0ad118708a343a5ed8158941a39cb8fb1d272e0f389712e74ee90ce8ba864eece9e0e62b9705cb468a2f6d917462 - languageName: node - linkType: hard - -"chownr@npm:^3.0.0": - version: 3.0.0 - resolution: "chownr@npm:3.0.0" - checksum: 10c0/43925b87700f7e3893296c8e9c56cc58f926411cce3a6e5898136daaf08f08b9a8eb76d37d3267e707d0dcc17aed2e2ebdf5848c0c3ce95cf910a919935c1b10 - languageName: node - linkType: hard - -"chrome-trace-event@npm:^1.0.2": - version: 1.0.4 - resolution: "chrome-trace-event@npm:1.0.4" - checksum: 10c0/3058da7a5f4934b87cf6a90ef5fb68ebc5f7d06f143ed5a4650208e5d7acae47bc03ec844b29fbf5ba7e46e8daa6acecc878f7983a4f4bb7271593da91e61ff5 - languageName: node - linkType: hard - -"cipher-base@npm:^1.0.0, cipher-base@npm:^1.0.1, cipher-base@npm:^1.0.3": - version: 1.0.6 - resolution: "cipher-base@npm:1.0.6" - dependencies: - inherits: "npm:^2.0.4" - safe-buffer: "npm:^5.2.1" - checksum: 10c0/f73268e0ee6585800875d9748f2a2377ae7c2c3375cba346f75598ac6f6bc3a25dec56e984a168ced1a862529ffffe615363f750c40349039d96bd30fba0fca8 - languageName: node - linkType: hard - -"cliui@npm:^7.0.2": - version: 7.0.4 - resolution: "cliui@npm:7.0.4" - dependencies: - string-width: "npm:^4.2.0" - strip-ansi: "npm:^6.0.0" - wrap-ansi: "npm:^7.0.0" - checksum: 10c0/6035f5daf7383470cef82b3d3db00bec70afb3423538c50394386ffbbab135e26c3689c41791f911fa71b62d13d3863c712fdd70f0fbdffd938a1e6fd09aac00 - languageName: node - linkType: hard - -"clone-deep@npm:^4.0.1": - version: 4.0.1 - resolution: "clone-deep@npm:4.0.1" - dependencies: - is-plain-object: "npm:^2.0.4" - kind-of: "npm:^6.0.2" - shallow-clone: "npm:^3.0.0" - checksum: 10c0/637753615aa24adf0f2d505947a1bb75e63964309034a1cf56ba4b1f30af155201edd38d26ffe26911adaae267a3c138b344a4947d39f5fc1b6d6108125aa758 - languageName: node - linkType: hard - -"clone@npm:^1.0.2": - version: 1.0.4 - resolution: "clone@npm:1.0.4" - checksum: 10c0/2176952b3649293473999a95d7bebfc9dc96410f6cbd3d2595cf12fd401f63a4bf41a7adbfd3ab2ff09ed60cb9870c58c6acdd18b87767366fabfc163700f13b - languageName: node - linkType: hard - -"color-convert@npm:^1.9.0": - version: 1.9.3 - resolution: "color-convert@npm:1.9.3" - dependencies: - color-name: "npm:1.1.3" - checksum: 10c0/5ad3c534949a8c68fca8fbc6f09068f435f0ad290ab8b2f76841b9e6af7e0bb57b98cb05b0e19fe33f5d91e5a8611ad457e5f69e0a484caad1f7487fd0e8253c - languageName: node - linkType: hard - -"color-convert@npm:^2.0.1": - version: 2.0.1 - resolution: "color-convert@npm:2.0.1" - dependencies: - color-name: "npm:~1.1.4" - checksum: 10c0/37e1150172f2e311fe1b2df62c6293a342ee7380da7b9cfdba67ea539909afbd74da27033208d01d6d5cfc65ee7868a22e18d7e7648e004425441c0f8a15a7d7 - languageName: node - linkType: hard - -"color-name@npm:1.1.3": - version: 1.1.3 - resolution: "color-name@npm:1.1.3" - checksum: 10c0/566a3d42cca25b9b3cd5528cd7754b8e89c0eb646b7f214e8e2eaddb69994ac5f0557d9c175eb5d8f0ad73531140d9c47525085ee752a91a2ab15ab459caf6d6 - languageName: node - linkType: hard - -"color-name@npm:~1.1.4": - version: 1.1.4 - resolution: "color-name@npm:1.1.4" - checksum: 10c0/a1a3f914156960902f46f7f56bc62effc6c94e84b2cae157a526b1c1f74b677a47ec602bf68a61abfa2b42d15b7c5651c6dbe72a43af720bc588dff885b10f95 - languageName: node - linkType: hard - -"colorette@npm:^2.0.10, colorette@npm:^2.0.14": - version: 2.0.20 - resolution: "colorette@npm:2.0.20" - checksum: 10c0/e94116ff33b0ff56f3b83b9ace895e5bf87c2a7a47b3401b8c3f3226e050d5ef76cf4072fb3325f9dc24d1698f9b730baf4e05eeaf861d74a1883073f4c98a40 - languageName: node - linkType: hard - -"colors@npm:1.4.0": - version: 1.4.0 - resolution: "colors@npm:1.4.0" - checksum: 10c0/9af357c019da3c5a098a301cf64e3799d27549d8f185d86f79af23069e4f4303110d115da98483519331f6fb71c8568d5688fa1c6523600044fd4a54e97c4efb - languageName: node - linkType: hard - -"combine-source-map@npm:^0.8.0": - version: 0.8.0 - resolution: "combine-source-map@npm:0.8.0" - dependencies: - convert-source-map: "npm:~1.1.0" - inline-source-map: "npm:~0.6.0" - lodash.memoize: "npm:~3.0.3" - source-map: "npm:~0.5.3" - checksum: 10c0/5f6a743b9fa59f3a51d14162c96d685ddaa1f0c9307d1e6cb864ae1649882138a776b77d8135b616258aa72716052b2f4d3655b10c3d75ea2405d8eb2c7afd1a - languageName: node - linkType: hard - -"command-exists@npm:^1.2.7": - version: 1.2.9 - resolution: "command-exists@npm:1.2.9" - checksum: 10c0/75040240062de46cd6cd43e6b3032a8b0494525c89d3962e280dde665103f8cc304a8b313a5aa541b91da2f5a9af75c5959dc3a77893a2726407a5e9a0234c16 - languageName: node - linkType: hard - -"commander@npm:^12.1.0": - version: 12.1.0 - resolution: "commander@npm:12.1.0" - checksum: 10c0/6e1996680c083b3b897bfc1cfe1c58dfbcd9842fd43e1aaf8a795fbc237f65efcc860a3ef457b318e73f29a4f4a28f6403c3d653d021d960e4632dd45bde54a9 - languageName: node - linkType: hard - -"commander@npm:^2.20.0": - version: 2.20.3 - resolution: "commander@npm:2.20.3" - checksum: 10c0/74c781a5248c2402a0a3e966a0a2bba3c054aad144f5c023364be83265e796b20565aa9feff624132ff629aa64e16999fa40a743c10c12f7c61e96a794b99288 - languageName: node - linkType: hard - -"compressible@npm:~2.0.18": - version: 2.0.18 - resolution: "compressible@npm:2.0.18" - dependencies: - mime-db: "npm:>= 1.43.0 < 2" - checksum: 10c0/8a03712bc9f5b9fe530cc5a79e164e665550d5171a64575d7dcf3e0395d7b4afa2d79ab176c61b5b596e28228b350dd07c1a2a6ead12fd81d1b6cd632af2fef7 - languageName: node - linkType: hard - -"compression@npm:^1.7.4": - version: 1.7.5 - resolution: "compression@npm:1.7.5" - dependencies: - bytes: "npm:3.1.2" - compressible: "npm:~2.0.18" - debug: "npm:2.6.9" - negotiator: "npm:~0.6.4" - on-headers: "npm:~1.0.2" - safe-buffer: "npm:5.2.1" - vary: "npm:~1.1.2" - checksum: 10c0/35c9d2d57c86d8107eab5e637f2146fcefec8475a2ff3e162f5eb0982ff856d385fb5d8c9823c3d50e075f2d9304bc622dac3df27bfef0355309c0a5307861c5 - languageName: node - linkType: hard - -"concat-map@npm:0.0.1": - version: 0.0.1 - resolution: "concat-map@npm:0.0.1" - checksum: 10c0/c996b1cfdf95b6c90fee4dae37e332c8b6eb7d106430c17d538034c0ad9a1630cb194d2ab37293b1bdd4d779494beee7786d586a50bd9376fd6f7bcc2bd4c98f - languageName: node - linkType: hard - -"connect-history-api-fallback@npm:^2.0.0": - version: 2.0.0 - resolution: "connect-history-api-fallback@npm:2.0.0" - checksum: 10c0/90fa8b16ab76e9531646cc70b010b1dbd078153730c510d3142f6cf07479ae8a812c5a3c0e40a28528dd1681a62395d0cfdef67da9e914c4772ac85d69a3ed87 - languageName: node - linkType: hard - -"connect@npm:^3.7.0": - version: 3.7.0 - resolution: "connect@npm:3.7.0" - dependencies: - debug: "npm:2.6.9" - finalhandler: "npm:1.1.2" - parseurl: "npm:~1.3.3" - utils-merge: "npm:1.0.1" - checksum: 10c0/f120c6116bb16a0a7d2703c0b4a0cd7ed787dc5ec91978097bf62aa967289020a9f41a9cd3c3276a7b92aaa36f382d2cd35fed7138fd466a55c8e9fdbed11ca8 - languageName: node - linkType: hard - -"console-browserify@npm:^1.2.0": - version: 1.2.0 - resolution: "console-browserify@npm:1.2.0" - checksum: 10c0/89b99a53b7d6cee54e1e64fa6b1f7ac24b844b4019c5d39db298637e55c1f4ffa5c165457ad984864de1379df2c8e1886cbbdac85d9dbb6876a9f26c3106f226 - languageName: node - linkType: hard - -"constants-browserify@npm:^1.0.0": - version: 1.0.0 - resolution: "constants-browserify@npm:1.0.0" - checksum: 10c0/ab49b1d59a433ed77c964d90d19e08b2f77213fb823da4729c0baead55e3c597f8f97ebccfdfc47bd896d43854a117d114c849a6f659d9986420e97da0f83ac5 - languageName: node - linkType: hard - -"content-disposition@npm:0.5.4": - version: 0.5.4 - resolution: "content-disposition@npm:0.5.4" - dependencies: - safe-buffer: "npm:5.2.1" - checksum: 10c0/bac0316ebfeacb8f381b38285dc691c9939bf0a78b0b7c2d5758acadad242d04783cee5337ba7d12a565a19075af1b3c11c728e1e4946de73c6ff7ce45f3f1bb - languageName: node - linkType: hard - -"content-type@npm:~1.0.4, content-type@npm:~1.0.5": - version: 1.0.5 - resolution: "content-type@npm:1.0.5" - checksum: 10c0/b76ebed15c000aee4678c3707e0860cb6abd4e680a598c0a26e17f0bfae723ec9cc2802f0ff1bc6e4d80603719010431d2231018373d4dde10f9ccff9dadf5af - languageName: node - linkType: hard - -"convert-source-map@npm:^1.7.0": - version: 1.9.0 - resolution: "convert-source-map@npm:1.9.0" - checksum: 10c0/281da55454bf8126cbc6625385928c43479f2060984180c42f3a86c8b8c12720a24eac260624a7d1e090004028d2dee78602330578ceec1a08e27cb8bb0a8a5b - languageName: node - linkType: hard - -"convert-source-map@npm:^2.0.0": - version: 2.0.0 - resolution: "convert-source-map@npm:2.0.0" - checksum: 10c0/8f2f7a27a1a011cc6cc88cc4da2d7d0cfa5ee0369508baae3d98c260bb3ac520691464e5bbe4ae7cdf09860c1d69ecc6f70c63c6e7c7f7e3f18ec08484dc7d9b - languageName: node - linkType: hard - -"convert-source-map@npm:~1.1.0": - version: 1.1.3 - resolution: "convert-source-map@npm:1.1.3" - checksum: 10c0/7e32f97b18eb4db09d4b3927bd813e9ae69484e060356cfcbfae3b25b90185f947aa203a3d3c6a3de7c5cdf7d9f29436baa292a4dea87817a57e43e51268bde6 - languageName: node - linkType: hard - -"cookie-signature@npm:1.0.6": - version: 1.0.6 - resolution: "cookie-signature@npm:1.0.6" - checksum: 10c0/b36fd0d4e3fef8456915fcf7742e58fbfcc12a17a018e0eb9501c9d5ef6893b596466f03b0564b81af29ff2538fd0aa4b9d54fe5ccbfb4c90ea50ad29fe2d221 - languageName: node - linkType: hard - -"cookie@npm:0.7.1": - version: 0.7.1 - resolution: "cookie@npm:0.7.1" - checksum: 10c0/5de60c67a410e7c8dc8a46a4b72eb0fe925871d057c9a5d2c0e8145c4270a4f81076de83410c4d397179744b478e33cd80ccbcc457abf40a9409ad27dcd21dde - languageName: node - linkType: hard - -"cookie@npm:~0.7.2": - version: 0.7.2 - resolution: "cookie@npm:0.7.2" - checksum: 10c0/9596e8ccdbf1a3a88ae02cf5ee80c1c50959423e1022e4e60b91dd87c622af1da309253d8abdb258fb5e3eacb4f08e579dc58b4897b8087574eee0fd35dfa5d2 - languageName: node - linkType: hard - -"core-util-is@npm:~1.0.0": - version: 1.0.3 - resolution: "core-util-is@npm:1.0.3" - checksum: 10c0/90a0e40abbddfd7618f8ccd63a74d88deea94e77d0e8dbbea059fa7ebebb8fbb4e2909667fe26f3a467073de1a542ebe6ae4c73a73745ac5833786759cd906c9 - languageName: node - linkType: hard - -"cors@npm:~2.8.5": - version: 2.8.5 - resolution: "cors@npm:2.8.5" - dependencies: - object-assign: "npm:^4" - vary: "npm:^1" - checksum: 10c0/373702b7999409922da80de4a61938aabba6929aea5b6fd9096fefb9e8342f626c0ebd7507b0e8b0b311380744cc985f27edebc0a26e0ddb784b54e1085de761 - languageName: node - linkType: hard - -"create-ecdh@npm:^4.0.4": - version: 4.0.4 - resolution: "create-ecdh@npm:4.0.4" - dependencies: - bn.js: "npm:^4.1.0" - elliptic: "npm:^6.5.3" - checksum: 10c0/77b11a51360fec9c3bce7a76288fc0deba4b9c838d5fb354b3e40c59194d23d66efe6355fd4b81df7580da0661e1334a235a2a5c040b7569ba97db428d466e7f - languageName: node - linkType: hard - -"create-hash@npm:^1.1.0, create-hash@npm:^1.1.2, create-hash@npm:^1.2.0": - version: 1.2.0 - resolution: "create-hash@npm:1.2.0" - dependencies: - cipher-base: "npm:^1.0.1" - inherits: "npm:^2.0.1" - md5.js: "npm:^1.3.4" - ripemd160: "npm:^2.0.1" - sha.js: "npm:^2.4.0" - checksum: 10c0/d402e60e65e70e5083cb57af96d89567954d0669e90550d7cec58b56d49c4b193d35c43cec8338bc72358198b8cbf2f0cac14775b651e99238e1cf411490f915 - languageName: node - linkType: hard - -"create-hmac@npm:^1.1.4, create-hmac@npm:^1.1.7": - version: 1.1.7 - resolution: "create-hmac@npm:1.1.7" - dependencies: - cipher-base: "npm:^1.0.3" - create-hash: "npm:^1.1.0" - inherits: "npm:^2.0.1" - ripemd160: "npm:^2.0.0" - safe-buffer: "npm:^5.0.1" - sha.js: "npm:^2.4.8" - checksum: 10c0/24332bab51011652a9a0a6d160eed1e8caa091b802335324ae056b0dcb5acbc9fcf173cf10d128eba8548c3ce98dfa4eadaa01bd02f44a34414baee26b651835 - languageName: node - linkType: hard - -"create-require@npm:^1.1.0": - version: 1.1.1 - resolution: "create-require@npm:1.1.1" - checksum: 10c0/157cbc59b2430ae9a90034a5f3a1b398b6738bf510f713edc4d4e45e169bc514d3d99dd34d8d01ca7ae7830b5b8b537e46ae8f3c8f932371b0875c0151d7ec91 - languageName: node - linkType: hard - -"cross-spawn@npm:^7.0.0, cross-spawn@npm:^7.0.3": - version: 7.0.6 - resolution: "cross-spawn@npm:7.0.6" - dependencies: - path-key: "npm:^3.1.0" - shebang-command: "npm:^2.0.0" - which: "npm:^2.0.1" - checksum: 10c0/053ea8b2135caff68a9e81470e845613e374e7309a47731e81639de3eaeb90c3d01af0e0b44d2ab9d50b43467223b88567dfeb3262db942dc063b9976718ffc1 - languageName: node - linkType: hard - -"crypto-browserify@npm:^3.12.0": - version: 3.12.1 - resolution: "crypto-browserify@npm:3.12.1" - dependencies: - browserify-cipher: "npm:^1.0.1" - browserify-sign: "npm:^4.2.3" - create-ecdh: "npm:^4.0.4" - create-hash: "npm:^1.2.0" - create-hmac: "npm:^1.1.7" - diffie-hellman: "npm:^5.0.3" - hash-base: "npm:~3.0.4" - inherits: "npm:^2.0.4" - pbkdf2: "npm:^3.1.2" - public-encrypt: "npm:^4.0.3" - randombytes: "npm:^2.1.0" - randomfill: "npm:^1.0.4" - checksum: 10c0/184a2def7b16628e79841243232ab5497f18d8e158ac21b7ce90ab172427d0a892a561280adc08f9d4d517bce8db2a5b335dc21abb970f787f8e874bd7b9db7d - languageName: node - linkType: hard - -"custom-event@npm:~1.0.0": - version: 1.0.1 - resolution: "custom-event@npm:1.0.1" - checksum: 10c0/86cd8497328b1e17dcda894c8df34a73b7a99f915123940d39b33c709482b2d3a2e689cd5e79e4775eb4167227689f57a2ae2f99a3f0bc9c54c0ac1b06853bd5 - languageName: node - linkType: hard - -"date-format@npm:^4.0.14": - version: 4.0.14 - resolution: "date-format@npm:4.0.14" - checksum: 10c0/1c67a4d77c677bb880328c81d81f5b9ed7fbf672bdaff74e5a0f7314b21188f3a829b06acf120c70cc1df876a7724e3e5c23d511e86d64656a3035a76ac3930b - languageName: node - linkType: hard - -"debug@npm:2.6.9": - version: 2.6.9 - resolution: "debug@npm:2.6.9" - dependencies: - ms: "npm:2.0.0" - checksum: 10c0/121908fb839f7801180b69a7e218a40b5a0b718813b886b7d6bdb82001b931c938e2941d1e4450f33a1b1df1da653f5f7a0440c197f29fbf8a6e9d45ff6ef589 - languageName: node - linkType: hard - -"debug@npm:4, debug@npm:^4.1.0, debug@npm:^4.1.1, debug@npm:^4.3.1, debug@npm:^4.3.4": - version: 4.4.0 - resolution: "debug@npm:4.4.0" - dependencies: - ms: "npm:^2.1.3" - peerDependenciesMeta: - supports-color: - optional: true - checksum: 10c0/db94f1a182bf886f57b4755f85b3a74c39b5114b9377b7ab375dc2cfa3454f09490cc6c30f829df3fc8042bc8b8995f6567ce5cd96f3bc3688bd24027197d9de - languageName: node - linkType: hard - -"debug@npm:~4.3.1, debug@npm:~4.3.2, debug@npm:~4.3.4": - version: 4.3.7 - resolution: "debug@npm:4.3.7" - dependencies: - ms: "npm:^2.1.3" - peerDependenciesMeta: - supports-color: - optional: true - checksum: 10c0/1471db19c3b06d485a622d62f65947a19a23fbd0dd73f7fd3eafb697eec5360cde447fb075919987899b1a2096e85d35d4eb5a4de09a57600ac9cf7e6c8e768b - languageName: node - linkType: hard - -"default-browser-id@npm:^5.0.0": - version: 5.0.0 - resolution: "default-browser-id@npm:5.0.0" - checksum: 10c0/957fb886502594c8e645e812dfe93dba30ed82e8460d20ce39c53c5b0f3e2afb6ceaec2249083b90bdfbb4cb0f34e1f73fde3d68cac00becdbcfd894156b5ead - languageName: node - linkType: hard - -"default-browser@npm:^5.2.1": - version: 5.2.1 - resolution: "default-browser@npm:5.2.1" - dependencies: - bundle-name: "npm:^4.1.0" - default-browser-id: "npm:^5.0.0" - checksum: 10c0/73f17dc3c58026c55bb5538749597db31f9561c0193cd98604144b704a981c95a466f8ecc3c2db63d8bfd04fb0d426904834cfc91ae510c6aeb97e13c5167c4d - languageName: node - linkType: hard - -"defaults@npm:^1.0.3": - version: 1.0.4 - resolution: "defaults@npm:1.0.4" - dependencies: - clone: "npm:^1.0.2" - checksum: 10c0/9cfbe498f5c8ed733775db62dfd585780387d93c17477949e1670bfcfb9346e0281ce8c4bf9f4ac1fc0f9b851113bd6dc9e41182ea1644ccd97de639fa13c35a - languageName: node - linkType: hard - -"define-data-property@npm:^1.0.1, define-data-property@npm:^1.1.4": - version: 1.1.4 - resolution: "define-data-property@npm:1.1.4" - dependencies: - es-define-property: "npm:^1.0.0" - es-errors: "npm:^1.3.0" - gopd: "npm:^1.0.1" - checksum: 10c0/dea0606d1483eb9db8d930d4eac62ca0fa16738b0b3e07046cddfacf7d8c868bbe13fa0cb263eb91c7d0d527960dc3f2f2471a69ed7816210307f6744fe62e37 - languageName: node - linkType: hard - -"define-lazy-prop@npm:^3.0.0": - version: 3.0.0 - resolution: "define-lazy-prop@npm:3.0.0" - checksum: 10c0/5ab0b2bf3fa58b3a443140bbd4cd3db1f91b985cc8a246d330b9ac3fc0b6a325a6d82bddc0b055123d745b3f9931afeea74a5ec545439a1630b9c8512b0eeb49 - languageName: node - linkType: hard - -"define-properties@npm:^1.1.3, define-properties@npm:^1.2.1": - version: 1.2.1 - resolution: "define-properties@npm:1.2.1" - dependencies: - define-data-property: "npm:^1.0.1" - has-property-descriptors: "npm:^1.0.0" - object-keys: "npm:^1.1.1" - checksum: 10c0/88a152319ffe1396ccc6ded510a3896e77efac7a1bfbaa174a7b00414a1747377e0bb525d303794a47cf30e805c2ec84e575758512c6e44a993076d29fd4e6c3 - languageName: node - linkType: hard - -"depd@npm:2.0.0": - version: 2.0.0 - resolution: "depd@npm:2.0.0" - checksum: 10c0/58bd06ec20e19529b06f7ad07ddab60e504d9e0faca4bd23079fac2d279c3594334d736508dc350e06e510aba5e22e4594483b3a6562ce7c17dd797f4cc4ad2c - languageName: node - linkType: hard - -"depd@npm:~1.1.2": - version: 1.1.2 - resolution: "depd@npm:1.1.2" - checksum: 10c0/acb24aaf936ef9a227b6be6d495f0d2eb20108a9a6ad40585c5bda1a897031512fef6484e4fdbb80bd249fdaa82841fa1039f416ece03188e677ba11bcfda249 - languageName: node - linkType: hard - -"des.js@npm:^1.0.0": - version: 1.1.0 - resolution: "des.js@npm:1.1.0" - dependencies: - inherits: "npm:^2.0.1" - minimalistic-assert: "npm:^1.0.0" - checksum: 10c0/671354943ad67493e49eb4c555480ab153edd7cee3a51c658082fcde539d2690ed2a4a0b5d1f401f9cde822edf3939a6afb2585f32c091f2d3a1b1665cd45236 - languageName: node - linkType: hard - -"destroy@npm:1.2.0": - version: 1.2.0 - resolution: "destroy@npm:1.2.0" - checksum: 10c0/bd7633942f57418f5a3b80d5cb53898127bcf53e24cdf5d5f4396be471417671f0fee48a4ebe9a1e9defbde2a31280011af58a57e090ff822f589b443ed4e643 - languageName: node - linkType: hard - -"detect-node@npm:^2.0.4": - version: 2.1.0 - resolution: "detect-node@npm:2.1.0" - checksum: 10c0/f039f601790f2e9d4654e499913259a798b1f5246ae24f86ab5e8bd4aaf3bce50484234c494f11fb00aecb0c6e2733aa7b1cf3f530865640b65fbbd65b2c4e09 - languageName: node - linkType: hard - -"di@npm:^0.0.1": - version: 0.0.1 - resolution: "di@npm:0.0.1" - checksum: 10c0/fbca4cc93e8c493d50f82df3a9ecaa5d8b2935674aabddeb8f68db3ab03c942c201f9c3d920de094407392ee6f488eac16b96f500c0ea6b408634864b7b939d1 - languageName: node - linkType: hard - -"diff@npm:^4.0.1": - version: 4.0.2 - resolution: "diff@npm:4.0.2" - checksum: 10c0/81b91f9d39c4eaca068eb0c1eb0e4afbdc5bb2941d197f513dd596b820b956fef43485876226d65d497bebc15666aa2aa82c679e84f65d5f2bfbf14ee46e32c1 - languageName: node - linkType: hard - -"diffie-hellman@npm:^5.0.3": - version: 5.0.3 - resolution: "diffie-hellman@npm:5.0.3" - dependencies: - bn.js: "npm:^4.1.0" - miller-rabin: "npm:^4.0.0" - randombytes: "npm:^2.0.0" - checksum: 10c0/ce53ccafa9ca544b7fc29b08a626e23a9b6562efc2a98559a0c97b4718937cebaa9b5d7d0a05032cc9c1435e9b3c1532b9e9bf2e0ede868525922807ad6e1ecf - languageName: node - linkType: hard - -"dns-packet@npm:^5.2.2": - version: 5.6.1 - resolution: "dns-packet@npm:5.6.1" - dependencies: - "@leichtgewicht/ip-codec": "npm:^2.0.1" - checksum: 10c0/8948d3d03063fb68e04a1e386875f8c3bcc398fc375f535f2b438fad8f41bf1afa6f5e70893ba44f4ae884c089247e0a31045722fa6ff0f01d228da103f1811d - languageName: node - linkType: hard - -"dom-serialize@npm:^2.2.1": - version: 2.2.1 - resolution: "dom-serialize@npm:2.2.1" - dependencies: - custom-event: "npm:~1.0.0" - ent: "npm:~2.2.0" - extend: "npm:^3.0.0" - void-elements: "npm:^2.0.0" - checksum: 10c0/ceb6e62b73c658986ca4c9b8b2fae358d8ae914eb06712d137da595a327c3bbca45a762f412a6d181f892ce5e3cffb855c2db2b64c53ad0534b2a0ad8e65b05e - languageName: node - linkType: hard - -"domain-browser@npm:^4.16.0": - version: 4.23.0 - resolution: "domain-browser@npm:4.23.0" - checksum: 10c0/dfcc6ba070a2c968a4d922e7d99ef440d1076812af0d983404aadf64729f746bb4a0ad2c5e73ccd5d9cf41bc79037f2a1e4a915bdf33d07e0d77f487b635b5b2 - languageName: node - linkType: hard - -"dunder-proto@npm:^1.0.1": - version: 1.0.1 - resolution: "dunder-proto@npm:1.0.1" - dependencies: - call-bind-apply-helpers: "npm:^1.0.1" - es-errors: "npm:^1.3.0" - gopd: "npm:^1.2.0" - checksum: 10c0/199f2a0c1c16593ca0a145dbf76a962f8033ce3129f01284d48c45ed4e14fea9bbacd7b3610b6cdc33486cef20385ac054948fefc6272fcce645c09468f93031 - languageName: node - linkType: hard - -"eastasianwidth@npm:^0.2.0": - version: 0.2.0 - resolution: "eastasianwidth@npm:0.2.0" - checksum: 10c0/26f364ebcdb6395f95124fda411f63137a4bfb5d3a06453f7f23dfe52502905bd84e0488172e0f9ec295fdc45f05c23d5d91baf16bd26f0fe9acd777a188dc39 - languageName: node - linkType: hard - -"ee-first@npm:1.1.1": - version: 1.1.1 - resolution: "ee-first@npm:1.1.1" - checksum: 10c0/b5bb125ee93161bc16bfe6e56c6b04de5ad2aa44234d8f644813cc95d861a6910903132b05093706de2b706599367c4130eb6d170f6b46895686b95f87d017b7 - languageName: node - linkType: hard - -"electron-to-chromium@npm:^1.5.73": - version: 1.5.83 - resolution: "electron-to-chromium@npm:1.5.83" - checksum: 10c0/12380962d057c4679add1047cdddb18b909904614272da0527e505a3859eaffde2022dd0688ce7f230582de96405c3d33b667680614475cdafd3f629caa2fee1 - languageName: node - linkType: hard - -"elliptic@npm:^6.5.3, elliptic@npm:^6.5.5": - version: 6.6.1 - resolution: "elliptic@npm:6.6.1" - dependencies: - bn.js: "npm:^4.11.9" - brorand: "npm:^1.1.0" - hash.js: "npm:^1.0.0" - hmac-drbg: "npm:^1.0.1" - inherits: "npm:^2.0.4" - minimalistic-assert: "npm:^1.0.1" - minimalistic-crypto-utils: "npm:^1.0.1" - checksum: 10c0/8b24ef782eec8b472053793ea1e91ae6bee41afffdfcb78a81c0a53b191e715cbe1292aa07165958a9bbe675bd0955142560b1a007ffce7d6c765bcaf951a867 - languageName: node - linkType: hard - -"emoji-regex@npm:^8.0.0": - version: 8.0.0 - resolution: "emoji-regex@npm:8.0.0" - checksum: 10c0/b6053ad39951c4cf338f9092d7bfba448cdfd46fe6a2a034700b149ac9ffbc137e361cbd3c442297f86bed2e5f7576c1b54cc0a6bf8ef5106cc62f496af35010 - languageName: node - linkType: hard - -"emoji-regex@npm:^9.2.2": - version: 9.2.2 - resolution: "emoji-regex@npm:9.2.2" - checksum: 10c0/af014e759a72064cf66e6e694a7fc6b0ed3d8db680427b021a89727689671cefe9d04151b2cad51dbaf85d5ba790d061cd167f1cf32eb7b281f6368b3c181639 - languageName: node - linkType: hard - -"encodeurl@npm:~1.0.2": - version: 1.0.2 - resolution: "encodeurl@npm:1.0.2" - checksum: 10c0/f6c2387379a9e7c1156c1c3d4f9cb7bb11cf16dd4c1682e1f6746512564b053df5781029b6061296832b59fb22f459dbe250386d217c2f6e203601abb2ee0bec - languageName: node - linkType: hard - -"encodeurl@npm:~2.0.0": - version: 2.0.0 - resolution: "encodeurl@npm:2.0.0" - checksum: 10c0/5d317306acb13e6590e28e27924c754163946a2480de11865c991a3a7eed4315cd3fba378b543ca145829569eefe9b899f3d84bb09870f675ae60bc924b01ceb - languageName: node - linkType: hard - -"encoding@npm:^0.1.13": - version: 0.1.13 - resolution: "encoding@npm:0.1.13" - dependencies: - iconv-lite: "npm:^0.6.2" - checksum: 10c0/36d938712ff00fe1f4bac88b43bcffb5930c1efa57bbcdca9d67e1d9d6c57cfb1200fb01efe0f3109b2ce99b231f90779532814a81370a1bd3274a0f58585039 - languageName: node - linkType: hard - -"engine.io-parser@npm:~5.2.1": - version: 5.2.3 - resolution: "engine.io-parser@npm:5.2.3" - checksum: 10c0/ed4900d8dbef470ab3839ccf3bfa79ee518ea8277c7f1f2759e8c22a48f64e687ea5e474291394d0c94f84054749fd93f3ef0acb51fa2f5f234cc9d9d8e7c536 - languageName: node - linkType: hard - -"engine.io@npm:~6.6.0": - version: 6.6.2 - resolution: "engine.io@npm:6.6.2" - dependencies: - "@types/cookie": "npm:^0.4.1" - "@types/cors": "npm:^2.8.12" - "@types/node": "npm:>=10.0.0" - accepts: "npm:~1.3.4" - base64id: "npm:2.0.0" - cookie: "npm:~0.7.2" - cors: "npm:~2.8.5" - debug: "npm:~4.3.1" - engine.io-parser: "npm:~5.2.1" - ws: "npm:~8.17.1" - checksum: 10c0/e9ac3cba49badb6905259df3b019fbcbe53e2a389c930fb9fbc10eebc8839554b189706206bba2509a4a3a7d78a32f7e027f73230f31662c7efd215276432dad - languageName: node - linkType: hard - -"enhanced-resolve@npm:^5.0.0, enhanced-resolve@npm:^5.17.1": - version: 5.18.0 - resolution: "enhanced-resolve@npm:5.18.0" - dependencies: - graceful-fs: "npm:^4.2.4" - tapable: "npm:^2.2.0" - checksum: 10c0/5fcc264a6040754ab5b349628cac2bb5f89cee475cbe340804e657a5b9565f70e6aafb338d5895554eb0ced9f66c50f38a255274a0591dcb64ee17c549c459ce - languageName: node - linkType: hard - -"ent@npm:~2.2.0": - version: 2.2.2 - resolution: "ent@npm:2.2.2" - dependencies: - call-bound: "npm:^1.0.3" - es-errors: "npm:^1.3.0" - punycode: "npm:^1.4.1" - safe-regex-test: "npm:^1.1.0" - checksum: 10c0/83673cc952bb1ca01473460eb4f1289448d887ef2bfcdd142bfe83cd20a794a4393b6bca543922bf1eb913d1ae0ab69ca2d2f1f6a5e9f3de6e68464b3a3b9096 - languageName: node - linkType: hard - -"env-paths@npm:^2.2.0": - version: 2.2.1 - resolution: "env-paths@npm:2.2.1" - checksum: 10c0/285325677bf00e30845e330eec32894f5105529db97496ee3f598478e50f008c5352a41a30e5e72ec9de8a542b5a570b85699cd63bd2bc646dbcb9f311d83bc4 - languageName: node - linkType: hard - -"envinfo@npm:^7.14.0": - version: 7.14.0 - resolution: "envinfo@npm:7.14.0" - bin: - envinfo: dist/cli.js - checksum: 10c0/059a031eee101e056bd9cc5cbfe25c2fab433fe1780e86cf0a82d24a000c6931e327da6a8ffb3dce528a24f83f256e7efc0b36813113eff8fdc6839018efe327 - languageName: node - linkType: hard - -"err-code@npm:^2.0.2": - version: 2.0.3 - resolution: "err-code@npm:2.0.3" - checksum: 10c0/b642f7b4dd4a376e954947550a3065a9ece6733ab8e51ad80db727aaae0817c2e99b02a97a3d6cecc648a97848305e728289cf312d09af395403a90c9d4d8a66 - languageName: node - linkType: hard - -"es-define-property@npm:^1.0.0, es-define-property@npm:^1.0.1": - version: 1.0.1 - resolution: "es-define-property@npm:1.0.1" - checksum: 10c0/3f54eb49c16c18707949ff25a1456728c883e81259f045003499efba399c08bad00deebf65cccde8c0e07908c1a225c9d472b7107e558f2a48e28d530e34527c - languageName: node - linkType: hard - -"es-errors@npm:^1.3.0": - version: 1.3.0 - resolution: "es-errors@npm:1.3.0" - checksum: 10c0/0a61325670072f98d8ae3b914edab3559b6caa980f08054a3b872052640d91da01d38df55df797fcc916389d77fc92b8d5906cf028f4db46d7e3003abecbca85 - languageName: node - linkType: hard - -"es-module-lexer@npm:^1.2.1": - version: 1.6.0 - resolution: "es-module-lexer@npm:1.6.0" - checksum: 10c0/667309454411c0b95c476025929881e71400d74a746ffa1ff4cb450bd87f8e33e8eef7854d68e401895039ac0bac64e7809acbebb6253e055dd49ea9e3ea9212 - languageName: node - linkType: hard - -"es-object-atoms@npm:^1.0.0": - version: 1.1.1 - resolution: "es-object-atoms@npm:1.1.1" - dependencies: - es-errors: "npm:^1.3.0" - checksum: 10c0/65364812ca4daf48eb76e2a3b7a89b3f6a2e62a1c420766ce9f692665a29d94fe41fe88b65f24106f449859549711e4b40d9fb8002d862dfd7eb1c512d10be0c - languageName: node - linkType: hard - -"escalade@npm:^3.1.1, escalade@npm:^3.2.0": - version: 3.2.0 - resolution: "escalade@npm:3.2.0" - checksum: 10c0/ced4dd3a78e15897ed3be74e635110bbf3b08877b0a41be50dcb325ee0e0b5f65fc2d50e9845194d7c4633f327e2e1c6cce00a71b617c5673df0374201d67f65 - languageName: node - linkType: hard - -"escape-html@npm:~1.0.3": - version: 1.0.3 - resolution: "escape-html@npm:1.0.3" - checksum: 10c0/524c739d776b36c3d29fa08a22e03e8824e3b2fd57500e5e44ecf3cc4707c34c60f9ca0781c0e33d191f2991161504c295e98f68c78fe7baa6e57081ec6ac0a3 - languageName: node - linkType: hard - -"escape-string-regexp@npm:^1.0.5": - version: 1.0.5 - resolution: "escape-string-regexp@npm:1.0.5" - checksum: 10c0/a968ad453dd0c2724e14a4f20e177aaf32bb384ab41b674a8454afe9a41c5e6fe8903323e0a1052f56289d04bd600f81278edf140b0fcc02f5cac98d0f5b5371 - languageName: node - linkType: hard - -"eslint-scope@npm:5.1.1": - version: 5.1.1 - resolution: "eslint-scope@npm:5.1.1" - dependencies: - esrecurse: "npm:^4.3.0" - estraverse: "npm:^4.1.1" - checksum: 10c0/d30ef9dc1c1cbdece34db1539a4933fe3f9b14e1ffb27ecc85987902ee663ad7c9473bbd49a9a03195a373741e62e2f807c4938992e019b511993d163450e70a - languageName: node - linkType: hard - -"esrecurse@npm:^4.3.0": - version: 4.3.0 - resolution: "esrecurse@npm:4.3.0" - dependencies: - estraverse: "npm:^5.2.0" - checksum: 10c0/81a37116d1408ded88ada45b9fb16dbd26fba3aadc369ce50fcaf82a0bac12772ebd7b24cd7b91fc66786bf2c1ac7b5f196bc990a473efff972f5cb338877cf5 - languageName: node - linkType: hard - -"estraverse@npm:^4.1.1": - version: 4.3.0 - resolution: "estraverse@npm:4.3.0" - checksum: 10c0/9cb46463ef8a8a4905d3708a652d60122a0c20bb58dec7e0e12ab0e7235123d74214fc0141d743c381813e1b992767e2708194f6f6e0f9fd00c1b4e0887b8b6d - languageName: node - linkType: hard - -"estraverse@npm:^5.2.0": - version: 5.3.0 - resolution: "estraverse@npm:5.3.0" - checksum: 10c0/1ff9447b96263dec95d6d67431c5e0771eb9776427421260a3e2f0fdd5d6bd4f8e37a7338f5ad2880c9f143450c9b1e4fc2069060724570a49cf9cf0312bd107 - languageName: node - linkType: hard - -"etag@npm:~1.8.1": - version: 1.8.1 - resolution: "etag@npm:1.8.1" - checksum: 10c0/12be11ef62fb9817314d790089a0a49fae4e1b50594135dcb8076312b7d7e470884b5100d249b28c18581b7fd52f8b485689ffae22a11ed9ec17377a33a08f84 - languageName: node - linkType: hard - -"eventemitter3@npm:^4.0.0": - version: 4.0.7 - resolution: "eventemitter3@npm:4.0.7" - checksum: 10c0/5f6d97cbcbac47be798e6355e3a7639a84ee1f7d9b199a07017f1d2f1e2fe236004d14fa5dfaeba661f94ea57805385e326236a6debbc7145c8877fbc0297c6b - languageName: node - linkType: hard - -"events@npm:^3.2.0": - version: 3.3.0 - resolution: "events@npm:3.3.0" - checksum: 10c0/d6b6f2adbccbcda74ddbab52ed07db727ef52e31a61ed26db9feb7dc62af7fc8e060defa65e5f8af9449b86b52cc1a1f6a79f2eafcf4e62add2b7a1fa4a432f6 - languageName: node - linkType: hard - -"evp_bytestokey@npm:^1.0.0, evp_bytestokey@npm:^1.0.3": - version: 1.0.3 - resolution: "evp_bytestokey@npm:1.0.3" - dependencies: - md5.js: "npm:^1.3.4" - node-gyp: "npm:latest" - safe-buffer: "npm:^5.1.1" - checksum: 10c0/77fbe2d94a902a80e9b8f5a73dcd695d9c14899c5e82967a61b1fc6cbbb28c46552d9b127cff47c45fcf684748bdbcfa0a50410349109de87ceb4b199ef6ee99 - languageName: node - linkType: hard - -"exponential-backoff@npm:^3.1.1": - version: 3.1.1 - resolution: "exponential-backoff@npm:3.1.1" - checksum: 10c0/160456d2d647e6019640bd07111634d8c353038d9fa40176afb7cd49b0548bdae83b56d05e907c2cce2300b81cae35d800ef92fefb9d0208e190fa3b7d6bb579 - languageName: node - linkType: hard - -"express@npm:^4.21.2": - version: 4.21.2 - resolution: "express@npm:4.21.2" - dependencies: - accepts: "npm:~1.3.8" - array-flatten: "npm:1.1.1" - body-parser: "npm:1.20.3" - content-disposition: "npm:0.5.4" - content-type: "npm:~1.0.4" - cookie: "npm:0.7.1" - cookie-signature: "npm:1.0.6" - debug: "npm:2.6.9" - depd: "npm:2.0.0" - encodeurl: "npm:~2.0.0" - escape-html: "npm:~1.0.3" - etag: "npm:~1.8.1" - finalhandler: "npm:1.3.1" - fresh: "npm:0.5.2" - http-errors: "npm:2.0.0" - merge-descriptors: "npm:1.0.3" - methods: "npm:~1.1.2" - on-finished: "npm:2.4.1" - parseurl: "npm:~1.3.3" - path-to-regexp: "npm:0.1.12" - proxy-addr: "npm:~2.0.7" - qs: "npm:6.13.0" - range-parser: "npm:~1.2.1" - safe-buffer: "npm:5.2.1" - send: "npm:0.19.0" - serve-static: "npm:1.16.2" - setprototypeof: "npm:1.2.0" - statuses: "npm:2.0.1" - type-is: "npm:~1.6.18" - utils-merge: "npm:1.0.1" - vary: "npm:~1.1.2" - checksum: 10c0/38168fd0a32756600b56e6214afecf4fc79ec28eca7f7a91c2ab8d50df4f47562ca3f9dee412da7f5cea6b1a1544b33b40f9f8586dbacfbdada0fe90dbb10a1f - languageName: node - linkType: hard - -"extend@npm:^3.0.0": - version: 3.0.2 - resolution: "extend@npm:3.0.2" - checksum: 10c0/73bf6e27406e80aa3e85b0d1c4fd987261e628064e170ca781125c0b635a3dabad5e05adbf07595ea0cf1e6c5396cacb214af933da7cbaf24fe75ff14818e8f9 - languageName: node - linkType: hard - -"fast-deep-equal@npm:^3.1.1, fast-deep-equal@npm:^3.1.3": - version: 3.1.3 - resolution: "fast-deep-equal@npm:3.1.3" - checksum: 10c0/40dedc862eb8992c54579c66d914635afbec43350afbbe991235fdcb4e3a8d5af1b23ae7e79bef7d4882d0ecee06c3197488026998fb19f72dc95acff1d1b1d0 - languageName: node - linkType: hard - -"fast-json-stable-stringify@npm:^2.0.0": - version: 2.1.0 - resolution: "fast-json-stable-stringify@npm:2.1.0" - checksum: 10c0/7f081eb0b8a64e0057b3bb03f974b3ef00135fbf36c1c710895cd9300f13c94ba809bb3a81cf4e1b03f6e5285610a61abbd7602d0652de423144dfee5a389c9b - languageName: node - linkType: hard - -"fast-uri@npm:^3.0.1": - version: 3.0.5 - resolution: "fast-uri@npm:3.0.5" - checksum: 10c0/f5501fd849e02f16f1730d2c8628078718c492b5bc00198068bc5c2880363ae948287fdc8cebfff47465229b517dbeaf668866fbabdff829b4138a899e5c2ba3 - languageName: node - linkType: hard - -"fastest-levenshtein@npm:^1.0.12": - version: 1.0.16 - resolution: "fastest-levenshtein@npm:1.0.16" - checksum: 10c0/7e3d8ae812a7f4fdf8cad18e9cde436a39addf266a5986f653ea0d81e0de0900f50c0f27c6d5aff3f686bcb48acbd45be115ae2216f36a6a13a7dbbf5cad878b - languageName: node - linkType: hard - -"faye-websocket@npm:^0.11.3": - version: 0.11.4 - resolution: "faye-websocket@npm:0.11.4" - dependencies: - websocket-driver: "npm:>=0.5.1" - checksum: 10c0/c6052a0bb322778ce9f89af92890f6f4ce00d5ec92418a35e5f4c6864a4fe736fec0bcebd47eac7c0f0e979b01530746b1c85c83cb04bae789271abf19737420 - languageName: node - linkType: hard - -"fill-range@npm:^7.1.1": - version: 7.1.1 - resolution: "fill-range@npm:7.1.1" - dependencies: - to-regex-range: "npm:^5.0.1" - checksum: 10c0/b75b691bbe065472f38824f694c2f7449d7f5004aa950426a2c28f0306c60db9b880c0b0e4ed819997ffb882d1da02cfcfc819bddc94d71627f5269682edf018 - languageName: node - linkType: hard - -"finalhandler@npm:1.1.2": - version: 1.1.2 - resolution: "finalhandler@npm:1.1.2" - dependencies: - debug: "npm:2.6.9" - encodeurl: "npm:~1.0.2" - escape-html: "npm:~1.0.3" - on-finished: "npm:~2.3.0" - parseurl: "npm:~1.3.3" - statuses: "npm:~1.5.0" - unpipe: "npm:~1.0.0" - checksum: 10c0/6a96e1f5caab085628c11d9fdceb82ba608d5e426c6913d4d918409baa271037a47f28fbba73279e8ad614f0b8fa71ea791d265e408d760793829edd8c2f4584 - languageName: node - linkType: hard - -"finalhandler@npm:1.3.1": - version: 1.3.1 - resolution: "finalhandler@npm:1.3.1" - dependencies: - debug: "npm:2.6.9" - encodeurl: "npm:~2.0.0" - escape-html: "npm:~1.0.3" - on-finished: "npm:2.4.1" - parseurl: "npm:~1.3.3" - statuses: "npm:2.0.1" - unpipe: "npm:~1.0.0" - checksum: 10c0/d38035831865a49b5610206a3a9a9aae4e8523cbbcd01175d0480ffbf1278c47f11d89be3ca7f617ae6d94f29cf797546a4619cd84dd109009ef33f12f69019f - languageName: node - linkType: hard - -"find-up@npm:^4.0.0": - version: 4.1.0 - resolution: "find-up@npm:4.1.0" - dependencies: - locate-path: "npm:^5.0.0" - path-exists: "npm:^4.0.0" - checksum: 10c0/0406ee89ebeefa2d507feb07ec366bebd8a6167ae74aa4e34fb4c4abd06cf782a3ce26ae4194d70706f72182841733f00551c209fe575cb00bd92104056e78c1 - languageName: node - linkType: hard - -"flat@npm:^5.0.2": - version: 5.0.2 - resolution: "flat@npm:5.0.2" - bin: - flat: cli.js - checksum: 10c0/f178b13482f0cd80c7fede05f4d10585b1f2fdebf26e12edc138e32d3150c6ea6482b7f12813a1091143bad52bb6d3596bca51a162257a21163c0ff438baa5fe - languageName: node - linkType: hard - -"flatted@npm:^3.2.7": - version: 3.3.2 - resolution: "flatted@npm:3.3.2" - checksum: 10c0/24cc735e74d593b6c767fe04f2ef369abe15b62f6906158079b9874bdb3ee5ae7110bb75042e70cd3f99d409d766f357caf78d5ecee9780206f5fdc5edbad334 - languageName: node - linkType: hard - -"follow-redirects@npm:^1.0.0": - version: 1.15.9 - resolution: "follow-redirects@npm:1.15.9" - peerDependenciesMeta: - debug: - optional: true - checksum: 10c0/5829165bd112c3c0e82be6c15b1a58fa9dcfaede3b3c54697a82fe4a62dd5ae5e8222956b448d2f98e331525f05d00404aba7d696de9e761ef6e42fdc780244f - languageName: node - linkType: hard - -"for-each@npm:^0.3.3": - version: 0.3.3 - resolution: "for-each@npm:0.3.3" - dependencies: - is-callable: "npm:^1.1.3" - checksum: 10c0/22330d8a2db728dbf003ec9182c2d421fbcd2969b02b4f97ec288721cda63eb28f2c08585ddccd0f77cb2930af8d958005c9e72f47141dc51816127a118f39aa - languageName: node - linkType: hard - -"foreground-child@npm:^3.1.0": - version: 3.3.0 - resolution: "foreground-child@npm:3.3.0" - dependencies: - cross-spawn: "npm:^7.0.0" - signal-exit: "npm:^4.0.1" - checksum: 10c0/028f1d41000553fcfa6c4bb5c372963bf3d9bf0b1f25a87d1a6253014343fb69dfb1b42d9625d7cf44c8ba429940f3d0ff718b62105d4d4a4f6ef8ca0a53faa2 - languageName: node - linkType: hard - -"forwarded@npm:0.2.0": - version: 0.2.0 - resolution: "forwarded@npm:0.2.0" - checksum: 10c0/9b67c3fac86acdbc9ae47ba1ddd5f2f81526fa4c8226863ede5600a3f7c7416ef451f6f1e240a3cc32d0fd79fcfe6beb08fd0da454f360032bde70bf80afbb33 - languageName: node - linkType: hard - -"fresh@npm:0.5.2": - version: 0.5.2 - resolution: "fresh@npm:0.5.2" - checksum: 10c0/c6d27f3ed86cc5b601404822f31c900dd165ba63fff8152a3ef714e2012e7535027063bc67ded4cb5b3a49fa596495d46cacd9f47d6328459cf570f08b7d9e5a - languageName: node - linkType: hard - -"fs-extra@npm:^8.1.0": - version: 8.1.0 - resolution: "fs-extra@npm:8.1.0" - dependencies: - graceful-fs: "npm:^4.2.0" - jsonfile: "npm:^4.0.0" - universalify: "npm:^0.1.0" - checksum: 10c0/259f7b814d9e50d686899550c4f9ded85c46c643f7fe19be69504888e007fcbc08f306fae8ec495b8b998635e997c9e3e175ff2eeed230524ef1c1684cc96423 - languageName: node - linkType: hard - -"fs-minipass@npm:^3.0.0": - version: 3.0.3 - resolution: "fs-minipass@npm:3.0.3" - dependencies: - minipass: "npm:^7.0.3" - checksum: 10c0/63e80da2ff9b621e2cb1596abcb9207f1cf82b968b116ccd7b959e3323144cce7fb141462200971c38bbf2ecca51695069db45265705bed09a7cd93ae5b89f94 - languageName: node - linkType: hard - -"fs.realpath@npm:^1.0.0": - version: 1.0.0 - resolution: "fs.realpath@npm:1.0.0" - checksum: 10c0/444cf1291d997165dfd4c0d58b69f0e4782bfd9149fd72faa4fe299e68e0e93d6db941660b37dd29153bf7186672ececa3b50b7e7249477b03fdf850f287c948 - languageName: node - linkType: hard - -"fsevents@npm:~2.3.2": - version: 2.3.3 - resolution: "fsevents@npm:2.3.3" - dependencies: - node-gyp: "npm:latest" - checksum: 10c0/a1f0c44595123ed717febbc478aa952e47adfc28e2092be66b8ab1635147254ca6cfe1df792a8997f22716d4cbafc73309899ff7bfac2ac3ad8cf2e4ecc3ec60 - conditions: os=darwin - languageName: node - linkType: hard - -"fsevents@patch:fsevents@npm%3A~2.3.2#optional!builtin": - version: 2.3.3 - resolution: "fsevents@patch:fsevents@npm%3A2.3.3#optional!builtin::version=2.3.3&hash=df0bf1" - dependencies: - node-gyp: "npm:latest" - conditions: os=darwin - languageName: node - linkType: hard - -"function-bind@npm:^1.1.2": - version: 1.1.2 - resolution: "function-bind@npm:1.1.2" - checksum: 10c0/d8680ee1e5fcd4c197e4ac33b2b4dce03c71f4d91717292785703db200f5c21f977c568d28061226f9b5900cbcd2c84463646134fd5337e7925e0942bc3f46d5 - languageName: node - linkType: hard - -"gensync@npm:^1.0.0-beta.2": - version: 1.0.0-beta.2 - resolution: "gensync@npm:1.0.0-beta.2" - checksum: 10c0/782aba6cba65b1bb5af3b095d96249d20edbe8df32dbf4696fd49be2583faf676173bf4809386588828e4dd76a3354fcbeb577bab1c833ccd9fc4577f26103f8 - languageName: node - linkType: hard - -"get-caller-file@npm:^2.0.5": - version: 2.0.5 - resolution: "get-caller-file@npm:2.0.5" - checksum: 10c0/c6c7b60271931fa752aeb92f2b47e355eac1af3a2673f47c9589e8f8a41adc74d45551c1bc57b5e66a80609f10ffb72b6f575e4370d61cc3f7f3aaff01757cde - languageName: node - linkType: hard - -"get-intrinsic@npm:^1.2.4, get-intrinsic@npm:^1.2.5, get-intrinsic@npm:^1.2.6": - version: 1.2.7 - resolution: "get-intrinsic@npm:1.2.7" - dependencies: - call-bind-apply-helpers: "npm:^1.0.1" - es-define-property: "npm:^1.0.1" - es-errors: "npm:^1.3.0" - es-object-atoms: "npm:^1.0.0" - function-bind: "npm:^1.1.2" - get-proto: "npm:^1.0.0" - gopd: "npm:^1.2.0" - has-symbols: "npm:^1.1.0" - hasown: "npm:^2.0.2" - math-intrinsics: "npm:^1.1.0" - checksum: 10c0/b475dec9f8bff6f7422f51ff4b7b8d0b68e6776ee83a753c1d627e3008c3442090992788038b37eff72e93e43dceed8c1acbdf2d6751672687ec22127933080d - languageName: node - linkType: hard - -"get-proto@npm:^1.0.0": - version: 1.0.1 - resolution: "get-proto@npm:1.0.1" - dependencies: - dunder-proto: "npm:^1.0.1" - es-object-atoms: "npm:^1.0.0" - checksum: 10c0/9224acb44603c5526955e83510b9da41baf6ae73f7398875fba50edc5e944223a89c4a72b070fcd78beb5f7bdda58ecb6294adc28f7acfc0da05f76a2399643c - languageName: node - linkType: hard - -"glob-parent@npm:~5.1.2": - version: 5.1.2 - resolution: "glob-parent@npm:5.1.2" - dependencies: - is-glob: "npm:^4.0.1" - checksum: 10c0/cab87638e2112bee3f839ef5f6e0765057163d39c66be8ec1602f3823da4692297ad4e972de876ea17c44d652978638d2fd583c6713d0eb6591706825020c9ee - languageName: node - linkType: hard - -"glob-to-regexp@npm:^0.4.1": - version: 0.4.1 - resolution: "glob-to-regexp@npm:0.4.1" - checksum: 10c0/0486925072d7a916f052842772b61c3e86247f0a80cc0deb9b5a3e8a1a9faad5b04fb6f58986a09f34d3e96cd2a22a24b7e9882fb1cf904c31e9a310de96c429 - languageName: node - linkType: hard - -"glob@npm:^10.2.2, glob@npm:^10.3.10, glob@npm:^10.3.7": - version: 10.4.5 - resolution: "glob@npm:10.4.5" - dependencies: - foreground-child: "npm:^3.1.0" - jackspeak: "npm:^3.1.2" - minimatch: "npm:^9.0.4" - minipass: "npm:^7.1.2" - package-json-from-dist: "npm:^1.0.0" - path-scurry: "npm:^1.11.1" - bin: - glob: dist/esm/bin.mjs - checksum: 10c0/19a9759ea77b8e3ca0a43c2f07ecddc2ad46216b786bb8f993c445aee80d345925a21e5280c7b7c6c59e860a0154b84e4b2b60321fea92cd3c56b4a7489f160e - languageName: node - linkType: hard - -"glob@npm:^7.1.3, glob@npm:^7.1.6, glob@npm:^7.1.7": - version: 7.2.3 - resolution: "glob@npm:7.2.3" - dependencies: - fs.realpath: "npm:^1.0.0" - inflight: "npm:^1.0.4" - inherits: "npm:2" - minimatch: "npm:^3.1.1" - once: "npm:^1.3.0" - path-is-absolute: "npm:^1.0.0" - checksum: 10c0/65676153e2b0c9095100fe7f25a778bf45608eeb32c6048cf307f579649bcc30353277b3b898a3792602c65764e5baa4f643714dfbdfd64ea271d210c7a425fe - languageName: node - linkType: hard - -"globals@npm:^11.1.0": - version: 11.12.0 - resolution: "globals@npm:11.12.0" - checksum: 10c0/758f9f258e7b19226bd8d4af5d3b0dcf7038780fb23d82e6f98932c44e239f884847f1766e8fa9cc5635ccb3204f7fa7314d4408dd4002a5e8ea827b4018f0a1 - languageName: node - linkType: hard - -"gopd@npm:^1.0.1, gopd@npm:^1.2.0": - version: 1.2.0 - resolution: "gopd@npm:1.2.0" - checksum: 10c0/50fff1e04ba2b7737c097358534eacadad1e68d24cccee3272e04e007bed008e68d2614f3987788428fd192a5ae3889d08fb2331417e4fc4a9ab366b2043cead - languageName: node - linkType: hard - -"graceful-fs@npm:^4.1.2, graceful-fs@npm:^4.1.6, graceful-fs@npm:^4.2.0, graceful-fs@npm:^4.2.11, graceful-fs@npm:^4.2.4, graceful-fs@npm:^4.2.6": - version: 4.2.11 - resolution: "graceful-fs@npm:4.2.11" - checksum: 10c0/386d011a553e02bc594ac2ca0bd6d9e4c22d7fa8cfbfc448a6d148c59ea881b092db9dbe3547ae4b88e55f1b01f7c4a2ecc53b310c042793e63aa44cf6c257f2 - languageName: node - linkType: hard - -"handle-thing@npm:^2.0.0": - version: 2.0.1 - resolution: "handle-thing@npm:2.0.1" - checksum: 10c0/7ae34ba286a3434f1993ebd1cc9c9e6b6d8ea672182db28b1afc0a7119229552fa7031e3e5f3cd32a76430ece4e94b7da6f12af2eb39d6239a7693e4bd63a998 - languageName: node - linkType: hard - -"has-flag@npm:^3.0.0": - version: 3.0.0 - resolution: "has-flag@npm:3.0.0" - checksum: 10c0/1c6c83b14b8b1b3c25b0727b8ba3e3b647f99e9e6e13eb7322107261de07a4c1be56fc0d45678fc376e09772a3a1642ccdaf8fc69bdf123b6c086598397ce473 - languageName: node - linkType: hard - -"has-flag@npm:^4.0.0": - version: 4.0.0 - resolution: "has-flag@npm:4.0.0" - checksum: 10c0/2e789c61b7888d66993e14e8331449e525ef42aac53c627cc53d1c3334e768bcb6abdc4f5f0de1478a25beec6f0bd62c7549058b7ac53e924040d4f301f02fd1 - languageName: node - linkType: hard - -"has-property-descriptors@npm:^1.0.0, has-property-descriptors@npm:^1.0.2": - version: 1.0.2 - resolution: "has-property-descriptors@npm:1.0.2" - dependencies: - es-define-property: "npm:^1.0.0" - checksum: 10c0/253c1f59e80bb476cf0dde8ff5284505d90c3bdb762983c3514d36414290475fe3fd6f574929d84de2a8eec00d35cf07cb6776205ff32efd7c50719125f00236 - languageName: node - linkType: hard - -"has-symbols@npm:^1.0.3, has-symbols@npm:^1.1.0": - version: 1.1.0 - resolution: "has-symbols@npm:1.1.0" - checksum: 10c0/dde0a734b17ae51e84b10986e651c664379018d10b91b6b0e9b293eddb32f0f069688c841fb40f19e9611546130153e0a2a48fd7f512891fb000ddfa36f5a20e - languageName: node - linkType: hard - -"has-tostringtag@npm:^1.0.2": - version: 1.0.2 - resolution: "has-tostringtag@npm:1.0.2" - dependencies: - has-symbols: "npm:^1.0.3" - checksum: 10c0/a8b166462192bafe3d9b6e420a1d581d93dd867adb61be223a17a8d6dad147aa77a8be32c961bb2f27b3ef893cae8d36f564ab651f5e9b7938ae86f74027c48c - languageName: node - linkType: hard - -"hash-base@npm:^3.0.0": - version: 3.1.0 - resolution: "hash-base@npm:3.1.0" - dependencies: - inherits: "npm:^2.0.4" - readable-stream: "npm:^3.6.0" - safe-buffer: "npm:^5.2.0" - checksum: 10c0/663eabcf4173326fbb65a1918a509045590a26cc7e0964b754eef248d281305c6ec9f6b31cb508d02ffca383ab50028180ce5aefe013e942b44a903ac8dc80d0 - languageName: node - linkType: hard - -"hash-base@npm:~3.0, hash-base@npm:~3.0.4": - version: 3.0.5 - resolution: "hash-base@npm:3.0.5" - dependencies: - inherits: "npm:^2.0.4" - safe-buffer: "npm:^5.2.1" - checksum: 10c0/6dc185b79bad9b6d525cd132a588e4215380fdc36fec6f7a8a58c5db8e3b642557d02ad9c367f5e476c7c3ad3ccffa3607f308b124e1ed80e3b80a1b254db61e - languageName: node - linkType: hard - -"hash.js@npm:^1.0.0, hash.js@npm:^1.0.3": - version: 1.1.7 - resolution: "hash.js@npm:1.1.7" - dependencies: - inherits: "npm:^2.0.3" - minimalistic-assert: "npm:^1.0.1" - checksum: 10c0/41ada59494eac5332cfc1ce6b7ebdd7b88a3864a6d6b08a3ea8ef261332ed60f37f10877e0c825aaa4bddebf164fbffa618286aeeec5296675e2671cbfa746c4 - languageName: node - linkType: hard - -"hasown@npm:^2.0.2": - version: 2.0.2 - resolution: "hasown@npm:2.0.2" - dependencies: - function-bind: "npm:^1.1.2" - checksum: 10c0/3769d434703b8ac66b209a4cca0737519925bbdb61dd887f93a16372b14694c63ff4e797686d87c90f08168e81082248b9b028bad60d4da9e0d1148766f56eb9 - languageName: node - linkType: hard - -"hmac-drbg@npm:^1.0.1": - version: 1.0.1 - resolution: "hmac-drbg@npm:1.0.1" - dependencies: - hash.js: "npm:^1.0.3" - minimalistic-assert: "npm:^1.0.0" - minimalistic-crypto-utils: "npm:^1.0.1" - checksum: 10c0/f3d9ba31b40257a573f162176ac5930109816036c59a09f901eb2ffd7e5e705c6832bedfff507957125f2086a0ab8f853c0df225642a88bf1fcaea945f20600d - languageName: node - linkType: hard - -"hpack.js@npm:^2.1.6": - version: 2.1.6 - resolution: "hpack.js@npm:2.1.6" - dependencies: - inherits: "npm:^2.0.1" - obuf: "npm:^1.0.0" - readable-stream: "npm:^2.0.1" - wbuf: "npm:^1.1.0" - checksum: 10c0/55b9e824430bab82a19d079cb6e33042d7d0640325678c9917fcc020c61d8a08ca671b6c942c7f0aae9bb6e4b67ffb50734a72f9e21d66407c3138c1983b70f0 - languageName: node - linkType: hard - -"html-escaper@npm:^2.0.0": - version: 2.0.2 - resolution: "html-escaper@npm:2.0.2" - checksum: 10c0/208e8a12de1a6569edbb14544f4567e6ce8ecc30b9394fcaa4e7bb1e60c12a7c9a1ed27e31290817157e8626f3a4f29e76c8747030822eb84a6abb15c255f0a0 - languageName: node - linkType: hard - -"http-cache-semantics@npm:^4.1.1": - version: 4.1.1 - resolution: "http-cache-semantics@npm:4.1.1" - checksum: 10c0/ce1319b8a382eb3cbb4a37c19f6bfe14e5bb5be3d09079e885e8c513ab2d3cd9214902f8a31c9dc4e37022633ceabfc2d697405deeaf1b8f3552bb4ed996fdfc - languageName: node - linkType: hard - -"http-deceiver@npm:^1.2.7": - version: 1.2.7 - resolution: "http-deceiver@npm:1.2.7" - checksum: 10c0/8bb9b716f5fc55f54a451da7f49b9c695c3e45498a789634daec26b61e4add7c85613a4a9e53726c39d09de7a163891ecd6eb5809adb64500a840fd86fe81d03 - languageName: node - linkType: hard - -"http-errors@npm:2.0.0": - version: 2.0.0 - resolution: "http-errors@npm:2.0.0" - dependencies: - depd: "npm:2.0.0" - inherits: "npm:2.0.4" - setprototypeof: "npm:1.2.0" - statuses: "npm:2.0.1" - toidentifier: "npm:1.0.1" - checksum: 10c0/fc6f2715fe188d091274b5ffc8b3657bd85c63e969daa68ccb77afb05b071a4b62841acb7a21e417b5539014dff2ebf9550f0b14a9ff126f2734a7c1387f8e19 - languageName: node - linkType: hard - -"http-errors@npm:~1.6.2": - version: 1.6.3 - resolution: "http-errors@npm:1.6.3" - dependencies: - depd: "npm:~1.1.2" - inherits: "npm:2.0.3" - setprototypeof: "npm:1.1.0" - statuses: "npm:>= 1.4.0 < 2" - checksum: 10c0/17ec4046ee974477778bfdd525936c254b872054703ec2caa4d6f099566b8adade636ae6aeeacb39302c5cd6e28fb407ebd937f500f5010d0b6850750414ff78 - languageName: node - linkType: hard - -"http-parser-js@npm:>=0.5.1": - version: 0.5.9 - resolution: "http-parser-js@npm:0.5.9" - checksum: 10c0/25aac1096b5270e69b1f6c850c8d4363c1e8b5711f97109cf65d44ecf5dfe3438811036a9b4d4f432474a2519ac46e8feb1a7b6be6e292a956e63bdad12583fb - languageName: node - linkType: hard - -"http-proxy-agent@npm:^7.0.0": - version: 7.0.2 - resolution: "http-proxy-agent@npm:7.0.2" - dependencies: - agent-base: "npm:^7.1.0" - debug: "npm:^4.3.4" - checksum: 10c0/4207b06a4580fb85dd6dff521f0abf6db517489e70863dca1a0291daa7f2d3d2d6015a57bd702af068ea5cf9f1f6ff72314f5f5b4228d299c0904135d2aef921 - languageName: node - linkType: hard - -"http-proxy-middleware@npm:^2.0.7": - version: 2.0.7 - resolution: "http-proxy-middleware@npm:2.0.7" - dependencies: - "@types/http-proxy": "npm:^1.17.8" - http-proxy: "npm:^1.18.1" - is-glob: "npm:^4.0.1" - is-plain-obj: "npm:^3.0.0" - micromatch: "npm:^4.0.2" - peerDependencies: - "@types/express": ^4.17.13 - peerDependenciesMeta: - "@types/express": - optional: true - checksum: 10c0/8d00a61eb215b83826460b07489d8bb095368ec16e02a9d63e228dcf7524e7c20d61561e5476de1391aecd4ec32ea093279cdc972115b311f8e0a95a24c9e47e - languageName: node - linkType: hard - -"http-proxy@npm:^1.18.1": - version: 1.18.1 - resolution: "http-proxy@npm:1.18.1" - dependencies: - eventemitter3: "npm:^4.0.0" - follow-redirects: "npm:^1.0.0" - requires-port: "npm:^1.0.0" - checksum: 10c0/148dfa700a03fb421e383aaaf88ac1d94521dfc34072f6c59770528c65250983c2e4ec996f2f03aa9f3fe46cd1270a593126068319311e3e8d9e610a37533e94 - languageName: node - linkType: hard - -"https-browserify@npm:^1.0.0": - version: 1.0.0 - resolution: "https-browserify@npm:1.0.0" - checksum: 10c0/e17b6943bc24ea9b9a7da5714645d808670af75a425f29baffc3284962626efdc1eb3aa9bbffaa6e64028a6ad98af5b09fabcb454a8f918fb686abfdc9e9b8ae - languageName: node - linkType: hard - -"https-proxy-agent@npm:^7.0.1": - version: 7.0.6 - resolution: "https-proxy-agent@npm:7.0.6" - dependencies: - agent-base: "npm:^7.1.2" - debug: "npm:4" - checksum: 10c0/f729219bc735edb621fa30e6e84e60ee5d00802b8247aac0d7b79b0bd6d4b3294737a337b93b86a0bd9e68099d031858a39260c976dc14cdbba238ba1f8779ac - languageName: node - linkType: hard - -"hyperdyperid@npm:^1.2.0": - version: 1.2.0 - resolution: "hyperdyperid@npm:1.2.0" - checksum: 10c0/885ba3177c7181d315a856ee9c0005ff8eb5dcb1ce9e9d61be70987895d934d84686c37c981cceeb53216d4c9c15c1cc25f1804e84cc6a74a16993c5d7fd0893 - languageName: node - linkType: hard - -"iconv-lite@npm:0.4.24": - version: 0.4.24 - resolution: "iconv-lite@npm:0.4.24" - dependencies: - safer-buffer: "npm:>= 2.1.2 < 3" - checksum: 10c0/c6886a24cc00f2a059767440ec1bc00d334a89f250db8e0f7feb4961c8727118457e27c495ba94d082e51d3baca378726cd110aaf7ded8b9bbfd6a44760cf1d4 - languageName: node - linkType: hard - -"iconv-lite@npm:^0.6.2": - version: 0.6.3 - resolution: "iconv-lite@npm:0.6.3" - dependencies: - safer-buffer: "npm:>= 2.1.2 < 3.0.0" - checksum: 10c0/98102bc66b33fcf5ac044099d1257ba0b7ad5e3ccd3221f34dd508ab4070edff183276221684e1e0555b145fce0850c9f7d2b60a9fcac50fbb4ea0d6e845a3b1 - languageName: node - linkType: hard - -"ieee754@npm:^1.1.13": - version: 1.2.1 - resolution: "ieee754@npm:1.2.1" - checksum: 10c0/b0782ef5e0935b9f12883a2e2aa37baa75da6e66ce6515c168697b42160807d9330de9a32ec1ed73149aea02e0d822e572bca6f1e22bdcbd2149e13b050b17bb - languageName: node - linkType: hard - -"import-local@npm:^3.0.2": - version: 3.2.0 - resolution: "import-local@npm:3.2.0" - dependencies: - pkg-dir: "npm:^4.2.0" - resolve-cwd: "npm:^3.0.0" - bin: - import-local-fixture: fixtures/cli.js - checksum: 10c0/94cd6367a672b7e0cb026970c85b76902d2710a64896fa6de93bd5c571dd03b228c5759308959de205083e3b1c61e799f019c9e36ee8e9c523b993e1057f0433 - languageName: node - linkType: hard - -"imurmurhash@npm:^0.1.4": - version: 0.1.4 - resolution: "imurmurhash@npm:0.1.4" - checksum: 10c0/8b51313850dd33605c6c9d3fd9638b714f4c4c40250cff658209f30d40da60f78992fb2df5dabee4acf589a6a82bbc79ad5486550754bd9ec4e3fc0d4a57d6a6 - languageName: node - linkType: hard - -"inflight@npm:^1.0.4": - version: 1.0.6 - resolution: "inflight@npm:1.0.6" - dependencies: - once: "npm:^1.3.0" - wrappy: "npm:1" - checksum: 10c0/7faca22584600a9dc5b9fca2cd5feb7135ac8c935449837b315676b4c90aa4f391ec4f42240178244b5a34e8bede1948627fda392ca3191522fc46b34e985ab2 - languageName: node - linkType: hard - -"inherits@npm:2, inherits@npm:2.0.4, inherits@npm:^2.0.1, inherits@npm:^2.0.3, inherits@npm:^2.0.4, inherits@npm:~2.0.3, inherits@npm:~2.0.4": - version: 2.0.4 - resolution: "inherits@npm:2.0.4" - checksum: 10c0/4e531f648b29039fb7426fb94075e6545faa1eb9fe83c29f0b6d9e7263aceb4289d2d4557db0d428188eeb449cc7c5e77b0a0b2c4e248ff2a65933a0dee49ef2 - languageName: node - linkType: hard - -"inherits@npm:2.0.3": - version: 2.0.3 - resolution: "inherits@npm:2.0.3" - checksum: 10c0/6e56402373149ea076a434072671f9982f5fad030c7662be0332122fe6c0fa490acb3cc1010d90b6eff8d640b1167d77674add52dfd1bb85d545cf29e80e73e7 - languageName: node - linkType: hard - -"inline-source-map@npm:~0.6.0": - version: 0.6.3 - resolution: "inline-source-map@npm:0.6.3" - dependencies: - source-map: "npm:~0.5.3" - checksum: 10c0/9e940e79a385c3f4671754938704c7569757a2a34b15a8e9caf8fe8857746c8a145445d0de8bd7d671466001b54409ed58ff38f17a153f700ddb184acd71df06 - languageName: node - linkType: hard - -"interpret@npm:^3.1.1": - version: 3.1.1 - resolution: "interpret@npm:3.1.1" - checksum: 10c0/6f3c4d0aa6ec1b43a8862375588a249e3c917739895cbe67fe12f0a76260ea632af51e8e2431b50fbcd0145356dc28ca147be08dbe6a523739fd55c0f91dc2a5 - languageName: node - linkType: hard - -"ip-address@npm:^9.0.5": - version: 9.0.5 - resolution: "ip-address@npm:9.0.5" - dependencies: - jsbn: "npm:1.1.0" - sprintf-js: "npm:^1.1.3" - checksum: 10c0/331cd07fafcb3b24100613e4b53e1a2b4feab11e671e655d46dc09ee233da5011284d09ca40c4ecbdfe1d0004f462958675c224a804259f2f78d2465a87824bc - languageName: node - linkType: hard - -"ipaddr.js@npm:1.9.1": - version: 1.9.1 - resolution: "ipaddr.js@npm:1.9.1" - checksum: 10c0/0486e775047971d3fdb5fb4f063829bac45af299ae0b82dcf3afa2145338e08290563a2a70f34b732d795ecc8311902e541a8530eeb30d75860a78ff4e94ce2a - languageName: node - linkType: hard - -"ipaddr.js@npm:^2.1.0": - version: 2.2.0 - resolution: "ipaddr.js@npm:2.2.0" - checksum: 10c0/e4ee875dc1bd92ac9d27e06cfd87cdb63ca786ff9fd7718f1d4f7a8ef27db6e5d516128f52d2c560408cbb75796ac2f83ead669e73507c86282d45f84c5abbb6 - languageName: node - linkType: hard - -"is-arguments@npm:^1.0.4": - version: 1.2.0 - resolution: "is-arguments@npm:1.2.0" - dependencies: - call-bound: "npm:^1.0.2" - has-tostringtag: "npm:^1.0.2" - checksum: 10c0/6377344b31e9fcb707c6751ee89b11f132f32338e6a782ec2eac9393b0cbd32235dad93052998cda778ee058754860738341d8114910d50ada5615912bb929fc - languageName: node - linkType: hard - -"is-binary-path@npm:~2.1.0": - version: 2.1.0 - resolution: "is-binary-path@npm:2.1.0" - dependencies: - binary-extensions: "npm:^2.0.0" - checksum: 10c0/a16eaee59ae2b315ba36fad5c5dcaf8e49c3e27318f8ab8fa3cdb8772bf559c8d1ba750a589c2ccb096113bb64497084361a25960899cb6172a6925ab6123d38 - languageName: node - linkType: hard - -"is-callable@npm:^1.1.3": - version: 1.2.7 - resolution: "is-callable@npm:1.2.7" - checksum: 10c0/ceebaeb9d92e8adee604076971dd6000d38d6afc40bb843ea8e45c5579b57671c3f3b50d7f04869618242c6cee08d1b67806a8cb8edaaaf7c0748b3720d6066f - languageName: node - linkType: hard - -"is-core-module@npm:^2.16.0": - version: 2.16.1 - resolution: "is-core-module@npm:2.16.1" - dependencies: - hasown: "npm:^2.0.2" - checksum: 10c0/898443c14780a577e807618aaae2b6f745c8538eca5c7bc11388a3f2dc6de82b9902bcc7eb74f07be672b11bbe82dd6a6edded44a00cb3d8f933d0459905eedd - languageName: node - linkType: hard - -"is-docker@npm:^3.0.0": - version: 3.0.0 - resolution: "is-docker@npm:3.0.0" - bin: - is-docker: cli.js - checksum: 10c0/d2c4f8e6d3e34df75a5defd44991b6068afad4835bb783b902fa12d13ebdb8f41b2a199dcb0b5ed2cb78bfee9e4c0bbdb69c2d9646f4106464674d3e697a5856 - languageName: node - linkType: hard - -"is-extglob@npm:^2.1.1": - version: 2.1.1 - resolution: "is-extglob@npm:2.1.1" - checksum: 10c0/5487da35691fbc339700bbb2730430b07777a3c21b9ebaecb3072512dfd7b4ba78ac2381a87e8d78d20ea08affb3f1971b4af629173a6bf435ff8a4c47747912 - languageName: node - linkType: hard - -"is-fullwidth-code-point@npm:^3.0.0": - version: 3.0.0 - resolution: "is-fullwidth-code-point@npm:3.0.0" - checksum: 10c0/bb11d825e049f38e04c06373a8d72782eee0205bda9d908cc550ccb3c59b99d750ff9537982e01733c1c94a58e35400661f57042158ff5e8f3e90cf936daf0fc - languageName: node - linkType: hard - -"is-generator-function@npm:^1.0.7": - version: 1.1.0 - resolution: "is-generator-function@npm:1.1.0" - dependencies: - call-bound: "npm:^1.0.3" - get-proto: "npm:^1.0.0" - has-tostringtag: "npm:^1.0.2" - safe-regex-test: "npm:^1.1.0" - checksum: 10c0/fdfa96c8087bf36fc4cd514b474ba2ff404219a4dd4cfa6cf5426404a1eed259bdcdb98f082a71029a48d01f27733e3436ecc6690129a7ec09cb0434bee03a2a - languageName: node - linkType: hard - -"is-glob@npm:^4.0.1, is-glob@npm:~4.0.1": - version: 4.0.3 - resolution: "is-glob@npm:4.0.3" - dependencies: - is-extglob: "npm:^2.1.1" - checksum: 10c0/17fb4014e22be3bbecea9b2e3a76e9e34ff645466be702f1693e8f1ee1adac84710d0be0bd9f967d6354036fd51ab7c2741d954d6e91dae6bb69714de92c197a - languageName: node - linkType: hard - -"is-inside-container@npm:^1.0.0": - version: 1.0.0 - resolution: "is-inside-container@npm:1.0.0" - dependencies: - is-docker: "npm:^3.0.0" - bin: - is-inside-container: cli.js - checksum: 10c0/a8efb0e84f6197e6ff5c64c52890fa9acb49b7b74fed4da7c95383965da6f0fa592b4dbd5e38a79f87fc108196937acdbcd758fcefc9b140e479b39ce1fcd1cd - languageName: node - linkType: hard - -"is-nan@npm:^1.3.2": - version: 1.3.2 - resolution: "is-nan@npm:1.3.2" - dependencies: - call-bind: "npm:^1.0.0" - define-properties: "npm:^1.1.3" - checksum: 10c0/8bfb286f85763f9c2e28ea32e9127702fe980ffd15fa5d63ade3be7786559e6e21355d3625dd364c769c033c5aedf0a2ed3d4025d336abf1b9241e3d9eddc5b0 - languageName: node - linkType: hard - -"is-network-error@npm:^1.0.0": - version: 1.1.0 - resolution: "is-network-error@npm:1.1.0" - checksum: 10c0/89eef83c2a4cf43d853145ce175d1cf43183b7a58d48c7a03e7eed4eb395d0934c1f6d101255cdd8c8c2980ab529bfbe5dd9edb24e1c3c28d2b3c814469b5b7d - languageName: node - linkType: hard - -"is-number@npm:^7.0.0": - version: 7.0.0 - resolution: "is-number@npm:7.0.0" - checksum: 10c0/b4686d0d3053146095ccd45346461bc8e53b80aeb7671cc52a4de02dbbf7dc0d1d2a986e2fe4ae206984b4d34ef37e8b795ebc4f4295c978373e6575e295d811 - languageName: node - linkType: hard - -"is-plain-obj@npm:^3.0.0": - version: 3.0.0 - resolution: "is-plain-obj@npm:3.0.0" - checksum: 10c0/8e6483bfb051d42ec9c704c0ede051a821c6b6f9a6c7a3e3b55aa855e00981b0580c8f3b1f5e2e62649b39179b1abfee35d6f8086d999bfaa32c1908d29b07bc - languageName: node - linkType: hard - -"is-plain-object@npm:^2.0.4": - version: 2.0.4 - resolution: "is-plain-object@npm:2.0.4" - dependencies: - isobject: "npm:^3.0.1" - checksum: 10c0/f050fdd5203d9c81e8c4df1b3ff461c4bc64e8b5ca383bcdde46131361d0a678e80bcf00b5257646f6c636197629644d53bd8e2375aea633de09a82d57e942f4 - languageName: node - linkType: hard - -"is-regex@npm:^1.2.1": - version: 1.2.1 - resolution: "is-regex@npm:1.2.1" - dependencies: - call-bound: "npm:^1.0.2" - gopd: "npm:^1.2.0" - has-tostringtag: "npm:^1.0.2" - hasown: "npm:^2.0.2" - checksum: 10c0/1d3715d2b7889932349241680032e85d0b492cfcb045acb75ffc2c3085e8d561184f1f7e84b6f8321935b4aea39bc9c6ba74ed595b57ce4881a51dfdbc214e04 - languageName: node - linkType: hard - -"is-typed-array@npm:^1.1.3": - version: 1.1.15 - resolution: "is-typed-array@npm:1.1.15" - dependencies: - which-typed-array: "npm:^1.1.16" - checksum: 10c0/415511da3669e36e002820584e264997ffe277ff136643a3126cc949197e6ca3334d0f12d084e83b1994af2e9c8141275c741cf2b7da5a2ff62dd0cac26f76c4 - languageName: node - linkType: hard - -"is-wsl@npm:^3.1.0": - version: 3.1.0 - resolution: "is-wsl@npm:3.1.0" - dependencies: - is-inside-container: "npm:^1.0.0" - checksum: 10c0/d3317c11995690a32c362100225e22ba793678fe8732660c6de511ae71a0ff05b06980cf21f98a6bf40d7be0e9e9506f859abe00a1118287d63e53d0a3d06947 - languageName: node - linkType: hard - -"isarray@npm:~1.0.0": - version: 1.0.0 - resolution: "isarray@npm:1.0.0" - checksum: 10c0/18b5be6669be53425f0b84098732670ed4e727e3af33bc7f948aac01782110eb9a18b3b329c5323bcdd3acdaae547ee077d3951317e7f133bff7105264b3003d - languageName: node - linkType: hard - -"isbinaryfile@npm:^4.0.8": - version: 4.0.10 - resolution: "isbinaryfile@npm:4.0.10" - checksum: 10c0/0703d8cfeb69ed79e6d173120f327450011a066755150a6bbf97ffecec1069a5f2092777868315b21359098c84b54984871cad1abce877ad9141fb2caf3dcabf - languageName: node - linkType: hard - -"isexe@npm:^2.0.0": - version: 2.0.0 - resolution: "isexe@npm:2.0.0" - checksum: 10c0/228cfa503fadc2c31596ab06ed6aa82c9976eec2bfd83397e7eaf06d0ccf42cd1dfd6743bf9aeb01aebd4156d009994c5f76ea898d2832c1fe342da923ca457d - languageName: node - linkType: hard - -"isexe@npm:^3.1.1": - version: 3.1.1 - resolution: "isexe@npm:3.1.1" - checksum: 10c0/9ec257654093443eb0a528a9c8cbba9c0ca7616ccb40abd6dde7202734d96bb86e4ac0d764f0f8cd965856aacbff2f4ce23e730dc19dfb41e3b0d865ca6fdcc7 - languageName: node - linkType: hard - -"isobject@npm:^3.0.1": - version: 3.0.1 - resolution: "isobject@npm:3.0.1" - checksum: 10c0/03344f5064a82f099a0cd1a8a407f4c0d20b7b8485e8e816c39f249e9416b06c322e8dec5b842b6bb8a06de0af9cb48e7bc1b5352f0fadc2f0abac033db3d4db - languageName: node - linkType: hard - -"istanbul-lib-coverage@npm:^3.0.0": - version: 3.2.2 - resolution: "istanbul-lib-coverage@npm:3.2.2" - checksum: 10c0/6c7ff2106769e5f592ded1fb418f9f73b4411fd5a084387a5410538332b6567cd1763ff6b6cadca9b9eb2c443cce2f7ea7d7f1b8d315f9ce58539793b1e0922b - languageName: node - linkType: hard - -"istanbul-lib-instrument@npm:^4.0.0": - version: 4.0.3 - resolution: "istanbul-lib-instrument@npm:4.0.3" - dependencies: - "@babel/core": "npm:^7.7.5" - "@istanbuljs/schema": "npm:^0.1.2" - istanbul-lib-coverage: "npm:^3.0.0" - semver: "npm:^6.3.0" - checksum: 10c0/7f1005566a912e33e847576b2c1072d48a7c556810a54d912f3e2f0bd966171e68b30c40b0c1ce6ee9b8864de422d0c10e2d0dfd2d25b48723950cc78cd437c2 - languageName: node - linkType: hard - -"istanbul-lib-report@npm:^3.0.0": - version: 3.0.1 - resolution: "istanbul-lib-report@npm:3.0.1" - dependencies: - istanbul-lib-coverage: "npm:^3.0.0" - make-dir: "npm:^4.0.0" - supports-color: "npm:^7.1.0" - checksum: 10c0/84323afb14392de8b6a5714bd7e9af845cfbd56cfe71ed276cda2f5f1201aea673c7111901227ee33e68e4364e288d73861eb2ed48f6679d1e69a43b6d9b3ba7 - languageName: node - linkType: hard - -"istanbul-lib-source-maps@npm:^4.0.0": - version: 4.0.1 - resolution: "istanbul-lib-source-maps@npm:4.0.1" - dependencies: - debug: "npm:^4.1.1" - istanbul-lib-coverage: "npm:^3.0.0" - source-map: "npm:^0.6.1" - checksum: 10c0/19e4cc405016f2c906dff271a76715b3e881fa9faeb3f09a86cb99b8512b3a5ed19cadfe0b54c17ca0e54c1142c9c6de9330d65506e35873994e06634eebeb66 - languageName: node - linkType: hard - -"istanbul-reports@npm:^3.0.0": - version: 3.1.7 - resolution: "istanbul-reports@npm:3.1.7" - dependencies: - html-escaper: "npm:^2.0.0" - istanbul-lib-report: "npm:^3.0.0" - checksum: 10c0/a379fadf9cf8dc5dfe25568115721d4a7eb82fbd50b005a6672aff9c6989b20cc9312d7865814e0859cd8df58cbf664482e1d3604be0afde1f7fc3ccc1394a51 - languageName: node - linkType: hard - -"jackspeak@npm:^3.1.2": - version: 3.4.3 - resolution: "jackspeak@npm:3.4.3" - dependencies: - "@isaacs/cliui": "npm:^8.0.2" - "@pkgjs/parseargs": "npm:^0.11.0" - dependenciesMeta: - "@pkgjs/parseargs": - optional: true - checksum: 10c0/6acc10d139eaefdbe04d2f679e6191b3abf073f111edf10b1de5302c97ec93fffeb2fdd8681ed17f16268aa9dd4f8c588ed9d1d3bffbbfa6e8bf897cbb3149b9 - languageName: node - linkType: hard - -"jasmine-core@npm:^4.1.0": - version: 4.6.1 - resolution: "jasmine-core@npm:4.6.1" - checksum: 10c0/3d038b7f6f6f0d3cb56cdb4d2f0323a9d84f3a64a03746f9329a2d5a5166ec5e0ad3232d72ceb4f357cf2f120fdb86310715eaeb174f325833515fd0792a6860 - languageName: node - linkType: hard - -"jest-worker@npm:^27.4.5": - version: 27.5.1 - resolution: "jest-worker@npm:27.5.1" - dependencies: - "@types/node": "npm:*" - merge-stream: "npm:^2.0.0" - supports-color: "npm:^8.0.0" - checksum: 10c0/8c4737ffd03887b3c6768e4cc3ca0269c0336c1e4b1b120943958ddb035ed2a0fc6acab6dc99631720a3720af4e708ff84fb45382ad1e83c27946adf3623969b - languageName: node - linkType: hard - -"js-tokens@npm:^4.0.0": - version: 4.0.0 - resolution: "js-tokens@npm:4.0.0" - checksum: 10c0/e248708d377aa058eacf2037b07ded847790e6de892bbad3dac0abba2e759cb9f121b00099a65195616badcb6eca8d14d975cb3e89eb1cfda644756402c8aeed - languageName: node - linkType: hard - -"jsbn@npm:1.1.0": - version: 1.1.0 - resolution: "jsbn@npm:1.1.0" - checksum: 10c0/4f907fb78d7b712e11dea8c165fe0921f81a657d3443dde75359ed52eb2b5d33ce6773d97985a089f09a65edd80b11cb75c767b57ba47391fee4c969f7215c96 - languageName: node - linkType: hard - -"jsesc@npm:^3.0.2": - version: 3.1.0 - resolution: "jsesc@npm:3.1.0" - bin: - jsesc: bin/jsesc - checksum: 10c0/531779df5ec94f47e462da26b4cbf05eb88a83d9f08aac2ba04206508fc598527a153d08bd462bae82fc78b3eaa1a908e1a4a79f886e9238641c4cdefaf118b1 - languageName: node - linkType: hard - -"json-parse-even-better-errors@npm:^2.3.1": - version: 2.3.1 - resolution: "json-parse-even-better-errors@npm:2.3.1" - checksum: 10c0/140932564c8f0b88455432e0f33c4cb4086b8868e37524e07e723f4eaedb9425bdc2bafd71bd1d9765bd15fd1e2d126972bc83990f55c467168c228c24d665f3 - languageName: node - linkType: hard - -"json-schema-traverse@npm:^0.4.1": - version: 0.4.1 - resolution: "json-schema-traverse@npm:0.4.1" - checksum: 10c0/108fa90d4cc6f08243aedc6da16c408daf81793bf903e9fd5ab21983cda433d5d2da49e40711da016289465ec2e62e0324dcdfbc06275a607fe3233fde4942ce - languageName: node - linkType: hard - -"json-schema-traverse@npm:^1.0.0": - version: 1.0.0 - resolution: "json-schema-traverse@npm:1.0.0" - checksum: 10c0/71e30015d7f3d6dc1c316d6298047c8ef98a06d31ad064919976583eb61e1018a60a0067338f0f79cabc00d84af3fcc489bd48ce8a46ea165d9541ba17fb30c6 - languageName: node - linkType: hard - -"json-stringify-safe@npm:^5.0.1": - version: 5.0.1 - resolution: "json-stringify-safe@npm:5.0.1" - checksum: 10c0/7dbf35cd0411d1d648dceb6d59ce5857ec939e52e4afc37601aa3da611f0987d5cee5b38d58329ceddf3ed48bd7215229c8d52059ab01f2444a338bf24ed0f37 - languageName: node - linkType: hard - -"json5@npm:^2.2.3": - version: 2.2.3 - resolution: "json5@npm:2.2.3" - bin: - json5: lib/cli.js - checksum: 10c0/5a04eed94810fa55c5ea138b2f7a5c12b97c3750bc63d11e511dcecbfef758003861522a070c2272764ee0f4e3e323862f386945aeb5b85b87ee43f084ba586c - languageName: node - linkType: hard - -"jsonfile@npm:^4.0.0": - version: 4.0.0 - resolution: "jsonfile@npm:4.0.0" - dependencies: - graceful-fs: "npm:^4.1.6" - dependenciesMeta: - graceful-fs: - optional: true - checksum: 10c0/7dc94b628d57a66b71fb1b79510d460d662eb975b5f876d723f81549c2e9cd316d58a2ddf742b2b93a4fa6b17b2accaf1a738a0e2ea114bdfb13a32e5377e480 - languageName: node - linkType: hard - -"karma-chrome-launcher@npm:^3.1.1": - version: 3.2.0 - resolution: "karma-chrome-launcher@npm:3.2.0" - dependencies: - which: "npm:^1.2.1" - checksum: 10c0/0cec1ae7d922110dc29cee36389d597157c82f019c8917259f9fa93d1f5ee8e19141c2eb74bfe30797cdb3adbc51a6b65fd18a9ebc1527c725c4acf62cd46d04 - languageName: node - linkType: hard - -"karma-jasmine@npm:^5.1.0": - version: 5.1.0 - resolution: "karma-jasmine@npm:5.1.0" - dependencies: - jasmine-core: "npm:^4.1.0" - peerDependencies: - karma: ^6.0.0 - checksum: 10c0/827843d2b4af5396c35de6911d15304955bd7376f96527f46285beb0178510aa401ff123a010a9ee3f13aeeeb56f64a9a3e22d7d61fb58ee76a2845b153a9d20 - languageName: node - linkType: hard - -"karma-spec-reporter@npm:^0.0.36": - version: 0.0.36 - resolution: "karma-spec-reporter@npm:0.0.36" - dependencies: - colors: "npm:1.4.0" - peerDependencies: - karma: ">=0.9" - checksum: 10c0/ae2e9cb5e2af74f0d4d8faa752c7c7204c296566906ea0d1a0eb98e76a02224b3aa60fe58c2b7cb40df4161ecd8a89feb0bd3ced5fffcae4fd5a40b72d48db9d - languageName: node - linkType: hard - -"karma-typescript@npm:^5.5.3": - version: 5.5.4 - resolution: "karma-typescript@npm:5.5.4" - dependencies: - acorn: "npm:^8.1.0" - acorn-walk: "npm:^8.0.2" - assert: "npm:^2.0.0" - async: "npm:^3.0.1" - browser-resolve: "npm:^2.0.0" - browserify-zlib: "npm:^0.2.0" - buffer: "npm:^5.4.3" - combine-source-map: "npm:^0.8.0" - console-browserify: "npm:^1.2.0" - constants-browserify: "npm:^1.0.0" - convert-source-map: "npm:^1.7.0" - crypto-browserify: "npm:^3.12.0" - diff: "npm:^4.0.1" - domain-browser: "npm:^4.16.0" - events: "npm:^3.2.0" - glob: "npm:^7.1.6" - https-browserify: "npm:^1.0.0" - istanbul-lib-coverage: "npm:^3.0.0" - istanbul-lib-instrument: "npm:^4.0.0" - istanbul-lib-report: "npm:^3.0.0" - istanbul-lib-source-maps: "npm:^4.0.0" - istanbul-reports: "npm:^3.0.0" - json-stringify-safe: "npm:^5.0.1" - lodash: "npm:^4.17.19" - log4js: "npm:^6.3.0" - minimatch: "npm:^3.0.4" - os-browserify: "npm:^0.3.0" - pad: "npm:^3.2.0" - path-browserify: "npm:^1.0.0" - process: "npm:^0.11.10" - punycode: "npm:^2.1.1" - querystring-es3: "npm:^0.2.1" - readable-stream: "npm:^3.1.1" - source-map: "npm:^0.7.3" - stream-browserify: "npm:^3.0.0" - stream-http: "npm:^3.1.0" - string_decoder: "npm:^1.3.0" - timers-browserify: "npm:^2.0.11" - tmp: "npm:^0.2.1" - tty-browserify: "npm:^0.0.1" - url: "npm:^0.11.0" - util: "npm:^0.12.1" - vm-browserify: "npm:^1.1.2" - peerDependencies: - karma: 1 || 2 || 3 || 4 || 5 || 6 - typescript: 1 || 2 || 3 || 4 || 5 - checksum: 10c0/18b3a4dc19e505e92dfc04bc82b0a608cf743b8cee2f14d1b9b1289116a1cf3eeadc876f1a0358b258ff9a9d8f516a72ca191eb83a84a647b374505c2b40040e - languageName: node - linkType: hard - -"karma-webpack@npm:^5.0.0": - version: 5.0.1 - resolution: "karma-webpack@npm:5.0.1" - dependencies: - glob: "npm:^7.1.3" - minimatch: "npm:^9.0.3" - webpack-merge: "npm:^4.1.5" - peerDependencies: - webpack: ^5.0.0 - checksum: 10c0/ef7208a6b2746819693c654d6da4a1c7794edb72690006181e1c2897ff8415644e6745ca46bdf170e30c2b82d4b9f16284af5e71fcae026b32de0a08adb14c7d - languageName: node - linkType: hard - -"karma@npm:^6.4.0": - version: 6.4.4 - resolution: "karma@npm:6.4.4" - dependencies: - "@colors/colors": "npm:1.5.0" - body-parser: "npm:^1.19.0" - braces: "npm:^3.0.2" - chokidar: "npm:^3.5.1" - connect: "npm:^3.7.0" - di: "npm:^0.0.1" - dom-serialize: "npm:^2.2.1" - glob: "npm:^7.1.7" - graceful-fs: "npm:^4.2.6" - http-proxy: "npm:^1.18.1" - isbinaryfile: "npm:^4.0.8" - lodash: "npm:^4.17.21" - log4js: "npm:^6.4.1" - mime: "npm:^2.5.2" - minimatch: "npm:^3.0.4" - mkdirp: "npm:^0.5.5" - qjobs: "npm:^1.2.0" - range-parser: "npm:^1.2.1" - rimraf: "npm:^3.0.2" - socket.io: "npm:^4.7.2" - source-map: "npm:^0.6.1" - tmp: "npm:^0.2.1" - ua-parser-js: "npm:^0.7.30" - yargs: "npm:^16.1.1" - bin: - karma: bin/karma - checksum: 10c0/1658c4b7396c0edf6f048289182e075b561902e02992e1a3eb72f56f67090ff0c7ad7c91ab099e88a790c60f9500c5a6f974d75f1769e3ea2dfccda52876ec0b - languageName: node - linkType: hard - -"kind-of@npm:^6.0.2": - version: 6.0.3 - resolution: "kind-of@npm:6.0.3" - checksum: 10c0/61cdff9623dabf3568b6445e93e31376bee1cdb93f8ba7033d86022c2a9b1791a1d9510e026e6465ebd701a6dd2f7b0808483ad8838341ac52f003f512e0b4c4 - languageName: node - linkType: hard - -"launch-editor@npm:^2.6.1": - version: 2.9.1 - resolution: "launch-editor@npm:2.9.1" - dependencies: - picocolors: "npm:^1.0.0" - shell-quote: "npm:^1.8.1" - checksum: 10c0/891f1d136ed8e4ea12e16c196a0d2e07f23c7b983e3ab532b2be1775fb244909581507cce97c50f9d5ca92680b53e4a75c72ddcf20184aa6c4da6ebbe87703f5 - languageName: node - linkType: hard - -"loader-runner@npm:^4.2.0": - version: 4.3.0 - resolution: "loader-runner@npm:4.3.0" - checksum: 10c0/a44d78aae0907a72f73966fe8b82d1439c8c485238bd5a864b1b9a2a3257832effa858790241e6b37876b5446a78889adf2fcc8dd897ce54c089ecc0a0ce0bf0 - languageName: node - linkType: hard - -"locate-path@npm:^5.0.0": - version: 5.0.0 - resolution: "locate-path@npm:5.0.0" - dependencies: - p-locate: "npm:^4.1.0" - checksum: 10c0/33a1c5247e87e022f9713e6213a744557a3e9ec32c5d0b5efb10aa3a38177615bf90221a5592674857039c1a0fd2063b82f285702d37b792d973e9e72ace6c59 - languageName: node - linkType: hard - -"lodash.memoize@npm:~3.0.3": - version: 3.0.4 - resolution: "lodash.memoize@npm:3.0.4" - checksum: 10c0/7d3875ed3f0ea2fb5abd1d0f55362ac141f4e173917acc3797f38e67686b5567a7609b3d460db2d0bb2196620a9245b45ecd1b50f51aa77ad486342fbe2e7d76 - languageName: node - linkType: hard - -"lodash@npm:^4.17.15, lodash@npm:^4.17.19, lodash@npm:^4.17.21": - version: 4.17.21 - resolution: "lodash@npm:4.17.21" - checksum: 10c0/d8cbea072bb08655bb4c989da418994b073a608dffa608b09ac04b43a791b12aeae7cd7ad919aa4c925f33b48490b5cfe6c1f71d827956071dae2e7bb3a6b74c - languageName: node - linkType: hard - -"log4js@npm:^6.3.0, log4js@npm:^6.4.1": - version: 6.9.1 - resolution: "log4js@npm:6.9.1" - dependencies: - date-format: "npm:^4.0.14" - debug: "npm:^4.3.4" - flatted: "npm:^3.2.7" - rfdc: "npm:^1.3.0" - streamroller: "npm:^3.1.5" - checksum: 10c0/05846e48f72d662800c8189bd178c42b4aa2f0c574cfc90a1942cf90b76f621c44019e26796c8fd88da1b6f0fe8272cba607cbaad6ae6ede50a7a096b58197ea - languageName: node - linkType: hard - -"lru-cache@npm:^10.0.1, lru-cache@npm:^10.2.0": - version: 10.4.3 - resolution: "lru-cache@npm:10.4.3" - checksum: 10c0/ebd04fbca961e6c1d6c0af3799adcc966a1babe798f685bb84e6599266599cd95d94630b10262f5424539bc4640107e8a33aa28585374abf561d30d16f4b39fb - languageName: node - linkType: hard - -"lru-cache@npm:^5.1.1": - version: 5.1.1 - resolution: "lru-cache@npm:5.1.1" - dependencies: - yallist: "npm:^3.0.2" - checksum: 10c0/89b2ef2ef45f543011e38737b8a8622a2f8998cddf0e5437174ef8f1f70a8b9d14a918ab3e232cb3ba343b7abddffa667f0b59075b2b80e6b4d63c3de6127482 - languageName: node - linkType: hard - -"make-dir@npm:^4.0.0": - version: 4.0.0 - resolution: "make-dir@npm:4.0.0" - dependencies: - semver: "npm:^7.5.3" - checksum: 10c0/69b98a6c0b8e5c4fe9acb61608a9fbcfca1756d910f51e5dbe7a9e5cfb74fca9b8a0c8a0ffdf1294a740826c1ab4871d5bf3f62f72a3049e5eac6541ddffed68 - languageName: node - linkType: hard - -"make-error@npm:^1.1.1": - version: 1.3.6 - resolution: "make-error@npm:1.3.6" - checksum: 10c0/171e458d86854c6b3fc46610cfacf0b45149ba043782558c6875d9f42f222124384ad0b468c92e996d815a8a2003817a710c0a160e49c1c394626f76fa45396f - languageName: node - linkType: hard - -"make-fetch-happen@npm:^14.0.3": - version: 14.0.3 - resolution: "make-fetch-happen@npm:14.0.3" - dependencies: - "@npmcli/agent": "npm:^3.0.0" - cacache: "npm:^19.0.1" - http-cache-semantics: "npm:^4.1.1" - minipass: "npm:^7.0.2" - minipass-fetch: "npm:^4.0.0" - minipass-flush: "npm:^1.0.5" - minipass-pipeline: "npm:^1.2.4" - negotiator: "npm:^1.0.0" - proc-log: "npm:^5.0.0" - promise-retry: "npm:^2.0.1" - ssri: "npm:^12.0.0" - checksum: 10c0/c40efb5e5296e7feb8e37155bde8eb70bc57d731b1f7d90e35a092fde403d7697c56fb49334d92d330d6f1ca29a98142036d6480a12681133a0a1453164cb2f0 - languageName: node - linkType: hard - -"math-intrinsics@npm:^1.1.0": - version: 1.1.0 - resolution: "math-intrinsics@npm:1.1.0" - checksum: 10c0/7579ff94e899e2f76ab64491d76cf606274c874d8f2af4a442c016bd85688927fcfca157ba6bf74b08e9439dc010b248ce05b96cc7c126a354c3bae7fcb48b7f - languageName: node - linkType: hard - -"md5.js@npm:^1.3.4": - version: 1.3.5 - resolution: "md5.js@npm:1.3.5" - dependencies: - hash-base: "npm:^3.0.0" - inherits: "npm:^2.0.1" - safe-buffer: "npm:^5.1.2" - checksum: 10c0/b7bd75077f419c8e013fc4d4dada48be71882e37d69a44af65a2f2804b91e253441eb43a0614423a1c91bb830b8140b0dc906bc797245e2e275759584f4efcc5 - languageName: node - linkType: hard - -"media-typer@npm:0.3.0": - version: 0.3.0 - resolution: "media-typer@npm:0.3.0" - checksum: 10c0/d160f31246907e79fed398470285f21bafb45a62869dc469b1c8877f3f064f5eabc4bcc122f9479b8b605bc5c76187d7871cf84c4ee3ecd3e487da1993279928 - languageName: node - linkType: hard - -"memfs@npm:^4.6.0": - version: 4.17.0 - resolution: "memfs@npm:4.17.0" - dependencies: - "@jsonjoy.com/json-pack": "npm:^1.0.3" - "@jsonjoy.com/util": "npm:^1.3.0" - tree-dump: "npm:^1.0.1" - tslib: "npm:^2.0.0" - checksum: 10c0/2901f69e80e1fbefa8aafe994a253fff6f34eb176d8b80d57476311611e516a11ab4dd93f852c8739fe04f2b57d6a4ca7a1828fa0bd401ce631bcac214b3d58b - languageName: node - linkType: hard - -"merge-descriptors@npm:1.0.3": - version: 1.0.3 - resolution: "merge-descriptors@npm:1.0.3" - checksum: 10c0/866b7094afd9293b5ea5dcd82d71f80e51514bed33b4c4e9f516795dc366612a4cbb4dc94356e943a8a6914889a914530badff27f397191b9b75cda20b6bae93 - languageName: node - linkType: hard - -"merge-stream@npm:^2.0.0": - version: 2.0.0 - resolution: "merge-stream@npm:2.0.0" - checksum: 10c0/867fdbb30a6d58b011449b8885601ec1690c3e41c759ecd5a9d609094f7aed0096c37823ff4a7190ef0b8f22cc86beb7049196ff68c016e3b3c671d0dac91ce5 - languageName: node - linkType: hard - -"methods@npm:~1.1.2": - version: 1.1.2 - resolution: "methods@npm:1.1.2" - checksum: 10c0/bdf7cc72ff0a33e3eede03708c08983c4d7a173f91348b4b1e4f47d4cdbf734433ad971e7d1e8c77247d9e5cd8adb81ea4c67b0a2db526b758b2233d7814b8b2 - languageName: node - linkType: hard - -"micromatch@npm:^4.0.0, micromatch@npm:^4.0.2": - version: 4.0.8 - resolution: "micromatch@npm:4.0.8" - dependencies: - braces: "npm:^3.0.3" - picomatch: "npm:^2.3.1" - checksum: 10c0/166fa6eb926b9553f32ef81f5f531d27b4ce7da60e5baf8c021d043b27a388fb95e46a8038d5045877881e673f8134122b59624d5cecbd16eb50a42e7a6b5ca8 - languageName: node - linkType: hard - -"miller-rabin@npm:^4.0.0": - version: 4.0.1 - resolution: "miller-rabin@npm:4.0.1" - dependencies: - bn.js: "npm:^4.0.0" - brorand: "npm:^1.0.1" - bin: - miller-rabin: bin/miller-rabin - checksum: 10c0/26b2b96f6e49dbcff7faebb78708ed2f5f9ae27ac8cbbf1d7c08f83cf39bed3d418c0c11034dce997da70d135cc0ff6f3a4c15dc452f8e114c11986388a64346 - languageName: node - linkType: hard - -"mime-db@npm:1.52.0": - version: 1.52.0 - resolution: "mime-db@npm:1.52.0" - checksum: 10c0/0557a01deebf45ac5f5777fe7740b2a5c309c6d62d40ceab4e23da9f821899ce7a900b7ac8157d4548ddbb7beffe9abc621250e6d182b0397ec7f10c7b91a5aa - languageName: node - linkType: hard - -"mime-db@npm:>= 1.43.0 < 2": - version: 1.53.0 - resolution: "mime-db@npm:1.53.0" - checksum: 10c0/1dcc37ba8ed5d1c179f5c6f0837e8db19371d5f2ea3690c3c2f3fa8c3858f976851d3460b172b4dee78ebd606762cbb407aa398545fbacd539e519f858cd7bf4 - languageName: node - linkType: hard - -"mime-types@npm:^2.1.27, mime-types@npm:^2.1.31, mime-types@npm:~2.1.17, mime-types@npm:~2.1.24, mime-types@npm:~2.1.34": - version: 2.1.35 - resolution: "mime-types@npm:2.1.35" - dependencies: - mime-db: "npm:1.52.0" - checksum: 10c0/82fb07ec56d8ff1fc999a84f2f217aa46cb6ed1033fefaabd5785b9a974ed225c90dc72fff460259e66b95b73648596dbcc50d51ed69cdf464af2d237d3149b2 - languageName: node - linkType: hard - -"mime@npm:1.6.0": - version: 1.6.0 - resolution: "mime@npm:1.6.0" - bin: - mime: cli.js - checksum: 10c0/b92cd0adc44888c7135a185bfd0dddc42c32606401c72896a842ae15da71eb88858f17669af41e498b463cd7eb998f7b48939a25b08374c7924a9c8a6f8a81b0 - languageName: node - linkType: hard - -"mime@npm:^2.5.2": - version: 2.6.0 - resolution: "mime@npm:2.6.0" - bin: - mime: cli.js - checksum: 10c0/a7f2589900d9c16e3bdf7672d16a6274df903da958c1643c9c45771f0478f3846dcb1097f31eb9178452570271361e2149310931ec705c037210fc69639c8e6c - languageName: node - linkType: hard - -"minimalistic-assert@npm:^1.0.0, minimalistic-assert@npm:^1.0.1": - version: 1.0.1 - resolution: "minimalistic-assert@npm:1.0.1" - checksum: 10c0/96730e5601cd31457f81a296f521eb56036e6f69133c0b18c13fe941109d53ad23a4204d946a0d638d7f3099482a0cec8c9bb6d642604612ce43ee536be3dddd - languageName: node - linkType: hard - -"minimalistic-crypto-utils@npm:^1.0.1": - version: 1.0.1 - resolution: "minimalistic-crypto-utils@npm:1.0.1" - checksum: 10c0/790ecec8c5c73973a4fbf2c663d911033e8494d5fb0960a4500634766ab05d6107d20af896ca2132e7031741f19888154d44b2408ada0852446705441383e9f8 - languageName: node - linkType: hard - -"minimatch@npm:^3.0.4, minimatch@npm:^3.1.1": - version: 3.1.2 - resolution: "minimatch@npm:3.1.2" - dependencies: - brace-expansion: "npm:^1.1.7" - checksum: 10c0/0262810a8fc2e72cca45d6fd86bd349eee435eb95ac6aa45c9ea2180e7ee875ef44c32b55b5973ceabe95ea12682f6e3725cbb63d7a2d1da3ae1163c8b210311 - languageName: node - linkType: hard - -"minimatch@npm:^9.0.3, minimatch@npm:^9.0.4": - version: 9.0.5 - resolution: "minimatch@npm:9.0.5" - dependencies: - brace-expansion: "npm:^2.0.1" - checksum: 10c0/de96cf5e35bdf0eab3e2c853522f98ffbe9a36c37797778d2665231ec1f20a9447a7e567cb640901f89e4daaa95ae5d70c65a9e8aa2bb0019b6facbc3c0575ed - languageName: node - linkType: hard - -"minimist@npm:^1.2.6": - version: 1.2.8 - resolution: "minimist@npm:1.2.8" - checksum: 10c0/19d3fcdca050087b84c2029841a093691a91259a47def2f18222f41e7645a0b7c44ef4b40e88a1e58a40c84d2ef0ee6047c55594d298146d0eb3f6b737c20ce6 - languageName: node - linkType: hard - -"minipass-collect@npm:^2.0.1": - version: 2.0.1 - resolution: "minipass-collect@npm:2.0.1" - dependencies: - minipass: "npm:^7.0.3" - checksum: 10c0/5167e73f62bb74cc5019594709c77e6a742051a647fe9499abf03c71dca75515b7959d67a764bdc4f8b361cf897fbf25e2d9869ee039203ed45240f48b9aa06e - languageName: node - linkType: hard - -"minipass-fetch@npm:^4.0.0": - version: 4.0.0 - resolution: "minipass-fetch@npm:4.0.0" - dependencies: - encoding: "npm:^0.1.13" - minipass: "npm:^7.0.3" - minipass-sized: "npm:^1.0.3" - minizlib: "npm:^3.0.1" - dependenciesMeta: - encoding: - optional: true - checksum: 10c0/7fa30ce7c373fb6f94c086b374fff1589fd7e78451855d2d06c2e2d9df936d131e73e952163063016592ed3081444bd8d1ea608533313b0149156ce23311da4b - languageName: node - linkType: hard - -"minipass-flush@npm:^1.0.5": - version: 1.0.5 - resolution: "minipass-flush@npm:1.0.5" - dependencies: - minipass: "npm:^3.0.0" - checksum: 10c0/2a51b63feb799d2bb34669205eee7c0eaf9dce01883261a5b77410c9408aa447e478efd191b4de6fc1101e796ff5892f8443ef20d9544385819093dbb32d36bd - languageName: node - linkType: hard - -"minipass-pipeline@npm:^1.2.4": - version: 1.2.4 - resolution: "minipass-pipeline@npm:1.2.4" - dependencies: - minipass: "npm:^3.0.0" - checksum: 10c0/cbda57cea20b140b797505dc2cac71581a70b3247b84480c1fed5ca5ba46c25ecc25f68bfc9e6dcb1a6e9017dab5c7ada5eab73ad4f0a49d84e35093e0c643f2 - languageName: node - linkType: hard - -"minipass-sized@npm:^1.0.3": - version: 1.0.3 - resolution: "minipass-sized@npm:1.0.3" - dependencies: - minipass: "npm:^3.0.0" - checksum: 10c0/298f124753efdc745cfe0f2bdfdd81ba25b9f4e753ca4a2066eb17c821f25d48acea607dfc997633ee5bf7b6dfffb4eee4f2051eb168663f0b99fad2fa4829cb - languageName: node - linkType: hard - -"minipass@npm:^3.0.0": - version: 3.3.6 - resolution: "minipass@npm:3.3.6" - dependencies: - yallist: "npm:^4.0.0" - checksum: 10c0/a114746943afa1dbbca8249e706d1d38b85ed1298b530f5808ce51f8e9e941962e2a5ad2e00eae7dd21d8a4aae6586a66d4216d1a259385e9d0358f0c1eba16c - languageName: node - linkType: hard - -"minipass@npm:^5.0.0 || ^6.0.2 || ^7.0.0, minipass@npm:^7.0.2, minipass@npm:^7.0.3, minipass@npm:^7.0.4, minipass@npm:^7.1.2": - version: 7.1.2 - resolution: "minipass@npm:7.1.2" - checksum: 10c0/b0fd20bb9fb56e5fa9a8bfac539e8915ae07430a619e4b86ff71f5fc757ef3924b23b2c4230393af1eda647ed3d75739e4e0acb250a6b1eb277cf7f8fe449557 - languageName: node - linkType: hard - -"minizlib@npm:^3.0.1": - version: 3.0.1 - resolution: "minizlib@npm:3.0.1" - dependencies: - minipass: "npm:^7.0.4" - rimraf: "npm:^5.0.5" - checksum: 10c0/82f8bf70da8af656909a8ee299d7ed3b3372636749d29e105f97f20e88971be31f5ed7642f2e898f00283b68b701cc01307401cdc209b0efc5dd3818220e5093 - languageName: node - linkType: hard - -"mkdirp@npm:^0.5.5": - version: 0.5.6 - resolution: "mkdirp@npm:0.5.6" - dependencies: - minimist: "npm:^1.2.6" - bin: - mkdirp: bin/cmd.js - checksum: 10c0/e2e2be789218807b58abced04e7b49851d9e46e88a2f9539242cc8a92c9b5c3a0b9bab360bd3014e02a140fc4fbc58e31176c408b493f8a2a6f4986bd7527b01 - languageName: node - linkType: hard - -"mkdirp@npm:^3.0.1": - version: 3.0.1 - resolution: "mkdirp@npm:3.0.1" - bin: - mkdirp: dist/cjs/src/bin.js - checksum: 10c0/9f2b975e9246351f5e3a40dcfac99fcd0baa31fbfab615fe059fb11e51f10e4803c63de1f384c54d656e4db31d000e4767e9ef076a22e12a641357602e31d57d - languageName: node - linkType: hard - -"ms@npm:2.0.0": - version: 2.0.0 - resolution: "ms@npm:2.0.0" - checksum: 10c0/f8fda810b39fd7255bbdc451c46286e549794fcc700dc9cd1d25658bbc4dc2563a5de6fe7c60f798a16a60c6ceb53f033cb353f493f0cf63e5199b702943159d - languageName: node - linkType: hard - -"ms@npm:2.1.3, ms@npm:^2.1.3": - version: 2.1.3 - resolution: "ms@npm:2.1.3" - checksum: 10c0/d924b57e7312b3b63ad21fc5b3dc0af5e78d61a1fc7cfb5457edaf26326bf62be5307cc87ffb6862ef1c2b33b0233cdb5d4f01c4c958cc0d660948b65a287a48 - languageName: node - linkType: hard - -"multicast-dns@npm:^7.2.5": - version: 7.2.5 - resolution: "multicast-dns@npm:7.2.5" - dependencies: - dns-packet: "npm:^5.2.2" - thunky: "npm:^1.0.2" - bin: - multicast-dns: cli.js - checksum: 10c0/5120171d4bdb1577764c5afa96e413353bff530d1b37081cb29cccc747f989eb1baf40574fe8e27060fc1aef72b59c042f72b9b208413de33bcf411343c69057 - languageName: node - linkType: hard - -"negotiator@npm:0.6.3": - version: 0.6.3 - resolution: "negotiator@npm:0.6.3" - checksum: 10c0/3ec9fd413e7bf071c937ae60d572bc67155262068ed522cf4b3be5edbe6ddf67d095ec03a3a14ebf8fc8e95f8e1d61be4869db0dbb0de696f6b837358bd43fc2 - languageName: node - linkType: hard - -"negotiator@npm:^1.0.0": - version: 1.0.0 - resolution: "negotiator@npm:1.0.0" - checksum: 10c0/4c559dd52669ea48e1914f9d634227c561221dd54734070791f999c52ed0ff36e437b2e07d5c1f6e32909fc625fe46491c16e4a8f0572567d4dd15c3a4fda04b - languageName: node - linkType: hard - -"negotiator@npm:~0.6.4": - version: 0.6.4 - resolution: "negotiator@npm:0.6.4" - checksum: 10c0/3e677139c7fb7628a6f36335bf11a885a62c21d5390204590a1a214a5631fcbe5ea74ef6a610b60afe84b4d975cbe0566a23f20ee17c77c73e74b80032108dea - languageName: node - linkType: hard - -"neo-async@npm:^2.6.2": - version: 2.6.2 - resolution: "neo-async@npm:2.6.2" - checksum: 10c0/c2f5a604a54a8ec5438a342e1f356dff4bc33ccccdb6dc668d94fe8e5eccfc9d2c2eea6064b0967a767ba63b33763f51ccf2cd2441b461a7322656c1f06b3f5d - languageName: node - linkType: hard - -"node-forge@npm:^1": - version: 1.3.1 - resolution: "node-forge@npm:1.3.1" - checksum: 10c0/e882819b251a4321f9fc1d67c85d1501d3004b4ee889af822fd07f64de3d1a8e272ff00b689570af0465d65d6bf5074df9c76e900e0aff23e60b847f2a46fbe8 - languageName: node - linkType: hard - -"node-gyp@npm:latest": - version: 11.0.0 - resolution: "node-gyp@npm:11.0.0" - dependencies: - env-paths: "npm:^2.2.0" - exponential-backoff: "npm:^3.1.1" - glob: "npm:^10.3.10" - graceful-fs: "npm:^4.2.6" - make-fetch-happen: "npm:^14.0.3" - nopt: "npm:^8.0.0" - proc-log: "npm:^5.0.0" - semver: "npm:^7.3.5" - tar: "npm:^7.4.3" - which: "npm:^5.0.0" - bin: - node-gyp: bin/node-gyp.js - checksum: 10c0/a3b885bbee2d271f1def32ba2e30ffcf4562a3db33af06b8b365e053153e2dd2051b9945783c3c8e852d26a0f20f65b251c7e83361623383a99635c0280ee573 - languageName: node - linkType: hard - -"node-releases@npm:^2.0.19": - version: 2.0.19 - resolution: "node-releases@npm:2.0.19" - checksum: 10c0/52a0dbd25ccf545892670d1551690fe0facb6a471e15f2cfa1b20142a5b255b3aa254af5f59d6ecb69c2bec7390bc643c43aa63b13bf5e64b6075952e716b1aa - languageName: node - linkType: hard - -"nopt@npm:^8.0.0": - version: 8.0.0 - resolution: "nopt@npm:8.0.0" - dependencies: - abbrev: "npm:^2.0.0" - bin: - nopt: bin/nopt.js - checksum: 10c0/19cb986f79abaca2d0f0b560021da7b32ee6fcc3de48f3eaeb0c324d36755c17754f886a754c091f01f740c17caf7d6aea8237b7fbaf39f476ae5e30a249f18f - languageName: node - linkType: hard - -"normalize-path@npm:^3.0.0, normalize-path@npm:~3.0.0": - version: 3.0.0 - resolution: "normalize-path@npm:3.0.0" - checksum: 10c0/e008c8142bcc335b5e38cf0d63cfd39d6cf2d97480af9abdbe9a439221fd4d749763bab492a8ee708ce7a194bb00c9da6d0a115018672310850489137b3da046 - languageName: node - linkType: hard - -"object-assign@npm:^4": - version: 4.1.1 - resolution: "object-assign@npm:4.1.1" - checksum: 10c0/1f4df9945120325d041ccf7b86f31e8bcc14e73d29171e37a7903050e96b81323784ec59f93f102ec635bcf6fa8034ba3ea0a8c7e69fa202b87ae3b6cec5a414 - languageName: node - linkType: hard - -"object-inspect@npm:^1.13.3": - version: 1.13.3 - resolution: "object-inspect@npm:1.13.3" - checksum: 10c0/cc3f15213406be89ffdc54b525e115156086796a515410a8d390215915db9f23c8eab485a06f1297402f440a33715fe8f71a528c1dcbad6e1a3bcaf5a46921d4 - languageName: node - linkType: hard - -"object-is@npm:^1.1.5": - version: 1.1.6 - resolution: "object-is@npm:1.1.6" - dependencies: - call-bind: "npm:^1.0.7" - define-properties: "npm:^1.2.1" - checksum: 10c0/506af444c4dce7f8e31f34fc549e2fb8152d6b9c4a30c6e62852badd7f520b579c679af433e7a072f9d78eb7808d230dc12e1cf58da9154dfbf8813099ea0fe0 - languageName: node - linkType: hard - -"object-keys@npm:^1.1.1": - version: 1.1.1 - resolution: "object-keys@npm:1.1.1" - checksum: 10c0/b11f7ccdbc6d406d1f186cdadb9d54738e347b2692a14439ca5ac70c225fa6db46db809711b78589866d47b25fc3e8dee0b4c722ac751e11180f9380e3d8601d - languageName: node - linkType: hard - -"object.assign@npm:^4.1.4": - version: 4.1.7 - resolution: "object.assign@npm:4.1.7" - dependencies: - call-bind: "npm:^1.0.8" - call-bound: "npm:^1.0.3" - define-properties: "npm:^1.2.1" - es-object-atoms: "npm:^1.0.0" - has-symbols: "npm:^1.1.0" - object-keys: "npm:^1.1.1" - checksum: 10c0/3b2732bd860567ea2579d1567525168de925a8d852638612846bd8082b3a1602b7b89b67b09913cbb5b9bd6e95923b2ae73580baa9d99cb4e990564e8cbf5ddc - languageName: node - linkType: hard - -"obuf@npm:^1.0.0, obuf@npm:^1.1.2": - version: 1.1.2 - resolution: "obuf@npm:1.1.2" - checksum: 10c0/520aaac7ea701618eacf000fc96ae458e20e13b0569845800fc582f81b386731ab22d55354b4915d58171db00e79cfcd09c1638c02f89577ef092b38c65b7d81 - languageName: node - linkType: hard - -"on-finished@npm:2.4.1, on-finished@npm:^2.4.1": - version: 2.4.1 - resolution: "on-finished@npm:2.4.1" - dependencies: - ee-first: "npm:1.1.1" - checksum: 10c0/46fb11b9063782f2d9968863d9cbba33d77aa13c17f895f56129c274318b86500b22af3a160fe9995aa41317efcd22941b6eba747f718ced08d9a73afdb087b4 - languageName: node - linkType: hard - -"on-finished@npm:~2.3.0": - version: 2.3.0 - resolution: "on-finished@npm:2.3.0" - dependencies: - ee-first: "npm:1.1.1" - checksum: 10c0/c904f9e518b11941eb60279a3cbfaf1289bd0001f600a950255b1dede9fe3df8cd74f38483550b3bb9485165166acb5db500c3b4c4337aec2815c88c96fcc2ea - languageName: node - linkType: hard - -"on-headers@npm:~1.0.2": - version: 1.0.2 - resolution: "on-headers@npm:1.0.2" - checksum: 10c0/f649e65c197bf31505a4c0444875db0258e198292f34b884d73c2f751e91792ef96bb5cf89aa0f4fecc2e4dc662461dda606b1274b0e564f539cae5d2f5fc32f - languageName: node - linkType: hard - -"once@npm:^1.3.0": - version: 1.4.0 - resolution: "once@npm:1.4.0" - dependencies: - wrappy: "npm:1" - checksum: 10c0/5d48aca287dfefabd756621c5dfce5c91a549a93e9fdb7b8246bc4c4790aa2ec17b34a260530474635147aeb631a2dcc8b32c613df0675f96041cbb8244517d0 - languageName: node - linkType: hard - -"open@npm:^10.0.3": - version: 10.1.0 - resolution: "open@npm:10.1.0" - dependencies: - default-browser: "npm:^5.2.1" - define-lazy-prop: "npm:^3.0.0" - is-inside-container: "npm:^1.0.0" - is-wsl: "npm:^3.1.0" - checksum: 10c0/c86d0b94503d5f735f674158d5c5d339c25ec2927562f00ee74590727292ed23e1b8d9336cb41ffa7e1fa4d3641d29b199b4ea37c78cb557d72b511743e90ebb - languageName: node - linkType: hard - -"os-browserify@npm:^0.3.0": - version: 0.3.0 - resolution: "os-browserify@npm:0.3.0" - checksum: 10c0/6ff32cb1efe2bc6930ad0fd4c50e30c38010aee909eba8d65be60af55efd6cbb48f0287e3649b4e3f3a63dce5a667b23c187c4293a75e557f0d5489d735bcf52 - languageName: node - linkType: hard - -"p-limit@npm:^2.2.0": - version: 2.3.0 - resolution: "p-limit@npm:2.3.0" - dependencies: - p-try: "npm:^2.0.0" - checksum: 10c0/8da01ac53efe6a627080fafc127c873da40c18d87b3f5d5492d465bb85ec7207e153948df6b9cbaeb130be70152f874229b8242ee2be84c0794082510af97f12 - languageName: node - linkType: hard - -"p-locate@npm:^4.1.0": - version: 4.1.0 - resolution: "p-locate@npm:4.1.0" - dependencies: - p-limit: "npm:^2.2.0" - checksum: 10c0/1b476ad69ad7f6059744f343b26d51ce091508935c1dbb80c4e0a2f397ffce0ca3a1f9f5cd3c7ce19d7929a09719d5c65fe70d8ee289c3f267cd36f2881813e9 - languageName: node - linkType: hard - -"p-map@npm:^7.0.2": - version: 7.0.3 - resolution: "p-map@npm:7.0.3" - checksum: 10c0/46091610da2b38ce47bcd1d8b4835a6fa4e832848a6682cf1652bc93915770f4617afc844c10a77d1b3e56d2472bb2d5622353fa3ead01a7f42b04fc8e744a5c - languageName: node - linkType: hard - -"p-retry@npm:^6.2.0": - version: 6.2.1 - resolution: "p-retry@npm:6.2.1" - dependencies: - "@types/retry": "npm:0.12.2" - is-network-error: "npm:^1.0.0" - retry: "npm:^0.13.1" - checksum: 10c0/10d014900107da2c7071ad60fffe4951675f09930b7a91681643ea224ae05649c05001d9e78436d902fe8b116d520dd1f60e72e091de097e2640979d56f3fb60 - languageName: node - linkType: hard - -"p-try@npm:^2.0.0": - version: 2.2.0 - resolution: "p-try@npm:2.2.0" - checksum: 10c0/c36c19907734c904b16994e6535b02c36c2224d433e01a2f1ab777237f4d86e6289fd5fd464850491e940379d4606ed850c03e0f9ab600b0ebddb511312e177f - languageName: node - linkType: hard - -"package-json-from-dist@npm:^1.0.0": - version: 1.0.1 - resolution: "package-json-from-dist@npm:1.0.1" - checksum: 10c0/62ba2785eb655fec084a257af34dbe24292ab74516d6aecef97ef72d4897310bc6898f6c85b5cd22770eaa1ce60d55a0230e150fb6a966e3ecd6c511e23d164b - languageName: node - linkType: hard - -"pad@npm:^3.2.0": - version: 3.3.0 - resolution: "pad@npm:3.3.0" - dependencies: - "@rollup/rollup-linux-x64-gnu": "npm:4.9.5" - wcwidth: "npm:^1.0.1" - dependenciesMeta: - "@rollup/rollup-linux-x64-gnu": - optional: true - checksum: 10c0/1972a9bee3e94fdd14f9b32c42aa56c025bcce59222823086536d5d9e03f33653d9dd8cb88d7535b903dad49bdfbb16b31f5e2809f5ac8287815306eb2a167de - languageName: node - linkType: hard - -"pako@npm:~1.0.5": - version: 1.0.11 - resolution: "pako@npm:1.0.11" - checksum: 10c0/86dd99d8b34c3930345b8bbeb5e1cd8a05f608eeb40967b293f72fe469d0e9c88b783a8777e4cc7dc7c91ce54c5e93d88ff4b4f060e6ff18408fd21030d9ffbe - languageName: node - linkType: hard - -"parse-asn1@npm:^5.0.0, parse-asn1@npm:^5.1.7": - version: 5.1.7 - resolution: "parse-asn1@npm:5.1.7" - dependencies: - asn1.js: "npm:^4.10.1" - browserify-aes: "npm:^1.2.0" - evp_bytestokey: "npm:^1.0.3" - hash-base: "npm:~3.0" - pbkdf2: "npm:^3.1.2" - safe-buffer: "npm:^5.2.1" - checksum: 10c0/05eb5937405c904eb5a7f3633bab1acc11f4ae3478a07ef5c6d81ce88c3c0e505ff51f9c7b935ebc1265c868343793698fc91025755a895d0276f620f95e8a82 - languageName: node - linkType: hard - -"parseurl@npm:~1.3.2, parseurl@npm:~1.3.3": - version: 1.3.3 - resolution: "parseurl@npm:1.3.3" - checksum: 10c0/90dd4760d6f6174adb9f20cf0965ae12e23879b5f5464f38e92fce8073354341e4b3b76fa3d878351efe7d01e617121955284cfd002ab087fba1a0726ec0b4f5 - languageName: node - linkType: hard - -"path-browserify@npm:^1.0.0": - version: 1.0.1 - resolution: "path-browserify@npm:1.0.1" - checksum: 10c0/8b8c3fd5c66bd340272180590ae4ff139769e9ab79522e2eb82e3d571a89b8117c04147f65ad066dccfb42fcad902e5b7d794b3d35e0fd840491a8ddbedf8c66 - languageName: node - linkType: hard - -"path-exists@npm:^4.0.0": - version: 4.0.0 - resolution: "path-exists@npm:4.0.0" - checksum: 10c0/8c0bd3f5238188197dc78dced15207a4716c51cc4e3624c44fc97acf69558f5ebb9a2afff486fe1b4ee148e0c133e96c5e11a9aa5c48a3006e3467da070e5e1b - languageName: node - linkType: hard - -"path-is-absolute@npm:^1.0.0": - version: 1.0.1 - resolution: "path-is-absolute@npm:1.0.1" - checksum: 10c0/127da03c82172a2a50099cddbf02510c1791fc2cc5f7713ddb613a56838db1e8168b121a920079d052e0936c23005562059756d653b7c544c53185efe53be078 - languageName: node - linkType: hard - -"path-key@npm:^3.1.0": - version: 3.1.1 - resolution: "path-key@npm:3.1.1" - checksum: 10c0/748c43efd5a569c039d7a00a03b58eecd1d75f3999f5a28303d75f521288df4823bc057d8784eb72358b2895a05f29a070bc9f1f17d28226cc4e62494cc58c4c - languageName: node - linkType: hard - -"path-parse@npm:^1.0.7": - version: 1.0.7 - resolution: "path-parse@npm:1.0.7" - checksum: 10c0/11ce261f9d294cc7a58d6a574b7f1b935842355ec66fba3c3fd79e0f036462eaf07d0aa95bb74ff432f9afef97ce1926c720988c6a7451d8a584930ae7de86e1 - languageName: node - linkType: hard - -"path-scurry@npm:^1.11.1": - version: 1.11.1 - resolution: "path-scurry@npm:1.11.1" - dependencies: - lru-cache: "npm:^10.2.0" - minipass: "npm:^5.0.0 || ^6.0.2 || ^7.0.0" - checksum: 10c0/32a13711a2a505616ae1cc1b5076801e453e7aae6ac40ab55b388bb91b9d0547a52f5aaceff710ea400205f18691120d4431e520afbe4266b836fadede15872d - languageName: node - linkType: hard - -"path-to-regexp@npm:0.1.12": - version: 0.1.12 - resolution: "path-to-regexp@npm:0.1.12" - checksum: 10c0/1c6ff10ca169b773f3bba943bbc6a07182e332464704572962d277b900aeee81ac6aa5d060ff9e01149636c30b1f63af6e69dd7786ba6e0ddb39d4dee1f0645b - languageName: node - linkType: hard - -"pbkdf2@npm:^3.1.2": - version: 3.1.2 - resolution: "pbkdf2@npm:3.1.2" - dependencies: - create-hash: "npm:^1.1.2" - create-hmac: "npm:^1.1.4" - ripemd160: "npm:^2.0.1" - safe-buffer: "npm:^5.0.1" - sha.js: "npm:^2.4.8" - checksum: 10c0/5a30374e87d33fa080a92734d778cf172542cc7e41b96198c4c88763997b62d7850de3fbda5c3111ddf79805ee7c1da7046881c90ac4920b5e324204518b05fd - languageName: node - linkType: hard - -"picocolors@npm:^1.0.0, picocolors@npm:^1.1.1": - version: 1.1.1 - resolution: "picocolors@npm:1.1.1" - checksum: 10c0/e2e3e8170ab9d7c7421969adaa7e1b31434f789afb9b3f115f6b96d91945041ac3ceb02e9ec6fe6510ff036bcc0bf91e69a1772edc0b707e12b19c0f2d6bcf58 - languageName: node - linkType: hard - -"picomatch@npm:^2.0.4, picomatch@npm:^2.2.1, picomatch@npm:^2.3.1": - version: 2.3.1 - resolution: "picomatch@npm:2.3.1" - checksum: 10c0/26c02b8d06f03206fc2ab8d16f19960f2ff9e81a658f831ecb656d8f17d9edc799e8364b1f4a7873e89d9702dff96204be0fa26fe4181f6843f040f819dac4be - languageName: node - linkType: hard - -"pkg-dir@npm:^4.2.0": - version: 4.2.0 - resolution: "pkg-dir@npm:4.2.0" - dependencies: - find-up: "npm:^4.0.0" - checksum: 10c0/c56bda7769e04907a88423feb320babaed0711af8c436ce3e56763ab1021ba107c7b0cafb11cde7529f669cfc22bffcaebffb573645cbd63842ea9fb17cd7728 - languageName: node - linkType: hard - -"possible-typed-array-names@npm:^1.0.0": - version: 1.0.0 - resolution: "possible-typed-array-names@npm:1.0.0" - checksum: 10c0/d9aa22d31f4f7680e20269db76791b41c3a32c01a373e25f8a4813b4d45f7456bfc2b6d68f752dc4aab0e0bb0721cb3d76fb678c9101cb7a16316664bc2c73fd - languageName: node - linkType: hard - -"proc-log@npm:^5.0.0": - version: 5.0.0 - resolution: "proc-log@npm:5.0.0" - checksum: 10c0/bbe5edb944b0ad63387a1d5b1911ae93e05ce8d0f60de1035b218cdcceedfe39dbd2c697853355b70f1a090f8f58fe90da487c85216bf9671f9499d1a897e9e3 - languageName: node - linkType: hard - -"process-nextick-args@npm:~2.0.0": - version: 2.0.1 - resolution: "process-nextick-args@npm:2.0.1" - checksum: 10c0/bec089239487833d46b59d80327a1605e1c5287eaad770a291add7f45fda1bb5e28b38e0e061add0a1d0ee0984788ce74fa394d345eed1c420cacf392c554367 - languageName: node - linkType: hard - -"process@npm:^0.11.10": - version: 0.11.10 - resolution: "process@npm:0.11.10" - checksum: 10c0/40c3ce4b7e6d4b8c3355479df77aeed46f81b279818ccdc500124e6a5ab882c0cc81ff7ea16384873a95a74c4570b01b120f287abbdd4c877931460eca6084b3 - languageName: node - linkType: hard - -"promise-retry@npm:^2.0.1": - version: 2.0.1 - resolution: "promise-retry@npm:2.0.1" - dependencies: - err-code: "npm:^2.0.2" - retry: "npm:^0.12.0" - checksum: 10c0/9c7045a1a2928094b5b9b15336dcd2a7b1c052f674550df63cc3f36cd44028e5080448175b6f6ca32b642de81150f5e7b1a98b728f15cb069f2dd60ac2616b96 - languageName: node - linkType: hard - -"proxy-addr@npm:~2.0.7": - version: 2.0.7 - resolution: "proxy-addr@npm:2.0.7" - dependencies: - forwarded: "npm:0.2.0" - ipaddr.js: "npm:1.9.1" - checksum: 10c0/c3eed999781a35f7fd935f398b6d8920b6fb00bbc14287bc6de78128ccc1a02c89b95b56742bf7cf0362cc333c61d138532049c7dedc7a328ef13343eff81210 - languageName: node - linkType: hard - -"public-encrypt@npm:^4.0.3": - version: 4.0.3 - resolution: "public-encrypt@npm:4.0.3" - dependencies: - bn.js: "npm:^4.1.0" - browserify-rsa: "npm:^4.0.0" - create-hash: "npm:^1.1.0" - parse-asn1: "npm:^5.0.0" - randombytes: "npm:^2.0.1" - safe-buffer: "npm:^5.1.2" - checksum: 10c0/6c2cc19fbb554449e47f2175065d6b32f828f9b3badbee4c76585ac28ae8641aafb9bb107afc430c33c5edd6b05dbe318df4f7d6d7712b1093407b11c4280700 - languageName: node - linkType: hard - -"punycode@npm:^1.4.1": - version: 1.4.1 - resolution: "punycode@npm:1.4.1" - checksum: 10c0/354b743320518aef36f77013be6e15da4db24c2b4f62c5f1eb0529a6ed02fbaf1cb52925785f6ab85a962f2b590d9cd5ad730b70da72b5f180e2556b8bd3ca08 - languageName: node - linkType: hard - -"punycode@npm:^2.1.0, punycode@npm:^2.1.1": - version: 2.3.1 - resolution: "punycode@npm:2.3.1" - checksum: 10c0/14f76a8206bc3464f794fb2e3d3cc665ae416c01893ad7a02b23766eb07159144ee612ad67af5e84fa4479ccfe67678c4feb126b0485651b302babf66f04f9e9 - languageName: node - linkType: hard - -"qjobs@npm:^1.2.0": - version: 1.2.0 - resolution: "qjobs@npm:1.2.0" - checksum: 10c0/772207772b856a3b1ec673b11a6cda074f1b82821644f2d042504b438ea3ea1fe918555547491e717e8694ec105379fe5139fc5ddd7937b21f7712bb648ed01d - languageName: node - linkType: hard - -"qs@npm:6.13.0": - version: 6.13.0 - resolution: "qs@npm:6.13.0" - dependencies: - side-channel: "npm:^1.0.6" - checksum: 10c0/62372cdeec24dc83a9fb240b7533c0fdcf0c5f7e0b83343edd7310f0ab4c8205a5e7c56406531f2e47e1b4878a3821d652be4192c841de5b032ca83619d8f860 - languageName: node - linkType: hard - -"qs@npm:^6.12.3": - version: 6.14.0 - resolution: "qs@npm:6.14.0" - dependencies: - side-channel: "npm:^1.1.0" - checksum: 10c0/8ea5d91bf34f440598ee389d4a7d95820e3b837d3fd9f433871f7924801becaa0cd3b3b4628d49a7784d06a8aea9bc4554d2b6d8d584e2d221dc06238a42909c - languageName: node - linkType: hard - -"querystring-es3@npm:^0.2.1": - version: 0.2.1 - resolution: "querystring-es3@npm:0.2.1" - checksum: 10c0/476938c1adb45c141f024fccd2ffd919a3746e79ed444d00e670aad68532977b793889648980e7ca7ff5ffc7bfece623118d0fbadcaf217495eeb7059ae51580 - languageName: node - linkType: hard - -"randombytes@npm:^2.0.0, randombytes@npm:^2.0.1, randombytes@npm:^2.0.5, randombytes@npm:^2.1.0": - version: 2.1.0 - resolution: "randombytes@npm:2.1.0" - dependencies: - safe-buffer: "npm:^5.1.0" - checksum: 10c0/50395efda7a8c94f5dffab564f9ff89736064d32addf0cc7e8bf5e4166f09f8ded7a0849ca6c2d2a59478f7d90f78f20d8048bca3cdf8be09d8e8a10790388f3 - languageName: node - linkType: hard - -"randomfill@npm:^1.0.4": - version: 1.0.4 - resolution: "randomfill@npm:1.0.4" - dependencies: - randombytes: "npm:^2.0.5" - safe-buffer: "npm:^5.1.0" - checksum: 10c0/11aeed35515872e8f8a2edec306734e6b74c39c46653607f03c68385ab8030e2adcc4215f76b5e4598e028c4750d820afd5c65202527d831d2a5f207fe2bc87c - languageName: node - linkType: hard - -"range-parser@npm:^1.2.1, range-parser@npm:~1.2.1": - version: 1.2.1 - resolution: "range-parser@npm:1.2.1" - checksum: 10c0/96c032ac2475c8027b7a4e9fe22dc0dfe0f6d90b85e496e0f016fbdb99d6d066de0112e680805075bd989905e2123b3b3d002765149294dce0c1f7f01fcc2ea0 - languageName: node - linkType: hard - -"raw-body@npm:2.5.2": - version: 2.5.2 - resolution: "raw-body@npm:2.5.2" - dependencies: - bytes: "npm:3.1.2" - http-errors: "npm:2.0.0" - iconv-lite: "npm:0.4.24" - unpipe: "npm:1.0.0" - checksum: 10c0/b201c4b66049369a60e766318caff5cb3cc5a900efd89bdac431463822d976ad0670912c931fdbdcf5543207daf6f6833bca57aa116e1661d2ea91e12ca692c4 - languageName: node - linkType: hard - -"readable-stream@npm:^2.0.1, readable-stream@npm:^2.3.8": - version: 2.3.8 - resolution: "readable-stream@npm:2.3.8" - dependencies: - core-util-is: "npm:~1.0.0" - inherits: "npm:~2.0.3" - isarray: "npm:~1.0.0" - process-nextick-args: "npm:~2.0.0" - safe-buffer: "npm:~5.1.1" - string_decoder: "npm:~1.1.1" - util-deprecate: "npm:~1.0.1" - checksum: 10c0/7efdb01f3853bc35ac62ea25493567bf588773213f5f4a79f9c365e1ad13bab845ac0dae7bc946270dc40c3929483228415e92a3fc600cc7e4548992f41ee3fa - languageName: node - linkType: hard - -"readable-stream@npm:^3.0.6, readable-stream@npm:^3.1.1, readable-stream@npm:^3.5.0, readable-stream@npm:^3.6.0": - version: 3.6.2 - resolution: "readable-stream@npm:3.6.2" - dependencies: - inherits: "npm:^2.0.3" - string_decoder: "npm:^1.1.1" - util-deprecate: "npm:^1.0.1" - checksum: 10c0/e37be5c79c376fdd088a45fa31ea2e423e5d48854be7a22a58869b4e84d25047b193f6acb54f1012331e1bcd667ffb569c01b99d36b0bd59658fb33f513511b7 - languageName: node - linkType: hard - -"readdirp@npm:~3.6.0": - version: 3.6.0 - resolution: "readdirp@npm:3.6.0" - dependencies: - picomatch: "npm:^2.2.1" - checksum: 10c0/6fa848cf63d1b82ab4e985f4cf72bd55b7dcfd8e0a376905804e48c3634b7e749170940ba77b32804d5fe93b3cc521aa95a8d7e7d725f830da6d93f3669ce66b - languageName: node - linkType: hard - -"rechoir@npm:^0.8.0": - version: 0.8.0 - resolution: "rechoir@npm:0.8.0" - dependencies: - resolve: "npm:^1.20.0" - checksum: 10c0/1a30074124a22abbd5d44d802dac26407fa72a0a95f162aa5504ba8246bc5452f8b1a027b154d9bdbabcd8764920ff9333d934c46a8f17479c8912e92332f3ff - languageName: node - linkType: hard - -"require-directory@npm:^2.1.1": - version: 2.1.1 - resolution: "require-directory@npm:2.1.1" - checksum: 10c0/83aa76a7bc1531f68d92c75a2ca2f54f1b01463cb566cf3fbc787d0de8be30c9dbc211d1d46be3497dac5785fe296f2dd11d531945ac29730643357978966e99 - languageName: node - linkType: hard - -"require-from-string@npm:^2.0.2": - version: 2.0.2 - resolution: "require-from-string@npm:2.0.2" - checksum: 10c0/aaa267e0c5b022fc5fd4eef49d8285086b15f2a1c54b28240fdf03599cbd9c26049fee3eab894f2e1f6ca65e513b030a7c264201e3f005601e80c49fb2937ce2 - languageName: node - linkType: hard - -"requires-port@npm:^1.0.0": - version: 1.0.0 - resolution: "requires-port@npm:1.0.0" - checksum: 10c0/b2bfdd09db16c082c4326e573a82c0771daaf7b53b9ce8ad60ea46aa6e30aaf475fe9b164800b89f93b748d2c234d8abff945d2551ba47bf5698e04cd7713267 - languageName: node - linkType: hard - -"resolve-cwd@npm:^3.0.0": - version: 3.0.0 - resolution: "resolve-cwd@npm:3.0.0" - dependencies: - resolve-from: "npm:^5.0.0" - checksum: 10c0/e608a3ebd15356264653c32d7ecbc8fd702f94c6703ea4ac2fb81d9c359180cba0ae2e6b71faa446631ed6145454d5a56b227efc33a2d40638ac13f8beb20ee4 - languageName: node - linkType: hard - -"resolve-from@npm:^5.0.0": - version: 5.0.0 - resolution: "resolve-from@npm:5.0.0" - checksum: 10c0/b21cb7f1fb746de8107b9febab60095187781137fd803e6a59a76d421444b1531b641bba5857f5dc011974d8a5c635d61cec49e6bd3b7fc20e01f0fafc4efbf2 - languageName: node - linkType: hard - -"resolve@npm:^1.17.0, resolve@npm:^1.20.0": - version: 1.22.10 - resolution: "resolve@npm:1.22.10" - dependencies: - is-core-module: "npm:^2.16.0" - path-parse: "npm:^1.0.7" - supports-preserve-symlinks-flag: "npm:^1.0.0" - bin: - resolve: bin/resolve - checksum: 10c0/8967e1f4e2cc40f79b7e080b4582b9a8c5ee36ffb46041dccb20e6461161adf69f843b43067b4a375de926a2cd669157e29a29578191def399dd5ef89a1b5203 - languageName: node - linkType: hard - -"resolve@patch:resolve@npm%3A^1.17.0#optional!builtin, resolve@patch:resolve@npm%3A^1.20.0#optional!builtin": - version: 1.22.10 - resolution: "resolve@patch:resolve@npm%3A1.22.10#optional!builtin::version=1.22.10&hash=c3c19d" - dependencies: - is-core-module: "npm:^2.16.0" - path-parse: "npm:^1.0.7" - supports-preserve-symlinks-flag: "npm:^1.0.0" - bin: - resolve: bin/resolve - checksum: 10c0/52a4e505bbfc7925ac8f4cd91fd8c4e096b6a89728b9f46861d3b405ac9a1ccf4dcbf8befb4e89a2e11370dacd0160918163885cbc669369590f2f31f4c58939 - languageName: node - linkType: hard - -"retry@npm:^0.12.0": - version: 0.12.0 - resolution: "retry@npm:0.12.0" - checksum: 10c0/59933e8501727ba13ad73ef4a04d5280b3717fd650408460c987392efe9d7be2040778ed8ebe933c5cbd63da3dcc37919c141ef8af0a54a6e4fca5a2af177bfe - languageName: node - linkType: hard - -"retry@npm:^0.13.1": - version: 0.13.1 - resolution: "retry@npm:0.13.1" - checksum: 10c0/9ae822ee19db2163497e074ea919780b1efa00431d197c7afdb950e42bf109196774b92a49fc9821f0b8b328a98eea6017410bfc5e8a0fc19c85c6d11adb3772 - languageName: node - linkType: hard - -"rfdc@npm:^1.3.0": - version: 1.4.1 - resolution: "rfdc@npm:1.4.1" - checksum: 10c0/4614e4292356cafade0b6031527eea9bc90f2372a22c012313be1dcc69a3b90c7338158b414539be863fa95bfcb2ddcd0587be696841af4e6679d85e62c060c7 - languageName: node - linkType: hard - -"rimraf@npm:^3.0.2": - version: 3.0.2 - resolution: "rimraf@npm:3.0.2" - dependencies: - glob: "npm:^7.1.3" - bin: - rimraf: bin.js - checksum: 10c0/9cb7757acb489bd83757ba1a274ab545eafd75598a9d817e0c3f8b164238dd90eba50d6b848bd4dcc5f3040912e882dc7ba71653e35af660d77b25c381d402e8 - languageName: node - linkType: hard - -"rimraf@npm:^5.0.5": - version: 5.0.10 - resolution: "rimraf@npm:5.0.10" - dependencies: - glob: "npm:^10.3.7" - bin: - rimraf: dist/esm/bin.mjs - checksum: 10c0/7da4fd0e15118ee05b918359462cfa1e7fe4b1228c7765195a45b55576e8c15b95db513b8466ec89129666f4af45ad978a3057a02139afba1a63512a2d9644cc - languageName: node - linkType: hard - -"ripemd160@npm:^2.0.0, ripemd160@npm:^2.0.1": - version: 2.0.2 - resolution: "ripemd160@npm:2.0.2" - dependencies: - hash-base: "npm:^3.0.0" - inherits: "npm:^2.0.1" - checksum: 10c0/f6f0df78817e78287c766687aed4d5accbebc308a8e7e673fb085b9977473c1f139f0c5335d353f172a915bb288098430755d2ad3c4f30612f4dd0c901cd2c3a - languageName: node - linkType: hard - -"run-applescript@npm:^7.0.0": - version: 7.0.0 - resolution: "run-applescript@npm:7.0.0" - checksum: 10c0/bd821bbf154b8e6c8ecffeaf0c33cebbb78eb2987476c3f6b420d67ab4c5301faa905dec99ded76ebb3a7042b4e440189ae6d85bbbd3fc6e8d493347ecda8bfe - languageName: node - linkType: hard - -"safe-buffer@npm:5.2.1, safe-buffer@npm:>=5.1.0, safe-buffer@npm:^5.0.1, safe-buffer@npm:^5.1.0, safe-buffer@npm:^5.1.1, safe-buffer@npm:^5.1.2, safe-buffer@npm:^5.2.0, safe-buffer@npm:^5.2.1, safe-buffer@npm:~5.2.0": - version: 5.2.1 - resolution: "safe-buffer@npm:5.2.1" - checksum: 10c0/6501914237c0a86e9675d4e51d89ca3c21ffd6a31642efeba25ad65720bce6921c9e7e974e5be91a786b25aa058b5303285d3c15dbabf983a919f5f630d349f3 - languageName: node - linkType: hard - -"safe-buffer@npm:~5.1.0, safe-buffer@npm:~5.1.1": - version: 5.1.2 - resolution: "safe-buffer@npm:5.1.2" - checksum: 10c0/780ba6b5d99cc9a40f7b951d47152297d0e260f0df01472a1b99d4889679a4b94a13d644f7dbc4f022572f09ae9005fa2fbb93bbbd83643316f365a3e9a45b21 - languageName: node - linkType: hard - -"safe-regex-test@npm:^1.1.0": - version: 1.1.0 - resolution: "safe-regex-test@npm:1.1.0" - dependencies: - call-bound: "npm:^1.0.2" - es-errors: "npm:^1.3.0" - is-regex: "npm:^1.2.1" - checksum: 10c0/f2c25281bbe5d39cddbbce7f86fca5ea9b3ce3354ea6cd7c81c31b006a5a9fff4286acc5450a3b9122c56c33eba69c56b9131ad751457b2b4a585825e6a10665 - languageName: node - linkType: hard - -"safer-buffer@npm:>= 2.1.2 < 3, safer-buffer@npm:>= 2.1.2 < 3.0.0": - version: 2.1.2 - resolution: "safer-buffer@npm:2.1.2" - checksum: 10c0/7e3c8b2e88a1841c9671094bbaeebd94448111dd90a81a1f606f3f67708a6ec57763b3b47f06da09fc6054193e0e6709e77325415dc8422b04497a8070fa02d4 - languageName: node - linkType: hard - -"schema-utils@npm:^3.2.0": - version: 3.3.0 - resolution: "schema-utils@npm:3.3.0" - dependencies: - "@types/json-schema": "npm:^7.0.8" - ajv: "npm:^6.12.5" - ajv-keywords: "npm:^3.5.2" - checksum: 10c0/fafdbde91ad8aa1316bc543d4b61e65ea86970aebbfb750bfb6d8a6c287a23e415e0e926c2498696b242f63af1aab8e585252637fabe811fd37b604351da6500 - languageName: node - linkType: hard - -"schema-utils@npm:^4.0.0, schema-utils@npm:^4.2.0, schema-utils@npm:^4.3.0": - version: 4.3.0 - resolution: "schema-utils@npm:4.3.0" - dependencies: - "@types/json-schema": "npm:^7.0.9" - ajv: "npm:^8.9.0" - ajv-formats: "npm:^2.1.1" - ajv-keywords: "npm:^5.1.0" - checksum: 10c0/c23f0fa73ef71a01d4a2bb7af4c91e0d356ec640e071aa2d06ea5e67f042962bb7ac7c29a60a295bb0125878801bc3209197a2b8a833dd25bd38e37c3ed21427 - languageName: node - linkType: hard - -"select-hose@npm:^2.0.0": - version: 2.0.0 - resolution: "select-hose@npm:2.0.0" - checksum: 10c0/01cc52edd29feddaf379efb4328aededa633f0ac43c64b11a8abd075ff34f05b0d280882c4fbcbdf1a0658202c9cd2ea8d5985174dcf9a2dac7e3a4996fa9b67 - languageName: node - linkType: hard - -"selfsigned@npm:^2.4.1": - version: 2.4.1 - resolution: "selfsigned@npm:2.4.1" - dependencies: - "@types/node-forge": "npm:^1.3.0" - node-forge: "npm:^1" - checksum: 10c0/521829ec36ea042f7e9963bf1da2ed040a815cf774422544b112ec53b7edc0bc50a0f8cc2ae7aa6cc19afa967c641fd96a15de0fc650c68651e41277d2e1df09 - languageName: node - linkType: hard - -"semver@npm:^6.3.0, semver@npm:^6.3.1": - version: 6.3.1 - resolution: "semver@npm:6.3.1" - bin: - semver: bin/semver.js - checksum: 10c0/e3d79b609071caa78bcb6ce2ad81c7966a46a7431d9d58b8800cfa9cb6a63699b3899a0e4bcce36167a284578212d9ae6942b6929ba4aa5015c079a67751d42d - languageName: node - linkType: hard - -"semver@npm:^7.3.4, semver@npm:^7.3.5, semver@npm:^7.5.3": - version: 7.6.3 - resolution: "semver@npm:7.6.3" - bin: - semver: bin/semver.js - checksum: 10c0/88f33e148b210c153873cb08cfe1e281d518aaa9a666d4d148add6560db5cd3c582f3a08ccb91f38d5f379ead256da9931234ed122057f40bb5766e65e58adaf - languageName: node - linkType: hard - -"send@npm:0.19.0": - version: 0.19.0 - resolution: "send@npm:0.19.0" - dependencies: - debug: "npm:2.6.9" - depd: "npm:2.0.0" - destroy: "npm:1.2.0" - encodeurl: "npm:~1.0.2" - escape-html: "npm:~1.0.3" - etag: "npm:~1.8.1" - fresh: "npm:0.5.2" - http-errors: "npm:2.0.0" - mime: "npm:1.6.0" - ms: "npm:2.1.3" - on-finished: "npm:2.4.1" - range-parser: "npm:~1.2.1" - statuses: "npm:2.0.1" - checksum: 10c0/ea3f8a67a8f0be3d6bf9080f0baed6d2c51d11d4f7b4470de96a5029c598a7011c497511ccc28968b70ef05508675cebff27da9151dd2ceadd60be4e6cf845e3 - languageName: node - linkType: hard - -"serialize-javascript@npm:^6.0.2": - version: 6.0.2 - resolution: "serialize-javascript@npm:6.0.2" - dependencies: - randombytes: "npm:^2.1.0" - checksum: 10c0/2dd09ef4b65a1289ba24a788b1423a035581bef60817bea1f01eda8e3bda623f86357665fe7ac1b50f6d4f583f97db9615b3f07b2a2e8cbcb75033965f771dd2 - languageName: node - linkType: hard - -"serve-index@npm:^1.9.1": - version: 1.9.1 - resolution: "serve-index@npm:1.9.1" - dependencies: - accepts: "npm:~1.3.4" - batch: "npm:0.6.1" - debug: "npm:2.6.9" - escape-html: "npm:~1.0.3" - http-errors: "npm:~1.6.2" - mime-types: "npm:~2.1.17" - parseurl: "npm:~1.3.2" - checksum: 10c0/a666471a24196f74371edf2c3c7bcdd82adbac52f600804508754b5296c3567588bf694258b19e0cb23a567acfa20d9721bfdaed3286007b81f9741ada8a3a9c - languageName: node - linkType: hard - -"serve-static@npm:1.16.2": - version: 1.16.2 - resolution: "serve-static@npm:1.16.2" - dependencies: - encodeurl: "npm:~2.0.0" - escape-html: "npm:~1.0.3" - parseurl: "npm:~1.3.3" - send: "npm:0.19.0" - checksum: 10c0/528fff6f5e12d0c5a391229ad893910709bc51b5705962b09404a1d813857578149b8815f35d3ee5752f44cd378d0f31669d4b1d7e2d11f41e08283d5134bd1f - languageName: node - linkType: hard - -"set-function-length@npm:^1.2.2": - version: 1.2.2 - resolution: "set-function-length@npm:1.2.2" - dependencies: - define-data-property: "npm:^1.1.4" - es-errors: "npm:^1.3.0" - function-bind: "npm:^1.1.2" - get-intrinsic: "npm:^1.2.4" - gopd: "npm:^1.0.1" - has-property-descriptors: "npm:^1.0.2" - checksum: 10c0/82850e62f412a258b71e123d4ed3873fa9377c216809551192bb6769329340176f109c2eeae8c22a8d386c76739855f78e8716515c818bcaef384b51110f0f3c - languageName: node - linkType: hard - -"setimmediate@npm:^1.0.4": - version: 1.0.5 - resolution: "setimmediate@npm:1.0.5" - checksum: 10c0/5bae81bfdbfbd0ce992893286d49c9693c82b1bcc00dcaaf3a09c8f428fdeacf4190c013598b81875dfac2b08a572422db7df779a99332d0fce186d15a3e4d49 - languageName: node - linkType: hard - -"setprototypeof@npm:1.1.0": - version: 1.1.0 - resolution: "setprototypeof@npm:1.1.0" - checksum: 10c0/a77b20876689c6a89c3b42f0c3596a9cae02f90fc902570cbd97198e9e8240382086c9303ad043e88cee10f61eae19f1004e51d885395a1e9bf49f9ebed12872 - languageName: node - linkType: hard - -"setprototypeof@npm:1.2.0": - version: 1.2.0 - resolution: "setprototypeof@npm:1.2.0" - checksum: 10c0/68733173026766fa0d9ecaeb07f0483f4c2dc70ca376b3b7c40b7cda909f94b0918f6c5ad5ce27a9160bdfb475efaa9d5e705a11d8eaae18f9835d20976028bc - languageName: node - linkType: hard - -"sha.js@npm:^2.4.0, sha.js@npm:^2.4.8": - version: 2.4.11 - resolution: "sha.js@npm:2.4.11" - dependencies: - inherits: "npm:^2.0.1" - safe-buffer: "npm:^5.0.1" - bin: - sha.js: ./bin.js - checksum: 10c0/b7a371bca8821c9cc98a0aeff67444a03d48d745cb103f17228b96793f455f0eb0a691941b89ea1e60f6359207e36081d9be193252b0f128e0daf9cfea2815a5 - languageName: node - linkType: hard - -"shallow-clone@npm:^3.0.0": - version: 3.0.1 - resolution: "shallow-clone@npm:3.0.1" - dependencies: - kind-of: "npm:^6.0.2" - checksum: 10c0/7bab09613a1b9f480c85a9823aebec533015579fa055ba6634aa56ba1f984380670eaf33b8217502931872aa1401c9fcadaa15f9f604d631536df475b05bcf1e - languageName: node - linkType: hard - -"shebang-command@npm:^2.0.0": - version: 2.0.0 - resolution: "shebang-command@npm:2.0.0" - dependencies: - shebang-regex: "npm:^3.0.0" - checksum: 10c0/a41692e7d89a553ef21d324a5cceb5f686d1f3c040759c50aab69688634688c5c327f26f3ecf7001ebfd78c01f3c7c0a11a7c8bfd0a8bc9f6240d4f40b224e4e - languageName: node - linkType: hard - -"shebang-regex@npm:^3.0.0": - version: 3.0.0 - resolution: "shebang-regex@npm:3.0.0" - checksum: 10c0/1dbed0726dd0e1152a92696c76c7f06084eb32a90f0528d11acd764043aacf76994b2fb30aa1291a21bd019d6699164d048286309a278855ee7bec06cf6fb690 - languageName: node - linkType: hard - -"shell-quote@npm:^1.8.1": - version: 1.8.2 - resolution: "shell-quote@npm:1.8.2" - checksum: 10c0/85fdd44f2ad76e723d34eb72c753f04d847ab64e9f1f10677e3f518d0e5b0752a176fd805297b30bb8c3a1556ebe6e77d2288dbd7b7b0110c7e941e9e9c20ce1 - languageName: node - linkType: hard - -"side-channel-list@npm:^1.0.0": - version: 1.0.0 - resolution: "side-channel-list@npm:1.0.0" - dependencies: - es-errors: "npm:^1.3.0" - object-inspect: "npm:^1.13.3" - checksum: 10c0/644f4ac893456c9490ff388bf78aea9d333d5e5bfc64cfb84be8f04bf31ddc111a8d4b83b85d7e7e8a7b845bc185a9ad02c052d20e086983cf59f0be517d9b3d - languageName: node - linkType: hard - -"side-channel-map@npm:^1.0.1": - version: 1.0.1 - resolution: "side-channel-map@npm:1.0.1" - dependencies: - call-bound: "npm:^1.0.2" - es-errors: "npm:^1.3.0" - get-intrinsic: "npm:^1.2.5" - object-inspect: "npm:^1.13.3" - checksum: 10c0/010584e6444dd8a20b85bc926d934424bd809e1a3af941cace229f7fdcb751aada0fb7164f60c2e22292b7fa3c0ff0bce237081fd4cdbc80de1dc68e95430672 - languageName: node - linkType: hard - -"side-channel-weakmap@npm:^1.0.2": - version: 1.0.2 - resolution: "side-channel-weakmap@npm:1.0.2" - dependencies: - call-bound: "npm:^1.0.2" - es-errors: "npm:^1.3.0" - get-intrinsic: "npm:^1.2.5" - object-inspect: "npm:^1.13.3" - side-channel-map: "npm:^1.0.1" - checksum: 10c0/71362709ac233e08807ccd980101c3e2d7efe849edc51455030327b059f6c4d292c237f94dc0685031dd11c07dd17a68afde235d6cf2102d949567f98ab58185 - languageName: node - linkType: hard - -"side-channel@npm:^1.0.6, side-channel@npm:^1.1.0": - version: 1.1.0 - resolution: "side-channel@npm:1.1.0" - dependencies: - es-errors: "npm:^1.3.0" - object-inspect: "npm:^1.13.3" - side-channel-list: "npm:^1.0.0" - side-channel-map: "npm:^1.0.1" - side-channel-weakmap: "npm:^1.0.2" - checksum: 10c0/cb20dad41eb032e6c24c0982e1e5a24963a28aa6122b4f05b3f3d6bf8ae7fd5474ef382c8f54a6a3ab86e0cac4d41a23bd64ede3970e5bfb50326ba02a7996e6 - languageName: node - linkType: hard - -"signal-exit@npm:^4.0.1": - version: 4.1.0 - resolution: "signal-exit@npm:4.1.0" - checksum: 10c0/41602dce540e46d599edba9d9860193398d135f7ff72cab629db5171516cfae628d21e7bfccde1bbfdf11c48726bc2a6d1a8fb8701125852fbfda7cf19c6aa83 - languageName: node - linkType: hard - -"smart-buffer@npm:^4.2.0": - version: 4.2.0 - resolution: "smart-buffer@npm:4.2.0" - checksum: 10c0/a16775323e1404dd43fabafe7460be13a471e021637bc7889468eb45ce6a6b207261f454e4e530a19500cc962c4cc5348583520843b363f4193cee5c00e1e539 - languageName: node - linkType: hard - -"socket.io-adapter@npm:~2.5.2": - version: 2.5.5 - resolution: "socket.io-adapter@npm:2.5.5" - dependencies: - debug: "npm:~4.3.4" - ws: "npm:~8.17.1" - checksum: 10c0/04a5a2a9c4399d1b6597c2afc4492ab1e73430cc124ab02b09e948eabf341180b3866e2b61b5084cb899beb68a4db7c328c29bda5efb9207671b5cb0bc6de44e - languageName: node - linkType: hard - -"socket.io-parser@npm:~4.2.4": - version: 4.2.4 - resolution: "socket.io-parser@npm:4.2.4" - dependencies: - "@socket.io/component-emitter": "npm:~3.1.0" - debug: "npm:~4.3.1" - checksum: 10c0/9383b30358fde4a801ea4ec5e6860915c0389a091321f1c1f41506618b5cf7cd685d0a31c587467a0c4ee99ef98c2b99fb87911f9dfb329716c43b587f29ca48 - languageName: node - linkType: hard - -"socket.io@npm:^4.7.2": - version: 4.8.1 - resolution: "socket.io@npm:4.8.1" - dependencies: - accepts: "npm:~1.3.4" - base64id: "npm:~2.0.0" - cors: "npm:~2.8.5" - debug: "npm:~4.3.2" - engine.io: "npm:~6.6.0" - socket.io-adapter: "npm:~2.5.2" - socket.io-parser: "npm:~4.2.4" - checksum: 10c0/acf931a2bb235be96433b71da3d8addc63eeeaa8acabd33dc8d64e12287390a45f1e9f389a73cf7dc336961cd491679741b7a016048325c596835abbcc017ca9 - languageName: node - linkType: hard - -"sockjs@npm:^0.3.24": - version: 0.3.24 - resolution: "sockjs@npm:0.3.24" - dependencies: - faye-websocket: "npm:^0.11.3" - uuid: "npm:^8.3.2" - websocket-driver: "npm:^0.7.4" - checksum: 10c0/aa102c7d921bf430215754511c81ea7248f2dcdf268fbdb18e4d8183493a86b8793b164c636c52f474a886f747447c962741df2373888823271efdb9d2594f33 - languageName: node - linkType: hard - -"socks-proxy-agent@npm:^8.0.3": - version: 8.0.5 - resolution: "socks-proxy-agent@npm:8.0.5" - dependencies: - agent-base: "npm:^7.1.2" - debug: "npm:^4.3.4" - socks: "npm:^2.8.3" - checksum: 10c0/5d2c6cecba6821389aabf18728325730504bf9bb1d9e342e7987a5d13badd7a98838cc9a55b8ed3cb866ad37cc23e1086f09c4d72d93105ce9dfe76330e9d2a6 - languageName: node - linkType: hard - -"socks@npm:^2.8.3": - version: 2.8.3 - resolution: "socks@npm:2.8.3" - dependencies: - ip-address: "npm:^9.0.5" - smart-buffer: "npm:^4.2.0" - checksum: 10c0/d54a52bf9325165770b674a67241143a3d8b4e4c8884560c4e0e078aace2a728dffc7f70150660f51b85797c4e1a3b82f9b7aa25e0a0ceae1a243365da5c51a7 - languageName: node - linkType: hard - -"source-map-support@npm:~0.5.20": - version: 0.5.21 - resolution: "source-map-support@npm:0.5.21" - dependencies: - buffer-from: "npm:^1.0.0" - source-map: "npm:^0.6.0" - checksum: 10c0/9ee09942f415e0f721d6daad3917ec1516af746a8120bba7bb56278707a37f1eb8642bde456e98454b8a885023af81a16e646869975f06afc1a711fb90484e7d - languageName: node - linkType: hard - -"source-map@npm:^0.6.0, source-map@npm:^0.6.1": - version: 0.6.1 - resolution: "source-map@npm:0.6.1" - checksum: 10c0/ab55398007c5e5532957cb0beee2368529618ac0ab372d789806f5718123cc4367d57de3904b4e6a4170eb5a0b0f41373066d02ca0735a0c4d75c7d328d3e011 - languageName: node - linkType: hard - -"source-map@npm:^0.7.3, source-map@npm:^0.7.4": - version: 0.7.4 - resolution: "source-map@npm:0.7.4" - checksum: 10c0/dc0cf3768fe23c345ea8760487f8c97ef6fca8a73c83cd7c9bf2fde8bc2c34adb9c0824d6feb14bc4f9e37fb522e18af621543f1289038a66ac7586da29aa7dc - languageName: node - linkType: hard - -"source-map@npm:~0.5.3": - version: 0.5.7 - resolution: "source-map@npm:0.5.7" - checksum: 10c0/904e767bb9c494929be013017380cbba013637da1b28e5943b566031e29df04fba57edf3f093e0914be094648b577372bd8ad247fa98cfba9c600794cd16b599 - languageName: node - linkType: hard - -"spdy-transport@npm:^3.0.0": - version: 3.0.0 - resolution: "spdy-transport@npm:3.0.0" - dependencies: - debug: "npm:^4.1.0" - detect-node: "npm:^2.0.4" - hpack.js: "npm:^2.1.6" - obuf: "npm:^1.1.2" - readable-stream: "npm:^3.0.6" - wbuf: "npm:^1.7.3" - checksum: 10c0/eaf7440fa90724fffc813c386d4a8a7427d967d6e46d7c51d8f8a533d1a6911b9823ea9218703debbae755337e85f110185d7a00ae22ec5c847077b908ce71bb - languageName: node - linkType: hard - -"spdy@npm:^4.0.2": - version: 4.0.2 - resolution: "spdy@npm:4.0.2" - dependencies: - debug: "npm:^4.1.0" - handle-thing: "npm:^2.0.0" - http-deceiver: "npm:^1.2.7" - select-hose: "npm:^2.0.0" - spdy-transport: "npm:^3.0.0" - checksum: 10c0/983509c0be9d06fd00bb9dff713c5b5d35d3ffd720db869acdd5ad7aa6fc0e02c2318b58f75328957d8ff772acdf1f7d19382b6047df342044ff3e2d6805ccdf - languageName: node - linkType: hard - -"sprintf-js@npm:^1.1.3": - version: 1.1.3 - resolution: "sprintf-js@npm:1.1.3" - checksum: 10c0/09270dc4f30d479e666aee820eacd9e464215cdff53848b443964202bf4051490538e5dd1b42e1a65cf7296916ca17640aebf63dae9812749c7542ee5f288dec - languageName: node - linkType: hard - -"ssri@npm:^12.0.0": - version: 12.0.0 - resolution: "ssri@npm:12.0.0" - dependencies: - minipass: "npm:^7.0.3" - checksum: 10c0/caddd5f544b2006e88fa6b0124d8d7b28208b83c72d7672d5ade44d794525d23b540f3396108c4eb9280dcb7c01f0bef50682f5b4b2c34291f7c5e211fd1417d - languageName: node - linkType: hard - -"statuses@npm:2.0.1": - version: 2.0.1 - resolution: "statuses@npm:2.0.1" - checksum: 10c0/34378b207a1620a24804ce8b5d230fea0c279f00b18a7209646d5d47e419d1cc23e7cbf33a25a1e51ac38973dc2ac2e1e9c647a8e481ef365f77668d72becfd0 - languageName: node - linkType: hard - -"statuses@npm:>= 1.4.0 < 2, statuses@npm:~1.5.0": - version: 1.5.0 - resolution: "statuses@npm:1.5.0" - checksum: 10c0/e433900956357b3efd79b1c547da4d291799ac836960c016d10a98f6a810b1b5c0dcc13b5a7aa609a58239b5190e1ea176ad9221c2157d2fd1c747393e6b2940 - languageName: node - linkType: hard - -"stream-browserify@npm:^3.0.0": - version: 3.0.0 - resolution: "stream-browserify@npm:3.0.0" - dependencies: - inherits: "npm:~2.0.4" - readable-stream: "npm:^3.5.0" - checksum: 10c0/ec3b975a4e0aa4b3dc5e70ffae3fc8fd29ac725353a14e72f213dff477b00330140ad014b163a8cbb9922dfe90803f81a5ea2b269e1bbfd8bd71511b88f889ad - languageName: node - linkType: hard - -"stream-http@npm:^3.1.0": - version: 3.2.0 - resolution: "stream-http@npm:3.2.0" - dependencies: - builtin-status-codes: "npm:^3.0.0" - inherits: "npm:^2.0.4" - readable-stream: "npm:^3.6.0" - xtend: "npm:^4.0.2" - checksum: 10c0/f128fb8076d60cd548f229554b6a1a70c08a04b7b2afd4dbe7811d20f27f7d4112562eb8bce86d72a8691df3b50573228afcf1271e55e81f981536c67498bc41 - languageName: node - linkType: hard - -"streamroller@npm:^3.1.5": - version: 3.1.5 - resolution: "streamroller@npm:3.1.5" - dependencies: - date-format: "npm:^4.0.14" - debug: "npm:^4.3.4" - fs-extra: "npm:^8.1.0" - checksum: 10c0/0bdeec34ad37487d959ba908f17067c938f544db88b5bb1669497a67a6b676413229ce5a6145c2812d06959ebeb8842e751076647d4b323ca06be612963b9099 - languageName: node - linkType: hard - -"string-width-cjs@npm:string-width@^4.2.0, string-width@npm:^4.1.0, string-width@npm:^4.2.0": - version: 4.2.3 - resolution: "string-width@npm:4.2.3" - dependencies: - emoji-regex: "npm:^8.0.0" - is-fullwidth-code-point: "npm:^3.0.0" - strip-ansi: "npm:^6.0.1" - checksum: 10c0/1e525e92e5eae0afd7454086eed9c818ee84374bb80328fc41217ae72ff5f065ef1c9d7f72da41de40c75fa8bb3dee63d92373fd492c84260a552c636392a47b - languageName: node - linkType: hard - -"string-width@npm:^5.0.1, string-width@npm:^5.1.2": - version: 5.1.2 - resolution: "string-width@npm:5.1.2" - dependencies: - eastasianwidth: "npm:^0.2.0" - emoji-regex: "npm:^9.2.2" - strip-ansi: "npm:^7.0.1" - checksum: 10c0/ab9c4264443d35b8b923cbdd513a089a60de339216d3b0ed3be3ba57d6880e1a192b70ae17225f764d7adbf5994e9bb8df253a944736c15a0240eff553c678ca - languageName: node - linkType: hard - -"string_decoder@npm:^1.1.1, string_decoder@npm:^1.3.0": - version: 1.3.0 - resolution: "string_decoder@npm:1.3.0" - dependencies: - safe-buffer: "npm:~5.2.0" - checksum: 10c0/810614ddb030e271cd591935dcd5956b2410dd079d64ff92a1844d6b7588bf992b3e1b69b0f4d34a3e06e0bd73046ac646b5264c1987b20d0601f81ef35d731d - languageName: node - linkType: hard - -"string_decoder@npm:~1.1.1": - version: 1.1.1 - resolution: "string_decoder@npm:1.1.1" - dependencies: - safe-buffer: "npm:~5.1.0" - checksum: 10c0/b4f89f3a92fd101b5653ca3c99550e07bdf9e13b35037e9e2a1c7b47cec4e55e06ff3fc468e314a0b5e80bfbaf65c1ca5a84978764884ae9413bec1fc6ca924e - languageName: node - linkType: hard - -"strip-ansi-cjs@npm:strip-ansi@^6.0.1, strip-ansi@npm:^6.0.0, strip-ansi@npm:^6.0.1": - version: 6.0.1 - resolution: "strip-ansi@npm:6.0.1" - dependencies: - ansi-regex: "npm:^5.0.1" - checksum: 10c0/1ae5f212a126fe5b167707f716942490e3933085a5ff6c008ab97ab2f272c8025d3aa218b7bd6ab25729ca20cc81cddb252102f8751e13482a5199e873680952 - languageName: node - linkType: hard - -"strip-ansi@npm:^7.0.1": - version: 7.1.0 - resolution: "strip-ansi@npm:7.1.0" - dependencies: - ansi-regex: "npm:^6.0.1" - checksum: 10c0/a198c3762e8832505328cbf9e8c8381de14a4fa50a4f9b2160138158ea88c0f5549fb50cb13c651c3088f47e63a108b34622ec18c0499b6c8c3a5ddf6b305ac4 - languageName: node - linkType: hard - -"supports-color@npm:^5.3.0": - version: 5.5.0 - resolution: "supports-color@npm:5.5.0" - dependencies: - has-flag: "npm:^3.0.0" - checksum: 10c0/6ae5ff319bfbb021f8a86da8ea1f8db52fac8bd4d499492e30ec17095b58af11f0c55f8577390a749b1c4dde691b6a0315dab78f5f54c9b3d83f8fb5905c1c05 - languageName: node - linkType: hard - -"supports-color@npm:^7.1.0": - version: 7.2.0 - resolution: "supports-color@npm:7.2.0" - dependencies: - has-flag: "npm:^4.0.0" - checksum: 10c0/afb4c88521b8b136b5f5f95160c98dee7243dc79d5432db7efc27efb219385bbc7d9427398e43dd6cc730a0f87d5085ce1652af7efbe391327bc0a7d0f7fc124 - languageName: node - linkType: hard - -"supports-color@npm:^8.0.0": - version: 8.1.1 - resolution: "supports-color@npm:8.1.1" - dependencies: - has-flag: "npm:^4.0.0" - checksum: 10c0/ea1d3c275dd604c974670f63943ed9bd83623edc102430c05adb8efc56ba492746b6e95386e7831b872ec3807fd89dd8eb43f735195f37b5ec343e4234cc7e89 - languageName: node - linkType: hard - -"supports-preserve-symlinks-flag@npm:^1.0.0": - version: 1.0.0 - resolution: "supports-preserve-symlinks-flag@npm:1.0.0" - checksum: 10c0/6c4032340701a9950865f7ae8ef38578d8d7053f5e10518076e6554a9381fa91bd9c6850193695c141f32b21f979c985db07265a758867bac95de05f7d8aeb39 - languageName: node - linkType: hard - -"tapable@npm:^2.1.1, tapable@npm:^2.2.0": - version: 2.2.1 - resolution: "tapable@npm:2.2.1" - checksum: 10c0/bc40e6efe1e554d075469cedaba69a30eeb373552aaf41caeaaa45bf56ffacc2674261b106245bd566b35d8f3329b52d838e851ee0a852120acae26e622925c9 - languageName: node - linkType: hard - -"tar@npm:^7.4.3": - version: 7.4.3 - resolution: "tar@npm:7.4.3" - dependencies: - "@isaacs/fs-minipass": "npm:^4.0.0" - chownr: "npm:^3.0.0" - minipass: "npm:^7.1.2" - minizlib: "npm:^3.0.1" - mkdirp: "npm:^3.0.1" - yallist: "npm:^5.0.0" - checksum: 10c0/d4679609bb2a9b48eeaf84632b6d844128d2412b95b6de07d53d8ee8baf4ca0857c9331dfa510390a0727b550fd543d4d1a10995ad86cdf078423fbb8d99831d - languageName: node - linkType: hard - -"terser-webpack-plugin@npm:^5.3.10": - version: 5.3.11 - resolution: "terser-webpack-plugin@npm:5.3.11" - dependencies: - "@jridgewell/trace-mapping": "npm:^0.3.25" - jest-worker: "npm:^27.4.5" - schema-utils: "npm:^4.3.0" - serialize-javascript: "npm:^6.0.2" - terser: "npm:^5.31.1" - peerDependencies: - webpack: ^5.1.0 - peerDependenciesMeta: - "@swc/core": - optional: true - esbuild: - optional: true - uglify-js: - optional: true - checksum: 10c0/4794274f445dc589f4c113c75a55ce51364ccf09bfe8a545cdb462e3f752bf300ea91f072fa28bbed291bbae03274da06fe4eca180e784fb8a43646aa7dbcaef - languageName: node - linkType: hard - -"terser@npm:^5.31.1": - version: 5.37.0 - resolution: "terser@npm:5.37.0" - dependencies: - "@jridgewell/source-map": "npm:^0.3.3" - acorn: "npm:^8.8.2" - commander: "npm:^2.20.0" - source-map-support: "npm:~0.5.20" - bin: - terser: bin/terser - checksum: 10c0/ff0dc79b0a0da821e7f5bf7a047eab6d04e70e88b62339a0f1d71117db3310e255f5c00738fa3b391f56c3571f800a00047720261ba04ced0241c1f9922199f4 - languageName: node - linkType: hard - -"thingies@npm:^1.20.0": - version: 1.21.0 - resolution: "thingies@npm:1.21.0" - peerDependencies: - tslib: ^2 - checksum: 10c0/7570ee855aecb73185a672ecf3eb1c287a6512bf5476449388433b2d4debcf78100bc8bfd439b0edd38d2bc3bfb8341de5ce85b8557dec66d0f27b962c9a8bc1 - languageName: node - linkType: hard - -"thunky@npm:^1.0.2": - version: 1.1.0 - resolution: "thunky@npm:1.1.0" - checksum: 10c0/369764f39de1ce1de2ba2fa922db4a3f92e9c7f33bcc9a713241bc1f4a5238b484c17e0d36d1d533c625efb00e9e82c3e45f80b47586945557b45abb890156d2 - languageName: node - linkType: hard - -"timers-browserify@npm:^2.0.11": - version: 2.0.12 - resolution: "timers-browserify@npm:2.0.12" - dependencies: - setimmediate: "npm:^1.0.4" - checksum: 10c0/98e84db1a685bc8827c117a8bc62aac811ad56a995d07938fc7ed8cdc5bf3777bfe2d4e5da868847194e771aac3749a20f6cdd22091300fe889a76fe214a4641 - languageName: node - linkType: hard - -"tmp@npm:^0.2.1": - version: 0.2.3 - resolution: "tmp@npm:0.2.3" - checksum: 10c0/3e809d9c2f46817475b452725c2aaa5d11985cf18d32a7a970ff25b568438e2c076c2e8609224feef3b7923fa9749b74428e3e634f6b8e520c534eef2fd24125 - languageName: node - linkType: hard - -"to-regex-range@npm:^5.0.1": - version: 5.0.1 - resolution: "to-regex-range@npm:5.0.1" - dependencies: - is-number: "npm:^7.0.0" - checksum: 10c0/487988b0a19c654ff3e1961b87f471702e708fa8a8dd02a298ef16da7206692e8552a0250e8b3e8759270f62e9d8314616f6da274734d3b558b1fc7b7724e892 - languageName: node - linkType: hard - -"toidentifier@npm:1.0.1": - version: 1.0.1 - resolution: "toidentifier@npm:1.0.1" - checksum: 10c0/93937279934bd66cc3270016dd8d0afec14fb7c94a05c72dc57321f8bd1fa97e5bea6d1f7c89e728d077ca31ea125b78320a616a6c6cd0e6b9cb94cb864381c1 - languageName: node - linkType: hard - -"tree-dump@npm:^1.0.1": - version: 1.0.2 - resolution: "tree-dump@npm:1.0.2" - peerDependencies: - tslib: 2 - checksum: 10c0/d1d180764e9c691b28332dbd74226c6b6af361dfb1e134bb11e60e17cb11c215894adee50ffc578da5dcf546006693947be8b6665eb1269b56e2f534926f1c1f - languageName: node - linkType: hard - -"ts-loader@npm:^9.5.2": - version: 9.5.2 - resolution: "ts-loader@npm:9.5.2" - dependencies: - chalk: "npm:^4.1.0" - enhanced-resolve: "npm:^5.0.0" - micromatch: "npm:^4.0.0" - semver: "npm:^7.3.4" - source-map: "npm:^0.7.4" - peerDependencies: - typescript: "*" - webpack: ^5.0.0 - checksum: 10c0/d4f4e67f1365a8c4a929d26148611b6a82a9241bd988863386c9cc0c034eec8b14562206e09540fae38154595e0b3b9520b701b5c83c0e5d743c4016cd91d9f1 - languageName: node - linkType: hard - -"ts-node@npm:^10.8.2": - version: 10.9.2 - resolution: "ts-node@npm:10.9.2" - dependencies: - "@cspotcode/source-map-support": "npm:^0.8.0" - "@tsconfig/node10": "npm:^1.0.7" - "@tsconfig/node12": "npm:^1.0.7" - "@tsconfig/node14": "npm:^1.0.0" - "@tsconfig/node16": "npm:^1.0.2" - acorn: "npm:^8.4.1" - acorn-walk: "npm:^8.1.1" - arg: "npm:^4.1.0" - create-require: "npm:^1.1.0" - diff: "npm:^4.0.1" - make-error: "npm:^1.1.1" - v8-compile-cache-lib: "npm:^3.0.1" - yn: "npm:3.1.1" - peerDependencies: - "@swc/core": ">=1.2.50" - "@swc/wasm": ">=1.2.50" - "@types/node": "*" - typescript: ">=2.7" - peerDependenciesMeta: - "@swc/core": - optional: true - "@swc/wasm": - optional: true - bin: - ts-node: dist/bin.js - ts-node-cwd: dist/bin-cwd.js - ts-node-esm: dist/bin-esm.js - ts-node-script: dist/bin-script.js - ts-node-transpile-only: dist/bin-transpile.js - ts-script: dist/bin-script-deprecated.js - checksum: 10c0/5f29938489f96982a25ba650b64218e83a3357d76f7bede80195c65ab44ad279c8357264639b7abdd5d7e75fc269a83daa0e9c62fd8637a3def67254ecc9ddc2 - languageName: node - linkType: hard - -"tslib@npm:^2.0.0": - version: 2.8.1 - resolution: "tslib@npm:2.8.1" - checksum: 10c0/9c4759110a19c53f992d9aae23aac5ced636e99887b51b9e61def52611732872ff7668757d4e4c61f19691e36f4da981cd9485e869b4a7408d689f6bf1f14e62 - languageName: node - linkType: hard - -"tty-browserify@npm:^0.0.1": - version: 0.0.1 - resolution: "tty-browserify@npm:0.0.1" - checksum: 10c0/5e34883388eb5f556234dae75b08e069b9e62de12bd6d87687f7817f5569430a6dfef550b51dbc961715ae0cd0eb5a059e6e3fc34dc127ea164aa0f9b5bb033d - languageName: node - linkType: hard - -"type-is@npm:~1.6.18": - version: 1.6.18 - resolution: "type-is@npm:1.6.18" - dependencies: - media-typer: "npm:0.3.0" - mime-types: "npm:~2.1.24" - checksum: 10c0/a23daeb538591b7efbd61ecf06b6feb2501b683ffdc9a19c74ef5baba362b4347e42f1b4ed81f5882a8c96a3bfff7f93ce3ffaf0cbbc879b532b04c97a55db9d - languageName: node - linkType: hard - -"typescript@npm:^5.7.3": - version: 5.7.3 - resolution: "typescript@npm:5.7.3" - bin: - tsc: bin/tsc - tsserver: bin/tsserver - checksum: 10c0/b7580d716cf1824736cc6e628ab4cd8b51877408ba2be0869d2866da35ef8366dd6ae9eb9d0851470a39be17cbd61df1126f9e211d8799d764ea7431d5435afa - languageName: node - linkType: hard - -"typescript@patch:typescript@npm%3A^5.7.3#optional!builtin": - version: 5.7.3 - resolution: "typescript@patch:typescript@npm%3A5.7.3#optional!builtin::version=5.7.3&hash=5786d5" - bin: - tsc: bin/tsc - tsserver: bin/tsserver - checksum: 10c0/6fd7e0ed3bf23a81246878c613423730c40e8bdbfec4c6e4d7bf1b847cbb39076e56ad5f50aa9d7ebd89877999abaee216002d3f2818885e41c907caaa192cc4 - languageName: node - linkType: hard - -"ua-parser-js@npm:^0.7.30": - version: 0.7.40 - resolution: "ua-parser-js@npm:0.7.40" - bin: - ua-parser-js: script/cli.js - checksum: 10c0/d114f0b71b5b0106dcc0cb7cc26a44690073e886fa1444f8c03131d4f57b3f6645f9fb7b308b0aaaa5a2774461f9e8fe1a2a1c3ff69aa531316fcf14cd44dbe3 - languageName: node - linkType: hard - -"undici-types@npm:~6.20.0": - version: 6.20.0 - resolution: "undici-types@npm:6.20.0" - checksum: 10c0/68e659a98898d6a836a9a59e6adf14a5d799707f5ea629433e025ac90d239f75e408e2e5ff086afc3cace26f8b26ee52155293564593fbb4a2f666af57fc59bf - languageName: node - linkType: hard - -"unique-filename@npm:^4.0.0": - version: 4.0.0 - resolution: "unique-filename@npm:4.0.0" - dependencies: - unique-slug: "npm:^5.0.0" - checksum: 10c0/38ae681cceb1408ea0587b6b01e29b00eee3c84baee1e41fd5c16b9ed443b80fba90c40e0ba69627e30855570a34ba8b06702d4a35035d4b5e198bf5a64c9ddc - languageName: node - linkType: hard - -"unique-slug@npm:^5.0.0": - version: 5.0.0 - resolution: "unique-slug@npm:5.0.0" - dependencies: - imurmurhash: "npm:^0.1.4" - checksum: 10c0/d324c5a44887bd7e105ce800fcf7533d43f29c48757ac410afd42975de82cc38ea2035c0483f4de82d186691bf3208ef35c644f73aa2b1b20b8e651be5afd293 - languageName: node - linkType: hard - -"universalify@npm:^0.1.0": - version: 0.1.2 - resolution: "universalify@npm:0.1.2" - checksum: 10c0/e70e0339f6b36f34c9816f6bf9662372bd241714dc77508d231d08386d94f2c4aa1ba1318614f92015f40d45aae1b9075cd30bd490efbe39387b60a76ca3f045 - languageName: node - linkType: hard - -"unpipe@npm:1.0.0, unpipe@npm:~1.0.0": - version: 1.0.0 - resolution: "unpipe@npm:1.0.0" - checksum: 10c0/193400255bd48968e5c5383730344fbb4fa114cdedfab26e329e50dd2d81b134244bb8a72c6ac1b10ab0281a58b363d06405632c9d49ca9dfd5e90cbd7d0f32c - languageName: node - linkType: hard - -"update-browserslist-db@npm:^1.1.1": - version: 1.1.2 - resolution: "update-browserslist-db@npm:1.1.2" - dependencies: - escalade: "npm:^3.2.0" - picocolors: "npm:^1.1.1" - peerDependencies: - browserslist: ">= 4.21.0" - bin: - update-browserslist-db: cli.js - checksum: 10c0/9cb353998d6d7d6ba1e46b8fa3db888822dd972212da4eda609d185eb5c3557a93fd59780ceb757afd4d84240518df08542736969e6a5d6d6ce2d58e9363aac6 - languageName: node - linkType: hard - -"uri-js@npm:^4.2.2": - version: 4.4.1 - resolution: "uri-js@npm:4.4.1" - dependencies: - punycode: "npm:^2.1.0" - checksum: 10c0/4ef57b45aa820d7ac6496e9208559986c665e49447cb072744c13b66925a362d96dd5a46c4530a6b8e203e5db5fe849369444440cb22ecfc26c679359e5dfa3c - languageName: node - linkType: hard - -"url@npm:^0.11.0": - version: 0.11.4 - resolution: "url@npm:0.11.4" - dependencies: - punycode: "npm:^1.4.1" - qs: "npm:^6.12.3" - checksum: 10c0/cc93405ae4a9b97a2aa60ca67f1cb1481c0221cb4725a7341d149be5e2f9cfda26fd432d64dbbec693d16593b68b8a46aad8e5eab21f814932134c9d8620c662 - languageName: node - linkType: hard - -"util-deprecate@npm:^1.0.1, util-deprecate@npm:~1.0.1": - version: 1.0.2 - resolution: "util-deprecate@npm:1.0.2" - checksum: 10c0/41a5bdd214df2f6c3ecf8622745e4a366c4adced864bc3c833739791aeeeb1838119af7daed4ba36428114b5c67dcda034a79c882e97e43c03e66a4dd7389942 - languageName: node - linkType: hard - -"util@npm:^0.12.1, util@npm:^0.12.5": - version: 0.12.5 - resolution: "util@npm:0.12.5" - dependencies: - inherits: "npm:^2.0.3" - is-arguments: "npm:^1.0.4" - is-generator-function: "npm:^1.0.7" - is-typed-array: "npm:^1.1.3" - which-typed-array: "npm:^1.1.2" - checksum: 10c0/c27054de2cea2229a66c09522d0fa1415fb12d861d08523a8846bf2e4cbf0079d4c3f725f09dcb87493549bcbf05f5798dce1688b53c6c17201a45759e7253f3 - languageName: node - linkType: hard - -"utils-merge@npm:1.0.1": - version: 1.0.1 - resolution: "utils-merge@npm:1.0.1" - checksum: 10c0/02ba649de1b7ca8854bfe20a82f1dfbdda3fb57a22ab4a8972a63a34553cf7aa51bc9081cf7e001b035b88186d23689d69e71b510e610a09a4c66f68aa95b672 - languageName: node - linkType: hard - -"uuid@npm:^8.3.2": - version: 8.3.2 - resolution: "uuid@npm:8.3.2" - bin: - uuid: dist/bin/uuid - checksum: 10c0/bcbb807a917d374a49f475fae2e87fdca7da5e5530820ef53f65ba1d12131bd81a92ecf259cc7ce317cbe0f289e7d79fdfebcef9bfa3087c8c8a2fa304c9be54 - languageName: node - linkType: hard - -"v8-compile-cache-lib@npm:^3.0.1": - version: 3.0.1 - resolution: "v8-compile-cache-lib@npm:3.0.1" - checksum: 10c0/bdc36fb8095d3b41df197f5fb6f11e3a26adf4059df3213e3baa93810d8f0cc76f9a74aaefc18b73e91fe7e19154ed6f134eda6fded2e0f1c8d2272ed2d2d391 - languageName: node - linkType: hard - -"vary@npm:^1, vary@npm:~1.1.2": - version: 1.1.2 - resolution: "vary@npm:1.1.2" - checksum: 10c0/f15d588d79f3675135ba783c91a4083dcd290a2a5be9fcb6514220a1634e23df116847b1cc51f66bfb0644cf9353b2abb7815ae499bab06e46dd33c1a6bf1f4f - languageName: node - linkType: hard - -"vm-browserify@npm:^1.1.2": - version: 1.1.2 - resolution: "vm-browserify@npm:1.1.2" - checksum: 10c0/0cc1af6e0d880deb58bc974921320c187f9e0a94f25570fca6b1bd64e798ce454ab87dfd797551b1b0cc1849307421aae0193cedf5f06bdb5680476780ee344b - languageName: node - linkType: hard - -"void-elements@npm:^2.0.0": - version: 2.0.1 - resolution: "void-elements@npm:2.0.1" - checksum: 10c0/23b4f35bbeabcaa5c87a9f638ae80862a9313dccbaa8973b0eada81dbe97488ae11baf4d8aa2846bc397d31456afdfd8d791bb44c542f83735e6d04af6996f4d - languageName: node - linkType: hard - -"wasm-bindings@workspace:.": - version: 0.0.0-use.local - resolution: "wasm-bindings@workspace:." - dependencies: - "@types/jasmine": "npm:^5.1.5" - "@wasm-tool/wasm-pack-plugin": "npm:^1.6.0" - karma: "npm:^6.4.0" - karma-chrome-launcher: "npm:^3.1.1" - karma-jasmine: "npm:^5.1.0" - karma-spec-reporter: "npm:^0.0.36" - karma-typescript: "npm:^5.5.3" - karma-webpack: "npm:^5.0.0" - ts-loader: "npm:^9.5.2" - ts-node: "npm:^10.8.2" - typescript: "npm:^5.7.3" - webpack: "npm:^5.97.1" - webpack-cli: "npm:^6.0.1" - webpack-dev-server: "npm:^5.2.0" - languageName: unknown - linkType: soft - -"watchpack@npm:^2.1.1, watchpack@npm:^2.4.1": - version: 2.4.2 - resolution: "watchpack@npm:2.4.2" - dependencies: - glob-to-regexp: "npm:^0.4.1" - graceful-fs: "npm:^4.1.2" - checksum: 10c0/ec60a5f0e9efaeca0102fd9126346b3b2d523e01c34030d3fddf5813a7125765121ebdc2552981136dcd2c852deb1af0b39340f2fcc235f292db5399d0283577 - languageName: node - linkType: hard - -"wbuf@npm:^1.1.0, wbuf@npm:^1.7.3": - version: 1.7.3 - resolution: "wbuf@npm:1.7.3" - dependencies: - minimalistic-assert: "npm:^1.0.0" - checksum: 10c0/56edcc5ef2b3d30913ba8f1f5cccc364d180670b24d5f3f8849c1e6fb514e5c7e3a87548ae61227a82859eba6269c11393ae24ce12a2ea1ecb9b465718ddced7 - languageName: node - linkType: hard - -"wcwidth@npm:^1.0.1": - version: 1.0.1 - resolution: "wcwidth@npm:1.0.1" - dependencies: - defaults: "npm:^1.0.3" - checksum: 10c0/5b61ca583a95e2dd85d7078400190efd452e05751a64accb8c06ce4db65d7e0b0cde9917d705e826a2e05cc2548f61efde115ffa374c3e436d04be45c889e5b4 - languageName: node - linkType: hard - -"webpack-cli@npm:^6.0.1": - version: 6.0.1 - resolution: "webpack-cli@npm:6.0.1" - dependencies: - "@discoveryjs/json-ext": "npm:^0.6.1" - "@webpack-cli/configtest": "npm:^3.0.1" - "@webpack-cli/info": "npm:^3.0.1" - "@webpack-cli/serve": "npm:^3.0.1" - colorette: "npm:^2.0.14" - commander: "npm:^12.1.0" - cross-spawn: "npm:^7.0.3" - envinfo: "npm:^7.14.0" - fastest-levenshtein: "npm:^1.0.12" - import-local: "npm:^3.0.2" - interpret: "npm:^3.1.1" - rechoir: "npm:^0.8.0" - webpack-merge: "npm:^6.0.1" - peerDependencies: - webpack: ^5.82.0 - peerDependenciesMeta: - webpack-bundle-analyzer: - optional: true - webpack-dev-server: - optional: true - bin: - webpack-cli: ./bin/cli.js - checksum: 10c0/2aaca78e277427f03f528602abd707d224696048fb46286ea636c7975592409c4381ca94d68bbbb3900f195ca97f256e619583e8feb34a80da531461323bf3e2 - languageName: node - linkType: hard - -"webpack-dev-middleware@npm:^7.4.2": - version: 7.4.2 - resolution: "webpack-dev-middleware@npm:7.4.2" - dependencies: - colorette: "npm:^2.0.10" - memfs: "npm:^4.6.0" - mime-types: "npm:^2.1.31" - on-finished: "npm:^2.4.1" - range-parser: "npm:^1.2.1" - schema-utils: "npm:^4.0.0" - peerDependencies: - webpack: ^5.0.0 - peerDependenciesMeta: - webpack: - optional: true - checksum: 10c0/2aa873ef57a7095d7fba09400737b6066adc3ded229fd6eba89a666f463c2614c68e01ae58f662c9cdd74f0c8da088523d972329bf4a054e470bc94feb8bcad0 - languageName: node - linkType: hard - -"webpack-dev-server@npm:^5.2.0": - version: 5.2.0 - resolution: "webpack-dev-server@npm:5.2.0" - dependencies: - "@types/bonjour": "npm:^3.5.13" - "@types/connect-history-api-fallback": "npm:^1.5.4" - "@types/express": "npm:^4.17.21" - "@types/serve-index": "npm:^1.9.4" - "@types/serve-static": "npm:^1.15.5" - "@types/sockjs": "npm:^0.3.36" - "@types/ws": "npm:^8.5.10" - ansi-html-community: "npm:^0.0.8" - bonjour-service: "npm:^1.2.1" - chokidar: "npm:^3.6.0" - colorette: "npm:^2.0.10" - compression: "npm:^1.7.4" - connect-history-api-fallback: "npm:^2.0.0" - express: "npm:^4.21.2" - graceful-fs: "npm:^4.2.6" - http-proxy-middleware: "npm:^2.0.7" - ipaddr.js: "npm:^2.1.0" - launch-editor: "npm:^2.6.1" - open: "npm:^10.0.3" - p-retry: "npm:^6.2.0" - schema-utils: "npm:^4.2.0" - selfsigned: "npm:^2.4.1" - serve-index: "npm:^1.9.1" - sockjs: "npm:^0.3.24" - spdy: "npm:^4.0.2" - webpack-dev-middleware: "npm:^7.4.2" - ws: "npm:^8.18.0" - peerDependencies: - webpack: ^5.0.0 - peerDependenciesMeta: - webpack: - optional: true - webpack-cli: - optional: true - bin: - webpack-dev-server: bin/webpack-dev-server.js - checksum: 10c0/afb2e51945ac54ef3039e11e377241e1cb97a8d3f526f39f13c3fa924c530fb6063200c2c3ae4e33e6bcc110d4abed777c09ce18e2d261012853d81f3c5820ab - languageName: node - linkType: hard - -"webpack-merge@npm:^4.1.5": - version: 4.2.2 - resolution: "webpack-merge@npm:4.2.2" - dependencies: - lodash: "npm:^4.17.15" - checksum: 10c0/283cb4ffe4d4ae6de23d595154868780126835ded241748da0b070c6cca6974c229493ac0b6b7160c2c92950c950c8e5edf036a192da78e32e22a9c81593ad16 - languageName: node - linkType: hard - -"webpack-merge@npm:^6.0.1": - version: 6.0.1 - resolution: "webpack-merge@npm:6.0.1" - dependencies: - clone-deep: "npm:^4.0.1" - flat: "npm:^5.0.2" - wildcard: "npm:^2.0.1" - checksum: 10c0/bf1429567858b353641801b8a2696ca0aac270fc8c55d4de8a7b586fe07d27fdcfc83099a98ab47e6162383db8dd63bb8cc25b1beb2ec82150422eec843b0dc0 - languageName: node - linkType: hard - -"webpack-sources@npm:^3.2.3": - version: 3.2.3 - resolution: "webpack-sources@npm:3.2.3" - checksum: 10c0/2ef63d77c4fad39de4a6db17323d75eb92897b32674e97d76f0a1e87c003882fc038571266ad0ef581ac734cbe20952912aaa26155f1905e96ce251adbb1eb4e - languageName: node - linkType: hard - -"webpack@npm:^5.97.1": - version: 5.97.1 - resolution: "webpack@npm:5.97.1" - dependencies: - "@types/eslint-scope": "npm:^3.7.7" - "@types/estree": "npm:^1.0.6" - "@webassemblyjs/ast": "npm:^1.14.1" - "@webassemblyjs/wasm-edit": "npm:^1.14.1" - "@webassemblyjs/wasm-parser": "npm:^1.14.1" - acorn: "npm:^8.14.0" - browserslist: "npm:^4.24.0" - chrome-trace-event: "npm:^1.0.2" - enhanced-resolve: "npm:^5.17.1" - es-module-lexer: "npm:^1.2.1" - eslint-scope: "npm:5.1.1" - events: "npm:^3.2.0" - glob-to-regexp: "npm:^0.4.1" - graceful-fs: "npm:^4.2.11" - json-parse-even-better-errors: "npm:^2.3.1" - loader-runner: "npm:^4.2.0" - mime-types: "npm:^2.1.27" - neo-async: "npm:^2.6.2" - schema-utils: "npm:^3.2.0" - tapable: "npm:^2.1.1" - terser-webpack-plugin: "npm:^5.3.10" - watchpack: "npm:^2.4.1" - webpack-sources: "npm:^3.2.3" - peerDependenciesMeta: - webpack-cli: - optional: true - bin: - webpack: bin/webpack.js - checksum: 10c0/a12d3dc882ca582075f2c4bd88840be8307427245c90a8a0e0b372d73560df13fcf25a61625c9e7edc964981d16b5a8323640562eb48347cf9dd2f8bd1b39d35 - languageName: node - linkType: hard - -"websocket-driver@npm:>=0.5.1, websocket-driver@npm:^0.7.4": - version: 0.7.4 - resolution: "websocket-driver@npm:0.7.4" - dependencies: - http-parser-js: "npm:>=0.5.1" - safe-buffer: "npm:>=5.1.0" - websocket-extensions: "npm:>=0.1.1" - checksum: 10c0/5f09547912b27bdc57bac17b7b6527d8993aa4ac8a2d10588bb74aebaf785fdcf64fea034aae0c359b7adff2044dd66f3d03866e4685571f81b13e548f9021f1 - languageName: node - linkType: hard - -"websocket-extensions@npm:>=0.1.1": - version: 0.1.4 - resolution: "websocket-extensions@npm:0.1.4" - checksum: 10c0/bbc8c233388a0eb8a40786ee2e30d35935cacbfe26ab188b3e020987e85d519c2009fe07cfc37b7f718b85afdba7e54654c9153e6697301f72561bfe429177e0 - languageName: node - linkType: hard - -"which-typed-array@npm:^1.1.16, which-typed-array@npm:^1.1.2": - version: 1.1.18 - resolution: "which-typed-array@npm:1.1.18" - dependencies: - available-typed-arrays: "npm:^1.0.7" - call-bind: "npm:^1.0.8" - call-bound: "npm:^1.0.3" - for-each: "npm:^0.3.3" - gopd: "npm:^1.2.0" - has-tostringtag: "npm:^1.0.2" - checksum: 10c0/0412f4a91880ca1a2a63056187c2e3de6b129b2b5b6c17bc3729f0f7041047ae48fb7424813e51506addb2c97320003ee18b8c57469d2cde37983ef62126143c - languageName: node - linkType: hard - -"which@npm:^1.2.1": - version: 1.3.1 - resolution: "which@npm:1.3.1" - dependencies: - isexe: "npm:^2.0.0" - bin: - which: ./bin/which - checksum: 10c0/e945a8b6bbf6821aaaef7f6e0c309d4b615ef35699576d5489b4261da9539f70393c6b2ce700ee4321c18f914ebe5644bc4631b15466ffbaad37d83151f6af59 - languageName: node - linkType: hard - -"which@npm:^2.0.1, which@npm:^2.0.2": - version: 2.0.2 - resolution: "which@npm:2.0.2" - dependencies: - isexe: "npm:^2.0.0" - bin: - node-which: ./bin/node-which - checksum: 10c0/66522872a768b60c2a65a57e8ad184e5372f5b6a9ca6d5f033d4b0dc98aff63995655a7503b9c0a2598936f532120e81dd8cc155e2e92ed662a2b9377cc4374f - languageName: node - linkType: hard - -"which@npm:^5.0.0": - version: 5.0.0 - resolution: "which@npm:5.0.0" - dependencies: - isexe: "npm:^3.1.1" - bin: - node-which: bin/which.js - checksum: 10c0/e556e4cd8b7dbf5df52408c9a9dd5ac6518c8c5267c8953f5b0564073c66ed5bf9503b14d876d0e9c7844d4db9725fb0dcf45d6e911e17e26ab363dc3965ae7b - languageName: node - linkType: hard - -"wildcard@npm:^2.0.1": - version: 2.0.1 - resolution: "wildcard@npm:2.0.1" - checksum: 10c0/08f70cd97dd9a20aea280847a1fe8148e17cae7d231640e41eb26d2388697cbe65b67fd9e68715251c39b080c5ae4f76d71a9a69fa101d897273efdfb1b58bf7 - languageName: node - linkType: hard - -"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0, wrap-ansi@npm:^7.0.0": - version: 7.0.0 - resolution: "wrap-ansi@npm:7.0.0" - dependencies: - ansi-styles: "npm:^4.0.0" - string-width: "npm:^4.1.0" - strip-ansi: "npm:^6.0.0" - checksum: 10c0/d15fc12c11e4cbc4044a552129ebc75ee3f57aa9c1958373a4db0292d72282f54373b536103987a4a7594db1ef6a4f10acf92978f79b98c49306a4b58c77d4da - languageName: node - linkType: hard - -"wrap-ansi@npm:^8.1.0": - version: 8.1.0 - resolution: "wrap-ansi@npm:8.1.0" - dependencies: - ansi-styles: "npm:^6.1.0" - string-width: "npm:^5.0.1" - strip-ansi: "npm:^7.0.1" - checksum: 10c0/138ff58a41d2f877eae87e3282c0630fc2789012fc1af4d6bd626eeb9a2f9a65ca92005e6e69a75c7b85a68479fe7443c7dbe1eb8fbaa681a4491364b7c55c60 - languageName: node - linkType: hard - -"wrappy@npm:1": - version: 1.0.2 - resolution: "wrappy@npm:1.0.2" - checksum: 10c0/56fece1a4018c6a6c8e28fbc88c87e0fbf4ea8fd64fc6c63b18f4acc4bd13e0ad2515189786dd2c30d3eec9663d70f4ecf699330002f8ccb547e4a18231fc9f0 - languageName: node - linkType: hard - -"ws@npm:^8.18.0": - version: 8.18.0 - resolution: "ws@npm:8.18.0" - peerDependencies: - bufferutil: ^4.0.1 - utf-8-validate: ">=5.0.2" - peerDependenciesMeta: - bufferutil: - optional: true - utf-8-validate: - optional: true - checksum: 10c0/25eb33aff17edcb90721ed6b0eb250976328533ad3cd1a28a274bd263682e7296a6591ff1436d6cbc50fa67463158b062f9d1122013b361cec99a05f84680e06 - languageName: node - linkType: hard - -"ws@npm:~8.17.1": - version: 8.17.1 - resolution: "ws@npm:8.17.1" - peerDependencies: - bufferutil: ^4.0.1 - utf-8-validate: ">=5.0.2" - peerDependenciesMeta: - bufferutil: - optional: true - utf-8-validate: - optional: true - checksum: 10c0/f4a49064afae4500be772abdc2211c8518f39e1c959640457dcee15d4488628620625c783902a52af2dd02f68558da2868fd06e6fd0e67ebcd09e6881b1b5bfe - languageName: node - linkType: hard - -"xtend@npm:^4.0.2": - version: 4.0.2 - resolution: "xtend@npm:4.0.2" - checksum: 10c0/366ae4783eec6100f8a02dff02ac907bf29f9a00b82ac0264b4d8b832ead18306797e283cf19de776538babfdcb2101375ec5646b59f08c52128ac4ab812ed0e - languageName: node - linkType: hard - -"y18n@npm:^5.0.5": - version: 5.0.8 - resolution: "y18n@npm:5.0.8" - checksum: 10c0/4df2842c36e468590c3691c894bc9cdbac41f520566e76e24f59401ba7d8b4811eb1e34524d57e54bc6d864bcb66baab7ffd9ca42bf1eda596618f9162b91249 - languageName: node - linkType: hard - -"yallist@npm:^3.0.2": - version: 3.1.1 - resolution: "yallist@npm:3.1.1" - checksum: 10c0/c66a5c46bc89af1625476f7f0f2ec3653c1a1791d2f9407cfb4c2ba812a1e1c9941416d71ba9719876530e3340a99925f697142989371b72d93b9ee628afd8c1 - languageName: node - linkType: hard - -"yallist@npm:^4.0.0": - version: 4.0.0 - resolution: "yallist@npm:4.0.0" - checksum: 10c0/2286b5e8dbfe22204ab66e2ef5cc9bbb1e55dfc873bbe0d568aa943eb255d131890dfd5bf243637273d31119b870f49c18fcde2c6ffbb7a7a092b870dc90625a - languageName: node - linkType: hard - -"yallist@npm:^5.0.0": - version: 5.0.0 - resolution: "yallist@npm:5.0.0" - checksum: 10c0/a499c81ce6d4a1d260d4ea0f6d49ab4da09681e32c3f0472dee16667ed69d01dae63a3b81745a24bd78476ec4fcf856114cb4896ace738e01da34b2c42235416 - languageName: node - linkType: hard - -"yargs-parser@npm:^20.2.2": - version: 20.2.9 - resolution: "yargs-parser@npm:20.2.9" - checksum: 10c0/0685a8e58bbfb57fab6aefe03c6da904a59769bd803a722bb098bd5b0f29d274a1357762c7258fb487512811b8063fb5d2824a3415a0a4540598335b3b086c72 - languageName: node - linkType: hard - -"yargs@npm:^16.1.1": - version: 16.2.0 - resolution: "yargs@npm:16.2.0" - dependencies: - cliui: "npm:^7.0.2" - escalade: "npm:^3.1.1" - get-caller-file: "npm:^2.0.5" - require-directory: "npm:^2.1.1" - string-width: "npm:^4.2.0" - y18n: "npm:^5.0.5" - yargs-parser: "npm:^20.2.2" - checksum: 10c0/b1dbfefa679848442454b60053a6c95d62f2d2e21dd28def92b647587f415969173c6e99a0f3bab4f1b67ee8283bf735ebe3544013f09491186ba9e8a9a2b651 - languageName: node - linkType: hard - -"yn@npm:3.1.1": - version: 3.1.1 - resolution: "yn@npm:3.1.1" - checksum: 10c0/0732468dd7622ed8a274f640f191f3eaf1f39d5349a1b72836df484998d7d9807fbea094e2f5486d6b0cd2414aad5775972df0e68f8604db89a239f0f4bf7443 - languageName: node - linkType: hard diff --git a/application/client/.yarnrc.yml b/application/client/.yarnrc.yml deleted file mode 100644 index 3186f3f079..0000000000 --- a/application/client/.yarnrc.yml +++ /dev/null @@ -1 +0,0 @@ -nodeLinker: node-modules diff --git a/application/client/angular.json b/application/client/angular.json deleted file mode 100644 index cf918df0a2..0000000000 --- a/application/client/angular.json +++ /dev/null @@ -1,130 +0,0 @@ -{ - "$schema": "./node_modules/@angular/cli/lib/config/schema.json", - "version": 1, - "newProjectRoot": "projects", - "projects": { - "chipmunk": { - "projectType": "application", - "schematics": { - "@schematics/angular:component": { - "style": "less" - }, - "@schematics/angular:application": { - "strict": true - } - }, - "root": "", - "sourceRoot": "src", - "prefix": "app", - "architect": { - "build": { - "builder": "@angular-devkit/build-angular:browser", - "options": { - "outputPath": "dist/debug", - "index": "src/index.html", - "main": "src/main.ts", - "polyfills": "src/polyfills.ts", - "tsConfig": "tsconfig.app.json", - "inlineStyleLanguage": "less", - "assets": [ - "src/favicon.ico", - "src/assets" - ], - "styles": [ - "@angular/material/prebuilt-themes/indigo-pink.css", - "src/app/ui/styles/scheme.less", - "src/app/ui/styles/scheme.scss" - ], - "scripts": [] - }, - "configurations": { - "production": { - "outputPath": "dist/release", - "budgets": [ - { - "type": "initial", - "maximumWarning": "8mb", - "maximumError": "8mb" - }, - { - "type": "anyComponentStyle", - "maximumWarning": "100kb", - "maximumError": "100kb" - } - ], - "fileReplacements": [ - { - "replace": "src/environments/environment.ts", - "with": "src/environments/environment.prod.ts" - } - ], - "outputHashing": "all" - }, - "development": { - "buildOptimizer": false, - "optimization": false, - "vendorChunk": true, - "extractLicenses": false, - "sourceMap": true, - "namedChunks": true - } - }, - "defaultConfiguration": "production" - }, - "serve": { - "builder": "@angular-devkit/build-angular:dev-server", - "configurations": { - "production": { - "browserTarget": "chipmunk:build:production" - }, - "development": { - "browserTarget": "chipmunk:build:development" - } - }, - "defaultConfiguration": "development" - }, - "extract-i18n": { - "builder": "@angular-devkit/build-angular:extract-i18n", - "options": { - "browserTarget": "chipmunk:build" - } - }, - "test": { - "builder": "@angular-devkit/build-angular:karma", - "options": { - "main": "src/test.ts", - "polyfills": "src/polyfills.ts", - "tsConfig": "tsconfig.spec.json", - "karmaConfig": "karma.conf.js", - "inlineStyleLanguage": "less", - "assets": [ - "src/favicon.ico", - "src/assets" - ], - "styles": [ - "@angular/material/prebuilt-themes/indigo-pink.css", - "src/app/ui/styles/scheme.less", - "src/app/ui/styles/scheme.scss" - ], - "scripts": [] - } - }, - "lint": { - "builder": "@angular-eslint/builder:lint", - "options": { - "lintFilePatterns": [ - "src/**/*.ts", - "src/**/*.html" - ] - } - } - } - } - }, - "cli": { - "schematicCollections": [ - "@angular-eslint/schematics" - ], - "analytics": false - } -} diff --git a/application/client/eslint.config.mjs b/application/client/eslint.config.mjs deleted file mode 100644 index 717e3ceb57..0000000000 --- a/application/client/eslint.config.mjs +++ /dev/null @@ -1,51 +0,0 @@ -import typescriptEslint from "@typescript-eslint/eslint-plugin"; -import globals from "globals"; -import tsParser from "@typescript-eslint/parser"; -import path from "node:path"; -import { fileURLToPath } from "node:url"; -import js from "@eslint/js"; -import { FlatCompat } from "@eslint/eslintrc"; - -const __filename = fileURLToPath(import.meta.url); -const __dirname = path.dirname(__filename); -const compat = new FlatCompat({ - baseDirectory: __dirname, - recommendedConfig: js.configs.recommended, - allConfig: js.configs.all -}); - -export default [{ - ignores: ["dist/**/*"], -}, ...compat.extends("eslint:recommended", "plugin:@typescript-eslint/recommended"), { - plugins: { - "@typescript-eslint": typescriptEslint, - }, - - languageOptions: { - globals: { - ...globals.browser, - }, - - parser: tsParser, - ecmaVersion: "latest", - sourceType: "module", - }, - - rules: { - "no-control-regex": "off", - - "@typescript-eslint/no-unused-vars": ["error", { - "argsIgnorePattern": "^_", - "varsIgnorePattern": "^_", - "caughtErrorsIgnorePattern": "^_" - }], - "@typescript-eslint/no-this-alias": "off", - "@typescript-eslint/no-explicit-any": "off", - "@typescript-eslint/no-empty-interface": "off", - "@typescript-eslint/no-inferrable-types": "off", - "@typescript-eslint/no-unsafe-declaration-merging": "off", - "@typescript-eslint/no-unused-expressions": "off", - "@typescript-eslint/no-empty-object-type": "off" - - }, -}]; \ No newline at end of file diff --git a/application/client/package.json b/application/client/package.json deleted file mode 100644 index f6ae5106fd..0000000000 --- a/application/client/package.json +++ /dev/null @@ -1,62 +0,0 @@ -{ - "name": "chipmunk", - "version": "3.19.6", - "description": "Logs analyzer tool", - "author": "Dmitry Astafyev", - "scripts": { - "ng": "node_modules/.bin/ng", - "start": "node_modules/.bin/ng serve", - "build": "node_modules/.bin/ng build --configuration development", - "test": "node_modules/.bin/ng test", - "e2e": "node_modules/.bin/ng e2e", - "prod": "node_modules/.bin/ng build --configuration production", - "lint": "node_modules/.bin/eslint . --max-warnings=0", - "check": "node_modules/.bin/tsc -p tsconfig.json --noemit" - }, - "private": true, - "dependencies": { - "@angular/animations": "^19.0.6", - "@angular/cdk": "^19.0.5", - "@angular/common": "^19.0.6", - "@angular/compiler": "^19.0.6", - "@angular/core": "^19.0.6", - "@angular/forms": "^19.0.6", - "@angular/material": "^19.0.5", - "@angular/platform-browser": "^19.0.6", - "@angular/platform-browser-dynamic": "^19.0.6", - "@angular/router": "^19.0.6", - "globals": "^15.14.0", - "micromark": "^4.0.1", - "moment": "^2.30.1", - "moment-timezone": "^0.5.46", - "rxjs": "^7.8.0", - "tslib": "^2.6.0", - "uuid": "^11.0.5", - "zone.js": "^0.15.0" - }, - "devDependencies": { - "@angular-devkit/build-angular": "^19.0.7", - "@angular-eslint/builder": "^19.0.2", - "@angular-eslint/eslint-plugin": "^19.0.2", - "@angular-eslint/eslint-plugin-template": "^19.0.2", - "@angular-eslint/schematics": "^19.0.2", - "@angular-eslint/template-parser": "^19.0.2", - "@angular/cli": "^19.0.7", - "@angular/compiler-cli": "^19.0.6", - "@types/node": "^22.10.5", - "@types/uuid": "^10.0.0", - "@typescript-eslint/eslint-plugin": "^8.19.1", - "@typescript-eslint/parser": "^8.19.1", - "eslint": "^9.17.0", - "typescript": "5.6.3" - }, - "browserslist": [ - "last 2 Chrome versions" - ], - "browser": { - "fs": false, - "os": false, - "path": false - }, - "packageManager": "yarn@4.6.0" -} diff --git a/application/client/src/app/app.component.html b/application/client/src/app/app.component.html deleted file mode 100644 index 2db4341e72..0000000000 --- a/application/client/src/app/app.component.html +++ /dev/null @@ -1 +0,0 @@ - diff --git a/application/client/src/app/app.component.less b/application/client/src/app/app.component.less deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/application/client/src/app/app.component.ts b/application/client/src/app/app.component.ts deleted file mode 100644 index 7e34189a02..0000000000 --- a/application/client/src/app/app.component.ts +++ /dev/null @@ -1,33 +0,0 @@ -import { Component, AfterViewInit, ChangeDetectorRef, NgZone, HostBinding } from '@angular/core'; -import { Ilc, IlcInterface } from '@env/decorators/component'; -import { ChangesDetector } from '@ui/env/extentions/changes'; -import { DomSanitizer } from '@angular/platform-browser'; -import { setDomSanitizer, setNgZone } from '@ui/env/globals'; - -@Component({ - selector: 'app-root', - templateUrl: './app.component.html', - styleUrls: ['./app.component.less'], - standalone: false, -}) -@Ilc() -export class AppComponent extends ChangesDetector implements AfterViewInit { - @HostBinding('@.disabled') - public animationsDisabled = false; - - constructor(cdRef: ChangeDetectorRef, sanitizer: DomSanitizer, private ngZone: NgZone) { - super(cdRef); - setDomSanitizer(sanitizer); - } - - public ngAfterViewInit(): void { - setNgZone(this.ngZone); - this.ilc().services.system.state.setClientAsReady(); - this.ilc() - .services.system.changelogs.check() - .catch((err: Error) => { - this.log().error(`Fail to check changelogs; error: ${err.message}`); - }); - } -} -export interface AppComponent extends IlcInterface {} diff --git a/application/client/src/app/app.module.ts b/application/client/src/app/app.module.ts deleted file mode 100644 index 04ed3bbd42..0000000000 --- a/application/client/src/app/app.module.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { NgModule } from '@angular/core'; -import { BrowserModule } from '@angular/platform-browser'; -import { LayoutModule } from '@layout/module'; -import { ViewsModule } from '@views/module'; -import { ElementsModule } from '@elements/module'; -import { TabsModule } from '@ui/tabs/module'; - -import { AppComponent } from './app.component'; -import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; -import { MAT_BOTTOM_SHEET_DEFAULT_OPTIONS } from '@angular/material/bottom-sheet'; - -@NgModule({ - declarations: [AppComponent], - imports: [ - BrowserModule, - ElementsModule, - TabsModule, - LayoutModule, - ViewsModule, - BrowserAnimationsModule, - ], - providers: [{ provide: MAT_BOTTOM_SHEET_DEFAULT_OPTIONS, useValue: { hasBackdrop: false } }], - bootstrap: [AppComponent], -}) -export class AppModule {} diff --git a/application/client/src/app/env/decorators/component.ts b/application/client/src/app/env/decorators/component.ts deleted file mode 100644 index 92dcecd5e3..0000000000 --- a/application/client/src/app/env/decorators/component.ts +++ /dev/null @@ -1,132 +0,0 @@ -import { singleDecoratorFactory, DecoratorConstructor } from '@platform/env/decorators'; -import { scope } from '@platform/env/scope'; -import { Logger } from '@platform/log'; -import { getSelector } from '@env/reflect'; -import { - ilc, - Channel, - Emitter, - Declarations, - InternalAPI, - Env, - IlcInterface, - Accessor, - Life, -} from '@service/ilc'; -import { unique } from '@platform/env/sequence'; -import { Subscriber } from '@platform/env/subscription'; -import { Session, UnboundTab } from '@service/session'; - -export { Channel, Emitter, Declarations, IlcInterface, Env }; - -const UUID_KEY = '__ilc_uuid_key___'; -const instances: Map< - string, - { api: InternalAPI; env: Env; access: Accessor; life: Life; distructors: Array<() => void> } -> = new Map(); - -function getIlcInstance( - entity: any, - selector: string, -): { api: InternalAPI; env: Env; access: Accessor; life: Life } { - if (entity[UUID_KEY] === undefined) { - entity[UUID_KEY] = unique(); - } - const uuid = entity[UUID_KEY]; - let instance = instances.get(uuid); - if (instance === undefined) { - const logger = scope.getLogger(`COM: ${selector}`); - const sessions = ilc.services(selector, logger); - instance = { - distructors: [], - api: { - channel: ilc.channel(selector, logger), - emitter: ilc.emitter(selector, logger), - services: sessions, - logger, - }, - env: { - subscriber: new Subscriber(), - }, - access: { - session: (cb: (session: Session) => void): boolean => { - const inside = sessions.system.session.active().session(); - if (inside === undefined) { - return false; - } - cb(inside); - return true; - }, - unbound: (cb: (session: UnboundTab) => void): boolean => { - const inside = sessions.system.session.active().unbound(); - if (inside === undefined) { - return false; - } - cb(inside); - return true; - }, - }, - life: { - destroy: (handler: () => void) => { - const instance = instances.get(uuid); - if (instance === undefined) { - return; - } - instance.distructors.push(handler); - }, - }, - }; - instances.set(uuid, instance); - } - return instance; -} - -function removeIlcInstance(entity: any): void { - const uuid = entity[UUID_KEY]; - if (uuid === undefined) { - return; - } - const instance = instances.get(uuid); - if (instance === undefined) { - return; - } - instance.distructors.forEach((distructor) => distructor()); - instance.api.channel.destroy(); - instance.api.emitter.destroy(); - instance.env.subscriber.unsubscribe(); - instances.delete(uuid); -} - -export const Ilc = singleDecoratorFactory((constructor: DecoratorConstructor) => { - const selector: string | undefined = getSelector(constructor); - if (selector === undefined) { - throw new Error(`Fail to detect selector for angular component`); - } - constructor.prototype.log = function (): Logger { - return getIlcInstance(this, selector).api.logger; - }; - constructor.prototype.ilc = function (): InternalAPI { - return getIlcInstance(this, selector).api; - }; - constructor.prototype.env = function (): Env { - return getIlcInstance(this, selector).env; - }; - constructor.prototype.access = function (): Accessor { - return getIlcInstance(this, selector).access; - }; - constructor.prototype.life = function (): Life { - return getIlcInstance(this, selector).life; - }; - const ngOnDestroy = constructor.prototype.ngOnDestroy; - if (ngOnDestroy === undefined) { - constructor.prototype.ngOnDestroy = function () { - removeIlcInstance(this); - }; - } else { - constructor.prototype.ngOnDestroy = function () { - ngOnDestroy.call(this); - removeIlcInstance(this); - }; - } - return class extends constructor {}; -}); diff --git a/application/client/src/app/env/decorators/initial.ts b/application/client/src/app/env/decorators/initial.ts deleted file mode 100644 index 244a518277..0000000000 --- a/application/client/src/app/env/decorators/initial.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { singleDecoratorFactory, DecoratorConstructor } from '@platform/env/decorators'; -import { getComponentSelector } from '@env/reflect'; -import { scope } from '@platform/env/scope'; - -export class Components { - private _components: Map = new Map(); - - public add(selector: string, constructor: DecoratorConstructor) { - this._components.set(selector, constructor); - } - - public get(selector: string): DecoratorConstructor { - const target = this._components.get(selector); - if (target === undefined) { - throw new Error(`Fail to find initial component "${selector}"`); - } - return target; - } -} - -const components = new Components(); - -function getSelector(constructor: DecoratorConstructor): string { - const selector: string | undefined = getComponentSelector(constructor); - if (selector === undefined) { - console.log(constructor); - throw new Error(`Fail to detect selector for angular component`); - } - return selector; -} -export const Initial = singleDecoratorFactory((constructor: DecoratorConstructor) => { - const selector: string = getSelector(constructor); - components.add(selector, constructor); - scope.getLogger('@Initial').debug(`${selector} has been registered as initial`); - return class extends constructor {}; -}); - -export { components }; diff --git a/application/client/src/app/env/fsstorage.ts b/application/client/src/app/env/fsstorage.ts deleted file mode 100644 index 7c09bd6f22..0000000000 --- a/application/client/src/app/env/fsstorage.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { bridge } from '@service/bridge'; -import { Entry, EntryConvertable } from '@platform/types/storage/entry'; - -export abstract class Storage { - public abstract getStorageKey(): string; - public abstract getStorageEntry(): Entry; - - public storage(): { - save(): Promise; - load(): Promise; - } { - return { - save: (): Promise => { - return bridge - .storage(this.getStorageKey()) - .write(EntryConvertable.asStr(this.getStorageEntry())); - }, - load: (): Promise => { - return new Promise((resolve, reject) => { - bridge - .storage(this.getStorageKey()) - .read() - .then((content: string) => { - if (content.trim() === '') { - return resolve(undefined); - } - const entry = EntryConvertable.from(content); - if (entry instanceof Error) { - return reject(entry); - } - resolve(entry); - }) - .catch(reject); - }); - }, - }; - } -} diff --git a/application/client/src/app/env/logs/index.ts b/application/client/src/app/env/logs/index.ts deleted file mode 100644 index 3c8febc14a..0000000000 --- a/application/client/src/app/env/logs/index.ts +++ /dev/null @@ -1,48 +0,0 @@ -import { Logger as Base, Level, utils, state } from '@platform/log'; - -import * as Events from '@platform/ipc/event'; - -const WRITE_TO_BACKEND = [Level.ERROR, Level.WARNING, Level.DEBUG, Level.INFO, Level.VERBOS]; - -export function cutUuid(uuid: string): string { - return uuid.substring(0, 6); -} - -export class Logger extends Base { - public static backendAllowed: boolean = false; - public static backend(): { - allow(): void; - disallow(): void; - } { - return { - allow: (): void => { - Logger.backendAllowed = true; - }, - disallow: (): void => { - Logger.backendAllowed = false; - }, - }; - } - - public override store(message: string, level: Level): void { - if (!Logger.backendAllowed) { - return; - } - if (!WRITE_TO_BACKEND.includes(level)) { - return; - } - if (!state.isWritable(level)) { - return; - } - try { - Events.IpcEvent.emit( - new Events.Logs.Write.Event({ - message, - level, - }), - ); - } catch (e) { - console.error(`Fail to send to backend logs: ${utils.error(e)}`); - } - } -} diff --git a/application/client/src/app/env/reflect.ts b/application/client/src/app/env/reflect.ts deleted file mode 100644 index 1ddfeea2fc..0000000000 --- a/application/client/src/app/env/reflect.ts +++ /dev/null @@ -1,33 +0,0 @@ -import { DecoratorConstructor } from '@platform/env/decorators'; -import { getPropByPath } from '@platform/env/obj'; - -export function getSelector(constructor: DecoratorConstructor): string | undefined { - const component = getComponentSelector(constructor); - if (component !== undefined) { - return component; - } - return getDirectiveSelector(constructor); -} - -export function getComponentSelector(constructor: DecoratorConstructor): string | undefined { - const PATH = 'ɵcmp.selectors'; - const selectors = getPropByPath(constructor, PATH); - if ( - !(selectors instanceof Array) || - selectors.length === 0 || - !(selectors[0] instanceof Array) || - selectors[0].length === 0 || - typeof selectors[0][0] !== 'string' - ) { - return undefined; - } - return selectors[0][0]; -} -export function getDirectiveSelector(constructor: DecoratorConstructor): string | undefined { - const PATH = 'ɵdir.selectors'; - const selectors = getPropByPath(constructor, PATH); - if (!(selectors instanceof Array) || selectors.length === 0) { - return undefined; - } - return selectors.join('_'); -} diff --git a/application/client/src/app/env/storage.ts b/application/client/src/app/env/storage.ts deleted file mode 100644 index 82451b470f..0000000000 --- a/application/client/src/app/env/storage.ts +++ /dev/null @@ -1,24 +0,0 @@ -import { Destroy } from '@platform/types/env/types'; - -export class Storage { - private _entities: Map = new Map(); - - public destroy() { - this._entities.forEach((entity: Destroy) => { - entity.destroy(); - }); - } - - public set(uuid: string, entity: Destroy) { - this._entities.set(uuid, entity); - } - - public get(uuid: string): T | undefined { - const entity = this._entities.get(uuid); - if (entity === undefined) { - return undefined; - } else { - return entity as unknown as T; - } - } -} diff --git a/application/client/src/app/env/storages/recent/item.ts b/application/client/src/app/env/storages/recent/item.ts deleted file mode 100644 index 73549ebaee..0000000000 --- a/application/client/src/app/env/storages/recent/item.ts +++ /dev/null @@ -1,76 +0,0 @@ -import { SafeHtml } from '@angular/platform-browser'; -import { getDomSanitizer } from '@ui/env/globals'; -import { Entry, EntryConvertable } from '@platform/types/storage/entry'; -import { error } from '@platform/log/utils'; -import { Matchee } from '@module/matcher'; - -import * as obj from '@platform/env/obj'; -import * as wasm from '@loader/wasm'; - -export class Recent extends Matchee implements EntryConvertable { - public value: string = ''; - public used: number = 0; - - private _htmlValue: string = ''; - - constructor(value: string, matcher: wasm.Matcher) { - super(matcher, value !== '' ? { value: value } : undefined); - this.value = value; - } - - public html(): SafeHtml { - return getDomSanitizer().bypassSecurityTrustHtml(this._htmlValue); - } - - public setFilter() { - const value: string | undefined = this.getHtmlOf('html_value'); - this._htmlValue = value === undefined ? this.value : value; - } - - public get filtered(): boolean { - return this.getScore() > 0; - } - - public entry(): { - to(): Entry; - from(entry: Entry): Error | undefined; - hash(): string; - uuid(): string; - updated(): undefined; - } { - return { - to: (): Entry => { - return { - uuid: this.value, - content: JSON.stringify({ - value: this.value, - used: this.used, - }), - }; - }, - from: (entry: Entry): Error | undefined => { - try { - const def: { - value: string; - used: number; - } = JSON.parse(entry.content); - this.value = obj.getAsNotEmptyString(def, 'value'); - this.used = obj.getAsValidNumber(def, 'used'); - this.setItem({ value: this.value }); - } catch (e) { - return new Error(error(e)); - } - return undefined; - }, - hash: (): string => { - return `${this.value}/${this.used}`; - }, - uuid: (): string => { - return this.value; - }, - updated: (): undefined => { - return undefined; - }, - }; - } -} diff --git a/application/client/src/app/env/storages/recent/list.ts b/application/client/src/app/env/storages/recent/list.ts deleted file mode 100644 index 5143d37e00..0000000000 --- a/application/client/src/app/env/storages/recent/list.ts +++ /dev/null @@ -1,158 +0,0 @@ -import { Observable } from 'rxjs'; -import { map, startWith } from 'rxjs/operators'; -import { UntypedFormControl } from '@angular/forms'; -import { Entry, EntryConvertable } from '@platform/types/storage/entry'; -import { error } from '@platform/log/utils'; -import { Storage } from '@env/fsstorage'; -import { SetupLogger, LoggerInterface } from '@platform/entity/logger'; -import { Recent } from './item'; - -import * as wasm from '@loader/wasm'; - -@SetupLogger() -export class List extends Storage implements EntryConvertable { - public items: Recent[] = []; - public filter: string = ''; - public observer: Observable; - - protected readonly control: UntypedFormControl; - protected readonly matcher: wasm.Matcher = wasm.getBindings().Matcher.new(); - protected readonly filealias: string; - - constructor(control: UntypedFormControl, name: string, filealias: string) { - super(); - this.filealias = filealias; - this.control = control; - this.observer = control.valueChanges.pipe( - startWith(''), - map(() => []), - ); - this.setLoggerName(name); - this.storage() - .load() - .then((entry: Entry | undefined) => { - if (entry === undefined) { - return; - } - const error = this.entry().from(entry); - if (error instanceof Error) { - this.log().error(`Fail to parse loaded content: ${error.message}`); - } - this.assign(); - }) - .catch((err: Error) => { - this.log().error(`Fail to load: ${err.message}`); - }); - } - - public remove(recent: string) { - this.items = this.items.filter((r) => r.value !== recent); - this.assign(); - this.save(); - } - - public getStorageEntry(): Entry { - return this.entry().to(); - } - - public getStorageKey(): string { - return `${this.filealias}`; - } - - public update(recent: string) { - if (recent.trim() === '') { - return; - } - const item = this.items.find((i) => i.value === recent); - if (item === undefined) { - this.items.push(new Recent(recent, this.matcher)); - } else { - item.used += 1; - } - this.setFilter(''); - this.save(); - } - - public sort(items?: Recent[]) { - (items === undefined ? this.items : items).sort((a, b) => { - return a.used > b.used ? -1 : 1; - }); - } - - public setFilter(filter: string) { - this.matcher.search(filter); - this.items.sort((a: Recent, b: Recent) => b.getScore() - a.getScore()); - this.items.forEach((i) => i.setFilter()); - } - - public entry(): { - to(): Entry; - from(entry: Entry): Error | undefined; - hash(): string; - uuid(): string; - updated(): undefined; - } { - return { - to: (): Entry => { - return { - uuid: this.getStorageKey(), - content: JSON.stringify(this.items.map((r) => r.entry().to())), - }; - }, - from: (entry: Entry): Error | undefined => { - try { - const recent = JSON.parse(entry.content); - if (!(recent instanceof Array)) { - throw new Error( - `Expecting to get an array of recent. Gotten: ${typeof recent} (${recent})`, - ); - } - this.items = recent - .map((r) => { - const item = new Recent('', this.matcher); - const error = item.entry().from(r); - return error instanceof Error ? error : item; - }) - .filter((r) => r instanceof Recent) as Recent[]; - this.sort(); - } catch (e) { - return new Error(error(e)); - } - return undefined; - }, - hash: (): string => { - return this.items.map((r) => r.entry().hash()).join(';'); - }, - uuid: (): string => { - return this.getStorageKey(); - }, - updated: (): undefined => { - return undefined; - }, - }; - } - - protected save() { - this.sort(); - this.storage() - .save() - .catch((err: Error) => { - this.log().error(`Fail to save: ${err.message}`); - }); - } - - protected assign(): void { - this.observer = this.control.valueChanges.pipe( - startWith(''), - map((filter: string) => { - this.setFilter(filter); - const output = this.items.filter((i) => i.filtered); - if (output.length === this.items.length) { - this.sort(output); - } - return output; - }), - ); - } -} -export interface List extends LoggerInterface {} diff --git a/application/client/src/app/env/str.ts b/application/client/src/app/env/str.ts deleted file mode 100644 index d1203450af..0000000000 --- a/application/client/src/app/env/str.ts +++ /dev/null @@ -1,16 +0,0 @@ -export function bytesToStr(bytes: number): string { - if (bytes < 1024) { - return `${bytes} b`; - } - if (bytes < 1024 * 1024) { - return `${(bytes / 1024).toFixed(2)}Kb`; - } - if (bytes < 1024 * 1024 * 1024) { - return `${(bytes / 1024 / 1024).toFixed(2)}Mb`; - } - return `${(bytes / 1024 / 1024 / 1024).toFixed(2)}Gb`; -} - -export function timestampToUTC(ts: number): string { - return new Date(ts).toUTCString(); -} diff --git a/application/client/src/app/env/urlfilereader.ts b/application/client/src/app/env/urlfilereader.ts deleted file mode 100644 index a57340fbbe..0000000000 --- a/application/client/src/app/env/urlfilereader.ts +++ /dev/null @@ -1,49 +0,0 @@ -export class URLFileReader { - protected url: string; - protected readonly request: XMLHttpRequest = new XMLHttpRequest(); - protected done: boolean = false; - - constructor(url: string) { - this.url = url; - } - - public read( - responseType?: 'blob' | 'arraybuffer' | 'document' | 'json' | 'text', - ): Promise { - return new Promise((resolve, reject) => { - this.request.open('GET', this.url, true); - responseType !== undefined && (this.request.responseType = responseType); - this.request.send(null); - this.request.onreadystatechange = () => { - if (this.done) { - return; - } - if (this.request.readyState !== this.request.DONE) { - return; - } - this.done = true; - if (this.request.status !== 200) { - return reject(new Error(`Fail to get response`)); - } - switch (this.request.responseType) { - case 'arraybuffer': - resolve(this.request.response as ArrayBuffer); - break; - case 'blob': - resolve(this.request.response as Blob); - break; - case 'json': - resolve(this.request.response as { [key: string]: any }); - break; - case 'document': - resolve(this.request.response as Document); - break; - case 'text': - case '': - resolve(this.request.responseText); - break; - } - }; - }); - } -} diff --git a/application/client/src/app/loader/controllers.ts b/application/client/src/app/loader/controllers.ts deleted file mode 100644 index 32851cdc44..0000000000 --- a/application/client/src/app/loader/controllers.ts +++ /dev/null @@ -1,4 +0,0 @@ -/** - * @module controller - * @description Module loads all available controllers to declare it - */ diff --git a/application/client/src/app/loader/init.ts b/application/client/src/app/loader/init.ts deleted file mode 100644 index 78f501eddb..0000000000 --- a/application/client/src/app/loader/init.ts +++ /dev/null @@ -1,17 +0,0 @@ -/** - * @module init - * @description Module should be load at veery first place. This module is right place to put any init procedures - */ -import { setUuidGenerator } from '@platform/env/sequence'; -import { scope } from '@platform/env/scope'; -import { v4 } from 'uuid'; -import { Logger } from '@env/logs/index'; - -// Set globals on @platform -// Set uuid getter -setUuidGenerator(v4); -// Set logger getter -scope.setLogger(Logger); - -// Import list of services -import '@register/services'; diff --git a/application/client/src/app/loader/services.ts b/application/client/src/app/loader/services.ts deleted file mode 100644 index 0195eb91b1..0000000000 --- a/application/client/src/app/loader/services.ts +++ /dev/null @@ -1,7 +0,0 @@ -/** - * @module service - * @description Module loads all available services to declare it and make it init - */ - -import '@service/ilc'; -import '@service/api'; diff --git a/application/client/src/app/loader/system.ts b/application/client/src/app/loader/system.ts deleted file mode 100644 index cbf74be1d7..0000000000 --- a/application/client/src/app/loader/system.ts +++ /dev/null @@ -1,6 +0,0 @@ -/** - * @module system - * @description Module cares about loading of application - */ -import './services'; -import './controllers'; diff --git a/application/client/src/app/loader/wasm.ts b/application/client/src/app/loader/wasm.ts deleted file mode 100644 index 06668de1b2..0000000000 --- a/application/client/src/app/loader/wasm.ts +++ /dev/null @@ -1,36 +0,0 @@ -import { scope } from '@platform/env/scope'; - -import * as wasm_bindings from '@wasm/wasm_bindings'; - -export { Matcher } from '@wasm/wasm_bindings'; - -const wasm: { - bindings: typeof wasm_bindings | undefined; -} = { - bindings: undefined, -}; - -export function load(): Promise { - const logger = scope.getLogger('wasm'); - return Promise.all([ - import('@wasm/wasm_bindings') - .then((module) => { - wasm.bindings = module; - logger.debug(`@wasm/wasm_bindings is loaded`); - }) - .catch((err: Error) => { - logger.error(`fail to load @wasm/wasm_bindings: ${err.message}`); - }), - ]) - .catch((err: Error) => { - logger.error(`Fail to load wasm modules: ${err.message}`); - }) - .then((_) => void 0); -} - -export function getBindings(): typeof wasm_bindings { - if (wasm.bindings === undefined) { - throw new Error(`wasm module "ansi" isn't loaded`); - } - return wasm.bindings; -} diff --git a/application/client/src/app/module/ansi.ts b/application/client/src/app/module/ansi.ts deleted file mode 100644 index aebcff7f38..0000000000 --- a/application/client/src/app/module/ansi.ts +++ /dev/null @@ -1,49 +0,0 @@ -import { error } from '@platform/log/utils'; - -import * as wasm from '@loader/wasm'; - -let mapper: any = undefined; - -export function ansiToHtml(input: string): string | Error { - try { - return wasm.getBindings().convert(input); - } catch (e) { - return new Error(error(e)); - } -} - -export interface Slot { - from: number; - to: number; - color: string | null; - background: string | null; - bold: boolean; - italic: boolean; -} - -export function getAnsiMap(input: string): Slot[] | Error { - if (mapper === undefined) { - mapper = wasm.getBindings().AnsiMapper.new(); - } - try { - return mapper.get_map(input); - } catch (e) { - return new Error(error(e)); - } -} - -export function escapeAnsi(input: string): string | Error { - try { - return wasm.getBindings().escape(input); - } catch (e) { - return new Error(error(e)); - } -} - -export function safeEscapeAnsi(input: string): string { - try { - return wasm.getBindings().escape(input); - } catch (_e) { - return input; - } -} diff --git a/application/client/src/app/module/ipc.ts b/application/client/src/app/module/ipc.ts deleted file mode 100644 index 16b3dab746..0000000000 --- a/application/client/src/app/module/ipc.ts +++ /dev/null @@ -1,98 +0,0 @@ -import { Packed } from '@platform/ipc/transport/index'; - -/** - * Extends the global `window` object with the safe Electron API - * exposed from the preload script. - * - * @remarks - * This API provides a limited, secure surface for the renderer process. - * It includes IPC communication, selected web utilities, and clipboard access. - */ -declare global { - interface Window { - /** - * Namespaced Electron API exposed to the renderer. - */ - electron: { - ipc: IPC; - webUtils: WebUtils; - clipboard: Clipboard; - }; - } -} - -/** - * Checks if the `electron` API is available on the current `window` context. - * - * @returns `true` if the API is defined, otherwise `false`. - */ -export function isAvailable(): boolean { - return window.electron !== undefined && window.electron !== null; -} - -/** - * IPC communication interface exposed to the renderer. - * - * Provides methods for sending messages to the main process and - * subscribing or unsubscribing from IPC channels. - */ -export interface IPC { - /** - * Sends a message to the main process over the specified channel. - * - * @param channel - IPC channel identifier. - * @param msg - Serialized message payload. - */ - send: (channel: string, msg: Packed) => void; - - /** - * Subscribes a callback to events from the specified channel. - * - * @param channel - IPC channel identifier. - * @param callback - Function invoked with event arguments. - */ - subscribe: (channel: string, callback: (...args: any[]) => void) => void; - - /** - * Removes a previously subscribed callback from the specified channel. - * - * @param channel - IPC channel identifier. - * @param callback - Callback to be removed. - */ - unsubscribe: (channel: string, callback: (...args: any[]) => void) => void; - - /** - * Removes all listeners from the specified channel. - * - * @param channel - IPC channel identifier. - */ - unsubscribeAll: (channel: string) => void; -} - -/** - * Utilities exposed from Electron's `webUtils`. - */ -export interface WebUtils { - /** - * Resolves the absolute filesystem path for a given File object. - * - * @param file - A File object obtained in the renderer. - * @returns The absolute filesystem path. - */ - getPathForFile(file: File): string; -} - -/** - * Clipboard interface exposed to the renderer. - * - * Provides write-only access to the system clipboard via IPC. - */ -export interface Clipboard { - /** - * Writes arbitrary data into the system clipboard. - * - * @param mime - MIME type of the data (e.g. `text/plain`, `image/png`). - * @param data - Content as an ArrayBuffer. - */ - write(mime: string | undefined, data: ArrayBuffer): Promise; -} diff --git a/application/client/src/app/module/matcher/holder.ts b/application/client/src/app/module/matcher/holder.ts deleted file mode 100644 index b0c348a742..0000000000 --- a/application/client/src/app/module/matcher/holder.ts +++ /dev/null @@ -1,11 +0,0 @@ -import * as wasm from '@loader/wasm'; - -export type MatcherType = wasm.Matcher; - -export abstract class Holder { - protected readonly matcher: wasm.Matcher; - - constructor() { - this.matcher = wasm.getBindings().Matcher.new(); - } -} diff --git a/application/client/src/app/module/matcher/index.ts b/application/client/src/app/module/matcher/index.ts deleted file mode 100644 index 11f417cd14..0000000000 --- a/application/client/src/app/module/matcher/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export { Holder } from './holder'; -export { Matchee, PassiveMatchee, createPassiveMatcheeList } from './matchee'; diff --git a/application/client/src/app/module/matcher/matchee.ts b/application/client/src/app/module/matcher/matchee.ts deleted file mode 100644 index 1d3cafca1d..0000000000 --- a/application/client/src/app/module/matcher/matchee.ts +++ /dev/null @@ -1,73 +0,0 @@ -import * as wasm from '@loader/wasm'; - -export abstract class Matchee { - private _index: number | undefined; - private _matcher: wasm.Matcher; - - constructor(matcher: wasm.Matcher, item: object | undefined) { - this._matcher = matcher; - if (item !== undefined) { - this._index = this._matcher.set_item(item); - } - } - - public getScore(): number { - if (this._index === undefined) { - return 0; - } - return Number(this._matcher.get_score(this._index)); - } - - protected setItem(item: object) { - if (item !== undefined) { - this._index = this._matcher.set_item(item); - } - } - - protected getHtmlOf(key: string): string | undefined { - if (this._index === undefined) { - return undefined; - } - return this._matcher.get_html_of(this._index, key); - } -} - -export abstract class PassiveMatchee { - private _index: number | undefined; - private _matcher: wasm.Matcher; - - constructor(matcher: wasm.Matcher) { - this._matcher = matcher; - } - - public abstract asObj(): object; - - public getScore(): number { - if (this._index === undefined) { - return 0; - } - return Number(this._matcher.get_score(this._index)); - } - - public setIndex(index: number) { - this._index = index; - } - - protected getHtmlOf(key: string): string | undefined { - if (this._index === undefined) { - return undefined; - } - return this._matcher.get_html_of(this._index, key); - } -} - -export function createPassiveMatcheeList( - list: T[], - matcher: wasm.Matcher, -): T[] { - const from: number = matcher.set_items(list.map((i) => i.asObj())); - list.forEach((item, i) => { - item.setIndex(from + i); - }); - return list; -} diff --git a/application/client/src/app/module/util.ts b/application/client/src/app/module/util.ts deleted file mode 100644 index 36693389c2..0000000000 --- a/application/client/src/app/module/util.ts +++ /dev/null @@ -1,15 +0,0 @@ -import * as wasm from '@loader/wasm'; - -export function getFilterError( - filter: string, - caseSensitive: boolean, - wholeWord: boolean, - regex: boolean, -): string | undefined { - try { - const result = wasm.getBindings().get_filter_error(filter, caseSensitive, wholeWord, regex); - return typeof result !== 'string' ? undefined : result; - } catch (_e) { - return undefined; - } -} diff --git a/application/client/src/app/register/services.ts b/application/client/src/app/register/services.ts deleted file mode 100644 index 8859530eca..0000000000 --- a/application/client/src/app/register/services.ts +++ /dev/null @@ -1,169 +0,0 @@ -import { v4 } from 'uuid'; -import { Inputs } from '@platform/entity/service'; - -/** - * Central service registration table for the entire system. - * - * @remarks - * Every service in the application **must** be registered in this table with a unique name and UUID. - * The UUID serves as a persistent identity used by the dependency resolver to manage initialization - * order and inter-service communication. - * - * This registry is **mandatory**: it ensures consistent identification of services across the - * application lifecycle and guarantees correct dependency resolution. - * - * Developers must: - * - Assign a **globally unique UUID** to each service (automatically generated here via `v4()`). - * - Use the same registration entry when applying decorators like `@SetupService(...)` or `@DependOn(...)`. - * - * @example Dependency declaration - * ```ts - * @DependOn(api) // Ensures `MyNewService` is initialized after the `api` service - * @SetupService(services['my_new_service']) - * class MyNewService { ... } - * ``` - * - * @warning - * Avoid reusing UUIDs or manually copying them between services. - * UUIDs should remain stable for the life of the service type. - * - * @constant - * @public - */ -export const services: { [key: string]: Inputs } = { - system: { - name: 'System', - uuid: v4(), - }, - env: { - name: 'Env', - uuid: v4(), - }, - api: { - name: 'API', - uuid: v4(), - }, - ilc: { - name: 'ILC', - uuid: v4(), - }, - session: { - name: 'Session', - uuid: v4(), - }, - state: { - name: 'State', - uuid: v4(), - }, - jobs: { - name: 'Jobs', - uuid: v4(), - }, - files: { - name: 'Files', - uuid: v4(), - }, - bridge: { - name: 'Bridge', - uuid: v4(), - }, - recent: { - name: 'Recent', - uuid: v4(), - }, - tabs: { - name: 'Tabs', - uuid: v4(), - }, - hotkeys: { - name: 'Hotkeys', - uuid: v4(), - }, - history: { - name: 'History', - uuid: v4(), - }, - cli: { - name: 'Cli', - uuid: v4(), - }, - actions: { - name: 'Actions', - uuid: v4(), - }, - settings: { - name: 'Settings', - uuid: v4(), - }, - sys: { - name: 'Sys', - uuid: v4(), - }, - favorites: { - name: 'Favorites', - uuid: v4(), - }, - changelogs: { - name: 'Changelogs', - uuid: v4(), - }, - plugins: { - name: 'Plugins', - uuid: v4(), - }, -}; - -export const ui: { [key: string]: Inputs } = { - popup: { - name: 'Popup', - uuid: v4(), - }, - notifications: { - name: 'Notifications', - uuid: v4(), - }, - contextmenu: { - name: 'Context Menu', - uuid: v4(), - }, - layout: { - name: 'Layout state', - uuid: v4(), - }, - tabs: { - name: 'Tabs', - uuid: v4(), - }, - toolbar: { - name: 'Toolbar', - uuid: v4(), - }, - sidebar: { - name: 'Sidebar', - uuid: v4(), - }, - styles: { - name: 'Styles', - uuid: v4(), - }, - bottomsheet: { - name: 'BottomSheet', - uuid: v4(), - }, - listener: { - name: `Listener`, - uuid: v4(), - }, - lockers: { - name: `Lockers`, - uuid: v4(), - }, - filters: { - name: 'Filters', - uuid: v4(), - }, - dropfiles: { - name: 'DragAndDropFiles', - uuid: v4(), - }, -}; diff --git a/application/client/src/app/schema/content/row.ts b/application/client/src/app/schema/content/row.ts deleted file mode 100644 index e7c9767d7c..0000000000 --- a/application/client/src/app/schema/content/row.ts +++ /dev/null @@ -1,396 +0,0 @@ -import { Session } from '@service/session/session'; -import { Subject, Subscriber } from '@platform/env/subscription'; -import { Nature } from '@platform/types/content'; -import { EAlias } from '@service/session/dependencies/search/highlights/modifier'; -import { GrabbedElement } from '@platform/types/bindings/miscellaneous'; - -/** - * Declares the visual "owner" or container context in which a `Row` is rendered. - * - * @remarks - * The `Owner` enum is used to distinguish between multiple visual log consumers, - * such as the main output, search results, bookmarks, charts, and others. - * - * The concept of an "owner" is introduced to resolve event loop issues in UI logic: - * for instance, a click on a log row in the main output window should not trigger - * reactions within that same window. Instead, other views (like search results) - * can react to such events and adjust their own state accordingly. - * - * This enables synchronized behavior between components while avoiding unintended recursive updates. - * - * @enum {string} - * @public - */ -export enum Owner { - /** - * Main log output window. - */ - Output = 'Output', - - /** - * Search results view. - */ - Search = 'Search', - - /** - * Bookmark view containing marked rows. - */ - Bookmark = 'Bookmark', - - /** - * Charting window or graph view. - */ - Chart = 'Chart', - - /** - * Attachment container (e.g., linked file or artifact). - */ - Attachment = 'Attachment', - - /** - * Comment container (e.g., user-annotated row or discussion thread). - */ - Comment = 'Comment', - - /** - * Result of a nested search operation. - */ - NestedSearch = 'NestedSearch', -} - -export interface RowSrc { - content: string; - position: number; - owner: Owner; - source: number; - session: Session; - nature: Nature; -} - -const MAX_ROW_LENGTH_LIMIT = 10000; - -export interface IRow { - content: string; - position: number; - owner: Owner; - source: number; - cropped: boolean; - html: string; - color: string | undefined; - background: string | undefined; - columns: string[]; - nature: Nature; - seporator: boolean; -} - -/** - * Represents a single log entry (row) received from the backend and processed for rendering. - * - * @remarks - * Every log line from the backend is transformed into an instance of `Row`. - * This class acts as the fundamental unit for log rendering, encapsulating all required - * metadata and visual formatting attributes. It includes a reference to the owning session, - * original content, display state, highlighting, coloring, column values, and more. - * - * The renderer operates exclusively on instances of this class. - * - * @extends Subscriber - * - * @public - */ -export class Row extends Subscriber { - /** - * Removes special marker symbols (e.g., control characters) from the given string. - * - * @param str - A string potentially containing marker symbols. - * @returns A string without marker symbols. - */ - static removeMarkerSymbols(str: string): string { - return str.replaceAll(/\u0004/gi, '').replaceAll(/\u0005/gi, ''); - } - - /** - * Original raw log content. - */ - public content: string; - - /** - * Absolute position of the row within the session's data stream. - */ - public position: number; - - /** - * Identifies the visual container (e.g., output, search, chart) responsible for rendering this row. - */ - public owner: Owner; - - /** - * Numeric ID of the log source (e.g., channel, stream, or plugin source). - */ - public source: number; - - /** - * The session to which this row belongs. - */ - public session: Session; - - /** - * Indicates whether the row's content was cropped during parsing or rendering. - */ - public cropped: boolean; - - /** - * Emits when the row's rendering state is updated (e.g., bookmarked, highlighted). - * Note: content mutations are not supported and do not trigger this event. - */ - public change: Subject = new Subject(); - - /** - * Parsed and HTML-ready version of the row content, used for direct insertion into DOM. - */ - public html!: string; - - /** - * Optional text color assigned to this row. - */ - public color: string | undefined; - - /** - * Optional background color assigned to this row. - */ - public background: string | undefined; - - /** - * Optional columnar view of the row, if the session content supports tabular formatting. - */ - public columns: string[] = []; - - /** - * Describes the nature or classification of the row: - * e.g., search result, bookmark, or breadcrumb (non-matching row in mixed search output). - */ - public nature: Nature; - - /** - * When `true`, the row is rendered as a visual separator instead of a content line. - * Used primarily in breadcrumb display modes. - */ - public seporator: boolean = false; - - /** - * Flags indicating various match states of the row in relation to active search or filters. - */ - public matches: { - /** - * `true` if the row matches the current active search query. - */ - active: boolean; - - /** - * `true` if the row matches current non-search filters. - */ - filter: boolean; - - /** - * `true` if the row matches filters relevant to chart or metrics views. - */ - chart: boolean; - } = { - active: false, - filter: false, - chart: false, - }; - - protected readonly delimiter: string | undefined; - - private _hash: string = ''; - - constructor(inputs: RowSrc) { - super(); - this.nature = inputs.nature; - this.session = inputs.session; - this.cropped = inputs.content.length > MAX_ROW_LENGTH_LIMIT; - this.content = - inputs.content.length > MAX_ROW_LENGTH_LIMIT - ? `${inputs.content.substring(0, MAX_ROW_LENGTH_LIMIT)}...` - : inputs.content; - this.position = inputs.position; - this.owner = inputs.owner; - this.source = inputs.source; - this.delimiter = this.session.render.delimiter(); - this.update(); - this.register( - this.session.highlights.subjects.get().update.subscribe(() => { - this.softUpdate(); - }), - ); - } - - public destroy() { - this.change.destroy(); - this.unsubscribe(); - } - - public from(inputs: RowSrc) { - this.content !== inputs.content && (this.content = inputs.content); - this.position !== inputs.position && (this.position = inputs.position); - this.owner !== inputs.owner && (this.owner = inputs.owner); - this.source !== inputs.source && (this.source = inputs.source); - this.session.uuid() !== inputs.session.uuid() && (this.session = inputs.session); - this.nature !== inputs.nature && (this.nature = inputs.nature); - this.seporator = this.isSeporator(); - this.softUpdate(); - } - - public as(): { - grabbed(): GrabbedElement; - } { - return { - grabbed: (): GrabbedElement => { - return { - pos: this.position, - source_id: this.source, - content: this.content, - nature: 0, - }; - }, - }; - } - - public bookmark(): { - is(): boolean; - toggle(): void; - } { - return { - is: (): boolean => { - return this.session.bookmarks.has(this.position); - }, - toggle: (): void => { - this.session.bookmarks.bookmark(this); - }, - }; - } - - public select(): { - is(): boolean; - toggle(event: PointerEvent): void; - } { - return { - is: (): boolean => { - return this.session.cursor.isSelected(this.position); - }, - toggle: (event: PointerEvent): void => { - this.session.cursor.select(this.position, this.owner, event, this); - }, - }; - } - - public extending(): { - before(): void; - after(): void; - } { - return { - before: (): void => { - if (!this.nature.seporator) { - return; - } - this.session.indexed.expand(this.position).before(); - }, - after: (): void => { - if (!this.nature.seporator) { - return; - } - this.session.indexed.expand(this.position).after(); - }, - }; - } - - public serialized(): RowSrc { - return { - content: this.content, - position: this.position, - owner: this.owner, - source: this.source, - nature: this.nature, - session: this.session, - }; - } - - protected isSeporator(): boolean { - if (this.owner !== Owner.Search) { - return false; - } - return this.nature.seporator; - } - - protected hash(): string { - if (this.delimiter === undefined) { - return `${this.color};${this.background};${this.html};${this.position};${this.seporator}`; - } else { - return `${this.color};${this.background};${this.columns.join(';')};${this.position};${ - this.seporator - }`; - } - } - - protected update() { - const matches = (injected: { [key: string]: boolean }) => { - this.matches.active = injected[EAlias.Active]; - this.matches.filter = injected[EAlias.Filters]; - this.matches.chart = injected[EAlias.Charts]; - }; - if (this.delimiter === undefined) { - const parsed = this.session.highlights.parse( - this.position, - Row.removeMarkerSymbols(this.content), - this.owner, - false, - ); - matches(parsed.injected); - this.html = parsed.html; - this.color = parsed.color; - this.background = parsed.background; - } else { - this.color = undefined; - this.background = undefined; - const columnsMap: [number, number][] = []; - let cursor = 0; - this.columns = this.content.split(this.delimiter).map((str) => { - columnsMap.push([cursor, str.length]); - cursor += str.length; - return Row.removeMarkerSymbols(str); - }); - const expected = this.session.render.columns(); - if (this.columns.length > expected) { - this.columns.splice(expected - 1, this.columns.length - expected); - } else if (this.columns.length < expected) { - this.columns = this.columns.concat( - Array.from({ length: expected - this.columns.length }, () => ''), - ); - } - this.columns = this.columns.map((col, i) => { - const parsed = this.session.highlights.parse( - this.position, - col, - this.owner, - false, - { column: i, map: columnsMap }, - ); - matches(parsed.injected); - if (this.color === undefined && this.background === undefined) { - this.color = parsed.color; - this.background = parsed.background; - } - return parsed.html; - }); - } - this.seporator = this.isSeporator(); - } - - protected softUpdate() { - this.update(); - const hash = this.hash(); - this._hash !== hash && this.change.emit(); - this._hash = hash; - } -} diff --git a/application/client/src/app/schema/ids.ts b/application/client/src/app/schema/ids.ts deleted file mode 100644 index a71a3786fc..0000000000 --- a/application/client/src/app/schema/ids.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { unique } from '@platform/env/sequence'; - -export const WORKSPACE_TAB_HOME = unique(); - -export const TOOLBAR_TAB_SEARCH = unique(); -export const TOOLBAR_TAB_PRESET = unique(); -export const TOOLBAR_TAB_DETAILS = unique(); -export const TOOLBAR_TAB_CHART = unique(); - -export const SIDEBAR_TAB_OBSERVING = unique(); -export const SIDEBAR_TAB_ATTACHMENTS = unique(); -export const SIDEBAR_TAB_FILTERS = unique(); -export const SIDEBAR_TAB_COMMENTS = unique(); -export const SIDEBAR_TAB_TEAMWORK = unique(); diff --git a/application/client/src/app/schema/render/columns.ts b/application/client/src/app/schema/render/columns.ts deleted file mode 100644 index 5a00f98197..0000000000 --- a/application/client/src/app/schema/render/columns.ts +++ /dev/null @@ -1,339 +0,0 @@ -import { scope } from '@platform/env/scope'; -import { hash } from '@platform/env/str'; -import { Subject, Subjects } from '@platform/env/subscription'; -import { error } from '@platform/log/utils'; -import { bridge } from '@service/bridge'; -import { LimittedValue } from '@ui/env/entities/value.limited'; - -import * as num from '@platform/env/num'; - -export interface Header { - caption: string; - desc: string; - visible: boolean; - width: LimittedValue | undefined; - color: string | undefined; - index: number; -} - -export class Columns { - protected readonly styles: Map = new Map(); - protected readonly logger = scope.getLogger('Columns'); - protected readonly defaults: { - headers: { - caption: string; - desc: string; - }[]; - visability: boolean[] | boolean; - widths: number[]; - min: number[] | number; - max: number[] | number; - }; - protected hash!: string; - - protected setup(): void { - const headersVisability = - this.defaults.visability instanceof Array - ? this.defaults.visability - : Array.from({ length: this.defaults.headers.length }, () => true); - const maxWidths: number[] = - this.defaults.max instanceof Array - ? this.defaults.max - : (Array.from( - { length: this.defaults.headers.length }, - () => this.defaults.max, - ) as number[]); - const minWidths: number[] = - this.defaults.min instanceof Array - ? this.defaults.min - : (Array.from( - { length: this.defaults.headers.length }, - () => this.defaults.min, - ) as number[]); - this.headers.clear(); - this.styles.clear(); - this.defaults.headers.forEach( - ( - desc: { - caption: string; - desc: string; - }, - index: number, - ) => { - const header = { - caption: desc.caption, - desc: desc.desc, - width: - this.defaults.widths[index] === -1 - ? undefined - : new LimittedValue( - `column_width_${index}`, - minWidths[index], - maxWidths[index], - this.defaults.widths[index], - ), - visible: headersVisability[index], - color: undefined, - index, - }; - this.headers.set(index, header); - this.styles.set(index, {}); - }, - ); - this.update().all(); - this.hash = this.getHash(); - } - - protected getHeader(index: number): Header | undefined { - const header = this.headers.get(index); - if (header === undefined) { - this.logger.error(`Fail to find column with index=${index}`); - } - return header; - } - protected getHash(): string { - return hash( - Array.from(this.headers.values()) - .map((header) => header.caption) - .join(';'), - ).toString(); - } - protected storage(): { load(): void; save(): void } { - return { - load: () => { - bridge - .storage(this.hash) - .read() - .then((content: string) => { - if (typeof content !== 'string' || content.trim() === '') { - this.logger.debug( - `No columns data has been saved from previous sessions`, - ); - return; - } - try { - const headers = JSON.parse(content); - if (!(headers instanceof Array)) { - this.logger.error( - `Content from file does not represent Headers as an Array. Gotten: ${typeof headers}`, - ); - return; - } - if (headers.length !== this.headers.size) { - this.logger.error( - `Mismatching header count from last session. Previous: ${headers.length}; current: ${this.headers.size}.`, - ); - return; - } - Array.from(this.headers.values()).forEach( - (header: Header, index: number) => { - if (headers[index].width !== undefined) { - this.width(index).set(headers[index].width); - } - if (headers[index].color !== undefined) { - this.color(index).set(headers[index].color); - } - if (header.visible !== headers[index].visible) { - this.visibility(index).set(headers[index].visible); - } - }, - ); - this.subjects.get().restored.emit(); - } catch (err) { - this.logger.error(`Fail to parse columns data due: ${error(err)}`); - } - }) - .catch((err: Error) => - this.logger.error(`Fail to load columns data due: ${err.message}`), - ); - }, - save: () => { - bridge - .storage(this.hash) - .write( - JSON.stringify( - Array.from(this.headers.values()).map((header) => { - return { - width: - header.width === undefined ? undefined : header.width.value, - color: header.color, - visible: header.visible, - }; - }), - ), - ) - .catch((err: Error) => { - this.logger.error(`Fail to save columns data due: ${err.message}`); - }); - }, - }; - } - - public readonly headers: Map = new Map(); - public subjects: Subjects<{ - resized: Subject; - visibility: Subject; - colorize: Subject; - restored: Subject; - }> = new Subjects({ - resized: new Subject(), - visibility: new Subject(), - colorize: new Subject(), - restored: new Subject(), - }); - - constructor( - headers: { - caption: string; - desc: string; - }[], - visability: boolean[] | boolean, - widths: number[], - min: number[] | number, - max: number[] | number, - ) { - this.defaults = { - headers, - visability, - widths, - min, - max, - }; - this.setup(); - setTimeout(() => { - this.storage().load(); - }, 1000); - } - - public visibility(index: number): { - get(): boolean; - set(value?: boolean): void; - } { - const header = this.getHeader(index); - return { - get: (): boolean => { - return header === undefined ? true : header.visible; - }, - set: (value?: boolean): void => { - if (header === undefined) { - return; - } - header.visible = value === undefined ? !header.visible : value; - this.headers.set(index, header); - this.subjects.get().visibility.emit(index); - this.storage().save(); - }, - }; - } - - public color(index: number): { - get(): string | undefined; - set(color: string | undefined): void; - } { - const header = this.getHeader(index); - return { - get: (): string | undefined => { - return header === undefined ? undefined : header.color; - }, - set: (color: string | undefined): void => { - if (header === undefined) { - return; - } - header.color = color; - this.headers.set(index, header); - this.update().styles(index); - this.subjects.get().colorize.emit(index); - this.storage().save(); - }, - }; - } - - public width(index: number): { - get(): number | undefined; - set(width: number): void; - } { - const header = this.getHeader(index); - return { - get: (): number | undefined => { - return header === undefined ? undefined : header.width?.value; - }, - set: (width: number): void => { - if (header === undefined) { - return; - } - if (!num.isValid(width)) { - this.logger.error(`Fail to set column's width: invalid width (${width})`); - return; - } - header.width !== undefined && header.width.set(width); - this.headers.set(index, header); - this.update().styles(index); - this.subjects.get().resized.emit(index); - this.storage().save(); - }, - }; - } - - public update(): { - all(): void; - styles(index: number): void; - } { - return { - all: (): void => { - this.headers.forEach((_header: Header, index: number) => { - this.update().styles(index); - this.subjects.get().visibility.emit(index); - this.subjects.get().resized.emit(index); - this.subjects.get().colorize.emit(index); - }); - }, - styles: (index: number): void => { - const style = this.styles.get(index); - if (style === undefined) { - this.logger.error(`Fail to find styles of column with index=${index}`); - return; - } - const width = this.width(index).get(); - if (width === undefined) { - style['width'] = ''; - } else { - style['width'] = `${width}px`; - } - const color = this.color(index).get(); - style['color'] = color !== undefined ? color : ''; - }, - }; - } - - public style(index: number): { [key: string]: string } { - const style = this.styles.get(index); - if (style === undefined) { - this.logger.error(`Fail to find styles of column with index=${index}`); - return {}; - } - return style; - } - - public get(): { - all(): Header[]; - visible(): Header[]; - byIndex(index: number): Header | undefined; - } { - return { - all: (): Header[] => { - return Array.from(this.headers.values()); - }, - visible: (): Header[] => { - return Array.from(this.headers.values()).filter((h) => h.visible); - }, - byIndex: (index: number): Header | undefined => { - return this.getHeader(index); - }, - }; - } - - public reset(): void { - this.setup(); - this.storage().save(); - } -} diff --git a/application/client/src/app/schema/render/dlt.ts b/application/client/src/app/schema/render/dlt.ts deleted file mode 100644 index 5ca730c3f7..0000000000 --- a/application/client/src/app/schema/render/dlt.ts +++ /dev/null @@ -1,80 +0,0 @@ -import { Render } from './index'; -import { Columns } from './columns'; -import { Protocol } from '@platform/types/observe/parser/index'; - -const MIN_COLUMN_WIDTH = 30; -const MAX_COLUMN_WIDTH = 600; -// public readonly widths: number[] = [150, 80, 80, 80, 80, 80, 80, 80, 80, 80, -1]; - -export class Implementation extends Render { - public static HEADERS = [ - { - caption: 'Datetime', - desc: 'Datetime', - }, - { - caption: 'ECUID', - desc: 'ECU', - }, - { - caption: 'VERS', - desc: 'Dlt Protocol Version (VERS)', - }, - { - caption: 'SID', - desc: 'Session ID (SEID)', - }, - { - caption: 'MCNT', - desc: 'Message counter (MCNT)', - }, - { - caption: 'TMS', - desc: 'Timestamp (TMSP)', - }, - { - caption: 'EID', - desc: 'ECU', - }, - { - caption: 'APID', - desc: 'Application ID (APID)', - }, - { - caption: 'CTID', - desc: 'Context ID (CTID)', - }, - { - caption: 'MSTP', - desc: 'Message Type (MSTP)', - }, - { - caption: 'PAYLOAD', - desc: 'Payload', - }, - ]; - - constructor() { - super(); - this.setBoundEntity( - new Columns( - Implementation.HEADERS, - true, - [150, 20, 20, 20, 20, 20, 20, 20, 20, 20, -1], - MIN_COLUMN_WIDTH, - MAX_COLUMN_WIDTH, - ), - ); - } - - public override protocol(): Protocol { - return Protocol.Dlt; - } - - public override columns(): number { - return Implementation.HEADERS.length; - } - public override delimiter(): string | undefined { - return `\u0004`; - } -} diff --git a/application/client/src/app/schema/render/index.ts b/application/client/src/app/schema/render/index.ts deleted file mode 100644 index eb6013d96e..0000000000 --- a/application/client/src/app/schema/render/index.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { Protocol } from '@platform/types/observe/parser/index'; - -export interface RenderReference { - new (): Render; -} -export abstract class Render { - private _bound: T | undefined; - - abstract protocol(): Protocol; - - public delimiter(): string | undefined { - return undefined; - } - public columns(): number { - return 0; - } - public getBoundEntity(): T | undefined { - return this._bound; - } - public setBoundEntity(entity: T) { - this._bound = entity; - } -} diff --git a/application/client/src/app/schema/render/plugin.ts b/application/client/src/app/schema/render/plugin.ts deleted file mode 100644 index e00e4a2759..0000000000 --- a/application/client/src/app/schema/render/plugin.ts +++ /dev/null @@ -1,59 +0,0 @@ -import { PluginEntity } from '@platform/types/bindings'; -import { Render } from './index'; -import { Columns } from './columns'; -import { Protocol } from '@platform/types/observe/parser'; - -export class Implementation extends Render { - private _columnsCount: number = 0; - - constructor(plugin: PluginEntity) { - super(); - - if ( - typeof plugin.info.render_options === 'object' && - 'Parser' in plugin.info.render_options - ) { - const columns_options = plugin.info.render_options.Parser.columns_options; - - if (columns_options === null) { - // Render options doesn't have columns. - return; - } - - const headers: { - caption: string; - desc: string; - }[] = []; - const widths: number[] = []; - - this._columnsCount = columns_options.columns.length; - - for (const column of columns_options.columns) { - headers.push({ caption: column.caption, desc: column.description }); - widths.push(column.width); - } - - this.setBoundEntity( - new Columns( - headers, - true, - widths, - columns_options.min_width, - columns_options.max_width, - ), - ); - } - } - - override protocol(): Protocol { - return Protocol.Plugin; - } - - public override columns(): number { - return this._columnsCount; - } - - public override delimiter(): string | undefined { - return this._columnsCount > 0 ? `\u0004` : undefined; - } -} diff --git a/application/client/src/app/schema/render/someip.ts b/application/client/src/app/schema/render/someip.ts deleted file mode 100644 index 9fe995d46c..0000000000 --- a/application/client/src/app/schema/render/someip.ts +++ /dev/null @@ -1,75 +0,0 @@ -import { Render } from './index'; -import { Columns } from './columns'; -import { Protocol } from '@platform/types/observe/parser/index'; - -const MIN_COLUMN_WIDTH = 30; -const MAX_COLUMN_WIDTH = 600; - -export class Implementation extends Render { - public static HEADERS = [ - { - caption: 'SOME/IP', - desc: 'The Message-Kind.', - }, - { - caption: 'SERV', - desc: 'The Service-ID', - }, - { - caption: 'METH', - desc: 'The Method-ID', - }, - { - caption: 'LENG', - desc: 'The Length-Field', - }, - { - caption: 'CLID', - desc: 'The Client-ID', - }, - { - caption: 'SEID', - desc: 'The Session-ID', - }, - { - caption: 'IVER', - desc: 'The Interface-Version', - }, - { - caption: 'MSTP', - desc: 'The Message-Type', - }, - { - caption: 'RETC', - desc: 'The Return-Code', - }, - { - caption: 'PAYLOAD', - desc: 'Payload', - }, - ]; - - constructor() { - super(); - this.setBoundEntity( - new Columns( - Implementation.HEADERS, - true, - [50, 50, 50, 30, 30, 30, 30, 30, 30, -1], - MIN_COLUMN_WIDTH, - MAX_COLUMN_WIDTH, - ), - ); - } - - public override protocol(): Protocol { - return Protocol.SomeIp; - } - - public override columns(): number { - return Implementation.HEADERS.length; - } - public override delimiter(): string | undefined { - return `\u0004`; - } -} diff --git a/application/client/src/app/schema/render/text.ts b/application/client/src/app/schema/render/text.ts deleted file mode 100644 index 59e8ba6e35..0000000000 --- a/application/client/src/app/schema/render/text.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { Render } from './index'; -import { Protocol } from '@platform/types/observe/parser/index'; - -export class Implementation extends Render { - public override protocol(): Protocol { - return Protocol.Text; - } -} diff --git a/application/client/src/app/schema/render/tools.ts b/application/client/src/app/schema/render/tools.ts deleted file mode 100644 index c7df377451..0000000000 --- a/application/client/src/app/schema/render/tools.ts +++ /dev/null @@ -1,57 +0,0 @@ -import { Implementation as Dlt } from './dlt'; -import { Implementation as SomeIp } from './someip'; -import { Implementation as Text } from './text'; -import { Implementation as Plugin } from './plugin'; -import { Render, RenderReference } from './index'; -import { Session } from '@service/session/session'; -import { Observe } from '@platform/types/observe'; -import { plugins } from '@service/plugins'; - -import * as Parsers from '@platform/types/observe/parser/index'; - -const RENDERS: { - [key: string]: RenderReference; -} = { - [Parsers.Protocol.Dlt]: Dlt, - [Parsers.Protocol.SomeIp]: SomeIp, - [Parsers.Protocol.Text]: Text, -}; - -export async function getRender(observe: Observe): Promise | Error> { - const protocol = observe.parser.instance.alias(); - // Render options on plugins can't be static because they must be retrieved - // from the plugin itself. - if (protocol === Parsers.Protocol.Plugin) { - const config = observe.parser.as( - Parsers.Plugin.Configuration, - ); - - if (config === undefined) { - return new Error('No parser configurations for plugin.'); - } - - const pluginPath = config.configuration.plugin_path; - const parser = plugins - .list() - .preload() - .find((p) => p.info.wasm_file_path === pluginPath); - - if (parser === undefined) { - return new Error("Selected parser plugin does'n exit"); - } - - return new Plugin(parser); - } - - const Ref = RENDERS[protocol]; - return Ref === undefined ? new Error(`No render has been found for "${protocol}"`) : new Ref(); -} - -export function getLinkedProtocol(smth: Session | Render): Parsers.Protocol | Error { - return smth instanceof Session ? smth.render.protocol() : smth.protocol(); -} - -export function isRenderMatch(session: Session, render: Render): boolean | Error { - const assigned = getLinkedProtocol(session); - return assigned === render.protocol(); -} diff --git a/application/client/src/app/service/actions.ts b/application/client/src/app/service/actions.ts deleted file mode 100644 index 3fc33786c5..0000000000 --- a/application/client/src/app/service/actions.ts +++ /dev/null @@ -1,420 +0,0 @@ -import { SetupService, Interface, Implementation, register } from '@platform/entity/service'; -import { services } from '@register/services'; -import { api } from '@service/api'; -import { CancelablePromise } from '@platform/env/promise'; -import { FileType } from '@platform/types/observe/types/file'; -import { Protocol } from '@platform/types/observe/parser'; -import { Source } from '@platform/types/observe/origin/stream/index'; - -import * as Requests from '@platform/ipc/request'; -import * as handlers from '@service/actions/index'; - -@SetupService(services['actions']) -export class Service extends Implementation { - public override ready(): Promise { - this.register( - api - .transport() - .respondent( - this.getName(), - Requests.Actions.OpenFile.Request, - ( - request: Requests.Actions.OpenFile.Request, - ): CancelablePromise => { - return new CancelablePromise((resolve, _reject) => { - (() => { - switch (request.type) { - case FileType.Text: - return new handlers.FileText.Action().apply(); - case FileType.Binary: - return new handlers.FileDlt.Action().apply(); - case FileType.PcapNG: - return new handlers.FilePcap.Action().apply(); - case FileType.ParserPlugin: - return new handlers.FileParserPlugin.Action().apply(); - default: - return new handlers.FileAny.Action().apply(); - } - })() - .then(() => - resolve( - new Requests.Actions.OpenFile.Response({ - error: undefined, - }), - ), - ) - .catch((err: Error) => { - resolve( - new Requests.Actions.OpenFile.Response({ - error: err.message, - }), - ); - }); - }); - }, - ), - api - .transport() - .respondent( - this.getName(), - Requests.Actions.OpenFolder.Request, - ( - request: Requests.Actions.OpenFolder.Request, - ): CancelablePromise => { - return new CancelablePromise((resolve, _reject) => { - (() => { - switch (request.type) { - case FileType.Text: - return new handlers.FolderText.Action().apply(); - case FileType.Binary: - return new handlers.FolderDlt.Action().apply(); - case FileType.PcapNG: - return new handlers.FolderPcap.Action().apply(); - case FileType.ParserPlugin: - return new handlers.FolderParserPlugin.Action().apply(); - default: - return Promise.reject( - new Error(`Unsupported format: ${request.type}`), - ); - } - })() - .then(() => - resolve( - new Requests.Actions.OpenFolder.Response({ - error: undefined, - }), - ), - ) - .catch((err: Error) => { - resolve( - new Requests.Actions.OpenFolder.Response({ - error: err.message, - }), - ); - }); - }); - }, - ), - api - .transport() - .respondent( - this.getName(), - Requests.Actions.Stream.Request, - ( - request: Requests.Actions.Stream.Request, - ): CancelablePromise => { - return new CancelablePromise((resolve, _reject) => { - (() => { - switch (request.protocol) { - case Protocol.Text: - switch (request.source) { - case undefined: - case Source.Process: - return new handlers.StdoutText.Action().apply(); - case Source.Serial: - return new handlers.SerialText.Action().apply(); - default: - return Promise.reject( - new Error( - `Unsupported transport for Text: ${request.source}`, - ), - ); - } - case Protocol.Dlt: - switch (request.source) { - case undefined: - case Source.UDP: - return new handlers.UdpDlt.Action().apply(); - case Source.TCP: - return new handlers.TcpDlt.Action().apply(); - default: - return Promise.reject( - new Error( - `Unsupported transport for DLT: ${request.source}`, - ), - ); - } - case Protocol.Plugin: { - switch (request.source) { - case undefined: - case Source.Process: - return new handlers.StdoutPlugin.Action().apply(); - case Source.Serial: - return new handlers.SerialParserPlugin.Action().apply(); - case Source.UDP: - return new handlers.UdpParserPlugin.Action().apply(); - case Source.TCP: - return new handlers.TcpParserPlugin.Action().apply(); - default: - return Promise.reject( - new Error( - `Unsupported transport for Plugins: ${request.source}`, - ), - ); - } - } - default: - return Promise.reject( - new Error(`Unsupported format: ${request.protocol}`), - ); - } - })() - .then(() => - resolve( - new Requests.Actions.Stream.Response({ - error: undefined, - }), - ), - ) - .catch((err: Error) => { - resolve( - new Requests.Actions.Stream.Response({ - error: err.message, - }), - ); - }); - }); - }, - ), - api - .transport() - .respondent( - this.getName(), - Requests.Actions.About.Request, - ( - _request: Requests.Actions.About.Request, - ): CancelablePromise => { - return new CancelablePromise((resolve, _reject) => { - new handlers.About.Action() - .apply() - .catch((err: Error) => { - this.log().error(`Fail to call About action: ${err.message}`); - }) - .finally(() => { - resolve(new Requests.Actions.About.Response()); - }); - }); - }, - ), - api - .transport() - .respondent( - this.getName(), - Requests.Actions.ThemeDark.Request, - ( - _request: Requests.Actions.ThemeDark.Request, - ): CancelablePromise => { - return new CancelablePromise((resolve, _reject) => { - new handlers.ThemeDark.Action() - .apply() - .catch((err: Error) => { - this.log().error( - `Fail to call ThemeDark action: ${err.message}`, - ); - }) - .finally(() => { - resolve(new Requests.Actions.ThemeDark.Response()); - }); - }); - }, - ), - api - .transport() - .respondent( - this.getName(), - Requests.Actions.ThemeLight.Request, - ( - _request: Requests.Actions.ThemeLight.Request, - ): CancelablePromise => { - return new CancelablePromise((resolve, _reject) => { - new handlers.ThemeLight.Action() - .apply() - .catch((err: Error) => { - this.log().error( - `Fail to call ThemeLight action: ${err.message}`, - ); - }) - .finally(() => { - resolve(new Requests.Actions.ThemeLight.Response()); - }); - }); - }, - ), - api - .transport() - .respondent( - this.getName(), - Requests.Actions.JumpTo.Request, - ( - _request: Requests.Actions.JumpTo.Request, - ): CancelablePromise => { - return new CancelablePromise((resolve, _reject) => { - new handlers.JumpTo.Action() - .apply() - .catch((err: Error) => { - this.log().error(`Fail to call JumpTo action: ${err.message}`); - }) - .finally(() => { - resolve(new Requests.Actions.About.Response()); - }); - }); - }, - ), - api - .transport() - .respondent( - this.getName(), - Requests.Actions.FindInSearch.Request, - ( - _request: Requests.Actions.FindInSearch.Request, - ): CancelablePromise => { - return new CancelablePromise((resolve, _reject) => { - new handlers.FindInSearch.Action() - .apply() - .catch((err: Error) => { - this.log().error( - `Fail to call FindInSearch action: ${err.message}`, - ); - }) - .finally(() => { - resolve(new Requests.Actions.About.Response()); - }); - }); - }, - ), - api - .transport() - .respondent( - this.getName(), - Requests.Actions.Updates.Request, - ( - _request: Requests.Actions.Updates.Request, - ): CancelablePromise => { - return new CancelablePromise((resolve, _reject) => { - new handlers.Updates.Action() - .apply() - .catch((err: Error) => { - this.log().error(`Fail to call Updates action: ${err.message}`); - }) - .finally(() => { - resolve(new Requests.Actions.Updates.Response()); - }); - }); - }, - ), - api - .transport() - .respondent( - this.getName(), - Requests.Actions.Settings.Request, - ( - _request: Requests.Actions.Settings.Request, - ): CancelablePromise => { - return new CancelablePromise((resolve, _reject) => { - new handlers.Settings.Action() - .apply() - .catch((err: Error) => { - this.log().error( - `Fail to call Settings action: ${err.message}`, - ); - }) - .finally(() => { - resolve(new Requests.Actions.Settings.Response()); - }); - }); - }, - ), - api - .transport() - .respondent( - this.getName(), - Requests.Actions.Help.Request, - ( - _request: Requests.Actions.Help.Request, - ): CancelablePromise => { - return new CancelablePromise((resolve, _reject) => { - new handlers.Help.Action() - .apply() - .catch((err: Error) => { - this.log().error(`Fail to call Help action: ${err.message}`); - }) - .finally(() => { - resolve(new Requests.Actions.Help.Response()); - }); - }); - }, - ), - api - .transport() - .respondent( - this.getName(), - Requests.Actions.ExportSessionState.Request, - ( - _request: Requests.Actions.ExportSessionState.Request, - ): CancelablePromise => { - return new CancelablePromise((resolve, _reject) => { - new handlers.ExportSession.Action() - .apply() - .catch((err: Error) => { - this.log().error( - `Fail to call ExportSessionState action: ${err.message}`, - ); - }) - .finally(() => { - resolve(new Requests.Actions.Help.Response()); - }); - }); - }, - ), - api - .transport() - .respondent( - this.getName(), - Requests.Actions.ImportSessionState.Request, - ( - _request: Requests.Actions.ImportSessionState.Request, - ): CancelablePromise => { - return new CancelablePromise((resolve, _reject) => { - new handlers.ImportSession.Action() - .apply() - .catch((err: Error) => { - this.log().error( - `Fail to call ImportSessionState action: ${err.message}`, - ); - }) - .finally(() => { - resolve(new Requests.Actions.Help.Response()); - }); - }); - }, - ), - ); - this.register( - api - .transport() - .respondent( - this.getName(), - Requests.Actions.PluginsManager.Request, - ( - _request: Requests.Actions.PluginsManager.Request, - ): CancelablePromise => { - return new CancelablePromise((resolve, _reject) => { - new handlers.PluginsManager.Action() - .apply() - .catch((err: Error) => { - this.log().error( - `Fail to call plugins manager action: ${err.message}`, - ); - }) - .finally(() => { - resolve(new Requests.Actions.PluginsManager.Response()); - }); - }); - }, - ), - ); - return Promise.resolve(); - } -} -export interface Service extends Interface {} -export const actions = register(new Service()); diff --git a/application/client/src/app/service/actions/about.ts b/application/client/src/app/service/actions/about.ts deleted file mode 100644 index 740744cd53..0000000000 --- a/application/client/src/app/service/actions/about.ts +++ /dev/null @@ -1,33 +0,0 @@ -import { Base } from './action'; -import { popup, Vertical, Horizontal } from '@ui/service/popup'; -import { components } from '@env/decorators/initial'; - -export const ACTION_UUID = 'open_about_dialog'; - -export class Action extends Base { - public group(): number { - return 4; - } - public uuid(): string { - return ACTION_UUID; - } - - public caption(): string { - return 'About'; - } - - public async apply(): Promise { - popup.open({ - component: { - factory: components.get('app-dialogs-about'), - inputs: {}, - }, - position: { - vertical: Vertical.center, - horizontal: Horizontal.center, - }, - closeOnKey: '*', - uuid: 'About', - }); - } -} diff --git a/application/client/src/app/service/actions/action.ts b/application/client/src/app/service/actions/action.ts deleted file mode 100644 index ad029d760a..0000000000 --- a/application/client/src/app/service/actions/action.ts +++ /dev/null @@ -1,6 +0,0 @@ -export abstract class Base { - abstract uuid(): string; - abstract caption(): string; - abstract apply(): Promise; - abstract group(): number; -} diff --git a/application/client/src/app/service/actions/exit.ts b/application/client/src/app/service/actions/exit.ts deleted file mode 100644 index 711a218c75..0000000000 --- a/application/client/src/app/service/actions/exit.ts +++ /dev/null @@ -1,34 +0,0 @@ -import { Base } from './action'; -import { lockers, Locker } from '@ui/service/lockers'; - -import * as Requests from '@platform/ipc/request/index'; - -export const ACTION_UUID = 'exit_from_application'; - -export class Action extends Base { - public group(): number { - return 4; - } - public uuid(): string { - return ACTION_UUID; - } - - public caption(): string { - return 'Exit'; - } - - public async apply(): Promise { - const message = lockers.lock(new Locker(true, `Closing...`), { - closable: false, - }); - Requests.IpcRequest.send(Requests.System.Exit.Response, new Requests.System.Exit.Request()) - .then((_response) => { - message.popup.close(); - }) - .catch((err: Error) => { - lockers.lock(new Locker(false, err.message), { - closable: true, - }); - }); - } -} diff --git a/application/client/src/app/service/actions/export.session.state.ts b/application/client/src/app/service/actions/export.session.state.ts deleted file mode 100644 index 2a0ab1ba6c..0000000000 --- a/application/client/src/app/service/actions/export.session.state.ts +++ /dev/null @@ -1,42 +0,0 @@ -import { Base } from './action'; -import { session } from '@service/session'; -import { bridge } from '@service/bridge'; -import { Notification, notifications } from '@ui/service/notifications'; - -export const ACTION_UUID = 'export_session_state'; - -export class Action extends Base { - public group(): number { - return 4; - } - public uuid(): string { - return ACTION_UUID; - } - - public caption(): string { - return 'Export Current Filters'; - } - - public async apply(): Promise { - const active = session.active().session(); - if (active === undefined) { - return; - } - const snap = active.snap().get(); - const filename = await bridge.files().select.save('state', undefined); - if (filename === undefined) { - return Promise.resolve(); - } - bridge - .files() - .write(filename, snap, true) - .catch((err: Error) => { - notifications.notify( - new Notification({ - message: `Export failed with: ${err.message}`, - actions: [], - }), - ); - }); - } -} diff --git a/application/client/src/app/service/actions/file.any.ts b/application/client/src/app/service/actions/file.any.ts deleted file mode 100644 index 73d8dee9d5..0000000000 --- a/application/client/src/app/service/actions/file.any.ts +++ /dev/null @@ -1,84 +0,0 @@ -import { Base } from './action'; -import { bridge } from '@service/bridge'; -import { session } from '@service/session'; -import { TabSourceMultipleFiles } from '@ui/tabs/multiplefiles/component'; -import { File } from '@platform/types/files'; -import { FileType } from '@platform/types/observe/types/file'; - -import * as Factory from '@platform/types/observe/factory'; - -export const ACTION_UUID = 'open_any_file'; - -export class Action extends Base { - public group(): number { - return 1; - } - public uuid(): string { - return ACTION_UUID; - } - - public caption(): string { - return 'Open File(s)'; - } - - public async apply(): Promise { - const files = await bridge.files().select.any(); - if (files.length === 0) { - return Promise.resolve(); - } - if (files.length > 1) { - this.multiple(files); - return Promise.resolve(); - } else { - return this.from(files[0]); - } - } - - public from(file: File): void { - switch (file.type) { - case FileType.Binary: - case FileType.PcapNG: - case FileType.PcapLegacy: - session - .initialize() - .configure( - new Factory.File().type(file.type).file(file.filename).asDlt().get(), - ); - break; - case FileType.Text: - session - .initialize() - .observe( - new Factory.File() - .type(Factory.FileType.Text) - .file(file.filename) - .asText() - .get(), - ); - break; - case FileType.ParserPlugin: - session - .initialize() - .observe( - new Factory.File() - .type(Factory.FileType.ParserPlugin) - .file(file.filename) - .asParserPlugin() - .get(), - ); - break; - } - } - - public multiple(files: File[]) { - session.add().tab({ - name: 'Multiple Files', - active: true, - closable: true, - content: { - factory: TabSourceMultipleFiles, - inputs: { files: files }, - }, - }); - } -} diff --git a/application/client/src/app/service/actions/file.dlt.ts b/application/client/src/app/service/actions/file.dlt.ts deleted file mode 100644 index fcea279e44..0000000000 --- a/application/client/src/app/service/actions/file.dlt.ts +++ /dev/null @@ -1,46 +0,0 @@ -import { Base } from './action'; -import { bridge } from '@service/bridge'; -import { session } from '@service/session'; -import { TabSourceMultipleFiles } from '@ui/tabs/multiplefiles/component'; - -import * as Factory from '@platform/types/observe/factory'; - -export const ACTION_UUID = 'open_dlt_file'; - -export class Action extends Base { - public group(): number { - return 0; - } - public uuid(): string { - return ACTION_UUID; - } - - public caption(): string { - return 'Open DLT File'; - } - - public async apply(): Promise { - const files = await bridge.files().select.dlt(); - if (files.length === 0) { - return Promise.resolve(); - } - if (files.length > 1) { - session.add().tab({ - name: 'Multiple Files', - active: true, - closable: true, - content: { - factory: TabSourceMultipleFiles, - inputs: { files: files }, - }, - }); - } else { - session - .initialize() - .configure( - new Factory.File().type(files[0].type).file(files[0].filename).asDlt().get(), - ); - } - return Promise.resolve(); - } -} diff --git a/application/client/src/app/service/actions/file.parserPlugin.ts b/application/client/src/app/service/actions/file.parserPlugin.ts deleted file mode 100644 index 527ce7af84..0000000000 --- a/application/client/src/app/service/actions/file.parserPlugin.ts +++ /dev/null @@ -1,51 +0,0 @@ -import { Base } from './action'; -import { bridge } from '@service/bridge'; -import { session } from '@service/session'; -import { TabSourceMultipleFiles } from '@ui/tabs/multiplefiles/component'; - -import * as Factory from '@platform/types/observe/factory'; - -export const ACTION_UUID = 'open_file_parser_plugins'; - -export class Action extends Base { - public override group(): number { - return 0; - } - - public override uuid(): string { - return ACTION_UUID; - } - - public override caption(): string { - return 'Open file with parser plugins'; - } - - public override async apply(): Promise { - const files = await bridge.files().select.parserPlugin(); - if (files.length === 0) { - return Promise.resolve(); - } - if (files.length > 1) { - session.add().tab({ - name: 'Multiple Files', - active: true, - closable: true, - content: { - factory: TabSourceMultipleFiles, - inputs: { files: files }, - }, - }); - } else { - session - .initialize() - .configure( - new Factory.File() - .type(files[0].type) - .file(files[0].filename) - .asParserPlugin() - .get(), - ); - } - return Promise.resolve(); - } -} diff --git a/application/client/src/app/service/actions/file.pcap.ts b/application/client/src/app/service/actions/file.pcap.ts deleted file mode 100644 index 6cc89148de..0000000000 --- a/application/client/src/app/service/actions/file.pcap.ts +++ /dev/null @@ -1,44 +0,0 @@ -import { Base } from './action'; -import { bridge } from '@service/bridge'; -import { session } from '@service/session'; -import { TabSourceMultipleFiles } from '@ui/tabs/multiplefiles/component'; - -import * as Factory from '@platform/types/observe/factory'; - -export const ACTION_UUID = 'open_pcap_legacy_file'; - -export class Action extends Base { - public group(): number { - return 0; - } - public uuid(): string { - return ACTION_UUID; - } - - public caption(): string { - return 'Open Pcap File'; - } - - public async apply(): Promise { - const files = await bridge.files().select.pcap(); - if (files.length === 0) { - return Promise.resolve(); - } - if (files.length > 1) { - session.add().tab({ - name: 'Multiple Files', - active: true, - closable: true, - content: { - factory: TabSourceMultipleFiles, - inputs: { files: files }, - }, - }); - } else { - session - .initialize() - .configure(new Factory.File().type(files[0].type).file(files[0].filename).get()); - } - return Promise.resolve(); - } -} diff --git a/application/client/src/app/service/actions/file.pcapng.ts b/application/client/src/app/service/actions/file.pcapng.ts deleted file mode 100644 index d98dfa224a..0000000000 --- a/application/client/src/app/service/actions/file.pcapng.ts +++ /dev/null @@ -1,44 +0,0 @@ -import { Base } from './action'; -import { bridge } from '@service/bridge'; -import { session } from '@service/session'; -import { TabSourceMultipleFiles } from '@ui/tabs/multiplefiles/component'; - -import * as Factory from '@platform/types/observe/factory'; - -export const ACTION_UUID = 'open_pcap_file'; - -export class Action extends Base { - public group(): number { - return 0; - } - public uuid(): string { - return ACTION_UUID; - } - - public caption(): string { - return 'Open PcapNG File'; - } - - public async apply(): Promise { - const files = await bridge.files().select.pcapng(); - if (files.length === 0) { - return Promise.resolve(); - } - if (files.length > 1) { - session.add().tab({ - name: 'Multiple Files', - active: true, - closable: true, - content: { - factory: TabSourceMultipleFiles, - inputs: { files: files }, - }, - }); - } else { - session - .initialize() - .configure(new Factory.File().type(files[0].type).file(files[0].filename).get()); - } - return Promise.resolve(); - } -} diff --git a/application/client/src/app/service/actions/file.plugins.ts b/application/client/src/app/service/actions/file.plugins.ts deleted file mode 100644 index 527ce7af84..0000000000 --- a/application/client/src/app/service/actions/file.plugins.ts +++ /dev/null @@ -1,51 +0,0 @@ -import { Base } from './action'; -import { bridge } from '@service/bridge'; -import { session } from '@service/session'; -import { TabSourceMultipleFiles } from '@ui/tabs/multiplefiles/component'; - -import * as Factory from '@platform/types/observe/factory'; - -export const ACTION_UUID = 'open_file_parser_plugins'; - -export class Action extends Base { - public override group(): number { - return 0; - } - - public override uuid(): string { - return ACTION_UUID; - } - - public override caption(): string { - return 'Open file with parser plugins'; - } - - public override async apply(): Promise { - const files = await bridge.files().select.parserPlugin(); - if (files.length === 0) { - return Promise.resolve(); - } - if (files.length > 1) { - session.add().tab({ - name: 'Multiple Files', - active: true, - closable: true, - content: { - factory: TabSourceMultipleFiles, - inputs: { files: files }, - }, - }); - } else { - session - .initialize() - .configure( - new Factory.File() - .type(files[0].type) - .file(files[0].filename) - .asParserPlugin() - .get(), - ); - } - return Promise.resolve(); - } -} diff --git a/application/client/src/app/service/actions/file.text.ts b/application/client/src/app/service/actions/file.text.ts deleted file mode 100644 index 5517ab5dcb..0000000000 --- a/application/client/src/app/service/actions/file.text.ts +++ /dev/null @@ -1,42 +0,0 @@ -import { Base } from './action'; -import { bridge } from '@service/bridge'; -import { session } from '@service/session'; -import { TabSourceMultipleFiles } from '@ui/tabs/multiplefiles/component'; - -import * as Factory from '@platform/types/observe/factory'; - -export const ACTION_UUID = 'open_text_file'; - -export class Action extends Base { - public group(): number { - return 0; - } - public uuid(): string { - return ACTION_UUID; - } - - public caption(): string { - return 'Open Text File'; - } - - public async apply(): Promise { - const files = await bridge.files().select.text(); - if (files.length === 0) { - return Promise.resolve(); - } - if (files.length > 1) { - session.add().tab({ - name: 'Multiple Files', - active: true, - closable: true, - content: { - factory: TabSourceMultipleFiles, - inputs: { files: files }, - }, - }); - } else { - session.initialize().observe(new Factory.File().type(files[0].type).file(files[0].filename).asText().get()); - } - return Promise.resolve(); - } -} diff --git a/application/client/src/app/service/actions/find.ts b/application/client/src/app/service/actions/find.ts deleted file mode 100644 index b75359d940..0000000000 --- a/application/client/src/app/service/actions/find.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { Base } from './action'; -import { session } from '@service/session'; - -export const ACTION_UUID = 'open_find_in_search_dialog'; - -export class Action extends Base { - public group(): number { - return 4; - } - public uuid(): string { - return ACTION_UUID; - } - - public caption(): string { - return 'FindInSearch'; - } - - public async apply(): Promise { - const active = session.active().session(); - if (active === undefined) { - return; - } - active.search.state().nested().toggle(); - } -} diff --git a/application/client/src/app/service/actions/folder.any.ts b/application/client/src/app/service/actions/folder.any.ts deleted file mode 100644 index 9b2cf7cb10..0000000000 --- a/application/client/src/app/service/actions/folder.any.ts +++ /dev/null @@ -1,86 +0,0 @@ -import { Base } from './action'; -import { bridge } from '@service/bridge'; -import { session } from '@service/session'; -import { TabSourceMultipleFiles } from '@ui/tabs/multiplefiles/component'; -import { FileType } from '@platform/types/observe/types/file'; -import { notifications, Notification } from '@ui/service/notifications'; - -import * as Factory from '@platform/types/observe/factory'; - -export const ACTION_UUID = 'open_any_folder'; - -export class Action extends Base { - public group(): number { - return 1; - } - public uuid(): string { - return ACTION_UUID; - } - - public caption(): string { - return 'Open Folder(s)'; - } - - public async apply(): Promise { - const files = await bridge.folders().any(); - if (files.length === 0) { - notifications.notify( - new Notification({ - message: 'No files has been found', - actions: [], - }), - ); - return Promise.resolve(); - } - if (files.length > 1) { - session.add().tab({ - name: 'Multiple Files', - active: true, - closable: true, - content: { - factory: TabSourceMultipleFiles, - inputs: { files: files }, - }, - }); - } else { - switch (files[0].type) { - case FileType.Binary: - case FileType.PcapNG: - case FileType.PcapLegacy: - session - .initialize() - .configure( - new Factory.File() - .type(files[0].type) - .file(files[0].filename) - .asDlt() - .get(), - ); - break; - case FileType.Text: - session - .initialize() - .observe( - new Factory.File() - .type(files[0].type) - .file(files[0].filename) - .asText() - .get(), - ); - break; - case FileType.ParserPlugin: - session - .initialize() - .observe( - new Factory.File() - .type(files[0].type) - .file(files[0].filename) - .asParserPlugin() - .get(), - ); - break; - } - } - return Promise.resolve(); - } -} diff --git a/application/client/src/app/service/actions/folder.dlt.ts b/application/client/src/app/service/actions/folder.dlt.ts deleted file mode 100644 index 313d34cd89..0000000000 --- a/application/client/src/app/service/actions/folder.dlt.ts +++ /dev/null @@ -1,54 +0,0 @@ -import { Base } from './action'; -import { bridge } from '@service/bridge'; -import { session } from '@service/session'; -import { TabSourceMultipleFiles } from '@ui/tabs/multiplefiles/component'; -import { notifications, Notification } from '@ui/service/notifications'; - -import * as Factory from '@platform/types/observe/factory'; - -export const ACTION_UUID = 'open_dlt_folder'; - -export class Action extends Base { - public group(): number { - return 0; - } - public uuid(): string { - return ACTION_UUID; - } - - public caption(): string { - return 'Select Folder with DLT'; - } - - public async apply(): Promise { - const files = await bridge.folders().dlt(); - if (files.length === 0) { - notifications.notify( - new Notification({ - message: 'No files has been found', - actions: [], - }), - ); - return Promise.resolve(); - } - if (files.length > 1) { - session.add().tab({ - name: 'Multiple Files', - active: true, - closable: true, - content: { - factory: TabSourceMultipleFiles, - inputs: { files: files }, - }, - }); - return Promise.resolve(); - } else { - session - .initialize() - .configure( - new Factory.File().type(files[0].type).file(files[0].filename).asDlt().get(), - ); - } - return Promise.resolve(); - } -} diff --git a/application/client/src/app/service/actions/folder.parserPlugin.ts b/application/client/src/app/service/actions/folder.parserPlugin.ts deleted file mode 100644 index afa2fbaedc..0000000000 --- a/application/client/src/app/service/actions/folder.parserPlugin.ts +++ /dev/null @@ -1,60 +0,0 @@ -import { Base } from './action'; -import { bridge } from '@service/bridge'; -import { session } from '@service/session'; -import { notifications, Notification } from '@ui/service/notifications'; -import { TabSourceMultipleFiles } from '@ui/tabs/multiplefiles/component'; - -import * as Factory from '@platform/types/observe/factory'; - -export const ACTION_UUID = 'open_folder_parser_plugins'; - -export class Action extends Base { - public override group(): number { - return 0; - } - - public override uuid(): string { - return ACTION_UUID; - } - - public override caption(): string { - return 'Select Folder with Plugins'; - } - - public override async apply(): Promise { - const files = await bridge.folders().parserPlugin(); - if (files.length === 0) { - notifications.notify( - new Notification({ - message: 'No files has been found', - actions: [], - }), - ); - return Promise.resolve(); - } - - if (files.length > 1) { - session.add().tab({ - name: 'Multiple Files', - active: true, - closable: true, - content: { - factory: TabSourceMultipleFiles, - inputs: { files: files }, - }, - }); - } else { - session - .initialize() - .observe( - new Factory.File() - .type(files[0].type) - .file(files[0].filename) - .asParserPlugin() - .get(), - ); - } - - return Promise.resolve(); - } -} diff --git a/application/client/src/app/service/actions/folder.pcap.ts b/application/client/src/app/service/actions/folder.pcap.ts deleted file mode 100644 index 2d909ffd14..0000000000 --- a/application/client/src/app/service/actions/folder.pcap.ts +++ /dev/null @@ -1,51 +0,0 @@ -import { Base } from './action'; -import { bridge } from '@service/bridge'; -import { session } from '@service/session'; -import { TabSourceMultipleFiles } from '@ui/tabs/multiplefiles/component'; -import { notifications, Notification } from '@ui/service/notifications'; - -import * as Factory from '@platform/types/observe/factory'; - -export const ACTION_UUID = 'open_pcap_legacy_folder'; - -export class Action extends Base { - public group(): number { - return 0; - } - public uuid(): string { - return ACTION_UUID; - } - - public caption(): string { - return 'Select Folder with Pcap'; - } - - public async apply(): Promise { - const files = await bridge.folders().pcap(); - if (files.length === 0) { - notifications.notify( - new Notification({ - message: 'No files has been found', - actions: [], - }), - ); - return Promise.resolve(); - } - if (files.length > 1) { - session.add().tab({ - name: 'Multiple Files', - active: true, - closable: true, - content: { - factory: TabSourceMultipleFiles, - inputs: { files: files }, - }, - }); - } else { - session - .initialize() - .configure(new Factory.File().type(files[0].type).file(files[0].filename).get()); - } - return Promise.resolve(); - } -} diff --git a/application/client/src/app/service/actions/folder.pcapng.ts b/application/client/src/app/service/actions/folder.pcapng.ts deleted file mode 100644 index ce8ed13b81..0000000000 --- a/application/client/src/app/service/actions/folder.pcapng.ts +++ /dev/null @@ -1,51 +0,0 @@ -import { Base } from './action'; -import { bridge } from '@service/bridge'; -import { session } from '@service/session'; -import { TabSourceMultipleFiles } from '@ui/tabs/multiplefiles/component'; -import { notifications, Notification } from '@ui/service/notifications'; - -import * as Factory from '@platform/types/observe/factory'; - -export const ACTION_UUID = 'open_pcap_folder'; - -export class Action extends Base { - public group(): number { - return 0; - } - public uuid(): string { - return ACTION_UUID; - } - - public caption(): string { - return 'Select Folder with PcapNG'; - } - - public async apply(): Promise { - const files = await bridge.folders().pcapng(); - if (files.length === 0) { - notifications.notify( - new Notification({ - message: 'No files has been found', - actions: [], - }), - ); - return Promise.resolve(); - } - if (files.length > 1) { - session.add().tab({ - name: 'Multiple Files', - active: true, - closable: true, - content: { - factory: TabSourceMultipleFiles, - inputs: { files: files }, - }, - }); - } else { - session - .initialize() - .configure(new Factory.File().type(files[0].type).file(files[0].filename).get()); - } - return Promise.resolve(); - } -} diff --git a/application/client/src/app/service/actions/folder.plugins.ts b/application/client/src/app/service/actions/folder.plugins.ts deleted file mode 100644 index afa2fbaedc..0000000000 --- a/application/client/src/app/service/actions/folder.plugins.ts +++ /dev/null @@ -1,60 +0,0 @@ -import { Base } from './action'; -import { bridge } from '@service/bridge'; -import { session } from '@service/session'; -import { notifications, Notification } from '@ui/service/notifications'; -import { TabSourceMultipleFiles } from '@ui/tabs/multiplefiles/component'; - -import * as Factory from '@platform/types/observe/factory'; - -export const ACTION_UUID = 'open_folder_parser_plugins'; - -export class Action extends Base { - public override group(): number { - return 0; - } - - public override uuid(): string { - return ACTION_UUID; - } - - public override caption(): string { - return 'Select Folder with Plugins'; - } - - public override async apply(): Promise { - const files = await bridge.folders().parserPlugin(); - if (files.length === 0) { - notifications.notify( - new Notification({ - message: 'No files has been found', - actions: [], - }), - ); - return Promise.resolve(); - } - - if (files.length > 1) { - session.add().tab({ - name: 'Multiple Files', - active: true, - closable: true, - content: { - factory: TabSourceMultipleFiles, - inputs: { files: files }, - }, - }); - } else { - session - .initialize() - .observe( - new Factory.File() - .type(files[0].type) - .file(files[0].filename) - .asParserPlugin() - .get(), - ); - } - - return Promise.resolve(); - } -} diff --git a/application/client/src/app/service/actions/folder.text.ts b/application/client/src/app/service/actions/folder.text.ts deleted file mode 100644 index c7b2b1245b..0000000000 --- a/application/client/src/app/service/actions/folder.text.ts +++ /dev/null @@ -1,53 +0,0 @@ -import { Base } from './action'; -import { bridge } from '@service/bridge'; -import { session } from '@service/session'; -import { TabSourceMultipleFiles } from '@ui/tabs/multiplefiles/component'; -import { notifications, Notification } from '@ui/service/notifications'; - -import * as Factory from '@platform/types/observe/factory'; - -export const ACTION_UUID = 'open_text_folder'; - -export class Action extends Base { - public group(): number { - return 0; - } - public uuid(): string { - return ACTION_UUID; - } - - public caption(): string { - return 'Select Folder to Concat'; - } - - public async apply(): Promise { - const files = await bridge.folders().text(); - if (files.length === 0) { - notifications.notify( - new Notification({ - message: 'No files has been found', - actions: [], - }), - ); - return Promise.resolve(); - } - if (files.length > 1) { - session.add().tab({ - name: 'Multiple Files', - active: true, - closable: true, - content: { - factory: TabSourceMultipleFiles, - inputs: { files: files }, - }, - }); - } else { - session - .initialize() - .observe( - new Factory.File().type(files[0].type).file(files[0].filename).asText().get(), - ); - } - return Promise.resolve(); - } -} diff --git a/application/client/src/app/service/actions/help.ts b/application/client/src/app/service/actions/help.ts deleted file mode 100644 index 7e82cde1b4..0000000000 --- a/application/client/src/app/service/actions/help.ts +++ /dev/null @@ -1,32 +0,0 @@ -import { Base } from './action'; -import { session } from '@service/session'; -import { Help } from '@tabs/help/component'; - -export const ACTION_UUID = 'open_help_tab'; - -export class Action extends Base { - public group(): number { - return 4; - } - public uuid(): string { - return ACTION_UUID; - } - - public caption(): string { - return 'About'; - } - - public async apply(): Promise { - session.add().tab({ - name: 'Documentation', - active: true, - closable: true, - content: { - factory: Help, - inputs: {}, - }, - uuid: this.uuid(), - }); - return Promise.resolve(); - } -} diff --git a/application/client/src/app/service/actions/import.session.state.ts b/application/client/src/app/service/actions/import.session.state.ts deleted file mode 100644 index d54aad273c..0000000000 --- a/application/client/src/app/service/actions/import.session.state.ts +++ /dev/null @@ -1,48 +0,0 @@ -import { Base } from './action'; -import { session } from '@service/session'; -import { bridge } from '@service/bridge'; -import { Notification, notifications } from '@ui/service/notifications'; - -export const ACTION_UUID = 'import_session_state'; - -export class Action extends Base { - public group(): number { - return 4; - } - public uuid(): string { - return ACTION_UUID; - } - - public caption(): string { - return 'Import Filters'; - } - - public async apply(): Promise { - const active = session.active().session(); - if (active === undefined) { - return; - } - const files = await bridge.files().select.any(); - if (files.length !== 1) { - return Promise.resolve(); - } - bridge - .files() - .read(files[0].filename) - .then((content: string) => { - const err = active.snap().load(content); - if (err instanceof Error) { - return Promise.reject(err); - } - return undefined; - }) - .catch((err: Error) => { - notifications.notify( - new Notification({ - message: `Import failed with: ${err.message}`, - actions: [], - }), - ); - }); - } -} diff --git a/application/client/src/app/service/actions/index.ts b/application/client/src/app/service/actions/index.ts deleted file mode 100644 index d44640ea2d..0000000000 --- a/application/client/src/app/service/actions/index.ts +++ /dev/null @@ -1,109 +0,0 @@ -import * as FileDlt from './file.dlt'; -import * as FileText from './file.text'; -import * as FilePcap from './file.pcapng'; -import * as FilePcapLegacy from './file.pcap'; -import * as FileParserPlugin from './file.parserPlugin'; -import * as FileAny from './file.any'; -import * as FolderDlt from './folder.dlt'; -import * as FolderText from './folder.text'; -import * as FolderPcap from './folder.pcapng'; -import * as FolderPcapLegacy from './folder.pcap'; -import * as FolderParserPlugin from './folder.parserPlugin'; -import * as FolderAny from './folder.any'; -import * as UdpDlt from './udp.dlt'; -import * as UdpParserPlugin from './udp.parserPlugin'; -import * as TcpDlt from './tcp.dlt'; -import * as TcpParserPlugin from './tcp.parserPlugin'; -import * as SerialText from './serial.text'; -import * as SerialParserPlugin from './serial.parserPlugin'; -import * as StdoutText from './stdout.text'; -import * as About from './about'; -import * as JumpTo from './jumpto'; -import * as FindInSearch from './find'; -import * as Updates from './updates'; -import * as Settings from './settings'; -import * as Exit from './exit'; -import * as Help from './help'; -import * as ExportSession from './export.session.state'; -import * as ImportSession from './import.session.state'; -import * as ThemeDark from './theme.dark'; -import * as ThemeLight from './theme.light'; -import * as PluginsManager from './plugins_manager'; -import * as StdoutPlugin from './stdout.plugin'; - -import { Base } from './action'; - -export * as FileDlt from './file.dlt'; -export * as FileText from './file.text'; -export * as FilePcap from './file.pcapng'; -export * as FilePcapLegacy from './file.pcap'; -export * as FileParserPlugin from './file.parserPlugin'; -export * as FileAny from './file.any'; -export * as FolderDlt from './folder.dlt'; -export * as FolderText from './folder.text'; -export * as FolderPcap from './folder.pcapng'; -export * as FolderPcapLegacy from './folder.pcap'; -export * as FolderParserPlugin from './folder.parserPlugin'; -export * as FolderAny from './folder.any'; -export * as UdpDlt from './udp.dlt'; -export * as UdpParserPlugin from './udp.parserPlugin'; -export * as TcpDlt from './tcp.dlt'; -export * as TcpParserPlugin from './tcp.parserPlugin'; -export * as SerialText from './serial.text'; -export * as SerialParserPlugin from './serial.parserPlugin'; -export * as StdoutText from './stdout.text'; -export * as About from './about'; -export * as JumpTo from './jumpto'; -export * as FindInSearch from './find'; -export * as Updates from './updates'; -export * as Settings from './settings'; -export * as Exit from './exit'; -export * as Help from './help'; -export * as ExportSession from './export.session.state'; -export * as ImportSession from './import.session.state'; -export * as ThemeDark from './theme.dark'; -export * as ThemeLight from './theme.light'; -export * as PluginsManager from './plugins_manager'; -export * as StdoutPlugin from './stdout.plugin'; - -export { Base } from './action'; - -export const all = [ - [FileDlt.ACTION_UUID, FileDlt.Action], - [FileText.ACTION_UUID, FileText.Action], - [FilePcap.ACTION_UUID, FilePcap.Action], - [FilePcapLegacy.ACTION_UUID, FilePcapLegacy.Action], - [FileParserPlugin.ACTION_UUID, FileParserPlugin.Action], - [FileAny.ACTION_UUID, FileAny.Action], - [FolderDlt.ACTION_UUID, FolderDlt.Action], - [FolderText.ACTION_UUID, FolderText.Action], - [FolderPcap.ACTION_UUID, FolderPcap.Action], - [FolderPcapLegacy.ACTION_UUID, FolderPcapLegacy.Action], - [FolderParserPlugin.ACTION_UUID, FolderParserPlugin.Action], - [FolderAny.ACTION_UUID, FolderAny.Action], - [UdpDlt.ACTION_UUID, UdpDlt.Action], - [UdpParserPlugin.ACTION_UUID, UdpParserPlugin.Action], - [TcpDlt.ACTION_UUID, TcpDlt.Action], - [TcpParserPlugin.ACTION_UUID, TcpParserPlugin.Action], - [SerialText.ACTION_UUID, SerialText.Action], - [SerialParserPlugin.ACTION_UUID, SerialParserPlugin.Action], - [StdoutText.ACTION_UUID, StdoutText.Action], - [About.ACTION_UUID, About.Action], - [JumpTo.ACTION_UUID, JumpTo.Action], - [FindInSearch.ACTION_UUID, FindInSearch.Action], - [Updates.ACTION_UUID, Updates.Action], - [Settings.ACTION_UUID, Settings.Action], - [Help.ACTION_UUID, Help.Action], - [Exit.ACTION_UUID, Exit.Action], - [ExportSession.ACTION_UUID, ExportSession.Action], - [ImportSession.ACTION_UUID, ImportSession.Action], - [ThemeDark.ACTION_UUID, ThemeDark.Action], - [ThemeLight.ACTION_UUID, ThemeLight.Action], - [PluginsManager.ACTION_UUID, PluginsManager.Action], - [StdoutPlugin.ACTION_UUID, StdoutPlugin.Action], -]; - -export function getActionByUuid(uuid: string): Base | undefined { - const action = all.find((d) => d[0] === uuid); - return action === undefined ? undefined : new (action[1] as { new (): Base })(); -} diff --git a/application/client/src/app/service/actions/jumpto.ts b/application/client/src/app/service/actions/jumpto.ts deleted file mode 100644 index 7c3835be90..0000000000 --- a/application/client/src/app/service/actions/jumpto.ts +++ /dev/null @@ -1,39 +0,0 @@ -import { Base } from './action'; -import { popup, Vertical, Horizontal } from '@ui/service/popup'; -import { components } from '@env/decorators/initial'; -import { session } from '@service/session'; - -export const ACTION_UUID = 'open_jumpto_dialog'; - -export class Action extends Base { - public group(): number { - return 4; - } - public uuid(): string { - return ACTION_UUID; - } - - public caption(): string { - return 'JumpTo'; - } - - public async apply(): Promise { - if (session.active().session() === undefined) { - return; - } - popup.open({ - component: { - factory: components.get('app-dialogs-jumpto'), - inputs: {}, - }, - position: { - vertical: Vertical.top, - horizontal: Horizontal.center, - }, - closeOnKey: 'Escape', - width: 350, - uuid: 'Ctrl + G', - blur: false, - }); - } -} diff --git a/application/client/src/app/service/actions/plugins_manager.ts b/application/client/src/app/service/actions/plugins_manager.ts deleted file mode 100644 index 27dbb832f8..0000000000 --- a/application/client/src/app/service/actions/plugins_manager.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { Base } from './action'; -import { session } from '@service/session'; -import { PluginsManager } from '@tabs/plugins/component'; - -export const ACTION_UUID = 'open_plugins_manager_tab'; - -export class Action extends Base { - override uuid(): string { - return ACTION_UUID; - } - override caption(): string { - return 'Plugins Manager'; - } - override group(): number { - return 0; - } - - override apply(): Promise { - session.add().tab({ - name: 'Plugins Manager', - active: true, - closable: true, - content: { - factory: PluginsManager, - inputs: {}, - }, - uuid: this.uuid(), - }); - return Promise.resolve(); - } -} diff --git a/application/client/src/app/service/actions/serial.parserPlugin.ts b/application/client/src/app/service/actions/serial.parserPlugin.ts deleted file mode 100644 index 2035e76b6d..0000000000 --- a/application/client/src/app/service/actions/serial.parserPlugin.ts +++ /dev/null @@ -1,24 +0,0 @@ -import { Base } from './action'; -import { session } from '@service/session'; - -import * as Factory from '@platform/types/observe/factory'; - -export const ACTION_UUID = 'stream_parser_plugin_on_serial'; - -export class Action extends Base { - public group(): number { - return 3; - } - public uuid(): string { - return ACTION_UUID; - } - - public caption(): string { - return 'Plain text on parser plugin'; - } - - public async apply(): Promise { - session.initialize().configure(new Factory.Stream().asParserPlugin().serial().get()); - return Promise.resolve(); - } -} diff --git a/application/client/src/app/service/actions/serial.text.ts b/application/client/src/app/service/actions/serial.text.ts deleted file mode 100644 index a956150c14..0000000000 --- a/application/client/src/app/service/actions/serial.text.ts +++ /dev/null @@ -1,24 +0,0 @@ -import { Base } from './action'; -import { session } from '@service/session'; - -import * as Factory from '@platform/types/observe/factory'; - -export const ACTION_UUID = 'stream_text_on_serial'; - -export class Action extends Base { - public group(): number { - return 3; - } - public uuid(): string { - return ACTION_UUID; - } - - public caption(): string { - return 'Plain text on Serial Port'; - } - - public async apply(): Promise { - session.initialize().configure(new Factory.Stream().asText().serial().get()); - return Promise.resolve(); - } -} diff --git a/application/client/src/app/service/actions/settings.ts b/application/client/src/app/service/actions/settings.ts deleted file mode 100644 index fb20422908..0000000000 --- a/application/client/src/app/service/actions/settings.ts +++ /dev/null @@ -1,32 +0,0 @@ -import { Base } from './action'; -import { session } from '@service/session'; -import { Settings } from '@tabs/settings/component'; - -export const ACTION_UUID = 'open_settings_tab'; - -export class Action extends Base { - public group(): number { - return 0; - } - public uuid(): string { - return ACTION_UUID; - } - - public caption(): string { - return 'Settings'; - } - - public async apply(): Promise { - session.add().tab({ - name: 'Settings', - active: true, - closable: true, - content: { - factory: Settings, - inputs: {}, - }, - uuid: this.uuid(), - }); - return Promise.resolve(); - } -} diff --git a/application/client/src/app/service/actions/stdout.plugin.ts b/application/client/src/app/service/actions/stdout.plugin.ts deleted file mode 100644 index 4b43679912..0000000000 --- a/application/client/src/app/service/actions/stdout.plugin.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { Base } from './action'; -import { session } from '@service/session'; - -import * as Factory from '@platform/types/observe/factory'; - -export const ACTION_UUID = 'stream_text_on_plugin'; - -export class Action extends Base { - public override group(): number { - return 3; - } - - public override uuid(): string { - return ACTION_UUID; - } - public override caption(): string { - return 'Execute command with plugins'; - } - public override apply(): Promise { - session.initialize().configure(new Factory.Stream().process().asParserPlugin().get()); - return Promise.resolve(); - } -} diff --git a/application/client/src/app/service/actions/stdout.text.ts b/application/client/src/app/service/actions/stdout.text.ts deleted file mode 100644 index b1e31c4c0b..0000000000 --- a/application/client/src/app/service/actions/stdout.text.ts +++ /dev/null @@ -1,24 +0,0 @@ -import { Base } from './action'; -import { session } from '@service/session'; - -import * as Factory from '@platform/types/observe/factory'; - -export const ACTION_UUID = 'stream_text_on_stdout'; - -export class Action extends Base { - public group(): number { - return 3; - } - public uuid(): string { - return ACTION_UUID; - } - - public caption(): string { - return 'Execute command'; - } - - public async apply(): Promise { - session.initialize().configure(new Factory.Stream().asText().process().get()); - return Promise.resolve(); - } -} diff --git a/application/client/src/app/service/actions/storage.ts b/application/client/src/app/service/actions/storage.ts deleted file mode 100644 index 999bc74807..0000000000 --- a/application/client/src/app/service/actions/storage.ts +++ /dev/null @@ -1,110 +0,0 @@ -import { EntryConvertable, Entry } from '@platform/types/storage/entry'; -import { Subject } from '@platform/env/subscription'; -import { error } from '@platform/log/utils'; -import { bridge } from '@service/bridge'; -import { getActionByUuid, Base } from './index'; - -import * as obj from '@platform/env/obj'; - -export class Storage extends EntryConvertable { - static STORAGE_KEY = 'pinned_actions'; - static ENTITY_UUID = 'actions'; - - public pinned: string[] = []; - public updated: Subject = new Subject(); - - public destroy() { - this.updated.destroy(); - } - - public isPinned(uuid: string): boolean { - return this.pinned.includes(uuid); - } - - public get(): Base[] { - return this.pinned - .map((uuid) => getActionByUuid(uuid)) - .filter((i) => i !== undefined) as Base[]; - } - - public toggle(uuid: string) { - const index = this.pinned.indexOf(uuid); - if (index === -1) { - this.pinned.push(uuid); - } else { - this.pinned.splice(index, 1); - } - this.save(); - this.updated.emit(); - } - - public load() { - bridge - .entries({ key: Storage.STORAGE_KEY }) - .get() - .then((entry: Entry[]) => { - if (entry.length !== 1) { - return; - } - const error = this.entry().from(entry[0]); - if (error instanceof Error) { - console.error(error); - } else { - this.updated.emit(); - } - }) - .catch((err: Error) => { - console.error(err); - }); - } - - public save() { - bridge - .entries({ key: Storage.STORAGE_KEY }) - .overwrite([this.entry().to()]) - .catch((err: Error) => { - console.error(err); - }); - } - - public entry(): { - to(): Entry; - from(entry: Entry): Error | undefined; - hash(): string; - uuid(): string; - updated(): Subject | undefined; - } { - return { - to: (): Entry => { - return { - uuid: Storage.ENTITY_UUID, - content: JSON.stringify({ - value: this.pinned, - used: 0, - }), - }; - }, - from: (entry: Entry): Error | undefined => { - try { - const def: { - value: string; - used: number; - } = JSON.parse(entry.content); - this.pinned = obj.getAsArray(def, 'value'); - } catch (e) { - return new Error(error(e)); - } - return undefined; - }, - hash: (): string => { - return this.pinned.join(','); - }, - uuid: (): string => { - return Storage.ENTITY_UUID; - }, - updated: (): undefined => { - return undefined; - }, - }; - } -} diff --git a/application/client/src/app/service/actions/tcp.dlt.ts b/application/client/src/app/service/actions/tcp.dlt.ts deleted file mode 100644 index 24ff06a942..0000000000 --- a/application/client/src/app/service/actions/tcp.dlt.ts +++ /dev/null @@ -1,24 +0,0 @@ -import { Base } from './action'; -import { session } from '@service/session'; - -import * as Factory from '@platform/types/observe/factory'; - -export const ACTION_UUID = 'stream_dlt_on_tcp'; - -export class Action extends Base { - public group(): number { - return 3; - } - public uuid(): string { - return ACTION_UUID; - } - - public caption(): string { - return 'DLT on TCP'; - } - - public async apply(): Promise { - session.initialize().configure(new Factory.Stream().tcp().asDlt().get()); - return Promise.resolve(); - } -} diff --git a/application/client/src/app/service/actions/tcp.parserPlugin.ts b/application/client/src/app/service/actions/tcp.parserPlugin.ts deleted file mode 100644 index b46f13412c..0000000000 --- a/application/client/src/app/service/actions/tcp.parserPlugin.ts +++ /dev/null @@ -1,24 +0,0 @@ -import { Base } from './action'; -import { session } from '@service/session'; - -import * as Factory from '@platform/types/observe/factory'; - -export const ACTION_UUID = 'stream_parser_plugin_on_tcp'; - -export class Action extends Base { - public group(): number { - return 3; - } - public uuid(): string { - return ACTION_UUID; - } - - public caption(): string { - return 'Parser plugin on TCP'; - } - - public async apply(): Promise { - session.initialize().configure(new Factory.Stream().tcp().asParserPlugin().get()); - return Promise.resolve(); - } -} diff --git a/application/client/src/app/service/actions/theme.dark.ts b/application/client/src/app/service/actions/theme.dark.ts deleted file mode 100644 index b129d46014..0000000000 --- a/application/client/src/app/service/actions/theme.dark.ts +++ /dev/null @@ -1,21 +0,0 @@ -import { Base } from './action'; -import { styles } from '@ui/service/styles'; - -export const ACTION_UUID = 'switch_to_dark_theme'; - -export class Action extends Base { - public group(): number { - return 4; - } - public uuid(): string { - return ACTION_UUID; - } - - public caption(): string { - return 'Dark Theme'; - } - - public async apply(): Promise { - styles.theme().dark(); - } -} diff --git a/application/client/src/app/service/actions/theme.light.ts b/application/client/src/app/service/actions/theme.light.ts deleted file mode 100644 index 456115c967..0000000000 --- a/application/client/src/app/service/actions/theme.light.ts +++ /dev/null @@ -1,21 +0,0 @@ -import { Base } from './action'; -import { styles } from '@ui/service/styles'; - -export const ACTION_UUID = 'switch_to_light_theme'; - -export class Action extends Base { - public group(): number { - return 4; - } - public uuid(): string { - return ACTION_UUID; - } - - public caption(): string { - return 'Light Theme'; - } - - public async apply(): Promise { - styles.theme().light(); - } -} diff --git a/application/client/src/app/service/actions/udp.dlt.ts b/application/client/src/app/service/actions/udp.dlt.ts deleted file mode 100644 index a62a086c3b..0000000000 --- a/application/client/src/app/service/actions/udp.dlt.ts +++ /dev/null @@ -1,24 +0,0 @@ -import { Base } from './action'; -import { session } from '@service/session'; - -import * as Factory from '@platform/types/observe/factory'; - -export const ACTION_UUID = 'stream_dlt_on_udp'; - -export class Action extends Base { - public group(): number { - return 3; - } - public uuid(): string { - return ACTION_UUID; - } - - public caption(): string { - return 'DLT on UDP'; - } - - public async apply(): Promise { - session.initialize().configure(new Factory.Stream().udp().asDlt().get()); - return Promise.resolve(); - } -} diff --git a/application/client/src/app/service/actions/udp.parserPlugin.ts b/application/client/src/app/service/actions/udp.parserPlugin.ts deleted file mode 100644 index 44f0faba6b..0000000000 --- a/application/client/src/app/service/actions/udp.parserPlugin.ts +++ /dev/null @@ -1,24 +0,0 @@ -import { Base } from './action'; -import { session } from '@service/session'; - -import * as Factory from '@platform/types/observe/factory'; - -export const ACTION_UUID = 'stream_parser_plugin_on_udp'; - -export class Action extends Base { - public group(): number { - return 3; - } - public uuid(): string { - return ACTION_UUID; - } - - public caption(): string { - return 'Parser Plugin on UDP'; - } - - public async apply(): Promise { - session.initialize().configure(new Factory.Stream().udp().asParserPlugin().get()); - return Promise.resolve(); - } -} diff --git a/application/client/src/app/service/actions/updates.ts b/application/client/src/app/service/actions/updates.ts deleted file mode 100644 index ed83b69906..0000000000 --- a/application/client/src/app/service/actions/updates.ts +++ /dev/null @@ -1,46 +0,0 @@ -import { Base } from './action'; -import { lockers, Locker } from '@ui/service/lockers'; - -import * as Requests from '@platform/ipc/request/index'; - -export const ACTION_UUID = 'check_updates_dialog'; - -export class Action extends Base { - public group(): number { - return 4; - } - public uuid(): string { - return ACTION_UUID; - } - - public caption(): string { - return 'Check for Updates'; - } - - public async apply(): Promise { - const message = lockers.lock(new Locker(true, `Checking for updates...`), { - closable: false, - }); - Requests.IpcRequest.send( - Requests.System.CheckUpdates.Response, - new Requests.System.CheckUpdates.Request(), - ) - .then((response) => { - message.popup.close(); - lockers.lock( - new Locker( - false, - response.report !== undefined ? response.report : response.error, - ), - { - closable: true, - }, - ); - }) - .catch((err: Error) => { - lockers.lock(new Locker(false, err.message), { - closable: true, - }); - }); - } -} diff --git a/application/client/src/app/service/api.ts b/application/client/src/app/service/api.ts deleted file mode 100644 index c73657489f..0000000000 --- a/application/client/src/app/service/api.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { SetupService, Interface, Implementation, register } from '@platform/entity/service'; -import { Transport } from '@platform/ipc/transport/index'; -import { Implementation as ElectronTransport } from './api/transport/electron'; -import { services } from '@register/services'; -import { scope } from '@platform/env/scope'; -import { Logger } from '@env/logs/index'; - -@SetupService(services['api']) -export class Service extends Implementation { - private _transport: Transport = new ElectronTransport(); - - public override init(): Promise { - scope.setTransport(this._transport); - Logger.backend().allow(); - return Promise.resolve(); - } - - public override destroy(): Promise { - Logger.backend().disallow(); - this._transport.destroy(); - return Promise.resolve(); - } - - public transport(): Transport { - return this._transport; - } -} -export interface Service extends Interface {} -export const api = register(new Service()); diff --git a/application/client/src/app/service/api/transport/electron.ts b/application/client/src/app/service/api/transport/electron.ts deleted file mode 100644 index f33c988dc9..0000000000 --- a/application/client/src/app/service/api/transport/electron.ts +++ /dev/null @@ -1,516 +0,0 @@ -/** - * Provides the IPC transport implementation for duplex communication - * between the frontend and the Electron backend. - * - * This transport supports the following interaction modes: - * - Sending requests to the backend and awaiting a response. - * - Sending fire-and-forget events to the backend (without delivery confirmation). - * - Subscribing to events emitted by the backend. - * - Subscribing to requests initiated by the backend. - * - * @remarks - * Fire-and-forget events do not generate any acknowledgment - neither the client - * nor the backend confirms their receipt. However, the logging system is designed - * to detect and warn about the following cases: - * - The backend sends a request, but no corresponding request handler exists on the client. - * - The backend emits an event, but there are no listeners registered on the client. - * - Likewise, if the client sends events or requests without registered consumers on the backend. - * - * Since all event subscriptions and request handlers are registered during the application - * initialization phase, developers should carefully monitor these warnings in logs. Such messages - * may indicate: - * - An initialization order issue where some components are not yet ready when communication starts. - * - A partially completed refactoring in which obsolete events or requests are still being sent. - * - * All events, requests, and responses between the client and backend are defined in a central location: - * `application/platform/ipc`. To introduce a new message type, it must first be declared there. - * - * @module - * @internal - */ -import { - Transport, - EntityConstructor, - Respond, - ISignatureRequirement, - Package, - Packed, - Errors, -} from '@platform/ipc/transport/index'; -import { error } from '@platform/log/utils'; -import { Subject, Subscription } from '@platform/env/subscription'; -import { IPC, isAvailable } from '@module/ipc'; -import { Logger } from '@log/index'; -import { getNgZoneSafly } from '@ui/env/globals'; - -import * as events from '@platform/ipc/setup/channels'; - -// If some request takes more than LONG_REQUEST_ALERT (ms), -// warn message will be logged -const LONG_REQUEST_ALERT = 2000; - -/** - * Returns the implementation of the IPC transport or throws an error if it is not available. - * - * @remarks - * This error is considered critical and is treated as a client-side panic, - * since the application cannot function without a working IPC layer. - * This typically indicates a misconfigured or missing integration with the Electron backend. - * - * @throws {Error} Thrown if no IPC transport is found on the `window.electron` object. - * - * @returns {IPC} The IPC transport implementation. - * - * @internal - */ -function ipc(): IPC { - if (isAvailable()) { - return window.electron.ipc; - } else { - throw new Error(`No IPC transport has been found`); - } -} - -interface IEventDesc { - subject: Subject; - ref: EntityConstructor & ISignatureRequirement; -} - -interface PendingEntity { - resolver: (...args: any[]) => void; - rejector: (error: Error | Errors.RustNativeError) => void; - ref: EntityConstructor & ISignatureRequirement; - sent: number; -} - -/** - * IPC transport wrapper around the native Electron IPC interface. - * - * @remarks - * This class is responsible for: - * - Tracking pending request–response pairs using an internal queue. - * - Dispatching received messages to the appropriate subscribers. - * - Logging warnings about unhandled events or unmatched request handlers. - * - * It extends a base `Transport` class and serves as the main implementation - * for communication with the Electron backend in duplex mode. - * - * @internal - */ -export class Implementation extends Transport { - /** - * A registry of known event types and their metadata. - * Used to validate and route incoming messages. - */ - private _subjects: Map = new Map(); - - /** - * Internal logger instance scoped to this transport. - */ - private _log: Logger = new Logger('ElectronAPITransport'); - - /** - * Sequence number used to uniquely identify outgoing requests. - */ - private _sequence = 0; - - /** - * Tracks all pending requests waiting for responses. - * Maps sequence numbers to their associated state and handlers. - */ - private _requests: Map = new Map(); - - /** - * Handlers for backend-initiated requests. - * Each entry includes the owning module, a responder function, - * and a reference to the expected request signature. - */ - private _respondents: Map< - string, - { - owner: string; - respond: Respond; - ref: EntityConstructor & ISignatureRequirement; - } - > = new Map(); - - /** - * Indicates whether the transport has been destroyed. - * Once destroyed, no further communication is possible. - */ - private _destroyed: boolean = false; - - constructor() { - super(); - this._onHostEvent = this._onHostEvent.bind(this); - this._onHostRequest = this._onHostRequest.bind(this); - this._onHostResponse = this._onHostResponse.bind(this); - ipc().subscribe(events.HOST_EVENT_NAME, this._onHostEvent); - ipc().subscribe(events.HOST_REQUEST_NAME, this._onHostRequest); - ipc().subscribe(events.HOST_RESPONSE_NAME, this._onHostResponse); - } - - public destroy(): void { - ipc().unsubscribeAll(events.HOST_EVENT_NAME); - ipc().unsubscribeAll(events.HOST_REQUEST_NAME); - ipc().unsubscribeAll(events.HOST_RESPONSE_NAME); - this._requests.forEach((request) => { - request.rejector(new Error(`Rejected because transport is destroying`)); - }); - this._requests.clear(); - this._respondents.clear(); - } - - /** - * Sends a request to the Electron backend and waits for a corresponding response. - * - * @typeParam Request - The request type. Must implement a signature identifier. - * @typeParam Response - The expected response type. Must implement a signature identifier. - * - * @remarks - * This method initiates a typed request–response cycle between the frontend and the backend. - * It guarantees that the received response matches the expected response type by checking - * an internal signature defined by `ISignatureRequirement`. If a mismatched response is received, - * an error is thrown instead of resolving the promise. - * - * Note, however, that only the structural signature of the response is verified at this level. - * The semantic validity of the response payload is not enforced and must be handled in - * the corresponding implementation within `application/platform/ipc`. - * - * A timeout mechanism is not currently implemented, meaning unresolved requests - * may hang indefinitely if the backend fails to respond. - * - * @param request - The request payload object. Must carry an internal signature for validation. - * @param responseConstructorRef - The constructor of the expected response type, used to validate - * the incoming response against its declared structure. - * - * @returns A promise that resolves with the validated response or rejects with an error - * if the response is invalid, mismatched, or if the transport is already destroyed. - * - * @throws {Error} If the transport has already been destroyed before sending the request. - * - * @public - */ - public request( - request: Request & ISignatureRequirement, - responseConstructorRef: EntityConstructor & ISignatureRequirement, - ): Promise { - if (this._destroyed) { - return Promise.reject(new Error(`Transport is destroyed`)); - } - return new Promise((resolve, reject) => { - const pack = new Package(this._getSequence()).payload(request); - this._requests.set(pack.getSequence(), { - resolver: resolve, - rejector: reject, - ref: responseConstructorRef, - sent: Date.now(), - }); - ipc().send(events.RENDER_REQUEST_NAME, pack.packed()); - // TODO: add timeout - }); - } - - /** - * Registers a handler on the client side for a specific request type sent from the backend. - * - * @typeParam Request - The type of the request to handle. Must implement a signature identifier. - * @typeParam Response - The type of the response to return. Must implement a signature identifier. - * - * @remarks - * This method binds an incoming backend-initiated request to a handler (`respond`) provided by the client. - * The handler is responsible for producing and sending back a valid response of the expected type. - * - * Only one handler can be registered per unique request signature. Attempting to register a second handler - * for the same request type will result in an error, with diagnostic information about the current owner. - * - * The returned `Subscription` object allows the consumer to unregister the handler by calling `.destroy()`, - * which removes the association from the internal registry. - * - * @param owner - A human-readable identifier (e.g. module or service name) used for diagnostics and logging. - * @param request - The request constructor. Its signature is used to uniquely identify the handled request type. - * @param respond - The function that handles the request and returns a response. - * - * @returns A `Subscription` object that can be destroyed to remove the handler. - * - * @throws {Error} If a handler has already been registered for the same request signature. - * - * @public - */ - public respondent( - owner: string, - request: EntityConstructor & ISignatureRequirement, - respond: Respond, - ): Subscription { - const signature: string = request.getSignature(); - const respondent = this._respondents.get(signature); - if (respondent !== undefined) { - throw new Error( - `Respondent has been setup already for "${signature}". Owner: ${respondent.owner}`, - ); - } - this._respondents.set(signature, { - owner, - ref: request, - respond, - }); - return new Subscription(`${owner}:${signature}`, () => { - this._respondents.delete(signature); - }); - } - - /** - * Sends a fire-and-forget event (notification) from the client to the backend. - * - * @typeParam Notification - The type of the event to be sent. Must implement a signature identifier. - * - * @remarks - * This method emits an event to the Electron backend without expecting any response or acknowledgment. - * Delivery is not guaranteed - the client will not be informed whether the backend received or processed the event. - * - * However, if there are no listeners registered on the backend for the emitted event type, a warning will be logged. - * The log entry includes the event signature and diagnostic information to help identify misconfigured or outdated subscriptions. - * - * If the transport has already been destroyed, the method silently returns without sending anything. - * - * @param notification - The event payload to be sent. Must carry a unique signature for type identification. - * - * @returns void - * - * @public - */ - public notify(notification: Notification & ISignatureRequirement): void { - if (this._destroyed) { - return; - } - ipc().send( - events.RENDER_EVENT_NAME, - new Package(this._getSequence()).payload(notification).packed(), - ); - } - - /** - * Internal utility for testing purposes that emulates sending an event, request, or response - * from the backend to the client. - * - * @typeParam Entity - The type of the entity to emulate. Must implement a signature identifier. - * - * @remarks - * This method is intended exclusively for development and testing scenarios. - * It provides mechanisms to simulate backend-originated communication without requiring - * an actual backend process. This is useful for unit tests, mocking, or frontend-only development. - * - * Each returned method sends a synthetic message with the appropriate event name and payload format: - * - `event()` - simulates a backend event. - * - `request()` - simulates a backend-initiated request. - * - `response(sequence)` - simulates a response with a specified sequence ID. - * - * These emulations trigger the same internal dispatch logic as real backend messages. - * - * @param entity - The mock message entity to be sent. Must carry a valid signature for routing. - * - * @returns An object with methods to emulate: - * - `event()` - emit as if it's a backend event. - * - `request()` - emit as if it's a backend request. - * - `response(sequence)` - emit as if it's a response with a given sequence number. - * - * @internal - */ - public emulate(entity: Entity & ISignatureRequirement): { - event(): void; - request(): void; - response(sequence: number): void; - } { - return { - event: () => { - ipc().send( - events.HOST_EVENT_NAME, - new Package(this._getSequence()).payload(entity).packed(), - ); - }, - request: () => { - ipc().send( - events.HOST_REQUEST_NAME, - new Package(this._getSequence()).payload(entity).packed(), - ); - }, - response: (sequence: number) => { - ipc().send( - events.HOST_RESPONSE_NAME, - new Package(sequence).payload(entity).packed(), - ); - }, - }; - } - - /** - * Subscribes to an event emitted by the Electron backend. - * - * @typeParam Event - The expected type of the event payload. Must implement a signature identifier. - * - * @remarks - * This method allows the client to listen for a specific event type originating from the backend. - * If the subscription for the event does not exist yet, a new `Subject` is created and stored - * internally. All future messages with the same event name will be routed through this subject. - * - * The event name must be a non-empty string. An error will be thrown if this constraint is not met. - * - * The returned `Subject` can be used to register callbacks via `.subscribe(...)` and receive - * strongly typed event payloads as defined by the corresponding constructor. - * - * @param event - The name of the backend event to subscribe to. - * @param refEventConstructor - The constructor used to validate and typecast incoming event payloads. - * - * @returns A `Subject` instance used to receive event notifications of the specified type. - * - * @throws {Error} If the provided event name is not a valid non-empty string. - * - * @public - */ - public subscribe( - event: string, - refEventConstructor: EntityConstructor & ISignatureRequirement, - ): Subject { - if (typeof event !== 'string' || event.trim() === '') { - throw new Error(`Event name should be a not-empty string`); - } - let desc: IEventDesc | undefined = this._subjects.get(event); - if (desc === undefined) { - desc = { - subject: new Subject(), - ref: refEventConstructor, - }; - this._subjects.set(event, desc); - } - return desc.subject; - } - - private _getSequence(): number { - return this._sequence++; - } - - private _zone(handler: () => void) { - const ngZone = getNgZoneSafly(); - ngZone === undefined ? handler() : ngZone.run(handler); - } - - private _onHostEvent(_event: unknown, message: Packed) { - const pack = Package.from(message); - if (pack instanceof Error) { - this._log.error(`Fail to parse income event: ${pack.message}`); - return; - } - const signature = pack.getSignature(); - if (signature instanceof Error) { - this._log.error(`Has been gotten event, but signature cannot be detected`); - return; - } - const desc: IEventDesc | undefined = this._subjects.get(signature); - if (desc === undefined) { - this._log.warn(`Event ${signature} has been gotten, but no subscribers has been found`); - return; - } - const payload = pack.getPayload(desc.ref); - if (payload instanceof Error) { - this._log.error(`Error with processing event "${signature}": ${payload.message}`); - return; - } - this._log.verbose(`Event ${signature} has been gotten and successfully constructed.`); - this._zone(() => { - desc.subject.emit(payload); - }); - } - - private _onHostRequest(_event: unknown, message: Packed) { - const pack = Package.from(message); - if (pack instanceof Error) { - this._log.error(`Fail to parse income event: ${pack.message}`); - return; - } - const signature = pack.getSignature(); - if (signature instanceof Error) { - this._log.error(`Has been gotten event, but signature cannot be detected`); - return; - } - const respondent = this._respondents.get(signature); - if (respondent === undefined) { - this._log.error(`No respondent for "${signature}" has been setup`); - return; - } - const payload = pack.getPayload(respondent.ref); - if (payload instanceof Error) { - this._log.error( - `Error with processing host request "${signature}": ${payload.message}`, - ); - return; - } - this._log.verbose( - `Request ${signature} (seq: ${pack.getSequence()}) has been gotten and successfully constructed.`, - ); - this._zone(() => { - respondent - .respond(payload) - .then((response: ISignatureRequirement) => { - ipc().send( - events.RENDER_RESPONSE_NAME, - new Package(pack.getSequence()).payload(response).packed(), - ); - }) - .canceled(() => { - ipc().send( - events.RENDER_RESPONSE_NAME, - new Package(pack.getSequence()).abort().packed(), - ); - }) - .catch((err: Error) => { - ipc().send( - events.RENDER_RESPONSE_NAME, - new Package(pack.getSequence()).error(error(err)).packed(), - ); - }); - }); - } - - private _onHostResponse(_event: unknown, message: Packed) { - const pack = Package.from(message); - if (pack instanceof Error) { - this._log.error(`Fail to parse income event: ${pack.message}`); - return; - } - const desc = this._requests.get(pack.getSequence()); - const signature = pack.getSignature(); - if (desc === undefined) { - this._log.warn( - `Has been gotten response "${ - signature instanceof Error ? 'unknown' : signature - }"; sequence: ${pack.getSequence()}. But pending entity isn't found.`, - ); - return; - } - this._requests.delete(pack.getSequence()); - const error = pack.getError(); - if (error !== undefined) { - desc.rejector(error); - return; - } - if (signature instanceof Error) { - this._log.error(`Has been gotten response, but signature cannot be detected`); - return; - } - const payload = pack.getPayload(desc.ref); - if (payload instanceof Error) { - desc.rejector(payload); - return; - } - if (LONG_REQUEST_ALERT < Date.now() - desc.sent) { - this._log.warn( - `Request ${payload.getSignature()}(${pack.getSequence()}) took too long (${ - Date.now() - desc.sent - }ms)`, - ); - } - this._zone(() => { - desc.resolver(payload); - }); - } -} diff --git a/application/client/src/app/service/bridge.ts b/application/client/src/app/service/bridge.ts deleted file mode 100644 index a37cc3d95d..0000000000 --- a/application/client/src/app/service/bridge.ts +++ /dev/null @@ -1,793 +0,0 @@ -import { SetupService, Interface, Implementation, register } from '@platform/entity/service'; -import { services } from '@register/services'; -import { File, Entity, ParsedPath } from '@platform/types/files'; -import { FolderEntity } from '@platform/types/bindings'; -import { FileType } from '@platform/types/observe/types/file'; -import { DltStatisticInfo, ShellProfile } from '@platform/types/bindings'; -import { Entry } from '@platform/types/storage/entry'; -import { error } from '@platform/log/utils'; - -import * as Requests from '@platform/ipc/request/index'; - -@SetupService(services['bridge']) -export class Service extends Implementation { - protected cache: { - shells: ShellProfile[] | undefined; - files: Map; - checksums: Map; - } = { - shells: undefined, - files: new Map(), - checksums: new Map(), - }; - protected queue: { - shells: Array<{ - resolve: (profiles: ShellProfile[]) => void; - reject: (err: Error) => void; - }>; - } = { - shells: [], - }; - - public override ready(): Promise { - this.os() - .shells() - .then(() => { - this.log().debug(`List of shell's profiles is cached`); - }) - .catch((err: Error) => { - this.log().error(`Fail to get list of shell's profiles: ${err.message}`); - }); - return Promise.resolve(); - } - - public files(): { - getByPath(filenames: string[]): Promise; - getByPathWithCache(filenames: string[]): Promise; - ls(options: { - paths: string[]; - depth: number; - max: number; - include?: { files: boolean; folders: boolean }; - }): Promise<{ entities: FolderEntity[]; max: boolean }>; - stat(path: string): Promise; - checksum(filename: string): Promise; - isBinary(file: string): Promise; - checksumWithCache(filename: string): Promise; - exists(path: string): Promise; - name(path: string): Promise; - cp(src: string, dest: string): Promise; - copy(files: string[], dest: string): Promise; - read(filename: string): Promise; - write(filename: string, content: string, overwrite: true): Promise; - select: { - any(): Promise; - dlt(): Promise; - pcapng(): Promise; - pcap(): Promise; - text(): Promise; - parserPlugin(): Promise; - custom(ext: string): Promise; - save( - ext: string | undefined, - defaultFileName: string | undefined, - ): Promise; - }; - } { - const request = (target: FileType | undefined, ext?: string): Promise => { - return new Promise((resolve, reject) => { - Requests.IpcRequest.send( - Requests.File.Select.Response, - new Requests.File.Select.Request({ - target, - ext, - }), - ) - .then((response) => { - resolve(response.files); - }) - .catch(reject); - }); - }; - return { - getByPath: (filenames: string[]): Promise => { - return new Promise((resolve, reject) => { - Requests.IpcRequest.send( - Requests.File.File.Response, - new Requests.File.File.Request({ - filename: filenames, - }), - ) - .then((response) => { - resolve(response.files); - }) - .catch(reject); - }); - }, - getByPathWithCache: (filenames: string[]): Promise => { - return new Promise((resolve, reject) => { - const result: File[] = []; - const toBeRequested: string[] = []; - filenames.forEach((filename) => { - const file = this.cache.files.get(filename); - if (file === undefined) { - toBeRequested.push(filename); - } else { - result.push(file); - } - }); - - if (toBeRequested.length === 0) { - return resolve(result); - } - this.files() - .getByPath(toBeRequested) - .then((files) => { - result.push(...files); - files.forEach((file) => { - this.cache.files.set(file.filename, file); - }); - resolve(result); - }) - .catch(reject); - }); - }, - ls(options: { - paths: string[]; - depth: number; - max: number; - include?: { files: boolean; folders: boolean }; - }): Promise<{ entities: FolderEntity[]; max: boolean }> { - return Requests.IpcRequest.send( - Requests.Os.List.Response, - new Requests.Os.List.Request( - Object.assign( - { - include: - options.include !== undefined - ? options.include - : { files: true, folders: true }, - }, - options, - ), - ), - ); - }, - stat(path: string): Promise { - return new Promise((resolve, reject) => { - Requests.IpcRequest.send( - Requests.Os.AsFSEntity.Response, - new Requests.Os.AsFSEntity.Request({ - path, - }), - ) - .then((response) => { - if (response.entity !== undefined) { - resolve(response.entity); - } else if (response.error !== undefined) { - reject(new Error(response.error)); - } else { - reject(new Error(`Unknown error`)); - } - }) - .catch(reject); - }); - }, - exists: (path: string): Promise => { - return Requests.IpcRequest.send( - Requests.File.Exists.Response, - new Requests.File.Exists.Request({ - path, - }), - ).then((response) => { - return response.exists; - }); - }, - name: (path: string): Promise => { - return Requests.IpcRequest.send( - Requests.File.Name.Response, - new Requests.File.Name.Request({ - path, - }), - ).then((response) => { - return { - name: response.name, - parent: response.parent, - ext: response.ext, - filename: response.filename, - }; - }); - }, - checksum: (filename: string): Promise => { - return Requests.IpcRequest.send( - Requests.File.Checksum.Response, - new Requests.File.Checksum.Request({ - filename, - }), - ).then((response) => { - if (response.hash !== undefined) { - return response.hash; - } else if (response.error !== undefined) { - return Promise.reject(new Error(response.error)); - } else { - return Promise.reject(new Error(`Unknown error`)); - } - }); - }, - isBinary: (file: string): Promise => { - return Requests.IpcRequest.send( - Requests.File.IsBinary.Response, - new Requests.File.IsBinary.Request({ - file, - }), - ).then((response) => { - if (response.error !== undefined) { - return Promise.reject(new Error(response.error)); - } else { - return Promise.resolve(response.binary); - } - }); - }, - checksumWithCache: (filename: string): Promise => { - const checksum = this.cache.checksums.get(filename); - if (checksum !== undefined) { - return Promise.resolve(checksum); - } - return this.files() - .checksum(filename) - .then((checksum) => { - this.cache.checksums.set(filename, checksum); - return Promise.resolve(checksum); - }); - }, - cp: (src: string, dest: string): Promise => { - return Requests.IpcRequest.send( - Requests.File.CopyFile.Response, - new Requests.File.CopyFile.Request({ - src, - dest, - }), - ).then((response) => { - if (response.error !== undefined) { - return Promise.reject(new Error(response.error)); - } - return Promise.resolve(); - }); - }, - copy: (files: string[], dest: string): Promise => { - return Requests.IpcRequest.send( - Requests.File.Copy.Response, - new Requests.File.Copy.Request({ - files, - dest, - }), - ).then((response) => { - if (response.error !== undefined) { - return Promise.reject(new Error(response.error)); - } - return Promise.resolve(); - }); - }, - read: (filename: string): Promise => { - return Requests.IpcRequest.send( - Requests.File.Read.Response, - new Requests.File.Read.Request({ - file: filename, - }), - ).then((response) => { - if (response.error !== undefined) { - return Promise.reject(new Error(response.error)); - } - return Promise.resolve(response.text as string); - }); - }, - write: (filename: string, content: string, overwrite: true): Promise => { - return Requests.IpcRequest.send( - Requests.File.Write.Response, - new Requests.File.Write.Request({ filename, content, overwrite }), - ).then((response) => { - if (response.error !== undefined) { - return Promise.reject(new Error(response.error)); - } - return undefined; - }); - }, - select: { - any: (): Promise => { - return request(undefined); - }, - dlt: (): Promise => { - return request(FileType.Binary, 'dlt'); - }, - pcap: (): Promise => { - return request(FileType.PcapLegacy, `pcap`); - }, - pcapng: (): Promise => { - return request(FileType.PcapNG, `pcapng`); - }, - text: (): Promise => { - return request(FileType.Text, `txt,log,logs`); - }, - parserPlugin: (): Promise => { - return request(FileType.ParserPlugin, '*'); - }, - custom: (ext: string): Promise => { - return request(undefined, ext); - }, - save: ( - ext: string | undefined, - defaultFileName: string | undefined, - ): Promise => { - return Requests.IpcRequest.send( - Requests.File.Save.Response, - new Requests.File.Save.Request({ - ext, - defaultFileName, - }), - ).then((response) => { - if (response.error !== undefined) { - return Promise.reject(new Error(response.error)); - } - return response.filename; - }); - }, - }, - }; - } - - public folders(): { - any(): Promise; - dlt(): Promise; - pcapng(): Promise; - pcap(): Promise; - text(): Promise; - parserPlugin(): Promise; - custom(ext: string): Promise; - select(): Promise; - ls(paths: string[]): Promise; - delimiter(): Promise; - open(path: string): Promise; - } { - const request = (target: FileType | undefined, ext?: string): Promise => { - return new Promise((resolve, reject) => { - Requests.IpcRequest.send( - Requests.Folder.Select.Response, - new Requests.Folder.Select.Request({ - target, - ext, - }), - ) - .then((response) => { - resolve(response.files); - }) - .catch(reject); - }); - }; - return { - any: (): Promise => { - return request(undefined, `dlt,pcapng,txt,log,logs`); - }, - dlt: (): Promise => { - return request(FileType.Binary, 'dlt'); - }, - pcapng: (): Promise => { - return request(FileType.PcapNG, `pcapng`); - }, - pcap: (): Promise => { - return request(FileType.PcapLegacy, `pcap`); - }, - text: (): Promise => { - return request(FileType.Text, `txt,log,logs`); - }, - parserPlugin: (): Promise => { - return request(FileType.ParserPlugin, '*'); - }, - custom: (ext: string): Promise => { - return request(undefined, ext); - }, - select: (): Promise => { - return new Promise((resolve, reject) => { - Requests.IpcRequest.send( - Requests.Folder.Choose.Response, - new Requests.Folder.Choose.Request(), - ) - .then((response) => { - resolve(response.paths); - }) - .catch(reject); - }); - }, - ls: (paths: string[]): Promise => { - return this.files() - .ls({ paths, depth: 1, max: 500, include: { files: false, folders: true } }) - .then((response) => { - return response.entities.map((e) => e.fullname); - }); - }, - delimiter: (): Promise => { - return Requests.IpcRequest.send( - Requests.Folder.Delimiter.Response, - new Requests.Folder.Delimiter.Request(), - ).then((response) => { - return response.delimiter; - }); - }, - open: (path: string): Promise => { - return Requests.IpcRequest.send( - Requests.Folder.ShellOpen.Response, - new Requests.Folder.ShellOpen.Request({ path }), - ).then((_response) => { - return undefined; - }); - }, - }; - } - - public dlt(): { - stat(files: string[]): Promise; - } { - return { - stat: (files: string[]): Promise => { - return new Promise((resolve, reject) => { - Requests.IpcRequest.send( - Requests.Dlt.Stat.Response, - new Requests.Dlt.Stat.Request({ - files, - }), - ) - .then((response) => { - resolve(response.stat); - }) - .catch(reject); - }); - }, - }; - } - - public storage(key: string): { - write(content: string): Promise; - read(): Promise; - } { - return { - write: (content: string): Promise => { - return new Promise((resolve, reject) => { - Requests.IpcRequest.send( - Requests.Storage.Write.Response, - new Requests.Storage.Write.Request({ - key, - content, - }), - ) - .then(() => { - resolve(undefined); - }) - .catch(reject); - }); - }, - read: (): Promise => { - return new Promise((resolve, reject) => { - Requests.IpcRequest.send( - Requests.Storage.Read.Response, - new Requests.Storage.Read.Request({ - key, - }), - ) - .then((response) => { - resolve(response.content); - }) - .catch(reject); - }); - }, - }; - } - - public ports(): { - list(): Promise; - } { - return { - list: (): Promise => { - return new Promise((resolve, reject) => { - Requests.IpcRequest.send( - Requests.Serial.Ports.Response, - new Requests.Serial.Ports.Request(), - ) - .then((response) => { - resolve(response.ports); - }) - .catch(reject); - }); - }, - }; - } - - public browser(): { - url(url: string): Promise; - } { - return { - url: (url: string): Promise => { - return new Promise((resolve, reject) => { - Requests.IpcRequest.send( - Requests.Actions.UrlInBrowser.Response, - new Requests.Actions.UrlInBrowser.Request({ url }), - ) - .then((_response) => { - resolve(); - }) - .catch(reject); - }); - }, - }; - } - - public cwd(): { - set(uuid: string | undefined, path: string): Promise; - get(uuid: string | undefined): Promise; - } { - return { - set: (uuid: string | undefined, path: string): Promise => { - return new Promise((resolve, reject) => { - Requests.IpcRequest.send( - Requests.Cwd.Set.Response, - new Requests.Cwd.Set.Request({ - uuid, - cwd: path, - }), - ) - .then((response) => { - if (response.error !== undefined) { - return reject(new Error(response.error)); - } - resolve(undefined); - }) - .catch(reject); - }); - }, - get: (uuid: string | undefined): Promise => { - return new Promise((resolve, reject) => { - Requests.IpcRequest.send( - Requests.Cwd.Get.Response, - new Requests.Cwd.Get.Request({ - uuid, - }), - ) - .then((response) => { - resolve(response.cwd); - }) - .catch(reject); - }); - }, - }; - } - - public os(): { - homedir(): Promise; - shells(): Promise; - } { - return { - homedir: (): Promise => { - return new Promise((resolve, reject) => { - Requests.IpcRequest.send( - Requests.Os.HomeDir.Response, - new Requests.Os.HomeDir.Request(), - ) - .then((response) => { - resolve(response.path); - }) - .catch(reject); - }); - }, - shells: (): Promise => { - return new Promise((resolve, reject) => { - if (this.cache.shells !== undefined) { - resolve(this.cache.shells); - } else { - this.queue.shells.push({ resolve, reject }); - this.queue.shells.length === 1 && - Requests.IpcRequest.send( - Requests.Os.Shells.Response, - new Requests.Os.Shells.Request(), - ) - .then((response) => { - this.cache.shells = response.shells; - this.queue.shells - .map((h) => h.resolve) - .forEach((r) => r(this.cache.shells as ShellProfile[])); - }) - .catch((err: Error) => { - this.queue.shells.map((h) => h.reject).forEach((r) => r(err)); - }) - .finally(() => { - this.queue.shells = []; - }); - } - }); - }, - }; - } - - public env(): { - get(): Promise<{ [key: string]: string }>; - } { - return { - get: (): Promise<{ [key: string]: string }> => { - return new Promise((resolve, reject) => { - Requests.IpcRequest.send( - Requests.Env.Get.Response, - new Requests.Env.Get.Request(), - ) - .then((response) => { - resolve(response.env); - }) - .catch(reject); - }); - }, - }; - } - - public app(): { - version(): Promise; - alphaRelease(): Promise<{ version: string; url: string } | undefined>; - changelogs(version?: string): Promise<{ markdown: string; version: string }>; - } { - return { - version: (): Promise => { - return new Promise((resolve, reject) => { - Requests.IpcRequest.send( - Requests.App.Version.Response, - new Requests.App.Version.Request(), - ) - .then((response) => { - if (response.error !== undefined) { - return reject(new Error(response.error)); - } - resolve(response.version); - }) - .catch(reject); - }); - }, - alphaRelease: (): Promise<{ version: string; url: string } | undefined> => { - return new Promise((resolve, reject) => { - Requests.IpcRequest.send( - Requests.App.AlphaRelease.Response, - new Requests.App.AlphaRelease.Request(), - ) - .then((response) => { - if (response.error !== undefined) { - return reject(new Error(response.error)); - } - if (response.version === undefined || response.url === undefined) { - return resolve(undefined); - } - resolve({ - version: response.version, - url: response.url, - }); - }) - .catch(reject); - }); - }, - changelogs: (version?: string): Promise<{ markdown: string; version: string }> => { - return new Promise((resolve, reject) => { - Requests.IpcRequest.send( - Requests.App.Changelogs.Response, - new Requests.App.Changelogs.Request({ version }), - ) - .then((response) => { - if (response.error !== undefined) { - return reject(new Error(response.error)); - } - resolve({ markdown: response.markdown, version: response.version }); - }) - .catch(reject); - }); - }, - }; - } - - public entries(dest: { key?: string; file?: string }): { - get(): Promise; - /** - * Updates existed and inserts new entries - * @param entries entries to be updated or inserted. If entry already exist, it will be updated with given - * @returns - */ - update(entries: Entry[]): Promise; - /** - * Inserts new entries without updating existed - * @param entries entries to be inserted. If entry already exist, it will be ignored - * @returns - */ - append(entries: Entry[]): Promise; - /** - * Clean storage (remove all existed entries) and set with given entries - * @param entries entries to be inserted. - * @returns - */ - overwrite(entries: Entry[]): Promise; - /** - * Removes given entries - * @param uuids list of uuids of entries to be removed - * @returns - */ - delete(uuids: string[]): Promise; - } { - const set = ( - dest: { key?: string; file?: string }, - entries: Entry[], - mode: 'overwrite' | 'update' | 'append', - ): Promise => { - return new Promise((resolve, reject) => { - Requests.IpcRequest.send( - Requests.Storage.EntriesSet.Response, - new Requests.Storage.EntriesSet.Request({ - key: dest.key, - file: dest.file, - entries: JSON.stringify(entries), - mode, - }), - ) - .then(() => { - resolve(undefined); - }) - .catch(reject); - }); - }; - return { - get: (): Promise => { - return new Promise((resolve, reject) => { - Requests.IpcRequest.send( - Requests.Storage.EntriesGet.Response, - new Requests.Storage.EntriesGet.Request({ - key: dest.key, - file: dest.file, - }), - ) - .then((response) => { - try { - const entries: Entry[] = JSON.parse(response.entries); - if (!(entries instanceof Array)) { - throw new Error(`Expecting entries will be {Entry[]}`); - } - resolve(entries); - } catch (e) { - reject(new Error(this.log().error(error(e)))); - } - }) - .catch(reject); - }); - }, - update: (entries: Entry[]): Promise => { - return set(dest, entries, 'update'); - }, - overwrite: (entries: Entry[]): Promise => { - return set(dest, entries, 'overwrite'); - }, - append: (entries: Entry[]): Promise => { - return set(dest, entries, 'append'); - }, - delete: (uuids: string[]): Promise => { - if (dest.key === undefined) { - return Promise.reject( - new Error(`Delete functionality is available only for internal storages`), - ); - } - const key = dest.key; - return new Promise((resolve, reject) => { - Requests.IpcRequest.send( - Requests.Storage.EntriesDelete.Response, - new Requests.Storage.EntriesDelete.Request({ - key, - uuids, - }), - ) - .then(() => { - resolve(undefined); - }) - .catch(reject); - }); - }, - }; - } -} -export interface Service extends Interface {} -export const bridge = register(new Service()); diff --git a/application/client/src/app/service/changelogs.ts b/application/client/src/app/service/changelogs.ts deleted file mode 100644 index a60d523738..0000000000 --- a/application/client/src/app/service/changelogs.ts +++ /dev/null @@ -1,39 +0,0 @@ -import { SetupService, Interface, Implementation, register } from '@platform/entity/service'; -import { services } from '@register/services'; -import { bridge } from '@service/bridge'; -import { session } from '@service/session'; -import { Changelog } from '@tabs/changelogs/component'; -import { unique } from '@platform/env/sequence'; - -const STORAGE_KEY = 'changelog_checks_state'; - -@SetupService(services['changelogs']) -export class Service extends Implementation { - public async check(): Promise { - const current = await bridge.app().version(); - const checked = await bridge.storage(STORAGE_KEY).read(); - if (checked === current) { - return; - } - const data = await bridge.app().changelogs(current); - if (data.markdown.trim() === '') { - return; - } - await bridge.storage(STORAGE_KEY).write(current); - session.add().tab({ - name: `Release Notes ${data.version}`, - active: true, - closable: true, - content: { - factory: Changelog, - inputs: { - markdown: data.markdown, - version: data.version, - }, - }, - uuid: unique(), - }); - } -} -export interface Service extends Interface {} -export const changelogs = register(new Service()); diff --git a/application/client/src/app/service/cli.ts b/application/client/src/app/service/cli.ts deleted file mode 100644 index 2d4602baf1..0000000000 --- a/application/client/src/app/service/cli.ts +++ /dev/null @@ -1,80 +0,0 @@ -import { - SetupService, - Interface, - Implementation, - register, - DependOn, -} from '@platform/entity/service'; -import { services } from '@register/services'; -import { api } from '@service/api'; -import { CancelablePromise } from '@platform/env/promise'; - -import * as Requests from '@platform/ipc/request'; -import * as Events from '@platform/ipc/event'; -import * as handlers from './cli/index'; - -@DependOn(api) -@SetupService(services['cli']) -export class Service extends Implementation { - protected filters: Set = new Set(); - - public isFiltersImported(uuid: string): boolean { - return this.filters.has(uuid); - } - public override init(): Promise { - this.register( - api - .transport() - .respondent( - this.getName(), - Requests.Cli.Observe.Request, - ( - request: Requests.Cli.Observe.Request, - ): CancelablePromise => { - return handlers.observe(this, request); - }, - ), - api - .transport() - .respondent( - this.getName(), - Requests.Cli.Search.Request, - ( - request: Requests.Cli.Search.Request, - ): CancelablePromise => { - if (request.filters.length > 0) { - request.sessions.forEach((uuid: string) => this.filters.add(uuid)); - } - return handlers.search(this, request); - }, - ), - api - .transport() - .respondent( - this.getName(), - Requests.Cli.MultiFiles.Request, - ( - request: Requests.Cli.MultiFiles.Request, - ): CancelablePromise => { - return handlers.multiFiles(request); - }, - ), - ); - Events.IpcEvent.subscribe(Events.Cli.Done.Event, (_event: Events.Cli.Done.Event) => { - // TODO: not clear now (after refactoring) - what we should to do now? - // Probably we should lock UI while CLI is processing and here we should - // unlock UI - }); - return Promise.resolve(); - } - public getCommand(): Promise { - return Requests.IpcRequest.send( - Requests.Cli.GetCommand.Response, - new Requests.Cli.GetCommand.Request(), - ).then((response: Requests.Cli.GetCommand.Response) => { - return Promise.resolve(response.command); - }); - } -} -export interface Service extends Interface {} -export const cli = register(new Service()); diff --git a/application/client/src/app/service/cli/index.ts b/application/client/src/app/service/cli/index.ts deleted file mode 100644 index 31468dd6fd..0000000000 --- a/application/client/src/app/service/cli/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -export { handler as search } from './search'; -export { handler as observe } from './observe'; -export { handler as multiFiles } from './multi_files'; diff --git a/application/client/src/app/service/cli/multi_files.ts b/application/client/src/app/service/cli/multi_files.ts deleted file mode 100644 index d8417350c1..0000000000 --- a/application/client/src/app/service/cli/multi_files.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { CancelablePromise } from '@platform/env/promise'; -import * as Requests from '@platform/ipc/request'; -import { Action as FileAnyAction } from '@service/actions/file.any'; - -export function handler( - request: Requests.Cli.MultiFiles.Request, -): CancelablePromise { - return new CancelablePromise(async (resolve, _reject) => { - action(request); - resolve(new Requests.Cli.MultiFiles.Response()); - }); -} - -export function action(request: Requests.Cli.MultiFiles.Request): void { - if (request.files.length === 0) { - return; - } - const fileAction = new FileAnyAction(); - fileAction.multiple(request.files); -} diff --git a/application/client/src/app/service/cli/observe.ts b/application/client/src/app/service/cli/observe.ts deleted file mode 100644 index 4b58028737..0000000000 --- a/application/client/src/app/service/cli/observe.ts +++ /dev/null @@ -1,63 +0,0 @@ -import { CancelablePromise } from '@platform/env/promise'; -import { Service } from '@service/cli'; -import { session } from '@service/session'; -import { Observe } from '@platform/types/observe'; - -import * as Requests from '@platform/ipc/request'; - -export function handler( - cli: Service, - request: Requests.Cli.Observe.Request, -): CancelablePromise { - return new CancelablePromise(async (resolve, _reject) => { - action(cli, request) - .then((session: string | undefined) => { - resolve(new Requests.Cli.Observe.Response({ session, error: undefined })); - }) - .catch((err: Error) => { - resolve( - new Requests.Cli.Observe.Response({ session: undefined, error: err.message }), - ); - }); - }); -} -export async function action( - cli: Service, - request: Requests.Cli.Observe.Request, -): Promise { - if (request.observe.length === 0) { - return Promise.resolve(undefined); - } - let uuid: string | undefined = undefined; - for (const observe of request.observe) { - if (uuid === undefined) { - uuid = await session - .initialize() - .auto(new Observe(observe).locker().guess()) - .catch((err: Error) => { - cli.log().warn( - `Fail to apply action (Events.Cli.Observe.Event): ${err.message}`, - ); - return undefined; - }); - if (uuid === undefined) { - return Promise.resolve(undefined); - } - } else { - const instance = session.get(uuid); - if (instance === undefined) { - return Promise.resolve(undefined); - } - await session - .initialize() - .auto(new Observe(observe).locker().guess(), instance) - .catch((err: Error) => { - cli.log().warn( - `Fail to apply action (Events.Cli.Observe.Event): ${err.message}`, - ); - return undefined; - }); - } - } - return Promise.resolve(uuid); -} diff --git a/application/client/src/app/service/cli/search.ts b/application/client/src/app/service/cli/search.ts deleted file mode 100644 index e76b369366..0000000000 --- a/application/client/src/app/service/cli/search.ts +++ /dev/null @@ -1,36 +0,0 @@ -import { CancelablePromise } from '@platform/env/promise'; -import { Service } from '@service/cli'; -import { session } from '@service/session'; -import { StoredEntity } from '@service/session/dependencies/search/store'; -import { FilterRequest } from '@service/session/dependencies/search/filters/request'; - -import * as Requests from '@platform/ipc/request'; - -export function handler( - cli: Service, - request: Requests.Cli.Search.Request, -): CancelablePromise { - return new CancelablePromise(async (resolve, _reject) => { - action(cli, request); - resolve(new Requests.Cli.Search.Response({ error: undefined })); - }); -} -export function action(cli: Service, request: Requests.Cli.Search.Request): void { - if (request.sessions.length === 0) { - return; - } - const filters = request.filters.map((str) => { - return FilterRequest.defaults(str); - }); - request.sessions.forEach((uuid) => { - const instance = session.get(uuid); - if (instance === undefined) { - cli.log().warn(`Cannot apply filter (via CLI): fail to find session: ${uuid}`); - return; - } - instance.search - .store() - .filters() - .overwrite(filters as StoredEntity[]); - }); -} diff --git a/application/client/src/app/service/env.ts b/application/client/src/app/service/env.ts deleted file mode 100644 index 6a98c27ebb..0000000000 --- a/application/client/src/app/service/env.ts +++ /dev/null @@ -1,57 +0,0 @@ -import { SetupService, Interface, Implementation, register } from '@platform/entity/service'; -import { services } from '@register/services'; - -export enum Platform { - darwin = 'darwin', - windows = 'windows', - linux = 'linux', -} - -function isMatch(src: string, hooks: string[]): boolean { - return hooks.filter((h) => src.includes(h)).length > 0; -} - -@SetupService(services['env']) -export class Service extends Implementation { - private _platform!: Platform; - - public override ready(): Promise { - const userAgentData = (navigator as any).userAgentData; - if (userAgentData !== undefined && typeof userAgentData.platform === 'string') { - const platform = userAgentData.platform.toLowerCase(); - if (isMatch(platform, ['windows'])) { - this._platform = Platform.windows; - } else if (isMatch(platform, ['darwin', 'macos', 'mac os', 'mac'])) { - this._platform = Platform.darwin; - } else if (isMatch(platform, ['linux'])) { - this._platform = Platform.linux; - } - } - if (this._platform === undefined) { - this.log().warn(`Fail to detect platform on browser level`); - } else { - this.log().debug(`Platform: ${this._platform}`); - } - return Promise.resolve(); - } - - public platform(): { - darwin(): boolean; - windows(): boolean; - linux(): boolean; - } { - return { - darwin: (): boolean => { - return this._platform === Platform.darwin; - }, - windows: (): boolean => { - return this._platform === Platform.windows; - }, - linux: (): boolean => { - return this._platform === Platform.linux; - }, - }; - } -} -export interface Service extends Interface {} -export const env = register(new Service()); diff --git a/application/client/src/app/service/favorites.ts b/application/client/src/app/service/favorites.ts deleted file mode 100644 index e14ca56228..0000000000 --- a/application/client/src/app/service/favorites.ts +++ /dev/null @@ -1,257 +0,0 @@ -import { - SetupService, - Interface, - Implementation, - register, - DependOn, -} from '@platform/entity/service'; -import { services } from '@register/services'; -import { error } from '@platform/log/utils'; -import { bridge } from '@service/bridge'; -import { Subjects, Subject } from '@platform/env/subscription'; - -import * as obj from '@platform/env/obj'; -import { EntityType } from '@platform/types/files'; - -const ROOTS_STORAGE_KEY = 'user_favourites_places'; -const STATE_STORAGE_KEY = 'user_favourites_state'; - -export interface FavoriteState { - path: string; - parent: string; -} - -export interface FavoritePlace { - path: string; - exists: boolean; -} - -@DependOn(bridge) -@SetupService(services['favorites']) -export class Service extends Implementation { - public states: FavoriteState[] = []; - public updates: Subjects<{ - list: Subject; - state: Subject; - }> = new Subjects({ - list: new Subject(), - state: new Subject(), - }); - - protected favorites: FavoritePlace[] = []; - - public override async ready(): Promise { - await Promise.all([ - this.places() - .get() - .then((favorites) => { - this.favorites = favorites; - }) - .catch((err: Error) => { - this.log().error(`Fail to load favorites: ${err.message}`); - }), - this.expanded() - .get() - .then((states) => { - this.states = states; - }) - .catch((err: Error) => { - this.log().error(`Fail to load states: ${err.message}`); - }), - ]); - return Promise.resolve(); - } - - public override destroy(): Promise { - this.updates.destroy(); - return Promise.resolve(); - } - - public places(): { - get(): Promise; - add(paths: string[] | string): Promise; - has(path: string): boolean; - selectAndAdd(): Promise; - remove(path: string): Promise; - } { - return { - get: async (): Promise => { - const favorites: FavoritePlace[] = []; - const paths = await this.storage().get(); - for (const path of paths) { - const exists = await bridge.files().exists(path); - favorites.push({ - path, - exists, - }); - } - return favorites; - }, - add: async (paths: string[] | string): Promise => { - if (!(paths instanceof Array)) { - paths = [paths]; - } - paths = paths.filter((p) => p.trim() !== '' && !this.places().has(p)); - if (paths.length === 0) { - return Promise.resolve(); - } - const accepted: string[] = []; - for (const path of paths) { - const stat = await bridge.files().stat(path); - if (stat.kind === EntityType.Directory) { - accepted.push(path); - } - } - this.favorites = this.favorites.concat( - accepted.map((path) => { - return { path, exists: true }; - }), - ); - return this.storage() - .set(this.favorites) - .then(() => { - this.updates.get().list.emit(); - }) - .catch((err: Error) => { - this.log().error(`Fail to save favorites: ${err.message}`); - }); - }, - has: (path: string): boolean => { - return this.favorites.find((f) => f.path === path) !== undefined; - }, - selectAndAdd: async (): Promise => { - const folders = await bridge.folders().select(); - return this.places().add(folders); - }, - remove: (path: string): Promise => { - if (path.trim().length === 0 || !this.places().has(path)) { - return Promise.resolve(); - } - this.favorites = this.favorites.filter((f) => f.path !== path); - this.expanded() - .remove(path) - .then(() => { - this.updates.get().state.emit(); - }) - .catch((err: Error) => { - this.log().error(`Fail to update state of favorites: ${err.message}`); - }); - return this.storage() - .set(this.favorites) - .then(() => { - this.updates.get().list.emit(); - }) - .catch((err: Error) => { - this.log().error(`Fail to save favorites: ${err.message}`); - }); - }, - }; - } - - protected storage(): { - get(): Promise; - set(value: string[] | FavoritePlace[]): Promise; - } { - return { - get: (): Promise => { - return new Promise((resolve, reject) => { - bridge - .entries({ key: ROOTS_STORAGE_KEY }) - .get() - .then((entries) => { - resolve(entries.map((entry) => entry.content)); - }) - .catch(reject); - }); - }, - set: (value: string[] | FavoritePlace[]): Promise => { - return bridge - .entries({ key: ROOTS_STORAGE_KEY }) - .overwrite( - value.map((favorite: string | FavoritePlace) => { - const path = typeof favorite === 'string' ? favorite : favorite.path; - return { - uuid: path, - content: path, - }; - }), - ) - .finally(() => { - this.updates.get().list.emit(); - }); - }, - }; - } - - public expanded(): { - get(): Promise; - write(): Promise; - add(path: string, parent: string): Promise; - remove(path: string): Promise; - } { - return { - get: (): Promise => { - return new Promise((resolve, reject) => { - bridge - .entries({ key: STATE_STORAGE_KEY }) - .get() - .then((entries) => { - try { - const nodes = entries.map((entry) => { - const node = JSON.parse(entry.content); - return { - path: obj.getAsString(node, 'path'), - parent: obj.getAsString(node, 'parent'), - }; - }); - resolve(nodes); - } catch (e) { - this.log().error(`Fail to parse folder's tree state: ${error(e)}`); - resolve([]); - } - }) - .catch(reject); - }); - }, - write: (): Promise => { - return bridge - .entries({ key: STATE_STORAGE_KEY }) - .overwrite( - this.states.map((node: FavoriteState) => { - return { - uuid: node.path, - content: JSON.stringify(node), - }; - }), - ) - .finally(() => { - this.updates.get().state.emit(); - }); - }, - add: async (path: string, parent: string): Promise => { - if (this.states.find((v) => v.path === path) !== undefined) { - return; - } - this.states.push({ path, parent }); - this.expanded() - .write() - .catch((err: Error) => { - this.log().error(`Fail to write update expanded list: ${err.message}`); - }); - }, - remove: async (path: string): Promise => { - if (this.states.find((value) => value.path === path) === undefined) { - return; - } - this.states = this.states.filter((v) => v.path !== path && v.parent !== path); - this.expanded() - .write() - .catch((err: Error) => { - this.log().error(`Fail to write update expanded list: ${err.message}`); - }); - }, - }; - } -} -export interface Service extends Interface {} -export const favorites = register(new Service()); diff --git a/application/client/src/app/service/history.ts b/application/client/src/app/service/history.ts deleted file mode 100644 index cd4e38f2d1..0000000000 --- a/application/client/src/app/service/history.ts +++ /dev/null @@ -1,93 +0,0 @@ -import { - SetupService, - Interface, - Implementation, - register, - DependOn, -} from '@platform/entity/service'; -import { services } from '@register/services'; -import { bridge } from '@service/bridge'; -import { ilc, Channel } from '@service/ilc'; -import { Session } from './session/session'; -import { HistorySession } from './history/session'; -import { StorageCollections } from './history/storage.collections'; -import { StorageDefinitions } from './history/storage.definitions'; -import { Provider } from './history/provider'; -import { Subjects, Subject } from '@platform/env/subscription'; - -@DependOn(bridge) -@SetupService(services['history']) -export class Service extends Implementation { - protected channel!: Channel; - protected readonly provider: Provider; - - public readonly collections: StorageCollections; - public readonly definitions: StorageDefinitions; - public readonly sessions: Map = new Map(); - public readonly subjects: Subjects<{ - created: Subject; - destroyed: Subject; - }> = new Subjects({ - created: new Subject(), - destroyed: new Subject(), - }); - constructor() { - super(); - this.definitions = new StorageDefinitions(); - this.collections = new StorageCollections(this.definitions); - this.provider = new Provider(this.collections, this.definitions); - } - - public override async ready(): Promise { - await this.collections.load(); - await this.definitions.load(); - this.channel = ilc.channel(`History`, this.log()); - this.channel.session.created((session) => { - this.sessions.set( - session.uuid(), - new HistorySession(session, { - collections: this.collections, - definitions: this.definitions, - }), - ); - this.subjects.get().created.emit(session.uuid()); - }); - this.channel.session.closing((session) => { - if (!(session instanceof Session)) { - return; - } - this.save() - .catch((err) => this.log().error(`Fail to save session state: ${err.message}`)) - .finally(() => { - const history = this.sessions.get(session.uuid()); - if (history === undefined) { - return; - } - history.destroy(); - this.sessions.delete(session.uuid()); - this.subjects.get().destroyed.emit(session.uuid()); - }); - }); - return Promise.resolve(); - } - - public async save(): Promise { - return Promise.all([this.collections.save(), this.definitions.save()]).then( - (_) => undefined, - ); - } - - public get(session: Session | string): HistorySession | undefined { - return this.sessions.get(session instanceof Session ? session.uuid() : session); - } - - public export(uuids: string[], filename: string): Promise { - return this.provider.export(uuids, filename); - } - - public import(filename: string): Promise { - return this.provider.import(filename); - } -} -export interface Service extends Interface {} -export const history = register(new Service()); diff --git a/application/client/src/app/service/history/collection.bookmarks.ts b/application/client/src/app/service/history/collection.bookmarks.ts deleted file mode 100644 index 26f56dab27..0000000000 --- a/application/client/src/app/service/history/collection.bookmarks.ts +++ /dev/null @@ -1,69 +0,0 @@ -import { Collection, AfterApplyCallback } from './collection'; -import { Bookmark } from '../session/dependencies/bookmark/bookmark'; -import { Extractor } from '@platform/types/storage/json'; -import { Equal } from '@platform/types/env/types'; -import { Session } from '@service/session/session'; -import { Definition } from './definition'; -import { Subscriber } from '@platform/env/subscription'; - -export class BookmarksCollection - extends Collection - implements Equal -{ - constructor() { - super('BookmarksCollection', []); - } - - public subscribe(subscriber: Subscriber, session: Session): void { - subscriber.register( - session.bookmarks.subjects.get().updated.subscribe(() => { - this.update(session.bookmarks.get()); - this.updated.emit(); - }), - ); - } - - public async applyTo(session: Session, definitions: Definition[]): Promise { - // Bookmarks can be applied only to file - if ( - definitions.length !== 1 || - definitions[0].file === undefined || - session.bookmarks.get().length !== 0 - ) { - return () => { - /* do nothing */ - }; - } - await session.bookmarks.overwrite(this.as().elements()); - return () => { - session.bookmarks.update(); - }; - } - - public isSame(collection: Collection): boolean { - if (this.elements.size !== collection.elements.size) { - return false; - } - let found = 0; - const elements = Array.from(this.elements.values()); - collection.elements.forEach((outside) => { - found += elements.find((f) => f.isSame(outside)) === undefined ? 0 : 1; - }); - return collection.elements.size === found; - } - - public extractor(): Extractor { - return { - from: (json: string): Bookmark | Error => { - return Bookmark.fromJson(json); - }, - key: (): string => { - return Bookmark.KEY; - }, - }; - } - - public applicableOnlyToOrigin(): boolean { - return true; - } -} diff --git a/application/client/src/app/service/history/collection.charts.ts b/application/client/src/app/service/history/collection.charts.ts deleted file mode 100644 index 9df0c6032f..0000000000 --- a/application/client/src/app/service/history/collection.charts.ts +++ /dev/null @@ -1,83 +0,0 @@ -import { Collection, AfterApplyCallback } from './collection'; -import { ChartRequest } from '@service/session/dependencies/search/charts/request'; -import { Extractor } from '@platform/types/storage/json'; -import { Equal } from '@platform/types/env/types'; -import { Session } from '@service/session/session'; -import { Definition } from './definition'; -import { Subscriber } from '@platform/env/subscription'; -import { StoredEntity } from '@service/session/dependencies/search/store'; -import { notifications, Notification } from '@ui/service/notifications'; - -export class ChartsCollection extends Collection implements Equal { - constructor() { - super('ChartsCollection', []); - } - - public subscribe(subscriber: Subscriber, session: Session): void { - subscriber.register( - session.search - .store() - .charts() - .subjects.get() - .any.subscribe(() => { - this.update(session.search.store().charts().get()); - this.updated.emit(); - }), - ); - } - - public applyTo(session: Session, _definitions: Definition[]): Promise { - const charts = this.as().elements() as StoredEntity[]; - const invalid: string[] = charts - .map((chart) => { - if (ChartRequest.getValidationError(chart.definition.filter) !== undefined) { - return chart.definition.filter; - } else { - return undefined; - } - }) - .filter((v) => v !== undefined) as unknown as string[]; - session.search.store().charts().overwrite(charts); - if (invalid.length > 0) { - notifications.notify( - new Notification({ - message: `Next ${ - invalid.length - } chart(s) cannot be applied, because are invalid: ${invalid.join('; ')}`, - actions: [], - pinned: true, - }), - ); - } - return Promise.resolve(() => { - session.search.store().charts().refresh(); - }); - } - - public isSame(collection: Collection): boolean { - if (this.elements.size !== collection.elements.size) { - return false; - } - let found = 0; - const elements = Array.from(this.elements.values()); - collection.elements.forEach((outside) => { - found += elements.find((f) => f.isSame(outside)) === undefined ? 0 : 1; - }); - return collection.elements.size === found; - } - - public extractor(): Extractor { - return { - from: (json: string): ChartRequest | Error => { - return ChartRequest.fromJson(json); - }, - key: (): string => { - return ChartRequest.KEY; - }, - }; - } - - public applicableOnlyToOrigin(): boolean { - return false; - } -} diff --git a/application/client/src/app/service/history/collection.disabled.ts b/application/client/src/app/service/history/collection.disabled.ts deleted file mode 100644 index a9c07f958d..0000000000 --- a/application/client/src/app/service/history/collection.disabled.ts +++ /dev/null @@ -1,67 +0,0 @@ -import { Collection, AfterApplyCallback } from './collection'; -import { DisabledRequest } from '../session/dependencies/search/disabled/request'; -import { Extractor } from '@platform/types/storage/json'; -import { Equal } from '@platform/types/env/types'; -import { Session } from '@service/session/session'; -import { Definition } from './definition'; -import { Subscriber } from '@platform/env/subscription'; -import { StoredEntity } from '../session/dependencies/search/store'; - -export class DisabledCollection - extends Collection - implements Equal -{ - constructor() { - super('DisabledCollection', []); - } - - public subscribe(subscriber: Subscriber, session: Session): void { - subscriber.register( - session.search - .store() - .disabled() - .subjects.get() - .any.subscribe(() => { - this.update(session.search.store().disabled().get()); - this.updated.emit(); - }), - ); - } - - public applyTo(session: Session, _definitions: Definition[]): Promise { - session.search - .store() - .disabled() - .overwrite(this.as().elements() as StoredEntity[]); - return Promise.resolve(() => { - session.search.store().disabled().refresh(); - }); - } - - public isSame(collection: Collection): boolean { - if (this.elements.size !== collection.elements.size) { - return false; - } - let found = 0; - const elements = Array.from(this.elements.values()); - collection.elements.forEach((outside) => { - found += elements.find((f) => f.isSame(outside)) === undefined ? 0 : 1; - }); - return collection.elements.size === found; - } - - public extractor(): Extractor { - return { - from: (json: string): DisabledRequest | Error => { - return DisabledRequest.fromJson(json); - }, - key: (): string => { - return DisabledRequest.KEY; - }, - }; - } - - public applicableOnlyToOrigin(): boolean { - return false; - } -} diff --git a/application/client/src/app/service/history/collection.filters.ts b/application/client/src/app/service/history/collection.filters.ts deleted file mode 100644 index 8697309135..0000000000 --- a/application/client/src/app/service/history/collection.filters.ts +++ /dev/null @@ -1,86 +0,0 @@ -import { Collection, AfterApplyCallback } from './collection'; -import { FilterRequest } from '@service/session/dependencies/search/filters/request'; -import { Extractor } from '@platform/types/storage/json'; -import { Equal } from '@platform/types/env/types'; -import { Session } from '@service/session/session'; -import { Definition } from './definition'; -import { Subscriber } from '@platform/env/subscription'; -import { StoredEntity } from '@service/session/dependencies/search/store'; -import { notifications, Notification } from '@ui/service/notifications'; - -export class FiltersCollection - extends Collection - implements Equal -{ - constructor() { - super('FiltersCollection', []); - } - - public subscribe(subscriber: Subscriber, session: Session): void { - subscriber.register( - session.search - .store() - .filters() - .subjects.get() - .any.subscribe(() => { - this.update(session.search.store().filters().get()); - this.updated.emit(); - }), - ); - } - - public applyTo(session: Session, _definitions: Definition[]): Promise { - const filters = this.as().elements() as StoredEntity[]; - const invalid: string[] = filters - .map((filter) => { - if (FilterRequest.getValidationError(filter.definition.filter) !== undefined) { - return filter.definition.filter.filter; - } else { - return undefined; - } - }) - .filter((v) => v !== undefined) as unknown as string[]; - session.search.store().filters().overwrite(filters); - if (invalid.length > 0) { - notifications.notify( - new Notification({ - message: `Next ${ - invalid.length - } filter(s) cannot be applied, because are invalid: ${invalid.join('; ')}`, - actions: [], - pinned: true, - }), - ); - } - return Promise.resolve(() => { - session.search.store().filters().refresh(); - }); - } - - public isSame(collection: Collection): boolean { - if (this.elements.size !== collection.elements.size) { - return false; - } - let found = 0; - const elements = Array.from(this.elements.values()); - collection.elements.forEach((outside) => { - found += elements.find((f) => f.isSame(outside)) === undefined ? 0 : 1; - }); - return collection.elements.size === found; - } - - public extractor(): Extractor { - return { - from: (json: string): FilterRequest | Error => { - return FilterRequest.fromJson(json); - }, - key: (): string => { - return FilterRequest.KEY; - }, - }; - } - - public applicableOnlyToOrigin(): boolean { - return false; - } -} diff --git a/application/client/src/app/service/history/collection.ts b/application/client/src/app/service/history/collection.ts deleted file mode 100644 index 33f4d637ac..0000000000 --- a/application/client/src/app/service/history/collection.ts +++ /dev/null @@ -1,77 +0,0 @@ -import { Recognizable } from '@platform/types/storage/entry'; -import { Equal } from '@platform/types/env/types'; -import { Session } from '@service/session/session'; -import { Json, JsonField, JsonSet, Extractor } from '@platform/types/storage/json'; -import { SetupLogger, LoggerInterface } from '@platform/entity/logger'; -import { Definition } from './definition'; -import { Subscriber, Subject } from '@platform/env/subscription'; - -export type AfterApplyCallback = () => void; -@SetupLogger() -export abstract class Collection & Recognizable & Equal> { - abstract subscribe(subscriber: Subscriber, session: Session): void; - abstract extractor(): Extractor; - abstract isSame(collection: Collection): boolean; - abstract applyTo(session: Session, definitions: Definition[]): Promise; - abstract applicableOnlyToOrigin(): boolean; - - public readonly elements: Map = new Map(); - public readonly updated: Subject = new Subject(); - - constructor(alias: string, entries: JsonSet) { - this.setLoggerName(alias); - this.load(entries); - } - - protected extract(field: JsonField): T | Error | undefined { - if (typeof field !== 'object' || field === null || field === undefined) { - return new Error(`Invalid field`); - } - const json = field[this.extractor().key()]; - if (typeof json !== 'string') { - return undefined; - } - return this.extractor().from(json); - } - - public update(elements: T[]): void { - this.elements.clear(); - elements.forEach((e) => { - this.elements.set(e.uuid(), e); - }); - } - - public load(entries: JsonSet) { - this.elements.clear(); - entries.forEach((entry) => { - const element = this.extract(entry); - if (element instanceof Error) { - this.log().warn(`Fail to extract value: ${element.message}`); - return; - } - if (element === undefined) { - return; - } - this.elements.set(element.uuid(), element); - }); - } - - public as(): { - jsonSet(): JsonSet; - elements(): T[]; - } { - return { - jsonSet: (): JsonSet => { - return Array.from(this.elements.values()).map((f) => { - return { [f.json().key()]: f.json().to() }; - }); - }, - elements: (): T[] => { - return Array.from(this.elements.values()); - }, - }; - } -} -export interface Collection extends LoggerInterface { - _phantom: T; -} diff --git a/application/client/src/app/service/history/collections.ts b/application/client/src/app/service/history/collections.ts deleted file mode 100644 index eac52ae5d5..0000000000 --- a/application/client/src/app/service/history/collections.ts +++ /dev/null @@ -1,404 +0,0 @@ -import { Definition } from './definition'; -import { FiltersCollection } from './collection.filters'; -import { ChartsCollection } from './collection.charts'; -import { DisabledCollection } from './collection.disabled'; -import { BookmarksCollection } from './collection.bookmarks'; -// import { CommentsCollection } from './collection.comments.ts_'; -import { Collection } from './collection'; -import { Session } from '@service/session/session'; -import { EntryConvertable, Entry } from '@platform/types/storage/entry'; -import { JsonSet } from '@platform/types/storage/json'; -import { error } from '@platform/log/utils'; -import { SetupLogger, LoggerInterface } from '@platform/entity/logger'; -import { Equal, Empty } from '@platform/types/env/types'; -import { Subject, Subscriber } from '@platform/env/subscription'; -import { StorageCollections } from './storage.collections'; -import { unique } from '@platform/env/sequence'; -import { FilterRequest } from '@service/session/dependencies/search/filters/request'; -import { ChartRequest } from '@service/session/dependencies/search/charts/request'; -import { hash } from '@platform/env/hash'; - -import * as obj from '@platform/env/obj'; - -export interface ICollection { - name: string; - created: number; - last: number; - used: number; - uuid: string; - applied_sessions: Set; - preset: boolean; - relations: string[]; - entries: JsonSet; - origin: string | undefined; -} - -@SetupLogger() -export class Collections implements EntryConvertable, Equal, Empty { - static from(smth: Session | Entry, storage: StorageCollections): Collections { - if (smth instanceof Session) { - const filters = smth.search.store().filters().get(); - const disabled = smth.search.store().disabled().get(); - const bookmarks = smth.bookmarks.get(); - return new Collections( - `Collections:${smth.uuid()}`, - { - name: '-', - last: Date.now(), - created: Date.now(), - used: 1, - uuid: smth.uuid(), - applied_sessions: new Set([smth.uuid()]), - preset: false, - relations: [], - origin: undefined, - entries: filters - .map((f) => f.asJsonField()) - .concat(disabled.map((d) => d.asJsonField())) - .concat(bookmarks.map((b) => b.asJsonField())), - }, - storage, - ); - } else { - const def = Collections.fromMinifiedStr(JSON.parse(smth.content)); - return new Collections( - `Collections:${def.uuid}`, - Collections.fromMinifiedStr(JSON.parse(smth.content)), - storage, - ); - } - } - - static fromV2(smth: { [key: string]: any }, storage: StorageCollections): Collections { - const uuid = unique(); - obj.isObject(smth); - const filters: FilterRequest[] = []; - if (smth['filters'] instanceof Array) { - smth['filters'].forEach((smth) => { - const validFilter = FilterRequest.fromV2(smth); - if (validFilter instanceof Error) { - return; - } - filters.push(validFilter); - }); - } - const charts: ChartRequest[] = []; - if (smth['charts'] instanceof Array) { - smth['charts'].forEach((smth) => { - const validChart = ChartRequest.fromV2(smth); - if (validChart instanceof Error) { - return; - } - charts.push(validChart); - }); - } - return new Collections( - `Collections:${uuid}`, - { - name: '-', - last: Date.now(), - created: Date.now(), - used: 1, - uuid: uuid, - applied_sessions: new Set(), - preset: false, - relations: [], - origin: undefined, - entries: filters - .map((f) => f.asJsonField()) - .concat(charts.map((d) => d.asJsonField())), - }, - storage, - ); - } - - static fromMinifiedStr(src: { [key: string]: number | string }): ICollection { - return { - name: obj.getAsNotEmptyString(src, 'n'), - created: Date.now(), - used: obj.getAsValidNumber(src, 'u'), - last: obj.getAsValidNumber(src, 'l'), - preset: obj.getAsBool(src, 'p'), - uuid: obj.getAsNotEmptyString(src, 'uu'), - applied_sessions: obj.getAsSetOfStringsOrEmpty(src, 'as'), - relations: obj.getAsArray(src, 'r'), - origin: obj.getAsNotEmptyStringOrAsUndefined(src, 'o'), - entries: obj.getAsObj(src, 'e'), - }; - } - - protected readonly storage: StorageCollections; - - public name: string; - public created: number; - public used: number; - public last: number; - public uuid: string; - public applied_sessions: Set; - public preset: boolean; - public relations: string[]; - public origin: string | undefined; - - public readonly collections: { - filters: FiltersCollection; - charts: ChartsCollection; - disabled: DisabledCollection; - bookmarks: BookmarksCollection; - // comments: CommentsCollection; - } = { - filters: new FiltersCollection(), - charts: new ChartsCollection(), - disabled: new DisabledCollection(), - bookmarks: new BookmarksCollection(), - // comments: new CommentsCollection(), - }; - public readonly updated: Subject = new Subject(); - - constructor(alias: string, definition: ICollection, storage: StorageCollections) { - this.setLoggerName(alias); - this.name = definition.name; - this.used = definition.used; - this.last = definition.last; - this.created = definition.created; - this.uuid = definition.uuid; - this.applied_sessions = definition.applied_sessions; - this.relations = definition.relations; - this.origin = definition.origin; - this.preset = definition.preset; - this.storage = storage; - this.load(definition.entries); - } - - public subscribe(subscriber: Subscriber, session: Session): void { - this.asCollectionsArray().forEach((c) => { - subscriber.register( - c.updated.subscribe(() => { - this.updated.emit(); - }), - ); - c.subscribe(subscriber, session); - }); - } - - public clone(): Collections { - return new Collections( - '', - { - name: this.name, - used: this.used, - created: this.created, - uuid: this.uuid, - applied_sessions: this.applied_sessions, - relations: this.relations, - preset: this.preset, - last: this.last, - origin: this.origin, - entries: this.asCollectionsArray() - .map((c) => c.as().jsonSet()) - .flat(), - }, - this.storage, - ); - } - - public delete() { - this.storage.delete(this); - } - - public bind(definition: Definition): void { - if (this.origin === undefined) { - // Origin source - it's first source for collection. - this.origin = definition.uuid; - } - this.relations.indexOf(definition.uuid) === -1 && this.relations.push(definition.uuid); - } - - public async applyTo(session: Session, definitions: Definition[]): Promise { - const origin = (() => { - if (definitions.length === 1 && definitions[0].uuid === this.origin) { - return true; - } - return false; - })(); - const collections = this.asCollectionsArray().filter((c) => - origin ? true : !c.applicableOnlyToOrigin(), - ); - const after = []; - for (const collection of collections) { - const cb = await collection.applyTo(session, definitions); - after.push(cb); - } - after.forEach((cb) => cb()); - } - - public updateUuid(uuid: string | undefined): void { - this.uuid = uuid !== undefined ? uuid : this.uuid; - } - - public setName(name: string) { - if (name.trim() === '' || name.trim() === '-') { - this.name = '-'; - this.preset = false; - } else { - this.name = name; - this.preset = true; - } - this.storage.update(this); - } - - public hasName(): boolean { - return this.name !== '' && this.name !== '-'; - } - - public filterByDateTime(tm: number): boolean { - return this.created > tm; - } - - public updateTimestamp() { - this.created = Date.now(); - } - - public isSame(collections: Collections): boolean { - return ( - this.collections.filters.isSame(collections.collections.filters) && - this.collections.charts.isSame(collections.collections.charts) && - this.collections.disabled.isSame(collections.collections.disabled) - ); - } - - protected load(entries: JsonSet) { - this.asCollectionsArray().forEach((c) => c.load(entries)); - } - - protected overwrite(definition: ICollection) { - this.name = definition.name; - this.used = definition.used; - this.last = definition.last; - this.created = definition.created; - this.uuid = definition.uuid; - this.applied_sessions = definition.applied_sessions; - this.relations = definition.relations; - this.origin = definition.origin; - this.preset = definition.preset; - this.load(definition.entries); - } - - protected asCollectionsArray(): Collection[] { - return Object.keys(this.collections).map( - (key) => (this.collections as { [key: string]: Collection })[key], - ); - } - - public getInnerHash(): string { - const representation = - this.collections.filters - .as() - .elements() - .map((request) => { - const def = request.definition; - return `${def.filter.filter}${def.filter.flags.cases}${def.filter.flags.word}${def.filter.flags.reg}${def.colors.color}${def.colors.background}${def.active}`; - }) - .join(';') + - this.collections.charts - .as() - .elements() - .map((request) => { - const def = request.definition; - return `${def.filter}${def.color}${def.active}`; - }) - .join(';') + - ( - this.collections.disabled - .as() - .elements() - .map((entity) => entity.as().filter()) - .filter((entity) => entity !== undefined) as unknown as FilterRequest[] - ) - .map((request: FilterRequest) => { - const def = request.definition; - return `${def.filter.filter}${def.filter.flags.cases}${def.filter.flags.word}${def.filter.flags.reg}${def.colors.color}${def.colors.background}${def.active}`; - }) - .join(';') + - ( - this.collections.disabled - .as() - .elements() - .map((entity) => entity.as().chart()) - .filter((entity) => entity !== undefined) as unknown as ChartRequest[] - ) - .map((request) => { - const def = request.definition; - return `${def.filter}${def.color}${def.active}`; - }) - .join(';'); - return hash(representation).toString(); - } - - public isEmpty(): boolean { - return ( - this.asCollectionsArray() - .map((c) => c.elements.size) - .reduce((prev, curr) => prev + curr, 0) === 0 - ); - } - - public minify(): { - [key: string]: - | number - | string - | { [key: string]: string | number } - | string[] - | JsonSet - | boolean - | undefined; - } { - return { - n: this.name, - c: this.created, - u: this.used, - l: this.last, - uu: this.uuid, - r: this.relations, - o: this.origin, - e: this.asCollectionsArray() - .map((c) => c.as().jsonSet()) - .flat(), - p: this.preset, - }; - } - - public entry(): { - to(): Entry; - from(entry: Entry): Error | undefined; - hash(): string; - uuid(): string; - updated(): Subject | undefined; - } { - return { - to: (): Entry => { - return { - uuid: this.uuid, - content: JSON.stringify(this.minify()), - }; - }, - from: (entry: Entry): Error | undefined => { - try { - this.overwrite(Collections.fromMinifiedStr(JSON.parse(entry.content))); - } catch (e) { - return new Error(error(e)); - } - return undefined; - }, - hash: (): string => { - return this.uuid; - }, - uuid: (): string => { - return this.uuid; - }, - updated: (): Subject | undefined => { - return undefined; - }, - }; - } -} -export interface Collections extends LoggerInterface {} diff --git a/application/client/src/app/service/history/definition.concat.ts b/application/client/src/app/service/history/definition.concat.ts deleted file mode 100644 index bd6443de15..0000000000 --- a/application/client/src/app/service/history/definition.concat.ts +++ /dev/null @@ -1,59 +0,0 @@ -import { IFileDesc, FileDesc } from './definition.file'; -import * as $ from '@platform/types/observe'; - -export class ConcatDesc { - static async fromDataSource(source: $.Observe): Promise { - const concat = source.origin.as<$.Origin.Concat.Configuration>( - $.Origin.Concat.Configuration, - ); - if (concat === undefined) { - return undefined; - } - const list: IFileDesc[] = []; - for (const filename of concat.files()) { - const desc = await FileDesc.fromFilename(filename); - if (desc !== undefined) { - list.push(desc); - } - } - return list; - } - static fromMinifiedStr( - src: Array<{ [key: string]: number | string }> | undefined, - ): ConcatDesc | undefined { - const files: IFileDesc[] = []; - if (src === undefined) { - return undefined; - } - src.forEach((src) => { - const file = FileDesc.fromMinifiedStr(src); - if (file === undefined) { - return; - } - files.push(file.asDesc()); - }); - return src === undefined ? undefined : new ConcatDesc(files); - } - - public files: IFileDesc[] = []; - - constructor(files: IFileDesc[]) { - this.files = files; - } - - public isSame(collection: ConcatDesc): boolean { - if (this.files.length !== collection.files.length) { - return false; - } - const targets = collection.files.map((f) => f.checksum); - let matches: number = 0; - this.files.forEach((f) => { - matches += targets.includes(f.checksum) ? 1 : 0; - }); - return matches === this.files.length; - } - - public minify(): Array<{ [key: string]: number | string }> { - return this.files.map((f) => new FileDesc(f).minify()); - } -} diff --git a/application/client/src/app/service/history/definition.file.ts b/application/client/src/app/service/history/definition.file.ts deleted file mode 100644 index 911819f9bb..0000000000 --- a/application/client/src/app/service/history/definition.file.ts +++ /dev/null @@ -1,94 +0,0 @@ -import { getParentFolder } from '@platform/types/files'; -import { bridge } from '@service/bridge'; - -import * as obj from '@platform/env/obj'; -import * as $ from '@platform/types/observe'; - -export interface IFileDesc { - extention: string; - checksum: string; - filename: string; - parent: string; - size: number; - created: number; -} - -export class FileDesc implements IFileDesc { - static async fromDataSource(source: $.Observe): Promise { - const file = source.origin.as<$.Origin.File.Configuration>($.Origin.File.Configuration); - if (file === undefined) { - return undefined; - } - return FileDesc.fromFilename(file.filename()); - } - static async fromFilename(filename: string): Promise { - const file = (await bridge.files().getByPathWithCache([filename]))[0]; - if (file === undefined) { - throw new Error(`Fail to get file(s) stat info`); - } - return { - checksum: await bridge.files().checksumWithCache(file.filename), - extention: file.ext.toLowerCase(), - filename: file.name.toLowerCase(), - parent: getParentFolder(file.filename).toLowerCase(), - created: file.stat.ctimeMs, - size: file.stat.size, - }; - } - static fromMinifiedStr( - src: { [key: string]: number | string } | undefined, - ): FileDesc | undefined { - return src === undefined - ? undefined - : new FileDesc({ - checksum: obj.getAsString(src, 'h'), - extention: obj.getAsString(src, 'e'), - filename: obj.getAsNotEmptyString(src, 'n'), - parent: obj.getAsString(src, 'p'), - size: obj.getAsValidNumber(src, 's'), - created: obj.getAsValidNumber(src, 'c'), - }); - } - - public extention: string; - public filename: string; - public parent: string; - public size: number; - public created: number; - public checksum: string; - - constructor(definition: IFileDesc) { - this.extention = definition.extention; - this.filename = definition.filename; - this.parent = definition.parent; - this.size = definition.size; - this.created = definition.created; - this.checksum = definition.checksum; - } - - public isSame(file: FileDesc): boolean { - return file.checksum === this.checksum; - } - - public asDesc(): IFileDesc { - return { - checksum: this.checksum, - extention: this.extention, - filename: this.filename, - parent: this.parent, - size: this.size, - created: this.created, - }; - } - - public minify(): { [key: string]: number | string } { - return { - e: this.extention, - n: this.filename, - p: this.parent, - s: this.size, - c: this.created, - h: this.checksum, - }; - } -} diff --git a/application/client/src/app/service/history/definition.stream.ts b/application/client/src/app/service/history/definition.stream.ts deleted file mode 100644 index 37d0e4b940..0000000000 --- a/application/client/src/app/service/history/definition.stream.ts +++ /dev/null @@ -1,59 +0,0 @@ -import * as $ from '@platform/types/observe'; -import * as obj from '@platform/env/obj'; - -export interface IStreamDesc { - source: $.Origin.Stream.Stream.Source; - major: string; - minor: string; -} - -export class StreamDesc implements IStreamDesc { - static async fromDataSource(source: $.Observe): Promise { - const stream = source.origin.as<$.Origin.Stream.Configuration>( - $.Origin.Stream.Configuration, - ); - if (stream === undefined) { - return undefined; - } - const def = stream.desc(); - return { - major: def.major, - minor: def.minor, - source: stream.instance.instance.alias(), - }; - } - - static fromMinifiedStr( - src: { [key: string]: number | string } | undefined, - ): StreamDesc | undefined { - return src === undefined - ? undefined - : new StreamDesc({ - source: obj.getAsNotEmptyString(src, 's') as $.Origin.Stream.Stream.Source, - major: obj.getAsString(src, 'ma'), - minor: obj.getAsString(src, 'mi'), - }); - } - - public source: $.Origin.Stream.Stream.Source; - public major: string; - public minor: string; - - constructor(definition: IStreamDesc) { - this.source = definition.source; - this.major = definition.major; - this.minor = definition.minor; - } - - public isSame(stream: StreamDesc): boolean { - return stream.source === this.source && this.major === stream.major; - } - - public minify(): { [key: string]: number | string } { - return { - s: this.source, - mi: this.minor, - ma: this.major, - }; - } -} diff --git a/application/client/src/app/service/history/definition.ts b/application/client/src/app/service/history/definition.ts deleted file mode 100644 index 5044000e4d..0000000000 --- a/application/client/src/app/service/history/definition.ts +++ /dev/null @@ -1,240 +0,0 @@ -import { FileDesc, IFileDesc } from './definition.file'; -import { StreamDesc, IStreamDesc } from './definition.stream'; -import { ConcatDesc } from './definition.concat'; -import { unique } from '@platform/env/sequence'; -import { EntryConvertable, Entry } from '@platform/types/storage/entry'; -import { error } from '@platform/log/utils'; -import { Subject } from '@platform/env/subscription'; -import { Equal } from '@platform/types/env/types'; -import { Collections } from './collections'; - -import * as obj from '@platform/env/obj'; -import * as $ from '@platform/types/observe'; - -export interface IDefinition { - stream?: IStreamDesc; - file?: IFileDesc; - concat?: IFileDesc[]; - parser: $.Parser.Protocol; - uuid: string; -} - -export interface GroupRelations { - rank: number; - caption?: string; -} -export class Definition implements EntryConvertable, Equal { - static from(entry: Entry): Definition { - return Definition.fromMinifiedStr(JSON.parse(entry.content)); - } - static async fromDataSource(source: $.Observe): Promise { - const parser = source.parser.instance.alias(); - const file = await FileDesc.fromDataSource(source); - const concat = await ConcatDesc.fromDataSource(source); - const stream = await StreamDesc.fromDataSource(source); - if (file !== undefined) { - return new Definition({ - file, - stream: undefined, - concat: undefined, - parser, - uuid: unique(), - }); - } else if (concat !== undefined) { - return new Definition({ - file: undefined, - stream: undefined, - concat, - parser, - uuid: unique(), - }); - } else if (stream !== undefined) { - return new Definition({ - file: undefined, - concat: undefined, - stream, - parser, - uuid: unique(), - }); - } else { - throw new Error(`Cannot detect a source of data. Not File, not Stream aren't defined`); - } - } - static fromMinifiedStr(src: { [key: string]: number | string }): Definition { - const def = new Definition({ - file: FileDesc.fromMinifiedStr(obj.getAsObjOrUndefined(src, 'f')), - stream: StreamDesc.fromMinifiedStr(obj.getAsObjOrUndefined(src, 's')), - concat: ConcatDesc.fromMinifiedStr(obj.getAsObjOrUndefined(src, 'c'))?.files, - parser: obj.getAsNotEmptyString(src, 'p') as $.Parser.Protocol, - uuid: obj.getAsNotEmptyString(src, 'u'), - }); - if (def.file === undefined && def.stream === undefined && def.concat === undefined) { - throw new Error(`Definition doesn't have description not for stream, not for file`); - } - return def; - } - - public stream?: StreamDesc; - public file?: FileDesc; - public concat?: ConcatDesc; - public parser: $.Parser.Protocol; - public uuid: string; - - constructor(definition: IDefinition) { - this.stream = - definition.stream === undefined ? undefined : new StreamDesc(definition.stream); - this.file = definition.file === undefined ? undefined : new FileDesc(definition.file); - this.concat = - definition.concat === undefined ? undefined : new ConcatDesc(definition.concat); - this.parser = definition.parser; - this.uuid = definition.uuid; - } - - public overwrite(definition: Definition) { - this.stream = definition.stream; - this.file = definition.file; - this.concat = definition.concat; - this.parser = definition.parser; - this.uuid = definition.uuid; - } - - public isSame(definition: Definition): boolean { - if (this.parser !== definition.parser) { - return false; - } - if (definition.stream !== undefined && this.stream !== undefined) { - return this.stream.isSame(definition.stream); - } - if (definition.file !== undefined && this.file !== undefined) { - return this.file.isSame(definition.file); - } - if (definition.concat !== undefined && this.concat !== undefined) { - return this.concat.isSame(definition.concat); - } - return false; - } - - public check(): { - related(collections: Collections): boolean; - suitable(definition: Definition): GroupRelations | undefined; - } { - return { - related: (collections: Collections): boolean => { - return collections.relations.indexOf(this.uuid) !== -1; - }, - suitable: (definition: Definition): GroupRelations | undefined => { - if (this.parser !== definition.parser) { - return undefined; - } - if (this.file !== undefined && definition.file !== undefined) { - if ( - (this.file.extention === definition.file.extention && - this.file.filename === definition.file.filename) || - this.file.checksum === definition.file.checksum - ) { - return { rank: 1, caption: 'Same file' }; - } - if (this.file.extention === definition.file.extention) { - return { rank: 2, caption: 'Same file format' }; - } - if (this.file.parent === definition.file.parent) { - return { rank: 3, caption: 'Same file location' }; - } - return undefined; - } - if (this.stream !== undefined && definition.stream !== undefined) { - if ( - this.stream.major === definition.stream.major && - this.stream.minor === definition.stream.minor - ) { - return { rank: 1 }; - } - if (this.stream.major === definition.stream.major) { - return { rank: 2 }; - } - if (this.stream.minor === definition.stream.minor) { - return { rank: 3 }; - } - return undefined; - } - return undefined; - }, - }; - } - - public toExport(): Definition { - const def = { - stream: this.stream, - file: this.file, - concat: this.concat === undefined ? undefined : this.concat.files, - parser: this.parser, - uuid: this.uuid, - }; - if (def.file !== undefined) { - def.file.filename = unique(); - def.file.parent = unique(); - } - return new Definition(def); - } - - public getCollectionName(): string { - if (this.file !== undefined) { - return `files *.${this.file.extention}`; - } else if (this.stream !== undefined) { - return `${this.stream.major}`; - } else { - return '-'; - } - } - - public minify(): { - [key: string]: - | number - | string - | { [key: string]: string | number } - | Array<{ [key: string]: string | number }> - | undefined; - } { - return { - s: this.stream?.minify(), - f: this.file?.minify(), - c: this.concat?.minify(), - p: this.parser, - u: this.uuid, - }; - } - - public entry(): { - to(): Entry; - from(entry: Entry): Error | undefined; - hash(): string; - uuid(): string; - updated(): Subject | undefined; - } { - return { - to: (): Entry => { - return { - uuid: this.uuid, - content: JSON.stringify(this.minify()), - }; - }, - from: (entry: Entry): Error | undefined => { - try { - this.overwrite(Definition.fromMinifiedStr(JSON.parse(entry.content))); - } catch (e) { - return new Error(error(e)); - } - return undefined; - }, - hash: (): string => { - return this.uuid; - }, - uuid: (): string => { - return this.uuid; - }, - updated: (): Subject | undefined => { - return undefined; - }, - }; - } -} diff --git a/application/client/src/app/service/history/definitions.ts b/application/client/src/app/service/history/definitions.ts deleted file mode 100644 index 40aa4157b1..0000000000 --- a/application/client/src/app/service/history/definitions.ts +++ /dev/null @@ -1,21 +0,0 @@ -import { Logger } from '@platform/log'; -import { scope } from '@platform/env/scope'; -import { Definition } from './definition'; - -export class Definitions { - static UUID = 'history_definitions_holder'; - protected readonly definitions: Map = new Map(); - protected readonly logger: Logger; - - constructor() { - this.logger = scope.getLogger(`Definitions holder (history)`); - } - - public add(definition: Definition): void { - this.definitions.set(definition.uuid, definition); - } - - public list(): Definition[] { - return Array.from(this.definitions.values()); - } -} diff --git a/application/client/src/app/service/history/provider.ts b/application/client/src/app/service/history/provider.ts deleted file mode 100644 index 26c662e44c..0000000000 --- a/application/client/src/app/service/history/provider.ts +++ /dev/null @@ -1,205 +0,0 @@ -import { StorageCollections } from './storage.collections'; -import { StorageDefinitions } from './storage.definitions'; -import { Collections } from './collections'; -import { Definition } from './definition'; -import { EntryConvertable, Entry } from '@platform/types/storage/entry'; -import { Subject } from '@platform/env/subscription'; -import { unique } from '@platform/env/sequence'; -import { error } from '@platform/log/utils'; -import { bridge } from '@service/bridge'; -import { lockers, Locker } from '@ui/service/lockers'; -import { scope } from '@platform/env/scope'; - -import * as obj from '@platform/env/obj'; - -export class Provider implements EntryConvertable { - protected collections: Collections[] = []; - protected definitions: Definition[] = []; - protected readonly uuid: string = unique(); - protected readonly storage: { - collections: StorageCollections; - definitions: StorageDefinitions; - }; - protected importFromC2Version(filename: string, err: Error): Promise { - const logger = scope.getLogger('ImporterFiltersFromV2'); - return new Promise((resolve, reject) => { - const message = lockers.lock( - new Locker( - false, - `Fail to read from file due error: ${err.message.split(/[\n\r]/gi)[0]}`, - ) - .set() - .buttons([ - { - caption: `Try read as Chipmunk v2 filters`, - handler: () => { - message.popup.close(); - bridge - .files() - .read(filename) - .then((text: string) => { - try { - const parsed = JSON.parse(text); - obj.isObject(parsed); - this.collections = [ - Collections.fromV2( - parsed, - this.storage.collections, - ), - ]; - this.definitions = []; - resolve(this.orderAfterImport()); - } catch (e) { - logger.error(error(e)); - reject(new Error(error(e))); - } - }) - .catch((err: Error) => { - logger.error(err.message); - reject(err); - }); - }, - }, - { - caption: `Cancel`, - handler: () => { - message.popup.close(); - resolve([]); - }, - }, - ]) - .end(), - { - closable: false, - }, - ); - }); - } - - protected orderAfterImport(): string[] { - this.collections = this.collections.map((col) => { - // Reassign uuids of definitions as soon as it will be diffrent in case - // if both users have same source - col.relations = col.relations.map((uuid) => { - let target = this.definitions.find((d) => d.uuid === uuid); - if (target === undefined) { - return uuid; - } - target = this.storage.definitions.update(target); - return target.uuid; - }); - return col; - }); - - this.storage.definitions.add(this.definitions); - const uuids: string[] = this.storage.collections.add(this.collections); - this.collections = []; - this.definitions = []; - return uuids; - } - - constructor(collections: StorageCollections, definitions: StorageDefinitions) { - this.storage = { - collections, - definitions, - }; - } - - public export(uuids: string[], filename: string): Promise { - this.collections = ( - uuids - .map((uuid) => { - return this.storage.collections.get(uuid); - }) - .filter((c) => c !== undefined) as Collections[] - ).map((c) => c.clone()); - this.definitions = []; - const names: { [key: string]: number } = {}; - this.collections = this.collections.map((col) => { - const related: Definition[] = ( - col.relations - .map((uuid) => this.storage.definitions.get(uuid)) - .filter((d) => d !== undefined) as Definition[] - ).map((d) => d.toExport()); - if (related.length > 0) { - this.definitions = this.definitions.concat(related); - const name = related[0].getCollectionName(); - if (!col.hasName() && name !== '-') { - names[name] = names[name] === undefined ? 0 : names[name]; - if (names[name] === 0) { - col.name = name; - } else { - col.name = `${name}:${names[name] + 1}`; - } - names[name] += 1; - } - } - return col; - }); - return bridge.entries({ file: filename }).overwrite([this.entry().to()]); - } - - public import(filename: string): Promise { - return bridge - .entries({ file: filename }) - .get() - .then((entries) => { - if (entries.length !== 1) { - return Promise.reject(new Error(`Invalid format of file`)); - } - const error = this.entry().from(entries[0]); - if (error instanceof Error) { - return Promise.reject(error); - } - return this.orderAfterImport(); - }) - .catch((err: Error) => { - return this.importFromC2Version(filename, err); - }); - } - - public minify(): { [key: string]: Entry[] } { - return { - c: this.collections.map((c) => c.entry().to()), - d: this.definitions.map((d) => d.entry().to()), - }; - } - - public entry(): { - to(): Entry; - from(entry: Entry): Error | undefined; - hash(): string; - uuid(): string; - updated(): Subject | undefined; - } { - return { - to: (): Entry => { - return { - uuid: this.uuid, - content: JSON.stringify(this.minify()), - }; - }, - from: (entry: Entry): Error | undefined => { - try { - const minified: { [key: string]: Entry[] } = JSON.parse(entry.content); - this.collections = minified['c'].map((entry) => - Collections.from(entry, this.storage.collections), - ); - this.definitions = minified['d'].map((entry) => Definition.from(entry)); - } catch (e) { - return new Error(error(e)); - } - return undefined; - }, - hash: (): string => { - return this.uuid; - }, - uuid: (): string => { - return this.uuid; - }, - updated: (): Subject | undefined => { - return undefined; - }, - }; - } -} diff --git a/application/client/src/app/service/history/session.ts b/application/client/src/app/service/history/session.ts deleted file mode 100644 index c74466b84a..0000000000 --- a/application/client/src/app/service/history/session.ts +++ /dev/null @@ -1,221 +0,0 @@ -import { Collections } from './collections'; -import { Definitions } from './definitions'; -import { Definition } from './definition'; -import { Session } from '../session/session'; -import { StorageCollections } from './storage.collections'; -import { StorageDefinitions } from './storage.definitions'; -import { SetupLogger, LoggerInterface } from '@platform/entity/logger'; -import { Subscriber } from '@platform/env/subscription'; -import { Subjects, Subject } from '@platform/env/subscription'; -import { Suitable, SuitableGroup } from './suitable'; -import { LockToken } from '@platform/env/lock.token'; -import { cli } from '@service/cli'; - -import * as $ from '@platform/types/observe'; - -export { Suitable, SuitableGroup }; - -@SetupLogger() -export class HistorySession extends Subscriber { - protected readonly storage: { - collections: StorageCollections; - definitions: StorageDefinitions; - }; - protected readonly session: Session; - protected readonly sources: string[] = []; - protected readonly globals: Subscriber = new Subscriber(); - protected readonly locker: LockToken = new LockToken(true); - protected readonly pendings: $.Observe[] = []; - protected checked: boolean = false; - - public readonly definitions: Definitions; - public collections: Collections; - public readonly subjects: Subjects<{ - suitable: Subject; - checked: Subject; - }> = new Subjects({ - suitable: new Subject(), - checked: new Subject(), - }); - - constructor( - session: Session, - storage: { - collections: StorageCollections; - definitions: StorageDefinitions; - }, - ) { - super(); - this.definitions = new Definitions(); - this.storage = storage; - this.session = session; - this.setLoggerName(`History: ${this.session.uuid()}`); - this.collections = this.setCollection(Collections.from(session, storage.collections)); - this.globals.register( - this.session.stream.subjects.get().started.subscribe(this.handleNewSource.bind(this)), - this.session.stream.subjects.get().readable.subscribe(() => { - this.locker.unlock(); - this.pendings - .splice(0, this.pendings.length) - .forEach(this.handleNewSource.bind(this)); - }), - ); - } - - protected handleNewSource(source: $.Observe) { - if (this.locker.isLocked()) { - this.pendings.push(source); - return; - } - Definition.fromDataSource(source) - .then((definition) => { - definition = this.storage.definitions.update(definition); - this.definitions.add(definition); - this.collections.bind(definition); - if (cli.isFiltersImported(this.session.uuid())) { - // Filters are imported from CLI. Recent filters/charts should not - // be applied - return; - } - this.save(); - this.check().all(); - }) - .catch((err: Error) => { - this.log().error(`Fail to get definition of source: ${err.message}`); - }); - } - - protected save() { - if (this.collections.isEmpty()) { - this.storage.collections.clean().catch((err: Error) => { - this.log().error(`Fail to save collections storage: ${err.message}`); - }); - } else { - Promise.all([ - this.storage.collections.save().catch((err: Error) => { - this.log().error(`Fail to save collections storage: ${err.message}`); - }), - this.storage.definitions.save().catch((err: Error) => { - this.log().error(`Fail to save definitions storage: ${err.message}`); - }), - ]).catch((err: Error) => { - this.log().error(`Fail to save history storage: ${err.message}`); - }); - } - } - - public check(): { - related(): boolean; - suitable(): void; - all(): void; - done(): boolean; - confirm(): void; - } { - return { - related: (): boolean => { - const related = this.find().related(); - if (related !== undefined) { - this.setCollection(related); - this.collections - .applyTo(this.session, this.definitions.list()) - .catch((err: Error) => { - this.log().warn(`Fail to apply collection: ${err.message}`); - }) - .finally(() => { - this.check().confirm(); - }); - } else { - this.subjects.get().suitable.emit(new Suitable()); - } - return related !== undefined; - }, - suitable: (): void => { - this.subjects.get().suitable.emit(this.find().suitable()); - this.check().confirm(); - }, - all: (): void => { - if (this.check().related()) { - return; - } - this.check().suitable(); - }, - done: (): boolean => { - return this.checked; - }, - confirm: (): void => { - this.checked = true; - this.subjects.get().checked.emit(); - }, - }; - } - - protected setCollection(collections: Collections): Collections { - this.unsubscribe(); - this.collections = collections; - this.collections.subscribe(this, this.session); - this.storage.collections.clearSession(this.session.uuid()); - this.collections.applied_sessions.add(this.session.uuid()); - this.register( - this.collections.updated.subscribe(() => { - this.collections.updateUuid(this.storage.collections.update(this.collections)); - this.save(); - }), - ); - return collections; - } - - public destroy() { - this.collections.applied_sessions.delete(this.session.uuid()); - this.unsubscribe(); - this.globals.unsubscribe(); - this.subjects.destroy(); - } - - public find(): { - related(): Collections | undefined; - suitable(): Suitable; - all(): Collections[]; - named(): Collections[]; - byTimeStamp(tm: number): Collections[]; - } { - return { - related: (): Collections | undefined => { - const related = this.storage.collections.find(this.definitions.list()).related(); - related.sort((a, b) => (a.last < b.last ? 1 : -1)); - return related.length === 0 ? undefined : related[0]; - }, - suitable: (): Suitable => { - return this.storage.collections.find(this.definitions.list()).suitable(); - }, - all: (): Collections[] => { - return this.storage.collections.find().all(); - }, - named: (): Collections[] => { - return this.storage.collections.find().named(); - }, - byTimeStamp: (tm: number): Collections[] => { - return this.storage.collections.find().byTimeStamp(tm); - }, - }; - } - - public apply(collection: Collections) { - if (this.storage.collections.get(collection.uuid) === undefined) { - this.storage.collections.insert(collection); - } else { - this.storage.collections.used(collection.uuid); - } - this.setCollection(collection); - this.definitions.list().forEach((def) => { - this.collections.bind(def); - }); - this.collections.applyTo(this.session, this.definitions.list()).catch((err: Error) => { - this.log().warn(`Fail to apply collection: ${err.message}`); - }); - } - - public clear() { - this.storage.collections.clear(); - } -} -export interface HistorySession extends LoggerInterface {} diff --git a/application/client/src/app/service/history/storage.collections.ts b/application/client/src/app/service/history/storage.collections.ts deleted file mode 100644 index b2dcd66920..0000000000 --- a/application/client/src/app/service/history/storage.collections.ts +++ /dev/null @@ -1,175 +0,0 @@ -import { bridge } from '@service/bridge'; -import { Collections } from './collections'; -import { SetupLogger, LoggerInterface } from '@platform/entity/logger'; -import { error } from '@platform/log/utils'; -import { Definition } from './definition'; -import { StorageDefinitions } from './storage.definitions'; -import { Suitable } from './suitable'; -import { Subject } from '@platform/env/subscription'; - -@SetupLogger() -export class StorageCollections { - static UUID = 'history_collections_storage'; - - protected collections: Map = new Map(); - protected definitions: StorageDefinitions; - - public saved: Subject = new Subject(); - - constructor(definitions: StorageDefinitions) { - this.setLoggerName(`StorageCollections`); - this.definitions = definitions; - } - - public async load(): Promise { - this.collections.clear(); - await bridge - .entries({ key: StorageCollections.UUID }) - .get() - .then((entries) => { - entries.forEach((entry) => { - try { - const collections = Collections.from(entry, this); - this.collections.set(collections.uuid, collections); - } catch (e) { - this.log().error(`Fail parse collection: ${error(e)}`); - } - }); - }) - .catch((err: Error) => { - this.log().warn(`Fail to read history collections: ${err.message}`); - }); - } - - public async save(): Promise { - setTimeout(() => { - bridge - .entries({ key: StorageCollections.UUID }) - .overwrite(Array.from(this.collections.values()).map((c) => c.entry().to())) - .then(() => { - this.saved.emit(); - }) - .catch((err: Error) => { - this.log().warn(`Fail to write history collections: ${err.message}`); - }); - }); - } - - public async clean(): Promise { - this.collections.forEach((collections: Collections, key: string) => { - if (collections.isEmpty()) { - this.collections.delete(key); - } - }); - await this.save(); - } - - public clearSession(session_id: string): void { - this.collections.forEach((collection, _key, _map) => { - collection.applied_sessions.delete(session_id); - }); - } - - public update(collections: Collections): string { - const existed = Array.from(this.collections.values()).find((c) => c.isSame(collections)); - if (this.collections.has(collections.uuid) || existed === undefined) { - this.collections.set(collections.uuid, collections); - return collections.uuid; - } else { - existed.updateTimestamp(); - } - return existed.uuid; - } - - public insert(collections: Collections): string[] { - if (this.collections.has(collections.uuid)) { - return this.add([collections]); - } else { - this.collections.set(collections.uuid, collections); - this.save(); - return [collections.uuid]; - } - } - - public add(collections: Collections[]): string[] { - const uuids = collections.map((col) => this.update(col)); - this.save(); - return uuids; - } - - public overwrite(collections: Collections[]): void { - this.collections.clear(); - collections.forEach((c) => this.collections.set(c.uuid, c)); - this.save(); - } - - public get(uuid: string): Collections | undefined { - return this.collections.get(uuid); - } - - public delete(collections: Collections) { - this.collections.delete(collections.uuid); - this.save(); - } - - public clear() { - this.collections.clear(); - this.save(); - } - - public find(definitions?: Definition[]): { - related(): Collections[]; - suitable(): Suitable; - named(): Collections[]; - all(): Collections[]; - byTimeStamp(tm: number): Collections[]; - } { - return { - related: (): Collections[] => { - if (definitions === undefined) { - return []; - } - return Array.from(this.collections.values()).filter((collections) => { - return definitions.filter((def) => def.check().related(collections)).length > 0; - }); - }, - suitable: (): Suitable => { - if (definitions === undefined) { - return new Suitable(); - } - const suitable: Suitable = new Suitable(); - Array.from(this.collections.values()).forEach((collections) => { - collections.relations.forEach((uuid) => { - const definition = this.definitions.get(uuid); - if (definition === undefined) { - return; - } - definitions.forEach((def) => { - suitable.add(collections, def.check().suitable(definition)); - }); - }); - }); - return suitable; - }, - named: (): Collections[] => { - return Array.from(this.collections.values()).filter((c) => c.hasName()); - }, - all: (): Collections[] => { - return Array.from(this.collections.values()); - }, - byTimeStamp: (tm: number): Collections[] => { - return Array.from(this.collections.values()).filter((c) => c.filterByDateTime(tm)); - }, - }; - } - - public used(uuid: string) { - const collection = this.collections.get(uuid); - if (collection === undefined) { - return; - } - collection.used += 1; - collection.last = Date.now(); - } -} -export interface StorageCollections extends LoggerInterface {} diff --git a/application/client/src/app/service/history/storage.definitions.ts b/application/client/src/app/service/history/storage.definitions.ts deleted file mode 100644 index 2d2513f1e4..0000000000 --- a/application/client/src/app/service/history/storage.definitions.ts +++ /dev/null @@ -1,62 +0,0 @@ -import { bridge } from '@service/bridge'; -import { Definition } from './definition'; -import { SetupLogger, LoggerInterface } from '@platform/entity/logger'; -import { error } from '@platform/log/utils'; - -@SetupLogger() -export class StorageDefinitions { - static UUID = 'history_definitions_storage'; - protected definitions: Map = new Map(); - - constructor() { - this.setLoggerName(`StorageDefinitions`); - } - - public async load(): Promise { - this.definitions.clear(); - await bridge - .entries({ key: StorageDefinitions.UUID }) - .get() - .then((entries) => { - entries.forEach((entry) => { - try { - const definition = Definition.from(entry); - this.definitions.set(definition.uuid, definition); - } catch (e) { - this.log().error(`Fail parse definition: ${error(e)}`); - } - }); - }) - .catch((err: Error) => { - this.log().warn(`Fail to read history definition: ${err.message}`); - }); - } - - public async save(): Promise { - await bridge - .entries({ key: StorageDefinitions.UUID }) - .update(Array.from(this.definitions.values()).map((d) => d.entry().to())) - .catch((err: Error) => { - this.log().warn(`Fail to write history definition: ${err.message}`); - }); - } - - public update(definition: Definition): Definition { - const existed = Array.from(this.definitions.values()).find((d) => d.isSame(definition)); - if (existed === undefined) { - this.definitions.set(definition.uuid, definition); - return definition; - } - return existed; - } - - public add(definitions: Definition[]): void { - definitions.forEach((def) => this.update(def)); - this.save(); - } - - public get(uuid: string): Definition | undefined { - return this.definitions.get(uuid); - } -} -export interface StorageDefinitions extends LoggerInterface {} diff --git a/application/client/src/app/service/history/suitable.ts b/application/client/src/app/service/history/suitable.ts deleted file mode 100644 index 7aff718ef9..0000000000 --- a/application/client/src/app/service/history/suitable.ts +++ /dev/null @@ -1,69 +0,0 @@ -import { Collections } from './collections'; -import { GroupRelations } from './definition'; - -export interface SuitableGroup { - caption?: string; - rank: number; - collections: Collections[]; -} - -export interface SuitableCollections { - [key: number]: { caption?: string; collections: Collections[] }; -} - -export class Suitable { - public suitable: SuitableCollections = {}; - - protected collections: string[] = []; - - public asGroups(): SuitableGroup[] { - const list: SuitableGroup[] = []; - Object.keys(this.suitable).forEach((key: string | number) => { - const rank = typeof key === 'string' ? parseInt(key, 10) : key; - const index = list.findIndex((g) => g.rank === rank); - if (index === -1) { - list.push({ - caption: this.suitable[rank].caption, - rank, - collections: this.suitable[rank].collections, - }); - } else { - list[index].collections = list[index].collections.concat( - this.suitable[rank].collections, - ); - } - }); - list.sort((a, b) => { - return a.rank > b.rank ? 1 : -1; - }); - list.forEach((group: SuitableGroup) => { - const unique: string[] = []; - group.collections = group.collections.filter((collection) => { - const hash = collection.getInnerHash(); - if (unique.includes(hash)) { - return false; - } else { - unique.push(hash); - return true; - } - }); - }); - return list; - } - - public add(collections: Collections, group: GroupRelations | undefined): boolean { - if (group === undefined) { - return false; - } - if (this.collections.indexOf(collections.uuid) !== -1) { - return false; - } else { - this.collections.push(collections.uuid); - } - if (this.suitable[group.rank] === undefined) { - this.suitable[group.rank] = { caption: group.caption, collections: [] }; - } - this.suitable[group.rank].collections.push(collections); - return true; - } -} diff --git a/application/client/src/app/service/hotkeys.ts b/application/client/src/app/service/hotkeys.ts deleted file mode 100644 index b0de1258ee..0000000000 --- a/application/client/src/app/service/hotkeys.ts +++ /dev/null @@ -1,328 +0,0 @@ -import { - SetupService, - Interface, - Implementation, - register, - DependOn, -} from '@platform/entity/service'; -import { services } from '@register/services'; -import { Listener } from './hotkeys/listener'; -import { KeysMap, getKeyByUuid, Requirement, getKeyByAlias } from '@platform/types/hotkeys/map'; -import { Subscription } from '@platform/env/subscription'; -import { listener } from '@ui/service/listener'; -import { ilc, Services } from '@service/ilc'; -import { unique } from '@platform/env/sequence'; -import { components } from '@env/decorators/initial'; -import { Vertical, Horizontal } from '@ui/service/popup'; -import { env } from '@service/env'; -import { Action as FileAnyAction } from '@service/actions/file.any'; -import { Action as SettingsAction } from '@service/actions/settings'; -import { Action as ExitAction } from '@service/actions/exit'; - -import * as Events from '@platform/ipc/event/index'; -import * as Requests from '@platform/ipc/request'; - -enum BindingState { - Bound, - Bounding, - Unbound, - Unbounding, - NotInited, -} - -@DependOn(env) -@SetupService(services['hotkeys']) -export class Service extends Implementation { - private _listener!: Listener; - private _services!: Services; - private _handlers: Map void>> = new Map(); - private _recent: { - inputsUpdateState: number; - remoteBinding: BindingState; - } = { - inputsUpdateState: -1, - remoteBinding: BindingState.NotInited, - }; - - public override ready(): Promise { - const channel = ilc.channel(this.getName(), this.log()); - this._services = ilc.services(this.getName(), this.log()); - this._listener = new Listener(KeysMap); - this.register( - channel.session.change(() => { - this.check().session(); - }), - ); - this.register( - Events.IpcEvent.subscribe( - Events.Hotkey.Emit.Event, - (event) => { - const target = getKeyByAlias(event.code); - if (target === undefined) { - this.log().warn(`Recieved unknown hotkey: ${event.code}`); - return; - } - this._listener.emit(target.uuid); - }, - ), - ); - this.register( - this._listener.subject.subscribe((uuid: string) => { - const key = getKeyByUuid(uuid); - if (key === undefined) { - return; - } - const handlers = this._handlers.get(key.alias); - if (handlers === undefined) { - return; - } - handlers.forEach((handler) => handler()); - }), - ); - this.register( - listener.listen('focus', window, () => { - this.check().inputs(); - return true; - }), - ); - this.register( - listener.listen('blur', window, () => { - this.remote().unbind(); - return true; - }), - ); - this.register( - listener.listen( - 'keyup', - window, - (event: KeyboardEvent) => { - return this._listener.emit(event); - }, - { - priority: 100, - }, - ), - ); - this.register( - listener.listen('keydown', window, () => { - this.check().inputs(); - return true; - }), - ); - this.register( - listener.listen('mouseup', window, () => { - this.check().inputs(); - return true; - }), - ); - this.register( - this.listen('?', () => { - this._services.ui.popup.open({ - component: { - factory: components.get('app-dialogs-hotkeys'), - inputs: {}, - }, - closeOnKey: '*', - uuid: '?', - width: 500, - }); - }), - ); - this.register( - this.listen('Ctrl + G', () => { - if (this._services.system.session.active().session() === undefined) { - return; - } - this._services.ui.popup.open({ - component: { - factory: components.get('app-dialogs-jumpto'), - inputs: {}, - }, - position: { - vertical: Vertical.top, - horizontal: Horizontal.center, - }, - closeOnKey: 'Escape', - width: 350, - uuid: 'Ctrl + G', - blur: false, - }); - }), - ); - this.register( - this.listen('Ctrl + P', () => { - this._services.ui.popup.open({ - component: { - factory: components.get('app-navigator'), - inputs: {}, - }, - position: { - vertical: Vertical.top, - horizontal: Horizontal.center, - }, - closeOnKey: 'Escape', - width: 450, - uuid: 'Ctrl + P', - }); - }), - ); - this.register( - this.listen('Ctrl + O', () => { - new FileAnyAction().apply().catch((err: Error) => { - this.log().error(`Fail to call action FileAnyAction; error: ${err.message}`); - }); - }), - ); - this.register( - this.listen('Ctrl + ,', () => { - new SettingsAction().apply().catch((err: Error) => { - this.log().error(`Fail to call action SettingsAction; error: ${err.message}`); - }); - }), - ); - this.register( - this.listen('Ctrl + Q', () => { - new ExitAction().apply().catch((err: Error) => { - this.log().error(`Fail to call action ExitAction; error: ${err.message}`); - }); - }), - ); - this.check().all(); - return Promise.resolve(); - } - - public override destroy(): Promise { - this.unsubscribe(); - this._listener.destroy(); - return Promise.resolve(); - } - - public listen(alias: string, handler: () => void): Subscription { - const key = getKeyByAlias(alias); - if (key === undefined) { - throw new Error(`Hotkey ${alias} isn't found`); - } - let handlers = this._handlers.get(alias); - if (handlers === undefined) { - handlers = new Map void>(); - } - const uuid = unique(); - handlers.set(uuid, handler); - this._handlers.set(alias, handlers); - return new Subscription(alias, () => { - const handlers = this._handlers.get(alias); - if (handlers === undefined) { - return; - } - handlers.delete(uuid); - }); - } - - protected check(): { - inputs(): void; - session(): void; - all(): void; - } { - return { - inputs: (): void => { - // We have to use here litle delay, because some angular material components makes changes - // asynch. To catch last state of components we have to let "them" update itselfs - clearTimeout(this._recent.inputsUpdateState); - this._recent.inputsUpdateState = setTimeout(() => { - this._recent.inputsUpdateState = -1; - if (document.activeElement === null) { - return; - } - const tag: string = document.activeElement.tagName.toLowerCase(); - if (['input', 'textarea'].indexOf(tag) !== -1) { - this._listener.requirement(Requirement.NoInput).deactivate(); - this.remote().unbind(); - } else { - this._listener.requirement(Requirement.NoInput).activate(); - this.remote().bind(); - } - }, 150) as unknown as number; - }, - session: (): void => { - const active = this._services.system.session.active().session(); - if (active === undefined) { - this._listener.requirement(Requirement.Session).deactivate(); - } else { - this._listener.requirement(Requirement.Session).activate(); - } - }, - all: (): void => { - this.check().inputs(); - this.check().session(); - }, - }; - } - - protected remote(): { - bind(): void; - unbind(): void; - } { - return { - bind: (): void => { - if ( - [BindingState.Bound, BindingState.Bounding].includes(this._recent.remoteBinding) - ) { - return; - } - this._recent.remoteBinding = BindingState.Bounding; - Requests.IpcRequest.send( - Requests.Hotkey.On.Response, - new Requests.Hotkey.On.Request(), - ) - .then((response) => { - if (response.error !== undefined && response.error !== '') { - this.log().error( - `Fail to activate listener of hotkeys: ${response.error}`, - ); - this._recent.remoteBinding = BindingState.NotInited; - } else { - this._recent.remoteBinding = BindingState.Bound; - } - }) - .catch((err: Error) => { - this.log().error( - `Fail send request to activate listener of hotkeys: ${err.message}`, - ); - this._recent.remoteBinding = BindingState.NotInited; - }); - }, - unbind: (): void => { - if ( - [BindingState.Unbound, BindingState.Unbounding].includes( - this._recent.remoteBinding, - ) - ) { - return; - } - this._recent.remoteBinding = BindingState.Unbounding; - Requests.IpcRequest.send( - Requests.Hotkey.Off.Response, - new Requests.Hotkey.Off.Request(), - ) - .then((response) => { - if (response.error !== undefined && response.error !== '') { - this.log().error( - `Fail to deactivate listener of hotkeys: ${response.error}`, - ); - this._recent.remoteBinding = BindingState.NotInited; - } else { - this._recent.remoteBinding = BindingState.Unbound; - } - }) - .catch((err: Error) => { - this.log().error( - `Fail send request to deactivate listener of hotkeys: ${err.message}`, - ); - this._recent.remoteBinding = BindingState.NotInited; - }); - }, - }; - } -} -export interface Service extends Interface {} -export const hotkeys = register(new Service()); diff --git a/application/client/src/app/service/hotkeys/emitter.ts b/application/client/src/app/service/hotkeys/emitter.ts deleted file mode 100644 index 346f7d3e2a..0000000000 --- a/application/client/src/app/service/hotkeys/emitter.ts +++ /dev/null @@ -1,102 +0,0 @@ -import { Binding, Requirement } from '@platform/types/hotkeys/map'; - -export class Emitter { - static TIMEOUT = 250; - - private _ctrl: boolean = false; - private _shift: boolean = false; - private _alt: boolean = false; - private _key: boolean = false; - private _collected: string = ''; - private _targets: string[] = []; - private _timeout: unknown; - private readonly _binding: Binding[]; - private readonly _uuid: string; - private readonly _requirements: Requirement[]; - - constructor( - uuid: string, - binding: Binding | Binding[] | undefined, - requirements: Requirement[], - ) { - this._uuid = uuid; - this._binding = binding === undefined ? [] : binding instanceof Array ? binding : [binding]; - this._requirements = requirements; - this._targets = this._binding.map((binding) => { - return binding.key instanceof Array - ? binding.key.map((k) => k.toLowerCase()).join('') - : binding.key.toLowerCase(); - }); - } - - public destroy() { - this._timeout !== undefined && clearTimeout(this._timeout as number); - } - - public isTracking(): boolean { - return this._binding.length > 0; - } - - public ctrl(value: boolean): Emitter { - this._ctrl = this._binding.filter((b) => b.ctrl === true).length > 0 ? value : true; - return this; - } - - public shift(value: boolean): Emitter { - this._shift = this._binding.filter((b) => b.shift === true).length > 0 ? value : true; - return this; - } - - public alt(value: boolean): Emitter { - this._alt = this._binding.filter((b) => b.alt === true).length > 0 ? value : true; - return this; - } - - public key(key: string): Emitter { - this._collected += key.toLowerCase(); - this._key = this._targets.filter((t) => t === this._collected).length > 0; - return this; - } - - public emitted(): boolean { - const emitted = this._alt && this._ctrl && this._shift && this._key; - if (this.isCollectable() && !emitted) { - this._timeout = setTimeout(() => { - this.drop(); - }, Emitter.TIMEOUT); - } else { - this.drop(); - } - return emitted; - } - - public postponed(): boolean { - return this._binding.filter((b) => b.postponed === true).length > 0; - } - - public uuid(): string { - return this._uuid; - } - - public allowed(requirements: Requirement[]): boolean { - let allowed = true; - this._requirements.forEach((req) => { - allowed = !allowed ? false : requirements.includes(req); - }); - return allowed; - } - - protected drop(): Emitter { - this._alt = false; - this._ctrl = false; - this._shift = false; - this._key = false; - this._collected = ''; - this._timeout = undefined; - return this; - } - - protected isCollectable(): boolean { - return this._binding.filter((b) => b.key instanceof Array).length > 0; - } -} diff --git a/application/client/src/app/service/hotkeys/listener.ts b/application/client/src/app/service/hotkeys/listener.ts deleted file mode 100644 index e73878a56d..0000000000 --- a/application/client/src/app/service/hotkeys/listener.ts +++ /dev/null @@ -1,103 +0,0 @@ -import { KeyDescription, Requirement } from '@platform/types/hotkeys/map'; -import { Emitter } from './emitter'; -import { Subject } from '@platform/env/subscription'; -import { env } from '@service/env'; - -export class Listener { - static CONCLUSION_TIMEOUT = 200; - - public subject: Subject = new Subject(); - - protected readonly emitters: Map = new Map(); - protected readonly iteration: { - timer: unknown; - emitted: string[]; - } = { - timer: undefined, - emitted: [], - }; - protected requirements: Requirement[] = []; - - constructor(descs: KeyDescription[]) { - descs.forEach((desc: KeyDescription) => { - this.emitters.set(desc.uuid, new Emitter(desc.uuid, desc.client, desc.required)); - }); - } - - public destroy(): void { - this.iteration.timer !== undefined && clearTimeout(this.iteration.timer as number); - this.emitters.forEach((emitter: Emitter) => { - emitter.destroy(); - }); - } - - public emit(event: KeyboardEvent | string): boolean { - let postponed = false; - if (typeof event === 'string') { - const emitter = this.emitters.get(event); - if (emitter === undefined) { - return false; - } - this.iteration.emitted.indexOf(emitter.uuid()) === -1 && - this.iteration.emitted.push(emitter.uuid()); - } else { - if (this.iteration.timer === undefined) { - this.iteration.emitted = []; - this.iteration.timer = setTimeout(() => { - this._accept(); - }, Listener.CONCLUSION_TIMEOUT); - } - this.emitters.forEach((emitter: Emitter) => { - if (!emitter.isTracking() || !emitter.allowed(this.requirements)) { - return; - } - if ( - emitter - .ctrl(env.platform().darwin() ? event.metaKey : event.ctrlKey) - .alt(event.altKey) - .shift(event.shiftKey) - .key(event.key) - .emitted() - ) { - this.iteration.emitted.indexOf(emitter.uuid()) === -1 && - this.iteration.emitted.push(emitter.uuid()); - postponed = emitter.postponed(); - } - }); - } - if (!postponed) { - return this._accept(); - } else { - return true; - } - } - - public requirement(requirement: Requirement): { - activate(): void; - deactivate(): void; - } { - return { - activate: (): void => { - if (this.requirements.includes(requirement)) { - return; - } - this.requirements.push(requirement); - }, - deactivate: (): void => { - this.requirements = this.requirements.filter((r) => r !== requirement); - }, - }; - } - - private _accept(): boolean { - const emitted = this.iteration.emitted; - this.iteration.timer !== undefined && clearTimeout(this.iteration.timer as number); - this.iteration.timer = undefined; - this.iteration.emitted = []; - if (emitted.length === 0) { - return true; - } - this.subject.emit(emitted[emitted.length - 1]); - return false; - } -} diff --git a/application/client/src/app/service/ilc.ts b/application/client/src/app/service/ilc.ts deleted file mode 100644 index c37fd2092c..0000000000 --- a/application/client/src/app/service/ilc.ts +++ /dev/null @@ -1,234 +0,0 @@ -/** - * Declares and documents the global ILC (Internal Life Cycle) service, which can be injected - * into any Angular service or component to provide standardized infrastructure utilities. - * - * @remarks - * The `ILC` service serves as a central lifecycle-aware utility provider. Its key responsibilities include: - * - * - Automatic delivery of the logging system via `this.ilc().log()`, ensuring consistent logging access across services and components. - * - Managed subscription registration via `this.ilc().env()`, with automatic cleanup: - * - Particularly useful in Angular components, where any subscriptions registered through `ilc` are automatically unsubscribed - * when the component is destroyed. - * - This removes the need for manual cleanup in `ngOnDestroy` and protects against memory leaks or zombie callbacks. - * - Access to globally available application services through a unified interface. - * - Safe event subscription mechanism for internal service events: - * - Works similarly to the Angular lifecycle-aware subscription model. - * - If a service or component is destroyed, the associated subscriptions are automatically removed. - * - * @recommendation - * It is highly recommended to register **all** event subscriptions through the `ILC` system to prevent: - * - Memory leaks caused by unreleased handlers. - * - Logic executing on components or services that have already been destroyed. - * - * @example Angular Component Injection - * ```ts - * @Component({ - * selector: 'app-views-attachments-list', - * templateUrl: './template.html', - * styleUrls: ['./styles.less'], - * standalone: false, - * }) - * @Ilc() // Injects the ILC instance - * export class Attachments extends ChangesDetector implements AfterContentInit { - * public method() { - * this.ilc().log().error('Hello, Ilc!'); - * } - * } - * ``` - * - * @module - * @public - */ -import { - SetupService, - Interface, - Implementation, - register, - DependOn, -} from '@platform/entity/service'; -import { services } from '@register/services'; -import { Events, Declarations } from '@service/ilc/events'; -import { Channel } from '@service/ilc/events.channel'; -import { Emitter } from '@service/ilc/events.emitter'; -import { Services } from '@service/ilc/services'; -import { Logger } from '@platform/log'; -import { session, Session, UnboundTab } from '@service/session'; -import { state } from '@service/state'; -import { jobs } from '@service/jobs'; -import { popup } from '@ui/service/popup'; -import { notifications } from '@ui/service/notifications'; -import { contextmenu } from '@ui/service/contextmenu'; -import { layout } from '@ui/service/layout'; -import { toolbar } from '@ui/service/toolbar'; -import { sidebar } from '@ui/service/sidebar'; -import { bridge } from '@service/bridge'; -import { hotkeys } from '@service/hotkeys'; -import { cli } from '@service/cli'; -import { actions } from '@service/actions'; -import { favorites } from '@service/favorites'; -import { sys } from '@service/sys'; -import { plugins } from './plugins'; - -import { Subscriber } from '@platform/env/subscription'; - -export { Channel, Emitter, Declarations, Services }; - -/** - * Defines the internal ILC API used to expose core services and event infrastructure. - * - * @interface InternalAPI - * @internal - */ -export interface InternalAPI { - /** - * Provides access to the internal communication channel. - */ - channel: Channel; - - /** - * Event emitter used for publishing events across the system. - */ - emitter: Emitter; - - /** - * Collection of globally available application services. - */ - services: Services; - - /** - * Logger instance scoped to the current component or service. - */ - logger: Logger; -} - -/** - * Defines the environment-scoped subscription system. - * Used for automatic cleanup of event listeners tied to component lifecycle. - * - * @interface Env - * @internal - */ -export interface Env { - /** - * Subscription manager for registering lifecycle-aware event handlers. - */ - subscriber: Subscriber; -} - -/** - * Provides access to session-related data within the component or service. - * - * @interface Accessor - * @internal - */ -export interface Accessor { - /** - * Grants access to the current bound session. - * The callback is invoked with the session instance, if available. - * - * @param cb - A callback to handle the current session. - * @returns `true` if the session was available and the callback was called, otherwise `false`. - */ - session: (cb: (session: Session) => void) => boolean; - - /** - * Grants access to the unbound tab state. - * The callback is invoked if the tab is not associated with a session. - * - * @param cb - A callback to handle the unbound tab state. - * @returns `true` if unbound state was available and the callback was called, otherwise `false`. - */ - unbound: (cb: (session: UnboundTab) => void) => boolean; -} - -/** - * Manages lifecycle hooks for cleanup logic. - * - * @interface Life - * @internal - */ -export interface Life { - /** - * Registers a handler to be called automatically when the component or service is destroyed. - * - * @param handler - A cleanup function. - */ - destroy: (handler: () => void) => void; -} - -/** - * The main public ILC interface available to Angular components and services via `this.ilc()`. - * - * @interface IlcInterface - * @public - */ -export interface IlcInterface { - /** - * Returns a logger instance scoped to the current context. - */ - log(): Logger; - - /** - * Exposes internal ILC APIs: communication channels, emitter, services, and logger. - * Use with caution - intended mostly for internal integration. - */ - ilc(): InternalAPI; - - /** - * Provides access to environment-level features, such as auto-cleanup subscriptions. - */ - env(): Env; - - /** - * Grants access to session state and unbound tab context. - */ - access(): Accessor; - - /** - * Registers destruction hooks for performing cleanup when the owning - * component or service is destroyed. - */ - life(): Life; -} - -// System services -@DependOn(session) -@DependOn(state) -@DependOn(jobs) -@DependOn(bridge) -@DependOn(hotkeys) -@DependOn(cli) -@DependOn(actions) -@DependOn(favorites) -@DependOn(sys) -@DependOn(plugins) -// UI services -@DependOn(sidebar) -@DependOn(toolbar) -@DependOn(layout) -@DependOn(popup) -@DependOn(notifications) -@DependOn(contextmenu) -@SetupService(services['ilc']) -export class Service extends Implementation { - private readonly _events: Events = new Events(); - - public override destroy(): Promise { - this._events.destroy(); - return Promise.resolve(); - } - - public channel(owner: string, logger: Logger): Channel { - return new Channel(owner, this._events, logger); - } - - public emitter(owner: string, logger: Logger): Emitter { - return new Emitter(owner, this._events, logger); - } - - public services(owner: string, logger: Logger): Services { - return new Services(owner, logger); - } -} -export interface Service extends Interface {} -export const ilc = register(new Service()); diff --git a/application/client/src/app/service/ilc/declarations/backend/job.ts b/application/client/src/app/service/ilc/declarations/backend/job.ts deleted file mode 100644 index d3e2480d7c..0000000000 --- a/application/client/src/app/service/ilc/declarations/backend/job.ts +++ /dev/null @@ -1,6 +0,0 @@ -export interface JobEvent { - uuid: string; - progress: number; - session?: string; - desc?: string; -} diff --git a/application/client/src/app/service/ilc/declarations/backend/state.ts b/application/client/src/app/service/ilc/declarations/backend/state.ts deleted file mode 100644 index 30a5e305f1..0000000000 --- a/application/client/src/app/service/ilc/declarations/backend/state.ts +++ /dev/null @@ -1,9 +0,0 @@ -export enum BackendState { - Ready = 'Ready', - Locked = 'Locked', -} - -export interface BackendStateEvent { - state: BackendState; - job: string; -} diff --git a/application/client/src/app/service/ilc/declarations/contextmenu.ts b/application/client/src/app/service/ilc/declarations/contextmenu.ts deleted file mode 100644 index 52f4e9dd0e..0000000000 --- a/application/client/src/app/service/ilc/declarations/contextmenu.ts +++ /dev/null @@ -1 +0,0 @@ -export { IMenu, IMenuItem } from '@ui/service/contextmenu'; diff --git a/application/client/src/app/service/ilc/declarations/hotkey.ts b/application/client/src/app/service/ilc/declarations/hotkey.ts deleted file mode 100644 index 6894e9aeaf..0000000000 --- a/application/client/src/app/service/ilc/declarations/hotkey.ts +++ /dev/null @@ -1,27 +0,0 @@ -export enum Hotkey { - newTab = 'newTab', - closeTab = 'closeTab', - openLocalFile = 'openLocalFile', - focusSearchInput = 'focusSearchInput', - openSearchFiltersTab = 'openSearchFiltersTab', - selectNextRow = 'selectNextRow', - selectPrevRow = 'selectPrevRow', - scrollToBegin = 'scrollToBegin', - scrollToEnd = 'scrollToEnd', - focusMainView = 'focusMainView', - focusSearchView = 'focusSearchView', - showHotkeysMapDialog = 'showHotkeysMapDialog', - sidebarToggle = 'sidebarToggle', - toolbarToggle = 'toolbarToggle', - recentFiles = 'recentFiles', - recentFilters = 'recentFilters', - settings = 'settings', - nextTab = 'nextTab', - prevTab = 'prevTab', - storeFilter = 'storeFilter', - storeChart = 'storeChart', - selectAllSearchResult = 'selectAllSearchResult', -} -export interface HotkeyEvent { - key: Hotkey; -} diff --git a/application/client/src/app/service/ilc/declarations/index.ts b/application/client/src/app/service/ilc/declarations/index.ts deleted file mode 100644 index a1b6b18814..0000000000 --- a/application/client/src/app/service/ilc/declarations/index.ts +++ /dev/null @@ -1,9 +0,0 @@ -export { Hotkey, HotkeyEvent } from './hotkey'; -export { Popup } from './popup'; -export { IMenu, IMenuItem } from './contextmenu'; -export { AvailableSidebarTabs } from './sidebar'; -export { AvailableToolbarTabs } from './toolbar'; -export { BackendState, BackendStateEvent } from './backend/state'; -export { JobEvent } from './backend/job'; - -export * as UI from './ui'; diff --git a/application/client/src/app/service/ilc/declarations/popup.ts b/application/client/src/app/service/ilc/declarations/popup.ts deleted file mode 100644 index 1285142800..0000000000 --- a/application/client/src/app/service/ilc/declarations/popup.ts +++ /dev/null @@ -1 +0,0 @@ -export { Popup } from '@ui/service/popup'; diff --git a/application/client/src/app/service/ilc/declarations/sidebar.ts b/application/client/src/app/service/ilc/declarations/sidebar.ts deleted file mode 100644 index fb3269add5..0000000000 --- a/application/client/src/app/service/ilc/declarations/sidebar.ts +++ /dev/null @@ -1,2 +0,0 @@ -import { Available as AvailableSidebarTabs } from '@ui/service/sidebar/register'; -export { AvailableSidebarTabs }; diff --git a/application/client/src/app/service/ilc/declarations/toolbar.ts b/application/client/src/app/service/ilc/declarations/toolbar.ts deleted file mode 100644 index 7c050c518c..0000000000 --- a/application/client/src/app/service/ilc/declarations/toolbar.ts +++ /dev/null @@ -1,2 +0,0 @@ -import { Available as AvailableToolbarTabs } from '@ui/service/toolbar/register'; -export { AvailableToolbarTabs }; diff --git a/application/client/src/app/service/ilc/declarations/ui/index.ts b/application/client/src/app/service/ilc/declarations/ui/index.ts deleted file mode 100644 index 22999087a0..0000000000 --- a/application/client/src/app/service/ilc/declarations/ui/index.ts +++ /dev/null @@ -1 +0,0 @@ -export { Rank } from './rank'; diff --git a/application/client/src/app/service/ilc/declarations/ui/rank.ts b/application/client/src/app/service/ilc/declarations/ui/rank.ts deleted file mode 100644 index 8ae95cfde2..0000000000 --- a/application/client/src/app/service/ilc/declarations/ui/rank.ts +++ /dev/null @@ -1,4 +0,0 @@ -export interface Rank { - len: number; - session: string; -} diff --git a/application/client/src/app/service/ilc/events.channel.ts b/application/client/src/app/service/ilc/events.channel.ts deleted file mode 100644 index 39bd1ec28f..0000000000 --- a/application/client/src/app/service/ilc/events.channel.ts +++ /dev/null @@ -1,161 +0,0 @@ -import { Subject, Subscription } from '@platform/env/subscription'; -import { Events } from './events'; -import { Logger } from '@platform/log'; -import { Row } from '@schema/content/row'; -import { Base } from '../session/base'; -import { Session } from '../session/session'; - -import * as Declarations from './declarations'; - -export { Declarations }; - -export type Handler = (event: T) => void; -export type Subscriber = (handler: Handler) => Subscription; - -export class Channel { - public readonly system: { - init: (handler: Handler) => Subscription; - ready: (handler: Handler) => Subscription; - }; - public readonly backend: { - state: (handler: Handler) => Subscription; - job: (handler: Handler) => Subscription; - }; - public readonly session: { - closed: (handler: Handler) => Subscription; - open: (handler: Handler) => Subscription; - created: (handler: Handler) => Subscription; - change: (handler: Handler) => Subscription; - closing: (handler: Handler) => Subscription; - }; - public readonly ux: { - hotkey: (handler: Handler) => Subscription; - }; - public readonly ui: { - contextmenu: { - open: (handler: Handler) => Subscription; - close: (handler: Handler) => Subscription; - }; - popup: { - open: (handler: Handler) => Subscription; - close: (handler: Handler) => Subscription; - updated: (handler: Handler) => Subscription; - }; - toolbar: { - min: (handler: Handler) => Subscription; - max: (handler: Handler) => Subscription; - occupy: (handler: Handler) => Subscription; - state: ( - handler: Handler< - (state: { min: boolean; max: boolean; occupied: boolean; size: number }) => void - >, - ) => Subscription; - resize: (handler: Handler) => Subscription; - view: (handler: Handler) => Subscription; - }; - sidebar: { - min: (handler: Handler) => Subscription; - max: (handler: Handler) => Subscription; - resize: (handler: Handler) => Subscription; - view: (handler: Handler) => Subscription; - }; - window: { - resize: (handler: Handler) => Subscription; - }; - layout: { - resize: (handler: Handler) => Subscription; - }; - row: { - hover: (handler: Handler) => Subscription; - }; - input: { - focused: (handler: Handler) => Subscription; - blur: (handler: Handler) => Subscription; - }; - }; - private readonly _events: Events; - private readonly _owner: string; - private readonly _logger: Logger; - - private _subscriptions: Subscription[] = []; - - constructor(owner: string, events: Events, logger: Logger) { - this._owner = owner; - this._events = events; - this._logger = logger; - this.system = { - init: this._add(this._events.system.init), - ready: this._add(this._events.system.ready), - }; - this.backend = { - state: this._add(this._events.backend.state), - job: this._add(this._events.backend.job), - }; - this.session = { - closed: this._add(this._events.session.closed), - open: this._add(this._events.session.open), - created: this._add(this._events.session.created), - change: this._add(this._events.session.change), - closing: this._add(this._events.session.closing), - }; - this.ux = { - hotkey: this._add(this._events.ux.hotkey), - }; - this.ui = { - contextmenu: { - open: this._add(this._events.ui.contextmenu.open), - close: this._add(this._events.ui.contextmenu.close), - }, - popup: { - open: this._add(this._events.ui.popup.open), - close: this._add(this._events.ui.popup.close), - updated: this._add(this._events.ui.popup.updated), - }, - toolbar: { - min: this._add(this._events.ui.toolbar.min), - max: this._add(this._events.ui.toolbar.max), - occupy: this._add(this._events.ui.toolbar.occupy), - state: this._add< - (state: { min: boolean; max: boolean; occupied: boolean; size: number }) => void - >(this._events.ui.toolbar.state), - resize: this._add(this._events.ui.toolbar.resize), - view: this._add(this._events.ui.toolbar.view), - }, - sidebar: { - min: this._add(this._events.ui.sidebar.min), - max: this._add(this._events.ui.sidebar.max), - resize: this._add(this._events.ui.sidebar.resize), - view: this._add(this._events.ui.sidebar.view), - }, - window: { - resize: this._add(this._events.ui.window.resize), - }, - layout: { - resize: this._add(this._events.ui.layout.resize), - }, - row: { - hover: this._add(this._events.ui.row.hover), - }, - input: { - focused: this._add(this._events.ui.input.focused), - blur: this._add(this._events.ui.input.blur), - }, - }; - } - - public destroy() { - this._subscriptions.forEach((subscription) => { - subscription.destroy(); - }); - this._logger.verbose(`All subscription has beed destroyed`); - } - - private _add(subject: Subject): Subscriber { - const subscriptions = this._subscriptions; - return function (handler: Handler): Subscription { - const subscription = subject.subscribe(handler); - subscriptions.push(subscription); - return subscription; - }; - } -} diff --git a/application/client/src/app/service/ilc/events.emitter.ts b/application/client/src/app/service/ilc/events.emitter.ts deleted file mode 100644 index 255ac8ace6..0000000000 --- a/application/client/src/app/service/ilc/events.emitter.ts +++ /dev/null @@ -1,155 +0,0 @@ -import { Subject, Subscription } from '@platform/env/subscription'; -import { Events } from './events'; -import { Logger } from '@platform/log'; -import { Row } from '@schema/content/row'; -import { Base } from '../session/base'; -import { Session } from '../session/session'; - -import * as Declarations from './declarations'; - -export { Declarations }; - -export type Handler = (event: T) => void; - -export class Emitter { - public readonly system: { - init: Handler; - ready: Handler; - }; - public readonly backend: { - state: Handler; - job: Handler; - }; - public readonly session: { - closed: Handler; - open: Handler; - created: Handler; - change: Handler; - closing: Handler; - }; - public readonly ux: { - hotkey: Handler; - }; - public readonly ui: { - contextmenu: { - open: Handler; - close: Handler; - }; - popup: { - open: Handler; - close: Handler; - updated: Handler; - }; - toolbar: { - min: Handler; - max: Handler; - occupy: Handler; - state: Handler< - (state: { min: boolean; max: boolean; occupied: boolean; size: number }) => void - >; - resize: Handler; - view: Handler; - }; - sidebar: { - min: Handler; - max: Handler; - resize: Handler; - view: Handler; - }; - window: { - resize: Handler; - }; - layout: { - resize: Handler; - }; - row: { - hover: Handler; - }; - input: { - focused: Handler; - blur: Handler; - }; - }; - private readonly _events: Events; - private readonly _owner: string; - private readonly _logger: Logger; - - private _subscriptions: Subscription[] = []; - - constructor(owner: string, events: Events, logger: Logger) { - this._owner = owner; - this._events = events; - this._logger = logger; - this.system = { - init: this._add(this._events.system.init), - ready: this._add(this._events.system.ready), - }; - this.backend = { - state: this._add(this._events.backend.state), - job: this._add(this._events.backend.job), - }; - this.session = { - closed: this._add(this._events.session.closed), - open: this._add(this._events.session.open), - created: this._add(this._events.session.created), - change: this._add(this._events.session.change), - closing: this._add(this._events.session.closing), - }; - this.ux = { - hotkey: this._add(this._events.ux.hotkey), - }; - this.ui = { - contextmenu: { - open: this._add(this._events.ui.contextmenu.open), - close: this._add(this._events.ui.contextmenu.close), - }, - popup: { - open: this._add(this._events.ui.popup.open), - close: this._add(this._events.ui.popup.close), - updated: this._add(this._events.ui.popup.updated), - }, - toolbar: { - min: this._add(this._events.ui.toolbar.min), - max: this._add(this._events.ui.toolbar.max), - occupy: this._add(this._events.ui.toolbar.occupy), - state: this._add< - (state: { min: boolean; max: boolean; occupied: boolean; size: number }) => void - >(this._events.ui.toolbar.state), - resize: this._add(this._events.ui.toolbar.resize), - view: this._add(this._events.ui.toolbar.view), - }, - sidebar: { - min: this._add(this._events.ui.sidebar.min), - max: this._add(this._events.ui.sidebar.max), - resize: this._add(this._events.ui.sidebar.resize), - view: this._add(this._events.ui.sidebar.view), - }, - window: { - resize: this._add(this._events.ui.window.resize), - }, - layout: { - resize: this._add(this._events.ui.layout.resize), - }, - row: { - hover: this._add(this._events.ui.row.hover), - }, - input: { - focused: this._add(this._events.ui.input.focused), - blur: this._add(this._events.ui.input.blur), - }, - }; - } - - public destroy() { - this._subscriptions.forEach((subscription) => { - subscription.destroy(); - }); - this._logger.verbose(`All subscription has beed destroyed`); - } - - private _add(subject: Subject): Handler { - return function (event: T): void { - subject.emit(event); - }; - } -} diff --git a/application/client/src/app/service/ilc/events.ts b/application/client/src/app/service/ilc/events.ts deleted file mode 100644 index 9425b53f44..0000000000 --- a/application/client/src/app/service/ilc/events.ts +++ /dev/null @@ -1,158 +0,0 @@ -import { Subject } from '@platform/env/subscription'; -import { Row } from '@schema/content/row'; -import { Base } from '../session/base'; -import { Session } from '../session/session'; - -import * as Declarations from './declarations'; - -export { Declarations }; - -export class Events { - public readonly system: { - init: Subject; - ready: Subject; - }; - public readonly backend: { - state: Subject; - job: Subject; - }; - public readonly session: { - closed: Subject; - open: Subject; - created: Subject; - change: Subject; - closing: Subject; - }; - public readonly ux: { - hotkey: Subject; - }; - public readonly ui: { - contextmenu: { - open: Subject; - close: Subject; - }; - popup: { - open: Subject; - close: Subject; - updated: Subject; - }; - toolbar: { - min: Subject; - max: Subject; - occupy: Subject; - state: Subject< - (state: { min: boolean; max: boolean; occupied: boolean; size: number }) => void - >; - resize: Subject; - view: Subject; - }; - sidebar: { - min: Subject; - max: Subject; - resize: Subject; - view: Subject; - }; - window: { - resize: Subject; - }; - layout: { - resize: Subject; - }; - row: { - hover: Subject; - }; - input: { - focused: Subject; - blur: Subject; - }; - }; - - private _subjects: Subject[] = []; - - constructor() { - this.system = { - init: this._add(new Subject()), - ready: this._add(new Subject()), - }; - this.backend = { - state: this._add( - new Subject(), - ), - job: this._add(new Subject()), - }; - this.ux = { - hotkey: this._add(new Subject()), - }; - this.session = { - closed: this._add(new Subject()), - open: this._add(new Subject()), - created: this._add(new Subject()), - change: this._add(new Subject()), - closing: this._add(new Subject()), - }; - this.ui = { - contextmenu: { - open: this._add(new Subject()), - close: this._add(new Subject()), - }, - popup: { - open: this._add(new Subject()), - close: this._add(new Subject()), - updated: this._add(new Subject()), - }, - toolbar: { - min: this._add(new Subject()), - max: this._add(new Subject()), - occupy: this._add(new Subject()), - state: this._add< - (state: { min: boolean; max: boolean; occupied: boolean; size: number }) => void - >( - new Subject< - (state: { - min: boolean; - max: boolean; - occupied: boolean; - size: number; - }) => void - >(), - ), - resize: this._add(new Subject()).balanced(25), - view: this._add( - new Subject(), - ), - }, - sidebar: { - min: this._add(new Subject()), - max: this._add(new Subject()), - resize: this._add(new Subject()).balanced(25), - view: this._add( - new Subject(), - ), - }, - window: { - resize: this._add(new Subject().balanced(25)), - }, - layout: { - resize: this._add(new Subject()), - }, - input: { - focused: this._add(new Subject()), - blur: this._add(new Subject()), - }, - row: { - hover: this._add(new Subject()), - }, - }; - } - - public destroy() { - this._subjects.forEach((subject) => { - subject.destroy(); - }); - } - - private _add(subject: Subject): Subject { - this._subjects.push(subject as Subject); - return subject; - } -} diff --git a/application/client/src/app/service/ilc/services.ts b/application/client/src/app/service/ilc/services.ts deleted file mode 100644 index e1596d73d3..0000000000 --- a/application/client/src/app/service/ilc/services.ts +++ /dev/null @@ -1,93 +0,0 @@ -import { popup, Service as UIPopupService } from '@ui/service/popup'; -import { notifications, Service as UINotificationsService } from '@ui/service/notifications'; -import { contextmenu, Service as UIContextmenuService } from '@ui/service/contextmenu'; -import { layout, Service as UILayoutService } from '@ui/service/layout'; -import { toolbar, Service as UIToolbarService } from '@ui/service/toolbar'; -import { sidebar, Service as UISidebarService } from '@ui/service/sidebar'; -import { styles, Service as UIStylesService } from '@ui/service/styles'; -import { session, Service as SessionService } from '@service/session'; -import { jobs, Service as JobsService } from '@service/jobs'; -import { state, Service as StateService } from '@service/state'; -import { bridge, Service as BridgeService } from '@service/bridge'; -import { recent, Service as RecentService } from '@service/recent'; -import { hotkeys, Service as HotkeysService } from '@service/hotkeys'; -import { history, Service as HistoryService } from '@service/history'; -import { listener, Service as ListenerService } from '@ui/service/listener'; -import { lockers, Service as LockersService } from '@ui/service/lockers'; -import { dropfiles, Service as DragAndDropFilesService } from '@ui/service/dropfiles'; -import { env, Service as EnvService } from '@service/env'; -import { actions, Service as ActionsService } from '@service/actions'; -import { settings, Service as Settings } from '@service/settings'; -import { favorites, Service as Favorites } from '@service/favorites'; -import { sys, Service as Sys } from '@service/sys'; -import { changelogs, Service as Changelogs } from '@service/changelogs'; -import { plugins, Service as Plugins } from '@service/plugins'; - -import { Logger } from '@platform/log'; - -export class Services { - public readonly system: { - session: SessionService; - state: StateService; - jobs: JobsService; - bridge: BridgeService; - recent: RecentService; - hotkeys: HotkeysService; - history: HistoryService; - env: EnvService; - actions: ActionsService; - settings: Settings; - favorites: Favorites; - sys: Sys; - changelogs: Changelogs; - plugins: Plugins; - }; - public readonly ui: { - popup: UIPopupService; - notifications: UINotificationsService; - contextmenu: UIContextmenuService; - layout: UILayoutService; - toolbar: UIToolbarService; - sidebar: UISidebarService; - styles: UIStylesService; - listener: ListenerService; - lockers: LockersService; - dropfiles: DragAndDropFilesService; - }; - - private readonly _owner: string; - private readonly _logger: Logger; - - constructor(owner: string, logger: Logger) { - this._owner = owner; - this._logger = logger; - this.system = { - session, - state, - jobs, - bridge, - recent, - hotkeys, - history, - env, - actions, - settings, - favorites, - sys, - changelogs, - plugins, - }; - this.ui = { - popup, - notifications, - contextmenu, - layout, - toolbar, - sidebar, - styles, - listener, - lockers, - dropfiles, - }; - } -} diff --git a/application/client/src/app/service/jobs.ts b/application/client/src/app/service/jobs.ts deleted file mode 100644 index 1278745bf6..0000000000 --- a/application/client/src/app/service/jobs.ts +++ /dev/null @@ -1,79 +0,0 @@ -import { SetupService, Interface, Implementation, register } from '@platform/entity/service'; -import { Job } from './jobs/job'; -import { services } from '@register/services'; -import { ilc, Emitter } from '@service/ilc'; - -import * as Events from '@platform/ipc/event/index'; - -export { Job }; - -@SetupService(services['jobs']) -export class Service extends Implementation { - private _emitter!: Emitter; - private _jobs: Map> = new Map(); - - public override ready(): Promise { - this._emitter = ilc.emitter(this.getName(), this.log()); - this.register( - Events.IpcEvent.subscribe(Events.State.Job.Event, (event) => { - let job = this.find(event.uuid); - if (job === undefined) { - job = new Job({ - session: event.session, - uuid: event.uuid, - name: event.name, - desc: event.desc, - progress: event.progress, - spinner: event.spinner, - }); - } else { - job.update(event); - } - let jobs = this._jobs.get(job.session); - if (jobs === undefined) { - jobs = new Map(); - } - jobs.set(job.uuid, job); - this._jobs.set(job.session, jobs); - this._emitter.backend.job(job); - }), - ); - return Promise.resolve(); - } - - public override destroy(): Promise { - this.unsubscribe(); - return Promise.resolve(); - } - - public find(uuid: string): Job | undefined { - let target: Job | undefined; - Array.from(this._jobs.values()).forEach((jobs) => { - if (target !== undefined) { - return; - } - target = Array.from(jobs.values()).find((j) => j.uuid === uuid); - }); - return target; - } - - public session(session: string): Job[] { - const jobs = this._jobs.get(session); - if (jobs === undefined) { - return []; - } else { - return Array.from(jobs.values()); - } - } - - public globals(): Job[] { - const jobs = this._jobs.get(Job.GLOBAL_JOBS); - if (jobs === undefined) { - return []; - } else { - return Array.from(jobs.values()); - } - } -} -export interface Service extends Interface {} -export const jobs = register(new Service()); diff --git a/application/client/src/app/service/jobs/job.ts b/application/client/src/app/service/jobs/job.ts deleted file mode 100644 index 3633e1c66f..0000000000 --- a/application/client/src/app/service/jobs/job.ts +++ /dev/null @@ -1,55 +0,0 @@ -import { unique } from '@platform/env/sequence'; -import * as validator from '@platform/env/obj'; - -export interface IJob { - uuid: string; - progress: number; - session?: string; - desc?: string; -} - -export class Job { - static GLOBAL_JOBS = `___global_jobs___`; - - public uuid: string; - public progress = 0; - public spinner: boolean; - public session: string; - public name?: string; - public desc?: string; - public icon?: string; - - constructor(job: { - uuid?: string; - session?: string; - name?: string; - desc?: string; - progress?: number; - icon?: string; - spinner?: boolean; - }) { - this.uuid = job.uuid !== undefined ? job.uuid : unique(); - this.session = validator.getAsNotEmptyStringOrAsUndefined(job, 'session'); - this.name = validator.getAsNotEmptyStringOrAsUndefined(job, 'name'); - this.desc = validator.getAsNotEmptyStringOrAsUndefined(job, 'desc'); - this.icon = validator.getAsNotEmptyStringOrAsUndefined(job, 'icon'); - this.progress = validator.getAsValidNumber(job, 'progress', { - defaults: 0, - max: 100, - min: 0, - }); - this.spinner = typeof job.spinner === 'boolean' ? job.spinner : false; - this.session = this.session === undefined ? Job.GLOBAL_JOBS : this.session; - } - - public update(job: { name?: string; desc?: string; progress?: number; icon?: string }) { - this.desc = job.desc !== undefined ? job.desc : this.desc; - this.name = job.name !== undefined ? job.name : this.name; - this.progress = job.progress !== undefined ? job.progress : this.progress; - this.icon = job.icon !== undefined ? job.icon : this.icon; - } - - public isDone(): boolean { - return this.progress === 100; - } -} diff --git a/application/client/src/app/service/plugins.ts b/application/client/src/app/service/plugins.ts deleted file mode 100644 index e83e18a183..0000000000 --- a/application/client/src/app/service/plugins.ts +++ /dev/null @@ -1,167 +0,0 @@ -import { SetupService, Interface, Implementation, register } from '@platform/entity/service'; -import { services } from '@register/services'; -import { InvalidPluginEntity, PluginEntity, PluginRunData } from '@platform/types/bindings/plugins'; - -import * as Requests from '@platform/ipc/request/index'; - -@SetupService(services['plugins']) -export class Service extends Implementation { - protected preload: PluginEntity[] = []; - - public override ready(): Promise { - return this.list() - .installed() - .then((plugins) => { - this.preload = plugins; - }) - .catch((err: Error) => { - this.log().error(`Fail load installed plugins list: ${err.message}`); - }); - } - - public list(): { - installed(): Promise; - invalid(): Promise; - preload(): PluginEntity[]; - } { - return { - installed: (): Promise => { - return new Promise((reslove, reject) => { - Requests.IpcRequest.send( - Requests.Plugins.ListInstalled.Response, - new Requests.Plugins.ListInstalled.Request(), - ) - .then((response: Requests.Plugins.ListInstalled.Response) => { - reslove(response.plugins); - }) - .catch(reject); - }); - }, - invalid: (): Promise => { - return new Promise((reslove, reject) => { - Requests.IpcRequest.send( - Requests.Plugins.ListInvalid.Response, - new Requests.Plugins.ListInvalid.Request(), - ) - .then((response: Requests.Plugins.ListInvalid.Response) => { - reslove(response.invalidPlugins); - }) - .catch(reject); - }); - }, - preload: (): PluginEntity[] => { - return this.preload; - }, - }; - } - - public listInstalledPaths(): Promise { - return new Promise((reslove, reject) => { - Requests.IpcRequest.send( - Requests.Plugins.ListInstalledPaths.Response, - new Requests.Plugins.ListInstalledPaths.Request(), - ) - .then((response: Requests.Plugins.ListInstalledPaths.Response) => { - reslove(response.paths); - }) - .catch(reject); - }); - } - - public listInvalidPaths(): Promise { - return new Promise((reslove, reject) => { - Requests.IpcRequest.send( - Requests.Plugins.ListInvalidPaths.Response, - new Requests.Plugins.ListInvalidPaths.Request(), - ) - .then((response: Requests.Plugins.ListInvalidPaths.Response) => { - reslove(response.paths); - }) - .catch(reject); - }); - } - - public installedPluginInfo(pluginPath: string): Promise { - return new Promise((reslove, reject) => { - Requests.IpcRequest.send( - Requests.Plugins.InstalledPluginInfo.Response, - new Requests.Plugins.InstalledPluginInfo.Request({ pluginPath }), - ) - .then((response: Requests.Plugins.InstalledPluginInfo.Response) => { - reslove(response.plugin); - }) - .catch(reject); - }); - } - - public invalidPluginInfo(pluginPath: string): Promise { - return new Promise((reslove, reject) => { - Requests.IpcRequest.send( - Requests.Plugins.InvalidPluginInfo.Response, - new Requests.Plugins.InvalidPluginInfo.Request({ pluginPath }), - ) - .then((response: Requests.Plugins.InvalidPluginInfo.Response) => { - reslove(response.invalidPlugin); - }) - .catch(reject); - }); - } - - public getPluginRunData(pluginPath: string): Promise { - return new Promise((reslove, reject) => { - Requests.IpcRequest.send( - Requests.Plugins.PluginRunData.Response, - new Requests.Plugins.PluginRunData.Request({ pluginPath }), - ) - .then((response: Requests.Plugins.PluginRunData.Response) => { - reslove(response.data); - }) - .catch(reject); - }); - } - - public reloadPlugins(): Promise { - return new Promise((resolve, reject) => { - Requests.IpcRequest.send( - Requests.Plugins.Reload.Response, - new Requests.Plugins.Reload.Request(), - ) - .then(() => { - // To drop a cache to updated list - this.ready().catch(reject).finally(resolve); - }) - .catch(reject); - }); - } - - public addPlugin(pluginPath: string): Promise { - return new Promise((resolve, reject) => { - Requests.IpcRequest.send( - Requests.Plugins.AddPlugin.Response, - new Requests.Plugins.AddPlugin.Request({ pluginPath }), - ) - .then(() => { - // To drop a cache to update list. - this.ready().catch(reject).finally(resolve); - }) - .catch(reject); - }); - } - - public removePlugin(pluginPath: string): Promise { - return new Promise((resolve, reject) => { - Requests.IpcRequest.send( - Requests.Plugins.RemovePlugin.Response, - new Requests.Plugins.RemovePlugin.Request({ pluginPath }), - ) - .then(() => { - // To drop a cache to update list. - this.ready().catch(reject).finally(resolve); - }) - .catch(reject); - }); - } -} - -export interface Service extends Interface {} -export const plugins = register(new Service()); diff --git a/application/client/src/app/service/recent.ts b/application/client/src/app/service/recent.ts deleted file mode 100644 index 07116f3e53..0000000000 --- a/application/client/src/app/service/recent.ts +++ /dev/null @@ -1,112 +0,0 @@ -import { - SetupService, - Interface, - Implementation, - register, - DependOn, -} from '@platform/entity/service'; -import { services } from '@register/services'; -import { bridge } from '@service/bridge'; -import { Action } from './recent/action'; -import { error } from '@platform/log/utils'; -import { Subject } from '@platform/env/subscription'; - -import * as $ from '@platform/types/observe'; - -const STORAGE_KEY = 'user_recent_actions'; - -@DependOn(bridge) -@SetupService(services['recent']) -export class Service extends Implementation { - public readonly updated: Subject = new Subject(); - - public override destroy(): Promise { - this.updated.destroy(); - return super.destroy(); - } - - public async get(): Promise { - const entries = await bridge.entries({ key: STORAGE_KEY }).get(); - const actions = entries - .map((entry) => { - const action = Action.from(entry); - if (action instanceof Error) { - this.log().error(`Fail to read action: ${error(action)}`); - return undefined; - } else { - return action; - } - }) - .filter((a) => a !== undefined) as Action[]; - const invalid = actions.filter((a) => a.compatibility.invalidUuid !== undefined); - if (invalid.length > 0) { - await this.delete(invalid.map((a) => a.compatibility.invalidUuid as string)) - .then(() => { - this.log().debug( - `${invalid.length} actions with invalid UUIDs has been removed`, - ); - }) - .catch((err: Error) => { - this.log().error( - `Fail to remove recent actions with invalid uuid: ${err.message}`, - ); - }); - } - const converted = actions.filter((a) => a.compatibility.converted); - if (converted.length > 0) { - await this.update(converted) - .then(() => { - this.log().debug(`${converted.length} converted actions has been updated`); - }) - .catch((err: Error) => { - this.log().error(`Fail to update converted recent actions: ${err.message}`); - }); - } - return actions; - } - - public async update(actions: Action[]): Promise { - if (actions.length === 0) { - return; - } - const stored = await this.get(); - actions.forEach((action) => { - const found = stored.find((a) => a.uuid === action.uuid); - if (found === undefined) { - return; - } - action.merge(found); - }); - return bridge - .entries({ key: STORAGE_KEY }) - .update(actions.map((a) => a.entry().to())) - .then(() => { - this.updated.emit(); - }) - .catch((err: Error) => { - this.log().error(`Fail to update recent storage: ${err.message}`); - }); - } - - public delete(uuids: string[]): Promise { - return new Promise((resolve, reject) => { - bridge - .entries({ key: STORAGE_KEY }) - .delete(uuids) - .then(() => { - this.updated.emit(); - resolve(); - }) - .catch((err: Error) => { - reject(err); - }); - }); - } - - public add(observe: $.Observe): Promise { - const action = new Action(observe); - return this.update([action]); - } -} -export interface Service extends Interface {} -export const recent = register(new Service()); diff --git a/application/client/src/app/service/recent/action.ts b/application/client/src/app/service/recent/action.ts deleted file mode 100644 index f7965aa74a..0000000000 --- a/application/client/src/app/service/recent/action.ts +++ /dev/null @@ -1,184 +0,0 @@ -import { Entry } from '@platform/types/storage/entry'; -import { error } from '@platform/log/utils'; -import { session } from '@service/session'; -import { lockers, Locker } from '@ui/service/lockers'; -import { Stat, IStat } from './stat'; -import { recent } from '@service/recent'; -import { scope } from '@platform/env/scope'; -import { Logger } from '@platform/log'; - -import * as $ from '@platform/types/observe'; -import * as compatibility from './compatibility'; - -interface IActionContent { - stat: IStat; - observe: $.IObserve; -} - -export class Action { - static from(entry: Entry): Action | Error { - const action = new Action($.Observe.new()); - const error = action.entry().from(entry); - return error instanceof Error ? error : action; - } - - protected logger: Logger; - - public stat: Stat = Stat.defaults(); - public uuid: string; - public compatibility: { - converted: boolean; - invalidUuid: string | undefined; - } = { - converted: false, - invalidUuid: undefined, - }; - - constructor(public observe: $.Observe) { - this.uuid = observe.signature(); - this.logger = scope.getLogger(`Action: ${this.uuid}`); - } - - public isSuitable(observe?: $.Observe): boolean { - if (observe === undefined) { - return true; - } - if (observe.origin.nature().alias() !== this.observe.origin.nature().alias()) { - return false; - } - return this.observe.parser.alias() === observe.parser.alias(); - } - - public description(): $.Description.IOriginDetails { - return this.observe.origin.desc(); - } - - public entry(): { - from(entry: Entry): Error | undefined; - to(): Entry; - } { - return { - from: (entry: Entry): Error | undefined => { - try { - const body: IActionContent = JSON.parse(entry.content); - if (body.observe === undefined) { - // Check previous version (chipmunk <= 3.8.1) - this.observe = compatibility.from_3_8_1(entry); - this.compatibility.converted = true; - } else { - const observe = new $.Observe(body.observe); - this.observe = observe; - } - this.stat = Stat.from(body.stat); - this.uuid = this.observe.signature(); - this.compatibility.invalidUuid = - entry.uuid !== this.uuid ? entry.uuid : undefined; - return undefined; - } catch (err) { - return new Error(`Fail to parse action: ${error(err)}`); - } - }, - to: (): Entry => { - return { - uuid: this.uuid, - content: JSON.stringify({ - stat: this.stat.asObj(), - observe: this.observe.storable(), - } as IActionContent), - }; - }, - }; - } - - public getActions(): { caption?: string; handler?: () => void }[] { - const observe = this.observe; - const configurable = observe.isConfigurable(); - const nature = observe.origin.nature().desc(); - return [ - // **Note**: Recent actions isn't supported yet for plugins. Support of this - // feature will be included with general refactoring of Observe Configuration - // and a way to delivery available parser/source to client - ...(nature.type === $.Description.OriginType.plugin - ? [] - : [ - { - caption: ((): string => { - switch (nature.type) { - case $.Description.OriginType.file: - return 'Open with recent configuration'; - case $.Description.OriginType.net: - case $.Description.OriginType.serial: - return 'Connect with recent configuration'; - case $.Description.OriginType.command: - return 'Execute with recent configuration'; - } - })(), - handler: this.apply.bind(this), - }, - ]), - ...(configurable - ? [ - { - caption: 'Open with new configuration', - handler: () => { - session - .initialize() - .configure(observe) - .catch((err: Error) => { - this.logger.error( - `Fail to configure observe object: ${err.message}`, - ); - }); - }, - }, - ] - : []), - ]; - } - - public remove(): Promise { - return recent.delete([this.uuid]).catch((err: Error) => { - this.logger.error(`Fail to remove recent action: ${err.message}`); - }); - } - - public apply(): Promise { - return session - .initialize() - .auto(this.observe.locker().lock()) - .then(() => { - return undefined; - }) - .catch((err: Error) => { - const message = lockers.lock( - new Locker(false, `Fail to apply action via error: ${err.message}`) - .set() - .buttons([ - { - caption: `Remove`, - handler: () => { - this.remove().finally(() => { - message.popup.close(); - }); - }, - }, - { - caption: `Cancel`, - handler: () => { - message.popup.close(); - }, - }, - ]) - .end(), - { - closable: false, - }, - ); - }); - } - - public merge(action: Action): void { - this.stat = action.stat; - this.stat.update(); - } -} diff --git a/application/client/src/app/service/recent/compatibility.ts b/application/client/src/app/service/recent/compatibility.ts deleted file mode 100644 index 2fe1e9c08c..0000000000 --- a/application/client/src/app/service/recent/compatibility.ts +++ /dev/null @@ -1,110 +0,0 @@ -import { Entry } from '@platform/types/storage/entry'; - -import * as $ from '@platform/types/observe'; -import * as Factory from '@platform/types/observe/factory'; - -// Interface belong to >= 3.8.1 -interface IDLTFilters { - app_ids?: string[]; - context_ids?: string[]; - ecu_ids?: string[]; -} - -// Interface belong to >= 3.8.1 -interface IDLTOptions { - logLevel: number; - filters: IDLTFilters; - fibex: string[]; - tz?: string; -} - -export function optionsToParserSettings( - options: IDLTOptions, - with_storage_header: boolean, - app_id_count: number, - context_id_count: number, -): $.Parser.Dlt.IConfiguration { - const filter_config: $.Parser.Dlt.IFilters = { - min_log_level: options.logLevel, - app_ids: options.filters.app_ids, - context_ids: options.filters.context_ids, - ecu_ids: options.filters.ecu_ids, - app_id_count, - context_id_count, - }; - return { - filter_config, - fibex_file_paths: options.fibex.length > 0 ? options.fibex : undefined, - with_storage_header, - tz: undefined, - }; -} - -// This function has to be removed since v 3.9.x or 3.10.x (after a couple of -// update iterations) -export function from_3_8_1(entry: Entry): $.Observe { - const action = JSON.parse(entry.content); - let observe; - if (action['file'] !== undefined) { - if (action['file']['dlt'] !== undefined) { - observe = new Factory.File() - .asDlt(optionsToParserSettings(action['file']['dlt'], true, 0, 0)) - .type($.Types.File.FileType.Binary) - .file(action['file']['filename']) - .get(); - } else if (action['file']['pcap'] !== undefined) { - observe = new Factory.File() - .asDlt(optionsToParserSettings(action['file']['pcap']['dlt'], true, 0, 0)) - .type($.Types.File.FileType.PcapNG) - .file(action['file']['filename']) - .get(); - } else { - observe = new Factory.File() - .asText() - .file(action['file']['filename']) - .type($.Types.File.FileType.Text) - .get(); - } - } else if (action['dlt_stream'] !== undefined) { - const defs = action['dlt_stream']; - const source = defs['source']; - const preconstructed = new Factory.Stream().asDlt( - optionsToParserSettings(defs['options'], false, 0, 0), - ); - if (source['process'] !== undefined) { - preconstructed.process(source['process']); - } else if (source['serial'] !== undefined) { - preconstructed.serial(source['serial']); - } else if (source['tcp'] !== undefined) { - preconstructed.tcp(source['tcp']); - } else if (source['udp'] !== undefined) { - preconstructed.udp(source['udp']); - } else { - throw new Error(`Unknonw type of source for stream.`); - } - observe = preconstructed.get(); - } else if (action['text_stream'] !== undefined) { - const defs = action['text_stream']; - const source = defs['source']; - const preconstructed = new Factory.Stream().asText(); - if (source['process'] !== undefined) { - preconstructed.process(source['process']); - } else if (source['serial'] !== undefined) { - preconstructed.serial(source['serial']); - } else if (source['tcp'] !== undefined) { - preconstructed.tcp(source['tcp']); - } else if (source['udp'] !== undefined) { - preconstructed.udp(source['udp']); - } else { - throw new Error(`Unknonw type of source for stream.`); - } - observe = preconstructed.get(); - } else { - throw new Error(`Unknonw type of action.`); - } - const error = observe.validate(); - if (error instanceof Error) { - throw error; - } - return observe; -} diff --git a/application/client/src/app/service/recent/stat.ts b/application/client/src/app/service/recent/stat.ts deleted file mode 100644 index a1d1274113..0000000000 --- a/application/client/src/app/service/recent/stat.ts +++ /dev/null @@ -1,79 +0,0 @@ -import { error } from '@platform/log/utils'; -import { scope } from '@platform/env/scope'; - -import * as obj from '@platform/env/obj'; - -export interface IStat { - used: number; - last: number; - size: number | undefined; -} - -export class Stat { - public static from(inputs: IStat): Stat { - try { - return new Stat({ - size: obj.getAsValidNumberOrUndefined(inputs, 'size'), - last: obj.getAsValidNumber(inputs, 'last'), - used: obj.getAsValidNumber(inputs, 'used'), - }); - } catch (e) { - scope.getLogger(`RecentStat`).warn(`Stat of recent action parsing error: ${error(e)}`); - return Stat.defaults(); - } - } - - public static defaults(): Stat { - return new Stat({ - size: undefined, - used: 0, - last: Date.now(), - }); - } - - public used: number = 0; - public last: number = Date.now(); - public size: number | undefined; - - constructor(stat: IStat) { - this.size = stat.size; - this.used = stat.used; - this.last = stat.last; - } - - public update(): Stat { - this.used += 1; - this.last = Date.now(); - return this; - } - - public asObj(): IStat { - return { - used: this.used, - last: this.last, - size: this.size, - }; - } - - public score(): { - usage(): number; - recent(): number; - mixed(): number; - } { - return { - usage: (): number => { - return this.used; - }, - recent: (): number => { - return this.last; - }, - mixed: (): number => { - const now = Date.now(); - const days = Math.ceil( - (now - this.last <= 0 ? 1 : now - this.last) / 1000 / 60 / 60 / 24, - ); - return this.used * (1 / days); - }, - }; - } -} diff --git a/application/client/src/app/service/session.ts b/application/client/src/app/service/session.ts deleted file mode 100644 index 56e91b57ca..0000000000 --- a/application/client/src/app/service/session.ts +++ /dev/null @@ -1,395 +0,0 @@ -import { - SetupService, - Interface, - Implementation, - register, - DependOn, -} from '@platform/entity/service'; -import { services } from '@register/services'; -import { ilc, Emitter, Channel } from '@service/ilc'; -import { TabsService, ITab, ITabAPI } from '@elements/tabs/service'; -import { Base } from './session/base'; -import { Session } from './session/session'; -import { UnboundTab } from './session/unbound'; -import { LockToken } from '@platform/env/lock.token'; -import { components } from '@env/decorators/initial'; -import { TabControls } from './session/tab'; -import { unique } from '@platform/env/sequence'; -import { history } from '@service/history'; -import { Render } from '@schema/render'; -import { File } from '@platform/types/files'; -import { Observe } from '@platform/types/observe'; -import { getRender } from '@schema/render/tools'; -import { TabObserve } from '@tabs/observe/component'; -import { recent } from '@service/recent'; -import { bridge } from '@service/bridge'; - -import * as Factory from '@platform/types/observe/factory'; - -export { Session, TabControls, UnboundTab, Base }; - -@DependOn(history) -@SetupService(services['session']) -export class Service extends Implementation { - private _emitter!: Emitter; - private _channel!: Channel; - private _active: Base | undefined; - private _sessions: Map = new Map(); - private _tabs: TabsService = new TabsService(); - private _locker: LockToken = LockToken.simple(true); - - public override ready(): Promise { - this._emitter = ilc.emitter(this.getName(), this.log()); - this._channel = ilc.channel(this.getName(), this.log()); - this._channel.system.ready(() => { - this.log().debug(`Session is unlocked`); - this._locker.unlock(); - }); - this._tabs.subjects.get().active.subscribe((next) => { - this._active = this._sessions.get(next.uuid); - this._emitter.session.change( - this._active === undefined ? undefined : this._active.uuid(), - ); - }); - this._tabs.subjects.get().removed.subscribe(this.kill.bind(this)); - return Promise.resolve(); - } - - public override async destroy(): Promise { - this._emitter.destroy(); - this._channel.destroy(); - await super.destroy(); - if (this._sessions.size > 0) { - throw new Error( - `Destroy is called with existed sessions. Count of opened session ${this._sessions.size}`, - ); - } - } - - public async closeAllSessions(): Promise { - this.log().debug(`All sessions will be closed`); - for (const session of Array.from(this._sessions.values())) { - const uuid = session.uuid(); - await this.kill(uuid).catch((err: Error) => { - this.log().error(`Fail to close session "${uuid}": ${err.message}`); - }); - } - this.log().debug(`All sessions are closed`); - } - - public kill(uuid: string): Promise { - return new Promise((resolve) => { - const session = this._sessions.get(uuid); - if (session === undefined) { - return resolve(); - } - this._emitter.session.closing(session); - session - .destroy() - .catch((err: Error) => { - this.log().error(`Fail to remove session: ${err.message}`); - }) - .finally(() => { - this._sessions.delete(uuid); - this._emitter.session.closed(uuid); - resolve(); - }); - }); - } - - public add(bind = true): { - empty: (render: Render) => Promise; - unbound: (opts: { - tab: ITab; - sidebar?: boolean; - toolbar?: boolean; - uuid?: string; - }) => UnboundTab; - tab: (tab: ITab) => ITabAPI | undefined; - } { - const binding = (uuid: string, session: Session, caption: string) => { - this._sessions.set(uuid, session); - if (!bind) { - return; - } - this.bind(uuid, caption); - this._emitter.session.open(session); - }; - return { - empty: (render: Render): Promise => { - if (this._locker.isLocked()) { - return Promise.reject(new Error(`Sessions aren't available yet`)); - } - return new Promise((resolve, reject) => { - this.create(render) - .then((session: Session) => { - binding(session.uuid(), session, 'Empty'); - resolve(session); - }) - .catch((err: Error) => { - this.log().error(`Fail to add session; error: ${err.message}`); - session - .destroy() - .catch((err) => - this.log().warn(`Fail to destroy session: ${err.message}`), - ); - reject(err); - }); - }); - }, - tab: (tab: ITab): ITabAPI | undefined => { - if (tab.uuid !== undefined && this._tabs.has(tab.uuid)) { - this._tabs.setActive(tab.uuid); - return undefined; - } else { - if (tab.content !== undefined) { - tab.content.inputs = - tab.content.inputs === undefined ? {} : tab.content.inputs; - tab.content.inputs.tab = new TabControls(tab, this._tabs); - } - return this._tabs.add(tab); - } - }, - unbound: (opts: { - tab: ITab; - sidebar?: boolean; - toolbar?: boolean; - uuid?: string; - }): UnboundTab => { - if (opts.uuid !== undefined && this._sessions.has(opts.uuid)) { - throw new Error(this.log().error(`Tab "${opts.uuid}" already exists`)); - } - opts.uuid = opts.uuid !== undefined ? opts.uuid : unique(); - opts.tab.uuid = opts.tab.uuid !== undefined ? opts.tab.uuid : opts.uuid; - const unbound = new UnboundTab(opts); - this._sessions.set(unbound.uuid(), unbound); - unbound.bind(this._tabs.add(opts.tab)); - return unbound; - }, - }; - } - - public bind(uuid: string, caption: string, makeActive = true): Error | undefined { - const session = this._sessions.get(uuid); - if (session === undefined) { - return new Error(`Session doesn't exist`); - } - if (!this._tabs.has(uuid)) { - session.bind( - this._tabs.add({ - uuid: uuid, - content: { - factory: components.get('app-views-workspace'), - inputs: { - session: session, - }, - }, - name: caption, - active: true, - }), - ); - } - makeActive && this._emitter.session.change(uuid); - return undefined; - } - - public getTabsService(): TabsService { - return this._tabs; - } - - public active(): { - base(): Base | undefined; - session(): Session | undefined; - unbound(): UnboundTab | undefined; - is(uuid: string): boolean; - } { - return { - base: (): Base | undefined => { - return this._active; - }, - session: (): Session | undefined => { - return this._active instanceof Session ? this._active : undefined; - }, - unbound: (): UnboundTab | undefined => { - return this._active instanceof UnboundTab ? this._active : undefined; - }, - is: (uuid: string): boolean => { - return this._active === undefined ? false : this._active.uuid() === uuid; - }, - }; - } - - public get(uuid: string): Session | undefined { - const smth = this._sessions.get(uuid); - return smth instanceof Session ? smth : undefined; - } - - public initialize(): { - suggest(filename: string, session?: Session): Promise; - auto(observe: Observe, session?: Session): Promise; - configure(observe: Observe, session?: Session): Promise; - observe(observe: Observe, session?: Session): Promise; - multiple(files: File[]): Promise; - } { - return { - suggest: (filename: string, session?: Session): Promise => { - return bridge - .files() - .isBinary(filename) - .then((binary: boolean) => { - if (!binary) { - return this.initialize().observe( - new Factory.File() - .type(Factory.FileType.Text) - .asText() - .file(filename) - .get(), - session, - ); - } else { - return this.initialize().configure( - new Factory.File() - .type(Factory.FileType.Binary) - .file(filename) - .get(), - session, - ); - } - }); - }, - auto: (observe: Observe, session?: Session): Promise => { - return observe.locker().is() - ? this.initialize().observe(observe, session) - : this.initialize().configure(observe, session); - }, - configure: (observe: Observe, session?: Session): Promise => { - return new Promise((resolve) => { - const api = this.add().tab({ - name: observe.origin.title(), - content: { - factory: TabObserve, - inputs: TabObserve.inputs({ - observe, - api: { - finish: (observe: Observe): Promise => { - return new Promise((success, failed) => { - this.initialize() - .observe(observe, session) - .then((session) => { - success(); - api?.close(); - resolve(session); - }) - .catch((err: Error) => { - failed(err); - }); - }); - }, - cancel: (): void => { - api?.close(); - resolve(undefined); - }, - tab: (): TabControls => { - return api as unknown as TabControls; - }, - }, - }), - }, - active: true, - }); - }); - }, - observe: async (observe: Observe, existed?: Session): Promise => { - const render = await getRender(observe); - if (render instanceof Error) { - throw render; - } - const session = - existed !== undefined ? existed : await this.add(false).empty(render); - return new Promise((resolve, reject) => { - session.stream - .observe() - .start(observe) - .then((uuid: string) => { - if (existed === undefined) { - const error = this.bind( - session.uuid(), - observe.origin.desc().major, - true, - ); - if (error instanceof Error) { - this.log().error(`Fail to bind session: ${error.message}`); - } - recent.add(observe).catch((err: Error) => { - this.log().error( - `Fail to save action as recent: ${err.message}`, - ); - }); - } - resolve(uuid); - }) - .catch((err: Error) => { - if (existed !== undefined) { - return reject(err); - } - this.kill(session.uuid()) - .catch((closeErr: Error) => { - this.log().error(`Fail to close session: ${closeErr.message}`); - }) - .finally(() => { - reject(err); - }); - }); - }); - }, - multiple: (files: File[]): Promise => { - return new Promise((resolve, reject) => { - const api = this.add().tab({ - name: 'Multiple Files', - content: { - factory: components.get('app-tabs-source-multiple-files'), - inputs: { - files, - setTitle: (title: string) => { - api?.setTitle(title); - }, - done: (observe: Observe) => { - this.initialize() - .observe(observe) - .then((session) => { - resolve(session); - }) - .catch((err: Error) => { - this.log().error( - `Fail to setup observe: ${err.message}`, - ); - reject(err); - }) - .finally(() => { - api?.close(); - }); - }, - cancel: () => { - api?.close(); - resolve(undefined); - }, - }, - }, - active: true, - closable: true, - }); - }); - }, - }; - } - - protected create(render: Render): Promise { - const session = new Session(render); - return session.init().then((_uuid: string) => { - this._emitter.session.created(session); - return session; - }); - } -} -export interface Service extends Interface {} -export const session = register(new Service()); diff --git a/application/client/src/app/service/session/base.ts b/application/client/src/app/service/session/base.ts deleted file mode 100644 index 1f5f7bb933..0000000000 --- a/application/client/src/app/service/session/base.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { TabsService, ITabAPI } from '@elements/tabs/service'; -import { Subscriber } from '@platform/env/subscription'; - -export abstract class Base extends Subscriber { - public abstract destroy(): Promise; - public abstract bind(tab: ITabAPI): void; - public abstract uuid(): string; - public abstract sidebar(): TabsService | undefined; - public abstract toolbar(): TabsService | undefined; - public abstract isBound(): boolean; -} diff --git a/application/client/src/app/service/session/dependencies/attachments.ts b/application/client/src/app/service/session/dependencies/attachments.ts deleted file mode 100644 index c58f0a8074..0000000000 --- a/application/client/src/app/service/session/dependencies/attachments.ts +++ /dev/null @@ -1,77 +0,0 @@ -import { SetupLogger, LoggerInterface } from '@platform/entity/logger'; -import { Subscriber, Subjects, Subject } from '@platform/env/subscription'; -import { cutUuid } from '@log/index'; -import { Attachment } from '@platform/types/content'; -import { getNextColor } from '@ui/styles/colors'; - -// import * as Requests from '@platform/ipc/request'; -import * as Events from '@platform/ipc/event'; - -@SetupLogger() -export class Attachments extends Subscriber { - public readonly subjects: Subjects<{ - updated: Subject; - }> = new Subjects({ - updated: new Subject(), - }); - public readonly attachments: Map = new Map(); - - protected readonly positions: Map = new Map(); - - private _len: number = 0; - private _uuid!: string; - - public init(uuid: string) { - this.setLoggerName(`Attachments: ${cutUuid(uuid)}`); - this._uuid = uuid; - this.register( - Events.IpcEvent.subscribe(Events.Stream.Attachment.Event, (event) => { - if (event.session !== this._uuid) { - return; - } - if (this.attachments.has(event.attachment.uuid)) { - this.log().error( - `Attachment ${event.attachment.uuid} already exist; attachment: ${event.attachment.name}(${event.attachment.filepath})`, - ); - return; - } - const attachment = Attachment.from(event.attachment); - if (attachment instanceof Error) { - this.log().error( - `Fail to parse attachment ${event.attachment.uuid}; attachment: ${event.attachment.name}(${event.attachment.filepath})`, - ); - return; - } - attachment.setColor(getNextColor()); - this.attachments.set(event.attachment.uuid, attachment); - if (this.attachments.size !== event.len) { - this.log().warn( - `Count of attachment on backend dismatch with attachments on frontend`, - ); - } - attachment.messages.forEach((pos) => { - this.positions.set(pos, attachment); - }); - this.subjects.get().updated.emit(this.attachments.size); - }), - ); - } - - public destroy() { - this.unsubscribe(); - this.subjects.destroy(); - } - - public len(): number { - return this._len; - } - - public has(position: number): boolean { - return this.positions.has(position); - } - - public getByPos(position: number): Attachment | undefined { - return this.positions.get(position); - } -} -export interface Attachments extends LoggerInterface {} diff --git a/application/client/src/app/service/session/dependencies/bookmark/bookmark.ts b/application/client/src/app/service/session/dependencies/bookmark/bookmark.ts deleted file mode 100644 index 31d81838fd..0000000000 --- a/application/client/src/app/service/session/dependencies/bookmark/bookmark.ts +++ /dev/null @@ -1,58 +0,0 @@ -import { Recognizable } from '@platform/types/storage/entry'; -import { error } from '@platform/log/utils'; -import { Json } from '@platform/types/storage/json'; -import { Equal } from '@platform/types/env/types'; -import { BookmarkDefinition } from '@platform/types/bookmark'; - -import * as obj from '@platform/env/obj'; - -export class Bookmark extends Json implements Recognizable, Equal { - public static KEY: string = 'bookmark'; - - public static fromJson(json: string): Bookmark | Error { - try { - const def: { position: number } = JSON.parse(json); - def.position = obj.getAsValidNumber(def, 'position'); - return new Bookmark(def.position); - } catch (e) { - return new Error(error(e)); - } - } - - public readonly position: number; - - constructor(position?: number) { - super(); - this.position = position === undefined ? -1 : position; - } - - public uuid(): string { - return this.position.toString(); - } - - public asDef(): BookmarkDefinition { - return { position: this.position }; - } - - public isSame(bookmark: Bookmark): boolean { - return bookmark.position === this.position; - } - - public json(): { - to(): string; - from(str: string): Bookmark | Error; - key(): string; - } { - return { - to: (): string => { - return JSON.stringify({ position: this.position }); - }, - from: (json: string): Bookmark | Error => { - return Bookmark.fromJson(json); - }, - key: (): string => { - return Bookmark.KEY; - }, - }; - } -} diff --git a/application/client/src/app/service/session/dependencies/bookmarks.ts b/application/client/src/app/service/session/dependencies/bookmarks.ts deleted file mode 100644 index 0620665792..0000000000 --- a/application/client/src/app/service/session/dependencies/bookmarks.ts +++ /dev/null @@ -1,294 +0,0 @@ -import { SetupLogger, LoggerInterface } from '@platform/entity/logger'; -import { Subscriber, Subjects, Subject } from '@platform/env/subscription'; -import { Owner, Row } from '@schema/content/row'; -import { cutUuid } from '@log/index'; -import { Bookmark } from './bookmark/bookmark'; -import { Range } from '@platform/types/range'; -import { Cursor } from './cursor'; -import { hotkeys } from '@service/hotkeys'; -import { Stream } from './stream'; -import { BookmarkDefinition } from '@platform/types/bookmark'; -import { unique } from '@platform/env/sequence'; - -import * as Requests from '@platform/ipc/request'; - -@SetupLogger() -export class Bookmarks extends Subscriber { - public readonly subjects: Subjects<{ - updated: Subject; - }> = new Subjects({ - updated: new Subject(), - }); - private _uuid!: string; - protected bookmarks: Bookmark[] = []; - protected pendings: Bookmark[] = []; - protected cursor!: Cursor; - protected stream!: Stream; - - public init(uuid: string, stream: Stream, cursor: Cursor) { - this.setLoggerName(`Bookmarks: ${cutUuid(uuid)}`); - this._uuid = uuid; - this.cursor = cursor; - this.stream = stream; - this.register( - hotkeys.listen('j', () => { - this.move().prev(); - }), - hotkeys.listen('k', () => { - this.move().next(); - }), - stream.subjects.get().updated.subscribe(() => { - this.recheck(); - }), - ); - } - - public destroy() { - this.unsubscribe(); - this.subjects.destroy(); - } - - public overwrite(bookmarks: Bookmark[]): Promise { - const len = this.stream.len(); - this.pendings.push(...bookmarks.filter((b) => b.position >= len)); - const available = bookmarks.filter((b) => b.position < len); - return this.api() - .set(available.map((b) => b.position)) - .then(() => { - this.bookmarks = available; - this.bookmarks.sort((a, b) => { - return a.position < b.position ? -1 : 1; - }); - }) - .catch((err: Error) => { - this.log().error(`Fail set bookmarks: ${err.message}`); - }); - } - - public overwriteFromDefs(bookmarks: BookmarkDefinition[]): Promise { - return this.overwrite(bookmarks.map((def) => new Bookmark(def.position))).catch( - (err: Error) => { - this.log().error(`Fail overwrite bookmarks: ${err.message}`); - }, - ); - } - - public bookmark(row: Row) { - (() => { - const exist = this.bookmarks.find((b) => b.position === row.position); - if (exist) { - return this.api() - .remove(row.position) - .then(() => { - this.bookmarks = this.bookmarks.filter((b) => b.position !== row.position); - }); - } else { - return this.api() - .add(row.position) - .then(() => { - this.bookmarks.push(new Bookmark(row.position)); - }); - } - })() - .then(() => { - this.bookmarks.sort((a, b) => { - return a.position < b.position ? -1 : 1; - }); - this.update(); - }) - .catch((err: Error) => { - this.log().error(`Fail to bookmark: ${err.message}`); - }); - } - - public get(range?: Range): Bookmark[] { - if (range === undefined) { - return this.bookmarks; - } else { - return this.bookmarks.filter((b) => range.in(b.position)); - } - } - - public has(stream: number): boolean { - return this.bookmarks.find((b) => b.position === stream) !== undefined; - } - - public getRowsPositions(): number[] { - return this.bookmarks.map((b) => b.position); - } - - public hash(): string { - return this.getRowsPositions().join(','); - } - - public update(): string { - const sequence = unique(); - this.subjects.get().updated.emit(sequence); - return sequence; - } - - protected recheck() { - if (this.pendings.length === 0) { - return; - } - if (this.pendings.find((b) => b.position < this.stream.len()) === undefined) { - return; - } - const all = [...this.bookmarks, ...this.pendings]; - this.pendings = []; - this.overwrite(all) - .then(() => { - this.update(); - }) - .catch((err: Error) => { - this.log().error(`Fail reset bookmarks: ${err.message}`); - }); - } - - protected move(): { - next(): void; - prev(): void; - } { - const selected: number | undefined = (() => { - if (this.bookmarks.length === 0) { - return undefined; - } - const single = this.cursor.getSingle().position(); - if (single === undefined) { - this.cursor.select( - this.bookmarks[0].position, - Owner.Bookmark, - undefined, - undefined, - ); - return undefined; - } - return this.bookmarks.findIndex((b) => b.position === single); - })(); - return { - next: (): void => { - if (selected === undefined) { - return; - } - if (selected === -1) { - this.cursor.select( - this.bookmarks[0].position, - Owner.Bookmark, - undefined, - undefined, - ); - return; - } - if (selected === this.bookmarks.length - 1) { - return; - } - this.cursor.select( - this.bookmarks[selected + 1].position, - Owner.Bookmark, - undefined, - undefined, - ); - }, - prev: (): void => { - if (selected === undefined) { - return; - } - if (selected === -1) { - this.cursor.select( - this.bookmarks[this.bookmarks.length - 1].position, - Owner.Bookmark, - undefined, - undefined, - ); - return; - } - if (selected === 0) { - return; - } - this.cursor.select( - this.bookmarks[selected - 1].position, - Owner.Bookmark, - undefined, - undefined, - ); - }, - }; - } - - protected api(): { - add(row: number): Promise; - remove(row: number): Promise; - set(rows: number[]): Promise; - } { - return { - add: (row: number): Promise => { - return Requests.IpcRequest.send( - Requests.Stream.AddBookmark.Response, - new Requests.Stream.AddBookmark.Request({ - session: this._uuid, - row, - }), - ) - .then((response: Requests.Stream.AddBookmark.Response) => { - if (typeof response.error === 'string') { - this.log().error( - `Fail to add bookmark to position ${row}: ${response.error}`, - ); - } - }) - .catch((error: Error) => { - this.log().error( - `Fail to add bookmark to position ${row}: ${error.message}`, - ); - }); - }, - remove: (row: number): Promise => { - return Requests.IpcRequest.send( - Requests.Stream.RemoveBookmark.Response, - new Requests.Stream.RemoveBookmark.Request({ - session: this._uuid, - row, - }), - ) - .then((response: Requests.Stream.RemoveBookmark.Response) => { - if (typeof response.error === 'string') { - this.log().error( - `Fail to remove bookmark from position ${row}: ${response.error}`, - ); - } - }) - .catch((error: Error) => { - this.log().error( - `Fail to remove bookmark from position ${row}: ${error.message}`, - ); - }); - }, - set: (rows: number[]): Promise => { - return Requests.IpcRequest.send( - Requests.Stream.SetBookmarks.Response, - new Requests.Stream.SetBookmarks.Request({ - session: this._uuid, - rows, - }), - ) - .then((response: Requests.Stream.SetBookmarks.Response) => { - if (typeof response.error === 'string') { - this.log().error( - `Fail to remove bookmark from positions ${rows.join(', ')}: ${ - response.error - }`, - ); - } - }) - .catch((error: Error) => { - this.log().error( - `Fail to remove bookmark from positions ${rows.join(', ')}: ${ - error.message - }`, - ); - }); - }, - }; - } -} -export interface Bookmarks extends LoggerInterface {} diff --git a/application/client/src/app/service/session/dependencies/charts/cursor.ts b/application/client/src/app/service/session/dependencies/charts/cursor.ts deleted file mode 100644 index e31129d90a..0000000000 --- a/application/client/src/app/service/session/dependencies/charts/cursor.ts +++ /dev/null @@ -1,78 +0,0 @@ -import { IRange } from '@platform/types/range'; -import { Subject, Subjects } from '@platform/env/subscription'; - -export class Cursor { - public from: number = 0; - public to: number = 0; - public width: number = 1; - public visible: boolean = false; - // Length of stream - public stream: number = 0; - public subjects: Subjects<{ - position: Subject; - width: Subject; - visibility: Subject; - }> = new Subjects({ - position: new Subject(), - width: new Subject(), - visibility: new Subject(), - }); - - protected visibility(): { - update(): void; - } { - return { - update: (): void => { - const prev = this.visible; - this.visible = this.width !== 1 && this.width < this.stream; - if (!this.visible) { - this.from = 0; - this.to = this.stream - 1; - } - this.visible !== prev && this.subjects.get().visibility.emit(); - }, - }; - } - - public destroy() { - this.subjects.destroy(); - } - - public setFrame(frame: IRange) { - if (frame.start < 0 || frame.end < 0 || frame.start > frame.end) { - throw new Error(`Invalid cursor`); - } - this.from = frame.start; - this.to = frame.end; - this.subjects.get().position.emit(); - } - - public setStream(len: number) { - this.stream = len; - this.visibility().update(); - } - - public setWidth(width: number) { - if (width < 0) { - throw new Error(`Invalid width`); - } - this.width = width; - this.visibility().update(); - this.subjects.get().width.emit(); - } - - public getFrame(): IRange | undefined { - if (this.from < 0 || this.to < 0 || this.from > this.to) { - return undefined; - } - return { start: this.from, end: this.to }; - } - - public getWidth(): number { - return this.width; - } - - public hash(): string { - return `${this.from};${this.to};${this.width}`; - } -} diff --git a/application/client/src/app/service/session/dependencies/charts/index.ts b/application/client/src/app/service/session/dependencies/charts/index.ts deleted file mode 100644 index 683791ef46..0000000000 --- a/application/client/src/app/service/session/dependencies/charts/index.ts +++ /dev/null @@ -1,365 +0,0 @@ -import { SetupLogger, LoggerInterface } from '@platform/entity/logger'; -import { Subject, Subjects, Subscriber } from '@platform/env/subscription'; -import { isDevMode } from '@angular/core'; -import { ISearchMap } from '@platform/types/filter'; -import { cutUuid } from '@log/index'; -import { IRange } from '@platform/types/range'; -import { Cursor } from './cursor'; -import { Stream } from '../stream'; -import { Search } from '../search'; -import { FilterRequest } from '../search/filters/request'; -import { ChartRequest } from '../search/charts/request'; -import { ResultSearchValues } from '@platform/types/bindings'; - -import * as Requests from '@platform/ipc/request'; -import * as Events from '@platform/ipc/event'; - -export interface Output { - peaks: Map; - values: ResultSearchValues; - map: ISearchMap; - frame: IRange; - filters: FilterRequest[]; - charts: ChartRequest[]; - // true - if has active search; false - if no active search, but filters - active: boolean; - // Selected chart - selected: number | undefined; -} - -@SetupLogger() -export class Charts extends Subscriber { - public cursor: Cursor = new Cursor(); - public subjects: Subjects<{ - peaks: Subject>; - output: Subject; - summary: Subject; - }> = new Subjects({ - peaks: new Subject>(), - output: new Subject(), - summary: new Subject(), - }); - - protected stream!: Stream; - protected search!: Search; - protected uuid!: string; - protected peaks: Map = new Map(); - protected lengths: { - stream: number; - search: number; - } = { - stream: 0, - search: 0, - }; - protected progress: { - output: string | undefined; - summary: string | undefined; - } = { - output: undefined, - summary: undefined, - }; - protected cache: { - output: Output | undefined; - summary: Output | undefined; - } = { - output: undefined, - summary: undefined, - }; - protected selected: string | undefined; - - protected reload(): { - output(): void; - summary(): void; - both(): void; - cached(): void; - load(frame: IRange): Promise; - defs(output: Output): Output; - validation(output: Output): Output; - requests(): { filters: FilterRequest[]; charts: ChartRequest[]; active: boolean }; - } { - return { - output: (): void => { - const frame = this.cursor.getFrame(); - if (frame === undefined) { - return; - } - if (this.progress.output !== undefined) { - return; - } - this.progress.output = this.cursor.hash(); - this.reload() - .load(frame) - .then((output) => { - this.cache.output = output; - this.subjects.get().output.emit(output); - }) - .catch((err: Error) => { - this.log().error( - `Fail load output frame ${frame.start}-${frame.end}: ${err.message}`, - ); - }) - .finally(() => { - if (this.progress === undefined) { - return; - } - const reload = this.progress.output !== this.cursor.hash(); - this.progress.output = undefined; - if (reload) { - this.reload().output(); - } - }); - }, - summary: (): void => { - const hash = () => { - return `${this.lengths.search};${ - this.lengths.stream - };${this.cursor.getWidth()}`; - }; - if (this.lengths.search === 0 && this.lengths.stream === 0) { - return; - } - if (this.progress.summary !== undefined) { - return; - } - const frame = { start: 0, end: this.lengths.stream - 1 }; - this.progress.summary = hash(); - this.reload() - .load(frame) - .then((output) => { - this.cache.summary = output; - this.subjects.get().summary.emit(output); - }) - .catch((err: Error) => { - this.log().error( - `Fail load summary frame ${frame.start}-${frame.end}: ${err.message}`, - ); - }) - .finally(() => { - if (this.progress === undefined) { - return; - } - const reload = this.progress.summary !== hash(); - this.progress.summary = undefined; - if (reload) { - this.reload().summary(); - } - }); - }, - both: (): void => { - this.reload().output(); - this.reload().summary(); - }, - cached: (): void => { - if (this.cache.output !== undefined) { - this.subjects.get().output.emit(this.reload().defs(this.cache.output)); - } else { - this.reload().output(); - } - if (this.cache.summary !== undefined) { - this.subjects.get().summary.emit(this.reload().defs(this.cache.summary)); - } else { - this.reload().summary(); - } - }, - load: (frame: IRange): Promise => { - return new Promise((resolve, reject) => { - const width = this.cursor.getWidth(); - Promise.all([ - this.scaled(width, frame).values(), - this.scaled(Math.floor(width / 2), frame).matches(), - ]) - .then((results: [ResultSearchValues, ISearchMap]) => { - resolve( - this.reload().defs({ - peaks: this.peaks, - values: results[0], - map: results[1], - frame, - filters: [], - charts: [], - active: false, - selected: undefined, - }), - ); - }) - .catch(reject); - }); - }, - defs: (output: Output): Output => { - const requests = this.reload().requests(); - output.filters = requests.filters; - output.charts = requests.charts; - output.selected = this.selecting().get(); - output.active = requests.active; - return isDevMode() ? this.reload().validation(output) : output; - }, - validation: (output: Output): Output => { - // let invalid: [number, number, number, number][] = []; - // Object.keys(output.values).forEach((k: string) => { - // invalid = invalid.concat( - // output.values[parseInt(k, 10)].filter((d) => typeof d[3] !== 'number'), - // ); - // }); - // if (invalid.length !== 0) { - // this.log().error( - // `Invalid data for charts; found NONE number values on (rows): ${invalid - // .map((d) => d[0]) - // .join(', ')}`, - // ); - // } - return output; - }, - requests: (): { filters: FilterRequest[]; charts: ChartRequest[]; active: boolean } => { - const active = this.search.state().getActive(); - return { - active: active !== undefined, - filters: - active === undefined - ? this.search - .store() - .filters() - .get() - .filter((f) => f.definition.active) - : [FilterRequest.fromDefinition(active)], - charts: this.search - .store() - .charts() - .get() - .filter((f) => f.definition.active), - }; - }, - }; - } - - protected scaled( - datasetLength: number, - range?: IRange, - ): { - values(): Promise; - matches(): Promise; - } { - return { - values: (): Promise => { - return Requests.IpcRequest.send( - Requests.Values.Frame.Response, - new Requests.Values.Frame.Request({ - session: this.uuid, - width: datasetLength, - from: range !== undefined ? range.start : undefined, - to: range !== undefined ? range.end : undefined, - }), - ).then((response) => { - if (typeof response.error === 'string' && response.error.trim().length > 0) { - this.log().error(`Fail to load values: ${response.error}`); - return Promise.reject(new Error(response.error)); - } else { - return response.values; - } - }); - }, - matches: (): Promise => { - return Requests.IpcRequest.send( - Requests.Search.Map.Response, - new Requests.Search.Map.Request({ - session: this.uuid, - len: datasetLength, - from: range ? range.start : undefined, - to: range ? range.end : undefined, - }), - ).then((response) => { - return response.map; - }); - }, - }; - } - - public init(uuid: string, stream: Stream, search: Search) { - this.setLoggerName(`Values: ${cutUuid(uuid)}`); - this.uuid = uuid; - this.stream = stream; - this.search = search; - this.register( - Events.IpcEvent.subscribe(Events.Values.Updated.Event, (event) => { - if (event.session !== this.uuid) { - return; - } - this.peaks = event.map === null ? new Map() : event.map; - this.subjects.get().peaks.emit(this.peaks); - this.reload().both(); - }), - this.stream.subjects.get().updated.subscribe((len) => { - this.lengths.stream = len; - this.cursor.setStream(len); - if (this.cursor.visible) { - this.reload().summary(); - } else { - this.reload().both(); - } - }), - this.search.subjects.get().updated.subscribe((event) => { - this.lengths.search = event.found; - this.reload().both(); - }), - this.cursor.subjects.get().position.subscribe(() => { - this.reload().output(); - }), - this.cursor.subjects.get().width.subscribe(() => { - this.reload().both(); - }), - this.search - .store() - .filters() - .subjects.get() - .highlights.subscribe(() => { - this.reload().cached(); - }), - this.search - .store() - .charts() - .subjects.get() - .highlights.subscribe(() => { - this.reload().cached(); - }), - ); - } - - public destroy(): void { - this.subjects.destroy(); - this.cursor.destroy(); - this.unsubscribe(); - } - - public getPeaks(): Map { - return this.peaks; - } - - public refresh(): void { - this.reload().cached(); - } - - public selecting(): { - set(uuid: string | undefined): void; - get(): number | undefined; - } { - return { - set: (uuid: string | undefined): void => { - this.selected = uuid; - this.reload().cached(); - }, - get: (): number | undefined => { - if (this.selected === undefined) { - return undefined; - } - const requests = this.reload().requests(); - const index = requests.charts.findIndex((f) => f.uuid() === this.selected); - return index === -1 ? undefined : index; - }, - }; - } - - public hasData(): boolean { - const requests = this.reload().requests(); - return requests.charts.length + requests.filters.length > 0; - } -} -export interface Charts extends LoggerInterface {} diff --git a/application/client/src/app/service/session/dependencies/cli.ts b/application/client/src/app/service/session/dependencies/cli.ts deleted file mode 100644 index f48da0d90e..0000000000 --- a/application/client/src/app/service/session/dependencies/cli.ts +++ /dev/null @@ -1,273 +0,0 @@ -import { SetupLogger, LoggerInterface } from '@platform/entity/logger'; -import { Subscriber } from '@platform/env/subscription'; -import { cutUuid } from '@log/index'; -import { Session } from '@service/session'; -import { getFileName, getParentFolder } from '@platform/types/files'; -import { env } from '@service/env'; -import { cli } from '@service/cli'; - -import * as $ from '@platform/types/observe'; - -@SetupLogger() -export class Cli extends Subscriber { - protected session!: Session; - protected _cmd: string = './chipmunk'; - - protected source(): { - stream(stream: $.Origin.Stream.Configuration): string | undefined; - file(file: $.Origin.File.Configuration): string | undefined; - concat(concat: $.Origin.Concat.Configuration): string | undefined; - from(observed: $.Observe[]): string | undefined; - cx(observed: $.Observe[]): $.Origin.Context | undefined; - } { - return { - stream: (stream: $.Origin.Stream.Configuration): string | undefined => { - const serial = stream.as<$.Origin.Stream.Stream.Serial.Configuration>( - $.Origin.Stream.Stream.Serial.Configuration, - ); - const tcp = stream.as<$.Origin.Stream.Stream.TCP.Configuration>( - $.Origin.Stream.Stream.TCP.Configuration, - ); - const udp = stream.as<$.Origin.Stream.Stream.UDP.Configuration>( - $.Origin.Stream.Stream.UDP.Configuration, - ); - const process = stream.as<$.Origin.Stream.Stream.Process.Configuration>( - $.Origin.Stream.Stream.Process.Configuration, - ); - if (serial !== undefined) { - return `streams --serial "\ -${serial.configuration.path};\ -${serial.configuration.baud_rate};\ -${serial.configuration.data_bits};\ -${serial.configuration.flow_control};\ -${serial.configuration.parity};\ -${serial.configuration.stop_bits}"`; - } else if (tcp !== undefined) { - return `streams --tcp "${tcp.configuration.bind_addr}"`; - } else if (udp !== undefined) { - return `streams --udp "\ -${udp.configuration.bind_addr}|\ -${udp.configuration.multicast[0].multiaddr},\ -${udp.configuration.multicast[0].interface};"`; - } else if (process !== undefined) { - return `streams --stdout "${process.configuration.command}"`; - } else { - return undefined; - } - }, - file: (file: $.Origin.File.Configuration): string | undefined => { - return `-o ${this.filename(file.get().filename())}`; - }, - concat: (concat: $.Origin.Concat.Configuration): string | undefined => { - const relative = - Array.from(new Set(concat.files().map((f) => getParentFolder(f)))).length === 1; - return concat - .files() - .map((f) => `-o ${relative ? this.filename(f) : f}`) - .join(' '); - }, - from: (observed: $.Observe[]): string | undefined => { - const get = (observe: $.Observe): string | undefined => { - const stream = observe.origin.as<$.Origin.Stream.Configuration>( - $.Origin.Stream.Configuration, - ); - const file = observe.origin.as<$.Origin.File.Configuration>( - $.Origin.File.Configuration, - ); - const concat = observe.origin.as<$.Origin.Concat.Configuration>( - $.Origin.Concat.Configuration, - ); - if (stream !== undefined) { - return this.source().stream(stream); - } else if (file !== undefined) { - return this.source().file(file); - } else if (concat !== undefined) { - return this.source().concat(concat); - } else { - return undefined; - } - }; - if (observed.length === 0) { - return undefined; - } - let args = ''; - for (const observe of observed) { - const arg = get(observe); - if (arg === undefined) { - return undefined; - } - args = `${args}${args.length === 0 ? '' : ' '}${arg}`; - } - return args; - }, - cx(observed: $.Observe[]): $.Origin.Context | undefined { - function get(observe: $.Observe): $.Origin.Context | undefined { - if ( - observe.origin.as<$.Origin.Stream.Configuration>( - $.Origin.Stream.Configuration, - ) !== undefined - ) { - return $.Origin.Context.Stream; - } else if ( - observe.origin.as<$.Origin.File.Configuration>( - $.Origin.File.Configuration, - ) !== undefined - ) { - return $.Origin.Context.File; - } else if ( - observe.origin.as<$.Origin.Concat.Configuration>( - $.Origin.Concat.Configuration, - ) !== undefined - ) { - return $.Origin.Context.Concat; - } else { - return undefined; - } - } - if (observed.length === 0 || get(observed[0]) === undefined) { - return undefined; - } - const first: $.Origin.Context = get(observed[0]) as unknown as $.Origin.Context; - for (const observe of observed) { - if (first !== get(observe)) { - return undefined; - } - } - return first; - }, - }; - } - - protected parser(): { - text(parser: $.Parser.Text.Configuration): string | undefined; - dlt(parser: $.Parser.Dlt.Configuration): string | undefined; - someip(parser: $.Parser.SomeIp.Configuration): string | undefined; - from(observe: $.Observe): string | undefined; - } { - return { - text: (_parser: $.Parser.Text.Configuration): string | undefined => { - return `--parser text`; - }, - dlt: (_parser: $.Parser.Dlt.Configuration): string | undefined => { - return `--parser dlt`; - }, - someip: (_parser: $.Parser.SomeIp.Configuration): string | undefined => { - return `--parser someip`; - }, - from: (observe: $.Observe): string | undefined => { - const text = observe.parser.as<$.Parser.Text.Configuration>( - $.Parser.Text.Configuration, - ); - const dlt = observe.parser.as<$.Parser.Dlt.Configuration>( - $.Parser.Dlt.Configuration, - ); - const someip = observe.parser.as<$.Parser.SomeIp.Configuration>( - $.Parser.SomeIp.Configuration, - ); - if (text !== undefined) { - return this.parser().text(text); - } else if (dlt !== undefined) { - return this.parser().dlt(dlt); - } else if (someip !== undefined) { - return this.parser().someip(someip); - } else { - return undefined; - } - }, - }; - } - - protected filters(): string { - const filters = this.session.search.store().filters().get(); - if (filters.length === 0) { - return ''; - } - return `${filters - .map((f) => `-s "${f.as().filter().filter.replaceAll('"', '\\"')}"`) - .join(' ')}`; - } - - protected cmd(): { - update(): Promise; - get(): string; - defaults(): void; - } { - return { - update: (): Promise => { - return cli - .getCommand() - .then((cmd) => { - this._cmd = cmd; - }) - .catch((err: Error) => { - this.log().error(`Fail to get CLI command/executor value: ${err.message}`); - this.cmd().defaults(); - }); - }, - get: (): string => { - return this._cmd; - }, - defaults: (): void => { - if (env.platform().windows()) { - this._cmd = `chipmunk.exe`; - } else { - this._cmd = `./chipmunk`; - } - }, - }; - } - - protected filename(fullpath: string): string { - if (env.platform().windows()) { - return getFileName(fullpath); - } else { - return `./${getFileName(fullpath)}`; - } - } - - protected arguments(): string | undefined { - const observed = this.session.stream - .observe() - .sources() - .map((s) => s.observe); - if (observed.length === 0) { - return undefined; - } - if (this.source().cx(observed) === undefined) { - // Not the same origin - return undefined; - } - const source = this.source().from(observed); - if (source === undefined) { - return undefined; - } - const parser = this.parser().from(observed[0]); - if (parser === undefined) { - return undefined; - } - return `${source} ${parser} ${this.filters()}`; - } - - public init(session: Session) { - this.session = session; - this.setLoggerName(`Cli: ${cutUuid(session.uuid())}`); - } - - public destroy() { - this.unsubscribe(); - } - - public async generate(): Promise { - await this.cmd().update(); - const args = this.arguments(); - if (args === undefined) { - return undefined; - } - return `${this.cmd().get()} ${args}`; - } - - public isSupported(): boolean { - return this.arguments() !== undefined; - } -} -export interface Cli extends LoggerInterface {} diff --git a/application/client/src/app/service/session/dependencies/comments/comment.ts b/application/client/src/app/service/session/dependencies/comments/comment.ts deleted file mode 100644 index 9da37b972d..0000000000 --- a/application/client/src/app/service/session/dependencies/comments/comment.ts +++ /dev/null @@ -1,70 +0,0 @@ -import { Recognizable } from '@platform/types/storage/entry'; -import { error } from '@platform/log/utils'; -import { Json } from '@platform/types/storage/json'; -import { Equal } from '@platform/types/env/types'; -import { CommentDefinition } from '@platform/types/comment'; -import * as obj from '@platform/env/obj'; - -export class Comment extends Json implements Recognizable, Equal { - public static KEY: string = 'comment'; - - public static fromJson(json: string): Comment | Error { - try { - const def: CommentDefinition = JSON.parse(json); - def.uuid = obj.getAsString(def, 'uuid'); - def.selection = obj.getAsObj(def, 'selection'); - def.selection.start = obj.getAsObj(def.selection, 'start'); - def.selection.start.offset = obj.getAsValidNumber(def.selection.start, 'offset'); - def.selection.start.position = obj.getAsValidNumber(def.selection.start, 'position'); - def.selection.start.text = obj.getAsString(def.selection.start, 'text'); - def.selection.end = obj.getAsObj(def.selection, 'end'); - def.selection.end.offset = obj.getAsValidNumber(def.selection.end, 'offset'); - def.selection.end.position = obj.getAsValidNumber(def.selection.end, 'position'); - def.selection.end.text = obj.getAsString(def.selection.end, 'text'); - def.responses = obj.getAsArray(def, 'responses'); - for (const response of def.responses) { - response.comment = obj.getAsString(response, 'comment'); - response.created = obj.getAsValidNumber(response, 'created'); - response.modified = obj.getAsValidNumber(response, 'modified'); - response.uuid = obj.getAsString(response, 'uuid'); - } - def.created = obj.getAsValidNumber(def, 'created'); - def.modified = obj.getAsValidNumber(def, 'modified'); - def.color = obj.getAsNotEmptyStringOrAsUndefined(def, 'color'); - def.comment = obj.getAsString(def, 'comment'); - return new Comment(def); - } catch (e) { - return new Error(error(e)); - } - } - - constructor(public readonly definition: CommentDefinition) { - super(); - } - - public uuid(): string { - return this.definition.uuid; - } - - public isSame(comment: Comment): boolean { - return comment.uuid() == this.definition.uuid; - } - - public json(): { - to(): string; - from(str: string): Comment | Error; - key(): string; - } { - return { - to: (): string => { - return JSON.stringify(this.definition); - }, - from: (json: string): Comment | Error => { - return Comment.fromJson(json); - }, - key: (): string => { - return Comment.KEY; - }, - }; - } -} diff --git a/application/client/src/app/service/session/dependencies/comments/index.ts b/application/client/src/app/service/session/dependencies/comments/index.ts deleted file mode 100644 index c0cd9101e7..0000000000 --- a/application/client/src/app/service/session/dependencies/comments/index.ts +++ /dev/null @@ -1,529 +0,0 @@ -import { SetupLogger, LoggerInterface } from '@platform/entity/logger'; -import { ISelection } from '@ui/elements/scrollarea/controllers/selection'; -import { Modifier } from '@service/session/dependencies/search/highlights/modifier'; -import { CommentsModifier } from '@service/session/dependencies/search/highlights/modifiers/comments'; -import { CommentDefinition, CommentState } from '@platform/types/comment'; -import { Subscriber, Subject, Subjects } from '@platform/env/subscription'; -import { unique } from '@platform/env/sequence'; -import { popup } from '@ui/service/popup'; -import { components } from '@env/decorators/initial'; -import { Vertical, Horizontal } from '@ui/service/popup'; -import { CShortColors } from '@styles/colors'; -import { Session } from '@service/session/session'; -import { notifications, Notification } from '@ui/service/notifications'; -import { Row } from '@schema/content/row'; -import { safeEscapeAnsi } from '@module/ansi'; - -import * as regex from '@platform/env/regex'; -import * as obj from '@platform/env/obj'; - -export interface ActualSelectionData { - selection: string; - start: number; - end: number; -} - -@SetupLogger() -export class Comments extends Subscriber { - protected readonly comments: Map = new Map(); - protected session!: Session; - - protected getSelectedText(): string | undefined { - const selection = document.getSelection(); - return selection === null ? undefined : selection.toString(); - } - - protected getRelevantComment(position: number): CommentDefinition[] { - const comments: CommentDefinition[] = []; - this.comments.forEach((comment: CommentDefinition) => { - if (position < comment.selection.start.position) { - return; - } - if (position > comment.selection.end.position) { - return; - } - comments.push(comment); - }); - return comments; - } - - protected getActualSelectionData( - original: string, - selected: string, - readFromEnd: boolean, - ): ActualSelectionData | Error { - function getHolder(node: HTMLElement): HTMLElement | Error { - if (node.nodeName.toLowerCase().search('app-scrollarea-row') !== -1) { - return node; - } - if (node.parentNode === null || node.parentNode === undefined) { - return new Error(`No parent node has been found`); - } - return getHolder(node.parentNode as HTMLElement); - } - // Collapse selection to start. We need it because anchor and focus nodes can be in any order (depends - // on how user did selection - const selection = window.getSelection(); - if (selection === undefined || selection === null) { - return new Error(`No active selection`); - } - if (!readFromEnd) { - selection.collapseToStart(); - } else { - selection.collapseToEnd(); - } - const anchorNode = selection.anchorNode; - const anchorOffset = selection.anchorOffset; - if (anchorNode === undefined || anchorNode === null) { - return new Error(`No anchorNode in active selection`); - } - // Looking for root row node - const holder: HTMLElement | Error = getHolder(anchorNode as HTMLElement); - if (holder instanceof Error) { - return holder; - } - // Create new selection: from begining of row to start of user's selection - const range: Range = document.createRange(); - range.setStart(holder, 0); - range.setEnd(anchorNode, anchorOffset); - selection.removeAllRanges(); - selection.addRange(range); - // Now we have text before user selection - const before: string = selection.toString(); - selection.removeAllRanges(); - let selStartOffset: number = 0; - let after: string = original; - if (before.length !== 0) { - const regBefore = regex.serialize(before); - const matchBefore = original.match(regBefore); - if ( - matchBefore === null || - matchBefore.length === 0 || - original.search(regBefore) === -1 - ) { - return new Error(`Fail to catch begining of selection`); - } - selStartOffset = matchBefore[0].length; - after = original.substring(selStartOffset, original.length); - } - if (!readFromEnd) { - const regAfter = regex.serialize(selected); - const matchAfter = after.match(regAfter); - if (matchAfter === null || matchAfter.length === 0 || after.search(regAfter) === -1) { - return new Error(`Fail to catch end of selection`); - } - const selEndOffset = matchAfter[0].length; - return { - selection: original.substring(selStartOffset, selStartOffset + selEndOffset), - start: selStartOffset, - end: selStartOffset + selEndOffset, - }; - } else { - return { - selection: original.substring(0, selStartOffset), - start: 0, - end: selStartOffset, - }; - } - } - - public subjects: Subjects<{ - added: Subject; - updated: Subject; - pending: Subject; - removed: Subject; - selected: Subject; - reload: Subject; - export: Subject; - }> = new Subjects({ - added: new Subject(), - updated: new Subject(), - pending: new Subject(), - removed: new Subject(), - selected: new Subject(), - reload: new Subject(), - export: new Subject(), - }); - - constructor() { - super(); - } - - public destroy(): void { - this.comments.clear(); - } - - public init(session: Session): void { - this.session = session; - } - - public isSelectionVisible(): boolean { - const selected = this.getSelectedText(); - return selected !== undefined; - } - - public async create(selection: ISelection): Promise { - function remember(): - | { anchorNode: Node; anchorOffset: number; focusNode: Node; focusOffset: number } - | undefined { - const winSel = window.getSelection(); - if ( - winSel === undefined || - winSel === null || - winSel.anchorNode === null || - winSel.focusNode === null - ) { - return undefined; - } - const reversed: boolean = - winSel.anchorNode.compareDocumentPosition(winSel.focusNode) === - Node.DOCUMENT_POSITION_PRECEDING; - return { - anchorNode: reversed ? winSel.focusNode : winSel.anchorNode, - anchorOffset: reversed ? winSel.focusOffset : winSel.anchorOffset, - focusNode: reversed ? winSel.anchorNode : winSel.focusNode, - focusOffset: reversed ? winSel.anchorOffset : winSel.focusOffset, - }; - } - function restore(stored: { - anchorNode: Node; - anchorOffset: number; - focusNode: Node; - focusOffset: number; - }) { - const winSel = window.getSelection(); - if (winSel === undefined || winSel === null) { - return; - } - const range: Range = document.createRange(); - range.setStart(stored.anchorNode, stored.anchorOffset); - range.setEnd(stored.focusNode, stored.focusOffset); - winSel.removeAllRanges(); - winSel.addRange(range); - } - const uuid: string = unique(); - const selected = this.getSelectedText(); - if (selected === undefined) { - throw new Error(`No selected text`); - } - const username = this.session.teamwork.user().get(); - if (username === undefined) { - throw new Error(`No username available; github profile should be activated`); - } - const stored = remember(); - const origin = ( - await this.session.stream.grab([ - { start: selection.rows.start, end: selection.rows.start }, - { start: selection.rows.end, end: selection.rows.end }, - ]) - ).map((el) => { - el.content = safeEscapeAnsi(el.content); - return el; - }); - stored !== undefined && restore(stored); - const comment: CommentDefinition | Error = (() => { - if (selection.rows.start === selection.rows.end) { - const sel: ActualSelectionData | Error = this.getActualSelectionData( - Row.removeMarkerSymbols(origin[0].content), - selected, - false, - ); - if (sel instanceof Error) { - return sel; - } - return { - uuid, - state: CommentState.pending, - username, - comment: '', - color: CShortColors[0], - created: Date.now(), - modified: Date.now(), - responses: [], - selection: { - start: { - position: Math.min(selection.rows.start, selection.rows.end), - offset: sel.start, - text: sel.selection, - }, - end: { - position: Math.max(selection.rows.start, selection.rows.end), - offset: sel.end, - text: sel.selection, - }, - text: selected, - }, - }; - } else { - const rows = selected - .split(/[\n\r]/gi) - .filter((r) => r.replace(/\d*\u0006$/gi, '').trim() !== ''); - const stored = remember(); - if (stored === undefined) { - return new Error(`Fail save selection`); - } - if (rows.length < 2) { - return new Error(`Fail split rows correctly`); - } - const selStart: ActualSelectionData | Error = this.getActualSelectionData( - Row.removeMarkerSymbols(origin[0].content), - rows[0], - false, - ); - restore(stored); - const selEnd: ActualSelectionData | Error = this.getActualSelectionData( - Row.removeMarkerSymbols(origin[1].content), - rows[rows.length - 1], - true, - ); - if (selStart instanceof Error) { - return selStart; - } - if (selEnd instanceof Error) { - return selEnd; - } - return { - uuid: uuid, - state: CommentState.pending, - username, - comment: '', - color: CShortColors[0], - created: Date.now(), - modified: Date.now(), - responses: [], - selection: { - start: { - position: Math.min(selection.rows.start, selection.rows.end), - offset: selStart.start, - text: selStart.selection, - }, - end: { - position: Math.max(selection.rows.start, selection.rows.end), - offset: selEnd.end, - text: selEnd.selection, - }, - text: selected, - }, - }; - } - })(); - if (comment instanceof Error) { - throw comment; - } - const crossing: CommentDefinition[] = []; - this.comments.forEach((com: CommentDefinition) => { - if ( - com.selection.start.position === com.selection.end.position && - com.selection.start.position === comment.selection.start.position && - com.selection.end.position === comment.selection.end.position - ) { - if ( - comment.selection.start.offset >= com.selection.start.offset && - comment.selection.start.offset <= com.selection.end.offset - ) { - crossing.push(com); - } else if ( - comment.selection.end.offset >= com.selection.start.offset && - comment.selection.end.offset <= com.selection.end.offset - ) { - crossing.push(com); - } else if ( - comment.selection.start.offset <= com.selection.start.offset && - comment.selection.end.offset >= com.selection.end.offset - ) { - crossing.push(com); - } - } else if ( - comment.selection.start.position >= com.selection.start.position && - comment.selection.start.position <= com.selection.end.position - ) { - crossing.push(com); - } else if ( - comment.selection.end.position >= com.selection.start.position && - comment.selection.end.position <= com.selection.end.position - ) { - crossing.push(com); - } else if ( - comment.selection.start.position <= com.selection.start.position && - comment.selection.end.position >= com.selection.end.position - ) { - crossing.push(com); - } - }); - const toBeStored: { comment: CommentDefinition; recover?: CommentDefinition } | undefined = - (() => { - if ( - crossing.length > 1 || - (crossing.length === 1 && crossing[0].username !== username) - ) { - notifications.notify( - new Notification({ - message: - crossing.length === 1 - ? `Cannot change comment of user "${crossing[0].username}"` - : `Cannot change multiple comments`, - actions: [], - }), - ); - return; - } - if (crossing.length === 1) { - const recover = obj.clone(crossing[0]); - if ( - crossing[0].selection.start.position > comment.selection.start.position || - (crossing[0].selection.start.position >= comment.selection.start.position && - crossing[0].selection.start.offset > comment.selection.start.offset) - ) { - crossing[0].selection.start = obj.clone(comment.selection.start); - } - if ( - crossing[0].selection.end.position < comment.selection.end.position || - (crossing[0].selection.end.position <= comment.selection.end.position && - crossing[0].selection.end.offset < comment.selection.end.offset) - ) { - crossing[0].selection.end = obj.clone(comment.selection.end); - } - crossing[0].state = CommentState.pending; - return { comment: crossing[0], recover }; - } else { - return { comment: comment }; - } - })(); - if (toBeStored === undefined) { - return; - } - this.comments.set(toBeStored.comment.uuid, toBeStored.comment); - this.subjects.get().pending.emit(toBeStored.comment); - this.edit(toBeStored.comment); - return undefined; - } - - public edit(comment: CommentDefinition) { - const creating: boolean = comment.comment === ''; - comment.state = CommentState.pending; - const popupHandle = popup.open({ - component: { - factory: components.get('app-dialogs-comment'), - inputs: { - comment: comment, - accept: (text: string) => { - comment.comment = text; - comment.state = CommentState.done; - comment.modified = Date.now(); - this.comments.set(comment.uuid, comment); - if (creating) { - this.subjects.get().added.emit(comment); - } else { - this.subjects.get().updated.emit(comment); - } - this.session.switch().sidebar.comments(); - this.session.highlights.subjects.get().update.emit(); - popupHandle.close(); - }, - remove: () => { - this.remove(comment.uuid); - popupHandle.close(); - }, - cancel: () => { - popupHandle.close(); - }, - }, - }, - position: { - vertical: Vertical.top, - horizontal: Horizontal.center, - }, - closeOnKey: 'Escape', - width: 450, - uuid: 'add_new_comment', - }); - } - - public remove(uuid: string) { - this.comments.delete(uuid); - this.subjects.get().removed.emit(uuid); - this.session.highlights.subjects.get().update.emit(); - } - - public update(comment: CommentDefinition) { - if (!this.comments.has(comment.uuid)) { - return; - } - comment.modified = Date.now(); - this.comments.set(comment.uuid, comment); - this.subjects.get().updated.emit(comment); - this.session.highlights.subjects.get().update.emit(); - } - - public clear() { - const user = this.session.teamwork.user().get(); - if (user === undefined) { - return; - } - this.comments.forEach((comment: CommentDefinition, uuid: string) => { - if (comment.username !== user) { - return; - } - this.comments.delete(uuid); - this.subjects.get().removed.emit(uuid); - }); - this.session.highlights.subjects.get().update.emit(); - } - - public set(comments: CommentDefinition[]): void { - this.comments.clear(); - comments.forEach((comment: CommentDefinition) => { - this.comments.set(comment.uuid, comment); - }); - this.subjects.get().reload.emit(); - this.session.highlights.subjects.get().update.emit(); - } - - public get(): Map { - return this.comments; - } - - public getAsArray(): CommentDefinition[] { - return Array.from(this.comments.values()); - } - - public isCreatingAvailable(): boolean { - return this.session.teamwork.user().get() !== undefined; - } - - public isEditable(comment: CommentDefinition): boolean { - return ( - this.session.teamwork.user().get() !== undefined && - this.session.teamwork.user().get() === comment.username - ); - } - - public isRowCommented(position: number) { - try { - this.comments.forEach((comment: CommentDefinition) => { - if (position < comment.selection.start.position) { - return; - } - if (position > comment.selection.end.position) { - return; - } - throw true; - }); - } catch (state) { - return typeof state === 'boolean' ? state : false; - } - return false; - } - - public getModifiers( - position: number, - str: string, - columns?: { column: number; map: [number, number][] }, - ): Modifier[] { - const comments: CommentDefinition[] = this.getRelevantComment(position); - return comments.map((comment: CommentDefinition) => { - return new CommentsModifier(comment, position, str, columns); - }); - } -} -export interface Comments extends LoggerInterface {} diff --git a/application/client/src/app/service/session/dependencies/cursor.ts b/application/client/src/app/service/session/dependencies/cursor.ts deleted file mode 100644 index 13f5758a39..0000000000 --- a/application/client/src/app/service/session/dependencies/cursor.ts +++ /dev/null @@ -1,161 +0,0 @@ -import { SetupLogger, LoggerInterface } from '@platform/entity/logger'; -import { Subscriber, Subjects, Subject } from '@platform/env/subscription'; -import { cutUuid } from '@log/index'; -import { RowSrc, Owner, Row } from '@schema/content/row'; -import { IRange } from '@platform/types/range'; - -export interface SelectEvent { - row: number; - initiator: Owner; -} - -@SetupLogger() -export class Cursor extends Subscriber { - public readonly subjects: Subjects<{ - selected: Subject; - updated: Subject; - loaded: Subject; - frame: Subject; - }> = new Subjects({ - selected: new Subject(), - updated: new Subject(), - loaded: new Subject(), - frame: new Subject(), - }); - private _selected: number[] = []; - private _uuid!: string; - private _last: { - position: number | undefined; - row: RowSrc | undefined; - recent: RowSrc[]; - } = { - position: undefined, - row: undefined, - recent: [], - }; - private _frame: IRange | undefined; - - public init(uuid: string) { - this.setLoggerName(`Cursor: ${cutUuid(uuid)}`); - this._uuid = uuid; - } - - public destroy() { - this.unsubscribe(); - this.subjects.destroy(); - } - - public recent(rows: RowSrc[]) { - this._last.recent = rows; - this.subjects.get().loaded.emit(); - } - - public frame(): { - set(frame: IRange): void; - get(): IRange | undefined; - } { - return { - set: (frame: IRange): void => { - this._frame = frame; - this.subjects.get().frame.emit(frame); - }, - get: (): IRange | undefined => { - return Object.assign({}, this._frame); - }, - }; - } - - public select( - position: number, - initiator: Owner, - event: PointerEvent | undefined, - row: Row | undefined, - ) { - if (event !== undefined && event.shiftKey) { - if (this._selected.length === 0) { - this._selected = [position]; - } else { - const last = this._selected[this._selected.length - 1]; - if (last === position) { - return; - } - this._selected = this._selected.concat( - [...new Array(Math.abs(position - last))].map((_, i) => - position < last ? i + position : last + i + 1, - ), - ); - } - } else if (event !== undefined && (event.ctrlKey || event.metaKey)) { - const target = this._selected.indexOf(position); - if (target === -1) { - this._selected.push(position); - } else { - this._selected.splice(target, 1); - } - } else if (this._selected.length === 1 && this._selected[0] === position) { - this._selected = []; - } else { - this._selected = [position]; - } - this._last.position = position; - this._last.row = row !== undefined ? row.serialized() : undefined; - this.subjects.get().selected.emit({ - row: position, - initiator, - }); - this.subjects.get().updated.emit(); - } - - public mark(row: number): { - selected(): void; - unselected(): void; - } { - return { - selected: (): void => { - if (this.isSelected(row)) { - return; - } - this._selected.push(row); - this.subjects.get().updated.emit(); - }, - unselected: (): void => { - this._selected = this._selected.filter((r) => r !== row); - this.subjects.get().updated.emit(); - }, - }; - } - - public isSelected(row: number): boolean { - return this._selected.find((r) => r === row) !== undefined; - } - - public get(): number[] { - return this._selected; - } - - public getSingle(): { - position(): number | undefined; - row(): RowSrc | undefined; - } { - return { - position: (): number | undefined => { - return this._selected.length === 1 ? this._last.position : undefined; - }, - row: (): RowSrc | undefined => { - if (this._selected.length !== 1) { - return undefined; - } - return this._last.row !== undefined - ? this._last.row - : this._last.recent.find((r) => r.position === this._last.position); - }, - }; - } - - public drop(): Cursor { - this._selected = []; - this.subjects.get().updated.emit(); - return this; - } -} -export interface Cursor extends LoggerInterface {} diff --git a/application/client/src/app/service/session/dependencies/exporter.ts b/application/client/src/app/service/session/dependencies/exporter.ts deleted file mode 100644 index de3f5dfe0c..0000000000 --- a/application/client/src/app/service/session/dependencies/exporter.ts +++ /dev/null @@ -1,103 +0,0 @@ -import { SetupLogger, LoggerInterface } from '@platform/entity/logger'; -import { cutUuid } from '@log/index'; -import { Stream } from './stream'; -import { Indexed } from './indexed'; -import { IRange } from '@platform/types/range'; -import { getFileName, getSafeFileName } from '@platform/types/files'; -import { bridge } from '@service/bridge'; -import { TextExportOptions } from '@platform/types/exporting'; - -import * as Requests from '@platform/ipc/request/index'; - -@SetupLogger() -export class Exporter { - private _uuid!: string; - private _stream!: Stream; - private _indexed!: Indexed; - - public init(uuid: string, stream: Stream, indexed: Indexed) { - this.setLoggerName(`Cache: ${cutUuid(uuid)}`); - this._uuid = uuid; - this._stream = stream; - this._indexed = indexed; - } - - public destroy() { - // - } - - public isRawAvailable(): Promise { - return this._stream.export().isRawAvailable(); - } - - public export( - asRaw: boolean, - opt?: TextExportOptions, - ): { - all(): Promise; - stream(ranges: IRange[]): Promise; - search(): Promise; - } { - const uuid = this._uuid; - let defaultFileName = this._stream.observe().getSourceFileName(); - if (defaultFileName === undefined) { - defaultFileName = getSafeFileName( - `export_${new Date().toLocaleDateString()}_${new Date().toLocaleTimeString()}`, - ); - } else { - defaultFileName = getSafeFileName(`${getFileName(defaultFileName)}_export`); - } - if (!asRaw) { - defaultFileName = `${defaultFileName}.txt`; - } - return { - all(): Promise { - return Requests.IpcRequest.send( - Requests.File.ExportSession.Response, - new Requests.File.ExportSession.Request({ - uuid, - }), - ).then(() => { - return Promise.resolve(undefined); - }); - }, - stream: async (ranges: IRange[]): Promise => { - if (ranges.length === 0) { - return undefined; - } - const dest = await bridge.files().select.save(undefined, defaultFileName); - if (dest === undefined) { - return undefined; - } - return asRaw - ? this._stream.export().raw(ranges, dest) - : this._stream.export().text(ranges, dest, opt); - }, - search: async (): Promise => { - if (this._indexed.len() === 0) { - return undefined; - } - const dest = await bridge.files().select.save(undefined, defaultFileName); - if (dest === undefined) { - return undefined; - } - const ranges = await this._indexed.asRanges(); - return asRaw - ? this._stream.export().raw(ranges, dest) - : this._stream.export().text(ranges, dest, opt); - }, - }; - } - - // Clone search results to new file and returns filepath - public async clone(): Promise { - if (this._indexed.len() === 0) { - return undefined; - } - const ranges = await this._indexed.asRanges(); - return (await this.isRawAvailable()) - ? this._stream.export().raw(ranges) - : this._stream.export().text(ranges); - } -} -export interface Exporter extends LoggerInterface {} diff --git a/application/client/src/app/service/session/dependencies/indexed.ts b/application/client/src/app/service/session/dependencies/indexed.ts deleted file mode 100644 index 3a66f8e23d..0000000000 --- a/application/client/src/app/service/session/dependencies/indexed.ts +++ /dev/null @@ -1,219 +0,0 @@ -import { SetupLogger, LoggerInterface } from '@platform/entity/logger'; -import { Subscriber, Subjects, Subject } from '@platform/env/subscription'; -import { cutUuid } from '@log/index'; -import { IndexingMode } from '@platform/types/content'; -import { Range, IRange } from '@platform/types/range'; -import { GrabbedElement } from '@platform/types/bindings/miscellaneous'; - -import * as Requests from '@platform/ipc/request'; -import * as Events from '@platform/ipc/event'; - -@SetupLogger() -export class Indexed extends Subscriber { - public readonly subjects: Subjects<{ - updated: Subject; - changed: Subject; - }> = new Subjects({ - updated: new Subject(), - changed: new Subject(), - }); - private _len: number = 0; - private _uuid!: string; - private _mode: IndexingMode = IndexingMode.Regular; - - public init(uuid: string) { - this.setLoggerName(`Indexed: ${cutUuid(uuid)}`); - this._uuid = uuid; - this.register( - Events.IpcEvent.subscribe(Events.Stream.IndexedMapUpdated.Event, (event) => { - if (event.session !== this._uuid) { - return; - } - this._len = event.len; - this.subjects.get().updated.emit(this._len); - }), - ); - } - - public destroy() { - this.unsubscribe(); - this.subjects.destroy(); - } - - public len(): number { - return this._len; - } - - public expand(row: number): { - before(): Promise; - after(): Promise; - } { - const request = (row: number, above: boolean): Promise => { - return Requests.IpcRequest.send( - Requests.Stream.Expand.Response, - new Requests.Stream.Expand.Request({ - session: this._uuid, - seporator: row, - offset: 4, - above, - }), - ) - .then((response: Requests.Stream.Expand.Response) => { - if (typeof response.error === 'string') { - this.log().error( - `Fail to expand indexed content on position ${row}: ${response.error}`, - ); - } - }) - .catch((error: Error) => { - this.log().error( - `Fail to expand indexed content on position ${row}: ${error.message}`, - ); - }) - .finally(() => { - this.subjects.get().changed.emit(); - }); - }; - return { - before: (): Promise => { - if (this._len === 0) { - return Promise.resolve(); - } - return request(row, true); - }, - after: (): Promise => { - if (this._len === 0) { - return Promise.resolve(); - } - return request(row, false); - }, - }; - } - - public grab(range: Range | IRange): Promise { - if (this._len === 0) { - // TODO: Grabber is crash session in this case... should be prevented on grabber level - return Promise.resolve([]); - } - return Requests.IpcRequest.send( - Requests.Stream.Indexed.Response, - new Requests.Stream.Indexed.Request({ - session: this._uuid, - from: range.start, - to: range.end, - }), - ) - .then((response: Requests.Stream.Indexed.Response) => { - return response.rows; - }) - .catch((error: Error) => { - if (range.end >= this.len()) { - // It might be, during request search map has been changed already - // For example we requested range, but right after it, a new search - // was created and length of stream became 0 - // In this case we don't need to log any errors, but on backend error - // will be logged in any way. - } else { - this.log().error(`Fail to grab indexed content: ${error.message}`); - } - return []; - }); - } - - public asRanges(): Promise { - if (this._len === 0) { - return Promise.resolve([]); - } - return Requests.IpcRequest.send( - Requests.Stream.IndexesAsRanges.Response, - new Requests.Stream.IndexesAsRanges.Request({ - session: this._uuid, - }), - ).then((response: Requests.Stream.IndexesAsRanges.Response) => { - return response.ranges; - }); - } - - public getIndexesAround( - row: number, - ): Promise<{ before: number | undefined; after: number | undefined }> { - if (this._len === 0) { - return Promise.resolve({ before: undefined, after: undefined }); - } - return new Promise((resolve, reject) => { - Requests.IpcRequest.send( - Requests.Stream.IndexesAround.Response, - new Requests.Stream.IndexesAround.Request({ - session: this._uuid, - row, - }), - ) - .then((response: Requests.Stream.IndexesAround.Response) => { - if (typeof response.error === 'string') { - return reject(new Error(response.error)); - } - resolve({ before: response.before, after: response.after }); - }) - .catch((error: Error) => { - this.log().error(`Fail to get distances around index ${row}: ${error.message}`); - }); - }); - } - - public modes(): { - regular(): boolean; - breadcrumbs(): boolean; - toggle(): { - regular(): Promise; - breadcrumbs(): Promise; - }; - } { - const request = (mode: IndexingMode): Promise => { - return Requests.IpcRequest.send( - Requests.Stream.Mode.Response, - new Requests.Stream.Mode.Request({ - session: this._uuid, - mode, - }), - ) - .then((response: Requests.Stream.Mode.Response) => { - if (response.error !== undefined) { - this.log().warn(`Fail to switch indexing mode: ${response.error}`); - } - }) - .catch((error: Error) => { - this.log().error(`Fail to switch indexing mode: ${error.message}`); - }) - .finally(() => { - this.subjects.get().changed.emit(); - }); - }; - return { - regular: (): boolean => { - return this._mode === IndexingMode.Regular; - }, - breadcrumbs: (): boolean => { - return this._mode === IndexingMode.Breadcrumbs; - }, - toggle: (): { - regular(): Promise; - breadcrumbs(): Promise; - } => { - return { - regular: (): Promise => { - this._mode = IndexingMode.Regular; - return request(this._mode); - }, - breadcrumbs: (): Promise => { - this._mode = - this._mode === IndexingMode.Regular - ? IndexingMode.Breadcrumbs - : IndexingMode.Regular; - return request(this._mode); - }, - }; - }, - }; - } -} -export interface Indexed extends LoggerInterface {} diff --git a/application/client/src/app/service/session/dependencies/info.ts b/application/client/src/app/service/session/dependencies/info.ts deleted file mode 100644 index db00e42c1a..0000000000 --- a/application/client/src/app/service/session/dependencies/info.ts +++ /dev/null @@ -1,100 +0,0 @@ -import { Subject } from '@platform/env/subscription'; -import { unique } from '@platform/env/sequence'; -import { Observe } from '@platform/types/observe'; -import { Protocol } from '@platform/types/observe/parser'; -import { getFileName } from '@platform/types/files'; - -export interface IInfoBlock { - caption: string; - tooltip: string; - icon?: string; -} - -export class Info { - protected readonly blocks: Map = new Map(); - - public updated: Subject = new Subject(); - - public destroy(): void { - this.updated.destroy(); - } - - public fromObserveInfo(observe: Observe) { - const uuid = observe.hash().toString(); - if (observe.configuration.parser[Protocol.Dlt] !== undefined) { - const cfg = observe.configuration.parser[Protocol.Dlt]; - if (cfg.fibex_file_paths !== undefined) { - if (cfg.fibex_file_paths.length === 1) { - this.add( - { - caption: `FIBEX: ${getFileName(cfg.fibex_file_paths[0])}`, - tooltip: `Used FIBEX: ${cfg.fibex_file_paths[0]}`, - }, - `fibex_${uuid}`, - ); - } else if (cfg.fibex_file_paths.length > 1) { - this.add( - { - caption: `FIBEX: ${cfg.fibex_file_paths.length} files`, - tooltip: cfg.fibex_file_paths.join('\n'), - }, - `fibex_${uuid}`, - ); - } - } - if (cfg.tz !== undefined) { - this.add( - { - caption: `TZ: ${cfg.tz}`, - tooltip: `Used TimeZone: ${cfg.tz}`, - }, - `tz_${uuid}`, - ); - } - } else if (observe.configuration.parser[Protocol.SomeIp] !== undefined) { - const cfg = observe.configuration.parser[Protocol.SomeIp]; - if (cfg.fibex_file_paths !== undefined) { - if (cfg.fibex_file_paths.length === 1) { - this.add( - { - caption: `FIBEX: ${getFileName(cfg.fibex_file_paths[0])}`, - tooltip: `Used FIBEX: ${cfg.fibex_file_paths[0]}`, - }, - `fibex_${uuid}`, - ); - } else if (cfg.fibex_file_paths.length > 1) { - this.add( - { - caption: `FIBEX: ${cfg.fibex_file_paths.length} files`, - tooltip: cfg.fibex_file_paths.join('\n'), - }, - `fibex_${uuid}`, - ); - } - } - } else if (observe.configuration.parser[Protocol.Text] !== undefined) { - // ignore - } - } - - public add(block: IInfoBlock, uuid?: string): string { - uuid = uuid === undefined ? unique() : uuid; - this.blocks.set(uuid, block); - this.updated.emit(); - return uuid; - } - - public update(uuid: string, block: IInfoBlock): void { - this.blocks.set(uuid, block); - this.updated.emit(); - } - - public remove(uuid: string): void { - this.blocks.delete(uuid); - this.updated.emit(); - } - - public get(): IInfoBlock[] { - return Array.from(this.blocks.values()); - } -} diff --git a/application/client/src/app/service/session/dependencies/observing/implementations/files.ts b/application/client/src/app/service/session/dependencies/observing/implementations/files.ts deleted file mode 100644 index cb25503f4b..0000000000 --- a/application/client/src/app/service/session/dependencies/observing/implementations/files.ts +++ /dev/null @@ -1,144 +0,0 @@ -import { Provider as Base } from '../provider'; -import { ObserveSource } from '@service/session/dependencies/observing/source'; -import { IComponentDesc } from '@elements/containers/dynamic/component'; -import { List } from '@ui/views/sidebar/observe/lists/file/component'; -import { IMenuItem } from '@ui/service/contextmenu'; - -import * as $ from '@platform/types/observe'; - -export class Provider extends Base { - private _sources: ObserveSource[] = []; - private _processed: string[] = []; - - public contextMenu(source: ObserveSource): IMenuItem[] { - const items: IMenuItem[] = []; - const observer = source.observer; - if (observer !== undefined) { - items.push({ - caption: 'Stop tailing', - handler: () => { - observer.abort().catch((err: Error) => { - this.logger.error(`Fail to abort observing (file tailing): ${err.message}`); - }); - }, - }); - } - return items; - } - - public update(sources: ObserveSource[]): Provider { - const added = sources.filter((s) => !this._processed.includes(s.uuid())); - // Add files - this._sources.push( - ...added.filter( - (source) => source.observe.origin.nature() instanceof $.Origin.File.Configuration, - ), - ); - // Add files from concat-container - added.map((source) => { - const concat = source.observe.origin.as<$.Origin.Concat.Configuration>( - $.Origin.Concat.Configuration, - ); - if (concat === undefined) { - return; - } - const origins = concat.asFileOrigins(); - const parser = source.observe.parser.sterilized(); - const files = origins.map((origin) => { - return new ObserveSource(new $.Observe({ origin, parser })).asChild(); - }); - this._sources.push(...files); - }); - this._processed.push(...added.map((a) => a.uuid())); - Base.overwrite(sources, this._sources); - return this; - } - - public sources(): ObserveSource[] { - return this._sources; - } - - public getPanels(): { - list(): { - name(): string; - desc(): string; - comp(): IComponentDesc; - }; - nocontent(): { - name(): string | undefined; - desc(): string | undefined; - comp(): IComponentDesc | undefined; - }; - } { - return { - list: (): { - name(): string; - desc(): string; - comp(): IComponentDesc; - } => { - return { - name: (): string => { - return `Files`; - }, - desc: (): string => { - return this._sources.length > 0 ? this._sources.length.toString() : ''; - }, - comp: (): IComponentDesc => { - return { - factory: List, - inputs: { - provider: this, - }, - }; - }, - }; - }, - - nocontent: (): { - name(): string | undefined; - desc(): string | undefined; - comp(): IComponentDesc | undefined; - } => { - return { - name: (): string | undefined => { - return undefined; - }, - desc: (): string | undefined => { - return undefined; - }, - comp: (): IComponentDesc | undefined => { - return undefined; - }, - }; - }, - }; - } - - public override getNewSourceError(): Error | undefined { - const active = this._sources.find((s) => s.observer !== undefined); - if (active !== undefined) { - return new Error(`Cannot attach new source while file is tailing`); - } - if (this._sources.length !== 1) { - return undefined; - } - const singleTextFile = this._sources.find((s) => { - const file = s.observe.origin.as<$.Origin.File.Configuration>( - $.Origin.File.Configuration, - ); - if (file === undefined) { - return false; - } - if (file.filetype() === $.Types.File.FileType.Text && !s.child) { - return true; - } - return false; - }); - if (singleTextFile !== undefined) { - return new Error( - `Single file has been opened. In this case you cannot attach new source(s).`, - ); - } - return undefined; - } -} diff --git a/application/client/src/app/service/session/dependencies/observing/implementations/index.ts b/application/client/src/app/service/session/dependencies/observing/implementations/index.ts deleted file mode 100644 index 20d15fb76a..0000000000 --- a/application/client/src/app/service/session/dependencies/observing/implementations/index.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { Provider as Files } from './files'; -import { Provider as Processes } from './processes'; -import { Provider as Serial } from './serial'; -import { Provider as Tcp } from './tcp'; -import { Provider as Udp } from './udp'; - -export const PROVIDERS = [Files, Processes, Serial, Tcp, Udp]; diff --git a/application/client/src/app/service/session/dependencies/observing/implementations/processes.ts b/application/client/src/app/service/session/dependencies/observing/implementations/processes.ts deleted file mode 100644 index bb6dec2e9a..0000000000 --- a/application/client/src/app/service/session/dependencies/observing/implementations/processes.ts +++ /dev/null @@ -1,110 +0,0 @@ -import { Provider as Base } from '../provider'; -import { ObserveSource } from '@service/session/dependencies/observing/source'; -import { IComponentDesc } from '@elements/containers/dynamic/component'; -import { List } from '@ui/views/sidebar/observe/lists/process/component'; -import { IMenuItem } from '@ui/service/contextmenu'; -import { session } from '@service/session'; - -import * as $ from '@platform/types/observe'; -import * as Factory from '@platform/types/observe/factory'; - -export class Provider extends Base { - private _sources: ObserveSource[] = []; - - public contextMenu(source: ObserveSource): IMenuItem[] { - const items: IMenuItem[] = []; - const observer = source.observer; - if (observer !== undefined) { - items.push({ - caption: 'Stop', - handler: () => { - observer.abort().catch((err: Error) => { - this.logger.error(`Fail to abort observing (spawning): ${err.message}`); - }); - }, - }); - } else { - items.push({ - caption: 'Repeat Command', - handler: () => { - this.clone(source.observe).catch((err: Error) => { - this.logger.error(`Fail to repeat: ${err.message}`); - }); - }, - }); - } - return items; - } - - public update(sources: ObserveSource[]): Provider { - this._sources = sources.filter( - (source) => - source.observe.origin.nature() instanceof - $.Origin.Stream.Stream.Process.Configuration, - ); - return this; - } - - public openNewSessionOptions() { - session.initialize().configure(new Factory.Stream().process().get()); - } - - public sources(): ObserveSource[] { - return this._sources; - } - - public getPanels(): { - list(): { - name(): string; - desc(): string; - comp(): IComponentDesc; - }; - nocontent(): { - name(): string | undefined; - desc(): string | undefined; - comp(): IComponentDesc | undefined; - }; - } { - return { - list: (): { - name(): string; - desc(): string; - comp(): IComponentDesc; - } => { - return { - name: (): string => { - return `Commands`; - }, - desc: (): string => { - return this._sources.length > 0 ? this._sources.length.toString() : ''; - }, - comp: (): IComponentDesc => { - return { - factory: List, - inputs: { - provider: this, - }, - }; - }, - }; - }, - nocontent: (): { - name(): string | undefined; - desc(): string | undefined; - comp(): IComponentDesc | undefined; - } => { - return { - name: (): string | undefined => { - return undefined; - }, - desc: (): string | undefined => { - return undefined; - }, - comp: (): IComponentDesc | undefined => { - return undefined; - }, - }; - }, - }; - } -} diff --git a/application/client/src/app/service/session/dependencies/observing/implementations/serial.ts b/application/client/src/app/service/session/dependencies/observing/implementations/serial.ts deleted file mode 100644 index 63c12383a4..0000000000 --- a/application/client/src/app/service/session/dependencies/observing/implementations/serial.ts +++ /dev/null @@ -1,112 +0,0 @@ -import { Provider as Base } from '../provider'; -import { ObserveSource } from '@service/session/dependencies/observing/source'; -import { IComponentDesc } from '@elements/containers/dynamic/component'; -import { List } from '@ui/views/sidebar/observe/lists/serial/component'; -import { IMenuItem } from '@ui/service/contextmenu'; -import { session } from '@service/session'; - -import * as $ from '@platform/types/observe'; -import * as Factory from '@platform/types/observe/factory'; - -export class Provider extends Base { - private _sources: ObserveSource[] = []; - - public contextMenu(source: ObserveSource): IMenuItem[] { - const items: IMenuItem[] = []; - const observer = source.observer; - if (observer !== undefined) { - items.push({ - caption: 'Disconnect', - handler: () => { - observer.abort().catch((err: Error) => { - this.logger.error( - `Fail to abort observing (serial listening): ${err.message}`, - ); - }); - }, - }); - } else { - items.push({ - caption: 'Connect', - handler: () => { - this.clone(source.observe).catch((err: Error) => { - this.logger.error(`Fail to repeat: ${err.message}`); - }); - }, - }); - } - return items; - } - - public openNewSessionOptions() { - session.initialize().configure(new Factory.Stream().serial().get()); - } - - public update(sources: ObserveSource[]): Provider { - this._sources = sources.filter( - (source) => - source.observe.origin.nature() instanceof - $.Origin.Stream.Stream.Serial.Configuration, - ); - return this; - } - - public sources(): ObserveSource[] { - return this._sources; - } - - public getPanels(): { - list(): { - name(): string; - desc(): string; - comp(): IComponentDesc; - }; - nocontent(): { - name(): string | undefined; - desc(): string | undefined; - comp(): IComponentDesc | undefined; - }; - } { - return { - list: (): { - name(): string; - desc(): string; - comp(): IComponentDesc; - } => { - return { - name: (): string => { - return `Serial Connections`; - }, - desc: (): string => { - return this._sources.length > 0 ? this._sources.length.toString() : ''; - }, - comp: (): IComponentDesc => { - return { - factory: List, - inputs: { - provider: this, - }, - }; - }, - }; - }, - nocontent: (): { - name(): string | undefined; - desc(): string | undefined; - comp(): IComponentDesc | undefined; - } => { - return { - name: (): string | undefined => { - return undefined; - }, - desc: (): string | undefined => { - return undefined; - }, - comp: (): IComponentDesc | undefined => { - return undefined; - }, - }; - }, - }; - } -} diff --git a/application/client/src/app/service/session/dependencies/observing/implementations/tcp.ts b/application/client/src/app/service/session/dependencies/observing/implementations/tcp.ts deleted file mode 100644 index 03c7ae8827..0000000000 --- a/application/client/src/app/service/session/dependencies/observing/implementations/tcp.ts +++ /dev/null @@ -1,111 +0,0 @@ -import { Provider as Base } from '../provider'; -import { ObserveSource } from '@service/session/dependencies/observing/source'; -import { IComponentDesc } from '@elements/containers/dynamic/component'; -import { List } from '@ui/views/sidebar/observe/lists/tcp/component'; -import { IMenuItem } from '@ui/service/contextmenu'; -import { session } from '@service/session'; - -import * as $ from '@platform/types/observe'; -import * as Factory from '@platform/types/observe/factory'; - -export class Provider extends Base { - private _sources: ObserveSource[] = []; - - public contextMenu(source: ObserveSource): IMenuItem[] { - const items: IMenuItem[] = []; - const observer = source.observer; - if (observer !== undefined) { - items.push({ - caption: 'Disconnect', - handler: () => { - observer.abort().catch((err: Error) => { - this.logger.error( - `Fail to abort observing (tcp listening): ${err.message}`, - ); - }); - }, - }); - } else { - items.push({ - caption: 'Connect', - handler: () => { - this.clone(source.observe).catch((err: Error) => { - this.logger.error(`Fail to repeat: ${err.message}`); - }); - }, - }); - } - return items; - } - - public openNewSessionOptions() { - session.initialize().configure(new Factory.Stream().tcp().get()); - } - - public update(sources: ObserveSource[]): Provider { - this._sources = sources.filter( - (source) => - source.observe.origin.nature() instanceof $.Origin.Stream.Stream.TCP.Configuration, - ); - return this; - } - - public sources(): ObserveSource[] { - return this._sources; - } - - public getPanels(): { - list(): { - name(): string; - desc(): string; - comp(): IComponentDesc; - }; - nocontent(): { - name(): string | undefined; - desc(): string | undefined; - comp(): IComponentDesc | undefined; - }; - } { - return { - list: (): { - name(): string; - desc(): string; - comp(): IComponentDesc; - } => { - return { - name: (): string => { - return `TCP Connections`; - }, - desc: (): string => { - return this._sources.length > 0 ? this._sources.length.toString() : ''; - }, - comp: (): IComponentDesc => { - return { - factory: List, - inputs: { - provider: this, - }, - }; - }, - }; - }, - nocontent: (): { - name(): string | undefined; - desc(): string | undefined; - comp(): IComponentDesc | undefined; - } => { - return { - name: (): string | undefined => { - return undefined; - }, - desc: (): string | undefined => { - return undefined; - }, - comp: (): IComponentDesc | undefined => { - return undefined; - }, - }; - }, - }; - } -} diff --git a/application/client/src/app/service/session/dependencies/observing/implementations/udp.ts b/application/client/src/app/service/session/dependencies/observing/implementations/udp.ts deleted file mode 100644 index 86e974ce2e..0000000000 --- a/application/client/src/app/service/session/dependencies/observing/implementations/udp.ts +++ /dev/null @@ -1,111 +0,0 @@ -import { Provider as Base } from '../provider'; -import { ObserveSource } from '@service/session/dependencies/observing/source'; -import { IComponentDesc } from '@elements/containers/dynamic/component'; -import { List } from '@ui/views/sidebar/observe/lists/udp/component'; -import { IMenuItem } from '@ui/service/contextmenu'; -import { session } from '@service/session'; - -import * as $ from '@platform/types/observe'; -import * as Factory from '@platform/types/observe/factory'; - -export class Provider extends Base { - private _sources: ObserveSource[] = []; - - public contextMenu(source: ObserveSource): IMenuItem[] { - const items: IMenuItem[] = []; - const observer = source.observer; - if (observer !== undefined) { - items.push({ - caption: 'Disconnect', - handler: () => { - observer.abort().catch((err: Error) => { - this.logger.error( - `Fail to abort observing (udp listening): ${err.message}`, - ); - }); - }, - }); - } else { - items.push({ - caption: 'Connect', - handler: () => { - this.clone(source.observe).catch((err: Error) => { - this.logger.error(`Fail to repeat: ${err.message}`); - }); - }, - }); - } - return items; - } - - public openNewSessionOptions() { - session.initialize().configure(new Factory.Stream().udp().get()); - } - - public update(sources: ObserveSource[]): Provider { - this._sources = sources.filter( - (source) => - source.observe.origin.nature() instanceof $.Origin.Stream.Stream.UDP.Configuration, - ); - return this; - } - - public sources(): ObserveSource[] { - return this._sources; - } - - public getPanels(): { - list(): { - name(): string; - desc(): string; - comp(): IComponentDesc; - }; - nocontent(): { - name(): string | undefined; - desc(): string | undefined; - comp(): IComponentDesc | undefined; - }; - } { - return { - list: (): { - name(): string; - desc(): string; - comp(): IComponentDesc; - } => { - return { - name: (): string => { - return `UPD Connections`; - }, - desc: (): string => { - return this._sources.length > 0 ? this._sources.length.toString() : ''; - }, - comp: (): IComponentDesc => { - return { - factory: List, - inputs: { - provider: this, - }, - }; - }, - }; - }, - nocontent: (): { - name(): string | undefined; - desc(): string | undefined; - comp(): IComponentDesc | undefined; - } => { - return { - name: (): string | undefined => { - return undefined; - }, - desc: (): string | undefined => { - return undefined; - }, - comp: (): IComponentDesc | undefined => { - return undefined; - }, - }; - }, - }; - } -} diff --git a/application/client/src/app/service/session/dependencies/observing/operation.ts b/application/client/src/app/service/session/dependencies/observing/operation.ts deleted file mode 100644 index 2c7089c9d5..0000000000 --- a/application/client/src/app/service/session/dependencies/observing/operation.ts +++ /dev/null @@ -1,70 +0,0 @@ -import { Observe } from '@platform/types/observe'; -import { SdeRequest, SdeResponse } from '@platform/types/sde'; - -import * as $ from '@platform/types/observe'; - -export class ObserveOperation { - private _sdeTasksCount: number = 0; - - constructor( - public readonly uuid: string, - protected readonly observe: Observe, - protected readonly sde: (msg: SdeRequest) => Promise, - protected readonly restarting: (observe: Observe) => Promise, - protected readonly cancel: () => Promise, - ) {} - - public abort(): Promise { - return this.cancel(); - } - - public restart(): Promise { - return this.restarting(this.observe); - } - - public asObserve(): Observe { - return this.observe; - } - - public asOrigin(): $.Origin.Configuration { - return this.observe.origin; - } - - public send(): { - text(data: string): Promise; - bytes(data: number[]): Promise; - } { - const send = (request: SdeRequest): Promise => { - this._sdeTasksCount += 1; - return this.sde(request).finally(() => { - this._sdeTasksCount -= 1; - }); - }; - return { - text: (data: string): Promise => { - if (!this.observe.origin.isSdeSupported()) { - return Promise.reject( - new Error(`Observed origin doesn't support SDE protocol`), - ); - } - return send({ - WriteText: `${data}\n\r`, - }); - }, - bytes: (data: number[]): Promise => { - if (!this.observe.origin.isSdeSupported()) { - return Promise.reject( - new Error(`Observed origin doesn't support SDE protocol`), - ); - } - return send({ - WriteBytes: data, - }); - }, - }; - } - - public getSdeTasksCount(): number { - return this._sdeTasksCount; - } -} diff --git a/application/client/src/app/service/session/dependencies/observing/provider.ts b/application/client/src/app/service/session/dependencies/observing/provider.ts deleted file mode 100644 index fb9a4f6e81..0000000000 --- a/application/client/src/app/service/session/dependencies/observing/provider.ts +++ /dev/null @@ -1,162 +0,0 @@ -import { IComponentDesc } from '@elements/containers/dynamic/component'; -import { Logger } from '@platform/log'; -import { Session } from '@service/session/session'; -import { ObserveSource } from '@service/session/dependencies/observing/source'; -import { unique } from '@platform/env/sequence'; -import { Subject, Subjects } from '@platform/env/subscription'; -import { IMenuItem } from '@ui/service/contextmenu'; -import { Observe } from '@platform/types/observe'; -import { session } from '@service/session'; -import { components } from '@env/decorators/initial'; -import { popup, Vertical, Horizontal } from '@ui/service/popup'; - -import * as $ from '@platform/types/observe'; - -export interface ProviderConstructor { - new (session: Session, logger: Logger): Provider; -} - -export abstract class Provider { - static overwrite(src: ObserveSource[], dest: ObserveSource[]) { - src.filter((src) => src.observer === undefined).forEach((src) => { - const index = dest.findIndex((s) => s.observe.uuid === src.observe.uuid); - if (index !== -1) { - dest.splice(index, 1, src); - } - }); - } - public readonly session: Session; - public readonly logger: Logger; - public readonly subjects: Subjects<{ - updated: Subject; - }> = new Subjects({ - updated: new Subject(), - }); - public panels!: { - list: { - name: string; - desc: string; - comp: IComponentDesc; - }; - nocontent: { - name: string | undefined; - desc: string | undefined; - comp: IComponentDesc | undefined; - }; - }; - public readonly uuid: string = unique(); - - constructor(session: Session, logger: Logger) { - this.session = session; - this.logger = logger; - } - - public destroy() { - this.subjects.destroy(); - } - - public last(): Observe | undefined { - const sources = this.sources(); - if (sources.length === 0) { - return undefined; - } - const observe = sources[sources.length - 1]; - return observe.observe; - } - - public recent() { - const observe = this.last(); - if (observe === undefined) { - return; - } - popup.open({ - component: { - factory: components.get('app-navigator'), - inputs: { - observe, - }, - }, - position: { - vertical: Vertical.top, - horizontal: Horizontal.center, - }, - closeOnKey: 'Escape', - width: 450, - uuid: 'app-recent-actions-popup-observed', - }); - } - - public clone(observe: Observe): Promise { - if (!(observe.origin.instance instanceof $.Origin.Stream.Configuration)) { - return Promise.reject(new Error(`Only Origin.Stream can be repeated`)); - } - const last = this.last(); - if (last !== undefined) { - observe.parser.change(last.parser.instance); - } - return this.session.stream.observe().start(observe.clone()); - } - - public openAsNewOrigin(observe: Observe): Promise { - const last = this.last(); - if (last !== undefined) { - observe.parser.change(last.parser.instance); - } else { - return Promise.reject(new Error(`No data about current parser`)); - } - return this.session.stream.observe().start(observe.clone()); - } - - public openAsNew(source: ObserveSource | Observe): Promise { - return session - .initialize() - .configure(source instanceof ObserveSource ? source.observe : source); - } - - public setPanels(): Provider { - this.panels = { - list: { - name: this.getPanels().list().name(), - desc: this.getPanels().list().desc(), - comp: this.getPanels().list().comp(), - }, - nocontent: { - name: this.getPanels().nocontent().name(), - desc: this.getPanels().nocontent().desc(), - comp: this.getPanels().nocontent().comp(), - }, - }; - return this; - } - - public isEmpty(): boolean { - return this.sources().length === 0; - } - - public abstract contextMenu(source: ObserveSource): IMenuItem[]; - - public abstract update(sources: ObserveSource[]): Provider; - - public abstract sources(): ObserveSource[]; - - public abstract getPanels(): { - list(): { - name(): string; - desc(): string; - comp(): IComponentDesc; - }; - nocontent(): { - name(): string | undefined; - desc(): string | undefined; - comp(): IComponentDesc | undefined; - }; - }; - - public getNewSourceError(): Error | undefined { - return undefined; - } - - public count(): number { - return this.sources().length; - } -} diff --git a/application/client/src/app/service/session/dependencies/observing/providers.ts b/application/client/src/app/service/session/dependencies/observing/providers.ts deleted file mode 100644 index 894edcee5c..0000000000 --- a/application/client/src/app/service/session/dependencies/observing/providers.ts +++ /dev/null @@ -1,69 +0,0 @@ -import { SetupLogger, LoggerInterface } from '@platform/entity/logger'; -import { Provider, ProviderConstructor } from './provider'; -import { Session } from '@service/session/session'; -import { Subscriber } from '@platform/env/subscription'; -import { Mutable } from '@platform/types/unity/mutable'; -import { PROVIDERS } from './implementations'; -import { cutUuid } from '@log/index'; - -@SetupLogger() -export class Providers extends Subscriber { - public readonly session!: Session; - - public readonly list: Map = new Map(); - - public init(session: Session) { - this.setLoggerName(`Providers: ${cutUuid(session.uuid())}`); - (this as Mutable).session = session; - PROVIDERS.forEach((providerConstructor: ProviderConstructor) => { - const provider = new providerConstructor(session, this.log()); - this.list.set(provider.uuid, provider.setPanels()); - }); - this.register( - session.stream.subjects.get().sources.subscribe(() => { - this.update(); - }), - session.stream.subjects.get().finished.subscribe(() => { - this.update(); - }), - session.stream.sde.subjects.get().selected.subscribe(() => { - this.update(); - }), - ); - this.update(); - } - - public destroy() { - this.unsubscribe(); - this.list.forEach((provider: Provider) => { - provider.destroy(); - }); - } - - public getNewSourceError(): Error | undefined { - let error: Error | undefined; - this.list.forEach((provider: Provider) => { - if (error !== undefined) { - return; - } - error = provider.getNewSourceError(); - }); - return error; - } - - public count(): number { - let count = 0; - this.list.forEach((provider) => { - count += provider.count(); - }); - return count; - } - - protected update() { - const sources = this.session.stream.observe().sources(); - this.list.forEach((provider, _uuid) => { - provider.update(sources).subjects.get().updated.emit(); - }); - } -} -export interface Providers extends LoggerInterface {} diff --git a/application/client/src/app/service/session/dependencies/observing/sde.ts b/application/client/src/app/service/session/dependencies/observing/sde.ts deleted file mode 100644 index 031afb7fb2..0000000000 --- a/application/client/src/app/service/session/dependencies/observing/sde.ts +++ /dev/null @@ -1,157 +0,0 @@ -import { SetupLogger, LoggerInterface } from '@platform/entity/logger'; -import { ObserveOperation } from './operation'; -import { error } from '@platform/log/utils'; -import { SdeRequest, SdeResponse } from '@platform/types/sde'; -import { Subject, Subjects } from '@platform/env/subscription'; - -import * as Requests from '@platform/ipc/request'; - -@SetupLogger() -export class Sde { - public readonly subjects: Subjects<{ - updated: Subject; - visibility: Subject; - selected: Subject; - }> = new Subjects({ - updated: new Subject(), - visibility: new Subject(), - selected: new Subject(), - }); - protected readonly uuid: string; - protected operations: ObserveOperation[] = []; - protected selected: ObserveOperation | undefined; - protected hidden: boolean = false; - - constructor(uuid: string) { - this.uuid = uuid; - } - - public destroy() { - this.subjects.destroy(); - } - - public send(uuid: string, request: SdeRequest): Promise { - return new Promise((resolve, reject) => { - Requests.IpcRequest.send( - Requests.Observe.SDE.Response, - new Requests.Observe.SDE.Request({ - session: this.uuid, - operation: uuid, - request, - }), - ) - .then((response: Requests.Observe.SDE.Response) => { - if (response.error !== undefined) { - return reject(new Error(response.error)); - } - if (response.result === undefined) { - return reject(new Error(`SDE doesn't return any kind of result`)); - } - try { - resolve(response.result); - } catch (e) { - return reject(new Error(error(e))); - } - }) - .catch((error: Error) => { - this.log().error(`Fail to send SDE into operation: ${error.message}`); - }); - }); - } - - public overwrite(running: Map): void { - this.operations = Array.from(running.values()).filter((s) => s.asOrigin().isSdeSupported()); - this.subjects.get().updated.emit(); - if (this.selected !== undefined) { - const target = this.selected.uuid; - if (this.operations.find((o) => o.uuid === target) === undefined) { - this.selecting().first(); - } - } else { - this.selecting().first(); - } - } - - public isAvailable(): boolean { - return this.operations.length > 0; - } - - public get(): ObserveOperation[] { - return this.operations; - } - - public visibility(): { - show(): void; - hide(): void; - hidden(): boolean; - } { - return { - show: (): void => { - this.hidden = false; - this.subjects.get().visibility.emit(); - }, - hide: (): void => { - this.hidden = true; - this.subjects.get().visibility.emit(); - }, - hidden: (): boolean => { - return this.hidden; - }, - }; - } - - public selecting(): { - is(uuid: string): boolean; - first(): void; - select(uuid: string | undefined): boolean; - get(): ObserveOperation | undefined; - } { - return { - is: (uuid: string): boolean => { - return this.selected === undefined - ? false - : this.selected.uuid === uuid || this.selected.asObserve().uuid === uuid; - }, - first: (): void => { - if (this.operations.length === 0) { - this.selected = undefined; - this.subjects.get().selected.emit(undefined); - return; - } - if (this.selected !== undefined && this.selected.uuid === this.operations[0].uuid) { - return; - } - this.selected = this.operations[0]; - this.subjects.get().selected.emit(this.selected.uuid); - }, - select: (uuid: string | undefined): boolean => { - if (uuid === undefined) { - const changed = this.selected !== undefined; - this.selected = undefined; - changed && this.subjects.get().selected.emit(uuid); - return changed; - } - if (this.selected !== undefined && this.selected.uuid === uuid) { - return false; - } - const candidate = this.operations.find( - (o) => o.uuid === uuid || o.asObserve().uuid === uuid, - ); - if (candidate === undefined) { - return false; - } - this.selected = candidate; - if (this.selected === undefined) { - return false; - } else { - this.subjects.get().selected.emit(uuid); - return true; - } - }, - get: (): ObserveOperation | undefined => { - return this.selected; - }, - }; - } -} -export interface Sde extends LoggerInterface {} diff --git a/application/client/src/app/service/session/dependencies/observing/source.ts b/application/client/src/app/service/session/dependencies/observing/source.ts deleted file mode 100644 index 55ccd622e5..0000000000 --- a/application/client/src/app/service/session/dependencies/observing/source.ts +++ /dev/null @@ -1,27 +0,0 @@ -import { ObserveOperation } from './operation'; -import { Observe } from '@platform/types/observe'; -import { Mutable } from '@platform/types/unity/mutable'; - -export class ObserveSource { - public readonly observe: Observe; - public readonly observer: ObserveOperation | undefined; - public readonly child: boolean = false; - - constructor(observe: Observe, observer?: ObserveOperation) { - this.observe = observe; - this.observer = observer; - } - - public uuid(): string { - return this.observe.uuid; - } - - public isSame(source: ObserveSource): boolean { - return this.uuid() === source.uuid(); - } - - public asChild(): ObserveSource { - (this as Mutable).child = true; - return this; - } -} diff --git a/application/client/src/app/service/session/dependencies/rank.ts b/application/client/src/app/service/session/dependencies/rank.ts deleted file mode 100644 index 3f0ef6f80e..0000000000 --- a/application/client/src/app/service/session/dependencies/rank.ts +++ /dev/null @@ -1,22 +0,0 @@ -export class Rank { - static RANK_WIDTH = 8; - static PADDING = 12; - - public len: number = 0; - - public set(length: number): boolean { - if (this.len === length) { - return false; - } - this.len = length; - return true; - } - - public width(): number { - return Rank.RANK_WIDTH * this.len + Rank.PADDING * 2; - } - - public getFiller(position: number): string { - return '0'.repeat(this.len - position.toString().length); - } -} diff --git a/application/client/src/app/service/session/dependencies/search.ts b/application/client/src/app/service/session/dependencies/search.ts deleted file mode 100644 index a795cc66f9..0000000000 --- a/application/client/src/app/service/session/dependencies/search.ts +++ /dev/null @@ -1,229 +0,0 @@ -import { SetupLogger, LoggerInterface } from '@platform/entity/logger'; -import { Subscriber, Subjects, Subject } from '@platform/env/subscription'; -import { ISearchMap } from '@platform/types/filter'; -import { cutUuid } from '@log/index'; -import { IFilter, ISearchUpdated } from '@platform/types/filter'; -import { IRange } from '@platform/types/range'; -import { FilterRequest, FiltersStore } from './search/filters/store'; -import { DisableStore } from './search/disabled/store'; -import { ChartsStore } from './search/charts/store'; -import { State } from './search/state'; -import { NearestPosition } from '@platform/types/bindings'; - -import * as Requests from '@platform/ipc/request'; -import * as Events from '@platform/ipc/event'; -import { Session } from '@service/session'; - -@SetupLogger() -export class Search extends Subscriber { - public readonly subjects: Subjects<{ - updated: Subject; - map: Subject; - }> = new Subjects({ - updated: new Subject(), - map: new Subject(), - }); - private _len: number = 0; - private _uuid!: string; - private _store!: { - filters: FiltersStore; - charts: ChartsStore; - disabled: DisableStore; - }; - private _state!: State; - - public init(session: Session) { - this.setLoggerName(`Search: ${cutUuid(session.uuid())}`); - this._uuid = session.uuid(); - this.register( - Events.IpcEvent.subscribe(Events.Search.Updated.Event, (event) => { - if (event.session !== this._uuid) { - return; - } - this._len = event.rows; - this.subjects.get().updated.emit({ found: this._len, stat: event.stat }); - }), - ); - this.register( - Events.IpcEvent.subscribe(Events.Search.MapUpdated.Event, (event) => { - if (event.session !== this._uuid) { - return; - } - this.subjects.get().map.emit(); - }), - ); - this._store = { - filters: new FiltersStore(session.uuid()), - charts: new ChartsStore(session.uuid()), - disabled: new DisableStore(session.uuid()), - }; - this.register( - this._store.filters.subjects.get().value.subscribe(() => { - this.state() - .filters() - .catch((err: Error) => { - this.log().error(`Fail to trigger search by filters: ${err.message}`); - }); - }), - ); - this.register( - this._store.charts.subjects.get().value.subscribe(() => { - this.state() - .charts() - .catch((err: Error) => { - this.log().error(`Fail to trigger search by charts: ${err.message}`); - }); - }), - ); - this._state = new State(session); - } - - public destroy() { - this.unsubscribe(); - this._store.filters.destroy(); - this._store.charts.destroy(); - this._store.disabled.destroy(); - this._state.destroy(); - this.subjects.destroy(); - } - - public len(): number { - return this._len; - } - - public search(filters: IFilter[]): Promise { - return new Promise((resolve, reject) => { - Requests.IpcRequest.send( - Requests.Search.Search.Response, - new Requests.Search.Search.Request({ - session: this._uuid, - filters: filters.filter((f) => FilterRequest.isValid(f)), - }), - ) - .then((response) => { - if (typeof response.error === 'string' && response.error.trim() !== '') { - reject(new Error(response.error)); - } else { - resolve(response.canceled ? 0 : response.found); - } - }) - .catch(reject); - }); - } - - public searchNestedMatch(rev: boolean): Promise<[number, number] | undefined> { - const filter = this.state().nested().get(); - if (filter === undefined) { - return Promise.resolve(undefined); - } - return new Promise((resolve, reject) => { - Requests.IpcRequest.send( - Requests.Search.NextNested.Response, - new Requests.Search.NextNested.Request({ - session: this._uuid, - filter, - from: rev ? this.state().nested().prevPos() : this.state().nested().nextPos(), - rev, - }), - ) - .then((response) => { - resolve(response.pos); - }) - .catch(reject); - }); - } - - public extract(filters: string[]): Promise { - return new Promise((resolve, reject) => { - Requests.IpcRequest.send( - Requests.Values.Extract.Response, - new Requests.Values.Extract.Request({ - session: this._uuid, - filters, - }), - ) - .then((response) => { - if (typeof response.error === 'string' && response.error.trim() !== '') { - reject(new Error(response.error)); - } else { - resolve(); - } - }) - .catch(reject); - }); - } - - public getScaledMap(len: number, range?: IRange): Promise { - return new Promise((resolve, reject) => { - Requests.IpcRequest.send( - Requests.Search.Map.Response, - new Requests.Search.Map.Request({ - session: this._uuid, - len, - from: range ? range.start : undefined, - to: range ? range.end : undefined, - }), - ) - .then((response) => { - resolve(response.map); - }) - .catch(reject); - }); - } - - public drop(): Promise { - return new Promise((resolve, reject) => { - Requests.IpcRequest.send( - Requests.Search.Drop.Response, - new Requests.Search.Drop.Request({ - session: this._uuid, - }), - ) - .then(() => { - resolve(undefined); - }) - .catch(reject); - }); - } - - public nearest(stream: number): Promise { - return new Promise((resolve) => { - Requests.IpcRequest.send( - Requests.Search.Nearest.Response, - new Requests.Search.Nearest.Request({ - session: this._uuid, - row: stream, - }), - ) - .then((response: Requests.Search.Nearest.Response) => { - resolve(response.nearest); - }) - .catch((error: Error) => { - this.log().error(`Fail to get nearest content: ${error.message}`); - }); - }); - } - - public store(): { - filters(): FiltersStore; - charts(): ChartsStore; - disabled(): DisableStore; - } { - return { - filters: (): FiltersStore => { - return this._store.filters; - }, - charts: (): ChartsStore => { - return this._store.charts; - }, - disabled: (): DisableStore => { - return this._store.disabled; - }, - }; - } - - public state(): State { - return this._state; - } -} -export interface Search extends LoggerInterface {} diff --git a/application/client/src/app/service/session/dependencies/search/charts/request.ts b/application/client/src/app/service/session/dependencies/search/charts/request.ts deleted file mode 100644 index ac35ab211a..0000000000 --- a/application/client/src/app/service/session/dependencies/search/charts/request.ts +++ /dev/null @@ -1,331 +0,0 @@ -import { Subject } from '@platform/env/subscription'; -import { getNextColor } from '@styles/colors'; -import { DisableConvertable } from '../disabled/converting'; -import { Hash, Recognizable } from '@platform/types/storage/entry'; -import { ChartDefinition, ChartType } from '@platform/types/chart'; -import { styles } from '@ui/service/styles'; -import { Json } from '@platform/types/storage/json'; -import { unique } from '@platform/env/sequence'; -import { error } from '@platform/log/utils'; -import { Key } from '../store'; -import { Equal } from '@platform/types/env/types'; -import { Updatable } from '../store'; -import { UpdateEvent } from './store.update'; -import { getFilterError } from '@module/util'; -import { serializeHtml } from '@platform/env/str'; -import { settings } from '@service/settings'; - -import * as regexFilters from '@platform/env/filters'; -import * as obj from '@platform/env/obj'; - -export { ChartType }; - -export interface OptionalDefinition { - filter: string; - color?: string; - widths?: { - line: number; - point: number; - }; - active?: boolean; - type?: ChartType; - uuid?: string; -} - -export interface OptionalColors { - color?: string; - background?: string; -} - -export interface UpdateRequest { - filter?: string; - color?: string; - line?: number; - point?: number; - active?: boolean; - type?: ChartType; -} - -export class ChartRequest - extends Json - implements Recognizable, DisableConvertable, Hash, Equal, Updatable -{ - public static KEY: Key = Key.charts; - public static DEFAULT_LINE_WIDTH = 1; - public static DEFAULT_POINT_RADIUS = 0; - - public static fromJson(json: string): ChartRequest | Error { - try { - const def: ChartDefinition = JSON.parse(json); - def.uuid = obj.getAsString(def, 'uuid'); - def.filter = obj.getAsNotEmptyString(def, 'filter'); - def.color = obj.getAsNotEmptyString(def, 'color'); - def.widths = obj.getAsObj(def, 'widths'); - def.widths.line = obj.getAsValidNumber(def.widths, 'line'); - def.widths.point = obj.getAsValidNumber(def.widths, 'point'); - def.active = obj.getAsBool(def, 'active'); - const type = obj.getAsNotEmptyStringOrAsUndefined(def, 'type'); - def.type = type === undefined ? ChartType.Linear : (type as ChartType); - return new ChartRequest(def); - } catch (e) { - return new Error(error(e)); - } - } - - public static fromV2(smth: { [key: string]: unknown }): ChartRequest | Error { - try { - return new ChartRequest({ - uuid: obj.getAsString(smth, 'guid'), - filter: obj.getAsNotEmptyString(smth, 'request'), - color: obj.getAsNotEmptyString(smth, 'color'), - active: obj.getAsBool(smth, 'active'), - }); - } catch (e) { - return new Error(error(e)); - } - } - - public readonly definition: ChartDefinition; - public readonly updated: Subject = new Subject(); - - private _regex!: RegExp; - private _safeRegExp!: RegExp; - private _hash!: string; - - static isValid(filter: string | undefined): boolean { - return filter === undefined - ? false - : getFilterError(filter, false, false, true) === undefined - ? regexFilters.hasGroups(filter) - : false; - } - - static getValidationError(filter: string): string | undefined { - let error: string | undefined = getFilterError(filter, false, false, true); - if (error !== undefined) { - const match: RegExpMatchArray | null = error.match(/error:.+/i); - if (match !== null && match[0] !== undefined) { - error = match[0].trim(); - } - } else if (!regexFilters.hasGroups(filter)) { - error = `No groups`; - } - return error; - } - - static defaults(value: string): ChartRequest { - const color = getNextColor(); - return new ChartRequest({ - filter: value, - color: color, - widths: { - line: ChartRequest.DEFAULT_LINE_WIDTH, - point: ChartRequest.DEFAULT_POINT_RADIUS, - }, - type: ChartType.Linear, - }); - } - - static getHashByDefinition(def: ChartDefinition): string { - return `${def.filter}${def.color}${def.widths.line}${def.widths.point}${def.type}${ - def.active ? '1' : '0' - }`; - } - - constructor(def: OptionalDefinition) { - super(); - const defaultMatchColor = - settings.defaults['general.colors.default_chart'] === undefined - ? styles.colors().scheme_color_match - : settings.defaults['general.colors.default_chart']; - this.definition = { - filter: def.filter, - uuid: def.uuid === undefined ? unique() : def.uuid, - active: def.active === undefined ? true : def.active, - color: def.color === undefined ? defaultMatchColor : def.color, - type: def.type === undefined ? ChartType.Linear : def.type, - widths: - def.widths === undefined - ? { - line: ChartRequest.DEFAULT_LINE_WIDTH, - point: ChartRequest.DEFAULT_POINT_RADIUS, - } - : def.widths, - }; - this.update(); - } - - public destroy() { - this.updated.destroy(); - } - - public uuid(): string { - return this.definition.uuid; - } - - public json(): { - to(): string; - from(str: string): ChartRequest | Error; - key(): string; - } { - return { - to: (): string => { - return JSON.stringify(this.definition); - }, - from: (json: string): ChartRequest | Error => { - return ChartRequest.fromJson(json); - }, - key: (): string => { - return ChartRequest.KEY; - }, - }; - } - - public as(): { - regExp(): RegExp; - serializedRegExp(): RegExp; - filter(): string; - } { - return { - regExp: (): RegExp => { - return this._regex; - }, - serializedRegExp: (): RegExp => { - return this._safeRegExp; - }, - filter: (): string => { - return this.definition.filter; - }, - }; - } - - public alias(): string { - return `${this.definition.filter}`; - } - - public set(silence: boolean = false): { - from(desc: UpdateRequest): boolean; - color(color: string): boolean; - line(width: number): boolean; - point(width: number): boolean; - state(active: boolean): boolean; - filter(filter: string): boolean; - type(type: ChartType): boolean; - } { - return { - from: (desc: UpdateRequest): boolean => { - const event = new UpdateEvent(this); - if (typeof desc.filter === 'string' && this.set(true).filter(desc.filter)) { - event.on().filter(); - } - if (typeof desc.active === 'boolean' && this.set(true).state(desc.active)) { - event.on().state(); - } - if (typeof desc.color === 'string' && this.set(true).color(desc.color)) { - event.on().color(); - } - if (typeof desc.line === 'number' && this.set(true).line(desc.line)) { - event.on().line(); - } - if (typeof desc.point === 'number' && this.set(true).point(desc.point)) { - event.on().point(); - } - if (desc.type !== undefined && this.set(true).type(desc.type)) { - event.on().point(); - } - if (event.changed() && this.update()) { - this.updated.emit(event); - } - return event.changed(); - }, - color: (color: string): boolean => { - this.definition.color = color; - if (!silence && this.update()) { - this.updated.emit(new UpdateEvent(this).on().color()); - } - return true; - }, - line: (width: number): boolean => { - this.definition.widths.line = width; - if (!silence && this.update()) { - this.updated.emit(new UpdateEvent(this).on().line()); - } - return true; - }, - point: (width: number): boolean => { - this.definition.widths.point = width; - if (!silence && this.update()) { - this.updated.emit(new UpdateEvent(this).on().point()); - } - return true; - }, - state: (active: boolean): boolean => { - this.definition.active = active; - if (!silence && this.update()) { - this.updated.emit(new UpdateEvent(this).on().state()); - } - return true; - }, - filter: (filter: string): boolean => { - this.definition.filter = filter; - if (!silence && this.update()) { - this.updated.emit(new UpdateEvent(this).on().filter()); - } - return true; - }, - type: (type: ChartType): boolean => { - this.definition.type = type; - if (!silence && this.update()) { - this.updated.emit(new UpdateEvent(this).on().type()); - } - return true; - }, - }; - } - - public disabled(): { - displayName(): string; - typeRef(): Key; - icon(): string; - } { - return { - displayName: (): string => { - return this.definition.filter; - }, - typeRef: (): Key => { - return Key.charts; - }, - icon: (): string => { - return 'bar_chart'; - }, - }; - } - - public hash(): string { - return this._hash; - } - - public isSame(filter: ChartRequest): boolean { - return filter.definition.filter === this.definition.filter; - } - - protected update(): boolean { - const prev: string = this._hash; - this._regex = regexFilters.getMarkerRegExp(this.definition.filter, { - reg: true, - word: false, - cases: false, - }); - this._safeRegExp = regexFilters.getMarkerRegExp(serializeHtml(this.definition.filter), { - reg: true, - word: false, - cases: false, - }); - this._hash = `${this.definition.filter}${this.definition.color}${ - this.definition.widths.line - }${this.definition.widths.point}${this.definition.type}${ - this.definition.active ? '1' : '0' - }`; - return prev !== this._hash; - } -} diff --git a/application/client/src/app/service/session/dependencies/search/charts/store.ts b/application/client/src/app/service/session/dependencies/search/charts/store.ts deleted file mode 100644 index ba9ce3dfa4..0000000000 --- a/application/client/src/app/service/session/dependencies/search/charts/store.ts +++ /dev/null @@ -1,65 +0,0 @@ -import { Key, Store, StoredEntity } from '../store'; -import { ChartRequest } from './request'; -import { IFilter } from '@platform/types/filter'; -import { DisableConvertable } from '../disabled/converting'; -import { FilterRequest } from '../filters/request'; - -import * as regexFilters from '@platform/env/filters'; - -export { ChartRequest } from './request'; - -export class ChartsStore extends Store { - public key(): Key { - return Key.filters; - } - - public addFromFilter(filter: IFilter): void { - const request = new ChartRequest({ filter: filter.filter }); - if (this.has(request)) { - return; - } - this.update([request as StoredEntity]); - } - - public tryRestore(smth: DisableConvertable): boolean { - if (smth instanceof ChartRequest) { - this.update([smth as StoredEntity]); - return true; - } else { - return false; - } - } - - public isConvertableFrom(smth: StoredEntity): boolean { - return ( - smth instanceof FilterRequest && regexFilters.hasGroups(smth.definition.filter.filter) - ); - } - - public tryFromFilter(smth: StoredEntity | FilterRequest): boolean { - if ( - smth instanceof FilterRequest && - regexFilters.hasGroups(smth.definition.filter.filter) - ) { - const def = smth.definition; - this.update([ - new ChartRequest({ - filter: def.filter.filter, - color: def.colors.background, - active: true, - }) as StoredEntity, - ]); - return true; - } else { - return false; - } - } - - public getActiveCount(): number { - return this.get().filter((request) => request.definition.active).length; - } - - public has(request: ChartRequest): boolean { - return this.get().find((entity) => entity.isSame(request)) !== undefined; - } -} diff --git a/application/client/src/app/service/session/dependencies/search/charts/store.update.ts b/application/client/src/app/service/session/dependencies/search/charts/store.update.ts deleted file mode 100644 index 28f0c83a42..0000000000 --- a/application/client/src/app/service/session/dependencies/search/charts/store.update.ts +++ /dev/null @@ -1,115 +0,0 @@ -import { EntityUpdateEvent } from '../store.update'; -import { ChartRequest } from './request'; - -export interface UpdateEventInner { - filter: boolean; - state: boolean; - color: boolean; - line: boolean; - point: boolean; - stat: boolean; - type: boolean; -} - -export class UpdateEvent extends EntityUpdateEvent { - protected request: ChartRequest; - protected event: UpdateEventInner = { - filter: false, - state: false, - color: false, - line: false, - point: false, - stat: false, - type: false, - }; - - constructor(request: ChartRequest) { - super(); - this.request = request; - } - - public on(): { - filter(): UpdateEvent; - state(): UpdateEvent; - color(): UpdateEvent; - line(): UpdateEvent; - point(): UpdateEvent; - stat(): UpdateEvent; - type(): UpdateEvent; - } { - return { - filter: (): UpdateEvent => { - this.event.filter = true; - return this; - }, - state: (): UpdateEvent => { - this.event.state = true; - return this; - }, - color: (): UpdateEvent => { - this.event.color = true; - return this; - }, - line: (): UpdateEvent => { - this.event.line = true; - return this; - }, - point: (): UpdateEvent => { - this.event.point = true; - return this; - }, - stat: (): UpdateEvent => { - this.event.stat = true; - return this; - }, - type: (): UpdateEvent => { - this.event.type = true; - return this; - }, - }; - } - - public changed(): boolean { - return ( - this.event.line || - this.event.point || - this.event.color || - this.event.filter || - this.event.stat || - this.event.state - ); - } - - public consequence(): { - highlights: boolean; - value: boolean; - inner: boolean; - storable: boolean; - } { - return { - highlights: this.event.line || this.event.point || this.event.color || this.event.type, - value: this.event.state || this.event.filter, - inner: - this.event.line || - this.event.point || - this.event.color || - this.event.filter || - this.event.stat || - this.event.state || - this.event.type, - storable: - this.event.line || - this.event.point || - this.event.color || - this.event.filter || - this.event.state || - this.event.type, - }; - } - public inner(): UpdateEventInner { - return this.event; - } - public entity(): ChartRequest { - return this.request; - } -} diff --git a/application/client/src/app/service/session/dependencies/search/disabled/converting.ts b/application/client/src/app/service/session/dependencies/search/disabled/converting.ts deleted file mode 100644 index 630ddc1ff8..0000000000 --- a/application/client/src/app/service/session/dependencies/search/disabled/converting.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { Recognizable, Hash } from '@platform/types/storage/entry'; -import { Json } from '@platform/types/storage/json'; -import { Key } from '../store'; -import { FilterRequest } from '../filters/request'; -import { ChartRequest } from '../charts/request'; - -export interface DisableConvertable extends Recognizable, Json, Hash { - disabled(): { - displayName(): string; - typeRef(): Key; - icon(): string; - }; -} diff --git a/application/client/src/app/service/session/dependencies/search/disabled/request.ts b/application/client/src/app/service/session/dependencies/search/disabled/request.ts deleted file mode 100644 index 047ce32547..0000000000 --- a/application/client/src/app/service/session/dependencies/search/disabled/request.ts +++ /dev/null @@ -1,131 +0,0 @@ -import { FilterRequest } from '../filters/request'; -import { ChartRequest } from '../charts/request'; -import { DisableConvertable } from './converting'; -import { Hash, Recognizable } from '@platform/types/storage/entry'; -import { Key } from '../store'; -import { error } from '@platform/log/utils'; -import { Json } from '@platform/types/storage/json'; -import { Equal } from '@platform/types/env/types'; -import { Updatable } from '../store'; -import { Subject } from '@platform/env/subscription'; - -export interface IDesc { - type: string; - desc: any; -} - -export class DisabledRequest - extends Json - implements Recognizable, Hash, Equal, Updatable -{ - public static KEY: Key = Key.disabled; - public static fromJson(json: string): DisabledRequest | Error { - try { - const def: { - key: Key; - value: string; - } = JSON.parse(json); - let entity; - if (def.key === Key.filters) { - entity = FilterRequest.fromJson(def.value); - if (entity instanceof Error) { - return entity; - } - return new DisabledRequest(entity); - } else if (def.key === Key.charts) { - entity = ChartRequest.fromJson(def.value); - if (entity instanceof Error) { - return entity; - } - return new DisabledRequest(entity); - } else { - return new Error(`Unsupportable content for Disabled; key = ${def.key}`); - } - } catch (e) { - return new Error(error(e)); - } - } - private _entity: DisableConvertable; - private _key: Key; - public readonly updated: Subject | undefined; - - constructor(entity: DisableConvertable) { - super(); - let key: Key | undefined; - [FilterRequest, ChartRequest].forEach((classRef) => { - if (key !== undefined) { - return; - } - if (entity instanceof classRef) { - key = classRef.KEY; - } - }); - if (key === undefined) { - throw new Error(`Fail to find a class for entity: ${typeof entity}`); - } - this._entity = entity; - this._key = key; - } - - public isSame(disabled: DisabledRequest): boolean { - const getFilterHash = (f: FilterRequest) => { - return `${f.definition.filter.filter}|${f.definition.filter.flags.cases}|${f.definition.filter.flags.reg}|${f.definition.filter.flags.word}`; - }; - const left = disabled.entity(); - const right = this.entity(); - if (left instanceof FilterRequest && right instanceof FilterRequest) { - return getFilterHash(left) === getFilterHash(right); - } - if (left instanceof ChartRequest && right instanceof ChartRequest) { - return left.definition.filter === right.definition.filter; - } - return false; - } - - public uuid(): string { - return this._entity.uuid(); - } - - public entity(): DisableConvertable { - return this._entity; - } - - public as(): { - filter(): FilterRequest | undefined; - chart(): ChartRequest | undefined; - } { - return { - filter: (): FilterRequest | undefined => { - return this._entity instanceof FilterRequest ? this._entity : undefined; - }, - chart: (): ChartRequest | undefined => { - return this._entity instanceof ChartRequest ? this._entity : undefined; - }, - }; - } - - public json(): { - to(): string; - from(str: string): DisabledRequest | Error; - key(): string; - } { - return { - to: (): string => { - return JSON.stringify({ - key: this._key, - value: this._entity.json().to(), - }); - }, - from: (json: string): DisabledRequest | Error => { - return DisabledRequest.fromJson(json); - }, - key: (): string => { - return DisabledRequest.KEY; - }, - }; - } - - public hash(): string { - return this._entity.hash(); - } -} diff --git a/application/client/src/app/service/session/dependencies/search/disabled/store.ts b/application/client/src/app/service/session/dependencies/search/disabled/store.ts deleted file mode 100644 index 9e58145861..0000000000 --- a/application/client/src/app/service/session/dependencies/search/disabled/store.ts +++ /dev/null @@ -1,21 +0,0 @@ -import { Key, Store, StoredEntity } from '../store'; -import { DisabledRequest } from './request'; -import { DisableConvertable } from './converting'; - -export { DisabledRequest } from './request'; - -export class DisableStore extends Store { - public key(): Key { - return Key.filters; - } - - public addFromEntity(entities: DisableConvertable[]) { - return this.update( - entities.map((en) => new DisabledRequest(en) as StoredEntity), - ); - } - - public has(request: DisabledRequest): boolean { - return this.get().find((entity) => entity.isSame(request)) !== undefined; - } -} diff --git a/application/client/src/app/service/session/dependencies/search/filters/request.ts b/application/client/src/app/service/session/dependencies/search/filters/request.ts deleted file mode 100644 index a7f197cd30..0000000000 --- a/application/client/src/app/service/session/dependencies/search/filters/request.ts +++ /dev/null @@ -1,360 +0,0 @@ -import { Subject } from '@platform/env/subscription'; -import { getContrastColor, getNextColor } from '@styles/colors'; -import { DisableConvertable } from '../disabled/converting'; -import { IFilter, IFilterFlags, FilterDefinition, FilterStyle } from '@platform/types/filter'; -import { Hash, Recognizable } from '@platform/types/storage/entry'; -import { Json } from '@platform/types/storage/json'; -import { unique } from '@platform/env/sequence'; -import { error } from '@platform/log/utils'; -import { Key } from '../store'; -import { Equal } from '@platform/types/env/types'; -import { Updatable } from '../store'; -import { UpdateEvent } from './store.update'; -import { getFilterError } from '@module/util'; -import { serializeHtml } from '@platform/env/str'; -import { settings } from '@service/settings'; -import { styles } from '@ui/service/styles'; - -import * as regexFilters from '@platform/env/filters'; -import * as obj from '@platform/env/obj'; - -export interface OptionalDefinition { - filter: IFilter; - colors?: FilterStyle; - active?: boolean; - uuid?: string; -} - -export interface OptionalColors { - color?: string; - background?: string; -} - -export interface UpdateRequest { - filter?: string; - flags?: IFilterFlags; - color?: string; - background?: string; - active?: boolean; -} - -export class FilterRequest - extends Json - implements Recognizable, DisableConvertable, Hash, Equal, Updatable -{ - public static KEY: Key = Key.filters; - - public static fromDefinition(def: IFilter): FilterRequest { - return new FilterRequest({ - filter: def, - }); - } - - public static fromJson(json: string): FilterRequest | Error { - try { - const def: FilterDefinition = JSON.parse(json); - def.uuid = obj.getAsString(def, 'uuid'); - def.filter = obj.getAsObj(def, 'filter'); - def.filter.flags = obj.getAsObj(def.filter, 'flags'); - def.filter.filter = obj.getAsNotEmptyString(def.filter, 'filter'); - def.colors = obj.getAsObj(def, 'colors'); - def.colors.color = obj.getAsNotEmptyString(def.colors, 'color'); - def.colors.background = obj.getAsNotEmptyString(def.colors, 'background'); - def.active = obj.getAsBool(def, 'active'); - return new FilterRequest(def); - } catch (e) { - return new Error(error(e)); - } - } - - public static fromV2(smth: { [key: string]: unknown }): FilterRequest | Error { - try { - const flags = obj.getAsObj(smth, 'flags'); - return new FilterRequest({ - uuid: obj.getAsString(smth, 'guid'), - filter: { - filter: obj.getAsNotEmptyString(smth, 'request'), - flags: { - cases: obj.getAsBool(flags, 'casesensitive'), - word: obj.getAsBool(flags, 'wholeword'), - reg: obj.getAsBool(flags, 'regexp'), - }, - }, - colors: { - color: obj.getAsNotEmptyString(smth, 'color'), - background: obj.getAsNotEmptyString(smth, 'background'), - }, - active: obj.getAsBool(smth, 'active'), - }); - } catch (e) { - return new Error(error(e)); - } - } - - static isValid(filter: IFilter): boolean { - return ( - getFilterError( - filter.filter, - filter.flags.cases, - filter.flags.word, - filter.flags.reg, - ) === undefined - ); - } - - static getValidationError(filter: IFilter): string | undefined { - let error: string | undefined = getFilterError( - filter.filter, - filter.flags.cases, - filter.flags.word, - filter.flags.reg, - ); - if (error !== undefined) { - const match: RegExpMatchArray | null = error.match(/error:.+/i); - if (match !== null && match[0] !== undefined) { - error = match[0].trim(); - } - } - return error; - } - - static defaults(value: string): FilterRequest { - const color = getNextColor(); - return new FilterRequest({ - filter: { filter: value, flags: { reg: true, word: false, cases: false } }, - colors: { - background: color, - color: getContrastColor(color, true), - }, - }); - } - - static getHashByDefinition(def: FilterDefinition): string { - return `${def.filter.filter}${def.filter.flags.cases ? 'c' : ''}${ - def.filter.flags.reg ? 'r' : '' - }${def.filter.flags.word ? 'w' : ''}${def.colors.color}${def.colors.background}${ - def.active ? '1' : '0' - }`; - } - - public readonly definition: FilterDefinition; - public readonly updated: Subject = new Subject(); - - private _regex!: RegExp; - private _safeRegExp!: RegExp; - private _hash!: string; - public found: number = 0; - - constructor(def: OptionalDefinition) { - super(); - const defaultMatchColor = - settings.defaults['general.colors.default_filter'] === undefined - ? styles.colors().scheme_color_match - : settings.defaults['general.colors.default_filter']; - this.definition = { - filter: { - filter: def.filter.filter, - flags: Object.assign({}, def.filter.flags), - }, - uuid: def.uuid === undefined ? unique() : def.uuid, - active: def.active === undefined ? true : def.active, - colors: { - color: - def.colors === undefined - ? getContrastColor(defaultMatchColor, true) - : def.colors.color === undefined - ? getContrastColor(defaultMatchColor, true) - : def.colors.color, - background: - def.colors === undefined - ? defaultMatchColor - : def.colors.background === undefined - ? defaultMatchColor - : def.colors.background, - }, - }; - this.update(); - } - - public destroy() { - this.updated.destroy(); - } - - public uuid(): string { - return this.definition.uuid; - } - - public json(): { - to(): string; - from(str: string): FilterRequest | Error; - key(): string; - } { - return { - to: (): string => { - return JSON.stringify(this.definition); - }, - from: (json: string): FilterRequest | Error => { - return FilterRequest.fromJson(json); - }, - key: (): string => { - return FilterRequest.KEY; - }, - }; - } - - public as(): { - regExp(): RegExp; - serializedRegExp(): RegExp; - filter(): IFilter; - } { - return { - regExp: (): RegExp => { - return this._regex; - }, - serializedRegExp: (): RegExp => { - return this._safeRegExp; - }, - filter: (): IFilter => { - return { - filter: this.definition.filter.filter, - flags: Object.assign({}, this.definition.filter.flags), - }; - }, - }; - } - - public alias(): string { - return `${this.definition.filter.filter}:${this.definition.filter.flags.reg ? '1' : '0'}${ - !this.definition.filter.flags.cases ? '1' : '0' - }${this.definition.filter.flags.word ? '1' : '0'}`; - } - - public set(silence: boolean = false): { - from(desc: UpdateRequest): boolean; - color(color: string): boolean; - background(background: string): boolean; - state(active: boolean): boolean; - flags(flags: IFilterFlags): boolean; - filter(filter: string): boolean; - found(number: number): boolean; - } { - return { - from: (desc: UpdateRequest): boolean => { - const event = new UpdateEvent(this); - if (typeof desc.filter === 'string' && this.set(true).filter(desc.filter)) { - event.on().filter(); - } - if (typeof desc.flags === 'string' && this.set(true).flags(desc.flags)) { - event.on().filter(); - } - if (typeof desc.active === 'boolean' && this.set(true).state(desc.active)) { - event.on().state(); - } - if (typeof desc.color === 'string' && this.set(true).color(desc.color)) { - event.on().colors(); - } - if ( - typeof desc.background === 'string' && - this.set(true).background(desc.background) - ) { - event.on().colors(); - } - if (event.changed() && this.update()) { - this.updated.emit(event); - } - return event.changed(); - }, - color: (color: string): boolean => { - this.definition.colors.color = color; - if (!silence && this.update()) { - this.updated.emit(new UpdateEvent(this).on().colors()); - } - return true; - }, - background: (background: string): boolean => { - this.definition.colors.background = background; - if (!silence && this.update()) { - this.updated.emit(new UpdateEvent(this).on().colors()); - } - return true; - }, - state: (active: boolean): boolean => { - this.definition.active = active; - if (!silence && this.update()) { - this.updated.emit(new UpdateEvent(this).on().state()); - } - return true; - }, - flags: (flags: IFilterFlags): boolean => { - this.definition.filter.flags = Object.assign({}, flags); - if (!silence && this.update()) { - this.updated.emit(new UpdateEvent(this).on().filter()); - } - return true; - }, - filter: (filter: string): boolean => { - this.definition.filter.filter = filter; - if (!silence && this.update()) { - this.updated.emit(new UpdateEvent(this).on().filter()); - } - return true; - }, - found: (found: number): boolean => { - this.found = found; - if (!silence && this.update()) { - this.updated.emit(new UpdateEvent(this).on().stat()); - } - return true; - }, - }; - } - - public disabled(): { - displayName(): string; - typeRef(): Key; - icon(): string; - } { - return { - displayName: (): string => { - return this.definition.filter.filter; - }, - typeRef: (): Key => { - return Key.filters; - }, - icon: (): string => { - return 'search'; - }, - }; - } - - public hash(): string { - return this._hash; - } - - public isSame(filter: FilterRequest): boolean { - const hash = (f: FilterRequest) => { - return `${f.definition.filter.filter}|${f.definition.filter.flags.cases}|${f.definition.filter.flags.reg}|${f.definition.filter.flags.word}`; - }; - return hash(filter) === hash(this); - } - - protected update(): boolean { - const prev: string = this._hash; - this._regex = regexFilters.getMarkerRegExp( - this.definition.filter.filter, - this.definition.filter.flags, - ); - this._safeRegExp = regexFilters.getMarkerRegExp( - serializeHtml(this.definition.filter.filter), - this.definition.filter.flags, - ); - this._hash = `${this.definition.filter.filter}${ - this.definition.filter.flags.cases ? 'c' : '' - }${this.definition.filter.flags.reg ? 'r' : ''}${ - this.definition.filter.flags.word ? 'w' : '' - }${this.definition.colors.color}${this.definition.colors.background}${ - this.definition.active ? '1' : '0' - }`; - return prev !== this._hash; - } -} diff --git a/application/client/src/app/service/session/dependencies/search/filters/store.ts b/application/client/src/app/service/session/dependencies/search/filters/store.ts deleted file mode 100644 index af28249a84..0000000000 --- a/application/client/src/app/service/session/dependencies/search/filters/store.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { Key, Store, StoredEntity } from '../store'; -import { FilterRequest } from './request'; -import { IFilter } from '@platform/types/filter'; -import { DisableConvertable } from '../disabled/converting'; - -export { FilterRequest } from './request'; - -export class FiltersStore extends Store { - public key(): Key { - return Key.filters; - } - - public addFromFilter(filter: IFilter): boolean { - const request = new FilterRequest({ filter }); - if (this.has(request)) { - return false; - } - this.update([request as StoredEntity]); - return true; - } - - public tryRestore(smth: DisableConvertable): boolean { - if (smth instanceof FilterRequest) { - this.update([smth as StoredEntity]); - return true; - } else { - return false; - } - } - - public getActiveCount(): number { - return this.get().filter((request) => request.definition.active).length; - } - - public has(request: FilterRequest): boolean { - return this.get().find((entity) => entity.isSame(request)) !== undefined; - } -} diff --git a/application/client/src/app/service/session/dependencies/search/filters/store.update.ts b/application/client/src/app/service/session/dependencies/search/filters/store.update.ts deleted file mode 100644 index 9dc1fd0422..0000000000 --- a/application/client/src/app/service/session/dependencies/search/filters/store.update.ts +++ /dev/null @@ -1,74 +0,0 @@ -import { EntityUpdateEvent } from '../store.update'; -import { FilterRequest } from './request'; - -export interface UpdateEventInner { - filter: boolean; - state: boolean; - colors: boolean; - stat: boolean; -} - -export class UpdateEvent extends EntityUpdateEvent { - protected filter: FilterRequest; - protected event: UpdateEventInner = { - filter: false, - state: false, - colors: false, - stat: false, - }; - - constructor(filter: FilterRequest) { - super(); - this.filter = filter; - } - - public on(): { - filter(): UpdateEvent; - state(): UpdateEvent; - colors(): UpdateEvent; - stat(): UpdateEvent; - } { - return { - filter: (): UpdateEvent => { - this.event.filter = true; - return this; - }, - state: (): UpdateEvent => { - this.event.state = true; - return this; - }, - colors: (): UpdateEvent => { - this.event.colors = true; - return this; - }, - stat: (): UpdateEvent => { - this.event.stat = true; - return this; - }, - }; - } - - public changed(): boolean { - return this.event.colors || this.event.filter || this.event.stat || this.event.state; - } - - public consequence(): { - highlights: boolean; - value: boolean; - inner: boolean; - storable: boolean; - } { - return { - highlights: this.event.colors, - value: this.event.state || this.event.filter, - inner: this.event.colors || this.event.filter || this.event.stat || this.event.state, - storable: this.event.colors || this.event.filter || this.event.state, - }; - } - public inner(): UpdateEventInner { - return this.event; - } - public entity(): FilterRequest { - return this.filter; - } -} diff --git a/application/client/src/app/service/session/dependencies/search/highlights.ts b/application/client/src/app/service/session/dependencies/search/highlights.ts deleted file mode 100644 index b8648b7009..0000000000 --- a/application/client/src/app/service/session/dependencies/search/highlights.ts +++ /dev/null @@ -1,125 +0,0 @@ -import { FilterRequest } from './filters/request'; - -import { Subscriber, Subjects, Subject } from '@platform/env/subscription'; -import { ModifierProcessor } from './highlights/processor'; -import { Owner } from '@schema/content/row'; -import { Session } from '@service/session'; -import { serializeHtml } from '@platform/env/str'; -import { safeEscapeAnsi } from '@module/ansi'; - -import * as Modifiers from './highlights/modifiers/index'; - -export class Highlights extends Subscriber { - protected session!: Session; - - public readonly subjects: Subjects<{ - update: Subject; - }> = new Subjects({ - update: new Subject(), - }); - - constructor() { - super(); - } - - init(session: Session) { - this.session = session; - this.register( - this.session.search - .store() - .filters() - .subjects.get() - .highlights.subscribe(() => { - this.subjects.get().update.emit(); - }), - this.session.search - .store() - .charts() - .subjects.get() - .highlights.subscribe(() => { - this.subjects.get().update.emit(); - }), - this.session.search - .store() - .filters() - .subjects.get() - .value.subscribe(() => { - this.subjects.get().update.emit(); - }), - this.session.search - .store() - .charts() - .subjects.get() - .value.subscribe(() => { - this.subjects.get().update.emit(); - }), - ); - this.register( - this.session.search - .state() - .subjects.search.get() - .active.subscribe(() => { - this.subjects.get().update.emit(); - }), - ); - } - - public destroy(): void { - this.unsubscribe(); - this.subjects.destroy(); - } - - public parse( - position: number, - row: string, - parent: Owner, - hasOwnStyles: boolean, - columns?: { column: number; map: [number, number][] }, - ): { - html: string; - color: string | undefined; - background: string | undefined; - injected: { [key: string]: boolean }; - } { - // Get rid of original HTML in logs - const serialized = serializeHtml(row); - const asci = new Modifiers.AsciModifier(serialized); - const escaped = safeEscapeAnsi(serialized); - const filtres = new Modifiers.FiltersModifier( - this.session.search.store().filters().get(), - escaped, - ); - const active = this.session.search.state().getActive(); - const nested = this.session.search.state().nested().get(); - const processor = new ModifierProcessor([ - filtres, - new Modifiers.ChartsModifier(this.session.search.store().charts().get(), escaped), - ...this.session.comments.getModifiers(position, escaped, columns), - ...(active !== undefined - ? [ - new Modifiers.ActiveFilterModifier( - [new FilterRequest({ filter: active })], - escaped, - ), - ] - : []), - ...(nested !== undefined - ? [ - new Modifiers.NestedSearchModifier( - [new FilterRequest({ filter: nested })], - escaped, - ), - ] - : []), - asci, - ]); - const matched = filtres.matched(); - const processed = processor.parse(escaped, parent, hasOwnStyles); - return { - html: processed.row, - color: matched === undefined ? undefined : matched.definition.colors.color, - background: matched === undefined ? undefined : matched.definition.colors.background, - injected: processed.injected, - }; - } -} diff --git a/application/client/src/app/service/session/dependencies/search/highlights/modifier.ts b/application/client/src/app/service/session/dependencies/search/highlights/modifier.ts deleted file mode 100644 index 304517e2d6..0000000000 --- a/application/client/src/app/service/session/dependencies/search/highlights/modifier.ts +++ /dev/null @@ -1,65 +0,0 @@ -export enum EType { - above = 'above', // 0 - Absolute priority - match = 'match', // 1 - Major - breakable = 'breakable', // 2 - Can be ignored. This is ASCII for example - advanced = 'advanced', // 2. -} - -export const Priorities = [EType.above, EType.match, EType.breakable]; - -export interface IModifierRange { - start: number; - end: number; -} - -export enum EHTMLInjectionType { - close = 'close', - open = 'open', -} - -export enum EApplyTo { - all = 'all', - output = 'output', - search = 'search', -} - -export enum EAlias { - Active = 'active', - Filters = 'filtres', - Charts = 'charts', - Comments = 'comments', -} - -export interface IHTMLInjection { - offset: number; - injection: string; - type: EHTMLInjectionType; -} - -export abstract class Modifier { - public static Signature: string = 'modifier'; - - public abstract getInjections(): IHTMLInjection[]; - - public abstract obey(ranges: Array>): void; - - public abstract getRanges(): Array>; - - public abstract type(): EType; - - public abstract getGroupPriority(): number; - - public abstract finalize(str: string): string; - - public abstract getName(): string; - - public abstract alias(): EAlias; - - public applyTo(): EApplyTo { - return EApplyTo.all; - } - - public signature(): string { - return Modifier.Signature; - } -} diff --git a/application/client/src/app/service/session/dependencies/search/highlights/modifiers/active.ts b/application/client/src/app/service/session/dependencies/search/highlights/modifiers/active.ts deleted file mode 100644 index 59d79c9dc4..0000000000 --- a/application/client/src/app/service/session/dependencies/search/highlights/modifiers/active.ts +++ /dev/null @@ -1,106 +0,0 @@ -import { - Modifier, - EType, - IHTMLInjection, - EHTMLInjectionType, - IModifierRange, - EAlias, -} from '../modifier'; -import { FilterRequest } from '../../filters/request'; -import { settings } from '@service/settings'; -import { getContrastColor } from '@styles/colors'; - -import * as ModifiersTools from '../tools'; - -export class ActiveFilterModifier extends Modifier { - private _ranges: IModifierRange[] = []; - private _matched: FilterRequest | undefined; - - constructor(filters: FilterRequest[], row: string) { - super(); - this._map(row, filters); - } - - public alias(): EAlias { - return EAlias.Active; - } - - public getInjections(): IHTMLInjection[] { - const defaultMatchColor = settings.defaults['general.colors.match']; - const injections: IHTMLInjection[] = []; - this._ranges.forEach((range: IModifierRange) => { - injections.push( - ...[ - { - offset: range.start, - injection: ``, - type: EHTMLInjectionType.open, - }, - { - offset: range.end, - injection: ``, - type: EHTMLInjectionType.close, - }, - ], - ); - }); - return injections; - } - - public type(): EType { - return EType.match; - } - - public obey(ranges: Array>) { - this._ranges = ModifiersTools.obey(ranges, this._ranges); - } - - public getRanges(): Array> { - return this._ranges; - } - - public getGroupPriority(): number { - return 1; - } - - public finalize(str: string): string { - return str; - } - - public getName(): string { - return 'ActiveFilterModifier'; - } - - public matched(): FilterRequest | undefined { - return this._matched; - } - - private _map(row: string, filters: FilterRequest[]) { - filters.forEach((request: FilterRequest) => { - row.replace(request.as().serializedRegExp(), (match: string, ...args: any[]) => { - const offset: number = - typeof args[args.length - 2] === 'number' - ? args[args.length - 2] - : args[args.length - 3]; - this._ranges.push({ - start: offset, - end: offset + match.length, - }); - this._matched = request; - return ''; - }); - }); - // Remove nested ranges because it doesn't make sense, - // because color is same - this._ranges = ModifiersTools.removeIncluded(this._ranges); - // Remove conflicts - this._ranges = ModifiersTools.removeCrossing(this._ranges); - } -} diff --git a/application/client/src/app/service/session/dependencies/search/highlights/modifiers/asci.ts b/application/client/src/app/service/session/dependencies/search/highlights/modifiers/asci.ts deleted file mode 100644 index cce5e1e0d6..0000000000 --- a/application/client/src/app/service/session/dependencies/search/highlights/modifiers/asci.ts +++ /dev/null @@ -1,91 +0,0 @@ -import { - Modifier, - EType, - IHTMLInjection, - EHTMLInjectionType, - IModifierRange, - EAlias, -} from '../modifier'; -import { getAnsiMap, Slot } from '@module/ansi'; - -import * as ModifiersTools from '../tools'; - -export interface IRange extends IModifierRange { - bgcl: string | undefined; - fgcl: string | undefined; -} - -export class AsciModifier extends Modifier { - protected ranges: IRange[] = []; - - constructor(row: string) { - super(); - const map = getAnsiMap(row); - if (map instanceof Error) { - return; - } - this.ranges = map - .filter((slot: Slot) => slot.background !== undefined || slot.color !== undefined) - .map((slot: Slot) => { - return { - start: slot.from, - end: slot.to, - bgcl: typeof slot.background !== 'string' ? undefined : slot.background, - fgcl: typeof slot.color !== 'string' ? undefined : slot.color, - }; - }); - // Remove conflicts - this.ranges = ModifiersTools.removeCrossing(this.ranges) as IRange[]; - } - - public alias(): EAlias { - return EAlias.Filters; - } - - public getInjections(): IHTMLInjection[] { - const injections: IHTMLInjection[] = []; - this.ranges.forEach((range: IRange) => { - injections.push( - ...[ - { - offset: range.start, - injection: ``, - type: EHTMLInjectionType.open, - }, - { - offset: range.end, - injection: ``, - type: EHTMLInjectionType.close, - }, - ], - ); - }); - return injections; - } - - public type(): EType { - return EType.match; - } - - public obey(ranges: Array>) { - this.ranges = ModifiersTools.obey(ranges, this.ranges) as IRange[]; - } - - public getRanges(): Array> { - return this.ranges; - } - - public getGroupPriority(): number { - return 2; - } - - public finalize(str: string): string { - return str; - } - - public getName(): string { - return 'AsciModifier'; - } -} diff --git a/application/client/src/app/service/session/dependencies/search/highlights/modifiers/charts.ts b/application/client/src/app/service/session/dependencies/search/highlights/modifiers/charts.ts deleted file mode 100644 index 85478e05a5..0000000000 --- a/application/client/src/app/service/session/dependencies/search/highlights/modifiers/charts.ts +++ /dev/null @@ -1,106 +0,0 @@ -import { - Modifier, - EType, - IHTMLInjection, - EHTMLInjectionType, - IModifierRange, - EAlias, -} from '../modifier'; -import { ChartRequest } from '../../charts/request'; -import { styles } from '@ui/service/styles'; - -import * as Colors from '@styles/colors'; -import * as ModifiersTools from '../tools'; - -export interface IRange extends IModifierRange { - bgcl: string; -} - -export class ChartsModifier extends Modifier { - private _ranges: IRange[] = []; - private _matched: ChartRequest | undefined; - - constructor(highlights: ChartRequest[], row: string) { - super(); - this._map(row, highlights); - } - - public alias(): EAlias { - return EAlias.Charts; - } - - public getInjections(): IHTMLInjection[] { - const injections: IHTMLInjection[] = []; - this._ranges.forEach((range: IRange) => { - const fgcl: string = Colors.getContrastColor(range.bgcl, true); - injections.push( - ...[ - { - offset: range.start, - injection: ``, - type: EHTMLInjectionType.open, - }, - { - offset: range.end, - injection: ``, - type: EHTMLInjectionType.close, - }, - ], - ); - }); - return injections; - } - - public type(): EType { - return EType.match; - } - - public obey(ranges: Array>) { - this._ranges = ModifiersTools.obey(ranges, this._ranges) as IRange[]; - } - - public getRanges(): Array> { - return this._ranges; - } - - public getGroupPriority(): number { - return 2; - } - - public finalize(str: string): string { - return str; - } - - public getName(): string { - return 'ChartsModifier'; - } - - public matched(): ChartRequest | undefined { - return this._matched; - } - - private _map(row: string, highlights: ChartRequest[]) { - highlights.forEach((request: ChartRequest) => { - row.replace(request.as().serializedRegExp(), (match: string, ...args: any[]) => { - const offset: number = - typeof args[args.length - 2] === 'number' - ? args[args.length - 2] - : args[args.length - 3]; - this._ranges.push({ - start: offset, - end: offset + match.length, - bgcl: - request.definition.color === Colors.CColors[0] - ? styles.colors().scheme_color_4 - : request.definition.color === undefined - ? styles.colors().scheme_color_4 - : Colors.shadeColor(request.definition.color, 30), - }); - this._matched = request; - return ''; - }); - }); - // Remove conflicts - this._ranges = ModifiersTools.removeCrossing(this._ranges) as IRange[]; - } -} diff --git a/application/client/src/app/service/session/dependencies/search/highlights/modifiers/comments.ts b/application/client/src/app/service/session/dependencies/search/highlights/modifiers/comments.ts deleted file mode 100644 index 54b2eef232..0000000000 --- a/application/client/src/app/service/session/dependencies/search/highlights/modifiers/comments.ts +++ /dev/null @@ -1,178 +0,0 @@ -import { - Modifier, - EApplyTo, - EType, - IHTMLInjection, - EHTMLInjectionType, - IModifierRange, - EAlias, -} from '../modifier'; - -import * as ModifiersTools from '../tools'; - -import { CommentState, CommentDefinition } from '@platform/types/comment'; - -export class CommentsModifier extends Modifier { - protected ranges: IModifierRange[] = []; - protected readonly comment: CommentDefinition | undefined; - - protected setRange( - comment: CommentDefinition, - position: number, - str: string, - columns?: { column: number; map: [number, number][] }, - ) { - const from = columns !== undefined ? columns.map[columns.column][0] : 0; - const to = - columns !== undefined - ? columns.map[columns.column][0] + columns.map[columns.column][1] - : str.length; - if ( - position === comment.selection.start.position && - position === comment.selection.end.position - ) { - let start = comment.selection.start.offset; - let end = comment.selection.end.offset; - if (from < comment.selection.start.offset && to < comment.selection.start.offset) { - return; - } - if (from > comment.selection.end.offset && to > comment.selection.end.offset) { - return; - } - if (from <= comment.selection.start.offset && comment.selection.start.offset <= to) { - start = comment.selection.start.offset - from; - } else { - start = 0; - } - if (from <= comment.selection.end.offset && comment.selection.end.offset <= to) { - end = comment.selection.end.offset - from; - } else { - end = str.length; - } - this.ranges.push({ - start: start < 0 ? 0 : start, - end: end < 0 ? 0 : end, - }); - } - if ( - position === comment.selection.start.position && - position !== comment.selection.end.position - ) { - let start = comment.selection.start.offset; - if (from < comment.selection.start.offset && to < comment.selection.start.offset) { - return; - } - if (from <= comment.selection.start.offset && comment.selection.start.offset <= to) { - start = comment.selection.start.offset - from; - } else { - start = 0; - } - this.ranges.push({ - start: start < 0 ? 0 : start, - end: str.length, - }); - } - if ( - position !== comment.selection.start.position && - position === comment.selection.end.position - ) { - let end = comment.selection.end.offset; - if (from > comment.selection.end.offset && to > comment.selection.end.offset) { - return; - } - if (from <= comment.selection.end.offset && comment.selection.end.offset <= to) { - end = comment.selection.end.offset - from; - } else { - end = str.length; - } - this.ranges.push({ - start: 0, - end: end < 0 ? 0 : end, - }); - } - if ( - position > comment.selection.start.position && - position < comment.selection.end.position - ) { - this.ranges.push({ - start: 0, - end: str.length, - }); - } - } - - constructor( - comment: CommentDefinition | undefined, - position: number, - row: string, - columns?: { column: number; map: [number, number][] }, - ) { - super(); - if (comment !== undefined) { - this.comment = comment; - this.setRange(comment, position, row, columns); - } - } - - public alias(): EAlias { - return EAlias.Comments; - } - - public getInjections(): IHTMLInjection[] { - if (this.comment === undefined) { - return []; - } - const injections: IHTMLInjection[] = []; - this.ranges.forEach((range: IModifierRange) => { - injections.push( - ...[ - { - offset: range.start, - injection: ``, - type: EHTMLInjectionType.open, - }, - { - offset: range.end, - injection: ``, - type: EHTMLInjectionType.close, - }, - ], - ); - }); - return injections; - } - - public type(): EType { - return EType.above; - } - - public obey(ranges: Array>) { - this.ranges = ModifiersTools.obey(ranges, this.ranges); - } - - public getRanges(): Array> { - return this.ranges; - } - - public getGroupPriority(): number { - return 1; - } - - public finalize(str: string): string { - return str; - } - - public getName(): string { - return 'CommentsModifier'; - } - - public override applyTo(): EApplyTo { - return EApplyTo.output; - } -} diff --git a/application/client/src/app/service/session/dependencies/search/highlights/modifiers/filtres.ts b/application/client/src/app/service/session/dependencies/search/highlights/modifiers/filtres.ts deleted file mode 100644 index 09a5554aca..0000000000 --- a/application/client/src/app/service/session/dependencies/search/highlights/modifiers/filtres.ts +++ /dev/null @@ -1,106 +0,0 @@ -import { - Modifier, - EType, - IHTMLInjection, - EHTMLInjectionType, - IModifierRange, - EAlias, -} from '../modifier'; -import { FilterRequest } from '../../filters/request'; -import { styles } from '@ui/service/styles'; - -import * as Colors from '@styles/colors'; -import * as ModifiersTools from '../tools'; - -export interface IRange extends IModifierRange { - bgcl: string; -} - -export class FiltersModifier extends Modifier { - private _ranges: IRange[] = []; - private _matched: FilterRequest | undefined; - - constructor(highlights: FilterRequest[], row: string) { - super(); - this._map(row, highlights); - } - - public alias(): EAlias { - return EAlias.Filters; - } - - public getInjections(): IHTMLInjection[] { - const injections: IHTMLInjection[] = []; - this._ranges.forEach((range: IRange) => { - const fgcl: string = Colors.getContrastColor(range.bgcl, true); - injections.push( - ...[ - { - offset: range.start, - injection: ``, - type: EHTMLInjectionType.open, - }, - { - offset: range.end, - injection: ``, - type: EHTMLInjectionType.close, - }, - ], - ); - }); - return injections; - } - - public type(): EType { - return EType.match; - } - - public obey(ranges: Array>) { - this._ranges = ModifiersTools.obey(ranges, this._ranges) as IRange[]; - } - - public getRanges(): Array> { - return this._ranges; - } - - public getGroupPriority(): number { - return 2; - } - - public finalize(str: string): string { - return str; - } - - public getName(): string { - return 'FiltersModifier'; - } - - public matched(): FilterRequest | undefined { - return this._matched; - } - - private _map(row: string, highlights: FilterRequest[]) { - highlights.forEach((request: FilterRequest) => { - row.replace(request.as().serializedRegExp(), (match: string, ...args: any[]) => { - const offset: number = - typeof args[args.length - 2] === 'number' - ? args[args.length - 2] - : args[args.length - 3]; - this._ranges.push({ - start: offset, - end: offset + match.length, - bgcl: - request.definition.colors.background === Colors.CColors[0] - ? styles.colors().scheme_color_4 - : request.definition.colors.background === undefined - ? styles.colors().scheme_color_4 - : Colors.shadeColor(request.definition.colors.background, 30), - }); - this._matched = request; - return ''; - }); - }); - // Remove conflicts - this._ranges = ModifiersTools.removeCrossing(this._ranges) as IRange[]; - } -} diff --git a/application/client/src/app/service/session/dependencies/search/highlights/modifiers/index.ts b/application/client/src/app/service/session/dependencies/search/highlights/modifiers/index.ts deleted file mode 100644 index c6df14988e..0000000000 --- a/application/client/src/app/service/session/dependencies/search/highlights/modifiers/index.ts +++ /dev/null @@ -1,6 +0,0 @@ -export { ActiveFilterModifier } from './active'; -export { FiltersModifier } from './filtres'; -export { ChartsModifier } from './charts'; -export { CommentsModifier } from './comments'; -export { AsciModifier } from './asci'; -export { NestedSearchModifier } from './nested'; diff --git a/application/client/src/app/service/session/dependencies/search/highlights/modifiers/nested.ts b/application/client/src/app/service/session/dependencies/search/highlights/modifiers/nested.ts deleted file mode 100644 index ff9540c2e0..0000000000 --- a/application/client/src/app/service/session/dependencies/search/highlights/modifiers/nested.ts +++ /dev/null @@ -1,96 +0,0 @@ -import { - Modifier, - EType, - IHTMLInjection, - EHTMLInjectionType, - IModifierRange, - EAlias, -} from '../modifier'; -import { FilterRequest } from '../../filters/request'; - -import * as ModifiersTools from '../tools'; - -export class NestedSearchModifier extends Modifier { - private _ranges: IModifierRange[] = []; - private _matched: FilterRequest | undefined; - - constructor(filters: FilterRequest[], row: string) { - super(); - this._map(row, filters); - } - - public alias(): EAlias { - return EAlias.Active; - } - - public getInjections(): IHTMLInjection[] { - const injections: IHTMLInjection[] = []; - this._ranges.forEach((range: IModifierRange) => { - injections.push( - ...[ - { - offset: range.start, - injection: ``, - type: EHTMLInjectionType.open, - }, - { - offset: range.end, - injection: ``, - type: EHTMLInjectionType.close, - }, - ], - ); - }); - return injections; - } - - public type(): EType { - return EType.match; - } - - public obey(ranges: Array>) { - this._ranges = ModifiersTools.obey(ranges, this._ranges); - } - - public getRanges(): Array> { - return this._ranges; - } - - public getGroupPriority(): number { - return 1; - } - - public finalize(str: string): string { - return str; - } - - public getName(): string { - return 'NestedSearchModifier'; - } - - public matched(): FilterRequest | undefined { - return this._matched; - } - - private _map(row: string, filters: FilterRequest[]) { - filters.forEach((request: FilterRequest) => { - row.replace(request.as().serializedRegExp(), (match: string, ...args: any[]) => { - const offset: number = - typeof args[args.length - 2] === 'number' - ? args[args.length - 2] - : args[args.length - 3]; - this._ranges.push({ - start: offset, - end: offset + match.length, - }); - this._matched = request; - return ''; - }); - }); - // Remove nested ranges because it doesn't make sense, - // because color is same - this._ranges = ModifiersTools.removeIncluded(this._ranges); - // Remove conflicts - this._ranges = ModifiersTools.removeCrossing(this._ranges); - } -} diff --git a/application/client/src/app/service/session/dependencies/search/highlights/processor.ts b/application/client/src/app/service/session/dependencies/search/highlights/processor.ts deleted file mode 100644 index 87b06eecaf..0000000000 --- a/application/client/src/app/service/session/dependencies/search/highlights/processor.ts +++ /dev/null @@ -1,192 +0,0 @@ -import { - Modifier, - EType, - IHTMLInjection, - EHTMLInjectionType, - Priorities, - EApplyTo, -} from './modifier'; -import { Owner } from '@schema/content/row'; -import { Logger } from '@platform/log'; -import { scope } from '@platform/env/scope'; -import { serializeHtml } from '@platform/env/str'; - -export class ModifierProcessor { - private _modifiers: Modifier[]; - private _injections: IHTMLInjection[] = []; - private _logger: Logger = scope.getLogger('ModifierProcessor'); - - constructor(modifiers: Modifier[]) { - this._modifiers = modifiers; - } - - public parse( - row: string, - parent: Owner, - hasOwnStyles: boolean, - ): { row: string; injected: { [key: string]: boolean } } { - const cleanup = (str: string): string => { - // For finalization procedure we are applying - // all modifiers. For example, to cleanup from - // ASCII escapes - this._modifiers.forEach((modifier: Modifier) => { - const finalized: string = modifier.finalize(str); - const safe: string = serializeHtml(finalized); - if (safe.length !== finalized.length) { - this._logger.warn(`Modifier "${modifier.getName()}" tries to inject HTML`); - } - str = safe; - }); - return str; - }; - this._injections = []; - const modifiers: Modifier[] = this._getApplicableModifiers(parent, hasOwnStyles); - Priorities.forEach((type: EType, index: number) => { - const subordinateTypes: EType[] = - index !== Priorities.length - 1 - ? Priorities.slice(index + 1, Priorities.length) - : []; - const masters: Modifier[] = modifiers.filter((m) => m.type() === type); - const subordinates: Modifier[] = modifiers.filter( - (m) => subordinateTypes.indexOf(m.type()) !== -1, - ); - if (masters.length === 0) { - return; - } else { - masters.sort((a, b) => (a.getGroupPriority() > b.getGroupPriority() ? 1 : -1)); - masters.forEach((master: Modifier, n: number) => { - for (let i = n + 1; i <= masters.length - 1; i += 1) { - masters[i].obey(master.getRanges()); - } - }); - } - if (subordinates.length === 0) { - return; - } else { - subordinates.sort((a, b) => (a.getGroupPriority() > b.getGroupPriority() ? 1 : -1)); - masters.forEach((master: Modifier) => { - subordinates.forEach((subordinate: Modifier) => { - subordinate.obey(master.getRanges()); - }); - }); - } - }); - const injected: { [key: string]: boolean } = {}; - modifiers.forEach((modifier: Modifier) => { - let ignore: boolean = false; - // Check injections of modifier - modifier.getInjections().forEach((inj: IHTMLInjection) => { - const err: Error | undefined = this._getInjectionError(inj.injection); - if (err instanceof Error) { - this._logger.warn( - `Injection of modifier "${modifier.getName()}" has been rejected due error: ${ - err.message - }`, - ); - ignore = true; - } - }); - if (!ignore) { - const injections = modifier.getInjections(); - if (injections.length > 0) { - injected[modifier.alias()] = true; - this._injections.push(...modifier.getInjections()); - } else { - injected[modifier.alias()] = false; - } - } else { - this._logger.warn( - `All injections of modifier "${modifier.getName()}" will be ignored`, - ); - } - }); - this._injections.sort((a: IHTMLInjection, b: IHTMLInjection) => { - return a.offset < b.offset ? 1 : -1; - }); - let injections: IHTMLInjection[] = []; - this._injections.forEach((inj: IHTMLInjection) => { - if (injections.find((a) => a.offset === inj.offset) !== undefined) { - // Skip. Already done. - return; - } - const same: IHTMLInjection[] = this._injections.filter((a) => a.offset === inj.offset); - if (same.length === 1) { - injections.push(inj); - } else { - same.sort((a: IHTMLInjection) => { - return a.type === EHTMLInjectionType.close ? 1 : -1; - }); - injections = injections.concat(same); - } - }); - this._injections = injections; - this._injections.forEach((inj: IHTMLInjection) => { - row = - row.substring(0, inj.offset) + - inj.injection + - row.substring(inj.offset, row.length); - }); - if (row.search(/[><]/g) !== -1) { - row = row.replace(/(^.*?<)|(>.*?<)|(>.*?$)/gi, (match: string) => { - let clean: string = match.replace(/[><]/gi, ''); - if (clean === '') { - return match; - } - clean = cleanup(clean); - return `${match[0] === '>' ? '>' : ''}${clean}${ - match[match.length - 1] === '<' ? '<' : '' - }`; - }); - } else { - row = cleanup(row); - } - return { row, injected }; - } - - public wasChanged(): boolean { - return this._injections.length > 0; - } - - private _getApplicableModifiers(target: Owner, hasOwnStyles: boolean): Modifier[] { - const applyTo: EApplyTo = (() => { - if (target === Owner.Output) { - return EApplyTo.output; - } - if (target === Owner.Search) { - return EApplyTo.search; - } - return EApplyTo.all; - })(); - return this._modifiers.filter((modifier: Modifier) => { - if (modifier.applyTo() !== EApplyTo.all && modifier.applyTo() !== applyTo) { - return false; - } - if (hasOwnStyles) { - return [EType.above, EType.match].indexOf(modifier.type()) !== -1; - } else { - return true; - } - }); - } - - private _getInjectionError(injection: string): Error | undefined { - const tag = /<\/?(span|b|i).*?>/gi; - const match: RegExpMatchArray | null = injection.match(tag); - if (match === null) { - return new Error( - `Expecting "injection" has to be HTML tag (supported tags: , and .)`, - ); - } - if (match.length > 1) { - return new Error( - `"injection" should return only one tag. Multiple tags are prohibited`, - ); - } - if (injection.replace(tag, '').length !== 0) { - return new Error( - `"injection" should return only tag without any content outside of tag.`, - ); - } - return undefined; - } -} diff --git a/application/client/src/app/service/session/dependencies/search/highlights/tools.ts b/application/client/src/app/service/session/dependencies/search/highlights/tools.ts deleted file mode 100644 index ac974b1bfa..0000000000 --- a/application/client/src/app/service/session/dependencies/search/highlights/tools.ts +++ /dev/null @@ -1,77 +0,0 @@ -import { IModifierRange } from './modifier'; - -export function removeCrossing(ranges: Array>): Array> { - const removed: number[] = []; - return ranges = ranges.filter((checking: IModifierRange, i: number) => { - let excluded: boolean = false; - ranges.forEach((range: IModifierRange, n: number) => { - if (excluded || removed.indexOf(n) !== -1) { - return; - } - if (range.start < checking.start && range.end > checking.start && range.end < checking.end) { - excluded = true; - } - if (range.start < checking.end && range.end > checking.end && range.start > checking.start) { - excluded = true; - } - }); - if (excluded) { - removed.push(i); - } - return !excluded; - }); -} - -export function removeIncluded(ranges: Array>): Array> { - const removed: number[] = []; - return ranges.filter((checking: IModifierRange, i: number) => { - - let excluded: boolean = false; - ranges.forEach((range: IModifierRange, n: number) => { - if (excluded || removed.indexOf(n) !== -1) { - return; - } - if (range.start < checking.start && range.end > checking.end) { - excluded = true; - } - }); - if (excluded) { - removed.push(i); - } - return !excluded; - }); -} - -export function obey(master: Array>, slave: Array>): Array> { - return slave.filter((checking: IModifierRange) => { - let excluded: boolean = false; - master.forEach((range: IModifierRange) => { - if (excluded) { - return; - } - // Prevent any crossing - if ((range.start < checking.start && range.end > checking.start) || - (range.start < checking.end && range.end > checking.end)) { - excluded = true; - } - }); - return !excluded; - }); -} - -export function consider(master: Array>, slave: Array>): Array> { - return slave.filter((checking: IModifierRange) => { - let excluded: boolean = false; - master.forEach((range: IModifierRange) => { - if (excluded) { - return; - } - // Prevent any crossing - if ((range.start < checking.start && range.end > checking.start) || - (range.start < checking.end && range.end > checking.end)) { - excluded = true; - } - }); - return !excluded; - }); -} \ No newline at end of file diff --git a/application/client/src/app/service/session/dependencies/search/state.ts b/application/client/src/app/service/session/dependencies/search/state.ts deleted file mode 100644 index 28c8fd5263..0000000000 --- a/application/client/src/app/service/session/dependencies/search/state.ts +++ /dev/null @@ -1,406 +0,0 @@ -import { IFilter } from '@platform/types/filter'; -import { Subjects, Subject } from '@platform/env/subscription'; -import { unique } from '@platform/env/sequence'; -import { Session } from '@service/session'; -import { Owner } from '@schema/content/row'; - -import * as obj from '@platform/env/obj'; - -export interface ISearchFinishEvent { - found: number; - error?: string; -} - -export interface IChartsFinishEvent { - error?: string; -} - -export class State { - public readonly subjects: { - search: Subjects<{ - active: Subject; - start: Subject; - finish: Subject; - }>; - charts: Subjects<{ - start: Subject; - finish: Subject; - }>; - nested: Subject; - } = { - search: new Subjects({ - active: new Subject(), - start: new Subject(), - finish: new Subject(), - }), - charts: new Subjects({ - start: new Subject(), - finish: new Subject(), - }), - nested: new Subject(), - }; - - private _session: Session; - private _active: IFilter | undefined; - private _nested: { filter: IFilter | undefined; from: number; visible: boolean } = { - filter: undefined, - from: -1, - visible: false, - }; - private _hash: { - search: string | undefined; - charts: string | undefined; - } = { - search: undefined, - charts: undefined, - }; - private _progress: { - search: Set; - charts: Set; - } = { - search: new Set(), - charts: new Set(), - }; - private _nonActive: IFilter = { - filter: '', - flags: { - cases: false, - word: false, - reg: true, - }, - }; - - constructor(session: Session) { - this._session = session; - } - - public destroy() { - this.subjects.search.destroy(); - this.subjects.charts.destroy(); - } - - public get nonActive(): IFilter { - return this._nonActive; - } - - public set nonActive(filter: IFilter) { - this._nonActive = filter; - } - - public getActive(): IFilter | undefined { - return this._active; - } - - public setActive(filter: IFilter): Promise { - return new Promise((resolve, reject) => { - this._active = obj.clone(filter); - this._hash.search = undefined; - const finish = this.lifecycle().search(); - this._session.search - .drop() - .then(() => { - this.subjects.search.get().active.emit(obj.clone(filter)); - this._session.search - .search([filter]) - .then((found: number) => { - finish({ found }); - resolve(found); - }) - .catch((err: Error) => { - this._active = undefined; - this.subjects.search.get().active.emit(undefined); - finish({ found: 0, error: err.message }); - reject(err); - }); - }) - .catch((err: Error) => { - this._active = undefined; - finish({ found: 0, error: err.message }); - reject(err); - }); - }); - } - - public nested(): { - accept(action: Promise<[number, number] | undefined>): Promise; - next(): Promise; - prev(): Promise; - set(filter: IFilter): Promise; - setFrom(pos: number): void; - nextPos(): number; - prevPos(): number; - get(): IFilter | undefined; - drop(): void; - update(pos: number | undefined): void; - toggle(): void; - visible(): boolean; - } { - return { - accept: ( - action: Promise<[number, number] | undefined>, - ): Promise => { - return new Promise((resolve, reject) => { - action - .then((pos: [number, number] | undefined) => { - if (pos === undefined) { - this._nested.from = -1; - this.nested().update(undefined); - return resolve(undefined); - } else { - this._nested.from = pos[1]; - this.nested().update(pos[0]); - return resolve(pos[0]); - } - }) - .catch((err: Error) => { - this._session.search - .log() - .error(`Fail apply nested search: ${err.message}`); - reject(err); - }); - }); - }, - next: (): Promise => { - return this.nested().accept(this._session.search.searchNestedMatch(false)); - }, - prev: (): Promise => { - return this.nested().accept(this._session.search.searchNestedMatch(true)); - }, - set: (filter: IFilter): Promise => { - this._nested.filter = obj.clone(filter); - this._nested.from = -1; - return this.nested().next(); - }, - setFrom: (pos: number): void => { - this._nested.from = pos; - }, - nextPos: (): number => { - if (this._nested.from >= this._session.search.len()) { - return 0; - } else { - return this._nested.from + 1; - } - }, - prevPos: (): number => { - if (this._nested.from < 0) { - return this._session.search.len() - 1; - } else { - return this._nested.from; - } - }, - get: (): IFilter | undefined => { - return this._nested.filter; - }, - drop: (): void => { - this._nested.filter = undefined; - this._nested.from = -1; - this.nested().update(undefined); - }, - toggle: (): void => { - this._nested.visible = !this._nested.visible; - this.subjects.nested.emit(this._nested.visible); - if (!this._nested.visible) { - this.nested().drop(); - } - }, - update: (pos: number | undefined): void => { - setTimeout(() => { - // Update highlights in background to let views to be updated first - this._session.highlights.subjects.get().update.emit(); - }); - pos !== undefined && - this._session.cursor.select(pos, Owner.NestedSearch, undefined, undefined); - }, - visible: (): boolean => { - return this._nested.visible; - }, - }; - } - - public filters(): Promise { - if (this._active !== undefined) { - return Promise.resolve(); - } - if (!this.hash().search.changed()) { - return Promise.resolve(); - } - return new Promise((resolve, reject) => { - const finish = this.lifecycle().search(); - this._session.search - .drop() - .then(() => { - const filters = this._session.search - .store() - .filters() - .get() - .filter((request) => request.definition.active) - .map((request) => request.as().filter()); - this.hash().search.update(); - if (filters.length === 0) { - finish({ found: 0 }); - return resolve(); - } - this._session.search - .search(filters) - .then((found: number) => { - finish({ found: found }); - resolve(); - }) - .catch((err: Error) => { - finish({ found: 0, error: err.message }); - reject(err); - }); - }) - .catch((err: Error) => { - finish({ found: 0, error: err.message }); - reject(err); - }); - }); - } - - public charts(): Promise { - if (!this.hash().charts.changed()) { - return Promise.resolve(); - } - return new Promise((resolve, reject) => { - const finish = this.lifecycle().charts(); - const charts = this._session.search - .store() - .charts() - .get() - .filter((request) => request.definition.active) - .map((request) => request.as().filter()); - this.hash().charts.update(); - // if (charts.length === 0) { - // finish({}); - // return resolve(); - // } - this._session.search - .extract(charts) - .then(() => { - finish({}); - resolve(); - }) - .catch((err: Error) => { - finish({ error: err.message }); - reject(err); - }); - }); - } - - public progress(): { - search(): boolean; - charts(): boolean; - } { - return { - search: (): boolean => { - return this._progress.search.size > 0; - }, - charts: (): boolean => { - return this._progress.charts.size > 0; - }, - }; - } - - public hasActiveSearch(): boolean { - return this._active !== undefined; - } - - public reset(): { - search(): Promise; - } { - return { - search: (): Promise => { - if (this._active === undefined) { - return Promise.resolve(); - } - this._active = undefined; - this._hash.search = undefined; - this.subjects.search.get().active.emit(undefined); - return this.filters(); - }, - }; - } - - protected lifecycle(): { - search(): (event: ISearchFinishEvent) => void; - charts(): (event: IChartsFinishEvent) => void; - } { - return { - search: (): ((event: ISearchFinishEvent) => void) => { - const uuid = unique(); - this._progress.search.add(uuid); - this.subjects.search.get().start.emit(); - return (event: ISearchFinishEvent) => { - this._progress.search.delete(uuid); - if (this._progress.search.size !== 0) { - return; - } - this.subjects.search.get().finish.emit(event); - }; - }, - charts: (): ((event: IChartsFinishEvent) => void) => { - const uuid = unique(); - this._progress.charts.add(uuid); - this.subjects.charts.get().start.emit(); - return (event: IChartsFinishEvent) => { - this._progress.charts.delete(uuid); - if (this._progress.charts.size !== 0) { - return; - } - this.subjects.charts.get().finish.emit(event); - }; - }, - }; - } - - protected hash(): { - search: { - get(): string; - update(): void; - changed(): boolean; - }; - charts: { - get(): string; - update(): void; - changed(): boolean; - }; - } { - return { - search: { - get: (): string => { - return this._session.search - .store() - .filters() - .get() - .filter((request) => request.definition.active) - .map((request) => request.hash()) - .join('_'); - }, - update: (): void => { - this._hash.search = this.hash().search.get(); - }, - changed: (): boolean => { - return this.hash().search.get() !== this._hash.search; - }, - }, - charts: { - get: (): string => { - return this._session.search - .store() - .charts() - .get() - .filter((request) => request.definition.active) - .map((request) => request.hash()) - .join('_'); - }, - update: (): void => { - this._hash.charts = this.hash().charts.get(); - }, - changed: (): boolean => { - return this.hash().charts.get() !== this._hash.charts; - }, - }, - }; - } -} diff --git a/application/client/src/app/service/session/dependencies/search/store.ts b/application/client/src/app/service/session/dependencies/search/store.ts deleted file mode 100644 index 83af821457..0000000000 --- a/application/client/src/app/service/session/dependencies/search/store.ts +++ /dev/null @@ -1,146 +0,0 @@ -import { Hash, Recognizable } from '@platform/types/storage/entry'; -import { Subject, Subscriber, Subjects } from '@platform/env/subscription'; -import { EntityUpdateEvent } from './store.update'; -import { unique } from '@platform/env/sequence'; - -export enum Key { - filters = 'filters', - charts = 'charts', - ranges = 'ranges', - disabled = 'disabled', -} - -export interface Updatable { - updated: Subject | undefined; -} - -export interface ChangeEvent { - entities: StoredEntity[]; - sequence: string; -} - -export type StoredEntity = T & Hash & Recognizable & Updatable>; - -export abstract class Store extends Subscriber { - public subjects: Subjects<{ - highlights: Subject>; - value: Subject>; - inner: Subject>; - any: Subject>; - }> = new Subjects({ - highlights: new Subject>(), - value: new Subject>(), - inner: new Subject>(), - any: new Subject>(), - }); - - private _entities: Map> = new Map(); - private _hash: string = ''; - private _uuid: string; - - constructor(uuid: string) { - super(); - this._uuid = uuid; - } - - public destroy() { - this.subjects.destroy(); - this.unsubscribe(); - } - - public overwrite(items: StoredEntity[]): string { - this._entities = new Map(); - items.forEach((item) => { - this._entities.set(item.uuid(), item); - }); - return this.refresh(); - } - - public refresh(): string { - const sequence = unique(); - setTimeout(() => { - this._update(sequence); - }); - return sequence; - } - - public update(items: StoredEntity[]): string { - items.forEach((item) => { - this._entities.set(item.uuid(), item); - }); - return this.refresh(); - } - - public delete(items: string[]): string { - items.forEach((uuid) => { - this._entities.delete(uuid); - }); - return this.refresh(); - } - - public get(): StoredEntity[] { - return Array.from(this._entities.values()); - } - - public reorder(params: { prev: number; curt: number }) { - let entities: StoredEntity[] = this.get(); - const prev = entities[params.prev]; - if (prev === undefined) { - return; - } - entities = entities.filter((_entity: StoredEntity, index: number) => { - return index !== params.prev; - }); - entities.splice(params.curt, 0, prev); - this.overwrite(entities); - } - - public clear(): string { - this._entities = new Map(); - return this.refresh(); - } - - public abstract key(): Key; - - public abstract has(entity: T): boolean; - - public hash(): string { - return Array.from(this._entities.values()) - .map((entry) => entry.hash()) - .join('_'); - } - - private _update(sequence: string): void { - this.unsubscribe(); - const entities = Array.from(this._entities.values()); - this.subjects.get().value.emit({ entities, sequence }); - this.subjects.get().any.emit({ entities, sequence }); - this.subjects.get().highlights.emit({ entities, sequence }); - this._entities.forEach((entity) => { - let hash = entity.hash(); - entity.updated !== undefined && - this.register( - entity.updated.subscribe((event) => { - const updated_hash = entity.hash(); - if (hash !== updated_hash) { - hash = updated_hash; - const entities = Array.from(this._entities.values()); - const sequence = unique(); - if (event.consequence().highlights) { - this.subjects.get().highlights.emit({ entities, sequence }); - } - if (event.consequence().inner) { - this.subjects.get().inner.emit({ entities, sequence }); - } - if (event.consequence().value) { - this.subjects.get().value.emit({ entities, sequence }); - } - if (event.consequence().storable) { - this.subjects.get().any.emit({ entities, sequence }); - } - } - }), - ); - }); - } -} diff --git a/application/client/src/app/service/session/dependencies/search/store.update.ts b/application/client/src/app/service/session/dependencies/search/store.update.ts deleted file mode 100644 index 7e772bfded..0000000000 --- a/application/client/src/app/service/session/dependencies/search/store.update.ts +++ /dev/null @@ -1,15 +0,0 @@ -export abstract class EntityUpdateEvent { - abstract consequence(): { - // require redrawing of rows - highlights: boolean; - // require updating of data, like research - value: boolean; - // require redrawing of holders (like filter element) - inner: boolean; - // require saving in remote store. For example number of matches doesn't require - // saving operation - storable: boolean; - }; - abstract inner(): T; - abstract entity(): E; -} diff --git a/application/client/src/app/service/session/dependencies/stream.ts b/application/client/src/app/service/session/dependencies/stream.ts deleted file mode 100644 index 0408bb0eae..0000000000 --- a/application/client/src/app/service/session/dependencies/stream.ts +++ /dev/null @@ -1,425 +0,0 @@ -import { SetupLogger, LoggerInterface } from '@platform/entity/logger'; -import { Subscriber, Subjects, Subject } from '@platform/env/subscription'; -import { Range, IRange } from '@platform/types/range'; -import { cutUuid } from '@log/index'; -import { Rank } from './rank'; -import { GrabbedElement } from '@platform/types/bindings/miscellaneous'; -import { Observe } from '@platform/types/observe'; -import { ObserveOperation } from './observing/operation'; -import { ObserveSource } from './observing/source'; -import { Info } from './info'; -import { lockers } from '@ui/service/lockers'; -import { Sde } from './observing/sde'; -import { TextExportOptions } from '@platform/types/exporting'; - -import * as Requests from '@platform/ipc/request'; -import * as Events from '@platform/ipc/event'; -import * as $ from '@platform/types/observe'; - -export { ObserveOperation }; - -@SetupLogger() -export class Stream extends Subscriber { - public readonly subjects: Subjects<{ - // Stream is updated (new rows came) - updated: Subject; - // New observe operation is started - started: Subject; - // Observe operation for source is finished - finished: Subject; - // List of sources (observed operations has been changed) - sources: Subject; - // Session rank is changed - rank: Subject; - // Grabber is inited - readable: Subject; - }> = new Subjects({ - updated: new Subject(), - started: new Subject(), - finished: new Subject(), - sources: new Subject(), - rank: new Subject(), - readable: new Subject(), - }); - private _len: number = 0; - private _uuid!: string; - private _info!: Info; - - public readonly observed: { - running: Map; - done: Map; - map: Map; - } = { - running: new Map(), - done: new Map(), - map: new Map(), - }; - public readonly rank: Rank = new Rank(); - public sde!: Sde; - - public init(uuid: string, info: Info) { - this.setLoggerName(`Stream: ${cutUuid(uuid)}`); - this.sde = new Sde(uuid); - this._uuid = uuid; - this._info = info; - this.register( - Events.IpcEvent.subscribe(Events.Stream.Updated.Event, (event) => { - if (event.session !== this._uuid) { - return; - } - this._len = event.rows; - this.subjects.get().updated.emit(this._len); - !this.subjects.get().readable.emitted() && this.subjects.get().readable.emit(); - if (this.rank.set(this._len.toString().length)) { - this.subjects.get().rank.emit(this.rank.len); - } - }), - ); - this.register( - Events.IpcEvent.subscribe(Events.Observe.Started.Event, (event) => { - if (event.session !== this._uuid) { - return; - } - const observe = Observe.from(event.source); - if (observe instanceof Error) { - this.log().error(`Fail to parse Observe: ${observe.message}`); - return; - } - this.observed.running.set( - event.operation, - new ObserveOperation( - event.operation, - observe, - this.sde.send.bind(this.sde, event.operation), - this.observe().restart.bind(this, event.operation), - this.observe().abort.bind(this, event.operation), - ), - ); - this.observe() - .descriptions.request() - .then((sources) => { - let updated = false; - sources.forEach((source) => { - if (!this.observed.map.has(source.id)) { - this.observed.map.set(source.id, source); - updated = true; - } - }); - updated && this.subjects.get().sources.emit(); - }) - .catch((err: Error) => { - this.log().error(`Fail get sources description: ${err.message}`); - }); - this.sde.overwrite(this.observed.running); - this.subjects.get().started.emit(observe); - }), - ); - this.register( - Events.IpcEvent.subscribe(Events.Observe.Finished.Event, (event) => { - if (event.session !== this._uuid) { - return; - } - const stored = this.observed.running.get(event.operation); - if (stored === undefined) { - return; - } - this.observed.done.set(event.operation, stored.asObserve()); - this.observed.running.delete(event.operation); - this.sde.overwrite(this.observed.running); - this.subjects.get().finished.emit(stored.asObserve()); - }), - ); - } - - public destroy() { - this.unsubscribe(); - this.subjects.destroy(); - this.sde.destroy(); - } - - public len(): number { - return this._len; - } - - public observe(): { - start(observe: Observe): Promise; - abort(uuid: string): Promise; - restart(uuid: string, source: Observe): Promise; - list(): Promise>; - sources(): ObserveSource[]; - isFileSource(): boolean; - getSourceFileName(): string | undefined; - descriptions: { - get(id: number): $.Types.ISourceLink | undefined; - id(alias: string): number | undefined; - request(): Promise<$.Types.ISourceLink[]>; - count(): number; - }; - } { - return { - start: (observe: Observe): Promise => { - return Requests.IpcRequest.send( - Requests.Observe.Start.Response, - new Requests.Observe.Start.Request({ - session: this._uuid, - observe: observe.sterilized(), - }), - ) - .then((response) => { - if (typeof response.error === 'string' && response.error !== '') { - return Promise.reject(new Error(response.error)); - } - this._info.fromObserveInfo(observe); - return response.session; - }) - .finally(lockers.progress(`Creating session...`)); - }, - abort: (uuid: string): Promise => { - return new Promise((resolve, reject) => { - Requests.IpcRequest.send( - Requests.Observe.Abort.Response, - new Requests.Observe.Abort.Request({ - session: this._uuid, - operation: uuid, - }), - ) - .then((response: Requests.Observe.Abort.Response) => { - if (response.error !== undefined) { - return reject(new Error(response.error)); - } - resolve(undefined); - }) - .catch((error: Error) => { - this.log().error( - `Fail to cancel observe operation sources: ${error.message}`, - ); - }); - }); - }, - restart: (uuid: string, observe: Observe): Promise => { - return this.observe() - .abort(uuid) - .then(() => { - return this.observe().start(observe); - }); - }, - list: (): Promise> => { - return new Promise((resolve) => { - Requests.IpcRequest.send( - Requests.Observe.List.Response, - new Requests.Observe.List.Request({ - session: this._uuid, - }), - ) - .then((response: Requests.Observe.List.Response) => { - const sources: Map = new Map(); - Object.keys(response.sources).forEach((uuid: string) => { - const source = Observe.from(response.sources[uuid]); - if (source instanceof Error) { - this.log().error(`Fail to parse Observe: ${source.message}`); - return; - } - sources.set(uuid, source); - }); - resolve(sources); - }) - .catch((error: Error) => { - this.log().error( - `Fail to get a list of observed sources: ${error.message}`, - ); - }); - }); - }, - sources: (): ObserveSource[] => { - const sources: ObserveSource[] = []; - Array.from(this.observed.running.values()).forEach((observed: ObserveOperation) => { - sources.push(new ObserveSource(observed.asObserve(), observed)); - }); - Array.from(this.observed.done.values()).forEach((source: Observe) => { - sources.push(new ObserveSource(source)); - }); - return sources; - }, - isFileSource: (): boolean => { - const sources = this.observe().sources(); - if (sources.length !== 1) { - return false; - } - return sources[0].observe.origin.files() !== undefined; - }, - getSourceFileName: (): string | undefined => { - const sources = this.observe().sources(); - if (sources.length !== 1) { - return undefined; - } - const files = sources[0].observe.origin.files(); - if (files === undefined || (files instanceof Array && files.length === 0)) { - return undefined; - } - return files instanceof Array ? files[0] : files; - }, - descriptions: { - get: (id: number): $.Types.ISourceLink | undefined => { - return this.observed.map.get(id); - }, - id: (alias: string): number | undefined => { - const link = Array.from(this.observed.map.values()).find( - (s) => s.alias === alias, - ); - return link !== undefined ? link.id : undefined; - }, - request: (): Promise<$.Types.ISourceLink[]> => { - return new Promise((resolve, reject) => { - Requests.IpcRequest.send( - Requests.Observe.SourcesDefinitionsList.Response, - new Requests.Observe.SourcesDefinitionsList.Request({ - session: this._uuid, - }), - ) - .then((response: Requests.Observe.SourcesDefinitionsList.Response) => { - resolve(response.sources); - }) - .catch(reject); - }); - }, - count: (): number => { - return this.observed.map.size; - }, - }, - }; - } - - public chunk(range: Range): Promise { - if (this._len === 0) { - // TODO: Grabber is crash session in this case... should be prevented on grabber level - return Promise.resolve([]); - } - return new Promise((resolve) => { - Requests.IpcRequest.send( - Requests.Stream.Chunk.Response, - new Requests.Stream.Chunk.Request({ - session: this._uuid, - from: range.start, - to: range.end, - }), - ) - .then((response: Requests.Stream.Chunk.Response) => { - resolve(response.rows); - }) - .catch((error: Error) => { - this.log().error(`Fail to grab content: ${error.message}`); - }); - }); - } - - public grab(ranges: IRange[]): Promise { - if (this._len === 0) { - // TODO: Grabber is crash session in this case... should be prevented on grabber level - return Promise.resolve([]); - } - return new Promise((resolve) => { - Requests.IpcRequest.send( - Requests.Stream.Ranges.Response, - new Requests.Stream.Ranges.Request({ - session: this._uuid, - ranges, - }), - ) - .then((response: Requests.Stream.Ranges.Response) => { - resolve(response.rows); - }) - .catch((error: Error) => { - this.log().error(`Fail to grab content: ${error.message}`); - }); - }); - } - - public export(): { - text(ranges: IRange[], dest?: string, opt?: TextExportOptions): Promise; - raw(ranges: IRange[], dest?: string): Promise; - isRawAvailable(): Promise; - } { - return { - text: ( - ranges: IRange[], - dest?: string, - opt?: TextExportOptions, - ): Promise => { - if (this._len === 0) { - return Promise.resolve(undefined); - } - const options = - opt === undefined - ? { columns: [], delimiter: undefined, spliter: undefined } - : opt; - return new Promise((resolve, reject) => { - Requests.IpcRequest.send( - Requests.Session.Export.Response, - new Requests.Session.Export.Request({ - session: this._uuid, - dest, - ranges, - options, - }), - ) - .then((response: Requests.Session.Export.Response) => { - if (response.error !== undefined) { - return reject(new Error(response.error)); - } - resolve(response.filename); - }) - .catch((error: Error) => { - this.log().error(`Fail to export content: ${error.message}`); - }); - }); - }, - raw: (ranges: IRange[], dest?: string): Promise => { - if (this._len === 0) { - return Promise.resolve(undefined); - } - return new Promise((resolve, reject) => { - Requests.IpcRequest.send( - Requests.Session.ExportRaw.Response, - new Requests.Session.ExportRaw.Request({ - session: this._uuid, - dest, - ranges, - }), - ) - .then((response: Requests.Session.ExportRaw.Response) => { - if (response.error !== undefined) { - return reject(new Error(response.error)); - } - resolve(response.filename); - }) - .catch((error: Error) => { - this.log().error(`Fail to export raw: ${error.message}`); - }); - }); - }, - isRawAvailable: (): Promise => { - if (this._len === 0) { - return Promise.resolve(false); - } - return new Promise((resolve, reject) => { - Requests.IpcRequest.send( - Requests.Session.IsExportRawAvailable.Response, - new Requests.Session.IsExportRawAvailable.Request({ - session: this._uuid, - }), - ) - .then((response: Requests.Session.IsExportRawAvailable.Response) => { - if (response.error !== undefined) { - return reject(new Error(response.error)); - } - resolve(response.available); - }) - .catch((error: Error) => { - this.log().error(`Fail to check state export raw: ${error.message}`); - }); - }); - }, - }; - } -} -export interface Stream extends LoggerInterface {} diff --git a/application/client/src/app/service/session/dependencies/teamwork.ts b/application/client/src/app/service/session/dependencies/teamwork.ts deleted file mode 100644 index edcfb59bce..0000000000 --- a/application/client/src/app/service/session/dependencies/teamwork.ts +++ /dev/null @@ -1,712 +0,0 @@ -import { SetupLogger, LoggerInterface } from '@platform/entity/logger'; -import { Subscriber, Subjects, Subject } from '@platform/env/subscription'; -import { cutUuid } from '@log/index'; -import { Observe } from '@platform/types/observe'; -import { GitHubRepo } from '@platform/types/github'; -import { FileMetaDataDefinition, FileMetaData } from '@platform/types/github/filemetadata'; -import { Session } from '@service/session'; -import { FileDesc } from '@service/history/definition.file'; -import { FilterRequest } from '@service/session/dependencies/search/filters/request'; -import { ChartRequest } from '@service/session/dependencies/search/charts/request'; -import { ChangeEvent, StoredEntity } from '@service/session/dependencies/search/store'; -import { history } from '@service/history'; -import { LockToken } from '@platform/env/lock.token'; -import { lockers, Locker } from '@ui/service/lockers'; - -import * as utils from '@platform/log/utils'; -import * as Requests from '@platform/ipc/request'; -import * as Events from '@platform/ipc/event'; -import * as moment from 'moment'; - -export interface GitHubError { - time: string; - msg: string; -} - -export const DEFAULT_ENTRY = 'https://api.github.com'; - -@SetupLogger() -export class TeamWork extends Subscriber { - protected readonly subs: Subscriber = new Subscriber(); - protected readonly repos: Map = new Map(); - protected readonly active: { - repo: GitHubRepo | undefined; - username: string | undefined; - } = { - repo: undefined, - username: undefined, - }; - protected session!: Session; - // checksum of opened file - // string - checksum - // undefined - not set yet - // null - cannot be set (stream, multiple files, etc.) - protected checksum: string | undefined | null = undefined; - // Last written hash - // string - hash - // undefined - not loaded or no related profile on github repo - protected recent: { - metadata: FileMetaData | undefined; - sha: string | undefined; - checked: boolean; - } = { - metadata: undefined, - sha: undefined, - checked: false, - }; - protected errors: GitHubError[] = []; - protected destroyed: boolean = false; - protected blocked: string[] = []; - protected listener: LockToken = new LockToken(true); - - protected getLocalMetadata(): FileMetaData { - const filters = this.session.search.store().filters().get(); - const charts = this.session.search.store().charts().get(); - const bookmarks = this.session.bookmarks.get().map((b) => b.asDef()); - const comments = this.session.comments.getAsArray(); - return new FileMetaData({ - protocol: '0.0.1', - filters: filters.map((filter) => filter.definition), - charts: charts.map((chart) => chart.definition), - bookmarks: bookmarks, - comments: comments, - }); - } - protected loading(): { - repos(): Promise; - active(): Promise; - } { - return { - repos: async (): Promise => { - try { - const repos = await Requests.IpcRequest.send( - Requests.GitHub.GetRepos.Response, - new Requests.GitHub.GetRepos.Request(), - ); - const active = await Requests.IpcRequest.send( - Requests.GitHub.GetActive.Response, - new Requests.GitHub.GetActive.Request(), - ); - this.repos.clear(); - repos.repos.forEach((repo: GitHubRepo) => { - this.repos.set(repo.uuid, repo); - }); - if (active.uuid !== undefined) { - this.active.repo = this.repos.get(active.uuid); - } - await this.loading().active(); - } catch (err) { - this.error().add( - `Fail to load available GitHub references: ${utils.error(err)}`, - ); - } - }, - active: (): Promise => { - return new Promise((resolve) => { - const active = this.active.repo; - if (active === undefined) { - this.active.username = undefined; - this.subjects.get().loaded.emit(); - this.subjects.get().username.emit(this.active.username); - this.subjects.get().active.emit(active); - return resolve(); - } - this.user() - .reload() - .catch((err: Error) => { - this.log().error(`Fail to reload user: ${err}`); - this.error().add(`Fail to reload user: ${err}`); - }) - .then(() => { - this.file().check(); - }) - .finally(() => { - this.subjects.get().loaded.emit(); - this.subjects.get().active.emit(active); - resolve(); - }); - }); - }, - }; - } - - protected metadata(): { - import(md: FileMetaDataDefinition, sha: string): void; - } { - return { - import: (md: FileMetaDataDefinition, sha: string): void => { - if (this.active.repo === undefined || this.destroyed) { - return; - } - const local = this.recent.metadata; - const recent = new FileMetaData(md); - this.recent.metadata = recent; - this.recent.sha = sha; - if ( - local !== undefined && - local !== null && - local.hash().equal(this.active.repo.settings, recent) - ) { - return; - } - this.active.repo.settings.filters && - !this.active.repo.settings.readonly && - this.events().wait( - this.session.search - .store() - .filters() - .overwrite( - md.filters.map( - (def) => new FilterRequest(def), - ) as StoredEntity[], - ), - ); - this.active.repo.settings.charts && - !this.active.repo.settings.readonly && - this.events().wait( - this.session.search - .store() - .charts() - .overwrite( - md.charts.map( - (def) => new ChartRequest(def), - ) as StoredEntity[], - ), - ); - this.active.repo.settings.comments && this.session.comments.set(md.comments); - if (this.active.repo.settings.bookmarks && !this.active.repo.settings.readonly) { - this.session.bookmarks - .overwriteFromDefs(md.bookmarks) - .catch((err: Error) => { - this.log().error(`Fail update bookmarks due: ${err.message}`); - }) - .finally(() => { - this.events().wait(this.session.bookmarks.update()); - this.subjects.get().metadata.emit(md); - }); - } else { - this.subjects.get().metadata.emit(md); - } - }, - }; - } - - protected file(): { - check(sha?: string): void; - checkUpdates(): void; - write(): void; - } { - return { - check: (sha?: string): void => { - if ( - typeof this.checksum !== 'string' || - this.active.repo === undefined || - this.destroyed - ) { - return; - } - Requests.IpcRequest.send( - Requests.GitHub.GetFileMeta.Response, - new Requests.GitHub.GetFileMeta.Request({ - checksum: this.checksum, - sha, - }), - ) - .then((response) => { - if (response.error !== undefined) { - this.error().add(`Fail to get metadata: ${response.error}`); - } else if (response.metadata !== undefined && response.sha !== undefined) { - this.metadata().import(response.metadata, response.sha); - } else { - this.recent.metadata = undefined; - this.recent.sha = undefined; - } - this.recent.checked = true; - }) - .catch((err: Error) => { - this.error().add(`Request error: fail to get metadata: ${err.message}`); - }); - }, - checkUpdates: (): void => { - if ( - typeof this.checksum !== 'string' || - this.active.repo === undefined || - this.destroyed - ) { - return; - } - Requests.IpcRequest.send( - Requests.GitHub.CheckUpdates.Response, - new Requests.GitHub.CheckUpdates.Request({ - checksum: this.checksum, - }), - ) - .then((response) => { - if (response.error !== undefined) { - this.error().add( - `Fail to check for updates of metadata: ${response.error}`, - ); - } - }) - .catch((err: Error) => { - this.error().add( - `Request error: fail to check for updates of metadata: ${err.message}`, - ); - }); - }, - write: (): void => { - if ( - typeof this.checksum !== 'string' || - this.active.repo === undefined || - !this.recent.checked || - this.destroyed - ) { - return; - } - if (this.active.repo.settings.readonly) { - return; - } - const metadata = this.getLocalMetadata(); - if ( - this.recent.metadata !== undefined && - metadata.hash().equal(this.active.repo.settings, this.recent.metadata) - ) { - // Last time was written same metadata object - return; - } - Requests.IpcRequest.send( - Requests.GitHub.SetFileMeta.Response, - new Requests.GitHub.SetFileMeta.Request({ - checksum: this.checksum, - metadata: metadata.def, - sha: this.recent.sha, - }), - ) - .then((response) => { - if (response.error !== undefined) { - this.error().add(`Fail to save metadata: ${response.error}`); - } else { - this.recent.sha = response.sha; - } - }) - .catch((err: Error) => { - this.error().add(`Fail to set active repo: ${err.message}`); - }); - }, - }; - } - - protected events(): { - ignored(sequence: string): boolean; - wait(sequence: string): void; - } { - return { - ignored: (sequence: string): boolean => { - if (this.blocked.includes(sequence)) { - this.blocked = this.blocked.filter((s) => s !== sequence); - return true; - } - return false; - }, - wait: (sequence: string): void => { - this.blocked.push(sequence); - }, - }; - } - - public readonly subjects: Subjects<{ - loaded: Subject; - active: Subject; - username: Subject; - metadata: Subject; - error: Subject; - }> = new Subjects({ - loaded: new Subject(), - active: new Subject(), - username: new Subject(), - metadata: new Subject(), - error: new Subject(), - }); - - public init(session: Session) { - this.setLoggerName(`TeamWork: ${cutUuid(session.uuid())}`); - this.session = session; - this.loading() - .repos() - .catch((err: Error) => { - this.error().add(`Loading error: ${err.message}`); - }); - - this.register( - Events.IpcEvent.subscribe( - Events.GitHub.FileUpdated.Event, - (event: Events.GitHub.FileUpdated.Event) => { - this.file().check(event.sha); - }, - ), - Events.IpcEvent.subscribe( - Events.GitHub.Conflict.Event, - (event: Events.GitHub.Conflict.Event) => { - const message = lockers.lock( - new Locker( - false, - `The GitHub repository has been updated by ${event.username}. Your local version is mismatched with the remote. To continue you can drop your local changes to remote or switch to ReadOnly mode and continue with local session data.`, - ) - .set() - .buttons([ - { - caption: `Drop to Remote`, - handler: () => { - message.popup.close(); - this.file().check(); - }, - }, - { - caption: `ReadOnly Mode`, - handler: () => { - message.popup.close(); - if (this.active.repo === undefined) { - return; - } - this.active.repo.settings.readonly = true; - this.repo() - .update(this.active.repo) - .catch((err: Error) => { - this.log().error( - `Fail to update repo settings: ${err.message}`, - ); - }); - }, - }, - ]) - .end(), - { - closable: false, - }, - ); - }, - ), - this.session.stream.subjects.get().started.subscribe((observe: Observe) => { - if (this.checksum === null) { - return; - } - FileDesc.fromDataSource(observe) - .then((desc) => { - if (desc === undefined) { - this.checksum = null; - } else if (this.checksum === undefined) { - this.checksum = desc.checksum; - this.file().check(); - } else { - this.checksum = null; - } - }) - .catch((err: Error) => { - this.checksum = null; - this.error().add(`Fail get chechsum of file: ${err.message}`); - }); - }), - history.subjects.get().created.subscribe((uuid: string) => { - const session = history.get(uuid); - if (session === undefined) { - this.log().error(`Fail to get access to history session`); - return; - } - if (session.check().done()) { - this.listener.unlock(); - } else { - this.register( - session.subjects.get().checked.subscribe(() => { - this.listener.unlock(); - }), - ); - } - }), - this.session.search - .store() - .filters() - .subjects.get() - .any.subscribe((event: ChangeEvent) => { - if (this.listener.isLocked() || this.events().ignored(event.sequence)) { - return; - } - this.file().write(); - }), - this.session.search - .store() - .charts() - .subjects.get() - .any.subscribe((event: ChangeEvent) => { - if (this.listener.isLocked() || this.events().ignored(event.sequence)) { - return; - } - this.file().write(); - }), - this.session.bookmarks.subjects.get().updated.subscribe((sequence: string) => { - if (this.listener.isLocked() || this.events().ignored(sequence)) { - return; - } - this.file().write(); - }), - this.session.comments.subjects.get().updated.subscribe(() => { - this.file().write(); - }), - this.session.comments.subjects.get().added.subscribe(() => { - this.file().write(); - }), - this.session.comments.subjects.get().removed.subscribe(() => { - this.file().write(); - }), - ); - } - - public destroy() { - this.unsubscribe(); - this.subjects.destroy(); - this.destroyed = true; - } - - public repo(): { - list(): GitHubRepo[]; - setActive(repo: GitHubRepo | undefined): void; - getActive(): GitHubRepo | undefined; - create(repo: GitHubRepo): Promise; - update(repo: GitHubRepo): Promise; - delete(uuid: string): Promise; - reload(): Promise; - } { - return { - list: (): GitHubRepo[] => { - return Array.from(this.repos.values()); - }, - setActive: (repo: GitHubRepo | undefined): void => { - Requests.IpcRequest.send( - Requests.GitHub.SetActive.Response, - new Requests.GitHub.SetActive.Request({ - uuid: repo === undefined ? undefined : repo.uuid, - }), - ) - .then((response) => { - if (response.error !== undefined) { - this.error().add(`Fail to save active: ${response.error}`); - } else { - this.active.repo = repo; - this.loading().active(); - } - }) - .catch((err: Error) => { - this.error().add(`Fail to set active repo: ${err.message}`); - }); - }, - getActive: (): GitHubRepo | undefined => { - return this.active.repo; - }, - create: (repo: GitHubRepo): Promise => { - return new Promise((resolve, reject) => { - Requests.IpcRequest.send( - Requests.GitHub.AddRepo.Response, - new Requests.GitHub.AddRepo.Request(repo), - ) - .then((response: Requests.GitHub.AddRepo.Response) => { - if (response.error !== undefined) { - this.error().add(`Fail to add new repo: ${response.error}`); - return reject(new Error(response.error)); - } - if (response.uuid === undefined) { - return reject(new Error(`No uuid for added repo`)); - } - repo.uuid = response.uuid; - this.active.repo = repo; - this.repos.set(repo.uuid, repo); - this.loading().active().finally(resolve); - }) - .catch((err: Error) => { - this.error().add(`Fail to add new GitHub references: ${err.message}`); - reject(err); - }); - }); - }, - update: (repo: GitHubRepo): Promise => { - if (!this.repos.has(repo.uuid)) { - return Promise.reject(new Error(`Github reference doesn't exist`)); - } - return Requests.IpcRequest.send( - Requests.GitHub.UpdateRepo.Response, - new Requests.GitHub.UpdateRepo.Request(repo), - ) - .then((response: Requests.GitHub.UpdateRepo.Response) => { - if (response.error !== undefined) { - this.error().add(`Fail to update new repo: ${response.error}`); - return Promise.reject(new Error(response.error)); - } - this.repos.set(repo.uuid, repo); - if (this.active.repo !== undefined && this.active.repo.uuid !== undefined) { - this.active.repo = repo; - return this.loading().active(); - } else { - this.subjects.get().loaded.emit(); - return Promise.resolve(); - } - }) - .catch((err: Error) => { - this.error().add(`Fail to update GitHub references: ${err.message}`); - }); - }, - delete: async (uuid: string): Promise => { - if (!this.repos.has(uuid)) { - return Promise.reject(new Error(`Github reference doesn't exist`)); - } - if (this.active.repo !== undefined && this.active.repo.uuid === uuid) { - await this.repo().setActive(undefined); - } - return Requests.IpcRequest.send( - Requests.GitHub.RemoveRepo.Response, - new Requests.GitHub.RemoveRepo.Request({ uuid }), - ) - .then((response: Requests.GitHub.RemoveRepo.Response) => { - if (response.error !== undefined) { - this.error().add(`Fail to remove new repo: ${response.error}`); - return Promise.reject(new Error(response.error)); - } - return this.loading().repos(); - }) - .catch((err: Error) => { - this.error().add(`Fail to update GitHub references: ${err.message}`); - }); - }, - reload: (): Promise => { - return this.loading().repos(); - }, - }; - } - - public user(): { - reload(): Promise; - get(): string | undefined; - } { - return { - reload: (): Promise => { - if (this.active.repo === undefined || this.destroyed) { - return Promise.reject(new Error(`No active repo selected`)); - } - return Requests.IpcRequest.send( - Requests.GitHub.GetUserName.Response, - new Requests.GitHub.GetUserName.Request(), - ) - .then((response) => { - if (response.error !== undefined || response.username === undefined) { - this.error().add( - `Fail to get username: ${ - response.error === undefined ? '' : response.error - }`, - ); - this.active.username = undefined; - } else if (response.username !== undefined) { - this.active.username = response.username; - } - }) - .catch((err: Error) => { - this.error().add(`Fail to get username: ${err.message}`); - this.active.username = undefined; - }) - .finally(() => { - this.subjects.get().username.emit(this.active.username); - }); - }, - get: (): string | undefined => { - return this.active.username; - }, - }; - } - - public error(): { - add(msg: string): void; - get(): GitHubError[]; - clear(): void; - } { - return { - add: (msg: string): void => { - this.log().error(msg); - this.errors.push({ - time: moment.unix(Date.now() / 1000).format('MM/DD/YYYY hh:mm:ss'), - msg, - }); - this.subjects.get().error.emit(); - this.session.switch().sidebar.teamwork(); - }, - get: (): GitHubError[] => { - return this.errors; - }, - clear: (): void => { - this.errors = []; - this.subjects.get().error.emit(); - }, - }; - } - - public md(): { - getIfDifferentToLocal(): FileMetaData | undefined; - importFromRemote(): Promise; - } { - return { - getIfDifferentToLocal: (): FileMetaData | undefined => { - const remote = this.recent.metadata; - if (remote === undefined) { - return undefined; - } - const local = this.getLocalMetadata(); - if ( - local.hash().filters() !== remote.hash().filters() || - local.hash().charts() !== remote.hash().charts() || - local.hash().bookmarks() !== remote.hash().bookmarks() - ) { - return remote; - } - return undefined; - }, - importFromRemote: (): Promise => { - const remote = this.recent.metadata; - if (remote === undefined) { - return Promise.resolve(undefined); - } - this.events().wait( - this.session.search - .store() - .filters() - .overwrite( - remote.def.filters.map( - (def) => new FilterRequest(def), - ) as StoredEntity[], - ), - ); - this.events().wait( - this.session.search - .store() - .charts() - .overwrite( - remote.def.charts.map( - (def) => new ChartRequest(def), - ) as StoredEntity[], - ), - ); - this.session.comments.set(remote.def.comments); - return new Promise((resolve) => { - this.session.bookmarks - .overwriteFromDefs(remote.def.bookmarks) - .catch((err: Error) => { - this.log().error(`Fail update bookmarks due: ${err.message}`); - }) - .finally(() => { - this.events().wait(this.session.bookmarks.update()); - resolve(); - }); - }); - }, - }; - } - - public update() { - this.file().checkUpdates(); - } -} -export interface TeamWork extends LoggerInterface {} diff --git a/application/client/src/app/service/session/session.ts b/application/client/src/app/service/session/session.ts deleted file mode 100644 index 3a865e1818..0000000000 --- a/application/client/src/app/service/session/session.ts +++ /dev/null @@ -1,517 +0,0 @@ -import { TabsService, ITabAPI, ETabsListDirection, TabsOptions } from '@elements/tabs/service'; -import { Storage } from '@env/storage'; -import { Stream } from './dependencies/stream'; -import { Search } from './dependencies/search'; -import { Charts } from './dependencies/charts'; -import { Indexed } from './dependencies/indexed'; -import { Cursor } from './dependencies/cursor'; -import { SetupLogger, LoggerInterface } from '@platform/entity/logger'; -import { cutUuid } from '@log/index'; -import { Render } from '@schema/render'; -import { components } from '@env/decorators/initial'; -import { Base } from './base'; -import { Bookmarks } from './dependencies/bookmarks'; -import { Comments } from './dependencies/comments'; -import { Exporter } from './dependencies/exporter'; -import { IRange, fromIndexes } from '@platform/types/range'; -import { Providers } from './dependencies/observing/providers'; -import { Attachments } from './dependencies/attachments'; -import { Info } from './dependencies/info'; -import { session } from '@service/session'; -import { Highlights } from './dependencies/search/highlights'; -import { TeamWork } from './dependencies/teamwork'; -import { Cli } from './dependencies/cli'; -import { FilterRequest } from './dependencies/search/filters/request'; -import { ChartRequest } from './dependencies/search/charts/request'; -import { DisabledRequest } from './dependencies/search/disabled/request'; -import { StoredEntity } from './dependencies/search/store'; -import { Notification, notifications } from '@ui/service/notifications'; -import { error } from '@platform/log/utils'; - -import * as ids from '@schema/ids'; -import * as Requests from '@platform/ipc/request'; -import * as Origins from '@platform/types/observe/origin/index'; -import * as Factory from '@platform/types/observe/factory'; -import * as Parsers from '@platform/types/observe/parser/index'; -import * as Types from '@platform/types/observe/types/index'; - -export { Stream }; - -interface Snap { - filters: string[]; - charts: string[]; - disabled: string[]; -} - -@SetupLogger() -export class Session extends Base { - public readonly storage: Storage = new Storage(); - public readonly stream: Stream = new Stream(); - public readonly search: Search = new Search(); - public readonly charts: Charts = new Charts(); - public readonly indexed: Indexed = new Indexed(); - public readonly bookmarks: Bookmarks = new Bookmarks(); - public readonly comments: Comments = new Comments(); - public readonly cursor: Cursor = new Cursor(); - public readonly highlights: Highlights = new Highlights(); - public readonly exporter: Exporter = new Exporter(); - public readonly render: Render; - public readonly observed: Providers = new Providers(); - public readonly attachments: Attachments = new Attachments(); - public readonly info: Info = new Info(); - public readonly teamwork: TeamWork = new TeamWork(); - public readonly cli: Cli = new Cli(); - - private _uuid!: string; - private _tab!: ITabAPI; - private readonly _toolbar: TabsService = new TabsService(); - private readonly _sidebar: TabsService = new TabsService({ - options: new TabsOptions({ direction: ETabsListDirection.left }), - }); - protected inited: boolean = false; - - constructor(render: Render) { - super(); - this.render = render; - this._toolbar.add({ - uuid: ids.TOOLBAR_TAB_SEARCH, - name: 'Search', - active: true, - closable: false, - uppercaseTitle: true, - content: { - factory: components.get('app-views-search'), - inputs: { - session: this, - }, - }, - }); - this._toolbar.add({ - uuid: ids.TOOLBAR_TAB_DETAILS, - name: 'Details', - active: false, - closable: false, - uppercaseTitle: true, - content: { - factory: components.get('app-views-details'), - inputs: { - session: this, - }, - }, - }); - this._toolbar.add({ - uuid: ids.TOOLBAR_TAB_PRESET, - name: 'Presets / History', - active: false, - closable: false, - uppercaseTitle: true, - content: { - factory: components.get('app-views-history'), - inputs: { - session: this, - }, - }, - }); - this._toolbar.add({ - uuid: ids.TOOLBAR_TAB_CHART, - name: 'Chart', - active: false, - closable: false, - uppercaseTitle: true, - content: { - factory: components.get('app-views-chart'), - inputs: { - session: this, - }, - }, - }); - this._sidebar.add({ - uuid: ids.SIDEBAR_TAB_OBSERVING, - name: 'Observing', - active: false, - closable: false, - uppercaseTitle: true, - content: { - factory: components.get('app-views-observe-list'), - inputs: { - session: this, - }, - }, - }); - this._sidebar.add({ - uuid: ids.SIDEBAR_TAB_ATTACHMENTS, - name: 'Attachments', - active: false, - closable: false, - uppercaseTitle: true, - content: { - factory: components.get('app-views-attachments-list'), - inputs: { - session: this, - }, - }, - }); - this._sidebar.add({ - uuid: ids.SIDEBAR_TAB_FILTERS, - name: 'Filters', - active: true, - closable: false, - uppercaseTitle: true, - content: { - factory: components.get('app-views-filters'), - inputs: { - session: this, - }, - }, - }); - this._sidebar.add({ - uuid: ids.SIDEBAR_TAB_COMMENTS, - name: 'Comments', - active: false, - closable: false, - uppercaseTitle: true, - content: { - factory: components.get('app-views-comments'), - inputs: { - session: this, - }, - }, - }); - this._sidebar.add({ - uuid: ids.SIDEBAR_TAB_TEAMWORK, - name: 'Teamwork', - active: false, - closable: false, - uppercaseTitle: true, - content: { - factory: components.get('app-views-teamwork'), - inputs: { - session: this, - }, - }, - }); - } - - public init(): Promise { - return new Promise((resolve, reject) => { - Requests.IpcRequest.send( - Requests.Session.Create.Response, - new Requests.Session.Create.Request({}), - ) - .then((response) => { - this.setLoggerName(`Session: ${cutUuid(response.uuid)}`); - this._uuid = response.uuid; - this.stream.init(this._uuid, this.info); - this.cursor.init(this._uuid); - this.indexed.init(this._uuid); - this.bookmarks.init(this._uuid, this.stream, this.cursor); - this.comments.init(this); - this.search.init(this); - this.exporter.init(this._uuid, this.stream, this.indexed); - this.observed.init(this); - this.attachments.init(this._uuid); - this.charts.init(this._uuid, this.stream, this.search); - this.highlights.init(this); - this.teamwork.init(this); - this.cli.init(this); - this.inited = true; - resolve(this._uuid); - }) - .catch(reject); - }); - } - - public destroy(): Promise { - this.highlights.destroy(); - this.storage.destroy(); - this.search.destroy(); - this.indexed.destroy(); - this.stream.destroy(); - this.bookmarks.destroy(); - this.comments.destroy(); - this.cursor.destroy(); - this.exporter.destroy(); - this.observed.destroy(); - this.attachments.destroy(); - this.charts.destroy(); - this.info.destroy(); - this.teamwork.destroy(); - this.cli.destroy(); - this.unsubscribe(); - if (!this.inited) { - return Promise.resolve(); - } - return new Promise((resolve) => { - Requests.IpcRequest.send( - Requests.Session.Destroy.Response, - new Requests.Session.Destroy.Request({ session: this.uuid() }), - ) - .then((response) => { - if (response.error !== undefined) { - this.log().error(`Error on destroying session: ${response.error}`); - } - resolve(); - }) - .catch((err: Error) => { - this.log().error(`Error on sending destroy session reques: ${err.message}`); - resolve(); - }); - }); - } - - public bind(tab: ITabAPI) { - this._tab = tab; - } - - public uuid(): string { - return this._uuid; - } - - public sidebar(): TabsService | undefined { - return this._sidebar; - } - - public toolbar(): TabsService | undefined { - return this._toolbar; - } - - public switch(): { - toolbar: { - search(): void; - presets(): void; - details(): void; - charts(): void; - }; - sidebar: { - comments(): void; - filters(): void; - attachments(): void; - observing(): void; - teamwork(): void; - }; - } { - return { - toolbar: { - search: (): void => { - this._toolbar.setActive(ids.TOOLBAR_TAB_SEARCH); - }, - presets: (): void => { - this._toolbar.setActive(ids.TOOLBAR_TAB_PRESET); - }, - details: (): void => { - this._toolbar.setActive(ids.TOOLBAR_TAB_DETAILS); - }, - charts: (): void => { - this._toolbar.setActive(ids.TOOLBAR_TAB_CHART); - }, - }, - sidebar: { - comments: (): void => { - this._sidebar.setActive(ids.SIDEBAR_TAB_COMMENTS); - }, - filters: (): void => { - this._sidebar.setActive(ids.SIDEBAR_TAB_FILTERS); - }, - observing: (): void => { - this._sidebar.setActive(ids.SIDEBAR_TAB_OBSERVING); - }, - attachments: (): void => { - this._sidebar.setActive(ids.SIDEBAR_TAB_ATTACHMENTS); - }, - teamwork: (): void => { - this._sidebar.setActive(ids.SIDEBAR_TAB_TEAMWORK); - }, - }, - }; - } - - public isBound(): boolean { - return true; - } - - public close(): void { - this._tab.close(); - } - - public selection(): { - indexes(): number[]; - ranges(): IRange[]; - } { - return { - indexes: (): number[] => { - const selected = this.cursor.get().slice(); - selected.sort((a, b) => (a > b ? 1 : -1)); - return selected; - }, - ranges: (): IRange[] => { - return fromIndexes(this.selection().indexes()); - }, - }; - } - - public title(): { - set(title: string): Error | undefined; - get(): Error | string; - } { - return { - set: (title: string): Error | undefined => { - return this._tab.setTitle(title); - }, - get: (): Error | string => { - return this._tab.getTitle(); - }, - }; - } - - public snap(): { - get(): string; - load(json: string): Error | undefined; - } { - return { - get: (): string => { - const snap: Snap = { - filters: this.search - .store() - .filters() - .get() - .map((v) => v.json().to()), - disabled: this.search - .store() - .disabled() - .get() - .map((v) => v.json().to()), - charts: this.search - .store() - .charts() - .get() - .map((v) => v.json().to()), - }; - return JSON.stringify(snap); - }, - load: (json: string): Error | undefined => { - try { - const snap: Snap = JSON.parse(json); - if (snap.filters === undefined) { - throw new Error(`No filters list`); - } - if (snap.disabled === undefined) { - throw new Error(`No disabled list`); - } - if (snap.charts === undefined) { - throw new Error(`No charts list`); - } - const warnings: string[] = []; - const check = (v: FilterRequest | DisabledRequest | ChartRequest | Error) => { - if (!(v instanceof Error)) { - return true; - } else { - warnings.push(v.message); - return false; - } - }; - const filters = snap.filters - .map((json) => FilterRequest.fromJson(json)) - .filter((v) => check(v)) as FilterRequest[]; - const charts = snap.charts - .map((json) => ChartRequest.fromJson(json)) - .filter((v) => check(v)) as ChartRequest[]; - const disabled = snap.disabled - .map((json) => DisabledRequest.fromJson(json)) - .filter((v) => check(v)) as DisabledRequest[]; - this.search - .store() - .filters() - .overwrite(filters as StoredEntity[]); - this.search - .store() - .charts() - .overwrite(charts as StoredEntity[]); - this.search - .store() - .disabled() - .overwrite(disabled as StoredEntity[]); - if (warnings.length > 0) { - notifications.notify( - new Notification({ - message: `Some filters/charts weren't imported: ${warnings.join( - '; ', - )}`, - actions: [], - }), - ); - } - return undefined; - } catch (err) { - return new Error(`Fail to parse session snap file: ${error(err)}`); - } - }, - }; - } - - public getTabAPI(): ITabAPI { - return this._tab; - } - - public async searchResultAsNewSession(): Promise { - const filepath: string | undefined = await this.exporter.clone(); - if (filepath === undefined) { - return; - } - const sources = this.stream.observe().sources(); - if (sources.length === 0) { - throw new Error(`Fail to find bound source`); - } - const current = sources[0].observe.clone(); - const parentSearchStore = this.search.store(); - const observe = (() => { - const file = current.origin.as(Origins.File.Configuration); - const concat = current.origin.as( - Origins.Concat.Configuration, - ); - if (file !== undefined) { - file.set().filename(filepath); - return current; - } else if (concat !== undefined) { - if (concat.filetypes().length === 0) { - throw new Error(`Cannot find type of concated files`); - } - return new Factory.File().type(concat.filetypes()[0]).file(filepath).asDlt().get(); - } else { - const observe = new Factory.File() - .type( - (() => { - switch (current.parser.alias()) { - case Parsers.Protocol.Text: - case Parsers.Protocol.Plugin: - return Types.File.FileType.Text; - case Parsers.Protocol.Dlt: - case Parsers.Protocol.SomeIp: - throw new Error( - `Exporting from none-text streams to create new session aren't supported yet`, - ); - } - })(), - ) - .file(filepath) - .asText() - .get(); - observe.parser.overwrite(current.parser.configuration); - return observe; - } - })(); - return session - .initialize() - .observe(observe) - .then((uuid: string) => { - const created = session.get(uuid); - if (created === undefined) { - this.log().error(`Fail to find created session ${uuid}`); - return; - } - created.search.store().filters().overwrite(parentSearchStore.filters().get()); - created.search.store().charts().overwrite(parentSearchStore.charts().get()); - created.search.store().disabled().overwrite(parentSearchStore.disabled().get()); - }); - } -} -export interface Session extends LoggerInterface {} diff --git a/application/client/src/app/service/session/tab.ts b/application/client/src/app/service/session/tab.ts deleted file mode 100644 index aaa64b49b6..0000000000 --- a/application/client/src/app/service/session/tab.ts +++ /dev/null @@ -1,39 +0,0 @@ -import { TabsService, ITab } from '@elements/tabs/service'; -import { unique } from '@platform/env/sequence'; - -export class TabControls { - public readonly uuid: string; - - private readonly service: TabsService; - private _storage: unknown; - - constructor(tab: ITab, service: TabsService) { - if (tab.uuid === undefined) { - tab.uuid = unique(); - } - this.uuid = tab.uuid; - this.service = service; - } - - public close() { - this.service.remove(this.uuid); - } - - public setTitle(title: string) { - this.service.setTitle(this.uuid, title); - } - - public storage(): { - set(value: T): void; - get(): T | undefined; - } { - return { - set: (value: T): void => { - this._storage = value; - }, - get: (): T | undefined => { - return this._storage as T; - }, - }; - } -} diff --git a/application/client/src/app/service/session/unbound.ts b/application/client/src/app/service/session/unbound.ts deleted file mode 100644 index 609f7b4ebf..0000000000 --- a/application/client/src/app/service/session/unbound.ts +++ /dev/null @@ -1,47 +0,0 @@ -import { unique } from '@platform/env/sequence'; -import { TabsService, ITabAPI, ITab } from '@elements/tabs/service'; -import { Base } from './base'; - -export class UnboundTab extends Base { - private _sidebar: TabsService | undefined; - private _toolbar: TabsService | undefined; - - private readonly _uuid: string; - private _tab!: ITabAPI; - - public readonly tab: ITab; - - constructor(opts: { tab: ITab; sidebar?: boolean; toolbar?: boolean; uuid?: string }) { - super(); - this._sidebar = - opts.sidebar !== undefined ? (opts.sidebar ? new TabsService() : undefined) : undefined; - this._toolbar = - opts.toolbar !== undefined ? (opts.toolbar ? new TabsService() : undefined) : undefined; - this._uuid = opts.uuid !== undefined ? opts.uuid : unique(); - this.tab = opts.tab; - } - - public sidebar(): TabsService | undefined { - return this._sidebar; - } - - public toolbar(): TabsService | undefined { - return this._toolbar; - } - - public destroy(): Promise { - return Promise.resolve(); - } - - public bind(tab: ITabAPI) { - this._tab = tab; - } - - public uuid(): string { - return this._uuid; - } - - public isBound(): boolean { - return false; - } -} diff --git a/application/client/src/app/service/settings.ts b/application/client/src/app/service/settings.ts deleted file mode 100644 index 591c1dc08c..0000000000 --- a/application/client/src/app/service/settings.ts +++ /dev/null @@ -1,133 +0,0 @@ -import { SetupService, Interface, Implementation, register } from '@platform/entity/service'; -import { services } from '@register/services'; -import { ISettingsEntry } from '@platform/types/settings/entry'; -import { IDescription } from '@platform/types/settings/entry.description'; -import { styles } from '@ui/service/styles'; - -import * as Requests from '@platform/ipc/request/index'; - -export interface ILocalDefaults { - 'general.colors.match': string; - 'general.colors.default_filter': string; - 'general.colors.default_chart': string; -} -export const DEFAULTS: ILocalDefaults = { - 'general.colors.match': styles.colors().scheme_color_2, - 'general.colors.default_filter': styles.colors().scheme_color_match, - 'general.colors.default_chart': styles.colors().scheme_color_match, -}; - -@SetupService(services['settings']) -export class Service extends Implementation { - protected updateLocalSettings(): Promise { - return Promise.all( - Object.keys(DEFAULTS).map((k) => { - const parts = k.split('.'); - let path = ''; - let key = ''; - if (parts.length === 1) { - key = k; - } else { - path = parts.splice(0, parts.length - 1).join('.'); - key = parts[0]; - } - return this.getByPath(path, key) - .then((value) => { - (this.defaults as any)[k] = - value === undefined ? (DEFAULTS as any)[k] : value; - }) - .catch((err: Error) => { - this.log().error(`Fail to get settings for "${k}": ${err.message}`); - }); - }), - ) - .then(() => undefined) - .catch((err: Error) => { - this.log().error(`Fail to update defaults local setting: ${err.message}`); - }); - } - - public defaults: ILocalDefaults = Object.assign({}, DEFAULTS); - - public override ready(): Promise { - return this.updateLocalSettings().catch((err: Error) => { - this.log().error(`Updating local defaults settings: ${err.message}`); - }); - } - - public getDefaultByDesc(desc: IDescription): unknown { - return (DEFAULTS as { [key: string]: any })[ - desc.path !== '' ? `${desc.path}.${desc.key}` : desc.key - ]; - } - - public get(): Promise { - return new Promise((resolve, reject) => { - Requests.IpcRequest.send( - Requests.Settings.Entries.Response, - new Requests.Settings.Entries.Request(), - ) - .then((response: Requests.Settings.Entries.Response) => { - resolve(response.entries); - }) - .catch(reject); - }); - } - - public getByPath(path: string, key: string): Promise { - return new Promise((resolve, reject) => { - Requests.IpcRequest.send( - Requests.Settings.Get.Response, - new Requests.Settings.Get.Request({ - path, - key, - }), - ) - .then((response: Requests.Settings.Get.Response) => { - resolve(response.value); - }) - .catch(reject); - }); - } - - public validate(path: string, key: string, value: any): Promise { - return new Promise((resolve, reject) => { - Requests.IpcRequest.send( - Requests.Settings.Validate.Response, - new Requests.Settings.Validate.Request({ - path, - key, - value, - }), - ) - .then((response: Requests.Settings.Validate.Response) => { - resolve(response.error); - }) - .catch(reject); - }); - } - - public set(path: string, key: string, value: any): Promise { - return new Promise((resolve, reject) => { - Requests.IpcRequest.send( - Requests.Settings.Set.Response, - new Requests.Settings.Set.Request({ - path, - key, - value, - }), - ) - .then((response: Requests.Settings.Validate.Response) => { - if (response.error !== undefined) { - reject(new Error(response.error)); - } else { - resolve(); - } - this.updateLocalSettings(); - }) - .catch(reject); - }); - } -} -export interface Service extends Interface {} -export const settings = register(new Service()); diff --git a/application/client/src/app/service/state.ts b/application/client/src/app/service/state.ts deleted file mode 100644 index eb91863200..0000000000 --- a/application/client/src/app/service/state.ts +++ /dev/null @@ -1,72 +0,0 @@ -import { SetupService, Interface, Implementation, register } from '@platform/entity/service'; -import { services } from '@register/services'; -import { ilc, Emitter, Declarations } from '@service/ilc'; - -import * as Events from '@platform/ipc/event/index'; - -export interface States { - ui: { - input: boolean; - }; -} - -@SetupService(services['state']) -export class Service extends Implementation { - private _emitter!: Emitter; - private _states: States = { - ui: { - input: false, - }, - }; - - public override ready(): Promise { - this._emitter = ilc.emitter(this.getName(), this.log()); - const channel = ilc.channel(this.getName(), this.log()); - this.register( - Events.IpcEvent.subscribe( - Events.State.Backend.Event, - (event) => { - this._emitter.backend.state({ - state: (() => { - switch (event.state) { - case Events.State.Backend.State.Ready: - this._emitter.system.ready(); - return Declarations.BackendState.Ready; - case Events.State.Backend.State.Locked: - return Declarations.BackendState.Locked; - } - throw new Error(`Unknown backend state: "${event.state}"`); - })(), - job: event.job, - }); - }, - ), - ); - channel.ui.input.focused(() => { - this._states.ui.input = true; - }); - channel.ui.input.blur(() => { - this._states.ui.input = false; - }); - return Promise.resolve(); - } - - public override destroy(): Promise { - this.unsubscribe(); - return Promise.resolve(); - } - - public setClientAsReady() { - Events.IpcEvent.emit( - new Events.State.Client.Event({ - state: Events.State.Client.State.Ready, - }), - ); - } - - public states(): States { - return this._states; - } -} -export interface Service extends Interface {} -export const state = register(new Service()); diff --git a/application/client/src/app/service/sys.ts b/application/client/src/app/service/sys.ts deleted file mode 100644 index 63dc8f9f5a..0000000000 --- a/application/client/src/app/service/sys.ts +++ /dev/null @@ -1,145 +0,0 @@ -import { SetupService, Interface, Implementation, register } from '@platform/entity/service'; -import { services } from '@register/services'; -import { api } from '@service/api'; -import { session } from '@service/session'; -import { CancelablePromise } from '@platform/env/promise'; -import { unique } from '@platform/env/sequence'; -import { system } from '@platform/modules/system'; - -import * as Requests from '@platform/ipc/request/index'; - -type Handler = () => void; - -@SetupService(services['sys']) -export class Service extends Implementation { - protected readonly jobs: Map> = new Map(); - protected readonly state: { - requested: number; - forced: boolean; - done: Handler | undefined; - finished: boolean; - } = { - requested: -1, - forced: false, - done: undefined, - finished: false, - }; - - public override ready(): Promise { - this.register( - api - .transport() - .respondent( - this.getName(), - Requests.System.Shutdown.Request, - ( - request: Requests.System.Shutdown.Request, - ): CancelablePromise => { - return new CancelablePromise((resolve, _reject) => { - if (this.state.done !== undefined) { - this.log().error(`Shutdown was already requestd.`); - return resolve( - new Requests.System.Shutdown.Response({ - state: Requests.System.Shutdown.State.InProgress, - }), - ); - } - this.state.requested = Date.now(); - this.state.forced = request.force; - this.state.done = () => { - this.state.finished = true; - session - .closeAllSessions() - .catch((err: Error) => { - this.log().error( - `Fail to close all session: ${err.message}`, - ); - }) - .finally(() => { - this.log().debug(`Shutdowning services`); - system - .destroy() - .then(() => { - this.log().debug( - `All services are down. Client can be closed`, - ); - }) - .catch((err: Error) => { - this.log().error( - `Fail to shutdown all service: ${err.message}`, - ); - }) - .finally(() => { - resolve( - new Requests.System.Shutdown.Response({ - state: Requests.System.Shutdown.State.Ready, - }), - ); - }); - }); - }; - this.shutdown().init(); - }); - }, - ), - ); - return Promise.resolve(); - } - - public job(): { - add(job: CancelablePromise): string; - remove(uuid: string): void; - } { - return { - add: (job: CancelablePromise): string => { - const uuid = unique(); - this.jobs.set(uuid, job); - job.catch((err: Error) => { - this.log().error(`Job ${uuid} is finished with error: ${err.message}`); - }).finally(() => { - this.job().remove(uuid); - }); - return uuid; - }, - remove: (uuid: string): void => { - this.jobs.delete(uuid); - this.shutdown().track(); - }, - }; - } - - protected shutdown(): { - init(): void; - track(): void; - } { - return { - init: (): void => { - if (this.state.done === undefined) { - this.log().warn(`Cannot init shutdown because finish-handler isn't created`); - return; - } - if (this.state.forced) { - this.log().debug( - `Shutdown is requested in forced mode. All jobs will be canceled`, - ); - this.jobs.forEach((job) => job.abort()); - } - this.shutdown().track(); - }, - track: (): void => { - if (this.state.done === undefined) { - return; - } - if (this.jobs.size > 0) { - this.log().debug( - `Cannot shutdown, still waiting for ${this.jobs.size} jobs to be finished`, - ); - return; - } - this.state.done(); - }, - }; - } -} -export interface Service extends Interface {} -export const sys = register(new Service()); diff --git a/application/client/src/app/ui/elements/autocomplete/component.ts b/application/client/src/app/ui/elements/autocomplete/component.ts deleted file mode 100644 index bac59ef37b..0000000000 --- a/application/client/src/app/ui/elements/autocomplete/component.ts +++ /dev/null @@ -1,133 +0,0 @@ -import { - Component, - ChangeDetectorRef, - Input, - ViewChild, - ElementRef, - AfterContentInit, - AfterViewInit, - EventEmitter, - Output, - ViewEncapsulation, - OnDestroy, - ChangeDetectionStrategy, -} from '@angular/core'; -import { Ilc, IlcInterface } from '@env/decorators/component'; -import { ChangesDetector } from '@ui/env/extentions/changes'; -import { MatAutocompleteTrigger } from '@angular/material/autocomplete'; -import { Controll } from './input'; -import { List } from '@env/storages/recent/list'; -import { Recent } from '@env/storages/recent/item'; -import { Subject } from '@platform/env/subscription'; -import { ErrorState, NullErrorState } from './error'; -import { stop } from '@ui/env/dom'; - -interface Options { - defaults: string; - storage: string; - name: string; - placeholder: string; - label: string; - inlineLabel?: string; - recent: Subject; - error?: ErrorState; -} - -export { ErrorState, Options }; - -@Component({ - selector: 'app-autocomplete-input', - templateUrl: './template.html', - styleUrls: ['./styles.less'], - changeDetection: ChangeDetectionStrategy.OnPush, - encapsulation: ViewEncapsulation.None, - standalone: false, -}) -@Ilc() -export class AutocompleteInput - extends ChangesDetector - implements OnDestroy, AfterContentInit, AfterViewInit -{ - @Input() public options!: Options; - - @Output() public edit: EventEmitter = new EventEmitter(); - @Output() public enter: EventEmitter = new EventEmitter(); - @Output() public panel: EventEmitter = new EventEmitter(); - - @ViewChild('input') inputRef!: ElementRef; - @ViewChild('input', { read: MatAutocompleteTrigger }) panelRef!: MatAutocompleteTrigger; - - public control!: Controll; - public recent!: List; - public error!: ErrorState; - - constructor(cdRef: ChangeDetectorRef) { - super(cdRef); - } - - public ngOnDestroy(): void { - this.control.destroy(); - } - - public ngAfterContentInit(): void { - this.control = new Controll(); - this.recent = new List(this.control.control, this.options.name, this.options.storage); - this.error = this.options.error !== undefined ? this.options.error : new NullErrorState(); - this.control.set(this.options.defaults); - } - - public ngAfterViewInit(): void { - this.env().subscriber.register( - this.control.actions.edit.subscribe((value: string) => { - this.edit.emit(value); - this.detectChanges(); - }), - this.control.actions.enter.subscribe((value: string) => { - this.enter.emit(value); - this.detectChanges(); - }), - this.control.actions.panel.subscribe((opened: boolean) => { - this.panel.emit(opened); - this.detectChanges(); - }), - this.options.recent.subscribe((value: string | undefined) => { - value = value === undefined ? this.control.value : value; - value.trim() !== '' && this.recent.update(value); - }), - this.error.observer().subscribe(() => { - this.detectChanges(); - }), - ); - this.control.bind(this.inputRef.nativeElement, this.panelRef, this.error); - } - - public ngRemove(recent: Recent, event: MouseEvent) { - this.recent.remove(recent.value); - this.detectChanges(); - stop(event); - } - - public disable(): AutocompleteInput { - this.control.disable(); - this.detectChanges(); - return this; - } - - public enable(): AutocompleteInput { - this.control.enable(); - this.detectChanges(); - return this; - } - - public set(value: string): AutocompleteInput { - this.control.set(value); - this.detectChanges(); - return this; - } - - public focus(): AutocompleteInput { - this.inputRef.nativeElement.focus(); - return this; - } -} -export interface AutocompleteInput extends IlcInterface {} diff --git a/application/client/src/app/ui/elements/autocomplete/error.ts b/application/client/src/app/ui/elements/autocomplete/error.ts deleted file mode 100644 index 5536742f01..0000000000 --- a/application/client/src/app/ui/elements/autocomplete/error.ts +++ /dev/null @@ -1,54 +0,0 @@ -import { ErrorStateMatcher } from '@angular/material/core'; -import { Subject } from '@platform/env/subscription'; -import { UntypedFormControl } from '@angular/forms'; - -export abstract class ErrorState extends ErrorStateMatcher { - protected value: string = ''; - protected timer: number = -1; - public override isErrorState(control: UntypedFormControl | null): boolean { - if (control !== null) { - const updated = this.value !== control.value; - this.value = control.value; - updated && this.check(); - } - return this.is(); - } - - abstract msg(): string; - abstract is(): boolean; - abstract observer(): Subject; - abstract validate(): void; - - public check() { - // We are using timeout to prevent ExpressionChangedAfterItHasBeenCheckedError - clearTimeout(this.timer); - this.timer = setTimeout(() => { - this.validate(); - }) as unknown as number; - } - - public setValue(value: string) { - this.value = value; - this.validate(); - } -} - -export class NullErrorState extends ErrorState { - protected subject: Subject = new Subject(); - - public msg(): string { - return ''; - } - - public is(): boolean { - return false; - } - - public observer(): Subject { - return this.subject; - } - - public validate(): void { - return undefined; - } -} diff --git a/application/client/src/app/ui/elements/autocomplete/input.ts b/application/client/src/app/ui/elements/autocomplete/input.ts deleted file mode 100644 index 47c2e7a510..0000000000 --- a/application/client/src/app/ui/elements/autocomplete/input.ts +++ /dev/null @@ -1,104 +0,0 @@ -import { UntypedFormControl } from '@angular/forms'; -import { Subject } from '@platform/env/subscription'; -import { - MatAutocompleteTrigger, - MatAutocompleteSelectedEvent, -} from '@angular/material/autocomplete'; -import { ErrorState } from './error'; - -export class Controll { - public control: UntypedFormControl = new UntypedFormControl(); - public ref!: HTMLInputElement; - public value: string = ''; - public readonly: boolean = false; - public focused: boolean = false; - public recent: boolean = false; - - public actions: { - edit: Subject; - enter: Subject; - panel: Subject; - } = { - edit: new Subject(), - enter: new Subject(), - panel: new Subject(), - }; - - protected panel!: MatAutocompleteTrigger; - protected error!: ErrorState; - - public destroy() { - this.actions.enter.destroy(); - this.actions.edit.destroy(); - this.actions.panel.destroy(); - } - - public bind(ref: HTMLInputElement, panel: MatAutocompleteTrigger, errorState: ErrorState) { - this.ref = ref; - this.panel = panel; - this.error = errorState; - } - - public isEmpty(): boolean { - return this.value.trim() === ''; - } - - public keyup(event: KeyboardEvent) { - if (event.key === 'Escape') { - this.recent = false; - if (this.control.value.trim() !== '') { - this.drop(); - } - } else if (event.key === 'Enter') { - if (this.recent) { - this.recent = false; - this.panel !== undefined && this.panel.closePanel(); - this.actions.panel.emit(false); - } - this.actions.enter.emit(this.value); - } else if (event.key === 'ArrowUp' || event.key === 'ArrowDown') { - if (!this.recent) { - this.recent = true; - this.panel !== undefined && this.panel.openPanel(); - this.actions.panel.emit(true); - } - } else if (this.control.value !== '' && !this.recent) { - this.recent = true; - this.panel !== undefined && this.panel.openPanel(); - this.actions.panel.emit(true); - } - const prev = this.value; - this.value = this.control.value; - prev !== this.value && this.actions.edit.emit(this.value); - } - - public drop() { - this.error !== undefined && this.error.setValue(''); - this.control.setValue(''); - this.value = ''; - } - - public set(value: string) { - this.error !== undefined && this.error.setValue(value); - this.control.setValue(value); - const prev = this.value; - this.value = this.control.value; - prev !== this.value && this.actions.edit.emit(this.value); - } - - public onPanelClosed() { - this.recent = false; - } - - public selected(event: MatAutocompleteSelectedEvent) { - this.set(event.option.value); - } - - public disable(): void { - this.control.disable(); - } - - public enable(): void { - this.control.enable(); - } -} diff --git a/application/client/src/app/ui/elements/autocomplete/module.ts b/application/client/src/app/ui/elements/autocomplete/module.ts deleted file mode 100644 index b5a9532d10..0000000000 --- a/application/client/src/app/ui/elements/autocomplete/module.ts +++ /dev/null @@ -1,26 +0,0 @@ -import { NgModule } from '@angular/core'; -import { CommonModule } from '@angular/common'; -import { FormsModule, ReactiveFormsModule } from '@angular/forms'; -import { MatIconModule } from '@angular/material/icon'; -import { MatFormFieldModule } from '@angular/material/form-field'; -import { MatInputModule } from '@angular/material/input'; -import { MatAutocompleteModule } from '@angular/material/autocomplete'; -import { MatOptionModule } from '@angular/material/core'; - -import { AutocompleteInput } from './component'; - -@NgModule({ - imports: [ - CommonModule, - FormsModule, - ReactiveFormsModule, - MatIconModule, - MatFormFieldModule, - MatInputModule, - MatAutocompleteModule, - MatOptionModule, - ], - declarations: [AutocompleteInput], - exports: [AutocompleteInput] -}) -export class AutocompleteModule {} diff --git a/application/client/src/app/ui/elements/autocomplete/styles.less b/application/client/src/app/ui/elements/autocomplete/styles.less deleted file mode 100644 index a26b786b43..0000000000 --- a/application/client/src/app/ui/elements/autocomplete/styles.less +++ /dev/null @@ -1,16 +0,0 @@ -@import '../../styles/variables.less'; - - -app-autocomplete-input { - position: relative; - display: flex; - flex-direction: row; - align-items:flex-start; - width: 100%; - & span.inline-label { - color: var(--scheme-color-3); - white-space: nowrap; - margin: 0 6px 0 0; - font-size: 12px; - } -} \ No newline at end of file diff --git a/application/client/src/app/ui/elements/autocomplete/template.html b/application/client/src/app/ui/elements/autocomplete/template.html deleted file mode 100644 index f81f8231d4..0000000000 --- a/application/client/src/app/ui/elements/autocomplete/template.html +++ /dev/null @@ -1,38 +0,0 @@ - - {{options.inlineLabel}} - - - {{error.msg()}} - - - -
- - close -
-
-
-
\ No newline at end of file diff --git a/application/client/src/app/ui/elements/color.selector/component.ts b/application/client/src/app/ui/elements/color.selector/component.ts deleted file mode 100644 index 567b030665..0000000000 --- a/application/client/src/app/ui/elements/color.selector/component.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { Component, Input, ChangeDetectorRef, Output, EventEmitter } from '@angular/core'; - -@Component({ - selector: 'app-com-color-selector', - templateUrl: './template.html', - styleUrls: ['./styles.less'], - standalone: false, -}) -export class ComColorSelectorComponent { - @Input() public color!: string; - @Input() public colors!: string[]; - - @Output() public change = new EventEmitter(); - - private _destroyed: boolean = false; - - constructor(private _cdRef: ChangeDetectorRef) {} - - public _ng_onColorSelect(color: string) { - this.color = color; - this.change.emit(color); - this._forceUpdate(); - } - - private _forceUpdate() { - if (this._destroyed) { - return; - } - this._cdRef.detectChanges(); - } -} diff --git a/application/client/src/app/ui/elements/color.selector/module.ts b/application/client/src/app/ui/elements/color.selector/module.ts deleted file mode 100644 index 99e59e6735..0000000000 --- a/application/client/src/app/ui/elements/color.selector/module.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { NgModule } from '@angular/core'; -import { CommonModule } from '@angular/common'; -import { ComColorSelectorComponent } from './component'; - -@NgModule({ - imports: [CommonModule], - declarations: [ComColorSelectorComponent], - exports: [ComColorSelectorComponent], -}) -export class ColorSelectorModule {} diff --git a/application/client/src/app/ui/elements/color.selector/styles.less b/application/client/src/app/ui/elements/color.selector/styles.less deleted file mode 100644 index a3be53c8e9..0000000000 --- a/application/client/src/app/ui/elements/color.selector/styles.less +++ /dev/null @@ -1,45 +0,0 @@ -@import '../../styles/variables.less'; - -:host { - position: relative; - display: block; - & ul { - position: relative; - padding: 0; - margin: 0; - list-style: none; - & li { - position: relative; - display: inline-block; - padding: 0; - margin: 0 3px; - width: 16px; - list-style: none; - height: 16px; - line-height: 16px; - border: 1px solid rgba(255, 255, 255, 0); - transition: color 150ms ease-in-out; - &:hover { - border: 1px solid var(--scheme-color-0); - } - &.selected { - border: 1px solid var(--scheme-color-0); - &::after { - position: absolute; - content: ''; - top: 0; - left: 0; - width: 0; - height: 0; - border-top: 6px solid var(--scheme-color-0); - border-right: 6px solid transparent; - } - &:hover { - &::after { - display: none; - } - } - } - } - } -} diff --git a/application/client/src/app/ui/elements/color.selector/template.html b/application/client/src/app/ui/elements/color.selector/template.html deleted file mode 100644 index fb7af54d3d..0000000000 --- a/application/client/src/app/ui/elements/color.selector/template.html +++ /dev/null @@ -1,5 +0,0 @@ -
    -
  • -
diff --git a/application/client/src/app/ui/elements/containers/dynamic/component.ts b/application/client/src/app/ui/elements/containers/dynamic/component.ts deleted file mode 100644 index f83c8b4894..0000000000 --- a/application/client/src/app/ui/elements/containers/dynamic/component.ts +++ /dev/null @@ -1,79 +0,0 @@ -/* -src: http://blog.rangle.io/dynamically-creating-components-with-angular-2/ -*/ - -import { Component, Input, ViewContainerRef } from '@angular/core'; -import { setProp } from '@platform/env/obj'; - -export interface IComponentDesc { - factory: any; - inputs?: any; -} - -const CCacheFactoryKey: string = '__dynamic_component_factory_cache_key__'; -const getSequence: () => number = (function () { - let sequence: number = 0; - return () => { - return sequence++; - }; -})(); - -@Component({ - selector: 'lib-containers-dynamic', - template: '', - styles: [':host { display: none; }'], - standalone: false, -}) -export class DynamicComponent { - private _component: any = null; - private _cachedKey: number = -1; - - @Input() detectChanges = true; - @Input() alwaysDrop = false; - - @Input() set component(desc: IComponentDesc) { - if (this._component) { - const cacheKey: number | undefined = this._getKey(desc.factory); - // Component already was created - if (!this.alwaysDrop && this._cachedKey === cacheKey) { - // No need to recreate component. Update inputs - Object.keys(desc.inputs).forEach((key: string) => { - this._component.instance[key] = desc.inputs[key]; - }); - this._component.hostView.detectChanges(); - return; - } else { - this._component.destroy(); - this.viewContainerRef.remove(); - this._component = undefined; - } - } - if (typeof desc !== 'object' || desc === null || desc === undefined) { - return; - } - if (desc.factory === undefined) { - return; - } - if (desc.inputs === undefined) { - desc.inputs = {}; - } - const component = this.viewContainerRef.createComponent(desc.factory); - Object.keys(desc.inputs).forEach((inputName) => { - setProp(component.instance, inputName, desc.inputs[inputName]); - }); - this._component = component; - } - - private _getKey(factory: any): number | undefined { - if ((typeof factory !== 'object' || factory === null) && typeof factory !== 'function') { - return undefined; - } - if (typeof factory[CCacheFactoryKey] === 'number') { - return factory[CCacheFactoryKey]; - } - factory[CCacheFactoryKey] = getSequence(); - return undefined; - } - - constructor(private viewContainerRef: ViewContainerRef) {} -} diff --git a/application/client/src/app/ui/elements/containers/frame/component.ts b/application/client/src/app/ui/elements/containers/frame/component.ts deleted file mode 100644 index 0f7d860748..0000000000 --- a/application/client/src/app/ui/elements/containers/frame/component.ts +++ /dev/null @@ -1,40 +0,0 @@ -import { Component, ChangeDetectorRef, AfterViewInit, Input } from '@angular/core'; -import { IComponentDesc } from '../dynamic/component'; - -export interface IFrameOptions { - onClose?: (...args: any[]) => any; - closable?: boolean; - caption?: string; - style: { [key: string]: string }; -} - -export { IComponentDesc }; - -@Component({ - selector: 'lib-containers-frame', - templateUrl: './template.html', - styleUrls: ['./styles.less'], - standalone: false, -}) -export class FrameComponent implements AfterViewInit { - @Input() public content!: IComponentDesc; - @Input() public options: IFrameOptions = { style: {} }; - - constructor(private _cdRef: ChangeDetectorRef) {} - - ngAfterViewInit() { - if (typeof this.options.closable !== 'boolean') { - this.options.closable = true; - } - if (typeof this.options.caption !== 'string') { - this.options.caption = ''; - } - this._cdRef.detectChanges(); - } - - public _ng_onClose() { - if (typeof this.options.onClose === 'function') { - this.options.onClose(); - } - } -} diff --git a/application/client/src/app/ui/elements/containers/frame/styles.less b/application/client/src/app/ui/elements/containers/frame/styles.less deleted file mode 100644 index b9f469ae3f..0000000000 --- a/application/client/src/app/ui/elements/containers/frame/styles.less +++ /dev/null @@ -1,61 +0,0 @@ -@import '../../../styles/variables.less'; -@import '../../../styles/support.less'; -@import '../../../styles/borders.less'; - -:host { - position: relative; - display: block; - box-sizing: border-box; - height: 100%; - width: auto; - & div.frame-holder { - position: relative; - display: block; - background: var(--scheme-color-5); - overflow: hidden; - box-shadow: 0 0 0.5rem rgba(0, 0, 0, 0.4); - height: 100%; - width: auto; - border-radius: 3px; - .border-based-5; - & div.caption-holder { - position: absolute; - top: 0; - left: 0; - height: @status-bar-height; - width: 100%; - overflow: hidden; - background: var(--scheme-color-2-lighten-5); - & p.caption { - position: absolute; - display: block; - height: 100%; - top: 0; - left: 0; - right: @status-bar-height; - font-size: 0.75rem; - color: var(--scheme-color-1); - padding: 0.15rem 0.5rem; - } - & span.close-button { - position: absolute; - display: block; - top: 0; - right: 0; - width: @status-bar-height; - height: 100%; - cursor: pointer; - font-size: 0.75rem; - text-align: center; - padding-top: 0.3rem; - } - } - & div.content-holder { - position: relative; - width: auto; - height: auto; - margin-top: @status-bar-height; - overflow: auto; - } - } -} diff --git a/application/client/src/app/ui/elements/containers/frame/template.html b/application/client/src/app/ui/elements/containers/frame/template.html deleted file mode 100644 index 86849b611b..0000000000 --- a/application/client/src/app/ui/elements/containers/frame/template.html +++ /dev/null @@ -1,9 +0,0 @@ -
-
-

{{options.caption}}

- -
-
- -
-
\ No newline at end of file diff --git a/application/client/src/app/ui/elements/containers/module.ts b/application/client/src/app/ui/elements/containers/module.ts deleted file mode 100644 index ed7becdd43..0000000000 --- a/application/client/src/app/ui/elements/containers/module.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { NgModule } from '@angular/core'; -import { CommonModule } from '@angular/common'; - -import { DynamicComponent } from './dynamic/component'; -import { FrameComponent } from './frame/component'; - -@NgModule({ - imports: [CommonModule], - declarations: [DynamicComponent, FrameComponent], - exports: [DynamicComponent, FrameComponent], -}) -export class ContainersModule {} diff --git a/application/client/src/app/ui/elements/editable/component.ts b/application/client/src/app/ui/elements/editable/component.ts deleted file mode 100644 index ce2cde92cd..0000000000 --- a/application/client/src/app/ui/elements/editable/component.ts +++ /dev/null @@ -1,75 +0,0 @@ -import { - HostListener, - Component, - Input, - Output, - ChangeDetectorRef, - ViewChild, - EventEmitter, -} from '@angular/core'; -import { Ilc, IlcInterface } from '@env/decorators/component'; -import { Initial } from '@env/decorators/initial'; -import { ChangesDetector } from '@ui/env/extentions/changes'; -import { MatInput } from '@angular/material/input'; - -import * as dom from '@ui/env/dom'; - -@Component({ - selector: 'app-editable-field', - templateUrl: './template.html', - styleUrls: ['./styles.less'], - standalone: false, -}) -@Initial() -@Ilc() -export class Field extends ChangesDetector { - @Input() public placeholder!: string; - @Input() public value!: string; - @Input() public caption!: string; - @Output() public changed: EventEmitter = new EventEmitter(); - @Output() public canceled: EventEmitter = new EventEmitter(); - @Output() public edit: EventEmitter = new EventEmitter(); - - @ViewChild(MatInput) _inputRefCom!: MatInput; - - @HostListener('click', ['$event']) onClick(event: MouseEvent) { - this.editable = true; - this.prev = this.value; - this.detectChanges(); - if (this._inputRefCom !== undefined) { - this._inputRefCom.focus(); - } - this.edit.emit(); - return dom.stop(event); - } - - public editable: boolean = false; - protected prev: string = ''; - - constructor(cdRef: ChangeDetectorRef) { - super(cdRef); - } - - public onKeyUp(event: KeyboardEvent) { - if (['Escape', 'Enter'].indexOf(event.code) === -1) { - return; - } - this.editable = false; - this.detectChanges(); - switch (event.code) { - case 'Escape': - this.value = this.prev; - this.canceled.emit(); - break; - case 'Enter': - this.changed.emit(this.value); - break; - } - } - - public onBlur() { - this.editable = false; - this.detectChanges(); - } -} -export interface Field extends IlcInterface {} diff --git a/application/client/src/app/ui/elements/editable/module.ts b/application/client/src/app/ui/elements/editable/module.ts deleted file mode 100644 index eb965e16a4..0000000000 --- a/application/client/src/app/ui/elements/editable/module.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { NgModule } from '@angular/core'; -import { CommonModule } from '@angular/common'; -import { MatInputModule } from '@angular/material/input'; -import { FormsModule, ReactiveFormsModule } from '@angular/forms'; - -import { Field } from './component'; - -@NgModule({ - imports: [CommonModule, MatInputModule, FormsModule, ReactiveFormsModule], - declarations: [Field], - exports: [Field], -}) -export class EditableModule {} diff --git a/application/client/src/app/ui/elements/editable/styles.less b/application/client/src/app/ui/elements/editable/styles.less deleted file mode 100644 index 4a7e6eda27..0000000000 --- a/application/client/src/app/ui/elements/editable/styles.less +++ /dev/null @@ -1,28 +0,0 @@ -@import '../../styles/variables.less'; - -:host { - position: relative; - display: block; - height: 20px; - & span { - flex: auto; - white-space: nowrap; - overflow: hidden; - text-overflow: ellipsis; - padding-left: 6px; - color: var(--scheme-color-0); - cursor: default; - } - & input { - width: ~"calc(100% - 16px)"; - margin: 0 8px; - padding: 0; - border: none; - border-bottom: dashed 1px var(--scheme-color-1); - flex: auto; - white-space: nowrap; - color: var(--scheme-color-0); - background: none; - outline: none; - } -} diff --git a/application/client/src/app/ui/elements/editable/template.html b/application/client/src/app/ui/elements/editable/template.html deleted file mode 100644 index 9597f65f47..0000000000 --- a/application/client/src/app/ui/elements/editable/template.html +++ /dev/null @@ -1,7 +0,0 @@ -{{caption}} - \ No newline at end of file diff --git a/application/client/src/app/ui/elements/filter.hidden/component.ts b/application/client/src/app/ui/elements/filter.hidden/component.ts deleted file mode 100644 index ece483fcc5..0000000000 --- a/application/client/src/app/ui/elements/filter.hidden/component.ts +++ /dev/null @@ -1,30 +0,0 @@ -import { Component, OnDestroy, ChangeDetectorRef, AfterContentInit } from '@angular/core'; -import { Ilc, IlcInterface } from '@env/decorators/component'; -import { Initial } from '@env/decorators/initial'; -import { ChangesDetector } from '@ui/env/extentions/changes'; -import { Filter } from '@ui/env/entities/filter'; - -@Component({ - selector: 'app-filter-hidden', - templateUrl: './template.html', - styleUrls: ['./styles.less'], - standalone: false, -}) -@Initial() -@Ilc() -export class HiddenFilter extends ChangesDetector implements AfterContentInit, OnDestroy { - public filter!: Filter; - - constructor(cdRef: ChangeDetectorRef) { - super(cdRef); - } - - public ngOnDestroy(): void { - this.filter.destroy(); - } - - public ngAfterContentInit(): void { - this.filter = new Filter(this.ilc()).bind(); - } -} -export interface HiddenFilter extends IlcInterface {} diff --git a/application/client/src/app/ui/elements/filter.hidden/module.ts b/application/client/src/app/ui/elements/filter.hidden/module.ts deleted file mode 100644 index 700927ad41..0000000000 --- a/application/client/src/app/ui/elements/filter.hidden/module.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { NgModule } from '@angular/core'; -import { CommonModule } from '@angular/common'; - -import { HiddenFilter } from './component'; -export { HiddenFilter } from './component'; - -@NgModule({ - imports: [CommonModule], - declarations: [HiddenFilter], - exports: [HiddenFilter], -}) -export class HiddenFilterModule {} diff --git a/application/client/src/app/ui/elements/filter.hidden/styles.less b/application/client/src/app/ui/elements/filter.hidden/styles.less deleted file mode 100644 index a883c99f48..0000000000 --- a/application/client/src/app/ui/elements/filter.hidden/styles.less +++ /dev/null @@ -1,16 +0,0 @@ -@import '../../styles/variables.less'; - -:host { - position: fixed; - display: block; - top: 12px; - right: 12px; - z-index: 1000; - & div.filter { - position: absolute; - padding: 6px 12px; - background: var(--scheme-color-warning-light); - box-shadow: 3px 3px 3px rgb(0 0 0 / 40%); - border-radius: 3px; - } -} diff --git a/application/client/src/app/ui/elements/filter.hidden/template.html b/application/client/src/app/ui/elements/filter.hidden/template.html deleted file mode 100644 index f43abe5c65..0000000000 --- a/application/client/src/app/ui/elements/filter.hidden/template.html +++ /dev/null @@ -1,3 +0,0 @@ - -
{{filter.value()}}
-
\ No newline at end of file diff --git a/application/client/src/app/ui/elements/filter/component.ts b/application/client/src/app/ui/elements/filter/component.ts deleted file mode 100644 index 1a1e1fc97c..0000000000 --- a/application/client/src/app/ui/elements/filter/component.ts +++ /dev/null @@ -1,61 +0,0 @@ -import { - Component, - Input, - ChangeDetectorRef, - AfterContentInit, - ViewChild, - ElementRef, - AfterViewInit, - OnDestroy, -} from '@angular/core'; -import { Ilc, IlcInterface } from '@env/decorators/component'; -import { Initial } from '@env/decorators/initial'; -import { ChangesDetector } from '@ui/env/extentions/changes'; -import { Filter } from './filter'; -import { FilterInput } from './input'; - -@Component({ - selector: 'app-filter-input', - templateUrl: './template.html', - styleUrls: ['./styles.less'], - standalone: false, -}) -@Initial() -@Ilc() -export class InputFilter - extends ChangesDetector - implements AfterContentInit, AfterViewInit, OnDestroy -{ - @Input() public filter!: Filter; - @ViewChild('filterinput') filterInputRef!: ElementRef; - - public input!: FilterInput; - - constructor(cdRef: ChangeDetectorRef) { - super(cdRef); - } - - public ngOnDestroy(): void { - this.filter.destroy(); - } - - public ngAfterContentInit(): void { - this.input = new FilterInput(this.filter); - } - - public ngAfterViewInit(): void { - this.filter.bind(this.filterInputRef.nativeElement); - } - - public focus(): void { - if (this.filterInputRef === undefined) { - return; - } - this.filterInputRef.nativeElement.focus(); - } - - public getInputElementRef(): HTMLInputElement | undefined { - return this.filterInputRef !== undefined ? this.filterInputRef.nativeElement : undefined; - } -} -export interface InputFilter extends IlcInterface {} diff --git a/application/client/src/app/ui/elements/filter/filter.ts b/application/client/src/app/ui/elements/filter/filter.ts deleted file mode 100644 index 02f3f63db3..0000000000 --- a/application/client/src/app/ui/elements/filter/filter.ts +++ /dev/null @@ -1,72 +0,0 @@ -import { IlcInterface } from '@service/ilc'; -import { Subject, Subjects } from '@platform/env/subscription'; - -export type Handler = () => void; - -export interface Options { - clearOnEscape?: boolean; - clearOnEnter?: boolean; - placeholder: string; -} - -export class Filter { - public readonly options: Options; - public readonly subjects: Subjects<{ - change: Subject; - drop: Subject; - enter: Subject; - focus: Subject; - blur: Subject; - up: Subject; - down: Subject; - }> = new Subjects({ - change: new Subject(), - drop: new Subject(), - enter: new Subject(), - focus: new Subject(), - blur: new Subject(), - up: new Subject(), - down: new Subject(), - }); - private _element!: HTMLInputElement | undefined; - - constructor(ilc: IlcInterface, options: Options) { - ilc.life().destroy(() => { - this.subjects.destroy(); - }); - this.options = options; - } - - public destroy() { - this.subjects.destroy(); - } - - public bind(element: HTMLInputElement | undefined): Filter { - element !== undefined && (this._element = element); - return this; - } - - public focus() { - this._element !== undefined && this._element.focus(); - } - - public value(): string | undefined { - return this._element !== undefined ? this._element.value : undefined; - } - - public defaults(): { - clearOnEscape(): boolean; - clearOnEnter(): boolean; - } { - return { - clearOnEscape: (): boolean => { - return this.options.clearOnEscape !== undefined - ? this.options.clearOnEscape - : false; - }, - clearOnEnter: (): boolean => { - return this.options.clearOnEnter !== undefined ? this.options.clearOnEnter : false; - }, - }; - } -} diff --git a/application/client/src/app/ui/elements/filter/input.ts b/application/client/src/app/ui/elements/filter/input.ts deleted file mode 100644 index ca9da2c1a1..0000000000 --- a/application/client/src/app/ui/elements/filter/input.ts +++ /dev/null @@ -1,68 +0,0 @@ -import { UntypedFormControl } from '@angular/forms'; -import { Filter } from './filter'; - -import * as dom from '@ui/env/dom'; - -export class FilterInput { - public control: UntypedFormControl = new UntypedFormControl(); - protected filter: Filter; - - constructor(filter: Filter) { - this.filter = filter; - } - - public isEmpty(): boolean { - return this._safe().trim() === ''; - } - - public keyup(event: KeyboardEvent) { - if (event.key === 'Escape' && this.filter.defaults().clearOnEscape()) { - this.drop(); - return true; - } - if (event.key === 'Enter' && this.filter.defaults().clearOnEnter()) { - this.filter.subjects.get().enter.emit(this._safe()); - this.drop(); - return true; - } - if (event.key === 'ArrowUp') { - this.filter.subjects.get().up.emit(); - dom.stop(event); - return false; - } - if (event.key === 'ArrowDown') { - this.filter.subjects.get().down.emit(); - dom.stop(event); - return false; - } - this.filter.subjects.get().change.emit(this._safe()); - return true; - } - - public drop() { - this.control.setValue(''); - this.filter.subjects.get().drop.emit(); - this.filter.subjects.get().change.emit(''); - } - - public set(value: string) { - this.control.setValue(value); - this.filter.subjects.get().change.emit(value); - } - - public get(): string { - return this._safe(); - } - - public onFocus() { - this.filter.subjects.get().focus.emit(); - } - - public onBlur() { - this.filter.subjects.get().blur.emit(); - } - - private _safe(): string { - return typeof this.control.value !== 'string' ? '' : this.control.value; - } -} diff --git a/application/client/src/app/ui/elements/filter/module.ts b/application/client/src/app/ui/elements/filter/module.ts deleted file mode 100644 index 6a73442056..0000000000 --- a/application/client/src/app/ui/elements/filter/module.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { NgModule } from '@angular/core'; -import { CommonModule } from '@angular/common'; -import { MatFormFieldModule } from '@angular/material/form-field'; -import { MatInputModule } from '@angular/material/input'; -import { FormsModule, ReactiveFormsModule } from '@angular/forms'; - -import { InputFilter } from './component'; - -@NgModule({ - imports: [CommonModule, MatFormFieldModule, MatInputModule, FormsModule, ReactiveFormsModule], - declarations: [InputFilter], - exports: [InputFilter], -}) -export class FilterInputModule {} diff --git a/application/client/src/app/ui/elements/filter/styles.less b/application/client/src/app/ui/elements/filter/styles.less deleted file mode 100644 index 769bf5875b..0000000000 --- a/application/client/src/app/ui/elements/filter/styles.less +++ /dev/null @@ -1,12 +0,0 @@ -@import '../../styles/variables.less'; - -:host { - position: relative; - display: flex; - flex: auto; - height: 32px; - width: 100%; - background: var(--scheme-color-5); - overflow: hidden; - align-items: center; -} diff --git a/application/client/src/app/ui/elements/filter/template.html b/application/client/src/app/ui/elements/filter/template.html deleted file mode 100644 index eba63d3328..0000000000 --- a/application/client/src/app/ui/elements/filter/template.html +++ /dev/null @@ -1,14 +0,0 @@ - - - \ No newline at end of file diff --git a/application/client/src/app/ui/elements/folderinput/component.ts b/application/client/src/app/ui/elements/folderinput/component.ts deleted file mode 100644 index c794f16fbf..0000000000 --- a/application/client/src/app/ui/elements/folderinput/component.ts +++ /dev/null @@ -1,143 +0,0 @@ -import { - Component, - ChangeDetectorRef, - Input, - ViewChild, - ElementRef, - AfterContentInit, - AfterViewInit, - EventEmitter, - Output, - ViewEncapsulation, - ChangeDetectionStrategy, - OnDestroy, -} from '@angular/core'; -import { DomSanitizer, SafeHtml } from '@angular/platform-browser'; -import { Ilc, IlcInterface } from '@env/decorators/component'; -import { ChangesDetector } from '@ui/env/extentions/changes'; -import { MatAutocompleteTrigger } from '@angular/material/autocomplete'; -import { Controll } from './input'; -import { FoldersList } from './folders'; -import { ErrorState } from './error'; - -interface Options { - placeholder: string; - label?: string; - defaults: string; - passive: boolean; -} - -export { ErrorState, Options }; - -@Component({ - selector: 'app-folderinput-input', - templateUrl: './template.html', - styleUrls: ['./styles.less'], - changeDetection: ChangeDetectionStrategy.OnPush, - encapsulation: ViewEncapsulation.None, - standalone: false, -}) -@Ilc() -export class FolderInput - extends ChangesDetector - implements OnDestroy, AfterContentInit, AfterViewInit -{ - @Input() public options!: Options; - - @Output() public edit: EventEmitter = new EventEmitter(); - @Output() public enter: EventEmitter = new EventEmitter(); - @Output() public panel: EventEmitter = new EventEmitter(); - - @ViewChild('input') inputRef!: ElementRef; - @ViewChild('input', { read: MatAutocompleteTrigger }) panelRef!: MatAutocompleteTrigger; - - public control!: Controll; - public folders!: FoldersList; - public error: ErrorState = new ErrorState(); - - constructor(cdRef: ChangeDetectorRef, private _sanitizer: DomSanitizer) { - super(cdRef); - } - - public ngOnDestroy(): void { - this.control.destroy(); - } - - public ngAfterContentInit(): void { - this.control = new Controll(); - this.folders = new FoldersList(this.control.control); - this.control.set(this.options.defaults); - this.env().subscriber.register( - this.control.actions.edit.subscribe((value: string) => { - this.edit.emit(value); - this.detectChanges(); - }), - this.control.actions.enter.subscribe((value: string) => { - this.enter.emit(value); - this.detectChanges(); - }), - this.control.actions.panel.subscribe((opened: boolean) => { - this.panel.emit(opened); - this.detectChanges(); - }), - this.error.subject.subscribe(() => { - this.edit.emit(this.control.value); - this.detectChanges(); - }), - ); - } - - public ngAfterViewInit(): void { - this.control.bind(this.inputRef.nativeElement, this.panelRef); - } - - public disable(): FolderInput { - this.control.disable(); - this.detectChanges(); - return this; - } - - public enable(): FolderInput { - this.control.enable(); - this.detectChanges(); - return this; - } - - public set(value: string): FolderInput { - this.control.set(value); - this.folders.setParent(); - this.detectChanges(); - return this; - } - - public focus(): FolderInput { - this.inputRef.nativeElement.focus(); - return this; - } - - public select() { - this.ilc() - .services.system.bridge.folders() - .select() - .then((paths: string[]) => { - if (paths.length !== 1) { - return; - } - this.set(paths[0]); - }); - } - - public home() { - this.ilc() - .services.system.bridge.os() - .homedir() - .then((path: string) => { - this.set(path); - }); - } - - public safeHtml(html: string): SafeHtml { - return this._sanitizer.bypassSecurityTrustHtml(html); - } -} -export interface FolderInput extends IlcInterface {} diff --git a/application/client/src/app/ui/elements/folderinput/error.ts b/application/client/src/app/ui/elements/folderinput/error.ts deleted file mode 100644 index 10a1d2cdb6..0000000000 --- a/application/client/src/app/ui/elements/folderinput/error.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { ErrorStateMatcher } from '@angular/material/core'; -import { Subject } from '@platform/env/subscription'; -import { UntypedFormControl } from '@angular/forms'; -import { bridge } from '@service/bridge'; -import { scope } from '@platform/env/scope'; - -export class ErrorState extends ErrorStateMatcher { - public subject: Subject = new Subject(); - protected exist: boolean = false; - protected value: string = ''; - - public override isErrorState(control: UntypedFormControl | null): boolean { - if (control !== null && typeof control.value === 'string') { - const updated = this.value !== control.value; - this.value = control.value; - updated && - this.check().catch((err: Error) => { - scope - .getLogger(`ErrorState (FolderInput)`) - .error(`Fail to check path: ${err.message}`); - }); - } - return this.is(); - } - - public is(): boolean { - return !this.exist; - } - - public async check(): Promise { - if (this.value.trim() === '') { - this.exist = false; - } else { - this.exist = await bridge.files().exists(this.value); - } - this.subject.emit(); - } -} diff --git a/application/client/src/app/ui/elements/folderinput/folder.ts b/application/client/src/app/ui/elements/folderinput/folder.ts deleted file mode 100644 index a5cdbe4994..0000000000 --- a/application/client/src/app/ui/elements/folderinput/folder.ts +++ /dev/null @@ -1,34 +0,0 @@ -import { Matchee } from '@module/matcher'; -import { getFileName } from '@platform/types/files'; - -import * as wasm from '@loader/wasm'; - -export class Folder extends Matchee { - public readonly path: string; - public readonly parent: string; - - protected readonly delimiter: string; - - constructor(parent: string, path: string, delimiter: string, matcher: wasm.Matcher) { - super(matcher, { - name: getFileName(path), - }); - this.parent = parent; - this.path = path; - this.delimiter = delimiter; - } - - public html(): string { - const name: string | undefined = this.getHtmlOf('html_name'); - if (name === undefined) { - return this.path; - } else { - const endsWithDelimiter = this.parent.endsWith(this.delimiter); - return `${this.parent}${endsWithDelimiter ? '' : this.delimiter}${name}`; - } - } - - public hash(): string { - return this.path; - } -} diff --git a/application/client/src/app/ui/elements/folderinput/folders.ts b/application/client/src/app/ui/elements/folderinput/folders.ts deleted file mode 100644 index 0185573573..0000000000 --- a/application/client/src/app/ui/elements/folderinput/folders.ts +++ /dev/null @@ -1,111 +0,0 @@ -import { Observable } from 'rxjs'; -import { map, startWith } from 'rxjs/operators'; -import { UntypedFormControl } from '@angular/forms'; -import { SetupLogger, LoggerInterface } from '@platform/entity/logger'; -import { bridge } from '@service/bridge'; -import { Folder } from './folder'; -import { Holder } from '@module/matcher/holder'; - -@SetupLogger() -export class FoldersList extends Holder { - public items: Folder[] = []; - public parent: string = '/'; - public observer!: Observable; - - protected readonly control: UntypedFormControl; - protected previous: string = ''; - protected delimiter: string = ''; - - constructor(control: UntypedFormControl) { - super(); - this.control = control; - this.setLoggerName(`FolderListController`); - this.assign(); - bridge - .folders() - .delimiter() - .then((delimiter) => { - this.delimiter = delimiter; - }) - .catch((err: Error) => { - this.log().error(`Fail to request delimiter: ${err.message}`); - }); - } - - public setParent() { - this.update(); - } - - protected assign() { - this.observer = this.control.valueChanges.pipe( - startWith(''), - map((_updated: string) => { - this.update().catch((err: Error) => { - this.log().error(err.message); - }); - return this.items.sort((a: Folder, b: Folder) => b.getScore() - a.getScore()); - }), - ); - } - - protected async update(): Promise { - const candidate = this.control.value; - if (typeof candidate !== 'string') { - return Promise.resolve(); - } - await this.candidate(candidate); - if (this.parent.trim() === '') { - this.items = []; - return Promise.resolve(); - } - if (this.parent.trim() === '') { - this.items = []; - return Promise.resolve(); - } - if (this.previous === this.parent) { - return Promise.resolve(); - } - const target = this.parent; - this.items = await ( - await bridge.folders().ls([target]) - ).map((i) => new Folder(target, i, this.delimiter, this.matcher)); - this.previous = target; - this.assign(); - } - - protected async candidate(candidate: string): Promise { - async function suggest(candidate: string, current: string): Promise { - if (candidate === current) { - return Promise.resolve(candidate); - } - if (candidate === '.' || candidate.trim() === '') { - return Promise.resolve(''); - } - if (await bridge.files().exists(candidate)) { - return Promise.resolve(candidate); - } - return Promise.resolve(undefined); - } - const finish = (parent: string, query: string | undefined) => { - this.matcher.search(query === undefined ? '' : query); - this.parent = parent; - }; - const info = candidate.trim() === '' ? undefined : await bridge.files().name(candidate); - let suggestion = await suggest(candidate, this.parent); - if (suggestion !== undefined) { - finish(suggestion, info?.name); - return Promise.resolve(); - } - if (info === undefined) { - return Promise.resolve(); - } - suggestion = await suggest(info.parent, this.parent); - if (suggestion !== undefined) { - finish(suggestion, info.name); - } else { - finish('', ''); - } - return Promise.resolve(); - } -} -export interface FoldersList extends LoggerInterface {} diff --git a/application/client/src/app/ui/elements/folderinput/input.ts b/application/client/src/app/ui/elements/folderinput/input.ts deleted file mode 100644 index 11e1181d03..0000000000 --- a/application/client/src/app/ui/elements/folderinput/input.ts +++ /dev/null @@ -1,96 +0,0 @@ -import { UntypedFormControl } from '@angular/forms'; -import { Subject } from '@platform/env/subscription'; -import { - MatAutocompleteTrigger, - MatAutocompleteSelectedEvent, -} from '@angular/material/autocomplete'; - -export class Controll { - public control: UntypedFormControl = new UntypedFormControl(); - public ref!: HTMLInputElement; - public value: string = ''; - public readonly: boolean = false; - public focused: boolean = false; - public recent: boolean = false; - - public actions: { - edit: Subject; - enter: Subject; - panel: Subject; - } = { - edit: new Subject(), - enter: new Subject(), - panel: new Subject(), - }; - private _panel!: MatAutocompleteTrigger; - - public destroy() { - this.actions.enter.destroy(); - this.actions.edit.destroy(); - this.actions.panel.destroy(); - } - - public bind(ref: HTMLInputElement, panel: MatAutocompleteTrigger) { - this.ref = ref; - this._panel = panel; - } - - public isEmpty(): boolean { - return this.value.trim() === ''; - } - - public keyup(event: KeyboardEvent) { - if (event.key === 'Escape') { - this.recent = false; - if (this.control.value.trim() !== '') { - this.drop(); - } - } else if (event.key === 'Enter') { - if (this.recent) { - this.recent = false; - this._panel.closePanel(); - this.actions.panel.emit(false); - } - this.actions.enter.emit(this.value); - } else if (event.key === 'ArrowUp' || event.key === 'ArrowDown') { - if (!this.recent) { - this.recent = true; - this._panel.openPanel(); - this.actions.panel.emit(true); - } - } else if (this.control.value !== '' && !this.recent) { - this.recent = true; - this._panel.openPanel(); - this.actions.panel.emit(true); - } - this.value = this.control.value; - this.actions.edit.emit(this.value); - } - - public drop() { - this.control.setValue(''); - this.value = ''; - } - - public set(value: string) { - this.control.setValue(value); - this.value = this.control.value; - this.actions.edit.emit(this.value); - } - - public onPanelClosed() { - this.recent = false; - } - - public selected(event: MatAutocompleteSelectedEvent) { - this.set(event.option.value); - } - - public disable(): void { - this.control.disable(); - } - - public enable(): void { - this.control.enable(); - } -} diff --git a/application/client/src/app/ui/elements/folderinput/module.ts b/application/client/src/app/ui/elements/folderinput/module.ts deleted file mode 100644 index 6a14b90fef..0000000000 --- a/application/client/src/app/ui/elements/folderinput/module.ts +++ /dev/null @@ -1,26 +0,0 @@ -import { NgModule } from '@angular/core'; -import { CommonModule } from '@angular/common'; -import { FormsModule, ReactiveFormsModule } from '@angular/forms'; -import { MatIconModule } from '@angular/material/icon'; -import { MatFormFieldModule } from '@angular/material/form-field'; -import { MatInputModule } from '@angular/material/input'; -import { MatAutocompleteModule } from '@angular/material/autocomplete'; -import { MatOptionModule } from '@angular/material/core'; - -import { FolderInput } from './component'; - -@NgModule({ - imports: [ - CommonModule, - FormsModule, - ReactiveFormsModule, - MatIconModule, - MatFormFieldModule, - MatInputModule, - MatAutocompleteModule, - MatOptionModule, - ], - declarations: [FolderInput], - exports: [FolderInput] -}) -export class FolderInputModule {} diff --git a/application/client/src/app/ui/elements/folderinput/styles.less b/application/client/src/app/ui/elements/folderinput/styles.less deleted file mode 100644 index 9d6184a845..0000000000 --- a/application/client/src/app/ui/elements/folderinput/styles.less +++ /dev/null @@ -1,21 +0,0 @@ -@import '../../styles/variables.less'; - - -app-folderinput-input { - position: relative; - display: flex; - flex-direction: row; - align-items:flex-start; - width: 100%; - margin-bottom: 12px; - & span.label { - color: var(--scheme-color-2); - white-space: nowrap; - margin: 0 6px 0 0; - } - - & span.codicon-home { - margin-left: 12px; - } - -} \ No newline at end of file diff --git a/application/client/src/app/ui/elements/folderinput/template.html b/application/client/src/app/ui/elements/folderinput/template.html deleted file mode 100644 index 0764f7f904..0000000000 --- a/application/client/src/app/ui/elements/folderinput/template.html +++ /dev/null @@ -1,35 +0,0 @@ - - {{options.label}} - - Doesn't exist - - - - - - - - \ No newline at end of file diff --git a/application/client/src/app/ui/elements/locks.history/component.ts b/application/client/src/app/ui/elements/locks.history/component.ts deleted file mode 100644 index 37e808b287..0000000000 --- a/application/client/src/app/ui/elements/locks.history/component.ts +++ /dev/null @@ -1,47 +0,0 @@ -import { - Component, - ChangeDetectorRef, - AfterContentInit, - Input, - AfterViewInit, -} from '@angular/core'; -import { Ilc, IlcInterface } from '@env/decorators/component'; -import { ChangesDetector } from '@ui/env/extentions/changes'; -import { Initial } from '@env/decorators/initial'; -import { Locker } from '@ui/service/lockers'; - -@Component({ - selector: 'app-elements-locks-history', - templateUrl: './template.html', - styleUrls: ['./styles.less'], - standalone: false, -}) -@Initial() -@Ilc() -export class LocksHistory extends ChangesDetector implements AfterContentInit, AfterViewInit { - @Input() group!: string; - - public lockers: Locker[] = []; - - constructor(cdRef: ChangeDetectorRef) { - super(cdRef); - } - - public ngAfterContentInit(): void { - this.env().subscriber.register( - this.ilc().services.ui.lockers.unbound.subscribe(() => { - this.load(); - }), - ); - } - - public ngAfterViewInit(): void { - this.load(); - } - - protected load() { - this.lockers = this.ilc().services.ui.lockers.get(this.group); - this.detectChanges(); - } -} -export interface LocksHistory extends IlcInterface {} diff --git a/application/client/src/app/ui/elements/locks.history/entry/component.ts b/application/client/src/app/ui/elements/locks.history/entry/component.ts deleted file mode 100644 index 8cfa1519f7..0000000000 --- a/application/client/src/app/ui/elements/locks.history/entry/component.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { Component, Input } from '@angular/core'; -import { Ilc, IlcInterface } from '@env/decorators/component'; -import { Locker, Level } from '@ui/service/lockers'; - -@Component({ - selector: 'app-elements-locks-history-entry', - templateUrl: './template.html', - styleUrls: ['./styles.less'], - standalone: false, -}) -@Ilc() -export class LocksHistoryEntry { - @Input() locker!: Locker; - - public get Level(): typeof Level { - return Level; - } -} -export interface LocksHistoryEntry extends IlcInterface {} diff --git a/application/client/src/app/ui/elements/locks.history/entry/styles.less b/application/client/src/app/ui/elements/locks.history/entry/styles.less deleted file mode 100644 index dc3ed2e7e6..0000000000 --- a/application/client/src/app/ui/elements/locks.history/entry/styles.less +++ /dev/null @@ -1,35 +0,0 @@ -@import '../../../styles/variables.less'; - -:host{ - position: relative; - display: flex; - width: 100%; - flex-direction: row; - padding: 6px 0 12px 0; - border-bottom: thin dotted var(--scheme-color-4); - &:last-child { - border-bottom: none; - } - & mat-icon { - padding-right: 24px; - font-size: 18px; - height: 18px; - width: 18px; - margin-top: 15px; - &[data-type="error"] { - color: var(--scheme-color-error-light); - } - &[data-type="warning"] { - color: var(--scheme-color-warning-light); - } - } - & div p { - color: var(--scheme-color-2); - &.time { - font-size: 10px; - color: var(--scheme-color-2); - text-align: right; - } - } - -} \ No newline at end of file diff --git a/application/client/src/app/ui/elements/locks.history/entry/template.html b/application/client/src/app/ui/elements/locks.history/entry/template.html deleted file mode 100644 index c3bed121ee..0000000000 --- a/application/client/src/app/ui/elements/locks.history/entry/template.html +++ /dev/null @@ -1,7 +0,0 @@ -highlight_off -report_problem -
-

{{locker.getTime()}}

-

{{locker.message}}

-
- diff --git a/application/client/src/app/ui/elements/locks.history/module.ts b/application/client/src/app/ui/elements/locks.history/module.ts deleted file mode 100644 index 627695c261..0000000000 --- a/application/client/src/app/ui/elements/locks.history/module.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { NgModule } from '@angular/core'; -import { CommonModule } from '@angular/common'; -import { MatIconModule } from '@angular/material/icon'; - -import { LocksHistory } from './component'; -import { LocksHistoryEntry } from './entry/component'; - -@NgModule({ - imports: [CommonModule, MatIconModule], - declarations: [LocksHistory, LocksHistoryEntry], - exports: [LocksHistory], -}) -export class LocksHistoryModule {} diff --git a/application/client/src/app/ui/elements/locks.history/styles.less b/application/client/src/app/ui/elements/locks.history/styles.less deleted file mode 100644 index 5a6bac2a0d..0000000000 --- a/application/client/src/app/ui/elements/locks.history/styles.less +++ /dev/null @@ -1,9 +0,0 @@ -@import '../../styles/variables.less'; - -:host{ - position: relative; - display: block; - width: 100%; - height: 100%; - overflow: auto; -} \ No newline at end of file diff --git a/application/client/src/app/ui/elements/locks.history/template.html b/application/client/src/app/ui/elements/locks.history/template.html deleted file mode 100644 index f0ed9c94b1..0000000000 --- a/application/client/src/app/ui/elements/locks.history/template.html +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/application/client/src/app/ui/elements/menu.attachsource/component.ts b/application/client/src/app/ui/elements/menu.attachsource/component.ts deleted file mode 100644 index bc60fe14ea..0000000000 --- a/application/client/src/app/ui/elements/menu.attachsource/component.ts +++ /dev/null @@ -1,94 +0,0 @@ -import { - Component, - Input, - ChangeDetectorRef, - ElementRef, - ViewEncapsulation, - ChangeDetectionStrategy, -} from '@angular/core'; -import { Session } from '@service/session'; -import { Ilc, IlcInterface } from '@env/decorators/component'; -import { ChangesDetector } from '@ui/env/extentions/changes'; - -import * as Factory from '@platform/types/observe/factory'; - -@Component({ - selector: 'app-attach-new-source-menu', - templateUrl: './template.html', - styleUrls: ['./styles.less'], - changeDetection: ChangeDetectionStrategy.OnPush, - encapsulation: ViewEncapsulation.None, - standalone: false, -}) -@Ilc() -export class AttachSourceMenu extends ChangesDetector { - @Input() session!: Session; - - public actions: Array<{ icon: string; title: string; handler: () => void } | null> = [ - { - icon: 'note_add', - title: 'Attach Files', - handler: () => { - throw new Error(`Not implemented!`); - }, - }, - null, - { - icon: 'input', - title: 'Connect TCP', - handler: () => { - this.ilc() - .services.system.session.initialize() - .configure(new Factory.Stream().tcp().get(), this.session); - }, - }, - { - icon: 'input', - title: 'Connect UDP', - handler: () => { - this.ilc() - .services.system.session.initialize() - .configure(new Factory.Stream().udp().get(), this.session); - }, - }, - { - icon: 'settings_input_composite', - title: 'Connect Serial', - handler: () => { - this.ilc() - .services.system.session.initialize() - .configure(new Factory.Stream().serial().get(), this.session); - }, - }, - null, - { - icon: 'minimize', - title: 'Command', - handler: () => { - this.ilc() - .services.system.session.initialize() - .configure(new Factory.Stream().process().get(), this.session); - }, - }, - ]; - - constructor(cdRef: ChangeDetectorRef, private _self: ElementRef) { - super(cdRef); - } - - public attach(): { - disabled(): boolean; - error(): string | undefined; - } { - return { - disabled: (): boolean => { - return this.session.observed.getNewSourceError() instanceof Error; - }, - error: (): string | undefined => { - const error = this.session.observed.getNewSourceError(); - return error instanceof Error ? error.message : undefined; - }, - }; - } -} -export interface AttachSourceMenu extends IlcInterface {} diff --git a/application/client/src/app/ui/elements/menu.attachsource/module.ts b/application/client/src/app/ui/elements/menu.attachsource/module.ts deleted file mode 100644 index 952da46e9b..0000000000 --- a/application/client/src/app/ui/elements/menu.attachsource/module.ts +++ /dev/null @@ -1,22 +0,0 @@ -import { NgModule } from '@angular/core'; -import { CommonModule } from '@angular/common'; -import { ContainersModule } from '@elements/containers/module'; -import { MatButtonModule } from '@angular/material/button'; -import { AttachSourceMenu } from './component'; -import { MatMenuModule } from '@angular/material/menu'; -import { MatIconModule } from '@angular/material/icon'; -import { MatDividerModule } from '@angular/material/divider'; - -@NgModule({ - imports: [ - CommonModule, - ContainersModule, - MatButtonModule, - MatMenuModule, - MatIconModule, - MatDividerModule, - ], - declarations: [AttachSourceMenu], - exports: [AttachSourceMenu], -}) -export class AttachSourceMenuModule {} diff --git a/application/client/src/app/ui/elements/menu.attachsource/styles.less b/application/client/src/app/ui/elements/menu.attachsource/styles.less deleted file mode 100644 index 2f53df613f..0000000000 --- a/application/client/src/app/ui/elements/menu.attachsource/styles.less +++ /dev/null @@ -1,17 +0,0 @@ -@import '../../styles/variables.less'; - -app-attach-new-source-menu { - display: inline-block; -} -p.attach-menu-warning { - padding: 12px 24px; - color: var(--scheme-color-1); -} -div.attach-new-source-menu { - & .mat-icon { - width: 16px; - height: 16px; - font-size: 16px; - color: var(--scheme-color-1); - } -} \ No newline at end of file diff --git a/application/client/src/app/ui/elements/menu.attachsource/template.html b/application/client/src/app/ui/elements/menu.attachsource/template.html deleted file mode 100644 index 0dd71808d3..0000000000 --- a/application/client/src/app/ui/elements/menu.attachsource/template.html +++ /dev/null @@ -1,14 +0,0 @@ - - -

{{attach().error()}}

- - - - - - -
- diff --git a/application/client/src/app/ui/elements/module.ts b/application/client/src/app/ui/elements/module.ts deleted file mode 100644 index 98c01be2e0..0000000000 --- a/application/client/src/app/ui/elements/module.ts +++ /dev/null @@ -1,67 +0,0 @@ -import { NgModule } from '@angular/core'; -import { CommonModule } from '@angular/common'; - -import { AutocompleteModule } from '@elements/autocomplete/module'; -import { ColorSelectorModule } from '@elements/color.selector/module'; -import { ContainersModule } from '@elements/containers/module'; -import { EditableModule } from '@elements/editable/module'; -import { FilterInputModule } from '@elements/filter/module'; -import { HiddenFilterModule } from '@elements/filter.hidden/module'; -import { FolderInputModule } from '@elements/folderinput/module'; -import { LocksHistoryModule } from '@elements/locks.history/module'; -import { AttachSourceMenuModule } from '@elements/menu.attachsource/module'; -import { NavigatorModule } from '@elements/navigator/module'; -import { PairsModule } from '@elements/pairs/module'; -import { RecentActionsModule } from '@elements/recent/module'; -import { ScrollAreaModule } from '@elements/scrollarea/module'; -import { TabsModule } from '@elements/tabs/module'; -import { TeamworkAppletModule } from '@elements/teamwork/module'; -import { TimezoneSelectorModule } from '@elements/timezones/module'; -import { ComTooltipComponent } from '@elements/tooltip/component'; -import { TreeModule } from '@elements/tree/module'; - -@NgModule({ - imports: [ - CommonModule, - ContainersModule, - ScrollAreaModule, - TabsModule, - RecentActionsModule, - TreeModule, - LocksHistoryModule, - AutocompleteModule, - FolderInputModule, - NavigatorModule, - TeamworkAppletModule, - TimezoneSelectorModule, - ColorSelectorModule, - EditableModule, - FilterInputModule, - HiddenFilterModule, - AttachSourceMenuModule, - PairsModule, - ], - declarations: [ComTooltipComponent], - exports: [ - ContainersModule, - ScrollAreaModule, - TabsModule, - RecentActionsModule, - TreeModule, - LocksHistoryModule, - AutocompleteModule, - FolderInputModule, - NavigatorModule, - TeamworkAppletModule, - TimezoneSelectorModule, - ColorSelectorModule, - EditableModule, - FilterInputModule, - HiddenFilterModule, - AttachSourceMenuModule, - PairsModule, - ComTooltipComponent, - ], - bootstrap: [ComTooltipComponent], -}) -export class ElementsModule {} diff --git a/application/client/src/app/ui/elements/navigator/component.ts b/application/client/src/app/ui/elements/navigator/component.ts deleted file mode 100644 index 8cc667853c..0000000000 --- a/application/client/src/app/ui/elements/navigator/component.ts +++ /dev/null @@ -1,85 +0,0 @@ -import { - Component, - AfterViewInit, - AfterContentInit, - ChangeDetectionStrategy, - ChangeDetectorRef, - ViewEncapsulation, - Input, - OnDestroy, - ViewChild, -} from '@angular/core'; -import { Ilc, IlcInterface } from '@env/decorators/component'; -import { Initial } from '@env/decorators/initial'; -import { Entity } from './providers/entity'; -import { ChangesDetector } from '@ui/env/extentions/changes'; -import { State, CloseHandler } from './state'; -import { DomSanitizer, SafeHtml } from '@angular/platform-browser'; -import { InputFilter } from '@elements/filter/component'; -import { Observe } from '@platform/types/observe'; - -@Component({ - selector: 'app-navigator', - templateUrl: './template.html', - styleUrls: ['./styles.less'], - changeDetection: ChangeDetectionStrategy.OnPush, - encapsulation: ViewEncapsulation.None, - standalone: false, -}) -@Initial() -@Ilc() -export class Navigator - extends ChangesDetector - implements AfterViewInit, AfterContentInit, OnDestroy -{ - @ViewChild('filter') public filterInputRef!: InputFilter; - - @Input() close: CloseHandler | undefined; - @Input() public observe?: Observe; - - public state!: State; - - constructor(cdRef: ChangeDetectorRef, private readonly _sanitizer: DomSanitizer) { - super(cdRef); - } - - public ngOnDestroy(): void { - this.state.destroy(); - } - - public ngAfterContentInit(): void { - this.state = new State( - this, - (): HTMLInputElement | undefined => { - this.detectChanges(); - return this.filterInputRef !== undefined - ? this.filterInputRef.getInputElementRef() - : undefined; - }, - this.observe, - ); - this.close !== undefined && this.state.bind(this.close); - } - - public ngAfterViewInit(): void { - this.state.load(); - this.detectChanges(); - } - - public ngItemContextMenu(event: MouseEvent, entity: Entity) { - this.ilc().emitter.ui.contextmenu.open({ - items: this.state.getContextMenu(entity), - x: event.x, - y: event.y, - }); - } - - public ngAction(entity: Entity): void { - this.state.action(entity); - } - - public safeHtml(html: string): SafeHtml { - return this._sanitizer.bypassSecurityTrustHtml(html); - } -} -export interface Navigator extends IlcInterface {} diff --git a/application/client/src/app/ui/elements/navigator/module.ts b/application/client/src/app/ui/elements/navigator/module.ts deleted file mode 100644 index 3b6bdd2edb..0000000000 --- a/application/client/src/app/ui/elements/navigator/module.ts +++ /dev/null @@ -1,24 +0,0 @@ -import { NgModule } from '@angular/core'; -import { CommonModule } from '@angular/common'; -import { ContainersModule } from '@elements/containers/module'; -import { MatButtonModule } from '@angular/material/button'; -import { MatIconModule } from '@angular/material/icon'; -import { MatProgressBarModule } from '@angular/material/progress-bar'; -import { FilterInputModule } from '@elements/filter/module'; - -import { Navigator } from './component'; - -@NgModule({ - imports: [ - CommonModule, - ContainersModule, - MatButtonModule, - MatIconModule, - FilterInputModule, - MatProgressBarModule, - ], - declarations: [Navigator], - exports: [Navigator], - bootstrap: [Navigator], -}) -export class NavigatorModule {} diff --git a/application/client/src/app/ui/elements/navigator/providers/entity.ts b/application/client/src/app/ui/elements/navigator/providers/entity.ts deleted file mode 100644 index 295be5ac32..0000000000 --- a/application/client/src/app/ui/elements/navigator/providers/entity.ts +++ /dev/null @@ -1,66 +0,0 @@ -import { PassiveMatchee } from '@module/matcher'; -import { Action } from '@service/recent/action'; -import { unique } from '@platform/env/sequence'; - -import * as wasm from '@loader/wasm'; - -export { Action }; -export interface IFileDescription { - parent: string; - filename: string; - name: string; -} - -export type TEntity = Action | IFileDescription; - -export class Entity extends PassiveMatchee { - public readonly uuid: string = unique(); - - constructor( - public readonly origin: Action | IFileDescription, - public readonly index: number, - matcher: wasm.Matcher, - ) { - super(matcher); - } - - public override asObj(): object { - if (this.origin instanceof Action) { - return { - criteria: this.origin.description().major, - }; - } else { - return { - criteria: this.origin.name, - }; - } - } - - public description(): { - major: string; - minor: string; - } { - const major: string | undefined = this.getHtmlOf('html_criteria'); - if (this.origin instanceof Action) { - return major === undefined - ? this.origin.description() - : { - major, - minor: this.origin.description().minor, - }; - } else { - return { - major: major === undefined ? this.origin.name : major, - minor: this.origin.parent, - }; - } - } - - // public hash(): string { - // if (this.origin instanceof Action) { - // return `${this.origin.description().major}-${this.origin.description().minor}`; - // } else { - // return `${this.origin.name}-${this.origin.parent}`; - // } - // } -} diff --git a/application/client/src/app/ui/elements/navigator/providers/entries.ts b/application/client/src/app/ui/elements/navigator/providers/entries.ts deleted file mode 100644 index fa8474accf..0000000000 --- a/application/client/src/app/ui/elements/navigator/providers/entries.ts +++ /dev/null @@ -1,233 +0,0 @@ -import { Entity } from './entity'; -import { Filter } from '@elements/filter/filter'; -import { Subject } from '@platform/env/subscription'; -import { IlcInterface } from '@service/ilc'; -import { ChangesDetector } from '@ui/env/extentions/changes'; -import { createPassiveMatcheeList } from '@module/matcher'; - -import * as wasm from '@loader/wasm'; - -const MAX_VISIBLE_ITEMS = 10; -const ELEMENT_HEIGHT = 28; - -export interface ICollection { - title: string; - entries: Entity[]; - index: number; -} - -export interface ICollectionInfo { - total: number; - index: number; -} - -export class Entries { - protected entries: Map = new Map(); - - public readonly filter: Filter; - public readonly updated: Subject = new Subject(); - public selected: string = ''; - - constructor( - protected readonly uuid: string, - protected readonly ilc: IlcInterface & ChangesDetector, - protected readonly matcher: wasm.Matcher, - ) { - this.filter = new Filter(ilc, { placeholder: 'Type to filter' }); - ilc.env().subscriber.register( - this.filter.subjects.get().change.subscribe((value: string) => { - this.filtering(value); - }), - ); - } - - protected filtering(value: string): void { - this.matcher.search(value, 'span'); - this.entries.forEach((entries) => { - entries.entries.sort((a: Entity, b: Entity) => b.getScore() - a.getScore()); - }); - this.defaultSelection(); - this.move().update(); - this.updated.emit(); - } - - protected sort(): void { - const sorted: Map = new Map(); - Array.from(this.entries.keys()) - .sort() - .forEach((index: number) => { - const collection = this.entries.get(index); - if (collection === undefined) { - return; - } - sorted.set(index, collection); - }); - this.entries = sorted; - } - - protected all(): Entity[] { - let filtered: Entity[] = []; - this.entries.forEach((collection: ICollection) => { - filtered = filtered.concat( - collection.entries - .filter((a: Entity) => a.getScore() > 0) - .slice(0, MAX_VISIBLE_ITEMS), - ); - }); - return filtered; - } - - public defaultSelection() { - this.selected = ''; - this.entries.forEach((entries) => { - if (this.selected !== '') { - return; - } - if (entries.entries.length > 0) { - this.selected = entries.entries[0].uuid; - } - }); - } - - public add(index: number, title: string, entries: Entity[]) { - this.entries.set(index, { - title, - index, - entries: createPassiveMatcheeList(entries, this.matcher), - }); - this.sort(); - this.updated.emit(); - } - - public remove(index: number): void { - this.entries.delete(index); - this.sort(); - this.updated.emit(); - } - - public len(): number { - return Array.from(this.entries.values()) - .map((collection) => collection.entries.length) - .reduce((partialSum, a) => partialSum + a, 0); - } - - public filtered(): ICollection[] { - return Array.from(this.entries.values()).map((collection: ICollection) => { - return { - index: collection.index, - title: collection.title, - entries: collection.entries - .filter((a: Entity) => a.getScore() > 0) - .slice(0, MAX_VISIBLE_ITEMS), - }; - }); - } - - public stat(): ICollectionInfo[] { - return Array.from(this.entries.values()).map((collection: ICollection) => { - return { - index: collection.index, - title: collection.title, - total: collection.entries.length, - }; - }); - } - - public hasEmptyCollection(): boolean { - return Array.from(this.entries.values()) - .map((en) => en.entries.length) - .includes(0); - } - - public getSelected(): Entity | undefined { - let entity: Entity | undefined; - this.entries.forEach((collection: ICollection) => { - if (entity !== undefined) { - return; - } - entity = collection.entries.find((a) => a.uuid === this.selected); - }); - return entity; - } - - public move(): { - up(): void; - down(): void; - update(): void; - scrollIntoView(index: number): void; - } { - const entries = this.all(); - return { - up: (): void => { - if (entries.length === 0) { - return; - } - if (this.selected === '') { - this.selected = entries[entries.length - 1].uuid; - return; - } - const index = entries.findIndex((a) => a.uuid === this.selected); - this.move().scrollIntoView( - (() => { - if (index === -1 || index === 0) { - this.selected = entries[entries.length - 1].uuid; - return entries.length - 1; - } else { - this.selected = entries[index - 1].uuid; - return index - 1; - } - })(), - ); - }, - down: (): void => { - if (entries.length === 0) { - return; - } - if (this.selected === '') { - this.selected = entries[0].uuid; - return; - } - const index = entries.findIndex((a) => a.uuid === this.selected); - this.move().scrollIntoView( - (() => { - if (index === -1 || index === entries.length - 1) { - this.selected = entries[0].uuid; - return 0; - } else { - this.selected = entries[index + 1].uuid; - return index + 1; - } - })(), - ); - }, - update: (): void => { - if (entries.length === 0) { - return; - } - if (this.selected === '') { - this.selected = entries[0].uuid; - return; - } - const index = entries.findIndex((a) => a.uuid === this.selected); - if (index === -1) { - this.selected = entries[0].uuid; - } - }, - scrollIntoView: (index: number): void => { - const container = document.querySelector(`div[id="${this.uuid}"]`); - if (container === undefined || container === null) { - return; - } - const size = container.getBoundingClientRect(); - const offset = index * ELEMENT_HEIGHT; - if ( - offset >= container.scrollTop && - offset + ELEMENT_HEIGHT <= size.height + container.scrollTop - ) { - return; - } - container.scrollTo(0, offset + ELEMENT_HEIGHT - size.height); - }, - }; - } -} diff --git a/application/client/src/app/ui/elements/navigator/providers/provider.files.ts b/application/client/src/app/ui/elements/navigator/providers/provider.files.ts deleted file mode 100644 index ec4270f98c..0000000000 --- a/application/client/src/app/ui/elements/navigator/providers/provider.files.ts +++ /dev/null @@ -1,331 +0,0 @@ -import { IFileDescription } from './entity'; -import { Provider as Base, INoContentActions, IStatistics } from './provider'; -import { favorites } from '@service/favorites'; -import { bridge } from '@service/bridge'; -import { getFileName } from '@platform/types/files'; -import { notifications, Notification } from '@ui/service/notifications'; -import { FolderEntityType } from '@platform/types/bindings'; - -import * as Factory from '@platform/types/observe/factory'; -import { IMenuItem } from '@ui/service/contextmenu'; - -const DEFAULT_DEEP = 5; -const DEFAULT_LEN = 20000; - -export class Provider extends Base { - protected count: number = 0; - protected roots: string[] = []; - - protected async scan(roots: string[], folders: string[]): Promise { - if (this.isAborted()) { - return Promise.resolve([]); - } - // User can add into favorites nested folder - we should preven duplicates in such cases - for (const path of roots) { - if (folders.indexOf(path) !== -1) { - return Promise.resolve([]); - } else { - folders.push(path); - } - } - let allScanning = ''; - for (const path of roots) { - if (allScanning.length > 0) { - allScanning = `${allScanning} - ${getFileName(path)}`; - } else { - allScanning = `${getFileName(path)}`; - } - } - const data = await bridge.files().ls({ - paths: roots, - depth: DEFAULT_DEEP, - max: DEFAULT_LEN, - include: { files: true, folders: false }, - }); - const items: IFileDescription[] = []; - data.entities.forEach((entity) => { - if (this.isAborted()) { - return; - } - if (entity.kind === FolderEntityType.File && entity.details) { - items.push({ - filename: entity.fullname, - name: entity.name, - parent: entity.details.path, - }); - } - }); - let files: IFileDescription[] = []; - files = files.concat(items); - if (data.max) { - notifications.notify( - new Notification({ - message: `Too many files in: ${allScanning}`, - actions: [], - }), - ); - } - this.roots = roots; - this.count = files.length; - return Promise.resolve(files); - } - - protected open(item: IFileDescription): { - dlt(): void; - pcapng(): void; - pcap(): void; - text(): void; - parserPlugin(): void; - auto(): void; - } { - return { - dlt: (): void => { - this.ilc - .ilc() - .services.system.session.initialize() - .configure( - new Factory.File() - .asDlt() - .type(Factory.FileType.Binary) - .file(item.filename) - .get(), - ) - .catch((err: Error) => { - this.ilc.log().error(`Fail to open text file; error: ${err.message}`); - }); - }, - pcapng: (): void => { - this.ilc - .ilc() - .services.system.session.initialize() - .configure( - new Factory.File() - .asDlt() - .type(Factory.FileType.PcapNG) - .file(item.filename) - .get(), - ) - .catch((err: Error) => { - this.ilc.log().error(`Fail to open text file; error: ${err.message}`); - }); - }, - pcap: (): void => { - this.ilc - .ilc() - .services.system.session.initialize() - .configure( - new Factory.File() - .asDlt() - .type(Factory.FileType.PcapLegacy) - .file(item.filename) - .get(), - ) - .catch((err: Error) => { - this.ilc.log().error(`Fail to open text file; error: ${err.message}`); - }); - }, - text: (): void => { - this.ilc - .ilc() - .services.system.session.initialize() - .observe( - new Factory.File() - .asText() - .type(Factory.FileType.Text) - .file(item.filename) - .get(), - ) - .catch((err: Error) => { - this.ilc.log().error(`Fail to open text file; error: ${err.message}`); - }); - }, - parserPlugin: (): void => { - this.ilc - .ilc() - .services.system.session.initialize() - .observe( - new Factory.File() - .asParserPlugin() - .type(Factory.FileType.ParserPlugin) - .file(item.filename) - .get(), - ) - .catch((err: Error) => { - this.ilc - .log() - .error(`Fail to open file with parsr plugins; error: ${err.message}`); - }); - }, - auto: (): void => { - bridge - .files() - .getByPath([item.filename]) - .then((files) => { - if (files.length > 1) { - this.ilc.log().info('More than one file detected'); - return; - } - const filetype = files[0].type; - if (filetype === Factory.FileType.Text) { - this.ilc - .ilc() - .services.system.session.initialize() - .observe( - new Factory.File() - .asText() - .type(filetype) - .file(item.filename) - .get(), - ) - .catch((err: Error) => { - this.ilc - .log() - .error(`Fail to open text file; error: ${err.message}`); - }); - } else { - this.ilc - .ilc() - .services.system.session.initialize() - .configure( - new Factory.File() - .type(filetype) - .file(item.filename) - .guessParser() - .get(), - ) - .catch((err: Error) => { - this.ilc - .log() - .error(`Fail to open text file; error: ${err.message}`); - }); - } - }) - .catch((error) => { - this.ilc.log().error(error); - }); - }, - }; - } - - protected asFileDescription(entity: unknown): IFileDescription | undefined { - if (typeof entity !== 'object' || entity === undefined || entity === null) { - return; - } - let valid = true; - ['parent', 'filename', 'name'].forEach((prop) => { - if (!valid) { - return; - } - if (typeof (entity as { [key: string]: string })[prop] !== 'string') { - valid = false; - } - }); - if (!valid) { - return; - } - return entity as IFileDescription; - } - - protected addRoot(): void { - favorites - .places() - .selectAndAdd() - .then(() => { - // this.state - // .load() - // .catch((err: Error) => { - // this.ilc.log().error(`Fail to reload state favorites: ${err.message}`); - // }) - // .finally(() => { - // this.ilc.detectChanges(); - // }); - }) - .catch((err: Error) => { - this.ilc.log().error(`Fail to add favorites: ${err.message}`); - }); - } - - public async load(): Promise { - const data = await favorites.places().get(); - return this.scan( - data.filter((f) => f.exists).map((f) => f.path), - [], - ); - } - - public action(entity: unknown): void { - const desc = this.asFileDescription(entity); - if (desc === undefined) { - return; - } - this.open(desc).auto(); - } - - public stat(): IStatistics { - return { - title: `Found ${this.count} file(s) in:`, - total: this.count, - info: this.roots, - }; - } - - public getContextMenu(entity: unknown, close?: () => void): IMenuItem[] { - const desc = this.asFileDescription(entity); - if (desc === undefined) { - return []; - } - return [ - { - caption: 'Open as text', - handler: () => { - this.open(desc).text(); - close !== undefined && close(); - }, - }, - { - caption: 'Open as DLT', - handler: () => { - this.open(desc).dlt(); - close !== undefined && close(); - }, - }, - { - caption: 'Open as PcapNG', - handler: () => { - this.open(desc).pcapng(); - close !== undefined && close(); - }, - }, - { - caption: 'Open as Pcap', - handler: () => { - this.open(desc).pcap(); - close !== undefined && close(); - }, - }, - { - caption: 'Open with parser Plugins', - handler: () => { - this.open(desc).parserPlugin(); - close !== undefined && close(); - }, - }, - ]; - } - - public title(): string { - return `File(s)`; - } - - public getNoContentActions(): INoContentActions { - return { - title: `You didn't add any locations into favorites yet. You always can add/remove favorite places on the home screen.`, - buttons: [ - { - caption: `Add Folder(s) to Favorites`, - handler: this.addRoot.bind(this), - }, - ], - }; - } -} diff --git a/application/client/src/app/ui/elements/navigator/providers/provider.recent.ts b/application/client/src/app/ui/elements/navigator/providers/provider.recent.ts deleted file mode 100644 index e9975e7fee..0000000000 --- a/application/client/src/app/ui/elements/navigator/providers/provider.recent.ts +++ /dev/null @@ -1,97 +0,0 @@ -import { Provider as Base, INoContentActions, IStatistics } from './provider'; -import { Action } from '@service/recent/action'; -import { recent } from '@service/recent'; -import { IMenuItem } from '@ui/service/contextmenu'; - -export class Provider extends Base { - protected count: number = 0; - - protected storage(): { - remove(uuids: string[]): void; - removeAll(): void; - } { - return { - remove: (uuids: string[]): void => { - recent - .delete(uuids) - .then(() => { - this.reload.emit(); - }) - .catch((err: Error) => { - this.ilc.log().error(`Fail to remove recent action: ${err.message}`); - }); - }, - removeAll: (): void => { - recent - .get() - .then((actions: Action[]) => { - this.storage().remove(actions.map((action: Action) => action.uuid)); - this.reload.emit(); - }) - .catch((err: Error) => { - this.ilc.log().error(`Fail to remove all recent actions: ${err.message}`); - }); - }, - }; - } - public load(): Promise { - return recent.get().then((actions: Action[]) => { - actions = actions.filter((action) => action.isSuitable(this.observe)); - actions.sort((a: Action, b: Action) => { - return b.stat.score().recent() >= a.stat.score().recent() ? 1 : -1; - }); - this.count = actions.length; - return actions; - }); - } - - public action(action: unknown): void { - if (!(action instanceof Action)) { - return; - } - action.apply().catch((err: Error) => { - this.ilc.log().error(`Fail to apply action: ${err.message}`); - }); - } - - public stat(): IStatistics { - return { - title: `Available ${this.count} recent actions`, - total: this.count, - info: [], - }; - } - - public getContextMenu(entity: unknown, _close?: () => void): IMenuItem[] { - if (!(entity instanceof Action)) { - return []; - } - return [ - ...entity.getActions(), - {}, - { - caption: 'Remove recent', - handler: () => { - this.storage().remove([entity.uuid]); - }, - }, - { - caption: 'Clear All', - handler: () => { - this.storage().removeAll(); - }, - }, - ]; - } - - public title(): string { - return `Recent action(s)`; - } - - public getNoContentActions(): INoContentActions { - return { - title: `As soon as some file/source will be opened, recent actions will be shown here`, - buttons: [], - }; - } -} diff --git a/application/client/src/app/ui/elements/navigator/providers/provider.ts b/application/client/src/app/ui/elements/navigator/providers/provider.ts deleted file mode 100644 index 04d6d8df48..0000000000 --- a/application/client/src/app/ui/elements/navigator/providers/provider.ts +++ /dev/null @@ -1,43 +0,0 @@ -import { IlcInterface } from '@service/ilc'; -import { ChangesDetector } from '@ui/env/extentions/changes'; -import { IMenuItem } from '@ui/service/contextmenu'; -import { Subject } from '@platform/env/subscription'; -import { Observe } from '@platform/types/observe'; - -export interface IStatistics { - title: string; - total: number; - info: string[]; -} - -export interface INoContentActions { - title: string; - buttons: { caption: string; handler: () => void }[]; -} - -export abstract class Provider { - private readonly _abort: AbortController = new AbortController(); - - public reload: Subject = new Subject(); - - constructor( - public readonly ilc: IlcInterface & ChangesDetector, - public readonly index: number, - protected readonly observe: Observe | undefined, - ) {} - - public abstract load(): Promise; - public abstract action(entity: T): void; - public abstract stat(): IStatistics; - public abstract getContextMenu(entity: T, close?: () => void): IMenuItem[]; - public abstract title(): string; - public abstract getNoContentActions(): INoContentActions; - - public destroy(): void { - this._abort.abort(); - } - - public isAborted(): boolean { - return this._abort.signal.aborted; - } -} diff --git a/application/client/src/app/ui/elements/navigator/providers/providers.ts b/application/client/src/app/ui/elements/navigator/providers/providers.ts deleted file mode 100644 index aff7330f75..0000000000 --- a/application/client/src/app/ui/elements/navigator/providers/providers.ts +++ /dev/null @@ -1,93 +0,0 @@ -import { Entity, TEntity } from './entity'; -import { Entries } from './entries'; -import { INoContentActions, IStatistics, Provider } from './provider'; -import { Provider as ProviderFiles } from './provider.files'; -import { Provider as ProviderRecent } from './provider.recent'; -import { IlcInterface } from '@service/ilc'; -import { ChangesDetector } from '@ui/env/extentions/changes'; -import { Observe } from '@platform/types/observe'; - -import * as wasm from '@loader/wasm'; - -import { IMenuItem } from '@ui/service/contextmenu'; - -const PROVIDERS = [ProviderRecent, ProviderFiles]; - -export class Providers { - protected readonly providers: Provider[] = []; - - constructor( - protected readonly ilc: IlcInterface & ChangesDetector, - protected readonly matcher: wasm.Matcher, - protected readonly entries: Entries, - observe: Observe | undefined, - ) { - this.providers = PROVIDERS.map((Ref, i) => new Ref(ilc, i, observe)); - this.providers.forEach((provider: Provider, i: number) => { - ilc.env().subscriber.register( - provider.reload.subscribe(() => { - this.entries.remove(i); - provider - .load() - .then((entities) => { - this.entries.add( - i, - provider.title(), - entities.map((en) => new Entity(en, i, this.matcher)), - ); - }) - .catch((err: Error) => { - this.ilc - .log() - .error( - `Fail to reload navigation provider data with: ${err.message}`, - ); - }); - }), - ); - }); - } - - public destroy() { - this.providers.forEach((p) => p.destroy()); - } - - public load(): Promise { - return Promise.allSettled(this.providers.map((p) => p.load())).then( - (results: PromiseSettledResult[]) => { - results.forEach((result, i) => { - if (result.status === 'rejected') { - this.ilc - .log() - .error(`Fail to get navigation provider data with: ${result.reason}`); - return; - } - this.entries.add( - i, - this.providers[i].title(), - result.value.map((en) => new Entity(en, i, this.matcher)), - ); - }); - }, - ); - } - - public action(entity: TEntity): void { - this.providers.forEach((p) => p.action(entity)); - } - - public stat(): IStatistics[] { - return this.providers.map((p) => p.stat()); - } - - public getContextMenu(entity: TEntity, close?: () => void): IMenuItem[] { - return this.providers.map((p) => p.getContextMenu(entity, close)).flat(); - } - - public getNoContentActions(index: number): INoContentActions { - if (this.providers[index] === undefined) { - throw new Error(`Fail to find provider with index ${index}.`); - } - return this.providers[index].getNoContentActions(); - } -} diff --git a/application/client/src/app/ui/elements/navigator/state.ts b/application/client/src/app/ui/elements/navigator/state.ts deleted file mode 100644 index bab422b4fd..0000000000 --- a/application/client/src/app/ui/elements/navigator/state.ts +++ /dev/null @@ -1,135 +0,0 @@ -import { Entity } from './providers/entity'; -import { Entries, ICollection } from './providers/entries'; -import { Providers } from './providers/providers'; -import { IlcInterface } from '@service/ilc'; -import { ChangesDetector } from '@ui/env/extentions/changes'; -import { Holder } from '@module/matcher/holder'; -import { unique } from '@platform/env/sequence'; -import { INoContentActions, IStatistics } from './providers/provider'; -import { IMenuItem } from '@ui/service/contextmenu'; -import { Observe } from '@platform/types/observe'; -import { stop } from '@ui/env/dom'; - -const MOVE_SELECTION_DELAY = 150; - -export type CloseHandler = () => void; - -export class State extends Holder { - public readonly uuid: string = unique(); - public entries: Entries; - public empty: boolean = true; - public filtered: ICollection[] = []; - - public statistics: IStatistics[] = []; - public loading: boolean = true; - - protected close: CloseHandler | undefined; - protected readonly movement: { - timer: number; - } = { - timer: -1, - }; - protected readonly providers: Providers; - - protected move(event: KeyboardEvent): boolean { - clearTimeout(this.movement.timer); - if (event.key === 'ArrowDown') { - this.entries.move().down(); - } else if (event.key === 'ArrowUp') { - this.entries.move().up(); - } else { - return false; - } - this.ilc.detectChanges(); - this.movement.timer = setTimeout(() => { - this.move(event); - }, MOVE_SELECTION_DELAY) as unknown as number; - return true; - } - constructor( - protected readonly ilc: IlcInterface & ChangesDetector, - protected readonly filterRefGetter: () => HTMLInputElement | undefined, - protected readonly observe: Observe | undefined, - ) { - super(); - this.ilc = ilc; - this.entries = new Entries(this.uuid, ilc, this.matcher); - this.providers = new Providers(ilc, this.matcher, this.entries, this.observe); - ilc.env().subscriber.register( - ilc - .ilc() - .services.ui.listener.listen( - 'keydown', - window, - (event: KeyboardEvent) => { - if (this.move(event) || event.key !== 'Enter') { - return true; - } - const target = this.entries.getSelected(); - if (target === undefined) { - return true; - } - stop(event); - this.action(target); - return true; - }, - ), - ilc - .ilc() - .services.ui.listener.listen( - 'keyup', - window, - (_event: KeyboardEvent) => { - clearTimeout(this.movement.timer); - return true; - }, - ), - this.entries.updated.subscribe(() => { - this.filtered = this.entries.filtered(); - this.ilc.detectChanges(); - }), - ); - } - - public destroy() { - this.providers.destroy(); - } - - public load(): void { - this.loading = true; - this.providers - .load() - .then(() => { - this.entries.defaultSelection(); - this.loading = false; - this.statistics = this.providers.stat(); - this.empty = this.entries.len() === 0; - this.entries.filter.bind(this.filterRefGetter()).focus(); - this.ilc.markChangesForCheck(); - }) - .catch((err: Error) => { - this.ilc.log().error(`Fail to load navigation entries with: ${err.message}`); - }); - } - - public bind(close: CloseHandler) { - this.close = close; - } - - public count(): number { - return this.entries.len(); - } - - public action(entity: Entity): void { - this.providers.action(entity.origin); - this.close !== undefined && this.close(); - } - - public getContextMenu(entity: Entity): IMenuItem[] { - return this.providers.getContextMenu(entity.origin, this.close); - } - - public getNoContentActions(index: number): INoContentActions { - return this.providers.getNoContentActions(index); - } -} diff --git a/application/client/src/app/ui/elements/navigator/styles.less b/application/client/src/app/ui/elements/navigator/styles.less deleted file mode 100644 index 2337b087a0..0000000000 --- a/application/client/src/app/ui/elements/navigator/styles.less +++ /dev/null @@ -1,141 +0,0 @@ -@import '../../styles/variables.less'; - - -app-navigator { - position: relative; - display: block; - width: 100%; - overflow: hidden; - & div.no-content-actions { - position: relative; - display: block; - width: 100%; - overflow: hidden; - & div.collection-actions{ - border-top: thin solid var(--scheme-color-4); - & p.warning { - padding: 6px 12px; - color: var(--scheme-color-0); - overflow: hidden; - } - } - } - & div.collection-title { - position: sticky; - top:0; - z-index: 1; - height: 0; - width: 100%; - & span.title { - position: absolute; - right: 12px; - font-size: 11px; - background: var(--scheme-color-4); - color: var(--scheme-color-0); - z-index: 1; - padding: 3px 6px; - min-width: 78px; - } - & span.divider { - position: absolute; - left:12px; - right: 12px; - height: 1px; - border-top: thin solid var(--scheme-color-4); - z-index: 1; - } - - } - & div.controlls { - padding-bottom: 12px; - text-align: center; - & button { - color: var(--scheme-color-0); - } - } - & p.info { - padding: 3px 12px; - color: var(--scheme-color-1); - white-space: nowrap; - overflow: hidden; - text-overflow: ellipsis; - } - & p.sub-info { - padding: 3px 12px 3px 24px; - color: var(--scheme-color-2); - white-space: nowrap; - overflow: hidden; - text-overflow: ellipsis; - } - & div.filter { - height: 41px; - width: 100%; - background: var(--scheme-color-5); - overflow: hidden; - } - & div.actions { - position: relative; - width: auto; - overflow-y: auto; - overflow-x: hidden; - max-height: 450px; - } - & div.action { - position: relative; - padding: 6px 0; - white-space: nowrap; - overflow: hidden; - text-overflow: ellipsis; - &:hover { - background: var(--scheme-color-hover); - &::before { - background: var(--scheme-color-hover); - } - } - &.selected, - &.selected:hover { - background: var(--scheme-color-accent-50); - &::before { - background: var(--scheme-color-accent-50); - } - } - &::before { - position: absolute; - display: block; - width: ~"calc(100% + 30px)"; - content: ''; - top:0; - left: -15px; - height: 100%; - } - & p.description { - position: relative; - white-space: nowrap; - overflow: hidden; - text-overflow: ellipsis; - color: var(--scheme-color-0); - padding: 0 12px; - & span.major { - margin-right: 12px; - } - & span.major, - & span.minor { - & > span { - background-color: var(--scheme-color-3); - } - } - } - } - & div.stat { - padding-bottom: 12px; - border-top: thin solid var(--scheme-color-4); - } - & div.progress { - & p { - color: var(--scheme-color-1); - display: block; - text-align: center; - } - padding: 12px 12px; - } -} \ No newline at end of file diff --git a/application/client/src/app/ui/elements/navigator/template.html b/application/client/src/app/ui/elements/navigator/template.html deleted file mode 100644 index 840eb1437c..0000000000 --- a/application/client/src/app/ui/elements/navigator/template.html +++ /dev/null @@ -1,43 +0,0 @@ -
- -
- -
- {{collection.title}} - -
-
-

- - -

-
-
-
-
-
- -

{{statistics.title}}

-

{{info}}

-
-
-
-
-
-

Loading...

- -
-
- -
-

{{state.getNoContentActions(collection.index).title}}

-
- -
-
-
-
- diff --git a/application/client/src/app/ui/elements/pairs/component.ts b/application/client/src/app/ui/elements/pairs/component.ts deleted file mode 100644 index 281d842bba..0000000000 --- a/application/client/src/app/ui/elements/pairs/component.ts +++ /dev/null @@ -1,75 +0,0 @@ -import { - Component, - ChangeDetectorRef, - Input, - ViewEncapsulation, - AfterContentInit, - AfterViewInit, - ViewChild, -} from '@angular/core'; -import { DomSanitizer, SafeHtml } from '@angular/platform-browser'; -import { Ilc, IlcInterface } from '@env/decorators/component'; -import { ChangesDetector } from '@ui/env/extentions/changes'; -import { Pair } from './pair'; -import { State } from './state'; -import { Initial } from '@env/decorators/initial'; -import { MatTableDataSource, MatTable } from '@angular/material/table'; -import { HiddenFilter } from '@elements/filter.hidden/module'; - -@Component({ - selector: 'app-elements-pairs', - templateUrl: './template.html', - styleUrls: ['./styles.less'], - encapsulation: ViewEncapsulation.None, - standalone: false, -}) -@Initial() -@Ilc() -export class ElementsPairs extends ChangesDetector implements AfterContentInit, AfterViewInit { - @Input() public map!: Map; - @Input() public close!: () => void; - @ViewChild(MatTable) table!: MatTable; - @ViewChild('filter') filter!: HiddenFilter; - - public data!: MatTableDataSource; - public columns: string[] = ['name', 'value']; - public state!: State; - - constructor(cdRef: ChangeDetectorRef, private _sanitizer: DomSanitizer) { - super(cdRef); - } - - public ngAfterContentInit(): void { - this.state = new State(this.map); - this.data = new MatTableDataSource(this.state.pairs); - } - - public ngAfterViewInit(): void { - this.env().subscriber.register( - this.filter.filter.subjects.get().change.subscribe((value: string) => { - this.update(value); - }), - ); - this.env().subscriber.register( - this.filter.filter.subjects.get().drop.subscribe(() => { - this.update(''); - }), - ); - } - - public safeHtml(html: string): SafeHtml { - return this._sanitizer.bypassSecurityTrustHtml(html); - } - - public pairs(): Pair[] { - return this.state.pairs.filter((t) => !t.hidden()); - } - - protected update(filter: string) { - this.state.filter(filter); - this.data.data = this.state.visible(); - this.table.renderRows(); - this.detectChanges(); - } -} -export interface ElementsPairs extends IlcInterface {} diff --git a/application/client/src/app/ui/elements/pairs/module.ts b/application/client/src/app/ui/elements/pairs/module.ts deleted file mode 100644 index 12087db75a..0000000000 --- a/application/client/src/app/ui/elements/pairs/module.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { NgModule } from '@angular/core'; -import { CommonModule } from '@angular/common'; -import { ElementsPairs } from './component'; -import { MatTableModule } from '@angular/material/table'; -import { HiddenFilterModule } from '@elements/filter.hidden/module'; - -@NgModule({ - imports: [CommonModule, MatTableModule, HiddenFilterModule], - declarations: [ElementsPairs], - exports: [ElementsPairs], - bootstrap: [ElementsPairs] -}) -export class PairsModule {} diff --git a/application/client/src/app/ui/elements/pairs/pair.ts b/application/client/src/app/ui/elements/pairs/pair.ts deleted file mode 100644 index 6298a8212f..0000000000 --- a/application/client/src/app/ui/elements/pairs/pair.ts +++ /dev/null @@ -1,33 +0,0 @@ -import * as wasm from '@loader/wasm'; - -import { Matchee } from '@module/matcher'; - -export class Pair extends Matchee { - public readonly name: string; - public readonly value: string; - - static matcher: wasm.Matcher; - - constructor(name: string, value: string, matcher: wasm.Matcher) { - super(matcher, { name: name, value: value }); - Pair.matcher = matcher; - this.name = name; - this.value = value; - } - - public hidden(): boolean { - return this.getScore() === 0; - } - - public get html(): { - name: string; - value: string; - } { - const name: string | undefined = this.getHtmlOf('html_name'); - const value: string | undefined = this.getHtmlOf('html_value'); - return { - name: name === undefined ? this.name : name, - value: value === undefined ? this.value : value, - }; - } -} diff --git a/application/client/src/app/ui/elements/pairs/state.ts b/application/client/src/app/ui/elements/pairs/state.ts deleted file mode 100644 index 9ab910cc0f..0000000000 --- a/application/client/src/app/ui/elements/pairs/state.ts +++ /dev/null @@ -1,22 +0,0 @@ -import { Pair } from './pair'; -import { Holder } from '@module/matcher'; - -export class State extends Holder { - public pairs: Pair[] = []; - - constructor(pairs: Map) { - super(); - pairs.forEach((value, key) => { - this.pairs.push(new Pair(key, value, this.matcher)); - }); - } - - public visible(): Pair[] { - return this.pairs.filter((t) => !t.hidden()); - } - - public filter(value: string): void { - this.matcher.search(value); - this.pairs = this.pairs.sort((a, b) => b.getScore() - a.getScore()); - } -} diff --git a/application/client/src/app/ui/elements/pairs/styles.less b/application/client/src/app/ui/elements/pairs/styles.less deleted file mode 100644 index a00ced7e78..0000000000 --- a/application/client/src/app/ui/elements/pairs/styles.less +++ /dev/null @@ -1,50 +0,0 @@ -@import '../../../ui/styles/variables.less'; - - -app-elements-pairs { - position: relative; - display: block; - width: 100%; - height: 100%; - overflow-x: hidden; - overflow-y: auto; - & table { - width: 100%; - max-width: 100%; - } - tr[mat-row] { - height: auto!important; - td[mat-cell] { - padding: 8px 16px; - } - } - & div.filter { - position: sticky; - z-index: 1000; - padding: 6px 12px; - background: var(--scheme-color-warning-light); - top: 6px; - right: 6px; - box-shadow: 3px 3px 3px rgb(0 0 0 / 40%); - border-radius: 3px; - } - & span.name { - white-space: nowrap; - max-width: 300px; - overflow: hidden; - display: inline-block; - text-overflow: ellipsis; - font-weight: 300; - } - & span.value { - white-space: normal; - } - & span.name, - & span.value{ - word-break: break-all; - & > span { - background-color: var(--scheme-color-3); - color: var(--scheme-color-1); - } - } -} \ No newline at end of file diff --git a/application/client/src/app/ui/elements/pairs/template.html b/application/client/src/app/ui/elements/pairs/template.html deleted file mode 100644 index bacec8b7ac..0000000000 --- a/application/client/src/app/ui/elements/pairs/template.html +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - - - - - - - - - - -
- Name - - Value -
diff --git a/application/client/src/app/ui/elements/recent/action.ts b/application/client/src/app/ui/elements/recent/action.ts deleted file mode 100644 index 96955ee90f..0000000000 --- a/application/client/src/app/ui/elements/recent/action.ts +++ /dev/null @@ -1,32 +0,0 @@ -import { Matchee } from '@module/matcher'; -import { Action } from '@service/recent/action'; - -import * as wasm from '@loader/wasm'; - -export class WrappedAction extends Matchee { - public readonly action: Action; - - constructor(action: Action, matcher: wasm.Matcher) { - super(matcher, { - major: action.description().major, - minor: action.description().minor, - }); - this.action = action; - } - - public description(): { - major: string; - minor: string; - } { - const major: string | undefined = this.getHtmlOf('html_major'); - const minor: string | undefined = this.getHtmlOf('html_minor'); - return { - major: major === undefined ? this.action.description().major : major, - minor: minor === undefined ? this.action.description().minor : minor, - }; - } - - public hash(): string { - return `${this.action.description().major}-${this.action.description().minor}`; - } -} diff --git a/application/client/src/app/ui/elements/recent/component.ts b/application/client/src/app/ui/elements/recent/component.ts deleted file mode 100644 index f795b9c8d8..0000000000 --- a/application/client/src/app/ui/elements/recent/component.ts +++ /dev/null @@ -1,111 +0,0 @@ -import { - Component, - AfterContentInit, - ChangeDetectionStrategy, - ChangeDetectorRef, - ViewEncapsulation, - ViewChild, - AfterViewInit, - Input, - Output, - EventEmitter, -} from '@angular/core'; -import { Ilc, IlcInterface } from '@env/decorators/component'; -import { Initial } from '@env/decorators/initial'; -import { Action } from '@service/recent/action'; -import { ChangesDetector } from '@ui/env/extentions/changes'; -import { State } from './state'; -import { DomSanitizer, SafeHtml } from '@angular/platform-browser'; -import { HiddenFilter } from '@elements/filter.hidden/component'; - -import * as $ from '@platform/types/observe'; - -@Component({ - selector: 'app-recent-actions', - templateUrl: './template.html', - styleUrls: ['./styles.less'], - changeDetection: ChangeDetectionStrategy.OnPush, - encapsulation: ViewEncapsulation.None, - standalone: false, -}) -@Initial() -@Ilc() -export class RecentActions extends ChangesDetector implements AfterContentInit, AfterViewInit { - @Input() public observe?: $.Observe; - - @Output() public applied: EventEmitter = new EventEmitter(); - - @ViewChild('filter') filter!: HiddenFilter; - - public state!: State; - - constructor(cdRef: ChangeDetectorRef, private _sanitizer: DomSanitizer) { - super(cdRef); - } - - public ngAfterContentInit(): void { - this.markChangesForCheck(); - this.state = new State(this, this.observe); - this.env().subscriber.register( - this.state.update.subscribe(() => { - this.detectChanges(); - }), - ); - if (this.observe !== undefined) { - this.env().subscriber.register( - this.observe.subscribe(() => { - this.state.reload(); - this.detectChanges(); - }), - ); - } - } - - public ngAfterViewInit(): void { - this.env().subscriber.register( - this.filter.filter.subjects.get().change.subscribe((value: string) => { - this.state.filtering(value); - }), - ); - this.env().subscriber.register( - this.filter.filter.subjects.get().drop.subscribe(() => { - this.state.filtering(''); - }), - ); - } - - public onDefaultAction(action: Action) { - action.apply().catch((err: Error) => { - this.log().error(`Fail to apply action: ${err.message}`); - }); - } - - public onAllActions(event: MouseEvent, action: Action) { - const items = [ - ...action.getActions(), - {}, - { - caption: 'Remove recent', - handler: () => { - this.state.remove([action.uuid]); - }, - }, - { - caption: 'Clear All', - handler: () => { - this.state.removeAll(); - }, - }, - ]; - this.ilc().emitter.ui.contextmenu.open({ - items, - x: event.x, - y: event.y, - }); - } - - public safeHtml(html: string): SafeHtml { - return this._sanitizer.bypassSecurityTrustHtml(html); - } -} -export interface RecentActions extends IlcInterface {} diff --git a/application/client/src/app/ui/elements/recent/icon/component.ts b/application/client/src/app/ui/elements/recent/icon/component.ts deleted file mode 100644 index 39d0020c38..0000000000 --- a/application/client/src/app/ui/elements/recent/icon/component.ts +++ /dev/null @@ -1,81 +0,0 @@ -import { Component, Input } from '@angular/core'; -import { Ilc, IlcInterface } from '@env/decorators/component'; -import { Initial } from '@env/decorators/initial'; - -import * as $ from '@platform/types/observe'; - -@Component({ - selector: 'app-recent-nature-icon', - templateUrl: './template.html', - styleUrls: ['./styles.less'], - standalone: false, -}) -@Initial() -@Ilc() -export class RecentIcon { - @Input() public observe!: $.Observe; - - public nature(): { - File(): $.Origin.File.Configuration | undefined; - Concat(): $.Origin.Concat.Configuration | undefined; - Process(): $.Origin.Stream.Stream.Process.Configuration | undefined; - Serial(): $.Origin.Stream.Stream.Serial.Configuration | undefined; - TCP(): $.Origin.Stream.Stream.TCP.Configuration | undefined; - UDP(): $.Origin.Stream.Stream.UDP.Configuration | undefined; - } { - const nature = this.observe.origin.nature(); - return { - File: (): $.Origin.File.Configuration | undefined => { - return nature instanceof $.Origin.File.Configuration ? nature : undefined; - }, - Concat: (): $.Origin.Concat.Configuration | undefined => { - return nature instanceof $.Origin.Concat.Configuration ? nature : undefined; - }, - Process: (): $.Origin.Stream.Stream.Process.Configuration | undefined => { - return nature instanceof $.Origin.Stream.Stream.Process.Configuration - ? nature - : undefined; - }, - Serial: (): $.Origin.Stream.Stream.Serial.Configuration | undefined => { - return nature instanceof $.Origin.Stream.Stream.Serial.Configuration - ? nature - : undefined; - }, - TCP: (): $.Origin.Stream.Stream.TCP.Configuration | undefined => { - return nature instanceof $.Origin.Stream.Stream.TCP.Configuration - ? nature - : undefined; - }, - UDP: (): $.Origin.Stream.Stream.UDP.Configuration | undefined => { - return nature instanceof $.Origin.Stream.Stream.UDP.Configuration - ? nature - : undefined; - }, - }; - } - - public parser(): { - Dlt(): $.Parser.Dlt.Configuration | undefined; - SomeIp(): $.Parser.SomeIp.Configuration | undefined; - Text(): $.Parser.Text.Configuration | undefined; - } { - return { - Dlt: (): $.Parser.Dlt.Configuration | undefined => { - return this.observe.parser.as<$.Parser.Dlt.Configuration>( - $.Parser.Dlt.Configuration, - ); - }, - SomeIp: (): $.Parser.SomeIp.Configuration | undefined => { - return this.observe.parser.as<$.Parser.SomeIp.Configuration>( - $.Parser.SomeIp.Configuration, - ); - }, - Text: (): $.Parser.Text.Configuration | undefined => { - return this.observe.parser.as<$.Parser.Text.Configuration>( - $.Parser.Text.Configuration, - ); - }, - }; - } -} -export interface RecentIcon extends IlcInterface {} diff --git a/application/client/src/app/ui/elements/recent/icon/styles.less b/application/client/src/app/ui/elements/recent/icon/styles.less deleted file mode 100644 index 8c753a0fde..0000000000 --- a/application/client/src/app/ui/elements/recent/icon/styles.less +++ /dev/null @@ -1,26 +0,0 @@ -@import '../../../styles/variables.less'; - - -:host { - position: relative; - display: flex; - flex-direction: column; - width: 42px; - overflow: hidden; - align-items: center; - justify-content: center; - & span { - color: var(--scheme-color-2); - font-weight: 500; - padding-right: 12px; - font-size: 12px; - } - & mat-icon { - font-size: 16px; - height: 16px; - width: 16px; - margin: 0; - color: var(--scheme-color-2); - padding: 0 12px 0 0; - } -} \ No newline at end of file diff --git a/application/client/src/app/ui/elements/recent/icon/template.html b/application/client/src/app/ui/elements/recent/icon/template.html deleted file mode 100644 index 9bccc55960..0000000000 --- a/application/client/src/app/ui/elements/recent/icon/template.html +++ /dev/null @@ -1,8 +0,0 @@ - insert_drive_file -folder_open -code -usb -compare_arrows -compare_arrows -DLT -SomeIp \ No newline at end of file diff --git a/application/client/src/app/ui/elements/recent/module.ts b/application/client/src/app/ui/elements/recent/module.ts deleted file mode 100644 index 755288703a..0000000000 --- a/application/client/src/app/ui/elements/recent/module.ts +++ /dev/null @@ -1,28 +0,0 @@ -import { NgModule } from '@angular/core'; -import { CommonModule } from '@angular/common'; -import { ContainersModule } from '@elements/containers/module'; -import { MatButtonModule } from '@angular/material/button'; -import { MatIconModule } from '@angular/material/icon'; -import { MatMenuModule } from '@angular/material/menu'; -import { HiddenFilterModule } from '@elements/filter.hidden/module'; - -import { RecentActions } from './component'; -import { RecentIcon } from './icon/component'; -import { RecentNatureModule } from './nature/module'; -import { RecentParserModule } from './parser/module'; - -@NgModule({ - imports: [ - CommonModule, - ContainersModule, - MatButtonModule, - MatIconModule, - MatMenuModule, - HiddenFilterModule, - RecentNatureModule, - RecentParserModule, - ], - declarations: [RecentActions, RecentIcon], - exports: [RecentActions], -}) -export class RecentActionsModule {} diff --git a/application/client/src/app/ui/elements/recent/nature/component.ts b/application/client/src/app/ui/elements/recent/nature/component.ts deleted file mode 100644 index fd15eb92d9..0000000000 --- a/application/client/src/app/ui/elements/recent/nature/component.ts +++ /dev/null @@ -1,61 +0,0 @@ -import { Component, AfterContentInit, Input } from '@angular/core'; -import { Ilc, IlcInterface } from '@env/decorators/component'; -import { Initial } from '@env/decorators/initial'; - -import * as $ from '@platform/types/observe'; - -@Component({ - selector: 'app-recent-nature', - templateUrl: './template.html', - styleUrls: ['./styles.less'], - standalone: false, -}) -@Initial() -@Ilc() -export class RecentNature implements AfterContentInit { - @Input() public observe!: $.Observe; - - public ngAfterContentInit(): void { - // - } - - public as(): { - File(): $.Origin.File.Configuration | undefined; - Concat(): $.Origin.Concat.Configuration | undefined; - Process(): $.Origin.Stream.Stream.Process.Configuration | undefined; - Serial(): $.Origin.Stream.Stream.Serial.Configuration | undefined; - TCP(): $.Origin.Stream.Stream.TCP.Configuration | undefined; - UDP(): $.Origin.Stream.Stream.UDP.Configuration | undefined; - } { - const nature = this.observe.origin.nature(); - return { - File: (): $.Origin.File.Configuration | undefined => { - return nature instanceof $.Origin.File.Configuration ? nature : undefined; - }, - Concat: (): $.Origin.Concat.Configuration | undefined => { - return nature instanceof $.Origin.Concat.Configuration ? nature : undefined; - }, - Process: (): $.Origin.Stream.Stream.Process.Configuration | undefined => { - return nature instanceof $.Origin.Stream.Stream.Process.Configuration - ? nature - : undefined; - }, - Serial: (): $.Origin.Stream.Stream.Serial.Configuration | undefined => { - return nature instanceof $.Origin.Stream.Stream.Serial.Configuration - ? nature - : undefined; - }, - TCP: (): $.Origin.Stream.Stream.TCP.Configuration | undefined => { - return nature instanceof $.Origin.Stream.Stream.TCP.Configuration - ? nature - : undefined; - }, - UDP: (): $.Origin.Stream.Stream.UDP.Configuration | undefined => { - return nature instanceof $.Origin.Stream.Stream.UDP.Configuration - ? nature - : undefined; - }, - }; - } -} -export interface RecentNature extends IlcInterface {} diff --git a/application/client/src/app/ui/elements/recent/nature/concat/component.ts b/application/client/src/app/ui/elements/recent/nature/concat/component.ts deleted file mode 100644 index 67b777a08a..0000000000 --- a/application/client/src/app/ui/elements/recent/nature/concat/component.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { Component, AfterContentInit, Input } from '@angular/core'; -import { Ilc, IlcInterface } from '@env/decorators/component'; -import { Initial } from '@env/decorators/initial'; -// import { bytesToStr, timestampToUTC } from '@env/str'; - -import * as $ from '@platform/types/observe'; - -@Component({ - selector: 'app-recent-nature-concat', - templateUrl: './template.html', - styleUrls: ['./styles.less'], - standalone: false, -}) -@Initial() -@Ilc() -export class RecentNatureConcat implements AfterContentInit { - @Input() public origin!: $.Origin.Concat.Configuration; - - public name!: string; - public path!: string; - public size!: string; - public created!: string; - - public ngAfterContentInit(): void { - // this.name = base.name; - // this.path = base.path; - // this.size = bytesToStr(base.size); - // this.created = timestampToUTC(base.created); - } -} -export interface RecentNatureConcat extends IlcInterface {} diff --git a/application/client/src/app/ui/elements/recent/nature/concat/styles.less b/application/client/src/app/ui/elements/recent/nature/concat/styles.less deleted file mode 100644 index 190cad77be..0000000000 --- a/application/client/src/app/ui/elements/recent/nature/concat/styles.less +++ /dev/null @@ -1,15 +0,0 @@ -@import '../../../../styles/variables.less'; - - -:host { - position: relative; - display: block; - width: 100%; - overflow: hidden; - white-space: nowrap; - font-size: 13px; - color: var(--scheme-color-3); - & > span { - color: var(--scheme-color-2); - } -} \ No newline at end of file diff --git a/application/client/src/app/ui/elements/recent/nature/concat/template.html b/application/client/src/app/ui/elements/recent/nature/concat/template.html deleted file mode 100644 index e1c1dd52a0..0000000000 --- a/application/client/src/app/ui/elements/recent/nature/concat/template.html +++ /dev/null @@ -1 +0,0 @@ -Concating {{origin.files().length}} files \ No newline at end of file diff --git a/application/client/src/app/ui/elements/recent/nature/file/component.ts b/application/client/src/app/ui/elements/recent/nature/file/component.ts deleted file mode 100644 index ded62a63b0..0000000000 --- a/application/client/src/app/ui/elements/recent/nature/file/component.ts +++ /dev/null @@ -1,27 +0,0 @@ -import { Component, AfterContentInit, Input } from '@angular/core'; -import { Ilc, IlcInterface } from '@env/decorators/component'; -import { Initial } from '@env/decorators/initial'; -import { getFileName, getParentFolder } from '@platform/types/files'; - -import * as $ from '@platform/types/observe'; - -@Component({ - selector: 'app-recent-nature-file', - templateUrl: './template.html', - styleUrls: ['./styles.less'], - standalone: false, -}) -@Initial() -@Ilc() -export class RecentNatureFile implements AfterContentInit { - @Input() public origin!: $.Origin.File.Configuration; - - public name!: string; - public path!: string; - - public ngAfterContentInit(): void { - this.name = getFileName(this.origin.filename()); - this.path = getParentFolder(this.origin.filename()); - } -} -export interface RecentNatureFile extends IlcInterface {} diff --git a/application/client/src/app/ui/elements/recent/nature/file/styles.less b/application/client/src/app/ui/elements/recent/nature/file/styles.less deleted file mode 100644 index 312349ebd9..0000000000 --- a/application/client/src/app/ui/elements/recent/nature/file/styles.less +++ /dev/null @@ -1,19 +0,0 @@ -@import '../../../../styles/variables.less'; - - -:host { - position: relative; - display: block; - width: 100%; - overflow: hidden; - white-space: nowrap; - font-size: 13px; - & > p { - padding: 0; - margin: 0; - color: var(--scheme-color-3); - & > span { - color: var(--scheme-color-2); - } - } -} \ No newline at end of file diff --git a/application/client/src/app/ui/elements/recent/nature/file/template.html b/application/client/src/app/ui/elements/recent/nature/file/template.html deleted file mode 100644 index da8cef9bc8..0000000000 --- a/application/client/src/app/ui/elements/recent/nature/file/template.html +++ /dev/null @@ -1,2 +0,0 @@ -

{{name}}

-

{{path}}

\ No newline at end of file diff --git a/application/client/src/app/ui/elements/recent/nature/module.ts b/application/client/src/app/ui/elements/recent/nature/module.ts deleted file mode 100644 index 2b5c9d15db..0000000000 --- a/application/client/src/app/ui/elements/recent/nature/module.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { NgModule } from '@angular/core'; -import { CommonModule } from '@angular/common'; - -import { RecentNature } from './component'; -import { RecentNatureConcat } from './concat/component'; -import { RecentNatureFile } from './file/component'; -import { RecentNatureUdp } from './udp/component'; -import { RecentNatureTcp } from './tcp/component'; -import { RecentNatureSerial } from './serial/component'; -import { RecentNatureProcess } from './process/component'; - -@NgModule({ - imports: [CommonModule], - declarations: [ - RecentNature, - RecentNatureConcat, - RecentNatureFile, - RecentNatureUdp, - RecentNatureTcp, - RecentNatureSerial, - RecentNatureProcess, - ], - exports: [RecentNature], -}) -export class RecentNatureModule {} diff --git a/application/client/src/app/ui/elements/recent/nature/process/component.ts b/application/client/src/app/ui/elements/recent/nature/process/component.ts deleted file mode 100644 index 8fdb8e12bd..0000000000 --- a/application/client/src/app/ui/elements/recent/nature/process/component.ts +++ /dev/null @@ -1,22 +0,0 @@ -import { Component, AfterContentInit, Input } from '@angular/core'; -import { Ilc, IlcInterface } from '@env/decorators/component'; -import { Initial } from '@env/decorators/initial'; - -import * as $ from '@platform/types/observe'; - -@Component({ - selector: 'app-recent-nature-process', - templateUrl: './template.html', - styleUrls: ['./styles.less'], - standalone: false, -}) -@Initial() -@Ilc() -export class RecentNatureProcess implements AfterContentInit { - @Input() public origin!: $.Origin.Stream.Stream.Process.Configuration; - - public ngAfterContentInit(): void { - // - } -} -export interface RecentNatureProcess extends IlcInterface {} diff --git a/application/client/src/app/ui/elements/recent/nature/process/styles.less b/application/client/src/app/ui/elements/recent/nature/process/styles.less deleted file mode 100644 index 312349ebd9..0000000000 --- a/application/client/src/app/ui/elements/recent/nature/process/styles.less +++ /dev/null @@ -1,19 +0,0 @@ -@import '../../../../styles/variables.less'; - - -:host { - position: relative; - display: block; - width: 100%; - overflow: hidden; - white-space: nowrap; - font-size: 13px; - & > p { - padding: 0; - margin: 0; - color: var(--scheme-color-3); - & > span { - color: var(--scheme-color-2); - } - } -} \ No newline at end of file diff --git a/application/client/src/app/ui/elements/recent/nature/process/template.html b/application/client/src/app/ui/elements/recent/nature/process/template.html deleted file mode 100644 index 8c5c072f09..0000000000 --- a/application/client/src/app/ui/elements/recent/nature/process/template.html +++ /dev/null @@ -1,2 +0,0 @@ -

run: {{origin.configuration.command}}

-

from: {{origin.configuration.cwd}}

diff --git a/application/client/src/app/ui/elements/recent/nature/serial/component.ts b/application/client/src/app/ui/elements/recent/nature/serial/component.ts deleted file mode 100644 index f5f3c579e8..0000000000 --- a/application/client/src/app/ui/elements/recent/nature/serial/component.ts +++ /dev/null @@ -1,22 +0,0 @@ -import { Component, AfterContentInit, Input } from '@angular/core'; -import { Ilc, IlcInterface } from '@env/decorators/component'; -import { Initial } from '@env/decorators/initial'; - -import * as $ from '@platform/types/observe'; - -@Component({ - selector: 'app-recent-nature-serial', - templateUrl: './template.html', - styleUrls: ['./styles.less'], - standalone: false, -}) -@Initial() -@Ilc() -export class RecentNatureSerial implements AfterContentInit { - @Input() public origin!: $.Origin.Stream.Stream.Serial.Configuration; - - public ngAfterContentInit(): void { - // - } -} -export interface RecentNatureSerial extends IlcInterface {} diff --git a/application/client/src/app/ui/elements/recent/nature/serial/styles.less b/application/client/src/app/ui/elements/recent/nature/serial/styles.less deleted file mode 100644 index 190cad77be..0000000000 --- a/application/client/src/app/ui/elements/recent/nature/serial/styles.less +++ /dev/null @@ -1,15 +0,0 @@ -@import '../../../../styles/variables.less'; - - -:host { - position: relative; - display: block; - width: 100%; - overflow: hidden; - white-space: nowrap; - font-size: 13px; - color: var(--scheme-color-3); - & > span { - color: var(--scheme-color-2); - } -} \ No newline at end of file diff --git a/application/client/src/app/ui/elements/recent/nature/serial/template.html b/application/client/src/app/ui/elements/recent/nature/serial/template.html deleted file mode 100644 index 2b2323785c..0000000000 --- a/application/client/src/app/ui/elements/recent/nature/serial/template.html +++ /dev/null @@ -1 +0,0 @@ -Connection to: {{origin.configuration.path}} ({{origin.configuration.baud_rate}}/{{origin.configuration.data_bits}}) \ No newline at end of file diff --git a/application/client/src/app/ui/elements/recent/nature/styles.less b/application/client/src/app/ui/elements/recent/nature/styles.less deleted file mode 100644 index 856ff2de94..0000000000 --- a/application/client/src/app/ui/elements/recent/nature/styles.less +++ /dev/null @@ -1,8 +0,0 @@ -@import '../../../styles/variables.less'; - - -:host { - position: relative; - display: block; - width: 100%; -} \ No newline at end of file diff --git a/application/client/src/app/ui/elements/recent/nature/tcp/component.ts b/application/client/src/app/ui/elements/recent/nature/tcp/component.ts deleted file mode 100644 index d0768f10e4..0000000000 --- a/application/client/src/app/ui/elements/recent/nature/tcp/component.ts +++ /dev/null @@ -1,22 +0,0 @@ -import { Component, AfterContentInit, Input } from '@angular/core'; -import { Ilc, IlcInterface } from '@env/decorators/component'; -import { Initial } from '@env/decorators/initial'; - -import * as $ from '@platform/types/observe'; - -@Component({ - selector: 'app-recent-nature-tcp', - templateUrl: './template.html', - styleUrls: ['./styles.less'], - standalone: false, -}) -@Initial() -@Ilc() -export class RecentNatureTcp implements AfterContentInit { - @Input() public origin!: $.Origin.Stream.Stream.TCP.Configuration; - - public ngAfterContentInit(): void { - // - } -} -export interface RecentNatureTcp extends IlcInterface {} diff --git a/application/client/src/app/ui/elements/recent/nature/tcp/styles.less b/application/client/src/app/ui/elements/recent/nature/tcp/styles.less deleted file mode 100644 index 190cad77be..0000000000 --- a/application/client/src/app/ui/elements/recent/nature/tcp/styles.less +++ /dev/null @@ -1,15 +0,0 @@ -@import '../../../../styles/variables.less'; - - -:host { - position: relative; - display: block; - width: 100%; - overflow: hidden; - white-space: nowrap; - font-size: 13px; - color: var(--scheme-color-3); - & > span { - color: var(--scheme-color-2); - } -} \ No newline at end of file diff --git a/application/client/src/app/ui/elements/recent/nature/tcp/template.html b/application/client/src/app/ui/elements/recent/nature/tcp/template.html deleted file mode 100644 index 42e79f9bc2..0000000000 --- a/application/client/src/app/ui/elements/recent/nature/tcp/template.html +++ /dev/null @@ -1 +0,0 @@ -TCP on: {{origin.configuration.bind_addr}} \ No newline at end of file diff --git a/application/client/src/app/ui/elements/recent/nature/template.html b/application/client/src/app/ui/elements/recent/nature/template.html deleted file mode 100644 index 43501548ba..0000000000 --- a/application/client/src/app/ui/elements/recent/nature/template.html +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/application/client/src/app/ui/elements/recent/nature/udp/component.ts b/application/client/src/app/ui/elements/recent/nature/udp/component.ts deleted file mode 100644 index 7fdcc5d17a..0000000000 --- a/application/client/src/app/ui/elements/recent/nature/udp/component.ts +++ /dev/null @@ -1,22 +0,0 @@ -import { Component, AfterContentInit, Input } from '@angular/core'; -import { Ilc, IlcInterface } from '@env/decorators/component'; -import { Initial } from '@env/decorators/initial'; - -import * as $ from '@platform/types/observe'; - -@Component({ - selector: 'app-recent-nature-udp', - templateUrl: './template.html', - styleUrls: ['./styles.less'], - standalone: false, -}) -@Initial() -@Ilc() -export class RecentNatureUdp implements AfterContentInit { - @Input() public origin!: $.Origin.Stream.Stream.UDP.Configuration; - - public ngAfterContentInit(): void { - // - } -} -export interface RecentNatureUdp extends IlcInterface {} diff --git a/application/client/src/app/ui/elements/recent/nature/udp/styles.less b/application/client/src/app/ui/elements/recent/nature/udp/styles.less deleted file mode 100644 index 190cad77be..0000000000 --- a/application/client/src/app/ui/elements/recent/nature/udp/styles.less +++ /dev/null @@ -1,15 +0,0 @@ -@import '../../../../styles/variables.less'; - - -:host { - position: relative; - display: block; - width: 100%; - overflow: hidden; - white-space: nowrap; - font-size: 13px; - color: var(--scheme-color-3); - & > span { - color: var(--scheme-color-2); - } -} \ No newline at end of file diff --git a/application/client/src/app/ui/elements/recent/nature/udp/template.html b/application/client/src/app/ui/elements/recent/nature/udp/template.html deleted file mode 100644 index 8a091f0643..0000000000 --- a/application/client/src/app/ui/elements/recent/nature/udp/template.html +++ /dev/null @@ -1,4 +0,0 @@ -UDP on: {{origin.configuration.bind_addr}} - - Multicast: {{origin.configuration.multicast[0].multiaddr}} ({{origin.configuration.multicast[0].interface}}) - diff --git a/application/client/src/app/ui/elements/recent/parser/component.ts b/application/client/src/app/ui/elements/recent/parser/component.ts deleted file mode 100644 index 27bad6ed8e..0000000000 --- a/application/client/src/app/ui/elements/recent/parser/component.ts +++ /dev/null @@ -1,46 +0,0 @@ -import { Component, AfterContentInit, Input } from '@angular/core'; -import { Ilc, IlcInterface } from '@env/decorators/component'; -import { Initial } from '@env/decorators/initial'; - -import * as $ from '@platform/types/observe'; - -@Component({ - selector: 'app-recent-parser', - templateUrl: './template.html', - styleUrls: ['./styles.less'], - standalone: false, -}) -@Initial() -@Ilc() -export class RecentParser implements AfterContentInit { - @Input() public observe!: $.Observe; - - public ngAfterContentInit(): void { - // - } - - public as(): { - Dlt(): $.Parser.Dlt.Configuration | undefined; - SomeIp(): $.Parser.SomeIp.Configuration | undefined; - Text(): $.Parser.Text.Configuration | undefined; - } { - return { - Dlt: (): $.Parser.Dlt.Configuration | undefined => { - return this.observe.parser.as<$.Parser.Dlt.Configuration>( - $.Parser.Dlt.Configuration, - ); - }, - SomeIp: (): $.Parser.SomeIp.Configuration | undefined => { - return this.observe.parser.as<$.Parser.SomeIp.Configuration>( - $.Parser.SomeIp.Configuration, - ); - }, - Text: (): $.Parser.Text.Configuration | undefined => { - return this.observe.parser.as<$.Parser.Text.Configuration>( - $.Parser.Text.Configuration, - ); - }, - }; - } -} -export interface RecentParser extends IlcInterface {} diff --git a/application/client/src/app/ui/elements/recent/parser/dlt/component.ts b/application/client/src/app/ui/elements/recent/parser/dlt/component.ts deleted file mode 100644 index 36b5cd65a8..0000000000 --- a/application/client/src/app/ui/elements/recent/parser/dlt/component.ts +++ /dev/null @@ -1,42 +0,0 @@ -import { Component, AfterContentInit, Input } from '@angular/core'; -import { Ilc, IlcInterface } from '@env/decorators/component'; -import { Initial } from '@env/decorators/initial'; -// import { bytesToStr, timestampToUTC } from '@env/str'; - -import * as $ from '@platform/types/observe'; - -@Component({ - selector: 'app-recent-parser-dlt', - templateUrl: './template.html', - styleUrls: ['./styles.less'], - standalone: false, -}) -@Initial() -@Ilc() -export class RecentParserDlt implements AfterContentInit { - @Input() public parser!: $.Parser.Dlt.Configuration; - - public logLevel!: string; - public fibex: string[] = []; - public timezone: string | undefined; - - public ngAfterContentInit(): void { - if ( - this.parser.configuration.filter_config === undefined || - this.parser.configuration.filter_config.min_log_level === undefined - ) { - this.logLevel = $.Parser.Dlt.DltLogLevelNames[6]; - } else { - this.logLevel = $.Parser.Dlt.getLogLevelName( - this.parser.configuration.filter_config.min_log_level, - ); - } - if (this.parser.configuration.fibex_file_paths === undefined) { - this.fibex = []; - } else { - this.fibex = this.parser.configuration.fibex_file_paths; - } - this.timezone = this.parser.configuration.tz; - } -} -export interface RecentParserDlt extends IlcInterface {} diff --git a/application/client/src/app/ui/elements/recent/parser/dlt/styles.less b/application/client/src/app/ui/elements/recent/parser/dlt/styles.less deleted file mode 100644 index 3b485ebc82..0000000000 --- a/application/client/src/app/ui/elements/recent/parser/dlt/styles.less +++ /dev/null @@ -1,31 +0,0 @@ -@import '../../../../styles/variables.less'; - - - -:host { - position: relative; - display: block; - & span.path { - margin-left: 12px; - } - & .nowrap { - white-space: nowrap; - text-overflow: ellipsis; - overflow: hidden; - } - & table { - margin-left: -3px; - } - & table > tr { - vertical-align: top; - } - & table * { - border-spacing: 0px; - } - & table { - & td.left-padding { - padding-left: 12px; - } - } - -} \ No newline at end of file diff --git a/application/client/src/app/ui/elements/recent/parser/dlt/template.html b/application/client/src/app/ui/elements/recent/parser/dlt/template.html deleted file mode 100644 index 0e8ba23f8c..0000000000 --- a/application/client/src/app/ui/elements/recent/parser/dlt/template.html +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - -
Log level:{{logLevel}} -

Bound fibex files:

-

{{fibex}}

-
-

Timezone:

-

{{timezone}}

-
diff --git a/application/client/src/app/ui/elements/recent/parser/module.ts b/application/client/src/app/ui/elements/recent/parser/module.ts deleted file mode 100644 index 1ae35bc15a..0000000000 --- a/application/client/src/app/ui/elements/recent/parser/module.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { NgModule } from '@angular/core'; -import { CommonModule } from '@angular/common'; - -import { RecentParser } from './component'; -import { RecentParserDlt } from './dlt/component'; -import { RecentParserSomeIp } from './someip/component'; - -@NgModule({ - imports: [CommonModule], - declarations: [RecentParser, RecentParserDlt, RecentParserSomeIp], - exports: [RecentParser], -}) -export class RecentParserModule {} diff --git a/application/client/src/app/ui/elements/recent/parser/someip/component.ts b/application/client/src/app/ui/elements/recent/parser/someip/component.ts deleted file mode 100644 index d4958480d4..0000000000 --- a/application/client/src/app/ui/elements/recent/parser/someip/component.ts +++ /dev/null @@ -1,28 +0,0 @@ -import { Component, AfterContentInit, Input } from '@angular/core'; -import { Ilc, IlcInterface } from '@env/decorators/component'; -import { Initial } from '@env/decorators/initial'; -// import { bytesToStr, timestampToUTC } from '@env/str'; - -import * as $ from '@platform/types/observe'; - -@Component({ - selector: 'app-recent-parser-someip', - templateUrl: './template.html', - styleUrls: ['./styles.less'], - standalone: false, -}) -@Initial() -@Ilc() -export class RecentParserSomeIp implements AfterContentInit { - @Input() public parser!: $.Parser.SomeIp.Configuration; - public fibex: string[] = []; - - public ngAfterContentInit(): void { - if (this.parser.configuration.fibex_file_paths === undefined) { - this.fibex = []; - } else { - this.fibex = this.parser.configuration.fibex_file_paths; - } - } -} -export interface RecentParserSomeIp extends IlcInterface {} diff --git a/application/client/src/app/ui/elements/recent/parser/someip/styles.less b/application/client/src/app/ui/elements/recent/parser/someip/styles.less deleted file mode 100644 index 8ba5c2caa1..0000000000 --- a/application/client/src/app/ui/elements/recent/parser/someip/styles.less +++ /dev/null @@ -1,31 +0,0 @@ -@import '../../../../styles/variables.less'; - - -:host { - position: relative; - display: block; - width: 100%; - padding: 6px 0; - & div.section { - position: relative; - } - & span.path { - margin-left: 12px; - } - & .nowrap { - white-space: nowrap; - text-overflow: ellipsis; - overflow: hidden; - } - & table > tr { - vertical-align: top; - } - & table * { - border-spacing: 0px; - } - & table { - & td.left-padding { - padding-left: 12px; - } - } -} \ No newline at end of file diff --git a/application/client/src/app/ui/elements/recent/parser/someip/template.html b/application/client/src/app/ui/elements/recent/parser/someip/template.html deleted file mode 100644 index 2c661cb866..0000000000 --- a/application/client/src/app/ui/elements/recent/parser/someip/template.html +++ /dev/null @@ -1,13 +0,0 @@ - - - - - -
-

Bound fibex files:

-

No any fibex files

-

{{fibex}}

-
\ No newline at end of file diff --git a/application/client/src/app/ui/elements/recent/parser/styles.less b/application/client/src/app/ui/elements/recent/parser/styles.less deleted file mode 100644 index 856ff2de94..0000000000 --- a/application/client/src/app/ui/elements/recent/parser/styles.less +++ /dev/null @@ -1,8 +0,0 @@ -@import '../../../styles/variables.less'; - - -:host { - position: relative; - display: block; - width: 100%; -} \ No newline at end of file diff --git a/application/client/src/app/ui/elements/recent/parser/template.html b/application/client/src/app/ui/elements/recent/parser/template.html deleted file mode 100644 index dd91e7f740..0000000000 --- a/application/client/src/app/ui/elements/recent/parser/template.html +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file diff --git a/application/client/src/app/ui/elements/recent/state.ts b/application/client/src/app/ui/elements/recent/state.ts deleted file mode 100644 index 8b4456dee0..0000000000 --- a/application/client/src/app/ui/elements/recent/state.ts +++ /dev/null @@ -1,84 +0,0 @@ -import { Action } from '@service/recent/action'; -import { WrappedAction } from './action'; -import { recent } from '@service/recent'; -import { Subject } from '@platform/env/subscription'; -import { IlcInterface } from '@service/ilc'; -import { ChangesDetector } from '@ui/env/extentions/changes'; -import { Holder } from '@module/matcher'; -import { Logger } from '@platform/log'; - -import * as $ from '@platform/types/observe'; - -export class State extends Holder { - public actions: WrappedAction[] = []; - - public readonly update: Subject = new Subject(); - public readonly observe: $.Observe | undefined; - - private _logger: Logger; - - constructor(ilc: IlcInterface & ChangesDetector, observe?: $.Observe) { - super(); - this.observe = observe; - this._logger = ilc.log(); - ilc.env().subscriber.register(recent.updated.subscribe(this.reload.bind(this))); - this.reload(); - } - - public filtering(value: string) { - this.matcher.search(value); - if (value.trim() === '') { - this.actions.sort((a: WrappedAction, b: WrappedAction) => - b.action.stat.score().recent() >= a.action.stat.score().recent() ? 1 : -1, - ); - } else { - this.actions.sort((a: WrappedAction, b: WrappedAction) => b.getScore() - a.getScore()); - } - this.update.emit(); - } - - public getFilteredActions(): WrappedAction[] { - return this.actions.filter((a: WrappedAction) => a.getScore() > 0); - } - - public remove(uuids: string[]) { - recent - .delete(uuids) - .then(() => { - this.reload(); - }) - .catch((err: Error) => { - this._logger.error(`Fail to remove recent action: ${err.message}`); - }); - } - - public removeAll() { - recent - .get() - .then((actions: Action[]) => { - this.remove(actions.map((action: Action) => action.uuid)); - }) - .catch((err: Error) => { - this._logger.error(`Fail to remove all recent actions: ${err.message}`); - }); - } - - public reload(): void { - recent - .get() - .then((actions: Action[]) => { - this.actions = actions - .filter((action) => action.isSuitable(this.observe)) - .map((action) => new WrappedAction(action, this.matcher)); - this.actions.sort((a: WrappedAction, b: WrappedAction) => { - return b.action.stat.score().recent() >= a.action.stat.score().recent() - ? 1 - : -1; - }); - this.update.emit(); - }) - .catch((error: Error) => { - this._logger.error(`Fail to get recent due error: ${error.message}`); - }); - } -} diff --git a/application/client/src/app/ui/elements/recent/styles.less b/application/client/src/app/ui/elements/recent/styles.less deleted file mode 100644 index 72b72ad278..0000000000 --- a/application/client/src/app/ui/elements/recent/styles.less +++ /dev/null @@ -1,60 +0,0 @@ -@import '../../styles/variables.less'; - - -app-recent-actions { - position: relative; - display: block; - width: 100%; - & div.action { - position: relative; - border-bottom: thin solid var(--scheme-color-4); - padding: 6px 0; - display: flex; - width: 100%; - flex-direction: row; - align-items: flex-start; - & div.column_0 { - - } - & div.column_1 { - flex: auto; - } - &:hover { - background: var(--scheme-color-hover); - &::before { - background: var(--scheme-color-hover); - } - } - &::before { - position: absolute; - display: block; - width: ~"calc(100% + 30px)"; - content: ''; - top:0; - left: -15px; - height: 100%; - } - & p.description { - position: relative; - & span.minor { - padding-left: 12px; - } - & span.major, - & span.minor { - & > span { - background-color: var(--scheme-color-3); - } - } - } - } - & div.filter { - position: absolute; - z-index: 1000; - padding: 6px 12px; - background: var(--scheme-color-warning-light); - top: 6px; - right: 6px; - box-shadow: 3px 3px 3px rgb(0 0 0 / 40%); - border-radius: 3px; - } -} \ No newline at end of file diff --git a/application/client/src/app/ui/elements/recent/template.html b/application/client/src/app/ui/elements/recent/template.html deleted file mode 100644 index 53eb58ad7e..0000000000 --- a/application/client/src/app/ui/elements/recent/template.html +++ /dev/null @@ -1,18 +0,0 @@ - -
-
- -
-
- - -
-
-

- No recent actions -

diff --git a/application/client/src/app/ui/elements/scrollarea/component.ts b/application/client/src/app/ui/elements/scrollarea/component.ts deleted file mode 100644 index dff7709e88..0000000000 --- a/application/client/src/app/ui/elements/scrollarea/component.ts +++ /dev/null @@ -1,228 +0,0 @@ -import { - Component, - OnDestroy, - ChangeDetectorRef, - ViewChild, - Input, - AfterViewInit, - ElementRef, - ChangeDetectionStrategy, - HostBinding, - HostListener, - Output, - EventEmitter, -} from '@angular/core'; -import { Subscriber } from '@platform/env/subscription'; -import { Row, RowSrc } from '@schema/content/row'; -import { Holder } from './controllers/holder'; -import { Service } from './controllers/service'; -import { Frame, ChangesInitiator } from './controllers/frame'; -import { Selecting, SelectionDirection } from './controllers/selection'; -import { Keyboard } from './controllers/keyboard'; -import { ChangesDetector } from '@ui/env/extentions/changes'; -import { RemoveHandler } from '@ui/service/styles'; -import { Ilc, IlcInterface } from '@env/decorators/component'; -import { stop } from '@ui/env/dom'; -import { unique } from '@platform/env/sequence'; - -@Component({ - selector: 'app-scrollarea', - templateUrl: './template.html', - styleUrls: ['./styles.less'], - changeDetection: ChangeDetectionStrategy.OnPush, - standalone: false, -}) -@Ilc() -export class ScrollAreaComponent extends ChangesDetector implements OnDestroy, AfterViewInit { - @ViewChild('content_holder', { static: false }) _nodeHolder!: ElementRef; - - @Input() public service!: Service; - @Input() public tabIndex!: number; - - @Output() public offset = new EventEmitter(); - - private readonly _subscriber: Subscriber = new Subscriber(); - private _id: string = unique(); - private _removeGlobalStyleHandler: RemoveHandler | undefined; - - @HostBinding('tabindex') get tabndex() { - return this.tabIndex === undefined ? 0 : this.tabIndex; - } - - @HostBinding('id') set id(id: string) { - this._id = id; - } - - get id() { - return this._id; - } - - @HostListener('window:keydown', ['$event']) onKeyDown(event: KeyboardEvent) { - this.keyboard.process(event); - } - - @HostListener('window:keyup') onKeyUp() { - this.keyboard.stop(); - } - - @HostListener('window:mouseup', ['$event']) onMouseUp(event: MouseEvent) { - this.selecting.end(event); - } - - @HostListener('window:mousedown', ['$event']) onCheckState(event: MouseEvent) { - this.selecting.check(event); - } - - @HostListener('document:selectionchange') onSelectionChange() { - this.selecting.change(); - } - - @HostListener('focus') onFocus() { - this.keyboard.focus(); - this.service.focus().in(); - } - - @HostListener('blur') onBlur() { - this.keyboard.blur(); - this.service.focus().out(); - } - - public rows: Row[] = []; - public readonly holder: Holder = new Holder(); - public readonly frame: Frame = new Frame(); - public readonly selecting: Selecting = new Selecting(); - public readonly keyboard: Keyboard = new Keyboard(); - public selectionDirection = SelectionDirection; - - constructor(changeDetectorRef: ChangeDetectorRef, private elRef: ElementRef) { - super(changeDetectorRef); - } - - public ngOnDestroy(): void { - this.detauchChangesDetector(); - this.holder.destroy(); - this.frame.destroy(); - this.selecting.destroy(); - this._subscriber.unsubscribe(); - } - - public ngAfterViewInit(): void { - this.holder.bind(this._nodeHolder); - this.frame.bind(this.service, this.holder); - this.service.bind(this.frame, this.elRef.nativeElement); - this.selecting.bind(this._nodeHolder.nativeElement, this.frame, this.service); - this.keyboard.bind(this.frame); - this._subscriber.register( - this.frame.onFrameChange((rows: RowSrc[]) => { - const exists = this.rows.length; - rows.forEach((updated: RowSrc, i: number) => { - if (i < exists) { - this.rows[i].from(updated); - } else { - this.rows.push(new Row(updated)); - } - }); - if (rows.length < exists) { - this.rows.splice(rows.length).forEach((row) => { - row.destroy(); - }); - } - this.markChangesForCheck(); - this.selecting.restore(); - }), - ); - this._subscriber.register( - this.selecting.onSelectionStart(() => { - this._removeGlobalStyleHandler = this.ilc().services.ui.styles - .add(`:not(*[id="${this._id}"] *) { - user-select: none; - }`); - this.markChangesForCheck(); - }), - ); - this._subscriber.register( - this.selecting.onSelectionFinish(() => { - if (typeof this._removeGlobalStyleHandler === 'function') { - this._removeGlobalStyleHandler(); - this._removeGlobalStyleHandler = undefined; - } - this.markChangesForCheck(); - }), - ); - this._subscriber.register( - this.ilc().services.system.hotkeys.listen('G', () => { - if (!this.service.focus().get()) { - return; - } - this.service.scrollToTop(); - }), - ); - this._subscriber.register( - this.ilc().services.system.hotkeys.listen('gg', () => { - if (!this.service.focus().get()) { - return; - } - this.service.scrollToBottom(); - }), - ); - this._subscriber.register( - this.ilc().services.system.hotkeys.listen('Ctrl + C', () => { - if (!this.service.focus().get()) { - return; - } - this.selecting.copyToClipboard().catch((err: Error) => { - this.log().error(`Fail to copy content into clipboard: ${err.message}`); - }); - }), - ); - this.frame.init(); - } - - public getFrameStart(): number { - return this.frame.get().start; - } - - public isSourceSwitched(i: number): boolean { - return this.rows[i - 1] === undefined - ? false - : this.rows[i - 1].source !== this.rows[i].source; - } - - public onScrolling(position: number) { - this.frame.setAdhered(true); - this.frame.moveTo(position, ChangesInitiator.Scrolling); - } - - public onContainerScrolling(event: Event) { - const target = event.target as HTMLElement; - if (target.scrollLeft === undefined) { - return; - } - this.offset.emit(target.scrollLeft); - } - - public onWheel(event: WheelEvent) { - if (Math.abs(event.deltaX) < Math.abs(event.deltaY)) { - this.frame.setAdhered(true); - this.frame.offsetTo(event.deltaY, ChangesInitiator.Wheel); - stop(event); - } - } - - public onMouseDown(event: MouseEvent) { - this.selecting.start(event); - } - - public showSelectionDetectors(): boolean { - return this._removeGlobalStyleHandler !== undefined; - } - - public onMouseInSelectionDetector(direction: SelectionDirection) { - this.selecting.directed().start(direction); - } - - public onMouseOutSelectionDetector() { - this.selecting.directed().finish(); - } -} -export interface ScrollAreaComponent extends IlcInterface {} diff --git a/application/client/src/app/ui/elements/scrollarea/controllers/frame.ts b/application/client/src/app/ui/elements/scrollarea/controllers/frame.ts deleted file mode 100644 index d9bcb80278..0000000000 --- a/application/client/src/app/ui/elements/scrollarea/controllers/frame.ts +++ /dev/null @@ -1,155 +0,0 @@ -import { Subscription, Subject, Subscriber } from '@platform/env/subscription'; -import { Service, Range, IRowsPacket } from './service'; -import { IRange, Range as SafeRange } from '@platform/types/range'; -import { Holder } from './holder'; -import { RowSrc } from '@schema/content/row'; - -export enum ChangesInitiator { - Wheel = 0, - StorageUpdated = 1, - HolderHeight = 2, - Scrolling = 3, - RowsDelivered = 4, - Selecting = 5, - Keyboard = 6, - Refresh = 7, -} - -export interface PositionEvent { - range: IRange; - initiator: ChangesInitiator; -} - -export class Frame extends Subscriber { - private _service!: Service; - private _holder!: Holder; - private _frame: Range = new Range(); - private _rows: RowSrc[] = []; - private _prev: string | undefined; - private readonly _subjects: { - change: Subject; - position: Subject; - } = { - change: new Subject(), - position: new Subject(), - }; - - public bind(service: Service, holder: Holder) { - this._service = service; - this._holder = holder; - this.register( - this._frame.onChange((initiator: ChangesInitiator) => { - this._subjects.position.emit({ range: this._frame.get(), initiator }); - const prev = this._prev; - this._prev = this._frame.hash(); - if (this._frame.isEmpty()) { - this._service.setLen(this._frame.getTotal()); - this._rows = []; - this._subjects.change.emit(this._rows); - } else if (initiator === ChangesInitiator.Refresh || prev !== this._prev) { - this._service.setFrame(this._frame.get()); - } else if (!this._frame.isEmpty()) { - this._service.setLen(this._frame.getTotal()); - this._service.setFrame(this._frame.get()); - } else { - this._service.setLen(this._frame.getTotal()); - } - }), - this._holder.onHeightChange((height: number) => { - this._frame.setLength( - Math.floor(height / this._service.getItemHeight()), - ChangesInitiator.HolderHeight, - ); - this._service.setFrame(this._frame.get()); - }), - this._service.onRows((packet: IRowsPacket) => { - if (!this._frame.equal(packet.range)) { - return; - } - this._rows = packet.rows; - this._subjects.change.emit(this._rows); - }), - this._service.onRefresh(() => { - this._frame.refresh(ChangesInitiator.Refresh); - }), - this._service.onLen((len: number) => { - this._frame.setTotal(len, ChangesInitiator.StorageUpdated); - }), - ); - } - - public destroy(): void { - this.unsubscribe(); - this._subjects.change.destroy(); - this._subjects.position.destroy(); - } - - public init() { - const cursor = this._service.getCursor(); - this._frame.setLength( - Math.floor(this._holder.getHeight() / this._service.getItemHeight()), - ChangesInitiator.HolderHeight, - ); - this._frame.setTotal(this._service.getLen(), ChangesInitiator.Scrolling); - this._frame.moveTo(cursor, ChangesInitiator.Scrolling); - this._service.setFrame(this._frame.get()); - } - - public setAdhered(adhered: boolean) { - this._frame.setAdhered(adhered); - } - - public get(): SafeRange { - return this._frame.get(); - } - - public moveTo(start: number, initiator: ChangesInitiator) { - this._frame.moveTo(start, initiator); - } - - public move(initiator: ChangesInitiator): { - down(): void; - up(): void; - pgdown(): void; - pgup(): void; - } { - return { - down: (): void => { - this.offsetToByRows(1, initiator); - }, - up: (): void => { - this.offsetToByRows(-1, initiator); - }, - pgdown: (): void => { - this.offsetToByRows(this.getFrameLen(), initiator); - }, - pgup: (): void => { - this.offsetToByRows(-this.getFrameLen(), initiator); - }, - }; - } - public offsetTo(offsetPx: number, initiator: ChangesInitiator) { - const offset = Math.round(offsetPx / this._service.getItemHeight()); - this._frame.offsetTo(offset === 0 ? 1 * (offsetPx < 0 ? -1 : 1) : offset, initiator); - } - - public offsetToByRows(offsetRow: number, initiator: ChangesInitiator) { - this._frame.offsetTo(offsetRow, initiator); - } - - public getFrameLen(): number { - return this._frame.getLength(); - } - - public getRows(): RowSrc[] { - return this._rows; - } - - public onFrameChange(handler: (rows: RowSrc[]) => void): Subscription { - return this._subjects.change.subscribe(handler); - } - - public onPositionChange(handler: (position: PositionEvent) => void): Subscription { - return this._subjects.position.subscribe(handler); - } -} diff --git a/application/client/src/app/ui/elements/scrollarea/controllers/holder.ts b/application/client/src/app/ui/elements/scrollarea/controllers/holder.ts deleted file mode 100644 index 7541b8dabc..0000000000 --- a/application/client/src/app/ui/elements/scrollarea/controllers/holder.ts +++ /dev/null @@ -1,49 +0,0 @@ -import { ElementRef } from '@angular/core'; -import { Subscription, Subject } from '@platform/env/subscription'; - -export class Holder { - private _elementRef!: HTMLElement; - private _domRect!: DOMRect; - private readonly _subjects: { - change: Subject; - } = { - change: new Subject(), - }; - private _resizeObserve: ResizeObserver | undefined; - - public destroy() { - if (this._resizeObserve !== undefined) { - this._resizeObserve.unobserve(this._elementRef); - } - this._subjects.change.destroy(); - } - - public bind(elementRef: ElementRef) { - if (this._resizeObserve !== undefined) { - throw new Error(`Holder cannot be bound muliple times`); - } - this._resizeObserve = new ResizeObserver((entries: ResizeObserverEntry[]) => { - if (entries.length !== 1) { - return; - } - this._detect(entries[0].contentRect); - }); - this._elementRef = elementRef.nativeElement; - this._resizeObserve.observe(this._elementRef); - this._detect(this._elementRef.getBoundingClientRect()); - } - - public getHeight(): number { - return this._domRect.height; - } - - public onHeightChange(handler: (height: number) => void): Subscription { - return this._subjects.change.subscribe(handler); - } - - private _detect(rect: DOMRect) { - const changed = this._domRect === undefined ? true : rect.height !== this._domRect.height; - this._domRect = rect; - changed && this._subjects.change.emit(this._domRect.height); - } -} diff --git a/application/client/src/app/ui/elements/scrollarea/controllers/keyboard.ts b/application/client/src/app/ui/elements/scrollarea/controllers/keyboard.ts deleted file mode 100644 index 3afba33c1e..0000000000 --- a/application/client/src/app/ui/elements/scrollarea/controllers/keyboard.ts +++ /dev/null @@ -1,64 +0,0 @@ -import { Frame, ChangesInitiator } from './frame'; -export class Keyboard { - static START_REPEAT_DURATION_MS = 400; - static MIN_REPEAT_DURATION_MS = 200; - static STEP_REPEAT_DURATION = 0.05; - - protected focused: boolean = false; - protected frame!: Frame; - - private _repeating: number | undefined; - private _duration: number = 0; - - public bind(frame: Frame) { - this.frame = frame; - } - - public process(event: KeyboardEvent) { - this._duration = Keyboard.START_REPEAT_DURATION_MS; - this._process(event.code); - } - - public stop() { - clearTimeout(this._repeating); - } - - public focus() { - this.focused = true; - } - - public blur() { - this.focused = false; - } - - private _process(code: string) { - if (!this.focused) { - return; - } - switch (code) { - case 'ArrowUp': - this.frame.move(ChangesInitiator.Keyboard).up(); - break; - case 'ArrowDown': - this.frame.move(ChangesInitiator.Keyboard).down(); - break; - case 'PageDown': - this.frame.move(ChangesInitiator.Keyboard).pgdown(); - break; - case 'PageUp': - this.frame.move(ChangesInitiator.Keyboard).pgup(); - break; - } - if (this._duration > Keyboard.MIN_REPEAT_DURATION_MS) { - this._duration = this._duration - this._duration * Keyboard.STEP_REPEAT_DURATION; - } - if (this._duration <= Keyboard.MIN_REPEAT_DURATION_MS) { - this._duration = Keyboard.MIN_REPEAT_DURATION_MS; - } - clearTimeout(this._repeating); - this._repeating = setTimeout( - this._process.bind(this, code), - this._duration, - ) as unknown as number; - } -} diff --git a/application/client/src/app/ui/elements/scrollarea/controllers/range.ts b/application/client/src/app/ui/elements/scrollarea/controllers/range.ts deleted file mode 100644 index 9721cef91f..0000000000 --- a/application/client/src/app/ui/elements/scrollarea/controllers/range.ts +++ /dev/null @@ -1,107 +0,0 @@ -import { Subscription, Subject } from '@platform/env/subscription'; -import { IRange, Range as SafeRange } from '@platform/types/range'; -import { ChangesInitiator } from './frame'; -import { LimittedRange } from '@ui/env/entities/range.limited'; - -export class Range { - private range: LimittedRange = new LimittedRange('scroll_area_range', 0, 0, 0, 0, true); - // Set default state of sticky scrolling; true - initianally sticky scrolling; false - not - private adhered: boolean = false; - private readonly _subjects: { - change: Subject; - } = { - change: new Subject(), - }; - constructor(defaults?: { range: IRange; len: number; total: number }) { - if (defaults !== undefined) { - this.range - .$(defaults.total) - .max(true) - .$(defaults.len) - .len() - .$(defaults.range.start) - .from() - .$(defaults.range.end) - .to(); - } - } - - public destroy() { - this._subjects.change.destroy(); - } - - public setAdhered(adhered: boolean) { - this.adhered = adhered; - } - - public setLength(len: number, initiator: ChangesInitiator) { - const prev = this.range.hash(); - this.range.$(len).len(); - if (prev !== this.range.hash()) { - this._subjects.change.emit(initiator); - } - } - - public getLength(): number { - return this.range.len; - } - - public getTotal(): number { - return this.range.max; - } - - public setTotal(total: number, initiator: ChangesInitiator) { - const prev = this.range.hash(); - this.range.$(total).max(this.adhered); - if (prev !== this.range.hash()) { - this._subjects.change.emit(initiator); - } - } - - public moveTo(from: number, initiator: ChangesInitiator) { - const prev = this.range.hash(); - if (from > this.range.max) { - throw new Error(`Fail to move cursor outside of available data`); - } - this.range.$(from).from(); - if (prev !== this.range.hash()) { - this._subjects.change.emit(initiator); - } - } - - public offsetTo(offset: number, initiator: ChangesInitiator) { - const prev = this.range.hash(); - if (offset < 0) { - this.range.$(this.range.from + offset).from(); - } else { - this.range.$(this.range.from + offset + this.range.len).to(); - } - if (prev !== this.range.hash()) { - this._subjects.change.emit(initiator); - } - } - - public refresh(initiator: ChangesInitiator) { - this._subjects.change.emit(initiator); - } - - public get(): SafeRange { - return new SafeRange(this.range.from, this.range.to); - } - - public equal(range: IRange): boolean { - return this.range.from === range.start && this.range.to === range.end; - } - - public onChange(handler: (ci: ChangesInitiator) => void): Subscription { - return this._subjects.change.subscribe(handler); - } - - public hash(): string { - return `${this.getLength()}:${this.get().start}-${this.get().end}`; - } - - public isEmpty(): boolean { - return this.range.max === 0; - } -} diff --git a/application/client/src/app/ui/elements/scrollarea/controllers/selection.node.ts b/application/client/src/app/ui/elements/scrollarea/controllers/selection.node.ts deleted file mode 100644 index 4f44c393f6..0000000000 --- a/application/client/src/app/ui/elements/scrollarea/controllers/selection.node.ts +++ /dev/null @@ -1,41 +0,0 @@ -export class SelectionNode { - public static select(parent: HTMLElement, path: string): Node | null { - let selector: string = path; - let textNodeIndex: number = -1; - if (selector.indexOf('#text') !== -1) { - const parts: string[] = selector.split(`#text:`); - if (parts.length !== 2) { - return null; - } - textNodeIndex = parseInt(parts[1], 10); - if (isNaN(textNodeIndex) || !isFinite(textNodeIndex)) { - return null; - } - selector = selector.replace(/#text:\d*/gi, '').trim(); - } - let node: ChildNode | null = parent.querySelector(selector); - if (node === null) { - return null; - } - if (textNodeIndex !== -1 && node.childNodes.length === 0) { - return null; - } - if (textNodeIndex !== -1 && node.childNodes.length !== 0) { - node = - node.childNodes[textNodeIndex] === undefined - ? null - : node.childNodes[textNodeIndex]; - node = node === null ? null : node.nodeType !== Node.TEXT_NODE ? null : node; - } - return node; - } - - private _node: Node | null = null; - - public set(node: Node | null) { - this._node = node; - } - public get(): Node | null { - return this._node; - } -} diff --git a/application/client/src/app/ui/elements/scrollarea/controllers/selection.nodeinfo.ts b/application/client/src/app/ui/elements/scrollarea/controllers/selection.nodeinfo.ts deleted file mode 100644 index d8f5d77851..0000000000 --- a/application/client/src/app/ui/elements/scrollarea/controllers/selection.nodeinfo.ts +++ /dev/null @@ -1,201 +0,0 @@ -import { SelectionNode } from './selection.node'; - -export const ROW_INDEX_ATTR: string = 'data-row-index'; -export const ROOT_ROW_NODE: string = 'li'; - -export enum Target { - Focus = 0, - Anchor = 1, -} - -export interface IRowNodeInfo { - path: string; - index: number; -} - -export interface RestorableNodeInfo { - row: number; - path: string; - offset: number; - node: SelectionNode; -} - -export class NodeInfo { - public row: number | undefined; - public path: string | undefined; - public offset: number | undefined; - public node: SelectionNode = new SelectionNode(); - private _target: Target; - - constructor(target: Target) { - this._target = target; - } - - public get(): RestorableNodeInfo | undefined { - if ( - this.row === undefined || - this.path === undefined || - this.offset === undefined || - this.node === null - ) { - return undefined; - } else { - return { - row: this.row, - path: this.path, - offset: this.offset, - node: this.node, - }; - } - } - - public update(selection: Selection) { - if (this._target === Target.Anchor && this.row !== undefined) { - return; - } - const accessor = this._getAccessor(selection); - if (accessor.node()?.nodeType === Node.COMMENT_NODE) { - return; - } - if (this.node.get() !== accessor.node()) { - const rowInfo: IRowNodeInfo | undefined = this._getRowInfo(accessor.node()); - if (rowInfo === undefined) { - this.node.set(null); - return; - } - this.path = rowInfo.path; - this.row = rowInfo.index; - this.node.set(accessor.node()); - this.offset = accessor.offset(); - } else { - this.offset = accessor.offset(); - } - if (this._target === Target.Anchor && this.row === undefined) { - console.log(`${this.path} / ${this.row} / ${this.offset}`); - } - } - - public setToRow(rowIndex: number) { - this.path = `${ROOT_ROW_NODE}[${ROW_INDEX_ATTR}="${rowIndex}"]`; - this.row = rowIndex; - this.offset = 0; - this.node.set(null); - } - - private _getRowInfo(node: Node | null, path: string = ''): IRowNodeInfo | undefined { - if (node === null) { - return undefined; - } - if (node.parentNode === undefined || node.parentNode === null) { - return undefined; - } - if (node.nodeName.toLowerCase() === 'body') { - return undefined; - } - const rowIndex: number | undefined = this._getIndexAttr(node); - if (rowIndex !== undefined) { - return { - index: rowIndex, - path: `${node.nodeName.toLowerCase()}[${ROW_INDEX_ATTR}="${rowIndex}"]${ - path !== '' ? ' ' : '' - }${path}`, - }; - } else if (node.nodeType === Node.TEXT_NODE) { - const textNodeIndex: number = this._getTextNodeIndex(node); - return textNodeIndex === -1 - ? undefined - : this._getRowInfo(node.parentNode as HTMLElement, `#text:${textNodeIndex}`); - } else if (node.parentNode.children.length !== 0 && rowIndex === undefined) { - const childIndex: number = this._getChildIndex(node); - return childIndex === -1 - ? undefined - : this._getRowInfo( - node.parentNode, - `${node.nodeName.toLowerCase()}:nth-child(${childIndex + 1})${ - path !== '' ? ' ' : '' - }${path}`, - ); - } else { - return this._getRowInfo( - node.parentNode as HTMLElement, - `${node.nodeName.toLowerCase()}${path !== '' ? ' ' : ''}${path}`, - ); - } - } - - private _getAccessor(selection: Selection): { - node(): Node | null; - offset(): number; - } { - const self = this; - return { - node(): Node | null { - return self._target === Target.Focus ? selection.focusNode : selection.anchorNode; - }, - offset(): number { - return self._target === Target.Focus - ? selection.focusOffset - : selection.anchorOffset; - }, - }; - } - - private _getIndexAttr(node: Node): number | undefined { - if (typeof (node as HTMLElement).getAttribute !== 'function') { - return undefined; - } - const attr: string | null = (node as HTMLElement).getAttribute(ROW_INDEX_ATTR); - if (attr === null || attr.trim().length === 0) { - return undefined; - } - const index = parseInt(attr, 10); - if (isNaN(index) || !isFinite(index)) { - return undefined; - } - return index; - } - - private _getTextNodeIndex(node: Node): number { - if (node.parentNode === null) { - return -1; - } - let index: number = -1; - try { - Array.prototype.forEach.call(node.parentNode.childNodes, (child: Node, i: number) => { - if (node === child) { - index = i; - throw `found`; - } - }); - } catch (_) { - // Exit from forEach; - } - return index; - } - - private _getChildIndex(node: Node): number { - if (node.parentNode === null) { - return -1; - } - let index: number = -1; - try { - Array.prototype.forEach.call(node.parentNode.children, (child: Node, i: number) => { - if (node === child) { - index = i; - throw `found`; - } - }); - } catch (_) { - // Exit from forEach; - } - return index; - } -} - -export function getFocusNodeInfo(): NodeInfo { - return new NodeInfo(Target.Focus); -} - -export function getAnchorNodeInfo(): NodeInfo { - return new NodeInfo(Target.Anchor); -} diff --git a/application/client/src/app/ui/elements/scrollarea/controllers/selection.ts b/application/client/src/app/ui/elements/scrollarea/controllers/selection.ts deleted file mode 100644 index 653c7750bb..0000000000 --- a/application/client/src/app/ui/elements/scrollarea/controllers/selection.ts +++ /dev/null @@ -1,491 +0,0 @@ -import { Frame, ChangesInitiator } from './frame'; -import { Subject, Subscription } from '@platform/env/subscription'; -import { - ROW_INDEX_ATTR, - NodeInfo, - RestorableNodeInfo, - getFocusNodeInfo, - getAnchorNodeInfo, -} from './selection.nodeinfo'; -import { SelectionNode } from './selection.node'; -import { Service } from './service'; -import { escapeAnsi } from '@module/ansi'; - -import * as nums from '@platform/env/num'; -import * as dom from '@ui/env/dom'; - -const DIRECTED_SCROLL_TIMEOUT_MS = 50; - -export enum SelectionDirection { - Top = 'Top', - Bottom = 'Bottom', -} - -export interface ISelection { - rows: { - start: number; - end: number; - }; - fragments: { - start: string; - end: string; - }; -} - -export class Selecting { - private _frame!: Frame; - private _holder!: HTMLElement; - private _service!: Service; - private _progress: boolean = false; - private _directed: { - direction: SelectionDirection; - timer: number; - } = { - direction: SelectionDirection.Bottom, - timer: -1, - }; - private _selection: { - focus: NodeInfo; - anchor: NodeInfo; - start: string | undefined; - end: string | undefined; - } = { - focus: getFocusNodeInfo(), - anchor: getAnchorNodeInfo(), - start: undefined, - end: undefined, - }; - private _subjects: { - from: Subject; - finish: Subject; - } = { - from: new Subject(), - finish: new Subject(), - }; - private _delimiter: string | undefined; - - protected copyRows(rows: string[]): void { - const delimiter = this._delimiter; - if (rows.length === 0) { - return; - } - if (delimiter === undefined) { - navigator.clipboard.writeText(rows.join('\n')); - } else { - const columns = rows.map((r) => r.split(delimiter)); - const widths = new Array(columns[0].length); - columns.forEach((rows: string[]) => { - rows.forEach((r, i) => { - if (widths[i] === undefined) { - widths[i] = 0; - } - widths[i] = Math.max(widths[i], r.length); - }); - }); - const formated = columns.map((rows: string[]) => { - return rows - .map((r, i) => { - const repeat = nums.diffUInts([widths[i], r.length], 0); - return `${r}${' '.repeat(repeat < 0 ? 0 : repeat)}`; - }) - .join(' | '); - }); - navigator.clipboard.writeText(formated.join('\n')); - } - } - - public bind(holder: HTMLElement, frame: Frame, service: Service) { - this._holder = holder; - this._frame = frame; - this._service = service; - } - - public destroy() {} - - public isInProgress(): boolean { - return this._progress; - } - - public restore() { - const getMaxOffset = (node: Node): number => { - if (node.nodeType === Node.TEXT_NODE) { - return node.textContent === null ? 0 : node.textContent.length - 1; - } else if (node.childNodes.length > 0) { - return node.childNodes.length; - } else { - return 0; - } - }; - if (!this.hasSelection()) { - return; - } - const frame = this._frame.get(); - const focus: RestorableNodeInfo | undefined = this._selection.focus.get(); - const anchor: RestorableNodeInfo | undefined = this._selection.anchor.get(); - const selection: Selection | null = document.getSelection(); - if (!focus || !anchor) { - return; - } - if ( - (focus.row < frame.start && anchor.row < frame.start) || - (focus.row > frame.end && anchor.row > frame.end) - ) { - if (selection !== null) { - selection.removeAllRanges(); - } - return; - } - let anchorOffset: number = -1; - let focusOffset: number = -1; - let anchorPath: string = ''; - let focusPath: string = ''; - if (focus.row === anchor.row) { - anchorOffset = anchor.offset; - focusOffset = focus.offset; - anchorPath = anchor.path; - focusPath = focus.path; - } else if (focus.row > anchor.row) { - // Direction: down - anchorOffset = anchor.row < frame.start ? 0 : anchor.offset; - focusOffset = focus.row > frame.end ? Infinity : focus.offset; - anchorPath = - anchor.row < frame.start ? `li[${ROW_INDEX_ATTR}="${frame.start}"]` : anchor.path; - focusPath = focus.row > frame.end ? `li[${ROW_INDEX_ATTR}="${frame.end}"]` : focus.path; - } else if (focus.row < anchor.row) { - // Direction: up - anchorOffset = anchor.row > frame.end ? Infinity : anchor.offset; - focusOffset = focus.row < frame.start ? 0 : focus.offset; - anchorPath = - anchor.row > frame.end ? `li[${ROW_INDEX_ATTR}="${frame.end}"]` : anchor.path; - focusPath = - focus.row < frame.start ? `li[${ROW_INDEX_ATTR}="${frame.start}"]` : focus.path; - } - if (selection === null) { - return; - } - selection.removeAllRanges(); - const anchorNode: Node | null = SelectionNode.select(this._holder, anchorPath); - const focusNode: Node | null = SelectionNode.select(this._holder, focusPath); - if (anchorNode === null || focusNode === null) { - return; - } - if ( - !isFinite(anchorOffset) || - (typeof anchorNode.textContent === 'string' && - anchorNode.textContent.length <= anchorOffset) - ) { - anchorOffset = getMaxOffset(anchorNode); - } - if ( - !isFinite(focusOffset) || - (typeof focusNode.textContent === 'string' && - focusNode.textContent.length <= focusOffset) - ) { - focusOffset = getMaxOffset(focusNode); - } - try { - selection.setBaseAndExtent(anchorNode, anchorOffset, focusNode, focusOffset); - } catch (e) { - let details: string = 'Error with restoring selection:'; - details += `\n\t-\tanchorPath: ${anchorPath}`; - details += `\n\t-\tfocusNode: ${focusPath}`; - if (typeof anchorNode.textContent === 'string') { - details += `\n\t-\t${ - anchorNode.textContent.length <= anchorOffset ? '[WRONG]' : '' - }anchor (${anchorNode.nodeName}): "${anchorNode.textContent}" (${ - anchorNode.textContent.length - }): ${anchorOffset}`; - } - if (typeof focusNode.textContent === 'string') { - details += `\n\t-\t${ - focusNode.textContent.length <= focusOffset ? '[WRONG]' : '' - }focus (${focusNode.nodeName}): "${focusNode.textContent}" (${ - focusNode.textContent.length - }): ${focusOffset}`; - } - details += `\n\t-\terror: ${e instanceof Error ? e.message : e}`; - console.warn(details); - } - } - - public onSelectionStart(handler: () => void): Subscription { - return this._subjects.from.subscribe(handler); - } - - public onSelectionFinish(handler: () => void): Subscription { - return this._subjects.finish.subscribe(handler); - } - - public directed(): { - start(direction: SelectionDirection): void; - next(): void; - finish(): void; - } { - return { - start: (direction: SelectionDirection): void => { - if (!this._progress) { - return; - } - this._directed.direction = direction; - this.directed().next(); - }, - next: (): void => { - if (!this._progress) { - return; - } - clearTimeout(this._directed.timer); - switch (this._directed.direction) { - case SelectionDirection.Top: - this._frame.offsetToByRows(-1, ChangesInitiator.Selecting); - this._selection.focus.setToRow(this._frame.get().start); - break; - case SelectionDirection.Bottom: - this._frame.offsetToByRows(1, ChangesInitiator.Selecting); - this._selection.focus.setToRow(this._frame.get().end); - break; - } - this._holder.focus(); - this._directed.timer = setTimeout(() => { - this.directed().next(); - }, DIRECTED_SCROLL_TIMEOUT_MS) as any; - }, - finish: (): void => { - clearTimeout(this._directed.timer); - this._directed.timer = -1; - }, - }; - } - - public get(): ISelection | string | undefined { - if (this._selection.focus.row === undefined || this._selection.anchor.row === undefined) { - return undefined; - } - if (this._selection.focus.row === this._selection.anchor.row) { - const selection = document.getSelection(); - const output = selection === null ? undefined : selection.toString(); - return output === null ? undefined : output === '' ? undefined : output; - } - if (this._selection.start === undefined || this._selection.end === undefined) { - return undefined; - } - const rows = { - start: Math.min(this._selection.focus.row, this._selection.anchor.row), - end: Math.max(this._selection.focus.row, this._selection.anchor.row), - }; - const fragments = { - start: this._selection.start, - end: this._selection.end, - }; - if (fragments.start !== fragments.end) { - fragments.start === '' && (rows.start += 1); - fragments.end === '' && (rows.end -= 1); - } - return { - rows, - fragments, - }; - } - - public getAsSelection(): ISelection | undefined { - if (this._selection.focus.row === undefined || this._selection.anchor.row === undefined) { - return undefined; - } - const selection: Selection | null = document.getSelection(); - if ( - (this._selection.start === undefined || this._selection.end === undefined) && - selection !== null - ) { - this._selection.start = selection.toString(); - this._selection.end = selection.toString(); - } - if (this._selection.start === undefined || this._selection.end === undefined) { - return undefined; - } - const rows = { - start: Math.min(this._selection.focus.row, this._selection.anchor.row), - end: Math.max(this._selection.focus.row, this._selection.anchor.row), - }; - const fragments = { - start: this._selection.start, - end: this._selection.end, - }; - if (fragments.start !== fragments.end) { - fragments.start === '' && (rows.start += 1); - fragments.end === '' && (rows.end -= 1); - } - return { - rows, - fragments, - }; - } - - public selection(): { exist: boolean; lines: number } { - const selection = this.get(); - if (selection === undefined) { - return { - exist: false, - lines: 0, - }; - } else { - const len = - typeof selection === 'string' ? 1 : selection.rows.end - selection.rows.start + 1; - return { - exist: selection !== undefined, - lines: len < 0 ? 0 : len, - }; - } - } - - public async copyToClipboard(): Promise { - const selection = this.get(); - if (selection === undefined) { - return Promise.resolve(); - } - if (typeof selection === 'string') { - navigator.clipboard.writeText(selection); - return Promise.resolve(); - } - const rows = ( - await this._service.getRows({ start: selection.rows.start, end: selection.rows.end }) - ).rows.map((r) => { - if (this._delimiter === undefined) { - const escaped = escapeAnsi(r.content); - return escaped instanceof Error ? r.content : escaped; - } else { - return r.content; - } - }); - if (rows.length === 0) { - return Promise.resolve(); - } - if (rows.length > 1 && this._delimiter === undefined) { - selection.fragments.start !== '' && (rows[0] = selection.fragments.start); - selection.fragments.end !== '' && (rows[rows.length - 1] = selection.fragments.end); - } - this.copyRows(rows); - } - - public setDelimiter(delimiter: string | undefined): void { - this._delimiter = delimiter; - } - - public drop() { - this._selection = { - focus: getFocusNodeInfo(), - anchor: getAnchorNodeInfo(), - start: undefined, - end: undefined, - }; - const selection: Selection | null = document.getSelection(); - selection && selection.removeAllRanges(); - } - - public hasSelection(): boolean { - return this._selection.focus !== undefined || this._selection.anchor !== undefined; - } - - public start(event: MouseEvent) { - if (event.button !== undefined && event.button !== 0) { - // Context menu call - return; - } - this.drop(); - this._progress = true; - this._holder.focus(); - this._subjects.from.emit(); - } - - public change() { - if (!this._progress) { - return; - } - const selection: Selection | null = document.getSelection(); - if (selection === null) { - return; - } - this._selection.focus.update(selection); - this._selection.anchor.update(selection); - this._detectBorders(selection); - } - - public end(event: MouseEvent) { - if (event.button !== undefined && event.button !== 0) { - // Context menu call - return; - } - if (!this._progress) { - if (!this._isOwnSelection()) { - this._selection = { - focus: getFocusNodeInfo(), - anchor: getAnchorNodeInfo(), - start: undefined, - end: undefined, - }; - } - return; - } - this._progress = false; - this._subjects.finish.emit(); - } - - public check(event: MouseEvent) { - if (!dom.findParentByTag(event.target as HTMLElement, ['app-scrollarea'])) { - return this.drop(); - } - if (!dom.isParent(event.target as HTMLElement, this._holder)) { - return; - } - setTimeout(() => { - if (this._progress) { - return; - } - if (!this.hasSelection()) { - return; - } - this.restore(); - }, 10); - } - - private _detectBorders(selection: Selection): void { - const asText = selection.toString().split(/[\n\r]/gi); - if ( - this._selection.focus.row !== undefined && - this._selection.anchor.row !== undefined && - asText.length > 0 - ) { - if (this._selection.focus.row > this._selection.anchor.row) { - this._selection.end = asText[asText.length - 1]; - if (this._selection.start === undefined) { - this._selection.start = asText[0]; - } - } else if (this._selection.focus.row < this._selection.anchor.row) { - this._selection.start = asText[0]; - if (this._selection.end === undefined) { - this._selection.end = asText[asText.length - 1]; - } - } else if (this._selection.focus.row === this._selection.anchor.row) { - this._selection.start = undefined; - this._selection.end = undefined; - } - } - } - - private _isOwnSelection(): boolean { - const selection: Selection | null = document.getSelection(); - if (selection === null) { - return false; - } - for (let i = 0; i < selection.rangeCount; i += 1) { - try { - if ( - !dom.isParentOf(selection.getRangeAt(i).commonAncestorContainer, this._holder) - ) { - return false; - } - } catch (_e) { - return false; - } - } - return true; - } -} diff --git a/application/client/src/app/ui/elements/scrollarea/controllers/service.ts b/application/client/src/app/ui/elements/scrollarea/controllers/service.ts deleted file mode 100644 index 317d83cfa8..0000000000 --- a/application/client/src/app/ui/elements/scrollarea/controllers/service.ts +++ /dev/null @@ -1,167 +0,0 @@ -import { RowSrc } from '@schema/content/row'; -import { Range } from './range'; -import { Subject, Subscription } from '@platform/env/subscription'; -import { IRange, Range as SafeRange } from '@platform/types/range'; -import { Destroy } from '@platform/types/env/types'; -import { ChangesInitiator, Frame } from './frame'; - -export { Range }; - -export interface IRowsPacket { - range: IRange; - rows: RowSrc[]; -} - -export type CursorCorrectorHandler = () => number; - -export class Service implements Destroy { - public readonly setFrame: (range: SafeRange) => void; - public readonly getLen: () => number; - public readonly getItemHeight: () => number; - public readonly getRows: (range: IRange) => Promise; - - protected frame!: Frame; - protected elRef!: HTMLElement; - - private _focus: boolean = false; - private readonly _subjects: { - rows: Subject; - refresh: Subject; - len: Subject; - bound: Subject; - focus: Subject; - blur: Subject; - } = { - rows: new Subject(), - refresh: new Subject(), - len: new Subject(), - bound: new Subject(), - focus: new Subject(), - blur: new Subject(), - }; - private _cursor: number = 0; - - constructor(api: { - setFrame(range: IRange): void; - getRows(range: IRange): Promise; - getLen(): number; - getItemHeight(): number; - }) { - this.setFrame = (range: SafeRange) => { - api.setFrame(range); - this._cursor = range.start; - }; - this.getLen = api.getLen; - this.getItemHeight = api.getItemHeight; - this.getRows = api.getRows; - } - - public bind(frame: Frame, elRef: HTMLElement) { - this.frame = frame; - this.elRef = elRef; - this._subjects.bound.emit(); - } - - public getFrame(): Frame { - return this.frame; - } - - public destroy() { - this._subjects.rows.destroy(); - this._subjects.len.destroy(); - this._subjects.refresh.destroy(); - this._subjects.bound.destroy(); - this._subjects.focus.destroy(); - this._subjects.blur.destroy(); - } - - public setAdhered(adhered: boolean) { - if (this.frame === undefined) { - console.error(`Attempt to access frame before initialization`); - return; - } - this.frame.setAdhered(adhered); - } - - public setLen(len: number) { - this._subjects.len.emit(len); - } - - public scrollTo(position: number) { - this.frame.moveTo(position, ChangesInitiator.Selecting); - } - - public scrollToBottom() { - this.frame.moveTo(this.getLen() - 1, ChangesInitiator.Selecting); - } - - public scrollToTop() { - this.frame.moveTo(0, ChangesInitiator.Selecting); - } - - public setRows(rows: IRowsPacket) { - this._subjects.rows.emit(rows); - } - - public onRows(handler: (rows: IRowsPacket) => void): Subscription { - return this._subjects.rows.subscribe(handler); - } - - public onBound(handler: () => void): Subscription { - return this._subjects.bound.subscribe(handler); - } - - public onLen(handler: (len: number) => void): Subscription { - return this._subjects.len.subscribe(handler); - } - - public onRefresh(handler: () => void): Subscription { - return this._subjects.refresh.subscribe(handler); - } - - public onFocus(handler: () => void): Subscription { - return this._subjects.focus.subscribe(handler); - } - - public onBlur(handler: () => void): Subscription { - return this._subjects.blur.subscribe(handler); - } - - public getCursor(): number { - return this._cursor; - } - - public refresh(): void { - this._subjects.refresh.emit(); - } - - public focus(): { - get(): boolean; - in(): void; - out(): void; - set(): void; - } { - return { - get: (): boolean => { - return this._focus; - }, - in: (): void => { - if (this._focus) { - return; - } - this._focus = true; - this._subjects.focus.emit(); - }, - out: (): void => { - if (!this._focus) { - return; - } - this._focus = false; - this._subjects.blur.emit(); - }, - set: (): void => { - this.elRef !== undefined && this.elRef.focus(); - }, - }; - } -} diff --git a/application/client/src/app/ui/elements/scrollarea/module.ts b/application/client/src/app/ui/elements/scrollarea/module.ts deleted file mode 100644 index 1d198f5a71..0000000000 --- a/application/client/src/app/ui/elements/scrollarea/module.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { NgModule } from '@angular/core'; -import { CommonModule } from '@angular/common'; - -import { ScrollAreaComponent } from './component'; -import { ScrollAreaVerticalComponent } from './vertical/component'; -import { RowModule } from './row/module'; - -export { ScrollAreaComponent }; - -@NgModule({ - imports: [CommonModule, RowModule], - declarations: [ScrollAreaComponent, ScrollAreaVerticalComponent], - exports: [ScrollAreaComponent, RowModule], - bootstrap: [ScrollAreaComponent], -}) -export class ScrollAreaModule {} diff --git a/application/client/src/app/ui/elements/scrollarea/row/columns/cell.ts b/application/client/src/app/ui/elements/scrollarea/row/columns/cell.ts deleted file mode 100644 index 11f4019021..0000000000 --- a/application/client/src/app/ui/elements/scrollarea/row/columns/cell.ts +++ /dev/null @@ -1,48 +0,0 @@ -import { DomSanitizer, SafeHtml } from '@angular/platform-browser'; -import { Columns } from '@schema/render/columns'; - -export interface Update { - styles(): Update; - content(content: string): Update; - visability(): Update; -} -export class Cell { - public content: string; - public html!: SafeHtml; - public styles: { [key: string]: string } = {}; - public visible: boolean = true; - public readonly index: number; - - private readonly _sanitizer: DomSanitizer; - private readonly _controller: Columns; - - constructor(sanitizer: DomSanitizer, controller: Columns, content: string, index: number) { - this._sanitizer = sanitizer; - this._controller = controller; - this.content = content; - this.index = index; - this.update().content(content).visability().styles(); - } - - public update(): Update { - const update = { - styles: (): Update => { - this.styles = this._controller.style(this.index); - return update; - }, - content: (content: string): Update => { - if (this.content === content && this.html !== undefined) { - return update; - } - this.content = content; - this.html = this._sanitizer.bypassSecurityTrustHtml(content); - return update; - }, - visability: (): Update => { - this.visible = this._controller.visibility(this.index).get(); - return update; - }, - }; - return update; - } -} diff --git a/application/client/src/app/ui/elements/scrollarea/row/columns/component.ts b/application/client/src/app/ui/elements/scrollarea/row/columns/component.ts deleted file mode 100644 index 858ffa39d0..0000000000 --- a/application/client/src/app/ui/elements/scrollarea/row/columns/component.ts +++ /dev/null @@ -1,84 +0,0 @@ -import { - Component, - Input, - ChangeDetectorRef, - AfterContentInit, - HostBinding, - SkipSelf, - ViewEncapsulation, - ChangeDetectionStrategy, -} from '@angular/core'; -import { DomSanitizer } from '@angular/platform-browser'; -import { Row } from '@schema/content/row'; -import { Ilc, IlcInterface } from '@env/decorators/component'; -import { Columns as Controller } from '@schema/render/columns'; -import { Cell } from './cell'; -import { ChangesDetector } from '@ui/env/extentions/changes'; - -@Component({ - selector: 'app-scrollarea-row-columns', - styleUrls: ['./styles.less'], - templateUrl: './template.html', - encapsulation: ViewEncapsulation.None, - changeDetection: ChangeDetectionStrategy.OnPush, - standalone: false, -}) -@Ilc() -export class Columns extends ChangesDetector implements AfterContentInit { - @Input() public row!: Row; - - public cells: Cell[] = []; - public controller!: Controller; - public visible: Cell[] = []; - - private _sanitizer: DomSanitizer; - - constructor( - @SkipSelf() selfCdRef: ChangeDetectorRef, - cdRef: ChangeDetectorRef, - sanitizer: DomSanitizer, - ) { - super([cdRef, selfCdRef]); - this._sanitizer = sanitizer; - } - - @HostBinding('class') classes = 'row'; - @HostBinding('style.background') background = ''; - @HostBinding('style.color') color = ''; - - public ngAfterContentInit(): void { - this.controller = this.row.session.render.getBoundEntity() as Controller; - this.cells = this.row.columns.map((s, i) => { - return new Cell(this._sanitizer, this.controller, s, i); - }); - this.visible = this.cells.filter((c) => c.visible); - this.env().subscriber.register( - this.controller.subjects.get().resized.subscribe((index: number) => { - this.cells[index].update().styles(); - this.detectChanges(); - }), - this.controller.subjects.get().visibility.subscribe((index: number) => { - this.cells[index].update().visability(); - this.visible = this.cells.filter((c) => c.visible); - this.detectChanges(); - }), - this.controller.subjects.get().colorize.subscribe((index: number) => { - this.cells[index].update().styles(); - this.detectChanges(); - }), - this.row.change.subscribe(() => { - this.row.columns.map((s, i) => { - if (this.cells[i] === undefined) { - this.log().error(`Column ${i} doesn't exist`); - return; - } - this.cells[i].update().content(s); - }); - this.background = this.row.background === undefined ? '' : this.row.background; - this.color = this.row.color === undefined ? '' : this.row.color; - this.detectChanges(); - }), - ); - } -} -export interface Columns extends IlcInterface {} diff --git a/application/client/src/app/ui/elements/scrollarea/row/columns/styles.less b/application/client/src/app/ui/elements/scrollarea/row/columns/styles.less deleted file mode 100644 index e118d5e6c0..0000000000 --- a/application/client/src/app/ui/elements/scrollarea/row/columns/styles.less +++ /dev/null @@ -1,32 +0,0 @@ -@import '../../../../styles/variables.less'; - -app-scrollarea-row-columns { - display: block; - position: relative; - font-family: 'console', monospace; - font-size: 13.5px; - font-variant-numeric: tabular-nums; - padding: 0; - margin: 0; - line-height: 16px; - height: 16px; - max-height: 16px; - color: var(--scheme-color-0); - font-weight: 500; - user-select: text; - cursor: text; - width: 100%; - span.cell { - display: inline-block; - overflow: hidden; - padding: 0 12px; - color: inherit; - border-left: thin solid var(--scheme-color-3); - &:first-child { - border-left: none; - } - } - & * { - user-select: text; - } -} \ No newline at end of file diff --git a/application/client/src/app/ui/elements/scrollarea/row/columns/template.html b/application/client/src/app/ui/elements/scrollarea/row/columns/template.html deleted file mode 100644 index 59506a35c1..0000000000 --- a/application/client/src/app/ui/elements/scrollarea/row/columns/template.html +++ /dev/null @@ -1,4 +0,0 @@ - \ No newline at end of file diff --git a/application/client/src/app/ui/elements/scrollarea/row/component.ts b/application/client/src/app/ui/elements/scrollarea/row/component.ts deleted file mode 100644 index a4c21a0f1a..0000000000 --- a/application/client/src/app/ui/elements/scrollarea/row/component.ts +++ /dev/null @@ -1,491 +0,0 @@ -import { - Component, - Input, - ChangeDetectorRef, - AfterContentInit, - AfterViewInit, - HostListener, - HostBinding, - ChangeDetectionStrategy, - SkipSelf, - OnDestroy, -} from '@angular/core'; -import { Owner, Row } from '@schema/content/row'; -import { Ilc, IlcInterface } from '@env/decorators/component'; -import { ChangesDetector } from '@ui/env/extentions/changes'; -import { Locker, Level } from '@ui/service/lockers'; -import { getSourceColor } from '@ui/styles/colors'; -import { Notification } from '@ui/service/notifications'; -import { Selecting } from '../controllers/selection'; -import { popup, Vertical, Horizontal } from '@ui/service/popup'; -import { components } from '@env/decorators/initial'; -import { styles } from '@ui/service/styles'; -import { TextExportOptions } from '@platform/types/exporting'; - -import * as dom from '@ui/env/dom'; - -@Component({ - selector: 'app-scrollarea-row', - templateUrl: './template.html', - styleUrls: ['./styles.less'], - changeDetection: ChangeDetectionStrategy.OnPush, - standalone: false, -}) -@Ilc() -export class RowComponent - extends ChangesDetector - implements AfterContentInit, AfterViewInit, OnDestroy -{ - protected hash!: string; - - @Input() public row!: Row; - @Input() public selecting!: Selecting; - - public render: number = 1; - public bookmarked: boolean = false; - public selected: boolean = false; - public attachment: - | { - name: string; - color: string; - } - | undefined = undefined; - public source: { - color: string | undefined; - } = { - color: undefined, - }; - - @HostBinding('attr.data-selected') get dataSelectedAttr() { - return this.selected; - } - @HostListener('mouseover') onMouseIn() { - this.ilc().emitter.ui.row.hover(this.row); - } - - @HostListener('mouseout', ['$event.target']) onMouseOut() { - this.ilc().emitter.ui.row.hover(undefined); - } - - @HostListener('mouseleave', ['$event.target']) onMouseLeave() { - this.ilc().emitter.ui.row.hover(undefined); - } - - @HostListener('contextmenu', ['$event']) async onContextMenu(event: MouseEvent) { - const isRawAvailable = await this.row.session.exporter.isRawAvailable(); - const confirmToUser = () => { - this.ilc().services.ui.notifications.notify( - new Notification({ message: 'Data has been exported into file', actions: [] }), - ); - }; - const exportSelected = (raw: boolean, opt?: TextExportOptions) => { - const progress = this.ilc().services.ui.lockers.lock( - new Locker(true, 'exporting into file...') - .set() - .group(this.row.session.uuid()) - .end(), - { - closable: false, - }, - ); - this.row.session.exporter - .export(raw, opt) - .stream(this.row.session.selection().ranges()) - .then((filepath: string | undefined) => { - filepath !== undefined && confirmToUser(); - }) - .finally(() => { - progress.popup.close(); - }) - .catch((err: Error) => { - this.log().error(`Fail to export data${raw ? ' (raw)' : ''}: ${err.message}`); - this.ilc().services.ui.lockers.lock( - new Locker(false, err.message).set().type(Level.error).end(), - { - closable: true, - }, - ); - }); - }; - const exportSearch = (raw: boolean, opt?: TextExportOptions) => { - const progress = this.ilc().services.ui.lockers.lock( - new Locker(true, 'exporting into file...') - .set() - .group(this.row.session.uuid()) - .end(), - { - closable: false, - }, - ); - this.row.session.exporter - .export(raw, opt) - .search() - .then((filepath: string | undefined) => { - filepath !== undefined && confirmToUser(); - }) - .finally(() => { - progress.popup.close(); - }) - .catch((err: Error) => { - this.log().error(`Fail to export data${raw ? ' (raw)' : ''}: ${err.message}`); - this.ilc().services.ui.lockers.lock( - new Locker(false, err.message).set().type(Level.error).end(), - { - closable: true, - }, - ); - }); - }; - const items: {}[] = []; - const selectedRowsCount = this.row.session.selection().indexes().length; - const selection = this.selecting.selection(); - const selectionInfo = this.selecting.getAsSelection(); - const ctrl = this.ilc().services.system.env.platform().darwin() ? 'Cmd' : 'Ctrl'; - items.push( - ...[ - { - caption: 'Copy', - disabled: !selection.exist, - shortcut: `${ctrl} + C`, - handler: () => { - this.selecting.copyToClipboard().catch((err: Error) => { - this.log().error(`Fail to copy selection: ${err.message}`); - }); - }, - }, - {}, - { - caption: - selectedRowsCount === 0 - ? 'Unselect All' - : `Unselect ${selectedRowsCount} row${ - selectedRowsCount > 1 ? 's' : '' - }`, - disabled: selectedRowsCount === 0, - handler: () => { - this.row.session.cursor.drop(); - }, - }, - {}, - ...(this.render === 2 - ? [ - { - caption: - selectedRowsCount === 0 - ? 'Export Selected as Table' - : `Export ${selectedRowsCount} row${ - selectedRowsCount > 1 ? 's' : '' - } as Table`, - disabled: selectedRowsCount === 0, - handler: () => { - popup.open({ - component: { - factory: components.get('app-dialogs-columns-selector'), - inputs: { - session: this.row.session, - accept: ( - columns: number[], - delimiter: string | undefined, - ) => { - exportSelected(false, { - columns, - delimiter, - spliter: this.row.session.render.delimiter(), - }); - }, - }, - }, - position: { - vertical: Vertical.center, - horizontal: Horizontal.center, - }, - uuid: 'Selecting columns', - }); - }, - }, - ] - : [ - { - caption: - selectedRowsCount === 0 - ? 'Export Selected' - : `Export ${selectedRowsCount} row${ - selectedRowsCount > 1 ? 's' : '' - } `, - disabled: selectedRowsCount === 0, - handler: () => { - exportSelected(false); - }, - }, - ]), - - { - caption: - selectedRowsCount === 0 - ? 'Export Selected as Raw' - : `Export ${selectedRowsCount} row${ - selectedRowsCount > 1 ? 's' : '' - } as Raw`, - disabled: !isRawAvailable || selectedRowsCount === 0, - handler: () => { - exportSelected(true); - }, - }, - ...(this.row.owner === Owner.Output - ? [ - { - caption: 'Export All', - disabled: this.row.session.stream.len() === 0, - handler: () => { - this.row.session.exporter - .export(true) - .all() - .catch((err: Error) => { - this.log().error(`Fail export session: ${err.message}`); - }); - }, - }, - {}, - { - caption: 'Comment', - disabled: - selectionInfo === undefined || - !this.row.session.comments.isCreatingAvailable(), - handler: () => { - if (selectionInfo === undefined) { - return; - } - this.row.session.comments - .create(selectionInfo) - .catch((err: Error) => { - this.log().error(`Fail to add comment: ${err.message}`); - }); - dom.stop(event); - }, - }, - ] - : []), - ...(this.row.owner === Owner.Search - ? [ - {}, - ...(this.render === 2 - ? [ - { - caption: 'Export All Search Result as Table', - disabled: this.row.session.indexed.len() === 0, - handler: () => { - popup.open({ - component: { - factory: components.get( - 'app-dialogs-columns-selector', - ), - inputs: { - session: this.row.session, - accept: ( - columns: number[], - delimiter: string | undefined, - ) => { - exportSearch(false, { - columns, - delimiter, - spliter: - this.row.session.render.delimiter(), - }); - }, - }, - }, - position: { - vertical: Vertical.center, - horizontal: Horizontal.center, - }, - uuid: 'Selecting columns', - }); - }, - }, - ] - : [ - { - caption: 'Export All Search Result', - disabled: this.row.session.indexed.len() === 0, - handler: () => { - exportSearch(false); - }, - }, - ]), - { - caption: 'Export All Search Result as Raw', - disabled: !isRawAvailable || this.row.session.indexed.len() === 0, - handler: () => { - exportSearch(true); - }, - }, - {}, - { - caption: 'Open Search Result as New Tab', - disabled: this.row.session.indexed.len() === 0, - handler: () => { - const progress = this.ilc().services.ui.lockers.lock( - new Locker(true, 'preparing new session...') - .set() - .group(this.row.session.uuid()) - .end(), - { - closable: false, - }, - ); - this.row.session - .searchResultAsNewSession() - .finally(() => { - progress.popup.close(); - }) - .catch((err: Error) => { - this.log().error( - `Fail to open search result as new session: ${err.message}`, - ); - this.ilc().services.ui.lockers.lock( - new Locker(false, err.message) - .set() - .type(Level.error) - .end(), - { - closable: true, - }, - ); - }); - }, - }, - ] - : []), - ], - ); - this.ilc().emitter.ui.contextmenu.open({ - items, - x: event.x, - y: event.y, - }); - } - - @HostListener('click', ['$event']) onClick(event: PointerEvent) { - this.row.select().toggle(event); - } - - constructor(@SkipSelf() selfCdRef: ChangeDetectorRef, cdRef: ChangeDetectorRef) { - super([selfCdRef, cdRef]); - } - - public ngOnDestroy(): void { - this.row.destroy(); - } - - public ngAfterContentInit(): void { - this.render = this.row.session.render.delimiter() === undefined ? 1 : 2; - this.selecting.setDelimiter(this.row.session.render.delimiter()); - this.env().subscriber.register( - this.row.session.stream.subjects.get().rank.subscribe(() => { - this.update(); - }), - this.row.session.stream.subjects.get().sources.subscribe(() => { - this.update(); - }), - this.row.change.subscribe(this.update.bind(this)), - this.row.session.bookmarks.subjects.get().updated.subscribe(() => { - this.bookmarked = this.row.bookmark().is(); - this.update(); - }), - this.row.session.indexed.subjects.get().changed.subscribe(this.update.bind(this)), - this.row.session.cursor.subjects.get().updated.subscribe(this.update.bind(this)), - this.row.session.cursor.subjects.get().selected.subscribe(this.update.bind(this)), - this.row.change.subscribe(() => { - this.detectChanges(); - }), - ); - this.update(); - } - - public ngAfterViewInit(): void { - this.update(); - } - - public ngGetRankFiller(position: number): string { - return this.row.session.stream.rank.getFiller(position); - } - - public ngGetSignatureWidth(): { [key: string]: string } { - const width = `${this.row.session.stream.rank.width()}px`; - return { - width: width, - minWidth: width, - maxWidth: width, - }; - } - - public onNumberClick() { - this.row.bookmark().toggle(); - } - - public showAttachment() { - if (this.attachment === undefined) { - return; - } - const attachment = this.row.session.attachments.getByPos(this.row.position); - if (attachment === undefined) { - return; - } - const instance = popup.open({ - component: { - factory: components.get('app-views-attachments-preview'), - inputs: { - attachment: attachment, - embedded: false, - close: () => { - instance.close(); - }, - }, - }, - position: { - vertical: Vertical.center, - horizontal: Horizontal.center, - }, - closeOnKey: 'Escape', - uuid: attachment.uuid, - }); - } - - protected update() { - const hash = (): string => { - return `${this.row.session.stream.rank.width()}.${this.bookmarked}.${this.selected}.${ - this.attachment - }.${this.source.color}`; - }; - const prev = this.hash; - this.bookmarked = this.row.bookmark().is(); - if (this.row.session.stream.observe().descriptions.count() > 1) { - this.source.color = getSourceColor(this.row.source); - } else { - this.source.color = undefined; - } - this.selected = this.row.select().is(); - const attachments = this.row.session.attachments; - if (attachments.has(this.row.position)) { - const attachment = attachments.getByPos(this.row.position); - if (attachment !== undefined) { - this.attachment = { - color: - attachment.color === undefined - ? styles.colors().scheme_color_1 - : attachment.color, - name: attachment.name, - }; - } else { - this.attachment = undefined; - } - } else { - this.attachment = undefined; - } - this.hash = hash(); - if (prev !== this.hash) { - this.detectChanges(); - } - } -} -export interface RowComponent extends IlcInterface {} diff --git a/application/client/src/app/ui/elements/scrollarea/row/module.ts b/application/client/src/app/ui/elements/scrollarea/row/module.ts deleted file mode 100644 index f105b666ed..0000000000 --- a/application/client/src/app/ui/elements/scrollarea/row/module.ts +++ /dev/null @@ -1,28 +0,0 @@ -import { NgModule } from '@angular/core'; -import { CommonModule } from '@angular/common'; -import { ScrollingModule } from '@angular/cdk/scrolling'; -import { MatIconModule } from '@angular/material/icon'; -import { MatCheckboxModule } from '@angular/material/checkbox'; -import { MatButtonModule } from '@angular/material/button'; - -import { RowComponent } from './component'; -import { Standard } from './standard/component'; -import { Columns } from './columns/component'; -import { Separator } from './separator/component'; - -import { ContainersModule } from '@elements/containers/module'; - -@NgModule({ - imports: [ - CommonModule, - ScrollingModule, - ContainersModule, - MatIconModule, - MatCheckboxModule, - MatButtonModule, - ], - declarations: [RowComponent, Standard, Columns, Separator], - exports: [RowComponent], - bootstrap: [RowComponent, Standard, Columns, Separator], -}) -export class RowModule {} diff --git a/application/client/src/app/ui/elements/scrollarea/row/separator/component.ts b/application/client/src/app/ui/elements/scrollarea/row/separator/component.ts deleted file mode 100644 index 309bb6c097..0000000000 --- a/application/client/src/app/ui/elements/scrollarea/row/separator/component.ts +++ /dev/null @@ -1,28 +0,0 @@ -import { Component, Input, HostBinding } from '@angular/core'; -import { Row } from '@schema/content/row'; -import { Ilc, IlcInterface } from '@env/decorators/component'; -import { stop } from '@ui/env/dom'; - -@Component({ - selector: 'app-scrollarea-rows-separator', - styleUrls: ['./styles.less'], - templateUrl: './template.html', - standalone: false, -}) -@Ilc() -export class Separator { - @Input() public row!: Row; - - @HostBinding('class') classes = 'row'; - - public before(event: MouseEvent) { - stop(event); - this.row.extending().before(); - } - - public after(event: MouseEvent) { - stop(event); - this.row.extending().after(); - } -} -export interface Separator extends IlcInterface {} diff --git a/application/client/src/app/ui/elements/scrollarea/row/separator/styles.less b/application/client/src/app/ui/elements/scrollarea/row/separator/styles.less deleted file mode 100644 index 67c9b5885e..0000000000 --- a/application/client/src/app/ui/elements/scrollarea/row/separator/styles.less +++ /dev/null @@ -1,59 +0,0 @@ -@import '../../../../styles/variables.less'; -@import '../../../../styles/support.less'; - -:host { - display: block; - position: relative; - margin: 1px 0; - height: 14px; - max-height: 14px; - color: var(--scheme-color-0); - font-weight: 500; - user-select: none; - padding: 0 32px; - border-radius: 3px; - border: 1px solid var(--scheme-color-4); - left: 32px; - &::after { - position: absolute; - display: block; - width: 100%; - content: ''; - height: 1px; - border-top: thin dashed var(--scheme-color-4); - top: 7px; - left:100%; - } - &::before { - position: absolute; - display: block; - width: 24px; - content: ''; - height: 1px; - border-top: thin dashed var(--scheme-color-4); - top: 7px; - left:-24px; - } - & span.button { - display: inline-block; - position: relative; - font-size: 13px; - line-height: 15px; - padding: 0 32px; - cursor: pointer; - user-select: none; - &.disabled { - color: var(--scheme-color-4); - cursor: default; - } - } - & span.number { - display: inline-block; - position: relative; - font-size: 12px; - line-height: 13px; - font-family: 'primary'; - font-variant-numeric: tabular-nums; - user-select: none; - } -} diff --git a/application/client/src/app/ui/elements/scrollarea/row/separator/template.html b/application/client/src/app/ui/elements/scrollarea/row/separator/template.html deleted file mode 100644 index e378b91f43..0000000000 --- a/application/client/src/app/ui/elements/scrollarea/row/separator/template.html +++ /dev/null @@ -1,3 +0,0 @@ - -{{row.nature.hidden}} - \ No newline at end of file diff --git a/application/client/src/app/ui/elements/scrollarea/row/standard/component.ts b/application/client/src/app/ui/elements/scrollarea/row/standard/component.ts deleted file mode 100644 index 11c2edda8c..0000000000 --- a/application/client/src/app/ui/elements/scrollarea/row/standard/component.ts +++ /dev/null @@ -1,59 +0,0 @@ -import { - Component, - Input, - AfterContentInit, - HostBinding, - ChangeDetectionStrategy, - ChangeDetectorRef, - SkipSelf, - ViewEncapsulation, -} from '@angular/core'; -import { DomSanitizer, SafeHtml } from '@angular/platform-browser'; -import { Row } from '@schema/content/row'; -import { Ilc, IlcInterface } from '@env/decorators/component'; -import { ChangesDetector } from '@ui/env/extentions/changes'; - -@Component({ - selector: 'app-scrollarea-row-standard', - styleUrls: ['./styles.less'], - template: '', - changeDetection: ChangeDetectionStrategy.OnPush, - encapsulation: ViewEncapsulation.None, - standalone: false, -}) -@Ilc() -export class Standard extends ChangesDetector implements AfterContentInit { - @Input() public row!: Row; - - private _sanitizer: DomSanitizer; - private _hash: string = ''; - - constructor(@SkipSelf() selfCdRef: ChangeDetectorRef, sanitizer: DomSanitizer) { - super(selfCdRef); - this._sanitizer = sanitizer; - } - - @HostBinding('class') classes = 'row'; - @HostBinding('style.background') background = ''; - @HostBinding('style.color') color = ''; - @HostBinding('innerHTML') html: SafeHtml | string = ''; - - protected update() { - this.html = this._sanitizer.bypassSecurityTrustHtml(this.row.html); - this.background = this.row.background === undefined ? '' : this.row.background; - this.color = this.row.color === undefined ? '' : this.row.color; - const hash = this.hash(); - this._hash !== hash && this.detectChanges(); - this._hash = hash; - } - - protected hash(): string { - return `${this.html};${this.background};${this.color}`; - } - - public ngAfterContentInit() { - this.update(); - this.env().subscriber.register(this.row.change.subscribe(this.update.bind(this))); - } -} -export interface Standard extends IlcInterface {} diff --git a/application/client/src/app/ui/elements/scrollarea/row/standard/styles.less b/application/client/src/app/ui/elements/scrollarea/row/standard/styles.less deleted file mode 100644 index fb0020d297..0000000000 --- a/application/client/src/app/ui/elements/scrollarea/row/standard/styles.less +++ /dev/null @@ -1,25 +0,0 @@ -@import '../../../../styles/variables.less'; -@import '../../../../styles/support.less'; - -app-scrollarea-row-standard { - display: inline-block; - position: relative; - font-family: 'console', monospace; - font-size: 13.5px; - font-variant-numeric: tabular-nums; - padding: 0; - margin: 0; - line-height: 16px; - height: 16px; - max-height: 16px; - white-space: pre; - vertical-align: top; - color: var(--scheme-color-0); - font-weight: 500; - user-select: text; - cursor: text; - min-width: 100%; - & * { - user-select: text; - } -} diff --git a/application/client/src/app/ui/elements/scrollarea/row/standard/template.html b/application/client/src/app/ui/elements/scrollarea/row/standard/template.html deleted file mode 100644 index b0dac65653..0000000000 --- a/application/client/src/app/ui/elements/scrollarea/row/standard/template.html +++ /dev/null @@ -1,2 +0,0 @@ - - \ No newline at end of file diff --git a/application/client/src/app/ui/elements/scrollarea/row/styles.less b/application/client/src/app/ui/elements/scrollarea/row/styles.less deleted file mode 100644 index f09f8d9e6b..0000000000 --- a/application/client/src/app/ui/elements/scrollarea/row/styles.less +++ /dev/null @@ -1,317 +0,0 @@ -@import '../../../styles/variables.less'; -@import '../../../styles/support.less'; - -:host { - display: flex; - padding: 0; - margin: 0; - line-height: 16px; - max-height: 16px; - white-space: nowrap; - min-width: 100%; - user-select: text; - cursor: text; - position: relative; - &[data-selected="true"] { - background: var(--scheme-color-4); - } - & span.tooltip { - position: absolute; - display: none; - background: var(--scheme-color-accent); - color: var(--scheme-color-0); - padding: 3px 6px; - border-radius: 2px; - z-index: 10; - margin-top: -28px; - animation: row-tooltip-animation ease-in-out 300ms forwards; - } - &:hover { - & span.tooltip { - display: block; - } - } - &[data-selected="true"] { - & div.signature { - & span.number { - &::before { - position: absolute; - display: block; - content: ''; - top: 6px; - bottom: 0; - left: -8px; - width: 4px; - height: 4px; - border-radius: 2px; - background: var(--scheme-color-accent); - } - } - } - } - & div.signature { - display: inline-block; - position: sticky; - white-space: nowrap; - left:0; - z-index: 1; - background-color: var(--scheme-color-5); - & span.icon{ - position: absolute; - display: inline-block; - right: 3px; - top: -2px; - font-size: 12px; - width: 16px; - height: 16px; - color: var(--scheme-color-0); - cursor: default; - } - & span.next-match-distance { - position: relative; - display: inline-block; - user-select: none; - margin-left: -7px; - & span.codicon { - font-size: 14px; - padding-top: 2px; - color: var(--scheme-color-0); - cursor: default; - &:hover{ - color: var(--scheme-color-accent); - } - } - } - & span.error { - position: absolute; - display: inline-block; - top: 2px; - margin-left: -14px; - color: var(--scheme-color-warning); - font-size: 10px; - line-height: 10px; - } - & span.source-name { - display: inline-block; - position: relative; - font-family: 'console', monospace; - width: 5rem; - overflow: hidden; - line-height: 16px; - height: 16px; - max-height: 16px; - font-size: 10px; - vertical-align: top; - user-select: none; - cursor: pointer; - } - & span.source-alias { - display: inline-block; - position: relative; - width: 4px; - line-height: 16px; - height: 16px; - max-height: 16px; - vertical-align: top; - user-select: none; - cursor: pointer; - &::after { - background: inherit; - position: absolute; - display: block; - height: 100%; - top: 0; - width: 0; - left: 100%; - content: attr(data-source-name); - cursor: default; - overflow: hidden; - z-index: 1; - font-size: 0.8rem; - line-height: 0.9rem; - color: var(--scheme-color-6); - padding: 0 0.5rem; - opacity: 0; - pointer-events: none; - } - &:hover { - &::after { - width: auto; - opacity: 1; - } - } - } - & span.number { - display: inline-block; - position: relative; - font-family: 'console', monospace; - font-variant-numeric: tabular-nums; - line-height: 16px; - height: 16px; - max-height: 16px; - font-size: 10px; - vertical-align: top; - margin: 0 8px; - padding: 0 8px 0 0; - border-right: thin var(--scheme-color-4) solid; - cursor: default; - color: var(--scheme-color-2); - user-select: none; - &[data-bookmarked="true"] { - &::after { - position: absolute; - display: block; - content: ''; - top: 0; - bottom: 0; - right: 0; - width: 4px; - background: var(--scheme-color-accent); - } - &:hover::after { - background: var(--scheme-color-accent-lighten-20); - } - } - & span.filler { - color: var(--scheme-color-4); - font-variant-numeric: inherit; - line-height: inherit; - height: inherit; - max-height: inherit; - font-size: inherit; - font-family: inherit; - user-select: none; - } - & span.range { - position: absolute; - display: block; - height: 100%; - width: 4px; - top: 0; - right: -6px; - border-style: solid; - &.begin { - border-left-width: 2px; - border-top-width: 2px; - border-right: none; - border-bottom: none; - height: 100%; - width: 4px; - top: 50%; - } - &.end { - border-left-width: 2px; - border-bottom-width: 2px; - border-top: none; - border-right: none; - height: 100%; - width: 4px; - top: -50%; - &.nested { - height: 100%; - top: -50%; - } - } - &.middle { - border-left-width: 2px; - border-top: none; - border-right: none; - border-bottom: none; - height: 185%; - top: ~'calc(-50% + 2px);'; - } - &.open { - width: 0; - height: 0; - border-right: none; - border-top: 4px solid transparent; - border-left: 8px solid var(--scheme-color-accent); - border-bottom: 4px solid transparent; - top: 4px; - } - &.opening { - border-width: 0; - border-top: none; - border-right: none; - border-bottom: none; - } - } - &:hover::after { - position: absolute; - display: block; - content: ''; - top: 0; - bottom: 0; - right: 0; - width: 4px; - background: var(--scheme-color-5-darken-5); - } - } - } - &.timeranges { - & div.signature { - & span.number { - padding: 0 16px 0 0; - margin-right: 12px; - } - } - } - &.bookmarked { - & div.signature { - & span.number { - background: var(--scheme-color-warning); - color: var(--scheme-color-7); - &::after { - position: absolute; - display: block; - content: ''; - top: 0; - bottom: 0; - left: -4px; - width: 4px; - background: var(--scheme-color-warning); - } - } - } - } - &.selected { - /*background: var(--scheme-color-3);*/ - &::after { - position: absolute; - content: ''; - top: 0; - left: 0; - width: 100%; - height: 100%; - background: var(--scheme-color-0-fade-35); - pointer-events: none; - } - } - & p.row { - display: inline-block; - position: relative; - padding: 0; - margin: 0; - line-height: 16px; - height: 16px; - max-height: 16px; - white-space: nowrap; - vertical-align: top; - &.pending { - width: 100%; - background: var(--scheme-color-4); - margin-top: 3px; - line-height: 10px; - height: 10px; - max-height: 10px; - } - } - @keyframes row-tooltip-animation { - 0% { - opacity: 0; - } - 100% { - opacity: 1; - } - } -} diff --git a/application/client/src/app/ui/elements/scrollarea/row/template.html b/application/client/src/app/ui/elements/scrollarea/row/template.html deleted file mode 100644 index 10a8edbb68..0000000000 --- a/application/client/src/app/ui/elements/scrollarea/row/template.html +++ /dev/null @@ -1,30 +0,0 @@ -
- - - {{ngGetRankFiller(row.position)}}{{row.position}} - - - -
- - - diff --git a/application/client/src/app/ui/elements/scrollarea/styles.less b/application/client/src/app/ui/elements/scrollarea/styles.less deleted file mode 100644 index 902215e001..0000000000 --- a/application/client/src/app/ui/elements/scrollarea/styles.less +++ /dev/null @@ -1,105 +0,0 @@ -@import '../../styles/variables.less'; - -:host { - display: block; - position: absolute; - top: 0; - left: 0; - right: 0; - bottom: 0; - overflow: hidden; - user-select: none; - outline: none; - & * { - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; - } - & div.container { - position: absolute; - display: block; - top: 0; - left: 0; - right: 0; - bottom: 0; - overflow-x: auto; - overflow-y: hidden; - &::-webkit-scrollbar:horizontal { - background-color: var(--scheme-color-5-15); - transition: background 250ms; - } - &::-webkit-scrollbar-thumb:horizontal { - background-color: var(--scheme-color-3-15); - transition: background 250ms; - } - &:hover { - &::-webkit-scrollbar:horizontal { - background-color: var(--scheme-color-5); - } - &::-webkit-scrollbar-thumb:horizontal { - background-color: var(--scheme-color-3); - } - } - } - & ul.holder { - position: absolute; - display: block; - width: auto; - list-style: none; - padding: 0 0 16px 0; - margin: 0; - top: 0; - bottom: 0; - left: 0; - user-select: none; - min-width: 100%; - & li { - display: block; - position: relative; - width: auto; - min-width: 100%; - list-style: none; - padding: 0; - margin: 0; - user-select: text; - } - & li[data-on-border="true"] { - &::after { - display: block; - position: absolute; - content: ''; - top: 0; - left: 0; - width: 100%; - border-top: thin dashed; - border-top-color: var(--scheme-color-accent); - } - } - } - & .selection-detector { - position: absolute; - z-index: 1000; - width: 10000px; - height: 0px; - left: 0; - & .selection-detector-filler { - position: fixed; - width: 10000px; - height: 50px; - } - &.top { - top: 0; - & .selection-detector-filler { - position: fixed; - height: 1000px; - margin-top: -1000px; - } - } - &.bottom { - bottom: 8px; - & .selection-detector-filler { - position: fixed; - height: 10000px; - } - } - } -} diff --git a/application/client/src/app/ui/elements/scrollarea/template.html b/application/client/src/app/ui/elements/scrollarea/template.html deleted file mode 100644 index 3d27c92d2e..0000000000 --- a/application/client/src/app/ui/elements/scrollarea/template.html +++ /dev/null @@ -1,31 +0,0 @@ -
-
-
-
-
    -
  • - -
  • -
-
- -
-
-
diff --git a/application/client/src/app/ui/elements/scrollarea/vertical/component.ts b/application/client/src/app/ui/elements/scrollarea/vertical/component.ts deleted file mode 100644 index da134df290..0000000000 --- a/application/client/src/app/ui/elements/scrollarea/vertical/component.ts +++ /dev/null @@ -1,131 +0,0 @@ -import { - Component, - Input, - AfterContentInit, - AfterViewInit, - HostListener, - Output, - EventEmitter, - ElementRef, - ChangeDetectorRef, -} from '@angular/core'; -import { Service } from '../controllers/service'; -import { Holder } from '../controllers/holder'; -import { ChangesInitiator, Frame, PositionEvent } from '../controllers/frame'; -import { LockToken } from '@ui/env/lock.token'; -import { stop } from '@ui/env/dom'; -import { ChangesDetector } from '@ui/env/extentions/changes'; -import { Ilc, IlcInterface } from '@env/decorators/component'; - -const MAX_SCROLL_THUMB_HEIGHT: number = 20; - -@Component({ - selector: 'app-scrollarea-vertical', - templateUrl: './template.html', - styleUrls: ['./styles.less'], - standalone: false, -}) -@Ilc() -export class ScrollAreaVerticalComponent - extends ChangesDetector - implements AfterContentInit, AfterViewInit -{ - @Input() public service!: Service; - @Input() public holder!: Holder; - @Input() public frame!: Frame; - - @Output() public scrolling = new EventEmitter(); - - private _height: number = 0; - private _fillerHeight: number = 0; - private _rowsInView: number = 0; - private _scrollEventLockToken: LockToken = new LockToken(-1); - - @HostListener('scroll', ['$event', '$event.target']) onScroll( - _event: MouseEvent, - target: HTMLElement, - ) { - if (this._scrollEventLockToken.isLocked()) { - return; - } - if (this._fillerHeight === 0) { - return; - } - const rate = target.scrollTop / (target.scrollHeight - target.offsetHeight); - const position = Math.round((this.service.getLen() - this._rowsInView) * rate); - this.scrolling.next(position > this.service.getLen() ? this.service.getLen() : position); - } - - @HostListener('mousedown') onMouseDown() { - this._scrollEventLockToken.unlock(); - } - - @HostListener('window:mouseup') onWindowMouseUp() { - this._scrollEventLockToken.lock(); - } - - @HostListener('wheel', ['$event']) onWheel(event: MouseEvent) { - stop(event); - return false; - } - - constructor(cdRef: ChangeDetectorRef, private elRef: ElementRef) { - super(cdRef); - } - - public ngAfterContentInit() { - this._scrollEventLockToken.lock(); - this.env().subscriber.register( - this.service.onLen((_len: number) => { - this._calculate(); - }), - this.holder.onHeightChange((height: number) => { - if (this._height === height) { - return; - } - this._height = height; - this._calculate(); - }), - this.frame.onPositionChange((event: PositionEvent) => { - if ( - event.initiator === ChangesInitiator.Scrolling || - event.initiator === ChangesInitiator.RowsDelivered - ) { - return; - } - this.detectChanges(); - const position = event.range.start / this.service.getLen(); - this.elRef.nativeElement.scrollTop = - this.elRef.nativeElement.scrollHeight * position; - }), - ); - } - - public ngAfterViewInit(): void { - this._calculate(); - } - - public getFillerStyles(): { height: string } { - return { - height: `${this._fillerHeight}px`, - }; - } - - private _calculate() { - const fillerHeight: number = this.service.getLen() * this.service.getItemHeight(); - this._rowsInView = Math.floor(this._height / this.service.getItemHeight()); - if (fillerHeight === 0 || this._height === 0 || this._height > fillerHeight) { - this._fillerHeight = 0; - } else { - const rate: number = this._height / fillerHeight; - const thumb: number = this._height * rate; - if (thumb < MAX_SCROLL_THUMB_HEIGHT) { - this._fillerHeight = this._height / (MAX_SCROLL_THUMB_HEIGHT / this._height); - } else { - this._fillerHeight = fillerHeight; - } - } - this.markChangesForCheck(); - } -} -export interface ScrollAreaVerticalComponent extends IlcInterface {} diff --git a/application/client/src/app/ui/elements/scrollarea/vertical/styles.less b/application/client/src/app/ui/elements/scrollarea/vertical/styles.less deleted file mode 100644 index 6722ffe220..0000000000 --- a/application/client/src/app/ui/elements/scrollarea/vertical/styles.less +++ /dev/null @@ -1,21 +0,0 @@ -@import '../../../styles/variables.less'; -@import '../../../styles/support.less'; - -:host { - display: block; - position: absolute; - top: 0; - right: 0; - bottom: 0; - width: 15px; - overflow-y: auto; - overflow-x: hidden; - z-index: 1; - cursor: default; - background: var(--scheme-color-5); - & div.scrollfiller { - position: relative; - width: 1px; - height: 10000000px; - } -} diff --git a/application/client/src/app/ui/elements/scrollarea/vertical/template.html b/application/client/src/app/ui/elements/scrollarea/vertical/template.html deleted file mode 100644 index 3862842a8f..0000000000 --- a/application/client/src/app/ui/elements/scrollarea/vertical/template.html +++ /dev/null @@ -1 +0,0 @@ -
diff --git a/application/client/src/app/ui/elements/tabs/component.ts b/application/client/src/app/ui/elements/tabs/component.ts deleted file mode 100644 index 49bbf75819..0000000000 --- a/application/client/src/app/ui/elements/tabs/component.ts +++ /dev/null @@ -1,73 +0,0 @@ -import { - Component, - Input, - OnDestroy, - AfterViewInit, - ChangeDetectorRef, - OnChanges, - ChangeDetectionStrategy, -} from '@angular/core'; -import { TabsService } from './service'; -import { TabsOptions } from './options'; -import { ChangesDetector } from '@ui/env/extentions/changes'; -import { Subscriber } from '@platform/env/subscription'; - -@Component({ - selector: 'element-tabs', - templateUrl: './template.html', - styleUrls: ['./styles.less'], - changeDetection: ChangeDetectionStrategy.OnPush, - standalone: false, -}) -export class TabsComponent extends ChangesDetector implements OnDestroy, AfterViewInit, OnChanges { - @Input() public service: TabsService | undefined; - - private _subscriber: Subscriber = new Subscriber(); - - public _options: TabsOptions = new TabsOptions(); - - constructor(cdRef: ChangeDetectorRef) { - super(cdRef); - } - - ngAfterViewInit() { - this._subscribe(); - this._getDefaultOptions(); - } - - ngOnDestroy() { - this._subscriber.unsubscribe(); - } - - ngOnChanges() { - this._subscribe(); - this._getDefaultOptions(); - this.detectChanges(); - } - - private _subscribe() { - this._subscriber.unsubscribe(); - if (this.service === undefined) { - return; - } - this._subscriber.register( - this.service.subjects.get().options.subscribe(this._onOptionsUpdated.bind(this)), - ); - } - - private async _getDefaultOptions() { - if (this.service === undefined) { - return; - } - this._options = await this.service.getOptions(); - this.detectChanges(); - } - - private async _onOptionsUpdated(options: TabsOptions) { - if (this.service === undefined) { - return; - } - this._options = await options; - this.detectChanges(); - } -} diff --git a/application/client/src/app/ui/elements/tabs/content/component.ts b/application/client/src/app/ui/elements/tabs/content/component.ts deleted file mode 100644 index 3217a20486..0000000000 --- a/application/client/src/app/ui/elements/tabs/content/component.ts +++ /dev/null @@ -1,85 +0,0 @@ -import { - Component, - Input, - OnDestroy, - ChangeDetectorRef, - AfterViewInit, - OnChanges, - ChangeDetectionStrategy, -} from '@angular/core'; -import { ITab, TabsService } from '../service'; -import { IComponentDesc } from '../../containers/dynamic/component'; -import { ChangesDetector } from '@ui/env/extentions/changes'; -import { Subscriber } from '@platform/env/subscription'; - -@Component({ - selector: 'lib-complex-tab-content', - templateUrl: './template.html', - styleUrls: ['./styles.less'], - changeDetection: ChangeDetectionStrategy.OnPush, - standalone: false, -}) -export class TabContentComponent - extends ChangesDetector - implements OnDestroy, AfterViewInit, OnChanges -{ - @Input() public service!: TabsService; - - public _ng_tab: ITab | undefined = undefined; - public _ng_noTabContent: IComponentDesc | undefined; - - private _subscriber: Subscriber = new Subscriber(); - - constructor(cdRef: ChangeDetectorRef) { - super(cdRef); - } - - ngAfterViewInit() { - this._apply(); - } - - ngOnDestroy() { - this._subscriber.unsubscribe(); - } - - ngOnChanges() { - this._apply(); - } - - private _subscribe() { - this._subscriber.unsubscribe(); - this._subscriber.register( - this.service.subjects.get().active.subscribe(this.onActiveTabChange.bind(this)), - this.service.subjects.get().removed.subscribe(this.onRemoveTab.bind(this)), - ); - } - - private _apply() { - this._subscribe(); - this._ng_noTabContent = this.service.getOptions().noTabsContent; - this._getDefaultTab(); - } - - private async _getDefaultTab() { - this._ng_tab = await this.service.getActiveTab(); - this.detectChanges(); - } - - private async onActiveTabChange(tab: ITab) { - const _tab = await tab; - if (_tab.active) { - this._ng_tab = _tab; - this._ng_noTabContent = undefined; - } - this.detectChanges(); - } - - private async onRemoveTab() { - if (this.service.getTabs().size !== 0) { - return; - } - this._ng_tab = undefined; - this._ng_noTabContent = this.service.getOptions().noTabsContent; - this.detectChanges(); - } -} diff --git a/application/client/src/app/ui/elements/tabs/content/styles.less b/application/client/src/app/ui/elements/tabs/content/styles.less deleted file mode 100644 index 0f87e850a8..0000000000 --- a/application/client/src/app/ui/elements/tabs/content/styles.less +++ /dev/null @@ -1,7 +0,0 @@ -@import '../../../styles/variables.less'; - -:host { - position: relative; - display: block; - background: var(--scheme-color-5); -} diff --git a/application/client/src/app/ui/elements/tabs/content/template.html b/application/client/src/app/ui/elements/tabs/content/template.html deleted file mode 100644 index 79800d7fe1..0000000000 --- a/application/client/src/app/ui/elements/tabs/content/template.html +++ /dev/null @@ -1,2 +0,0 @@ - - \ No newline at end of file diff --git a/application/client/src/app/ui/elements/tabs/controller.histroy.ts b/application/client/src/app/ui/elements/tabs/controller.histroy.ts deleted file mode 100644 index b3c52e3fe1..0000000000 --- a/application/client/src/app/ui/elements/tabs/controller.histroy.ts +++ /dev/null @@ -1,24 +0,0 @@ -export class ControllerSessionsHistroy { - - private _sessions: string[] = []; - - public add(session: string) { - if (this._sessions[this._sessions.length - 1] === session) { - return; - } - this._sessions.push(session); - } - - public remove(session: string) { - this._sessions = this._sessions.filter((saved: string) => { - return session !== saved; - }); - } - - public getLast(): string | undefined { - if (this._sessions.length === 0) { - return undefined; - } - return this._sessions[this._sessions.length - 1]; - } -} diff --git a/application/client/src/app/ui/elements/tabs/list/component.ts b/application/client/src/app/ui/elements/tabs/list/component.ts deleted file mode 100644 index 5f4816a201..0000000000 --- a/application/client/src/app/ui/elements/tabs/list/component.ts +++ /dev/null @@ -1,255 +0,0 @@ -import { - Component, - OnDestroy, - Input, - AfterViewInit, - ChangeDetectorRef, - ViewChild, - ElementRef, - ViewChildren, - OnChanges, - ChangeDetectionStrategy, -} from '@angular/core'; -import type { QueryList } from '@angular/core'; -import { ITabInternal, TabsService } from '../service'; -import { TabsOptions } from '../options'; -import { stop } from '@ui/env/dom'; -import { ChangesDetector } from '@ui/env/extentions/changes'; -import { Subscriber } from '@platform/env/subscription'; - -@Component({ - selector: 'element-tabs-list', - templateUrl: './template.html', - styleUrls: ['./styles.less'], - changeDetection: ChangeDetectionStrategy.OnPush, - standalone: false, -}) -export class TabsListComponent - extends ChangesDetector - implements OnDestroy, AfterViewInit, OnChanges -{ - @ViewChild('holdernode', { static: false }) _ng_holderNode!: ElementRef; - @ViewChild('tabsnode', { static: false }) _ng_tabsNode!: ElementRef; - @ViewChild('injectionsnode', { static: false }) _ng_injectionsNode!: ElementRef; - @ViewChildren('tabnode', { read: ElementRef }) _ng_tabsElRegs!: QueryList; - - @Input() public service!: TabsService; - - public _ng_options: TabsOptions = new TabsOptions(); - public _ng_offset: number = 0; - public tabs: ITabInternal[] = []; - - private _subscriber: Subscriber = new Subscriber(); - private _tabs: Map = new Map(); - private _sizes: { - space: number; - holder: number; - tabs: number[]; - first: number; - } = { - space: 0, - holder: 0, - tabs: [], - first: 0, - }; - - constructor(cdRef: ChangeDetectorRef) { - super(cdRef); - this._subscribeToWinEvents(); - } - - ngAfterViewInit() { - this._apply(); - this._onWindowResize(); - } - - ngOnDestroy() { - this._subscriber.unsubscribe(); - this._unsubscribeToWinEvents(); - } - - ngOnChanges() { - this._apply(); - this.detectChanges(); - } - - public _ng_onClick(tabkey: string) { - this.service.setActive(tabkey); - this.detectChanges(); - } - - public _ng_onTabClose(event: MouseEvent, tabkey: string) { - this.service.remove(tabkey); - this.detectChanges(); - return stop(event); - } - - public _ng_isArrowsNeeded(): boolean { - return this._sizes.space < 0; - } - - public _ng_onLeftArrowClick() { - if (this._sizes.first === 0) { - return; - } - let offset = 0; - let start = this._sizes.first; - for (let i = this._sizes.first - 1; i >= 0; i -= 1) { - if (offset + this._sizes.tabs[i] < this._sizes.holder) { - offset += this._sizes.tabs[i]; - start = i; - } - } - offset = 0; - for (let i = 0; i < start; i += 1) { - offset -= this._sizes.tabs[i]; - } - this._sizes.first = start; - this._ng_offset = offset; - this._ng_offset = this._ng_offset > 0 ? 0 : this._ng_offset; - this.detectChanges(); - } - - public _ng_onRightArrowClick() { - let offset = 0; - let hasSpace: boolean = true; - let last: number = this._sizes.first; - for (let i = last, max = this._sizes.tabs.length - 1; i <= max; i += 1) { - if (offset + this._sizes.tabs[i] < this._sizes.holder) { - offset += this._sizes.tabs[i]; - last = i; - } else { - hasSpace = false; - } - } - if (hasSpace) { - return; - } - this._sizes.first = last + (last + 1 <= this._sizes.tabs.length - 1 ? 1 : 0); - this._ng_offset -= offset; - this.detectChanges(); - } - - public _ng_onContextMenu(event: MouseEvent, tab: ITabInternal) { - tab.subjects.onTitleContextMenu.emit(event); - } - - private _apply() { - this._subscriber.unsubscribe(); - this._subscriber.register( - this.service.subjects.get().new.subscribe(this.onNewTab.bind(this)), - this.service.subjects.get().removed.subscribe(this.onRemoveTab.bind(this)), - this.service.subjects.get().active.subscribe(this.onActiveTabChange.bind(this)), - this.service.subjects.get().options.subscribe(this._onOptionsUpdated.bind(this)), - this.service.subjects.get().updated.subscribe(this._onTabUpdated.bind(this)), - ); - this._tabs = this.service.getTabs(); - this.tabs = Array.from(this._tabs.values()); - this._getDefaultOptions(); - } - - private _subscribeToWinEvents() { - this._onWindowResize = this._onWindowResize.bind(this); - window.addEventListener('resize', this._onWindowResize); - } - - private _unsubscribeToWinEvents() { - window.removeEventListener('resize', this._onWindowResize); - } - - private async onNewTab(tab: ITabInternal) { - this._tabs.set(tab.uuid, await tab); - if (tab.unshift === true) { - this.tabs.unshift(tab); - } else { - this.tabs.push(tab); - } - this._calculateSizes().detectChanges(); - } - - private async onRemoveTab(uuid: string) { - this._tabs.delete(uuid); - this.tabs = this.tabs.filter((tab: ITabInternal) => { - return tab.uuid !== uuid; - }); - this._calculateSizes().detectChanges(); - this._checkOffset(); - } - - private async onActiveTabChange(tab: ITabInternal) { - this._tabs.forEach((storedTab: ITabInternal, uuid: string) => { - if (storedTab.uuid !== tab.uuid && storedTab.active) { - storedTab.active = false; - this._tabs.set(uuid, storedTab); - } - if (storedTab.uuid === tab.uuid && !storedTab.active) { - storedTab.active = true; - this._tabs.set(uuid, storedTab); - } - }); - this.detectChanges(); - } - - private async _getDefaultOptions() { - this._ng_options = await this.service.getOptions(); - this.detectChanges(); - } - - private async _onOptionsUpdated(options: TabsOptions) { - this._ng_options = await options; - this._calculateSizes().detectChanges(); - } - - private async _onTabUpdated(tab: ITabInternal) { - this._tabs.set(tab.uuid, tab); - this.tabs = this.tabs.map((storedTab: ITabInternal) => { - if (storedTab.uuid === tab.uuid) { - return tab; - } - return storedTab; - }); - this._calculateSizes().detectChanges(); - } - - private _calculateSizes(): TabsListComponent { - if (this._ng_holderNode === undefined || this._ng_holderNode === null) { - return this; - } - if (this._ng_tabsNode === undefined || this._ng_tabsNode === null) { - return this; - } - const width: number = ( - this._ng_holderNode.nativeElement as HTMLElement - ).getBoundingClientRect().width; - const tabs: number = ( - this._ng_tabsNode.nativeElement as HTMLElement - ).getBoundingClientRect().width; - const injections: number = - this._ng_injectionsNode !== undefined - ? this._ng_injectionsNode !== null - ? (this._ng_injectionsNode.nativeElement as HTMLElement).getBoundingClientRect() - .width - : 0 - : 0; - const space: number = Math.round(width - tabs - injections); - // eslint-disable-next-line no-compare-neg-zero - this._sizes.space = space === -0 ? 0 : space; - this._sizes.holder = width; - this._sizes.tabs = []; - this._ng_tabsElRegs.forEach((tab: ElementRef) => { - this._sizes.tabs.push(tab.nativeElement.getBoundingClientRect().width); - }); - return this; - } - - private _onWindowResize() { - this._calculateSizes(); - this.detectChanges(); - } - - private _checkOffset() { - if (this._sizes.first >= this._sizes.tabs.length) { - this._ng_onLeftArrowClick(); - } - } -} diff --git a/application/client/src/app/ui/elements/tabs/list/styles.less b/application/client/src/app/ui/elements/tabs/list/styles.less deleted file mode 100644 index 2993c092bb..0000000000 --- a/application/client/src/app/ui/elements/tabs/list/styles.less +++ /dev/null @@ -1,265 +0,0 @@ -@import '../../../styles/variables.less'; - -:host { - position: absolute; - display: block; - background: var(--scheme-color-5-lighten-15); - & div.arrow-left { - position: absolute; - background: var(--scheme-color-5-lighten-15); - display: none; - &.top { - display: block; - width: 1rem; - height: 100%; - left: 0; - z-index: 1; - & span { - position: absolute; - display: block; - top: 0; - width: 100%; - left: 0; - padding: 7px 0 0 5px; - color: var(--scheme-color-1); - } - } - } - & div.arrow-right { - position: absolute; - display: none; - background: var(--scheme-color-5-lighten-15); - &.top { - display: block; - width: 1rem; - height: 100%; - right: 0; - z-index: 1; - & span { - position: absolute; - display: block; - top: 0; - width: 100%; - left: 0; - padding: 7px 0 0 5px; - color: var(--scheme-color-1); - } - } - } - & div.wrapper { - position: absolute; - display: block; - height: 100%; - width: 100%; - list-style: none; - padding: 0; - margin: 0; - transition: all 150ms ease-in-out; - & ul.list { - position: absolute; - display: block; - height: 100%; - list-style: none; - padding: 0; - margin: 0; - white-space: nowrap; - box-sizing: content-box !important; - width: auto; - & li.tab { - display: inline-block; - position: relative; - list-style: none; - box-sizing: content-box !important; - cursor: default; - overflow: hidden; - & mat-icon { - color: var(--scheme-color-0); - padding: 3px 6px 3px 2px; - } - & p.title { - display: inline-block; - white-space: nowrap; - color: var(--scheme-color-1); - opacity: 0.5; - max-width: 10rem; - overflow: hidden; - text-overflow: ellipsis; - font-weight: 400; - vertical-align: top; - &.uppercase { - text-transform: uppercase; - font-size: 12px; - } - } - & div.title-injection { - position: relative; - display: inline-block; - padding: 0; - margin: 0; - vertical-align: top; - } - & mat-icon.close { - font-size: 18px; - opacity: 0; - color: var(--scheme-color-3); - vertical-align: top; - &:hover { - color: var(--scheme-color-1); - } - } - &:hover { - & mat-icon.close { - opacity: 1; - } - } - &.active { - box-sizing: content-box !important; - background: var(--scheme-color-5); - &::after { - position: absolute; - display: block; - content: ''; - background: var(--scheme-color-5); - } - & mat-icon.close { - opacity: 1; - } - & p.title { - color: var(--scheme-color-1); - opacity: 1; - } - } - } - &.top { - box-sizing: content-box !important; - &.arrows-offset { - padding: 0 0 0 1rem; - } - & li.tab { - padding: 0; - margin: 0; - height: 100%; - cursor: default; - box-sizing: content-box !important; - & p.title { - padding: 6px 12px; - &.uppercase { - padding: 8px 12px; - } - } - & mat-icon.close { - padding: 7px 0.5rem 0 0; - transition: all 150ms ease-in-out; - transform: translateY(-16px); - vertical-align: top; - } - &:hover { - & mat-icon.close { - transform: translateY(0); - } - } - &.active { - box-sizing: content-box !important; - background: var(--scheme-color-5); - &::after { - width: 100%; - height: 2px; - bottom: -1px; - background: var(--scheme-color-5); - } - & mat-icon.close { - transform: translateY(0); - } - } - } - } - &.left { - white-space: normal; - box-sizing: content-box !important; - & li.tab { - padding: 0; - margin: 0; - height: auto; - cursor: default; - box-sizing: content-box !important; - white-space: nowrap; - width: ~'calc(100% + 6px)'; - & p.title { - padding: 16px 8px 16px 0px; - writing-mode: vertical-rl; - text-orientation: mixed; - transform: rotate(180deg); - &.uppercase { - padding: 16px 9px 16px 0px; - } - } - & mat-icon.close { - display: inline-block; - padding: 0px 0px 0px 0px; - margin: 0px 0px 7px -15px; - vertical-align: bottom; - transition: all 150ms ease-in-out; - transform: translateY(-16px); - pointer-events: none; - } - &:hover { - & mat-icon.close { - transform: translateY(0); - pointer-events: all; - } - } - &.active { - background: var(--scheme-color-5); - &::after { - width: 100%; - height: 2px; - bottom: -1px; - background: var(--scheme-color-5); - } - & mat-icon.close { - transform: translateY(0); - pointer-events: all; - } - } - } - } - } - &.injection { - display: flex; - margin: 0; - padding: 0; - &.top { - flex-flow: row nowrap; - } - &.left { - flex-flow: column nowrap; - } - & ul.list { - display: block; - position: relative; - height: 100%; - margin: 0; - padding: 0; - flex: 1 auto; - order: 1; - width: auto; - &.top { - width: auto; - } - &.left { - height: auto; - } - } - & div.injection { - display: block; - position: relative; - height: 100%; - margin: 0; - padding: 0; - flex: 1 auto; - order: 2; - width: 100%; - } - } - } -} diff --git a/application/client/src/app/ui/elements/tabs/list/template.html b/application/client/src/app/ui/elements/tabs/list/template.html deleted file mode 100644 index 912bc27e91..0000000000 --- a/application/client/src/app/ui/elements/tabs/list/template.html +++ /dev/null @@ -1,24 +0,0 @@ -
-
    -
  • - {{tab.icon}} -

    {{tab.name}}

    -
    - -
    - close -
  • -
-
- -
-
-
- -
-
- -
diff --git a/application/client/src/app/ui/elements/tabs/module.ts b/application/client/src/app/ui/elements/tabs/module.ts deleted file mode 100644 index 8a0721dc71..0000000000 --- a/application/client/src/app/ui/elements/tabs/module.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { ContainersModule } from '../containers/module'; -import { NgModule } from '@angular/core'; -import { CommonModule } from '@angular/common'; -import { MatIconModule } from '@angular/material/icon'; - -import { TabsComponent } from './component'; -import { TabsListComponent } from './list/component'; -import { TabContentComponent } from './content/component'; - -export { TabsComponent, TabsListComponent, TabContentComponent }; - -@NgModule({ - imports: [CommonModule, ContainersModule, MatIconModule], - declarations: [TabsListComponent, TabContentComponent, TabsComponent], - exports: [TabsComponent], -}) -export class TabsModule {} diff --git a/application/client/src/app/ui/elements/tabs/options.ts b/application/client/src/app/ui/elements/tabs/options.ts deleted file mode 100644 index e6b71cbfcf..0000000000 --- a/application/client/src/app/ui/elements/tabs/options.ts +++ /dev/null @@ -1,42 +0,0 @@ -import { IComponentDesc } from '../containers/dynamic/component'; - -export enum ETabsListDirection { - top = 'top', - left = 'left', - right = 'right', - bottom = 'bottom', -} - -export interface IInjections { - bar?: IComponentDesc; -} - -export interface ITabsOptions { - direction?: ETabsListDirection; - minimized?: boolean; - injections?: IInjections; - noTabsContent?: IComponentDesc; -} - -export class TabsOptions { - public direction: ETabsListDirection = ETabsListDirection.top; - public minimized: boolean = false; - public injections: IInjections | undefined; - public noTabsContent: IComponentDesc | undefined; - - constructor(options?: ITabsOptions) { - options = options ? options : {}; - if (options.direction !== void 0) { - this.direction = options.direction; - } - if (options.minimized !== void 0) { - this.minimized = options.minimized; - } - if (options.injections !== void 0) { - this.injections = options.injections; - } - if (options.noTabsContent !== void 0) { - this.noTabsContent = options.noTabsContent; - } - } -} diff --git a/application/client/src/app/ui/elements/tabs/service.ts b/application/client/src/app/ui/elements/tabs/service.ts deleted file mode 100644 index 595f73e7b1..0000000000 --- a/application/client/src/app/ui/elements/tabs/service.ts +++ /dev/null @@ -1,305 +0,0 @@ -import { Subject, Subjects } from '@platform/env/subscription'; -import { TabsOptions, ITabsOptions } from './options'; -import { IComponentDesc } from '../containers/dynamic/component'; -import { ControllerSessionsHistroy } from './controller.histroy'; -import { unique } from '@platform/env/sequence'; -import { setProp, getProp } from '@platform/env/obj'; - -export { ETabsListDirection, TabsOptions } from './options'; - -export interface ITabSubjects { - onTitleContextMenu: Subject; - onBeforeTabRemove: Subject; -} - -export interface ITab { - uuid?: string; - icon?: string; - uppercaseTitle?: boolean; - name: string; - active: boolean; - closable?: boolean; - content?: IComponentDesc; - tabCaptionInjection?: IComponentDesc; -} - -export interface ITabInternal { - uuid: string; - name: string; - uppercaseTitle: boolean; - icon?: string; - active: boolean; - closable: boolean; - subjects: ITabSubjects; - content?: IComponentDesc; - tabCaptionInjection?: IComponentDesc; - unshift: boolean; -} - -export interface ITabAPI { - tabCaptionInjection?: IComponentDesc; - subjects: ITabSubjects; - getGUID: () => string; - close: () => void; - setTitle: (caption: string) => Error | undefined; - getTitle: () => Error | string; -} - -export class TabsService { - public readonly subjects: Subjects<{ - new: Subject; - removed: Subject; - clear: Subject; - active: Subject; - updated: Subject; - options: Subject; - }> = new Subjects({ - new: new Subject(), - removed: new Subject(), - clear: new Subject(), - active: new Subject(), - updated: new Subject(), - options: new Subject(), - }); - - private _tabs: Map = new Map(); - private _options: TabsOptions = new TabsOptions(); - private _history: ControllerSessionsHistroy = new ControllerSessionsHistroy(); - private _uuid: string = unique(); - - constructor(params?: { - tabs?: Map; - options?: TabsOptions; - uuid?: string; - }) { - params = params ? params : {}; - if (params.tabs !== void 0) { - this._tabs = params.tabs; - } - if (params.options !== void 0) { - this._options = params.options; - } - if (typeof params.uuid === 'string' && params.uuid.trim() !== '') { - this._uuid = params.uuid; - } - } - - public destroy() { - this.subjects.destroy(); - } - - public getUuid(): string { - return this._uuid; - } - - public setActive(uuid: string) { - const tab = this._tabs.get(uuid); - if (tab === undefined) { - return; - } - tab.active = true; - this._tabs.set(uuid, tab); - this.subjects.get().active.emit(tab); - this._history.add(uuid); - } - - public next() { - const guids: string[] = Array.from(this._tabs.keys()); - if (guids.length === 0) { - return; - } - const active = this.getActiveTab(); - let curr: number = -1; - if (active !== undefined) { - curr = guids.findIndex((t) => t === active.uuid); - } - if (curr + 1 > guids.length - 1) { - curr = -1; - } - this.setActive(guids[curr + 1]); - } - - public prev() { - const guids: string[] = Array.from(this._tabs.keys()); - if (guids.length === 0) { - return; - } - const active = this.getActiveTab(); - let curr: number = guids.length; - if (active !== undefined) { - curr = guids.findIndex((t) => t === active.uuid); - } - if (curr - 1 < 0) { - curr = guids.length; - } - this.setActive(guids[curr - 1]); - } - - public add(tab: ITab): ITabAPI { - const _tab = this._normalize(tab); - if (_tab === null) { - throw new Error(`Fail to create tab`); - } - this._tabs.set(_tab.uuid, _tab); - this.subjects.get().new.emit(_tab); - if (_tab.active) { - this.setActive(_tab.uuid); - } - return { - tabCaptionInjection: _tab.tabCaptionInjection, - subjects: _tab.subjects, - getGUID: () => _tab.uuid, - close: this.remove.bind(this, _tab.uuid), - setTitle: this.setTitle.bind(this, _tab.uuid), - getTitle: this.getTitle.bind(this, _tab.uuid), - }; - } - - public unshift(tab: ITab) { - const _tab = this._normalize(tab); - if (_tab === null) { - return; - } - _tab.unshift = true; - const tabs: Map = new Map(); - tabs.set(_tab.uuid, _tab); - this._tabs.forEach((t: ITabInternal, k: string) => { - tabs.set(k, t); - }); - this._tabs = tabs; - this.subjects.get().new.emit(_tab); - if (_tab.active) { - this.setActive(_tab.uuid); - } - } - - public remove(uuid: string): Error | undefined { - const tab = this._tabs.get(uuid); - if (tab === undefined) { - return new Error(`Tab "${uuid}" isn't found.`); - } - if ( - tab.content !== undefined && - tab.content.inputs !== undefined && - tab.content.inputs.onBeforeTabRemove !== undefined - ) { - (tab.content.inputs.onBeforeTabRemove as Subject).emit(); - } - this._tabs.delete(uuid); - this._history.remove(uuid); - this.subjects.get().removed.emit(uuid); - if (tab.active && this._tabs.size > 0) { - const last: string | undefined = this._history.getLast(); - if (last === undefined) { - const next = this._tabs.values().next().value; - next !== undefined && this.setActive(next.uuid); - } else { - this.setActive(last); - } - } - return undefined; - } - - public has(uuid: string): boolean { - let result: boolean = false; - this._tabs.forEach((tab) => { - if (tab.uuid === uuid) { - result = true; - } - }); - return result; - } - - public getTabs(): Map { - return this._tabs; - } - - public getOptions(): TabsOptions { - return this._options; - } - - public setOptions(options: TabsOptions): void { - this._options = options; - this.subjects.get().options.emit(this._options); - } - - public updateOptions(options: ITabsOptions): boolean { - if (typeof options !== 'object' || options === null) { - return false; - } - Object.keys(options).forEach((key: string) => { - setProp(this._options, key, getProp(options, key)); - }); - this.subjects.get().options.emit(this._options); - return true; - } - - public getActiveTab(): ITabInternal | undefined { - let active: ITabInternal | undefined; - this._tabs.forEach((tab: ITabInternal) => { - if (active !== undefined) { - return; - } - if (tab.active) { - active = tab; - } - }); - return active; - } - - public clear() { - this._tabs.clear(); - this.subjects.get().clear.emit(); - } - - public setTitle(uuid: string, title: string): Error | undefined { - const tab: ITabInternal | undefined = this._tabs.get(uuid); - if (tab === undefined) { - return new Error(`Fail to find tab "${uuid}", tab doesn't exist.`); - } - tab.name = title; - this._tabs.set(uuid, tab); - this.subjects.get().updated.emit(tab); - return undefined; - } - - public getTitle(uuid: string): Error | string { - const tab: ITabInternal | undefined = this._tabs.get(uuid); - if (tab === undefined) { - return new Error(`Fail to find tab "${uuid}", tab doesn't exist.`); - } - return tab.name; - } - - public getServiceGuid(): string { - return this._uuid; - } - - private _normalize(tab: ITab): ITabInternal | null { - if (typeof tab !== 'object' || tab === null) { - return null; - } - const _tab: ITabInternal = tab as ITabInternal; - _tab.uuid = - typeof _tab.uuid === 'string' - ? _tab.uuid.trim() !== '' - ? _tab.uuid - : unique() - : unique(); - _tab.closable = typeof _tab.closable === 'boolean' ? _tab.closable : true; - _tab.unshift = false; - _tab.uppercaseTitle = tab.uppercaseTitle === undefined ? false : tab.uppercaseTitle; - _tab.subjects = { - onTitleContextMenu: new Subject(), - onBeforeTabRemove: new Subject(), - }; - if (_tab.content !== undefined) { - if (typeof _tab.content.inputs !== 'object' || _tab.content.inputs === null) { - _tab.content.inputs = {}; - } - _tab.content.inputs.onBeforeTabRemove = _tab.subjects.onBeforeTabRemove; - _tab.content.inputs.onTitleContextMenu = _tab.subjects.onTitleContextMenu; - } - return _tab; - } -} diff --git a/application/client/src/app/ui/elements/tabs/styles.less b/application/client/src/app/ui/elements/tabs/styles.less deleted file mode 100644 index e0ba2473b8..0000000000 --- a/application/client/src/app/ui/elements/tabs/styles.less +++ /dev/null @@ -1,63 +0,0 @@ -@import '../../styles/variables.less'; - -:host { - position: absolute; - display: block; - background: var(--scheme-color-4); - & element-tabs-list { - position: absolute; - overflow: hidden; - &.top { - left: 0; - right: 0; - top: 0; - height: @tabs-list-height; - } - &.bottom { - left: 0; - right: 0; - top: 0; - width: @tabs-list-height; - } - &.left { - left: 0; - top: 0; - bottom: 0; - width: @tabs-list-height; - } - &.right { - top: 0; - right: 0; - bottom: 0; - width: @tabs-list-height; - } - } - & lib-complex-tab-content { - position: absolute; - overflow: hidden; - &.top { - left: 0; - right: 0; - top: @tabs-list-height; - bottom: 0; - } - &.bottom { - left: 0; - right: 0; - bottom: @tabs-list-height; - top: 0; - } - &.left { - top: 0; - right: 0; - left: @tabs-list-height; - bottom: 0; - } - &.right { - top: 0; - left: 0; - right: @tabs-list-height; - bottom: 0; - } - } -} diff --git a/application/client/src/app/ui/elements/tabs/template.html b/application/client/src/app/ui/elements/tabs/template.html deleted file mode 100644 index e7cc8cdb12..0000000000 --- a/application/client/src/app/ui/elements/tabs/template.html +++ /dev/null @@ -1,2 +0,0 @@ - - \ No newline at end of file diff --git a/application/client/src/app/ui/elements/teamwork/component.ts b/application/client/src/app/ui/elements/teamwork/component.ts deleted file mode 100644 index 566f91ef43..0000000000 --- a/application/client/src/app/ui/elements/teamwork/component.ts +++ /dev/null @@ -1,89 +0,0 @@ -import { Component, Input, AfterContentInit, ChangeDetectorRef } from '@angular/core'; -import { Session } from '@service/session'; -import { Ilc, IlcInterface } from '@env/decorators/component'; -import { Initial } from '@env/decorators/initial'; -import { ChangesDetector } from '@ui/env/extentions/changes'; -import { GitHubRepo } from '@platform/types/github'; -import { FileMetaData } from '@platform/types/github/filemetadata'; -import { MatSelectChange } from '@angular/material/select'; - -@Component({ - selector: 'app-views-teamwork-applet', - templateUrl: './template.html', - styleUrls: ['./styles.less'], - standalone: false, -}) -@Initial() -@Ilc() -export class Teamwork extends ChangesDetector implements AfterContentInit { - @Input() session!: Session; - - protected reload() { - this.repos = this.session.teamwork.repo().list(); - this.active = this.session.teamwork.repo().getActive(); - this.selected = this.active === undefined ? 0 : this.active; - this.remote = this.session.teamwork.md().getIfDifferentToLocal(); - this.detectChanges(); - } - public repos: GitHubRepo[] = []; - public active: GitHubRepo | undefined = undefined; - public selected: GitHubRepo | number = 0; - public remote: FileMetaData | undefined; - - constructor(cdRef: ChangeDetectorRef) { - super(cdRef); - } - - public ngAfterContentInit(): void { - this.reload(); - this.env().subscriber.register( - this.session.teamwork.subjects.get().active.subscribe(() => { - this.reload(); - this.detectChanges(); - }), - ); - this.env().subscriber.register( - this.session.teamwork.subjects.get().loaded.subscribe(() => { - this.reload(); - this.detectChanges(); - }), - ); - this.env().subscriber.register( - this.session.teamwork.subjects.get().metadata.subscribe(() => { - this.reload(); - this.detectChanges(); - }), - ); - } - - public onSelectionChange(event: MatSelectChange) { - if (event.value === 0) { - this.selected = 0; - this.session.teamwork.repo().setActive(undefined); - } else { - this.selected = event.value; - this.session.teamwork.repo().setActive(event.value); - } - this.detectChanges(); - } - - public openManager() { - this.session.switch().sidebar.teamwork(); - } - - public reloadRemote() { - this.session.teamwork.update(); - } - public importRemote() { - this.session.teamwork - .md() - .importFromRemote() - .then(() => { - this.reload(); - }) - .catch((err: Error) => { - this.log().error(`Fail to import from remote: ${err.message}`); - }); - } -} -export interface Teamwork extends IlcInterface {} diff --git a/application/client/src/app/ui/elements/teamwork/module.ts b/application/client/src/app/ui/elements/teamwork/module.ts deleted file mode 100644 index 1a9ce5faa6..0000000000 --- a/application/client/src/app/ui/elements/teamwork/module.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { NgModule } from '@angular/core'; -import { CommonModule } from '@angular/common'; -import { ContainersModule } from '@elements/containers/module'; -import { MatButtonModule } from '@angular/material/button'; -import { MatFormFieldModule } from '@angular/material/form-field'; -import { MatSelectModule } from '@angular/material/select'; -import { MatExpansionModule } from '@angular/material/expansion'; -import { FormsModule, ReactiveFormsModule } from '@angular/forms'; -import { Teamwork } from './component'; - -@NgModule({ - imports: [ - CommonModule, - ContainersModule, - MatFormFieldModule, - MatSelectModule, - MatExpansionModule, - MatButtonModule, - FormsModule, - ReactiveFormsModule, - ], - declarations: [Teamwork], - exports: [Teamwork], -}) -export class TeamworkAppletModule {} diff --git a/application/client/src/app/ui/elements/teamwork/styles.less b/application/client/src/app/ui/elements/teamwork/styles.less deleted file mode 100644 index 35ce7b1146..0000000000 --- a/application/client/src/app/ui/elements/teamwork/styles.less +++ /dev/null @@ -1,45 +0,0 @@ -@import '../../styles/variables.less'; - -:host { - position: relative; - display: block; - padding: 0; - margin: 0 0 24px 0; - overflow: hidden; - outline: none; - & div.remote { - max-height: 250px; - overflow-x: hidden; - overflow-y: auto; - & ul { - list-style: none; - margin: 4px 0 8px 0; - & > li { - display: flex; - flex-direction: row; - align-items: center; - & > span.color { - position: relative; - display: block; - height: 16px; - width: 8px; - } - & > span.label { - padding-left: 8px; - } - } - } - } - & div.controlls{ - position: relative; - width: 100%; - overflow: hidden; - text-align: right; - white-space: nowrap; - height: auto; - & button { - margin-left: 8px; - } - } - -} diff --git a/application/client/src/app/ui/elements/teamwork/template.html b/application/client/src/app/ui/elements/teamwork/template.html deleted file mode 100644 index d792f156d7..0000000000 --- a/application/client/src/app/ui/elements/teamwork/template.html +++ /dev/null @@ -1,57 +0,0 @@ - - - Teamwork - Available {{repos.length}} repositories - -
-

List of remotes

- - - Do not share; use locally - - {{repo.owner}}/{{repo.repo}}:{{repo.branch}} - - - -
-

Available on remote

- -

Filters ({{remote.def.filters.length}}):

-
    -
  • - - - {{filter.filter.filter}} -
  • -
-
- -

Charts ({{remote.def.charts.length}}):

-
    -
  • - - {{chart.filter}} -
  • -
-
- -

Bookmarks ({{remote.def.bookmarks.length}}):

-
    -
  • - line: {{bookmark.position}} -
  • -
-
-
-
- - - -
-
-
diff --git a/application/client/src/app/ui/elements/timezones/component.ts b/application/client/src/app/ui/elements/timezones/component.ts deleted file mode 100644 index 813ff613e4..0000000000 --- a/application/client/src/app/ui/elements/timezones/component.ts +++ /dev/null @@ -1,67 +0,0 @@ -import { - Component, - ChangeDetectorRef, - Input, - ViewEncapsulation, - ViewChild, - AfterViewInit, -} from '@angular/core'; -import { DomSanitizer, SafeHtml } from '@angular/platform-browser'; -import { Ilc, IlcInterface } from '@env/decorators/component'; -import { ChangesDetector } from '@ui/env/extentions/changes'; -import { Timezone } from './timezone'; -import { State } from './state'; -import { Initial } from '@env/decorators/initial'; -import { HiddenFilter } from '@elements/filter.hidden/component'; - -@Component({ - selector: 'app-elements-timezone-selector', - templateUrl: './template.html', - styleUrls: ['./styles.less'], - encapsulation: ViewEncapsulation.None, - standalone: false, -}) -@Initial() -@Ilc() -export class ElementsTimezoneSelector extends ChangesDetector implements AfterViewInit { - @Input() public selected!: (timezone: Timezone) => void; - @Input() public close!: () => void; - - @ViewChild('filter') filter!: HiddenFilter; - - public state: State; - - constructor(cdRef: ChangeDetectorRef, private _sanitizer: DomSanitizer) { - super(cdRef); - this.state = new State(); - } - - public ngAfterViewInit(): void { - this.env().subscriber.register( - this.filter.filter.subjects.get().change.subscribe((value: string) => { - this.state.update(value); - this.detectChanges(); - }), - ); - this.env().subscriber.register( - this.filter.filter.subjects.get().drop.subscribe(() => { - this.state.update(''); - this.detectChanges(); - }), - ); - } - - public ngOnSelect(timezine: Timezone) { - this.selected(timezine); - this.close(); - } - - public safeHtml(html: string): SafeHtml { - return this._sanitizer.bypassSecurityTrustHtml(html); - } - - public timezones(): Timezone[] { - return this.state.timezones.filter((t) => !t.hidden()); - } -} -export interface ElementsTimezoneSelector extends IlcInterface {} diff --git a/application/client/src/app/ui/elements/timezones/module.ts b/application/client/src/app/ui/elements/timezones/module.ts deleted file mode 100644 index 1c35147632..0000000000 --- a/application/client/src/app/ui/elements/timezones/module.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { NgModule } from '@angular/core'; -import { CommonModule } from '@angular/common'; -import { ElementsTimezoneSelector } from './component'; -import { HiddenFilterModule } from '@elements/filter.hidden/module'; - -@NgModule({ - imports: [CommonModule, HiddenFilterModule], - declarations: [ElementsTimezoneSelector], - exports: [ElementsTimezoneSelector], - bootstrap: [ElementsTimezoneSelector] -}) -export class TimezoneSelectorModule {} diff --git a/application/client/src/app/ui/elements/timezones/state.ts b/application/client/src/app/ui/elements/timezones/state.ts deleted file mode 100644 index 36f7dd5997..0000000000 --- a/application/client/src/app/ui/elements/timezones/state.ts +++ /dev/null @@ -1,46 +0,0 @@ -import { Timezone } from '@elements/timezones/timezone'; -import { Holder } from '@module/matcher'; - -import * as moment_timezone from 'moment-timezone'; - -let cache: Timezone[] | undefined; - -export class State extends Holder { - public timezones: Timezone[] = []; - - constructor() { - super(); - const now = new Date(); - const utc = Date.UTC(now.getUTCFullYear(), now.getUTCMonth()); - if (cache !== undefined) { - this.timezones = cache; - } else { - this.timezones = moment_timezone.tz - .names() - .map((tzName: string) => { - const zone = moment_timezone.tz.zone(tzName); - if (zone === null) { - return undefined; - } else { - const offset = zone.utcOffset(utc); - return new Timezone( - tzName, - `${offset === 0 ? '' : offset > 0 ? '-' : '+'}${Math.abs(offset) / 60}`, - offset, - this.matcher, - ); - } - }) - .filter((t) => t !== undefined) as Timezone[]; - this.timezones.unshift(new Timezone('UTC', '', 0, this.matcher)); - cache = this.timezones; - } - } - - public update(value: string): void { - this.matcher.search(value); - this.timezones = this.timezones.sort( - (a: Timezone, b: Timezone) => b.getScore() - a.getScore(), - ); - } -} diff --git a/application/client/src/app/ui/elements/timezones/styles.less b/application/client/src/app/ui/elements/timezones/styles.less deleted file mode 100644 index 5369741bc9..0000000000 --- a/application/client/src/app/ui/elements/timezones/styles.less +++ /dev/null @@ -1,45 +0,0 @@ -@import '../../../ui/styles/variables.less'; - - -app-elements-timezone-selector { - position: relative; - display: block; - width: 100%; - height: 100%; - p.timezone { - display: flex; - position: relative; - flex-direction: row; - padding: 6px 12px; - font-size: 15px; - color: var(--scheme-color-2); - &:hover { - background-color: var(--scheme-color-4); - } - & span.spacer { - flex: auto; - margin: 0 12px; - } - & span.utc{ - color: var(--scheme-color-0); - } - & span.name, - & span.utc{ - & > span { - background-color: var(--scheme-color-3); - color: var(--scheme-color-0); - } - } - } - & div.filter { - position: absolute; - z-index: 1000; - padding: 6px 12px; - background: var(--scheme-color-warning-light); - top: 6px; - right: 6px; - box-shadow: 3px 3px 3px rgb(0 0 0 / 40%); - border-radius: 3px; - } - -} \ No newline at end of file diff --git a/application/client/src/app/ui/elements/timezones/template.html b/application/client/src/app/ui/elements/timezones/template.html deleted file mode 100644 index 8decb9e2f9..0000000000 --- a/application/client/src/app/ui/elements/timezones/template.html +++ /dev/null @@ -1,6 +0,0 @@ - -

- - - -

diff --git a/application/client/src/app/ui/elements/timezones/timezone.ts b/application/client/src/app/ui/elements/timezones/timezone.ts deleted file mode 100644 index 54c46c9169..0000000000 --- a/application/client/src/app/ui/elements/timezones/timezone.ts +++ /dev/null @@ -1,52 +0,0 @@ -import * as moment_timezone from 'moment-timezone'; -import * as wasm from '@loader/wasm'; - -import { Matchee } from '@module/matcher'; - -export class Timezone extends Matchee { - public readonly name: string; - public readonly utc: string; - public readonly offset: number; - - static matcher: wasm.Matcher; - - constructor(name: string, utc: string, offset: number, matcher: wasm.Matcher) { - super(matcher, { name: name, utc: utc }); - Timezone.matcher = matcher; - this.name = name; - this.utc = utc; - this.offset = offset; - } - - static from(tz: string): Timezone | Error { - const now = new Date(); - const utc = Date.UTC(now.getUTCFullYear(), now.getUTCMonth()); - const zone = moment_timezone.tz.zone(tz); - if (zone === null) { - return new Error(`Fail to create timezone from "${tz}"`); - } - const offset = zone.utcOffset(utc); - return new Timezone( - tz, - `${offset === 0 ? '' : offset > 0 ? '-' : '+'}${Math.abs(offset) / 60}`, - offset, - Timezone.matcher !== undefined ? Timezone.matcher : wasm.Matcher.new(), - ); - } - - public hidden(): boolean { - return this.getScore() === 0; - } - - public get html(): { - name: string; - utc: string; - } { - const name: string | undefined = this.getHtmlOf('html_name'); - const utc: string | undefined = this.getHtmlOf('html_utc'); - return { - name: name === undefined ? this.name : name, - utc: utc === undefined ? this.utc : utc, - }; - } -} diff --git a/application/client/src/app/ui/elements/tooltip/component.ts b/application/client/src/app/ui/elements/tooltip/component.ts deleted file mode 100644 index ba9ac439de..0000000000 --- a/application/client/src/app/ui/elements/tooltip/component.ts +++ /dev/null @@ -1,45 +0,0 @@ -import { - Component, - Input, - OnDestroy, - ChangeDetectorRef, - AfterViewInit, - TemplateRef, -} from '@angular/core'; - -@Component({ - selector: 'app-com-tooltip', - templateUrl: './template.html', - styleUrls: ['./styles.less'], - standalone: false, -}) -export class ComTooltipComponent implements OnDestroy, AfterViewInit { - @Input() public appTooltipText!: string; - @Input() public appTooltipContent!: TemplateRef; - @Input() public appTooltipRefreshRate: number | undefined; - - private _refreshTimer: any; - - constructor(private _cdRef: ChangeDetectorRef) { - this._update = this._update.bind(this); - } - - public ngOnDestroy() { - clearTimeout(this._refreshTimer); - } - - public ngAfterViewInit() { - if ( - typeof this.appTooltipRefreshRate === 'number' && - !isNaN(this.appTooltipRefreshRate) && - isFinite(this.appTooltipRefreshRate) - ) { - this._update(); - } - } - - private _update() { - this._cdRef.detectChanges(); - this._refreshTimer = setTimeout(this._update, this.appTooltipRefreshRate); - } -} diff --git a/application/client/src/app/ui/elements/tooltip/styles.less b/application/client/src/app/ui/elements/tooltip/styles.less deleted file mode 100644 index bf62c12a9e..0000000000 --- a/application/client/src/app/ui/elements/tooltip/styles.less +++ /dev/null @@ -1,9 +0,0 @@ -@import '../../styles/variables.less'; - -:host { - position: relative; - display: block; - background: var(--scheme-color-4); - border-radius: 2px; - padding: 6px; -} diff --git a/application/client/src/app/ui/elements/tooltip/template.html b/application/client/src/app/ui/elements/tooltip/template.html deleted file mode 100644 index 31a4adc140..0000000000 --- a/application/client/src/app/ui/elements/tooltip/template.html +++ /dev/null @@ -1,5 +0,0 @@ - - {{appTooltipText}} - - - \ No newline at end of file diff --git a/application/client/src/app/ui/elements/tree/component.ts b/application/client/src/app/ui/elements/tree/component.ts deleted file mode 100644 index c6c3b1ae81..0000000000 --- a/application/client/src/app/ui/elements/tree/component.ts +++ /dev/null @@ -1,245 +0,0 @@ -import { - Component, - ChangeDetectorRef, - AfterViewInit, - AfterContentInit, - ViewEncapsulation, - ViewChild, - ElementRef, -} from '@angular/core'; -import { DomSanitizer, SafeHtml } from '@angular/platform-browser'; -import { Ilc, IlcInterface } from '@env/decorators/component'; -import { ChangesDetector } from '@ui/env/extentions/changes'; -import { State } from './state'; -import { Initial } from '@env/decorators/initial'; -import { stop } from '@ui/env/dom'; - -import * as Scheme from './scheme'; -import * as Factory from '@platform/types/observe/factory'; - -@Component({ - selector: 'app-elements-tree', - templateUrl: './template.html', - styleUrls: ['./styles.less'], - encapsulation: ViewEncapsulation.None, - standalone: false, -}) -@Initial() -@Ilc() -export class ElementsTreeSelector - extends ChangesDetector - implements AfterViewInit, AfterContentInit -{ - @ViewChild('container') container!: ElementRef; - - public state: State; - private init!: Promise; - - constructor( - cdRef: ChangeDetectorRef, - private _sanitizer: DomSanitizer, - ) { - super(cdRef); - this.state = new State(this); - } - - public ngAfterContentInit(): void { - this.init = this.state.init(this.ilc().services).catch((err: Error) => { - this.log().error(`Fail to init folder's tree state: ${err.message}`); - }); - } - - public ngAfterViewInit(): void { - this.state.bind(this.container.nativeElement); - this.init.then(() => { - this.state.expand(); - }); - } - - public safeHtml(html: string): SafeHtml { - return this._sanitizer.bypassSecurityTrustHtml(html); - } - - public hasChild(_: number, _nodeData: Scheme.DynamicFlatNode): boolean { - return _nodeData.expandable; - } - - public ngItemContextMenu(event: MouseEvent, entity: Scheme.Entity) { - if (entity.favourite) { - this.ilc().emitter.ui.contextmenu.open({ - items: [ - { - caption: 'Delete from favourites', - handler: () => { - this.state.removePlace(entity); - this.detectChanges(); - }, - }, - ], - x: event.x, - y: event.y, - }); - return; - } - if (entity.isFolder()) { - this.ilc().emitter.ui.contextmenu.open({ - items: [ - { - caption: 'Add to favourites', - handler: () => { - this.ilc() - .services.system.favorites.places() - .add(entity.getPath()) - .then(() => { - this.detectChanges(); - }) - .catch((err: Error) => { - this.log().error( - `Fail to add place into favorites: ${err.message}`, - ); - }); - }, - }, - ], - x: event.x, - y: event.y, - }); - return; - } - this.ilc().emitter.ui.contextmenu.open({ - items: [ - { - caption: 'Open as text', - handler: () => { - this.ilc() - .services.system.session.initialize() - .observe( - new Factory.File() - .type(Factory.FileType.Text) - .asText() - .file(entity.getPath()) - .get(), - ) - .catch((err: Error) => { - this.log().error(`Fail to open text file; error: ${err.message}`); - }); - }, - }, - { - caption: 'Open as DLT', - handler: () => { - this.ilc() - .services.system.session.initialize() - .observe( - new Factory.File() - .asDlt() - .type(Factory.FileType.Binary) - .file(entity.getPath()) - .get(), - ) - .catch((err: Error) => { - this.log().error(`Fail to open dlt file; error: ${err.message}`); - }); - }, - }, - { - caption: 'Open as PcapNG', - handler: () => { - this.ilc() - .services.system.session.initialize() - .observe( - new Factory.File() - .type(Factory.FileType.PcapNG) - .asDlt() - .file(entity.getPath()) - .get(), - ) - .catch((err: Error) => { - this.log().error(`Fail to open pcapng file; error: ${err.message}`); - }); - }, - }, - { - caption: 'Open as PcapN', - handler: () => { - this.ilc() - .services.system.session.initialize() - .observe( - new Factory.File() - .type(Factory.FileType.PcapLegacy) - .asDlt() - .file(entity.getPath()) - .get(), - ) - .catch((err: Error) => { - this.log().error(`Fail to open pcapng file; error: ${err.message}`); - }); - }, - }, - { - caption: 'Open with parser plugins', - handler: () => { - this.ilc() - .services.system.session.initialize() - .observe( - new Factory.File() - .type(Factory.FileType.ParserPlugin) - .asParserPlugin() - .file(entity.getPath()) - .get(), - ) - .catch((err: Error) => { - this.log().error( - `Fail to open file with plugins: errord ${err.message}`, - ); - }); - }, - }, - ], - x: event.x, - y: event.y, - }); - } - - public onDefaultAction(entity: Scheme.Entity) { - if (entity.isFolder()) { - return; - } - this.ilc() - .services.system.session.initialize() - .suggest(entity.getPath()) - .catch((err: Error) => { - this.log().error(`Fail open file: ${entity.getPath()}: ${err.message}`); - }); - } - - public onScrolling(event: Event) { - stop(event as MouseEvent); - return false; - } - - public add() { - this.ilc() - .services.system.favorites.places() - .selectAndAdd() - .then(() => { - this.detectChanges(); - }) - .catch((err: Error) => { - this.log().error(`Fail to add place into favorites: ${err.message}`); - }); - } - - public reload() { - this.state - .reload() - .then(() => { - this.detectChanges(); - this.state.expand(); - }) - .catch((err: Error) => { - this.log().error(`Fail to reload favorites places: ${err.message}`); - }); - } -} -export interface ElementsTreeSelector extends IlcInterface {} diff --git a/application/client/src/app/ui/elements/tree/entity.ts b/application/client/src/app/ui/elements/tree/entity.ts deleted file mode 100644 index 9499f44cc8..0000000000 --- a/application/client/src/app/ui/elements/tree/entity.ts +++ /dev/null @@ -1,147 +0,0 @@ -import { Filter } from '@elements/filter/filter'; -import { getDomSanitizer } from '@ui/env/globals'; -import { SafeHtml } from '@angular/platform-browser'; -import { fromStr, serialize } from '@platform/env/regex'; -import { getFileExtention } from '@platform/types/files'; -import { FolderEntity, FolderEntityType } from '@platform/types/bindings'; - -const EXTENTION_PATTERN = /^\*\.|^\./gi; - -export class Entity { - public readonly entity: FolderEntity; - public readonly parent: string; - public ext: string | undefined; - public selected: boolean = false; - public favourite: boolean = false; - public expanded: boolean = false; - public exists: boolean = false; - - protected readonly filter: Filter; - - constructor( - entity: FolderEntity, - parent: string, - favourite: boolean, - exists: boolean, - filter: Filter, - ) { - this.entity = entity; - this.parent = parent; - this.favourite = favourite; - this.exists = exists; - this.filter = filter; - if (entity.details) { - this.ext = entity.details.ext.toUpperCase().replace('.', ''); - } - } - - public getPath(): string { - return `${this.parent}${this.parent === '' ? '' : '/'}${this.entity.name}`; - } - - public isFolder(): boolean { - return this.entity.kind === FolderEntityType.Directory; - } - - public getName(): string { - return this.entity.name; - } - - public getExtention(): string { - return getFileExtention(this.entity.name); - } - - public selecting(): { - select(): void; - unselect(): void; - } { - return { - select: (): void => { - this.selected = true; - }, - unselect: (): void => { - this.selected = false; - }, - }; - } - - public isVisible(): boolean { - if (this.expanded) { - return true; - } - const value = this.filter.value(); - if (value === undefined) { - return true; - } - const filter = value.toLowerCase(); - if (filter.trim() === '') { - return true; - } - if (this.isExtentionSearch(filter)) { - const extention = this.getExtention(); - if (extention.trim() === '') { - return true; - } - return ( - this.getExtention() - .toLowerCase() - .indexOf(serialize(filter.replace(EXTENTION_PATTERN, ''))) !== -1 - ); - } else { - return this.getName().toLowerCase().indexOf(serialize(filter)) !== -1; - } - } - - public html(): SafeHtml { - const name = this.getName(); - const value = this.filter.value(); - if (value === undefined) { - return getDomSanitizer().bypassSecurityTrustHtml(name); - } - const filter = value.toLowerCase(); - if (filter.trim() === '') { - return getDomSanitizer().bypassSecurityTrustHtml(name); - } - if (this.isExtentionSearch(filter)) { - const extention = this.getExtention(); - if (extention.trim() === '') { - return getDomSanitizer().bypassSecurityTrustHtml(name); - } - const regexp = fromStr(serialize(filter.replace(EXTENTION_PATTERN, ''))); - if (regexp instanceof Error) { - return getDomSanitizer().bypassSecurityTrustHtml(name); - } - const regexpExt = fromStr(serialize(`.${extention}`) + '$'); - if (regexpExt instanceof Error) { - return getDomSanitizer().bypassSecurityTrustHtml(name); - } - const match = extention.match(regexp); - if (match === null) { - return getDomSanitizer().bypassSecurityTrustHtml(name); - } - let html = extention; - match.forEach((m) => { - html = html.replace(m, `${m}`); - }); - return getDomSanitizer().bypassSecurityTrustHtml(name.replace(regexpExt, `.${html}`)); - } else { - const regexp = fromStr(filter); - if (regexp instanceof Error) { - return getDomSanitizer().bypassSecurityTrustHtml(name); - } - const match = name.match(regexp); - if (match === null) { - return getDomSanitizer().bypassSecurityTrustHtml(name); - } - let html = name; - match.forEach((m) => { - html = html.replace(m, `${m}`); - }); - return getDomSanitizer().bypassSecurityTrustHtml(html); - } - } - - protected isExtentionSearch(filter: string): boolean { - return filter.startsWith('.') || filter.startsWith('*.'); - } -} diff --git a/application/client/src/app/ui/elements/tree/module.ts b/application/client/src/app/ui/elements/tree/module.ts deleted file mode 100644 index 68e9df68c0..0000000000 --- a/application/client/src/app/ui/elements/tree/module.ts +++ /dev/null @@ -1,30 +0,0 @@ -import { NgModule } from '@angular/core'; -import { CommonModule } from '@angular/common'; -import { MatTreeModule } from '@angular/material/tree'; -import { CdkTreeModule } from '@angular/cdk/tree'; -import { MatProgressBarModule } from '@angular/material/progress-bar'; -import { MatButtonModule } from '@angular/material/button'; -import { MatIconModule } from '@angular/material/icon'; -import { MatProgressSpinnerModule } from '@angular/material/progress-spinner'; -import { FilterInputModule } from '@elements/filter/module'; - -import { ElementsTreeSelector } from './component'; - -import { InputListenerDirective } from '@ui/env/directives/input'; - -@NgModule({ - imports: [ - CommonModule, - MatTreeModule, - CdkTreeModule, - MatProgressBarModule, - MatButtonModule, - MatIconModule, - FilterInputModule, - MatProgressSpinnerModule, - ], - declarations: [ElementsTreeSelector, InputListenerDirective], - exports: [ElementsTreeSelector], - bootstrap: [ElementsTreeSelector], -}) -export class TreeModule {} diff --git a/application/client/src/app/ui/elements/tree/scheme.ts b/application/client/src/app/ui/elements/tree/scheme.ts deleted file mode 100644 index 53a59b8675..0000000000 --- a/application/client/src/app/ui/elements/tree/scheme.ts +++ /dev/null @@ -1,274 +0,0 @@ -import { CollectionViewer, SelectionChange, DataSource } from '@angular/cdk/collections'; -import { FlatTreeControl } from '@angular/cdk/tree'; -import { BehaviorSubject, merge, Observable } from 'rxjs'; -import { map } from 'rxjs/operators'; -import { Entity } from './entity'; -import { Services } from '@service/ilc/services'; -import { Filter } from '@elements/filter/filter'; -import { FavoritePlace } from '@service/favorites'; -import { IlcInterface } from '@service/ilc'; -import { ChangesDetector } from '@ui/env/extentions/changes'; -import { FolderEntityType } from '@platform/types/bindings'; - -export { Entity }; - -type ExpandedCallback = () => void; - -const DEFAULT_LEN = 10000; - -export class DynamicFlatNode { - protected expandedCallback: ExpandedCallback | undefined; - - constructor( - public item: Entity, - public level = 1, - public expandable = false, - public isLoading = false, - ) {} - - public onExpanded(cb: ExpandedCallback) { - this.expandedCallback = cb; - } - - public afterExpanded() { - if (this.expandedCallback === undefined) { - return; - } - const cb = this.expandedCallback; - this.expandedCallback = undefined; - cb(); - } - - public isVisible(): boolean { - return this.item.isVisible(); - } -} - -export class DynamicDatabase { - public readonly structure = new Map(); - public roots: FavoritePlace[] = []; - - protected readonly services: Services; - protected readonly filter: Filter; - protected source!: DynamicDataSource; - - constructor(services: Services, filter: Filter) { - this.services = services; - this.filter = filter; - } - - public destroy() { - this.roots = []; - this.structure.clear(); - } - - public bind(source: DynamicDataSource) { - this.source = source; - } - - public initialData(): DynamicFlatNode[] { - return this.roots.map( - (root: FavoritePlace) => - new DynamicFlatNode( - new Entity( - { - name: root.path, - fullname: root.path, - kind: FolderEntityType.Directory, - details: null, - }, - '', - true, - root.exists, - this.filter, - ), - 0, - root.exists, - ), - ); - } - - public overwrite(roots: FavoritePlace[]) { - this.roots = roots; - this.source.data = this.initialData(); - } - - public getChildren(path: string): Promise { - const entities = this.structure.get(path); - if (entities !== undefined) { - return Promise.resolve(entities); - } - return new Promise((resolve, reject) => { - this.services.system.bridge - .files() - .ls({ paths: [path], depth: 1, max: DEFAULT_LEN }) - .then((data) => { - const sub = data.entities.map( - (entity) => new Entity(entity, path, false, true, this.filter), - ); - sub.sort((a) => { - return a.isFolder() ? -1 : 1; - }); - this.structure.set(path, sub); - resolve(sub); - }) - .catch(reject); - }); - } - - public isExpandable(path: string): boolean { - return this.structure.has(path); - } - - public isEmpty(): boolean { - return this.roots.length === 0; - } -} - -export type OnToggleHandler = (entity: Entity, expand: boolean) => void; - -export class DynamicDataSource implements DataSource { - public readonly dataChange = new BehaviorSubject([]); - - protected readonly treeControl: FlatTreeControl; - protected readonly database: DynamicDatabase; - protected readonly onToggle: OnToggleHandler; - protected readonly ilc: IlcInterface & ChangesDetector; - - get data(): DynamicFlatNode[] { - return this.dataChange.value; - } - set data(value: DynamicFlatNode[]) { - this.treeControl.dataNodes = value; - this.dataChange.next(value); - } - - constructor( - treeControl: FlatTreeControl, - database: DynamicDatabase, - onToggle: OnToggleHandler, - ilc: IlcInterface & ChangesDetector, - ) { - this.treeControl = treeControl; - this.database = database; - this.onToggle = onToggle; - this.ilc = ilc; - } - - public connect(collectionViewer: CollectionViewer): Observable { - this.treeControl.expansionModel.changed.subscribe((change) => { - if ( - (change as SelectionChange).added || - (change as SelectionChange).removed - ) { - this.handleTreeControl(change as SelectionChange); - } - }); - return merge(collectionViewer.viewChange, this.dataChange).pipe(map(() => this.data)); - } - - public disconnect(_collectionViewer: CollectionViewer): void { - this.database.destroy(); - } - - public handleTreeControl(change: SelectionChange) { - if (change.added) { - change.added.forEach((node) => this.toggleNode(node, true)); - } - if (change.removed) { - change.removed - .slice() - .reverse() - .forEach((node) => this.toggleNode(node, false)); - } - } - - public expandByPath(path: string): Promise { - const node = this.getByPath(path); - if (node === undefined) { - return Promise.resolve(); - } - return new Promise((resolve) => { - let isResolved = false; - const done = () => { - clearTimeout(timeout); - if (isResolved) { - return; - } - isResolved = true; - resolve(); - }; - const timeout = setTimeout(() => { - // We are using timeout to prevent dead promisses - done(); - }, 5000); - node.onExpanded(() => { - done(); - }); - this.treeControl.expand(node); - }); - } - - public async expand(paths: string[] | DynamicFlatNode): Promise { - if (paths instanceof Array) { - for (const path of paths) { - await this.expandByPath(path); - } - } else { - this.treeControl.expand(paths); - } - return Promise.resolve(); - } - - public getByPath(path: string): DynamicFlatNode | undefined { - return this.data.find((e) => e.item.getPath() == path); - } - - public toggleNode(node: DynamicFlatNode, expand: boolean): Promise { - const index = this.data.indexOf(node); - if (index < 0 || !node.item.exists) { - // If no children, or cannot find the node, no op - node.afterExpanded(); - return Promise.resolve(); - } - this.onToggle(node.item, expand); - node.item.expanded = expand; - return new Promise((resolve, _reject) => { - node.isLoading = true; - this.database - .getChildren(node.item.getPath()) - .then((entries: Entity[]) => { - if (expand) { - const nodes = entries.map( - (entity) => - new DynamicFlatNode(entity, node.level + 1, entity.isFolder()), - ); - this.data.splice(index + 1, 0, ...nodes); - } else { - let count = 0; - for ( - let i = index + 1; - i < this.data.length && this.data[i].level > node.level; - i++, count++ - ) { - // Counting - } - this.data.splice(index + 1, count); - } - // notify the change - this.dataChange.next(this.data); - }) - .catch((err: Error) => { - this.ilc - .log() - .error(`Unexpected error with getting childs for tree: ${err.message}`); - }) - .finally(() => { - node.isLoading = false; - node.afterExpanded(); - this.ilc.detectChanges(); - resolve(); - }); - }); - } -} diff --git a/application/client/src/app/ui/elements/tree/state.ts b/application/client/src/app/ui/elements/tree/state.ts deleted file mode 100644 index fe9f3cfc7f..0000000000 --- a/application/client/src/app/ui/elements/tree/state.ts +++ /dev/null @@ -1,191 +0,0 @@ -import { FlatTreeControl } from '@angular/cdk/tree'; -import { Services } from '@service/ilc'; -import { Filter } from '@elements/filter/filter'; -import { IlcInterface } from '@service/ilc'; -import { ChangesDetector } from '@ui/env/extentions/changes'; -import { favorites, FavoritePlace } from '@service/favorites'; -import { Subscription } from '@platform/env/subscription'; - -import * as Scheme from './scheme'; - -export class State { - public filter: Filter; - public favorites: FavoritePlace[] = []; - public scheme!: { - db: Scheme.DynamicDatabase; - tree: FlatTreeControl; - source: Scheme.DynamicDataSource; - }; - protected ilc: IlcInterface & ChangesDetector; - protected focused: boolean = false; - - constructor(ilc: IlcInterface & ChangesDetector) { - this.ilc = ilc; - this.filter = new Filter(ilc, { - clearOnEnter: true, - clearOnEscape: true, - placeholder: 'Files filter', - }); - this.filter.subjects.get().change.subscribe((_path: string) => { - ilc.detectChanges(); - }); - ilc.env().subscriber.register( - ilc - .ilc() - .services.ui.listener.listen( - 'keydown', - window, - (event: KeyboardEvent) => { - if (!this.focused) { - return true; - } - const count = this.scheme.source.data.length; - const selected = this.scheme.source.data.findIndex((d) => d.item.selected); - if (selected === -1) { - if (count > 0) { - this.scheme.source.data[0].item.selecting().select(); - } - return true; - } - const selectedRef = this.scheme.source.data[selected]; - const nextRef = this.scheme.source.data[selected + 1]; - const prevRef = this.scheme.source.data[selected - 1]; - if (event.key === 'ArrowDown' && nextRef !== undefined) { - selectedRef.item.selecting().unselect(); - nextRef.item.selecting().select(); - } else if (event.key === 'ArrowUp' && prevRef !== undefined) { - selectedRef.item.selecting().unselect(); - prevRef.item.selecting().select(); - } else if (event.key === ' ') { - if (selectedRef.expandable) { - this.scheme.source.expand(selectedRef); - } - } - if (event.key === 'ArrowDown' || event.key === 'ArrowUp') { - ilc.detectChanges(); - this._scrollIntoView(); - return false; - } - ilc.detectChanges(); - return true; - }, - ), - ); - } - - public async init(services: Services): Promise { - const db = new Scheme.DynamicDatabase(services, this.filter); - const tree = new FlatTreeControl( - (node: Scheme.DynamicFlatNode) => node.level, - (node: Scheme.DynamicFlatNode) => node.expandable, - ); - const source = new Scheme.DynamicDataSource( - tree, - db, - (entity: Scheme.Entity, expanded: boolean) => { - (() => { - if (expanded) { - return favorites.expanded().add(entity.getPath(), entity.parent); - } else { - return favorites.expanded().remove(entity.getPath()); - } - })().catch((err: Error) => { - this.ilc.log().error(`Fail to update state of folder's tree: ${err.message}`); - }); - }, - this.ilc, - ); - db.bind(source); - source.data = db.initialData(); - this.scheme = { db, tree, source }; - await this.reload(); - this.ilc.env().subscriber.register( - favorites.updates.get().list.subscribe(() => { - favorites - .places() - .get() - .then((places) => { - this.favorites = places; - this.scheme.db.overwrite(this.favorites.slice()); - }) - .catch((err: Error) => { - this.ilc.log().error(`Fail to get favorites places list: ${err.message}`); - }) - .finally(() => { - this.ilc.detectChanges(); - }); - }), - ); - } - - public bind(container: HTMLElement): void { - this.focus = this.focus.bind(this); - this.blur = this.blur.bind(this); - container.addEventListener('focus', this.focus); - container.addEventListener('blur', this.blur); - this.ilc.env().subscriber.register( - new Subscription('container_focus_listener', () => { - container.removeEventListener('focus', this.focus); - container.removeEventListener('blur', this.blur); - }), - ); - } - - public async reload(): Promise { - this.favorites = await favorites.places().get(); - this.scheme.db.overwrite(this.favorites.slice()); - if (this.scheme.source.data.length > 0) { - this.scheme.source.data[0].item.selecting().select(); - } - this.ilc.detectChanges(); - } - - public expand() { - this.scheme.source.expand(favorites.states.map((v) => v.path)); - } - - public focus(): void { - this.focused = true; - } - - public blur(): void { - this.focused = false; - } - - public select(node: Scheme.DynamicFlatNode) { - const selected = this.scheme.source.data.find((d) => d.item.selected); - if (selected !== undefined) { - selected.item.selecting().unselect(); - } - node.item.selecting().select(); - this.ilc.detectChanges(); - } - - public removePlace(entity: Scheme.Entity) { - const path = entity.getPath(); - favorites - .places() - .remove(path) - .catch((err: Error) => { - this.ilc.log().error(`Fail to add favorites: ${err.message}`); - }); - } - - public isEmpty(): boolean { - return this.scheme.db.isEmpty(); - } - - private _scrollIntoView() { - const nodes = document.querySelectorAll(`mat-tree-node[data-selected="true"]`); - if (nodes.length === 0) { - return; - } - nodes.forEach((node: Element) => { - (node as HTMLElement).scrollIntoView({ - behavior: 'auto', - block: 'nearest', - inline: 'nearest', - }); - }); - } -} diff --git a/application/client/src/app/ui/elements/tree/styles.less b/application/client/src/app/ui/elements/tree/styles.less deleted file mode 100644 index 7c206eaa71..0000000000 --- a/application/client/src/app/ui/elements/tree/styles.less +++ /dev/null @@ -1,139 +0,0 @@ -@import '../../styles/variables.less'; - -app-elements-tree { - position: relative; - display: block; - width: 100%; - height: 100%; - div.greeting { - padding: 12px; - & p { - color: var(--scheme-color-1); - } - & div.buttons { - padding-top: 12px; - text-align: center; - & button { - color: var(--scheme-color-0); - } - } - } - div.controls { - position: absolute; - display: flex; - flex-direction: row; - top: 0; - left: 0; - height: 32px; - width: ~"calc(100% - 2px)"; - & app-filter-input { - margin-left: 12px; - flex: auto; - } - & span.small-icon-button { - padding-top: 4px; - margin: 4px 0px 0 6px; - } - & span.small-icon-button:last-child { - margin-right: 6px; - } - } - div.tree { - position: absolute; - top:32px; - left:0; - width: ~"calc(100% - 22px)"; - padding: 0 11px; - bottom: 0; - overflow-y:auto; - overflow-x: hidden; - outline: none; - & mat-tree { - background: none; - padding-left: 4px; - & button[disabled="true"] { - display: none; - } - } - & mat-tree-node { - position: relative; - min-height: 18px; - border: solid thin rgba(0,0,0,0); - z-index: 0; - &[data-selected="true"] { - &:after { - position: absolute; - content: ''; - display: block; - width: 2px; - height: 100%; - right: 0; - top:0; - background: var(--scheme-color-active); - } - } - &[data-exists="false"] { - color: var(--scheme-color-4); - } - &:hover { - &:before { - position: absolute; - content: ''; - display: block; - width: ~"calc(100% + 36px)"; - height: 100%; - left: -16px; - top:0; - background: var(--scheme-color-hover); - z-index: -1; - } - } - & button { - line-height: 16px!important; - width: 16px!important; - height: 16px!important; - padding: 0!important; - overflow: hidden; - margin-left: -8px; - margin-right: 4px; - } - & mat-icon { - height: 16px; - width: 16px; - line-height: 16px; - font-size: 16px; - } - & mat-progress-bar { - position: absolute; - height: 2px; - bottom: 0; - } - & span.name { - position: relative; - white-space: nowrap; - display: flex; - overflow: hidden; - text-overflow: ellipsis; - align-items: center; - & > span { - overflow: hidden; - text-overflow: ellipsis; - } - & span.ext { - margin-right: 6px; - color: var(--scheme-color-2); - flex: none; - font-size: 10px; - line-height: 10px; - height: 10px; - font-weight: 500; - margin-left: 12px; - } - & span.match { - background: var(--scheme-color-active); - } - } - } - } - -} \ No newline at end of file diff --git a/application/client/src/app/ui/elements/tree/template.html b/application/client/src/app/ui/elements/tree/template.html deleted file mode 100644 index d67730a3d6..0000000000 --- a/application/client/src/app/ui/elements/tree/template.html +++ /dev/null @@ -1,48 +0,0 @@ -
- - - -
-
-
-

You can add some locations to your favorites. It will give you a way to quickly browse files from these locations.

-
- -
-
- - - - - {{node.item.ext}} - - - - - - - - - - - -
\ No newline at end of file diff --git a/application/client/src/app/ui/env/directives/contextmenu.trigger.ts b/application/client/src/app/ui/env/directives/contextmenu.trigger.ts deleted file mode 100644 index f7e1670a64..0000000000 --- a/application/client/src/app/ui/env/directives/contextmenu.trigger.ts +++ /dev/null @@ -1,39 +0,0 @@ -import { AfterViewInit, Directive, OnDestroy, HostListener, Input } from '@angular/core'; - -@Directive({ - selector: '[appContextMenuTrigger]', - standalone: false, -}) -export class ContextMenuTriggerDirective implements AfterViewInit, OnDestroy { - @Input() public menu!: string; - private _menuRef!: HTMLElement; - private _position: - | { - x: number; - y: number; - } - | undefined; - - constructor() { - // private _hostElement: ElementRef - this._mouseup = this._mouseup.bind(this); - window.addEventListener('mouseup', this._mouseup); - } - - @HostListener('contexmenu', ['$event']) _contexmenu(event: MouseEvent) { - this._position = { x: event.x, y: event.y }; - } - - public ngAfterViewInit() { - // (this._hostElement.nativeElement as HTMLElement).focus(); - } - - public ngOnDestroy(): void { - window.removeEventListener('mouseup', this._mouseup); - } - - private _mouseup(event: MouseEvent) { - this._position = undefined; - console.log(event); - } -} diff --git a/application/client/src/app/ui/env/directives/dragdrop.file.ts b/application/client/src/app/ui/env/directives/dragdrop.file.ts deleted file mode 100644 index bb528ff5b7..0000000000 --- a/application/client/src/app/ui/env/directives/dragdrop.file.ts +++ /dev/null @@ -1,86 +0,0 @@ -import { Directive, OnDestroy, Output, EventEmitter, ElementRef } from '@angular/core'; -import { bridge } from '@service/bridge'; -import { File as OwnFileDef } from '@platform/types/files'; -import { stop } from '@ui/env/dom'; - -// Property 'path' exists, but it doesn't a part of specification -export interface GlobalFileDef extends File { - path: string; -} - -@Directive({ - selector: '[appMatDragDropFileFeature]', - standalone: false, -}) -export class MatDragDropFileFeatureDirective implements OnDestroy { - @Output() dropped: EventEmitter = new EventEmitter(); - - protected drop(event: DragEvent): void { - stop(event); - const files: string[] = this.getFiles(event); - if (files.length === 0) { - return; - } - bridge - .files() - .getByPath(files) - .then((files) => { - this.dropped.emit(files); - }); - } - - protected stop(event: MouseEvent): boolean { - return stop(event); - } - - protected getFiles(event: DragEvent): string[] { - if (event.dataTransfer === null || event.dataTransfer === undefined) { - return []; - } - const files = (() => { - if (event.dataTransfer.files) { - return Array.from(event.dataTransfer.files).map((f) => - window.electron.webUtils.getPathForFile(f), - ); - } else if (event.dataTransfer.items) { - return ( - Array.from(event.dataTransfer.items) - .map((item: DataTransferItem) => { - if (item.kind === 'file') { - return item.getAsFile(); - } else { - return undefined; - } - }) - .filter((f) => f !== undefined) as File[] - ).map((f) => window.electron.webUtils.getPathForFile(f)); - } else { - return []; - } - })(); - return files; - } - - constructor(protected readonly element: ElementRef) { - // Note: The files property of DataTransfer objects can only be accessed from within - // the drop event. For all other events, the files property will be empty - because - // its underlying data store will be in a protected mode. - // https://developer.mozilla.org/en-US/docs/Web/API/DataTransfer/files - // - // Using of @HostBinding doesn't work always smooth and looks like - // "protected mode" is a reason. - // - // That's why we are binding event's handlers directly to DOM elements - this.stop = this.stop.bind(this); - this.drop = this.drop.bind(this); - this.element.nativeElement.addEventListener('dragover', this.stop); - this.element.nativeElement.addEventListener('dragleave', this.stop); - this.element.nativeElement.addEventListener('drop', this.drop); - } - - public ngOnDestroy(): void { - this.element.nativeElement.removeEventListener('dragover', this.stop); - this.element.nativeElement.removeEventListener('dragleave', this.stop); - this.element.nativeElement.removeEventListener('drop', this.drop); - } -} diff --git a/application/client/src/app/ui/env/directives/dragging.ts b/application/client/src/app/ui/env/directives/dragging.ts deleted file mode 100644 index c435bc3a76..0000000000 --- a/application/client/src/app/ui/env/directives/dragging.ts +++ /dev/null @@ -1,101 +0,0 @@ -import { - AfterViewInit, - Directive, - ElementRef, - OnDestroy, - HostListener, - Input, - Output, - EventEmitter, -} from '@angular/core'; -import { stop } from '@ui/env/dom'; - -export interface ChangeEvent { - top: number; - left: number; -} -@Directive({ - selector: '[appDragging]', - standalone: false, -}) -export class DraggingDirective implements AfterViewInit, OnDestroy { - @Input() public min: { - top: number; - left: number; - } = { - top: 0, - left: 0, - }; - - @Input() public max: { - top: number; - left: number; - } = { - top: 0, - left: 0, - }; - @Input() public top!: number; - @Input() public left!: number; - @Output() changed = new EventEmitter(); - - protected readonly position: { - top: number; - left: number; - } = { - top: -1, - left: -1, - }; - - constructor(private _hostElement: ElementRef) { - this._mousemove = this._mousemove.bind(this); - this._mouseup = this._mouseup.bind(this); - window.addEventListener('mousemove', this._mousemove); - window.addEventListener('mouseup', this._mouseup); - } - - @HostListener('mousedown', ['$event']) _mousedown(event: MouseEvent) { - this.position.top = event.y; - this.position.left = event.x; - } - - public ngAfterViewInit() { - (this._hostElement.nativeElement as HTMLElement).focus(); - } - - public ngOnDestroy(): void { - window.removeEventListener('mousemove', this._mousemove); - window.removeEventListener('mouseup', this._mouseup); - } - - private _mousemove(event: MouseEvent) { - if (this.position.top === -1 || this.position.left === -1) { - return; - } - const diff = { - left: event.x - this.position.left, - top: event.y - this.position.top, - }; - this.top += diff.top; - this.left += diff.left; - if (this.top > this.max.top && this.max.top !== -1) { - this.top = this.max.top; - } else if (this.top < this.min.top && this.min.top !== -1) { - this.top = this.min.top; - } - if (this.left > this.max.left && this.max.left !== -1) { - this.left = this.max.left; - } else if (this.left < this.min.left && this.min.left !== -1) { - this.left = this.min.left; - } - this.position.top = event.y; - this.position.left = event.x; - stop(event); - this.changed.emit({ top: this.top, left: this.left }); - } - - private _mouseup(event: MouseEvent) { - this._mousemove(event); - this.position.top = -1; - this.position.left = -1; - } -} diff --git a/application/client/src/app/ui/env/directives/input.ts b/application/client/src/app/ui/env/directives/input.ts deleted file mode 100644 index 2af1b472dd..0000000000 --- a/application/client/src/app/ui/env/directives/input.ts +++ /dev/null @@ -1,24 +0,0 @@ -import { Directive, HostListener } from '@angular/core'; -import { ilc, Emitter } from '@service/ilc'; -import { scope } from '@platform/env/scope'; - -@Directive({ - selector: '[appInputListener]', - exportAs: 'appInputListener', - standalone: false, -}) -export class InputListenerDirective { - private _emitter: Emitter; - - @HostListener('focus') focus() { - this._emitter.ui.input.focused(); - } - - @HostListener('blur') blur() { - this._emitter.ui.input.blur(); - } - - constructor() { - this._emitter = ilc.emitter('appInputListener', scope.getLogger('appInputListener')); - } -} diff --git a/application/client/src/app/ui/env/directives/material.dragdrop.ts b/application/client/src/app/ui/env/directives/material.dragdrop.ts deleted file mode 100644 index 4f554fb604..0000000000 --- a/application/client/src/app/ui/env/directives/material.dragdrop.ts +++ /dev/null @@ -1,85 +0,0 @@ -import { Directive, OnDestroy, HostListener } from '@angular/core'; -import { CdkDragRelease, CdkDragMove } from '@angular/cdk/drag-drop'; -import { getPropByPath } from '@platform/env/obj'; -import { scope } from '@platform/env/scope'; - -@Directive({ - selector: '[appMatDragDropResetFeature]', - exportAs: 'appMatDragDropResetFeatureRef', - standalone: false, -}) -export class MatDragDropResetFeatureDirective implements OnDestroy { - private _anchor: HTMLElement | undefined; - private _logger = scope.getLogger('DragDropDir'); - private _timer: any; - - @HostListener('cdkDragMoved', ['$event']) _cdkDragMoved(event: CdkDragMove) { - if (this._anchor !== undefined) { - return; - } - const placeholder: HTMLElement | undefined = this._getPlaceholder(event); - if (placeholder === undefined || placeholder.parentElement === null) { - return; - } - this._anchor = this._getAnchor(); - placeholder.parentElement.insertBefore(this._anchor, placeholder); - } - - @HostListener('cdkDragReleased', ['$event']) _cdkDragReleased() { - this._timer = setTimeout(this._dropAnchor.bind(this), 250); - } - - public ngOnDestroy() { - clearTimeout(this._timer); - this._dropAnchor(); - } - - public reset(event: CdkDragRelease): Error | undefined { - if (this._anchor === undefined) { - return new Error( - this._logger.warn(`Anchor isn't created, even cdkDragReleased is triggered.`), - ); - } - const placeholder: HTMLElement | undefined = this._getPlaceholder(event); - if (placeholder === undefined || this._anchor.parentNode === null) { - this._dropAnchor(); - return new Error(this._logger.warn(`Fail to find placeholder on cdkDragReleased`)); - } - this._anchor.parentNode.insertBefore(placeholder, this._anchor); - placeholder.style.transform = ''; - this._dropAnchor(); - return undefined; - } - - private _getPlaceholder(event: CdkDragMove | CdkDragRelease): HTMLElement | undefined { - const placeholder: HTMLElement | Error | undefined = getPropByPath( - event, - 'source._dragRef._placeholder', - ); - if (placeholder instanceof Error) { - this._logger.warn( - `Fail get placeholder from event (CdkDragMove | CdkDragRelease) due error: ${placeholder.message}`, - ); - return undefined; - } - if (placeholder === undefined || placeholder === null) { - this._logger.warn(`Placeholder isn't initialized yet.`); - return undefined; - } - return placeholder; - } - - private _getAnchor(): HTMLElement { - const anchor = document.createElement('span'); - anchor.style.display = 'none'; - return anchor; - } - - private _dropAnchor() { - if (this._anchor === undefined || this._anchor.parentNode === null) { - return; - } - this._anchor.parentNode.removeChild(this._anchor); - this._anchor = undefined; - } -} diff --git a/application/client/src/app/ui/env/directives/module.ts b/application/client/src/app/ui/env/directives/module.ts deleted file mode 100644 index c2314b753c..0000000000 --- a/application/client/src/app/ui/env/directives/module.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { NgModule } from '@angular/core'; -import { ResizerDirective } from './resizer'; -import { DraggingDirective } from './dragging'; -import { ResizeObserverDirective } from './resize.observer'; -import { MatDragDropResetFeatureDirective } from './material.dragdrop'; -import { MatDragDropFileFeatureDirective } from './dragdrop.file'; - -@NgModule({ - declarations: [ - ResizerDirective, - ResizeObserverDirective, - DraggingDirective, - MatDragDropResetFeatureDirective, - MatDragDropFileFeatureDirective, - ], - exports: [ - ResizerDirective, - ResizeObserverDirective, - DraggingDirective, - MatDragDropResetFeatureDirective, - MatDragDropFileFeatureDirective, - ], - imports: [], -}) -export class AppDirectiviesModule {} diff --git a/application/client/src/app/ui/env/directives/resize.observer.ts b/application/client/src/app/ui/env/directives/resize.observer.ts deleted file mode 100644 index e4816e5e83..0000000000 --- a/application/client/src/app/ui/env/directives/resize.observer.ts +++ /dev/null @@ -1,62 +0,0 @@ -import { - AfterViewInit, - Directive, - ElementRef, - OnDestroy, - Output, - EventEmitter, -} from '@angular/core'; -import { NormalizedBackgroundTask } from '@platform/env/normalized'; - -const UPDATE_DELAY_MS = 20; - -@Directive({ - selector: '[appResizeObserver]', - standalone: false, -}) -export class ResizeObserverDirective implements AfterViewInit, OnDestroy { - @Output() changesize = new EventEmitter(); - - protected hostElement!: HTMLElement; - protected domRect!: DOMRect; - protected resizeObserve: ResizeObserver | undefined; - protected readonly runner: NormalizedBackgroundTask = new NormalizedBackgroundTask( - UPDATE_DELAY_MS, - ); - constructor(hostElement: ElementRef) { - this.hostElement = hostElement.nativeElement; - } - - public ngAfterViewInit() { - if (this.resizeObserve !== undefined) { - throw new Error(`Holder cannot be bound muliple times`); - } - this.resizeObserve = new ResizeObserver((entries: ResizeObserverEntry[]) => { - if (entries.length !== 1) { - return; - } - this._detect(entries[0].contentRect); - }); - this.resizeObserve.observe(this.hostElement); - this._detect(this.hostElement.getBoundingClientRect()); - } - - public ngOnDestroy(): void { - if (this.resizeObserve !== undefined) { - this.resizeObserve.unobserve(this.hostElement); - } - this.runner.abort(); - } - - private _detect(rect: DOMRect) { - const changed = - this.domRect === undefined - ? true - : rect.height !== this.domRect.height || rect.width !== this.domRect.width; - this.domRect = rect; - changed && - this.runner.run(() => { - this.changesize.emit(rect); - }); - } -} diff --git a/application/client/src/app/ui/env/directives/resizer.ts b/application/client/src/app/ui/env/directives/resizer.ts deleted file mode 100644 index 6cbee55c9c..0000000000 --- a/application/client/src/app/ui/env/directives/resizer.ts +++ /dev/null @@ -1,111 +0,0 @@ -import { - AfterViewInit, - Directive, - HostBinding, - ElementRef, - OnDestroy, - HostListener, - Input, - Output, - EventEmitter, -} from '@angular/core'; -import { Subject } from '@platform/env/subscription'; -import { stop } from '@ui/env/dom'; -import { NormalizedBackgroundTask } from '@platform/env/normalized'; - -export enum Direction { - Vertical = 'Vertical', - Horizontal = 'Horizontal', -} - -const UPDATE_DELAY_MS = 20; - -@Directive({ - selector: '[appResizer]', - standalone: false, -}) -export class ResizerDirective implements AfterViewInit, OnDestroy { - @Input() public direction!: Direction; - @Input() public min: number = -1; - @Input() public max: number = -1; - @Input() public size!: number; - @Input() public corrector: number = 1; - @Input() public resized: Subject | undefined; - @Output() changesize = new EventEmitter(); - - protected position: number = -1; - protected readonly runner: NormalizedBackgroundTask = new NormalizedBackgroundTask( - UPDATE_DELAY_MS, - ); - - constructor(private _hostElement: ElementRef) { - this._mousemove = this._mousemove.bind(this); - this._mouseup = this._mouseup.bind(this); - } - - @HostListener('mousedown', ['$event']) _mousedown(event: MouseEvent) { - this.position = this._getPos(event); - this.listeners().bind(); - } - - @HostBinding('class.dragging') get dragging() { - return this.position !== -1; - } - - public ngAfterViewInit() { - (this._hostElement.nativeElement as HTMLElement).focus(); - } - - public ngOnDestroy(): void { - this.listeners().unbind(); - this.runner.abort(); - } - - private _mousemove(event: MouseEvent) { - if (this.position === -1) { - return; - } - const diff = this._getPos(event) - this.position; - this.size -= diff * this.corrector; - if (this.size > this.max && this.max !== -1) { - this.size = this.max; - } else if (this.size < this.min && this.min !== -1) { - this.size = this.min; - } - this.position = this._getPos(event); - stop(event); - this.runner.run(() => { - if (this.resized !== undefined) { - this.resized.emit(this.size); - } else { - this.changesize.emit(this.size); - } - }); - } - - private _mouseup(event: MouseEvent) { - this._mousemove(event); - this.position = -1; - this.listeners().unbind(); - } - - private _getPos(event: MouseEvent): number { - return this.direction === Direction.Horizontal ? event.x : event.y; - } - - protected listeners(): { - bind(): void; - unbind(): void; - } { - return { - bind: (): void => { - window.addEventListener('mousemove', this._mousemove); - window.addEventListener('mouseup', this._mouseup); - }, - unbind: (): void => { - window.removeEventListener('mousemove', this._mousemove); - window.removeEventListener('mouseup', this._mouseup); - }, - }; - } -} diff --git a/application/client/src/app/ui/env/dom.ts b/application/client/src/app/ui/env/dom.ts deleted file mode 100644 index e2d3e1edc1..0000000000 --- a/application/client/src/app/ui/env/dom.ts +++ /dev/null @@ -1,58 +0,0 @@ -export function stop(event: KeyboardEvent | MouseEvent | Event): boolean { - if (event === undefined || event === null) { - return false; - } - typeof event.stopImmediatePropagation === 'function' && event.stopImmediatePropagation(); - typeof event.stopPropagation === 'function' && event.stopPropagation(); - typeof event.preventDefault === 'function' && event.preventDefault(); - return false; -} - -export function findParentByTag( - target: HTMLElement | null | undefined, - tag: string[], -): HTMLElement | undefined { - tag = tag.map((t) => t.toLowerCase()); - if (target === null || target === undefined) { - return undefined; - } - if (typeof target.tagName !== 'string') { - return undefined; - } - const targetTag = target.tagName.toLowerCase(); - if (tag.includes(targetTag)) { - return target; - } - if (targetTag === 'body') { - return undefined; - } - return findParentByTag(target.parentNode as HTMLElement, tag); -} - -export function isParentOf( - target: HTMLElement | Node | null | undefined, - parent: HTMLElement | null | undefined, -): boolean { - if (target === null || target === undefined) { - return false; - } - if (parent === null || parent === undefined) { - return false; - } - if (target === parent) { - return true; - } - if (target.parentElement === undefined || target.parentElement === null) { - return false; - } - if (target.parentElement !== parent) { - return isParent(target.parentElement, parent); - } else { - return true; - } -} - -export function isParent(target: HTMLElement, parent: HTMLElement): boolean { - const candidate = findParentByTag(target, [parent.tagName]); - return candidate === undefined ? false : candidate === parent; -} diff --git a/application/client/src/app/ui/env/entities/filter.ts b/application/client/src/app/ui/env/entities/filter.ts deleted file mode 100644 index 207fb7941e..0000000000 --- a/application/client/src/app/ui/env/entities/filter.ts +++ /dev/null @@ -1,98 +0,0 @@ -import { InternalAPI } from '@service/ilc'; -import { Subject, Subjects } from '@platform/env/subscription'; -import { syncHasFocusedInput } from '@ui/env/globals'; -import { unique } from '@platform/env/sequence'; -import { filters } from '@ui/service/filters'; - -export type Handler = () => void; - -export class Filter { - private _filter: string = ''; - private readonly _ilc: InternalAPI; - private readonly _uuid: string = unique(); - - public readonly subjects: Subjects<{ - change: Subject; - drop: Subject; - }> = new Subjects({ - change: new Subject(), - drop: new Subject(), - }); - - constructor(ilc: InternalAPI) { - this._ilc = ilc; - this._ilc.channel.ui.input.focused(() => { - this.drop(); - }); - filters.add(this._uuid); - this.keyboard = this.keyboard.bind(this); - } - - public destroy() { - this.unbind(); - filters.remove(this._uuid); - } - - public bind(): Filter { - window.addEventListener('keyup', this.keyboard); - return this; - } - - public unbind(): Filter { - window.removeEventListener('keyup', this.keyboard); - return this; - } - - public keyboard(event: KeyboardEvent): boolean { - if (!filters.isEnabled(this._uuid)) { - return false; - } - if (syncHasFocusedInput()) { - return false; - } - if (this._ilc.services.system.state.states().ui.input) { - return false; - } - if (event.ctrlKey || event.metaKey || event.altKey) { - return false; - } - if (event.code === 'Backspace') { - if (this._filter.length > 0) { - this._filter = this._filter.substring(0, this._filter.length - 1); - this.subjects.get().change.emit(this._filter); - return true; - } - } else if (event.code === 'Escape' || event.code === 'Enter') { - if (this._filter !== '') { - this.drop(); - return true; - } - } else if (event.key.length === 1 && this._filter.length < 50) { - this._filter += event.key; - if (this._filter.trim() === '') { - this.drop(); - } else { - this.subjects.get().change.emit(this._filter); - } - return true; - } - return false; - } - public isEmpty(): boolean { - return this._filter.trim() === ''; - } - public value(): string { - return this._filter; - } - public drop(): boolean { - if (this._filter === '') { - return false; - } - this._filter = ''; - this.subjects.get().drop.emit(); - return true; - } - public uuid(): string { - return this._uuid; - } -} diff --git a/application/client/src/app/ui/env/entities/range.limited.ts b/application/client/src/app/ui/env/entities/range.limited.ts deleted file mode 100644 index e7d5e590a1..0000000000 --- a/application/client/src/app/ui/env/entities/range.limited.ts +++ /dev/null @@ -1,110 +0,0 @@ -export class LimittedRange { - public from: number; - public to: number; - public len: number; - public max: number; - private _alias: string; - private _sticky: boolean; - private _unmodified: boolean = true; - - constructor( - alias: string, - from: number, - to: number, - len: number, - max: number, - sticky: boolean, - ) { - if (isNaN(from) || !isFinite(from)) { - throw new Error(`[${alias}]: Invalid number from. Fail to change it.`); - } - if (isNaN(to) || !isFinite(to)) { - throw new Error(`[${alias}]: Invalid number value for "to". Fail to change it.`); - } - if (isNaN(len) || !isFinite(len)) { - throw new Error(`[${alias}]: Invalid number value for "len". Fail to change it.`); - } - if (isNaN(max) || !isFinite(max)) { - throw new Error(`[${alias}]: Invalid number value for "max". Fail to change it.`); - } - this._alias = alias; - this._sticky = sticky; - this.max = max; - this.from = from; - this.to = to; - this.len = len; - } - - public $(value: number): { - len(): LimittedRange; - from(): LimittedRange; - to(): LimittedRange; - max(adhered: boolean): LimittedRange; - } { - if (isNaN(value) || !isFinite(value)) { - throw new Error(`[${this._alias}]: Invalid number. Fail to change it.`); - } - return { - len: (): LimittedRange => { - this.len = value < 0 ? 0 : value; - this.to = this.from + this.len; - return this._normalize(); - }, - from: (): LimittedRange => { - this.from = value < 0 ? 0 : value; - this.to = this.from + this.len; - return this._normalize(); - }, - to: (): LimittedRange => { - this.to = value < 0 ? 0 : value; - this.from = this.to - this.len; - return this._normalize(); - }, - max: (adhered: boolean): LimittedRange => { - const prevMax = this.max; - this.max = value < 0 ? 0 : value; - const sticky = this._unmodified - ? this._sticky - : this._sticky - ? this.to === prevMax - 1 - : false; - if (sticky && adhered) { - this.to = this.max === 0 ? 0 : this.max - 1; - const from = this.to - this.len; - this.from = from < 0 ? 0 : from; - } else { - this.to = this.from + this.len; - } - return this._normalize(); - }, - }; - } - - public hash(): string { - return `${this.from}.${this.to}.${this.len}.${this.max}`; - } - - private _normalize(): LimittedRange { - if (this.from > this.max) { - this.from = this.max - this.len; - } - if (this.from < 0) { - this.from = 0; - } - if (this.to >= this.max) { - this.to = this.max - 1; - this.from = this.to - this.len; - } - if (this.from < 0) { - this.from = 0; - this.to = Math.min(this.len, this.max - 1); - } - if (this.to < 0) { - this.to = 0; - } - if (this.from !== 0) { - this._unmodified = false; - } - return this; - } -} diff --git a/application/client/src/app/ui/env/entities/value.limited.ts b/application/client/src/app/ui/env/entities/value.limited.ts deleted file mode 100644 index 5f2c855874..0000000000 --- a/application/client/src/app/ui/env/entities/value.limited.ts +++ /dev/null @@ -1,104 +0,0 @@ -export class LimittedValue { - public min: number; - public max: number; - public value: number; - private _alias: string; - private _prev: number = -1; - - constructor(alias: string, min: number, max: number, value: number) { - if (isNaN(value) || !isFinite(value)) { - throw new Error(`[${alias}]: Invalid number value. Fail to change it.`); - } - if (isNaN(min) || !isFinite(min)) { - throw new Error(`[${alias}]: Invalid number value for "min". Fail to change it.`); - } - if (isNaN(max) || !isFinite(max)) { - throw new Error(`[${alias}]: Invalid number value for "max". Fail to change it.`); - } - this._alias = alias; - this.max = max; - this.min = min; - this.value = value; - this.min !== -1 && (this.value = this.value < this.min ? this.min : this.value); - this.max !== -1 && (this.value = this.value > this.max ? this.max : this.value); - this._prev = -1; - } - - public set(value: number): boolean { - if (isNaN(value) || !isFinite(value)) { - throw new Error(`[${this._alias}]: Invalid number value. Fail to change it.`); - } - if (this.max !== -1 && value > this.max) { - this.value = this.max; - return true; - } - if (this.min !== -1 && value < this.min) { - this.value = this.min; - return true; - } - this.value = value; - return false; - } - - public setMin(value: number): void { - if (isNaN(value) || !isFinite(value)) { - throw new Error(`[${this._alias}]: Invalid number value for "min". Fail to change it.`); - } - this.min = value; - this.set(this.value); - } - - public setMax(value: number): void { - if (isNaN(value) || !isFinite(value)) { - throw new Error(`[${this._alias}]: Invalid number value for "max". Fail to change it.`); - } - this.max = value; - this.set(this.value); - } - - public toggle(): void { - if (this.value === this.min) { - this._prev !== -1 && this.set(this._prev); - } else { - this._prev = this.value; - this.set(this.min); - } - } - - public occupy(): void { - if (this.value === this.max) { - this._prev !== -1 && this.set(this._prev); - } else { - this._prev = this.value; - this.set(this.max); - } - } - - public to(): { - min(): void; - max(): void; - } { - return { - min: (): void => { - this.set(this.min); - }, - max: (): void => { - this.set(this.max); - }, - }; - } - - public is(): { - min(): boolean; - max(): boolean; - } { - return { - min: (): boolean => { - return this.value === this.min; - }, - max: (): boolean => { - return this.value === this.max; - }, - }; - } -} diff --git a/application/client/src/app/ui/env/extentions/changes.ts b/application/client/src/app/ui/env/extentions/changes.ts deleted file mode 100644 index a3ce43ec6d..0000000000 --- a/application/client/src/app/ui/env/extentions/changes.ts +++ /dev/null @@ -1,49 +0,0 @@ -import { ChangeDetectorRef } from '@angular/core'; - -export class ChangesDetector { - private _changeDetectorRef: ChangeDetectorRef[]; - private _detauched: boolean = false; - - constructor(changeDetectorRef: ChangeDetectorRef | ChangeDetectorRef[]) { - this._changeDetectorRef = - changeDetectorRef instanceof Array ? changeDetectorRef : [changeDetectorRef]; - } - - public static detectChanges(comRef: any) { - if (typeof comRef !== 'object' || comRef === null) { - return; - } - if (typeof comRef._changeDetectorRef !== 'object' || comRef._changeDetectorRef === null) { - return; - } - if (typeof comRef._changeDetectorRef.detectChanges !== 'function') { - return; - } - comRef._changeDetectorRef.detectChanges(); - } - - public detauchChangesDetector() { - this._detauched = true; - } - - public detectChanges() { - if (this._detauched) { - return; - } - this._changeDetectorRef.forEach((cdRef) => cdRef.detectChanges()); - } - - public markChangesForCheck() { - if (this._detauched) { - return; - } - this._changeDetectorRef.forEach((cdRef) => cdRef.markForCheck()); - } - - public reattachChangesDetector() { - if (this._detauched) { - return; - } - this._changeDetectorRef.forEach((cdRef) => cdRef.reattach()); - } -} diff --git a/application/client/src/app/ui/env/globals.ts b/application/client/src/app/ui/env/globals.ts deleted file mode 100644 index 8b34eb9a88..0000000000 --- a/application/client/src/app/ui/env/globals.ts +++ /dev/null @@ -1,88 +0,0 @@ -import { NgZone } from '@angular/core'; -import { DomSanitizer, SafeHtml } from '@angular/platform-browser'; -import * as regex from '@platform/env/regex'; - -const store: { - sanitizer: DomSanitizer | undefined; - ngZone: NgZone | undefined; -} = { - sanitizer: undefined, - ngZone: undefined, -}; - -export function getDomSanitizer(): DomSanitizer { - if (store.sanitizer === undefined) { - throw new Error(`No DomSanitizer has been setup`); - } - return store.sanitizer; -} - -export function setDomSanitizer(sanitizer: DomSanitizer): void { - if (store.sanitizer !== undefined) { - throw new Error(`DomSanitizer has been setup already`); - } - store.sanitizer = sanitizer; -} - -export function getNgZone(): NgZone { - if (store.ngZone === undefined) { - throw new Error(`No NgZone has been setup`); - } - return store.ngZone; -} - -export function getNgZoneSafly(): NgZone | undefined { - return store.ngZone; -} - -export function setNgZone(ngZone: NgZone): void { - if (store.ngZone !== undefined) { - throw new Error(`NgZone has been setup already`); - } - store.ngZone = ngZone; -} - -export function wrapMatchesToHtml(matcher: string, str: string, tag: string = 'span'): string { - if (matcher === '') { - return str; - } - const reg = regex.fromStr(matcher); - if (reg instanceof Error) { - return str; - } - return str.replace(reg, (match): string => { - return `<${tag}>${match}`; - }); -} - -export function wrapMatchesToSafeHtml( - matcher: string, - str: string, - tag: string = 'span', -): SafeHtml { - return getDomSanitizer().bypassSecurityTrustHtml(wrapMatchesToHtml(matcher, str, tag)); -} - -export function hasFocusedInput(): Promise { - return new Promise((resolve) => { - setTimeout(() => { - if (document.activeElement === null) { - return resolve(false); - } - const tag: string = document.activeElement.tagName.toLowerCase(); - if (['input', 'textarea'].indexOf(tag) !== -1) { - resolve(false); - } else { - resolve(true); - } - }, 50); - }); -} - -export function syncHasFocusedInput(): boolean { - if (document.activeElement === null) { - return false; - } - const tag: string = document.activeElement.tagName.toLowerCase(); - return ['input', 'textarea'].indexOf(tag) !== -1; -} diff --git a/application/client/src/app/ui/env/lock.token.ts b/application/client/src/app/ui/env/lock.token.ts deleted file mode 100644 index 886543bbef..0000000000 --- a/application/client/src/app/ui/env/lock.token.ts +++ /dev/null @@ -1,27 +0,0 @@ -export class LockToken { - private _id: any = undefined; - private _timeout: number; - - constructor(timeout: number = 200) { - this._timeout = timeout; - } - - public lock() { - if (this._timeout > 0) { - this._id = setTimeout(() => { - this._id = undefined; - }, this._timeout); - } else { - this._id = -1; - } - } - - public unlock() { - clearTimeout(this._id); - this._id = undefined; - } - - public isLocked(): boolean { - return this._id !== undefined; - } -} diff --git a/application/client/src/app/ui/layout/component.ts b/application/client/src/app/ui/layout/component.ts deleted file mode 100644 index c86cc1eb88..0000000000 --- a/application/client/src/app/ui/layout/component.ts +++ /dev/null @@ -1,306 +0,0 @@ -import { - Component, - ChangeDetectorRef, - AfterViewInit, - HostBinding, - NgZone, - ChangeDetectionStrategy, -} from '@angular/core'; -import { Ilc, IlcInterface } from '@env/decorators/component'; -import { LimittedValue } from '@ui/env/entities/value.limited'; -import { ChangesDetector } from '@ui/env/extentions/changes'; -import { Direction } from '@directives/resizer'; -import { Base } from '@service/session'; -import { Subject } from '@platform/env/subscription'; - -const TOOLBAR_NORMAL_HEIGHT = 250; -const SIDEBAR_NORMAL_WIDTH = 350; -const TOOLBAR_MIN_HEIGHT = 50; -const SIDEBAR_MIN_WIDTH = 50; -const TOOLBAR_MAX_SIZE_RATE = 0.8; -const SIDEBAR_MAX_SIZE_RATE = 0.8; - -function initialToolbarHeight(): LimittedValue { - return new LimittedValue('toolbar.height', TOOLBAR_MIN_HEIGHT, -1, TOOLBAR_NORMAL_HEIGHT); -} - -function initialSidebarWidth(): LimittedValue { - return new LimittedValue('sidebar.width', SIDEBAR_MIN_WIDTH, -1, SIDEBAR_NORMAL_WIDTH); -} - -@Component({ - selector: 'app-layout', - templateUrl: './template.html', - styleUrls: ['./styles.less'], - changeDetection: ChangeDetectionStrategy.OnPush, - standalone: false, -}) -@Ilc() -export class Layout extends ChangesDetector implements AfterViewInit { - public readonly Direction = Direction; - - @HostBinding('class') get cssClass() { - if (this.ilc().services.ui.popup.getCount() === 0) { - return ''; - } - return this.ilc().services.ui.popup.isBlured() ? 'blur' : 'transporent'; - } - - public toolbar: LimittedValue = initialToolbarHeight(); - public sidebar: LimittedValue = initialSidebarWidth(); - public session: Base | undefined; - public resizes: { - toolbar: Subject; - sidebar: Subject; - } = { - toolbar: new Subject(), - sidebar: new Subject(), - }; - - private _layout: DOMRect | undefined; - - private readonly _sessions: Map = new Map(); - - constructor(cdRef: ChangeDetectorRef, private ngZone: NgZone) { - super(cdRef); - this.ilc().channel.session.change(this._onSessionChange.bind(this)); - this.ilc().channel.session.closed(this._onSessionClosed.bind(this)); - } - - public ngAfterViewInit(): void { - this.ilc().services.ui.dropfiles.state().enable(); - this._onSessionChange(); - this.ilc().channel.ui.popup.updated(() => { - this.ngZone.run(() => { - this.detectChanges(); - }); - }); - this.ilc().channel.ui.toolbar.occupy(() => { - this.ngZone.run(() => { - this.toggle().occupy(); - }); - }); - this.ilc().channel.ui.toolbar.state( - ( - getter: (state: { - min: boolean; - max: boolean; - occupied: boolean; - size: number; - }) => void, - ) => { - getter({ - min: this.toolbar.is().min(), - max: this.toolbar.is().max(), - occupied: this.toolbar.is().max(), - size: this.toolbar.value, - }); - }, - ); - this.ilc().channel.ui.toolbar.min(() => { - this.ngZone.run(() => { - this.set().toolbar().min(); - }); - }); - this.ilc().channel.ui.toolbar.max(() => { - this.ngZone.run(() => { - this.set().toolbar().max(); - }); - }); - this.ilc().channel.ui.sidebar.min(() => { - this.ngZone.run(() => { - this.set().sidebar().min(); - }); - }); - this.ilc().channel.ui.sidebar.max(() => { - this.ngZone.run(() => { - this.set().sidebar().max(); - }); - }); - this.env().subscriber.register( - this.ilc().services.system.hotkeys.listen('Ctrl + B', () => { - this.toggle().sidebar(); - }), - ); - this.env().subscriber.register( - this.ilc().services.system.hotkeys.listen('Ctrl + J', () => { - this.toggle().toolbar(); - }), - ); - this.env().subscriber.register( - this.resizes.toolbar.subscribe((height: number) => { - this.toolbar.set(height); - this.markChangesForCheck(); - this.ilc().emitter.ui.toolbar.resize(); - }), - ); - this.env().subscriber.register( - this.resizes.sidebar.subscribe((width: number) => { - this.sidebar.set(width); - this.markChangesForCheck(); - this.ilc().emitter.ui.sidebar.resize(); - }), - ); - } - - public ngLayoutResize(rect: DOMRect) { - this._updateSizes(rect).detectChanges(); - } - - public ngWorkspaceStyle(): { [key: string]: string } { - if (this.session === undefined) { - return { - right: '0px', - left: '0px', - bottom: '0px', - }; - } - return { - right: `${this.session.sidebar() !== undefined ? this.sidebar.value : 0}px`, - left: `0px`, - bottom: `${this.session.toolbar() !== undefined ? this.toolbar.value : 0}px`, - }; - } - - public ngToolbarStyle(): { [key: string]: string } { - return { - right: `${this.sidebar.value}px`, - left: `0px`, - height: `${this.toolbar.value}px`, - }; - } - - public ngToolbarResizeStyle(): { [key: string]: string } { - return { - right: `${this.sidebar.value}px`, - left: `0px`, - bottom: `${this.toolbar.value}px`, - }; - } - - public ngSidebarStyle(): { [key: string]: string } { - return { - width: `${this.sidebar.value}px`, - }; - } - - protected toggle(): { - sidebar(): void; - toolbar(): void; - occupy(): void; - } { - const session = this.ilc().services.system.session.active().base(); - return { - sidebar: (): void => { - if (session === undefined) { - return; - } - this.sidebar.toggle(); - this.detectChanges(); - this.ilc().emitter.ui.sidebar.resize(); - }, - toolbar: (): void => { - if (session === undefined) { - return; - } - this.toolbar.toggle(); - this.detectChanges(); - this.ilc().emitter.ui.toolbar.resize(); - }, - occupy: (): void => { - if (session === undefined) { - return; - } - this.toolbar.occupy(); - this.detectChanges(); - this.ilc().emitter.ui.toolbar.resize(); - }, - }; - } - - protected set(): { - toolbar(): { - min(): void; - max(): void; - }; - sidebar(): { - min(): void; - max(): void; - }; - } { - return { - toolbar: () => { - return { - min: (): void => { - this.toolbar.to().min(); - this.detectChanges(); - }, - max: (): void => { - this.toolbar.to().max(); - this.detectChanges(); - }, - }; - }, - sidebar: () => { - return { - min: (): void => { - this.sidebar.to().min(); - this.detectChanges(); - }, - max: (): void => { - this.sidebar.to().max(); - this.detectChanges(); - }, - }; - }, - }; - } - - private _updateSizes(rect?: DOMRect): Layout { - if (this.session === undefined) { - return this; - } - if (rect !== undefined) { - this._layout = rect; - } - if (this._layout === undefined) { - return this; - } - this.toolbar.setMax(Math.ceil(this._layout.height * TOOLBAR_MAX_SIZE_RATE)); - this.sidebar.setMax(Math.ceil(this._layout.width * SIDEBAR_MAX_SIZE_RATE)); - return this; - } - - private _onSessionChange() { - const session = this.ilc().services.system.session.active().base(); - if (this.session !== undefined) { - this._updateSizes(); - this._sessions.set(this.session.uuid(), { - toolbar: this.toolbar.value, - sidebar: this.sidebar.value, - }); - } - if (session !== undefined) { - const heights = this._sessions.get(session.uuid()); - if (heights !== undefined) { - this.toolbar.set(heights.toolbar); - this.sidebar.set(heights.sidebar); - } else { - this.toolbar = initialToolbarHeight(); - this.sidebar = initialSidebarWidth(); - } - } - this.session = session; - this._updateSizes(); - this.detectChanges(); - } - - private _onSessionClosed(session: string) { - this._sessions.delete(session); - if (this.session !== undefined && this.session.uuid() === session) { - this.session = undefined; - } - this.detectChanges(); - } -} -export interface Layout extends IlcInterface {} diff --git a/application/client/src/app/ui/layout/contextmenu/component.ts b/application/client/src/app/ui/layout/contextmenu/component.ts deleted file mode 100644 index 9964bcc72c..0000000000 --- a/application/client/src/app/ui/layout/contextmenu/component.ts +++ /dev/null @@ -1,131 +0,0 @@ -import { - Component, - OnDestroy, - ChangeDetectorRef, - ViewChild, - AfterViewInit, - ElementRef, -} from '@angular/core'; -import { Ilc, IlcInterface, Declarations } from '@env/decorators/component'; -import { unique } from '@platform/env/sequence'; - -@Component({ - selector: 'app-layout-contextmenu', - templateUrl: './template.html', - styleUrls: ['./styles.less'], - standalone: false, -}) -@Ilc() -export class LayoutContextMenu implements OnDestroy, AfterViewInit { - @ViewChild('menu') _ng_menuRef!: ElementRef; - - public _ng_menu: Declarations.IMenu | undefined; - public _ng_guid: string = unique(); - - private _top: number = 0; - private _left: number = 0; - - constructor(private _cdRef: ChangeDetectorRef) { - this.ilc().channel.ui.contextmenu.open(this._open.bind(this)); - this.ilc().channel.ui.contextmenu.close(this._remove.bind(this)); - } - - public get _ng_top() { - return `${this._top}px`; - } - - public get _ng_left() { - return `${this._left}px`; - } - - public ngOnDestroy() { - window.removeEventListener('keydown', this._onWindowKeyDown); - window.removeEventListener('mousedown', this._onWindowMouseDown); - } - - public ngAfterViewInit() { - this._onWindowKeyDown = this._onWindowKeyDown.bind(this); - this._onWindowMouseDown = this._onWindowMouseDown.bind(this); - window.addEventListener('keydown', this._onWindowKeyDown, true); - window.addEventListener('mousedown', this._onWindowMouseDown, true); - } - - public _ng_onMouseDown(item: Declarations.IMenuItem) { - if (typeof item.handler !== 'function') { - return; - } - if (item.disabled) { - return; - } - item.handler(); - if (this._ng_menu !== undefined && this._ng_menu.after !== undefined) { - this._ng_menu.after(); - } - this._remove(); - } - - private _open(menu: Declarations.IMenu) { - this._ng_menu = menu; - this._top = menu.y; - this._left = menu.x; - this._cdRef.detectChanges(); - // Recheck position - setTimeout(() => { - if (this._ng_menuRef === undefined || this._ng_menuRef === null) { - return; - } - const size: ClientRect = ( - this._ng_menuRef.nativeElement as HTMLElement - ).getBoundingClientRect(); - if (window.innerWidth < size.width + menu.x) { - this._left = window.innerWidth - size.width; - } - if (window.innerHeight < size.height + menu.y) { - this._top = window.innerHeight - size.height; - } - if (this._top !== menu.y || this._left !== menu.x) { - this._cdRef.detectChanges(); - } - }); - } - - private _onWindowKeyDown(event: KeyboardEvent) { - if ( - this._isContextMenuNode(event.target as HTMLElement) || - (event.key !== 'Escape' && event.key !== 'Enter') - ) { - return false; - } - this._remove(); - return; - } - - private _onWindowMouseDown(event: MouseEvent) { - if (this._isContextMenuNode(event.target as HTMLElement)) { - return false; - } - this._remove(); - return; - } - - private _remove() { - this._ng_menu = undefined; - this._top = 0; - this._left = 0; - this._cdRef.detectChanges(); - } - - private _isContextMenuNode(node: HTMLElement): boolean { - if (typeof node.nodeName === 'string' && node.nodeName.toLowerCase() === 'body') { - return false; - } - if (typeof node.getAttribute === 'function' && node.getAttribute('id') === this._ng_guid) { - return true; - } - if (node.parentNode !== undefined && node.parentNode !== null) { - return this._isContextMenuNode(node.parentNode as HTMLElement); - } - return false; - } -} -export interface LayoutContextMenu extends IlcInterface {} diff --git a/application/client/src/app/ui/layout/contextmenu/styles.less b/application/client/src/app/ui/layout/contextmenu/styles.less deleted file mode 100644 index 76078ba644..0000000000 --- a/application/client/src/app/ui/layout/contextmenu/styles.less +++ /dev/null @@ -1,72 +0,0 @@ -@import '../../styles/variables.less'; -@import '../../styles/support.less'; -@import '../../styles/text.less'; -@import '../../styles/borders.less'; - -:host { - position: fixed; - display: block; - z-index: 10000; - top: 0; - left: 0; - & div.wrapper { - position: fixed; - display: block; - box-sizing: border-box; - z-index: 100; - border-radius: 8px; - box-shadow: 3px 3px 16px rgba(0, 0, 0, 0.4); - background: var(--scheme-color-5-darken-5); - .border-based-5; - & ul.menu { - position: relative; - display: block; - padding: 4px 0; - margin: 0; - list-style: none; - border-radius: 8px; - overflow: hidden; - & li.item { - position: relative; - display: flex; - flex-direction: row; - padding: 0.25rem 1rem; - margin: 0; - list-style: none; - cursor: default; - font-size: 0.9rem; - white-space: nowrap; - color: var(--scheme-color-1); - &:hover { - background: var(--scheme-color-4); - } - &.delimiter { - height: 1px; - padding: 0; - margin: 0.25rem 0; - border-bottom: 1px solid var(--scheme-color-4); - &:hover { - background: none; - } - } - &.disabled { - color: var(--scheme-color-3); - &:hover { - background: none; - } - } - & span.caption { - position: relative; - flex: 1 auto; - white-space: nowrap; - } - & span.shortcut { - position: relative; - padding-left: 32px; - white-space: nowrap; - color: var(--scheme-color-3); - } - } - } - } -} diff --git a/application/client/src/app/ui/layout/contextmenu/template.html b/application/client/src/app/ui/layout/contextmenu/template.html deleted file mode 100644 index 04c43da336..0000000000 --- a/application/client/src/app/ui/layout/contextmenu/template.html +++ /dev/null @@ -1,11 +0,0 @@ -
- - -
diff --git a/application/client/src/app/ui/layout/focus/component.ts b/application/client/src/app/ui/layout/focus/component.ts deleted file mode 100644 index 1ea95df0fe..0000000000 --- a/application/client/src/app/ui/layout/focus/component.ts +++ /dev/null @@ -1,32 +0,0 @@ -import { Component, ChangeDetectorRef, ElementRef, AfterViewInit, ViewChild } from '@angular/core'; -import { Ilc, IlcInterface } from '@env/decorators/component'; - -@Component({ - selector: 'app-layout-focus', - templateUrl: './template.html', - styleUrls: ['./styles.less'], - standalone: false, -}) -@Ilc() -export class LayoutFocus implements AfterViewInit { - @ViewChild('input') _ng_input!: ElementRef; - - constructor(private _cdRef: ChangeDetectorRef) { - // this._subscriptions.onSessionChange = - // EventsSessionService.getObservable().onSessionChange.subscribe( - // this._onSessionChange.bind(this), - // ); - } - - ngAfterViewInit() { - this._onSessionChange(); - } - - private _onSessionChange() { - if (this._ng_input === undefined && (this._ng_input as any).nativeElement !== undefined) { - return; - } - (this._ng_input.nativeElement as HTMLInputElement).focus(); - } -} -export interface LayoutFocus extends IlcInterface {} diff --git a/application/client/src/app/ui/layout/focus/styles.less b/application/client/src/app/ui/layout/focus/styles.less deleted file mode 100644 index 8a4d56699f..0000000000 --- a/application/client/src/app/ui/layout/focus/styles.less +++ /dev/null @@ -1,19 +0,0 @@ -:host { - position: absolute; - display: block; - height: 1px; - width: 1px; - top: -1px; - left: 1px; - overflow: hidden; - opacity: 0.000001; - & input { - position: absolute; - display: block; - height: 1px; - width: 1px; - top: -1px; - left: 1px; - overflow: hidden; - } -} \ No newline at end of file diff --git a/application/client/src/app/ui/layout/focus/template.html b/application/client/src/app/ui/layout/focus/template.html deleted file mode 100644 index 9e7b4e243c..0000000000 --- a/application/client/src/app/ui/layout/focus/template.html +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/application/client/src/app/ui/layout/module.ts b/application/client/src/app/ui/layout/module.ts deleted file mode 100644 index 76da03cf88..0000000000 --- a/application/client/src/app/ui/layout/module.ts +++ /dev/null @@ -1,92 +0,0 @@ -import { NgModule } from '@angular/core'; -import { CommonModule } from '@angular/common'; -import { ContainersModule } from '@elements/containers/module'; -import { AppDirectiviesModule } from '@directives/module'; -import { ElementsModule } from '@elements/module'; -import { RecentActionsModule } from '@elements/recent/module'; -import { LayoutHomeModule } from './workspace/no-tabs-content/module'; - -import { MatButtonModule } from '@angular/material/button'; -import { MatCardModule } from '@angular/material/card'; -import { MatDividerModule } from '@angular/material/divider'; -import { MatSnackBarModule } from '@angular/material/snack-bar'; -import { MatIconModule } from '@angular/material/icon'; -import { MatMenuModule } from '@angular/material/menu'; - -import { Layout } from './component'; -import { LayoutStatusBar } from './statusbar/component'; -import { LayoutFocus } from './focus/component'; -import { LayoutContextMenu } from './contextmenu/component'; -import { LayoutSidebar } from './sidebar/component'; -import { LayoutSidebarCaption } from './sidebar/caption/component'; -import { LayoutSidebarControls } from './sidebar/controls/component'; -import { LayoutWorkspace } from './workspace/component'; -import { LayoutWorkspaceControls } from './workspace/controls/component'; -import { LayoutToolbar } from './toolbar/component'; -import { LayoutToolbarControls } from './toolbar/controls/component'; -import { LayoutPopups } from './popups/component'; -import { LayoutPopup } from './popups/popup/component'; -import { LayoutSnackBar } from './snackbar/component'; -import { LayoutSnackBarMessage } from './snackbar/message/component'; - -import { OverlayModule } from '@angular/cdk/overlay'; -import { JobsModule } from '@views/statusbar/jobs/module'; -import { SessionModule } from '@views/statusbar/session/module'; -import { SessionInfoModule } from '@views/statusbar/info/module'; - -@NgModule({ - imports: [ - CommonModule, - ContainersModule, - AppDirectiviesModule, - ElementsModule, - MatButtonModule, - MatCardModule, - MatDividerModule, - MatSnackBarModule, - MatIconModule, - MatMenuModule, - JobsModule, - SessionModule, - SessionInfoModule, - RecentActionsModule, - LayoutHomeModule, - OverlayModule, - ], - declarations: [ - Layout, - LayoutStatusBar, - LayoutFocus, - LayoutContextMenu, - LayoutSidebar, - LayoutSidebarCaption, - LayoutSidebarControls, - LayoutWorkspace, - LayoutWorkspaceControls, - LayoutToolbar, - LayoutToolbarControls, - LayoutPopups, - LayoutPopup, - LayoutSnackBar, - LayoutSnackBarMessage, - ], - exports: [Layout, AppDirectiviesModule], - bootstrap: [ - Layout, - LayoutStatusBar, - LayoutFocus, - LayoutContextMenu, - LayoutSidebar, - LayoutSidebarCaption, - LayoutSidebarControls, - LayoutWorkspace, - LayoutWorkspaceControls, - LayoutToolbar, - LayoutToolbarControls, - LayoutPopups, - LayoutPopup, - LayoutSnackBar, - LayoutSnackBarMessage, - ], -}) -export class LayoutModule {} diff --git a/application/client/src/app/ui/layout/popups/component.ts b/application/client/src/app/ui/layout/popups/component.ts deleted file mode 100644 index 9a17dfb13b..0000000000 --- a/application/client/src/app/ui/layout/popups/component.ts +++ /dev/null @@ -1,80 +0,0 @@ -import { - Component, - ChangeDetectorRef, - AfterContentInit, - ChangeDetectionStrategy, - HostBinding, - SkipSelf, -} from '@angular/core'; -import { Ilc, IlcInterface } from '@env/decorators/component'; -import { ChangesDetector } from '@ui/env/extentions/changes'; -import { Popup } from '@ui/service/popup'; - -@Component({ - selector: 'app-layout-popups', - templateUrl: './template.html', - styleUrls: ['./styles.less'], - changeDetection: ChangeDetectionStrategy.OnPush, - standalone: false, -}) -@Ilc() -export class LayoutPopups extends ChangesDetector implements AfterContentInit { - public popups: Map void }> = new Map(); - - protected visible: boolean = false; - protected shadowed: boolean = true; - - @HostBinding('class') get visability() { - return this.visible ? `visible ${this.shadowed ? '' : 'transporent'}` : 'hidden'; - } - - constructor(@SkipSelf() selfCdRef: ChangeDetectorRef, cdRef: ChangeDetectorRef) { - super([selfCdRef, cdRef]); - } - - public ngAfterContentInit(): void { - this.ilc().channel.ui.popup.open((popup: Popup) => { - if (this.popups.has(popup.uuid)) { - return; - } - popup.options.component.inputs === undefined && (popup.options.component.inputs = {}); - popup.options.component.inputs.close = this._close.bind(this, popup.uuid); - this.popups.set(popup.uuid, { popup, close: this._close.bind(this, popup.uuid) }); - this.visible = true; - this.shadowed = popup.isBlured(); - this.ilc().services.ui.popup.setCount(this.popups.size); - this.ilc().emitter.ui.popup.updated(this.popups.size); - this.markChangesForCheck(); - popup.subjects.get().opened.emit(); - }); - this.ilc().channel.ui.popup.close((uuid: string) => { - this._close(uuid); - }); - } - - public onBGClick(): void { - this.popups.forEach((popup, uuid) => { - if (popup.popup.options.closable === false) { - return; - } - if (popup.popup.options.closeOnBGClick === false) { - return; - } - this._close(uuid); - }); - } - - private _close(uuid: string): void { - const stored = this.popups.get(uuid); - if (stored === undefined) { - return; - } - this.popups.delete(uuid); - this.popups.size === 0 && (this.visible = false); - this.ilc().services.ui.popup.setCount(this.popups.size); - this.ilc().emitter.ui.popup.updated(this.popups.size); - this.markChangesForCheck(); - stored.popup.subjects.get().closed.emit(); - } -} -export interface LayoutPopups extends IlcInterface {} diff --git a/application/client/src/app/ui/layout/popups/popup/component.ts b/application/client/src/app/ui/layout/popups/popup/component.ts deleted file mode 100644 index 7924da041d..0000000000 --- a/application/client/src/app/ui/layout/popups/popup/component.ts +++ /dev/null @@ -1,94 +0,0 @@ -import { - Component, - ChangeDetectorRef, - AfterViewInit, - AfterContentInit, - ChangeDetectionStrategy, - Input, - HostBinding, - HostListener, -} from '@angular/core'; -import { Ilc, IlcInterface } from '@env/decorators/component'; -import { ChangesDetector } from '@ui/env/extentions/changes'; -import { Popup } from '@ui/service/popup'; - -@Component({ - selector: 'app-layout-popup', - templateUrl: './template.html', - styleUrls: ['./styles.less'], - changeDetection: ChangeDetectionStrategy.OnPush, - standalone: false, -}) -@Ilc() -export class LayoutPopup extends ChangesDetector implements AfterViewInit, AfterContentInit { - @Input() public popup!: Popup; - @Input() public close!: () => void; - - @HostBinding('class') get cssClassEdited() { - if (this.popup.options.position === undefined) { - return `v-bottom h-center`; - } else { - return `v-${this.popup.options.position.vertical} h-${this.popup.options.position.horizontal}`; - } - } - - @HostListener('click', ['$event']) onClick(event: MouseEvent) { - if ((event.target as HTMLElement).tagName.toLowerCase() === 'app-layout-popup') { - if (this.popup.options.closable === false) { - return; - } - if (this.popup.options.closeOnBGClick === false) { - return; - } - this.close(); - } - } - - constructor(cdRef: ChangeDetectorRef) { - super(cdRef); - } - - public ngAfterContentInit(): void { - this.popup.options.component.inputs = - this.popup.options.component.inputs === undefined - ? {} - : this.popup.options.component.inputs; - this.popup.options.component.inputs.close = this.close; - this.popup.options.component.inputs.popup = this.popup; - } - - public ngAfterViewInit(): void { - this.env().subscriber.register( - this.ilc().services.ui.listener.listen( - 'keydown', - window, - (event: KeyboardEvent) => { - if (this.popup.options.closable === false) { - return true; - } - if (this.popup.options.closeOnKey === undefined) { - return true; - } - if (this.popup.options.closeOnKey === '*') { - this.close(); - return true; - } - const keys = this.popup.options.closeOnKey.split(','); - if (keys.includes(event.key)) { - this.close(); - } - return true; - }, - ), - ); - } - - public ngStyle(): { width: string } { - if (this.popup.options === undefined || this.popup.options.width === undefined) { - return { width: 'auto' }; - } else { - return { width: `${this.popup.options.width}px` }; - } - } -} -export interface LayoutPopup extends IlcInterface {} diff --git a/application/client/src/app/ui/layout/popups/popup/styles.less b/application/client/src/app/ui/layout/popups/popup/styles.less deleted file mode 100644 index bc2c34659f..0000000000 --- a/application/client/src/app/ui/layout/popups/popup/styles.less +++ /dev/null @@ -1,41 +0,0 @@ -@import '../../../styles/variables.less'; -:host { - position: absolute; - display: flex; - z-index: 1000; - top: 0px; - left: 0px; - width: 100%; - height: 100%; - overflow: hidden; - flex-direction: column; - & .container { - background: var(--scheme-color-5); - box-shadow: 3px 3px 4px rgba(0,0,0,0.4); - max-width: 70%; - max-height: 80%; - overflow-x: hidden; - overflow-y: auto; - } - &.v-bottom { - justify-content: flex-end; - } - &.v-top { - justify-content:flex-start; - } - &.v-center { - justify-content: center; - } - &.h-left { - align-items:flex-start; - align-content:flex-start; - } - &.h-right { - align-items:flex-end; - align-content:flex-end; - } - &.h-center { - align-items: center; - align-content: center; - } -} diff --git a/application/client/src/app/ui/layout/popups/popup/template.html b/application/client/src/app/ui/layout/popups/popup/template.html deleted file mode 100644 index 2b7cf5b5cf..0000000000 --- a/application/client/src/app/ui/layout/popups/popup/template.html +++ /dev/null @@ -1,3 +0,0 @@ -
- -
\ No newline at end of file diff --git a/application/client/src/app/ui/layout/popups/styles.less b/application/client/src/app/ui/layout/popups/styles.less deleted file mode 100644 index 90bd73e3ff..0000000000 --- a/application/client/src/app/ui/layout/popups/styles.less +++ /dev/null @@ -1,32 +0,0 @@ -@import '../../styles/variables.less'; - -:host { - position: absolute; - display: none; - z-index: 1000; - top: 0px; - left: 0px; - width: 100%; - height: 100%; - overflow: hidden; - &.visible { - display: block; - } - & div.background { - position: absolute; - top: 0px; - left: 0px; - width: 100%; - height: 100%; - overflow: hidden; - } - & div.background { - background: rgba(0,0,0,0.4); - } - &.transporent { - & div.background { - background: rgba(0,0,0,0.01); - } - - } -} diff --git a/application/client/src/app/ui/layout/popups/template.html b/application/client/src/app/ui/layout/popups/template.html deleted file mode 100644 index c2a987fd7a..0000000000 --- a/application/client/src/app/ui/layout/popups/template.html +++ /dev/null @@ -1,2 +0,0 @@ -
- \ No newline at end of file diff --git a/application/client/src/app/ui/layout/sidebar/caption/component.ts b/application/client/src/app/ui/layout/sidebar/caption/component.ts deleted file mode 100644 index fadc1a4203..0000000000 --- a/application/client/src/app/ui/layout/sidebar/caption/component.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { Component, AfterViewInit, ChangeDetectorRef } from '@angular/core'; -import { IComponentDesc } from '@elements/containers/dynamic/component'; -import { Ilc, IlcInterface } from '@env/decorators/component'; - -@Component({ - selector: 'app-layout-sidebar-caption', - templateUrl: './template.html', - styleUrls: ['./styles.less'], - standalone: false, -}) -@Ilc() -export class LayoutSidebarCaption implements AfterViewInit { - public _ng_injection: IComponentDesc | undefined = undefined; - - constructor(private _cdRef: ChangeDetectorRef) {} - - ngAfterViewInit() { - // this._subscriptions.onInjectionUpdated = - // SidebarSessionsService.getObservable().injection.subscribe( - // this._onInjectionUpdated.bind(this), - // ); - } - - // private _onInjectionUpdated(comp: IComponentDesc | undefined) { - // this._ng_injection = comp; - // this._cdRef.detectChanges(); - // } -} -export interface LayoutSidebarCaption extends IlcInterface {} diff --git a/application/client/src/app/ui/layout/sidebar/caption/styles.less b/application/client/src/app/ui/layout/sidebar/caption/styles.less deleted file mode 100644 index a3cae639b2..0000000000 --- a/application/client/src/app/ui/layout/sidebar/caption/styles.less +++ /dev/null @@ -1,10 +0,0 @@ -@import '../../../styles/variables.less'; - -:host { - position: absolute; - top: 0; - left: 0; - width: 100%; - height: 100%; - overflow: hidden; -} diff --git a/application/client/src/app/ui/layout/sidebar/caption/template.html b/application/client/src/app/ui/layout/sidebar/caption/template.html deleted file mode 100644 index 60de0d3391..0000000000 --- a/application/client/src/app/ui/layout/sidebar/caption/template.html +++ /dev/null @@ -1 +0,0 @@ - diff --git a/application/client/src/app/ui/layout/sidebar/component.ts b/application/client/src/app/ui/layout/sidebar/component.ts deleted file mode 100644 index 6877e4ee48..0000000000 --- a/application/client/src/app/ui/layout/sidebar/component.ts +++ /dev/null @@ -1,37 +0,0 @@ -import { - Component, - Input, - AfterViewInit, - ChangeDetectorRef, - ChangeDetectionStrategy, -} from '@angular/core'; -import { Base } from '@service/session'; -import { TabsOptions, ETabsListDirection } from '@elements/tabs/options'; -import { Ilc, IlcInterface } from '@env/decorators/component'; -import { ChangesDetector } from '@ui/env/extentions/changes'; - -@Component({ - selector: 'app-layout-sidebar', - templateUrl: './template.html', - styleUrls: ['./styles.less'], - changeDetection: ChangeDetectionStrategy.OnPush, - standalone: false, -}) -@Ilc() -export class LayoutSidebar extends ChangesDetector implements AfterViewInit { - @Input() public session!: Base; - - constructor(cdRef: ChangeDetectorRef) { - super(cdRef); - } - - ngAfterViewInit() { - this.session.sidebar()?.setOptions( - new TabsOptions({ - direction: ETabsListDirection.left, - }), - ); - this.detectChanges(); - } -} -export interface LayoutSidebar extends IlcInterface {} diff --git a/application/client/src/app/ui/layout/sidebar/controls/component.ts b/application/client/src/app/ui/layout/sidebar/controls/component.ts deleted file mode 100644 index 2cd34c3b03..0000000000 --- a/application/client/src/app/ui/layout/sidebar/controls/component.ts +++ /dev/null @@ -1,39 +0,0 @@ -import { Component, ChangeDetectorRef } from '@angular/core'; -import { Ilc, IlcInterface } from '@env/decorators/component'; - -@Component({ - selector: 'app-layout-sidebar-controls', - templateUrl: './template.html', - styleUrls: ['./styles.less'], - standalone: false, -}) -@Ilc() -export class LayoutSidebarControls { - constructor(private _cdRef: ChangeDetectorRef) {} - - public _ng_onAdd(event: MouseEvent) { - console.log(event); - // const tabs: ITab[] | undefined = this.ilc().services.ui.sidebar.getNotOpened(); - // if (tabs === undefined || tabs.length === 0) { - // return; - // } - // const items: IMenuItem[] = tabs.map((tab: ITab) => { - // return { - // caption: tab.name, - // handler: () => { - // if (tab.guid === undefined) { - // return; - // } - // // this.state.maximize(); - // SidebarSessionsService.addByGuid(tab.guid); - // }, - // }; - // }); - // this.ilc().services.ui.contextmenu.show({ - // items: items, - // x: event.pageX, - // y: event.pageY, - // }); - } -} -export interface LayoutSidebarControls extends IlcInterface {} diff --git a/application/client/src/app/ui/layout/sidebar/controls/styles.less b/application/client/src/app/ui/layout/sidebar/controls/styles.less deleted file mode 100644 index f26bc1031b..0000000000 --- a/application/client/src/app/ui/layout/sidebar/controls/styles.less +++ /dev/null @@ -1,10 +0,0 @@ -@import '../../../styles/variables.less'; - -:host { - position: relative; - white-space: nowrap; - height: 100%; - width: 100%; - margin: 0; - padding: 0; -} diff --git a/application/client/src/app/ui/layout/sidebar/controls/template.html b/application/client/src/app/ui/layout/sidebar/controls/template.html deleted file mode 100644 index 85d01d3ae6..0000000000 --- a/application/client/src/app/ui/layout/sidebar/controls/template.html +++ /dev/null @@ -1 +0,0 @@ - diff --git a/application/client/src/app/ui/layout/sidebar/styles.less b/application/client/src/app/ui/layout/sidebar/styles.less deleted file mode 100644 index 5d0a0209c3..0000000000 --- a/application/client/src/app/ui/layout/sidebar/styles.less +++ /dev/null @@ -1,17 +0,0 @@ -@import '../../styles/variables.less'; -@import '../../styles/support.less'; - -:host { - position: relative; - display: block; - box-sizing: border-box; - background: var(--scheme-color-5-darken-5); - border-left: var(--scheme-color-5-darken-5) thin solid; - border-right: var(--scheme-color-5-lighten-5) thin solid; - & element-tabs { - top: 0; - left: 0; - bottom: 0; - right: 0; - } -} diff --git a/application/client/src/app/ui/layout/sidebar/template.html b/application/client/src/app/ui/layout/sidebar/template.html deleted file mode 100644 index 578566ca76..0000000000 --- a/application/client/src/app/ui/layout/sidebar/template.html +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/application/client/src/app/ui/layout/snackbar/component.ts b/application/client/src/app/ui/layout/snackbar/component.ts deleted file mode 100644 index 65c2461bd4..0000000000 --- a/application/client/src/app/ui/layout/snackbar/component.ts +++ /dev/null @@ -1,34 +0,0 @@ -import { Component, AfterContentInit, NgZone } from '@angular/core'; -import { Ilc, IlcInterface } from '@env/decorators/component'; -import { MatSnackBar } from '@angular/material/snack-bar'; -import { notifications } from '@ui/service/notifications'; -import { Notification } from '@ui/service/notification/notification'; -import { LayoutSnackBarMessage } from './message/component'; - -@Component({ - selector: 'app-layout-snackbar', - templateUrl: './template.html', - styleUrls: ['./styles.less'], - standalone: false, -}) -@Ilc() -export class LayoutSnackBar implements AfterContentInit { - constructor(protected snackBar: MatSnackBar, protected zone: NgZone) {} - - ngAfterContentInit(): void { - this.env().subscriber.register( - notifications.subjects.get().pop.subscribe((notification: Notification) => { - this.zone.run(() => { - const ref = this.snackBar.openFromComponent(LayoutSnackBarMessage, { - data: { - notification, - ref: () => ref, - }, - duration: notification.duration(), - }); - }); - }), - ); - } -} -export interface LayoutSnackBar extends IlcInterface {} diff --git a/application/client/src/app/ui/layout/snackbar/message/component.ts b/application/client/src/app/ui/layout/snackbar/message/component.ts deleted file mode 100644 index 393ba7cc0d..0000000000 --- a/application/client/src/app/ui/layout/snackbar/message/component.ts +++ /dev/null @@ -1,53 +0,0 @@ -import { Component, Inject, ViewEncapsulation } from '@angular/core'; -import { MAT_SNACK_BAR_DATA, MatSnackBarRef } from '@angular/material/snack-bar'; -import { Ilc, IlcInterface } from '@env/decorators/component'; -import { Action } from '@platform/types/notification/index'; -import { Notification } from '@ui/service/notification/notification'; - -import * as Requests from '@platform/ipc/request'; - -@Component({ - selector: 'app-layout-snackbar-message', - templateUrl: './template.html', - styleUrls: ['./styles.less'], - encapsulation: ViewEncapsulation.None, - standalone: false, -}) -@Ilc() -export class LayoutSnackBarMessage { - constructor( - @Inject(MAT_SNACK_BAR_DATA) - public data: { - notification: Notification; - ref: () => MatSnackBarRef; - }, - ) {} - - ngOnAction(action: Action): void { - this.data.ref().dismiss(); - Requests.IpcRequest.send( - Requests.Action.Call.Response, - new Requests.Action.Call.Request({ - uuid: action.uuid, - inputs: undefined, - }), - ) - .then((response) => { - if (response.error !== undefined) { - this.log().error( - `Fail to process action ${action.name} (${action.uuid}); error: ${response.error}`, - ); - } - }) - .catch((error: Error) => { - this.log().error( - `Fail to send action ${action.name} (${action.uuid}); error: ${error.message}`, - ); - }); - } - - ngDismiss() { - this.data.ref().dismiss(); - } -} -export interface LayoutSnackBarMessage extends IlcInterface {} diff --git a/application/client/src/app/ui/layout/snackbar/message/styles.less b/application/client/src/app/ui/layout/snackbar/message/styles.less deleted file mode 100644 index 584561d695..0000000000 --- a/application/client/src/app/ui/layout/snackbar/message/styles.less +++ /dev/null @@ -1,21 +0,0 @@ -@import '../../../styles/variables.less'; - -app-layout-snackbar-message { - padding: 0 16px 0 0; - position: relative; - display: block; - & div.message{ - padding-bottom: 12px; - } - & div.controlls { - text-align: right; - & button { - margin-left: 12px; - } - } - & button[data-controll="close"] { - position: absolute; - right: -14px; - top: -14px; - } -} diff --git a/application/client/src/app/ui/layout/snackbar/message/template.html b/application/client/src/app/ui/layout/snackbar/message/template.html deleted file mode 100644 index 2704feb258..0000000000 --- a/application/client/src/app/ui/layout/snackbar/message/template.html +++ /dev/null @@ -1,14 +0,0 @@ -
-

{{ data.notification.message() }}

-
-
- -
- \ No newline at end of file diff --git a/application/client/src/app/ui/layout/snackbar/styles.less b/application/client/src/app/ui/layout/snackbar/styles.less deleted file mode 100644 index 8fdbe2d445..0000000000 --- a/application/client/src/app/ui/layout/snackbar/styles.less +++ /dev/null @@ -1,3 +0,0 @@ -:host { - -} \ No newline at end of file diff --git a/application/client/src/app/ui/layout/snackbar/template.html b/application/client/src/app/ui/layout/snackbar/template.html deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/application/client/src/app/ui/layout/state.ts b/application/client/src/app/ui/layout/state.ts deleted file mode 100644 index e2ac673c0b..0000000000 --- a/application/client/src/app/ui/layout/state.ts +++ /dev/null @@ -1,41 +0,0 @@ -import { Observable, Subject } from 'rxjs'; - -export class State {} -export class AreaState { - public minimized: boolean = true; - - private _subjects = { - minimized: new Subject(), - updated: new Subject(), - }; - - public getObservable(): { - minimized: Observable; - updated: Observable; - } { - return { - minimized: this._subjects.minimized.asObservable(), - updated: this._subjects.updated.asObservable(), - }; - } - - public minimize() { - // if (LayoutStateService.locked()) { - // return; - // } - this.minimized = true; - this._subjects.minimized.next(this.minimized); - this._subjects.updated.next(this); - // ViewsEventsService.fire().onResize(); - } - - public maximize() { - // if (LayoutStateService.locked()) { - // return; - // } - this.minimized = false; - this._subjects.minimized.next(this.minimized); - this._subjects.updated.next(this); - // ViewsEventsService.fire().onResize(); - } -} diff --git a/application/client/src/app/ui/layout/statusbar/component.ts b/application/client/src/app/ui/layout/statusbar/component.ts deleted file mode 100644 index 450401f3a0..0000000000 --- a/application/client/src/app/ui/layout/statusbar/component.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { Component, ChangeDetectorRef, ChangeDetectionStrategy } from '@angular/core'; -import { Ilc, IlcInterface } from '@env/decorators/component'; -import { ChangesDetector } from '@ui/env/extentions/changes'; - -@Component({ - selector: 'app-layout-statusbar', - templateUrl: './template.html', - styleUrls: ['./styles.less'], - changeDetection: ChangeDetectionStrategy.OnPush, - standalone: false, -}) -@Ilc() -export class LayoutStatusBar extends ChangesDetector { - constructor(cdRef: ChangeDetectorRef) { - super(cdRef); - } -} -export interface LayoutStatusBar extends IlcInterface {} diff --git a/application/client/src/app/ui/layout/statusbar/styles.less b/application/client/src/app/ui/layout/statusbar/styles.less deleted file mode 100644 index c0f6a6e3c7..0000000000 --- a/application/client/src/app/ui/layout/statusbar/styles.less +++ /dev/null @@ -1,50 +0,0 @@ -@import '../../styles/variables.less'; -@import '../../styles/support.less'; -@import '../../styles/borders.less'; - -:host { - position: relative; - display: block; - box-sizing: border-box; - width: 100%; - height: 100%; - background: var(--scheme-color-5-darken-5); - .border-based-5; - & ul.apps { - position: absolute; - display: flex; - flex-direction: row; - top: 0; - width: 50%; - height: 100%; - overflow: hidden; - list-style: none; - padding: 0; - margin: 0; - white-space: nowrap; - & li.app { - position: relative; - display: flex; - height: 100%; - width: auto; - margin: 0; - align-items: center; - padding: 0; - } - &.left { - left: 0; - flex-direction: row; - & li.app { - flex-direction: row; - } - } - &.right { - left: 50%; - flex-direction: row-reverse; - & li.app { - flex-direction: row-reverse; - } - } - - } -} diff --git a/application/client/src/app/ui/layout/statusbar/template.html b/application/client/src/app/ui/layout/statusbar/template.html deleted file mode 100644 index cbeaf9def0..0000000000 --- a/application/client/src/app/ui/layout/statusbar/template.html +++ /dev/null @@ -1,7 +0,0 @@ -
    -
  • -
-
    -
  • -
  • -
diff --git a/application/client/src/app/ui/layout/styles.less b/application/client/src/app/ui/layout/styles.less deleted file mode 100644 index e332c972a6..0000000000 --- a/application/client/src/app/ui/layout/styles.less +++ /dev/null @@ -1,276 +0,0 @@ -@import '../styles/variables.less'; - -:host { - display: block; - position: absolute; - top: 0; - left: 0; - width: 100%; - height: 100%; - background: var(--scheme-color-5); - &.transporent, - &.blur { - & div.main * { - user-select: none!important; - pointer-events: none!important; - } - } - &.blur { - & div.main { - filter: blur(1px); - } - } - & div.wrapper { - position: absolute; - display: block; - top: 0; - left: 0; - width: 100%; - height: 100%; - & div.main { - position: absolute; - display: block; - top: 0; - left: 0; - width: 100%; - bottom: @status-bar-height; - & div.workspace { - position: absolute; - display: block; - top: 0; - left: 0; - right: @tabs-list-height; - margin-bottom: 6px; - &.full { - right: 0; - bottom: 0; - } - } - & div.toolbar { - position: absolute; - display: block; - left: 0; - bottom: 0; - right: @tabs-list-height; - background: var(--scheme-color-5); - & element-tabs { - top: 0; - left: 0; - bottom: 0; - right: 0; - position: absolute; - display: block; - overflow: hidden; - } - } - & div.sidebar { - position: absolute; - display: block; - top: 0; - bottom: 0; - right: 0; - width: @tabs-list-height; - z-index: 1; - & div.sidebar-caption { - position: absolute; - display: block; - top: 0; - left: 0; - height: @tabs-list-height; - right: 0; - overflow: hidden; - background: var(--scheme-color-5-lighten-10); - box-sizing: border-box; - & div.switcher { - position: absolute; - top: 0; - left: 0; - height: @tabs-list-height; - width: @tabs-list-height; - - } - & div.injections { - position: absolute; - display: none; - top: 0; - left: @tabs-list-height; - height: @tabs-list-height; - right: @tabs-list-height; - overflow: hidden; - } - & div.location { - position: absolute; - display: none; - top: 0; - right: 0; - height: @tabs-list-height; - width: @tabs-list-height; - } - } - & app-layout-sidebar { - top: @tabs-list-height; - left: 0; - bottom: 0; - right: 0; - position: absolute; - display: block; - overflow: hidden; - margin-left: 5px; - } - & div.sidebar-resizer { - position: absolute; - display: block; - top: 0; - left: 0px; - width: 6px; - bottom: 0; - background: var(--scheme-color-5-lighten-15); - cursor: col-resize; - z-index: 1; - &.dragging { - &::after{ - display: block; - content: ''; - position: absolute; - top:0; - height: 100%; - left:2px; - width: 1px; - border-left: dashed var(--scheme-color-1) thin; - } - } - &:hover { - &::after{ - display: block; - content: ''; - position: absolute; - top:0; - height: 100%; - left:2px; - width: 1px; - border-left: dashed var(--scheme-color-1) thin; - } - } - } - } - & div.toolbar-resizer { - position: absolute; - display: block; - left: 0; - bottom: -3px; - height: 6px; - right: 0; - background: var(--scheme-color-5-lighten-15); - cursor: row-resize; - z-index: 1; - &.dragging { - &::after{ - display: block; - content: ''; - position: absolute; - top:2px; - height: 1px; - left:0; - width: 100%; - border-top: dashed var(--scheme-color-1) thin; - } - } - &:hover { - &::after{ - display: block; - content: ''; - position: absolute; - top:2px; - height: 1px; - left:0; - width: 100%; - border-top: dashed var(--scheme-color-1) thin; - } - } - } - } - & app-layout-statusbar { - position: absolute; - display: block; - overflow: hidden; - bottom: 0; - height: @status-bar-height; - left: 0; - right: 0; - } - &.fb-minimized { - } - &.fb-maximized { - & div.main { - & div.sidebar { - & div.sidebar-caption { - & div.switcher { - & span.small-icon-button { - transform: rotate(180deg); - } - } - & div.injections { - display: block; - } - & div.location { - display: block; - } - } - } - } - } - &.fb-maximized.func-left { - & div.main { - & div.sidebar { - & div.sidebar-caption { - & div.switcher { - & span.small-icon-button { - transform: rotate(0deg); - } - } - } - } - } - } - &.func-left { - & div.main { - & div.workspace { - position: absolute; - display: block; - top: 0; - right: 0; - bottom: 0; - left: @tabs-list-height; - } - & div.sidebar { - position: absolute; - display: block; - top: 0; - bottom: 0; - left: 0; - width: @tabs-list-height; - & div.sidebar-caption { - & div.location { - left: 0; - right: unset !important; - & span.small-icon-button { - transform: rotate(180deg); - } - } - & div.switcher { - right: 0; - left: unset !important; - & span.small-icon-button { - transform: rotate(180deg); - } - } - } - } - & div.sidebar-resizer { - right: -3px; - left: unset !important; - } - } - } - } -} diff --git a/application/client/src/app/ui/layout/template.html b/application/client/src/app/ui/layout/template.html deleted file mode 100644 index d91911e8d9..0000000000 --- a/application/client/src/app/ui/layout/template.html +++ /dev/null @@ -1,52 +0,0 @@ -
-
-
- -
-
- -
-
- -
- - - - -
diff --git a/application/client/src/app/ui/layout/toolbar/component.ts b/application/client/src/app/ui/layout/toolbar/component.ts deleted file mode 100644 index 56ca448ace..0000000000 --- a/application/client/src/app/ui/layout/toolbar/component.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { - Component, - Input, - AfterViewInit, - ChangeDetectorRef, - ChangeDetectionStrategy, -} from '@angular/core'; -import { Ilc, IlcInterface } from '@env/decorators/component'; -import { Base } from '@service/session'; -import { ChangesDetector } from '@ui/env/extentions/changes'; - -@Component({ - selector: 'app-layout-toolbar', - templateUrl: './template.html', - styleUrls: ['./styles.less'], - changeDetection: ChangeDetectionStrategy.OnPush, - standalone: false, -}) -@Ilc() -export class LayoutToolbar extends ChangesDetector implements AfterViewInit { - @Input() public session!: Base; - - constructor(cdRef: ChangeDetectorRef) { - super(cdRef); - } - - ngAfterViewInit() { - this.detectChanges(); - } -} -export interface LayoutToolbar extends IlcInterface {} diff --git a/application/client/src/app/ui/layout/toolbar/controls/component.ts b/application/client/src/app/ui/layout/toolbar/controls/component.ts deleted file mode 100644 index 90bf678850..0000000000 --- a/application/client/src/app/ui/layout/toolbar/controls/component.ts +++ /dev/null @@ -1,79 +0,0 @@ -import { Component, Input, AfterContentInit, OnDestroy, ChangeDetectorRef } from '@angular/core'; -import { AreaState } from '../../state'; -import { Observable, Subscription } from 'rxjs'; -import { IComponentDesc } from '@elements/containers/dynamic/component'; -import { Ilc, IlcInterface } from '@env/decorators/component'; -import { stop } from '@ui/env/dom'; - -@Component({ - selector: 'app-layout-toolbar-controls', - templateUrl: './template.html', - styleUrls: ['./styles.less'], - standalone: false, -}) -@Ilc() -export class LayoutToolbarControls implements AfterContentInit, OnDestroy { - @Input() public state!: AreaState; - @Input() public injection!: Observable; - - public _ng_injection: IComponentDesc | undefined = undefined; - - private _subscriptions: { [key: string]: Subscription } = {}; - - constructor(private _cdRef: ChangeDetectorRef) {} - - public ngAfterContentInit() { - // this._subscriptions.onInjection = this.injection.subscribe(this._onInjecton.bind(this)); - } - - public ngOnDestroy() { - Object.keys(this._subscriptions).forEach((key: string) => { - this._subscriptions[key].unsubscribe(); - }); - } - - public _ng_onStateToggle(event: MouseEvent) { - if (this.state.minimized) { - this.state.maximize(); - } else { - this.state.minimize(); - } - stop(event); - return false; - } - - public _ng_onAdd(event: MouseEvent) { - // const tabs: ITab[] | undefined = ToolbarSessionsService.getInactiveTabs(); - // if (tabs === undefined || tabs.length === 0) { - // return; - // } - // const items: Declarations.IMenuItem[] = tabs.map((tab: ITab) => { - // return { - // caption: tab.name, - // handler: () => { - // if (tab.guid === undefined) { - // this.log().error(`Tab guid is undefined`); - // return; - // } - // this.state.maximize(); - // ToolbarSessionsService.addByGuid(tab.guid); - // ToolbarSessionsService.setActive(tab.guid, undefined, false).catch( - // (error: Error) => this.log().error(error.message), - // ); - // }, - // }; - // }); - // this.ilc().services.ui.contextmenu.show({ - // items: items, - // x: event.pageX, - // y: event.pageY, - // }); - stop(event); - } - - private _onInjecton(injection: IComponentDesc) { - this._ng_injection = injection; - this._cdRef.detectChanges(); - } -} -export interface LayoutToolbarControls extends IlcInterface {} diff --git a/application/client/src/app/ui/layout/toolbar/controls/styles.less b/application/client/src/app/ui/layout/toolbar/controls/styles.less deleted file mode 100644 index e1c97f68f8..0000000000 --- a/application/client/src/app/ui/layout/toolbar/controls/styles.less +++ /dev/null @@ -1,38 +0,0 @@ -@import '../../../styles/variables.less'; - -:host { - position: relative; - white-space: nowrap; - height: 100%; - width: 100%; - text-align: right; - display: flex; - flex-flow: row nowrap; - margin: 0; - padding: 0; - & .left-area { - flex: 1 auto; - order: 1; - width: auto; - } - & .injection-area { - flex: 1 auto; - order: 2; - width: 100%; - } - & .right-area { - flex: 1 auto; - order: 2; - width: 100%; - &.injection-exist { - order: 3; - width: auto; - } - & span.state-trigger { - transition: transform 350ms ease-in-out; - } - & span.state-trigger.minimized { - transform: rotate(180deg); - } - } -} diff --git a/application/client/src/app/ui/layout/toolbar/controls/template.html b/application/client/src/app/ui/layout/toolbar/controls/template.html deleted file mode 100644 index 869470cc6a..0000000000 --- a/application/client/src/app/ui/layout/toolbar/controls/template.html +++ /dev/null @@ -1,9 +0,0 @@ -
- -
-
- -
-
- -
\ No newline at end of file diff --git a/application/client/src/app/ui/layout/toolbar/styles.less b/application/client/src/app/ui/layout/toolbar/styles.less deleted file mode 100644 index 2d908f8cbf..0000000000 --- a/application/client/src/app/ui/layout/toolbar/styles.less +++ /dev/null @@ -1,19 +0,0 @@ -@import '../../styles/variables.less'; - -:host { - top: 0; - left: 0; - bottom: 0; - right: 0; - position: absolute; - display: block; - & element-tabs { - top: 0; - left: 0; - bottom: 0; - right: 0; - position: absolute; - display: block; - overflow: hidden; - } -} diff --git a/application/client/src/app/ui/layout/toolbar/template.html b/application/client/src/app/ui/layout/toolbar/template.html deleted file mode 100644 index e6032eeb11..0000000000 --- a/application/client/src/app/ui/layout/toolbar/template.html +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/application/client/src/app/ui/layout/workspace/component.ts b/application/client/src/app/ui/layout/workspace/component.ts deleted file mode 100644 index e806b6801e..0000000000 --- a/application/client/src/app/ui/layout/workspace/component.ts +++ /dev/null @@ -1,74 +0,0 @@ -import { - Component, - AfterViewInit, - ChangeDetectorRef, - ChangeDetectionStrategy, -} from '@angular/core'; -import { TabsService } from '@elements/tabs/service'; -import { LayoutHome } from './no-tabs-content/component'; -import { Ilc, IlcInterface } from '@env/decorators/component'; -import { ChangesDetector } from '@ui/env/extentions/changes'; -import { components } from '@env/decorators/initial'; - -import * as ids from '@schema/ids'; - -@Component({ - selector: 'app-layout-workspace', - templateUrl: './template.html', - styleUrls: ['./styles.less'], - changeDetection: ChangeDetectionStrategy.OnPush, - standalone: false, -}) -@Ilc() -export class LayoutWorkspace extends ChangesDetector implements AfterViewInit { - public tabs: TabsService; - - constructor(cdRef: ChangeDetectorRef) { - super(cdRef); - this.tabs = this.ilc().services.system.session.getTabsService(); - } - - ngAfterViewInit() { - this.ilc() - .services.system.session.add() - .unbound({ - uuid: ids.WORKSPACE_TAB_HOME, - sidebar: true, - toolbar: false, - tab: { - content: { - factory: LayoutHome, - }, - active: true, - name: '', - closable: false, - icon: 'home', - }, - }) - .sidebar() - ?.add({ - content: { - factory: components.get('app-elements-tree'), - }, - active: true, - closable: false, - name: 'Favourite', - }); - this.env().subscriber.register( - this.ilc().services.system.hotkeys.listen('Ctrl + Tab', () => { - this.tabs.next(); - }), - ); - this.env().subscriber.register( - this.ilc().services.system.hotkeys.listen('Shift + Ctrl + Tab', () => { - this.tabs.prev(); - }), - ); - this.env().subscriber.register( - this.ilc().services.system.hotkeys.listen('Ctrl + T', () => { - this.tabs.setActive(ids.WORKSPACE_TAB_HOME); - }), - ); - } -} -export interface LayoutWorkspace extends IlcInterface {} diff --git a/application/client/src/app/ui/layout/workspace/controls/component.ts b/application/client/src/app/ui/layout/workspace/controls/component.ts deleted file mode 100644 index 91fd96637d..0000000000 --- a/application/client/src/app/ui/layout/workspace/controls/component.ts +++ /dev/null @@ -1,24 +0,0 @@ -import { Component, Input } from '@angular/core'; -import { Ilc, IlcInterface } from '@env/decorators/component'; -import { stop } from '@ui/env/dom'; - -@Component({ - selector: 'app-layout-workspace-controls', - templateUrl: './template.html', - styleUrls: ['./styles.less'], - standalone: false, -}) -@Ilc() -export class LayoutWorkspaceControls { - @Input() public onNewTab!: () => void; - - public addNewTab(event: MouseEvent) { - stop(event); - if (typeof this.onNewTab !== 'function') { - return false; - } - this.onNewTab(); - return false; - } -} -export interface LayoutWorkspaceControls extends IlcInterface {} diff --git a/application/client/src/app/ui/layout/workspace/controls/styles.less b/application/client/src/app/ui/layout/workspace/controls/styles.less deleted file mode 100644 index 57a831d34f..0000000000 --- a/application/client/src/app/ui/layout/workspace/controls/styles.less +++ /dev/null @@ -1,13 +0,0 @@ -@import '../../../styles/variables.less'; - -:host { - position: relative; - display: inline-block; - white-space: nowrap; - height: 100%; - width: 100%; - text-align: left; - & .add-new { - margin-top: 5px; - } -} diff --git a/application/client/src/app/ui/layout/workspace/controls/template.html b/application/client/src/app/ui/layout/workspace/controls/template.html deleted file mode 100644 index 46708e9394..0000000000 --- a/application/client/src/app/ui/layout/workspace/controls/template.html +++ /dev/null @@ -1,2 +0,0 @@ - - \ No newline at end of file diff --git a/application/client/src/app/ui/layout/workspace/no-tabs-content/action/component.ts b/application/client/src/app/ui/layout/workspace/no-tabs-content/action/component.ts deleted file mode 100644 index b58fc7870d..0000000000 --- a/application/client/src/app/ui/layout/workspace/no-tabs-content/action/component.ts +++ /dev/null @@ -1,41 +0,0 @@ -import { Component, Input, ChangeDetectorRef, AfterViewInit } from '@angular/core'; -import { Ilc, IlcInterface } from '@env/decorators/component'; -import { Base } from '../../../../../service/actions/action'; -import { Storage as ActionsStorage } from '../../../../../service/actions/storage'; -import { ChangesDetector } from '@ui/env/extentions/changes'; -import { stop } from '@ui/env/dom'; - -@Component({ - selector: 'app-home-action', - templateUrl: './template.html', - styleUrls: ['./styles.less'], - standalone: false, -}) -@Ilc() -export class ActionComponent extends ChangesDetector implements AfterViewInit { - @Input() public action!: Base; - @Input() public actions!: ActionsStorage; - @Input() public menu!: boolean; - - constructor(cdRef: ChangeDetectorRef) { - super(cdRef); - } - - public ngAfterViewInit(): void { - this.env().subscriber.register( - this.actions.updated.subscribe(() => { - this.detectChanges(); - }), - ); - } - - public isPinned() { - return this.actions.isPinned(this.action.uuid()); - } - - public onPin(event: MouseEvent) { - this.actions.toggle(this.action.uuid()); - stop(event); - } -} -export interface ActionComponent extends IlcInterface {} diff --git a/application/client/src/app/ui/layout/workspace/no-tabs-content/action/styles.less b/application/client/src/app/ui/layout/workspace/no-tabs-content/action/styles.less deleted file mode 100644 index 8f0d95aea3..0000000000 --- a/application/client/src/app/ui/layout/workspace/no-tabs-content/action/styles.less +++ /dev/null @@ -1,43 +0,0 @@ -@import '../../../../styles/variables.less'; - -:host { - display: block; - width: 100%; - & div.wrapper { - position: relative; - display: flex; - flex-direction: row; - align-items: center; - width: 100%; - & span.left { - flex: auto; - font-size: 14px; - } - & mat-icon { - margin-left: 12px; - margin-right: 0px; - width: 16px; - height: 16px; - font-size: 16px; - opacity: 0.01; - transition: opacity ease-in-out 150ms; - &[data-pinned="no"] { - color: var(--scheme-color-3); - } - &[data-pinned="yes"] { - color: var(--scheme-color-1); - } - &:hover { - color: var(--scheme-color-0); - cursor: default; - } - } - } - &:hover { - & div.wrapper { - & mat-icon { - opacity: 1; - } - } - } -} diff --git a/application/client/src/app/ui/layout/workspace/no-tabs-content/action/template.html b/application/client/src/app/ui/layout/workspace/no-tabs-content/action/template.html deleted file mode 100644 index e325430656..0000000000 --- a/application/client/src/app/ui/layout/workspace/no-tabs-content/action/template.html +++ /dev/null @@ -1,7 +0,0 @@ - \ No newline at end of file diff --git a/application/client/src/app/ui/layout/workspace/no-tabs-content/component.ts b/application/client/src/app/ui/layout/workspace/no-tabs-content/component.ts deleted file mode 100644 index a925237055..0000000000 --- a/application/client/src/app/ui/layout/workspace/no-tabs-content/component.ts +++ /dev/null @@ -1,83 +0,0 @@ -import { - Component, - ViewEncapsulation, - AfterViewInit, - OnDestroy, - ChangeDetectorRef, -} from '@angular/core'; -import { Ilc, IlcInterface } from '@env/decorators/component'; -import { Storage as ActionsStorage } from '../../../../service/actions/storage'; -import { Base as Action } from '../../../../service/actions/action'; -import { ChangesDetector } from '@ui/env/extentions/changes'; - -import * as actions from '@service/actions/index'; - -@Component({ - selector: 'app-layout-area-no-tabs-content', - templateUrl: './template.html', - styleUrls: ['./styles.less'], - encapsulation: ViewEncapsulation.None, - standalone: false, -}) -@Ilc() -export class LayoutHome extends ChangesDetector implements AfterViewInit, OnDestroy { - public readonly menu = { - file: [ - new actions.FileAny.Action(), - new actions.FileDlt.Action(), - new actions.FilePcap.Action(), - new actions.FilePcapLegacy.Action(), - null, - new actions.FolderText.Action(), - new actions.FolderDlt.Action(), - new actions.FolderPcap.Action(), - new actions.FilePcapLegacy.Action(), - ], - conenctTo: [ - new actions.UdpDlt.Action(), - new actions.TcpDlt.Action(), - null, - new actions.SerialText.Action(), - ], - terminal: new actions.StdoutText.Action(), - }; - public actions: ActionsStorage = new ActionsStorage(); - public pinned: Array = []; - - constructor(cdRef: ChangeDetectorRef) { - super(cdRef); - } - - public ngOnDestroy(): void { - this.actions.destroy(); - } - - public ngAfterViewInit(): void { - this.actions.load(); - this.env().subscriber.register( - this.actions.updated.subscribe(() => { - this.update(); - }), - ); - this.update(); - } - - protected update() { - const actions = this.actions.get().sort((a, b) => (a.group() > b.group() ? -1 : 1)); - const pinned: Array = []; - let group = -1; - actions.forEach((action) => { - if (group === -1) { - group = action.group(); - } - if (group !== action.group()) { - pinned.push(null); - group = action.group(); - } - pinned.push(action); - }); - this.pinned = pinned; - this.detectChanges(); - } -} -export interface LayoutHome extends IlcInterface {} diff --git a/application/client/src/app/ui/layout/workspace/no-tabs-content/module.ts b/application/client/src/app/ui/layout/workspace/no-tabs-content/module.ts deleted file mode 100644 index 129650f48a..0000000000 --- a/application/client/src/app/ui/layout/workspace/no-tabs-content/module.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { NgModule } from '@angular/core'; -import { CommonModule } from '@angular/common'; -import { ContainersModule } from '@elements/containers/module'; -import { RecentActionsModule } from '@elements/recent/module'; -import { MatButtonModule } from '@angular/material/button'; -import { MatCardModule } from '@angular/material/card'; -import { MatDividerModule } from '@angular/material/divider'; -import { MatIconModule } from '@angular/material/icon'; -import { MatMenuModule } from '@angular/material/menu'; -import { AppDirectiviesModule } from '@directives/module'; - -import { LayoutHome } from './component'; -import { ActionComponent } from './action/component'; - -@NgModule({ - imports: [ - CommonModule, - ContainersModule, - MatButtonModule, - MatCardModule, - MatDividerModule, - MatIconModule, - MatMenuModule, - RecentActionsModule, - AppDirectiviesModule, - ], - declarations: [LayoutHome, ActionComponent], - exports: [LayoutHome], - bootstrap: [LayoutHome, ActionComponent], -}) -export class LayoutHomeModule {} diff --git a/application/client/src/app/ui/layout/workspace/no-tabs-content/styles.less b/application/client/src/app/ui/layout/workspace/no-tabs-content/styles.less deleted file mode 100644 index 45927ec246..0000000000 --- a/application/client/src/app/ui/layout/workspace/no-tabs-content/styles.less +++ /dev/null @@ -1,65 +0,0 @@ -@import '../../../styles/variables.less'; - -app-layout-area-no-tabs-content { - position: absolute; - display: block; - top: 0; - left: 0; - width: 100%; - height: 100%; - overflow: hidden; - & * { - color: var(--scheme-color-0); - } - h1 { - font-size: 14px; - } - & .menu-buttons { - display: flex; - flex-direction: row; - align-items: center; - text-align: center; - align-self: center; - } - & button.menu-button { - width: 82px; - height: 80px!important; - display: flex; - flex-direction: column; - align-items: center; - margin-left: 8px; - &:first-child{ - margin-left: 0; - } - & mat-icon { - margin-top: 8px; - margin-bottom: 8px; - margin-right: 0!important; - margin-left: 0!important; - } - } - & div.left { - position: absolute; - width: 20rem; - top:0; - bottom: 0; - left: 0; - } - & div.right { - position: absolute; - display: flex; - left: 20rem; - right: 0; - bottom: 0; - top: 0; - & mat-card.fill { - overflow-y: auto; - overflow-x: hidden; - width: 100%; - } - } - & div.feature { - margin: 6px 0; - padding: 6px 0 0px 0; - } -} diff --git a/application/client/src/app/ui/layout/workspace/no-tabs-content/template.html b/application/client/src/app/ui/layout/workspace/no-tabs-content/template.html deleted file mode 100644 index 1489a1c554..0000000000 --- a/application/client/src/app/ui/layout/workspace/no-tabs-content/template.html +++ /dev/null @@ -1,64 +0,0 @@ -
-
-
- - - - - - - - - Favorited Actions - Add/remove favorited actions - - -

You can add some actions to favorites. Just click on the star (on hover above action).

-
- - - - - - -
-
-
-
- - Recently Opened - List of recently opened source - - - - -
-
-
- - - - - - - - - - - - - - - - - - diff --git a/application/client/src/app/ui/layout/workspace/styles.less b/application/client/src/app/ui/layout/workspace/styles.less deleted file mode 100644 index 2d908f8cbf..0000000000 --- a/application/client/src/app/ui/layout/workspace/styles.less +++ /dev/null @@ -1,19 +0,0 @@ -@import '../../styles/variables.less'; - -:host { - top: 0; - left: 0; - bottom: 0; - right: 0; - position: absolute; - display: block; - & element-tabs { - top: 0; - left: 0; - bottom: 0; - right: 0; - position: absolute; - display: block; - overflow: hidden; - } -} diff --git a/application/client/src/app/ui/layout/workspace/template.html b/application/client/src/app/ui/layout/workspace/template.html deleted file mode 100644 index 202e1e6e5b..0000000000 --- a/application/client/src/app/ui/layout/workspace/template.html +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/application/client/src/app/ui/service/contextmenu.ts b/application/client/src/app/ui/service/contextmenu.ts deleted file mode 100644 index 74ca6f0d4a..0000000000 --- a/application/client/src/app/ui/service/contextmenu.ts +++ /dev/null @@ -1,53 +0,0 @@ -import { SetupService, Interface, Implementation, register } from '@platform/entity/service'; -import { ui } from '@register/services'; -import { ilc, Emitter } from '@service/ilc'; -import { IComponentDesc } from '@elements/containers/dynamic/component'; -import { unique } from '@platform/env/sequence'; -import { Once } from '@platform/env/togglers'; - -export { IComponentDesc }; -export interface IMenuItem { - id?: string; - caption?: string; - handler?: () => void; - disabled?: boolean; - shortcut?: string; -} - -export interface IMenu { - id?: string; - component?: IComponentDesc; - items?: IMenuItem[]; - after?: () => void; - x: number; - y: number; -} - -@SetupService(ui['contextmenu']) -export class Service extends Implementation { - private _emitter!: Emitter; - - public override ready(): Promise { - this._emitter = ilc.emitter(this.getName(), this.log()); - return Promise.resolve(); - } - - public show(menu: IMenu): Once { - const uuid = menu.id !== undefined ? menu.id : unique(); - menu.id = uuid; - this._emitter.ui.contextmenu.open(menu); - return new Once( - `contextmenu: ${uuid}`, - () => { - this._emitter.ui.contextmenu.close(); - }, - uuid, - ); - } - - public remove(): void { - this._emitter.ui.contextmenu.close(); - } -} -export interface Service extends Interface {} -export const contextmenu = register(new Service()); diff --git a/application/client/src/app/ui/service/dropfiles.ts b/application/client/src/app/ui/service/dropfiles.ts deleted file mode 100644 index 480dc1f660..0000000000 --- a/application/client/src/app/ui/service/dropfiles.ts +++ /dev/null @@ -1,108 +0,0 @@ -import { SetupService, Interface, Implementation, register } from '@platform/entity/service'; -import { ui } from '@register/services'; -import { bridge } from '@service/bridge'; -import { stop } from '@ui/env/dom'; -import { Action as FileAnyAction } from '@service/actions/file.any'; - -@SetupService(ui['dropfiles']) -export class Service extends Implementation { - protected enabled: boolean = false; - - protected drop(event: DragEvent): boolean { - if (!this.enabled) { - return true; - } - const files: string[] = this.getFiles(event); - stop(event); - if (files.length === 0) { - this.log().warn(`No files dropped.`); - return false; - } - this.log().debug(`${files.length} file(s) has been dropped`); - bridge - .files() - .getByPath(files) - .then((files) => { - if (files.length === 0) { - return; - } - const action = new FileAnyAction(); - if (files.length === 1) { - action.from(files[0]); - } else { - action.multiple(files); - } - }) - .catch((err: Error) => { - this.log().warn(`Fail get files due: ${err.message}`); - }); - return false; - } - - protected stop(event: MouseEvent): boolean { - if (!this.enabled) { - return true; - } - return stop(event); - } - - protected getFiles(event: DragEvent): string[] { - if (event.dataTransfer === null || event.dataTransfer === undefined) { - return []; - } - const files = (() => { - if (event.dataTransfer.files) { - return Array.from(event.dataTransfer.files).map((f) => - window.electron.webUtils.getPathForFile(f), - ); - } else if (event.dataTransfer.items) { - return ( - Array.from(event.dataTransfer.items) - .map((item: DataTransferItem) => { - if (item.kind === 'file') { - return item.getAsFile(); - } else { - return undefined; - } - }) - .filter((f) => f !== undefined) as File[] - ).map((f) => window.electron.webUtils.getPathForFile(f)); - } else { - return []; - } - })(); - return files; - } - - public override ready(): Promise { - this.stop = this.stop.bind(this); - this.drop = this.drop.bind(this); - document.addEventListener('dragover', this.stop); - document.addEventListener('dragleave', this.stop); - document.addEventListener('drop', this.drop); - return Promise.resolve(); - } - - public override destroy(): Promise { - document.removeEventListener('dragover', this.stop); - document.removeEventListener('dragleave', this.stop); - document.removeEventListener('drop', this.drop); - return Promise.resolve(); - } - - public state(): { - enable(): void; - disable(): void; - } { - return { - enable: (): void => { - this.enabled = true; - }, - disable: (): void => { - this.enabled = false; - }, - }; - } -} -export interface Service extends Interface {} -export const dropfiles = register(new Service()); diff --git a/application/client/src/app/ui/service/filters.ts b/application/client/src/app/ui/service/filters.ts deleted file mode 100644 index 309f3d19fe..0000000000 --- a/application/client/src/app/ui/service/filters.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { SetupService, Interface, Implementation, register } from '@platform/entity/service'; -import { ui } from '@register/services'; -import { Subject } from '@platform/env/subscription'; - -@SetupService(ui['filters']) -export class Service extends Implementation { - public readonly updated: Subject = new Subject(); - protected filters: string[] = []; - - public override destroy(): Promise { - this.updated.destroy(); - return Promise.resolve(); - } - - public add(uuid: string) { - !this.filters.includes(uuid) && this.filters.push(uuid); - this.updated.emit(); - } - - public remove(uuid: string) { - this.filters = this.filters.filter((f) => f !== uuid); - this.updated.emit(); - } - - public isEnabled(uuid: string): boolean { - return this.filters.length === 0 ? false : this.filters[this.filters.length - 1] === uuid; - } -} - -export interface Service extends Interface {} -export const filters = register(new Service()); diff --git a/application/client/src/app/ui/service/layout.ts b/application/client/src/app/ui/service/layout.ts deleted file mode 100644 index c3b999f999..0000000000 --- a/application/client/src/app/ui/service/layout.ts +++ /dev/null @@ -1,68 +0,0 @@ -import { SetupService, Interface, Implementation, register } from '@platform/entity/service'; -import { ui } from '@register/services'; -import { ilc, Emitter } from '@service/ilc'; - -@SetupService(ui['layout']) -export class Service extends Implementation { - private _emitter!: Emitter; - - public override ready(): Promise { - this._emitter = ilc.emitter(this.getName(), this.log()); - return Promise.resolve(); - } - - public sidebar(): { - min: () => void; - max: () => void; - } { - const emitter = this._emitter; - return { - min(): void { - emitter.ui.sidebar.min(); - }, - max(): void { - emitter.ui.sidebar.max(); - }, - }; - } - - public toolbar(): { - min: () => void; - max: () => void; - occupy: () => void; - state: ( - getter: (state: { - min: boolean; - max: boolean; - occupied: boolean; - size: number; - }) => void, - ) => void; - } { - const emitter = this._emitter; - return { - min(): void { - emitter.ui.toolbar.min(); - }, - max(): void { - emitter.ui.toolbar.max(); - }, - occupy(): void { - emitter.ui.toolbar.occupy(); - }, - state( - getter: (state: { - min: boolean; - max: boolean; - occupied: boolean; - size: number; - }) => void, - ): void { - emitter.ui.toolbar.state(getter); - }, - }; - } -} - -export interface Service extends Interface {} -export const layout = register(new Service()); diff --git a/application/client/src/app/ui/service/listener.ts b/application/client/src/app/ui/service/listener.ts deleted file mode 100644 index 00b6fe3adc..0000000000 --- a/application/client/src/app/ui/service/listener.ts +++ /dev/null @@ -1,44 +0,0 @@ -import { SetupService, Interface, Implementation, register } from '@platform/entity/service'; -import { ui } from '@register/services'; -import { IOptions } from './listener/options'; -import { Target, getTargetUuid, ITarget } from './listener/target'; -import { Subscription } from '@platform/env/subscription'; - -@SetupService(ui['listener']) -export class Service extends Implementation { - protected targets: Map = new Map(); - - public override ready(): Promise { - return Promise.resolve(); - } - - public override destroy(): Promise { - this.targets.forEach((target) => target.destroy()); - return Promise.resolve(); - } - - public listen( - event: string, - target: ITarget, - handler: (event: T) => boolean, - options?: IOptions, - ): Subscription { - const uuid = getTargetUuid(target); - let holder: Target | undefined = undefined; - if (uuid === undefined) { - holder = new Target(target); - this.targets.set(holder.uuid, holder); - } else { - holder = this.targets.get(uuid); - } - if (holder === undefined) { - throw new Error(`Fail to recognise target`); - } - if (event.trim() === '') { - throw new Error(`Event name isn't defined`); - } - return holder.listen(event, handler, options); - } -} -export interface Service extends Interface {} -export const listener = register(new Service()); diff --git a/application/client/src/app/ui/service/listener/handler.ts b/application/client/src/app/ui/service/listener/handler.ts deleted file mode 100644 index 1dc02ff9c2..0000000000 --- a/application/client/src/app/ui/service/listener/handler.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { IOptions } from './options'; -import { unique } from '@platform/env/sequence'; - -export class Handler { - public readonly priority: number = 1; - public readonly uuid: string = unique(); - protected handler: (event: T) => boolean; - - constructor(handler: (event: T) => boolean, options?: IOptions) { - options = options === undefined ? {} : options; - this.priority = options.priority !== undefined ? options.priority : this.priority; - this.handler = handler; - } - - public proccess(event: T): boolean { - return this.handler(event); - } -} diff --git a/application/client/src/app/ui/service/listener/options.ts b/application/client/src/app/ui/service/listener/options.ts deleted file mode 100644 index 7aaa96a424..0000000000 --- a/application/client/src/app/ui/service/listener/options.ts +++ /dev/null @@ -1,3 +0,0 @@ -export interface IOptions { - priority?: number; -} diff --git a/application/client/src/app/ui/service/listener/target.ts b/application/client/src/app/ui/service/listener/target.ts deleted file mode 100644 index 96b5db7320..0000000000 --- a/application/client/src/app/ui/service/listener/target.ts +++ /dev/null @@ -1,103 +0,0 @@ -import { unique } from '@platform/env/sequence'; -import { Handler } from './handler'; -import { Subscription } from '@platform/env/subscription'; -import { IOptions } from './options'; - -export interface ITarget { - addEventListener: (...args: any[]) => void; -} - -export class Target { - static KEY = '___GLOBAL_LISTENER_UUID_TARGET___'; - public readonly uuid: string = unique(); - - protected handlers: Map>> = new Map(); - protected signals: Map = new Map(); - protected target: ITarget; - - constructor(target: ITarget) { - this.target = target; - (this.target as any)[Target.KEY] = this.uuid; - } - - public destroy(): void { - this.handlers.clear(); - this.signals.forEach((controller) => controller.abort()); - this.signals.clear(); - } - - public equal(target: ITarget): boolean { - return (target as any)[Target.KEY] === this.uuid; - } - - public listen( - event: string, - handler: (event: T) => boolean, - options?: IOptions, - ): Subscription { - if (event.trim() === '') { - throw new Error(`Invalid event name`); - } - let handlers = this.handlers.get(event); - if (handlers === undefined) { - const control = new AbortController(); - this.target.addEventListener(event, this.process.bind(this, event), { - capture: true, - signal: control.signal, - }); - this.signals.set(event, control); - handlers = new Map(); - } - const instance = new Handler(handler, options); - const uuid = instance.uuid; - handlers.set(uuid, instance as Handler); - this.handlers.set(event, handlers); - return new Subscription(`event: ${uuid}`, () => { - const handlers = this.handlers.get(event); - if (handlers === undefined) { - return; - } - handlers.delete(uuid); - this.handlers.set(event, handlers); - if (handlers.size === 0) { - this.handlers.delete(event); - const signal = this.signals.get(event); - if (signal !== undefined) { - signal.abort(); - } - this.signals.delete(event); - } - }); - } - - protected process(name: string, event: unknown): boolean { - const handlers = this.handlers.get(name); - if (handlers === undefined) { - return true; - } - const sorted = Array.from(handlers.values()); - sorted.sort((a, b) => { - return a.priority > b.priority ? -1 : 1; - }); - let result = true; - sorted.forEach((handler) => { - if (!result) { - return; - } - result = handler.proccess(event); - }); - if (!result) { - const untyped = event as any; - ['preventDefault', 'stopImmediatePropagation', 'stopPropagation'].forEach( - (alias: string) => { - typeof untyped[alias] === 'function' && untyped[alias](); - }, - ); - } - return result; - } -} - -export function getTargetUuid(target: ITarget): string | undefined { - return (target as any)[Target.KEY]; -} diff --git a/application/client/src/app/ui/service/lockers.ts b/application/client/src/app/ui/service/lockers.ts deleted file mode 100644 index e2eaa4594d..0000000000 --- a/application/client/src/app/ui/service/lockers.ts +++ /dev/null @@ -1,99 +0,0 @@ -import { SetupService, Interface, Implementation, register } from '@platform/entity/service'; -import { ui } from '@register/services'; -import { popup, PopupOptions, Popup } from '@ui/service/popup'; -import { components } from '@env/decorators/initial'; -import { Locker } from './lokers/locker'; -import { Level } from './notification/index'; -import { Vertical, Horizontal } from '@ui/service/popup'; -import { Subject } from '@platform/env/subscription'; - -export { Locker, Level }; - -@SetupService(ui['lockers']) -export class Service extends Implementation { - public unbound: Subject = new Subject(); - - protected lockers: Map = new Map(); - - public override destroy(): Promise { - this.lockers.forEach((stored) => { - if (stored.popup !== undefined) { - stored.popup.close(); - } - }); - this.lockers.clear(); - this.unbound.destroy(); - return Promise.resolve(); - } - - public lock(locker: Locker, options: PopupOptions): { locker: Locker; popup: Popup } { - const created = { - locker, - popup: popup.open( - Object.assign(options, { - component: { - factory: components.get('app-dialogs-locker-message'), - inputs: { - locker, - }, - }, - position: { - vertical: Vertical.center, - horizontal: Horizontal.center, - }, - width: 350, - }), - ), - }; - this.action().add(created.locker, created.popup); - return created; - } - - public get(group: string): Locker[] { - return Array.from(this.lockers.values()) - .filter((s) => s.popup === undefined && s.locker.group === group) - .map((s) => s.locker); - } - - public progress(caption: string): () => void { - const { locker: _, popup } = lockers.lock( - new Locker(true, caption).set().type(Level.progress).end(), - { - closable: false, - }, - ); - return () => { - popup.close(); - }; - } - - protected action(): { - add(locker: Locker, popup: Popup): void; - unbound(group: string): void; - } { - return { - add: (locker: Locker, popup: Popup): void => { - this.lockers.set(locker.uuid, { locker, popup }); - const subscription = popup.subjects.get().closed.subscribe(() => { - subscription.destroy(); - this.action().unbound(locker.uuid); - }); - }, - unbound: (uuid: string): void => { - const stored = this.lockers.get(uuid); - if (stored === undefined) { - return; - } - if ([Level.error, Level.warning].includes(stored.locker.type)) { - stored.popup = undefined; - this.lockers.set(uuid, stored); - } else { - this.lockers.delete(uuid); - } - this.unbound.emit(stored.locker); - }, - }; - } -} -export interface Service extends Interface {} -export const lockers = register(new Service()); diff --git a/application/client/src/app/ui/service/lokers/locker.ts b/application/client/src/app/ui/service/lokers/locker.ts deleted file mode 100644 index ba12e06ec6..0000000000 --- a/application/client/src/app/ui/service/lokers/locker.ts +++ /dev/null @@ -1,77 +0,0 @@ -import { unique } from '@platform/env/sequence'; -import { Subject } from '@platform/env/subscription'; -import { Level } from '../notification/index'; - -export interface Button { - caption: string; - handler: () => void; -} -export interface Setter { - message(msg: string | undefined): Setter; - type(type: Level): Setter; - spinner(spinner: boolean): Setter; - group(uuid: string): Setter; - buttons(buttons: Button[]): Setter; - end(): Locker; -} -export class Locker { - public updated: Subject = new Subject(); - public message: string | undefined; - public buttons: Button[] = []; - public type: Level = Level.info; - public spinner: boolean = true; - public group: string = unique(); - public uuid: string = unique(); - public created: number = Date.now(); - - constructor(spinner: boolean, message: string | undefined) { - this.message = message; - this.spinner = spinner; - } - - public getLevel(): Level { - return this.type; - } - - public getGroup(): string { - return this.group; - } - - public getTime(): string { - return new Date(this.created).toLocaleTimeString(); - } - - public set(): Setter { - const setter = { - message: (msg: string | undefined): Setter => { - this.message = msg; - this.updated.emit(); - return setter; - }, - type: (type: Level): Setter => { - this.type = type; - this.updated.emit(); - return setter; - }, - spinner: (spinner: boolean): Setter => { - this.spinner = spinner; - this.updated.emit(); - return setter; - }, - group: (uuid: string): Setter => { - this.group = uuid; - this.updated.emit(); - return setter; - }, - buttons: (buttons: Button[]): Setter => { - this.buttons = buttons; - this.updated.emit(); - return setter; - }, - end: (): Locker => { - return this; - }, - }; - return setter; - } -} diff --git a/application/client/src/app/ui/service/notification/index.ts b/application/client/src/app/ui/service/notification/index.ts deleted file mode 100644 index 2ae160ea6d..0000000000 --- a/application/client/src/app/ui/service/notification/index.ts +++ /dev/null @@ -1,7 +0,0 @@ -export enum Level { - info = 'info', - error = 'error', - warning = 'warning', - accent = 'accent', - progress = 'progress', -} diff --git a/application/client/src/app/ui/service/notification/notification.ts b/application/client/src/app/ui/service/notification/notification.ts deleted file mode 100644 index 95e21be682..0000000000 --- a/application/client/src/app/ui/service/notification/notification.ts +++ /dev/null @@ -1,41 +0,0 @@ -import { unique } from '@platform/env/sequence'; -import { Action } from '@platform/types/notification/index'; - -import * as Events from '@platform/ipc/event'; - -export interface INotification { - message: string; - session?: string; - pinned?: boolean; - actions: Action[]; -} - -export class Notification { - static from(event: Events.Notification.Pop.Event): Notification { - return new Notification({ - message: event.message, - actions: event.actions, - session: event.session, - pinned: true, - }); - } - - public readonly notification: INotification; - public readonly uuid: string = unique(); - - constructor(notification: INotification) { - this.notification = notification; - } - - public actions(): Action[] { - return this.notification.actions; - } - - public message(): string { - return this.notification.message; - } - - public duration(): number | undefined { - return this.notification.pinned === true ? undefined : 3000; - } -} diff --git a/application/client/src/app/ui/service/notifications.ts b/application/client/src/app/ui/service/notifications.ts deleted file mode 100644 index e72fc36078..0000000000 --- a/application/client/src/app/ui/service/notifications.ts +++ /dev/null @@ -1,51 +0,0 @@ -import { SetupService, Interface, Implementation, register } from '@platform/entity/service'; -import { ui } from '@register/services'; -import { Notification } from './notification/notification'; -import { Subject, Subjects } from '@platform/env/subscription'; -import { Level } from './notification/index'; - -import * as Events from '@platform/ipc/event'; - -export { Level, Notification }; - -@SetupService(ui['notifications']) -export class Service extends Implementation { - public subjects: Subjects<{ - pop: Subject; - store: Subject; - }> = new Subjects({ - pop: new Subject(), - store: new Subject(), - }); - - protected messages: Map = new Map(); - - public override ready(): Promise { - Events.IpcEvent.subscribe( - Events.Notification.Pop.Event, - (event: Events.Notification.Pop.Event) => { - const notification = Notification.from(event); - this.messages.set(notification.uuid, notification); - this.subjects.get().pop.emit(notification); - }, - ); - return Promise.resolve(); - } - - public notify(notification: Notification): Service { - this.store(notification).subjects.get().pop.emit(notification); - return this; - } - - public store(notification: Notification): Service { - this.messages.set(notification.uuid, notification); - this.subjects.get().store.emit(notification); - return this; - } - - public clear() { - console.log(`... not implemented`); - } -} -export interface Service extends Interface {} -export const notifications = register(new Service()); diff --git a/application/client/src/app/ui/service/popup.ts b/application/client/src/app/ui/service/popup.ts deleted file mode 100644 index a342ae0f6a..0000000000 --- a/application/client/src/app/ui/service/popup.ts +++ /dev/null @@ -1,44 +0,0 @@ -import { SetupService, Interface, Implementation, register } from '@platform/entity/service'; -import { ui } from '@register/services'; -import { ilc, Emitter } from '@service/ilc'; -import { IComponentDesc } from '@elements/containers/dynamic/component'; -import { Popup, Options, PopupOptions, Vertical, Horizontal } from './popup/popup'; - -export { IComponentDesc, Popup, Vertical, Horizontal, PopupOptions, Options }; - -@SetupService(ui['popup']) -export class Service extends Implementation { - private _emitter!: Emitter; - private _count: number = 0; - private _blured: boolean = true; - - public override ready(): Promise { - this._emitter = ilc.emitter(this.getName(), this.log()); - return Promise.resolve(); - } - - public open(options: Options): Popup { - const popup = new Popup(options, this.close.bind(this)); - this._blured = popup.isBlured(); - this._emitter.ui.popup.open(popup); - return popup; - } - - public close(uuid: string): void { - this._emitter.ui.popup.close(uuid); - } - - public setCount(count: number) { - this._count = count; - } - - public getCount(): number { - return this._count; - } - - public isBlured(): boolean { - return this._blured; - } -} -export interface Service extends Interface {} -export const popup = register(new Service()); diff --git a/application/client/src/app/ui/service/popup/popup.ts b/application/client/src/app/ui/service/popup/popup.ts deleted file mode 100644 index 1a34b84c22..0000000000 --- a/application/client/src/app/ui/service/popup/popup.ts +++ /dev/null @@ -1,68 +0,0 @@ -import { unique } from '@platform/env/sequence'; -import { Subjects, Subject } from '@platform/env/subscription'; -import { IComponentDesc } from '@elements/containers/dynamic/component'; - -export enum Vertical { - top = 'top', - center = 'center', - bottom = 'bottom', -} - -export enum Horizontal { - left = 'left', - right = 'right', - center = 'center', -} - -export interface Position { - vertical: Vertical; - horizontal: Horizontal; -} - -export interface PopupOptions { - closable?: boolean; - width?: number; - position?: Position; - closeOnKey?: string; - closeOnBGClick?: boolean; - uuid?: string; - blur?: boolean; -} - -export interface Options extends PopupOptions { - component: IComponentDesc; -} - -export class Popup { - public subjects: Subjects<{ - opened: Subject; - closed: Subject; - }> = new Subjects({ - opened: new Subject(), - closed: new Subject(), - }); - - public options: Options; - public readonly uuid: string; - - protected readonly closer: (uuid: string) => void; - - constructor(options: Options, closer: (uuid: string) => void) { - this.uuid = options.uuid === undefined ? unique() : options.uuid; - this.options = options; - this.closer = closer; - } - - public destroy() { - this.close(); - this.subjects.destroy(); - } - - public close(): void { - this.closer(this.uuid); - } - - public isBlured(): boolean { - return this.options.blur === undefined ? true : this.options.blur; - } -} diff --git a/application/client/src/app/ui/service/sidebar.ts b/application/client/src/app/ui/service/sidebar.ts deleted file mode 100644 index 53c7aa4515..0000000000 --- a/application/client/src/app/ui/service/sidebar.ts +++ /dev/null @@ -1,183 +0,0 @@ -import { SetupService, Interface, Implementation, register } from '@platform/entity/service'; -import { ui } from '@register/services'; -import { ilc, Emitter, Channel, Declarations, Services } from '@service/ilc'; - -import { TabsService, ITab } from '@elements/tabs/service'; -import { UUIDs } from './sidebar/register'; -import { Tabs } from './sidebar/tabs'; - -@SetupService(ui['sidebar']) -export class Service extends Implementation { - private _emitter!: Emitter; - private _channel!: Channel; - private _services!: Services; - private _available!: Tabs; - private _active: string | undefined; - private _sessions: Map = new Map(); - - public override ready(): Promise { - this._emitter = ilc.emitter(this.getName(), this.log()); - this._channel = ilc.channel(this.getName(), this.log()); - this._services = ilc.services(this.getName(), this.log()); - this._channel.session.change(this._onSessionChange.bind(this)); - this._channel.session.closed(this._onSessionClosed.bind(this)); - this._channel.ui.sidebar.view(this._onViewChange.bind(this)); - this._available = new Tabs(); - return Promise.resolve(); - } - - public override destroy(): Promise { - this._sessions.forEach((serivce: TabsService) => { - serivce.clear(); - }); - this._sessions.clear(); - return Promise.resolve(); - } - - public add(tabs: ITab[] | ITab) { - if (this._active === undefined) { - return; - } - const service: TabsService | undefined = this._sessions.get(this._active); - if (service === undefined) { - return; - } - tabs = tabs instanceof Array ? tabs : [tabs]; - // Add tabs - tabs.forEach((tab: ITab) => { - if (tab.uuid === undefined) { - return; - } - const uuid = tab.uuid; - if (!service.has(tab.uuid)) { - const tab: ITab | undefined = this._available.get(uuid); - if (tab === undefined) { - return; - } - service.add(tab); - } - }); - } - - public addByGuid(uuid: string) { - if (this._active === undefined) { - return; - } - const tab: ITab | undefined = this._available.get(uuid); - const service: TabsService | undefined = this._sessions.get(this._active); - if (service === undefined || tab === undefined) { - return; - } - if (tab.uuid === undefined) { - return; - } - if (service.has(tab.uuid)) { - return; - } - service.add(tab); - } - - public remove(uuid: string) { - if (this._active === undefined) { - return; - } - const service: TabsService | undefined = this._sessions.get(this._active); - if (service === undefined) { - return; - } - service.remove(uuid); - return; - } - - public has(tab: string): boolean { - if (this._active === undefined) { - return false; - } - const service: TabsService | undefined = this._sessions.get(this._active); - if (service === undefined) { - return false; - } - return service.has(tab); - } - - public setActive(uuid: string, openTabOnly: boolean = false): Promise { - return new Promise((resolve, reject) => { - if (this._active === undefined) { - return reject(new Error(this.log().warn(`Session uuid isn't defined`))); - } - const service: TabsService | undefined = this._sessions.get(this._active); - if (service === undefined) { - return reject(new Error(this.log().warn(`Fail to find tab's service`))); - } - const tab = service.getActiveTab(); - if (!service.has(uuid)) { - const tab: ITab | undefined = this._available.get(uuid); - if (tab === undefined) { - return reject( - new Error(this.log().warn(`Fail to find tab "${uuid}". Tab isn't added.`)), - ); - } - service.add(tab); - } - if (openTabOnly === true) { - if (tab !== undefined) { - service.setActive(tab.uuid); - } - } else { - service.setActive(uuid); - } - resolve(); - }); - } - - private _onSessionChange(uuid: string | undefined) { - if (uuid === undefined) { - return; - } - if (this._sessions.has(uuid)) { - // Service already exists - return; - } - const service: TabsService = new TabsService(); - this._available.defaults().forEach((tab: ITab) => { - service.add(tab); - }); - this._sessions.set(uuid, service); - this._active = uuid; - } - - private _onSessionClosed(uuid: string) { - const service: TabsService | undefined = this._sessions.get(uuid); - if (service !== undefined) { - service.destroy(); - } - this._sessions.delete(uuid); - } - - private _onViewChange(target: Declarations.AvailableSidebarTabs) { - this._services.ui.layout.sidebar().max(); - switch (target) { - case Declarations.AvailableSidebarTabs.SearchManager: - this.setActive(UUIDs.search); - break; - case Declarations.AvailableSidebarTabs.CommentsManager: - this.setActive(UUIDs.comments); - break; - case Declarations.AvailableSidebarTabs.Shell: - this.setActive(UUIDs.shell); - break; - case Declarations.AvailableSidebarTabs.DLTConnector: - this.setActive(UUIDs.dltdeamon); - break; - case Declarations.AvailableSidebarTabs.Concat: - this.setActive(UUIDs.concat); - break; - case Declarations.AvailableSidebarTabs.Merge: - this.setActive(UUIDs.merging); - break; - } - } -} - -export interface Service extends Interface {} -export const sidebar = register(new Service()); diff --git a/application/client/src/app/ui/service/sidebar/register.ts b/application/client/src/app/ui/service/sidebar/register.ts deleted file mode 100644 index cd657faa62..0000000000 --- a/application/client/src/app/ui/service/sidebar/register.ts +++ /dev/null @@ -1,121 +0,0 @@ -import { ITab } from '@elements/tabs/service'; -// import { SidebarAppSearchManagerComponent } from '@sidebar/search.manager/component'; -// import { SidebarAppCommentsComponent } from '@sidebar/comments/component'; -// import { SidebarAppMergeFilesComponent } from '@sidebar/merge/component'; -// import { SidebarAppConcatFilesComponent } from '@sidebar/concat/component'; -// import { SidebarAppDLTConnectorComponent } from '@sidebar/dlt.connector/component'; -// import { SidebarAppShellComponent } from '@sidebar/shell/component'; -// import { SidebarAppAdbComponent } from '@sidebar/adb/component'; - -export enum Available { - SearchManager = 'SearchManager', - CommentsManager = 'CommentsManager', - DLTConnector = 'DLTConnector', - Shell = 'Shell', - Concat = 'Concat', - Merge = 'Merge', -} - -export const UUIDs = { - search: 'search', - merging: 'merging', - concat: 'concat', - dltdeamon: 'dltdeamon', - comments: 'comments', - shell: 'shell', - adb: 'adb', -}; - -export interface IDefault extends ITab { - default: boolean; -} - -export const DEFAULTS: IDefault[] = [ - // { - // uuid: UUIDs.search, - // name: 'Search', - // content: { - // factory: SidebarAppSearchManagerComponent, - // inputs: {}, - // }, - // closable: false, - // active: true, - // default: true, - // }, - // { - // uuid: UUIDs.comments, - // name: 'Comments', - // content: { - // factory: SidebarAppCommentsComponent, - // inputs: {}, - // }, - // closable: true, - // active: true, - // default: true, - // }, - // { - // addedAsDefault: false, - // tab: { - // uuid: UUIDs.merging, - // name: 'Merging', - // content: { - // factory: SidebarAppMergeFilesComponent, - // inputs: {}, - // }, - // closable: true, - // active: true, - // }, - // }, - // { - // addedAsDefault: false, - // tab: { - // uuid: UUIDs.concat, - // name: 'Concat', - // content: { - // factory: SidebarAppConcatFilesComponent, - // inputs: {}, - // }, - // closable: true, - // active: true, - // }, - // }, - // { - // addedAsDefault: false, - // tab: { - // uuid: UUIDs.dltdeamon, - // name: 'DLT Deamon', - // content: { - // factory: SidebarAppDLTConnectorComponent, - // inputs: {}, - // }, - // closable: true, - // active: true, - // }, - // }, - // { - // addedAsDefault: false, - // tab: { - // uuid: UUIDs.shell, - // name: 'Shell', - // content: { - // factory: SidebarAppShellComponent, - // inputs: {}, - // }, - // closable: true, - // active: true, - // }, - // }, - // { - // addedAsDefault: false, - // tab: { - // uuid: UUIDs.adb, - // name: 'Adb', - // content: { - // factory: SidebarAppAdbComponent, - // inputs: {}, - // }, - // closable: true, - // active: true, - // }, - // }, -]; diff --git a/application/client/src/app/ui/service/sidebar/tabs.ts b/application/client/src/app/ui/service/sidebar/tabs.ts deleted file mode 100644 index 77af319430..0000000000 --- a/application/client/src/app/ui/service/sidebar/tabs.ts +++ /dev/null @@ -1,46 +0,0 @@ -import { ITab } from '@elements/tabs/service'; -import { DEFAULTS } from './register'; - -export class Tabs { - private _available: Array = []; - - constructor() { - this._available = DEFAULTS.map((defaultView) => { - return { - uuid: defaultView.uuid, - name: defaultView.name, - active: false, - closable: defaultView.closable, - content: defaultView.content, - default: defaultView.default, - }; - }); - } - - public all(): ITab[] { - return this._available; - } - - public defaults(): ITab[] { - return this._available.filter((tab) => tab.default); - } - - public get(uuid: string): ITab | undefined { - return this._available.find((tab: ITab) => { - return tab.uuid === uuid; - }); - } - - public visible(uuid: string): boolean { - let result: boolean = false; - DEFAULTS.forEach((defaultView) => { - if (result) { - return; - } - if (defaultView.default === true && defaultView.uuid === uuid) { - result = true; - } - }); - return result; - } -} diff --git a/application/client/src/app/ui/service/styles.ts b/application/client/src/app/ui/service/styles.ts deleted file mode 100644 index bedae85e61..0000000000 --- a/application/client/src/app/ui/service/styles.ts +++ /dev/null @@ -1,139 +0,0 @@ -import { SetupService, Interface, Implementation, register } from '@platform/entity/service'; -import { ui } from '@register/services'; -import { bridge } from '@service/bridge'; -import { ilc } from '@service/ilc'; - -export type RemoveHandler = () => void; - -const COLOR_THEME_KEY = 'color_theme_settings'; - -type Theme = 'dark-theme' | 'light-theme'; - -@SetupService(ui['styles']) -export class Service extends Implementation { - protected _sheet!: CSSStyleSheet; - protected _theme: Theme = 'dark-theme'; - - public override init(): Promise { - const style = document.createElement('style') as HTMLStyleElement; - document.head.appendChild(style); - if (style.sheet === null) { - return Promise.reject(new Error(`Fail to create global style sheet`)); - } - this._sheet = style.sheet; - ilc.channel(this.getName(), this.log()).system.ready(() => { - this.theme().load(); - }); - - return Promise.resolve(); - } - - public add(rule: string): RemoveHandler { - const index = this._sheet.insertRule(rule); - return () => { - this._sheet.deleteRule(index); - }; - } - - public theme(): { - dark(): void; - light(): void; - load(): void; - save(): void; - apply(): void; - } { - return { - dark: (): void => { - this._theme = 'dark-theme'; - this.theme().apply(); - }, - light: (): void => { - this._theme = 'light-theme'; - this.theme().apply(); - }, - load: (): void => { - bridge - .storage(COLOR_THEME_KEY) - .read() - .then((theme: string) => { - if (theme !== 'dark-theme' && theme !== 'light-theme') { - this._theme = 'dark-theme'; - this.theme().save(); - } else { - this._theme = theme; - } - this.theme().apply(); - }) - .catch((err: Error) => { - this.log().error(`Fail to load theme: ${err.message}`); - this.theme().save(); - }); - }, - save: (): void => { - bridge - .storage(COLOR_THEME_KEY) - .write(this._theme) - .catch((err: Error) => { - this.log().error(`Fail to save theme: ${err.message}`); - }); - }, - apply: () => { - if (this._theme !== 'dark-theme' && this._theme !== 'light-theme') { - this._theme = 'dark-theme'; - } - document.body.className = this._theme; - this.theme().save(); - }, - }; - } - - public colors(): { - scheme_color_0: string; - scheme_color_1: string; - scheme_color_2: string; - scheme_color_3: string; - scheme_color_4: string; - scheme_color_5: string; - scheme_color_6: string; - scheme_color_error: string; - scheme_color_accent: string; - scheme_color_warning: string; - scheme_color_match: string; - scheme_search_match: string; - } { - if (this._theme === 'dark-theme') { - return { - scheme_color_0: '#FFFFFF', - scheme_color_1: '#eaeaea', - scheme_color_2: '#c0c0c0', - scheme_color_3: '#979797', - scheme_color_4: '#555555', - scheme_color_5: '#333333', - scheme_color_6: '#111111', - scheme_color_error: 'rgb(253, 21, 21)', - scheme_color_accent: '#74b9ff', - scheme_color_warning: '#fffd71', - scheme_color_match: '#e4e15b', - scheme_search_match: '#AA0000', - }; - } else { - return { - scheme_color_0: '#000000', - scheme_color_1: '#151515', - scheme_color_2: '#3f3f3f', - scheme_color_3: '#686868', - scheme_color_4: '#aaaaaa', - scheme_color_5: '#efefef', - scheme_color_6: '#fafafa', - scheme_color_error: 'rgb(253, 21, 21)', - scheme_color_accent: '#74b9ff', - scheme_color_warning: '#fffd71', - scheme_color_match: '#e4e15b', - scheme_search_match: '#AA0000', - }; - } - } -} - -export interface Service extends Interface {} -export const styles = register(new Service()); diff --git a/application/client/src/app/ui/service/toolbar.ts b/application/client/src/app/ui/service/toolbar.ts deleted file mode 100644 index fb980a0e8a..0000000000 --- a/application/client/src/app/ui/service/toolbar.ts +++ /dev/null @@ -1,205 +0,0 @@ -import { SetupService, Interface, Implementation, register } from '@platform/entity/service'; -import { ui } from '@register/services'; -import { ilc, Emitter, Channel, Declarations, Services } from '@service/ilc'; -import { IComponentDesc } from '@elements/containers/dynamic/component'; -import { unique } from '@platform/env/sequence'; - -import { TabsService, ITab } from '@elements/tabs/service'; -import { UUIDs } from './toolbar/register'; -import { Tabs } from './toolbar/tabs'; - -@SetupService(ui['toolbar']) -export class Service extends Implementation { - private _emitter!: Emitter; - private _channel!: Channel; - private _services!: Services; - private _available!: Tabs; - private _active: string | undefined; - private _sessions: Map = new Map(); - - public override ready(): Promise { - this._emitter = ilc.emitter(this.getName(), this.log()); - this._channel = ilc.channel(this.getName(), this.log()); - this._services = ilc.services(this.getName(), this.log()); - this._channel.ux.hotkey(this._onHotKey.bind(this)); - this._channel.session.change(this._onSessionChange.bind(this)); - this._channel.session.closed(this._onSessionClosed.bind(this)); - this._channel.ui.toolbar.view(this._onViewChange.bind(this)); - this._available = new Tabs(); - return Promise.resolve(); - } - - public override destroy(): Promise { - this._sessions.forEach((serivce: TabsService) => { - serivce.clear(); - }); - this._sessions.clear(); - return Promise.resolve(); - } - - public add(name: string, content: IComponentDesc, uuid?: string): string | undefined { - if (this._active === undefined) { - return undefined; - } - const service: TabsService | undefined = this._sessions.get(this._active); - if (service === undefined) { - return undefined; - } - uuid = typeof uuid !== 'string' ? unique() : uuid; - if (!service.has(uuid)) { - service.add({ - uuid: uuid, - name, - active: true, - content, - }); - } - this._sessions.set(this._active, service); - return uuid; - } - - public addByGuid(uuid: string): void { - if (this._active === undefined) { - return undefined; - } - const tab: ITab | undefined = this._available.get(uuid); - const service: TabsService | undefined = this._sessions.get(this._active); - if (service === undefined || tab === undefined) { - return undefined; - } - service.add(tab); - } - - public remove(uuid: string): void { - if (this._active === undefined) { - return undefined; - } - const service: TabsService | undefined = this._sessions.get(this._active); - if (service === undefined) { - return undefined; - } - service.remove(uuid); - this._sessions.set(this._active, service); - } - - public has(uuid: string): boolean { - if (this._active === undefined) { - return false; - } - const service: TabsService | undefined = this._sessions.get(this._active); - if (service === undefined) { - return false; - } - return service.has(uuid); - } - - public setActive(uuid: string, openTabOnly: boolean = false): Promise { - return new Promise((resolve, reject) => { - if (this._active === undefined) { - return reject(new Error(this.log().warn(`Session uuid isn't defined`))); - } - const service: TabsService | undefined = this._sessions.get(this._active); - if (service === undefined) { - return reject(new Error(this.log().warn(`Fail to find tab's service`))); - } - const tab = service.getActiveTab(); - if (!service.has(uuid)) { - const tab: ITab | undefined = this._available.get(uuid); - if (tab === undefined) { - return reject( - new Error(this.log().warn(`Fail to find tab "${uuid}". Tab isn't added.`)), - ); - } - service.add(tab); - } - if (openTabOnly === true) { - if (tab !== undefined) { - service.setActive(tab.uuid); - } - } else { - service.setActive(uuid); - } - resolve(); - }); - } - - public getInactiveTabs(session?: string): ITab[] | undefined { - session = session === undefined ? this._active : session; - if (session === undefined) { - return undefined; - } - const service: TabsService | undefined = this._sessions.get(session); - if (service === undefined) { - return undefined; - } - return this._available.all().filter((tab: ITab) => { - return tab.uuid === undefined ? false : !service.has(tab.uuid); - }); - } - - private _onHotKey(event: Declarations.HotkeyEvent) { - console.log(`Not implemented: ${event}`); - // if (this._active === undefined) { - // return; - // } - // const service: TabsService | undefined = this._sessions.get(this._active); - // if (service === undefined) { - // return; - // } - // LayoutStateService.toolbarMax(); - // service.setActive(UUIDs.search); - } - - private _onSessionClosed(session: string) { - const service: TabsService | undefined = this._sessions.get(session); - if (service === undefined) { - return; - } - service.destroy(); - this._sessions.delete(session); - if (this._active === session) { - this._active = undefined; - } - } - - private _onSessionChange(uuid: string | undefined) { - if (uuid === undefined) { - return; - } - let service: TabsService | undefined = this._sessions.get(uuid); - if (service === undefined) { - service = new TabsService({ uuid: `toolbar: ${uuid}` }); - this._available.all().map((tab: ITab) => { - if (tab.uuid !== undefined && !this._available.visible(tab.uuid)) { - return; - } - service !== undefined && service.unshift(tab); - }); - this._sessions.set(uuid, service); - } - this._active = uuid; - } - - private _onViewChange(target: Declarations.AvailableToolbarTabs) { - if (this._active === undefined) { - return; - } - this._services.ui.layout.toolbar().max(); - switch (target) { - case Declarations.AvailableToolbarTabs.Search: - this.addByGuid(UUIDs.search); - break; - case Declarations.AvailableToolbarTabs.Charts: - this.addByGuid(UUIDs.charts); - break; - case Declarations.AvailableToolbarTabs.TimeMeasurement: - this.addByGuid(UUIDs.timemeasurement); - break; - case Declarations.AvailableToolbarTabs.Notifications: - this.addByGuid(UUIDs.notification); - break; - } - } -} -export interface Service extends Interface {} -export const toolbar = register(new Service()); diff --git a/application/client/src/app/ui/service/toolbar/register.ts b/application/client/src/app/ui/service/toolbar/register.ts deleted file mode 100644 index f6a7cea668..0000000000 --- a/application/client/src/app/ui/service/toolbar/register.ts +++ /dev/null @@ -1,64 +0,0 @@ -import { unique } from '@platform/env/sequence'; -// import { ViewSearchComponent } from '@views/search/component'; -// import { SidebarAppNotificationsComponent } from '@views/notifications/component'; -// import { SidebarAppNotificationsCounterComponent } from '@views/notifications/counter/component'; -// import { ViewChartComponent } from '@views/chart/component'; - -export enum Available { - Search = 'Search', - Charts = 'Charts', - TimeMeasurement = 'TimeMeasurement', - Notifications = 'Notifications', - Details = 'Details', -} - -export const UUIDs = { - search: unique(), - charts: unique(), - notification: unique(), - timemeasurement: unique(), - details: unique(), -}; - -export interface IView { - name: string; - uuid: string; - factory: any; - tabCaptionInjection?: any; - inputs: { [key: string]: any }; - default?: boolean; - closable: boolean; -} - -export const DEFAULTS: IView[] = [ - // { - // name: 'Time Measurement', - // uuid: UUIDs.timemeasurement, - // factory: ViewMeasurementComponent, - // inputs: {}, - // closable: true, - // }, - // { - // name: 'Charts', - // uuid: UUIDs.charts, - // factory: ViewChartComponent, - // inputs: {}, - // closable: true, - // }, - // { - // name: 'Notifications', - // uuid: UUIDs.notification, - // factory: SidebarAppNotificationsComponent, - // tabCaptionInjection: SidebarAppNotificationsCounterComponent, - // inputs: {}, - // closable: true, - // }, - // { - // name: 'Search', - // uuid: UUIDs.search, - // factory: ViewSearchComponent, - // inputs: {}, - // default: true, - // closable: false, - // }, -]; diff --git a/application/client/src/app/ui/service/toolbar/tabs.ts b/application/client/src/app/ui/service/toolbar/tabs.ts deleted file mode 100644 index d1cfc43958..0000000000 --- a/application/client/src/app/ui/service/toolbar/tabs.ts +++ /dev/null @@ -1,52 +0,0 @@ -import { ITab } from '@elements/tabs/service'; -import { DEFAULTS } from './register'; - -export class Tabs { - private _available: ITab[] = []; - private _inputs: { [key: string]: any } = {}; - - constructor() { - this._available = DEFAULTS.map((defaultView) => { - return { - uuid: defaultView.uuid, - name: defaultView.name, - active: false, - tabCaptionInjection: - defaultView.tabCaptionInjection === undefined - ? undefined - : { - factory: defaultView.tabCaptionInjection, - inputs: Object.assign(defaultView.inputs, this._inputs), - }, - closable: defaultView.closable, - content: { - factory: defaultView.factory, - inputs: Object.assign(defaultView.inputs, this._inputs), - }, - }; - }); - } - - public all(): ITab[] { - return this._available; - } - - public get(uuid: string): ITab | undefined { - return this._available.find((tab: ITab) => { - return tab.uuid === uuid; - }); - } - - public visible(uuid: string): boolean { - let result: boolean = false; - DEFAULTS.forEach((defaultView) => { - if (result) { - return; - } - if (defaultView.default === true && defaultView.uuid === uuid) { - result = true; - } - }); - return result; - } -} diff --git a/application/client/src/app/ui/styles/borders.less b/application/client/src/app/ui/styles/borders.less deleted file mode 100644 index 55f5c435c4..0000000000 --- a/application/client/src/app/ui/styles/borders.less +++ /dev/null @@ -1,27 +0,0 @@ - -@import './variables.less'; - -.border-based-1{ - box-sizing: border-box; - border: var(--scheme-color-1) outset thin; -} - -.border-based-2{ - box-sizing: border-box; - border: var(--scheme-color-2) outset thin; -} - -.border-based-3{ - box-sizing: border-box; - border: var(--scheme-color-3) outset thin; -} - -.border-based-4{ - box-sizing: border-box; - border: var(--scheme-color-4) outset thin; -} - -.border-based-5{ - box-sizing: border-box; - border: var(--scheme-color-5) outset thin; -} \ No newline at end of file diff --git a/application/client/src/app/ui/styles/buttons.less b/application/client/src/app/ui/styles/buttons.less deleted file mode 100644 index ea2cbc105c..0000000000 --- a/application/client/src/app/ui/styles/buttons.less +++ /dev/null @@ -1,87 +0,0 @@ -@import './variables.less'; - -button.major-button { - background-color: var(--scheme-color-active); -} - -button.flat-codicon-button { - position: relative; - display: flex; - align-items: center; - border: none; - padding: 0 6px; - white-space: nowrap; - background: none; - color: var(--scheme-color-1); - height: 24px; - outline: none; - &:hover { - background: var(--scheme-color-4); - } - & span { - padding-right: 6px; - } -} - -& span.small-link-button { - display: inline-block; - font-size: 12px; - cursor: pointer; - color: var(--scheme-color-2); - border-bottom: dashed thin var(--scheme-color-4); - padding: 2px; - &:hover { - color: var(--scheme-color-1); - border-bottom: dashed thin var(--scheme-color-2); - } -} - -& span.small-icon-button { - display: inline-block; - height: 24px; - width: 24px; - color: var(--scheme-color-1); - text-align: center; - padding-top: 4px; - box-sizing: border-box; - margin: 0px 0px 0px 0px; - border-radius: 3px; - transition: transform 350ms ease-in-out; - &.no-right-marging { - margin-right: 0px; - } - &:hover{ - color: var(--scheme-color-3); - } - &.disabled { - color: var(--scheme-color-3); - &:hover{ - color: var(--scheme-color-3); - } - } - &.with-background { - &:hover{ - background-color: var(--scheme-color-4); - color: var(--scheme-color-0); - } - &.disabled { - color: var(--scheme-color-3); - &:hover{ - color: var(--scheme-color-3); - background: none; - } - &.active { - background: none; - &:hover{ - background: none; - } - } - } - &.active { - background-color: var(--scheme-color-active); - &:hover{ - background-color: var(--scheme-color-active); - } - } - } -} \ No newline at end of file diff --git a/application/client/src/app/ui/styles/codicons/codicon.less b/application/client/src/app/ui/styles/codicons/codicon.less deleted file mode 100644 index 8466f27b9c..0000000000 --- a/application/client/src/app/ui/styles/codicons/codicon.less +++ /dev/null @@ -1,582 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - - @font-face { - font-family: "codicon"; - font-display: block; - src: url("./codicon.ttf?2ab61cbaefbdf4c7c5589068100bee0c") format("truetype"); -} - -.codicon[class*='codicon-'] { - font: normal normal normal 16px/1 codicon; - display: inline-block; - text-decoration: none; - text-rendering: auto; - text-align: center; - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; - user-select: none; - -webkit-user-select: none; - -ms-user-select: none; -} - -/*--------------------- - * Modifiers - *-------------------*/ - -@keyframes codicon-spin { - 100% { - transform:rotate(360deg); - } -} - -.codicon-sync.codicon-modifier-spin, -.codicon-loading.codicon-modifier-spin, -.codicon-gear.codicon-modifier-spin { - /* Use steps to throttle FPS to reduce CPU usage */ - animation: codicon-spin 1.5s steps(30) infinite; -} - -.codicon-modifier-disabled { - opacity: 0.5; -} - -.codicon-modifier-hidden { - opacity: 0; -} - -/* custom speed & easing for loading icon */ -.codicon-loading { - animation-duration: 1s !important; - animation-timing-function: cubic-bezier(0.53, 0.21, 0.29, 0.67) !important; -} - -/*--------------------- - * Icons - *-------------------*/ - -.codicon-add:before { content: "\ea60" } -.codicon-plus:before { content: "\ea60" } -.codicon-gist-new:before { content: "\ea60" } -.codicon-repo-create:before { content: "\ea60" } -.codicon-lightbulb:before { content: "\ea61" } -.codicon-light-bulb:before { content: "\ea61" } -.codicon-repo:before { content: "\ea62" } -.codicon-repo-delete:before { content: "\ea62" } -.codicon-gist-fork:before { content: "\ea63" } -.codicon-repo-forked:before { content: "\ea63" } -.codicon-git-pull-request:before { content: "\ea64" } -.codicon-git-pull-request-abandoned:before { content: "\ea64" } -.codicon-record-keys:before { content: "\ea65" } -.codicon-keyboard:before { content: "\ea65" } -.codicon-tag:before { content: "\ea66" } -.codicon-tag-add:before { content: "\ea66" } -.codicon-tag-remove:before { content: "\ea66" } -.codicon-person:before { content: "\ea67" } -.codicon-person-follow:before { content: "\ea67" } -.codicon-person-outline:before { content: "\ea67" } -.codicon-person-filled:before { content: "\ea67" } -.codicon-git-branch:before { content: "\ea68" } -.codicon-git-branch-create:before { content: "\ea68" } -.codicon-git-branch-delete:before { content: "\ea68" } -.codicon-source-control:before { content: "\ea68" } -.codicon-mirror:before { content: "\ea69" } -.codicon-mirror-public:before { content: "\ea69" } -.codicon-star:before { content: "\ea6a" } -.codicon-star-add:before { content: "\ea6a" } -.codicon-star-delete:before { content: "\ea6a" } -.codicon-star-empty:before { content: "\ea6a" } -.codicon-comment:before { content: "\ea6b" } -.codicon-comment-add:before { content: "\ea6b" } -.codicon-alert:before { content: "\ea6c" } -.codicon-warning:before { content: "\ea6c" } -.codicon-search:before { content: "\ea6d" } -.codicon-search-save:before { content: "\ea6d" } -.codicon-log-out:before { content: "\ea6e" } -.codicon-sign-out:before { content: "\ea6e" } -.codicon-log-in:before { content: "\ea6f" } -.codicon-sign-in:before { content: "\ea6f" } -.codicon-eye:before { content: "\ea70" } -.codicon-eye-unwatch:before { content: "\ea70" } -.codicon-eye-watch:before { content: "\ea70" } -.codicon-circle-filled:before { content: "\ea71" } -.codicon-primitive-dot:before { content: "\ea71" } -.codicon-close-dirty:before { content: "\ea71" } -.codicon-debug-breakpoint:before { content: "\ea71" } -.codicon-debug-breakpoint-disabled:before { content: "\ea71" } -.codicon-debug-hint:before { content: "\ea71" } -.codicon-terminal-decoration-success:before { content: "\ea71" } -.codicon-primitive-square:before { content: "\ea72" } -.codicon-edit:before { content: "\ea73" } -.codicon-pencil:before { content: "\ea73" } -.codicon-info:before { content: "\ea74" } -.codicon-issue-opened:before { content: "\ea74" } -.codicon-gist-private:before { content: "\ea75" } -.codicon-git-fork-private:before { content: "\ea75" } -.codicon-lock:before { content: "\ea75" } -.codicon-mirror-private:before { content: "\ea75" } -.codicon-close:before { content: "\ea76" } -.codicon-remove-close:before { content: "\ea76" } -.codicon-x:before { content: "\ea76" } -.codicon-repo-sync:before { content: "\ea77" } -.codicon-sync:before { content: "\ea77" } -.codicon-clone:before { content: "\ea78" } -.codicon-desktop-download:before { content: "\ea78" } -.codicon-beaker:before { content: "\ea79" } -.codicon-microscope:before { content: "\ea79" } -.codicon-vm:before { content: "\ea7a" } -.codicon-device-desktop:before { content: "\ea7a" } -.codicon-file:before { content: "\ea7b" } -.codicon-file-text:before { content: "\ea7b" } -.codicon-more:before { content: "\ea7c" } -.codicon-ellipsis:before { content: "\ea7c" } -.codicon-kebab-horizontal:before { content: "\ea7c" } -.codicon-mail-reply:before { content: "\ea7d" } -.codicon-reply:before { content: "\ea7d" } -.codicon-organization:before { content: "\ea7e" } -.codicon-organization-filled:before { content: "\ea7e" } -.codicon-organization-outline:before { content: "\ea7e" } -.codicon-new-file:before { content: "\ea7f" } -.codicon-file-add:before { content: "\ea7f" } -.codicon-new-folder:before { content: "\ea80" } -.codicon-file-directory-create:before { content: "\ea80" } -.codicon-trash:before { content: "\ea81" } -.codicon-trashcan:before { content: "\ea81" } -.codicon-history:before { content: "\ea82" } -.codicon-clock:before { content: "\ea82" } -.codicon-folder:before { content: "\ea83" } -.codicon-file-directory:before { content: "\ea83" } -.codicon-symbol-folder:before { content: "\ea83" } -.codicon-logo-github:before { content: "\ea84" } -.codicon-mark-github:before { content: "\ea84" } -.codicon-github:before { content: "\ea84" } -.codicon-terminal:before { content: "\ea85" } -.codicon-console:before { content: "\ea85" } -.codicon-repl:before { content: "\ea85" } -.codicon-zap:before { content: "\ea86" } -.codicon-symbol-event:before { content: "\ea86" } -.codicon-error:before { content: "\ea87" } -.codicon-stop:before { content: "\ea87" } -.codicon-variable:before { content: "\ea88" } -.codicon-symbol-variable:before { content: "\ea88" } -.codicon-array:before { content: "\ea8a" } -.codicon-symbol-array:before { content: "\ea8a" } -.codicon-symbol-module:before { content: "\ea8b" } -.codicon-symbol-package:before { content: "\ea8b" } -.codicon-symbol-namespace:before { content: "\ea8b" } -.codicon-symbol-object:before { content: "\ea8b" } -.codicon-symbol-method:before { content: "\ea8c" } -.codicon-symbol-function:before { content: "\ea8c" } -.codicon-symbol-constructor:before { content: "\ea8c" } -.codicon-symbol-boolean:before { content: "\ea8f" } -.codicon-symbol-null:before { content: "\ea8f" } -.codicon-symbol-numeric:before { content: "\ea90" } -.codicon-symbol-number:before { content: "\ea90" } -.codicon-symbol-structure:before { content: "\ea91" } -.codicon-symbol-struct:before { content: "\ea91" } -.codicon-symbol-parameter:before { content: "\ea92" } -.codicon-symbol-type-parameter:before { content: "\ea92" } -.codicon-symbol-key:before { content: "\ea93" } -.codicon-symbol-text:before { content: "\ea93" } -.codicon-symbol-reference:before { content: "\ea94" } -.codicon-go-to-file:before { content: "\ea94" } -.codicon-symbol-enum:before { content: "\ea95" } -.codicon-symbol-value:before { content: "\ea95" } -.codicon-symbol-ruler:before { content: "\ea96" } -.codicon-symbol-unit:before { content: "\ea96" } -.codicon-activate-breakpoints:before { content: "\ea97" } -.codicon-archive:before { content: "\ea98" } -.codicon-arrow-both:before { content: "\ea99" } -.codicon-arrow-down:before { content: "\ea9a" } -.codicon-arrow-left:before { content: "\ea9b" } -.codicon-arrow-right:before { content: "\ea9c" } -.codicon-arrow-small-down:before { content: "\ea9d" } -.codicon-arrow-small-left:before { content: "\ea9e" } -.codicon-arrow-small-right:before { content: "\ea9f" } -.codicon-arrow-small-up:before { content: "\eaa0" } -.codicon-arrow-up:before { content: "\eaa1" } -.codicon-bell:before { content: "\eaa2" } -.codicon-bold:before { content: "\eaa3" } -.codicon-book:before { content: "\eaa4" } -.codicon-bookmark:before { content: "\eaa5" } -.codicon-debug-breakpoint-conditional-unverified:before { content: "\eaa6" } -.codicon-debug-breakpoint-conditional:before { content: "\eaa7" } -.codicon-debug-breakpoint-conditional-disabled:before { content: "\eaa7" } -.codicon-debug-breakpoint-data-unverified:before { content: "\eaa8" } -.codicon-debug-breakpoint-data:before { content: "\eaa9" } -.codicon-debug-breakpoint-data-disabled:before { content: "\eaa9" } -.codicon-debug-breakpoint-log-unverified:before { content: "\eaaa" } -.codicon-debug-breakpoint-log:before { content: "\eaab" } -.codicon-debug-breakpoint-log-disabled:before { content: "\eaab" } -.codicon-briefcase:before { content: "\eaac" } -.codicon-broadcast:before { content: "\eaad" } -.codicon-browser:before { content: "\eaae" } -.codicon-bug:before { content: "\eaaf" } -.codicon-calendar:before { content: "\eab0" } -.codicon-case-sensitive:before { content: "\eab1" } -.codicon-check:before { content: "\eab2" } -.codicon-checklist:before { content: "\eab3" } -.codicon-chevron-down:before { content: "\eab4" } -.codicon-chevron-left:before { content: "\eab5" } -.codicon-chevron-right:before { content: "\eab6" } -.codicon-chevron-up:before { content: "\eab7" } -.codicon-chrome-close:before { content: "\eab8" } -.codicon-chrome-maximize:before { content: "\eab9" } -.codicon-chrome-minimize:before { content: "\eaba" } -.codicon-chrome-restore:before { content: "\eabb" } -.codicon-circle-outline:before { content: "\eabc" } -.codicon-circle:before { content: "\eabc" } -.codicon-debug-breakpoint-unverified:before { content: "\eabc" } -.codicon-terminal-decoration-incomplete:before { content: "\eabc" } -.codicon-circle-slash:before { content: "\eabd" } -.codicon-circuit-board:before { content: "\eabe" } -.codicon-clear-all:before { content: "\eabf" } -.codicon-clippy:before { content: "\eac0" } -.codicon-close-all:before { content: "\eac1" } -.codicon-cloud-download:before { content: "\eac2" } -.codicon-cloud-upload:before { content: "\eac3" } -.codicon-code:before { content: "\eac4" } -.codicon-collapse-all:before { content: "\eac5" } -.codicon-color-mode:before { content: "\eac6" } -.codicon-comment-discussion:before { content: "\eac7" } -.codicon-credit-card:before { content: "\eac9" } -.codicon-dash:before { content: "\eacc" } -.codicon-dashboard:before { content: "\eacd" } -.codicon-database:before { content: "\eace" } -.codicon-debug-continue:before { content: "\eacf" } -.codicon-debug-disconnect:before { content: "\ead0" } -.codicon-debug-pause:before { content: "\ead1" } -.codicon-debug-restart:before { content: "\ead2" } -.codicon-debug-start:before { content: "\ead3" } -.codicon-debug-step-into:before { content: "\ead4" } -.codicon-debug-step-out:before { content: "\ead5" } -.codicon-debug-step-over:before { content: "\ead6" } -.codicon-debug-stop:before { content: "\ead7" } -.codicon-debug:before { content: "\ead8" } -.codicon-device-camera-video:before { content: "\ead9" } -.codicon-device-camera:before { content: "\eada" } -.codicon-device-mobile:before { content: "\eadb" } -.codicon-diff-added:before { content: "\eadc" } -.codicon-diff-ignored:before { content: "\eadd" } -.codicon-diff-modified:before { content: "\eade" } -.codicon-diff-removed:before { content: "\eadf" } -.codicon-diff-renamed:before { content: "\eae0" } -.codicon-diff:before { content: "\eae1" } -.codicon-discard:before { content: "\eae2" } -.codicon-editor-layout:before { content: "\eae3" } -.codicon-empty-window:before { content: "\eae4" } -.codicon-exclude:before { content: "\eae5" } -.codicon-extensions:before { content: "\eae6" } -.codicon-eye-closed:before { content: "\eae7" } -.codicon-file-binary:before { content: "\eae8" } -.codicon-file-code:before { content: "\eae9" } -.codicon-file-media:before { content: "\eaea" } -.codicon-file-pdf:before { content: "\eaeb" } -.codicon-file-submodule:before { content: "\eaec" } -.codicon-file-symlink-directory:before { content: "\eaed" } -.codicon-file-symlink-file:before { content: "\eaee" } -.codicon-file-zip:before { content: "\eaef" } -.codicon-files:before { content: "\eaf0" } -.codicon-filter:before { content: "\eaf1" } -.codicon-flame:before { content: "\eaf2" } -.codicon-fold-down:before { content: "\eaf3" } -.codicon-fold-up:before { content: "\eaf4" } -.codicon-fold:before { content: "\eaf5" } -.codicon-folder-active:before { content: "\eaf6" } -.codicon-folder-opened:before { content: "\eaf7" } -.codicon-gear:before { content: "\eaf8" } -.codicon-gift:before { content: "\eaf9" } -.codicon-gist-secret:before { content: "\eafa" } -.codicon-gist:before { content: "\eafb" } -.codicon-git-commit:before { content: "\eafc" } -.codicon-git-compare:before { content: "\eafd" } -.codicon-compare-changes:before { content: "\eafd" } -.codicon-git-merge:before { content: "\eafe" } -.codicon-github-action:before { content: "\eaff" } -.codicon-github-alt:before { content: "\eb00" } -.codicon-globe:before { content: "\eb01" } -.codicon-grabber:before { content: "\eb02" } -.codicon-graph:before { content: "\eb03" } -.codicon-gripper:before { content: "\eb04" } -.codicon-heart:before { content: "\eb05" } -.codicon-home:before { content: "\eb06" } -.codicon-horizontal-rule:before { content: "\eb07" } -.codicon-hubot:before { content: "\eb08" } -.codicon-inbox:before { content: "\eb09" } -.codicon-issue-reopened:before { content: "\eb0b" } -.codicon-issues:before { content: "\eb0c" } -.codicon-italic:before { content: "\eb0d" } -.codicon-jersey:before { content: "\eb0e" } -.codicon-json:before { content: "\eb0f" } -.codicon-kebab-vertical:before { content: "\eb10" } -.codicon-key:before { content: "\eb11" } -.codicon-law:before { content: "\eb12" } -.codicon-lightbulb-autofix:before { content: "\eb13" } -.codicon-link-external:before { content: "\eb14" } -.codicon-link:before { content: "\eb15" } -.codicon-list-ordered:before { content: "\eb16" } -.codicon-list-unordered:before { content: "\eb17" } -.codicon-live-share:before { content: "\eb18" } -.codicon-loading:before { content: "\eb19" } -.codicon-location:before { content: "\eb1a" } -.codicon-mail-read:before { content: "\eb1b" } -.codicon-mail:before { content: "\eb1c" } -.codicon-markdown:before { content: "\eb1d" } -.codicon-megaphone:before { content: "\eb1e" } -.codicon-mention:before { content: "\eb1f" } -.codicon-milestone:before { content: "\eb20" } -.codicon-mortar-board:before { content: "\eb21" } -.codicon-move:before { content: "\eb22" } -.codicon-multiple-windows:before { content: "\eb23" } -.codicon-mute:before { content: "\eb24" } -.codicon-no-newline:before { content: "\eb25" } -.codicon-note:before { content: "\eb26" } -.codicon-octoface:before { content: "\eb27" } -.codicon-open-preview:before { content: "\eb28" } -.codicon-package:before { content: "\eb29" } -.codicon-paintcan:before { content: "\eb2a" } -.codicon-pin:before { content: "\eb2b" } -.codicon-play:before { content: "\eb2c" } -.codicon-run:before { content: "\eb2c" } -.codicon-plug:before { content: "\eb2d" } -.codicon-preserve-case:before { content: "\eb2e" } -.codicon-preview:before { content: "\eb2f" } -.codicon-project:before { content: "\eb30" } -.codicon-pulse:before { content: "\eb31" } -.codicon-question:before { content: "\eb32" } -.codicon-quote:before { content: "\eb33" } -.codicon-radio-tower:before { content: "\eb34" } -.codicon-reactions:before { content: "\eb35" } -.codicon-references:before { content: "\eb36" } -.codicon-refresh:before { content: "\eb37" } -.codicon-regex:before { content: "\eb38" } -.codicon-remote-explorer:before { content: "\eb39" } -.codicon-remote:before { content: "\eb3a" } -.codicon-remove:before { content: "\eb3b" } -.codicon-replace-all:before { content: "\eb3c" } -.codicon-replace:before { content: "\eb3d" } -.codicon-repo-clone:before { content: "\eb3e" } -.codicon-repo-force-push:before { content: "\eb3f" } -.codicon-repo-pull:before { content: "\eb40" } -.codicon-repo-push:before { content: "\eb41" } -.codicon-report:before { content: "\eb42" } -.codicon-request-changes:before { content: "\eb43" } -.codicon-rocket:before { content: "\eb44" } -.codicon-root-folder-opened:before { content: "\eb45" } -.codicon-root-folder:before { content: "\eb46" } -.codicon-rss:before { content: "\eb47" } -.codicon-ruby:before { content: "\eb48" } -.codicon-save-all:before { content: "\eb49" } -.codicon-save-as:before { content: "\eb4a" } -.codicon-save:before { content: "\eb4b" } -.codicon-screen-full:before { content: "\eb4c" } -.codicon-screen-normal:before { content: "\eb4d" } -.codicon-search-stop:before { content: "\eb4e" } -.codicon-server:before { content: "\eb50" } -.codicon-settings-gear:before { content: "\eb51" } -.codicon-settings:before { content: "\eb52" } -.codicon-shield:before { content: "\eb53" } -.codicon-smiley:before { content: "\eb54" } -.codicon-sort-precedence:before { content: "\eb55" } -.codicon-split-horizontal:before { content: "\eb56" } -.codicon-split-vertical:before { content: "\eb57" } -.codicon-squirrel:before { content: "\eb58" } -.codicon-star-full:before { content: "\eb59" } -.codicon-star-half:before { content: "\eb5a" } -.codicon-symbol-class:before { content: "\eb5b" } -.codicon-symbol-color:before { content: "\eb5c" } -.codicon-symbol-constant:before { content: "\eb5d" } -.codicon-symbol-enum-member:before { content: "\eb5e" } -.codicon-symbol-field:before { content: "\eb5f" } -.codicon-symbol-file:before { content: "\eb60" } -.codicon-symbol-interface:before { content: "\eb61" } -.codicon-symbol-keyword:before { content: "\eb62" } -.codicon-symbol-misc:before { content: "\eb63" } -.codicon-symbol-operator:before { content: "\eb64" } -.codicon-symbol-property:before { content: "\eb65" } -.codicon-wrench:before { content: "\eb65" } -.codicon-wrench-subaction:before { content: "\eb65" } -.codicon-symbol-snippet:before { content: "\eb66" } -.codicon-tasklist:before { content: "\eb67" } -.codicon-telescope:before { content: "\eb68" } -.codicon-text-size:before { content: "\eb69" } -.codicon-three-bars:before { content: "\eb6a" } -.codicon-thumbsdown:before { content: "\eb6b" } -.codicon-thumbsup:before { content: "\eb6c" } -.codicon-tools:before { content: "\eb6d" } -.codicon-triangle-down:before { content: "\eb6e" } -.codicon-triangle-left:before { content: "\eb6f" } -.codicon-triangle-right:before { content: "\eb70" } -.codicon-triangle-up:before { content: "\eb71" } -.codicon-twitter:before { content: "\eb72" } -.codicon-unfold:before { content: "\eb73" } -.codicon-unlock:before { content: "\eb74" } -.codicon-unmute:before { content: "\eb75" } -.codicon-unverified:before { content: "\eb76" } -.codicon-verified:before { content: "\eb77" } -.codicon-versions:before { content: "\eb78" } -.codicon-vm-active:before { content: "\eb79" } -.codicon-vm-outline:before { content: "\eb7a" } -.codicon-vm-running:before { content: "\eb7b" } -.codicon-watch:before { content: "\eb7c" } -.codicon-whitespace:before { content: "\eb7d" } -.codicon-whole-word:before { content: "\eb7e" } -.codicon-window:before { content: "\eb7f" } -.codicon-word-wrap:before { content: "\eb80" } -.codicon-zoom-in:before { content: "\eb81" } -.codicon-zoom-out:before { content: "\eb82" } -.codicon-list-filter:before { content: "\eb83" } -.codicon-list-flat:before { content: "\eb84" } -.codicon-list-selection:before { content: "\eb85" } -.codicon-selection:before { content: "\eb85" } -.codicon-list-tree:before { content: "\eb86" } -.codicon-debug-breakpoint-function-unverified:before { content: "\eb87" } -.codicon-debug-breakpoint-function:before { content: "\eb88" } -.codicon-debug-breakpoint-function-disabled:before { content: "\eb88" } -.codicon-debug-stackframe-active:before { content: "\eb89" } -.codicon-circle-small-filled:before { content: "\eb8a" } -.codicon-debug-stackframe-dot:before { content: "\eb8a" } -.codicon-terminal-decoration-mark:before { content: "\eb8a" } -.codicon-debug-stackframe:before { content: "\eb8b" } -.codicon-debug-stackframe-focused:before { content: "\eb8b" } -.codicon-debug-breakpoint-unsupported:before { content: "\eb8c" } -.codicon-symbol-string:before { content: "\eb8d" } -.codicon-debug-reverse-continue:before { content: "\eb8e" } -.codicon-debug-step-back:before { content: "\eb8f" } -.codicon-debug-restart-frame:before { content: "\eb90" } -.codicon-debug-alt:before { content: "\eb91" } -.codicon-call-incoming:before { content: "\eb92" } -.codicon-call-outgoing:before { content: "\eb93" } -.codicon-menu:before { content: "\eb94" } -.codicon-expand-all:before { content: "\eb95" } -.codicon-feedback:before { content: "\eb96" } -.codicon-group-by-ref-type:before { content: "\eb97" } -.codicon-ungroup-by-ref-type:before { content: "\eb98" } -.codicon-account:before { content: "\eb99" } -.codicon-bell-dot:before { content: "\eb9a" } -.codicon-debug-console:before { content: "\eb9b" } -.codicon-library:before { content: "\eb9c" } -.codicon-output:before { content: "\eb9d" } -.codicon-run-all:before { content: "\eb9e" } -.codicon-sync-ignored:before { content: "\eb9f" } -.codicon-pinned:before { content: "\eba0" } -.codicon-github-inverted:before { content: "\eba1" } -.codicon-server-process:before { content: "\eba2" } -.codicon-server-environment:before { content: "\eba3" } -.codicon-pass:before { content: "\eba4" } -.codicon-issue-closed:before { content: "\eba4" } -.codicon-stop-circle:before { content: "\eba5" } -.codicon-play-circle:before { content: "\eba6" } -.codicon-record:before { content: "\eba7" } -.codicon-debug-alt-small:before { content: "\eba8" } -.codicon-vm-connect:before { content: "\eba9" } -.codicon-cloud:before { content: "\ebaa" } -.codicon-merge:before { content: "\ebab" } -.codicon-export:before { content: "\ebac" } -.codicon-graph-left:before { content: "\ebad" } -.codicon-magnet:before { content: "\ebae" } -.codicon-notebook:before { content: "\ebaf" } -.codicon-redo:before { content: "\ebb0" } -.codicon-check-all:before { content: "\ebb1" } -.codicon-pinned-dirty:before { content: "\ebb2" } -.codicon-pass-filled:before { content: "\ebb3" } -.codicon-circle-large-filled:before { content: "\ebb4" } -.codicon-circle-large:before { content: "\ebb5" } -.codicon-circle-large-outline:before { content: "\ebb5" } -.codicon-combine:before { content: "\ebb6" } -.codicon-gather:before { content: "\ebb6" } -.codicon-table:before { content: "\ebb7" } -.codicon-variable-group:before { content: "\ebb8" } -.codicon-type-hierarchy:before { content: "\ebb9" } -.codicon-type-hierarchy-sub:before { content: "\ebba" } -.codicon-type-hierarchy-super:before { content: "\ebbb" } -.codicon-git-pull-request-create:before { content: "\ebbc" } -.codicon-run-above:before { content: "\ebbd" } -.codicon-run-below:before { content: "\ebbe" } -.codicon-notebook-template:before { content: "\ebbf" } -.codicon-debug-rerun:before { content: "\ebc0" } -.codicon-workspace-trusted:before { content: "\ebc1" } -.codicon-workspace-untrusted:before { content: "\ebc2" } -.codicon-workspace-unknown:before { content: "\ebc3" } -.codicon-terminal-cmd:before { content: "\ebc4" } -.codicon-terminal-debian:before { content: "\ebc5" } -.codicon-terminal-linux:before { content: "\ebc6" } -.codicon-terminal-powershell:before { content: "\ebc7" } -.codicon-terminal-tmux:before { content: "\ebc8" } -.codicon-terminal-ubuntu:before { content: "\ebc9" } -.codicon-terminal-bash:before { content: "\ebca" } -.codicon-arrow-swap:before { content: "\ebcb" } -.codicon-copy:before { content: "\ebcc" } -.codicon-person-add:before { content: "\ebcd" } -.codicon-filter-filled:before { content: "\ebce" } -.codicon-wand:before { content: "\ebcf" } -.codicon-debug-line-by-line:before { content: "\ebd0" } -.codicon-inspect:before { content: "\ebd1" } -.codicon-layers:before { content: "\ebd2" } -.codicon-layers-dot:before { content: "\ebd3" } -.codicon-layers-active:before { content: "\ebd4" } -.codicon-compass:before { content: "\ebd5" } -.codicon-compass-dot:before { content: "\ebd6" } -.codicon-compass-active:before { content: "\ebd7" } -.codicon-azure:before { content: "\ebd8" } -.codicon-issue-draft:before { content: "\ebd9" } -.codicon-git-pull-request-closed:before { content: "\ebda" } -.codicon-git-pull-request-draft:before { content: "\ebdb" } -.codicon-debug-all:before { content: "\ebdc" } -.codicon-debug-coverage:before { content: "\ebdd" } -.codicon-run-errors:before { content: "\ebde" } -.codicon-folder-library:before { content: "\ebdf" } -.codicon-debug-continue-small:before { content: "\ebe0" } -.codicon-beaker-stop:before { content: "\ebe1" } -.codicon-graph-line:before { content: "\ebe2" } -.codicon-graph-scatter:before { content: "\ebe3" } -.codicon-pie-chart:before { content: "\ebe4" } -.codicon-bracket:before { content: "\eb0f" } -.codicon-bracket-dot:before { content: "\ebe5" } -.codicon-bracket-error:before { content: "\ebe6" } -.codicon-lock-small:before { content: "\ebe7" } -.codicon-azure-devops:before { content: "\ebe8" } -.codicon-verified-filled:before { content: "\ebe9" } -.codicon-newline:before { content: "\ebea" } -.codicon-layout:before { content: "\ebeb" } -.codicon-layout-activitybar-left:before { content: "\ebec" } -.codicon-layout-activitybar-right:before { content: "\ebed" } -.codicon-layout-panel-left:before { content: "\ebee" } -.codicon-layout-panel-center:before { content: "\ebef" } -.codicon-layout-panel-justify:before { content: "\ebf0" } -.codicon-layout-panel-right:before { content: "\ebf1" } -.codicon-layout-panel:before { content: "\ebf2" } -.codicon-layout-sidebar-left:before { content: "\ebf3" } -.codicon-layout-sidebar-right:before { content: "\ebf4" } -.codicon-layout-statusbar:before { content: "\ebf5" } -.codicon-layout-menubar:before { content: "\ebf6" } -.codicon-layout-centered:before { content: "\ebf7" } -.codicon-target:before { content: "\ebf8" } -.codicon-indent:before { content: "\ebf9" } -.codicon-record-small:before { content: "\ebfa" } -.codicon-error-small:before { content: "\ebfb" } -.codicon-terminal-decoration-error:before { content: "\ebfb" } -.codicon-arrow-circle-down:before { content: "\ebfc" } -.codicon-arrow-circle-left:before { content: "\ebfd" } -.codicon-arrow-circle-right:before { content: "\ebfe" } -.codicon-arrow-circle-up:before { content: "\ebff" } -.codicon-layout-sidebar-right-off:before { content: "\ec00" } -.codicon-layout-panel-off:before { content: "\ec01" } -.codicon-layout-sidebar-left-off:before { content: "\ec02" } -.codicon-blank:before { content: "\ec03" } -.codicon-heart-filled:before { content: "\ec04" } -.codicon-map:before { content: "\ec05" } -.codicon-map-filled:before { content: "\ec06" } -.codicon-circle-small:before { content: "\ec07" } -.codicon-bell-slash:before { content: "\ec08" } -.codicon-bell-slash-dot:before { content: "\ec09" } -.codicon-comment-unresolved:before { content: "\ec0a" } -.codicon-git-pull-request-go-to-changes:before { content: "\ec0b" } -.codicon-git-pull-request-new-changes:before { content: "\ec0c" } -.codicon-search-fuzzy:before { content: "\ec0d" } -.codicon-comment-draft:before { content: "\ec0e" } -.codicon-send:before { content: "\ec0f" } -.codicon-sparkle:before { content: "\ec10" } -.codicon-insert:before { content: "\ec11" } \ No newline at end of file diff --git a/application/client/src/app/ui/styles/codicons/codicon.ttf b/application/client/src/app/ui/styles/codicons/codicon.ttf deleted file mode 100644 index ea2309d11d..0000000000 Binary files a/application/client/src/app/ui/styles/codicons/codicon.ttf and /dev/null differ diff --git a/application/client/src/app/ui/styles/colors.less b/application/client/src/app/ui/styles/colors.less deleted file mode 100644 index b663026325..0000000000 --- a/application/client/src/app/ui/styles/colors.less +++ /dev/null @@ -1,74 +0,0 @@ - -/* -var(--scheme-color-0): #FFFFFF; -var(--scheme-color-1): #eaeaea; -var(--scheme-color-2): #c0c0c0; -var(--scheme-color-3): #979797; -var(--scheme-color-4): #555555; -var(--scheme-color-5): #333333; -var(--scheme-color-6): #111111; -var(--scheme-color-7): #000000; -*/ -@import './variables.less'; - -.color-scheme-0 { - color: var(--scheme-color-0); -} -.color-scheme-1 { - color: var(--scheme-color-1); -} -.color-scheme-2 { - color: var(--scheme-color-2); -} -.color-scheme-3 { - color: var(--scheme-color-3); -} -.color-scheme-4 { - color: var(--scheme-color-4); -} -.color-scheme-5 { - color: var(--scheme-color-5); -} -.color-scheme-6 { - color: var(--scheme-color-6); -} -.color-scheme-error { - color: var(--scheme-color-error); -} -.color-scheme-accent { - color: var(--scheme-color-accent); -} -.color-scheme-warning { - color: var(--scheme-color-warning); -} - -.bk-scheme-0 { - background: var(--scheme-color-0); -} -.bk-scheme-1 { - background: var(--scheme-color-1); -} -.bk-scheme-2 { - background: var(--scheme-color-2); -} -.bk-scheme-3 { - background: var(--scheme-color-3); -} -.bk-scheme-4 { - background: var(--scheme-color-4); -} -.bk-scheme-5 { - background: var(--scheme-color-5); -} -.bk-scheme-6 { - background: var(--scheme-color-6); -} -.bk-scheme-error { - background: var(--scheme-color-error); -} -.bk-scheme-accent { - background: var(--scheme-color-accent); -} -.bk-scheme-warning { - background: var(--scheme-color-warning); -} \ No newline at end of file diff --git a/application/client/src/app/ui/styles/colors.ts b/application/client/src/app/ui/styles/colors.ts deleted file mode 100644 index 23950de959..0000000000 --- a/application/client/src/app/ui/styles/colors.ts +++ /dev/null @@ -1,263 +0,0 @@ -const colorsCache: Map = new Map(); -const contrastColorsCache: Map = new Map(); - -export function getColorHolder(color: string): (index: number) => string { - return function (colors: { [key: string]: string }, index: number) { - if (colors[index] === undefined) { - colors[index] = index === 0 ? color : shadeColor(colors[index - 1], 40, true); - } - return colors[index]; - }.bind(null, {}); -} -export function shadeColor(color: string, percent: number, reverse: boolean = false) { - // source: https://stackoverflow.com/questions/5560248/programmatically-lighten-or-darken-a-hex-color-or-rgb-and-blend-colors - - const key: string = `${color}${percent}`; - const cached: string | undefined = colorsCache.get(key); - if (cached !== undefined) { - return cached; - } - const R = parseInt(color.substring(1, 3), 16); - const G = parseInt(color.substring(3, 5), 16); - const B = parseInt(color.substring(5, 7), 16); - - let rR = (R * (100 + percent)) / 100; - let rG = (G * (100 + percent)) / 100; - let rB = (B * (100 + percent)) / 100; - - if (reverse) { - rR = rR < 255 ? rR : (R * (100 - percent)) / 100; - rG = rG < 255 ? rG : (G * (100 - percent)) / 100; - rB = rB < 255 ? rB : (B * (100 - percent)) / 100; - } - - rR = rR < 255 ? rR : 255; - rG = rG < 255 ? rG : 255; - rB = rB < 255 ? rB : 255; - - const RR = rR.toString(16).length === 1 ? '0' + rR.toString(16) : rR.toString(16); - const GG = rG.toString(16).length === 1 ? '0' + rG.toString(16) : rG.toString(16); - const BB = rB.toString(16).length === 1 ? '0' + rB.toString(16) : rB.toString(16); - - const result: string = '#' + RR.substr(0, 2) + GG.substr(0, 2) + BB.substr(0, 2); - colorsCache.set(key, result); - return result; -} - -export function getContrastColor(hex: string, bw: boolean = false) { - function padZero(str: string, len?: number) { - len = len || 2; - const zeros = new Array(len).join('0'); - return (zeros + str).slice(-len); - } - const alias = `${hex}:${bw}`; - const cached = contrastColorsCache.get(alias); - if (cached !== undefined) { - return cached; - } - if (hex.toLowerCase().indexOf('rgb') === 0) { - hex = rgbToHex(hex); - } - if (hex.indexOf('#') === 0) { - hex = hex.slice(1); - } - // convert 3-digit hex to 6-digits. - if (hex.length === 3) { - hex = hex[0] + hex[0] + hex[1] + hex[1] + hex[2] + hex[2]; - } - if (hex.length !== 6) { - throw new Error(`Invalid HEX color: ${hex}`); - } - const r = parseInt(hex.slice(0, 2), 16); - const g = parseInt(hex.slice(2, 4), 16); - const b = parseInt(hex.slice(4, 6), 16); - const color = (() => { - if (bw) { - // http://stackoverflow.com/a/3943023/112731 - return r * 0.299 + g * 0.587 + b * 0.114 > 186 ? '#000000' : '#FFFFFF'; - } else { - return ( - '#' + - padZero((255 - r).toString(16)) + - padZero((255 - g).toString(16)) + - padZero((255 - b).toString(16)) - ); - } - })(); - contrastColorsCache.set(alias, color); - return color; - // https://stackoverflow.com/questions/35969656/how-can-i-generate-the-opposite-color-according-to-current-color -} - -export function hexToRgb(hex: string): { r: number; g: number; b: number } | undefined { - const result = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(hex); - return result - ? { - r: parseInt(result[1], 16), - g: parseInt(result[2], 16), - b: parseInt(result[3], 16), - } - : undefined; -} - -export function rgbToHex(color: string) { - const colors = color - .replace(/[^\d,]/gi, '') - .split(',') - .map((c: string) => { - return parseInt(c, 10); - }) - .filter((c: number) => { - return !isNaN(c) && isFinite(c); - }); - if (colors.length !== 3) { - return '#000000'; - } - // tslint:disable-next-line: no-bitwise - return ( - `#` + ((1 << 24) + (colors[0] << 16) + (colors[1] << 8) + colors[2]).toString(16).slice(1) - ); -} - -export function rgbFromStr(color: string): { r: number; g: number; b: number } | undefined { - const colors = color - .replace(/[^\d,]/gi, '') - .split(',') - .map((c: string) => { - return parseInt(c, 10); - }) - .filter((c: number) => { - return !isNaN(c) && isFinite(c); - }); - if (colors.length !== 3) { - return undefined; - } - return { - r: colors[0], - g: colors[2], - b: colors[1], - }; -} - -export function getColorDiff(a: string, b: string): number | undefined { - let rgbA; - let rgbB; - if (a.indexOf('#') !== -1) { - rgbA = hexToRgb(a); - } else { - rgbA = rgbFromStr(a); - } - if (b.indexOf('#') !== -1) { - rgbB = hexToRgb(b); - } else { - rgbB = rgbFromStr(b); - } - if (rgbB === undefined || rgbA === undefined) { - return undefined; - } - const diffR = rgbA.r - rgbB.r; - const diffG = rgbA.g - rgbB.g; - const diffB = rgbA.b - rgbB.b; - return Math.sqrt(diffR * diffR + diffG * diffG + diffB * diffB); -} - -export function getUniqueColorTo(used: string[]): string { - const max: { rate: number; color: string } = { rate: -1, color: '' }; - for (let i = 5; i >= 0; i -= 1) { - const color = `rgb(${Math.round(Math.random() * 204) + 50}, ${ - Math.round(Math.random() * 204) + 50 - }, ${Math.round(Math.random() * 204) + 50})`; - let rate = -1; - used.forEach((c: string) => { - const r = getColorDiff(c, color); - if (r !== undefined && rate < r) { - rate = r; - } - }); - if (rate > 100) { - return color; - } else if (max.rate < rate || max.color === '') { - max.color = color; - max.rate = rate; - } - } - return max.color; -} - -export const CColors = [ - 'rgba(0,0,0,0)', - '#000000', - '#2d3436', - '#636e72', - '#b2bec3', - '#c0c0c0', - '#dfe6e9', - '#eaeaea', - '#ffffff', - '#2ecc71', - '#55efc4', - '#1abc9c', - '#5d8d5d', - '#72a75b', - '#6ab04c', - '#badc58', - '#b4d6ad', - '#a3d0b5', - '#81ecec', - '#74b9ff', - '#778beb', - '#a29bfe', - '#786fa6', - '#00cec9', - '#ffeaa7', - '#f7d794', - '#fdcb6e', - '#f8a5c2', - '#fd79a8', - '#fab1a0', - '#f3a683', - '#f19066', - '#ea8685', - '#e66767', - '#e17055', - '#596275', - '#574b90', - '#303952', -]; - -export const CShortColors = ['#fbe961', '#a1eefd', '#a2fa91', '#f4b5b4', '#9fb6f8', '#dadada']; - -export function getBasicColors(): string[] { - return CColors.slice(3, CColors.length); -} - -export function shuffledBasicColors(): string[] { - return getBasicColors() - .map((value) => ({ value, sort: Math.random() })) - .sort((a, b) => a.sort - b.sort) - .map(({ value }) => value); -} - -let nextColorIndex = 0; -const shufled = shuffledBasicColors(); - -export function getNextColor(): string { - nextColorIndex = nextColorIndex >= shufled.length ? 0 : nextColorIndex + 1; - return shufled[nextColorIndex]; -} - -const sourceColors: string[] = []; - -export function getSourceColor(id: number): string { - if (sourceColors.length === 0) { - const colors = getBasicColors(); - sourceColors.push(colors[Math.floor(Math.random() * (colors.length - 1))]); - } - if (id >= sourceColors.length) { - const toGenerate = id - (sourceColors.length - 1); - for (let i = toGenerate; i >= 0; i -= 1) { - sourceColors.push(getUniqueColorTo(sourceColors)); - } - } - return sourceColors[id]; -} diff --git a/application/client/src/app/ui/styles/containers.less b/application/client/src/app/ui/styles/containers.less deleted file mode 100644 index e90cc44b80..0000000000 --- a/application/client/src/app/ui/styles/containers.less +++ /dev/null @@ -1,52 +0,0 @@ -div.preset-container{ - position: absolute; - display: flex; - flex-direction: column; - align-items: center; - top: 0; - left: 0; - width: 100%; - height: 100%; - overflow: hidden; - div.preset-container-content { - position: absolute; - display: block; - top: 0; - width: 100%; - max-width: 1000px; - height: 100%; - overflow: hidden; - &.w-1200 { - max-width: 1200px; - } - &.w-1400 { - max-width: 1400px; - } - &.w-1600 { - max-width: 1600px; - } - & div.preset-container-left { - position: absolute; - display: flex; - flex-direction: column; - top: 0; - bottom: 0; - left: 0; - right: 330px; - overflow: hidden; - justify-content: stretch; - justify-items: stretch; - } - & div.preset-container-right { - position: absolute; - width: 320px; - right: 6px; - bottom: 0; - top: 0; - overflow-y: auto; - overflow-x: hidden; - display: flex; - flex-direction: column; - } - } -} \ No newline at end of file diff --git a/application/client/src/app/ui/styles/fontawesome/LICENSE.txt b/application/client/src/app/ui/styles/fontawesome/LICENSE.txt deleted file mode 100644 index f31bef92b6..0000000000 --- a/application/client/src/app/ui/styles/fontawesome/LICENSE.txt +++ /dev/null @@ -1,34 +0,0 @@ -Font Awesome Free License -------------------------- - -Font Awesome Free is free, open source, and GPL friendly. You can use it for -commercial projects, open source projects, or really almost whatever you want. -Full Font Awesome Free license: https://fontawesome.com/license/free. - -# Icons: CC BY 4.0 License (https://creativecommons.org/licenses/by/4.0/) -In the Font Awesome Free download, the CC BY 4.0 license applies to all icons -packaged as SVG and JS file types. - -# Fonts: SIL OFL 1.1 License (https://scripts.sil.org/OFL) -In the Font Awesome Free download, the SIL OFL license applies to all icons -packaged as web and desktop font files. - -# Code: MIT License (https://opensource.org/licenses/MIT) -In the Font Awesome Free download, the MIT license applies to all non-font and -non-icon files. - -# Attribution -Attribution is required by MIT, SIL OFL, and CC BY licenses. Downloaded Font -Awesome Free files already contain embedded comments with sufficient -attribution, so you shouldn't need to do anything additional when using these -files normally. - -We've kept attribution comments terse, so we ask that you do not actively work -to remove them from files, especially code. They're a great way for folks to -learn about Font Awesome. - -# Brand Icons -All brand icons are trademarks of their respective owners. The use of these -trademarks does not indicate endorsement of the trademark holder by Font -Awesome, nor vice versa. **Please do not use brand logos for any purpose except -to represent the company, product, or service to which they refer.** diff --git a/application/client/src/app/ui/styles/fontawesome/less/_animated.less b/application/client/src/app/ui/styles/fontawesome/less/_animated.less deleted file mode 100644 index 704ec95103..0000000000 --- a/application/client/src/app/ui/styles/fontawesome/less/_animated.less +++ /dev/null @@ -1,19 +0,0 @@ -// Animated Icons -// -------------------------- - -.@{fa-css-prefix}-spin { - animation: fa-spin 2s infinite linear; -} - -.@{fa-css-prefix}-pulse { - animation: fa-spin 1s infinite steps(8); -} - -@keyframes fa-spin { - 0% { - transform: rotate(0deg); - } - 100% { - transform: rotate(360deg); - } -} diff --git a/application/client/src/app/ui/styles/fontawesome/less/_bordered-pulled.less b/application/client/src/app/ui/styles/fontawesome/less/_bordered-pulled.less deleted file mode 100644 index 29a356b423..0000000000 --- a/application/client/src/app/ui/styles/fontawesome/less/_bordered-pulled.less +++ /dev/null @@ -1,16 +0,0 @@ -// Bordered & Pulled -// ------------------------- - -.@{fa-css-prefix}-border { - border-radius: .1em; - border: solid .08em @fa-border-color; - padding: .2em .25em .15em; -} - -.@{fa-css-prefix}-pull-left { float: left; } -.@{fa-css-prefix}-pull-right { float: right; } - -.@{fa-css-prefix}, .fas, .far, .fal, .fab { - &.@{fa-css-prefix}-pull-left { margin-right: .3em; } - &.@{fa-css-prefix}-pull-right { margin-left: .3em; } -} diff --git a/application/client/src/app/ui/styles/fontawesome/less/_core.less b/application/client/src/app/ui/styles/fontawesome/less/_core.less deleted file mode 100644 index 82031d6523..0000000000 --- a/application/client/src/app/ui/styles/fontawesome/less/_core.less +++ /dev/null @@ -1,12 +0,0 @@ -// Base Class Definition -// ------------------------- - -.@{fa-css-prefix}, .fas, .far, .fal, .fab { - -moz-osx-font-smoothing: grayscale; - -webkit-font-smoothing: antialiased; - display: inline-block; - font-style: normal; - font-variant: normal; - text-rendering: auto; - line-height: 1; -} diff --git a/application/client/src/app/ui/styles/fontawesome/less/_fixed-width.less b/application/client/src/app/ui/styles/fontawesome/less/_fixed-width.less deleted file mode 100644 index be817c6375..0000000000 --- a/application/client/src/app/ui/styles/fontawesome/less/_fixed-width.less +++ /dev/null @@ -1,6 +0,0 @@ -// Fixed Width Icons -// ------------------------- -.@{fa-css-prefix}-fw { - text-align: center; - width: (20em / 16); -} diff --git a/application/client/src/app/ui/styles/fontawesome/less/_icons.less b/application/client/src/app/ui/styles/fontawesome/less/_icons.less deleted file mode 100644 index c1b6fba971..0000000000 --- a/application/client/src/app/ui/styles/fontawesome/less/_icons.less +++ /dev/null @@ -1,1333 +0,0 @@ -/* Font Awesome uses the Unicode Private Use Area (PUA) to ensure screen - readers do not read off random characters that represent icons */ - -.@{fa-css-prefix}-500px:before { content: @fa-var-500px; } -.@{fa-css-prefix}-accessible-icon:before { content: @fa-var-accessible-icon; } -.@{fa-css-prefix}-accusoft:before { content: @fa-var-accusoft; } -.@{fa-css-prefix}-acquisitions-incorporated:before { content: @fa-var-acquisitions-incorporated; } -.@{fa-css-prefix}-ad:before { content: @fa-var-ad; } -.@{fa-css-prefix}-address-book:before { content: @fa-var-address-book; } -.@{fa-css-prefix}-address-card:before { content: @fa-var-address-card; } -.@{fa-css-prefix}-adjust:before { content: @fa-var-adjust; } -.@{fa-css-prefix}-adn:before { content: @fa-var-adn; } -.@{fa-css-prefix}-adobe:before { content: @fa-var-adobe; } -.@{fa-css-prefix}-adversal:before { content: @fa-var-adversal; } -.@{fa-css-prefix}-affiliatetheme:before { content: @fa-var-affiliatetheme; } -.@{fa-css-prefix}-air-freshener:before { content: @fa-var-air-freshener; } -.@{fa-css-prefix}-algolia:before { content: @fa-var-algolia; } -.@{fa-css-prefix}-align-center:before { content: @fa-var-align-center; } -.@{fa-css-prefix}-align-justify:before { content: @fa-var-align-justify; } -.@{fa-css-prefix}-align-left:before { content: @fa-var-align-left; } -.@{fa-css-prefix}-align-right:before { content: @fa-var-align-right; } -.@{fa-css-prefix}-alipay:before { content: @fa-var-alipay; } -.@{fa-css-prefix}-allergies:before { content: @fa-var-allergies; } -.@{fa-css-prefix}-amazon:before { content: @fa-var-amazon; } -.@{fa-css-prefix}-amazon-pay:before { content: @fa-var-amazon-pay; } -.@{fa-css-prefix}-ambulance:before { content: @fa-var-ambulance; } -.@{fa-css-prefix}-american-sign-language-interpreting:before { content: @fa-var-american-sign-language-interpreting; } -.@{fa-css-prefix}-amilia:before { content: @fa-var-amilia; } -.@{fa-css-prefix}-anchor:before { content: @fa-var-anchor; } -.@{fa-css-prefix}-android:before { content: @fa-var-android; } -.@{fa-css-prefix}-angellist:before { content: @fa-var-angellist; } -.@{fa-css-prefix}-angle-double-down:before { content: @fa-var-angle-double-down; } -.@{fa-css-prefix}-angle-double-left:before { content: @fa-var-angle-double-left; } -.@{fa-css-prefix}-angle-double-right:before { content: @fa-var-angle-double-right; } -.@{fa-css-prefix}-angle-double-up:before { content: @fa-var-angle-double-up; } -.@{fa-css-prefix}-angle-down:before { content: @fa-var-angle-down; } -.@{fa-css-prefix}-angle-left:before { content: @fa-var-angle-left; } -.@{fa-css-prefix}-angle-right:before { content: @fa-var-angle-right; } -.@{fa-css-prefix}-angle-up:before { content: @fa-var-angle-up; } -.@{fa-css-prefix}-angry:before { content: @fa-var-angry; } -.@{fa-css-prefix}-angrycreative:before { content: @fa-var-angrycreative; } -.@{fa-css-prefix}-angular:before { content: @fa-var-angular; } -.@{fa-css-prefix}-ankh:before { content: @fa-var-ankh; } -.@{fa-css-prefix}-app-store:before { content: @fa-var-app-store; } -.@{fa-css-prefix}-app-store-ios:before { content: @fa-var-app-store-ios; } -.@{fa-css-prefix}-apper:before { content: @fa-var-apper; } -.@{fa-css-prefix}-apple:before { content: @fa-var-apple; } -.@{fa-css-prefix}-apple-alt:before { content: @fa-var-apple-alt; } -.@{fa-css-prefix}-apple-pay:before { content: @fa-var-apple-pay; } -.@{fa-css-prefix}-archive:before { content: @fa-var-archive; } -.@{fa-css-prefix}-archway:before { content: @fa-var-archway; } -.@{fa-css-prefix}-arrow-alt-circle-down:before { content: @fa-var-arrow-alt-circle-down; } -.@{fa-css-prefix}-arrow-alt-circle-left:before { content: @fa-var-arrow-alt-circle-left; } -.@{fa-css-prefix}-arrow-alt-circle-right:before { content: @fa-var-arrow-alt-circle-right; } -.@{fa-css-prefix}-arrow-alt-circle-up:before { content: @fa-var-arrow-alt-circle-up; } -.@{fa-css-prefix}-arrow-circle-down:before { content: @fa-var-arrow-circle-down; } -.@{fa-css-prefix}-arrow-circle-left:before { content: @fa-var-arrow-circle-left; } -.@{fa-css-prefix}-arrow-circle-right:before { content: @fa-var-arrow-circle-right; } -.@{fa-css-prefix}-arrow-circle-up:before { content: @fa-var-arrow-circle-up; } -.@{fa-css-prefix}-arrow-down:before { content: @fa-var-arrow-down; } -.@{fa-css-prefix}-arrow-left:before { content: @fa-var-arrow-left; } -.@{fa-css-prefix}-arrow-right:before { content: @fa-var-arrow-right; } -.@{fa-css-prefix}-arrow-up:before { content: @fa-var-arrow-up; } -.@{fa-css-prefix}-arrows-alt:before { content: @fa-var-arrows-alt; } -.@{fa-css-prefix}-arrows-alt-h:before { content: @fa-var-arrows-alt-h; } -.@{fa-css-prefix}-arrows-alt-v:before { content: @fa-var-arrows-alt-v; } -.@{fa-css-prefix}-artstation:before { content: @fa-var-artstation; } -.@{fa-css-prefix}-assistive-listening-systems:before { content: @fa-var-assistive-listening-systems; } -.@{fa-css-prefix}-asterisk:before { content: @fa-var-asterisk; } -.@{fa-css-prefix}-asymmetrik:before { content: @fa-var-asymmetrik; } -.@{fa-css-prefix}-at:before { content: @fa-var-at; } -.@{fa-css-prefix}-atlas:before { content: @fa-var-atlas; } -.@{fa-css-prefix}-atlassian:before { content: @fa-var-atlassian; } -.@{fa-css-prefix}-atom:before { content: @fa-var-atom; } -.@{fa-css-prefix}-audible:before { content: @fa-var-audible; } -.@{fa-css-prefix}-audio-description:before { content: @fa-var-audio-description; } -.@{fa-css-prefix}-autoprefixer:before { content: @fa-var-autoprefixer; } -.@{fa-css-prefix}-avianex:before { content: @fa-var-avianex; } -.@{fa-css-prefix}-aviato:before { content: @fa-var-aviato; } -.@{fa-css-prefix}-award:before { content: @fa-var-award; } -.@{fa-css-prefix}-aws:before { content: @fa-var-aws; } -.@{fa-css-prefix}-baby:before { content: @fa-var-baby; } -.@{fa-css-prefix}-baby-carriage:before { content: @fa-var-baby-carriage; } -.@{fa-css-prefix}-backspace:before { content: @fa-var-backspace; } -.@{fa-css-prefix}-backward:before { content: @fa-var-backward; } -.@{fa-css-prefix}-balance-scale:before { content: @fa-var-balance-scale; } -.@{fa-css-prefix}-ban:before { content: @fa-var-ban; } -.@{fa-css-prefix}-band-aid:before { content: @fa-var-band-aid; } -.@{fa-css-prefix}-bandcamp:before { content: @fa-var-bandcamp; } -.@{fa-css-prefix}-barcode:before { content: @fa-var-barcode; } -.@{fa-css-prefix}-bars:before { content: @fa-var-bars; } -.@{fa-css-prefix}-baseball-ball:before { content: @fa-var-baseball-ball; } -.@{fa-css-prefix}-basketball-ball:before { content: @fa-var-basketball-ball; } -.@{fa-css-prefix}-bath:before { content: @fa-var-bath; } -.@{fa-css-prefix}-battery-empty:before { content: @fa-var-battery-empty; } -.@{fa-css-prefix}-battery-full:before { content: @fa-var-battery-full; } -.@{fa-css-prefix}-battery-half:before { content: @fa-var-battery-half; } -.@{fa-css-prefix}-battery-quarter:before { content: @fa-var-battery-quarter; } -.@{fa-css-prefix}-battery-three-quarters:before { content: @fa-var-battery-three-quarters; } -.@{fa-css-prefix}-bed:before { content: @fa-var-bed; } -.@{fa-css-prefix}-beer:before { content: @fa-var-beer; } -.@{fa-css-prefix}-behance:before { content: @fa-var-behance; } -.@{fa-css-prefix}-behance-square:before { content: @fa-var-behance-square; } -.@{fa-css-prefix}-bell:before { content: @fa-var-bell; } -.@{fa-css-prefix}-bell-slash:before { content: @fa-var-bell-slash; } -.@{fa-css-prefix}-bezier-curve:before { content: @fa-var-bezier-curve; } -.@{fa-css-prefix}-bible:before { content: @fa-var-bible; } -.@{fa-css-prefix}-bicycle:before { content: @fa-var-bicycle; } -.@{fa-css-prefix}-bimobject:before { content: @fa-var-bimobject; } -.@{fa-css-prefix}-binoculars:before { content: @fa-var-binoculars; } -.@{fa-css-prefix}-biohazard:before { content: @fa-var-biohazard; } -.@{fa-css-prefix}-birthday-cake:before { content: @fa-var-birthday-cake; } -.@{fa-css-prefix}-bitbucket:before { content: @fa-var-bitbucket; } -.@{fa-css-prefix}-bitcoin:before { content: @fa-var-bitcoin; } -.@{fa-css-prefix}-bity:before { content: @fa-var-bity; } -.@{fa-css-prefix}-black-tie:before { content: @fa-var-black-tie; } -.@{fa-css-prefix}-blackberry:before { content: @fa-var-blackberry; } -.@{fa-css-prefix}-blender:before { content: @fa-var-blender; } -.@{fa-css-prefix}-blender-phone:before { content: @fa-var-blender-phone; } -.@{fa-css-prefix}-blind:before { content: @fa-var-blind; } -.@{fa-css-prefix}-blog:before { content: @fa-var-blog; } -.@{fa-css-prefix}-blogger:before { content: @fa-var-blogger; } -.@{fa-css-prefix}-blogger-b:before { content: @fa-var-blogger-b; } -.@{fa-css-prefix}-bluetooth:before { content: @fa-var-bluetooth; } -.@{fa-css-prefix}-bluetooth-b:before { content: @fa-var-bluetooth-b; } -.@{fa-css-prefix}-bold:before { content: @fa-var-bold; } -.@{fa-css-prefix}-bolt:before { content: @fa-var-bolt; } -.@{fa-css-prefix}-bomb:before { content: @fa-var-bomb; } -.@{fa-css-prefix}-bone:before { content: @fa-var-bone; } -.@{fa-css-prefix}-bong:before { content: @fa-var-bong; } -.@{fa-css-prefix}-book:before { content: @fa-var-book; } -.@{fa-css-prefix}-book-dead:before { content: @fa-var-book-dead; } -.@{fa-css-prefix}-book-open:before { content: @fa-var-book-open; } -.@{fa-css-prefix}-book-reader:before { content: @fa-var-book-reader; } -.@{fa-css-prefix}-bookmark:before { content: @fa-var-bookmark; } -.@{fa-css-prefix}-bowling-ball:before { content: @fa-var-bowling-ball; } -.@{fa-css-prefix}-box:before { content: @fa-var-box; } -.@{fa-css-prefix}-box-open:before { content: @fa-var-box-open; } -.@{fa-css-prefix}-boxes:before { content: @fa-var-boxes; } -.@{fa-css-prefix}-braille:before { content: @fa-var-braille; } -.@{fa-css-prefix}-brain:before { content: @fa-var-brain; } -.@{fa-css-prefix}-briefcase:before { content: @fa-var-briefcase; } -.@{fa-css-prefix}-briefcase-medical:before { content: @fa-var-briefcase-medical; } -.@{fa-css-prefix}-broadcast-tower:before { content: @fa-var-broadcast-tower; } -.@{fa-css-prefix}-broom:before { content: @fa-var-broom; } -.@{fa-css-prefix}-brush:before { content: @fa-var-brush; } -.@{fa-css-prefix}-btc:before { content: @fa-var-btc; } -.@{fa-css-prefix}-bug:before { content: @fa-var-bug; } -.@{fa-css-prefix}-building:before { content: @fa-var-building; } -.@{fa-css-prefix}-bullhorn:before { content: @fa-var-bullhorn; } -.@{fa-css-prefix}-bullseye:before { content: @fa-var-bullseye; } -.@{fa-css-prefix}-burn:before { content: @fa-var-burn; } -.@{fa-css-prefix}-buromobelexperte:before { content: @fa-var-buromobelexperte; } -.@{fa-css-prefix}-bus:before { content: @fa-var-bus; } -.@{fa-css-prefix}-bus-alt:before { content: @fa-var-bus-alt; } -.@{fa-css-prefix}-business-time:before { content: @fa-var-business-time; } -.@{fa-css-prefix}-buysellads:before { content: @fa-var-buysellads; } -.@{fa-css-prefix}-calculator:before { content: @fa-var-calculator; } -.@{fa-css-prefix}-calendar:before { content: @fa-var-calendar; } -.@{fa-css-prefix}-calendar-alt:before { content: @fa-var-calendar-alt; } -.@{fa-css-prefix}-calendar-check:before { content: @fa-var-calendar-check; } -.@{fa-css-prefix}-calendar-day:before { content: @fa-var-calendar-day; } -.@{fa-css-prefix}-calendar-minus:before { content: @fa-var-calendar-minus; } -.@{fa-css-prefix}-calendar-plus:before { content: @fa-var-calendar-plus; } -.@{fa-css-prefix}-calendar-times:before { content: @fa-var-calendar-times; } -.@{fa-css-prefix}-calendar-week:before { content: @fa-var-calendar-week; } -.@{fa-css-prefix}-camera:before { content: @fa-var-camera; } -.@{fa-css-prefix}-camera-retro:before { content: @fa-var-camera-retro; } -.@{fa-css-prefix}-campground:before { content: @fa-var-campground; } -.@{fa-css-prefix}-canadian-maple-leaf:before { content: @fa-var-canadian-maple-leaf; } -.@{fa-css-prefix}-candy-cane:before { content: @fa-var-candy-cane; } -.@{fa-css-prefix}-cannabis:before { content: @fa-var-cannabis; } -.@{fa-css-prefix}-capsules:before { content: @fa-var-capsules; } -.@{fa-css-prefix}-car:before { content: @fa-var-car; } -.@{fa-css-prefix}-car-alt:before { content: @fa-var-car-alt; } -.@{fa-css-prefix}-car-battery:before { content: @fa-var-car-battery; } -.@{fa-css-prefix}-car-crash:before { content: @fa-var-car-crash; } -.@{fa-css-prefix}-car-side:before { content: @fa-var-car-side; } -.@{fa-css-prefix}-caret-down:before { content: @fa-var-caret-down; } -.@{fa-css-prefix}-caret-left:before { content: @fa-var-caret-left; } -.@{fa-css-prefix}-caret-right:before { content: @fa-var-caret-right; } -.@{fa-css-prefix}-caret-square-down:before { content: @fa-var-caret-square-down; } -.@{fa-css-prefix}-caret-square-left:before { content: @fa-var-caret-square-left; } -.@{fa-css-prefix}-caret-square-right:before { content: @fa-var-caret-square-right; } -.@{fa-css-prefix}-caret-square-up:before { content: @fa-var-caret-square-up; } -.@{fa-css-prefix}-caret-up:before { content: @fa-var-caret-up; } -.@{fa-css-prefix}-carrot:before { content: @fa-var-carrot; } -.@{fa-css-prefix}-cart-arrow-down:before { content: @fa-var-cart-arrow-down; } -.@{fa-css-prefix}-cart-plus:before { content: @fa-var-cart-plus; } -.@{fa-css-prefix}-cash-register:before { content: @fa-var-cash-register; } -.@{fa-css-prefix}-cat:before { content: @fa-var-cat; } -.@{fa-css-prefix}-cc-amazon-pay:before { content: @fa-var-cc-amazon-pay; } -.@{fa-css-prefix}-cc-amex:before { content: @fa-var-cc-amex; } -.@{fa-css-prefix}-cc-apple-pay:before { content: @fa-var-cc-apple-pay; } -.@{fa-css-prefix}-cc-diners-club:before { content: @fa-var-cc-diners-club; } -.@{fa-css-prefix}-cc-discover:before { content: @fa-var-cc-discover; } -.@{fa-css-prefix}-cc-jcb:before { content: @fa-var-cc-jcb; } -.@{fa-css-prefix}-cc-mastercard:before { content: @fa-var-cc-mastercard; } -.@{fa-css-prefix}-cc-paypal:before { content: @fa-var-cc-paypal; } -.@{fa-css-prefix}-cc-stripe:before { content: @fa-var-cc-stripe; } -.@{fa-css-prefix}-cc-visa:before { content: @fa-var-cc-visa; } -.@{fa-css-prefix}-centercode:before { content: @fa-var-centercode; } -.@{fa-css-prefix}-centos:before { content: @fa-var-centos; } -.@{fa-css-prefix}-certificate:before { content: @fa-var-certificate; } -.@{fa-css-prefix}-chair:before { content: @fa-var-chair; } -.@{fa-css-prefix}-chalkboard:before { content: @fa-var-chalkboard; } -.@{fa-css-prefix}-chalkboard-teacher:before { content: @fa-var-chalkboard-teacher; } -.@{fa-css-prefix}-charging-station:before { content: @fa-var-charging-station; } -.@{fa-css-prefix}-chart-area:before { content: @fa-var-chart-area; } -.@{fa-css-prefix}-chart-bar:before { content: @fa-var-chart-bar; } -.@{fa-css-prefix}-chart-line:before { content: @fa-var-chart-line; } -.@{fa-css-prefix}-chart-pie:before { content: @fa-var-chart-pie; } -.@{fa-css-prefix}-check:before { content: @fa-var-check; } -.@{fa-css-prefix}-check-circle:before { content: @fa-var-check-circle; } -.@{fa-css-prefix}-check-double:before { content: @fa-var-check-double; } -.@{fa-css-prefix}-check-square:before { content: @fa-var-check-square; } -.@{fa-css-prefix}-chess:before { content: @fa-var-chess; } -.@{fa-css-prefix}-chess-bishop:before { content: @fa-var-chess-bishop; } -.@{fa-css-prefix}-chess-board:before { content: @fa-var-chess-board; } -.@{fa-css-prefix}-chess-king:before { content: @fa-var-chess-king; } -.@{fa-css-prefix}-chess-knight:before { content: @fa-var-chess-knight; } -.@{fa-css-prefix}-chess-pawn:before { content: @fa-var-chess-pawn; } -.@{fa-css-prefix}-chess-queen:before { content: @fa-var-chess-queen; } -.@{fa-css-prefix}-chess-rook:before { content: @fa-var-chess-rook; } -.@{fa-css-prefix}-chevron-circle-down:before { content: @fa-var-chevron-circle-down; } -.@{fa-css-prefix}-chevron-circle-left:before { content: @fa-var-chevron-circle-left; } -.@{fa-css-prefix}-chevron-circle-right:before { content: @fa-var-chevron-circle-right; } -.@{fa-css-prefix}-chevron-circle-up:before { content: @fa-var-chevron-circle-up; } -.@{fa-css-prefix}-chevron-down:before { content: @fa-var-chevron-down; } -.@{fa-css-prefix}-chevron-left:before { content: @fa-var-chevron-left; } -.@{fa-css-prefix}-chevron-right:before { content: @fa-var-chevron-right; } -.@{fa-css-prefix}-chevron-up:before { content: @fa-var-chevron-up; } -.@{fa-css-prefix}-child:before { content: @fa-var-child; } -.@{fa-css-prefix}-chrome:before { content: @fa-var-chrome; } -.@{fa-css-prefix}-church:before { content: @fa-var-church; } -.@{fa-css-prefix}-circle:before { content: @fa-var-circle; } -.@{fa-css-prefix}-circle-notch:before { content: @fa-var-circle-notch; } -.@{fa-css-prefix}-city:before { content: @fa-var-city; } -.@{fa-css-prefix}-clipboard:before { content: @fa-var-clipboard; } -.@{fa-css-prefix}-clipboard-check:before { content: @fa-var-clipboard-check; } -.@{fa-css-prefix}-clipboard-list:before { content: @fa-var-clipboard-list; } -.@{fa-css-prefix}-clock:before { content: @fa-var-clock; } -.@{fa-css-prefix}-clone:before { content: @fa-var-clone; } -.@{fa-css-prefix}-closed-captioning:before { content: @fa-var-closed-captioning; } -.@{fa-css-prefix}-cloud:before { content: @fa-var-cloud; } -.@{fa-css-prefix}-cloud-download-alt:before { content: @fa-var-cloud-download-alt; } -.@{fa-css-prefix}-cloud-meatball:before { content: @fa-var-cloud-meatball; } -.@{fa-css-prefix}-cloud-moon:before { content: @fa-var-cloud-moon; } -.@{fa-css-prefix}-cloud-moon-rain:before { content: @fa-var-cloud-moon-rain; } -.@{fa-css-prefix}-cloud-rain:before { content: @fa-var-cloud-rain; } -.@{fa-css-prefix}-cloud-showers-heavy:before { content: @fa-var-cloud-showers-heavy; } -.@{fa-css-prefix}-cloud-sun:before { content: @fa-var-cloud-sun; } -.@{fa-css-prefix}-cloud-sun-rain:before { content: @fa-var-cloud-sun-rain; } -.@{fa-css-prefix}-cloud-upload-alt:before { content: @fa-var-cloud-upload-alt; } -.@{fa-css-prefix}-cloudscale:before { content: @fa-var-cloudscale; } -.@{fa-css-prefix}-cloudsmith:before { content: @fa-var-cloudsmith; } -.@{fa-css-prefix}-cloudversify:before { content: @fa-var-cloudversify; } -.@{fa-css-prefix}-cocktail:before { content: @fa-var-cocktail; } -.@{fa-css-prefix}-code:before { content: @fa-var-code; } -.@{fa-css-prefix}-code-branch:before { content: @fa-var-code-branch; } -.@{fa-css-prefix}-codepen:before { content: @fa-var-codepen; } -.@{fa-css-prefix}-codiepie:before { content: @fa-var-codiepie; } -.@{fa-css-prefix}-coffee:before { content: @fa-var-coffee; } -.@{fa-css-prefix}-cog:before { content: @fa-var-cog; } -.@{fa-css-prefix}-cogs:before { content: @fa-var-cogs; } -.@{fa-css-prefix}-coins:before { content: @fa-var-coins; } -.@{fa-css-prefix}-columns:before { content: @fa-var-columns; } -.@{fa-css-prefix}-comment:before { content: @fa-var-comment; } -.@{fa-css-prefix}-comment-alt:before { content: @fa-var-comment-alt; } -.@{fa-css-prefix}-comment-dollar:before { content: @fa-var-comment-dollar; } -.@{fa-css-prefix}-comment-dots:before { content: @fa-var-comment-dots; } -.@{fa-css-prefix}-comment-slash:before { content: @fa-var-comment-slash; } -.@{fa-css-prefix}-comments:before { content: @fa-var-comments; } -.@{fa-css-prefix}-comments-dollar:before { content: @fa-var-comments-dollar; } -.@{fa-css-prefix}-compact-disc:before { content: @fa-var-compact-disc; } -.@{fa-css-prefix}-compass:before { content: @fa-var-compass; } -.@{fa-css-prefix}-compress:before { content: @fa-var-compress; } -.@{fa-css-prefix}-compress-arrows-alt:before { content: @fa-var-compress-arrows-alt; } -.@{fa-css-prefix}-concierge-bell:before { content: @fa-var-concierge-bell; } -.@{fa-css-prefix}-confluence:before { content: @fa-var-confluence; } -.@{fa-css-prefix}-connectdevelop:before { content: @fa-var-connectdevelop; } -.@{fa-css-prefix}-contao:before { content: @fa-var-contao; } -.@{fa-css-prefix}-cookie:before { content: @fa-var-cookie; } -.@{fa-css-prefix}-cookie-bite:before { content: @fa-var-cookie-bite; } -.@{fa-css-prefix}-copy:before { content: @fa-var-copy; } -.@{fa-css-prefix}-copyright:before { content: @fa-var-copyright; } -.@{fa-css-prefix}-couch:before { content: @fa-var-couch; } -.@{fa-css-prefix}-cpanel:before { content: @fa-var-cpanel; } -.@{fa-css-prefix}-creative-commons:before { content: @fa-var-creative-commons; } -.@{fa-css-prefix}-creative-commons-by:before { content: @fa-var-creative-commons-by; } -.@{fa-css-prefix}-creative-commons-nc:before { content: @fa-var-creative-commons-nc; } -.@{fa-css-prefix}-creative-commons-nc-eu:before { content: @fa-var-creative-commons-nc-eu; } -.@{fa-css-prefix}-creative-commons-nc-jp:before { content: @fa-var-creative-commons-nc-jp; } -.@{fa-css-prefix}-creative-commons-nd:before { content: @fa-var-creative-commons-nd; } -.@{fa-css-prefix}-creative-commons-pd:before { content: @fa-var-creative-commons-pd; } -.@{fa-css-prefix}-creative-commons-pd-alt:before { content: @fa-var-creative-commons-pd-alt; } -.@{fa-css-prefix}-creative-commons-remix:before { content: @fa-var-creative-commons-remix; } -.@{fa-css-prefix}-creative-commons-sa:before { content: @fa-var-creative-commons-sa; } -.@{fa-css-prefix}-creative-commons-sampling:before { content: @fa-var-creative-commons-sampling; } -.@{fa-css-prefix}-creative-commons-sampling-plus:before { content: @fa-var-creative-commons-sampling-plus; } -.@{fa-css-prefix}-creative-commons-share:before { content: @fa-var-creative-commons-share; } -.@{fa-css-prefix}-creative-commons-zero:before { content: @fa-var-creative-commons-zero; } -.@{fa-css-prefix}-credit-card:before { content: @fa-var-credit-card; } -.@{fa-css-prefix}-critical-role:before { content: @fa-var-critical-role; } -.@{fa-css-prefix}-crop:before { content: @fa-var-crop; } -.@{fa-css-prefix}-crop-alt:before { content: @fa-var-crop-alt; } -.@{fa-css-prefix}-cross:before { content: @fa-var-cross; } -.@{fa-css-prefix}-crosshairs:before { content: @fa-var-crosshairs; } -.@{fa-css-prefix}-crow:before { content: @fa-var-crow; } -.@{fa-css-prefix}-crown:before { content: @fa-var-crown; } -.@{fa-css-prefix}-css3:before { content: @fa-var-css3; } -.@{fa-css-prefix}-css3-alt:before { content: @fa-var-css3-alt; } -.@{fa-css-prefix}-cube:before { content: @fa-var-cube; } -.@{fa-css-prefix}-cubes:before { content: @fa-var-cubes; } -.@{fa-css-prefix}-cut:before { content: @fa-var-cut; } -.@{fa-css-prefix}-cuttlefish:before { content: @fa-var-cuttlefish; } -.@{fa-css-prefix}-d-and-d:before { content: @fa-var-d-and-d; } -.@{fa-css-prefix}-d-and-d-beyond:before { content: @fa-var-d-and-d-beyond; } -.@{fa-css-prefix}-dashcube:before { content: @fa-var-dashcube; } -.@{fa-css-prefix}-database:before { content: @fa-var-database; } -.@{fa-css-prefix}-deaf:before { content: @fa-var-deaf; } -.@{fa-css-prefix}-delicious:before { content: @fa-var-delicious; } -.@{fa-css-prefix}-democrat:before { content: @fa-var-democrat; } -.@{fa-css-prefix}-deploydog:before { content: @fa-var-deploydog; } -.@{fa-css-prefix}-deskpro:before { content: @fa-var-deskpro; } -.@{fa-css-prefix}-desktop:before { content: @fa-var-desktop; } -.@{fa-css-prefix}-dev:before { content: @fa-var-dev; } -.@{fa-css-prefix}-deviantart:before { content: @fa-var-deviantart; } -.@{fa-css-prefix}-dharmachakra:before { content: @fa-var-dharmachakra; } -.@{fa-css-prefix}-dhl:before { content: @fa-var-dhl; } -.@{fa-css-prefix}-diagnoses:before { content: @fa-var-diagnoses; } -.@{fa-css-prefix}-diaspora:before { content: @fa-var-diaspora; } -.@{fa-css-prefix}-dice:before { content: @fa-var-dice; } -.@{fa-css-prefix}-dice-d20:before { content: @fa-var-dice-d20; } -.@{fa-css-prefix}-dice-d6:before { content: @fa-var-dice-d6; } -.@{fa-css-prefix}-dice-five:before { content: @fa-var-dice-five; } -.@{fa-css-prefix}-dice-four:before { content: @fa-var-dice-four; } -.@{fa-css-prefix}-dice-one:before { content: @fa-var-dice-one; } -.@{fa-css-prefix}-dice-six:before { content: @fa-var-dice-six; } -.@{fa-css-prefix}-dice-three:before { content: @fa-var-dice-three; } -.@{fa-css-prefix}-dice-two:before { content: @fa-var-dice-two; } -.@{fa-css-prefix}-digg:before { content: @fa-var-digg; } -.@{fa-css-prefix}-digital-ocean:before { content: @fa-var-digital-ocean; } -.@{fa-css-prefix}-digital-tachograph:before { content: @fa-var-digital-tachograph; } -.@{fa-css-prefix}-directions:before { content: @fa-var-directions; } -.@{fa-css-prefix}-discord:before { content: @fa-var-discord; } -.@{fa-css-prefix}-discourse:before { content: @fa-var-discourse; } -.@{fa-css-prefix}-divide:before { content: @fa-var-divide; } -.@{fa-css-prefix}-dizzy:before { content: @fa-var-dizzy; } -.@{fa-css-prefix}-dna:before { content: @fa-var-dna; } -.@{fa-css-prefix}-dochub:before { content: @fa-var-dochub; } -.@{fa-css-prefix}-docker:before { content: @fa-var-docker; } -.@{fa-css-prefix}-dog:before { content: @fa-var-dog; } -.@{fa-css-prefix}-dollar-sign:before { content: @fa-var-dollar-sign; } -.@{fa-css-prefix}-dolly:before { content: @fa-var-dolly; } -.@{fa-css-prefix}-dolly-flatbed:before { content: @fa-var-dolly-flatbed; } -.@{fa-css-prefix}-donate:before { content: @fa-var-donate; } -.@{fa-css-prefix}-door-closed:before { content: @fa-var-door-closed; } -.@{fa-css-prefix}-door-open:before { content: @fa-var-door-open; } -.@{fa-css-prefix}-dot-circle:before { content: @fa-var-dot-circle; } -.@{fa-css-prefix}-dove:before { content: @fa-var-dove; } -.@{fa-css-prefix}-download:before { content: @fa-var-download; } -.@{fa-css-prefix}-draft2digital:before { content: @fa-var-draft2digital; } -.@{fa-css-prefix}-drafting-compass:before { content: @fa-var-drafting-compass; } -.@{fa-css-prefix}-dragon:before { content: @fa-var-dragon; } -.@{fa-css-prefix}-draw-polygon:before { content: @fa-var-draw-polygon; } -.@{fa-css-prefix}-dribbble:before { content: @fa-var-dribbble; } -.@{fa-css-prefix}-dribbble-square:before { content: @fa-var-dribbble-square; } -.@{fa-css-prefix}-dropbox:before { content: @fa-var-dropbox; } -.@{fa-css-prefix}-drum:before { content: @fa-var-drum; } -.@{fa-css-prefix}-drum-steelpan:before { content: @fa-var-drum-steelpan; } -.@{fa-css-prefix}-drumstick-bite:before { content: @fa-var-drumstick-bite; } -.@{fa-css-prefix}-drupal:before { content: @fa-var-drupal; } -.@{fa-css-prefix}-dumbbell:before { content: @fa-var-dumbbell; } -.@{fa-css-prefix}-dumpster:before { content: @fa-var-dumpster; } -.@{fa-css-prefix}-dumpster-fire:before { content: @fa-var-dumpster-fire; } -.@{fa-css-prefix}-dungeon:before { content: @fa-var-dungeon; } -.@{fa-css-prefix}-dyalog:before { content: @fa-var-dyalog; } -.@{fa-css-prefix}-earlybirds:before { content: @fa-var-earlybirds; } -.@{fa-css-prefix}-ebay:before { content: @fa-var-ebay; } -.@{fa-css-prefix}-edge:before { content: @fa-var-edge; } -.@{fa-css-prefix}-edit:before { content: @fa-var-edit; } -.@{fa-css-prefix}-eject:before { content: @fa-var-eject; } -.@{fa-css-prefix}-elementor:before { content: @fa-var-elementor; } -.@{fa-css-prefix}-ellipsis-h:before { content: @fa-var-ellipsis-h; } -.@{fa-css-prefix}-ellipsis-v:before { content: @fa-var-ellipsis-v; } -.@{fa-css-prefix}-ello:before { content: @fa-var-ello; } -.@{fa-css-prefix}-ember:before { content: @fa-var-ember; } -.@{fa-css-prefix}-empire:before { content: @fa-var-empire; } -.@{fa-css-prefix}-envelope:before { content: @fa-var-envelope; } -.@{fa-css-prefix}-envelope-open:before { content: @fa-var-envelope-open; } -.@{fa-css-prefix}-envelope-open-text:before { content: @fa-var-envelope-open-text; } -.@{fa-css-prefix}-envelope-square:before { content: @fa-var-envelope-square; } -.@{fa-css-prefix}-envira:before { content: @fa-var-envira; } -.@{fa-css-prefix}-equals:before { content: @fa-var-equals; } -.@{fa-css-prefix}-eraser:before { content: @fa-var-eraser; } -.@{fa-css-prefix}-erlang:before { content: @fa-var-erlang; } -.@{fa-css-prefix}-ethereum:before { content: @fa-var-ethereum; } -.@{fa-css-prefix}-ethernet:before { content: @fa-var-ethernet; } -.@{fa-css-prefix}-etsy:before { content: @fa-var-etsy; } -.@{fa-css-prefix}-euro-sign:before { content: @fa-var-euro-sign; } -.@{fa-css-prefix}-exchange-alt:before { content: @fa-var-exchange-alt; } -.@{fa-css-prefix}-exclamation:before { content: @fa-var-exclamation; } -.@{fa-css-prefix}-exclamation-circle:before { content: @fa-var-exclamation-circle; } -.@{fa-css-prefix}-exclamation-triangle:before { content: @fa-var-exclamation-triangle; } -.@{fa-css-prefix}-expand:before { content: @fa-var-expand; } -.@{fa-css-prefix}-expand-arrows-alt:before { content: @fa-var-expand-arrows-alt; } -.@{fa-css-prefix}-expeditedssl:before { content: @fa-var-expeditedssl; } -.@{fa-css-prefix}-external-link-alt:before { content: @fa-var-external-link-alt; } -.@{fa-css-prefix}-external-link-square-alt:before { content: @fa-var-external-link-square-alt; } -.@{fa-css-prefix}-eye:before { content: @fa-var-eye; } -.@{fa-css-prefix}-eye-dropper:before { content: @fa-var-eye-dropper; } -.@{fa-css-prefix}-eye-slash:before { content: @fa-var-eye-slash; } -.@{fa-css-prefix}-facebook:before { content: @fa-var-facebook; } -.@{fa-css-prefix}-facebook-f:before { content: @fa-var-facebook-f; } -.@{fa-css-prefix}-facebook-messenger:before { content: @fa-var-facebook-messenger; } -.@{fa-css-prefix}-facebook-square:before { content: @fa-var-facebook-square; } -.@{fa-css-prefix}-fantasy-flight-games:before { content: @fa-var-fantasy-flight-games; } -.@{fa-css-prefix}-fast-backward:before { content: @fa-var-fast-backward; } -.@{fa-css-prefix}-fast-forward:before { content: @fa-var-fast-forward; } -.@{fa-css-prefix}-fax:before { content: @fa-var-fax; } -.@{fa-css-prefix}-feather:before { content: @fa-var-feather; } -.@{fa-css-prefix}-feather-alt:before { content: @fa-var-feather-alt; } -.@{fa-css-prefix}-fedex:before { content: @fa-var-fedex; } -.@{fa-css-prefix}-fedora:before { content: @fa-var-fedora; } -.@{fa-css-prefix}-female:before { content: @fa-var-female; } -.@{fa-css-prefix}-fighter-jet:before { content: @fa-var-fighter-jet; } -.@{fa-css-prefix}-figma:before { content: @fa-var-figma; } -.@{fa-css-prefix}-file:before { content: @fa-var-file; } -.@{fa-css-prefix}-file-alt:before { content: @fa-var-file-alt; } -.@{fa-css-prefix}-file-archive:before { content: @fa-var-file-archive; } -.@{fa-css-prefix}-file-audio:before { content: @fa-var-file-audio; } -.@{fa-css-prefix}-file-code:before { content: @fa-var-file-code; } -.@{fa-css-prefix}-file-contract:before { content: @fa-var-file-contract; } -.@{fa-css-prefix}-file-csv:before { content: @fa-var-file-csv; } -.@{fa-css-prefix}-file-download:before { content: @fa-var-file-download; } -.@{fa-css-prefix}-file-excel:before { content: @fa-var-file-excel; } -.@{fa-css-prefix}-file-export:before { content: @fa-var-file-export; } -.@{fa-css-prefix}-file-image:before { content: @fa-var-file-image; } -.@{fa-css-prefix}-file-import:before { content: @fa-var-file-import; } -.@{fa-css-prefix}-file-invoice:before { content: @fa-var-file-invoice; } -.@{fa-css-prefix}-file-invoice-dollar:before { content: @fa-var-file-invoice-dollar; } -.@{fa-css-prefix}-file-medical:before { content: @fa-var-file-medical; } -.@{fa-css-prefix}-file-medical-alt:before { content: @fa-var-file-medical-alt; } -.@{fa-css-prefix}-file-pdf:before { content: @fa-var-file-pdf; } -.@{fa-css-prefix}-file-powerpoint:before { content: @fa-var-file-powerpoint; } -.@{fa-css-prefix}-file-prescription:before { content: @fa-var-file-prescription; } -.@{fa-css-prefix}-file-signature:before { content: @fa-var-file-signature; } -.@{fa-css-prefix}-file-upload:before { content: @fa-var-file-upload; } -.@{fa-css-prefix}-file-video:before { content: @fa-var-file-video; } -.@{fa-css-prefix}-file-word:before { content: @fa-var-file-word; } -.@{fa-css-prefix}-fill:before { content: @fa-var-fill; } -.@{fa-css-prefix}-fill-drip:before { content: @fa-var-fill-drip; } -.@{fa-css-prefix}-film:before { content: @fa-var-film; } -.@{fa-css-prefix}-filter:before { content: @fa-var-filter; } -.@{fa-css-prefix}-fingerprint:before { content: @fa-var-fingerprint; } -.@{fa-css-prefix}-fire:before { content: @fa-var-fire; } -.@{fa-css-prefix}-fire-alt:before { content: @fa-var-fire-alt; } -.@{fa-css-prefix}-fire-extinguisher:before { content: @fa-var-fire-extinguisher; } -.@{fa-css-prefix}-firefox:before { content: @fa-var-firefox; } -.@{fa-css-prefix}-first-aid:before { content: @fa-var-first-aid; } -.@{fa-css-prefix}-first-order:before { content: @fa-var-first-order; } -.@{fa-css-prefix}-first-order-alt:before { content: @fa-var-first-order-alt; } -.@{fa-css-prefix}-firstdraft:before { content: @fa-var-firstdraft; } -.@{fa-css-prefix}-fish:before { content: @fa-var-fish; } -.@{fa-css-prefix}-fist-raised:before { content: @fa-var-fist-raised; } -.@{fa-css-prefix}-flag:before { content: @fa-var-flag; } -.@{fa-css-prefix}-flag-checkered:before { content: @fa-var-flag-checkered; } -.@{fa-css-prefix}-flag-usa:before { content: @fa-var-flag-usa; } -.@{fa-css-prefix}-flask:before { content: @fa-var-flask; } -.@{fa-css-prefix}-flickr:before { content: @fa-var-flickr; } -.@{fa-css-prefix}-flipboard:before { content: @fa-var-flipboard; } -.@{fa-css-prefix}-flushed:before { content: @fa-var-flushed; } -.@{fa-css-prefix}-fly:before { content: @fa-var-fly; } -.@{fa-css-prefix}-folder:before { content: @fa-var-folder; } -.@{fa-css-prefix}-folder-minus:before { content: @fa-var-folder-minus; } -.@{fa-css-prefix}-folder-open:before { content: @fa-var-folder-open; } -.@{fa-css-prefix}-folder-plus:before { content: @fa-var-folder-plus; } -.@{fa-css-prefix}-font:before { content: @fa-var-font; } -.@{fa-css-prefix}-font-awesome:before { content: @fa-var-font-awesome; } -.@{fa-css-prefix}-font-awesome-alt:before { content: @fa-var-font-awesome-alt; } -.@{fa-css-prefix}-font-awesome-flag:before { content: @fa-var-font-awesome-flag; } -.@{fa-css-prefix}-font-awesome-logo-full:before { content: @fa-var-font-awesome-logo-full; } -.@{fa-css-prefix}-fonticons:before { content: @fa-var-fonticons; } -.@{fa-css-prefix}-fonticons-fi:before { content: @fa-var-fonticons-fi; } -.@{fa-css-prefix}-football-ball:before { content: @fa-var-football-ball; } -.@{fa-css-prefix}-fort-awesome:before { content: @fa-var-fort-awesome; } -.@{fa-css-prefix}-fort-awesome-alt:before { content: @fa-var-fort-awesome-alt; } -.@{fa-css-prefix}-forumbee:before { content: @fa-var-forumbee; } -.@{fa-css-prefix}-forward:before { content: @fa-var-forward; } -.@{fa-css-prefix}-foursquare:before { content: @fa-var-foursquare; } -.@{fa-css-prefix}-free-code-camp:before { content: @fa-var-free-code-camp; } -.@{fa-css-prefix}-freebsd:before { content: @fa-var-freebsd; } -.@{fa-css-prefix}-frog:before { content: @fa-var-frog; } -.@{fa-css-prefix}-frown:before { content: @fa-var-frown; } -.@{fa-css-prefix}-frown-open:before { content: @fa-var-frown-open; } -.@{fa-css-prefix}-fulcrum:before { content: @fa-var-fulcrum; } -.@{fa-css-prefix}-funnel-dollar:before { content: @fa-var-funnel-dollar; } -.@{fa-css-prefix}-futbol:before { content: @fa-var-futbol; } -.@{fa-css-prefix}-galactic-republic:before { content: @fa-var-galactic-republic; } -.@{fa-css-prefix}-galactic-senate:before { content: @fa-var-galactic-senate; } -.@{fa-css-prefix}-gamepad:before { content: @fa-var-gamepad; } -.@{fa-css-prefix}-gas-pump:before { content: @fa-var-gas-pump; } -.@{fa-css-prefix}-gavel:before { content: @fa-var-gavel; } -.@{fa-css-prefix}-gem:before { content: @fa-var-gem; } -.@{fa-css-prefix}-genderless:before { content: @fa-var-genderless; } -.@{fa-css-prefix}-get-pocket:before { content: @fa-var-get-pocket; } -.@{fa-css-prefix}-gg:before { content: @fa-var-gg; } -.@{fa-css-prefix}-gg-circle:before { content: @fa-var-gg-circle; } -.@{fa-css-prefix}-ghost:before { content: @fa-var-ghost; } -.@{fa-css-prefix}-gift:before { content: @fa-var-gift; } -.@{fa-css-prefix}-gifts:before { content: @fa-var-gifts; } -.@{fa-css-prefix}-git:before { content: @fa-var-git; } -.@{fa-css-prefix}-git-square:before { content: @fa-var-git-square; } -.@{fa-css-prefix}-github:before { content: @fa-var-github; } -.@{fa-css-prefix}-github-alt:before { content: @fa-var-github-alt; } -.@{fa-css-prefix}-github-square:before { content: @fa-var-github-square; } -.@{fa-css-prefix}-gitkraken:before { content: @fa-var-gitkraken; } -.@{fa-css-prefix}-gitlab:before { content: @fa-var-gitlab; } -.@{fa-css-prefix}-gitter:before { content: @fa-var-gitter; } -.@{fa-css-prefix}-glass-cheers:before { content: @fa-var-glass-cheers; } -.@{fa-css-prefix}-glass-martini:before { content: @fa-var-glass-martini; } -.@{fa-css-prefix}-glass-martini-alt:before { content: @fa-var-glass-martini-alt; } -.@{fa-css-prefix}-glass-whiskey:before { content: @fa-var-glass-whiskey; } -.@{fa-css-prefix}-glasses:before { content: @fa-var-glasses; } -.@{fa-css-prefix}-glide:before { content: @fa-var-glide; } -.@{fa-css-prefix}-glide-g:before { content: @fa-var-glide-g; } -.@{fa-css-prefix}-globe:before { content: @fa-var-globe; } -.@{fa-css-prefix}-globe-africa:before { content: @fa-var-globe-africa; } -.@{fa-css-prefix}-globe-americas:before { content: @fa-var-globe-americas; } -.@{fa-css-prefix}-globe-asia:before { content: @fa-var-globe-asia; } -.@{fa-css-prefix}-globe-europe:before { content: @fa-var-globe-europe; } -.@{fa-css-prefix}-gofore:before { content: @fa-var-gofore; } -.@{fa-css-prefix}-golf-ball:before { content: @fa-var-golf-ball; } -.@{fa-css-prefix}-goodreads:before { content: @fa-var-goodreads; } -.@{fa-css-prefix}-goodreads-g:before { content: @fa-var-goodreads-g; } -.@{fa-css-prefix}-google:before { content: @fa-var-google; } -.@{fa-css-prefix}-google-drive:before { content: @fa-var-google-drive; } -.@{fa-css-prefix}-google-play:before { content: @fa-var-google-play; } -.@{fa-css-prefix}-google-plus:before { content: @fa-var-google-plus; } -.@{fa-css-prefix}-google-plus-g:before { content: @fa-var-google-plus-g; } -.@{fa-css-prefix}-google-plus-square:before { content: @fa-var-google-plus-square; } -.@{fa-css-prefix}-google-wallet:before { content: @fa-var-google-wallet; } -.@{fa-css-prefix}-gopuram:before { content: @fa-var-gopuram; } -.@{fa-css-prefix}-graduation-cap:before { content: @fa-var-graduation-cap; } -.@{fa-css-prefix}-gratipay:before { content: @fa-var-gratipay; } -.@{fa-css-prefix}-grav:before { content: @fa-var-grav; } -.@{fa-css-prefix}-greater-than:before { content: @fa-var-greater-than; } -.@{fa-css-prefix}-greater-than-equal:before { content: @fa-var-greater-than-equal; } -.@{fa-css-prefix}-grimace:before { content: @fa-var-grimace; } -.@{fa-css-prefix}-grin:before { content: @fa-var-grin; } -.@{fa-css-prefix}-grin-alt:before { content: @fa-var-grin-alt; } -.@{fa-css-prefix}-grin-beam:before { content: @fa-var-grin-beam; } -.@{fa-css-prefix}-grin-beam-sweat:before { content: @fa-var-grin-beam-sweat; } -.@{fa-css-prefix}-grin-hearts:before { content: @fa-var-grin-hearts; } -.@{fa-css-prefix}-grin-squint:before { content: @fa-var-grin-squint; } -.@{fa-css-prefix}-grin-squint-tears:before { content: @fa-var-grin-squint-tears; } -.@{fa-css-prefix}-grin-stars:before { content: @fa-var-grin-stars; } -.@{fa-css-prefix}-grin-tears:before { content: @fa-var-grin-tears; } -.@{fa-css-prefix}-grin-tongue:before { content: @fa-var-grin-tongue; } -.@{fa-css-prefix}-grin-tongue-squint:before { content: @fa-var-grin-tongue-squint; } -.@{fa-css-prefix}-grin-tongue-wink:before { content: @fa-var-grin-tongue-wink; } -.@{fa-css-prefix}-grin-wink:before { content: @fa-var-grin-wink; } -.@{fa-css-prefix}-grip-horizontal:before { content: @fa-var-grip-horizontal; } -.@{fa-css-prefix}-grip-lines:before { content: @fa-var-grip-lines; } -.@{fa-css-prefix}-grip-lines-vertical:before { content: @fa-var-grip-lines-vertical; } -.@{fa-css-prefix}-grip-vertical:before { content: @fa-var-grip-vertical; } -.@{fa-css-prefix}-gripfire:before { content: @fa-var-gripfire; } -.@{fa-css-prefix}-grunt:before { content: @fa-var-grunt; } -.@{fa-css-prefix}-guitar:before { content: @fa-var-guitar; } -.@{fa-css-prefix}-gulp:before { content: @fa-var-gulp; } -.@{fa-css-prefix}-h-square:before { content: @fa-var-h-square; } -.@{fa-css-prefix}-hacker-news:before { content: @fa-var-hacker-news; } -.@{fa-css-prefix}-hacker-news-square:before { content: @fa-var-hacker-news-square; } -.@{fa-css-prefix}-hackerrank:before { content: @fa-var-hackerrank; } -.@{fa-css-prefix}-hammer:before { content: @fa-var-hammer; } -.@{fa-css-prefix}-hamsa:before { content: @fa-var-hamsa; } -.@{fa-css-prefix}-hand-holding:before { content: @fa-var-hand-holding; } -.@{fa-css-prefix}-hand-holding-heart:before { content: @fa-var-hand-holding-heart; } -.@{fa-css-prefix}-hand-holding-usd:before { content: @fa-var-hand-holding-usd; } -.@{fa-css-prefix}-hand-lizard:before { content: @fa-var-hand-lizard; } -.@{fa-css-prefix}-hand-paper:before { content: @fa-var-hand-paper; } -.@{fa-css-prefix}-hand-peace:before { content: @fa-var-hand-peace; } -.@{fa-css-prefix}-hand-point-down:before { content: @fa-var-hand-point-down; } -.@{fa-css-prefix}-hand-point-left:before { content: @fa-var-hand-point-left; } -.@{fa-css-prefix}-hand-point-right:before { content: @fa-var-hand-point-right; } -.@{fa-css-prefix}-hand-point-up:before { content: @fa-var-hand-point-up; } -.@{fa-css-prefix}-hand-pointer:before { content: @fa-var-hand-pointer; } -.@{fa-css-prefix}-hand-rock:before { content: @fa-var-hand-rock; } -.@{fa-css-prefix}-hand-scissors:before { content: @fa-var-hand-scissors; } -.@{fa-css-prefix}-hand-spock:before { content: @fa-var-hand-spock; } -.@{fa-css-prefix}-hands:before { content: @fa-var-hands; } -.@{fa-css-prefix}-hands-helping:before { content: @fa-var-hands-helping; } -.@{fa-css-prefix}-handshake:before { content: @fa-var-handshake; } -.@{fa-css-prefix}-hanukiah:before { content: @fa-var-hanukiah; } -.@{fa-css-prefix}-hashtag:before { content: @fa-var-hashtag; } -.@{fa-css-prefix}-hat-wizard:before { content: @fa-var-hat-wizard; } -.@{fa-css-prefix}-haykal:before { content: @fa-var-haykal; } -.@{fa-css-prefix}-hdd:before { content: @fa-var-hdd; } -.@{fa-css-prefix}-heading:before { content: @fa-var-heading; } -.@{fa-css-prefix}-headphones:before { content: @fa-var-headphones; } -.@{fa-css-prefix}-headphones-alt:before { content: @fa-var-headphones-alt; } -.@{fa-css-prefix}-headset:before { content: @fa-var-headset; } -.@{fa-css-prefix}-heart:before { content: @fa-var-heart; } -.@{fa-css-prefix}-heart-broken:before { content: @fa-var-heart-broken; } -.@{fa-css-prefix}-heartbeat:before { content: @fa-var-heartbeat; } -.@{fa-css-prefix}-helicopter:before { content: @fa-var-helicopter; } -.@{fa-css-prefix}-highlighter:before { content: @fa-var-highlighter; } -.@{fa-css-prefix}-hiking:before { content: @fa-var-hiking; } -.@{fa-css-prefix}-hippo:before { content: @fa-var-hippo; } -.@{fa-css-prefix}-hips:before { content: @fa-var-hips; } -.@{fa-css-prefix}-hire-a-helper:before { content: @fa-var-hire-a-helper; } -.@{fa-css-prefix}-history:before { content: @fa-var-history; } -.@{fa-css-prefix}-hockey-puck:before { content: @fa-var-hockey-puck; } -.@{fa-css-prefix}-holly-berry:before { content: @fa-var-holly-berry; } -.@{fa-css-prefix}-home:before { content: @fa-var-home; } -.@{fa-css-prefix}-hooli:before { content: @fa-var-hooli; } -.@{fa-css-prefix}-hornbill:before { content: @fa-var-hornbill; } -.@{fa-css-prefix}-horse:before { content: @fa-var-horse; } -.@{fa-css-prefix}-horse-head:before { content: @fa-var-horse-head; } -.@{fa-css-prefix}-hospital:before { content: @fa-var-hospital; } -.@{fa-css-prefix}-hospital-alt:before { content: @fa-var-hospital-alt; } -.@{fa-css-prefix}-hospital-symbol:before { content: @fa-var-hospital-symbol; } -.@{fa-css-prefix}-hot-tub:before { content: @fa-var-hot-tub; } -.@{fa-css-prefix}-hotel:before { content: @fa-var-hotel; } -.@{fa-css-prefix}-hotjar:before { content: @fa-var-hotjar; } -.@{fa-css-prefix}-hourglass:before { content: @fa-var-hourglass; } -.@{fa-css-prefix}-hourglass-end:before { content: @fa-var-hourglass-end; } -.@{fa-css-prefix}-hourglass-half:before { content: @fa-var-hourglass-half; } -.@{fa-css-prefix}-hourglass-start:before { content: @fa-var-hourglass-start; } -.@{fa-css-prefix}-house-damage:before { content: @fa-var-house-damage; } -.@{fa-css-prefix}-houzz:before { content: @fa-var-houzz; } -.@{fa-css-prefix}-hryvnia:before { content: @fa-var-hryvnia; } -.@{fa-css-prefix}-html5:before { content: @fa-var-html5; } -.@{fa-css-prefix}-hubspot:before { content: @fa-var-hubspot; } -.@{fa-css-prefix}-i-cursor:before { content: @fa-var-i-cursor; } -.@{fa-css-prefix}-icicles:before { content: @fa-var-icicles; } -.@{fa-css-prefix}-id-badge:before { content: @fa-var-id-badge; } -.@{fa-css-prefix}-id-card:before { content: @fa-var-id-card; } -.@{fa-css-prefix}-id-card-alt:before { content: @fa-var-id-card-alt; } -.@{fa-css-prefix}-igloo:before { content: @fa-var-igloo; } -.@{fa-css-prefix}-image:before { content: @fa-var-image; } -.@{fa-css-prefix}-images:before { content: @fa-var-images; } -.@{fa-css-prefix}-imdb:before { content: @fa-var-imdb; } -.@{fa-css-prefix}-inbox:before { content: @fa-var-inbox; } -.@{fa-css-prefix}-indent:before { content: @fa-var-indent; } -.@{fa-css-prefix}-industry:before { content: @fa-var-industry; } -.@{fa-css-prefix}-infinity:before { content: @fa-var-infinity; } -.@{fa-css-prefix}-info:before { content: @fa-var-info; } -.@{fa-css-prefix}-info-circle:before { content: @fa-var-info-circle; } -.@{fa-css-prefix}-instagram:before { content: @fa-var-instagram; } -.@{fa-css-prefix}-intercom:before { content: @fa-var-intercom; } -.@{fa-css-prefix}-internet-explorer:before { content: @fa-var-internet-explorer; } -.@{fa-css-prefix}-invision:before { content: @fa-var-invision; } -.@{fa-css-prefix}-ioxhost:before { content: @fa-var-ioxhost; } -.@{fa-css-prefix}-italic:before { content: @fa-var-italic; } -.@{fa-css-prefix}-itunes:before { content: @fa-var-itunes; } -.@{fa-css-prefix}-itunes-note:before { content: @fa-var-itunes-note; } -.@{fa-css-prefix}-java:before { content: @fa-var-java; } -.@{fa-css-prefix}-jedi:before { content: @fa-var-jedi; } -.@{fa-css-prefix}-jedi-order:before { content: @fa-var-jedi-order; } -.@{fa-css-prefix}-jenkins:before { content: @fa-var-jenkins; } -.@{fa-css-prefix}-jira:before { content: @fa-var-jira; } -.@{fa-css-prefix}-joget:before { content: @fa-var-joget; } -.@{fa-css-prefix}-joint:before { content: @fa-var-joint; } -.@{fa-css-prefix}-joomla:before { content: @fa-var-joomla; } -.@{fa-css-prefix}-journal-whills:before { content: @fa-var-journal-whills; } -.@{fa-css-prefix}-js:before { content: @fa-var-js; } -.@{fa-css-prefix}-js-square:before { content: @fa-var-js-square; } -.@{fa-css-prefix}-jsfiddle:before { content: @fa-var-jsfiddle; } -.@{fa-css-prefix}-kaaba:before { content: @fa-var-kaaba; } -.@{fa-css-prefix}-kaggle:before { content: @fa-var-kaggle; } -.@{fa-css-prefix}-key:before { content: @fa-var-key; } -.@{fa-css-prefix}-keybase:before { content: @fa-var-keybase; } -.@{fa-css-prefix}-keyboard:before { content: @fa-var-keyboard; } -.@{fa-css-prefix}-keycdn:before { content: @fa-var-keycdn; } -.@{fa-css-prefix}-khanda:before { content: @fa-var-khanda; } -.@{fa-css-prefix}-kickstarter:before { content: @fa-var-kickstarter; } -.@{fa-css-prefix}-kickstarter-k:before { content: @fa-var-kickstarter-k; } -.@{fa-css-prefix}-kiss:before { content: @fa-var-kiss; } -.@{fa-css-prefix}-kiss-beam:before { content: @fa-var-kiss-beam; } -.@{fa-css-prefix}-kiss-wink-heart:before { content: @fa-var-kiss-wink-heart; } -.@{fa-css-prefix}-kiwi-bird:before { content: @fa-var-kiwi-bird; } -.@{fa-css-prefix}-korvue:before { content: @fa-var-korvue; } -.@{fa-css-prefix}-landmark:before { content: @fa-var-landmark; } -.@{fa-css-prefix}-language:before { content: @fa-var-language; } -.@{fa-css-prefix}-laptop:before { content: @fa-var-laptop; } -.@{fa-css-prefix}-laptop-code:before { content: @fa-var-laptop-code; } -.@{fa-css-prefix}-laravel:before { content: @fa-var-laravel; } -.@{fa-css-prefix}-lastfm:before { content: @fa-var-lastfm; } -.@{fa-css-prefix}-lastfm-square:before { content: @fa-var-lastfm-square; } -.@{fa-css-prefix}-laugh:before { content: @fa-var-laugh; } -.@{fa-css-prefix}-laugh-beam:before { content: @fa-var-laugh-beam; } -.@{fa-css-prefix}-laugh-squint:before { content: @fa-var-laugh-squint; } -.@{fa-css-prefix}-laugh-wink:before { content: @fa-var-laugh-wink; } -.@{fa-css-prefix}-layer-group:before { content: @fa-var-layer-group; } -.@{fa-css-prefix}-leaf:before { content: @fa-var-leaf; } -.@{fa-css-prefix}-leanpub:before { content: @fa-var-leanpub; } -.@{fa-css-prefix}-lemon:before { content: @fa-var-lemon; } -.@{fa-css-prefix}-less:before { content: @fa-var-less; } -.@{fa-css-prefix}-less-than:before { content: @fa-var-less-than; } -.@{fa-css-prefix}-less-than-equal:before { content: @fa-var-less-than-equal; } -.@{fa-css-prefix}-level-down-alt:before { content: @fa-var-level-down-alt; } -.@{fa-css-prefix}-level-up-alt:before { content: @fa-var-level-up-alt; } -.@{fa-css-prefix}-life-ring:before { content: @fa-var-life-ring; } -.@{fa-css-prefix}-lightbulb:before { content: @fa-var-lightbulb; } -.@{fa-css-prefix}-line:before { content: @fa-var-line; } -.@{fa-css-prefix}-link:before { content: @fa-var-link; } -.@{fa-css-prefix}-linkedin:before { content: @fa-var-linkedin; } -.@{fa-css-prefix}-linkedin-in:before { content: @fa-var-linkedin-in; } -.@{fa-css-prefix}-linode:before { content: @fa-var-linode; } -.@{fa-css-prefix}-linux:before { content: @fa-var-linux; } -.@{fa-css-prefix}-lira-sign:before { content: @fa-var-lira-sign; } -.@{fa-css-prefix}-list:before { content: @fa-var-list; } -.@{fa-css-prefix}-list-alt:before { content: @fa-var-list-alt; } -.@{fa-css-prefix}-list-ol:before { content: @fa-var-list-ol; } -.@{fa-css-prefix}-list-ul:before { content: @fa-var-list-ul; } -.@{fa-css-prefix}-location-arrow:before { content: @fa-var-location-arrow; } -.@{fa-css-prefix}-lock:before { content: @fa-var-lock; } -.@{fa-css-prefix}-lock-open:before { content: @fa-var-lock-open; } -.@{fa-css-prefix}-long-arrow-alt-down:before { content: @fa-var-long-arrow-alt-down; } -.@{fa-css-prefix}-long-arrow-alt-left:before { content: @fa-var-long-arrow-alt-left; } -.@{fa-css-prefix}-long-arrow-alt-right:before { content: @fa-var-long-arrow-alt-right; } -.@{fa-css-prefix}-long-arrow-alt-up:before { content: @fa-var-long-arrow-alt-up; } -.@{fa-css-prefix}-low-vision:before { content: @fa-var-low-vision; } -.@{fa-css-prefix}-luggage-cart:before { content: @fa-var-luggage-cart; } -.@{fa-css-prefix}-lyft:before { content: @fa-var-lyft; } -.@{fa-css-prefix}-magento:before { content: @fa-var-magento; } -.@{fa-css-prefix}-magic:before { content: @fa-var-magic; } -.@{fa-css-prefix}-magnet:before { content: @fa-var-magnet; } -.@{fa-css-prefix}-mail-bulk:before { content: @fa-var-mail-bulk; } -.@{fa-css-prefix}-mailchimp:before { content: @fa-var-mailchimp; } -.@{fa-css-prefix}-male:before { content: @fa-var-male; } -.@{fa-css-prefix}-mandalorian:before { content: @fa-var-mandalorian; } -.@{fa-css-prefix}-map:before { content: @fa-var-map; } -.@{fa-css-prefix}-map-marked:before { content: @fa-var-map-marked; } -.@{fa-css-prefix}-map-marked-alt:before { content: @fa-var-map-marked-alt; } -.@{fa-css-prefix}-map-marker:before { content: @fa-var-map-marker; } -.@{fa-css-prefix}-map-marker-alt:before { content: @fa-var-map-marker-alt; } -.@{fa-css-prefix}-map-pin:before { content: @fa-var-map-pin; } -.@{fa-css-prefix}-map-signs:before { content: @fa-var-map-signs; } -.@{fa-css-prefix}-markdown:before { content: @fa-var-markdown; } -.@{fa-css-prefix}-marker:before { content: @fa-var-marker; } -.@{fa-css-prefix}-mars:before { content: @fa-var-mars; } -.@{fa-css-prefix}-mars-double:before { content: @fa-var-mars-double; } -.@{fa-css-prefix}-mars-stroke:before { content: @fa-var-mars-stroke; } -.@{fa-css-prefix}-mars-stroke-h:before { content: @fa-var-mars-stroke-h; } -.@{fa-css-prefix}-mars-stroke-v:before { content: @fa-var-mars-stroke-v; } -.@{fa-css-prefix}-mask:before { content: @fa-var-mask; } -.@{fa-css-prefix}-mastodon:before { content: @fa-var-mastodon; } -.@{fa-css-prefix}-maxcdn:before { content: @fa-var-maxcdn; } -.@{fa-css-prefix}-medal:before { content: @fa-var-medal; } -.@{fa-css-prefix}-medapps:before { content: @fa-var-medapps; } -.@{fa-css-prefix}-medium:before { content: @fa-var-medium; } -.@{fa-css-prefix}-medium-m:before { content: @fa-var-medium-m; } -.@{fa-css-prefix}-medkit:before { content: @fa-var-medkit; } -.@{fa-css-prefix}-medrt:before { content: @fa-var-medrt; } -.@{fa-css-prefix}-meetup:before { content: @fa-var-meetup; } -.@{fa-css-prefix}-megaport:before { content: @fa-var-megaport; } -.@{fa-css-prefix}-meh:before { content: @fa-var-meh; } -.@{fa-css-prefix}-meh-blank:before { content: @fa-var-meh-blank; } -.@{fa-css-prefix}-meh-rolling-eyes:before { content: @fa-var-meh-rolling-eyes; } -.@{fa-css-prefix}-memory:before { content: @fa-var-memory; } -.@{fa-css-prefix}-mendeley:before { content: @fa-var-mendeley; } -.@{fa-css-prefix}-menorah:before { content: @fa-var-menorah; } -.@{fa-css-prefix}-mercury:before { content: @fa-var-mercury; } -.@{fa-css-prefix}-meteor:before { content: @fa-var-meteor; } -.@{fa-css-prefix}-microchip:before { content: @fa-var-microchip; } -.@{fa-css-prefix}-microphone:before { content: @fa-var-microphone; } -.@{fa-css-prefix}-microphone-alt:before { content: @fa-var-microphone-alt; } -.@{fa-css-prefix}-microphone-alt-slash:before { content: @fa-var-microphone-alt-slash; } -.@{fa-css-prefix}-microphone-slash:before { content: @fa-var-microphone-slash; } -.@{fa-css-prefix}-microscope:before { content: @fa-var-microscope; } -.@{fa-css-prefix}-microsoft:before { content: @fa-var-microsoft; } -.@{fa-css-prefix}-minus:before { content: @fa-var-minus; } -.@{fa-css-prefix}-minus-circle:before { content: @fa-var-minus-circle; } -.@{fa-css-prefix}-minus-square:before { content: @fa-var-minus-square; } -.@{fa-css-prefix}-mitten:before { content: @fa-var-mitten; } -.@{fa-css-prefix}-mix:before { content: @fa-var-mix; } -.@{fa-css-prefix}-mixcloud:before { content: @fa-var-mixcloud; } -.@{fa-css-prefix}-mizuni:before { content: @fa-var-mizuni; } -.@{fa-css-prefix}-mobile:before { content: @fa-var-mobile; } -.@{fa-css-prefix}-mobile-alt:before { content: @fa-var-mobile-alt; } -.@{fa-css-prefix}-modx:before { content: @fa-var-modx; } -.@{fa-css-prefix}-monero:before { content: @fa-var-monero; } -.@{fa-css-prefix}-money-bill:before { content: @fa-var-money-bill; } -.@{fa-css-prefix}-money-bill-alt:before { content: @fa-var-money-bill-alt; } -.@{fa-css-prefix}-money-bill-wave:before { content: @fa-var-money-bill-wave; } -.@{fa-css-prefix}-money-bill-wave-alt:before { content: @fa-var-money-bill-wave-alt; } -.@{fa-css-prefix}-money-check:before { content: @fa-var-money-check; } -.@{fa-css-prefix}-money-check-alt:before { content: @fa-var-money-check-alt; } -.@{fa-css-prefix}-monument:before { content: @fa-var-monument; } -.@{fa-css-prefix}-moon:before { content: @fa-var-moon; } -.@{fa-css-prefix}-mortar-pestle:before { content: @fa-var-mortar-pestle; } -.@{fa-css-prefix}-mosque:before { content: @fa-var-mosque; } -.@{fa-css-prefix}-motorcycle:before { content: @fa-var-motorcycle; } -.@{fa-css-prefix}-mountain:before { content: @fa-var-mountain; } -.@{fa-css-prefix}-mouse-pointer:before { content: @fa-var-mouse-pointer; } -.@{fa-css-prefix}-mug-hot:before { content: @fa-var-mug-hot; } -.@{fa-css-prefix}-music:before { content: @fa-var-music; } -.@{fa-css-prefix}-napster:before { content: @fa-var-napster; } -.@{fa-css-prefix}-neos:before { content: @fa-var-neos; } -.@{fa-css-prefix}-network-wired:before { content: @fa-var-network-wired; } -.@{fa-css-prefix}-neuter:before { content: @fa-var-neuter; } -.@{fa-css-prefix}-newspaper:before { content: @fa-var-newspaper; } -.@{fa-css-prefix}-nimblr:before { content: @fa-var-nimblr; } -.@{fa-css-prefix}-nintendo-switch:before { content: @fa-var-nintendo-switch; } -.@{fa-css-prefix}-node:before { content: @fa-var-node; } -.@{fa-css-prefix}-node-js:before { content: @fa-var-node-js; } -.@{fa-css-prefix}-not-equal:before { content: @fa-var-not-equal; } -.@{fa-css-prefix}-notes-medical:before { content: @fa-var-notes-medical; } -.@{fa-css-prefix}-npm:before { content: @fa-var-npm; } -.@{fa-css-prefix}-ns8:before { content: @fa-var-ns8; } -.@{fa-css-prefix}-nutritionix:before { content: @fa-var-nutritionix; } -.@{fa-css-prefix}-object-group:before { content: @fa-var-object-group; } -.@{fa-css-prefix}-object-ungroup:before { content: @fa-var-object-ungroup; } -.@{fa-css-prefix}-odnoklassniki:before { content: @fa-var-odnoklassniki; } -.@{fa-css-prefix}-odnoklassniki-square:before { content: @fa-var-odnoklassniki-square; } -.@{fa-css-prefix}-oil-can:before { content: @fa-var-oil-can; } -.@{fa-css-prefix}-old-republic:before { content: @fa-var-old-republic; } -.@{fa-css-prefix}-om:before { content: @fa-var-om; } -.@{fa-css-prefix}-opencart:before { content: @fa-var-opencart; } -.@{fa-css-prefix}-openid:before { content: @fa-var-openid; } -.@{fa-css-prefix}-opera:before { content: @fa-var-opera; } -.@{fa-css-prefix}-optin-monster:before { content: @fa-var-optin-monster; } -.@{fa-css-prefix}-osi:before { content: @fa-var-osi; } -.@{fa-css-prefix}-otter:before { content: @fa-var-otter; } -.@{fa-css-prefix}-outdent:before { content: @fa-var-outdent; } -.@{fa-css-prefix}-page4:before { content: @fa-var-page4; } -.@{fa-css-prefix}-pagelines:before { content: @fa-var-pagelines; } -.@{fa-css-prefix}-paint-brush:before { content: @fa-var-paint-brush; } -.@{fa-css-prefix}-paint-roller:before { content: @fa-var-paint-roller; } -.@{fa-css-prefix}-palette:before { content: @fa-var-palette; } -.@{fa-css-prefix}-palfed:before { content: @fa-var-palfed; } -.@{fa-css-prefix}-pallet:before { content: @fa-var-pallet; } -.@{fa-css-prefix}-paper-plane:before { content: @fa-var-paper-plane; } -.@{fa-css-prefix}-paperclip:before { content: @fa-var-paperclip; } -.@{fa-css-prefix}-parachute-box:before { content: @fa-var-parachute-box; } -.@{fa-css-prefix}-paragraph:before { content: @fa-var-paragraph; } -.@{fa-css-prefix}-parking:before { content: @fa-var-parking; } -.@{fa-css-prefix}-passport:before { content: @fa-var-passport; } -.@{fa-css-prefix}-pastafarianism:before { content: @fa-var-pastafarianism; } -.@{fa-css-prefix}-paste:before { content: @fa-var-paste; } -.@{fa-css-prefix}-patreon:before { content: @fa-var-patreon; } -.@{fa-css-prefix}-pause:before { content: @fa-var-pause; } -.@{fa-css-prefix}-pause-circle:before { content: @fa-var-pause-circle; } -.@{fa-css-prefix}-paw:before { content: @fa-var-paw; } -.@{fa-css-prefix}-paypal:before { content: @fa-var-paypal; } -.@{fa-css-prefix}-peace:before { content: @fa-var-peace; } -.@{fa-css-prefix}-pen:before { content: @fa-var-pen; } -.@{fa-css-prefix}-pen-alt:before { content: @fa-var-pen-alt; } -.@{fa-css-prefix}-pen-fancy:before { content: @fa-var-pen-fancy; } -.@{fa-css-prefix}-pen-nib:before { content: @fa-var-pen-nib; } -.@{fa-css-prefix}-pen-square:before { content: @fa-var-pen-square; } -.@{fa-css-prefix}-pencil-alt:before { content: @fa-var-pencil-alt; } -.@{fa-css-prefix}-pencil-ruler:before { content: @fa-var-pencil-ruler; } -.@{fa-css-prefix}-penny-arcade:before { content: @fa-var-penny-arcade; } -.@{fa-css-prefix}-people-carry:before { content: @fa-var-people-carry; } -.@{fa-css-prefix}-percent:before { content: @fa-var-percent; } -.@{fa-css-prefix}-percentage:before { content: @fa-var-percentage; } -.@{fa-css-prefix}-periscope:before { content: @fa-var-periscope; } -.@{fa-css-prefix}-person-booth:before { content: @fa-var-person-booth; } -.@{fa-css-prefix}-phabricator:before { content: @fa-var-phabricator; } -.@{fa-css-prefix}-phoenix-framework:before { content: @fa-var-phoenix-framework; } -.@{fa-css-prefix}-phoenix-squadron:before { content: @fa-var-phoenix-squadron; } -.@{fa-css-prefix}-phone:before { content: @fa-var-phone; } -.@{fa-css-prefix}-phone-slash:before { content: @fa-var-phone-slash; } -.@{fa-css-prefix}-phone-square:before { content: @fa-var-phone-square; } -.@{fa-css-prefix}-phone-volume:before { content: @fa-var-phone-volume; } -.@{fa-css-prefix}-php:before { content: @fa-var-php; } -.@{fa-css-prefix}-pied-piper:before { content: @fa-var-pied-piper; } -.@{fa-css-prefix}-pied-piper-alt:before { content: @fa-var-pied-piper-alt; } -.@{fa-css-prefix}-pied-piper-hat:before { content: @fa-var-pied-piper-hat; } -.@{fa-css-prefix}-pied-piper-pp:before { content: @fa-var-pied-piper-pp; } -.@{fa-css-prefix}-piggy-bank:before { content: @fa-var-piggy-bank; } -.@{fa-css-prefix}-pills:before { content: @fa-var-pills; } -.@{fa-css-prefix}-pinterest:before { content: @fa-var-pinterest; } -.@{fa-css-prefix}-pinterest-p:before { content: @fa-var-pinterest-p; } -.@{fa-css-prefix}-pinterest-square:before { content: @fa-var-pinterest-square; } -.@{fa-css-prefix}-place-of-worship:before { content: @fa-var-place-of-worship; } -.@{fa-css-prefix}-plane:before { content: @fa-var-plane; } -.@{fa-css-prefix}-plane-arrival:before { content: @fa-var-plane-arrival; } -.@{fa-css-prefix}-plane-departure:before { content: @fa-var-plane-departure; } -.@{fa-css-prefix}-play:before { content: @fa-var-play; } -.@{fa-css-prefix}-play-circle:before { content: @fa-var-play-circle; } -.@{fa-css-prefix}-playstation:before { content: @fa-var-playstation; } -.@{fa-css-prefix}-plug:before { content: @fa-var-plug; } -.@{fa-css-prefix}-plus:before { content: @fa-var-plus; } -.@{fa-css-prefix}-plus-circle:before { content: @fa-var-plus-circle; } -.@{fa-css-prefix}-plus-square:before { content: @fa-var-plus-square; } -.@{fa-css-prefix}-podcast:before { content: @fa-var-podcast; } -.@{fa-css-prefix}-poll:before { content: @fa-var-poll; } -.@{fa-css-prefix}-poll-h:before { content: @fa-var-poll-h; } -.@{fa-css-prefix}-poo:before { content: @fa-var-poo; } -.@{fa-css-prefix}-poo-storm:before { content: @fa-var-poo-storm; } -.@{fa-css-prefix}-poop:before { content: @fa-var-poop; } -.@{fa-css-prefix}-portrait:before { content: @fa-var-portrait; } -.@{fa-css-prefix}-pound-sign:before { content: @fa-var-pound-sign; } -.@{fa-css-prefix}-power-off:before { content: @fa-var-power-off; } -.@{fa-css-prefix}-pray:before { content: @fa-var-pray; } -.@{fa-css-prefix}-praying-hands:before { content: @fa-var-praying-hands; } -.@{fa-css-prefix}-prescription:before { content: @fa-var-prescription; } -.@{fa-css-prefix}-prescription-bottle:before { content: @fa-var-prescription-bottle; } -.@{fa-css-prefix}-prescription-bottle-alt:before { content: @fa-var-prescription-bottle-alt; } -.@{fa-css-prefix}-print:before { content: @fa-var-print; } -.@{fa-css-prefix}-procedures:before { content: @fa-var-procedures; } -.@{fa-css-prefix}-product-hunt:before { content: @fa-var-product-hunt; } -.@{fa-css-prefix}-project-diagram:before { content: @fa-var-project-diagram; } -.@{fa-css-prefix}-pushed:before { content: @fa-var-pushed; } -.@{fa-css-prefix}-puzzle-piece:before { content: @fa-var-puzzle-piece; } -.@{fa-css-prefix}-python:before { content: @fa-var-python; } -.@{fa-css-prefix}-qq:before { content: @fa-var-qq; } -.@{fa-css-prefix}-qrcode:before { content: @fa-var-qrcode; } -.@{fa-css-prefix}-question:before { content: @fa-var-question; } -.@{fa-css-prefix}-question-circle:before { content: @fa-var-question-circle; } -.@{fa-css-prefix}-quidditch:before { content: @fa-var-quidditch; } -.@{fa-css-prefix}-quinscape:before { content: @fa-var-quinscape; } -.@{fa-css-prefix}-quora:before { content: @fa-var-quora; } -.@{fa-css-prefix}-quote-left:before { content: @fa-var-quote-left; } -.@{fa-css-prefix}-quote-right:before { content: @fa-var-quote-right; } -.@{fa-css-prefix}-quran:before { content: @fa-var-quran; } -.@{fa-css-prefix}-r-project:before { content: @fa-var-r-project; } -.@{fa-css-prefix}-radiation:before { content: @fa-var-radiation; } -.@{fa-css-prefix}-radiation-alt:before { content: @fa-var-radiation-alt; } -.@{fa-css-prefix}-rainbow:before { content: @fa-var-rainbow; } -.@{fa-css-prefix}-random:before { content: @fa-var-random; } -.@{fa-css-prefix}-raspberry-pi:before { content: @fa-var-raspberry-pi; } -.@{fa-css-prefix}-ravelry:before { content: @fa-var-ravelry; } -.@{fa-css-prefix}-react:before { content: @fa-var-react; } -.@{fa-css-prefix}-reacteurope:before { content: @fa-var-reacteurope; } -.@{fa-css-prefix}-readme:before { content: @fa-var-readme; } -.@{fa-css-prefix}-rebel:before { content: @fa-var-rebel; } -.@{fa-css-prefix}-receipt:before { content: @fa-var-receipt; } -.@{fa-css-prefix}-recycle:before { content: @fa-var-recycle; } -.@{fa-css-prefix}-red-river:before { content: @fa-var-red-river; } -.@{fa-css-prefix}-reddit:before { content: @fa-var-reddit; } -.@{fa-css-prefix}-reddit-alien:before { content: @fa-var-reddit-alien; } -.@{fa-css-prefix}-reddit-square:before { content: @fa-var-reddit-square; } -.@{fa-css-prefix}-redhat:before { content: @fa-var-redhat; } -.@{fa-css-prefix}-redo:before { content: @fa-var-redo; } -.@{fa-css-prefix}-redo-alt:before { content: @fa-var-redo-alt; } -.@{fa-css-prefix}-registered:before { content: @fa-var-registered; } -.@{fa-css-prefix}-renren:before { content: @fa-var-renren; } -.@{fa-css-prefix}-reply:before { content: @fa-var-reply; } -.@{fa-css-prefix}-reply-all:before { content: @fa-var-reply-all; } -.@{fa-css-prefix}-replyd:before { content: @fa-var-replyd; } -.@{fa-css-prefix}-republican:before { content: @fa-var-republican; } -.@{fa-css-prefix}-researchgate:before { content: @fa-var-researchgate; } -.@{fa-css-prefix}-resolving:before { content: @fa-var-resolving; } -.@{fa-css-prefix}-restroom:before { content: @fa-var-restroom; } -.@{fa-css-prefix}-retweet:before { content: @fa-var-retweet; } -.@{fa-css-prefix}-rev:before { content: @fa-var-rev; } -.@{fa-css-prefix}-ribbon:before { content: @fa-var-ribbon; } -.@{fa-css-prefix}-ring:before { content: @fa-var-ring; } -.@{fa-css-prefix}-road:before { content: @fa-var-road; } -.@{fa-css-prefix}-robot:before { content: @fa-var-robot; } -.@{fa-css-prefix}-rocket:before { content: @fa-var-rocket; } -.@{fa-css-prefix}-rocketchat:before { content: @fa-var-rocketchat; } -.@{fa-css-prefix}-rockrms:before { content: @fa-var-rockrms; } -.@{fa-css-prefix}-route:before { content: @fa-var-route; } -.@{fa-css-prefix}-rss:before { content: @fa-var-rss; } -.@{fa-css-prefix}-rss-square:before { content: @fa-var-rss-square; } -.@{fa-css-prefix}-ruble-sign:before { content: @fa-var-ruble-sign; } -.@{fa-css-prefix}-ruler:before { content: @fa-var-ruler; } -.@{fa-css-prefix}-ruler-combined:before { content: @fa-var-ruler-combined; } -.@{fa-css-prefix}-ruler-horizontal:before { content: @fa-var-ruler-horizontal; } -.@{fa-css-prefix}-ruler-vertical:before { content: @fa-var-ruler-vertical; } -.@{fa-css-prefix}-running:before { content: @fa-var-running; } -.@{fa-css-prefix}-rupee-sign:before { content: @fa-var-rupee-sign; } -.@{fa-css-prefix}-sad-cry:before { content: @fa-var-sad-cry; } -.@{fa-css-prefix}-sad-tear:before { content: @fa-var-sad-tear; } -.@{fa-css-prefix}-safari:before { content: @fa-var-safari; } -.@{fa-css-prefix}-sass:before { content: @fa-var-sass; } -.@{fa-css-prefix}-satellite:before { content: @fa-var-satellite; } -.@{fa-css-prefix}-satellite-dish:before { content: @fa-var-satellite-dish; } -.@{fa-css-prefix}-save:before { content: @fa-var-save; } -.@{fa-css-prefix}-schlix:before { content: @fa-var-schlix; } -.@{fa-css-prefix}-school:before { content: @fa-var-school; } -.@{fa-css-prefix}-screwdriver:before { content: @fa-var-screwdriver; } -.@{fa-css-prefix}-scribd:before { content: @fa-var-scribd; } -.@{fa-css-prefix}-scroll:before { content: @fa-var-scroll; } -.@{fa-css-prefix}-sd-card:before { content: @fa-var-sd-card; } -.@{fa-css-prefix}-search:before { content: @fa-var-search; } -.@{fa-css-prefix}-search-dollar:before { content: @fa-var-search-dollar; } -.@{fa-css-prefix}-search-location:before { content: @fa-var-search-location; } -.@{fa-css-prefix}-search-minus:before { content: @fa-var-search-minus; } -.@{fa-css-prefix}-search-plus:before { content: @fa-var-search-plus; } -.@{fa-css-prefix}-searchengin:before { content: @fa-var-searchengin; } -.@{fa-css-prefix}-seedling:before { content: @fa-var-seedling; } -.@{fa-css-prefix}-sellcast:before { content: @fa-var-sellcast; } -.@{fa-css-prefix}-sellsy:before { content: @fa-var-sellsy; } -.@{fa-css-prefix}-server:before { content: @fa-var-server; } -.@{fa-css-prefix}-servicestack:before { content: @fa-var-servicestack; } -.@{fa-css-prefix}-shapes:before { content: @fa-var-shapes; } -.@{fa-css-prefix}-share:before { content: @fa-var-share; } -.@{fa-css-prefix}-share-alt:before { content: @fa-var-share-alt; } -.@{fa-css-prefix}-share-alt-square:before { content: @fa-var-share-alt-square; } -.@{fa-css-prefix}-share-square:before { content: @fa-var-share-square; } -.@{fa-css-prefix}-shekel-sign:before { content: @fa-var-shekel-sign; } -.@{fa-css-prefix}-shield-alt:before { content: @fa-var-shield-alt; } -.@{fa-css-prefix}-ship:before { content: @fa-var-ship; } -.@{fa-css-prefix}-shipping-fast:before { content: @fa-var-shipping-fast; } -.@{fa-css-prefix}-shirtsinbulk:before { content: @fa-var-shirtsinbulk; } -.@{fa-css-prefix}-shoe-prints:before { content: @fa-var-shoe-prints; } -.@{fa-css-prefix}-shopping-bag:before { content: @fa-var-shopping-bag; } -.@{fa-css-prefix}-shopping-basket:before { content: @fa-var-shopping-basket; } -.@{fa-css-prefix}-shopping-cart:before { content: @fa-var-shopping-cart; } -.@{fa-css-prefix}-shopware:before { content: @fa-var-shopware; } -.@{fa-css-prefix}-shower:before { content: @fa-var-shower; } -.@{fa-css-prefix}-shuttle-van:before { content: @fa-var-shuttle-van; } -.@{fa-css-prefix}-sign:before { content: @fa-var-sign; } -.@{fa-css-prefix}-sign-in-alt:before { content: @fa-var-sign-in-alt; } -.@{fa-css-prefix}-sign-language:before { content: @fa-var-sign-language; } -.@{fa-css-prefix}-sign-out-alt:before { content: @fa-var-sign-out-alt; } -.@{fa-css-prefix}-signal:before { content: @fa-var-signal; } -.@{fa-css-prefix}-signature:before { content: @fa-var-signature; } -.@{fa-css-prefix}-sim-card:before { content: @fa-var-sim-card; } -.@{fa-css-prefix}-simplybuilt:before { content: @fa-var-simplybuilt; } -.@{fa-css-prefix}-sistrix:before { content: @fa-var-sistrix; } -.@{fa-css-prefix}-sitemap:before { content: @fa-var-sitemap; } -.@{fa-css-prefix}-sith:before { content: @fa-var-sith; } -.@{fa-css-prefix}-skating:before { content: @fa-var-skating; } -.@{fa-css-prefix}-sketch:before { content: @fa-var-sketch; } -.@{fa-css-prefix}-skiing:before { content: @fa-var-skiing; } -.@{fa-css-prefix}-skiing-nordic:before { content: @fa-var-skiing-nordic; } -.@{fa-css-prefix}-skull:before { content: @fa-var-skull; } -.@{fa-css-prefix}-skull-crossbones:before { content: @fa-var-skull-crossbones; } -.@{fa-css-prefix}-skyatlas:before { content: @fa-var-skyatlas; } -.@{fa-css-prefix}-skype:before { content: @fa-var-skype; } -.@{fa-css-prefix}-slack:before { content: @fa-var-slack; } -.@{fa-css-prefix}-slack-hash:before { content: @fa-var-slack-hash; } -.@{fa-css-prefix}-slash:before { content: @fa-var-slash; } -.@{fa-css-prefix}-sleigh:before { content: @fa-var-sleigh; } -.@{fa-css-prefix}-sliders-h:before { content: @fa-var-sliders-h; } -.@{fa-css-prefix}-slideshare:before { content: @fa-var-slideshare; } -.@{fa-css-prefix}-smile:before { content: @fa-var-smile; } -.@{fa-css-prefix}-smile-beam:before { content: @fa-var-smile-beam; } -.@{fa-css-prefix}-smile-wink:before { content: @fa-var-smile-wink; } -.@{fa-css-prefix}-smog:before { content: @fa-var-smog; } -.@{fa-css-prefix}-smoking:before { content: @fa-var-smoking; } -.@{fa-css-prefix}-smoking-ban:before { content: @fa-var-smoking-ban; } -.@{fa-css-prefix}-sms:before { content: @fa-var-sms; } -.@{fa-css-prefix}-snapchat:before { content: @fa-var-snapchat; } -.@{fa-css-prefix}-snapchat-ghost:before { content: @fa-var-snapchat-ghost; } -.@{fa-css-prefix}-snapchat-square:before { content: @fa-var-snapchat-square; } -.@{fa-css-prefix}-snowboarding:before { content: @fa-var-snowboarding; } -.@{fa-css-prefix}-snowflake:before { content: @fa-var-snowflake; } -.@{fa-css-prefix}-snowman:before { content: @fa-var-snowman; } -.@{fa-css-prefix}-snowplow:before { content: @fa-var-snowplow; } -.@{fa-css-prefix}-socks:before { content: @fa-var-socks; } -.@{fa-css-prefix}-solar-panel:before { content: @fa-var-solar-panel; } -.@{fa-css-prefix}-sort:before { content: @fa-var-sort; } -.@{fa-css-prefix}-sort-alpha-down:before { content: @fa-var-sort-alpha-down; } -.@{fa-css-prefix}-sort-alpha-up:before { content: @fa-var-sort-alpha-up; } -.@{fa-css-prefix}-sort-amount-down:before { content: @fa-var-sort-amount-down; } -.@{fa-css-prefix}-sort-amount-up:before { content: @fa-var-sort-amount-up; } -.@{fa-css-prefix}-sort-down:before { content: @fa-var-sort-down; } -.@{fa-css-prefix}-sort-numeric-down:before { content: @fa-var-sort-numeric-down; } -.@{fa-css-prefix}-sort-numeric-up:before { content: @fa-var-sort-numeric-up; } -.@{fa-css-prefix}-sort-up:before { content: @fa-var-sort-up; } -.@{fa-css-prefix}-soundcloud:before { content: @fa-var-soundcloud; } -.@{fa-css-prefix}-sourcetree:before { content: @fa-var-sourcetree; } -.@{fa-css-prefix}-spa:before { content: @fa-var-spa; } -.@{fa-css-prefix}-space-shuttle:before { content: @fa-var-space-shuttle; } -.@{fa-css-prefix}-speakap:before { content: @fa-var-speakap; } -.@{fa-css-prefix}-spider:before { content: @fa-var-spider; } -.@{fa-css-prefix}-spinner:before { content: @fa-var-spinner; } -.@{fa-css-prefix}-splotch:before { content: @fa-var-splotch; } -.@{fa-css-prefix}-spotify:before { content: @fa-var-spotify; } -.@{fa-css-prefix}-spray-can:before { content: @fa-var-spray-can; } -.@{fa-css-prefix}-square:before { content: @fa-var-square; } -.@{fa-css-prefix}-square-full:before { content: @fa-var-square-full; } -.@{fa-css-prefix}-square-root-alt:before { content: @fa-var-square-root-alt; } -.@{fa-css-prefix}-squarespace:before { content: @fa-var-squarespace; } -.@{fa-css-prefix}-stack-exchange:before { content: @fa-var-stack-exchange; } -.@{fa-css-prefix}-stack-overflow:before { content: @fa-var-stack-overflow; } -.@{fa-css-prefix}-stamp:before { content: @fa-var-stamp; } -.@{fa-css-prefix}-star:before { content: @fa-var-star; } -.@{fa-css-prefix}-star-and-crescent:before { content: @fa-var-star-and-crescent; } -.@{fa-css-prefix}-star-half:before { content: @fa-var-star-half; } -.@{fa-css-prefix}-star-half-alt:before { content: @fa-var-star-half-alt; } -.@{fa-css-prefix}-star-of-david:before { content: @fa-var-star-of-david; } -.@{fa-css-prefix}-star-of-life:before { content: @fa-var-star-of-life; } -.@{fa-css-prefix}-staylinked:before { content: @fa-var-staylinked; } -.@{fa-css-prefix}-steam:before { content: @fa-var-steam; } -.@{fa-css-prefix}-steam-square:before { content: @fa-var-steam-square; } -.@{fa-css-prefix}-steam-symbol:before { content: @fa-var-steam-symbol; } -.@{fa-css-prefix}-step-backward:before { content: @fa-var-step-backward; } -.@{fa-css-prefix}-step-forward:before { content: @fa-var-step-forward; } -.@{fa-css-prefix}-stethoscope:before { content: @fa-var-stethoscope; } -.@{fa-css-prefix}-sticker-mule:before { content: @fa-var-sticker-mule; } -.@{fa-css-prefix}-sticky-note:before { content: @fa-var-sticky-note; } -.@{fa-css-prefix}-stop:before { content: @fa-var-stop; } -.@{fa-css-prefix}-stop-circle:before { content: @fa-var-stop-circle; } -.@{fa-css-prefix}-stopwatch:before { content: @fa-var-stopwatch; } -.@{fa-css-prefix}-store:before { content: @fa-var-store; } -.@{fa-css-prefix}-store-alt:before { content: @fa-var-store-alt; } -.@{fa-css-prefix}-strava:before { content: @fa-var-strava; } -.@{fa-css-prefix}-stream:before { content: @fa-var-stream; } -.@{fa-css-prefix}-street-view:before { content: @fa-var-street-view; } -.@{fa-css-prefix}-strikethrough:before { content: @fa-var-strikethrough; } -.@{fa-css-prefix}-stripe:before { content: @fa-var-stripe; } -.@{fa-css-prefix}-stripe-s:before { content: @fa-var-stripe-s; } -.@{fa-css-prefix}-stroopwafel:before { content: @fa-var-stroopwafel; } -.@{fa-css-prefix}-studiovinari:before { content: @fa-var-studiovinari; } -.@{fa-css-prefix}-stumbleupon:before { content: @fa-var-stumbleupon; } -.@{fa-css-prefix}-stumbleupon-circle:before { content: @fa-var-stumbleupon-circle; } -.@{fa-css-prefix}-subscript:before { content: @fa-var-subscript; } -.@{fa-css-prefix}-subway:before { content: @fa-var-subway; } -.@{fa-css-prefix}-suitcase:before { content: @fa-var-suitcase; } -.@{fa-css-prefix}-suitcase-rolling:before { content: @fa-var-suitcase-rolling; } -.@{fa-css-prefix}-sun:before { content: @fa-var-sun; } -.@{fa-css-prefix}-superpowers:before { content: @fa-var-superpowers; } -.@{fa-css-prefix}-superscript:before { content: @fa-var-superscript; } -.@{fa-css-prefix}-supple:before { content: @fa-var-supple; } -.@{fa-css-prefix}-surprise:before { content: @fa-var-surprise; } -.@{fa-css-prefix}-suse:before { content: @fa-var-suse; } -.@{fa-css-prefix}-swatchbook:before { content: @fa-var-swatchbook; } -.@{fa-css-prefix}-swimmer:before { content: @fa-var-swimmer; } -.@{fa-css-prefix}-swimming-pool:before { content: @fa-var-swimming-pool; } -.@{fa-css-prefix}-synagogue:before { content: @fa-var-synagogue; } -.@{fa-css-prefix}-sync:before { content: @fa-var-sync; } -.@{fa-css-prefix}-sync-alt:before { content: @fa-var-sync-alt; } -.@{fa-css-prefix}-syringe:before { content: @fa-var-syringe; } -.@{fa-css-prefix}-table:before { content: @fa-var-table; } -.@{fa-css-prefix}-table-tennis:before { content: @fa-var-table-tennis; } -.@{fa-css-prefix}-tablet:before { content: @fa-var-tablet; } -.@{fa-css-prefix}-tablet-alt:before { content: @fa-var-tablet-alt; } -.@{fa-css-prefix}-tablets:before { content: @fa-var-tablets; } -.@{fa-css-prefix}-tachometer-alt:before { content: @fa-var-tachometer-alt; } -.@{fa-css-prefix}-tag:before { content: @fa-var-tag; } -.@{fa-css-prefix}-tags:before { content: @fa-var-tags; } -.@{fa-css-prefix}-tape:before { content: @fa-var-tape; } -.@{fa-css-prefix}-tasks:before { content: @fa-var-tasks; } -.@{fa-css-prefix}-taxi:before { content: @fa-var-taxi; } -.@{fa-css-prefix}-teamspeak:before { content: @fa-var-teamspeak; } -.@{fa-css-prefix}-teeth:before { content: @fa-var-teeth; } -.@{fa-css-prefix}-teeth-open:before { content: @fa-var-teeth-open; } -.@{fa-css-prefix}-telegram:before { content: @fa-var-telegram; } -.@{fa-css-prefix}-telegram-plane:before { content: @fa-var-telegram-plane; } -.@{fa-css-prefix}-temperature-high:before { content: @fa-var-temperature-high; } -.@{fa-css-prefix}-temperature-low:before { content: @fa-var-temperature-low; } -.@{fa-css-prefix}-tencent-weibo:before { content: @fa-var-tencent-weibo; } -.@{fa-css-prefix}-tenge:before { content: @fa-var-tenge; } -.@{fa-css-prefix}-terminal:before { content: @fa-var-terminal; } -.@{fa-css-prefix}-text-height:before { content: @fa-var-text-height; } -.@{fa-css-prefix}-text-width:before { content: @fa-var-text-width; } -.@{fa-css-prefix}-th:before { content: @fa-var-th; } -.@{fa-css-prefix}-th-large:before { content: @fa-var-th-large; } -.@{fa-css-prefix}-th-list:before { content: @fa-var-th-list; } -.@{fa-css-prefix}-the-red-yeti:before { content: @fa-var-the-red-yeti; } -.@{fa-css-prefix}-theater-masks:before { content: @fa-var-theater-masks; } -.@{fa-css-prefix}-themeco:before { content: @fa-var-themeco; } -.@{fa-css-prefix}-themeisle:before { content: @fa-var-themeisle; } -.@{fa-css-prefix}-thermometer:before { content: @fa-var-thermometer; } -.@{fa-css-prefix}-thermometer-empty:before { content: @fa-var-thermometer-empty; } -.@{fa-css-prefix}-thermometer-full:before { content: @fa-var-thermometer-full; } -.@{fa-css-prefix}-thermometer-half:before { content: @fa-var-thermometer-half; } -.@{fa-css-prefix}-thermometer-quarter:before { content: @fa-var-thermometer-quarter; } -.@{fa-css-prefix}-thermometer-three-quarters:before { content: @fa-var-thermometer-three-quarters; } -.@{fa-css-prefix}-think-peaks:before { content: @fa-var-think-peaks; } -.@{fa-css-prefix}-thumbs-down:before { content: @fa-var-thumbs-down; } -.@{fa-css-prefix}-thumbs-up:before { content: @fa-var-thumbs-up; } -.@{fa-css-prefix}-thumbtack:before { content: @fa-var-thumbtack; } -.@{fa-css-prefix}-ticket-alt:before { content: @fa-var-ticket-alt; } -.@{fa-css-prefix}-times:before { content: @fa-var-times; } -.@{fa-css-prefix}-times-circle:before { content: @fa-var-times-circle; } -.@{fa-css-prefix}-tint:before { content: @fa-var-tint; } -.@{fa-css-prefix}-tint-slash:before { content: @fa-var-tint-slash; } -.@{fa-css-prefix}-tired:before { content: @fa-var-tired; } -.@{fa-css-prefix}-toggle-off:before { content: @fa-var-toggle-off; } -.@{fa-css-prefix}-toggle-on:before { content: @fa-var-toggle-on; } -.@{fa-css-prefix}-toilet:before { content: @fa-var-toilet; } -.@{fa-css-prefix}-toilet-paper:before { content: @fa-var-toilet-paper; } -.@{fa-css-prefix}-toolbox:before { content: @fa-var-toolbox; } -.@{fa-css-prefix}-tools:before { content: @fa-var-tools; } -.@{fa-css-prefix}-tooth:before { content: @fa-var-tooth; } -.@{fa-css-prefix}-torah:before { content: @fa-var-torah; } -.@{fa-css-prefix}-torii-gate:before { content: @fa-var-torii-gate; } -.@{fa-css-prefix}-tractor:before { content: @fa-var-tractor; } -.@{fa-css-prefix}-trade-federation:before { content: @fa-var-trade-federation; } -.@{fa-css-prefix}-trademark:before { content: @fa-var-trademark; } -.@{fa-css-prefix}-traffic-light:before { content: @fa-var-traffic-light; } -.@{fa-css-prefix}-train:before { content: @fa-var-train; } -.@{fa-css-prefix}-tram:before { content: @fa-var-tram; } -.@{fa-css-prefix}-transgender:before { content: @fa-var-transgender; } -.@{fa-css-prefix}-transgender-alt:before { content: @fa-var-transgender-alt; } -.@{fa-css-prefix}-trash:before { content: @fa-var-trash; } -.@{fa-css-prefix}-trash-alt:before { content: @fa-var-trash-alt; } -.@{fa-css-prefix}-tree:before { content: @fa-var-tree; } -.@{fa-css-prefix}-trello:before { content: @fa-var-trello; } -.@{fa-css-prefix}-tripadvisor:before { content: @fa-var-tripadvisor; } -.@{fa-css-prefix}-trophy:before { content: @fa-var-trophy; } -.@{fa-css-prefix}-truck:before { content: @fa-var-truck; } -.@{fa-css-prefix}-truck-loading:before { content: @fa-var-truck-loading; } -.@{fa-css-prefix}-truck-monster:before { content: @fa-var-truck-monster; } -.@{fa-css-prefix}-truck-moving:before { content: @fa-var-truck-moving; } -.@{fa-css-prefix}-truck-pickup:before { content: @fa-var-truck-pickup; } -.@{fa-css-prefix}-tshirt:before { content: @fa-var-tshirt; } -.@{fa-css-prefix}-tty:before { content: @fa-var-tty; } -.@{fa-css-prefix}-tumblr:before { content: @fa-var-tumblr; } -.@{fa-css-prefix}-tumblr-square:before { content: @fa-var-tumblr-square; } -.@{fa-css-prefix}-tv:before { content: @fa-var-tv; } -.@{fa-css-prefix}-twitch:before { content: @fa-var-twitch; } -.@{fa-css-prefix}-twitter:before { content: @fa-var-twitter; } -.@{fa-css-prefix}-twitter-square:before { content: @fa-var-twitter-square; } -.@{fa-css-prefix}-typo3:before { content: @fa-var-typo3; } -.@{fa-css-prefix}-uber:before { content: @fa-var-uber; } -.@{fa-css-prefix}-ubuntu:before { content: @fa-var-ubuntu; } -.@{fa-css-prefix}-uikit:before { content: @fa-var-uikit; } -.@{fa-css-prefix}-umbrella:before { content: @fa-var-umbrella; } -.@{fa-css-prefix}-umbrella-beach:before { content: @fa-var-umbrella-beach; } -.@{fa-css-prefix}-underline:before { content: @fa-var-underline; } -.@{fa-css-prefix}-undo:before { content: @fa-var-undo; } -.@{fa-css-prefix}-undo-alt:before { content: @fa-var-undo-alt; } -.@{fa-css-prefix}-uniregistry:before { content: @fa-var-uniregistry; } -.@{fa-css-prefix}-universal-access:before { content: @fa-var-universal-access; } -.@{fa-css-prefix}-university:before { content: @fa-var-university; } -.@{fa-css-prefix}-unlink:before { content: @fa-var-unlink; } -.@{fa-css-prefix}-unlock:before { content: @fa-var-unlock; } -.@{fa-css-prefix}-unlock-alt:before { content: @fa-var-unlock-alt; } -.@{fa-css-prefix}-untappd:before { content: @fa-var-untappd; } -.@{fa-css-prefix}-upload:before { content: @fa-var-upload; } -.@{fa-css-prefix}-ups:before { content: @fa-var-ups; } -.@{fa-css-prefix}-usb:before { content: @fa-var-usb; } -.@{fa-css-prefix}-user:before { content: @fa-var-user; } -.@{fa-css-prefix}-user-alt:before { content: @fa-var-user-alt; } -.@{fa-css-prefix}-user-alt-slash:before { content: @fa-var-user-alt-slash; } -.@{fa-css-prefix}-user-astronaut:before { content: @fa-var-user-astronaut; } -.@{fa-css-prefix}-user-check:before { content: @fa-var-user-check; } -.@{fa-css-prefix}-user-circle:before { content: @fa-var-user-circle; } -.@{fa-css-prefix}-user-clock:before { content: @fa-var-user-clock; } -.@{fa-css-prefix}-user-cog:before { content: @fa-var-user-cog; } -.@{fa-css-prefix}-user-edit:before { content: @fa-var-user-edit; } -.@{fa-css-prefix}-user-friends:before { content: @fa-var-user-friends; } -.@{fa-css-prefix}-user-graduate:before { content: @fa-var-user-graduate; } -.@{fa-css-prefix}-user-injured:before { content: @fa-var-user-injured; } -.@{fa-css-prefix}-user-lock:before { content: @fa-var-user-lock; } -.@{fa-css-prefix}-user-md:before { content: @fa-var-user-md; } -.@{fa-css-prefix}-user-minus:before { content: @fa-var-user-minus; } -.@{fa-css-prefix}-user-ninja:before { content: @fa-var-user-ninja; } -.@{fa-css-prefix}-user-plus:before { content: @fa-var-user-plus; } -.@{fa-css-prefix}-user-secret:before { content: @fa-var-user-secret; } -.@{fa-css-prefix}-user-shield:before { content: @fa-var-user-shield; } -.@{fa-css-prefix}-user-slash:before { content: @fa-var-user-slash; } -.@{fa-css-prefix}-user-tag:before { content: @fa-var-user-tag; } -.@{fa-css-prefix}-user-tie:before { content: @fa-var-user-tie; } -.@{fa-css-prefix}-user-times:before { content: @fa-var-user-times; } -.@{fa-css-prefix}-users:before { content: @fa-var-users; } -.@{fa-css-prefix}-users-cog:before { content: @fa-var-users-cog; } -.@{fa-css-prefix}-usps:before { content: @fa-var-usps; } -.@{fa-css-prefix}-ussunnah:before { content: @fa-var-ussunnah; } -.@{fa-css-prefix}-utensil-spoon:before { content: @fa-var-utensil-spoon; } -.@{fa-css-prefix}-utensils:before { content: @fa-var-utensils; } -.@{fa-css-prefix}-vaadin:before { content: @fa-var-vaadin; } -.@{fa-css-prefix}-vector-square:before { content: @fa-var-vector-square; } -.@{fa-css-prefix}-venus:before { content: @fa-var-venus; } -.@{fa-css-prefix}-venus-double:before { content: @fa-var-venus-double; } -.@{fa-css-prefix}-venus-mars:before { content: @fa-var-venus-mars; } -.@{fa-css-prefix}-viacoin:before { content: @fa-var-viacoin; } -.@{fa-css-prefix}-viadeo:before { content: @fa-var-viadeo; } -.@{fa-css-prefix}-viadeo-square:before { content: @fa-var-viadeo-square; } -.@{fa-css-prefix}-vial:before { content: @fa-var-vial; } -.@{fa-css-prefix}-vials:before { content: @fa-var-vials; } -.@{fa-css-prefix}-viber:before { content: @fa-var-viber; } -.@{fa-css-prefix}-video:before { content: @fa-var-video; } -.@{fa-css-prefix}-video-slash:before { content: @fa-var-video-slash; } -.@{fa-css-prefix}-vihara:before { content: @fa-var-vihara; } -.@{fa-css-prefix}-vimeo:before { content: @fa-var-vimeo; } -.@{fa-css-prefix}-vimeo-square:before { content: @fa-var-vimeo-square; } -.@{fa-css-prefix}-vimeo-v:before { content: @fa-var-vimeo-v; } -.@{fa-css-prefix}-vine:before { content: @fa-var-vine; } -.@{fa-css-prefix}-vk:before { content: @fa-var-vk; } -.@{fa-css-prefix}-vnv:before { content: @fa-var-vnv; } -.@{fa-css-prefix}-volleyball-ball:before { content: @fa-var-volleyball-ball; } -.@{fa-css-prefix}-volume-down:before { content: @fa-var-volume-down; } -.@{fa-css-prefix}-volume-mute:before { content: @fa-var-volume-mute; } -.@{fa-css-prefix}-volume-off:before { content: @fa-var-volume-off; } -.@{fa-css-prefix}-volume-up:before { content: @fa-var-volume-up; } -.@{fa-css-prefix}-vote-yea:before { content: @fa-var-vote-yea; } -.@{fa-css-prefix}-vr-cardboard:before { content: @fa-var-vr-cardboard; } -.@{fa-css-prefix}-vuejs:before { content: @fa-var-vuejs; } -.@{fa-css-prefix}-walking:before { content: @fa-var-walking; } -.@{fa-css-prefix}-wallet:before { content: @fa-var-wallet; } -.@{fa-css-prefix}-warehouse:before { content: @fa-var-warehouse; } -.@{fa-css-prefix}-water:before { content: @fa-var-water; } -.@{fa-css-prefix}-weebly:before { content: @fa-var-weebly; } -.@{fa-css-prefix}-weibo:before { content: @fa-var-weibo; } -.@{fa-css-prefix}-weight:before { content: @fa-var-weight; } -.@{fa-css-prefix}-weight-hanging:before { content: @fa-var-weight-hanging; } -.@{fa-css-prefix}-weixin:before { content: @fa-var-weixin; } -.@{fa-css-prefix}-whatsapp:before { content: @fa-var-whatsapp; } -.@{fa-css-prefix}-whatsapp-square:before { content: @fa-var-whatsapp-square; } -.@{fa-css-prefix}-wheelchair:before { content: @fa-var-wheelchair; } -.@{fa-css-prefix}-whmcs:before { content: @fa-var-whmcs; } -.@{fa-css-prefix}-wifi:before { content: @fa-var-wifi; } -.@{fa-css-prefix}-wikipedia-w:before { content: @fa-var-wikipedia-w; } -.@{fa-css-prefix}-wind:before { content: @fa-var-wind; } -.@{fa-css-prefix}-window-close:before { content: @fa-var-window-close; } -.@{fa-css-prefix}-window-maximize:before { content: @fa-var-window-maximize; } -.@{fa-css-prefix}-window-minimize:before { content: @fa-var-window-minimize; } -.@{fa-css-prefix}-window-restore:before { content: @fa-var-window-restore; } -.@{fa-css-prefix}-windows:before { content: @fa-var-windows; } -.@{fa-css-prefix}-wine-bottle:before { content: @fa-var-wine-bottle; } -.@{fa-css-prefix}-wine-glass:before { content: @fa-var-wine-glass; } -.@{fa-css-prefix}-wine-glass-alt:before { content: @fa-var-wine-glass-alt; } -.@{fa-css-prefix}-wix:before { content: @fa-var-wix; } -.@{fa-css-prefix}-wizards-of-the-coast:before { content: @fa-var-wizards-of-the-coast; } -.@{fa-css-prefix}-wolf-pack-battalion:before { content: @fa-var-wolf-pack-battalion; } -.@{fa-css-prefix}-won-sign:before { content: @fa-var-won-sign; } -.@{fa-css-prefix}-wordpress:before { content: @fa-var-wordpress; } -.@{fa-css-prefix}-wordpress-simple:before { content: @fa-var-wordpress-simple; } -.@{fa-css-prefix}-wpbeginner:before { content: @fa-var-wpbeginner; } -.@{fa-css-prefix}-wpexplorer:before { content: @fa-var-wpexplorer; } -.@{fa-css-prefix}-wpforms:before { content: @fa-var-wpforms; } -.@{fa-css-prefix}-wpressr:before { content: @fa-var-wpressr; } -.@{fa-css-prefix}-wrench:before { content: @fa-var-wrench; } -.@{fa-css-prefix}-x-ray:before { content: @fa-var-x-ray; } -.@{fa-css-prefix}-xbox:before { content: @fa-var-xbox; } -.@{fa-css-prefix}-xing:before { content: @fa-var-xing; } -.@{fa-css-prefix}-xing-square:before { content: @fa-var-xing-square; } -.@{fa-css-prefix}-y-combinator:before { content: @fa-var-y-combinator; } -.@{fa-css-prefix}-yahoo:before { content: @fa-var-yahoo; } -.@{fa-css-prefix}-yandex:before { content: @fa-var-yandex; } -.@{fa-css-prefix}-yandex-international:before { content: @fa-var-yandex-international; } -.@{fa-css-prefix}-yarn:before { content: @fa-var-yarn; } -.@{fa-css-prefix}-yelp:before { content: @fa-var-yelp; } -.@{fa-css-prefix}-yen-sign:before { content: @fa-var-yen-sign; } -.@{fa-css-prefix}-yin-yang:before { content: @fa-var-yin-yang; } -.@{fa-css-prefix}-yoast:before { content: @fa-var-yoast; } -.@{fa-css-prefix}-youtube:before { content: @fa-var-youtube; } -.@{fa-css-prefix}-youtube-square:before { content: @fa-var-youtube-square; } -.@{fa-css-prefix}-zhihu:before { content: @fa-var-zhihu; } diff --git a/application/client/src/app/ui/styles/fontawesome/less/_larger.less b/application/client/src/app/ui/styles/fontawesome/less/_larger.less deleted file mode 100644 index 6cbb1ec6ec..0000000000 --- a/application/client/src/app/ui/styles/fontawesome/less/_larger.less +++ /dev/null @@ -1,27 +0,0 @@ -// Icon Sizes -// ------------------------- - -.larger(@factor) when (@factor > 0) { - .larger((@factor - 1)); - - .@{fa-css-prefix}-@{factor}x { - font-size: (@factor * 1em); - } -} - -/* makes the font 33% larger relative to the icon container */ -.@{fa-css-prefix}-lg { - font-size: (4em / 3); - line-height: (3em / 4); - vertical-align: -.0667em; -} - -.@{fa-css-prefix}-xs { - font-size: .75em; -} - -.@{fa-css-prefix}-sm { - font-size: .875em; -} - -.larger(10); diff --git a/application/client/src/app/ui/styles/fontawesome/less/_list.less b/application/client/src/app/ui/styles/fontawesome/less/_list.less deleted file mode 100644 index 1ff7ca7f59..0000000000 --- a/application/client/src/app/ui/styles/fontawesome/less/_list.less +++ /dev/null @@ -1,18 +0,0 @@ -// List Icons -// ------------------------- - -.@{fa-css-prefix}-ul { - list-style-type: none; - margin-left: @fa-li-width * 5/4; - padding-left: 0; - - > li { position: relative; } -} - -.@{fa-css-prefix}-li { - left: -@fa-li-width; - position: absolute; - text-align: center; - width: @fa-li-width; - line-height: inherit; -} diff --git a/application/client/src/app/ui/styles/fontawesome/less/_mixins.less b/application/client/src/app/ui/styles/fontawesome/less/_mixins.less deleted file mode 100644 index a4e93f90a3..0000000000 --- a/application/client/src/app/ui/styles/fontawesome/less/_mixins.less +++ /dev/null @@ -1,57 +0,0 @@ -// Mixins -// -------------------------- - -.fa-icon() { - -moz-osx-font-smoothing: grayscale; - -webkit-font-smoothing: antialiased; - display: inline-block; - font-style: normal; - font-variant: normal; - font-weight: normal; - line-height: 1; - vertical-align: -.125em; -} - -.fa-icon-rotate(@degrees, @rotation) { - -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=@{rotation})"; - transform: rotate(@degrees); -} - -.fa-icon-flip(@horiz, @vert, @rotation) { - -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=@{rotation}, mirror=1)"; - transform: scale(@horiz, @vert); -} - - -// Only display content to screen readers. A la Bootstrap 4. -// -// See: http://a11yproject.com/posts/how-to-hide-content/ - -.sr-only() { - border: 0; - clip: rect(0,0,0,0); - height: 1px; - margin: -1px; - overflow: hidden; - padding: 0; - position: absolute; - width: 1px; -} - -// Use in conjunction with .sr-only to only display content when it's focused. -// -// Useful for "Skip to main content" links; see http://www.w3.org/TR/2013/NOTE-WCAG20-TECHS-20130905/G1 -// -// Credit: HTML5 Boilerplate - -.sr-only-focusable() { - &:active, - &:focus { - clip: auto; - height: auto; - margin: 0; - overflow: visible; - position: static; - width: auto; - } -} diff --git a/application/client/src/app/ui/styles/fontawesome/less/_rotated-flipped.less b/application/client/src/app/ui/styles/fontawesome/less/_rotated-flipped.less deleted file mode 100644 index 1ee31db19f..0000000000 --- a/application/client/src/app/ui/styles/fontawesome/less/_rotated-flipped.less +++ /dev/null @@ -1,23 +0,0 @@ -// Rotated & Flipped Icons -// ------------------------- - -.@{fa-css-prefix}-rotate-90 { .fa-icon-rotate(90deg, 1); } -.@{fa-css-prefix}-rotate-180 { .fa-icon-rotate(180deg, 2); } -.@{fa-css-prefix}-rotate-270 { .fa-icon-rotate(270deg, 3); } - -.@{fa-css-prefix}-flip-horizontal { .fa-icon-flip(-1, 1, 0); } -.@{fa-css-prefix}-flip-vertical { .fa-icon-flip(1, -1, 2); } -.@{fa-css-prefix}-flip-horizontal.@{fa-css-prefix}-flip-vertical { .fa-icon-flip(-1, -1, 2); } - -// Hook for IE8-9 -// ------------------------- - -:root { - .@{fa-css-prefix}-rotate-90, - .@{fa-css-prefix}-rotate-180, - .@{fa-css-prefix}-rotate-270, - .@{fa-css-prefix}-flip-horizontal, - .@{fa-css-prefix}-flip-vertical { - filter: none; - } -} diff --git a/application/client/src/app/ui/styles/fontawesome/less/_screen-reader.less b/application/client/src/app/ui/styles/fontawesome/less/_screen-reader.less deleted file mode 100644 index 11c188196d..0000000000 --- a/application/client/src/app/ui/styles/fontawesome/less/_screen-reader.less +++ /dev/null @@ -1,5 +0,0 @@ -// Screen Readers -// ------------------------- - -.sr-only { .sr-only(); } -.sr-only-focusable { .sr-only-focusable(); } diff --git a/application/client/src/app/ui/styles/fontawesome/less/_shims.less b/application/client/src/app/ui/styles/fontawesome/less/_shims.less deleted file mode 100644 index 8a618a1813..0000000000 --- a/application/client/src/app/ui/styles/fontawesome/less/_shims.less +++ /dev/null @@ -1,2062 +0,0 @@ -.@{fa-css-prefix}.@{fa-css-prefix}-glass:before { content: @fa-var-glass-martini; } - -.@{fa-css-prefix}.@{fa-css-prefix}-meetup { - font-family: 'Font Awesome 5 Brands'; - font-weight: 400; -} - -.@{fa-css-prefix}.@{fa-css-prefix}-star-o { - font-family: 'Font Awesome 5 Free'; - font-weight: 400; -} -.@{fa-css-prefix}.@{fa-css-prefix}-star-o:before { content: @fa-var-star; } - -.@{fa-css-prefix}.@{fa-css-prefix}-remove:before { content: @fa-var-times; } - -.@{fa-css-prefix}.@{fa-css-prefix}-close:before { content: @fa-var-times; } - -.@{fa-css-prefix}.@{fa-css-prefix}-gear:before { content: @fa-var-cog; } - -.@{fa-css-prefix}.@{fa-css-prefix}-trash-o { - font-family: 'Font Awesome 5 Free'; - font-weight: 400; -} -.@{fa-css-prefix}.@{fa-css-prefix}-trash-o:before { content: @fa-var-trash-alt; } - -.@{fa-css-prefix}.@{fa-css-prefix}-file-o { - font-family: 'Font Awesome 5 Free'; - font-weight: 400; -} -.@{fa-css-prefix}.@{fa-css-prefix}-file-o:before { content: @fa-var-file; } - -.@{fa-css-prefix}.@{fa-css-prefix}-clock-o { - font-family: 'Font Awesome 5 Free'; - font-weight: 400; -} -.@{fa-css-prefix}.@{fa-css-prefix}-clock-o:before { content: @fa-var-clock; } - -.@{fa-css-prefix}.@{fa-css-prefix}-arrow-circle-o-down { - font-family: 'Font Awesome 5 Free'; - font-weight: 400; -} -.@{fa-css-prefix}.@{fa-css-prefix}-arrow-circle-o-down:before { content: @fa-var-arrow-alt-circle-down; } - -.@{fa-css-prefix}.@{fa-css-prefix}-arrow-circle-o-up { - font-family: 'Font Awesome 5 Free'; - font-weight: 400; -} -.@{fa-css-prefix}.@{fa-css-prefix}-arrow-circle-o-up:before { content: @fa-var-arrow-alt-circle-up; } - -.@{fa-css-prefix}.@{fa-css-prefix}-play-circle-o { - font-family: 'Font Awesome 5 Free'; - font-weight: 400; -} -.@{fa-css-prefix}.@{fa-css-prefix}-play-circle-o:before { content: @fa-var-play-circle; } - -.@{fa-css-prefix}.@{fa-css-prefix}-repeat:before { content: @fa-var-redo; } - -.@{fa-css-prefix}.@{fa-css-prefix}-rotate-right:before { content: @fa-var-redo; } - -.@{fa-css-prefix}.@{fa-css-prefix}-refresh:before { content: @fa-var-sync; } - -.@{fa-css-prefix}.@{fa-css-prefix}-list-alt { - font-family: 'Font Awesome 5 Free'; - font-weight: 400; -} - -.@{fa-css-prefix}.@{fa-css-prefix}-dedent:before { content: @fa-var-outdent; } - -.@{fa-css-prefix}.@{fa-css-prefix}-video-camera:before { content: @fa-var-video; } - -.@{fa-css-prefix}.@{fa-css-prefix}-picture-o { - font-family: 'Font Awesome 5 Free'; - font-weight: 400; -} -.@{fa-css-prefix}.@{fa-css-prefix}-picture-o:before { content: @fa-var-image; } - -.@{fa-css-prefix}.@{fa-css-prefix}-photo { - font-family: 'Font Awesome 5 Free'; - font-weight: 400; -} -.@{fa-css-prefix}.@{fa-css-prefix}-photo:before { content: @fa-var-image; } - -.@{fa-css-prefix}.@{fa-css-prefix}-image { - font-family: 'Font Awesome 5 Free'; - font-weight: 400; -} -.@{fa-css-prefix}.@{fa-css-prefix}-image:before { content: @fa-var-image; } - -.@{fa-css-prefix}.@{fa-css-prefix}-pencil:before { content: @fa-var-pencil-alt; } - -.@{fa-css-prefix}.@{fa-css-prefix}-map-marker:before { content: @fa-var-map-marker-alt; } - -.@{fa-css-prefix}.@{fa-css-prefix}-pencil-square-o { - font-family: 'Font Awesome 5 Free'; - font-weight: 400; -} -.@{fa-css-prefix}.@{fa-css-prefix}-pencil-square-o:before { content: @fa-var-edit; } - -.@{fa-css-prefix}.@{fa-css-prefix}-share-square-o { - font-family: 'Font Awesome 5 Free'; - font-weight: 400; -} -.@{fa-css-prefix}.@{fa-css-prefix}-share-square-o:before { content: @fa-var-share-square; } - -.@{fa-css-prefix}.@{fa-css-prefix}-check-square-o { - font-family: 'Font Awesome 5 Free'; - font-weight: 400; -} -.@{fa-css-prefix}.@{fa-css-prefix}-check-square-o:before { content: @fa-var-check-square; } - -.@{fa-css-prefix}.@{fa-css-prefix}-arrows:before { content: @fa-var-arrows-alt; } - -.@{fa-css-prefix}.@{fa-css-prefix}-times-circle-o { - font-family: 'Font Awesome 5 Free'; - font-weight: 400; -} -.@{fa-css-prefix}.@{fa-css-prefix}-times-circle-o:before { content: @fa-var-times-circle; } - -.@{fa-css-prefix}.@{fa-css-prefix}-check-circle-o { - font-family: 'Font Awesome 5 Free'; - font-weight: 400; -} -.@{fa-css-prefix}.@{fa-css-prefix}-check-circle-o:before { content: @fa-var-check-circle; } - -.@{fa-css-prefix}.@{fa-css-prefix}-mail-forward:before { content: @fa-var-share; } - -.@{fa-css-prefix}.@{fa-css-prefix}-eye { - font-family: 'Font Awesome 5 Free'; - font-weight: 400; -} - -.@{fa-css-prefix}.@{fa-css-prefix}-eye-slash { - font-family: 'Font Awesome 5 Free'; - font-weight: 400; -} - -.@{fa-css-prefix}.@{fa-css-prefix}-warning:before { content: @fa-var-exclamation-triangle; } - -.@{fa-css-prefix}.@{fa-css-prefix}-calendar:before { content: @fa-var-calendar-alt; } - -.@{fa-css-prefix}.@{fa-css-prefix}-arrows-v:before { content: @fa-var-arrows-alt-v; } - -.@{fa-css-prefix}.@{fa-css-prefix}-arrows-h:before { content: @fa-var-arrows-alt-h; } - -.@{fa-css-prefix}.@{fa-css-prefix}-bar-chart { - font-family: 'Font Awesome 5 Free'; - font-weight: 400; -} -.@{fa-css-prefix}.@{fa-css-prefix}-bar-chart:before { content: @fa-var-chart-bar; } - -.@{fa-css-prefix}.@{fa-css-prefix}-bar-chart-o { - font-family: 'Font Awesome 5 Free'; - font-weight: 400; -} -.@{fa-css-prefix}.@{fa-css-prefix}-bar-chart-o:before { content: @fa-var-chart-bar; } - -.@{fa-css-prefix}.@{fa-css-prefix}-twitter-square { - font-family: 'Font Awesome 5 Brands'; - font-weight: 400; -} - -.@{fa-css-prefix}.@{fa-css-prefix}-facebook-square { - font-family: 'Font Awesome 5 Brands'; - font-weight: 400; -} - -.@{fa-css-prefix}.@{fa-css-prefix}-gears:before { content: @fa-var-cogs; } - -.@{fa-css-prefix}.@{fa-css-prefix}-thumbs-o-up { - font-family: 'Font Awesome 5 Free'; - font-weight: 400; -} -.@{fa-css-prefix}.@{fa-css-prefix}-thumbs-o-up:before { content: @fa-var-thumbs-up; } - -.@{fa-css-prefix}.@{fa-css-prefix}-thumbs-o-down { - font-family: 'Font Awesome 5 Free'; - font-weight: 400; -} -.@{fa-css-prefix}.@{fa-css-prefix}-thumbs-o-down:before { content: @fa-var-thumbs-down; } - -.@{fa-css-prefix}.@{fa-css-prefix}-heart-o { - font-family: 'Font Awesome 5 Free'; - font-weight: 400; -} -.@{fa-css-prefix}.@{fa-css-prefix}-heart-o:before { content: @fa-var-heart; } - -.@{fa-css-prefix}.@{fa-css-prefix}-sign-out:before { content: @fa-var-sign-out-alt; } - -.@{fa-css-prefix}.@{fa-css-prefix}-linkedin-square { - font-family: 'Font Awesome 5 Brands'; - font-weight: 400; -} -.@{fa-css-prefix}.@{fa-css-prefix}-linkedin-square:before { content: @fa-var-linkedin; } - -.@{fa-css-prefix}.@{fa-css-prefix}-thumb-tack:before { content: @fa-var-thumbtack; } - -.@{fa-css-prefix}.@{fa-css-prefix}-external-link:before { content: @fa-var-external-link-alt; } - -.@{fa-css-prefix}.@{fa-css-prefix}-sign-in:before { content: @fa-var-sign-in-alt; } - -.@{fa-css-prefix}.@{fa-css-prefix}-github-square { - font-family: 'Font Awesome 5 Brands'; - font-weight: 400; -} - -.@{fa-css-prefix}.@{fa-css-prefix}-lemon-o { - font-family: 'Font Awesome 5 Free'; - font-weight: 400; -} -.@{fa-css-prefix}.@{fa-css-prefix}-lemon-o:before { content: @fa-var-lemon; } - -.@{fa-css-prefix}.@{fa-css-prefix}-square-o { - font-family: 'Font Awesome 5 Free'; - font-weight: 400; -} -.@{fa-css-prefix}.@{fa-css-prefix}-square-o:before { content: @fa-var-square; } - -.@{fa-css-prefix}.@{fa-css-prefix}-bookmark-o { - font-family: 'Font Awesome 5 Free'; - font-weight: 400; -} -.@{fa-css-prefix}.@{fa-css-prefix}-bookmark-o:before { content: @fa-var-bookmark; } - -.@{fa-css-prefix}.@{fa-css-prefix}-twitter { - font-family: 'Font Awesome 5 Brands'; - font-weight: 400; -} - -.@{fa-css-prefix}.@{fa-css-prefix}-facebook { - font-family: 'Font Awesome 5 Brands'; - font-weight: 400; -} -.@{fa-css-prefix}.@{fa-css-prefix}-facebook:before { content: @fa-var-facebook-f; } - -.@{fa-css-prefix}.@{fa-css-prefix}-facebook-f { - font-family: 'Font Awesome 5 Brands'; - font-weight: 400; -} -.@{fa-css-prefix}.@{fa-css-prefix}-facebook-f:before { content: @fa-var-facebook-f; } - -.@{fa-css-prefix}.@{fa-css-prefix}-github { - font-family: 'Font Awesome 5 Brands'; - font-weight: 400; -} - -.@{fa-css-prefix}.@{fa-css-prefix}-credit-card { - font-family: 'Font Awesome 5 Free'; - font-weight: 400; -} - -.@{fa-css-prefix}.@{fa-css-prefix}-feed:before { content: @fa-var-rss; } - -.@{fa-css-prefix}.@{fa-css-prefix}-hdd-o { - font-family: 'Font Awesome 5 Free'; - font-weight: 400; -} -.@{fa-css-prefix}.@{fa-css-prefix}-hdd-o:before { content: @fa-var-hdd; } - -.@{fa-css-prefix}.@{fa-css-prefix}-hand-o-right { - font-family: 'Font Awesome 5 Free'; - font-weight: 400; -} -.@{fa-css-prefix}.@{fa-css-prefix}-hand-o-right:before { content: @fa-var-hand-point-right; } - -.@{fa-css-prefix}.@{fa-css-prefix}-hand-o-left { - font-family: 'Font Awesome 5 Free'; - font-weight: 400; -} -.@{fa-css-prefix}.@{fa-css-prefix}-hand-o-left:before { content: @fa-var-hand-point-left; } - -.@{fa-css-prefix}.@{fa-css-prefix}-hand-o-up { - font-family: 'Font Awesome 5 Free'; - font-weight: 400; -} -.@{fa-css-prefix}.@{fa-css-prefix}-hand-o-up:before { content: @fa-var-hand-point-up; } - -.@{fa-css-prefix}.@{fa-css-prefix}-hand-o-down { - font-family: 'Font Awesome 5 Free'; - font-weight: 400; -} -.@{fa-css-prefix}.@{fa-css-prefix}-hand-o-down:before { content: @fa-var-hand-point-down; } - -.@{fa-css-prefix}.@{fa-css-prefix}-arrows-alt:before { content: @fa-var-expand-arrows-alt; } - -.@{fa-css-prefix}.@{fa-css-prefix}-group:before { content: @fa-var-users; } - -.@{fa-css-prefix}.@{fa-css-prefix}-chain:before { content: @fa-var-link; } - -.@{fa-css-prefix}.@{fa-css-prefix}-scissors:before { content: @fa-var-cut; } - -.@{fa-css-prefix}.@{fa-css-prefix}-files-o { - font-family: 'Font Awesome 5 Free'; - font-weight: 400; -} -.@{fa-css-prefix}.@{fa-css-prefix}-files-o:before { content: @fa-var-copy; } - -.@{fa-css-prefix}.@{fa-css-prefix}-floppy-o { - font-family: 'Font Awesome 5 Free'; - font-weight: 400; -} -.@{fa-css-prefix}.@{fa-css-prefix}-floppy-o:before { content: @fa-var-save; } - -.@{fa-css-prefix}.@{fa-css-prefix}-navicon:before { content: @fa-var-bars; } - -.@{fa-css-prefix}.@{fa-css-prefix}-reorder:before { content: @fa-var-bars; } - -.@{fa-css-prefix}.@{fa-css-prefix}-pinterest { - font-family: 'Font Awesome 5 Brands'; - font-weight: 400; -} - -.@{fa-css-prefix}.@{fa-css-prefix}-pinterest-square { - font-family: 'Font Awesome 5 Brands'; - font-weight: 400; -} - -.@{fa-css-prefix}.@{fa-css-prefix}-google-plus-square { - font-family: 'Font Awesome 5 Brands'; - font-weight: 400; -} - -.@{fa-css-prefix}.@{fa-css-prefix}-google-plus { - font-family: 'Font Awesome 5 Brands'; - font-weight: 400; -} -.@{fa-css-prefix}.@{fa-css-prefix}-google-plus:before { content: @fa-var-google-plus-g; } - -.@{fa-css-prefix}.@{fa-css-prefix}-money { - font-family: 'Font Awesome 5 Free'; - font-weight: 400; -} -.@{fa-css-prefix}.@{fa-css-prefix}-money:before { content: @fa-var-money-bill-alt; } - -.@{fa-css-prefix}.@{fa-css-prefix}-unsorted:before { content: @fa-var-sort; } - -.@{fa-css-prefix}.@{fa-css-prefix}-sort-desc:before { content: @fa-var-sort-down; } - -.@{fa-css-prefix}.@{fa-css-prefix}-sort-asc:before { content: @fa-var-sort-up; } - -.@{fa-css-prefix}.@{fa-css-prefix}-linkedin { - font-family: 'Font Awesome 5 Brands'; - font-weight: 400; -} -.@{fa-css-prefix}.@{fa-css-prefix}-linkedin:before { content: @fa-var-linkedin-in; } - -.@{fa-css-prefix}.@{fa-css-prefix}-rotate-left:before { content: @fa-var-undo; } - -.@{fa-css-prefix}.@{fa-css-prefix}-legal:before { content: @fa-var-gavel; } - -.@{fa-css-prefix}.@{fa-css-prefix}-tachometer:before { content: @fa-var-tachometer-alt; } - -.@{fa-css-prefix}.@{fa-css-prefix}-dashboard:before { content: @fa-var-tachometer-alt; } - -.@{fa-css-prefix}.@{fa-css-prefix}-comment-o { - font-family: 'Font Awesome 5 Free'; - font-weight: 400; -} -.@{fa-css-prefix}.@{fa-css-prefix}-comment-o:before { content: @fa-var-comment; } - -.@{fa-css-prefix}.@{fa-css-prefix}-comments-o { - font-family: 'Font Awesome 5 Free'; - font-weight: 400; -} -.@{fa-css-prefix}.@{fa-css-prefix}-comments-o:before { content: @fa-var-comments; } - -.@{fa-css-prefix}.@{fa-css-prefix}-flash:before { content: @fa-var-bolt; } - -.@{fa-css-prefix}.@{fa-css-prefix}-clipboard { - font-family: 'Font Awesome 5 Free'; - font-weight: 400; -} - -.@{fa-css-prefix}.@{fa-css-prefix}-paste { - font-family: 'Font Awesome 5 Free'; - font-weight: 400; -} -.@{fa-css-prefix}.@{fa-css-prefix}-paste:before { content: @fa-var-clipboard; } - -.@{fa-css-prefix}.@{fa-css-prefix}-lightbulb-o { - font-family: 'Font Awesome 5 Free'; - font-weight: 400; -} -.@{fa-css-prefix}.@{fa-css-prefix}-lightbulb-o:before { content: @fa-var-lightbulb; } - -.@{fa-css-prefix}.@{fa-css-prefix}-exchange:before { content: @fa-var-exchange-alt; } - -.@{fa-css-prefix}.@{fa-css-prefix}-cloud-download:before { content: @fa-var-cloud-download-alt; } - -.@{fa-css-prefix}.@{fa-css-prefix}-cloud-upload:before { content: @fa-var-cloud-upload-alt; } - -.@{fa-css-prefix}.@{fa-css-prefix}-bell-o { - font-family: 'Font Awesome 5 Free'; - font-weight: 400; -} -.@{fa-css-prefix}.@{fa-css-prefix}-bell-o:before { content: @fa-var-bell; } - -.@{fa-css-prefix}.@{fa-css-prefix}-cutlery:before { content: @fa-var-utensils; } - -.@{fa-css-prefix}.@{fa-css-prefix}-file-text-o { - font-family: 'Font Awesome 5 Free'; - font-weight: 400; -} -.@{fa-css-prefix}.@{fa-css-prefix}-file-text-o:before { content: @fa-var-file-alt; } - -.@{fa-css-prefix}.@{fa-css-prefix}-building-o { - font-family: 'Font Awesome 5 Free'; - font-weight: 400; -} -.@{fa-css-prefix}.@{fa-css-prefix}-building-o:before { content: @fa-var-building; } - -.@{fa-css-prefix}.@{fa-css-prefix}-hospital-o { - font-family: 'Font Awesome 5 Free'; - font-weight: 400; -} -.@{fa-css-prefix}.@{fa-css-prefix}-hospital-o:before { content: @fa-var-hospital; } - -.@{fa-css-prefix}.@{fa-css-prefix}-tablet:before { content: @fa-var-tablet-alt; } - -.@{fa-css-prefix}.@{fa-css-prefix}-mobile:before { content: @fa-var-mobile-alt; } - -.@{fa-css-prefix}.@{fa-css-prefix}-mobile-phone:before { content: @fa-var-mobile-alt; } - -.@{fa-css-prefix}.@{fa-css-prefix}-circle-o { - font-family: 'Font Awesome 5 Free'; - font-weight: 400; -} -.@{fa-css-prefix}.@{fa-css-prefix}-circle-o:before { content: @fa-var-circle; } - -.@{fa-css-prefix}.@{fa-css-prefix}-mail-reply:before { content: @fa-var-reply; } - -.@{fa-css-prefix}.@{fa-css-prefix}-github-alt { - font-family: 'Font Awesome 5 Brands'; - font-weight: 400; -} - -.@{fa-css-prefix}.@{fa-css-prefix}-folder-o { - font-family: 'Font Awesome 5 Free'; - font-weight: 400; -} -.@{fa-css-prefix}.@{fa-css-prefix}-folder-o:before { content: @fa-var-folder; } - -.@{fa-css-prefix}.@{fa-css-prefix}-folder-open-o { - font-family: 'Font Awesome 5 Free'; - font-weight: 400; -} -.@{fa-css-prefix}.@{fa-css-prefix}-folder-open-o:before { content: @fa-var-folder-open; } - -.@{fa-css-prefix}.@{fa-css-prefix}-smile-o { - font-family: 'Font Awesome 5 Free'; - font-weight: 400; -} -.@{fa-css-prefix}.@{fa-css-prefix}-smile-o:before { content: @fa-var-smile; } - -.@{fa-css-prefix}.@{fa-css-prefix}-frown-o { - font-family: 'Font Awesome 5 Free'; - font-weight: 400; -} -.@{fa-css-prefix}.@{fa-css-prefix}-frown-o:before { content: @fa-var-frown; } - -.@{fa-css-prefix}.@{fa-css-prefix}-meh-o { - font-family: 'Font Awesome 5 Free'; - font-weight: 400; -} -.@{fa-css-prefix}.@{fa-css-prefix}-meh-o:before { content: @fa-var-meh; } - -.@{fa-css-prefix}.@{fa-css-prefix}-keyboard-o { - font-family: 'Font Awesome 5 Free'; - font-weight: 400; -} -.@{fa-css-prefix}.@{fa-css-prefix}-keyboard-o:before { content: @fa-var-keyboard; } - -.@{fa-css-prefix}.@{fa-css-prefix}-flag-o { - font-family: 'Font Awesome 5 Free'; - font-weight: 400; -} -.@{fa-css-prefix}.@{fa-css-prefix}-flag-o:before { content: @fa-var-flag; } - -.@{fa-css-prefix}.@{fa-css-prefix}-mail-reply-all:before { content: @fa-var-reply-all; } - -.@{fa-css-prefix}.@{fa-css-prefix}-star-half-o { - font-family: 'Font Awesome 5 Free'; - font-weight: 400; -} -.@{fa-css-prefix}.@{fa-css-prefix}-star-half-o:before { content: @fa-var-star-half; } - -.@{fa-css-prefix}.@{fa-css-prefix}-star-half-empty { - font-family: 'Font Awesome 5 Free'; - font-weight: 400; -} -.@{fa-css-prefix}.@{fa-css-prefix}-star-half-empty:before { content: @fa-var-star-half; } - -.@{fa-css-prefix}.@{fa-css-prefix}-star-half-full { - font-family: 'Font Awesome 5 Free'; - font-weight: 400; -} -.@{fa-css-prefix}.@{fa-css-prefix}-star-half-full:before { content: @fa-var-star-half; } - -.@{fa-css-prefix}.@{fa-css-prefix}-code-fork:before { content: @fa-var-code-branch; } - -.@{fa-css-prefix}.@{fa-css-prefix}-chain-broken:before { content: @fa-var-unlink; } - -.@{fa-css-prefix}.@{fa-css-prefix}-shield:before { content: @fa-var-shield-alt; } - -.@{fa-css-prefix}.@{fa-css-prefix}-calendar-o { - font-family: 'Font Awesome 5 Free'; - font-weight: 400; -} -.@{fa-css-prefix}.@{fa-css-prefix}-calendar-o:before { content: @fa-var-calendar; } - -.@{fa-css-prefix}.@{fa-css-prefix}-maxcdn { - font-family: 'Font Awesome 5 Brands'; - font-weight: 400; -} - -.@{fa-css-prefix}.@{fa-css-prefix}-html5 { - font-family: 'Font Awesome 5 Brands'; - font-weight: 400; -} - -.@{fa-css-prefix}.@{fa-css-prefix}-css3 { - font-family: 'Font Awesome 5 Brands'; - font-weight: 400; -} - -.@{fa-css-prefix}.@{fa-css-prefix}-ticket:before { content: @fa-var-ticket-alt; } - -.@{fa-css-prefix}.@{fa-css-prefix}-minus-square-o { - font-family: 'Font Awesome 5 Free'; - font-weight: 400; -} -.@{fa-css-prefix}.@{fa-css-prefix}-minus-square-o:before { content: @fa-var-minus-square; } - -.@{fa-css-prefix}.@{fa-css-prefix}-level-up:before { content: @fa-var-level-up-alt; } - -.@{fa-css-prefix}.@{fa-css-prefix}-level-down:before { content: @fa-var-level-down-alt; } - -.@{fa-css-prefix}.@{fa-css-prefix}-pencil-square:before { content: @fa-var-pen-square; } - -.@{fa-css-prefix}.@{fa-css-prefix}-external-link-square:before { content: @fa-var-external-link-square-alt; } - -.@{fa-css-prefix}.@{fa-css-prefix}-compass { - font-family: 'Font Awesome 5 Free'; - font-weight: 400; -} - -.@{fa-css-prefix}.@{fa-css-prefix}-caret-square-o-down { - font-family: 'Font Awesome 5 Free'; - font-weight: 400; -} -.@{fa-css-prefix}.@{fa-css-prefix}-caret-square-o-down:before { content: @fa-var-caret-square-down; } - -.@{fa-css-prefix}.@{fa-css-prefix}-toggle-down { - font-family: 'Font Awesome 5 Free'; - font-weight: 400; -} -.@{fa-css-prefix}.@{fa-css-prefix}-toggle-down:before { content: @fa-var-caret-square-down; } - -.@{fa-css-prefix}.@{fa-css-prefix}-caret-square-o-up { - font-family: 'Font Awesome 5 Free'; - font-weight: 400; -} -.@{fa-css-prefix}.@{fa-css-prefix}-caret-square-o-up:before { content: @fa-var-caret-square-up; } - -.@{fa-css-prefix}.@{fa-css-prefix}-toggle-up { - font-family: 'Font Awesome 5 Free'; - font-weight: 400; -} -.@{fa-css-prefix}.@{fa-css-prefix}-toggle-up:before { content: @fa-var-caret-square-up; } - -.@{fa-css-prefix}.@{fa-css-prefix}-caret-square-o-right { - font-family: 'Font Awesome 5 Free'; - font-weight: 400; -} -.@{fa-css-prefix}.@{fa-css-prefix}-caret-square-o-right:before { content: @fa-var-caret-square-right; } - -.@{fa-css-prefix}.@{fa-css-prefix}-toggle-right { - font-family: 'Font Awesome 5 Free'; - font-weight: 400; -} -.@{fa-css-prefix}.@{fa-css-prefix}-toggle-right:before { content: @fa-var-caret-square-right; } - -.@{fa-css-prefix}.@{fa-css-prefix}-eur:before { content: @fa-var-euro-sign; } - -.@{fa-css-prefix}.@{fa-css-prefix}-euro:before { content: @fa-var-euro-sign; } - -.@{fa-css-prefix}.@{fa-css-prefix}-gbp:before { content: @fa-var-pound-sign; } - -.@{fa-css-prefix}.@{fa-css-prefix}-usd:before { content: @fa-var-dollar-sign; } - -.@{fa-css-prefix}.@{fa-css-prefix}-dollar:before { content: @fa-var-dollar-sign; } - -.@{fa-css-prefix}.@{fa-css-prefix}-inr:before { content: @fa-var-rupee-sign; } - -.@{fa-css-prefix}.@{fa-css-prefix}-rupee:before { content: @fa-var-rupee-sign; } - -.@{fa-css-prefix}.@{fa-css-prefix}-jpy:before { content: @fa-var-yen-sign; } - -.@{fa-css-prefix}.@{fa-css-prefix}-cny:before { content: @fa-var-yen-sign; } - -.@{fa-css-prefix}.@{fa-css-prefix}-rmb:before { content: @fa-var-yen-sign; } - -.@{fa-css-prefix}.@{fa-css-prefix}-yen:before { content: @fa-var-yen-sign; } - -.@{fa-css-prefix}.@{fa-css-prefix}-rub:before { content: @fa-var-ruble-sign; } - -.@{fa-css-prefix}.@{fa-css-prefix}-ruble:before { content: @fa-var-ruble-sign; } - -.@{fa-css-prefix}.@{fa-css-prefix}-rouble:before { content: @fa-var-ruble-sign; } - -.@{fa-css-prefix}.@{fa-css-prefix}-krw:before { content: @fa-var-won-sign; } - -.@{fa-css-prefix}.@{fa-css-prefix}-won:before { content: @fa-var-won-sign; } - -.@{fa-css-prefix}.@{fa-css-prefix}-btc { - font-family: 'Font Awesome 5 Brands'; - font-weight: 400; -} - -.@{fa-css-prefix}.@{fa-css-prefix}-bitcoin { - font-family: 'Font Awesome 5 Brands'; - font-weight: 400; -} -.@{fa-css-prefix}.@{fa-css-prefix}-bitcoin:before { content: @fa-var-btc; } - -.@{fa-css-prefix}.@{fa-css-prefix}-file-text:before { content: @fa-var-file-alt; } - -.@{fa-css-prefix}.@{fa-css-prefix}-sort-alpha-asc:before { content: @fa-var-sort-alpha-down; } - -.@{fa-css-prefix}.@{fa-css-prefix}-sort-alpha-desc:before { content: @fa-var-sort-alpha-up; } - -.@{fa-css-prefix}.@{fa-css-prefix}-sort-amount-asc:before { content: @fa-var-sort-amount-down; } - -.@{fa-css-prefix}.@{fa-css-prefix}-sort-amount-desc:before { content: @fa-var-sort-amount-up; } - -.@{fa-css-prefix}.@{fa-css-prefix}-sort-numeric-asc:before { content: @fa-var-sort-numeric-down; } - -.@{fa-css-prefix}.@{fa-css-prefix}-sort-numeric-desc:before { content: @fa-var-sort-numeric-up; } - -.@{fa-css-prefix}.@{fa-css-prefix}-youtube-square { - font-family: 'Font Awesome 5 Brands'; - font-weight: 400; -} - -.@{fa-css-prefix}.@{fa-css-prefix}-youtube { - font-family: 'Font Awesome 5 Brands'; - font-weight: 400; -} - -.@{fa-css-prefix}.@{fa-css-prefix}-xing { - font-family: 'Font Awesome 5 Brands'; - font-weight: 400; -} - -.@{fa-css-prefix}.@{fa-css-prefix}-xing-square { - font-family: 'Font Awesome 5 Brands'; - font-weight: 400; -} - -.@{fa-css-prefix}.@{fa-css-prefix}-youtube-play { - font-family: 'Font Awesome 5 Brands'; - font-weight: 400; -} -.@{fa-css-prefix}.@{fa-css-prefix}-youtube-play:before { content: @fa-var-youtube; } - -.@{fa-css-prefix}.@{fa-css-prefix}-dropbox { - font-family: 'Font Awesome 5 Brands'; - font-weight: 400; -} - -.@{fa-css-prefix}.@{fa-css-prefix}-stack-overflow { - font-family: 'Font Awesome 5 Brands'; - font-weight: 400; -} - -.@{fa-css-prefix}.@{fa-css-prefix}-instagram { - font-family: 'Font Awesome 5 Brands'; - font-weight: 400; -} - -.@{fa-css-prefix}.@{fa-css-prefix}-flickr { - font-family: 'Font Awesome 5 Brands'; - font-weight: 400; -} - -.@{fa-css-prefix}.@{fa-css-prefix}-adn { - font-family: 'Font Awesome 5 Brands'; - font-weight: 400; -} - -.@{fa-css-prefix}.@{fa-css-prefix}-bitbucket { - font-family: 'Font Awesome 5 Brands'; - font-weight: 400; -} - -.@{fa-css-prefix}.@{fa-css-prefix}-bitbucket-square { - font-family: 'Font Awesome 5 Brands'; - font-weight: 400; -} -.@{fa-css-prefix}.@{fa-css-prefix}-bitbucket-square:before { content: @fa-var-bitbucket; } - -.@{fa-css-prefix}.@{fa-css-prefix}-tumblr { - font-family: 'Font Awesome 5 Brands'; - font-weight: 400; -} - -.@{fa-css-prefix}.@{fa-css-prefix}-tumblr-square { - font-family: 'Font Awesome 5 Brands'; - font-weight: 400; -} - -.@{fa-css-prefix}.@{fa-css-prefix}-long-arrow-down:before { content: @fa-var-long-arrow-alt-down; } - -.@{fa-css-prefix}.@{fa-css-prefix}-long-arrow-up:before { content: @fa-var-long-arrow-alt-up; } - -.@{fa-css-prefix}.@{fa-css-prefix}-long-arrow-left:before { content: @fa-var-long-arrow-alt-left; } - -.@{fa-css-prefix}.@{fa-css-prefix}-long-arrow-right:before { content: @fa-var-long-arrow-alt-right; } - -.@{fa-css-prefix}.@{fa-css-prefix}-apple { - font-family: 'Font Awesome 5 Brands'; - font-weight: 400; -} - -.@{fa-css-prefix}.@{fa-css-prefix}-windows { - font-family: 'Font Awesome 5 Brands'; - font-weight: 400; -} - -.@{fa-css-prefix}.@{fa-css-prefix}-android { - font-family: 'Font Awesome 5 Brands'; - font-weight: 400; -} - -.@{fa-css-prefix}.@{fa-css-prefix}-linux { - font-family: 'Font Awesome 5 Brands'; - font-weight: 400; -} - -.@{fa-css-prefix}.@{fa-css-prefix}-dribbble { - font-family: 'Font Awesome 5 Brands'; - font-weight: 400; -} - -.@{fa-css-prefix}.@{fa-css-prefix}-skype { - font-family: 'Font Awesome 5 Brands'; - font-weight: 400; -} - -.@{fa-css-prefix}.@{fa-css-prefix}-foursquare { - font-family: 'Font Awesome 5 Brands'; - font-weight: 400; -} - -.@{fa-css-prefix}.@{fa-css-prefix}-trello { - font-family: 'Font Awesome 5 Brands'; - font-weight: 400; -} - -.@{fa-css-prefix}.@{fa-css-prefix}-gratipay { - font-family: 'Font Awesome 5 Brands'; - font-weight: 400; -} - -.@{fa-css-prefix}.@{fa-css-prefix}-gittip { - font-family: 'Font Awesome 5 Brands'; - font-weight: 400; -} -.@{fa-css-prefix}.@{fa-css-prefix}-gittip:before { content: @fa-var-gratipay; } - -.@{fa-css-prefix}.@{fa-css-prefix}-sun-o { - font-family: 'Font Awesome 5 Free'; - font-weight: 400; -} -.@{fa-css-prefix}.@{fa-css-prefix}-sun-o:before { content: @fa-var-sun; } - -.@{fa-css-prefix}.@{fa-css-prefix}-moon-o { - font-family: 'Font Awesome 5 Free'; - font-weight: 400; -} -.@{fa-css-prefix}.@{fa-css-prefix}-moon-o:before { content: @fa-var-moon; } - -.@{fa-css-prefix}.@{fa-css-prefix}-vk { - font-family: 'Font Awesome 5 Brands'; - font-weight: 400; -} - -.@{fa-css-prefix}.@{fa-css-prefix}-weibo { - font-family: 'Font Awesome 5 Brands'; - font-weight: 400; -} - -.@{fa-css-prefix}.@{fa-css-prefix}-renren { - font-family: 'Font Awesome 5 Brands'; - font-weight: 400; -} - -.@{fa-css-prefix}.@{fa-css-prefix}-pagelines { - font-family: 'Font Awesome 5 Brands'; - font-weight: 400; -} - -.@{fa-css-prefix}.@{fa-css-prefix}-stack-exchange { - font-family: 'Font Awesome 5 Brands'; - font-weight: 400; -} - -.@{fa-css-prefix}.@{fa-css-prefix}-arrow-circle-o-right { - font-family: 'Font Awesome 5 Free'; - font-weight: 400; -} -.@{fa-css-prefix}.@{fa-css-prefix}-arrow-circle-o-right:before { content: @fa-var-arrow-alt-circle-right; } - -.@{fa-css-prefix}.@{fa-css-prefix}-arrow-circle-o-left { - font-family: 'Font Awesome 5 Free'; - font-weight: 400; -} -.@{fa-css-prefix}.@{fa-css-prefix}-arrow-circle-o-left:before { content: @fa-var-arrow-alt-circle-left; } - -.@{fa-css-prefix}.@{fa-css-prefix}-caret-square-o-left { - font-family: 'Font Awesome 5 Free'; - font-weight: 400; -} -.@{fa-css-prefix}.@{fa-css-prefix}-caret-square-o-left:before { content: @fa-var-caret-square-left; } - -.@{fa-css-prefix}.@{fa-css-prefix}-toggle-left { - font-family: 'Font Awesome 5 Free'; - font-weight: 400; -} -.@{fa-css-prefix}.@{fa-css-prefix}-toggle-left:before { content: @fa-var-caret-square-left; } - -.@{fa-css-prefix}.@{fa-css-prefix}-dot-circle-o { - font-family: 'Font Awesome 5 Free'; - font-weight: 400; -} -.@{fa-css-prefix}.@{fa-css-prefix}-dot-circle-o:before { content: @fa-var-dot-circle; } - -.@{fa-css-prefix}.@{fa-css-prefix}-vimeo-square { - font-family: 'Font Awesome 5 Brands'; - font-weight: 400; -} - -.@{fa-css-prefix}.@{fa-css-prefix}-try:before { content: @fa-var-lira-sign; } - -.@{fa-css-prefix}.@{fa-css-prefix}-turkish-lira:before { content: @fa-var-lira-sign; } - -.@{fa-css-prefix}.@{fa-css-prefix}-plus-square-o { - font-family: 'Font Awesome 5 Free'; - font-weight: 400; -} -.@{fa-css-prefix}.@{fa-css-prefix}-plus-square-o:before { content: @fa-var-plus-square; } - -.@{fa-css-prefix}.@{fa-css-prefix}-slack { - font-family: 'Font Awesome 5 Brands'; - font-weight: 400; -} - -.@{fa-css-prefix}.@{fa-css-prefix}-wordpress { - font-family: 'Font Awesome 5 Brands'; - font-weight: 400; -} - -.@{fa-css-prefix}.@{fa-css-prefix}-openid { - font-family: 'Font Awesome 5 Brands'; - font-weight: 400; -} - -.@{fa-css-prefix}.@{fa-css-prefix}-institution:before { content: @fa-var-university; } - -.@{fa-css-prefix}.@{fa-css-prefix}-bank:before { content: @fa-var-university; } - -.@{fa-css-prefix}.@{fa-css-prefix}-mortar-board:before { content: @fa-var-graduation-cap; } - -.@{fa-css-prefix}.@{fa-css-prefix}-yahoo { - font-family: 'Font Awesome 5 Brands'; - font-weight: 400; -} - -.@{fa-css-prefix}.@{fa-css-prefix}-google { - font-family: 'Font Awesome 5 Brands'; - font-weight: 400; -} - -.@{fa-css-prefix}.@{fa-css-prefix}-reddit { - font-family: 'Font Awesome 5 Brands'; - font-weight: 400; -} - -.@{fa-css-prefix}.@{fa-css-prefix}-reddit-square { - font-family: 'Font Awesome 5 Brands'; - font-weight: 400; -} - -.@{fa-css-prefix}.@{fa-css-prefix}-stumbleupon-circle { - font-family: 'Font Awesome 5 Brands'; - font-weight: 400; -} - -.@{fa-css-prefix}.@{fa-css-prefix}-stumbleupon { - font-family: 'Font Awesome 5 Brands'; - font-weight: 400; -} - -.@{fa-css-prefix}.@{fa-css-prefix}-delicious { - font-family: 'Font Awesome 5 Brands'; - font-weight: 400; -} - -.@{fa-css-prefix}.@{fa-css-prefix}-digg { - font-family: 'Font Awesome 5 Brands'; - font-weight: 400; -} - -.@{fa-css-prefix}.@{fa-css-prefix}-pied-piper-pp { - font-family: 'Font Awesome 5 Brands'; - font-weight: 400; -} - -.@{fa-css-prefix}.@{fa-css-prefix}-pied-piper-alt { - font-family: 'Font Awesome 5 Brands'; - font-weight: 400; -} - -.@{fa-css-prefix}.@{fa-css-prefix}-drupal { - font-family: 'Font Awesome 5 Brands'; - font-weight: 400; -} - -.@{fa-css-prefix}.@{fa-css-prefix}-joomla { - font-family: 'Font Awesome 5 Brands'; - font-weight: 400; -} - -.@{fa-css-prefix}.@{fa-css-prefix}-spoon:before { content: @fa-var-utensil-spoon; } - -.@{fa-css-prefix}.@{fa-css-prefix}-behance { - font-family: 'Font Awesome 5 Brands'; - font-weight: 400; -} - -.@{fa-css-prefix}.@{fa-css-prefix}-behance-square { - font-family: 'Font Awesome 5 Brands'; - font-weight: 400; -} - -.@{fa-css-prefix}.@{fa-css-prefix}-steam { - font-family: 'Font Awesome 5 Brands'; - font-weight: 400; -} - -.@{fa-css-prefix}.@{fa-css-prefix}-steam-square { - font-family: 'Font Awesome 5 Brands'; - font-weight: 400; -} - -.@{fa-css-prefix}.@{fa-css-prefix}-automobile:before { content: @fa-var-car; } - -.@{fa-css-prefix}.@{fa-css-prefix}-cab:before { content: @fa-var-taxi; } - -.@{fa-css-prefix}.@{fa-css-prefix}-envelope-o { - font-family: 'Font Awesome 5 Free'; - font-weight: 400; -} -.@{fa-css-prefix}.@{fa-css-prefix}-envelope-o:before { content: @fa-var-envelope; } - -.@{fa-css-prefix}.@{fa-css-prefix}-deviantart { - font-family: 'Font Awesome 5 Brands'; - font-weight: 400; -} - -.@{fa-css-prefix}.@{fa-css-prefix}-soundcloud { - font-family: 'Font Awesome 5 Brands'; - font-weight: 400; -} - -.@{fa-css-prefix}.@{fa-css-prefix}-file-pdf-o { - font-family: 'Font Awesome 5 Free'; - font-weight: 400; -} -.@{fa-css-prefix}.@{fa-css-prefix}-file-pdf-o:before { content: @fa-var-file-pdf; } - -.@{fa-css-prefix}.@{fa-css-prefix}-file-word-o { - font-family: 'Font Awesome 5 Free'; - font-weight: 400; -} -.@{fa-css-prefix}.@{fa-css-prefix}-file-word-o:before { content: @fa-var-file-word; } - -.@{fa-css-prefix}.@{fa-css-prefix}-file-excel-o { - font-family: 'Font Awesome 5 Free'; - font-weight: 400; -} -.@{fa-css-prefix}.@{fa-css-prefix}-file-excel-o:before { content: @fa-var-file-excel; } - -.@{fa-css-prefix}.@{fa-css-prefix}-file-powerpoint-o { - font-family: 'Font Awesome 5 Free'; - font-weight: 400; -} -.@{fa-css-prefix}.@{fa-css-prefix}-file-powerpoint-o:before { content: @fa-var-file-powerpoint; } - -.@{fa-css-prefix}.@{fa-css-prefix}-file-image-o { - font-family: 'Font Awesome 5 Free'; - font-weight: 400; -} -.@{fa-css-prefix}.@{fa-css-prefix}-file-image-o:before { content: @fa-var-file-image; } - -.@{fa-css-prefix}.@{fa-css-prefix}-file-photo-o { - font-family: 'Font Awesome 5 Free'; - font-weight: 400; -} -.@{fa-css-prefix}.@{fa-css-prefix}-file-photo-o:before { content: @fa-var-file-image; } - -.@{fa-css-prefix}.@{fa-css-prefix}-file-picture-o { - font-family: 'Font Awesome 5 Free'; - font-weight: 400; -} -.@{fa-css-prefix}.@{fa-css-prefix}-file-picture-o:before { content: @fa-var-file-image; } - -.@{fa-css-prefix}.@{fa-css-prefix}-file-archive-o { - font-family: 'Font Awesome 5 Free'; - font-weight: 400; -} -.@{fa-css-prefix}.@{fa-css-prefix}-file-archive-o:before { content: @fa-var-file-archive; } - -.@{fa-css-prefix}.@{fa-css-prefix}-file-zip-o { - font-family: 'Font Awesome 5 Free'; - font-weight: 400; -} -.@{fa-css-prefix}.@{fa-css-prefix}-file-zip-o:before { content: @fa-var-file-archive; } - -.@{fa-css-prefix}.@{fa-css-prefix}-file-audio-o { - font-family: 'Font Awesome 5 Free'; - font-weight: 400; -} -.@{fa-css-prefix}.@{fa-css-prefix}-file-audio-o:before { content: @fa-var-file-audio; } - -.@{fa-css-prefix}.@{fa-css-prefix}-file-sound-o { - font-family: 'Font Awesome 5 Free'; - font-weight: 400; -} -.@{fa-css-prefix}.@{fa-css-prefix}-file-sound-o:before { content: @fa-var-file-audio; } - -.@{fa-css-prefix}.@{fa-css-prefix}-file-video-o { - font-family: 'Font Awesome 5 Free'; - font-weight: 400; -} -.@{fa-css-prefix}.@{fa-css-prefix}-file-video-o:before { content: @fa-var-file-video; } - -.@{fa-css-prefix}.@{fa-css-prefix}-file-movie-o { - font-family: 'Font Awesome 5 Free'; - font-weight: 400; -} -.@{fa-css-prefix}.@{fa-css-prefix}-file-movie-o:before { content: @fa-var-file-video; } - -.@{fa-css-prefix}.@{fa-css-prefix}-file-code-o { - font-family: 'Font Awesome 5 Free'; - font-weight: 400; -} -.@{fa-css-prefix}.@{fa-css-prefix}-file-code-o:before { content: @fa-var-file-code; } - -.@{fa-css-prefix}.@{fa-css-prefix}-vine { - font-family: 'Font Awesome 5 Brands'; - font-weight: 400; -} - -.@{fa-css-prefix}.@{fa-css-prefix}-codepen { - font-family: 'Font Awesome 5 Brands'; - font-weight: 400; -} - -.@{fa-css-prefix}.@{fa-css-prefix}-jsfiddle { - font-family: 'Font Awesome 5 Brands'; - font-weight: 400; -} - -.@{fa-css-prefix}.@{fa-css-prefix}-life-ring { - font-family: 'Font Awesome 5 Free'; - font-weight: 400; -} - -.@{fa-css-prefix}.@{fa-css-prefix}-life-bouy { - font-family: 'Font Awesome 5 Free'; - font-weight: 400; -} -.@{fa-css-prefix}.@{fa-css-prefix}-life-bouy:before { content: @fa-var-life-ring; } - -.@{fa-css-prefix}.@{fa-css-prefix}-life-buoy { - font-family: 'Font Awesome 5 Free'; - font-weight: 400; -} -.@{fa-css-prefix}.@{fa-css-prefix}-life-buoy:before { content: @fa-var-life-ring; } - -.@{fa-css-prefix}.@{fa-css-prefix}-life-saver { - font-family: 'Font Awesome 5 Free'; - font-weight: 400; -} -.@{fa-css-prefix}.@{fa-css-prefix}-life-saver:before { content: @fa-var-life-ring; } - -.@{fa-css-prefix}.@{fa-css-prefix}-support { - font-family: 'Font Awesome 5 Free'; - font-weight: 400; -} -.@{fa-css-prefix}.@{fa-css-prefix}-support:before { content: @fa-var-life-ring; } - -.@{fa-css-prefix}.@{fa-css-prefix}-circle-o-notch:before { content: @fa-var-circle-notch; } - -.@{fa-css-prefix}.@{fa-css-prefix}-rebel { - font-family: 'Font Awesome 5 Brands'; - font-weight: 400; -} - -.@{fa-css-prefix}.@{fa-css-prefix}-ra { - font-family: 'Font Awesome 5 Brands'; - font-weight: 400; -} -.@{fa-css-prefix}.@{fa-css-prefix}-ra:before { content: @fa-var-rebel; } - -.@{fa-css-prefix}.@{fa-css-prefix}-resistance { - font-family: 'Font Awesome 5 Brands'; - font-weight: 400; -} -.@{fa-css-prefix}.@{fa-css-prefix}-resistance:before { content: @fa-var-rebel; } - -.@{fa-css-prefix}.@{fa-css-prefix}-empire { - font-family: 'Font Awesome 5 Brands'; - font-weight: 400; -} - -.@{fa-css-prefix}.@{fa-css-prefix}-ge { - font-family: 'Font Awesome 5 Brands'; - font-weight: 400; -} -.@{fa-css-prefix}.@{fa-css-prefix}-ge:before { content: @fa-var-empire; } - -.@{fa-css-prefix}.@{fa-css-prefix}-git-square { - font-family: 'Font Awesome 5 Brands'; - font-weight: 400; -} - -.@{fa-css-prefix}.@{fa-css-prefix}-git { - font-family: 'Font Awesome 5 Brands'; - font-weight: 400; -} - -.@{fa-css-prefix}.@{fa-css-prefix}-hacker-news { - font-family: 'Font Awesome 5 Brands'; - font-weight: 400; -} - -.@{fa-css-prefix}.@{fa-css-prefix}-y-combinator-square { - font-family: 'Font Awesome 5 Brands'; - font-weight: 400; -} -.@{fa-css-prefix}.@{fa-css-prefix}-y-combinator-square:before { content: @fa-var-hacker-news; } - -.@{fa-css-prefix}.@{fa-css-prefix}-yc-square { - font-family: 'Font Awesome 5 Brands'; - font-weight: 400; -} -.@{fa-css-prefix}.@{fa-css-prefix}-yc-square:before { content: @fa-var-hacker-news; } - -.@{fa-css-prefix}.@{fa-css-prefix}-tencent-weibo { - font-family: 'Font Awesome 5 Brands'; - font-weight: 400; -} - -.@{fa-css-prefix}.@{fa-css-prefix}-qq { - font-family: 'Font Awesome 5 Brands'; - font-weight: 400; -} - -.@{fa-css-prefix}.@{fa-css-prefix}-weixin { - font-family: 'Font Awesome 5 Brands'; - font-weight: 400; -} - -.@{fa-css-prefix}.@{fa-css-prefix}-wechat { - font-family: 'Font Awesome 5 Brands'; - font-weight: 400; -} -.@{fa-css-prefix}.@{fa-css-prefix}-wechat:before { content: @fa-var-weixin; } - -.@{fa-css-prefix}.@{fa-css-prefix}-send:before { content: @fa-var-paper-plane; } - -.@{fa-css-prefix}.@{fa-css-prefix}-paper-plane-o { - font-family: 'Font Awesome 5 Free'; - font-weight: 400; -} -.@{fa-css-prefix}.@{fa-css-prefix}-paper-plane-o:before { content: @fa-var-paper-plane; } - -.@{fa-css-prefix}.@{fa-css-prefix}-send-o { - font-family: 'Font Awesome 5 Free'; - font-weight: 400; -} -.@{fa-css-prefix}.@{fa-css-prefix}-send-o:before { content: @fa-var-paper-plane; } - -.@{fa-css-prefix}.@{fa-css-prefix}-circle-thin { - font-family: 'Font Awesome 5 Free'; - font-weight: 400; -} -.@{fa-css-prefix}.@{fa-css-prefix}-circle-thin:before { content: @fa-var-circle; } - -.@{fa-css-prefix}.@{fa-css-prefix}-header:before { content: @fa-var-heading; } - -.@{fa-css-prefix}.@{fa-css-prefix}-sliders:before { content: @fa-var-sliders-h; } - -.@{fa-css-prefix}.@{fa-css-prefix}-futbol-o { - font-family: 'Font Awesome 5 Free'; - font-weight: 400; -} -.@{fa-css-prefix}.@{fa-css-prefix}-futbol-o:before { content: @fa-var-futbol; } - -.@{fa-css-prefix}.@{fa-css-prefix}-soccer-ball-o { - font-family: 'Font Awesome 5 Free'; - font-weight: 400; -} -.@{fa-css-prefix}.@{fa-css-prefix}-soccer-ball-o:before { content: @fa-var-futbol; } - -.@{fa-css-prefix}.@{fa-css-prefix}-slideshare { - font-family: 'Font Awesome 5 Brands'; - font-weight: 400; -} - -.@{fa-css-prefix}.@{fa-css-prefix}-twitch { - font-family: 'Font Awesome 5 Brands'; - font-weight: 400; -} - -.@{fa-css-prefix}.@{fa-css-prefix}-yelp { - font-family: 'Font Awesome 5 Brands'; - font-weight: 400; -} - -.@{fa-css-prefix}.@{fa-css-prefix}-newspaper-o { - font-family: 'Font Awesome 5 Free'; - font-weight: 400; -} -.@{fa-css-prefix}.@{fa-css-prefix}-newspaper-o:before { content: @fa-var-newspaper; } - -.@{fa-css-prefix}.@{fa-css-prefix}-paypal { - font-family: 'Font Awesome 5 Brands'; - font-weight: 400; -} - -.@{fa-css-prefix}.@{fa-css-prefix}-google-wallet { - font-family: 'Font Awesome 5 Brands'; - font-weight: 400; -} - -.@{fa-css-prefix}.@{fa-css-prefix}-cc-visa { - font-family: 'Font Awesome 5 Brands'; - font-weight: 400; -} - -.@{fa-css-prefix}.@{fa-css-prefix}-cc-mastercard { - font-family: 'Font Awesome 5 Brands'; - font-weight: 400; -} - -.@{fa-css-prefix}.@{fa-css-prefix}-cc-discover { - font-family: 'Font Awesome 5 Brands'; - font-weight: 400; -} - -.@{fa-css-prefix}.@{fa-css-prefix}-cc-amex { - font-family: 'Font Awesome 5 Brands'; - font-weight: 400; -} - -.@{fa-css-prefix}.@{fa-css-prefix}-cc-paypal { - font-family: 'Font Awesome 5 Brands'; - font-weight: 400; -} - -.@{fa-css-prefix}.@{fa-css-prefix}-cc-stripe { - font-family: 'Font Awesome 5 Brands'; - font-weight: 400; -} - -.@{fa-css-prefix}.@{fa-css-prefix}-bell-slash-o { - font-family: 'Font Awesome 5 Free'; - font-weight: 400; -} -.@{fa-css-prefix}.@{fa-css-prefix}-bell-slash-o:before { content: @fa-var-bell-slash; } - -.@{fa-css-prefix}.@{fa-css-prefix}-trash:before { content: @fa-var-trash-alt; } - -.@{fa-css-prefix}.@{fa-css-prefix}-copyright { - font-family: 'Font Awesome 5 Free'; - font-weight: 400; -} - -.@{fa-css-prefix}.@{fa-css-prefix}-eyedropper:before { content: @fa-var-eye-dropper; } - -.@{fa-css-prefix}.@{fa-css-prefix}-area-chart:before { content: @fa-var-chart-area; } - -.@{fa-css-prefix}.@{fa-css-prefix}-pie-chart:before { content: @fa-var-chart-pie; } - -.@{fa-css-prefix}.@{fa-css-prefix}-line-chart:before { content: @fa-var-chart-line; } - -.@{fa-css-prefix}.@{fa-css-prefix}-lastfm { - font-family: 'Font Awesome 5 Brands'; - font-weight: 400; -} - -.@{fa-css-prefix}.@{fa-css-prefix}-lastfm-square { - font-family: 'Font Awesome 5 Brands'; - font-weight: 400; -} - -.@{fa-css-prefix}.@{fa-css-prefix}-ioxhost { - font-family: 'Font Awesome 5 Brands'; - font-weight: 400; -} - -.@{fa-css-prefix}.@{fa-css-prefix}-angellist { - font-family: 'Font Awesome 5 Brands'; - font-weight: 400; -} - -.@{fa-css-prefix}.@{fa-css-prefix}-cc { - font-family: 'Font Awesome 5 Free'; - font-weight: 400; -} -.@{fa-css-prefix}.@{fa-css-prefix}-cc:before { content: @fa-var-closed-captioning; } - -.@{fa-css-prefix}.@{fa-css-prefix}-ils:before { content: @fa-var-shekel-sign; } - -.@{fa-css-prefix}.@{fa-css-prefix}-shekel:before { content: @fa-var-shekel-sign; } - -.@{fa-css-prefix}.@{fa-css-prefix}-sheqel:before { content: @fa-var-shekel-sign; } - -.@{fa-css-prefix}.@{fa-css-prefix}-meanpath { - font-family: 'Font Awesome 5 Brands'; - font-weight: 400; -} -.@{fa-css-prefix}.@{fa-css-prefix}-meanpath:before { content: @fa-var-font-awesome; } - -.@{fa-css-prefix}.@{fa-css-prefix}-buysellads { - font-family: 'Font Awesome 5 Brands'; - font-weight: 400; -} - -.@{fa-css-prefix}.@{fa-css-prefix}-connectdevelop { - font-family: 'Font Awesome 5 Brands'; - font-weight: 400; -} - -.@{fa-css-prefix}.@{fa-css-prefix}-dashcube { - font-family: 'Font Awesome 5 Brands'; - font-weight: 400; -} - -.@{fa-css-prefix}.@{fa-css-prefix}-forumbee { - font-family: 'Font Awesome 5 Brands'; - font-weight: 400; -} - -.@{fa-css-prefix}.@{fa-css-prefix}-leanpub { - font-family: 'Font Awesome 5 Brands'; - font-weight: 400; -} - -.@{fa-css-prefix}.@{fa-css-prefix}-sellsy { - font-family: 'Font Awesome 5 Brands'; - font-weight: 400; -} - -.@{fa-css-prefix}.@{fa-css-prefix}-shirtsinbulk { - font-family: 'Font Awesome 5 Brands'; - font-weight: 400; -} - -.@{fa-css-prefix}.@{fa-css-prefix}-simplybuilt { - font-family: 'Font Awesome 5 Brands'; - font-weight: 400; -} - -.@{fa-css-prefix}.@{fa-css-prefix}-skyatlas { - font-family: 'Font Awesome 5 Brands'; - font-weight: 400; -} - -.@{fa-css-prefix}.@{fa-css-prefix}-diamond { - font-family: 'Font Awesome 5 Free'; - font-weight: 400; -} -.@{fa-css-prefix}.@{fa-css-prefix}-diamond:before { content: @fa-var-gem; } - -.@{fa-css-prefix}.@{fa-css-prefix}-intersex:before { content: @fa-var-transgender; } - -.@{fa-css-prefix}.@{fa-css-prefix}-facebook-official { - font-family: 'Font Awesome 5 Brands'; - font-weight: 400; -} -.@{fa-css-prefix}.@{fa-css-prefix}-facebook-official:before { content: @fa-var-facebook; } - -.@{fa-css-prefix}.@{fa-css-prefix}-pinterest-p { - font-family: 'Font Awesome 5 Brands'; - font-weight: 400; -} - -.@{fa-css-prefix}.@{fa-css-prefix}-whatsapp { - font-family: 'Font Awesome 5 Brands'; - font-weight: 400; -} - -.@{fa-css-prefix}.@{fa-css-prefix}-hotel:before { content: @fa-var-bed; } - -.@{fa-css-prefix}.@{fa-css-prefix}-viacoin { - font-family: 'Font Awesome 5 Brands'; - font-weight: 400; -} - -.@{fa-css-prefix}.@{fa-css-prefix}-medium { - font-family: 'Font Awesome 5 Brands'; - font-weight: 400; -} - -.@{fa-css-prefix}.@{fa-css-prefix}-y-combinator { - font-family: 'Font Awesome 5 Brands'; - font-weight: 400; -} - -.@{fa-css-prefix}.@{fa-css-prefix}-yc { - font-family: 'Font Awesome 5 Brands'; - font-weight: 400; -} -.@{fa-css-prefix}.@{fa-css-prefix}-yc:before { content: @fa-var-y-combinator; } - -.@{fa-css-prefix}.@{fa-css-prefix}-optin-monster { - font-family: 'Font Awesome 5 Brands'; - font-weight: 400; -} - -.@{fa-css-prefix}.@{fa-css-prefix}-opencart { - font-family: 'Font Awesome 5 Brands'; - font-weight: 400; -} - -.@{fa-css-prefix}.@{fa-css-prefix}-expeditedssl { - font-family: 'Font Awesome 5 Brands'; - font-weight: 400; -} - -.@{fa-css-prefix}.@{fa-css-prefix}-battery-4:before { content: @fa-var-battery-full; } - -.@{fa-css-prefix}.@{fa-css-prefix}-battery:before { content: @fa-var-battery-full; } - -.@{fa-css-prefix}.@{fa-css-prefix}-battery-3:before { content: @fa-var-battery-three-quarters; } - -.@{fa-css-prefix}.@{fa-css-prefix}-battery-2:before { content: @fa-var-battery-half; } - -.@{fa-css-prefix}.@{fa-css-prefix}-battery-1:before { content: @fa-var-battery-quarter; } - -.@{fa-css-prefix}.@{fa-css-prefix}-battery-0:before { content: @fa-var-battery-empty; } - -.@{fa-css-prefix}.@{fa-css-prefix}-object-group { - font-family: 'Font Awesome 5 Free'; - font-weight: 400; -} - -.@{fa-css-prefix}.@{fa-css-prefix}-object-ungroup { - font-family: 'Font Awesome 5 Free'; - font-weight: 400; -} - -.@{fa-css-prefix}.@{fa-css-prefix}-sticky-note-o { - font-family: 'Font Awesome 5 Free'; - font-weight: 400; -} -.@{fa-css-prefix}.@{fa-css-prefix}-sticky-note-o:before { content: @fa-var-sticky-note; } - -.@{fa-css-prefix}.@{fa-css-prefix}-cc-jcb { - font-family: 'Font Awesome 5 Brands'; - font-weight: 400; -} - -.@{fa-css-prefix}.@{fa-css-prefix}-cc-diners-club { - font-family: 'Font Awesome 5 Brands'; - font-weight: 400; -} - -.@{fa-css-prefix}.@{fa-css-prefix}-clone { - font-family: 'Font Awesome 5 Free'; - font-weight: 400; -} - -.@{fa-css-prefix}.@{fa-css-prefix}-hourglass-o { - font-family: 'Font Awesome 5 Free'; - font-weight: 400; -} -.@{fa-css-prefix}.@{fa-css-prefix}-hourglass-o:before { content: @fa-var-hourglass; } - -.@{fa-css-prefix}.@{fa-css-prefix}-hourglass-1:before { content: @fa-var-hourglass-start; } - -.@{fa-css-prefix}.@{fa-css-prefix}-hourglass-2:before { content: @fa-var-hourglass-half; } - -.@{fa-css-prefix}.@{fa-css-prefix}-hourglass-3:before { content: @fa-var-hourglass-end; } - -.@{fa-css-prefix}.@{fa-css-prefix}-hand-rock-o { - font-family: 'Font Awesome 5 Free'; - font-weight: 400; -} -.@{fa-css-prefix}.@{fa-css-prefix}-hand-rock-o:before { content: @fa-var-hand-rock; } - -.@{fa-css-prefix}.@{fa-css-prefix}-hand-grab-o { - font-family: 'Font Awesome 5 Free'; - font-weight: 400; -} -.@{fa-css-prefix}.@{fa-css-prefix}-hand-grab-o:before { content: @fa-var-hand-rock; } - -.@{fa-css-prefix}.@{fa-css-prefix}-hand-paper-o { - font-family: 'Font Awesome 5 Free'; - font-weight: 400; -} -.@{fa-css-prefix}.@{fa-css-prefix}-hand-paper-o:before { content: @fa-var-hand-paper; } - -.@{fa-css-prefix}.@{fa-css-prefix}-hand-stop-o { - font-family: 'Font Awesome 5 Free'; - font-weight: 400; -} -.@{fa-css-prefix}.@{fa-css-prefix}-hand-stop-o:before { content: @fa-var-hand-paper; } - -.@{fa-css-prefix}.@{fa-css-prefix}-hand-scissors-o { - font-family: 'Font Awesome 5 Free'; - font-weight: 400; -} -.@{fa-css-prefix}.@{fa-css-prefix}-hand-scissors-o:before { content: @fa-var-hand-scissors; } - -.@{fa-css-prefix}.@{fa-css-prefix}-hand-lizard-o { - font-family: 'Font Awesome 5 Free'; - font-weight: 400; -} -.@{fa-css-prefix}.@{fa-css-prefix}-hand-lizard-o:before { content: @fa-var-hand-lizard; } - -.@{fa-css-prefix}.@{fa-css-prefix}-hand-spock-o { - font-family: 'Font Awesome 5 Free'; - font-weight: 400; -} -.@{fa-css-prefix}.@{fa-css-prefix}-hand-spock-o:before { content: @fa-var-hand-spock; } - -.@{fa-css-prefix}.@{fa-css-prefix}-hand-pointer-o { - font-family: 'Font Awesome 5 Free'; - font-weight: 400; -} -.@{fa-css-prefix}.@{fa-css-prefix}-hand-pointer-o:before { content: @fa-var-hand-pointer; } - -.@{fa-css-prefix}.@{fa-css-prefix}-hand-peace-o { - font-family: 'Font Awesome 5 Free'; - font-weight: 400; -} -.@{fa-css-prefix}.@{fa-css-prefix}-hand-peace-o:before { content: @fa-var-hand-peace; } - -.@{fa-css-prefix}.@{fa-css-prefix}-registered { - font-family: 'Font Awesome 5 Free'; - font-weight: 400; -} - -.@{fa-css-prefix}.@{fa-css-prefix}-creative-commons { - font-family: 'Font Awesome 5 Brands'; - font-weight: 400; -} - -.@{fa-css-prefix}.@{fa-css-prefix}-gg { - font-family: 'Font Awesome 5 Brands'; - font-weight: 400; -} - -.@{fa-css-prefix}.@{fa-css-prefix}-gg-circle { - font-family: 'Font Awesome 5 Brands'; - font-weight: 400; -} - -.@{fa-css-prefix}.@{fa-css-prefix}-tripadvisor { - font-family: 'Font Awesome 5 Brands'; - font-weight: 400; -} - -.@{fa-css-prefix}.@{fa-css-prefix}-odnoklassniki { - font-family: 'Font Awesome 5 Brands'; - font-weight: 400; -} - -.@{fa-css-prefix}.@{fa-css-prefix}-odnoklassniki-square { - font-family: 'Font Awesome 5 Brands'; - font-weight: 400; -} - -.@{fa-css-prefix}.@{fa-css-prefix}-get-pocket { - font-family: 'Font Awesome 5 Brands'; - font-weight: 400; -} - -.@{fa-css-prefix}.@{fa-css-prefix}-wikipedia-w { - font-family: 'Font Awesome 5 Brands'; - font-weight: 400; -} - -.@{fa-css-prefix}.@{fa-css-prefix}-safari { - font-family: 'Font Awesome 5 Brands'; - font-weight: 400; -} - -.@{fa-css-prefix}.@{fa-css-prefix}-chrome { - font-family: 'Font Awesome 5 Brands'; - font-weight: 400; -} - -.@{fa-css-prefix}.@{fa-css-prefix}-firefox { - font-family: 'Font Awesome 5 Brands'; - font-weight: 400; -} - -.@{fa-css-prefix}.@{fa-css-prefix}-opera { - font-family: 'Font Awesome 5 Brands'; - font-weight: 400; -} - -.@{fa-css-prefix}.@{fa-css-prefix}-internet-explorer { - font-family: 'Font Awesome 5 Brands'; - font-weight: 400; -} - -.@{fa-css-prefix}.@{fa-css-prefix}-television:before { content: @fa-var-tv; } - -.@{fa-css-prefix}.@{fa-css-prefix}-contao { - font-family: 'Font Awesome 5 Brands'; - font-weight: 400; -} - -.@{fa-css-prefix}.@{fa-css-prefix}-500px { - font-family: 'Font Awesome 5 Brands'; - font-weight: 400; -} - -.@{fa-css-prefix}.@{fa-css-prefix}-amazon { - font-family: 'Font Awesome 5 Brands'; - font-weight: 400; -} - -.@{fa-css-prefix}.@{fa-css-prefix}-calendar-plus-o { - font-family: 'Font Awesome 5 Free'; - font-weight: 400; -} -.@{fa-css-prefix}.@{fa-css-prefix}-calendar-plus-o:before { content: @fa-var-calendar-plus; } - -.@{fa-css-prefix}.@{fa-css-prefix}-calendar-minus-o { - font-family: 'Font Awesome 5 Free'; - font-weight: 400; -} -.@{fa-css-prefix}.@{fa-css-prefix}-calendar-minus-o:before { content: @fa-var-calendar-minus; } - -.@{fa-css-prefix}.@{fa-css-prefix}-calendar-times-o { - font-family: 'Font Awesome 5 Free'; - font-weight: 400; -} -.@{fa-css-prefix}.@{fa-css-prefix}-calendar-times-o:before { content: @fa-var-calendar-times; } - -.@{fa-css-prefix}.@{fa-css-prefix}-calendar-check-o { - font-family: 'Font Awesome 5 Free'; - font-weight: 400; -} -.@{fa-css-prefix}.@{fa-css-prefix}-calendar-check-o:before { content: @fa-var-calendar-check; } - -.@{fa-css-prefix}.@{fa-css-prefix}-map-o { - font-family: 'Font Awesome 5 Free'; - font-weight: 400; -} -.@{fa-css-prefix}.@{fa-css-prefix}-map-o:before { content: @fa-var-map; } - -.@{fa-css-prefix}.@{fa-css-prefix}-commenting:before { content: @fa-var-comment-dots; } - -.@{fa-css-prefix}.@{fa-css-prefix}-commenting-o { - font-family: 'Font Awesome 5 Free'; - font-weight: 400; -} -.@{fa-css-prefix}.@{fa-css-prefix}-commenting-o:before { content: @fa-var-comment-dots; } - -.@{fa-css-prefix}.@{fa-css-prefix}-houzz { - font-family: 'Font Awesome 5 Brands'; - font-weight: 400; -} - -.@{fa-css-prefix}.@{fa-css-prefix}-vimeo { - font-family: 'Font Awesome 5 Brands'; - font-weight: 400; -} -.@{fa-css-prefix}.@{fa-css-prefix}-vimeo:before { content: @fa-var-vimeo-v; } - -.@{fa-css-prefix}.@{fa-css-prefix}-black-tie { - font-family: 'Font Awesome 5 Brands'; - font-weight: 400; -} - -.@{fa-css-prefix}.@{fa-css-prefix}-fonticons { - font-family: 'Font Awesome 5 Brands'; - font-weight: 400; -} - -.@{fa-css-prefix}.@{fa-css-prefix}-reddit-alien { - font-family: 'Font Awesome 5 Brands'; - font-weight: 400; -} - -.@{fa-css-prefix}.@{fa-css-prefix}-edge { - font-family: 'Font Awesome 5 Brands'; - font-weight: 400; -} - -.@{fa-css-prefix}.@{fa-css-prefix}-credit-card-alt:before { content: @fa-var-credit-card; } - -.@{fa-css-prefix}.@{fa-css-prefix}-codiepie { - font-family: 'Font Awesome 5 Brands'; - font-weight: 400; -} - -.@{fa-css-prefix}.@{fa-css-prefix}-modx { - font-family: 'Font Awesome 5 Brands'; - font-weight: 400; -} - -.@{fa-css-prefix}.@{fa-css-prefix}-fort-awesome { - font-family: 'Font Awesome 5 Brands'; - font-weight: 400; -} - -.@{fa-css-prefix}.@{fa-css-prefix}-usb { - font-family: 'Font Awesome 5 Brands'; - font-weight: 400; -} - -.@{fa-css-prefix}.@{fa-css-prefix}-product-hunt { - font-family: 'Font Awesome 5 Brands'; - font-weight: 400; -} - -.@{fa-css-prefix}.@{fa-css-prefix}-mixcloud { - font-family: 'Font Awesome 5 Brands'; - font-weight: 400; -} - -.@{fa-css-prefix}.@{fa-css-prefix}-scribd { - font-family: 'Font Awesome 5 Brands'; - font-weight: 400; -} - -.@{fa-css-prefix}.@{fa-css-prefix}-pause-circle-o { - font-family: 'Font Awesome 5 Free'; - font-weight: 400; -} -.@{fa-css-prefix}.@{fa-css-prefix}-pause-circle-o:before { content: @fa-var-pause-circle; } - -.@{fa-css-prefix}.@{fa-css-prefix}-stop-circle-o { - font-family: 'Font Awesome 5 Free'; - font-weight: 400; -} -.@{fa-css-prefix}.@{fa-css-prefix}-stop-circle-o:before { content: @fa-var-stop-circle; } - -.@{fa-css-prefix}.@{fa-css-prefix}-bluetooth { - font-family: 'Font Awesome 5 Brands'; - font-weight: 400; -} - -.@{fa-css-prefix}.@{fa-css-prefix}-bluetooth-b { - font-family: 'Font Awesome 5 Brands'; - font-weight: 400; -} - -.@{fa-css-prefix}.@{fa-css-prefix}-gitlab { - font-family: 'Font Awesome 5 Brands'; - font-weight: 400; -} - -.@{fa-css-prefix}.@{fa-css-prefix}-wpbeginner { - font-family: 'Font Awesome 5 Brands'; - font-weight: 400; -} - -.@{fa-css-prefix}.@{fa-css-prefix}-wpforms { - font-family: 'Font Awesome 5 Brands'; - font-weight: 400; -} - -.@{fa-css-prefix}.@{fa-css-prefix}-envira { - font-family: 'Font Awesome 5 Brands'; - font-weight: 400; -} - -.@{fa-css-prefix}.@{fa-css-prefix}-wheelchair-alt { - font-family: 'Font Awesome 5 Brands'; - font-weight: 400; -} -.@{fa-css-prefix}.@{fa-css-prefix}-wheelchair-alt:before { content: @fa-var-accessible-icon; } - -.@{fa-css-prefix}.@{fa-css-prefix}-question-circle-o { - font-family: 'Font Awesome 5 Free'; - font-weight: 400; -} -.@{fa-css-prefix}.@{fa-css-prefix}-question-circle-o:before { content: @fa-var-question-circle; } - -.@{fa-css-prefix}.@{fa-css-prefix}-volume-control-phone:before { content: @fa-var-phone-volume; } - -.@{fa-css-prefix}.@{fa-css-prefix}-asl-interpreting:before { content: @fa-var-american-sign-language-interpreting; } - -.@{fa-css-prefix}.@{fa-css-prefix}-deafness:before { content: @fa-var-deaf; } - -.@{fa-css-prefix}.@{fa-css-prefix}-hard-of-hearing:before { content: @fa-var-deaf; } - -.@{fa-css-prefix}.@{fa-css-prefix}-glide { - font-family: 'Font Awesome 5 Brands'; - font-weight: 400; -} - -.@{fa-css-prefix}.@{fa-css-prefix}-glide-g { - font-family: 'Font Awesome 5 Brands'; - font-weight: 400; -} - -.@{fa-css-prefix}.@{fa-css-prefix}-signing:before { content: @fa-var-sign-language; } - -.@{fa-css-prefix}.@{fa-css-prefix}-viadeo { - font-family: 'Font Awesome 5 Brands'; - font-weight: 400; -} - -.@{fa-css-prefix}.@{fa-css-prefix}-viadeo-square { - font-family: 'Font Awesome 5 Brands'; - font-weight: 400; -} - -.@{fa-css-prefix}.@{fa-css-prefix}-snapchat { - font-family: 'Font Awesome 5 Brands'; - font-weight: 400; -} - -.@{fa-css-prefix}.@{fa-css-prefix}-snapchat-ghost { - font-family: 'Font Awesome 5 Brands'; - font-weight: 400; -} - -.@{fa-css-prefix}.@{fa-css-prefix}-snapchat-square { - font-family: 'Font Awesome 5 Brands'; - font-weight: 400; -} - -.@{fa-css-prefix}.@{fa-css-prefix}-pied-piper { - font-family: 'Font Awesome 5 Brands'; - font-weight: 400; -} - -.@{fa-css-prefix}.@{fa-css-prefix}-first-order { - font-family: 'Font Awesome 5 Brands'; - font-weight: 400; -} - -.@{fa-css-prefix}.@{fa-css-prefix}-yoast { - font-family: 'Font Awesome 5 Brands'; - font-weight: 400; -} - -.@{fa-css-prefix}.@{fa-css-prefix}-themeisle { - font-family: 'Font Awesome 5 Brands'; - font-weight: 400; -} - -.@{fa-css-prefix}.@{fa-css-prefix}-google-plus-official { - font-family: 'Font Awesome 5 Brands'; - font-weight: 400; -} -.@{fa-css-prefix}.@{fa-css-prefix}-google-plus-official:before { content: @fa-var-google-plus; } - -.@{fa-css-prefix}.@{fa-css-prefix}-google-plus-circle { - font-family: 'Font Awesome 5 Brands'; - font-weight: 400; -} -.@{fa-css-prefix}.@{fa-css-prefix}-google-plus-circle:before { content: @fa-var-google-plus; } - -.@{fa-css-prefix}.@{fa-css-prefix}-font-awesome { - font-family: 'Font Awesome 5 Brands'; - font-weight: 400; -} - -.@{fa-css-prefix}.@{fa-css-prefix}-fa { - font-family: 'Font Awesome 5 Brands'; - font-weight: 400; -} -.@{fa-css-prefix}.@{fa-css-prefix}-fa:before { content: @fa-var-font-awesome; } - -.@{fa-css-prefix}.@{fa-css-prefix}-handshake-o { - font-family: 'Font Awesome 5 Free'; - font-weight: 400; -} -.@{fa-css-prefix}.@{fa-css-prefix}-handshake-o:before { content: @fa-var-handshake; } - -.@{fa-css-prefix}.@{fa-css-prefix}-envelope-open-o { - font-family: 'Font Awesome 5 Free'; - font-weight: 400; -} -.@{fa-css-prefix}.@{fa-css-prefix}-envelope-open-o:before { content: @fa-var-envelope-open; } - -.@{fa-css-prefix}.@{fa-css-prefix}-linode { - font-family: 'Font Awesome 5 Brands'; - font-weight: 400; -} - -.@{fa-css-prefix}.@{fa-css-prefix}-address-book-o { - font-family: 'Font Awesome 5 Free'; - font-weight: 400; -} -.@{fa-css-prefix}.@{fa-css-prefix}-address-book-o:before { content: @fa-var-address-book; } - -.@{fa-css-prefix}.@{fa-css-prefix}-vcard:before { content: @fa-var-address-card; } - -.@{fa-css-prefix}.@{fa-css-prefix}-address-card-o { - font-family: 'Font Awesome 5 Free'; - font-weight: 400; -} -.@{fa-css-prefix}.@{fa-css-prefix}-address-card-o:before { content: @fa-var-address-card; } - -.@{fa-css-prefix}.@{fa-css-prefix}-vcard-o { - font-family: 'Font Awesome 5 Free'; - font-weight: 400; -} -.@{fa-css-prefix}.@{fa-css-prefix}-vcard-o:before { content: @fa-var-address-card; } - -.@{fa-css-prefix}.@{fa-css-prefix}-user-circle-o { - font-family: 'Font Awesome 5 Free'; - font-weight: 400; -} -.@{fa-css-prefix}.@{fa-css-prefix}-user-circle-o:before { content: @fa-var-user-circle; } - -.@{fa-css-prefix}.@{fa-css-prefix}-user-o { - font-family: 'Font Awesome 5 Free'; - font-weight: 400; -} -.@{fa-css-prefix}.@{fa-css-prefix}-user-o:before { content: @fa-var-user; } - -.@{fa-css-prefix}.@{fa-css-prefix}-id-badge { - font-family: 'Font Awesome 5 Free'; - font-weight: 400; -} - -.@{fa-css-prefix}.@{fa-css-prefix}-drivers-license:before { content: @fa-var-id-card; } - -.@{fa-css-prefix}.@{fa-css-prefix}-id-card-o { - font-family: 'Font Awesome 5 Free'; - font-weight: 400; -} -.@{fa-css-prefix}.@{fa-css-prefix}-id-card-o:before { content: @fa-var-id-card; } - -.@{fa-css-prefix}.@{fa-css-prefix}-drivers-license-o { - font-family: 'Font Awesome 5 Free'; - font-weight: 400; -} -.@{fa-css-prefix}.@{fa-css-prefix}-drivers-license-o:before { content: @fa-var-id-card; } - -.@{fa-css-prefix}.@{fa-css-prefix}-quora { - font-family: 'Font Awesome 5 Brands'; - font-weight: 400; -} - -.@{fa-css-prefix}.@{fa-css-prefix}-free-code-camp { - font-family: 'Font Awesome 5 Brands'; - font-weight: 400; -} - -.@{fa-css-prefix}.@{fa-css-prefix}-telegram { - font-family: 'Font Awesome 5 Brands'; - font-weight: 400; -} - -.@{fa-css-prefix}.@{fa-css-prefix}-thermometer-4:before { content: @fa-var-thermometer-full; } - -.@{fa-css-prefix}.@{fa-css-prefix}-thermometer:before { content: @fa-var-thermometer-full; } - -.@{fa-css-prefix}.@{fa-css-prefix}-thermometer-3:before { content: @fa-var-thermometer-three-quarters; } - -.@{fa-css-prefix}.@{fa-css-prefix}-thermometer-2:before { content: @fa-var-thermometer-half; } - -.@{fa-css-prefix}.@{fa-css-prefix}-thermometer-1:before { content: @fa-var-thermometer-quarter; } - -.@{fa-css-prefix}.@{fa-css-prefix}-thermometer-0:before { content: @fa-var-thermometer-empty; } - -.@{fa-css-prefix}.@{fa-css-prefix}-bathtub:before { content: @fa-var-bath; } - -.@{fa-css-prefix}.@{fa-css-prefix}-s15:before { content: @fa-var-bath; } - -.@{fa-css-prefix}.@{fa-css-prefix}-window-maximize { - font-family: 'Font Awesome 5 Free'; - font-weight: 400; -} - -.@{fa-css-prefix}.@{fa-css-prefix}-window-restore { - font-family: 'Font Awesome 5 Free'; - font-weight: 400; -} - -.@{fa-css-prefix}.@{fa-css-prefix}-times-rectangle:before { content: @fa-var-window-close; } - -.@{fa-css-prefix}.@{fa-css-prefix}-window-close-o { - font-family: 'Font Awesome 5 Free'; - font-weight: 400; -} -.@{fa-css-prefix}.@{fa-css-prefix}-window-close-o:before { content: @fa-var-window-close; } - -.@{fa-css-prefix}.@{fa-css-prefix}-times-rectangle-o { - font-family: 'Font Awesome 5 Free'; - font-weight: 400; -} -.@{fa-css-prefix}.@{fa-css-prefix}-times-rectangle-o:before { content: @fa-var-window-close; } - -.@{fa-css-prefix}.@{fa-css-prefix}-bandcamp { - font-family: 'Font Awesome 5 Brands'; - font-weight: 400; -} - -.@{fa-css-prefix}.@{fa-css-prefix}-grav { - font-family: 'Font Awesome 5 Brands'; - font-weight: 400; -} - -.@{fa-css-prefix}.@{fa-css-prefix}-etsy { - font-family: 'Font Awesome 5 Brands'; - font-weight: 400; -} - -.@{fa-css-prefix}.@{fa-css-prefix}-imdb { - font-family: 'Font Awesome 5 Brands'; - font-weight: 400; -} - -.@{fa-css-prefix}.@{fa-css-prefix}-ravelry { - font-family: 'Font Awesome 5 Brands'; - font-weight: 400; -} - -.@{fa-css-prefix}.@{fa-css-prefix}-eercast { - font-family: 'Font Awesome 5 Brands'; - font-weight: 400; -} -.@{fa-css-prefix}.@{fa-css-prefix}-eercast:before { content: @fa-var-sellcast; } - -.@{fa-css-prefix}.@{fa-css-prefix}-snowflake-o { - font-family: 'Font Awesome 5 Free'; - font-weight: 400; -} -.@{fa-css-prefix}.@{fa-css-prefix}-snowflake-o:before { content: @fa-var-snowflake; } - -.@{fa-css-prefix}.@{fa-css-prefix}-superpowers { - font-family: 'Font Awesome 5 Brands'; - font-weight: 400; -} - -.@{fa-css-prefix}.@{fa-css-prefix}-wpexplorer { - font-family: 'Font Awesome 5 Brands'; - font-weight: 400; -} - -.@{fa-css-prefix}.@{fa-css-prefix}-spotify { - font-family: 'Font Awesome 5 Brands'; - font-weight: 400; -} - diff --git a/application/client/src/app/ui/styles/fontawesome/less/_stacked.less b/application/client/src/app/ui/styles/fontawesome/less/_stacked.less deleted file mode 100644 index 263b5c44fc..0000000000 --- a/application/client/src/app/ui/styles/fontawesome/less/_stacked.less +++ /dev/null @@ -1,22 +0,0 @@ -// Stacked Icons -// ------------------------- - -.@{fa-css-prefix}-stack { - display: inline-block; - height: 2em; - line-height: 2em; - position: relative; - vertical-align: middle; - width: 2em; -} - -.@{fa-css-prefix}-stack-1x, .@{fa-css-prefix}-stack-2x { - left: 0; - position: absolute; - text-align: center; - width: 100%; -} - -.@{fa-css-prefix}-stack-1x { line-height: inherit; } -.@{fa-css-prefix}-stack-2x { font-size: 2em; } -.@{fa-css-prefix}-inverse { color: @fa-inverse; } diff --git a/application/client/src/app/ui/styles/fontawesome/less/_variables.less b/application/client/src/app/ui/styles/fontawesome/less/_variables.less deleted file mode 100644 index 4726cc95bc..0000000000 --- a/application/client/src/app/ui/styles/fontawesome/less/_variables.less +++ /dev/null @@ -1,1342 +0,0 @@ -// Variables -// -------------------------- - -@fa-font-path: "../webfonts"; -@fa-font-size-base: 16px; -@fa-line-height-base: 1; -@fa-css-prefix: fa; -@fa-version: "5.6.3"; -@fa-border-color: #eee; -@fa-inverse: #fff; -@fa-li-width: 2em; - -@fa-var-500px: "\f26e"; -@fa-var-accessible-icon: "\f368"; -@fa-var-accusoft: "\f369"; -@fa-var-acquisitions-incorporated: "\f6af"; -@fa-var-ad: "\f641"; -@fa-var-address-book: "\f2b9"; -@fa-var-address-card: "\f2bb"; -@fa-var-adjust: "\f042"; -@fa-var-adn: "\f170"; -@fa-var-adobe: "\f778"; -@fa-var-adversal: "\f36a"; -@fa-var-affiliatetheme: "\f36b"; -@fa-var-air-freshener: "\f5d0"; -@fa-var-algolia: "\f36c"; -@fa-var-align-center: "\f037"; -@fa-var-align-justify: "\f039"; -@fa-var-align-left: "\f036"; -@fa-var-align-right: "\f038"; -@fa-var-alipay: "\f642"; -@fa-var-allergies: "\f461"; -@fa-var-amazon: "\f270"; -@fa-var-amazon-pay: "\f42c"; -@fa-var-ambulance: "\f0f9"; -@fa-var-american-sign-language-interpreting: "\f2a3"; -@fa-var-amilia: "\f36d"; -@fa-var-anchor: "\f13d"; -@fa-var-android: "\f17b"; -@fa-var-angellist: "\f209"; -@fa-var-angle-double-down: "\f103"; -@fa-var-angle-double-left: "\f100"; -@fa-var-angle-double-right: "\f101"; -@fa-var-angle-double-up: "\f102"; -@fa-var-angle-down: "\f107"; -@fa-var-angle-left: "\f104"; -@fa-var-angle-right: "\f105"; -@fa-var-angle-up: "\f106"; -@fa-var-angry: "\f556"; -@fa-var-angrycreative: "\f36e"; -@fa-var-angular: "\f420"; -@fa-var-ankh: "\f644"; -@fa-var-app-store: "\f36f"; -@fa-var-app-store-ios: "\f370"; -@fa-var-apper: "\f371"; -@fa-var-apple: "\f179"; -@fa-var-apple-alt: "\f5d1"; -@fa-var-apple-pay: "\f415"; -@fa-var-archive: "\f187"; -@fa-var-archway: "\f557"; -@fa-var-arrow-alt-circle-down: "\f358"; -@fa-var-arrow-alt-circle-left: "\f359"; -@fa-var-arrow-alt-circle-right: "\f35a"; -@fa-var-arrow-alt-circle-up: "\f35b"; -@fa-var-arrow-circle-down: "\f0ab"; -@fa-var-arrow-circle-left: "\f0a8"; -@fa-var-arrow-circle-right: "\f0a9"; -@fa-var-arrow-circle-up: "\f0aa"; -@fa-var-arrow-down: "\f063"; -@fa-var-arrow-left: "\f060"; -@fa-var-arrow-right: "\f061"; -@fa-var-arrow-up: "\f062"; -@fa-var-arrows-alt: "\f0b2"; -@fa-var-arrows-alt-h: "\f337"; -@fa-var-arrows-alt-v: "\f338"; -@fa-var-artstation: "\f77a"; -@fa-var-assistive-listening-systems: "\f2a2"; -@fa-var-asterisk: "\f069"; -@fa-var-asymmetrik: "\f372"; -@fa-var-at: "\f1fa"; -@fa-var-atlas: "\f558"; -@fa-var-atlassian: "\f77b"; -@fa-var-atom: "\f5d2"; -@fa-var-audible: "\f373"; -@fa-var-audio-description: "\f29e"; -@fa-var-autoprefixer: "\f41c"; -@fa-var-avianex: "\f374"; -@fa-var-aviato: "\f421"; -@fa-var-award: "\f559"; -@fa-var-aws: "\f375"; -@fa-var-baby: "\f77c"; -@fa-var-baby-carriage: "\f77d"; -@fa-var-backspace: "\f55a"; -@fa-var-backward: "\f04a"; -@fa-var-balance-scale: "\f24e"; -@fa-var-ban: "\f05e"; -@fa-var-band-aid: "\f462"; -@fa-var-bandcamp: "\f2d5"; -@fa-var-barcode: "\f02a"; -@fa-var-bars: "\f0c9"; -@fa-var-baseball-ball: "\f433"; -@fa-var-basketball-ball: "\f434"; -@fa-var-bath: "\f2cd"; -@fa-var-battery-empty: "\f244"; -@fa-var-battery-full: "\f240"; -@fa-var-battery-half: "\f242"; -@fa-var-battery-quarter: "\f243"; -@fa-var-battery-three-quarters: "\f241"; -@fa-var-bed: "\f236"; -@fa-var-beer: "\f0fc"; -@fa-var-behance: "\f1b4"; -@fa-var-behance-square: "\f1b5"; -@fa-var-bell: "\f0f3"; -@fa-var-bell-slash: "\f1f6"; -@fa-var-bezier-curve: "\f55b"; -@fa-var-bible: "\f647"; -@fa-var-bicycle: "\f206"; -@fa-var-bimobject: "\f378"; -@fa-var-binoculars: "\f1e5"; -@fa-var-biohazard: "\f780"; -@fa-var-birthday-cake: "\f1fd"; -@fa-var-bitbucket: "\f171"; -@fa-var-bitcoin: "\f379"; -@fa-var-bity: "\f37a"; -@fa-var-black-tie: "\f27e"; -@fa-var-blackberry: "\f37b"; -@fa-var-blender: "\f517"; -@fa-var-blender-phone: "\f6b6"; -@fa-var-blind: "\f29d"; -@fa-var-blog: "\f781"; -@fa-var-blogger: "\f37c"; -@fa-var-blogger-b: "\f37d"; -@fa-var-bluetooth: "\f293"; -@fa-var-bluetooth-b: "\f294"; -@fa-var-bold: "\f032"; -@fa-var-bolt: "\f0e7"; -@fa-var-bomb: "\f1e2"; -@fa-var-bone: "\f5d7"; -@fa-var-bong: "\f55c"; -@fa-var-book: "\f02d"; -@fa-var-book-dead: "\f6b7"; -@fa-var-book-open: "\f518"; -@fa-var-book-reader: "\f5da"; -@fa-var-bookmark: "\f02e"; -@fa-var-bowling-ball: "\f436"; -@fa-var-box: "\f466"; -@fa-var-box-open: "\f49e"; -@fa-var-boxes: "\f468"; -@fa-var-braille: "\f2a1"; -@fa-var-brain: "\f5dc"; -@fa-var-briefcase: "\f0b1"; -@fa-var-briefcase-medical: "\f469"; -@fa-var-broadcast-tower: "\f519"; -@fa-var-broom: "\f51a"; -@fa-var-brush: "\f55d"; -@fa-var-btc: "\f15a"; -@fa-var-bug: "\f188"; -@fa-var-building: "\f1ad"; -@fa-var-bullhorn: "\f0a1"; -@fa-var-bullseye: "\f140"; -@fa-var-burn: "\f46a"; -@fa-var-buromobelexperte: "\f37f"; -@fa-var-bus: "\f207"; -@fa-var-bus-alt: "\f55e"; -@fa-var-business-time: "\f64a"; -@fa-var-buysellads: "\f20d"; -@fa-var-calculator: "\f1ec"; -@fa-var-calendar: "\f133"; -@fa-var-calendar-alt: "\f073"; -@fa-var-calendar-check: "\f274"; -@fa-var-calendar-day: "\f783"; -@fa-var-calendar-minus: "\f272"; -@fa-var-calendar-plus: "\f271"; -@fa-var-calendar-times: "\f273"; -@fa-var-calendar-week: "\f784"; -@fa-var-camera: "\f030"; -@fa-var-camera-retro: "\f083"; -@fa-var-campground: "\f6bb"; -@fa-var-canadian-maple-leaf: "\f785"; -@fa-var-candy-cane: "\f786"; -@fa-var-cannabis: "\f55f"; -@fa-var-capsules: "\f46b"; -@fa-var-car: "\f1b9"; -@fa-var-car-alt: "\f5de"; -@fa-var-car-battery: "\f5df"; -@fa-var-car-crash: "\f5e1"; -@fa-var-car-side: "\f5e4"; -@fa-var-caret-down: "\f0d7"; -@fa-var-caret-left: "\f0d9"; -@fa-var-caret-right: "\f0da"; -@fa-var-caret-square-down: "\f150"; -@fa-var-caret-square-left: "\f191"; -@fa-var-caret-square-right: "\f152"; -@fa-var-caret-square-up: "\f151"; -@fa-var-caret-up: "\f0d8"; -@fa-var-carrot: "\f787"; -@fa-var-cart-arrow-down: "\f218"; -@fa-var-cart-plus: "\f217"; -@fa-var-cash-register: "\f788"; -@fa-var-cat: "\f6be"; -@fa-var-cc-amazon-pay: "\f42d"; -@fa-var-cc-amex: "\f1f3"; -@fa-var-cc-apple-pay: "\f416"; -@fa-var-cc-diners-club: "\f24c"; -@fa-var-cc-discover: "\f1f2"; -@fa-var-cc-jcb: "\f24b"; -@fa-var-cc-mastercard: "\f1f1"; -@fa-var-cc-paypal: "\f1f4"; -@fa-var-cc-stripe: "\f1f5"; -@fa-var-cc-visa: "\f1f0"; -@fa-var-centercode: "\f380"; -@fa-var-centos: "\f789"; -@fa-var-certificate: "\f0a3"; -@fa-var-chair: "\f6c0"; -@fa-var-chalkboard: "\f51b"; -@fa-var-chalkboard-teacher: "\f51c"; -@fa-var-charging-station: "\f5e7"; -@fa-var-chart-area: "\f1fe"; -@fa-var-chart-bar: "\f080"; -@fa-var-chart-line: "\f201"; -@fa-var-chart-pie: "\f200"; -@fa-var-check: "\f00c"; -@fa-var-check-circle: "\f058"; -@fa-var-check-double: "\f560"; -@fa-var-check-square: "\f14a"; -@fa-var-chess: "\f439"; -@fa-var-chess-bishop: "\f43a"; -@fa-var-chess-board: "\f43c"; -@fa-var-chess-king: "\f43f"; -@fa-var-chess-knight: "\f441"; -@fa-var-chess-pawn: "\f443"; -@fa-var-chess-queen: "\f445"; -@fa-var-chess-rook: "\f447"; -@fa-var-chevron-circle-down: "\f13a"; -@fa-var-chevron-circle-left: "\f137"; -@fa-var-chevron-circle-right: "\f138"; -@fa-var-chevron-circle-up: "\f139"; -@fa-var-chevron-down: "\f078"; -@fa-var-chevron-left: "\f053"; -@fa-var-chevron-right: "\f054"; -@fa-var-chevron-up: "\f077"; -@fa-var-child: "\f1ae"; -@fa-var-chrome: "\f268"; -@fa-var-church: "\f51d"; -@fa-var-circle: "\f111"; -@fa-var-circle-notch: "\f1ce"; -@fa-var-city: "\f64f"; -@fa-var-clipboard: "\f328"; -@fa-var-clipboard-check: "\f46c"; -@fa-var-clipboard-list: "\f46d"; -@fa-var-clock: "\f017"; -@fa-var-clone: "\f24d"; -@fa-var-closed-captioning: "\f20a"; -@fa-var-cloud: "\f0c2"; -@fa-var-cloud-download-alt: "\f381"; -@fa-var-cloud-meatball: "\f73b"; -@fa-var-cloud-moon: "\f6c3"; -@fa-var-cloud-moon-rain: "\f73c"; -@fa-var-cloud-rain: "\f73d"; -@fa-var-cloud-showers-heavy: "\f740"; -@fa-var-cloud-sun: "\f6c4"; -@fa-var-cloud-sun-rain: "\f743"; -@fa-var-cloud-upload-alt: "\f382"; -@fa-var-cloudscale: "\f383"; -@fa-var-cloudsmith: "\f384"; -@fa-var-cloudversify: "\f385"; -@fa-var-cocktail: "\f561"; -@fa-var-code: "\f121"; -@fa-var-code-branch: "\f126"; -@fa-var-codepen: "\f1cb"; -@fa-var-codiepie: "\f284"; -@fa-var-coffee: "\f0f4"; -@fa-var-cog: "\f013"; -@fa-var-cogs: "\f085"; -@fa-var-coins: "\f51e"; -@fa-var-columns: "\f0db"; -@fa-var-comment: "\f075"; -@fa-var-comment-alt: "\f27a"; -@fa-var-comment-dollar: "\f651"; -@fa-var-comment-dots: "\f4ad"; -@fa-var-comment-slash: "\f4b3"; -@fa-var-comments: "\f086"; -@fa-var-comments-dollar: "\f653"; -@fa-var-compact-disc: "\f51f"; -@fa-var-compass: "\f14e"; -@fa-var-compress: "\f066"; -@fa-var-compress-arrows-alt: "\f78c"; -@fa-var-concierge-bell: "\f562"; -@fa-var-confluence: "\f78d"; -@fa-var-connectdevelop: "\f20e"; -@fa-var-contao: "\f26d"; -@fa-var-cookie: "\f563"; -@fa-var-cookie-bite: "\f564"; -@fa-var-copy: "\f0c5"; -@fa-var-copyright: "\f1f9"; -@fa-var-couch: "\f4b8"; -@fa-var-cpanel: "\f388"; -@fa-var-creative-commons: "\f25e"; -@fa-var-creative-commons-by: "\f4e7"; -@fa-var-creative-commons-nc: "\f4e8"; -@fa-var-creative-commons-nc-eu: "\f4e9"; -@fa-var-creative-commons-nc-jp: "\f4ea"; -@fa-var-creative-commons-nd: "\f4eb"; -@fa-var-creative-commons-pd: "\f4ec"; -@fa-var-creative-commons-pd-alt: "\f4ed"; -@fa-var-creative-commons-remix: "\f4ee"; -@fa-var-creative-commons-sa: "\f4ef"; -@fa-var-creative-commons-sampling: "\f4f0"; -@fa-var-creative-commons-sampling-plus: "\f4f1"; -@fa-var-creative-commons-share: "\f4f2"; -@fa-var-creative-commons-zero: "\f4f3"; -@fa-var-credit-card: "\f09d"; -@fa-var-critical-role: "\f6c9"; -@fa-var-crop: "\f125"; -@fa-var-crop-alt: "\f565"; -@fa-var-cross: "\f654"; -@fa-var-crosshairs: "\f05b"; -@fa-var-crow: "\f520"; -@fa-var-crown: "\f521"; -@fa-var-css3: "\f13c"; -@fa-var-css3-alt: "\f38b"; -@fa-var-cube: "\f1b2"; -@fa-var-cubes: "\f1b3"; -@fa-var-cut: "\f0c4"; -@fa-var-cuttlefish: "\f38c"; -@fa-var-d-and-d: "\f38d"; -@fa-var-d-and-d-beyond: "\f6ca"; -@fa-var-dashcube: "\f210"; -@fa-var-database: "\f1c0"; -@fa-var-deaf: "\f2a4"; -@fa-var-delicious: "\f1a5"; -@fa-var-democrat: "\f747"; -@fa-var-deploydog: "\f38e"; -@fa-var-deskpro: "\f38f"; -@fa-var-desktop: "\f108"; -@fa-var-dev: "\f6cc"; -@fa-var-deviantart: "\f1bd"; -@fa-var-dharmachakra: "\f655"; -@fa-var-dhl: "\f790"; -@fa-var-diagnoses: "\f470"; -@fa-var-diaspora: "\f791"; -@fa-var-dice: "\f522"; -@fa-var-dice-d20: "\f6cf"; -@fa-var-dice-d6: "\f6d1"; -@fa-var-dice-five: "\f523"; -@fa-var-dice-four: "\f524"; -@fa-var-dice-one: "\f525"; -@fa-var-dice-six: "\f526"; -@fa-var-dice-three: "\f527"; -@fa-var-dice-two: "\f528"; -@fa-var-digg: "\f1a6"; -@fa-var-digital-ocean: "\f391"; -@fa-var-digital-tachograph: "\f566"; -@fa-var-directions: "\f5eb"; -@fa-var-discord: "\f392"; -@fa-var-discourse: "\f393"; -@fa-var-divide: "\f529"; -@fa-var-dizzy: "\f567"; -@fa-var-dna: "\f471"; -@fa-var-dochub: "\f394"; -@fa-var-docker: "\f395"; -@fa-var-dog: "\f6d3"; -@fa-var-dollar-sign: "\f155"; -@fa-var-dolly: "\f472"; -@fa-var-dolly-flatbed: "\f474"; -@fa-var-donate: "\f4b9"; -@fa-var-door-closed: "\f52a"; -@fa-var-door-open: "\f52b"; -@fa-var-dot-circle: "\f192"; -@fa-var-dove: "\f4ba"; -@fa-var-download: "\f019"; -@fa-var-draft2digital: "\f396"; -@fa-var-drafting-compass: "\f568"; -@fa-var-dragon: "\f6d5"; -@fa-var-draw-polygon: "\f5ee"; -@fa-var-dribbble: "\f17d"; -@fa-var-dribbble-square: "\f397"; -@fa-var-dropbox: "\f16b"; -@fa-var-drum: "\f569"; -@fa-var-drum-steelpan: "\f56a"; -@fa-var-drumstick-bite: "\f6d7"; -@fa-var-drupal: "\f1a9"; -@fa-var-dumbbell: "\f44b"; -@fa-var-dumpster: "\f793"; -@fa-var-dumpster-fire: "\f794"; -@fa-var-dungeon: "\f6d9"; -@fa-var-dyalog: "\f399"; -@fa-var-earlybirds: "\f39a"; -@fa-var-ebay: "\f4f4"; -@fa-var-edge: "\f282"; -@fa-var-edit: "\f044"; -@fa-var-eject: "\f052"; -@fa-var-elementor: "\f430"; -@fa-var-ellipsis-h: "\f141"; -@fa-var-ellipsis-v: "\f142"; -@fa-var-ello: "\f5f1"; -@fa-var-ember: "\f423"; -@fa-var-empire: "\f1d1"; -@fa-var-envelope: "\f0e0"; -@fa-var-envelope-open: "\f2b6"; -@fa-var-envelope-open-text: "\f658"; -@fa-var-envelope-square: "\f199"; -@fa-var-envira: "\f299"; -@fa-var-equals: "\f52c"; -@fa-var-eraser: "\f12d"; -@fa-var-erlang: "\f39d"; -@fa-var-ethereum: "\f42e"; -@fa-var-ethernet: "\f796"; -@fa-var-etsy: "\f2d7"; -@fa-var-euro-sign: "\f153"; -@fa-var-exchange-alt: "\f362"; -@fa-var-exclamation: "\f12a"; -@fa-var-exclamation-circle: "\f06a"; -@fa-var-exclamation-triangle: "\f071"; -@fa-var-expand: "\f065"; -@fa-var-expand-arrows-alt: "\f31e"; -@fa-var-expeditedssl: "\f23e"; -@fa-var-external-link-alt: "\f35d"; -@fa-var-external-link-square-alt: "\f360"; -@fa-var-eye: "\f06e"; -@fa-var-eye-dropper: "\f1fb"; -@fa-var-eye-slash: "\f070"; -@fa-var-facebook: "\f09a"; -@fa-var-facebook-f: "\f39e"; -@fa-var-facebook-messenger: "\f39f"; -@fa-var-facebook-square: "\f082"; -@fa-var-fantasy-flight-games: "\f6dc"; -@fa-var-fast-backward: "\f049"; -@fa-var-fast-forward: "\f050"; -@fa-var-fax: "\f1ac"; -@fa-var-feather: "\f52d"; -@fa-var-feather-alt: "\f56b"; -@fa-var-fedex: "\f797"; -@fa-var-fedora: "\f798"; -@fa-var-female: "\f182"; -@fa-var-fighter-jet: "\f0fb"; -@fa-var-figma: "\f799"; -@fa-var-file: "\f15b"; -@fa-var-file-alt: "\f15c"; -@fa-var-file-archive: "\f1c6"; -@fa-var-file-audio: "\f1c7"; -@fa-var-file-code: "\f1c9"; -@fa-var-file-contract: "\f56c"; -@fa-var-file-csv: "\f6dd"; -@fa-var-file-download: "\f56d"; -@fa-var-file-excel: "\f1c3"; -@fa-var-file-export: "\f56e"; -@fa-var-file-image: "\f1c5"; -@fa-var-file-import: "\f56f"; -@fa-var-file-invoice: "\f570"; -@fa-var-file-invoice-dollar: "\f571"; -@fa-var-file-medical: "\f477"; -@fa-var-file-medical-alt: "\f478"; -@fa-var-file-pdf: "\f1c1"; -@fa-var-file-powerpoint: "\f1c4"; -@fa-var-file-prescription: "\f572"; -@fa-var-file-signature: "\f573"; -@fa-var-file-upload: "\f574"; -@fa-var-file-video: "\f1c8"; -@fa-var-file-word: "\f1c2"; -@fa-var-fill: "\f575"; -@fa-var-fill-drip: "\f576"; -@fa-var-film: "\f008"; -@fa-var-filter: "\f0b0"; -@fa-var-fingerprint: "\f577"; -@fa-var-fire: "\f06d"; -@fa-var-fire-alt: "\f7e4"; -@fa-var-fire-extinguisher: "\f134"; -@fa-var-firefox: "\f269"; -@fa-var-first-aid: "\f479"; -@fa-var-first-order: "\f2b0"; -@fa-var-first-order-alt: "\f50a"; -@fa-var-firstdraft: "\f3a1"; -@fa-var-fish: "\f578"; -@fa-var-fist-raised: "\f6de"; -@fa-var-flag: "\f024"; -@fa-var-flag-checkered: "\f11e"; -@fa-var-flag-usa: "\f74d"; -@fa-var-flask: "\f0c3"; -@fa-var-flickr: "\f16e"; -@fa-var-flipboard: "\f44d"; -@fa-var-flushed: "\f579"; -@fa-var-fly: "\f417"; -@fa-var-folder: "\f07b"; -@fa-var-folder-minus: "\f65d"; -@fa-var-folder-open: "\f07c"; -@fa-var-folder-plus: "\f65e"; -@fa-var-font: "\f031"; -@fa-var-font-awesome: "\f2b4"; -@fa-var-font-awesome-alt: "\f35c"; -@fa-var-font-awesome-flag: "\f425"; -@fa-var-font-awesome-logo-full: "\f4e6"; -@fa-var-fonticons: "\f280"; -@fa-var-fonticons-fi: "\f3a2"; -@fa-var-football-ball: "\f44e"; -@fa-var-fort-awesome: "\f286"; -@fa-var-fort-awesome-alt: "\f3a3"; -@fa-var-forumbee: "\f211"; -@fa-var-forward: "\f04e"; -@fa-var-foursquare: "\f180"; -@fa-var-free-code-camp: "\f2c5"; -@fa-var-freebsd: "\f3a4"; -@fa-var-frog: "\f52e"; -@fa-var-frown: "\f119"; -@fa-var-frown-open: "\f57a"; -@fa-var-fulcrum: "\f50b"; -@fa-var-funnel-dollar: "\f662"; -@fa-var-futbol: "\f1e3"; -@fa-var-galactic-republic: "\f50c"; -@fa-var-galactic-senate: "\f50d"; -@fa-var-gamepad: "\f11b"; -@fa-var-gas-pump: "\f52f"; -@fa-var-gavel: "\f0e3"; -@fa-var-gem: "\f3a5"; -@fa-var-genderless: "\f22d"; -@fa-var-get-pocket: "\f265"; -@fa-var-gg: "\f260"; -@fa-var-gg-circle: "\f261"; -@fa-var-ghost: "\f6e2"; -@fa-var-gift: "\f06b"; -@fa-var-gifts: "\f79c"; -@fa-var-git: "\f1d3"; -@fa-var-git-square: "\f1d2"; -@fa-var-github: "\f09b"; -@fa-var-github-alt: "\f113"; -@fa-var-github-square: "\f092"; -@fa-var-gitkraken: "\f3a6"; -@fa-var-gitlab: "\f296"; -@fa-var-gitter: "\f426"; -@fa-var-glass-cheers: "\f79f"; -@fa-var-glass-martini: "\f000"; -@fa-var-glass-martini-alt: "\f57b"; -@fa-var-glass-whiskey: "\f7a0"; -@fa-var-glasses: "\f530"; -@fa-var-glide: "\f2a5"; -@fa-var-glide-g: "\f2a6"; -@fa-var-globe: "\f0ac"; -@fa-var-globe-africa: "\f57c"; -@fa-var-globe-americas: "\f57d"; -@fa-var-globe-asia: "\f57e"; -@fa-var-globe-europe: "\f7a2"; -@fa-var-gofore: "\f3a7"; -@fa-var-golf-ball: "\f450"; -@fa-var-goodreads: "\f3a8"; -@fa-var-goodreads-g: "\f3a9"; -@fa-var-google: "\f1a0"; -@fa-var-google-drive: "\f3aa"; -@fa-var-google-play: "\f3ab"; -@fa-var-google-plus: "\f2b3"; -@fa-var-google-plus-g: "\f0d5"; -@fa-var-google-plus-square: "\f0d4"; -@fa-var-google-wallet: "\f1ee"; -@fa-var-gopuram: "\f664"; -@fa-var-graduation-cap: "\f19d"; -@fa-var-gratipay: "\f184"; -@fa-var-grav: "\f2d6"; -@fa-var-greater-than: "\f531"; -@fa-var-greater-than-equal: "\f532"; -@fa-var-grimace: "\f57f"; -@fa-var-grin: "\f580"; -@fa-var-grin-alt: "\f581"; -@fa-var-grin-beam: "\f582"; -@fa-var-grin-beam-sweat: "\f583"; -@fa-var-grin-hearts: "\f584"; -@fa-var-grin-squint: "\f585"; -@fa-var-grin-squint-tears: "\f586"; -@fa-var-grin-stars: "\f587"; -@fa-var-grin-tears: "\f588"; -@fa-var-grin-tongue: "\f589"; -@fa-var-grin-tongue-squint: "\f58a"; -@fa-var-grin-tongue-wink: "\f58b"; -@fa-var-grin-wink: "\f58c"; -@fa-var-grip-horizontal: "\f58d"; -@fa-var-grip-lines: "\f7a4"; -@fa-var-grip-lines-vertical: "\f7a5"; -@fa-var-grip-vertical: "\f58e"; -@fa-var-gripfire: "\f3ac"; -@fa-var-grunt: "\f3ad"; -@fa-var-guitar: "\f7a6"; -@fa-var-gulp: "\f3ae"; -@fa-var-h-square: "\f0fd"; -@fa-var-hacker-news: "\f1d4"; -@fa-var-hacker-news-square: "\f3af"; -@fa-var-hackerrank: "\f5f7"; -@fa-var-hammer: "\f6e3"; -@fa-var-hamsa: "\f665"; -@fa-var-hand-holding: "\f4bd"; -@fa-var-hand-holding-heart: "\f4be"; -@fa-var-hand-holding-usd: "\f4c0"; -@fa-var-hand-lizard: "\f258"; -@fa-var-hand-paper: "\f256"; -@fa-var-hand-peace: "\f25b"; -@fa-var-hand-point-down: "\f0a7"; -@fa-var-hand-point-left: "\f0a5"; -@fa-var-hand-point-right: "\f0a4"; -@fa-var-hand-point-up: "\f0a6"; -@fa-var-hand-pointer: "\f25a"; -@fa-var-hand-rock: "\f255"; -@fa-var-hand-scissors: "\f257"; -@fa-var-hand-spock: "\f259"; -@fa-var-hands: "\f4c2"; -@fa-var-hands-helping: "\f4c4"; -@fa-var-handshake: "\f2b5"; -@fa-var-hanukiah: "\f6e6"; -@fa-var-hashtag: "\f292"; -@fa-var-hat-wizard: "\f6e8"; -@fa-var-haykal: "\f666"; -@fa-var-hdd: "\f0a0"; -@fa-var-heading: "\f1dc"; -@fa-var-headphones: "\f025"; -@fa-var-headphones-alt: "\f58f"; -@fa-var-headset: "\f590"; -@fa-var-heart: "\f004"; -@fa-var-heart-broken: "\f7a9"; -@fa-var-heartbeat: "\f21e"; -@fa-var-helicopter: "\f533"; -@fa-var-highlighter: "\f591"; -@fa-var-hiking: "\f6ec"; -@fa-var-hippo: "\f6ed"; -@fa-var-hips: "\f452"; -@fa-var-hire-a-helper: "\f3b0"; -@fa-var-history: "\f1da"; -@fa-var-hockey-puck: "\f453"; -@fa-var-holly-berry: "\f7aa"; -@fa-var-home: "\f015"; -@fa-var-hooli: "\f427"; -@fa-var-hornbill: "\f592"; -@fa-var-horse: "\f6f0"; -@fa-var-horse-head: "\f7ab"; -@fa-var-hospital: "\f0f8"; -@fa-var-hospital-alt: "\f47d"; -@fa-var-hospital-symbol: "\f47e"; -@fa-var-hot-tub: "\f593"; -@fa-var-hotel: "\f594"; -@fa-var-hotjar: "\f3b1"; -@fa-var-hourglass: "\f254"; -@fa-var-hourglass-end: "\f253"; -@fa-var-hourglass-half: "\f252"; -@fa-var-hourglass-start: "\f251"; -@fa-var-house-damage: "\f6f1"; -@fa-var-houzz: "\f27c"; -@fa-var-hryvnia: "\f6f2"; -@fa-var-html5: "\f13b"; -@fa-var-hubspot: "\f3b2"; -@fa-var-i-cursor: "\f246"; -@fa-var-icicles: "\f7ad"; -@fa-var-id-badge: "\f2c1"; -@fa-var-id-card: "\f2c2"; -@fa-var-id-card-alt: "\f47f"; -@fa-var-igloo: "\f7ae"; -@fa-var-image: "\f03e"; -@fa-var-images: "\f302"; -@fa-var-imdb: "\f2d8"; -@fa-var-inbox: "\f01c"; -@fa-var-indent: "\f03c"; -@fa-var-industry: "\f275"; -@fa-var-infinity: "\f534"; -@fa-var-info: "\f129"; -@fa-var-info-circle: "\f05a"; -@fa-var-instagram: "\f16d"; -@fa-var-intercom: "\f7af"; -@fa-var-internet-explorer: "\f26b"; -@fa-var-invision: "\f7b0"; -@fa-var-ioxhost: "\f208"; -@fa-var-italic: "\f033"; -@fa-var-itunes: "\f3b4"; -@fa-var-itunes-note: "\f3b5"; -@fa-var-java: "\f4e4"; -@fa-var-jedi: "\f669"; -@fa-var-jedi-order: "\f50e"; -@fa-var-jenkins: "\f3b6"; -@fa-var-jira: "\f7b1"; -@fa-var-joget: "\f3b7"; -@fa-var-joint: "\f595"; -@fa-var-joomla: "\f1aa"; -@fa-var-journal-whills: "\f66a"; -@fa-var-js: "\f3b8"; -@fa-var-js-square: "\f3b9"; -@fa-var-jsfiddle: "\f1cc"; -@fa-var-kaaba: "\f66b"; -@fa-var-kaggle: "\f5fa"; -@fa-var-key: "\f084"; -@fa-var-keybase: "\f4f5"; -@fa-var-keyboard: "\f11c"; -@fa-var-keycdn: "\f3ba"; -@fa-var-khanda: "\f66d"; -@fa-var-kickstarter: "\f3bb"; -@fa-var-kickstarter-k: "\f3bc"; -@fa-var-kiss: "\f596"; -@fa-var-kiss-beam: "\f597"; -@fa-var-kiss-wink-heart: "\f598"; -@fa-var-kiwi-bird: "\f535"; -@fa-var-korvue: "\f42f"; -@fa-var-landmark: "\f66f"; -@fa-var-language: "\f1ab"; -@fa-var-laptop: "\f109"; -@fa-var-laptop-code: "\f5fc"; -@fa-var-laravel: "\f3bd"; -@fa-var-lastfm: "\f202"; -@fa-var-lastfm-square: "\f203"; -@fa-var-laugh: "\f599"; -@fa-var-laugh-beam: "\f59a"; -@fa-var-laugh-squint: "\f59b"; -@fa-var-laugh-wink: "\f59c"; -@fa-var-layer-group: "\f5fd"; -@fa-var-leaf: "\f06c"; -@fa-var-leanpub: "\f212"; -@fa-var-lemon: "\f094"; -@fa-var-less: "\f41d"; -@fa-var-less-than: "\f536"; -@fa-var-less-than-equal: "\f537"; -@fa-var-level-down-alt: "\f3be"; -@fa-var-level-up-alt: "\f3bf"; -@fa-var-life-ring: "\f1cd"; -@fa-var-lightbulb: "\f0eb"; -@fa-var-line: "\f3c0"; -@fa-var-link: "\f0c1"; -@fa-var-linkedin: "\f08c"; -@fa-var-linkedin-in: "\f0e1"; -@fa-var-linode: "\f2b8"; -@fa-var-linux: "\f17c"; -@fa-var-lira-sign: "\f195"; -@fa-var-list: "\f03a"; -@fa-var-list-alt: "\f022"; -@fa-var-list-ol: "\f0cb"; -@fa-var-list-ul: "\f0ca"; -@fa-var-location-arrow: "\f124"; -@fa-var-lock: "\f023"; -@fa-var-lock-open: "\f3c1"; -@fa-var-long-arrow-alt-down: "\f309"; -@fa-var-long-arrow-alt-left: "\f30a"; -@fa-var-long-arrow-alt-right: "\f30b"; -@fa-var-long-arrow-alt-up: "\f30c"; -@fa-var-low-vision: "\f2a8"; -@fa-var-luggage-cart: "\f59d"; -@fa-var-lyft: "\f3c3"; -@fa-var-magento: "\f3c4"; -@fa-var-magic: "\f0d0"; -@fa-var-magnet: "\f076"; -@fa-var-mail-bulk: "\f674"; -@fa-var-mailchimp: "\f59e"; -@fa-var-male: "\f183"; -@fa-var-mandalorian: "\f50f"; -@fa-var-map: "\f279"; -@fa-var-map-marked: "\f59f"; -@fa-var-map-marked-alt: "\f5a0"; -@fa-var-map-marker: "\f041"; -@fa-var-map-marker-alt: "\f3c5"; -@fa-var-map-pin: "\f276"; -@fa-var-map-signs: "\f277"; -@fa-var-markdown: "\f60f"; -@fa-var-marker: "\f5a1"; -@fa-var-mars: "\f222"; -@fa-var-mars-double: "\f227"; -@fa-var-mars-stroke: "\f229"; -@fa-var-mars-stroke-h: "\f22b"; -@fa-var-mars-stroke-v: "\f22a"; -@fa-var-mask: "\f6fa"; -@fa-var-mastodon: "\f4f6"; -@fa-var-maxcdn: "\f136"; -@fa-var-medal: "\f5a2"; -@fa-var-medapps: "\f3c6"; -@fa-var-medium: "\f23a"; -@fa-var-medium-m: "\f3c7"; -@fa-var-medkit: "\f0fa"; -@fa-var-medrt: "\f3c8"; -@fa-var-meetup: "\f2e0"; -@fa-var-megaport: "\f5a3"; -@fa-var-meh: "\f11a"; -@fa-var-meh-blank: "\f5a4"; -@fa-var-meh-rolling-eyes: "\f5a5"; -@fa-var-memory: "\f538"; -@fa-var-mendeley: "\f7b3"; -@fa-var-menorah: "\f676"; -@fa-var-mercury: "\f223"; -@fa-var-meteor: "\f753"; -@fa-var-microchip: "\f2db"; -@fa-var-microphone: "\f130"; -@fa-var-microphone-alt: "\f3c9"; -@fa-var-microphone-alt-slash: "\f539"; -@fa-var-microphone-slash: "\f131"; -@fa-var-microscope: "\f610"; -@fa-var-microsoft: "\f3ca"; -@fa-var-minus: "\f068"; -@fa-var-minus-circle: "\f056"; -@fa-var-minus-square: "\f146"; -@fa-var-mitten: "\f7b5"; -@fa-var-mix: "\f3cb"; -@fa-var-mixcloud: "\f289"; -@fa-var-mizuni: "\f3cc"; -@fa-var-mobile: "\f10b"; -@fa-var-mobile-alt: "\f3cd"; -@fa-var-modx: "\f285"; -@fa-var-monero: "\f3d0"; -@fa-var-money-bill: "\f0d6"; -@fa-var-money-bill-alt: "\f3d1"; -@fa-var-money-bill-wave: "\f53a"; -@fa-var-money-bill-wave-alt: "\f53b"; -@fa-var-money-check: "\f53c"; -@fa-var-money-check-alt: "\f53d"; -@fa-var-monument: "\f5a6"; -@fa-var-moon: "\f186"; -@fa-var-mortar-pestle: "\f5a7"; -@fa-var-mosque: "\f678"; -@fa-var-motorcycle: "\f21c"; -@fa-var-mountain: "\f6fc"; -@fa-var-mouse-pointer: "\f245"; -@fa-var-mug-hot: "\f7b6"; -@fa-var-music: "\f001"; -@fa-var-napster: "\f3d2"; -@fa-var-neos: "\f612"; -@fa-var-network-wired: "\f6ff"; -@fa-var-neuter: "\f22c"; -@fa-var-newspaper: "\f1ea"; -@fa-var-nimblr: "\f5a8"; -@fa-var-nintendo-switch: "\f418"; -@fa-var-node: "\f419"; -@fa-var-node-js: "\f3d3"; -@fa-var-not-equal: "\f53e"; -@fa-var-notes-medical: "\f481"; -@fa-var-npm: "\f3d4"; -@fa-var-ns8: "\f3d5"; -@fa-var-nutritionix: "\f3d6"; -@fa-var-object-group: "\f247"; -@fa-var-object-ungroup: "\f248"; -@fa-var-odnoklassniki: "\f263"; -@fa-var-odnoklassniki-square: "\f264"; -@fa-var-oil-can: "\f613"; -@fa-var-old-republic: "\f510"; -@fa-var-om: "\f679"; -@fa-var-opencart: "\f23d"; -@fa-var-openid: "\f19b"; -@fa-var-opera: "\f26a"; -@fa-var-optin-monster: "\f23c"; -@fa-var-osi: "\f41a"; -@fa-var-otter: "\f700"; -@fa-var-outdent: "\f03b"; -@fa-var-page4: "\f3d7"; -@fa-var-pagelines: "\f18c"; -@fa-var-paint-brush: "\f1fc"; -@fa-var-paint-roller: "\f5aa"; -@fa-var-palette: "\f53f"; -@fa-var-palfed: "\f3d8"; -@fa-var-pallet: "\f482"; -@fa-var-paper-plane: "\f1d8"; -@fa-var-paperclip: "\f0c6"; -@fa-var-parachute-box: "\f4cd"; -@fa-var-paragraph: "\f1dd"; -@fa-var-parking: "\f540"; -@fa-var-passport: "\f5ab"; -@fa-var-pastafarianism: "\f67b"; -@fa-var-paste: "\f0ea"; -@fa-var-patreon: "\f3d9"; -@fa-var-pause: "\f04c"; -@fa-var-pause-circle: "\f28b"; -@fa-var-paw: "\f1b0"; -@fa-var-paypal: "\f1ed"; -@fa-var-peace: "\f67c"; -@fa-var-pen: "\f304"; -@fa-var-pen-alt: "\f305"; -@fa-var-pen-fancy: "\f5ac"; -@fa-var-pen-nib: "\f5ad"; -@fa-var-pen-square: "\f14b"; -@fa-var-pencil-alt: "\f303"; -@fa-var-pencil-ruler: "\f5ae"; -@fa-var-penny-arcade: "\f704"; -@fa-var-people-carry: "\f4ce"; -@fa-var-percent: "\f295"; -@fa-var-percentage: "\f541"; -@fa-var-periscope: "\f3da"; -@fa-var-person-booth: "\f756"; -@fa-var-phabricator: "\f3db"; -@fa-var-phoenix-framework: "\f3dc"; -@fa-var-phoenix-squadron: "\f511"; -@fa-var-phone: "\f095"; -@fa-var-phone-slash: "\f3dd"; -@fa-var-phone-square: "\f098"; -@fa-var-phone-volume: "\f2a0"; -@fa-var-php: "\f457"; -@fa-var-pied-piper: "\f2ae"; -@fa-var-pied-piper-alt: "\f1a8"; -@fa-var-pied-piper-hat: "\f4e5"; -@fa-var-pied-piper-pp: "\f1a7"; -@fa-var-piggy-bank: "\f4d3"; -@fa-var-pills: "\f484"; -@fa-var-pinterest: "\f0d2"; -@fa-var-pinterest-p: "\f231"; -@fa-var-pinterest-square: "\f0d3"; -@fa-var-place-of-worship: "\f67f"; -@fa-var-plane: "\f072"; -@fa-var-plane-arrival: "\f5af"; -@fa-var-plane-departure: "\f5b0"; -@fa-var-play: "\f04b"; -@fa-var-play-circle: "\f144"; -@fa-var-playstation: "\f3df"; -@fa-var-plug: "\f1e6"; -@fa-var-plus: "\f067"; -@fa-var-plus-circle: "\f055"; -@fa-var-plus-square: "\f0fe"; -@fa-var-podcast: "\f2ce"; -@fa-var-poll: "\f681"; -@fa-var-poll-h: "\f682"; -@fa-var-poo: "\f2fe"; -@fa-var-poo-storm: "\f75a"; -@fa-var-poop: "\f619"; -@fa-var-portrait: "\f3e0"; -@fa-var-pound-sign: "\f154"; -@fa-var-power-off: "\f011"; -@fa-var-pray: "\f683"; -@fa-var-praying-hands: "\f684"; -@fa-var-prescription: "\f5b1"; -@fa-var-prescription-bottle: "\f485"; -@fa-var-prescription-bottle-alt: "\f486"; -@fa-var-print: "\f02f"; -@fa-var-procedures: "\f487"; -@fa-var-product-hunt: "\f288"; -@fa-var-project-diagram: "\f542"; -@fa-var-pushed: "\f3e1"; -@fa-var-puzzle-piece: "\f12e"; -@fa-var-python: "\f3e2"; -@fa-var-qq: "\f1d6"; -@fa-var-qrcode: "\f029"; -@fa-var-question: "\f128"; -@fa-var-question-circle: "\f059"; -@fa-var-quidditch: "\f458"; -@fa-var-quinscape: "\f459"; -@fa-var-quora: "\f2c4"; -@fa-var-quote-left: "\f10d"; -@fa-var-quote-right: "\f10e"; -@fa-var-quran: "\f687"; -@fa-var-r-project: "\f4f7"; -@fa-var-radiation: "\f7b9"; -@fa-var-radiation-alt: "\f7ba"; -@fa-var-rainbow: "\f75b"; -@fa-var-random: "\f074"; -@fa-var-raspberry-pi: "\f7bb"; -@fa-var-ravelry: "\f2d9"; -@fa-var-react: "\f41b"; -@fa-var-reacteurope: "\f75d"; -@fa-var-readme: "\f4d5"; -@fa-var-rebel: "\f1d0"; -@fa-var-receipt: "\f543"; -@fa-var-recycle: "\f1b8"; -@fa-var-red-river: "\f3e3"; -@fa-var-reddit: "\f1a1"; -@fa-var-reddit-alien: "\f281"; -@fa-var-reddit-square: "\f1a2"; -@fa-var-redhat: "\f7bc"; -@fa-var-redo: "\f01e"; -@fa-var-redo-alt: "\f2f9"; -@fa-var-registered: "\f25d"; -@fa-var-renren: "\f18b"; -@fa-var-reply: "\f3e5"; -@fa-var-reply-all: "\f122"; -@fa-var-replyd: "\f3e6"; -@fa-var-republican: "\f75e"; -@fa-var-researchgate: "\f4f8"; -@fa-var-resolving: "\f3e7"; -@fa-var-restroom: "\f7bd"; -@fa-var-retweet: "\f079"; -@fa-var-rev: "\f5b2"; -@fa-var-ribbon: "\f4d6"; -@fa-var-ring: "\f70b"; -@fa-var-road: "\f018"; -@fa-var-robot: "\f544"; -@fa-var-rocket: "\f135"; -@fa-var-rocketchat: "\f3e8"; -@fa-var-rockrms: "\f3e9"; -@fa-var-route: "\f4d7"; -@fa-var-rss: "\f09e"; -@fa-var-rss-square: "\f143"; -@fa-var-ruble-sign: "\f158"; -@fa-var-ruler: "\f545"; -@fa-var-ruler-combined: "\f546"; -@fa-var-ruler-horizontal: "\f547"; -@fa-var-ruler-vertical: "\f548"; -@fa-var-running: "\f70c"; -@fa-var-rupee-sign: "\f156"; -@fa-var-sad-cry: "\f5b3"; -@fa-var-sad-tear: "\f5b4"; -@fa-var-safari: "\f267"; -@fa-var-sass: "\f41e"; -@fa-var-satellite: "\f7bf"; -@fa-var-satellite-dish: "\f7c0"; -@fa-var-save: "\f0c7"; -@fa-var-schlix: "\f3ea"; -@fa-var-school: "\f549"; -@fa-var-screwdriver: "\f54a"; -@fa-var-scribd: "\f28a"; -@fa-var-scroll: "\f70e"; -@fa-var-sd-card: "\f7c2"; -@fa-var-search: "\f002"; -@fa-var-search-dollar: "\f688"; -@fa-var-search-location: "\f689"; -@fa-var-search-minus: "\f010"; -@fa-var-search-plus: "\f00e"; -@fa-var-searchengin: "\f3eb"; -@fa-var-seedling: "\f4d8"; -@fa-var-sellcast: "\f2da"; -@fa-var-sellsy: "\f213"; -@fa-var-server: "\f233"; -@fa-var-servicestack: "\f3ec"; -@fa-var-shapes: "\f61f"; -@fa-var-share: "\f064"; -@fa-var-share-alt: "\f1e0"; -@fa-var-share-alt-square: "\f1e1"; -@fa-var-share-square: "\f14d"; -@fa-var-shekel-sign: "\f20b"; -@fa-var-shield-alt: "\f3ed"; -@fa-var-ship: "\f21a"; -@fa-var-shipping-fast: "\f48b"; -@fa-var-shirtsinbulk: "\f214"; -@fa-var-shoe-prints: "\f54b"; -@fa-var-shopping-bag: "\f290"; -@fa-var-shopping-basket: "\f291"; -@fa-var-shopping-cart: "\f07a"; -@fa-var-shopware: "\f5b5"; -@fa-var-shower: "\f2cc"; -@fa-var-shuttle-van: "\f5b6"; -@fa-var-sign: "\f4d9"; -@fa-var-sign-in-alt: "\f2f6"; -@fa-var-sign-language: "\f2a7"; -@fa-var-sign-out-alt: "\f2f5"; -@fa-var-signal: "\f012"; -@fa-var-signature: "\f5b7"; -@fa-var-sim-card: "\f7c4"; -@fa-var-simplybuilt: "\f215"; -@fa-var-sistrix: "\f3ee"; -@fa-var-sitemap: "\f0e8"; -@fa-var-sith: "\f512"; -@fa-var-skating: "\f7c5"; -@fa-var-sketch: "\f7c6"; -@fa-var-skiing: "\f7c9"; -@fa-var-skiing-nordic: "\f7ca"; -@fa-var-skull: "\f54c"; -@fa-var-skull-crossbones: "\f714"; -@fa-var-skyatlas: "\f216"; -@fa-var-skype: "\f17e"; -@fa-var-slack: "\f198"; -@fa-var-slack-hash: "\f3ef"; -@fa-var-slash: "\f715"; -@fa-var-sleigh: "\f7cc"; -@fa-var-sliders-h: "\f1de"; -@fa-var-slideshare: "\f1e7"; -@fa-var-smile: "\f118"; -@fa-var-smile-beam: "\f5b8"; -@fa-var-smile-wink: "\f4da"; -@fa-var-smog: "\f75f"; -@fa-var-smoking: "\f48d"; -@fa-var-smoking-ban: "\f54d"; -@fa-var-sms: "\f7cd"; -@fa-var-snapchat: "\f2ab"; -@fa-var-snapchat-ghost: "\f2ac"; -@fa-var-snapchat-square: "\f2ad"; -@fa-var-snowboarding: "\f7ce"; -@fa-var-snowflake: "\f2dc"; -@fa-var-snowman: "\f7d0"; -@fa-var-snowplow: "\f7d2"; -@fa-var-socks: "\f696"; -@fa-var-solar-panel: "\f5ba"; -@fa-var-sort: "\f0dc"; -@fa-var-sort-alpha-down: "\f15d"; -@fa-var-sort-alpha-up: "\f15e"; -@fa-var-sort-amount-down: "\f160"; -@fa-var-sort-amount-up: "\f161"; -@fa-var-sort-down: "\f0dd"; -@fa-var-sort-numeric-down: "\f162"; -@fa-var-sort-numeric-up: "\f163"; -@fa-var-sort-up: "\f0de"; -@fa-var-soundcloud: "\f1be"; -@fa-var-sourcetree: "\f7d3"; -@fa-var-spa: "\f5bb"; -@fa-var-space-shuttle: "\f197"; -@fa-var-speakap: "\f3f3"; -@fa-var-spider: "\f717"; -@fa-var-spinner: "\f110"; -@fa-var-splotch: "\f5bc"; -@fa-var-spotify: "\f1bc"; -@fa-var-spray-can: "\f5bd"; -@fa-var-square: "\f0c8"; -@fa-var-square-full: "\f45c"; -@fa-var-square-root-alt: "\f698"; -@fa-var-squarespace: "\f5be"; -@fa-var-stack-exchange: "\f18d"; -@fa-var-stack-overflow: "\f16c"; -@fa-var-stamp: "\f5bf"; -@fa-var-star: "\f005"; -@fa-var-star-and-crescent: "\f699"; -@fa-var-star-half: "\f089"; -@fa-var-star-half-alt: "\f5c0"; -@fa-var-star-of-david: "\f69a"; -@fa-var-star-of-life: "\f621"; -@fa-var-staylinked: "\f3f5"; -@fa-var-steam: "\f1b6"; -@fa-var-steam-square: "\f1b7"; -@fa-var-steam-symbol: "\f3f6"; -@fa-var-step-backward: "\f048"; -@fa-var-step-forward: "\f051"; -@fa-var-stethoscope: "\f0f1"; -@fa-var-sticker-mule: "\f3f7"; -@fa-var-sticky-note: "\f249"; -@fa-var-stop: "\f04d"; -@fa-var-stop-circle: "\f28d"; -@fa-var-stopwatch: "\f2f2"; -@fa-var-store: "\f54e"; -@fa-var-store-alt: "\f54f"; -@fa-var-strava: "\f428"; -@fa-var-stream: "\f550"; -@fa-var-street-view: "\f21d"; -@fa-var-strikethrough: "\f0cc"; -@fa-var-stripe: "\f429"; -@fa-var-stripe-s: "\f42a"; -@fa-var-stroopwafel: "\f551"; -@fa-var-studiovinari: "\f3f8"; -@fa-var-stumbleupon: "\f1a4"; -@fa-var-stumbleupon-circle: "\f1a3"; -@fa-var-subscript: "\f12c"; -@fa-var-subway: "\f239"; -@fa-var-suitcase: "\f0f2"; -@fa-var-suitcase-rolling: "\f5c1"; -@fa-var-sun: "\f185"; -@fa-var-superpowers: "\f2dd"; -@fa-var-superscript: "\f12b"; -@fa-var-supple: "\f3f9"; -@fa-var-surprise: "\f5c2"; -@fa-var-suse: "\f7d6"; -@fa-var-swatchbook: "\f5c3"; -@fa-var-swimmer: "\f5c4"; -@fa-var-swimming-pool: "\f5c5"; -@fa-var-synagogue: "\f69b"; -@fa-var-sync: "\f021"; -@fa-var-sync-alt: "\f2f1"; -@fa-var-syringe: "\f48e"; -@fa-var-table: "\f0ce"; -@fa-var-table-tennis: "\f45d"; -@fa-var-tablet: "\f10a"; -@fa-var-tablet-alt: "\f3fa"; -@fa-var-tablets: "\f490"; -@fa-var-tachometer-alt: "\f3fd"; -@fa-var-tag: "\f02b"; -@fa-var-tags: "\f02c"; -@fa-var-tape: "\f4db"; -@fa-var-tasks: "\f0ae"; -@fa-var-taxi: "\f1ba"; -@fa-var-teamspeak: "\f4f9"; -@fa-var-teeth: "\f62e"; -@fa-var-teeth-open: "\f62f"; -@fa-var-telegram: "\f2c6"; -@fa-var-telegram-plane: "\f3fe"; -@fa-var-temperature-high: "\f769"; -@fa-var-temperature-low: "\f76b"; -@fa-var-tencent-weibo: "\f1d5"; -@fa-var-tenge: "\f7d7"; -@fa-var-terminal: "\f120"; -@fa-var-text-height: "\f034"; -@fa-var-text-width: "\f035"; -@fa-var-th: "\f00a"; -@fa-var-th-large: "\f009"; -@fa-var-th-list: "\f00b"; -@fa-var-the-red-yeti: "\f69d"; -@fa-var-theater-masks: "\f630"; -@fa-var-themeco: "\f5c6"; -@fa-var-themeisle: "\f2b2"; -@fa-var-thermometer: "\f491"; -@fa-var-thermometer-empty: "\f2cb"; -@fa-var-thermometer-full: "\f2c7"; -@fa-var-thermometer-half: "\f2c9"; -@fa-var-thermometer-quarter: "\f2ca"; -@fa-var-thermometer-three-quarters: "\f2c8"; -@fa-var-think-peaks: "\f731"; -@fa-var-thumbs-down: "\f165"; -@fa-var-thumbs-up: "\f164"; -@fa-var-thumbtack: "\f08d"; -@fa-var-ticket-alt: "\f3ff"; -@fa-var-times: "\f00d"; -@fa-var-times-circle: "\f057"; -@fa-var-tint: "\f043"; -@fa-var-tint-slash: "\f5c7"; -@fa-var-tired: "\f5c8"; -@fa-var-toggle-off: "\f204"; -@fa-var-toggle-on: "\f205"; -@fa-var-toilet: "\f7d8"; -@fa-var-toilet-paper: "\f71e"; -@fa-var-toolbox: "\f552"; -@fa-var-tools: "\f7d9"; -@fa-var-tooth: "\f5c9"; -@fa-var-torah: "\f6a0"; -@fa-var-torii-gate: "\f6a1"; -@fa-var-tractor: "\f722"; -@fa-var-trade-federation: "\f513"; -@fa-var-trademark: "\f25c"; -@fa-var-traffic-light: "\f637"; -@fa-var-train: "\f238"; -@fa-var-tram: "\f7da"; -@fa-var-transgender: "\f224"; -@fa-var-transgender-alt: "\f225"; -@fa-var-trash: "\f1f8"; -@fa-var-trash-alt: "\f2ed"; -@fa-var-tree: "\f1bb"; -@fa-var-trello: "\f181"; -@fa-var-tripadvisor: "\f262"; -@fa-var-trophy: "\f091"; -@fa-var-truck: "\f0d1"; -@fa-var-truck-loading: "\f4de"; -@fa-var-truck-monster: "\f63b"; -@fa-var-truck-moving: "\f4df"; -@fa-var-truck-pickup: "\f63c"; -@fa-var-tshirt: "\f553"; -@fa-var-tty: "\f1e4"; -@fa-var-tumblr: "\f173"; -@fa-var-tumblr-square: "\f174"; -@fa-var-tv: "\f26c"; -@fa-var-twitch: "\f1e8"; -@fa-var-twitter: "\f099"; -@fa-var-twitter-square: "\f081"; -@fa-var-typo3: "\f42b"; -@fa-var-uber: "\f402"; -@fa-var-ubuntu: "\f7df"; -@fa-var-uikit: "\f403"; -@fa-var-umbrella: "\f0e9"; -@fa-var-umbrella-beach: "\f5ca"; -@fa-var-underline: "\f0cd"; -@fa-var-undo: "\f0e2"; -@fa-var-undo-alt: "\f2ea"; -@fa-var-uniregistry: "\f404"; -@fa-var-universal-access: "\f29a"; -@fa-var-university: "\f19c"; -@fa-var-unlink: "\f127"; -@fa-var-unlock: "\f09c"; -@fa-var-unlock-alt: "\f13e"; -@fa-var-untappd: "\f405"; -@fa-var-upload: "\f093"; -@fa-var-ups: "\f7e0"; -@fa-var-usb: "\f287"; -@fa-var-user: "\f007"; -@fa-var-user-alt: "\f406"; -@fa-var-user-alt-slash: "\f4fa"; -@fa-var-user-astronaut: "\f4fb"; -@fa-var-user-check: "\f4fc"; -@fa-var-user-circle: "\f2bd"; -@fa-var-user-clock: "\f4fd"; -@fa-var-user-cog: "\f4fe"; -@fa-var-user-edit: "\f4ff"; -@fa-var-user-friends: "\f500"; -@fa-var-user-graduate: "\f501"; -@fa-var-user-injured: "\f728"; -@fa-var-user-lock: "\f502"; -@fa-var-user-md: "\f0f0"; -@fa-var-user-minus: "\f503"; -@fa-var-user-ninja: "\f504"; -@fa-var-user-plus: "\f234"; -@fa-var-user-secret: "\f21b"; -@fa-var-user-shield: "\f505"; -@fa-var-user-slash: "\f506"; -@fa-var-user-tag: "\f507"; -@fa-var-user-tie: "\f508"; -@fa-var-user-times: "\f235"; -@fa-var-users: "\f0c0"; -@fa-var-users-cog: "\f509"; -@fa-var-usps: "\f7e1"; -@fa-var-ussunnah: "\f407"; -@fa-var-utensil-spoon: "\f2e5"; -@fa-var-utensils: "\f2e7"; -@fa-var-vaadin: "\f408"; -@fa-var-vector-square: "\f5cb"; -@fa-var-venus: "\f221"; -@fa-var-venus-double: "\f226"; -@fa-var-venus-mars: "\f228"; -@fa-var-viacoin: "\f237"; -@fa-var-viadeo: "\f2a9"; -@fa-var-viadeo-square: "\f2aa"; -@fa-var-vial: "\f492"; -@fa-var-vials: "\f493"; -@fa-var-viber: "\f409"; -@fa-var-video: "\f03d"; -@fa-var-video-slash: "\f4e2"; -@fa-var-vihara: "\f6a7"; -@fa-var-vimeo: "\f40a"; -@fa-var-vimeo-square: "\f194"; -@fa-var-vimeo-v: "\f27d"; -@fa-var-vine: "\f1ca"; -@fa-var-vk: "\f189"; -@fa-var-vnv: "\f40b"; -@fa-var-volleyball-ball: "\f45f"; -@fa-var-volume-down: "\f027"; -@fa-var-volume-mute: "\f6a9"; -@fa-var-volume-off: "\f026"; -@fa-var-volume-up: "\f028"; -@fa-var-vote-yea: "\f772"; -@fa-var-vr-cardboard: "\f729"; -@fa-var-vuejs: "\f41f"; -@fa-var-walking: "\f554"; -@fa-var-wallet: "\f555"; -@fa-var-warehouse: "\f494"; -@fa-var-water: "\f773"; -@fa-var-weebly: "\f5cc"; -@fa-var-weibo: "\f18a"; -@fa-var-weight: "\f496"; -@fa-var-weight-hanging: "\f5cd"; -@fa-var-weixin: "\f1d7"; -@fa-var-whatsapp: "\f232"; -@fa-var-whatsapp-square: "\f40c"; -@fa-var-wheelchair: "\f193"; -@fa-var-whmcs: "\f40d"; -@fa-var-wifi: "\f1eb"; -@fa-var-wikipedia-w: "\f266"; -@fa-var-wind: "\f72e"; -@fa-var-window-close: "\f410"; -@fa-var-window-maximize: "\f2d0"; -@fa-var-window-minimize: "\f2d1"; -@fa-var-window-restore: "\f2d2"; -@fa-var-windows: "\f17a"; -@fa-var-wine-bottle: "\f72f"; -@fa-var-wine-glass: "\f4e3"; -@fa-var-wine-glass-alt: "\f5ce"; -@fa-var-wix: "\f5cf"; -@fa-var-wizards-of-the-coast: "\f730"; -@fa-var-wolf-pack-battalion: "\f514"; -@fa-var-won-sign: "\f159"; -@fa-var-wordpress: "\f19a"; -@fa-var-wordpress-simple: "\f411"; -@fa-var-wpbeginner: "\f297"; -@fa-var-wpexplorer: "\f2de"; -@fa-var-wpforms: "\f298"; -@fa-var-wpressr: "\f3e4"; -@fa-var-wrench: "\f0ad"; -@fa-var-x-ray: "\f497"; -@fa-var-xbox: "\f412"; -@fa-var-xing: "\f168"; -@fa-var-xing-square: "\f169"; -@fa-var-y-combinator: "\f23b"; -@fa-var-yahoo: "\f19e"; -@fa-var-yandex: "\f413"; -@fa-var-yandex-international: "\f414"; -@fa-var-yarn: "\f7e3"; -@fa-var-yelp: "\f1e9"; -@fa-var-yen-sign: "\f157"; -@fa-var-yin-yang: "\f6ad"; -@fa-var-yoast: "\f2b1"; -@fa-var-youtube: "\f167"; -@fa-var-youtube-square: "\f431"; -@fa-var-zhihu: "\f63f"; diff --git a/application/client/src/app/ui/styles/fontawesome/less/brands.less b/application/client/src/app/ui/styles/fontawesome/less/brands.less deleted file mode 100644 index 758d5e1897..0000000000 --- a/application/client/src/app/ui/styles/fontawesome/less/brands.less +++ /dev/null @@ -1,17 +0,0 @@ -@import "_variables.less"; - -@font-face { - font-family: 'Font Awesome 5 Brands'; - font-style: normal; - font-weight: normal; - src: url('@{fa-font-path}/fa-brands-400.eot'); - src: url('@{fa-font-path}/fa-brands-400.eot?#iefix') format('embedded-opentype'), - url('@{fa-font-path}/fa-brands-400.woff2') format('woff2'), - url('@{fa-font-path}/fa-brands-400.woff') format('woff'), - url('@{fa-font-path}/fa-brands-400.ttf') format('truetype'), - url('@{fa-font-path}/fa-brands-400.svg#fontawesome') format('svg'); -} - -.fab { - font-family: 'Font Awesome 5 Brands'; -} diff --git a/application/client/src/app/ui/styles/fontawesome/less/fontawesome.less b/application/client/src/app/ui/styles/fontawesome/less/fontawesome.less deleted file mode 100644 index 38e03027bf..0000000000 --- a/application/client/src/app/ui/styles/fontawesome/less/fontawesome.less +++ /dev/null @@ -1,12 +0,0 @@ -@import "_variables.less"; -@import "_mixins.less"; -@import "_core.less"; -@import "_larger.less"; -@import "_fixed-width.less"; -@import "_list.less"; -@import "_bordered-pulled.less"; -@import "_animated.less"; -@import "_rotated-flipped.less"; -@import "_stacked.less"; -@import "_icons.less"; -@import "_screen-reader.less"; diff --git a/application/client/src/app/ui/styles/fontawesome/less/regular.less b/application/client/src/app/ui/styles/fontawesome/less/regular.less deleted file mode 100644 index 00141c450a..0000000000 --- a/application/client/src/app/ui/styles/fontawesome/less/regular.less +++ /dev/null @@ -1,18 +0,0 @@ -@import "_variables.less"; - -@font-face { - font-family: 'Font Awesome 5 Free'; - font-style: normal; - font-weight: 400; - src: url('@{fa-font-path}/fa-regular-400.eot'); - src: url('@{fa-font-path}/fa-regular-400.eot?#iefix') format('embedded-opentype'), - url('@{fa-font-path}/fa-regular-400.woff2') format('woff2'), - url('@{fa-font-path}/fa-regular-400.woff') format('woff'), - url('@{fa-font-path}/fa-regular-400.ttf') format('truetype'), - url('@{fa-font-path}/fa-regular-400.svg#fontawesome') format('svg'); -} - -.far { - font-family: 'Font Awesome 5 Free'!important; - font-weight: 400; -} diff --git a/application/client/src/app/ui/styles/fontawesome/less/solid.less b/application/client/src/app/ui/styles/fontawesome/less/solid.less deleted file mode 100644 index 7795cf12e3..0000000000 --- a/application/client/src/app/ui/styles/fontawesome/less/solid.less +++ /dev/null @@ -1,19 +0,0 @@ -@import "_variables.less"; - -@font-face { - font-family: 'Font Awesome 5 Free'; - font-style: normal; - font-weight: 900; - src: url('@{fa-font-path}/fa-solid-900.eot'); - src: url('@{fa-font-path}/fa-solid-900.eot?#iefix') format('embedded-opentype'), - url('@{fa-font-path}/fa-solid-900.woff2') format('woff2'), - url('@{fa-font-path}/fa-solid-900.woff') format('woff'), - url('@{fa-font-path}/fa-solid-900.ttf') format('truetype'), - url('@{fa-font-path}/fa-solid-900.svg#fontawesome') format('svg'); -} - -.fa, -.fas { - font-family: 'Font Awesome 5 Free'!important; - font-weight: 900!important; -} diff --git a/application/client/src/app/ui/styles/fontawesome/less/v4-shims.less b/application/client/src/app/ui/styles/fontawesome/less/v4-shims.less deleted file mode 100644 index b97276929f..0000000000 --- a/application/client/src/app/ui/styles/fontawesome/less/v4-shims.less +++ /dev/null @@ -1,2 +0,0 @@ -@import '_variables.less'; -@import '_shims.less'; diff --git a/application/client/src/app/ui/styles/fontawesome/webfonts/fa-brands-400.eot b/application/client/src/app/ui/styles/fontawesome/webfonts/fa-brands-400.eot deleted file mode 100644 index 46aeb5f83e..0000000000 Binary files a/application/client/src/app/ui/styles/fontawesome/webfonts/fa-brands-400.eot and /dev/null differ diff --git a/application/client/src/app/ui/styles/fontawesome/webfonts/fa-brands-400.svg b/application/client/src/app/ui/styles/fontawesome/webfonts/fa-brands-400.svg deleted file mode 100644 index 0469118e89..0000000000 --- a/application/client/src/app/ui/styles/fontawesome/webfonts/fa-brands-400.svg +++ /dev/null @@ -1,1260 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/application/client/src/app/ui/styles/fontawesome/webfonts/fa-brands-400.ttf b/application/client/src/app/ui/styles/fontawesome/webfonts/fa-brands-400.ttf deleted file mode 100644 index 0a30775001..0000000000 Binary files a/application/client/src/app/ui/styles/fontawesome/webfonts/fa-brands-400.ttf and /dev/null differ diff --git a/application/client/src/app/ui/styles/fontawesome/webfonts/fa-brands-400.woff b/application/client/src/app/ui/styles/fontawesome/webfonts/fa-brands-400.woff deleted file mode 100644 index bdab4ca861..0000000000 Binary files a/application/client/src/app/ui/styles/fontawesome/webfonts/fa-brands-400.woff and /dev/null differ diff --git a/application/client/src/app/ui/styles/fontawesome/webfonts/fa-brands-400.woff2 b/application/client/src/app/ui/styles/fontawesome/webfonts/fa-brands-400.woff2 deleted file mode 100644 index 0def871ab5..0000000000 Binary files a/application/client/src/app/ui/styles/fontawesome/webfonts/fa-brands-400.woff2 and /dev/null differ diff --git a/application/client/src/app/ui/styles/fontawesome/webfonts/fa-regular-400.eot b/application/client/src/app/ui/styles/fontawesome/webfonts/fa-regular-400.eot deleted file mode 100644 index 836e082a78..0000000000 Binary files a/application/client/src/app/ui/styles/fontawesome/webfonts/fa-regular-400.eot and /dev/null differ diff --git a/application/client/src/app/ui/styles/fontawesome/webfonts/fa-regular-400.svg b/application/client/src/app/ui/styles/fontawesome/webfonts/fa-regular-400.svg deleted file mode 100644 index 81576d25d8..0000000000 --- a/application/client/src/app/ui/styles/fontawesome/webfonts/fa-regular-400.svg +++ /dev/null @@ -1,471 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/application/client/src/app/ui/styles/fontawesome/webfonts/fa-regular-400.ttf b/application/client/src/app/ui/styles/fontawesome/webfonts/fa-regular-400.ttf deleted file mode 100644 index b5414de98f..0000000000 Binary files a/application/client/src/app/ui/styles/fontawesome/webfonts/fa-regular-400.ttf and /dev/null differ diff --git a/application/client/src/app/ui/styles/fontawesome/webfonts/fa-regular-400.woff b/application/client/src/app/ui/styles/fontawesome/webfonts/fa-regular-400.woff deleted file mode 100644 index 56acb37d5d..0000000000 Binary files a/application/client/src/app/ui/styles/fontawesome/webfonts/fa-regular-400.woff and /dev/null differ diff --git a/application/client/src/app/ui/styles/fontawesome/webfonts/fa-regular-400.woff2 b/application/client/src/app/ui/styles/fontawesome/webfonts/fa-regular-400.woff2 deleted file mode 100644 index 4c5168fd99..0000000000 Binary files a/application/client/src/app/ui/styles/fontawesome/webfonts/fa-regular-400.woff2 and /dev/null differ diff --git a/application/client/src/app/ui/styles/fontawesome/webfonts/fa-solid-900.eot b/application/client/src/app/ui/styles/fontawesome/webfonts/fa-solid-900.eot deleted file mode 100644 index 18c554f4eb..0000000000 Binary files a/application/client/src/app/ui/styles/fontawesome/webfonts/fa-solid-900.eot and /dev/null differ diff --git a/application/client/src/app/ui/styles/fontawesome/webfonts/fa-solid-900.svg b/application/client/src/app/ui/styles/fontawesome/webfonts/fa-solid-900.svg deleted file mode 100644 index 7316c44f38..0000000000 --- a/application/client/src/app/ui/styles/fontawesome/webfonts/fa-solid-900.svg +++ /dev/null @@ -1,2763 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/application/client/src/app/ui/styles/fontawesome/webfonts/fa-solid-900.ttf b/application/client/src/app/ui/styles/fontawesome/webfonts/fa-solid-900.ttf deleted file mode 100644 index 53c8f366b1..0000000000 Binary files a/application/client/src/app/ui/styles/fontawesome/webfonts/fa-solid-900.ttf and /dev/null differ diff --git a/application/client/src/app/ui/styles/fontawesome/webfonts/fa-solid-900.woff b/application/client/src/app/ui/styles/fontawesome/webfonts/fa-solid-900.woff deleted file mode 100644 index 4484e5263c..0000000000 Binary files a/application/client/src/app/ui/styles/fontawesome/webfonts/fa-solid-900.woff and /dev/null differ diff --git a/application/client/src/app/ui/styles/fontawesome/webfonts/fa-solid-900.woff2 b/application/client/src/app/ui/styles/fontawesome/webfonts/fa-solid-900.woff2 deleted file mode 100644 index f0b9b0cd32..0000000000 Binary files a/application/client/src/app/ui/styles/fontawesome/webfonts/fa-solid-900.woff2 and /dev/null differ diff --git a/application/client/src/app/ui/styles/fonts.less b/application/client/src/app/ui/styles/fonts.less deleted file mode 100644 index 41fa7fb8b8..0000000000 --- a/application/client/src/app/ui/styles/fonts.less +++ /dev/null @@ -1,102 +0,0 @@ -@font-face { - font-family: 'primary'; - src: url('./fonts/SourceSansPro-SemiBold.woff2') format('woff2'), - url('./fonts/SourceSansPro-SemiBold.woff') format('woff'); - font-weight: 600; - font-style: normal; -} - -@font-face { - font-family: 'primary'; - src: url('./fonts/SourceSansPro-Light.woff2') format('woff2'), - url('./fonts/SourceSansPro-Light.woff') format('woff'); - font-weight: 300; - font-style: normal; -} - -@font-face { - font-family: 'primary'; - src: url('./fonts/SourceSansPro-BlackItalic.woff2') format('woff2'), - url('./fonts/SourceSansPro-BlackItalic.woff') format('woff'); - font-weight: 900; - font-style: italic; -} - -@font-face { - font-family: 'primary'; - src: url('./fonts/SourceSansPro-BoldItalic.woff2') format('woff2'), - url('./fonts/SourceSansPro-BoldItalic.woff') format('woff'); - font-weight: bold; - font-style: italic; -} - -@font-face { - font-family: 'primary'; - src: url('./fonts/SourceSansPro-SemiBoldItalic.woff2') format('woff2'), - url('./fonts/SourceSansPro-SemiBoldItalic.woff') format('woff'); - font-weight: 600; - font-style: italic; -} - -@font-face { - font-family: 'primary'; - src: url('./fonts/SourceSansPro-LightItalic.woff2') format('woff2'), - url('./fonts/SourceSansPro-LightItalic.woff') format('woff'); - font-weight: 300; - font-style: italic; -} - -@font-face { - font-family: 'primary'; - src: url('./fonts/SourceSansPro-ExtraLight.woff2') format('woff2'), - url('./fonts/SourceSansPro-ExtraLight.woff') format('woff'); - font-weight: 200; - font-style: normal; -} - -@font-face { - font-family: 'primary'; - src: url('./fonts/SourceSansPro-Bold.woff2') format('woff2'), - url('./fonts/SourceSansPro-Bold.woff') format('woff'); - font-weight: bold; - font-style: normal; -} - -@font-face { - font-family: 'primary'; - src: url('./fonts/SourceSansPro-Regular.woff2') format('woff2'), - url('./fonts/SourceSansPro-Regular.woff') format('woff'); - font-weight: normal; - font-style: normal; -} - -@font-face { - font-family: 'primary'; - src: url('./fonts/SourceSansPro-ExtraLightItalic.woff2') format('woff2'), - url('./fonts/SourceSansPro-ExtraLightItalic.woff') format('woff'); - font-weight: 200; - font-style: italic; -} - -@font-face { - font-family: 'primary'; - src: url('./fonts/SourceSansPro-Black.woff2') format('woff2'), - url('./fonts/SourceSansPro-Black.woff') format('woff'); - font-weight: 900; - font-style: normal; -} - -@font-face { - font-family: 'primary'; - src: url('./fonts/SourceSansPro-Italic.woff2') format('woff2'), - url('./fonts/SourceSansPro-Italic.woff') format('woff'); - font-weight: normal; - font-style: italic; -} - -@font-face { - font-family: 'console'; - font-style: normal; - font-weight: normal; - src: url('./fonts/Menlo-Regular-Logviewer.woff2') format('woff2'); -} diff --git a/application/client/src/app/ui/styles/fonts/Menlo-Regular-Logviewer.woff2 b/application/client/src/app/ui/styles/fonts/Menlo-Regular-Logviewer.woff2 deleted file mode 100644 index 9d58ba1e72..0000000000 Binary files a/application/client/src/app/ui/styles/fonts/Menlo-Regular-Logviewer.woff2 and /dev/null differ diff --git a/application/client/src/app/ui/styles/fonts/SourceSansPro-Black.woff b/application/client/src/app/ui/styles/fonts/SourceSansPro-Black.woff deleted file mode 100644 index 68cc29dba1..0000000000 Binary files a/application/client/src/app/ui/styles/fonts/SourceSansPro-Black.woff and /dev/null differ diff --git a/application/client/src/app/ui/styles/fonts/SourceSansPro-Black.woff2 b/application/client/src/app/ui/styles/fonts/SourceSansPro-Black.woff2 deleted file mode 100644 index c36d5827a3..0000000000 Binary files a/application/client/src/app/ui/styles/fonts/SourceSansPro-Black.woff2 and /dev/null differ diff --git a/application/client/src/app/ui/styles/fonts/SourceSansPro-BlackItalic.woff b/application/client/src/app/ui/styles/fonts/SourceSansPro-BlackItalic.woff deleted file mode 100644 index e529f83494..0000000000 Binary files a/application/client/src/app/ui/styles/fonts/SourceSansPro-BlackItalic.woff and /dev/null differ diff --git a/application/client/src/app/ui/styles/fonts/SourceSansPro-BlackItalic.woff2 b/application/client/src/app/ui/styles/fonts/SourceSansPro-BlackItalic.woff2 deleted file mode 100644 index 50570d4b60..0000000000 Binary files a/application/client/src/app/ui/styles/fonts/SourceSansPro-BlackItalic.woff2 and /dev/null differ diff --git a/application/client/src/app/ui/styles/fonts/SourceSansPro-Bold.woff b/application/client/src/app/ui/styles/fonts/SourceSansPro-Bold.woff deleted file mode 100644 index 53f6922109..0000000000 Binary files a/application/client/src/app/ui/styles/fonts/SourceSansPro-Bold.woff and /dev/null differ diff --git a/application/client/src/app/ui/styles/fonts/SourceSansPro-Bold.woff2 b/application/client/src/app/ui/styles/fonts/SourceSansPro-Bold.woff2 deleted file mode 100644 index 629967a158..0000000000 Binary files a/application/client/src/app/ui/styles/fonts/SourceSansPro-Bold.woff2 and /dev/null differ diff --git a/application/client/src/app/ui/styles/fonts/SourceSansPro-BoldItalic.woff b/application/client/src/app/ui/styles/fonts/SourceSansPro-BoldItalic.woff deleted file mode 100644 index 872ff6fdc6..0000000000 Binary files a/application/client/src/app/ui/styles/fonts/SourceSansPro-BoldItalic.woff and /dev/null differ diff --git a/application/client/src/app/ui/styles/fonts/SourceSansPro-BoldItalic.woff2 b/application/client/src/app/ui/styles/fonts/SourceSansPro-BoldItalic.woff2 deleted file mode 100644 index 44bd9f6447..0000000000 Binary files a/application/client/src/app/ui/styles/fonts/SourceSansPro-BoldItalic.woff2 and /dev/null differ diff --git a/application/client/src/app/ui/styles/fonts/SourceSansPro-ExtraLight.woff b/application/client/src/app/ui/styles/fonts/SourceSansPro-ExtraLight.woff deleted file mode 100644 index 5f28ecdff2..0000000000 Binary files a/application/client/src/app/ui/styles/fonts/SourceSansPro-ExtraLight.woff and /dev/null differ diff --git a/application/client/src/app/ui/styles/fonts/SourceSansPro-ExtraLight.woff2 b/application/client/src/app/ui/styles/fonts/SourceSansPro-ExtraLight.woff2 deleted file mode 100644 index d6efa5ca0e..0000000000 Binary files a/application/client/src/app/ui/styles/fonts/SourceSansPro-ExtraLight.woff2 and /dev/null differ diff --git a/application/client/src/app/ui/styles/fonts/SourceSansPro-ExtraLightItalic.woff b/application/client/src/app/ui/styles/fonts/SourceSansPro-ExtraLightItalic.woff deleted file mode 100644 index aeea9b0193..0000000000 Binary files a/application/client/src/app/ui/styles/fonts/SourceSansPro-ExtraLightItalic.woff and /dev/null differ diff --git a/application/client/src/app/ui/styles/fonts/SourceSansPro-ExtraLightItalic.woff2 b/application/client/src/app/ui/styles/fonts/SourceSansPro-ExtraLightItalic.woff2 deleted file mode 100644 index b55f286b6d..0000000000 Binary files a/application/client/src/app/ui/styles/fonts/SourceSansPro-ExtraLightItalic.woff2 and /dev/null differ diff --git a/application/client/src/app/ui/styles/fonts/SourceSansPro-Italic.woff b/application/client/src/app/ui/styles/fonts/SourceSansPro-Italic.woff deleted file mode 100644 index 49cd74c06e..0000000000 Binary files a/application/client/src/app/ui/styles/fonts/SourceSansPro-Italic.woff and /dev/null differ diff --git a/application/client/src/app/ui/styles/fonts/SourceSansPro-Italic.woff2 b/application/client/src/app/ui/styles/fonts/SourceSansPro-Italic.woff2 deleted file mode 100644 index b28b0010c5..0000000000 Binary files a/application/client/src/app/ui/styles/fonts/SourceSansPro-Italic.woff2 and /dev/null differ diff --git a/application/client/src/app/ui/styles/fonts/SourceSansPro-Light.woff b/application/client/src/app/ui/styles/fonts/SourceSansPro-Light.woff deleted file mode 100644 index e7df0df1da..0000000000 Binary files a/application/client/src/app/ui/styles/fonts/SourceSansPro-Light.woff and /dev/null differ diff --git a/application/client/src/app/ui/styles/fonts/SourceSansPro-Light.woff2 b/application/client/src/app/ui/styles/fonts/SourceSansPro-Light.woff2 deleted file mode 100644 index 346e99cf8c..0000000000 Binary files a/application/client/src/app/ui/styles/fonts/SourceSansPro-Light.woff2 and /dev/null differ diff --git a/application/client/src/app/ui/styles/fonts/SourceSansPro-LightItalic.woff b/application/client/src/app/ui/styles/fonts/SourceSansPro-LightItalic.woff deleted file mode 100644 index 7490d93c50..0000000000 Binary files a/application/client/src/app/ui/styles/fonts/SourceSansPro-LightItalic.woff and /dev/null differ diff --git a/application/client/src/app/ui/styles/fonts/SourceSansPro-LightItalic.woff2 b/application/client/src/app/ui/styles/fonts/SourceSansPro-LightItalic.woff2 deleted file mode 100644 index 9b1954adb8..0000000000 Binary files a/application/client/src/app/ui/styles/fonts/SourceSansPro-LightItalic.woff2 and /dev/null differ diff --git a/application/client/src/app/ui/styles/fonts/SourceSansPro-Regular.woff b/application/client/src/app/ui/styles/fonts/SourceSansPro-Regular.woff deleted file mode 100644 index 1df06b5168..0000000000 Binary files a/application/client/src/app/ui/styles/fonts/SourceSansPro-Regular.woff and /dev/null differ diff --git a/application/client/src/app/ui/styles/fonts/SourceSansPro-Regular.woff2 b/application/client/src/app/ui/styles/fonts/SourceSansPro-Regular.woff2 deleted file mode 100644 index 2545196a50..0000000000 Binary files a/application/client/src/app/ui/styles/fonts/SourceSansPro-Regular.woff2 and /dev/null differ diff --git a/application/client/src/app/ui/styles/fonts/SourceSansPro-SemiBold.woff b/application/client/src/app/ui/styles/fonts/SourceSansPro-SemiBold.woff deleted file mode 100644 index e7d16bd5ae..0000000000 Binary files a/application/client/src/app/ui/styles/fonts/SourceSansPro-SemiBold.woff and /dev/null differ diff --git a/application/client/src/app/ui/styles/fonts/SourceSansPro-SemiBold.woff2 b/application/client/src/app/ui/styles/fonts/SourceSansPro-SemiBold.woff2 deleted file mode 100644 index 0d90128790..0000000000 Binary files a/application/client/src/app/ui/styles/fonts/SourceSansPro-SemiBold.woff2 and /dev/null differ diff --git a/application/client/src/app/ui/styles/fonts/SourceSansPro-SemiBoldItalic.woff b/application/client/src/app/ui/styles/fonts/SourceSansPro-SemiBoldItalic.woff deleted file mode 100644 index 166665345c..0000000000 Binary files a/application/client/src/app/ui/styles/fonts/SourceSansPro-SemiBoldItalic.woff and /dev/null differ diff --git a/application/client/src/app/ui/styles/fonts/SourceSansPro-SemiBoldItalic.woff2 b/application/client/src/app/ui/styles/fonts/SourceSansPro-SemiBoldItalic.woff2 deleted file mode 100644 index c398a220b9..0000000000 Binary files a/application/client/src/app/ui/styles/fonts/SourceSansPro-SemiBoldItalic.woff2 and /dev/null differ diff --git a/application/client/src/app/ui/styles/fonts/materialicons.woff2 b/application/client/src/app/ui/styles/fonts/materialicons.woff2 deleted file mode 100644 index 34cdd2afba..0000000000 Binary files a/application/client/src/app/ui/styles/fonts/materialicons.woff2 and /dev/null differ diff --git a/application/client/src/app/ui/styles/fonts/roboto_light_cyrillic.woff2 b/application/client/src/app/ui/styles/fonts/roboto_light_cyrillic.woff2 deleted file mode 100644 index 377218a465..0000000000 Binary files a/application/client/src/app/ui/styles/fonts/roboto_light_cyrillic.woff2 and /dev/null differ diff --git a/application/client/src/app/ui/styles/fonts/roboto_light_cyrillic_ext.woff2 b/application/client/src/app/ui/styles/fonts/roboto_light_cyrillic_ext.woff2 deleted file mode 100644 index 73c8c5aaca..0000000000 Binary files a/application/client/src/app/ui/styles/fonts/roboto_light_cyrillic_ext.woff2 and /dev/null differ diff --git a/application/client/src/app/ui/styles/fonts/roboto_light_greek.woff2 b/application/client/src/app/ui/styles/fonts/roboto_light_greek.woff2 deleted file mode 100644 index d6115b61d7..0000000000 Binary files a/application/client/src/app/ui/styles/fonts/roboto_light_greek.woff2 and /dev/null differ diff --git a/application/client/src/app/ui/styles/fonts/roboto_light_greek_ext.woff2 b/application/client/src/app/ui/styles/fonts/roboto_light_greek_ext.woff2 deleted file mode 100644 index ea768a1804..0000000000 Binary files a/application/client/src/app/ui/styles/fonts/roboto_light_greek_ext.woff2 and /dev/null differ diff --git a/application/client/src/app/ui/styles/fonts/roboto_light_latin.woff2 b/application/client/src/app/ui/styles/fonts/roboto_light_latin.woff2 deleted file mode 100644 index dc034ba45e..0000000000 Binary files a/application/client/src/app/ui/styles/fonts/roboto_light_latin.woff2 and /dev/null differ diff --git a/application/client/src/app/ui/styles/fonts/roboto_light_latin_ext.woff2 b/application/client/src/app/ui/styles/fonts/roboto_light_latin_ext.woff2 deleted file mode 100644 index 3fb5f272b2..0000000000 Binary files a/application/client/src/app/ui/styles/fonts/roboto_light_latin_ext.woff2 and /dev/null differ diff --git a/application/client/src/app/ui/styles/fonts/roboto_light_vietnamese.woff2 b/application/client/src/app/ui/styles/fonts/roboto_light_vietnamese.woff2 deleted file mode 100644 index b13f49e5b4..0000000000 Binary files a/application/client/src/app/ui/styles/fonts/roboto_light_vietnamese.woff2 and /dev/null differ diff --git a/application/client/src/app/ui/styles/fonts/roboto_medium_cyrillic.woff2 b/application/client/src/app/ui/styles/fonts/roboto_medium_cyrillic.woff2 deleted file mode 100644 index 972c566b28..0000000000 Binary files a/application/client/src/app/ui/styles/fonts/roboto_medium_cyrillic.woff2 and /dev/null differ diff --git a/application/client/src/app/ui/styles/fonts/roboto_medium_cyrillic_ext.woff2 b/application/client/src/app/ui/styles/fonts/roboto_medium_cyrillic_ext.woff2 deleted file mode 100644 index 30843410d3..0000000000 Binary files a/application/client/src/app/ui/styles/fonts/roboto_medium_cyrillic_ext.woff2 and /dev/null differ diff --git a/application/client/src/app/ui/styles/fonts/roboto_medium_greek.woff2 b/application/client/src/app/ui/styles/fonts/roboto_medium_greek.woff2 deleted file mode 100644 index bafbf7b892..0000000000 Binary files a/application/client/src/app/ui/styles/fonts/roboto_medium_greek.woff2 and /dev/null differ diff --git a/application/client/src/app/ui/styles/fonts/roboto_medium_greek_ext.woff2 b/application/client/src/app/ui/styles/fonts/roboto_medium_greek_ext.woff2 deleted file mode 100644 index 7aae2e9bcd..0000000000 Binary files a/application/client/src/app/ui/styles/fonts/roboto_medium_greek_ext.woff2 and /dev/null differ diff --git a/application/client/src/app/ui/styles/fonts/roboto_medium_latin.woff2 b/application/client/src/app/ui/styles/fonts/roboto_medium_latin.woff2 deleted file mode 100644 index 5ab8a6561a..0000000000 Binary files a/application/client/src/app/ui/styles/fonts/roboto_medium_latin.woff2 and /dev/null differ diff --git a/application/client/src/app/ui/styles/fonts/roboto_medium_latin_ext.woff2 b/application/client/src/app/ui/styles/fonts/roboto_medium_latin_ext.woff2 deleted file mode 100644 index 7a7b8b2740..0000000000 Binary files a/application/client/src/app/ui/styles/fonts/roboto_medium_latin_ext.woff2 and /dev/null differ diff --git a/application/client/src/app/ui/styles/fonts/roboto_medium_vietnamese.woff2 b/application/client/src/app/ui/styles/fonts/roboto_medium_vietnamese.woff2 deleted file mode 100644 index a39b80a39b..0000000000 Binary files a/application/client/src/app/ui/styles/fonts/roboto_medium_vietnamese.woff2 and /dev/null differ diff --git a/application/client/src/app/ui/styles/fonts/roboto_regular_cyrillic.woff2 b/application/client/src/app/ui/styles/fonts/roboto_regular_cyrillic.woff2 deleted file mode 100644 index 814b9474cb..0000000000 Binary files a/application/client/src/app/ui/styles/fonts/roboto_regular_cyrillic.woff2 and /dev/null differ diff --git a/application/client/src/app/ui/styles/fonts/roboto_regular_cyrillic_ext.woff2 b/application/client/src/app/ui/styles/fonts/roboto_regular_cyrillic_ext.woff2 deleted file mode 100644 index 10cd611dd2..0000000000 Binary files a/application/client/src/app/ui/styles/fonts/roboto_regular_cyrillic_ext.woff2 and /dev/null differ diff --git a/application/client/src/app/ui/styles/fonts/roboto_regular_greek.woff2 b/application/client/src/app/ui/styles/fonts/roboto_regular_greek.woff2 deleted file mode 100644 index 23cb3ad445..0000000000 Binary files a/application/client/src/app/ui/styles/fonts/roboto_regular_greek.woff2 and /dev/null differ diff --git a/application/client/src/app/ui/styles/fonts/roboto_regular_greek_ext.woff2 b/application/client/src/app/ui/styles/fonts/roboto_regular_greek_ext.woff2 deleted file mode 100644 index e17542dc1e..0000000000 Binary files a/application/client/src/app/ui/styles/fonts/roboto_regular_greek_ext.woff2 and /dev/null differ diff --git a/application/client/src/app/ui/styles/fonts/roboto_regular_latin.woff2 b/application/client/src/app/ui/styles/fonts/roboto_regular_latin.woff2 deleted file mode 100644 index 4fc449afdb..0000000000 Binary files a/application/client/src/app/ui/styles/fonts/roboto_regular_latin.woff2 and /dev/null differ diff --git a/application/client/src/app/ui/styles/fonts/roboto_regular_latin_ext.woff2 b/application/client/src/app/ui/styles/fonts/roboto_regular_latin_ext.woff2 deleted file mode 100644 index 9b257dcbd4..0000000000 Binary files a/application/client/src/app/ui/styles/fonts/roboto_regular_latin_ext.woff2 and /dev/null differ diff --git a/application/client/src/app/ui/styles/fonts/roboto_regular_vietnamese.woff2 b/application/client/src/app/ui/styles/fonts/roboto_regular_vietnamese.woff2 deleted file mode 100644 index 4a61f86975..0000000000 Binary files a/application/client/src/app/ui/styles/fonts/roboto_regular_vietnamese.woff2 and /dev/null differ diff --git a/application/client/src/app/ui/styles/global.less b/application/client/src/app/ui/styles/global.less deleted file mode 100644 index 4b22371704..0000000000 --- a/application/client/src/app/ui/styles/global.less +++ /dev/null @@ -1,8 +0,0 @@ -html, -body { - height: 100%; -} -body { - margin: 0; - font-family: Roboto, 'Helvetica Neue', sans-serif; -} diff --git a/application/client/src/app/ui/styles/markdown.less b/application/client/src/app/ui/styles/markdown.less deleted file mode 100644 index cf6fce7292..0000000000 --- a/application/client/src/app/ui/styles/markdown.less +++ /dev/null @@ -1,45 +0,0 @@ -@import './variables.less'; - -& div.markdown { - & * { - font-size: 15px; - color: var(--scheme-color-2); - } - & h1 { - font-size: 18px; - color: var(--scheme-color-0); - padding: 16px 0 8px 0; - } - & h2 { - font-size: 16px; - color: var(--scheme-color-0); - padding: 16px 0 8px 0; - } - & h3 { - font-size: 16px; - color: var(--scheme-color-1); - padding: 8px 0 4px 0; - } - & ul { - padding: 8px 18px; - } - & img { - position: relative; - display: block; - max-width: 100%; - margin: 16px 0; - } - & p, - & li { - & code { - font-family: 'console'; - border: dotted thin var(--scheme-color-1); - padding: 3px 6px; - border-radius: 3px; - background: var(--scheme-color-4); - font-size: 12px; - color: var(--scheme-color-1); - white-space: nowrap; - } - } -} \ No newline at end of file diff --git a/application/client/src/app/ui/styles/material.fonts.scss b/application/client/src/app/ui/styles/material.fonts.scss deleted file mode 100644 index e1c0d546fa..0000000000 --- a/application/client/src/app/ui/styles/material.fonts.scss +++ /dev/null @@ -1,213 +0,0 @@ -/* fallback */ -@font-face { - font-family: 'Material Icons'; - font-style: normal; - font-weight: 400; - src: url('./fonts/materialicons.woff2') format('woff2'); -} - -.material-icons { - font-family: 'Material Icons'; - font-weight: normal; - font-style: normal; - font-size: 24px; - line-height: 1; - letter-spacing: normal; - text-transform: none; - display: inline-block; - white-space: nowrap; - word-wrap: normal; - direction: ltr; - -webkit-font-feature-settings: 'liga'; - -webkit-font-smoothing: antialiased; -} - -/* cyrillic-ext */ -@font-face { - font-family: 'Roboto'; - font-style: normal; - font-weight: 300; - font-display: swap; - src: local('Roboto Light'), local('Roboto-Light'), url('./fonts/roboto_light_cyrillic_ext.woff2') format('woff2'); - unicode-range: U+0460-052F, U+1C80-1C88, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; -} -/* cyrillic */ -@font-face { - font-family: 'Roboto'; - font-style: normal; - font-weight: 300; - font-display: swap; - src: local('Roboto Light'), local('Roboto-Light'), url('./fonts/roboto_light_cyrillic.woff2') format('woff2'); - unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; -} -/* greek-ext */ -@font-face { - font-family: 'Roboto'; - font-style: normal; - font-weight: 300; - font-display: swap; - src: local('Roboto Light'), local('Roboto-Light'), url('./fonts/roboto_light_greek_ext.woff2') format('woff2'); - unicode-range: U+1F00-1FFF; -} -/* greek */ -@font-face { - font-family: 'Roboto'; - font-style: normal; - font-weight: 300; - font-display: swap; - src: local('Roboto Light'), local('Roboto-Light'), url('./fonts/roboto_light_greek.woff2') format('woff2'); - unicode-range: U+0370-03FF; -} -/* vietnamese */ -@font-face { - font-family: 'Roboto'; - font-style: normal; - font-weight: 300; - font-display: swap; - src: local('Roboto Light'), local('Roboto-Light'), url('./fonts/roboto_light_vietnamese.woff2') format('woff2'); - unicode-range: U+0102-0103, U+0110-0111, U+1EA0-1EF9, U+20AB; -} -/* latin-ext */ -@font-face { - font-family: 'Roboto'; - font-style: normal; - font-weight: 300; - font-display: swap; - src: local('Roboto Light'), local('Roboto-Light'), url('./fonts/roboto_light_latin_ext.woff2') format('woff2'); - unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF; -} -/* latin */ -@font-face { - font-family: 'Roboto'; - font-style: normal; - font-weight: 300; - font-display: swap; - src: local('Roboto Light'), local('Roboto-Light'), url('./fonts/roboto_light_latin.woff2') format('woff2'); - unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; -} -/* cyrillic-ext */ -@font-face { - font-family: 'Roboto'; - font-style: normal; - font-weight: 400; - font-display: swap; - src: local('Roboto'), local('Roboto-Regular'), url('./fonts/roboto_regular_cyrillic_ext.woff2') format('woff2'); - unicode-range: U+0460-052F, U+1C80-1C88, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; -} -/* cyrillic */ -@font-face { - font-family: 'Roboto'; - font-style: normal; - font-weight: 400; - font-display: swap; - src: local('Roboto'), local('Roboto-Regular'), url('./fonts/roboto_regular_cyrillic.woff2') format('woff2'); - unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; -} -/* greek-ext */ -@font-face { - font-family: 'Roboto'; - font-style: normal; - font-weight: 400; - font-display: swap; - src: local('Roboto'), local('Roboto-Regular'), url('./fonts/roboto_regular_greek_ext.woff2') format('woff2'); - unicode-range: U+1F00-1FFF; -} -/* greek */ -@font-face { - font-family: 'Roboto'; - font-style: normal; - font-weight: 400; - font-display: swap; - src: local('Roboto'), local('Roboto-Regular'), url('./fonts/roboto_regular_greek.woff2') format('woff2'); - unicode-range: U+0370-03FF; -} -/* vietnamese */ -@font-face { - font-family: 'Roboto'; - font-style: normal; - font-weight: 400; - font-display: swap; - src: local('Roboto'), local('Roboto-Regular'), url('./fonts/roboto_regular_vietnamese.woff2') format('woff2'); - unicode-range: U+0102-0103, U+0110-0111, U+1EA0-1EF9, U+20AB; -} -/* latin-ext */ -@font-face { - font-family: 'Roboto'; - font-style: normal; - font-weight: 400; - font-display: swap; - src: local('Roboto'), local('Roboto-Regular'), url('./fonts/roboto_regular_latin_ext.woff2') format('woff2'); - unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF; -} -/* latin */ -@font-face { - font-family: 'Roboto'; - font-style: normal; - font-weight: 400; - font-display: swap; - src: local('Roboto'), local('Roboto-Regular'), url('./fonts/roboto_regular_latin.woff2') format('woff2'); - unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; -} -/* cyrillic-ext */ -@font-face { - font-family: 'Roboto'; - font-style: normal; - font-weight: 500; - font-display: swap; - src: local('Roboto Medium'), local('Roboto-Medium'), url('./fonts/roboto_medium_cyrillic_ext.woff2') format('woff2'); - unicode-range: U+0460-052F, U+1C80-1C88, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; -} -/* cyrillic */ -@font-face { - font-family: 'Roboto'; - font-style: normal; - font-weight: 500; - font-display: swap; - src: local('Roboto Medium'), local('Roboto-Medium'), url('./fonts/roboto_medium_cyrillic.woff2') format('woff2'); - unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; -} -/* greek-ext */ -@font-face { - font-family: 'Roboto'; - font-style: normal; - font-weight: 500; - font-display: swap; - src: local('Roboto Medium'), local('Roboto-Medium'), url('./fonts/roboto_medium_greek_ext.woff2') format('woff2'); - unicode-range: U+1F00-1FFF; -} -/* greek */ -@font-face { - font-family: 'Roboto'; - font-style: normal; - font-weight: 500; - font-display: swap; - src: local('Roboto Medium'), local('Roboto-Medium'), url('./fonts/roboto_medium_greek.woff2') format('woff2'); - unicode-range: U+0370-03FF; -} -/* vietnamese */ -@font-face { - font-family: 'Roboto'; - font-style: normal; - font-weight: 500; - font-display: swap; - src: local('Roboto Medium'), local('Roboto-Medium'), url('./fonts/roboto_medium_vietnamese.woff2') format('woff2'); - unicode-range: U+0102-0103, U+0110-0111, U+1EA0-1EF9, U+20AB; -} -/* latin-ext */ -@font-face { - font-family: 'Roboto'; - font-style: normal; - font-weight: 500; - font-display: swap; - src: local('Roboto Medium'), local('Roboto-Medium'), url('./fonts/roboto_medium_latin_ext.woff2') format('woff2'); - unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF; -} -/* latin */ -@font-face { - font-family: 'Roboto'; - font-style: normal; - font-weight: 500; - font-display: swap; - src: local('Roboto Medium'), local('Roboto-Medium'), url('./fonts/roboto_medium_latin.woff2') format('woff2'); - unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; -} \ No newline at end of file diff --git a/application/client/src/app/ui/styles/material.less b/application/client/src/app/ui/styles/material.less deleted file mode 100644 index 47fb5a0a24..0000000000 --- a/application/client/src/app/ui/styles/material.less +++ /dev/null @@ -1,485 +0,0 @@ -@import './variables.less'; - -mat-form-field.material-mofication-normal { - &.stretch { - display: flex; - flex: auto; - } - &.black { - & div.mat-mdc-text-field-wrapper { - background: var(--scheme-color-5); - } - } - &.row { - margin-right: 12px; - &:last-child { - margin-right: 0; - } - } - &.stretch { - width: 100%; - } - & div.mat-mdc-form-field-focus-overlay { - display: none; - } - &.textarea { - & div.mat-mdc-form-field-infix { - padding-top: 16px!important; - padding-bottom: 0px!important; - & label { - font-size: 14px; - font-weight: 400; - top: 24px!important; - color: var(--scheme-color-2)!important; - } - } - } - &:not(.textarea) { - & div.mat-mdc-form-field-infix { - height: 42px; - min-height: 42px; - padding-top: 16px!important; - padding-bottom: 0px!important; - & label { - font-size: 14px; - font-weight: 400; - top: 24px!important; - color: var(--scheme-color-2)!important; - } - } - } - & div.mat-mdc-text-field-wrapper { - border-radius: 0; - } - & mat-select { - font-size: 14px; - } - & .mdc-text-field--invalid:not(.mdc-text-field--disabled) { - & .mdc-line-ripple::before, - & .mdc-line-ripple::after { - border-color: var(--scheme-color-warning)!important; - } - } -} - -button[mat-stroked-button][disabled] { - background: var(--scheme-color-3-15); - border-color: var(--scheme-color-3-15); - cursor: default; - & * { - color: var(--scheme-color-3); - } - & .mat-mdc-button-persistent-ripple, - & .mat-mdc-focus-indicator, - & .mat-mdc-button-touch-target, - & .mat-mdc-button-ripple { - display: none; - } - &:hover { - background: var(--scheme-color-3-15); - border-color: var(--scheme-color-3-15); - & * { - color: var(--scheme-color-3); - } - } -} -button[mat-stroked-button] { - & .mdc-button__label { - white-space: nowrap; - display: flex; - flex-direction: row; - align-items: center; - & mat-spinner { - margin-right: 16px; - } - } -} - -& mat-error { - color: var(--scheme-color-warning)!important; - line-height: 12px; - & * { - color: var(--scheme-color-warning)!important; - font-weight: 400; - } -} - -div.mat-mdc-select-panel[role="listbox"] { - & mat-option { - font-size: 13px; - min-height: 32px; - & span[class^="mdc-list-item"] { - font-size: 13px; - white-space: nowrap; - overflow: hidden; - text-overflow: ellipsis; - } - } -} - -mat-form-field.mat-mdc-form-field-type-mat-input.material-mofication-outline { - display: flex; - flex: auto; - height: 24px; - & div.mat-mdc-text-field-wrapper { - height: 24px; - & div.mat-mdc-form-field-flex { - height: 24px; - & div.mdc-notched-outline { - & * { - border: thin solid var(--scheme-color-3); - border-radius: 0; - } - & div.mdc-notched-outline__leading { - border-right: none; - } - & div.mdc-notched-outline__trailing { - border-left: none; - } - } - } - & div.mat-mdc-form-field-infix { - padding: 0; - font-size: 13px; - display: flex; - height: 24px; - min-height: 24px; - align-items: center; - } - &:hover { - & div.mat-mdc-form-field-flex { - & div.mdc-notched-outline { - & * { - border-color: var(--scheme-color-active)!important; - } - } - } - } - } - &.mat-focused { - & div.mat-mdc-text-field-wrapper { - & div.mat-mdc-form-field-flex { - & div.mdc-notched-outline { - & * { - border-color: var(--scheme-color-accent)!important; - } - } - } - } - } - &[error="true"] { - & div.mat-mdc-text-field-wrapper { - & div.mat-mdc-form-field-flex { - & div.mdc-notched-outline { - & * { - border-color: var(--scheme-color-warning)!important; - } - } - } - } - } - &[passiveborder="true"] { - & div.mat-mdc-text-field-wrapper { - & div.mat-mdc-form-field-flex { - & div.mat-mdc-form-field-infix { - & *:first-child { - transition: margin 150ms; - margin-left: -16px; - } - } - & div.mdc-notched-outline { - & * { - border-color: var(--scheme-color-5-00); - } - } - } - &:hover { - & div.mat-mdc-form-field-flex { - & div.mdc-notched-outline { - & * { - border-color: var(--scheme-color-5-00)!important; - } - } - } - } - } - &.mat-focused { - & div.mat-mdc-text-field-wrapper { - & div.mat-mdc-form-field-flex { - & div.mat-mdc-form-field-infix { - & *:first-child { - margin-left: 0; - } - } - & div.mdc-notched-outline { - & * { - border-color: var(--scheme-color-accent)!important; - } - } - } - } - &:hover { - & div.mat-mdc-form-field-flex { - & div.mdc-notched-outline { - & * { - border-color: var(--scheme-color-accent)!important; - } - } - } - } - } - } -} - -*.input-outside-border { - & mat-form-field.mat-mdc-form-field-type-mat-input.material-mofication-outline { - & div.mat-mdc-text-field-wrapper { - & div.mat-mdc-form-field-flex { - & div.mdc-notched-outline { - & * { - border: none!important; - } - } - } - - &:hover { - & div.mat-mdc-form-field-flex { - & div.mdc-notched-outline { - & * { - border: none!important; - } - } - } - } - } - &.mat-focused { - & div.mat-mdc-text-field-wrapper { - & div.mat-mdc-form-field-flex { - & div.mdc-notched-outline { - & * { - border: none!important; - } - } - } - } - } - } -} - -*.input-outside-border:has(mat-form-field) { - border: thin solid var(--scheme-color-3); - transition: border-color 50ms; - &:hover { - border-color: var(--scheme-color-active); - } -} - -*.input-outside-border:has(.mat-focused) { - border-color: var(--scheme-color-accent); - &:hover { - border-color: var(--scheme-color-accent); - } -} - -& div.mat-mdc-autocomplete-panel { - & mat-option { - height: 24px; - min-height: 24px; - & span[class^="mdc-list-item"] { - font-size: 14px; - width: 100%; - & span { - color: var(--scheme-color-2); - white-space: nowrap; - & span { - font-weight: 700; - color: var(--scheme-color-0); - } - } - } - & div.option-wrapper{ - display: flex; - flex: auto; - flex-direction: row; - align-items: center; - & span.caption { - flex: auto; - font-size: 14px; - color: var(--scheme-color-2); - white-space: nowrap; - & span { - font-weight: 700; - color: var(--scheme-color-0); - } - } - & mat-icon { - font-size: 16px; - height: 16px; - width: 16px; - margin: 0; - color: var(--scheme-color-2); - &:hover { - color: var(--scheme-color-0); - } - } - } - } -} - -& mat-checkbox.material-mofication-mini { - padding: 0; - margin: 0; - height: 24px; - width: 24px; - min-width: 24px; - top: 0; - left: 0; - overflow: hidden; - & div.mdc-form-field { - padding: 0; - margin: 0; - height: 24px; - width: 24px; - & div.mdc-checkbox { - padding: 0; - margin: 0; - height: 24px; - width: 24px; - top: 0; - left: 0; - & div.mdc-checkbox__background { - left: 4px; - top: 4px; - height: 16px; - width: 16px; - } - & div.mdc-checkbox__ripple { - display: none; - } - } - } -} -& mat-checkbox.material-mofication-outline { - & div.mdc-form-field { - & div.mdc-checkbox { - padding-right: 4px; - margin-right: 0; - & div.mdc-checkbox__background { - background: none!important; - width: 16px; - height: 16px; - } - & div.mdc-checkbox__ripple { - display: none; - } - } - } -} -mat-card { - margin: 6px; - & mat-card-title { - padding: 8px 16px; - color: var(--scheme-color-1); - font-size: 15px!important; - letter-spacing: normal!important; - } - &.small-title { - & mat-card-title { - padding: 4px 9px; - font-size: 13px!important; - } - } - & mat-card-subtitle { - padding: 0 16px 8px 16px; - color: var(--scheme-color-3); - font-size: 13px!important; - letter-spacing: normal!important; - } - & mat-card-content { - padding: 0 16px; - & * { - color: var(--scheme-color-1); - } - } - &.no-left-margin { - margin-left: 6px; - } - &.controlls { - & mat-card-content { - text-align: right; - & div.controlls { - text-align: right; - } - } - } - &.sticky { - padding-top: 0; - } - &.fill { - overflow: auto; - height: 100%; - } -} -.mat-mdc-menu-content { - & .mat-icon { - height: 24px; - width: 24px; - font-size: 18px; - line-height: 24px; - overflow: hidden; - } - -} -button.small { - padding: 0; - font-size: 12px; - height: 24px!important; - color: var(--scheme-color-1)!important; - display: inline-block; - margin: 0px 6px; -} -button[mat-menu-item] { - min-height: 32px; - *[class^="mdc-list-item"] { - width: 100%; - font-size: 14px!important; - } -} -button[mat-icon-button].material-mofication-mini { - width: 24px; - height: 24px; - overflow: hidden; - padding: 0; - display: flex; - align-items: center; - justify-content: center; - & mat-icon { - height: 18px; - width: 18px; - font-size: 18px; - overflow: hidden; - } -} -table[mat-table] { - & .mat-mdc-row { - height: 24px; - } -} -p.material-menu-label { - font-size: 13px; - padding: 0 16px; - color: var(--scheme-color-3); -} - -mat-snack-bar-container { - & .mdc-snackbar__surface { - background-color: var(--scheme-color-4)!important; - } - & * { - color: var(--scheme-color-1); - } -} - -* { - letter-spacing: normal; -} diff --git a/application/client/src/app/ui/styles/meterial.theme.scss b/application/client/src/app/ui/styles/meterial.theme.scss deleted file mode 100644 index b09ac80c77..0000000000 --- a/application/client/src/app/ui/styles/meterial.theme.scss +++ /dev/null @@ -1,38 +0,0 @@ -@use '@angular/material' as mat; - -@include mat.core(); - -// Dark Theme -$dark-primary: mat.m2-define-palette(mat.$m2-gray-palette, 500); -$dark-accent: mat.m2-define-palette(mat.$m2-gray-palette, A200, A100, A400); - -$dark-theme: mat.m2-define-dark-theme(( - color: ( - primary: $dark-primary, - accent: $dark-accent, - ), - typography: mat.m2-define-typography-config(), - density: 0, -)); - -.dark-theme { - @include mat.all-component-themes($dark-theme); -} - -// Light Theme -$light-primary: mat.m2-define-palette(mat.$m2-indigo-palette, 500); -$light-accent: mat.m2-define-palette(mat.$m2-indigo-palette, A200, A100, A400); - -$light-theme: mat.m2-define-light-theme(( - color: ( - primary: $light-primary, - accent: $light-accent, - ), - typography: mat.m2-define-typography-config(), - density: 0, -)); - -.light-theme { - @include mat.all-component-themes($light-theme); -} - diff --git a/application/client/src/app/ui/styles/reset.less b/application/client/src/app/ui/styles/reset.less deleted file mode 100644 index 472b7d10e0..0000000000 --- a/application/client/src/app/ui/styles/reset.less +++ /dev/null @@ -1,13 +0,0 @@ -@import './variables.less'; - -body, p, h1, h2, h3, h4, h5, h6, ul, li { - padding: 0; - margin: 0; -} - -* { - font-family: 'primary'; - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; - user-select: none; -} \ No newline at end of file diff --git a/application/client/src/app/ui/styles/rows.less b/application/client/src/app/ui/styles/rows.less deleted file mode 100644 index 3ca918de6b..0000000000 --- a/application/client/src/app/ui/styles/rows.less +++ /dev/null @@ -1,68 +0,0 @@ -@import './variables.less'; - - -.row span{ - display: inline-block; - font-family: 'console', monospace; - font-size: 13.5px; - font-variant-numeric: tabular-nums; - padding: 0; - margin: 0; - line-height: 16px; - height: 16px; - max-height: 16px; - white-space: pre; - vertical-align: top; - font-weight: 500; - &.match{ - background: var(--scheme-color-2); - color: var(--scheme-color-5); - font-weight: 600; - - } - &.accent{ - background: var(--scheme-color-accent); - color: var(--scheme-color-0); - font-weight: 600; - } - &.timestampmatch{ - color:inherit; - background: var(--scheme-color-accent-fade-30); - cursor: default; - position: relative; - &:hover{ - background: var(--scheme-color-accent-fade-60); - color: var(--scheme-color-0); - font-weight: 600; - } - - } -} -app-scrollarea-row { - &[data-selected="true"] { - & span.nested{ - background: var(--scheme-color-accent); - color: var(--scheme-color-7); - } - } -} -& span.injected-row-comment { - background: var(--scheme-color-warning-light); - color: var(--scheme-color-0); - &.pending { - background: var(--scheme-color-warning-dark); - } -} -& .console-content, -& .console-content * { - font-family: 'console', monospace; - font-size: 13.5px; - font-variant-numeric: tabular-nums; - padding: 0; - margin: 0; - line-height: 16px; - white-space: normal; - font-weight: 500; - user-select: text; -} -/// Menlo, Monaco, "Courier New", monospace \ No newline at end of file diff --git a/application/client/src/app/ui/styles/scheme.less b/application/client/src/app/ui/styles/scheme.less deleted file mode 100644 index 6125921ae5..0000000000 --- a/application/client/src/app/ui/styles/scheme.less +++ /dev/null @@ -1,16 +0,0 @@ -@import './global.less'; -@import './containers.less'; -@import './variables.less'; -@import './reset.less'; -@import './colors.less'; -@import './fonts.less'; -@import './text.less'; -@import "./fontawesome/less/fontawesome"; -@import "./fontawesome/less/solid"; -@import "./fontawesome/less/regular"; -@import "./scrollbars.less"; -@import "./codicons/codicon.less"; -@import "./material.less"; -@import './buttons.less'; -@import "./rows.less"; -@import "./markdown.less"; diff --git a/application/client/src/app/ui/styles/scheme.scss b/application/client/src/app/ui/styles/scheme.scss deleted file mode 100644 index 040a634bb7..0000000000 --- a/application/client/src/app/ui/styles/scheme.scss +++ /dev/null @@ -1,2 +0,0 @@ -@use './meterial.theme.scss'; -@use './material.fonts.scss'; \ No newline at end of file diff --git a/application/client/src/app/ui/styles/scrollbars.less b/application/client/src/app/ui/styles/scrollbars.less deleted file mode 100644 index 774db65d1c..0000000000 --- a/application/client/src/app/ui/styles/scrollbars.less +++ /dev/null @@ -1,14 +0,0 @@ -@import './variables.less'; - -*::-webkit-scrollbar { - width: 8px; - height: 8px; - background-color: var(--scheme-color-5); -} -*::-webkit-scrollbar-thumb { - border-radius: 0; - background-color: var(--scheme-color-3); -} -*::-webkit-scrollbar-corner { - background-color: var(--scheme-color-5); -} \ No newline at end of file diff --git a/application/client/src/app/ui/styles/sizes.ts b/application/client/src/app/ui/styles/sizes.ts deleted file mode 100644 index f7a25477e7..0000000000 --- a/application/client/src/app/ui/styles/sizes.ts +++ /dev/null @@ -1 +0,0 @@ -export const tabs_list_height = 1.5 * 16; diff --git a/application/client/src/app/ui/styles/support.less b/application/client/src/app/ui/styles/support.less deleted file mode 100644 index b1b072bf35..0000000000 --- a/application/client/src/app/ui/styles/support.less +++ /dev/null @@ -1,11 +0,0 @@ -.gradient(@type; @colors; @dir: 0deg; @prefixes: webkit, moz, ms, o; @index: length(@prefixes)) when (@index > 0) { - .gradient(@type; @colors; @dir; @prefixes; (@index - 1)); - - @prefix : extract(@prefixes, @index); - @dir-old : 90 - (@dir); - - background-image: ~"-@{prefix}-@{type}-gradient(@{dir-old}, @{colors})"; - & when ( @index = length(@prefixes) ) { - background-image: ~"@{type}-gradient(@{dir}, @{colors})"; - } -} \ No newline at end of file diff --git a/application/client/src/app/ui/styles/text.less b/application/client/src/app/ui/styles/text.less deleted file mode 100644 index 608935c8ec..0000000000 --- a/application/client/src/app/ui/styles/text.less +++ /dev/null @@ -1,45 +0,0 @@ -@import './variables.less'; - -.t-normal { - font-size: 0.9rem; - font-weight: 400; -} - -.t-small { - font-size: 0.8rem; - font-weight: 300; -} - -.t-medium { - font-size: 0.8rem; - font-weight: 400; -} - -.t-large{ - font-size: 1.1rem; - font-weight: 600; -} -.t-console{ - font-size: 0.8rem; - line-height: 0.8rem; - font-family: 'console', monospace; -} - -.t-weight-600 { - font-weight: 600; -} - -.t-subselection { - & span { - color: var(--scheme-color-0); - font-weight: 500; - } -} - -// .mat-select-panel .t-small { -// .t-small !important; -// } - -// .mat-select-panel .t-console { -// .t-console !important; -// } diff --git a/application/client/src/app/ui/styles/variables.less b/application/client/src/app/ui/styles/variables.less deleted file mode 100644 index 1d396aba07..0000000000 --- a/application/client/src/app/ui/styles/variables.less +++ /dev/null @@ -1,162 +0,0 @@ -@dark-scheme-color-0: #ffffff; -@dark-scheme-color-0-fade-35: fade(@dark-scheme-color-0, 35%); -@dark-scheme-color-1: #eaeaea; -@dark-scheme-color-2: #c0c0c0; -@dark-scheme-color-2-lighten-5: lighten(@dark-scheme-color-2, 5%); -@dark-scheme-color-3: #979797; -@dark-scheme-color-3-15: #97979715; -@dark-scheme-color-3-75: #97979775; -@dark-scheme-color-4: #555555; -@dark-scheme-color-5: #333333; -@dark-scheme-color-5-00: #33333300; -@dark-scheme-color-5-15: #33333315; -@dark-scheme-color-5-85: #33333385; -@dark-scheme-color-5-95: #33333395; -@dark-scheme-color-5-lighten-5: lighten(@dark-scheme-color-5, 5%); -@dark-scheme-color-5-lighten-10: lighten(@dark-scheme-color-5, 10%); -@dark-scheme-color-5-lighten-15: lighten(@dark-scheme-color-5, 15%); -@dark-scheme-color-5-darken-5: darken(@dark-scheme-color-5, 5%); -@dark-scheme-color-6: #111111; -@dark-scheme-color-7: #000000; -@dark-scheme-bk-color-0: #424242; -@dark-scheme-color-error: rgb(253, 21, 21); -@dark-scheme-color-error-light: rgb(248, 133, 133); -@dark-scheme-color-accent: #74b9ff; -@dark-scheme-color-accent-50: #74b9ff50; -@dark-scheme-color-accent-fade-30: fade(@dark-scheme-color-accent, 30%); -@dark-scheme-color-accent-fade-60: fade(@dark-scheme-color-accent, 60%); -@dark-scheme-color-accent-lighten-20: lighten(@dark-scheme-color-accent, 20%); -@dark-scheme-color-accent-fadeout-50: fadeout(@dark-scheme-color-accent, 50%); -@dark-scheme-color-warning: #fffd71; -@dark-scheme-color-warning-light: #a7a547; -@dark-scheme-color-warning-dark: #676628; -@dark-scheme-color-warning-fadeout-50: fadeout(@dark-scheme-color-warning, 50%); -@dark-scheme-color-hover: #494949; -@dark-scheme-color-active: #6a7d8f; -@dark-scheme-color-active-15: #6a7d8f15; -@dark-scheme-color-active-75: #6a7d8f75; - -.dark-theme { - --scheme-color-0: @dark-scheme-color-0; - --scheme-color-0-fade-35: @dark-scheme-color-0-fade-35; - --scheme-color-1: @dark-scheme-color-1; - --scheme-color-2: @dark-scheme-color-2; - --scheme-color-2-lighten-5: @dark-scheme-color-2-lighten-5; - --scheme-color-3: @dark-scheme-color-3; - --scheme-color-3-15: @dark-scheme-color-3-15; - --scheme-color-3-75: @dark-scheme-color-3-75; - --scheme-color-4: @dark-scheme-color-4; - --scheme-color-5: @dark-scheme-color-5; - --scheme-color-5-00: @dark-scheme-color-5-00; - --scheme-color-5-15: @dark-scheme-color-5-15; - --scheme-color-5-85: @dark-scheme-color-5-85; - --scheme-color-5-95: @dark-scheme-color-5-95; - --scheme-color-5-lighten-5: @dark-scheme-color-5-lighten-5; - --scheme-color-5-lighten-10: @dark-scheme-color-5-lighten-10; - --scheme-color-5-lighten-15: @dark-scheme-color-5-lighten-15; - --scheme-color-5-darken-5: @dark-scheme-color-5-darken-5; - --scheme-color-6: @dark-scheme-color-6; - --scheme-color-7: @dark-scheme-color-7; - --scheme-bk-color-0: @dark-scheme-bk-color-0; - --scheme-color-error: @dark-scheme-color-error; - --scheme-color-error-light: @dark-scheme-color-error-light; - --scheme-color-accent: @dark-scheme-color-accent; - --scheme-color-accent-50: @dark-scheme-color-accent-50; - --scheme-color-accent-fade-30: @dark-scheme-color-accent-fade-30; - --scheme-color-accent-fade-60: @dark-scheme-color-accent-fade-60; - --scheme-color-accent-lighten-20: @dark-scheme-color-accent-lighten-20; - --scheme-color-accent-fadeout-50: @dark-scheme-color-accent-fadeout-50; - --scheme-color-warning: @dark-scheme-color-warning; - --scheme-color-warning-light: @dark-scheme-color-warning-light; - --scheme-color-warning-dark: @dark-scheme-color-warning-dark; - --scheme-color-warning-fadeout-50: @dark-scheme-color-warning-fadeout-50; - --scheme-color-hover: @dark-scheme-color-hover; - --scheme-color-active: @dark-scheme-color-active; - --scheme-color-active-75: @dark-scheme-color-active-75; -} - -@light-scheme-color-0: #000000; -@light-scheme-color-0-fade-35: fade(@light-scheme-color-0, 35%); -@light-scheme-color-1: #151515; -@light-scheme-color-2: #3f3f3f; -@light-scheme-color-2-lighten-5: lighten(@light-scheme-color-2, 5%); -@light-scheme-color-3: #686868; -@light-scheme-color-3-15: #68686815; -@light-scheme-color-3-75: #68686875; -@light-scheme-color-4: #aaaaaa; -@light-scheme-color-5: #efefef; -@light-scheme-color-5-00: #efefef00; -@light-scheme-color-5-15: #efefef15; -@light-scheme-color-5-85: #efefef85; -@light-scheme-color-5-95: #efefef95; -@light-scheme-color-5-lighten-5: lighten(@light-scheme-color-5, 5%); -@light-scheme-color-5-lighten-10: lighten(@light-scheme-color-5, 10%); -@light-scheme-color-5-lighten-15: lighten(@light-scheme-color-5, 15%); -@light-scheme-color-5-darken-5: darken(@light-scheme-color-5, 5%); -@light-scheme-color-6: #fafafa; -@light-scheme-color-7: #ffffff; -@light-scheme-color-error: rgb(253, 21, 21); -@light-scheme-color-error-light: rgb(248, 133, 133); -@light-scheme-color-accent: #74b9ff; -@light-scheme-color-accent-50: #74b9ff50; -@light-scheme-color-accent-fade-30: fade(@light-scheme-color-accent, 30%); -@light-scheme-color-accent-fade-60: fade(@light-scheme-color-accent, 60%); -@light-scheme-color-accent-lighten-20: lighten(@light-scheme-color-accent, 20%); -@light-scheme-color-accent-fadeout-50: fadeout(@light-scheme-color-accent, 50%); -@light-scheme-color-warning: #fffd71; -@light-scheme-color-warning-light: #a7a547; -@light-scheme-color-warning-dark: #676628; -@light-scheme-color-warning-fadeout-50: fadeout(@light-scheme-color-warning, 50%); -@light-scheme-bk-color-0: #dcdcdc; -@light-scheme-color-hover: #dbdbdb; -@light-scheme-color-active: #958270; -@light-scheme-color-active-15: #95827015; -@light-scheme-color-active-75: #95827075; - -.light-theme { - --scheme-color-0: @light-scheme-color-0; - --scheme-color-0-fade-35: @light-scheme-color-0-fade-35; - --scheme-color-1: @light-scheme-color-1; - --scheme-color-2: @light-scheme-color-2; - --scheme-color-2-lighten-5: @light-scheme-color-2-lighten-5; - --scheme-color-3: @light-scheme-color-3; - --scheme-color-3-15: @light-scheme-color-3-15; - --scheme-color-3-75: @light-scheme-color-3-75; - --scheme-color-4: @light-scheme-color-4; - --scheme-color-5: @light-scheme-color-5; - --scheme-color-5-00: @light-scheme-color-5-00; - --scheme-color-5-15: @light-scheme-color-5-15; - --scheme-color-5-85: @light-scheme-color-5-85; - --scheme-color-5-95: @light-scheme-color-5-95; - --scheme-color-5-lighten-5: @light-scheme-color-5-lighten-5; - --scheme-color-5-lighten-10: @light-scheme-color-5-lighten-10; - --scheme-color-5-lighten-15: @light-scheme-color-5-lighten-15; - --scheme-color-5-darken-5: @light-scheme-color-5-darken-5; - --scheme-color-6: @light-scheme-color-6; - --scheme-color-7: @light-scheme-color-7; - --scheme-bk-color-0: @light-scheme-bk-color-0; - --scheme-color-error: @light-scheme-color-error; - --scheme-color-error-light: @light-scheme-color-error-light; - --scheme-color-accent: @light-scheme-color-accent; - --scheme-color-accent-50: @light-scheme-color-accent-50; - --scheme-color-accent-fade-30: @light-scheme-color-accent-fade-30; - --scheme-color-accent-fade-60: @light-scheme-color-accent-fade-60; - --scheme-color-accent-lighten-20: @light-scheme-color-accent-lighten-20; - --scheme-color-accent-fadeout-50: @light-scheme-color-accent-fadeout-50; - --scheme-color-warning: @light-scheme-color-warning; - --scheme-color-warning-light: @light-scheme-color-warning-light; - --scheme-color-warning-dark: @light-scheme-color-warning-dark; - --scheme-color-warning-fadeout-50: @light-scheme-color-warning-fadeout-50; - --scheme-color-hover: @light-scheme-color-hover; - --scheme-color-active: @light-scheme-color-active; - --scheme-color-active-75: @light-scheme-color-active-75; -} - -@border-radius: 6px; -@border-color-offset: 5%; -@tabs-list-height: 32px; -@caption-height: 32px; -@status-bar-height: 1.5rem; -@func-bar-maximized: 20rem; -@status-bar-height-abs: 1.5; -@func-bar-maximized-abs: 20; diff --git a/application/client/src/app/ui/tabs/changelogs/component.ts b/application/client/src/app/ui/tabs/changelogs/component.ts deleted file mode 100644 index bbc188d6da..0000000000 --- a/application/client/src/app/ui/tabs/changelogs/component.ts +++ /dev/null @@ -1,63 +0,0 @@ -import { - Component, - ChangeDetectorRef, - AfterContentInit, - AfterViewInit, - Input, - ElementRef, - ViewChild, -} from '@angular/core'; -import { Ilc, IlcInterface } from '@env/decorators/component'; -import { Initial } from '@env/decorators/initial'; -import { ChangesDetector } from '@ui/env/extentions/changes'; -import { micromark } from 'micromark'; -import { DomSanitizer, SafeHtml } from '@angular/platform-browser'; - -import * as dom from '@ui/env/dom'; -import { bridge } from '@service/bridge'; - -@Component({ - selector: 'app-tabs-changelog', - templateUrl: './template.html', - styleUrls: ['./styles.less'], - standalone: false, -}) -@Initial() -@Ilc() -export class Changelog extends ChangesDetector implements AfterContentInit, AfterViewInit { - @Input() markdown!: string; - @Input() version!: string; - @ViewChild('content') contentRef!: ElementRef; - - public html!: SafeHtml; - - constructor(cdRef: ChangeDetectorRef, protected readonly sanitizer: DomSanitizer) { - super(cdRef); - } - - public ngAfterContentInit(): void { - this.html = this.sanitizer.bypassSecurityTrustHtml(micromark(this.markdown)); - } - - public ngAfterViewInit(): void { - const links = this.contentRef.nativeElement.querySelectorAll('a'); - if (links === null) { - return; - } - links.forEach((link: HTMLAnchorElement) => { - link.addEventListener('click', this.redirect); - }); - } - - protected redirect(event: MouseEvent): void { - dom.stop(event); - const url = (event.target as HTMLAnchorElement).href; - bridge - .browser() - .url(url) - .catch((err: Error) => { - this.log().error(`Fail to open URL "${url}": ${err.message}`); - }); - } -} -export interface Changelog extends IlcInterface {} diff --git a/application/client/src/app/ui/tabs/changelogs/module.ts b/application/client/src/app/ui/tabs/changelogs/module.ts deleted file mode 100644 index 8331fbb090..0000000000 --- a/application/client/src/app/ui/tabs/changelogs/module.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { NgModule } from '@angular/core'; -import { CommonModule } from '@angular/common'; -import { MatCardModule } from '@angular/material/card'; -import { MatDividerModule } from '@angular/material/divider'; - -import { Changelog } from './component'; - -@NgModule({ - imports: [CommonModule, MatCardModule, MatDividerModule], - declarations: [Changelog], - exports: [Changelog], - bootstrap: [Changelog], -}) -export class ChangelogModule {} diff --git a/application/client/src/app/ui/tabs/changelogs/styles.less b/application/client/src/app/ui/tabs/changelogs/styles.less deleted file mode 100644 index 75ac4c786f..0000000000 --- a/application/client/src/app/ui/tabs/changelogs/styles.less +++ /dev/null @@ -1,22 +0,0 @@ -@import '../../styles/variables.less'; - -:host { - position: absolute; - display: block; - top: 0; - left: 0; - width: 100%; - height: 100%; - overflow: hidden; - & mat-card { - margin: 12px 6px 12px 12px; - & mat-card-title { - color: var(--scheme-color-1); - font-size: 16px; - } - & mat-card-subtitle { - color: var(--scheme-color-3); - font-size: 12px; - } - } -} \ No newline at end of file diff --git a/application/client/src/app/ui/tabs/changelogs/template.html b/application/client/src/app/ui/tabs/changelogs/template.html deleted file mode 100644 index 7a233fee3b..0000000000 --- a/application/client/src/app/ui/tabs/changelogs/template.html +++ /dev/null @@ -1,10 +0,0 @@ -
-
- - {{version}} - -
-
-
-
-
diff --git a/application/client/src/app/ui/tabs/help/component.ts b/application/client/src/app/ui/tabs/help/component.ts deleted file mode 100644 index a57df7dee8..0000000000 --- a/application/client/src/app/ui/tabs/help/component.ts +++ /dev/null @@ -1,240 +0,0 @@ -import { - Component, - ChangeDetectorRef, - AfterViewInit, - ViewChild, - ElementRef, - ViewEncapsulation, - Input, -} from '@angular/core'; -import { Ilc, IlcInterface } from '@env/decorators/component'; -import { Initial } from '@env/decorators/initial'; -import { ChangesDetector } from '@ui/env/extentions/changes'; -import { micromark } from 'micromark'; -import { DomSanitizer, SafeHtml } from '@angular/platform-browser'; - -import * as dom from '@ui/env/dom'; - -const HOME = `/readme.md`; -const PATH = `assets/documentation`; - -@Component({ - selector: 'app-tabs-help', - templateUrl: './template.html', - styleUrls: ['./styles.less'], - encapsulation: ViewEncapsulation.None, - standalone: false, -}) -@Initial() -@Ilc() -export class Help extends ChangesDetector implements AfterViewInit { - @Input() location: string | undefined; - @ViewChild('content') contentRef!: ElementRef; - @ViewChild('index') indexRef!: ElementRef; - - protected paths: { - index: string; - content: string; - location: string; - } = { - index: '/readme.md', - content: '/features.md', - location: '', - }; - protected history: string[] = []; - - protected url(): { - clean(path: string): string; - src(html: string): string; - } { - return { - clean: (path: string): string => { - return path.replace(/^\./gi, ''); - }, - src: (html: string): string => { - return html.replace(/src="(.*?)"/gi, (_match: string, url: string) => { - if (typeof url !== 'string') { - return 'src=""'; - } - return `src="${PATH}/${this.paths.location}${url}"`; - }); - }, - }; - } - protected fetch(): { - index(): Promise; - content(): Promise; - all(): void; - } { - const load = (dest: string): Promise => { - return new Promise((resolve) => { - fetch(dest) - .then((res) => { - if (res.status !== 200) { - return; - } - res.text().then((markdown) => { - const lines = markdown.split(/[\n\r]/gi); - const indexes: { found: boolean; count: number } = { - found: false, - count: -1, - }; - lines.forEach((line: string, i: number) => { - if (indexes.found && indexes.count !== -1) { - return; - } - if (!indexes.found && line.toLowerCase() === '## content') { - indexes.found = true; - } - if (indexes.found && i > 1 && line.trim().startsWith('#')) { - indexes.count = i; - } - }); - if (indexes.found && indexes.count !== -1) { - lines.splice(0, indexes.count); - } - resolve( - this.sanitizer.bypassSecurityTrustHtml( - this.url().src(micromark(lines.join('\n'))), - ), - ); - }); - }) - .catch((err) => { - this.log().error(err); - }); - }); - }; - return { - index: (): Promise => { - return load(`${PATH}${this.url().clean(this.paths.index)}`) - .then((html) => { - this.html.index = html; - this.detectChanges(); - this.bind().index(); - }) - .catch((err: Error) => { - this.log().error(`Fail to get HTML of index: ${err.message}`); - }); - }, - content: (): Promise => { - return load(`${PATH}${this.url().clean(this.paths.content)}`) - .then((html) => { - this.html.content = html; - this.detectChanges(); - this.bind().content(); - }) - .catch((err: Error) => { - this.log().error(`Fail to get HTML of content: ${err.message}`); - }); - }, - all: (): void => { - Promise.allSettled([this.fetch().index(), this.fetch().content()]) - .catch((err: Error) => { - this.log().error(`Fail to get HTML: ${err.message}`); - }) - .finally(() => { - if (this.location !== undefined) { - this.link(this.location, false); - } - }); - }, - }; - } - - protected bind(): { - content(): void; - index(): void; - } { - return { - content: (): void => {}, - index: (): void => { - const links = this.indexRef.nativeElement.querySelectorAll('a'); - if (links === null) { - return; - } - links.forEach((link: HTMLAnchorElement) => { - link.addEventListener('click', this.redirect); - }); - }, - }; - } - - protected unbind(): { - content(): void; - index(): void; - } { - return { - content: (): void => {}, - index: (): void => { - const links = this.indexRef.nativeElement.querySelectorAll('a'); - if (links === null) { - return; - } - links.forEach((link: HTMLAnchorElement) => { - link.removeEventListener('click', this.redirect); - }); - }, - }; - } - - protected redirect(event: MouseEvent): void { - dom.stop(event); - this.link((event.target as HTMLAnchorElement).href); - } - - protected link(url: string, track: boolean = true): void { - url = `/${url.replace(/^.*\/client\//gi, '')}`; - if (url.toLowerCase().endsWith(`/readme.md`)) { - this.paths.location = url.replace(/readme\.md$/gi, ''); - track && this.history.push(this.paths.index); - this.paths.index = url; - this.unbind().index(); - this.fetch() - .index() - .then(() => { - const links = this.indexRef.nativeElement.querySelectorAll('a'); - if (links === null) { - return; - } - this.link(links[0].href); - }) - .catch((err: Error) => { - this.log().error(`Fail to update index: ${err.message}`); - }); - } else { - this.paths.content = `${this.paths.location}${url}`; - this.unbind().content(); - this.fetch().content(); - } - } - - public html: { - index: SafeHtml; - content: SafeHtml; - } = { - index: '', - content: '', - }; - - constructor(cdRef: ChangeDetectorRef, protected readonly sanitizer: DomSanitizer) { - super(cdRef); - this.redirect = this.redirect.bind(this); - } - - public ngAfterViewInit(): void { - this.fetch().all(); - } - - public home(): void { - this.link(HOME); - } - - public back(): void { - if (this.history.length === 0) { - return; - } - this.link(this.history.splice(this.history.length - 1, 1)[0], false); - } -} -export interface Help extends IlcInterface {} diff --git a/application/client/src/app/ui/tabs/help/module.ts b/application/client/src/app/ui/tabs/help/module.ts deleted file mode 100644 index 8d5a376ad3..0000000000 --- a/application/client/src/app/ui/tabs/help/module.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { NgModule } from '@angular/core'; -import { CommonModule } from '@angular/common'; -import { MatCardModule } from '@angular/material/card'; -import { MatDividerModule } from '@angular/material/divider'; -import { MatButtonModule } from '@angular/material/button'; - -import { Help } from './component'; - -@NgModule({ - imports: [CommonModule, MatCardModule, MatDividerModule, MatButtonModule], - declarations: [Help], - exports: [Help], - bootstrap: [Help], -}) -export class HelpModule {} diff --git a/application/client/src/app/ui/tabs/help/styles.less b/application/client/src/app/ui/tabs/help/styles.less deleted file mode 100644 index 377b3bc254..0000000000 --- a/application/client/src/app/ui/tabs/help/styles.less +++ /dev/null @@ -1,102 +0,0 @@ -@import '../../styles/variables.less'; - -app-tabs-help { - position: absolute; - display: block; - top: 0; - left: 0; - width: 100%; - height: 100%; - overflow: hidden; - & mat-card { - margin: 12px 6px 12px 12px; - & mat-card-title { - color: var(--scheme-color-1); - font-size: 16px; - } - & mat-card-subtitle { - color: var(--scheme-color-3); - font-size: 12px; - } - } - & div.left { - position: absolute; - display: flex; - flex-direction: column; - top: 0; - bottom: 0; - left: 0; - right: 330px; - overflow: hidden; - justify-content: stretch; - justify-items: stretch; - - & .fill { - overflow: auto; - } - } - & div.right { - position: absolute; - width: 320px; - right: 6px; - bottom: 0; - top: 0; - overflow-y: auto; - overflow-x: hidden; - display: flex; - flex-direction: column; - & div.spacer{ - flex: auto 100; - } - & mat-card-subtitle { - text-align: right; - & button:last-child { - margin-right: -1px; - } - &:first-child { - padding-top: 16px; - } - } - & ul { - padding: 8px 0; - } - & li { - position: relative; - display: block; - list-style: none; - cursor: default; - height: 24px; - width: 100%; - & > a { - text-decoration: none; - cursor: default; - position: absolute; - top:0; - left:0; - width: 100%; - height: 100%; - padding-top: 2px; - } - &:hover { - background: var(--scheme-color-4); - &::after, - &::before { - position: absolute; - content: ''; - width: 16px; - height: 100%; - background: var(--scheme-color-4); - top: 0; - } - &::after { - left: -16px; - } - &::before { - left:100%; - } - - } - } - } - -} \ No newline at end of file diff --git a/application/client/src/app/ui/tabs/help/template.html b/application/client/src/app/ui/tabs/help/template.html deleted file mode 100644 index ffa38289e4..0000000000 --- a/application/client/src/app/ui/tabs/help/template.html +++ /dev/null @@ -1,23 +0,0 @@ -
-
-
- - -
-
-
-
-
- - Navigation - - - - - -
-
-
-
-
-
\ No newline at end of file diff --git a/application/client/src/app/ui/tabs/module.ts b/application/client/src/app/ui/tabs/module.ts deleted file mode 100644 index b723638d68..0000000000 --- a/application/client/src/app/ui/tabs/module.ts +++ /dev/null @@ -1,24 +0,0 @@ -import { NgModule } from '@angular/core'; -import { CommonModule } from '@angular/common'; -import { ObserveModule } from '@ui/tabs/observe/module'; -import { MultipleFilesModule } from '@ui/tabs/multiplefiles/module'; -import { SettingsModule } from '@ui/tabs/settings/module'; -import { ChangelogModule } from '@ui/tabs/changelogs/module'; -import { HelpModule } from '@ui/tabs/help/module'; -import { PluginsManagerModule } from '@ui/tabs/plugins/module'; - -@NgModule({ - imports: [ - CommonModule, - ObserveModule, - MultipleFilesModule, - SettingsModule, - ChangelogModule, - HelpModule, - PluginsManagerModule, - ], - declarations: [], - exports: [ObserveModule, MultipleFilesModule, SettingsModule, ChangelogModule, HelpModule], - bootstrap: [], -}) -export class TabsModule {} diff --git a/application/client/src/app/ui/tabs/multiplefiles/component.ts b/application/client/src/app/ui/tabs/multiplefiles/component.ts deleted file mode 100644 index 81301f0620..0000000000 --- a/application/client/src/app/ui/tabs/multiplefiles/component.ts +++ /dev/null @@ -1,69 +0,0 @@ -import { - Component, - AfterContentInit, - Input, - OnDestroy, - AfterViewInit, - ViewChild, - ChangeDetectorRef, -} from '@angular/core'; -import { Ilc, IlcInterface } from '@env/decorators/component'; -import { Initial } from '@env/decorators/initial'; -import { File } from '@platform/types/files'; -import { State } from './state'; -import { TabControls } from '@service/session'; -import { HiddenFilter } from '@elements/filter.hidden/component'; -import { ChangesDetector } from '@ui/env/extentions/changes'; - -@Component({ - selector: 'app-tabs-source-multiple-files', - templateUrl: './template.html', - styleUrls: ['./styles.less'], - standalone: false, -}) -@Initial() -@Ilc() -export class TabSourceMultipleFiles - extends ChangesDetector - implements AfterContentInit, OnDestroy, AfterViewInit -{ - @Input() files!: File[]; - @Input() tab!: TabControls; - - @ViewChild('filter') filter!: HiddenFilter; - - public state!: State; - - constructor(cdRef: ChangeDetectorRef) { - super(cdRef); - } - - public ngAfterContentInit() { - const state: State | undefined = this.tab.storage().get(); - if (state) { - this.state = state; - this.state.restore(this); - } else { - this.state = new State(); - this.state.init(this, this.tab, this.files); - } - } - - public ngAfterViewInit(): void { - this.env().subscriber.register( - this.filter.filter.subjects.get().change.subscribe((value: string) => { - this.state.filter(value); - }), - this.filter.filter.subjects.get().drop.subscribe(() => { - this.state.filter(''); - }), - ); - this.ilc().services.ui.dropfiles.state().disable(); - } - - public ngOnDestroy() { - this.tab.storage().set(this.state); - this.ilc().services.ui.dropfiles.state().enable(); - } -} -export interface TabSourceMultipleFiles extends IlcInterface {} diff --git a/application/client/src/app/ui/tabs/multiplefiles/file.holder.ts b/application/client/src/app/ui/tabs/multiplefiles/file.holder.ts deleted file mode 100644 index a13a9d716b..0000000000 --- a/application/client/src/app/ui/tabs/multiplefiles/file.holder.ts +++ /dev/null @@ -1,70 +0,0 @@ -import { Matchee } from '@module/matcher'; -import { bytesToStr } from '@env/str'; -import { File } from '@platform/types/files'; -import { FileType } from '@platform/types/observe/types/file'; - -import * as wasm from '@loader/wasm'; - -export class FileHolder extends Matchee { - private readonly _file: File; - private _selected: boolean = true; - private readonly _color: string; - - constructor(matcher: wasm.Matcher, file: File, color: string) { - super(matcher, { name: file.name, path: file.path }); - this._file = file; - this._color = color; - } - - public reverseSelect() { - this._selected = !this._selected; - } - - public select() { - this._selected = true; - } - - public unselect() { - this._selected = false; - } - - public get color(): string { - return this._color; - } - - public get filename(): string { - return this._file.filename; - } - - public get modificationDate(): string { - return new Date(this._file.stat.mtimeMs).toLocaleString('en-GB'); - } - - public get name(): string { - return this._file.name; - } - - public get path(): string { - return this._file.path; - } - - public get selected(): boolean { - return this._selected; - } - - public get sizeAsStr(): string { - return bytesToStr(this._file.stat.size); - } - - public get size(): number { - return this._file.stat.size; - } - - public sizeInByte(): number { - return this._file.stat.size; - } - - public get type(): FileType { - return this._file.type; - } -} diff --git a/application/client/src/app/ui/tabs/multiplefiles/module.ts b/application/client/src/app/ui/tabs/multiplefiles/module.ts deleted file mode 100644 index b1fcd15245..0000000000 --- a/application/client/src/app/ui/tabs/multiplefiles/module.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { NgModule } from '@angular/core'; -import { MatButtonModule } from '@angular/material/button'; -import { MatCardModule } from '@angular/material/card'; -import { MatTableModule } from '@angular/material/table'; -import { AppDirectiviesModule } from '@ui/env/directives/module'; -import { MatSortModule } from '@angular/material/sort'; -import { CommonModule } from '@angular/common'; -import { DragDropModule } from '@angular/cdk/drag-drop'; -import { HiddenFilterModule } from '@elements/filter.hidden/module'; - -import { TabSourceMultipleFilesStructure } from './structure/component'; -import { TabSourceMultipleFiles } from './component'; - -@NgModule({ - imports: [ - MatButtonModule, - MatCardModule, - MatTableModule, - AppDirectiviesModule, - MatSortModule, - CommonModule, - DragDropModule, - HiddenFilterModule, - ], - declarations: [TabSourceMultipleFiles, TabSourceMultipleFilesStructure], - exports: [TabSourceMultipleFiles], - bootstrap: [TabSourceMultipleFiles, TabSourceMultipleFilesStructure], -}) -export class MultipleFilesModule {} diff --git a/application/client/src/app/ui/tabs/multiplefiles/state.ts b/application/client/src/app/ui/tabs/multiplefiles/state.ts deleted file mode 100644 index 83a4b5042a..0000000000 --- a/application/client/src/app/ui/tabs/multiplefiles/state.ts +++ /dev/null @@ -1,407 +0,0 @@ -import { FileHolder } from './file.holder'; -import { bytesToStr } from '@env/str'; -import { File } from '@platform/types/files'; -import { FileType } from '@platform/types/observe/types/file'; -import { Subject } from '@platform/env/subscription'; -import { EEventType, IEvent } from './structure/component'; -import { Holder } from '@module/matcher'; -import { TabControls } from '@service/session'; -import { IlcInterface } from '@service/ilc'; -import { Level, Locker } from '@ui/service/lockers'; -import { getUniqueColorTo } from '@ui/styles/colors'; -import { Sort } from '@angular/material/sort'; -import { ChangesDetector } from '@ui/env/extentions/changes'; - -import * as Factory from '@platform/types/observe/factory'; - -export interface IMultifile { - usedColors: string[]; - files: FileHolder[]; -} - -export class State extends Holder { - private readonly _filesUpdate: Subject = new Subject(); - private _ref!: IlcInterface & ChangesDetector; - private _tab!: TabControls; - private _files: FileHolder[] = []; - private _usedColors: string[] = []; - private _selected: { - count: number; - files: FileHolder[]; - totalSize: number; - typeCount: { [key: string]: number }; - types: FileType[]; - } = { - count: 0, - files: [], - totalSize: 0, - typeCount: {}, - types: [], - }; - private _sortConfig: Sort = { active: '', direction: '' }; - - public path: string | undefined; - - constructor() { - super(); - } - - public init(ref: IlcInterface & ChangesDetector, tab: TabControls, files: File[]): void { - this._ref = ref; - this._tab = tab; - if (files.length > 0) { - this.path = files[0].path; - } - files.forEach((file: File) => { - const color = getUniqueColorTo(this._usedColors); - this._usedColors.push(color); - this._files.push(new FileHolder(this.matcher, file, color)); - if (this.path !== undefined && file.path !== this.path) { - this.path = undefined; - } - }); - this.update(); - } - - public restore(ref: IlcInterface & ChangesDetector) { - this._ref = ref; - } - - public set sortConfig(config: Sort) { - this._sortConfig = config; - } - - public get sortConfig(): Sort { - return this._sortConfig; - } - - public get filesUpdate(): Subject { - return this._filesUpdate; - } - - public get selectedFiles(): FileHolder[] { - return this._selected.files; - } - - public get files(): FileHolder[] { - return this._files; - } - - public get selectedCount(): number { - return this._selected.count; - } - - public get selectedSize(): string { - return bytesToStr(this._selected.totalSize); - } - - public get selectedTypes(): FileType[] { - return this._selected.types; - } - - public getTypeCount(type: FileType): number { - const count: number | undefined = this._selected.typeCount[type]; - return count === undefined ? 0 : count; - } - - public selectOnly(type: FileType) { - this._files.forEach((file: FileHolder) => { - if (file.type === type) { - file.select(); - } else { - file.unselect(); - } - }); - this.update(); - } - - public isConcatable(): boolean { - // TODO: Needs some rework! This method should consider parser - return ( - this._selected.types.length === 1 || - (this._selected.types.length === 2 && - this._selected.types.includes(FileType.Text) && - this._selected.types.includes(FileType.Binary)) - ); - } - - public action(): { - cancel: () => void; - concat: () => void; - openEach: (files?: FileHolder[]) => void; - addFiles: () => void; - } { - return { - cancel: () => { - this._tab.close(); - }, - concat: () => { - const fileType: FileType = - this._selected.types.length === 1 ? this._selected.types[0] : FileType.Text; - const files: string[] = this._selected.files.map( - (file: FileHolder) => file.filename, - ); - (() => { - switch (fileType) { - case FileType.Text: - return this._ref - .ilc() - .services.system.session.initialize() - .observe( - new Factory.Concat() - .asText() - .type(Factory.FileType.Text) - .files(files) - .get(), - ); - case FileType.PcapNG: - return this._ref - .ilc() - .services.system.session.initialize() - .configure( - new Factory.Concat() - .asDlt() - .type(Factory.FileType.PcapNG) - .files(files) - .get(), - ); - case FileType.PcapLegacy: - return this._ref - .ilc() - .services.system.session.initialize() - .configure( - new Factory.Concat() - .asDlt() - .type(Factory.FileType.PcapLegacy) - .files(files) - .get(), - ); - case FileType.Binary: - return this._ref - .ilc() - .services.system.session.initialize() - .configure( - new Factory.Concat() - .asDlt() - .type(Factory.FileType.Binary) - .files(files) - .get(), - ); - case FileType.ParserPlugin: - return this._ref - .ilc() - .services.system.session.initialize() - .configure( - new Factory.Concat() - .asParserPlugin() - .type(Factory.FileType.ParserPlugin) - .files(files) - .get(), - ); - default: - return Promise.reject( - new Error(`Unsupported type ${this.files[0].type}`), - ); - } - })() - .then(() => { - this._tab.close(); - }) - .catch((err: Error) => { - this._ref - .ilc() - .services.ui.lockers.lock( - new Locker(true, err.message) - .set() - .message(err.message) - .type(Level.error) - .spinner(false) - .end(), - { - closable: true, - }, - ); - }); - }, - openEach: (files?: FileHolder[]) => { - (files === undefined ? this._selected.files : files).forEach((file: FileHolder) => { - switch (file.type) { - case FileType.Text: - this._ref - .ilc() - .services.system.session.initialize() - .observe( - new Factory.File() - .asText() - .type(Factory.FileType.Text) - .file(file.filename) - .get(), - ) - .catch((err: Error) => { - this._ref - .ilc() - .logger.error( - `Fail to open text file; error: ${err.message}`, - ); - }); - break; - case FileType.Binary: - this._ref - .ilc() - .services.system.session.initialize() - .configure( - new Factory.File() - .asDlt() - .type(Factory.FileType.Binary) - .file(file.filename) - .get(), - ) - .catch((err: Error) => { - this._ref - .ilc() - .logger.error( - `Fail to open dlt file; error: ${err.message}`, - ); - }); - break; - case FileType.PcapNG: - this._ref - .ilc() - .services.system.session.initialize() - .configure( - new Factory.File() - .asDlt() - .type(Factory.FileType.PcapNG) - .file(file.filename) - .get(), - ) - .catch((err: Error) => { - this._ref - .ilc() - .logger.error( - `Fail to open dlt file; error: ${err.message}`, - ); - }); - break; - case FileType.PcapLegacy: - this._ref - .ilc() - .services.system.session.initialize() - .configure( - new Factory.File() - .asDlt() - .type(Factory.FileType.PcapLegacy) - .file(file.filename) - .get(), - ) - .catch((err: Error) => { - this._ref - .ilc() - .logger.error( - `Fail to open dlt file; error: ${err.message}`, - ); - }); - break; - case FileType.ParserPlugin: - this._ref - .ilc() - .services.system.session.initialize() - .configure( - new Factory.File() - .asParserPlugin() - .type(Factory.FileType.ParserPlugin) - .file(file.filename) - .get(), - ) - .catch((err: Error) => { - this._ref - .ilc() - .logger.error( - `Fail to open file with plugins; error: ${err.message}`, - ); - }); - break; - default: - throw new Error(`Not covered type ${this.files[0].type}`); - } - }); - this._tab.close(); - }, - addFiles: () => { - /* TODO */ - }, - }; - } - - public onDropped(files: File[]) { - files.forEach((result: File) => { - if (this._files.find((file: FileHolder) => file.filename === result.filename)) { - return; - } - const color = getUniqueColorTo(this._usedColors); - this._usedColors.push(color); - this._files.push(new FileHolder(this.matcher, result, color)); - this.filesUpdate.emit(this._files); - this.update(); - }); - } - - public event(event: IEvent) { - switch (event.type) { - case EEventType.open: - this.action().openEach(event.files); - break; - case EEventType.select: - this.update(); - break; - case EEventType.sort: - this._files = event.files; - this.update(); - break; - case EEventType.update: - this._files = - event.files.length === 0 - ? [] - : this._files.filter((f: FileHolder) => !event.files.includes(f)); - this.update(); - break; - } - this._ref !== undefined && this._ref.detectChanges(); - } - - public filter(value: string) { - this.matcher.search(value); - this.filesUpdate.emit( - this._files - .sort((a: FileHolder, b: FileHolder) => b.getScore() - a.getScore()) - .filter((file: FileHolder) => file.getScore() > 0), - ); - } - - public overviewColorWidth(size: number) { - return (size / this._selected.totalSize) * 100; - } - - protected update() { - this._selected = { - count: 0, - files: [], - totalSize: 0, - typeCount: {}, - types: [], - }; - this._files.forEach((file: FileHolder) => { - if (file.selected) { - this._selected.count++; - this._selected.totalSize += file.sizeInByte(); - !this._selected.types.includes(file.type) && this._selected.types.push(file.type); - if (this._selected.typeCount[file.type] === undefined) { - this._selected.typeCount[file.type] = 1; - } else { - this._selected.typeCount[file.type] += 1; - } - this._selected.files.push(file); - } - }); - } -} diff --git a/application/client/src/app/ui/tabs/multiplefiles/structure/component.ts b/application/client/src/app/ui/tabs/multiplefiles/structure/component.ts deleted file mode 100644 index 14e6f10b0a..0000000000 --- a/application/client/src/app/ui/tabs/multiplefiles/structure/component.ts +++ /dev/null @@ -1,268 +0,0 @@ -import { - Component, - ViewChild, - AfterContentInit, - Input, - ViewEncapsulation, - AfterViewInit, - OnDestroy, -} from '@angular/core'; -import { Ilc, IlcInterface } from '@env/decorators/component'; -import { MatSort, Sort } from '@angular/material/sort'; -import { MatTableDataSource } from '@angular/material/table'; -import { FileHolder } from '../file.holder'; -import { FileType } from '@platform/types/observe/types/file'; -import { Subscription } from 'rxjs'; -import { CdkDragDrop, moveItemInArray } from '@angular/cdk/drag-drop'; -import { State } from '../state'; - -import * as dom from '@ui/env/dom'; - -export interface IEvent { - type: EEventType; - files: FileHolder[]; -} - -export enum EEventType { - update = 'update', - select = 'select', - open = 'open', - sort = 'sort', -} - -export const COLUMNS = { - color: 'color', - type: 'type', - name: 'name', - path: 'path', - size: 'size', - modificationDate: 'modificationDate', -}; - -@Component({ - selector: 'app-tabs-source-multiplefiles-structure', - templateUrl: './template.html', - styleUrls: ['./styles.less'], - encapsulation: ViewEncapsulation.None, - standalone: false, -}) -@Ilc() -export class TabSourceMultipleFilesStructure implements AfterContentInit, AfterViewInit, OnDestroy { - @Input() state!: State; - - @ViewChild(MatSort) sort!: MatSort; - - public data!: MatTableDataSource; - public readonly columns: string[] = [ - COLUMNS.color, - COLUMNS.type, - COLUMNS.name, - COLUMNS.path, - COLUMNS.size, - COLUMNS.modificationDate, - ]; - - private _sortConfig: Sort = { active: '', direction: '' }; - private _dataConnect!: Subscription; - private _sortChange!: Subscription; - - public ngAfterContentInit() { - this.data = new MatTableDataSource(this.state.files); - this.env().subscriber.register( - this.state.filesUpdate.subscribe(this._onFilesUpdate.bind(this)), - ); - this._subscribe(); - } - - public ngAfterViewInit() { - this.data.sort = this.sort; - this.sort.sort({ - id: this.state.sortConfig.active, - start: this.state.sortConfig.direction, - disableClear: false, - }); - this._sortChange = this.sort.sortChange.subscribe((sortConfig: Sort) => { - this._sortConfig = sortConfig; - }); - } - - public ngOnDestroy() { - this.state.sortConfig = this._sortConfig; - this._dataConnect && this._dataConnect.unsubscribe(); - this._sortChange && this._sortChange.unsubscribe(); - } - - public ngOnDropListDropped(event: CdkDragDrop) { - this.sort.sort({ id: '', start: '', disableClear: false }); - this._dataConnect && this._dataConnect.unsubscribe(); - moveItemInArray(event.container.data, event.previousIndex, event.currentIndex); - this.data = new MatTableDataSource(event.container.data); - this._subscribe(); - this.data.sort = this.sort; - this.state.event({ type: EEventType.sort, files: event.container.data }); - } - - public ngOnRowSelect(file: FileHolder) { - file.reverseSelect(); - this.state.event({ type: EEventType.select, files: [] }); - } - - public ngContextMenu(event: MouseEvent, file?: FileHolder) { - dom.stop(event); - const items = []; - if (file !== undefined) { - items.push({ - caption: 'Open File', - handler: () => { - this.state.event({ type: EEventType.open, files: [file] }); - }, - disabled: file.type === FileType.Binary, - }); - } - items.push( - { - caption: 'Open Selected', - handler: () => { - this.state.event({ - type: EEventType.open, - files: this.data.data.filter((file: FileHolder) => file.selected), - }); - }, - }, - { - /* Delimiter */ - }, - ); - if (file !== undefined) { - items.push( - { - caption: file.selected ? 'Unselect' : 'Select', - handler: () => { - file.selected ? file.unselect() : file.select(); - this.state.event({ type: EEventType.select, files: [] }); - }, - }, - { - caption: `Select Only [${file.type}]`, - handler: () => { - this.data.data.forEach((f: FileHolder) => - f.type === file.type ? f.select() : f.unselect(), - ); - this.state.event({ type: EEventType.select, files: [] }); - }, - }, - { - caption: `Unselect Only [${file.type}]`, - handler: () => { - this.data.data.forEach((f: FileHolder) => { - if (f.type === file.type) { - f.unselect(); - } - }); - this.state.event({ type: EEventType.select, files: [] }); - }, - }, - { - /* Delimiter */ - }, - ); - } - items.push( - { - caption: 'Select All', - handler: () => { - this.data.data.forEach((f: FileHolder) => f.select()); - this.state.event({ type: EEventType.select, files: [] }); - }, - }, - { - caption: 'Unselect All', - handler: () => { - this.data.data.forEach((f: FileHolder) => f.unselect()); - this.state.event({ type: EEventType.select, files: [] }); - }, - }, - { - caption: 'Reverse Select All', - handler: () => { - this.data.data.forEach((f: FileHolder) => f.reverseSelect()); - this.state.event({ type: EEventType.select, files: [] }); - }, - }, - { - /* Delimiter */ - }, - ); - if (file !== undefined) { - items.push( - { - caption: 'Remove', - handler: () => { - this.data.data = this.data.data.filter((f: FileHolder) => f !== file); - this.state.event({ type: EEventType.update, files: [file] }); - }, - }, - { - caption: `Remove All [Non-${file.type}]`, - handler: () => { - const removed: FileHolder[] = []; - const kept: FileHolder[] = []; - this.data.data.forEach((f: FileHolder) => - f.type === file.type ? kept.push(f) : removed.push(f), - ); - this.data.data = kept; - removed.length > 0 && - this.state.event({ type: EEventType.update, files: removed }); - }, - }, - ); - } - items.push( - { - caption: 'Remove All Empty', - handler: () => { - const removed: FileHolder[] = []; - const kept: FileHolder[] = []; - this.data.data.forEach((f: FileHolder) => - f.sizeInByte() === 0 ? removed.push(f) : kept.push(f), - ); - this.data.data = kept; - removed.length > 0 && - this.state.event({ type: EEventType.update, files: removed }); - }, - }, - { - caption: 'Remove All', - handler: () => { - this.data.data = []; - this.state.event({ type: EEventType.update, files: [] }); - }, - }, - ); - this.ilc().emitter.ui.contextmenu.open({ - items: [...items], - x: event.x, - y: event.y, - }); - } - - private _onFilesUpdate(files: FileHolder[]) { - this.data.data = files; - } - - private _subscribe() { - if (this.data) { - this._dataConnect = this.data.connect().subscribe((files: FileHolder[]) => { - if ( - files.length === this.data.data.length && - files.every((file, index) => file === this.data.data[index]) - ) { - return; - } - this.data.data = files; - this.state.event({ type: EEventType.sort, files: files }); - }); - } - } -} -export interface TabSourceMultipleFilesStructure extends IlcInterface {} diff --git a/application/client/src/app/ui/tabs/multiplefiles/structure/styles.less b/application/client/src/app/ui/tabs/multiplefiles/structure/styles.less deleted file mode 100644 index c20d3ab385..0000000000 --- a/application/client/src/app/ui/tabs/multiplefiles/structure/styles.less +++ /dev/null @@ -1,137 +0,0 @@ -@import '../../../styles/variables.less'; - -app-tabs-source-multiplefiles-structure { - position: relative; - display: block; - width: 100%; - height: 100%; - & table.files { - width: 100%; - border-spacing: 0px; - & th { - height: 56px; - font-size: 12px; - font-weight: 500; - color: #ffffffb3; - background-color: var(--scheme-bk-color-0); - position: sticky; - top: 0; - } - & tr { - & td { - font-size: 14px; - } - & td:last-child { - overflow: hidden; - } - } - & div.placeholder { - height: 35px; - transition: transform 250ms cubic-bezier(0, 0, 0.2, 1); - } - & .color { - padding: 0 10px 0 0; - } - & div.color-indicator { - width: 7px; - height: 35px; - } - & .type { - padding: 0 15px 0 0; - min-width: 45px; - max-width: 45px; - } - & .name { - width: 100%; - padding: 0 15px 0 0; - overflow: hidden; - white-space: nowrap; - text-overflow: ellipsis; - } - & td.path { - direction: rtl; - } - & .path { - min-width: 130px; - max-width: 150px; - padding: 0 20px 0 0; - overflow: hidden; - white-space: nowrap; - text-overflow: ellipsis; - } - & .size { - min-width: 40px; - max-width: 40px; - padding: 0 25px 0 0; - white-space: nowrap; - } - & .modification-date { - min-width: 130px; - max-width: 130px; - white-space: nowrap; - } - } - & .cdk-drop-list-dragging *:not(.cdk-drag-placeholder) { - transition: transform 250ms cubic-bezier(0, 0, 0.2, 1); - } -} - -.cdk-drag-animating.multiple-file-draggable { - transition: transform 250ms cubic-bezier(0, 0, 0.2, 1); -} - -.cdk-drag-preview.multiple-file-draggable { - font-size: 14px; - color: var(--scheme-color-0); - background-color: var(--scheme-bk-color-0); - box-sizing: border-box; - box-shadow: 0 5px 5px -3px rgba(0, 0, 0, 0.2), 0 8px 10px 1px rgba(0, 0, 0, 0.14), 0 3px 14px 2px rgba(0, 0, 0, 0.12); - & td { - vertical-align: middle; - } - & .color { - padding: 0 10px 0 0; - } - & div.color-indicator { - width: 7px; - height: 35px; - } - & .type { - padding: 0 15px 0 0; - min-width: 45px; - max-width: 45px; - } - & .name { - max-width: 150px; - padding: 0 15px 0 0; - overflow: hidden; - white-space: nowrap; - text-overflow: ellipsis; - } - & td.path { - direction: rtl; - } - & .path { - min-width: 130px; - max-width: 150px; - padding: 0 20px 0 0; - overflow: hidden; - white-space: nowrap; - text-overflow: ellipsis; - } - & .size { - min-width: 40px; - max-width: 40px; - padding: 0 25px 0 0; - white-space: nowrap; - } - & .modification-date { - min-width: 130px; - max-width: 130px; - white-space: nowrap; - } -} - -& .selected-multiple-file { - background-color: var(--scheme-color-active); -} \ No newline at end of file diff --git a/application/client/src/app/ui/tabs/multiplefiles/structure/template.html b/application/client/src/app/ui/tabs/multiplefiles/structure/template.html deleted file mode 100644 index 47edb97c2f..0000000000 --- a/application/client/src/app/ui/tabs/multiplefiles/structure/template.html +++ /dev/null @@ -1,53 +0,0 @@ - - - - - - - - - - - - - - - - -
- -
TYPENAME - PATH - SIZE - MOD. DATE -
-
-
{{file.type}}{{file.name}} - {{file.path}} - {{file.sizeAsStr}}{{file.modificationDate}}
diff --git a/application/client/src/app/ui/tabs/multiplefiles/styles.less b/application/client/src/app/ui/tabs/multiplefiles/styles.less deleted file mode 100644 index f35fbfd37b..0000000000 --- a/application/client/src/app/ui/tabs/multiplefiles/styles.less +++ /dev/null @@ -1,142 +0,0 @@ -@import '../../styles/variables.less'; - -:host { - position: absolute; - display: block; - top: 0; - left: 0; - width: 100%; - height: 100%; - overflow: hidden; - & mat-card.top { - overflow-y: scroll; - height: fit-content; - padding-top: 0px; - } - & div.controls { - text-align: right; - } - & h1 { - font-size: 14px; - } - & button { - position: relative; - display: inline-block; - margin: 6px 0 6px 6px!important; - } - & div.left { - position: absolute; - display: flex; - flex-direction: column; - top: 0; - bottom: 0; - left: 0; - right: 330px; - overflow: hidden; - justify-content: stretch; - justify-items: stretch; - } - & div.right { - position: absolute; - width: 320px; - right: 6px; - bottom: 0; - top: 0; - overflow-y: auto; - overflow-x: hidden; - display: flex; - flex-direction: column; - & .mat-form-field{ - width: 100%; - } - & mat-divider.fibex-divider { - margin-top: 12px; - } - & div.spacer{ - flex: auto; - } - } - & div.filter { - position: absolute; - z-index: 1000; - padding: 6px 12px; - background: var(--scheme-color-warning-light); - top: 6px; - right: 6px; - box-shadow: 3px 3px 3px rgb(0 0 0 / 40%); - border-radius: 3px; - } - & .hidden { - display: none; - } - & .table-fill { - width: 100%; - } - & div.overview { - display: flex; - height: 30px; - margin-bottom: 10px; - & div.color { - height: 100%; - flex-direction: column; - } - } - & div.overview-summary { - top: 60%; - left: 50%; - padding: 2px 5px; - font-weight: 700; - position: absolute; - transform: translate(-50%, -50%); - background-color: rgba(0, 0, 0, 0.5); - } - & div.component { - display: flex; - margin-top: 7px; - & span.color { - height: 15px; - min-width: 15px; - margin-top: 2px; - margin-right: 1px; - } - & span.filename { - margin-left: 7px; - white-space: nowrap; - text-overflow: ellipsis; - overflow: hidden; - } - } - & p.none { - color: var(--scheme-color-3); - position: absolute; - top: 65%; - left: 50%; - transform: translate(-50%, -50%); - } - & table { - font-size: 13px; - & td.value { - word-break: break-all; - } - & td.caption { - white-space: nowrap; - } - & td.select-button { - text-decoration: underline; - cursor: pointer; - } - & td.yellow { - color: yellow; - font-weight: 650; - } - & tr.empty-row { - height: 20px; - } - } - & div.dividing-line { - position: absolute; - width: ~"calc(100% - 38px)"; - left: 19px; - border-top: dashed thin grey; - } -} diff --git a/application/client/src/app/ui/tabs/multiplefiles/template.html b/application/client/src/app/ui/tabs/multiplefiles/template.html deleted file mode 100644 index c53455d1aa..0000000000 --- a/application/client/src/app/ui/tabs/multiplefiles/template.html +++ /dev/null @@ -1,90 +0,0 @@ - -
-
-
- - Multiple files - - - - -
-
- - Summary - - - - - - - - - - - - - - - - - - - - - - -
Files in total:{{state.files.length}}
Selected files:{{state.selectedCount}}
All files from:{{state.path}}
-
-
{{type}}{{state.getTypeCount(type)}}Select
-
-
- - Concat overview - -

No file(s) selected

-
-
-
-
- {{state.selectedCount}} / {{state.selectedSize}} -
-
-
- -
- - Actions - - - - - - -
-
-
diff --git a/application/client/src/app/ui/tabs/observe/action.ts b/application/client/src/app/ui/tabs/observe/action.ts deleted file mode 100644 index a4beea8239..0000000000 --- a/application/client/src/app/ui/tabs/observe/action.ts +++ /dev/null @@ -1,50 +0,0 @@ -import { Subject, Subjects } from '@platform/env/subscription'; - -const DEFAULT_CAPTION = 'Run'; -const DEFAULT_STATE = false; - -export class Action { - public subjects: Subjects<{ - updated: Subject; - apply: Subject; - applied: Subject; - }> = new Subjects({ - updated: new Subject(), - apply: new Subject(), - applied: new Subject(), - }); - - public caption: string = DEFAULT_CAPTION; - public disabled: boolean = DEFAULT_STATE; - - public destroy(): void { - this.subjects.destroy(); - } - - public setCaption(caption: string): void { - this.caption = caption; - this.subjects.get().updated.emit(); - } - - public setDisabled(disabled: boolean): void { - if (this.disabled === disabled) { - return; - } - this.disabled = disabled; - this.subjects.get().updated.emit(); - } - - public defaults(): void { - this.caption = DEFAULT_CAPTION; - this.disabled = DEFAULT_STATE; - this.subjects.get().updated.emit(); - } - - public apply(): void { - this.subjects.get().apply.emit(); - } - - public applied(): void { - this.subjects.get().applied.emit(); - } -} diff --git a/application/client/src/app/ui/tabs/observe/component.ts b/application/client/src/app/ui/tabs/observe/component.ts deleted file mode 100644 index 813e864348..0000000000 --- a/application/client/src/app/ui/tabs/observe/component.ts +++ /dev/null @@ -1,47 +0,0 @@ -import { - Component, - ChangeDetectorRef, - ChangeDetectionStrategy, - Input, - AfterContentInit, - OnDestroy, -} from '@angular/core'; -import { Ilc, IlcInterface } from '@env/decorators/component'; -import { Initial } from '@env/decorators/initial'; -import { ChangesDetector } from '@ui/env/extentions/changes'; -import { State, IApi, IInputs } from './state'; -import { Observe } from '@platform/types/observe'; - -@Component({ - selector: 'app-tabs-observe', - templateUrl: './template.html', - styleUrls: ['./styles.less'], - changeDetection: ChangeDetectionStrategy.OnPush, - standalone: false, -}) -@Initial() -@Ilc() -export class TabObserve extends ChangesDetector implements AfterContentInit, OnDestroy { - // This method is used only to highlight inputs of component - static inputs(inputs: IInputs): IInputs { - return inputs; - } - - @Input() observe!: Observe; - @Input() api!: IApi; - - public state!: State; - - constructor(cdRef: ChangeDetectorRef) { - super(cdRef); - } - - public ngOnDestroy(): void { - this.state.destroy(); - } - - public ngAfterContentInit(): void { - this.state = new State(this, this.observe); - } -} -export interface TabObserve extends IlcInterface {} diff --git a/application/client/src/app/ui/tabs/observe/config-schema/component.ts b/application/client/src/app/ui/tabs/observe/config-schema/component.ts deleted file mode 100644 index e7340e3291..0000000000 --- a/application/client/src/app/ui/tabs/observe/config-schema/component.ts +++ /dev/null @@ -1,34 +0,0 @@ -import { Component, ChangeDetectorRef, Input, AfterContentInit } from '@angular/core'; -import { Ilc, IlcInterface } from '@env/decorators/component'; -import { Initial } from '@env/decorators/initial'; -import { ChangesDetector } from '@ui/env/extentions/changes'; -import { State } from './state'; -import { State as ParserState } from '../parsers/general/plugin/state'; - -@Component({ - selector: 'app-tab-config-schemas', - templateUrl: './template.html', - styleUrls: ['./styles.less'], - standalone: false, -}) -@Initial() -@Ilc() -export class ConfigSchemas extends ChangesDetector implements AfterContentInit { - @Input() parserState!: ParserState; - - public readonly state: State = new State(); - - constructor(cdRef: ChangeDetectorRef) { - super(cdRef); - } - - public ngAfterContentInit(): void { - this.env().subscriber.register( - this.parserState.selected.subscribe(() => { - this.state.reload(this.parserState); - }), - ); - } -} - -export interface ConfigSchemas extends IlcInterface {} diff --git a/application/client/src/app/ui/tabs/observe/config-schema/entry/component.ts b/application/client/src/app/ui/tabs/observe/config-schema/entry/component.ts deleted file mode 100644 index 4719e84c4e..0000000000 --- a/application/client/src/app/ui/tabs/observe/config-schema/entry/component.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { Component, ChangeDetectorRef, Input } from '@angular/core'; -import { ChangesDetector } from '@ui/env/extentions/changes'; -import { PluginConfigSchemaItem } from '@platform/types/bindings/plugins'; -import { State } from '../state'; - -@Component({ - selector: 'app-tabs-config-schema-entry', - templateUrl: './template.html', - styleUrls: ['./styles.less'], - standalone: false, -}) -export class ConfgiSchemaEntry extends ChangesDetector { - @Input() public config!: PluginConfigSchemaItem; - @Input() public state!: State; - - constructor(cdRef: ChangeDetectorRef) { - super(cdRef); - } -} diff --git a/application/client/src/app/ui/tabs/observe/config-schema/entry/styles.less b/application/client/src/app/ui/tabs/observe/config-schema/entry/styles.less deleted file mode 100644 index 3919c9833a..0000000000 --- a/application/client/src/app/ui/tabs/observe/config-schema/entry/styles.less +++ /dev/null @@ -1,6 +0,0 @@ -@import '../../../../styles/variables.less'; - -:host { - position: relative; - display: block; -} diff --git a/application/client/src/app/ui/tabs/observe/config-schema/entry/template.html b/application/client/src/app/ui/tabs/observe/config-schema/entry/template.html deleted file mode 100644 index e18cc543e9..0000000000 --- a/application/client/src/app/ui/tabs/observe/config-schema/entry/template.html +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - - - - - - - diff --git a/application/client/src/app/ui/tabs/observe/config-schema/module.ts b/application/client/src/app/ui/tabs/observe/config-schema/module.ts deleted file mode 100644 index d1e9030a11..0000000000 --- a/application/client/src/app/ui/tabs/observe/config-schema/module.ts +++ /dev/null @@ -1,63 +0,0 @@ -import { NgModule } from '@angular/core'; -import { CommonModule } from '@angular/common'; -import { FormsModule, ReactiveFormsModule } from '@angular/forms'; -import { MatCardModule } from '@angular/material/card'; -import { MatFormFieldModule } from '@angular/material/form-field'; -import { MatInputModule } from '@angular/material/input'; -import { MatCheckboxModule } from '@angular/material/checkbox'; -import { MatButtonModule } from '@angular/material/button'; -import { MatSelectModule } from '@angular/material/select'; -import { MatChipsModule } from '@angular/material/chips'; -import { MatIconModule } from '@angular/material/icon'; -import { MatDividerModule } from '@angular/material/divider'; - -import { ConfigSchemas } from './component'; -import { ConfgiSchemaEntry } from './entry/component'; -import { ConfigSchemaBool } from './renders/bool/component'; -import { ConfigSchemaInteger } from './renders/integer/component'; -import { ConfigSchemaFloat } from './renders/float/component'; -import { ConfigSchemaString } from './renders/string/component'; -import { ConfigSchemaDropdown } from './renders/dropdown/component'; -import { ConfigSchemaFiles } from './renders/files/component'; -import { ConfigSchemaDirs } from './renders/dirs/component'; - -@NgModule({ - imports: [ - CommonModule, - FormsModule, - ReactiveFormsModule, - MatCheckboxModule, - MatCardModule, - MatFormFieldModule, - MatInputModule, - MatButtonModule, - MatSelectModule, - MatChipsModule, - MatIconModule, - MatDividerModule, - ], - declarations: [ - ConfigSchemas, - ConfgiSchemaEntry, - ConfigSchemaBool, - ConfigSchemaInteger, - ConfigSchemaFloat, - ConfigSchemaString, - ConfigSchemaDropdown, - ConfigSchemaFiles, - ConfigSchemaDirs, - ], - exports: [ConfigSchemas], - bootstrap: [ - ConfigSchemas, - ConfgiSchemaEntry, - ConfigSchemaBool, - ConfigSchemaInteger, - ConfigSchemaFloat, - ConfigSchemaString, - ConfigSchemaDropdown, - ConfigSchemaFiles, - ConfigSchemaDirs, - ], -}) -export class ConfigSchmasModule {} diff --git a/application/client/src/app/ui/tabs/observe/config-schema/renders/bool/component.ts b/application/client/src/app/ui/tabs/observe/config-schema/renders/bool/component.ts deleted file mode 100644 index 029545a83f..0000000000 --- a/application/client/src/app/ui/tabs/observe/config-schema/renders/bool/component.ts +++ /dev/null @@ -1,32 +0,0 @@ -import { Component, ChangeDetectorRef, Input, SimpleChange, AfterContentInit } from '@angular/core'; -import { ChangesDetector } from '@ui/env/extentions/changes'; -import { PluginConfigSchemaItem } from '@platform/types/bindings/plugins'; -import { State } from '../../state'; - -@Component({ - selector: 'app-tabs-config-schema-bool', - templateUrl: './template.html', - styleUrls: ['./styles.less'], - standalone: false, -}) -export class ConfigSchemaBool extends ChangesDetector implements AfterContentInit { - @Input() public config!: PluginConfigSchemaItem; - @Input() public state!: State; - - public value?: boolean; - - constructor(cdRef: ChangeDetectorRef) { - super(cdRef); - } - - ngAfterContentInit(): void { - const input_type = this.config.input_type; - this.value = this.state.isBooleanItem(input_type) ? input_type.Boolean : false; - this.state.saveConfig(this.config.id, { Boolean: this.value }); - } - - public ngOnCheckboxChange(event: SimpleChange): void { - const val = event as unknown as boolean; - this.state.saveConfig(this.config.id, { Boolean: val }); - } -} diff --git a/application/client/src/app/ui/tabs/observe/config-schema/renders/bool/styles.less b/application/client/src/app/ui/tabs/observe/config-schema/renders/bool/styles.less deleted file mode 100644 index 3abbabe199..0000000000 --- a/application/client/src/app/ui/tabs/observe/config-schema/renders/bool/styles.less +++ /dev/null @@ -1 +0,0 @@ -@import '../../../../../styles/variables.less'; diff --git a/application/client/src/app/ui/tabs/observe/config-schema/renders/bool/template.html b/application/client/src/app/ui/tabs/observe/config-schema/renders/bool/template.html deleted file mode 100644 index 432b9b22a3..0000000000 --- a/application/client/src/app/ui/tabs/observe/config-schema/renders/bool/template.html +++ /dev/null @@ -1,9 +0,0 @@ - - {{config.title}} - -

{{config.description}}

diff --git a/application/client/src/app/ui/tabs/observe/config-schema/renders/dirs/component.ts b/application/client/src/app/ui/tabs/observe/config-schema/renders/dirs/component.ts deleted file mode 100644 index c50d7e7ae6..0000000000 --- a/application/client/src/app/ui/tabs/observe/config-schema/renders/dirs/component.ts +++ /dev/null @@ -1,55 +0,0 @@ -import { Component, ChangeDetectorRef, Input, AfterContentInit } from '@angular/core'; -import { ChangesDetector } from '@ui/env/extentions/changes'; -import { PluginConfigSchemaItem } from '@platform/types/bindings'; -import { State } from '../../state'; -import { bridge } from '@service/bridge'; - -@Component({ - selector: 'app-tabs-config-schema-dirs', - templateUrl: './template.html', - styleUrls: ['./styles.less'], - standalone: false, -}) -export class ConfigSchemaDirs extends ChangesDetector implements AfterContentInit { - @Input() public config!: PluginConfigSchemaItem; - @Input() public state!: State; - - public paths: string[] = []; - - constructor(cdRef: ChangeDetectorRef) { - super(cdRef); - } - - public ngOnAddButtonkclick(): void { - bridge - .folders() - .select() - .then((dirs: string[]) => { - dirs = dirs.filter((added) => { - return this.paths.find((exist) => exist === added) === undefined; - }); - this.paths = this.paths.concat(dirs); - }) - .catch((err: Error) => { - console.error(`Error while opening folders: ${err.message}`); - }) - .finally(() => { - this.update(); - this.detectChanges(); - }); - } - - ngAfterContentInit(): void { - this.update(); - } - - public ngOnRemovePath(dir: string): void { - this.paths = this.paths.filter((f) => f !== dir); - this.update(); - this.detectChanges(); - } - - update(): void { - this.state.saveConfig(this.config.id, { Directories: this.paths }); - } -} diff --git a/application/client/src/app/ui/tabs/observe/config-schema/renders/dirs/styles.less b/application/client/src/app/ui/tabs/observe/config-schema/renders/dirs/styles.less deleted file mode 100644 index 2d749f42f6..0000000000 --- a/application/client/src/app/ui/tabs/observe/config-schema/renders/dirs/styles.less +++ /dev/null @@ -1,27 +0,0 @@ -@import '../../../../../styles/variables.less'; -:host { - & mat-form-field { - display: block; - } - & div.controlls { - text-align: right; - } - & button { - position: relative; - display: inline-block; - margin: 6px 0 6px 6px; - } - & .chip-listbox { - display: flex; - flex-wrap: wrap; - gap: 8px; - } - & .chip-path { - max-width: 220px; /* Set a fixed width */ - overflow: hidden; /* Hide overflowing content */ - white-space: nowrap; /* Prevent text wrapping */ - direction: rtl; /* Align text to the right */ - text-overflow: ellipsis; /* Show ellipsis at the start */ - text-align: left; /* Ensure the visible part of the text is left-aligned */ - } -} diff --git a/application/client/src/app/ui/tabs/observe/config-schema/renders/dirs/template.html b/application/client/src/app/ui/tabs/observe/config-schema/renders/dirs/template.html deleted file mode 100644 index 813e81934c..0000000000 --- a/application/client/src/app/ui/tabs/observe/config-schema/renders/dirs/template.html +++ /dev/null @@ -1,23 +0,0 @@ -

{{config.title}}

-
- - -

{{ path }}

- -
-
-
- -
- -
-

{{config.description}}

diff --git a/application/client/src/app/ui/tabs/observe/config-schema/renders/dropdown/component.ts b/application/client/src/app/ui/tabs/observe/config-schema/renders/dropdown/component.ts deleted file mode 100644 index 82f444c341..0000000000 --- a/application/client/src/app/ui/tabs/observe/config-schema/renders/dropdown/component.ts +++ /dev/null @@ -1,47 +0,0 @@ -import { - Component, - ChangeDetectorRef, - Input, - AfterContentInit, - SimpleChanges, -} from '@angular/core'; -import { ChangesDetector } from '@ui/env/extentions/changes'; -import { PluginConfigSchemaItem } from '@platform/types/bindings'; -import { State } from '../../state'; - -@Component({ - selector: 'app-tabs-config-schema-dropdown', - templateUrl: './template.html', - styleUrls: ['./styles.less'], - standalone: false, -}) -export class ConfigSchemaDropdown extends ChangesDetector implements AfterContentInit { - @Input() public config!: PluginConfigSchemaItem; - @Input() public state!: State; - - public selectedOption?: string; - public allOptions?: string[]; - - constructor(cdRef: ChangeDetectorRef) { - super(cdRef); - } - - ngAfterContentInit(): void { - const input_type = this.config.input_type; - if (this.state.isDropdownItem(input_type)) { - this.allOptions = input_type.Dropdown[0]; - this.selectedOption = input_type.Dropdown[1]; - - this.state.saveConfig(this.config.id, { - Dropdown: this.selectedOption, - }); - } - } - - public ngOnSelectionChange(event: SimpleChanges): void { - const opt = event as unknown as string; - this.state.saveConfig(this.config.id, { - Dropdown: opt, - }); - } -} diff --git a/application/client/src/app/ui/tabs/observe/config-schema/renders/dropdown/styles.less b/application/client/src/app/ui/tabs/observe/config-schema/renders/dropdown/styles.less deleted file mode 100644 index a77a7220b1..0000000000 --- a/application/client/src/app/ui/tabs/observe/config-schema/renders/dropdown/styles.less +++ /dev/null @@ -1,7 +0,0 @@ -@import '../../../../../styles/variables.less'; - -:host { - & mat-form-field { - display: block; - } -} diff --git a/application/client/src/app/ui/tabs/observe/config-schema/renders/dropdown/template.html b/application/client/src/app/ui/tabs/observe/config-schema/renders/dropdown/template.html deleted file mode 100644 index 2f43bba2b7..0000000000 --- a/application/client/src/app/ui/tabs/observe/config-schema/renders/dropdown/template.html +++ /dev/null @@ -1,7 +0,0 @@ - - {{config.title}} - - {{option}} - - {{config.description}} - diff --git a/application/client/src/app/ui/tabs/observe/config-schema/renders/files/component.ts b/application/client/src/app/ui/tabs/observe/config-schema/renders/files/component.ts deleted file mode 100644 index f1a5abb640..0000000000 --- a/application/client/src/app/ui/tabs/observe/config-schema/renders/files/component.ts +++ /dev/null @@ -1,65 +0,0 @@ -import { Component, ChangeDetectorRef, Input, AfterContentInit } from '@angular/core'; -import { ChangesDetector } from '@ui/env/extentions/changes'; -import { PluginConfigSchemaItem } from '@platform/types/bindings'; -import { State } from '../../state'; -import { File } from '@platform/types/files'; -import { bridge } from '@service/bridge'; - -@Component({ - selector: 'app-tabs-config-schema-files', - templateUrl: './template.html', - styleUrls: ['./styles.less'], - standalone: false, -}) -export class ConfigSchemaFiles extends ChangesDetector implements AfterContentInit { - @Input() public config!: PluginConfigSchemaItem; - @Input() public state!: State; - - public paths: File[] = []; - - constructor(cdRef: ChangeDetectorRef) { - super(cdRef); - } - - public ngOnAddButtonkclick(): void { - const inputType = this.config.input_type; - const exts = - typeof inputType === 'object' && 'Files' in inputType && inputType.Files.length > 0 - ? inputType.Files.join(',') - : '*'; - bridge - .files() - .select.custom(exts) - .then((files: File[]) => { - files = files.filter((added) => { - return ( - this.paths.find((exist) => exist.filename === added.filename) === undefined - ); - }); - this.paths = this.paths.concat(files); - }) - - .catch((err: Error) => { - console.error(`Error while opening folders: ${err.message}`); - }) - .finally(() => { - this.update(); - this.detectChanges(); - }); - } - - ngAfterContentInit(): void { - this.update(); - } - - public ngOnRemovePath(file: File): void { - this.paths = this.paths.filter((f) => f.filename !== file.filename); - this.update(); - this.detectChanges(); - } - - update(): void { - const files = this.paths.map((p) => p.filename); - this.state.saveConfig(this.config.id, { Files: files }); - } -} diff --git a/application/client/src/app/ui/tabs/observe/config-schema/renders/files/styles.less b/application/client/src/app/ui/tabs/observe/config-schema/renders/files/styles.less deleted file mode 100644 index 39952dc702..0000000000 --- a/application/client/src/app/ui/tabs/observe/config-schema/renders/files/styles.less +++ /dev/null @@ -1,14 +0,0 @@ -@import '../../../../../styles/variables.less'; -:host { - & mat-form-field { - display: block; - } - & div.controlls { - text-align: right; - } - & button { - position: relative; - display: inline-block; - margin: 6px 0 6px 6px; - } -} diff --git a/application/client/src/app/ui/tabs/observe/config-schema/renders/files/template.html b/application/client/src/app/ui/tabs/observe/config-schema/renders/files/template.html deleted file mode 100644 index 92dc2a7fb7..0000000000 --- a/application/client/src/app/ui/tabs/observe/config-schema/renders/files/template.html +++ /dev/null @@ -1,19 +0,0 @@ -

{{config.title}}

-
- - - {{path.name}} - - - -
- -
- -
-

{{config.description}}

diff --git a/application/client/src/app/ui/tabs/observe/config-schema/renders/float/component.ts b/application/client/src/app/ui/tabs/observe/config-schema/renders/float/component.ts deleted file mode 100644 index 262c53b3a1..0000000000 --- a/application/client/src/app/ui/tabs/observe/config-schema/renders/float/component.ts +++ /dev/null @@ -1,53 +0,0 @@ -import { - Component, - ChangeDetectorRef, - Input, - AfterContentInit, - OnChanges, - SimpleChanges, -} from '@angular/core'; - -import { ChangesDetector } from '@ui/env/extentions/changes'; -import { PluginConfigSchemaItem } from '@platform/types/bindings'; -import { State } from '../../state'; - -@Component({ - selector: 'app-tabs-config-schema-float', - templateUrl: './template.html', - styleUrls: ['./styles.less'], - standalone: false, -}) -export class ConfigSchemaFloat extends ChangesDetector implements AfterContentInit, OnChanges { - @Input() public config!: PluginConfigSchemaItem; - @Input() public state!: State; - - public value?: number; - - constructor(cdRef: ChangeDetectorRef) { - super(cdRef); - } - - ngOnChanges(changes: SimpleChanges): void { - if (changes['value']) { - this.state.saveConfig(this.config.id, { - Float: parseFloat(changes['value'].currentValue), - }); - } - } - - ngAfterContentInit(): void { - const input_type = this.config.input_type; - - this.value = this.state.isFloatItem(input_type) ? input_type.Float : 0.0; - this.state.saveConfig(this.config.id, { - Float: this.value, - }); - } - - ngOnInputChange(event: Event): void { - const target = event.target as HTMLInputElement; - if (target) { - this.state.saveConfig(this.config.id, { Float: parseFloat(target.value) }); - } - } -} diff --git a/application/client/src/app/ui/tabs/observe/config-schema/renders/float/styles.less b/application/client/src/app/ui/tabs/observe/config-schema/renders/float/styles.less deleted file mode 100644 index 873d484f6b..0000000000 --- a/application/client/src/app/ui/tabs/observe/config-schema/renders/float/styles.less +++ /dev/null @@ -1,12 +0,0 @@ -@import '../../../../../styles/variables.less'; - -:host { - & mat-form-field { - display: block; - } - & input::-webkit-outer-spin-button, - & input::-webkit-inner-spin-button { - -webkit-appearance: none; - margin: 0; - } -} diff --git a/application/client/src/app/ui/tabs/observe/config-schema/renders/float/template.html b/application/client/src/app/ui/tabs/observe/config-schema/renders/float/template.html deleted file mode 100644 index 6b510c4ac6..0000000000 --- a/application/client/src/app/ui/tabs/observe/config-schema/renders/float/template.html +++ /dev/null @@ -1,11 +0,0 @@ - - {{config.title}} - - {{config.description}} - diff --git a/application/client/src/app/ui/tabs/observe/config-schema/renders/integer/component.ts b/application/client/src/app/ui/tabs/observe/config-schema/renders/integer/component.ts deleted file mode 100644 index 6b1180a1f5..0000000000 --- a/application/client/src/app/ui/tabs/observe/config-schema/renders/integer/component.ts +++ /dev/null @@ -1,49 +0,0 @@ -import { - Component, - ChangeDetectorRef, - Input, - AfterContentInit, - OnChanges, - SimpleChanges, -} from '@angular/core'; -import { ChangesDetector } from '@ui/env/extentions/changes'; -import { PluginConfigSchemaItem } from '@platform/types/bindings'; -import { State } from '../../state'; - -@Component({ - selector: 'app-tabs-config-schema-integer', - templateUrl: './template.html', - styleUrls: ['./styles.less'], - standalone: false, -}) -export class ConfigSchemaInteger extends ChangesDetector implements AfterContentInit, OnChanges { - @Input() public config!: PluginConfigSchemaItem; - @Input() public state!: State; - - public value?: number; - - constructor(cdRef: ChangeDetectorRef) { - super(cdRef); - } - - ngOnChanges(changes: SimpleChanges): void { - if (changes['value']) { - this.state.saveConfig(this.config.id, { - Integer: parseInt(changes['value'].currentValue, 10), - }); - } - } - - ngAfterContentInit(): void { - const input_type = this.config.input_type; - this.value = this.state.isIntegerItem(input_type) ? input_type.Integer : 0; - this.state.saveConfig(this.config.id, { Integer: this.value }); - } - - public ngOnInputChange(event: Event): void { - const target = event.target as HTMLInputElement; - if (target) { - this.state.saveConfig(this.config.id, { Integer: parseInt(target.value, 10) }); - } - } -} diff --git a/application/client/src/app/ui/tabs/observe/config-schema/renders/integer/styles.less b/application/client/src/app/ui/tabs/observe/config-schema/renders/integer/styles.less deleted file mode 100644 index 873d484f6b..0000000000 --- a/application/client/src/app/ui/tabs/observe/config-schema/renders/integer/styles.less +++ /dev/null @@ -1,12 +0,0 @@ -@import '../../../../../styles/variables.less'; - -:host { - & mat-form-field { - display: block; - } - & input::-webkit-outer-spin-button, - & input::-webkit-inner-spin-button { - -webkit-appearance: none; - margin: 0; - } -} diff --git a/application/client/src/app/ui/tabs/observe/config-schema/renders/integer/template.html b/application/client/src/app/ui/tabs/observe/config-schema/renders/integer/template.html deleted file mode 100644 index 6b510c4ac6..0000000000 --- a/application/client/src/app/ui/tabs/observe/config-schema/renders/integer/template.html +++ /dev/null @@ -1,11 +0,0 @@ - - {{config.title}} - - {{config.description}} - diff --git a/application/client/src/app/ui/tabs/observe/config-schema/renders/string/component.ts b/application/client/src/app/ui/tabs/observe/config-schema/renders/string/component.ts deleted file mode 100644 index 321e1a88dc..0000000000 --- a/application/client/src/app/ui/tabs/observe/config-schema/renders/string/component.ts +++ /dev/null @@ -1,47 +0,0 @@ -import { - Component, - ChangeDetectorRef, - Input, - AfterContentInit, - OnChanges, - SimpleChanges, -} from '@angular/core'; -import { ChangesDetector } from '@ui/env/extentions/changes'; -import { PluginConfigSchemaItem } from '@platform/types/bindings/plugins'; -import { State } from '../../state'; - -@Component({ - selector: 'app-tabs-config-schema-string', - templateUrl: './template.html', - styleUrls: ['./styles.less'], - standalone: false, -}) -export class ConfigSchemaString extends ChangesDetector implements AfterContentInit, OnChanges { - @Input() public config!: PluginConfigSchemaItem; - @Input() public state!: State; - - public value?: string; - - constructor(cdRef: ChangeDetectorRef) { - super(cdRef); - } - - ngOnChanges(changes: SimpleChanges): void { - if (changes['value']) { - this.state.saveConfig(this.config.id, { - Text: changes['value'].currentValue, - }); - } - } - - ngAfterContentInit(): void { - const input_type = this.config.input_type; - this.value = this.state.isTextItem(input_type) ? input_type.Text : ''; - this.state.saveConfig(this.config.id, { Text: this.value }); - } - - public ngOnInputChange(event: Event): void { - const target = event.target as HTMLInputElement; - this.state.saveConfig(this.config.id, { Text: target?.value ?? '' }); - } -} diff --git a/application/client/src/app/ui/tabs/observe/config-schema/renders/string/styles.less b/application/client/src/app/ui/tabs/observe/config-schema/renders/string/styles.less deleted file mode 100644 index a77a7220b1..0000000000 --- a/application/client/src/app/ui/tabs/observe/config-schema/renders/string/styles.less +++ /dev/null @@ -1,7 +0,0 @@ -@import '../../../../../styles/variables.less'; - -:host { - & mat-form-field { - display: block; - } -} diff --git a/application/client/src/app/ui/tabs/observe/config-schema/renders/string/template.html b/application/client/src/app/ui/tabs/observe/config-schema/renders/string/template.html deleted file mode 100644 index 01ce426b67..0000000000 --- a/application/client/src/app/ui/tabs/observe/config-schema/renders/string/template.html +++ /dev/null @@ -1,10 +0,0 @@ - - {{config.title}} - - {{config.description}} - diff --git a/application/client/src/app/ui/tabs/observe/config-schema/state.ts b/application/client/src/app/ui/tabs/observe/config-schema/state.ts deleted file mode 100644 index 7a1af2d44a..0000000000 --- a/application/client/src/app/ui/tabs/observe/config-schema/state.ts +++ /dev/null @@ -1,52 +0,0 @@ -import { - PluginConfigSchemaItem, - PluginConfigSchemaType, - PluginConfigValue, -} from '@platform/types/bindings/plugins'; - -import { State as ParserState } from '../parsers/general/plugin/state'; - -export class State { - private _parserState?: ParserState; - - public schemas: PluginConfigSchemaItem[] = []; - - public reload(parent: ParserState) { - this.schemas = parent.selectedParser?.info.config_schemas ?? []; - this._parserState = parent; - } - - public saveConfig(id: string, value: PluginConfigValue) { - this._parserState?.saveConfig(id, value); - } - - public isBooleanItem(schema: PluginConfigSchemaType): schema is { Boolean: boolean } { - return typeof schema === 'object' && 'Boolean' in schema; - } - - public isIntegerItem(schema: PluginConfigSchemaType): schema is { Integer: number } { - return typeof schema === 'object' && 'Integer' in schema; - } - - public isFloatItem(schema: PluginConfigSchemaType): schema is { Float: number } { - return typeof schema === 'object' && 'Float' in schema; - } - - public isTextItem(schema: PluginConfigSchemaType): schema is { Text: string } { - return typeof schema === 'object' && 'Text' in schema; - } - - public isDirectoriesItem(schema: PluginConfigSchemaType): schema is 'Directories' { - return schema === 'Directories'; - } - - public isDropdownItem( - schema: PluginConfigSchemaType, - ): schema is { Dropdown: [Array, string] } { - return typeof schema === 'object' && 'Dropdown' in schema; - } - - public isFilesPicker(schema: PluginConfigSchemaType): schema is { Files: Array } { - return typeof schema === 'object' && 'Files' in schema; - } -} diff --git a/application/client/src/app/ui/tabs/observe/config-schema/styles.less b/application/client/src/app/ui/tabs/observe/config-schema/styles.less deleted file mode 100644 index b372fafb5e..0000000000 --- a/application/client/src/app/ui/tabs/observe/config-schema/styles.less +++ /dev/null @@ -1,10 +0,0 @@ -@import '../../../styles/variables.less'; - -:host { - position: relative; - display: block; -} - -.itemspadding { - padding-bottom: 20px; -} diff --git a/application/client/src/app/ui/tabs/observe/config-schema/template.html b/application/client/src/app/ui/tabs/observe/config-schema/template.html deleted file mode 100644 index 8438e44a78..0000000000 --- a/application/client/src/app/ui/tabs/observe/config-schema/template.html +++ /dev/null @@ -1,6 +0,0 @@ - diff --git a/application/client/src/app/ui/tabs/observe/error/component.ts b/application/client/src/app/ui/tabs/observe/error/component.ts deleted file mode 100644 index 529738611c..0000000000 --- a/application/client/src/app/ui/tabs/observe/error/component.ts +++ /dev/null @@ -1,34 +0,0 @@ -import { Component, ChangeDetectorRef, Input, AfterContentInit } from '@angular/core'; -import { Ilc, IlcInterface } from '@env/decorators/component'; -import { Initial } from '@env/decorators/initial'; -import { ChangesDetector } from '@ui/env/extentions/changes'; -import { Observe } from '@platform/types/observe'; - -@Component({ - selector: 'app-tabs-observe-error-state', - templateUrl: './template.html', - styleUrls: ['./styles.less'], - standalone: false, -}) -@Initial() -@Ilc() -export class TabObserveErrorState extends ChangesDetector implements AfterContentInit { - @Input() observe!: Observe; - - public error: string | undefined; - - constructor(cdRef: ChangeDetectorRef) { - super(cdRef); - } - - public ngAfterContentInit(): void { - this.env().subscriber.register( - this.observe.subscribe(() => { - const error = this.observe.validate(); - this.error = error instanceof Error ? error.message : undefined; - this.detectChanges(); - }), - ); - } -} -export interface TabObserveErrorState extends IlcInterface {} diff --git a/application/client/src/app/ui/tabs/observe/error/module.ts b/application/client/src/app/ui/tabs/observe/error/module.ts deleted file mode 100644 index 55fc1bf05e..0000000000 --- a/application/client/src/app/ui/tabs/observe/error/module.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { NgModule } from '@angular/core'; -import { CommonModule } from '@angular/common'; -import { MatCardModule } from '@angular/material/card'; - -import { TabObserveErrorState } from './component'; - -@NgModule({ - imports: [CommonModule, MatCardModule], - declarations: [TabObserveErrorState], - exports: [TabObserveErrorState], - bootstrap: [TabObserveErrorState], -}) -export class ErrorStateModule {} diff --git a/application/client/src/app/ui/tabs/observe/error/styles.less b/application/client/src/app/ui/tabs/observe/error/styles.less deleted file mode 100644 index f3d8b743a2..0000000000 --- a/application/client/src/app/ui/tabs/observe/error/styles.less +++ /dev/null @@ -1,14 +0,0 @@ -@import '../../../styles/variables.less'; - - -:host { - position: relative; - display: block; - top: 0; - left: 0; - width: 100%; - overflow: hidden; - & p.error { - color: var(--scheme-color-error-light); - } -} \ No newline at end of file diff --git a/application/client/src/app/ui/tabs/observe/error/template.html b/application/client/src/app/ui/tabs/observe/error/template.html deleted file mode 100644 index defc7f64f1..0000000000 --- a/application/client/src/app/ui/tabs/observe/error/template.html +++ /dev/null @@ -1,6 +0,0 @@ - - Error(s) - -

{{error}}

-
-
\ No newline at end of file diff --git a/application/client/src/app/ui/tabs/observe/module.ts b/application/client/src/app/ui/tabs/observe/module.ts deleted file mode 100644 index cf01954940..0000000000 --- a/application/client/src/app/ui/tabs/observe/module.ts +++ /dev/null @@ -1,30 +0,0 @@ -import { NgModule } from '@angular/core'; -import { CommonModule } from '@angular/common'; -import { FormsModule, ReactiveFormsModule } from '@angular/forms'; -import { MatButtonModule } from '@angular/material/button'; -import { MatFormFieldModule } from '@angular/material/form-field'; -import { MatSelectModule } from '@angular/material/select'; - -import { FileModule } from './origin/file/module'; -import { ConcatModule } from './origin/concat/module'; -import { StreamModule } from './origin/stream/module'; - -import { TabObserve } from './component'; - -@NgModule({ - imports: [ - CommonModule, - FormsModule, - ReactiveFormsModule, - MatButtonModule, - MatFormFieldModule, - MatSelectModule, - FileModule, - ConcatModule, - StreamModule, - ], - declarations: [TabObserve], - exports: [TabObserve], - bootstrap: [TabObserve], -}) -export class ObserveModule {} diff --git a/application/client/src/app/ui/tabs/observe/origin/concat/component.ts b/application/client/src/app/ui/tabs/observe/origin/concat/component.ts deleted file mode 100644 index 0b9946a465..0000000000 --- a/application/client/src/app/ui/tabs/observe/origin/concat/component.ts +++ /dev/null @@ -1,58 +0,0 @@ -import { - Component, - ChangeDetectorRef, - AfterViewInit, - Input, - AfterContentInit, -} from '@angular/core'; -import { Ilc, IlcInterface } from '@env/decorators/component'; -import { Initial } from '@env/decorators/initial'; -import { ChangesDetector } from '@ui/env/extentions/changes'; -import { State } from '../../state'; -import { State as ParserState } from '@ui/tabs/observe/parsers/state'; - -import * as Origins from '@platform/types/observe/origin/index'; -import * as Parsers from '@platform/types/observe/parser/index'; -@Component({ - selector: 'app-tabs-observe-concat', - templateUrl: './template.html', - styleUrls: ['./styles.less'], - standalone: false, -}) -@Initial() -@Ilc() -export class TabObserveConcat extends ChangesDetector implements AfterViewInit, AfterContentInit { - @Input() state!: State; - - public parser!: ParserState; - - constructor(cdRef: ChangeDetectorRef) { - super(cdRef); - } - - public ngAfterContentInit(): void { - const origin = this.state.observe.origin.as( - Origins.Concat.Configuration, - ); - if (origin === undefined) { - throw new Error(`Current origin isn't a stream`); - } - this.parser = new ParserState(this.state.observe); - this.env().subscriber.register( - this.state.updates.get().parser.subscribe(() => { - const parser = this.state.getParser().embedded(); - if (parser === undefined) { - return; - } - this.state.observe.parser.overwrite({ - [parser]: Parsers.getByAlias(parser).configuration, - }); - }), - ); - } - - public ngAfterViewInit(): void { - // - } -} -export interface TabObserveConcat extends IlcInterface {} diff --git a/application/client/src/app/ui/tabs/observe/origin/concat/module.ts b/application/client/src/app/ui/tabs/observe/origin/concat/module.ts deleted file mode 100644 index c8521eed1d..0000000000 --- a/application/client/src/app/ui/tabs/observe/origin/concat/module.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { NgModule } from '@angular/core'; -import { CommonModule } from '@angular/common'; -import { MatCardModule } from '@angular/material/card'; -import { ParserGeneralConfigurationModule } from '@ui/tabs/observe/parsers/general/module'; -import { ParserExtraConfigurationModule } from '@ui/tabs/observe/parsers/extra/module'; - -import { TabObserveConcat } from './component'; - -@NgModule({ - imports: [ - CommonModule, - MatCardModule, - ParserGeneralConfigurationModule, - ParserExtraConfigurationModule, - ], - declarations: [TabObserveConcat], - exports: [TabObserveConcat], - bootstrap: [TabObserveConcat], -}) -export class ConcatModule {} diff --git a/application/client/src/app/ui/tabs/observe/origin/concat/styles.less b/application/client/src/app/ui/tabs/observe/origin/concat/styles.less deleted file mode 100644 index 7066106ca8..0000000000 --- a/application/client/src/app/ui/tabs/observe/origin/concat/styles.less +++ /dev/null @@ -1,37 +0,0 @@ -@import '../../../../styles/variables.less'; - - -:host { - position: absolute; - display: block; - top: 0; - left: 0; - width: 100%; - height: 100%; - overflow: hidden; - & div.title { - position: absolute; - display: flex; - flex-direction: row; - align-items: center; - left:0; - right: 0; - padding: 0 8px; - background: var(--scheme-color-5); - box-shadow: 0 3px 3px rgba(0,0,0,0.4); - height: 32px; - overflow: hidden; - & > * { - margin: 0 8px; - } - span.filler { - flex:auto; - width: 100%; - margin: 0; - } - p.info { - color: var(--scheme-color-1); - white-space: nowrap; - } - } -} \ No newline at end of file diff --git a/application/client/src/app/ui/tabs/observe/origin/concat/template.html b/application/client/src/app/ui/tabs/observe/origin/concat/template.html deleted file mode 100644 index 19eafb4b94..0000000000 --- a/application/client/src/app/ui/tabs/observe/origin/concat/template.html +++ /dev/null @@ -1,6 +0,0 @@ -
- -
-
- -
diff --git a/application/client/src/app/ui/tabs/observe/origin/file/component.ts b/application/client/src/app/ui/tabs/observe/origin/file/component.ts deleted file mode 100644 index 970234317c..0000000000 --- a/application/client/src/app/ui/tabs/observe/origin/file/component.ts +++ /dev/null @@ -1,58 +0,0 @@ -import { - Component, - ChangeDetectorRef, - AfterViewInit, - Input, - AfterContentInit, -} from '@angular/core'; -import { Ilc, IlcInterface } from '@env/decorators/component'; -import { Initial } from '@env/decorators/initial'; -import { ChangesDetector } from '@ui/env/extentions/changes'; -import { State } from '../../state'; -import { State as ParserState } from '@ui/tabs/observe/parsers/state'; - -import * as Origins from '@platform/types/observe/origin/index'; -import * as Parsers from '@platform/types/observe/parser/index'; -@Component({ - selector: 'app-tabs-observe-file', - templateUrl: './template.html', - styleUrls: ['./styles.less'], - standalone: false, -}) -@Initial() -@Ilc() -export class TabObserveFile extends ChangesDetector implements AfterViewInit, AfterContentInit { - @Input() state!: State; - - public parser!: ParserState; - - constructor(cdRef: ChangeDetectorRef) { - super(cdRef); - } - - public ngAfterContentInit(): void { - const origin = this.state.observe.origin.as( - Origins.File.Configuration, - ); - if (origin === undefined) { - throw new Error(`Current origin isn't a stream`); - } - this.parser = new ParserState(this.state.observe); - this.env().subscriber.register( - this.state.updates.get().parser.subscribe(() => { - const parser = this.state.getParser().embedded(); - if (parser === undefined) { - return; - } - this.state.observe.parser.overwrite({ - [parser]: Parsers.getByAlias(parser).configuration, - }); - }), - ); - } - - public ngAfterViewInit(): void { - // - } -} -export interface TabObserveFile extends IlcInterface {} diff --git a/application/client/src/app/ui/tabs/observe/origin/file/module.ts b/application/client/src/app/ui/tabs/observe/origin/file/module.ts deleted file mode 100644 index 12d44af104..0000000000 --- a/application/client/src/app/ui/tabs/observe/origin/file/module.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { NgModule } from '@angular/core'; -import { CommonModule } from '@angular/common'; -import { MatCardModule } from '@angular/material/card'; -import { ParserGeneralConfigurationModule } from '@ui/tabs/observe/parsers/general/module'; -import { ParserExtraConfigurationModule } from '@ui/tabs/observe/parsers/extra/module'; - -import { TabObserveFile } from './component'; - -@NgModule({ - imports: [ - CommonModule, - MatCardModule, - ParserGeneralConfigurationModule, - ParserExtraConfigurationModule, - ], - declarations: [TabObserveFile], - exports: [TabObserveFile], - bootstrap: [TabObserveFile], -}) -export class FileModule {} diff --git a/application/client/src/app/ui/tabs/observe/origin/file/styles.less b/application/client/src/app/ui/tabs/observe/origin/file/styles.less deleted file mode 100644 index a4b66d866b..0000000000 --- a/application/client/src/app/ui/tabs/observe/origin/file/styles.less +++ /dev/null @@ -1,12 +0,0 @@ -@import '../../../../styles/variables.less'; - - -:host { - position: absolute; - display: block; - top: 0; - left: 0; - width: 100%; - height: 100%; - overflow: hidden; -} \ No newline at end of file diff --git a/application/client/src/app/ui/tabs/observe/origin/file/template.html b/application/client/src/app/ui/tabs/observe/origin/file/template.html deleted file mode 100644 index 19eafb4b94..0000000000 --- a/application/client/src/app/ui/tabs/observe/origin/file/template.html +++ /dev/null @@ -1,6 +0,0 @@ -
- -
-
- -
diff --git a/application/client/src/app/ui/tabs/observe/origin/stream/component.ts b/application/client/src/app/ui/tabs/observe/origin/stream/component.ts deleted file mode 100644 index 40a8d6c5b3..0000000000 --- a/application/client/src/app/ui/tabs/observe/origin/stream/component.ts +++ /dev/null @@ -1,60 +0,0 @@ -import { Component, ChangeDetectorRef, Input, AfterContentInit } from '@angular/core'; -import { Ilc, IlcInterface } from '@env/decorators/component'; -import { Initial } from '@env/decorators/initial'; -import { ChangesDetector } from '@ui/env/extentions/changes'; -import { State } from '../../state'; -import { State as StreamState } from './transport/setup/state'; -import { State as ParserState } from '@ui/tabs/observe/parsers/state'; - -import * as Streams from '@platform/types/observe/origin/stream/index'; -import * as Origins from '@platform/types/observe/origin/index'; -import * as Parsers from '@platform/types/observe/parser/index'; - -@Component({ - selector: 'app-tabs-observe-stream', - templateUrl: './template.html', - styleUrls: ['./styles.less'], - standalone: false, -}) -@Initial() -@Ilc() -export class TabObserveStream extends ChangesDetector implements AfterContentInit { - @Input() state!: State; - - public stream!: StreamState; - public parser!: ParserState; - - constructor(cdRef: ChangeDetectorRef) { - super(cdRef); - } - - public ngAfterContentInit(): void { - const origin = this.state.observe.origin.as( - Origins.Stream.Configuration, - ); - if (origin === undefined) { - throw new Error(`Current origin isn't a stream`); - } - this.stream = new StreamState(this.state.action, origin.instance); - this.parser = new ParserState(this.state.observe); - this.env().subscriber.register( - this.state.updates.get().stream.subscribe(() => { - const stream = this.state.stream; - if (stream === undefined) { - return; - } - this.stream.from({ [stream]: Streams.getByAlias(stream).configuration }); - }), - this.state.updates.get().parser.subscribe(() => { - const parser = this.state.getParser().embedded(); - if (parser === undefined) { - return; - } - this.state.observe.parser.overwrite({ - [parser]: Parsers.getByAlias(parser).configuration, - }); - }), - ); - } -} -export interface TabObserveStream extends IlcInterface {} diff --git a/application/client/src/app/ui/tabs/observe/origin/stream/module.ts b/application/client/src/app/ui/tabs/observe/origin/stream/module.ts deleted file mode 100644 index cf58383024..0000000000 --- a/application/client/src/app/ui/tabs/observe/origin/stream/module.ts +++ /dev/null @@ -1,22 +0,0 @@ -import { NgModule } from '@angular/core'; -import { CommonModule } from '@angular/common'; -import { MatCardModule } from '@angular/material/card'; - -import { TabObserveStream } from './component'; -import { StreamsModule } from './transport/setup/module'; -import { ParserGeneralConfigurationModule } from '@ui/tabs/observe/parsers/general/module'; -import { RecentActionsModule } from '@elements/recent/module'; - -@NgModule({ - imports: [ - CommonModule, - MatCardModule, - StreamsModule, - ParserGeneralConfigurationModule, - RecentActionsModule, - ], - declarations: [TabObserveStream], - exports: [TabObserveStream], - bootstrap: [TabObserveStream], -}) -export class StreamModule {} diff --git a/application/client/src/app/ui/tabs/observe/origin/stream/styles.less b/application/client/src/app/ui/tabs/observe/origin/stream/styles.less deleted file mode 100644 index a4b66d866b..0000000000 --- a/application/client/src/app/ui/tabs/observe/origin/stream/styles.less +++ /dev/null @@ -1,12 +0,0 @@ -@import '../../../../styles/variables.less'; - - -:host { - position: absolute; - display: block; - top: 0; - left: 0; - width: 100%; - height: 100%; - overflow: hidden; -} \ No newline at end of file diff --git a/application/client/src/app/ui/tabs/observe/origin/stream/template.html b/application/client/src/app/ui/tabs/observe/origin/stream/template.html deleted file mode 100644 index 12f9c26228..0000000000 --- a/application/client/src/app/ui/tabs/observe/origin/stream/template.html +++ /dev/null @@ -1,17 +0,0 @@ -
- - Connection - - - - - - Recent - - - - -
-
- -
diff --git a/application/client/src/app/ui/tabs/observe/origin/stream/transport/listed/component.ts b/application/client/src/app/ui/tabs/observe/origin/stream/transport/listed/component.ts deleted file mode 100644 index 676a432b2f..0000000000 --- a/application/client/src/app/ui/tabs/observe/origin/stream/transport/listed/component.ts +++ /dev/null @@ -1,130 +0,0 @@ -import { Component, ChangeDetectorRef, Input, AfterContentInit, HostListener } from '@angular/core'; -import { Ilc, IlcInterface } from '@env/decorators/component'; -import { ChangesDetector } from '@ui/env/extentions/changes'; -import { Session } from '@service/session/session'; -import { IMenuItem, contextmenu } from '@ui/service/contextmenu'; -import { ObserveOperation } from '@service/session/dependencies/observing/operation'; -import { stop } from '@ui/env/dom'; - -import * as $ from '@platform/types/observe'; - -@Component({ - selector: 'app-transport-review', - templateUrl: './template.html', - styleUrls: ['./styles.less'], - standalone: false, -}) -@Ilc() -export class Transport extends ChangesDetector implements AfterContentInit { - @Input() public observe!: $.Observe; - @Input() public observer!: ObserveOperation | undefined; - @Input() public session!: Session; - @Input() public finished!: boolean; - - @HostListener('contextmenu', ['$event']) onContextMenu(event: MouseEvent) { - const items: IMenuItem[] = []; - const observer = this.observer; - if (this.observe.origin.files() !== undefined) { - if (this.observe.parser.instance instanceof $.Parser.Text.Configuration) { - // Text file can be opened just once per session - return; - } - } - const stream = this.observe.origin.as<$.Origin.Stream.Configuration>( - $.Origin.Stream.Configuration, - ); - if (observer !== undefined) { - items.push( - ...[ - { - caption: 'Stop', - handler: () => { - observer - .abort() - .catch((err: Error) => { - this.log().error( - `Fail to stop observe operation: ${err.message}`, - ); - }) - .finally(() => { - this.detectChanges(); - }); - }, - }, - { - caption: 'Restart', - handler: () => { - observer - .restart() - .catch((err: Error) => { - this.log().error( - `Fail to restart observe operation: ${err.message}`, - ); - }) - .finally(() => { - this.detectChanges(); - }); - }, - }, - ], - ); - } else if (observer === undefined) { - stream !== undefined && - items.push( - ...[ - { - caption: 'Restart', - handler: () => { - this.ilc() - .services.system.session.initialize() - .observe(this.observe, this.session) - .catch((err: Error) => { - this.log().error( - `Fail to restart observe operation: ${err.message}`, - ); - }) - .finally(() => { - this.detectChanges(); - }); - }, - }, - ], - ); - } - stream !== undefined && - items.push( - ...[ - {}, - { - caption: 'Parameters', - handler: () => { - this.ilc() - .services.system.session.initialize() - .configure(this.observe, this.session); - }, - }, - ], - ); - contextmenu.show({ - items: items, - x: event.pageX, - y: event.pageY, - }); - stop(event); - } - public description!: $.IOriginDetails | undefined; - - constructor(cdRef: ChangeDetectorRef) { - super(cdRef); - } - - public ngAfterContentInit(): void { - const description = this.observe.origin.desc(); - if (description instanceof Error) { - this.log().error(`Invalid description: ${description.message}`); - return; - } - this.description = description; - } -} -export interface Transport extends IlcInterface {} diff --git a/application/client/src/app/ui/tabs/observe/origin/stream/transport/listed/module.ts b/application/client/src/app/ui/tabs/observe/origin/stream/transport/listed/module.ts deleted file mode 100644 index f5de015b8b..0000000000 --- a/application/client/src/app/ui/tabs/observe/origin/stream/transport/listed/module.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { NgModule } from '@angular/core'; -import { CommonModule } from '@angular/common'; -import { MatIconModule } from '@angular/material/icon'; - -import { Transport } from './component'; - -@NgModule({ - imports: [CommonModule, MatIconModule], - declarations: [Transport], - exports: [Transport] -}) -export class TransportReviewModule {} diff --git a/application/client/src/app/ui/tabs/observe/origin/stream/transport/listed/styles.less b/application/client/src/app/ui/tabs/observe/origin/stream/transport/listed/styles.less deleted file mode 100644 index 29299fddc9..0000000000 --- a/application/client/src/app/ui/tabs/observe/origin/stream/transport/listed/styles.less +++ /dev/null @@ -1,57 +0,0 @@ -@import '../../../../styles/variables.less'; - -:host { - position: relative; - display: flex; - padding: 12px 12px; - flex-direction: row; - & div.icon { - color: var(--scheme-color-2); - padding-right: 12px; - display: flex; - flex-direction: column; - align-items: center; - justify-content: center; - justify-items: center; - & mat-icon { - display: block; - font-size: 18px; - width: 18px; - height: 18px; - } - & span { - display: block; - } - &.running { - & mat-icon { - color: var(--scheme-color-0); - } - } - & span.type { - font-size: 11px; - } - & span.state { - font-size: 12px; - &.running { - color: var(--scheme-color-accent); - } - &.stopped { - color: var(--scheme-color-2); - } - } - } - & div.info { - position: relative; - overflow: hidden; - & p.major { - margin-bottom: 2px; - } - & p { - overflow: hidden; - text-overflow: ellipsis; - direction: rtl; - white-space: nowrap; - text-align: left; - } - } -} \ No newline at end of file diff --git a/application/client/src/app/ui/tabs/observe/origin/stream/transport/listed/template.html b/application/client/src/app/ui/tabs/observe/origin/stream/transport/listed/template.html deleted file mode 100644 index 54d84787ff..0000000000 --- a/application/client/src/app/ui/tabs/observe/origin/stream/transport/listed/template.html +++ /dev/null @@ -1,10 +0,0 @@ -
- {{description.icon}} - {{description.type}} - {{description.state.running}} - {{description.state.stopped}} -
-
-

{{description.major}}

-

{{description.minor}}

-
diff --git a/application/client/src/app/ui/tabs/observe/origin/stream/transport/setup/bases/process/component.ts b/application/client/src/app/ui/tabs/observe/origin/stream/transport/setup/bases/process/component.ts deleted file mode 100644 index d14950e302..0000000000 --- a/application/client/src/app/ui/tabs/observe/origin/stream/transport/setup/bases/process/component.ts +++ /dev/null @@ -1,227 +0,0 @@ -import { - Component, - ChangeDetectorRef, - AfterContentInit, - AfterViewInit, - Input, - ViewChild, - OnDestroy, -} from '@angular/core'; -import { ChangesDetector } from '@ui/env/extentions/changes'; -import { FolderInput, Options as FoldersOptions } from '@elements/folderinput/component'; -import { - AutocompleteInput, - Options as AutocompleteOptions, -} from '@elements/autocomplete/component'; -import { Ilc, IlcInterface } from '@env/decorators/component'; -import { State } from '../../states/process'; -import { components } from '@env/decorators/initial'; -import { ShellProfile, ShellType } from '@platform/types/bindings'; -import { Action } from '@ui/tabs/observe/action'; -import { Session } from '@service/session'; - -import * as Stream from '@platform/types/observe/origin/stream/index'; - -@Component({ - selector: 'app-process-setup-base', - template: '', - standalone: false, -}) -@Ilc() -export class SetupBase - extends ChangesDetector - implements AfterContentInit, AfterViewInit, OnDestroy -{ - @Input() public configuration!: Stream.Process.Configuration; - @Input() public action!: Action; - @Input() public session: Session | undefined; - - public state!: State; - - @ViewChild('cwd') public cwdInputRef!: FolderInput; - @ViewChild('cmd') public cmdInputRef!: AutocompleteInput; - - private _inputs!: { - cmd: AutocompleteOptions; - cwd: FoldersOptions; - }; - - protected setup(): void { - this.cmdInputRef !== undefined && - this.cmdInputRef.set(this.state.configuration.configuration.command); - this.cwdInputRef !== undefined && - this.cwdInputRef.set(this.state.configuration.configuration.cwd); - this.action.setDisabled(this.configuration.validate() instanceof Error); - if (this.state.configuration.configuration.cwd.trim() !== '') { - return; - } - this.ilc() - .services.system.bridge.env() - .get() - .then((envs) => { - this.state.envs = Stream.Process.Configuration.sterilizeEnvVars(envs); - }) - .catch((err: Error) => { - this.log().error(`Fail to get envvars path: ${err.message}`); - }) - .finally(() => { - this.detectChanges(); - }); - this.ilc() - .services.system.bridge.cwd() - .get(undefined) - .then((cwd) => { - this.cwdInputRef.set(cwd); - this.configuration.configuration.cwd = cwd; - }) - .catch((err: Error) => { - this.log().error(`Fail to get cwd path: ${err.message}`); - }) - .finally(() => { - this.detectChanges(); - }); - } - - constructor(cdRef: ChangeDetectorRef) { - super(cdRef); - } - - public setInputs(inputs: { cmd: AutocompleteOptions; cwd: FoldersOptions }): void { - this._inputs = inputs; - } - - public ngOnDestroy(): void { - this.state.destroy(); - } - - public ngAfterContentInit(): void { - this.state = new State(this.action, this.configuration); - this._inputs.cmd.defaults = this.state.configuration.configuration.command; - this._inputs.cwd.defaults = this.state.configuration.configuration.cwd; - this.ilc() - .services.system.bridge.env() - .get() - .then((envs) => { - this.state.envs = Stream.Process.Configuration.sterilizeEnvVars(envs); - }) - .catch((err: Error) => { - this.log().error(`Fail to get envvars path: ${err.message}`); - }) - .finally(() => { - this.detectChanges(); - }); - this.ilc() - .services.system.bridge.os() - .shells() - .then((profiles) => { - this.state - .setProfiles(profiles) - .catch((err: Error) => { - this.log().error(`Fail to set profiles: ${err.message}`); - }) - .finally(() => { - this.detectChanges(); - }); - }) - .catch((err: Error) => { - this.log().warn(`Fail to get a list of shell's profiles: ${err.message}`); - this.state - .setProfiles([]) - .catch((err: Error) => { - this.log().error(`Fail to set profiles: ${err.message}`); - }) - .finally(() => { - this.detectChanges(); - }); - }) - .finally(() => { - this.detectChanges(); - }); - this.env().subscriber.register( - this.configuration.subscribe(() => { - this.action.setDisabled(this.configuration.validate() instanceof Error); - this.detectChanges(); - }), - this.action.subjects.get().applied.subscribe(() => { - this._inputs.cmd.recent.emit(this.state.configuration.configuration.command); - this.state.configuration.configuration.cwd.trim() !== '' && - this.ilc() - .services.system.bridge.cwd() - .set(undefined, this.state.configuration.configuration.cwd) - .catch((err: Error) => { - this.log().error(`Fail to set cwd path: ${err.message}`); - }); - }), - ); - this.action.setDisabled(this.configuration.validate() instanceof Error); - } - - public ngAfterViewInit(): void { - this.setup(); - } - - public edit(target: 'cmd' | 'cwd', value: string): void { - if (target === 'cmd') { - this.state.configuration.configuration.command = value; - } else { - this.state.configuration.configuration.cwd = value; - } - } - - public enter(target: 'cmd' | 'cwd'): void { - if (this.cwdInputRef.error.is() || this.cmdInputRef.error.is()) { - return; - } - if (target === 'cmd' && this.configuration.validate() === undefined) { - this.action.apply(); - this.cmdInputRef.control.drop(); - } - this.markChangesForCheck(); - } - - public panel(): void { - this.markChangesForCheck(); - } - - public showEnvVars() { - this.ilc().services.ui.popup.open({ - component: { - factory: components.get('app-elements-pairs'), - inputs: { - map: this.state.getSelectedEnvs(), - }, - }, - closeOnKey: 'Escape', - uuid: 'app-elements-pairs', - }); - } - - public setCurrentProfile(profile: ShellProfile | undefined) { - this.state.setCurrentProfile(profile); - this.detectChanges(); - } - - public getShellName(shell: ShellType): string { - switch (shell) { - case 'Bash': - return 'Bash'; - case 'Zsh': - return 'Zsh'; - case 'Fish': - return 'Fish'; - case 'NuShell': - return 'Nushell'; - case 'Elvish': - return 'Elvish'; - case 'Pwsh': - return 'PowerShell'; - default: { - // This static check ensures all cases are handled. - // If you add to ShellType, TypeScript will error here. - const _exhaustiveCheck: never = shell; - return _exhaustiveCheck; - } - } - } -} -export interface SetupBase extends IlcInterface {} diff --git a/application/client/src/app/ui/tabs/observe/origin/stream/transport/setup/bases/process/error.ts b/application/client/src/app/ui/tabs/observe/origin/stream/transport/setup/bases/process/error.ts deleted file mode 100644 index b3c490f9c3..0000000000 --- a/application/client/src/app/ui/tabs/observe/origin/stream/transport/setup/bases/process/error.ts +++ /dev/null @@ -1,30 +0,0 @@ -import { ErrorState } from '@elements/autocomplete/error'; -import { Subject } from '@platform/env/subscription'; - -export class CmdErrorState extends ErrorState { - protected updated: Subject = new Subject(); - protected error: string | undefined; - - public validate(): void { - const matches = this.value.match(/"/gi); - if (matches === null || matches.length === 0) { - this.error = undefined; - } else if (matches.length % 2 !== 0) { - this.error = `Not closed string: no closing "`; - } else { - this.error = undefined; - } - } - - public is(): boolean { - return this.error !== undefined; - } - - public msg(): string { - return this.error === undefined ? '' : this.error; - } - - public observer(): Subject { - return this.updated; - } -} diff --git a/application/client/src/app/ui/tabs/observe/origin/stream/transport/setup/bases/serial/component.ts b/application/client/src/app/ui/tabs/observe/origin/stream/transport/setup/bases/serial/component.ts deleted file mode 100644 index 237401751d..0000000000 --- a/application/client/src/app/ui/tabs/observe/origin/stream/transport/setup/bases/serial/component.ts +++ /dev/null @@ -1,97 +0,0 @@ -import { - Component, - ChangeDetectorRef, - Input, - OnDestroy, - AfterContentInit, - ViewChild, -} from '@angular/core'; -import { ChangesDetector } from '@ui/env/extentions/changes'; -import { State } from '../../states/serial'; -import { Ilc, IlcInterface } from '@env/decorators/component'; -import { Action } from '@ui/tabs/observe/action'; -import { Session } from '@service/session'; -import { - AutocompleteInput, - Options as AutocompleteOptions, -} from '@elements/autocomplete/component'; -import { Subject } from '@platform/env/subscription'; -import { PathErrorState } from './error'; - -import * as Stream from '@platform/types/observe/origin/stream/index'; - -@Component({ - selector: 'app-serial-setup-base', - template: '', - standalone: false, -}) -@Ilc() -export class SetupBase extends ChangesDetector implements AfterContentInit, OnDestroy { - @Input() public configuration!: Stream.Serial.Configuration; - @Input() public action!: Action; - @Input() public session: Session | undefined; - @ViewChild('path') public pathInputRef!: AutocompleteInput; - - public state!: State; - public pathInputOptions: AutocompleteOptions = { - name: 'SerialPortPathRecentList', - storage: 'serialport_paths_recent', - defaults: '', - placeholder: 'Enter path to serial port', - label: 'Serial port path', - recent: new Subject(), - error: new PathErrorState(), - }; - - constructor(cdRef: ChangeDetectorRef) { - super(cdRef); - } - - public ngAfterContentInit(): void { - this.state = new State(this.action, this.configuration); - this.env().subscriber.register( - this.state.changed.subscribe(() => { - this.detectChanges(); - }), - ); - this.env().subscriber.register( - this.configuration.subscribe(() => { - this.action.setDisabled(this.configuration.validate() instanceof Error); - this.detectChanges(); - }), - this.action.subjects.get().applied.subscribe(() => { - this.action.setDisabled(this.configuration.validate() instanceof Error); - this.detectChanges(); - }), - ); - this.action.setDisabled(this.configuration.validate() instanceof Error); - this.state.scan().start(); - } - - public ngOnDestroy() { - this.state.scan().stop(); - this.state.destroy(); - } - - public selectDetectedPort(port: string): void { - this.state.configuration.configuration.path = port; - this.pathInputRef.set(port).focus(); - } - - public onPathChange(value: string): void { - this.state.configuration.configuration.path = value; - } - - public onPathEnter(): void { - if (this.pathInputRef.error.is() || this.state.configuration.validate() !== undefined) { - return; - } - this.action.apply(); - this.markChangesForCheck(); - } - - public panel(): void { - this.markChangesForCheck(); - } -} -export interface SetupBase extends IlcInterface {} diff --git a/application/client/src/app/ui/tabs/observe/origin/stream/transport/setup/bases/serial/error.ts b/application/client/src/app/ui/tabs/observe/origin/stream/transport/setup/bases/serial/error.ts deleted file mode 100644 index 1921cae447..0000000000 --- a/application/client/src/app/ui/tabs/observe/origin/stream/transport/setup/bases/serial/error.ts +++ /dev/null @@ -1,27 +0,0 @@ -import { Subject } from '@platform/env/subscription'; -import { ErrorState } from '@elements/autocomplete/error'; - -export class PathErrorState extends ErrorState { - protected updated: Subject = new Subject(); - protected error: string | undefined; - - public validate(): void { - if (this.value.trim().length === 0) { - this.error = 'No path' - } else { - this.error = undefined; - } - } - - public is(): boolean { - return this.error !== undefined; - } - - public msg(): string { - return this.error === undefined ? '' : this.error; - } - - public observer(): Subject { - return this.updated; - } -} diff --git a/application/client/src/app/ui/tabs/observe/origin/stream/transport/setup/bases/serial/module.ts b/application/client/src/app/ui/tabs/observe/origin/stream/transport/setup/bases/serial/module.ts deleted file mode 100644 index 3a2c02aa66..0000000000 --- a/application/client/src/app/ui/tabs/observe/origin/stream/transport/setup/bases/serial/module.ts +++ /dev/null @@ -1,34 +0,0 @@ -import { NgModule } from '@angular/core'; -import { CommonModule } from '@angular/common'; -import { FormsModule, ReactiveFormsModule } from '@angular/forms'; -import { MatButtonModule } from '@angular/material/button'; -import { MatRadioModule } from '@angular/material/radio'; -import { MatCardModule } from '@angular/material/card'; -import { MatDividerModule } from '@angular/material/divider'; -import { MatProgressBarModule } from '@angular/material/progress-bar'; -import { MatIconModule } from '@angular/material/icon'; -import { MatFormFieldModule } from '@angular/material/form-field'; -import { MatSelectModule } from '@angular/material/select'; -import { MatInputModule } from '@angular/material/input'; -import { MatAutocompleteModule } from '@angular/material/autocomplete'; - -@NgModule({ - imports: [ - CommonModule, - FormsModule, - ReactiveFormsModule, - MatButtonModule, - MatCardModule, - MatDividerModule, - MatProgressBarModule, - MatIconModule, - MatFormFieldModule, - MatSelectModule, - MatInputModule, - MatAutocompleteModule, - MatRadioModule, - ], - declarations: [], - exports: [], -}) -export class BaseModule {} diff --git a/application/client/src/app/ui/tabs/observe/origin/stream/transport/setup/bases/tcp/component.ts b/application/client/src/app/ui/tabs/observe/origin/stream/transport/setup/bases/tcp/component.ts deleted file mode 100644 index bb70e7bf03..0000000000 --- a/application/client/src/app/ui/tabs/observe/origin/stream/transport/setup/bases/tcp/component.ts +++ /dev/null @@ -1,46 +0,0 @@ -import { Component, ChangeDetectorRef, Input, OnDestroy, AfterContentInit } from '@angular/core'; -import { Ilc, IlcInterface } from '@env/decorators/component'; -import { ChangesDetector } from '@ui/env/extentions/changes'; -import { State } from '../../states/tcp'; -import { Action } from '@ui/tabs/observe/action'; -import { Session } from '@service/session'; - -import * as Stream from '@platform/types/observe/origin/stream/index'; - -@Component({ - selector: 'app-tcp-setup-base', - template: '', - standalone: false, -}) -@Ilc() -export class SetupBase extends ChangesDetector implements OnDestroy, AfterContentInit { - @Input() public configuration!: Stream.TCP.Configuration; - @Input() public action!: Action; - @Input() public session: Session | undefined; - - public state!: State; - - constructor(cdRef: ChangeDetectorRef) { - super(cdRef); - } - - public ngOnDestroy(): void { - this.state.destroy(); - } - - public ngAfterContentInit(): void { - this.state = new State(this.action, this.configuration); - this.env().subscriber.register( - this.configuration.subscribe(() => { - this.action.setDisabled(this.configuration.validate() instanceof Error); - this.detectChanges(); - }), - this.action.subjects.get().applied.subscribe(() => { - this.action.setDisabled(this.configuration.validate() instanceof Error); - this.detectChanges(); - }), - ); - this.action.setDisabled(this.configuration.validate() instanceof Error); - } -} -export interface SetupBase extends IlcInterface {} diff --git a/application/client/src/app/ui/tabs/observe/origin/stream/transport/setup/bases/tcp/error.ts b/application/client/src/app/ui/tabs/observe/origin/stream/transport/setup/bases/tcp/error.ts deleted file mode 100644 index cdea46d467..0000000000 --- a/application/client/src/app/ui/tabs/observe/origin/stream/transport/setup/bases/tcp/error.ts +++ /dev/null @@ -1,89 +0,0 @@ -import { ErrorStateMatcher } from '@angular/material/core'; -import { UntypedFormControl, FormGroupDirective, NgForm } from '@angular/forms'; - -import * as ip from '@platform/env/ipaddr'; - -export enum Field { - address = 'address', - multicastInterface = 'multicastInterface', -} - -export enum Codes { - NO_ERRORS = 'NO_ERRORS', - REQUIRED = 'REQUIRED', - INVALID = 'INVALID', -} - -export type UpdateHandler = () => void; - -export class ErrorState implements ErrorStateMatcher { - readonly _alias: Field; - readonly _updated: UpdateHandler; - private _code: Codes = Codes.NO_ERRORS; - - constructor(alias: Field, updated: UpdateHandler) { - this._alias = alias; - this._updated = updated; - } - - public isErrorState( - control: UntypedFormControl | null, - _form: FormGroupDirective | NgForm | null, - ): boolean { - if (control === null) { - return false; - } - if (this.isFieldRequired(control.value)) { - this._code = Codes.REQUIRED; - } else if (!this.isFieldValid(control.value)) { - this._code = Codes.INVALID; - } else { - this._code = Codes.NO_ERRORS; - } - this._updated(); - return this._code !== Codes.NO_ERRORS; - } - - public isFieldValid(value: string): boolean { - if (typeof value !== 'string') { - return false; - } - switch (this._alias) { - case Field.address: - return ( - ip.isValidIPv4(value) || - ip.isValidIPv6(value) || - ip.isValidIPv4WithPort(value) || - ip.isValidIPv6WithPort(value) - ); - case Field.multicastInterface: - return ( - ip.isValidIPv4(value) || - ip.isValidIPv6(value) || - ip.isValidIPv4WithPort(value) || - ip.isValidIPv6WithPort(value) - ); - default: - throw new Error(`Unexpected Field value: ${this._alias}`); - } - } - - public isFieldRequired(value: string): boolean { - if (typeof value !== 'string') { - return true; - } - switch (this._alias) { - case Field.address: - case Field.multicastInterface: - return value.trim() === ''; - } - } - - public getErrorCode(): Codes { - return this._code; - } - - public isValid(): boolean { - return this._code === Codes.NO_ERRORS; - } -} diff --git a/application/client/src/app/ui/tabs/observe/origin/stream/transport/setup/bases/udp/component.ts b/application/client/src/app/ui/tabs/observe/origin/stream/transport/setup/bases/udp/component.ts deleted file mode 100644 index 409586df14..0000000000 --- a/application/client/src/app/ui/tabs/observe/origin/stream/transport/setup/bases/udp/component.ts +++ /dev/null @@ -1,54 +0,0 @@ -import { Component, ChangeDetectorRef, Input, OnDestroy, AfterContentInit } from '@angular/core'; -import { Ilc, IlcInterface } from '@env/decorators/component'; -import { ChangesDetector } from '@ui/env/extentions/changes'; -import { State } from '../../states/udp'; -import { Action } from '@ui/tabs/observe/action'; -import { Session } from '@service/session'; - -import * as Stream from '@platform/types/observe/origin/stream/index'; - -@Component({ - selector: 'app-udp-setup-base', - template: '', - standalone: false, -}) -@Ilc() -export class SetupBase extends ChangesDetector implements OnDestroy, AfterContentInit { - @Input() public configuration!: Stream.UDP.Configuration; - @Input() public action!: Action; - @Input() public session: Session | undefined; - - public state!: State; - - constructor(cdRef: ChangeDetectorRef) { - super(cdRef); - } - - public ngOnDestroy(): void { - this.state.destroy(); - } - - public ngAfterContentInit(): void { - this.state = new State(this.action, this.configuration); - this.env().subscriber.register( - this.configuration.subscribe(() => { - this.action.setDisabled(this.configuration.validate() instanceof Error); - this.detectChanges(); - }), - this.action.subjects.get().applied.subscribe(() => { - this.action.setDisabled(this.configuration.validate() instanceof Error); - this.detectChanges(); - }), - ); - this.action.setDisabled(this.configuration.validate() instanceof Error); - } - - public addMulticast() { - this.state.addMulticast(); - } - - public removeMulticast(index: number) { - this.state.removeMulticast(index); - } -} -export interface SetupBase extends IlcInterface {} diff --git a/application/client/src/app/ui/tabs/observe/origin/stream/transport/setup/bases/udp/error.ts b/application/client/src/app/ui/tabs/observe/origin/stream/transport/setup/bases/udp/error.ts deleted file mode 100644 index fa36b206a6..0000000000 --- a/application/client/src/app/ui/tabs/observe/origin/stream/transport/setup/bases/udp/error.ts +++ /dev/null @@ -1,88 +0,0 @@ -import { ErrorStateMatcher } from '@angular/material/core'; -import { UntypedFormControl, FormGroupDirective, NgForm } from '@angular/forms'; - -import * as ip from '@platform/env/ipaddr'; - -export enum Field { - bindingAddress = 'bindingAddress', - multicastAddress = 'multicastAddress', - multicastInterface = 'multicastInterface', -} - -export enum Codes { - NO_ERRORS = 'NO_ERRORS', - REQUIRED = 'REQUIRED', - INVALID = 'INVALID', -} - -export type UpdateHandler = () => void; - -export class ErrorState implements ErrorStateMatcher { - readonly _alias: Field; - readonly _updated: UpdateHandler; - private _code: Codes = Codes.NO_ERRORS; - - constructor(alias: Field, updated: UpdateHandler) { - this._alias = alias; - this._updated = updated; - } - - public isErrorState( - control: UntypedFormControl | null, - _form: FormGroupDirective | NgForm | null, - ): boolean { - if (control === null) { - return false; - } - const prev = this._code; - if (this.isFieldRequired(control.value)) { - this._code = Codes.REQUIRED; - } else if (!this.isFieldValid(control.value)) { - this._code = Codes.INVALID; - } else { - this._code = Codes.NO_ERRORS; - } - prev !== this._code && this._updated(); - return this._code !== Codes.NO_ERRORS; - } - - public isFieldValid(value: string): boolean { - if (typeof value !== 'string') { - return false; - } - switch (this._alias) { - case Field.bindingAddress: - case Field.multicastAddress: - return ( - ip.isValidIPv4(value) || - ip.isValidIPv6(value) || - ip.isValidIPv4WithPort(value) || - ip.isValidIPv6WithPort(value) - ); - case Field.multicastInterface: - return ip.isValidIPv4(value) || ip.isValidIPv6(value); - default: - throw new Error(`Unexpected Field value: ${this._alias}`); - } - } - - public isFieldRequired(value: string): boolean { - if (typeof value !== 'string') { - return true; - } - switch (this._alias) { - case Field.bindingAddress: - case Field.multicastAddress: - case Field.multicastInterface: - return value.trim() === ''; - } - } - - public getErrorCode(): Codes { - return this._code; - } - - public isValid(): boolean { - return this._code === Codes.NO_ERRORS; - } -} diff --git a/application/client/src/app/ui/tabs/observe/origin/stream/transport/setup/bases/udp/module.ts b/application/client/src/app/ui/tabs/observe/origin/stream/transport/setup/bases/udp/module.ts deleted file mode 100644 index d5d9f86eac..0000000000 --- a/application/client/src/app/ui/tabs/observe/origin/stream/transport/setup/bases/udp/module.ts +++ /dev/null @@ -1,24 +0,0 @@ -import { NgModule } from '@angular/core'; -import { CommonModule } from '@angular/common'; -import { FormsModule, ReactiveFormsModule } from '@angular/forms'; -import { MatButtonModule } from '@angular/material/button'; -import { MatIconModule } from '@angular/material/icon'; -import { MatFormFieldModule } from '@angular/material/form-field'; -import { MatInputModule } from '@angular/material/input'; - -import { Multicast } from './multicast/component'; - -@NgModule({ - imports: [ - CommonModule, - FormsModule, - ReactiveFormsModule, - MatButtonModule, - MatIconModule, - MatFormFieldModule, - MatInputModule, - ], - declarations: [Multicast], - exports: [Multicast] -}) -export class BaseModule {} diff --git a/application/client/src/app/ui/tabs/observe/origin/stream/transport/setup/bases/udp/multicast/component.ts b/application/client/src/app/ui/tabs/observe/origin/stream/transport/setup/bases/udp/multicast/component.ts deleted file mode 100644 index 1cbf4793d1..0000000000 --- a/application/client/src/app/ui/tabs/observe/origin/stream/transport/setup/bases/udp/multicast/component.ts +++ /dev/null @@ -1,44 +0,0 @@ -import { Component, Input, Output, EventEmitter } from '@angular/core'; -import { Ilc, IlcInterface } from '@env/decorators/component'; -import * as Errors from '../error'; - -import * as Stream from '@platform/types/observe/origin/stream/index'; - -@Component({ - selector: 'app-transport-udp-multicast', - templateUrl: './template.html', - styleUrls: ['./styles.less'], - standalone: false, -}) -@Ilc() -export class Multicast { - @Input() public multicast!: Stream.UDP.Multicast; - - public errors: { - multiaddr: Errors.ErrorState; - interface: Errors.ErrorState; - } = { - multiaddr: new Errors.ErrorState(Errors.Field.multicastAddress, () => { - // this.update(); - }), - interface: new Errors.ErrorState(Errors.Field.multicastAddress, () => { - // this.update(); - }), - }; - @Output() public clean: EventEmitter = new EventEmitter(); - - public onChanges() { - if ( - this.multicast.multiaddr.trim() !== '' || - (this.multicast.interface !== undefined && this.multicast.interface.trim() !== '') - ) { - return; - } - this.clean.next(); - } - - public onRemove() { - this.clean.next(); - } -} -export interface Multicast extends IlcInterface {} diff --git a/application/client/src/app/ui/tabs/observe/origin/stream/transport/setup/bases/udp/multicast/styles.less b/application/client/src/app/ui/tabs/observe/origin/stream/transport/setup/bases/udp/multicast/styles.less deleted file mode 100644 index 9b5a4a41cf..0000000000 --- a/application/client/src/app/ui/tabs/observe/origin/stream/transport/setup/bases/udp/multicast/styles.less +++ /dev/null @@ -1,26 +0,0 @@ -@import '../../../../../../../../../styles/variables.less'; - - -:host { - align-items: baseline; - position: relative; - display: flex; - margin: 0; - cursor: default; - padding-right: 6px; - & mat-form-field.inline { - margin-right: 12px; - } - & .mat-icon { - width: 16px; - height: 16px; - font-size: 16px; - color: var(--scheme-color-1); - &:hover { - color: var(--scheme-color-3); - } - } - & span.filler { - flex: auto; - } -} diff --git a/application/client/src/app/ui/tabs/observe/origin/stream/transport/setup/bases/udp/multicast/template.html b/application/client/src/app/ui/tabs/observe/origin/stream/transport/setup/bases/udp/multicast/template.html deleted file mode 100644 index e1167c5145..0000000000 --- a/application/client/src/app/ui/tabs/observe/origin/stream/transport/setup/bases/udp/multicast/template.html +++ /dev/null @@ -1,22 +0,0 @@ - - Address - - - Please enter a valid IPv4/IPv6 address - - - required - - - - Interface Address - - - Please define valid interface - - - required - - - -close diff --git a/application/client/src/app/ui/tabs/observe/origin/stream/transport/setup/complete/process/component.ts b/application/client/src/app/ui/tabs/observe/origin/stream/transport/setup/complete/process/component.ts deleted file mode 100644 index 471470e73c..0000000000 --- a/application/client/src/app/ui/tabs/observe/origin/stream/transport/setup/complete/process/component.ts +++ /dev/null @@ -1,65 +0,0 @@ -import { - Component, - ChangeDetectorRef, - Input, - AfterContentInit, - AfterViewInit, - OnDestroy, - ViewEncapsulation, -} from '@angular/core'; -import { Ilc, IlcInterface } from '@env/decorators/component'; -import { Options as AutocompleteOptions } from '@elements/autocomplete/component'; -import { Options as FoldersOptions } from '@elements/folderinput/component'; -import { Subject } from '@platform/env/subscription'; -import { CmdErrorState } from '../../bases/process/error'; -import { SetupBase } from '../../bases/process/component'; - -@Component({ - selector: 'app-transport-process', - templateUrl: './template.html', - styleUrls: ['./styles.less'], - encapsulation: ViewEncapsulation.None, - standalone: false, -}) -@Ilc() -export class Setup extends SetupBase implements AfterContentInit, AfterViewInit, OnDestroy { - @Input() public update?: Subject; - - public readonly inputs: { - cmd: AutocompleteOptions; - cwd: FoldersOptions; - } = { - cmd: { - name: 'CommandsRecentList', - storage: 'processes_cmd_recent', - defaults: '', - placeholder: 'Enter terminal command', - label: 'Terminal command', - recent: new Subject(), - error: new CmdErrorState(), - }, - cwd: { - placeholder: 'Enter working folder', - label: 'Working folder', - defaults: '', - passive: true, - }, - }; - - constructor(cdRef: ChangeDetectorRef) { - super(cdRef); - this.setInputs(this.inputs); - } - - public override ngAfterContentInit(): void { - this.update !== undefined && - this.env().subscriber.register( - this.update.subscribe(() => { - this.cmdInputRef.set(this.state.configuration.configuration.command); - this.cwdInputRef.set(this.state.configuration.configuration.cwd); - }), - ); - super.ngAfterContentInit(); - } -} -export interface Setup extends IlcInterface {} diff --git a/application/client/src/app/ui/tabs/observe/origin/stream/transport/setup/complete/process/module.ts b/application/client/src/app/ui/tabs/observe/origin/stream/transport/setup/complete/process/module.ts deleted file mode 100644 index 351a776791..0000000000 --- a/application/client/src/app/ui/tabs/observe/origin/stream/transport/setup/complete/process/module.ts +++ /dev/null @@ -1,24 +0,0 @@ -import { NgModule } from '@angular/core'; -import { CommonModule } from '@angular/common'; -import { AutocompleteModule } from '@elements/autocomplete/module'; -import { FolderInputModule } from '@elements/folderinput/module'; -import { MatMenuModule } from '@angular/material/menu'; -import { MatDividerModule } from '@angular/material/divider'; -import { Setup } from './component'; -import { MatProgressBarModule } from '@angular/material/progress-bar'; -import { MatProgressSpinnerModule } from '@angular/material/progress-spinner'; - -@NgModule({ - imports: [ - CommonModule, - AutocompleteModule, - FolderInputModule, - MatMenuModule, - MatDividerModule, - MatProgressBarModule, - MatProgressSpinnerModule, - ], - declarations: [Setup], - exports: [Setup] -}) -export class SetupModule {} diff --git a/application/client/src/app/ui/tabs/observe/origin/stream/transport/setup/complete/process/styles.less b/application/client/src/app/ui/tabs/observe/origin/stream/transport/setup/complete/process/styles.less deleted file mode 100644 index 992a05aa79..0000000000 --- a/application/client/src/app/ui/tabs/observe/origin/stream/transport/setup/complete/process/styles.less +++ /dev/null @@ -1,61 +0,0 @@ -@import '../../../../../../../../styles/variables.less'; - - -app-transport-process { - position: relative; - display: block; - width: 100%; - & div.command { - position: relative; - display: flex; - width: 100%; - align-items: center; - margin-bottom: 12px; - & button { - margin-left: 6px; - } - } -} -.app-transport-process-menu { - & button[mat-menu-item] { - & div.shell-profile { - position: relative; - margin-top: -7px; - & > span { - height: 16px; - line-height: 16px; - } - & > span.envvars-count { - color: var(--scheme-color-3); - } - & > span.shell-path { - position: relative; - display: block; - color: var(--scheme-color-3); - font-size: 10px; - max-width: 250px; - overflow: hidden; - text-overflow: ellipsis; - margin-top: -8px; - white-space: nowrap; - direction: rtl; - max-width: 200px; - } - } - &[data-selected="true"] { - & div.shell-profile { - &::before { - display: block; - position: absolute; - width: 2px; - height: 24px; - background: var(--scheme-color-accent); - left: -9px; - top: 7px; - content: ''; - } - } - } - } - -} \ No newline at end of file diff --git a/application/client/src/app/ui/tabs/observe/origin/stream/transport/setup/complete/process/template.html b/application/client/src/app/ui/tabs/observe/origin/stream/transport/setup/complete/process/template.html deleted file mode 100644 index 06ffe59aa5..0000000000 --- a/application/client/src/app/ui/tabs/observe/origin/stream/transport/setup/complete/process/template.html +++ /dev/null @@ -1,50 +0,0 @@ -
- - -
- - - - - -

Available shells:

- -
- -

Loading profiles...

- -
- - -
diff --git a/application/client/src/app/ui/tabs/observe/origin/stream/transport/setup/complete/serial/component.ts b/application/client/src/app/ui/tabs/observe/origin/stream/transport/setup/complete/serial/component.ts deleted file mode 100644 index de3561dee3..0000000000 --- a/application/client/src/app/ui/tabs/observe/origin/stream/transport/setup/complete/serial/component.ts +++ /dev/null @@ -1,30 +0,0 @@ -import { Component, ChangeDetectorRef, Input, OnDestroy, AfterContentInit } from '@angular/core'; -import { Ilc, IlcInterface } from '@env/decorators/component'; -import { Subject } from '@platform/env/subscription'; -import { SetupBase } from '../../bases/serial/component'; - -@Component({ - selector: 'app-transport-serial', - templateUrl: './template.html', - styleUrls: ['./styles.less'], - standalone: false, -}) -@Ilc() -export class Setup extends SetupBase implements AfterContentInit, OnDestroy { - @Input() public update?: Subject; - - constructor(cdRef: ChangeDetectorRef) { - super(cdRef); - } - - public override ngAfterContentInit() { - this.update !== undefined && - this.env().subscriber.register( - this.update.subscribe(() => { - this.detectChanges(); - }), - ); - super.ngAfterContentInit(); - } -} -export interface TransportSerial extends IlcInterface {} diff --git a/application/client/src/app/ui/tabs/observe/origin/stream/transport/setup/complete/serial/module.ts b/application/client/src/app/ui/tabs/observe/origin/stream/transport/setup/complete/serial/module.ts deleted file mode 100644 index 3856d61cf8..0000000000 --- a/application/client/src/app/ui/tabs/observe/origin/stream/transport/setup/complete/serial/module.ts +++ /dev/null @@ -1,41 +0,0 @@ -import { NgModule } from '@angular/core'; -import { CommonModule } from '@angular/common'; -import { FormsModule, ReactiveFormsModule } from '@angular/forms'; -import { MatButtonModule } from '@angular/material/button'; -import { MatRadioModule } from '@angular/material/radio'; -import { MatCardModule } from '@angular/material/card'; -import { MatDividerModule } from '@angular/material/divider'; -import { MatProgressBarModule } from '@angular/material/progress-bar'; -import { MatIconModule } from '@angular/material/icon'; -import { MatFormFieldModule } from '@angular/material/form-field'; -import { MatSelectModule } from '@angular/material/select'; -import { MatInputModule } from '@angular/material/input'; -import { BaseModule } from '../../bases/serial/module'; -import { Setup } from './component'; -import { AutocompleteModule } from '@elements/autocomplete/module'; -import { MatMenuModule } from '@angular/material/menu'; -import { MatProgressSpinnerModule } from '@angular/material/progress-spinner'; - -@NgModule({ - imports: [ - CommonModule, - FormsModule, - ReactiveFormsModule, - MatButtonModule, - MatCardModule, - MatDividerModule, - MatProgressBarModule, - MatIconModule, - MatFormFieldModule, - MatSelectModule, - MatInputModule, - AutocompleteModule, - MatRadioModule, - BaseModule, - MatProgressSpinnerModule, - MatMenuModule, - ], - declarations: [Setup], - exports: [Setup], -}) -export class SetupModule {} diff --git a/application/client/src/app/ui/tabs/observe/origin/stream/transport/setup/complete/serial/styles.less b/application/client/src/app/ui/tabs/observe/origin/stream/transport/setup/complete/serial/styles.less deleted file mode 100644 index bb4e6031d9..0000000000 --- a/application/client/src/app/ui/tabs/observe/origin/stream/transport/setup/complete/serial/styles.less +++ /dev/null @@ -1,24 +0,0 @@ -@import '../../../../../../../../styles/variables.less'; - - -:host { - position: relative; - display: block; - width: 100%; - p.settings { - margin: 8px 0; - } - & div.path { - position: relative; - display: flex; - width: 100%; - align-items: center; - margin-bottom: 12px; - & button { - margin-left: 6px; - } - } - div.controlls{ - text-align: right; - } -} \ No newline at end of file diff --git a/application/client/src/app/ui/tabs/observe/origin/stream/transport/setup/complete/serial/template.html b/application/client/src/app/ui/tabs/observe/origin/stream/transport/setup/complete/serial/template.html deleted file mode 100644 index f97479eb58..0000000000 --- a/application/client/src/app/ui/tabs/observe/origin/stream/transport/setup/complete/serial/template.html +++ /dev/null @@ -1,96 +0,0 @@ -
- - -
- -

Settings

- - Baud Rate - - - {{value}} - - - - - Custom Baud Rate - - - - Data Bits - - - {{value}} - - - - - Flow Control - - - {{keyvalue.name}} - - - - - Parity - - - {{keyvalue.name}} - - - - - Stop Bits - - - {{value}} - - - - - Exclusive opening - - - {{keyvalue.name}} - - - - - Delay on writing - - - {{keyvalue.name}} - - - -
- -
- - - -

No ports found

-
- - - -
- -

Scanning for available ports...

- -
-
\ No newline at end of file diff --git a/application/client/src/app/ui/tabs/observe/origin/stream/transport/setup/complete/tcp/component.ts b/application/client/src/app/ui/tabs/observe/origin/stream/transport/setup/complete/tcp/component.ts deleted file mode 100644 index ca5a8abf43..0000000000 --- a/application/client/src/app/ui/tabs/observe/origin/stream/transport/setup/complete/tcp/component.ts +++ /dev/null @@ -1,30 +0,0 @@ -import { Component, ChangeDetectorRef, Input, OnDestroy, AfterContentInit } from '@angular/core'; -import { Ilc, IlcInterface } from '@env/decorators/component'; -import { Subject } from '@platform/env/subscription'; -import { SetupBase } from '../../bases/tcp/component'; - -@Component({ - selector: 'app-transport-tcp', - templateUrl: './template.html', - styleUrls: ['./styles.less'], - standalone: false, -}) -@Ilc() -export class Setup extends SetupBase implements OnDestroy, AfterContentInit { - @Input() public update?: Subject; - - constructor(cdRef: ChangeDetectorRef) { - super(cdRef); - } - - public override ngAfterContentInit(): void { - this.update !== undefined && - this.env().subscriber.register( - this.update.subscribe(() => { - this.detectChanges(); - }), - ); - super.ngAfterContentInit(); - } -} -export interface Setup extends IlcInterface {} diff --git a/application/client/src/app/ui/tabs/observe/origin/stream/transport/setup/complete/tcp/module.ts b/application/client/src/app/ui/tabs/observe/origin/stream/transport/setup/complete/tcp/module.ts deleted file mode 100644 index 408a3f3895..0000000000 --- a/application/client/src/app/ui/tabs/observe/origin/stream/transport/setup/complete/tcp/module.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { NgModule } from '@angular/core'; -import { CommonModule } from '@angular/common'; -import { FormsModule, ReactiveFormsModule } from '@angular/forms'; -import { MatButtonModule } from '@angular/material/button'; -import { MatCardModule } from '@angular/material/card'; -import { MatDividerModule } from '@angular/material/divider'; -import { MatProgressBarModule } from '@angular/material/progress-bar'; -import { MatIconModule } from '@angular/material/icon'; -import { MatFormFieldModule } from '@angular/material/form-field'; -import { MatSelectModule } from '@angular/material/select'; -import { MatInputModule } from '@angular/material/input'; -import { Setup } from './component'; - -@NgModule({ - imports: [ - CommonModule, - FormsModule, - ReactiveFormsModule, - MatButtonModule, - MatCardModule, - MatDividerModule, - MatProgressBarModule, - MatIconModule, - MatFormFieldModule, - MatSelectModule, - MatInputModule, - ], - declarations: [Setup], - exports: [Setup] -}) -export class SetupModule {} diff --git a/application/client/src/app/ui/tabs/observe/origin/stream/transport/setup/complete/tcp/styles.less b/application/client/src/app/ui/tabs/observe/origin/stream/transport/setup/complete/tcp/styles.less deleted file mode 100644 index 1890004256..0000000000 --- a/application/client/src/app/ui/tabs/observe/origin/stream/transport/setup/complete/tcp/styles.less +++ /dev/null @@ -1,14 +0,0 @@ -@import '../../../../../../../../styles/variables.less'; - - -:host { - position: relative; - display: block; - width: 100%; - & mat-form-field.full-width { - display: block; - } - & mat-form-field.inline { - margin-right: 12px; - } -} diff --git a/application/client/src/app/ui/tabs/observe/origin/stream/transport/setup/complete/tcp/template.html b/application/client/src/app/ui/tabs/observe/origin/stream/transport/setup/complete/tcp/template.html deleted file mode 100644 index 8d0df136b3..0000000000 --- a/application/client/src/app/ui/tabs/observe/origin/stream/transport/setup/complete/tcp/template.html +++ /dev/null @@ -1,20 +0,0 @@ - - IP Address - - - Please enter a valid IPv4/IPv6 address - - - required - - - diff --git a/application/client/src/app/ui/tabs/observe/origin/stream/transport/setup/complete/udp/component.ts b/application/client/src/app/ui/tabs/observe/origin/stream/transport/setup/complete/udp/component.ts deleted file mode 100644 index 772ff593db..0000000000 --- a/application/client/src/app/ui/tabs/observe/origin/stream/transport/setup/complete/udp/component.ts +++ /dev/null @@ -1,30 +0,0 @@ -import { Component, ChangeDetectorRef, Input, OnDestroy, AfterContentInit } from '@angular/core'; -import { Ilc, IlcInterface } from '@env/decorators/component'; -import { Subject } from '@platform/env/subscription'; -import { SetupBase } from '../../bases/udp/component'; - -@Component({ - selector: 'app-transport-udp', - templateUrl: './template.html', - styleUrls: ['./styles.less'], - standalone: false, -}) -@Ilc() -export class Setup extends SetupBase implements OnDestroy, AfterContentInit { - @Input() public update?: Subject; - - constructor(cdRef: ChangeDetectorRef) { - super(cdRef); - } - - public override ngAfterContentInit(): void { - this.update !== undefined && - this.env().subscriber.register( - this.update.subscribe(() => { - this.detectChanges(); - }), - ); - super.ngAfterContentInit(); - } -} -export interface Setup extends IlcInterface {} diff --git a/application/client/src/app/ui/tabs/observe/origin/stream/transport/setup/complete/udp/module.ts b/application/client/src/app/ui/tabs/observe/origin/stream/transport/setup/complete/udp/module.ts deleted file mode 100644 index d3cee77cb9..0000000000 --- a/application/client/src/app/ui/tabs/observe/origin/stream/transport/setup/complete/udp/module.ts +++ /dev/null @@ -1,34 +0,0 @@ -import { NgModule } from '@angular/core'; -import { CommonModule } from '@angular/common'; -import { FormsModule, ReactiveFormsModule } from '@angular/forms'; -import { MatButtonModule } from '@angular/material/button'; -import { MatCardModule } from '@angular/material/card'; -import { MatDividerModule } from '@angular/material/divider'; -import { MatProgressBarModule } from '@angular/material/progress-bar'; -import { MatIconModule } from '@angular/material/icon'; -import { MatFormFieldModule } from '@angular/material/form-field'; -import { MatSelectModule } from '@angular/material/select'; -import { MatInputModule } from '@angular/material/input'; - -import { Setup } from './component'; -import { BaseModule } from '../../bases/udp/module'; - -@NgModule({ - imports: [ - CommonModule, - FormsModule, - ReactiveFormsModule, - MatButtonModule, - MatCardModule, - MatDividerModule, - MatProgressBarModule, - MatIconModule, - MatFormFieldModule, - MatSelectModule, - MatInputModule, - BaseModule, - ], - declarations: [Setup], - exports: [Setup] -}) -export class SetupModule {} diff --git a/application/client/src/app/ui/tabs/observe/origin/stream/transport/setup/complete/udp/styles.less b/application/client/src/app/ui/tabs/observe/origin/stream/transport/setup/complete/udp/styles.less deleted file mode 100644 index 201ebcbb99..0000000000 --- a/application/client/src/app/ui/tabs/observe/origin/stream/transport/setup/complete/udp/styles.less +++ /dev/null @@ -1,28 +0,0 @@ -@import '../../../../../../../../styles/variables.less'; - - -:host { - position: relative; - display: block; - width: 100%; - & mat-form-field.full-width { - display: block; - } - & mat-form-field.inline { - margin-right: 12px; - } - div.mutlicasts{ - margin: 12px 0; - & p { - padding-top: 6px; - } - } - div.controlls{ - text-align: right; - } - & button { - position: relative; - display: inline-block; - margin: 6px 0 6px 6px; - } -} diff --git a/application/client/src/app/ui/tabs/observe/origin/stream/transport/setup/complete/udp/template.html b/application/client/src/app/ui/tabs/observe/origin/stream/transport/setup/complete/udp/template.html deleted file mode 100644 index 79aee38d2a..0000000000 --- a/application/client/src/app/ui/tabs/observe/origin/stream/transport/setup/complete/udp/template.html +++ /dev/null @@ -1,20 +0,0 @@ - - IP Address - - - Please enter a valid IPv4/IPv6 address - - - required - - -
- -

Multicasts

-
- -
- -
diff --git a/application/client/src/app/ui/tabs/observe/origin/stream/transport/setup/component.ts b/application/client/src/app/ui/tabs/observe/origin/stream/transport/setup/component.ts deleted file mode 100644 index 5f24f76559..0000000000 --- a/application/client/src/app/ui/tabs/observe/origin/stream/transport/setup/component.ts +++ /dev/null @@ -1,52 +0,0 @@ -import { Component, ChangeDetectorRef, Input, AfterContentInit } from '@angular/core'; -import { Ilc, IlcInterface } from '@env/decorators/component'; -import { ChangesDetector } from '@ui/env/extentions/changes'; -import { State } from './state'; - -import * as Stream from '@platform/types/observe/origin/stream'; - -@Component({ - selector: 'app-transport', - templateUrl: './template.html', - styleUrls: ['./styles.less'], - standalone: false, -}) -@Ilc() -export class Transport extends ChangesDetector implements AfterContentInit { - public Source = Stream.Stream.Source; - - @Input() public state!: State; - - public instance: { - [Stream.Stream.Source.Process]: Stream.Stream.Process.Configuration | undefined; - [Stream.Stream.Source.Serial]: Stream.Stream.Serial.Configuration | undefined; - [Stream.Stream.Source.UDP]: Stream.Stream.UDP.Configuration | undefined; - [Stream.Stream.Source.TCP]: Stream.Stream.TCP.Configuration | undefined; - } = { - [Stream.Stream.Source.Process]: undefined, - [Stream.Stream.Source.Serial]: undefined, - [Stream.Stream.Source.UDP]: undefined, - [Stream.Stream.Source.TCP]: undefined, - }; - - constructor(cdRef: ChangeDetectorRef) { - super(cdRef); - } - - public ngAfterContentInit(): void { - this.env().subscriber.register( - this.state.updated.subscribe(() => { - this.update().detectChanges(); - }), - ); - this.update(); - } - - protected update(): Transport { - (this.instance as any) = { - [this.state.configuration.instance.alias()]: this.state.configuration.instance, - }; - return this; - } -} -export interface Transport extends IlcInterface {} diff --git a/application/client/src/app/ui/tabs/observe/origin/stream/transport/setup/module.ts b/application/client/src/app/ui/tabs/observe/origin/stream/transport/setup/module.ts deleted file mode 100644 index 88c5de6b96..0000000000 --- a/application/client/src/app/ui/tabs/observe/origin/stream/transport/setup/module.ts +++ /dev/null @@ -1,32 +0,0 @@ -import { NgModule } from '@angular/core'; -import { CommonModule } from '@angular/common'; -import { FormsModule, ReactiveFormsModule } from '@angular/forms'; -import { MatButtonModule } from '@angular/material/button'; -import { MatDividerModule } from '@angular/material/divider'; -import { MatFormFieldModule } from '@angular/material/form-field'; -import { MatSelectModule } from '@angular/material/select'; -import { SetupModule as UdpSetupModule } from './complete/udp/module'; -import { SetupModule as TcpSetupModule } from './complete/tcp/module'; -import { SetupModule as SerialSetupModule } from './complete/serial/module'; -import { SetupModule as ProcessSetupModule } from './complete/process/module'; - -import { Transport } from './component'; - -@NgModule({ - imports: [ - CommonModule, - FormsModule, - ReactiveFormsModule, - MatButtonModule, - MatDividerModule, - MatFormFieldModule, - MatSelectModule, - UdpSetupModule, - TcpSetupModule, - SerialSetupModule, - ProcessSetupModule, - ], - declarations: [Transport], - exports: [Transport, UdpSetupModule, TcpSetupModule, SerialSetupModule, ProcessSetupModule], -}) -export class StreamsModule {} diff --git a/application/client/src/app/ui/tabs/observe/origin/stream/transport/setup/quick/process/component.ts b/application/client/src/app/ui/tabs/observe/origin/stream/transport/setup/quick/process/component.ts deleted file mode 100644 index 9fcdac6e3d..0000000000 --- a/application/client/src/app/ui/tabs/observe/origin/stream/transport/setup/quick/process/component.ts +++ /dev/null @@ -1,54 +0,0 @@ -import { - Component, - ChangeDetectorRef, - AfterContentInit, - OnDestroy, - ViewEncapsulation, -} from '@angular/core'; -import { Ilc, IlcInterface } from '@env/decorators/component'; -import { Options as AutocompleteOptions } from '@elements/autocomplete/component'; -import { Options as FoldersOptions } from '@elements/folderinput/component'; -import { Subject } from '@platform/env/subscription'; -import { CmdErrorState } from '../../bases/process/error'; -import { SetupBase } from '../../bases/process/component'; - -@Component({ - selector: 'app-process-quicksetup', - templateUrl: './template.html', - styleUrls: ['./styles.less'], - encapsulation: ViewEncapsulation.None, - standalone: false, -}) -@Ilc() -export class QuickSetup extends SetupBase implements AfterContentInit, OnDestroy { - public readonly inputs: { - cmd: AutocompleteOptions; - cwd: FoldersOptions; - } = { - cmd: { - name: 'CommandsRecentList', - storage: 'processes_cmd_recent', - defaults: '', - placeholder: 'Enter terminal command', - label: 'Terminal command', - recent: new Subject(), - error: new CmdErrorState(), - }, - cwd: { - placeholder: 'Enter working folder', - label: undefined, - defaults: '', - passive: true, - }, - }; - - constructor(cdRef: ChangeDetectorRef) { - super(cdRef); - this.setInputs(this.inputs); - } - - public destroy(): Promise { - return Promise.resolve(); - } -} -export interface QuickSetup extends IlcInterface {} diff --git a/application/client/src/app/ui/tabs/observe/origin/stream/transport/setup/quick/process/module.ts b/application/client/src/app/ui/tabs/observe/origin/stream/transport/setup/quick/process/module.ts deleted file mode 100644 index 684c7c7713..0000000000 --- a/application/client/src/app/ui/tabs/observe/origin/stream/transport/setup/quick/process/module.ts +++ /dev/null @@ -1,24 +0,0 @@ -import { NgModule } from '@angular/core'; -import { CommonModule } from '@angular/common'; -import { AutocompleteModule } from '@elements/autocomplete/module'; -import { FolderInputModule } from '@elements/folderinput/module'; -import { MatMenuModule } from '@angular/material/menu'; -import { MatDividerModule } from '@angular/material/divider'; -import { QuickSetup } from './component'; -import { MatProgressBarModule } from '@angular/material/progress-bar'; -import { MatProgressSpinnerModule } from '@angular/material/progress-spinner'; - -@NgModule({ - imports: [ - CommonModule, - AutocompleteModule, - FolderInputModule, - MatMenuModule, - MatDividerModule, - MatProgressBarModule, - MatProgressSpinnerModule, - ], - declarations: [QuickSetup], - exports: [QuickSetup] -}) -export class QuickSetupModule {} diff --git a/application/client/src/app/ui/tabs/observe/origin/stream/transport/setup/quick/process/styles.less b/application/client/src/app/ui/tabs/observe/origin/stream/transport/setup/quick/process/styles.less deleted file mode 100644 index eb5b473183..0000000000 --- a/application/client/src/app/ui/tabs/observe/origin/stream/transport/setup/quick/process/styles.less +++ /dev/null @@ -1,67 +0,0 @@ -@import '../../../../../../../../styles/variables.less'; - - -app-process-quicksetup { - position: relative; - display: block; - width: 100%; - & div.command { - position: relative; - display: flex; - width: 100%; - align-items: center; - margin-bottom: 6px; - & button { - margin-left: 6px; - } - } - & mat-form-field.full-width { - display: block; - } - & mat-form-field.outline { - margin: 0!important; - } - -} -.app-transport-process-menu { - & .mat-menu-item { - & > div.shell-profile { - position: relative; - margin-top: -7px; - & > span { - height: 16px; - line-height: 16px; - } - & > span.envvars-count { - color: var(--scheme-color-3); - } - & > span.shell-path { - position: relative; - display: block; - color: var(--scheme-color-3); - font-size: 10px; - max-width: 250px; - overflow: hidden; - text-overflow: ellipsis; - margin-top: -8px; - white-space: nowrap; - direction: rtl; - max-width: 200px; - } - } - } - & .mat-menu-item[data-selected="true"] { - & > div.shell-profile { - &::before { - display: block; - position: absolute; - width: 2px; - height: 24px; - background: var(--scheme-color-accent); - left: -9px; - top: 11px; - content: ''; - } - } - } -} \ No newline at end of file diff --git a/application/client/src/app/ui/tabs/observe/origin/stream/transport/setup/quick/process/template.html b/application/client/src/app/ui/tabs/observe/origin/stream/transport/setup/quick/process/template.html deleted file mode 100644 index b9e3bb02da..0000000000 --- a/application/client/src/app/ui/tabs/observe/origin/stream/transport/setup/quick/process/template.html +++ /dev/null @@ -1,50 +0,0 @@ -
- - -
- - - - - -

Available shells:

- -
- -

Loading profiles...

- -
- - -
diff --git a/application/client/src/app/ui/tabs/observe/origin/stream/transport/setup/quick/serial/component.ts b/application/client/src/app/ui/tabs/observe/origin/stream/transport/setup/quick/serial/component.ts deleted file mode 100644 index 3f0bda0436..0000000000 --- a/application/client/src/app/ui/tabs/observe/origin/stream/transport/setup/quick/serial/component.ts +++ /dev/null @@ -1,21 +0,0 @@ -import { Component, ChangeDetectorRef, OnDestroy, AfterContentInit } from '@angular/core'; -import { Ilc, IlcInterface } from '@env/decorators/component'; -import { SetupBase } from '../../bases/serial/component'; - -@Component({ - selector: 'app-serial-quicksetup', - templateUrl: './template.html', - styleUrls: ['./styles.less'], - standalone: false, -}) -@Ilc() -export class QuickSetup extends SetupBase implements AfterContentInit, OnDestroy { - constructor(cdRef: ChangeDetectorRef) { - super(cdRef); - } - - public connect() { - this.action.apply(); - } -} -export interface QuickSetup extends IlcInterface {} diff --git a/application/client/src/app/ui/tabs/observe/origin/stream/transport/setup/quick/serial/module.ts b/application/client/src/app/ui/tabs/observe/origin/stream/transport/setup/quick/serial/module.ts deleted file mode 100644 index 95da2b450a..0000000000 --- a/application/client/src/app/ui/tabs/observe/origin/stream/transport/setup/quick/serial/module.ts +++ /dev/null @@ -1,39 +0,0 @@ -import { NgModule } from '@angular/core'; -import { CommonModule } from '@angular/common'; -import { FormsModule, ReactiveFormsModule } from '@angular/forms'; -import { MatButtonModule } from '@angular/material/button'; -import { MatRadioModule } from '@angular/material/radio'; -import { MatCardModule } from '@angular/material/card'; -import { MatDividerModule } from '@angular/material/divider'; -import { MatProgressBarModule } from '@angular/material/progress-bar'; -import { MatIconModule } from '@angular/material/icon'; -import { MatFormFieldModule } from '@angular/material/form-field'; -import { MatSelectModule } from '@angular/material/select'; -import { MatInputModule } from '@angular/material/input'; -import { MatAutocompleteModule } from '@angular/material/autocomplete'; -import { BaseModule } from '../../bases/serial/module'; -import { QuickSetup } from './component'; -import { SetupModule } from '../../complete/serial/module'; - -@NgModule({ - imports: [ - CommonModule, - FormsModule, - ReactiveFormsModule, - MatButtonModule, - MatCardModule, - MatDividerModule, - MatProgressBarModule, - MatIconModule, - MatFormFieldModule, - MatSelectModule, - MatInputModule, - MatAutocompleteModule, - MatRadioModule, - BaseModule, - SetupModule, - ], - declarations: [QuickSetup], - exports: [QuickSetup], -}) -export class QuickSetupModule {} diff --git a/application/client/src/app/ui/tabs/observe/origin/stream/transport/setup/quick/serial/styles.less b/application/client/src/app/ui/tabs/observe/origin/stream/transport/setup/quick/serial/styles.less deleted file mode 100644 index 32de7112f4..0000000000 --- a/application/client/src/app/ui/tabs/observe/origin/stream/transport/setup/quick/serial/styles.less +++ /dev/null @@ -1,12 +0,0 @@ -@import '../../../../../../../../styles/variables.less'; - -:host { - position: relative; - display: block; - width: auto; - padding: 0 24px; - div.controlls{ - text-align: right; - padding: 8px 0 0 0; - } -} \ No newline at end of file diff --git a/application/client/src/app/ui/tabs/observe/origin/stream/transport/setup/quick/serial/template.html b/application/client/src/app/ui/tabs/observe/origin/stream/transport/setup/quick/serial/template.html deleted file mode 100644 index 5ed1034fc1..0000000000 --- a/application/client/src/app/ui/tabs/observe/origin/stream/transport/setup/quick/serial/template.html +++ /dev/null @@ -1,4 +0,0 @@ - -
- -
\ No newline at end of file diff --git a/application/client/src/app/ui/tabs/observe/origin/stream/transport/setup/quick/tcp/component.ts b/application/client/src/app/ui/tabs/observe/origin/stream/transport/setup/quick/tcp/component.ts deleted file mode 100644 index 76101e9545..0000000000 --- a/application/client/src/app/ui/tabs/observe/origin/stream/transport/setup/quick/tcp/component.ts +++ /dev/null @@ -1,21 +0,0 @@ -import { Component, ChangeDetectorRef, AfterContentInit } from '@angular/core'; -import { Ilc, IlcInterface } from '@env/decorators/component'; -import { SetupBase } from '../../bases/tcp/component'; - -@Component({ - selector: 'app-tcp-quicksetup', - templateUrl: './template.html', - styleUrls: ['./styles.less'], - standalone: false, -}) -@Ilc() -export class QuickSetup extends SetupBase implements AfterContentInit { - constructor(cdRef: ChangeDetectorRef) { - super(cdRef); - } - - public connect() { - this.action.apply(); - } -} -export interface QuickSetup extends IlcInterface {} diff --git a/application/client/src/app/ui/tabs/observe/origin/stream/transport/setup/quick/tcp/module.ts b/application/client/src/app/ui/tabs/observe/origin/stream/transport/setup/quick/tcp/module.ts deleted file mode 100644 index d25b0c9b98..0000000000 --- a/application/client/src/app/ui/tabs/observe/origin/stream/transport/setup/quick/tcp/module.ts +++ /dev/null @@ -1,32 +0,0 @@ -import { NgModule } from '@angular/core'; -import { CommonModule } from '@angular/common'; -import { FormsModule, ReactiveFormsModule } from '@angular/forms'; -import { MatButtonModule } from '@angular/material/button'; -import { MatCardModule } from '@angular/material/card'; -import { MatDividerModule } from '@angular/material/divider'; -import { MatProgressBarModule } from '@angular/material/progress-bar'; -import { MatIconModule } from '@angular/material/icon'; -import { MatFormFieldModule } from '@angular/material/form-field'; -import { MatSelectModule } from '@angular/material/select'; -import { MatInputModule } from '@angular/material/input'; - -import { QuickSetup } from './component'; - -@NgModule({ - imports: [ - CommonModule, - FormsModule, - ReactiveFormsModule, - MatButtonModule, - MatCardModule, - MatDividerModule, - MatProgressBarModule, - MatIconModule, - MatFormFieldModule, - MatSelectModule, - MatInputModule, - ], - declarations: [QuickSetup], - exports: [QuickSetup] -}) -export class QuickSetupModule {} diff --git a/application/client/src/app/ui/tabs/observe/origin/stream/transport/setup/quick/tcp/styles.less b/application/client/src/app/ui/tabs/observe/origin/stream/transport/setup/quick/tcp/styles.less deleted file mode 100644 index 537eda256d..0000000000 --- a/application/client/src/app/ui/tabs/observe/origin/stream/transport/setup/quick/tcp/styles.less +++ /dev/null @@ -1,25 +0,0 @@ -@import '../../../../../../../../styles/variables.less'; - - -:host { - position: relative; - display: block; - width: 100%; - & mat-form-field { - width: 100%; - } - & mat-form-field.full-width { - display: block; - } - & mat-form-field.inline { - margin-right: 12px; - } - div.controlls{ - text-align: right; - } - & button { - position: relative; - display: inline-block; - margin: 6px 0 6px 6px; - } -} diff --git a/application/client/src/app/ui/tabs/observe/origin/stream/transport/setup/quick/tcp/template.html b/application/client/src/app/ui/tabs/observe/origin/stream/transport/setup/quick/tcp/template.html deleted file mode 100644 index 1ec1653777..0000000000 --- a/application/client/src/app/ui/tabs/observe/origin/stream/transport/setup/quick/tcp/template.html +++ /dev/null @@ -1,13 +0,0 @@ - - IP Address - - - Please enter a valid IPv4/IPv6 address - - - required - - -
- -
\ No newline at end of file diff --git a/application/client/src/app/ui/tabs/observe/origin/stream/transport/setup/quick/udp/component.ts b/application/client/src/app/ui/tabs/observe/origin/stream/transport/setup/quick/udp/component.ts deleted file mode 100644 index 8856acba55..0000000000 --- a/application/client/src/app/ui/tabs/observe/origin/stream/transport/setup/quick/udp/component.ts +++ /dev/null @@ -1,21 +0,0 @@ -import { Component, ChangeDetectorRef, OnDestroy, AfterContentInit } from '@angular/core'; -import { Ilc, IlcInterface } from '@env/decorators/component'; -import { SetupBase } from '../../bases/udp/component'; - -@Component({ - selector: 'app-udp-quicksetup', - templateUrl: './template.html', - styleUrls: ['./styles.less'], - standalone: false, -}) -@Ilc() -export class QuickSetup extends SetupBase implements OnDestroy, AfterContentInit { - constructor(cdRef: ChangeDetectorRef) { - super(cdRef); - } - - public connect() { - this.action.apply(); - } -} -export interface QuickSetup extends IlcInterface {} diff --git a/application/client/src/app/ui/tabs/observe/origin/stream/transport/setup/quick/udp/module.ts b/application/client/src/app/ui/tabs/observe/origin/stream/transport/setup/quick/udp/module.ts deleted file mode 100644 index 5bf02f945f..0000000000 --- a/application/client/src/app/ui/tabs/observe/origin/stream/transport/setup/quick/udp/module.ts +++ /dev/null @@ -1,34 +0,0 @@ -import { NgModule } from '@angular/core'; -import { CommonModule } from '@angular/common'; -import { FormsModule, ReactiveFormsModule } from '@angular/forms'; -import { MatButtonModule } from '@angular/material/button'; -import { MatCardModule } from '@angular/material/card'; -import { MatDividerModule } from '@angular/material/divider'; -import { MatProgressBarModule } from '@angular/material/progress-bar'; -import { MatIconModule } from '@angular/material/icon'; -import { MatFormFieldModule } from '@angular/material/form-field'; -import { MatSelectModule } from '@angular/material/select'; -import { MatInputModule } from '@angular/material/input'; - -import { QuickSetup } from './component'; -import { BaseModule } from '../../bases/udp/module'; - -@NgModule({ - imports: [ - CommonModule, - FormsModule, - ReactiveFormsModule, - MatButtonModule, - MatCardModule, - MatDividerModule, - MatProgressBarModule, - MatIconModule, - MatFormFieldModule, - MatSelectModule, - MatInputModule, - BaseModule, - ], - declarations: [QuickSetup], - exports: [QuickSetup] -}) -export class QuickSetupModule {} diff --git a/application/client/src/app/ui/tabs/observe/origin/stream/transport/setup/quick/udp/styles.less b/application/client/src/app/ui/tabs/observe/origin/stream/transport/setup/quick/udp/styles.less deleted file mode 100644 index c7c410479d..0000000000 --- a/application/client/src/app/ui/tabs/observe/origin/stream/transport/setup/quick/udp/styles.less +++ /dev/null @@ -1,31 +0,0 @@ -@import '../../../../../../../../styles/variables.less'; - - -:host { - position: relative; - display: block; - width: 100%; - & mat-form-field { - width: 100%; - } - & mat-form-field.full-width { - display: block; - } - & mat-form-field.inline { - margin-right: 12px; - } - div.mutlicasts{ - margin: 12px 0; - & p { - padding-top: 6px; - } - } - div.controlls{ - text-align: right; - } - & button { - position: relative; - display: inline-block; - margin: 6px 0 6px 6px; - } -} diff --git a/application/client/src/app/ui/tabs/observe/origin/stream/transport/setup/quick/udp/template.html b/application/client/src/app/ui/tabs/observe/origin/stream/transport/setup/quick/udp/template.html deleted file mode 100644 index 8fdbe94855..0000000000 --- a/application/client/src/app/ui/tabs/observe/origin/stream/transport/setup/quick/udp/template.html +++ /dev/null @@ -1,21 +0,0 @@ - - IP Address - - - Please enter a valid IPv4/IPv6 address - - - required - - -
- -

Multicasts

-
- -
- - -
diff --git a/application/client/src/app/ui/tabs/observe/origin/stream/transport/setup/state.ts b/application/client/src/app/ui/tabs/observe/origin/stream/transport/setup/state.ts deleted file mode 100644 index dfd8dd4c9a..0000000000 --- a/application/client/src/app/ui/tabs/observe/origin/stream/transport/setup/state.ts +++ /dev/null @@ -1,45 +0,0 @@ -import { Subject } from '@platform/env/subscription'; -import { Action } from '@ui/tabs/observe/action'; - -import * as Stream from '@platform/types/observe/origin/stream/index'; - -export class State { - protected readonly history: Map = new Map(); - - public source: Stream.Source; - public updated: Subject = new Subject(); - - constructor( - public readonly action: Action, - public readonly configuration: Stream.Configuration, - ) { - this.source = Stream.getAliasByConfiguration(configuration.configuration); - this.action = action; - } - - public destroy() { - this.updated.destroy(); - } - - public from(configuration: Stream.IConfiguration) { - this.history.set( - this.configuration.instance.alias(), - this.configuration.instance.configuration, - ); - this.configuration.change().byConfiguration(configuration); - this.source = Stream.getAliasByConfiguration(configuration); - this.updated.emit(); - } - - public switch(source: Stream.Source) { - this.history.set( - this.configuration.instance.alias(), - this.configuration.instance.configuration, - ); - this.configuration - .change() - .byDeclaration(Stream.getByAlias(source, this.history.get(source))); - this.source = source; - this.updated.emit(); - } -} diff --git a/application/client/src/app/ui/tabs/observe/origin/stream/transport/setup/states/process.ts b/application/client/src/app/ui/tabs/observe/origin/stream/transport/setup/states/process.ts deleted file mode 100644 index c11b84b2e6..0000000000 --- a/application/client/src/app/ui/tabs/observe/origin/stream/transport/setup/states/process.ts +++ /dev/null @@ -1,104 +0,0 @@ -import { ShellProfile } from '@platform/types/bindings'; -import { bridge } from '@service/bridge'; -import { Destroy } from '@platform/types/env/types'; -import { Action } from '../../../../../action'; - -import * as obj from '@platform/env/obj'; -import * as Stream from '@platform/types/observe/origin/stream/index'; - -const ROOTS_STORAGE_KEY = 'user_selected_profile'; -const ENTRY_KEY = 'selected_profile_path'; - -export class State implements Destroy { - public profiles: { - all: ShellProfile[] | undefined; - valid: ShellProfile[] | undefined; - } = { - all: undefined, - valid: undefined, - }; - public current: ShellProfile | undefined; - /// Environment variables for in Chipmunk. - public envs: { [key: string]: string } = {}; - - constructor( - public readonly action: Action, - public readonly configuration: Stream.Process.Configuration, - ) {} - - public destroy(): void { - // Having method "destroy()" is requirement of session's storage - } - - public setProfiles(profiles: ShellProfile[]): Promise { - const valid: ShellProfile[] = []; - profiles.forEach((profile) => { - if (valid.find((p) => p.path === profile.path) === undefined) { - valid.push(profile); - } - }); - this.profiles.all = profiles; - this.profiles.valid = valid; - return this.storage() - .get() - .then((path: string | undefined) => { - this.current = this.profiles.all?.find((p) => p.path === path); - this.configuration.configuration.shell = this.current; - }); - } - - public isProfilesLoaded(): boolean { - return this.profiles.all !== undefined; - } - - public setCurrentProfile(profile: ShellProfile | undefined): Promise { - if (profile === undefined) { - this.current = undefined; - this.configuration.configuration.shell = undefined; - return this.storage().set(undefined); - } else { - this.current = profile; - this.configuration.configuration.shell = this.current; - return this.storage().set(profile.path); - } - } - - public getSelectedEnvs(): Map { - return obj.objToStringMap(this.envs); - } - - public isShellSelected(profile: ShellProfile): boolean { - return this.current ? profile.path === this.current.path : false; - } - - protected storage(): { - get(): Promise; - set(path: string | undefined): Promise; - } { - return { - get: (): Promise => { - return new Promise((resolve, reject) => { - bridge - .entries({ key: ROOTS_STORAGE_KEY }) - .get() - .then((entries) => { - resolve(entries.length === 0 ? undefined : entries[0].content); - }) - .catch(reject); - }); - }, - set: (path: string | undefined): Promise => { - if (path === undefined) { - return bridge.entries({ key: ROOTS_STORAGE_KEY }).delete([ENTRY_KEY]); - } else { - return bridge.entries({ key: ROOTS_STORAGE_KEY }).overwrite([ - { - uuid: ENTRY_KEY, - content: path, - }, - ]); - } - }, - }; - } -} diff --git a/application/client/src/app/ui/tabs/observe/origin/stream/transport/setup/states/serial.ts b/application/client/src/app/ui/tabs/observe/origin/stream/transport/setup/states/serial.ts deleted file mode 100644 index d902a5254b..0000000000 --- a/application/client/src/app/ui/tabs/observe/origin/stream/transport/setup/states/serial.ts +++ /dev/null @@ -1,269 +0,0 @@ -import { bridge } from '@service/bridge'; -import { scope } from '@platform/env/scope'; -import { Subject } from '@platform/env/subscription'; -import { error } from '@platform/log/utils'; -import { Destroy } from '@platform/types/env/types'; -import { Action } from '../../../../../action'; - -import * as Stream from '@platform/types/observe/origin/stream/index'; - -const SERIAL_PORT_SETTINGS_STORAGE = 'serial_port_settings'; -const REGULAR_RESCAN_PORTS_DURATION_MS = 3000; -const NOPORTS_RESCAN_PORTS_DURATION_MS = 1000; - -const CUSTOM_BAUD_RATE_REF = 'Custom'; -const BAUD_RATE = [ - CUSTOM_BAUD_RATE_REF, - 50, - 75, - 110, - 134, - 150, - 200, - 300, - 600, - 1200, - 1800, - 2400, - 4800, - 9600, - 19200, - 38400, - 57600, - 115200, - 230400, - 460800, - 500000, - 576000, - 921600, - 1000000, - 1152000, - 1500000, - 2000000, - 2500000, - 3000000, - 3500000, - 4000000, -]; -const DATA_BITS: number[] = [8, 7, 6, 5]; -const FLOW_CONTROL = [ - { value: 0, name: 'None' }, - { value: 1, name: 'Hardware' }, - { value: 2, name: 'Software' }, -]; -const PARITY = [ - { value: 0, name: 'None' }, - { value: 1, name: 'Odd' }, - { value: 2, name: 'Even' }, -]; -const STOP_BITS = [1, 2]; -const EXCLUSIVE = [ - { value: true, name: 'Yes (default)' }, - { value: false, name: 'No' }, -]; -const DELAY = [ - { value: 0, name: 'No delay (default)' }, - { value: 10, name: '10 ms' }, - { value: 20, name: '20 ms' }, - { value: 30, name: '30 ms' }, - { value: 40, name: '40 ms' }, - { value: 50, name: '50 ms' }, -]; - -export class State implements Destroy { - public ports: string[] = []; - public changed: Subject = new Subject(); - public baudRateProxy: number | string = 115200; - public loaded: boolean = false; - - public BAUD_RATE = BAUD_RATE; - public DATA_BITS = DATA_BITS; - public FLOW_CONTROL = FLOW_CONTROL; - public PARITY = PARITY; - public STOP_BITS = STOP_BITS; - public EXCLUSIVE = EXCLUSIVE; - public DELAY = DELAY; - - protected timer: number = -1; - protected states: Map = new Map(); - protected prev: string = ''; - - constructor( - public readonly action: Action, - public readonly configuration: Stream.Serial.Configuration, - ) { - this.history().load(); - } - - public destroy(): void { - // Having method "destroy()" is requirement of session's storage - } - - public scan(): { - start(): void; - stop(): void; - } { - const logger = scope.getLogger('SerialPorts Scanner'); - return { - start: (): void => { - function isSame(prev: string[], current: string[]): boolean { - return prev.join(';') === current.join(';'); - } - this.scan().stop(); - bridge - .ports() - .list() - .then((ports: string[]) => { - this.loaded = true; - if (!isSame(this.ports.slice(1), ports)) { - this.ports = ports; - } - this.changed.emit(); - // if (this.ports.includes(this.configuration.configuration.path)) { - // return; - // } - // this.configuration.configuration.path = - // this.ports[0] === undefined ? '' : this.ports[0]; - // this.configuration.configuration.path !== '' && - // this.history().restore(this.configuration.configuration.path); - // this.prev = this.configuration.configuration.path; - // this.changed.emit(); - }) - .catch((err: Error) => { - logger.error(`Fail to update ports list due error: ${err.message}`); - }) - .finally(() => { - this.timer = setTimeout( - () => { - this.scan().start(); - }, - this.ports.length === 0 - ? NOPORTS_RESCAN_PORTS_DURATION_MS - : REGULAR_RESCAN_PORTS_DURATION_MS, - ) as unknown as number; - }); - }, - stop: (): void => { - clearTimeout(this.timer); - }, - }; - } - - public isEmpty(): boolean { - return this.ports.length === 0; - } - - public history(): { - update(path: string): void; - restore(path: string): void; - load(): void; - save(): void; - } { - const logger = scope.getLogger('SerialPorts Settings History'); - return { - update: (path: string): void => { - if (this.prev !== '') { - this.states.set(this.prev, this.configuration.configuration); - } - this.history().restore(path); - this.prev = path; - this.history().save(); - this.changed.emit(); - }, - restore: (path: string): void => { - const state = this.states.get(path); - this.configuration.overwrite( - state === undefined ? Stream.Serial.Configuration.initial() : state, - ); - this.baudRateProxtUpdate(); - this.configuration.configuration.path = path; - }, - load: (): void => { - bridge - .storage(SERIAL_PORT_SETTINGS_STORAGE) - .read() - .then((content: string) => { - if (content === '') { - return; - } - try { - const map = JSON.parse(content); - if (!(map instanceof Array)) { - logger.warn(`Invalid format of history`); - return; - } - this.states.clear(); - map.forEach((pair) => { - if (pair instanceof Array && pair.length === 2) { - this.states.set(pair[0], pair[1]); - } - }); - this.configuration.configuration.path !== '' && - this.history().restore(this.configuration.configuration.path); - } catch (e) { - logger.warn(`Fail to parse history: ${error(e)}`); - } - }) - .catch((err: Error) => { - logger.warn(`Fail to get history: ${err.message}`); - }); - }, - save: (): void => { - const map: [string, Stream.Serial.IConfiguration][] = []; - this.states.forEach((value, key) => { - map.push([key, value]); - }); - bridge - .storage(SERIAL_PORT_SETTINGS_STORAGE) - .write(JSON.stringify(map)) - .catch((err: Error) => { - logger.warn(`Fail to save history: ${err.message}`); - }); - }, - }; - } - - public isBoudRateCustom(): boolean { - return this.baudRateProxy === CUSTOM_BAUD_RATE_REF; - } - - public baudRateChange(): void { - this.configuration.configuration.baud_rate = - typeof this.baudRateProxy === 'string' - ? this.configuration.configuration.baud_rate - : this.baudRateProxy; - this.configuration.configuration.baud_rate = - typeof this.configuration.configuration.baud_rate === 'string' - ? parseInt(this.configuration.configuration.baud_rate, 10) - : this.configuration.configuration.baud_rate; - if ( - isNaN(this.configuration.configuration.baud_rate) || - !isFinite(this.configuration.configuration.baud_rate) - ) { - this.configuration.configuration.baud_rate = - Stream.Serial.Configuration.initial().baud_rate; - } - this.changed.emit(); - } - - public defaluts(): void { - const path = this.configuration.configuration.path; - this.configuration.overwrite(Stream.Serial.Configuration.initial()); - this.configuration.configuration.path = path; - this.states.set(this.configuration.configuration.path, this.configuration.configuration); - this.baudRateProxtUpdate(); - this.history().save(); - this.changed.emit(); - } - - protected baudRateProxtUpdate(): void { - if ( - this.BAUD_RATE.find((r) => r == this.configuration.configuration.baud_rate) === - undefined - ) { - this.baudRateProxy = CUSTOM_BAUD_RATE_REF; - } else { - this.baudRateProxy = this.configuration.configuration.baud_rate; - } - } -} diff --git a/application/client/src/app/ui/tabs/observe/origin/stream/transport/setup/states/tcp.ts b/application/client/src/app/ui/tabs/observe/origin/stream/transport/setup/states/tcp.ts deleted file mode 100644 index 133c2bdd33..0000000000 --- a/application/client/src/app/ui/tabs/observe/origin/stream/transport/setup/states/tcp.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { Destroy } from '@platform/types/env/types'; -import { Action } from '@ui/tabs/observe/action'; - -import * as Errors from '../bases/tcp/error'; -import * as Stream from '@platform/types/observe/origin/stream/index'; - -export class State implements Destroy { - public errors: { - address: Errors.ErrorState; - }; - - constructor( - public readonly action: Action, - public readonly configuration: Stream.TCP.Configuration, - ) { - this.errors = { - address: new Errors.ErrorState(Errors.Field.address, () => { - // this.update(); - }), - }; - } - - public destroy(): void { - // Having method "destroy()" is requirement of session's storage - } - - public isValid(): boolean { - if (!this.errors.address.isValid()) { - return false; - } - return true; - } - - public drop() { - this.configuration.configuration.bind_addr = Stream.TCP.Configuration.initial().bind_addr; - } - -} diff --git a/application/client/src/app/ui/tabs/observe/origin/stream/transport/setup/states/udp.ts b/application/client/src/app/ui/tabs/observe/origin/stream/transport/setup/states/udp.ts deleted file mode 100644 index 6aa9fd202f..0000000000 --- a/application/client/src/app/ui/tabs/observe/origin/stream/transport/setup/states/udp.ts +++ /dev/null @@ -1,45 +0,0 @@ -import { Destroy } from '@platform/types/env/types'; -import { Action } from '../../../../../action'; - -import * as Errors from '../bases/udp/error'; -import * as Stream from '@platform/types/observe/origin/stream/index'; - -const MULTICAST_ADDR = '255.255.255.255'; -const MULTUCAST_INTERFACE = '0.0.0.0'; - -export class State implements Destroy { - public errors: { - address: Errors.ErrorState; - }; - - constructor( - public readonly action: Action, - public readonly configuration: Stream.UDP.Configuration, - ) { - this.errors = { - address: new Errors.ErrorState(Errors.Field.bindingAddress, () => { - // this.update(); - }), - }; - } - - public destroy(): void { - // Having method "destroy()" is requirement of session's storage - } - - public drop() { - this.configuration.configuration.bind_addr = Stream.UDP.Configuration.initial().bind_addr; - this.configuration.configuration.multicast = Stream.UDP.Configuration.initial().multicast; - } - - public addMulticast() { - this.configuration.configuration.multicast.push({ - multiaddr: MULTICAST_ADDR, - interface: MULTUCAST_INTERFACE, - }); - } - - public removeMulticast(index: number) { - index > -1 && this.configuration.configuration.multicast.splice(index, 1); - } -} diff --git a/application/client/src/app/ui/tabs/observe/origin/stream/transport/setup/styles.less b/application/client/src/app/ui/tabs/observe/origin/stream/transport/setup/styles.less deleted file mode 100644 index 51a34a89c7..0000000000 --- a/application/client/src/app/ui/tabs/observe/origin/stream/transport/setup/styles.less +++ /dev/null @@ -1,19 +0,0 @@ -@import '../../../../../../styles/variables.less'; - - -:host { - position: relative; - display: block; - width: 100%; - & mat-form-field.full-width { - display: block; - } - & mat-form-field.inline { - margin-right: 12px; - } - & button { - position: relative; - display: inline-block; - margin: 6px 0 6px 6px; - } -} \ No newline at end of file diff --git a/application/client/src/app/ui/tabs/observe/origin/stream/transport/setup/template.html b/application/client/src/app/ui/tabs/observe/origin/stream/transport/setup/template.html deleted file mode 100644 index effbaf0d68..0000000000 --- a/application/client/src/app/ui/tabs/observe/origin/stream/transport/setup/template.html +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/application/client/src/app/ui/tabs/observe/parsers/extra/component.ts b/application/client/src/app/ui/tabs/observe/parsers/extra/component.ts deleted file mode 100644 index a70358b249..0000000000 --- a/application/client/src/app/ui/tabs/observe/parsers/extra/component.ts +++ /dev/null @@ -1,26 +0,0 @@ -import { Component, ChangeDetectorRef, Input, AfterContentInit } from '@angular/core'; -import { Ilc, IlcInterface } from '@env/decorators/component'; -import { Initial } from '@env/decorators/initial'; -import { ChangesDetector } from '@ui/env/extentions/changes'; -import { State } from '../state'; - -@Component({ - selector: 'app-el-parser-extra', - templateUrl: './template.html', - styleUrls: ['./styles.less'], - standalone: false, -}) -@Initial() -@Ilc() -export class ParserExtraConfiguration extends ChangesDetector implements AfterContentInit { - @Input() state!: State; - - constructor(cdRef: ChangeDetectorRef) { - super(cdRef); - } - - public ngAfterContentInit(): void { - this.state.bind(this); - } -} -export interface ParserExtraConfiguration extends IlcInterface {} diff --git a/application/client/src/app/ui/tabs/observe/parsers/extra/dlt/component.ts b/application/client/src/app/ui/tabs/observe/parsers/extra/dlt/component.ts deleted file mode 100644 index eb817b3b75..0000000000 --- a/application/client/src/app/ui/tabs/observe/parsers/extra/dlt/component.ts +++ /dev/null @@ -1,168 +0,0 @@ -import { - Component, - ChangeDetectorRef, - Input, - AfterContentInit, - AfterViewInit, -} from '@angular/core'; -import { Ilc, IlcInterface } from '@env/decorators/component'; -import { Initial } from '@env/decorators/initial'; -import { ChangesDetector } from '@ui/env/extentions/changes'; -import { bytesToStr, timestampToUTC } from '@env/str'; -import { State } from './state'; -import { Observe } from '@platform/types/observe'; - -@Component({ - selector: 'app-el-dlt-extra', - templateUrl: './template.html', - styleUrls: ['./styles.less'], - standalone: false, -}) -@Initial() -@Ilc() -export class DltExtraConfiguration - extends ChangesDetector - implements AfterContentInit, AfterViewInit -{ - @Input() observe!: Observe; - - protected state!: State; - - public bytesToStr = bytesToStr; - public timestampToUTC = timestampToUTC; - public error: string | undefined; - - constructor(cdRef: ChangeDetectorRef) { - super(cdRef); - } - - public ngAfterContentInit(): void { - this.state = new State(this.observe); - this.state.bind(this); - } - - public ngAfterViewInit(): void { - this.state - .struct() - .load() - .catch((err: Error) => { - this.log().error(`Fail load DLT statistics: ${err.message}`); - this.error = err.message; - this.detectChanges(); - }); - } - - public ngOnEntitySelect() { - this.state.buildSummary().selected(); - this.detectChanges(); - } - - public ngContextMenu(event: MouseEvent) { - const after = () => { - this.state.buildSummary().selected(); - this.detectChanges(); - }; - this.ilc().emitter.ui.contextmenu.open({ - items: [ - { - caption: 'Select all', - handler: () => { - this.state.structure.forEach((section) => { - section.entities.forEach((e) => e.select()); - }); - after(); - }, - }, - { - caption: 'Unselect all', - handler: () => { - this.state.structure.forEach((section) => { - section.entities.forEach((e) => e.unselect()); - }); - after(); - }, - }, - { - caption: 'Reverse selection', - handler: () => { - this.state.structure.forEach((section) => { - section.entities.forEach((e) => e.toggle()); - }); - after(); - }, - }, - {}, - { - caption: 'Select with fotal', - handler: () => { - this.state.structure.forEach((section) => { - section.entities.forEach((e) => { - e.log_fatal > 0 && e.select(); - }); - }); - after(); - }, - }, - { - caption: 'Select with errors', - handler: () => { - this.state.structure.forEach((section) => { - section.entities.forEach((e) => { - e.log_error > 0 && e.select(); - }); - }); - after(); - }, - }, - { - caption: 'Select with warnings', - handler: () => { - this.state.structure.forEach((section) => { - section.entities.forEach((e) => { - e.log_warning > 0 && e.select(); - }); - }); - after(); - }, - }, - {}, - { - caption: 'Unselect without fotal', - handler: () => { - this.state.structure.forEach((section) => { - section.entities.forEach((e) => { - e.log_fatal === 0 && e.unselect(); - }); - }); - after(); - }, - }, - { - caption: 'Unselect without errors', - handler: () => { - this.state.structure.forEach((section) => { - section.entities.forEach((e) => { - e.log_error === 0 && e.unselect(); - }); - }); - after(); - }, - }, - { - caption: 'Unselect without warnings', - handler: () => { - this.state.structure.forEach((section) => { - section.entities.forEach((e) => { - e.log_warning === 0 && e.unselect(); - }); - }); - after(); - }, - }, - ], - x: event.x, - y: event.y, - }); - } -} -export interface DltExtraConfiguration extends IlcInterface {} diff --git a/application/client/src/app/ui/tabs/observe/parsers/extra/dlt/module.ts b/application/client/src/app/ui/tabs/observe/parsers/extra/dlt/module.ts deleted file mode 100644 index 760ef5b981..0000000000 --- a/application/client/src/app/ui/tabs/observe/parsers/extra/dlt/module.ts +++ /dev/null @@ -1,40 +0,0 @@ -import { NgModule } from '@angular/core'; -import { CommonModule } from '@angular/common'; -import { FormsModule, ReactiveFormsModule } from '@angular/forms'; -import { MatButtonModule } from '@angular/material/button'; -import { MatCardModule } from '@angular/material/card'; -import { MatDividerModule } from '@angular/material/divider'; -import { MatChipsModule } from '@angular/material/chips'; -import { MatProgressBarModule } from '@angular/material/progress-bar'; -import { MatIconModule } from '@angular/material/icon'; -import { MatFormFieldModule } from '@angular/material/form-field'; -import { MatSelectModule } from '@angular/material/select'; -import { MatListModule } from '@angular/material/list'; -import { MatTableModule } from '@angular/material/table'; -import { MatSortModule } from '@angular/material/sort'; - -import { DltExtraConfiguration } from './component'; -import { DltExtraConfigurationStructure } from './structure/component'; - -@NgModule({ - imports: [ - CommonModule, - FormsModule, - ReactiveFormsModule, - MatButtonModule, - MatCardModule, - MatDividerModule, - MatProgressBarModule, - MatChipsModule, - MatIconModule, - MatFormFieldModule, - MatSelectModule, - MatListModule, - MatTableModule, - MatSortModule, - ], - declarations: [DltExtraConfiguration, DltExtraConfigurationStructure], - exports: [DltExtraConfiguration], - bootstrap: [DltExtraConfiguration, DltExtraConfigurationStructure], -}) -export class DltExtraConfigurationModule {} diff --git a/application/client/src/app/ui/tabs/observe/parsers/extra/dlt/state.ts b/application/client/src/app/ui/tabs/observe/parsers/extra/dlt/state.ts deleted file mode 100644 index 9067f14986..0000000000 --- a/application/client/src/app/ui/tabs/observe/parsers/extra/dlt/state.ts +++ /dev/null @@ -1,192 +0,0 @@ -import { State as Base } from '../../state'; -import { Section } from './structure/section'; -import { Summary } from './summary'; -import { StatEntity } from './structure/statentity'; -import { getTypedProp } from '@platform/env/obj'; -import { DltStatisticInfo, DltLevelDistribution } from '@platform/types/bindings'; - -import * as Dlt from '@platform/types/observe/parser/dlt'; - -export const ENTITIES = { - app_ids: 'app_ids', - context_ids: 'context_ids', - ecu_ids: 'ecu_ids', -}; - -export const NAMES: { [key: string]: string } = { - [ENTITIES.app_ids]: 'Applications', - [ENTITIES.context_ids]: 'Contexts', - [ENTITIES.ecu_ids]: 'ECUs', -}; -export class State extends Base { - public structure: Section[] = []; - public stat: DltStatisticInfo | undefined; - public summary: { - total: Summary; - selected: Summary; - } = { - total: new Summary(), - selected: new Summary(), - }; - - protected files(): string[] { - const files = this.observe.origin.files(); - if (files === undefined) { - throw new Error( - `Extra settings of DLT parser are available only for File and Concat origins`, - ); - } - return typeof files === 'string' ? [files] : files; - } - - protected filters(): Dlt.IFilters | undefined { - const parser = this.observe.parser.as(Dlt.Configuration); - if (parser === undefined) { - throw new Error(`Observe object uses not ${Dlt.Configuration.alias()} parser.`); - } - return parser.configuration.filter_config; - } - - public isStatLoaded(): boolean { - return this.stat !== undefined; - } - - public getSelectedEntities(): StatEntity[] { - let selected: StatEntity[] = []; - this.structure.forEach((section) => { - selected = selected.concat(section.getSelected()); - }); - return selected; - } - - public struct(): { - load(): Promise; - build(preselection?: Dlt.IFilters): void; - filter(value: string): void; - supported(): boolean; - } { - return { - supported: (): boolean => { - const parser = this.observe.parser.as(Dlt.Configuration); - return parser === undefined ? false : parser.configuration.with_storage_header; - }, - load: (): Promise => { - if (!this.struct().supported()) { - return Promise.resolve(); - } - return this.ref - .ilc() - .services.system.bridge.dlt() - .stat(this.files()) - .then((stat) => { - // this.tab.setTitle( - // this.files.length === 1 - // ? this.files[0].name - // : `${this.files.length} DLT files`, - // ); - this.stat = stat; - this.struct().build(this.filters()); - this.ref.detectChanges(); - }); - }, - build: (preselection?: Dlt.IFilters): void => { - if (!this.struct().supported()) { - return; - } - if (this.stat === undefined) { - return; - } - const stat = this.stat; - const structure: Section[] = []; - ['app_ids', 'context_ids', 'ecu_ids'].forEach((key: string) => { - const content: Array<[string, DltLevelDistribution]> = getTypedProp< - DltStatisticInfo, - Array<[string, DltLevelDistribution]> - >(stat, key); - const entities: StatEntity[] = content.map((record) => { - const entity = new StatEntity(record[0], key, record[1], this.matcher); - if ( - preselection !== undefined && - (preselection as any)[key] !== undefined - ) { - if ( - ((preselection as any)[key] as string[]).indexOf(record[0]) !== -1 - ) { - entity.select(); - } - } - return entity; - }); - structure.push(new Section(key, NAMES[key]).fill(entities)); - }); - this.structure = structure; - this.buildSummary().all(); - }, - filter: (value: string): void => { - if (!this.struct().supported()) { - return; - } - this.matcher.search(value); - this.structure.forEach((structure) => { - structure.entities.sort( - (a: StatEntity, b: StatEntity) => b.getScore() - a.getScore(), - ); - structure.update.emit(); - }); - }, - }; - } - - public buildSummary(): { - total(): void; - selected(): void; - all(): void; - } { - return { - total: (): void => { - this.summary.total.reset(); - this.structure.forEach((structure) => { - structure.entities.forEach((entity) => { - this.summary.total.inc(entity); - }); - }); - }, - selected: (): void => { - this.summary.selected.reset(); - this.structure.forEach((structure) => { - structure.entities.forEach((entity) => { - entity.selected && this.summary.selected.inc(entity); - }); - }); - const conf = this.observe.parser.as(Dlt.Configuration); - if (conf === undefined) { - return; - } - conf.setDefaultsFilterConfig(); - let app_id_count = 0; - let context_id_count = 0; - this.structure.forEach((structure) => { - if (structure.key === ENTITIES.app_ids) { - app_id_count = structure.entities.length; - } else if (structure.key === ENTITIES.context_ids) { - context_id_count = structure.entities.length; - } - const selected = structure.getSelected().map((f) => f.id); - if (selected.length === 0) { - (conf.configuration.filter_config as any)[structure.key] = undefined; - } else { - (conf.configuration.filter_config as any)[structure.key] = selected; - } - }); - if (conf.configuration.filter_config) { - conf.configuration.filter_config.app_id_count = app_id_count; - conf.configuration.filter_config.context_id_count = context_id_count; - } - }, - all: (): void => { - this.buildSummary().total(); - this.buildSummary().selected(); - }, - }; - } -} diff --git a/application/client/src/app/ui/tabs/observe/parsers/extra/dlt/structure/component.ts b/application/client/src/app/ui/tabs/observe/parsers/extra/dlt/structure/component.ts deleted file mode 100644 index a958c96ce1..0000000000 --- a/application/client/src/app/ui/tabs/observe/parsers/extra/dlt/structure/component.ts +++ /dev/null @@ -1,98 +0,0 @@ -import { - Component, - ViewChild, - ChangeDetectorRef, - AfterViewInit, - AfterContentInit, - Input, - Output, - EventEmitter, - ViewEncapsulation, -} from '@angular/core'; -import { DomSanitizer, SafeHtml } from '@angular/platform-browser'; -import { Ilc, IlcInterface } from '@env/decorators/component'; -import { ChangesDetector } from '@ui/env/extentions/changes'; -import { MatSort } from '@angular/material/sort'; -import { MatTableDataSource } from '@angular/material/table'; -import { StatEntity } from './statentity'; -import { Section } from './section'; -import { MatTable } from '@angular/material/table'; - -export const COLUMNS = { - id: 'id', - non_log: 'non_log', - log_fatal: 'log_fatal', - log_error: 'log_error', - log_warning: 'log_warning', - log_info: 'log_info', - log_debug: 'log_debug', - log_verbose: 'log_verbose', - log_invalid: 'log_invalid', -}; - -@Component({ - selector: 'app-el-dlt-extra-structure', - templateUrl: './template.html', - styleUrls: ['./styles.less'], - encapsulation: ViewEncapsulation.None, - standalone: false, -}) -@Ilc() -export class DltExtraConfigurationStructure - extends ChangesDetector - implements AfterContentInit, AfterViewInit -{ - columns: string[] = [ - COLUMNS.id, - COLUMNS.log_fatal, - COLUMNS.log_error, - COLUMNS.log_warning, - COLUMNS.log_debug, - COLUMNS.log_info, - COLUMNS.log_verbose, - COLUMNS.non_log, - ]; - - @Input() section!: Section; - @Output() select: EventEmitter = new EventEmitter(); - - @ViewChild(MatSort) sort!: MatSort; - @ViewChild(MatTable) table!: MatTable; - - public data!: MatTableDataSource; - - constructor(cdRef: ChangeDetectorRef, private _sanitizer: DomSanitizer) { - super(cdRef); - } - - public ngAfterContentInit(): void { - this.data = new MatTableDataSource(this.section.entities); - this.env().subscriber.register( - this.section.update.subscribe(() => { - this.data.data = this.section.entities.filter((e: StatEntity) => !e.hidden()); - this.table.renderRows(); - this.detectChanges(); - }), - ); - } - - public ngAfterViewInit(): void { - this.data.sort = this.sort; - } - - public ngOnSortChange() { - this.detectChanges(); - this.table.renderRows(); - } - - public ngOnRowSelect(entity: StatEntity) { - entity.toggle(); - this.select.emit(entity); - this.detectChanges(); - } - - public safeHtml(html: string): SafeHtml { - return this._sanitizer.bypassSecurityTrustHtml(html); - } -} -export interface DltExtraConfigurationStructure extends IlcInterface {} diff --git a/application/client/src/app/ui/tabs/observe/parsers/extra/dlt/structure/section.ts b/application/client/src/app/ui/tabs/observe/parsers/extra/dlt/structure/section.ts deleted file mode 100644 index 46180a6ae2..0000000000 --- a/application/client/src/app/ui/tabs/observe/parsers/extra/dlt/structure/section.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { Subject } from '@platform/env/subscription'; -import { StatEntity } from './statentity'; - -export class Section { - public key: string; - public name: string; - public update: Subject = new Subject(); - public entities: StatEntity[] = []; - - constructor(key: string, name: string) { - this.key = key; - this.name = name; - } - - public getSelected(): StatEntity[] { - return this.entities.filter((f) => f.selected); - } - - public fill(entities: StatEntity[]): Section { - this.entities = entities; - return this; - } -} diff --git a/application/client/src/app/ui/tabs/observe/parsers/extra/dlt/structure/statentity.ts b/application/client/src/app/ui/tabs/observe/parsers/extra/dlt/structure/statentity.ts deleted file mode 100644 index fb2961ffc2..0000000000 --- a/application/client/src/app/ui/tabs/observe/parsers/extra/dlt/structure/statentity.ts +++ /dev/null @@ -1,61 +0,0 @@ -import { DltLevelDistribution } from '@platform/types/bindings'; -import { Matchee } from '@module/matcher'; - -import * as wasm from '@loader/wasm'; - -export class StatEntity extends Matchee { - public selected: boolean = false; - public id: string; - public parent: string; - public non_log: number; - public log_fatal: number; - public log_error: number; - public log_warning: number; - public log_info: number; - public log_debug: number; - public log_verbose: number; - public log_invalid: number; - - constructor(id: string, parent: string, from: DltLevelDistribution, matcher: wasm.Matcher) { - super(matcher, { id: id }); - this.id = id; - this.parent = parent; - this.non_log = from.non_log; - this.log_fatal = from.log_fatal; - this.log_error = from.log_error; - this.log_warning = from.log_warning; - this.log_info = from.log_info; - this.log_debug = from.log_debug; - this.log_verbose = from.log_verbose; - this.log_invalid = from.log_invalid; - } - - public html(): string { - const html: string | undefined = this.getHtmlOf('html_id'); - return html === undefined ? this.id : html; - } - - public hash(): string { - return `${this.parent}-${this.id}`; - } - - public equal(entity: StatEntity): boolean { - return entity.hash() === this.hash(); - } - - public toggle() { - this.selected = !this.selected; - } - - public select() { - this.selected = true; - } - - public unselect() { - this.selected = false; - } - - public hidden(): boolean { - return this.getScore() === 0; - } -} diff --git a/application/client/src/app/ui/tabs/observe/parsers/extra/dlt/structure/styles.less b/application/client/src/app/ui/tabs/observe/parsers/extra/dlt/structure/styles.less deleted file mode 100644 index 9c0dd96e72..0000000000 --- a/application/client/src/app/ui/tabs/observe/parsers/extra/dlt/structure/styles.less +++ /dev/null @@ -1,40 +0,0 @@ -@import '../../../../../../styles/variables.less'; - - -app-el-dlt-extra-structure { - position: relative; - display: block; - width: 100%; - & p.title { - margin: 8px 0 0px 16px; - color: var(--scheme-color-2); - font-size: 14px; - font-weight: 500; - } - & tr{ - position: relative; - &:hover { - background-color: var(--scheme-color-4)!important; - } - } - & tr[dataselected="true"] { - background: var(--scheme-color-active); - &::after { - position: absolute; - display: block; - content: ''; - width: 4px; - height: 100%; - background: var(--scheme-color-accent); - left: 0; - } - &:hover { - background-color: var(--scheme-color-active-75)!important; - } - } - & span.id{ - & > span { - background-color: var(--scheme-color-3); - } - } -} \ No newline at end of file diff --git a/application/client/src/app/ui/tabs/observe/parsers/extra/dlt/structure/template.html b/application/client/src/app/ui/tabs/observe/parsers/extra/dlt/structure/template.html deleted file mode 100644 index 605dd3223c..0000000000 --- a/application/client/src/app/ui/tabs/observe/parsers/extra/dlt/structure/template.html +++ /dev/null @@ -1,62 +0,0 @@ -

{{section.name}}

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- ID - - FATAL - {{element.log_fatal}} - ERROR - {{element.log_error}} - WARN - {{element.log_warning}} - DEBUG - {{element.log_debug}} - INFO - {{element.log_info}} - VERB - {{element.log_verbose}} - NON - {{element.non_log}}
\ No newline at end of file diff --git a/application/client/src/app/ui/tabs/observe/parsers/extra/dlt/styles.less b/application/client/src/app/ui/tabs/observe/parsers/extra/dlt/styles.less deleted file mode 100644 index e813d7e1d2..0000000000 --- a/application/client/src/app/ui/tabs/observe/parsers/extra/dlt/styles.less +++ /dev/null @@ -1,116 +0,0 @@ -@import '../../../../../styles/variables.less'; - - -:host { - position: absolute; - display: block; - top: 0; - left: 0; - width: 100%; - height: 100%; - overflow: hidden; - & p.error { - color: var(--scheme-color-error-light); - text-align: center; - padding: 64px 0; - } - & app-transport { - margin-top: 12px; - } - & div.controlls { - text-align: right; - } - & h1 { - font-size: 14px; - } - & button { - position: relative; - display: inline-block; - margin: 6px 0 6px 6px; - } - & div.left { - position: absolute; - display: flex; - flex-direction: column; - top: 0; - bottom: 0; - left: 0; - right: 330px; - overflow: hidden; - justify-content: stretch; - justify-items: stretch; - & div.filter { - position: absolute; - z-index: 1000; - padding: 6px 12px; - background: var(--scheme-color-warning-light); - top: 6px; - right: 6px; - box-shadow: 3px 3px 3px rgb(0 0 0 / 40%); - border-radius: 3px; - } - & .fill { - overflow: auto; - } - & .section { - padding-top: 12px; - & mat-divider { - margin-top: -12px; - } - & .mat-standard-chip{ - min-height: 24px; - } - } - } - & div.right { - position: absolute; - width: 320px; - right: 6px; - bottom: 0; - top: 0; - overflow-y: auto; - overflow-x: hidden; - display: flex; - flex-direction: column; - & mat-divider.fibex-divider { - margin-top: 12px; - } - & div.fibex-controlls{ - position: relative; - width: 100%; - margin-top: 19px; - text-align: right; - } - & div.spacer { - flex: auto; - } - & app-tabs-source-actions { - position: sticky; - bottom: 0; - z-index: 1; - box-shadow: 0px 0px 16px rgba(0,0,0,0.4); - } - } - & .table-fill { - width: 100%; - } - & .info { - & .caption { - text-align: left; - padding-right: 12px; - } - & .value { - text-align: left; - } - } - - & div.progress { - margin-top: 24px; - & p { - text-align: center; - } - } - & .mat-progress-bar-fill::after { - background-color: var(--scheme-color-accent); - } -} \ No newline at end of file diff --git a/application/client/src/app/ui/tabs/observe/parsers/extra/dlt/summary.ts b/application/client/src/app/ui/tabs/observe/parsers/extra/dlt/summary.ts deleted file mode 100644 index 194eabc187..0000000000 --- a/application/client/src/app/ui/tabs/observe/parsers/extra/dlt/summary.ts +++ /dev/null @@ -1,51 +0,0 @@ -import { StatEntity } from './structure/statentity'; - -export class Summary { - public fatal: number = 0; - public error: number = 0; - public warning: number = 0; - public info: number = 0; - public debug: number = 0; - public verbose: number = 0; - public invalid: number = 0; - public total: number = 0; - public count: number = 0; - - private _loaded: boolean = false; - - public isLoaded(): boolean { - return this._loaded; - } - - public inc(entity: StatEntity) { - this.fatal += entity.log_fatal; - this.error += entity.log_error; - this.warning += entity.log_warning; - this.info += entity.log_info; - this.debug += entity.log_debug; - this.verbose += entity.log_verbose; - this.invalid += entity.log_invalid; - this.total += - entity.log_fatal + - entity.log_error + - entity.log_warning + - entity.log_info + - entity.log_debug + - entity.log_verbose + - entity.log_invalid; - this.count += 1; - } - - public reset() { - this._loaded = true; - this.fatal = 0; - this.error = 0; - this.warning = 0; - this.info = 0; - this.debug = 0; - this.verbose = 0; - this.invalid = 0; - this.total = 0; - this.count = 0; - } -} diff --git a/application/client/src/app/ui/tabs/observe/parsers/extra/dlt/template.html b/application/client/src/app/ui/tabs/observe/parsers/extra/dlt/template.html deleted file mode 100644 index 122c91d51d..0000000000 --- a/application/client/src/app/ui/tabs/observe/parsers/extra/dlt/template.html +++ /dev/null @@ -1,67 +0,0 @@ - - -

- Cannot load statistics information because of an error: {{error}} -

- -
- -

Scanning DLT structure...

-
-
-

- DLT structure scanning isn't supported for this type of source -

-
-
- -

- Summary ({{state.summary.total.count}} / {{state.summary.selected.count}}) -

- - - - - - - - - - - - - - - - - - - - - - - -
Fatal - {{state.summary.total.fatal}}
{{state.summary.selected.fatal}} -
Error - {{state.summary.total.error}}
{{state.summary.selected.error}} -
Debug - {{state.summary.total.debug}}
{{state.summary.selected.debug}} -
Info - {{state.summary.total.info}}
{{state.summary.selected.info}} -
Verbose - {{state.summary.total.verbose}}
{{state.summary.selected.verbose}} -
Invalid - {{state.summary.total.invalid}}
{{state.summary.selected.invalid}} -
Total - {{state.summary.total.total}} / {{state.summary.selected.total}} -
-
- -
-
diff --git a/application/client/src/app/ui/tabs/observe/parsers/extra/module.ts b/application/client/src/app/ui/tabs/observe/parsers/extra/module.ts deleted file mode 100644 index 311c764732..0000000000 --- a/application/client/src/app/ui/tabs/observe/parsers/extra/module.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { NgModule } from '@angular/core'; -import { CommonModule } from '@angular/common'; - -import { DltExtraConfigurationModule } from './dlt/module'; -import { SomeIpExtraConfigurationModule } from './someip/module'; -import { ParserExtraConfiguration } from './component'; -@NgModule({ - imports: [CommonModule, DltExtraConfigurationModule, SomeIpExtraConfigurationModule], - declarations: [ParserExtraConfiguration], - exports: [ - ParserExtraConfiguration, - DltExtraConfigurationModule, - SomeIpExtraConfigurationModule, - ], - bootstrap: [ParserExtraConfiguration], -}) -export class ParserExtraConfigurationModule {} diff --git a/application/client/src/app/ui/tabs/observe/parsers/extra/someip/component.ts b/application/client/src/app/ui/tabs/observe/parsers/extra/someip/component.ts deleted file mode 100644 index b3419cc4e7..0000000000 --- a/application/client/src/app/ui/tabs/observe/parsers/extra/someip/component.ts +++ /dev/null @@ -1,30 +0,0 @@ -import { Component, ChangeDetectorRef, Input, AfterContentInit } from '@angular/core'; -import { Ilc, IlcInterface } from '@env/decorators/component'; -import { Initial } from '@env/decorators/initial'; -import { ChangesDetector } from '@ui/env/extentions/changes'; -import { State } from './state'; -import { Observe } from '@platform/types/observe'; - -@Component({ - selector: 'app-el-someip-extra', - templateUrl: './template.html', - styleUrls: ['./styles.less'], - standalone: false, -}) -@Initial() -@Ilc() -export class SomeIpExtraConfiguration extends ChangesDetector implements AfterContentInit { - @Input() observe!: Observe; - - protected state!: State; - - constructor(cdRef: ChangeDetectorRef) { - super(cdRef); - } - - public ngAfterContentInit(): void { - this.state = new State(this.observe); - this.state.bind(this); - } -} -export interface SomeIpExtraConfiguration extends IlcInterface {} diff --git a/application/client/src/app/ui/tabs/observe/parsers/extra/someip/module.ts b/application/client/src/app/ui/tabs/observe/parsers/extra/someip/module.ts deleted file mode 100644 index c02e703ca4..0000000000 --- a/application/client/src/app/ui/tabs/observe/parsers/extra/someip/module.ts +++ /dev/null @@ -1,35 +0,0 @@ -import { NgModule } from '@angular/core'; -import { CommonModule } from '@angular/common'; -import { FormsModule, ReactiveFormsModule } from '@angular/forms'; -import { MatButtonModule } from '@angular/material/button'; -import { MatCardModule } from '@angular/material/card'; -import { MatDividerModule } from '@angular/material/divider'; -import { MatChipsModule } from '@angular/material/chips'; -import { MatProgressBarModule } from '@angular/material/progress-bar'; -import { MatIconModule } from '@angular/material/icon'; -import { MatFormFieldModule } from '@angular/material/form-field'; -import { MatSelectModule } from '@angular/material/select'; -import { MatListModule } from '@angular/material/list'; - -import { SomeIpExtraConfiguration } from './component'; - -@NgModule({ - imports: [ - CommonModule, - FormsModule, - ReactiveFormsModule, - MatButtonModule, - MatCardModule, - MatDividerModule, - MatProgressBarModule, - MatChipsModule, - MatIconModule, - MatFormFieldModule, - MatSelectModule, - MatListModule, - ], - declarations: [SomeIpExtraConfiguration], - exports: [SomeIpExtraConfiguration], - bootstrap: [SomeIpExtraConfiguration], -}) -export class SomeIpExtraConfigurationModule {} diff --git a/application/client/src/app/ui/tabs/observe/parsers/extra/someip/state.ts b/application/client/src/app/ui/tabs/observe/parsers/extra/someip/state.ts deleted file mode 100644 index 4579f844c7..0000000000 --- a/application/client/src/app/ui/tabs/observe/parsers/extra/someip/state.ts +++ /dev/null @@ -1,3 +0,0 @@ -import { State as Base } from '../../state'; - -export class State extends Base {} diff --git a/application/client/src/app/ui/tabs/observe/parsers/extra/someip/styles.less b/application/client/src/app/ui/tabs/observe/parsers/extra/someip/styles.less deleted file mode 100644 index 4bd77884a2..0000000000 --- a/application/client/src/app/ui/tabs/observe/parsers/extra/someip/styles.less +++ /dev/null @@ -1,111 +0,0 @@ -@import '../../../../../styles/variables.less'; - - -:host { - position: absolute; - display: block; - top: 0; - left: 0; - width: 100%; - height: 100%; - overflow: hidden; - & app-transport { - margin-top: 12px; - } - & div.controlls { - text-align: right; - } - & h1 { - font-size: 14px; - } - & button { - position: relative; - display: inline-block; - margin: 6px 0 6px 6px; - } - & div.left { - position: absolute; - display: flex; - flex-direction: column; - top: 0; - bottom: 0; - left: 0; - right: 330px; - overflow: hidden; - justify-content: stretch; - justify-items: stretch; - & div.filter { - position: absolute; - z-index: 1000; - padding: 6px 12px; - background: var(--scheme-color-warning-light); - top: 6px; - right: 6px; - box-shadow: 3px 3px 3px rgb(0 0 0 / 40%); - border-radius: 3px; - } - & .fill { - overflow: auto; - } - & .section { - padding-top: 12px; - & mat-divider { - margin-top: -12px; - } - & .mat-standard-chip{ - min-height: 24px; - } - } - } - & div.right { - position: absolute; - width: 320px; - right: 6px; - bottom: 0; - top: 0; - overflow-y: auto; - overflow-x: hidden; - display: flex; - flex-direction: column; - & mat-divider.fibex-divider { - margin-top: 12px; - } - & div.fibex-controlls{ - position: relative; - width: 100%; - margin-top: 19px; - text-align: right; - } - & div.spacer { - flex: auto; - } - & app-tabs-source-actions { - position: sticky; - bottom: 0; - z-index: 1; - box-shadow: 0px 0px 16px rgba(0,0,0,0.4); - } - } - & .table-fill { - width: 100%; - } - & .info { - & .caption { - text-align: left; - padding-right: 12px; - } - & .value { - text-align: left; - } - } - - & div.progress { - margin-top: 24px; - & p { - text-align: center; - } - } - & .mat-progress-bar-fill::after { - background-color: var(--scheme-color-accent); - } -} \ No newline at end of file diff --git a/application/client/src/app/ui/tabs/observe/parsers/extra/someip/template.html b/application/client/src/app/ui/tabs/observe/parsers/extra/someip/template.html deleted file mode 100644 index 139597f9cb..0000000000 --- a/application/client/src/app/ui/tabs/observe/parsers/extra/someip/template.html +++ /dev/null @@ -1,2 +0,0 @@ - - diff --git a/application/client/src/app/ui/tabs/observe/parsers/extra/styles.less b/application/client/src/app/ui/tabs/observe/parsers/extra/styles.less deleted file mode 100644 index be92722fb8..0000000000 --- a/application/client/src/app/ui/tabs/observe/parsers/extra/styles.less +++ /dev/null @@ -1,111 +0,0 @@ -@import '../../../../styles/variables.less'; - - -:host { - position: absolute; - display: block; - top: 0; - left: 0; - width: 100%; - height: 100%; - overflow: hidden; - & app-transport { - margin-top: 12px; - } - & div.controlls { - text-align: right; - } - & h1 { - font-size: 14px; - } - & button { - position: relative; - display: inline-block; - margin: 6px 0 6px 6px; - } - & div.left { - position: absolute; - display: flex; - flex-direction: column; - top: 0; - bottom: 0; - left: 0; - right: 330px; - overflow: hidden; - justify-content: stretch; - justify-items: stretch; - & div.filter { - position: absolute; - z-index: 1000; - padding: 6px 12px; - background: var(--scheme-color-warning-light); - top: 6px; - right: 6px; - box-shadow: 3px 3px 3px rgb(0 0 0 / 40%); - border-radius: 3px; - } - & .fill { - overflow: auto; - } - & .section { - padding-top: 12px; - & mat-divider { - margin-top: -12px; - } - & .mat-standard-chip{ - min-height: 24px; - } - } - } - & div.right { - position: absolute; - width: 320px; - right: 6px; - bottom: 0; - top: 0; - overflow-y: auto; - overflow-x: hidden; - display: flex; - flex-direction: column; - & mat-divider.fibex-divider { - margin-top: 12px; - } - & div.fibex-controlls{ - position: relative; - width: 100%; - margin-top: 19px; - text-align: right; - } - & div.spacer { - flex: auto; - } - & app-tabs-source-actions { - position: sticky; - bottom: 0; - z-index: 1; - box-shadow: 0px 0px 16px rgba(0,0,0,0.4); - } - } - & .table-fill { - width: 100%; - } - & .info { - & .caption { - text-align: left; - padding-right: 12px; - } - & .value { - text-align: left; - } - } - - & div.progress { - margin-top: 24px; - & p { - text-align: center; - } - } - & .mat-progress-bar-fill::after { - background-color: var(--scheme-color-accent); - } -} \ No newline at end of file diff --git a/application/client/src/app/ui/tabs/observe/parsers/extra/template.html b/application/client/src/app/ui/tabs/observe/parsers/extra/template.html deleted file mode 100644 index ea14b75d8d..0000000000 --- a/application/client/src/app/ui/tabs/observe/parsers/extra/template.html +++ /dev/null @@ -1,2 +0,0 @@ - - \ No newline at end of file diff --git a/application/client/src/app/ui/tabs/observe/parsers/general/component.ts b/application/client/src/app/ui/tabs/observe/parsers/general/component.ts deleted file mode 100644 index 71e961f332..0000000000 --- a/application/client/src/app/ui/tabs/observe/parsers/general/component.ts +++ /dev/null @@ -1,28 +0,0 @@ -import { Component, ChangeDetectorRef, Input, AfterContentInit } from '@angular/core'; -import { Ilc, IlcInterface } from '@env/decorators/component'; -import { Initial } from '@env/decorators/initial'; -import { ChangesDetector } from '@ui/env/extentions/changes'; -import { State } from '../state'; -import { State as GlobalState } from '../../state'; - -@Component({ - selector: 'app-el-parser-general', - templateUrl: './template.html', - styleUrls: ['./styles.less'], - standalone: false, -}) -@Initial() -@Ilc() -export class ParserGeneralConfiguration extends ChangesDetector implements AfterContentInit { - @Input() state!: State; - @Input() global!: GlobalState; - - constructor(cdRef: ChangeDetectorRef) { - super(cdRef); - } - - public ngAfterContentInit(): void { - this.state.bind(this); - } -} -export interface ParserGeneralConfiguration extends IlcInterface {} diff --git a/application/client/src/app/ui/tabs/observe/parsers/general/dlt/component.ts b/application/client/src/app/ui/tabs/observe/parsers/general/dlt/component.ts deleted file mode 100644 index 2c97a1320c..0000000000 --- a/application/client/src/app/ui/tabs/observe/parsers/general/dlt/component.ts +++ /dev/null @@ -1,54 +0,0 @@ -import { - Component, - ChangeDetectorRef, - Input, - AfterContentInit, - AfterViewInit, -} from '@angular/core'; -import { Ilc, IlcInterface } from '@env/decorators/component'; -import { Initial } from '@env/decorators/initial'; -import { ChangesDetector } from '@ui/env/extentions/changes'; -import { bytesToStr, timestampToUTC } from '@env/str'; -import { State } from './state'; -import { Observe } from '@platform/types/observe'; - -@Component({ - selector: 'app-el-dlt-general', - templateUrl: './template.html', - styleUrls: ['./styles.less'], - standalone: false, -}) -@Initial() -@Ilc() -export class DltGeneralConfiguration - extends ChangesDetector - implements AfterContentInit, AfterViewInit -{ - @Input() observe!: Observe; - - protected state!: State; - - public bytesToStr = bytesToStr; - public timestampToUTC = timestampToUTC; - - constructor(cdRef: ChangeDetectorRef) { - super(cdRef); - } - - public ngAfterContentInit(): void { - this.state = new State(this.observe); - this.state.bind(this); - } - - public ngAfterViewInit(): void { - this.state - .load() - .then(() => { - this.detectChanges(); - }) - .catch((err: Error) => { - this.log().error(`Fail to restore configuration with: ${err.message}`); - }); - } -} -export interface DltGeneralConfiguration extends IlcInterface {} diff --git a/application/client/src/app/ui/tabs/observe/parsers/general/dlt/module.ts b/application/client/src/app/ui/tabs/observe/parsers/general/dlt/module.ts deleted file mode 100644 index c308db8a67..0000000000 --- a/application/client/src/app/ui/tabs/observe/parsers/general/dlt/module.ts +++ /dev/null @@ -1,35 +0,0 @@ -import { NgModule } from '@angular/core'; -import { CommonModule } from '@angular/common'; -import { FormsModule, ReactiveFormsModule } from '@angular/forms'; -import { MatButtonModule } from '@angular/material/button'; -import { MatCardModule } from '@angular/material/card'; -import { MatDividerModule } from '@angular/material/divider'; -import { MatChipsModule } from '@angular/material/chips'; -import { MatProgressBarModule } from '@angular/material/progress-bar'; -import { MatIconModule } from '@angular/material/icon'; -import { MatFormFieldModule } from '@angular/material/form-field'; -import { MatSelectModule } from '@angular/material/select'; -import { MatListModule } from '@angular/material/list'; - -import { DltGeneralConfiguration } from './component'; - -@NgModule({ - imports: [ - CommonModule, - FormsModule, - ReactiveFormsModule, - MatButtonModule, - MatCardModule, - MatDividerModule, - MatProgressBarModule, - MatChipsModule, - MatIconModule, - MatFormFieldModule, - MatSelectModule, - MatListModule, - ], - declarations: [DltGeneralConfiguration], - exports: [DltGeneralConfiguration], - bootstrap: [DltGeneralConfiguration], -}) -export class DltGeneralConfigurationModule {} diff --git a/application/client/src/app/ui/tabs/observe/parsers/general/dlt/state.ts b/application/client/src/app/ui/tabs/observe/parsers/general/dlt/state.ts deleted file mode 100644 index 56e340b9aa..0000000000 --- a/application/client/src/app/ui/tabs/observe/parsers/general/dlt/state.ts +++ /dev/null @@ -1,118 +0,0 @@ -import { File } from '@platform/types/files'; -import { Timezone } from '@elements/timezones/timezone'; -import { bridge } from '@service/bridge'; -import { components } from '@env/decorators/initial'; -import { State as Base } from '../../state'; -import { Observe } from '@platform/types/observe'; - -import * as Dlt from '@platform/types/observe/parser/dlt'; - -export class State extends Base { - public readonly LOG_LEVELS: { value: Dlt.LogLevel; caption: string }[] = [ - { value: Dlt.LogLevel.Fatal, caption: 'Fatal' }, - { value: Dlt.LogLevel.Error, caption: 'Error' }, - { value: Dlt.LogLevel.Warn, caption: 'Warn' }, - { value: Dlt.LogLevel.Info, caption: 'Info' }, - { value: Dlt.LogLevel.Debug, caption: 'Debug' }, - { value: Dlt.LogLevel.Verbose, caption: 'Verbose' }, - ]; - public fibex: File[] = []; - public timezone: Timezone | undefined; - public logLevel: Dlt.LogLevel = Dlt.LogLevel.Verbose; - - constructor(observe: Observe) { - super(observe); - } - - public async load(): Promise { - const conf = this.observe.parser.as(Dlt.Configuration); - if (conf === undefined) { - return; - } - const stored: string[] | string | undefined = conf.configuration.fibex_file_paths; - const paths: string[] = - stored === undefined - ? [] - : typeof stored === 'string' - ? [stored] - : stored.map((p) => p); - this.fibex = await bridge.files().getByPath(paths); - conf.configuration.filter_config !== undefined && - conf.configuration.filter_config.min_log_level !== undefined && - (this.logLevel = conf.configuration.filter_config.min_log_level); - const timezone = - conf.configuration.tz !== undefined ? Timezone.from(conf.configuration.tz) : undefined; - this.timezone = timezone instanceof Error ? undefined : timezone; - } - - public update(): State { - const conf = this.observe.parser.as(Dlt.Configuration); - if (conf === undefined) { - return this; - } - if (this.fibex.length !== 0) { - conf.configuration.fibex_file_paths = this.fibex.map((f) => f.filename); - } else { - conf.configuration.fibex_file_paths = undefined; - } - if (this.logLevel !== Dlt.LogLevel.Verbose) { - conf.setDefaultsFilterConfig(); - conf.configuration.filter_config!.min_log_level = this.logLevel; - } - conf.configuration.tz = this.timezone === undefined ? undefined : this.timezone.name; - return this; - } - - public addFibexFile() { - bridge - .files() - .select.custom('xml') - .then((files: File[]) => { - files = files.filter((added) => { - return ( - this.fibex.find((exist) => exist.filename === added.filename) === undefined - ); - }); - this.fibex = this.fibex.concat(files); - }) - .catch((err: Error) => { - this.ref.log().error(`Fail to open xml (fibex) file(s): ${err.message}`); - }) - .finally(() => { - this.update().ref.detectChanges(); - }); - } - - public removeFibex(file: File) { - this.fibex = this.fibex.filter((f) => f.filename !== file.filename); - this.update().ref.detectChanges(); - } - - public timezoneSelect() { - const subscription = this.ref - .ilc() - .services.ui.popup.open({ - component: { - factory: components.get('app-elements-timezone-selector'), - inputs: { - selected: (timezone: Timezone): void => { - if (timezone.name.toLowerCase().startsWith('utc')) { - this.timezone = undefined; - } else { - this.timezone = timezone; - } - this.update(); - this.ref.detectChanges(); - }, - }, - }, - closeOnKey: 'Escape', - width: 350, - uuid: 'app-elements-timezone-selector', - }) - .subjects.get() - .closed.subscribe(() => { - subscription.unsubscribe(); - }); - } -} diff --git a/application/client/src/app/ui/tabs/observe/parsers/general/dlt/styles.less b/application/client/src/app/ui/tabs/observe/parsers/general/dlt/styles.less deleted file mode 100644 index d28051537c..0000000000 --- a/application/client/src/app/ui/tabs/observe/parsers/general/dlt/styles.less +++ /dev/null @@ -1,17 +0,0 @@ -@import '../../../../../styles/variables.less'; - - -:host { - position: relative; - display: block; - width: 100%; - overflow: hidden; - & div.controlls { - text-align: right; - } - & button { - position: relative; - display: inline-block; - margin: 6px 0 6px 6px; - } -} \ No newline at end of file diff --git a/application/client/src/app/ui/tabs/observe/parsers/general/dlt/template.html b/application/client/src/app/ui/tabs/observe/parsers/general/dlt/template.html deleted file mode 100644 index 89e1ea8ab8..0000000000 --- a/application/client/src/app/ui/tabs/observe/parsers/general/dlt/template.html +++ /dev/null @@ -1,48 +0,0 @@ - - Log level - - - Select required level of logs - - - {{level.caption}} - - - - - - - Fibex - Attach fibex file (optional) - -
- - - {{file.name}} - - - -
- -
- -
-
-
- - Timezone - Select required timezone (optional). UTC is default - - - {{state.timezone.name}} ({{state.timezone.utc}}) - -
- -
-
-
diff --git a/application/client/src/app/ui/tabs/observe/parsers/general/module.ts b/application/client/src/app/ui/tabs/observe/parsers/general/module.ts deleted file mode 100644 index 740831ef04..0000000000 --- a/application/client/src/app/ui/tabs/observe/parsers/general/module.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { NgModule } from '@angular/core'; -import { CommonModule } from '@angular/common'; - -import { ErrorStateModule } from '../../error/module'; -import { DltGeneralConfigurationModule } from './dlt/module'; -import { SomeIpGeneralConfigurationModule } from './someip/module'; -import { TextGeneralConfigurationModule } from './text/module'; -import { ParserPluginGeneralConfigurationModule } from './plugin/module'; -import { ParserGeneralConfiguration } from './component'; - -@NgModule({ - imports: [ - CommonModule, - DltGeneralConfigurationModule, - SomeIpGeneralConfigurationModule, - TextGeneralConfigurationModule, - ParserPluginGeneralConfigurationModule, - ErrorStateModule, - ], - declarations: [ParserGeneralConfiguration], - exports: [ - ParserGeneralConfiguration, - DltGeneralConfigurationModule, - SomeIpGeneralConfigurationModule, - TextGeneralConfigurationModule, - ParserPluginGeneralConfigurationModule, - ErrorStateModule, - ], - bootstrap: [ParserGeneralConfiguration], -}) -export class ParserGeneralConfigurationModule {} diff --git a/application/client/src/app/ui/tabs/observe/parsers/general/plugin/component.ts b/application/client/src/app/ui/tabs/observe/parsers/general/plugin/component.ts deleted file mode 100644 index e7192c6a2b..0000000000 --- a/application/client/src/app/ui/tabs/observe/parsers/general/plugin/component.ts +++ /dev/null @@ -1,58 +0,0 @@ -import { - Component, - Input, - ChangeDetectorRef, - AfterContentInit, - AfterViewInit, -} from '@angular/core'; -import { Ilc, IlcInterface } from '@env/decorators/component'; -import { Initial } from '@env/decorators/initial'; -import { ChangesDetector } from '@ui/env/extentions/changes'; -import { Observe } from '@platform/types/observe'; -import { State } from './state'; - -@Component({ - selector: 'app-el-parser-plugin-general', - templateUrl: './template.html', - styleUrls: ['./styles.less'], - standalone: false, -}) -@Initial() -@Ilc() -export class ParserPluginGeneralConfiguration - extends ChangesDetector - implements AfterContentInit, AfterViewInit -{ - @Input() observe!: Observe; - @Input() path!: string | undefined; - - protected state!: State; - - constructor(cdRef: ChangeDetectorRef) { - super(cdRef); - } - - ngAfterContentInit(): void { - this.state = new State(this.observe, this.path); - this.state.bind(this); - this.env().subscriber.register( - this.observe.parser.subscribe(() => { - if (!this.path) { - return; - } - this.state.setPath(this.path); - }), - ); - } - - public update(): void { - this.state.update(); - } - - ngAfterViewInit(): void { - this.state.init(); - this.detectChanges(); - } -} - -export interface ParserPluginGeneralConfiguration extends IlcInterface {} diff --git a/application/client/src/app/ui/tabs/observe/parsers/general/plugin/module.ts b/application/client/src/app/ui/tabs/observe/parsers/general/plugin/module.ts deleted file mode 100644 index 12bf08c02f..0000000000 --- a/application/client/src/app/ui/tabs/observe/parsers/general/plugin/module.ts +++ /dev/null @@ -1,37 +0,0 @@ -import { NgModule } from '@angular/core'; -import { CommonModule } from '@angular/common'; -import { MatCardModule } from '@angular/material/card'; -import { MatDividerModule } from '@angular/material/divider'; - -import { FormsModule, ReactiveFormsModule } from '@angular/forms'; -import { MatButtonModule } from '@angular/material/button'; -import { MatChipsModule } from '@angular/material/chips'; -import { MatFormFieldModule } from '@angular/material/form-field'; -import { MatSelectModule } from '@angular/material/select'; -import { MatListModule } from '@angular/material/list'; -import { MatCheckboxModule } from '@angular/material/checkbox'; -import { MatInputModule } from '@angular/material/input'; -import { ConfigSchmasModule } from '@ui/tabs/observe/config-schema/module'; -import { ParserPluginGeneralConfiguration } from './component'; - -@NgModule({ - imports: [ - CommonModule, - FormsModule, - ReactiveFormsModule, - MatButtonModule, - MatCardModule, - MatDividerModule, - MatChipsModule, - MatFormFieldModule, - MatSelectModule, - MatListModule, - ConfigSchmasModule, - MatCheckboxModule, - MatInputModule, - ], - declarations: [ParserPluginGeneralConfiguration], - exports: [ParserPluginGeneralConfiguration], - bootstrap: [ParserPluginGeneralConfiguration], -}) -export class ParserPluginGeneralConfigurationModule {} diff --git a/application/client/src/app/ui/tabs/observe/parsers/general/plugin/state.ts b/application/client/src/app/ui/tabs/observe/parsers/general/plugin/state.ts deleted file mode 100644 index 7e7cf45f7b..0000000000 --- a/application/client/src/app/ui/tabs/observe/parsers/general/plugin/state.ts +++ /dev/null @@ -1,100 +0,0 @@ -import { State as Base } from '../../state'; -import { Observe } from '@platform/types/observe'; -import { plugins } from '@service/plugins'; -import { getSafeFileName } from '@platform/types/files'; -import { Subject } from '@platform/env/subscription'; - -import * as Plugin from '@platform/types/observe/parser/plugin'; -import { - PluginEntity, - PluginConfigSchemaItem, - PluginConfigValue, -} from '@platform/types/bindings/plugins'; - -export class State extends Base { - public parsers: PluginEntity[] = []; - public path: string | undefined; - public selectedParser?: PluginEntity; - public selected: Subject = new Subject(); - - constructor(observe: Observe, path: string | undefined) { - super(observe); - this.path = path; - } - - public init() { - const conf = this.observe.parser.as(Plugin.Configuration); - if (conf === undefined) { - this.ref.log().error(`Currnet parser configuration must match plugin parser`); - return; - } - this.parsers = plugins - .list() - .preload() - .filter((p) => p.plugin_type === 'Parser'); - - if (this.parsers.length > 0) { - this.selectedParser = this.path - ? this.parsers.find((p) => p.dir_path == this.path) - : this.parsers[0]; - this.update(); - } - } - - public setPath(path: string) { - this.path = path; - if (this.parsers.length > 0) { - this.selectedParser = this.path - ? this.parsers.find((p) => p.dir_path == this.path) - : this.parsers[0]; - this.update(); - } - } - - /** - * Saves the given value to the tab configurations - * @param id - ID of the configuration entry - * @param value - Value of the configuration - */ - public saveConfig(id: string, value: PluginConfigValue) { - const conf = this.observe.parser.as(Plugin.Configuration); - if (conf === undefined) { - this.ref.log().error(`Currnet parser configuration must match plugin parser`); - return; - } - - const item = conf.configuration.plugin_configs.find((item) => item.id === id); - if (item !== undefined) { - item.value = value; - } else { - conf.configuration.plugin_configs.push({ id, value }); - } - } - - /** - * Updates the configuration data for the parser in the current tab - */ - public update() { - const conf = this.observe.parser.as(Plugin.Configuration); - if (conf === undefined) { - return; - } - - const pluginPath = this.selectedParser?.info.wasm_file_path ?? ''; - - if (conf.configuration.plugin_path !== pluginPath) { - conf.configuration.plugin_path = pluginPath; - // Clear configurations on plugin change. - conf.configuration.plugin_configs = []; - } - this.selectedParser && this.selected.emit(this.selectedParser); - } - - public getPluginTitle(parser: PluginEntity): string { - return parser.metadata?.title ?? getSafeFileName(parser.dir_path); - } - - public getPluginConfigs(parser?: PluginEntity): PluginConfigSchemaItem[] { - return parser?.info.config_schemas ?? []; - } -} diff --git a/application/client/src/app/ui/tabs/observe/parsers/general/plugin/styles.less b/application/client/src/app/ui/tabs/observe/parsers/general/plugin/styles.less deleted file mode 100644 index 04f4051d5b..0000000000 --- a/application/client/src/app/ui/tabs/observe/parsers/general/plugin/styles.less +++ /dev/null @@ -1,8 +0,0 @@ -@import '../../../../../styles/variables.less'; - -:host { - position: relative; - display: block; - width: 100%; - overflow: hidden; -} diff --git a/application/client/src/app/ui/tabs/observe/parsers/general/plugin/template.html b/application/client/src/app/ui/tabs/observe/parsers/general/plugin/template.html deleted file mode 100644 index e689845ed8..0000000000 --- a/application/client/src/app/ui/tabs/observe/parsers/general/plugin/template.html +++ /dev/null @@ -1,6 +0,0 @@ - - Configurations - - - - diff --git a/application/client/src/app/ui/tabs/observe/parsers/general/someip/component.ts b/application/client/src/app/ui/tabs/observe/parsers/general/someip/component.ts deleted file mode 100644 index c446a49095..0000000000 --- a/application/client/src/app/ui/tabs/observe/parsers/general/someip/component.ts +++ /dev/null @@ -1,33 +0,0 @@ -import { Component, ChangeDetectorRef, Input, AfterContentInit } from '@angular/core'; -import { Ilc, IlcInterface } from '@env/decorators/component'; -import { Initial } from '@env/decorators/initial'; -import { ChangesDetector } from '@ui/env/extentions/changes'; -import { bytesToStr } from '@env/str'; -import { State } from './state'; -import { Observe } from '@platform/types/observe'; - -@Component({ - selector: 'app-el-someip-general', - templateUrl: './template.html', - styleUrls: ['./styles.less'], - standalone: false, -}) -@Initial() -@Ilc() -export class SomeIpGeneralConfiguration extends ChangesDetector implements AfterContentInit { - @Input() observe!: Observe; - - protected state!: State; - - public bytesToStr = bytesToStr; - - constructor(cdRef: ChangeDetectorRef) { - super(cdRef); - } - - public ngAfterContentInit(): void { - this.state = new State(this.observe); - this.state.bind(this); - } -} -export interface SomeIpGeneralConfiguration extends IlcInterface {} diff --git a/application/client/src/app/ui/tabs/observe/parsers/general/someip/module.ts b/application/client/src/app/ui/tabs/observe/parsers/general/someip/module.ts deleted file mode 100644 index c7400a6791..0000000000 --- a/application/client/src/app/ui/tabs/observe/parsers/general/someip/module.ts +++ /dev/null @@ -1,35 +0,0 @@ -import { NgModule } from '@angular/core'; -import { CommonModule } from '@angular/common'; -import { FormsModule, ReactiveFormsModule } from '@angular/forms'; -import { MatButtonModule } from '@angular/material/button'; -import { MatCardModule } from '@angular/material/card'; -import { MatDividerModule } from '@angular/material/divider'; -import { MatChipsModule } from '@angular/material/chips'; -import { MatProgressBarModule } from '@angular/material/progress-bar'; -import { MatIconModule } from '@angular/material/icon'; -import { MatFormFieldModule } from '@angular/material/form-field'; -import { MatSelectModule } from '@angular/material/select'; -import { MatListModule } from '@angular/material/list'; - -import { SomeIpGeneralConfiguration } from './component'; - -@NgModule({ - imports: [ - CommonModule, - FormsModule, - ReactiveFormsModule, - MatButtonModule, - MatCardModule, - MatDividerModule, - MatProgressBarModule, - MatChipsModule, - MatIconModule, - MatFormFieldModule, - MatSelectModule, - MatListModule, - ], - declarations: [SomeIpGeneralConfiguration], - exports: [SomeIpGeneralConfiguration], - bootstrap: [SomeIpGeneralConfiguration], -}) -export class SomeIpGeneralConfigurationModule {} diff --git a/application/client/src/app/ui/tabs/observe/parsers/general/someip/state.ts b/application/client/src/app/ui/tabs/observe/parsers/general/someip/state.ts deleted file mode 100644 index 28a593ef44..0000000000 --- a/application/client/src/app/ui/tabs/observe/parsers/general/someip/state.ts +++ /dev/null @@ -1,47 +0,0 @@ -import { File } from '@platform/types/files'; -import { bridge } from '@service/bridge'; -import { State as Base } from '../../state'; - -import * as SomeIp from '@platform/types/observe/parser/someip'; - -export class State extends Base { - public fibex: File[] = []; - - public update(): State { - const conf = this.observe.parser.as(SomeIp.Configuration); - if (conf === undefined) { - return this; - } - if (this.fibex.length !== 0) { - conf.configuration.fibex_file_paths = this.fibex.map((f) => f.filename); - } else { - conf.configuration.fibex_file_paths = undefined; - } - return this; - } - - public addFibexFile() { - bridge - .files() - .select.custom('xml') - .then((files: File[]) => { - files = files.filter((added) => { - return ( - this.fibex.find((exist) => exist.filename === added.filename) === undefined - ); - }); - this.fibex = this.fibex.concat(files); - }) - .catch((err: Error) => { - this.ref.log().error(`Fail to open xml (fibex) file(s): ${err.message}`); - }) - .finally(() => { - this.update().ref.detectChanges(); - }); - } - - public removeFibex(file: File) { - this.fibex = this.fibex.filter((f) => f.filename !== file.filename); - this.update().ref.detectChanges(); - } -} diff --git a/application/client/src/app/ui/tabs/observe/parsers/general/someip/styles.less b/application/client/src/app/ui/tabs/observe/parsers/general/someip/styles.less deleted file mode 100644 index 684961bca9..0000000000 --- a/application/client/src/app/ui/tabs/observe/parsers/general/someip/styles.less +++ /dev/null @@ -1,18 +0,0 @@ -@import '../../../../../styles/variables.less'; - - -:host { - position: relative; - display: block; - width: 100%; - overflow: hidden; - & div.controlls { - text-align: right; - } - & button { - position: relative; - display: inline-block; - margin: 6px 0 6px 6px; - } - -} \ No newline at end of file diff --git a/application/client/src/app/ui/tabs/observe/parsers/general/someip/template.html b/application/client/src/app/ui/tabs/observe/parsers/general/someip/template.html deleted file mode 100644 index b25ae24971..0000000000 --- a/application/client/src/app/ui/tabs/observe/parsers/general/someip/template.html +++ /dev/null @@ -1,24 +0,0 @@ - - Fibex - Attach fibex file (optional) - -
- - - {{file.name}} - - - -
- -
- -
-
-
- diff --git a/application/client/src/app/ui/tabs/observe/parsers/general/styles.less b/application/client/src/app/ui/tabs/observe/parsers/general/styles.less deleted file mode 100644 index be92722fb8..0000000000 --- a/application/client/src/app/ui/tabs/observe/parsers/general/styles.less +++ /dev/null @@ -1,111 +0,0 @@ -@import '../../../../styles/variables.less'; - - -:host { - position: absolute; - display: block; - top: 0; - left: 0; - width: 100%; - height: 100%; - overflow: hidden; - & app-transport { - margin-top: 12px; - } - & div.controlls { - text-align: right; - } - & h1 { - font-size: 14px; - } - & button { - position: relative; - display: inline-block; - margin: 6px 0 6px 6px; - } - & div.left { - position: absolute; - display: flex; - flex-direction: column; - top: 0; - bottom: 0; - left: 0; - right: 330px; - overflow: hidden; - justify-content: stretch; - justify-items: stretch; - & div.filter { - position: absolute; - z-index: 1000; - padding: 6px 12px; - background: var(--scheme-color-warning-light); - top: 6px; - right: 6px; - box-shadow: 3px 3px 3px rgb(0 0 0 / 40%); - border-radius: 3px; - } - & .fill { - overflow: auto; - } - & .section { - padding-top: 12px; - & mat-divider { - margin-top: -12px; - } - & .mat-standard-chip{ - min-height: 24px; - } - } - } - & div.right { - position: absolute; - width: 320px; - right: 6px; - bottom: 0; - top: 0; - overflow-y: auto; - overflow-x: hidden; - display: flex; - flex-direction: column; - & mat-divider.fibex-divider { - margin-top: 12px; - } - & div.fibex-controlls{ - position: relative; - width: 100%; - margin-top: 19px; - text-align: right; - } - & div.spacer { - flex: auto; - } - & app-tabs-source-actions { - position: sticky; - bottom: 0; - z-index: 1; - box-shadow: 0px 0px 16px rgba(0,0,0,0.4); - } - } - & .table-fill { - width: 100%; - } - & .info { - & .caption { - text-align: left; - padding-right: 12px; - } - & .value { - text-align: left; - } - } - - & div.progress { - margin-top: 24px; - & p { - text-align: center; - } - } - & .mat-progress-bar-fill::after { - background-color: var(--scheme-color-accent); - } -} \ No newline at end of file diff --git a/application/client/src/app/ui/tabs/observe/parsers/general/template.html b/application/client/src/app/ui/tabs/observe/parsers/general/template.html deleted file mode 100644 index 41493effc4..0000000000 --- a/application/client/src/app/ui/tabs/observe/parsers/general/template.html +++ /dev/null @@ -1,18 +0,0 @@ - - - - - diff --git a/application/client/src/app/ui/tabs/observe/parsers/general/text/component.ts b/application/client/src/app/ui/tabs/observe/parsers/general/text/component.ts deleted file mode 100644 index 5b989063ad..0000000000 --- a/application/client/src/app/ui/tabs/observe/parsers/general/text/component.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { Component, Input } from '@angular/core'; -import { Ilc, IlcInterface } from '@env/decorators/component'; -import { Initial } from '@env/decorators/initial'; -import { Observe } from '@platform/types/observe'; - -@Component({ - selector: 'app-el-text-general', - templateUrl: './template.html', - styleUrls: ['./styles.less'], - standalone: false, -}) -@Initial() -@Ilc() -export class TextGeneralConfiguration { - @Input() observe!: Observe; -} -export interface TextGeneralConfiguration extends IlcInterface {} diff --git a/application/client/src/app/ui/tabs/observe/parsers/general/text/module.ts b/application/client/src/app/ui/tabs/observe/parsers/general/text/module.ts deleted file mode 100644 index ed5b0df2df..0000000000 --- a/application/client/src/app/ui/tabs/observe/parsers/general/text/module.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { NgModule } from '@angular/core'; -import { CommonModule } from '@angular/common'; -import { MatCardModule } from '@angular/material/card'; -import { MatDividerModule } from '@angular/material/divider'; - -import { TextGeneralConfiguration } from './component'; - -@NgModule({ - imports: [CommonModule, MatCardModule, MatDividerModule], - declarations: [TextGeneralConfiguration], - exports: [TextGeneralConfiguration], - bootstrap: [TextGeneralConfiguration], -}) -export class TextGeneralConfigurationModule {} diff --git a/application/client/src/app/ui/tabs/observe/parsers/general/text/styles.less b/application/client/src/app/ui/tabs/observe/parsers/general/text/styles.less deleted file mode 100644 index 2276da0bdd..0000000000 --- a/application/client/src/app/ui/tabs/observe/parsers/general/text/styles.less +++ /dev/null @@ -1,9 +0,0 @@ -@import '../../../../../styles/variables.less'; - - -:host { - position: relative; - display: block; - width: 100%; - overflow: hidden; -} \ No newline at end of file diff --git a/application/client/src/app/ui/tabs/observe/parsers/general/text/template.html b/application/client/src/app/ui/tabs/observe/parsers/general/text/template.html deleted file mode 100644 index de35a517dc..0000000000 --- a/application/client/src/app/ui/tabs/observe/parsers/general/text/template.html +++ /dev/null @@ -1,7 +0,0 @@ - - Plain text parser - -

This parser doesn't require any kind of configuration

-
-
- diff --git a/application/client/src/app/ui/tabs/observe/parsers/module.ts b/application/client/src/app/ui/tabs/observe/parsers/module.ts deleted file mode 100644 index 79fc31786b..0000000000 --- a/application/client/src/app/ui/tabs/observe/parsers/module.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { NgModule } from '@angular/core'; -import { CommonModule } from '@angular/common'; -import { ParserGeneralConfigurationModule } from './general/module'; -import { ParserExtraConfigurationModule } from './extra/module'; - -@NgModule({ - imports: [CommonModule, ParserGeneralConfigurationModule, ParserExtraConfigurationModule], - declarations: [], - exports: [], - bootstrap: [], -}) -export class ParsersModule {} diff --git a/application/client/src/app/ui/tabs/observe/parsers/state.ts b/application/client/src/app/ui/tabs/observe/parsers/state.ts deleted file mode 100644 index afd24b19cc..0000000000 --- a/application/client/src/app/ui/tabs/observe/parsers/state.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { IlcInterface } from '@env/decorators/component'; -import { ChangesDetector } from '@ui/env/extentions/changes'; -import { Observe } from '@platform/types/observe'; -import { Holder } from '@module/matcher'; - -export class State extends Holder { - protected ref!: IlcInterface & ChangesDetector; - - constructor(public readonly observe: Observe) { - super(); - } - - public bind(ref: IlcInterface & ChangesDetector) { - this.ref = ref; - } -} diff --git a/application/client/src/app/ui/tabs/observe/state.ts b/application/client/src/app/ui/tabs/observe/state.ts deleted file mode 100644 index a79f5e0841..0000000000 --- a/application/client/src/app/ui/tabs/observe/state.ts +++ /dev/null @@ -1,347 +0,0 @@ -import { IList, Observe, Parser } from '@platform/types/observe'; -import { IlcInterface } from '@env/decorators/component'; -import { ChangesDetector } from '@ui/env/extentions/changes'; -import { Subjects, Subject, Subscriber } from '@platform/env/subscription'; -import { File } from '@platform/types/files'; -import { bytesToStr } from '@env/str'; -import { Action } from './action'; -import { TabControls } from '@service/session'; -import { Notification } from '@ui/service/notifications'; -import { Locker, Level } from '@ui/service/lockers'; -import { PluginEntity } from '@platform/types/bindings'; - -import * as StreamOrigin from '@platform/types/observe/origin/stream/index'; -import * as Origin from '@platform/types/observe/origin/index'; -import * as FileOrigin from '@platform/types/observe/origin/file'; -import * as ConcatOrigin from '@platform/types/observe/origin/concat'; -import * as Parsers from '@platform/types/observe/parser'; -import * as Streams from '@platform/types/observe/origin/stream/index'; -import { plugins } from '@service/plugins'; - -export interface IApi { - finish(observe: Observe): Promise; - cancel(): void; - tab(): TabControls; -} - -export interface IInputs { - observe: Observe; - api: IApi; -} - -export class WrappedParserRef { - constructor(protected readonly inner: Parser.Reference | PluginEntity) {} - - private as_embedded(): Parser.Reference | undefined { - if (typeof (this.inner as any)['alias'] === 'function') { - return this.inner as Parser.Reference; - } - return undefined; - } - - private as_plugin(): PluginEntity | undefined { - if (typeof (this.inner as any)['dir_path'] === 'string') { - return this.inner as PluginEntity; - } - return undefined; - } - - public desc(): IList { - const embedded = this.as_embedded(); - if (embedded !== undefined) { - return embedded.desc(); - } - const plugin = this.as_plugin(); - if (plugin !== undefined) { - return { - major: plugin.metadata.title, - minor: plugin.metadata.description - ? plugin.metadata.description - : plugin.metadata.title, - icon: undefined, - }; - } - throw new Error(`Fail to process ${JSON.stringify(this.inner)}`); - } - public alias(): Parser.Protocol | string { - const embedded = this.as_embedded(); - if (embedded !== undefined) { - return embedded.alias(); - } - const plugin = this.as_plugin(); - if (plugin !== undefined) { - return plugin.dir_path; - } - throw new Error(`Fail to process ${JSON.stringify(this.inner)}`); - } -} - -export class State extends Subscriber { - public parser: Parser.Protocol | string | undefined; - public parsers: { ref: WrappedParserRef; disabled: boolean }[] = []; - public streams: { ref: StreamOrigin.Reference; disabled: boolean }[] = []; - public file: File | undefined; - public concat: File[] | undefined; - public stream: StreamOrigin.Source | undefined; - public size: string | undefined; - public action: Action = new Action(); - public updates: Subjects<{ - parser: Subject; - stream: Subject; - }> = new Subjects({ - parser: new Subject(), - stream: new Subject(), - }); - - constructor( - protected readonly ref: IlcInterface & ChangesDetector & { api: IApi }, - public readonly observe: Observe, - ) { - super(); - this.update().stream(); - this.update().files(); - this.update().parser(); - this.update().validate(); - this.update().action(); - this.register( - this.action.subjects.get().updated.subscribe(() => { - this.ref.markChangesForCheck(); - }), - this.action.subjects.get().apply.subscribe(() => { - this.finish(); - }), - this.observe.subscribe(() => { - this.update().validate(); - this.update().action(); - }), - ); - } - - public destroy() { - this.updates.destroy(); - this.unsubscribe(); - } - - public finish() { - if (this.action.disabled) { - return; - } - this.action.applied(); - this.ref.api.finish(this.observe).catch((err: Error) => { - this.ref - .ilc() - .services.ui.lockers.lock( - new Locker(true, err.message).set().type(Level.error).spinner(false).end(), - { - closable: true, - closeOnKey: 'Escape', - closeOnBGClick: true, - }, - ); - this.ref.ilc().services.ui.notifications.store( - new Notification({ - message: err.message, - actions: [], - }), - ); - }); - } - - public cancel() { - this.ref.api.cancel(); - } - - public getParser(): { - embedded(): Parser.Protocol | undefined; - pluginPath(): string | undefined; - } { - return { - embedded: (): Parser.Protocol | undefined => { - if (!this.parser) { - return undefined; - } - const embedded = Parser.tryAsEmbedded(this.parser); - return embedded ? embedded : undefined; - }, - pluginPath: (): string | undefined => { - if (!this.parser) { - return undefined; - } - return Parser.tryAsEmbedded(this.parser) ? undefined : (this.parser as string); - }, - }; - } - - public update(): { - stream(): void; - files(): void; - parser(): void; - validate(): void; - action(): void; - } { - return { - stream: (): void => { - const prev = this.stream; - const nature = this.observe.origin.nature(); - if ( - nature instanceof Origin.File.Configuration || - nature instanceof Origin.Concat.Configuration || - nature instanceof Origin.Plugin.Configuration - ) { - this.streams = []; - this.stream = undefined; - } else { - this.streams = this.observe.parser.getSupportedStream().map((ref) => { - return { ref, disabled: false }; - }); - if (this.stream === undefined) { - this.stream = nature.alias(); - } else { - const current = this.stream; - this.stream = - current !== undefined && - this.streams.find((p) => p.ref.alias() === current) !== undefined - ? current - : this.streams[0].ref.alias(); - } - this.streams.push( - ...Streams.getAllRefs() - .filter( - (ref) => - this.streams.find((p) => p.ref.alias() === ref.alias()) === - undefined, - ) - .map((ref) => { - return { ref, disabled: true }; - }), - ); - } - this.ref.markChangesForCheck(); - prev !== this.stream && this.updates.get().stream.emit(); - }, - files: (): void => { - const instance = this.observe.origin.instance; - const files: string[] | undefined = - instance instanceof FileOrigin.Configuration - ? [instance.filename()] - : instance instanceof ConcatOrigin.Configuration - ? instance.files() - : undefined; - if (files === undefined) { - return; - } - this.ref - .ilc() - .services.system.bridge.files() - .getByPath(files) - .then((files: File[]) => { - this.size = bytesToStr( - files - .map((f) => f.stat.size) - .reduce((partialSum, a) => partialSum + a, 0), - ); - if (instance instanceof FileOrigin.Configuration) { - if (files.length !== 1) { - this.ref - .log() - .error( - `Expecting only 1 file stats. Has been gotten: ${files.length}`, - ); - return; - } - this.file = files[0]; - } else if (instance instanceof ConcatOrigin.Configuration) { - this.concat = files; - } - }) - .catch((err: Error) => { - this.ref - .log() - .error( - `Fail to get stats for files: ${files.join(', ')}: ${err.message}`, - ); - }) - .finally(() => { - this.ref.markChangesForCheck(); - }); - }, - parser: (): void => { - const current = this.parser; - this.parsers = [ - ...this.observe.origin - .getSupportedParsers() - .filter((ref) => ref.alias() !== Parser.Protocol.Plugin) - .map((ref) => { - return { ref: new WrappedParserRef(ref), disabled: false }; - }), - ...plugins - .list() - .preload() - .filter((ref) => ref.plugin_type === 'Parser') - .map((ref) => { - return { ref: new WrappedParserRef(ref), disabled: false }; - }), - ]; - this.parser = - current !== undefined && - this.parsers.find((p) => p.ref.alias() === current) !== undefined - ? current - : this.parsers[0].ref.alias(); - this.parsers.push( - ...Parsers.getAllRefs() - .filter( - (ref) => - this.parsers.find((p) => p.ref.alias() === ref.alias()) === - undefined && ref.inited(), - ) - .map((ref) => { - return { ref: new WrappedParserRef(ref), disabled: true }; - }), - ); - this.ref.markChangesForCheck(); - current !== this.parser && this.updates.get().parser.emit(); - }, - validate: (): void => { - const error = this.observe.validate(); - this.action.setDisabled(error instanceof Error); - }, - action: (): void => { - this.action.setCaption(this.observe.origin.desc().action); - }, - }; - } - - public change(): { - stream(): void; - parser(): void; - } { - return { - stream: (): void => { - if (this.stream === undefined) { - this.ref.log().error(`Stream cannot be changed, because it's undefined`); - return; - } - const instance = this.observe.origin.instance; - if (!(instance instanceof Origin.Stream.Configuration)) { - this.ref.log().error(`Stream cannot be changed, because origin isn't Stream`); - return; - } - instance.change(StreamOrigin.getByAlias(this.stream)); - this.updates.get().stream.emit(); - this.update().parser(); - }, - parser: (): void => { - if (this.parser === undefined) { - this.ref.log().error(`Parser cannot be changed, because it's undefined`); - return; - } - const alias = Parser.tryAsEmbedded(this.parser); - this.observe.parser.change( - Parser.getByAlias(alias ? alias : Parser.Protocol.Plugin), - ); - this.updates.get().parser.emit(); - this.update().stream(); - }, - }; - } -} diff --git a/application/client/src/app/ui/tabs/observe/styles.less b/application/client/src/app/ui/tabs/observe/styles.less deleted file mode 100644 index 7b24c33a16..0000000000 --- a/application/client/src/app/ui/tabs/observe/styles.less +++ /dev/null @@ -1,74 +0,0 @@ -@import '../../styles/variables.less'; - - -:host { - position: absolute; - display: block; - top: 0; - left: 0; - width: 100%; - height: 100%; - overflow: hidden; - & div.preset-container { - top: 48px; - bottom: 0px; - height: auto; - } - & div.title { - position: absolute; - display: flex; - flex-direction: row; - align-items: center; - left:0; - right: 0; - padding: 0 8px; - background: var(--scheme-color-5); - box-shadow: 0 3px 3px rgba(0,0,0,0.4); - height: 48px; - overflow: hidden; - & *.entity { - display: flex; - flex-direction: row; - align-items: center; - left:0; - right: 0; - padding: 0 8px; - background: var(--scheme-color-5); - height: 48px; - &.filler { - flex: auto; - width: 100%; - margin: 0; - justify-content: end; - } - &.info { - color: var(--scheme-color-2); - white-space: nowrap; - align-items: center; - flex: auto; - width: 100%; - overflow: hidden; - text-overflow: ellipsis; - & span { - margin-left: 8px; - } - } - & button { - position: relative; - display: inline-block; - margin: 0 16px 0 0; - margin-bottom: 0!important; - &:last-child { - margin-right: 0; - } - } - & p.info { - color: var(--scheme-color-2); - white-space: nowrap; - } - } - & > * { - margin: 0 8px; - } - } -} \ No newline at end of file diff --git a/application/client/src/app/ui/tabs/observe/template.html b/application/client/src/app/ui/tabs/observe/template.html deleted file mode 100644 index 7400d0a98a..0000000000 --- a/application/client/src/app/ui/tabs/observe/template.html +++ /dev/null @@ -1,35 +0,0 @@ -
-

{{state.file.name}}({{state.size}})

-

Concating:{{state.concat.length}}files({{state.size}})

-
-

Stream From:

- - - - {{stream.ref.desc().major}} - - - -
-
-

Used Parser:

- - - - {{parser.ref.desc().major}} - - - -
-
- - -
-
-
-
- - - -
-
diff --git a/application/client/src/app/ui/tabs/plugins/component.ts b/application/client/src/app/ui/tabs/plugins/component.ts deleted file mode 100644 index 3a6d81e2f6..0000000000 --- a/application/client/src/app/ui/tabs/plugins/component.ts +++ /dev/null @@ -1,86 +0,0 @@ -import { Component, ChangeDetectorRef, AfterContentInit, OnDestroy } from '@angular/core'; -import { Ilc, IlcInterface } from '@env/decorators/component'; -import { Initial } from '@env/decorators/initial'; -import { ChangesDetector } from '@ui/env/extentions/changes'; -import { Provider } from './provider'; -import { Target } from './list/component'; -import { bridge } from '@service/bridge'; -import { Notification, notifications } from '@ui/service/notifications'; -import { error } from '@platform/log/utils'; - -@Component({ - selector: 'app-tabs-plugins-manager', - templateUrl: './template.html', - styleUrls: ['./styles.less'], - standalone: false, -}) -@Initial() -@Ilc() -export class PluginsManager extends ChangesDetector implements AfterContentInit, OnDestroy { - public provider: Provider = new Provider(); - public get Target(): typeof Target { - return Target; - } - constructor(cdRef: ChangeDetectorRef) { - super(cdRef); - } - - public ngOnDestroy(): void { - this.provider.destroy(); - } - - public ngAfterContentInit(): void { - this.env().subscriber.register( - this.provider.subjects.get().state.subscribe(() => { - this.detectChanges(); - }), - this.provider.subjects.get().selected.subscribe(() => { - this.detectChanges(); - }), - this.provider.subjects.get().add.subscribe(() => { - this.detectChanges(); - }), - this.provider.subjects.get().remove.subscribe(() => { - this.detectChanges(); - }), - ); - this.provider.load(); - } - - public async reload() { - if (this.provider.isBusy()) { - return; - } - await this.provider.load(true); - } - - public async addPlugin() { - if (this.provider.isBusy()) { - return; - } - try { - const folder = await bridge.folders().select(); - if (folder.length === 0) { - return; - } - await this.provider.addPlugin(folder[0]); - this.reload(); - notifications.notify( - new Notification({ - message: `New plugin has been added`, - actions: [], - }), - ); - } catch (err) { - notifications.notify( - new Notification({ - message: this.log().error(`Fail to add plugin: ${error(err)}`), - actions: [], - pinned: true, - }), - ); - } - } -} - -export interface PluginsManager extends IlcInterface {} diff --git a/application/client/src/app/ui/tabs/plugins/desc.ts b/application/client/src/app/ui/tabs/plugins/desc.ts deleted file mode 100644 index 75c49618e7..0000000000 --- a/application/client/src/app/ui/tabs/plugins/desc.ts +++ /dev/null @@ -1,118 +0,0 @@ -import { PluginEntity, InvalidPluginEntity } from '@platform/types/bindings/plugins'; -import { bridge } from '@service/bridge'; -import { ParsedPath } from '@platform/types/files'; - -export abstract class PluginDescription { - public name: string = ''; - public desc: string = ''; - public icon: string = ''; - public path: ParsedPath | undefined; - public readmePath: string | undefined; - - protected abstract getName(): string; - protected abstract getDesc(): string; - protected abstract getIcon(): string; - protected abstract getReadmePath(): string | undefined; - - protected update() { - this.icon = this.getIcon(); - this.name = this.getName(); - this.desc = this.getDesc(); - this.readmePath = this.getReadmePath(); - } - - public abstract getPath(): string; - public abstract isValid(): boolean; - - public load(): Promise { - return bridge - .files() - .name(this.getPath()) - .then((path: ParsedPath) => { - this.path = path; - this.update(); - }); - } -} - -export class InstalledPluginDesc extends PluginDescription { - constructor(public readonly entity: PluginEntity) { - super(); - } - protected override getIcon(): string { - switch (this.entity.plugin_type) { - case 'Parser': - return 'swap_vert'; - case 'ByteSource': - return 'input'; - } - } - protected override getName(): string { - if (!this.entity.metadata && !this.path) { - return this.entity.dir_path; - } else if (!this.entity.metadata && this.path) { - return this.path.name; - } else if (this.entity.metadata) { - return this.entity.metadata.title; - } else { - return this.entity.dir_path; - } - } - protected override getDesc(): string { - if (!this.entity.metadata && !this.path) { - return this.entity.dir_path; - } else if (!this.entity.metadata && this.path) { - return this.path.name; - } else if (this.entity.metadata && this.entity.metadata.description) { - return this.entity.metadata.description; - } else { - return this.entity.dir_path; - } - } - public override getPath(): string { - return this.entity.dir_path; - } - public override getReadmePath(): string | undefined { - return this.entity.readme_path ?? undefined; - } - public override isValid(): boolean { - return true; - } -} - -export class InvalidPluginDesc extends PluginDescription { - constructor(public readonly entity: InvalidPluginEntity) { - super(); - } - protected override getIcon(): string { - switch (this.entity.plugin_type) { - case 'Parser': - return 'swap_vert'; - case 'ByteSource': - return 'input'; - } - } - protected override getName(): string { - if (!this.path) { - return this.entity.dir_path; - } else { - return this.path.name; - } - } - protected override getDesc(): string { - if (!this.path) { - return this.entity.dir_path; - } else { - return this.path.name; - } - } - public override getPath(): string { - return this.entity.dir_path; - } - public override getReadmePath(): string | undefined { - return undefined; - } - public override isValid(): boolean { - return false; - } -} diff --git a/application/client/src/app/ui/tabs/plugins/details/component.ts b/application/client/src/app/ui/tabs/plugins/details/component.ts deleted file mode 100644 index 29876330b7..0000000000 --- a/application/client/src/app/ui/tabs/plugins/details/component.ts +++ /dev/null @@ -1,302 +0,0 @@ -import { - Component, - ChangeDetectorRef, - Input, - ViewChild, - ElementRef, - AfterViewInit, - AfterContentInit, - OnDestroy, -} from '@angular/core'; -import { DomSanitizer, SafeHtml } from '@angular/platform-browser'; -import { Ilc, IlcInterface } from '@env/decorators/component'; -import { Initial } from '@env/decorators/initial'; -import { ChangesDetector } from '@ui/env/extentions/changes'; -import { micromark } from 'micromark'; -import { PluginDescription } from '../desc'; -import { Provider } from '../provider'; -import { PluginRunData, PluginLogLevel } from '@platform/types/bindings/plugins'; -import { lockers, Locker } from '@ui/service/lockers'; -import { Notification, notifications } from '@ui/service/notifications'; - -import * as dom from '@ui/env/dom'; - -enum Tab { - ReadMe, - Inspecting, -} - -interface ParsedLogMessage { - msg: string; - dt: string; - level: PluginLogLevel; -} - -@Component({ - selector: 'app-plugins-manager-details', - templateUrl: './template.html', - styleUrls: ['./styles.less'], - standalone: false, -}) -@Initial() -@Ilc() -export class Details extends ChangesDetector implements AfterViewInit, AfterContentInit, OnDestroy { - @Input() public provider!: Provider; - @Input() public plugin!: PluginDescription; - - @ViewChild('content') contentRef!: ElementRef; - - public get Tab(): typeof Tab { - return Tab; - } - public readme: SafeHtml = ''; - public logs: ParsedLogMessage[] = []; - public loading: { - readme: boolean; - logs: boolean; - } = { - readme: false, - logs: false, - }; - public tab: Tab = Tab.ReadMe; - public stats: { - errors: number; - warns: number; - } = { - errors: 0, - warns: 0, - }; - - protected async fetchReadMe(): Promise { - const drop = () => { - this.loading.readme = false; - this.readme = ''; - this.detectChanges(); - }; - if (this.loading.readme) { - return; - } - this.loading.readme = true; - this.links().unbind(); - this.detectChanges(); - if (!this.plugin.path) { - return drop(); - } - if (this.plugin.readmePath !== undefined) { - this.provider - .readme(this.plugin.readmePath) - .then((content: string | undefined) => { - if (content !== undefined) { - this.readme = this.sanitizer.bypassSecurityTrustHtml(micromark(content)); - this.detectChanges(); - this.links().bind(); - } else { - drop(); - } - }) - .catch((err: Error) => { - this.log().error(`Fail to read "${this.plugin.getPath()}": ${err.message}`); - this.readme = ''; - }) - .finally(() => { - this.loading.readme = false; - this.detectChanges(); - }); - } else { - drop(); - } - } - - protected fetchRunData() { - if (this.loading.logs) { - return; - } - this.loading.logs = true; - this.logs = []; - this.detectChanges(); - this.provider - .getRunData(this.plugin.getPath()) - .then((rd: PluginRunData | undefined) => { - if (rd !== undefined) { - this.stats.errors = 0; - this.stats.warns = 0; - this.logs = rd.logs.map((log) => { - this.stats.errors += log.level === 'Err' ? 1 : 0; - this.stats.warns += log.level === 'Warn' ? 1 : 0; - return { - msg: log.msg, - level: log.level, - dt: new Date(Number(log.timestamp)).toLocaleTimeString(), - }; - }); - } - }) - .catch((err: Error) => { - this.log().error(`Fail fetch run data: ${err.message}`); - }) - .finally(() => { - this.loading.logs = false; - this.detectChanges(); - }); - } - - protected links(): { - bind(): void; - unbind(): void; - } { - return { - bind: (): void => { - if (!this.contentRef) { - return; - } - const links = this.contentRef.nativeElement.querySelectorAll('a'); - if (links === null) { - return; - } - links.forEach((link: HTMLAnchorElement) => { - link.addEventListener('click', this.redirect); - }); - }, - unbind: (): void => { - if (!this.contentRef) { - return; - } - const links = this.contentRef.nativeElement.querySelectorAll('a'); - if (links === null) { - return; - } - links.forEach((link: HTMLAnchorElement) => { - link.removeEventListener('click', this.redirect); - }); - }, - }; - } - - protected safeLoad(): void { - this.fetchReadMe() - .catch((err: Error) => { - this.log().error(`Fail to load plugin's details: ${err.message}`); - }) - .finally(() => { - if (!this.plugin.isValid()) { - this.goto().inspect(); - } else { - this.goto().readme(); - } - }); - this.fetchRunData(); - } - - protected redirect(event: MouseEvent): void { - dom.stop(event); - // TODO: safe openening URL - } - - constructor( - cdRef: ChangeDetectorRef, - protected readonly sanitizer: DomSanitizer, - ) { - super(cdRef); - } - - public ngAfterViewInit(): void { - this.safeLoad(); - } - - public ngAfterContentInit(): void { - this.env().subscriber.register( - this.provider.subjects.get().selected.subscribe(() => { - this.safeLoad(); - }), - ); - } - - public ngOnDestroy(): void { - this.links().unbind(); - } - - public isLoading(): boolean { - return this.loading.logs || this.loading.readme; - } - - public goto(): { readme(): void; inspect(): void } { - return { - readme: (): void => { - this.tab = Tab.ReadMe; - this.detectChanges(); - this.links().bind(); - }, - inspect: (): void => { - this.links().unbind(); - this.tab = Tab.Inspecting; - this.fetchRunData(); - }, - }; - } - - public removePlugin() { - if (this.plugin.path === undefined) { - return; - } - const confirm = lockers.lock( - new Locker( - false, - `Are you sure you want to permanently remove '${this.plugin.name}' plugin?`, - ) - .set() - .buttons([ - { - caption: 'Remove', - handler: () => { - confirm.popup.close(); - this.doRemovePlugin(); - }, - }, - { - caption: 'Cancel', - handler: () => { - confirm.popup.close(); - }, - }, - ]) - .end(), - { - closable: false, - }, - ); - } - - doRemovePlugin() { - if (this.plugin.path === undefined) { - return; - } - - const lock = lockers.lock(new Locker(true, `Removing plugin...`), { - closable: false, - }); - this.provider - .removePlugin(this.plugin.path.filename) - .then(() => { - notifications.notify( - new Notification({ - message: `Plugin has been removed`, - actions: [], - }), - ); - }) - .catch((err: Error) => { - notifications.notify( - new Notification({ - message: `Fail to remove plugin: ${err.message}`, - actions: [], - pinned: true, - }), - ); - }) - .finally(() => { - lock.popup.close(); - }); - } -} - -export interface Details extends IlcInterface {} diff --git a/application/client/src/app/ui/tabs/plugins/details/styles.less b/application/client/src/app/ui/tabs/plugins/details/styles.less deleted file mode 100644 index c51817b0ea..0000000000 --- a/application/client/src/app/ui/tabs/plugins/details/styles.less +++ /dev/null @@ -1,98 +0,0 @@ -@import '../../../styles/variables.less'; - -:host { - position: absolute; - display: flex; - flex-direction: column; - top: 12px; - left: 12px; - bottom: 12px; - right: 12px; - overflow: hidden; - & div.info { - position: relative; - margin: 0 6px 12px 0; - & p { - text-align: left; - } - } - & div.actions { - position: relative; - display: flex; - margin: 0 0 12px 0; - flex-direction: row; - justify-content: end; - & button.selected { - &::after { - position: absolute; - display: block; - content: ''; - height: 2px; - bottom: 0; - width: 100%; - left: 0px; - background-color: var(--scheme-color-accent); - } - } - & button { - & span.stats { - position: relative; - display: inline-block; - font-size: 12px; - line-height: 0px; - margin: -8px 0 0 6px; - &.err { - color: var(--scheme-color-error); - } - &.warns { - color: var(--scheme-color-warning); - } - } - } - & button[disabled] { - &:hover { - background: none; - } - color: var(--scheme-color-3); - } - } - & div.readme { - position: relative; - overflow-y: auto; - overflow-x: hidden; - flex: auto; - } - & ul.logs { - position: relative; - list-style: none; - padding: 0; - margin: 0; - & li { - position: relative; - font-family: 'console', monospace; - font-size: 13.5px; - font-variant-numeric: tabular-nums; - display: flex; - flex-direction: row; - & span { - margin-right: 12px; - } - & span.dt { - min-width: 70px; - } - & span.level { - min-width: 40px; - } - &.Info, - &.Debug { - color: var(--scheme-color-1); - } - &.Err { - color: var(--scheme-color-error-light); - } - &.Warn { - color: var(--scheme-color-warning-light); - } - } - } -} diff --git a/application/client/src/app/ui/tabs/plugins/details/template.html b/application/client/src/app/ui/tabs/plugins/details/template.html deleted file mode 100644 index b13c192fc9..0000000000 --- a/application/client/src/app/ui/tabs/plugins/details/template.html +++ /dev/null @@ -1,50 +0,0 @@ -
-

{{plugin.name}}

-

{{plugin.desc}}

-
-
- - - - -
-
- - - - -
-

- Seems this plugins doesn't have yet any kind of description. -

-
- -
    -
  • - {{log.dt}}{{log.level}}{{log.msg}} -
  • -
-
-
diff --git a/application/client/src/app/ui/tabs/plugins/list/component.ts b/application/client/src/app/ui/tabs/plugins/list/component.ts deleted file mode 100644 index e3a8c90995..0000000000 --- a/application/client/src/app/ui/tabs/plugins/list/component.ts +++ /dev/null @@ -1,70 +0,0 @@ -import { Component, ChangeDetectorRef, AfterContentInit, Input } from '@angular/core'; -import { Ilc, IlcInterface } from '@env/decorators/component'; -import { Initial } from '@env/decorators/initial'; -import { ChangesDetector } from '@ui/env/extentions/changes'; -import { Provider } from '../provider'; -import { PluginDescription } from '../desc'; - -export enum Target { - Installed, - Invalid, - Available, -} - -@Component({ - selector: 'app-plugins-manager-list', - templateUrl: './template.html', - styleUrls: ['./styles.less'], - standalone: false, -}) -@Initial() -@Ilc() -export class List extends ChangesDetector implements AfterContentInit { - @Input() public provider!: Provider; - @Input() public target!: Target; - - public plugins: PluginDescription[] = []; - - constructor(cdRef: ChangeDetectorRef) { - super(cdRef); - } - - public ngAfterContentInit(): void { - this.env().subscriber.register( - this.provider.subjects.get().load.subscribe(() => { - this.update(); - }), - this.provider.subjects.get().state.subscribe(() => { - this.update(); - }), - ); - } - - public getTitle(): string { - switch (this.target) { - case Target.Installed: - return 'Installed Plugins'; - case Target.Invalid: - return 'Invalid Plugins'; - case Target.Available: - return 'Available Plugins'; - } - } - - protected update() { - switch (this.target) { - case Target.Installed: - this.plugins = this.provider.get().installed(); - break; - case Target.Invalid: - this.plugins = this.provider.get().invalid(); - break; - case Target.Available: - this.plugins = this.provider.get().available(); - break; - } - this.detectChanges(); - } -} - -export interface List extends IlcInterface {} diff --git a/application/client/src/app/ui/tabs/plugins/list/styles.less b/application/client/src/app/ui/tabs/plugins/list/styles.less deleted file mode 100644 index 4a9052cb3b..0000000000 --- a/application/client/src/app/ui/tabs/plugins/list/styles.less +++ /dev/null @@ -1,8 +0,0 @@ -@import '../../../styles/variables.less'; - -:host { - position: relative; - display: block; - width: 100%; - overflow: hidden; -} diff --git a/application/client/src/app/ui/tabs/plugins/list/template.html b/application/client/src/app/ui/tabs/plugins/list/template.html deleted file mode 100644 index c657168792..0000000000 --- a/application/client/src/app/ui/tabs/plugins/list/template.html +++ /dev/null @@ -1,18 +0,0 @@ - - {{getTitle()}} - - - - - - - - -

No plugins

-
-
-
diff --git a/application/client/src/app/ui/tabs/plugins/module.ts b/application/client/src/app/ui/tabs/plugins/module.ts deleted file mode 100644 index b1b85c0bad..0000000000 --- a/application/client/src/app/ui/tabs/plugins/module.ts +++ /dev/null @@ -1,27 +0,0 @@ -import { NgModule } from '@angular/core'; -import { CommonModule } from '@angular/common'; -import { MatCardModule } from '@angular/material/card'; -import { MatButtonModule } from '@angular/material/button'; -import { MatProgressBarModule } from '@angular/material/progress-bar'; -import { MatIconModule } from '@angular/material/icon'; -import { MatProgressSpinnerModule } from '@angular/material/progress-spinner'; - -import { PluginsManager } from './component'; -import { List } from './list/component'; -import { Plugin } from './plugin/component'; -import { Details } from './details/component'; - -@NgModule({ - imports: [ - CommonModule, - MatCardModule, - MatButtonModule, - MatProgressBarModule, - MatIconModule, - MatProgressSpinnerModule, - ], - declarations: [PluginsManager, Plugin, List, Details], - exports: [PluginsManager], - bootstrap: [PluginsManager], -}) -export class PluginsManagerModule {} diff --git a/application/client/src/app/ui/tabs/plugins/plugin/component.ts b/application/client/src/app/ui/tabs/plugins/plugin/component.ts deleted file mode 100644 index 55fdfc2e63..0000000000 --- a/application/client/src/app/ui/tabs/plugins/plugin/component.ts +++ /dev/null @@ -1,35 +0,0 @@ -import { Component, ChangeDetectorRef, Input, HostListener, HostBinding } from '@angular/core'; -import { Ilc, IlcInterface } from '@env/decorators/component'; -import { Initial } from '@env/decorators/initial'; -import { ChangesDetector } from '@ui/env/extentions/changes'; -import { PluginDescription } from '../desc'; -import { Provider } from '../provider'; - -@Component({ - selector: 'app-plugins-manager-plugin', - templateUrl: './template.html', - styleUrls: ['./styles.less'], - standalone: false, -}) -@Initial() -@Ilc() -export class Plugin extends ChangesDetector { - @Input() public provider!: Provider; - @Input() public plugin!: PluginDescription; - - @HostListener('click', ['$event']) onClick(_event: MouseEvent) { - this.provider.select(this.plugin.getPath()); - } - @HostBinding('class') get getClass() { - return !this.provider.selected - ? '' - : this.provider.selected.getPath() === this.plugin.getPath() - ? 'selected' - : ''; - } - constructor(cdRef: ChangeDetectorRef) { - super(cdRef); - } -} - -export interface Plugin extends IlcInterface {} diff --git a/application/client/src/app/ui/tabs/plugins/plugin/styles.less b/application/client/src/app/ui/tabs/plugins/plugin/styles.less deleted file mode 100644 index e2e6f2b631..0000000000 --- a/application/client/src/app/ui/tabs/plugins/plugin/styles.less +++ /dev/null @@ -1,36 +0,0 @@ -@import '../../../styles/variables.less'; - -:host { - position: relative; - display: flex; - align-items: center; - flex-direction: row; - cursor: default; - &.selected { - &::after { - position: absolute; - content: ''; - height: 100%; - left: -2px; - width: 2px; - background: var(--scheme-color-accent); - } - } - & div.icon { - & mat-icon { - font-size: 18px; - height: 16px; - } - } - & div.info { - flex: 1; - margin: 0 6px; - overflow: hidden; - & p { - text-align: left; - } - } - &:hover { - background: var(--scheme-color-3-75); - } -} diff --git a/application/client/src/app/ui/tabs/plugins/plugin/template.html b/application/client/src/app/ui/tabs/plugins/plugin/template.html deleted file mode 100644 index f6193c6de0..0000000000 --- a/application/client/src/app/ui/tabs/plugins/plugin/template.html +++ /dev/null @@ -1,10 +0,0 @@ -
- {{plugin.icon}} -
-
-

{{plugin.name}}

-

{{plugin.desc}}

-
-
- menu -
diff --git a/application/client/src/app/ui/tabs/plugins/provider.ts b/application/client/src/app/ui/tabs/plugins/provider.ts deleted file mode 100644 index 03bb715c3c..0000000000 --- a/application/client/src/app/ui/tabs/plugins/provider.ts +++ /dev/null @@ -1,193 +0,0 @@ -import { plugins } from '@service/plugins'; -import { InvalidPluginEntity, PluginEntity, PluginRunData } from '@platform/types/bindings/plugins'; -import { Subjects, Subject } from '@platform/env/subscription'; -import { scope } from '@platform/env/scope'; -import { Logger } from '@platform/log'; -import { InstalledPluginDesc, InvalidPluginDesc, PluginDescription } from './desc'; -import { bridge } from '@service/bridge'; -import { error } from '@platform/log/utils'; - -export class Provider { - protected log: Logger; - protected readonly plugins: { - invalid: InvalidPluginDesc[]; - installed: InstalledPluginDesc[]; - available: InstalledPluginDesc[]; - } = { - invalid: [], - installed: [], - available: [], - }; - - public subjects: Subjects<{ - load: Subject; - state: Subject; - selected: Subject; - // true - add starting; false - finished - add: Subject; - // true - add starting; false - finished - remove: Subject; - }> = new Subjects({ - load: new Subject(), - state: new Subject(), - selected: new Subject(), - add: new Subject(), - remove: new Subject(), - }); - public selected: PluginDescription | undefined; - public state: { - loading: boolean; - adding: boolean; - removing: boolean; - error: string | undefined; - } = { - loading: false, - adding: false, - removing: false, - error: undefined, - }; - - constructor() { - this.log = scope.getLogger(`Plugins Provider`); - } - - public async load(reload: boolean = false): Promise { - if (this.state.loading) { - return Promise.resolve(); - } - this.select(undefined); - this.state.loading = true; - if (reload) { - await plugins - .reloadPlugins() - .catch((err: Error) => this.log.error(`Fail to reload plugins: ${err.message}`)); - } - this.subjects.get().state.emit(); - return Promise.all([plugins.list().installed(), plugins.list().invalid()]) - .then((loaded: [PluginEntity[], InvalidPluginEntity[]]) => { - this.plugins.installed = loaded[0].map((en) => new InstalledPluginDesc(en)); - this.plugins.invalid = loaded[1].map((en) => new InvalidPluginDesc(en)); - this.state.error = undefined; - }) - .catch((err: Error) => { - this.log.error(`Fail to load plugins, due error: ${err.message}`); - this.state.error = err.message; - }) - .finally(() => { - Promise.all([ - ...this.plugins.installed.map((pl) => pl.load()), - ...this.plugins.invalid.map((pl) => pl.load()), - ]) - .catch((err: Error) => { - this.log.error(`Fail load some plugins data: ${err.message}`); - }) - .then(() => { - this.state.loading = false; - this.subjects.get().state.emit(); - this.subjects.get().load.emit(); - if (reload) { - // Apply changes on selected plugins by invoking select on it again. - const selectedPath = this.selected?.getPath(); - if (selectedPath !== undefined) { - this.select(selectedPath); - } - } - }); - }); - } - - public destroy() { - this.subjects.destroy(); - } - - public get(): { - /// List of installed plugins - installed(): InstalledPluginDesc[]; - /// List of available plugins (on remove source) - available(): InstalledPluginDesc[]; - /// List of invalid plugins (installed, but not inited) - invalid(): InvalidPluginDesc[]; - } { - return { - installed: (): InstalledPluginDesc[] => { - return this.plugins.installed; - }, - available: (): InstalledPluginDesc[] => { - return this.plugins.available; - }, - invalid: (): InvalidPluginDesc[] => { - return this.plugins.invalid; - }, - }; - } - public async readme(readmePath: string): Promise { - if (!(await bridge.files().exists(readmePath))) { - return Promise.resolve(undefined); - } - return bridge.files().read(readmePath); - } - public getRunData(path: string): Promise { - return plugins.getPluginRunData(path); - } - public select(path: string | undefined) { - this.selected = !path - ? undefined - : [...this.plugins.installed, ...this.plugins.available, ...this.plugins.invalid].find( - (pl) => pl.entity.dir_path === path, - ); - this.subjects.get().selected.emit(path); - } - public addPlugin(pluginPath: string): Promise { - if (this.isBusy()) { - return Promise.reject( - new Error( - `Cannot add plugin, because previous plugin operation is still in progress.`, - ), - ); - } - this.state.adding = true; - this.subjects.get().add.emit(this.state.adding); - return plugins.addPlugin(pluginPath).finally(() => { - this.state.adding = false; - this.subjects.get().add.emit(this.state.adding); - }); - } - public async removePlugin(pluginPath: string): Promise { - if (this.isBusy()) { - return Promise.reject( - new Error( - `Cannot add plugin, because previous plugin operation is still in progress.`, - ), - ); - } - this.state.removing = true; - this.subjects.get().remove.emit(this.state.removing); - try { - await plugins.removePlugin(pluginPath); - await this.load(true); - const selected = this.selected; - if (selected !== undefined) { - if ( - [ - ...this.plugins.installed, - ...this.plugins.available, - ...this.plugins.invalid, - ].find((pl) => pl.entity.dir_path === selected.getPath()) !== undefined - ) { - this.selected = undefined; - } - } - this.state.removing = false; - this.subjects.get().remove.emit(this.state.removing); - this.subjects.get().state.emit(); - return Promise.resolve(); - } catch (err) { - this.state.removing = false; - this.subjects.get().remove.emit(this.state.removing); - return Promise.reject(new Error(error(err))); - } - } - public isBusy(): boolean { - return this.state.adding || this.state.loading || this.state.removing; - } -} diff --git a/application/client/src/app/ui/tabs/plugins/styles.less b/application/client/src/app/ui/tabs/plugins/styles.less deleted file mode 100644 index ac7a4f0a97..0000000000 --- a/application/client/src/app/ui/tabs/plugins/styles.less +++ /dev/null @@ -1,88 +0,0 @@ -@import '../../styles/variables.less'; - -:host { - position: absolute; - display: block; - top: 0; - left: 0; - width: 100%; - height: 100%; - overflow: hidden; - & mat-card { - margin: 12px 6px 12px 12px; - & mat-card-title { - color: var(--scheme-color-1); - font-size: 16px; - } - & mat-card-subtitle { - color: var(--scheme-color-3); - font-size: 12px; - } - &.no-left-margin { - margin-left: 6px; - } - } - & div.left { - position: absolute; - display: flex; - flex-direction: column; - top: 0; - bottom: 0; - left: 0; - right: 330px; - overflow: hidden; - justify-content: stretch; - justify-items: stretch; - & div.filter { - position: absolute; - z-index: 1000; - padding: 6px 12px; - background: var(--scheme-color-warning-light); - top: 6px; - right: 6px; - box-shadow: 3px 3px 3px rgb(0 0 0 / 40%); - border-radius: 3px; - } - & .fill { - overflow: auto; - } - } - & div.right { - position: absolute; - width: 320px; - right: 6px; - bottom: 0; - top: 0; - overflow-y: auto; - overflow-x: hidden; - display: flex; - flex-direction: column; - & div.spacer { - flex: auto 100; - } - } - & pre { - padding-left: 5px; - } - & h1 { - color: white; - font-size: 20px; - font-weight: 700; - padding-left: 5px; - } - & button { - min-width: 150px; - } - & div.controlls { - position: relative; - width: 100%; - overflow: hidden; - text-align: right; - white-space: nowrap; - height: auto; - & button { - margin-left: 8px; - min-width: auto; - } - } -} diff --git a/application/client/src/app/ui/tabs/plugins/template.html b/application/client/src/app/ui/tabs/plugins/template.html deleted file mode 100644 index 98200a5be4..0000000000 --- a/application/client/src/app/ui/tabs/plugins/template.html +++ /dev/null @@ -1,47 +0,0 @@ -
-
-
- - - -
-
- - - - -
- - -
-
-
-
-
-
diff --git a/application/client/src/app/ui/tabs/settings/component.ts b/application/client/src/app/ui/tabs/settings/component.ts deleted file mode 100644 index 4d56aa9cc5..0000000000 --- a/application/client/src/app/ui/tabs/settings/component.ts +++ /dev/null @@ -1,34 +0,0 @@ -import { Component, ChangeDetectorRef, AfterContentInit } from '@angular/core'; -import { Ilc, IlcInterface } from '@env/decorators/component'; -import { Initial } from '@env/decorators/initial'; -import { ChangesDetector } from '@ui/env/extentions/changes'; -import { State } from './state'; - -@Component({ - selector: 'app-tabs-settings', - templateUrl: './template.html', - styleUrls: ['./styles.less'], - standalone: false, -}) -@Initial() -@Ilc() -export class Settings extends ChangesDetector implements AfterContentInit { - public readonly state: State = new State(); - - constructor(cdRef: ChangeDetectorRef) { - super(cdRef); - } - - public ngAfterContentInit(): void { - this.ilc() - .services.system.settings.get() - .then((entries) => { - this.state.build(entries); - this.detectChanges(); - }) - .catch((err: Error) => { - this.log().error(`Fail to get settings list: ${err}`); - }); - } -} -export interface Settings extends IlcInterface {} diff --git a/application/client/src/app/ui/tabs/settings/entry/component.ts b/application/client/src/app/ui/tabs/settings/entry/component.ts deleted file mode 100644 index 48f7c07a9c..0000000000 --- a/application/client/src/app/ui/tabs/settings/entry/component.ts +++ /dev/null @@ -1,35 +0,0 @@ -import { Component, ChangeDetectorRef, Input } from '@angular/core'; -import { Ilc, IlcInterface } from '@env/decorators/component'; -import { Initial } from '@env/decorators/initial'; -import { ChangesDetector } from '@ui/env/extentions/changes'; -import { ISettingsEntry } from '@platform/types/settings/entry'; -import { Render } from '@platform/types/settings/entry.description'; - -@Component({ - selector: 'app-tabs-settings-entry', - templateUrl: './template.html', - styleUrls: ['./styles.less'], - standalone: false, -}) -@Initial() -@Ilc() -export class SettingsEntry extends ChangesDetector { - public readonly Render = Render; - - @Input() public entry!: ISettingsEntry; - - constructor(cdRef: ChangeDetectorRef) { - super(cdRef); - } - - public save(entry: ISettingsEntry) { - this.ilc() - .services.system.settings.set(entry.desc.path, entry.desc.key, entry.value) - .catch((err: Error) => { - this.log().error( - `Fail to save ${entry.desc.path}::${entry.desc.key}; error: ${err.message}`, - ); - }); - } -} -export interface SettingsEntry extends IlcInterface {} diff --git a/application/client/src/app/ui/tabs/settings/entry/styles.less b/application/client/src/app/ui/tabs/settings/entry/styles.less deleted file mode 100644 index f90559a55d..0000000000 --- a/application/client/src/app/ui/tabs/settings/entry/styles.less +++ /dev/null @@ -1,7 +0,0 @@ -@import '../../../styles/variables.less'; - - -:host { - position: relative; - display: block; -} \ No newline at end of file diff --git a/application/client/src/app/ui/tabs/settings/entry/template.html b/application/client/src/app/ui/tabs/settings/entry/template.html deleted file mode 100644 index 603f13e2e4..0000000000 --- a/application/client/src/app/ui/tabs/settings/entry/template.html +++ /dev/null @@ -1,15 +0,0 @@ - - - diff --git a/application/client/src/app/ui/tabs/settings/module.ts b/application/client/src/app/ui/tabs/settings/module.ts deleted file mode 100644 index eb3c43ee14..0000000000 --- a/application/client/src/app/ui/tabs/settings/module.ts +++ /dev/null @@ -1,48 +0,0 @@ -import { NgModule } from '@angular/core'; -import { CommonModule } from '@angular/common'; -import { FormsModule, ReactiveFormsModule } from '@angular/forms'; -import { MatCardModule } from '@angular/material/card'; -import { MatDividerModule } from '@angular/material/divider'; -import { MatFormFieldModule } from '@angular/material/form-field'; -import { MatInputModule } from '@angular/material/input'; -import { MatCheckboxModule } from '@angular/material/checkbox'; -import { MatButtonModule } from '@angular/material/button'; - -import { Settings } from './component'; -import { SettingsNode } from './node/component'; -import { SettingsEntry } from './entry/component'; -import { SettingsEntryString } from './renders/string/component'; -import { SettingsEntryBool } from './renders/bool/component'; -import { SettingsEntryColor } from './renders/color/component'; - -@NgModule({ - imports: [ - CommonModule, - FormsModule, - ReactiveFormsModule, - MatCheckboxModule, - MatCardModule, - MatDividerModule, - MatFormFieldModule, - MatInputModule, - MatButtonModule, - ], - declarations: [ - Settings, - SettingsNode, - SettingsEntry, - SettingsEntryString, - SettingsEntryBool, - SettingsEntryColor, - ], - exports: [Settings], - bootstrap: [ - Settings, - SettingsNode, - SettingsEntry, - SettingsEntryString, - SettingsEntryBool, - SettingsEntryColor, - ], -}) -export class SettingsModule {} diff --git a/application/client/src/app/ui/tabs/settings/node.ts b/application/client/src/app/ui/tabs/settings/node.ts deleted file mode 100644 index e343a34a8a..0000000000 --- a/application/client/src/app/ui/tabs/settings/node.ts +++ /dev/null @@ -1,53 +0,0 @@ -import { ISettingsEntry } from '@platform/types/settings/entry'; - -export class Node { - public readonly entries: ISettingsEntry[] = []; - public readonly childs: Node[] = []; - public readonly path: string; - - constructor(path: string) { - this.path = path; - } - - public attach(entry: ISettingsEntry): boolean { - if (this.path === entry.desc.path) { - this.entries.push(entry); - return true; - } - for (const child of this.childs) { - if (child.attach(entry)) { - return true; - } - } - return false; - } - - public adopt(path: string): boolean { - if (this.path === path) { - return true; - } - const parts = path.split('.'); - if (parts.length === 0) { - return false; - } - const childPath = `${this.path}${this.path === '' ? '' : '.'}${parts[0]}`; - let child = this.child(childPath); - if (child === undefined) { - child = new Node(childPath); - this.childs.push(child); - } - parts.splice(0, 1); - if (parts.length === 0) { - return true; - } - return child.adopt(parts.join('.')); - } - - public child(path: string): Node | undefined { - return this.childs.find((c) => c.path === path); - } - - public isRoot(): boolean { - return this.path === ''; - } -} diff --git a/application/client/src/app/ui/tabs/settings/node/component.ts b/application/client/src/app/ui/tabs/settings/node/component.ts deleted file mode 100644 index 974010a3c1..0000000000 --- a/application/client/src/app/ui/tabs/settings/node/component.ts +++ /dev/null @@ -1,22 +0,0 @@ -import { Component, ChangeDetectorRef, Input } from '@angular/core'; -import { Ilc, IlcInterface } from '@env/decorators/component'; -import { Initial } from '@env/decorators/initial'; -import { ChangesDetector } from '@ui/env/extentions/changes'; -import { Node } from '../node'; - -@Component({ - selector: 'app-tabs-settings-node', - templateUrl: './template.html', - styleUrls: ['./styles.less'], - standalone: false, -}) -@Initial() -@Ilc() -export class SettingsNode extends ChangesDetector { - @Input() public node!: Node; - - constructor(cdRef: ChangeDetectorRef) { - super(cdRef); - } -} -export interface SettingsNode extends IlcInterface {} diff --git a/application/client/src/app/ui/tabs/settings/node/styles.less b/application/client/src/app/ui/tabs/settings/node/styles.less deleted file mode 100644 index 7fca853cf3..0000000000 --- a/application/client/src/app/ui/tabs/settings/node/styles.less +++ /dev/null @@ -1,36 +0,0 @@ -@import '../../../styles/variables.less'; - - -:host { - position: relative; - display: block; - & app-tabs-settings-entry { - margin: 6px 0; - } - & app-tabs-settings-node { - margin: 6px 0; - } - & p.node { - text-align: right; - position: relative; - &::before { - position: absolute; - content: ''; - display: block; - height: 1px; - width: 100%; - border-top: dashed thin var(--scheme-color-active); - left: 0; - top: 11px; - z-index: 0; - } - & span { - position: relative; - display: inline-block; - background: var(--scheme-color-active); - border-radius: 3px; - padding: 1px 12px 3px 12px; - z-index: 1; - } - } -} \ No newline at end of file diff --git a/application/client/src/app/ui/tabs/settings/node/template.html b/application/client/src/app/ui/tabs/settings/node/template.html deleted file mode 100644 index ab0e2accb3..0000000000 --- a/application/client/src/app/ui/tabs/settings/node/template.html +++ /dev/null @@ -1,3 +0,0 @@ -

::{{node.path}}

- - \ No newline at end of file diff --git a/application/client/src/app/ui/tabs/settings/renders/bool/component.ts b/application/client/src/app/ui/tabs/settings/renders/bool/component.ts deleted file mode 100644 index 16f36ad4bc..0000000000 --- a/application/client/src/app/ui/tabs/settings/renders/bool/component.ts +++ /dev/null @@ -1,37 +0,0 @@ -import { Component, ChangeDetectorRef, Input, AfterContentInit, OnDestroy } from '@angular/core'; -import { Ilc, IlcInterface } from '@env/decorators/component'; -import { Initial } from '@env/decorators/initial'; -import { ChangesDetector } from '@ui/env/extentions/changes'; -import { ISettingsEntry } from '@platform/types/settings/entry'; - -@Component({ - selector: 'app-tabs-settings-entry-bool', - templateUrl: './template.html', - styleUrls: ['./styles.less'], - standalone: false, -}) -@Initial() -@Ilc() -export class SettingsEntryBool extends ChangesDetector implements AfterContentInit, OnDestroy { - @Input() public entry!: ISettingsEntry; - @Input() public save!: (entry: ISettingsEntry) => void; - - public value: boolean | undefined; - - constructor(cdRef: ChangeDetectorRef) { - super(cdRef); - } - - public ngOnDestroy(): void { - if (this.value === this.entry.value) { - return; - } - this.entry.value = this.value; - this.save(this.entry); - } - - public ngAfterContentInit(): void { - this.value = this.entry.value === undefined ? false : (this.entry.value as boolean); - } -} -export interface SettingsEntryBool extends IlcInterface {} diff --git a/application/client/src/app/ui/tabs/settings/renders/bool/styles.less b/application/client/src/app/ui/tabs/settings/renders/bool/styles.less deleted file mode 100644 index 92cb1b7023..0000000000 --- a/application/client/src/app/ui/tabs/settings/renders/bool/styles.less +++ /dev/null @@ -1,6 +0,0 @@ -@import '../../../../styles/variables.less'; - - -:host { - -} \ No newline at end of file diff --git a/application/client/src/app/ui/tabs/settings/renders/bool/template.html b/application/client/src/app/ui/tabs/settings/renders/bool/template.html deleted file mode 100644 index 80ec2c262a..0000000000 --- a/application/client/src/app/ui/tabs/settings/renders/bool/template.html +++ /dev/null @@ -1,2 +0,0 @@ -{{entry.desc.name}} -

{{entry.desc.desc}}

diff --git a/application/client/src/app/ui/tabs/settings/renders/color/component.ts b/application/client/src/app/ui/tabs/settings/renders/color/component.ts deleted file mode 100644 index c679416c34..0000000000 --- a/application/client/src/app/ui/tabs/settings/renders/color/component.ts +++ /dev/null @@ -1,75 +0,0 @@ -import { Component, ChangeDetectorRef, Input, AfterContentInit } from '@angular/core'; -import { Ilc, IlcInterface } from '@env/decorators/component'; -import { Initial } from '@env/decorators/initial'; -import { ChangesDetector } from '@ui/env/extentions/changes'; -import { ISettingsEntry } from '@platform/types/settings/entry'; -import { popup, Vertical, Horizontal } from '@ui/service/popup'; -import { components } from '@env/decorators/initial'; -import { getContrastColor } from '@styles/colors'; - -@Component({ - selector: 'app-tabs-settings-entry-color', - templateUrl: './template.html', - styleUrls: ['./styles.less'], - standalone: false, -}) -@Initial() -@Ilc() -export class SettingsEntryColor extends ChangesDetector implements AfterContentInit { - @Input() public entry!: ISettingsEntry; - @Input() public save!: (entry: ISettingsEntry) => void; - - public color: string | undefined; - - constructor(cdRef: ChangeDetectorRef) { - super(cdRef); - } - - public ngAfterContentInit(): void { - this.color = - this.entry.value !== undefined - ? (this.entry.value as string) - : (this.ilc().services.system.settings.getDefaultByDesc(this.entry.desc) as - | string - | undefined); - } - - public styles(): { [key: string]: string | undefined } { - return { - background: this.color as string, - color: this.color !== undefined ? getContrastColor(this.color, true) : undefined, - }; - } - - public change(): void { - const dialog = popup.open({ - component: { - factory: components.get('app-dialogs-color-selector'), - inputs: { - done: (color: string | undefined) => { - this.color = color; - this.entry.value = color; - this.save(this.entry); - dialog.close(); - this.detectChanges(); - }, - color: this.entry.value, - }, - }, - position: { - vertical: Vertical.center, - horizontal: Horizontal.center, - }, - closeOnKey: '*', - uuid: 'Color Selection', - }); - } - - public drop() { - this.entry.value = undefined; - this.save(this.entry); - this.ngAfterContentInit(); - this.detectChanges(); - } -} -export interface SettingsEntryColor extends IlcInterface {} diff --git a/application/client/src/app/ui/tabs/settings/renders/color/styles.less b/application/client/src/app/ui/tabs/settings/renders/color/styles.less deleted file mode 100644 index 60f411c0fa..0000000000 --- a/application/client/src/app/ui/tabs/settings/renders/color/styles.less +++ /dev/null @@ -1,16 +0,0 @@ -@import '../../../../styles/variables.less'; - - -:host { - & p.example { - margin: 8px 0; - } - & div.buttons { - width: 100%; - text-align: right; - white-space: nowrap; - & button { - margin-left: 16px; - } - } -} \ No newline at end of file diff --git a/application/client/src/app/ui/tabs/settings/renders/color/template.html b/application/client/src/app/ui/tabs/settings/renders/color/template.html deleted file mode 100644 index 2a43b81dfe..0000000000 --- a/application/client/src/app/ui/tabs/settings/renders/color/template.html +++ /dev/null @@ -1,9 +0,0 @@ -

{{entry.desc.name}}

-

{{entry.desc.desc}}

-

- This is example of color view -

-
- - -
diff --git a/application/client/src/app/ui/tabs/settings/renders/string/component.ts b/application/client/src/app/ui/tabs/settings/renders/string/component.ts deleted file mode 100644 index 1052ce5b41..0000000000 --- a/application/client/src/app/ui/tabs/settings/renders/string/component.ts +++ /dev/null @@ -1,43 +0,0 @@ -import { Component, ChangeDetectorRef, Input, AfterContentInit, OnDestroy } from '@angular/core'; -import { Ilc, IlcInterface } from '@env/decorators/component'; -import { Initial } from '@env/decorators/initial'; -import { ChangesDetector } from '@ui/env/extentions/changes'; -import { ISettingsEntry } from '@platform/types/settings/entry'; -import { ErrorState } from './error'; -import { Validator } from '../validator'; - -@Component({ - selector: 'app-tabs-settings-entry-string', - templateUrl: './template.html', - styleUrls: ['./styles.less'], - standalone: false, -}) -@Initial() -@Ilc() -export class SettingsEntryString extends ChangesDetector implements AfterContentInit, OnDestroy { - @Input() public entry!: ISettingsEntry; - @Input() public save!: (entry: ISettingsEntry) => void; - - public value: string | undefined; - public error!: ErrorState; - - constructor(cdRef: ChangeDetectorRef) { - super(cdRef); - } - - public ngOnDestroy(): void { - if (this.value === this.entry.value) { - return; - } - this.entry.value = this.value; - this.save(this.entry); - } - - public ngAfterContentInit(): void { - this.value = this.entry.value as string; - this.error = new ErrorState(this.entry, new Validator(), () => { - this.detectChanges(); - }); - } -} -export interface SettingsEntryString extends IlcInterface {} diff --git a/application/client/src/app/ui/tabs/settings/renders/string/error.ts b/application/client/src/app/ui/tabs/settings/renders/string/error.ts deleted file mode 100644 index 19f8f5554a..0000000000 --- a/application/client/src/app/ui/tabs/settings/renders/string/error.ts +++ /dev/null @@ -1,64 +0,0 @@ -import { ErrorStateMatcher } from '@angular/material/core'; -import { UntypedFormControl } from '@angular/forms'; -import { ISettingsEntry } from '@platform/types/settings/entry'; -import { Validator } from '../validator'; - -export enum Codes { - NO_ERRORS = 'NO_ERRORS', - REQUIRED = 'REQUIRED', - INVALID = 'INVALID', -} - -export class ErrorState implements ErrorStateMatcher { - protected readonly entry: ISettingsEntry; - protected readonly validator: Validator; - protected readonly update: () => void; - protected checked: string | undefined; - - public error: string | undefined; - - constructor(entry: ISettingsEntry, validator: Validator, update: () => void) { - this.entry = entry; - this.validator = validator; - this.update = update; - } - - public isErrorState( - control: UntypedFormControl | null, - //form: FormGroupDirective | NgForm | null, - ): boolean { - if (control === null) { - return false; - } - if (this.checked === control.value) { - return this.error !== undefined; - } - this.checked = control.value; - if (this.isFieldRequired(control.value)) { - this.error = `Required`; - } else { - this.validator - .validate(this.entry.desc.path, this.entry.desc.key, control.value) - .then((error: string | undefined) => { - this.error = error; - }) - .catch((err: Error) => { - this.error = err.message; - }) - .finally(() => { - this.update(); - }); - } - return this.error !== undefined; - } - - public isFieldRequired(value: string): boolean { - if (typeof value !== 'string') { - return !this.entry.desc.allowEmpty; - } - if (this.entry.desc.allowEmpty) { - return false; - } - return value.trim() === ''; - } -} diff --git a/application/client/src/app/ui/tabs/settings/renders/string/styles.less b/application/client/src/app/ui/tabs/settings/renders/string/styles.less deleted file mode 100644 index 493c4db123..0000000000 --- a/application/client/src/app/ui/tabs/settings/renders/string/styles.less +++ /dev/null @@ -1,8 +0,0 @@ -@import '../../../../styles/variables.less'; - - -:host { - & mat-form-field { - display: block; - } -} \ No newline at end of file diff --git a/application/client/src/app/ui/tabs/settings/renders/string/template.html b/application/client/src/app/ui/tabs/settings/renders/string/template.html deleted file mode 100644 index 346c2f156e..0000000000 --- a/application/client/src/app/ui/tabs/settings/renders/string/template.html +++ /dev/null @@ -1,8 +0,0 @@ - - {{entry.desc.name}} - - {{entry.desc.desc}} - {{error.error}} - \ No newline at end of file diff --git a/application/client/src/app/ui/tabs/settings/renders/validator.ts b/application/client/src/app/ui/tabs/settings/renders/validator.ts deleted file mode 100644 index 3bc35681ba..0000000000 --- a/application/client/src/app/ui/tabs/settings/renders/validator.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { settings } from '@service/settings'; - -export class Validator { - public validate(path: string, key: string, value: T): Promise { - return settings.validate(path, key, value); - } -} diff --git a/application/client/src/app/ui/tabs/settings/state.ts b/application/client/src/app/ui/tabs/settings/state.ts deleted file mode 100644 index 760897e974..0000000000 --- a/application/client/src/app/ui/tabs/settings/state.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { Node } from './node'; -import { ISettingsEntry } from '@platform/types/settings/entry'; - -export class State { - public readonly root: Node = new Node(''); - - public build(entries: ISettingsEntry[]): void { - entries.forEach((entry) => { - if (!this.root.adopt(entry.desc.path)) { - console.error(`Fail to create node`); - return; - } - if (!this.root.attach(entry)) { - console.log(`Fail to add entry`); - } - }); - } - -} diff --git a/application/client/src/app/ui/tabs/settings/styles.less b/application/client/src/app/ui/tabs/settings/styles.less deleted file mode 100644 index cb586b223d..0000000000 --- a/application/client/src/app/ui/tabs/settings/styles.less +++ /dev/null @@ -1,70 +0,0 @@ -@import '../../styles/variables.less'; - - -:host { - position: absolute; - display: block; - top: 0; - left: 0; - width: 100%; - height: 100%; - overflow: hidden; - & mat-card { - margin: 12px 6px 12px 12px; - & mat-card-title { - color: var(--scheme-color-1); - font-size: 16px; - } - & mat-card-subtitle { - color: var(--scheme-color-3); - font-size: 12px; - } - &.no-left-margin { - margin-left: 6px; - } - } - & h1 { - font-size: 14px; - } - & div.left { - position: absolute; - display: flex; - flex-direction: column; - top: 0; - bottom: 0; - left: 0; - right: 330px; - overflow: hidden; - justify-content: stretch; - justify-items: stretch; - & div.filter { - position: absolute; - z-index: 1000; - padding: 6px 12px; - background: var(--scheme-color-warning-light); - top: 6px; - right: 6px; - box-shadow: 3px 3px 3px rgb(0 0 0 / 40%); - border-radius: 3px; - } - & .fill { - overflow: auto; - } - } - & div.right { - position: absolute; - width: 320px; - right: 6px; - bottom: 0; - top: 0; - overflow-y: auto; - overflow-x: hidden; - display: flex; - flex-direction: column; - & div.spacer{ - flex: auto 100; - } - } - - -} \ No newline at end of file diff --git a/application/client/src/app/ui/tabs/settings/template.html b/application/client/src/app/ui/tabs/settings/template.html deleted file mode 100644 index 81a0f024bb..0000000000 --- a/application/client/src/app/ui/tabs/settings/template.html +++ /dev/null @@ -1,20 +0,0 @@ -
-
-
- - Settings - - - - -
-
- - Settings - -

List of chipmunk settings

-
-
-
-
-
\ No newline at end of file diff --git a/application/client/src/app/ui/views/dialogs/about/component.ts b/application/client/src/app/ui/views/dialogs/about/component.ts deleted file mode 100644 index 31930aa3b9..0000000000 --- a/application/client/src/app/ui/views/dialogs/about/component.ts +++ /dev/null @@ -1,46 +0,0 @@ -import { Component, ChangeDetectorRef, AfterViewInit, Input } from '@angular/core'; -import { Ilc, IlcInterface } from '@env/decorators/component'; -import { ChangesDetector } from '@ui/env/extentions/changes'; -import { Initial } from '@env/decorators/initial'; - -@Component({ - selector: 'app-dialogs-about', - templateUrl: './template.html', - styleUrls: ['./styles.less'], - standalone: false, -}) -@Initial() -@Ilc() -export class About extends ChangesDetector implements AfterViewInit { - @Input() public version: string = ''; - @Input() public alphaRelease: { version: string; url: string } | undefined; - - constructor(cdRef: ChangeDetectorRef) { - super(cdRef); - } - - ngAfterViewInit(): void { - Promise.all([ - this.ilc().services.system.bridge.app().version(), - this.ilc().services.system.bridge.app().alphaRelease(), - ]) - .then(([version, alphaRelease]) => { - this.version = version; - this.alphaRelease = alphaRelease; - this.detectChanges(); - }) - .catch((err: Error) => { - this.log().error(`Fail to get about dialog data: ${err.message}`); - }); - } - - public open(url: string): void { - this.ilc() - .services.system.bridge.browser() - .url(url) - .catch((err: Error) => { - this.log().error(`Fail to open URL "${url}": ${err.message}`); - }); - } -} -export interface About extends IlcInterface {} diff --git a/application/client/src/app/ui/views/dialogs/about/module.ts b/application/client/src/app/ui/views/dialogs/about/module.ts deleted file mode 100644 index 0776f718af..0000000000 --- a/application/client/src/app/ui/views/dialogs/about/module.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { NgModule } from '@angular/core'; -import { CommonModule } from '@angular/common'; -import { MatButtonModule } from '@angular/material/button'; -import { About } from './component'; - -@NgModule({ - imports: [CommonModule, MatButtonModule], - declarations: [About], - exports: [About], - bootstrap: [About] -}) -export class AboutModule {} diff --git a/application/client/src/app/ui/views/dialogs/about/styles.less b/application/client/src/app/ui/views/dialogs/about/styles.less deleted file mode 100644 index 3ce309a50b..0000000000 --- a/application/client/src/app/ui/views/dialogs/about/styles.less +++ /dev/null @@ -1,68 +0,0 @@ -@import '../../../styles/variables.less'; - -:host { - position: relative; - display: block; - padding: 0; - margin: 0; - width: 350px; - height: 200px; - & img { - position: absolute; - display: block; - width: 100%; - height: 100%; - top: 0; - left: 0; - z-index: 0; - animation: appearing 3s linear forwards; - } - @keyframes appearing { - 0% { - opacity: 0; - } - 100% { - opacity: 0.5; - } - } - & div.content { - position: absolute; - display: block; - width: 100%; - height: 100%; - top: 0; - left: 0; - margin: 0; - z-index: 1; - & p { - text-align: center; - } - & p.name { - margin-top: 56px; - } - & p.alpha { - margin-top: 8px; - } - & button.alpha-link { - padding: 0; - border: none; - background: transparent; - text-decoration: underline; - cursor: pointer; - } - & div.controlls { - margin-top: 20px; - text-align: center; - & button { - color: var(--scheme-color-1); - margin-right: 12px; - &:last-child { - margin-right: 0px; - } - } - &:last-child { - margin-right: 0px; - } - } - } -} \ No newline at end of file diff --git a/application/client/src/app/ui/views/dialogs/about/template.html b/application/client/src/app/ui/views/dialogs/about/template.html deleted file mode 100644 index 35aad7f7da..0000000000 --- a/application/client/src/app/ui/views/dialogs/about/template.html +++ /dev/null @@ -1,14 +0,0 @@ - -
-

CHIPMUNK

-

version: {{version}}

-

- Chipmunk 4 alpha: - -

-
- - - -
-
diff --git a/application/client/src/app/ui/views/dialogs/colors/component.ts b/application/client/src/app/ui/views/dialogs/colors/component.ts deleted file mode 100644 index bacccaa56f..0000000000 --- a/application/client/src/app/ui/views/dialogs/colors/component.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { Component, ChangeDetectorRef, Input } from '@angular/core'; -import { Ilc, IlcInterface } from '@env/decorators/component'; -import { ChangesDetector } from '@ui/env/extentions/changes'; -import { Initial } from '@env/decorators/initial'; -import { CColors } from '@styles/colors'; - -@Component({ - selector: 'app-dialogs-color-selector', - templateUrl: './template.html', - styleUrls: ['./styles.less'], - standalone: false, -}) -@Initial() -@Ilc() -export class ColorSelector extends ChangesDetector { - @Input() public done!: (color: string | undefined) => void; - @Input() public color!: string | undefined; - - public colors: string[] = CColors.slice(); - - constructor(cdRef: ChangeDetectorRef) { - super(cdRef); - } -} -export interface ColorSelector extends IlcInterface {} diff --git a/application/client/src/app/ui/views/dialogs/colors/module.ts b/application/client/src/app/ui/views/dialogs/colors/module.ts deleted file mode 100644 index 1d1110a704..0000000000 --- a/application/client/src/app/ui/views/dialogs/colors/module.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { NgModule } from '@angular/core'; -import { CommonModule } from '@angular/common'; -import { ColorSelector } from './component'; -import { MatButtonModule } from '@angular/material/button'; -import { ColorSelectorModule as Selector } from '@elements/color.selector/module'; - -@NgModule({ - imports: [CommonModule, MatButtonModule, Selector], - declarations: [ColorSelector], - exports: [ColorSelector], - bootstrap: [ColorSelector], -}) -export class ColorSelectorModule {} diff --git a/application/client/src/app/ui/views/dialogs/colors/styles.less b/application/client/src/app/ui/views/dialogs/colors/styles.less deleted file mode 100644 index 0d64d30364..0000000000 --- a/application/client/src/app/ui/views/dialogs/colors/styles.less +++ /dev/null @@ -1,9 +0,0 @@ -@import '../../../styles/variables.less'; - -:host { - position: relative; - display: block; - padding: 16px; - margin: 0; - width: 200px; -} \ No newline at end of file diff --git a/application/client/src/app/ui/views/dialogs/colors/template.html b/application/client/src/app/ui/views/dialogs/colors/template.html deleted file mode 100644 index bb76848898..0000000000 --- a/application/client/src/app/ui/views/dialogs/colors/template.html +++ /dev/null @@ -1,5 +0,0 @@ - diff --git a/application/client/src/app/ui/views/dialogs/columnsselector/component.ts b/application/client/src/app/ui/views/dialogs/columnsselector/component.ts deleted file mode 100644 index 38c1a32c25..0000000000 --- a/application/client/src/app/ui/views/dialogs/columnsselector/component.ts +++ /dev/null @@ -1,73 +0,0 @@ -import { Component, ChangeDetectorRef, Input, AfterContentInit } from '@angular/core'; -import { Ilc, IlcInterface } from '@env/decorators/component'; -import { ChangesDetector } from '@ui/env/extentions/changes'; -import { Initial } from '@env/decorators/initial'; -import { Session } from '@service/session/session'; -import { Columns, Header } from '@schema/render/columns'; -import { getContrastColor } from '@ui/styles/colors'; - -@Component({ - selector: 'app-dialogs-columns-selector', - templateUrl: './template.html', - styleUrls: ['./styles.less'], - standalone: false, -}) -@Initial() -@Ilc() -export class ColumnsSelector extends ChangesDetector implements AfterContentInit { - @Input() public session!: Session; - @Input() public accept!: (columns: number[], delimiter: string | undefined) => void; - @Input() public close!: () => void; - - public headers: Header[] = []; - public selected: { [key: number]: boolean } = {}; - public delimiter: string = ';'; - - constructor(cdRef: ChangeDetectorRef) { - super(cdRef); - } - - public ngAfterContentInit(): void { - const bound = this.session.render.getBoundEntity(); - if (!(bound instanceof Columns)) { - this.headers = []; - return; - } - const controller = bound as unknown as Columns; - this.headers = controller.get().all(); - this.headers.forEach((h) => { - this.selected[h.index] = h.visible; - }); - } - - public export() { - const indexes: number[] = []; - Object.keys(this.selected).forEach((key: string) => { - if (this.selected[key as unknown as number] === true) { - indexes.push(parseInt(key, 10)); - } - }); - this.accept(indexes, this.delimiter); - this.close(); - } - - public getBgColor(header: Header) { - return { - background: header.color, - }; - } - public getFgColor(header: Header) { - return { - color: header.color === undefined ? undefined : getContrastColor(header.color, true), - }; - } - - public disabled(): boolean { - return ( - Object.keys(this.selected).find( - (k: string) => this.selected[k as unknown as number], - ) === undefined || this.delimiter === '' - ); - } -} -export interface ColumnsSelector extends IlcInterface {} diff --git a/application/client/src/app/ui/views/dialogs/columnsselector/module.ts b/application/client/src/app/ui/views/dialogs/columnsselector/module.ts deleted file mode 100644 index 77a3e169ce..0000000000 --- a/application/client/src/app/ui/views/dialogs/columnsselector/module.ts +++ /dev/null @@ -1,22 +0,0 @@ -import { NgModule } from '@angular/core'; -import { CommonModule } from '@angular/common'; -import { ColumnsSelector } from './component'; -import { MatButtonModule } from '@angular/material/button'; -import { MatCheckboxModule } from '@angular/material/checkbox'; -import { FormsModule, ReactiveFormsModule } from '@angular/forms'; -import { MatInputModule } from '@angular/material/input'; - -@NgModule({ - imports: [ - CommonModule, - MatButtonModule, - MatCheckboxModule, - FormsModule, - ReactiveFormsModule, - MatInputModule, - ], - declarations: [ColumnsSelector], - exports: [ColumnsSelector], - bootstrap: [ColumnsSelector], -}) -export class ColumnsSelectorModule {} diff --git a/application/client/src/app/ui/views/dialogs/columnsselector/styles.less b/application/client/src/app/ui/views/dialogs/columnsselector/styles.less deleted file mode 100644 index 56df1cf5e0..0000000000 --- a/application/client/src/app/ui/views/dialogs/columnsselector/styles.less +++ /dev/null @@ -1,53 +0,0 @@ -@import '../../../styles/variables.less'; - -:host { - position: relative; - display: block; - padding: 16px; - margin: 0; - width: 450px; - & div.options { - display: flex; - flex-direction: row; - & div.left { - flex: 1; - & div.header { - display: flex; - flex-direction: row; - align-items: center; - margin: 4px 0; - border: thin solid var(--scheme-color-4); - border-radius: 2px; - & .title { - display: flex; - flex-direction: column; - padding: 2px 6px; - & .label { - color: var(--scheme-color-0); - } - & .sublabel { - color: var(--scheme-color-2); - } - } - - } - - } - & div.right { - flex: 1; - padding: 4px 0px 0px 16px; - & p { - padding-bottom: 12px; - } - } - } - & .controlls { - display: flex; - flex-direction: row; - justify-content: end; - margin-top: 12px; - & button { - margin-left: 8px; - } - } -} \ No newline at end of file diff --git a/application/client/src/app/ui/views/dialogs/columnsselector/template.html b/application/client/src/app/ui/views/dialogs/columnsselector/template.html deleted file mode 100644 index 8e3a194579..0000000000 --- a/application/client/src/app/ui/views/dialogs/columnsselector/template.html +++ /dev/null @@ -1,31 +0,0 @@ -
-
-
- -
- {{header.caption}} - {{header.desc}} -
-
-
-
-

- Please select columns to be exported and define the delimiter, which will be used to - split columns. -

- - Delimiter - - -
-
-
- - -
diff --git a/application/client/src/app/ui/views/dialogs/comment/component.ts b/application/client/src/app/ui/views/dialogs/comment/component.ts deleted file mode 100644 index 6b1db7666f..0000000000 --- a/application/client/src/app/ui/views/dialogs/comment/component.ts +++ /dev/null @@ -1,104 +0,0 @@ -import { - Component, - ChangeDetectorRef, - Input, - AfterViewInit, - AfterContentInit, - ViewChild, -} from '@angular/core'; -import { MatInput } from '@angular/material/input'; -import { CommentDefinition } from '@platform/types/comment'; -import { FormControl } from '@angular/forms'; -import { ErrorStateMatcher } from '@angular/material/core'; -import { Ilc, IlcInterface } from '@env/decorators/component'; -import { ChangesDetector } from '@ui/env/extentions/changes'; -import { Initial } from '@env/decorators/initial'; - -export class InputErrorStateMatcher implements ErrorStateMatcher { - private _valid: boolean = true; - private _error: string = ''; - - constructor() {} - - public isErrorState(control: FormControl | null): boolean { - this._valid = true; - this._error = ''; - if (control !== null && (control.value === null || control.value.trim() === '')) { - this._valid = false; - this._error = `Value of comment cannot be empty`; - } - if (control !== null && control.value !== null && control.value.length > 1024) { - this._valid = false; - this._error = `Maximum length of comment is 1024 chars`; - } - return !this._valid; - } - - public isValid(): boolean { - return this._valid; - } - - public getError(): string | undefined { - return this._error; - } -} - -@Component({ - selector: 'app-dialogs-comment', - templateUrl: './template.html', - styleUrls: ['./styles.less'], - standalone: false, -}) -@Initial() -@Ilc() -export class Comment extends ChangesDetector implements AfterViewInit, AfterContentInit { - public ng_comment: string = ''; - public ng_input_error: InputErrorStateMatcher = new InputErrorStateMatcher(); - - @ViewChild(MatInput, { static: true }) ng_inputComRef!: MatInput; - - @Input() comment!: CommentDefinition; - - public ng_mode: 'edit' | 'create' = 'edit'; - - @Input() accept: (comment: string) => void = (_comment: string) => {}; - @Input() remove: () => void = () => {}; - @Input() cancel: () => void = () => {}; - - constructor(cdRef: ChangeDetectorRef) { - super(cdRef); - } - - ngAfterContentInit() { - this.ng_comment = this.comment.comment; - this.ng_mode = this.comment.comment === '' ? 'create' : 'edit'; - } - - ngAfterViewInit() { - setTimeout(() => { - this.ng_inputComRef.focus(); - }, 150); - } - - public ng_onKeyDown(event: KeyboardEvent) { - if (event.code === 'Enter') { - this.ng_onAccept(); - } - } - - public ng_onAccept() { - if (!this.ng_input_error.isValid()) { - return; - } - this.accept(this.ng_comment); - } - - public ng_onRemove() { - this.remove(); - } - - public ng_onCancel() { - this.cancel(); - } -} -export interface Comment extends IlcInterface {} diff --git a/application/client/src/app/ui/views/dialogs/comment/module.ts b/application/client/src/app/ui/views/dialogs/comment/module.ts deleted file mode 100644 index c248e81bf2..0000000000 --- a/application/client/src/app/ui/views/dialogs/comment/module.ts +++ /dev/null @@ -1,24 +0,0 @@ -import { NgModule } from '@angular/core'; -import { CommonModule } from '@angular/common'; -import { MatButtonModule } from '@angular/material/button'; -import { MatInputModule } from '@angular/material/input'; -import { MatFormFieldModule } from '@angular/material/form-field'; - -import { FormsModule, ReactiveFormsModule } from '@angular/forms'; - -import { Comment } from './component'; - -@NgModule({ - imports: [ - CommonModule, - FormsModule, - ReactiveFormsModule, - MatFormFieldModule, - MatButtonModule, - MatInputModule, - ], - declarations: [Comment], - exports: [Comment], - bootstrap: [Comment], -}) -export class CommentModule {} diff --git a/application/client/src/app/ui/views/dialogs/comment/styles.less b/application/client/src/app/ui/views/dialogs/comment/styles.less deleted file mode 100644 index 840d24250a..0000000000 --- a/application/client/src/app/ui/views/dialogs/comment/styles.less +++ /dev/null @@ -1,27 +0,0 @@ -@import '../../../styles/variables.less'; - -:host { - position: relative; - display: block; - padding: 0.5rem; - margin: 0; - & div.controlls { - text-align: right; - padding-top: 8px; - & button { - margin-left: 16px; - } - } - & div.inputs { - width: 100%; - & mat-form-field { - width: 100%; - } - } - & mat-error { - color: var(--scheme-color-warning); - } - & mat-hint { - color: var(--scheme-color-2); - } -} \ No newline at end of file diff --git a/application/client/src/app/ui/views/dialogs/comment/template.html b/application/client/src/app/ui/views/dialogs/comment/template.html deleted file mode 100644 index 8e76921433..0000000000 --- a/application/client/src/app/ui/views/dialogs/comment/template.html +++ /dev/null @@ -1,29 +0,0 @@ -
- - Leave a comment - - {{ng_input_error.getError()}} - - Don't disclose personal info - - {{message.value.length}} / 1024 - -
-
- - - -
diff --git a/application/client/src/app/ui/views/dialogs/hotkeys/component.ts b/application/client/src/app/ui/views/dialogs/hotkeys/component.ts deleted file mode 100644 index ffbe0c7836..0000000000 --- a/application/client/src/app/ui/views/dialogs/hotkeys/component.ts +++ /dev/null @@ -1,63 +0,0 @@ -import { Component, ChangeDetectorRef, AfterViewChecked, AfterViewInit } from '@angular/core'; -import { Ilc, IlcInterface } from '@env/decorators/component'; -import { KeysMap, KeyDescription } from '@platform/types/hotkeys/map'; -import { ChangesDetector } from '@ui/env/extentions/changes'; -import { Initial } from '@env/decorators/initial'; - -interface IKey { - shortkeys: string[]; - description: string; -} - -interface IGroup { - name: string; - keys: IKey[]; -} - -@Component({ - selector: 'app-dialogs-hotkeys', - templateUrl: './template.html', - styleUrls: ['./styles.less'], - standalone: false, -}) -@Initial() -@Ilc() -export class Hotkeys extends ChangesDetector implements AfterViewChecked, AfterViewInit { - public groups: IGroup[] = []; - constructor(cdRef: ChangeDetectorRef) { - super(cdRef); - const groups: any = {}; - KeysMap.forEach((desc: KeyDescription) => { - if (desc.hidden !== undefined && desc.hidden) { - return; - } - if (groups[desc.category] === undefined) { - groups[desc.category] = { - name: desc.category, - keys: [], - }; - } - groups[desc.category].keys.push({ - shortkeys: - desc.display.darwin === undefined - ? desc.display.others - : this.ilc().services.system.env.platform().darwin() - ? desc.display.darwin - : desc.display.others, - description: desc.description, - }); - }); - Object.keys(groups).forEach((key: string) => { - this.groups.push(groups[key]); - }); - } - - ngAfterViewChecked(): void { - this.detectChanges(); - } - - ngAfterViewInit(): void { - this.detectChanges(); - } -} -export interface Hotkeys extends IlcInterface {} diff --git a/application/client/src/app/ui/views/dialogs/hotkeys/module.ts b/application/client/src/app/ui/views/dialogs/hotkeys/module.ts deleted file mode 100644 index c5408d04d7..0000000000 --- a/application/client/src/app/ui/views/dialogs/hotkeys/module.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { NgModule } from '@angular/core'; -import { CommonModule } from '@angular/common'; - -import { Hotkeys } from './component'; - -@NgModule({ - imports: [CommonModule], - declarations: [Hotkeys], - exports: [Hotkeys], - bootstrap: [Hotkeys] -}) -export class HotkeysModule {} diff --git a/application/client/src/app/ui/views/dialogs/hotkeys/styles.less b/application/client/src/app/ui/views/dialogs/hotkeys/styles.less deleted file mode 100644 index 6aae24e6e1..0000000000 --- a/application/client/src/app/ui/views/dialogs/hotkeys/styles.less +++ /dev/null @@ -1,47 +0,0 @@ -@import '../../../styles/variables.less'; - -:host { - overflow-x: hidden; - overflow-y: auto; - position: relative; - display: block; - padding: 24px; - margin: 0; - & * { - color: var(--scheme-color-1); - } - div.group{ - vertical-align: top; - position: relative; - margin: 0.5rem 0; - border-bottom: 1px dashed var(--scheme-color-4); - & table { - & th { - padding: 3px 0; - } - & tr { - & td { - white-space: nowrap; - padding: 3px 0; - &:first-child{ - width: 100%; - } - &:last-child{ - text-align: right; - width: auto; - } - } - } - } - & span.shortkey { - padding: 1px 6px; - margin-right: 6px; - border-radius: 6px; - color: var(--scheme-color-0); - font-weight: 600; - border: 1px dotted var(--scheme-color-3); - background: var(--scheme-color-5); - box-shadow: 1px 1px 6px rgba(0, 0, 0, 0.4); - } - } -} \ No newline at end of file diff --git a/application/client/src/app/ui/views/dialogs/hotkeys/template.html b/application/client/src/app/ui/views/dialogs/hotkeys/template.html deleted file mode 100644 index 7c61ef6463..0000000000 --- a/application/client/src/app/ui/views/dialogs/hotkeys/template.html +++ /dev/null @@ -1,16 +0,0 @@ -
- - - - - - - - -

{{group.name}}

{{key.description}}

- - {{shortkey}} - or - -
-
\ No newline at end of file diff --git a/application/client/src/app/ui/views/dialogs/jumpto/component.ts b/application/client/src/app/ui/views/dialogs/jumpto/component.ts deleted file mode 100644 index a09b47c6d4..0000000000 --- a/application/client/src/app/ui/views/dialogs/jumpto/component.ts +++ /dev/null @@ -1,79 +0,0 @@ -import { - Component, - ChangeDetectorRef, - ViewChild, - ElementRef, - AfterContentInit, - AfterViewInit, - Input, -} from '@angular/core'; -import { Ilc, IlcInterface } from '@env/decorators/component'; -import { ChangesDetector } from '@ui/env/extentions/changes'; -import { Initial } from '@env/decorators/initial'; -import { Owner } from '@schema/content/row'; - -export type CloseHandler = () => void; - -@Component({ - selector: 'app-dialogs-jumpto', - templateUrl: './template.html', - styleUrls: ['./styles.less'], - standalone: false, -}) -@Initial() -@Ilc() -export class JumpTo extends ChangesDetector implements AfterViewInit, AfterContentInit { - @ViewChild('rowinput') ref!: ElementRef; - @Input() close!: CloseHandler; - public value: string = ''; - public key: string = 'ctrl'; - - constructor(cdRef: ChangeDetectorRef) { - super(cdRef); - } - - public ngAfterContentInit(): void { - this.key = this.ilc().services.system.env.platform().darwin() ? 'Cmd' : 'Ctrl'; - } - - public ngAfterViewInit(): void { - this.ref.nativeElement.focus(); - } - - public focus() { - this.ref.nativeElement.focus(); - } - - public change(value: string) { - const line = parseInt(value, 10); - if (!isFinite(line) || isNaN(line)) { - return; - } - const session = this.ilc().services.system.session.active().session(); - if (session === undefined) { - return; - } - if (session.stream.len() <= line) { - return; - } - session.cursor.select(line, Owner.Bookmark, undefined, undefined); - this.ref.nativeElement.focus(); - } - - public keydown(event: KeyboardEvent) { - const session = this.ilc().services.system.session.active().session(); - if (session === undefined) { - return; - } - if (event.key === 'Enter') { - if ( - event.ctrlKey || - (this.ilc().services.system.env.platform().darwin() && event.metaKey) - ) { - session.switch().toolbar.details(); - } - this.close(); - } - } -} -export interface JumpTo extends IlcInterface {} diff --git a/application/client/src/app/ui/views/dialogs/jumpto/module.ts b/application/client/src/app/ui/views/dialogs/jumpto/module.ts deleted file mode 100644 index 0ad56afc6e..0000000000 --- a/application/client/src/app/ui/views/dialogs/jumpto/module.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { NgModule } from '@angular/core'; -import { CommonModule } from '@angular/common'; -import { JumpTo } from './component'; -import { MatFormFieldModule } from '@angular/material/form-field'; -import { MatInputModule } from '@angular/material/input'; -import { FormsModule, ReactiveFormsModule } from '@angular/forms'; - -@NgModule({ - imports: [CommonModule, MatFormFieldModule, MatInputModule, FormsModule, ReactiveFormsModule], - declarations: [JumpTo], - exports: [JumpTo], - bootstrap: [JumpTo], -}) -export class JumpToModule {} diff --git a/application/client/src/app/ui/views/dialogs/jumpto/styles.less b/application/client/src/app/ui/views/dialogs/jumpto/styles.less deleted file mode 100644 index 9cfb3021c2..0000000000 --- a/application/client/src/app/ui/views/dialogs/jumpto/styles.less +++ /dev/null @@ -1,42 +0,0 @@ -@import '../../../styles/variables.less'; - -:host { - position: relative; - display: block; - padding: 0; - margin: 0; - width: 350px; - & div.input { - position: relative; - display: block; - width: 100%; - z-index: 1; - & input::-webkit-outer-spin-button, - & input::-webkit-inner-spin-button { - -webkit-appearance: none; - margin: 0; - } - & input[type=number] { - -moz-appearance: textfield; - } - } - & div.info { - position: relative; - display: block; - width: 100%; - padding: 6px 0; - & p { - color: var(--scheme-color-1); - } - & span.shortkey { - padding: 1px 6px; - margin-right: 6px; - border-radius: 6px; - color: var(--scheme-color-0); - font-weight: 600; - border: 1px dotted var(--scheme-color-3); - background: var(--scheme-color-5); - box-shadow: 1px 1px 6px rgba(0, 0, 0, 0.4); - } - } -} \ No newline at end of file diff --git a/application/client/src/app/ui/views/dialogs/jumpto/template.html b/application/client/src/app/ui/views/dialogs/jumpto/template.html deleted file mode 100644 index 5533a838ec..0000000000 --- a/application/client/src/app/ui/views/dialogs/jumpto/template.html +++ /dev/null @@ -1,22 +0,0 @@ -
- - - -
-
-

- Enter to close; - {{key}} + Enter to open Details; -

-
diff --git a/application/client/src/app/ui/views/dialogs/locker/component.ts b/application/client/src/app/ui/views/dialogs/locker/component.ts deleted file mode 100644 index a7c6f74314..0000000000 --- a/application/client/src/app/ui/views/dialogs/locker/component.ts +++ /dev/null @@ -1,43 +0,0 @@ -import { Component, ChangeDetectorRef, Input, AfterViewInit } from '@angular/core'; -import { Ilc, IlcInterface } from '@env/decorators/component'; -import { ChangesDetector } from '@ui/env/extentions/changes'; -import { Initial } from '@env/decorators/initial'; -import { Locker, Level } from '@ui/service/lockers'; -import { Popup } from '@ui/service/popup'; - -@Component({ - selector: 'app-dialogs-locker-message', - templateUrl: './template.html', - styleUrls: ['./styles.less'], - standalone: false, -}) -@Initial() -@Ilc() -export class LockerMessage extends ChangesDetector implements AfterViewInit { - @Input() public locker!: Locker; - @Input() public popup!: Popup; - @Input() public close!: () => void; - - protected keyboardUnlocker!: () => void; - - constructor(cdRef: ChangeDetectorRef) { - super(cdRef); - } - - public get Level(): typeof Level { - return Level; - } - - public ngAfterViewInit(): void { - this.env().subscriber.register( - this.locker.updated.subscribe(() => { - this.detectChanges(); - }), - ); - } - - ngClose() { - this.close(); - } -} -export interface LockerMessage extends IlcInterface {} diff --git a/application/client/src/app/ui/views/dialogs/locker/module.ts b/application/client/src/app/ui/views/dialogs/locker/module.ts deleted file mode 100644 index 1f2426382a..0000000000 --- a/application/client/src/app/ui/views/dialogs/locker/module.ts +++ /dev/null @@ -1,21 +0,0 @@ -import { NgModule } from '@angular/core'; -import { CommonModule } from '@angular/common'; -import { MatProgressSpinnerModule } from '@angular/material/progress-spinner'; -import { MatProgressBarModule } from '@angular/material/progress-bar'; -import { LockerMessage } from './component'; -import { MatIconModule } from '@angular/material/icon'; -import { MatButtonModule } from '@angular/material/button'; - -@NgModule({ - imports: [ - CommonModule, - MatProgressSpinnerModule, - MatIconModule, - MatButtonModule, - MatProgressBarModule, - ], - declarations: [LockerMessage], - exports: [LockerMessage], - bootstrap: [LockerMessage] -}) -export class LockerMessageModule {} diff --git a/application/client/src/app/ui/views/dialogs/locker/styles.less b/application/client/src/app/ui/views/dialogs/locker/styles.less deleted file mode 100644 index 43ab9003ee..0000000000 --- a/application/client/src/app/ui/views/dialogs/locker/styles.less +++ /dev/null @@ -1,75 +0,0 @@ -@import '../../../styles/variables.less'; - -:host { - overflow: hidden; - position: relative; - padding: 0; - margin: 0; - text-align: center; - & div.modal { - display: flex; - flex-direction: column; - align-items: center; - padding: 24px; - margin: 0; - } - & div.progress { - display: flex; - position: relative; - flex-direction: column; - align-items: center; - justify-content: center; - padding: 6px 12px; - margin: 0; - & > * { - z-index: 1; - } - & img { - position: absolute; - display: block; - width: 100%; - height: 100%; - top: 0; - left: 0; - z-index: 0; - animation: appearing 3s linear forwards; - } - @keyframes appearing { - 0% { - opacity: 0; - } - 100% { - opacity: 0.5; - } - } - } - & * { - color: var(--scheme-color-1); - } - & mat-spinner { - display: block; - } - & mat-icon { - display: block; - height: 32px; - width: 32px; - font-size: 32px; - color: var(--scheme-color-warning-light) - } - & p { - text-align: left; - padding: 12px 0; - overflow-wrap: anywhere; - } - & div.controls{ - position: relative; - text-align: right; - padding: 12px 0 6px 0; - width: 100%; - white-space: nowrap; - & button { - display: inline-block; - margin-left: 12px; - } - } -} \ No newline at end of file diff --git a/application/client/src/app/ui/views/dialogs/locker/template.html b/application/client/src/app/ui/views/dialogs/locker/template.html deleted file mode 100644 index 10290430f6..0000000000 --- a/application/client/src/app/ui/views/dialogs/locker/template.html +++ /dev/null @@ -1,14 +0,0 @@ -
-

{{locker.message}}

- -
- diff --git a/application/client/src/app/ui/views/dialogs/module.ts b/application/client/src/app/ui/views/dialogs/module.ts deleted file mode 100644 index 353556cab1..0000000000 --- a/application/client/src/app/ui/views/dialogs/module.ts +++ /dev/null @@ -1,27 +0,0 @@ -import { NgModule } from '@angular/core'; -import { CommonModule } from '@angular/common'; - -import { HotkeysModule } from './hotkeys/module'; -import { LockerMessageModule } from './locker/module'; -import { AboutModule } from './about/module'; -import { ColorSelectorModule } from './colors/module'; -import { CommentModule } from './comment/module'; -import { JumpToModule } from './jumpto/module'; -import { ColumnsSelectorModule } from './columnsselector/module'; - -@NgModule({ - imports: [ - CommonModule, - HotkeysModule, - AboutModule, - LockerMessageModule, - ColorSelectorModule, - CommentModule, - JumpToModule, - ColumnsSelectorModule, - ], - declarations: [], - exports: [HotkeysModule, AboutModule, LockerMessageModule, CommentModule, JumpToModule], - bootstrap: [], -}) -export class DialogsModule {} diff --git a/application/client/src/app/ui/views/module.ts b/application/client/src/app/ui/views/module.ts deleted file mode 100644 index 8b342d1c9b..0000000000 --- a/application/client/src/app/ui/views/module.ts +++ /dev/null @@ -1,39 +0,0 @@ -/** - * Declares the `views` module, which organizes UI components (views) by their rendering context. - * - * @remarks - * This module serves as a central entry point for registering and managing views - * that are rendered in various predefined UI zones of the application. Views are - * grouped according to their logical container to ensure consistency, clarity, - * and maintainability. - * - * The main rendering contexts include: - * - `/toolbar` - all views rendered in the toolbar area. - * - `/sidebar` - all views rendered in the sidebar panel. - * - `/workspace` - all views rendered in the main output or content window. - * - `/statusbar` - all views rendered in the bottom status bar. - * - `/dialogs` - all views rendered in modal dialog windows. - * - * @important - * When creating new views, developers must assign them to the appropriate context directory - * based on the parent view or rendering zone. This promotes a clean separation of concerns - * and simplifies view lifecycle and rendering logic across the application. - * - * @module - * @public - */ - -import { NgModule } from '@angular/core'; -import { CommonModule } from '@angular/common'; -import { WorkspaceModule } from './workspace/module'; -import { ToolbarModule } from './toolbar/module'; -import { SidebarModule } from './sidebar/module'; -import { DialogsModule } from './dialogs/module'; - -@NgModule({ - imports: [CommonModule, WorkspaceModule, ToolbarModule, SidebarModule, DialogsModule], - declarations: [], - exports: [WorkspaceModule, ToolbarModule, SidebarModule, DialogsModule], - bootstrap: [], -}) -export class ViewsModule {} diff --git a/application/client/src/app/ui/views/sidebar/attachments/attachment/component.ts b/application/client/src/app/ui/views/sidebar/attachments/attachment/component.ts deleted file mode 100644 index d6eb5a938c..0000000000 --- a/application/client/src/app/ui/views/sidebar/attachments/attachment/component.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { Component, Input, AfterContentInit, ChangeDetectionStrategy } from '@angular/core'; -import { Ilc, IlcInterface } from '@env/decorators/component'; -import { Attachment } from '@platform/types/content'; -import { bytesToStr } from '@env/str'; - -@Component({ - selector: 'app-views-attachments-item', - templateUrl: './template.html', - styleUrls: ['./styles.less'], - changeDetection: ChangeDetectionStrategy.OnPush, - standalone: false, -}) -@Ilc() -export class Item implements AfterContentInit { - @Input() attachment!: Attachment; - - public ext!: string; - public size!: string; - - public ngAfterContentInit(): void { - this.ext = this.attachment.extAsString(); - this.size = bytesToStr(this.attachment.size); - } -} -export interface Item extends IlcInterface {} diff --git a/application/client/src/app/ui/views/sidebar/attachments/attachment/module.ts b/application/client/src/app/ui/views/sidebar/attachments/attachment/module.ts deleted file mode 100644 index 2be9d186cf..0000000000 --- a/application/client/src/app/ui/views/sidebar/attachments/attachment/module.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { NgModule } from '@angular/core'; -import { CommonModule } from '@angular/common'; -import { Item } from './component'; -import { MatButtonModule } from '@angular/material/button'; -import { MatIconModule } from '@angular/material/icon'; -import { AppDirectiviesModule } from '@directives/module'; - -@NgModule({ - imports: [CommonModule, MatButtonModule, MatIconModule, AppDirectiviesModule], - declarations: [Item], - exports: [Item], -}) -export class ItemModule {} diff --git a/application/client/src/app/ui/views/sidebar/attachments/attachment/styles.less b/application/client/src/app/ui/views/sidebar/attachments/attachment/styles.less deleted file mode 100644 index 8a85c477d8..0000000000 --- a/application/client/src/app/ui/views/sidebar/attachments/attachment/styles.less +++ /dev/null @@ -1,51 +0,0 @@ -@import '../../../../styles/variables.less'; - -:host { - position: relative; - display: flex; - padding: 0; - margin: 0; - flex-direction: row; - align-items: center; - width: 100%; - margin-left: -24px; - height: 32px; - overflow: hidden; - padding: 3px 24px; - cursor: default; - & span.extention { - position: relative; - display: flex; - width: 32px; - height: 32px; - text-transform: uppercase; - align-items: center; - align-content: center; - color: var(--scheme-color-1); - font-size: 12px; - } - & div.desc { - position: relative; - display: flex; - height: 32px; - overflow: hidden; - flex-direction: column; - padding-left: 8px; - & p.name, - & p.size { - font-size: 14px; - font-weight: 400; - line-height: 14px; - text-overflow: ellipsis; - overflow: hidden; - white-space: nowrap; - } - & p.name { - color: var(--scheme-color-1); - } - & p.size { - color: var(--scheme-color-3); - - } - } -} diff --git a/application/client/src/app/ui/views/sidebar/attachments/attachment/template.html b/application/client/src/app/ui/views/sidebar/attachments/attachment/template.html deleted file mode 100644 index 242e343026..0000000000 --- a/application/client/src/app/ui/views/sidebar/attachments/attachment/template.html +++ /dev/null @@ -1,5 +0,0 @@ -{{ext}} -
-

{{attachment.name}}

-

{{size}}

-
diff --git a/application/client/src/app/ui/views/sidebar/attachments/attachment/wrapper.ts b/application/client/src/app/ui/views/sidebar/attachments/attachment/wrapper.ts deleted file mode 100644 index 79b9a75f8e..0000000000 --- a/application/client/src/app/ui/views/sidebar/attachments/attachment/wrapper.ts +++ /dev/null @@ -1,21 +0,0 @@ -import { Attachment } from '@platform/types/content'; - -export class Wrapped { - public selected: boolean = false; - constructor(public readonly attachment: Attachment) {} - public select(): void { - this.selected = true; - } - public unselect(): void { - this.selected = false; - } - public toggle(): void { - this.selected = !this.selected; - } - public equal(attachment: Attachment): boolean { - return this.attachment.uuid === attachment.uuid; - } - public ext(ext: string): boolean { - return this.attachment.extAsString().toLowerCase() === ext.toLowerCase(); - } -} diff --git a/application/client/src/app/ui/views/sidebar/attachments/component.ts b/application/client/src/app/ui/views/sidebar/attachments/component.ts deleted file mode 100644 index ae1c14d080..0000000000 --- a/application/client/src/app/ui/views/sidebar/attachments/component.ts +++ /dev/null @@ -1,436 +0,0 @@ -import { - Component, - Input, - ChangeDetectorRef, - AfterContentInit, - ViewChild, - ChangeDetectionStrategy, - HostListener, -} from '@angular/core'; -import { Session } from '@service/session'; -import { Ilc, IlcInterface } from '@env/decorators/component'; -import { Initial } from '@env/decorators/initial'; -import { ChangesDetector } from '@ui/env/extentions/changes'; -import { Attachment } from '@platform/types/content'; -import { Wrapped } from './attachment/wrapper'; -import { Locker } from '@ui/service/lockers'; -import { Notification } from '@ui/service/notifications'; -import { Owner } from '@schema/content/row'; -import { Preview } from './preview/component'; -import { NormalizedBackgroundTask } from '@platform/env/normalized'; -import { IMenuItem } from '@ui/service/contextmenu'; -import { - getFileExtention, - appendFileExtention, - getFileName, - getSafeFileName, -} from '@platform/types/files'; - -import * as dom from '@ui/env/dom'; - -const UNTYPED = 'untyped'; - -@Component({ - selector: 'app-views-attachments-list', - templateUrl: './template.html', - styleUrls: ['./styles.less'], - changeDetection: ChangeDetectionStrategy.OnPush, - standalone: false, -}) -@Initial() -@Ilc() -export class Attachments extends ChangesDetector implements AfterContentInit { - @Input() session!: Session; - @ViewChild('previewref') previewElRef!: Preview; - - public preview: Attachment | undefined; - public extensions: Map = new Map(); - public readonly filtered: { - ext: string | undefined; - attachments: Wrapped[]; - } = { - ext: undefined, - attachments: [], - }; - - protected readonly runner: NormalizedBackgroundTask = new NormalizedBackgroundTask(20); - protected readonly attachments: Wrapped[] = []; - protected readonly selection: { - last: string | undefined; - } = { - last: undefined, - }; - protected readonly holded: { - ctrl: boolean; - shift: boolean; - } = { - ctrl: false, - shift: false, - }; - - @HostListener('contextmenu', ['$event']) onContextMenu(event: MouseEvent) { - this.ilc().emitter.ui.contextmenu.open({ - items: this.getCommonContextMenu(), - x: event.x, - y: event.y, - }); - } - - constructor(cdRef: ChangeDetectorRef) { - super(cdRef); - } - - public ngAfterContentInit(): void { - this.env().subscriber.register( - this.session.attachments.subjects.get().updated.subscribe(this.update.bind(this)), - ); - this.env().subscriber.register( - this.ilc().services.ui.listener.listen('focus', window, (_event: Event) => { - this.holded.ctrl = false; - this.holded.shift = false; - return true; - }), - this.ilc().services.ui.listener.listen('blur', window, (_event: Event) => { - this.holded.ctrl = false; - this.holded.shift = false; - return true; - }), - this.ilc().services.ui.listener.listen( - 'keyup', - window, - (event: KeyboardEvent) => { - if (event.key === 'Control' || event.key === 'Meta') { - this.holded.ctrl = false; - } else if (event.key === 'Shift') { - this.holded.shift = false; - } - return true; - }, - ), - ); - this.env().subscriber.register( - this.ilc().services.ui.listener.listen( - 'keydown', - window, - (event: KeyboardEvent) => { - if (event.key === 'Control' || event.key === 'Meta') { - this.holded.ctrl = true; - } else if (event.key === 'Shift') { - this.holded.shift = true; - } - return true; - }, - ), - ); - this.update(); - } - - public onItemContextMenu(event: MouseEvent, attachment: Attachment) { - const items = [ - { - caption: 'Select All', - handler: () => { - this.attachments.map((a) => a.select()); - this.detectChanges(); - }, - }, - { - caption: 'Revert selection', - handler: () => { - this.attachments.map((a) => a.toggle()); - this.detectChanges(); - }, - }, - {}, - { - caption: 'Save Selected', - handler: () => { - this.save().selected(); - }, - }, - { - caption: 'Save All', - handler: () => { - this.save().all(); - }, - }, - {}, - { - caption: 'Save As', - handler: () => { - this.save().as(attachment); - }, - }, - {}, - { - caption: 'GoTo Related Row', - handler: () => { - if (attachment.messages.length === 0) { - this.log().warn( - `Attachment ${attachment.name} isn't bound with any row(s)`, - ); - return; - } - this.session.cursor.select( - attachment.messages[0], - Owner.Attachment, - undefined, - undefined, - ); - }, - }, - { - caption: 'Select Related Row(s)', - handler: () => { - if (attachment.messages.length === 0) { - this.log().warn( - `Attachment ${attachment.name} isn't bound with any row(s)`, - ); - return; - } - const cursor = this.session.cursor; - cursor - .drop() - .select(attachment.messages[0], Owner.Attachment, undefined, undefined); - attachment.messages.forEach((pos) => cursor.mark(pos).selected()); - }, - }, - {}, - ...this.getCommonContextMenu(), - ]; - this.ilc().emitter.ui.contextmenu.open({ - items, - x: event.x, - y: event.y, - }); - dom.stop(event); - } - - public select(): { - attachment(attachment: Attachment): void; - drop(): void; - } { - return { - attachment: (attachment: Attachment): void => { - const target = this.attachments.find((a) => a.equal(attachment)); - if (target === undefined) { - return; - } - if (!this.holded.ctrl && !this.holded.shift) { - const selected = target.selected; - this.attachments.map((a) => a.unselect()); - !selected && target.select(); - } else if (this.holded.ctrl) { - target.toggle(); - } else if (this.holded.shift) { - if (this.selection.last === undefined) { - return; - } - const index = this.filtered.attachments.findIndex((a) => a.equal(attachment)); - const lastIndex = this.filtered.attachments.findIndex( - (a) => a.attachment.uuid === this.selection.last, - ); - if (index === -1 || lastIndex === -1) { - return; - } - if (index === lastIndex) { - target.toggle(); - } else if (index > lastIndex) { - for (let i = lastIndex + 1; i <= index; i += 1) { - this.filtered.attachments[i].toggle(); - } - } else if (index < lastIndex) { - for (let i = lastIndex - 1; i >= index; i -= 1) { - this.filtered.attachments[i].toggle(); - } - } - } - const selected = this.getSelected(); - if (selected.length === 1) { - this.preview = selected[0]; - if (this.previewElRef !== undefined) { - this.previewElRef.assign(this.preview); - } - } else { - this.preview = undefined; - } - if (selected.length > 0) { - this.selection.last = attachment.uuid; - } else { - this.selection.last = undefined; - } - this.detectChanges(); - }, - drop: (): void => { - this.attachments.map((a) => a.unselect()); - this.selection.last = undefined; - this.preview = undefined; - }, - }; - } - - public getSelected(): Attachment[] { - return this.attachments.filter((a) => a.selected).map((a) => a.attachment); - } - - public filter(): { - ext(ext: string): void; - update(): void; - all(): void; - } { - return { - ext: (ext: string): void => { - this.filtered.ext = ext === UNTYPED ? '' : ext; - this.select().drop(); - this.filter().update(); - }, - update: (): void => { - const ext = this.filtered.ext; - if (ext === undefined) { - this.filtered.attachments = this.attachments; - } else { - this.filtered.attachments = this.attachments.filter((a) => a.ext(ext)); - } - this.detectChanges(); - }, - all: (): void => { - this.filtered.ext = undefined; - this.select().drop(); - this.filter().update(); - }, - }; - } - - public save(): { - all(): Promise; - selected(): Promise; - typed(ext: string): Promise; - as(attachment?: Attachment): Promise; - } { - const bridge = this.ilc().services.system.bridge; - const copy = async (files: string[]) => { - if (files.length === 0) { - return; - } - const folders = await bridge.folders().select(); - if (folders.length !== 1) { - return; - } - const message = this.ilc().services.ui.lockers.lock(new Locker(true, `Saving...`), { - closable: false, - }); - bridge - .files() - .copy(files, folders[0]) - .catch((err: Error) => { - this.ilc().services.ui.notifications.notify( - new Notification({ - message: err.message, - actions: [], - }), - ); - }) - .finally(() => { - message.popup.close(); - }); - }; - return { - all: async (): Promise => { - copy(this.attachments.map((a) => a.attachment.filepath)); - }, - selected: async (): Promise => { - copy(this.attachments.filter((a) => a.selected).map((a) => a.attachment.filepath)); - }, - typed: async (ext: string): Promise => { - copy(this.attachments.filter((a) => a.ext(ext)).map((a) => a.attachment.filepath)); - }, - as: async (attachment?: Attachment): Promise => { - if (attachment === undefined) { - const selected = this.getSelected(); - if (selected.length !== 1) { - return; - } - attachment = selected[0]; - } - let dest = await bridge - .files() - .select.save(undefined, getSafeFileName(getFileName(attachment.filepath))); - if (dest === undefined) { - return; - } - const ext = { - dest: getFileExtention(dest), - src: getFileExtention(attachment.filepath), - }; - if (ext.dest.toLowerCase() !== ext.src.toLowerCase()) { - dest = appendFileExtention(dest, ext.src); - } - const message = this.ilc().services.ui.lockers.lock(new Locker(true, `Saving...`), { - closable: false, - }); - bridge - .files() - .cp(attachment.filepath, dest) - .catch((err: Error) => { - this.ilc().services.ui.notifications.notify( - new Notification({ - message: err.message, - actions: [], - }), - ); - }) - .finally(() => { - message.popup.close(); - }); - }, - }; - } - - protected getCommonContextMenu(): IMenuItem[] { - return [ - { - caption: `Show All (${this.attachments.length})`, - handler: () => { - this.filter().all(); - }, - }, - {}, - ...Array.from(this.extensions.entries()).map((entry) => { - const ext = entry[0]; - const count = entry[1]; - return ext === UNTYPED - ? { - caption: `Show All Untyped (${count})`, - handler: () => { - this.filter().ext(''); - }, - } - : { - caption: `Show: *.${ext} (${count})`, - handler: () => { - this.filter().ext(ext); - }, - }; - }), - ]; - } - - protected update(): void { - const attachments = Array.from(this.session.attachments.attachments.values()).filter( - (a) => this.attachments.find((w) => w.equal(a)) === undefined, - ); - this.attachments.push(...attachments.map((a) => new Wrapped(a))); - attachments.forEach((attachment) => { - const ext = typeof attachment.ext !== 'string' ? UNTYPED : attachment.ext; - const count = this.extensions.get(ext); - if (count === undefined) { - this.extensions.set(ext, 1); - } else { - this.extensions.set(ext, count + 1); - } - }); - this.filter().update(); - this.detectChanges(); - } -} -export interface Attachments extends IlcInterface {} diff --git a/application/client/src/app/ui/views/sidebar/attachments/module.ts b/application/client/src/app/ui/views/sidebar/attachments/module.ts deleted file mode 100644 index 98175b428a..0000000000 --- a/application/client/src/app/ui/views/sidebar/attachments/module.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { NgModule } from '@angular/core'; -import { CommonModule } from '@angular/common'; -import { ContainersModule } from '@elements/containers/module'; -import { MatButtonModule } from '@angular/material/button'; -import { MatIconModule } from '@angular/material/icon'; -import { Attachments } from './component'; -import { ItemModule } from './attachment/module'; -import { PreviewModule } from './preview/module'; -import { MatCardModule } from '@angular/material/card'; -import { MatExpansionModule } from '@angular/material/expansion'; -import { MatMenuModule } from '@angular/material/menu'; -import { MatDividerModule } from '@angular/material/divider'; - -@NgModule({ - imports: [ - CommonModule, - ContainersModule, - MatButtonModule, - MatCardModule, - MatExpansionModule, - MatMenuModule, - MatIconModule, - MatDividerModule, - ItemModule, - PreviewModule, - ], - declarations: [Attachments], - exports: [Attachments], - bootstrap: [Attachments], -}) -export class AttachmentsModule {} diff --git a/application/client/src/app/ui/views/sidebar/attachments/preview/audio/component.ts b/application/client/src/app/ui/views/sidebar/attachments/preview/audio/component.ts deleted file mode 100644 index e5e2df0468..0000000000 --- a/application/client/src/app/ui/views/sidebar/attachments/preview/audio/component.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { Component, Input, ChangeDetectionStrategy } from '@angular/core'; -import { Ilc, IlcInterface } from '@env/decorators/component'; -import { Attachment } from '@platform/types/content'; -import { Subject } from '@platform/env/subscription'; - -@Component({ - selector: 'app-views-attachments-item-audio-preview', - templateUrl: './template.html', - styleUrls: ['./styles.less'], - changeDetection: ChangeDetectionStrategy.OnPush, - standalone: false, -}) -@Ilc() -export class Preview { - @Input() attachment!: Attachment; - @Input() embedded!: boolean; - @Input() updated!: Subject; -} -export interface Preview extends IlcInterface {} diff --git a/application/client/src/app/ui/views/sidebar/attachments/preview/audio/styles.less b/application/client/src/app/ui/views/sidebar/attachments/preview/audio/styles.less deleted file mode 100644 index 77c3a08a3d..0000000000 --- a/application/client/src/app/ui/views/sidebar/attachments/preview/audio/styles.less +++ /dev/null @@ -1,10 +0,0 @@ -@import '../../../../../styles/variables.less'; - -:host { - position: relative; - display: block; - padding: 0; - margin: 0; - width: 100%; - overflow: hidden; -} diff --git a/application/client/src/app/ui/views/sidebar/attachments/preview/audio/template.html b/application/client/src/app/ui/views/sidebar/attachments/preview/audio/template.html deleted file mode 100644 index d42f77ef55..0000000000 --- a/application/client/src/app/ui/views/sidebar/attachments/preview/audio/template.html +++ /dev/null @@ -1 +0,0 @@ -

Not supported yet

\ No newline at end of file diff --git a/application/client/src/app/ui/views/sidebar/attachments/preview/component.ts b/application/client/src/app/ui/views/sidebar/attachments/preview/component.ts deleted file mode 100644 index dfd3b15d71..0000000000 --- a/application/client/src/app/ui/views/sidebar/attachments/preview/component.ts +++ /dev/null @@ -1,116 +0,0 @@ -import { - Component, - Input, - AfterContentInit, - ChangeDetectorRef, - ChangeDetectionStrategy, - HostBinding, -} from '@angular/core'; -import { Ilc, IlcInterface } from '@env/decorators/component'; -import { Attachment } from '@platform/types/content'; -import { bytesToStr } from '@env/str'; -import { Initial } from '@env/decorators/initial'; -import { ChangesDetector } from '@ui/env/extentions/changes'; -import { Locker } from '@ui/service/lockers'; -import { Notification } from '@ui/service/notifications'; -import { Subject } from '@platform/env/subscription'; -import { - getFileExtention, - appendFileExtention, - getFileName, - getSafeFileName, -} from '@platform/types/files'; - -@Component({ - selector: 'app-views-attachments-preview', - templateUrl: './template.html', - styleUrls: ['./styles.less'], - changeDetection: ChangeDetectionStrategy.OnPush, - standalone: false, -}) -@Initial() -@Ilc() -export class Preview extends ChangesDetector implements AfterContentInit { - @Input() attachment!: Attachment; - @Input() embedded!: boolean; - @Input() close!: () => void; - - @HostBinding('class.popup') get popup() { - return !this.embedded; - } - - set popup(value: boolean) { - // - } - - public ext!: string; - public size!: string; - public type!: 'audio' | 'video' | 'text' | 'image' | 'unknown'; - public updated: Subject = new Subject(); - - constructor(cdRef: ChangeDetectorRef) { - super(cdRef); - } - - public ngAfterContentInit(): void { - this.update(); - } - - public assign(attachment: Attachment): void { - this.attachment = attachment; - this.update().detectChanges(); - this.updated.emit(); - } - - public async saveAs(): Promise { - const bridge = this.ilc().services.system.bridge; - let dest = await bridge - .files() - .select.save(undefined, getSafeFileName(getFileName(this.attachment.filepath))); - if (dest === undefined) { - return; - } - const ext = { - dest: getFileExtention(dest), - src: getFileExtention(this.attachment.filepath), - }; - if (ext.dest.toLowerCase() !== ext.src.toLowerCase()) { - dest = appendFileExtention(dest, ext.src); - } - const message = this.ilc().services.ui.lockers.lock(new Locker(true, `Saving...`), { - closable: false, - }); - bridge - .files() - .cp(this.attachment.filepath, dest) - .catch((err: Error) => { - this.ilc().services.ui.notifications.notify( - new Notification({ - message: err.message, - actions: [], - }), - ); - }) - .finally(() => { - message.popup.close(); - }); - } - - protected update(): Preview { - this.ext = this.attachment.extAsString(); - this.size = bytesToStr(this.attachment.size); - if (this.attachment.is().image()) { - this.type = 'image'; - } else if (this.attachment.is().video()) { - this.type = 'video'; - } else if (this.attachment.is().audio()) { - this.type = 'audio'; - } else if (this.attachment.is().text()) { - this.type = 'text'; - } else { - this.type = 'unknown'; - } - return this; - } -} -export interface Preview extends IlcInterface {} diff --git a/application/client/src/app/ui/views/sidebar/attachments/preview/image/component.ts b/application/client/src/app/ui/views/sidebar/attachments/preview/image/component.ts deleted file mode 100644 index e0962d4bb7..0000000000 --- a/application/client/src/app/ui/views/sidebar/attachments/preview/image/component.ts +++ /dev/null @@ -1,239 +0,0 @@ -import { - Component, - Input, - ViewChild, - AfterViewInit, - ElementRef, - ChangeDetectorRef, - ChangeDetectionStrategy, - AfterContentInit, -} from '@angular/core'; -import { ChangesDetector } from '@ui/env/extentions/changes'; -import { Ilc, IlcInterface } from '@env/decorators/component'; -import { Attachment } from '@platform/types/content'; -import { popup, Vertical, Horizontal } from '@ui/service/popup'; -import { ChangeEvent } from '@directives/dragging'; -import { stop } from '@ui/env/dom'; -import { Subject } from '@platform/env/subscription'; -import { components } from '@env/decorators/initial'; -import { Locker } from '@ui/service/lockers'; -import { URLFileReader } from '@env/urlfilereader'; - -@Component({ - selector: 'app-views-attachments-item-image-preview', - templateUrl: './template.html', - styleUrls: ['./styles.less'], - changeDetection: ChangeDetectionStrategy.OnPush, - standalone: false, -}) -@Ilc() -export class Preview extends ChangesDetector implements AfterViewInit, AfterContentInit { - @Input() attachment!: Attachment; - @Input() embedded!: boolean; - @Input() updated!: Subject; - - @ViewChild('image') public imageElRef!: ElementRef; - - public url!: string; - - protected rotation: number = 0; - protected zoom: number = 1; - protected size!: DOMRect; - protected origin!: DOMRect; - - protected readonly position: { - top: number; - left: number; - } = { - top: 0, - left: 0, - }; - - protected readonly min: { - top: number; - left: number; - } = { - top: 0, - left: 0, - }; - - protected readonly max: { - top: number; - left: number; - } = { - top: 0, - left: 0, - }; - - constructor(cdRef: ChangeDetectorRef) { - super(cdRef); - } - - protected updateImageDomRect() { - this.size = this.imageElRef.nativeElement.getBoundingClientRect(); - const diff = { - top: (this.size.height - this.origin.height) / 2 / this.zoom, - left: (this.size.width - this.origin.width) / 2 / this.zoom, - }; - if (diff.top > 0) { - this.max.top = diff.top; - this.min.top = -diff.top; - } else { - this.max.top = 0; - this.min.top = 0; - } - if (diff.left > 0) { - this.max.left = diff.left; - this.min.left = -diff.left; - } else { - this.max.left = 0; - this.min.left = 0; - } - if (this.position.top > this.max.top) { - this.position.top = this.max.top; - } else if (this.position.top < this.min.top) { - this.position.top = this.min.top; - } - if (this.position.left > this.max.left) { - this.position.left = this.max.left; - } else if (this.position.left < this.min.left) { - this.position.left = this.min.left; - } - } - - public contextmenu(event: MouseEvent) { - this.ilc().emitter.ui.contextmenu.open({ - items: [ - { - caption: 'Copy Into Clipboard', - handler: () => { - this.copy(); - }, - }, - ], - x: event.x, - y: event.y, - }); - } - - public originImageDomRect() { - this.origin = this.imageElRef.nativeElement.getBoundingClientRect(); - this.updateImageDomRect(); - } - - public ngAfterContentInit(): void { - this.update(); - this.env().subscriber.register( - this.updated.subscribe(() => { - this.update(); - this.detectChanges(); - }), - ); - } - - public ngAfterViewInit(): void { - this.originImageDomRect(); - this.size = this.origin; - } - - public getStyles(): { [key: string]: string } { - return { - transform: `rotate(${this.rotation}deg) scale(${this.zoom}) translate(${this.position.left}px,${this.position.top}px)`, - }; - } - - public rotate(): { - left(): void; - right(): void; - } { - return { - left: (): void => { - this.rotation -= 90; - this.rotation = this.rotation < 0 ? 270 : this.rotation; - }, - right: (): void => { - this.rotation += 90; - this.rotation = this.rotation > 360 ? 90 : this.rotation; - }, - }; - } - - public scrolling(event: WheelEvent) { - stop(event); - this.zoom += 0.05 * (event.deltaY > 0 ? -1 : 1); - this.zoom = this.zoom < 1 ? 1 : this.zoom; - this.detectChanges(); - this.updateImageDomRect(); - } - - public maximize() { - const instance = popup.open({ - component: { - factory: components.get('app-views-attachments-preview'), - inputs: { - attachment: this.attachment, - embedded: false, - close: () => { - instance.close(); - }, - }, - }, - position: { - vertical: Vertical.center, - horizontal: Horizontal.center, - }, - closeOnKey: 'Escape', - uuid: this.attachment.uuid, - }); - } - - public move(event: ChangeEvent) { - this.position.top = event.top; - this.position.left = event.left; - } - - public copy(): void { - const message = this.ilc().services.ui.lockers.lock( - new Locker(true, `Copying into clipboard...`), - { - closable: false, - }, - ); - new URLFileReader(`attachment://${encodeURIComponent(this.attachment.filepath)}`) - .read('blob') - .then((response) => { - if (!(response instanceof Blob)) { - this.log().warn(`Fail to fetch image as Blob`); - return; - } - const contentType = response.type.trim(); - response - .arrayBuffer() - .then((buffer) => { - // We are using native clipboard API, but not browser one (navigator.clipboard) - // to avoid possible issues with size of blob. - window.electron.clipboard - .write(contentType.length > 0 ? contentType : undefined, buffer) - .catch((err: Error) => { - this.log().warn( - `Fail to copy image into clipboard: ${err.message}`, - ); - }); - }) - .catch((err: Error) => { - this.log().warn(`Fail to load image as bytes: ${err.message}`); - }); - }) - .catch((err: Error) => { - this.log().error(`Fail to get a blob for ${this.attachment.name}: ${err.message}.`); - }) - .finally(() => { - message.popup.close(); - }); - } - - protected update() { - this.url = `attachment://${encodeURIComponent(this.attachment.filepath)}`; - } -} -export interface Preview extends IlcInterface {} diff --git a/application/client/src/app/ui/views/sidebar/attachments/preview/image/styles.less b/application/client/src/app/ui/views/sidebar/attachments/preview/image/styles.less deleted file mode 100644 index 49ffc30d46..0000000000 --- a/application/client/src/app/ui/views/sidebar/attachments/preview/image/styles.less +++ /dev/null @@ -1,43 +0,0 @@ -@import '../../../../../styles/variables.less'; - -:host { - position: relative; - display: block; - padding: 0; - margin: 0; - & div.image { - position: relative; - width: 100%; - overflow: hidden; - margin-bottom: 16px; - & img { - position: relative; - display: block; - width: 100%; - } - } - & div.shortcuts { - position: absolute; - top: 8px; - right: 10px; - padding: 3px; - } - & div.controlls { - position: absolute; - width: 100%; - justify-content: center; - flex-direction: row; - top: 0px; - width: 100%; - background: var(--scheme-color-3-15); - display: none; - & * { - color:var(--scheme-color-1); - } - } - &:hover { - & div.controlls { - display: flex; - } - } -} diff --git a/application/client/src/app/ui/views/sidebar/attachments/preview/image/template.html b/application/client/src/app/ui/views/sidebar/attachments/preview/image/template.html deleted file mode 100644 index 471bb3e038..0000000000 --- a/application/client/src/app/ui/views/sidebar/attachments/preview/image/template.html +++ /dev/null @@ -1,24 +0,0 @@ -
- -
-
- - - -
-
- -
\ No newline at end of file diff --git a/application/client/src/app/ui/views/sidebar/attachments/preview/module.ts b/application/client/src/app/ui/views/sidebar/attachments/preview/module.ts deleted file mode 100644 index fa8f36613f..0000000000 --- a/application/client/src/app/ui/views/sidebar/attachments/preview/module.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { NgModule } from '@angular/core'; -import { CommonModule } from '@angular/common'; -import { Preview } from './component'; -import { Preview as ImagePreview } from './image/component'; -import { Preview as TextPreview } from './text/component'; -import { Preview as UnknownPreview } from './unknown/component'; -import { Preview as VideoPreview } from './video/component'; -import { Preview as AudioPreview } from './audio/component'; -import { MatButtonModule } from '@angular/material/button'; -import { MatIconModule } from '@angular/material/icon'; -import { AppDirectiviesModule } from '@directives/module'; - -@NgModule({ - imports: [CommonModule, MatButtonModule, MatIconModule, AppDirectiviesModule], - declarations: [Preview, ImagePreview, VideoPreview, AudioPreview, TextPreview, UnknownPreview], - exports: [Preview], -}) -export class PreviewModule {} diff --git a/application/client/src/app/ui/views/sidebar/attachments/preview/styles.less b/application/client/src/app/ui/views/sidebar/attachments/preview/styles.less deleted file mode 100644 index b542abb6ab..0000000000 --- a/application/client/src/app/ui/views/sidebar/attachments/preview/styles.less +++ /dev/null @@ -1,67 +0,0 @@ -@import '../../../../styles/variables.less'; - -:host { - position: relative; - display: block; - padding: 0; - margin: 0; - &.popup { - margin: 16px; - } - & div.title { - position: relative; - display: flex; - padding: 0; - margin: 0; - flex-direction: row; - align-items: center; - margin-left: -24px; - height: 32px; - overflow: hidden; - padding: 3px 24px; - cursor: default; - margin-bottom: 16px; - & span.extention { - position: relative; - display: flex; - width: 32px; - height: 32px; - text-transform: uppercase; - align-items: center; - align-content: center; - color: var(--scheme-color-1); - font-size: 12px; - font-weight: 700; - } - & div.desc { - position: relative; - display: flex; - height: 32px; - overflow: hidden; - flex-direction: column; - padding-left: 8px; - & p.name, - & p.size { - font-size: 14px; - font-weight: 400; - line-height: 14px; - text-overflow: ellipsis; - overflow: hidden; - white-space: nowrap; - } - & p.name { - color: var(--scheme-color-1); - } - & p.size { - color: var(--scheme-color-3); - - } - } - } - & div.controlls { - text-align: right; - & button { - margin-left: 8px; - } - } -} diff --git a/application/client/src/app/ui/views/sidebar/attachments/preview/template.html b/application/client/src/app/ui/views/sidebar/attachments/preview/template.html deleted file mode 100644 index 36b852fbe9..0000000000 --- a/application/client/src/app/ui/views/sidebar/attachments/preview/template.html +++ /dev/null @@ -1,18 +0,0 @@ -
- {{ext}} -
-

{{attachment.name}}

-

{{size}}

-
-
-
- - - - - -
-
- - -
\ No newline at end of file diff --git a/application/client/src/app/ui/views/sidebar/attachments/preview/text/component.ts b/application/client/src/app/ui/views/sidebar/attachments/preview/text/component.ts deleted file mode 100644 index 46f6002ae9..0000000000 --- a/application/client/src/app/ui/views/sidebar/attachments/preview/text/component.ts +++ /dev/null @@ -1,115 +0,0 @@ -import { - Component, - Input, - AfterContentInit, - ChangeDetectorRef, - ChangeDetectionStrategy, -} from '@angular/core'; -import { Ilc, IlcInterface } from '@env/decorators/component'; -import { Attachment } from '@platform/types/content'; -import { URLFileReader } from '@env/urlfilereader'; -import { ChangesDetector } from '@ui/env/extentions/changes'; -import { unique } from '@platform/env/sequence'; -import { Subject } from '@platform/env/subscription'; - -const MAX_LINES_COUNT = 1000; - -@Component({ - selector: 'app-views-attachments-item-text-preview', - templateUrl: './template.html', - styleUrls: ['./styles.less'], - changeDetection: ChangeDetectionStrategy.OnPush, - standalone: false, -}) -@Ilc() -export class Preview extends ChangesDetector implements AfterContentInit { - @Input() attachment!: Attachment; - @Input() embedded!: boolean; - @Input() updated!: Subject; - - public lines: string[] = []; - public uuid: string = unique(); - public reading: boolean = true; - - constructor(cdRef: ChangeDetectorRef) { - super(cdRef); - } - - public ngAfterContentInit(): void { - this.update(); - this.env().subscriber.register( - this.ilc().services.system.hotkeys.listen('Ctrl + C', () => { - this.copy(false); - }), - this.updated.subscribe(() => { - this.update(); - }), - ); - } - - public contextmenu(event: MouseEvent) { - this.ilc().emitter.ui.contextmenu.open({ - items: [ - { - caption: 'Copy Into Clipboard', - handler: () => { - this.copy(); - }, - }, - ], - x: event.x, - y: event.y, - }); - } - - public copy(all = true): void { - if (all) { - navigator.clipboard.writeText(this.lines.join('\n')); - } else { - const active = document.activeElement; - if (active === null) { - return; - } - if (active.getAttribute('uuid') !== this.uuid) { - return; - } - const selection = document.getSelection(); - if (selection === null) { - return; - } - navigator.clipboard.writeText( - selection - .toString() - .replace(/[\n\r]/gi, '\n') - .replace(/\n{2,}/gi, '\n'), - ); - } - } - - protected update() { - this.reading = true; - this.detectChanges(); - new URLFileReader(`attachment://${encodeURIComponent(this.attachment.filepath)}`) - .read() - .then((response) => { - if (typeof response !== 'string') { - this.log().error(`Expecting to get a text for ${this.attachment.name}.`); - return; - } - this.lines = response.split(/[\n\r]/gi); - if (this.lines.length > MAX_LINES_COUNT) { - const cutted = this.lines.length - MAX_LINES_COUNT; - this.lines.splice(MAX_LINES_COUNT, cutted); - this.lines.push(`... (more ${cutted} lines) ...`); - } - }) - .catch((err: Error) => { - this.log().error(`Fail to get a text for ${this.attachment.name}: ${err.message}.`); - }) - .finally(() => { - this.reading = false; - this.detectChanges(); - }); - } -} -export interface Preview extends IlcInterface {} diff --git a/application/client/src/app/ui/views/sidebar/attachments/preview/text/styles.less b/application/client/src/app/ui/views/sidebar/attachments/preview/text/styles.less deleted file mode 100644 index a20ce2c1c8..0000000000 --- a/application/client/src/app/ui/views/sidebar/attachments/preview/text/styles.less +++ /dev/null @@ -1,47 +0,0 @@ -@import '../../../../../styles/variables.less'; - -:host { - position: relative; - display: block; - padding: 0; - margin: 0; - width: 100%; - overflow: hidden; - & p.info { - font-size: 13px; - color: var(--scheme-color-1); - margin-bottom: 16px; - } - & div.container { - & div.shortcuts { - position: absolute; - top: 1px; - right: 10px; - padding: 3px; - background: var(--scheme-color-5-85); - } - & div.content { - position: relative; - display: block; - width: 100%; - max-height: 300px; - overflow: auto; - padding: 8px 0; - margin: 0 0 16px 0; - border: thin solid var(--scheme-color-3); - box-sizing: border-box; - & p.line { - color: var(--scheme-color-1); - font-size: 11px; - white-space: nowrap; - padding: 0 8px; - margin: 0; - line-height: 15px; - user-select: text; - cursor: text; - font-variant-numeric: tabular-nums; - font-family: console, monospace; - } - } - } -} diff --git a/application/client/src/app/ui/views/sidebar/attachments/preview/text/template.html b/application/client/src/app/ui/views/sidebar/attachments/preview/text/template.html deleted file mode 100644 index c5f9a7f437..0000000000 --- a/application/client/src/app/ui/views/sidebar/attachments/preview/text/template.html +++ /dev/null @@ -1,9 +0,0 @@ -

Reading...

-
-
-

{{line}}

-
-
- -
-
diff --git a/application/client/src/app/ui/views/sidebar/attachments/preview/unknown/component.ts b/application/client/src/app/ui/views/sidebar/attachments/preview/unknown/component.ts deleted file mode 100644 index 9a2bdb25a6..0000000000 --- a/application/client/src/app/ui/views/sidebar/attachments/preview/unknown/component.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { Component, Input, ChangeDetectionStrategy } from '@angular/core'; -import { Ilc, IlcInterface } from '@env/decorators/component'; -import { Attachment } from '@platform/types/content'; -import { Subject } from '@platform/env/subscription'; - -@Component({ - selector: 'app-views-attachments-item-unknown-preview', - templateUrl: './template.html', - styleUrls: ['./styles.less'], - changeDetection: ChangeDetectionStrategy.OnPush, - standalone: false, -}) -@Ilc() -export class Preview { - @Input() attachment!: Attachment; - @Input() embedded!: boolean; - @Input() updated!: Subject; -} -export interface Preview extends IlcInterface {} diff --git a/application/client/src/app/ui/views/sidebar/attachments/preview/unknown/styles.less b/application/client/src/app/ui/views/sidebar/attachments/preview/unknown/styles.less deleted file mode 100644 index 050a0b946a..0000000000 --- a/application/client/src/app/ui/views/sidebar/attachments/preview/unknown/styles.less +++ /dev/null @@ -1,15 +0,0 @@ -@import '../../../../../styles/variables.less'; - -:host { - position: relative; - display: block; - padding: 0; - margin: 0; - margin-bottom: 16px; - width: 100%; - overflow: hidden; - & p { - color: var(--scheme-color-1); - font-size: 14px; - } -} diff --git a/application/client/src/app/ui/views/sidebar/attachments/preview/unknown/template.html b/application/client/src/app/ui/views/sidebar/attachments/preview/unknown/template.html deleted file mode 100644 index 70891f3b96..0000000000 --- a/application/client/src/app/ui/views/sidebar/attachments/preview/unknown/template.html +++ /dev/null @@ -1 +0,0 @@ -

This format of file isn't supported by chipmunk

\ No newline at end of file diff --git a/application/client/src/app/ui/views/sidebar/attachments/preview/video/component.ts b/application/client/src/app/ui/views/sidebar/attachments/preview/video/component.ts deleted file mode 100644 index 6dc80ed49c..0000000000 --- a/application/client/src/app/ui/views/sidebar/attachments/preview/video/component.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { Component, Input, ChangeDetectionStrategy } from '@angular/core'; -import { Ilc, IlcInterface } from '@env/decorators/component'; -import { Attachment } from '@platform/types/content'; -import { Subject } from '@platform/env/subscription'; - -@Component({ - selector: 'app-views-attachments-item-video-preview', - templateUrl: './template.html', - styleUrls: ['./styles.less'], - changeDetection: ChangeDetectionStrategy.OnPush, - standalone: false, -}) -@Ilc() -export class Preview { - @Input() attachment!: Attachment; - @Input() embedded!: boolean; - @Input() updated!: Subject; -} -export interface Preview extends IlcInterface {} diff --git a/application/client/src/app/ui/views/sidebar/attachments/preview/video/styles.less b/application/client/src/app/ui/views/sidebar/attachments/preview/video/styles.less deleted file mode 100644 index 77c3a08a3d..0000000000 --- a/application/client/src/app/ui/views/sidebar/attachments/preview/video/styles.less +++ /dev/null @@ -1,10 +0,0 @@ -@import '../../../../../styles/variables.less'; - -:host { - position: relative; - display: block; - padding: 0; - margin: 0; - width: 100%; - overflow: hidden; -} diff --git a/application/client/src/app/ui/views/sidebar/attachments/preview/video/template.html b/application/client/src/app/ui/views/sidebar/attachments/preview/video/template.html deleted file mode 100644 index d42f77ef55..0000000000 --- a/application/client/src/app/ui/views/sidebar/attachments/preview/video/template.html +++ /dev/null @@ -1 +0,0 @@ -

Not supported yet

\ No newline at end of file diff --git a/application/client/src/app/ui/views/sidebar/attachments/styles.less b/application/client/src/app/ui/views/sidebar/attachments/styles.less deleted file mode 100644 index 157b52bb9c..0000000000 --- a/application/client/src/app/ui/views/sidebar/attachments/styles.less +++ /dev/null @@ -1,85 +0,0 @@ -@import '../../../styles/variables.less'; - -:host { - position: absolute; - display: flex; - flex-direction: column; - padding: 0; - margin: 0; - bottom: 0.5rem; - right: 0.5rem; - left: 0.5rem; - top: 0.5rem; - overflow-y: auto; - overflow-x: hidden; - outline: none; - & > div.caption { - position: sticky !important; - top: 0; - left: 0; - z-index: 1; - background: var(--scheme-color-5); - display: flex; - padding: 0 24px; - margin: 0; - text-align: left; - align-items: center; - white-space: nowrap; - font-size: 0.9rem; - font-weight: 400; - span.title{ - color: var(--scheme-color-2); - } - span.subtitle{ - padding-left: 6px; - color: var(--scheme-color-3); - } - & span.filler { - flex: auto; - } - - } - & p.info { - font-size: 13px; - color: var(--scheme-color-2); - margin: 16px 24px; - } - & mat-expansion-panel { - margin: 6px 0!important; - } - & div.mat-expansion-panel-body { - padding-left: 0; - padding-right: 0; - } - & mat-expansion-panel.list { - flex:auto; - overflow-y: auto; - overflow-x: hidden; - & mat-expansion-panel-header { - position: sticky; - background-color: var(--scheme-bk-color-0); - z-index: 1; - top: 0; - } - & app-views-attachments-item.selected { - background: var(--scheme-color-4); - &::after { - position: absolute; - content: ''; - display: block; - top: 0; - height: 100%; - width: 4px; - left:0; - background: var(--scheme-color-active); - } - } - & app-views-attachments-item:hover { - background: var(--scheme-color-5); - } - } - & mat-expansion-panel.preview { - flex: none; - } - -} diff --git a/application/client/src/app/ui/views/sidebar/attachments/template.html b/application/client/src/app/ui/views/sidebar/attachments/template.html deleted file mode 100644 index a5f99691e3..0000000000 --- a/application/client/src/app/ui/views/sidebar/attachments/template.html +++ /dev/null @@ -1,40 +0,0 @@ -
- Attachments - ({{attachments.length}}) - - -
-

No attachments has been received

- - - Received Attachments - -
- -
-
- - - Preview - - - - - - - - - - diff --git a/application/client/src/app/ui/views/sidebar/comments/comment/component.ts b/application/client/src/app/ui/views/sidebar/comments/comment/component.ts deleted file mode 100644 index ac080c914a..0000000000 --- a/application/client/src/app/ui/views/sidebar/comments/comment/component.ts +++ /dev/null @@ -1,198 +0,0 @@ -// tslint:disable: member-ordering - -import { - Component, - ChangeDetectorRef, - Input, - AfterContentInit, - OnChanges, - SimpleChanges, - ViewEncapsulation, - ChangeDetectionStrategy, -} from '@angular/core'; -import { Session } from '@service/session'; -import { Ilc, IlcInterface } from '@env/decorators/component'; -import { Initial } from '@env/decorators/initial'; -import { ChangesDetector } from '@ui/env/extentions/changes'; -import { CommentDefinition, Response } from '@platform/types/comment'; -import { CShortColors, shadeColor } from '@ui/styles/colors'; -import { Subject } from '@platform/env/subscription'; -import { unique } from '@platform/env/sequence'; -import { Owner } from '@schema/content/row'; - -import * as moment from 'moment'; -import * as obj from '@platform/env/obj'; - -@Component({ - selector: 'app-views-comments-item', - templateUrl: './template.html', - styleUrls: ['./styles.less'], - encapsulation: ViewEncapsulation.None, - changeDetection: ChangeDetectionStrategy.OnPush, - standalone: false, -}) -@Initial() -@Ilc() -export class Comment extends ChangesDetector implements AfterContentInit, OnChanges { - @Input() comment!: CommentDefinition; - @Input() session!: Session; - @Input() broadcastEditorUsage!: Subject; - - public colors: string[] = CShortColors.slice(); - public response: Response | undefined; - - protected uuid: string = unique(); - - constructor(cdRef: ChangeDetectorRef) { - super(cdRef); - this.ngOnResponseSave = this.ngOnResponseSave.bind(this); - this.ngOnResponseCancel = this.ngOnResponseCancel.bind(this); - this.ngOnResponseRemove = this.ngOnResponseRemove.bind(this); - } - - public created(): string { - return moment.unix(this.comment.created / 1000).format('MM/DD/YYYY hh:mm:ss'); - } - - public isEditable(): boolean { - return this.session.comments.isEditable(this.comment); - } - - public isResponseEditable(response: Response): boolean { - return ( - this.session.teamwork.user().get() !== undefined && - response.username === this.session.teamwork.user().get() - ); - } - - public ngAfterContentInit() { - this.env().subscriber.register( - this.broadcastEditorUsage.subscribe((uuid: string) => { - if (uuid === this.uuid) { - return; - } - this.response = undefined; - this.detectChanges(); - }), - ); - } - - public ngOnEdit() { - if (!this.isEditable()) { - return; - } - this.session.comments.edit(this.comment); - } - - public ngOnShow() { - this.session.cursor.select( - this.comment.selection.start.position, - Owner.Comment, - undefined, - undefined, - ); - } - - public ngOnRemove() { - if (!this.isEditable()) { - return; - } - this.session.comments.remove(this.comment.uuid); - } - - public ngOnChanges(changes: SimpleChanges) { - const change = changes as unknown as { comment: { currentValue: CommentDefinition } }; - if (change.comment === undefined) { - return; - } - this.comment = obj.clone(change.comment.currentValue); - this.detectChanges(); - } - - public ngOnSetColor(color: string | undefined) { - if (!this.isEditable()) { - return; - } - this.comment.color = color; - this.session.comments.update(this.comment); - this.detectChanges(); - } - - public ngOnReplay() { - const username = this.session.teamwork.user().get(); - if (username === undefined) { - return; - } - this.response = { - uuid: '', - username, - created: Date.now(), - modified: Date.now(), - comment: '', - }; - this.broadcastEditorUsage.emit(this.uuid); - this.detectChanges(); - } - - public ngOnResponseSave(comment: string) { - if (this.response === undefined) { - return; - } - if (comment !== '') { - if (this.response.uuid === '') { - this.response.uuid = unique(); - this.response.comment = comment; - this.comment.responses.push(this.response); - } else { - this.comment.responses = this.comment.responses.map((response: Response) => { - if (response.uuid === this.response?.uuid) { - response.modified = Date.now(); - response.comment = comment; - } - return response; - }); - } - this.session.comments.update(this.comment); - } - this.ngOnResponseCancel(); - } - - public ngOnResponseCancel() { - this.response = undefined; - this.detectChanges(); - } - - public ngOnResponseRemove() { - if (this.response === undefined) { - return; - } - if (!this.isResponseEditable(this.response)) { - return; - } - this.comment.responses = this.comment.responses.filter( - (r) => r.uuid !== this.response?.uuid, - ); - this.session.comments.update(this.comment); - this.ngOnResponseCancel(); - } - - public ngGetResponseEditCallback(response: Response) { - return () => { - this.response = Object.assign({}, response); - this.broadcastEditorUsage.emit(this.uuid); - this.detectChanges(); - }; - } - - public ngGetResponseRemoveCallback(uuid: string) { - return () => { - this.comment.responses = this.comment.responses.filter((r) => r.uuid !== uuid); - this.session.comments.update(this.comment); - }; - } - - public ngGetResponseColor(): string | undefined { - return this.comment.color === undefined ? undefined : shadeColor(this.comment.color, -10); - } -} -export interface Comment extends IlcInterface {} diff --git a/application/client/src/app/ui/views/sidebar/comments/comment/styles.less b/application/client/src/app/ui/views/sidebar/comments/comment/styles.less deleted file mode 100644 index 243b65a3b0..0000000000 --- a/application/client/src/app/ui/views/sidebar/comments/comment/styles.less +++ /dev/null @@ -1,64 +0,0 @@ -@import '../../../../styles/variables.less'; - -app-views-comments-item { - display: block; - & div.wrapper { - &.black { - & * { - color: var(--scheme-color-7)!important; - } - .mat-expansion-indicator::after{ - color: var(--scheme-color-7)!important; - } - } - & div.signature { - display: flex; - flex-direction: row; - & p.date { - flex:100%; - text-align: right; - } - } - & mat-card { - margin-top: 8px; - & mat-card-actions { - display: flex; - flex-direction: row; - opacity: 0.001; - justify-content: end; - transition: 250ms ease-in-out all; - & span.small-icon-button { - color: var(--scheme-color-5); - } - } - & mat-expansion-panel { - border-top-left-radius: 0!important; - border-top-right-radius: 0!important; - // margin-bottom: -16px!important; - & .mat-expansion-panel-header { - padding: 0 16px; - } - & .mat-expansion-panel-body { - padding: 0 8px 16px 16px; - } - } - & mat-card-subtitle { - color: var(--scheme-color-5); - & span.position-label:hover { - cursor: pointer; - text-decoration: underline; - } - } - & mat-card-content:hover { - cursor: pointer; - } - } - &:hover { - & mat-card { - & mat-card-actions { - opacity: 1; - } - } - } - } -} diff --git a/application/client/src/app/ui/views/sidebar/comments/comment/template.html b/application/client/src/app/ui/views/sidebar/comments/comment/template.html deleted file mode 100644 index a15883f250..0000000000 --- a/application/client/src/app/ui/views/sidebar/comments/comment/template.html +++ /dev/null @@ -1,98 +0,0 @@ -
- - - {{comment.selection.start.position}} - {{comment.selection.end.position}} -
-

{{comment.username}}

-

{{created()}}

-
-
- {{comment.comment}} - - - - - - - - - - - {{comment.responses.length}} response{{comment.responses.length > 1 ? 's' : ''}} - - - - -
- - - - - - - - - -
- - -
-
-
- -
- -
diff --git a/application/client/src/app/ui/views/sidebar/comments/component.ts b/application/client/src/app/ui/views/sidebar/comments/component.ts deleted file mode 100644 index b05b56c5cb..0000000000 --- a/application/client/src/app/ui/views/sidebar/comments/component.ts +++ /dev/null @@ -1,165 +0,0 @@ -import { - Component, - OnDestroy, - Input, - ChangeDetectorRef, - AfterContentInit, - AfterViewInit, - ViewEncapsulation, -} from '@angular/core'; -import { Session } from '@service/session'; -import { Ilc, IlcInterface } from '@env/decorators/component'; -import { Initial } from '@env/decorators/initial'; -import { ChangesDetector } from '@ui/env/extentions/changes'; -import { CommentDefinition } from '@platform/types/comment'; -import { CShortColors } from '@ui/styles/colors'; -import { Subscriber, Subject } from '@platform/env/subscription'; - -export enum ECommentsOrdering { - position = 'position', - colors = 'colors', -} - -@Component({ - selector: 'app-views-comments', - templateUrl: './template.html', - styleUrls: ['./styles.less'], - encapsulation: ViewEncapsulation.None, - standalone: false, -}) -@Initial() -@Ilc() -export class Comments - extends ChangesDetector - implements OnDestroy, AfterContentInit, AfterViewInit -{ - @Input() session: Session | undefined; - - protected update() { - this.comments = this.origin - .filter((c) => this.filter === undefined || this.filter === c.color) - .map((c) => Object.assign({}, c)); - this.hidden = []; - this.origin - .filter((c) => this.filter !== undefined && this.filter !== c.color) - .map((comment: CommentDefinition) => { - const index: number = this.hidden.findIndex((d) => d.color === comment.color); - if (index === -1) { - this.hidden.push({ count: 1, color: comment.color }); - } else { - this.hidden[index].count += 1; - } - }); - this.detectChanges(); - } - - protected onSessionChange(_uuid: string | undefined) { - this.session = this.ilc().services.system.session.active().session(); - if (this.session !== undefined) { - this.subscriber.unsubscribe(); - this.subscriber.register( - this.session.comments.subjects.get().added.subscribe(this.reload.bind(this)), - this.session.comments.subjects.get().updated.subscribe(this.reload.bind(this)), - this.session.comments.subjects.get().removed.subscribe(this.reload.bind(this)), - this.session.comments.subjects.get().reload.subscribe(this.reload.bind(this)), - ); - } - this.reload(); - } - - protected reload() { - if (this.session === undefined) { - this.origin = []; - this.update(); - return; - } - let comments: CommentDefinition[] = []; - const all: CommentDefinition[] = this.session.comments.getAsArray(); - switch (this.ordring) { - case ECommentsOrdering.colors: - (CShortColors.slice() as Array) - .concat([undefined] as Array) - .forEach((color: string | undefined) => { - const group: CommentDefinition[] = all.filter((c) => c.color === color); - group.sort((a: CommentDefinition, b: CommentDefinition) => { - return a.selection.start.position > b.selection.start.position ? 1 : -1; - }); - comments = comments.concat(group); - }); - break; - case ECommentsOrdering.position: - all.sort((a: CommentDefinition, b: CommentDefinition) => { - return a.selection.start.position > b.selection.start.position ? 1 : -1; - }); - comments = all; - break; - } - this.origin = comments; - this.update(); - } - - protected readonly subscriber: Subscriber = new Subscriber(); - protected filter: string | undefined; - protected origin: CommentDefinition[] = []; - - public comments: CommentDefinition[] = []; - public hidden: { count: number; color: string | undefined }[] = []; - public broadcastEditorUsage: Subject = new Subject(); - public colors: string[] = CShortColors.slice(); - public ordring: ECommentsOrdering = ECommentsOrdering.position; - - constructor(cdRef: ChangeDetectorRef) { - super(cdRef); - } - - public ngOnDestroy() { - this.subscriber.unsubscribe(); - } - - public ngAfterContentInit() { - this.ilc().channel.session.change(this.onSessionChange.bind(this)); - this.onSessionChange(undefined); - this.session !== undefined && - this.subscriber.register( - this.session.teamwork.subjects.get().active.subscribe(() => { - this.detectChanges(); - }), - ); - } - - public ngAfterViewInit() { - this.reload(); - } - - public ngOnSetFilter(color: string | undefined) { - this.filter = color; - this.update(); - } - - public ngOnRemoveAll() { - this.session !== undefined && this.session.comments.clear(); - } - - public ngOnCheckUpdates() { - this.session !== undefined && this.session.teamwork.update(); - } - - public ngOnOrderingSwitch() { - this.ordring = - this.ordring === ECommentsOrdering.colors - ? ECommentsOrdering.position - : ECommentsOrdering.colors; - this.reload(); - } - - public isAvailable(): boolean { - if (this.session === undefined) { - return false; - } - return ( - this.session.teamwork.repo().getActive() !== undefined && - this.session.teamwork.user().get() !== undefined - ); - } -} -export interface Comments extends IlcInterface {} diff --git a/application/client/src/app/ui/views/sidebar/comments/editor/component.ts b/application/client/src/app/ui/views/sidebar/comments/editor/component.ts deleted file mode 100644 index f678162f15..0000000000 --- a/application/client/src/app/ui/views/sidebar/comments/editor/component.ts +++ /dev/null @@ -1,84 +0,0 @@ -import { Component, ChangeDetectorRef, Input, AfterContentInit } from '@angular/core'; -import { ErrorStateMatcher } from '@angular/material/core'; -import { FormControl } from '@angular/forms'; -import { Ilc, IlcInterface } from '@env/decorators/component'; -import { Initial } from '@env/decorators/initial'; -import { ChangesDetector } from '@ui/env/extentions/changes'; -import { Response } from '@platform/types/comment'; - -export class InputErrorStateMatcher implements ErrorStateMatcher { - protected valid: boolean = true; - protected error: string = ''; - - constructor() {} - - public isErrorState(control: FormControl | null): boolean { - if (control === null) { - return false; - } - this.valid = true; - this.error = ''; - if (control.value === null || control.value.trim() === '') { - this.valid = false; - this.error = `Value of comment cannot be empty`; - } - if (control.value !== null && control.value.length > 1024) { - this.valid = false; - this.error = `Maximum length of comment is 1024 chars`; - } - return !this.valid; - } - - public getError(): string | undefined { - return this.error; - } -} - -@Component({ - selector: 'app-views-comments-editor', - templateUrl: './template.html', - styleUrls: ['./styles.less'], - standalone: false, -}) -@Initial() -@Ilc() -export class Editor extends ChangesDetector implements AfterContentInit { - @Input() response!: Response; - @Input() save!: (comment: string) => void; - @Input() remove!: () => void; - @Input() cancel!: () => void; - - public ng_input_error: InputErrorStateMatcher = new InputErrorStateMatcher(); - public ng_response: string = ''; - public ng_mode: 'create' | 'edit' = 'create'; - - constructor(cdRef: ChangeDetectorRef) { - super(cdRef); - } - - public ngAfterContentInit() { - if (this.response.uuid !== '') { - this.ng_response = this.response.comment; - this.ng_mode = 'edit'; - } - } - - public onKeyDown(event: KeyboardEvent) { - if (event.code === 'Enter') { - this.onAccept(); - } - } - - public onAccept() { - this.save(this.ng_response); - } - - public onRemove() { - this.remove(); - } - - public onCancel() { - this.cancel(); - } -} -export interface Editor extends IlcInterface {} diff --git a/application/client/src/app/ui/views/sidebar/comments/editor/styles.less b/application/client/src/app/ui/views/sidebar/comments/editor/styles.less deleted file mode 100644 index 0d627226c0..0000000000 --- a/application/client/src/app/ui/views/sidebar/comments/editor/styles.less +++ /dev/null @@ -1,34 +0,0 @@ -@import '../../../../styles/variables.less'; - - -:host { - position: relative; - display: block; - padding: 0.5rem; - margin: 0; - & div.inputs { - width: 100%; - & mat-form-field { - width: 100%; - } - } - div.controlls { - text-align: right; - padding-top: 8px; - overflow: hidden; - white-space: nowrap; - & button { - margin-left: 16px; - } - } - & mat-hint { - color: var(--scheme-color-2); - white-space: nowrap; - } - & mat-error { - color: var(--scheme-color-warning); - } - & textarea { - color: var(--scheme-color-1); - } -} diff --git a/application/client/src/app/ui/views/sidebar/comments/editor/template.html b/application/client/src/app/ui/views/sidebar/comments/editor/template.html deleted file mode 100644 index 4b24cf44d3..0000000000 --- a/application/client/src/app/ui/views/sidebar/comments/editor/template.html +++ /dev/null @@ -1,29 +0,0 @@ -
- - Leave a comment - - {{ng_input_error.getError()}} - - Don't disclose personal info - - {{message.value.length}} / 1024 - -
-
- - - -
diff --git a/application/client/src/app/ui/views/sidebar/comments/module.ts b/application/client/src/app/ui/views/sidebar/comments/module.ts deleted file mode 100644 index 2e8b76fcca..0000000000 --- a/application/client/src/app/ui/views/sidebar/comments/module.ts +++ /dev/null @@ -1,44 +0,0 @@ -import { NgModule } from '@angular/core'; -import { CommonModule } from '@angular/common'; -import { ScrollingModule } from '@angular/cdk/scrolling'; -import { TeamworkAppletModule } from '@elements/teamwork/module'; - -import { Comments } from './component'; -import { Comment } from './comment/component'; -import { Editor } from './editor/component'; -import { Reply } from './reply/component'; - -import { MatButtonModule } from '@angular/material/button'; -import { MatInputModule } from '@angular/material/input'; -import { MatExpansionModule } from '@angular/material/expansion'; -import { MatFormFieldModule } from '@angular/material/form-field'; -import { MatIconModule } from '@angular/material/icon'; -import { MatCardModule } from '@angular/material/card'; -import { MatMenuModule } from '@angular/material/menu'; -import { MatDividerModule } from '@angular/material/divider'; - -import { FormsModule, ReactiveFormsModule } from '@angular/forms'; - -@NgModule({ - imports: [ - CommonModule, - ScrollingModule, - FormsModule, - ReactiveFormsModule, - MatFormFieldModule, - MatButtonModule, - MatIconModule, - MatInputModule, - MatExpansionModule, - MatCardModule, - MatMenuModule, - MatDividerModule, - TeamworkAppletModule, - ], - declarations: [Comments, Comment, Editor, Reply], - exports: [Comments], - bootstrap: [Comments], -}) -export class CommentsModule { - constructor() {} -} diff --git a/application/client/src/app/ui/views/sidebar/comments/reply/component.ts b/application/client/src/app/ui/views/sidebar/comments/reply/component.ts deleted file mode 100644 index 99514434ec..0000000000 --- a/application/client/src/app/ui/views/sidebar/comments/reply/component.ts +++ /dev/null @@ -1,58 +0,0 @@ -import { - Component, - ChangeDetectorRef, - Input, - OnChanges, - SimpleChanges, - ChangeDetectionStrategy, -} from '@angular/core'; -import { Ilc, IlcInterface } from '@env/decorators/component'; -import { Initial } from '@env/decorators/initial'; -import { ChangesDetector } from '@ui/env/extentions/changes'; -import { Response } from '@platform/types/comment'; - -import * as moment from 'moment'; - -@Component({ - selector: 'app-views-comments-reply', - templateUrl: './template.html', - styleUrls: ['./styles.less'], - changeDetection: ChangeDetectionStrategy.OnPush, - standalone: false, -}) -@Initial() -@Ilc() -export class Reply extends ChangesDetector implements OnChanges { - @Input() response!: Response; - @Input() color!: string | undefined; - @Input() edit!: () => void; - @Input() remove!: () => void; - @Input() icon!: boolean; - @Input() editable!: boolean; - - constructor(private cdRef: ChangeDetectorRef) { - super(cdRef); - } - - public ngOnRemove() { - this.remove(); - } - - public ngOnEdit() { - this.edit(); - } - - public ngOnChanges(changes: SimpleChanges) { - const change = changes as unknown as { response: { currentValue: Response } }; - if (change.response === undefined) { - return; - } - this.response = change.response.currentValue; - this.detectChanges(); - } - - public created(): string { - return moment.unix(this.response.created / 1000).format('MM/DD hh:mm:ss'); - } -} -export interface Reply extends IlcInterface {} diff --git a/application/client/src/app/ui/views/sidebar/comments/reply/styles.less b/application/client/src/app/ui/views/sidebar/comments/reply/styles.less deleted file mode 100644 index 7259fa3616..0000000000 --- a/application/client/src/app/ui/views/sidebar/comments/reply/styles.less +++ /dev/null @@ -1,57 +0,0 @@ -@import '../../../../styles/variables.less'; - - -:host { - display: block; - & div.wrapper { - display: block; - width: 100%; - &.black { - & * { - color: #000000; - } - & .datetime { - color: #444444!important; - } - & .mat-divider { - border-top-color: rgba(0,0,0,0.2); - } - } - & div.title { - display: flex; - flex-direction: row; - & .datetime { - text-align: right; - color: var(--scheme-color-2); - flex: 100%; - } - } - & div.controls { - display: flex; - flex-direction: row; - & span.small-icon-button { - opacity: 0.05; - } - & .filler { - flex: 100%; - } - } - & div.content { - margin-bottom: 12px; - } - - &:hover { - & div.controls { - & span.small-icon-button { - opacity: 1; - } - } - } - } - &:last-child{ - & mat-divider { - display: none; - } - } -} - diff --git a/application/client/src/app/ui/views/sidebar/comments/reply/template.html b/application/client/src/app/ui/views/sidebar/comments/reply/template.html deleted file mode 100644 index 8c55aa833b..0000000000 --- a/application/client/src/app/ui/views/sidebar/comments/reply/template.html +++ /dev/null @@ -1,30 +0,0 @@ -
-
- {{response.username}} - {{created()}} -
-
{{response.comment}}
-
- - -
- -
- - - - - - diff --git a/application/client/src/app/ui/views/sidebar/comments/styles.less b/application/client/src/app/ui/views/sidebar/comments/styles.less deleted file mode 100644 index 370da793fd..0000000000 --- a/application/client/src/app/ui/views/sidebar/comments/styles.less +++ /dev/null @@ -1,90 +0,0 @@ -@import '../../../styles/variables.less'; - - -app-views-comments { - position: absolute; - display: block; - padding: 0; - margin: 0; - bottom: 0.5rem; - right: 0.5rem; - left: 0.5rem; - top: 0.5rem; - overflow: hidden; - & > div.caption { - position: sticky !important; - top: 0; - left: 0; - z-index: 1; - background: var(--scheme-color-5); - display: flex; - padding: 0 22px; - margin: 0; - text-align: left; - align-items: center; - white-space: nowrap; - font-size: 0.9rem; - font-weight: 400; - span.title{ - color: var(--scheme-color-2); - } - span.subtitle{ - padding-left: 6px; - color: var(--scheme-color-3); - } - & span.filler { - flex: auto; - } - - } - & .comments { - position: absolute; - display: block; - top: 32px; - bottom: 0; - width: 100%; - left:0; - overflow-y: auto; - overflow-x: hidden; - } - & .hidden { - margin-top: 8px; - & .hidden-comment-wrapper{ - padding: 8px 18px; - &:first-child{ - margin-top: 8px; - } - &:last-child{ - margin-bottom: 8px; - } - & .hidden-comment{ - display: flex; - align-items: center; - & p { - margin-left: 16px; - margin-top: -2px; - } - & .mdc-fab--mini{ - width: 16px; - height: 16px; - } - } - } - } - p.info { - margin: 16px 24px; - } -} - -.app-views-comments-colors-wrapper { - display: flex; - overflow: hidden; - flex-direction: row; - padding: 4px 8px; - & .mdc-fab--mini { - height: 24px; - width: 24px; - padding: 0; - margin: 4px; - } -} diff --git a/application/client/src/app/ui/views/sidebar/comments/template.html b/application/client/src/app/ui/views/sidebar/comments/template.html deleted file mode 100644 index 8e7410c6e5..0000000000 --- a/application/client/src/app/ui/views/sidebar/comments/template.html +++ /dev/null @@ -1,97 +0,0 @@ -
- Comments - ({{comments.length}}) - - - - - -
-
- - - - - - -
- - - - - - - - - - -
- - -
-
diff --git a/application/client/src/app/ui/views/sidebar/module.ts b/application/client/src/app/ui/views/sidebar/module.ts deleted file mode 100644 index 33702583a2..0000000000 --- a/application/client/src/app/ui/views/sidebar/module.ts +++ /dev/null @@ -1,22 +0,0 @@ -import { NgModule } from '@angular/core'; -import { CommonModule } from '@angular/common'; -import { FiltersModule } from './search/module'; -import { ObservedModule } from './observe/module'; -import { AttachmentsModule } from './attachments/module'; -import { CommentsModule } from './comments/module'; -import { TeamWorkModule } from './teamwork/module'; - -@NgModule({ - imports: [ - CommonModule, - FiltersModule, - ObservedModule, - AttachmentsModule, - CommentsModule, - TeamWorkModule, - ], - declarations: [], - exports: [FiltersModule, ObservedModule, AttachmentsModule, CommentsModule, TeamWorkModule], - bootstrap: [], -}) -export class SidebarModule {} diff --git a/application/client/src/app/ui/views/sidebar/observe/common/module.ts b/application/client/src/app/ui/views/sidebar/observe/common/module.ts deleted file mode 100644 index a2f9f3f453..0000000000 --- a/application/client/src/app/ui/views/sidebar/observe/common/module.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { NgModule } from '@angular/core'; -import { CommonModule } from '@angular/common'; -import { Title } from './title/component'; - -@NgModule({ - imports: [CommonModule], - declarations: [Title], - exports: [Title], -}) -export class CommonObserveModule {} diff --git a/application/client/src/app/ui/views/sidebar/observe/common/title/component.ts b/application/client/src/app/ui/views/sidebar/observe/common/title/component.ts deleted file mode 100644 index ec30184e2e..0000000000 --- a/application/client/src/app/ui/views/sidebar/observe/common/title/component.ts +++ /dev/null @@ -1,33 +0,0 @@ -import { Component, Input, Output, EventEmitter } from '@angular/core'; -import { Ilc, IlcInterface } from '@env/decorators/component'; - -export interface IButton { - icon: string; - handler: () => void; -} - -@Component({ - selector: 'app-views-observed-list-title', - templateUrl: './template.html', - styleUrls: ['./styles.less'], - standalone: false, -}) -@Ilc() -export class Title { - @Input() title!: string; - @Input() subtitle: string | undefined; - @Input() buttons: IButton[] = []; - @Input() opened!: boolean; - @Input() hideToggle: boolean | undefined; - @Output() toggled: EventEmitter = new EventEmitter(); - - public click(button: IButton) { - button.handler(); - } - - public toggle() { - this.opened = !this.opened; - this.toggled.emit(this.opened); - } -} -export interface Title extends IlcInterface {} diff --git a/application/client/src/app/ui/views/sidebar/observe/common/title/styles.less b/application/client/src/app/ui/views/sidebar/observe/common/title/styles.less deleted file mode 100644 index fa1135c628..0000000000 --- a/application/client/src/app/ui/views/sidebar/observe/common/title/styles.less +++ /dev/null @@ -1,23 +0,0 @@ -@import '../../../../../styles/variables.less'; - -:host { - position: relative; - display: flex; - padding: 0 24px; - margin: 0; - text-align: left; - align-items: center; - white-space: nowrap; - font-size: 0.9rem; - font-weight: 400; - span.title{ - color: var(--scheme-color-2); - } - span.subtitle{ - padding-left: 6px; - color: var(--scheme-color-3); - } - & span.filler { - flex: auto; - } -} diff --git a/application/client/src/app/ui/views/sidebar/observe/common/title/template.html b/application/client/src/app/ui/views/sidebar/observe/common/title/template.html deleted file mode 100644 index 62d2371e3c..0000000000 --- a/application/client/src/app/ui/views/sidebar/observe/common/title/template.html +++ /dev/null @@ -1,5 +0,0 @@ -{{title}} -({{subtitle}}) - - - diff --git a/application/client/src/app/ui/views/sidebar/observe/component.ts b/application/client/src/app/ui/views/sidebar/observe/component.ts deleted file mode 100644 index b4b874d874..0000000000 --- a/application/client/src/app/ui/views/sidebar/observe/component.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { Component, Input, ChangeDetectorRef, ViewEncapsulation } from '@angular/core'; -import { Session } from '@service/session'; -import { Ilc, IlcInterface } from '@env/decorators/component'; -import { Initial } from '@env/decorators/initial'; -import { ChangesDetector } from '@ui/env/extentions/changes'; - -@Component({ - selector: 'app-views-observe-list', - templateUrl: './template.html', - styleUrls: ['./styles.less'], - encapsulation: ViewEncapsulation.None, - standalone: false, -}) -@Initial() -@Ilc() -export class Observed extends ChangesDetector { - @Input() session!: Session; - - constructor(cdRef: ChangeDetectorRef) { - super(cdRef); - } -} -export interface Observed extends IlcInterface {} diff --git a/application/client/src/app/ui/views/sidebar/observe/element/component.ts b/application/client/src/app/ui/views/sidebar/observe/element/component.ts deleted file mode 100644 index 16207193d0..0000000000 --- a/application/client/src/app/ui/views/sidebar/observe/element/component.ts +++ /dev/null @@ -1,44 +0,0 @@ -import { Component, Input, HostListener } from '@angular/core'; -import { Ilc, IlcInterface } from '@env/decorators/component'; -import { Element } from './element'; - -import * as $ from '@platform/types/observe'; - -@Component({ - selector: 'app-views-observed-list-item', - templateUrl: './template.html', - styleUrls: ['./styles.less'], - standalone: false, -}) -@Ilc() -export class Item { - public readonly Context = $.Origin.Context; - public readonly Source = $.Origin.Stream.Stream.Source; - - @Input() element!: Element; - - @HostListener('click') onClick() { - this.element.select(); - } - - @HostListener('contextmenu', ['$event']) async onContextMenu(event: MouseEvent) { - const items = this.element.provider.contextMenu(this.element.source); - if (items.length > 0) { - items.push({}); - } - items.push({ - caption: 'Reopen in New Tab', - handler: () => { - this.element.provider.openAsNew(this.element.source).catch((err: Error) => { - this.log().error(`Fail to open Source: ${err.message}`); - }); - }, - }); - this.ilc().emitter.ui.contextmenu.open({ - items, - x: event.x, - y: event.y, - }); - } -} -export interface Item extends IlcInterface {} diff --git a/application/client/src/app/ui/views/sidebar/observe/element/element.ts b/application/client/src/app/ui/views/sidebar/observe/element/element.ts deleted file mode 100644 index bb840c3e24..0000000000 --- a/application/client/src/app/ui/views/sidebar/observe/element/element.ts +++ /dev/null @@ -1,42 +0,0 @@ -import { ObserveSource } from '@service/session/dependencies/observing/source'; -import { File } from '@platform/types/files'; -import { Mutable } from '@platform/types/unity/mutable'; -import { Provider } from '@service/session/dependencies/observing/provider'; - -import * as $ from '@platform/types/observe'; - -export class Element { - public readonly source: ObserveSource; - public readonly provider: Provider; - public readonly id: number | undefined; - public readonly file: File | undefined; - public selected: boolean = false; - - constructor(source: ObserveSource, provider: Provider) { - this.source = source; - this.provider = provider; - const session = this.provider.session; - const sourceId = this.source.observe.origin.source(); - this.id = - sourceId !== undefined ? session.stream.observe().descriptions.id(sourceId) : undefined; - this.selected = session.stream.sde.selecting().is(this.source.observe.uuid); - } - - public select(): void { - const sde = this.provider.session.stream.sde; - this.selected = sde.selecting().select(this.source.observe.uuid); - } - - public set(): { file(file: File): Element } { - return { - file: (file: File): Element => { - (this as Mutable).file = file; - return this; - }, - }; - } - - public nature(): $.Origin.Context | $.Origin.Stream.Stream.Source { - return this.source.observe.origin.getNatureAlias(); - } -} diff --git a/application/client/src/app/ui/views/sidebar/observe/element/file/component.ts b/application/client/src/app/ui/views/sidebar/observe/element/file/component.ts deleted file mode 100644 index 9866b90ae6..0000000000 --- a/application/client/src/app/ui/views/sidebar/observe/element/file/component.ts +++ /dev/null @@ -1,55 +0,0 @@ -import { Component, Input, ChangeDetectorRef, ElementRef, AfterContentInit } from '@angular/core'; -import { Ilc, IlcInterface } from '@env/decorators/component'; -import { ChangesDetector } from '@ui/env/extentions/changes'; -import { File } from '@platform/types/files'; -import { Element } from '../element'; -import { Mutable } from '@platform/types/unity/mutable'; -import { stop } from '@ui/env/dom'; - -@Component({ - selector: 'app-views-observed-file', - templateUrl: './template.html', - styleUrls: ['./styles.less'], - standalone: false, -}) -@Ilc() -export class Item extends ChangesDetector implements AfterContentInit { - @Input() element!: Element; - - public readonly file: File | undefined; - - constructor(cdRef: ChangeDetectorRef, private _self: ElementRef) { - super(cdRef); - } - - public ngAfterContentInit(): void { - if (this.element.file === undefined) { - this.log().error(`Field "file" in Element is undefined`); - return; - } - (this as Mutable).file = this.element.file; - } - - public isActive(): boolean { - return this.element.source.observer !== undefined; - } - - public openAsNew(event: MouseEvent): void { - stop(event); - this.element.provider.openAsNew(this.element.source).catch((err: Error) => { - this.log().error(`Fail to restart file: ${err.message}`); - }); - } - - public stop(event: MouseEvent): void { - stop(event); - const observer = this.element.source.observer; - if (observer === undefined) { - return; - } - observer.abort().catch((err: Error) => { - this.log().error(`Fail to abort file tailing: ${err.message}`); - }); - } -} -export interface Item extends IlcInterface {} diff --git a/application/client/src/app/ui/views/sidebar/observe/element/file/styles.less b/application/client/src/app/ui/views/sidebar/observe/element/file/styles.less deleted file mode 100644 index fa223d7b34..0000000000 --- a/application/client/src/app/ui/views/sidebar/observe/element/file/styles.less +++ /dev/null @@ -1,51 +0,0 @@ -@import '../../../../../styles/variables.less'; - -:host { - position: relative; - display: flex; - padding: 0; - margin: 0; - flex-direction: row; - align-items: center; - width: 100%; - height: 32px; - overflow: hidden; - & span.ext { - display: block; - position: relative; - font-size: 14px; - height: 18px; - line-height: 14px; - font-weight: 700; - margin-right: 12px; - margin-left: 6px; - color: var(--scheme-color-3); - &.active { - color: var(--scheme-color-accent); - } - } - & div.info { - overflow: hidden; - flex: auto; - text-align: left; - & span { - display: block; - position: relative; - overflow: hidden; - text-overflow: ellipsis; - direction: rtl; - line-height: 0.9rem; - white-space: nowrap; - } - & span.name { - color: var(--scheme-color-1); - margin-bottom: 3px; - } - & span.path { - color: var(--scheme-color-3); - } - } - & div.controlls { - margin: 0 24px 0 12px; - } -} diff --git a/application/client/src/app/ui/views/sidebar/observe/element/file/template.html b/application/client/src/app/ui/views/sidebar/observe/element/file/template.html deleted file mode 100644 index c45d03c0c1..0000000000 --- a/application/client/src/app/ui/views/sidebar/observe/element/file/template.html +++ /dev/null @@ -1,14 +0,0 @@ - - No data about file - - - {{file.ext}} -
- {{file.name}} - {{file.path}} -
-
- - -
-
diff --git a/application/client/src/app/ui/views/sidebar/observe/element/module.ts b/application/client/src/app/ui/views/sidebar/observe/element/module.ts deleted file mode 100644 index 9741b26fcd..0000000000 --- a/application/client/src/app/ui/views/sidebar/observe/element/module.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { NgModule } from '@angular/core'; -import { CommonModule } from '@angular/common'; -import { Item } from './component'; -import { Item as FileItem } from './file/component'; -import { Item as ProcessItem } from './process/component'; -import { Item as SerialItem } from './serial/component'; -import { Item as TCPItem } from './tcp/component'; -import { Item as UDPItem } from './udp/component'; -import { Signature } from './signature/component'; - -@NgModule({ - imports: [CommonModule], - declarations: [Item, FileItem, ProcessItem, SerialItem, TCPItem, UDPItem, Signature], - exports: [Item], -}) -export class ElementModule {} diff --git a/application/client/src/app/ui/views/sidebar/observe/element/process/component.ts b/application/client/src/app/ui/views/sidebar/observe/element/process/component.ts deleted file mode 100644 index 1402a070f2..0000000000 --- a/application/client/src/app/ui/views/sidebar/observe/element/process/component.ts +++ /dev/null @@ -1,61 +0,0 @@ -import { Component, Input, ChangeDetectorRef, ElementRef, AfterContentInit } from '@angular/core'; -import { Ilc, IlcInterface } from '@env/decorators/component'; -import { ChangesDetector } from '@ui/env/extentions/changes'; -import { Element } from '../element'; -import { Mutable } from '@platform/types/unity/mutable'; -import { stop } from '@ui/env/dom'; - -import * as $ from '@platform/types/observe'; - -@Component({ - selector: 'app-views-observed-process', - templateUrl: './template.html', - styleUrls: ['./styles.less'], - standalone: false, -}) -@Ilc() -export class Item extends ChangesDetector implements AfterContentInit { - @Input() element!: Element; - - public readonly connection: $.Origin.Stream.Stream.Process.IConfiguration | undefined; - public readonly selected!: boolean; - - constructor(cdRef: ChangeDetectorRef, private _self: ElementRef) { - super(cdRef); - } - - public ngAfterContentInit(): void { - const conf = - this.element.source.observe.origin.as<$.Origin.Stream.Stream.Process.Configuration>( - $.Origin.Stream.Stream.Process.Configuration, - ); - if (conf === undefined) { - this.log().error(`Expected origin Source would be Process`); - return; - } - (this as Mutable).connection = conf.configuration; - } - - public isActive(): boolean { - return this.element.source.observer !== undefined; - } - - public restart(event: MouseEvent): void { - stop(event); - this.element.provider.clone(this.element.source.observe).catch((err: Error) => { - this.log().error(`Fail to restart process: ${err.message}`); - }); - } - - public stop(event: MouseEvent): void { - stop(event); - const observer = this.element.source.observer; - if (observer === undefined) { - return; - } - observer.abort().catch((err: Error) => { - this.log().error(`Fail to abort process: ${err.message}`); - }); - } -} -export interface Item extends IlcInterface {} diff --git a/application/client/src/app/ui/views/sidebar/observe/element/process/styles.less b/application/client/src/app/ui/views/sidebar/observe/element/process/styles.less deleted file mode 100644 index 404ed07c50..0000000000 --- a/application/client/src/app/ui/views/sidebar/observe/element/process/styles.less +++ /dev/null @@ -1,51 +0,0 @@ -@import '../../../../../styles/variables.less'; - -:host { - position: relative; - display: flex; - padding: 0; - margin: 0; - flex-direction: row; - align-items: center; - width: 100%; - height: 32px; - overflow: hidden; - & span.ext { - display: block; - position: relative; - margin-right: 12px; - margin-left: 6px; - line-height: 10px; - & span.codicon { - color: var(--scheme-color-3); - font-weight: 700; - &.active { - color: var(--scheme-color-accent); - } - } - } - & div.info { - overflow: hidden; - flex: auto; - text-align: left; - & span { - display: block; - position: relative; - overflow: hidden; - text-overflow: ellipsis; - direction: rtl; - line-height: 0.9rem; - white-space: nowrap; - } - & span.name { - color: var(--scheme-color-1); - margin-bottom: 3px; - } - & span.path { - color: var(--scheme-color-3); - } - } - & div.controlls { - margin: 0 24px 0 12px; - } -} diff --git a/application/client/src/app/ui/views/sidebar/observe/element/process/template.html b/application/client/src/app/ui/views/sidebar/observe/element/process/template.html deleted file mode 100644 index 5b9f49cce3..0000000000 --- a/application/client/src/app/ui/views/sidebar/observe/element/process/template.html +++ /dev/null @@ -1,16 +0,0 @@ - - No data about process - - - - - -
- {{connection.command}} - {{connection.cwd}} -
-
- - -
-
diff --git a/application/client/src/app/ui/views/sidebar/observe/element/serial/component.ts b/application/client/src/app/ui/views/sidebar/observe/element/serial/component.ts deleted file mode 100644 index 36caabd1d7..0000000000 --- a/application/client/src/app/ui/views/sidebar/observe/element/serial/component.ts +++ /dev/null @@ -1,60 +0,0 @@ -import { Component, Input, ChangeDetectorRef, ElementRef, AfterContentInit } from '@angular/core'; -import { Ilc, IlcInterface } from '@env/decorators/component'; -import { ChangesDetector } from '@ui/env/extentions/changes'; -import { Element } from '../element'; -import { Mutable } from '@platform/types/unity/mutable'; -import { stop } from '@ui/env/dom'; - -import * as $ from '@platform/types/observe'; - -@Component({ - selector: 'app-views-observed-serial', - templateUrl: './template.html', - styleUrls: ['./styles.less'], - standalone: false, -}) -@Ilc() -export class Item extends ChangesDetector implements AfterContentInit { - @Input() element!: Element; - - public readonly connection: $.Origin.Stream.Stream.Serial.IConfiguration | undefined; - - constructor(cdRef: ChangeDetectorRef, private _self: ElementRef) { - super(cdRef); - } - - public ngAfterContentInit(): void { - const conf = - this.element.source.observe.origin.as<$.Origin.Stream.Stream.Serial.Configuration>( - $.Origin.Stream.Stream.Serial.Configuration, - ); - if (conf === undefined) { - this.log().error(`Expected origin Source would be TCP`); - return; - } - (this as Mutable).connection = conf.configuration; - } - - public isActive(): boolean { - return this.element.source.observer !== undefined; - } - - public restart(event: MouseEvent): void { - stop(event); - this.element.provider.clone(this.element.source.observe).catch((err: Error) => { - this.log().error(`Fail to restart Serial connection: ${err.message}`); - }); - } - - public stop(event: MouseEvent): void { - stop(event); - const observer = this.element.source.observer; - if (observer === undefined) { - return; - } - observer.abort().catch((err: Error) => { - this.log().error(`Fail to abort Serial connection: ${err.message}`); - }); - } -} -export interface Item extends IlcInterface {} diff --git a/application/client/src/app/ui/views/sidebar/observe/element/serial/styles.less b/application/client/src/app/ui/views/sidebar/observe/element/serial/styles.less deleted file mode 100644 index 404ed07c50..0000000000 --- a/application/client/src/app/ui/views/sidebar/observe/element/serial/styles.less +++ /dev/null @@ -1,51 +0,0 @@ -@import '../../../../../styles/variables.less'; - -:host { - position: relative; - display: flex; - padding: 0; - margin: 0; - flex-direction: row; - align-items: center; - width: 100%; - height: 32px; - overflow: hidden; - & span.ext { - display: block; - position: relative; - margin-right: 12px; - margin-left: 6px; - line-height: 10px; - & span.codicon { - color: var(--scheme-color-3); - font-weight: 700; - &.active { - color: var(--scheme-color-accent); - } - } - } - & div.info { - overflow: hidden; - flex: auto; - text-align: left; - & span { - display: block; - position: relative; - overflow: hidden; - text-overflow: ellipsis; - direction: rtl; - line-height: 0.9rem; - white-space: nowrap; - } - & span.name { - color: var(--scheme-color-1); - margin-bottom: 3px; - } - & span.path { - color: var(--scheme-color-3); - } - } - & div.controlls { - margin: 0 24px 0 12px; - } -} diff --git a/application/client/src/app/ui/views/sidebar/observe/element/serial/template.html b/application/client/src/app/ui/views/sidebar/observe/element/serial/template.html deleted file mode 100644 index 276c1b3d0d..0000000000 --- a/application/client/src/app/ui/views/sidebar/observe/element/serial/template.html +++ /dev/null @@ -1,16 +0,0 @@ - - No data about serial connection - - - - - -
- {{connection.path}} - boud rate: {{connection.baud_rate.toString()}} -
-
- - -
-
diff --git a/application/client/src/app/ui/views/sidebar/observe/element/signature/component.ts b/application/client/src/app/ui/views/sidebar/observe/element/signature/component.ts deleted file mode 100644 index 5ba82829e5..0000000000 --- a/application/client/src/app/ui/views/sidebar/observe/element/signature/component.ts +++ /dev/null @@ -1,36 +0,0 @@ -import { Component, Input, ChangeDetectorRef, ElementRef, AfterContentInit } from '@angular/core'; -import { Ilc, IlcInterface } from '@env/decorators/component'; -import { ChangesDetector } from '@ui/env/extentions/changes'; -import { getSourceColor } from '@ui/styles/colors'; -import { Element } from '../element'; - -@Component({ - selector: 'app-views-observed-list-item-signature', - templateUrl: './template.html', - styleUrls: ['./styles.less'], - standalone: false, -}) -@Ilc() -export class Signature extends ChangesDetector implements AfterContentInit { - @Input() element!: Element; - @Input() id!: number | undefined; - - public selected!: boolean; - - constructor(cdRef: ChangeDetectorRef, private _self: ElementRef) { - super(cdRef); - } - - public ngAfterContentInit(): void { - this.selected = this.element.selected; - } - - public getSourceMarkerStyles(): { [key: string]: string } { - return this.id === undefined - ? {} - : { - background: getSourceColor(this.id), - }; - } -} -export interface List extends IlcInterface {} diff --git a/application/client/src/app/ui/views/sidebar/observe/element/signature/styles.less b/application/client/src/app/ui/views/sidebar/observe/element/signature/styles.less deleted file mode 100644 index d377d303dc..0000000000 --- a/application/client/src/app/ui/views/sidebar/observe/element/signature/styles.less +++ /dev/null @@ -1,26 +0,0 @@ -@import '../../../../../styles/variables.less'; - -:host { - position: relative; - display: block; - padding: 0; - margin: 0 6px 0 0 ; - height: 32px; - & span.color { - position: relative; - display: inline-block; - width: 4px; - height: 100%; - } - & span.selected { - position: absolute; - display: block; - width: 8px; - height: 8px; - border-radius: 4px; - top: 50%; - margin-top: -4px; - left: -17px; - background-color: var(--scheme-color-accent); - } -} diff --git a/application/client/src/app/ui/views/sidebar/observe/element/signature/template.html b/application/client/src/app/ui/views/sidebar/observe/element/signature/template.html deleted file mode 100644 index 99e32df210..0000000000 --- a/application/client/src/app/ui/views/sidebar/observe/element/signature/template.html +++ /dev/null @@ -1,2 +0,0 @@ - - \ No newline at end of file diff --git a/application/client/src/app/ui/views/sidebar/observe/element/styles.less b/application/client/src/app/ui/views/sidebar/observe/element/styles.less deleted file mode 100644 index 77d20f99e9..0000000000 --- a/application/client/src/app/ui/views/sidebar/observe/element/styles.less +++ /dev/null @@ -1,18 +0,0 @@ -@import '../../../../styles/variables.less'; - -:host { - position: relative; - display: flex; - padding: 0; - margin: 0; - flex-direction: row; - align-items: center; - width: ~"calc(100% - 24px)"; - height: 32px; - overflow: hidden; - padding: 3px 24px; - cursor: default; - &:hover { - background: var(--scheme-color-5); - } -} diff --git a/application/client/src/app/ui/views/sidebar/observe/element/tcp/component.ts b/application/client/src/app/ui/views/sidebar/observe/element/tcp/component.ts deleted file mode 100644 index 5c9d951056..0000000000 --- a/application/client/src/app/ui/views/sidebar/observe/element/tcp/component.ts +++ /dev/null @@ -1,60 +0,0 @@ -import { Component, Input, ChangeDetectorRef, ElementRef, AfterContentInit } from '@angular/core'; -import { Ilc, IlcInterface } from '@env/decorators/component'; -import { ChangesDetector } from '@ui/env/extentions/changes'; -import { Element } from '../element'; -import { Mutable } from '@platform/types/unity/mutable'; -import { stop } from '@ui/env/dom'; - -import * as $ from '@platform/types/observe'; - -@Component({ - selector: 'app-views-observed-tcp', - templateUrl: './template.html', - styleUrls: ['./styles.less'], - standalone: false, -}) -@Ilc() -export class Item extends ChangesDetector implements AfterContentInit { - @Input() element!: Element; - - public readonly connection: $.Origin.Stream.Stream.TCP.IConfiguration | undefined; - - constructor(cdRef: ChangeDetectorRef, private _self: ElementRef) { - super(cdRef); - } - - public ngAfterContentInit(): void { - const conf = - this.element.source.observe.origin.as<$.Origin.Stream.Stream.TCP.Configuration>( - $.Origin.Stream.Stream.TCP.Configuration, - ); - if (conf === undefined) { - this.log().error(`Expected origin Source would be TCP`); - return; - } - (this as Mutable).connection = conf.configuration; - } - - public isActive(): boolean { - return this.element.source.observer !== undefined; - } - - public restart(event: MouseEvent): void { - stop(event); - this.element.provider.clone(this.element.source.observe).catch((err: Error) => { - this.log().error(`Fail to restart TCP connection: ${err.message}`); - }); - } - - public stop(event: MouseEvent): void { - stop(event); - const observer = this.element.source.observer; - if (observer === undefined) { - return; - } - observer.abort().catch((err: Error) => { - this.log().error(`Fail to abort TCP connection: ${err.message}`); - }); - } -} -export interface Item extends IlcInterface {} diff --git a/application/client/src/app/ui/views/sidebar/observe/element/tcp/styles.less b/application/client/src/app/ui/views/sidebar/observe/element/tcp/styles.less deleted file mode 100644 index fa223d7b34..0000000000 --- a/application/client/src/app/ui/views/sidebar/observe/element/tcp/styles.less +++ /dev/null @@ -1,51 +0,0 @@ -@import '../../../../../styles/variables.less'; - -:host { - position: relative; - display: flex; - padding: 0; - margin: 0; - flex-direction: row; - align-items: center; - width: 100%; - height: 32px; - overflow: hidden; - & span.ext { - display: block; - position: relative; - font-size: 14px; - height: 18px; - line-height: 14px; - font-weight: 700; - margin-right: 12px; - margin-left: 6px; - color: var(--scheme-color-3); - &.active { - color: var(--scheme-color-accent); - } - } - & div.info { - overflow: hidden; - flex: auto; - text-align: left; - & span { - display: block; - position: relative; - overflow: hidden; - text-overflow: ellipsis; - direction: rtl; - line-height: 0.9rem; - white-space: nowrap; - } - & span.name { - color: var(--scheme-color-1); - margin-bottom: 3px; - } - & span.path { - color: var(--scheme-color-3); - } - } - & div.controlls { - margin: 0 24px 0 12px; - } -} diff --git a/application/client/src/app/ui/views/sidebar/observe/element/tcp/template.html b/application/client/src/app/ui/views/sidebar/observe/element/tcp/template.html deleted file mode 100644 index 64f1441f91..0000000000 --- a/application/client/src/app/ui/views/sidebar/observe/element/tcp/template.html +++ /dev/null @@ -1,13 +0,0 @@ - - No data about TCP connection - - - TCP -
- {{connection.bind_addr}} -
-
- - -
-
diff --git a/application/client/src/app/ui/views/sidebar/observe/element/template.html b/application/client/src/app/ui/views/sidebar/observe/element/template.html deleted file mode 100644 index d12c7bdce8..0000000000 --- a/application/client/src/app/ui/views/sidebar/observe/element/template.html +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/application/client/src/app/ui/views/sidebar/observe/element/udp/component.ts b/application/client/src/app/ui/views/sidebar/observe/element/udp/component.ts deleted file mode 100644 index 15a56bc047..0000000000 --- a/application/client/src/app/ui/views/sidebar/observe/element/udp/component.ts +++ /dev/null @@ -1,60 +0,0 @@ -import { Component, Input, ChangeDetectorRef, ElementRef, AfterContentInit } from '@angular/core'; -import { Ilc, IlcInterface } from '@env/decorators/component'; -import { ChangesDetector } from '@ui/env/extentions/changes'; -import { Element } from '../element'; -import { Mutable } from '@platform/types/unity/mutable'; -import { stop } from '@ui/env/dom'; - -import * as $ from '@platform/types/observe'; - -@Component({ - selector: 'app-views-observed-udp', - templateUrl: './template.html', - styleUrls: ['./styles.less'], - standalone: false, -}) -@Ilc() -export class Item extends ChangesDetector implements AfterContentInit { - @Input() element!: Element; - - public readonly connection: $.Origin.Stream.Stream.UDP.IConfiguration | undefined; - - constructor(cdRef: ChangeDetectorRef, private _self: ElementRef) { - super(cdRef); - } - - public ngAfterContentInit(): void { - const conf = - this.element.source.observe.origin.as<$.Origin.Stream.Stream.UDP.Configuration>( - $.Origin.Stream.Stream.UDP.Configuration, - ); - if (conf === undefined) { - this.log().error(`Expected origin Source would be UDP`); - return; - } - (this as Mutable).connection = conf.configuration; - } - - public isActive(): boolean { - return this.element.source.observer !== undefined; - } - - public restart(event: MouseEvent): void { - stop(event); - this.element.provider.clone(this.element.source.observe).catch((err: Error) => { - this.log().error(`Fail to restart UDP connection: ${err.message}`); - }); - } - - public stop(event: MouseEvent): void { - stop(event); - const observer = this.element.source.observer; - if (observer === undefined) { - return; - } - observer.abort().catch((err: Error) => { - this.log().error(`Fail to abort UDP connection: ${err.message}`); - }); - } -} -export interface Item extends IlcInterface {} diff --git a/application/client/src/app/ui/views/sidebar/observe/element/udp/styles.less b/application/client/src/app/ui/views/sidebar/observe/element/udp/styles.less deleted file mode 100644 index ab053647ac..0000000000 --- a/application/client/src/app/ui/views/sidebar/observe/element/udp/styles.less +++ /dev/null @@ -1,51 +0,0 @@ -@import '../../../../../styles/variables.less'; - -:host { - position: relative; - display: flex; - padding: 0; - margin: 0; - flex-direction: row; - align-items: center; - width: 100%; - height: 32px; - overflow: hidden; - & span.ext { - display: block; - position: relative; - margin-left: 6px; - font-size: 14px; - height: 18px; - line-height: 14px; - font-weight: 700; - margin-right: 12px; - color: var(--scheme-color-3); - &.active { - color: var(--scheme-color-accent); - } - } - & div.info { - overflow: hidden; - flex: auto; - text-align: left; - & span { - display: block; - position: relative; - overflow: hidden; - text-overflow: ellipsis; - direction: rtl; - line-height: 0.9rem; - white-space: nowrap; - } - & span.name { - color: var(--scheme-color-1); - margin-bottom: 3px; - } - & span.path { - color: var(--scheme-color-3); - } - } - & div.controlls { - margin: 0 24px 0 12px; - } -} diff --git a/application/client/src/app/ui/views/sidebar/observe/element/udp/template.html b/application/client/src/app/ui/views/sidebar/observe/element/udp/template.html deleted file mode 100644 index ace0ad5458..0000000000 --- a/application/client/src/app/ui/views/sidebar/observe/element/udp/template.html +++ /dev/null @@ -1,14 +0,0 @@ - - No data about UDP connection - - - UDP -
- {{connection.bind_addr}} - {{connection.multicast[0].multiaddr}} -
-
- - -
-
diff --git a/application/client/src/app/ui/views/sidebar/observe/lists/component.ts b/application/client/src/app/ui/views/sidebar/observe/lists/component.ts deleted file mode 100644 index c85f754be9..0000000000 --- a/application/client/src/app/ui/views/sidebar/observe/lists/component.ts +++ /dev/null @@ -1,40 +0,0 @@ -import { - Component, - Input, - OnDestroy, - Inject, - AfterContentInit, - ChangeDetectorRef, -} from '@angular/core'; -import { Provider as ProviderBase } from '@service/session/dependencies/observing/provider'; -import { Mutable } from '@platform/types/unity/mutable'; -import { Base } from '../states/state'; -import { ChangesDetector } from '@ui/env/extentions/changes'; - -@Component({ - selector: 'app-observe-list-base', - template: '', - standalone: false, -}) -export class ListBase - extends ChangesDetector - implements OnDestroy, AfterContentInit -{ - public readonly state!: State; - - @Input() public provider!: Provider; - - constructor(@Inject('defaults') protected readonly defaults: State, cdRef: ChangeDetectorRef) { - super(cdRef); - } - - public ngAfterContentInit(): void { - const state = this.provider.session.storage.get(this.defaults.key()); - (this as Mutable>).state = - state === undefined ? this.defaults : state; - } - - public ngOnDestroy(): void { - this.provider.session.storage.set(this.defaults.key(), this.state); - } -} diff --git a/application/client/src/app/ui/views/sidebar/observe/lists/file/component.ts b/application/client/src/app/ui/views/sidebar/observe/lists/file/component.ts deleted file mode 100644 index a5ee4b3979..0000000000 --- a/application/client/src/app/ui/views/sidebar/observe/lists/file/component.ts +++ /dev/null @@ -1,163 +0,0 @@ -import { Component, ChangeDetectorRef, AfterContentInit } from '@angular/core'; -import { Ilc, IlcInterface } from '@env/decorators/component'; -import { Element } from '../../element/element'; -import { File } from '@platform/types/files'; -import { State } from '../../states/files'; -import { IButton } from '../../common/title/component'; -import { ListBase } from '../component'; -import { Provider } from '@service/session/dependencies/observing/implementations/files'; -import { ObserveSource } from '@service/session/dependencies/observing/source'; - -import * as $ from '@platform/types/observe'; -import * as Factory from '@platform/types/observe/factory'; - -@Component({ - selector: 'app-views-observed-list-file', - templateUrl: './template.html', - styleUrls: ['./styles.less'], - standalone: false, -}) -@Ilc() -export class List extends ListBase implements AfterContentInit { - public tailing: Element[] = []; - public offline: Element[] = []; - public buttons: IButton[] = [ - { - icon: 'codicon-tasklist', - handler: () => { - this.provider.recent(); - }, - }, - ]; - public warning: string | undefined = undefined; - - protected inited: boolean = false; - - constructor(cdRef: ChangeDetectorRef) { - super(new State(), cdRef); - } - - public override ngAfterContentInit(): void { - super.ngAfterContentInit(); - this.update(); - this.env().subscriber.register( - this.provider.subjects.get().updated.subscribe(() => { - this.update().detectChanges(); - }), - ); - } - - protected update(): List { - const filterFileNature = (s: ObserveSource): boolean => { - return s.observe.origin.nature().alias() === $.Origin.Context.File; - }; - const filterAsFile = (s: ObserveSource): $.Origin.File.Configuration => { - return s.observe.origin.as<$.Origin.File.Configuration>( - $.Origin.File.Configuration, - ) as $.Origin.File.Configuration; - }; - const asFileInstance = (s: ObserveSource): $.Origin.File.Configuration => { - return s.observe.origin.as<$.Origin.File.Configuration>( - $.Origin.File.Configuration, - ) as $.Origin.File.Configuration; - }; - const tailing = this.provider - .sources() - .filter((s) => s.observer !== undefined) - .filter(filterFileNature); - const offline = this.provider - .sources() - .filter((s) => s.observer === undefined) - .filter(filterFileNature); - const attachNewSourceErr = this.provider.getNewSourceError(); - this.warning = attachNewSourceErr instanceof Error ? attachNewSourceErr.message : undefined; - this.ilc() - .services.system.bridge.files() - .getByPathWithCache([ - ...tailing.map(filterAsFile).map((i) => i.filename()), - ...offline.map(filterAsFile).map((i) => i.filename()), - ]) - .then((files: File[]) => { - this.tailing = tailing - .map((s) => { - const filename = asFileInstance(s).filename(); - const file = files.find((f) => f.filename === filename); - if (file === undefined) { - this.log().error( - `Fail to find a file ${filename} in cache; or get file metadata`, - ); - } - return file === undefined - ? null - : new Element(s, this.provider).set().file(file); - }) - .filter((i) => i !== null) as Element[]; - this.offline = offline - .map((s) => { - const filename = asFileInstance(s).filename(); - const file = files.find((f) => f.filename === filename); - if (file === undefined) { - this.log().error( - `Fail to find a file ${filename} in cache; or get file metadata`, - ); - } - return file === undefined - ? null - : new Element(s, this.provider).set().file(file); - }) - .filter((i) => i !== null) as Element[]; - }) - .catch((err: Error) => { - this.log().error(`Fail load stat of files: ${err.message}`); - }) - .finally(() => { - this.detectChanges(); - }); - return this; - } - - public toggled(opened: boolean) { - this.state.toggleQuickSetup(opened); - } - - public attach() { - const last = this.provider.last(); - if (last === undefined) { - return; - } - const lastFile = last.origin.as<$.Origin.File.Configuration>($.Origin.File.Configuration); - if (lastFile === undefined) { - return; - } - this.ilc() - .services.system.bridge.files() - .select.any() - .then((files: File[]) => { - if (files.length === 0) { - return; - } - this.provider.session.stream - .observe() - .start( - files.length === 1 - ? new Factory.File() - .type(lastFile.configuration[1]) - .file(files[0].filename) - .protocol(last.parser.instance.alias()) - .get() - : new Factory.Concat() - .type(lastFile.configuration[1]) - .files(files.map((f) => f.filename)) - .protocol(last.parser.instance.alias()) - .get(), - ) - .catch((err: Error) => { - this.log().error(`Fail to observe: ${err.message}`); - }); - }) - .catch((err: Error) => { - this.log().error(`Fail to select file(s): ${err.message}`); - }); - } -} -export interface List extends IlcInterface {} diff --git a/application/client/src/app/ui/views/sidebar/observe/lists/file/module.ts b/application/client/src/app/ui/views/sidebar/observe/lists/file/module.ts deleted file mode 100644 index 0965ac7086..0000000000 --- a/application/client/src/app/ui/views/sidebar/observe/lists/file/module.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { NgModule } from '@angular/core'; -import { CommonModule } from '@angular/common'; -import { List } from './component'; -import { ElementModule } from '../../element/module'; -import { CommonObserveModule } from '../../common/module'; -import { MatButtonModule } from '@angular/material/button'; - -@NgModule({ - imports: [CommonModule, ElementModule, CommonObserveModule, MatButtonModule], - declarations: [List], - exports: [List], -}) -export class ListModule {} diff --git a/application/client/src/app/ui/views/sidebar/observe/lists/file/styles.less b/application/client/src/app/ui/views/sidebar/observe/lists/file/styles.less deleted file mode 100644 index b4d727cfca..0000000000 --- a/application/client/src/app/ui/views/sidebar/observe/lists/file/styles.less +++ /dev/null @@ -1,23 +0,0 @@ -@import '../../../../../styles/variables.less'; - -:host { - position: relative; - display: block; - padding: 0; - margin: 0; - p.subtitle{ - color: var(--scheme-color-3); - text-align: right; - } - div.quicksetup { - padding: 0 24px 24px 24px; - } - div.controlls{ - text-align: right; - } - & button { - position: relative; - display: inline-block; - margin: 6px 0 6px 6px; - } -} diff --git a/application/client/src/app/ui/views/sidebar/observe/lists/file/template.html b/application/client/src/app/ui/views/sidebar/observe/lists/file/template.html deleted file mode 100644 index 898c3a222c..0000000000 --- a/application/client/src/app/ui/views/sidebar/observe/lists/file/template.html +++ /dev/null @@ -1,15 +0,0 @@ - -
-

{{warning}}

-
- -
-
-
- - -
-
- - -
\ No newline at end of file diff --git a/application/client/src/app/ui/views/sidebar/observe/lists/process/component.ts b/application/client/src/app/ui/views/sidebar/observe/lists/process/component.ts deleted file mode 100644 index 5a7d337108..0000000000 --- a/application/client/src/app/ui/views/sidebar/observe/lists/process/component.ts +++ /dev/null @@ -1,100 +0,0 @@ -import { Component, ChangeDetectorRef, AfterContentInit, ViewChild } from '@angular/core'; -import { Ilc, IlcInterface } from '@env/decorators/component'; -import { Element } from '../../element/element'; -import { Action } from '@ui/tabs/observe/action'; -import { QuickSetup } from '@tabs/observe/origin/stream/transport/setup/quick/process/component'; -import { IButton } from '../../common/title/component'; -import { State } from '../../states/process'; -import { ListBase } from '../component'; -import { Provider } from '@service/session/dependencies/observing/implementations/processes'; -import { Configuration } from '@platform/types/observe/origin/stream/process'; -import { notifications, Notification } from '@ui/service/notifications'; - -import * as Factroy from '@platform/types/observe/factory'; - -@Component({ - selector: 'app-views-observed-list-process', - templateUrl: './template.html', - styleUrls: ['./styles.less'], - standalone: false, -}) -@Ilc() -export class List extends ListBase implements AfterContentInit { - @ViewChild('quicksetupref') public quickSetupRef!: QuickSetup; - - public tailing: Element[] = []; - public offline: Element[] = []; - public action: Action = new Action(); - public initial: Configuration = new Configuration(Configuration.initial(), undefined); - public buttons: IButton[] = [ - { - icon: 'codicon-tasklist', - handler: () => { - this.provider.recent(); - }, - }, - { - icon: 'codicon-empty-window', - handler: () => { - this.provider.openNewSessionOptions(); - }, - }, - ]; - - constructor(cdRef: ChangeDetectorRef) { - super(new State(), cdRef); - } - - public override ngAfterContentInit(): void { - super.ngAfterContentInit(); - this.update(); - this.env().subscriber.register( - this.provider.subjects.get().updated.subscribe(() => { - this.update().detectChanges(); - }), - ); - this.env().subscriber.register( - this.action.subjects.get().apply.subscribe(() => { - this.provider - .openAsNewOrigin( - new Factroy.Stream().asText().process(this.initial.configuration).get(), - ) - .then(() => { - const cloned = this.initial.sterilized(); - this.action.applied(); - this.initial.overwrite({ - command: '', - cwd: cloned.cwd, - shell: cloned.shell, - }); - }) - .catch((err: Error) => { - notifications.notify( - new Notification({ - message: err.message, - actions: [], - }), - ); - this.log().error(`Fail to apply connection to Process: ${err.message}`); - }); - }), - ); - } - - public toggled(opened: boolean) { - this.state.toggleQuickSetup(opened); - } - - protected update(): List { - this.tailing = this.provider - .sources() - .filter((s) => s.observer !== undefined) - .map((s) => new Element(s, this.provider)); - this.offline = this.provider - .sources() - .filter((s) => s.observer === undefined) - .map((s) => new Element(s, this.provider)); - return this; - } -} -export interface List extends IlcInterface {} diff --git a/application/client/src/app/ui/views/sidebar/observe/lists/process/module.ts b/application/client/src/app/ui/views/sidebar/observe/lists/process/module.ts deleted file mode 100644 index f4020c2c40..0000000000 --- a/application/client/src/app/ui/views/sidebar/observe/lists/process/module.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { NgModule } from '@angular/core'; -import { CommonModule } from '@angular/common'; -import { List } from './component'; -import { ElementModule } from '../../element/module'; -import { CommonObserveModule } from '../../common/module'; -import { QuickSetupModule } from '@ui/tabs/observe/origin/stream/transport/setup/quick/process/module'; - -@NgModule({ - imports: [CommonModule, ElementModule, CommonObserveModule, QuickSetupModule], - declarations: [List], - exports: [List], -}) -export class ListModule {} diff --git a/application/client/src/app/ui/views/sidebar/observe/lists/process/styles.less b/application/client/src/app/ui/views/sidebar/observe/lists/process/styles.less deleted file mode 100644 index c1c9e9f852..0000000000 --- a/application/client/src/app/ui/views/sidebar/observe/lists/process/styles.less +++ /dev/null @@ -1,15 +0,0 @@ -@import '../../../../../styles/variables.less'; - -:host { - position: relative; - display: block; - padding: 0; - margin: 0; - p.subtitle{ - color: var(--scheme-color-3); - text-align: right; - } - div.quicksetup { - padding: 0 24px 24px 24px; - } -} diff --git a/application/client/src/app/ui/views/sidebar/observe/lists/process/template.html b/application/client/src/app/ui/views/sidebar/observe/lists/process/template.html deleted file mode 100644 index d5ba862cce..0000000000 --- a/application/client/src/app/ui/views/sidebar/observe/lists/process/template.html +++ /dev/null @@ -1,12 +0,0 @@ - -
- -
-
- - -
-
- - -
\ No newline at end of file diff --git a/application/client/src/app/ui/views/sidebar/observe/lists/serial/component.ts b/application/client/src/app/ui/views/sidebar/observe/lists/serial/component.ts deleted file mode 100644 index 13b8af7d3b..0000000000 --- a/application/client/src/app/ui/views/sidebar/observe/lists/serial/component.ts +++ /dev/null @@ -1,95 +0,0 @@ -import { Component, ChangeDetectorRef, AfterContentInit, ViewChild } from '@angular/core'; -import { Ilc, IlcInterface } from '@env/decorators/component'; -import { Provider } from '@service/session/dependencies/observing/implementations/serial'; -import { Element } from '../../element/element'; -import { Action } from '@ui/tabs/observe/action'; -import { QuickSetup } from '@tabs/observe/origin/stream/transport/setup/quick/serial/component'; -import { IButton } from '../../common/title/component'; -import { State } from '../../states/serial'; -import { ListBase } from '../component'; -import { Configuration } from '@platform/types/observe/origin/stream/serial'; -import { notifications, Notification } from '@ui/service/notifications'; - -import * as Factroy from '@platform/types/observe/factory'; - -@Component({ - selector: 'app-views-observed-list-serial', - templateUrl: './template.html', - styleUrls: ['./styles.less'], - standalone: false, -}) -@Ilc() -export class List extends ListBase implements AfterContentInit { - @ViewChild('quicksetupref') public quickSetupRef!: QuickSetup; - - public tailing: Element[] = []; - public offline: Element[] = []; - public action: Action = new Action(); - public initial: Configuration = new Configuration(Configuration.initial(), undefined); - public buttons: IButton[] = [ - { - icon: 'codicon-tasklist', - handler: () => { - this.provider.recent(); - }, - }, - { - icon: 'codicon-empty-window', - handler: () => { - // this.provider.openNewSessionOptions(); - }, - }, - ]; - - constructor(cdRef: ChangeDetectorRef) { - super(new State(), cdRef); - } - - public override ngAfterContentInit(): void { - super.ngAfterContentInit(); - this.update(); - this.env().subscriber.register( - this.provider.subjects.get().updated.subscribe(() => { - this.update().detectChanges(); - }), - ); - this.env().subscriber.register( - this.action.subjects.get().apply.subscribe(() => { - this.provider - .openAsNewOrigin( - new Factroy.Stream().asText().serial(this.initial.configuration).get(), - ) - .then(() => { - this.action.applied(); - this.initial.overwrite(Configuration.initial()); - }) - .catch((err: Error) => { - notifications.notify( - new Notification({ - message: err.message, - actions: [], - }), - ); - this.log().error(`Fail to apply connection to Serial: ${err.message}`); - }); - }), - ); - } - - public toggled(opened: boolean) { - this.state.toggleQuickSetup(opened); - } - - protected update(): List { - this.tailing = this.provider - .sources() - .filter((s) => s.observer !== undefined) - .map((s) => new Element(s, this.provider)); - this.offline = this.provider - .sources() - .filter((s) => s.observer === undefined) - .map((s) => new Element(s, this.provider)); - return this; - } -} -export interface List extends IlcInterface {} diff --git a/application/client/src/app/ui/views/sidebar/observe/lists/serial/module.ts b/application/client/src/app/ui/views/sidebar/observe/lists/serial/module.ts deleted file mode 100644 index 8ff83a3eca..0000000000 --- a/application/client/src/app/ui/views/sidebar/observe/lists/serial/module.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { NgModule } from '@angular/core'; -import { CommonModule } from '@angular/common'; -import { List } from './component'; -import { ElementModule } from '../../element/module'; -import { CommonObserveModule } from '../../common/module'; -import { QuickSetupModule } from '@ui/tabs/observe/origin/stream/transport/setup/quick/serial/module'; - -@NgModule({ - imports: [CommonModule, ElementModule, CommonObserveModule, QuickSetupModule], - declarations: [List], - exports: [List], -}) -export class ListModule {} diff --git a/application/client/src/app/ui/views/sidebar/observe/lists/serial/styles.less b/application/client/src/app/ui/views/sidebar/observe/lists/serial/styles.less deleted file mode 100644 index 2a8ccf7f22..0000000000 --- a/application/client/src/app/ui/views/sidebar/observe/lists/serial/styles.less +++ /dev/null @@ -1,12 +0,0 @@ -@import '../../../../../styles/variables.less'; - -:host { - position: relative; - display: block; - padding: 0; - margin: 0; - p.subtitle{ - color: var(--scheme-color-3); - text-align: right; - } -} diff --git a/application/client/src/app/ui/views/sidebar/observe/lists/serial/template.html b/application/client/src/app/ui/views/sidebar/observe/lists/serial/template.html deleted file mode 100644 index 1958a0ea6e..0000000000 --- a/application/client/src/app/ui/views/sidebar/observe/lists/serial/template.html +++ /dev/null @@ -1,12 +0,0 @@ - -
- -
-
- - -
-
- - -
\ No newline at end of file diff --git a/application/client/src/app/ui/views/sidebar/observe/lists/tcp/component.ts b/application/client/src/app/ui/views/sidebar/observe/lists/tcp/component.ts deleted file mode 100644 index ae222ec039..0000000000 --- a/application/client/src/app/ui/views/sidebar/observe/lists/tcp/component.ts +++ /dev/null @@ -1,95 +0,0 @@ -import { Component, ChangeDetectorRef, AfterContentInit, ViewChild } from '@angular/core'; -import { Ilc, IlcInterface } from '@env/decorators/component'; -import { Provider } from '@service/session/dependencies/observing/implementations/tcp'; -import { Element } from '../../element/element'; -import { QuickSetup } from '@tabs/observe/origin/stream/transport/setup/quick/tcp/component'; -import { Action } from '@ui/tabs/observe/action'; -import { IButton } from '../../common/title/component'; -import { State } from '../../states/tcp'; -import { ListBase } from '../component'; -import { Configuration } from '@platform/types/observe/origin/stream/tcp'; -import { notifications, Notification } from '@ui/service/notifications'; - -import * as Factroy from '@platform/types/observe/factory'; - -@Component({ - selector: 'app-views-observed-list-tcp', - templateUrl: './template.html', - styleUrls: ['./styles.less'], - standalone: false, -}) -@Ilc() -export class List extends ListBase implements AfterContentInit { - @ViewChild('quicksetupref') public quickSetupRef!: QuickSetup; - - public tailing: Element[] = []; - public offline: Element[] = []; - public action: Action = new Action(); - public initial: Configuration = new Configuration(Configuration.initial(), undefined); - public buttons: IButton[] = [ - { - icon: 'codicon-tasklist', - handler: () => { - this.provider.recent(); - }, - }, - { - icon: 'codicon-empty-window', - handler: () => { - this.provider.openNewSessionOptions(); - }, - }, - ]; - - constructor(cdRef: ChangeDetectorRef) { - super(new State(), cdRef); - } - - public override ngAfterContentInit(): void { - super.ngAfterContentInit(); - this.update(); - this.env().subscriber.register( - this.provider.subjects.get().updated.subscribe(() => { - this.update().detectChanges(); - }), - ); - this.env().subscriber.register( - this.action.subjects.get().apply.subscribe(() => { - this.provider - .openAsNewOrigin( - new Factroy.Stream().asDlt().tcp(this.initial.configuration).get(), - ) - .then(() => { - this.action.applied(); - this.initial.overwrite(Configuration.initial()); - }) - .catch((err: Error) => { - notifications.notify( - new Notification({ - message: err.message, - actions: [], - }), - ); - this.log().warn(`Fail to apply connection to TCP: ${err.message}`); - }); - }), - ); - } - - public toggled(opened: boolean) { - this.state.toggleQuickSetup(opened); - } - - protected update(): List { - this.tailing = this.provider - .sources() - .filter((s) => s.observer !== undefined) - .map((s) => new Element(s, this.provider)); - this.offline = this.provider - .sources() - .filter((s) => s.observer === undefined) - .map((s) => new Element(s, this.provider)); - return this; - } -} -export interface List extends IlcInterface {} diff --git a/application/client/src/app/ui/views/sidebar/observe/lists/tcp/module.ts b/application/client/src/app/ui/views/sidebar/observe/lists/tcp/module.ts deleted file mode 100644 index 0ed497def2..0000000000 --- a/application/client/src/app/ui/views/sidebar/observe/lists/tcp/module.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { NgModule } from '@angular/core'; -import { CommonModule } from '@angular/common'; -import { List } from './component'; -import { ElementModule } from '../../element/module'; -import { CommonObserveModule } from '../../common/module'; -import { QuickSetupModule } from '@ui/tabs/observe/origin/stream/transport/setup/quick/tcp/module'; - -@NgModule({ - imports: [CommonModule, ElementModule, CommonObserveModule, QuickSetupModule], - declarations: [List], - exports: [List], -}) -export class ListModule {} diff --git a/application/client/src/app/ui/views/sidebar/observe/lists/tcp/styles.less b/application/client/src/app/ui/views/sidebar/observe/lists/tcp/styles.less deleted file mode 100644 index c1c9e9f852..0000000000 --- a/application/client/src/app/ui/views/sidebar/observe/lists/tcp/styles.less +++ /dev/null @@ -1,15 +0,0 @@ -@import '../../../../../styles/variables.less'; - -:host { - position: relative; - display: block; - padding: 0; - margin: 0; - p.subtitle{ - color: var(--scheme-color-3); - text-align: right; - } - div.quicksetup { - padding: 0 24px 24px 24px; - } -} diff --git a/application/client/src/app/ui/views/sidebar/observe/lists/tcp/template.html b/application/client/src/app/ui/views/sidebar/observe/lists/tcp/template.html deleted file mode 100644 index 59fa652d62..0000000000 --- a/application/client/src/app/ui/views/sidebar/observe/lists/tcp/template.html +++ /dev/null @@ -1,12 +0,0 @@ - -
- -
-
- - -
-
- - -
\ No newline at end of file diff --git a/application/client/src/app/ui/views/sidebar/observe/lists/udp/component.ts b/application/client/src/app/ui/views/sidebar/observe/lists/udp/component.ts deleted file mode 100644 index 6c3b3687db..0000000000 --- a/application/client/src/app/ui/views/sidebar/observe/lists/udp/component.ts +++ /dev/null @@ -1,95 +0,0 @@ -import { Component, ChangeDetectorRef, AfterContentInit, ViewChild } from '@angular/core'; -import { Ilc, IlcInterface } from '@env/decorators/component'; -import { Provider } from '@service/session/dependencies/observing/implementations/udp'; -import { Element } from '../../element/element'; -import { QuickSetup } from '@tabs/observe/origin/stream/transport/setup/quick/udp/component'; -import { Action } from '@ui/tabs/observe/action'; -import { IButton } from '../../common/title/component'; -import { State } from '../../states/udp'; -import { ListBase } from '../component'; -import { Configuration } from '@platform/types/observe/origin/stream/udp'; -import { notifications, Notification } from '@ui/service/notifications'; - -import * as Factroy from '@platform/types/observe/factory'; - -@Component({ - selector: 'app-views-observed-list-udp', - templateUrl: './template.html', - styleUrls: ['./styles.less'], - standalone: false, -}) -@Ilc() -export class List extends ListBase implements AfterContentInit { - @ViewChild('quicksetupref') public quickSetupRef!: QuickSetup; - - public tailing: Element[] = []; - public offline: Element[] = []; - public action: Action = new Action(); - public initial: Configuration = new Configuration(Configuration.initial(), undefined); - public buttons: IButton[] = [ - { - icon: 'codicon-tasklist', - handler: () => { - this.provider.recent(); - }, - }, - { - icon: 'codicon-empty-window', - handler: () => { - this.provider.openNewSessionOptions(); - }, - }, - ]; - - constructor(cdRef: ChangeDetectorRef) { - super(new State(), cdRef); - } - - public override ngAfterContentInit(): void { - super.ngAfterContentInit(); - this.update(); - this.env().subscriber.register( - this.provider.subjects.get().updated.subscribe(() => { - this.update().detectChanges(); - }), - ); - this.env().subscriber.register( - this.action.subjects.get().apply.subscribe(() => { - this.provider - .openAsNewOrigin( - new Factroy.Stream().asDlt().udp(this.initial.configuration).get(), - ) - .then(() => { - this.action.applied(); - this.initial.overwrite(Configuration.initial()); - }) - .catch((err: Error) => { - notifications.notify( - new Notification({ - message: err.message, - actions: [], - }), - ); - this.log().error(`Fail to apply connection to UDP: ${err.message}`); - }); - }), - ); - } - - public toggled(opened: boolean) { - this.state.toggleQuickSetup(opened); - } - - protected update(): List { - this.tailing = this.provider - .sources() - .filter((s) => s.observer !== undefined) - .map((s) => new Element(s, this.provider)); - this.offline = this.provider - .sources() - .filter((s) => s.observer === undefined) - .map((s) => new Element(s, this.provider)); - return this; - } -} -export interface List extends IlcInterface {} diff --git a/application/client/src/app/ui/views/sidebar/observe/lists/udp/module.ts b/application/client/src/app/ui/views/sidebar/observe/lists/udp/module.ts deleted file mode 100644 index f1b92a3d71..0000000000 --- a/application/client/src/app/ui/views/sidebar/observe/lists/udp/module.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { NgModule } from '@angular/core'; -import { CommonModule } from '@angular/common'; -import { List } from './component'; -import { ElementModule } from '../../element/module'; -import { CommonObserveModule } from '../../common/module'; -import { QuickSetupModule } from '@ui/tabs/observe/origin/stream/transport/setup/quick/udp/module'; - -@NgModule({ - imports: [CommonModule, ElementModule, CommonObserveModule, QuickSetupModule], - declarations: [List], - exports: [List], -}) -export class ListModule {} diff --git a/application/client/src/app/ui/views/sidebar/observe/lists/udp/styles.less b/application/client/src/app/ui/views/sidebar/observe/lists/udp/styles.less deleted file mode 100644 index c1c9e9f852..0000000000 --- a/application/client/src/app/ui/views/sidebar/observe/lists/udp/styles.less +++ /dev/null @@ -1,15 +0,0 @@ -@import '../../../../../styles/variables.less'; - -:host { - position: relative; - display: block; - padding: 0; - margin: 0; - p.subtitle{ - color: var(--scheme-color-3); - text-align: right; - } - div.quicksetup { - padding: 0 24px 24px 24px; - } -} diff --git a/application/client/src/app/ui/views/sidebar/observe/lists/udp/template.html b/application/client/src/app/ui/views/sidebar/observe/lists/udp/template.html deleted file mode 100644 index 818a546edf..0000000000 --- a/application/client/src/app/ui/views/sidebar/observe/lists/udp/template.html +++ /dev/null @@ -1,12 +0,0 @@ - -
- -
-
- - -
-
- - -
\ No newline at end of file diff --git a/application/client/src/app/ui/views/sidebar/observe/module.ts b/application/client/src/app/ui/views/sidebar/observe/module.ts deleted file mode 100644 index 7631400b7e..0000000000 --- a/application/client/src/app/ui/views/sidebar/observe/module.ts +++ /dev/null @@ -1,39 +0,0 @@ -import { NgModule } from '@angular/core'; -import { CommonModule } from '@angular/common'; -import { ContainersModule } from '@elements/containers/module'; -import { MatButtonModule } from '@angular/material/button'; -import { Observed } from './component'; -import { MatCardModule } from '@angular/material/card'; -import { MatExpansionModule } from '@angular/material/expansion'; -import { MatMenuModule } from '@angular/material/menu'; -import { MatIconModule } from '@angular/material/icon'; -import { MatDividerModule } from '@angular/material/divider'; -import { AttachSourceMenuModule } from '@elements/menu.attachsource/module'; -import { ListModule as FileListModule } from './lists/file/module'; -import { ListModule as ProcessListModule } from './lists/process/module'; -import { ListModule as SerialListModule } from './lists/serial/module'; -import { ListModule as TcpListModule } from './lists/tcp/module'; -import { ListModule as UdpListModule } from './lists/udp/module'; - -@NgModule({ - imports: [ - CommonModule, - ContainersModule, - MatButtonModule, - MatCardModule, - MatExpansionModule, - FileListModule, - ProcessListModule, - SerialListModule, - TcpListModule, - UdpListModule, - MatMenuModule, - MatIconModule, - MatDividerModule, - AttachSourceMenuModule, - ], - declarations: [Observed], - exports: [Observed], - bootstrap: [Observed], -}) -export class ObservedModule {} diff --git a/application/client/src/app/ui/views/sidebar/observe/states/files.ts b/application/client/src/app/ui/views/sidebar/observe/states/files.ts deleted file mode 100644 index 217f0e4c60..0000000000 --- a/application/client/src/app/ui/views/sidebar/observe/states/files.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { Base } from './state'; -import { unique } from '@platform/env/sequence'; - -export const KEY: string = unique(); - -export class State extends Base { - - public key(): string { - return KEY; - } -} diff --git a/application/client/src/app/ui/views/sidebar/observe/states/process.ts b/application/client/src/app/ui/views/sidebar/observe/states/process.ts deleted file mode 100644 index 4210b3fdc7..0000000000 --- a/application/client/src/app/ui/views/sidebar/observe/states/process.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { Base } from './state'; -import { unique } from '@platform/env/sequence'; - -export const KEY: string = unique(); - -export class State extends Base { - public override quicksetup: boolean = true; - - public key(): string { - return KEY; - } -} diff --git a/application/client/src/app/ui/views/sidebar/observe/states/serial.ts b/application/client/src/app/ui/views/sidebar/observe/states/serial.ts deleted file mode 100644 index 485e5bf7ec..0000000000 --- a/application/client/src/app/ui/views/sidebar/observe/states/serial.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Base } from './state'; -import { unique } from '@platform/env/sequence'; - -export const KEY: string = unique(); - -export class State extends Base { - public key(): string { - return KEY; - } -} diff --git a/application/client/src/app/ui/views/sidebar/observe/states/state.ts b/application/client/src/app/ui/views/sidebar/observe/states/state.ts deleted file mode 100644 index 482b33b764..0000000000 --- a/application/client/src/app/ui/views/sidebar/observe/states/state.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { Destroy } from '@platform/types/env/types'; - -export abstract class Base implements Destroy { - public quicksetup: boolean = false; - - public toggleQuickSetup(quicksetup?: boolean) { - if (quicksetup !== undefined) { - this.quicksetup = quicksetup; - } else { - this.quicksetup = !this.quicksetup; - } - } - - public destroy(): void { - // - } - - public abstract key(): string; -} diff --git a/application/client/src/app/ui/views/sidebar/observe/states/tcp.ts b/application/client/src/app/ui/views/sidebar/observe/states/tcp.ts deleted file mode 100644 index 485e5bf7ec..0000000000 --- a/application/client/src/app/ui/views/sidebar/observe/states/tcp.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Base } from './state'; -import { unique } from '@platform/env/sequence'; - -export const KEY: string = unique(); - -export class State extends Base { - public key(): string { - return KEY; - } -} diff --git a/application/client/src/app/ui/views/sidebar/observe/states/udp.ts b/application/client/src/app/ui/views/sidebar/observe/states/udp.ts deleted file mode 100644 index 485e5bf7ec..0000000000 --- a/application/client/src/app/ui/views/sidebar/observe/states/udp.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Base } from './state'; -import { unique } from '@platform/env/sequence'; - -export const KEY: string = unique(); - -export class State extends Base { - public key(): string { - return KEY; - } -} diff --git a/application/client/src/app/ui/views/sidebar/observe/styles.less b/application/client/src/app/ui/views/sidebar/observe/styles.less deleted file mode 100644 index 450a60350a..0000000000 --- a/application/client/src/app/ui/views/sidebar/observe/styles.less +++ /dev/null @@ -1,61 +0,0 @@ -@import '../../../styles/variables.less'; - -app-views-observe-list { - position: absolute; - display: block; - padding: 0; - margin: 0; - bottom: 0.5rem; - right: 0.5rem; - left: 0.5rem; - top: 0.5rem; - overflow-y: auto; - overflow-x: hidden; - outline: none; - & > div.caption { - position: sticky !important; - top: 0; - left: 0; - z-index: 1; - background: var(--scheme-color-5); - display: flex; - padding: 0 24px; - margin: 0; - text-align: left; - align-items: center; - white-space: nowrap; - font-size: 0.9rem; - font-weight: 400; - span.title{ - color: var(--scheme-color-2); - } - span.subtitle{ - padding-left: 6px; - color: var(--scheme-color-3); - } - & span.filler { - flex: auto; - } - - } - & mat-expansion-panel { - margin: 6px 0!important; - } - & div.mat-expansion-panel-body { - padding-left: 0; - padding-right: 0; - } - -} -p.attach-menu-warning { - padding: 12px 24px; - color: var(--scheme-color-1); -} -div.attach-new-source-menu { - & .mat-icon { - width: 16px; - height: 16px; - font-size: 16px; - color: var(--scheme-color-1); - } -} \ No newline at end of file diff --git a/application/client/src/app/ui/views/sidebar/observe/template.html b/application/client/src/app/ui/views/sidebar/observe/template.html deleted file mode 100644 index 7710be9170..0000000000 --- a/application/client/src/app/ui/views/sidebar/observe/template.html +++ /dev/null @@ -1,29 +0,0 @@ -
- Observing Sources - ({{session.observed.count()}}) - - -
- - - - {{provider.value.panels.list.name}} - {{provider.value.panels.list.desc}} - -
- -
- -
-
- diff --git a/application/client/src/app/ui/views/sidebar/search/base/entity.ts b/application/client/src/app/ui/views/sidebar/search/base/entity.ts deleted file mode 100644 index 1be56b831c..0000000000 --- a/application/client/src/app/ui/views/sidebar/search/base/entity.ts +++ /dev/null @@ -1,84 +0,0 @@ -import { - Component, - ChangeDetectorRef, - OnInit, - Input, - HostBinding, - HostListener, - ChangeDetectionStrategy, -} from '@angular/core'; -import { Provider, ISelectEvent } from '../providers/definitions/provider'; -import { Entity } from '../providers/definitions/entity'; -import { Ilc, IlcInterface } from '@env/decorators/component'; -import { Initial } from '@env/decorators/initial'; -import { ChangesDetector } from '@ui/env/extentions/changes'; -import { CdkDrag } from '@angular/cdk/drag-drop'; - -@Component({ - selector: 'app-sidebar-entity-item-base', - template: '', - changeDetection: ChangeDetectionStrategy.OnPush, -}) -@Initial() -@Ilc() -export abstract class EntityItem extends ChangesDetector implements OnInit { - static HOST_DIRECTIVES = [ - { - directive: CdkDrag, - }, - ]; - - @Input() provider!: P & Provider; - @Input() entity!: Entity; - - public edit: boolean = false; - public selected: boolean = false; - public dragging: boolean = false; - - private _ignore: boolean = false; - - @HostBinding('class.selected') get cssClassSelected() { - return this.selected; - } - @HostBinding('class.edited') get cssClassEdited() { - return this.edit; - } - @HostListener('click') onClick() { - if (this._ignore) { - this._ignore = false; - return; - } - if (this.edit) { - return; - } - this.provider !== undefined && this.provider.select().set({ guid: this.entity.uuid() }); - this.detectChanges(); - } - - constructor(cdRef: ChangeDetectorRef) { - super(cdRef); - } - - public ngOnInit() { - this.env().subscriber.register( - this.provider.subjects.get().edit.subscribe((guid: string | undefined) => { - this.edit = this.entity.uuid() === guid; - this.markChangesForCheck(); - }), - this.provider.subjects.get().selection.subscribe((event: ISelectEvent) => { - this.selected = event.guids.indexOf(this.entity.uuid()) !== -1; - if (!this.selected) { - this.edit = false; - } - this.markChangesForCheck(); - }), - ); - this.selected = this.provider.select().get().indexOf(this.entity.uuid()) !== -1; - } - - public ignoreMouseClick() { - this._ignore = true; - } -} -// eslint-disable-next-line @typescript-eslint/no-unused-vars -export interface EntityItem extends IlcInterface {} diff --git a/application/client/src/app/ui/views/sidebar/search/base/list.ts b/application/client/src/app/ui/views/sidebar/search/base/list.ts deleted file mode 100644 index ccdb3d132d..0000000000 --- a/application/client/src/app/ui/views/sidebar/search/base/list.ts +++ /dev/null @@ -1,111 +0,0 @@ -import { - Component, - ChangeDetectorRef, - AfterContentInit, - Input, - HostBinding, - ChangeDetectionStrategy, - OnDestroy, -} from '@angular/core'; -import { Provider } from '../providers/definitions/provider'; -import { Entity } from '../providers/definitions/entity'; -import { Ilc, IlcInterface } from '@env/decorators/component'; -import { Initial } from '@env/decorators/initial'; -import { ChangesDetector } from '@ui/env/extentions/changes'; -import { CdkDropList, CdkDragDrop } from '@angular/cdk/drag-drop'; -import { Subscription } from 'rxjs'; - -export enum ListId { - Filters = 'searchmanager-filters-list', - Charts = 'searchmanager-charts-list', - Disabled = 'searchmanager-disabled-list', - Bin = 'searchmanager-bin-list', -} - -@Component({ - selector: 'app-sidebar-entities-list-base', - template: '', - changeDetection: ChangeDetectionStrategy.OnPush, -}) -@Initial() -@Ilc() -export abstract class EntitiesList - extends ChangesDetector - implements AfterContentInit, OnDestroy -{ - static HOST_DIRECTIVE = { - directive: CdkDropList, - }; - - @Input() provider!: P & Provider; - - @HostBinding('id') get id(): string { - return this.getListId(); - } - - protected readonly subscriptions: Subscription[] = []; - protected entries: Entity[] = []; - - constructor( - protected readonly cdRef: ChangeDetectorRef, - protected readonly cdkDropListDir: CdkDropList, - ) { - super(cdRef); - this.cdkDropListDir.connectedTo = [ - ListId.Filters, - ListId.Charts, - ListId.Disabled, - ListId.Bin, - ]; - this.cdkDropListDir.id = this.getListId(); - this.cdkDropListDir.lockAxis = 'y'; - this.subscriptions.push( - ...[ - this.cdkDropListDir.dropped.subscribe((event: CdkDragDrop) => { - const provider: P & Provider = event.previousContainer.data; - if (provider.uuid === this.provider.uuid) { - this.provider.reorder({ - prev: event.previousIndex, - curt: event.currentIndex, - }); - return; - } - const dragged = provider.getEntityByIndex(event.previousIndex); - if (dragged === undefined) { - return; - } - this.provider.tryToInsertEntity(dragged, event.currentIndex); - }), - this.cdkDropListDir._dropListRef.beforeStarted.subscribe(() => { - this.cdkDropListDir.data = this.provider; - this.provider.events.get().dragging.emit(); - }), - ], - ); - } - - public ngOnDestroy(): void { - this.subscriptions.forEach((s) => s.unsubscribe()); - } - - public ngAfterContentInit() { - this.entries = this.provider.entities(); - this.env().subscriber.register( - this.provider.subjects.get().change.subscribe(() => { - this.entries = this.provider.entities(); - this.markChangesForCheck(); - }), - this.provider.subjects.get().selection.subscribe(() => { - this.markChangesForCheck(); - }), - ); - } - - public onContexMenu(event: MouseEvent, entity: Entity) { - this.provider.select().context(event, entity); - } - - protected abstract getListId(): ListId; -} -// eslint-disable-next-line @typescript-eslint/no-unused-vars -export interface EntitiesList extends IlcInterface {} diff --git a/application/client/src/app/ui/views/sidebar/search/bin/component.ts b/application/client/src/app/ui/views/sidebar/search/bin/component.ts deleted file mode 100644 index 19ce4f35dd..0000000000 --- a/application/client/src/app/ui/views/sidebar/search/bin/component.ts +++ /dev/null @@ -1,87 +0,0 @@ -import { - Component, - ChangeDetectorRef, - HostBinding, - HostListener, - OnDestroy, - Input, - AfterContentInit, -} from '@angular/core'; -import { CdkDropList, CdkDragDrop } from '@angular/cdk/drag-drop'; -import { ListId } from '../base/list'; -import { Ilc, IlcInterface } from '@env/decorators/component'; -import { Subscription } from 'rxjs'; -import { ChangesDetector } from '@ui/env/extentions/changes'; -import { Provider } from '../providers/definitions/provider'; -import { Providers } from '../providers/providers'; - -@Component({ - selector: 'app-sidebar-entities-bin', - templateUrl: './template.html', - styleUrls: ['./styles.less'], - hostDirectives: [ - { - directive: CdkDropList, - }, - ], - standalone: false, -}) -@Ilc() -export class Bin extends ChangesDetector implements AfterContentInit, OnDestroy { - @Input() providers!: Providers; - - @HostListener('window:mouseup') onWindowMouseUp() { - this._dragging = false; - this.detectChanges(); - } - - @HostBinding('id') get id(): string { - return ListId.Bin; - } - - @HostBinding('attr.data-dragging') get dragging(): boolean { - return this._dragging; - } - - protected readonly subscriptions: Subscription[] = []; - - private _dragging: boolean = false; - - constructor( - protected readonly cdRef: ChangeDetectorRef, - protected readonly cdkDropListDir: CdkDropList, - ) { - super(cdRef); - this.cdkDropListDir.id = ListId.Bin; - this.cdkDropListDir.lockAxis = 'y'; - this.subscriptions.push( - ...[ - this.cdkDropListDir.dropped.subscribe((event: CdkDragDrop) => { - const provider: Provider | undefined = event.previousContainer.data; - if (!(provider instanceof Provider)) { - return; - } - const dragged = provider.getEntityByIndex(event.previousIndex); - if (dragged === undefined) { - return; - } - provider.removeEntity(dragged); - }), - ], - ); - } - - public ngOnDestroy(): void { - this.subscriptions.forEach((s) => s.unsubscribe()); - } - - public ngAfterContentInit(): void { - this.env().subscriber.register( - this.providers.subjects.get().dragging.subscribe(() => { - this._dragging = true; - this.detectChanges(); - }), - ); - } -} -export interface Bin extends IlcInterface {} diff --git a/application/client/src/app/ui/views/sidebar/search/bin/styles.less b/application/client/src/app/ui/views/sidebar/search/bin/styles.less deleted file mode 100644 index 62ce3901d7..0000000000 --- a/application/client/src/app/ui/views/sidebar/search/bin/styles.less +++ /dev/null @@ -1,29 +0,0 @@ -@import '../../../../styles/variables.less'; -:host { - position: absolute; - display: block; - bottom: 0; - border-radius: 3px; - margin: 8px 0px; - padding: 16px 0; - text-align: center; - width: 100%; - pointer-events: none; - overflow: hidden; - opacity: 0.001; - height: 0px; - &[data-dragging="true"] { - background: var(--scheme-bk-color-0); - pointer-events: all; - opacity: 1; - height: auto; - } - & p { - color: var(--scheme-color-2); - } - & mat-icon { - position: relative; - display: inline-block; - color: var(--scheme-color-accent); - } -} diff --git a/application/client/src/app/ui/views/sidebar/search/bin/template.html b/application/client/src/app/ui/views/sidebar/search/bin/template.html deleted file mode 100644 index d4c9b1d1fc..0000000000 --- a/application/client/src/app/ui/views/sidebar/search/bin/template.html +++ /dev/null @@ -1,2 +0,0 @@ -delete_outline -

Drop entity here to remove

diff --git a/application/client/src/app/ui/views/sidebar/search/charts/chart/component.ts b/application/client/src/app/ui/views/sidebar/search/charts/chart/component.ts deleted file mode 100644 index 230c66e532..0000000000 --- a/application/client/src/app/ui/views/sidebar/search/charts/chart/component.ts +++ /dev/null @@ -1,102 +0,0 @@ -import { Component, AfterContentInit, HostBinding, ViewChild } from '@angular/core'; -import { ChartRequest } from '@service/session/dependencies/search/charts/request'; -import { MatCheckboxChange } from '@angular/material/checkbox'; -import { MatInput } from '@angular/material/input'; -import { MatCheckbox } from '@angular/material/checkbox'; -import { ProviderCharts } from '../provider'; -import { Ilc, IlcInterface } from '@env/decorators/component'; -import { ChangesDetector } from '@ui/env/extentions/changes'; -import { State } from './state'; -import { EFlag } from '@platform/types/filter'; -import { EntityItem } from '../../base/entity'; - -@Component({ - selector: 'app-sidebar-charts-filter', - templateUrl: './template.html', - styleUrls: ['./styles.less'], - hostDirectives: EntityItem.HOST_DIRECTIVES, - standalone: false, -}) -@Ilc() -export class Chart extends EntityItem implements AfterContentInit { - @HostBinding('class.notvalid') get cssClassNotValid() { - return !ChartRequest.isValid(this.state.filter); - } - - @ViewChild(MatInput) _inputRefCom!: MatInput; - @ViewChild(MatCheckbox) _stateRefCom!: MatCheckbox; - - public state!: State; - public EFlag = EFlag; - - public ngAfterContentInit() { - this.env().subscriber.register( - this.provider.subjects.get().edit.subscribe((guid: string | undefined) => { - if (this.entity.uuid() === guid) { - this.update(); - if (this._inputRefCom !== undefined) { - this._inputRefCom.focus(); - } - } - }), - ); - this.env().subscriber.register( - this.entity.extract().updated.subscribe((event) => { - if (event.inner().filter) { - this.state.update().filter(); - } else if (event.inner().color) { - this.state.update().color(); - } else if (event.inner().line) { - this.state.update().line(); - } else if (event.inner().point) { - this.state.update().point(); - } else if (event.inner().state) { - this.state.update().state(); - } - this.update(); - }), - ); - this.state = new State(this.entity, this.provider); - } - - public _ng_onStateChange(event: MatCheckboxChange) { - this.state.setState(event.checked); - this.update(); - } - - public _ng_onRequestInputKeyUp(event: KeyboardEvent) { - if (this.provider === undefined) { - return; - } - if (['Escape', 'Enter'].indexOf(event.code) === -1) { - return; - } - switch (event.code) { - case 'Escape': - this.state.edit().drop(); - break; - case 'Enter': - this.state.edit().accept(); - break; - } - this.update(); - } - - public _ng_onRequestInputBlur() { - if (this.provider === undefined) { - return; - } - this.state.edit().drop(); - this.update(); - } - - public _ng_onDoubleClick(event: MouseEvent) { - this.provider !== undefined && this.provider.select().doubleclick(event, this.entity); - } - - public update() { - this.detectChanges(); - ChangesDetector.detectChanges(this._stateRefCom); - } -} -export interface Chart extends IlcInterface {} diff --git a/application/client/src/app/ui/views/sidebar/search/charts/chart/state.ts b/application/client/src/app/ui/views/sidebar/search/charts/chart/state.ts deleted file mode 100644 index 622191b0d2..0000000000 --- a/application/client/src/app/ui/views/sidebar/search/charts/chart/state.ts +++ /dev/null @@ -1,103 +0,0 @@ -import { Entity } from '../../providers/definitions/entity'; -import { ChartRequest } from '@service/session/dependencies/search/charts/request'; -import { ProviderCharts } from '../provider'; - -import * as obj from '@platform/env/obj'; - -export class State { - public filter: string; - public color: string; - public line: number; - public point: number; - public active: boolean = false; - public provider: ProviderCharts; - public entity: Entity; - public found: number = 0; - - private _isValidRegex: boolean = true; - private _error: string | undefined; - - constructor(entity: Entity, prodider: ProviderCharts) { - this.filter = obj.clone(entity.extract().definition.filter); - this.color = obj.clone(entity.extract().definition.color); - this.line = obj.clone(entity.extract().definition.widths.line); - this.point = obj.clone(entity.extract().definition.widths.point); - this.active = entity.extract().definition.active; - this.provider = prodider; - this.entity = entity; - this._update(); - } - - public get isValidRegex(): boolean { - return this._isValidRegex; - } - - public setState(checked: boolean) { - this.active = checked; - this.entity.extract().set().state(checked); - } - - public update(): { - filter(): void; - color(): void; - line(): void; - point(): void; - state(): void; - } { - return { - filter: (): void => { - this.filter = obj.clone(this.entity.extract().definition.filter); - }, - color: (): void => { - this.color = obj.clone(this.entity.extract().definition.color); - }, - line: (): void => { - this.line = obj.clone(this.entity.extract().definition.widths.line); - }, - point: (): void => { - this.point = obj.clone(this.entity.extract().definition.widths.point); - }, - state: (): void => { - this.active = this.entity.extract().definition.active; - }, - }; - } - - public edit(): { - drop(): void; - accept(): void; - } { - return { - drop: (): void => { - this.filter = this.entity.extract().definition.filter; - this.provider.edit().out(); - }, - accept: (): void => { - this._update(); - if (this.filter.trim() !== '' && this._error === undefined) { - this.entity.extract().set().filter(this.filter); - } else { - this.filter = this.entity.extract().definition.filter; - } - this.provider.edit().out(); - }, - }; - } - - public get error(): string | undefined { - return this._error; - } - - private _update() { - this._checkSpecifiedRegex(); - this._checkGeneralRegex(); - } - - private _checkSpecifiedRegex() { - this._error = ChartRequest.getValidationError(this.filter); - } - - private _checkGeneralRegex() { - this._isValidRegex = ChartRequest.isValid(this.filter); - } -} diff --git a/application/client/src/app/ui/views/sidebar/search/charts/chart/styles.less b/application/client/src/app/ui/views/sidebar/search/charts/chart/styles.less deleted file mode 100644 index a8f9f9ad66..0000000000 --- a/application/client/src/app/ui/views/sidebar/search/charts/chart/styles.less +++ /dev/null @@ -1,136 +0,0 @@ -@import '../../../../../styles/variables.less'; - - -:host { - display: flex; - position: relative; - flex-flow: row; - padding: 3px 12px 5px 24px; - overflow: hidden; - height: 20px; - cursor: default; - align-items: center; - width: calc(100% - 36px); - &.notvalid { - background: var(--scheme-color-warning-fadeout-50); - &::after { - display: block; - content: '⚠'; - font-size: 8px; - color: #fd1515; - top: 3px; - left: 8px; - position: absolute; - } - input.request { - color: var(--scheme-color-error); - border-bottom: dashed 1px var(--scheme-color-error); - } - } - &:hover{ - background: var(--scheme-color-5); - } - &.selected{ - background: var(--scheme-color-accent-fadeout-50); - } - div.doubleclick { - display: contents; - flex: auto; - } - span.color { - flex: 0; - width: 8px; - max-width: 8px; - min-width: 8px; - min-height: 16px; - display: block; - position: relative; - margin: 2px 0 2px 0; - } - span.request{ - flex: auto; - white-space: nowrap; - overflow: hidden; - text-overflow: ellipsis; - padding-left: 6px; - color: var(--scheme-color-0); - cursor: default; - } - span.found { - flex: 0; - white-space: nowrap; - color: var(--scheme-color-0); - padding: 0 6px; - font-size: 12px; - margin: 0; - border: thin solid var(--scheme-color-active); - background: var(--scheme-color-active); - border-radius: 6px; - } - input.request { - margin: 0 8px; - padding: 0; - border: none; - border-bottom: dashed 1px var(--scheme-color-1); - flex: auto; - white-space: nowrap; - color: var(--scheme-color-0); - background: none; - outline: none; - } - span.flags { - display: flex; - flex-direction: row; - align-items: center; - flex: 0; - padding-right: 8px; - & span { - font-size: 14px; - line-height: 14px; - vertical-align: bottom; - cursor: default; - &.active{ - color: var(--scheme-color-0); - } - &.inactive{ - color: var(--scheme-color-3); - } - &.invalid { - color: var(--scheme-color-error); - } - } - } - &.edited { - &::after{ - display: none; - } - padding-left: 0; - background: var(--scheme-color-6); - mat-checkbox { - display: none; - } - span.color { - display: none; - } - span.background { - display: none; - } - span.flags { - display: none; - } - } - &.cdk-drag-preview { - box-sizing: border-box; - box-shadow: 0 5px 5px -3px rgba(0, 0, 0, 0.2), - 0 8px 10px 1px rgba(0, 0, 0, 0.14), - 0 3px 14px 2px rgba(0, 0, 0, 0.12); - font-size: 14px; - line-height: 20px; - } - &.cdk-drag-placeholder { - opacity: 0; - } - &.cdk-drag-animating { - transition: transform 250ms cubic-bezier(0, 0, 0.2, 1); - } -} diff --git a/application/client/src/app/ui/views/sidebar/search/charts/chart/template.html b/application/client/src/app/ui/views/sidebar/search/charts/chart/template.html deleted file mode 100644 index a7add77724..0000000000 --- a/application/client/src/app/ui/views/sidebar/search/charts/chart/template.html +++ /dev/null @@ -1,13 +0,0 @@ - -
- - {{state.filter}} - -
-{{state.found}} \ No newline at end of file diff --git a/application/client/src/app/ui/views/sidebar/search/charts/details/component.ts b/application/client/src/app/ui/views/sidebar/search/charts/details/component.ts deleted file mode 100644 index 6978d5cd75..0000000000 --- a/application/client/src/app/ui/views/sidebar/search/charts/details/component.ts +++ /dev/null @@ -1,119 +0,0 @@ -import { - Component, - ChangeDetectorRef, - AfterContentInit, - Input, - ChangeDetectionStrategy, -} from '@angular/core'; -import { ChartRequest, ChartType } from '@service/session/dependencies/search/charts/request'; -import { ProviderCharts } from '../provider'; -import { Entity } from '../../providers/definitions/entity'; -import { CColors } from '@styles/colors'; -import { styles } from '@ui/service/styles'; -import { Ilc, IlcInterface } from '@env/decorators/component'; -import { Initial } from '@env/decorators/initial'; -import { ChangesDetector } from '@ui/env/extentions/changes'; - -@Component({ - selector: 'app-sidebar-charts-details', - templateUrl: './template.html', - styleUrls: ['./styles.less'], - changeDetection: ChangeDetectionStrategy.OnPush, - standalone: false, -}) -@Initial() -@Ilc() -export class ChartrDetails extends ChangesDetector implements AfterContentInit { - @Input() provider!: ProviderCharts; - - public request: string | undefined; - public color: string = styles.colors().scheme_color_accent; - public line: number = ChartRequest.DEFAULT_LINE_WIDTH; - public point: number = ChartRequest.DEFAULT_POINT_RADIUS; - public colors: string[] = []; - public type: ChartType = ChartType.Linear; - public types: ChartType[] = [ChartType.Linear, ChartType.Stepper, ChartType.Temperature]; - - private _entity: Entity | undefined; - - constructor(cdRef: ChangeDetectorRef) { - super(cdRef); - } - - public ngAfterContentInit() { - this.env().subscriber.register( - this.provider.subjects.get().selection.subscribe(this._init.bind(this)), - ); - this.env().subscriber.register( - this.provider.subjects.get().change.subscribe(this._onChange.bind(this)), - ); - this._init(); - } - - public onColorChanges(color: string) { - if (this._entity === undefined) { - return; - } - this.color = color; - this._entity.extract().set().color(this.color); - this.detectChanges(); - } - - public onChartTypeChange() { - if (this._entity === undefined) { - return; - } - this._entity.extract().set().type(this.type); - this.detectChanges(); - } - - public onLineChanges() { - if (this._entity === undefined) { - return; - } - this._entity.extract().set().line(this.line); - this.detectChanges(); - } - - public onPointChanges() { - if (this._entity === undefined) { - return; - } - this._entity.extract().set().point(this.point); - this.detectChanges(); - } - - private _setColors() { - this.colors = CColors.slice(); - if (this.colors.find((c) => c === this.color) !== undefined) { - return; - } - this.colors.push(this.color); - this.detectChanges(); - } - - private _init() { - this._entity = this.provider.select().single(); - if (this._entity === undefined) { - this.request = undefined; - this.color = styles.colors().scheme_color_accent; - this.type = ChartType.Linear; - } else { - const def = this._entity.extract().definition; - this.request = def.filter; - this.color = def.color; - this.type = def.type; - this._setColors(); - } - this._onChange(); - } - - private _onChange() { - if (this._entity === undefined) { - return; - } - this.request = this._entity.extract().definition.filter; - this.detectChanges(); - } -} -export interface ChartrDetails extends IlcInterface {} diff --git a/application/client/src/app/ui/views/sidebar/search/charts/details/styles.less b/application/client/src/app/ui/views/sidebar/search/charts/details/styles.less deleted file mode 100644 index 1834c25704..0000000000 --- a/application/client/src/app/ui/views/sidebar/search/charts/details/styles.less +++ /dev/null @@ -1,31 +0,0 @@ -@import '../../../../../styles/variables.less'; - - -:host { - position: relative; - display: block; - padding: 0 12px 0 24px; - & span.splitter{ - position: relative; - display: block; - height: 8px; - } - & p.sample{ - position: relative; - display: block; - margin: 0 4px; - padding: 2px 4px; - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; - } - & .label-container { - display: flex; - justify-content: space-between; - margin: 20px 10px 0; - max-width: 284px; - } - & mat-slider { - width: ~"calc(100% - 12px)"; - } -} diff --git a/application/client/src/app/ui/views/sidebar/search/charts/details/template.html b/application/client/src/app/ui/views/sidebar/search/charts/details/template.html deleted file mode 100644 index 41c4d4154a..0000000000 --- a/application/client/src/app/ui/views/sidebar/search/charts/details/template.html +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - Chart Type - - - {{type}} - - - - - - -

{{request}}

- - - -
- - -
- - - - -
- - -
- - - \ No newline at end of file diff --git a/application/client/src/app/ui/views/sidebar/search/charts/list/component.ts b/application/client/src/app/ui/views/sidebar/search/charts/list/component.ts deleted file mode 100644 index 131a8dbf80..0000000000 --- a/application/client/src/app/ui/views/sidebar/search/charts/list/component.ts +++ /dev/null @@ -1,22 +0,0 @@ -import { Component } from '@angular/core'; -import { ChartRequest } from '@service/session/dependencies/search/charts/request'; -import { ProviderCharts } from '../provider'; -import { Ilc, IlcInterface } from '@env/decorators/component'; -import { Initial } from '@env/decorators/initial'; -import { EntitiesList, ListId } from '../../base/list'; - -@Component({ - selector: 'app-sidebar-charts-list', - templateUrl: './template.html', - styleUrls: ['./styles.less'], - hostDirectives: [EntitiesList.HOST_DIRECTIVE], - standalone: false, -}) -@Initial() -@Ilc() -export class ChartsList extends EntitiesList { - protected getListId(): ListId { - return ListId.Charts; - } -} -export interface ChartsList extends IlcInterface {} diff --git a/application/client/src/app/ui/views/sidebar/search/charts/list/styles.less b/application/client/src/app/ui/views/sidebar/search/charts/list/styles.less deleted file mode 100644 index 23193efe51..0000000000 --- a/application/client/src/app/ui/views/sidebar/search/charts/list/styles.less +++ /dev/null @@ -1,7 +0,0 @@ -@import '../../../../../styles/variables.less'; - -:host { - &.cdk-drop-list-dragging *:not(.cdk-drag-placeholder) { - transition: transform 250ms cubic-bezier(0, 0, 0.2, 1); - } -} diff --git a/application/client/src/app/ui/views/sidebar/search/charts/list/template.html b/application/client/src/app/ui/views/sidebar/search/charts/list/template.html deleted file mode 100644 index 47d430cdea..0000000000 --- a/application/client/src/app/ui/views/sidebar/search/charts/list/template.html +++ /dev/null @@ -1,5 +0,0 @@ - \ No newline at end of file diff --git a/application/client/src/app/ui/views/sidebar/search/charts/placeholder/component.ts b/application/client/src/app/ui/views/sidebar/search/charts/placeholder/component.ts deleted file mode 100644 index fe4bf57e73..0000000000 --- a/application/client/src/app/ui/views/sidebar/search/charts/placeholder/component.ts +++ /dev/null @@ -1,22 +0,0 @@ -import { Component } from '@angular/core'; -import { ChartRequest } from '@service/session/dependencies/search/charts/request'; -import { ProviderCharts } from '../provider'; -import { Ilc, IlcInterface } from '@env/decorators/component'; -import { Initial } from '@env/decorators/initial'; -import { EntitiesList, ListId } from '../../base/list'; - -@Component({ - selector: 'app-sidebar-charts-placeholder', - templateUrl: './template.html', - styleUrls: ['./styles.less'], - hostDirectives: [EntitiesList.HOST_DIRECTIVE], - standalone: false, -}) -@Initial() -@Ilc() -export class ChartsPlaceholder extends EntitiesList { - protected getListId(): ListId { - return ListId.Charts; - } -} -export interface ChartsPlaceholder extends IlcInterface {} diff --git a/application/client/src/app/ui/views/sidebar/search/charts/placeholder/styles.less b/application/client/src/app/ui/views/sidebar/search/charts/placeholder/styles.less deleted file mode 100644 index e25d6a97e6..0000000000 --- a/application/client/src/app/ui/views/sidebar/search/charts/placeholder/styles.less +++ /dev/null @@ -1,4 +0,0 @@ -:host { - display: block; - padding: 0 24px; -} \ No newline at end of file diff --git a/application/client/src/app/ui/views/sidebar/search/charts/placeholder/template.html b/application/client/src/app/ui/views/sidebar/search/charts/placeholder/template.html deleted file mode 100644 index 9c89d1ef31..0000000000 --- a/application/client/src/app/ui/views/sidebar/search/charts/placeholder/template.html +++ /dev/null @@ -1 +0,0 @@ -

No charts

\ No newline at end of file diff --git a/application/client/src/app/ui/views/sidebar/search/charts/provider.ts b/application/client/src/app/ui/views/sidebar/search/charts/provider.ts deleted file mode 100644 index 2ffc37f3fa..0000000000 --- a/application/client/src/app/ui/views/sidebar/search/charts/provider.ts +++ /dev/null @@ -1,296 +0,0 @@ -import { Entity } from '../providers/definitions/entity'; -import { Provider } from '../providers/definitions/provider'; -import { ChartRequest } from '@service/session/dependencies/search/charts/store'; -import { DisabledRequest } from '@service/session/dependencies/search/disabled/request'; -import { IComponentDesc } from '@elements/containers/dynamic/component'; -import { ChartsList } from './list/component'; -import { ChartsPlaceholder } from './placeholder/component'; -import { ChartrDetails } from './details/component'; -import { IMenuItem } from '@ui/service/contextmenu'; -import { FilterRequest } from '@service/session/dependencies/search/filters/request'; - -export class ProviderCharts extends Provider { - private _entities: Map> = new Map(); - - public init(): void { - this.updatePanels(); - this.register( - this.session.search - .store() - .charts() - .subjects.get() - .value.subscribe(() => { - super.change(); - }), - ); - } - - public entities(): Array> { - const guids: string[] = []; - const entities = this.session.search - .store() - .charts() - .get() - .map((filter: ChartRequest) => { - let entity = this._entities.get(filter.definition.uuid); - if (entity === undefined) { - entity = new Entity(filter); - } else { - entity.set(filter); - } - this._entities.set(filter.definition.uuid, entity); - guids.push(filter.definition.uuid); - return entity; - }); - this._entities.forEach((_, guid: string) => { - if (guids.indexOf(guid) === -1) { - this._entities.delete(guid); - } - }); - return entities; - } - - public reorder(params: { prev: number; curt: number }) { - this.session.search.store().charts().reorder(params); - super.change(); - } - - public getPanels(): { - list(): { - name(): string; - desc(): string; - comp(): IComponentDesc; - }; - details(): { - name(): string | undefined; - desc(): string | undefined; - comp(): IComponentDesc | undefined; - }; - nocontent(): { - name(): string | undefined; - desc(): string | undefined; - comp(): IComponentDesc | undefined; - }; - } { - return { - list: (): { - name(): string; - desc(): string; - comp(): IComponentDesc; - } => { - return { - name: (): string => { - return `Charts`; - }, - desc: (): string => { - const count = this.entities().length; - return `${count} charts${count > 1 ? 's' : ''}`; - }, - comp: (): IComponentDesc => { - return { - factory: ChartsList, - inputs: { - provider: this, - session: this.session, - }, - }; - }, - }; - }, - details: (): { - name(): string | undefined; - desc(): string | undefined; - comp(): IComponentDesc | undefined; - } => { - return { - name: (): string | undefined => { - return `Charts Details`; - }, - desc: (): string | undefined => { - if (this.select().get().length !== 1) { - return ''; - } - const selection = this._entities.get(this.select().get()[0]); - if (selection === undefined) { - return ''; - } - return selection.extract().definition.filter; - }, - comp: (): IComponentDesc | undefined => { - return { - factory: ChartrDetails, - inputs: { - provider: this, - }, - }; - }, - }; - }, - nocontent: (): { - name(): string | undefined; - desc(): string | undefined; - comp(): IComponentDesc | undefined; - } => { - return { - name: (): string | undefined => { - return `Filters`; - }, - desc: (): string | undefined => { - return undefined; - }, - comp: (): IComponentDesc | undefined => { - return { - factory: ChartsPlaceholder, - inputs: { - provider: this, - }, - }; - }, - }; - }, - }; - } - - public getContextMenuItems(_target: Entity, selected: Array>): IMenuItem[] { - if (selected.length !== 1) { - return []; - } - const entity = selected[0].extract(); - const items: IMenuItem[] = []; - if (entity instanceof ChartRequest) { - items.push( - ...[ - { - caption: `Show Matches`, - handler: () => { - this.search(selected[0]); - }, - }, - {}, - { - caption: `Into Filter`, - handler: () => { - if ( - !this.session.search - .store() - .filters() - .addFromFilter({ - filter: entity.as().filter(), - flags: { reg: true, word: false, cases: false }, - }) - ) { - return; - } - this.session.search.store().charts().delete([entity.uuid()]); - }, - }, - ], - ); - } - return items; - } - - public actions( - target: Entity, - selected: Array>, - ): { - activate?: () => void; - deactivate?: () => void; - remove?: () => void; - edit?: () => void; - } { - const actions: { - activate?: () => void; - deactivate?: () => void; - remove?: () => void; - edit?: () => void; - } = {}; - const self = this; - const entities = selected.filter((entity: Entity) => { - return entity.extract() instanceof ChartRequest; - }); - actions.activate = - entities.filter((entity: Entity) => { - return entity.extract().definition.active === false; - }).length !== 0 - ? () => { - entities.forEach((entity: Entity) => { - entity.extract().set().state(true); - }); - } - : undefined; - actions.deactivate = - entities.filter((entity: Entity) => { - return entity.extract().definition.active === true; - }).length !== 0 - ? () => { - entities.forEach((entity: Entity) => { - entity.extract().set().state(false); - }); - } - : undefined; - actions.edit = - selected.length === 1 && entities.length === 1 - ? () => { - // View should be focused to switch to edit-mode, but while context - // menu is open, there are no focus. Well, that's why settimer here. - setTimeout(() => { - self.edit().in(); - }); - } - : undefined; - actions.remove = - entities.length !== 0 - ? () => { - if (entities.length === self.entities().length) { - this.session.search.store().charts().clear(); - self.change(); - } else { - entities.forEach((entity: Entity) => { - this.session.search.store().charts().delete([entity.uuid()]); - }); - } - } - : undefined; - return actions; - } - - public search(entity: Entity) { - this.session.switch().toolbar.search(); - this.session.search - .state() - .setActive({ - filter: entity.extract().definition.filter, - flags: { reg: true, word: false, cases: false }, - }) - .catch((error: Error) => { - this.logger.error(`Fail to make search: ${error.message}`); - }); - } - - public tryToInsertEntity(entity: unknown, _index: number): boolean { - if (entity instanceof FilterRequest) { - if (this.session.search.store().charts().tryFromFilter(entity)) { - this.session.search.store().filters().delete([entity.uuid()]); - return true; - } - return false; - } else if (entity instanceof DisabledRequest) { - if (this.session.search.store().charts().tryRestore(entity.entity())) { - this.session.search.store().disabled().delete([entity.uuid()]); - return true; - } else { - return false; - } - } - return false; - } - - public removeEntity(entity: unknown): boolean { - if (!(entity instanceof ChartRequest)) { - return false; - } - this.session.search.store().charts().delete([entity.uuid()]); - return true; - } -} diff --git a/application/client/src/app/ui/views/sidebar/search/component.ts b/application/client/src/app/ui/views/sidebar/search/component.ts deleted file mode 100644 index 91a884a8ed..0000000000 --- a/application/client/src/app/ui/views/sidebar/search/component.ts +++ /dev/null @@ -1,181 +0,0 @@ -import { - Component, - OnDestroy, - ViewEncapsulation, - Input, - AfterContentInit, - ChangeDetectorRef, - HostBinding, - HostListener, - ElementRef, - ChangeDetectionStrategy, -} from '@angular/core'; -import { Session } from '@service/session'; -import { Ilc, IlcInterface } from '@env/decorators/component'; -import { Initial } from '@env/decorators/initial'; -import { Providers } from './providers/providers'; -import { Provider, ProviderData, ISelectEvent } from './providers/definitions/provider'; -import { IMenuItem, contextmenu } from '@ui/service/contextmenu'; -import { ChangesDetector } from '@ui/env/extentions/changes'; -import { ProviderFilters } from './filters/provider'; -import { ProviderCharts } from './charts/provider'; -import { ProviderDisabled } from './disabled/provider'; -import { stop } from '@ui/env/dom'; - -import * as dom from '@ui/env/dom'; -import * as ids from '@schema/ids'; - -@Component({ - selector: 'app-views-filters', - templateUrl: './template.html', - styleUrls: ['./styles.less'], - encapsulation: ViewEncapsulation.None, - changeDetection: ChangeDetectionStrategy.OnPush, - standalone: false, -}) -@Initial() -@Ilc() -export class Filters extends ChangesDetector implements OnDestroy, AfterContentInit { - @Input() session!: Session; - - public list: Provider[] = []; - public selected: Provider | undefined; - public providers!: Providers; - - private _focused: boolean = false; - - @HostBinding('attr.tabindex') get tabindex() { - return 0; - } - @HostListener('focus', ['$event.target']) onFocus() { - this._focused = true; - } - @HostListener('blur', ['$event.target']) onBlur() { - this._focused = false; - } - @HostListener('contextmenu', ['$event']) onContextMenu(event: MouseEvent) { - const items: IMenuItem[] = [ - { - caption: `Clear recent history`, - handler: () => { - this.log().debug(`Not implemented yet`); - }, - }, - ]; - this.providers.injectGeneralMenuItems(items); - contextmenu.show({ - items, - x: event.pageX, - y: event.pageY, - }); - dom.stop(event); - } - - constructor(cdRef: ChangeDetectorRef, private _self: ElementRef) { - super(cdRef); - this._onGlobalKeyUp = this._onGlobalKeyUp.bind(this); - } - - public ngOnDestroy() { - this.providers.destroy(); - window.removeEventListener('keyup', this._onGlobalKeyUp); - } - - public ngAfterContentInit(): void { - this.providers = new Providers(this.session, this.log()); - this.providers.add(ProviderData.filters, ProviderFilters); - this.providers.add(ProviderData.charts, ProviderCharts); - this.providers.add(ProviderData.disabled, ProviderDisabled); - this.list = this.providers.list(); - this.env().subscriber.register( - this.providers.subjects.get().select.subscribe((event: ISelectEvent | undefined) => { - if (event === undefined && this.selected !== undefined) { - this.selected = undefined; - } else if (event !== undefined) { - this.selected = event.provider; - } - this.detectChanges(); - }), - ); - this.env().subscriber.register( - this.providers.subjects.get().context.subscribe((event) => { - contextmenu.show({ - items: event.items, - x: event.event.pageX, - y: event.event.pageY, - }); - stop(event.event); - }), - ); - this.env().subscriber.register( - this.providers.subjects.get().change.subscribe(() => { - if ( - this.selected !== undefined && - this.selected.select().getEntities().length === 0 - ) { - this.selected = undefined; - } - this.detectChanges(); - }), - ); - this.env().subscriber.register( - this.providers.subjects.get().edit.subscribe((guid: string | undefined) => { - setTimeout(() => { - guid === undefined && (this._self.nativeElement as HTMLElement).focus(); - }); - }), - ); - window.addEventListener('keyup', this._onGlobalKeyUp); - } - - public onShowPresets(event: MouseEvent) { - const items: IMenuItem[] = [ - { - caption: `Open preset manager`, - handler: () => { - this.session.toolbar()?.setActive(ids.TOOLBAR_TAB_PRESET); - }, - }, - ]; - const session = this.ilc().services.system.history.get(this.session.uuid()); - const named = this.ilc().services.system.history.collections.find().named(); - if (named.length > 0 && session !== undefined) { - const history = session; - items.push({}); - named.forEach((col) => { - items.push({ - caption: col.name, - handler: () => { - history.apply(col); - }, - }); - }); - } - contextmenu.show({ - items: items, - x: event.pageX, - y: event.pageY, - }); - dom.stop(event); - } - - private _onGlobalKeyUp(event: KeyboardEvent) { - if (!this._focused) { - return; - } - switch (event.code) { - case 'ArrowUp': - this.providers.select().prev(); - break; - case 'ArrowDown': - this.providers.select().next(); - break; - case 'Enter': - this.providers.edit().in(); - break; - } - stop(event); - return false; - } -} -export interface Filters extends IlcInterface {} diff --git a/application/client/src/app/ui/views/sidebar/search/disabled/entity/component.ts b/application/client/src/app/ui/views/sidebar/search/disabled/entity/component.ts deleted file mode 100644 index b00fd2c73c..0000000000 --- a/application/client/src/app/ui/views/sidebar/search/disabled/entity/component.ts +++ /dev/null @@ -1,41 +0,0 @@ -import { Component, AfterContentInit, ViewChild } from '@angular/core'; -import { MatInput } from '@angular/material/input'; -import { DisabledRequest } from '@service/session/dependencies/search/disabled/request'; -import { ProviderDisabled } from '../provider'; -import { Ilc, IlcInterface } from '@env/decorators/component'; -import { EntityItem } from '../../base/entity'; - -@Component({ - selector: 'app-sidebar-disabled', - templateUrl: './template.html', - styleUrls: ['./styles.less'], - hostDirectives: EntityItem.HOST_DIRECTIVES, - standalone: false, -}) -@Ilc() -export class Disabled - extends EntityItem - implements AfterContentInit -{ - @ViewChild(MatInput) _inputRefCom!: MatInput; - - public display_name: string | undefined; - public icon: string | undefined; - - public ngAfterContentInit() { - this.env().subscriber.register( - this.provider.subjects.get().edit.subscribe((guid: string | undefined) => { - if (this.entity.uuid() === guid) { - this.detectChanges(); - if (this._inputRefCom !== undefined) { - this._inputRefCom.focus(); - } - } - }), - ); - const entity = this.entity.extract().entity(); - this.display_name = entity.disabled().displayName(); - this.icon = entity.disabled().icon(); - } -} -export interface Disabled extends IlcInterface {} diff --git a/application/client/src/app/ui/views/sidebar/search/disabled/entity/styles.less b/application/client/src/app/ui/views/sidebar/search/disabled/entity/styles.less deleted file mode 100644 index 97a292fd37..0000000000 --- a/application/client/src/app/ui/views/sidebar/search/disabled/entity/styles.less +++ /dev/null @@ -1,56 +0,0 @@ -@import '../../../../../styles/variables.less'; - - -:host { - display: flex; - position: relative; - flex-flow: row; - padding: 3px 12px 5px 24px; - overflow: hidden; - height: 20px; - cursor: default; - width: calc(100% - 36px); - &:hover{ - background: var(--scheme-color-5); - } - &.selected{ - background: var(--scheme-color-accent-fadeout-50); - } - span.icon { - flex: 0; - width: 18px; - max-width: 18px; - min-width: 18px; - display: block; - position: relative; - margin: 2px 0 0 0; - & .mat-icon{ - height: 18px; - width: 18px; - font-size: 18px; - } - } - span.request{ - flex: auto; - white-space: nowrap; - overflow: hidden; - text-overflow: ellipsis; - padding-left: 6px; - color: var(--scheme-color-0); - cursor: default; - } - &.cdk-drag-preview { - box-sizing: border-box; - box-shadow: 0 5px 5px -3px rgba(0, 0, 0, 0.2), - 0 8px 10px 1px rgba(0, 0, 0, 0.14), - 0 3px 14px 2px rgba(0, 0, 0, 0.12); - font-size: 14px; - line-height: 20px; - } - &.cdk-drag-placeholder { - opacity: 0; - } - &.cdk-drag-animating { - transition: transform 250ms cubic-bezier(0, 0, 0.2, 1); - } -} diff --git a/application/client/src/app/ui/views/sidebar/search/disabled/entity/template.html b/application/client/src/app/ui/views/sidebar/search/disabled/entity/template.html deleted file mode 100644 index e360561b02..0000000000 --- a/application/client/src/app/ui/views/sidebar/search/disabled/entity/template.html +++ /dev/null @@ -1,4 +0,0 @@ - - {{icon}} - -{{display_name}} diff --git a/application/client/src/app/ui/views/sidebar/search/disabled/list/component.ts b/application/client/src/app/ui/views/sidebar/search/disabled/list/component.ts deleted file mode 100644 index ec107b9a6f..0000000000 --- a/application/client/src/app/ui/views/sidebar/search/disabled/list/component.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { Component, AfterContentInit } from '@angular/core'; -import { DisabledRequest } from '@service/session/dependencies/search/disabled/request'; -import { ProviderDisabled } from '../provider'; -import { Ilc, IlcInterface } from '@env/decorators/component'; -import { Initial } from '@env/decorators/initial'; -import { EntitiesList, ListId } from '../../base/list'; - -@Component({ - selector: 'app-sidebar-disabled-list', - templateUrl: './template.html', - styleUrls: ['./styles.less'], - hostDirectives: [EntitiesList.HOST_DIRECTIVE], - standalone: false, -}) -@Initial() -@Ilc() -export class DisabledList - extends EntitiesList - implements AfterContentInit -{ - protected getListId(): ListId { - return ListId.Disabled; - } -} -export interface DisabledList extends IlcInterface {} diff --git a/application/client/src/app/ui/views/sidebar/search/disabled/list/styles.less b/application/client/src/app/ui/views/sidebar/search/disabled/list/styles.less deleted file mode 100644 index 23193efe51..0000000000 --- a/application/client/src/app/ui/views/sidebar/search/disabled/list/styles.less +++ /dev/null @@ -1,7 +0,0 @@ -@import '../../../../../styles/variables.less'; - -:host { - &.cdk-drop-list-dragging *:not(.cdk-drag-placeholder) { - transition: transform 250ms cubic-bezier(0, 0, 0.2, 1); - } -} diff --git a/application/client/src/app/ui/views/sidebar/search/disabled/list/template.html b/application/client/src/app/ui/views/sidebar/search/disabled/list/template.html deleted file mode 100644 index 2ab1f9e313..0000000000 --- a/application/client/src/app/ui/views/sidebar/search/disabled/list/template.html +++ /dev/null @@ -1,5 +0,0 @@ - \ No newline at end of file diff --git a/application/client/src/app/ui/views/sidebar/search/disabled/provider.ts b/application/client/src/app/ui/views/sidebar/search/disabled/provider.ts deleted file mode 100644 index 35d2192f36..0000000000 --- a/application/client/src/app/ui/views/sidebar/search/disabled/provider.ts +++ /dev/null @@ -1,262 +0,0 @@ -import { Entity } from '../providers/definitions/entity'; -import { Provider } from '../providers/definitions/provider'; -import { DisabledRequest } from '@service/session/dependencies/search/disabled/store'; -import { IComponentDesc } from '@elements/containers/dynamic/component'; -import { DisabledList } from './list/component'; -import { IMenuItem } from '@ui/service/contextmenu'; -import { DisableConvertable } from '@service/session/dependencies/search/disabled/converting'; -import { FilterRequest } from '@service/session/dependencies/search/filters/request'; -import { ChartRequest } from '@service/session/dependencies/search/charts/request'; - -export class ProviderDisabled extends Provider { - private readonly _entities: Map> = new Map(); - - public init(): void { - super.updatePanels(); - this.register( - this.session.search - .store() - .disabled() - .subjects.get() - .value.subscribe(() => { - super.change(); - this.select().drop(); - }), - ); - } - - public entities(): Array> { - const guids: string[] = []; - const entities = this.session.search - .store() - .disabled() - .get() - .map((item: DisabledRequest) => { - let entity = this._entities.get(item.uuid()); - if (entity === undefined) { - entity = new Entity(item); - } else { - entity.set(item); - } - this._entities.set(item.uuid(), entity); - guids.push(item.uuid()); - return entity; - }); - this._entities.forEach((_, guid: string) => { - if (guids.indexOf(guid) === -1) { - this._entities.delete(guid); - } - }); - return entities; - } - - public reorder(params: { prev: number; curt: number }) { - this.session.search.store().disabled().reorder(params); - super.change(); - } - - public getPanels(): { - list(): { - name(): string; - desc(): string; - comp(): IComponentDesc; - }; - details(): { - name(): string | undefined; - desc(): string | undefined; - comp(): IComponentDesc | undefined; - }; - nocontent(): { - name(): string | undefined; - desc(): string | undefined; - comp(): IComponentDesc | undefined; - }; - } { - return { - list: (): { - name(): string; - desc(): string; - comp(): IComponentDesc; - } => { - return { - name: (): string => { - return `Disabled`; - }, - desc: (): string => { - const count = this.entities().length; - return `${count} ${count > 1 ? 'entities' : 'entity'}`; - }, - comp: (): IComponentDesc => { - return { - factory: DisabledList, - inputs: { - provider: this, - session: this.session, - }, - }; - }, - }; - }, - details: (): { - name(): string | undefined; - desc(): string | undefined; - comp(): IComponentDesc | undefined; - } => { - return { - name: (): string | undefined => { - return undefined; - }, - desc: (): string | undefined => { - return undefined; - }, - comp: (): IComponentDesc | undefined => { - return undefined; - }, - }; - }, - nocontent: (): { - name(): string | undefined; - desc(): string | undefined; - comp(): IComponentDesc | undefined; - } => { - return { - name: (): string | undefined => { - return undefined; - }, - desc: (): string | undefined => { - return undefined; - }, - comp: (): IComponentDesc | undefined => { - return undefined; - }, - }; - }, - }; - } - - public getContextMenuItems(target: Entity, selected: Array>): IMenuItem[] { - const entities: DisableConvertable[] = selected - .filter((entity: Entity) => { - return !(entity.extract() instanceof DisabledRequest); - }) - .map((entity: Entity) => { - return entity.extract(); - }); - const disableds: DisabledRequest[] = selected - .filter((entity: Entity) => { - return entity.extract() instanceof DisabledRequest; - }) - .map((entity: Entity) => { - return entity.extract(); - }); - const items: IMenuItem[] = []; - if (entities.length > 0 && disableds.length === 0) { - items.push({ - caption: `Disable`, - handler: () => { - this.session.search.store().disabled().addFromEntity(entities); - this.session.search - .store() - .filters() - .delete(entities.map((en) => en.uuid())); - this.session.search - .store() - .charts() - .delete(entities.map((en) => en.uuid())); - }, - }); - } - if (entities.length === 0 && disableds.length > 0) { - items.push({ - caption: `Enable`, - handler: () => { - disableds.forEach((disabled: DisabledRequest) => { - let restored = false; - !restored && - (restored = this.session.search - .store() - .filters() - .tryRestore(disabled.entity())); - !restored && - (restored = this.session.search - .store() - .charts() - .tryRestore(disabled.entity())); - restored && - this.session.search.store().disabled().delete([disabled.uuid()]); - }); - }, - }); - } - return items; - } - - public search(target: Entity) { - const entity = target.extract(); - if (entity instanceof ChartRequest) { - this.session.search - .state() - .setActive({ - filter: entity.definition.filter, - flags: { reg: true, word: false, cases: false }, - }) - .catch((error: Error) => { - this.logger.error(`Fail to make search: ${error.message}`); - }); - } else if (entity instanceof FilterRequest) { - this.session.search - .state() - .setActive(entity.definition.filter) - .catch((error: Error) => { - this.logger.error(`Fail to make search: ${error.message}`); - }); - } - } - - public actions( - target: Entity, - selected: Array>, - ): { - activate?: () => void; - deactivate?: () => void; - remove?: () => void; - edit?: () => void; - } { - const disableds: DisabledRequest[] = selected - .filter((entity: Entity) => { - return entity.extract() instanceof DisabledRequest; - }) - .map((entity: Entity) => { - return entity.extract(); - }); - return { - remove: - disableds.length !== 0 - ? () => { - disableds.forEach((disabled: DisabledRequest) => { - this.session.search.store().disabled().delete([disabled.uuid()]); - }); - } - : undefined, - }; - } - - public tryToInsertEntity(entity: unknown, _index: number): boolean { - if (entity instanceof ChartRequest || entity instanceof FilterRequest) { - this.session.search.store().disabled().addFromEntity([entity]); - entity instanceof FilterRequest && - this.session.search.store().filters().delete([entity.uuid()]); - entity instanceof ChartRequest && - this.session.search.store().charts().delete([entity.uuid()]); - } - return false; - } - - public removeEntity(entity: unknown): boolean { - if (!(entity instanceof DisabledRequest)) { - return false; - } - this.session.search.store().disabled().delete([entity.uuid()]); - return true; - } -} diff --git a/application/client/src/app/ui/views/sidebar/search/filters/details/component.ts b/application/client/src/app/ui/views/sidebar/search/filters/details/component.ts deleted file mode 100644 index ef138b488f..0000000000 --- a/application/client/src/app/ui/views/sidebar/search/filters/details/component.ts +++ /dev/null @@ -1,146 +0,0 @@ -import { - Component, - ChangeDetectorRef, - AfterContentInit, - Input, - ViewChild, - ChangeDetectionStrategy, -} from '@angular/core'; -import { FilterRequest } from '@service/session/dependencies/search/filters/request'; -import { MatSelectChange, MatSelect } from '@angular/material/select'; -import { ProviderFilters } from '../provider'; -import { Entity } from '../../providers/definitions/entity'; -import { getContrastColor, CColors } from '@styles/colors'; -import { Ilc, IlcInterface } from '@env/decorators/component'; -import { Initial } from '@env/decorators/initial'; -import { ChangesDetector } from '@ui/env/extentions/changes'; - -type TColorType = 'color' | 'background'; - -interface IColorOption { - title: string; - value: TColorType; -} - -@Component({ - selector: 'app-sidebar-filters-details', - templateUrl: './template.html', - styleUrls: ['./styles.less'], - changeDetection: ChangeDetectionStrategy.OnPush, - standalone: false, -}) -@Initial() -@Ilc() -export class FilterDetails extends ChangesDetector implements AfterContentInit { - @ViewChild(MatSelect) _refSelect!: MatSelect; - - @Input() provider!: ProviderFilters; - - public request: string | undefined; - public color: string | undefined; - public background: string | undefined; - public colorOptions: IColorOption[] = [ - { title: 'Background', value: 'background' }, - { title: 'Foreground', value: 'color' }, - ]; - public colorType: TColorType = 'background'; - public currentColor: string | undefined; - public colors: string[] = []; - - private _entity: Entity | undefined; - - constructor(cdRef: ChangeDetectorRef) { - super(cdRef); - } - - public ngAfterContentInit() { - this.env().subscriber.register( - this.provider.subjects.get().selection.subscribe(this._init.bind(this)), - ); - this.env().subscriber.register( - this.provider.subjects.get().change.subscribe(this._onChange.bind(this)), - ); - this._init(); - } - - public _ng_onColorTypeChange(event: MatSelectChange) { - this.colorType = event.value; - switch (this.colorType) { - case 'color': - this.currentColor = this.color; - break; - case 'background': - this.currentColor = this.background; - break; - } - this._refSelect.close(); - this._setColors(); - this.detectChanges(); - } - - public _ng_onColorChange(color: string) { - if (this._entity === undefined) { - return; - } - switch (this.colorType) { - case 'color': - this.color = color; - this.background = getContrastColor(color, false); - break; - case 'background': - this.background = color; - this.color = getContrastColor(color, true); - break; - } - this._entity.extract().set().background(this.background); - this._entity.extract().set().color(this.color); - this.currentColor = color; - this.detectChanges(); - } - - private _setColors() { - this.colors = CColors.slice(); - let color: string | undefined; - switch (this.colorType) { - case 'color': - color = this.color; - break; - case 'background': - color = this.background; - break; - } - if (color === undefined || this.colors.find((c) => c === color) !== undefined) { - return; - } - this.colors.push(color); - this.detectChanges(); - } - - private _init() { - this._entity = this.provider.select().single(); - if (this._entity === undefined) { - this.request = undefined; - this.color = undefined; - this.background = undefined; - this.currentColor = undefined; - } else { - const def = this._entity.extract().definition; - this.request = def.filter.filter; - this.color = def.colors.color; - this.background = def.colors.background; - this.currentColor = def.colors.background; - this.colorType = 'background'; - this._setColors(); - } - this._onChange(); - } - - private _onChange() { - if (this._entity === undefined) { - return; - } - this.request = this._entity.extract().definition.filter.filter; - this.detectChanges(); - } -} -export interface FilterDetails extends IlcInterface {} diff --git a/application/client/src/app/ui/views/sidebar/search/filters/details/styles.less b/application/client/src/app/ui/views/sidebar/search/filters/details/styles.less deleted file mode 100644 index 9b72269a42..0000000000 --- a/application/client/src/app/ui/views/sidebar/search/filters/details/styles.less +++ /dev/null @@ -1,22 +0,0 @@ -@import '../../../../../styles/variables.less'; - - -:host { - position: relative; - display: block; - padding: 0 12px 0 24px; - & span.slitter{ - position: relative; - display: block; - height: 8px; - } - & p.sample{ - position: relative; - display: block; - margin: 0 4px; - padding: 2px 4px; - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; - } -} diff --git a/application/client/src/app/ui/views/sidebar/search/filters/details/template.html b/application/client/src/app/ui/views/sidebar/search/filters/details/template.html deleted file mode 100644 index 8fab214dc9..0000000000 --- a/application/client/src/app/ui/views/sidebar/search/filters/details/template.html +++ /dev/null @@ -1,16 +0,0 @@ - - Set color for - - - {{option.title}} - - - - - - - - - - -

{{request}}

\ No newline at end of file diff --git a/application/client/src/app/ui/views/sidebar/search/filters/filter/component.ts b/application/client/src/app/ui/views/sidebar/search/filters/filter/component.ts deleted file mode 100644 index d84ea146ef..0000000000 --- a/application/client/src/app/ui/views/sidebar/search/filters/filter/component.ts +++ /dev/null @@ -1,123 +0,0 @@ -import { - Component, - AfterContentInit, - HostBinding, - ViewChild, - ChangeDetectorRef, -} from '@angular/core'; -import { FilterRequest } from '@service/session/dependencies/search/filters/request'; -import { MatCheckboxChange } from '@angular/material/checkbox'; -import { MatInput } from '@angular/material/input'; -import { MatCheckbox } from '@angular/material/checkbox'; -import { ProviderFilters } from '../provider'; -import { Ilc, IlcInterface } from '@env/decorators/component'; -import { ChangesDetector } from '@ui/env/extentions/changes'; -import { State } from './state'; -import { stop } from '@ui/env/dom'; -import { EFlag } from '@platform/types/filter'; -import { EntityItem } from '../../base/entity'; - -@Component({ - selector: 'app-sidebar-filters-filter', - templateUrl: './template.html', - styleUrls: ['./styles.less'], - hostDirectives: EntityItem.HOST_DIRECTIVES, - standalone: false, -}) -@Ilc() -export class Filter extends EntityItem implements AfterContentInit { - @HostBinding('class.notvalid') get cssClassNotValid() { - return !FilterRequest.isValid({ - filter: this.state.filter.filter, - flags: { - cases: this.state.filter.flags.cases, - word: this.state.filter.flags.word, - reg: this.state.filter.flags.reg, - }, - }); - } - - @ViewChild(MatInput) _inputRefCom!: MatInput; - @ViewChild(MatCheckbox) _stateRefCom!: MatCheckbox; - - public state!: State; - public EFlag = EFlag; - - constructor(cdRef: ChangeDetectorRef) { - super(cdRef); - } - - public ngAfterContentInit() { - this.env().subscriber.register( - this.provider.subjects.get().edit.subscribe((guid: string | undefined) => { - if (this.entity.uuid() === guid) { - this.update(); - if (this._inputRefCom !== undefined) { - this._inputRefCom.focus(); - } - } - }), - ); - this.env().subscriber.register( - this.entity.extract().updated.subscribe((event) => { - if (event.inner().filter) { - this.state.update().filter(); - } else if (event.inner().colors) { - this.state.update().colors(); - } else if (event.inner().state) { - this.state.update().state(); - } else if (event.inner().stat) { - this.state.update().stat(); - } - this.update(); - }), - ); - this.state = new State(this.entity, this.provider); - } - - public _ng_onStateChange(event: MatCheckboxChange) { - this.state.setState(event.checked); - this.update(); - } - - public _ng_flagsToggle(event: MouseEvent, flag: EFlag) { - this.state.toggleFilter(flag); - stop(event); - } - - public _ng_onRequestInputKeyUp(event: KeyboardEvent) { - if (this.provider === undefined) { - return; - } - if (['Escape', 'Enter'].indexOf(event.code) === -1) { - return; - } - switch (event.code) { - case 'Escape': - this.state.edit().drop(); - break; - case 'Enter': - this.state.edit().accept(); - break; - } - this.update(); - } - - public _ng_onRequestInputBlur() { - if (this.provider === undefined) { - return; - } - this.state.edit().drop(); - this.update(); - } - - public _ng_onDoubleClick(event: MouseEvent) { - this.provider !== undefined && this.provider.select().doubleclick(event, this.entity); - } - - public update() { - this.detectChanges(); - ChangesDetector.detectChanges(this._stateRefCom); - } -} -export interface Filter extends IlcInterface {} diff --git a/application/client/src/app/ui/views/sidebar/search/filters/filter/state.ts b/application/client/src/app/ui/views/sidebar/search/filters/filter/state.ts deleted file mode 100644 index 5cbaa3ca42..0000000000 --- a/application/client/src/app/ui/views/sidebar/search/filters/filter/state.ts +++ /dev/null @@ -1,123 +0,0 @@ -import { EFlag, IFilter } from '@platform/types/filter'; -import { Entity } from '../../providers/definitions/entity'; -import { FilterRequest } from '@service/session/dependencies/search/filters/request'; -import { ProviderFilters } from '../provider'; - -import * as obj from '@platform/env/obj'; - -export interface IFilterColors { - color: string; - background: string; -} - -export class State { - public filter: IFilter; - public colors: IFilterColors; - public active: boolean = false; - public provider: ProviderFilters; - public entity: Entity; - public found: number = 0; - - private _isValidRegex: boolean = true; - private _error: string | undefined; - - constructor(entity: Entity, prodider: ProviderFilters) { - this.filter = obj.clone(entity.extract().definition.filter); - this.colors = obj.clone(entity.extract().definition.colors); - this.active = entity.extract().definition.active; - this.provider = prodider; - this.entity = entity; - this._update(); - } - - public get isValidRegex(): boolean { - return this._isValidRegex; - } - - public setState(checked: boolean) { - this.active = checked; - this.entity.extract().set().state(checked); - } - - public update(): { - filter(): void; - colors(): void; - state(): void; - stat(): void; - } { - return { - filter: (): void => { - this.filter = obj.clone(this.entity.extract().definition.filter); - }, - colors: (): void => { - this.colors = obj.clone(this.entity.extract().definition.colors); - }, - state: (): void => { - this.active = this.entity.extract().definition.active; - }, - stat: (): void => { - this.found = this.entity.extract().found; - }, - }; - } - - public toggleFilter(flag: EFlag) { - if (!this._canToggle(flag)) { - return; - } - this.filter.flags[flag] = !this.filter.flags[flag]; - this.entity.extract().set().flags(this.filter.flags); - } - - public edit(): { - drop(): void; - accept(): void; - } { - return { - drop: (): void => { - this.filter.filter = this.entity.extract().definition.filter.filter; - this.provider.edit().out(); - }, - accept: (): void => { - this._update(); - if (this.filter.filter.trim() !== '' && this._error === undefined) { - this.entity.extract().set().filter(this.filter.filter); - } else { - this.filter.filter = this.entity.extract().definition.filter.filter; - } - this.provider.edit().out(); - }, - }; - } - - public get error(): string | undefined { - return this._error; - } - - private _canToggle(flag: EFlag): boolean { - return ( - (flag === EFlag.reg && !this.filter.flags.reg && this._isValidRegex) || - this.filter.flags.reg - ); - } - - private _update() { - this._checkSpecifiedRegex(); - this._checkGeneralRegex(); - } - - private _checkSpecifiedRegex() { - this._error = FilterRequest.getValidationError(this.filter); - } - - private _checkGeneralRegex() { - this._isValidRegex = FilterRequest.isValid({ - filter: this.filter.filter, - flags: { - cases: this.filter.flags.cases, - word: this.filter.flags.word, - reg: true, - }, - }); - } -} diff --git a/application/client/src/app/ui/views/sidebar/search/filters/filter/styles.less b/application/client/src/app/ui/views/sidebar/search/filters/filter/styles.less deleted file mode 100644 index ce6d055350..0000000000 --- a/application/client/src/app/ui/views/sidebar/search/filters/filter/styles.less +++ /dev/null @@ -1,146 +0,0 @@ -@import '../../../../../styles/variables.less'; - - -:host { - display: flex; - position: relative; - flex-flow: row; - padding: 3px 12px 5px 24px; - overflow: hidden; - height: 20px; - cursor: default; - align-items: center; - width: calc(100% - 24px); - &.notvalid { - background: var(--scheme-color-warning-fadeout-50); - &::after { - display: block; - content: '⚠'; - font-size: 8px; - color: #fd1515; - top: 3px; - left: 8px; - position: absolute; - } - input.request { - color: var(--scheme-color-error); - border-bottom: dashed 1px var(--scheme-color-error); - } - } - &:hover{ - background: var(--scheme-color-5); - } - &.selected{ - background: var(--scheme-color-accent-fadeout-50); - } - div.doubleclick { - display: contents; - flex: auto; - } - span.color { - flex: 0; - width: 8px; - max-width: 8px; - min-width: 8px; - min-height: 16px; - display: block; - position: relative; - margin: 2px 0 2px 0; - } - span.background { - flex: 0; - width: 8px; - max-width: 8px; - min-width: 8px; - min-height: 16px; - display: block; - position: relative; - margin: 2px 0 2px 0; - } - span.request{ - flex: auto; - white-space: nowrap; - overflow: hidden; - text-overflow: ellipsis; - padding-left: 6px; - color: var(--scheme-color-0); - cursor: default; - } - span.found { - flex: 0; - white-space: nowrap; - color: var(--scheme-color-0); - padding: 0 6px; - font-size: 12px; - margin: 0; - border: thin solid var(--scheme-color-active); - background: var(--scheme-color-active); - border-radius: 6px; - } - input.request { - margin: 0 8px; - padding: 0; - border: none; - border-bottom: dashed 1px var(--scheme-color-1); - flex: auto; - white-space: nowrap; - color: var(--scheme-color-0); - background: none; - outline: none; - } - span.flags { - display: flex; - flex-direction: row; - align-items: center; - flex: 0; - padding-right: 8px; - & span { - font-size: 14px; - line-height: 14px; - vertical-align: bottom; - cursor: default; - &.active{ - color: var(--scheme-color-0); - } - &.inactive{ - color: var(--scheme-color-3); - } - &.invalid { - color: var(--scheme-color-error); - } - } - } - &.edited { - &::after{ - display: none; - } - padding-left: 0; - background: var(--scheme-color-6); - mat-checkbox { - display: none; - } - span.color { - display: none; - } - span.background { - display: none; - } - span.flags { - display: none; - } - } - &.cdk-drag-preview { - box-sizing: border-box; - box-shadow: 0 5px 5px -3px rgba(0, 0, 0, 0.2), - 0 8px 10px 1px rgba(0, 0, 0, 0.14), - 0 3px 14px 2px rgba(0, 0, 0, 0.12); - font-size: 14px; - line-height: 20px; - } - &.cdk-drag-placeholder { - opacity: 0; - } - &.cdk-drag-animating { - transition: transform 250ms cubic-bezier(0, 0, 0.2, 1); - } -} diff --git a/application/client/src/app/ui/views/sidebar/search/filters/filter/template.html b/application/client/src/app/ui/views/sidebar/search/filters/filter/template.html deleted file mode 100644 index 02f049c6ba..0000000000 --- a/application/client/src/app/ui/views/sidebar/search/filters/filter/template.html +++ /dev/null @@ -1,19 +0,0 @@ - -
- - - {{state.filter.filter}} - -
-{{state.found}} - - - - - diff --git a/application/client/src/app/ui/views/sidebar/search/filters/list/component.ts b/application/client/src/app/ui/views/sidebar/search/filters/list/component.ts deleted file mode 100644 index 096d7567d4..0000000000 --- a/application/client/src/app/ui/views/sidebar/search/filters/list/component.ts +++ /dev/null @@ -1,22 +0,0 @@ -import { Component } from '@angular/core'; -import { FilterRequest } from '@service/session/dependencies/search/filters/request'; -import { ProviderFilters } from '../provider'; -import { Ilc, IlcInterface } from '@env/decorators/component'; -import { Initial } from '@env/decorators/initial'; -import { EntitiesList, ListId } from '../../base/list'; - -@Component({ - selector: 'app-sidebar-filters-list', - templateUrl: './template.html', - styleUrls: ['./styles.less'], - hostDirectives: [EntitiesList.HOST_DIRECTIVE], - standalone: false, -}) -@Initial() -@Ilc() -export class FiltersList extends EntitiesList { - protected getListId(): ListId { - return ListId.Filters; - } -} -export interface FiltersList extends IlcInterface {} diff --git a/application/client/src/app/ui/views/sidebar/search/filters/list/styles.less b/application/client/src/app/ui/views/sidebar/search/filters/list/styles.less deleted file mode 100644 index 23193efe51..0000000000 --- a/application/client/src/app/ui/views/sidebar/search/filters/list/styles.less +++ /dev/null @@ -1,7 +0,0 @@ -@import '../../../../../styles/variables.less'; - -:host { - &.cdk-drop-list-dragging *:not(.cdk-drag-placeholder) { - transition: transform 250ms cubic-bezier(0, 0, 0.2, 1); - } -} diff --git a/application/client/src/app/ui/views/sidebar/search/filters/list/template.html b/application/client/src/app/ui/views/sidebar/search/filters/list/template.html deleted file mode 100644 index 2f16f6444c..0000000000 --- a/application/client/src/app/ui/views/sidebar/search/filters/list/template.html +++ /dev/null @@ -1,5 +0,0 @@ - \ No newline at end of file diff --git a/application/client/src/app/ui/views/sidebar/search/filters/placeholder/component.ts b/application/client/src/app/ui/views/sidebar/search/filters/placeholder/component.ts deleted file mode 100644 index 8536746921..0000000000 --- a/application/client/src/app/ui/views/sidebar/search/filters/placeholder/component.ts +++ /dev/null @@ -1,22 +0,0 @@ -import { Component } from '@angular/core'; -import { ProviderFilters } from '../provider'; -import { Ilc, IlcInterface } from '@env/decorators/component'; -import { Initial } from '@env/decorators/initial'; -import { EntitiesList, ListId } from '../../base/list'; -import { FilterRequest } from '@service/session/dependencies/search/filters/request'; - -@Component({ - selector: 'app-sidebar-filters-placeholder', - templateUrl: './template.html', - styleUrls: ['./styles.less'], - hostDirectives: [EntitiesList.HOST_DIRECTIVE], - standalone: false, -}) -@Initial() -@Ilc() -export class FiltersPlaceholder extends EntitiesList { - protected getListId(): ListId { - return ListId.Filters; - } -} -export interface FiltersPlaceholder extends IlcInterface {} diff --git a/application/client/src/app/ui/views/sidebar/search/filters/placeholder/styles.less b/application/client/src/app/ui/views/sidebar/search/filters/placeholder/styles.less deleted file mode 100644 index e25d6a97e6..0000000000 --- a/application/client/src/app/ui/views/sidebar/search/filters/placeholder/styles.less +++ /dev/null @@ -1,4 +0,0 @@ -:host { - display: block; - padding: 0 24px; -} \ No newline at end of file diff --git a/application/client/src/app/ui/views/sidebar/search/filters/placeholder/template.html b/application/client/src/app/ui/views/sidebar/search/filters/placeholder/template.html deleted file mode 100644 index 8906226b41..0000000000 --- a/application/client/src/app/ui/views/sidebar/search/filters/placeholder/template.html +++ /dev/null @@ -1 +0,0 @@ -

No filters

\ No newline at end of file diff --git a/application/client/src/app/ui/views/sidebar/search/filters/provider.ts b/application/client/src/app/ui/views/sidebar/search/filters/provider.ts deleted file mode 100644 index 265a72caec..0000000000 --- a/application/client/src/app/ui/views/sidebar/search/filters/provider.ts +++ /dev/null @@ -1,309 +0,0 @@ -import { Entity } from '../providers/definitions/entity'; -import { Provider } from '../providers/definitions/provider'; -import { FilterRequest } from '@service/session/dependencies/search/filters/store'; -import { DisabledRequest } from '@service/session/dependencies/search/disabled/request'; -import { IComponentDesc } from '@elements/containers/dynamic/component'; -import { FiltersList } from './list/component'; -import { FiltersPlaceholder } from './placeholder/component'; -import { FilterDetails } from './details/component'; -import { IMenuItem } from '@ui/service/contextmenu'; -import { ChartRequest } from '@service/session/dependencies/search/charts/request'; - -export class ProviderFilters extends Provider { - private _entities: Map> = new Map(); - - public init(): void { - this.updatePanels(); - this.register( - this.session.search - .store() - .filters() - .subjects.get() - .value.subscribe(() => { - super.change(); - }), - ); - this.register( - this.session.search.subjects.get().updated.subscribe((event) => { - this._entities.forEach((entity) => { - const alias = entity.extract().alias(); - const stat = event.stat.get(alias); - entity - .extract() - .set() - .found(stat === undefined ? 0 : stat); - }); - }), - ); - } - - public entities(): Array> { - const guids: string[] = []; - const entities = this.session.search - .store() - .filters() - .get() - .map((filter: FilterRequest) => { - let entity = this._entities.get(filter.definition.uuid); - if (entity === undefined) { - entity = new Entity(filter); - } else { - entity.set(filter); - } - this._entities.set(filter.definition.uuid, entity); - guids.push(filter.definition.uuid); - return entity; - }); - this._entities.forEach((_, guid: string) => { - if (guids.indexOf(guid) === -1) { - this._entities.delete(guid); - } - }); - return entities; - } - - public reorder(params: { prev: number; curt: number }) { - this.session.search.store().filters().reorder(params); - super.change(); - } - - public getPanels(): { - list(): { - name(): string; - desc(): string; - comp(): IComponentDesc; - }; - details(): { - name(): string | undefined; - desc(): string | undefined; - comp(): IComponentDesc | undefined; - }; - nocontent(): { - name(): string | undefined; - desc(): string | undefined; - comp(): IComponentDesc | undefined; - }; - } { - return { - list: (): { - name(): string; - desc(): string; - comp(): IComponentDesc; - } => { - return { - name: (): string => { - return `Filters`; - }, - desc: (): string => { - const count = this.entities().length; - return `${count} filter${count > 1 ? 's' : ''}`; - }, - comp: (): IComponentDesc => { - return { - factory: FiltersList, - inputs: { - provider: this, - session: this.session, - }, - }; - }, - }; - }, - details: (): { - name(): string | undefined; - desc(): string | undefined; - comp(): IComponentDesc | undefined; - } => { - return { - name: (): string | undefined => { - return `Filter Details`; - }, - desc: (): string | undefined => { - if (this.select().get().length !== 1) { - return ''; - } - const selection = this._entities.get(this.select().get()[0]); - if (selection === undefined) { - return ''; - } - return selection.extract().definition.filter.filter; - }, - comp: (): IComponentDesc | undefined => { - return { - factory: FilterDetails, - inputs: { - provider: this, - }, - }; - }, - }; - }, - nocontent: (): { - name(): string | undefined; - desc(): string | undefined; - comp(): IComponentDesc | undefined; - } => { - return { - name: (): string | undefined => { - return `Filters`; - }, - desc: (): string | undefined => { - return undefined; - }, - comp: (): IComponentDesc | undefined => { - return { - factory: FiltersPlaceholder, - inputs: { - provider: this, - }, - }; - }, - }; - }, - }; - } - - public getContextMenuItems(_target: Entity, selected: Array>): IMenuItem[] { - if (selected.length !== 1) { - return []; - } - const entity = selected[0].extract(); - const items: IMenuItem[] = []; - if (selected[0].extract() instanceof FilterRequest) { - items.push( - ...[ - { - caption: `Show Matches`, - handler: () => { - this.search(selected[0]); - }, - }, - {}, - { - caption: `Into Chart`, - disabled: !this.session.search.store().charts().isConvertableFrom(entity), - handler: () => { - if (!this.session.search.store().charts().tryFromFilter(entity)) { - return; - } - this.session.search.store().filters().delete([entity.uuid()]); - }, - }, - ], - ); - } - return items; - } - - public search(entity: Entity) { - this.session.switch().toolbar.search(); - this.session.search - .state() - .setActive(entity.extract().definition.filter) - .catch((error: Error) => { - this.logger.error(`Fail to make search: ${error.message}`); - }); - } - - public actions( - target: Entity, - selected: Array>, - ): { - activate?: () => void; - deactivate?: () => void; - remove?: () => void; - edit?: () => void; - } { - const actions: { - activate?: () => void; - deactivate?: () => void; - remove?: () => void; - edit?: () => void; - } = {}; - const self = this; - const entities = selected.filter((entity: Entity) => { - return entity.extract() instanceof FilterRequest; - }); - actions.activate = - entities.filter((entity: Entity) => { - return entity.extract().definition.active === false; - }).length !== 0 - ? () => { - entities.forEach((entity: Entity) => { - entity.extract().set(true).state(true); - }); - this.session.search.store().filters().refresh(); - } - : undefined; - actions.deactivate = - entities.filter((entity: Entity) => { - return entity.extract().definition.active === true; - }).length !== 0 - ? () => { - entities.forEach((entity: Entity) => { - entity.extract().set(true).state(false); - }); - this.session.search.store().filters().refresh(); - } - : undefined; - actions.edit = - selected.length === 1 && entities.length === 1 - ? () => { - // View should be focused to switch to edit-mode, but while context - // menu is open, there are no focus. Well, that's why settimer here. - setTimeout(() => { - self.edit().in(); - }); - } - : undefined; - actions.remove = - entities.length !== 0 - ? () => { - if (entities.length === self.entities().length) { - this.session.search.store().filters().clear(); - self.change(); - } else { - entities.forEach((entity: Entity) => { - this.session.search.store().filters().delete([entity.uuid()]); - }); - } - } - : undefined; - return actions; - } - - public tryToInsertEntity(entity: unknown, _index: number): boolean { - if (entity instanceof ChartRequest) { - if ( - this.session.search - .store() - .filters() - .addFromFilter({ - filter: entity.as().filter(), - flags: { reg: true, word: false, cases: false }, - }) - ) { - this.session.search.store().charts().delete([entity.uuid()]); - return true; - } else { - return false; - } - } else if (entity instanceof DisabledRequest) { - if (this.session.search.store().filters().tryRestore(entity.entity())) { - this.session.search.store().disabled().delete([entity.uuid()]); - return true; - } else { - return false; - } - } - return false; - } - - public removeEntity(entity: unknown): boolean { - if (!(entity instanceof FilterRequest)) { - return false; - } - this.session.search.store().filters().delete([entity.uuid()]); - return true; - } -} diff --git a/application/client/src/app/ui/views/sidebar/search/module.ts b/application/client/src/app/ui/views/sidebar/search/module.ts deleted file mode 100644 index 03b8a50032..0000000000 --- a/application/client/src/app/ui/views/sidebar/search/module.ts +++ /dev/null @@ -1,74 +0,0 @@ -import { NgModule } from '@angular/core'; -import { CommonModule } from '@angular/common'; -import { ContainersModule } from '@elements/containers/module'; -import { AppDirectiviesModule } from '@directives/module'; -import { DragDropModule } from '@angular/cdk/drag-drop'; -import { MatIconModule } from '@angular/material/icon'; -import { MatButtonModule } from '@angular/material/button'; -import { MatAutocompleteModule } from '@angular/material/autocomplete'; -import { MatOptionModule } from '@angular/material/core'; -import { MatFormFieldModule } from '@angular/material/form-field'; -import { MatInputModule } from '@angular/material/input'; -import { MatProgressBarModule } from '@angular/material/progress-bar'; -import { MatProgressSpinnerModule } from '@angular/material/progress-spinner'; -import { MatCheckboxModule } from '@angular/material/checkbox'; -import { MatSelectModule } from '@angular/material/select'; -import { MatExpansionModule } from '@angular/material/expansion'; -import { MatSliderModule } from '@angular/material/slider'; -import { FormsModule, ReactiveFormsModule } from '@angular/forms'; -import { ColorSelectorModule } from '@elements/color.selector/module'; -import { Filters } from './component'; -import { FilterDetails } from './filters/details/component'; -import { Filter } from './filters/filter/component'; -import { FiltersList } from './filters/list/component'; -import { FiltersPlaceholder } from './filters/placeholder/component'; -import { ChartrDetails } from './charts/details/component'; -import { Chart } from './charts/chart/component'; -import { ChartsList } from './charts/list/component'; -import { ChartsPlaceholder } from './charts/placeholder/component'; -import { Disabled } from './disabled/entity/component'; -import { DisabledList } from './disabled/list/component'; -import { TeamworkAppletModule } from '@elements/teamwork/module'; -import { Bin } from './bin/component'; - -@NgModule({ - imports: [ - CommonModule, - ContainersModule, - AppDirectiviesModule, - MatIconModule, - MatAutocompleteModule, - MatOptionModule, - MatFormFieldModule, - MatInputModule, - MatProgressBarModule, - MatProgressSpinnerModule, - MatSelectModule, - MatCheckboxModule, - MatExpansionModule, - MatButtonModule, - FormsModule, - ReactiveFormsModule, - DragDropModule, - MatSliderModule, - ColorSelectorModule, - TeamworkAppletModule, - ], - declarations: [ - Filters, - FilterDetails, - Filter, - FiltersList, - FiltersPlaceholder, - ChartrDetails, - Chart, - ChartsList, - ChartsPlaceholder, - Disabled, - DisabledList, - Bin, - ], - exports: [Filters], - bootstrap: [Filters], -}) -export class FiltersModule {} diff --git a/application/client/src/app/ui/views/sidebar/search/providers/definitions/entity.data.ts b/application/client/src/app/ui/views/sidebar/search/providers/definitions/entity.data.ts deleted file mode 100644 index a1774a87da..0000000000 --- a/application/client/src/app/ui/views/sidebar/search/providers/definitions/entity.data.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { Entity } from './entity'; -import { DisabledRequest } from '@service/session/dependencies/search/disabled/request'; - -export class EntityData { - private _entries: Entity[] | undefined; - private _disabled: Entity[] | undefined; - - constructor(params: { entities?: Entity[]; disabled?: Entity[] }) { - this._entries = params.entities instanceof Array ? params.entities : undefined; - this._disabled = params.disabled instanceof Array ? params.disabled : undefined; - } - - public get entries(): Entity[] | undefined { - return this._entries; - } - - public get disabled(): Entity[] | undefined { - return this._disabled; - } -} diff --git a/application/client/src/app/ui/views/sidebar/search/providers/definitions/entity.state.edit.ts b/application/client/src/app/ui/views/sidebar/search/providers/definitions/entity.state.edit.ts deleted file mode 100644 index e632bd8d18..0000000000 --- a/application/client/src/app/ui/views/sidebar/search/providers/definitions/entity.state.edit.ts +++ /dev/null @@ -1,15 +0,0 @@ -export class EntityEditState { - private _edit: boolean = false; - - public in() { - this._edit = true; - } - - public out() { - this._edit = false; - } - - public state(): boolean { - return this._edit; - } -} diff --git a/application/client/src/app/ui/views/sidebar/search/providers/definitions/entity.ts b/application/client/src/app/ui/views/sidebar/search/providers/definitions/entity.ts deleted file mode 100644 index 0c4684c558..0000000000 --- a/application/client/src/app/ui/views/sidebar/search/providers/definitions/entity.ts +++ /dev/null @@ -1,27 +0,0 @@ -import { EntityEditState } from './entity.state.edit'; -import { Recognizable } from '@platform/types/storage/entry'; - -export class Entity { - private _entity: T & Recognizable; - private _editState: EntityEditState = new EntityEditState(); - - constructor(entity: T & Recognizable) { - this._entity = entity; - } - - public uuid(): string { - return this._entity.uuid(); - } - - public extract(): T & Recognizable { - return this._entity; - } - - public set(entity: T & Recognizable) { - this._entity = entity; - } - - public getEditState(): EntityEditState { - return this._editState; - } -} diff --git a/application/client/src/app/ui/views/sidebar/search/providers/definitions/events.ts b/application/client/src/app/ui/views/sidebar/search/providers/definitions/events.ts deleted file mode 100644 index 6386816c1b..0000000000 --- a/application/client/src/app/ui/views/sidebar/search/providers/definitions/events.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { Subject } from '@platform/env/subscription'; -import { ISelectEvent, IContextMenuEvent, IDoubleclickEvent } from './provider'; - -export interface ProvidersEvents { - select: Subject; - context: Subject; - doubleclick: Subject; - change: Subject; - edit: Subject; - dragging: Subject; -} - -export interface ProviderEvents { - change: Subject; - selection: Subject; - edit: Subject; - context: Subject; - doubleclick: Subject; -} diff --git a/application/client/src/app/ui/views/sidebar/search/providers/definitions/keyboard.listener.ts b/application/client/src/app/ui/views/sidebar/search/providers/definitions/keyboard.listener.ts deleted file mode 100644 index 3639169e94..0000000000 --- a/application/client/src/app/ui/views/sidebar/search/providers/definitions/keyboard.listener.ts +++ /dev/null @@ -1,48 +0,0 @@ -export class KeyboardListener { - private _ctrl: boolean = false; - private _shift: boolean = false; - - constructor() { - this._keyup = this._keyup.bind(this); - this._keydown = this._keydown.bind(this); - window.addEventListener('keyup', this._keyup); - window.addEventListener('keydown', this._keydown); - } - - public destroy() { - window.removeEventListener('keyup', this._keyup); - window.removeEventListener('keydown', this._keydown); - } - - public ctrl(): boolean { - return this._ctrl; - } - - public shift(): boolean { - return this._shift; - } - - public ignore_ctrl_shift() { - this._shift = false; - this._ctrl = false; - } - - private _keyup() { - this._ctrl = false; - this._shift = false; - } - - private _keydown(event: KeyboardEvent) { - if (event.shiftKey) { - this._shift = true; - return; - } - if (['MetaLeft', 'MetaRight'].indexOf(event.code) !== -1) { - // OSX - this._ctrl = true; - } else { - // Others - this._ctrl = event.ctrlKey; - } - } -} diff --git a/application/client/src/app/ui/views/sidebar/search/providers/definitions/provider.ts b/application/client/src/app/ui/views/sidebar/search/providers/definitions/provider.ts deleted file mode 100644 index 54ab9aa9f0..0000000000 --- a/application/client/src/app/ui/views/sidebar/search/providers/definitions/provider.ts +++ /dev/null @@ -1,433 +0,0 @@ -import { Subject, Subscriber, Subjects } from '@platform/env/subscription'; -import { Entity } from './entity'; -import { IComponentDesc } from '@elements/containers/dynamic/component'; -import { KeyboardListener } from './keyboard.listener'; -import { IMenuItem } from '@ui/service/contextmenu'; -import { unique } from '@platform/env/sequence'; -import { Logger } from '@platform/log'; -import { Session } from '@service/session/session'; -import { ProvidersEvents, ProviderEvents } from './events'; -import { Mutable } from '@platform/types/unity/mutable'; - -export interface ProviderConstructor { - new (session: Session, logger: Logger): Provider; -} - -export enum ProviderData { - filters = 'filters', - charts = 'charts', - ranges = 'ranges', - disabled = 'disabled', -} - -export interface ISelectEvent { - provider: Provider; - entity: Entity | undefined; - guids: string[]; - sender?: string; -} - -export interface IContextMenuEvent { - event: MouseEvent; - provider: Provider; - entity: Entity; - items?: IMenuItem[]; -} - -export interface IDoubleclickEvent { - event: MouseEvent; - provider: Provider; - entity: Entity; -} - -export interface ISelection { - guid: string; // GUID of entity - sender?: string; // Name of provider/controller/etc who emits actions (we need it to prevent loop in event circle) - ignore?: boolean; // true - drops state of ctrl and shift; false - ctrl and shift would be considering - toggle?: boolean; // used only with single selection - // true - if entity already selected, selection would be dropped - // false - defined entity would be selected in anyway -} - -export enum EActions { - enable = 'enable', - disable = 'disable', - remove = 'remove', - activate = 'activate', - deactivate = 'deactivate', - edit = 'edit', -} - -interface IStoredSelection { - current: string[]; - last: Entity | undefined; -} - -type ProvidersGetter = () => Provider[]; - -export abstract class Provider extends Subscriber { - public subjects: Subjects = new Subjects({ - change: new Subject(), - selection: new Subject(), - edit: new Subject(), - context: new Subject(), - doubleclick: new Subject(), - }); - public readonly session: Session; - public readonly logger: Logger; - public readonly uuid: string = unique(); - public readonly events!: Subjects; - - public panels!: { - list: { - name: string; - desc: string; - comp: IComponentDesc; - }; - details: { - name: string | undefined; - desc: string | undefined; - comp: IComponentDesc | undefined; - }; - nocontent: { - name: string | undefined; - desc: string | undefined; - comp: IComponentDesc | undefined; - }; - }; - - private _selection: IStoredSelection = { - current: [], - last: undefined, - }; - private _keyboard: KeyboardListener | undefined; - private _providers: ProvidersGetter | undefined; - - constructor(session: Session, logger: Logger) { - super(); - this.session = session; - this.logger = logger; - } - - public destroy() { - this.unsubscribe(); - this.subjects.destroy(); - } - - public setKeyboardListener(listener: KeyboardListener) { - this._keyboard = listener; - } - - public setProvidersGetter(getter: () => Provider[]) { - this._providers = getter; - } - - public setProvidersEvents(subjects: Subjects): void { - (this as Mutable>).events = subjects; - } - - public setLastSelection(selection: Entity | undefined) { - this._selection.last = selection; - } - - public select(): { - first: () => void; - last: () => void; - next: () => boolean; - prev: () => boolean; - drop: (sender?: string) => void; - apply: (sender: string, guids: string[]) => void; - get: () => string[]; - getEntities: () => Array>; - set: (selection: ISelection) => void; - single: () => Entity | undefined; - context: (event: MouseEvent, entity: Entity) => void; - doubleclick: (event: MouseEvent, entity: Entity) => void; - } { - const setSelection: (selection: ISelection) => void = (selection: ISelection) => { - const index: number = this._selection.current.indexOf(selection.guid); - let entity: Entity | undefined; - if (this._keyboard !== undefined && selection.ignore) { - this._keyboard.ignore_ctrl_shift(); - } - if (this._keyboard !== undefined && this._keyboard.ctrl()) { - if (index === -1) { - this._selection.current.push(selection.guid); - entity = this.entities().find((e) => e.uuid() === selection.guid); - } - } else if ( - this._keyboard !== undefined && - this._providers !== undefined && - this._keyboard.shift() && - this._selection.last !== undefined - ) { - let guids: string[] = ([] as string[]).concat.apply( - [], - this._providers().map((p) => p.entities().map((e) => e.uuid())), - ); - const from: number = guids.findIndex((g) => g === this._selection.last?.uuid()); - const to: number = guids.findIndex((g) => g === selection.guid); - if (from !== -1 && to !== -1) { - guids = guids.slice(Math.min(from, to), Math.max(from, to) + 1); - this._selection.current = this._selection.current.concat( - guids.filter((g) => this._selection.current.indexOf(g) === -1), - ); - } - entity = this._selection.last; - } else { - if (index === -1) { - this._selection.current = [selection.guid]; - entity = this.entities().find((e) => e.uuid() === selection.guid); - } else { - if (selection.toggle !== false) { - this._selection.current = []; - } - } - } - this.subjects.get().selection.emit({ - provider: this, - entity: entity, - guids: this.select().get(), - sender: selection.sender, - }); - }; - return { - first: () => { - const entities = this.entities(); - if (entities.length === 0) { - return; - } - setSelection({ - guid: entities[0].uuid(), - sender: 'self.first', - }); - }, - last: () => { - const entities = this.entities(); - if (entities.length === 0) { - return; - } - setSelection({ - guid: entities[entities.length - 1].uuid(), - sender: 'self.last', - }); - }, - next: () => { - if (this._selection.current.length !== 1) { - return false; - } - const entities = this.entities(); - let index: number = -1; - entities.forEach((entity, i) => { - if (entity.uuid() === this._selection.current[0]) { - index = i; - } - }); - if (index === -1) { - return false; - } - if (index + 1 > entities.length - 1) { - return false; - } - setSelection({ - guid: entities[index + 1].uuid(), - sender: 'self.next', - }); - return true; - }, - prev: () => { - if (this._selection.current.length !== 1) { - return false; - } - const entities = this.entities(); - let index: number = -1; - entities.forEach((entity, i) => { - if (entity.uuid() === this._selection.current[0]) { - index = i; - } - }); - if (index === -1) { - return false; - } - if (index - 1 < 0) { - return false; - } - setSelection({ - guid: entities[index - 1].uuid(), - sender: 'self.next', - }); - return true; - }, - drop: (sender?: string) => { - if (this._selection.current.length === 0) { - return; - } - this._selection.current = []; - this.subjects.get().selection.emit({ - provider: this, - entity: undefined, - guids: this.select().get(), - sender: sender, - }); - }, - apply: (sender: string, guids: string[]) => { - const own: string[] = this.entities().map((e) => e.uuid()); - this._selection.current = guids.filter((g) => own.indexOf(g) !== -1); - this.subjects.get().selection.emit({ - provider: this, - entity: undefined, - guids: this.select().get(), - sender: sender, - }); - }, - get: () => { - return this._selection.current.slice(); - }, - getEntities: () => { - const entities: Entity[] = []; - this.entities().forEach((entity: Entity) => { - if (this._selection.current.indexOf(entity.uuid()) === -1) { - return; - } - entities.push(entity); - }); - return entities; - }, - set: setSelection, - single: () => { - if (this._selection.current.length !== 1) { - return undefined; - } - return this.entities().find((entity: Entity) => { - return entity.uuid() === this._selection.current[0]; - }); - }, - context: (event: MouseEvent, entity: Entity) => { - this.subjects.get().context.emit({ - event: event, - entity: entity, - provider: this, - }); - }, - doubleclick: (event: MouseEvent, entity: Entity) => { - this.subjects.get().doubleclick.emit({ - event: event, - entity: entity, - provider: this, - }); - setSelection({ - guid: entity.uuid(), - sender: 'self.doubleclick', - toggle: false, - }); - }, - }; - } - - public edit(): { - in: () => void; - out: () => void; - } { - return { - in: () => { - if (this._selection.current.length !== 1) { - return; - } - const guid: string = this._selection.current[0]; - this.entities().forEach((entity: Entity) => { - if (entity.uuid() === guid) { - entity.getEditState().in(); - } else { - entity.getEditState().out(); - } - }); - this.subjects.get().edit.emit(guid); - }, - out: () => { - this.entities().forEach((entity: Entity) => { - entity.getEditState().out(); - }); - this.subjects.get().edit.emit(undefined); - this.change(); - }, - }; - } - - public change() { - this.subjects.get().change.emit(); - } - - public isEmpty(): boolean { - return this.entities().length === 0; - } - - public updatePanels(): void { - this.panels = { - list: { - name: this.getPanels().list().name(), - desc: this.getPanels().list().desc(), - comp: this.getPanels().list().comp(), - }, - details: { - name: this.getPanels().details().name(), - desc: this.getPanels().details().desc(), - comp: this.getPanels().details().comp(), - }, - nocontent: { - name: this.getPanels().nocontent().name(), - desc: this.getPanels().nocontent().desc(), - comp: this.getPanels().nocontent().comp(), - }, - }; - } - - public getEntityByIndex(index: number): T | undefined { - const entities = this.entities(); - return entities[index] !== undefined ? entities[index].extract() : undefined; - } - - public abstract init(): void; - - public abstract entities(): Entity[]; - - public abstract reorder(params: { prev: number; curt: number }): void; - - public abstract getPanels(): { - list(): { - name(): string; - desc(): string; - comp(): IComponentDesc; - }; - details(): { - name(): string | undefined; - desc(): string | undefined; - comp(): IComponentDesc | undefined; - }; - nocontent(): { - name(): string | undefined; - desc(): string | undefined; - comp(): IComponentDesc | undefined; - }; - }; - - public abstract search(entity: Entity): void; - - public abstract getContextMenuItems( - target: Entity, - selected: Array>, - ): IMenuItem[]; - - public abstract actions( - target: Entity | undefined, - selected: Array>, - ): { - activate?: () => void; - deactivate?: () => void; - remove?: () => void; - edit?: () => void; - }; - - public abstract tryToInsertEntity(entity: unknown, index: number): boolean; - - public abstract removeEntity(entity: unknown): boolean; -} diff --git a/application/client/src/app/ui/views/sidebar/search/providers/providers.ts b/application/client/src/app/ui/views/sidebar/search/providers/providers.ts deleted file mode 100644 index 379e150361..0000000000 --- a/application/client/src/app/ui/views/sidebar/search/providers/providers.ts +++ /dev/null @@ -1,547 +0,0 @@ -import { - Provider, - ProviderConstructor, - ProviderData, - ISelectEvent, - IContextMenuEvent, - EActions, - IDoubleclickEvent, -} from './definitions/provider'; -import { Subject, Subjects } from '@platform/env/subscription'; -import { Session } from '@service/session/session'; -import { KeyboardListener } from './definitions/keyboard.listener'; -import { IMenuItem } from '@ui/service/contextmenu'; -import { Entity } from './definitions/entity'; -import { unique } from '@platform/env/sequence'; -import { Logger } from '@platform/log'; -import { ProvidersEvents } from './definitions/events'; -import { history } from '@service/history'; -import { bridge } from '@service/bridge'; -import { HistorySession } from '@service/history/session'; -import { Notification, notifications } from '@ui/service/notifications'; - -export class Providers { - public readonly subjects: Subjects = new Subjects({ - select: new Subject(), - context: new Subject(), - doubleclick: new Subject(), - change: new Subject(), - edit: new Subject(), - dragging: new Subject(), - }); - public readonly session: Session; - public readonly logger: Logger; - - private readonly SENDER = unique(); - private readonly PROVIDERS_ORDER: ProviderData[] = [ - ProviderData.filters, - ProviderData.charts, - ProviderData.ranges, - ProviderData.disabled, - ]; - - private readonly _providers: Map> = new Map(); - private readonly _keyboard: KeyboardListener = new KeyboardListener(); - - constructor(session: Session, logger: Logger) { - this.session = session; - this.logger = logger; - } - - public destroy() { - this.subjects.destroy(); - this._providers.forEach((provider: Provider) => { - provider.destroy(); - }); - this._keyboard.destroy(); - } - - public add(name: ProviderData, providerConstructor: ProviderConstructor): boolean { - if (this._providers.has(name)) { - return false; - } - const provider = new providerConstructor(this.session, this.logger); - provider.setKeyboardListener(this._keyboard); - provider.setProvidersGetter(this.list.bind(this)); - provider.setProvidersEvents(this.subjects); - provider.subjects.get().selection.subscribe(this._onSelectionEntity.bind(this)); - provider.subjects.get().context.subscribe(this._onContextMenuEvent.bind(this)); - provider.subjects.get().doubleclick.subscribe(this._onDoubleclickEvent.bind(this)); - provider.subjects.get().change.subscribe(this._onChange.bind(this)); - provider.subjects.get().edit.subscribe(this._onEdit.bind(this)); - provider.init(); - this._providers.set(name, provider); - return true; - } - - public all(): any[] { - let entries: any[] = []; - this.list().forEach((provider: Provider) => { - entries = entries.concat(provider.entities()); - }); - return entries; - } - - public list(): Provider[] { - const list: Provider[] = []; - this.PROVIDERS_ORDER.forEach((ref: ProviderData) => { - const provider: Provider | undefined = this._providers.get(ref); - if (provider !== undefined) { - list.push(provider); - } - }); - return list; - } - - public select(): { - next(): void; - prev(): void; - drop(): void; - first(): void; - last(): void; - single(): - | { provider: Provider; next?: Provider; prev?: Provider; guid: string } - | undefined; - getEntities(): Array>; - getProviders(): Array>; - } { - return { - next: (): void => { - if (this._providers.size === 0) { - return; - } - const sel = this.select().single(); - if (sel === undefined) { - this.select().drop(); - this.select().first(); - } else { - if (!sel.provider.select().next()) { - sel.provider.select().drop(); - if (sel.next !== undefined) { - sel.next.select().first(); - } else { - this.select().first(); - } - } - } - }, - prev: (): void => { - if (this._providers.size === 0) { - return; - } - const sel = this.select().single(); - if (sel === undefined) { - this.select().drop(); - this.select().last(); - } else { - if (!sel.provider.select().prev()) { - sel.provider.select().drop(); - if (sel.prev !== undefined) { - sel.prev.select().last(); - } else { - this.select().last(); - } - } - } - }, - drop: (): void => { - this._providers.forEach((provider: Provider) => { - provider.select().drop(this.SENDER); - }); - }, - first: (): void => { - if (this._providers.size === 0) { - return; - } - (Array.from(this._providers.values())[0] as Provider).select().first(); - }, - last: (): void => { - if (this._providers.size === 0) { - return; - } - const entities = Array.from(this._providers.values()); - (entities[entities.length - 1] as Provider).select().last(); - }, - single: (): - | { - provider: Provider; - next?: Provider; - prev?: Provider; - guid: string; - } - | undefined => { - if (this._providers.size === 0) { - return undefined; - } - const providers: Array> = []; - let next: Provider | undefined; - let prev: Provider | undefined; - Array.from(this._providers.values()).forEach( - (provider: Provider, i: number, all: Array>) => { - if (provider.select().single() !== undefined) { - providers.push(provider); - for (let k = i + 1; k <= all.length - 1; k += 1) { - if (next === undefined && all[k].entities().length > 0) { - next = all[k]; - } - } - for (let k = i - 1; k >= 0; k -= 1) { - if (prev === undefined && all[k].entities().length > 0) { - prev = all[k]; - } - } - } - }, - ); - if (providers.length !== 1) { - return undefined; - } - const guid: string | undefined = (providers[0] as Provider) - .select() - .single() - ?.uuid(); - return guid === undefined - ? undefined - : { - provider: providers[0], - next: next, - prev: prev, - guid: guid, - }; - }, - getEntities: (): Array> => { - let entities: Entity[] = []; - this._providers.forEach((provider: Provider) => { - entities = entities.concat(provider.select().getEntities()); - }); - return entities; - }, - getProviders: (): Array> => { - const list: Provider[] = []; - this.PROVIDERS_ORDER.forEach((ref: ProviderData) => { - const provider: Provider | undefined = this._providers.get(ref); - if (provider !== undefined && provider.select().getEntities().length !== 0) { - list.push(provider); - } - }); - return list; - }, - }; - } - - public edit(): { - in: () => void; - out: () => void; - } { - return { - in: () => { - let count: number = 0; - this._providers.forEach((provider: Provider) => { - count += provider.select().get().length; - }); - if (count !== 1) { - return; - } - this._providers.forEach((provider: Provider) => { - if (provider.select().get().length === 1) { - provider.edit().in(); - } - }); - }, - out: () => { - this._providers.forEach((provider: Provider) => { - provider.edit().out(); - }); - }, - }; - } - - private _onSelectionEntity(event: ISelectEvent) { - if (event.sender === this.SENDER) { - // Ignore events triggered by holder - return; - } - if (!this._keyboard.ctrl() && !this._keyboard.shift()) { - this._providers.forEach((provider: Provider) => { - // Drop selection on all others providers - if (provider.uuid !== event.provider.uuid) { - provider.select().drop(this.SENDER); - } - }); - } else if (this._keyboard.shift()) { - this._providers.forEach((provider: Provider) => { - // Force selection - provider.select().apply(this.SENDER, event.guids); - }); - } - let guids: string[] = []; - this._providers.forEach((provider: Provider) => { - guids = guids.concat(provider.select().get()); - }); - if (guids.length === 1) { - this._providers.forEach((provider: Provider) => { - if (provider.select().get().length === 1) { - this.subjects.get().select.emit({ - entity: event.entity, - provider: provider, - guids: provider.select().get(), - }); - } - }); - this.session.charts.selecting().set(guids[0]); - } else { - this.subjects.get().select.emit(undefined); - this.session.charts.selecting().set(undefined); - } - this._providers.forEach((provider: Provider) => { - provider.setLastSelection(guids.length > 0 ? event.entity : undefined); - }); - } - - private _onContextMenuEvent(event: IContextMenuEvent) { - const isActionAvailable = ( - action: EActions, - insel: Array>, - _entities: Entity[], - ) => { - let count: number = 0; - insel.forEach((provider: Provider) => { - (provider.actions(event.entity, _entities) as any)[action] !== undefined && - (count += 1); - }); - return count === insel.length; - }; - let entities = this.select().getEntities(); - if (entities.length === 0) { - // Context menu is called without active selection - // Set selection to target element - event.provider.select().set({ guid: event.entity.uuid() }); - entities = [event.entity]; - } else if (entities.length === 1) { - if (entities[0].uuid() !== event.entity.uuid()) { - this.select().drop(); - event.provider.select().set({ guid: event.entity.uuid() }); - entities = [event.entity]; - } - } else if (entities.length > 1) { - if (entities.map((entity) => entity.uuid()).indexOf(event.entity.uuid()) === -1) { - // Context menu is called out of selection - this.select().drop(); - event.provider.select().set({ guid: event.entity.uuid() }); - entities = [event.entity]; - } - } - const providers = this.select().getProviders(); - const actions: { - activate: boolean; - deactivate: boolean; - remove: boolean; - edit: boolean; - } = { - activate: isActionAvailable(EActions.activate, providers, entities), - deactivate: isActionAvailable(EActions.deactivate, providers, entities), - remove: isActionAvailable(EActions.remove, providers, entities), - edit: isActionAvailable(EActions.edit, providers, entities), - }; - event.items = []; - if (providers.length === 1 && entities.length === 1 && actions.edit) { - event.items.push({ - caption: 'Edit', - handler: () => { - const actions = providers[0].actions(event.entity, entities); - actions.edit !== undefined && actions.edit(); - }, - shortcut: 'Enter', - }); - } - - event.items.length > 0 && - event.items.push({ - /* Delimiter */ - }); - - actions.activate && - event.items.push({ - caption: 'Activate', - handler: () => { - providers.forEach((provider: Provider) => { - const actions = provider.actions(event.entity, entities); - actions.activate !== undefined && actions.activate(); - }); - }, - }); - actions.deactivate && - event.items.push({ - caption: 'Deactivate', - handler: () => { - providers.forEach((provider: Provider) => { - const actions = provider.actions(event.entity, entities); - actions.deactivate !== undefined && actions.deactivate(); - }); - }, - }); - actions.remove && - event.items.push({ - caption: 'Remove', - handler: () => { - providers.forEach((provider: Provider) => { - const actions = provider.actions(event.entity, entities); - actions.remove !== undefined && actions.remove(); - }); - }, - }); - - event.items.length > 0 && - event.items.push({ - /* Delimiter */ - }); - - actions.activate && - event.items.push({ - caption: 'Activate All', - handler: () => { - providers.forEach((provider: Provider) => { - const actions = provider.actions(event.entity, provider.entities()); - actions.activate !== undefined && actions.activate(); - }); - }, - }); - actions.deactivate && - event.items.push({ - caption: 'Deactivate All', - handler: () => { - providers.forEach((provider: Provider) => { - const actions = provider.actions(event.entity, provider.entities()); - actions.deactivate !== undefined && actions.deactivate(); - }); - }, - }); - actions.remove && - event.items.push({ - caption: 'Remove All', - handler: () => { - providers.forEach((provider: Provider) => { - const actions = provider.actions(event.entity, provider.entities()); - actions.remove !== undefined && actions.remove(); - }); - }, - }); - - this._providers.forEach((provider: Provider) => { - const custom: IMenuItem[] = provider.getContextMenuItems( - event.entity, - this.select().getEntities(), - ); - if (custom.length > 0 && event.items !== undefined) { - event.items.push({ - /* Delimiter */ - }); - event.items = event.items.concat(custom); - } - }); - - this.injectGeneralMenuItems(event.items); - - this.subjects.get().context.emit(event); - } - - public injectGeneralMenuItems(items: IMenuItem[]): void { - const historySession = history.get(this.session); - if (historySession === undefined) { - this.logger.error('History session is not defined'); - return; - } - items.push({ - /* Delimiter */ - }); - const store = this.session.search.store(); - const showExport: boolean = - store.filters().get().length + - store.charts().get().length + - store.disabled().get().length !== - 0; - showExport && - items.push({ - caption: 'Export All to File', - handler: () => this.filters(historySession).export(), - }); - items.push({ - caption: 'Import from File', - handler: () => this.filters(historySession).import(), - }); - } - - protected filters(historySession: HistorySession): { import(): void; export(): void } { - const logAndNotifyError = (error: Error): void => { - this.logger.error(error.message); - notifications.notify( - new Notification({ - message: error.message, - session: this.session.uuid(), - actions: [], - }), - ); - }; - return { - import: (): void => { - bridge - .files() - .select.text() - .then((file) => { - if (file.length !== 1) { - this.logger.error('No file selected'); - return; - } - history - .import(file[0].filename) - .then((uuids: string[]) => { - if (uuids.length === 0) { - this.logger.warn('File does not have a collection'); - return; - } - if (uuids.length > 1) { - this.session.switch().toolbar.presets(); - return; - } else { - const collection = history.collections.get(uuids[0]); - if (collection === undefined) { - this.logger.error( - `Cannot find imported collection with UUID: ${uuids[0]}`, - ); - return; - } - historySession.apply(collection); - } - }) - .catch((error) => logAndNotifyError(error)); - }) - .catch((error) => logAndNotifyError(error)); - }, - export: (): void => { - bridge - .files() - .select.save(undefined, undefined) - .then((filename: string | undefined) => { - if (filename === undefined) return; - history - .export([historySession.collections.uuid], filename) - .catch((error) => logAndNotifyError(error)); - }) - .catch((error) => logAndNotifyError(error)); - }, - }; - } - - private _onDoubleclickEvent(event: IDoubleclickEvent) { - event.provider.search(event.entity); - } - - private _onChange() { - this._providers.forEach((p) => p.updatePanels()); - this.subjects.get().change.emit(); - } - - private _onEdit(guid: string | undefined) { - this.subjects.get().edit.emit(guid); - } -} diff --git a/application/client/src/app/ui/views/sidebar/search/styles.less b/application/client/src/app/ui/views/sidebar/search/styles.less deleted file mode 100644 index 2516166fbf..0000000000 --- a/application/client/src/app/ui/views/sidebar/search/styles.less +++ /dev/null @@ -1,57 +0,0 @@ -@import '../../../styles/variables.less'; - -app-views-filters { - position: absolute; - display: flex; - flex-direction: column; - padding: 0; - margin: 0; - bottom: 0.5rem; - right: 0.5rem; - left: 0.5rem; - top: 0.5rem; - overflow-x: hidden; - overflow-y: hidden; - outline: none; - & app-views-teamwork-applet { - & div.content { - padding: 16px 21px; - } - } - & div.holder { - position: relative; - flex: auto; - left:0; - width: 100%;; - overflow-y: auto; - top: 0; - bottom: 32px; - } - & div.controlls{ - position: absolute; - left:0; - width: 100%; - bottom: 0; - height: 32px; - overflow: hidden; - text-align: right; - } - & div.wrapper{ - position: relative; - display: block; - margin-top: 8px; - &:first-child{ - margin-top: 0; - } - } - & .controlls{ - text-align: right; - } - - & app-sidebar-app-searchmanager-bin { - pointer-events: none; - } - & div.mat-expansion-panel-body{ - padding: 0 0 16px; - } -} diff --git a/application/client/src/app/ui/views/sidebar/search/template.html b/application/client/src/app/ui/views/sidebar/search/template.html deleted file mode 100644 index 777c9b3c8f..0000000000 --- a/application/client/src/app/ui/views/sidebar/search/template.html +++ /dev/null @@ -1,43 +0,0 @@ -
-
- - - {{provider.panels.list.name}} - {{provider.panels.list.desc}} - -
- -
- -
-
-
- - - {{selected.panels.details.name}} - {{selected.panels.details.desc}} - - - -
-
- -
- -
- diff --git a/application/client/src/app/ui/views/sidebar/teamwork/component.ts b/application/client/src/app/ui/views/sidebar/teamwork/component.ts deleted file mode 100644 index b25112ea55..0000000000 --- a/application/client/src/app/ui/views/sidebar/teamwork/component.ts +++ /dev/null @@ -1,250 +0,0 @@ -import { Component, Input, ChangeDetectorRef, AfterContentInit } from '@angular/core'; -import { Session } from '@service/session'; -import { Ilc, IlcInterface } from '@env/decorators/component'; -import { Initial } from '@env/decorators/initial'; -import { ChangesDetector } from '@ui/env/extentions/changes'; -import { Notification } from '@ui/service/notifications'; -import { GitHubRepo, getDefaultSharingSettings } from '@platform/types/github'; -import { GitHubError } from '@service/session/dependencies/teamwork'; -import { session } from '@service/session'; -import { Help } from '@tabs/help/component'; -import { DEFAULT_ENTRY } from '@service/session/dependencies/teamwork'; - -import * as dom from '@ui/env/dom'; -import * as obj from '@platform/env/obj'; -import { unique } from '@platform/env/sequence'; - -@Component({ - selector: 'app-views-teamwork', - templateUrl: './template.html', - styleUrls: ['./styles.less'], - standalone: false, -}) -@Initial() -@Ilc() -export class TeamWork extends ChangesDetector implements AfterContentInit { - @Input() session!: Session; - - public repos: GitHubRepo[] = []; - public active: GitHubRepo | undefined; - public editable: GitHubRepo | undefined; - public errors: GitHubError[] = []; - - constructor(cdRef: ChangeDetectorRef) { - super(cdRef); - } - - public onRepoContextMenu(event: MouseEvent, repo: GitHubRepo) { - const items = [ - { - caption: 'Edit', - handler: () => { - this.repo().edit(repo); - this.detectChanges(); - }, - }, - {}, - { - caption: 'Remove', - handler: () => { - this.repo().delete(repo.uuid); - this.detectChanges(); - }, - }, - ]; - this.ilc().emitter.ui.contextmenu.open({ - items, - x: event.x, - y: event.y, - }); - dom.stop(event); - } - - public onErrorsContextMenu(event: MouseEvent) { - const items = [ - { - caption: 'Clear All', - handler: () => { - this.session.teamwork.error().clear(); - this.detectChanges(); - }, - }, - ]; - this.ilc().emitter.ui.contextmenu.open({ - items, - x: event.x, - y: event.y, - }); - dom.stop(event); - } - - public ngAfterContentInit(): void { - this.repos = this.session.teamwork.repo().list(); - this.active = this.session.teamwork.repo().getActive(); - this.errors = this.session.teamwork.error().get().reverse(); - this.env().subscriber.register( - this.session.teamwork.subjects.get().active.subscribe(() => { - this.active = this.session.teamwork.repo().getActive(); - this.detectChanges(); - }), - ); - this.env().subscriber.register( - this.session.teamwork.subjects.get().loaded.subscribe(() => { - this.repos = this.session.teamwork.repo().list(); - this.active = this.session.teamwork.repo().getActive(); - this.detectChanges(); - }), - ); - this.env().subscriber.register( - this.session.teamwork.subjects.get().error.subscribe(() => { - this.errors = this.session.teamwork.error().get().reverse(); - this.detectChanges(); - }), - ); - } - - public onSharingSettingsChange(value: boolean, target: string) { - if (this.active === undefined) { - return; - } - if ((this.active.settings as unknown as { [key: string]: boolean })[target] === undefined) { - return; - } - (this.active.settings as unknown as { [key: string]: boolean })[target] = value; - this.session.teamwork - .repo() - .update(obj.clone(this.active)) - .catch((err: Error) => { - this.log().error(`Fail to save settings: ${err.message}`); - }); - this.detectChanges(); - } - - public repo(): { - create(): void; - edit(editable: GitHubRepo): void; - save(): void; - cancel(): void; - delete(uuid: string): void; - isPossibleToSave(): boolean; - setActive(repo: GitHubRepo | undefined): void; - isActive(repo: GitHubRepo): boolean; - } { - return { - create: (): void => { - this.editable = { - uuid: '', - repo: '', - branch: 'master', - owner: '', - token: '', - settings: getDefaultSharingSettings(), - entry: DEFAULT_ENTRY, - }; - this.detectChanges(); - }, - edit: (editable: GitHubRepo): void => { - this.editable = Object.assign({}, editable); - if (typeof this.editable.entry !== 'string' || this.editable.entry.trim() === '') { - this.editable.entry = DEFAULT_ENTRY; - } - this.detectChanges(); - }, - save: (): void => { - if (this.editable === undefined || !this.repo().isPossibleToSave()) { - return; - } - (() => { - if (this.editable.uuid.trim() === '') { - return this.session.teamwork.repo().create(this.editable); - } else { - return this.session.teamwork.repo().update(this.editable); - } - })() - .then(() => { - this.editable = undefined; - this.detectChanges(); - this.session.teamwork - .repo() - .reload() - .then(() => { - this.repos = this.session.teamwork.repo().list(); - this.active = this.session.teamwork.repo().getActive(); - }) - .catch((err: Error) => { - this.log().error(`Fail reload repos: ${err.message}`); - }) - .finally(() => { - this.detectChanges(); - }); - }) - .catch((err: Error) => { - this.ilc().services.ui.notifications.notify( - new Notification({ - message: `Fail to save GitHub Reference: ${err.message}`, - actions: [], - session: this.session.uuid(), - }), - ); - }); - }, - cancel: (): void => { - this.editable = undefined; - this.detectChanges(); - }, - delete: (uuid: string): void => { - this.session.teamwork - .repo() - .delete(uuid) - .then(() => { - this.detectChanges(); - }) - .catch((err: Error) => { - this.ilc().services.ui.notifications.notify( - new Notification({ - message: `Fail to delete GitHub Reference: ${err.message}`, - actions: [], - session: this.session.uuid(), - }), - ); - }); - }, - - isPossibleToSave: (): boolean => { - if (this.editable === undefined) { - return false; - } - if ( - this.editable.repo.trim() === '' || - this.editable.branch.trim() === '' || - this.editable.token.trim() === '' - ) { - return false; - } - return true; - }, - setActive: (repo: GitHubRepo | undefined): void => { - this.session.teamwork.repo().setActive(repo); - }, - isActive: (repo: GitHubRepo): boolean => { - return this.active === undefined ? false : this.active.uuid === repo.uuid; - }, - }; - } - - public help() { - session.add().tab({ - name: 'Documentation', - active: true, - closable: true, - content: { - factory: Help, - inputs: { - location: '/teamwork/readme.md', - }, - }, - uuid: unique(), - }); - } -} -export interface TeamWork extends IlcInterface {} diff --git a/application/client/src/app/ui/views/sidebar/teamwork/module.ts b/application/client/src/app/ui/views/sidebar/teamwork/module.ts deleted file mode 100644 index bc6b42393f..0000000000 --- a/application/client/src/app/ui/views/sidebar/teamwork/module.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { NgModule } from '@angular/core'; -import { CommonModule } from '@angular/common'; -import { ContainersModule } from '@elements/containers/module'; -import { MatButtonModule } from '@angular/material/button'; -import { MatCheckboxModule } from '@angular/material/checkbox'; -import { MatIconModule } from '@angular/material/icon'; -import { TeamWork } from './component'; -import { MatCardModule } from '@angular/material/card'; -import { MatExpansionModule } from '@angular/material/expansion'; -import { MatMenuModule } from '@angular/material/menu'; -import { MatDividerModule } from '@angular/material/divider'; -import { MatSelectModule } from '@angular/material/select'; -import { RepositoryModule } from './repository/module'; -import { MatInputModule } from '@angular/material/input'; -import { FormsModule, ReactiveFormsModule } from '@angular/forms'; - -@NgModule({ - imports: [ - CommonModule, - ContainersModule, - MatButtonModule, - MatCardModule, - MatExpansionModule, - MatMenuModule, - MatIconModule, - MatDividerModule, - MatSelectModule, - RepositoryModule, - MatInputModule, - MatCheckboxModule, - FormsModule, - ReactiveFormsModule, - ], - declarations: [TeamWork], - exports: [TeamWork], - bootstrap: [TeamWork], -}) -export class TeamWorkModule {} diff --git a/application/client/src/app/ui/views/sidebar/teamwork/repository/component.ts b/application/client/src/app/ui/views/sidebar/teamwork/repository/component.ts deleted file mode 100644 index 98f9703bb7..0000000000 --- a/application/client/src/app/ui/views/sidebar/teamwork/repository/component.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { Component, Input } from '@angular/core'; -import { Ilc, IlcInterface } from '@env/decorators/component'; -import { GitHubRepo } from '@platform/types/github'; - -@Component({ - selector: 'app-views-teamwork-repository', - templateUrl: './template.html', - styleUrls: ['./styles.less'], - standalone: false, -}) -@Ilc() -export class Repository { - @Input() repo!: GitHubRepo | undefined; -} -export interface Repository extends IlcInterface {} diff --git a/application/client/src/app/ui/views/sidebar/teamwork/repository/module.ts b/application/client/src/app/ui/views/sidebar/teamwork/repository/module.ts deleted file mode 100644 index e5cb4ba2c9..0000000000 --- a/application/client/src/app/ui/views/sidebar/teamwork/repository/module.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { NgModule } from '@angular/core'; -import { CommonModule } from '@angular/common'; -import { Repository } from './component'; -import { MatButtonModule } from '@angular/material/button'; -import { MatIconModule } from '@angular/material/icon'; -import { AppDirectiviesModule } from '@directives/module'; - -@NgModule({ - imports: [CommonModule, MatButtonModule, MatIconModule, AppDirectiviesModule], - declarations: [Repository], - exports: [Repository], -}) -export class RepositoryModule {} diff --git a/application/client/src/app/ui/views/sidebar/teamwork/repository/styles.less b/application/client/src/app/ui/views/sidebar/teamwork/repository/styles.less deleted file mode 100644 index 140b7c9906..0000000000 --- a/application/client/src/app/ui/views/sidebar/teamwork/repository/styles.less +++ /dev/null @@ -1,52 +0,0 @@ -@import '../../../../styles/variables.less'; - -:host { - position: relative; - display: flex; - padding: 0; - margin: 0; - flex-direction: row; - align-items: center; - width: 100%; - margin-left: -24px; - height: 32px; - overflow: hidden; - padding: 3px 24px; - cursor: default; - & span.extention { - position: relative; - display: flex; - width: 64px; - height: 32px; - text-transform: uppercase; - align-items: center; - align-content: center; - color: var(--scheme-color-1); - font-size: 12px; - overflow: hidden; - } - & div.desc { - position: relative; - display: flex; - height: 32px; - overflow: hidden; - flex-direction: column; - padding-left: 8px; - & p.name, - & p.size { - font-size: 14px; - font-weight: 400; - line-height: 14px; - text-overflow: ellipsis; - overflow: hidden; - white-space: nowrap; - } - & p.name { - color: var(--scheme-color-1); - } - & p.size { - color: var(--scheme-color-3); - - } - } -} diff --git a/application/client/src/app/ui/views/sidebar/teamwork/repository/template.html b/application/client/src/app/ui/views/sidebar/teamwork/repository/template.html deleted file mode 100644 index 3f9633b24a..0000000000 --- a/application/client/src/app/ui/views/sidebar/teamwork/repository/template.html +++ /dev/null @@ -1,14 +0,0 @@ - - local -
-

Do not use remote repository.

-

Data will be saved locally

-
-
- - {{repo.branch}} -
-

{{repo.owner}}

-

{{repo.repo}}

-
-
diff --git a/application/client/src/app/ui/views/sidebar/teamwork/repository/wrapper.ts b/application/client/src/app/ui/views/sidebar/teamwork/repository/wrapper.ts deleted file mode 100644 index 79b9a75f8e..0000000000 --- a/application/client/src/app/ui/views/sidebar/teamwork/repository/wrapper.ts +++ /dev/null @@ -1,21 +0,0 @@ -import { Attachment } from '@platform/types/content'; - -export class Wrapped { - public selected: boolean = false; - constructor(public readonly attachment: Attachment) {} - public select(): void { - this.selected = true; - } - public unselect(): void { - this.selected = false; - } - public toggle(): void { - this.selected = !this.selected; - } - public equal(attachment: Attachment): boolean { - return this.attachment.uuid === attachment.uuid; - } - public ext(ext: string): boolean { - return this.attachment.extAsString().toLowerCase() === ext.toLowerCase(); - } -} diff --git a/application/client/src/app/ui/views/sidebar/teamwork/styles.less b/application/client/src/app/ui/views/sidebar/teamwork/styles.less deleted file mode 100644 index f42b1cc003..0000000000 --- a/application/client/src/app/ui/views/sidebar/teamwork/styles.less +++ /dev/null @@ -1,109 +0,0 @@ -@import '../../../styles/variables.less'; - -:host { - position: absolute; - display: flex; - flex-direction: column; - padding: 0; - margin: 0; - bottom: 0.5rem; - right: 0.5rem; - left: 0.5rem; - top: 0.5rem; - overflow-y: auto; - overflow-x: hidden; - outline: none; - & > div.caption { - position: sticky !important; - top: 0; - left: 0; - z-index: 1; - background: var(--scheme-color-5); - display: flex; - padding: 0 24px; - margin: 0; - text-align: left; - align-items: center; - white-space: nowrap; - font-size: 0.9rem; - font-weight: 400; - span.title{ - color: var(--scheme-color-2); - } - span.subtitle{ - padding-left: 6px; - color: var(--scheme-color-3); - } - & span.filler { - flex: auto; - } - - } - & p.info { - font-size: 13px; - color: var(--scheme-color-2); - margin: 16px 24px; - } - & div.controls { - text-align: right; - & button { - margin-left: 12px; - } - } - & div.field { - display: flex; - flex-direction: row; - align-items: center; - margin: 4px 0; - } - & ul.errors { - max-height: 300px; - overflow-x: hidden; - list-style: none; - overflow-y: auto; - & li.error { - border-bottom: dashed thin var(--scheme-color-3); - & > p.t-small { - color: var(--scheme-color-3); - } - & > p { - word-break: break-all; - } - } - } - & mat-expansion-panel { - margin: 6px 0!important; - } - & div.mat-expansion-panel-body { - padding-left: 0; - padding-right: 0; - } - & mat-expansion-panel.list { - flex:auto; - overflow-y: auto; - overflow-x: hidden; - & mat-expansion-panel-header { - position: sticky; - background-color: var(--scheme-bk-color-0); - z-index: 1; - top: 0; - } - & app-views-teamwork-repository.selected { - background: var(--scheme-color-4); - &::after { - position: absolute; - content: ''; - display: block; - top: 0; - height: 100%; - width: 4px; - left:0; - background: var(--scheme-color-active); - } - } - & app-views-teamwork-repository:hover { - background: var(--scheme-color-5); - } - } - -} diff --git a/application/client/src/app/ui/views/sidebar/teamwork/template.html b/application/client/src/app/ui/views/sidebar/teamwork/template.html deleted file mode 100644 index 13a487b418..0000000000 --- a/application/client/src/app/ui/views/sidebar/teamwork/template.html +++ /dev/null @@ -1,155 +0,0 @@ -
- Teamwork - - -
-

- GitHub repository can be assigned with filters/charts/comments -

- - - GitHub References - -
- - -
-
- - - Sharing Settings - -
-

- Checked entities will be synchronized with the selected GitHub repository. Unselected - entities will be stored only locally and will not be downloaded from the GitHub - repository. Comments are available only with the linked GitHub repository. -

-
- - Filters -
-
- - Charts -
-
- - Bookmarks -
-
- - Comments -
-

- Read-only Mode allows to read a remote repository, but not modify it. Local changes will - be available only during the session. -

-
- - Read-only Mode -
-
-
- - - Errors - -
    -
  • -

    {{error.time}}

    -

    {{error.msg}}

    -
  • -
-
- - - - New GitHub Reference - -
- - Owner - - - - Repositary - - - - Branch - - - - GitHub Token - - -

Optionally can be defined a custom entry point for private networks.

- - Custom entry point - - -
-
- - -
-
- - - - - - diff --git a/application/client/src/app/ui/views/statusbar/info/component.ts b/application/client/src/app/ui/views/statusbar/info/component.ts deleted file mode 100644 index 34ca36bb44..0000000000 --- a/application/client/src/app/ui/views/statusbar/info/component.ts +++ /dev/null @@ -1,49 +0,0 @@ -import { Component, ChangeDetectorRef, AfterViewInit, OnDestroy } from '@angular/core'; -import { Ilc, IlcInterface } from '@env/decorators/component'; -import { ChangesDetector } from '@ui/env/extentions/changes'; -import { Session as ActiveSession } from '@service/session'; -import { Subscriber } from '@platform/env/subscription'; -import { IInfoBlock } from '@service/session/dependencies/info'; - -@Component({ - selector: 'app-statusbar-info', - templateUrl: './template.html', - styleUrls: ['./styles.less'], - standalone: false, -}) -@Ilc() -export class SessionInfo extends ChangesDetector implements AfterViewInit, OnDestroy { - protected subscriber: Subscriber = new Subscriber(); - - protected bind(): void { - this.subscriber.unsubscribe(); - !this.access().session((active: ActiveSession) => { - this.subscriber.register( - active.info.updated.subscribe(() => { - this.blocks = active.info.get(); - this.detectChanges(); - }), - ); - this.blocks = active.info.get(); - this.detectChanges(); - }) && (this.blocks = []); - } - - public blocks: IInfoBlock[] = []; - - constructor(cdRef: ChangeDetectorRef) { - super(cdRef); - } - - ngOnDestroy(): void { - this.subscriber.unsubscribe(); - } - - ngAfterViewInit(): void { - this.ilc().channel.session.change(() => { - this.bind(); - }); - this.bind(); - } -} -export interface SessionInfo extends IlcInterface {} diff --git a/application/client/src/app/ui/views/statusbar/info/module.ts b/application/client/src/app/ui/views/statusbar/info/module.ts deleted file mode 100644 index af35597c27..0000000000 --- a/application/client/src/app/ui/views/statusbar/info/module.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { NgModule } from '@angular/core'; -import { CommonModule } from '@angular/common'; - -import { SessionInfo } from './component'; - -@NgModule({ - imports: [CommonModule], - declarations: [SessionInfo], - exports: [SessionInfo], -}) -export class SessionInfoModule {} diff --git a/application/client/src/app/ui/views/statusbar/info/styles.less b/application/client/src/app/ui/views/statusbar/info/styles.less deleted file mode 100644 index 17856eae23..0000000000 --- a/application/client/src/app/ui/views/statusbar/info/styles.less +++ /dev/null @@ -1,21 +0,0 @@ -@import '../../../styles/variables.less'; - -:host { - vertical-align: middle; - display: flex; - flex-direction: row; - & span { - position: relative; - display: block; - color: var(--scheme-color-1); - font-size: 12px; - max-width: 300px; - overflow: hidden; - text-overflow: ellipsis; - margin-right: 8px; - padding-right: 8px; - border-right: thin solid var(--scheme-color-3); - height: 100%; - } - -} \ No newline at end of file diff --git a/application/client/src/app/ui/views/statusbar/info/template.html b/application/client/src/app/ui/views/statusbar/info/template.html deleted file mode 100644 index e6908cf539..0000000000 --- a/application/client/src/app/ui/views/statusbar/info/template.html +++ /dev/null @@ -1 +0,0 @@ -{{block.caption}} diff --git a/application/client/src/app/ui/views/statusbar/jobs/component.ts b/application/client/src/app/ui/views/statusbar/jobs/component.ts deleted file mode 100644 index 5e4adf1932..0000000000 --- a/application/client/src/app/ui/views/statusbar/jobs/component.ts +++ /dev/null @@ -1,80 +0,0 @@ -import { - Component, - ChangeDetectorRef, - AfterViewInit, - ChangeDetectionStrategy, - ViewEncapsulation, -} from '@angular/core'; -import { Ilc, IlcInterface } from '@env/decorators/component'; -import { ChangesDetector } from '@ui/env/extentions/changes'; -import { Job } from '@service/jobs'; - -@Component({ - selector: 'app-statusbar-jobs', - templateUrl: './template.html', - styleUrls: ['./styles.less'], - encapsulation: ViewEncapsulation.None, - changeDetection: ChangeDetectionStrategy.OnPush, - standalone: false, -}) -@Ilc() -export class Jobs extends ChangesDetector implements AfterViewInit { - private _session: string | undefined; - public done: { - globals: Job[]; - session: Job[]; - } = { - globals: [], - session: [], - }; - public actual: { - globals: Job[]; - session: Job[]; - } = { - globals: [], - session: [], - }; - - constructor(cdRef: ChangeDetectorRef) { - super(cdRef); - } - - ngAfterViewInit(): void { - this.ilc().channel.session.change((session) => { - this._session = session; - this._update(); - }); - this.ilc().channel.backend.job(() => { - this._update(); - }); - this._update(); - } - - private _update() { - if (this._session === undefined) { - this.done.session = []; - this.actual.session = []; - } else { - const all = this.ilc().services.system.jobs.session(this._session); - this.actual.session = []; - all.filter((j) => !j.isDone()).forEach((job: Job) => { - if (this.actual.session.find((j) => j.name === job.name)) { - return; - } - this.actual.session.push(job); - }); - this.done.session = all.filter((j) => j.isDone()); - } - const all = this.ilc().services.system.jobs.globals(); - this.actual.globals = []; - all.filter((j) => !j.isDone()).forEach((job: Job) => { - if (this.actual.globals.find((j) => j.name === job.name)) { - return; - } - this.actual.globals.push(job); - }); - this.done.globals = all.filter((j) => j.isDone()); - this.detectChanges(); - } -} -export interface Jobs extends IlcInterface {} diff --git a/application/client/src/app/ui/views/statusbar/jobs/module.ts b/application/client/src/app/ui/views/statusbar/jobs/module.ts deleted file mode 100644 index 64f2ce21cf..0000000000 --- a/application/client/src/app/ui/views/statusbar/jobs/module.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { NgModule } from '@angular/core'; -import { CommonModule } from '@angular/common'; -import { MatProgressSpinnerModule } from '@angular/material/progress-spinner'; -import { MatIconModule } from '@angular/material/icon'; -import { MatMenuModule } from '@angular/material/menu'; -import { MatButtonModule } from '@angular/material/button'; -import { MatDividerModule } from '@angular/material/divider'; - -import { Jobs } from './component'; - -@NgModule({ - imports: [ - CommonModule, - MatProgressSpinnerModule, - MatIconModule, - MatMenuModule, - MatButtonModule, - MatDividerModule, - ], - declarations: [Jobs], - exports: [Jobs] -}) -export class JobsModule {} diff --git a/application/client/src/app/ui/views/statusbar/jobs/styles.less b/application/client/src/app/ui/views/statusbar/jobs/styles.less deleted file mode 100644 index f9d8ceb3fb..0000000000 --- a/application/client/src/app/ui/views/statusbar/jobs/styles.less +++ /dev/null @@ -1,93 +0,0 @@ -@import '../../../styles/variables.less'; - -app-statusbar-jobs { - position: relative; - display: flex; - flex-direction: row; - margin-right: 12px; - & div.global, - & div.session, - & div.pinned { - position: relative; - display: flex; - flex-direction: row; - align-items: center; - align-content: center; - border-left: 1px solid var(--scheme-color-4); - padding: 0 6px; - } - & mat-spinner { - margin-right: 6px; - } - & .mat-progress-spinner circle, .mat-spinner circle { - stroke: var(--scheme-color-accent); - } - & span.pinned-job { - position: relative; - display: flex; - flex-direction: row; - margin-left: 6px; - align-items: center; - &:first-child{ - margin-left: 0; - } - & mat-icon { - height: 16px; - width: 16px; - color: var(--scheme-color-0); - font-size: 16px; - padding-right: 6px; - } - } - & span.name{ - font-size: 10px; - color: var(--scheme-color-2); - } - & span.indicator { - position: relative; - display: inline-block; - width: 8px; - height: 8px; - border-radius: 4px; - background-color: var(--scheme-color-accent); - margin-right: 6px; - } - -} - -& div.status-bar-jobs-list { - position: relative; - max-height: 300px; - overflow-x: hidden; - overflow-y: auto; - padding: 12px; - & div.job{ - position: relative; - display: flex; - flex-direction: row; - align-items: center; - padding: 3px 0; - & mat-icon { - height: 16px; - width: 16px; - color: var(--scheme-color-0); - font-size: 16px; - padding-right: 6px; - } - & span.description{ - flex:auto; - & span.name { - position: relative; - display: block; - color: var(--scheme-color-0); - line-height: 16px; - } - & span.desc { - position: relative; - display: block; - color: var(--scheme-color-2); - line-height: 16px; - } - } - } -} diff --git a/application/client/src/app/ui/views/statusbar/jobs/template.html b/application/client/src/app/ui/views/statusbar/jobs/template.html deleted file mode 100644 index 146c6c75a4..0000000000 --- a/application/client/src/app/ui/views/statusbar/jobs/template.html +++ /dev/null @@ -1,44 +0,0 @@ -
- - - - {{job.icon}} - {{job.name}} - -
-
- - - - {{job.icon}} - {{job.name}} - -
- - -
-
- {{job.icon}} - - {{job.name}} - {{job.desc}} - -
- -
- {{job.icon}} - - {{job.name}} - {{job.desc}} - -
-
-
diff --git a/application/client/src/app/ui/views/statusbar/session/component.ts b/application/client/src/app/ui/views/statusbar/session/component.ts deleted file mode 100644 index 793a72d5cd..0000000000 --- a/application/client/src/app/ui/views/statusbar/session/component.ts +++ /dev/null @@ -1,75 +0,0 @@ -import { - Component, - ChangeDetectorRef, - AfterViewInit, - ChangeDetectionStrategy, - ViewEncapsulation, - OnDestroy, -} from '@angular/core'; -import { Ilc, IlcInterface } from '@env/decorators/component'; -import { ChangesDetector } from '@ui/env/extentions/changes'; -import { Session as ActiveSession } from '@service/session'; -import { State } from './state'; -import { Subscriber } from '@platform/env/subscription'; - -@Component({ - selector: 'app-statusbar-session', - templateUrl: './template.html', - styleUrls: ['./styles.less'], - encapsulation: ViewEncapsulation.None, - changeDetection: ChangeDetectionStrategy.OnPush, - standalone: false, -}) -@Ilc() -export class Session extends ChangesDetector implements AfterViewInit, OnDestroy { - private _subscriber: Subscriber = new Subscriber(); - public state: State = new State(); - - constructor(cdRef: ChangeDetectorRef) { - super(cdRef); - } - - ngOnDestroy(): void { - this._subscriber.unsubscribe(); - } - - ngAfterViewInit(): void { - this.ilc().channel.session.change(() => { - this._bind(); - }); - this._bind(); - } - - private _bind() { - this._subscriber.unsubscribe(); - !this.access().session((active: ActiveSession) => { - this._subscriber.register( - active.stream.subjects.get().updated.subscribe(() => { - this._update(active); - }), - ); - this._subscriber.register( - active.search.subjects.get().updated.subscribe(() => { - this._update(active); - }), - ); - this._subscriber.register( - active.cursor.subjects.get().updated.subscribe(() => { - this._update(active); - }), - ); - this._update(active); - }) && this.state.drop(); - this.markChangesForCheck(); - } - - private _update(active: ActiveSession) { - this.state.len = active.stream.len(); - this.state.found = active.search.len(); - const selection = active.cursor.get(); - this.state.pos = selection.length === 0 ? 0 : selection[0]; - this.state.selected = selection.length; - this.detectChanges(); - } -} -export interface Session extends IlcInterface {} diff --git a/application/client/src/app/ui/views/statusbar/session/module.ts b/application/client/src/app/ui/views/statusbar/session/module.ts deleted file mode 100644 index 0bd3e72fd4..0000000000 --- a/application/client/src/app/ui/views/statusbar/session/module.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { NgModule } from '@angular/core'; -import { CommonModule } from '@angular/common'; -import { MatProgressSpinnerModule } from '@angular/material/progress-spinner'; - -import { Session } from './component'; - -@NgModule({ - imports: [CommonModule, MatProgressSpinnerModule], - declarations: [Session], - exports: [Session] -}) -export class SessionModule {} diff --git a/application/client/src/app/ui/views/statusbar/session/state.ts b/application/client/src/app/ui/views/statusbar/session/state.ts deleted file mode 100644 index 3d2ab27a47..0000000000 --- a/application/client/src/app/ui/views/statusbar/session/state.ts +++ /dev/null @@ -1,17 +0,0 @@ -export class State { - public pos: number = 0; - public selected: number = 0; - public len: number = 0; - public found: number = 0; - - public drop() { - this.pos = 0; - this.selected = 0; - this.len = 0; - this.found = 0; - } - - public isEmpty(): boolean { - return this.pos + this.len === 0; - } -} diff --git a/application/client/src/app/ui/views/statusbar/session/styles.less b/application/client/src/app/ui/views/statusbar/session/styles.less deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/application/client/src/app/ui/views/statusbar/session/template.html b/application/client/src/app/ui/views/statusbar/session/template.html deleted file mode 100644 index e37cad0475..0000000000 --- a/application/client/src/app/ui/views/statusbar/session/template.html +++ /dev/null @@ -1 +0,0 @@ -{{state.pos}} ({{state.selected}}) : {{state.found}} / {{state.len}} \ No newline at end of file diff --git a/application/client/src/app/ui/views/toolbar/chart/base/component.ts b/application/client/src/app/ui/views/toolbar/chart/base/component.ts deleted file mode 100644 index 342fbf2633..0000000000 --- a/application/client/src/app/ui/views/toolbar/chart/base/component.ts +++ /dev/null @@ -1,65 +0,0 @@ -import { - Component, - Input, - ViewChild, - OnDestroy, - AfterViewInit, - ChangeDetectorRef, - ElementRef, -} from '@angular/core'; -import { Session } from '@service/session'; -import { Ilc, IlcInterface } from '@env/decorators/component'; -import { State } from '../state'; -import { ChangesDetector } from '@ui/env/extentions/changes'; - -@Component({ - selector: 'app-views-chart-base', - template: '', - standalone: false, -}) -@Ilc() -export class OutputBase extends ChangesDetector implements AfterViewInit, OnDestroy { - @Input() public session!: Session; - @Input() public state!: State; - - @ViewChild('canvas') canvasElRef!: ElementRef; - - public rect: { width: number; height: number } = { width: 100, height: 100 }; - - protected elRef: ElementRef; - protected resizeObserve!: ResizeObserver; - - constructor(chRef: ChangeDetectorRef, elRef: ElementRef) { - super(chRef); - this.elRef = elRef; - } - - public ngOnDestroy(): void { - this.resizeObserve.disconnect(); - } - - public ngAfterViewInit(): void { - this.resizeObserve = new ResizeObserver((entries: ResizeObserverEntry[]) => { - if (entries.length !== 1) { - return; - } - const rect = entries[0].contentRect; - const changes = { - height: this.rect.height !== rect.height, - width: this.rect.width !== rect.width, - }; - this.rect = rect; - this.detectChanges(); - if (changes.width) { - this.state.cursor.setWidth(this.rect.width); - } else if (!changes.width && changes.height) { - this.session.charts.refresh(); - } - }); - this.resizeObserve.observe(this.elRef.nativeElement); - this.rect = this.elRef.nativeElement.getBoundingClientRect(); - this.detectChanges(); - this.state.cursor.setWidth(this.rect.width); - } -} -export interface OutputBase extends IlcInterface {} diff --git a/application/client/src/app/ui/views/toolbar/chart/component.ts b/application/client/src/app/ui/views/toolbar/chart/component.ts deleted file mode 100644 index f9599b5692..0000000000 --- a/application/client/src/app/ui/views/toolbar/chart/component.ts +++ /dev/null @@ -1,69 +0,0 @@ -import { - Component, - Input, - AfterContentInit, - ChangeDetectorRef, - OnDestroy, - HostBinding, - HostListener, -} from '@angular/core'; -import { Session } from '@service/session'; -import { Ilc, IlcInterface } from '@env/decorators/component'; -import { Initial } from '@env/decorators/initial'; -import { State } from './state'; -import { ChangesDetector } from '@ui/env/extentions/changes'; -import { unique } from '@platform/env/sequence'; - -const STATE_ID_REF = unique(); - -@Component({ - selector: 'app-views-chart', - templateUrl: './template.html', - styleUrls: ['./styles.less'], - standalone: false, -}) -@Initial() -@Ilc() -export class ViewChart extends ChangesDetector implements AfterContentInit, OnDestroy { - @Input() public session!: Session; - - @HostBinding('attr.tabindex') get tabindex() { - return 0; - } - @HostListener('focus', ['$event.target']) onFocus() { - this.focused = true; - } - @HostListener('blur', ['$event.target']) onBlur() { - this.focused = false; - } - - @HostListener('keyup', ['$event']) keyup(event: KeyboardEvent): void { - if (!this.focused) { - return; - } - if (event.key === 'ArrowLeft') { - this.state.cursor.change(Math.round(-State.KEY_MOVE_STEP)).move(); - } else if (event.key === 'ArrowRight') { - this.state.cursor.change(Math.round(State.KEY_MOVE_STEP)).move(); - } - } - - protected focused = false; - - public state: State = new State(); - - constructor(chRef: ChangeDetectorRef) { - super(chRef); - } - - public ngOnDestroy(): void { - this.session.storage.set(STATE_ID_REF, this.state); - } - - public ngAfterContentInit(): void { - const state = this.session.storage.get(STATE_ID_REF); - this.state = state === undefined ? this.state : state; - this.state.init(this, this.session); - } -} -export interface ViewChart extends IlcInterface {} diff --git a/application/client/src/app/ui/views/toolbar/chart/cursor.ts b/application/client/src/app/ui/views/toolbar/chart/cursor.ts deleted file mode 100644 index 1f00a7917d..0000000000 --- a/application/client/src/app/ui/views/toolbar/chart/cursor.ts +++ /dev/null @@ -1,189 +0,0 @@ -import { Subject } from '@platform/env/subscription'; -import { IRange } from '@platform/types/range'; -import { Session } from '@service/session'; - -const MIN_CURSOR_WIDTH = 16; - -export class Cursor { - public updated: Subject = new Subject(); - - public stream: number = 0; - public from: number = 0; - public to: number = 0; - public left: number = 0; - public right: number = 0; - public leftPx: string = '0px'; - public rightPx: string = '0px'; - public width: number = 0; - public visible: boolean = false; - - protected session!: Session; - - public init(session: Session) { - this.session = session; - this.setStreamLen(this.session.stream.len()); - } - - public destroy() { - this.updated.destroy(); - } - - public asRange(): IRange | undefined { - if (!this.visible) { - return undefined; - } - return { start: this.from, end: this.to }; - } - - public setStreamLen(len: number): void { - if (this.stream === this.to && this.from === 0) { - this.to = len; - } - this.stream = len; - this.update().frame(); - } - - public setWidth(width: number): void { - if (this.width === width) { - return; - } - this.width = width; - this.session.charts.cursor.setWidth(this.width); - this.update().frame(); - } - - public fromPx(left: number, width: number): void { - if (width < MIN_CURSOR_WIDTH) { - width = MIN_CURSOR_WIDTH; - } - if (left < 0) { - left = 0; - } - if (left + width > this.width) { - left = this.width - width; - } - this.left = left; - this.right = this.width - left - width; - this.update().coors(); - } - - public change(diff: number): { - left(): void; - right(): void; - resize(): void; - move(): void; - } { - const safeLeft = (left: number): number => { - const max = this.width - this.right - MIN_CURSOR_WIDTH; - if (left > max) { - left = max; - } - if (left < 0) { - left = 0; - } - return left; - }; - const safeRight = (right: number): number => { - const max = this.width - this.left - MIN_CURSOR_WIDTH; - if (right > max) { - right = max; - } - if (right < 0) { - right = 0; - } - return right; - }; - return { - left: (): void => { - this.left = safeLeft(this.left + diff); - this.update().coors(); - }, - right: (): void => { - this.right = safeRight(this.right - diff); - this.update().coors(); - }, - resize: (): void => { - const lSide = Math.round(diff / 2); - this.left = safeLeft(this.left + lSide); - const rSide = diff - lSide; - this.right = safeRight(this.right + rSide); - this.update().coors(); - }, - move: (): void => { - const width = this.width - this.left - this.right; - let left = this.left + diff; - if (left < 0) { - left = 0; - } - if (left + width > this.width) { - left = this.width - width; - } - this.left = left; - this.right = this.width - left - width; - this.update().coors(); - }, - }; - } - - public rowsRangeByX(x: number): IRange { - const frame = this.to - this.from; - const rate = this.width / frame; - const start = Math.floor(x / rate) + this.from; - if (rate < 1) { - return { start, end: start + Math.floor(frame / this.width) }; - } else { - return { start, end: start }; - } - } - - protected update(): { - coors(): void; - frame(): void; - notify(): void; - } { - const getRate = (): number | undefined => { - if (this.stream === 0) { - this.to = 0; - this.from = 0; - this.left = 0; - this.right = 0; - this.visible = false; - return undefined; - } - const rate = this.width / this.stream; - this.visible = rate < 1; - return rate > 1 ? undefined : rate; - }; - return { - coors: (): void => { - const rate = getRate(); - if (rate === undefined) { - return; - } - const from = Math.floor(this.left / rate); - const to = Math.floor((this.width - this.right) / rate); - this.from = from > 0 ? (from > this.stream ? this.stream : from) : 0; - this.to = to > 0 ? (to > this.stream ? this.stream : to) : 0; - this.update().notify(); - }, - frame: (): void => { - const rate = getRate(); - if (rate === undefined) { - return; - } - this.left = Math.floor(this.from * rate); - this.right = this.width - Math.floor(this.to * rate); - this.update().notify(); - }, - notify: (): void => { - if (this.visible) { - this.leftPx = `${this.left}px`; - this.rightPx = `${this.right}px`; - } - this.updated.emit(); - const frame = this.asRange(); - frame !== undefined && this.session.charts.cursor.setFrame(frame); - }, - }; - } -} diff --git a/application/client/src/app/ui/views/toolbar/chart/cursor/component.ts b/application/client/src/app/ui/views/toolbar/chart/cursor/component.ts deleted file mode 100644 index ceddc2a138..0000000000 --- a/application/client/src/app/ui/views/toolbar/chart/cursor/component.ts +++ /dev/null @@ -1,149 +0,0 @@ -import { Component, Input, ChangeDetectorRef, AfterViewInit, HostListener } from '@angular/core'; -import { Session } from '@service/session'; -import { Ilc, IlcInterface } from '@env/decorators/component'; -import { State } from '../state'; -import { ChangesDetector } from '@ui/env/extentions/changes'; -import { Initial } from '@env/decorators/initial'; -import { stop } from '@ui/env/dom'; - -enum Target { - Left = 'left', - Right = 'right', - Move = 'move', - Select = 'select', - None = 'none', -} - -@Component({ - selector: 'app-views-chart-cursor', - templateUrl: './template.html', - styleUrls: ['./styles.less'], - standalone: false, -}) -@Initial() -@Ilc() -export class ViewChartCursor extends ChangesDetector implements AfterViewInit { - public readonly Target = Target; - - @Input() public session!: Session; - @Input() public state!: State; - - @HostListener('window:mousemove', ['$event']) mousemove(event: MouseEvent): void { - if (this.selecting.x !== -1) { - const diff = event.x - this.selecting.x; - this.selecting.x = event.x; - this.selecting.w += diff; - if (this.selecting.w < 0) { - this.selecting.leftPx = `${this.selecting.l + this.selecting.w}px`; - } else { - this.selecting.leftPx = `${this.selecting.l}px`; - } - this.selecting.widthPx = `${Math.abs(this.selecting.w)}px`; - } else { - if (this.movement.target === Target.None) { - return; - } - const diff = event.x - this.movement.x; - if (this.movement.target === Target.Left) { - this.state.cursor.change(diff).left(); - } else if (this.movement.target === Target.Right) { - this.state.cursor.change(diff).right(); - } else if (this.movement.target === Target.Move) { - this.state.cursor.change(diff).move(); - } - this.movement.x = event.x; - } - } - - @HostListener('window:mouseup', ['$event']) mouseup(_event: MouseEvent): void { - if (this.selecting.x !== -1) { - const left = (() => { - if (this.selecting.w < 0) { - return this.selecting.l + this.selecting.w; - } else { - return this.selecting.l; - } - })(); - this.state.cursor.fromPx(left, Math.abs(this.selecting.w)); - } - this.movement.target = Target.None; - this.movement.x = 0; - this.selecting.x = -1; - } - - @HostListener('wheel', ['$event']) wheel(event: WheelEvent): void { - if (Math.abs(event.deltaY) > Math.abs(event.deltaX)) { - this.state.cursor - .change(Math.round(event.deltaY / State.REDUCE_ZOOM_ON_WHEEL)) - .resize(); - } else { - this.state.cursor.change(Math.round(event.deltaX / State.REDUCE_MOVE_ON_WHEEL)).move(); - } - stop(event); - } - - @HostListener('mousedown', ['$event']) mousedown(event: MouseEvent): void { - this.selecting.x = event.x; - this.selecting.w = 0; - this.selecting.l = event.x; - this.selecting.leftPx = `${event.x}px`; - this.selecting.widthPx = `0px`; - stop(event); - } - - protected movement: { - target: Target; - x: number; - } = { - target: Target.None, - x: 0, - }; - - protected selecting: { - x: number; - w: number; - l: number; - leftPx: string; - widthPx: string; - } = { - w: 0, - x: -1, - l: 0, - leftPx: '', - widthPx: '', - }; - - constructor(chRef: ChangeDetectorRef) { - super(chRef); - } - - public ngAfterViewInit(): void { - this.env().subscriber.register( - this.state.cursor.updated.subscribe(() => { - this.detectChanges(); - }), - ); - } - - public mousedownOnFrame(event: MouseEvent, target: Target): void { - if (target === Target.Select) { - this.mousedown(event); - } else { - this.movement.target = target; - this.movement.x = event.x; - } - stop(event); - } - - public wheelOnFrame(event: WheelEvent): void { - if (Math.abs(event.deltaY) > Math.abs(event.deltaX)) { - this.state.cursor - .change(Math.round(event.deltaY / State.REDUCE_ZOOM_ON_WHEEL)) - .resize(); - } else { - this.state.cursor.change(Math.round(event.deltaX / State.REDUCE_MOVE_ON_WHEEL)).move(); - } - stop(event); - } -} -export interface ViewChartCursor extends IlcInterface {} diff --git a/application/client/src/app/ui/views/toolbar/chart/cursor/styles.less b/application/client/src/app/ui/views/toolbar/chart/cursor/styles.less deleted file mode 100644 index acaf10e9bd..0000000000 --- a/application/client/src/app/ui/views/toolbar/chart/cursor/styles.less +++ /dev/null @@ -1,110 +0,0 @@ -@import '../../../../styles/variables.less'; - -:host { - display: block; - position: absolute; - height: 3rem; - left: 0; - right: 0; - bottom: 0; - overflow: hidden; - & div.selection { - position: absolute; - height: 100%; - top: 0; - background: var(--scheme-color-accent-50); - } - & div.cover { - position: absolute; - height: 100%; - top: 0; - background: var(--scheme-color-active-75); - cursor: default; - pointer-events: none; - &.left { - left: 0; - } - &.right { - right: 0; - } - } - & div.cursor { - position: absolute; - height: 100%; - top: 0; - border-left: thin solid var(--scheme-color-0); - border-right: thin solid var(--scheme-color-0); - background: none; - cursor: default; - & div.move-trigger { - position: absolute; - top: 0; - height: 16px; - width: 100%; - cursor: move; - } - & div.left, - & div.right { - position: absolute; - height: 100%; - width: 6px; - margin-left: -3px; - cursor: col-resize; - &::after { - position: absolute; - display: none; - font-size: 12px; - color: var(--scheme-color-1); - content: attr(row); - background: var(--scheme-color-active-75); - padding: 2px 4px; - border-radius: 2px; - top: 0; - z-index: 10; - } - &::before{ - position: absolute; - height: 16px; - width: 3px; - content: ''; - background: var(--scheme-color-0); - top: 0; - right: 0; - } - } - & div.left { - left: 0; - &::after { - right: 5px; - } - } - & div.right { - right: 0; - &::after { - left: 8px; - } - } - &.move { - & div.left, - & div.right { - &::after { - display: block; - } - } - } - &.left { - & div.left { - &::after { - display: block; - } - } - } - &.right { - & div.right { - &::after { - display: block; - } - } - } - } -} diff --git a/application/client/src/app/ui/views/toolbar/chart/cursor/template.html b/application/client/src/app/ui/views/toolbar/chart/cursor/template.html deleted file mode 100644 index 937b14ca67..0000000000 --- a/application/client/src/app/ui/views/toolbar/chart/cursor/template.html +++ /dev/null @@ -1,12 +0,0 @@ -
-
-
-
-
-
-
-
\ No newline at end of file diff --git a/application/client/src/app/ui/views/toolbar/chart/module.ts b/application/client/src/app/ui/views/toolbar/chart/module.ts deleted file mode 100644 index 056e24a5e1..0000000000 --- a/application/client/src/app/ui/views/toolbar/chart/module.ts +++ /dev/null @@ -1,24 +0,0 @@ -import { NgModule } from '@angular/core'; -import { CommonModule } from '@angular/common'; -import { ViewChart } from './component'; -import { ContainersModule } from '@elements/containers/module'; -import { AppDirectiviesModule } from '@directives/module'; -import { MatProgressSpinnerModule } from '@angular/material/progress-spinner'; -import { MatIconModule } from '@angular/material/icon'; -import { ViewChartOutput } from './output/component'; -import { ViewChartSummary } from './summary/component'; -import { ViewChartCursor } from './cursor/component'; - -@NgModule({ - imports: [ - CommonModule, - ContainersModule, - AppDirectiviesModule, - MatIconModule, - MatProgressSpinnerModule, - ], - declarations: [ViewChart, ViewChartOutput, ViewChartSummary, ViewChartCursor], - exports: [ViewChart], - bootstrap: [ViewChart], -}) -export class ChartModule {} diff --git a/application/client/src/app/ui/views/toolbar/chart/output/component.ts b/application/client/src/app/ui/views/toolbar/chart/output/component.ts deleted file mode 100644 index de300f012b..0000000000 --- a/application/client/src/app/ui/views/toolbar/chart/output/component.ts +++ /dev/null @@ -1,108 +0,0 @@ -import { Component, AfterViewInit, HostListener } from '@angular/core'; -import { Ilc, IlcInterface } from '@env/decorators/component'; -import { Initial } from '@env/decorators/initial'; -import { OutputBase } from '../base/component'; -import { Render as ChartsRender } from '../render/chart'; -import { Render as FiltersRender } from '../render/filters'; -import { State } from '../state'; -import { stop } from '@ui/env/dom'; -import { Label } from '../render/chart.label'; -import { getContrastColor } from '@styles/colors'; -import { Owner } from '@schema/content/row'; -import { IRange } from '@platform/types/range'; - -const MAX_LABELS_COUNT = 5; - -@Component({ - selector: 'app-views-chart-output', - templateUrl: './template.html', - styleUrls: ['./styles.less'], - standalone: false, -}) -@Initial() -@Ilc() -export class ViewChartOutput extends OutputBase implements AfterViewInit { - protected renders!: { - charts: ChartsRender; - filters: FiltersRender; - }; - - @HostListener('mousemove', ['$event']) mousemove(event: MouseEvent): void { - this.labels = this.renders.charts.coors.get(event.offsetX); - if (this.labels.length > MAX_LABELS_COUNT) { - this.cutted = this.labels.splice(MAX_LABELS_COUNT, this.labels.length).length; - } else { - this.cutted = 0; - } - this.x = `${event.offsetX}px`; - this.range = this.state.cursor.rowsRangeByX(event.offsetX); - this.detectChanges(); - } - - @HostListener('mouseleave', ['$event']) mouseleave(_event: MouseEvent): void { - this.x = undefined; - this.detectChanges(); - } - - @HostListener('click', ['$event']) click(event: MouseEvent): void { - const labels: Label[] = this.renders.charts.coors.get(event.offsetX); - if (labels.length === 0) { - this.session.cursor.select( - this.state.cursor.rowsRangeByX(event.offsetX).start, - Owner.Chart, - undefined, - undefined, - ); - } else { - this.session.cursor.select(labels[0].position, Owner.Chart, undefined, undefined); - } - } - - @HostListener('wheel', ['$event']) wheel(event: WheelEvent): void { - if (Math.abs(event.deltaY) > Math.abs(event.deltaX)) { - this.state.cursor - .change(Math.round(event.deltaY / State.REDUCE_ZOOM_ON_WHEEL)) - .resize(); - } else { - this.state.cursor.change(Math.round(event.deltaX / State.REDUCE_MOVE_ON_WHEEL)).move(); - } - stop(event); - } - - public x: string | undefined; - public labels: Label[] = []; - public range: IRange | undefined; - public cutted: number = 0; - - public override ngAfterViewInit(): void { - super.ngAfterViewInit(); - this.renders = { - charts: new ChartsRender(this.canvasElRef.nativeElement), - filters: new FiltersRender(this.canvasElRef.nativeElement), - }; - this.env().subscriber.register( - this.session.charts.subjects.get().output.subscribe((event) => { - this.renders.filters - .setMap(event.map) - .setFilters(event.filters) - .setActive(event.active) - .setFrame(event.frame) - .clear() - .refresh(); - this.renders.charts - .setSelected(event.selected) - .setValues(event.values) - .setPeaks(event.peaks) - .setCharts(event.charts) - .setFrame(event.frame) - .refresh(); - }), - ); - this.session.charts.refresh(); - } - - public getLabelColor(color: string): string { - return getContrastColor(color, true); - } -} -export interface ViewChartOutput extends IlcInterface {} diff --git a/application/client/src/app/ui/views/toolbar/chart/output/styles.less b/application/client/src/app/ui/views/toolbar/chart/output/styles.less deleted file mode 100644 index 5dea0041cd..0000000000 --- a/application/client/src/app/ui/views/toolbar/chart/output/styles.less +++ /dev/null @@ -1,61 +0,0 @@ -@import '../../../../styles/variables.less'; - -:host { - display: block; - position: absolute; - top: 0; - left: 0; - right: 0; - bottom: 3rem; - overflow: hidden; - & canvas { - position: absolute; - display: block; - padding: 0; - margin: 0; - bottom: 0; - right: 0; - left: 0; - top: 0; - } - & span.pointer{ - display: block; - position: absolute; - height: 100%; - top:0; - border-left: solid thin var(--scheme-color-1); - pointer-events: none; - & span.label { - display: flex; - position: relative; - flex-direction: row; - margin: 3px 6px; - border-radius: 2px; - padding: 2px 6px; - font-size: 13px; - white-space: nowrap; - & span.value, - & span.row { - color: inherit; - } - & span.value { - font-weight: 700; - } - & span.row { - font-weight: 400; - } - &.more { - background: var(--scheme-color-5-95); - color: var(--scheme-color-1); - font-size: 11px; - white-space: nowrap; - } - &.range { - background: var(--scheme-color-5-95); - color: var(--scheme-color-1); - font-size: 11px; - white-space: nowrap; - } - } - } -} diff --git a/application/client/src/app/ui/views/toolbar/chart/output/template.html b/application/client/src/app/ui/views/toolbar/chart/output/template.html deleted file mode 100644 index a612f0c0be..0000000000 --- a/application/client/src/app/ui/views/toolbar/chart/output/template.html +++ /dev/null @@ -1,25 +0,0 @@ - - - {{range.start}} - {{range.end}} - {{range.start}} - - - {{label.position}}: - {{label.value}} - - - {{label.position}}: - {{label.value}} - ({{label.min}}-{{label.max}}) - - - and more {{cutted}} - diff --git a/application/client/src/app/ui/views/toolbar/chart/render/chart.coors.ts b/application/client/src/app/ui/views/toolbar/chart/render/chart.coors.ts deleted file mode 100644 index 28179f6ca9..0000000000 --- a/application/client/src/app/ui/views/toolbar/chart/render/chart.coors.ts +++ /dev/null @@ -1,56 +0,0 @@ -import { ChartRequest } from '@service/session/dependencies/search/charts/request'; -import { Label } from './chart.label'; - -export type TChartValues = [string, number, number, number, number][]; - -export class ChartCoors { - static DEFAULT_OFFSET_AROUND = 3; - - protected coors: Map = new Map(); - - public drop(): void { - this.coors.clear(); - } - - public add( - x: number, - value: number, - row: number, - min: number, - max: number, - request: ChartRequest | undefined, - ): void { - if (request === undefined) { - return; - } - let values = this.coors.get(x); - if (values === undefined) { - values = []; - } - values.push([request.definition.color, value, row, min, max]); - this.coors.set(x, values); - } - - public get(x: number, offset = ChartCoors.DEFAULT_OFFSET_AROUND): Label[] { - const left = x - offset; - const right = x + offset; - let closed: number | undefined = undefined; - let distance: number = Infinity; - Array.from(this.coors.keys()) - .filter((k) => k >= left && k <= right) - .forEach((k) => { - const dist = Math.abs(k - x); - if (dist < distance) { - closed = k; - distance = dist; - } - }); - if (closed === undefined) { - return []; - } - const values = this.coors.get(closed); - return values === undefined - ? [] - : values.map((v) => new Label(v[0], v[1], v[2], v[3], v[4])); - } -} diff --git a/application/client/src/app/ui/views/toolbar/chart/render/chart.label.ts b/application/client/src/app/ui/views/toolbar/chart/render/chart.label.ts deleted file mode 100644 index f3a9d37013..0000000000 --- a/application/client/src/app/ui/views/toolbar/chart/render/chart.label.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { getContrastColor } from '@ui/styles/colors'; - -export class Label { - public readonly value: string; - public readonly candle: boolean; - public readonly color: string; - constructor( - public readonly bk: string, - value: number, - public readonly position: number, - public readonly min: number, - public readonly max: number, - ) { - this.color = getContrastColor(bk, true); - this.candle = !(min === value && max === value); - this.value = value.toFixed(2); - } -} diff --git a/application/client/src/app/ui/views/toolbar/chart/render/chart.ts b/application/client/src/app/ui/views/toolbar/chart/render/chart.ts deleted file mode 100644 index 8a3523e0b3..0000000000 --- a/application/client/src/app/ui/views/toolbar/chart/render/chart.ts +++ /dev/null @@ -1,291 +0,0 @@ -import { ResultSearchValues, Point } from '@platform/types/bindings'; -import { shadeColor } from '@styles/colors'; -import { styles } from '@ui/service/styles'; -import { Base } from './render'; -import { ChartRequest, ChartType } from '@service/session/dependencies/search/charts/request'; -import { ChartCoors } from './chart.coors'; -import { IRange } from '@platform/types/range'; - -const GRID_LINES_COUNT = 5; - -export class Render extends Base { - protected values: ResultSearchValues = new Map(); - protected peaks: Map = new Map(); - protected charts: ChartRequest[] = []; - protected points: boolean = true; - protected selected: number | undefined; - - protected yAxisRender(): void { - if (this.selected === undefined) { - return; - } - const selected = this.values.get(this.selected); - const peaks = this.peaks.get(this.selected); - if (selected === undefined || peaks === undefined) { - return; - } - const min = peaks[0]; - const diff = peaks[1] - min; - const size = this.size(); - this.context.beginPath(); - const step = Math.floor(size.height / GRID_LINES_COUNT); - for (let s = 0; s <= GRID_LINES_COUNT; s += 1) { - const y = s * step + (s === GRID_LINES_COUNT ? -0.5 : 0.5); - this.context.moveTo(0, y); - this.context.lineTo(size.width, y); - } - this.context.lineWidth = 1; - this.context.strokeStyle = styles.colors().scheme_color_0; - this.context.setLineDash([1, 1]); - this.context.stroke(); - this.context.closePath(); - this.context.fillStyle = styles.colors().scheme_color_0; - this.context.font = '10px sans-serif'; - this.context.textAlign = 'right'; - const diffStep = diff / GRID_LINES_COUNT; - for (let s = 0; s <= GRID_LINES_COUNT; s += 1) { - const y = s * step; - const text = (min + diffStep * (GRID_LINES_COUNT - s)).toFixed(2); - const box = this.context.measureText(text); - let yOffset = -2; - this.context.fillStyle = shadeColor(styles.colors().scheme_color_5, 75); - if (s === 0) { - this.context.textBaseline = 'top'; - yOffset = 2; - this.context.fillRect(size.width - 18 - box.width - 6, y, box.width + 12, 16); - } else { - this.context.textBaseline = 'bottom'; - this.context.fillRect(size.width - 18 - box.width - 6, y - 16, box.width + 12, 16); - } - this.context.fillStyle = styles.colors().scheme_color_0; - this.context.fillText(text, size.width - 18, y + yOffset); - } - this.context.setLineDash([]); - } - - public readonly coors: ChartCoors = new ChartCoors(); - - public ignorePoints(): Render { - this.points = false; - return this; - } - - public setSelected(index: number | undefined): Render { - this.selected = index; - return this; - } - - public setValues(values: ResultSearchValues): Render { - this.values = values; - return this; - } - - public setPeaks(peaks: Map): Render { - this.peaks = peaks; - return this; - } - - public setCharts(charts: ChartRequest[]): Render { - this.charts = charts; - return this; - } - - public render(): void { - const frame = this.frame; - if (frame === undefined) { - return; - } - if (frame.end - frame.start <= 0) { - return; - } - this.coors.drop(); - const size = this.size(); - this.values.forEach((points: Point[], k: number) => { - const peaks = this.peaks.get(k); - if (peaks === undefined) { - console.error(`No peaks for chart #${k}`); - return; - } - const chart = this.charts[k]; - const type = chart === undefined ? ChartType.Linear : chart.definition.type; - const render = this.modes(frame, peaks, points, size, chart); - switch (type) { - case ChartType.Linear: - render.linear(); - break; - case ChartType.Stepper: - render.stepper(); - break; - case ChartType.Temperature: - render.temperature(); - break; - } - }); - this.yAxisRender(); - } - - protected modes( - frame: IRange, - peaks: [number, number], - values: Point[], - size: { - width: number; - height: number; - }, - chart: ChartRequest | undefined, - ): { - linear(): void; - stepper(): void; - temperature(): void; - } { - const rate = { - byX: size.width / (frame.end - frame.start), - byY: size.height / (peaks[1] - peaks[0]), - }; - return { - linear: (): void => { - this.context.beginPath(); - const coors: [number, number][] = []; - values.forEach((point: Point, i: number) => { - const position = point.row; - const value = point.y_value; - const x = Math.round((position - frame.start) * rate.byX); - const y = size.height - Math.round((value - peaks[0]) * rate.byY); - if (i === 0) { - this.context.moveTo(x, y); - } else { - this.context.lineTo(x, y); - } - coors.push([x, y]); - this.coors.add(x, value, position, point.min, point.max, chart); - }); - const color = - chart === undefined ? styles.colors().scheme_color_0 : chart.definition.color; - const lineWidth = - chart === undefined - ? ChartRequest.DEFAULT_LINE_WIDTH - : chart.definition.widths.line; - this.context.lineWidth = lineWidth; - this.context.strokeStyle = color; - this.context.stroke(); - this.context.closePath(); - const pointRadius = - chart === undefined - ? ChartRequest.DEFAULT_POINT_RADIUS - : chart.definition.widths.point; - if (!this.points || pointRadius === 0) { - return; - } - coors.forEach((coors: [number, number]) => { - this.context.beginPath(); - this.context.arc(coors[0], coors[1], pointRadius, 0, Math.PI * 2, true); - this.context.fillStyle = color; - this.context.fill(); - this.context.closePath(); - }); - }, - stepper: (): void => { - this.context.beginPath(); - const coors: [number, number][] = []; - let prevY = 0; - values.forEach((point: Point, i: number) => { - const position = point.row; - const value = point.y_value; - const x = Math.round((position - frame.start) * rate.byX); - const y = size.height - Math.round((value - peaks[0]) * rate.byY); - if (i === 0) { - this.context.moveTo(x, y); - } else { - this.context.lineTo(x, prevY); - this.context.lineTo(x, y); - } - prevY = y; - coors.push([x, y]); - this.coors.add(x, value, position, point.min, point.max, chart); - }); - const color = - chart === undefined ? styles.colors().scheme_color_0 : chart.definition.color; - const lineWidth = - chart === undefined - ? ChartRequest.DEFAULT_LINE_WIDTH - : chart.definition.widths.line; - this.context.lineWidth = lineWidth; - this.context.strokeStyle = color; - this.context.stroke(); - this.context.closePath(); - const pointRadius = - chart === undefined - ? ChartRequest.DEFAULT_POINT_RADIUS - : chart.definition.widths.point; - if (!this.points || pointRadius === 0) { - return; - } - coors.forEach((coors: [number, number]) => { - this.context.beginPath(); - this.context.arc(coors[0], coors[1], pointRadius, 0, Math.PI * 2, true); - this.context.fillStyle = color; - this.context.fill(); - this.context.closePath(); - }); - }, - temperature: (): void => { - this.context.beginPath(); - const coors: [number, number][] = []; - const start = { x: 0, y: 0 }; - const end = { x: 0, y: 0 }; - values.forEach((point: Point, i: number) => { - const position = point.row; - const value = point.y_value; - const x = Math.round((position - frame.start) * rate.byX); - const y = size.height - Math.round((value - peaks[0]) * rate.byY); - if (i === 0) { - this.context.moveTo(x, y); - start.x = x; - start.y = y; - } else { - this.context.lineTo(x, y); - } - if (i === values.length - 1) { - end.x = x; - end.y = y; - } - coors.push([x, y]); - this.coors.add(x, value, position, point.min, point.max, chart); - }); - const color = - chart === undefined ? styles.colors().scheme_color_0 : chart.definition.color; - const lineWidth = - chart === undefined - ? ChartRequest.DEFAULT_LINE_WIDTH - : chart.definition.widths.line; - this.context.lineWidth = lineWidth; - this.context.strokeStyle = color; - this.context.stroke(); - this.context.lineTo(end.x, size.height); - this.context.lineTo(start.x, size.height); - this.context.lineTo(start.x, start.y); - this.context.closePath(); - const wHalf = Math.round(size.width / 2); - const gradient = this.context.createLinearGradient(wHalf, 0, wHalf, size.height); - gradient.addColorStop(0, color); - gradient.addColorStop(1, shadeColor(color, 200)); - this.context.fillStyle = gradient; - this.context.fill(); - const pointRadius = - chart === undefined - ? ChartRequest.DEFAULT_POINT_RADIUS - : chart.definition.widths.point; - if (!this.points || pointRadius === 0) { - return; - } - coors.forEach((coors: [number, number]) => { - this.context.beginPath(); - this.context.arc(coors[0], coors[1], pointRadius, 0, Math.PI * 2, true); - this.context.fillStyle = color; - this.context.fill(); - this.context.closePath(); - }); - }, - }; - } -} diff --git a/application/client/src/app/ui/views/toolbar/chart/render/filters.ts b/application/client/src/app/ui/views/toolbar/chart/render/filters.ts deleted file mode 100644 index 58645b7882..0000000000 --- a/application/client/src/app/ui/views/toolbar/chart/render/filters.ts +++ /dev/null @@ -1,63 +0,0 @@ -import { ISearchMap } from '@platform/types/filter'; -import { styles } from '@ui/service/styles'; -import { Base } from './render'; -import { FilterRequest } from '@service/session/dependencies/search/filters/request'; - -export class Render extends Base { - static COLUMN_WIDTH = 2; - - protected map: ISearchMap = []; - protected filters: FilterRequest[] = []; - protected active: boolean = false; - - public setMap(map: ISearchMap): Render { - this.map = map; - return this; - } - - public setFilters(filters: FilterRequest[]): Render { - this.filters = filters; - return this; - } - - public setActive(active: boolean): Render { - this.active = active; - return this; - } - - public render(): void { - const frame = this.frame; - if (frame === undefined) { - return; - } - const frameLength = frame.end - frame.start; - if (frameLength <= 0) { - return; - } - let max = 0; - this.map.forEach((matches: [number, number][]) => { - const m = Math.max(...matches.map((p) => p[1])); - max = m > max ? m : max; - }); - if (max === 0) { - return; - } - const size = this.size(); - const rateByY = size.height / max; - const maxColumns = size.width / Render.COLUMN_WIDTH; - const columnWidth = - maxColumns <= frameLength ? Render.COLUMN_WIDTH : size.width / frameLength; - this.map.forEach((matches: [number, number][], left: number) => { - matches.forEach((pair: [number, number]) => { - const color = this.active - ? styles.colors().scheme_color_2 - : this.filters[pair[0]] === undefined - ? styles.colors().scheme_color_match - : this.filters[pair[0]].definition.colors.background; - const h = Math.round(pair[1] * rateByY); - this.context.fillStyle = color; - this.context.fillRect(left * columnWidth, size.height - h, columnWidth, h); - }); - }); - } -} diff --git a/application/client/src/app/ui/views/toolbar/chart/render/render.ts b/application/client/src/app/ui/views/toolbar/chart/render/render.ts deleted file mode 100644 index 7f2a7a7fff..0000000000 --- a/application/client/src/app/ui/views/toolbar/chart/render/render.ts +++ /dev/null @@ -1,58 +0,0 @@ -import { IRange } from '@platform/types/range'; -import { styles } from '@ui/service/styles'; - -export abstract class Base { - protected context: CanvasRenderingContext2D; - protected frame: IRange | undefined; - protected rendering: { - processing: boolean; - recalled: boolean; - } = { - processing: false, - recalled: false, - }; - - constructor(protected readonly canvasElementRef: HTMLCanvasElement) { - const context: CanvasRenderingContext2D | null = canvasElementRef.getContext('2d'); - if (context === null) { - throw new Error(`Fail to get access to canvas context`); - } - this.context = context; - } - - protected size(): { width: number; height: number } { - return { - width: this.canvasElementRef.width, - height: this.canvasElementRef.height, - }; - } - - public setFrame(frame: IRange): Base { - this.frame = frame; - return this; - } - - public clear(): Base { - this.context.fillStyle = styles.colors().scheme_color_5; - this.context.fillRect(0, 0, this.canvasElementRef.width, this.canvasElementRef.height); - return this; - } - - public refresh(): Base { - if (this.rendering.processing) { - this.rendering.recalled = true; - return this; - } - this.rendering.processing = true; - this.render(); - const recalled = this.rendering.recalled; - this.rendering.processing = false; - this.rendering.recalled = false; - if (recalled) { - this.refresh(); - } - return this; - } - - protected abstract render(): void; -} diff --git a/application/client/src/app/ui/views/toolbar/chart/service.ts b/application/client/src/app/ui/views/toolbar/chart/service.ts deleted file mode 100644 index 0823c79707..0000000000 --- a/application/client/src/app/ui/views/toolbar/chart/service.ts +++ /dev/null @@ -1,88 +0,0 @@ -import { Subscriber, Subject, Subscription } from '@platform/env/subscription'; -import { Destroy } from '@platform/types/env/types'; -import { Session } from '@service/session'; - -const CHART_SERVICE = 'workspace_chart_service'; - -export interface IPosition { - left: number; - width: number; - full: number; -} - -export interface IPositionChange { - session: string; - position: IPosition; -} - -export class Service extends Subscriber implements Destroy { - private _noData: boolean = true; - private _positions: Map = new Map(); - private readonly _subjects: { - change: Subject; - wheel: Subject; - } = { - change: new Subject(), - wheel: new Subject(), - }; - - static from(session: Session): Service { - const restored = session.storage.get(CHART_SERVICE); - if (restored === undefined) { - const service = new Service(); - session.storage.set(CHART_SERVICE, service); - return service; - } else { - return restored; - } - } - - public correction(session: string, width: number): IPosition | undefined { - const position: IPosition | undefined = this._positions.get(session); - if (position === undefined || position.full <= 0) { - return; - } - const change: number = width / position.full; - position.width = position.width * change; - position.left = position.left * change; - return position; - } - - public setPosition(data: IPositionChange) { - this._positions.set(data.session, data.position); - this._subjects.change.emit(data); - } - - public getPosition(session: string): IPositionChange { - let position: IPosition | undefined = this._positions.get(session); - if (position === undefined) { - position = { - full: 0, - left: 0, - width: 0, - }; - this._positions.set(session, position); - } - return { session: session, position: position }; - } - - public get noData(): boolean { - return this._noData; - } - - public set noData(noData: boolean) { - this._noData = noData; - } - - public get wheel(): Subject { - return this._subjects.wheel; - } - - public onChange(handler: (event: IPositionChange) => void): Subscription { - return this._subjects.change.subscribe(handler); - } - - public destroy() { - this._subjects.change.destroy(); - } -} diff --git a/application/client/src/app/ui/views/toolbar/chart/state.ts b/application/client/src/app/ui/views/toolbar/chart/state.ts deleted file mode 100644 index 5f39fdc835..0000000000 --- a/application/client/src/app/ui/views/toolbar/chart/state.ts +++ /dev/null @@ -1,42 +0,0 @@ -import { Destroy } from '@platform/types/env/types'; -import { IlcInterface } from '@service/ilc'; -import { ChangesDetector } from '@ui/env/extentions/changes'; -import { Subscriber } from '@platform/env/subscription'; -import { Session } from '@service/session'; -import { Cursor } from './cursor'; - -export class State extends Subscriber implements Destroy { - public static REDUCE_MOVE_ON_WHEEL = 5; - public static REDUCE_ZOOM_ON_WHEEL = 3; - public static KEY_MOVE_STEP = 15; - - protected session!: Session; - - public ref!: IlcInterface & ChangesDetector; - public cursor: Cursor = new Cursor(); - public hasData: boolean = false; - - public destroy(): void { - this.unsubscribe(); - this.cursor.destroy(); - } - - public init(ref: IlcInterface & ChangesDetector, session: Session): void { - this.ref = ref; - this.session = session; - this.register( - session.stream.subjects.get().updated.subscribe((len: number) => { - this.cursor.setStreamLen(len); - }), - session.charts.subjects.get().summary.subscribe((_event) => { - this.hasData = this.session.charts.hasData(); - this.ref.detectChanges(); - }), - session.charts.subjects.get().output.subscribe((_event) => { - this.hasData = this.session.charts.hasData(); - this.ref.detectChanges(); - }), - ); - this.cursor.init(session); - } -} diff --git a/application/client/src/app/ui/views/toolbar/chart/styles.less b/application/client/src/app/ui/views/toolbar/chart/styles.less deleted file mode 100644 index c04c9b5ffd..0000000000 --- a/application/client/src/app/ui/views/toolbar/chart/styles.less +++ /dev/null @@ -1,32 +0,0 @@ -@import '../../../styles/variables.less'; - -:host { - position: absolute; - display: block; - padding: 0; - margin: 0; - bottom: 0.5rem; - right: 0.5rem; - left: 0.5rem; - top: 0.5rem; - overflow: hidden; - outline: none; - & div.placeholder { - position: absolute; - display: flex; - align-items: center; - justify-content: center; - padding: 0; - margin: 0; - bottom: 0; - right: 0; - left: 0; - top: 0; - overflow: hidden; - & p { - position: relative; - color: var(--scheme-color-2); - max-width: 300px; - } - } -} diff --git a/application/client/src/app/ui/views/toolbar/chart/summary/component.ts b/application/client/src/app/ui/views/toolbar/chart/summary/component.ts deleted file mode 100644 index 3556fd27b8..0000000000 --- a/application/client/src/app/ui/views/toolbar/chart/summary/component.ts +++ /dev/null @@ -1,49 +0,0 @@ -import { Component, AfterViewInit } from '@angular/core'; -import { Ilc, IlcInterface } from '@env/decorators/component'; -import { Initial } from '@env/decorators/initial'; -import { OutputBase } from '../base/component'; -import { Render as ChartsRender } from '../render/chart'; -import { Render as FiltersRender } from '../render/filters'; - -@Component({ - selector: 'app-views-chart-summary', - templateUrl: './template.html', - styleUrls: ['./styles.less'], - standalone: false, -}) -@Initial() -@Ilc() -export class ViewChartSummary extends OutputBase implements AfterViewInit { - protected renders!: { - charts: ChartsRender; - filters: FiltersRender; - }; - - public override ngAfterViewInit(): void { - super.ngAfterViewInit(); - this.renders = { - charts: new ChartsRender(this.canvasElRef.nativeElement).ignorePoints(), - filters: new FiltersRender(this.canvasElRef.nativeElement), - }; - this.env().subscriber.register( - this.session.charts.subjects.get().summary.subscribe((event) => { - this.renders.filters - .setMap(event.map) - .setFilters(event.filters) - .setActive(event.active) - .setFrame(event.frame) - .clear() - .refresh(); - this.renders.charts - .setSelected(undefined) - .setValues(event.values) - .setPeaks(event.peaks) - .setCharts(event.charts) - .setFrame(event.frame) - .refresh(); - }), - ); - this.session.charts.refresh(); - } -} -export interface ViewChartSummary extends IlcInterface {} diff --git a/application/client/src/app/ui/views/toolbar/chart/summary/styles.less b/application/client/src/app/ui/views/toolbar/chart/summary/styles.less deleted file mode 100644 index 5fd8b32ac5..0000000000 --- a/application/client/src/app/ui/views/toolbar/chart/summary/styles.less +++ /dev/null @@ -1,22 +0,0 @@ -@import '../../../../styles/variables.less'; - -:host { - display: block; - position: absolute; - height: 3rem; - left: 0; - right: 0; - bottom: 0; - overflow: hidden; - border-top: thin dotted var(--scheme-color-1); - & canvas { - position: absolute; - display: block; - padding: 0; - margin: 0; - bottom: 0; - right: 0; - left: 0; - top: 0; - } -} diff --git a/application/client/src/app/ui/views/toolbar/chart/summary/template.html b/application/client/src/app/ui/views/toolbar/chart/summary/template.html deleted file mode 100644 index e8a8b0f61d..0000000000 --- a/application/client/src/app/ui/views/toolbar/chart/summary/template.html +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/application/client/src/app/ui/views/toolbar/chart/template.html b/application/client/src/app/ui/views/toolbar/chart/template.html deleted file mode 100644 index 872452028a..0000000000 --- a/application/client/src/app/ui/views/toolbar/chart/template.html +++ /dev/null @@ -1,6 +0,0 @@ - - - -
-

As soon as some filter will be created, the frequency of matching will be shown. Also as soon as some chart term will be created, the chart will be rendered.

-
diff --git a/application/client/src/app/ui/views/toolbar/details/component.ts b/application/client/src/app/ui/views/toolbar/details/component.ts deleted file mode 100644 index 840f2d8519..0000000000 --- a/application/client/src/app/ui/views/toolbar/details/component.ts +++ /dev/null @@ -1,108 +0,0 @@ -import { Component, AfterViewInit, ChangeDetectorRef, OnDestroy } from '@angular/core'; -import { Session } from '@service/session'; -import { Ilc, IlcInterface } from '@env/decorators/component'; -import { Initial } from '@env/decorators/initial'; -import { ChangesDetector } from '@ui/env/extentions/changes'; -import { Subscriber } from '@platform/env/subscription'; -import { Row, RowSrc } from '@schema/content/row'; -import { DomSanitizer, SafeHtml } from '@angular/platform-browser'; - -@Component({ - selector: 'app-views-details', - templateUrl: './template.html', - styleUrls: ['./styles.less'], - standalone: false, -}) -@Initial() -@Ilc() -export class Details extends ChangesDetector implements AfterViewInit, OnDestroy { - protected session: Session | undefined; - protected subscriber: Subscriber = new Subscriber(); - protected sanitizer: DomSanitizer; - - public row: RowSrc | undefined; - public origin: SafeHtml | undefined; - public parsed: SafeHtml | undefined; - - constructor(cdRef: ChangeDetectorRef, sanitizer: DomSanitizer) { - super(cdRef); - this.sanitizer = sanitizer; - } - - public ngOnDestroy(): void { - this.subscriber.unsubscribe(); - } - - public ngAfterViewInit(): void { - this.env().subscriber.register( - this.ilc().channel.session.change(this.bind.bind(this)), - this.ilc().services.system.hotkeys.listen('Ctrl + C', () => { - const selection = document.getSelection(); - if (selection === null) { - return; - } - this.copy(selection.toString()); - }), - ); - this.bind().update(); - } - - public copy(content?: string): void { - const row = this.row; - if (row === undefined) { - return; - } - navigator.clipboard.writeText( - (() => { - if (content !== undefined) { - return content; - } - const parsed = document.querySelector('pre[id="parsed_content_holder"]'); - if (parsed !== null) { - return parsed.textContent as string; - } else { - return row.content; - } - })() - .replace(/\u0006/gi, '\n') - .replace(/\t/gi, ' '.repeat(4)), - ); - } - - protected bind(): Details { - this.subscriber.unsubscribe(); - this.session = this.ilc().services.system.session.active().session(); - this.session !== undefined && - this.subscriber.register( - this.session.cursor.subjects.get().selected.subscribe(this.update.bind(this)), - this.session.cursor.subjects.get().loaded.subscribe(this.update.bind(this)), - ); - return this; - } - - protected update() { - if (this.session === undefined) { - this.row = undefined; - this.origin = undefined; - this.parsed = undefined; - } else { - this.row = this.session.cursor.getSingle().row(); - if (this.row === undefined) { - this.origin = undefined; - this.parsed = undefined; - } else { - this.origin = this.sanitizer.bypassSecurityTrustHtml( - this.row.content.replace(/\u0006/gi, '
').replace(/\t/gi, ' '.repeat(4)), - ); - const row = new Row(this.row); - this.parsed = - row.html !== undefined - ? this.sanitizer.bypassSecurityTrustHtml(row.html) - : undefined; - row.destroy(); - } - } - this.detectChanges(); - } -} -export interface Details extends IlcInterface {} diff --git a/application/client/src/app/ui/views/toolbar/details/module.ts b/application/client/src/app/ui/views/toolbar/details/module.ts deleted file mode 100644 index f347ffecca..0000000000 --- a/application/client/src/app/ui/views/toolbar/details/module.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { NgModule } from '@angular/core'; -import { CommonModule } from '@angular/common'; -import { Details } from './component'; - -@NgModule({ - imports: [CommonModule], - declarations: [Details], - exports: [Details], - bootstrap: [Details], -}) -export class DetailsModule {} diff --git a/application/client/src/app/ui/views/toolbar/details/styles.less b/application/client/src/app/ui/views/toolbar/details/styles.less deleted file mode 100644 index 90c3cf2867..0000000000 --- a/application/client/src/app/ui/views/toolbar/details/styles.less +++ /dev/null @@ -1,44 +0,0 @@ -@import '../../../styles/variables.less'; - -:host { - top: 6px; - left: 6px; - bottom: 6px; - right: 6px; - position: absolute; - overflow: hidden; - div.summary { - position: absolute; - top: 0; - left: 0; - height: 24px; - width: 100%; - overflow: hidden; - display: flex; - flex-direction: row; - vertical-align: middle; - align-items: center; - & span.filler { - flex: auto; - } - } - div.content { - position: absolute; - top:24px; - left: 0; - bottom: 0; - width: 100%; - overflow: auto; - & p.caption{ - margin: 6px 0px 3px 0; - } - & pre { - user-select: text; - font-size: 16px; - white-space: break-spaces; - & * { - user-select: text; - } - } - } -} diff --git a/application/client/src/app/ui/views/toolbar/details/template.html b/application/client/src/app/ui/views/toolbar/details/template.html deleted file mode 100644 index 4253581985..0000000000 --- a/application/client/src/app/ui/views/toolbar/details/template.html +++ /dev/null @@ -1,17 +0,0 @@ -
- Row #: {{row.position}} - - -
-
- -

Origin

-

-    
- -

Parsed

-

-    
-
diff --git a/application/client/src/app/ui/views/toolbar/history/component.ts b/application/client/src/app/ui/views/toolbar/history/component.ts deleted file mode 100644 index bee33ea732..0000000000 --- a/application/client/src/app/ui/views/toolbar/history/component.ts +++ /dev/null @@ -1,116 +0,0 @@ -import { Component, Input, AfterContentInit, ChangeDetectorRef, HostListener } from '@angular/core'; -import { Session } from '@service/session'; -import { Ilc, IlcInterface } from '@env/decorators/component'; -import { Initial } from '@env/decorators/initial'; -import { IMenuItem, contextmenu } from '@ui/service/contextmenu'; -import { ChangesDetector } from '@ui/env/extentions/changes'; -import { Collections } from '@service/history/collections'; -import { MatSelectChange } from '@angular/material/select'; -import { State } from './state'; - -import * as dom from '@ui/env/dom'; - -@Component({ - selector: 'app-views-history', - templateUrl: './template.html', - styleUrls: ['./styles.less'], - standalone: false, -}) -@Initial() -@Ilc() -export class History extends ChangesDetector implements AfterContentInit { - @Input() session!: Session; - - public state: State = new State(); - - constructor(cdRef: ChangeDetectorRef) { - super(cdRef); - } - - @HostListener('contextmenu', ['$event']) onContextMenu(event: MouseEvent) { - const items: IMenuItem[] = [ - { - caption: `Remove All Presets`, - handler: () => { - this.state.history.clear(); - this.state.update(); - this.detectChanges(); - }, - }, - {}, - { - caption: `Export all`, - handler: () => { - this.state.selection().all().export(); - }, - }, - {}, - { - caption: `Import from file`, - handler: () => { - this.state.import(); - }, - }, - ]; - contextmenu.show({ - items: items, - x: event.pageX, - y: event.pageY, - }); - return dom.stop(event); - } - - public onCollectionContextmenu(collection: Collections, event: MouseEvent) { - const items: IMenuItem[] = [ - { - caption: `Remove`, - handler: () => { - collection.delete(); - this.state.update(); - this.detectChanges(); - }, - }, - {}, - { - caption: `Select for export`, - handler: () => { - this.state.selection().select(collection); - this.detectChanges(); - }, - }, - {}, - { - caption: `Import from file`, - handler: () => { - this.state.import(); - }, - }, - ]; - contextmenu.show({ - items: items, - x: event.pageX, - y: event.pageY, - }); - return dom.stop(event); - } - - public ngAfterContentInit(): void { - this.state.init(this, this.session); - this.env().subscriber.register( - this.ilc().services.system.history.collections.saved.subscribe(() => { - this.state.update(); - this.detectChanges(); - }), - ); - } - - public use(collection: Collections) { - this.state.history.apply(collection); - } - - public onListFilterChange(_event: MatSelectChange) { - this.state.list().update(); - this.detectChanges(); - } -} -export interface History extends IlcInterface {} diff --git a/application/client/src/app/ui/views/toolbar/history/module.ts b/application/client/src/app/ui/views/toolbar/history/module.ts deleted file mode 100644 index 635ebffe60..0000000000 --- a/application/client/src/app/ui/views/toolbar/history/module.ts +++ /dev/null @@ -1,34 +0,0 @@ -import { NgModule } from '@angular/core'; -import { CommonModule } from '@angular/common'; - -import { MatIconModule } from '@angular/material/icon'; -import { MatCardModule } from '@angular/material/card'; -import { MatButtonModule } from '@angular/material/button'; -import { EditableModule } from '@ui/elements/editable/module'; -import { MatSelectModule } from '@angular/material/select'; -import { MatCheckboxModule } from '@angular/material/checkbox'; - -import { FormsModule, ReactiveFormsModule } from '@angular/forms'; - -import { Preset } from './preset/component'; -import { History } from './component'; -import { FilterPreview } from './preview/filter/component'; -import { ChartPreview } from './preview/chart/component'; - -@NgModule({ - imports: [ - CommonModule, - MatIconModule, - MatButtonModule, - MatCardModule, - MatSelectModule, - MatCheckboxModule, - FormsModule, - ReactiveFormsModule, - EditableModule, - ], - declarations: [Preset, History, FilterPreview, ChartPreview], - exports: [History], - bootstrap: [History], -}) -export class HistoryModule {} diff --git a/application/client/src/app/ui/views/toolbar/history/preset/component.ts b/application/client/src/app/ui/views/toolbar/history/preset/component.ts deleted file mode 100644 index c535279bd7..0000000000 --- a/application/client/src/app/ui/views/toolbar/history/preset/component.ts +++ /dev/null @@ -1,119 +0,0 @@ -import { Component, Input, AfterContentInit, ChangeDetectorRef } from '@angular/core'; -import { Collections } from '@service/history/collections'; -import { FilterRequest } from '@service/session/dependencies/search/filters/request'; -import { ChartRequest } from '@service/session/dependencies/search/charts/request'; -import { Ilc, IlcInterface } from '@env/decorators/component'; -import { ChangesDetector } from '@ui/env/extentions/changes'; - -import * as dom from '@ui/env/dom'; - -const CUT_LIST_ON = 5; - -enum Target { - Filters, - Charts, - DisabledFilters, - DisabledCharts, -} - -@Component({ - selector: 'app-toolbar-history-preset', - templateUrl: './template.html', - styleUrls: ['./styles.less'], - standalone: false, -}) -@Ilc() -export class Preset extends ChangesDetector implements AfterContentInit { - @Input() public collections!: Collections; - - public filters: FilterRequest[] = []; - public charts: ChartRequest[] = []; - public disabled: { - filters: FilterRequest[]; - charts: ChartRequest[]; - } = { - filters: [], - charts: [], - }; - public origin: { - filters: FilterRequest[]; - charts: ChartRequest[]; - disabled: { - filters: FilterRequest[]; - charts: ChartRequest[]; - }; - } = { - filters: [], - charts: [], - disabled: { - filters: [], - charts: [], - }, - }; - - public get Target(): typeof Target { - return Target; - } - - constructor(cdRef: ChangeDetectorRef) { - super(cdRef); - } - - public ngAfterContentInit(): void { - this.origin.filters = this.collections.collections.filters.as().elements(); - this.origin.charts = this.collections.collections.charts.as().elements(); - this.origin.disabled.filters = this.collections.collections.disabled - .as() - .elements() - .map((el) => el.as().filter()) - .filter((f) => f !== undefined) as FilterRequest[]; - this.origin.disabled.charts = this.collections.collections.disabled - .as() - .elements() - .map((el) => el.as().chart()) - .filter((f) => f !== undefined) as ChartRequest[]; - this.filters = this.origin.filters.slice(0, CUT_LIST_ON); - this.charts = this.origin.charts.slice(0, CUT_LIST_ON); - this.disabled.filters = this.origin.disabled.filters.slice(0, CUT_LIST_ON); - this.disabled.charts = this.origin.disabled.charts.slice(0, CUT_LIST_ON); - } - - public getName(): string { - if (this.collections.name === '-') { - return `${new Date(this.collections.last).toLocaleDateString('en-US')} (${ - this.collections.applied_sessions.size - })`; - } else { - return `${this.collections.name}(${this.collections.applied_sessions.size})`; - } - } - - public getValue(): string { - return this.collections.name === '-' ? '' : this.collections.name; - } - - public onRename(value: string) { - if (value.trim() === '') { - this.collections.name = '-'; - } else { - this.collections.name = value; - } - this.collections.setName(this.collections.name); - this.detectChanges(); - } - - public more(event: MouseEvent, target: Target) { - dom.stop(event); - if (target === Target.Filters) { - this.filters = this.origin.filters; - } else if (target === Target.Charts) { - this.charts = this.origin.charts; - } else if (target === Target.DisabledCharts) { - this.disabled.charts = this.origin.disabled.charts; - } else if (target === Target.DisabledFilters) { - this.disabled.filters = this.origin.disabled.filters; - } - this.detectChanges(); - } -} -export interface Preset extends IlcInterface {} diff --git a/application/client/src/app/ui/views/toolbar/history/preset/styles.less b/application/client/src/app/ui/views/toolbar/history/preset/styles.less deleted file mode 100644 index 91d7054db3..0000000000 --- a/application/client/src/app/ui/views/toolbar/history/preset/styles.less +++ /dev/null @@ -1,40 +0,0 @@ -@import '../../../../styles/variables.less'; -:host { - position: relative; - display: block; - width: 256px; - div.section { - position: relative; - padding: 3px 0; - border-bottom: solid thin var(--scheme-color-4); - } - & input { - margin: 0 6px; - padding: 0; - border-bottom: dashed 1px var(--scheme-color-1); - flex: auto; - white-space: nowrap; - color: var(--scheme-color-0); - } - & mat-card { - margin: 12px 6px 12px 12px; - & mat-card-title { - color: var(--scheme-color-1); - font-size: 12px; - } - & mat-card-subtitle { - color: var(--scheme-color-3); - font-size: 12px; - } - &.no-left-margin { - margin-left: 6px; - } - &::hover { - background: var(--scheme-color-4); - } - & div.more { - position: relative; - text-align: center; - } - } -} \ No newline at end of file diff --git a/application/client/src/app/ui/views/toolbar/history/preset/template.html b/application/client/src/app/ui/views/toolbar/history/preset/template.html deleted file mode 100644 index 7d61902870..0000000000 --- a/application/client/src/app/ui/views/toolbar/history/preset/template.html +++ /dev/null @@ -1,60 +0,0 @@ - - - - - -
-

Filters

- -
- show more ({{origin.filters.length - filters.length}}) -
-
-
-

Charts

- -
- show more ({{origin.charts.length - charts.length}}) -
-
-
-

Disabled filters

- -
- show more ({{origin.disabled.filters.length - disabled.filters.length}}) -
-
-
-

Disabled charts

- -
- show more ({{origin.disabled.charts.length - disabled.charts.length}}) -
-
-
-
diff --git a/application/client/src/app/ui/views/toolbar/history/preview/chart/component.ts b/application/client/src/app/ui/views/toolbar/history/preview/chart/component.ts deleted file mode 100644 index 3b6b4813ea..0000000000 --- a/application/client/src/app/ui/views/toolbar/history/preview/chart/component.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { Component, Input, ChangeDetectorRef } from '@angular/core'; -import { ChartRequest } from '@service/session/dependencies/search/charts/request'; -import { Ilc, IlcInterface } from '@env/decorators/component'; -import { ChangesDetector } from '@ui/env/extentions/changes'; - -@Component({ - selector: 'app-toolbar-history-chart-preview', - templateUrl: './template.html', - styleUrls: ['./styles.less'], - standalone: false, -}) -@Ilc() -export class ChartPreview extends ChangesDetector { - @Input() chart!: ChartRequest; - - constructor(cdRef: ChangeDetectorRef) { - super(cdRef); - } -} -export interface ChartPreview extends IlcInterface {} diff --git a/application/client/src/app/ui/views/toolbar/history/preview/chart/styles.less b/application/client/src/app/ui/views/toolbar/history/preview/chart/styles.less deleted file mode 100644 index f7ab18971c..0000000000 --- a/application/client/src/app/ui/views/toolbar/history/preview/chart/styles.less +++ /dev/null @@ -1,68 +0,0 @@ -@import '../../../../../styles/variables.less'; - - -:host { - display: flex; - position: relative; - flex-flow: row; - padding: 3px 0px 5px 0; - overflow: hidden; - height: 20px; - cursor: default; - align-items: center; - div.doubleclick { - display: flex; - flex: auto; - align-items: center; - font-size: 13px; - } - span.color { - flex: 0; - width: 8px; - max-width: 8px; - min-width: 8px; - min-height: 16px; - display: block; - position: relative; - margin: 2px 0 2px 0; - transition: all 150ms ease-in-out; - } - span.background { - flex: 0; - width: 8px; - max-width: 8px; - min-width: 8px; - min-height: 16px; - display: block; - position: relative; - margin: 2px 0 2px 0; - transition: all 150ms ease-in-out; - } - span.request{ - flex: auto; - white-space: nowrap; - overflow: hidden; - text-overflow: ellipsis; - padding-left: 6px; - color: var(--scheme-color-0); - cursor: default; - } - span.flags { - flex: 0; - white-space: nowrap; - width: auto; - transition: all 150ms ease-in-out; - & span { - font-size: 14px; - line-height: 14px; - vertical-align: bottom; - cursor: default; - &.active{ - color: var(--scheme-color-0); - } - &.inactive{ - color: var(--scheme-color-3); - } - } - } -} diff --git a/application/client/src/app/ui/views/toolbar/history/preview/chart/template.html b/application/client/src/app/ui/views/toolbar/history/preview/chart/template.html deleted file mode 100644 index 61b339ce68..0000000000 --- a/application/client/src/app/ui/views/toolbar/history/preview/chart/template.html +++ /dev/null @@ -1,4 +0,0 @@ -
- - {{chart.definition.filter}} -
\ No newline at end of file diff --git a/application/client/src/app/ui/views/toolbar/history/preview/filter/component.ts b/application/client/src/app/ui/views/toolbar/history/preview/filter/component.ts deleted file mode 100644 index 1948e7947f..0000000000 --- a/application/client/src/app/ui/views/toolbar/history/preview/filter/component.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { Component, Input, ChangeDetectorRef } from '@angular/core'; -import { FilterRequest } from '@service/session/dependencies/search/filters/request'; -import { Ilc, IlcInterface } from '@env/decorators/component'; -import { ChangesDetector } from '@ui/env/extentions/changes'; - -@Component({ - selector: 'app-toolbar-history-filter-preview', - templateUrl: './template.html', - styleUrls: ['./styles.less'], - standalone: false, -}) -@Ilc() -export class FilterPreview extends ChangesDetector { - @Input() filter!: FilterRequest; - - constructor(cdRef: ChangeDetectorRef) { - super(cdRef); - } -} -export interface FilterPreview extends IlcInterface {} diff --git a/application/client/src/app/ui/views/toolbar/history/preview/filter/styles.less b/application/client/src/app/ui/views/toolbar/history/preview/filter/styles.less deleted file mode 100644 index f7ab18971c..0000000000 --- a/application/client/src/app/ui/views/toolbar/history/preview/filter/styles.less +++ /dev/null @@ -1,68 +0,0 @@ -@import '../../../../../styles/variables.less'; - - -:host { - display: flex; - position: relative; - flex-flow: row; - padding: 3px 0px 5px 0; - overflow: hidden; - height: 20px; - cursor: default; - align-items: center; - div.doubleclick { - display: flex; - flex: auto; - align-items: center; - font-size: 13px; - } - span.color { - flex: 0; - width: 8px; - max-width: 8px; - min-width: 8px; - min-height: 16px; - display: block; - position: relative; - margin: 2px 0 2px 0; - transition: all 150ms ease-in-out; - } - span.background { - flex: 0; - width: 8px; - max-width: 8px; - min-width: 8px; - min-height: 16px; - display: block; - position: relative; - margin: 2px 0 2px 0; - transition: all 150ms ease-in-out; - } - span.request{ - flex: auto; - white-space: nowrap; - overflow: hidden; - text-overflow: ellipsis; - padding-left: 6px; - color: var(--scheme-color-0); - cursor: default; - } - span.flags { - flex: 0; - white-space: nowrap; - width: auto; - transition: all 150ms ease-in-out; - & span { - font-size: 14px; - line-height: 14px; - vertical-align: bottom; - cursor: default; - &.active{ - color: var(--scheme-color-0); - } - &.inactive{ - color: var(--scheme-color-3); - } - } - } -} diff --git a/application/client/src/app/ui/views/toolbar/history/preview/filter/template.html b/application/client/src/app/ui/views/toolbar/history/preview/filter/template.html deleted file mode 100644 index d1466443a2..0000000000 --- a/application/client/src/app/ui/views/toolbar/history/preview/filter/template.html +++ /dev/null @@ -1,10 +0,0 @@ -
- - - {{filter.definition.filter.filter}} -
- - - - - diff --git a/application/client/src/app/ui/views/toolbar/history/state.ts b/application/client/src/app/ui/views/toolbar/history/state.ts deleted file mode 100644 index b45053b275..0000000000 --- a/application/client/src/app/ui/views/toolbar/history/state.ts +++ /dev/null @@ -1,220 +0,0 @@ -import { HistorySession, SuitableGroup, Suitable } from '@service/history/session'; -import { IlcInterface } from '@env/decorators/component'; -import { Session } from '@service/session'; -import { ChangesDetector } from '@ui/env/extentions/changes'; -import { Collections } from '@service/history/collections'; -import { notifications, Notification } from '@ui/service/notifications'; - -export interface Selection { - select(collection: Collections): Selection; - has(): boolean; - export(): Selection; - all(): Selection; - drop(): Selection; -} - -export class State { - protected parent!: IlcInterface & ChangesDetector; - protected recentImport: number | undefined = undefined; - - public history!: HistorySession; - public groups: SuitableGroup[] = []; - public filters: { caption: string; value: number }[] = []; - public filtered: number = -2; - public session!: Session; - public selected: { [key: string]: boolean } = {}; - - public init(parent: IlcInterface & ChangesDetector, session: Session) { - this.parent = parent; - this.session = session; - const history = this.parent.ilc().services.system.history.get(this.session); - if (history === undefined) { - this.parent.log().error(`Fail to get history-session instance`); - return; - } - this.history = history; - history.subjects.get().suitable.subscribe((_collections: Suitable) => { - this.list().update(); - this.parent.detectChanges(); - }); - this.list().update(); - } - - public selection(): Selection { - const self = { - select: (collection: Collections): Selection => { - this.selected[collection.uuid] = true; - return self; - }, - has: (): boolean => { - return Object.keys(this.selected).filter((k) => this.selected[k]).length > 0; - }, - export: (): Selection => { - this.parent - .ilc() - .services.system.bridge.files() - .select.save(undefined, undefined) - .then((filename: string | undefined) => { - if (filename === undefined) { - return; - } - this.parent - .ilc() - .services.system.history.export( - Object.keys(this.selected) - .map((k) => (this.selected[k] ? k : undefined)) - .filter((u) => u !== undefined) as string[], - filename, - ) - .then(() => { - this.selection().drop(); - }) - .catch((err: Error) => { - this.parent.log().error(`Fail to export: ${err.message}`); - }); - }) - .catch((err: Error) => { - this.parent.log().error(`Fail to export: ${err.message}`); - }); - return self; - }, - all: (): Selection => { - this.groups.forEach((group) => { - group.collections.forEach((col) => { - this.selected[col.uuid] = true; - }); - }); - this.parent.detectChanges(); - return self; - }, - drop: (): Selection => { - Object.keys(this.selected).forEach((k) => (this.selected[k] = false)); - this.parent.detectChanges(); - return self; - }, - }; - return self; - } - - public import(): void { - this.parent - .ilc() - .services.system.bridge.files() - .select.any() - .then((files) => { - if (files.length !== 1) { - return; - } - this.recentImport = Date.now(); - this.parent - .ilc() - .services.system.history.import(files[0].filename) - .then(() => { - this.filtered = -4; - this.list().update(); - this.parent.detectChanges(); - }) - .catch((err: Error) => { - notifications.notify( - new Notification({ - message: this.parent - .log() - .error(`Fail import filters/charts: ${err.message}`), - session: this.session.uuid(), - actions: [], - }), - ); - }); - }) - .catch((err: Error) => { - notifications.notify( - new Notification({ - message: this.parent - .log() - .error(`Fail open file to import filters/charts: ${err.message}`), - session: this.session.uuid(), - actions: [], - }), - ); - }); - } - - public update(): State { - const groups: SuitableGroup[] = (() => { - switch (this.filtered) { - case -4: - return [ - { - caption: 'Recently Added', - rank: 0, - collections: - this.recentImport !== undefined - ? this.history.find().byTimeStamp(this.recentImport) - : this.history.find().all(), - }, - ]; - case -3: - return [{ caption: 'All', rank: 0, collections: this.history.find().all() }]; - case -2: - return this.history.find().suitable().asGroups(); - case -1: - return [ - { - caption: 'All Named Presets', - rank: 0, - collections: this.history.find().named(), - }, - ]; - default: - return this.history.find().suitable().asGroups(); - } - })(); - if (this.filtered < 0) { - this.groups = groups; - return this; - } - const unnamed: SuitableGroup = { caption: 'Unnamed group', rank: 1000, collections: [] }; - this.groups = []; - groups.forEach((group) => { - if (group.caption !== undefined) { - this.groups.push(group); - } else { - unnamed.collections = unnamed.collections.concat(group.collections); - } - }); - if (unnamed.collections.length > 0) { - this.groups.push(unnamed); - } - this.groups = this.groups.filter((g) => g.rank === this.filtered); - this.selected = {}; - this.groups.forEach((group) => { - group.collections.forEach((col) => { - this.selected[col.uuid] = false; - }); - }); - return this; - } - - public list(): State { - const suitable = this.history.find().suitable(); - const groups = suitable.asGroups(); - this.filters = [ - ...(this.recentImport === undefined ? [] : [{ caption: 'Recently Added', value: -4 }]), - { caption: 'All', value: -3 }, - { caption: 'All Suitable', value: -2 }, - { caption: 'Named Presets', value: -1 }, - ]; - const unnamed: SuitableGroup = { caption: 'Unnamed group', rank: 1000, collections: [] }; - groups.forEach((group) => { - if (group.caption !== undefined) { - this.filters.push({ caption: group.caption, value: group.rank }); - } else { - unnamed.collections = unnamed.collections.concat(group.collections); - } - }); - if (unnamed.collections.length > 0) { - this.filters.push({ caption: 'Unnamed group', value: 1000 }); - } - return this; - } -} diff --git a/application/client/src/app/ui/views/toolbar/history/styles.less b/application/client/src/app/ui/views/toolbar/history/styles.less deleted file mode 100644 index 4337f27b1a..0000000000 --- a/application/client/src/app/ui/views/toolbar/history/styles.less +++ /dev/null @@ -1,63 +0,0 @@ -@import '../../../styles/variables.less'; - -:host { - width: 100%; - position: absolute; - height: 100%; - overflow: hidden; - & div.sorting { - position: absolute; - top: 0; - right: 16px; - height: 42px; - background: var(--scheme-color-5-lighten-15); - padding: 3px 12px 6px 12px; - } - & div.controlls { - position: absolute; - bottom: 0; - right: 0; - padding: 6px 0 6px 12px; - background: var(--scheme-color-5-lighten-15); - & button { - margin-right: 12px; - color: var(--scheme-color-0); - } - } - & div.collection { - position: relative; - & div.selection { - position: absolute; - width: 24px; - height: 24px; - top: 0; - padding: 4px; - right: 0; - border-radius: 8px; - background: var(--scheme-color-5-lighten-15); - box-shadow: 3px 3px 3px rgba(0,0,0,0.4); - - } - } - & div.list { - width: 100%; - position: absolute; - height: 100%; - overflow-x: hidden; - overflow-y: auto; - & p.no-content { - margin: 12px 12px 0px 12px; - border-bottom: dotted thin var(--scheme-color-4); - padding-bottom: 3px; - } - & div.group { - width: 100%; - display: flex; - flex-direction: row; - flex-wrap: wrap; - & div.collections{ - position: relative; - } - } - } -} diff --git a/application/client/src/app/ui/views/toolbar/history/template.html b/application/client/src/app/ui/views/toolbar/history/template.html deleted file mode 100644 index 78f2099530..0000000000 --- a/application/client/src/app/ui/views/toolbar/history/template.html +++ /dev/null @@ -1,32 +0,0 @@ -
-

No recently used filters

-
-

{{group.caption}}

-
-
- -
- -
-
-
-
-
-
- - - -
-
- - List filter - - - {{option.caption}} - - - -
diff --git a/application/client/src/app/ui/views/toolbar/module.ts b/application/client/src/app/ui/views/toolbar/module.ts deleted file mode 100644 index 4cb9868fda..0000000000 --- a/application/client/src/app/ui/views/toolbar/module.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { NgModule } from '@angular/core'; -import { CommonModule } from '@angular/common'; -import { SearchModule } from './search/module'; -import { HistoryModule } from './history/module'; -import { DetailsModule } from './details/module'; -import { ChartModule } from './chart/module'; - -@NgModule({ - imports: [CommonModule, SearchModule, HistoryModule, ChartModule, DetailsModule], - declarations: [], - exports: [SearchModule, HistoryModule, ChartModule, DetailsModule], - bootstrap: [], -}) -export class ToolbarModule {} diff --git a/application/client/src/app/ui/views/toolbar/search/component.ts b/application/client/src/app/ui/views/toolbar/search/component.ts deleted file mode 100644 index b133724763..0000000000 --- a/application/client/src/app/ui/views/toolbar/search/component.ts +++ /dev/null @@ -1,48 +0,0 @@ -import { - Component, - Input, - AfterContentInit, - ChangeDetectorRef, - ChangeDetectionStrategy, -} from '@angular/core'; -import { Session } from '@service/session'; -import { Ilc, IlcInterface } from '@env/decorators/component'; -import { Initial } from '@env/decorators/initial'; -import { Service } from '@elements/scrollarea/controllers/service'; -import { Columns } from '@schema/render/columns'; -import { ChangesDetector } from '@ui/env/extentions/changes'; - -@Component({ - selector: 'app-views-search', - templateUrl: './template.html', - styleUrls: ['./styles.less'], - changeDetection: ChangeDetectionStrategy.OnPush, - standalone: false, -}) -@Initial() -@Ilc() -export class ViewSearch extends ChangesDetector implements AfterContentInit { - @Input() public session!: Session; - - public service!: Service; - public columns: Columns | undefined; - public nested!: boolean; - - constructor(chRef: ChangeDetectorRef) { - super(chRef); - } - - public ngAfterContentInit(): void { - this.nested = this.session.search.state().nested().visible(); - this.env().subscriber.register( - this.session.search.state().subjects.nested.subscribe((visible: boolean) => { - this.nested = visible; - this.detectChanges(); - }), - this.ilc().services.system.hotkeys.listen('Ctrl + Shift + F', () => { - this.session.search.state().nested().toggle(); - }), - ); - } -} -export interface ViewSearch extends IlcInterface {} diff --git a/application/client/src/app/ui/views/toolbar/search/input/active.ts b/application/client/src/app/ui/views/toolbar/search/input/active.ts deleted file mode 100644 index 7daf632d14..0000000000 --- a/application/client/src/app/ui/views/toolbar/search/input/active.ts +++ /dev/null @@ -1,35 +0,0 @@ -import { IFilter } from '@platform/types/filter'; -import { Search } from '@service/session/dependencies/search'; -import { FilterRequest } from '@service/session/dependencies/search/filters/request'; -import { DisabledRequest } from '@service/session/dependencies/search/disabled/request'; -import { ChartRequest } from '@service/session/dependencies/search/charts/request'; - -export class ActiveSearch { - public filter: IFilter; - protected readonly search: Search; - - constructor(search: Search, filter: IFilter) { - this.filter = filter; - this.search = search; - } - - public apply(): Promise { - return this.search.state().setActive(this.filter); - } - - public isPossibleToSaveAsFilter(): boolean { - const request = new FilterRequest({ filter: this.filter }); - return ( - !this.search.store().filters().has(request) && - !this.search.store().disabled().has(new DisabledRequest(request)) - ); - } - - public isPossibleToSaveAsChart(): boolean { - const request = new ChartRequest({ filter: this.filter.filter }); - return ( - !this.search.store().charts().has(request) && - !this.search.store().disabled().has(new DisabledRequest(request)) - ); - } -} diff --git a/application/client/src/app/ui/views/toolbar/search/input/component.ts b/application/client/src/app/ui/views/toolbar/search/input/component.ts deleted file mode 100644 index 97e898d0ea..0000000000 --- a/application/client/src/app/ui/views/toolbar/search/input/component.ts +++ /dev/null @@ -1,226 +0,0 @@ -import { - Component, - OnDestroy, - ViewChild, - Input, - AfterContentInit, - AfterViewInit, - ChangeDetectorRef, - ElementRef, - ViewEncapsulation, -} from '@angular/core'; -import { MatAutocompleteTrigger } from '@angular/material/autocomplete'; -import { Session } from '@service/session'; -import { Ilc, IlcInterface } from '@env/decorators/component'; -import { SearchInput } from './input'; -import { List } from '@env/storages/recent/list'; -import { Progress } from './progress'; -import { ChangesDetector } from '@ui/env/extentions/changes'; -import { ActiveSearch } from './active'; -import { Indexed } from '@service/session/dependencies/indexed'; -import { ISearchFinishEvent } from '@service/session/dependencies/search/state'; -import { Notification } from '@ui/service/notifications'; -import { IFilter } from '@platform/types/filter'; - -@Component({ - selector: 'app-views-search-input', - templateUrl: './template.html', - styleUrls: ['./styles.less'], - encapsulation: ViewEncapsulation.None, - standalone: false, -}) -@Ilc() -export class ViewSearchInput - extends ChangesDetector - implements AfterViewInit, AfterContentInit, OnDestroy -{ - @Input() public session!: Session; - - @ViewChild('searchinput') searchInputRef!: ElementRef; - @ViewChild(MatAutocompleteTrigger) recentPanelRef!: MatAutocompleteTrigger; - - public readonly input = new SearchInput(); - public readonly recent: List; - public occupied: boolean = false; - public active: ActiveSearch | undefined; - public progress!: Progress; - public indexed!: Indexed; - - constructor(chRef: ChangeDetectorRef) { - super(chRef); - this.recent = new List(this.input.control, 'RecentFilters', 'recent_filters'); - } - - public ngOnDestroy(): void { - this.session.search.state().nonActive = this.input.getNonActive(); - this.input.destroy(); - this.progress.destroy(); - } - - public ngAfterContentInit(): void { - this.progress = new Progress(this.session, this.session.search.state().progress().search()); - this.indexed = this.session.indexed; - this.env().subscriber.register( - this.progress.updated.subscribe(() => { - this.detectChanges(); - }), - ); - this.env().subscriber.register( - this.ilc().channel.ui.toolbar.resize(() => { - this.toolbar().resized(); - }), - ); - this.env().subscriber.register( - this.input.error.updated.subscribe(() => { - this.detectChanges(); - }), - ); - this.env().subscriber.register( - this.session.search - .state() - .subjects.search.get() - .start.subscribe(() => { - this.progress.start(); - this.detectChanges(); - }), - ); - this.env().subscriber.register( - this.session.search - .state() - .subjects.search.get() - .finish.subscribe((result: ISearchFinishEvent) => { - this.progress.stop(); - this.detectChanges(); - if (result.error !== undefined) { - this.log().error(result.error); - this.ilc().services.ui.notifications.notify( - new Notification({ message: result.error, actions: [] }), - ); - } - }), - ); - this.env().subscriber.register( - this.session.search - .state() - .subjects.search.get() - .active.subscribe((filter: IFilter | undefined) => { - if (filter !== undefined) { - this.active = new ActiveSearch(this.session.search, filter); - this.input.drop(); - } else { - this.active = undefined; - } - }), - ); - this.env().subscriber.register( - this.ilc().services.system.hotkeys.listen('Ctrl + F', () => { - this.input.focus(); - }), - this.ilc().services.system.hotkeys.listen('/', () => { - this.input.focus(); - }), - ); - } - - public ngAfterViewInit(): void { - this.input.bind(this.searchInputRef.nativeElement, this.recentPanelRef); - this.input.actions.accept.subscribe(() => { - if (this.active === undefined || this.input.value.trim() !== '') { - const filter = this.input.asFilter(); - if (filter.filter.trim() === '') { - return; - } - this.recent.update(filter.filter); - this.session.search - .state() - .setActive(filter) - .catch((err: Error) => { - this.log().error(`Fail to accept search: ${err.message}`); - }) - .finally(() => { - this.markChangesForCheck(); - }); - } else if (this.active.isPossibleToSaveAsFilter()) { - this.onSaveAsFilter(); - } - }); - this.input.actions.drop.subscribe(() => { - this.drop(); - }); - this.input.actions.edit.subscribe(() => { - if (this.active === undefined) { - return; - } - this.input.set().value(this.active.filter); - this.drop(); - this.markChangesForCheck(); - }); - this.input.actions.recent.subscribe(() => { - this.markChangesForCheck(); - }); - this._restore(); - this.input.focus(); - } - - public drop() { - this.active = undefined; - this.session.search - .state() - .reset() - .search() - .catch((err: Error) => { - this.log().error(`Fail to drop a search: ${err.message}`); - }) - .finally(() => { - this.markChangesForCheck(); - }); - } - - public onSaveAsFilter(): void { - if (this.active === undefined) { - return; - } - this.session.search.store().filters().addFromFilter(this.active.filter); - this.drop(); - } - - public onSaveAsChart(): void { - if (this.active === undefined) { - return; - } - this.session.search.store().charts().addFromFilter(this.active.filter); - this.drop(); - } - - protected toolbar(): { - resized(): void; - } { - return { - resized: (): void => { - this.ilc() - .services.ui.layout.toolbar() - .state( - (state: { - min: boolean; - max: boolean; - occupied: boolean; - size: number; - }) => { - this.occupied = state.occupied; - this.detectChanges(); - }, - ); - }, - }; - } - - private _restore() { - const active = this.session.search.state().getActive(); - if (active !== undefined) { - this.active = new ActiveSearch(this.session.search, active); - this.input.drop(); - } - this.input.set().value(this.session.search.state().nonActive); - } -} -export interface ViewSearchInput extends IlcInterface {} diff --git a/application/client/src/app/ui/views/toolbar/search/input/error.ts b/application/client/src/app/ui/views/toolbar/search/input/error.ts deleted file mode 100644 index 29a88a8113..0000000000 --- a/application/client/src/app/ui/views/toolbar/search/input/error.ts +++ /dev/null @@ -1,74 +0,0 @@ -import { IFilter } from '@platform/types/filter'; -import { Subject } from '@platform/env/subscription'; -import { FilterRequest } from '@service/session/dependencies/search/filters/request'; - -export class ErrorHandler { - public updated: Subject = new Subject(); - public readonly filter: IFilter = { - filter: '', - flags: { - reg: true, - word: false, - cases: false, - }, - }; - - private _error: string | undefined; - - public destroy(): void { - this.updated.destroy(); - } - - public get error(): string | undefined { - return this.filter.flags.reg ? this._error : undefined; - } - - public hasError(): boolean { - return this.filter.flags.reg && this.error !== undefined; - } - - public isValidRegex(): boolean { - return this._error === undefined; - } - - public set(): { - value(value: string): void; - caseSensitive(value: boolean): void; - wholeWord(value: boolean): void; - regex(value: boolean): void; - } { - return { - value: (value: string) => { - this.filter.filter = value; - this._checkRegex(); - }, - caseSensitive: (value: boolean) => { - this.filter.flags.cases = value; - this._checkRegex(); - }, - wholeWord: (value: boolean) => { - this.filter.flags.word = value; - this._checkRegex(); - }, - regex: (value: boolean) => { - this.filter.flags.reg = value; - this._checkRegex(); - }, - }; - } - - public recentSelected(value: string) { - this.set().value(value); - } - - private _checkRegex() { - this._error = FilterRequest.getValidationError({ - filter: this.filter.filter, - flags: { - cases: this.filter.flags.cases, - word: this.filter.flags.word, - reg: true, - }, - }); - } -} diff --git a/application/client/src/app/ui/views/toolbar/search/input/input.ts b/application/client/src/app/ui/views/toolbar/search/input/input.ts deleted file mode 100644 index 6633e3c866..0000000000 --- a/application/client/src/app/ui/views/toolbar/search/input/input.ts +++ /dev/null @@ -1,165 +0,0 @@ -import { UntypedFormControl } from '@angular/forms'; -import { Subject } from '@platform/env/subscription'; -import { IFilter, IFilterFlags } from '@platform/types/filter'; -import { MatAutocompleteTrigger } from '@angular/material/autocomplete'; -import { ErrorHandler } from './error'; - -import * as obj from '@platform/env/obj'; - -export class SearchInput { - public readonly control: UntypedFormControl = new UntypedFormControl(); - public readonly error: ErrorHandler = new ErrorHandler(); - public ref!: HTMLInputElement; - public value: string = ''; - public readonly: boolean = false; - public focused: boolean = false; - public recent: boolean = false; - public flags: IFilterFlags = { - word: false, - cases: false, - reg: true, - }; - public actions: { - drop: Subject; - clear: Subject; - accept: Subject; - recent: Subject; - edit: Subject; - } = { - drop: new Subject(), - clear: new Subject(), - accept: new Subject(), - recent: new Subject(), - edit: new Subject(), - }; - - private _prev: string = ''; - private _panel!: MatAutocompleteTrigger; - - public destroy() { - this.actions.accept.destroy(); - this.actions.drop.destroy(); - this.actions.recent.destroy(); - this.actions.edit.destroy(); - this.actions.clear.destroy(); - this.error.destroy(); - } - - public bind(ref: HTMLInputElement, panel: MatAutocompleteTrigger) { - this.control.setValue(''); - this.ref = ref; - this._panel = panel; - } - - public focus() { - this.ref.focus(); - } - - public blur() { - this.ref.blur(); - } - - public isEmpty(): boolean { - return this.value.trim() === ''; - } - - public asFilter(): IFilter { - return { - filter: this.value, - flags: this.flags, - }; - } - - public getNonActive(): IFilter { - return { - filter: this.control.value, - flags: this.flags, - }; - } - - public keydown() { - this._prev = this.control.value; - } - - public keyup(event: KeyboardEvent) { - if (event.key === 'Escape') { - this.recent = false; - if (this.control.value.trim() !== '') { - this.drop(); - this.actions.clear.emit(); - } else { - this.actions.drop.emit(); - } - this.blur(); - } else if (event.key === 'Enter') { - if (this.recent) { - this.recent = false; - this._panel.closePanel(); - } - if (this.control.value.trim() === '') { - this.drop(); - this.actions.accept.emit(); - } else { - this.value = this.control.value; - this.error.set().value(this.control.value); - !this.error.hasError() && this.actions.accept.emit(); - } - } else if (event.key === 'Backspace' && this.control.value === '' && this._prev === '') { - this.actions.edit.emit(); - } else if ( - (this.control.value !== '' || event.key === 'ArrowUp' || event.key === 'ArrowDown') && - !this.recent - ) { - this.recent = true; - this._panel.openPanel(); - this.actions.recent.emit(); - } - this.error.set().value(this.control.value); - } - - public drop() { - this.control.setValue(''); - this.error.set().value(this.control.value); - this.value = ''; - this._prev = ''; - } - - public set(): { - value(value: string | IFilter): void; - caseSensitive(): void; - wholeWord(): void; - regex(): void; - } { - return { - value: (value: string | IFilter): void => { - if (typeof value === 'string') { - this.control.setValue(value); - this._prev = value; - } else { - this.control.setValue(value.filter); - this.flags = obj.clone(value.flags); - } - this.error.set().value(this.control.value); - }, - caseSensitive: () => { - this.flags.cases = !this.flags.cases; - this.error.set().caseSensitive(this.flags.cases); - }, - wholeWord: () => { - this.flags.word = !this.flags.word; - this.error.set().wholeWord(this.flags.word); - }, - regex: () => { - if (!this.flags.reg && !this.error.isValidRegex()) { - return; - } - this.flags.reg = !this.flags.reg; - this.error.set().regex(this.flags.reg); - }, - }; - } - - public onPanelClosed() { - this.recent = false; - } -} diff --git a/application/client/src/app/ui/views/toolbar/search/input/progress.ts b/application/client/src/app/ui/views/toolbar/search/input/progress.ts deleted file mode 100644 index 6082d79845..0000000000 --- a/application/client/src/app/ui/views/toolbar/search/input/progress.ts +++ /dev/null @@ -1,52 +0,0 @@ -import { Session } from '@service/session'; -import { Subject, Subscriber } from '@platform/env/subscription'; - -export class Progress { - public working: boolean = false; - public readonly updated: Subject = new Subject(); - - private _session: Session; - private _subscriber: Subscriber = new Subscriber(); - - constructor(session: Session, working: boolean) { - this._session = session; - this.working = working; - this._subscriber.register( - this._session.search.subjects.get().updated.subscribe((_event) => { - this.updated.emit(); - }), - ); - } - - public destroy() { - this.updated.destroy(); - this._subscriber.unsubscribe(); - } - - public start() { - this.working = true; - } - - public stop() { - this.working = false; - } - - public visible(): boolean { - if (this._session.stream.len() === 0) { - return false; - } - if ( - this._session.search.store().filters().getActiveCount() > 0 || - this._session.search.state().hasActiveSearch() - ) { - return true; - } - return false; - } - - public summary(): string { - const total = this._session.stream.len(); - const found = this._session.search.len(); - return `${found} in ${total} (${((found / total) * 100).toFixed(2)}%)`; - } -} diff --git a/application/client/src/app/ui/views/toolbar/search/input/styles.less b/application/client/src/app/ui/views/toolbar/search/input/styles.less deleted file mode 100644 index 01d1ff7cd3..0000000000 --- a/application/client/src/app/ui/views/toolbar/search/input/styles.less +++ /dev/null @@ -1,122 +0,0 @@ -@import '../../../../styles/variables.less'; - -app-views-search-input { - display: flex; - position: relative; - flex-direction: row; - height: 41px; - width: 100%; - background: var(--scheme-color-5); - overflow: hidden; - justify-content: center; - align-items: center; - div.input { - display: block; - flex: auto; - height: 24px; - overflow: hidden; - align-items: center; - padding-left: 6px; - } - div.flags, - div.extantions { - display: flex; - padding: 0px 8px 0 8px; - & span { - display: inline-block; - height: 24px; - width: 24px; - color: var(--scheme-color-0); - text-align: center; - padding-top: 4px; - box-sizing: border-box; - &:hover{ - background: var(--scheme-color-4); - } - &.active{ - background: var(--scheme-color-active); - } - &.invalid { - color: var(--scheme-color-error); - } - } - } - div.summary { - position: relative; - display: flex; - flex-direction: row; - align-items: center; - padding: 0 6px 0 0; - & mat-spinner { - margin-left: 6px; - } - & span.error { - display: flex; - align-items: center; - padding-right: 6px; - & span.message { - color: var(--scheme-color-error); - max-width: 150px; - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; - } - & mat-icon { - color: var(--scheme-color-error); - height: 16px; - width: 16px; - font-size: 16px; - margin: 0 6px 0 1px; - line-height: 16px; - } - } - } - & span.active-filter { - position: relative; - display: flex; - flex-direction: row; - border-radius: 2px; - background: var(--scheme-color-active); - height: 20px; - overflow: hidden; - flex: none; - margin-right: 8px; - margin-left: -8px; - & span.filter { - position: relative; - display: inline-block; - padding: 5px 6px; - color: var(--scheme-color-0); - font-weight: 500; - } - & button { - height: 20px; - width: 20px; - padding: 0; - background: none; - border:none; - &.enabled { - &:hover{ - background: var(--scheme-color-4); - } - } - & mat-icon{ - height: 20px; - width: 20px; - font-size: 16px; - text-align: center; - color: var(--scheme-color-0); - padding-top: 2px; - &.disabled { - color: var(--scheme-color-2); - } - } - } - } - & span.small-icon-button.occupied { - font-size: 13px; - line-height: 13px; - padding-top: 6px; - } - -} diff --git a/application/client/src/app/ui/views/toolbar/search/input/template.html b/application/client/src/app/ui/views/toolbar/search/input/template.html deleted file mode 100644 index 472c4fc61a..0000000000 --- a/application/client/src/app/ui/views/toolbar/search/input/template.html +++ /dev/null @@ -1,94 +0,0 @@ -
- - - {{active.filter.filter}} - - - - - - - - - - - -
-
- - - -
-
- - error - {{input.error.error}} - - {{progress.summary()}} - -
-
- - -
diff --git a/application/client/src/app/ui/views/toolbar/search/module.ts b/application/client/src/app/ui/views/toolbar/search/module.ts deleted file mode 100644 index f412aa54c6..0000000000 --- a/application/client/src/app/ui/views/toolbar/search/module.ts +++ /dev/null @@ -1,40 +0,0 @@ -import { NgModule } from '@angular/core'; -import { CommonModule } from '@angular/common'; -import { ViewSearch } from './component'; -import { ViewSearchInput } from './input/component'; -import { ViewSearchResults } from './results/component'; -import { ViewSearchNested } from './nested/component'; -import { ScrollAreaModule } from '@elements/scrollarea/module'; -import { ContainersModule } from '@elements/containers/module'; -import { AppDirectiviesModule } from '@directives/module'; - -import { MatIconModule } from '@angular/material/icon'; -import { MatAutocompleteModule } from '@angular/material/autocomplete'; -import { MatOptionModule } from '@angular/material/core'; -import { MatFormFieldModule } from '@angular/material/form-field'; -import { MatInputModule } from '@angular/material/input'; -import { MatProgressBarModule } from '@angular/material/progress-bar'; -import { MatProgressSpinnerModule } from '@angular/material/progress-spinner'; -import { FormsModule, ReactiveFormsModule } from '@angular/forms'; - -@NgModule({ - imports: [ - CommonModule, - ContainersModule, - ScrollAreaModule, - AppDirectiviesModule, - MatIconModule, - MatAutocompleteModule, - MatOptionModule, - MatFormFieldModule, - MatInputModule, - MatProgressBarModule, - MatProgressSpinnerModule, - FormsModule, - ReactiveFormsModule, - ], - declarations: [ViewSearch, ViewSearchInput, ViewSearchNested, ViewSearchResults], - exports: [ViewSearch], - bootstrap: [ViewSearch], -}) -export class SearchModule {} diff --git a/application/client/src/app/ui/views/toolbar/search/nested/component.ts b/application/client/src/app/ui/views/toolbar/search/nested/component.ts deleted file mode 100644 index bc810e9ed3..0000000000 --- a/application/client/src/app/ui/views/toolbar/search/nested/component.ts +++ /dev/null @@ -1,150 +0,0 @@ -import { - Component, - OnDestroy, - ViewChild, - Input, - AfterContentInit, - AfterViewInit, - ChangeDetectorRef, - ElementRef, - ViewEncapsulation, - HostListener, -} from '@angular/core'; -import { MatAutocompleteTrigger } from '@angular/material/autocomplete'; -import { Session } from '@service/session'; -import { Ilc, IlcInterface } from '@env/decorators/component'; -import { SearchInput } from '../input/input'; -import { List } from '@env/storages/recent/list'; -import { ChangesDetector } from '@ui/env/extentions/changes'; - -@Component({ - selector: 'app-views-search-nested', - templateUrl: './template.html', - styleUrls: ['./styles.less'], - encapsulation: ViewEncapsulation.None, - standalone: false, -}) -@Ilc() -export class ViewSearchNested - extends ChangesDetector - implements AfterViewInit, AfterContentInit, OnDestroy -{ - @Input() public session!: Session; - - @ViewChild('searchinput') searchInputRef!: ElementRef; - @ViewChild(MatAutocompleteTrigger) recentPanelRef!: MatAutocompleteTrigger; - @HostListener('window:keydown', ['$event']) onKeyDown(event: KeyboardEvent) { - if (event.key === 'Escape') { - this.close(); - } - } - public readonly input = new SearchInput(); - public readonly recent: List; - public pendding: boolean = false; - public progress: boolean = false; - - protected action(action: Promise) { - this.pendding = true; - action - .catch((err: Error) => { - this.log().error(`Fail go to next/prev nested match: ${err.message}`); - }) - .finally(() => { - clearTimeout(tm); - this.progress = false; - this.pendding = false; - this.detectChanges(); - }); - // Show progress bar with delay to prevent showing it for quick done work - const tm = setTimeout(() => { - this.progress = true; - this.detectChanges(); - }, 250) as unknown as number; - } - constructor(chRef: ChangeDetectorRef) { - super(chRef); - this.recent = new List(this.input.control, 'RecentNestedFilters', 'recent_nested_filters'); - } - - public ngOnDestroy(): void { - this.session.search.state().nested().drop(); - this.input.destroy(); - } - - public ngAfterContentInit(): void { - this.env().subscriber.register( - this.ilc().services.system.hotkeys.listen(']', () => { - if (this.session.search.state().nested().get() === undefined) { - return; - } - this.next(); - }), - this.ilc().services.system.hotkeys.listen('[', () => { - if (this.session.search.state().nested().get() === undefined) { - return; - } - this.prev(); - }), - ); - } - - public ngAfterViewInit(): void { - this.input.bind(this.searchInputRef.nativeElement, this.recentPanelRef); - this.input.actions.accept.subscribe(() => { - const value = this.input.value.trim(); - if (value === '') { - this.drop(); - return; - } - const current = this.session.search.state().nested().get(); - if (current !== undefined && current.filter === value) { - this.next(); - return; - } - const filter = this.input.asFilter(); - this.recent.update(filter.filter); - this.session.search - .state() - .nested() - .set(filter) - .then((pos: number | undefined) => { - if (pos === undefined) { - return; - } - }); - }); - this.input.actions.drop.subscribe(() => { - this.drop(); - }); - this.input.actions.edit.subscribe(() => { - this.detectChanges(); - }); - this.input.actions.recent.subscribe(() => { - this.detectChanges(); - }); - this.input.focus(); - } - - public next() { - if (this.pendding) { - return; - } - this.action(this.session.search.state().nested().next()); - } - - public prev() { - if (this.pendding) { - return; - } - this.action(this.session.search.state().nested().prev()); - } - - public drop() { - this.session.search.state().nested().drop(); - } - - public close() { - this.session.search.state().nested().toggle(); - } -} -export interface ViewSearchNested extends IlcInterface {} diff --git a/application/client/src/app/ui/views/toolbar/search/nested/styles.less b/application/client/src/app/ui/views/toolbar/search/nested/styles.less deleted file mode 100644 index 38f87405e9..0000000000 --- a/application/client/src/app/ui/views/toolbar/search/nested/styles.less +++ /dev/null @@ -1,55 +0,0 @@ -@import '../../../../styles/variables.less'; - -app-views-search-nested { - display: flex; - position: relative; - flex-direction: row; - height: 32px; - width: 300px; - background: var(--scheme-color-5); - overflow: hidden; - justify-content: center; - align-items: center; - z-index: 1; - box-shadow: 3px 3px 3px rgba(0, 0, 0, 0.4); - div.input { - display: block; - flex: auto; - height: 24px; - overflow: hidden; - align-items: center; - padding-left: 6px; - } - div.flags, - div.arrows { - display: flex; - padding: 0px 8px 0 8px; - align-items: center; - & span { - display: inline-block; - height: 24px; - width: 24px; - color: var(--scheme-color-0); - text-align: center; - padding-top: 4px; - box-sizing: border-box; - &:hover{ - background: var(--scheme-color-4); - } - &.active{ - background: var(--scheme-color-active); - } - &.invalid { - color: var(--scheme-color-error); - } - } - } - & span.progress { - position: absolute; - bottom: 0; - left:0; - width: 100%; - height: 2px; - overflow: hidden; - } -} diff --git a/application/client/src/app/ui/views/toolbar/search/nested/template.html b/application/client/src/app/ui/views/toolbar/search/nested/template.html deleted file mode 100644 index e39b9e7bbf..0000000000 --- a/application/client/src/app/ui/views/toolbar/search/nested/template.html +++ /dev/null @@ -1,81 +0,0 @@ -
- - - - - - - - -
-
- - - -
-
- - - -
- - - diff --git a/application/client/src/app/ui/views/toolbar/search/results/backing.ts b/application/client/src/app/ui/views/toolbar/search/results/backing.ts deleted file mode 100644 index 1aa911f718..0000000000 --- a/application/client/src/app/ui/views/toolbar/search/results/backing.ts +++ /dev/null @@ -1,95 +0,0 @@ -import { Session } from '@service/session'; -import { IRowsPacket, Service } from '@elements/scrollarea/controllers/service'; -import { Range, IRange } from '@platform/types/range'; -import { Owner, RowSrc } from '@schema/content/row'; -import { GrabbedElement } from '@platform/types/bindings/miscellaneous'; -import { Nature } from '@platform/types/content'; - -const SCROLLAREA_SERVICE = 'search_scroll_area_service'; - -async function getRowFrom( - session: Session, - element: GrabbedElement, - elements: GrabbedElement[], - index: number, -): Promise { - const row: RowSrc = { - position: element.pos, - content: element.content, - session: session, - owner: Owner.Search, - source: - typeof element.source_id === 'string' - ? parseInt(element.source_id, 10) - : element.source_id, - nature: new Nature(element.nature), - }; - if (!row.nature.seporator) { - return row; - } - if (index > 0 && index < elements.length - 1) { - row.nature.hidden = elements[index + 1].pos - elements[index - 1].pos; - return row; - } - const around = await session.indexed.getIndexesAround(element.pos); - if (around.before !== undefined && around.after !== undefined) { - row.nature.hidden = around.after - around.before; - } else { - row.nature.hidden = - around.before !== undefined - ? element.pos - around.before - : around.after !== undefined - ? around.after - element.pos - : 0; - } - return row; -} -function getRows(session: Session, range: Range | IRange): Promise { - return new Promise((resolve, reject) => { - session.indexed - .grab(range) - .then(async (elements) => { - const rows = []; - for (let i = 0; i < elements.length; i += 1) { - rows.push(await getRowFrom(session, elements[i], elements, i)); - } - resolve({ rows, range }); - }) - .catch(reject); - }); -} - -export function getScrollAreaService(session: Session): Service { - const restored = session.storage.get(SCROLLAREA_SERVICE); - if (restored === undefined) { - const service = new Service({ - getRows: (range: Range) => { - return getRows(session, range); - }, - setFrame: (range: Range) => { - getRows(session, range) - .then((packet) => { - service.setRows(packet); - }) - .catch((err: Error) => { - throw new Error(`Fail get indexed chunk: ${err.message}`); - }); - }, - getLen: (): number => { - return session.indexed.len(); - }, - getItemHeight: (): number => { - return 16; - }, - }); - service.setLen(session.indexed.len()); - return service; - } else { - restored.setLen(session.indexed.len()); - return restored; - } -} - -export function setScrollAreaService(session: Session, service: Service) { - session.storage.set(SCROLLAREA_SERVICE, service); -} diff --git a/application/client/src/app/ui/views/toolbar/search/results/component.ts b/application/client/src/app/ui/views/toolbar/search/results/component.ts deleted file mode 100644 index 0df7a51507..0000000000 --- a/application/client/src/app/ui/views/toolbar/search/results/component.ts +++ /dev/null @@ -1,203 +0,0 @@ -import { Component, OnDestroy, ViewChild, Input, AfterContentInit } from '@angular/core'; -import { Session } from '@service/session'; -import { Owner } from '@schema/content/row'; -import { Ilc, IlcInterface } from '@env/decorators/component'; -import { ScrollAreaComponent } from '@elements/scrollarea/component'; -import { Service } from '@elements/scrollarea/controllers/service'; -import { Columns } from '@schema/render/columns'; -import { getScrollAreaService, setScrollAreaService } from './backing'; - -enum PendingScroll { - Prev, - Next, - Unset, -} - -@Component({ - selector: 'app-views-search-results', - templateUrl: './template.html', - styleUrls: ['./styles.less'], - standalone: false, -}) -@Ilc() -export class ViewSearchResults implements AfterContentInit, OnDestroy { - @ViewChild(ScrollAreaComponent) scrollAreaComponent!: ScrollAreaComponent; - - @Input() public session!: Session; - - public service!: Service; - public columns: Columns | undefined; - - protected navigation: { - pending: PendingScroll; - } = { - pending: PendingScroll.Unset, - }; - - public ngOnDestroy(): void { - setScrollAreaService(this.session, this.service); - } - - public ngAfterContentInit(): void { - this.service = getScrollAreaService(this.session); - this.env().subscriber.register( - this.session.cursor.subjects.get().selected.subscribe((event) => { - if (this.session.search.len() === 0) { - return; - } - const single = this.session.cursor.getSingle().position(); - if (event.initiator === Owner.Search && single !== undefined) { - this.session.search - .nearest(single) - .then((location) => { - location !== undefined && - this.session.search.state().nested().setFrom(location.index); - }) - .catch((err: Error) => { - this.log().error(`Fail to get nearest content: ${err.message}`); - }); - return; - } else if (single !== undefined) { - this.session.search - .nearest(single) - .then((location) => { - if (location === undefined) { - return; - } - this.service.scrollTo(location.index - 2 < 0 ? 0 : location.index - 2); - this.service.refresh(); - }) - .catch((err: Error) => { - this.log().error(`Fail to get nearest content: ${err.message}`); - }); - } - }), - this.session.indexed.subjects.get().updated.subscribe((len: number) => { - this.service.setLen(len); - }), - this.session.indexed.subjects.get().changed.subscribe(() => { - this.service.refresh(); - }), - this.service.onBound(() => { - this.env().subscriber.register( - this.service.getFrame().onFrameChange(() => { - if (this.navigation.pending === PendingScroll.Unset) { - return; - } - const rows = this.service.getFrame().getRows(); - if (rows.length === 0) { - return; - } - this.session.cursor.select( - this.navigation.pending === PendingScroll.Next - ? rows[rows.length - 1].position - : rows[0].position, - Owner.Search, - undefined, - undefined, - ); - this.navigation.pending = PendingScroll.Unset; - }), - this.ilc().services.system.hotkeys.listen(']', () => { - if (this.session.search.state().nested().get() !== undefined) { - return; - } - this.move().next(); - }), - this.ilc().services.system.hotkeys.listen('[', () => { - if (this.session.search.state().nested().get() !== undefined) { - return; - } - this.move().prev(); - }), - this.ilc().services.system.hotkeys.listen('Ctrl + 2', () => { - this.service.focus().set(); - }), - ); - }), - ); - const bound = this.session.render.getBoundEntity(); - this.columns = bound instanceof Columns ? bound : undefined; - } - - protected move(): { - next(): void; - prev(): void; - top(): void; - bottom(): void; - } { - const frame = this.service.getFrame(); - const rows = frame.getRows(); - const range = frame.get(); - const selected = (() => { - if (this.session.indexed.len() === 0) { - return undefined; - } - if (rows.length === 0) { - return undefined; - } - const single = this.session.cursor.getSingle().position(); - if (single === undefined) { - this.session.cursor.select(rows[0].position, Owner.Search, undefined, undefined); - return undefined; - } - const selected = rows.findIndex((r) => r.position === single); - return selected !== -1 ? selected : undefined; - })(); - return { - next: (): void => { - if (selected === undefined) { - return; - } - if (selected < rows.length - 1) { - this.session.cursor.select( - rows[selected + 1].position, - Owner.Search, - undefined, - undefined, - ); - return; - } - if ( - range.start + 1 >= this.service.getLen() - 1 || - range.end >= this.service.getLen() - 1 - ) { - return; - } - this.navigation.pending = PendingScroll.Next; - this.service.scrollTo(range.start + 1); - }, - prev: (): void => { - if (selected === undefined) { - return; - } - if (rows[selected] === undefined) { - return; - } - if (selected >= 1) { - this.session.cursor.select( - rows[selected - 1].position, - Owner.Search, - undefined, - undefined, - ); - return; - } - if (range.start === 0) { - return; - } - this.navigation.pending = PendingScroll.Prev; - this.service.scrollTo(range.start - 1); - }, - top: (): void => { - this.service.getLen() > 0 && this.service.focus().get() && this.service.scrollTo(0); - }, - bottom: (): void => { - this.service.getLen() > 0 && - this.service.focus().get() && - this.service.scrollTo(this.service.getLen()); - }, - }; - } -} -export interface ViewSearchResults extends IlcInterface {} diff --git a/application/client/src/app/ui/views/toolbar/search/results/styles.less b/application/client/src/app/ui/views/toolbar/search/results/styles.less deleted file mode 100644 index 5055446c5b..0000000000 --- a/application/client/src/app/ui/views/toolbar/search/results/styles.less +++ /dev/null @@ -1,9 +0,0 @@ -@import '../../../../styles/variables.less'; - -:host { - display: block; - position: relative; - height: 100%; - width: 100%; - background: var(--scheme-color-5); -} diff --git a/application/client/src/app/ui/views/toolbar/search/results/template.html b/application/client/src/app/ui/views/toolbar/search/results/template.html deleted file mode 100644 index 2360baa5d6..0000000000 --- a/application/client/src/app/ui/views/toolbar/search/results/template.html +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/application/client/src/app/ui/views/toolbar/search/styles.less b/application/client/src/app/ui/views/toolbar/search/styles.less deleted file mode 100644 index 0bb9ad3b53..0000000000 --- a/application/client/src/app/ui/views/toolbar/search/styles.less +++ /dev/null @@ -1,22 +0,0 @@ -@import '../../../styles/variables.less'; - -:host { - display: flex; - position: absolute; - flex-direction: column; - height: 100%; - width: 100%; - background: var(--scheme-color-5); - overflow: hidden; - & app-views-search-input { - position: relative; - } - & app-views-search-nested { - position: absolute; - right: 17px; - top: 42px; - } - & app-views-search-results { - flex: auto; - } -} diff --git a/application/client/src/app/ui/views/toolbar/search/template.html b/application/client/src/app/ui/views/toolbar/search/template.html deleted file mode 100644 index c8ed9b1a46..0000000000 --- a/application/client/src/app/ui/views/toolbar/search/template.html +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/application/client/src/app/ui/views/workspace/backing.ts b/application/client/src/app/ui/views/workspace/backing.ts deleted file mode 100644 index db96f131d7..0000000000 --- a/application/client/src/app/ui/views/workspace/backing.ts +++ /dev/null @@ -1,70 +0,0 @@ -import { Session } from '@service/session'; -import { IRowsPacket, Service } from '@elements/scrollarea/controllers/service'; -import { Range } from '@platform/types/range'; -import { Owner, RowSrc } from '@schema/content/row'; -import { Nature } from '@platform/types/content'; - -const SCROLLAREA_SERVICE = 'workspace_scroll_area_service'; - -function getRows(session: Session, range: Range): Promise { - return new Promise((resolve, reject) => { - session.stream - .chunk(range) - .then((rows) => { - const converted: RowSrc[] = rows.map((row) => { - return { - position: row.pos, - content: row.content, - session, - owner: Owner.Output, - source: - typeof row.source_id === 'string' - ? parseInt(row.source_id, 10) - : row.source_id, - nature: new Nature(row.nature), - }; - }); - session.cursor.recent(converted); - resolve({ - rows: converted, - range, - }); - }) - .catch(reject); - }); -} -export function getScrollAreaService(session: Session): Service { - const restored = session.storage.get(SCROLLAREA_SERVICE); - if (restored === undefined) { - const service = new Service({ - getRows: (range: Range) => { - return getRows(session, range); - }, - setFrame: (range: Range) => { - getRows(session, range) - .then((packet) => { - session.cursor.frame().set(range.asObj()); - service.setRows(packet); - }) - .catch((err: Error) => { - throw new Error(`Fail get chunk: ${err.message}`); - }); - }, - getLen: (): number => { - return session.stream.len(); - }, - getItemHeight: (): number => { - return 16; - }, - }); - service.setLen(session.stream.len()); - return service; - } else { - restored.setLen(session.stream.len()); - return restored; - } -} - -export function setScrollAreaService(session: Session, service: Service) { - session.storage.set(SCROLLAREA_SERVICE, service); -} diff --git a/application/client/src/app/ui/views/workspace/component.ts b/application/client/src/app/ui/views/workspace/component.ts deleted file mode 100644 index 457ef14ac2..0000000000 --- a/application/client/src/app/ui/views/workspace/component.ts +++ /dev/null @@ -1,212 +0,0 @@ -import { Component, OnDestroy, ViewChild, Input, AfterContentInit } from '@angular/core'; -import { Session } from '@service/session'; -import { Ilc, IlcInterface } from '@env/decorators/component'; -import { Initial } from '@env/decorators/initial'; -import { ScrollAreaComponent } from '@elements/scrollarea/component'; -import { Service } from '@elements/scrollarea/controllers/service'; -import { getScrollAreaService, setScrollAreaService } from './backing'; -import { Columns } from '@schema/render/columns'; -import { Owner } from '@schema/content/row'; -import { ColumnsHeaders } from './headers/component'; -import { Notification } from '@ui/service/notifications'; - -@Component({ - selector: 'app-views-workspace', - templateUrl: './template.html', - styleUrls: ['./styles.less'], - standalone: false, -}) -@Initial() -@Ilc() -export class ViewWorkspace implements AfterContentInit, OnDestroy { - @ViewChild(ScrollAreaComponent) scrollAreaComponent!: ScrollAreaComponent; - @ViewChild('headers') headers!: ColumnsHeaders; - - @Input() public session!: Session; - - public service!: Service; - public columns: Columns | undefined; - - public ngOnDestroy(): void { - setScrollAreaService(this.session, this.service); - } - - public ngAfterContentInit(): void { - this.service = getScrollAreaService(this.session); - const bound = this.session.render.getBoundEntity(); - this.columns = bound instanceof Columns ? bound : undefined; - this.env().subscriber.register( - this.session.getTabAPI().subjects.onTitleContextMenu.subscribe((event: MouseEvent) => { - const filename = this.session.stream.observe().getSourceFileName(); - this.ilc().emitter.ui.contextmenu.open({ - items: [ - { - caption: 'Generate CLI command', - disabled: !this.session.cli.isSupported(), - handler: async () => { - const command = await this.session.cli.generate(); - if (command === undefined) { - this.ilc().services.ui.notifications.notify( - new Notification({ - message: - 'Fail to generate CLI command for this session', - actions: [], - }), - ); - } else { - navigator.clipboard.writeText(command); - this.ilc().services.ui.notifications.notify( - new Notification({ - message: 'CLI command has been copied into clipboard', - actions: [], - }), - ); - } - }, - }, - {}, - { - caption: 'Copy Path', - disabled: filename === undefined, - handler: () => { - if (!filename) { - return; - } - this.ilc() - .services.system.bridge.files() - .name(filename) - .then((info) => { - navigator.clipboard.writeText(info.parent); - }) - .catch((err: Error) => { - this.log().error( - `Fail get file info for ${filename}: ${err.message}`, - ); - }); - }, - }, - { - caption: 'Copy Full Path', - disabled: filename === undefined, - handler: () => { - filename && navigator.clipboard.writeText(filename); - }, - }, - { - caption: 'Copy File Name', - disabled: filename === undefined, - handler: () => { - if (!filename) { - return; - } - this.ilc() - .services.system.bridge.files() - .name(filename) - .then((info) => { - navigator.clipboard.writeText(info.name); - }) - .catch((err: Error) => { - this.log().error( - `Fail get file info for ${filename}: ${err.message}`, - ); - }); - }, - }, - {}, - { - caption: 'Open Containing Folder', - disabled: filename === undefined, - handler: () => { - if (!filename) { - return; - } - this.ilc() - .services.system.bridge.files() - .name(filename) - .then((info) => { - this.ilc() - .services.system.bridge.folders() - .open(info.parent) - .catch((err: Error) => { - this.log().error(`Fail to open: ${err.message}`); - }); - }) - .catch((err: Error) => { - this.log().error( - `Fail get file info for ${filename}: ${err.message}`, - ); - }); - }, - }, - {}, - { - caption: 'Close', - disabled: false, - handler: () => { - this.session.close(); - }, - }, - ], - x: event.x, - y: event.y, - }); - }), - this.session.stream.subjects.get().updated.subscribe((len: number) => { - this.service.setLen(len); - }), - this.session.cursor.subjects.get().selected.subscribe((event) => { - if (event.initiator === Owner.Output) { - return; - } - this.service.scrollTo(event.row); - }), - this.service.onBound(() => { - this.service.setAdhered(!this.session.stream.observe().isFileSource()); - this.env().subscriber.register( - this.ilc().services.system.hotkeys.listen('Ctrl + 1', () => { - this.service.focus().set(); - }), - ); - }), - this.ilc().services.system.hotkeys.listen('Ctrl + W', () => { - this.session.close(); - }), - this.ilc().services.system.hotkeys.listen('Ctrl + F', () => { - this.session.switch().toolbar.search(); - }), - this.ilc().services.system.hotkeys.listen('/', () => { - this.session.switch().toolbar.search(); - }), - this.ilc().services.system.hotkeys.listen('Shift + Ctrl + P', () => { - this.session.switch().toolbar.presets(); - }), - this.ilc().services.system.hotkeys.listen('Ctrl + 2', () => { - this.session.switch().toolbar.search(); - }), - ); - } - - public onHorizontalScrolling(offset: number): void { - if (this.headers === undefined || this.headers === null) { - return; - } - this.headers.setOffset(offset); - } - - protected move(): { - top(): void; - bottom(): void; - } { - return { - top: (): void => { - this.service.getLen() > 0 && this.service.focus().get() && this.service.scrollTo(0); - }, - bottom: (): void => { - this.service.getLen() > 0 && - this.service.focus().get() && - this.service.scrollTo(this.service.getLen()); - }, - }; - } -} -export interface ViewWorkspace extends IlcInterface {} diff --git a/application/client/src/app/ui/views/workspace/headers/component.ts b/application/client/src/app/ui/views/workspace/headers/component.ts deleted file mode 100644 index 26d88645c6..0000000000 --- a/application/client/src/app/ui/views/workspace/headers/component.ts +++ /dev/null @@ -1,125 +0,0 @@ -import { - Component, - Input, - ChangeDetectionStrategy, - ChangeDetectorRef, - AfterContentInit, -} from '@angular/core'; -import { Ilc, IlcInterface } from '@env/decorators/component'; -import { Columns, Header } from '@schema/render/columns'; -import { Session } from '@service/session'; -import { contextmenu } from '@ui/service/contextmenu'; -import { LimittedValue } from '@ui/env/entities/value.limited'; -import { ChangesDetector } from '@ui/env/extentions/changes'; -import { Direction } from '@directives/resizer'; -import { ViewWorkspaceHeadersMenuComponent } from './menu/component'; - -class RenderedHeader { - public caption: string; - public styles: { [key: string]: string } = {}; - public width: LimittedValue | undefined; - public color: string | undefined; - public index: number; - - private _ref: Header; - - constructor(ref: Header) { - this._ref = ref; - this.caption = ref.caption; - this.width = ref.width; - this.color = ref.color; - this.width !== undefined && this.resize(this.width.value); - this.index = ref.index; - } - - public resize(width: number) { - if (this._ref.width === undefined || this.width === undefined) { - return; - } - this._ref.width.set(width); - this.styles = { - width: `${this.width.value}px`, - minWidth: `${this.width.value}px`, - }; - } -} - -@Component({ - selector: 'app-scrollarea-row-columns-headers', - styleUrls: ['./styles.less'], - templateUrl: './template.html', - changeDetection: ChangeDetectionStrategy.OnPush, - standalone: false, -}) -@Ilc() -export class ColumnsHeaders extends ChangesDetector implements AfterContentInit { - protected load(): void { - this.headers = this.controller - .get() - .visible() - .map((h) => new RenderedHeader(h)); - } - - public readonly Direction = Direction; - public offset: number = 0; - - @Input() public controller!: Columns; - @Input() public session!: Session; - - public headers: RenderedHeader[] = []; - - constructor(cdRef: ChangeDetectorRef) { - super(cdRef); - } - - public ngAfterContentInit(): void { - this.env().subscriber.register( - this.session.stream.subjects.get().rank.subscribe(() => { - this.detectChanges(); - }), - this.controller.subjects.get().visibility.subscribe(() => { - this.load(); - this.detectChanges(); - }), - this.controller.subjects.get().restored.subscribe(() => { - this.load(); - this.detectChanges(); - }), - ); - this.load(); - } - - public contextmenu(event: MouseEvent, index: number): void { - contextmenu.show({ - component: { - factory: ViewWorkspaceHeadersMenuComponent, - inputs: { - index, - controller: this.controller, - }, - }, - x: event.pageX, - y: event.pageY, - }); - } - - public ngGetOffsetStyle(): { [key: string]: string } { - return { - width: `${this.session.stream.rank.width()}px`, - minWidth: `${this.session.stream.rank.width()}px`, - marginLeft: `-${this.offset}px`, - }; - } - - public ngResize(width: number, header: RenderedHeader) { - header.resize(width); - this.controller.width(header.index).set(width); - this.detectChanges(); - } - - public setOffset(left: number): void { - this.offset = left; - this.detectChanges(); - } -} -export interface ColumnsHeaders extends IlcInterface {} diff --git a/application/client/src/app/ui/views/workspace/headers/menu/component.ts b/application/client/src/app/ui/views/workspace/headers/menu/component.ts deleted file mode 100644 index ddf696ffbb..0000000000 --- a/application/client/src/app/ui/views/workspace/headers/menu/component.ts +++ /dev/null @@ -1,78 +0,0 @@ -import { - ChangeDetectionStrategy, - ChangeDetectorRef, - Component, - Input, - SimpleChange, - AfterContentInit, -} from '@angular/core'; -import { Columns } from '@schema/render/columns'; -import { ChangesDetector } from '@ui/env/extentions/changes'; -import { CColors } from '@ui/styles/colors'; - -@Component({ - selector: 'app-scrollarea-rows-columns-headers-context-menu', - styleUrls: ['./styles.less'], - templateUrl: './template.html', - changeDetection: ChangeDetectionStrategy.OnPush, - standalone: false, -}) -export class ViewWorkspaceHeadersMenuComponent extends ChangesDetector implements AfterContentInit { - protected clickOnCheckbox: boolean = false; - protected switch(index: number): void { - this.index = index; - const header = this.controller.get().byIndex(index); - this.color = header === undefined ? undefined : header.color; - } - - public colors: string[] = CColors; - public color: string | undefined; - - @Input() public index!: number; - @Input() public controller!: Columns; - - constructor(cdRef: ChangeDetectorRef) { - super(cdRef); - } - - public ngAfterContentInit(): void { - this.switch(this.index); - } - - public ngOnContainerClick(index: number): void { - if (this.clickOnCheckbox) { - this.clickOnCheckbox = false; - return; - } - this.switch(index); - this.detectChanges(); - } - - public ngOnCheckboxClick(): void { - this.clickOnCheckbox = true; - } - - public ngOnCheckboxChange(event: SimpleChange, index: number): void { - this.controller.visibility(index).set(event as unknown as boolean); - this.detectChanges(); - } - - public ngOnColorClick(color: string): void { - this.controller.color(this.index).set(color === CColors[0] ? undefined : color); - this.switch(this.index); - this.detectChanges(); - } - - public isColorSelected(color: string): boolean { - if (this.color === undefined && color === CColors[0]) { - return true; - } - return this.color === color; - } - - public reset() { - this.controller.reset(); - this.switch(this.index); - this.detectChanges(); - } -} diff --git a/application/client/src/app/ui/views/workspace/headers/menu/styles.less b/application/client/src/app/ui/views/workspace/headers/menu/styles.less deleted file mode 100644 index a5111c68a1..0000000000 --- a/application/client/src/app/ui/views/workspace/headers/menu/styles.less +++ /dev/null @@ -1,100 +0,0 @@ -@import '../../../../styles/variables.less'; - -:host { - position: relative; - display: flex; - flex-direction: row; - padding: 8px; - & ul.columns{ - position: relative; - display: block; - padding: 0; - margin: 0; - margin-right: 28px; - list-style: none; - & li.column{ - position: relative; - display: block; - padding: 4px 10px 0px 6px; - margin: 0; - list-style: none; - width: 100%; - white-space: nowrap; - &:hover{ - background: var(--scheme-color-4); - } - &.selected { - &::after{ - position: absolute; - display: block; - content: ''; - width: 2px; - left: -2px; - top: 0; - height: 100%; - background: var(--scheme-color-accent); - } - } - - } - } - & div.controls { - position: relative; - display: flex; - flex-direction: column; - & ul.colors{ - position: relative; - display: block; - padding: 0; - margin: 0; - list-style: none; - width: 104px; - white-space: normal; - flex: auto; - & li.color{ - position: relative; - display: inline-block; - height: 22px; - width: 22px; - margin: 0 4px 2px 0; - padding: 0; - list-style: none; - line-height: 0; - box-sizing: border-box; - vertical-align: top; - &:hover, - &.selected { - border: 1px solid var(--scheme-color-0); - &::after{ - position: absolute; - content: ''; - top:0; - left:0; - width: 0; - height: 0; - border-top: 6px solid var(--scheme-color-0); - border-right: 6px solid transparent; - } - &:hover{ - &::after{ - display: none; - } - } - } - } - } - & div.buttons { - text-align: right; - } - } - - & span.label { - position: relative; - display: inline-block; - padding: 2px 0px 0px 4px; - cursor: default; - color: var(--scheme-color-1); - vertical-align: top; - } -} - diff --git a/application/client/src/app/ui/views/workspace/headers/menu/template.html b/application/client/src/app/ui/views/workspace/headers/menu/template.html deleted file mode 100644 index 26c49fe6bb..0000000000 --- a/application/client/src/app/ui/views/workspace/headers/menu/template.html +++ /dev/null @@ -1,29 +0,0 @@ -
    -
  • - - - {{header.value.caption}} - -
  • -
-
-
    -
  • -
  • -
-
- -
-
diff --git a/application/client/src/app/ui/views/workspace/headers/styles.less b/application/client/src/app/ui/views/workspace/headers/styles.less deleted file mode 100644 index 34ddce787d..0000000000 --- a/application/client/src/app/ui/views/workspace/headers/styles.less +++ /dev/null @@ -1,49 +0,0 @@ -@import '../../../styles/variables.less'; - -:host { - display: flex; - flex-direction: row; - position: relative; - font-family: 'console', monospace; - font-size: 13.5px; - font-variant-numeric: tabular-nums; - padding: 0; - margin: 0; - line-height: 16px; - height: 16px; - max-height: 16px; - color: var(--scheme-color-2); - font-weight: 500; - user-select: none; - cursor: default; - span.header { - display: block; - position: relative; - overflow: hidden; - padding: 0 12px; - color: var(--scheme-color-2); - border-left: thin solid var(--scheme-color-3); - } - & span:nth-child(2) { - border-left: none; - } - span.offset { - display: block; - } - span.resizer { - position: absolute; - display: block; - width: 4px; - right: 0px; - top: 0; - height: 100%; - cursor: e-resize; - } - & mat-icon.more { - position: relative; - float: right; - margin-top: -24px; - color: var(--scheme-color-0); - background-color: var(--scheme-color-5); - } -} diff --git a/application/client/src/app/ui/views/workspace/headers/template.html b/application/client/src/app/ui/views/workspace/headers/template.html deleted file mode 100644 index 249137daec..0000000000 --- a/application/client/src/app/ui/views/workspace/headers/template.html +++ /dev/null @@ -1,16 +0,0 @@ - - - {{header.caption}} - - diff --git a/application/client/src/app/ui/views/workspace/map/component.ts b/application/client/src/app/ui/views/workspace/map/component.ts deleted file mode 100644 index 5a1969988b..0000000000 --- a/application/client/src/app/ui/views/workspace/map/component.ts +++ /dev/null @@ -1,57 +0,0 @@ -import { - Component, - Input, - AfterViewInit, - ViewChild, - ElementRef, - ChangeDetectorRef, -} from '@angular/core'; -import { Ilc, IlcInterface } from '@env/decorators/component'; -import { Session } from '@service/session'; -import { State } from './state'; -import { ChangesDetector } from '@ui/env/extentions/changes'; - -@Component({ - selector: 'app-views-content-map', - templateUrl: './template.html', - styleUrls: ['./styles.less'], - standalone: false, -}) -@Ilc() -export class ViewContentMapComponent extends ChangesDetector implements AfterViewInit { - @ViewChild('canvas') canvasElementRef!: ElementRef; - @Input() public session!: Session; - - public state: State = new State(); - - constructor(cdRef: ChangeDetectorRef, private elRef: ElementRef) { - super(cdRef); - } - - public ngAfterViewInit(): void { - this.state.init( - this.session, - this.elRef.nativeElement, - this.canvasElementRef.nativeElement, - this.detectChanges.bind(this), - ); - this.env().subscriber.register( - this.session.search.subjects.get().updated.subscribe((_event) => { - this.state.update(); - }), - ); - this.env().subscriber.register( - this.session.search - .store() - .filters() - .subjects.get() - .highlights.subscribe(() => { - this.state.draw(); - }), - ); - this.ilc().channel.ui.toolbar.resize(() => { - this.state.resize().update(); - }); - } -} -export interface ViewContentMapComponent extends IlcInterface {} diff --git a/application/client/src/app/ui/views/workspace/map/state.ts b/application/client/src/app/ui/views/workspace/map/state.ts deleted file mode 100644 index 9a246af535..0000000000 --- a/application/client/src/app/ui/views/workspace/map/state.ts +++ /dev/null @@ -1,120 +0,0 @@ -import { ISearchMap } from '@platform/types/filter'; -import { Session } from '@service/session'; -import { styles } from '@ui/service/styles'; -import { settings } from '@service/settings'; - -export class State { - static COLUMN_WIDTH = 4; - - public width: number = 0; - public height: number = 0; - - protected session!: Session; - protected holderElementRef!: HTMLElement; - protected canvasElementRef!: HTMLCanvasElement; - protected context!: CanvasRenderingContext2D; - protected map: ISearchMap = []; - protected detectChanges!: () => void; - - public init( - session: Session, - holderElementRef: HTMLElement, - canvasElementRef: HTMLCanvasElement, - detectChanges: () => void, - ) { - this.session = session; - this.holderElementRef = holderElementRef; - this.canvasElementRef = canvasElementRef; - const context: CanvasRenderingContext2D | null = this.canvasElementRef.getContext('2d'); - if (context === null) { - throw new Error(`Fail to get access to canvas context`); - } - this.context = context; - this.detectChanges = detectChanges; - this.resize().update(); - } - - public update(): State { - if (this.height === 0) { - return this; - } - this.session.search - .getScaledMap(this.height) - .then((map) => { - this.map = map; - this.draw(); - }) - .catch((err: Error) => { - console.log(err); - }); - return this; - } - - public resize(): State { - this.detectChanges(); - const size = this.holderElementRef.getBoundingClientRect(); - this.height = size.height; - return this; - } - - public draw(): State { - const activeSearchMatchColor = - settings.defaults['general.colors.match'] === undefined - ? styles.colors().scheme_color_2 - : settings.defaults['general.colors.match']; - const filters = this.session.search - .store() - .filters() - .get() - .filter((f) => f.definition.active); - const isActive = this.session.search.state().getActive() !== undefined; - this.context.fillStyle = styles.colors().scheme_color_5; - this.context.fillRect(0, 0, this.width, this.height); - const scale = (() => { - if (this.map.length === 0 || this.height === 0) { - return 1; - } else if (this.map.length < this.height) { - return this.height / this.map.length; - } else { - return 1; - } - })(); - const indexes: { [key: number]: number } = {}; - if (isActive) { - this.width = State.COLUMN_WIDTH; - } else { - let index = 0; - this.map.forEach((value: number[][]) => { - value.forEach((matches) => { - if (indexes[matches[0]] === undefined) { - indexes[matches[0]] = index; - index += 1; - } - }); - }); - this.width = Object.keys(indexes).length * State.COLUMN_WIDTH; - } - this.context.fillRect(0, 0, this.width, this.height); - this.detectChanges(); - this.map.forEach((value: number[][], top: number) => { - value.forEach((matches) => { - if (isActive) { - this.context.fillStyle = activeSearchMatchColor; - } else { - const filter = filters[matches[0]]; - this.context.fillStyle = - filter === undefined - ? styles.colors().scheme_color_match - : filter.definition.colors.background; - } - this.context.fillRect( - isActive ? 0 : indexes[matches[0]] * State.COLUMN_WIDTH, - top * scale, - State.COLUMN_WIDTH, - scale, - ); - }); - }); - return this; - } -} diff --git a/application/client/src/app/ui/views/workspace/map/styles.less b/application/client/src/app/ui/views/workspace/map/styles.less deleted file mode 100644 index f87007745b..0000000000 --- a/application/client/src/app/ui/views/workspace/map/styles.less +++ /dev/null @@ -1,19 +0,0 @@ -@import '../../../styles/variables.less'; - -:host { - position: absolute; - width: fit-content; - height: 100%; - display: block; - top: 0; - right: 8px; - background: var(--scheme-color-7); - z-index: 1; - & canvas { - cursor: default; - position: relative; - display: block; - margin: 0; - padding: 0; - } -} diff --git a/application/client/src/app/ui/views/workspace/map/template.html b/application/client/src/app/ui/views/workspace/map/template.html deleted file mode 100644 index 3881c7acd7..0000000000 --- a/application/client/src/app/ui/views/workspace/map/template.html +++ /dev/null @@ -1 +0,0 @@ - diff --git a/application/client/src/app/ui/views/workspace/module.ts b/application/client/src/app/ui/views/workspace/module.ts deleted file mode 100644 index 8373d10a95..0000000000 --- a/application/client/src/app/ui/views/workspace/module.ts +++ /dev/null @@ -1,52 +0,0 @@ -import { NgModule } from '@angular/core'; -import { CommonModule } from '@angular/common'; -import { ViewWorkspace } from './component'; -import { ViewContentMapComponent } from './map/component'; -import { ViewSdeComponent } from './sde/component'; -import { ViewWorkspaceTitleComponent } from './title/component'; -import { ViewWorkspaceHeadersMenuComponent } from './headers/menu/component'; -import { ColumnsHeaders } from './headers/component'; -import { ScrollAreaModule } from '@elements/scrollarea/module'; -import { ContainersModule } from '@elements/containers/module'; -import { AppDirectiviesModule } from '@directives/module'; -import { AutocompleteModule } from '@elements/autocomplete/module'; -import { AttachSourceMenuModule } from '@elements/menu.attachsource/module'; -import { MatMenuModule } from '@angular/material/menu'; -import { MatDividerModule } from '@angular/material/divider'; -import { MatIconModule } from '@angular/material/icon'; -import { MatButtonModule } from '@angular/material/button'; -import { MatCheckboxModule } from '@angular/material/checkbox'; -import { MatProgressSpinnerModule } from '@angular/material/progress-spinner'; -import { MatProgressBarModule } from '@angular/material/progress-bar'; -import { FormsModule, ReactiveFormsModule } from '@angular/forms'; - -@NgModule({ - imports: [ - CommonModule, - ContainersModule, - ScrollAreaModule, - AppDirectiviesModule, - AutocompleteModule, - MatMenuModule, - MatCheckboxModule, - MatDividerModule, - MatIconModule, - MatProgressBarModule, - MatProgressSpinnerModule, - MatButtonModule, - AttachSourceMenuModule, - FormsModule, - ReactiveFormsModule, - ], - declarations: [ - ViewWorkspace, - ViewContentMapComponent, - ColumnsHeaders, - ViewSdeComponent, - ViewWorkspaceHeadersMenuComponent, - ViewWorkspaceTitleComponent, - ], - exports: [ViewWorkspace], - bootstrap: [ViewWorkspace], -}) -export class WorkspaceModule {} diff --git a/application/client/src/app/ui/views/workspace/sde/component.ts b/application/client/src/app/ui/views/workspace/sde/component.ts deleted file mode 100644 index a11a403e29..0000000000 --- a/application/client/src/app/ui/views/workspace/sde/component.ts +++ /dev/null @@ -1,99 +0,0 @@ -import { - Component, - Input, - AfterContentInit, - ChangeDetectorRef, - HostBinding, - ViewChild, - ViewEncapsulation, - OnDestroy, - SkipSelf, -} from '@angular/core'; -import { Ilc, IlcInterface } from '@env/decorators/component'; -import { Session } from '@service/session'; -import { State } from './state'; -import { ChangesDetector } from '@ui/env/extentions/changes'; -import { - AutocompleteInput, - Options as AutocompleteOptions, -} from '@elements/autocomplete/component'; -import { Subject } from '@platform/env/subscription'; -import { unique } from '@platform/env/sequence'; - -const SDE_STATE = unique(); - -@Component({ - selector: 'app-views-sde', - templateUrl: './template.html', - styleUrls: ['./styles.less'], - encapsulation: ViewEncapsulation.None, - standalone: false, -}) -@Ilc() -export class ViewSdeComponent extends ChangesDetector implements AfterContentInit, OnDestroy { - @ViewChild('sde') public sdeInputRef!: AutocompleteInput; - - @Input() public session!: Session; - - @HostBinding('style.display') get cssDisplayProp() { - return this.state === undefined - ? 'none' - : this.state.operations.length > 0 - ? this.state.hidden - ? 'none' - : 'flex' - : 'none'; - } - public state!: State; - public options: AutocompleteOptions = { - name: 'SdeRecentList', - storage: 'sde_sent_recent', - defaults: '', - placeholder: 'Enter command/data to send', - label: 'Data to send', - recent: new Subject(), - }; - - constructor(@SkipSelf() selfCdRef: ChangeDetectorRef, cdRef: ChangeDetectorRef) { - super([selfCdRef, cdRef]); - } - - public ngOnDestroy(): void { - this.state.destroy().catch((err: Error) => { - this.log().error(`Fail to drop state: ${err.message}`); - }); - this.session.storage.set(SDE_STATE, this.state); - } - - public ngAfterContentInit(): void { - const stored = this.session.storage.get(SDE_STATE); - this.state = stored !== undefined ? stored : new State(); - this.state.bind(this, this.session); - this.env().subscriber.register( - this.session.stream.subjects.get().finished.subscribe(() => { - this.detectChanges(); - }), - this.session.stream.subjects.get().started.subscribe(() => { - this.detectChanges(); - }), - ); - } - - public enter(): void { - const value = this.sdeInputRef.control.value; - this.state - .send(value) - .then(() => { - value.trim() !== '' && this.options.recent.emit(value); - }) - .finally(() => { - this.sdeInputRef.control.drop(); - }); - this.markChangesForCheck(); - } - - public panel(): void { - this.markChangesForCheck(); - } -} -export interface ViewSdeComponent extends IlcInterface {} diff --git a/application/client/src/app/ui/views/workspace/sde/state.ts b/application/client/src/app/ui/views/workspace/sde/state.ts deleted file mode 100644 index 50967b31cf..0000000000 --- a/application/client/src/app/ui/views/workspace/sde/state.ts +++ /dev/null @@ -1,143 +0,0 @@ -import { Session } from '@service/session'; -import { IlcInterface } from '@env/decorators/component'; -import { ChangesDetector } from '@ui/env/extentions/changes'; -import { ObserveOperation } from '@service/session/dependencies/stream'; -import { IOriginDetails } from '@platform/types/observe'; -import { Destroyable } from '@platform/types/life/destroyable'; -import { Notification } from '@ui/service/notifications'; -import { getSourceColor } from '@ui/styles/colors'; - -export class State implements Destroyable { - protected ref: undefined | (IlcInterface & ChangesDetector); - protected session!: Session; - - public operations: ObserveOperation[] = []; - public progress: boolean = false; - public hidden: boolean = false; - public selected: ObserveOperation | undefined; - - public bind(ref: IlcInterface & ChangesDetector, session: Session): State { - this.ref = ref; - this.session = session; - ref.env().subscriber.register( - session.stream.sde.subjects.get().updated.subscribe(() => { - this.update(); - }), - session.stream.sde.subjects.get().selected.subscribe(() => { - this.update(); - }), - session.stream.sde.subjects.get().visibility.subscribe(() => { - if (this.session === undefined) { - return; - } - const sde = this.session.stream.sde; - this.hidden = sde.visibility().hidden(); - this.safe().updateRefComp(); - }), - ); - this.update(); - return this; - } - - public destroy(): Promise { - this.ref = undefined; - return Promise.resolve(); - } - - public isSelected(source: ObserveOperation): boolean { - const selection = this.session.stream.sde.selecting().get(); - return selection === undefined ? false : selection.uuid === source.uuid; - } - - public getSourceColor(source: ObserveOperation): string { - const id = this.session.stream.observe().descriptions.id(source.uuid); - return id === undefined ? '' : getSourceColor(id); - } - - public desc(source: ObserveOperation): IOriginDetails { - return source.asOrigin().desc(); - } - - public send(data: string): Promise { - const selected = this.session.stream.sde.selecting().get(); - if (selected === undefined) { - return Promise.resolve(); - } - this.progress = true; - this.safe().updateRefComp(); - return selected - .send() - .text(data) - .then(() => undefined) - .catch((err: Error) => { - this.safe().notify(err.message); - }) - .finally(() => { - this.progress = false; - this.safe().updateRefComp(); - }); - } - - public select(source: ObserveOperation | undefined): void { - this.session.stream.sde.selecting().select(source === undefined ? undefined : source.uuid); - this.selected = this.session.stream.sde.selecting().get(); - if (this.selected !== undefined) { - this.progress = this.selected.getSdeTasksCount() > 0; - } - this.safe().updateRefComp(); - } - - protected update(): void { - if (this.session === undefined) { - return; - } - const sde = this.session.stream.sde; - this.selected = sde.selecting().get(); - this.hidden = sde.visibility().hidden(); - this.operations = sde.get(); - if (this.selected !== undefined) { - this.progress = this.selected.getSdeTasksCount() > 0; - } - this.safe().updateRefComp(); - } - - protected safe(): { - updateRefComp(): void; - unsubscribe(): void; - error(msg: string): void; - notify(err: string): void; - } { - return { - updateRefComp: (): void => { - if (this.ref === undefined) { - return; - } - this.ref.detectChanges(); - }, - unsubscribe: (): void => { - if (this.ref === undefined) { - return; - } - this.ref.env().subscriber.unsubscribe(); - }, - error: (msg: string): void => { - if (this.ref === undefined) { - return; - } - this.ref.log().error(msg); - }, - notify: (err: string): void => { - if (this.ref === undefined) { - return; - } - this.ref.log().warn(err); - this.ref.ilc().services.ui.notifications.notify( - new Notification({ - message: err.replace('{"Sde":"', '').replace('"}', ''), - actions: [], - }), - ); - }, - }; - } -} diff --git a/application/client/src/app/ui/views/workspace/sde/styles.less b/application/client/src/app/ui/views/workspace/sde/styles.less deleted file mode 100644 index f9fa9fef0f..0000000000 --- a/application/client/src/app/ui/views/workspace/sde/styles.less +++ /dev/null @@ -1,87 +0,0 @@ -@import '../../../styles/variables.less'; - -app-views-sde { - position: relative; - display: flex; - align-items: center; - padding: 6px; - & div.container { - position: relative; - width: 100%; - display: flex; - align-items: center; - padding: 0; - & button { - margin-left: 6px; - & > span.label { - max-width: 128px; - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; - } - } - & span.prompt{ - color: var(--scheme-color-1); - padding-left: 3px; - } - } - & mat-progress-bar { - position: absolute!important; - bottom: 2px!important; - height: 1px!important; - width: calc(100% - 12px)!important; - } -} - -.app-views-sde-list { - & button[mat-menu-item] { - & div.source { - position: relative; - margin-top: -7px; - & > span.marker { - display: block; - position: absolute; - width: 2px; - height: 24px; - left: -9px; - top: 7px; - content: ''; - } - & > span { - display: inline-block; - height: 16px; - line-height: 16px; - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; - max-width: 250px; - } - & > span.minor { - position: relative; - display: block; - color: var(--scheme-color-3); - font-size: 10px; - margin-top: -8px; - white-space: nowrap; - direction: rtl; - max-width: 200px; - } - } - // &[data-selected="true"] { - // & div.source { - // &::before { - // display: block; - // position: absolute; - // width: 4px; - // height: 4px; - // border-radius: 2px; - // background: var(--scheme-color-accent); - // left: -9px; - // top: 7px; - // content: ''; - // } - // } - // } - } - -} diff --git a/application/client/src/app/ui/views/workspace/sde/template.html b/application/client/src/app/ui/views/workspace/sde/template.html deleted file mode 100644 index 552bf24662..0000000000 --- a/application/client/src/app/ui/views/workspace/sde/template.html +++ /dev/null @@ -1,29 +0,0 @@ -
- - >> - -
- - -

Send command/data to:

- -
\ No newline at end of file diff --git a/application/client/src/app/ui/views/workspace/styles.less b/application/client/src/app/ui/views/workspace/styles.less deleted file mode 100644 index fcb6599403..0000000000 --- a/application/client/src/app/ui/views/workspace/styles.less +++ /dev/null @@ -1,18 +0,0 @@ -@import '../../styles/variables.less'; - -:host { - display: flex; - position: absolute; - flex-direction: column; - height: 100%; - width: 100%; - background: var(--scheme-color-5); - overflow: hidden; - & div { - position: relative; - overflow: hidden; - } - & div.content { - flex: auto; - } -} diff --git a/application/client/src/app/ui/views/workspace/template.html b/application/client/src/app/ui/views/workspace/template.html deleted file mode 100644 index 66d9196b29..0000000000 --- a/application/client/src/app/ui/views/workspace/template.html +++ /dev/null @@ -1,9 +0,0 @@ - -
- -
-
- - -
- diff --git a/application/client/src/app/ui/views/workspace/title/component.ts b/application/client/src/app/ui/views/workspace/title/component.ts deleted file mode 100644 index 44f5d2cfb4..0000000000 --- a/application/client/src/app/ui/views/workspace/title/component.ts +++ /dev/null @@ -1,43 +0,0 @@ -import { Component, Input, AfterContentInit, ChangeDetectorRef, OnDestroy } from '@angular/core'; -import { Ilc, IlcInterface } from '@env/decorators/component'; -import { Session } from '@service/session'; -import { State } from './state'; -import { ChangesDetector } from '@ui/env/extentions/changes'; -import { unique } from '@platform/env/sequence'; - -const TITLE_STATE = unique(); - -@Component({ - selector: 'app-views-workspace-title', - templateUrl: './template.html', - styleUrls: ['./styles.less'], - standalone: false, -}) -@Ilc() -export class ViewWorkspaceTitleComponent - extends ChangesDetector - implements AfterContentInit, OnDestroy -{ - @Input() public session!: Session; - - public state!: State; - public title!: string; - - constructor(cdRef: ChangeDetectorRef) { - super(cdRef); - } - - public ngOnDestroy(): void { - this.state.destroy().catch((err: Error) => { - this.log().error(`Fail to drop state: ${err.message}`); - }); - this.session.storage.set(TITLE_STATE, this.state); - } - - public ngAfterContentInit(): void { - const stored = this.session.storage.get(TITLE_STATE); - this.state = stored !== undefined ? stored : new State(); - this.state.bind(this, this.session); - } -} -export interface ViewWorkspaceTitleComponent extends IlcInterface {} diff --git a/application/client/src/app/ui/views/workspace/title/state.ts b/application/client/src/app/ui/views/workspace/title/state.ts deleted file mode 100644 index 73df2cc93a..0000000000 --- a/application/client/src/app/ui/views/workspace/title/state.ts +++ /dev/null @@ -1,109 +0,0 @@ -import { Session } from '@service/session'; -import { IlcInterface } from '@env/decorators/component'; -import { ChangesDetector } from '@ui/env/extentions/changes'; -import { Destroyable } from '@platform/types/life/destroyable'; - -export class State implements Destroyable { - protected ref: undefined | (IlcInterface & ChangesDetector); - protected session: Session | undefined; - - public title: string = ''; - public flags: { - sde: boolean; - } = { - sde: false, - }; - public states: { - sde: boolean; - } = { - sde: false, - }; - - public bind(ref: IlcInterface & ChangesDetector, session: Session): State { - this.ref = ref; - this.session = session; - ref.env().subscriber.register( - session.stream.sde.subjects.get().updated.subscribe(() => { - this.update(); - }), - session.stream.subjects.get().started.subscribe(() => { - this.update(); - }), - session.stream.subjects.get().finished.subscribe(() => { - this.update(); - }), - ); - this.update(); - return this; - } - - public destroy(): Promise { - this.ref = undefined; - return Promise.resolve(); - } - - public toggleSde() { - if (this.session === undefined) { - return; - } - const sde = this.session.stream.sde; - if (sde.visibility().hidden()) { - sde.visibility().show(); - } else { - sde.visibility().hide(); - } - this.states.sde = !sde.visibility().hidden(); - } - - protected update(): void { - if (this.session === undefined) { - return; - } - this.flags.sde = this.session.stream.sde.isAvailable(); - const sources = this.session.stream.observe().sources(); - if (sources.length === 0) { - this.states.sde = false; - this.title = 'no sources are bound with session'; - } else if (sources.length === 1) { - this.states.sde = !this.session.stream.sde.visibility().hidden(); - this.title = ((): string => { - const observe = sources[0].observe; - const desc = observe.origin.desc(); - return `${desc.major}: ${desc.minor}`; - })(); - } else { - const running = sources.filter((s) => s.observer !== undefined).length; - this.title = `multiple ${sources.length} sources; ${running} running; ${ - sources.length - running - } stopped`; - } - this.safe().updateRefComp(); - } - - protected safe(): { - updateRefComp(): void; - unsubscribe(): void; - error(msg: string): void; - } { - return { - updateRefComp: (): void => { - if (this.ref === undefined) { - return; - } - this.ref.detectChanges(); - }, - unsubscribe: (): void => { - if (this.ref === undefined) { - return; - } - this.ref.env().subscriber.unsubscribe(); - }, - error: (msg: string): void => { - if (this.ref === undefined) { - return; - } - this.ref.log().error(msg); - }, - }; - } -} diff --git a/application/client/src/app/ui/views/workspace/title/styles.less b/application/client/src/app/ui/views/workspace/title/styles.less deleted file mode 100644 index 0cea491024..0000000000 --- a/application/client/src/app/ui/views/workspace/title/styles.less +++ /dev/null @@ -1,24 +0,0 @@ -@import '../../../styles/variables.less'; - -:host { - position: relative; - display: flex; - align-items: center; - padding: 6px; - height: 16px; - overflow: hidden; - z-index: 2; - box-shadow: 0 3px 3px rgba(0,0,0,0.4); - margin-bottom: 3px; - span.title { - display: inline-block; - position: relative; - flex:auto; - color: var(--scheme-color-2); - white-space: nowrap; - overflow: hidden; - text-overflow: ellipsis; - } -} - - diff --git a/application/client/src/app/ui/views/workspace/title/template.html b/application/client/src/app/ui/views/workspace/title/template.html deleted file mode 100644 index 4f715bd9c8..0000000000 --- a/application/client/src/app/ui/views/workspace/title/template.html +++ /dev/null @@ -1,5 +0,0 @@ -{{state.title}} - - \ No newline at end of file diff --git a/application/client/src/assets/.gitkeep b/application/client/src/assets/.gitkeep deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/application/client/src/assets/about.gif b/application/client/src/assets/about.gif deleted file mode 100644 index d3d05f7f3b..0000000000 Binary files a/application/client/src/assets/about.gif and /dev/null differ diff --git a/application/client/src/assets/documentation/about.md b/application/client/src/assets/documentation/about.md deleted file mode 100644 index 6535f56a9c..0000000000 --- a/application/client/src/assets/documentation/about.md +++ /dev/null @@ -1,88 +0,0 @@ -## Content -- [Features](./features.md) -- [Search](./search/create.md) -- [Charts](./charts/create.md) -- [Navigation](./navigation/favorites.md) -- [Teamwork](./teamwork/readme.md) -- [About](./about.md) - -## Design & Architecture - -The most important change of Chipmunk 3: all stuff related to IO, calculations, parsing etc has been completely moved to the rust core. - -All functionality is integrated into electron as native modules. This allowed us to cover the major functionality by tests and while at the same time achieving a high and stable performance. - -## Plugins & Contribution - -In Chipmunk 3 we decided to remove the javascript way to add in new functionality. So no classic plugins are supported anymore. -New features that were added in javascript simply did not match our expected performance and scalability goals. -But that doesn't mean that Chipmunk is not extensible. We came up with a new design for our supported parsers and file formats that allows to easyily extend Chipmunk with new parser for the new data types. -It actually became easier to add support for new parsers. Our traits (interfaces) for the parser are clean and minimalistic - no need to research the plugin's API - all you need is to implement the parser's trait and make a pull request. -The integration of new parsers and new sources of data became simpler, even if it isn't based on plugins anymore. - -Take into account that some form of plugins might be back, but only on the front-end layer. - -## Not yet included features - -Considering technical reasons and with generally limited resources, Chipmunk 3 do not yet include the following features: -(but they will be added soon) - -- [x] Charts based on parsed values -- [ ] Time measurement -- [ ] Merging of files by found timestamp -- [ ] DLT log message details -- [x] Setting colors for columns, hide/show columns (related to column based content like DLT) -- [ ] ADB Plugin -- [x] Serial Plugin - -## New features - -### Tail - -Any opened file will be tailed by default. (in the fasion of `tail -f logfile`) - -### Combination sources and parsers - -The design of Chipmunk 3 allows combine parsers and data-sources in all possible ways. e.g. you can read plain-text content from TCP/UDP connection or read DLT logs from it. - -### Supported formats of data & representation of data - -- plain text -- ansi colored text -- DLT logs -- DLT contained in pcapng files (wire shark traces) - -## UI Updates - -### Home screen - -Chipmunk 3 has a home screen. In this area, you can get quick access to favorite actions, files in favorite places, and your recent actions. - -### Recent actions - -Chipmunk 3 saves not only information about recently opened files but about all your recent actions. - -For example, if last time of usage you used a connection to a serial port, you will be able to easily restart the connection just with one click. - -### Filters and searches - -Chipmunk 3 saves recently used filters (searches) and associates them with data sources. It allows you easily restore your collections of filters for example by file types. - -### New shortcuts - -With `Ctrl + P` / `Cmd + P` you can get quick access to any file from your favorite place. All you need - just add your favorite location and Chipmunk will show files from there. - -`Ctrl + Shift + P` / `Cmd + Shift + P` now shows recently opened files AND all recent actions: recently opened files, connections, and streams. - -## Major features - -- read files without limitation of size -- fast search -- support multiple search terms -- concatenation of the same format files into one -- bookmarks -- read DLT traces from files, TCP or UDP -- read DLT traces from PCAPNG files -- listening TCP, UPD, and Serial connections -- capture output of CLI commands -- export data into an original format or text format \ No newline at end of file diff --git a/application/client/src/assets/documentation/charts/charts_dynamic.gif b/application/client/src/assets/documentation/charts/charts_dynamic.gif deleted file mode 100644 index ece91837dc..0000000000 Binary files a/application/client/src/assets/documentation/charts/charts_dynamic.gif and /dev/null differ diff --git a/application/client/src/assets/documentation/charts/charts_filters.gif b/application/client/src/assets/documentation/charts/charts_filters.gif deleted file mode 100644 index e495d22cf6..0000000000 Binary files a/application/client/src/assets/documentation/charts/charts_filters.gif and /dev/null differ diff --git a/application/client/src/assets/documentation/charts/create.md b/application/client/src/assets/documentation/charts/create.md deleted file mode 100644 index cd0853f494..0000000000 --- a/application/client/src/assets/documentation/charts/create.md +++ /dev/null @@ -1,18 +0,0 @@ -## Content -- [Creating](./create.md) -- [Charts in streams](./dynamic.md) -- [Home](../features.md) - -# Creating of filters - -To create a chart: - -- focus in search input -- enter search condition as regex and group with digits value, for example `cpu=(\d{1,})` -- press "Enter" to activate the condition -- click on the chart icon -- switch to the tab "Charts" - -![Creating of charts](./charts_filters.gif) - -In tab "Charts" also renders a frequency of matches for filters \ No newline at end of file diff --git a/application/client/src/assets/documentation/charts/dynamic.md b/application/client/src/assets/documentation/charts/dynamic.md deleted file mode 100644 index 55d2084c09..0000000000 --- a/application/client/src/assets/documentation/charts/dynamic.md +++ /dev/null @@ -1,10 +0,0 @@ -## Content -- [Creating](./create.md) -- [Charts in streams](./dynamic.md) -- [Home](../features.md) - -# Charts in streams - -As soon as the chart has been created, Chipmunk updates values and rebuilds the chart withing new values. - -![Charts in stream](./charts_dynamic.gif) diff --git a/application/client/src/assets/documentation/charts/readme.md b/application/client/src/assets/documentation/charts/readme.md deleted file mode 100644 index 870cc97967..0000000000 --- a/application/client/src/assets/documentation/charts/readme.md +++ /dev/null @@ -1,2 +0,0 @@ -- [Creating](./create.md) -- [Charts in streams](./dynamic.md) diff --git a/application/client/src/assets/documentation/features.md b/application/client/src/assets/documentation/features.md deleted file mode 100644 index e8b2ad8292..0000000000 --- a/application/client/src/assets/documentation/features.md +++ /dev/null @@ -1,38 +0,0 @@ -## Content -- [Features](./features.md) -- [Search](./search/create.md) -- [Charts](./charts/create.md) -- [Navigation](./navigation/favorites.md) -- [Teamwork](./teamwork/readme.md) -- [About](./about.md) - -# Chipmunk - -Logs viewing/analyzing application. Give quick access to logs and search/analyze features. - -## Functionality -- opens any size files -- multiple filters search -- building charts based on numeric values in search results -- mixing search results and content (Breadcrumbs mode) - -## Supported file formats -- text files -- DLT files -- DLD packed in PCAP / PCAPNG -- SomeIP packed in PCAP / PCAPNG - -## Files features -- concatenating files -- appending files to the open session -- tailing an opened file - -## Supported streams -- tracing output of any terminal command -- serial port connection -- DLT on TCP/UDP -- SomeIp on UDP - -## Stream features -- sending data into a serial port -- interacting with running terminal command (writing into `stdin`) diff --git a/application/client/src/assets/documentation/navigation/favorites.md b/application/client/src/assets/documentation/navigation/favorites.md deleted file mode 100644 index ba70296206..0000000000 --- a/application/client/src/assets/documentation/navigation/favorites.md +++ /dev/null @@ -1,12 +0,0 @@ -## Content -- [Favorites](./favorites.md) -- [Recents](./recents.md) -- [Home](../features.md) - -# Favorites - -To have quick access to places, where log files are stored, folder(s) can be added into favorites. On Chipmunk's home screen, all files from the favorites folder(s) will be listed with the possibility to filter them by name. - -![Favorites](./recent_actions_favorities.gif) - -In addition to home screen favorites are also available with `Ctrl + P` (`Command + P`). In this case file(s) from favorite places are mixed with recent actions. \ No newline at end of file diff --git a/application/client/src/assets/documentation/navigation/readme.md b/application/client/src/assets/documentation/navigation/readme.md deleted file mode 100644 index d6e6862dc0..0000000000 --- a/application/client/src/assets/documentation/navigation/readme.md +++ /dev/null @@ -1,2 +0,0 @@ -- [Favorites](./favorites.md) -- [Recents](./recents.md) \ No newline at end of file diff --git a/application/client/src/assets/documentation/navigation/recent_actions_favorities.gif b/application/client/src/assets/documentation/navigation/recent_actions_favorities.gif deleted file mode 100644 index bed4446f76..0000000000 Binary files a/application/client/src/assets/documentation/navigation/recent_actions_favorities.gif and /dev/null differ diff --git a/application/client/src/assets/documentation/navigation/recents.md b/application/client/src/assets/documentation/navigation/recents.md deleted file mode 100644 index f21bde4ce3..0000000000 --- a/application/client/src/assets/documentation/navigation/recents.md +++ /dev/null @@ -1,12 +0,0 @@ -## Content -- [Favorites](./favorites.md) -- [Recents](./recents.md) -- [Home](../features.md) - -# Recent actions - -Chipmunk tracks not only recently opened files but also recently created streams. - -The main list of recent actions is present on Chipmunk's home screen. But it is also available with `Ctrl + P` (`Command + P`). In this case, a recent actions list is mixed with file(s) from favorite places. - -![Favorites](./recent_actions_favorities.gif) \ No newline at end of file diff --git a/application/client/src/assets/documentation/readme.md b/application/client/src/assets/documentation/readme.md deleted file mode 100644 index 10b59f207d..0000000000 --- a/application/client/src/assets/documentation/readme.md +++ /dev/null @@ -1,6 +0,0 @@ -- [Features](./features.md) -- [Search](./search/readme.md) -- [Charts](./charts/readme.md) -- [Navigation](./navigation/readme.md) -- [Teamwork](./teamwork/readme.md) -- [About](./about.md) \ No newline at end of file diff --git a/application/client/src/assets/documentation/search/active.md b/application/client/src/assets/documentation/search/active.md deleted file mode 100644 index 07ea6236bf..0000000000 --- a/application/client/src/assets/documentation/search/active.md +++ /dev/null @@ -1,17 +0,0 @@ -## Content -- [Creating filter(s)](./create.md) -- [Checked / uncheked / disabled](./manipulation.md) -- [Active search](./active.md) -- [Import / Export](./importing.md) -- [Breadcrumbs mode](./breadcrumbs.md) -- [Home](../features.md) - -# Active search condition - -If some value is present in the search input - it's an active search and search results are present *only* for this filter. - -Any saved filter can be quickly converted to active search via: -- context menu "Show matches" -- double-click on the filter in a list - -![Active filter](./filters_show_matches.gif) \ No newline at end of file diff --git a/application/client/src/assets/documentation/search/breadcrumbs.gif b/application/client/src/assets/documentation/search/breadcrumbs.gif deleted file mode 100644 index 723da25767..0000000000 Binary files a/application/client/src/assets/documentation/search/breadcrumbs.gif and /dev/null differ diff --git a/application/client/src/assets/documentation/search/breadcrumbs.md b/application/client/src/assets/documentation/search/breadcrumbs.md deleted file mode 100644 index 8deedaafc2..0000000000 --- a/application/client/src/assets/documentation/search/breadcrumbs.md +++ /dev/null @@ -1,13 +0,0 @@ -## Content -- [Creating filter(s)](./create.md) -- [Checked / uncheked / disabled](./manipulation.md) -- [Active search](./active.md) -- [Import / Export](./importing.md) -- [Breadcrumbs mode](./breadcrumbs.md) -- [Home](../features.md) - -# Breadcrumbs Mode - -Breadcrumbs mode allows mixed search results and other content. It's very useful in cases when it's essential to understand what was logged before/after the target occasion. - -![Breadcrumbs mode](./breadcrumbs.gif) diff --git a/application/client/src/assets/documentation/search/create.md b/application/client/src/assets/documentation/search/create.md deleted file mode 100644 index d48ea2c15b..0000000000 --- a/application/client/src/assets/documentation/search/create.md +++ /dev/null @@ -1,21 +0,0 @@ -## Content -- [Creating filter(s)](./create.md) -- [Checked / uncheked / disabled](./manipulation.md) -- [Active search](./active.md) -- [Import / Export](./importing.md) -- [Breadcrumbs mode](./breadcrumbs.md) -- [Home](../features.md) - -# Creating of filters - -To create a filter: - -- focus in search input -- enter the search condition -- press "Enter" to activate the search -- press "Enter" once again or click on the filter icon - -As a result, the filter will be saved in a list of filters. -Chipmunk supports any number of filters/charts, but the performance of a search depends on the number of filters/charts. - -![Creating of filters](./filters_create.gif) diff --git a/application/client/src/assets/documentation/search/filters_create.gif b/application/client/src/assets/documentation/search/filters_create.gif deleted file mode 100644 index ee83ffe930..0000000000 Binary files a/application/client/src/assets/documentation/search/filters_create.gif and /dev/null differ diff --git a/application/client/src/assets/documentation/search/filters_enable_disable.gif b/application/client/src/assets/documentation/search/filters_enable_disable.gif deleted file mode 100644 index 8aad341bcd..0000000000 Binary files a/application/client/src/assets/documentation/search/filters_enable_disable.gif and /dev/null differ diff --git a/application/client/src/assets/documentation/search/filters_show_matches.gif b/application/client/src/assets/documentation/search/filters_show_matches.gif deleted file mode 100644 index 505afaf3db..0000000000 Binary files a/application/client/src/assets/documentation/search/filters_show_matches.gif and /dev/null differ diff --git a/application/client/src/assets/documentation/search/importing.gif b/application/client/src/assets/documentation/search/importing.gif deleted file mode 100644 index e41dc6babe..0000000000 Binary files a/application/client/src/assets/documentation/search/importing.gif and /dev/null differ diff --git a/application/client/src/assets/documentation/search/importing.md b/application/client/src/assets/documentation/search/importing.md deleted file mode 100644 index 8f67deac49..0000000000 --- a/application/client/src/assets/documentation/search/importing.md +++ /dev/null @@ -1,18 +0,0 @@ -## Content -- [Creating filter(s)](./create.md) -- [Checked / uncheked / disabled](./manipulation.md) -- [Active search](./active.md) -- [Import / Export](./importing.md) -- [Breadcrumbs mode](./breadcrumbs.md) -- [Home](../features.md) - -# Import/export filters - -Filters/charts will be associated with an opened file (or stream). Next time the same file (or stream) is opened, filters/charts will be restored. - -At the same time, there are a couple of ways to export/import filters: - -- via the context menu on the list of filters/charts -- via tab "History/Profiles" to export/import different collections of filters/charts - -![Import/Export](./importing.gif) diff --git a/application/client/src/assets/documentation/search/manipulation.md b/application/client/src/assets/documentation/search/manipulation.md deleted file mode 100644 index 1574bbff48..0000000000 --- a/application/client/src/assets/documentation/search/manipulation.md +++ /dev/null @@ -1,15 +0,0 @@ -## Content -- [Creating filter(s)](./create.md) -- [Checked / uncheked / disabled](./manipulation.md) -- [Active search](./active.md) -- [Import / Export](./importing.md) -- [Breadcrumbs mode](./breadcrumbs.md) -- [Home](../features.md) - -# Checked/Unchecked/Disabled filters - -- *Cheked* filer will be used to make a search and matches will be shown in a search results view. -- *Unchecked* filters will not be used to make a search, but colors still be applied and rows with matches will be highlighted in the main view. -- *Disabled* filter will not be considered in the search and will not be highlighted. Disabling filters are useful to turn off some filter completely but still have a way to quickly restore it - -![Filters manipulation](./filters_enable_disable.gif) diff --git a/application/client/src/assets/documentation/search/readme.md b/application/client/src/assets/documentation/search/readme.md deleted file mode 100644 index 941672cca7..0000000000 --- a/application/client/src/assets/documentation/search/readme.md +++ /dev/null @@ -1,6 +0,0 @@ -- [Creating filter(s)](./create.md) -- [Checked / uncheked / disabled](./manipulation.md) -- [Active search](./active.md) -- [Import / Export](./importing.md) -- [Breadcrumbs mode](./breadcrumbs.md) - diff --git a/application/client/src/assets/documentation/teamwork/add_new_repository.md b/application/client/src/assets/documentation/teamwork/add_new_repository.md deleted file mode 100644 index 9805e5b26a..0000000000 --- a/application/client/src/assets/documentation/teamwork/add_new_repository.md +++ /dev/null @@ -1,25 +0,0 @@ -## Content -- [Before start](./before_start.md) -- [Back](./readme.md) -- [Home](../features.md) - -# Adding GitHub repository -To allow sharing of the session's data should be defined a GitHub repository, which will be used as a storage of a session's data. -- switch to tab "TEAMWORK" on a sidebar; -- press the menu button "..." and select "Add New GitHub Reference" -- define necessary fields and press "Save" - -You can add multiple references to repositories and switch between it during work. - -# GitHub Personal Token -GitHub REST API requires authorization. To use the teamwork feature you should create a personal token. You have two options: -- *Read-only mode*. Personal token without any writing rights. With this type of token, you will be able to pull a session's data from the GitHub repository, but will not be able to change it. -- *Standard*. Personal token with write rights. With this type of token, any change of any session's data (filters, charts, comments, etc) will be synchronized with a GitHub repository and become available for other users. - -Note. Chipmunk uses your GitHub personal token only to communicate with the target repository. In read-only mode, chipmunk makes REST API requests to pull data from a repository. In standard mode, in addition, chipmunk makes commits to the target repository with changes of session's data. - -To create the GitHub personal token: -- open your GitHub page -- go to "Settings" of your account (not the settings of a repository) -- go to section "Developer Settings" (very bottom of left sidebar) -- open the scroll "Personal Access Tokens" and select a type of token, which you would like to create. Chipmunk works with both. \ No newline at end of file diff --git a/application/client/src/assets/documentation/teamwork/readme.md b/application/client/src/assets/documentation/teamwork/readme.md deleted file mode 100644 index 16bde6f036..0000000000 --- a/application/client/src/assets/documentation/teamwork/readme.md +++ /dev/null @@ -1,2 +0,0 @@ -- [Sharing Session's Data](./sharing.md) -- [Adding GitHub Repository](./add_new_repository.md) diff --git a/application/client/src/assets/documentation/teamwork/sharing.md b/application/client/src/assets/documentation/teamwork/sharing.md deleted file mode 100644 index 22b80de541..0000000000 --- a/application/client/src/assets/documentation/teamwork/sharing.md +++ /dev/null @@ -1,38 +0,0 @@ -## Content -- [Adding GitHub Repository](./add_new_repository.md) -- [Back](./readme.md) -- [Home](../features.md) - -# Sharing session data - -With the teamwork feature, you are able to share between multiple users the session's data like: -- filters; -- charts; -- bookmarks; -- comments; - -**Note**. The teamwork feature is available only for files. You cannot share information for any kind of stream (network connections, spawned terminal command, etc). - -# Modes - -The teamwork feature supports two modes: - -- **Read-only mode**. You will be able to pull a session's data from the GitHub repository, but will not be able to change it. - -- **Standard**. With this type of token, any change of any session's data (filters, charts, comments, etc) will be synchronized with a GitHub repository and become available for other users. - -# Data to share - -You can define, which data will be shared and synchronized. For example, you can keep synchronized only comments, but use your local filters/charts and bookmarks. - -To define these rules: -- switch to the tab "TEAMWORK" in the sidebar; -- open a scroll "Sharing Settings"; -- select type of data, which you would like to share - - -# Using GitHub repositories - -To share a session's data chipmunk uses GitHub repositories. With each change of the session's data, chipmunk makes commits with the latest state of the session and this data becomes available for other users, who are also "connected" to the same repository. - - diff --git a/application/client/src/environments/environment.prod.ts b/application/client/src/environments/environment.prod.ts deleted file mode 100644 index 3612073bc3..0000000000 --- a/application/client/src/environments/environment.prod.ts +++ /dev/null @@ -1,3 +0,0 @@ -export const environment = { - production: true -}; diff --git a/application/client/src/environments/environment.ts b/application/client/src/environments/environment.ts deleted file mode 100644 index f56ff47022..0000000000 --- a/application/client/src/environments/environment.ts +++ /dev/null @@ -1,16 +0,0 @@ -// This file can be replaced during build by using the `fileReplacements` array. -// `ng build` replaces `environment.ts` with `environment.prod.ts`. -// The list of file replacements can be found in `angular.json`. - -export const environment = { - production: false -}; - -/* - * For easier debugging in development mode, you can import the following file - * to ignore zone related error stack frames such as `zone.run`, `zoneDelegate.invokeTask`. - * - * This import should be commented out in production mode because it will have a negative impact - * on performance if an error is thrown. - */ -// import 'zone.js/plugins/zone-error'; // Included with Angular CLI. diff --git a/application/client/src/index.html b/application/client/src/index.html deleted file mode 100644 index f88abfbe25..0000000000 --- a/application/client/src/index.html +++ /dev/null @@ -1,12 +0,0 @@ - - - - - Chipmunk - - - - - - - diff --git a/application/client/src/main.ts b/application/client/src/main.ts deleted file mode 100644 index 684fe6b96d..0000000000 --- a/application/client/src/main.ts +++ /dev/null @@ -1,41 +0,0 @@ -import '@loader/init'; -import '@loader/system'; - -import { enableProdMode } from '@angular/core'; -import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; - -import { AppModule } from './app/app.module'; -import { environment } from './environments/environment'; -import { system } from '@platform/modules/system'; - -import * as wasm from '@loader/wasm'; - -if (environment.production) { - enableProdMode(); -} - -class Application { - public run(): void { - wasm.load() - .then(() => { - system - .init() - .then(() => { - platformBrowserDynamic() - .bootstrapModule(AppModule) - .catch((err: Error) => { - console.error(`Fail to bootstrap modules: ${err.message}`); - }); - }) - .catch((err: Error) => { - console.error(`Fail to load system module: ${err.message}`); - }); - }) - .catch((err: Error) => { - console.error(`Fail to load wasm modules: ${err.message}`); - }); - } -} - -const application = new Application(); -application.run(); diff --git a/application/client/src/polyfills.ts b/application/client/src/polyfills.ts deleted file mode 100644 index 429bb9ef2d..0000000000 --- a/application/client/src/polyfills.ts +++ /dev/null @@ -1,53 +0,0 @@ -/** - * This file includes polyfills needed by Angular and is loaded before the app. - * You can add your own extra polyfills to this file. - * - * This file is divided into 2 sections: - * 1. Browser polyfills. These are applied before loading ZoneJS and are sorted by browsers. - * 2. Application imports. Files imported after ZoneJS that should be loaded before your main - * file. - * - * The current setup is for so-called "evergreen" browsers; the last versions of browsers that - * automatically update themselves. This includes recent versions of Safari, Chrome (including - * Opera), Edge on the desktop, and iOS and Chrome on mobile. - * - * Learn more in https://angular.io/guide/browser-support - */ - -/*************************************************************************************************** - * BROWSER POLYFILLS - */ - -/** - * By default, zone.js will patch all possible macroTask and DomEvents - * user can disable parts of macroTask/DomEvents patch by setting following flags - * because those flags need to be set before `zone.js` being loaded, and webpack - * will put import in the top of bundle, so user need to create a separate file - * in this directory (for example: zone-flags.ts), and put the following flags - * into that file, and then add the following code before importing zone.js. - * import './zone-flags'; - * - * The flags allowed in zone-flags.ts are listed here. - * - * The following flags will work for all browsers. - * - * (window as any).__Zone_disable_requestAnimationFrame = true; // disable patch requestAnimationFrame - * (window as any).__Zone_disable_on_property = true; // disable patch onProperty such as onclick - * (window as any).__zone_symbol__UNPATCHED_EVENTS = ['scroll', 'mousemove']; // disable patch specified eventNames - * - * in IE/Edge developer tools, the addEventListener will also be wrapped by zone.js - * with the following flag, it will bypass `zone.js` patch for IE/Edge - * - * (window as any).__Zone_enable_cross_context_check = true; - * - */ - -/*************************************************************************************************** - * Zone JS is required by default for Angular itself. - */ -import 'zone.js'; // Included with Angular CLI. - - -/*************************************************************************************************** - * APPLICATION IMPORTS - */ diff --git a/application/client/src/test.ts b/application/client/src/test.ts deleted file mode 100644 index 51bb0206a2..0000000000 --- a/application/client/src/test.ts +++ /dev/null @@ -1,14 +0,0 @@ -// This file is required by karma.conf.js and loads recursively all the .spec and framework files - -import 'zone.js/testing'; -import { getTestBed } from '@angular/core/testing'; -import { - BrowserDynamicTestingModule, - platformBrowserDynamicTesting -} from '@angular/platform-browser-dynamic/testing'; - -// First, initialize the Angular testing environment. -getTestBed().initTestEnvironment( - BrowserDynamicTestingModule, - platformBrowserDynamicTesting(), -); diff --git a/application/client/tsconfig.app.json b/application/client/tsconfig.app.json deleted file mode 100644 index aafd1a6365..0000000000 --- a/application/client/tsconfig.app.json +++ /dev/null @@ -1,9 +0,0 @@ -/* To learn more about this file see: https://angular.io/config/tsconfig. */ -{ - "extends": "./tsconfig.json", - "compilerOptions": { - "outDir": "./out-tsc/app", - "types": [] - }, - "files": ["src/main.ts", "src/polyfills.ts"] -} diff --git a/application/client/tsconfig.json b/application/client/tsconfig.json deleted file mode 100644 index 955f1a4f28..0000000000 --- a/application/client/tsconfig.json +++ /dev/null @@ -1,51 +0,0 @@ -{ - "compileOnSave": false, - "compilerOptions": { - "baseUrl": "./", - "outDir": "./dist/out-tsc", - "forceConsistentCasingInFileNames": true, - "strict": true, - "noImplicitOverride": true, - "noPropertyAccessFromIndexSignature": true, - "noImplicitReturns": true, - "noFallthroughCasesInSwitch": true, - "sourceMap": true, - "declaration": false, - "downlevelIteration": true, - "experimentalDecorators": true, - "moduleResolution": "node", - "importHelpers": true, - "target": "ESNext", - "module": "CommonJS", - "lib": ["ESNext", "DOM"], - "paths": { - "@platform/*": ["../platform/*"], - "@loader/*": ["src/app/loader/*"], - "@module/*": ["src/app/module/*"], - "@register/*": ["src/app/register/*"], - "@service/*": ["src/app/service/*"], - "@controller/*": ["src/app/controller/*"], - "@schema/*": ["src/app/schema/*"], - "@env/*": ["src/app/env/*"], - "@log/*": ["src/app/env/logs/*"], - "@ui/*": ["src/app/ui/*"], - "@styles/*": ["src/app/ui/styles/*"], - "@directives/*": ["src/app/ui/env/directives/*"], - "@dialogs/*": ["src/app/ui/dialogs/*"], - "@elements/*": ["src/app/ui/elements/*"], - "@layout/*": ["src/app/ui/layout/*"], - "@views/*": ["src/app/ui/views/*"], - "@tabs/*": ["src/app/ui/tabs/*"], - "@statusbar/*": ["src/app/ui/statusbar/*"], - "@sidebar/*": ["src/app/ui/sidebar/*"], - "@wasm/*": ["../apps/rustcore/wasm-bindings/pkg/*"], - "tslib": ["node_modules/tslib"] - } - }, - "angularCompilerOptions": { - "enableI18nLegacyMessageIdFormat": false, - "strictInjectionParameters": true, - "strictInputAccessModifiers": true, - "strictTemplates": true - } -} diff --git a/application/client/tsconfig.spec.json b/application/client/tsconfig.spec.json deleted file mode 100644 index 669344f8d2..0000000000 --- a/application/client/tsconfig.spec.json +++ /dev/null @@ -1,10 +0,0 @@ -/* To learn more about this file see: https://angular.io/config/tsconfig. */ -{ - "extends": "./tsconfig.json", - "compilerOptions": { - "outDir": "./out-tsc/spec", - "types": ["jasmine"] - }, - "files": ["src/test.ts", "src/polyfills.ts"], - "include": ["src/**/*.spec.ts", "src/**/*.d.ts"] -} diff --git a/application/client/yarn.lock b/application/client/yarn.lock deleted file mode 100644 index e993b587fe..0000000000 --- a/application/client/yarn.lock +++ /dev/null @@ -1,10231 +0,0 @@ -# This file is generated by running "yarn install" inside your project. -# Manual changes might be lost - proceed with caution! - -__metadata: - version: 8 - cacheKey: 10c0 - -"@ampproject/remapping@npm:2.3.0, @ampproject/remapping@npm:^2.2.0": - version: 2.3.0 - resolution: "@ampproject/remapping@npm:2.3.0" - dependencies: - "@jridgewell/gen-mapping": "npm:^0.3.5" - "@jridgewell/trace-mapping": "npm:^0.3.24" - checksum: 10c0/81d63cca5443e0f0c72ae18b544cc28c7c0ec2cea46e7cb888bb0e0f411a1191d0d6b7af798d54e30777d8d1488b2ec0732aac2be342d3d7d3ffd271c6f489ed - languageName: node - linkType: hard - -"@angular-devkit/architect@npm:0.1900.7, @angular-devkit/architect@npm:>= 0.1900.0 < 0.2000.0": - version: 0.1900.7 - resolution: "@angular-devkit/architect@npm:0.1900.7" - dependencies: - "@angular-devkit/core": "npm:19.0.7" - rxjs: "npm:7.8.1" - dependenciesMeta: - esbuild: - built: true - puppeteer: - built: true - checksum: 10c0/2f2925ca69e448a076990e4f1415a702d500bc373e5571693298c3cda31e09648f7eb0ab04aa650d2f615fc29a3ea52e2cc9b6d2decb73430dbc1be188563794 - languageName: node - linkType: hard - -"@angular-devkit/build-angular@npm:^19.0.7": - version: 19.0.7 - resolution: "@angular-devkit/build-angular@npm:19.0.7" - dependencies: - "@ampproject/remapping": "npm:2.3.0" - "@angular-devkit/architect": "npm:0.1900.7" - "@angular-devkit/build-webpack": "npm:0.1900.7" - "@angular-devkit/core": "npm:19.0.7" - "@angular/build": "npm:19.0.7" - "@babel/core": "npm:7.26.0" - "@babel/generator": "npm:7.26.2" - "@babel/helper-annotate-as-pure": "npm:7.25.9" - "@babel/helper-split-export-declaration": "npm:7.24.7" - "@babel/plugin-transform-async-generator-functions": "npm:7.25.9" - "@babel/plugin-transform-async-to-generator": "npm:7.25.9" - "@babel/plugin-transform-runtime": "npm:7.25.9" - "@babel/preset-env": "npm:7.26.0" - "@babel/runtime": "npm:7.26.0" - "@discoveryjs/json-ext": "npm:0.6.3" - "@ngtools/webpack": "npm:19.0.7" - "@vitejs/plugin-basic-ssl": "npm:1.1.0" - ansi-colors: "npm:4.1.3" - autoprefixer: "npm:10.4.20" - babel-loader: "npm:9.2.1" - browserslist: "npm:^4.21.5" - copy-webpack-plugin: "npm:12.0.2" - css-loader: "npm:7.1.2" - esbuild: "npm:0.24.0" - esbuild-wasm: "npm:0.24.0" - fast-glob: "npm:3.3.2" - http-proxy-middleware: "npm:3.0.3" - istanbul-lib-instrument: "npm:6.0.3" - jsonc-parser: "npm:3.3.1" - karma-source-map-support: "npm:1.4.0" - less: "npm:4.2.0" - less-loader: "npm:12.2.0" - license-webpack-plugin: "npm:4.0.2" - loader-utils: "npm:3.3.1" - mini-css-extract-plugin: "npm:2.9.2" - open: "npm:10.1.0" - ora: "npm:5.4.1" - picomatch: "npm:4.0.2" - piscina: "npm:4.7.0" - postcss: "npm:8.4.49" - postcss-loader: "npm:8.1.1" - resolve-url-loader: "npm:5.0.0" - rxjs: "npm:7.8.1" - sass: "npm:1.80.7" - sass-loader: "npm:16.0.3" - semver: "npm:7.6.3" - source-map-loader: "npm:5.0.0" - source-map-support: "npm:0.5.21" - terser: "npm:5.36.0" - tree-kill: "npm:1.2.2" - tslib: "npm:2.8.1" - webpack: "npm:5.96.1" - webpack-dev-middleware: "npm:7.4.2" - webpack-dev-server: "npm:5.1.0" - webpack-merge: "npm:6.0.1" - webpack-subresource-integrity: "npm:5.1.0" - peerDependencies: - "@angular/compiler-cli": ^19.0.0 - "@angular/localize": ^19.0.0 - "@angular/platform-server": ^19.0.0 - "@angular/service-worker": ^19.0.0 - "@angular/ssr": ^19.0.7 - "@web/test-runner": ^0.19.0 - browser-sync: ^3.0.2 - jest: ^29.5.0 - jest-environment-jsdom: ^29.5.0 - karma: ^6.3.0 - ng-packagr: ^19.0.0 - protractor: ^7.0.0 - tailwindcss: ^2.0.0 || ^3.0.0 - typescript: ">=5.5 <5.7" - dependenciesMeta: - esbuild: - built: true - optional: true - puppeteer: - built: true - peerDependenciesMeta: - "@angular/localize": - optional: true - "@angular/platform-server": - optional: true - "@angular/service-worker": - optional: true - "@angular/ssr": - optional: true - "@web/test-runner": - optional: true - browser-sync: - optional: true - jest: - optional: true - jest-environment-jsdom: - optional: true - karma: - optional: true - ng-packagr: - optional: true - protractor: - optional: true - tailwindcss: - optional: true - checksum: 10c0/2e00ad7ea8002ab24b9ae90aec94d60662328f43f45fed3e3926ccad89275f5c64ecfc1c0c4558c113c47460eb9ca1c2202d4f9c7d7e624735dbf20eed390b02 - languageName: node - linkType: hard - -"@angular-devkit/build-webpack@npm:0.1900.7": - version: 0.1900.7 - resolution: "@angular-devkit/build-webpack@npm:0.1900.7" - dependencies: - "@angular-devkit/architect": "npm:0.1900.7" - rxjs: "npm:7.8.1" - peerDependencies: - webpack: ^5.30.0 - webpack-dev-server: ^5.0.2 - dependenciesMeta: - esbuild: - built: true - puppeteer: - built: true - checksum: 10c0/48ac063f6ceb3f394e97fe6c945aeb8400a2217e3403ff296b987eb42018dfda9b2ff169632512ff143fe189420805aec8aa6618ad07c5096fcb13740227e44e - languageName: node - linkType: hard - -"@angular-devkit/core@npm:19.0.7, @angular-devkit/core@npm:>= 19.0.0 < 20.0.0": - version: 19.0.7 - resolution: "@angular-devkit/core@npm:19.0.7" - dependencies: - ajv: "npm:8.17.1" - ajv-formats: "npm:3.0.1" - jsonc-parser: "npm:3.3.1" - picomatch: "npm:4.0.2" - rxjs: "npm:7.8.1" - source-map: "npm:0.7.4" - peerDependencies: - chokidar: ^4.0.0 - dependenciesMeta: - esbuild: - built: true - puppeteer: - built: true - peerDependenciesMeta: - chokidar: - optional: true - checksum: 10c0/f35477d774f7e9e9a611d1e8efc7224164f0567ec01eb3ee06ce52e4384a8e5604bba2a47ac4030cbcd6ec4a948d04998f89b23ee9a01bbb61e180848a4e904f - languageName: node - linkType: hard - -"@angular-devkit/schematics@npm:19.0.7, @angular-devkit/schematics@npm:>= 19.0.0 < 20.0.0": - version: 19.0.7 - resolution: "@angular-devkit/schematics@npm:19.0.7" - dependencies: - "@angular-devkit/core": "npm:19.0.7" - jsonc-parser: "npm:3.3.1" - magic-string: "npm:0.30.12" - ora: "npm:5.4.1" - rxjs: "npm:7.8.1" - dependenciesMeta: - esbuild: - built: true - puppeteer: - built: true - checksum: 10c0/b9a6f84d45a8bb69fc12f1f6230d982fc588a60eaade53b8bab3da9377d39e1c80c8d17b54d379cbc9ad87a4a7d778f7245481127c0e1a9690037b56e3b354b4 - languageName: node - linkType: hard - -"@angular-eslint/builder@npm:^19.0.2": - version: 19.0.2 - resolution: "@angular-eslint/builder@npm:19.0.2" - dependencies: - "@angular-devkit/architect": "npm:>= 0.1900.0 < 0.2000.0" - "@angular-devkit/core": "npm:>= 19.0.0 < 20.0.0" - peerDependencies: - eslint: ^8.57.0 || ^9.0.0 - typescript: "*" - checksum: 10c0/42f96a7fbbdbe059fceaf1a17e893b7931604c8d7bbe5bef641f10808c2fbea946c8919fcea83fd4309cb4bcb327f1c5f38160842271cfb58705d9d0e1cb5f44 - languageName: node - linkType: hard - -"@angular-eslint/bundled-angular-compiler@npm:19.0.2": - version: 19.0.2 - resolution: "@angular-eslint/bundled-angular-compiler@npm:19.0.2" - checksum: 10c0/e42bbc4acd14884d6b530fe6b62be4909cd84035c3b955061cc228a67b7d4edb3380bbd4572ceda7612c4f40f6eebbbc6e76e88725f40027278afc5e2ca1165d - languageName: node - linkType: hard - -"@angular-eslint/eslint-plugin-template@npm:19.0.2, @angular-eslint/eslint-plugin-template@npm:^19.0.2": - version: 19.0.2 - resolution: "@angular-eslint/eslint-plugin-template@npm:19.0.2" - dependencies: - "@angular-eslint/bundled-angular-compiler": "npm:19.0.2" - "@angular-eslint/utils": "npm:19.0.2" - aria-query: "npm:5.3.2" - axobject-query: "npm:4.1.0" - peerDependencies: - "@typescript-eslint/types": ^7.11.0 || ^8.0.0 - "@typescript-eslint/utils": ^7.11.0 || ^8.0.0 - eslint: ^8.57.0 || ^9.0.0 - typescript: "*" - checksum: 10c0/54d35c7f83db6ed40c9f51111dda0238ac3aed0c30d4de4f882f0499a16251565005bf15e365bf098fe8c61301dbcca13f3e8d51fbfbbf57d0eaa46b960a80b2 - languageName: node - linkType: hard - -"@angular-eslint/eslint-plugin@npm:19.0.2, @angular-eslint/eslint-plugin@npm:^19.0.2": - version: 19.0.2 - resolution: "@angular-eslint/eslint-plugin@npm:19.0.2" - dependencies: - "@angular-eslint/bundled-angular-compiler": "npm:19.0.2" - "@angular-eslint/utils": "npm:19.0.2" - peerDependencies: - "@typescript-eslint/utils": ^7.11.0 || ^8.0.0 - eslint: ^8.57.0 || ^9.0.0 - typescript: "*" - checksum: 10c0/77ad1662ad020a772faed7518b786c7dc020b812ffb8b13dc18fcf7ff018b7c4716de574cdf1ed7dc1df01bb343be7a85772273b6df03ccc92519b90ab2bde0b - languageName: node - linkType: hard - -"@angular-eslint/schematics@npm:^19.0.2": - version: 19.0.2 - resolution: "@angular-eslint/schematics@npm:19.0.2" - dependencies: - "@angular-devkit/core": "npm:>= 19.0.0 < 20.0.0" - "@angular-devkit/schematics": "npm:>= 19.0.0 < 20.0.0" - "@angular-eslint/eslint-plugin": "npm:19.0.2" - "@angular-eslint/eslint-plugin-template": "npm:19.0.2" - ignore: "npm:6.0.2" - semver: "npm:7.6.3" - strip-json-comments: "npm:3.1.1" - checksum: 10c0/4c1421f9d789bb1ae1893c4891ff81c94e396d51bc95a074e0b85937d6fd7f52f68430aad91897ae5be74bc7deae4d018c6cd9f0f35172c6d5cc461d7320c8ce - languageName: node - linkType: hard - -"@angular-eslint/template-parser@npm:^19.0.2": - version: 19.0.2 - resolution: "@angular-eslint/template-parser@npm:19.0.2" - dependencies: - "@angular-eslint/bundled-angular-compiler": "npm:19.0.2" - eslint-scope: "npm:^8.0.2" - peerDependencies: - eslint: ^8.57.0 || ^9.0.0 - typescript: "*" - checksum: 10c0/96d5b786af03f729910571f4917dcb74d352ff225bf5ec13113834f29198904f7f89d2e49cc337c1753fe0b1575c5936c3c0e541cf09d18d0ed4eb15e7db8b01 - languageName: node - linkType: hard - -"@angular-eslint/utils@npm:19.0.2": - version: 19.0.2 - resolution: "@angular-eslint/utils@npm:19.0.2" - dependencies: - "@angular-eslint/bundled-angular-compiler": "npm:19.0.2" - peerDependencies: - "@typescript-eslint/utils": ^7.11.0 || ^8.0.0 - eslint: ^8.57.0 || ^9.0.0 - typescript: "*" - checksum: 10c0/e1ad0104259bdead95a9923aee831aa2b0d66d8cb4924fb5f8c19f9660ffa79241d93f6bcc4ab75b39682a7895fcd46f172d751230503f0887ea0071f62967fa - languageName: node - linkType: hard - -"@angular/animations@npm:^19.0.6": - version: 19.0.6 - resolution: "@angular/animations@npm:19.0.6" - dependencies: - tslib: "npm:^2.3.0" - peerDependencies: - "@angular/core": 19.0.6 - checksum: 10c0/c74fc4e71381be40ec77605af275c53e777cc9d7fc7f71fe12829b78891fddddcac6d5c4155dbaa7af3b3b384ad21e7b12960f5347bcd20b0d1dffbb23c6cb7f - languageName: node - linkType: hard - -"@angular/build@npm:19.0.7": - version: 19.0.7 - resolution: "@angular/build@npm:19.0.7" - dependencies: - "@ampproject/remapping": "npm:2.3.0" - "@angular-devkit/architect": "npm:0.1900.7" - "@babel/core": "npm:7.26.0" - "@babel/helper-annotate-as-pure": "npm:7.25.9" - "@babel/helper-split-export-declaration": "npm:7.24.7" - "@babel/plugin-syntax-import-attributes": "npm:7.26.0" - "@inquirer/confirm": "npm:5.0.2" - "@vitejs/plugin-basic-ssl": "npm:1.1.0" - beasties: "npm:0.1.0" - browserslist: "npm:^4.23.0" - esbuild: "npm:0.24.0" - fast-glob: "npm:3.3.2" - https-proxy-agent: "npm:7.0.5" - istanbul-lib-instrument: "npm:6.0.3" - listr2: "npm:8.2.5" - lmdb: "npm:3.1.5" - magic-string: "npm:0.30.12" - mrmime: "npm:2.0.0" - parse5-html-rewriting-stream: "npm:7.0.0" - picomatch: "npm:4.0.2" - piscina: "npm:4.7.0" - rollup: "npm:4.26.0" - sass: "npm:1.80.7" - semver: "npm:7.6.3" - vite: "npm:5.4.11" - watchpack: "npm:2.4.2" - peerDependencies: - "@angular/compiler": ^19.0.0 - "@angular/compiler-cli": ^19.0.0 - "@angular/localize": ^19.0.0 - "@angular/platform-server": ^19.0.0 - "@angular/service-worker": ^19.0.0 - "@angular/ssr": ^19.0.7 - less: ^4.2.0 - postcss: ^8.4.0 - tailwindcss: ^2.0.0 || ^3.0.0 - typescript: ">=5.5 <5.7" - dependenciesMeta: - esbuild: - built: true - lmdb: - optional: true - puppeteer: - built: true - peerDependenciesMeta: - "@angular/localize": - optional: true - "@angular/platform-server": - optional: true - "@angular/service-worker": - optional: true - "@angular/ssr": - optional: true - less: - optional: true - postcss: - optional: true - tailwindcss: - optional: true - checksum: 10c0/5ea910992fcd20634e7b44560e321d108ebaabd81372e4448a4800793b7d7d95bb1f118e08bdb9ea3e9442c2c8b8b44a1c4e84d102b2837215b03276098475f7 - languageName: node - linkType: hard - -"@angular/cdk@npm:^19.0.5": - version: 19.0.5 - resolution: "@angular/cdk@npm:19.0.5" - dependencies: - parse5: "npm:^7.1.2" - tslib: "npm:^2.3.0" - peerDependencies: - "@angular/common": ^19.0.0 || ^20.0.0 - "@angular/core": ^19.0.0 || ^20.0.0 - rxjs: ^6.5.3 || ^7.4.0 - dependenciesMeta: - parse5: - optional: true - checksum: 10c0/888f14cc616a1be591208e32ca17431f66c9f5284f97cbc71897fd2374eec15e06b6819e2054992b6d5a1b81cecd53c64424613f93d981df881978814d58c7c9 - languageName: node - linkType: hard - -"@angular/cli@npm:^19.0.7": - version: 19.0.7 - resolution: "@angular/cli@npm:19.0.7" - dependencies: - "@angular-devkit/architect": "npm:0.1900.7" - "@angular-devkit/core": "npm:19.0.7" - "@angular-devkit/schematics": "npm:19.0.7" - "@inquirer/prompts": "npm:7.1.0" - "@listr2/prompt-adapter-inquirer": "npm:2.0.18" - "@schematics/angular": "npm:19.0.7" - "@yarnpkg/lockfile": "npm:1.1.0" - ini: "npm:5.0.0" - jsonc-parser: "npm:3.3.1" - listr2: "npm:8.2.5" - npm-package-arg: "npm:12.0.0" - npm-pick-manifest: "npm:10.0.0" - pacote: "npm:20.0.0" - resolve: "npm:1.22.8" - semver: "npm:7.6.3" - symbol-observable: "npm:4.0.0" - yargs: "npm:17.7.2" - dependenciesMeta: - esbuild: - built: true - puppeteer: - built: true - bin: - ng: bin/ng.js - checksum: 10c0/be05d47a396b8e27f7d9661252299e0b98d6c84453aba003357ccda3003cc95c7f613a72619cf6b1c33f0511ee4d0eecaedee5b6b65a5daf41edbbe4fca40b37 - languageName: node - linkType: hard - -"@angular/common@npm:^19.0.6": - version: 19.0.6 - resolution: "@angular/common@npm:19.0.6" - dependencies: - tslib: "npm:^2.3.0" - peerDependencies: - "@angular/core": 19.0.6 - rxjs: ^6.5.3 || ^7.4.0 - checksum: 10c0/909dcc343f624f4a41c5df66a0e5ec8f67cf2b37bc58ab4c8d0be6270a1cde289888d119a2c5969be31349864ff3aaed2e5791546884f1878ba9221ee4b8c729 - languageName: node - linkType: hard - -"@angular/compiler-cli@npm:^19.0.6": - version: 19.0.6 - resolution: "@angular/compiler-cli@npm:19.0.6" - dependencies: - "@babel/core": "npm:7.26.0" - "@jridgewell/sourcemap-codec": "npm:^1.4.14" - chokidar: "npm:^4.0.0" - convert-source-map: "npm:^1.5.1" - reflect-metadata: "npm:^0.2.0" - semver: "npm:^7.0.0" - tslib: "npm:^2.3.0" - yargs: "npm:^17.2.1" - peerDependencies: - "@angular/compiler": 19.0.6 - typescript: ">=5.5 <5.7" - bin: - ng-xi18n: bundles/src/bin/ng_xi18n.js - ngc: bundles/src/bin/ngc.js - ngcc: bundles/ngcc/index.js - checksum: 10c0/fefb72c85336eb6e3beb6afc67f5e21b30dcd1983487c8c3640fa2355a801cc90f5bc8488131908ab6e53c74646fa95cf85912f936a5757606080e8981a5ca97 - languageName: node - linkType: hard - -"@angular/compiler@npm:^19.0.6": - version: 19.0.6 - resolution: "@angular/compiler@npm:19.0.6" - dependencies: - tslib: "npm:^2.3.0" - peerDependencies: - "@angular/core": 19.0.6 - peerDependenciesMeta: - "@angular/core": - optional: true - checksum: 10c0/78b36ab6a1a95b59a9007eb31c36221be564f37efac0309b8942ae57537823efb7bc0e2933fe07ca14ceb26100d4619a0198f3b250725b18611bf5cff68d93d6 - languageName: node - linkType: hard - -"@angular/core@npm:^19.0.6": - version: 19.0.6 - resolution: "@angular/core@npm:19.0.6" - dependencies: - tslib: "npm:^2.3.0" - peerDependencies: - rxjs: ^6.5.3 || ^7.4.0 - zone.js: ~0.15.0 - checksum: 10c0/e8cdc12e9e9c59e034db73646b25c9ea2c611d0fe6c8bc149bf3bea1b32db0e94782d5ce2e573a5b5ccb2c88c454f0963c3216867e8dcb6d099b7f3bcd56491c - languageName: node - linkType: hard - -"@angular/forms@npm:^19.0.6": - version: 19.0.6 - resolution: "@angular/forms@npm:19.0.6" - dependencies: - tslib: "npm:^2.3.0" - peerDependencies: - "@angular/common": 19.0.6 - "@angular/core": 19.0.6 - "@angular/platform-browser": 19.0.6 - rxjs: ^6.5.3 || ^7.4.0 - checksum: 10c0/2e53029ef9f11c4a6e708152297eacb31a369311157e3f62edd9cc3b500b481bad7eb27dd4f19107f98233b517f5f8277f7b6a453bc47db20f3a79531c53616c - languageName: node - linkType: hard - -"@angular/material@npm:^19.0.5": - version: 19.0.5 - resolution: "@angular/material@npm:19.0.5" - dependencies: - tslib: "npm:^2.3.0" - peerDependencies: - "@angular/animations": ^19.0.0 || ^20.0.0 - "@angular/cdk": 19.0.5 - "@angular/common": ^19.0.0 || ^20.0.0 - "@angular/core": ^19.0.0 || ^20.0.0 - "@angular/forms": ^19.0.0 || ^20.0.0 - "@angular/platform-browser": ^19.0.0 || ^20.0.0 - rxjs: ^6.5.3 || ^7.4.0 - checksum: 10c0/77f5faab26880edcfdca660127dde7103c0f7576d4da163753d7c5f59b4fdbbcc9ee7a89c3564e55c3cc2bfe414b4cfcefe312a96d704b4f3dde66b67c3d726e - languageName: node - linkType: hard - -"@angular/platform-browser-dynamic@npm:^19.0.6": - version: 19.0.6 - resolution: "@angular/platform-browser-dynamic@npm:19.0.6" - dependencies: - tslib: "npm:^2.3.0" - peerDependencies: - "@angular/common": 19.0.6 - "@angular/compiler": 19.0.6 - "@angular/core": 19.0.6 - "@angular/platform-browser": 19.0.6 - checksum: 10c0/7ef0a6cecdc65bb5601223582d0f4d57d1d986d294974a5fd04cdb856937fa109ae6e2a9a38a4c8f337073d924896f571fd091c64cde1227fa1c1fe943f071e2 - languageName: node - linkType: hard - -"@angular/platform-browser@npm:^19.0.6": - version: 19.0.6 - resolution: "@angular/platform-browser@npm:19.0.6" - dependencies: - tslib: "npm:^2.3.0" - peerDependencies: - "@angular/animations": 19.0.6 - "@angular/common": 19.0.6 - "@angular/core": 19.0.6 - peerDependenciesMeta: - "@angular/animations": - optional: true - checksum: 10c0/f3022176ff340138ce67da7723d47758ad6aef56083a16f0e8fb462d87da334090fc31bce31fd3df2078a5af69fae7c351e5f6b6bf319e0680523576ed2c10c2 - languageName: node - linkType: hard - -"@angular/router@npm:^19.0.6": - version: 19.0.6 - resolution: "@angular/router@npm:19.0.6" - dependencies: - tslib: "npm:^2.3.0" - peerDependencies: - "@angular/common": 19.0.6 - "@angular/core": 19.0.6 - "@angular/platform-browser": 19.0.6 - rxjs: ^6.5.3 || ^7.4.0 - checksum: 10c0/16670d34144ca6f07f20e2e3c6312db6b257c4cb9bb8725e34186960ddf24ba840043cebbb771381025e8312e95f1dba9c08637e924a96b451f85c1ccb5fb9b5 - languageName: node - linkType: hard - -"@babel/code-frame@npm:^7.0.0, @babel/code-frame@npm:^7.25.9, @babel/code-frame@npm:^7.26.0, @babel/code-frame@npm:^7.26.2": - version: 7.26.2 - resolution: "@babel/code-frame@npm:7.26.2" - dependencies: - "@babel/helper-validator-identifier": "npm:^7.25.9" - js-tokens: "npm:^4.0.0" - picocolors: "npm:^1.0.0" - checksum: 10c0/7d79621a6849183c415486af99b1a20b84737e8c11cd55b6544f688c51ce1fd710e6d869c3dd21232023da272a79b91efb3e83b5bc2dc65c1187c5fcd1b72ea8 - languageName: node - linkType: hard - -"@babel/compat-data@npm:^7.22.6, @babel/compat-data@npm:^7.25.9, @babel/compat-data@npm:^7.26.0": - version: 7.26.3 - resolution: "@babel/compat-data@npm:7.26.3" - checksum: 10c0/d63e71845c34dfad8d7ff8c15b562e620dbf60e68e3abfa35681d24d612594e8e5ec9790d831a287ecd79ce00f48e7ffddc85c5ce94af7242d45917b9c1a5f90 - languageName: node - linkType: hard - -"@babel/core@npm:7.26.0, @babel/core@npm:^7.23.9": - version: 7.26.0 - resolution: "@babel/core@npm:7.26.0" - dependencies: - "@ampproject/remapping": "npm:^2.2.0" - "@babel/code-frame": "npm:^7.26.0" - "@babel/generator": "npm:^7.26.0" - "@babel/helper-compilation-targets": "npm:^7.25.9" - "@babel/helper-module-transforms": "npm:^7.26.0" - "@babel/helpers": "npm:^7.26.0" - "@babel/parser": "npm:^7.26.0" - "@babel/template": "npm:^7.25.9" - "@babel/traverse": "npm:^7.25.9" - "@babel/types": "npm:^7.26.0" - convert-source-map: "npm:^2.0.0" - debug: "npm:^4.1.0" - gensync: "npm:^1.0.0-beta.2" - json5: "npm:^2.2.3" - semver: "npm:^6.3.1" - checksum: 10c0/91de73a7ff5c4049fbc747930aa039300e4d2670c2a91f5aa622f1b4868600fc89b01b6278385fbcd46f9574186fa3d9b376a9e7538e50f8d118ec13cfbcb63e - languageName: node - linkType: hard - -"@babel/generator@npm:7.26.2": - version: 7.26.2 - resolution: "@babel/generator@npm:7.26.2" - dependencies: - "@babel/parser": "npm:^7.26.2" - "@babel/types": "npm:^7.26.0" - "@jridgewell/gen-mapping": "npm:^0.3.5" - "@jridgewell/trace-mapping": "npm:^0.3.25" - jsesc: "npm:^3.0.2" - checksum: 10c0/167ebce8977142f5012fad6bd91da51ac52bcd752f2261a54b7ab605d928aebe57e21636cdd2a9c7757e552652c68d9fcb5d40b06fcb66e02d9ee7526e118a5c - languageName: node - linkType: hard - -"@babel/generator@npm:^7.26.0, @babel/generator@npm:^7.26.3": - version: 7.26.3 - resolution: "@babel/generator@npm:7.26.3" - dependencies: - "@babel/parser": "npm:^7.26.3" - "@babel/types": "npm:^7.26.3" - "@jridgewell/gen-mapping": "npm:^0.3.5" - "@jridgewell/trace-mapping": "npm:^0.3.25" - jsesc: "npm:^3.0.2" - checksum: 10c0/54f260558e3e4ec8942da3cde607c35349bb983c3a7c5121243f96893fba3e8cd62e1f1773b2051f936f8c8a10987b758d5c7d76dbf2784e95bb63ab4843fa00 - languageName: node - linkType: hard - -"@babel/helper-annotate-as-pure@npm:7.25.9, @babel/helper-annotate-as-pure@npm:^7.25.9": - version: 7.25.9 - resolution: "@babel/helper-annotate-as-pure@npm:7.25.9" - dependencies: - "@babel/types": "npm:^7.25.9" - checksum: 10c0/095b6ba50489d797733abebc4596a81918316a99e3632755c9f02508882912b00c2ae5e468532a25a5c2108d109ddbe9b7da78333ee7cc13817fc50c00cf06fe - languageName: node - linkType: hard - -"@babel/helper-compilation-targets@npm:^7.22.6, @babel/helper-compilation-targets@npm:^7.25.9": - version: 7.25.9 - resolution: "@babel/helper-compilation-targets@npm:7.25.9" - dependencies: - "@babel/compat-data": "npm:^7.25.9" - "@babel/helper-validator-option": "npm:^7.25.9" - browserslist: "npm:^4.24.0" - lru-cache: "npm:^5.1.1" - semver: "npm:^6.3.1" - checksum: 10c0/a6b26a1e4222e69ef8e62ee19374308f060b007828bc11c65025ecc9e814aba21ff2175d6d3f8bf53c863edd728ee8f94ba7870f8f90a37d39552ad9933a8aaa - languageName: node - linkType: hard - -"@babel/helper-create-class-features-plugin@npm:^7.25.9": - version: 7.25.9 - resolution: "@babel/helper-create-class-features-plugin@npm:7.25.9" - dependencies: - "@babel/helper-annotate-as-pure": "npm:^7.25.9" - "@babel/helper-member-expression-to-functions": "npm:^7.25.9" - "@babel/helper-optimise-call-expression": "npm:^7.25.9" - "@babel/helper-replace-supers": "npm:^7.25.9" - "@babel/helper-skip-transparent-expression-wrappers": "npm:^7.25.9" - "@babel/traverse": "npm:^7.25.9" - semver: "npm:^6.3.1" - peerDependencies: - "@babel/core": ^7.0.0 - checksum: 10c0/b2bdd39f38056a76b9ba00ec5b209dd84f5c5ebd998d0f4033cf0e73d5f2c357fbb49d1ce52db77a2709fb29ee22321f84a5734dc9914849bdfee9ad12ce8caf - languageName: node - linkType: hard - -"@babel/helper-create-regexp-features-plugin@npm:^7.18.6, @babel/helper-create-regexp-features-plugin@npm:^7.25.9": - version: 7.26.3 - resolution: "@babel/helper-create-regexp-features-plugin@npm:7.26.3" - dependencies: - "@babel/helper-annotate-as-pure": "npm:^7.25.9" - regexpu-core: "npm:^6.2.0" - semver: "npm:^6.3.1" - peerDependencies: - "@babel/core": ^7.0.0 - checksum: 10c0/266f30b99af621559467ed67634cb653408a9262930c0627c3d17691a9d477329fb4dabe4b1785cbf0490e892513d247836674271842d6a8da49fd0afae7d435 - languageName: node - linkType: hard - -"@babel/helper-define-polyfill-provider@npm:^0.6.2, @babel/helper-define-polyfill-provider@npm:^0.6.3": - version: 0.6.3 - resolution: "@babel/helper-define-polyfill-provider@npm:0.6.3" - dependencies: - "@babel/helper-compilation-targets": "npm:^7.22.6" - "@babel/helper-plugin-utils": "npm:^7.22.5" - debug: "npm:^4.1.1" - lodash.debounce: "npm:^4.0.8" - resolve: "npm:^1.14.2" - peerDependencies: - "@babel/core": ^7.4.0 || ^8.0.0-0 <8.0.0 - checksum: 10c0/4320e3527645e98b6a0d5626fef815680e3b2b03ec36045de5e909b0f01546ab3674e96f50bf3bc8413f8c9037e5ee1a5f560ebdf8210426dad1c2c03c96184a - languageName: node - linkType: hard - -"@babel/helper-member-expression-to-functions@npm:^7.25.9": - version: 7.25.9 - resolution: "@babel/helper-member-expression-to-functions@npm:7.25.9" - dependencies: - "@babel/traverse": "npm:^7.25.9" - "@babel/types": "npm:^7.25.9" - checksum: 10c0/e08c7616f111e1fb56f398365e78858e26e466d4ac46dff25921adc5ccae9b232f66e952a2f4162bbe336627ba336c7fd9eca4835b6548935973d3380d77eaff - languageName: node - linkType: hard - -"@babel/helper-module-imports@npm:^7.25.9": - version: 7.25.9 - resolution: "@babel/helper-module-imports@npm:7.25.9" - dependencies: - "@babel/traverse": "npm:^7.25.9" - "@babel/types": "npm:^7.25.9" - checksum: 10c0/078d3c2b45d1f97ffe6bb47f61961be4785d2342a4156d8b42c92ee4e1b7b9e365655dd6cb25329e8fe1a675c91eeac7e3d04f0c518b67e417e29d6e27b6aa70 - languageName: node - linkType: hard - -"@babel/helper-module-transforms@npm:^7.25.9, @babel/helper-module-transforms@npm:^7.26.0": - version: 7.26.0 - resolution: "@babel/helper-module-transforms@npm:7.26.0" - dependencies: - "@babel/helper-module-imports": "npm:^7.25.9" - "@babel/helper-validator-identifier": "npm:^7.25.9" - "@babel/traverse": "npm:^7.25.9" - peerDependencies: - "@babel/core": ^7.0.0 - checksum: 10c0/ee111b68a5933481d76633dad9cdab30c41df4479f0e5e1cc4756dc9447c1afd2c9473b5ba006362e35b17f4ebddd5fca090233bef8dfc84dca9d9127e56ec3a - languageName: node - linkType: hard - -"@babel/helper-optimise-call-expression@npm:^7.25.9": - version: 7.25.9 - resolution: "@babel/helper-optimise-call-expression@npm:7.25.9" - dependencies: - "@babel/types": "npm:^7.25.9" - checksum: 10c0/90203e6607edeadd2a154940803fd616c0ed92c1013d6774c4b8eb491f1a5a3448b68faae6268141caa5c456e55e3ee49a4ed2bd7ddaf2365daea321c435914c - languageName: node - linkType: hard - -"@babel/helper-plugin-utils@npm:^7.0.0, @babel/helper-plugin-utils@npm:^7.18.6, @babel/helper-plugin-utils@npm:^7.22.5, @babel/helper-plugin-utils@npm:^7.25.9": - version: 7.25.9 - resolution: "@babel/helper-plugin-utils@npm:7.25.9" - checksum: 10c0/483066a1ba36ff16c0116cd24f93de05de746a603a777cd695ac7a1b034928a65a4ecb35f255761ca56626435d7abdb73219eba196f9aa83b6c3c3169325599d - languageName: node - linkType: hard - -"@babel/helper-remap-async-to-generator@npm:^7.25.9": - version: 7.25.9 - resolution: "@babel/helper-remap-async-to-generator@npm:7.25.9" - dependencies: - "@babel/helper-annotate-as-pure": "npm:^7.25.9" - "@babel/helper-wrap-function": "npm:^7.25.9" - "@babel/traverse": "npm:^7.25.9" - peerDependencies: - "@babel/core": ^7.0.0 - checksum: 10c0/6798b562f2788210980f29c5ee96056d90dc73458c88af5bd32f9c82e28e01975588aa2a57bb866c35556bd9b76bac937e824ee63ba472b6430224b91b4879e9 - languageName: node - linkType: hard - -"@babel/helper-replace-supers@npm:^7.25.9": - version: 7.25.9 - resolution: "@babel/helper-replace-supers@npm:7.25.9" - dependencies: - "@babel/helper-member-expression-to-functions": "npm:^7.25.9" - "@babel/helper-optimise-call-expression": "npm:^7.25.9" - "@babel/traverse": "npm:^7.25.9" - peerDependencies: - "@babel/core": ^7.0.0 - checksum: 10c0/0b40d7d2925bd3ba4223b3519e2e4d2456d471ad69aa458f1c1d1783c80b522c61f8237d3a52afc9e47c7174129bbba650df06393a6787d5722f2ec7f223c3f4 - languageName: node - linkType: hard - -"@babel/helper-skip-transparent-expression-wrappers@npm:^7.25.9": - version: 7.25.9 - resolution: "@babel/helper-skip-transparent-expression-wrappers@npm:7.25.9" - dependencies: - "@babel/traverse": "npm:^7.25.9" - "@babel/types": "npm:^7.25.9" - checksum: 10c0/09ace0c6156961624ac9524329ce7f45350bab94bbe24335cbe0da7dfaa1448e658771831983cb83fe91cf6635b15d0a3cab57c03b92657480bfb49fb56dd184 - languageName: node - linkType: hard - -"@babel/helper-split-export-declaration@npm:7.24.7": - version: 7.24.7 - resolution: "@babel/helper-split-export-declaration@npm:7.24.7" - dependencies: - "@babel/types": "npm:^7.24.7" - checksum: 10c0/0254577d7086bf09b01bbde98f731d4fcf4b7c3fa9634fdb87929801307c1f6202a1352e3faa5492450fa8da4420542d44de604daf540704ff349594a78184f6 - languageName: node - linkType: hard - -"@babel/helper-string-parser@npm:^7.25.9": - version: 7.25.9 - resolution: "@babel/helper-string-parser@npm:7.25.9" - checksum: 10c0/7244b45d8e65f6b4338a6a68a8556f2cb161b782343e97281a5f2b9b93e420cad0d9f5773a59d79f61d0c448913d06f6a2358a87f2e203cf112e3c5b53522ee6 - languageName: node - linkType: hard - -"@babel/helper-validator-identifier@npm:^7.25.9": - version: 7.25.9 - resolution: "@babel/helper-validator-identifier@npm:7.25.9" - checksum: 10c0/4fc6f830177b7b7e887ad3277ddb3b91d81e6c4a24151540d9d1023e8dc6b1c0505f0f0628ae653601eb4388a8db45c1c14b2c07a9173837aef7e4116456259d - languageName: node - linkType: hard - -"@babel/helper-validator-option@npm:^7.25.9": - version: 7.25.9 - resolution: "@babel/helper-validator-option@npm:7.25.9" - checksum: 10c0/27fb195d14c7dcb07f14e58fe77c44eea19a6a40a74472ec05c441478fa0bb49fa1c32b2d64be7a38870ee48ef6601bdebe98d512f0253aea0b39756c4014f3e - languageName: node - linkType: hard - -"@babel/helper-wrap-function@npm:^7.25.9": - version: 7.25.9 - resolution: "@babel/helper-wrap-function@npm:7.25.9" - dependencies: - "@babel/template": "npm:^7.25.9" - "@babel/traverse": "npm:^7.25.9" - "@babel/types": "npm:^7.25.9" - checksum: 10c0/b6627d83291e7b80df020f8ee2890c52b8d49272962cac0114ef90f189889c90f1027985873d1b5261a4e986e109b2754292dc112392f0b1fcbfc91cc08bd003 - languageName: node - linkType: hard - -"@babel/helpers@npm:^7.26.0": - version: 7.26.0 - resolution: "@babel/helpers@npm:7.26.0" - dependencies: - "@babel/template": "npm:^7.25.9" - "@babel/types": "npm:^7.26.0" - checksum: 10c0/343333cced6946fe46617690a1d0789346960910225ce359021a88a60a65bc0d791f0c5d240c0ed46cf8cc63b5fd7df52734ff14e43b9c32feae2b61b1647097 - languageName: node - linkType: hard - -"@babel/parser@npm:^7.23.9, @babel/parser@npm:^7.25.9, @babel/parser@npm:^7.26.0, @babel/parser@npm:^7.26.2, @babel/parser@npm:^7.26.3": - version: 7.26.3 - resolution: "@babel/parser@npm:7.26.3" - dependencies: - "@babel/types": "npm:^7.26.3" - bin: - parser: ./bin/babel-parser.js - checksum: 10c0/48f736374e61cfd10ddbf7b80678514ae1f16d0e88bc793d2b505d73d9b987ea786fc8c2f7ee8f8b8c467df062030eb07fd0eb2168f0f541ca1f542775852cad - languageName: node - linkType: hard - -"@babel/plugin-bugfix-firefox-class-in-computed-class-key@npm:^7.25.9": - version: 7.25.9 - resolution: "@babel/plugin-bugfix-firefox-class-in-computed-class-key@npm:7.25.9" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.25.9" - "@babel/traverse": "npm:^7.25.9" - peerDependencies: - "@babel/core": ^7.0.0 - checksum: 10c0/7aab47fcbb8c1ddc195a3cd66609edcad54c5022f018db7de40185f0182950389690e953e952f117a1737b72f665ff02ad30de6c02b49b97f1d8f4ccdffedc34 - languageName: node - linkType: hard - -"@babel/plugin-bugfix-safari-class-field-initializer-scope@npm:^7.25.9": - version: 7.25.9 - resolution: "@babel/plugin-bugfix-safari-class-field-initializer-scope@npm:7.25.9" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.25.9" - peerDependencies: - "@babel/core": ^7.0.0 - checksum: 10c0/3a652b3574ca62775c5f101f8457950edc540c3581226579125da535d67765f41ad7f0e6327f8efeb2540a5dad5bb0c60a89fb934af3f67472e73fb63612d004 - languageName: node - linkType: hard - -"@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@npm:^7.25.9": - version: 7.25.9 - resolution: "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@npm:7.25.9" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.25.9" - peerDependencies: - "@babel/core": ^7.0.0 - checksum: 10c0/18fc9004104a150f9f5da9f3307f361bc3104d16778bb593b7523d5110f04a8df19a2587e6bdd5e726fb1d397191add45223f4f731bb556c33f14f2779d596e8 - languageName: node - linkType: hard - -"@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining@npm:^7.25.9": - version: 7.25.9 - resolution: "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining@npm:7.25.9" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.25.9" - "@babel/helper-skip-transparent-expression-wrappers": "npm:^7.25.9" - "@babel/plugin-transform-optional-chaining": "npm:^7.25.9" - peerDependencies: - "@babel/core": ^7.13.0 - checksum: 10c0/3f6c8781a2f7aa1791a31d2242399ca884df2ab944f90c020b6f112fb19f05fa6dad5be143d274dad1377e40415b63d24d5489faf5060b9c4a99e55d8f0c317c - languageName: node - linkType: hard - -"@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly@npm:^7.25.9": - version: 7.25.9 - resolution: "@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly@npm:7.25.9" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.25.9" - "@babel/traverse": "npm:^7.25.9" - peerDependencies: - "@babel/core": ^7.0.0 - checksum: 10c0/02b365f0cc4df8b8b811c68697c93476da387841e5f153fe42766f34241b685503ea51110d5ed6df7132759820b93e48d9fa3743cffc091eed97c19f7e5fe272 - languageName: node - linkType: hard - -"@babel/plugin-proposal-private-property-in-object@npm:7.21.0-placeholder-for-preset-env.2": - version: 7.21.0-placeholder-for-preset-env.2 - resolution: "@babel/plugin-proposal-private-property-in-object@npm:7.21.0-placeholder-for-preset-env.2" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/e605e0070da087f6c35579499e65801179a521b6842c15181a1e305c04fded2393f11c1efd09b087be7f8b083d1b75e8f3efcbc1292b4f60d3369e14812cff63 - languageName: node - linkType: hard - -"@babel/plugin-syntax-import-assertions@npm:^7.26.0": - version: 7.26.0 - resolution: "@babel/plugin-syntax-import-assertions@npm:7.26.0" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.25.9" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/525b174e60b210d96c1744c1575fc2ddedcc43a479cba64a5344cf77bd0541754fc58120b5a11ff832ba098437bb05aa80900d1f49bb3d888c5e349a4a3a356e - languageName: node - linkType: hard - -"@babel/plugin-syntax-import-attributes@npm:7.26.0, @babel/plugin-syntax-import-attributes@npm:^7.26.0": - version: 7.26.0 - resolution: "@babel/plugin-syntax-import-attributes@npm:7.26.0" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.25.9" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/e594c185b12bfe0bbe7ca78dfeebe870e6d569a12128cac86f3164a075fe0ff70e25ddbd97fd0782906b91f65560c9dc6957716b7b4a68aba2516c9b7455e352 - languageName: node - linkType: hard - -"@babel/plugin-syntax-unicode-sets-regex@npm:^7.18.6": - version: 7.18.6 - resolution: "@babel/plugin-syntax-unicode-sets-regex@npm:7.18.6" - dependencies: - "@babel/helper-create-regexp-features-plugin": "npm:^7.18.6" - "@babel/helper-plugin-utils": "npm:^7.18.6" - peerDependencies: - "@babel/core": ^7.0.0 - checksum: 10c0/9144e5b02a211a4fb9a0ce91063f94fbe1004e80bde3485a0910c9f14897cf83fabd8c21267907cff25db8e224858178df0517f14333cfcf3380ad9a4139cb50 - languageName: node - linkType: hard - -"@babel/plugin-transform-arrow-functions@npm:^7.25.9": - version: 7.25.9 - resolution: "@babel/plugin-transform-arrow-functions@npm:7.25.9" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.25.9" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/851fef9f58be60a80f46cc0ce1e46a6f7346a6f9d50fa9e0fa79d46ec205320069d0cc157db213e2bea88ef5b7d9bd7618bb83f0b1996a836e2426c3a3a1f622 - languageName: node - linkType: hard - -"@babel/plugin-transform-async-generator-functions@npm:7.25.9, @babel/plugin-transform-async-generator-functions@npm:^7.25.9": - version: 7.25.9 - resolution: "@babel/plugin-transform-async-generator-functions@npm:7.25.9" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.25.9" - "@babel/helper-remap-async-to-generator": "npm:^7.25.9" - "@babel/traverse": "npm:^7.25.9" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/e3fcb9fc3d6ab6cbd4fcd956b48c17b5e92fe177553df266ffcd2b2c1f2f758b893e51b638e77ed867941e0436487d2b8b505908d615c41799241699b520dec6 - languageName: node - linkType: hard - -"@babel/plugin-transform-async-to-generator@npm:7.25.9, @babel/plugin-transform-async-to-generator@npm:^7.25.9": - version: 7.25.9 - resolution: "@babel/plugin-transform-async-to-generator@npm:7.25.9" - dependencies: - "@babel/helper-module-imports": "npm:^7.25.9" - "@babel/helper-plugin-utils": "npm:^7.25.9" - "@babel/helper-remap-async-to-generator": "npm:^7.25.9" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/c443d9e462ddef733ae56360064f32fc800105803d892e4ff32d7d6a6922b3765fa97b9ddc9f7f1d3f9d8c2d95721d85bef9dbf507804214c6cf6466b105c168 - languageName: node - linkType: hard - -"@babel/plugin-transform-block-scoped-functions@npm:^7.25.9": - version: 7.25.9 - resolution: "@babel/plugin-transform-block-scoped-functions@npm:7.25.9" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.25.9" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/e92ba0e3d72c038513844d8fca1cc8437dcb35cd42778e97fd03cb8303380b201468611e7ecfdcae3de33473b2679fe2de1552c5f925d112c5693425cf851f10 - languageName: node - linkType: hard - -"@babel/plugin-transform-block-scoping@npm:^7.25.9": - version: 7.25.9 - resolution: "@babel/plugin-transform-block-scoping@npm:7.25.9" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.25.9" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/a76e30becb6c75b4d87a2cd53556fddb7c88ddd56bfadb965287fd944810ac159aa8eb5705366fc37336041f63154ed9fab3862fb10482a45bf5ede63fd55fda - languageName: node - linkType: hard - -"@babel/plugin-transform-class-properties@npm:^7.25.9": - version: 7.25.9 - resolution: "@babel/plugin-transform-class-properties@npm:7.25.9" - dependencies: - "@babel/helper-create-class-features-plugin": "npm:^7.25.9" - "@babel/helper-plugin-utils": "npm:^7.25.9" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/f0603b6bd34d8ba62c03fc0572cb8bbc75874d097ac20cc7c5379e001081210a84dba1749e7123fca43b978382f605bb9973c99caf2c5b4c492d5c0a4a441150 - languageName: node - linkType: hard - -"@babel/plugin-transform-class-static-block@npm:^7.26.0": - version: 7.26.0 - resolution: "@babel/plugin-transform-class-static-block@npm:7.26.0" - dependencies: - "@babel/helper-create-class-features-plugin": "npm:^7.25.9" - "@babel/helper-plugin-utils": "npm:^7.25.9" - peerDependencies: - "@babel/core": ^7.12.0 - checksum: 10c0/cdcf5545ae6514ed75fbd73cccfa209c6a5dfdf0c2bb7bb62c0fb4ec334a32281bcf1bc16ace494d9dbe93feb8bdc0bd3cf9d9ccb6316e634a67056fa13b741b - languageName: node - linkType: hard - -"@babel/plugin-transform-classes@npm:^7.25.9": - version: 7.25.9 - resolution: "@babel/plugin-transform-classes@npm:7.25.9" - dependencies: - "@babel/helper-annotate-as-pure": "npm:^7.25.9" - "@babel/helper-compilation-targets": "npm:^7.25.9" - "@babel/helper-plugin-utils": "npm:^7.25.9" - "@babel/helper-replace-supers": "npm:^7.25.9" - "@babel/traverse": "npm:^7.25.9" - globals: "npm:^11.1.0" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/02742ea7cd25be286c982e672619effca528d7a931626a6f3d6cea11852951b7ee973276127eaf6418ac0e18c4d749a16b520709c707e86a67012bd23ff2927d - languageName: node - linkType: hard - -"@babel/plugin-transform-computed-properties@npm:^7.25.9": - version: 7.25.9 - resolution: "@babel/plugin-transform-computed-properties@npm:7.25.9" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.25.9" - "@babel/template": "npm:^7.25.9" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/948c0ae3ce0ba2375241d122a9bc7cda4a7ac8110bd8a62cd804bc46a5fdb7a7a42c7799c4cd972e14e0a579d2bd0999b92e53177b73f240bb0d4b09972c758b - languageName: node - linkType: hard - -"@babel/plugin-transform-destructuring@npm:^7.25.9": - version: 7.25.9 - resolution: "@babel/plugin-transform-destructuring@npm:7.25.9" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.25.9" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/7beec5fda665d108f69d5023aa7c298a1e566b973dd41290faa18aeea70f6f571295c1ece0a058f3ceb6c6c96de76de7cd34f5a227fbf09a1b8d8a735d28ca49 - languageName: node - linkType: hard - -"@babel/plugin-transform-dotall-regex@npm:^7.25.9": - version: 7.25.9 - resolution: "@babel/plugin-transform-dotall-regex@npm:7.25.9" - dependencies: - "@babel/helper-create-regexp-features-plugin": "npm:^7.25.9" - "@babel/helper-plugin-utils": "npm:^7.25.9" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/7c3471ae5cf7521fd8da5b03e137e8d3733fc5ee4524ce01fb0c812f0bb77cb2c9657bc8a6253186be3a15bb4caa8974993c7ddc067f554ecc6a026f0a3b5e12 - languageName: node - linkType: hard - -"@babel/plugin-transform-duplicate-keys@npm:^7.25.9": - version: 7.25.9 - resolution: "@babel/plugin-transform-duplicate-keys@npm:7.25.9" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.25.9" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/d0c74894b9bf6ff2a04189afffb9cd43d87ebd7b7943e51a827c92d2aaa40fa89ac81565a2fd6fbeabf9e38413a9264c45862eee2b017f1d49046cc3c8ff06b4 - languageName: node - linkType: hard - -"@babel/plugin-transform-duplicate-named-capturing-groups-regex@npm:^7.25.9": - version: 7.25.9 - resolution: "@babel/plugin-transform-duplicate-named-capturing-groups-regex@npm:7.25.9" - dependencies: - "@babel/helper-create-regexp-features-plugin": "npm:^7.25.9" - "@babel/helper-plugin-utils": "npm:^7.25.9" - peerDependencies: - "@babel/core": ^7.0.0 - checksum: 10c0/a8039a6d2b90e011c7b30975edee47b5b1097cf3c2f95ec1f5ddd029898d783a995f55f7d6eb8d6bb8873c060fb64f9f1ccba938dfe22d118d09cf68e0cd3bf6 - languageName: node - linkType: hard - -"@babel/plugin-transform-dynamic-import@npm:^7.25.9": - version: 7.25.9 - resolution: "@babel/plugin-transform-dynamic-import@npm:7.25.9" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.25.9" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/5e643a8209072b668350f5788f23c64e9124f81f958b595c80fecca6561086d8ef346c04391b9e5e4cad8b8cbe22c258f0cd5f4ea89b97e74438e7d1abfd98cf - languageName: node - linkType: hard - -"@babel/plugin-transform-exponentiation-operator@npm:^7.25.9": - version: 7.26.3 - resolution: "@babel/plugin-transform-exponentiation-operator@npm:7.26.3" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.25.9" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/cac922e851c6a0831fdd2e3663564966916015aeff7f4485825fc33879cbc3a313ceb859814c9200248e2875d65bb13802a723e5d7d7b40a2e90da82a5a1e15c - languageName: node - linkType: hard - -"@babel/plugin-transform-export-namespace-from@npm:^7.25.9": - version: 7.25.9 - resolution: "@babel/plugin-transform-export-namespace-from@npm:7.25.9" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.25.9" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/f291ea2ec5f36de9028a00cbd5b32f08af281b8183bf047200ff001f4cb260be56f156b2449f42149448a4a033bd6e86a3a7f06d0c2825532eb0ae6b03058dfb - languageName: node - linkType: hard - -"@babel/plugin-transform-for-of@npm:^7.25.9": - version: 7.25.9 - resolution: "@babel/plugin-transform-for-of@npm:7.25.9" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.25.9" - "@babel/helper-skip-transparent-expression-wrappers": "npm:^7.25.9" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/bf11abc71934a1f369f39cd7a33cf3d4dc5673026a53f70b7c1238c4fcc44e68b3ca1bdbe3db2076f60defb6ffe117cbe10b90f3e1a613b551d88f7c4e693bbe - languageName: node - linkType: hard - -"@babel/plugin-transform-function-name@npm:^7.25.9": - version: 7.25.9 - resolution: "@babel/plugin-transform-function-name@npm:7.25.9" - dependencies: - "@babel/helper-compilation-targets": "npm:^7.25.9" - "@babel/helper-plugin-utils": "npm:^7.25.9" - "@babel/traverse": "npm:^7.25.9" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/8e67fbd1dd367927b8b6afdf0a6e7cb3a3fd70766c52f700ca77428b6d536f6c9d7ec643e7762d64b23093233765c66bffa40e31aabe6492682879bcb45423e1 - languageName: node - linkType: hard - -"@babel/plugin-transform-json-strings@npm:^7.25.9": - version: 7.25.9 - resolution: "@babel/plugin-transform-json-strings@npm:7.25.9" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.25.9" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/00bc2d4751dfc9d44ab725be16ee534de13cfd7e77dfb386e5dac9e48101ce8fcbc5971df919dc25b3f8a0fa85d6dc5f2a0c3cf7ec9d61c163d9823c091844f0 - languageName: node - linkType: hard - -"@babel/plugin-transform-literals@npm:^7.25.9": - version: 7.25.9 - resolution: "@babel/plugin-transform-literals@npm:7.25.9" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.25.9" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/00b14e9c14cf1e871c1f3781bf6334cac339c360404afd6aba63d2f6aca9270854d59a2b40abff1c4c90d4ffdca614440842d3043316c2f0ceb155fdf7726b3b - languageName: node - linkType: hard - -"@babel/plugin-transform-logical-assignment-operators@npm:^7.25.9": - version: 7.25.9 - resolution: "@babel/plugin-transform-logical-assignment-operators@npm:7.25.9" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.25.9" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/6e2051e10b2d6452980fc4bdef9da17c0d6ca48f81b8529e8804b031950e4fff7c74a7eb3de4a2b6ad22ffb631d0b67005425d232cce6e2b29ce861c78ed04f5 - languageName: node - linkType: hard - -"@babel/plugin-transform-member-expression-literals@npm:^7.25.9": - version: 7.25.9 - resolution: "@babel/plugin-transform-member-expression-literals@npm:7.25.9" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.25.9" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/91d17b451bcc5ea9f1c6f8264144057ade3338d4b92c0b248366e4db3a7790a28fd59cc56ac433a9627a9087a17a5684e53f4995dd6ae92831cb72f1bd540b54 - languageName: node - linkType: hard - -"@babel/plugin-transform-modules-amd@npm:^7.25.9": - version: 7.25.9 - resolution: "@babel/plugin-transform-modules-amd@npm:7.25.9" - dependencies: - "@babel/helper-module-transforms": "npm:^7.25.9" - "@babel/helper-plugin-utils": "npm:^7.25.9" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/849957d9484d0a2d93331226ed6cf840cee7d57454549534c447c93f8b839ef8553eae9877f8f550e3c39f14d60992f91244b2e8e7502a46064b56c5d68ba855 - languageName: node - linkType: hard - -"@babel/plugin-transform-modules-commonjs@npm:^7.25.9": - version: 7.26.3 - resolution: "@babel/plugin-transform-modules-commonjs@npm:7.26.3" - dependencies: - "@babel/helper-module-transforms": "npm:^7.26.0" - "@babel/helper-plugin-utils": "npm:^7.25.9" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/82e59708f19f36da29531a64a7a94eabbf6ff46a615e0f5d9b49f3f59e8ef10e2bac607d749091508d3fa655146c9e5647c3ffeca781060cdabedb4c7a33c6f2 - languageName: node - linkType: hard - -"@babel/plugin-transform-modules-systemjs@npm:^7.25.9": - version: 7.25.9 - resolution: "@babel/plugin-transform-modules-systemjs@npm:7.25.9" - dependencies: - "@babel/helper-module-transforms": "npm:^7.25.9" - "@babel/helper-plugin-utils": "npm:^7.25.9" - "@babel/helper-validator-identifier": "npm:^7.25.9" - "@babel/traverse": "npm:^7.25.9" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/8299e3437542129c2684b86f98408c690df27db4122a79edded4782cf04e755d6ecb05b1e812c81a34224a81e664303392d5f3c36f3d2d51fdc99bb91c881e9a - languageName: node - linkType: hard - -"@babel/plugin-transform-modules-umd@npm:^7.25.9": - version: 7.25.9 - resolution: "@babel/plugin-transform-modules-umd@npm:7.25.9" - dependencies: - "@babel/helper-module-transforms": "npm:^7.25.9" - "@babel/helper-plugin-utils": "npm:^7.25.9" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/fa11a621f023e2ac437b71d5582f819e667c94306f022583d77da9a8f772c4128861a32bbb63bef5cba581a70cd7dbe87a37238edaafcfacf889470c395e7076 - languageName: node - linkType: hard - -"@babel/plugin-transform-named-capturing-groups-regex@npm:^7.25.9": - version: 7.25.9 - resolution: "@babel/plugin-transform-named-capturing-groups-regex@npm:7.25.9" - dependencies: - "@babel/helper-create-regexp-features-plugin": "npm:^7.25.9" - "@babel/helper-plugin-utils": "npm:^7.25.9" - peerDependencies: - "@babel/core": ^7.0.0 - checksum: 10c0/32b14fda5c885d1706863f8af2ee6c703d39264355b57482d3a24fce7f6afbd4c7a0896e501c0806ed2b0759beb621bf7f3f7de1fbbc82026039a98d961e78ef - languageName: node - linkType: hard - -"@babel/plugin-transform-new-target@npm:^7.25.9": - version: 7.25.9 - resolution: "@babel/plugin-transform-new-target@npm:7.25.9" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.25.9" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/7b5f1b7998f1cf183a7fa646346e2f3742e5805b609f28ad5fee22d666a15010f3e398b7e1ab78cddb7901841a3d3f47135929af23d54e8bf4ce69b72051f71e - languageName: node - linkType: hard - -"@babel/plugin-transform-nullish-coalescing-operator@npm:^7.25.9": - version: 7.25.9 - resolution: "@babel/plugin-transform-nullish-coalescing-operator@npm:7.25.9" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.25.9" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/eb623db5be078a1c974afe7c7797b0309ba2ea9e9237c0b6831ade0f56d8248bb4ab3432ab34495ff8c877ec2fe412ff779d1e9b3c2b8139da18e1753d950bc3 - languageName: node - linkType: hard - -"@babel/plugin-transform-numeric-separator@npm:^7.25.9": - version: 7.25.9 - resolution: "@babel/plugin-transform-numeric-separator@npm:7.25.9" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.25.9" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/ad63ad341977844b6f9535fcca15ca0d6d6ad112ed9cc509d4f6b75e9bf4b1b1a96a0bcb1986421a601505d34025373608b5f76d420d924b4e21f86b1a1f2749 - languageName: node - linkType: hard - -"@babel/plugin-transform-object-rest-spread@npm:^7.25.9": - version: 7.25.9 - resolution: "@babel/plugin-transform-object-rest-spread@npm:7.25.9" - dependencies: - "@babel/helper-compilation-targets": "npm:^7.25.9" - "@babel/helper-plugin-utils": "npm:^7.25.9" - "@babel/plugin-transform-parameters": "npm:^7.25.9" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/02077d8abd83bf6a48ff0b59e98d7561407cf75b591cffd3fdc5dc5e9a13dec1c847a7a690983762a3afecddb244831e897e0515c293e7c653b262c30cd614af - languageName: node - linkType: hard - -"@babel/plugin-transform-object-super@npm:^7.25.9": - version: 7.25.9 - resolution: "@babel/plugin-transform-object-super@npm:7.25.9" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.25.9" - "@babel/helper-replace-supers": "npm:^7.25.9" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/0348d00e76f1f15ada44481a76e8c923d24cba91f6e49ee9b30d6861eb75344e7f84d62a18df8a6f9e9a7eacf992f388174b7f9cc4ce48287bcefca268c07600 - languageName: node - linkType: hard - -"@babel/plugin-transform-optional-catch-binding@npm:^7.25.9": - version: 7.25.9 - resolution: "@babel/plugin-transform-optional-catch-binding@npm:7.25.9" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.25.9" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/722fd5ee12ab905309d4e84421584fce4b6d9e6b639b06afb20b23fa809e6ab251e908a8d5e8b14d066a28186b8ef8f58d69fd6eca9ce1b9ef7af08333378f6c - languageName: node - linkType: hard - -"@babel/plugin-transform-optional-chaining@npm:^7.25.9": - version: 7.25.9 - resolution: "@babel/plugin-transform-optional-chaining@npm:7.25.9" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.25.9" - "@babel/helper-skip-transparent-expression-wrappers": "npm:^7.25.9" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/041ad2beae5affb8e68a0bcb6882a2dadb758db3c629a0e012f57488ab43a822ac1ea17a29db8ef36560a28262a5dfa4dbbbf06ed6e431db55abe024b7cd3961 - languageName: node - linkType: hard - -"@babel/plugin-transform-parameters@npm:^7.25.9": - version: 7.25.9 - resolution: "@babel/plugin-transform-parameters@npm:7.25.9" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.25.9" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/aecb446754b9e09d6b6fa95fd09e7cf682f8aaeed1d972874ba24c0a30a7e803ad5f014bb1fffc7bfeed22f93c0d200947407894ea59bf7687816f2f464f8df3 - languageName: node - linkType: hard - -"@babel/plugin-transform-private-methods@npm:^7.25.9": - version: 7.25.9 - resolution: "@babel/plugin-transform-private-methods@npm:7.25.9" - dependencies: - "@babel/helper-create-class-features-plugin": "npm:^7.25.9" - "@babel/helper-plugin-utils": "npm:^7.25.9" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/64bd71de93d39daefa3e6c878d6f2fd238ed7d4ecfb13b0e771ddbbc131487def3ceb405b62b534a5cbb5043046b504e1b189b0a45229cc75af979a9fbcaa7bd - languageName: node - linkType: hard - -"@babel/plugin-transform-private-property-in-object@npm:^7.25.9": - version: 7.25.9 - resolution: "@babel/plugin-transform-private-property-in-object@npm:7.25.9" - dependencies: - "@babel/helper-annotate-as-pure": "npm:^7.25.9" - "@babel/helper-create-class-features-plugin": "npm:^7.25.9" - "@babel/helper-plugin-utils": "npm:^7.25.9" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/d4965de19d9f204e692cc74dbc39f0bb469e5f29df96dd4457ea23c5e5596fba9d5af76eaa96f9d48a9fc20ec5f12a94c679285e36b8373406868ea228109e27 - languageName: node - linkType: hard - -"@babel/plugin-transform-property-literals@npm:^7.25.9": - version: 7.25.9 - resolution: "@babel/plugin-transform-property-literals@npm:7.25.9" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.25.9" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/1639e35b2438ccf3107af760d34e6a8e4f9acdd3ae6186ae771a6e3029bd59dfe778e502d67090f1185ecda5c16addfed77561e39c518a3f51ff10d41790e106 - languageName: node - linkType: hard - -"@babel/plugin-transform-regenerator@npm:^7.25.9": - version: 7.25.9 - resolution: "@babel/plugin-transform-regenerator@npm:7.25.9" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.25.9" - regenerator-transform: "npm:^0.15.2" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/eef3ffc19f7d291b863635f32b896ad7f87806d9219a0d3404a470219abcfc5b43aabecd691026c48e875b965760d9c16abee25e6447272233f30cd07f453ec7 - languageName: node - linkType: hard - -"@babel/plugin-transform-regexp-modifiers@npm:^7.26.0": - version: 7.26.0 - resolution: "@babel/plugin-transform-regexp-modifiers@npm:7.26.0" - dependencies: - "@babel/helper-create-regexp-features-plugin": "npm:^7.25.9" - "@babel/helper-plugin-utils": "npm:^7.25.9" - peerDependencies: - "@babel/core": ^7.0.0 - checksum: 10c0/4abc1db6c964efafc7a927cda814c7275275afa4b530483e0936fd614de23cb5802f7ca43edaa402008a723d4e7eac282b6f5283aa2eeb3b27da6d6c1dd7f8ed - languageName: node - linkType: hard - -"@babel/plugin-transform-reserved-words@npm:^7.25.9": - version: 7.25.9 - resolution: "@babel/plugin-transform-reserved-words@npm:7.25.9" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.25.9" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/8b028b80d1983e3e02f74e21924323cc66ba930e5c5758909a122aa7d80e341b8b0f42e1698e42b50d47a6ba911332f584200b28e1a4e2104b7514d9dc011e96 - languageName: node - linkType: hard - -"@babel/plugin-transform-runtime@npm:7.25.9": - version: 7.25.9 - resolution: "@babel/plugin-transform-runtime@npm:7.25.9" - dependencies: - "@babel/helper-module-imports": "npm:^7.25.9" - "@babel/helper-plugin-utils": "npm:^7.25.9" - babel-plugin-polyfill-corejs2: "npm:^0.4.10" - babel-plugin-polyfill-corejs3: "npm:^0.10.6" - babel-plugin-polyfill-regenerator: "npm:^0.6.1" - semver: "npm:^6.3.1" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/888a4998ba0a2313de347954c9a8dfeccbff0633c69d33aee385b8878eba2b429dbfb00c3cc04f6bca454b9be8afa01ebbd73defb7fbbb6e2d3086205c07758b - languageName: node - linkType: hard - -"@babel/plugin-transform-shorthand-properties@npm:^7.25.9": - version: 7.25.9 - resolution: "@babel/plugin-transform-shorthand-properties@npm:7.25.9" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.25.9" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/05a20d45f0fb62567644c507ccd4e379c1a74dacf887d2b2cac70247415e3f6d7d3bf4850c8b336053144715fedb6200fc38f7130c4b76c94eec9b9c0c2a8e9b - languageName: node - linkType: hard - -"@babel/plugin-transform-spread@npm:^7.25.9": - version: 7.25.9 - resolution: "@babel/plugin-transform-spread@npm:7.25.9" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.25.9" - "@babel/helper-skip-transparent-expression-wrappers": "npm:^7.25.9" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/996c8fed238efc30e0664f9f58bd7ec8c148f4659f84425f68923a094fe891245711d26eb10d1f815f50c124434e076e860dbe9662240844d1b77cd09907dcdf - languageName: node - linkType: hard - -"@babel/plugin-transform-sticky-regex@npm:^7.25.9": - version: 7.25.9 - resolution: "@babel/plugin-transform-sticky-regex@npm:7.25.9" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.25.9" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/e9612b0615dab4c4fba1c560769616a9bd7b9226c73191ef84b6c3ee185c8b719b4f887cdd8336a0a13400ce606ab4a0d33bc8fa6b4fcdb53e2896d07f2568f6 - languageName: node - linkType: hard - -"@babel/plugin-transform-template-literals@npm:^7.25.9": - version: 7.25.9 - resolution: "@babel/plugin-transform-template-literals@npm:7.25.9" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.25.9" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/5144da6036807bbd4e9d2a8b92ae67a759543929f34f4db9b463448a77298f4a40bf1e92e582db208fe08ee116224806a3bd0bed75d9da404fc2c0af9e6da540 - languageName: node - linkType: hard - -"@babel/plugin-transform-typeof-symbol@npm:^7.25.9": - version: 7.25.9 - resolution: "@babel/plugin-transform-typeof-symbol@npm:7.25.9" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.25.9" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/2b19fd88608589d9bc6b607ff17b06791d35c67ef3249f4659283454e6a9984241e3bd4c4eb72bb8b3d860a73223f3874558b861adb7314aa317c1c6a2f0cafb - languageName: node - linkType: hard - -"@babel/plugin-transform-unicode-escapes@npm:^7.25.9": - version: 7.25.9 - resolution: "@babel/plugin-transform-unicode-escapes@npm:7.25.9" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.25.9" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/615c84d7c53e1575d54ba9257e753e0b98c5de1e3225237d92f55226eaab8eb5bceb74df43f50f4aa162b0bbcc934ed11feafe2b60b8ec4934ce340fad4b8828 - languageName: node - linkType: hard - -"@babel/plugin-transform-unicode-property-regex@npm:^7.25.9": - version: 7.25.9 - resolution: "@babel/plugin-transform-unicode-property-regex@npm:7.25.9" - dependencies: - "@babel/helper-create-regexp-features-plugin": "npm:^7.25.9" - "@babel/helper-plugin-utils": "npm:^7.25.9" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/1685836fc38af4344c3d2a9edbd46f7c7b28d369b63967d5b83f2f6849ec45b97223461cea3d14cc3f0be6ebb284938e637a5ca3955c0e79c873d62f593d615c - languageName: node - linkType: hard - -"@babel/plugin-transform-unicode-regex@npm:^7.25.9": - version: 7.25.9 - resolution: "@babel/plugin-transform-unicode-regex@npm:7.25.9" - dependencies: - "@babel/helper-create-regexp-features-plugin": "npm:^7.25.9" - "@babel/helper-plugin-utils": "npm:^7.25.9" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/448004f978279e726af26acd54f63f9002c9e2582ecd70d1c5c4436f6de490fcd817afb60016d11c52f5ef17dbaac2590e8cc7bfaf4e91b58c452cf188c7920f - languageName: node - linkType: hard - -"@babel/plugin-transform-unicode-sets-regex@npm:^7.25.9": - version: 7.25.9 - resolution: "@babel/plugin-transform-unicode-sets-regex@npm:7.25.9" - dependencies: - "@babel/helper-create-regexp-features-plugin": "npm:^7.25.9" - "@babel/helper-plugin-utils": "npm:^7.25.9" - peerDependencies: - "@babel/core": ^7.0.0 - checksum: 10c0/56ee04fbe236b77cbcd6035cbf0be7566d1386b8349154ac33244c25f61170c47153a9423cd1d92855f7d6447b53a4a653d9e8fd1eaeeee14feb4b2baf59bd9f - languageName: node - linkType: hard - -"@babel/preset-env@npm:7.26.0": - version: 7.26.0 - resolution: "@babel/preset-env@npm:7.26.0" - dependencies: - "@babel/compat-data": "npm:^7.26.0" - "@babel/helper-compilation-targets": "npm:^7.25.9" - "@babel/helper-plugin-utils": "npm:^7.25.9" - "@babel/helper-validator-option": "npm:^7.25.9" - "@babel/plugin-bugfix-firefox-class-in-computed-class-key": "npm:^7.25.9" - "@babel/plugin-bugfix-safari-class-field-initializer-scope": "npm:^7.25.9" - "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": "npm:^7.25.9" - "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": "npm:^7.25.9" - "@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly": "npm:^7.25.9" - "@babel/plugin-proposal-private-property-in-object": "npm:7.21.0-placeholder-for-preset-env.2" - "@babel/plugin-syntax-import-assertions": "npm:^7.26.0" - "@babel/plugin-syntax-import-attributes": "npm:^7.26.0" - "@babel/plugin-syntax-unicode-sets-regex": "npm:^7.18.6" - "@babel/plugin-transform-arrow-functions": "npm:^7.25.9" - "@babel/plugin-transform-async-generator-functions": "npm:^7.25.9" - "@babel/plugin-transform-async-to-generator": "npm:^7.25.9" - "@babel/plugin-transform-block-scoped-functions": "npm:^7.25.9" - "@babel/plugin-transform-block-scoping": "npm:^7.25.9" - "@babel/plugin-transform-class-properties": "npm:^7.25.9" - "@babel/plugin-transform-class-static-block": "npm:^7.26.0" - "@babel/plugin-transform-classes": "npm:^7.25.9" - "@babel/plugin-transform-computed-properties": "npm:^7.25.9" - "@babel/plugin-transform-destructuring": "npm:^7.25.9" - "@babel/plugin-transform-dotall-regex": "npm:^7.25.9" - "@babel/plugin-transform-duplicate-keys": "npm:^7.25.9" - "@babel/plugin-transform-duplicate-named-capturing-groups-regex": "npm:^7.25.9" - "@babel/plugin-transform-dynamic-import": "npm:^7.25.9" - "@babel/plugin-transform-exponentiation-operator": "npm:^7.25.9" - "@babel/plugin-transform-export-namespace-from": "npm:^7.25.9" - "@babel/plugin-transform-for-of": "npm:^7.25.9" - "@babel/plugin-transform-function-name": "npm:^7.25.9" - "@babel/plugin-transform-json-strings": "npm:^7.25.9" - "@babel/plugin-transform-literals": "npm:^7.25.9" - "@babel/plugin-transform-logical-assignment-operators": "npm:^7.25.9" - "@babel/plugin-transform-member-expression-literals": "npm:^7.25.9" - "@babel/plugin-transform-modules-amd": "npm:^7.25.9" - "@babel/plugin-transform-modules-commonjs": "npm:^7.25.9" - "@babel/plugin-transform-modules-systemjs": "npm:^7.25.9" - "@babel/plugin-transform-modules-umd": "npm:^7.25.9" - "@babel/plugin-transform-named-capturing-groups-regex": "npm:^7.25.9" - "@babel/plugin-transform-new-target": "npm:^7.25.9" - "@babel/plugin-transform-nullish-coalescing-operator": "npm:^7.25.9" - "@babel/plugin-transform-numeric-separator": "npm:^7.25.9" - "@babel/plugin-transform-object-rest-spread": "npm:^7.25.9" - "@babel/plugin-transform-object-super": "npm:^7.25.9" - "@babel/plugin-transform-optional-catch-binding": "npm:^7.25.9" - "@babel/plugin-transform-optional-chaining": "npm:^7.25.9" - "@babel/plugin-transform-parameters": "npm:^7.25.9" - "@babel/plugin-transform-private-methods": "npm:^7.25.9" - "@babel/plugin-transform-private-property-in-object": "npm:^7.25.9" - "@babel/plugin-transform-property-literals": "npm:^7.25.9" - "@babel/plugin-transform-regenerator": "npm:^7.25.9" - "@babel/plugin-transform-regexp-modifiers": "npm:^7.26.0" - "@babel/plugin-transform-reserved-words": "npm:^7.25.9" - "@babel/plugin-transform-shorthand-properties": "npm:^7.25.9" - "@babel/plugin-transform-spread": "npm:^7.25.9" - "@babel/plugin-transform-sticky-regex": "npm:^7.25.9" - "@babel/plugin-transform-template-literals": "npm:^7.25.9" - "@babel/plugin-transform-typeof-symbol": "npm:^7.25.9" - "@babel/plugin-transform-unicode-escapes": "npm:^7.25.9" - "@babel/plugin-transform-unicode-property-regex": "npm:^7.25.9" - "@babel/plugin-transform-unicode-regex": "npm:^7.25.9" - "@babel/plugin-transform-unicode-sets-regex": "npm:^7.25.9" - "@babel/preset-modules": "npm:0.1.6-no-external-plugins" - babel-plugin-polyfill-corejs2: "npm:^0.4.10" - babel-plugin-polyfill-corejs3: "npm:^0.10.6" - babel-plugin-polyfill-regenerator: "npm:^0.6.1" - core-js-compat: "npm:^3.38.1" - semver: "npm:^6.3.1" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 10c0/26e19dc407cfa1c5166be638b4c54239d084fe15d8d7e6306d8c6dc7bc1decc51070a8dcf28352c1a2feeefbe52a06d193a12e302327ad5f529583df75fb7a26 - languageName: node - linkType: hard - -"@babel/preset-modules@npm:0.1.6-no-external-plugins": - version: 0.1.6-no-external-plugins - resolution: "@babel/preset-modules@npm:0.1.6-no-external-plugins" - dependencies: - "@babel/helper-plugin-utils": "npm:^7.0.0" - "@babel/types": "npm:^7.4.4" - esutils: "npm:^2.0.2" - peerDependencies: - "@babel/core": ^7.0.0-0 || ^8.0.0-0 <8.0.0 - checksum: 10c0/9d02f70d7052446c5f3a4fb39e6b632695fb6801e46d31d7f7c5001f7c18d31d1ea8369212331ca7ad4e7877b73231f470b0d559162624128f1b80fe591409e6 - languageName: node - linkType: hard - -"@babel/runtime@npm:7.26.0, @babel/runtime@npm:^7.8.4": - version: 7.26.0 - resolution: "@babel/runtime@npm:7.26.0" - dependencies: - regenerator-runtime: "npm:^0.14.0" - checksum: 10c0/12c01357e0345f89f4f7e8c0e81921f2a3e3e101f06e8eaa18a382b517376520cd2fa8c237726eb094dab25532855df28a7baaf1c26342b52782f6936b07c287 - languageName: node - linkType: hard - -"@babel/template@npm:^7.25.9": - version: 7.25.9 - resolution: "@babel/template@npm:7.25.9" - dependencies: - "@babel/code-frame": "npm:^7.25.9" - "@babel/parser": "npm:^7.25.9" - "@babel/types": "npm:^7.25.9" - checksum: 10c0/ebe677273f96a36c92cc15b7aa7b11cc8bc8a3bb7a01d55b2125baca8f19cae94ff3ce15f1b1880fb8437f3a690d9f89d4e91f16fc1dc4d3eb66226d128983ab - languageName: node - linkType: hard - -"@babel/traverse@npm:^7.25.9": - version: 7.26.4 - resolution: "@babel/traverse@npm:7.26.4" - dependencies: - "@babel/code-frame": "npm:^7.26.2" - "@babel/generator": "npm:^7.26.3" - "@babel/parser": "npm:^7.26.3" - "@babel/template": "npm:^7.25.9" - "@babel/types": "npm:^7.26.3" - debug: "npm:^4.3.1" - globals: "npm:^11.1.0" - checksum: 10c0/cf25d0eda9505daa0f0832ad786b9e28c9d967e823aaf7fbe425250ab198c656085495aa6bed678b27929e095c84eea9fd778b851a31803da94c9bc4bf4eaef7 - languageName: node - linkType: hard - -"@babel/types@npm:^7.24.7, @babel/types@npm:^7.25.9, @babel/types@npm:^7.26.0, @babel/types@npm:^7.26.3, @babel/types@npm:^7.4.4": - version: 7.26.3 - resolution: "@babel/types@npm:7.26.3" - dependencies: - "@babel/helper-string-parser": "npm:^7.25.9" - "@babel/helper-validator-identifier": "npm:^7.25.9" - checksum: 10c0/966c5242c5e55c8704bf7a7418e7be2703a0afa4d19a8480999d5a4ef13d095dd60686615fe5983cb7593b4b06ba3a7de8d6ca501c1d78bdd233a10d90be787b - languageName: node - linkType: hard - -"@discoveryjs/json-ext@npm:0.6.3": - version: 0.6.3 - resolution: "@discoveryjs/json-ext@npm:0.6.3" - checksum: 10c0/778a9f9d5c3696da3c1f9fa4186613db95a1090abbfb6c2601430645c0d0158cd5e4ba4f32c05904e2dd2747d57710f6aab22bd2f8aa3c4e8feab9b247c65d85 - languageName: node - linkType: hard - -"@esbuild/aix-ppc64@npm:0.21.5": - version: 0.21.5 - resolution: "@esbuild/aix-ppc64@npm:0.21.5" - conditions: os=aix & cpu=ppc64 - languageName: node - linkType: hard - -"@esbuild/aix-ppc64@npm:0.24.0": - version: 0.24.0 - resolution: "@esbuild/aix-ppc64@npm:0.24.0" - conditions: os=aix & cpu=ppc64 - languageName: node - linkType: hard - -"@esbuild/android-arm64@npm:0.21.5": - version: 0.21.5 - resolution: "@esbuild/android-arm64@npm:0.21.5" - conditions: os=android & cpu=arm64 - languageName: node - linkType: hard - -"@esbuild/android-arm64@npm:0.24.0": - version: 0.24.0 - resolution: "@esbuild/android-arm64@npm:0.24.0" - conditions: os=android & cpu=arm64 - languageName: node - linkType: hard - -"@esbuild/android-arm@npm:0.21.5": - version: 0.21.5 - resolution: "@esbuild/android-arm@npm:0.21.5" - conditions: os=android & cpu=arm - languageName: node - linkType: hard - -"@esbuild/android-arm@npm:0.24.0": - version: 0.24.0 - resolution: "@esbuild/android-arm@npm:0.24.0" - conditions: os=android & cpu=arm - languageName: node - linkType: hard - -"@esbuild/android-x64@npm:0.21.5": - version: 0.21.5 - resolution: "@esbuild/android-x64@npm:0.21.5" - conditions: os=android & cpu=x64 - languageName: node - linkType: hard - -"@esbuild/android-x64@npm:0.24.0": - version: 0.24.0 - resolution: "@esbuild/android-x64@npm:0.24.0" - conditions: os=android & cpu=x64 - languageName: node - linkType: hard - -"@esbuild/darwin-arm64@npm:0.21.5": - version: 0.21.5 - resolution: "@esbuild/darwin-arm64@npm:0.21.5" - conditions: os=darwin & cpu=arm64 - languageName: node - linkType: hard - -"@esbuild/darwin-arm64@npm:0.24.0": - version: 0.24.0 - resolution: "@esbuild/darwin-arm64@npm:0.24.0" - conditions: os=darwin & cpu=arm64 - languageName: node - linkType: hard - -"@esbuild/darwin-x64@npm:0.21.5": - version: 0.21.5 - resolution: "@esbuild/darwin-x64@npm:0.21.5" - conditions: os=darwin & cpu=x64 - languageName: node - linkType: hard - -"@esbuild/darwin-x64@npm:0.24.0": - version: 0.24.0 - resolution: "@esbuild/darwin-x64@npm:0.24.0" - conditions: os=darwin & cpu=x64 - languageName: node - linkType: hard - -"@esbuild/freebsd-arm64@npm:0.21.5": - version: 0.21.5 - resolution: "@esbuild/freebsd-arm64@npm:0.21.5" - conditions: os=freebsd & cpu=arm64 - languageName: node - linkType: hard - -"@esbuild/freebsd-arm64@npm:0.24.0": - version: 0.24.0 - resolution: "@esbuild/freebsd-arm64@npm:0.24.0" - conditions: os=freebsd & cpu=arm64 - languageName: node - linkType: hard - -"@esbuild/freebsd-x64@npm:0.21.5": - version: 0.21.5 - resolution: "@esbuild/freebsd-x64@npm:0.21.5" - conditions: os=freebsd & cpu=x64 - languageName: node - linkType: hard - -"@esbuild/freebsd-x64@npm:0.24.0": - version: 0.24.0 - resolution: "@esbuild/freebsd-x64@npm:0.24.0" - conditions: os=freebsd & cpu=x64 - languageName: node - linkType: hard - -"@esbuild/linux-arm64@npm:0.21.5": - version: 0.21.5 - resolution: "@esbuild/linux-arm64@npm:0.21.5" - conditions: os=linux & cpu=arm64 - languageName: node - linkType: hard - -"@esbuild/linux-arm64@npm:0.24.0": - version: 0.24.0 - resolution: "@esbuild/linux-arm64@npm:0.24.0" - conditions: os=linux & cpu=arm64 - languageName: node - linkType: hard - -"@esbuild/linux-arm@npm:0.21.5": - version: 0.21.5 - resolution: "@esbuild/linux-arm@npm:0.21.5" - conditions: os=linux & cpu=arm - languageName: node - linkType: hard - -"@esbuild/linux-arm@npm:0.24.0": - version: 0.24.0 - resolution: "@esbuild/linux-arm@npm:0.24.0" - conditions: os=linux & cpu=arm - languageName: node - linkType: hard - -"@esbuild/linux-ia32@npm:0.21.5": - version: 0.21.5 - resolution: "@esbuild/linux-ia32@npm:0.21.5" - conditions: os=linux & cpu=ia32 - languageName: node - linkType: hard - -"@esbuild/linux-ia32@npm:0.24.0": - version: 0.24.0 - resolution: "@esbuild/linux-ia32@npm:0.24.0" - conditions: os=linux & cpu=ia32 - languageName: node - linkType: hard - -"@esbuild/linux-loong64@npm:0.21.5": - version: 0.21.5 - resolution: "@esbuild/linux-loong64@npm:0.21.5" - conditions: os=linux & cpu=loong64 - languageName: node - linkType: hard - -"@esbuild/linux-loong64@npm:0.24.0": - version: 0.24.0 - resolution: "@esbuild/linux-loong64@npm:0.24.0" - conditions: os=linux & cpu=loong64 - languageName: node - linkType: hard - -"@esbuild/linux-mips64el@npm:0.21.5": - version: 0.21.5 - resolution: "@esbuild/linux-mips64el@npm:0.21.5" - conditions: os=linux & cpu=mips64el - languageName: node - linkType: hard - -"@esbuild/linux-mips64el@npm:0.24.0": - version: 0.24.0 - resolution: "@esbuild/linux-mips64el@npm:0.24.0" - conditions: os=linux & cpu=mips64el - languageName: node - linkType: hard - -"@esbuild/linux-ppc64@npm:0.21.5": - version: 0.21.5 - resolution: "@esbuild/linux-ppc64@npm:0.21.5" - conditions: os=linux & cpu=ppc64 - languageName: node - linkType: hard - -"@esbuild/linux-ppc64@npm:0.24.0": - version: 0.24.0 - resolution: "@esbuild/linux-ppc64@npm:0.24.0" - conditions: os=linux & cpu=ppc64 - languageName: node - linkType: hard - -"@esbuild/linux-riscv64@npm:0.21.5": - version: 0.21.5 - resolution: "@esbuild/linux-riscv64@npm:0.21.5" - conditions: os=linux & cpu=riscv64 - languageName: node - linkType: hard - -"@esbuild/linux-riscv64@npm:0.24.0": - version: 0.24.0 - resolution: "@esbuild/linux-riscv64@npm:0.24.0" - conditions: os=linux & cpu=riscv64 - languageName: node - linkType: hard - -"@esbuild/linux-s390x@npm:0.21.5": - version: 0.21.5 - resolution: "@esbuild/linux-s390x@npm:0.21.5" - conditions: os=linux & cpu=s390x - languageName: node - linkType: hard - -"@esbuild/linux-s390x@npm:0.24.0": - version: 0.24.0 - resolution: "@esbuild/linux-s390x@npm:0.24.0" - conditions: os=linux & cpu=s390x - languageName: node - linkType: hard - -"@esbuild/linux-x64@npm:0.21.5": - version: 0.21.5 - resolution: "@esbuild/linux-x64@npm:0.21.5" - conditions: os=linux & cpu=x64 - languageName: node - linkType: hard - -"@esbuild/linux-x64@npm:0.24.0": - version: 0.24.0 - resolution: "@esbuild/linux-x64@npm:0.24.0" - conditions: os=linux & cpu=x64 - languageName: node - linkType: hard - -"@esbuild/netbsd-x64@npm:0.21.5": - version: 0.21.5 - resolution: "@esbuild/netbsd-x64@npm:0.21.5" - conditions: os=netbsd & cpu=x64 - languageName: node - linkType: hard - -"@esbuild/netbsd-x64@npm:0.24.0": - version: 0.24.0 - resolution: "@esbuild/netbsd-x64@npm:0.24.0" - conditions: os=netbsd & cpu=x64 - languageName: node - linkType: hard - -"@esbuild/openbsd-arm64@npm:0.24.0": - version: 0.24.0 - resolution: "@esbuild/openbsd-arm64@npm:0.24.0" - conditions: os=openbsd & cpu=arm64 - languageName: node - linkType: hard - -"@esbuild/openbsd-x64@npm:0.21.5": - version: 0.21.5 - resolution: "@esbuild/openbsd-x64@npm:0.21.5" - conditions: os=openbsd & cpu=x64 - languageName: node - linkType: hard - -"@esbuild/openbsd-x64@npm:0.24.0": - version: 0.24.0 - resolution: "@esbuild/openbsd-x64@npm:0.24.0" - conditions: os=openbsd & cpu=x64 - languageName: node - linkType: hard - -"@esbuild/sunos-x64@npm:0.21.5": - version: 0.21.5 - resolution: "@esbuild/sunos-x64@npm:0.21.5" - conditions: os=sunos & cpu=x64 - languageName: node - linkType: hard - -"@esbuild/sunos-x64@npm:0.24.0": - version: 0.24.0 - resolution: "@esbuild/sunos-x64@npm:0.24.0" - conditions: os=sunos & cpu=x64 - languageName: node - linkType: hard - -"@esbuild/win32-arm64@npm:0.21.5": - version: 0.21.5 - resolution: "@esbuild/win32-arm64@npm:0.21.5" - conditions: os=win32 & cpu=arm64 - languageName: node - linkType: hard - -"@esbuild/win32-arm64@npm:0.24.0": - version: 0.24.0 - resolution: "@esbuild/win32-arm64@npm:0.24.0" - conditions: os=win32 & cpu=arm64 - languageName: node - linkType: hard - -"@esbuild/win32-ia32@npm:0.21.5": - version: 0.21.5 - resolution: "@esbuild/win32-ia32@npm:0.21.5" - conditions: os=win32 & cpu=ia32 - languageName: node - linkType: hard - -"@esbuild/win32-ia32@npm:0.24.0": - version: 0.24.0 - resolution: "@esbuild/win32-ia32@npm:0.24.0" - conditions: os=win32 & cpu=ia32 - languageName: node - linkType: hard - -"@esbuild/win32-x64@npm:0.21.5": - version: 0.21.5 - resolution: "@esbuild/win32-x64@npm:0.21.5" - conditions: os=win32 & cpu=x64 - languageName: node - linkType: hard - -"@esbuild/win32-x64@npm:0.24.0": - version: 0.24.0 - resolution: "@esbuild/win32-x64@npm:0.24.0" - conditions: os=win32 & cpu=x64 - languageName: node - linkType: hard - -"@eslint-community/eslint-utils@npm:^4.2.0, @eslint-community/eslint-utils@npm:^4.4.0": - version: 4.4.1 - resolution: "@eslint-community/eslint-utils@npm:4.4.1" - dependencies: - eslint-visitor-keys: "npm:^3.4.3" - peerDependencies: - eslint: ^6.0.0 || ^7.0.0 || >=8.0.0 - checksum: 10c0/2aa0ac2fc50ff3f234408b10900ed4f1a0b19352f21346ad4cc3d83a1271481bdda11097baa45d484dd564c895e0762a27a8240be7a256b3ad47129e96528252 - languageName: node - linkType: hard - -"@eslint-community/regexpp@npm:^4.10.0, @eslint-community/regexpp@npm:^4.12.1": - version: 4.12.1 - resolution: "@eslint-community/regexpp@npm:4.12.1" - checksum: 10c0/a03d98c246bcb9109aec2c08e4d10c8d010256538dcb3f56610191607214523d4fb1b00aa81df830b6dffb74c5fa0be03642513a289c567949d3e550ca11cdf6 - languageName: node - linkType: hard - -"@eslint/config-array@npm:^0.19.0": - version: 0.19.1 - resolution: "@eslint/config-array@npm:0.19.1" - dependencies: - "@eslint/object-schema": "npm:^2.1.5" - debug: "npm:^4.3.1" - minimatch: "npm:^3.1.2" - checksum: 10c0/43b01f596ddad404473beae5cf95c013d29301c72778d0f5bf8a6699939c8a9a5663dbd723b53c5f476b88b0c694f76ea145d1aa9652230d140fe1161e4a4b49 - languageName: node - linkType: hard - -"@eslint/core@npm:^0.9.0": - version: 0.9.1 - resolution: "@eslint/core@npm:0.9.1" - dependencies: - "@types/json-schema": "npm:^7.0.15" - checksum: 10c0/638104b1b5833a9bbf2329f0c0ddf322e4d6c0410b149477e02cd2b78c04722be90c14b91b8ccdef0d63a2404dff72a17b6b412ce489ea429ae6a8fcb8abff28 - languageName: node - linkType: hard - -"@eslint/eslintrc@npm:^3.2.0": - version: 3.2.0 - resolution: "@eslint/eslintrc@npm:3.2.0" - dependencies: - ajv: "npm:^6.12.4" - debug: "npm:^4.3.2" - espree: "npm:^10.0.1" - globals: "npm:^14.0.0" - ignore: "npm:^5.2.0" - import-fresh: "npm:^3.2.1" - js-yaml: "npm:^4.1.0" - minimatch: "npm:^3.1.2" - strip-json-comments: "npm:^3.1.1" - checksum: 10c0/43867a07ff9884d895d9855edba41acf325ef7664a8df41d957135a81a477ff4df4196f5f74dc3382627e5cc8b7ad6b815c2cea1b58f04a75aced7c43414ab8b - languageName: node - linkType: hard - -"@eslint/js@npm:9.17.0": - version: 9.17.0 - resolution: "@eslint/js@npm:9.17.0" - checksum: 10c0/a0fda8657a01c60aa540f95397754267ba640ffb126e011b97fd65c322a94969d161beeaef57c1441c495da2f31167c34bd38209f7c146c7225072378c3a933d - languageName: node - linkType: hard - -"@eslint/object-schema@npm:^2.1.5": - version: 2.1.5 - resolution: "@eslint/object-schema@npm:2.1.5" - checksum: 10c0/5320691ed41ecd09a55aff40ce8e56596b4eb81f3d4d6fe530c50fdd6552d88102d1c1a29d970ae798ce30849752a708772de38ded07a6f25b3da32ebea081d8 - languageName: node - linkType: hard - -"@eslint/plugin-kit@npm:^0.2.3": - version: 0.2.4 - resolution: "@eslint/plugin-kit@npm:0.2.4" - dependencies: - levn: "npm:^0.4.1" - checksum: 10c0/1bcfc0a30b1df891047c1d8b3707833bded12a057ba01757a2a8591fdc8d8fe0dbb8d51d4b0b61b2af4ca1d363057abd7d2fb4799f1706b105734f4d3fa0dbf1 - languageName: node - linkType: hard - -"@humanfs/core@npm:^0.19.1": - version: 0.19.1 - resolution: "@humanfs/core@npm:0.19.1" - checksum: 10c0/aa4e0152171c07879b458d0e8a704b8c3a89a8c0541726c6b65b81e84fd8b7564b5d6c633feadc6598307d34564bd53294b533491424e8e313d7ab6c7bc5dc67 - languageName: node - linkType: hard - -"@humanfs/node@npm:^0.16.6": - version: 0.16.6 - resolution: "@humanfs/node@npm:0.16.6" - dependencies: - "@humanfs/core": "npm:^0.19.1" - "@humanwhocodes/retry": "npm:^0.3.0" - checksum: 10c0/8356359c9f60108ec204cbd249ecd0356667359b2524886b357617c4a7c3b6aace0fd5a369f63747b926a762a88f8a25bc066fa1778508d110195ce7686243e1 - languageName: node - linkType: hard - -"@humanwhocodes/module-importer@npm:^1.0.1": - version: 1.0.1 - resolution: "@humanwhocodes/module-importer@npm:1.0.1" - checksum: 10c0/909b69c3b86d482c26b3359db16e46a32e0fb30bd306a3c176b8313b9e7313dba0f37f519de6aa8b0a1921349e505f259d19475e123182416a506d7f87e7f529 - languageName: node - linkType: hard - -"@humanwhocodes/retry@npm:^0.3.0": - version: 0.3.1 - resolution: "@humanwhocodes/retry@npm:0.3.1" - checksum: 10c0/f0da1282dfb45e8120480b9e2e275e2ac9bbe1cf016d046fdad8e27cc1285c45bb9e711681237944445157b430093412b4446c1ab3fc4bb037861b5904101d3b - languageName: node - linkType: hard - -"@humanwhocodes/retry@npm:^0.4.1": - version: 0.4.1 - resolution: "@humanwhocodes/retry@npm:0.4.1" - checksum: 10c0/be7bb6841c4c01d0b767d9bb1ec1c9359ee61421ce8ba66c249d035c5acdfd080f32d55a5c9e859cdd7868788b8935774f65b2caf24ec0b7bd7bf333791f063b - languageName: node - linkType: hard - -"@inquirer/checkbox@npm:^4.0.2": - version: 4.0.4 - resolution: "@inquirer/checkbox@npm:4.0.4" - dependencies: - "@inquirer/core": "npm:^10.1.2" - "@inquirer/figures": "npm:^1.0.9" - "@inquirer/type": "npm:^3.0.2" - ansi-escapes: "npm:^4.3.2" - yoctocolors-cjs: "npm:^2.1.2" - peerDependencies: - "@types/node": ">=18" - checksum: 10c0/b88a09769901b4ccad238af7637d19dab956a2f625f9a58756e98a9a7efaeb9ddfa9864c34f964e360812bfc71275d80d063d69b1c57731d65709016a7641317 - languageName: node - linkType: hard - -"@inquirer/confirm@npm:5.0.2": - version: 5.0.2 - resolution: "@inquirer/confirm@npm:5.0.2" - dependencies: - "@inquirer/core": "npm:^10.1.0" - "@inquirer/type": "npm:^3.0.1" - peerDependencies: - "@types/node": ">=18" - checksum: 10c0/c121cfb0557b42dd6570b54dce707a048d85f328481d5230d21fede195902012ede06887aa478875cc83afa064c2e30953eb2cab0744f832195867b418865115 - languageName: node - linkType: hard - -"@inquirer/confirm@npm:^5.0.2": - version: 5.1.1 - resolution: "@inquirer/confirm@npm:5.1.1" - dependencies: - "@inquirer/core": "npm:^10.1.2" - "@inquirer/type": "npm:^3.0.2" - peerDependencies: - "@types/node": ">=18" - checksum: 10c0/acca658c2b0a4546560d4c22e405aa7a94644a1126fd0ca895c7d2d11a3a5c836e85ffb45b7b2f9c955c5c0cc44975dbefa17d66e82de01b545e73d6f8de5c80 - languageName: node - linkType: hard - -"@inquirer/core@npm:^10.1.0, @inquirer/core@npm:^10.1.2": - version: 10.1.2 - resolution: "@inquirer/core@npm:10.1.2" - dependencies: - "@inquirer/figures": "npm:^1.0.9" - "@inquirer/type": "npm:^3.0.2" - ansi-escapes: "npm:^4.3.2" - cli-width: "npm:^4.1.0" - mute-stream: "npm:^2.0.0" - signal-exit: "npm:^4.1.0" - strip-ansi: "npm:^6.0.1" - wrap-ansi: "npm:^6.2.0" - yoctocolors-cjs: "npm:^2.1.2" - checksum: 10c0/95eeb5955a85026ae947d52d5c9b3c116954567fd7b989fad76e8908aca836eb63a3ce463e12690a05fb467d60dec732f831ba19493bc80cb0ab3a55990567a5 - languageName: node - linkType: hard - -"@inquirer/editor@npm:^4.1.0": - version: 4.2.1 - resolution: "@inquirer/editor@npm:4.2.1" - dependencies: - "@inquirer/core": "npm:^10.1.2" - "@inquirer/type": "npm:^3.0.2" - external-editor: "npm:^3.1.0" - peerDependencies: - "@types/node": ">=18" - checksum: 10c0/b8a85c139537ecebe6120588b2e9faa3ca27beeeed593187264e9c2b62df652e02cd661bd9cb8815478416a65ff8ceaf0a6607c852ec5f1a1c59327ecae831e8 - languageName: node - linkType: hard - -"@inquirer/expand@npm:^4.0.2": - version: 4.0.4 - resolution: "@inquirer/expand@npm:4.0.4" - dependencies: - "@inquirer/core": "npm:^10.1.2" - "@inquirer/type": "npm:^3.0.2" - yoctocolors-cjs: "npm:^2.1.2" - peerDependencies: - "@types/node": ">=18" - checksum: 10c0/364802c6ce4691b663333d73cfdd22b16925055b7d355137023f781cc5b16ebd8f0d24f79785e5fd9c17f850369d0e39c4e031d69ffaab885fcdff62886e78bf - languageName: node - linkType: hard - -"@inquirer/figures@npm:^1.0.9": - version: 1.0.9 - resolution: "@inquirer/figures@npm:1.0.9" - checksum: 10c0/21e1a7c902b2b77f126617b501e0fe0d703fae680a9df472afdae18a3e079756aee85690cef595a14e91d18630118f4a3893aab6832b9232fefc6ab31c804a68 - languageName: node - linkType: hard - -"@inquirer/input@npm:^4.0.2": - version: 4.1.1 - resolution: "@inquirer/input@npm:4.1.1" - dependencies: - "@inquirer/core": "npm:^10.1.2" - "@inquirer/type": "npm:^3.0.2" - peerDependencies: - "@types/node": ">=18" - checksum: 10c0/8e574f4de2d5c28cb71a24ac338df3d89762fada1e6f71b2f34ee6e3861ec571aee0b2ee77b88059cbebc7cbcfbfc0492e663ae87ab61b4e5c5538a6997ad17e - languageName: node - linkType: hard - -"@inquirer/number@npm:^3.0.2": - version: 3.0.4 - resolution: "@inquirer/number@npm:3.0.4" - dependencies: - "@inquirer/core": "npm:^10.1.2" - "@inquirer/type": "npm:^3.0.2" - peerDependencies: - "@types/node": ">=18" - checksum: 10c0/76c1e13af59620f8105efdadf30061caa7448c74c1c2de9ee04dbd78f831f09d9ca5463a2433071c131d0a0a7d12418b180e6a24653d2b34f4dbf8add2b60dfa - languageName: node - linkType: hard - -"@inquirer/password@npm:^4.0.2": - version: 4.0.4 - resolution: "@inquirer/password@npm:4.0.4" - dependencies: - "@inquirer/core": "npm:^10.1.2" - "@inquirer/type": "npm:^3.0.2" - ansi-escapes: "npm:^4.3.2" - peerDependencies: - "@types/node": ">=18" - checksum: 10c0/ab7b28b7e424fa56b6c0da49231ac59a9a348fcd6492add27b7aac2f018a8ef3fafb054368efe49476d60b44a723188513328bcda66c8ebe59cb57e2d95eb89b - languageName: node - linkType: hard - -"@inquirer/prompts@npm:7.1.0": - version: 7.1.0 - resolution: "@inquirer/prompts@npm:7.1.0" - dependencies: - "@inquirer/checkbox": "npm:^4.0.2" - "@inquirer/confirm": "npm:^5.0.2" - "@inquirer/editor": "npm:^4.1.0" - "@inquirer/expand": "npm:^4.0.2" - "@inquirer/input": "npm:^4.0.2" - "@inquirer/number": "npm:^3.0.2" - "@inquirer/password": "npm:^4.0.2" - "@inquirer/rawlist": "npm:^4.0.2" - "@inquirer/search": "npm:^3.0.2" - "@inquirer/select": "npm:^4.0.2" - peerDependencies: - "@types/node": ">=18" - checksum: 10c0/e6ed9c3eac059f5de6e233872d8e15f6ddc27e461be119ac1494c6ab74fd583b0cde00554be2be00601df8f9b6df6cd20876772a8148dd4bc5f1f5015e1d5549 - languageName: node - linkType: hard - -"@inquirer/rawlist@npm:^4.0.2": - version: 4.0.4 - resolution: "@inquirer/rawlist@npm:4.0.4" - dependencies: - "@inquirer/core": "npm:^10.1.2" - "@inquirer/type": "npm:^3.0.2" - yoctocolors-cjs: "npm:^2.1.2" - peerDependencies: - "@types/node": ">=18" - checksum: 10c0/92eff5e59508bac677eda479b3324dbb7cb512540ca5b76bd1ad309316a6f68d21ce98e6485ba4deb503764dfa6eb2742bdd64e23391bd8f8e06073e6d527510 - languageName: node - linkType: hard - -"@inquirer/search@npm:^3.0.2": - version: 3.0.4 - resolution: "@inquirer/search@npm:3.0.4" - dependencies: - "@inquirer/core": "npm:^10.1.2" - "@inquirer/figures": "npm:^1.0.9" - "@inquirer/type": "npm:^3.0.2" - yoctocolors-cjs: "npm:^2.1.2" - peerDependencies: - "@types/node": ">=18" - checksum: 10c0/15a91edf12f966bc269838fd4b037aed4b5164b7bf2eb814cab6ddeb18a9937746bbd44cda6dfb59408e5d9ae41286952150f2e134af08b2892ceaacac2591a7 - languageName: node - linkType: hard - -"@inquirer/select@npm:^4.0.2": - version: 4.0.4 - resolution: "@inquirer/select@npm:4.0.4" - dependencies: - "@inquirer/core": "npm:^10.1.2" - "@inquirer/figures": "npm:^1.0.9" - "@inquirer/type": "npm:^3.0.2" - ansi-escapes: "npm:^4.3.2" - yoctocolors-cjs: "npm:^2.1.2" - peerDependencies: - "@types/node": ">=18" - checksum: 10c0/c77ef1292483e4f2f3239b87c50177608e0a62895a37598ba37d48e1a3e544459d31687e6b8f2383b263a42a9f437b8a056da2f170352fc67541a40ff9282265 - languageName: node - linkType: hard - -"@inquirer/type@npm:^1.5.5": - version: 1.5.5 - resolution: "@inquirer/type@npm:1.5.5" - dependencies: - mute-stream: "npm:^1.0.0" - checksum: 10c0/4c41736c09ba9426b5a9e44993bdd54e8f532e791518802e33866f233a2a6126a25c1c82c19d1abbf1df627e57b1b957dd3f8318ea96073d8bfc32193943bcb3 - languageName: node - linkType: hard - -"@inquirer/type@npm:^3.0.1, @inquirer/type@npm:^3.0.2": - version: 3.0.2 - resolution: "@inquirer/type@npm:3.0.2" - peerDependencies: - "@types/node": ">=18" - checksum: 10c0/fe348db2977fff92cad0ade05b36ec40714326fccd4a174be31663f8923729b4276f1736d892a449627d7fb03235ff44e8aac5aa72b09036d993593b813ef313 - languageName: node - linkType: hard - -"@isaacs/cliui@npm:^8.0.2": - version: 8.0.2 - resolution: "@isaacs/cliui@npm:8.0.2" - dependencies: - string-width: "npm:^5.1.2" - string-width-cjs: "npm:string-width@^4.2.0" - strip-ansi: "npm:^7.0.1" - strip-ansi-cjs: "npm:strip-ansi@^6.0.1" - wrap-ansi: "npm:^8.1.0" - wrap-ansi-cjs: "npm:wrap-ansi@^7.0.0" - checksum: 10c0/b1bf42535d49f11dc137f18d5e4e63a28c5569de438a221c369483731e9dac9fb797af554e8bf02b6192d1e5eba6e6402cf93900c3d0ac86391d00d04876789e - languageName: node - linkType: hard - -"@isaacs/fs-minipass@npm:^4.0.0": - version: 4.0.1 - resolution: "@isaacs/fs-minipass@npm:4.0.1" - dependencies: - minipass: "npm:^7.0.4" - checksum: 10c0/c25b6dc1598790d5b55c0947a9b7d111cfa92594db5296c3b907e2f533c033666f692a3939eadac17b1c7c40d362d0b0635dc874cbfe3e70db7c2b07cc97a5d2 - languageName: node - linkType: hard - -"@istanbuljs/schema@npm:^0.1.3": - version: 0.1.3 - resolution: "@istanbuljs/schema@npm:0.1.3" - checksum: 10c0/61c5286771676c9ca3eb2bd8a7310a9c063fb6e0e9712225c8471c582d157392c88f5353581c8c9adbe0dff98892317d2fdfc56c3499aa42e0194405206a963a - languageName: node - linkType: hard - -"@jridgewell/gen-mapping@npm:^0.3.5": - version: 0.3.8 - resolution: "@jridgewell/gen-mapping@npm:0.3.8" - dependencies: - "@jridgewell/set-array": "npm:^1.2.1" - "@jridgewell/sourcemap-codec": "npm:^1.4.10" - "@jridgewell/trace-mapping": "npm:^0.3.24" - checksum: 10c0/c668feaf86c501d7c804904a61c23c67447b2137b813b9ce03eca82cb9d65ac7006d766c218685d76e3d72828279b6ee26c347aa1119dab23fbaf36aed51585a - languageName: node - linkType: hard - -"@jridgewell/resolve-uri@npm:^3.1.0": - version: 3.1.2 - resolution: "@jridgewell/resolve-uri@npm:3.1.2" - checksum: 10c0/d502e6fb516b35032331406d4e962c21fe77cdf1cbdb49c6142bcbd9e30507094b18972778a6e27cbad756209cfe34b1a27729e6fa08a2eb92b33943f680cf1e - languageName: node - linkType: hard - -"@jridgewell/set-array@npm:^1.2.1": - version: 1.2.1 - resolution: "@jridgewell/set-array@npm:1.2.1" - checksum: 10c0/2a5aa7b4b5c3464c895c802d8ae3f3d2b92fcbe84ad12f8d0bfbb1f5ad006717e7577ee1fd2eac00c088abe486c7adb27976f45d2941ff6b0b92b2c3302c60f4 - languageName: node - linkType: hard - -"@jridgewell/source-map@npm:^0.3.3": - version: 0.3.6 - resolution: "@jridgewell/source-map@npm:0.3.6" - dependencies: - "@jridgewell/gen-mapping": "npm:^0.3.5" - "@jridgewell/trace-mapping": "npm:^0.3.25" - checksum: 10c0/6a4ecc713ed246ff8e5bdcc1ef7c49aaa93f7463d948ba5054dda18b02dcc6a055e2828c577bcceee058f302ce1fc95595713d44f5c45e43d459f88d267f2f04 - languageName: node - linkType: hard - -"@jridgewell/sourcemap-codec@npm:^1.4.10, @jridgewell/sourcemap-codec@npm:^1.4.14, @jridgewell/sourcemap-codec@npm:^1.5.0": - version: 1.5.0 - resolution: "@jridgewell/sourcemap-codec@npm:1.5.0" - checksum: 10c0/2eb864f276eb1096c3c11da3e9bb518f6d9fc0023c78344cdc037abadc725172c70314bdb360f2d4b7bffec7f5d657ce006816bc5d4ecb35e61b66132db00c18 - languageName: node - linkType: hard - -"@jridgewell/trace-mapping@npm:^0.3.24, @jridgewell/trace-mapping@npm:^0.3.25": - version: 0.3.25 - resolution: "@jridgewell/trace-mapping@npm:0.3.25" - dependencies: - "@jridgewell/resolve-uri": "npm:^3.1.0" - "@jridgewell/sourcemap-codec": "npm:^1.4.14" - checksum: 10c0/3d1ce6ebc69df9682a5a8896b414c6537e428a1d68b02fcc8363b04284a8ca0df04d0ee3013132252ab14f2527bc13bea6526a912ecb5658f0e39fd2860b4df4 - languageName: node - linkType: hard - -"@jsonjoy.com/base64@npm:^1.1.1": - version: 1.1.2 - resolution: "@jsonjoy.com/base64@npm:1.1.2" - peerDependencies: - tslib: 2 - checksum: 10c0/88717945f66dc89bf58ce75624c99fe6a5c9a0c8614e26d03e406447b28abff80c69fb37dabe5aafef1862cf315071ae66e5c85f6018b437d95f8d13d235e6eb - languageName: node - linkType: hard - -"@jsonjoy.com/json-pack@npm:^1.0.3": - version: 1.1.1 - resolution: "@jsonjoy.com/json-pack@npm:1.1.1" - dependencies: - "@jsonjoy.com/base64": "npm:^1.1.1" - "@jsonjoy.com/util": "npm:^1.1.2" - hyperdyperid: "npm:^1.2.0" - thingies: "npm:^1.20.0" - peerDependencies: - tslib: 2 - checksum: 10c0/fd0d8baa0c8eba536924540717901e0d7eed742576991033cceeb32dcce801ee0a4318cf6eb40b444c9e78f69ddbd4f38b9eb0041e9e54c17e7b6d1219b12e1d - languageName: node - linkType: hard - -"@jsonjoy.com/util@npm:^1.1.2, @jsonjoy.com/util@npm:^1.3.0": - version: 1.5.0 - resolution: "@jsonjoy.com/util@npm:1.5.0" - peerDependencies: - tslib: 2 - checksum: 10c0/0065ae12c4108d8aede01a479c8d2b5a39bce99e9a449d235befc753f57e8385d9c1115720529f26597840b7398d512898155423d9859fd638319fb0c827365d - languageName: node - linkType: hard - -"@leichtgewicht/ip-codec@npm:^2.0.1": - version: 2.0.5 - resolution: "@leichtgewicht/ip-codec@npm:2.0.5" - checksum: 10c0/14a0112bd59615eef9e3446fea018045720cd3da85a98f801a685a818b0d96ef2a1f7227e8d271def546b2e2a0fe91ef915ba9dc912ab7967d2317b1a051d66b - languageName: node - linkType: hard - -"@listr2/prompt-adapter-inquirer@npm:2.0.18": - version: 2.0.18 - resolution: "@listr2/prompt-adapter-inquirer@npm:2.0.18" - dependencies: - "@inquirer/type": "npm:^1.5.5" - peerDependencies: - "@inquirer/prompts": ">= 3 < 8" - checksum: 10c0/580d2f0ae414cf3090c2fbfe4623649e448d930b3ff24b0211e64e0e037f1a3ffff5307bc36c10cdc0c4a35fc12f04190585e864c4ce05fbf5f062b41ff29e40 - languageName: node - linkType: hard - -"@lmdb/lmdb-darwin-arm64@npm:3.1.5": - version: 3.1.5 - resolution: "@lmdb/lmdb-darwin-arm64@npm:3.1.5" - conditions: os=darwin & cpu=arm64 - languageName: node - linkType: hard - -"@lmdb/lmdb-darwin-x64@npm:3.1.5": - version: 3.1.5 - resolution: "@lmdb/lmdb-darwin-x64@npm:3.1.5" - conditions: os=darwin & cpu=x64 - languageName: node - linkType: hard - -"@lmdb/lmdb-linux-arm64@npm:3.1.5": - version: 3.1.5 - resolution: "@lmdb/lmdb-linux-arm64@npm:3.1.5" - conditions: os=linux & cpu=arm64 - languageName: node - linkType: hard - -"@lmdb/lmdb-linux-arm@npm:3.1.5": - version: 3.1.5 - resolution: "@lmdb/lmdb-linux-arm@npm:3.1.5" - conditions: os=linux & cpu=arm - languageName: node - linkType: hard - -"@lmdb/lmdb-linux-x64@npm:3.1.5": - version: 3.1.5 - resolution: "@lmdb/lmdb-linux-x64@npm:3.1.5" - conditions: os=linux & cpu=x64 - languageName: node - linkType: hard - -"@lmdb/lmdb-win32-x64@npm:3.1.5": - version: 3.1.5 - resolution: "@lmdb/lmdb-win32-x64@npm:3.1.5" - conditions: os=win32 & cpu=x64 - languageName: node - linkType: hard - -"@msgpackr-extract/msgpackr-extract-darwin-arm64@npm:3.0.3": - version: 3.0.3 - resolution: "@msgpackr-extract/msgpackr-extract-darwin-arm64@npm:3.0.3" - conditions: os=darwin & cpu=arm64 - languageName: node - linkType: hard - -"@msgpackr-extract/msgpackr-extract-darwin-x64@npm:3.0.3": - version: 3.0.3 - resolution: "@msgpackr-extract/msgpackr-extract-darwin-x64@npm:3.0.3" - conditions: os=darwin & cpu=x64 - languageName: node - linkType: hard - -"@msgpackr-extract/msgpackr-extract-linux-arm64@npm:3.0.3": - version: 3.0.3 - resolution: "@msgpackr-extract/msgpackr-extract-linux-arm64@npm:3.0.3" - conditions: os=linux & cpu=arm64 - languageName: node - linkType: hard - -"@msgpackr-extract/msgpackr-extract-linux-arm@npm:3.0.3": - version: 3.0.3 - resolution: "@msgpackr-extract/msgpackr-extract-linux-arm@npm:3.0.3" - conditions: os=linux & cpu=arm - languageName: node - linkType: hard - -"@msgpackr-extract/msgpackr-extract-linux-x64@npm:3.0.3": - version: 3.0.3 - resolution: "@msgpackr-extract/msgpackr-extract-linux-x64@npm:3.0.3" - conditions: os=linux & cpu=x64 - languageName: node - linkType: hard - -"@msgpackr-extract/msgpackr-extract-win32-x64@npm:3.0.3": - version: 3.0.3 - resolution: "@msgpackr-extract/msgpackr-extract-win32-x64@npm:3.0.3" - conditions: os=win32 & cpu=x64 - languageName: node - linkType: hard - -"@napi-rs/nice-android-arm-eabi@npm:1.0.1": - version: 1.0.1 - resolution: "@napi-rs/nice-android-arm-eabi@npm:1.0.1" - conditions: os=android & cpu=arm - languageName: node - linkType: hard - -"@napi-rs/nice-android-arm64@npm:1.0.1": - version: 1.0.1 - resolution: "@napi-rs/nice-android-arm64@npm:1.0.1" - conditions: os=android & cpu=arm64 - languageName: node - linkType: hard - -"@napi-rs/nice-darwin-arm64@npm:1.0.1": - version: 1.0.1 - resolution: "@napi-rs/nice-darwin-arm64@npm:1.0.1" - conditions: os=darwin & cpu=arm64 - languageName: node - linkType: hard - -"@napi-rs/nice-darwin-x64@npm:1.0.1": - version: 1.0.1 - resolution: "@napi-rs/nice-darwin-x64@npm:1.0.1" - conditions: os=darwin & cpu=x64 - languageName: node - linkType: hard - -"@napi-rs/nice-freebsd-x64@npm:1.0.1": - version: 1.0.1 - resolution: "@napi-rs/nice-freebsd-x64@npm:1.0.1" - conditions: os=freebsd & cpu=x64 - languageName: node - linkType: hard - -"@napi-rs/nice-linux-arm-gnueabihf@npm:1.0.1": - version: 1.0.1 - resolution: "@napi-rs/nice-linux-arm-gnueabihf@npm:1.0.1" - conditions: os=linux & cpu=arm - languageName: node - linkType: hard - -"@napi-rs/nice-linux-arm64-gnu@npm:1.0.1": - version: 1.0.1 - resolution: "@napi-rs/nice-linux-arm64-gnu@npm:1.0.1" - conditions: os=linux & cpu=arm64 & libc=glibc - languageName: node - linkType: hard - -"@napi-rs/nice-linux-arm64-musl@npm:1.0.1": - version: 1.0.1 - resolution: "@napi-rs/nice-linux-arm64-musl@npm:1.0.1" - conditions: os=linux & cpu=arm64 & libc=musl - languageName: node - linkType: hard - -"@napi-rs/nice-linux-ppc64-gnu@npm:1.0.1": - version: 1.0.1 - resolution: "@napi-rs/nice-linux-ppc64-gnu@npm:1.0.1" - conditions: os=linux & cpu=ppc64 & libc=glibc - languageName: node - linkType: hard - -"@napi-rs/nice-linux-riscv64-gnu@npm:1.0.1": - version: 1.0.1 - resolution: "@napi-rs/nice-linux-riscv64-gnu@npm:1.0.1" - conditions: os=linux & cpu=riscv64 & libc=glibc - languageName: node - linkType: hard - -"@napi-rs/nice-linux-s390x-gnu@npm:1.0.1": - version: 1.0.1 - resolution: "@napi-rs/nice-linux-s390x-gnu@npm:1.0.1" - conditions: os=linux & cpu=s390x & libc=glibc - languageName: node - linkType: hard - -"@napi-rs/nice-linux-x64-gnu@npm:1.0.1": - version: 1.0.1 - resolution: "@napi-rs/nice-linux-x64-gnu@npm:1.0.1" - conditions: os=linux & cpu=x64 & libc=glibc - languageName: node - linkType: hard - -"@napi-rs/nice-linux-x64-musl@npm:1.0.1": - version: 1.0.1 - resolution: "@napi-rs/nice-linux-x64-musl@npm:1.0.1" - conditions: os=linux & cpu=x64 & libc=musl - languageName: node - linkType: hard - -"@napi-rs/nice-win32-arm64-msvc@npm:1.0.1": - version: 1.0.1 - resolution: "@napi-rs/nice-win32-arm64-msvc@npm:1.0.1" - conditions: os=win32 & cpu=arm64 - languageName: node - linkType: hard - -"@napi-rs/nice-win32-ia32-msvc@npm:1.0.1": - version: 1.0.1 - resolution: "@napi-rs/nice-win32-ia32-msvc@npm:1.0.1" - conditions: os=win32 & cpu=ia32 - languageName: node - linkType: hard - -"@napi-rs/nice-win32-x64-msvc@npm:1.0.1": - version: 1.0.1 - resolution: "@napi-rs/nice-win32-x64-msvc@npm:1.0.1" - conditions: os=win32 & cpu=x64 - languageName: node - linkType: hard - -"@napi-rs/nice@npm:^1.0.1": - version: 1.0.1 - resolution: "@napi-rs/nice@npm:1.0.1" - dependencies: - "@napi-rs/nice-android-arm-eabi": "npm:1.0.1" - "@napi-rs/nice-android-arm64": "npm:1.0.1" - "@napi-rs/nice-darwin-arm64": "npm:1.0.1" - "@napi-rs/nice-darwin-x64": "npm:1.0.1" - "@napi-rs/nice-freebsd-x64": "npm:1.0.1" - "@napi-rs/nice-linux-arm-gnueabihf": "npm:1.0.1" - "@napi-rs/nice-linux-arm64-gnu": "npm:1.0.1" - "@napi-rs/nice-linux-arm64-musl": "npm:1.0.1" - "@napi-rs/nice-linux-ppc64-gnu": "npm:1.0.1" - "@napi-rs/nice-linux-riscv64-gnu": "npm:1.0.1" - "@napi-rs/nice-linux-s390x-gnu": "npm:1.0.1" - "@napi-rs/nice-linux-x64-gnu": "npm:1.0.1" - "@napi-rs/nice-linux-x64-musl": "npm:1.0.1" - "@napi-rs/nice-win32-arm64-msvc": "npm:1.0.1" - "@napi-rs/nice-win32-ia32-msvc": "npm:1.0.1" - "@napi-rs/nice-win32-x64-msvc": "npm:1.0.1" - dependenciesMeta: - "@napi-rs/nice-android-arm-eabi": - optional: true - "@napi-rs/nice-android-arm64": - optional: true - "@napi-rs/nice-darwin-arm64": - optional: true - "@napi-rs/nice-darwin-x64": - optional: true - "@napi-rs/nice-freebsd-x64": - optional: true - "@napi-rs/nice-linux-arm-gnueabihf": - optional: true - "@napi-rs/nice-linux-arm64-gnu": - optional: true - "@napi-rs/nice-linux-arm64-musl": - optional: true - "@napi-rs/nice-linux-ppc64-gnu": - optional: true - "@napi-rs/nice-linux-riscv64-gnu": - optional: true - "@napi-rs/nice-linux-s390x-gnu": - optional: true - "@napi-rs/nice-linux-x64-gnu": - optional: true - "@napi-rs/nice-linux-x64-musl": - optional: true - "@napi-rs/nice-win32-arm64-msvc": - optional: true - "@napi-rs/nice-win32-ia32-msvc": - optional: true - "@napi-rs/nice-win32-x64-msvc": - optional: true - checksum: 10c0/9be30f8292e23f45f5b8f6553411f5cbaead998cc3a51859c60f56fc2e679610a3a04ed49b748267552b9abd17fe5e6ae88186e223ab5cb93d5d184d10b6569b - languageName: node - linkType: hard - -"@ngtools/webpack@npm:19.0.7": - version: 19.0.7 - resolution: "@ngtools/webpack@npm:19.0.7" - peerDependencies: - "@angular/compiler-cli": ^19.0.0 - typescript: ">=5.5 <5.7" - webpack: ^5.54.0 - dependenciesMeta: - esbuild: - built: true - puppeteer: - built: true - checksum: 10c0/28a5e6b7ac087710e4708ee57dbc3dd6d0ca05a36a32931457edc829e58e1ae2fdc34a0c790119623584210a3e3e605281efb505605173a81333ff55aef82093 - languageName: node - linkType: hard - -"@nodelib/fs.scandir@npm:2.1.5": - version: 2.1.5 - resolution: "@nodelib/fs.scandir@npm:2.1.5" - dependencies: - "@nodelib/fs.stat": "npm:2.0.5" - run-parallel: "npm:^1.1.9" - checksum: 10c0/732c3b6d1b1e967440e65f284bd06e5821fedf10a1bea9ed2bb75956ea1f30e08c44d3def9d6a230666574edbaf136f8cfd319c14fd1f87c66e6a44449afb2eb - languageName: node - linkType: hard - -"@nodelib/fs.stat@npm:2.0.5, @nodelib/fs.stat@npm:^2.0.2": - version: 2.0.5 - resolution: "@nodelib/fs.stat@npm:2.0.5" - checksum: 10c0/88dafe5e3e29a388b07264680dc996c17f4bda48d163a9d4f5c1112979f0ce8ec72aa7116122c350b4e7976bc5566dc3ddb579be1ceaacc727872eb4ed93926d - languageName: node - linkType: hard - -"@nodelib/fs.walk@npm:^1.2.3": - version: 1.2.8 - resolution: "@nodelib/fs.walk@npm:1.2.8" - dependencies: - "@nodelib/fs.scandir": "npm:2.1.5" - fastq: "npm:^1.6.0" - checksum: 10c0/db9de047c3bb9b51f9335a7bb46f4fcfb6829fb628318c12115fbaf7d369bfce71c15b103d1fc3b464812d936220ee9bc1c8f762d032c9f6be9acc99249095b1 - languageName: node - linkType: hard - -"@npmcli/agent@npm:^3.0.0": - version: 3.0.0 - resolution: "@npmcli/agent@npm:3.0.0" - dependencies: - agent-base: "npm:^7.1.0" - http-proxy-agent: "npm:^7.0.0" - https-proxy-agent: "npm:^7.0.1" - lru-cache: "npm:^10.0.1" - socks-proxy-agent: "npm:^8.0.3" - checksum: 10c0/efe37b982f30740ee77696a80c196912c274ecd2cb243bc6ae7053a50c733ce0f6c09fda085145f33ecf453be19654acca74b69e81eaad4c90f00ccffe2f9271 - languageName: node - linkType: hard - -"@npmcli/fs@npm:^4.0.0": - version: 4.0.0 - resolution: "@npmcli/fs@npm:4.0.0" - dependencies: - semver: "npm:^7.3.5" - checksum: 10c0/c90935d5ce670c87b6b14fab04a965a3b8137e585f8b2a6257263bd7f97756dd736cb165bb470e5156a9e718ecd99413dccc54b1138c1a46d6ec7cf325982fe5 - languageName: node - linkType: hard - -"@npmcli/git@npm:^6.0.0": - version: 6.0.1 - resolution: "@npmcli/git@npm:6.0.1" - dependencies: - "@npmcli/promise-spawn": "npm:^8.0.0" - ini: "npm:^5.0.0" - lru-cache: "npm:^10.0.1" - npm-pick-manifest: "npm:^10.0.0" - proc-log: "npm:^5.0.0" - promise-inflight: "npm:^1.0.1" - promise-retry: "npm:^2.0.1" - semver: "npm:^7.3.5" - which: "npm:^5.0.0" - checksum: 10c0/00ab508fd860b4b9001d9a16a847c2544f0450efc1225cd85c18ddba3de9f6d328719ab28088e21ec445f585b8b79d0da1fb28afd3f64f3e7c86e1b5dad3a5a8 - languageName: node - linkType: hard - -"@npmcli/installed-package-contents@npm:^3.0.0": - version: 3.0.0 - resolution: "@npmcli/installed-package-contents@npm:3.0.0" - dependencies: - npm-bundled: "npm:^4.0.0" - npm-normalize-package-bin: "npm:^4.0.0" - bin: - installed-package-contents: bin/index.js - checksum: 10c0/8bb361251cd13b91ae2d04bfcc59b52ffb8cd475d074259c143b3c29a0c4c0ae90d76cfb2cab00ff61cc76bd0c38591b530ce1bdbbc8a61d60ddc6c9ecbf169b - languageName: node - linkType: hard - -"@npmcli/node-gyp@npm:^4.0.0": - version: 4.0.0 - resolution: "@npmcli/node-gyp@npm:4.0.0" - checksum: 10c0/58422c2ce0693f519135dd32b5c5bcbb441823f08f9294d5ec19d9a22925ba1a5ec04a1b96f606f2ab09a5f5db56e704f6e201a485198ce9d11fb6b2705e6e79 - languageName: node - linkType: hard - -"@npmcli/package-json@npm:^6.0.0": - version: 6.1.0 - resolution: "@npmcli/package-json@npm:6.1.0" - dependencies: - "@npmcli/git": "npm:^6.0.0" - glob: "npm:^10.2.2" - hosted-git-info: "npm:^8.0.0" - json-parse-even-better-errors: "npm:^4.0.0" - normalize-package-data: "npm:^7.0.0" - proc-log: "npm:^5.0.0" - semver: "npm:^7.5.3" - checksum: 10c0/95cc97f2382084e71a33d2739f0b1e659e32a8449d134d4264ecc2b5ada548069122d95887fe692373e2703b7a296a17e7296a4ce955dfa80c6ce3e00b5fab53 - languageName: node - linkType: hard - -"@npmcli/promise-spawn@npm:^8.0.0": - version: 8.0.2 - resolution: "@npmcli/promise-spawn@npm:8.0.2" - dependencies: - which: "npm:^5.0.0" - checksum: 10c0/fe987dece7b843d9353d4d38982336ab3beabc2dd3c135862a4ba2921aae55b0d334891fe44c6cbbee20626259e54478bf498ad8d380c14c53732b489ae14f40 - languageName: node - linkType: hard - -"@npmcli/redact@npm:^3.0.0": - version: 3.0.0 - resolution: "@npmcli/redact@npm:3.0.0" - checksum: 10c0/34823f0d6a3301b310921b9f849f3c9814339bb9cde9555ddd1d51167c51e8b08ca40160eeb86b54041779805502e51251e0fbe0702fb7ab10173901e5d1d28c - languageName: node - linkType: hard - -"@npmcli/run-script@npm:^9.0.0": - version: 9.0.2 - resolution: "@npmcli/run-script@npm:9.0.2" - dependencies: - "@npmcli/node-gyp": "npm:^4.0.0" - "@npmcli/package-json": "npm:^6.0.0" - "@npmcli/promise-spawn": "npm:^8.0.0" - node-gyp: "npm:^11.0.0" - proc-log: "npm:^5.0.0" - which: "npm:^5.0.0" - checksum: 10c0/d2e7763c45a07bad064ecb1ab53fb797a6cb1d125bf3e95bfd164e4886e8539e4714afd04bcf4f13570e8a4b1297a040fa7ecc44732276e11d42ca8244c70662 - languageName: node - linkType: hard - -"@parcel/watcher-android-arm64@npm:2.5.0": - version: 2.5.0 - resolution: "@parcel/watcher-android-arm64@npm:2.5.0" - conditions: os=android & cpu=arm64 - languageName: node - linkType: hard - -"@parcel/watcher-darwin-arm64@npm:2.5.0": - version: 2.5.0 - resolution: "@parcel/watcher-darwin-arm64@npm:2.5.0" - conditions: os=darwin & cpu=arm64 - languageName: node - linkType: hard - -"@parcel/watcher-darwin-x64@npm:2.5.0": - version: 2.5.0 - resolution: "@parcel/watcher-darwin-x64@npm:2.5.0" - conditions: os=darwin & cpu=x64 - languageName: node - linkType: hard - -"@parcel/watcher-freebsd-x64@npm:2.5.0": - version: 2.5.0 - resolution: "@parcel/watcher-freebsd-x64@npm:2.5.0" - conditions: os=freebsd & cpu=x64 - languageName: node - linkType: hard - -"@parcel/watcher-linux-arm-glibc@npm:2.5.0": - version: 2.5.0 - resolution: "@parcel/watcher-linux-arm-glibc@npm:2.5.0" - conditions: os=linux & cpu=arm & libc=glibc - languageName: node - linkType: hard - -"@parcel/watcher-linux-arm-musl@npm:2.5.0": - version: 2.5.0 - resolution: "@parcel/watcher-linux-arm-musl@npm:2.5.0" - conditions: os=linux & cpu=arm & libc=musl - languageName: node - linkType: hard - -"@parcel/watcher-linux-arm64-glibc@npm:2.5.0": - version: 2.5.0 - resolution: "@parcel/watcher-linux-arm64-glibc@npm:2.5.0" - conditions: os=linux & cpu=arm64 & libc=glibc - languageName: node - linkType: hard - -"@parcel/watcher-linux-arm64-musl@npm:2.5.0": - version: 2.5.0 - resolution: "@parcel/watcher-linux-arm64-musl@npm:2.5.0" - conditions: os=linux & cpu=arm64 & libc=musl - languageName: node - linkType: hard - -"@parcel/watcher-linux-x64-glibc@npm:2.5.0": - version: 2.5.0 - resolution: "@parcel/watcher-linux-x64-glibc@npm:2.5.0" - conditions: os=linux & cpu=x64 & libc=glibc - languageName: node - linkType: hard - -"@parcel/watcher-linux-x64-musl@npm:2.5.0": - version: 2.5.0 - resolution: "@parcel/watcher-linux-x64-musl@npm:2.5.0" - conditions: os=linux & cpu=x64 & libc=musl - languageName: node - linkType: hard - -"@parcel/watcher-win32-arm64@npm:2.5.0": - version: 2.5.0 - resolution: "@parcel/watcher-win32-arm64@npm:2.5.0" - conditions: os=win32 & cpu=arm64 - languageName: node - linkType: hard - -"@parcel/watcher-win32-ia32@npm:2.5.0": - version: 2.5.0 - resolution: "@parcel/watcher-win32-ia32@npm:2.5.0" - conditions: os=win32 & cpu=ia32 - languageName: node - linkType: hard - -"@parcel/watcher-win32-x64@npm:2.5.0": - version: 2.5.0 - resolution: "@parcel/watcher-win32-x64@npm:2.5.0" - conditions: os=win32 & cpu=x64 - languageName: node - linkType: hard - -"@parcel/watcher@npm:^2.4.1": - version: 2.5.0 - resolution: "@parcel/watcher@npm:2.5.0" - dependencies: - "@parcel/watcher-android-arm64": "npm:2.5.0" - "@parcel/watcher-darwin-arm64": "npm:2.5.0" - "@parcel/watcher-darwin-x64": "npm:2.5.0" - "@parcel/watcher-freebsd-x64": "npm:2.5.0" - "@parcel/watcher-linux-arm-glibc": "npm:2.5.0" - "@parcel/watcher-linux-arm-musl": "npm:2.5.0" - "@parcel/watcher-linux-arm64-glibc": "npm:2.5.0" - "@parcel/watcher-linux-arm64-musl": "npm:2.5.0" - "@parcel/watcher-linux-x64-glibc": "npm:2.5.0" - "@parcel/watcher-linux-x64-musl": "npm:2.5.0" - "@parcel/watcher-win32-arm64": "npm:2.5.0" - "@parcel/watcher-win32-ia32": "npm:2.5.0" - "@parcel/watcher-win32-x64": "npm:2.5.0" - detect-libc: "npm:^1.0.3" - is-glob: "npm:^4.0.3" - micromatch: "npm:^4.0.5" - node-addon-api: "npm:^7.0.0" - node-gyp: "npm:latest" - dependenciesMeta: - "@parcel/watcher-android-arm64": - optional: true - "@parcel/watcher-darwin-arm64": - optional: true - "@parcel/watcher-darwin-x64": - optional: true - "@parcel/watcher-freebsd-x64": - optional: true - "@parcel/watcher-linux-arm-glibc": - optional: true - "@parcel/watcher-linux-arm-musl": - optional: true - "@parcel/watcher-linux-arm64-glibc": - optional: true - "@parcel/watcher-linux-arm64-musl": - optional: true - "@parcel/watcher-linux-x64-glibc": - optional: true - "@parcel/watcher-linux-x64-musl": - optional: true - "@parcel/watcher-win32-arm64": - optional: true - "@parcel/watcher-win32-ia32": - optional: true - "@parcel/watcher-win32-x64": - optional: true - checksum: 10c0/9bad727d8b11e5d150ec47459254544c583adaa47d047b8ef65e1c74aede1a0767dc7fc6b8997649dae07318d6ef39caba6a1c405d306398d5bcd47074ec5d29 - languageName: node - linkType: hard - -"@pkgjs/parseargs@npm:^0.11.0": - version: 0.11.0 - resolution: "@pkgjs/parseargs@npm:0.11.0" - checksum: 10c0/5bd7576bb1b38a47a7fc7b51ac9f38748e772beebc56200450c4a817d712232b8f1d3ef70532c80840243c657d491cf6a6be1e3a214cff907645819fdc34aadd - languageName: node - linkType: hard - -"@rollup/rollup-android-arm-eabi@npm:4.26.0": - version: 4.26.0 - resolution: "@rollup/rollup-android-arm-eabi@npm:4.26.0" - conditions: os=android & cpu=arm - languageName: node - linkType: hard - -"@rollup/rollup-android-arm-eabi@npm:4.30.1": - version: 4.30.1 - resolution: "@rollup/rollup-android-arm-eabi@npm:4.30.1" - conditions: os=android & cpu=arm - languageName: node - linkType: hard - -"@rollup/rollup-android-arm64@npm:4.26.0": - version: 4.26.0 - resolution: "@rollup/rollup-android-arm64@npm:4.26.0" - conditions: os=android & cpu=arm64 - languageName: node - linkType: hard - -"@rollup/rollup-android-arm64@npm:4.30.1": - version: 4.30.1 - resolution: "@rollup/rollup-android-arm64@npm:4.30.1" - conditions: os=android & cpu=arm64 - languageName: node - linkType: hard - -"@rollup/rollup-darwin-arm64@npm:4.26.0": - version: 4.26.0 - resolution: "@rollup/rollup-darwin-arm64@npm:4.26.0" - conditions: os=darwin & cpu=arm64 - languageName: node - linkType: hard - -"@rollup/rollup-darwin-arm64@npm:4.30.1": - version: 4.30.1 - resolution: "@rollup/rollup-darwin-arm64@npm:4.30.1" - conditions: os=darwin & cpu=arm64 - languageName: node - linkType: hard - -"@rollup/rollup-darwin-x64@npm:4.26.0": - version: 4.26.0 - resolution: "@rollup/rollup-darwin-x64@npm:4.26.0" - conditions: os=darwin & cpu=x64 - languageName: node - linkType: hard - -"@rollup/rollup-darwin-x64@npm:4.30.1": - version: 4.30.1 - resolution: "@rollup/rollup-darwin-x64@npm:4.30.1" - conditions: os=darwin & cpu=x64 - languageName: node - linkType: hard - -"@rollup/rollup-freebsd-arm64@npm:4.26.0": - version: 4.26.0 - resolution: "@rollup/rollup-freebsd-arm64@npm:4.26.0" - conditions: os=freebsd & cpu=arm64 - languageName: node - linkType: hard - -"@rollup/rollup-freebsd-arm64@npm:4.30.1": - version: 4.30.1 - resolution: "@rollup/rollup-freebsd-arm64@npm:4.30.1" - conditions: os=freebsd & cpu=arm64 - languageName: node - linkType: hard - -"@rollup/rollup-freebsd-x64@npm:4.26.0": - version: 4.26.0 - resolution: "@rollup/rollup-freebsd-x64@npm:4.26.0" - conditions: os=freebsd & cpu=x64 - languageName: node - linkType: hard - -"@rollup/rollup-freebsd-x64@npm:4.30.1": - version: 4.30.1 - resolution: "@rollup/rollup-freebsd-x64@npm:4.30.1" - conditions: os=freebsd & cpu=x64 - languageName: node - linkType: hard - -"@rollup/rollup-linux-arm-gnueabihf@npm:4.26.0": - version: 4.26.0 - resolution: "@rollup/rollup-linux-arm-gnueabihf@npm:4.26.0" - conditions: os=linux & cpu=arm & libc=glibc - languageName: node - linkType: hard - -"@rollup/rollup-linux-arm-gnueabihf@npm:4.30.1": - version: 4.30.1 - resolution: "@rollup/rollup-linux-arm-gnueabihf@npm:4.30.1" - conditions: os=linux & cpu=arm & libc=glibc - languageName: node - linkType: hard - -"@rollup/rollup-linux-arm-musleabihf@npm:4.26.0": - version: 4.26.0 - resolution: "@rollup/rollup-linux-arm-musleabihf@npm:4.26.0" - conditions: os=linux & cpu=arm & libc=musl - languageName: node - linkType: hard - -"@rollup/rollup-linux-arm-musleabihf@npm:4.30.1": - version: 4.30.1 - resolution: "@rollup/rollup-linux-arm-musleabihf@npm:4.30.1" - conditions: os=linux & cpu=arm & libc=musl - languageName: node - linkType: hard - -"@rollup/rollup-linux-arm64-gnu@npm:4.26.0": - version: 4.26.0 - resolution: "@rollup/rollup-linux-arm64-gnu@npm:4.26.0" - conditions: os=linux & cpu=arm64 & libc=glibc - languageName: node - linkType: hard - -"@rollup/rollup-linux-arm64-gnu@npm:4.30.1": - version: 4.30.1 - resolution: "@rollup/rollup-linux-arm64-gnu@npm:4.30.1" - conditions: os=linux & cpu=arm64 & libc=glibc - languageName: node - linkType: hard - -"@rollup/rollup-linux-arm64-musl@npm:4.26.0": - version: 4.26.0 - resolution: "@rollup/rollup-linux-arm64-musl@npm:4.26.0" - conditions: os=linux & cpu=arm64 & libc=musl - languageName: node - linkType: hard - -"@rollup/rollup-linux-arm64-musl@npm:4.30.1": - version: 4.30.1 - resolution: "@rollup/rollup-linux-arm64-musl@npm:4.30.1" - conditions: os=linux & cpu=arm64 & libc=musl - languageName: node - linkType: hard - -"@rollup/rollup-linux-loongarch64-gnu@npm:4.30.1": - version: 4.30.1 - resolution: "@rollup/rollup-linux-loongarch64-gnu@npm:4.30.1" - conditions: os=linux & cpu=loong64 & libc=glibc - languageName: node - linkType: hard - -"@rollup/rollup-linux-powerpc64le-gnu@npm:4.26.0": - version: 4.26.0 - resolution: "@rollup/rollup-linux-powerpc64le-gnu@npm:4.26.0" - conditions: os=linux & cpu=ppc64 & libc=glibc - languageName: node - linkType: hard - -"@rollup/rollup-linux-powerpc64le-gnu@npm:4.30.1": - version: 4.30.1 - resolution: "@rollup/rollup-linux-powerpc64le-gnu@npm:4.30.1" - conditions: os=linux & cpu=ppc64 & libc=glibc - languageName: node - linkType: hard - -"@rollup/rollup-linux-riscv64-gnu@npm:4.26.0": - version: 4.26.0 - resolution: "@rollup/rollup-linux-riscv64-gnu@npm:4.26.0" - conditions: os=linux & cpu=riscv64 & libc=glibc - languageName: node - linkType: hard - -"@rollup/rollup-linux-riscv64-gnu@npm:4.30.1": - version: 4.30.1 - resolution: "@rollup/rollup-linux-riscv64-gnu@npm:4.30.1" - conditions: os=linux & cpu=riscv64 & libc=glibc - languageName: node - linkType: hard - -"@rollup/rollup-linux-s390x-gnu@npm:4.26.0": - version: 4.26.0 - resolution: "@rollup/rollup-linux-s390x-gnu@npm:4.26.0" - conditions: os=linux & cpu=s390x & libc=glibc - languageName: node - linkType: hard - -"@rollup/rollup-linux-s390x-gnu@npm:4.30.1": - version: 4.30.1 - resolution: "@rollup/rollup-linux-s390x-gnu@npm:4.30.1" - conditions: os=linux & cpu=s390x & libc=glibc - languageName: node - linkType: hard - -"@rollup/rollup-linux-x64-gnu@npm:4.26.0": - version: 4.26.0 - resolution: "@rollup/rollup-linux-x64-gnu@npm:4.26.0" - conditions: os=linux & cpu=x64 & libc=glibc - languageName: node - linkType: hard - -"@rollup/rollup-linux-x64-gnu@npm:4.30.1": - version: 4.30.1 - resolution: "@rollup/rollup-linux-x64-gnu@npm:4.30.1" - conditions: os=linux & cpu=x64 & libc=glibc - languageName: node - linkType: hard - -"@rollup/rollup-linux-x64-musl@npm:4.26.0": - version: 4.26.0 - resolution: "@rollup/rollup-linux-x64-musl@npm:4.26.0" - conditions: os=linux & cpu=x64 & libc=musl - languageName: node - linkType: hard - -"@rollup/rollup-linux-x64-musl@npm:4.30.1": - version: 4.30.1 - resolution: "@rollup/rollup-linux-x64-musl@npm:4.30.1" - conditions: os=linux & cpu=x64 & libc=musl - languageName: node - linkType: hard - -"@rollup/rollup-win32-arm64-msvc@npm:4.26.0": - version: 4.26.0 - resolution: "@rollup/rollup-win32-arm64-msvc@npm:4.26.0" - conditions: os=win32 & cpu=arm64 - languageName: node - linkType: hard - -"@rollup/rollup-win32-arm64-msvc@npm:4.30.1": - version: 4.30.1 - resolution: "@rollup/rollup-win32-arm64-msvc@npm:4.30.1" - conditions: os=win32 & cpu=arm64 - languageName: node - linkType: hard - -"@rollup/rollup-win32-ia32-msvc@npm:4.26.0": - version: 4.26.0 - resolution: "@rollup/rollup-win32-ia32-msvc@npm:4.26.0" - conditions: os=win32 & cpu=ia32 - languageName: node - linkType: hard - -"@rollup/rollup-win32-ia32-msvc@npm:4.30.1": - version: 4.30.1 - resolution: "@rollup/rollup-win32-ia32-msvc@npm:4.30.1" - conditions: os=win32 & cpu=ia32 - languageName: node - linkType: hard - -"@rollup/rollup-win32-x64-msvc@npm:4.26.0": - version: 4.26.0 - resolution: "@rollup/rollup-win32-x64-msvc@npm:4.26.0" - conditions: os=win32 & cpu=x64 - languageName: node - linkType: hard - -"@rollup/rollup-win32-x64-msvc@npm:4.30.1": - version: 4.30.1 - resolution: "@rollup/rollup-win32-x64-msvc@npm:4.30.1" - conditions: os=win32 & cpu=x64 - languageName: node - linkType: hard - -"@schematics/angular@npm:19.0.7": - version: 19.0.7 - resolution: "@schematics/angular@npm:19.0.7" - dependencies: - "@angular-devkit/core": "npm:19.0.7" - "@angular-devkit/schematics": "npm:19.0.7" - jsonc-parser: "npm:3.3.1" - dependenciesMeta: - esbuild: - built: true - puppeteer: - built: true - checksum: 10c0/89eb3c8db3c7bc2401d69de00d5d57855ec85c324759815679813cacb6317a25ccfcd9b69afd96eb720205f72b38335ab178ca12402a1b9416f1ea121b201b0b - languageName: node - linkType: hard - -"@sigstore/bundle@npm:^3.0.0": - version: 3.0.0 - resolution: "@sigstore/bundle@npm:3.0.0" - dependencies: - "@sigstore/protobuf-specs": "npm:^0.3.2" - checksum: 10c0/9a077d390970b1de5f60f7d870f856b26073d8775d4ffe827db4c0195d25e0eadcc0854f6ee76a92be070b289a3386bf0cf02ab30df100c7cf029d01312d7417 - languageName: node - linkType: hard - -"@sigstore/core@npm:^2.0.0": - version: 2.0.0 - resolution: "@sigstore/core@npm:2.0.0" - checksum: 10c0/bb7e668aedcda68312d2ff7c986fd0ba29057ca4dfbaef516c997b0799cd8858b2fc8017a7946fd2e43f237920adbcaa7455097a0a02909ed86cad9f98d592d4 - languageName: node - linkType: hard - -"@sigstore/protobuf-specs@npm:^0.3.2": - version: 0.3.2 - resolution: "@sigstore/protobuf-specs@npm:0.3.2" - checksum: 10c0/108eed419181ff599763f2d28ff5087e7bce9d045919de548677520179fe77fb2e2b7290216c93c7a01bdb2972b604bf44599273c991bbdf628fbe1b9b70aacb - languageName: node - linkType: hard - -"@sigstore/sign@npm:^3.0.0": - version: 3.0.0 - resolution: "@sigstore/sign@npm:3.0.0" - dependencies: - "@sigstore/bundle": "npm:^3.0.0" - "@sigstore/core": "npm:^2.0.0" - "@sigstore/protobuf-specs": "npm:^0.3.2" - make-fetch-happen: "npm:^14.0.1" - proc-log: "npm:^5.0.0" - promise-retry: "npm:^2.0.1" - checksum: 10c0/0d82d84de9dc522389c0eece113f9ead7ea49155daf231ee7477b9c6affc095254e9351fbbfc6dd97d01bae6e42edb6078f2f4d6b194cd08ce5775ce70cfbe44 - languageName: node - linkType: hard - -"@sigstore/tuf@npm:^3.0.0": - version: 3.0.0 - resolution: "@sigstore/tuf@npm:3.0.0" - dependencies: - "@sigstore/protobuf-specs": "npm:^0.3.2" - tuf-js: "npm:^3.0.1" - checksum: 10c0/1e0a1e69f1e2763bb3dd007211412bdab0e66926d4fb16a0b9c38a7b30edc3e8b7a541f82c9c77d24862398b5fe6312d478982237cac81b59dc8e0cea665813c - languageName: node - linkType: hard - -"@sigstore/verify@npm:^2.0.0": - version: 2.0.0 - resolution: "@sigstore/verify@npm:2.0.0" - dependencies: - "@sigstore/bundle": "npm:^3.0.0" - "@sigstore/core": "npm:^2.0.0" - "@sigstore/protobuf-specs": "npm:^0.3.2" - checksum: 10c0/9964d8577dcd7d0bbfb62de0a93f1d7e24a011640940d868fc0112ba776e238ccef7b8d4e1870257fb1bcf28d7bf4cc437ee5919353620da21a95355daceb00b - languageName: node - linkType: hard - -"@sindresorhus/merge-streams@npm:^2.1.0": - version: 2.3.0 - resolution: "@sindresorhus/merge-streams@npm:2.3.0" - checksum: 10c0/69ee906f3125fb2c6bb6ec5cdd84e8827d93b49b3892bce8b62267116cc7e197b5cccf20c160a1d32c26014ecd14470a72a5e3ee37a58f1d6dadc0db1ccf3894 - languageName: node - linkType: hard - -"@tufjs/canonical-json@npm:2.0.0": - version: 2.0.0 - resolution: "@tufjs/canonical-json@npm:2.0.0" - checksum: 10c0/52c5ffaef1483ed5c3feedfeba26ca9142fa386eea54464e70ff515bd01c5e04eab05d01eff8c2593291dcaf2397ca7d9c512720e11f52072b04c47a5c279415 - languageName: node - linkType: hard - -"@tufjs/models@npm:3.0.1": - version: 3.0.1 - resolution: "@tufjs/models@npm:3.0.1" - dependencies: - "@tufjs/canonical-json": "npm:2.0.0" - minimatch: "npm:^9.0.5" - checksum: 10c0/0b2022589139102edf28f7fdcd094407fc98ac25bf530ebcf538dd63152baea9b6144b713c8dfc4f6b7580adeff706ab6ecc5f9716c4b816e58a04419abb1926 - languageName: node - linkType: hard - -"@types/body-parser@npm:*": - version: 1.19.5 - resolution: "@types/body-parser@npm:1.19.5" - dependencies: - "@types/connect": "npm:*" - "@types/node": "npm:*" - checksum: 10c0/aebeb200f25e8818d8cf39cd0209026750d77c9b85381cdd8deeb50913e4d18a1ebe4b74ca9b0b4d21952511eeaba5e9fbbf739b52731a2061e206ec60d568df - languageName: node - linkType: hard - -"@types/bonjour@npm:^3.5.13": - version: 3.5.13 - resolution: "@types/bonjour@npm:3.5.13" - dependencies: - "@types/node": "npm:*" - checksum: 10c0/eebedbca185ac3c39dd5992ef18d9e2a9f99e7f3c2f52f5561f90e9ed482c5d224c7962db95362712f580ed5713264e777a98d8f0bd8747f4eadf62937baed16 - languageName: node - linkType: hard - -"@types/connect-history-api-fallback@npm:^1.5.4": - version: 1.5.4 - resolution: "@types/connect-history-api-fallback@npm:1.5.4" - dependencies: - "@types/express-serve-static-core": "npm:*" - "@types/node": "npm:*" - checksum: 10c0/1b4035b627dcd714b05a22557f942e24a57ca48e7377dde0d2f86313fe685bc0a6566512a73257a55b5665b96c3041fb29228ac93331d8133011716215de8244 - languageName: node - linkType: hard - -"@types/connect@npm:*": - version: 3.4.38 - resolution: "@types/connect@npm:3.4.38" - dependencies: - "@types/node": "npm:*" - checksum: 10c0/2e1cdba2c410f25649e77856505cd60223250fa12dff7a503e492208dbfdd25f62859918f28aba95315251fd1f5e1ffbfca1e25e73037189ab85dd3f8d0a148c - languageName: node - linkType: hard - -"@types/debug@npm:^4.0.0": - version: 4.1.12 - resolution: "@types/debug@npm:4.1.12" - dependencies: - "@types/ms": "npm:*" - checksum: 10c0/5dcd465edbb5a7f226e9a5efd1f399c6172407ef5840686b73e3608ce135eeca54ae8037dcd9f16bdb2768ac74925b820a8b9ecc588a58ca09eca6acabe33e2f - languageName: node - linkType: hard - -"@types/eslint-scope@npm:^3.7.7": - version: 3.7.7 - resolution: "@types/eslint-scope@npm:3.7.7" - dependencies: - "@types/eslint": "npm:*" - "@types/estree": "npm:*" - checksum: 10c0/a0ecbdf2f03912679440550817ff77ef39a30fa8bfdacaf6372b88b1f931828aec392f52283240f0d648cf3055c5ddc564544a626bcf245f3d09fcb099ebe3cc - languageName: node - linkType: hard - -"@types/eslint@npm:*": - version: 9.6.1 - resolution: "@types/eslint@npm:9.6.1" - dependencies: - "@types/estree": "npm:*" - "@types/json-schema": "npm:*" - checksum: 10c0/69ba24fee600d1e4c5abe0df086c1a4d798abf13792d8cfab912d76817fe1a894359a1518557d21237fbaf6eda93c5ab9309143dee4c59ef54336d1b3570420e - languageName: node - linkType: hard - -"@types/estree@npm:*, @types/estree@npm:1.0.6, @types/estree@npm:^1.0.6": - version: 1.0.6 - resolution: "@types/estree@npm:1.0.6" - checksum: 10c0/cdfd751f6f9065442cd40957c07fd80361c962869aa853c1c2fd03e101af8b9389d8ff4955a43a6fcfa223dd387a089937f95be0f3eec21ca527039fd2d9859a - languageName: node - linkType: hard - -"@types/express-serve-static-core@npm:*, @types/express-serve-static-core@npm:^5.0.0": - version: 5.0.4 - resolution: "@types/express-serve-static-core@npm:5.0.4" - dependencies: - "@types/node": "npm:*" - "@types/qs": "npm:*" - "@types/range-parser": "npm:*" - "@types/send": "npm:*" - checksum: 10c0/e469d179a8815703f0be495f400713394ddccaf37d1fab90907d2ec0b19b03df4db20a6bbde026ba0d218a817ed22c3ef3934d429649b1ce66d26084f5105eae - languageName: node - linkType: hard - -"@types/express-serve-static-core@npm:^4.17.33": - version: 4.19.6 - resolution: "@types/express-serve-static-core@npm:4.19.6" - dependencies: - "@types/node": "npm:*" - "@types/qs": "npm:*" - "@types/range-parser": "npm:*" - "@types/send": "npm:*" - checksum: 10c0/4281f4ead71723f376b3ddf64868ae26244d434d9906c101cf8d436d4b5c779d01bd046e4ea0ed1a394d3e402216fabfa22b1fa4dba501061cd7c81c54045983 - languageName: node - linkType: hard - -"@types/express@npm:*": - version: 5.0.0 - resolution: "@types/express@npm:5.0.0" - dependencies: - "@types/body-parser": "npm:*" - "@types/express-serve-static-core": "npm:^5.0.0" - "@types/qs": "npm:*" - "@types/serve-static": "npm:*" - checksum: 10c0/0d74b53aefa69c3b3817ee9b5145fd50d7dbac52a8986afc2d7500085c446656d0b6dc13158c04e2d9f18f4324d4d93b0452337c5ff73dd086dca3e4ff11f47b - languageName: node - linkType: hard - -"@types/express@npm:^4.17.21": - version: 4.17.21 - resolution: "@types/express@npm:4.17.21" - dependencies: - "@types/body-parser": "npm:*" - "@types/express-serve-static-core": "npm:^4.17.33" - "@types/qs": "npm:*" - "@types/serve-static": "npm:*" - checksum: 10c0/12e562c4571da50c7d239e117e688dc434db1bac8be55613294762f84fd77fbd0658ccd553c7d3ab02408f385bc93980992369dd30e2ecd2c68c358e6af8fabf - languageName: node - linkType: hard - -"@types/http-errors@npm:*": - version: 2.0.4 - resolution: "@types/http-errors@npm:2.0.4" - checksum: 10c0/494670a57ad4062fee6c575047ad5782506dd35a6b9ed3894cea65830a94367bd84ba302eb3dde331871f6d70ca287bfedb1b2cf658e6132cd2cbd427ab56836 - languageName: node - linkType: hard - -"@types/http-proxy@npm:^1.17.15, @types/http-proxy@npm:^1.17.8": - version: 1.17.15 - resolution: "@types/http-proxy@npm:1.17.15" - dependencies: - "@types/node": "npm:*" - checksum: 10c0/e2bf2fcdf23c88141b8d2c85ed5e5418b62ef78285884a2b5a717af55f4d9062136aa475489d10292093343df58fb81975f34bebd6b9df322288fd9821cbee07 - languageName: node - linkType: hard - -"@types/json-schema@npm:*, @types/json-schema@npm:^7.0.15, @types/json-schema@npm:^7.0.8, @types/json-schema@npm:^7.0.9": - version: 7.0.15 - resolution: "@types/json-schema@npm:7.0.15" - checksum: 10c0/a996a745e6c5d60292f36731dd41341339d4eeed8180bb09226e5c8d23759067692b1d88e5d91d72ee83dfc00d3aca8e7bd43ea120516c17922cbcb7c3e252db - languageName: node - linkType: hard - -"@types/mime@npm:^1": - version: 1.3.5 - resolution: "@types/mime@npm:1.3.5" - checksum: 10c0/c2ee31cd9b993804df33a694d5aa3fa536511a49f2e06eeab0b484fef59b4483777dbb9e42a4198a0809ffbf698081fdbca1e5c2218b82b91603dfab10a10fbc - languageName: node - linkType: hard - -"@types/ms@npm:*": - version: 0.7.34 - resolution: "@types/ms@npm:0.7.34" - checksum: 10c0/ac80bd90012116ceb2d188fde62d96830ca847823e8ca71255616bc73991aa7d9f057b8bfab79e8ee44ffefb031ddd1bcce63ea82f9e66f7c31ec02d2d823ccc - languageName: node - linkType: hard - -"@types/node-forge@npm:^1.3.0": - version: 1.3.11 - resolution: "@types/node-forge@npm:1.3.11" - dependencies: - "@types/node": "npm:*" - checksum: 10c0/3d7d23ca0ba38ac0cf74028393bd70f31169ab9aba43f21deb787840170d307d662644bac07287495effe2812ddd7ac8a14dbd43f16c2936bbb06312e96fc3b9 - languageName: node - linkType: hard - -"@types/node@npm:*, @types/node@npm:^22.10.5": - version: 22.10.5 - resolution: "@types/node@npm:22.10.5" - dependencies: - undici-types: "npm:~6.20.0" - checksum: 10c0/6a0e7d1fe6a86ef6ee19c3c6af4c15542e61aea2f4cee655b6252efb356795f1f228bc8299921e82924e80ff8eca29b74d9dd0dd5cc1a90983f892f740b480df - languageName: node - linkType: hard - -"@types/qs@npm:*": - version: 6.9.17 - resolution: "@types/qs@npm:6.9.17" - checksum: 10c0/a183fa0b3464267f8f421e2d66d960815080e8aab12b9aadab60479ba84183b1cdba8f4eff3c06f76675a8e42fe6a3b1313ea76c74f2885c3e25d32499c17d1b - languageName: node - linkType: hard - -"@types/range-parser@npm:*": - version: 1.2.7 - resolution: "@types/range-parser@npm:1.2.7" - checksum: 10c0/361bb3e964ec5133fa40644a0b942279ed5df1949f21321d77de79f48b728d39253e5ce0408c9c17e4e0fd95ca7899da36841686393b9f7a1e209916e9381a3c - languageName: node - linkType: hard - -"@types/retry@npm:0.12.2": - version: 0.12.2 - resolution: "@types/retry@npm:0.12.2" - checksum: 10c0/07481551a988cc90b423351919928b9ddcd14e3f5591cac3ab950851bb20646e55a10e89141b38bc3093d2056d4df73700b22ff2612976ac86a6367862381884 - languageName: node - linkType: hard - -"@types/send@npm:*": - version: 0.17.4 - resolution: "@types/send@npm:0.17.4" - dependencies: - "@types/mime": "npm:^1" - "@types/node": "npm:*" - checksum: 10c0/7f17fa696cb83be0a104b04b424fdedc7eaba1c9a34b06027239aba513b398a0e2b7279778af521f516a397ced417c96960e5f50fcfce40c4bc4509fb1a5883c - languageName: node - linkType: hard - -"@types/serve-index@npm:^1.9.4": - version: 1.9.4 - resolution: "@types/serve-index@npm:1.9.4" - dependencies: - "@types/express": "npm:*" - checksum: 10c0/94c1b9e8f1ea36a229e098e1643d5665d9371f8c2658521718e259130a237c447059b903bac0dcc96ee2c15fd63f49aa647099b7d0d437a67a6946527a837438 - languageName: node - linkType: hard - -"@types/serve-static@npm:*, @types/serve-static@npm:^1.15.5": - version: 1.15.7 - resolution: "@types/serve-static@npm:1.15.7" - dependencies: - "@types/http-errors": "npm:*" - "@types/node": "npm:*" - "@types/send": "npm:*" - checksum: 10c0/26ec864d3a626ea627f8b09c122b623499d2221bbf2f470127f4c9ebfe92bd8a6bb5157001372d4c4bd0dd37a1691620217d9dc4df5aa8f779f3fd996b1c60ae - languageName: node - linkType: hard - -"@types/sockjs@npm:^0.3.36": - version: 0.3.36 - resolution: "@types/sockjs@npm:0.3.36" - dependencies: - "@types/node": "npm:*" - checksum: 10c0/b20b7820ee813f22de4f2ce98bdd12c68c930e016a8912b1ed967595ac0d8a4cbbff44f4d486dd97f77f5927e7b5725bdac7472c9ec5b27f53a5a13179f0612f - languageName: node - linkType: hard - -"@types/uuid@npm:^10.0.0": - version: 10.0.0 - resolution: "@types/uuid@npm:10.0.0" - checksum: 10c0/9a1404bf287164481cb9b97f6bb638f78f955be57c40c6513b7655160beb29df6f84c915aaf4089a1559c216557dc4d2f79b48d978742d3ae10b937420ddac60 - languageName: node - linkType: hard - -"@types/ws@npm:^8.5.10": - version: 8.5.13 - resolution: "@types/ws@npm:8.5.13" - dependencies: - "@types/node": "npm:*" - checksum: 10c0/a5430aa479bde588e69cb9175518d72f9338b6999e3b2ae16fc03d3bdcff8347e486dc031e4ed14601260463c07e1f9a0d7511dfc653712b047c439c680b0b34 - languageName: node - linkType: hard - -"@typescript-eslint/eslint-plugin@npm:^8.19.1": - version: 8.19.1 - resolution: "@typescript-eslint/eslint-plugin@npm:8.19.1" - dependencies: - "@eslint-community/regexpp": "npm:^4.10.0" - "@typescript-eslint/scope-manager": "npm:8.19.1" - "@typescript-eslint/type-utils": "npm:8.19.1" - "@typescript-eslint/utils": "npm:8.19.1" - "@typescript-eslint/visitor-keys": "npm:8.19.1" - graphemer: "npm:^1.4.0" - ignore: "npm:^5.3.1" - natural-compare: "npm:^1.4.0" - ts-api-utils: "npm:^2.0.0" - peerDependencies: - "@typescript-eslint/parser": ^8.0.0 || ^8.0.0-alpha.0 - eslint: ^8.57.0 || ^9.0.0 - typescript: ">=4.8.4 <5.8.0" - checksum: 10c0/993784b04533b13c3f3919c793cfc3a369fa61692e1a2d72de6fba27df247c275d852cdcbc4e393c310b73fce8d34d210a9b632b66f4d761a1a3b4781f8fa93f - languageName: node - linkType: hard - -"@typescript-eslint/parser@npm:^8.19.1": - version: 8.19.1 - resolution: "@typescript-eslint/parser@npm:8.19.1" - dependencies: - "@typescript-eslint/scope-manager": "npm:8.19.1" - "@typescript-eslint/types": "npm:8.19.1" - "@typescript-eslint/typescript-estree": "npm:8.19.1" - "@typescript-eslint/visitor-keys": "npm:8.19.1" - debug: "npm:^4.3.4" - peerDependencies: - eslint: ^8.57.0 || ^9.0.0 - typescript: ">=4.8.4 <5.8.0" - checksum: 10c0/1afbd2d0a25f439943bdc94637417429574eb3889a2a1ce24bd425721713aca213808a975bb518a6616171783bc04fa973167f05fc6a96cfd88c1d1666077ad4 - languageName: node - linkType: hard - -"@typescript-eslint/scope-manager@npm:8.19.1": - version: 8.19.1 - resolution: "@typescript-eslint/scope-manager@npm:8.19.1" - dependencies: - "@typescript-eslint/types": "npm:8.19.1" - "@typescript-eslint/visitor-keys": "npm:8.19.1" - checksum: 10c0/7dca0c28ad27a0c7e26499e0f584f98efdcf34087f46aadc661b36c310484b90655e83818bafd249b5a28c7094a69c54d553f6cd403869bf134f95a9148733f5 - languageName: node - linkType: hard - -"@typescript-eslint/type-utils@npm:8.19.1": - version: 8.19.1 - resolution: "@typescript-eslint/type-utils@npm:8.19.1" - dependencies: - "@typescript-eslint/typescript-estree": "npm:8.19.1" - "@typescript-eslint/utils": "npm:8.19.1" - debug: "npm:^4.3.4" - ts-api-utils: "npm:^2.0.0" - peerDependencies: - eslint: ^8.57.0 || ^9.0.0 - typescript: ">=4.8.4 <5.8.0" - checksum: 10c0/757592b515beec58c079c605aa648ba94d985ae48ba40460034e849c7bc2b603b1da6113e59688e284608c9d5ccaa27adf0a14fb032cb1782200c6acae51ddd2 - languageName: node - linkType: hard - -"@typescript-eslint/types@npm:8.19.1": - version: 8.19.1 - resolution: "@typescript-eslint/types@npm:8.19.1" - checksum: 10c0/e907bf096d5ed7a812a1e537a98dd881ab5d2d47e072225bfffaa218c1433115a148b27a15744db8374b46dac721617c6d13a1da255fdeb369cf193416533f6e - languageName: node - linkType: hard - -"@typescript-eslint/typescript-estree@npm:8.19.1": - version: 8.19.1 - resolution: "@typescript-eslint/typescript-estree@npm:8.19.1" - dependencies: - "@typescript-eslint/types": "npm:8.19.1" - "@typescript-eslint/visitor-keys": "npm:8.19.1" - debug: "npm:^4.3.4" - fast-glob: "npm:^3.3.2" - is-glob: "npm:^4.0.3" - minimatch: "npm:^9.0.4" - semver: "npm:^7.6.0" - ts-api-utils: "npm:^2.0.0" - peerDependencies: - typescript: ">=4.8.4 <5.8.0" - checksum: 10c0/549d9d565a58a25fc8397a555506f2e8d29a740f5b6ed9105479e22de5aab89d9d535959034a8e9d4115adb435de09ee6987d28e8922052eea577842ddce1a7a - languageName: node - linkType: hard - -"@typescript-eslint/utils@npm:8.19.1": - version: 8.19.1 - resolution: "@typescript-eslint/utils@npm:8.19.1" - dependencies: - "@eslint-community/eslint-utils": "npm:^4.4.0" - "@typescript-eslint/scope-manager": "npm:8.19.1" - "@typescript-eslint/types": "npm:8.19.1" - "@typescript-eslint/typescript-estree": "npm:8.19.1" - peerDependencies: - eslint: ^8.57.0 || ^9.0.0 - typescript: ">=4.8.4 <5.8.0" - checksum: 10c0/f7d2fe9a2bd8cb3ae6fafe5e465882a6784b2acf81d43d194c579381b92651c2ffc0fca69d2a35eee119f539622752a0e9ec063aaec7576d5d2bfe68b441980d - languageName: node - linkType: hard - -"@typescript-eslint/visitor-keys@npm:8.19.1": - version: 8.19.1 - resolution: "@typescript-eslint/visitor-keys@npm:8.19.1" - dependencies: - "@typescript-eslint/types": "npm:8.19.1" - eslint-visitor-keys: "npm:^4.2.0" - checksum: 10c0/117537450a099f51f3f0d39186f248ae370bdc1b7f6975dbdbffcfc89e6e1aa47c1870db790d4f778a48f2c1f6cd9c269b63867c12afaa424367c63dabee8fd0 - languageName: node - linkType: hard - -"@vitejs/plugin-basic-ssl@npm:1.1.0": - version: 1.1.0 - resolution: "@vitejs/plugin-basic-ssl@npm:1.1.0" - peerDependencies: - vite: ^3.0.0 || ^4.0.0 || ^5.0.0 - checksum: 10c0/98aadf5c7fd229995c67f973b4fb0f987a378031a4edcc5f714b412c00af12a6ecafb96659e76382ff9f8a831aac5243c74548e2807402ea8b02ec122d29f008 - languageName: node - linkType: hard - -"@webassemblyjs/ast@npm:1.14.1, @webassemblyjs/ast@npm:^1.12.1": - version: 1.14.1 - resolution: "@webassemblyjs/ast@npm:1.14.1" - dependencies: - "@webassemblyjs/helper-numbers": "npm:1.13.2" - "@webassemblyjs/helper-wasm-bytecode": "npm:1.13.2" - checksum: 10c0/67a59be8ed50ddd33fbb2e09daa5193ac215bf7f40a9371be9a0d9797a114d0d1196316d2f3943efdb923a3d809175e1563a3cb80c814fb8edccd1e77494972b - languageName: node - linkType: hard - -"@webassemblyjs/floating-point-hex-parser@npm:1.13.2": - version: 1.13.2 - resolution: "@webassemblyjs/floating-point-hex-parser@npm:1.13.2" - checksum: 10c0/0e88bdb8b50507d9938be64df0867f00396b55eba9df7d3546eb5dc0ca64d62e06f8d881ec4a6153f2127d0f4c11d102b6e7d17aec2f26bb5ff95a5e60652412 - languageName: node - linkType: hard - -"@webassemblyjs/helper-api-error@npm:1.13.2": - version: 1.13.2 - resolution: "@webassemblyjs/helper-api-error@npm:1.13.2" - checksum: 10c0/31be497f996ed30aae4c08cac3cce50c8dcd5b29660383c0155fce1753804fc55d47fcba74e10141c7dd2899033164e117b3bcfcda23a6b043e4ded4f1003dfb - languageName: node - linkType: hard - -"@webassemblyjs/helper-buffer@npm:1.14.1": - version: 1.14.1 - resolution: "@webassemblyjs/helper-buffer@npm:1.14.1" - checksum: 10c0/0d54105dc373c0fe6287f1091e41e3a02e36cdc05e8cf8533cdc16c59ff05a646355415893449d3768cda588af451c274f13263300a251dc11a575bc4c9bd210 - languageName: node - linkType: hard - -"@webassemblyjs/helper-numbers@npm:1.13.2": - version: 1.13.2 - resolution: "@webassemblyjs/helper-numbers@npm:1.13.2" - dependencies: - "@webassemblyjs/floating-point-hex-parser": "npm:1.13.2" - "@webassemblyjs/helper-api-error": "npm:1.13.2" - "@xtuc/long": "npm:4.2.2" - checksum: 10c0/9c46852f31b234a8fb5a5a9d3f027bc542392a0d4de32f1a9c0075d5e8684aa073cb5929b56df565500b3f9cc0a2ab983b650314295b9bf208d1a1651bfc825a - languageName: node - linkType: hard - -"@webassemblyjs/helper-wasm-bytecode@npm:1.13.2": - version: 1.13.2 - resolution: "@webassemblyjs/helper-wasm-bytecode@npm:1.13.2" - checksum: 10c0/c4355d14f369b30cf3cbdd3acfafc7d0488e086be6d578e3c9780bd1b512932352246be96e034e2a7fcfba4f540ec813352f312bfcbbfe5bcfbf694f82ccc682 - languageName: node - linkType: hard - -"@webassemblyjs/helper-wasm-section@npm:1.14.1": - version: 1.14.1 - resolution: "@webassemblyjs/helper-wasm-section@npm:1.14.1" - dependencies: - "@webassemblyjs/ast": "npm:1.14.1" - "@webassemblyjs/helper-buffer": "npm:1.14.1" - "@webassemblyjs/helper-wasm-bytecode": "npm:1.13.2" - "@webassemblyjs/wasm-gen": "npm:1.14.1" - checksum: 10c0/1f9b33731c3c6dbac3a9c483269562fa00d1b6a4e7133217f40e83e975e636fd0f8736e53abd9a47b06b66082ecc976c7384391ab0a68e12d509ea4e4b948d64 - languageName: node - linkType: hard - -"@webassemblyjs/ieee754@npm:1.13.2": - version: 1.13.2 - resolution: "@webassemblyjs/ieee754@npm:1.13.2" - dependencies: - "@xtuc/ieee754": "npm:^1.2.0" - checksum: 10c0/2e732ca78c6fbae3c9b112f4915d85caecdab285c0b337954b180460290ccd0fb00d2b1dc4bb69df3504abead5191e0d28d0d17dfd6c9d2f30acac8c4961c8a7 - languageName: node - linkType: hard - -"@webassemblyjs/leb128@npm:1.13.2": - version: 1.13.2 - resolution: "@webassemblyjs/leb128@npm:1.13.2" - dependencies: - "@xtuc/long": "npm:4.2.2" - checksum: 10c0/dad5ef9e383c8ab523ce432dfd80098384bf01c45f70eb179d594f85ce5db2f80fa8c9cba03adafd85684e6d6310f0d3969a882538975989919329ac4c984659 - languageName: node - linkType: hard - -"@webassemblyjs/utf8@npm:1.13.2": - version: 1.13.2 - resolution: "@webassemblyjs/utf8@npm:1.13.2" - checksum: 10c0/d3fac9130b0e3e5a1a7f2886124a278e9323827c87a2b971e6d0da22a2ba1278ac9f66a4f2e363ecd9fac8da42e6941b22df061a119e5c0335f81006de9ee799 - languageName: node - linkType: hard - -"@webassemblyjs/wasm-edit@npm:^1.12.1": - version: 1.14.1 - resolution: "@webassemblyjs/wasm-edit@npm:1.14.1" - dependencies: - "@webassemblyjs/ast": "npm:1.14.1" - "@webassemblyjs/helper-buffer": "npm:1.14.1" - "@webassemblyjs/helper-wasm-bytecode": "npm:1.13.2" - "@webassemblyjs/helper-wasm-section": "npm:1.14.1" - "@webassemblyjs/wasm-gen": "npm:1.14.1" - "@webassemblyjs/wasm-opt": "npm:1.14.1" - "@webassemblyjs/wasm-parser": "npm:1.14.1" - "@webassemblyjs/wast-printer": "npm:1.14.1" - checksum: 10c0/5ac4781086a2ca4b320bdbfd965a209655fe8a208ca38d89197148f8597e587c9a2c94fb6bd6f1a7dbd4527c49c6844fcdc2af981f8d793a97bf63a016aa86d2 - languageName: node - linkType: hard - -"@webassemblyjs/wasm-gen@npm:1.14.1": - version: 1.14.1 - resolution: "@webassemblyjs/wasm-gen@npm:1.14.1" - dependencies: - "@webassemblyjs/ast": "npm:1.14.1" - "@webassemblyjs/helper-wasm-bytecode": "npm:1.13.2" - "@webassemblyjs/ieee754": "npm:1.13.2" - "@webassemblyjs/leb128": "npm:1.13.2" - "@webassemblyjs/utf8": "npm:1.13.2" - checksum: 10c0/d678810d7f3f8fecb2e2bdadfb9afad2ec1d2bc79f59e4711ab49c81cec578371e22732d4966f59067abe5fba8e9c54923b57060a729d28d408e608beef67b10 - languageName: node - linkType: hard - -"@webassemblyjs/wasm-opt@npm:1.14.1": - version: 1.14.1 - resolution: "@webassemblyjs/wasm-opt@npm:1.14.1" - dependencies: - "@webassemblyjs/ast": "npm:1.14.1" - "@webassemblyjs/helper-buffer": "npm:1.14.1" - "@webassemblyjs/wasm-gen": "npm:1.14.1" - "@webassemblyjs/wasm-parser": "npm:1.14.1" - checksum: 10c0/515bfb15277ee99ba6b11d2232ddbf22aed32aad6d0956fe8a0a0a004a1b5a3a277a71d9a3a38365d0538ac40d1b7b7243b1a244ad6cd6dece1c1bb2eb5de7ee - languageName: node - linkType: hard - -"@webassemblyjs/wasm-parser@npm:1.14.1, @webassemblyjs/wasm-parser@npm:^1.12.1": - version: 1.14.1 - resolution: "@webassemblyjs/wasm-parser@npm:1.14.1" - dependencies: - "@webassemblyjs/ast": "npm:1.14.1" - "@webassemblyjs/helper-api-error": "npm:1.13.2" - "@webassemblyjs/helper-wasm-bytecode": "npm:1.13.2" - "@webassemblyjs/ieee754": "npm:1.13.2" - "@webassemblyjs/leb128": "npm:1.13.2" - "@webassemblyjs/utf8": "npm:1.13.2" - checksum: 10c0/95427b9e5addbd0f647939bd28e3e06b8deefdbdadcf892385b5edc70091bf9b92fa5faac3fce8333554437c5d85835afef8c8a7d9d27ab6ba01ffab954db8c6 - languageName: node - linkType: hard - -"@webassemblyjs/wast-printer@npm:1.14.1": - version: 1.14.1 - resolution: "@webassemblyjs/wast-printer@npm:1.14.1" - dependencies: - "@webassemblyjs/ast": "npm:1.14.1" - "@xtuc/long": "npm:4.2.2" - checksum: 10c0/8d7768608996a052545251e896eac079c98e0401842af8dd4de78fba8d90bd505efb6c537e909cd6dae96e09db3fa2e765a6f26492553a675da56e2db51f9d24 - languageName: node - linkType: hard - -"@xtuc/ieee754@npm:^1.2.0": - version: 1.2.0 - resolution: "@xtuc/ieee754@npm:1.2.0" - checksum: 10c0/a8565d29d135039bd99ae4b2220d3e167d22cf53f867e491ed479b3f84f895742d0097f935b19aab90265a23d5d46711e4204f14c479ae3637fbf06c4666882f - languageName: node - linkType: hard - -"@xtuc/long@npm:4.2.2": - version: 4.2.2 - resolution: "@xtuc/long@npm:4.2.2" - checksum: 10c0/8582cbc69c79ad2d31568c412129bf23d2b1210a1dfb60c82d5a1df93334da4ee51f3057051658569e2c196d8dc33bc05ae6b974a711d0d16e801e1d0647ccd1 - languageName: node - linkType: hard - -"@yarnpkg/lockfile@npm:1.1.0": - version: 1.1.0 - resolution: "@yarnpkg/lockfile@npm:1.1.0" - checksum: 10c0/0bfa50a3d756623d1f3409bc23f225a1d069424dbc77c6fd2f14fb377390cd57ec703dc70286e081c564be9051ead9ba85d81d66a3e68eeb6eb506d4e0c0fbda - languageName: node - linkType: hard - -"abbrev@npm:^2.0.0": - version: 2.0.0 - resolution: "abbrev@npm:2.0.0" - checksum: 10c0/f742a5a107473946f426c691c08daba61a1d15942616f300b5d32fd735be88fef5cba24201757b6c407fd564555fb48c751cfa33519b2605c8a7aadd22baf372 - languageName: node - linkType: hard - -"accepts@npm:~1.3.4, accepts@npm:~1.3.8": - version: 1.3.8 - resolution: "accepts@npm:1.3.8" - dependencies: - mime-types: "npm:~2.1.34" - negotiator: "npm:0.6.3" - checksum: 10c0/3a35c5f5586cfb9a21163ca47a5f77ac34fa8ceb5d17d2fa2c0d81f41cbd7f8c6fa52c77e2c039acc0f4d09e71abdc51144246900f6bef5e3c4b333f77d89362 - languageName: node - linkType: hard - -"acorn-jsx@npm:^5.3.2": - version: 5.3.2 - resolution: "acorn-jsx@npm:5.3.2" - peerDependencies: - acorn: ^6.0.0 || ^7.0.0 || ^8.0.0 - checksum: 10c0/4c54868fbef3b8d58927d5e33f0a4de35f59012fe7b12cf9dfbb345fb8f46607709e1c4431be869a23fb63c151033d84c4198fa9f79385cec34fcb1dd53974c1 - languageName: node - linkType: hard - -"acorn@npm:^8.14.0, acorn@npm:^8.8.2": - version: 8.14.0 - resolution: "acorn@npm:8.14.0" - bin: - acorn: bin/acorn - checksum: 10c0/6d4ee461a7734b2f48836ee0fbb752903606e576cc100eb49340295129ca0b452f3ba91ddd4424a1d4406a98adfb2ebb6bd0ff4c49d7a0930c10e462719bbfd7 - languageName: node - linkType: hard - -"adjust-sourcemap-loader@npm:^4.0.0": - version: 4.0.0 - resolution: "adjust-sourcemap-loader@npm:4.0.0" - dependencies: - loader-utils: "npm:^2.0.0" - regex-parser: "npm:^2.2.11" - checksum: 10c0/6a6e5bb8b670e4e1238c708f6163e92aa2ad0308fe5913de73c89e4cbf41738ee0bcc5552b94d0b7bf8be435ee49b78c6de8a6db7badd80762051e843c8aa14f - languageName: node - linkType: hard - -"agent-base@npm:^7.0.2, agent-base@npm:^7.1.0, agent-base@npm:^7.1.2": - version: 7.1.3 - resolution: "agent-base@npm:7.1.3" - checksum: 10c0/6192b580c5b1d8fb399b9c62bf8343d76654c2dd62afcb9a52b2cf44a8b6ace1e3b704d3fe3547d91555c857d3df02603341ff2cb961b9cfe2b12f9f3c38ee11 - languageName: node - linkType: hard - -"ajv-formats@npm:3.0.1": - version: 3.0.1 - resolution: "ajv-formats@npm:3.0.1" - dependencies: - ajv: "npm:^8.0.0" - peerDependencies: - ajv: ^8.0.0 - peerDependenciesMeta: - ajv: - optional: true - checksum: 10c0/168d6bca1ea9f163b41c8147bae537e67bd963357a5488a1eaf3abe8baa8eec806d4e45f15b10767e6020679315c7e1e5e6803088dfb84efa2b4e9353b83dd0a - languageName: node - linkType: hard - -"ajv-formats@npm:^2.1.1": - version: 2.1.1 - resolution: "ajv-formats@npm:2.1.1" - dependencies: - ajv: "npm:^8.0.0" - peerDependencies: - ajv: ^8.0.0 - peerDependenciesMeta: - ajv: - optional: true - checksum: 10c0/e43ba22e91b6a48d96224b83d260d3a3a561b42d391f8d3c6d2c1559f9aa5b253bfb306bc94bbeca1d967c014e15a6efe9a207309e95b3eaae07fcbcdc2af662 - languageName: node - linkType: hard - -"ajv-keywords@npm:^3.5.2": - version: 3.5.2 - resolution: "ajv-keywords@npm:3.5.2" - peerDependencies: - ajv: ^6.9.1 - checksum: 10c0/0c57a47cbd656e8cdfd99d7c2264de5868918ffa207c8d7a72a7f63379d4333254b2ba03d69e3c035e996a3fd3eb6d5725d7a1597cca10694296e32510546360 - languageName: node - linkType: hard - -"ajv-keywords@npm:^5.1.0": - version: 5.1.0 - resolution: "ajv-keywords@npm:5.1.0" - dependencies: - fast-deep-equal: "npm:^3.1.3" - peerDependencies: - ajv: ^8.8.2 - checksum: 10c0/18bec51f0171b83123ba1d8883c126e60c6f420cef885250898bf77a8d3e65e3bfb9e8564f497e30bdbe762a83e0d144a36931328616a973ee669dc74d4a9590 - languageName: node - linkType: hard - -"ajv@npm:8.17.1, ajv@npm:^8.0.0, ajv@npm:^8.9.0": - version: 8.17.1 - resolution: "ajv@npm:8.17.1" - dependencies: - fast-deep-equal: "npm:^3.1.3" - fast-uri: "npm:^3.0.1" - json-schema-traverse: "npm:^1.0.0" - require-from-string: "npm:^2.0.2" - checksum: 10c0/ec3ba10a573c6b60f94639ffc53526275917a2df6810e4ab5a6b959d87459f9ef3f00d5e7865b82677cb7d21590355b34da14d1d0b9c32d75f95a187e76fff35 - languageName: node - linkType: hard - -"ajv@npm:^6.12.4, ajv@npm:^6.12.5": - version: 6.12.6 - resolution: "ajv@npm:6.12.6" - dependencies: - fast-deep-equal: "npm:^3.1.1" - fast-json-stable-stringify: "npm:^2.0.0" - json-schema-traverse: "npm:^0.4.1" - uri-js: "npm:^4.2.2" - checksum: 10c0/41e23642cbe545889245b9d2a45854ebba51cda6c778ebced9649420d9205f2efb39cb43dbc41e358409223b1ea43303ae4839db682c848b891e4811da1a5a71 - languageName: node - linkType: hard - -"ansi-colors@npm:4.1.3": - version: 4.1.3 - resolution: "ansi-colors@npm:4.1.3" - checksum: 10c0/ec87a2f59902f74e61eada7f6e6fe20094a628dab765cfdbd03c3477599368768cffccdb5d3bb19a1b6c99126783a143b1fee31aab729b31ffe5836c7e5e28b9 - languageName: node - linkType: hard - -"ansi-escapes@npm:^4.3.2": - version: 4.3.2 - resolution: "ansi-escapes@npm:4.3.2" - dependencies: - type-fest: "npm:^0.21.3" - checksum: 10c0/da917be01871525a3dfcf925ae2977bc59e8c513d4423368645634bf5d4ceba5401574eb705c1e92b79f7292af5a656f78c5725a4b0e1cec97c4b413705c1d50 - languageName: node - linkType: hard - -"ansi-escapes@npm:^7.0.0": - version: 7.0.0 - resolution: "ansi-escapes@npm:7.0.0" - dependencies: - environment: "npm:^1.0.0" - checksum: 10c0/86e51e36fabef18c9c004af0a280573e828900641cea35134a124d2715e0c5a473494ab4ce396614505da77638ae290ff72dd8002d9747d2ee53f5d6bbe336be - languageName: node - linkType: hard - -"ansi-html-community@npm:^0.0.8": - version: 0.0.8 - resolution: "ansi-html-community@npm:0.0.8" - bin: - ansi-html: bin/ansi-html - checksum: 10c0/45d3a6f0b4f10b04fdd44bef62972e2470bfd917bf00439471fa7473d92d7cbe31369c73db863cc45dda115cb42527f39e232e9256115534b8ee5806b0caeed4 - languageName: node - linkType: hard - -"ansi-regex@npm:^5.0.1": - version: 5.0.1 - resolution: "ansi-regex@npm:5.0.1" - checksum: 10c0/9a64bb8627b434ba9327b60c027742e5d17ac69277960d041898596271d992d4d52ba7267a63ca10232e29f6107fc8a835f6ce8d719b88c5f8493f8254813737 - languageName: node - linkType: hard - -"ansi-regex@npm:^6.0.1": - version: 6.1.0 - resolution: "ansi-regex@npm:6.1.0" - checksum: 10c0/a91daeddd54746338478eef88af3439a7edf30f8e23196e2d6ed182da9add559c601266dbef01c2efa46a958ad6f1f8b176799657616c702b5b02e799e7fd8dc - languageName: node - linkType: hard - -"ansi-styles@npm:^4.0.0, ansi-styles@npm:^4.1.0": - version: 4.3.0 - resolution: "ansi-styles@npm:4.3.0" - dependencies: - color-convert: "npm:^2.0.1" - checksum: 10c0/895a23929da416f2bd3de7e9cb4eabd340949328ab85ddd6e484a637d8f6820d485f53933446f5291c3b760cbc488beb8e88573dd0f9c7daf83dccc8fe81b041 - languageName: node - linkType: hard - -"ansi-styles@npm:^6.0.0, ansi-styles@npm:^6.1.0, ansi-styles@npm:^6.2.1": - version: 6.2.1 - resolution: "ansi-styles@npm:6.2.1" - checksum: 10c0/5d1ec38c123984bcedd996eac680d548f31828bd679a66db2bdf11844634dde55fec3efa9c6bb1d89056a5e79c1ac540c4c784d592ea1d25028a92227d2f2d5c - languageName: node - linkType: hard - -"anymatch@npm:~3.1.2": - version: 3.1.3 - resolution: "anymatch@npm:3.1.3" - dependencies: - normalize-path: "npm:^3.0.0" - picomatch: "npm:^2.0.4" - checksum: 10c0/57b06ae984bc32a0d22592c87384cd88fe4511b1dd7581497831c56d41939c8a001b28e7b853e1450f2bf61992dfcaa8ae2d0d161a0a90c4fb631ef07098fbac - languageName: node - linkType: hard - -"argparse@npm:^2.0.1": - version: 2.0.1 - resolution: "argparse@npm:2.0.1" - checksum: 10c0/c5640c2d89045371c7cedd6a70212a04e360fd34d6edeae32f6952c63949e3525ea77dbec0289d8213a99bbaeab5abfa860b5c12cf88a2e6cf8106e90dd27a7e - languageName: node - linkType: hard - -"aria-query@npm:5.3.2": - version: 5.3.2 - resolution: "aria-query@npm:5.3.2" - checksum: 10c0/003c7e3e2cff5540bf7a7893775fc614de82b0c5dde8ae823d47b7a28a9d4da1f7ed85f340bdb93d5649caa927755f0e31ecc7ab63edfdfc00c8ef07e505e03e - languageName: node - linkType: hard - -"array-flatten@npm:1.1.1": - version: 1.1.1 - resolution: "array-flatten@npm:1.1.1" - checksum: 10c0/806966c8abb2f858b08f5324d9d18d7737480610f3bd5d3498aaae6eb5efdc501a884ba019c9b4a8f02ff67002058749d05548fd42fa8643f02c9c7f22198b91 - languageName: node - linkType: hard - -"autoprefixer@npm:10.4.20": - version: 10.4.20 - resolution: "autoprefixer@npm:10.4.20" - dependencies: - browserslist: "npm:^4.23.3" - caniuse-lite: "npm:^1.0.30001646" - fraction.js: "npm:^4.3.7" - normalize-range: "npm:^0.1.2" - picocolors: "npm:^1.0.1" - postcss-value-parser: "npm:^4.2.0" - peerDependencies: - postcss: ^8.1.0 - bin: - autoprefixer: bin/autoprefixer - checksum: 10c0/e1f00978a26e7c5b54ab12036d8c13833fad7222828fc90914771b1263f51b28c7ddb5803049de4e77696cbd02bb25cfc3634e80533025bb26c26aacdf938940 - languageName: node - linkType: hard - -"axobject-query@npm:4.1.0": - version: 4.1.0 - resolution: "axobject-query@npm:4.1.0" - checksum: 10c0/c470e4f95008f232eadd755b018cb55f16c03ccf39c027b941cd8820ac6b68707ce5d7368a46756db4256fbc91bb4ead368f84f7fb034b2b7932f082f6dc0775 - languageName: node - linkType: hard - -"babel-loader@npm:9.2.1": - version: 9.2.1 - resolution: "babel-loader@npm:9.2.1" - dependencies: - find-cache-dir: "npm:^4.0.0" - schema-utils: "npm:^4.0.0" - peerDependencies: - "@babel/core": ^7.12.0 - webpack: ">=5" - checksum: 10c0/efb82faff4c7c27e9c15bb28bf11c73200e61cf365118a9514e8d74dd489d0afc2a0d5aaa62cb4254eefc2ab631579224d95a03fd245410f28ea75e24de54ba4 - languageName: node - linkType: hard - -"babel-plugin-polyfill-corejs2@npm:^0.4.10": - version: 0.4.12 - resolution: "babel-plugin-polyfill-corejs2@npm:0.4.12" - dependencies: - "@babel/compat-data": "npm:^7.22.6" - "@babel/helper-define-polyfill-provider": "npm:^0.6.3" - semver: "npm:^6.3.1" - peerDependencies: - "@babel/core": ^7.4.0 || ^8.0.0-0 <8.0.0 - checksum: 10c0/49150c310de2d472ecb95bd892bca1aa833cf5e84bbb76e3e95cf9ff2c6c8c3b3783dd19d70ba50ff6235eb8ce1fa1c0affe491273c95a1ef6a2923f4d5a3819 - languageName: node - linkType: hard - -"babel-plugin-polyfill-corejs3@npm:^0.10.6": - version: 0.10.6 - resolution: "babel-plugin-polyfill-corejs3@npm:0.10.6" - dependencies: - "@babel/helper-define-polyfill-provider": "npm:^0.6.2" - core-js-compat: "npm:^3.38.0" - peerDependencies: - "@babel/core": ^7.4.0 || ^8.0.0-0 <8.0.0 - checksum: 10c0/3a69220471b07722c2ae6537310bf26b772514e12b601398082965459c838be70a0ca70b0662f0737070654ff6207673391221d48599abb4a2b27765206d9f79 - languageName: node - linkType: hard - -"babel-plugin-polyfill-regenerator@npm:^0.6.1": - version: 0.6.3 - resolution: "babel-plugin-polyfill-regenerator@npm:0.6.3" - dependencies: - "@babel/helper-define-polyfill-provider": "npm:^0.6.3" - peerDependencies: - "@babel/core": ^7.4.0 || ^8.0.0-0 <8.0.0 - checksum: 10c0/40164432e058e4b5c6d56feecacdad22692ae0534bd80c92d5399ed9e1a6a2b6797c8fda837995daddd4ca391f9aa2d58c74ad465164922e0f73631eaf9c4f76 - languageName: node - linkType: hard - -"balanced-match@npm:^1.0.0": - version: 1.0.2 - resolution: "balanced-match@npm:1.0.2" - checksum: 10c0/9308baf0a7e4838a82bbfd11e01b1cb0f0cf2893bc1676c27c2a8c0e70cbae1c59120c3268517a8ae7fb6376b4639ef81ca22582611dbee4ed28df945134aaee - languageName: node - linkType: hard - -"base64-js@npm:^1.3.1": - version: 1.5.1 - resolution: "base64-js@npm:1.5.1" - checksum: 10c0/f23823513b63173a001030fae4f2dabe283b99a9d324ade3ad3d148e218134676f1ee8568c877cd79ec1c53158dcf2d2ba527a97c606618928ba99dd930102bf - languageName: node - linkType: hard - -"batch@npm:0.6.1": - version: 0.6.1 - resolution: "batch@npm:0.6.1" - checksum: 10c0/925a13897b4db80d4211082fe287bcf96d297af38e26448c857cee3e095c9792e3b8f26b37d268812e7f38a589f694609de8534a018b1937d7dc9f84e6b387c5 - languageName: node - linkType: hard - -"beasties@npm:0.1.0": - version: 0.1.0 - resolution: "beasties@npm:0.1.0" - dependencies: - css-select: "npm:^5.1.0" - css-what: "npm:^6.1.0" - dom-serializer: "npm:^2.0.0" - domhandler: "npm:^5.0.3" - htmlparser2: "npm:^9.0.0" - picocolors: "npm:^1.1.1" - postcss: "npm:^8.4.47" - postcss-media-query-parser: "npm:^0.2.3" - checksum: 10c0/62c7b6ad21283843e4de18d6458850a9b60bf3bedcb393b4a953144ace9617aa1fdc4f5eb3901c87aa428ebe24aaabe21af727b4e5c57965012b56bfbc0ed46a - languageName: node - linkType: hard - -"big.js@npm:^5.2.2": - version: 5.2.2 - resolution: "big.js@npm:5.2.2" - checksum: 10c0/230520f1ff920b2d2ce3e372d77a33faa4fa60d802fe01ca4ffbc321ee06023fe9a741ac02793ee778040a16b7e497f7d60c504d1c402b8fdab6f03bb785a25f - languageName: node - linkType: hard - -"binary-extensions@npm:^2.0.0": - version: 2.3.0 - resolution: "binary-extensions@npm:2.3.0" - checksum: 10c0/75a59cafc10fb12a11d510e77110c6c7ae3f4ca22463d52487709ca7f18f69d886aa387557cc9864fbdb10153d0bdb4caacabf11541f55e89ed6e18d12ece2b5 - languageName: node - linkType: hard - -"bl@npm:^4.1.0": - version: 4.1.0 - resolution: "bl@npm:4.1.0" - dependencies: - buffer: "npm:^5.5.0" - inherits: "npm:^2.0.4" - readable-stream: "npm:^3.4.0" - checksum: 10c0/02847e1d2cb089c9dc6958add42e3cdeaf07d13f575973963335ac0fdece563a50ac770ac4c8fa06492d2dd276f6cc3b7f08c7cd9c7a7ad0f8d388b2a28def5f - languageName: node - linkType: hard - -"body-parser@npm:1.20.3": - version: 1.20.3 - resolution: "body-parser@npm:1.20.3" - dependencies: - bytes: "npm:3.1.2" - content-type: "npm:~1.0.5" - debug: "npm:2.6.9" - depd: "npm:2.0.0" - destroy: "npm:1.2.0" - http-errors: "npm:2.0.0" - iconv-lite: "npm:0.4.24" - on-finished: "npm:2.4.1" - qs: "npm:6.13.0" - raw-body: "npm:2.5.2" - type-is: "npm:~1.6.18" - unpipe: "npm:1.0.0" - checksum: 10c0/0a9a93b7518f222885498dcecaad528cf010dd109b071bf471c93def4bfe30958b83e03496eb9c1ad4896db543d999bb62be1a3087294162a88cfa1b42c16310 - languageName: node - linkType: hard - -"bonjour-service@npm:^1.2.1": - version: 1.3.0 - resolution: "bonjour-service@npm:1.3.0" - dependencies: - fast-deep-equal: "npm:^3.1.3" - multicast-dns: "npm:^7.2.5" - checksum: 10c0/5721fd9f9bb968e9cc16c1e8116d770863dd2329cb1f753231de1515870648c225142b7eefa71f14a5c22bc7b37ddd7fdeb018700f28a8c936d50d4162d433c7 - languageName: node - linkType: hard - -"boolbase@npm:^1.0.0": - version: 1.0.0 - resolution: "boolbase@npm:1.0.0" - checksum: 10c0/e4b53deb4f2b85c52be0e21a273f2045c7b6a6ea002b0e139c744cb6f95e9ec044439a52883b0d74dedd1ff3da55ed140cfdddfed7fb0cccbed373de5dce1bcf - languageName: node - linkType: hard - -"brace-expansion@npm:^1.1.7": - version: 1.1.11 - resolution: "brace-expansion@npm:1.1.11" - dependencies: - balanced-match: "npm:^1.0.0" - concat-map: "npm:0.0.1" - checksum: 10c0/695a56cd058096a7cb71fb09d9d6a7070113c7be516699ed361317aca2ec169f618e28b8af352e02ab4233fb54eb0168460a40dc320bab0034b36ab59aaad668 - languageName: node - linkType: hard - -"brace-expansion@npm:^2.0.1": - version: 2.0.1 - resolution: "brace-expansion@npm:2.0.1" - dependencies: - balanced-match: "npm:^1.0.0" - checksum: 10c0/b358f2fe060e2d7a87aa015979ecea07f3c37d4018f8d6deb5bd4c229ad3a0384fe6029bb76cd8be63c81e516ee52d1a0673edbe2023d53a5191732ae3c3e49f - languageName: node - linkType: hard - -"braces@npm:^3.0.3, braces@npm:~3.0.2": - version: 3.0.3 - resolution: "braces@npm:3.0.3" - dependencies: - fill-range: "npm:^7.1.1" - checksum: 10c0/7c6dfd30c338d2997ba77500539227b9d1f85e388a5f43220865201e407e076783d0881f2d297b9f80951b4c957fcf0b51c1d2d24227631643c3f7c284b0aa04 - languageName: node - linkType: hard - -"browserslist@npm:^4.21.5, browserslist@npm:^4.23.0, browserslist@npm:^4.23.3, browserslist@npm:^4.24.0, browserslist@npm:^4.24.3": - version: 4.24.4 - resolution: "browserslist@npm:4.24.4" - dependencies: - caniuse-lite: "npm:^1.0.30001688" - electron-to-chromium: "npm:^1.5.73" - node-releases: "npm:^2.0.19" - update-browserslist-db: "npm:^1.1.1" - bin: - browserslist: cli.js - checksum: 10c0/db7ebc1733cf471e0b490b4f47e3e2ea2947ce417192c9246644e92c667dd56a71406cc58f62ca7587caf828364892e9952904a02b7aead752bc65b62a37cfe9 - languageName: node - linkType: hard - -"buffer-from@npm:^1.0.0": - version: 1.1.2 - resolution: "buffer-from@npm:1.1.2" - checksum: 10c0/124fff9d66d691a86d3b062eff4663fe437a9d9ee4b47b1b9e97f5a5d14f6d5399345db80f796827be7c95e70a8e765dd404b7c3ff3b3324f98e9b0c8826cc34 - languageName: node - linkType: hard - -"buffer@npm:^5.5.0": - version: 5.7.1 - resolution: "buffer@npm:5.7.1" - dependencies: - base64-js: "npm:^1.3.1" - ieee754: "npm:^1.1.13" - checksum: 10c0/27cac81cff434ed2876058d72e7c4789d11ff1120ef32c9de48f59eab58179b66710c488987d295ae89a228f835fc66d088652dffeb8e3ba8659f80eb091d55e - languageName: node - linkType: hard - -"bundle-name@npm:^4.1.0": - version: 4.1.0 - resolution: "bundle-name@npm:4.1.0" - dependencies: - run-applescript: "npm:^7.0.0" - checksum: 10c0/8e575981e79c2bcf14d8b1c027a3775c095d362d1382312f444a7c861b0e21513c0bd8db5bd2b16e50ba0709fa622d4eab6b53192d222120305e68359daece29 - languageName: node - linkType: hard - -"bytes@npm:3.1.2": - version: 3.1.2 - resolution: "bytes@npm:3.1.2" - checksum: 10c0/76d1c43cbd602794ad8ad2ae94095cddeb1de78c5dddaa7005c51af10b0176c69971a6d88e805a90c2b6550d76636e43c40d8427a808b8645ede885de4a0358e - languageName: node - linkType: hard - -"cacache@npm:^19.0.0, cacache@npm:^19.0.1": - version: 19.0.1 - resolution: "cacache@npm:19.0.1" - dependencies: - "@npmcli/fs": "npm:^4.0.0" - fs-minipass: "npm:^3.0.0" - glob: "npm:^10.2.2" - lru-cache: "npm:^10.0.1" - minipass: "npm:^7.0.3" - minipass-collect: "npm:^2.0.1" - minipass-flush: "npm:^1.0.5" - minipass-pipeline: "npm:^1.2.4" - p-map: "npm:^7.0.2" - ssri: "npm:^12.0.0" - tar: "npm:^7.4.3" - unique-filename: "npm:^4.0.0" - checksum: 10c0/01f2134e1bd7d3ab68be851df96c8d63b492b1853b67f2eecb2c37bb682d37cb70bb858a16f2f0554d3c0071be6dfe21456a1ff6fa4b7eed996570d6a25ffe9c - languageName: node - linkType: hard - -"call-bind-apply-helpers@npm:^1.0.1": - version: 1.0.1 - resolution: "call-bind-apply-helpers@npm:1.0.1" - dependencies: - es-errors: "npm:^1.3.0" - function-bind: "npm:^1.1.2" - checksum: 10c0/acb2ab68bf2718e68a3e895f0d0b73ccc9e45b9b6f210f163512ba76f91dab409eb8792f6dae188356f9095747512a3101646b3dea9d37fb8c7c6bf37796d18c - languageName: node - linkType: hard - -"call-bound@npm:^1.0.2": - version: 1.0.3 - resolution: "call-bound@npm:1.0.3" - dependencies: - call-bind-apply-helpers: "npm:^1.0.1" - get-intrinsic: "npm:^1.2.6" - checksum: 10c0/45257b8e7621067304b30dbd638e856cac913d31e8e00a80d6cf172911acd057846572d0b256b45e652d515db6601e2974a1b1a040e91b4fc36fb3dd86fa69cf - languageName: node - linkType: hard - -"callsites@npm:^3.0.0": - version: 3.1.0 - resolution: "callsites@npm:3.1.0" - checksum: 10c0/fff92277400eb06c3079f9e74f3af120db9f8ea03bad0e84d9aede54bbe2d44a56cccb5f6cf12211f93f52306df87077ecec5b712794c5a9b5dac6d615a3f301 - languageName: node - linkType: hard - -"caniuse-lite@npm:^1.0.30001646, caniuse-lite@npm:^1.0.30001688": - version: 1.0.30001692 - resolution: "caniuse-lite@npm:1.0.30001692" - checksum: 10c0/fca5105561ea12f3de593f3b0f062af82f7d07519e8dbcb97f34e7fd23349bcef1b1622a9a6cd2164d98e3d2f20059ef7e271edae46567aef88caf4c16c7708a - languageName: node - linkType: hard - -"chalk@npm:^4.0.0, chalk@npm:^4.1.0": - version: 4.1.2 - resolution: "chalk@npm:4.1.2" - dependencies: - ansi-styles: "npm:^4.1.0" - supports-color: "npm:^7.1.0" - checksum: 10c0/4a3fef5cc34975c898ffe77141450f679721df9dde00f6c304353fa9c8b571929123b26a0e4617bde5018977eb655b31970c297b91b63ee83bb82aeb04666880 - languageName: node - linkType: hard - -"character-entities@npm:^2.0.0": - version: 2.0.2 - resolution: "character-entities@npm:2.0.2" - checksum: 10c0/b0c645a45bcc90ff24f0e0140f4875a8436b8ef13b6bcd31ec02cfb2ca502b680362aa95386f7815bdc04b6464d48cf191210b3840d7c04241a149ede591a308 - languageName: node - linkType: hard - -"chardet@npm:^0.7.0": - version: 0.7.0 - resolution: "chardet@npm:0.7.0" - checksum: 10c0/96e4731b9ec8050cbb56ab684e8c48d6c33f7826b755802d14e3ebfdc51c57afeece3ea39bc6b09acc359e4363525388b915e16640c1378053820f5e70d0f27d - languageName: node - linkType: hard - -"chipmunk@workspace:.": - version: 0.0.0-use.local - resolution: "chipmunk@workspace:." - dependencies: - "@angular-devkit/build-angular": "npm:^19.0.7" - "@angular-eslint/builder": "npm:^19.0.2" - "@angular-eslint/eslint-plugin": "npm:^19.0.2" - "@angular-eslint/eslint-plugin-template": "npm:^19.0.2" - "@angular-eslint/schematics": "npm:^19.0.2" - "@angular-eslint/template-parser": "npm:^19.0.2" - "@angular/animations": "npm:^19.0.6" - "@angular/cdk": "npm:^19.0.5" - "@angular/cli": "npm:^19.0.7" - "@angular/common": "npm:^19.0.6" - "@angular/compiler": "npm:^19.0.6" - "@angular/compiler-cli": "npm:^19.0.6" - "@angular/core": "npm:^19.0.6" - "@angular/forms": "npm:^19.0.6" - "@angular/material": "npm:^19.0.5" - "@angular/platform-browser": "npm:^19.0.6" - "@angular/platform-browser-dynamic": "npm:^19.0.6" - "@angular/router": "npm:^19.0.6" - "@types/node": "npm:^22.10.5" - "@types/uuid": "npm:^10.0.0" - "@typescript-eslint/eslint-plugin": "npm:^8.19.1" - "@typescript-eslint/parser": "npm:^8.19.1" - eslint: "npm:^9.17.0" - globals: "npm:^15.14.0" - micromark: "npm:^4.0.1" - moment: "npm:^2.30.1" - moment-timezone: "npm:^0.5.46" - rxjs: "npm:^7.8.0" - tslib: "npm:^2.6.0" - typescript: "npm:5.6.3" - uuid: "npm:^11.0.5" - zone.js: "npm:^0.15.0" - languageName: unknown - linkType: soft - -"chokidar@npm:^3.6.0": - version: 3.6.0 - resolution: "chokidar@npm:3.6.0" - dependencies: - anymatch: "npm:~3.1.2" - braces: "npm:~3.0.2" - fsevents: "npm:~2.3.2" - glob-parent: "npm:~5.1.2" - is-binary-path: "npm:~2.1.0" - is-glob: "npm:~4.0.1" - normalize-path: "npm:~3.0.0" - readdirp: "npm:~3.6.0" - dependenciesMeta: - fsevents: - optional: true - checksum: 10c0/8361dcd013f2ddbe260eacb1f3cb2f2c6f2b0ad118708a343a5ed8158941a39cb8fb1d272e0f389712e74ee90ce8ba864eece9e0e62b9705cb468a2f6d917462 - languageName: node - linkType: hard - -"chokidar@npm:^4.0.0": - version: 4.0.3 - resolution: "chokidar@npm:4.0.3" - dependencies: - readdirp: "npm:^4.0.1" - checksum: 10c0/a58b9df05bb452f7d105d9e7229ac82fa873741c0c40ddcc7bb82f8a909fbe3f7814c9ebe9bc9a2bef9b737c0ec6e2d699d179048ef06ad3ec46315df0ebe6ad - languageName: node - linkType: hard - -"chownr@npm:^2.0.0": - version: 2.0.0 - resolution: "chownr@npm:2.0.0" - checksum: 10c0/594754e1303672171cc04e50f6c398ae16128eb134a88f801bf5354fd96f205320f23536a045d9abd8b51024a149696e51231565891d4efdab8846021ecf88e6 - languageName: node - linkType: hard - -"chownr@npm:^3.0.0": - version: 3.0.0 - resolution: "chownr@npm:3.0.0" - checksum: 10c0/43925b87700f7e3893296c8e9c56cc58f926411cce3a6e5898136daaf08f08b9a8eb76d37d3267e707d0dcc17aed2e2ebdf5848c0c3ce95cf910a919935c1b10 - languageName: node - linkType: hard - -"chrome-trace-event@npm:^1.0.2": - version: 1.0.4 - resolution: "chrome-trace-event@npm:1.0.4" - checksum: 10c0/3058da7a5f4934b87cf6a90ef5fb68ebc5f7d06f143ed5a4650208e5d7acae47bc03ec844b29fbf5ba7e46e8daa6acecc878f7983a4f4bb7271593da91e61ff5 - languageName: node - linkType: hard - -"cli-cursor@npm:^3.1.0": - version: 3.1.0 - resolution: "cli-cursor@npm:3.1.0" - dependencies: - restore-cursor: "npm:^3.1.0" - checksum: 10c0/92a2f98ff9037d09be3dfe1f0d749664797fb674bf388375a2207a1203b69d41847abf16434203e0089212479e47a358b13a0222ab9fccfe8e2644a7ccebd111 - languageName: node - linkType: hard - -"cli-cursor@npm:^5.0.0": - version: 5.0.0 - resolution: "cli-cursor@npm:5.0.0" - dependencies: - restore-cursor: "npm:^5.0.0" - checksum: 10c0/7ec62f69b79f6734ab209a3e4dbdc8af7422d44d360a7cb1efa8a0887bbe466a6e625650c466fe4359aee44dbe2dc0b6994b583d40a05d0808a5cb193641d220 - languageName: node - linkType: hard - -"cli-spinners@npm:^2.5.0": - version: 2.9.2 - resolution: "cli-spinners@npm:2.9.2" - checksum: 10c0/907a1c227ddf0d7a101e7ab8b300affc742ead4b4ebe920a5bf1bc6d45dce2958fcd195eb28fa25275062fe6fa9b109b93b63bc8033396ed3bcb50297008b3a3 - languageName: node - linkType: hard - -"cli-truncate@npm:^4.0.0": - version: 4.0.0 - resolution: "cli-truncate@npm:4.0.0" - dependencies: - slice-ansi: "npm:^5.0.0" - string-width: "npm:^7.0.0" - checksum: 10c0/d7f0b73e3d9b88cb496e6c086df7410b541b56a43d18ade6a573c9c18bd001b1c3fba1ad578f741a4218fdc794d042385f8ac02c25e1c295a2d8b9f3cb86eb4c - languageName: node - linkType: hard - -"cli-width@npm:^4.1.0": - version: 4.1.0 - resolution: "cli-width@npm:4.1.0" - checksum: 10c0/1fbd56413578f6117abcaf858903ba1f4ad78370a4032f916745fa2c7e390183a9d9029cf837df320b0fdce8137668e522f60a30a5f3d6529ff3872d265a955f - languageName: node - linkType: hard - -"cliui@npm:^8.0.1": - version: 8.0.1 - resolution: "cliui@npm:8.0.1" - dependencies: - string-width: "npm:^4.2.0" - strip-ansi: "npm:^6.0.1" - wrap-ansi: "npm:^7.0.0" - checksum: 10c0/4bda0f09c340cbb6dfdc1ed508b3ca080f12992c18d68c6be4d9cf51756033d5266e61ec57529e610dacbf4da1c634423b0c1b11037709cc6b09045cbd815df5 - languageName: node - linkType: hard - -"clone-deep@npm:^4.0.1": - version: 4.0.1 - resolution: "clone-deep@npm:4.0.1" - dependencies: - is-plain-object: "npm:^2.0.4" - kind-of: "npm:^6.0.2" - shallow-clone: "npm:^3.0.0" - checksum: 10c0/637753615aa24adf0f2d505947a1bb75e63964309034a1cf56ba4b1f30af155201edd38d26ffe26911adaae267a3c138b344a4947d39f5fc1b6d6108125aa758 - languageName: node - linkType: hard - -"clone@npm:^1.0.2": - version: 1.0.4 - resolution: "clone@npm:1.0.4" - checksum: 10c0/2176952b3649293473999a95d7bebfc9dc96410f6cbd3d2595cf12fd401f63a4bf41a7adbfd3ab2ff09ed60cb9870c58c6acdd18b87767366fabfc163700f13b - languageName: node - linkType: hard - -"color-convert@npm:^2.0.1": - version: 2.0.1 - resolution: "color-convert@npm:2.0.1" - dependencies: - color-name: "npm:~1.1.4" - checksum: 10c0/37e1150172f2e311fe1b2df62c6293a342ee7380da7b9cfdba67ea539909afbd74da27033208d01d6d5cfc65ee7868a22e18d7e7648e004425441c0f8a15a7d7 - languageName: node - linkType: hard - -"color-name@npm:~1.1.4": - version: 1.1.4 - resolution: "color-name@npm:1.1.4" - checksum: 10c0/a1a3f914156960902f46f7f56bc62effc6c94e84b2cae157a526b1c1f74b677a47ec602bf68a61abfa2b42d15b7c5651c6dbe72a43af720bc588dff885b10f95 - languageName: node - linkType: hard - -"colorette@npm:^2.0.10, colorette@npm:^2.0.20": - version: 2.0.20 - resolution: "colorette@npm:2.0.20" - checksum: 10c0/e94116ff33b0ff56f3b83b9ace895e5bf87c2a7a47b3401b8c3f3226e050d5ef76cf4072fb3325f9dc24d1698f9b730baf4e05eeaf861d74a1883073f4c98a40 - languageName: node - linkType: hard - -"commander@npm:^2.20.0": - version: 2.20.3 - resolution: "commander@npm:2.20.3" - checksum: 10c0/74c781a5248c2402a0a3e966a0a2bba3c054aad144f5c023364be83265e796b20565aa9feff624132ff629aa64e16999fa40a743c10c12f7c61e96a794b99288 - languageName: node - linkType: hard - -"common-path-prefix@npm:^3.0.0": - version: 3.0.0 - resolution: "common-path-prefix@npm:3.0.0" - checksum: 10c0/c4a74294e1b1570f4a8ab435285d185a03976c323caa16359053e749db4fde44e3e6586c29cd051100335e11895767cbbd27ea389108e327d62f38daf4548fdb - languageName: node - linkType: hard - -"compressible@npm:~2.0.18": - version: 2.0.18 - resolution: "compressible@npm:2.0.18" - dependencies: - mime-db: "npm:>= 1.43.0 < 2" - checksum: 10c0/8a03712bc9f5b9fe530cc5a79e164e665550d5171a64575d7dcf3e0395d7b4afa2d79ab176c61b5b596e28228b350dd07c1a2a6ead12fd81d1b6cd632af2fef7 - languageName: node - linkType: hard - -"compression@npm:^1.7.4": - version: 1.7.5 - resolution: "compression@npm:1.7.5" - dependencies: - bytes: "npm:3.1.2" - compressible: "npm:~2.0.18" - debug: "npm:2.6.9" - negotiator: "npm:~0.6.4" - on-headers: "npm:~1.0.2" - safe-buffer: "npm:5.2.1" - vary: "npm:~1.1.2" - checksum: 10c0/35c9d2d57c86d8107eab5e637f2146fcefec8475a2ff3e162f5eb0982ff856d385fb5d8c9823c3d50e075f2d9304bc622dac3df27bfef0355309c0a5307861c5 - languageName: node - linkType: hard - -"concat-map@npm:0.0.1": - version: 0.0.1 - resolution: "concat-map@npm:0.0.1" - checksum: 10c0/c996b1cfdf95b6c90fee4dae37e332c8b6eb7d106430c17d538034c0ad9a1630cb194d2ab37293b1bdd4d779494beee7786d586a50bd9376fd6f7bcc2bd4c98f - languageName: node - linkType: hard - -"connect-history-api-fallback@npm:^2.0.0": - version: 2.0.0 - resolution: "connect-history-api-fallback@npm:2.0.0" - checksum: 10c0/90fa8b16ab76e9531646cc70b010b1dbd078153730c510d3142f6cf07479ae8a812c5a3c0e40a28528dd1681a62395d0cfdef67da9e914c4772ac85d69a3ed87 - languageName: node - linkType: hard - -"content-disposition@npm:0.5.4": - version: 0.5.4 - resolution: "content-disposition@npm:0.5.4" - dependencies: - safe-buffer: "npm:5.2.1" - checksum: 10c0/bac0316ebfeacb8f381b38285dc691c9939bf0a78b0b7c2d5758acadad242d04783cee5337ba7d12a565a19075af1b3c11c728e1e4946de73c6ff7ce45f3f1bb - languageName: node - linkType: hard - -"content-type@npm:~1.0.4, content-type@npm:~1.0.5": - version: 1.0.5 - resolution: "content-type@npm:1.0.5" - checksum: 10c0/b76ebed15c000aee4678c3707e0860cb6abd4e680a598c0a26e17f0bfae723ec9cc2802f0ff1bc6e4d80603719010431d2231018373d4dde10f9ccff9dadf5af - languageName: node - linkType: hard - -"convert-source-map@npm:^1.5.1, convert-source-map@npm:^1.7.0": - version: 1.9.0 - resolution: "convert-source-map@npm:1.9.0" - checksum: 10c0/281da55454bf8126cbc6625385928c43479f2060984180c42f3a86c8b8c12720a24eac260624a7d1e090004028d2dee78602330578ceec1a08e27cb8bb0a8a5b - languageName: node - linkType: hard - -"convert-source-map@npm:^2.0.0": - version: 2.0.0 - resolution: "convert-source-map@npm:2.0.0" - checksum: 10c0/8f2f7a27a1a011cc6cc88cc4da2d7d0cfa5ee0369508baae3d98c260bb3ac520691464e5bbe4ae7cdf09860c1d69ecc6f70c63c6e7c7f7e3f18ec08484dc7d9b - languageName: node - linkType: hard - -"cookie-signature@npm:1.0.6": - version: 1.0.6 - resolution: "cookie-signature@npm:1.0.6" - checksum: 10c0/b36fd0d4e3fef8456915fcf7742e58fbfcc12a17a018e0eb9501c9d5ef6893b596466f03b0564b81af29ff2538fd0aa4b9d54fe5ccbfb4c90ea50ad29fe2d221 - languageName: node - linkType: hard - -"cookie@npm:0.7.1": - version: 0.7.1 - resolution: "cookie@npm:0.7.1" - checksum: 10c0/5de60c67a410e7c8dc8a46a4b72eb0fe925871d057c9a5d2c0e8145c4270a4f81076de83410c4d397179744b478e33cd80ccbcc457abf40a9409ad27dcd21dde - languageName: node - linkType: hard - -"copy-anything@npm:^2.0.1": - version: 2.0.6 - resolution: "copy-anything@npm:2.0.6" - dependencies: - is-what: "npm:^3.14.1" - checksum: 10c0/2702998a8cc015f9917385b7f16b0d85f1f6e5e2fd34d99f14df584838f492f49aa0c390d973684c687e895c5c58d08b308a0400ac3e1e3d6fa1e5884a5402ad - languageName: node - linkType: hard - -"copy-webpack-plugin@npm:12.0.2": - version: 12.0.2 - resolution: "copy-webpack-plugin@npm:12.0.2" - dependencies: - fast-glob: "npm:^3.3.2" - glob-parent: "npm:^6.0.1" - globby: "npm:^14.0.0" - normalize-path: "npm:^3.0.0" - schema-utils: "npm:^4.2.0" - serialize-javascript: "npm:^6.0.2" - peerDependencies: - webpack: ^5.1.0 - checksum: 10c0/1a2715a1280a37b81b7040b89ed962db4aa75475b164f84f266fa4e81f209269b13f8bff10b104dff7558854bafedcdd4f30c40fd23ecd8fa28af45516b459cd - languageName: node - linkType: hard - -"core-js-compat@npm:^3.38.0, core-js-compat@npm:^3.38.1": - version: 3.40.0 - resolution: "core-js-compat@npm:3.40.0" - dependencies: - browserslist: "npm:^4.24.3" - checksum: 10c0/44f6e88726fe266a5be9581a79766800478a8d5c492885f2d4c2a4e2babd9b06bc1689d5340d3a61ae7332f990aff2e83b6203ff8773137a627cfedfbeefabeb - languageName: node - linkType: hard - -"core-util-is@npm:~1.0.0": - version: 1.0.3 - resolution: "core-util-is@npm:1.0.3" - checksum: 10c0/90a0e40abbddfd7618f8ccd63a74d88deea94e77d0e8dbbea059fa7ebebb8fbb4e2909667fe26f3a467073de1a542ebe6ae4c73a73745ac5833786759cd906c9 - languageName: node - linkType: hard - -"cosmiconfig@npm:^9.0.0": - version: 9.0.0 - resolution: "cosmiconfig@npm:9.0.0" - dependencies: - env-paths: "npm:^2.2.1" - import-fresh: "npm:^3.3.0" - js-yaml: "npm:^4.1.0" - parse-json: "npm:^5.2.0" - peerDependencies: - typescript: ">=4.9.5" - peerDependenciesMeta: - typescript: - optional: true - checksum: 10c0/1c1703be4f02a250b1d6ca3267e408ce16abfe8364193891afc94c2d5c060b69611fdc8d97af74b7e6d5d1aac0ab2fb94d6b079573146bc2d756c2484ce5f0ee - languageName: node - linkType: hard - -"cross-spawn@npm:^7.0.0, cross-spawn@npm:^7.0.6": - version: 7.0.6 - resolution: "cross-spawn@npm:7.0.6" - dependencies: - path-key: "npm:^3.1.0" - shebang-command: "npm:^2.0.0" - which: "npm:^2.0.1" - checksum: 10c0/053ea8b2135caff68a9e81470e845613e374e7309a47731e81639de3eaeb90c3d01af0e0b44d2ab9d50b43467223b88567dfeb3262db942dc063b9976718ffc1 - languageName: node - linkType: hard - -"css-loader@npm:7.1.2": - version: 7.1.2 - resolution: "css-loader@npm:7.1.2" - dependencies: - icss-utils: "npm:^5.1.0" - postcss: "npm:^8.4.33" - postcss-modules-extract-imports: "npm:^3.1.0" - postcss-modules-local-by-default: "npm:^4.0.5" - postcss-modules-scope: "npm:^3.2.0" - postcss-modules-values: "npm:^4.0.0" - postcss-value-parser: "npm:^4.2.0" - semver: "npm:^7.5.4" - peerDependencies: - "@rspack/core": 0.x || 1.x - webpack: ^5.27.0 - peerDependenciesMeta: - "@rspack/core": - optional: true - webpack: - optional: true - checksum: 10c0/edec9ed71e3c416c9c6ad41c138834c94baf7629de3b97a3337ae8cec4a45e05c57bdb7c4b4d267229fc04b8970d0d1c0734ded8dcd0ac8c7c286b36facdbbf0 - languageName: node - linkType: hard - -"css-select@npm:^5.1.0": - version: 5.1.0 - resolution: "css-select@npm:5.1.0" - dependencies: - boolbase: "npm:^1.0.0" - css-what: "npm:^6.1.0" - domhandler: "npm:^5.0.2" - domutils: "npm:^3.0.1" - nth-check: "npm:^2.0.1" - checksum: 10c0/551c60dba5b54054741032c1793b5734f6ba45e23ae9e82761a3c0ed1acbb8cfedfa443aaba3a3c1a54cac12b456d2012a09d2cd5f0e82e430454c1b9d84d500 - languageName: node - linkType: hard - -"css-what@npm:^6.1.0": - version: 6.1.0 - resolution: "css-what@npm:6.1.0" - checksum: 10c0/a09f5a6b14ba8dcf57ae9a59474722e80f20406c53a61e9aedb0eedc693b135113ffe2983f4efc4b5065ae639442e9ae88df24941ef159c218b231011d733746 - languageName: node - linkType: hard - -"cssesc@npm:^3.0.0": - version: 3.0.0 - resolution: "cssesc@npm:3.0.0" - bin: - cssesc: bin/cssesc - checksum: 10c0/6bcfd898662671be15ae7827120472c5667afb3d7429f1f917737f3bf84c4176003228131b643ae74543f17a394446247df090c597bb9a728cce298606ed0aa7 - languageName: node - linkType: hard - -"debug@npm:2.6.9": - version: 2.6.9 - resolution: "debug@npm:2.6.9" - dependencies: - ms: "npm:2.0.0" - checksum: 10c0/121908fb839f7801180b69a7e218a40b5a0b718813b886b7d6bdb82001b931c938e2941d1e4450f33a1b1df1da653f5f7a0440c197f29fbf8a6e9d45ff6ef589 - languageName: node - linkType: hard - -"debug@npm:4, debug@npm:^4.0.0, debug@npm:^4.1.0, debug@npm:^4.1.1, debug@npm:^4.3.1, debug@npm:^4.3.2, debug@npm:^4.3.4, debug@npm:^4.3.6": - version: 4.4.0 - resolution: "debug@npm:4.4.0" - dependencies: - ms: "npm:^2.1.3" - peerDependenciesMeta: - supports-color: - optional: true - checksum: 10c0/db94f1a182bf886f57b4755f85b3a74c39b5114b9377b7ab375dc2cfa3454f09490cc6c30f829df3fc8042bc8b8995f6567ce5cd96f3bc3688bd24027197d9de - languageName: node - linkType: hard - -"decode-named-character-reference@npm:^1.0.0": - version: 1.0.2 - resolution: "decode-named-character-reference@npm:1.0.2" - dependencies: - character-entities: "npm:^2.0.0" - checksum: 10c0/66a9fc5d9b5385a2b3675c69ba0d8e893393d64057f7dbbb585265bb4fc05ec513d76943b8e5aac7d8016d20eea4499322cbf4cd6d54b466976b78f3a7587a4c - languageName: node - linkType: hard - -"deep-is@npm:^0.1.3": - version: 0.1.4 - resolution: "deep-is@npm:0.1.4" - checksum: 10c0/7f0ee496e0dff14a573dc6127f14c95061b448b87b995fc96c017ce0a1e66af1675e73f1d6064407975bc4ea6ab679497a29fff7b5b9c4e99cb10797c1ad0b4c - languageName: node - linkType: hard - -"default-browser-id@npm:^5.0.0": - version: 5.0.0 - resolution: "default-browser-id@npm:5.0.0" - checksum: 10c0/957fb886502594c8e645e812dfe93dba30ed82e8460d20ce39c53c5b0f3e2afb6ceaec2249083b90bdfbb4cb0f34e1f73fde3d68cac00becdbcfd894156b5ead - languageName: node - linkType: hard - -"default-browser@npm:^5.2.1": - version: 5.2.1 - resolution: "default-browser@npm:5.2.1" - dependencies: - bundle-name: "npm:^4.1.0" - default-browser-id: "npm:^5.0.0" - checksum: 10c0/73f17dc3c58026c55bb5538749597db31f9561c0193cd98604144b704a981c95a466f8ecc3c2db63d8bfd04fb0d426904834cfc91ae510c6aeb97e13c5167c4d - languageName: node - linkType: hard - -"defaults@npm:^1.0.3": - version: 1.0.4 - resolution: "defaults@npm:1.0.4" - dependencies: - clone: "npm:^1.0.2" - checksum: 10c0/9cfbe498f5c8ed733775db62dfd585780387d93c17477949e1670bfcfb9346e0281ce8c4bf9f4ac1fc0f9b851113bd6dc9e41182ea1644ccd97de639fa13c35a - languageName: node - linkType: hard - -"define-lazy-prop@npm:^3.0.0": - version: 3.0.0 - resolution: "define-lazy-prop@npm:3.0.0" - checksum: 10c0/5ab0b2bf3fa58b3a443140bbd4cd3db1f91b985cc8a246d330b9ac3fc0b6a325a6d82bddc0b055123d745b3f9931afeea74a5ec545439a1630b9c8512b0eeb49 - languageName: node - linkType: hard - -"depd@npm:2.0.0": - version: 2.0.0 - resolution: "depd@npm:2.0.0" - checksum: 10c0/58bd06ec20e19529b06f7ad07ddab60e504d9e0faca4bd23079fac2d279c3594334d736508dc350e06e510aba5e22e4594483b3a6562ce7c17dd797f4cc4ad2c - languageName: node - linkType: hard - -"depd@npm:~1.1.2": - version: 1.1.2 - resolution: "depd@npm:1.1.2" - checksum: 10c0/acb24aaf936ef9a227b6be6d495f0d2eb20108a9a6ad40585c5bda1a897031512fef6484e4fdbb80bd249fdaa82841fa1039f416ece03188e677ba11bcfda249 - languageName: node - linkType: hard - -"dequal@npm:^2.0.0": - version: 2.0.3 - resolution: "dequal@npm:2.0.3" - checksum: 10c0/f98860cdf58b64991ae10205137c0e97d384c3a4edc7f807603887b7c4b850af1224a33d88012009f150861cbee4fa2d322c4cc04b9313bee312e47f6ecaa888 - languageName: node - linkType: hard - -"destroy@npm:1.2.0": - version: 1.2.0 - resolution: "destroy@npm:1.2.0" - checksum: 10c0/bd7633942f57418f5a3b80d5cb53898127bcf53e24cdf5d5f4396be471417671f0fee48a4ebe9a1e9defbde2a31280011af58a57e090ff822f589b443ed4e643 - languageName: node - linkType: hard - -"detect-libc@npm:^1.0.3": - version: 1.0.3 - resolution: "detect-libc@npm:1.0.3" - bin: - detect-libc: ./bin/detect-libc.js - checksum: 10c0/4da0deae9f69e13bc37a0902d78bf7169480004b1fed3c19722d56cff578d16f0e11633b7fbf5fb6249181236c72e90024cbd68f0b9558ae06e281f47326d50d - languageName: node - linkType: hard - -"detect-libc@npm:^2.0.1": - version: 2.0.3 - resolution: "detect-libc@npm:2.0.3" - checksum: 10c0/88095bda8f90220c95f162bf92cad70bd0e424913e655c20578600e35b91edc261af27531cf160a331e185c0ced93944bc7e09939143225f56312d7fd800fdb7 - languageName: node - linkType: hard - -"detect-node@npm:^2.0.4": - version: 2.1.0 - resolution: "detect-node@npm:2.1.0" - checksum: 10c0/f039f601790f2e9d4654e499913259a798b1f5246ae24f86ab5e8bd4aaf3bce50484234c494f11fb00aecb0c6e2733aa7b1cf3f530865640b65fbbd65b2c4e09 - languageName: node - linkType: hard - -"devlop@npm:^1.0.0": - version: 1.1.0 - resolution: "devlop@npm:1.1.0" - dependencies: - dequal: "npm:^2.0.0" - checksum: 10c0/e0928ab8f94c59417a2b8389c45c55ce0a02d9ac7fd74ef62d01ba48060129e1d594501b77de01f3eeafc7cb00773819b0df74d96251cf20b31c5b3071f45c0e - languageName: node - linkType: hard - -"dns-packet@npm:^5.2.2": - version: 5.6.1 - resolution: "dns-packet@npm:5.6.1" - dependencies: - "@leichtgewicht/ip-codec": "npm:^2.0.1" - checksum: 10c0/8948d3d03063fb68e04a1e386875f8c3bcc398fc375f535f2b438fad8f41bf1afa6f5e70893ba44f4ae884c089247e0a31045722fa6ff0f01d228da103f1811d - languageName: node - linkType: hard - -"dom-serializer@npm:^2.0.0": - version: 2.0.0 - resolution: "dom-serializer@npm:2.0.0" - dependencies: - domelementtype: "npm:^2.3.0" - domhandler: "npm:^5.0.2" - entities: "npm:^4.2.0" - checksum: 10c0/d5ae2b7110ca3746b3643d3ef60ef823f5f078667baf530cec096433f1627ec4b6fa8c072f09d079d7cda915fd2c7bc1b7b935681e9b09e591e1e15f4040b8e2 - languageName: node - linkType: hard - -"domelementtype@npm:^2.3.0": - version: 2.3.0 - resolution: "domelementtype@npm:2.3.0" - checksum: 10c0/686f5a9ef0fff078c1412c05db73a0dce096190036f33e400a07e2a4518e9f56b1e324f5c576a0a747ef0e75b5d985c040b0d51945ce780c0dd3c625a18cd8c9 - languageName: node - linkType: hard - -"domhandler@npm:^5.0.2, domhandler@npm:^5.0.3": - version: 5.0.3 - resolution: "domhandler@npm:5.0.3" - dependencies: - domelementtype: "npm:^2.3.0" - checksum: 10c0/bba1e5932b3e196ad6862286d76adc89a0dbf0c773e5ced1eb01f9af930c50093a084eff14b8de5ea60b895c56a04d5de8bbc4930c5543d029091916770b2d2a - languageName: node - linkType: hard - -"domutils@npm:^3.0.1, domutils@npm:^3.1.0": - version: 3.2.2 - resolution: "domutils@npm:3.2.2" - dependencies: - dom-serializer: "npm:^2.0.0" - domelementtype: "npm:^2.3.0" - domhandler: "npm:^5.0.3" - checksum: 10c0/47938f473b987ea71cd59e59626eb8666d3aa8feba5266e45527f3b636c7883cca7e582d901531961f742c519d7514636b7973353b648762b2e3bedbf235fada - languageName: node - linkType: hard - -"dunder-proto@npm:^1.0.1": - version: 1.0.1 - resolution: "dunder-proto@npm:1.0.1" - dependencies: - call-bind-apply-helpers: "npm:^1.0.1" - es-errors: "npm:^1.3.0" - gopd: "npm:^1.2.0" - checksum: 10c0/199f2a0c1c16593ca0a145dbf76a962f8033ce3129f01284d48c45ed4e14fea9bbacd7b3610b6cdc33486cef20385ac054948fefc6272fcce645c09468f93031 - languageName: node - linkType: hard - -"eastasianwidth@npm:^0.2.0": - version: 0.2.0 - resolution: "eastasianwidth@npm:0.2.0" - checksum: 10c0/26f364ebcdb6395f95124fda411f63137a4bfb5d3a06453f7f23dfe52502905bd84e0488172e0f9ec295fdc45f05c23d5d91baf16bd26f0fe9acd777a188dc39 - languageName: node - linkType: hard - -"ee-first@npm:1.1.1": - version: 1.1.1 - resolution: "ee-first@npm:1.1.1" - checksum: 10c0/b5bb125ee93161bc16bfe6e56c6b04de5ad2aa44234d8f644813cc95d861a6910903132b05093706de2b706599367c4130eb6d170f6b46895686b95f87d017b7 - languageName: node - linkType: hard - -"electron-to-chromium@npm:^1.5.73": - version: 1.5.80 - resolution: "electron-to-chromium@npm:1.5.80" - checksum: 10c0/6aaf1891e1b05251efac6f4a63c0ddccf567f0f76506cf0cb284f11413762423fddd7786558066f74c3a95e2a533dad7a97bebe38779b46b7a799d8dd20cea53 - languageName: node - linkType: hard - -"emoji-regex@npm:^10.3.0": - version: 10.4.0 - resolution: "emoji-regex@npm:10.4.0" - checksum: 10c0/a3fcedfc58bfcce21a05a5f36a529d81e88d602100145fcca3dc6f795e3c8acc4fc18fe773fbf9b6d6e9371205edb3afa2668ec3473fa2aa7fd47d2a9d46482d - languageName: node - linkType: hard - -"emoji-regex@npm:^8.0.0": - version: 8.0.0 - resolution: "emoji-regex@npm:8.0.0" - checksum: 10c0/b6053ad39951c4cf338f9092d7bfba448cdfd46fe6a2a034700b149ac9ffbc137e361cbd3c442297f86bed2e5f7576c1b54cc0a6bf8ef5106cc62f496af35010 - languageName: node - linkType: hard - -"emoji-regex@npm:^9.2.2": - version: 9.2.2 - resolution: "emoji-regex@npm:9.2.2" - checksum: 10c0/af014e759a72064cf66e6e694a7fc6b0ed3d8db680427b021a89727689671cefe9d04151b2cad51dbaf85d5ba790d061cd167f1cf32eb7b281f6368b3c181639 - languageName: node - linkType: hard - -"emojis-list@npm:^3.0.0": - version: 3.0.0 - resolution: "emojis-list@npm:3.0.0" - checksum: 10c0/7dc4394b7b910444910ad64b812392159a21e1a7ecc637c775a440227dcb4f80eff7fe61f4453a7d7603fa23d23d30cc93fe9e4b5ed985b88d6441cd4a35117b - languageName: node - linkType: hard - -"encodeurl@npm:~1.0.2": - version: 1.0.2 - resolution: "encodeurl@npm:1.0.2" - checksum: 10c0/f6c2387379a9e7c1156c1c3d4f9cb7bb11cf16dd4c1682e1f6746512564b053df5781029b6061296832b59fb22f459dbe250386d217c2f6e203601abb2ee0bec - languageName: node - linkType: hard - -"encodeurl@npm:~2.0.0": - version: 2.0.0 - resolution: "encodeurl@npm:2.0.0" - checksum: 10c0/5d317306acb13e6590e28e27924c754163946a2480de11865c991a3a7eed4315cd3fba378b543ca145829569eefe9b899f3d84bb09870f675ae60bc924b01ceb - languageName: node - linkType: hard - -"encoding@npm:^0.1.13": - version: 0.1.13 - resolution: "encoding@npm:0.1.13" - dependencies: - iconv-lite: "npm:^0.6.2" - checksum: 10c0/36d938712ff00fe1f4bac88b43bcffb5930c1efa57bbcdca9d67e1d9d6c57cfb1200fb01efe0f3109b2ce99b231f90779532814a81370a1bd3274a0f58585039 - languageName: node - linkType: hard - -"enhanced-resolve@npm:^5.17.1": - version: 5.18.0 - resolution: "enhanced-resolve@npm:5.18.0" - dependencies: - graceful-fs: "npm:^4.2.4" - tapable: "npm:^2.2.0" - checksum: 10c0/5fcc264a6040754ab5b349628cac2bb5f89cee475cbe340804e657a5b9565f70e6aafb338d5895554eb0ced9f66c50f38a255274a0591dcb64ee17c549c459ce - languageName: node - linkType: hard - -"entities@npm:^4.2.0, entities@npm:^4.3.0, entities@npm:^4.5.0": - version: 4.5.0 - resolution: "entities@npm:4.5.0" - checksum: 10c0/5b039739f7621f5d1ad996715e53d964035f75ad3b9a4d38c6b3804bb226e282ffeae2443624d8fdd9c47d8e926ae9ac009c54671243f0c3294c26af7cc85250 - languageName: node - linkType: hard - -"env-paths@npm:^2.2.0, env-paths@npm:^2.2.1": - version: 2.2.1 - resolution: "env-paths@npm:2.2.1" - checksum: 10c0/285325677bf00e30845e330eec32894f5105529db97496ee3f598478e50f008c5352a41a30e5e72ec9de8a542b5a570b85699cd63bd2bc646dbcb9f311d83bc4 - languageName: node - linkType: hard - -"environment@npm:^1.0.0": - version: 1.1.0 - resolution: "environment@npm:1.1.0" - checksum: 10c0/fb26434b0b581ab397039e51ff3c92b34924a98b2039dcb47e41b7bca577b9dbf134a8eadb364415c74464b682e2d3afe1a4c0eb9873dc44ea814c5d3103331d - languageName: node - linkType: hard - -"err-code@npm:^2.0.2": - version: 2.0.3 - resolution: "err-code@npm:2.0.3" - checksum: 10c0/b642f7b4dd4a376e954947550a3065a9ece6733ab8e51ad80db727aaae0817c2e99b02a97a3d6cecc648a97848305e728289cf312d09af395403a90c9d4d8a66 - languageName: node - linkType: hard - -"errno@npm:^0.1.1": - version: 0.1.8 - resolution: "errno@npm:0.1.8" - dependencies: - prr: "npm:~1.0.1" - bin: - errno: cli.js - checksum: 10c0/83758951967ec57bf00b5f5b7dc797e6d65a6171e57ea57adcf1bd1a0b477fd9b5b35fae5be1ff18f4090ed156bce1db749fe7e317aac19d485a5d150f6a4936 - languageName: node - linkType: hard - -"error-ex@npm:^1.3.1": - version: 1.3.2 - resolution: "error-ex@npm:1.3.2" - dependencies: - is-arrayish: "npm:^0.2.1" - checksum: 10c0/ba827f89369b4c93382cfca5a264d059dfefdaa56ecc5e338ffa58a6471f5ed93b71a20add1d52290a4873d92381174382658c885ac1a2305f7baca363ce9cce - languageName: node - linkType: hard - -"es-define-property@npm:^1.0.1": - version: 1.0.1 - resolution: "es-define-property@npm:1.0.1" - checksum: 10c0/3f54eb49c16c18707949ff25a1456728c883e81259f045003499efba399c08bad00deebf65cccde8c0e07908c1a225c9d472b7107e558f2a48e28d530e34527c - languageName: node - linkType: hard - -"es-errors@npm:^1.3.0": - version: 1.3.0 - resolution: "es-errors@npm:1.3.0" - checksum: 10c0/0a61325670072f98d8ae3b914edab3559b6caa980f08054a3b872052640d91da01d38df55df797fcc916389d77fc92b8d5906cf028f4db46d7e3003abecbca85 - languageName: node - linkType: hard - -"es-module-lexer@npm:^1.2.1": - version: 1.6.0 - resolution: "es-module-lexer@npm:1.6.0" - checksum: 10c0/667309454411c0b95c476025929881e71400d74a746ffa1ff4cb450bd87f8e33e8eef7854d68e401895039ac0bac64e7809acbebb6253e055dd49ea9e3ea9212 - languageName: node - linkType: hard - -"es-object-atoms@npm:^1.0.0": - version: 1.0.0 - resolution: "es-object-atoms@npm:1.0.0" - dependencies: - es-errors: "npm:^1.3.0" - checksum: 10c0/1fed3d102eb27ab8d983337bb7c8b159dd2a1e63ff833ec54eea1311c96d5b08223b433060ba240541ca8adba9eee6b0a60cdbf2f80634b784febc9cc8b687b4 - languageName: node - linkType: hard - -"esbuild-wasm@npm:0.24.0": - version: 0.24.0 - resolution: "esbuild-wasm@npm:0.24.0" - bin: - esbuild: bin/esbuild - checksum: 10c0/168917909d5f6714843f218fc722c113c1f53b6c9f4f315f3d55dad1a9b6b8d3194a5f4dfdd67405927b308a72aa5ba175b44d2f1b95c993a943a674eea1e1ad - languageName: node - linkType: hard - -"esbuild@npm:0.24.0": - version: 0.24.0 - resolution: "esbuild@npm:0.24.0" - dependencies: - "@esbuild/aix-ppc64": "npm:0.24.0" - "@esbuild/android-arm": "npm:0.24.0" - "@esbuild/android-arm64": "npm:0.24.0" - "@esbuild/android-x64": "npm:0.24.0" - "@esbuild/darwin-arm64": "npm:0.24.0" - "@esbuild/darwin-x64": "npm:0.24.0" - "@esbuild/freebsd-arm64": "npm:0.24.0" - "@esbuild/freebsd-x64": "npm:0.24.0" - "@esbuild/linux-arm": "npm:0.24.0" - "@esbuild/linux-arm64": "npm:0.24.0" - "@esbuild/linux-ia32": "npm:0.24.0" - "@esbuild/linux-loong64": "npm:0.24.0" - "@esbuild/linux-mips64el": "npm:0.24.0" - "@esbuild/linux-ppc64": "npm:0.24.0" - "@esbuild/linux-riscv64": "npm:0.24.0" - "@esbuild/linux-s390x": "npm:0.24.0" - "@esbuild/linux-x64": "npm:0.24.0" - "@esbuild/netbsd-x64": "npm:0.24.0" - "@esbuild/openbsd-arm64": "npm:0.24.0" - "@esbuild/openbsd-x64": "npm:0.24.0" - "@esbuild/sunos-x64": "npm:0.24.0" - "@esbuild/win32-arm64": "npm:0.24.0" - "@esbuild/win32-ia32": "npm:0.24.0" - "@esbuild/win32-x64": "npm:0.24.0" - dependenciesMeta: - "@esbuild/aix-ppc64": - optional: true - "@esbuild/android-arm": - optional: true - "@esbuild/android-arm64": - optional: true - "@esbuild/android-x64": - optional: true - "@esbuild/darwin-arm64": - optional: true - "@esbuild/darwin-x64": - optional: true - "@esbuild/freebsd-arm64": - optional: true - "@esbuild/freebsd-x64": - optional: true - "@esbuild/linux-arm": - optional: true - "@esbuild/linux-arm64": - optional: true - "@esbuild/linux-ia32": - optional: true - "@esbuild/linux-loong64": - optional: true - "@esbuild/linux-mips64el": - optional: true - "@esbuild/linux-ppc64": - optional: true - "@esbuild/linux-riscv64": - optional: true - "@esbuild/linux-s390x": - optional: true - "@esbuild/linux-x64": - optional: true - "@esbuild/netbsd-x64": - optional: true - "@esbuild/openbsd-arm64": - optional: true - "@esbuild/openbsd-x64": - optional: true - "@esbuild/sunos-x64": - optional: true - "@esbuild/win32-arm64": - optional: true - "@esbuild/win32-ia32": - optional: true - "@esbuild/win32-x64": - optional: true - bin: - esbuild: bin/esbuild - checksum: 10c0/9f1aadd8d64f3bff422ae78387e66e51a5e09de6935a6f987b6e4e189ed00fdc2d1bc03d2e33633b094008529c8b6e06c7ad1a9782fb09fec223bf95998c0683 - languageName: node - linkType: hard - -"esbuild@npm:^0.21.3": - version: 0.21.5 - resolution: "esbuild@npm:0.21.5" - dependencies: - "@esbuild/aix-ppc64": "npm:0.21.5" - "@esbuild/android-arm": "npm:0.21.5" - "@esbuild/android-arm64": "npm:0.21.5" - "@esbuild/android-x64": "npm:0.21.5" - "@esbuild/darwin-arm64": "npm:0.21.5" - "@esbuild/darwin-x64": "npm:0.21.5" - "@esbuild/freebsd-arm64": "npm:0.21.5" - "@esbuild/freebsd-x64": "npm:0.21.5" - "@esbuild/linux-arm": "npm:0.21.5" - "@esbuild/linux-arm64": "npm:0.21.5" - "@esbuild/linux-ia32": "npm:0.21.5" - "@esbuild/linux-loong64": "npm:0.21.5" - "@esbuild/linux-mips64el": "npm:0.21.5" - "@esbuild/linux-ppc64": "npm:0.21.5" - "@esbuild/linux-riscv64": "npm:0.21.5" - "@esbuild/linux-s390x": "npm:0.21.5" - "@esbuild/linux-x64": "npm:0.21.5" - "@esbuild/netbsd-x64": "npm:0.21.5" - "@esbuild/openbsd-x64": "npm:0.21.5" - "@esbuild/sunos-x64": "npm:0.21.5" - "@esbuild/win32-arm64": "npm:0.21.5" - "@esbuild/win32-ia32": "npm:0.21.5" - "@esbuild/win32-x64": "npm:0.21.5" - dependenciesMeta: - "@esbuild/aix-ppc64": - optional: true - "@esbuild/android-arm": - optional: true - "@esbuild/android-arm64": - optional: true - "@esbuild/android-x64": - optional: true - "@esbuild/darwin-arm64": - optional: true - "@esbuild/darwin-x64": - optional: true - "@esbuild/freebsd-arm64": - optional: true - "@esbuild/freebsd-x64": - optional: true - "@esbuild/linux-arm": - optional: true - "@esbuild/linux-arm64": - optional: true - "@esbuild/linux-ia32": - optional: true - "@esbuild/linux-loong64": - optional: true - "@esbuild/linux-mips64el": - optional: true - "@esbuild/linux-ppc64": - optional: true - "@esbuild/linux-riscv64": - optional: true - "@esbuild/linux-s390x": - optional: true - "@esbuild/linux-x64": - optional: true - "@esbuild/netbsd-x64": - optional: true - "@esbuild/openbsd-x64": - optional: true - "@esbuild/sunos-x64": - optional: true - "@esbuild/win32-arm64": - optional: true - "@esbuild/win32-ia32": - optional: true - "@esbuild/win32-x64": - optional: true - bin: - esbuild: bin/esbuild - checksum: 10c0/fa08508adf683c3f399e8a014a6382a6b65542213431e26206c0720e536b31c09b50798747c2a105a4bbba1d9767b8d3615a74c2f7bf1ddf6d836cd11eb672de - languageName: node - linkType: hard - -"escalade@npm:^3.1.1, escalade@npm:^3.2.0": - version: 3.2.0 - resolution: "escalade@npm:3.2.0" - checksum: 10c0/ced4dd3a78e15897ed3be74e635110bbf3b08877b0a41be50dcb325ee0e0b5f65fc2d50e9845194d7c4633f327e2e1c6cce00a71b617c5673df0374201d67f65 - languageName: node - linkType: hard - -"escape-html@npm:~1.0.3": - version: 1.0.3 - resolution: "escape-html@npm:1.0.3" - checksum: 10c0/524c739d776b36c3d29fa08a22e03e8824e3b2fd57500e5e44ecf3cc4707c34c60f9ca0781c0e33d191f2991161504c295e98f68c78fe7baa6e57081ec6ac0a3 - languageName: node - linkType: hard - -"escape-string-regexp@npm:^4.0.0": - version: 4.0.0 - resolution: "escape-string-regexp@npm:4.0.0" - checksum: 10c0/9497d4dd307d845bd7f75180d8188bb17ea8c151c1edbf6b6717c100e104d629dc2dfb687686181b0f4b7d732c7dfdc4d5e7a8ff72de1b0ca283a75bbb3a9cd9 - languageName: node - linkType: hard - -"eslint-scope@npm:5.1.1": - version: 5.1.1 - resolution: "eslint-scope@npm:5.1.1" - dependencies: - esrecurse: "npm:^4.3.0" - estraverse: "npm:^4.1.1" - checksum: 10c0/d30ef9dc1c1cbdece34db1539a4933fe3f9b14e1ffb27ecc85987902ee663ad7c9473bbd49a9a03195a373741e62e2f807c4938992e019b511993d163450e70a - languageName: node - linkType: hard - -"eslint-scope@npm:^8.0.2, eslint-scope@npm:^8.2.0": - version: 8.2.0 - resolution: "eslint-scope@npm:8.2.0" - dependencies: - esrecurse: "npm:^4.3.0" - estraverse: "npm:^5.2.0" - checksum: 10c0/8d2d58e2136d548ac7e0099b1a90d9fab56f990d86eb518de1247a7066d38c908be2f3df477a79cf60d70b30ba18735d6c6e70e9914dca2ee515a729975d70d6 - languageName: node - linkType: hard - -"eslint-visitor-keys@npm:^3.4.3": - version: 3.4.3 - resolution: "eslint-visitor-keys@npm:3.4.3" - checksum: 10c0/92708e882c0a5ffd88c23c0b404ac1628cf20104a108c745f240a13c332a11aac54f49a22d5762efbffc18ecbc9a580d1b7ad034bf5f3cc3307e5cbff2ec9820 - languageName: node - linkType: hard - -"eslint-visitor-keys@npm:^4.2.0": - version: 4.2.0 - resolution: "eslint-visitor-keys@npm:4.2.0" - checksum: 10c0/2ed81c663b147ca6f578312919483eb040295bbab759e5a371953456c636c5b49a559883e2677112453728d66293c0a4c90ab11cab3428cf02a0236d2e738269 - languageName: node - linkType: hard - -"eslint@npm:^9.17.0": - version: 9.17.0 - resolution: "eslint@npm:9.17.0" - dependencies: - "@eslint-community/eslint-utils": "npm:^4.2.0" - "@eslint-community/regexpp": "npm:^4.12.1" - "@eslint/config-array": "npm:^0.19.0" - "@eslint/core": "npm:^0.9.0" - "@eslint/eslintrc": "npm:^3.2.0" - "@eslint/js": "npm:9.17.0" - "@eslint/plugin-kit": "npm:^0.2.3" - "@humanfs/node": "npm:^0.16.6" - "@humanwhocodes/module-importer": "npm:^1.0.1" - "@humanwhocodes/retry": "npm:^0.4.1" - "@types/estree": "npm:^1.0.6" - "@types/json-schema": "npm:^7.0.15" - ajv: "npm:^6.12.4" - chalk: "npm:^4.0.0" - cross-spawn: "npm:^7.0.6" - debug: "npm:^4.3.2" - escape-string-regexp: "npm:^4.0.0" - eslint-scope: "npm:^8.2.0" - eslint-visitor-keys: "npm:^4.2.0" - espree: "npm:^10.3.0" - esquery: "npm:^1.5.0" - esutils: "npm:^2.0.2" - fast-deep-equal: "npm:^3.1.3" - file-entry-cache: "npm:^8.0.0" - find-up: "npm:^5.0.0" - glob-parent: "npm:^6.0.2" - ignore: "npm:^5.2.0" - imurmurhash: "npm:^0.1.4" - is-glob: "npm:^4.0.0" - json-stable-stringify-without-jsonify: "npm:^1.0.1" - lodash.merge: "npm:^4.6.2" - minimatch: "npm:^3.1.2" - natural-compare: "npm:^1.4.0" - optionator: "npm:^0.9.3" - peerDependencies: - jiti: "*" - peerDependenciesMeta: - jiti: - optional: true - bin: - eslint: bin/eslint.js - checksum: 10c0/9edd8dd782b4ae2eb00a158ed4708194835d4494d75545fa63a51f020ed17f865c49b4ae1914a2ecbc7fdb262bd8059e811aeef9f0bae63dced9d3293be1bbdd - languageName: node - linkType: hard - -"espree@npm:^10.0.1, espree@npm:^10.3.0": - version: 10.3.0 - resolution: "espree@npm:10.3.0" - dependencies: - acorn: "npm:^8.14.0" - acorn-jsx: "npm:^5.3.2" - eslint-visitor-keys: "npm:^4.2.0" - checksum: 10c0/272beeaca70d0a1a047d61baff64db04664a33d7cfb5d144f84bc8a5c6194c6c8ebe9cc594093ca53add88baa23e59b01e69e8a0160ab32eac570482e165c462 - languageName: node - linkType: hard - -"esquery@npm:^1.5.0": - version: 1.6.0 - resolution: "esquery@npm:1.6.0" - dependencies: - estraverse: "npm:^5.1.0" - checksum: 10c0/cb9065ec605f9da7a76ca6dadb0619dfb611e37a81e318732977d90fab50a256b95fee2d925fba7c2f3f0523aa16f91587246693bc09bc34d5a59575fe6e93d2 - languageName: node - linkType: hard - -"esrecurse@npm:^4.3.0": - version: 4.3.0 - resolution: "esrecurse@npm:4.3.0" - dependencies: - estraverse: "npm:^5.2.0" - checksum: 10c0/81a37116d1408ded88ada45b9fb16dbd26fba3aadc369ce50fcaf82a0bac12772ebd7b24cd7b91fc66786bf2c1ac7b5f196bc990a473efff972f5cb338877cf5 - languageName: node - linkType: hard - -"estraverse@npm:^4.1.1": - version: 4.3.0 - resolution: "estraverse@npm:4.3.0" - checksum: 10c0/9cb46463ef8a8a4905d3708a652d60122a0c20bb58dec7e0e12ab0e7235123d74214fc0141d743c381813e1b992767e2708194f6f6e0f9fd00c1b4e0887b8b6d - languageName: node - linkType: hard - -"estraverse@npm:^5.1.0, estraverse@npm:^5.2.0": - version: 5.3.0 - resolution: "estraverse@npm:5.3.0" - checksum: 10c0/1ff9447b96263dec95d6d67431c5e0771eb9776427421260a3e2f0fdd5d6bd4f8e37a7338f5ad2880c9f143450c9b1e4fc2069060724570a49cf9cf0312bd107 - languageName: node - linkType: hard - -"esutils@npm:^2.0.2": - version: 2.0.3 - resolution: "esutils@npm:2.0.3" - checksum: 10c0/9a2fe69a41bfdade834ba7c42de4723c97ec776e40656919c62cbd13607c45e127a003f05f724a1ea55e5029a4cf2de444b13009f2af71271e42d93a637137c7 - languageName: node - linkType: hard - -"etag@npm:~1.8.1": - version: 1.8.1 - resolution: "etag@npm:1.8.1" - checksum: 10c0/12be11ef62fb9817314d790089a0a49fae4e1b50594135dcb8076312b7d7e470884b5100d249b28c18581b7fd52f8b485689ffae22a11ed9ec17377a33a08f84 - languageName: node - linkType: hard - -"eventemitter3@npm:^4.0.0": - version: 4.0.7 - resolution: "eventemitter3@npm:4.0.7" - checksum: 10c0/5f6d97cbcbac47be798e6355e3a7639a84ee1f7d9b199a07017f1d2f1e2fe236004d14fa5dfaeba661f94ea57805385e326236a6debbc7145c8877fbc0297c6b - languageName: node - linkType: hard - -"eventemitter3@npm:^5.0.1": - version: 5.0.1 - resolution: "eventemitter3@npm:5.0.1" - checksum: 10c0/4ba5c00c506e6c786b4d6262cfbce90ddc14c10d4667e5c83ae993c9de88aa856033994dd2b35b83e8dc1170e224e66a319fa80adc4c32adcd2379bbc75da814 - languageName: node - linkType: hard - -"events@npm:^3.2.0": - version: 3.3.0 - resolution: "events@npm:3.3.0" - checksum: 10c0/d6b6f2adbccbcda74ddbab52ed07db727ef52e31a61ed26db9feb7dc62af7fc8e060defa65e5f8af9449b86b52cc1a1f6a79f2eafcf4e62add2b7a1fa4a432f6 - languageName: node - linkType: hard - -"exponential-backoff@npm:^3.1.1": - version: 3.1.1 - resolution: "exponential-backoff@npm:3.1.1" - checksum: 10c0/160456d2d647e6019640bd07111634d8c353038d9fa40176afb7cd49b0548bdae83b56d05e907c2cce2300b81cae35d800ef92fefb9d0208e190fa3b7d6bb579 - languageName: node - linkType: hard - -"express@npm:^4.19.2": - version: 4.21.2 - resolution: "express@npm:4.21.2" - dependencies: - accepts: "npm:~1.3.8" - array-flatten: "npm:1.1.1" - body-parser: "npm:1.20.3" - content-disposition: "npm:0.5.4" - content-type: "npm:~1.0.4" - cookie: "npm:0.7.1" - cookie-signature: "npm:1.0.6" - debug: "npm:2.6.9" - depd: "npm:2.0.0" - encodeurl: "npm:~2.0.0" - escape-html: "npm:~1.0.3" - etag: "npm:~1.8.1" - finalhandler: "npm:1.3.1" - fresh: "npm:0.5.2" - http-errors: "npm:2.0.0" - merge-descriptors: "npm:1.0.3" - methods: "npm:~1.1.2" - on-finished: "npm:2.4.1" - parseurl: "npm:~1.3.3" - path-to-regexp: "npm:0.1.12" - proxy-addr: "npm:~2.0.7" - qs: "npm:6.13.0" - range-parser: "npm:~1.2.1" - safe-buffer: "npm:5.2.1" - send: "npm:0.19.0" - serve-static: "npm:1.16.2" - setprototypeof: "npm:1.2.0" - statuses: "npm:2.0.1" - type-is: "npm:~1.6.18" - utils-merge: "npm:1.0.1" - vary: "npm:~1.1.2" - checksum: 10c0/38168fd0a32756600b56e6214afecf4fc79ec28eca7f7a91c2ab8d50df4f47562ca3f9dee412da7f5cea6b1a1544b33b40f9f8586dbacfbdada0fe90dbb10a1f - languageName: node - linkType: hard - -"external-editor@npm:^3.1.0": - version: 3.1.0 - resolution: "external-editor@npm:3.1.0" - dependencies: - chardet: "npm:^0.7.0" - iconv-lite: "npm:^0.4.24" - tmp: "npm:^0.0.33" - checksum: 10c0/c98f1ba3efdfa3c561db4447ff366a6adb5c1e2581462522c56a18bf90dfe4da382f9cd1feee3e330108c3595a854b218272539f311ba1b3298f841eb0fbf339 - languageName: node - linkType: hard - -"fast-deep-equal@npm:^3.1.1, fast-deep-equal@npm:^3.1.3": - version: 3.1.3 - resolution: "fast-deep-equal@npm:3.1.3" - checksum: 10c0/40dedc862eb8992c54579c66d914635afbec43350afbbe991235fdcb4e3a8d5af1b23ae7e79bef7d4882d0ecee06c3197488026998fb19f72dc95acff1d1b1d0 - languageName: node - linkType: hard - -"fast-glob@npm:3.3.2": - version: 3.3.2 - resolution: "fast-glob@npm:3.3.2" - dependencies: - "@nodelib/fs.stat": "npm:^2.0.2" - "@nodelib/fs.walk": "npm:^1.2.3" - glob-parent: "npm:^5.1.2" - merge2: "npm:^1.3.0" - micromatch: "npm:^4.0.4" - checksum: 10c0/42baad7b9cd40b63e42039132bde27ca2cb3a4950d0a0f9abe4639ea1aa9d3e3b40f98b1fe31cbc0cc17b664c9ea7447d911a152fa34ec5b72977b125a6fc845 - languageName: node - linkType: hard - -"fast-glob@npm:^3.3.2": - version: 3.3.3 - resolution: "fast-glob@npm:3.3.3" - dependencies: - "@nodelib/fs.stat": "npm:^2.0.2" - "@nodelib/fs.walk": "npm:^1.2.3" - glob-parent: "npm:^5.1.2" - merge2: "npm:^1.3.0" - micromatch: "npm:^4.0.8" - checksum: 10c0/f6aaa141d0d3384cf73cbcdfc52f475ed293f6d5b65bfc5def368b09163a9f7e5ec2b3014d80f733c405f58e470ee0cc451c2937685045cddcdeaa24199c43fe - languageName: node - linkType: hard - -"fast-json-stable-stringify@npm:^2.0.0": - version: 2.1.0 - resolution: "fast-json-stable-stringify@npm:2.1.0" - checksum: 10c0/7f081eb0b8a64e0057b3bb03f974b3ef00135fbf36c1c710895cd9300f13c94ba809bb3a81cf4e1b03f6e5285610a61abbd7602d0652de423144dfee5a389c9b - languageName: node - linkType: hard - -"fast-levenshtein@npm:^2.0.6": - version: 2.0.6 - resolution: "fast-levenshtein@npm:2.0.6" - checksum: 10c0/111972b37338bcb88f7d9e2c5907862c280ebf4234433b95bc611e518d192ccb2d38119c4ac86e26b668d75f7f3894f4ff5c4982899afced7ca78633b08287c4 - languageName: node - linkType: hard - -"fast-uri@npm:^3.0.1": - version: 3.0.5 - resolution: "fast-uri@npm:3.0.5" - checksum: 10c0/f5501fd849e02f16f1730d2c8628078718c492b5bc00198068bc5c2880363ae948287fdc8cebfff47465229b517dbeaf668866fbabdff829b4138a899e5c2ba3 - languageName: node - linkType: hard - -"fastq@npm:^1.6.0": - version: 1.18.0 - resolution: "fastq@npm:1.18.0" - dependencies: - reusify: "npm:^1.0.4" - checksum: 10c0/7be87ecc41762adbddf558d24182f50a4b1a3ef3ee807d33b7623da7aee5faecdcc94fce5aa13fe91df93e269f383232bbcdb2dc5338cd1826503d6063221f36 - languageName: node - linkType: hard - -"faye-websocket@npm:^0.11.3": - version: 0.11.4 - resolution: "faye-websocket@npm:0.11.4" - dependencies: - websocket-driver: "npm:>=0.5.1" - checksum: 10c0/c6052a0bb322778ce9f89af92890f6f4ce00d5ec92418a35e5f4c6864a4fe736fec0bcebd47eac7c0f0e979b01530746b1c85c83cb04bae789271abf19737420 - languageName: node - linkType: hard - -"file-entry-cache@npm:^8.0.0": - version: 8.0.0 - resolution: "file-entry-cache@npm:8.0.0" - dependencies: - flat-cache: "npm:^4.0.0" - checksum: 10c0/9e2b5938b1cd9b6d7e3612bdc533afd4ac17b2fc646569e9a8abbf2eb48e5eb8e316bc38815a3ef6a1b456f4107f0d0f055a614ca613e75db6bf9ff4d72c1638 - languageName: node - linkType: hard - -"fill-range@npm:^7.1.1": - version: 7.1.1 - resolution: "fill-range@npm:7.1.1" - dependencies: - to-regex-range: "npm:^5.0.1" - checksum: 10c0/b75b691bbe065472f38824f694c2f7449d7f5004aa950426a2c28f0306c60db9b880c0b0e4ed819997ffb882d1da02cfcfc819bddc94d71627f5269682edf018 - languageName: node - linkType: hard - -"finalhandler@npm:1.3.1": - version: 1.3.1 - resolution: "finalhandler@npm:1.3.1" - dependencies: - debug: "npm:2.6.9" - encodeurl: "npm:~2.0.0" - escape-html: "npm:~1.0.3" - on-finished: "npm:2.4.1" - parseurl: "npm:~1.3.3" - statuses: "npm:2.0.1" - unpipe: "npm:~1.0.0" - checksum: 10c0/d38035831865a49b5610206a3a9a9aae4e8523cbbcd01175d0480ffbf1278c47f11d89be3ca7f617ae6d94f29cf797546a4619cd84dd109009ef33f12f69019f - languageName: node - linkType: hard - -"find-cache-dir@npm:^4.0.0": - version: 4.0.0 - resolution: "find-cache-dir@npm:4.0.0" - dependencies: - common-path-prefix: "npm:^3.0.0" - pkg-dir: "npm:^7.0.0" - checksum: 10c0/0faa7956974726c8769671de696d24c643ca1e5b8f7a2401283caa9e07a5da093293e0a0f4bd18c920ec981d2ef945c7f5b946cde268dfc9077d833ad0293cff - languageName: node - linkType: hard - -"find-up@npm:^5.0.0": - version: 5.0.0 - resolution: "find-up@npm:5.0.0" - dependencies: - locate-path: "npm:^6.0.0" - path-exists: "npm:^4.0.0" - checksum: 10c0/062c5a83a9c02f53cdd6d175a37ecf8f87ea5bbff1fdfb828f04bfa021441bc7583e8ebc0872a4c1baab96221fb8a8a275a19809fb93fbc40bd69ec35634069a - languageName: node - linkType: hard - -"find-up@npm:^6.3.0": - version: 6.3.0 - resolution: "find-up@npm:6.3.0" - dependencies: - locate-path: "npm:^7.1.0" - path-exists: "npm:^5.0.0" - checksum: 10c0/07e0314362d316b2b13f7f11ea4692d5191e718ca3f7264110127520f3347996349bf9e16805abae3e196805814bc66ef4bff2b8904dc4a6476085fc9b0eba07 - languageName: node - linkType: hard - -"flat-cache@npm:^4.0.0": - version: 4.0.1 - resolution: "flat-cache@npm:4.0.1" - dependencies: - flatted: "npm:^3.2.9" - keyv: "npm:^4.5.4" - checksum: 10c0/2c59d93e9faa2523e4fda6b4ada749bed432cfa28c8e251f33b25795e426a1c6dbada777afb1f74fcfff33934fdbdea921ee738fcc33e71adc9d6eca984a1cfc - languageName: node - linkType: hard - -"flat@npm:^5.0.2": - version: 5.0.2 - resolution: "flat@npm:5.0.2" - bin: - flat: cli.js - checksum: 10c0/f178b13482f0cd80c7fede05f4d10585b1f2fdebf26e12edc138e32d3150c6ea6482b7f12813a1091143bad52bb6d3596bca51a162257a21163c0ff438baa5fe - languageName: node - linkType: hard - -"flatted@npm:^3.2.9": - version: 3.3.2 - resolution: "flatted@npm:3.3.2" - checksum: 10c0/24cc735e74d593b6c767fe04f2ef369abe15b62f6906158079b9874bdb3ee5ae7110bb75042e70cd3f99d409d766f357caf78d5ecee9780206f5fdc5edbad334 - languageName: node - linkType: hard - -"follow-redirects@npm:^1.0.0": - version: 1.15.9 - resolution: "follow-redirects@npm:1.15.9" - peerDependenciesMeta: - debug: - optional: true - checksum: 10c0/5829165bd112c3c0e82be6c15b1a58fa9dcfaede3b3c54697a82fe4a62dd5ae5e8222956b448d2f98e331525f05d00404aba7d696de9e761ef6e42fdc780244f - languageName: node - linkType: hard - -"foreground-child@npm:^3.1.0": - version: 3.3.0 - resolution: "foreground-child@npm:3.3.0" - dependencies: - cross-spawn: "npm:^7.0.0" - signal-exit: "npm:^4.0.1" - checksum: 10c0/028f1d41000553fcfa6c4bb5c372963bf3d9bf0b1f25a87d1a6253014343fb69dfb1b42d9625d7cf44c8ba429940f3d0ff718b62105d4d4a4f6ef8ca0a53faa2 - languageName: node - linkType: hard - -"forwarded@npm:0.2.0": - version: 0.2.0 - resolution: "forwarded@npm:0.2.0" - checksum: 10c0/9b67c3fac86acdbc9ae47ba1ddd5f2f81526fa4c8226863ede5600a3f7c7416ef451f6f1e240a3cc32d0fd79fcfe6beb08fd0da454f360032bde70bf80afbb33 - languageName: node - linkType: hard - -"fraction.js@npm:^4.3.7": - version: 4.3.7 - resolution: "fraction.js@npm:4.3.7" - checksum: 10c0/df291391beea9ab4c263487ffd9d17fed162dbb736982dee1379b2a8cc94e4e24e46ed508c6d278aded9080ba51872f1bc5f3a5fd8d7c74e5f105b508ac28711 - languageName: node - linkType: hard - -"fresh@npm:0.5.2": - version: 0.5.2 - resolution: "fresh@npm:0.5.2" - checksum: 10c0/c6d27f3ed86cc5b601404822f31c900dd165ba63fff8152a3ef714e2012e7535027063bc67ded4cb5b3a49fa596495d46cacd9f47d6328459cf570f08b7d9e5a - languageName: node - linkType: hard - -"fs-minipass@npm:^2.0.0": - version: 2.1.0 - resolution: "fs-minipass@npm:2.1.0" - dependencies: - minipass: "npm:^3.0.0" - checksum: 10c0/703d16522b8282d7299337539c3ed6edddd1afe82435e4f5b76e34a79cd74e488a8a0e26a636afc2440e1a23b03878e2122e3a2cfe375a5cf63c37d92b86a004 - languageName: node - linkType: hard - -"fs-minipass@npm:^3.0.0": - version: 3.0.3 - resolution: "fs-minipass@npm:3.0.3" - dependencies: - minipass: "npm:^7.0.3" - checksum: 10c0/63e80da2ff9b621e2cb1596abcb9207f1cf82b968b116ccd7b959e3323144cce7fb141462200971c38bbf2ecca51695069db45265705bed09a7cd93ae5b89f94 - languageName: node - linkType: hard - -"fsevents@npm:~2.3.2, fsevents@npm:~2.3.3": - version: 2.3.3 - resolution: "fsevents@npm:2.3.3" - dependencies: - node-gyp: "npm:latest" - checksum: 10c0/a1f0c44595123ed717febbc478aa952e47adfc28e2092be66b8ab1635147254ca6cfe1df792a8997f22716d4cbafc73309899ff7bfac2ac3ad8cf2e4ecc3ec60 - conditions: os=darwin - languageName: node - linkType: hard - -"fsevents@patch:fsevents@npm%3A~2.3.2#optional!builtin, fsevents@patch:fsevents@npm%3A~2.3.3#optional!builtin": - version: 2.3.3 - resolution: "fsevents@patch:fsevents@npm%3A2.3.3#optional!builtin::version=2.3.3&hash=df0bf1" - dependencies: - node-gyp: "npm:latest" - conditions: os=darwin - languageName: node - linkType: hard - -"function-bind@npm:^1.1.2": - version: 1.1.2 - resolution: "function-bind@npm:1.1.2" - checksum: 10c0/d8680ee1e5fcd4c197e4ac33b2b4dce03c71f4d91717292785703db200f5c21f977c568d28061226f9b5900cbcd2c84463646134fd5337e7925e0942bc3f46d5 - languageName: node - linkType: hard - -"gensync@npm:^1.0.0-beta.2": - version: 1.0.0-beta.2 - resolution: "gensync@npm:1.0.0-beta.2" - checksum: 10c0/782aba6cba65b1bb5af3b095d96249d20edbe8df32dbf4696fd49be2583faf676173bf4809386588828e4dd76a3354fcbeb577bab1c833ccd9fc4577f26103f8 - languageName: node - linkType: hard - -"get-caller-file@npm:^2.0.5": - version: 2.0.5 - resolution: "get-caller-file@npm:2.0.5" - checksum: 10c0/c6c7b60271931fa752aeb92f2b47e355eac1af3a2673f47c9589e8f8a41adc74d45551c1bc57b5e66a80609f10ffb72b6f575e4370d61cc3f7f3aaff01757cde - languageName: node - linkType: hard - -"get-east-asian-width@npm:^1.0.0": - version: 1.3.0 - resolution: "get-east-asian-width@npm:1.3.0" - checksum: 10c0/1a049ba697e0f9a4d5514c4623781c5246982bdb61082da6b5ae6c33d838e52ce6726407df285cdbb27ec1908b333cf2820989bd3e986e37bb20979437fdf34b - languageName: node - linkType: hard - -"get-intrinsic@npm:^1.2.5, get-intrinsic@npm:^1.2.6": - version: 1.2.7 - resolution: "get-intrinsic@npm:1.2.7" - dependencies: - call-bind-apply-helpers: "npm:^1.0.1" - es-define-property: "npm:^1.0.1" - es-errors: "npm:^1.3.0" - es-object-atoms: "npm:^1.0.0" - function-bind: "npm:^1.1.2" - get-proto: "npm:^1.0.0" - gopd: "npm:^1.2.0" - has-symbols: "npm:^1.1.0" - hasown: "npm:^2.0.2" - math-intrinsics: "npm:^1.1.0" - checksum: 10c0/b475dec9f8bff6f7422f51ff4b7b8d0b68e6776ee83a753c1d627e3008c3442090992788038b37eff72e93e43dceed8c1acbdf2d6751672687ec22127933080d - languageName: node - linkType: hard - -"get-proto@npm:^1.0.0": - version: 1.0.1 - resolution: "get-proto@npm:1.0.1" - dependencies: - dunder-proto: "npm:^1.0.1" - es-object-atoms: "npm:^1.0.0" - checksum: 10c0/9224acb44603c5526955e83510b9da41baf6ae73f7398875fba50edc5e944223a89c4a72b070fcd78beb5f7bdda58ecb6294adc28f7acfc0da05f76a2399643c - languageName: node - linkType: hard - -"glob-parent@npm:^5.1.2, glob-parent@npm:~5.1.2": - version: 5.1.2 - resolution: "glob-parent@npm:5.1.2" - dependencies: - is-glob: "npm:^4.0.1" - checksum: 10c0/cab87638e2112bee3f839ef5f6e0765057163d39c66be8ec1602f3823da4692297ad4e972de876ea17c44d652978638d2fd583c6713d0eb6591706825020c9ee - languageName: node - linkType: hard - -"glob-parent@npm:^6.0.1, glob-parent@npm:^6.0.2": - version: 6.0.2 - resolution: "glob-parent@npm:6.0.2" - dependencies: - is-glob: "npm:^4.0.3" - checksum: 10c0/317034d88654730230b3f43bb7ad4f7c90257a426e872ea0bf157473ac61c99bf5d205fad8f0185f989be8d2fa6d3c7dce1645d99d545b6ea9089c39f838e7f8 - languageName: node - linkType: hard - -"glob-to-regexp@npm:^0.4.1": - version: 0.4.1 - resolution: "glob-to-regexp@npm:0.4.1" - checksum: 10c0/0486925072d7a916f052842772b61c3e86247f0a80cc0deb9b5a3e8a1a9faad5b04fb6f58986a09f34d3e96cd2a22a24b7e9882fb1cf904c31e9a310de96c429 - languageName: node - linkType: hard - -"glob@npm:^10.2.2, glob@npm:^10.3.10, glob@npm:^10.3.7": - version: 10.4.5 - resolution: "glob@npm:10.4.5" - dependencies: - foreground-child: "npm:^3.1.0" - jackspeak: "npm:^3.1.2" - minimatch: "npm:^9.0.4" - minipass: "npm:^7.1.2" - package-json-from-dist: "npm:^1.0.0" - path-scurry: "npm:^1.11.1" - bin: - glob: dist/esm/bin.mjs - checksum: 10c0/19a9759ea77b8e3ca0a43c2f07ecddc2ad46216b786bb8f993c445aee80d345925a21e5280c7b7c6c59e860a0154b84e4b2b60321fea92cd3c56b4a7489f160e - languageName: node - linkType: hard - -"globals@npm:^11.1.0": - version: 11.12.0 - resolution: "globals@npm:11.12.0" - checksum: 10c0/758f9f258e7b19226bd8d4af5d3b0dcf7038780fb23d82e6f98932c44e239f884847f1766e8fa9cc5635ccb3204f7fa7314d4408dd4002a5e8ea827b4018f0a1 - languageName: node - linkType: hard - -"globals@npm:^14.0.0": - version: 14.0.0 - resolution: "globals@npm:14.0.0" - checksum: 10c0/b96ff42620c9231ad468d4c58ff42afee7777ee1c963013ff8aabe095a451d0ceeb8dcd8ef4cbd64d2538cef45f787a78ba3a9574f4a634438963e334471302d - languageName: node - linkType: hard - -"globals@npm:^15.14.0": - version: 15.14.0 - resolution: "globals@npm:15.14.0" - checksum: 10c0/039deb8648bd373b7940c15df9f96ab7508fe92b31bbd39cbd1c1a740bd26db12457aa3e5d211553b234f30e9b1db2fee3683012f543a01a6942c9062857facb - languageName: node - linkType: hard - -"globby@npm:^14.0.0": - version: 14.0.2 - resolution: "globby@npm:14.0.2" - dependencies: - "@sindresorhus/merge-streams": "npm:^2.1.0" - fast-glob: "npm:^3.3.2" - ignore: "npm:^5.2.4" - path-type: "npm:^5.0.0" - slash: "npm:^5.1.0" - unicorn-magic: "npm:^0.1.0" - checksum: 10c0/3f771cd683b8794db1e7ebc8b6b888d43496d93a82aad4e9d974620f578581210b6c5a6e75ea29573ed16a1345222fab6e9b877a8d1ed56eeb147e09f69c6f78 - languageName: node - linkType: hard - -"gopd@npm:^1.2.0": - version: 1.2.0 - resolution: "gopd@npm:1.2.0" - checksum: 10c0/50fff1e04ba2b7737c097358534eacadad1e68d24cccee3272e04e007bed008e68d2614f3987788428fd192a5ae3889d08fb2331417e4fc4a9ab366b2043cead - languageName: node - linkType: hard - -"graceful-fs@npm:^4.1.2, graceful-fs@npm:^4.2.11, graceful-fs@npm:^4.2.4, graceful-fs@npm:^4.2.6": - version: 4.2.11 - resolution: "graceful-fs@npm:4.2.11" - checksum: 10c0/386d011a553e02bc594ac2ca0bd6d9e4c22d7fa8cfbfc448a6d148c59ea881b092db9dbe3547ae4b88e55f1b01f7c4a2ecc53b310c042793e63aa44cf6c257f2 - languageName: node - linkType: hard - -"graphemer@npm:^1.4.0": - version: 1.4.0 - resolution: "graphemer@npm:1.4.0" - checksum: 10c0/e951259d8cd2e0d196c72ec711add7115d42eb9a8146c8eeda5b8d3ac91e5dd816b9cd68920726d9fd4490368e7ed86e9c423f40db87e2d8dfafa00fa17c3a31 - languageName: node - linkType: hard - -"handle-thing@npm:^2.0.0": - version: 2.0.1 - resolution: "handle-thing@npm:2.0.1" - checksum: 10c0/7ae34ba286a3434f1993ebd1cc9c9e6b6d8ea672182db28b1afc0a7119229552fa7031e3e5f3cd32a76430ece4e94b7da6f12af2eb39d6239a7693e4bd63a998 - languageName: node - linkType: hard - -"has-flag@npm:^4.0.0": - version: 4.0.0 - resolution: "has-flag@npm:4.0.0" - checksum: 10c0/2e789c61b7888d66993e14e8331449e525ef42aac53c627cc53d1c3334e768bcb6abdc4f5f0de1478a25beec6f0bd62c7549058b7ac53e924040d4f301f02fd1 - languageName: node - linkType: hard - -"has-symbols@npm:^1.1.0": - version: 1.1.0 - resolution: "has-symbols@npm:1.1.0" - checksum: 10c0/dde0a734b17ae51e84b10986e651c664379018d10b91b6b0e9b293eddb32f0f069688c841fb40f19e9611546130153e0a2a48fd7f512891fb000ddfa36f5a20e - languageName: node - linkType: hard - -"hasown@npm:^2.0.2": - version: 2.0.2 - resolution: "hasown@npm:2.0.2" - dependencies: - function-bind: "npm:^1.1.2" - checksum: 10c0/3769d434703b8ac66b209a4cca0737519925bbdb61dd887f93a16372b14694c63ff4e797686d87c90f08168e81082248b9b028bad60d4da9e0d1148766f56eb9 - languageName: node - linkType: hard - -"hosted-git-info@npm:^8.0.0": - version: 8.0.2 - resolution: "hosted-git-info@npm:8.0.2" - dependencies: - lru-cache: "npm:^10.0.1" - checksum: 10c0/e64f6c1b6db625869934b35c4959aacc365799d9cb1856e0224b5557ee5ecfe224bb8aa850479179a8f3968063ea0f92b8fbb67fe009d46859431dcde7fdc36d - languageName: node - linkType: hard - -"hpack.js@npm:^2.1.6": - version: 2.1.6 - resolution: "hpack.js@npm:2.1.6" - dependencies: - inherits: "npm:^2.0.1" - obuf: "npm:^1.0.0" - readable-stream: "npm:^2.0.1" - wbuf: "npm:^1.1.0" - checksum: 10c0/55b9e824430bab82a19d079cb6e33042d7d0640325678c9917fcc020c61d8a08ca671b6c942c7f0aae9bb6e4b67ffb50734a72f9e21d66407c3138c1983b70f0 - languageName: node - linkType: hard - -"html-entities@npm:^2.4.0": - version: 2.5.2 - resolution: "html-entities@npm:2.5.2" - checksum: 10c0/f20ffb4326606245c439c231de40a7c560607f639bf40ffbfb36b4c70729fd95d7964209045f1a4e62fe17f2364cef3d6e49b02ea09016f207fde51c2211e481 - languageName: node - linkType: hard - -"htmlparser2@npm:^9.0.0": - version: 9.1.0 - resolution: "htmlparser2@npm:9.1.0" - dependencies: - domelementtype: "npm:^2.3.0" - domhandler: "npm:^5.0.3" - domutils: "npm:^3.1.0" - entities: "npm:^4.5.0" - checksum: 10c0/394f6323efc265bbc791d8c0d96bfe95984e0407565248521ab92e2dc7668e5ceeca7bc6ed18d408b9ee3b25032c5743368a4280d280332d782821d5d467ad8f - languageName: node - linkType: hard - -"http-cache-semantics@npm:^4.1.1": - version: 4.1.1 - resolution: "http-cache-semantics@npm:4.1.1" - checksum: 10c0/ce1319b8a382eb3cbb4a37c19f6bfe14e5bb5be3d09079e885e8c513ab2d3cd9214902f8a31c9dc4e37022633ceabfc2d697405deeaf1b8f3552bb4ed996fdfc - languageName: node - linkType: hard - -"http-deceiver@npm:^1.2.7": - version: 1.2.7 - resolution: "http-deceiver@npm:1.2.7" - checksum: 10c0/8bb9b716f5fc55f54a451da7f49b9c695c3e45498a789634daec26b61e4add7c85613a4a9e53726c39d09de7a163891ecd6eb5809adb64500a840fd86fe81d03 - languageName: node - linkType: hard - -"http-errors@npm:2.0.0": - version: 2.0.0 - resolution: "http-errors@npm:2.0.0" - dependencies: - depd: "npm:2.0.0" - inherits: "npm:2.0.4" - setprototypeof: "npm:1.2.0" - statuses: "npm:2.0.1" - toidentifier: "npm:1.0.1" - checksum: 10c0/fc6f2715fe188d091274b5ffc8b3657bd85c63e969daa68ccb77afb05b071a4b62841acb7a21e417b5539014dff2ebf9550f0b14a9ff126f2734a7c1387f8e19 - languageName: node - linkType: hard - -"http-errors@npm:~1.6.2": - version: 1.6.3 - resolution: "http-errors@npm:1.6.3" - dependencies: - depd: "npm:~1.1.2" - inherits: "npm:2.0.3" - setprototypeof: "npm:1.1.0" - statuses: "npm:>= 1.4.0 < 2" - checksum: 10c0/17ec4046ee974477778bfdd525936c254b872054703ec2caa4d6f099566b8adade636ae6aeeacb39302c5cd6e28fb407ebd937f500f5010d0b6850750414ff78 - languageName: node - linkType: hard - -"http-parser-js@npm:>=0.5.1": - version: 0.5.9 - resolution: "http-parser-js@npm:0.5.9" - checksum: 10c0/25aac1096b5270e69b1f6c850c8d4363c1e8b5711f97109cf65d44ecf5dfe3438811036a9b4d4f432474a2519ac46e8feb1a7b6be6e292a956e63bdad12583fb - languageName: node - linkType: hard - -"http-proxy-agent@npm:^7.0.0": - version: 7.0.2 - resolution: "http-proxy-agent@npm:7.0.2" - dependencies: - agent-base: "npm:^7.1.0" - debug: "npm:^4.3.4" - checksum: 10c0/4207b06a4580fb85dd6dff521f0abf6db517489e70863dca1a0291daa7f2d3d2d6015a57bd702af068ea5cf9f1f6ff72314f5f5b4228d299c0904135d2aef921 - languageName: node - linkType: hard - -"http-proxy-middleware@npm:3.0.3": - version: 3.0.3 - resolution: "http-proxy-middleware@npm:3.0.3" - dependencies: - "@types/http-proxy": "npm:^1.17.15" - debug: "npm:^4.3.6" - http-proxy: "npm:^1.18.1" - is-glob: "npm:^4.0.3" - is-plain-object: "npm:^5.0.0" - micromatch: "npm:^4.0.8" - checksum: 10c0/c4d68a10d8d42f02e59f7dc8249c98d1ac03aecee177b42c2d8b6a0cb6b71c6688e759e5387f4cdb570150070ca1c6808b38010cbdf67f4500a2e75671a36e05 - languageName: node - linkType: hard - -"http-proxy-middleware@npm:^2.0.3": - version: 2.0.7 - resolution: "http-proxy-middleware@npm:2.0.7" - dependencies: - "@types/http-proxy": "npm:^1.17.8" - http-proxy: "npm:^1.18.1" - is-glob: "npm:^4.0.1" - is-plain-obj: "npm:^3.0.0" - micromatch: "npm:^4.0.2" - peerDependencies: - "@types/express": ^4.17.13 - peerDependenciesMeta: - "@types/express": - optional: true - checksum: 10c0/8d00a61eb215b83826460b07489d8bb095368ec16e02a9d63e228dcf7524e7c20d61561e5476de1391aecd4ec32ea093279cdc972115b311f8e0a95a24c9e47e - languageName: node - linkType: hard - -"http-proxy@npm:^1.18.1": - version: 1.18.1 - resolution: "http-proxy@npm:1.18.1" - dependencies: - eventemitter3: "npm:^4.0.0" - follow-redirects: "npm:^1.0.0" - requires-port: "npm:^1.0.0" - checksum: 10c0/148dfa700a03fb421e383aaaf88ac1d94521dfc34072f6c59770528c65250983c2e4ec996f2f03aa9f3fe46cd1270a593126068319311e3e8d9e610a37533e94 - languageName: node - linkType: hard - -"https-proxy-agent@npm:7.0.5": - version: 7.0.5 - resolution: "https-proxy-agent@npm:7.0.5" - dependencies: - agent-base: "npm:^7.0.2" - debug: "npm:4" - checksum: 10c0/2490e3acec397abeb88807db52cac59102d5ed758feee6df6112ab3ccd8325e8a1ce8bce6f4b66e5470eca102d31e425ace904242e4fa28dbe0c59c4bafa7b2c - languageName: node - linkType: hard - -"https-proxy-agent@npm:^7.0.1": - version: 7.0.6 - resolution: "https-proxy-agent@npm:7.0.6" - dependencies: - agent-base: "npm:^7.1.2" - debug: "npm:4" - checksum: 10c0/f729219bc735edb621fa30e6e84e60ee5d00802b8247aac0d7b79b0bd6d4b3294737a337b93b86a0bd9e68099d031858a39260c976dc14cdbba238ba1f8779ac - languageName: node - linkType: hard - -"hyperdyperid@npm:^1.2.0": - version: 1.2.0 - resolution: "hyperdyperid@npm:1.2.0" - checksum: 10c0/885ba3177c7181d315a856ee9c0005ff8eb5dcb1ce9e9d61be70987895d934d84686c37c981cceeb53216d4c9c15c1cc25f1804e84cc6a74a16993c5d7fd0893 - languageName: node - linkType: hard - -"iconv-lite@npm:0.4.24, iconv-lite@npm:^0.4.24": - version: 0.4.24 - resolution: "iconv-lite@npm:0.4.24" - dependencies: - safer-buffer: "npm:>= 2.1.2 < 3" - checksum: 10c0/c6886a24cc00f2a059767440ec1bc00d334a89f250db8e0f7feb4961c8727118457e27c495ba94d082e51d3baca378726cd110aaf7ded8b9bbfd6a44760cf1d4 - languageName: node - linkType: hard - -"iconv-lite@npm:^0.6.2, iconv-lite@npm:^0.6.3": - version: 0.6.3 - resolution: "iconv-lite@npm:0.6.3" - dependencies: - safer-buffer: "npm:>= 2.1.2 < 3.0.0" - checksum: 10c0/98102bc66b33fcf5ac044099d1257ba0b7ad5e3ccd3221f34dd508ab4070edff183276221684e1e0555b145fce0850c9f7d2b60a9fcac50fbb4ea0d6e845a3b1 - languageName: node - linkType: hard - -"icss-utils@npm:^5.0.0, icss-utils@npm:^5.1.0": - version: 5.1.0 - resolution: "icss-utils@npm:5.1.0" - peerDependencies: - postcss: ^8.1.0 - checksum: 10c0/39c92936fabd23169c8611d2b5cc39e39d10b19b0d223352f20a7579f75b39d5f786114a6b8fc62bee8c5fed59ba9e0d38f7219a4db383e324fb3061664b043d - languageName: node - linkType: hard - -"ieee754@npm:^1.1.13": - version: 1.2.1 - resolution: "ieee754@npm:1.2.1" - checksum: 10c0/b0782ef5e0935b9f12883a2e2aa37baa75da6e66ce6515c168697b42160807d9330de9a32ec1ed73149aea02e0d822e572bca6f1e22bdcbd2149e13b050b17bb - languageName: node - linkType: hard - -"ignore-walk@npm:^7.0.0": - version: 7.0.0 - resolution: "ignore-walk@npm:7.0.0" - dependencies: - minimatch: "npm:^9.0.0" - checksum: 10c0/3754bcde369a53a92c1d0835ea93feb6c5b2934984d3f5a8f9dd962d13ac33ee3a9e930901a89b5d46fc061870639d983f497186afdfe3484e135f2ad89f5577 - languageName: node - linkType: hard - -"ignore@npm:6.0.2": - version: 6.0.2 - resolution: "ignore@npm:6.0.2" - checksum: 10c0/9a38feac1861906a78ba0f03e8ef3cd6b0526dce2a1a84e1009324b557763afeb9c3ebcc04666b21f7bbf71adda45e76781bb9e2eaa0903d45dcaded634454f5 - languageName: node - linkType: hard - -"ignore@npm:^5.2.0, ignore@npm:^5.2.4, ignore@npm:^5.3.1": - version: 5.3.2 - resolution: "ignore@npm:5.3.2" - checksum: 10c0/f9f652c957983634ded1e7f02da3b559a0d4cc210fca3792cb67f1b153623c9c42efdc1c4121af171e295444459fc4a9201101fb041b1104a3c000bccb188337 - languageName: node - linkType: hard - -"image-size@npm:~0.5.0": - version: 0.5.5 - resolution: "image-size@npm:0.5.5" - bin: - image-size: bin/image-size.js - checksum: 10c0/655204163af06732f483a9fe7cce9dff4a29b7b2e88f5c957a5852e8143fa750f5e54b1955a2ca83de99c5220dbd680002d0d4e09140b01433520f4d5a0b1f4c - languageName: node - linkType: hard - -"immutable@npm:^5.0.2": - version: 5.0.3 - resolution: "immutable@npm:5.0.3" - checksum: 10c0/3269827789e1026cd25c2ea97f0b2c19be852ffd49eda1b674b20178f73d84fa8d945ad6f5ac5bc4545c2b4170af9f6e1f77129bc1cae7974a4bf9b04a9cdfb9 - languageName: node - linkType: hard - -"import-fresh@npm:^3.2.1, import-fresh@npm:^3.3.0": - version: 3.3.0 - resolution: "import-fresh@npm:3.3.0" - dependencies: - parent-module: "npm:^1.0.0" - resolve-from: "npm:^4.0.0" - checksum: 10c0/7f882953aa6b740d1f0e384d0547158bc86efbf2eea0f1483b8900a6f65c5a5123c2cf09b0d542cc419d0b98a759ecaeb394237e97ea427f2da221dc3cd80cc3 - languageName: node - linkType: hard - -"imurmurhash@npm:^0.1.4": - version: 0.1.4 - resolution: "imurmurhash@npm:0.1.4" - checksum: 10c0/8b51313850dd33605c6c9d3fd9638b714f4c4c40250cff658209f30d40da60f78992fb2df5dabee4acf589a6a82bbc79ad5486550754bd9ec4e3fc0d4a57d6a6 - languageName: node - linkType: hard - -"inherits@npm:2.0.3": - version: 2.0.3 - resolution: "inherits@npm:2.0.3" - checksum: 10c0/6e56402373149ea076a434072671f9982f5fad030c7662be0332122fe6c0fa490acb3cc1010d90b6eff8d640b1167d77674add52dfd1bb85d545cf29e80e73e7 - languageName: node - linkType: hard - -"inherits@npm:2.0.4, inherits@npm:^2.0.1, inherits@npm:^2.0.3, inherits@npm:^2.0.4, inherits@npm:~2.0.3": - version: 2.0.4 - resolution: "inherits@npm:2.0.4" - checksum: 10c0/4e531f648b29039fb7426fb94075e6545faa1eb9fe83c29f0b6d9e7263aceb4289d2d4557db0d428188eeb449cc7c5e77b0a0b2c4e248ff2a65933a0dee49ef2 - languageName: node - linkType: hard - -"ini@npm:5.0.0, ini@npm:^5.0.0": - version: 5.0.0 - resolution: "ini@npm:5.0.0" - checksum: 10c0/657491ce766cbb4b335ab221ee8f72b9654d9f0e35c32fe5ff2eb7ab8c5ce72237ff6456555b50cde88e6507a719a70e28e327b450782b4fc20c90326ec8c1a8 - languageName: node - linkType: hard - -"ip-address@npm:^9.0.5": - version: 9.0.5 - resolution: "ip-address@npm:9.0.5" - dependencies: - jsbn: "npm:1.1.0" - sprintf-js: "npm:^1.1.3" - checksum: 10c0/331cd07fafcb3b24100613e4b53e1a2b4feab11e671e655d46dc09ee233da5011284d09ca40c4ecbdfe1d0004f462958675c224a804259f2f78d2465a87824bc - languageName: node - linkType: hard - -"ipaddr.js@npm:1.9.1": - version: 1.9.1 - resolution: "ipaddr.js@npm:1.9.1" - checksum: 10c0/0486e775047971d3fdb5fb4f063829bac45af299ae0b82dcf3afa2145338e08290563a2a70f34b732d795ecc8311902e541a8530eeb30d75860a78ff4e94ce2a - languageName: node - linkType: hard - -"ipaddr.js@npm:^2.1.0": - version: 2.2.0 - resolution: "ipaddr.js@npm:2.2.0" - checksum: 10c0/e4ee875dc1bd92ac9d27e06cfd87cdb63ca786ff9fd7718f1d4f7a8ef27db6e5d516128f52d2c560408cbb75796ac2f83ead669e73507c86282d45f84c5abbb6 - languageName: node - linkType: hard - -"is-arrayish@npm:^0.2.1": - version: 0.2.1 - resolution: "is-arrayish@npm:0.2.1" - checksum: 10c0/e7fb686a739068bb70f860b39b67afc62acc62e36bb61c5f965768abce1873b379c563e61dd2adad96ebb7edf6651111b385e490cf508378959b0ed4cac4e729 - languageName: node - linkType: hard - -"is-binary-path@npm:~2.1.0": - version: 2.1.0 - resolution: "is-binary-path@npm:2.1.0" - dependencies: - binary-extensions: "npm:^2.0.0" - checksum: 10c0/a16eaee59ae2b315ba36fad5c5dcaf8e49c3e27318f8ab8fa3cdb8772bf559c8d1ba750a589c2ccb096113bb64497084361a25960899cb6172a6925ab6123d38 - languageName: node - linkType: hard - -"is-core-module@npm:^2.13.0, is-core-module@npm:^2.16.0": - version: 2.16.1 - resolution: "is-core-module@npm:2.16.1" - dependencies: - hasown: "npm:^2.0.2" - checksum: 10c0/898443c14780a577e807618aaae2b6f745c8538eca5c7bc11388a3f2dc6de82b9902bcc7eb74f07be672b11bbe82dd6a6edded44a00cb3d8f933d0459905eedd - languageName: node - linkType: hard - -"is-docker@npm:^3.0.0": - version: 3.0.0 - resolution: "is-docker@npm:3.0.0" - bin: - is-docker: cli.js - checksum: 10c0/d2c4f8e6d3e34df75a5defd44991b6068afad4835bb783b902fa12d13ebdb8f41b2a199dcb0b5ed2cb78bfee9e4c0bbdb69c2d9646f4106464674d3e697a5856 - languageName: node - linkType: hard - -"is-extglob@npm:^2.1.1": - version: 2.1.1 - resolution: "is-extglob@npm:2.1.1" - checksum: 10c0/5487da35691fbc339700bbb2730430b07777a3c21b9ebaecb3072512dfd7b4ba78ac2381a87e8d78d20ea08affb3f1971b4af629173a6bf435ff8a4c47747912 - languageName: node - linkType: hard - -"is-fullwidth-code-point@npm:^3.0.0": - version: 3.0.0 - resolution: "is-fullwidth-code-point@npm:3.0.0" - checksum: 10c0/bb11d825e049f38e04c06373a8d72782eee0205bda9d908cc550ccb3c59b99d750ff9537982e01733c1c94a58e35400661f57042158ff5e8f3e90cf936daf0fc - languageName: node - linkType: hard - -"is-fullwidth-code-point@npm:^4.0.0": - version: 4.0.0 - resolution: "is-fullwidth-code-point@npm:4.0.0" - checksum: 10c0/df2a717e813567db0f659c306d61f2f804d480752526886954a2a3e2246c7745fd07a52b5fecf2b68caf0a6c79dcdace6166fdf29cc76ed9975cc334f0a018b8 - languageName: node - linkType: hard - -"is-fullwidth-code-point@npm:^5.0.0": - version: 5.0.0 - resolution: "is-fullwidth-code-point@npm:5.0.0" - dependencies: - get-east-asian-width: "npm:^1.0.0" - checksum: 10c0/cd591b27d43d76b05fa65ed03eddce57a16e1eca0b7797ff7255de97019bcaf0219acfc0c4f7af13319e13541f2a53c0ace476f442b13267b9a6a7568f2b65c8 - languageName: node - linkType: hard - -"is-glob@npm:^4.0.0, is-glob@npm:^4.0.1, is-glob@npm:^4.0.3, is-glob@npm:~4.0.1": - version: 4.0.3 - resolution: "is-glob@npm:4.0.3" - dependencies: - is-extglob: "npm:^2.1.1" - checksum: 10c0/17fb4014e22be3bbecea9b2e3a76e9e34ff645466be702f1693e8f1ee1adac84710d0be0bd9f967d6354036fd51ab7c2741d954d6e91dae6bb69714de92c197a - languageName: node - linkType: hard - -"is-inside-container@npm:^1.0.0": - version: 1.0.0 - resolution: "is-inside-container@npm:1.0.0" - dependencies: - is-docker: "npm:^3.0.0" - bin: - is-inside-container: cli.js - checksum: 10c0/a8efb0e84f6197e6ff5c64c52890fa9acb49b7b74fed4da7c95383965da6f0fa592b4dbd5e38a79f87fc108196937acdbcd758fcefc9b140e479b39ce1fcd1cd - languageName: node - linkType: hard - -"is-interactive@npm:^1.0.0": - version: 1.0.0 - resolution: "is-interactive@npm:1.0.0" - checksum: 10c0/dd47904dbf286cd20aa58c5192161be1a67138485b9836d5a70433b21a45442e9611b8498b8ab1f839fc962c7620667a50535fdfb4a6bc7989b8858645c06b4d - languageName: node - linkType: hard - -"is-network-error@npm:^1.0.0": - version: 1.1.0 - resolution: "is-network-error@npm:1.1.0" - checksum: 10c0/89eef83c2a4cf43d853145ce175d1cf43183b7a58d48c7a03e7eed4eb395d0934c1f6d101255cdd8c8c2980ab529bfbe5dd9edb24e1c3c28d2b3c814469b5b7d - languageName: node - linkType: hard - -"is-number@npm:^7.0.0": - version: 7.0.0 - resolution: "is-number@npm:7.0.0" - checksum: 10c0/b4686d0d3053146095ccd45346461bc8e53b80aeb7671cc52a4de02dbbf7dc0d1d2a986e2fe4ae206984b4d34ef37e8b795ebc4f4295c978373e6575e295d811 - languageName: node - linkType: hard - -"is-plain-obj@npm:^3.0.0": - version: 3.0.0 - resolution: "is-plain-obj@npm:3.0.0" - checksum: 10c0/8e6483bfb051d42ec9c704c0ede051a821c6b6f9a6c7a3e3b55aa855e00981b0580c8f3b1f5e2e62649b39179b1abfee35d6f8086d999bfaa32c1908d29b07bc - languageName: node - linkType: hard - -"is-plain-object@npm:^2.0.4": - version: 2.0.4 - resolution: "is-plain-object@npm:2.0.4" - dependencies: - isobject: "npm:^3.0.1" - checksum: 10c0/f050fdd5203d9c81e8c4df1b3ff461c4bc64e8b5ca383bcdde46131361d0a678e80bcf00b5257646f6c636197629644d53bd8e2375aea633de09a82d57e942f4 - languageName: node - linkType: hard - -"is-plain-object@npm:^5.0.0": - version: 5.0.0 - resolution: "is-plain-object@npm:5.0.0" - checksum: 10c0/893e42bad832aae3511c71fd61c0bf61aa3a6d853061c62a307261842727d0d25f761ce9379f7ba7226d6179db2a3157efa918e7fe26360f3bf0842d9f28942c - languageName: node - linkType: hard - -"is-unicode-supported@npm:^0.1.0": - version: 0.1.0 - resolution: "is-unicode-supported@npm:0.1.0" - checksum: 10c0/00cbe3455c3756be68d2542c416cab888aebd5012781d6819749fefb15162ff23e38501fe681b3d751c73e8ff561ac09a5293eba6f58fdf0178462ce6dcb3453 - languageName: node - linkType: hard - -"is-what@npm:^3.14.1": - version: 3.14.1 - resolution: "is-what@npm:3.14.1" - checksum: 10c0/4b770b85454c877b6929a84fd47c318e1f8c2ff70fd72fd625bc3fde8e0c18a6e57345b6e7aa1ee9fbd1c608d27cfe885df473036c5c2e40cd2187250804a2c7 - languageName: node - linkType: hard - -"is-wsl@npm:^3.1.0": - version: 3.1.0 - resolution: "is-wsl@npm:3.1.0" - dependencies: - is-inside-container: "npm:^1.0.0" - checksum: 10c0/d3317c11995690a32c362100225e22ba793678fe8732660c6de511ae71a0ff05b06980cf21f98a6bf40d7be0e9e9506f859abe00a1118287d63e53d0a3d06947 - languageName: node - linkType: hard - -"isarray@npm:~1.0.0": - version: 1.0.0 - resolution: "isarray@npm:1.0.0" - checksum: 10c0/18b5be6669be53425f0b84098732670ed4e727e3af33bc7f948aac01782110eb9a18b3b329c5323bcdd3acdaae547ee077d3951317e7f133bff7105264b3003d - languageName: node - linkType: hard - -"isexe@npm:^2.0.0": - version: 2.0.0 - resolution: "isexe@npm:2.0.0" - checksum: 10c0/228cfa503fadc2c31596ab06ed6aa82c9976eec2bfd83397e7eaf06d0ccf42cd1dfd6743bf9aeb01aebd4156d009994c5f76ea898d2832c1fe342da923ca457d - languageName: node - linkType: hard - -"isexe@npm:^3.1.1": - version: 3.1.1 - resolution: "isexe@npm:3.1.1" - checksum: 10c0/9ec257654093443eb0a528a9c8cbba9c0ca7616ccb40abd6dde7202734d96bb86e4ac0d764f0f8cd965856aacbff2f4ce23e730dc19dfb41e3b0d865ca6fdcc7 - languageName: node - linkType: hard - -"isobject@npm:^3.0.1": - version: 3.0.1 - resolution: "isobject@npm:3.0.1" - checksum: 10c0/03344f5064a82f099a0cd1a8a407f4c0d20b7b8485e8e816c39f249e9416b06c322e8dec5b842b6bb8a06de0af9cb48e7bc1b5352f0fadc2f0abac033db3d4db - languageName: node - linkType: hard - -"istanbul-lib-coverage@npm:^3.2.0": - version: 3.2.2 - resolution: "istanbul-lib-coverage@npm:3.2.2" - checksum: 10c0/6c7ff2106769e5f592ded1fb418f9f73b4411fd5a084387a5410538332b6567cd1763ff6b6cadca9b9eb2c443cce2f7ea7d7f1b8d315f9ce58539793b1e0922b - languageName: node - linkType: hard - -"istanbul-lib-instrument@npm:6.0.3": - version: 6.0.3 - resolution: "istanbul-lib-instrument@npm:6.0.3" - dependencies: - "@babel/core": "npm:^7.23.9" - "@babel/parser": "npm:^7.23.9" - "@istanbuljs/schema": "npm:^0.1.3" - istanbul-lib-coverage: "npm:^3.2.0" - semver: "npm:^7.5.4" - checksum: 10c0/a1894e060dd2a3b9f046ffdc87b44c00a35516f5e6b7baf4910369acca79e506fc5323a816f811ae23d82334b38e3ddeb8b3b331bd2c860540793b59a8689128 - languageName: node - linkType: hard - -"jackspeak@npm:^3.1.2": - version: 3.4.3 - resolution: "jackspeak@npm:3.4.3" - dependencies: - "@isaacs/cliui": "npm:^8.0.2" - "@pkgjs/parseargs": "npm:^0.11.0" - dependenciesMeta: - "@pkgjs/parseargs": - optional: true - checksum: 10c0/6acc10d139eaefdbe04d2f679e6191b3abf073f111edf10b1de5302c97ec93fffeb2fdd8681ed17f16268aa9dd4f8c588ed9d1d3bffbbfa6e8bf897cbb3149b9 - languageName: node - linkType: hard - -"jest-worker@npm:^27.4.5": - version: 27.5.1 - resolution: "jest-worker@npm:27.5.1" - dependencies: - "@types/node": "npm:*" - merge-stream: "npm:^2.0.0" - supports-color: "npm:^8.0.0" - checksum: 10c0/8c4737ffd03887b3c6768e4cc3ca0269c0336c1e4b1b120943958ddb035ed2a0fc6acab6dc99631720a3720af4e708ff84fb45382ad1e83c27946adf3623969b - languageName: node - linkType: hard - -"jiti@npm:^1.20.0": - version: 1.21.7 - resolution: "jiti@npm:1.21.7" - bin: - jiti: bin/jiti.js - checksum: 10c0/77b61989c758ff32407cdae8ddc77f85e18e1a13fc4977110dbd2e05fc761842f5f71bce684d9a01316e1c4263971315a111385759951080bbfe17cbb5de8f7a - languageName: node - linkType: hard - -"js-tokens@npm:^4.0.0": - version: 4.0.0 - resolution: "js-tokens@npm:4.0.0" - checksum: 10c0/e248708d377aa058eacf2037b07ded847790e6de892bbad3dac0abba2e759cb9f121b00099a65195616badcb6eca8d14d975cb3e89eb1cfda644756402c8aeed - languageName: node - linkType: hard - -"js-yaml@npm:^4.1.0": - version: 4.1.0 - resolution: "js-yaml@npm:4.1.0" - dependencies: - argparse: "npm:^2.0.1" - bin: - js-yaml: bin/js-yaml.js - checksum: 10c0/184a24b4eaacfce40ad9074c64fd42ac83cf74d8c8cd137718d456ced75051229e5061b8633c3366b8aada17945a7a356b337828c19da92b51ae62126575018f - languageName: node - linkType: hard - -"jsbn@npm:1.1.0": - version: 1.1.0 - resolution: "jsbn@npm:1.1.0" - checksum: 10c0/4f907fb78d7b712e11dea8c165fe0921f81a657d3443dde75359ed52eb2b5d33ce6773d97985a089f09a65edd80b11cb75c767b57ba47391fee4c969f7215c96 - languageName: node - linkType: hard - -"jsesc@npm:^3.0.2": - version: 3.1.0 - resolution: "jsesc@npm:3.1.0" - bin: - jsesc: bin/jsesc - checksum: 10c0/531779df5ec94f47e462da26b4cbf05eb88a83d9f08aac2ba04206508fc598527a153d08bd462bae82fc78b3eaa1a908e1a4a79f886e9238641c4cdefaf118b1 - languageName: node - linkType: hard - -"jsesc@npm:~3.0.2": - version: 3.0.2 - resolution: "jsesc@npm:3.0.2" - bin: - jsesc: bin/jsesc - checksum: 10c0/ef22148f9e793180b14d8a145ee6f9f60f301abf443288117b4b6c53d0ecd58354898dc506ccbb553a5f7827965cd38bc5fb726575aae93c5e8915e2de8290e1 - languageName: node - linkType: hard - -"json-buffer@npm:3.0.1": - version: 3.0.1 - resolution: "json-buffer@npm:3.0.1" - checksum: 10c0/0d1c91569d9588e7eef2b49b59851f297f3ab93c7b35c7c221e288099322be6b562767d11e4821da500f3219542b9afd2e54c5dc573107c1126ed1080f8e96d7 - languageName: node - linkType: hard - -"json-parse-even-better-errors@npm:^2.3.0, json-parse-even-better-errors@npm:^2.3.1": - version: 2.3.1 - resolution: "json-parse-even-better-errors@npm:2.3.1" - checksum: 10c0/140932564c8f0b88455432e0f33c4cb4086b8868e37524e07e723f4eaedb9425bdc2bafd71bd1d9765bd15fd1e2d126972bc83990f55c467168c228c24d665f3 - languageName: node - linkType: hard - -"json-parse-even-better-errors@npm:^4.0.0": - version: 4.0.0 - resolution: "json-parse-even-better-errors@npm:4.0.0" - checksum: 10c0/84cd9304a97e8fb2af3937bf53acb91c026aeb859703c332684e688ea60db27fc2242aa532a84e1883fdcbe1e5c1fb57c2bef38e312021aa1cd300defc63cf16 - languageName: node - linkType: hard - -"json-schema-traverse@npm:^0.4.1": - version: 0.4.1 - resolution: "json-schema-traverse@npm:0.4.1" - checksum: 10c0/108fa90d4cc6f08243aedc6da16c408daf81793bf903e9fd5ab21983cda433d5d2da49e40711da016289465ec2e62e0324dcdfbc06275a607fe3233fde4942ce - languageName: node - linkType: hard - -"json-schema-traverse@npm:^1.0.0": - version: 1.0.0 - resolution: "json-schema-traverse@npm:1.0.0" - checksum: 10c0/71e30015d7f3d6dc1c316d6298047c8ef98a06d31ad064919976583eb61e1018a60a0067338f0f79cabc00d84af3fcc489bd48ce8a46ea165d9541ba17fb30c6 - languageName: node - linkType: hard - -"json-stable-stringify-without-jsonify@npm:^1.0.1": - version: 1.0.1 - resolution: "json-stable-stringify-without-jsonify@npm:1.0.1" - checksum: 10c0/cb168b61fd4de83e58d09aaa6425ef71001bae30d260e2c57e7d09a5fd82223e2f22a042dedaab8db23b7d9ae46854b08bb1f91675a8be11c5cffebef5fb66a5 - languageName: node - linkType: hard - -"json5@npm:^2.1.2, json5@npm:^2.2.3": - version: 2.2.3 - resolution: "json5@npm:2.2.3" - bin: - json5: lib/cli.js - checksum: 10c0/5a04eed94810fa55c5ea138b2f7a5c12b97c3750bc63d11e511dcecbfef758003861522a070c2272764ee0f4e3e323862f386945aeb5b85b87ee43f084ba586c - languageName: node - linkType: hard - -"jsonc-parser@npm:3.3.1": - version: 3.3.1 - resolution: "jsonc-parser@npm:3.3.1" - checksum: 10c0/269c3ae0a0e4f907a914bf334306c384aabb9929bd8c99f909275ebd5c2d3bc70b9bcd119ad794f339dec9f24b6a4ee9cd5a8ab2e6435e730ad4075388fc2ab6 - languageName: node - linkType: hard - -"jsonparse@npm:^1.3.1": - version: 1.3.1 - resolution: "jsonparse@npm:1.3.1" - checksum: 10c0/89bc68080cd0a0e276d4b5ab1b79cacd68f562467008d176dc23e16e97d4efec9e21741d92ba5087a8433526a45a7e6a9d5ef25408696c402ca1cfbc01a90bf0 - languageName: node - linkType: hard - -"karma-source-map-support@npm:1.4.0": - version: 1.4.0 - resolution: "karma-source-map-support@npm:1.4.0" - dependencies: - source-map-support: "npm:^0.5.5" - checksum: 10c0/76085abfa85858e471621386a96842d03b3ae0ff12a997b47a7f51f3e38cd9934792f23cd4bdfb14f49323367a4154ccf8f45c7cbbff88bedd3e1d2580d21ae6 - languageName: node - linkType: hard - -"keyv@npm:^4.5.4": - version: 4.5.4 - resolution: "keyv@npm:4.5.4" - dependencies: - json-buffer: "npm:3.0.1" - checksum: 10c0/aa52f3c5e18e16bb6324876bb8b59dd02acf782a4b789c7b2ae21107fab95fab3890ed448d4f8dba80ce05391eeac4bfabb4f02a20221342982f806fa2cf271e - languageName: node - linkType: hard - -"kind-of@npm:^6.0.2": - version: 6.0.3 - resolution: "kind-of@npm:6.0.3" - checksum: 10c0/61cdff9623dabf3568b6445e93e31376bee1cdb93f8ba7033d86022c2a9b1791a1d9510e026e6465ebd701a6dd2f7b0808483ad8838341ac52f003f512e0b4c4 - languageName: node - linkType: hard - -"launch-editor@npm:^2.6.1": - version: 2.9.1 - resolution: "launch-editor@npm:2.9.1" - dependencies: - picocolors: "npm:^1.0.0" - shell-quote: "npm:^1.8.1" - checksum: 10c0/891f1d136ed8e4ea12e16c196a0d2e07f23c7b983e3ab532b2be1775fb244909581507cce97c50f9d5ca92680b53e4a75c72ddcf20184aa6c4da6ebbe87703f5 - languageName: node - linkType: hard - -"less-loader@npm:12.2.0": - version: 12.2.0 - resolution: "less-loader@npm:12.2.0" - peerDependencies: - "@rspack/core": 0.x || 1.x - less: ^3.5.0 || ^4.0.0 - webpack: ^5.0.0 - peerDependenciesMeta: - "@rspack/core": - optional: true - webpack: - optional: true - checksum: 10c0/54eea545727930801d2ccc0b586332cd07d0f922b14ab7c8b3f03199944d770ac363081081ed2fda5f23da904336367cb2bb40007c033970dce25f7f9c906ba2 - languageName: node - linkType: hard - -"less@npm:4.2.0": - version: 4.2.0 - resolution: "less@npm:4.2.0" - dependencies: - copy-anything: "npm:^2.0.1" - errno: "npm:^0.1.1" - graceful-fs: "npm:^4.1.2" - image-size: "npm:~0.5.0" - make-dir: "npm:^2.1.0" - mime: "npm:^1.4.1" - needle: "npm:^3.1.0" - parse-node-version: "npm:^1.0.1" - source-map: "npm:~0.6.0" - tslib: "npm:^2.3.0" - dependenciesMeta: - errno: - optional: true - graceful-fs: - optional: true - image-size: - optional: true - make-dir: - optional: true - mime: - optional: true - needle: - optional: true - source-map: - optional: true - bin: - lessc: bin/lessc - checksum: 10c0/8593d547a3e7651555a2c51bac8b148b37ec14e75e6e28ee4ddf27eb49cbcb4b558e50cdefa97d6942a8120fc744ace0d61c43d4c246e098c8828269b14cf5fb - languageName: node - linkType: hard - -"levn@npm:^0.4.1": - version: 0.4.1 - resolution: "levn@npm:0.4.1" - dependencies: - prelude-ls: "npm:^1.2.1" - type-check: "npm:~0.4.0" - checksum: 10c0/effb03cad7c89dfa5bd4f6989364bfc79994c2042ec5966cb9b95990e2edee5cd8969ddf42616a0373ac49fac1403437deaf6e9050fbbaa3546093a59b9ac94e - languageName: node - linkType: hard - -"license-webpack-plugin@npm:4.0.2": - version: 4.0.2 - resolution: "license-webpack-plugin@npm:4.0.2" - dependencies: - webpack-sources: "npm:^3.0.0" - peerDependenciesMeta: - webpack: - optional: true - webpack-sources: - optional: true - checksum: 10c0/6014492b22c5f28a4d367057b5b2c1214b83c73785157fea130d5b877b50ed8820d8d8e73e96b3437c455b5b5c6817b36837da093239f95b534be43c0cdcfedc - languageName: node - linkType: hard - -"lines-and-columns@npm:^1.1.6": - version: 1.2.4 - resolution: "lines-and-columns@npm:1.2.4" - checksum: 10c0/3da6ee62d4cd9f03f5dc90b4df2540fb85b352081bee77fe4bbcd12c9000ead7f35e0a38b8d09a9bb99b13223446dd8689ff3c4959807620726d788701a83d2d - languageName: node - linkType: hard - -"listr2@npm:8.2.5": - version: 8.2.5 - resolution: "listr2@npm:8.2.5" - dependencies: - cli-truncate: "npm:^4.0.0" - colorette: "npm:^2.0.20" - eventemitter3: "npm:^5.0.1" - log-update: "npm:^6.1.0" - rfdc: "npm:^1.4.1" - wrap-ansi: "npm:^9.0.0" - checksum: 10c0/f5a9599514b00c27d7eb32d1117c83c61394b2a985ec20e542c798bf91cf42b19340215701522736f5b7b42f557e544afeadec47866e35e5d4f268f552729671 - languageName: node - linkType: hard - -"lmdb@npm:3.1.5": - version: 3.1.5 - resolution: "lmdb@npm:3.1.5" - dependencies: - "@lmdb/lmdb-darwin-arm64": "npm:3.1.5" - "@lmdb/lmdb-darwin-x64": "npm:3.1.5" - "@lmdb/lmdb-linux-arm": "npm:3.1.5" - "@lmdb/lmdb-linux-arm64": "npm:3.1.5" - "@lmdb/lmdb-linux-x64": "npm:3.1.5" - "@lmdb/lmdb-win32-x64": "npm:3.1.5" - msgpackr: "npm:^1.11.2" - node-addon-api: "npm:^6.1.0" - node-gyp: "npm:latest" - node-gyp-build-optional-packages: "npm:5.2.2" - ordered-binary: "npm:^1.5.3" - weak-lru-cache: "npm:^1.2.2" - dependenciesMeta: - "@lmdb/lmdb-darwin-arm64": - optional: true - "@lmdb/lmdb-darwin-x64": - optional: true - "@lmdb/lmdb-linux-arm": - optional: true - "@lmdb/lmdb-linux-arm64": - optional: true - "@lmdb/lmdb-linux-x64": - optional: true - "@lmdb/lmdb-win32-x64": - optional: true - bin: - download-lmdb-prebuilds: bin/download-prebuilds.js - checksum: 10c0/15731b1e94a25183f8e7000a6a1636c7d82b992340110692bdea9ef320af8d284f988683679b78024c61137cab1cfa46f8e9a99d00d586c2b56497b994095cac - languageName: node - linkType: hard - -"loader-runner@npm:^4.2.0": - version: 4.3.0 - resolution: "loader-runner@npm:4.3.0" - checksum: 10c0/a44d78aae0907a72f73966fe8b82d1439c8c485238bd5a864b1b9a2a3257832effa858790241e6b37876b5446a78889adf2fcc8dd897ce54c089ecc0a0ce0bf0 - languageName: node - linkType: hard - -"loader-utils@npm:3.3.1": - version: 3.3.1 - resolution: "loader-utils@npm:3.3.1" - checksum: 10c0/f2af4eb185ac5bf7e56e1337b666f90744e9f443861ac521b48f093fb9e8347f191c8960b4388a3365147d218913bc23421234e7788db69f385bacfefa0b4758 - languageName: node - linkType: hard - -"loader-utils@npm:^2.0.0": - version: 2.0.4 - resolution: "loader-utils@npm:2.0.4" - dependencies: - big.js: "npm:^5.2.2" - emojis-list: "npm:^3.0.0" - json5: "npm:^2.1.2" - checksum: 10c0/d5654a77f9d339ec2a03d88221a5a695f337bf71eb8dea031b3223420bb818964ba8ed0069145c19b095f6c8b8fd386e602a3fc7ca987042bd8bb1dcc90d7100 - languageName: node - linkType: hard - -"locate-path@npm:^6.0.0": - version: 6.0.0 - resolution: "locate-path@npm:6.0.0" - dependencies: - p-locate: "npm:^5.0.0" - checksum: 10c0/d3972ab70dfe58ce620e64265f90162d247e87159b6126b01314dd67be43d50e96a50b517bce2d9452a79409c7614054c277b5232377de50416564a77ac7aad3 - languageName: node - linkType: hard - -"locate-path@npm:^7.1.0": - version: 7.2.0 - resolution: "locate-path@npm:7.2.0" - dependencies: - p-locate: "npm:^6.0.0" - checksum: 10c0/139e8a7fe11cfbd7f20db03923cacfa5db9e14fa14887ea121345597472b4a63c1a42a8a5187defeeff6acf98fd568da7382aa39682d38f0af27433953a97751 - languageName: node - linkType: hard - -"lodash.debounce@npm:^4.0.8": - version: 4.0.8 - resolution: "lodash.debounce@npm:4.0.8" - checksum: 10c0/762998a63e095412b6099b8290903e0a8ddcb353ac6e2e0f2d7e7d03abd4275fe3c689d88960eb90b0dde4f177554d51a690f22a343932ecbc50a5d111849987 - languageName: node - linkType: hard - -"lodash.merge@npm:^4.6.2": - version: 4.6.2 - resolution: "lodash.merge@npm:4.6.2" - checksum: 10c0/402fa16a1edd7538de5b5903a90228aa48eb5533986ba7fa26606a49db2572bf414ff73a2c9f5d5fd36b31c46a5d5c7e1527749c07cbcf965ccff5fbdf32c506 - languageName: node - linkType: hard - -"log-symbols@npm:^4.1.0": - version: 4.1.0 - resolution: "log-symbols@npm:4.1.0" - dependencies: - chalk: "npm:^4.1.0" - is-unicode-supported: "npm:^0.1.0" - checksum: 10c0/67f445a9ffa76db1989d0fa98586e5bc2fd5247260dafb8ad93d9f0ccd5896d53fb830b0e54dade5ad838b9de2006c826831a3c528913093af20dff8bd24aca6 - languageName: node - linkType: hard - -"log-update@npm:^6.1.0": - version: 6.1.0 - resolution: "log-update@npm:6.1.0" - dependencies: - ansi-escapes: "npm:^7.0.0" - cli-cursor: "npm:^5.0.0" - slice-ansi: "npm:^7.1.0" - strip-ansi: "npm:^7.1.0" - wrap-ansi: "npm:^9.0.0" - checksum: 10c0/4b350c0a83d7753fea34dcac6cd797d1dc9603291565de009baa4aa91c0447eab0d3815a05c8ec9ac04fdfffb43c82adcdb03ec1fceafd8518e1a8c1cff4ff89 - languageName: node - linkType: hard - -"lru-cache@npm:^10.0.1, lru-cache@npm:^10.2.0": - version: 10.4.3 - resolution: "lru-cache@npm:10.4.3" - checksum: 10c0/ebd04fbca961e6c1d6c0af3799adcc966a1babe798f685bb84e6599266599cd95d94630b10262f5424539bc4640107e8a33aa28585374abf561d30d16f4b39fb - languageName: node - linkType: hard - -"lru-cache@npm:^5.1.1": - version: 5.1.1 - resolution: "lru-cache@npm:5.1.1" - dependencies: - yallist: "npm:^3.0.2" - checksum: 10c0/89b2ef2ef45f543011e38737b8a8622a2f8998cddf0e5437174ef8f1f70a8b9d14a918ab3e232cb3ba343b7abddffa667f0b59075b2b80e6b4d63c3de6127482 - languageName: node - linkType: hard - -"magic-string@npm:0.30.12": - version: 0.30.12 - resolution: "magic-string@npm:0.30.12" - dependencies: - "@jridgewell/sourcemap-codec": "npm:^1.5.0" - checksum: 10c0/469f457d18af37dfcca8617086ea8a65bcd8b60ba8a1182cb024ce43e470ace3c9d1cb6bee58d3b311768fb16bc27bd50bdeebcaa63dadd0fd46cac4d2e11d5f - languageName: node - linkType: hard - -"make-dir@npm:^2.1.0": - version: 2.1.0 - resolution: "make-dir@npm:2.1.0" - dependencies: - pify: "npm:^4.0.1" - semver: "npm:^5.6.0" - checksum: 10c0/ada869944d866229819735bee5548944caef560d7a8536ecbc6536edca28c72add47cc4f6fc39c54fb25d06b58da1f8994cf7d9df7dadea047064749efc085d8 - languageName: node - linkType: hard - -"make-fetch-happen@npm:^14.0.0, make-fetch-happen@npm:^14.0.1, make-fetch-happen@npm:^14.0.3": - version: 14.0.3 - resolution: "make-fetch-happen@npm:14.0.3" - dependencies: - "@npmcli/agent": "npm:^3.0.0" - cacache: "npm:^19.0.1" - http-cache-semantics: "npm:^4.1.1" - minipass: "npm:^7.0.2" - minipass-fetch: "npm:^4.0.0" - minipass-flush: "npm:^1.0.5" - minipass-pipeline: "npm:^1.2.4" - negotiator: "npm:^1.0.0" - proc-log: "npm:^5.0.0" - promise-retry: "npm:^2.0.1" - ssri: "npm:^12.0.0" - checksum: 10c0/c40efb5e5296e7feb8e37155bde8eb70bc57d731b1f7d90e35a092fde403d7697c56fb49334d92d330d6f1ca29a98142036d6480a12681133a0a1453164cb2f0 - languageName: node - linkType: hard - -"math-intrinsics@npm:^1.1.0": - version: 1.1.0 - resolution: "math-intrinsics@npm:1.1.0" - checksum: 10c0/7579ff94e899e2f76ab64491d76cf606274c874d8f2af4a442c016bd85688927fcfca157ba6bf74b08e9439dc010b248ce05b96cc7c126a354c3bae7fcb48b7f - languageName: node - linkType: hard - -"media-typer@npm:0.3.0": - version: 0.3.0 - resolution: "media-typer@npm:0.3.0" - checksum: 10c0/d160f31246907e79fed398470285f21bafb45a62869dc469b1c8877f3f064f5eabc4bcc122f9479b8b605bc5c76187d7871cf84c4ee3ecd3e487da1993279928 - languageName: node - linkType: hard - -"memfs@npm:^4.6.0": - version: 4.17.0 - resolution: "memfs@npm:4.17.0" - dependencies: - "@jsonjoy.com/json-pack": "npm:^1.0.3" - "@jsonjoy.com/util": "npm:^1.3.0" - tree-dump: "npm:^1.0.1" - tslib: "npm:^2.0.0" - checksum: 10c0/2901f69e80e1fbefa8aafe994a253fff6f34eb176d8b80d57476311611e516a11ab4dd93f852c8739fe04f2b57d6a4ca7a1828fa0bd401ce631bcac214b3d58b - languageName: node - linkType: hard - -"merge-descriptors@npm:1.0.3": - version: 1.0.3 - resolution: "merge-descriptors@npm:1.0.3" - checksum: 10c0/866b7094afd9293b5ea5dcd82d71f80e51514bed33b4c4e9f516795dc366612a4cbb4dc94356e943a8a6914889a914530badff27f397191b9b75cda20b6bae93 - languageName: node - linkType: hard - -"merge-stream@npm:^2.0.0": - version: 2.0.0 - resolution: "merge-stream@npm:2.0.0" - checksum: 10c0/867fdbb30a6d58b011449b8885601ec1690c3e41c759ecd5a9d609094f7aed0096c37823ff4a7190ef0b8f22cc86beb7049196ff68c016e3b3c671d0dac91ce5 - languageName: node - linkType: hard - -"merge2@npm:^1.3.0": - version: 1.4.1 - resolution: "merge2@npm:1.4.1" - checksum: 10c0/254a8a4605b58f450308fc474c82ac9a094848081bf4c06778200207820e5193726dc563a0d2c16468810516a5c97d9d3ea0ca6585d23c58ccfff2403e8dbbeb - languageName: node - linkType: hard - -"methods@npm:~1.1.2": - version: 1.1.2 - resolution: "methods@npm:1.1.2" - checksum: 10c0/bdf7cc72ff0a33e3eede03708c08983c4d7a173f91348b4b1e4f47d4cdbf734433ad971e7d1e8c77247d9e5cd8adb81ea4c67b0a2db526b758b2233d7814b8b2 - languageName: node - linkType: hard - -"micromark-core-commonmark@npm:^2.0.0": - version: 2.0.2 - resolution: "micromark-core-commonmark@npm:2.0.2" - dependencies: - decode-named-character-reference: "npm:^1.0.0" - devlop: "npm:^1.0.0" - micromark-factory-destination: "npm:^2.0.0" - micromark-factory-label: "npm:^2.0.0" - micromark-factory-space: "npm:^2.0.0" - micromark-factory-title: "npm:^2.0.0" - micromark-factory-whitespace: "npm:^2.0.0" - micromark-util-character: "npm:^2.0.0" - micromark-util-chunked: "npm:^2.0.0" - micromark-util-classify-character: "npm:^2.0.0" - micromark-util-html-tag-name: "npm:^2.0.0" - micromark-util-normalize-identifier: "npm:^2.0.0" - micromark-util-resolve-all: "npm:^2.0.0" - micromark-util-subtokenize: "npm:^2.0.0" - micromark-util-symbol: "npm:^2.0.0" - micromark-util-types: "npm:^2.0.0" - checksum: 10c0/87c7a75cd339189eb6f1d6323037f7d108d1331d953b84fe839b37fd385ee2292b27222327c1ceffda46ba5d5d4dee703482475e5ee8744be40c9e308d8acb77 - languageName: node - linkType: hard - -"micromark-factory-destination@npm:^2.0.0": - version: 2.0.1 - resolution: "micromark-factory-destination@npm:2.0.1" - dependencies: - micromark-util-character: "npm:^2.0.0" - micromark-util-symbol: "npm:^2.0.0" - micromark-util-types: "npm:^2.0.0" - checksum: 10c0/bbafcf869cee5bf511161354cb87d61c142592fbecea051000ff116068dc85216e6d48519d147890b9ea5d7e2864a6341c0c09d9948c203bff624a80a476023c - languageName: node - linkType: hard - -"micromark-factory-label@npm:^2.0.0": - version: 2.0.1 - resolution: "micromark-factory-label@npm:2.0.1" - dependencies: - devlop: "npm:^1.0.0" - micromark-util-character: "npm:^2.0.0" - micromark-util-symbol: "npm:^2.0.0" - micromark-util-types: "npm:^2.0.0" - checksum: 10c0/0137716b4ecb428114165505e94a2f18855c8bbea21b07a8b5ce514b32a595ed789d2b967125718fc44c4197ceaa48f6609d58807a68e778138d2e6b91b824e8 - languageName: node - linkType: hard - -"micromark-factory-space@npm:^2.0.0": - version: 2.0.1 - resolution: "micromark-factory-space@npm:2.0.1" - dependencies: - micromark-util-character: "npm:^2.0.0" - micromark-util-types: "npm:^2.0.0" - checksum: 10c0/f9ed43f1c0652d8d898de0ac2be3f77f776fffe7dd96bdbba1e02d7ce33d3853c6ff5daa52568fc4fa32cdf3a62d86b85ead9b9189f7211e1d69ff2163c450fb - languageName: node - linkType: hard - -"micromark-factory-title@npm:^2.0.0": - version: 2.0.1 - resolution: "micromark-factory-title@npm:2.0.1" - dependencies: - micromark-factory-space: "npm:^2.0.0" - micromark-util-character: "npm:^2.0.0" - micromark-util-symbol: "npm:^2.0.0" - micromark-util-types: "npm:^2.0.0" - checksum: 10c0/e72fad8d6e88823514916890099a5af20b6a9178ccf78e7e5e05f4de99bb8797acb756257d7a3a57a53854cb0086bf8aab15b1a9e9db8982500dd2c9ff5948b6 - languageName: node - linkType: hard - -"micromark-factory-whitespace@npm:^2.0.0": - version: 2.0.1 - resolution: "micromark-factory-whitespace@npm:2.0.1" - dependencies: - micromark-factory-space: "npm:^2.0.0" - micromark-util-character: "npm:^2.0.0" - micromark-util-symbol: "npm:^2.0.0" - micromark-util-types: "npm:^2.0.0" - checksum: 10c0/20a1ec58698f24b766510a309b23a10175034fcf1551eaa9da3adcbed3e00cd53d1ebe5f030cf873f76a1cec3c34eb8c50cc227be3344caa9ed25d56cf611224 - languageName: node - linkType: hard - -"micromark-util-character@npm:^2.0.0": - version: 2.1.1 - resolution: "micromark-util-character@npm:2.1.1" - dependencies: - micromark-util-symbol: "npm:^2.0.0" - micromark-util-types: "npm:^2.0.0" - checksum: 10c0/d3fe7a5e2c4060fc2a076f9ce699c82a2e87190a3946e1e5eea77f563869b504961f5668d9c9c014724db28ac32fa909070ea8b30c3a39bd0483cc6c04cc76a1 - languageName: node - linkType: hard - -"micromark-util-chunked@npm:^2.0.0": - version: 2.0.1 - resolution: "micromark-util-chunked@npm:2.0.1" - dependencies: - micromark-util-symbol: "npm:^2.0.0" - checksum: 10c0/b68c0c16fe8106949537bdcfe1be9cf36c0ccd3bc54c4007003cb0984c3750b6cdd0fd77d03f269a3382b85b0de58bde4f6eedbe7ecdf7244759112289b1ab56 - languageName: node - linkType: hard - -"micromark-util-classify-character@npm:^2.0.0": - version: 2.0.1 - resolution: "micromark-util-classify-character@npm:2.0.1" - dependencies: - micromark-util-character: "npm:^2.0.0" - micromark-util-symbol: "npm:^2.0.0" - micromark-util-types: "npm:^2.0.0" - checksum: 10c0/8a02e59304005c475c332f581697e92e8c585bcd45d5d225a66c1c1b14ab5a8062705188c2ccec33cc998d33502514121478b2091feddbc751887fc9c290ed08 - languageName: node - linkType: hard - -"micromark-util-combine-extensions@npm:^2.0.0": - version: 2.0.1 - resolution: "micromark-util-combine-extensions@npm:2.0.1" - dependencies: - micromark-util-chunked: "npm:^2.0.0" - micromark-util-types: "npm:^2.0.0" - checksum: 10c0/f15e282af24c8372cbb10b9b0b3e2c0aa681fea0ca323a44d6bc537dc1d9382c819c3689f14eaa000118f5a163245358ce6276b2cda9a84439cdb221f5d86ae7 - languageName: node - linkType: hard - -"micromark-util-decode-numeric-character-reference@npm:^2.0.0": - version: 2.0.2 - resolution: "micromark-util-decode-numeric-character-reference@npm:2.0.2" - dependencies: - micromark-util-symbol: "npm:^2.0.0" - checksum: 10c0/9c8a9f2c790e5593ffe513901c3a110e9ec8882a08f466da014112a25e5059b51551ca0aeb7ff494657d86eceb2f02ee556c6558b8d66aadc61eae4a240da0df - languageName: node - linkType: hard - -"micromark-util-encode@npm:^2.0.0": - version: 2.0.1 - resolution: "micromark-util-encode@npm:2.0.1" - checksum: 10c0/b2b29f901093845da8a1bf997ea8b7f5e061ffdba85070dfe14b0197c48fda64ffcf82bfe53c90cf9dc185e69eef8c5d41cae3ba918b96bc279326921b59008a - languageName: node - linkType: hard - -"micromark-util-html-tag-name@npm:^2.0.0": - version: 2.0.1 - resolution: "micromark-util-html-tag-name@npm:2.0.1" - checksum: 10c0/ae80444db786fde908e9295f19a27a4aa304171852c77414516418650097b8afb401961c9edb09d677b06e97e8370cfa65638dde8438ebd41d60c0a8678b85b9 - languageName: node - linkType: hard - -"micromark-util-normalize-identifier@npm:^2.0.0": - version: 2.0.1 - resolution: "micromark-util-normalize-identifier@npm:2.0.1" - dependencies: - micromark-util-symbol: "npm:^2.0.0" - checksum: 10c0/5299265fa360769fc499a89f40142f10a9d4a5c3dd8e6eac8a8ef3c2e4a6570e4c009cf75ea46dce5ee31c01f25587bde2f4a5cc0a935584ae86dd857f2babbd - languageName: node - linkType: hard - -"micromark-util-resolve-all@npm:^2.0.0": - version: 2.0.1 - resolution: "micromark-util-resolve-all@npm:2.0.1" - dependencies: - micromark-util-types: "npm:^2.0.0" - checksum: 10c0/bb6ca28764696bb479dc44a2d5b5fe003e7177aeae1d6b0d43f24cc223bab90234092d9c3ce4a4d2b8df095ccfd820537b10eb96bb7044d635f385d65a4c984a - languageName: node - linkType: hard - -"micromark-util-sanitize-uri@npm:^2.0.0": - version: 2.0.1 - resolution: "micromark-util-sanitize-uri@npm:2.0.1" - dependencies: - micromark-util-character: "npm:^2.0.0" - micromark-util-encode: "npm:^2.0.0" - micromark-util-symbol: "npm:^2.0.0" - checksum: 10c0/60e92166e1870fd4f1961468c2651013ff760617342918e0e0c3c4e872433aa2e60c1e5a672bfe5d89dc98f742d6b33897585cf86ae002cda23e905a3c02527c - languageName: node - linkType: hard - -"micromark-util-subtokenize@npm:^2.0.0": - version: 2.0.3 - resolution: "micromark-util-subtokenize@npm:2.0.3" - dependencies: - devlop: "npm:^1.0.0" - micromark-util-chunked: "npm:^2.0.0" - micromark-util-symbol: "npm:^2.0.0" - micromark-util-types: "npm:^2.0.0" - checksum: 10c0/75501986ecb02a6f06c0f3e58b584ae3ff3553b520260e8ce27d2db8c79b8888861dd9d3b26e30f5c6084fddd90f96dc3ff551f02c2ac4d669ebe920e483b6d6 - languageName: node - linkType: hard - -"micromark-util-symbol@npm:^2.0.0": - version: 2.0.1 - resolution: "micromark-util-symbol@npm:2.0.1" - checksum: 10c0/f2d1b207771e573232436618e78c5e46cd4b5c560dd4a6d63863d58018abbf49cb96ec69f7007471e51434c60de3c9268ef2bf46852f26ff4aacd10f9da16fe9 - languageName: node - linkType: hard - -"micromark-util-types@npm:^2.0.0": - version: 2.0.1 - resolution: "micromark-util-types@npm:2.0.1" - checksum: 10c0/872ec9334bb42afcc91c5bed8b7ee03b75654b36c6f221ab4d2b1bb0299279f00db948bf38ec6bc1ec03d0cf7842c21ab805190bf676157ba587eb0386d38b71 - languageName: node - linkType: hard - -"micromark@npm:^4.0.1": - version: 4.0.1 - resolution: "micromark@npm:4.0.1" - dependencies: - "@types/debug": "npm:^4.0.0" - debug: "npm:^4.0.0" - decode-named-character-reference: "npm:^1.0.0" - devlop: "npm:^1.0.0" - micromark-core-commonmark: "npm:^2.0.0" - micromark-factory-space: "npm:^2.0.0" - micromark-util-character: "npm:^2.0.0" - micromark-util-chunked: "npm:^2.0.0" - micromark-util-combine-extensions: "npm:^2.0.0" - micromark-util-decode-numeric-character-reference: "npm:^2.0.0" - micromark-util-encode: "npm:^2.0.0" - micromark-util-normalize-identifier: "npm:^2.0.0" - micromark-util-resolve-all: "npm:^2.0.0" - micromark-util-sanitize-uri: "npm:^2.0.0" - micromark-util-subtokenize: "npm:^2.0.0" - micromark-util-symbol: "npm:^2.0.0" - micromark-util-types: "npm:^2.0.0" - checksum: 10c0/b5d950c84664ce209575e5a54946488f0a1e1240d080544e657b65074c9b08208a5315d9db066b93cbc199ec05f68552ba8b09fd5e716c726f4a4712275a7c5c - languageName: node - linkType: hard - -"micromatch@npm:^4.0.2, micromatch@npm:^4.0.4, micromatch@npm:^4.0.5, micromatch@npm:^4.0.8": - version: 4.0.8 - resolution: "micromatch@npm:4.0.8" - dependencies: - braces: "npm:^3.0.3" - picomatch: "npm:^2.3.1" - checksum: 10c0/166fa6eb926b9553f32ef81f5f531d27b4ce7da60e5baf8c021d043b27a388fb95e46a8038d5045877881e673f8134122b59624d5cecbd16eb50a42e7a6b5ca8 - languageName: node - linkType: hard - -"mime-db@npm:1.52.0": - version: 1.52.0 - resolution: "mime-db@npm:1.52.0" - checksum: 10c0/0557a01deebf45ac5f5777fe7740b2a5c309c6d62d40ceab4e23da9f821899ce7a900b7ac8157d4548ddbb7beffe9abc621250e6d182b0397ec7f10c7b91a5aa - languageName: node - linkType: hard - -"mime-db@npm:>= 1.43.0 < 2": - version: 1.53.0 - resolution: "mime-db@npm:1.53.0" - checksum: 10c0/1dcc37ba8ed5d1c179f5c6f0837e8db19371d5f2ea3690c3c2f3fa8c3858f976851d3460b172b4dee78ebd606762cbb407aa398545fbacd539e519f858cd7bf4 - languageName: node - linkType: hard - -"mime-types@npm:^2.1.27, mime-types@npm:^2.1.31, mime-types@npm:~2.1.17, mime-types@npm:~2.1.24, mime-types@npm:~2.1.34": - version: 2.1.35 - resolution: "mime-types@npm:2.1.35" - dependencies: - mime-db: "npm:1.52.0" - checksum: 10c0/82fb07ec56d8ff1fc999a84f2f217aa46cb6ed1033fefaabd5785b9a974ed225c90dc72fff460259e66b95b73648596dbcc50d51ed69cdf464af2d237d3149b2 - languageName: node - linkType: hard - -"mime@npm:1.6.0, mime@npm:^1.4.1": - version: 1.6.0 - resolution: "mime@npm:1.6.0" - bin: - mime: cli.js - checksum: 10c0/b92cd0adc44888c7135a185bfd0dddc42c32606401c72896a842ae15da71eb88858f17669af41e498b463cd7eb998f7b48939a25b08374c7924a9c8a6f8a81b0 - languageName: node - linkType: hard - -"mimic-fn@npm:^2.1.0": - version: 2.1.0 - resolution: "mimic-fn@npm:2.1.0" - checksum: 10c0/b26f5479d7ec6cc2bce275a08f146cf78f5e7b661b18114e2506dd91ec7ec47e7a25bf4360e5438094db0560bcc868079fb3b1fb3892b833c1ecbf63f80c95a4 - languageName: node - linkType: hard - -"mimic-function@npm:^5.0.0": - version: 5.0.1 - resolution: "mimic-function@npm:5.0.1" - checksum: 10c0/f3d9464dd1816ecf6bdf2aec6ba32c0728022039d992f178237d8e289b48764fee4131319e72eedd4f7f094e22ded0af836c3187a7edc4595d28dd74368fd81d - languageName: node - linkType: hard - -"mini-css-extract-plugin@npm:2.9.2": - version: 2.9.2 - resolution: "mini-css-extract-plugin@npm:2.9.2" - dependencies: - schema-utils: "npm:^4.0.0" - tapable: "npm:^2.2.1" - peerDependencies: - webpack: ^5.0.0 - checksum: 10c0/5d3218dbd7db48b572925ddac05162a7415bf81b321f1a0c07016ec643cb5720c8a836ae68d45f5de826097a3013b601706c9c5aacb7f610dc2041b271de2ce0 - languageName: node - linkType: hard - -"minimalistic-assert@npm:^1.0.0": - version: 1.0.1 - resolution: "minimalistic-assert@npm:1.0.1" - checksum: 10c0/96730e5601cd31457f81a296f521eb56036e6f69133c0b18c13fe941109d53ad23a4204d946a0d638d7f3099482a0cec8c9bb6d642604612ce43ee536be3dddd - languageName: node - linkType: hard - -"minimatch@npm:^3.1.2": - version: 3.1.2 - resolution: "minimatch@npm:3.1.2" - dependencies: - brace-expansion: "npm:^1.1.7" - checksum: 10c0/0262810a8fc2e72cca45d6fd86bd349eee435eb95ac6aa45c9ea2180e7ee875ef44c32b55b5973ceabe95ea12682f6e3725cbb63d7a2d1da3ae1163c8b210311 - languageName: node - linkType: hard - -"minimatch@npm:^9.0.0, minimatch@npm:^9.0.4, minimatch@npm:^9.0.5": - version: 9.0.5 - resolution: "minimatch@npm:9.0.5" - dependencies: - brace-expansion: "npm:^2.0.1" - checksum: 10c0/de96cf5e35bdf0eab3e2c853522f98ffbe9a36c37797778d2665231ec1f20a9447a7e567cb640901f89e4daaa95ae5d70c65a9e8aa2bb0019b6facbc3c0575ed - languageName: node - linkType: hard - -"minipass-collect@npm:^2.0.1": - version: 2.0.1 - resolution: "minipass-collect@npm:2.0.1" - dependencies: - minipass: "npm:^7.0.3" - checksum: 10c0/5167e73f62bb74cc5019594709c77e6a742051a647fe9499abf03c71dca75515b7959d67a764bdc4f8b361cf897fbf25e2d9869ee039203ed45240f48b9aa06e - languageName: node - linkType: hard - -"minipass-fetch@npm:^4.0.0": - version: 4.0.0 - resolution: "minipass-fetch@npm:4.0.0" - dependencies: - encoding: "npm:^0.1.13" - minipass: "npm:^7.0.3" - minipass-sized: "npm:^1.0.3" - minizlib: "npm:^3.0.1" - dependenciesMeta: - encoding: - optional: true - checksum: 10c0/7fa30ce7c373fb6f94c086b374fff1589fd7e78451855d2d06c2e2d9df936d131e73e952163063016592ed3081444bd8d1ea608533313b0149156ce23311da4b - languageName: node - linkType: hard - -"minipass-flush@npm:^1.0.5": - version: 1.0.5 - resolution: "minipass-flush@npm:1.0.5" - dependencies: - minipass: "npm:^3.0.0" - checksum: 10c0/2a51b63feb799d2bb34669205eee7c0eaf9dce01883261a5b77410c9408aa447e478efd191b4de6fc1101e796ff5892f8443ef20d9544385819093dbb32d36bd - languageName: node - linkType: hard - -"minipass-pipeline@npm:^1.2.4": - version: 1.2.4 - resolution: "minipass-pipeline@npm:1.2.4" - dependencies: - minipass: "npm:^3.0.0" - checksum: 10c0/cbda57cea20b140b797505dc2cac71581a70b3247b84480c1fed5ca5ba46c25ecc25f68bfc9e6dcb1a6e9017dab5c7ada5eab73ad4f0a49d84e35093e0c643f2 - languageName: node - linkType: hard - -"minipass-sized@npm:^1.0.3": - version: 1.0.3 - resolution: "minipass-sized@npm:1.0.3" - dependencies: - minipass: "npm:^3.0.0" - checksum: 10c0/298f124753efdc745cfe0f2bdfdd81ba25b9f4e753ca4a2066eb17c821f25d48acea607dfc997633ee5bf7b6dfffb4eee4f2051eb168663f0b99fad2fa4829cb - languageName: node - linkType: hard - -"minipass@npm:^3.0.0": - version: 3.3.6 - resolution: "minipass@npm:3.3.6" - dependencies: - yallist: "npm:^4.0.0" - checksum: 10c0/a114746943afa1dbbca8249e706d1d38b85ed1298b530f5808ce51f8e9e941962e2a5ad2e00eae7dd21d8a4aae6586a66d4216d1a259385e9d0358f0c1eba16c - languageName: node - linkType: hard - -"minipass@npm:^5.0.0": - version: 5.0.0 - resolution: "minipass@npm:5.0.0" - checksum: 10c0/a91d8043f691796a8ac88df039da19933ef0f633e3d7f0d35dcd5373af49131cf2399bfc355f41515dc495e3990369c3858cd319e5c2722b4753c90bf3152462 - languageName: node - linkType: hard - -"minipass@npm:^5.0.0 || ^6.0.2 || ^7.0.0, minipass@npm:^7.0.2, minipass@npm:^7.0.3, minipass@npm:^7.0.4, minipass@npm:^7.1.2": - version: 7.1.2 - resolution: "minipass@npm:7.1.2" - checksum: 10c0/b0fd20bb9fb56e5fa9a8bfac539e8915ae07430a619e4b86ff71f5fc757ef3924b23b2c4230393af1eda647ed3d75739e4e0acb250a6b1eb277cf7f8fe449557 - languageName: node - linkType: hard - -"minizlib@npm:^2.1.1": - version: 2.1.2 - resolution: "minizlib@npm:2.1.2" - dependencies: - minipass: "npm:^3.0.0" - yallist: "npm:^4.0.0" - checksum: 10c0/64fae024e1a7d0346a1102bb670085b17b7f95bf6cfdf5b128772ec8faf9ea211464ea4add406a3a6384a7d87a0cd1a96263692134323477b4fb43659a6cab78 - languageName: node - linkType: hard - -"minizlib@npm:^3.0.1": - version: 3.0.1 - resolution: "minizlib@npm:3.0.1" - dependencies: - minipass: "npm:^7.0.4" - rimraf: "npm:^5.0.5" - checksum: 10c0/82f8bf70da8af656909a8ee299d7ed3b3372636749d29e105f97f20e88971be31f5ed7642f2e898f00283b68b701cc01307401cdc209b0efc5dd3818220e5093 - languageName: node - linkType: hard - -"mkdirp@npm:^1.0.3": - version: 1.0.4 - resolution: "mkdirp@npm:1.0.4" - bin: - mkdirp: bin/cmd.js - checksum: 10c0/46ea0f3ffa8bc6a5bc0c7081ffc3907777f0ed6516888d40a518c5111f8366d97d2678911ad1a6882bf592fa9de6c784fea32e1687bb94e1f4944170af48a5cf - languageName: node - linkType: hard - -"mkdirp@npm:^3.0.1": - version: 3.0.1 - resolution: "mkdirp@npm:3.0.1" - bin: - mkdirp: dist/cjs/src/bin.js - checksum: 10c0/9f2b975e9246351f5e3a40dcfac99fcd0baa31fbfab615fe059fb11e51f10e4803c63de1f384c54d656e4db31d000e4767e9ef076a22e12a641357602e31d57d - languageName: node - linkType: hard - -"moment-timezone@npm:^0.5.46": - version: 0.5.46 - resolution: "moment-timezone@npm:0.5.46" - dependencies: - moment: "npm:^2.29.4" - checksum: 10c0/003fd278d1aa3e63afff340a318735db80157b7a343e3f807cac10e026def214f0e71b52d582b89a11ee0a19f5d9f0da2752b7959d855429f2b715d4859d3722 - languageName: node - linkType: hard - -"moment@npm:^2.29.4, moment@npm:^2.30.1": - version: 2.30.1 - resolution: "moment@npm:2.30.1" - checksum: 10c0/865e4279418c6de666fca7786607705fd0189d8a7b7624e2e56be99290ac846f90878a6f602e34b4e0455c549b85385b1baf9966845962b313699e7cb847543a - languageName: node - linkType: hard - -"mrmime@npm:2.0.0": - version: 2.0.0 - resolution: "mrmime@npm:2.0.0" - checksum: 10c0/312b35ed288986aec90955410b21ed7427fd1e4ee318cb5fc18765c8d029eeded9444faa46589e5b1ed6b35fb2054a802ac8dcb917ddf6b3e189cb3bf11a965c - languageName: node - linkType: hard - -"ms@npm:2.0.0": - version: 2.0.0 - resolution: "ms@npm:2.0.0" - checksum: 10c0/f8fda810b39fd7255bbdc451c46286e549794fcc700dc9cd1d25658bbc4dc2563a5de6fe7c60f798a16a60c6ceb53f033cb353f493f0cf63e5199b702943159d - languageName: node - linkType: hard - -"ms@npm:2.1.3, ms@npm:^2.1.3": - version: 2.1.3 - resolution: "ms@npm:2.1.3" - checksum: 10c0/d924b57e7312b3b63ad21fc5b3dc0af5e78d61a1fc7cfb5457edaf26326bf62be5307cc87ffb6862ef1c2b33b0233cdb5d4f01c4c958cc0d660948b65a287a48 - languageName: node - linkType: hard - -"msgpackr-extract@npm:^3.0.2": - version: 3.0.3 - resolution: "msgpackr-extract@npm:3.0.3" - dependencies: - "@msgpackr-extract/msgpackr-extract-darwin-arm64": "npm:3.0.3" - "@msgpackr-extract/msgpackr-extract-darwin-x64": "npm:3.0.3" - "@msgpackr-extract/msgpackr-extract-linux-arm": "npm:3.0.3" - "@msgpackr-extract/msgpackr-extract-linux-arm64": "npm:3.0.3" - "@msgpackr-extract/msgpackr-extract-linux-x64": "npm:3.0.3" - "@msgpackr-extract/msgpackr-extract-win32-x64": "npm:3.0.3" - node-gyp: "npm:latest" - node-gyp-build-optional-packages: "npm:5.2.2" - dependenciesMeta: - "@msgpackr-extract/msgpackr-extract-darwin-arm64": - optional: true - "@msgpackr-extract/msgpackr-extract-darwin-x64": - optional: true - "@msgpackr-extract/msgpackr-extract-linux-arm": - optional: true - "@msgpackr-extract/msgpackr-extract-linux-arm64": - optional: true - "@msgpackr-extract/msgpackr-extract-linux-x64": - optional: true - "@msgpackr-extract/msgpackr-extract-win32-x64": - optional: true - bin: - download-msgpackr-prebuilds: bin/download-prebuilds.js - checksum: 10c0/e504fd8bf86a29d7527c83776530ee6dc92dcb0273bb3679fd4a85173efead7f0ee32fb82c8410a13c33ef32828c45f81118ffc0fbed5d6842e72299894623b4 - languageName: node - linkType: hard - -"msgpackr@npm:^1.11.2": - version: 1.11.2 - resolution: "msgpackr@npm:1.11.2" - dependencies: - msgpackr-extract: "npm:^3.0.2" - dependenciesMeta: - msgpackr-extract: - optional: true - checksum: 10c0/7d2e81ca82c397b2352d470d6bc8f4a967fe4fe14f8fc1fc9906b23009fdfb543999b1ad29c700b8861581e0b6bf903d6f0fefb69a09375cbca6d4d802e6c906 - languageName: node - linkType: hard - -"multicast-dns@npm:^7.2.5": - version: 7.2.5 - resolution: "multicast-dns@npm:7.2.5" - dependencies: - dns-packet: "npm:^5.2.2" - thunky: "npm:^1.0.2" - bin: - multicast-dns: cli.js - checksum: 10c0/5120171d4bdb1577764c5afa96e413353bff530d1b37081cb29cccc747f989eb1baf40574fe8e27060fc1aef72b59c042f72b9b208413de33bcf411343c69057 - languageName: node - linkType: hard - -"mute-stream@npm:^1.0.0": - version: 1.0.0 - resolution: "mute-stream@npm:1.0.0" - checksum: 10c0/dce2a9ccda171ec979a3b4f869a102b1343dee35e920146776780de182f16eae459644d187e38d59a3d37adf85685e1c17c38cf7bfda7e39a9880f7a1d10a74c - languageName: node - linkType: hard - -"mute-stream@npm:^2.0.0": - version: 2.0.0 - resolution: "mute-stream@npm:2.0.0" - checksum: 10c0/2cf48a2087175c60c8dcdbc619908b49c07f7adcfc37d29236b0c5c612d6204f789104c98cc44d38acab7b3c96f4a3ec2cfdc4934d0738d876dbefa2a12c69f4 - languageName: node - linkType: hard - -"nanoid@npm:^3.3.7": - version: 3.3.8 - resolution: "nanoid@npm:3.3.8" - bin: - nanoid: bin/nanoid.cjs - checksum: 10c0/4b1bb29f6cfebf3be3bc4ad1f1296fb0a10a3043a79f34fbffe75d1621b4318319211cd420549459018ea3592f0d2f159247a6f874911d6d26eaaadda2478120 - languageName: node - linkType: hard - -"natural-compare@npm:^1.4.0": - version: 1.4.0 - resolution: "natural-compare@npm:1.4.0" - checksum: 10c0/f5f9a7974bfb28a91afafa254b197f0f22c684d4a1731763dda960d2c8e375b36c7d690e0d9dc8fba774c537af14a7e979129bca23d88d052fbeb9466955e447 - languageName: node - linkType: hard - -"needle@npm:^3.1.0": - version: 3.3.1 - resolution: "needle@npm:3.3.1" - dependencies: - iconv-lite: "npm:^0.6.3" - sax: "npm:^1.2.4" - bin: - needle: bin/needle - checksum: 10c0/233b9315d47b735867d03e7a018fb665ee6cacf3a83b991b19538019cf42b538a3e85ca745c840b4c5e9a0ffdca76472f941363bf7c166214ae8cbc650fd4d39 - languageName: node - linkType: hard - -"negotiator@npm:0.6.3": - version: 0.6.3 - resolution: "negotiator@npm:0.6.3" - checksum: 10c0/3ec9fd413e7bf071c937ae60d572bc67155262068ed522cf4b3be5edbe6ddf67d095ec03a3a14ebf8fc8e95f8e1d61be4869db0dbb0de696f6b837358bd43fc2 - languageName: node - linkType: hard - -"negotiator@npm:^1.0.0": - version: 1.0.0 - resolution: "negotiator@npm:1.0.0" - checksum: 10c0/4c559dd52669ea48e1914f9d634227c561221dd54734070791f999c52ed0ff36e437b2e07d5c1f6e32909fc625fe46491c16e4a8f0572567d4dd15c3a4fda04b - languageName: node - linkType: hard - -"negotiator@npm:~0.6.4": - version: 0.6.4 - resolution: "negotiator@npm:0.6.4" - checksum: 10c0/3e677139c7fb7628a6f36335bf11a885a62c21d5390204590a1a214a5631fcbe5ea74ef6a610b60afe84b4d975cbe0566a23f20ee17c77c73e74b80032108dea - languageName: node - linkType: hard - -"neo-async@npm:^2.6.2": - version: 2.6.2 - resolution: "neo-async@npm:2.6.2" - checksum: 10c0/c2f5a604a54a8ec5438a342e1f356dff4bc33ccccdb6dc668d94fe8e5eccfc9d2c2eea6064b0967a767ba63b33763f51ccf2cd2441b461a7322656c1f06b3f5d - languageName: node - linkType: hard - -"node-addon-api@npm:^6.1.0": - version: 6.1.0 - resolution: "node-addon-api@npm:6.1.0" - dependencies: - node-gyp: "npm:latest" - checksum: 10c0/d2699c4ad15740fd31482a3b6fca789af7723ab9d393adc6ac45250faaee72edad8f0b10b2b9d087df0de93f1bdc16d97afdd179b26b9ebc9ed68b569faa4bac - languageName: node - linkType: hard - -"node-addon-api@npm:^7.0.0": - version: 7.1.1 - resolution: "node-addon-api@npm:7.1.1" - dependencies: - node-gyp: "npm:latest" - checksum: 10c0/fb32a206276d608037fa1bcd7e9921e177fe992fc610d098aa3128baca3c0050fc1e014fa007e9b3874cf865ddb4f5bd9f43ccb7cbbbe4efaff6a83e920b17e9 - languageName: node - linkType: hard - -"node-forge@npm:^1": - version: 1.3.1 - resolution: "node-forge@npm:1.3.1" - checksum: 10c0/e882819b251a4321f9fc1d67c85d1501d3004b4ee889af822fd07f64de3d1a8e272ff00b689570af0465d65d6bf5074df9c76e900e0aff23e60b847f2a46fbe8 - languageName: node - linkType: hard - -"node-gyp-build-optional-packages@npm:5.2.2": - version: 5.2.2 - resolution: "node-gyp-build-optional-packages@npm:5.2.2" - dependencies: - detect-libc: "npm:^2.0.1" - bin: - node-gyp-build-optional-packages: bin.js - node-gyp-build-optional-packages-optional: optional.js - node-gyp-build-optional-packages-test: build-test.js - checksum: 10c0/c81128c6f91873381be178c5eddcbdf66a148a6a89a427ce2bcd457593ce69baf2a8662b6d22cac092d24aa9c43c230dec4e69b3a0da604503f4777cd77e282b - languageName: node - linkType: hard - -"node-gyp@npm:^11.0.0, node-gyp@npm:latest": - version: 11.0.0 - resolution: "node-gyp@npm:11.0.0" - dependencies: - env-paths: "npm:^2.2.0" - exponential-backoff: "npm:^3.1.1" - glob: "npm:^10.3.10" - graceful-fs: "npm:^4.2.6" - make-fetch-happen: "npm:^14.0.3" - nopt: "npm:^8.0.0" - proc-log: "npm:^5.0.0" - semver: "npm:^7.3.5" - tar: "npm:^7.4.3" - which: "npm:^5.0.0" - bin: - node-gyp: bin/node-gyp.js - checksum: 10c0/a3b885bbee2d271f1def32ba2e30ffcf4562a3db33af06b8b365e053153e2dd2051b9945783c3c8e852d26a0f20f65b251c7e83361623383a99635c0280ee573 - languageName: node - linkType: hard - -"node-releases@npm:^2.0.19": - version: 2.0.19 - resolution: "node-releases@npm:2.0.19" - checksum: 10c0/52a0dbd25ccf545892670d1551690fe0facb6a471e15f2cfa1b20142a5b255b3aa254af5f59d6ecb69c2bec7390bc643c43aa63b13bf5e64b6075952e716b1aa - languageName: node - linkType: hard - -"nopt@npm:^8.0.0": - version: 8.0.0 - resolution: "nopt@npm:8.0.0" - dependencies: - abbrev: "npm:^2.0.0" - bin: - nopt: bin/nopt.js - checksum: 10c0/19cb986f79abaca2d0f0b560021da7b32ee6fcc3de48f3eaeb0c324d36755c17754f886a754c091f01f740c17caf7d6aea8237b7fbaf39f476ae5e30a249f18f - languageName: node - linkType: hard - -"normalize-package-data@npm:^7.0.0": - version: 7.0.0 - resolution: "normalize-package-data@npm:7.0.0" - dependencies: - hosted-git-info: "npm:^8.0.0" - semver: "npm:^7.3.5" - validate-npm-package-license: "npm:^3.0.4" - checksum: 10c0/d492cbc4cdd92e99cba517b08cec6adf40ff37f2e97ecf4484ccb2da1ef5bd81c6dfbd8b434d3bdc749df639492ecdc71f4a61de1a8b99fe97fdf4faac13e7f1 - languageName: node - linkType: hard - -"normalize-path@npm:^3.0.0, normalize-path@npm:~3.0.0": - version: 3.0.0 - resolution: "normalize-path@npm:3.0.0" - checksum: 10c0/e008c8142bcc335b5e38cf0d63cfd39d6cf2d97480af9abdbe9a439221fd4d749763bab492a8ee708ce7a194bb00c9da6d0a115018672310850489137b3da046 - languageName: node - linkType: hard - -"normalize-range@npm:^0.1.2": - version: 0.1.2 - resolution: "normalize-range@npm:0.1.2" - checksum: 10c0/bf39b73a63e0a42ad1a48c2bd1bda5a07ede64a7e2567307a407674e595bcff0fa0d57e8e5f1e7fa5e91000797c7615e13613227aaaa4d6d6e87f5bd5cc95de6 - languageName: node - linkType: hard - -"npm-bundled@npm:^4.0.0": - version: 4.0.0 - resolution: "npm-bundled@npm:4.0.0" - dependencies: - npm-normalize-package-bin: "npm:^4.0.0" - checksum: 10c0/e6e20caefbc6a41138d3767ec998f6a2cf55f33371c119417a556ff6052390a2ffeb3b465a74aea127fb211ddfcb7db776620faf12b64e48e60e332b25b5b8a0 - languageName: node - linkType: hard - -"npm-install-checks@npm:^7.1.0": - version: 7.1.1 - resolution: "npm-install-checks@npm:7.1.1" - dependencies: - semver: "npm:^7.1.1" - checksum: 10c0/3cfd705ef3f70add31a32b4a5462d16e0f06d9df636072483fb43c854414a1cc128f496e84a8d9c12c1f1820307b7a3c275643589c564dac3c870eb636f8eea4 - languageName: node - linkType: hard - -"npm-normalize-package-bin@npm:^4.0.0": - version: 4.0.0 - resolution: "npm-normalize-package-bin@npm:4.0.0" - checksum: 10c0/1fa546fcae8eaab61ef9b9ec237b6c795008da50e1883eae030e9e38bb04ffa32c5aabcef9a0400eae3dc1f91809bcfa85e437ce80d677c69b419d1d9cacf0ab - languageName: node - linkType: hard - -"npm-package-arg@npm:12.0.0": - version: 12.0.0 - resolution: "npm-package-arg@npm:12.0.0" - dependencies: - hosted-git-info: "npm:^8.0.0" - proc-log: "npm:^5.0.0" - semver: "npm:^7.3.5" - validate-npm-package-name: "npm:^6.0.0" - checksum: 10c0/a2e4e60b16b52715786ba854ef93c4f489b4379c54aa9179b6dac3f4e44fb6fad0a1d937e25cf04b3496bd61b90fc356b44ecd02ce98a6fe0f348e1563b7b00c - languageName: node - linkType: hard - -"npm-package-arg@npm:^12.0.0": - version: 12.0.1 - resolution: "npm-package-arg@npm:12.0.1" - dependencies: - hosted-git-info: "npm:^8.0.0" - proc-log: "npm:^5.0.0" - semver: "npm:^7.3.5" - validate-npm-package-name: "npm:^6.0.0" - checksum: 10c0/e7cafb0952541858abe63dfa2fd7b45f1626e310c0b60d6266fafe20c1b5b76388913c3f39390820bee9eac035705639dc62adbcf14748536f867c4d06bbf209 - languageName: node - linkType: hard - -"npm-packlist@npm:^9.0.0": - version: 9.0.0 - resolution: "npm-packlist@npm:9.0.0" - dependencies: - ignore-walk: "npm:^7.0.0" - checksum: 10c0/3eb9e877fff81ed1f97b86a387a13a7d0136a26c4c21d8fab7e49be653e71d604ba63091ec80e3a0b1d1fd879639eab91ddda1a8df45d7631795b83911f2f9b8 - languageName: node - linkType: hard - -"npm-pick-manifest@npm:10.0.0, npm-pick-manifest@npm:^10.0.0": - version: 10.0.0 - resolution: "npm-pick-manifest@npm:10.0.0" - dependencies: - npm-install-checks: "npm:^7.1.0" - npm-normalize-package-bin: "npm:^4.0.0" - npm-package-arg: "npm:^12.0.0" - semver: "npm:^7.3.5" - checksum: 10c0/946e791f6164a04dbc3340749cd7521d4d1f60accb2d0ca901375314b8425c8a12b34b4b70e2850462cc898fba5fa8d1f283221bf788a1d37276f06a85c4562a - languageName: node - linkType: hard - -"npm-registry-fetch@npm:^18.0.0": - version: 18.0.2 - resolution: "npm-registry-fetch@npm:18.0.2" - dependencies: - "@npmcli/redact": "npm:^3.0.0" - jsonparse: "npm:^1.3.1" - make-fetch-happen: "npm:^14.0.0" - minipass: "npm:^7.0.2" - minipass-fetch: "npm:^4.0.0" - minizlib: "npm:^3.0.1" - npm-package-arg: "npm:^12.0.0" - proc-log: "npm:^5.0.0" - checksum: 10c0/43e02befb393f67d5014d690a96d55f0b5f837a3eb9a79b17738ff0e3a1f081968480f2f280d1ad77a088ebd88c196793d929b0e4d24a8389a324dfd4006bc39 - languageName: node - linkType: hard - -"nth-check@npm:^2.0.1": - version: 2.1.1 - resolution: "nth-check@npm:2.1.1" - dependencies: - boolbase: "npm:^1.0.0" - checksum: 10c0/5fee7ff309727763689cfad844d979aedd2204a817fbaaf0e1603794a7c20db28548d7b024692f953557df6ce4a0ee4ae46cd8ebd9b36cfb300b9226b567c479 - languageName: node - linkType: hard - -"object-inspect@npm:^1.13.3": - version: 1.13.3 - resolution: "object-inspect@npm:1.13.3" - checksum: 10c0/cc3f15213406be89ffdc54b525e115156086796a515410a8d390215915db9f23c8eab485a06f1297402f440a33715fe8f71a528c1dcbad6e1a3bcaf5a46921d4 - languageName: node - linkType: hard - -"obuf@npm:^1.0.0, obuf@npm:^1.1.2": - version: 1.1.2 - resolution: "obuf@npm:1.1.2" - checksum: 10c0/520aaac7ea701618eacf000fc96ae458e20e13b0569845800fc582f81b386731ab22d55354b4915d58171db00e79cfcd09c1638c02f89577ef092b38c65b7d81 - languageName: node - linkType: hard - -"on-finished@npm:2.4.1, on-finished@npm:^2.4.1": - version: 2.4.1 - resolution: "on-finished@npm:2.4.1" - dependencies: - ee-first: "npm:1.1.1" - checksum: 10c0/46fb11b9063782f2d9968863d9cbba33d77aa13c17f895f56129c274318b86500b22af3a160fe9995aa41317efcd22941b6eba747f718ced08d9a73afdb087b4 - languageName: node - linkType: hard - -"on-headers@npm:~1.0.2": - version: 1.0.2 - resolution: "on-headers@npm:1.0.2" - checksum: 10c0/f649e65c197bf31505a4c0444875db0258e198292f34b884d73c2f751e91792ef96bb5cf89aa0f4fecc2e4dc662461dda606b1274b0e564f539cae5d2f5fc32f - languageName: node - linkType: hard - -"onetime@npm:^5.1.0": - version: 5.1.2 - resolution: "onetime@npm:5.1.2" - dependencies: - mimic-fn: "npm:^2.1.0" - checksum: 10c0/ffcef6fbb2692c3c40749f31ea2e22677a876daea92959b8a80b521d95cca7a668c884d8b2045d1d8ee7d56796aa405c405462af112a1477594cc63531baeb8f - languageName: node - linkType: hard - -"onetime@npm:^7.0.0": - version: 7.0.0 - resolution: "onetime@npm:7.0.0" - dependencies: - mimic-function: "npm:^5.0.0" - checksum: 10c0/5cb9179d74b63f52a196a2e7037ba2b9a893245a5532d3f44360012005c9cadb60851d56716ebff18a6f47129dab7168022445df47c2aff3b276d92585ed1221 - languageName: node - linkType: hard - -"open@npm:10.1.0, open@npm:^10.0.3": - version: 10.1.0 - resolution: "open@npm:10.1.0" - dependencies: - default-browser: "npm:^5.2.1" - define-lazy-prop: "npm:^3.0.0" - is-inside-container: "npm:^1.0.0" - is-wsl: "npm:^3.1.0" - checksum: 10c0/c86d0b94503d5f735f674158d5c5d339c25ec2927562f00ee74590727292ed23e1b8d9336cb41ffa7e1fa4d3641d29b199b4ea37c78cb557d72b511743e90ebb - languageName: node - linkType: hard - -"optionator@npm:^0.9.3": - version: 0.9.4 - resolution: "optionator@npm:0.9.4" - dependencies: - deep-is: "npm:^0.1.3" - fast-levenshtein: "npm:^2.0.6" - levn: "npm:^0.4.1" - prelude-ls: "npm:^1.2.1" - type-check: "npm:^0.4.0" - word-wrap: "npm:^1.2.5" - checksum: 10c0/4afb687a059ee65b61df74dfe87d8d6815cd6883cb8b3d5883a910df72d0f5d029821f37025e4bccf4048873dbdb09acc6d303d27b8f76b1a80dd5a7d5334675 - languageName: node - linkType: hard - -"ora@npm:5.4.1": - version: 5.4.1 - resolution: "ora@npm:5.4.1" - dependencies: - bl: "npm:^4.1.0" - chalk: "npm:^4.1.0" - cli-cursor: "npm:^3.1.0" - cli-spinners: "npm:^2.5.0" - is-interactive: "npm:^1.0.0" - is-unicode-supported: "npm:^0.1.0" - log-symbols: "npm:^4.1.0" - strip-ansi: "npm:^6.0.0" - wcwidth: "npm:^1.0.1" - checksum: 10c0/10ff14aace236d0e2f044193362b22edce4784add08b779eccc8f8ef97195cae1248db8ec1ec5f5ff076f91acbe573f5f42a98c19b78dba8c54eefff983cae85 - languageName: node - linkType: hard - -"ordered-binary@npm:^1.5.3": - version: 1.5.3 - resolution: "ordered-binary@npm:1.5.3" - checksum: 10c0/2b67c90c79071f54344762fcecac256c3c6fe02a3ce1d349c7cab38a55a6137320b13022d6dd26faac462d887f48a32e04693a3ae30592185f290c793b92de03 - languageName: node - linkType: hard - -"os-tmpdir@npm:~1.0.2": - version: 1.0.2 - resolution: "os-tmpdir@npm:1.0.2" - checksum: 10c0/f438450224f8e2687605a8dd318f0db694b6293c5d835ae509a69e97c8de38b6994645337e5577f5001115470414638978cc49da1cdcc25106dad8738dc69990 - languageName: node - linkType: hard - -"p-limit@npm:^3.0.2": - version: 3.1.0 - resolution: "p-limit@npm:3.1.0" - dependencies: - yocto-queue: "npm:^0.1.0" - checksum: 10c0/9db675949dbdc9c3763c89e748d0ef8bdad0afbb24d49ceaf4c46c02c77d30db4e0652ed36d0a0a7a95154335fab810d95c86153105bb73b3a90448e2bb14e1a - languageName: node - linkType: hard - -"p-limit@npm:^4.0.0": - version: 4.0.0 - resolution: "p-limit@npm:4.0.0" - dependencies: - yocto-queue: "npm:^1.0.0" - checksum: 10c0/a56af34a77f8df2ff61ddfb29431044557fcbcb7642d5a3233143ebba805fc7306ac1d448de724352861cb99de934bc9ab74f0d16fe6a5460bdbdf938de875ad - languageName: node - linkType: hard - -"p-locate@npm:^5.0.0": - version: 5.0.0 - resolution: "p-locate@npm:5.0.0" - dependencies: - p-limit: "npm:^3.0.2" - checksum: 10c0/2290d627ab7903b8b70d11d384fee714b797f6040d9278932754a6860845c4d3190603a0772a663c8cb5a7b21d1b16acb3a6487ebcafa9773094edc3dfe6009a - languageName: node - linkType: hard - -"p-locate@npm:^6.0.0": - version: 6.0.0 - resolution: "p-locate@npm:6.0.0" - dependencies: - p-limit: "npm:^4.0.0" - checksum: 10c0/d72fa2f41adce59c198270aa4d3c832536c87a1806e0f69dffb7c1a7ca998fb053915ca833d90f166a8c082d3859eabfed95f01698a3214c20df6bb8de046312 - languageName: node - linkType: hard - -"p-map@npm:^7.0.2": - version: 7.0.3 - resolution: "p-map@npm:7.0.3" - checksum: 10c0/46091610da2b38ce47bcd1d8b4835a6fa4e832848a6682cf1652bc93915770f4617afc844c10a77d1b3e56d2472bb2d5622353fa3ead01a7f42b04fc8e744a5c - languageName: node - linkType: hard - -"p-retry@npm:^6.2.0": - version: 6.2.1 - resolution: "p-retry@npm:6.2.1" - dependencies: - "@types/retry": "npm:0.12.2" - is-network-error: "npm:^1.0.0" - retry: "npm:^0.13.1" - checksum: 10c0/10d014900107da2c7071ad60fffe4951675f09930b7a91681643ea224ae05649c05001d9e78436d902fe8b116d520dd1f60e72e091de097e2640979d56f3fb60 - languageName: node - linkType: hard - -"package-json-from-dist@npm:^1.0.0": - version: 1.0.1 - resolution: "package-json-from-dist@npm:1.0.1" - checksum: 10c0/62ba2785eb655fec084a257af34dbe24292ab74516d6aecef97ef72d4897310bc6898f6c85b5cd22770eaa1ce60d55a0230e150fb6a966e3ecd6c511e23d164b - languageName: node - linkType: hard - -"pacote@npm:20.0.0": - version: 20.0.0 - resolution: "pacote@npm:20.0.0" - dependencies: - "@npmcli/git": "npm:^6.0.0" - "@npmcli/installed-package-contents": "npm:^3.0.0" - "@npmcli/package-json": "npm:^6.0.0" - "@npmcli/promise-spawn": "npm:^8.0.0" - "@npmcli/run-script": "npm:^9.0.0" - cacache: "npm:^19.0.0" - fs-minipass: "npm:^3.0.0" - minipass: "npm:^7.0.2" - npm-package-arg: "npm:^12.0.0" - npm-packlist: "npm:^9.0.0" - npm-pick-manifest: "npm:^10.0.0" - npm-registry-fetch: "npm:^18.0.0" - proc-log: "npm:^5.0.0" - promise-retry: "npm:^2.0.1" - sigstore: "npm:^3.0.0" - ssri: "npm:^12.0.0" - tar: "npm:^6.1.11" - bin: - pacote: bin/index.js - checksum: 10c0/435c385446ecc81b1eb1584f4fa3cb102e630a22877f39b5c1a92eddfeaf222bd027b205e32632be2801e3bcbe525165cdffb5ceca5c13bbc81f8132fe1ba49e - languageName: node - linkType: hard - -"parent-module@npm:^1.0.0": - version: 1.0.1 - resolution: "parent-module@npm:1.0.1" - dependencies: - callsites: "npm:^3.0.0" - checksum: 10c0/c63d6e80000d4babd11978e0d3fee386ca7752a02b035fd2435960ffaa7219dc42146f07069fb65e6e8bf1caef89daf9af7535a39bddf354d78bf50d8294f556 - languageName: node - linkType: hard - -"parse-json@npm:^5.2.0": - version: 5.2.0 - resolution: "parse-json@npm:5.2.0" - dependencies: - "@babel/code-frame": "npm:^7.0.0" - error-ex: "npm:^1.3.1" - json-parse-even-better-errors: "npm:^2.3.0" - lines-and-columns: "npm:^1.1.6" - checksum: 10c0/77947f2253005be7a12d858aedbafa09c9ae39eb4863adf330f7b416ca4f4a08132e453e08de2db46459256fb66afaac5ee758b44fe6541b7cdaf9d252e59585 - languageName: node - linkType: hard - -"parse-node-version@npm:^1.0.1": - version: 1.0.1 - resolution: "parse-node-version@npm:1.0.1" - checksum: 10c0/999cd3d7da1425c2e182dce82b226c6dc842562d3ed79ec47f5c719c32a7f6c1a5352495b894fc25df164be7f2ede4224758255da9902ddef81f2b77ba46bb2c - languageName: node - linkType: hard - -"parse5-html-rewriting-stream@npm:7.0.0": - version: 7.0.0 - resolution: "parse5-html-rewriting-stream@npm:7.0.0" - dependencies: - entities: "npm:^4.3.0" - parse5: "npm:^7.0.0" - parse5-sax-parser: "npm:^7.0.0" - checksum: 10c0/658d3e2bae038e515bcce6ab6fba9484332d641f3ba82a6450649e1105492fe0a353101dbf751bddfc063509d06b55260bd4567970df3eaaa8391ae79d25ffbf - languageName: node - linkType: hard - -"parse5-sax-parser@npm:^7.0.0": - version: 7.0.0 - resolution: "parse5-sax-parser@npm:7.0.0" - dependencies: - parse5: "npm:^7.0.0" - checksum: 10c0/6b4184354f5ee75c2ec16ab4c7f4703e40d710375ed6c08f82aa425cda22b7ba4a2f43a0925bc6eb6fc88610ab0877693a8d9e10f5a0c21504fd6f97dbd130e9 - languageName: node - linkType: hard - -"parse5@npm:^7.0.0, parse5@npm:^7.1.2": - version: 7.2.1 - resolution: "parse5@npm:7.2.1" - dependencies: - entities: "npm:^4.5.0" - checksum: 10c0/829d37a0c709215a887e410a7118d754f8e1afd7edb529db95bc7bbf8045fb0266a7b67801331d8e8d9d073ea75793624ec27ce9ff3b96862c3b9008f4d68e80 - languageName: node - linkType: hard - -"parseurl@npm:~1.3.2, parseurl@npm:~1.3.3": - version: 1.3.3 - resolution: "parseurl@npm:1.3.3" - checksum: 10c0/90dd4760d6f6174adb9f20cf0965ae12e23879b5f5464f38e92fce8073354341e4b3b76fa3d878351efe7d01e617121955284cfd002ab087fba1a0726ec0b4f5 - languageName: node - linkType: hard - -"path-exists@npm:^4.0.0": - version: 4.0.0 - resolution: "path-exists@npm:4.0.0" - checksum: 10c0/8c0bd3f5238188197dc78dced15207a4716c51cc4e3624c44fc97acf69558f5ebb9a2afff486fe1b4ee148e0c133e96c5e11a9aa5c48a3006e3467da070e5e1b - languageName: node - linkType: hard - -"path-exists@npm:^5.0.0": - version: 5.0.0 - resolution: "path-exists@npm:5.0.0" - checksum: 10c0/b170f3060b31604cde93eefdb7392b89d832dfbc1bed717c9718cbe0f230c1669b7e75f87e19901da2250b84d092989a0f9e44d2ef41deb09aa3ad28e691a40a - languageName: node - linkType: hard - -"path-key@npm:^3.1.0": - version: 3.1.1 - resolution: "path-key@npm:3.1.1" - checksum: 10c0/748c43efd5a569c039d7a00a03b58eecd1d75f3999f5a28303d75f521288df4823bc057d8784eb72358b2895a05f29a070bc9f1f17d28226cc4e62494cc58c4c - languageName: node - linkType: hard - -"path-parse@npm:^1.0.7": - version: 1.0.7 - resolution: "path-parse@npm:1.0.7" - checksum: 10c0/11ce261f9d294cc7a58d6a574b7f1b935842355ec66fba3c3fd79e0f036462eaf07d0aa95bb74ff432f9afef97ce1926c720988c6a7451d8a584930ae7de86e1 - languageName: node - linkType: hard - -"path-scurry@npm:^1.11.1": - version: 1.11.1 - resolution: "path-scurry@npm:1.11.1" - dependencies: - lru-cache: "npm:^10.2.0" - minipass: "npm:^5.0.0 || ^6.0.2 || ^7.0.0" - checksum: 10c0/32a13711a2a505616ae1cc1b5076801e453e7aae6ac40ab55b388bb91b9d0547a52f5aaceff710ea400205f18691120d4431e520afbe4266b836fadede15872d - languageName: node - linkType: hard - -"path-to-regexp@npm:0.1.12": - version: 0.1.12 - resolution: "path-to-regexp@npm:0.1.12" - checksum: 10c0/1c6ff10ca169b773f3bba943bbc6a07182e332464704572962d277b900aeee81ac6aa5d060ff9e01149636c30b1f63af6e69dd7786ba6e0ddb39d4dee1f0645b - languageName: node - linkType: hard - -"path-type@npm:^5.0.0": - version: 5.0.0 - resolution: "path-type@npm:5.0.0" - checksum: 10c0/e8f4b15111bf483900c75609e5e74e3fcb79f2ddb73e41470028fcd3e4b5162ec65da9907be077ee5012c18801ff7fffb35f9f37a077f3f81d85a0b7d6578efd - languageName: node - linkType: hard - -"picocolors@npm:^1.0.0, picocolors@npm:^1.0.1, picocolors@npm:^1.1.1": - version: 1.1.1 - resolution: "picocolors@npm:1.1.1" - checksum: 10c0/e2e3e8170ab9d7c7421969adaa7e1b31434f789afb9b3f115f6b96d91945041ac3ceb02e9ec6fe6510ff036bcc0bf91e69a1772edc0b707e12b19c0f2d6bcf58 - languageName: node - linkType: hard - -"picomatch@npm:4.0.2": - version: 4.0.2 - resolution: "picomatch@npm:4.0.2" - checksum: 10c0/7c51f3ad2bb42c776f49ebf964c644958158be30d0a510efd5a395e8d49cb5acfed5b82c0c5b365523ce18e6ab85013c9ebe574f60305892ec3fa8eee8304ccc - languageName: node - linkType: hard - -"picomatch@npm:^2.0.4, picomatch@npm:^2.2.1, picomatch@npm:^2.3.1": - version: 2.3.1 - resolution: "picomatch@npm:2.3.1" - checksum: 10c0/26c02b8d06f03206fc2ab8d16f19960f2ff9e81a658f831ecb656d8f17d9edc799e8364b1f4a7873e89d9702dff96204be0fa26fe4181f6843f040f819dac4be - languageName: node - linkType: hard - -"pify@npm:^4.0.1": - version: 4.0.1 - resolution: "pify@npm:4.0.1" - checksum: 10c0/6f9d404b0d47a965437403c9b90eca8bb2536407f03de165940e62e72c8c8b75adda5516c6b9b23675a5877cc0bcac6bdfb0ef0e39414cd2476d5495da40e7cf - languageName: node - linkType: hard - -"piscina@npm:4.7.0": - version: 4.7.0 - resolution: "piscina@npm:4.7.0" - dependencies: - "@napi-rs/nice": "npm:^1.0.1" - dependenciesMeta: - "@napi-rs/nice": - optional: true - checksum: 10c0/d539857c9140d820173c78c9d6b7c20597ae4ff10a5060ff90ffc1d22a098eccd98f4d16073ce51c6d07e530079fa4d9a31ff7b4477b1411011e108b5b5689d4 - languageName: node - linkType: hard - -"pkg-dir@npm:^7.0.0": - version: 7.0.0 - resolution: "pkg-dir@npm:7.0.0" - dependencies: - find-up: "npm:^6.3.0" - checksum: 10c0/1afb23d2efb1ec9d8b2c4a0c37bf146822ad2774f074cb05b853be5dca1b40815c5960dd126df30ab8908349262a266f31b771e877235870a3b8fd313beebec5 - languageName: node - linkType: hard - -"postcss-loader@npm:8.1.1": - version: 8.1.1 - resolution: "postcss-loader@npm:8.1.1" - dependencies: - cosmiconfig: "npm:^9.0.0" - jiti: "npm:^1.20.0" - semver: "npm:^7.5.4" - peerDependencies: - "@rspack/core": 0.x || 1.x - postcss: ^7.0.0 || ^8.0.1 - webpack: ^5.0.0 - peerDependenciesMeta: - "@rspack/core": - optional: true - webpack: - optional: true - checksum: 10c0/86cde94cd4c7c39892ef9bd4bf09342f422a21789654038694cf2b23c37c0ed9550c73608f656426a6631f0ade1eca82022781831e93d5362afe2f191388b85e - languageName: node - linkType: hard - -"postcss-media-query-parser@npm:^0.2.3": - version: 0.2.3 - resolution: "postcss-media-query-parser@npm:0.2.3" - checksum: 10c0/252c8cf24f0e9018516b0d70b7b3d6f5b52e81c4bab2164b49a4e4c1b87bb11f5dbe708c0076990665cb24c70d5fd2f3aee9c922b0f67c7c619e051801484688 - languageName: node - linkType: hard - -"postcss-modules-extract-imports@npm:^3.1.0": - version: 3.1.0 - resolution: "postcss-modules-extract-imports@npm:3.1.0" - peerDependencies: - postcss: ^8.1.0 - checksum: 10c0/402084bcab376083c4b1b5111b48ec92974ef86066f366f0b2d5b2ac2b647d561066705ade4db89875a13cb175b33dd6af40d16d32b2ea5eaf8bac63bd2bf219 - languageName: node - linkType: hard - -"postcss-modules-local-by-default@npm:^4.0.5": - version: 4.2.0 - resolution: "postcss-modules-local-by-default@npm:4.2.0" - dependencies: - icss-utils: "npm:^5.0.0" - postcss-selector-parser: "npm:^7.0.0" - postcss-value-parser: "npm:^4.1.0" - peerDependencies: - postcss: ^8.1.0 - checksum: 10c0/b0b83feb2a4b61f5383979d37f23116c99bc146eba1741ca3cf1acca0e4d0dbf293ac1810a6ab4eccbe1ee76440dd0a9eb2db5b3bba4f99fc1b3ded16baa6358 - languageName: node - linkType: hard - -"postcss-modules-scope@npm:^3.2.0": - version: 3.2.1 - resolution: "postcss-modules-scope@npm:3.2.1" - dependencies: - postcss-selector-parser: "npm:^7.0.0" - peerDependencies: - postcss: ^8.1.0 - checksum: 10c0/bd2d81f79e3da0ef6365b8e2c78cc91469d05b58046b4601592cdeef6c4050ed8fe1478ae000a1608042fc7e692cb51fecbd2d9bce3f4eace4d32e883ffca10b - languageName: node - linkType: hard - -"postcss-modules-values@npm:^4.0.0": - version: 4.0.0 - resolution: "postcss-modules-values@npm:4.0.0" - dependencies: - icss-utils: "npm:^5.0.0" - peerDependencies: - postcss: ^8.1.0 - checksum: 10c0/dd18d7631b5619fb9921b198c86847a2a075f32e0c162e0428d2647685e318c487a2566cc8cc669fc2077ef38115cde7a068e321f46fb38be3ad49646b639dbc - languageName: node - linkType: hard - -"postcss-selector-parser@npm:^7.0.0": - version: 7.0.0 - resolution: "postcss-selector-parser@npm:7.0.0" - dependencies: - cssesc: "npm:^3.0.0" - util-deprecate: "npm:^1.0.2" - checksum: 10c0/e96e096afcce70bf5c97789f5ea09d7415ae5eb701d82b05b5e8532885d31363b484fcb1ca9488c9a331f30508d9e5bb6c3109eb2eb5067ef3d3919f9928cd9d - languageName: node - linkType: hard - -"postcss-value-parser@npm:^4.1.0, postcss-value-parser@npm:^4.2.0": - version: 4.2.0 - resolution: "postcss-value-parser@npm:4.2.0" - checksum: 10c0/f4142a4f56565f77c1831168e04e3effd9ffcc5aebaf0f538eee4b2d465adfd4b85a44257bb48418202a63806a7da7fe9f56c330aebb3cac898e46b4cbf49161 - languageName: node - linkType: hard - -"postcss@npm:8.4.49, postcss@npm:^8.2.14, postcss@npm:^8.4.33, postcss@npm:^8.4.43, postcss@npm:^8.4.47": - version: 8.4.49 - resolution: "postcss@npm:8.4.49" - dependencies: - nanoid: "npm:^3.3.7" - picocolors: "npm:^1.1.1" - source-map-js: "npm:^1.2.1" - checksum: 10c0/f1b3f17aaf36d136f59ec373459f18129908235e65dbdc3aee5eef8eba0756106f52de5ec4682e29a2eab53eb25170e7e871b3e4b52a8f1de3d344a514306be3 - languageName: node - linkType: hard - -"prelude-ls@npm:^1.2.1": - version: 1.2.1 - resolution: "prelude-ls@npm:1.2.1" - checksum: 10c0/b00d617431e7886c520a6f498a2e14c75ec58f6d93ba48c3b639cf241b54232d90daa05d83a9e9b9fef6baa63cb7e1e4602c2372fea5bc169668401eb127d0cd - languageName: node - linkType: hard - -"proc-log@npm:^5.0.0": - version: 5.0.0 - resolution: "proc-log@npm:5.0.0" - checksum: 10c0/bbe5edb944b0ad63387a1d5b1911ae93e05ce8d0f60de1035b218cdcceedfe39dbd2c697853355b70f1a090f8f58fe90da487c85216bf9671f9499d1a897e9e3 - languageName: node - linkType: hard - -"process-nextick-args@npm:~2.0.0": - version: 2.0.1 - resolution: "process-nextick-args@npm:2.0.1" - checksum: 10c0/bec089239487833d46b59d80327a1605e1c5287eaad770a291add7f45fda1bb5e28b38e0e061add0a1d0ee0984788ce74fa394d345eed1c420cacf392c554367 - languageName: node - linkType: hard - -"promise-inflight@npm:^1.0.1": - version: 1.0.1 - resolution: "promise-inflight@npm:1.0.1" - checksum: 10c0/d179d148d98fbff3d815752fa9a08a87d3190551d1420f17c4467f628214db12235ae068d98cd001f024453676d8985af8f28f002345646c4ece4600a79620bc - languageName: node - linkType: hard - -"promise-retry@npm:^2.0.1": - version: 2.0.1 - resolution: "promise-retry@npm:2.0.1" - dependencies: - err-code: "npm:^2.0.2" - retry: "npm:^0.12.0" - checksum: 10c0/9c7045a1a2928094b5b9b15336dcd2a7b1c052f674550df63cc3f36cd44028e5080448175b6f6ca32b642de81150f5e7b1a98b728f15cb069f2dd60ac2616b96 - languageName: node - linkType: hard - -"proxy-addr@npm:~2.0.7": - version: 2.0.7 - resolution: "proxy-addr@npm:2.0.7" - dependencies: - forwarded: "npm:0.2.0" - ipaddr.js: "npm:1.9.1" - checksum: 10c0/c3eed999781a35f7fd935f398b6d8920b6fb00bbc14287bc6de78128ccc1a02c89b95b56742bf7cf0362cc333c61d138532049c7dedc7a328ef13343eff81210 - languageName: node - linkType: hard - -"prr@npm:~1.0.1": - version: 1.0.1 - resolution: "prr@npm:1.0.1" - checksum: 10c0/5b9272c602e4f4472a215e58daff88f802923b84bc39c8860376bb1c0e42aaf18c25d69ad974bd06ec6db6f544b783edecd5502cd3d184748d99080d68e4be5f - languageName: node - linkType: hard - -"punycode@npm:^2.1.0": - version: 2.3.1 - resolution: "punycode@npm:2.3.1" - checksum: 10c0/14f76a8206bc3464f794fb2e3d3cc665ae416c01893ad7a02b23766eb07159144ee612ad67af5e84fa4479ccfe67678c4feb126b0485651b302babf66f04f9e9 - languageName: node - linkType: hard - -"qs@npm:6.13.0": - version: 6.13.0 - resolution: "qs@npm:6.13.0" - dependencies: - side-channel: "npm:^1.0.6" - checksum: 10c0/62372cdeec24dc83a9fb240b7533c0fdcf0c5f7e0b83343edd7310f0ab4c8205a5e7c56406531f2e47e1b4878a3821d652be4192c841de5b032ca83619d8f860 - languageName: node - linkType: hard - -"queue-microtask@npm:^1.2.2": - version: 1.2.3 - resolution: "queue-microtask@npm:1.2.3" - checksum: 10c0/900a93d3cdae3acd7d16f642c29a642aea32c2026446151f0778c62ac089d4b8e6c986811076e1ae180a694cedf077d453a11b58ff0a865629a4f82ab558e102 - languageName: node - linkType: hard - -"randombytes@npm:^2.1.0": - version: 2.1.0 - resolution: "randombytes@npm:2.1.0" - dependencies: - safe-buffer: "npm:^5.1.0" - checksum: 10c0/50395efda7a8c94f5dffab564f9ff89736064d32addf0cc7e8bf5e4166f09f8ded7a0849ca6c2d2a59478f7d90f78f20d8048bca3cdf8be09d8e8a10790388f3 - languageName: node - linkType: hard - -"range-parser@npm:^1.2.1, range-parser@npm:~1.2.1": - version: 1.2.1 - resolution: "range-parser@npm:1.2.1" - checksum: 10c0/96c032ac2475c8027b7a4e9fe22dc0dfe0f6d90b85e496e0f016fbdb99d6d066de0112e680805075bd989905e2123b3b3d002765149294dce0c1f7f01fcc2ea0 - languageName: node - linkType: hard - -"raw-body@npm:2.5.2": - version: 2.5.2 - resolution: "raw-body@npm:2.5.2" - dependencies: - bytes: "npm:3.1.2" - http-errors: "npm:2.0.0" - iconv-lite: "npm:0.4.24" - unpipe: "npm:1.0.0" - checksum: 10c0/b201c4b66049369a60e766318caff5cb3cc5a900efd89bdac431463822d976ad0670912c931fdbdcf5543207daf6f6833bca57aa116e1661d2ea91e12ca692c4 - languageName: node - linkType: hard - -"readable-stream@npm:^2.0.1": - version: 2.3.8 - resolution: "readable-stream@npm:2.3.8" - dependencies: - core-util-is: "npm:~1.0.0" - inherits: "npm:~2.0.3" - isarray: "npm:~1.0.0" - process-nextick-args: "npm:~2.0.0" - safe-buffer: "npm:~5.1.1" - string_decoder: "npm:~1.1.1" - util-deprecate: "npm:~1.0.1" - checksum: 10c0/7efdb01f3853bc35ac62ea25493567bf588773213f5f4a79f9c365e1ad13bab845ac0dae7bc946270dc40c3929483228415e92a3fc600cc7e4548992f41ee3fa - languageName: node - linkType: hard - -"readable-stream@npm:^3.0.6, readable-stream@npm:^3.4.0": - version: 3.6.2 - resolution: "readable-stream@npm:3.6.2" - dependencies: - inherits: "npm:^2.0.3" - string_decoder: "npm:^1.1.1" - util-deprecate: "npm:^1.0.1" - checksum: 10c0/e37be5c79c376fdd088a45fa31ea2e423e5d48854be7a22a58869b4e84d25047b193f6acb54f1012331e1bcd667ffb569c01b99d36b0bd59658fb33f513511b7 - languageName: node - linkType: hard - -"readdirp@npm:^4.0.1": - version: 4.0.2 - resolution: "readdirp@npm:4.0.2" - checksum: 10c0/a16ecd8ef3286dcd90648c3b103e3826db2b766cdb4a988752c43a83f683d01c7059158d623cbcd8bdfb39e65d302d285be2d208e7d9f34d022d912b929217dd - languageName: node - linkType: hard - -"readdirp@npm:~3.6.0": - version: 3.6.0 - resolution: "readdirp@npm:3.6.0" - dependencies: - picomatch: "npm:^2.2.1" - checksum: 10c0/6fa848cf63d1b82ab4e985f4cf72bd55b7dcfd8e0a376905804e48c3634b7e749170940ba77b32804d5fe93b3cc521aa95a8d7e7d725f830da6d93f3669ce66b - languageName: node - linkType: hard - -"reflect-metadata@npm:^0.2.0": - version: 0.2.2 - resolution: "reflect-metadata@npm:0.2.2" - checksum: 10c0/1cd93a15ea291e420204955544637c264c216e7aac527470e393d54b4bb075f10a17e60d8168ec96600c7e0b9fcc0cb0bb6e91c3fbf5b0d8c9056f04e6ac1ec2 - languageName: node - linkType: hard - -"regenerate-unicode-properties@npm:^10.2.0": - version: 10.2.0 - resolution: "regenerate-unicode-properties@npm:10.2.0" - dependencies: - regenerate: "npm:^1.4.2" - checksum: 10c0/5510785eeaf56bbfdf4e663d6753f125c08d2a372d4107bc1b756b7bf142e2ed80c2733a8b54e68fb309ba37690e66a0362699b0e21d5c1f0255dea1b00e6460 - languageName: node - linkType: hard - -"regenerate@npm:^1.4.2": - version: 1.4.2 - resolution: "regenerate@npm:1.4.2" - checksum: 10c0/f73c9eba5d398c818edc71d1c6979eaa05af7a808682749dd079f8df2a6d91a9b913db216c2c9b03e0a8ba2bba8701244a93f45211afbff691c32c7b275db1b8 - languageName: node - linkType: hard - -"regenerator-runtime@npm:^0.14.0": - version: 0.14.1 - resolution: "regenerator-runtime@npm:0.14.1" - checksum: 10c0/1b16eb2c4bceb1665c89de70dcb64126a22bc8eb958feef3cd68fe11ac6d2a4899b5cd1b80b0774c7c03591dc57d16631a7f69d2daa2ec98100e2f29f7ec4cc4 - languageName: node - linkType: hard - -"regenerator-transform@npm:^0.15.2": - version: 0.15.2 - resolution: "regenerator-transform@npm:0.15.2" - dependencies: - "@babel/runtime": "npm:^7.8.4" - checksum: 10c0/7cfe6931ec793269701994a93bab89c0cc95379191fad866270a7fea2adfec67ea62bb5b374db77058b60ba4509319d9b608664d0d288bd9989ca8dbd08fae90 - languageName: node - linkType: hard - -"regex-parser@npm:^2.2.11": - version: 2.3.0 - resolution: "regex-parser@npm:2.3.0" - checksum: 10c0/de31c40e9d982735fdf5934c822cc5cafbe6a0f0909d9fef52e2bd4cc2198933c89fd5e7a17697f25591fdb5df386a088296612b45f0f8e194222070fc5b5cc7 - languageName: node - linkType: hard - -"regexpu-core@npm:^6.2.0": - version: 6.2.0 - resolution: "regexpu-core@npm:6.2.0" - dependencies: - regenerate: "npm:^1.4.2" - regenerate-unicode-properties: "npm:^10.2.0" - regjsgen: "npm:^0.8.0" - regjsparser: "npm:^0.12.0" - unicode-match-property-ecmascript: "npm:^2.0.0" - unicode-match-property-value-ecmascript: "npm:^2.1.0" - checksum: 10c0/bbcb83a854bf96ce4005ee4e4618b71c889cda72674ce6092432f0039b47890c2d0dfeb9057d08d440999d9ea03879ebbb7f26ca005ccf94390e55c348859b98 - languageName: node - linkType: hard - -"regjsgen@npm:^0.8.0": - version: 0.8.0 - resolution: "regjsgen@npm:0.8.0" - checksum: 10c0/44f526c4fdbf0b29286101a282189e4dbb303f4013cf3fea058668d96d113b9180d3d03d1e13f6d4cbde38b7728bf951aecd9dc199938c080093a9a6f0d7a6bd - languageName: node - linkType: hard - -"regjsparser@npm:^0.12.0": - version: 0.12.0 - resolution: "regjsparser@npm:0.12.0" - dependencies: - jsesc: "npm:~3.0.2" - bin: - regjsparser: bin/parser - checksum: 10c0/99d3e4e10c8c7732eb7aa843b8da2fd8b647fe144d3711b480e4647dc3bff4b1e96691ccf17f3ace24aa866a50b064236177cb25e6e4fbbb18285d99edaed83b - languageName: node - linkType: hard - -"require-directory@npm:^2.1.1": - version: 2.1.1 - resolution: "require-directory@npm:2.1.1" - checksum: 10c0/83aa76a7bc1531f68d92c75a2ca2f54f1b01463cb566cf3fbc787d0de8be30c9dbc211d1d46be3497dac5785fe296f2dd11d531945ac29730643357978966e99 - languageName: node - linkType: hard - -"require-from-string@npm:^2.0.2": - version: 2.0.2 - resolution: "require-from-string@npm:2.0.2" - checksum: 10c0/aaa267e0c5b022fc5fd4eef49d8285086b15f2a1c54b28240fdf03599cbd9c26049fee3eab894f2e1f6ca65e513b030a7c264201e3f005601e80c49fb2937ce2 - languageName: node - linkType: hard - -"requires-port@npm:^1.0.0": - version: 1.0.0 - resolution: "requires-port@npm:1.0.0" - checksum: 10c0/b2bfdd09db16c082c4326e573a82c0771daaf7b53b9ce8ad60ea46aa6e30aaf475fe9b164800b89f93b748d2c234d8abff945d2551ba47bf5698e04cd7713267 - languageName: node - linkType: hard - -"resolve-from@npm:^4.0.0": - version: 4.0.0 - resolution: "resolve-from@npm:4.0.0" - checksum: 10c0/8408eec31a3112ef96e3746c37be7d64020cda07c03a920f5024e77290a218ea758b26ca9529fd7b1ad283947f34b2291c1c0f6aa0ed34acfdda9c6014c8d190 - languageName: node - linkType: hard - -"resolve-url-loader@npm:5.0.0": - version: 5.0.0 - resolution: "resolve-url-loader@npm:5.0.0" - dependencies: - adjust-sourcemap-loader: "npm:^4.0.0" - convert-source-map: "npm:^1.7.0" - loader-utils: "npm:^2.0.0" - postcss: "npm:^8.2.14" - source-map: "npm:0.6.1" - checksum: 10c0/53eef3620332f2fc35a4deffaa4395064b2ffd1bc28be380faa3f1e99c2fb7bbf0f705700b4539387d5b6c39586df54a92cd5d031606f19de4bf9e0ff1b6a522 - languageName: node - linkType: hard - -"resolve@npm:1.22.8": - version: 1.22.8 - resolution: "resolve@npm:1.22.8" - dependencies: - is-core-module: "npm:^2.13.0" - path-parse: "npm:^1.0.7" - supports-preserve-symlinks-flag: "npm:^1.0.0" - bin: - resolve: bin/resolve - checksum: 10c0/07e179f4375e1fd072cfb72ad66d78547f86e6196c4014b31cb0b8bb1db5f7ca871f922d08da0fbc05b94e9fd42206f819648fa3b5b873ebbc8e1dc68fec433a - languageName: node - linkType: hard - -"resolve@npm:^1.14.2": - version: 1.22.10 - resolution: "resolve@npm:1.22.10" - dependencies: - is-core-module: "npm:^2.16.0" - path-parse: "npm:^1.0.7" - supports-preserve-symlinks-flag: "npm:^1.0.0" - bin: - resolve: bin/resolve - checksum: 10c0/8967e1f4e2cc40f79b7e080b4582b9a8c5ee36ffb46041dccb20e6461161adf69f843b43067b4a375de926a2cd669157e29a29578191def399dd5ef89a1b5203 - languageName: node - linkType: hard - -"resolve@patch:resolve@npm%3A1.22.8#optional!builtin": - version: 1.22.8 - resolution: "resolve@patch:resolve@npm%3A1.22.8#optional!builtin::version=1.22.8&hash=c3c19d" - dependencies: - is-core-module: "npm:^2.13.0" - path-parse: "npm:^1.0.7" - supports-preserve-symlinks-flag: "npm:^1.0.0" - bin: - resolve: bin/resolve - checksum: 10c0/0446f024439cd2e50c6c8fa8ba77eaa8370b4180f401a96abf3d1ebc770ac51c1955e12764cde449fde3fff480a61f84388e3505ecdbab778f4bef5f8212c729 - languageName: node - linkType: hard - -"resolve@patch:resolve@npm%3A^1.14.2#optional!builtin": - version: 1.22.10 - resolution: "resolve@patch:resolve@npm%3A1.22.10#optional!builtin::version=1.22.10&hash=c3c19d" - dependencies: - is-core-module: "npm:^2.16.0" - path-parse: "npm:^1.0.7" - supports-preserve-symlinks-flag: "npm:^1.0.0" - bin: - resolve: bin/resolve - checksum: 10c0/52a4e505bbfc7925ac8f4cd91fd8c4e096b6a89728b9f46861d3b405ac9a1ccf4dcbf8befb4e89a2e11370dacd0160918163885cbc669369590f2f31f4c58939 - languageName: node - linkType: hard - -"restore-cursor@npm:^3.1.0": - version: 3.1.0 - resolution: "restore-cursor@npm:3.1.0" - dependencies: - onetime: "npm:^5.1.0" - signal-exit: "npm:^3.0.2" - checksum: 10c0/8051a371d6aa67ff21625fa94e2357bd81ffdc96267f3fb0fc4aaf4534028343836548ef34c240ffa8c25b280ca35eb36be00b3cb2133fa4f51896d7e73c6b4f - languageName: node - linkType: hard - -"restore-cursor@npm:^5.0.0": - version: 5.1.0 - resolution: "restore-cursor@npm:5.1.0" - dependencies: - onetime: "npm:^7.0.0" - signal-exit: "npm:^4.1.0" - checksum: 10c0/c2ba89131eea791d1b25205bdfdc86699767e2b88dee2a590b1a6caa51737deac8bad0260a5ded2f7c074b7db2f3a626bcf1fcf3cdf35974cbeea5e2e6764f60 - languageName: node - linkType: hard - -"retry@npm:^0.12.0": - version: 0.12.0 - resolution: "retry@npm:0.12.0" - checksum: 10c0/59933e8501727ba13ad73ef4a04d5280b3717fd650408460c987392efe9d7be2040778ed8ebe933c5cbd63da3dcc37919c141ef8af0a54a6e4fca5a2af177bfe - languageName: node - linkType: hard - -"retry@npm:^0.13.1": - version: 0.13.1 - resolution: "retry@npm:0.13.1" - checksum: 10c0/9ae822ee19db2163497e074ea919780b1efa00431d197c7afdb950e42bf109196774b92a49fc9821f0b8b328a98eea6017410bfc5e8a0fc19c85c6d11adb3772 - languageName: node - linkType: hard - -"reusify@npm:^1.0.4": - version: 1.0.4 - resolution: "reusify@npm:1.0.4" - checksum: 10c0/c19ef26e4e188f408922c46f7ff480d38e8dfc55d448310dfb518736b23ed2c4f547fb64a6ed5bdba92cd7e7ddc889d36ff78f794816d5e71498d645ef476107 - languageName: node - linkType: hard - -"rfdc@npm:^1.4.1": - version: 1.4.1 - resolution: "rfdc@npm:1.4.1" - checksum: 10c0/4614e4292356cafade0b6031527eea9bc90f2372a22c012313be1dcc69a3b90c7338158b414539be863fa95bfcb2ddcd0587be696841af4e6679d85e62c060c7 - languageName: node - linkType: hard - -"rimraf@npm:^5.0.5": - version: 5.0.10 - resolution: "rimraf@npm:5.0.10" - dependencies: - glob: "npm:^10.3.7" - bin: - rimraf: dist/esm/bin.mjs - checksum: 10c0/7da4fd0e15118ee05b918359462cfa1e7fe4b1228c7765195a45b55576e8c15b95db513b8466ec89129666f4af45ad978a3057a02139afba1a63512a2d9644cc - languageName: node - linkType: hard - -"rollup@npm:4.26.0": - version: 4.26.0 - resolution: "rollup@npm:4.26.0" - dependencies: - "@rollup/rollup-android-arm-eabi": "npm:4.26.0" - "@rollup/rollup-android-arm64": "npm:4.26.0" - "@rollup/rollup-darwin-arm64": "npm:4.26.0" - "@rollup/rollup-darwin-x64": "npm:4.26.0" - "@rollup/rollup-freebsd-arm64": "npm:4.26.0" - "@rollup/rollup-freebsd-x64": "npm:4.26.0" - "@rollup/rollup-linux-arm-gnueabihf": "npm:4.26.0" - "@rollup/rollup-linux-arm-musleabihf": "npm:4.26.0" - "@rollup/rollup-linux-arm64-gnu": "npm:4.26.0" - "@rollup/rollup-linux-arm64-musl": "npm:4.26.0" - "@rollup/rollup-linux-powerpc64le-gnu": "npm:4.26.0" - "@rollup/rollup-linux-riscv64-gnu": "npm:4.26.0" - "@rollup/rollup-linux-s390x-gnu": "npm:4.26.0" - "@rollup/rollup-linux-x64-gnu": "npm:4.26.0" - "@rollup/rollup-linux-x64-musl": "npm:4.26.0" - "@rollup/rollup-win32-arm64-msvc": "npm:4.26.0" - "@rollup/rollup-win32-ia32-msvc": "npm:4.26.0" - "@rollup/rollup-win32-x64-msvc": "npm:4.26.0" - "@types/estree": "npm:1.0.6" - fsevents: "npm:~2.3.2" - dependenciesMeta: - "@rollup/rollup-android-arm-eabi": - optional: true - "@rollup/rollup-android-arm64": - optional: true - "@rollup/rollup-darwin-arm64": - optional: true - "@rollup/rollup-darwin-x64": - optional: true - "@rollup/rollup-freebsd-arm64": - optional: true - "@rollup/rollup-freebsd-x64": - optional: true - "@rollup/rollup-linux-arm-gnueabihf": - optional: true - "@rollup/rollup-linux-arm-musleabihf": - optional: true - "@rollup/rollup-linux-arm64-gnu": - optional: true - "@rollup/rollup-linux-arm64-musl": - optional: true - "@rollup/rollup-linux-powerpc64le-gnu": - optional: true - "@rollup/rollup-linux-riscv64-gnu": - optional: true - "@rollup/rollup-linux-s390x-gnu": - optional: true - "@rollup/rollup-linux-x64-gnu": - optional: true - "@rollup/rollup-linux-x64-musl": - optional: true - "@rollup/rollup-win32-arm64-msvc": - optional: true - "@rollup/rollup-win32-ia32-msvc": - optional: true - "@rollup/rollup-win32-x64-msvc": - optional: true - fsevents: - optional: true - bin: - rollup: dist/bin/rollup - checksum: 10c0/a4375787b95bc3b55d38bbb8dec5f6a63862b08369b9562a2d38efadd400ca42a79406b8f09670a0deb0cc9cd72cca1c0be317302190d1f7feff597003d951bc - languageName: node - linkType: hard - -"rollup@npm:^4.20.0": - version: 4.30.1 - resolution: "rollup@npm:4.30.1" - dependencies: - "@rollup/rollup-android-arm-eabi": "npm:4.30.1" - "@rollup/rollup-android-arm64": "npm:4.30.1" - "@rollup/rollup-darwin-arm64": "npm:4.30.1" - "@rollup/rollup-darwin-x64": "npm:4.30.1" - "@rollup/rollup-freebsd-arm64": "npm:4.30.1" - "@rollup/rollup-freebsd-x64": "npm:4.30.1" - "@rollup/rollup-linux-arm-gnueabihf": "npm:4.30.1" - "@rollup/rollup-linux-arm-musleabihf": "npm:4.30.1" - "@rollup/rollup-linux-arm64-gnu": "npm:4.30.1" - "@rollup/rollup-linux-arm64-musl": "npm:4.30.1" - "@rollup/rollup-linux-loongarch64-gnu": "npm:4.30.1" - "@rollup/rollup-linux-powerpc64le-gnu": "npm:4.30.1" - "@rollup/rollup-linux-riscv64-gnu": "npm:4.30.1" - "@rollup/rollup-linux-s390x-gnu": "npm:4.30.1" - "@rollup/rollup-linux-x64-gnu": "npm:4.30.1" - "@rollup/rollup-linux-x64-musl": "npm:4.30.1" - "@rollup/rollup-win32-arm64-msvc": "npm:4.30.1" - "@rollup/rollup-win32-ia32-msvc": "npm:4.30.1" - "@rollup/rollup-win32-x64-msvc": "npm:4.30.1" - "@types/estree": "npm:1.0.6" - fsevents: "npm:~2.3.2" - dependenciesMeta: - "@rollup/rollup-android-arm-eabi": - optional: true - "@rollup/rollup-android-arm64": - optional: true - "@rollup/rollup-darwin-arm64": - optional: true - "@rollup/rollup-darwin-x64": - optional: true - "@rollup/rollup-freebsd-arm64": - optional: true - "@rollup/rollup-freebsd-x64": - optional: true - "@rollup/rollup-linux-arm-gnueabihf": - optional: true - "@rollup/rollup-linux-arm-musleabihf": - optional: true - "@rollup/rollup-linux-arm64-gnu": - optional: true - "@rollup/rollup-linux-arm64-musl": - optional: true - "@rollup/rollup-linux-loongarch64-gnu": - optional: true - "@rollup/rollup-linux-powerpc64le-gnu": - optional: true - "@rollup/rollup-linux-riscv64-gnu": - optional: true - "@rollup/rollup-linux-s390x-gnu": - optional: true - "@rollup/rollup-linux-x64-gnu": - optional: true - "@rollup/rollup-linux-x64-musl": - optional: true - "@rollup/rollup-win32-arm64-msvc": - optional: true - "@rollup/rollup-win32-ia32-msvc": - optional: true - "@rollup/rollup-win32-x64-msvc": - optional: true - fsevents: - optional: true - bin: - rollup: dist/bin/rollup - checksum: 10c0/a318c57e2ca9741e1503bcd75483949c6e83edd72234a468010a3098a34248f523e44f7ad4fde90dc5c2da56abc1b78ac42a9329e1dbd708682728adbd8df7cc - languageName: node - linkType: hard - -"run-applescript@npm:^7.0.0": - version: 7.0.0 - resolution: "run-applescript@npm:7.0.0" - checksum: 10c0/bd821bbf154b8e6c8ecffeaf0c33cebbb78eb2987476c3f6b420d67ab4c5301faa905dec99ded76ebb3a7042b4e440189ae6d85bbbd3fc6e8d493347ecda8bfe - languageName: node - linkType: hard - -"run-parallel@npm:^1.1.9": - version: 1.2.0 - resolution: "run-parallel@npm:1.2.0" - dependencies: - queue-microtask: "npm:^1.2.2" - checksum: 10c0/200b5ab25b5b8b7113f9901bfe3afc347e19bb7475b267d55ad0eb86a62a46d77510cb0f232507c9e5d497ebda569a08a9867d0d14f57a82ad5564d991588b39 - languageName: node - linkType: hard - -"rxjs@npm:7.8.1, rxjs@npm:^7.8.0": - version: 7.8.1 - resolution: "rxjs@npm:7.8.1" - dependencies: - tslib: "npm:^2.1.0" - checksum: 10c0/3c49c1ecd66170b175c9cacf5cef67f8914dcbc7cd0162855538d365c83fea631167cacb644b3ce533b2ea0e9a4d0b12175186985f89d75abe73dbd8f7f06f68 - languageName: node - linkType: hard - -"safe-buffer@npm:5.2.1, safe-buffer@npm:>=5.1.0, safe-buffer@npm:^5.1.0, safe-buffer@npm:~5.2.0": - version: 5.2.1 - resolution: "safe-buffer@npm:5.2.1" - checksum: 10c0/6501914237c0a86e9675d4e51d89ca3c21ffd6a31642efeba25ad65720bce6921c9e7e974e5be91a786b25aa058b5303285d3c15dbabf983a919f5f630d349f3 - languageName: node - linkType: hard - -"safe-buffer@npm:~5.1.0, safe-buffer@npm:~5.1.1": - version: 5.1.2 - resolution: "safe-buffer@npm:5.1.2" - checksum: 10c0/780ba6b5d99cc9a40f7b951d47152297d0e260f0df01472a1b99d4889679a4b94a13d644f7dbc4f022572f09ae9005fa2fbb93bbbd83643316f365a3e9a45b21 - languageName: node - linkType: hard - -"safer-buffer@npm:>= 2.1.2 < 3, safer-buffer@npm:>= 2.1.2 < 3.0.0": - version: 2.1.2 - resolution: "safer-buffer@npm:2.1.2" - checksum: 10c0/7e3c8b2e88a1841c9671094bbaeebd94448111dd90a81a1f606f3f67708a6ec57763b3b47f06da09fc6054193e0e6709e77325415dc8422b04497a8070fa02d4 - languageName: node - linkType: hard - -"sass-loader@npm:16.0.3": - version: 16.0.3 - resolution: "sass-loader@npm:16.0.3" - dependencies: - neo-async: "npm:^2.6.2" - peerDependencies: - "@rspack/core": 0.x || 1.x - node-sass: ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0 || ^9.0.0 - sass: ^1.3.0 - sass-embedded: "*" - webpack: ^5.0.0 - peerDependenciesMeta: - "@rspack/core": - optional: true - node-sass: - optional: true - sass: - optional: true - sass-embedded: - optional: true - webpack: - optional: true - checksum: 10c0/2dc188dd0d5276ed0251eee7f245848ccf9df6ec121227462403f322c17a3dbe100fb60d47968f078e585e4aced452eb7fa1a8e55b415d5de3151fa1bbf2d561 - languageName: node - linkType: hard - -"sass@npm:1.80.7": - version: 1.80.7 - resolution: "sass@npm:1.80.7" - dependencies: - "@parcel/watcher": "npm:^2.4.1" - chokidar: "npm:^4.0.0" - immutable: "npm:^5.0.2" - source-map-js: "npm:>=0.6.2 <2.0.0" - dependenciesMeta: - "@parcel/watcher": - optional: true - bin: - sass: sass.js - checksum: 10c0/e0e0df8dc9dd7694826f915196a96cda45fe0fc849be9fc08b43c12aa1250eb512130979ed239e1106476973ace1f52abbcc1d5900a075d3813c282a626dcbf7 - languageName: node - linkType: hard - -"sax@npm:^1.2.4": - version: 1.4.1 - resolution: "sax@npm:1.4.1" - checksum: 10c0/6bf86318a254c5d898ede6bd3ded15daf68ae08a5495a2739564eb265cd13bcc64a07ab466fb204f67ce472bb534eb8612dac587435515169593f4fffa11de7c - languageName: node - linkType: hard - -"schema-utils@npm:^3.2.0": - version: 3.3.0 - resolution: "schema-utils@npm:3.3.0" - dependencies: - "@types/json-schema": "npm:^7.0.8" - ajv: "npm:^6.12.5" - ajv-keywords: "npm:^3.5.2" - checksum: 10c0/fafdbde91ad8aa1316bc543d4b61e65ea86970aebbfb750bfb6d8a6c287a23e415e0e926c2498696b242f63af1aab8e585252637fabe811fd37b604351da6500 - languageName: node - linkType: hard - -"schema-utils@npm:^4.0.0, schema-utils@npm:^4.2.0, schema-utils@npm:^4.3.0": - version: 4.3.0 - resolution: "schema-utils@npm:4.3.0" - dependencies: - "@types/json-schema": "npm:^7.0.9" - ajv: "npm:^8.9.0" - ajv-formats: "npm:^2.1.1" - ajv-keywords: "npm:^5.1.0" - checksum: 10c0/c23f0fa73ef71a01d4a2bb7af4c91e0d356ec640e071aa2d06ea5e67f042962bb7ac7c29a60a295bb0125878801bc3209197a2b8a833dd25bd38e37c3ed21427 - languageName: node - linkType: hard - -"select-hose@npm:^2.0.0": - version: 2.0.0 - resolution: "select-hose@npm:2.0.0" - checksum: 10c0/01cc52edd29feddaf379efb4328aededa633f0ac43c64b11a8abd075ff34f05b0d280882c4fbcbdf1a0658202c9cd2ea8d5985174dcf9a2dac7e3a4996fa9b67 - languageName: node - linkType: hard - -"selfsigned@npm:^2.4.1": - version: 2.4.1 - resolution: "selfsigned@npm:2.4.1" - dependencies: - "@types/node-forge": "npm:^1.3.0" - node-forge: "npm:^1" - checksum: 10c0/521829ec36ea042f7e9963bf1da2ed040a815cf774422544b112ec53b7edc0bc50a0f8cc2ae7aa6cc19afa967c641fd96a15de0fc650c68651e41277d2e1df09 - languageName: node - linkType: hard - -"semver@npm:7.6.3, semver@npm:^7.0.0, semver@npm:^7.1.1, semver@npm:^7.3.5, semver@npm:^7.5.3, semver@npm:^7.5.4, semver@npm:^7.6.0": - version: 7.6.3 - resolution: "semver@npm:7.6.3" - bin: - semver: bin/semver.js - checksum: 10c0/88f33e148b210c153873cb08cfe1e281d518aaa9a666d4d148add6560db5cd3c582f3a08ccb91f38d5f379ead256da9931234ed122057f40bb5766e65e58adaf - languageName: node - linkType: hard - -"semver@npm:^5.6.0": - version: 5.7.2 - resolution: "semver@npm:5.7.2" - bin: - semver: bin/semver - checksum: 10c0/e4cf10f86f168db772ae95d86ba65b3fd6c5967c94d97c708ccb463b778c2ee53b914cd7167620950fc07faf5a564e6efe903836639e512a1aa15fbc9667fa25 - languageName: node - linkType: hard - -"semver@npm:^6.3.1": - version: 6.3.1 - resolution: "semver@npm:6.3.1" - bin: - semver: bin/semver.js - checksum: 10c0/e3d79b609071caa78bcb6ce2ad81c7966a46a7431d9d58b8800cfa9cb6a63699b3899a0e4bcce36167a284578212d9ae6942b6929ba4aa5015c079a67751d42d - languageName: node - linkType: hard - -"send@npm:0.19.0": - version: 0.19.0 - resolution: "send@npm:0.19.0" - dependencies: - debug: "npm:2.6.9" - depd: "npm:2.0.0" - destroy: "npm:1.2.0" - encodeurl: "npm:~1.0.2" - escape-html: "npm:~1.0.3" - etag: "npm:~1.8.1" - fresh: "npm:0.5.2" - http-errors: "npm:2.0.0" - mime: "npm:1.6.0" - ms: "npm:2.1.3" - on-finished: "npm:2.4.1" - range-parser: "npm:~1.2.1" - statuses: "npm:2.0.1" - checksum: 10c0/ea3f8a67a8f0be3d6bf9080f0baed6d2c51d11d4f7b4470de96a5029c598a7011c497511ccc28968b70ef05508675cebff27da9151dd2ceadd60be4e6cf845e3 - languageName: node - linkType: hard - -"serialize-javascript@npm:^6.0.2": - version: 6.0.2 - resolution: "serialize-javascript@npm:6.0.2" - dependencies: - randombytes: "npm:^2.1.0" - checksum: 10c0/2dd09ef4b65a1289ba24a788b1423a035581bef60817bea1f01eda8e3bda623f86357665fe7ac1b50f6d4f583f97db9615b3f07b2a2e8cbcb75033965f771dd2 - languageName: node - linkType: hard - -"serve-index@npm:^1.9.1": - version: 1.9.1 - resolution: "serve-index@npm:1.9.1" - dependencies: - accepts: "npm:~1.3.4" - batch: "npm:0.6.1" - debug: "npm:2.6.9" - escape-html: "npm:~1.0.3" - http-errors: "npm:~1.6.2" - mime-types: "npm:~2.1.17" - parseurl: "npm:~1.3.2" - checksum: 10c0/a666471a24196f74371edf2c3c7bcdd82adbac52f600804508754b5296c3567588bf694258b19e0cb23a567acfa20d9721bfdaed3286007b81f9741ada8a3a9c - languageName: node - linkType: hard - -"serve-static@npm:1.16.2": - version: 1.16.2 - resolution: "serve-static@npm:1.16.2" - dependencies: - encodeurl: "npm:~2.0.0" - escape-html: "npm:~1.0.3" - parseurl: "npm:~1.3.3" - send: "npm:0.19.0" - checksum: 10c0/528fff6f5e12d0c5a391229ad893910709bc51b5705962b09404a1d813857578149b8815f35d3ee5752f44cd378d0f31669d4b1d7e2d11f41e08283d5134bd1f - languageName: node - linkType: hard - -"setprototypeof@npm:1.1.0": - version: 1.1.0 - resolution: "setprototypeof@npm:1.1.0" - checksum: 10c0/a77b20876689c6a89c3b42f0c3596a9cae02f90fc902570cbd97198e9e8240382086c9303ad043e88cee10f61eae19f1004e51d885395a1e9bf49f9ebed12872 - languageName: node - linkType: hard - -"setprototypeof@npm:1.2.0": - version: 1.2.0 - resolution: "setprototypeof@npm:1.2.0" - checksum: 10c0/68733173026766fa0d9ecaeb07f0483f4c2dc70ca376b3b7c40b7cda909f94b0918f6c5ad5ce27a9160bdfb475efaa9d5e705a11d8eaae18f9835d20976028bc - languageName: node - linkType: hard - -"shallow-clone@npm:^3.0.0": - version: 3.0.1 - resolution: "shallow-clone@npm:3.0.1" - dependencies: - kind-of: "npm:^6.0.2" - checksum: 10c0/7bab09613a1b9f480c85a9823aebec533015579fa055ba6634aa56ba1f984380670eaf33b8217502931872aa1401c9fcadaa15f9f604d631536df475b05bcf1e - languageName: node - linkType: hard - -"shebang-command@npm:^2.0.0": - version: 2.0.0 - resolution: "shebang-command@npm:2.0.0" - dependencies: - shebang-regex: "npm:^3.0.0" - checksum: 10c0/a41692e7d89a553ef21d324a5cceb5f686d1f3c040759c50aab69688634688c5c327f26f3ecf7001ebfd78c01f3c7c0a11a7c8bfd0a8bc9f6240d4f40b224e4e - languageName: node - linkType: hard - -"shebang-regex@npm:^3.0.0": - version: 3.0.0 - resolution: "shebang-regex@npm:3.0.0" - checksum: 10c0/1dbed0726dd0e1152a92696c76c7f06084eb32a90f0528d11acd764043aacf76994b2fb30aa1291a21bd019d6699164d048286309a278855ee7bec06cf6fb690 - languageName: node - linkType: hard - -"shell-quote@npm:^1.8.1": - version: 1.8.2 - resolution: "shell-quote@npm:1.8.2" - checksum: 10c0/85fdd44f2ad76e723d34eb72c753f04d847ab64e9f1f10677e3f518d0e5b0752a176fd805297b30bb8c3a1556ebe6e77d2288dbd7b7b0110c7e941e9e9c20ce1 - languageName: node - linkType: hard - -"side-channel-list@npm:^1.0.0": - version: 1.0.0 - resolution: "side-channel-list@npm:1.0.0" - dependencies: - es-errors: "npm:^1.3.0" - object-inspect: "npm:^1.13.3" - checksum: 10c0/644f4ac893456c9490ff388bf78aea9d333d5e5bfc64cfb84be8f04bf31ddc111a8d4b83b85d7e7e8a7b845bc185a9ad02c052d20e086983cf59f0be517d9b3d - languageName: node - linkType: hard - -"side-channel-map@npm:^1.0.1": - version: 1.0.1 - resolution: "side-channel-map@npm:1.0.1" - dependencies: - call-bound: "npm:^1.0.2" - es-errors: "npm:^1.3.0" - get-intrinsic: "npm:^1.2.5" - object-inspect: "npm:^1.13.3" - checksum: 10c0/010584e6444dd8a20b85bc926d934424bd809e1a3af941cace229f7fdcb751aada0fb7164f60c2e22292b7fa3c0ff0bce237081fd4cdbc80de1dc68e95430672 - languageName: node - linkType: hard - -"side-channel-weakmap@npm:^1.0.2": - version: 1.0.2 - resolution: "side-channel-weakmap@npm:1.0.2" - dependencies: - call-bound: "npm:^1.0.2" - es-errors: "npm:^1.3.0" - get-intrinsic: "npm:^1.2.5" - object-inspect: "npm:^1.13.3" - side-channel-map: "npm:^1.0.1" - checksum: 10c0/71362709ac233e08807ccd980101c3e2d7efe849edc51455030327b059f6c4d292c237f94dc0685031dd11c07dd17a68afde235d6cf2102d949567f98ab58185 - languageName: node - linkType: hard - -"side-channel@npm:^1.0.6": - version: 1.1.0 - resolution: "side-channel@npm:1.1.0" - dependencies: - es-errors: "npm:^1.3.0" - object-inspect: "npm:^1.13.3" - side-channel-list: "npm:^1.0.0" - side-channel-map: "npm:^1.0.1" - side-channel-weakmap: "npm:^1.0.2" - checksum: 10c0/cb20dad41eb032e6c24c0982e1e5a24963a28aa6122b4f05b3f3d6bf8ae7fd5474ef382c8f54a6a3ab86e0cac4d41a23bd64ede3970e5bfb50326ba02a7996e6 - languageName: node - linkType: hard - -"signal-exit@npm:^3.0.2": - version: 3.0.7 - resolution: "signal-exit@npm:3.0.7" - checksum: 10c0/25d272fa73e146048565e08f3309d5b942c1979a6f4a58a8c59d5fa299728e9c2fcd1a759ec870863b1fd38653670240cd420dad2ad9330c71f36608a6a1c912 - languageName: node - linkType: hard - -"signal-exit@npm:^4.0.1, signal-exit@npm:^4.1.0": - version: 4.1.0 - resolution: "signal-exit@npm:4.1.0" - checksum: 10c0/41602dce540e46d599edba9d9860193398d135f7ff72cab629db5171516cfae628d21e7bfccde1bbfdf11c48726bc2a6d1a8fb8701125852fbfda7cf19c6aa83 - languageName: node - linkType: hard - -"sigstore@npm:^3.0.0": - version: 3.0.0 - resolution: "sigstore@npm:3.0.0" - dependencies: - "@sigstore/bundle": "npm:^3.0.0" - "@sigstore/core": "npm:^2.0.0" - "@sigstore/protobuf-specs": "npm:^0.3.2" - "@sigstore/sign": "npm:^3.0.0" - "@sigstore/tuf": "npm:^3.0.0" - "@sigstore/verify": "npm:^2.0.0" - checksum: 10c0/9f9fa8419d07cb4ebb4fbe324e8a68023f851827629a4906d2ffa59b51f17551f514d80aa541c2d2b9918340a1c42cfda2e1ba0ac65a2f9768e8437c520beecd - languageName: node - linkType: hard - -"slash@npm:^5.1.0": - version: 5.1.0 - resolution: "slash@npm:5.1.0" - checksum: 10c0/eb48b815caf0bdc390d0519d41b9e0556a14380f6799c72ba35caf03544d501d18befdeeef074bc9c052acf69654bc9e0d79d7f1de0866284137a40805299eb3 - languageName: node - linkType: hard - -"slice-ansi@npm:^5.0.0": - version: 5.0.0 - resolution: "slice-ansi@npm:5.0.0" - dependencies: - ansi-styles: "npm:^6.0.0" - is-fullwidth-code-point: "npm:^4.0.0" - checksum: 10c0/2d4d40b2a9d5cf4e8caae3f698fe24ae31a4d778701724f578e984dcb485ec8c49f0c04dab59c401821e80fcdfe89cace9c66693b0244e40ec485d72e543914f - languageName: node - linkType: hard - -"slice-ansi@npm:^7.1.0": - version: 7.1.0 - resolution: "slice-ansi@npm:7.1.0" - dependencies: - ansi-styles: "npm:^6.2.1" - is-fullwidth-code-point: "npm:^5.0.0" - checksum: 10c0/631c971d4abf56cf880f034d43fcc44ff883624867bf11ecbd538c47343911d734a4656d7bc02362b40b89d765652a7f935595441e519b59e2ad3f4d5d6fe7ca - languageName: node - linkType: hard - -"smart-buffer@npm:^4.2.0": - version: 4.2.0 - resolution: "smart-buffer@npm:4.2.0" - checksum: 10c0/a16775323e1404dd43fabafe7460be13a471e021637bc7889468eb45ce6a6b207261f454e4e530a19500cc962c4cc5348583520843b363f4193cee5c00e1e539 - languageName: node - linkType: hard - -"sockjs@npm:^0.3.24": - version: 0.3.24 - resolution: "sockjs@npm:0.3.24" - dependencies: - faye-websocket: "npm:^0.11.3" - uuid: "npm:^8.3.2" - websocket-driver: "npm:^0.7.4" - checksum: 10c0/aa102c7d921bf430215754511c81ea7248f2dcdf268fbdb18e4d8183493a86b8793b164c636c52f474a886f747447c962741df2373888823271efdb9d2594f33 - languageName: node - linkType: hard - -"socks-proxy-agent@npm:^8.0.3": - version: 8.0.5 - resolution: "socks-proxy-agent@npm:8.0.5" - dependencies: - agent-base: "npm:^7.1.2" - debug: "npm:^4.3.4" - socks: "npm:^2.8.3" - checksum: 10c0/5d2c6cecba6821389aabf18728325730504bf9bb1d9e342e7987a5d13badd7a98838cc9a55b8ed3cb866ad37cc23e1086f09c4d72d93105ce9dfe76330e9d2a6 - languageName: node - linkType: hard - -"socks@npm:^2.8.3": - version: 2.8.3 - resolution: "socks@npm:2.8.3" - dependencies: - ip-address: "npm:^9.0.5" - smart-buffer: "npm:^4.2.0" - checksum: 10c0/d54a52bf9325165770b674a67241143a3d8b4e4c8884560c4e0e078aace2a728dffc7f70150660f51b85797c4e1a3b82f9b7aa25e0a0ceae1a243365da5c51a7 - languageName: node - linkType: hard - -"source-map-js@npm:>=0.6.2 <2.0.0, source-map-js@npm:^1.0.2, source-map-js@npm:^1.2.1": - version: 1.2.1 - resolution: "source-map-js@npm:1.2.1" - checksum: 10c0/7bda1fc4c197e3c6ff17de1b8b2c20e60af81b63a52cb32ec5a5d67a20a7d42651e2cb34ebe93833c5a2a084377e17455854fee3e21e7925c64a51b6a52b0faf - languageName: node - linkType: hard - -"source-map-loader@npm:5.0.0": - version: 5.0.0 - resolution: "source-map-loader@npm:5.0.0" - dependencies: - iconv-lite: "npm:^0.6.3" - source-map-js: "npm:^1.0.2" - peerDependencies: - webpack: ^5.72.1 - checksum: 10c0/104c1c2620903e839adb4ec4f2356aa2184151a465855c9b8357aa4f2d215119b2917404c8746b19dd46fac4f2f0be3f69d56c32cb9ae6ba9b42eddd912944e7 - languageName: node - linkType: hard - -"source-map-support@npm:0.5.21, source-map-support@npm:^0.5.5, source-map-support@npm:~0.5.20": - version: 0.5.21 - resolution: "source-map-support@npm:0.5.21" - dependencies: - buffer-from: "npm:^1.0.0" - source-map: "npm:^0.6.0" - checksum: 10c0/9ee09942f415e0f721d6daad3917ec1516af746a8120bba7bb56278707a37f1eb8642bde456e98454b8a885023af81a16e646869975f06afc1a711fb90484e7d - languageName: node - linkType: hard - -"source-map@npm:0.6.1, source-map@npm:^0.6.0, source-map@npm:~0.6.0": - version: 0.6.1 - resolution: "source-map@npm:0.6.1" - checksum: 10c0/ab55398007c5e5532957cb0beee2368529618ac0ab372d789806f5718123cc4367d57de3904b4e6a4170eb5a0b0f41373066d02ca0735a0c4d75c7d328d3e011 - languageName: node - linkType: hard - -"source-map@npm:0.7.4": - version: 0.7.4 - resolution: "source-map@npm:0.7.4" - checksum: 10c0/dc0cf3768fe23c345ea8760487f8c97ef6fca8a73c83cd7c9bf2fde8bc2c34adb9c0824d6feb14bc4f9e37fb522e18af621543f1289038a66ac7586da29aa7dc - languageName: node - linkType: hard - -"spdx-correct@npm:^3.0.0": - version: 3.2.0 - resolution: "spdx-correct@npm:3.2.0" - dependencies: - spdx-expression-parse: "npm:^3.0.0" - spdx-license-ids: "npm:^3.0.0" - checksum: 10c0/49208f008618b9119208b0dadc9208a3a55053f4fd6a0ae8116861bd22696fc50f4142a35ebfdb389e05ccf2de8ad142573fefc9e26f670522d899f7b2fe7386 - languageName: node - linkType: hard - -"spdx-exceptions@npm:^2.1.0": - version: 2.5.0 - resolution: "spdx-exceptions@npm:2.5.0" - checksum: 10c0/37217b7762ee0ea0d8b7d0c29fd48b7e4dfb94096b109d6255b589c561f57da93bf4e328c0290046115961b9209a8051ad9f525e48d433082fc79f496a4ea940 - languageName: node - linkType: hard - -"spdx-expression-parse@npm:^3.0.0": - version: 3.0.1 - resolution: "spdx-expression-parse@npm:3.0.1" - dependencies: - spdx-exceptions: "npm:^2.1.0" - spdx-license-ids: "npm:^3.0.0" - checksum: 10c0/6f8a41c87759fa184a58713b86c6a8b028250f158159f1d03ed9d1b6ee4d9eefdc74181c8ddc581a341aa971c3e7b79e30b59c23b05d2436d5de1c30bdef7171 - languageName: node - linkType: hard - -"spdx-license-ids@npm:^3.0.0": - version: 3.0.20 - resolution: "spdx-license-ids@npm:3.0.20" - checksum: 10c0/bdff7534fad6ef59be49becda1edc3fb7f5b3d6f296a715516ab9d972b8ad59af2c34b2003e01db8970d4c673d185ff696ba74c6b61d3bf327e2b3eac22c297c - languageName: node - linkType: hard - -"spdy-transport@npm:^3.0.0": - version: 3.0.0 - resolution: "spdy-transport@npm:3.0.0" - dependencies: - debug: "npm:^4.1.0" - detect-node: "npm:^2.0.4" - hpack.js: "npm:^2.1.6" - obuf: "npm:^1.1.2" - readable-stream: "npm:^3.0.6" - wbuf: "npm:^1.7.3" - checksum: 10c0/eaf7440fa90724fffc813c386d4a8a7427d967d6e46d7c51d8f8a533d1a6911b9823ea9218703debbae755337e85f110185d7a00ae22ec5c847077b908ce71bb - languageName: node - linkType: hard - -"spdy@npm:^4.0.2": - version: 4.0.2 - resolution: "spdy@npm:4.0.2" - dependencies: - debug: "npm:^4.1.0" - handle-thing: "npm:^2.0.0" - http-deceiver: "npm:^1.2.7" - select-hose: "npm:^2.0.0" - spdy-transport: "npm:^3.0.0" - checksum: 10c0/983509c0be9d06fd00bb9dff713c5b5d35d3ffd720db869acdd5ad7aa6fc0e02c2318b58f75328957d8ff772acdf1f7d19382b6047df342044ff3e2d6805ccdf - languageName: node - linkType: hard - -"sprintf-js@npm:^1.1.3": - version: 1.1.3 - resolution: "sprintf-js@npm:1.1.3" - checksum: 10c0/09270dc4f30d479e666aee820eacd9e464215cdff53848b443964202bf4051490538e5dd1b42e1a65cf7296916ca17640aebf63dae9812749c7542ee5f288dec - languageName: node - linkType: hard - -"ssri@npm:^12.0.0": - version: 12.0.0 - resolution: "ssri@npm:12.0.0" - dependencies: - minipass: "npm:^7.0.3" - checksum: 10c0/caddd5f544b2006e88fa6b0124d8d7b28208b83c72d7672d5ade44d794525d23b540f3396108c4eb9280dcb7c01f0bef50682f5b4b2c34291f7c5e211fd1417d - languageName: node - linkType: hard - -"statuses@npm:2.0.1": - version: 2.0.1 - resolution: "statuses@npm:2.0.1" - checksum: 10c0/34378b207a1620a24804ce8b5d230fea0c279f00b18a7209646d5d47e419d1cc23e7cbf33a25a1e51ac38973dc2ac2e1e9c647a8e481ef365f77668d72becfd0 - languageName: node - linkType: hard - -"statuses@npm:>= 1.4.0 < 2": - version: 1.5.0 - resolution: "statuses@npm:1.5.0" - checksum: 10c0/e433900956357b3efd79b1c547da4d291799ac836960c016d10a98f6a810b1b5c0dcc13b5a7aa609a58239b5190e1ea176ad9221c2157d2fd1c747393e6b2940 - languageName: node - linkType: hard - -"string-width-cjs@npm:string-width@^4.2.0, string-width@npm:^4.1.0, string-width@npm:^4.2.0, string-width@npm:^4.2.3": - version: 4.2.3 - resolution: "string-width@npm:4.2.3" - dependencies: - emoji-regex: "npm:^8.0.0" - is-fullwidth-code-point: "npm:^3.0.0" - strip-ansi: "npm:^6.0.1" - checksum: 10c0/1e525e92e5eae0afd7454086eed9c818ee84374bb80328fc41217ae72ff5f065ef1c9d7f72da41de40c75fa8bb3dee63d92373fd492c84260a552c636392a47b - languageName: node - linkType: hard - -"string-width@npm:^5.0.1, string-width@npm:^5.1.2": - version: 5.1.2 - resolution: "string-width@npm:5.1.2" - dependencies: - eastasianwidth: "npm:^0.2.0" - emoji-regex: "npm:^9.2.2" - strip-ansi: "npm:^7.0.1" - checksum: 10c0/ab9c4264443d35b8b923cbdd513a089a60de339216d3b0ed3be3ba57d6880e1a192b70ae17225f764d7adbf5994e9bb8df253a944736c15a0240eff553c678ca - languageName: node - linkType: hard - -"string-width@npm:^7.0.0": - version: 7.2.0 - resolution: "string-width@npm:7.2.0" - dependencies: - emoji-regex: "npm:^10.3.0" - get-east-asian-width: "npm:^1.0.0" - strip-ansi: "npm:^7.1.0" - checksum: 10c0/eb0430dd43f3199c7a46dcbf7a0b34539c76fe3aa62763d0b0655acdcbdf360b3f66f3d58ca25ba0205f42ea3491fa00f09426d3b7d3040e506878fc7664c9b9 - languageName: node - linkType: hard - -"string_decoder@npm:^1.1.1": - version: 1.3.0 - resolution: "string_decoder@npm:1.3.0" - dependencies: - safe-buffer: "npm:~5.2.0" - checksum: 10c0/810614ddb030e271cd591935dcd5956b2410dd079d64ff92a1844d6b7588bf992b3e1b69b0f4d34a3e06e0bd73046ac646b5264c1987b20d0601f81ef35d731d - languageName: node - linkType: hard - -"string_decoder@npm:~1.1.1": - version: 1.1.1 - resolution: "string_decoder@npm:1.1.1" - dependencies: - safe-buffer: "npm:~5.1.0" - checksum: 10c0/b4f89f3a92fd101b5653ca3c99550e07bdf9e13b35037e9e2a1c7b47cec4e55e06ff3fc468e314a0b5e80bfbaf65c1ca5a84978764884ae9413bec1fc6ca924e - languageName: node - linkType: hard - -"strip-ansi-cjs@npm:strip-ansi@^6.0.1, strip-ansi@npm:^6.0.0, strip-ansi@npm:^6.0.1": - version: 6.0.1 - resolution: "strip-ansi@npm:6.0.1" - dependencies: - ansi-regex: "npm:^5.0.1" - checksum: 10c0/1ae5f212a126fe5b167707f716942490e3933085a5ff6c008ab97ab2f272c8025d3aa218b7bd6ab25729ca20cc81cddb252102f8751e13482a5199e873680952 - languageName: node - linkType: hard - -"strip-ansi@npm:^7.0.1, strip-ansi@npm:^7.1.0": - version: 7.1.0 - resolution: "strip-ansi@npm:7.1.0" - dependencies: - ansi-regex: "npm:^6.0.1" - checksum: 10c0/a198c3762e8832505328cbf9e8c8381de14a4fa50a4f9b2160138158ea88c0f5549fb50cb13c651c3088f47e63a108b34622ec18c0499b6c8c3a5ddf6b305ac4 - languageName: node - linkType: hard - -"strip-json-comments@npm:3.1.1, strip-json-comments@npm:^3.1.1": - version: 3.1.1 - resolution: "strip-json-comments@npm:3.1.1" - checksum: 10c0/9681a6257b925a7fa0f285851c0e613cc934a50661fa7bb41ca9cbbff89686bb4a0ee366e6ecedc4daafd01e83eee0720111ab294366fe7c185e935475ebcecd - languageName: node - linkType: hard - -"supports-color@npm:^7.1.0": - version: 7.2.0 - resolution: "supports-color@npm:7.2.0" - dependencies: - has-flag: "npm:^4.0.0" - checksum: 10c0/afb4c88521b8b136b5f5f95160c98dee7243dc79d5432db7efc27efb219385bbc7d9427398e43dd6cc730a0f87d5085ce1652af7efbe391327bc0a7d0f7fc124 - languageName: node - linkType: hard - -"supports-color@npm:^8.0.0": - version: 8.1.1 - resolution: "supports-color@npm:8.1.1" - dependencies: - has-flag: "npm:^4.0.0" - checksum: 10c0/ea1d3c275dd604c974670f63943ed9bd83623edc102430c05adb8efc56ba492746b6e95386e7831b872ec3807fd89dd8eb43f735195f37b5ec343e4234cc7e89 - languageName: node - linkType: hard - -"supports-preserve-symlinks-flag@npm:^1.0.0": - version: 1.0.0 - resolution: "supports-preserve-symlinks-flag@npm:1.0.0" - checksum: 10c0/6c4032340701a9950865f7ae8ef38578d8d7053f5e10518076e6554a9381fa91bd9c6850193695c141f32b21f979c985db07265a758867bac95de05f7d8aeb39 - languageName: node - linkType: hard - -"symbol-observable@npm:4.0.0": - version: 4.0.0 - resolution: "symbol-observable@npm:4.0.0" - checksum: 10c0/5e9a3ab08263a6be8cbee76587ad5880dcc62a47002787ed5ebea56b1eb30dc87da6f0183d67e88286806799fbe21c69077fbd677be4be2188e92318d6c6f31d - languageName: node - linkType: hard - -"tapable@npm:^2.1.1, tapable@npm:^2.2.0, tapable@npm:^2.2.1": - version: 2.2.1 - resolution: "tapable@npm:2.2.1" - checksum: 10c0/bc40e6efe1e554d075469cedaba69a30eeb373552aaf41caeaaa45bf56ffacc2674261b106245bd566b35d8f3329b52d838e851ee0a852120acae26e622925c9 - languageName: node - linkType: hard - -"tar@npm:^6.1.11": - version: 6.2.1 - resolution: "tar@npm:6.2.1" - dependencies: - chownr: "npm:^2.0.0" - fs-minipass: "npm:^2.0.0" - minipass: "npm:^5.0.0" - minizlib: "npm:^2.1.1" - mkdirp: "npm:^1.0.3" - yallist: "npm:^4.0.0" - checksum: 10c0/a5eca3eb50bc11552d453488344e6507156b9193efd7635e98e867fab275d527af53d8866e2370cd09dfe74378a18111622ace35af6a608e5223a7d27fe99537 - languageName: node - linkType: hard - -"tar@npm:^7.4.3": - version: 7.4.3 - resolution: "tar@npm:7.4.3" - dependencies: - "@isaacs/fs-minipass": "npm:^4.0.0" - chownr: "npm:^3.0.0" - minipass: "npm:^7.1.2" - minizlib: "npm:^3.0.1" - mkdirp: "npm:^3.0.1" - yallist: "npm:^5.0.0" - checksum: 10c0/d4679609bb2a9b48eeaf84632b6d844128d2412b95b6de07d53d8ee8baf4ca0857c9331dfa510390a0727b550fd543d4d1a10995ad86cdf078423fbb8d99831d - languageName: node - linkType: hard - -"terser-webpack-plugin@npm:^5.3.10": - version: 5.3.11 - resolution: "terser-webpack-plugin@npm:5.3.11" - dependencies: - "@jridgewell/trace-mapping": "npm:^0.3.25" - jest-worker: "npm:^27.4.5" - schema-utils: "npm:^4.3.0" - serialize-javascript: "npm:^6.0.2" - terser: "npm:^5.31.1" - peerDependencies: - webpack: ^5.1.0 - peerDependenciesMeta: - "@swc/core": - optional: true - esbuild: - optional: true - uglify-js: - optional: true - checksum: 10c0/4794274f445dc589f4c113c75a55ce51364ccf09bfe8a545cdb462e3f752bf300ea91f072fa28bbed291bbae03274da06fe4eca180e784fb8a43646aa7dbcaef - languageName: node - linkType: hard - -"terser@npm:5.36.0": - version: 5.36.0 - resolution: "terser@npm:5.36.0" - dependencies: - "@jridgewell/source-map": "npm:^0.3.3" - acorn: "npm:^8.8.2" - commander: "npm:^2.20.0" - source-map-support: "npm:~0.5.20" - bin: - terser: bin/terser - checksum: 10c0/f4ed2bead19f64789ddcfb85b7cef78f3942f967b8890c54f57d1e35bc7d547d551c6a4c32210bce6ba45b1c738314bbfac6acbc6c762a45cd171777d0c120d9 - languageName: node - linkType: hard - -"terser@npm:^5.31.1": - version: 5.37.0 - resolution: "terser@npm:5.37.0" - dependencies: - "@jridgewell/source-map": "npm:^0.3.3" - acorn: "npm:^8.8.2" - commander: "npm:^2.20.0" - source-map-support: "npm:~0.5.20" - bin: - terser: bin/terser - checksum: 10c0/ff0dc79b0a0da821e7f5bf7a047eab6d04e70e88b62339a0f1d71117db3310e255f5c00738fa3b391f56c3571f800a00047720261ba04ced0241c1f9922199f4 - languageName: node - linkType: hard - -"thingies@npm:^1.20.0": - version: 1.21.0 - resolution: "thingies@npm:1.21.0" - peerDependencies: - tslib: ^2 - checksum: 10c0/7570ee855aecb73185a672ecf3eb1c287a6512bf5476449388433b2d4debcf78100bc8bfd439b0edd38d2bc3bfb8341de5ce85b8557dec66d0f27b962c9a8bc1 - languageName: node - linkType: hard - -"thunky@npm:^1.0.2": - version: 1.1.0 - resolution: "thunky@npm:1.1.0" - checksum: 10c0/369764f39de1ce1de2ba2fa922db4a3f92e9c7f33bcc9a713241bc1f4a5238b484c17e0d36d1d533c625efb00e9e82c3e45f80b47586945557b45abb890156d2 - languageName: node - linkType: hard - -"tmp@npm:^0.0.33": - version: 0.0.33 - resolution: "tmp@npm:0.0.33" - dependencies: - os-tmpdir: "npm:~1.0.2" - checksum: 10c0/69863947b8c29cabad43fe0ce65cec5bb4b481d15d4b4b21e036b060b3edbf3bc7a5541de1bacb437bb3f7c4538f669752627fdf9b4aaf034cebd172ba373408 - languageName: node - linkType: hard - -"to-regex-range@npm:^5.0.1": - version: 5.0.1 - resolution: "to-regex-range@npm:5.0.1" - dependencies: - is-number: "npm:^7.0.0" - checksum: 10c0/487988b0a19c654ff3e1961b87f471702e708fa8a8dd02a298ef16da7206692e8552a0250e8b3e8759270f62e9d8314616f6da274734d3b558b1fc7b7724e892 - languageName: node - linkType: hard - -"toidentifier@npm:1.0.1": - version: 1.0.1 - resolution: "toidentifier@npm:1.0.1" - checksum: 10c0/93937279934bd66cc3270016dd8d0afec14fb7c94a05c72dc57321f8bd1fa97e5bea6d1f7c89e728d077ca31ea125b78320a616a6c6cd0e6b9cb94cb864381c1 - languageName: node - linkType: hard - -"tree-dump@npm:^1.0.1": - version: 1.0.2 - resolution: "tree-dump@npm:1.0.2" - peerDependencies: - tslib: 2 - checksum: 10c0/d1d180764e9c691b28332dbd74226c6b6af361dfb1e134bb11e60e17cb11c215894adee50ffc578da5dcf546006693947be8b6665eb1269b56e2f534926f1c1f - languageName: node - linkType: hard - -"tree-kill@npm:1.2.2": - version: 1.2.2 - resolution: "tree-kill@npm:1.2.2" - bin: - tree-kill: cli.js - checksum: 10c0/7b1b7c7f17608a8f8d20a162e7957ac1ef6cd1636db1aba92f4e072dc31818c2ff0efac1e3d91064ede67ed5dc57c565420531a8134090a12ac10cf792ab14d2 - languageName: node - linkType: hard - -"ts-api-utils@npm:^2.0.0": - version: 2.0.0 - resolution: "ts-api-utils@npm:2.0.0" - peerDependencies: - typescript: ">=4.8.4" - checksum: 10c0/6165e29a5b75bd0218e3cb0f9ee31aa893dbd819c2e46dbb086c841121eb0436ed47c2c18a20cb3463d74fd1fb5af62e2604ba5971cc48e5b38ebbdc56746dfc - languageName: node - linkType: hard - -"tslib@npm:2.8.1, tslib@npm:^2.0.0, tslib@npm:^2.1.0, tslib@npm:^2.3.0, tslib@npm:^2.6.0": - version: 2.8.1 - resolution: "tslib@npm:2.8.1" - checksum: 10c0/9c4759110a19c53f992d9aae23aac5ced636e99887b51b9e61def52611732872ff7668757d4e4c61f19691e36f4da981cd9485e869b4a7408d689f6bf1f14e62 - languageName: node - linkType: hard - -"tuf-js@npm:^3.0.1": - version: 3.0.1 - resolution: "tuf-js@npm:3.0.1" - dependencies: - "@tufjs/models": "npm:3.0.1" - debug: "npm:^4.3.6" - make-fetch-happen: "npm:^14.0.1" - checksum: 10c0/4214dd6bb1ec8a6cadbc5690e5a8556de0306f0e95022e54fc7c0ff9dbcc229ab379fd4b048511387f9c0023ea8f8c35acd8f7313f6cbc94a1b8af8b289f62ad - languageName: node - linkType: hard - -"type-check@npm:^0.4.0, type-check@npm:~0.4.0": - version: 0.4.0 - resolution: "type-check@npm:0.4.0" - dependencies: - prelude-ls: "npm:^1.2.1" - checksum: 10c0/7b3fd0ed43891e2080bf0c5c504b418fbb3e5c7b9708d3d015037ba2e6323a28152ec163bcb65212741fa5d2022e3075ac3c76440dbd344c9035f818e8ecee58 - languageName: node - linkType: hard - -"type-fest@npm:^0.21.3": - version: 0.21.3 - resolution: "type-fest@npm:0.21.3" - checksum: 10c0/902bd57bfa30d51d4779b641c2bc403cdf1371fb9c91d3c058b0133694fcfdb817aef07a47f40faf79039eecbaa39ee9d3c532deff244f3a19ce68cea71a61e8 - languageName: node - linkType: hard - -"type-is@npm:~1.6.18": - version: 1.6.18 - resolution: "type-is@npm:1.6.18" - dependencies: - media-typer: "npm:0.3.0" - mime-types: "npm:~2.1.24" - checksum: 10c0/a23daeb538591b7efbd61ecf06b6feb2501b683ffdc9a19c74ef5baba362b4347e42f1b4ed81f5882a8c96a3bfff7f93ce3ffaf0cbbc879b532b04c97a55db9d - languageName: node - linkType: hard - -"typed-assert@npm:^1.0.8": - version: 1.0.9 - resolution: "typed-assert@npm:1.0.9" - checksum: 10c0/9a31b03e6a5f07f13267f34dbbd125274b3b9e5107b906d76b2e401f6f60ebdea01124be8e3c064549938f57ac4e1b4f5a9c04e32bc8974b2f8cc74825e8b83e - languageName: node - linkType: hard - -"typescript@npm:5.6.3": - version: 5.6.3 - resolution: "typescript@npm:5.6.3" - bin: - tsc: bin/tsc - tsserver: bin/tsserver - checksum: 10c0/44f61d3fb15c35359bc60399cb8127c30bae554cd555b8e2b46d68fa79d680354b83320ad419ff1b81a0bdf324197b29affe6cc28988cd6a74d4ac60c94f9799 - languageName: node - linkType: hard - -"typescript@patch:typescript@npm%3A5.6.3#optional!builtin": - version: 5.6.3 - resolution: "typescript@patch:typescript@npm%3A5.6.3#optional!builtin::version=5.6.3&hash=8c6c40" - bin: - tsc: bin/tsc - tsserver: bin/tsserver - checksum: 10c0/7c9d2e07c81226d60435939618c91ec2ff0b75fbfa106eec3430f0fcf93a584bc6c73176676f532d78c3594fe28a54b36eb40b3d75593071a7ec91301533ace7 - languageName: node - linkType: hard - -"undici-types@npm:~6.20.0": - version: 6.20.0 - resolution: "undici-types@npm:6.20.0" - checksum: 10c0/68e659a98898d6a836a9a59e6adf14a5d799707f5ea629433e025ac90d239f75e408e2e5ff086afc3cace26f8b26ee52155293564593fbb4a2f666af57fc59bf - languageName: node - linkType: hard - -"unicode-canonical-property-names-ecmascript@npm:^2.0.0": - version: 2.0.1 - resolution: "unicode-canonical-property-names-ecmascript@npm:2.0.1" - checksum: 10c0/f83bc492fdbe662860795ef37a85910944df7310cac91bd778f1c19ebc911e8b9cde84e703de631e5a2fcca3905e39896f8fc5fc6a44ddaf7f4aff1cda24f381 - languageName: node - linkType: hard - -"unicode-match-property-ecmascript@npm:^2.0.0": - version: 2.0.0 - resolution: "unicode-match-property-ecmascript@npm:2.0.0" - dependencies: - unicode-canonical-property-names-ecmascript: "npm:^2.0.0" - unicode-property-aliases-ecmascript: "npm:^2.0.0" - checksum: 10c0/4d05252cecaf5c8e36d78dc5332e03b334c6242faf7cf16b3658525441386c0a03b5f603d42cbec0f09bb63b9fd25c9b3b09667aee75463cac3efadae2cd17ec - languageName: node - linkType: hard - -"unicode-match-property-value-ecmascript@npm:^2.1.0": - version: 2.2.0 - resolution: "unicode-match-property-value-ecmascript@npm:2.2.0" - checksum: 10c0/1d0a2deefd97974ddff5b7cb84f9884177f4489928dfcebb4b2b091d6124f2739df51fc6ea15958e1b5637ac2a24cff9bf21ea81e45335086ac52c0b4c717d6d - languageName: node - linkType: hard - -"unicode-property-aliases-ecmascript@npm:^2.0.0": - version: 2.1.0 - resolution: "unicode-property-aliases-ecmascript@npm:2.1.0" - checksum: 10c0/50ded3f8c963c7785e48c510a3b7c6bc4e08a579551489aa0349680a35b1ceceec122e33b2b6c1b579d0be2250f34bb163ac35f5f8695fe10bbc67fb757f0af8 - languageName: node - linkType: hard - -"unicorn-magic@npm:^0.1.0": - version: 0.1.0 - resolution: "unicorn-magic@npm:0.1.0" - checksum: 10c0/e4ed0de05b0a05e735c7d8a2930881e5efcfc3ec897204d5d33e7e6247f4c31eac92e383a15d9a6bccb7319b4271ee4bea946e211bf14951fec6ff2cbbb66a92 - languageName: node - linkType: hard - -"unique-filename@npm:^4.0.0": - version: 4.0.0 - resolution: "unique-filename@npm:4.0.0" - dependencies: - unique-slug: "npm:^5.0.0" - checksum: 10c0/38ae681cceb1408ea0587b6b01e29b00eee3c84baee1e41fd5c16b9ed443b80fba90c40e0ba69627e30855570a34ba8b06702d4a35035d4b5e198bf5a64c9ddc - languageName: node - linkType: hard - -"unique-slug@npm:^5.0.0": - version: 5.0.0 - resolution: "unique-slug@npm:5.0.0" - dependencies: - imurmurhash: "npm:^0.1.4" - checksum: 10c0/d324c5a44887bd7e105ce800fcf7533d43f29c48757ac410afd42975de82cc38ea2035c0483f4de82d186691bf3208ef35c644f73aa2b1b20b8e651be5afd293 - languageName: node - linkType: hard - -"unpipe@npm:1.0.0, unpipe@npm:~1.0.0": - version: 1.0.0 - resolution: "unpipe@npm:1.0.0" - checksum: 10c0/193400255bd48968e5c5383730344fbb4fa114cdedfab26e329e50dd2d81b134244bb8a72c6ac1b10ab0281a58b363d06405632c9d49ca9dfd5e90cbd7d0f32c - languageName: node - linkType: hard - -"update-browserslist-db@npm:^1.1.1": - version: 1.1.2 - resolution: "update-browserslist-db@npm:1.1.2" - dependencies: - escalade: "npm:^3.2.0" - picocolors: "npm:^1.1.1" - peerDependencies: - browserslist: ">= 4.21.0" - bin: - update-browserslist-db: cli.js - checksum: 10c0/9cb353998d6d7d6ba1e46b8fa3db888822dd972212da4eda609d185eb5c3557a93fd59780ceb757afd4d84240518df08542736969e6a5d6d6ce2d58e9363aac6 - languageName: node - linkType: hard - -"uri-js@npm:^4.2.2": - version: 4.4.1 - resolution: "uri-js@npm:4.4.1" - dependencies: - punycode: "npm:^2.1.0" - checksum: 10c0/4ef57b45aa820d7ac6496e9208559986c665e49447cb072744c13b66925a362d96dd5a46c4530a6b8e203e5db5fe849369444440cb22ecfc26c679359e5dfa3c - languageName: node - linkType: hard - -"util-deprecate@npm:^1.0.1, util-deprecate@npm:^1.0.2, util-deprecate@npm:~1.0.1": - version: 1.0.2 - resolution: "util-deprecate@npm:1.0.2" - checksum: 10c0/41a5bdd214df2f6c3ecf8622745e4a366c4adced864bc3c833739791aeeeb1838119af7daed4ba36428114b5c67dcda034a79c882e97e43c03e66a4dd7389942 - languageName: node - linkType: hard - -"utils-merge@npm:1.0.1": - version: 1.0.1 - resolution: "utils-merge@npm:1.0.1" - checksum: 10c0/02ba649de1b7ca8854bfe20a82f1dfbdda3fb57a22ab4a8972a63a34553cf7aa51bc9081cf7e001b035b88186d23689d69e71b510e610a09a4c66f68aa95b672 - languageName: node - linkType: hard - -"uuid@npm:^11.0.5": - version: 11.0.5 - resolution: "uuid@npm:11.0.5" - bin: - uuid: dist/esm/bin/uuid - checksum: 10c0/6f59f0c605e02c14515401084ca124b9cb462b4dcac866916a49862bcf831874508a308588c23a7718269226ad11a92da29b39d761ad2b86e736623e3a33b6e7 - languageName: node - linkType: hard - -"uuid@npm:^8.3.2": - version: 8.3.2 - resolution: "uuid@npm:8.3.2" - bin: - uuid: dist/bin/uuid - checksum: 10c0/bcbb807a917d374a49f475fae2e87fdca7da5e5530820ef53f65ba1d12131bd81a92ecf259cc7ce317cbe0f289e7d79fdfebcef9bfa3087c8c8a2fa304c9be54 - languageName: node - linkType: hard - -"validate-npm-package-license@npm:^3.0.4": - version: 3.0.4 - resolution: "validate-npm-package-license@npm:3.0.4" - dependencies: - spdx-correct: "npm:^3.0.0" - spdx-expression-parse: "npm:^3.0.0" - checksum: 10c0/7b91e455a8de9a0beaa9fe961e536b677da7f48c9a493edf4d4d4a87fd80a7a10267d438723364e432c2fcd00b5650b5378275cded362383ef570276e6312f4f - languageName: node - linkType: hard - -"validate-npm-package-name@npm:^6.0.0": - version: 6.0.0 - resolution: "validate-npm-package-name@npm:6.0.0" - checksum: 10c0/35d1896d90a4f00291cfc17077b553910d45018b3562841acc6471731794eeebe39b409f678e8c1fee8ef1786e087cac8dea19abdd43649c30fd0b9c752afa2f - languageName: node - linkType: hard - -"vary@npm:~1.1.2": - version: 1.1.2 - resolution: "vary@npm:1.1.2" - checksum: 10c0/f15d588d79f3675135ba783c91a4083dcd290a2a5be9fcb6514220a1634e23df116847b1cc51f66bfb0644cf9353b2abb7815ae499bab06e46dd33c1a6bf1f4f - languageName: node - linkType: hard - -"vite@npm:5.4.11": - version: 5.4.11 - resolution: "vite@npm:5.4.11" - dependencies: - esbuild: "npm:^0.21.3" - fsevents: "npm:~2.3.3" - postcss: "npm:^8.4.43" - rollup: "npm:^4.20.0" - peerDependencies: - "@types/node": ^18.0.0 || >=20.0.0 - less: "*" - lightningcss: ^1.21.0 - sass: "*" - sass-embedded: "*" - stylus: "*" - sugarss: "*" - terser: ^5.4.0 - dependenciesMeta: - fsevents: - optional: true - peerDependenciesMeta: - "@types/node": - optional: true - less: - optional: true - lightningcss: - optional: true - sass: - optional: true - sass-embedded: - optional: true - stylus: - optional: true - sugarss: - optional: true - terser: - optional: true - bin: - vite: bin/vite.js - checksum: 10c0/d536bb7af57dd0eca2a808f95f5ff1d7b7ffb8d86e17c6893087680a0448bd0d15e07475270c8a6de65cb5115592d037130a1dd979dc76bcef8c1dda202a1874 - languageName: node - linkType: hard - -"watchpack@npm:2.4.2, watchpack@npm:^2.4.1": - version: 2.4.2 - resolution: "watchpack@npm:2.4.2" - dependencies: - glob-to-regexp: "npm:^0.4.1" - graceful-fs: "npm:^4.1.2" - checksum: 10c0/ec60a5f0e9efaeca0102fd9126346b3b2d523e01c34030d3fddf5813a7125765121ebdc2552981136dcd2c852deb1af0b39340f2fcc235f292db5399d0283577 - languageName: node - linkType: hard - -"wbuf@npm:^1.1.0, wbuf@npm:^1.7.3": - version: 1.7.3 - resolution: "wbuf@npm:1.7.3" - dependencies: - minimalistic-assert: "npm:^1.0.0" - checksum: 10c0/56edcc5ef2b3d30913ba8f1f5cccc364d180670b24d5f3f8849c1e6fb514e5c7e3a87548ae61227a82859eba6269c11393ae24ce12a2ea1ecb9b465718ddced7 - languageName: node - linkType: hard - -"wcwidth@npm:^1.0.1": - version: 1.0.1 - resolution: "wcwidth@npm:1.0.1" - dependencies: - defaults: "npm:^1.0.3" - checksum: 10c0/5b61ca583a95e2dd85d7078400190efd452e05751a64accb8c06ce4db65d7e0b0cde9917d705e826a2e05cc2548f61efde115ffa374c3e436d04be45c889e5b4 - languageName: node - linkType: hard - -"weak-lru-cache@npm:^1.2.2": - version: 1.2.2 - resolution: "weak-lru-cache@npm:1.2.2" - checksum: 10c0/744847bd5b96ca86db1cb40d0aea7e92c02bbdb05f501181bf9c581e82fa2afbda32a327ffbe75749302b8492ab449f1c657ca02410d725f5d412d1e6c607d72 - languageName: node - linkType: hard - -"webpack-dev-middleware@npm:7.4.2, webpack-dev-middleware@npm:^7.4.2": - version: 7.4.2 - resolution: "webpack-dev-middleware@npm:7.4.2" - dependencies: - colorette: "npm:^2.0.10" - memfs: "npm:^4.6.0" - mime-types: "npm:^2.1.31" - on-finished: "npm:^2.4.1" - range-parser: "npm:^1.2.1" - schema-utils: "npm:^4.0.0" - peerDependencies: - webpack: ^5.0.0 - peerDependenciesMeta: - webpack: - optional: true - checksum: 10c0/2aa873ef57a7095d7fba09400737b6066adc3ded229fd6eba89a666f463c2614c68e01ae58f662c9cdd74f0c8da088523d972329bf4a054e470bc94feb8bcad0 - languageName: node - linkType: hard - -"webpack-dev-server@npm:5.1.0": - version: 5.1.0 - resolution: "webpack-dev-server@npm:5.1.0" - dependencies: - "@types/bonjour": "npm:^3.5.13" - "@types/connect-history-api-fallback": "npm:^1.5.4" - "@types/express": "npm:^4.17.21" - "@types/serve-index": "npm:^1.9.4" - "@types/serve-static": "npm:^1.15.5" - "@types/sockjs": "npm:^0.3.36" - "@types/ws": "npm:^8.5.10" - ansi-html-community: "npm:^0.0.8" - bonjour-service: "npm:^1.2.1" - chokidar: "npm:^3.6.0" - colorette: "npm:^2.0.10" - compression: "npm:^1.7.4" - connect-history-api-fallback: "npm:^2.0.0" - express: "npm:^4.19.2" - graceful-fs: "npm:^4.2.6" - html-entities: "npm:^2.4.0" - http-proxy-middleware: "npm:^2.0.3" - ipaddr.js: "npm:^2.1.0" - launch-editor: "npm:^2.6.1" - open: "npm:^10.0.3" - p-retry: "npm:^6.2.0" - schema-utils: "npm:^4.2.0" - selfsigned: "npm:^2.4.1" - serve-index: "npm:^1.9.1" - sockjs: "npm:^0.3.24" - spdy: "npm:^4.0.2" - webpack-dev-middleware: "npm:^7.4.2" - ws: "npm:^8.18.0" - peerDependencies: - webpack: ^5.0.0 - peerDependenciesMeta: - webpack: - optional: true - webpack-cli: - optional: true - bin: - webpack-dev-server: bin/webpack-dev-server.js - checksum: 10c0/303c72b743d649dec706aedaeea2f0e924e3fb4432aa5a1e43f807e7c6052817027ccf33f88adb566fa7ebf89f6aed551ce2c2d76b5ccaaaefade83fde7f7a38 - languageName: node - linkType: hard - -"webpack-merge@npm:6.0.1": - version: 6.0.1 - resolution: "webpack-merge@npm:6.0.1" - dependencies: - clone-deep: "npm:^4.0.1" - flat: "npm:^5.0.2" - wildcard: "npm:^2.0.1" - checksum: 10c0/bf1429567858b353641801b8a2696ca0aac270fc8c55d4de8a7b586fe07d27fdcfc83099a98ab47e6162383db8dd63bb8cc25b1beb2ec82150422eec843b0dc0 - languageName: node - linkType: hard - -"webpack-sources@npm:^3.0.0, webpack-sources@npm:^3.2.3": - version: 3.2.3 - resolution: "webpack-sources@npm:3.2.3" - checksum: 10c0/2ef63d77c4fad39de4a6db17323d75eb92897b32674e97d76f0a1e87c003882fc038571266ad0ef581ac734cbe20952912aaa26155f1905e96ce251adbb1eb4e - languageName: node - linkType: hard - -"webpack-subresource-integrity@npm:5.1.0": - version: 5.1.0 - resolution: "webpack-subresource-integrity@npm:5.1.0" - dependencies: - typed-assert: "npm:^1.0.8" - peerDependencies: - html-webpack-plugin: ">= 5.0.0-beta.1 < 6" - webpack: ^5.12.0 - peerDependenciesMeta: - html-webpack-plugin: - optional: true - checksum: 10c0/7def5d995a43fc5e60097084e68145359fbeb47b96cb9c87ee811d70c5eb99766c28974ef28f09ae6b1d1b3cd2b7c35838b36206f1c39d090a8f531cd1fbbf6a - languageName: node - linkType: hard - -"webpack@npm:5.96.1": - version: 5.96.1 - resolution: "webpack@npm:5.96.1" - dependencies: - "@types/eslint-scope": "npm:^3.7.7" - "@types/estree": "npm:^1.0.6" - "@webassemblyjs/ast": "npm:^1.12.1" - "@webassemblyjs/wasm-edit": "npm:^1.12.1" - "@webassemblyjs/wasm-parser": "npm:^1.12.1" - acorn: "npm:^8.14.0" - browserslist: "npm:^4.24.0" - chrome-trace-event: "npm:^1.0.2" - enhanced-resolve: "npm:^5.17.1" - es-module-lexer: "npm:^1.2.1" - eslint-scope: "npm:5.1.1" - events: "npm:^3.2.0" - glob-to-regexp: "npm:^0.4.1" - graceful-fs: "npm:^4.2.11" - json-parse-even-better-errors: "npm:^2.3.1" - loader-runner: "npm:^4.2.0" - mime-types: "npm:^2.1.27" - neo-async: "npm:^2.6.2" - schema-utils: "npm:^3.2.0" - tapable: "npm:^2.1.1" - terser-webpack-plugin: "npm:^5.3.10" - watchpack: "npm:^2.4.1" - webpack-sources: "npm:^3.2.3" - peerDependenciesMeta: - webpack-cli: - optional: true - bin: - webpack: bin/webpack.js - checksum: 10c0/ae6052fde9a546f79f14987b65823ba4024c6642a8489339ecfee7a351dff93325842aad453295bbdc6b65fb1690e4ef07529db63aa84ece55c7869e991a0039 - languageName: node - linkType: hard - -"websocket-driver@npm:>=0.5.1, websocket-driver@npm:^0.7.4": - version: 0.7.4 - resolution: "websocket-driver@npm:0.7.4" - dependencies: - http-parser-js: "npm:>=0.5.1" - safe-buffer: "npm:>=5.1.0" - websocket-extensions: "npm:>=0.1.1" - checksum: 10c0/5f09547912b27bdc57bac17b7b6527d8993aa4ac8a2d10588bb74aebaf785fdcf64fea034aae0c359b7adff2044dd66f3d03866e4685571f81b13e548f9021f1 - languageName: node - linkType: hard - -"websocket-extensions@npm:>=0.1.1": - version: 0.1.4 - resolution: "websocket-extensions@npm:0.1.4" - checksum: 10c0/bbc8c233388a0eb8a40786ee2e30d35935cacbfe26ab188b3e020987e85d519c2009fe07cfc37b7f718b85afdba7e54654c9153e6697301f72561bfe429177e0 - languageName: node - linkType: hard - -"which@npm:^2.0.1": - version: 2.0.2 - resolution: "which@npm:2.0.2" - dependencies: - isexe: "npm:^2.0.0" - bin: - node-which: ./bin/node-which - checksum: 10c0/66522872a768b60c2a65a57e8ad184e5372f5b6a9ca6d5f033d4b0dc98aff63995655a7503b9c0a2598936f532120e81dd8cc155e2e92ed662a2b9377cc4374f - languageName: node - linkType: hard - -"which@npm:^5.0.0": - version: 5.0.0 - resolution: "which@npm:5.0.0" - dependencies: - isexe: "npm:^3.1.1" - bin: - node-which: bin/which.js - checksum: 10c0/e556e4cd8b7dbf5df52408c9a9dd5ac6518c8c5267c8953f5b0564073c66ed5bf9503b14d876d0e9c7844d4db9725fb0dcf45d6e911e17e26ab363dc3965ae7b - languageName: node - linkType: hard - -"wildcard@npm:^2.0.1": - version: 2.0.1 - resolution: "wildcard@npm:2.0.1" - checksum: 10c0/08f70cd97dd9a20aea280847a1fe8148e17cae7d231640e41eb26d2388697cbe65b67fd9e68715251c39b080c5ae4f76d71a9a69fa101d897273efdfb1b58bf7 - languageName: node - linkType: hard - -"word-wrap@npm:^1.2.5": - version: 1.2.5 - resolution: "word-wrap@npm:1.2.5" - checksum: 10c0/e0e4a1ca27599c92a6ca4c32260e8a92e8a44f4ef6ef93f803f8ed823f486e0889fc0b93be4db59c8d51b3064951d25e43d434e95dc8c960cc3a63d65d00ba20 - languageName: node - linkType: hard - -"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0, wrap-ansi@npm:^7.0.0": - version: 7.0.0 - resolution: "wrap-ansi@npm:7.0.0" - dependencies: - ansi-styles: "npm:^4.0.0" - string-width: "npm:^4.1.0" - strip-ansi: "npm:^6.0.0" - checksum: 10c0/d15fc12c11e4cbc4044a552129ebc75ee3f57aa9c1958373a4db0292d72282f54373b536103987a4a7594db1ef6a4f10acf92978f79b98c49306a4b58c77d4da - languageName: node - linkType: hard - -"wrap-ansi@npm:^6.2.0": - version: 6.2.0 - resolution: "wrap-ansi@npm:6.2.0" - dependencies: - ansi-styles: "npm:^4.0.0" - string-width: "npm:^4.1.0" - strip-ansi: "npm:^6.0.0" - checksum: 10c0/baad244e6e33335ea24e86e51868fe6823626e3a3c88d9a6674642afff1d34d9a154c917e74af8d845fd25d170c4ea9cf69a47133c3f3656e1252b3d462d9f6c - languageName: node - linkType: hard - -"wrap-ansi@npm:^8.1.0": - version: 8.1.0 - resolution: "wrap-ansi@npm:8.1.0" - dependencies: - ansi-styles: "npm:^6.1.0" - string-width: "npm:^5.0.1" - strip-ansi: "npm:^7.0.1" - checksum: 10c0/138ff58a41d2f877eae87e3282c0630fc2789012fc1af4d6bd626eeb9a2f9a65ca92005e6e69a75c7b85a68479fe7443c7dbe1eb8fbaa681a4491364b7c55c60 - languageName: node - linkType: hard - -"wrap-ansi@npm:^9.0.0": - version: 9.0.0 - resolution: "wrap-ansi@npm:9.0.0" - dependencies: - ansi-styles: "npm:^6.2.1" - string-width: "npm:^7.0.0" - strip-ansi: "npm:^7.1.0" - checksum: 10c0/a139b818da9573677548dd463bd626a5a5286271211eb6e4e82f34a4f643191d74e6d4a9bb0a3c26ec90e6f904f679e0569674ac099ea12378a8b98e20706066 - languageName: node - linkType: hard - -"ws@npm:^8.18.0": - version: 8.18.0 - resolution: "ws@npm:8.18.0" - peerDependencies: - bufferutil: ^4.0.1 - utf-8-validate: ">=5.0.2" - peerDependenciesMeta: - bufferutil: - optional: true - utf-8-validate: - optional: true - checksum: 10c0/25eb33aff17edcb90721ed6b0eb250976328533ad3cd1a28a274bd263682e7296a6591ff1436d6cbc50fa67463158b062f9d1122013b361cec99a05f84680e06 - languageName: node - linkType: hard - -"y18n@npm:^5.0.5": - version: 5.0.8 - resolution: "y18n@npm:5.0.8" - checksum: 10c0/4df2842c36e468590c3691c894bc9cdbac41f520566e76e24f59401ba7d8b4811eb1e34524d57e54bc6d864bcb66baab7ffd9ca42bf1eda596618f9162b91249 - languageName: node - linkType: hard - -"yallist@npm:^3.0.2": - version: 3.1.1 - resolution: "yallist@npm:3.1.1" - checksum: 10c0/c66a5c46bc89af1625476f7f0f2ec3653c1a1791d2f9407cfb4c2ba812a1e1c9941416d71ba9719876530e3340a99925f697142989371b72d93b9ee628afd8c1 - languageName: node - linkType: hard - -"yallist@npm:^4.0.0": - version: 4.0.0 - resolution: "yallist@npm:4.0.0" - checksum: 10c0/2286b5e8dbfe22204ab66e2ef5cc9bbb1e55dfc873bbe0d568aa943eb255d131890dfd5bf243637273d31119b870f49c18fcde2c6ffbb7a7a092b870dc90625a - languageName: node - linkType: hard - -"yallist@npm:^5.0.0": - version: 5.0.0 - resolution: "yallist@npm:5.0.0" - checksum: 10c0/a499c81ce6d4a1d260d4ea0f6d49ab4da09681e32c3f0472dee16667ed69d01dae63a3b81745a24bd78476ec4fcf856114cb4896ace738e01da34b2c42235416 - languageName: node - linkType: hard - -"yargs-parser@npm:^21.1.1": - version: 21.1.1 - resolution: "yargs-parser@npm:21.1.1" - checksum: 10c0/f84b5e48169479d2f402239c59f084cfd1c3acc197a05c59b98bab067452e6b3ea46d4dd8ba2985ba7b3d32a343d77df0debd6b343e5dae3da2aab2cdf5886b2 - languageName: node - linkType: hard - -"yargs@npm:17.7.2, yargs@npm:^17.2.1": - version: 17.7.2 - resolution: "yargs@npm:17.7.2" - dependencies: - cliui: "npm:^8.0.1" - escalade: "npm:^3.1.1" - get-caller-file: "npm:^2.0.5" - require-directory: "npm:^2.1.1" - string-width: "npm:^4.2.3" - y18n: "npm:^5.0.5" - yargs-parser: "npm:^21.1.1" - checksum: 10c0/ccd7e723e61ad5965fffbb791366db689572b80cca80e0f96aad968dfff4156cd7cd1ad18607afe1046d8241e6fb2d6c08bf7fa7bfb5eaec818735d8feac8f05 - languageName: node - linkType: hard - -"yocto-queue@npm:^0.1.0": - version: 0.1.0 - resolution: "yocto-queue@npm:0.1.0" - checksum: 10c0/dceb44c28578b31641e13695d200d34ec4ab3966a5729814d5445b194933c096b7ced71494ce53a0e8820685d1d010df8b2422e5bf2cdea7e469d97ffbea306f - languageName: node - linkType: hard - -"yocto-queue@npm:^1.0.0": - version: 1.1.1 - resolution: "yocto-queue@npm:1.1.1" - checksum: 10c0/cb287fe5e6acfa82690acb43c283de34e945c571a78a939774f6eaba7c285bacdf6c90fbc16ce530060863984c906d2b4c6ceb069c94d1e0a06d5f2b458e2a92 - languageName: node - linkType: hard - -"yoctocolors-cjs@npm:^2.1.2": - version: 2.1.2 - resolution: "yoctocolors-cjs@npm:2.1.2" - checksum: 10c0/a0e36eb88fea2c7981eab22d1ba45e15d8d268626e6c4143305e2c1628fa17ebfaa40cd306161a8ce04c0a60ee0262058eab12567493d5eb1409780853454c6f - languageName: node - linkType: hard - -"zone.js@npm:^0.15.0": - version: 0.15.0 - resolution: "zone.js@npm:0.15.0" - checksum: 10c0/981b664c1978759a2854f6e6692d245d1d6334c6b20b7e2e5fa9b60eed74743b29c6a71f7472dc6d2790ab53d67e30475bcd92b9f7664e50aef8bbcd40379552 - languageName: node - linkType: hard diff --git a/application/holder/.eslintrc.json b/application/holder/.eslintrc.json deleted file mode 100644 index d9eff381d9..0000000000 --- a/application/holder/.eslintrc.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "env": { - "node": true, - "browser": false, - "es2021": true - }, - "extends": [ - "eslint:recommended", - "plugin:@typescript-eslint/eslint-recommended", - "plugin:@typescript-eslint/recommended" - ], - "parser": "@typescript-eslint/parser", - "parserOptions": { - "ecmaVersion": "latest", - "sourceType": "module" - }, - "plugins": ["@typescript-eslint"], - "rules": { - "@typescript-eslint/no-unused-vars": [ - "error", - { - "argsIgnorePattern": "^_", - "varsIgnorePattern": "^_" - } - ], - "@typescript-eslint/no-unsafe-declaration-merging": "off", - "no-empty-interface": 0, - "@typescript-eslint/no-empty-interface": [ - "error", - { - "allowSingleExtends": true - } - ] - } -} diff --git a/application/holder/.yarnrc.yml b/application/holder/.yarnrc.yml deleted file mode 100644 index 3186f3f079..0000000000 --- a/application/holder/.yarnrc.yml +++ /dev/null @@ -1 +0,0 @@ -nodeLinker: node-modules diff --git a/application/holder/electron.config.darwin.arm64.json b/application/holder/electron.config.darwin.arm64.json deleted file mode 100644 index 7dbbfea6ec..0000000000 --- a/application/holder/electron.config.darwin.arm64.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "asar": true, - "appId": "com.esrlabs.chipmunk", - "productName": "chipmunk", - "copyright": "Copyright © 2022 year ESR Labs", - "files": [ - "./dist/**", - "./resources/**", - "!**/node_modules/electron/**", - "!**/node_modules/rustcore/{src,spec,.yarn}/**", - "!**/node_modules/rustcore/{.yarnrc.yml,.eslintrc.json,eslint.config.mjs,launch.json,tsconfig.json}" - ], - "extraFiles": [ - { - "from": "../apps/precompiled/updater/target/release", - "to": "Resources/bin", - "filter": ["updater", "updater.exe"] - } - ], - "directories": { - "output": "release", - "buildResources": "resources" - }, - "asarUnpack": ["resources"], - "npmRebuild": true, - "mac": { - "category": "public.app-category.developer-tools", - "icon": "resources/mac/chipmunk.icns", - "target": [], - "binaries": [ - "./release/mac-arm64/chipmunk.app/Contents/Resources/bin/updater" - ], - "extendInfo": { - "NSCameraUsageDescription": "", - "NSMicrophoneUsageDescription": "" - }, - "hardenedRuntime": true, - "gatekeeperAssess": false, - "entitlements": "./resources/mac/entitlements.mac.plist", - "entitlementsInherit": "./resources/mac/entitlements.mac.plist" - } -} diff --git a/application/holder/electron.config.darwin.x86.json b/application/holder/electron.config.darwin.x86.json deleted file mode 100644 index 2102df393b..0000000000 --- a/application/holder/electron.config.darwin.x86.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "asar": true, - "appId": "com.esrlabs.chipmunk", - "productName": "chipmunk", - "copyright": "Copyright © 2022 year ESR Labs", - "files": [ - "./dist/**", - "./resources/**", - "!**/node_modules/electron/**", - "!**/node_modules/rustcore/{src,spec,.yarn}/**", - "!**/node_modules/rustcore/{.yarnrc.yml,.eslintrc.json,eslint.config.mjs,launch.json,tsconfig.json}" - ], - "extraFiles": [ - { - "from": "../apps/precompiled/updater/target/release", - "to": "Resources/bin", - "filter": ["updater", "updater.exe"] - } - ], - "directories": { - "output": "release", - "buildResources": "resources" - }, - "asarUnpack": ["resources"], - "npmRebuild": true, - "mac": { - "category": "public.app-category.developer-tools", - "icon": "resources/mac/chipmunk.icns", - "target": [], - "binaries": [ - "./release/mac/chipmunk.app/Contents/Resources/bin/updater" - ], - "extendInfo": { - "NSCameraUsageDescription": "", - "NSMicrophoneUsageDescription": "" - }, - "hardenedRuntime": true, - "gatekeeperAssess": false, - "entitlements": "./resources/mac/entitlements.mac.plist", - "entitlementsInherit": "./resources/mac/entitlements.mac.plist" - } -} diff --git a/application/holder/electron.config.linux.json b/application/holder/electron.config.linux.json deleted file mode 100644 index 4b93bdaa3e..0000000000 --- a/application/holder/electron.config.linux.json +++ /dev/null @@ -1,50 +0,0 @@ -{ - "asar": true, - "appId": "com.esrlabs.chipmunk", - "productName": "chipmunk", - "copyright": "Copyright © 2022 year ESR Labs", - "files": [ - "./dist/**", - "./resources/**", - "!**/node_modules/electron/**", - "!**/node_modules/rustcore/{src,spec,.yarn}/**", - "!**/node_modules/rustcore/{.yarnrc.yml,.eslintrc.json,eslint.config.mjs,launch.json,tsconfig.json}" - ], - "extraFiles": [ - { - "from": "../apps/precompiled/updater/target/release", - "to": "Resources/bin", - "filter": ["updater", "updater.exe"] - } - ], - "directories": { - "output": "release", - "buildResources": "resources" - }, - "asarUnpack": ["resources"], - "npmRebuild": true, - "linux": { - "icon": "resources/icons/png/256.png", - "executableName": "chipmunk", - "desktop": { - "entry": { - "Name": "Chipmunk", - "Comment": "Log viewer tool", - "GenericName": "Log viewer tool", - "Exec": "chipmunk %f", - "Icon": "chipmunk", - "Type": "Application", - "Categories": "Utility;Tools;", - "Keywords": "chipmunk;" - }, - "desktopActions": { - "new-empty-window": { - "Name": "New Empty Window", - "Exec": "chipmunk %f", - "Icon": "chipmunk" - } - } - }, - "target": [] - } -} diff --git a/application/holder/electron.config.win.json b/application/holder/electron.config.win.json deleted file mode 100644 index 763d35a98f..0000000000 --- a/application/holder/electron.config.win.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "asar": true, - "appId": "com.esrlabs.chipmunk", - "productName": "chipmunk", - "copyright": "Copyright © 2022 year ESR Labs", - "files": [ - "./dist/**", - "./resources/**", - "!**/node_modules/electron/**", - "!**/node_modules/rustcore/{src,spec,.yarn}/**", - "!**/node_modules/rustcore/{.yarnrc.yml,.eslintrc.json,eslint.config.mjs,launch.json,tsconfig.json}" - ], - "extraFiles": [ - { - "from": "../apps/precompiled/updater/target/release", - "to": "Resources/bin", - "filter": ["updater", "updater.exe"] - } - ], - "directories": { - "output": "release", - "buildResources": "resources" - }, - "asarUnpack": ["resources"], - "npmRebuild": true, - "win": { - "icon": "resources/win/chipmunk.ico", - "target": [] - } -} diff --git a/application/holder/eslint.config.mjs b/application/holder/eslint.config.mjs deleted file mode 100644 index 717e3ceb57..0000000000 --- a/application/holder/eslint.config.mjs +++ /dev/null @@ -1,51 +0,0 @@ -import typescriptEslint from "@typescript-eslint/eslint-plugin"; -import globals from "globals"; -import tsParser from "@typescript-eslint/parser"; -import path from "node:path"; -import { fileURLToPath } from "node:url"; -import js from "@eslint/js"; -import { FlatCompat } from "@eslint/eslintrc"; - -const __filename = fileURLToPath(import.meta.url); -const __dirname = path.dirname(__filename); -const compat = new FlatCompat({ - baseDirectory: __dirname, - recommendedConfig: js.configs.recommended, - allConfig: js.configs.all -}); - -export default [{ - ignores: ["dist/**/*"], -}, ...compat.extends("eslint:recommended", "plugin:@typescript-eslint/recommended"), { - plugins: { - "@typescript-eslint": typescriptEslint, - }, - - languageOptions: { - globals: { - ...globals.browser, - }, - - parser: tsParser, - ecmaVersion: "latest", - sourceType: "module", - }, - - rules: { - "no-control-regex": "off", - - "@typescript-eslint/no-unused-vars": ["error", { - "argsIgnorePattern": "^_", - "varsIgnorePattern": "^_", - "caughtErrorsIgnorePattern": "^_" - }], - "@typescript-eslint/no-this-alias": "off", - "@typescript-eslint/no-explicit-any": "off", - "@typescript-eslint/no-empty-interface": "off", - "@typescript-eslint/no-inferrable-types": "off", - "@typescript-eslint/no-unsafe-declaration-merging": "off", - "@typescript-eslint/no-unused-expressions": "off", - "@typescript-eslint/no-empty-object-type": "off" - - }, -}]; \ No newline at end of file diff --git a/application/holder/package.json b/application/holder/package.json deleted file mode 100644 index c88f068cd3..0000000000 --- a/application/holder/package.json +++ /dev/null @@ -1,75 +0,0 @@ -{ - "name": "chipmunk", - "version": "3.19.6", - "chipmunk": { - "versions": {} - }, - "description": "LogViewer Tool", - "author": { - "name": "Oliver Mueller", - "email": "oliver.mueller@esrlabs.com", - "url": "https://www.esrlabs.com/" - }, - "repository": { - "type": "git", - "url": "https://github.com/esrlabs/chipmunk.git" - }, - "contributors": [ - { - "name": "Dmitry Astafyev", - "email": "dmitry.astafyev@esrlabs.com", - "url": "https://www.esrlabs.com/" - } - ], - "main": "./dist/app.js", - "copyright": "Copyright © 2023 year ESR Labs", - "dependencies": { - "commander": "^13.1.0", - "glob": "^11.0.1", - "http-proxy-agent": "^7.0.2", - "https-proxy-agent": "^7.0.6", - "mime-types": "^3.0.1", - "module-alias": "^2.2.3", - "moment-timezone": "^0.5.46", - "platform": "link:../platform", - "rustcore": "link:../apps/rustcore/ts-bindings", - "semver": "^7.5.2", - "sudo-prompt": "^9.2.1", - "tslib": "^2.8.1", - "uuid": "^11.0.5" - }, - "devDependencies": { - "@types/mime-types": "^3.0.1", - "@types/module-alias": "^2.0.2", - "@types/node": "^22.10.10", - "@types/request": "^2.48.8", - "@types/semver": "^7.5.3", - "@types/uuid": "^10.0.0", - "@typescript-eslint/eslint-plugin": "^8.21.0", - "@typescript-eslint/parser": "^8.21.0", - "dotenv": "^16.4.7", - "dotnet": "^1.1.4", - "electron": "^34.0.1", - "electron-builder": "26.9.0", - "eslint": "^9.18.0", - "eslint-plugin-import": "^2.31.0", - "eslint-plugin-node": "^11.1.0", - "eslint-plugin-promise": "^7.2.1", - "typescript": "^5.7.3" - }, - "scripts": { - "electron": "npm run build && ./node_modules/.bin/electron --inspect ./dist/app.js", - "electron-win": "node_modules/.bin/electron --inspect ./dist/app.js", - "build": "node_modules/.bin/tsc -p tsconfig.json", - "prod": "node_modules/.bin/tsc -p tsconfig.json", - "start": "npm run build-ts && npm run electron", - "postinstall": "electron-builder install-app-deps", - "build-darwin-arm64": "node_modules/.bin/electron-builder --mac --dir --config=./electron.config.darwin.arm64.json", - "build-darwin-x86": "node_modules/.bin/electron-builder --mac --dir --config=./electron.config.darwin.x86.json", - "build-linux": "node_modules/.bin/electron-builder --linux --dir --config=./electron.config.linux.json", - "build-win": "node_modules/.bin/electron-builder --win --dir --config=./electron.config.win.json", - "lint": "node_modules/.bin/eslint . --max-warnings=0", - "check": "node_modules/.bin/tsc -p tsconfig.json --noemit" - }, - "packageManager": "yarn@4.6.0" -} diff --git a/application/holder/src/app.ts b/application/holder/src/app.ts deleted file mode 100644 index 00c84d7249..0000000000 --- a/application/holder/src/app.ts +++ /dev/null @@ -1,4 +0,0 @@ -import './loaders/aliases'; -import './loaders/init'; -import './loaders/cli'; -import './loaders/system'; diff --git a/application/holder/src/controller/settings.ts b/application/holder/src/controller/settings.ts deleted file mode 100644 index c853a8f9a2..0000000000 --- a/application/holder/src/controller/settings.ts +++ /dev/null @@ -1,151 +0,0 @@ -import { scope } from 'platform/env/scope'; -import { Logger } from '@env/logs/index'; -import { paths } from '@service/paths'; -import { AsyncLockToken } from 'platform/env/lock.token'; -import { utils } from 'platform/log'; -import { system } from 'platform/modules/system'; - -import * as obj from 'platform/env/obj'; -import * as fs from 'fs'; -import * as path from 'path'; - -export class Register { - private _settings: Set> = new Set(); - - public add(holder: SettingsHolder): void { - this._settings.add(holder); - } - - public destroy(): Promise { - return new Promise((resolve) => { - Promise.all(Array.from(this._settings.values()).map((s) => s.write())) - .catch((err: Error) => { - new Logger('SettingsRegister').error(`Fail to write settings: ${err.message}`); - }) - .finally(resolve); - }); - } -} - -export const register = new Register(); - -export function settingsFactory(impl: Implementation): SettingsHolder { - const holder = new SettingsHolder(impl); - register.add(holder); - return holder; -} - -export abstract class Implementation { - private _logger: Logger; - - constructor() { - this._logger = scope.getLogger(`settings: ${this.getAlias()}`) as Logger; - } - - abstract fromString(content: string): Promise; - abstract asString(): string; - abstract get(): T; - abstract set(settings: T): void; - abstract getAlias(): string; - - public setFrom(src: unknown): void { - const settings = obj.asAnyObj(this.get()); - const source = obj.asAnyObj(src); - Object.keys(settings).forEach((key: string) => { - if (source[key] !== undefined) { - settings[key] = source[key]; - } - }); - this.set(settings as unknown as T); - } - - public log(): Logger { - return this._logger; - } -} - -export class SettingsHolder { - static ABORT_ERR = 'ABORT_ERR'; - private _settings: Implementation; - private _filename: string; - private _locker: AsyncLockToken = new AsyncLockToken(false); - - constructor(settings: Implementation) { - this._settings = settings; - this._filename = path.resolve( - paths.getSettings(), - `${this._settings.getAlias().toLocaleLowerCase().replace(/\s/gi, '_')}.json`, - ); - system.doOnDestroy(`Settings holder (${this._filename})`, this.write.bind(this)); - } - - public get(): T { - return this._settings.get(); - } - - public set(settings: T): void { - this._settings.set(settings); - this.write(); - } - - public setFrom(scr: unknown): void { - this._settings.setFrom(scr); - this.write(); - } - - public async read(): Promise { - if (!fs.existsSync(this._filename)) { - await this.write(); - } - let parsed = false; - try { - const content: string = await fs.promises.readFile(this._filename, 'utf8'); - await this._settings.fromString(content); - parsed = true; - } catch (err) { - this._settings - .log() - .warn( - `Fail to read settings file "${this._filename}". Error: ${utils.error( - err, - )}. Settings will be dropped.`, - ); - } - if (!parsed) { - try { - this.write(); - } catch (err) { - this._settings - .log() - .warn(`Fail to write settings into ${this._filename}: ${utils.error(err)}.`); - return Promise.reject(new Error(utils.error(err))); - } - } - return Promise.resolve(); - } - - public async write(): Promise { - await this._locker.unlocked(); - const cancelation = new AbortController(); - this._locker.lock(() => { - cancelation.abort(); - }); - return fs.promises - .writeFile(this._filename, this._settings.asString(), { - encoding: 'utf8', - signal: cancelation.signal, - }) - .catch((err: Error) => { - if (utils.getErrorCode(err) !== SettingsHolder.ABORT_ERR) { - this._settings - .log() - .error( - `Fail to write settings file "${this._filename}". Error: ${err.message}`, - ); - } - }) - .finally(() => { - this._locker.unlock(); - }); - } -} diff --git a/application/holder/src/env/fs/accessor.ts b/application/holder/src/env/fs/accessor.ts deleted file mode 100644 index 2aa8704efa..0000000000 --- a/application/holder/src/env/fs/accessor.ts +++ /dev/null @@ -1,72 +0,0 @@ -import { Queue } from 'platform/env/queue'; -import { SetupLogger, LoggerInterface } from 'platform/entity/logger'; - -import * as fs from 'fs'; -import * as path from 'path'; - -const WARN_WRITE_DURATION_MS = 500; - -@SetupLogger() -export class FileController { - public readonly filename: string; - - private _queue!: Queue; - - constructor(filename: string) { - this.filename = filename; - } - - public init(): FileController { - this.setLoggerName(`Accessor ("${path.basename(this.filename)}")`); - this._queue = new Queue(this.log()); - return this; - } - - public destroy(): Promise { - return this._queue.destroy(); - } - - public read(): Promise { - if (this._queue.isLocked()) { - return Promise.reject(new Error(`Storage is locked`)); - } - if (!fs.existsSync(this.filename)) { - return Promise.resolve(''); - } - return fs.promises.readFile(this.filename, { encoding: 'utf-8' }); - } - - public write(content: string): Error | undefined { - if (this._queue.isLocked()) { - return new Error(`Storage is locked`); - } - this._queue.add(() => { - const ts = Date.now(); - return fs.promises - .writeFile(this.filename, content, { encoding: 'utf-8' }) - .then(() => { - const duration = Date.now() - ts; - if (duration > WARN_WRITE_DURATION_MS) { - this.log().warn( - `Writing of ~${content.length}b took too long time: ${duration}ms`, - ); - } else { - this.log().verbose(`~${content.length}b written in: ${Date.now() - ts}ms`); - } - }) - .catch((err: Error) => { - this.log().error(`Fail to write data into "${this.filename}": ${err.message}`); - }); - }); - return undefined; - } - - public delete(): Promise { - return new Promise((resolve, reject) => { - this._queue.destroy().then(() => { - fs.promises.unlink(this.filename).then(resolve).catch(reject); - }); - }); - } -} -export interface FileController extends LoggerInterface {} diff --git a/application/holder/src/env/fs/index.ts b/application/holder/src/env/fs/index.ts deleted file mode 100644 index f1c2a1ab5d..0000000000 --- a/application/holder/src/env/fs/index.ts +++ /dev/null @@ -1,150 +0,0 @@ -import { File, Stat, getFileExtention } from 'platform/types/files'; -import { FileType, extname } from 'platform/types/observe/types/file'; -import { error } from 'platform/log/utils'; -import { unbound } from '@service/unbound'; - -import * as obj from 'platform/env/obj'; -import * as fs from 'fs'; -import * as path from 'path'; - -export function exists(filename: string): Promise { - return new Promise((resolve, reject) => { - fs.stat(filename, (err) => { - if (err == null) { - resolve(true); - } else if (err.code === 'ENOENT') { - resolve(false); - } else { - reject(new Error(err.message)); - } - }); - }); -} - -export function isDirectory(path: string): boolean | Error { - try { - return fs.statSync(path).isDirectory(); - } catch (_) { - return new Error(`Fail to get stat info for "${path}"`); - } -} - -export async function getFilesFromFolder(folders: string[], exts: string[]): Promise { - if (folders.length === 0) { - return Promise.resolve([]); - } - let files: string[] = []; - for (const folder of folders) { - const stat = await fs.promises.stat(folder); - if (stat.isFile()) { - files.push(folder); - } else { - files = files.concat( - (await fs.promises.readdir(folder, { withFileTypes: true })) - .filter((f) => f.isFile()) - .map((f) => path.resolve(folder, f.name)), - ); - } - } - return files.filter((file) => { - const ext = getFileExtention(file).toLowerCase(); - if (exts.length === 0) { - return true; - } else { - return exts.indexOf(ext) !== -1; - } - }); -} - -export function getFolders(paths: string[]): string[] | Error { - if (paths.length === 0) { - return []; - } else { - let error: Error | undefined = undefined; - const folders = paths.filter((path) => { - if (error !== undefined) { - return false; - } - const check = isDirectory(path); - if (check instanceof Error) { - error = check; - } - return check; - }); - return error !== undefined ? error : folders; - } -} - -export async function getFileEntities(files: string[], fileType?: FileType): Promise { - if (files.length === 0) { - return []; - } else { - try { - const entities = []; - for (let i = 0; i < files.length; i++) { - const entity: File | undefined = await getFileEntity(files[i], fileType); - if (entity instanceof Error) { - throw entity; - } - entities.push(entity); - } - return entities.filter((f) => f !== undefined) as File[]; - } catch (e) { - return Promise.reject(new Error(error(e))); - } - } -} - -export async function getFileEntity( - filename: string, - fileType?: FileType, -): Promise { - try { - const stat = fs.statSync(filename); - if (!stat.isFile()) { - return undefined; - } - return { - filename, - ext: path.extname(filename), - path: path.dirname(filename), - name: path.basename(filename), - stat: obj.from(stat, [ - 'dev', - 'ino', - 'mode', - 'nlink', - 'uid', - 'gid', - 'rdev', - 'size', - 'blksize', - 'blocks', - 'atimeMs', - 'mtimeMs', - 'ctimeMs', - 'birthtimeMs', - ]), - type: fileType ?? (await getFileTypeByFilename(filename)), - }; - } catch (_) { - return Promise.reject(new Error(`Fail to get stat info for "${filename}"`)); - } -} - -export async function getFileTypeByFilename(filename: string): Promise { - if (await unbound.jobs.isFileBinary({ filePath: filename })) { - switch (extname(filename).toLowerCase()) { - case '.dlt': - return FileType.Binary; - case '.pcapng': - return FileType.PcapNG; - case '.pcap': - return FileType.PcapLegacy; - default: - return FileType.Text; - } - } else { - return FileType.Text; - } -} diff --git a/application/holder/src/env/fs/stream.ts b/application/holder/src/env/fs/stream.ts deleted file mode 100644 index 1fc2b79da6..0000000000 --- a/application/holder/src/env/fs/stream.ts +++ /dev/null @@ -1,53 +0,0 @@ -import { SetupLogger, LoggerInterface } from 'platform/entity/logger'; - -import * as fs from 'fs'; -import * as path from 'path'; - -@SetupLogger() -export class StreamController { - public readonly filename: string; - protected stream: fs.WriteStream; - protected closed = false; - protected error: Error | undefined; - - constructor(filename: string) { - this.filename = filename; - if (!fs.existsSync(filename)) { - fs.writeFileSync(filename, ''); - } - this.stream = fs.createWriteStream(filename, { flags: 'a', encoding: 'utf-8' }); - } - - public init(): StreamController { - this.setLoggerName(`Stream ("${path.basename(this.filename)}")`); - return this; - } - - public destroy(): Promise { - if (this.closed) { - return Promise.resolve(); - } - this.closed = true; - return new Promise((resolve) => { - this.stream.end(() => { - this.stream.destroy(); - resolve(); - }); - }); - } - - public write(content: string): void { - if (this.closed || this.error !== undefined) { - return; - } - this.stream.write(content, (error: Error | null | undefined) => { - if (this.error instanceof Error) { - return; - } - if (error instanceof Error) { - this.error = error; - } - }); - } -} -export interface StreamController extends LoggerInterface {} diff --git a/application/holder/src/env/logs/filestore.ts b/application/holder/src/env/logs/filestore.ts deleted file mode 100644 index 9ff7e60e6f..0000000000 --- a/application/holder/src/env/logs/filestore.ts +++ /dev/null @@ -1,52 +0,0 @@ -import { StreamController } from '../fs/stream'; -import { scope } from 'platform/env/scope'; - -import * as fs from 'fs'; - -export class FileStore { - static SIZE_LIMIT = 1024 * 1024 * 10; - - protected pending = ''; - protected stream: StreamController | undefined; - - public async bind(filename: string): Promise { - const logger = scope.getLogger('LogFileStore'); - const bind = () => { - this.stream = new StreamController(filename).init(); - logger.debug(`bound with file: ${filename}`); - }; - if (!fs.existsSync(filename)) { - await fs.promises.writeFile(filename, ''); - } - const stat = await fs.promises.stat(filename); - if (stat.size > FileStore.SIZE_LIMIT) { - await fs.promises.unlink(filename); - } - bind(); - return Promise.resolve(); - } - - public write(content: string) { - if (this.stream === undefined) { - this.pending += `${content}\n`; - return; - } - if (this.pending !== '') { - this.stream.write(this.pending); - this.pending = ''; - } - this.stream.write(`${content}\n`); - } - - public unbind(): Promise { - if (this.stream === undefined) { - return Promise.resolve(); - } - const stream = this.stream; - this.stream = undefined; - stream.write(`Logs store is shutdown\n`); - return stream.destroy().catch((err: Error) => { - console.error(`Fail to destroy logs store: ${err.message}`); - }); - } -} diff --git a/application/holder/src/env/logs/index.ts b/application/holder/src/env/logs/index.ts deleted file mode 100644 index 1c8da9a322..0000000000 --- a/application/holder/src/env/logs/index.ts +++ /dev/null @@ -1,42 +0,0 @@ -import { Logger as Base, Level, utils, state } from 'platform/log'; -import { FileStore } from './filestore'; -import { envvars } from '@loader/envvars'; - -import * as path from 'path'; - -const store = new FileStore(); - -export function setLogLevelFromEnvvars(): void { - const level = (() => { - const level = utils.getLogLevelFromStr(envvars.get().CHIPMUNK_DEV_LOGLEVEL); - if (envvars.get().CHIPMUNK_DEVELOPING_MODE === true && level === undefined) { - return Level.VERBOS; - } else if (level !== undefined) { - return level; - } else { - return Level.DEBUG; - } - })(); - state.setLevel(level); -} - -export function setHomePath(home: string): Promise { - return store.bind(path.resolve(home, `chipmunk.log`)); -} - -export function unbind(): Promise { - return store.unbind(); -} - -export function error(err: Error | unknown): string { - return `${err instanceof Error ? err.message : err}`; -} - -export class Logger extends Base { - public override store(message: string, level: Level): void { - if (!state.isWritable(level)) { - return; - } - store.write(message); - } -} diff --git a/application/holder/src/env/os/index.ts b/application/holder/src/env/os/index.ts deleted file mode 100644 index a75bbadf64..0000000000 --- a/application/holder/src/env/os/index.ts +++ /dev/null @@ -1,199 +0,0 @@ -import { exec, spawn } from 'child_process'; - -import * as os from 'os'; - -export function shell(command: string, defShell?: string): Promise { - return new Promise((resolve, reject) => { - exec( - command, - { shell: defShell }, - (error: Error | null, stdout: string, stderr: string) => { - if (error instanceof Error) { - return reject(error); - } - if (stderr.trim() !== '') { - return reject(new Error(`Finished deu error: ${stderr}`)); - } - if (typeof stdout !== 'string' || stdout.replace(/[\n\r]/gi, '').trim() === '') { - stdout = ''; - } - resolve(stdout); - }, - ); - }); -} - -export enum EPlatforms { - aix = 'aix', - darwin = 'darwin', - freebsd = 'freebsd', - linux = 'linux', - openbsd = 'openbsd', - sunos = 'sunos', - win32 = 'win32', - android = 'android', -} - -export type TEnvVars = { [key: string]: string }; - -export function getElectronAppShellEnvVars( - electronPath: string, - shellFullPath?: string, -): Promise { - return new Promise((resolve, reject) => { - if (os.platform() !== EPlatforms.darwin) { - return resolve(Object.assign({}, process.env) as TEnvVars); - } - (() => { - if (shellFullPath === undefined) { - return getDefShell(); - } else { - return Promise.resolve(shellFullPath); - } - })() - .then((targetShell: string) => { - const env = { - ...process.env, - ELECTRON_RUN_AS_NODE: '1', - ELECTRON_NO_ATTACH_CONSOLE: '1', - }; - const marker = '__chipmunk_marker__'; - const child = spawn( - targetShell, - [ - ...['-ilc'], - `'${electronPath}' -p 'JSON.stringify(Object.assign({ ${marker}: true }, process.env))'`, - ], - { - detached: true, - stdio: ['ignore', 'pipe', 'pipe'], - env, - }, - ); - child.on('error', (err) => { - reject(err); - }); - let stdout = ''; - child.stdout.on('data', (out) => (stdout += out)); - let stderr = ''; - child.stderr.on('data', (out) => (stderr += out)); - child.on('close', (code) => { - if (code !== 0) { - return reject( - new Error( - `Process has been finished with code ${code}. Stderr: ${stderr}`, - ), - ); - } - try { - const envvars = JSON.parse(stdout); - if (typeof envvars !== 'object' || envvars === null || !envvars[marker]) { - return reject(new Error(`Invalid stdout`)); - } - resolve(envvars); - } catch (e) { - reject(new Error(`Fail to parse: ${e instanceof Error ? e.message : e}`)); - } - }); - }) - .catch((defShellErr: Error) => { - reject(defShellErr); - }); - }); -} - -export function getEnvVar(name: string): Promise { - return new Promise((resolve, reject) => { - const possible: string | undefined = process.env[name]; - if (typeof possible === 'string' && possible.trim() !== '') { - return resolve(possible); - } - getDefShell() - .then((defShell: string) => { - let cmd = ''; - switch (os.platform()) { - case EPlatforms.aix: - case EPlatforms.android: - case EPlatforms.darwin: - case EPlatforms.freebsd: - case EPlatforms.linux: - case EPlatforms.openbsd: - case EPlatforms.sunos: - cmd = `echo $${name}`; - break; - case EPlatforms.win32: - cmd = `echo %${name}%`; - break; - } - let output = ''; - shell(cmd, defShell) - .then((stdout: string) => { - output = stdout.replace(/[\n\r]/gi, '').trim(); - if (os.platform() === EPlatforms.win32 && output === `%${name}%`) { - // Try unix way - cmd = `echo $${name}`; - shell(cmd) - .then((stdoutUnixWay: string) => { - output = stdoutUnixWay.replace(/[\n\r]/gi, '').trim(); - if ( - os.platform() === EPlatforms.win32 && - output === `$${name}` - ) { - output = ''; - } - resolve(output); - }) - .catch((error: Error) => { - reject(error); - }); - } else { - resolve(output); - } - }) - .catch((error: Error) => { - reject(error); - }); - }) - .catch((defShellErr: Error) => { - reject(defShellErr); - }); - }); -} - -export function getDefShell(): Promise { - return new Promise((resolve, reject) => { - let shellPath: string | undefined; - let command = ''; - switch (os.platform()) { - case EPlatforms.aix: - case EPlatforms.android: - case EPlatforms.darwin: - case EPlatforms.freebsd: - case EPlatforms.linux: - case EPlatforms.openbsd: - case EPlatforms.sunos: - shellPath = process.env['SHELL']; - command = 'echo $SHELL'; - break; - case EPlatforms.win32: - shellPath = process.env['COMSPEC']; - command = 'ECHO %COMSPEC%'; - break; - } - - if (shellPath) { - return resolve(shellPath); - } - - // process didn't resolve shell, so we query it manually - shell(command) - .then((stdout: string) => { - resolve(stdout.trim()); - }) - .catch((error: Error) => { - // COMSPEC should always be available on windows. - // Therefore: we will try to use /bin/sh as error-mitigation - reject(error); - }); - }); -} diff --git a/application/holder/src/env/os/platform.ts b/application/holder/src/env/os/platform.ts deleted file mode 100644 index 919b6aa4a5..0000000000 --- a/application/holder/src/env/os/platform.ts +++ /dev/null @@ -1,74 +0,0 @@ -import * as os from 'os'; -import { execSync } from 'child_process'; -import { scope } from 'platform/env/scope'; -import { error } from 'platform/log/utils'; - -export enum Platform { - aix = 'aix', - darwin = 'darwin', - darwinaarch64 = 'darwin-arm64', - freebsd = 'freebsd', - linux = 'linux', - linuxaarch64 = 'linux-arm64', - openbsd = 'openbsd', - sunos = 'sunos', - win32 = 'win32', - win64 = 'win64', - android = 'android', - undefined = 'undefined', -} - -let cachedCpuBrandString: string | null = null; - -function safeExecSync(command: string, timeout: number): string { - try { - return execSync(command, { timeout }).toString().trim().toLowerCase(); - } catch (err) { - scope.getLogger('PlatformChecker').warn(`Fail to detect arch for darwin. Command '${command}' gives error: ${error(err)}`); - return ''; - } -} - -function getCpuBrandString(): string { - if (cachedCpuBrandString === null) { - cachedCpuBrandString = safeExecSync('sysctl -n machdep.cpu.brand_string', 200); - } - return cachedCpuBrandString; -} - -export function getPlatform(win32Only = false): Platform { - switch (os.platform()) { - case Platform.aix: - case Platform.freebsd: - case Platform.linux: - if (os.arch() === 'arm64') { - return Platform.linuxaarch64; - } else { - return Platform.linux; - } - case Platform.openbsd: - return Platform.linux; - case Platform.darwin: { - const result = getCpuBrandString(); - if (os.arch() === 'arm64' || (!result.includes('intel') && result !== '')) { - return Platform.darwinaarch64; - } else { - return Platform.darwin; - } - } - case Platform.win32: - if (win32Only) { - return Platform.win32; - } - if (os.arch() === 'x32') { - return Platform.win32; - } else if (os.arch() === 'x64') { - return Platform.win64; - } - } - return Platform.undefined; -} - -export function getExecutable(filename: string): string { - return `${filename}${os.platform() === 'win32' ? '.exe' : ''}`; -} diff --git a/application/holder/src/loaders/aliases.ts b/application/holder/src/loaders/aliases.ts deleted file mode 100644 index 83e9de8e18..0000000000 --- a/application/holder/src/loaders/aliases.ts +++ /dev/null @@ -1,37 +0,0 @@ -import moduleAlias from 'module-alias'; -import * as path from 'path'; - -const MODULES: { [key: string]: string } = { - '@register': 'register', - '@env': 'env', - '@module': 'modules', - '@loader': 'loaders', - '@log': 'env/logs', - '@controller': 'controller', - '@service': 'service', - // '@platform': '../node_modules/platform/dist', - // '@rc_api': 'node_modules/rustcore/dist/api', - // '@rc_executors': 'node_modules/rustcore/dist/api/executors', - // '@rc_interfaces': 'node_modules/rustcore/dist/interfaces', - // '@rc_native': 'node_modules/rustcore/dist/native', - // '@rc_provider': 'node_modules/rustcore/dist/provider', - // '@rc_services': 'node_modules/rustcore/dist/services', - // '@rc_util': 'node_modules/rustcore/dist/util', -}; -const ROOT_PATH = (function () { - return __dirname.replace(/loaders$/gi, ''); -})(); - -function getModulePath(str: string): string { - return path.resolve(ROOT_PATH, str); -} - -export function setup() { - const modules: { [key: string]: string } = {}; - Object.keys(MODULES).forEach((mod) => { - modules[mod] = getModulePath(MODULES[mod]); - }); - moduleAlias.addAliases(modules); -} - -setup(); diff --git a/application/holder/src/loaders/cli.ts b/application/holder/src/loaders/cli.ts deleted file mode 100644 index 14b1394861..0000000000 --- a/application/holder/src/loaders/cli.ts +++ /dev/null @@ -1,222 +0,0 @@ -import { program as cli, Option } from 'commander'; -import { CLIAction } from '@service/cli/action'; -import { spawn } from 'child_process'; -import { Socket } from 'net'; -import { WriteStream } from 'fs'; -import { logger } from './logger'; - -import * as handlers from '@service/cli/index'; - -const DEV_EXECUTOR_PATH = 'node_modules/electron/dist/electron'; -const DEV_EXECUTOR_PATH_DARVIN = 'node_modules/electron/dist/Electron.app/Contents/MacOS/Electron'; -const RESTARTING_FLAG = '--app_restarted'; -const DEBUG_FLAG = '--debug_mode'; - -function getDevExecutorPath(): string { - if (process.platform === 'darwin') { - return DEV_EXECUTOR_PATH_DARVIN; - } else { - return DEV_EXECUTOR_PATH; - } -} -export function isDevelopingExecuting(path: string): boolean { - const devPath = getDevExecutorPath(); - return path.toLowerCase().indexOf(devPath.toLowerCase()) !== -1; -} - -const CLI_HANDLERS: { [key: string]: CLIAction } = { - open: new handlers.OpenFile(), - stream: new handlers.Stream(), - search: new handlers.Search(), - parser: new handlers.Parser(), -}; - -export function getActions(): CLIAction[] { - return Object.keys(CLI_HANDLERS).map((k) => CLI_HANDLERS[k]); -} - -function collectErrors(): Error[] { - const errors: Error[] = []; - Object.keys(CLI_HANDLERS).forEach((key: string) => { - errors.push(...CLI_HANDLERS[key].errors()); - }); - return errors; -} - -function parser( - handler: CLIAction, - argument: string | undefined, -): (value: string, prev: string) => string { - return handler.argument.bind(handler, argument, process.cwd()) as unknown as ( - value: string, - prev: string, - ) => string; -} - -function setup() { - logger.write(`setup CLI: started`); - cli.addOption( - new Option( - '--debug_mode', - 'Will run chipmunk in debug mode. Others CLI commands will be ignored.', - ), - ); - cli.addOption( - new Option( - '-p, --parser ', - 'Setup defaul parser, which would be used for all stream session.', - ) - .choices(['dlt', 'someip', 'text']) - .argParser(parser(CLI_HANDLERS['parser'], undefined)), - ); - cli.addOption( - new Option( - '-s, --search ""', - 'Collection of filters, which would be applied to each opened session (tab). Ex: chipmunk files -o /path/file_name -s "error" -s "warning"', - ).argParser(parser(CLI_HANDLERS['search'], undefined)), - ); - cli.addOption(new Option(RESTARTING_FLAG, 'Hidden option to manage CLI usage').hideHelp()); - const files = cli - .command('files [filename...]', { isDefault: true }) - .description('Opens file(s)') - .action((args: string[]) => { - if (args.length === 0) { - return; - } - // Opening file as defualt option for "files" command. - // Note, "files" command also is a default command. - // It makes "./chipmunk file_name" to open a file - parser(CLI_HANDLERS['open'], undefined)(args[0], ''); - }); - files.option( - '-o, --open ', - 'Opens file. Ex: chipmunk -o /path/file_name_a. In case of multiple files, multiple files view will be opened. Ex: chipmunk -o file_a -o file_b; chipmunk -o "**/*.logs"; chipmunk -o "**/*.{logs,txt}"', - parser(CLI_HANDLERS['open'], undefined), - ); - const streams = cli - .command('streams') - .description('Listens diffrent sources of data and posts its output'); - streams.addOption( - new Option( - '--tcp ""', - 'Creates TCP connection with given address. Ex: chipmunk --tcp "0.0.0.0:8888"', - ).argParser(parser(CLI_HANDLERS['stream'], 'tcp')), - ); - streams.addOption( - new Option( - '--udp ""', - 'Creates UDP connection with given address and multicasts. Ex: chipmunk --udp "0.0.0.0:8888|234.2.2.2,0.0.0.0"', - ).argParser(parser(CLI_HANDLERS['stream'], 'udp')), - ); - streams.addOption( - new Option( - '--serial ""', - 'Creates serial port connection with given parameters. Ex: chipmunk --serial "/dev/port_a;960000;8;1;0;1"', - ).argParser(parser(CLI_HANDLERS['stream'], 'serial')), - ); - streams.addOption( - new Option( - '--stdout ""', - 'Executes given commands in the scope of one session (tab) and shows mixed output. Ex: chipmunk --stdout "journalctl -r" "adb logcat"', - ).argParser(parser(CLI_HANDLERS['stream'], 'stdout')), - ); - cli.parse(); - logger.write(`setup CLI: done and parsered`); -} - -function lock() { - [process.stdin, process.stdout, process.stderr].forEach((stream) => { - typeof stream.end === 'function' && stream.end(); - stream.destroy(); - }); - logger.write(`STD's are locked`); -} - -function exit() { - logger.write(`exiting`); - process.exit(0); -} - -function isSyncWriteStream(std: unknown): boolean { - // Note SyncWriteStream is depricated, but it doesn't mean - // it isn't used - return (std as { constructor: { name: string } }).constructor.name === 'SyncWriteStream'; -} - -function isTTY(): boolean { - if (typeof process.stdout.isTTY === 'boolean') { - return process.stdout.isTTY; - } - if ( - (process.platform === 'linux' || process.platform === 'darwin') && - process.stdout.isTTY === undefined - ) { - return false; - } - if ((process.stdout as unknown) instanceof Socket) { - // On windows: gitbash - return true; - } - if (isSyncWriteStream(process.stdout) || (process.stdout as unknown) instanceof WriteStream) { - // On windows: CMD, PowerShell - return true; - } - return false; -} - -function isRestartedAlready(): boolean { - logger.write(`RESTARTING_FLAG=${process.argv.includes(RESTARTING_FLAG)}`); - return process.argv.includes(RESTARTING_FLAG); -} - -function isDebugMode(): boolean { - logger.write(`DEBUG_FLAG=${process.argv.includes(DEBUG_FLAG)}`); - return process.argv.includes(DEBUG_FLAG); -} - -function check() { - logger.write(`CLI checks are started`); - if (isDebugMode()) { - logger.write(`DEBUG MODE. CLI checks are skipped`); - return; - } - setup(); - if (isRestartedAlready()) { - return; - } - if (!isTTY()) { - logger.write(`context is TTY`); - return; - } - logger.write(`TTY isn't detected`); - const args = process.argv.slice(); - const executor = args.shift(); - logger.write(`executor=${executor}`); - if (executor === undefined) { - // Unexpected amount of arguments - return; - } - if (isDevelopingExecuting(executor)) { - logger.write(`developing executing`); - // Developing mode - return; - } - const errors = collectErrors(); - if (errors.length > 0) { - errors.forEach((err) => { - process.stdout.write(`${err.message}\n`); - }); - lock(); - exit(); - } - args.push(RESTARTING_FLAG); - spawn(executor, args, { - shell: false, - detached: true, - stdio: 'ignore', - }); - logger.write(`${executor} has been spawned`); - lock(); - exit(); -} -check(); diff --git a/application/holder/src/loaders/controllers.ts b/application/holder/src/loaders/controllers.ts deleted file mode 100644 index 32851cdc44..0000000000 --- a/application/holder/src/loaders/controllers.ts +++ /dev/null @@ -1,4 +0,0 @@ -/** - * @module controller - * @description Module loads all available controllers to declare it - */ diff --git a/application/holder/src/loaders/envvars.ts b/application/holder/src/loaders/envvars.ts deleted file mode 100644 index 7618ba1b77..0000000000 --- a/application/holder/src/loaders/envvars.ts +++ /dev/null @@ -1,261 +0,0 @@ -import { getEnvVar, getElectronAppShellEnvVars } from '@env/os'; -import { setProp, getProp } from 'platform/env/obj'; - -export enum EChipmunkEnvVars { - /** - * ON - activate developing mode: - * - all plugins processes will be started with debug-listener - * - browser will be started with devtools - */ - CHIPMUNK_DEVELOPING_MODE = 'CHIPMUNK_DEVELOPING_MODE', - - /** - * ON - activate webtools in developing mode - * OFF - deactivate webtools in developing mode - */ - CHIPMUNK_NO_WEBDEVTOOLS = 'CHIPMUNK_NO_WEBDEVTOOLS', - - /** - * Definition of log level: - * - INFO (I, IN), - * - DEBUG (D, DEB), - * - WARNING (W, WAR, WARN), - * - VERBOS (V, VER, VERBOSE), - * - ERROR (E, ERR), - * - ENV - ENV logs never writes into logs file; it's just shown in stdout, - * - WTF - WTF logs useful for debuggin. If at least one WTF log was sent, only WTF logs will be shown. This logs never writes into logs file, - */ - CHIPMUNK_DEV_LOGLEVEL = 'CHIPMUNK_DEV_LOGLEVEL', - - /** - * TRUE (true, ON, on) - prevent recording render's logs into backend - */ - CHIPMUNK_NO_RENDER_LOGS = 'CHIPMUNK_NO_RENDER_LOGS', - - /** - * Path to custom plugins folder - */ - CHIPMUNK_PLUGINS_SANDBOX = 'CHIPMUNK_PLUGINS_SANDBOX', - - /** - * TRUE (true, ON, on) - prevent downloading of defaults plugins - */ - CHIPMUNK_PLUGINS_NO_DEFAULTS = 'CHIPMUNK_PLUGINS_NO_DEFAULTS', - - /** - * TRUE (true, ON, on) - prevent upgrade plugins - */ - CHIPMUNK_PLUGINS_NO_UPGRADE = 'CHIPMUNK_PLUGINS_NO_UPGRADE', - - /** - * TRUE (true, ON, on) - prevent update plugins workflow - */ - CHIPMUNK_PLUGINS_NO_UPDATES = 'CHIPMUNK_PLUGINS_NO_UPDATES', - - /** - * TRUE (true, ON, on) - prevent removing not valid plugins - */ - CHIPMUNK_PLUGINS_NO_REMOVE_NOTVALID = 'CHIPMUNK_PLUGINS_NO_REMOVE_NOTVALID', -} - -export const CChipmunkEnvVars: string[] = [ - EChipmunkEnvVars.CHIPMUNK_DEVELOPING_MODE, - EChipmunkEnvVars.CHIPMUNK_DEV_LOGLEVEL, - EChipmunkEnvVars.CHIPMUNK_NO_RENDER_LOGS, - EChipmunkEnvVars.CHIPMUNK_PLUGINS_SANDBOX, - EChipmunkEnvVars.CHIPMUNK_PLUGINS_NO_DEFAULTS, - EChipmunkEnvVars.CHIPMUNK_PLUGINS_NO_UPDATES, - EChipmunkEnvVars.CHIPMUNK_PLUGINS_NO_UPGRADE, - EChipmunkEnvVars.CHIPMUNK_PLUGINS_NO_REMOVE_NOTVALID, -]; - -export interface IChipmunkEnvVars { - CHIPMUNK_DEVELOPING_MODE: boolean | undefined; - CHIPMUNK_NO_WEBDEVTOOLS: boolean | undefined; - CHIPMUNK_NO_RENDER_LOGS: boolean | undefined; - CHIPMUNK_DEV_LOGLEVEL: string | undefined; - CHIPMUNK_PLUGINS_SANDBOX: string | undefined; - CHIPMUNK_PLUGINS_NO_DEFAULTS: boolean | undefined; - CHIPMUNK_PLUGINS_NO_UPDATES: boolean | undefined; - CHIPMUNK_PLUGINS_NO_UPGRADE: boolean | undefined; - CHIPMUNK_PLUGINS_NO_REMOVE_NOTVALID: boolean | undefined; -} - -const CChipmunkEnvVarsParsers: { [key: string]: (smth: unknown) => boolean } = { - [EChipmunkEnvVars.CHIPMUNK_DEVELOPING_MODE]: (smth: unknown): boolean => { - if ( - typeof smth === 'string' && - ['true', 'on', '1'].indexOf(smth.toLowerCase().trim()) !== -1 - ) { - return true; - } - if (typeof smth === 'number' && smth === 1) { - return true; - } - return false; - }, - [EChipmunkEnvVars.CHIPMUNK_NO_WEBDEVTOOLS]: (smth: unknown): boolean => { - if ( - typeof smth === 'string' && - ['true', 'on', '1'].indexOf(smth.toLowerCase().trim()) !== -1 - ) { - return true; - } - if (typeof smth === 'number' && smth === 1) { - return true; - } - return false; - }, - [EChipmunkEnvVars.CHIPMUNK_NO_RENDER_LOGS]: (smth: unknown): boolean => { - if ( - typeof smth === 'string' && - ['true', 'on', '1'].indexOf(smth.toLowerCase().trim()) !== -1 - ) { - return true; - } - if (typeof smth === 'number' && smth === 1) { - return true; - } - return false; - }, - [EChipmunkEnvVars.CHIPMUNK_PLUGINS_NO_DEFAULTS]: (smth: unknown): boolean => { - if ( - typeof smth === 'string' && - ['true', 'on', '1'].indexOf(smth.toLowerCase().trim()) !== -1 - ) { - return true; - } - if (typeof smth === 'number' && smth === 1) { - return true; - } - return false; - }, - [EChipmunkEnvVars.CHIPMUNK_PLUGINS_NO_UPDATES]: (smth: unknown): boolean => { - if ( - typeof smth === 'string' && - ['true', 'on', '1'].indexOf(smth.toLowerCase().trim()) !== -1 - ) { - return true; - } - if (typeof smth === 'number' && smth === 1) { - return true; - } - return false; - }, - [EChipmunkEnvVars.CHIPMUNK_PLUGINS_NO_UPGRADE]: (smth: unknown): boolean => { - if ( - typeof smth === 'string' && - ['true', 'on', '1'].indexOf(smth.toLowerCase().trim()) !== -1 - ) { - return true; - } - if (typeof smth === 'number' && smth === 1) { - return true; - } - return false; - }, - [EChipmunkEnvVars.CHIPMUNK_PLUGINS_NO_REMOVE_NOTVALID]: (smth: unknown): boolean => { - if ( - typeof smth === 'string' && - ['true', 'on', '1'].indexOf(smth.toLowerCase().trim()) !== -1 - ) { - return true; - } - if (typeof smth === 'number' && smth === 1) { - return true; - } - return false; - }, -}; - -const GeneralEnvVarsList = [ - EChipmunkEnvVars.CHIPMUNK_DEVELOPING_MODE, - EChipmunkEnvVars.CHIPMUNK_NO_WEBDEVTOOLS, - EChipmunkEnvVars.CHIPMUNK_DEV_LOGLEVEL, - EChipmunkEnvVars.CHIPMUNK_NO_RENDER_LOGS, - EChipmunkEnvVars.CHIPMUNK_PLUGINS_SANDBOX, - EChipmunkEnvVars.CHIPMUNK_PLUGINS_NO_DEFAULTS, - EChipmunkEnvVars.CHIPMUNK_PLUGINS_NO_UPDATES, - EChipmunkEnvVars.CHIPMUNK_PLUGINS_NO_REMOVE_NOTVALID, -]; - -export class GeneralEnvVars { - private _env: IChipmunkEnvVars = { - CHIPMUNK_DEVELOPING_MODE: undefined, - CHIPMUNK_NO_WEBDEVTOOLS: undefined, - CHIPMUNK_DEV_LOGLEVEL: undefined, - CHIPMUNK_NO_RENDER_LOGS: undefined, - CHIPMUNK_PLUGINS_SANDBOX: undefined, - CHIPMUNK_PLUGINS_NO_DEFAULTS: undefined, - CHIPMUNK_PLUGINS_NO_UPDATES: undefined, - CHIPMUNK_PLUGINS_NO_UPGRADE: undefined, - CHIPMUNK_PLUGINS_NO_REMOVE_NOTVALID: undefined, - }; - private _os: typeof process.env = process.env; - - public init(): Promise { - return new Promise((resolve) => { - Promise.all( - GeneralEnvVarsList.map((env: string) => { - return getEnvVar(env) - .then((value: string) => { - if (typeof value !== 'string' || value.trim() === '') { - setProp(this._env, env, undefined); - } else { - if (CChipmunkEnvVarsParsers[env] !== undefined) { - setProp(this._env, env, CChipmunkEnvVarsParsers[env](value)); - } else { - setProp(this._env, env, value); - } - } - }) - .catch((err: Error) => { - console.error( - `Cannot detect env "${env}" due error: ${ - err instanceof Error ? err.message : err - }`, - ); - setProp(this._env, env, undefined); - }); - }), - ) - .catch((error: Error) => { - // Drop all to default - GeneralEnvVarsList.forEach((env: string) => { - setProp(this._env, env, undefined); - }); - console.error(`Fail to detect OS env due error: ${error.message}`); - }) - .finally(() => { - getElectronAppShellEnvVars(process.execPath) - .then((vars) => { - this._os = vars; - }) - .catch((err: Error) => { - console.error( - `Fail get all envvars due error: ${ - err instanceof Error ? err.message : err - }`, - ); - }) - .finally(resolve); - }); - }); - } - - public get(): IChipmunkEnvVars { - return Object.assign({}, this._env); - } - - public getOS(): typeof process.env { - return this._os; - } - - public envsToString(): string { - return `Next env vars are detected:\n${GeneralEnvVarsList.map((env: string) => { - return `\t${env}=${getProp(this._env, env)}`; - }).join('\n')}`; - } -} - -export const envvars = new GeneralEnvVars(); diff --git a/application/holder/src/loaders/exitcases/index.ts b/application/holder/src/loaders/exitcases/index.ts deleted file mode 100644 index a6c6184aa8..0000000000 --- a/application/holder/src/loaders/exitcases/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export { Restart } from './restart'; -export { Update } from './update'; diff --git a/application/holder/src/loaders/exitcases/restart.ts b/application/holder/src/loaders/exitcases/restart.ts deleted file mode 100644 index dd57b1422e..0000000000 --- a/application/holder/src/loaders/exitcases/restart.ts +++ /dev/null @@ -1,7 +0,0 @@ -export class Restart { - public readonly cm: string; - - constructor(cm: string) { - this.cm = cm; - } -} diff --git a/application/holder/src/loaders/exitcases/update.ts b/application/holder/src/loaders/exitcases/update.ts deleted file mode 100644 index 8c8c41340e..0000000000 --- a/application/holder/src/loaders/exitcases/update.ts +++ /dev/null @@ -1,11 +0,0 @@ -export class Update { - public readonly updater: string; - public readonly disto: string; - public readonly app: string; - - constructor(updater: string, disto: string, app: string) { - this.updater = updater; - this.disto = disto; - this.app = app; - } -} diff --git a/application/holder/src/loaders/init.ts b/application/holder/src/loaders/init.ts deleted file mode 100644 index 52c81d73f0..0000000000 --- a/application/holder/src/loaders/init.ts +++ /dev/null @@ -1,17 +0,0 @@ -/** - * @module init - * @description Module should be load at veery first place. This module is right place to put any init procedures - */ -import { setUuidGenerator } from 'platform/env/sequence'; -import { scope } from 'platform/env/scope'; -import { v4 } from 'uuid'; -import { Logger } from '@env/logs/index'; - -// Set globals on platform -// Set uuid getter -setUuidGenerator(v4); -// Set logger getter -scope.setLogger(Logger); - -// Import list of services -import '@register/services'; diff --git a/application/holder/src/loaders/logger.ts b/application/holder/src/loaders/logger.ts deleted file mode 100644 index dff2bfd377..0000000000 --- a/application/holder/src/loaders/logger.ts +++ /dev/null @@ -1,55 +0,0 @@ -import * as fs from 'fs'; -import * as path from 'path'; -import * as os from 'os'; - -const HOME = '.chipmunk'; -const LOG_FILE = 'chipmunk.log'; - -/** - * This logger is used only during loading application before initialization - * of services. - * This logger can be used ONLY in ./loaders/cli.ts - */ -class InitialLogger { - protected file: string; - - constructor() { - const home = path.join(os.homedir(), HOME); - this.file = path.join(home, LOG_FILE); - if (!fs.existsSync(home)) { - fs.mkdirSync(home); - } - if (!fs.existsSync(this.file)) { - fs.writeFileSync(this.file, ''); - } - this.write(`\n${'-'.repeat(75)}\nsession: ${new Date().toUTCString()}\n${'-'.repeat(75)}`); - } - - public write(msg: string, error?: Error): void { - const errorMsg = (() => { - if (error instanceof Error) { - return `${error.name}: ${error.message}${ - error.cause !== undefined ? `\n${error.cause}` : '' - }${error.stack !== undefined ? `\n${error.stack}` : ''}`; - } else { - return undefined; - } - })(); - fs.appendFileSync( - this.file, - `[INIT][${new Date().toUTCString()}]: ${msg}\n${ - errorMsg === undefined ? '' : `${errorMsg}\n` - }`, - ); - } -} - -process.on('uncaughtException', (error: Error) => { - logger.write(`[CRITICAL] uncaughtException`, error); -}); - -process.on('unhandledRejection', (error: Error) => { - logger.write(`[CRITICAL] unhandledRejection`, error); -}); - -export const logger = new InitialLogger(); diff --git a/application/holder/src/loaders/services.ts b/application/holder/src/loaders/services.ts deleted file mode 100644 index 8c9e21ddba..0000000000 --- a/application/holder/src/loaders/services.ts +++ /dev/null @@ -1,20 +0,0 @@ -/** - * @module service - * @description Module loads all available services to declare it and make it init - */ -import '@service/production'; -import '@service/paths'; -import '@service/jobs'; -import '@service/electron'; -import '@service/sessions'; -import '@service/bridge'; -import '@service/storage'; -import '@service/settings'; -import '@service/updater'; -import '@service/notifications'; -import '@service/env'; -import '@service/hotkeys'; -import '@service/cli'; -import '@service/menu'; -import '@service/unbound'; -import '@service/github'; diff --git a/application/holder/src/loaders/system.ts b/application/holder/src/loaders/system.ts deleted file mode 100644 index bf158d0238..0000000000 --- a/application/holder/src/loaders/system.ts +++ /dev/null @@ -1,191 +0,0 @@ -/** - * @module system - * @description Module cares about loading of application - */ -import './services'; -import './controllers'; -import { system } from 'platform/modules/system'; -import { init as modulesInitialization } from '@module/index'; -import { version } from '@module/version'; -import { scope } from 'platform/env/scope'; -import { Logger } from 'platform/log'; -import { app, Event } from 'electron'; -import { LockToken } from 'platform/env/lock.token'; -import { IApplication, ChipmunkGlobal } from '@register/global'; -import { unbind } from '@env/logs'; -import { setLogLevelFromEnvvars } from '@env/logs'; -import { envvars } from './envvars'; -import { spawn } from 'child_process'; -import { serializeSpaces } from 'platform/env/str'; - -import * as cases from './exitcases'; -import * as Requests from 'platform/ipc/request'; - -export type ExitCase = cases.Restart | cases.Update | undefined; - -class Application implements IApplication { - protected logger: Logger = scope.getLogger('app'); - protected lock: LockToken = LockToken.simple(false); - protected emitters: string[] = []; - - constructor() { - envvars - .init() - .catch((err: Error) => { - this.logger.error(`Fail to init envvars loader: ${err.message}`); - }) - .finally(() => { - setLogLevelFromEnvvars(); - this.logger.debug(envvars.envsToString()); - system - .init({ - before: modulesInitialization, - }) - .then(() => { - this.logger.debug(`Starting chipmunk@${version.getVersion()}...`); - }) - .catch((err: Error) => { - this.logger.error(`Fail to run. Error: ${err.message}`); - }); - }); - app.whenReady().then(() => { - process.on('exit', () => { - this.shutdown(`process:exit`) - .close() - .catch((err: Error) => { - this.logger.error(`Fail to shutdown on "process:exit": ${err.message}`); - }); - }); - process.on('SIGQUIT', () => { - this.shutdown(`process:SIGQUIT`) - .close() - .catch((err: Error) => { - this.logger.error(`Fail to shutdown on "process:SIGQUIT": ${err.message}`); - }); - }); - process.on('SIGINT', () => { - this.shutdown(`process:SIGINT`) - .close() - .catch((err: Error) => { - this.logger.error(`Fail to shutdown on "process:SIGINT": ${err.message}`); - }); - }); - process.on('SIGTERM', () => { - this.shutdown(`process:SIGTERM`) - .close() - .catch((err: Error) => { - this.logger.error(`Fail to shutdown on "process:SIGTERM": ${err.message}`); - }); - }); - app.on('will-quit', (event: Event) => { - event.preventDefault(); - this.shutdown(`app:will-quit`) - .close() - .catch((err: Error) => { - this.logger.error(`Fail to shutdown on "app:will-quit": ${err.message}`); - }); - return false; - }); - app.on('before-quit', (event: Event) => { - event.preventDefault(); - this.shutdown(`app:before-quit`) - .close() - .catch((err: Error) => { - this.logger.error(`Fail to shutdown on "app:before-quit": ${err.message}`); - }); - return false; - }); - }); - } - - public shutdown(signal: string): { - update(upd: cases.Update): Promise; - restart(cm: cases.Restart): Promise; - close(): Promise; - } { - return { - update: (upd: cases.Update): Promise => { - return this._shutdown(signal, upd); - }, - restart: (cm: cases.Restart): Promise => { - return this._shutdown(signal, cm); - }, - close: (): Promise => { - return this._shutdown(signal, undefined); - }, - }; - } - - private async _shutdown(signal: string, exitcase: ExitCase): Promise { - this.emitters.push(signal); - if (this.lock.isLocked()) { - this.logger.info( - `shutdown signal "${signal}" would be ignored: applcation is shutdowning already`, - ); - return Promise.resolve(); - } - this.lock.lock(); - process.removeAllListeners(); - app.removeAllListeners(); - this.logger.debug(`Application would be closed with signal "${signal}".`); - await Requests.IpcRequest.send( - Requests.System.Shutdown.Response, - new Requests.System.Shutdown.Request({ force: false }), - ).catch((err: Error) => { - this.logger.error(`Client is NOT ready to be closed: ${err.message}`); - }); - await system.destroy().catch((error: Error) => { - this.logger.warn(`Fail correctly close app due error: ${error.message}`); - }); - this.emitters.length > 0 && - this.logger.debug(`On close events stack:\n- ${this.emitters.join(',\n- ')}`); - if (exitcase instanceof cases.Update) { - // tools - // .execute(exitcase.updater, [ - // exitcase.app, - // exitcase.disto, - // process.pid.toString(), - // process.ppid.toString(), - // ]) - // .catch((err: Error) => { - // console.log(err.message); - // }); - this.logger.debug(`Application will be closed with UPDATE case.\n \ -- updater: ${exitcase.updater}\n\ -- app: ${exitcase.app}\n\ -- disto: ${exitcase.disto}\n\ -- PID: ${process.pid}\n\ -- PPID: ${process.ppid}`); - const sep = '%sep%'; - spawn( - `${exitcase.updater}`, - [ - '[', - serializeSpaces(exitcase.app), - sep, - serializeSpaces(exitcase.disto), - sep, - process.pid.toString(), - sep, - process.ppid.toString(), - `]`, - ], - { - shell: true, - detached: true, - stdio: 'ignore', - }, - ); - } else if (exitcase instanceof cases.Restart) { - this.logger.debug(`Application will be closed with RESTART case.`); - } else { - this.logger.debug(`Application will be closed with REGULAR case.`); - } - await unbind(); - app.exit(); - } -} - -declare const global: ChipmunkGlobal; - -global.application = new Application(); diff --git a/application/holder/src/modules/github.ts b/application/holder/src/modules/github.ts deleted file mode 100644 index ceef18ed15..0000000000 --- a/application/holder/src/modules/github.ts +++ /dev/null @@ -1,251 +0,0 @@ -// tslint:disable:max-classes-per-file - -import * as fs from 'fs'; -import * as path from 'path'; -import * as util from 'util'; - -import { net } from '@module/net'; -import { scope } from 'platform/env/scope'; -import { Logger, utils } from 'platform/log'; -import { unique } from 'platform/env/sequence'; -import { paths } from '@service/paths'; - -const CSettings: { - user: string; - uri: string; -} = { - user: 'esrlabs', - uri: 'https://api.github.com/repos/', -}; - -export interface IGitHubOptions { - user?: string; - repo: string; -} - -export interface IAssetOptions { - version?: string; - name: string; - dest: string; -} - -export interface IReleaseAsset { - name: string; - url: string; - browser_download_url: string; -} - -export interface IReleaseData { - assets: IReleaseAsset[]; - map?: Map; - name: string; - id: number; - tag_name: string; - body: string; - // Required by updater alpha-awareness. `tag_name` stays the source of truth, - // while `html_url` is used for the notification action target. - html_url: string; - prerelease: boolean; - draft: boolean; - published_at?: string; -} - -export class GitHubAsset { - private _asset: IReleaseAsset; - private _logger: Logger; - - constructor(asset: IReleaseAsset) { - this._asset = asset; - this._logger = scope.getLogger(`Asset: ${this._asset.name}`); - } - - public desc(): IReleaseAsset { - return this._asset; - } - - public raw(): Promise { - return new Promise((resolve, reject) => { - net.getRaw(this._asset.browser_download_url) - .then((raw: string) => { - resolve(raw); - }) - .catch((err: Error) => { - reject( - new Error( - this._logger.error(`Fail to read asset due error: ${err.message}`), - ), - ); - }); - }); - } - - public saveTo(dest: string): Promise { - return new Promise((resolve, reject) => { - net.download(this._asset.browser_download_url, dest) - .then((raw: string) => { - resolve(raw); - }) - .catch((err: Error) => { - reject( - new Error( - this._logger.error(`Fail to download asset due error: ${err.message}`), - ), - ); - }); - }); - } -} - -export class GitHubClient { - private _logger: Logger = scope.getLogger(`GitHubClient`); - - public getLatestRelease(opt: IGitHubOptions): Promise { - return new Promise((resolve, reject) => { - net.getRaw( - `${CSettings.uri}${opt.user !== undefined ? opt.user : CSettings.user}/${ - opt.repo - }/releases/latest`, - { - Accept: 'application/vnd.github.v3+json', - }, - ) - .then((raw: string) => { - try { - const release = JSON.parse(raw); - if (release.assets instanceof Array) { - release.map = new Map(); - release.assets.forEach((asset: IReleaseAsset) => { - this._logger.debug(`Found asset for release: ${asset.name}`); - release.map?.set(asset.name, new GitHubAsset(asset)); - }); - } - resolve(release); - } catch (err) { - reject( - new Error( - this._logger.error( - `Fail parse releases list due error: ${utils.error(err)}`, - ), - ), - ); - } - }) - .catch((err: Error) => { - reject( - new Error( - this._logger.error(`Fail get releases list due error: ${err.message}`), - ), - ); - }); - }); - } - - public getReleases(opt: IGitHubOptions, filter?: { tag?: string }): Promise { - return new Promise((resolve, reject) => { - let uri = `${CSettings.uri}${opt.user !== undefined ? opt.user : CSettings.user}/${ - opt.repo - }/releases`; - if (filter !== undefined && filter.tag !== undefined) { - uri += `/tags/${encodeURIComponent(filter.tag)}`; - } else { - // The updater scans the release list for alpha announcements, so use a wider - // page here instead of relying on GitHub's smaller default response. - uri += `?per_page=100`; - } - net.getRaw(uri, { - Accept: 'application/vnd.github.v3+json', - }) - .then((raw: string) => { - try { - let releases = JSON.parse(raw); - if ( - !(releases instanceof Array) && - typeof releases === 'object' && - releases !== null - ) { - releases = [releases]; - } - if (!(releases instanceof Array)) { - reject( - new Error( - `Unexpected format of releases list: ${util.inspect(releases)}`, - ), - ); - } else { - resolve(releases); - } - } catch (err) { - reject( - new Error( - this._logger.error( - `Fail parse releases list due error: ${utils.error(err)}`, - ), - ), - ); - } - }) - .catch((err: Error) => { - reject( - new Error( - this._logger.error(`Fail get releases list due error: ${err.message}`), - ), - ); - }); - }); - } - - public download(opt: IGitHubOptions, asset: IAssetOptions): Promise { - return new Promise((resolve, reject) => { - const output = path.resolve(asset.dest, asset.name); - // Check: does already exist - if (fs.existsSync(output)) { - return resolve(output); - } - const tmp = path.resolve(paths.getTmp(), unique()); - this.getReleases(opt, asset.version !== undefined ? { tag: asset.version } : undefined) - .then((releases: IReleaseData[]) => { - // Find neccessary asset - const last = releases[0]; - const target = last.assets.find((a) => a.name === asset.name); - if (!target) { - return reject(new Error(`No asset named ${asset.name} found`)); - } - // Download asset - net.download(target.browser_download_url, tmp) - .then(() => { - fs.copyFile(tmp, output, (copyErr: NodeJS.ErrnoException | null) => { - if (copyErr) { - reject( - new Error( - this._logger.warn( - `Fail copy file "${tmp}" to "${output}" due error: ${copyErr.message}`, - ), - ), - ); - } - fs.unlink(tmp, (rmErr: NodeJS.ErrnoException | null) => { - if (rmErr) { - this._logger.warn( - `Fail remove file "${tmp}" due error: ${rmErr.message}`, - ); - } - resolve(output); - }); - }); - }) - .catch((err: Error) => { - reject( - new Error( - `Fail to download asset ${target.browser_download_url} to ${tmp} due error: ${err.message}`, - ), - ); - }); - }) - .catch((err: Error) => { - reject(new Error(`Fail to get releases due error: ${err.message}`)); - }); - }); - } -} - -export default new GitHubClient(); diff --git a/application/holder/src/modules/index.ts b/application/holder/src/modules/index.ts deleted file mode 100644 index efeb462133..0000000000 --- a/application/holder/src/modules/index.ts +++ /dev/null @@ -1,22 +0,0 @@ -import { version } from './version'; -import { net } from './net'; -import { scope } from 'platform/env/scope'; -import { error } from 'platform/log/utils'; - -export async function init(): Promise { - const logger = scope.getLogger('modules'); - let errors = 0; - let count = 0; - for (const mod of [version, net]) { - try { - logger.debug(`initing "${mod.getName()}"`); - await mod.init(); - logger.debug(`"${mod.getName()}" is inited`); - count += 1; - } catch (err) { - logger.debug(`fail to init "${mod.getName()}": ${error(err)}`); - errors += 1; - } - } - logger.debug(`All modules are inited (inited: ${count}; errors: ${errors})...`); -} diff --git a/application/holder/src/modules/module.ts b/application/holder/src/modules/module.ts deleted file mode 100644 index 7f5859b7dc..0000000000 --- a/application/holder/src/modules/module.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { scope } from 'platform/env/scope'; -import { Logger } from 'platform/log'; -import { Subscriber } from 'platform/env/subscription'; - -export abstract class Module extends Subscriber { - public logger: Logger; - - constructor() { - super(); - this.logger = scope.getLogger(`mod: ${this.getName()}`); - this.init = this.init.bind(this); - } - - public abstract getName(): string; - - public init(): Promise { - return Promise.resolve(); - } -} diff --git a/application/holder/src/modules/net.ts b/application/holder/src/modules/net.ts deleted file mode 100644 index ffc2b0263f..0000000000 --- a/application/holder/src/modules/net.ts +++ /dev/null @@ -1,327 +0,0 @@ -import * as http from 'http'; -import * as https from 'https'; -import * as url from 'url'; -import * as fs from 'fs'; - -import { Transform } from 'stream'; -import { HttpProxyAgent } from 'http-proxy-agent'; -import { HttpsProxyAgent } from 'https-proxy-agent'; -import { Module } from './module'; -import { version } from '@module/version'; -import { error } from 'platform/log/utils'; -import { settings } from '@service/settings'; -import { envvars } from '@loader/envvars'; -import { unique } from 'platform/env/sequence'; - -const PROXY = { key: 'proxy', path: 'general.network' }; -const AUTHORIZATION = { key: 'authorization', path: 'general.network' }; -const STRICTSSL = { key: 'strictSSL', path: 'general.network' }; -const USER_AGENT_HEADER = 'User-Agent'; -const CONTENT_LENGTH = 'Content-Length'; - -export class NetworkError extends Error { - constructor(public readonly code: number | undefined, message: string) { - super(message); - } -} -export class Net extends Module { - public getName(): string { - return 'Net'; - } - - public getUserAgent(): string { - return `Chipmunk@${version.getVersion()}`; - } - - public getURL(uri: string): url.URL | Error { - try { - return new url.URL(uri); - } catch (err) { - return new Error(`Fail to parse ${uri} due error: ${error(err)}`); - } - } - - public getProxyURI(uri: url.URL): string | undefined { - const proxy = settings.get().value(PROXY.path, PROXY.key); - if (typeof proxy === 'string' && proxy.trim() !== '') { - return proxy; - } - const env = envvars.getOS(); - if (uri.protocol === 'http:') { - return env['HTTP_PROXY'] || env['http_proxy'] || undefined; - } else if (uri.protocol === 'https:') { - return ( - env['HTTPS_PROXY'] || - env['https_proxy'] || - env['HTTP_PROXY'] || - env['http_proxy'] || - undefined - ); - } - return undefined; - } - - public getProxyAgent(uri: url.URL): http.Agent | https.Agent | undefined { - const strictSSL = settings.get().value(STRICTSSL.path, STRICTSSL.key); - const proxyURL: string | undefined = this.getProxyURI(uri); - if (!proxyURL) { - return undefined; - } - const link: url.URL | Error = this.getURL(proxyURL); - if (link instanceof Error) { - this.logger.warn(link.message); - return undefined; - } - if (!/^https?:$/.test(link.protocol || '')) { - return undefined; - } - const opts = { - auth: - link.username !== '' && link.password !== '' - ? `${link.username}:${link.password}` - : '', - rejectUnauthorized: typeof strictSSL === 'boolean' ? strictSSL : true, - }; - return uri.protocol === 'http:' - ? new HttpProxyAgent(link, opts) - : new HttpsProxyAgent(link, opts); - } - - public getRequestOptions( - uri: url.URL, - type: 'GET' | 'POST' | 'PATCH' = 'GET', - headers: { [key: string]: string | number } = {}, - ): http.RequestOptions { - const config = { - password: '', - user: '', - }; - // TODO: Include into settings - const auth = settings.get().value(AUTHORIZATION.path, AUTHORIZATION.key); - if (headers[USER_AGENT_HEADER] === undefined) { - headers[USER_AGENT_HEADER] = this.getUserAgent(); - } - return { - agent: this.getProxyAgent(uri), - headers: - typeof auth === 'string' && auth.trim() !== '' - ? { - ...headers, - 'Proxy-Authorization': auth, - } - : headers, - hostname: uri.hostname, - port: uri.port ? parseInt(uri.port, 10) : uri.protocol === 'https:' ? 443 : 80, - protocol: uri.protocol, - // path: uri.pathname, - method: type || 'GET', - auth: - typeof config.password === 'string' && - typeof config.user === 'string' && - config.password.trim() !== '' && - config.user.trim() !== '' - ? `${config.user}:${config.password}` - : undefined, - }; - } - - public download(uri: string, filename: string): Promise { - return new Promise((resolve, reject) => { - const link: url.URL | Error = this.getURL(uri); - if (link instanceof Error) { - return reject( - new Error(this.logger.warn(`Fail to parse ${uri} due error: ${link.message}`)), - ); - } - if (link.protocol === undefined || link.protocol === null) { - return reject(new Error(`Not valid url: ${uri}`)); - } - const protocol = link.protocol.slice(0, -1); - const transport: { [key: string]: typeof http | typeof https } = { - http: http, - https: https, - }; - const opt = this.getRequestOptions(link); - transport[protocol] - .get(uri, opt, (response: http.IncomingMessage) => { - if ( - response.statusCode !== undefined && - response.statusCode >= 200 && - response.statusCode < 300 - ) { - const requestUuid = unique(); - this.logger.debug(`Successfully requested (${requestUuid}): ${uri}`); - const writer = fs.createWriteStream(filename); - writer.on('error', (saveErr: NodeJS.ErrnoException) => { - fs.unlink(filename, () => { - reject(saveErr); - }); - }); - writer.on('close', () => { - this.logger.debug(`Successfully download from ${uri} to ${filename}`); - resolve(filename); - }); - let received = 0; - let prev = Date.now(); - const logger = this.logger; - response - .pipe( - new Transform({ - transform( - chunk: string | Buffer, - _encoding: BufferEncoding, - callback: () => void, - ) { - received += chunk.length; - this.push(chunk); - callback(); - const current = Date.now(); - if (current - prev > 3000) { - logger.debug( - `Downloaded (${requestUuid}): ${received} bytes`, - ); - prev = Date.now(); - } - }, - }), - ) - .pipe(writer); - } else if (response.headers.location) { - this.download(response.headers.location, filename) - .then(resolve) - .catch(reject); - } else { - reject( - new Error( - this.logger.warn( - `Fail to connect to ${uri}: code = ${ - response.statusCode - }; status: ${response.statusMessage}; proxy usage: ${ - opt.agent !== undefined - }.`, - ), - ), - ); - } - }) - .on('error', (requestErr: NodeJS.ErrnoException) => { - fs.unlink(filename, () => { - reject(requestErr); - }); - }); - }); - } - - public getRaw(uri: string, headers: { [key: string]: string } = {}): Promise { - return new Promise((resolve, reject) => { - const tools = this.prepare(uri, headers, 'GET'); - if (tools instanceof NetworkError) { - return reject(tools); - } - tools.transport - .get(uri, tools.opt, (response: http.IncomingMessage) => { - this.processing(response, uri, tools.opt, resolve, reject); - }) - .on('error', (err: NodeJS.ErrnoException) => { - this.logger.warn( - `Fail to connect to ${uri}: code = ${err.code}; status: ${err.message}`, - ); - reject(new NetworkError(undefined, err.message)); - }); - }); - } - - public post( - uri: string, - headers: { [key: string]: string | number } = {}, - content: string, - type: 'POST' | 'PATCH' = 'POST', - ): Promise { - return new Promise((resolve, reject) => { - headers[CONTENT_LENGTH] = - headers[CONTENT_LENGTH] === undefined ? content.length : headers[CONTENT_LENGTH]; - const tools = this.prepare(uri, headers, type); - if (tools instanceof NetworkError) { - return reject(tools); - } - const request = tools.transport - .request(uri, tools.opt, (response: http.IncomingMessage) => { - this.processing(response, uri, tools.opt, resolve, reject); - }) - .on('error', (err: NodeJS.ErrnoException) => { - this.logger.warn( - `Fail to connect to ${uri}: code = ${err.code}; status: ${err.message}`, - ); - reject(new NetworkError(undefined, err.message)); - }); - request.write(content); - request.end(); - }); - } - - protected prepare( - uri: string, - headers: { [key: string]: string | number }, - type: 'POST' | 'PATCH' | 'GET', - ): { transport: typeof http | typeof https; opt: http.RequestOptions } | NetworkError { - const link: url.URL | Error = this.getURL(uri); - if (link instanceof Error) { - return new NetworkError( - undefined, - this.logger.warn(`Fail to parse ${uri} due error: ${link.message}`), - ); - } - if (link.protocol === undefined || link.protocol === null) { - return new NetworkError(undefined, `Not valid url: ${uri}`); - } - const protocol = link.protocol.slice(0, -1); - const transport: { [key: string]: typeof http | typeof https } = { - http: http, - https: https, - }; - return { - transport: transport[protocol], - opt: this.getRequestOptions(link, type, headers), - }; - } - - protected processing( - response: http.IncomingMessage, - uri: string, - opt: http.RequestOptions, - resolve: (res: string) => void, - reject: (err: NetworkError) => void, - ) { - if ( - response.statusCode !== undefined && - response.statusCode >= 200 && - response.statusCode < 300 - ) { - this.logger.debug(`Successfully requested: ${uri}`); - response.setEncoding('utf8'); - let raw = ''; - response.on('data', (chunk) => { - raw += chunk; - }); - response.on('end', () => { - this.logger.debug(`Successfully received from ${uri} ${raw.length} bytes`); - resolve(raw); - }); - } else if (response.headers.location) { - this.getRaw(response.headers.location).then(resolve).catch(reject); - } else { - reject( - new NetworkError( - response.statusCode, - this.logger.warn( - `Fail to connect to ${uri}: code = ${response.statusCode}; status: ${ - response.statusMessage - }; proxy usage: ${opt.agent !== undefined}.`, - ), - ), - ); - } - } -} - -export const net: Net = new Net(); diff --git a/application/holder/src/modules/version.ts b/application/holder/src/modules/version.ts deleted file mode 100644 index d8cfd983b6..0000000000 --- a/application/holder/src/modules/version.ts +++ /dev/null @@ -1,45 +0,0 @@ -import * as fs from 'fs'; -import * as path from 'path'; - -import { Module } from './module'; -import { paths } from '@service/paths'; -import { error } from 'platform/log/utils'; - -export interface IPackageFile { - version: string; - [key: string]: unknown; -} - -export class Version extends Module { - protected json!: IPackageFile; - - public getName(): string { - return 'Version'; - } - - public override init(): Promise { - return new Promise((resolve, reject) => { - const packageJsonFile = path.resolve(paths.getRoot(), 'package.json'); - if (!fs.existsSync(packageJsonFile)) { - return reject(new Error(`Fail to find ${packageJsonFile}`)); - } - fs.promises - .readFile(packageJsonFile, { encoding: 'utf-8' }) - .then((content: string) => { - try { - this.json = JSON.parse(content); - } catch (err) { - return reject(new Error(error(err))); - } - resolve(); - }) - .catch(reject); - }); - } - - public getVersion(): string { - return this.json.version; - } -} - -export const version: Version = new Version(); diff --git a/application/holder/src/preload/preload.ts b/application/holder/src/preload/preload.ts deleted file mode 100644 index e901135e28..0000000000 --- a/application/holder/src/preload/preload.ts +++ /dev/null @@ -1,57 +0,0 @@ -import { contextBridge, ipcRenderer, webUtils } from 'electron'; - -/** - * Exposes a safe API into the renderer process under `window.electron`. - * - * @remarks - * This API is defined in the preload script and isolated via - * `contextBridge.exposeInMainWorld`, so the renderer does not have - * direct access to Node.js or Electron internals. - * - * Namespaces: - * - `ipc` - wrapper around `ipcRenderer` for sending and receiving messages. - * - `webUtils` - exposes selected Electron utilities (e.g. file path resolution). - * - `clipboard` - provides clipboard operations via IPC handled in the main process. - */ -contextBridge.exposeInMainWorld('electron', { - ipc: { - /** - * Sends a message to the main process on the specified channel. - */ - send: (channel: string, msg: unknown) => ipcRenderer.send(channel, msg), - - /** - * Subscribes to messages on the specified channel. - */ - subscribe: (channel: string, callback: (...args: unknown[]) => void) => - ipcRenderer.on(channel, callback), - - /** - * Removes a specific listener from the specified channel. - */ - unsubscribe: (channel: string, callback: (...args: unknown[]) => void) => - ipcRenderer.removeListener(channel, callback), - - /** - * Removes all listeners from the specified channel. - */ - unsubscribeAll: (channel: string) => ipcRenderer.removeAllListeners(channel), - }, - webUtils: { - /** - * Returns the absolute filesystem path for a given File object. - */ - getPathForFile: (file: File) => webUtils.getPathForFile(file), - }, - clipboard: { - /** - * Writes data into the system clipboard via the main process. - * - * @param mime - MIME type of the data (for example `text/plain` or `image/png`). - * @param data - Raw content as an ArrayBuffer. - * @returns A promise that resolves when the data is written. - */ - write: (mime: string, data: ArrayBuffer) => - ipcRenderer.invoke('clipboard:write', { mime, data }), - }, -}); diff --git a/application/holder/src/register/global.ts b/application/holder/src/register/global.ts deleted file mode 100644 index fd18e5731e..0000000000 --- a/application/holder/src/register/global.ts +++ /dev/null @@ -1,13 +0,0 @@ -import * as cases from '@loader/exitcases'; - -export interface IApplication { - shutdown(signal: string): { - update(upd: cases.Update): Promise; - restart(cm: cases.Restart): Promise; - close(): Promise; - }; -} - -export interface ChipmunkGlobal extends Global { - application: IApplication; -} diff --git a/application/holder/src/register/services.ts b/application/holder/src/register/services.ts deleted file mode 100644 index 9f8ae7607f..0000000000 --- a/application/holder/src/register/services.ts +++ /dev/null @@ -1,69 +0,0 @@ -import { v4 } from 'uuid'; -import { Inputs } from 'platform/entity/service'; - -export const services: { [key: string]: Inputs } = { - electron: { - name: 'electron', - uuid: v4(), - }, - paths: { - name: 'paths', - uuid: v4(), - }, - production: { - name: 'production', - uuid: v4(), - }, - sessions: { - name: 'sessions', - uuid: v4(), - }, - jobs: { - name: 'jobs', - uuid: v4(), - }, - bridge: { - name: 'bridge', - uuid: v4(), - }, - unbound: { - name: 'unbound', - uuid: v4(), - }, - storage: { - name: 'storage', - uuid: v4(), - }, - settings: { - name: 'settings', - uuid: v4(), - }, - updater: { - name: 'updater', - uuid: v4(), - }, - notifications: { - name: 'notifications', - uuid: v4(), - }, - env: { - name: 'env', - uuid: v4(), - }, - hotkeys: { - name: 'hotkeys', - uuid: v4(), - }, - cli: { - name: 'cli', - uuid: v4(), - }, - menu: { - name: 'menu', - uuid: v4(), - }, - github: { - name: 'github', - uuid: v4(), - }, -}; diff --git a/application/holder/src/service/actions/about.ts b/application/holder/src/service/actions/about.ts deleted file mode 100644 index 5315727509..0000000000 --- a/application/holder/src/service/actions/about.ts +++ /dev/null @@ -1,10 +0,0 @@ -import * as Requests from 'platform/ipc/request'; - -export function handler(): Promise { - return Requests.IpcRequest.send( - Requests.Actions.About.Response, - new Requests.Actions.About.Request(), - ).then(() => { - return Promise.resolve(); - }); -} diff --git a/application/holder/src/service/actions/export.session.state.ts b/application/holder/src/service/actions/export.session.state.ts deleted file mode 100644 index 77c7524a24..0000000000 --- a/application/holder/src/service/actions/export.session.state.ts +++ /dev/null @@ -1,10 +0,0 @@ -import * as Requests from 'platform/ipc/request'; - -export function handler(): Promise { - return Requests.IpcRequest.send( - Requests.Actions.ExportSessionState.Response, - new Requests.Actions.ExportSessionState.Request(), - ).then(() => { - return Promise.resolve(); - }); -} diff --git a/application/holder/src/service/actions/find.ts b/application/holder/src/service/actions/find.ts deleted file mode 100644 index 2b0853fa91..0000000000 --- a/application/holder/src/service/actions/find.ts +++ /dev/null @@ -1,10 +0,0 @@ -import * as Requests from 'platform/ipc/request'; - -export function handler(): Promise { - return Requests.IpcRequest.send( - Requests.Actions.FindInSearch.Response, - new Requests.Actions.FindInSearch.Request(), - ).then(() => { - return Promise.resolve(); - }); -} diff --git a/application/holder/src/service/actions/help.ts b/application/holder/src/service/actions/help.ts deleted file mode 100644 index 07e5384927..0000000000 --- a/application/holder/src/service/actions/help.ts +++ /dev/null @@ -1,10 +0,0 @@ -import * as Requests from 'platform/ipc/request'; - -export function handler(): Promise { - return Requests.IpcRequest.send( - Requests.Actions.Help.Response, - new Requests.Actions.Help.Request(), - ).then(() => { - return Promise.resolve(); - }); -} diff --git a/application/holder/src/service/actions/import.session.state.ts b/application/holder/src/service/actions/import.session.state.ts deleted file mode 100644 index dcff8eae48..0000000000 --- a/application/holder/src/service/actions/import.session.state.ts +++ /dev/null @@ -1,10 +0,0 @@ -import * as Requests from 'platform/ipc/request'; - -export function handler(): Promise { - return Requests.IpcRequest.send( - Requests.Actions.ImportSessionState.Response, - new Requests.Actions.ImportSessionState.Request(), - ).then(() => { - return Promise.resolve(); - }); -} diff --git a/application/holder/src/service/actions/index.ts b/application/holder/src/service/actions/index.ts deleted file mode 100644 index ce0bf62f65..0000000000 --- a/application/holder/src/service/actions/index.ts +++ /dev/null @@ -1,14 +0,0 @@ -export { handler as openFile } from './open.file'; -export { handler as openFolder } from './open.folder'; -export { handler as stream } from './stream'; -export { handler as about } from './about'; -export { handler as settings } from './settings'; -export { handler as updates } from './updates'; -export { handler as help } from './help'; -export { handler as jumpto } from './jumpto'; -export { handler as find } from './find'; -export { handler as exportSessionState } from './export.session.state'; -export { handler as importSessionState } from './import.session.state'; -export { handler as themeDark } from './theme.dark'; -export { handler as themeLight } from './theme.light'; -export { handler as pluginsManager } from './plugins_manager'; diff --git a/application/holder/src/service/actions/jumpto.ts b/application/holder/src/service/actions/jumpto.ts deleted file mode 100644 index 9f4587f54e..0000000000 --- a/application/holder/src/service/actions/jumpto.ts +++ /dev/null @@ -1,10 +0,0 @@ -import * as Requests from 'platform/ipc/request'; - -export function handler(): Promise { - return Requests.IpcRequest.send( - Requests.Actions.JumpTo.Response, - new Requests.Actions.JumpTo.Request(), - ).then(() => { - return Promise.resolve(); - }); -} diff --git a/application/holder/src/service/actions/open.file.ts b/application/holder/src/service/actions/open.file.ts deleted file mode 100644 index aa8b4896e8..0000000000 --- a/application/holder/src/service/actions/open.file.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { FileType } from 'platform/types/observe/types/file'; - -import * as Requests from 'platform/ipc/request'; - -export function handler(type: FileType | undefined): Promise { - return new Promise((resolve, reject) => { - Requests.IpcRequest.send( - Requests.Actions.OpenFile.Response, - new Requests.Actions.OpenFile.Request({ type }), - ).then((response) => { - if (response.error === undefined) { - return resolve(); - } - reject(new Error(response.error)); - }); - }); -} diff --git a/application/holder/src/service/actions/open.folder.ts b/application/holder/src/service/actions/open.folder.ts deleted file mode 100644 index 0c041a0c80..0000000000 --- a/application/holder/src/service/actions/open.folder.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { FileType } from 'platform/types/observe/types/file'; - -import * as Requests from 'platform/ipc/request'; - -export function handler(type: FileType | undefined): Promise { - return new Promise((resolve, reject) => { - Requests.IpcRequest.send( - Requests.Actions.OpenFolder.Response, - new Requests.Actions.OpenFolder.Request({ type }), - ).then((response) => { - if (response.error === undefined) { - return resolve(); - } - reject(new Error(response.error)); - }); - }); -} diff --git a/application/holder/src/service/actions/plugins_manager.ts b/application/holder/src/service/actions/plugins_manager.ts deleted file mode 100644 index 9b49b6da56..0000000000 --- a/application/holder/src/service/actions/plugins_manager.ts +++ /dev/null @@ -1,10 +0,0 @@ -import * as Requests from 'platform/ipc/request'; - -export function handler(): Promise { - return Requests.IpcRequest.send( - Requests.Actions.PluginsManager.Response, - new Requests.Actions.PluginsManager.Request(), - ).then(() => { - return Promise.resolve(); - }); -} diff --git a/application/holder/src/service/actions/settings.ts b/application/holder/src/service/actions/settings.ts deleted file mode 100644 index 7671612b9f..0000000000 --- a/application/holder/src/service/actions/settings.ts +++ /dev/null @@ -1,10 +0,0 @@ -import * as Requests from 'platform/ipc/request'; - -export function handler(): Promise { - return Requests.IpcRequest.send( - Requests.Actions.Settings.Response, - new Requests.Actions.Settings.Request(), - ).then(() => { - return Promise.resolve(); - }); -} diff --git a/application/holder/src/service/actions/stream.ts b/application/holder/src/service/actions/stream.ts deleted file mode 100644 index d33c19cde7..0000000000 --- a/application/holder/src/service/actions/stream.ts +++ /dev/null @@ -1,20 +0,0 @@ -import * as $ from 'platform/types/observe'; - -import * as Requests from 'platform/ipc/request'; - -export function handler( - protocol: $.Parser.Protocol, - source?: $.Origin.Stream.Stream.Source, -): Promise { - return new Promise((resolve, reject) => { - Requests.IpcRequest.send( - Requests.Actions.Stream.Response, - new Requests.Actions.Stream.Request({ protocol, source }), - ).then((response) => { - if (response.error === undefined) { - return resolve(); - } - reject(new Error(response.error)); - }); - }); -} diff --git a/application/holder/src/service/actions/theme.dark.ts b/application/holder/src/service/actions/theme.dark.ts deleted file mode 100644 index 09b3d1068a..0000000000 --- a/application/holder/src/service/actions/theme.dark.ts +++ /dev/null @@ -1,10 +0,0 @@ -import * as Requests from 'platform/ipc/request'; - -export function handler(): Promise { - return Requests.IpcRequest.send( - Requests.Actions.ThemeDark.Response, - new Requests.Actions.ThemeDark.Request(), - ).then(() => { - return Promise.resolve(); - }); -} diff --git a/application/holder/src/service/actions/theme.light.ts b/application/holder/src/service/actions/theme.light.ts deleted file mode 100644 index e13c585b13..0000000000 --- a/application/holder/src/service/actions/theme.light.ts +++ /dev/null @@ -1,10 +0,0 @@ -import * as Requests from 'platform/ipc/request'; - -export function handler(): Promise { - return Requests.IpcRequest.send( - Requests.Actions.ThemeLight.Response, - new Requests.Actions.ThemeLight.Request(), - ).then(() => { - return Promise.resolve(); - }); -} diff --git a/application/holder/src/service/actions/updates.ts b/application/holder/src/service/actions/updates.ts deleted file mode 100644 index 8d4b308206..0000000000 --- a/application/holder/src/service/actions/updates.ts +++ /dev/null @@ -1,10 +0,0 @@ -import * as Requests from 'platform/ipc/request'; - -export function handler(): Promise { - return Requests.IpcRequest.send( - Requests.Actions.Updates.Response, - new Requests.Actions.Updates.Request(), - ).then(() => { - return Promise.resolve(); - }); -} diff --git a/application/holder/src/service/bridge.ts b/application/holder/src/service/bridge.ts deleted file mode 100644 index 25df624a75..0000000000 --- a/application/holder/src/service/bridge.ts +++ /dev/null @@ -1,221 +0,0 @@ -import { - SetupService, - Interface, - Implementation, - register, - DependOn, -} from 'platform/entity/service'; -import { services } from '@register/services'; -import { electron } from '@service/electron'; -import { Logger } from '@env/logs/index'; - -import * as Requests from 'platform/ipc/request'; -import * as RequestHandlers from './bridge/index'; -import * as Events from 'platform/ipc/event'; - -@DependOn(electron) -@SetupService(services['bridge']) -export class Service extends Implementation { - protected logger: Logger | undefined; - - public override ready(): Promise { - this.register( - electron - .ipc() - .respondent( - this.getName(), - Requests.Actions.UrlInBrowser.Request, - RequestHandlers.Actions.BrowserUrl.handler, - ), - ); - this.register( - electron - .ipc() - .respondent( - this.getName(), - Requests.App.Version.Request, - RequestHandlers.App.Version.handler, - ), - ); - this.register( - electron - .ipc() - .respondent( - this.getName(), - Requests.App.AlphaRelease.Request, - RequestHandlers.App.AlphaRelease.handler, - ), - ); - this.register( - electron - .ipc() - .respondent( - this.getName(), - Requests.App.Changelogs.Request, - RequestHandlers.App.Changelogs.handler, - ), - ); - this.register( - electron - .ipc() - .respondent( - this.getName(), - Requests.File.Save.Request, - RequestHandlers.File.Save.handler, - ), - ); - this.register( - electron - .ipc() - .respondent( - this.getName(), - Requests.File.Select.Request, - RequestHandlers.File.Select.handler, - ), - ); - this.register( - electron - .ipc() - .respondent( - this.getName(), - Requests.Folder.Select.Request, - RequestHandlers.Folder.Select.handler, - ), - ); - this.register( - electron - .ipc() - .respondent( - this.getName(), - Requests.Folder.Choose.Request, - RequestHandlers.Folder.Choose.handler, - ), - ); - this.register( - electron - .ipc() - .respondent( - this.getName(), - Requests.Folder.ShellOpen.Request, - RequestHandlers.Folder.ShellOpen.handler, - ), - ); - this.register( - electron - .ipc() - .respondent( - this.getName(), - Requests.Folder.Delimiter.Request, - RequestHandlers.Folder.Delimiter.handler, - ), - ); - this.register( - electron - .ipc() - .respondent( - this.getName(), - Requests.File.File.Request, - RequestHandlers.File.File.handler, - ), - ); - this.register( - electron - .ipc() - .respondent( - this.getName(), - Requests.File.Exists.Request, - RequestHandlers.File.Exists.handler, - ), - ); - this.register( - electron - .ipc() - .respondent( - this.getName(), - Requests.File.Name.Request, - RequestHandlers.File.Name.handler, - ), - ); - this.register( - electron - .ipc() - .respondent( - this.getName(), - Requests.File.Copy.Request, - RequestHandlers.File.Copy.handler, - ), - ); - this.register( - electron - .ipc() - .respondent( - this.getName(), - Requests.File.Read.Request, - RequestHandlers.File.Read.handler, - ), - ); - this.register( - electron - .ipc() - .respondent( - this.getName(), - Requests.File.Write.Request, - RequestHandlers.File.Write.handler, - ), - ); - this.register( - electron - .ipc() - .respondent( - this.getName(), - Requests.File.ExportSession.Request, - RequestHandlers.File.ExportSession.handler, - ), - ); - this.register( - electron - .ipc() - .respondent( - this.getName(), - Requests.File.CopyFile.Request, - RequestHandlers.File.CopyFile.handler, - ), - ); - this.register( - electron - .ipc() - .respondent( - this.getName(), - Requests.Os.AsFSEntity.Request, - RequestHandlers.Os.AsFSEntity.handler, - ), - ); - this.register( - electron - .ipc() - .respondent( - this.getName(), - Requests.Os.HomeDir.Request, - RequestHandlers.Os.HomeDir.handler, - ), - ); - this.register( - Events.IpcEvent.subscribe(Events.Logs.Write.Event, (event: Events.Logs.Write.Event) => { - if (this.logger === undefined) { - this.logger = new Logger('CLIENT'); - } - this.logger.publish(`[C]${event.message}`, event.level); - this.logger.store(`[C]${event.message}`, event.level); - }), - ); - return Promise.resolve(); - } - - public override destroy(): Promise { - this.unsubscribe(); - this.logger = undefined; - return Promise.resolve(); - } -} -export interface Service extends Interface {} -export const bridge = register(new Service()); diff --git a/application/holder/src/service/bridge/actions/browserurl.ts b/application/holder/src/service/bridge/actions/browserurl.ts deleted file mode 100644 index a2996053a1..0000000000 --- a/application/holder/src/service/bridge/actions/browserurl.ts +++ /dev/null @@ -1,24 +0,0 @@ -import { CancelablePromise } from 'platform/env/promise'; -import { Logger } from 'platform/log'; -import { shell } from 'electron'; - -import * as Requests from 'platform/ipc/request'; - -export const handler = Requests.InjectLogger< - Requests.Actions.UrlInBrowser.Request, - CancelablePromise ->( - ( - _log: Logger, - request: Requests.Actions.UrlInBrowser.Request, - ): CancelablePromise => { - return new CancelablePromise((resolve, reject) => { - shell - .openExternal(request.url) - .then(() => { - resolve(new Requests.Actions.UrlInBrowser.Response()); - }) - .catch(reject); - }); - }, -); diff --git a/application/holder/src/service/bridge/actions/index.ts b/application/holder/src/service/bridge/actions/index.ts deleted file mode 100644 index 04ee48c6ec..0000000000 --- a/application/holder/src/service/bridge/actions/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * as BrowserUrl from './browserurl'; diff --git a/application/holder/src/service/bridge/app/alpha_release.ts b/application/holder/src/service/bridge/app/alpha_release.ts deleted file mode 100644 index c4d4035055..0000000000 --- a/application/holder/src/service/bridge/app/alpha_release.ts +++ /dev/null @@ -1,48 +0,0 @@ -import { CancelablePromise } from 'platform/env/promise'; -import { Logger } from 'platform/log'; -import { GitHubClient } from '@module/github'; -import { REPO } from '@service/updater'; -import { getLatestAlphaRelease, getReleaseLabel } from '@service/updater/alpha'; - -import * as Requests from 'platform/ipc/request'; - -export const handler = Requests.InjectLogger< - Requests.App.AlphaRelease.Request, - CancelablePromise ->( - ( - _log: Logger, - _request: Requests.App.AlphaRelease.Request, - ): CancelablePromise => { - return new CancelablePromise((resolve, _reject) => { - const github = new GitHubClient(); - github - .getReleases({ repo: REPO }) - .then((releases) => { - const alphaRelease = getLatestAlphaRelease(releases); - resolve( - new Requests.App.AlphaRelease.Response({ - version: - alphaRelease === undefined - ? undefined - : getReleaseLabel(alphaRelease.release), - url: - alphaRelease === undefined - ? undefined - : alphaRelease.release.html_url, - error: undefined, - }), - ); - }) - .catch((err: Error) => { - resolve( - new Requests.App.AlphaRelease.Response({ - version: undefined, - url: undefined, - error: err.message, - }), - ); - }); - }); - }, -); diff --git a/application/holder/src/service/bridge/app/changelogs.ts b/application/holder/src/service/bridge/app/changelogs.ts deleted file mode 100644 index c8c8e1007e..0000000000 --- a/application/holder/src/service/bridge/app/changelogs.ts +++ /dev/null @@ -1,73 +0,0 @@ -import { CancelablePromise } from 'platform/env/promise'; -import { Logger } from 'platform/log'; -import { version } from '@module/version'; -import { GitHubClient, IReleaseData } from '@module/github'; -import { Version } from '@service/updater/version'; -import { getCleanVersion, REPO } from '@service/updater'; -import { error } from 'platform/log/utils'; - -import * as Requests from 'platform/ipc/request'; - -async function getReleaseInfo( - version: string, - log: Logger, -): Promise<{ release: IReleaseData; version: Version } | undefined> { - const github = new GitHubClient(); - const releases: IReleaseData[] = await github.getReleases({ repo: REPO }); - const target: Version = new Version(version); - let candidate: { release: IReleaseData; version: Version } | undefined; - releases.forEach((release: IReleaseData) => { - if (candidate !== undefined) { - return; - } - try { - const version = new Version(getCleanVersion(release.name)); - if (target.isGivenSame(version)) { - candidate = { - release, - version, - }; - } - } catch (err) { - log.warn( - `Found release "${release.name} (tag: ${ - release.tag_name - })", but version isn't valid: ${error(err)}`, - ); - } - }); - return candidate; -} - -export const handler = Requests.InjectLogger< - Requests.App.Changelogs.Request, - CancelablePromise ->( - ( - log: Logger, - request: Requests.App.Changelogs.Request, - ): CancelablePromise => { - return new CancelablePromise((resolve, _reject) => { - const ver = request.version === undefined ? version.getVersion() : request.version; - getReleaseInfo(ver, log) - .then((candidate) => { - resolve( - new Requests.App.Changelogs.Response({ - markdown: candidate === undefined ? '' : candidate.release.body, - version: ver, - error: undefined, - }), - ); - }) - .catch((err: Error) => { - resolve( - new Requests.App.Changelogs.Response({ - markdown: ``, - version: ver, - error: err.message, - }), - ); - }); - }); - }, -); diff --git a/application/holder/src/service/bridge/app/index.ts b/application/holder/src/service/bridge/app/index.ts deleted file mode 100644 index ffba0f2a99..0000000000 --- a/application/holder/src/service/bridge/app/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -export * as Version from './version'; -export * as Changelogs from './changelogs'; -export * as AlphaRelease from './alpha_release'; diff --git a/application/holder/src/service/bridge/app/version.ts b/application/holder/src/service/bridge/app/version.ts deleted file mode 100644 index 8159dc239f..0000000000 --- a/application/holder/src/service/bridge/app/version.ts +++ /dev/null @@ -1,24 +0,0 @@ -import { CancelablePromise } from 'platform/env/promise'; -import { Logger } from 'platform/log'; -import { version } from '@module/version'; - -import * as Requests from 'platform/ipc/request'; - -export const handler = Requests.InjectLogger< - Requests.App.Version.Request, - CancelablePromise ->( - ( - _log: Logger, - _request: Requests.App.Version.Request, - ): CancelablePromise => { - return new CancelablePromise((resolve, _reject) => { - resolve( - new Requests.App.Version.Response({ - version: version.getVersion(), - error: undefined, - }), - ); - }); - }, -); diff --git a/application/holder/src/service/bridge/file/copy.ts b/application/holder/src/service/bridge/file/copy.ts deleted file mode 100644 index 97a58545a7..0000000000 --- a/application/holder/src/service/bridge/file/copy.ts +++ /dev/null @@ -1,57 +0,0 @@ -import { CancelablePromise } from 'platform/env/promise'; -import { Logger } from 'platform/log'; - -import * as path from 'path'; -import * as fs from 'fs'; -import * as Requests from 'platform/ipc/request'; - -export const handler = Requests.InjectLogger< - Requests.File.Copy.Request, - CancelablePromise ->( - ( - log: Logger, - request: Requests.File.Copy.Request, - ): CancelablePromise => { - return new CancelablePromise((resolve, reject) => { - if (!fs.existsSync(request.dest)) { - return resolve( - new Requests.File.Copy.Response({ - error: `Folder ${request.dest} doesn't exist`, - }), - ); - } - if (request.files !== undefined && request.files.length !== 0) { - const errors: string[] = []; - Promise.allSettled( - request.files.map((filename) => - fs.promises - .copyFile(filename, path.join(request.dest, path.basename(filename))) - .catch((err: Error) => { - log.warn( - `Fail to copy file from ${filename} to ${request.dest}: ${err.message}`, - ); - errors.push(err.message); - }), - ), - ) - .then((results) => { - if (results.filter((r) => r.status === 'rejected').length > 0) { - resolve( - new Requests.File.Copy.Response({ - error: `Some copy operation were failed`, - }), - ); - } else if (errors.length > 0) { - resolve(new Requests.File.Copy.Response({ error: errors.join('; ') })); - } else { - resolve(new Requests.File.Copy.Response({})); - } - }) - .catch(reject); - } else { - return reject(new Error(`Not supported source of data`)); - } - }); - }, -); diff --git a/application/holder/src/service/bridge/file/copyfile.ts b/application/holder/src/service/bridge/file/copyfile.ts deleted file mode 100644 index 21596ea87b..0000000000 --- a/application/holder/src/service/bridge/file/copyfile.ts +++ /dev/null @@ -1,30 +0,0 @@ -import { CancelablePromise } from 'platform/env/promise'; -import { Logger } from 'platform/log'; - -import * as fs from 'fs'; -import * as Requests from 'platform/ipc/request'; - -export const handler = Requests.InjectLogger< - Requests.File.CopyFile.Request, - CancelablePromise ->( - ( - log: Logger, - request: Requests.File.CopyFile.Request, - ): CancelablePromise => { - return new CancelablePromise((resolve, _reject) => { - fs.promises - .copyFile(request.src, request.dest) - .then(() => { - resolve(new Requests.File.Copy.Response({})); - }) - .catch((err: Error) => { - resolve( - new Requests.File.Copy.Response({ - error: err.message, - }), - ); - }); - }); - }, -); diff --git a/application/holder/src/service/bridge/file/exists.ts b/application/holder/src/service/bridge/file/exists.ts deleted file mode 100644 index c4a124b885..0000000000 --- a/application/holder/src/service/bridge/file/exists.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { CancelablePromise } from 'platform/env/promise'; -import { Logger } from 'platform/log'; - -import * as fs from 'fs'; -import * as Requests from 'platform/ipc/request'; - -export const handler = Requests.InjectLogger< - Requests.File.Exists.Request, - CancelablePromise ->( - ( - _log: Logger, - request: Requests.File.Exists.Request, - ): CancelablePromise => { - return new CancelablePromise((resolve, _reject) => { - resolve( - new Requests.File.Exists.Response({ - exists: fs.existsSync(request.path), - }), - ); - }); - }, -); diff --git a/application/holder/src/service/bridge/file/exportsession.ts b/application/holder/src/service/bridge/file/exportsession.ts deleted file mode 100644 index 6593cec60c..0000000000 --- a/application/holder/src/service/bridge/file/exportsession.ts +++ /dev/null @@ -1,67 +0,0 @@ -import { CancelablePromise } from 'platform/env/promise'; -import { Logger } from 'platform/log'; -import { electron } from '@service/electron'; -import { sessions } from '@service/sessions'; - -import * as fs from 'fs'; -import * as Requests from 'platform/ipc/request'; - -export const handler = Requests.InjectLogger< - Requests.File.ExportSession.Request, - CancelablePromise ->( - ( - log: Logger, - request: Requests.File.ExportSession.Request, - ): CancelablePromise => { - return new CancelablePromise((resolve, _reject) => { - const session = sessions.get(request.uuid); - if (session === undefined) { - return resolve( - new Requests.File.ExportSession.Response({ - error: `Session ${request.uuid} isn't found`, - }), - ); - } - electron - .dialogs() - .saveFile('.txt') - .then((filename: string | undefined) => { - if (filename === undefined) { - return resolve(new Requests.File.ExportSession.Response({})); - } - session.session - .getNativeSession() - .getSessionFile() - .then((sessionFileName: string) => { - fs.promises - .copyFile(sessionFileName, filename) - .then(() => { - resolve(new Requests.File.ExportSession.Response({})); - }) - .catch((err: Error) => { - resolve( - new Requests.File.ExportSession.Response({ - error: err.message, - }), - ); - }); - }) - .catch((err: Error) => { - resolve( - new Requests.File.ExportSession.Response({ - error: `Fail get session file: ${err.message}`, - }), - ); - }); - }) - .catch((err: Error) => { - resolve( - new Requests.File.ExportSession.Response({ - error: `Fail select file to save: ${err.message}`, - }), - ); - }); - }); - }, -); diff --git a/application/holder/src/service/bridge/file/file.ts b/application/holder/src/service/bridge/file/file.ts deleted file mode 100644 index 0237f55121..0000000000 --- a/application/holder/src/service/bridge/file/file.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { CancelablePromise } from 'platform/env/promise'; -import { Logger } from 'platform/log'; -import { getFileEntities, getFolders, getFilesFromFolder } from '@env/fs'; - -import * as Requests from 'platform/ipc/request'; - -export const handler = Requests.InjectLogger< - Requests.File.File.Request, - CancelablePromise ->( - ( - log: Logger, - request: Requests.File.File.Request, - ): CancelablePromise => { - return new CancelablePromise((resolve, reject) => { - const folders = getFolders(request.filename); - if (folders instanceof Error) { - return reject(folders); - } - getFilesFromFolder(folders, []) - .then((paths: string[]) => { - getFileEntities(request.filename.concat(paths)) - .then(files => { - if (files instanceof Error) { - return reject(files); - } - resolve( - new Requests.File.File.Response({ - files - }) - ) - }) - .catch(reject); - }) - .catch(reject); - }); - }, -); diff --git a/application/holder/src/service/bridge/file/index.ts b/application/holder/src/service/bridge/file/index.ts deleted file mode 100644 index 49513fef6d..0000000000 --- a/application/holder/src/service/bridge/file/index.ts +++ /dev/null @@ -1,10 +0,0 @@ -export * as Select from './select'; -export * as File from './file'; -export * as Save from './save'; -export * as Exists from './exists'; -export * as Name from './name'; -export * as Copy from './copy'; -export * as CopyFile from './copyfile'; -export * as Read from './read'; -export * as Write from './write'; -export * as ExportSession from './exportsession'; diff --git a/application/holder/src/service/bridge/file/name.ts b/application/holder/src/service/bridge/file/name.ts deleted file mode 100644 index 69cd3d34cd..0000000000 --- a/application/holder/src/service/bridge/file/name.ts +++ /dev/null @@ -1,26 +0,0 @@ -import { CancelablePromise } from 'platform/env/promise'; -import { Logger } from 'platform/log'; - -import * as Requests from 'platform/ipc/request'; -import * as path from 'path'; - -export const handler = Requests.InjectLogger< - Requests.File.Name.Request, - CancelablePromise ->( - ( - _log: Logger, - request: Requests.File.Name.Request, - ): CancelablePromise => { - return new CancelablePromise((resolve, _reject) => { - resolve( - new Requests.File.Name.Response({ - filename: request.path, - parent: path.dirname(request.path), - ext: path.extname(request.path), - name: path.basename(request.path), - }), - ); - }); - }, -); diff --git a/application/holder/src/service/bridge/file/read.ts b/application/holder/src/service/bridge/file/read.ts deleted file mode 100644 index e3a89194c3..0000000000 --- a/application/holder/src/service/bridge/file/read.ts +++ /dev/null @@ -1,44 +0,0 @@ -import { CancelablePromise } from 'platform/env/promise'; -import { Logger } from 'platform/log'; - -import * as fs from 'fs'; -import * as Requests from 'platform/ipc/request'; - -export const handler = Requests.InjectLogger< - Requests.File.Read.Request, - CancelablePromise ->( - ( - _log: Logger, - request: Requests.File.Read.Request, - ): CancelablePromise => { - return new CancelablePromise((resolve, _reject) => { - if (!fs.existsSync(request.file)) { - return resolve( - new Requests.File.Read.Response({ - text: undefined, - error: `File ${request.file} doesn't exist`, - }), - ); - } - fs.promises - .readFile(request.file, { encoding: 'utf-8' }) - .then((text: string) => { - return resolve( - new Requests.File.Read.Response({ - text, - error: undefined, - }), - ); - }) - .catch((err: Error) => { - return resolve( - new Requests.File.Read.Response({ - text: undefined, - error: `Fail to read file ${request.file}: ${err.message}`, - }), - ); - }); - }); - }, -); diff --git a/application/holder/src/service/bridge/file/save.ts b/application/holder/src/service/bridge/file/save.ts deleted file mode 100644 index 1ebb81907e..0000000000 --- a/application/holder/src/service/bridge/file/save.ts +++ /dev/null @@ -1,37 +0,0 @@ -import { electron } from '@service/electron'; -import { CancelablePromise } from 'platform/env/promise'; -import { Logger } from 'platform/log'; - -import * as Requests from 'platform/ipc/request'; - -export const handler = Requests.InjectLogger< - Requests.File.Save.Request, - CancelablePromise ->( - ( - log: Logger, - request: Requests.File.Save.Request, - ): CancelablePromise => { - return new CancelablePromise((resolve) => { - electron - .dialogs() - .saveFile(request.ext, request.defaultFileName) - .then((file: string | undefined) => { - resolve( - new Requests.File.Save.Response({ - filename: file, - error: undefined, - }), - ); - }) - .catch((err: Error) => { - resolve( - new Requests.File.Save.Response({ - filename: undefined, - error: err.message, - }), - ); - }); - }); - }, -); diff --git a/application/holder/src/service/bridge/file/select.ts b/application/holder/src/service/bridge/file/select.ts deleted file mode 100644 index dd038a9b16..0000000000 --- a/application/holder/src/service/bridge/file/select.ts +++ /dev/null @@ -1,150 +0,0 @@ -import { CancelablePromise } from 'platform/env/promise'; -import { Logger } from 'platform/log'; -import { electron } from '@service/electron'; -import { File } from 'platform/types/files'; -import { FileType } from 'platform/types/observe/types/file'; -import { getFileEntities } from '@env/fs'; - -import * as Requests from 'platform/ipc/request'; - -function any(ext?: string): Promise { - return new Promise((resolve, reject) => { - electron - .dialogs() - .openFile() - .any(ext) - .then((files: string[]) => { - getFileEntities(files) - .then((entities) => { - if (entities instanceof Error) { - reject(entities); - } else { - resolve(entities); - } - }) - .catch(reject); - }) - .catch(reject); - }); -} - -function dlt(): Promise { - return new Promise((resolve, reject) => { - electron - .dialogs() - .openFile() - .dlt() - .then((files: string[]) => { - getFileEntities(files) - .then((entities) => { - if (entities instanceof Error) { - reject(entities); - } else { - resolve(entities); - } - }) - .catch(reject); - }) - .catch(reject); - }); -} - -function pcapng(): Promise { - return new Promise((resolve, reject) => { - electron - .dialogs() - .openFile() - .pcapng() - .then((files: string[]) => { - getFileEntities(files) - .then((entities) => { - if (entities instanceof Error) { - reject(entities); - } else { - resolve(entities); - } - }) - .catch(reject); - }) - .catch(reject); - }); -} - -function pcap(): Promise { - return new Promise((resolve, reject) => { - electron - .dialogs() - .openFile() - .pcap() - .then((files: string[]) => { - getFileEntities(files) - .then((entities) => { - if (entities instanceof Error) { - reject(entities); - } else { - resolve(entities); - } - }) - .catch(reject); - }) - .catch(reject); - }); -} - -function parserPlugin(): Promise { - return new Promise((resolve, reject) => { - electron - .dialogs() - .openFile() - .plugins() - .then((files: string[]) => { - getFileEntities(files, FileType.ParserPlugin) - .then((entities) => { - if (entities instanceof Error) { - reject(entities); - } else { - resolve(entities); - } - }) - .catch(reject); - }) - .catch(reject); - }); -} - -export const handler = Requests.InjectLogger< - Requests.File.Select.Request, - CancelablePromise ->( - ( - log: Logger, - request: Requests.File.Select.Request, - ): CancelablePromise => { - return new CancelablePromise((resolve, reject) => { - (() => { - switch (request.target) { - case FileType.Text: - return any(request.ext); - case FileType.Binary: - return dlt(); - case FileType.PcapNG: - return pcapng(); - case FileType.PcapLegacy: - return pcap(); - case FileType.ParserPlugin: - return parserPlugin(); - default: - return any(request.ext); - } - })() - .then((files: File[]) => { - resolve( - new Requests.File.Select.Response({ - files, - }), - ); - }) - .catch(reject); - }); - }, -); diff --git a/application/holder/src/service/bridge/file/write.ts b/application/holder/src/service/bridge/file/write.ts deleted file mode 100644 index 463b302b50..0000000000 --- a/application/holder/src/service/bridge/file/write.ts +++ /dev/null @@ -1,42 +0,0 @@ -import { CancelablePromise } from 'platform/env/promise'; -import { Logger } from 'platform/log'; - -import * as fs from 'fs'; -import * as Requests from 'platform/ipc/request'; - -export const handler = Requests.InjectLogger< - Requests.File.Write.Request, - CancelablePromise ->( - ( - _log: Logger, - request: Requests.File.Write.Request, - ): CancelablePromise => { - return new CancelablePromise((resolve, _reject) => { - const exist = fs.existsSync(request.filename); - if (exist && !request.overwrite) { - return resolve( - new Requests.File.Write.Response({ - error: `File ${request.filename} exist`, - }), - ); - } - fs.promises - .writeFile(request.filename, request.content, 'utf8') - .then(() => { - return resolve( - new Requests.File.Write.Response({ - error: undefined, - }), - ); - }) - .catch((err: Error) => { - return resolve( - new Requests.File.Write.Response({ - error: `Fail to write file ${request.filename}: ${err.message}`, - }), - ); - }); - }); - }, -); diff --git a/application/holder/src/service/bridge/folder/choose.ts b/application/holder/src/service/bridge/folder/choose.ts deleted file mode 100644 index 4dcca28f58..0000000000 --- a/application/holder/src/service/bridge/folder/choose.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { CancelablePromise } from 'platform/env/promise'; -import { Logger } from 'platform/log'; -import { electron } from '@service/electron'; - -import * as Requests from 'platform/ipc/request'; - -export const handler = Requests.InjectLogger< - Requests.Folder.Choose.Request, - CancelablePromise ->( - ( - _log: Logger, - _request: Requests.Folder.Choose.Request, - ): CancelablePromise => { - return new CancelablePromise((resolve, reject) => { - electron - .dialogs() - .openFolder() - .then((paths: string[]) => { - resolve( - new Requests.Folder.Choose.Response({ - paths, - }), - ); - }) - .catch(reject); - }); - }, -); diff --git a/application/holder/src/service/bridge/folder/delimiter.ts b/application/holder/src/service/bridge/folder/delimiter.ts deleted file mode 100644 index 48edbecffe..0000000000 --- a/application/holder/src/service/bridge/folder/delimiter.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { CancelablePromise } from 'platform/env/promise'; -import { Logger } from 'platform/log'; - -import * as Requests from 'platform/ipc/request'; -import * as path from 'path'; - -export const handler = Requests.InjectLogger< - Requests.Folder.Delimiter.Request, - CancelablePromise ->( - ( - _log: Logger, - _request: Requests.Folder.Delimiter.Request, - ): CancelablePromise => { - return new CancelablePromise((resolve, _reject) => { - resolve(new Requests.Folder.Delimiter.Response({ delimiter: path.sep })); - }); - }, -); diff --git a/application/holder/src/service/bridge/folder/index.ts b/application/holder/src/service/bridge/folder/index.ts deleted file mode 100644 index 055e99a380..0000000000 --- a/application/holder/src/service/bridge/folder/index.ts +++ /dev/null @@ -1,4 +0,0 @@ -export * as Select from './select'; -export * as Choose from './choose'; -export * as Delimiter from './delimiter'; -export * as ShellOpen from './shell_open'; diff --git a/application/holder/src/service/bridge/folder/select.ts b/application/holder/src/service/bridge/folder/select.ts deleted file mode 100644 index af954dacb6..0000000000 --- a/application/holder/src/service/bridge/folder/select.ts +++ /dev/null @@ -1,143 +0,0 @@ -import { CancelablePromise } from 'platform/env/promise'; -import { Logger } from 'platform/log'; -import { electron } from '@service/electron'; -import { File } from 'platform/types/files'; -import { FileType } from 'platform/types/observe/types/file'; -import { getFileEntities, getFilesFromFolder } from '@env/fs'; - -import * as Requests from 'platform/ipc/request'; - -async function collect(exts: string[]): Promise { - const folders = await electron.dialogs().openFolder(); - if (folders.length === 0) { - return Promise.resolve([]); - } - return getFilesFromFolder(folders, exts); -} - -function any(ext?: string): Promise { - return new Promise((resolve, reject) => { - collect(ext !== undefined ? ext.split(',') : []) - .then((files: string[]) => { - getFileEntities(files) - .then((entities) => { - if (entities instanceof Error) { - reject(entities); - } else { - resolve(entities); - } - }) - .catch(reject); - }) - .catch(reject); - }); -} - -function dlt(): Promise { - return new Promise((resolve, reject) => { - collect(['dlt']) - .then((files: string[]) => { - getFileEntities(files) - .then((entities) => { - if (entities instanceof Error) { - reject(entities); - } else { - resolve(entities); - } - }) - .catch(reject); - }) - .catch(reject); - }); -} - -function pcapng(): Promise { - return new Promise((resolve, reject) => { - collect(['pcapng']) - .then((files: string[]) => { - getFileEntities(files) - .then((entities) => { - if (entities instanceof Error) { - reject(entities); - } else { - resolve(entities); - } - }) - .catch(reject); - }) - .catch(reject); - }); -} - -function pcap(): Promise { - return new Promise((resolve, reject) => { - collect(['pcap']) - .then((files: string[]) => { - getFileEntities(files) - .then((entities) => { - if (entities instanceof Error) { - reject(entities); - } else { - resolve(entities); - } - }) - .catch(reject); - }) - .catch(reject); - }); -} - -function parserPlugin(): Promise { - return new Promise((resolve, reject) => { - collect([]) - .then((files: string[]) => { - getFileEntities(files, FileType.ParserPlugin) - .then((entities) => { - if (entities instanceof Error) { - reject(entities); - } else { - resolve(entities); - } - }) - .catch(reject); - }) - .catch(reject); - }); -} - -export const handler = Requests.InjectLogger< - Requests.Folder.Select.Request, - CancelablePromise ->( - ( - log: Logger, - request: Requests.Folder.Select.Request, - ): CancelablePromise => { - return new CancelablePromise((resolve, reject) => { - (() => { - switch (request.target) { - case FileType.Text: - return any(request.ext); - case FileType.Binary: - return dlt(); - case FileType.PcapNG: - return pcapng(); - case FileType.PcapLegacy: - return pcap(); - case FileType.ParserPlugin: - return parserPlugin(); - default: - return Promise.reject(new Error(`Unsupported format of file`)); - } - })() - .then((files: File[]) => { - resolve( - new Requests.Folder.Select.Response({ - files, - }), - ); - }) - .catch(reject); - }); - }, -); diff --git a/application/holder/src/service/bridge/folder/shell_open.ts b/application/holder/src/service/bridge/folder/shell_open.ts deleted file mode 100644 index cb78312934..0000000000 --- a/application/holder/src/service/bridge/folder/shell_open.ts +++ /dev/null @@ -1,24 +0,0 @@ -import { CancelablePromise } from 'platform/env/promise'; -import { Logger } from 'platform/log'; -import { shell } from 'electron'; - -import * as Requests from 'platform/ipc/request'; - -export const handler = Requests.InjectLogger< - Requests.Folder.ShellOpen.Request, - CancelablePromise ->( - ( - _log: Logger, - request: Requests.Folder.ShellOpen.Request, - ): CancelablePromise => { - return new CancelablePromise((resolve, reject) => { - shell - .openPath(request.path) - .then(() => { - resolve(new Requests.Folder.ShellOpen.Response()); - }) - .catch(reject); - }); - }, -); diff --git a/application/holder/src/service/bridge/index.ts b/application/holder/src/service/bridge/index.ts deleted file mode 100644 index acd747a10f..0000000000 --- a/application/holder/src/service/bridge/index.ts +++ /dev/null @@ -1,5 +0,0 @@ -export * as File from './file'; -export * as Os from './os'; -export * as Folder from './folder'; -export * as App from './app'; -export * as Actions from './actions'; diff --git a/application/holder/src/service/bridge/os/entity.ts b/application/holder/src/service/bridge/os/entity.ts deleted file mode 100644 index 58a85849ce..0000000000 --- a/application/holder/src/service/bridge/os/entity.ts +++ /dev/null @@ -1,66 +0,0 @@ -import { CancelablePromise } from 'platform/env/promise'; -import { Logger } from 'platform/log'; -import { Entity, EntityType } from 'platform/types/files'; - -import * as Requests from 'platform/ipc/request'; -import * as fs from 'fs'; -import * as path from 'path'; - -export const handler = Requests.InjectLogger< - Requests.Os.AsFSEntity.Request, - CancelablePromise ->( - ( - log: Logger, - request: Requests.Os.AsFSEntity.Request, - ): CancelablePromise => { - return new CancelablePromise((resolve) => { - fs.promises - .stat(request.path) - .then((stats: fs.Stats) => { - const entity: Entity = { - name: request.path, - fullname: path.normalize(request.path), - kind: (() => { - if (stats.isBlockDevice()) { - return EntityType.BlockDevice; - } else if (stats.isCharacterDevice()) { - return EntityType.CharacterDevice; - } else if (stats.isDirectory()) { - return EntityType.Directory; - } else if (stats.isFIFO()) { - return EntityType.FIFO; - } else if (stats.isFile()) { - return EntityType.File; - } else if (stats.isSocket()) { - return EntityType.Socket; - } else { - return EntityType.SymbolicLink; - } - })(), - }; - if (stats.isFile() || stats.isSocket() || stats.isSymbolicLink()) { - entity.details = { - filename: request.path, - full: path.normalize(request.path), - path: path.dirname(request.path), - basename: path.basename(request.path), - ext: path.extname(request.path), - }; - } - resolve( - new Requests.Os.AsFSEntity.Response({ - entity, - }), - ); - }) - .catch((err: Error) => { - resolve( - new Requests.Os.AsFSEntity.Response({ - error: err.message, - }), - ); - }); - }); - }, -); diff --git a/application/holder/src/service/bridge/os/homedir.ts b/application/holder/src/service/bridge/os/homedir.ts deleted file mode 100644 index dab649feac..0000000000 --- a/application/holder/src/service/bridge/os/homedir.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { CancelablePromise } from 'platform/env/promise'; -import { Logger } from 'platform/log'; - -import * as Requests from 'platform/ipc/request'; -import * as os from 'os'; - -export const handler = Requests.InjectLogger< - Requests.Os.HomeDir.Request, - CancelablePromise ->( - ( - _log: Logger, - _request: Requests.Os.HomeDir.Request, - ): CancelablePromise => { - return new CancelablePromise((resolve) => { - resolve( - new Requests.Os.HomeDir.Response({ - path: os.homedir(), - }), - ); - }); - }, -); diff --git a/application/holder/src/service/bridge/os/index.ts b/application/holder/src/service/bridge/os/index.ts deleted file mode 100644 index 0a18031907..0000000000 --- a/application/holder/src/service/bridge/os/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * as AsFSEntity from './entity'; -export * as HomeDir from './homedir'; diff --git a/application/holder/src/service/cli.ts b/application/holder/src/service/cli.ts deleted file mode 100644 index 5a4c2604b9..0000000000 --- a/application/holder/src/service/cli.ts +++ /dev/null @@ -1,310 +0,0 @@ -import { - SetupService, - Interface, - Implementation, - register, - DependOn, -} from 'platform/entity/service'; -import { services } from '@register/services'; -import { electron } from '@service/electron'; -import { paths } from '@service/paths'; -import { envvars } from '@loader/envvars'; -import { isDevelopingExecuting } from '@loader/cli'; -import { exec } from 'sudo-prompt'; -import { getActions } from '@loader/cli'; -import { CancelablePromise } from 'platform/env/promise'; - -import * as Actions from './cli/index'; -import * as Events from 'platform/ipc/event'; -import * as Requests from 'platform/ipc/request'; -import * as fs from 'fs'; -import * as $ from 'platform/types/observe'; - -const UNIX_LOCAL_BIN = '/usr/local/bin'; -const UNIX_SYMLINK_PATH = `${UNIX_LOCAL_BIN}/cm`; - -@DependOn(paths) -@DependOn(electron) -@SetupService(services['cli']) -export class Service extends Implementation { - public readonly cwd: string = process.cwd(); - - protected args: string[] = []; - - private _available: boolean | undefined; - private readonly _state: { - sessions: string[]; - parser: $.Parser.Protocol; - } = { - sessions: [], - parser: $.Parser.Protocol.Text, - }; - - public override ready(): Promise { - this.log().debug(`Incoming arguments:\n\t${process.argv.join('\n\t')}`); - this.log().verbose(`TTY: ${process.stdout.isTTY ? 'connected' : 'unavailable'}`); - this.log().debug(`CWD: ${process.cwd()}`); - this.log().verbose(`Executor: ${process.execPath}`); - const executor = process.argv.shift(); - if (executor === undefined) { - // Unexpected amount of arguments - return Promise.resolve(); - } - if (isDevelopingExecuting(executor)) { - const mod = process.argv.findIndex((arg) => { - return arg.toLowerCase().endsWith('.js'); - }); - if (mod === -1) { - this.log().warn( - `Application in dev-mode (running with electron), but JS module isn't found`, - ); - return Promise.resolve(); - } else { - this.log().debug( - `Application in dev-mode (running with electron); main module (index: ${mod}): ${process.argv[mod]}`, - ); - } - this.args = process.argv.splice(mod + 1, process.argv.length); - } else { - this.args = process.argv.splice(0, process.argv.length); - } - if (this.args.length === 0) { - this.log().debug(`No any CLI actions would be applied: no income arguments.`); - } else { - this.log().debug(`Accepted arguments:\n\t${this.args.join('\n\t')}`); - } - this.register( - Events.IpcEvent.subscribe( - Events.State.Client.Event, - (event: Events.State.Client.Event) => { - if (event.state !== Events.State.Client.State.Ready) { - return; - } - this.check().catch((err: Error) => { - this.log().error(`Fail to proccess CLI actions: ${err.message}`); - }); - }, - ), - electron - .ipc() - .respondent( - this.getName(), - Requests.Cli.GetCommand.Request, - ( - _request: Requests.Cli.GetCommand.Request, - ): CancelablePromise => { - return new CancelablePromise(async (resolve, _reject) => { - resolve( - new Requests.Cli.GetCommand.Response({ - command: await this.support().command(), - }), - ); - }); - }, - ), - ); - return Promise.resolve(); - } - - public state(): { - sessions(sessions?: string[]): string[]; - parser(parser?: $.Parser.Protocol): $.Parser.Protocol; - } { - return { - sessions: (sessions?: string[]): string[] => { - if (sessions !== undefined) { - this._state.sessions = sessions; - } - return this._state.sessions; - }, - parser: (parser?: $.Parser.Protocol): $.Parser.Protocol => { - if (parser !== undefined) { - this._state.parser = parser; - } - return this._state.parser; - }, - }; - } - - public support(): { - install(): Promise; - uninstall(): Promise; - toggle(): Promise; - exists(): Promise; - available(): Promise; - command(): Promise; - } { - return { - install: async (): Promise => { - if (await this.support().exists()) { - return Promise.resolve(); - } - if (paths.isElectron()) { - return Promise.reject( - new Error(`No way to setup CLI because chipmunk is running via electron`), - ); - } - return new Promise((resolve, reject) => { - const options = { - name: 'Chipmunk Command Line Tool', - }; - const command: string = ((): string => { - switch (process.platform) { - case 'win32': - this.log().debug( - `Would call: ${`setx PATH "%PATH%;${paths.getExec()}"`}`, - ); - return `setx PATH "%PATH%;${paths.getExec()}"`; - default: - return `ln -s ${paths.getExec()} ${UNIX_SYMLINK_PATH}`; - } - })(); - this.log().debug(`Would call: ${command} to setup CLI support`); - exec( - command, - options, - ( - error: NodeJS.ErrnoException | null | undefined, - _stdout: unknown, - _stderr: unknown, - ) => { - if (error) { - return reject( - new Error( - this.log().warn( - `Fail install command tool line due error: ${error.message}`, - ), - ), - ); - } - resolve(); - }, - ); - }); - }, - uninstall: async (): Promise => { - if (await !this.support().exists()) { - return Promise.resolve(); - } - if (paths.isElectron()) { - return Promise.reject( - new Error( - `No way to remove CLI support because chipmunk is running via electron`, - ), - ); - } - return new Promise((resolve, reject) => { - const options = { - name: 'Chipmunk Command Line Tool', - }; - const command: string | Error = ((): string | Error => { - switch (process.platform) { - case 'win32': - // Unfortunately on windows "setx" doesn't have option to delete variable. - // but overwriting doesn't give expecting result. - // One possible option to use reg delete HKCU\Environment /F /V PATH - // and after setup it again with setx, but it's dangerous - // Well temporary we wouldn't have uninstall for windows. - return new Error( - `Isn't available on windows. Please remove path to chipmunk manualy from $PATH`, - ); - default: - return `rm ${UNIX_SYMLINK_PATH}`; - } - })(); - if (command instanceof Error) { - return reject(command); - } - exec( - command, - options, - ( - error: NodeJS.ErrnoException | null | undefined, - _stdout: unknown, - _stderr: unknown, - ) => { - if (error) { - return reject( - new Error( - this.log().warn( - `Fail uninstall command tool line due error: ${error.message}`, - ), - ), - ); - } - resolve(); - }, - ); - }); - }, - toggle: async (): Promise => { - if (await this.support().exists()) { - return this.support().uninstall(); - } else { - return this.support().install(); - } - }, - exists: async (): Promise => { - const vars = envvars.getOS(); - switch (process.platform) { - case 'win32': - return ( - Object.keys(vars).find((key) => { - return typeof vars[key] === 'string' - ? vars[key]?.indexOf(paths.getExec()) !== -1 - : false; - }) !== undefined - ); - default: - return await fs.promises - .lstat(UNIX_SYMLINK_PATH) - .then((_) => true) - .catch((_err) => false); - } - }, - available: (): Promise => { - if (this._available !== undefined) { - return Promise.resolve(this._available); - } - if (process.platform === 'win32') { - this._available = true; - return Promise.resolve(this._available); - } - this._available = fs.existsSync(UNIX_LOCAL_BIN); - return Promise.resolve(this._available); - }, - command: async (): Promise => { - const exists = await this.support().exists(); - if (exists) { - switch (process.platform) { - case 'win32': - return `chipmunk`; - default: - return `cm`; - } - } else { - return paths.getExec(); - } - }, - }; - } - - protected async check(): Promise { - const actions = getActions(); - try { - const runner = async (actions: Actions.CLIAction[]): Promise => { - for (const action of actions) { - await action.execute(this); - } - }; - await runner(actions.filter((a) => a.type() === Actions.Type.StateModifier)); - await runner(actions.filter((a) => a.type() === Actions.Type.Action)); - await runner(actions.filter((a) => a.type() === Actions.Type.AfterActions)); - Events.IpcEvent.emit(new Events.Cli.Done.Event()); - } catch (e) { - return Promise.reject(e); - } - } -} -export interface Service extends Interface {} -export const cli = register(new Service()); diff --git a/application/holder/src/service/cli/action.ts b/application/holder/src/service/cli/action.ts deleted file mode 100644 index 003ef3fe60..0000000000 --- a/application/holder/src/service/cli/action.ts +++ /dev/null @@ -1,43 +0,0 @@ -import { Service } from '@service/cli'; - -export enum Type { - StateModifier, - Action, - AfterActions, -} - -export abstract class CLIAction { - /** - * Checks incoming arguments and apply related actions, if it's possible. - * Returns list of arguments, which weren't used for current actions - * @param cli - reference to cli service - * @param args - list of arguments - */ - public abstract execute(cli: Service): Promise; - /** - * Returns type of action - * StateModifier - would be applied before any actions. Used to define - * some parameters for executing actions (like parser type) - * Action - actions, which would be applied after all StateModifiers are - * done, - * AfterActions - actions, which would be applied in last queue (like - * search). Such kind of actions are applied to each created by Actions - * session. - */ - public abstract type(): Type; - /** - * Parsing incoming argument - * @param argument possible argument of command, like `tcp`, `udp` etc - * @param cwd current working folder - * @param params argument to parse - */ - public abstract argument(argument: string | undefined, cwd: string, params: string): string; - /** - * Returns list of parsing errors - */ - public abstract errors(): Error[]; - /** - * Returns true is action should be applied. False - if not. - */ - public abstract defined(): boolean; -} diff --git a/application/holder/src/service/cli/index.ts b/application/holder/src/service/cli/index.ts deleted file mode 100644 index 86c5c85aa8..0000000000 --- a/application/holder/src/service/cli/index.ts +++ /dev/null @@ -1,6 +0,0 @@ -export { Action as OpenFile } from './open'; -export { Action as Search } from './search'; -export { Action as Stream } from './stream'; -export { Action as Parser } from './parser'; -export { Type } from './action'; -export { CLIAction } from './action'; diff --git a/application/holder/src/service/cli/open.ts b/application/holder/src/service/cli/open.ts deleted file mode 100644 index 07d6855c98..0000000000 --- a/application/holder/src/service/cli/open.ts +++ /dev/null @@ -1,129 +0,0 @@ -import { CLIAction, Type } from './action'; -import { Service } from '@service/cli'; -import { getFileEntities } from '@env/fs'; -import { FileType } from 'platform/types/observe/types/file'; -import { globSync } from 'glob'; -import { error } from 'platform/log/utils'; - -import * as fs from 'fs'; -import * as path from 'path'; -import * as Requests from 'platform/ipc/request'; -import * as Factory from 'platform/types/observe/factory'; -import * as Parser from 'platform/types/observe/parser'; - -export class Action extends CLIAction { - protected files: string[] = []; - protected error: Error[] = []; - - public argument(_target: string | undefined, cwd: string, arg: string): string { - if (fs.existsSync(arg)) { - this.files.push(arg); - return arg; - } - if (fs.existsSync(path.resolve(cwd, arg))) { - this.files.push(path.resolve(cwd, arg)); - return path.resolve(cwd, arg); - } - try { - const files = globSync(arg); - if (files.length === 0) { - this.error.push( - new Error(`Fail to find file: ${arg} or ${path.resolve(cwd, arg)}`), - ); - return ''; - } - files.sort(); - this.files.push(...files); - return arg; - } catch (e) { - this.error.push(new Error(`Fail to parse glob pattern: ${error(e)}`)); - return ''; - } - } - - public errors(): Error[] { - return this.error; - } - - public async execute(cli: Service): Promise { - if (this.error.length > 0) { - throw new Error( - `Handler cannot be executed, because errors: \n${this.error - .map((e) => e.message) - .join('\n')}`, - ); - } - if (!this.defined()) { - return; - } - const files = await getFileEntities(this.files); - if (files instanceof Error) { - throw files; - } - if (files.length === 0) { - return; - } - - // Single file - if (files.length === 1) { - const factory = new Factory.File().file(files[0].filename); - - switch (cli.state().parser()) { - case Parser.Protocol.Text: - factory.asText(); - break; - case Parser.Protocol.Dlt: - factory.asDlt(Parser.Dlt.Configuration.initial()).type(FileType.Binary); - break; - case Parser.Protocol.SomeIp: - factory.asSomeip(Parser.SomeIp.Configuration.initial()).type(FileType.Binary); - break; - case Parser.Protocol.Plugin: - throw new Error("Plugins aren't supperted in CLI yet."); - } - - const observe = factory.get(); - - return new Promise((resolve, _reject) => { - Requests.IpcRequest.send( - Requests.Cli.Observe.Response, - new Requests.Cli.Observe.Request({ - observe: [observe.sterilized()], - }), - ) - .then((response) => { - if (response.session === undefined) { - return; - } - cli.state().sessions([response.session]); - }) - .catch((err: Error) => { - cli.log().error(`Fail apply open-action: ${err.message}`); - }) - .finally(resolve); - }); - } - - // Multiple files - return new Promise((resolve, _reject) => { - Requests.IpcRequest.send( - Requests.Cli.MultiFiles.Response, - new Requests.Cli.MultiFiles.Request({ - files, - }), - ) - .catch((err: Error) => { - cli.log().error(`Fail apply open mulitple file: ${err.message}`); - }) - .finally(resolve); - }); - } - - public type(): Type { - return Type.Action; - } - - public defined(): boolean { - return this.files.length > 0; - } -} diff --git a/application/holder/src/service/cli/parser.ts b/application/holder/src/service/cli/parser.ts deleted file mode 100644 index 41c84c12c0..0000000000 --- a/application/holder/src/service/cli/parser.ts +++ /dev/null @@ -1,61 +0,0 @@ -import { CLIAction, Type } from './action'; -import { Service } from '@service/cli'; -import { Protocol } from 'platform/types/observe/parser'; - -export class Action extends CLIAction { - protected parser: Protocol | undefined; - protected error: Error[] = []; - - public argument(_target: string | undefined, _cwd: string, arg: string): string { - switch (arg.toLowerCase()) { - case Protocol.Dlt.toLowerCase(): - this.parser = Protocol.Dlt; - return arg; - case Protocol.SomeIp.toLowerCase(): - this.parser = Protocol.SomeIp; - return arg; - case Protocol.Text.toLowerCase(): - this.parser = Protocol.Text; - return arg; - } - this.error.push( - new Error( - `Invalid value of parser: ${arg}. Available: ${[ - Protocol.Dlt, - Protocol.SomeIp, - Protocol.Text, - ].join(', ')}.`, - ), - ); - return ''; - } - - public errors(): Error[] { - return this.error; - } - - public execute(cli: Service): Promise { - if (this.error.length > 0) { - return Promise.reject( - new Error( - `Handler cannot be executed, because errors: \n${this.error - .map((e) => e.message) - .join('\n')}`, - ), - ); - } - if (this.parser === undefined) { - return Promise.resolve(); - } - cli.state().parser(this.parser); - return Promise.resolve(); - } - - public type(): Type { - return Type.StateModifier; - } - - public defined(): boolean { - return this.parser !== undefined; - } -} diff --git a/application/holder/src/service/cli/search.ts b/application/holder/src/service/cli/search.ts deleted file mode 100644 index 6db3469e17..0000000000 --- a/application/holder/src/service/cli/search.ts +++ /dev/null @@ -1,70 +0,0 @@ -import { CLIAction, Type } from './action'; -import { Service } from '@service/cli'; -import { fromStr } from 'platform/env/regex'; - -import * as Requests from 'platform/ipc/request'; - -export class Action extends CLIAction { - protected filters: string[] = []; - protected error: Error[] = []; - - public argument(_target: string | undefined, _cwd: string, arg: string): string { - const filter = fromStr(arg); - if (!(filter instanceof Error)) { - this.filters.push(arg); - return arg; - } - this.error.push( - new Error(`Fail to convert into RegExp value "${arg}": ${filter.message}.`), - ); - return ''; - } - - public errors(): Error[] { - return this.error; - } - - public execute(cli: Service): Promise { - if (this.error.length > 0) { - return Promise.reject( - new Error( - `Handler cannot be executed, because errors: \n${this.error - .map((e) => e.message) - .join('\n')}`, - ), - ); - } - if (!this.defined()) { - return Promise.resolve(); - } - if (cli.state().sessions().length === 0) { - return Promise.resolve(); - } - return new Promise((resolve, _reject) => { - Requests.IpcRequest.send( - Requests.Cli.Search.Response, - new Requests.Cli.Search.Request({ - sessions: cli.state().sessions(), - filters: this.filters, - }), - ) - .then((response) => { - if (response.error !== undefined) { - cli.log().error(`Fail apply search via CLI: ${response.error}`); - } - }) - .catch((err: Error) => { - cli.log().error(`Fail apply CLI.Search: ${err.message}`); - }) - .finally(resolve); - }); - } - - public type(): Type { - return Type.AfterActions; - } - - public defined(): boolean { - return this.filters.length > 0; - } -} diff --git a/application/holder/src/service/cli/stream.ts b/application/holder/src/service/cli/stream.ts deleted file mode 100644 index ffd8fd7857..0000000000 --- a/application/holder/src/service/cli/stream.ts +++ /dev/null @@ -1,234 +0,0 @@ -import { CLIAction, Type } from './action'; -import { Service } from '@service/cli'; - -import * as Requests from 'platform/ipc/request'; -import * as Factory from 'platform/types/observe/factory'; -import * as $ from 'platform/types/observe'; - -function serial(settings: string): $.Origin.Stream.Stream.Serial.IConfiguration | Error { - settings = settings.replace(/\s/gi, ''); - const parts = settings.split(';'); - if (parts.length !== 6) { - return new Error( - `Expecting definition for path; baud_rate; data_bits; flow_control; parity; stop_bits. Use -h (--help) for more details`, - ); - } - let error: Error | undefined; - const parameters: $.Origin.Stream.Stream.Serial.IConfiguration = { - path: '', - baud_rate: -1, - data_bits: -1, - flow_control: -1, - parity: -1, - stop_bits: -1, - send_data_delay: -1, - exclusive: true, - }; - const keys = [ - 'path', - 'baud_rate', - 'data_bits', - 'flow_control', - 'parity', - 'stop_bits', - 'send_data_delay', - 'exclusive', - ]; - parts.forEach((p, i) => { - if (error instanceof Error) { - return; - } - if (i === 0 && p.trim().length === 0) { - error = new Error(`Path has invalid value.`); - return; - } - if (i === 0) { - (parameters as unknown as { [key: string]: string | number | boolean })[keys[i]] = p; - } else if (i === keys.length - 1) { - (parameters as unknown as { [key: string]: string | number | boolean })[keys[i]] = - typeof p === 'boolean' - ? p - : typeof p === 'string' - ? p === 'true' - ? true - : false - : typeof p === 'number' - ? p === 1 - ? true - : false - : true; - } else { - const value = parseInt(p, 10); - if (isNaN(value) || !isFinite(value)) { - error = new Error(`Parameter "${keys[i]}" has invalid value.`); - return; - } - (parameters as unknown as { [key: string]: string | number })[keys[i]] = value; - } - }); - if (error instanceof Error) { - return error; - } - return parameters; -} - -function udp(settings: string): $.Origin.Stream.Stream.UDP.IConfiguration | Error { - settings = settings.replace(/\s/gi, ''); - const parts = settings.split('|'); - if (parts.length !== 2) { - return new Error( - `Expecting definition for addr and multicast splitted with "|". Use -h (--help) for more details`, - ); - } - if (parts[0].length === 0) { - return new Error(`Fail to find addr to connect. Use -h (--help) for more details`); - } - if (parts[1].length === 0) { - return new Error(`Fail to find multicast defenitions. Use -h (--help) for more details`); - } - let error: Error | undefined; - const multicast = parts[1] - .split(';') - .map((pair) => { - if (pair.trim().length === 0) { - return undefined; - } - if (error !== undefined) { - return { - multiaddr: '', - interface: undefined, - }; - } - const pairs = pair.split(','); - if (pairs.length !== 1 && pairs.length !== 2) { - error = new Error( - `Each multicast defenition should include address and interface (or at least mutlicast address). Use -h (--help) for more details `, - ); - } - if (pairs.length === 1 && pairs[0].length === 0) { - error = new Error( - `Each multicast defenition should include at least address. Use -h (--help) for more details `, - ); - } - if (pairs.length === 2 && pairs[0].length === 0 && pairs[1].length === 0) { - error = new Error( - `Each multicast defenition should include address and interface. Use -h (--help) for more details `, - ); - } - return { - multiaddr: pairs[0], - interface: pairs.length === 1 ? undefined : pairs[1], - }; - }) - .filter( - (m: $.Origin.Stream.Stream.UDP.Multicast | undefined) => m !== undefined, - ) as $.Origin.Stream.Stream.UDP.Multicast[]; - if (error instanceof Error) { - return error; - } - return { - bind_addr: parts[0], - multicast, - }; -} - -function getObserveFactory( - target: string | undefined, - cwd: string, - arg: string, -): Factory.Stream | Error { - if (target === 'stdout') { - if (arg.trim() !== '') { - return new Factory.Stream().process({ - command: arg, - cwd, - shell: undefined, - }); - } else { - return new Error(`Command to spawn cannot be empty`); - } - } else if (target === 'serial') { - const settings = serial(arg); - if (settings instanceof Error) { - return settings; - } else { - return new Factory.Stream().serial(settings); - } - } else if (target === 'tcp') { - if (arg.trim() !== '') { - return new Factory.Stream().tcp({ bind_addr: arg }); - } else { - return new Error(`No bidning address for TCP connection`); - } - } else if (target === 'udp') { - const settings = udp(arg); - if (settings instanceof Error) { - return settings; - } else { - return new Factory.Stream().udp(settings); - } - } - return new Error(`Unknown target for streaming: ${target}`); -} - -export class Action extends CLIAction { - protected factories: Factory.Stream[] = []; - protected error: Error[] = []; - - public argument(target: string | undefined, cwd: string, arg: string): string { - const factory = getObserveFactory(target, cwd, arg); - if (factory instanceof Error) { - this.error.push(factory); - return ''; - } - this.factories.push(factory); - return arg; - } - - public errors(): Error[] { - return this.error; - } - - public execute(cli: Service): Promise { - if (this.error.length > 0) { - return Promise.reject( - new Error( - `Handler cannot be executed, because errors: \n${this.error - .map((e) => e.message) - .join('\n')}`, - ), - ); - } - if (!this.defined()) { - return Promise.resolve(); - } - return new Promise((resolve, _reject) => { - Requests.IpcRequest.send( - Requests.Cli.Observe.Response, - new Requests.Cli.Observe.Request({ - observe: this.factories.map((factory) => - factory.protocol(cli.state().parser()).get().sterilized(), - ), - }), - ) - .then((response) => { - if (response.session === undefined) { - return; - } - cli.state().sessions([response.session]); - }) - .catch((err: Error) => { - cli.log().error(`Fail apply stream action: ${err.message}`); - }) - .finally(resolve); - }); - } - - public type(): Type { - return Type.Action; - } - - public defined(): boolean { - return this.factories.length > 0; - } -} diff --git a/application/holder/src/service/electron.ts b/application/holder/src/service/electron.ts deleted file mode 100644 index 12c251d4cf..0000000000 --- a/application/holder/src/service/electron.ts +++ /dev/null @@ -1,119 +0,0 @@ -import { - SetupService, - Interface, - Implementation, - DependOn, - register, -} from 'platform/entity/service'; -import { paths } from '@service/paths'; -import { Window } from '@service/electron/window'; -import { Dialogs } from '@service/electron/dialogs'; -import { services } from '@register/services'; -import { app, session } from 'electron'; -import { Transport } from 'platform/ipc/transport'; -import { Subjects, Subject } from 'platform/env/subscription'; -import { Protocol } from './electron/protocol'; - -import * as handles from './electron/handles'; - -@DependOn(paths) -@SetupService(services['electron']) -export class Service extends Implementation { - public subjects: Subjects<{ - closing: Subject; - closed: Subject; - }> = new Subjects({ - closing: new Subject(), - closed: new Subject(), - }); - private _window!: Window; - private _dialogs!: Dialogs; - private _protocol: Protocol = new Protocol(); - private _state: { - closing: boolean; - closed: boolean; - } = { - closing: false, - closed: false, - }; - - public override init(): Promise { - this._window = new Window(); - this._dialogs = new Dialogs(); - return Promise.resolve(); - } - - public override async ready(): Promise { - // Wait for ready - await app.whenReady(); - // Register protocols - this._protocol.register(); - // Register custom handles - handles.register(); - // Setup minimal security requirements for angular app - session.defaultSession.webRequest.onHeadersReceived((details, callback) => { - callback({ - responseHeaders: { - ...details.responseHeaders, - 'Content-Security-Policy': [ - "default-src 'self' data: https: http: attachment: 'unsafe-eval' 'unsafe-inline'; style-src 'self' 'unsafe-inline'; img-src * 'self' data: https: http: attachment:;", - "trusted-types angular angular#unsafe-bypass; require-trusted-types-for 'script';", - ], - }, - }); - }); - await this._window.create(); - this._dialogs.bind(this._window.instance().get()); - this._window - .instance() - .get() - .once('close', () => { - this._state.closing = true; - this.subjects.get().closing.emit(); - }); - this._window - .instance() - .get() - .once('closed', () => { - this._state.closed = true; - this.subjects.get().closed.emit(); - }); - return Promise.resolve(); - } - - public override async destroy(): Promise { - this.subjects.destroy(); - await this._window.destroy().catch((err: Error) => { - this.log().error(`Fail to destroy window controller: ${err.message}`); - }); - return Promise.resolve(); - } - - public window(): Window { - return this._window; - } - - public ipc(): Transport { - return this._window.ipc(); - } - - public dialogs(): Dialogs { - return this._dialogs; - } - - public state(): { - closing(): boolean; - closed(): boolean; - } { - return { - closing: (): boolean => { - return this._state.closing; - }, - closed: (): boolean => { - return this._state.closed; - }, - }; - } -} -export interface Service extends Interface {} -export const electron = register(new Service()); diff --git a/application/holder/src/service/electron/dialogs.ts b/application/holder/src/service/electron/dialogs.ts deleted file mode 100644 index 9cba5832fd..0000000000 --- a/application/holder/src/service/electron/dialogs.ts +++ /dev/null @@ -1,133 +0,0 @@ -import { Define, Implementation, Interface } from 'platform/entity/controller'; -import { services } from '@register/services'; -import { BrowserWindow } from 'electron'; -import { system } from 'platform/modules/system'; -import { dialog } from 'electron'; - -@Define({ name: 'Dialogs', parent: services['electron'], accessor: system.getServicesAccessor() }) -export class Dialogs extends Implementation { - private _window!: BrowserWindow; - - protected fixFocusAndMouse(): void { - // On linux system (with GNOME) in some cases after system dialog - // has been shown, mouse is locked for whole system. With minimum - // timeout (after dialog inited) we should manualy unlock mouse - // and focus to the dialog - if (process.platform !== 'linux') { - return; - } - setTimeout(() => { - this._window.setEnabled(true); - this._window.blur(); - }); - } - public bind(window: BrowserWindow): void { - this._window = window; - } - - public saveFile(ext?: string, defaultFileName?: string): Promise { - this.fixFocusAndMouse(); - return dialog - .showSaveDialog(this._window, { - title: 'Select file to save', - properties: ['createDirectory', 'showOverwriteConfirmation'], - defaultPath: defaultFileName, - filters: - defaultFileName !== undefined - ? [] - : ext !== undefined - ? ext.split(',').map((e) => { - return { name: `*.${e}`, extensions: [e] }; - }) - : [{ name: 'All Files', extensions: ['*'] }], - }) - .then((result: Electron.SaveDialogReturnValue) => { - return result.filePath === undefined - ? result.filePath - : result.filePath.trim() === '' - ? undefined - : result.filePath; - }); - } - - public async openFolder(): Promise { - // Note: On Windows and Linux an open dialog can not be both a file selector and a directory selector, - // so if you set properties to ['openFile', 'openDirectory'] on these platforms, a directory selector - // will be shown. - this.fixFocusAndMouse(); - const result = await dialog.showOpenDialog(this._window, { - title: 'Opening a folder', - properties: ['openDirectory', 'multiSelections'], - }); - return Promise.resolve(result.canceled ? [] : result.filePaths); - } - - public openFile(): { - any(ext?: string): Promise; - dlt(): Promise; - pcapng(): Promise; - pcap(): Promise; - plugins(): Promise; - } { - const opener = async (target: number, ext?: string): Promise => { - let results; - this.fixFocusAndMouse(); - switch (target) { - case 0: - results = await dialog.showOpenDialog(this._window, { - title: 'Opening a file', - properties: ['openFile', 'multiSelections'], - filters: - ext !== undefined - ? [ - ...ext.split(',').map((ext) => { - return { name: `Files *.${ext}`, extensions: [ext] }; - }), - { name: 'All Files', extensions: ['*'] }, - ] - : undefined, - }); - break; - case 1: - results = await dialog.showOpenDialog(this._window, { - title: 'Opening a DLT file', - properties: ['openFile', 'multiSelections'], - filters: [{ name: 'DLT files', extensions: ['dlt'] }], - }); - break; - case 2: - results = await dialog.showOpenDialog(this._window, { - title: 'Opening a PCAPNG file', - properties: ['openFile', 'multiSelections'], - filters: [{ name: 'PCAPNG Files', extensions: ['pcapng'] }], - }); - break; - case 3: - results = await dialog.showOpenDialog(this._window, { - title: 'Opening a PCAP file', - properties: ['openFile', 'multiSelections'], - filters: [{ name: 'PCAP Files', extensions: ['pcap'] }], - }); - break; - case 4: - results = await dialog.showOpenDialog(this._window, { - title: 'Opening file with plugins', - properties: ['openFile', 'multiSelections'], - filters: [{ name: 'All files', extensions: ['*'] }], - }); - break; - default: - throw new Error(`Unsupported opetion for open file dialog`); - } - return Promise.resolve(results.canceled ? [] : results.filePaths); - }; - return { - any: (ext?: string) => opener(0, ext), - dlt: () => opener(1), - pcapng: () => opener(2), - pcap: () => opener(3), - plugins: () => opener(4), - }; - } -} -export interface Dialogs extends Interface {} diff --git a/application/holder/src/service/electron/handles/clipboard.ts b/application/holder/src/service/electron/handles/clipboard.ts deleted file mode 100644 index c3290653f7..0000000000 --- a/application/holder/src/service/electron/handles/clipboard.ts +++ /dev/null @@ -1,28 +0,0 @@ -import { nativeImage, clipboard, ipcMain } from 'electron'; - -import * as net from 'platform/types/net'; - -/** - * Registers an IPC handler for writing data into the system clipboard. - * - * @remarks - * This method is intended to be called in the **main process**. - * It exposes the `clipboard:write` channel, which can then be invoked - * from a renderer process via `ipcRenderer.invoke`. - */ -export function register() { - ipcMain.handle( - 'clipboard:write', - (_e, { mime, data }: { mime: string | undefined; data: ArrayBuffer }) => { - const buffer = Buffer.from(data); - if (typeof mime !== 'string') { - clipboard.writeBuffer(net.CONTENT_TYPE_OCTET_STREAM, buffer); - } else if (mime.startsWith('image/')) { - const img = nativeImage.createFromBuffer(buffer); - clipboard.writeImage(img); - } else if (mime.startsWith('text/')) { - clipboard.writeText(buffer.toString('utf8')); - } - }, - ); -} diff --git a/application/holder/src/service/electron/handles/index.ts b/application/holder/src/service/electron/handles/index.ts deleted file mode 100644 index 309d531a0f..0000000000 --- a/application/holder/src/service/electron/handles/index.ts +++ /dev/null @@ -1,18 +0,0 @@ -import * as clipboard from './clipboard'; - -/** - * Registers all available IPC APIs that must be exposed - * to the renderer process. - * - * @remarks - * Call this function once in the **main process** during - * application startup (e.g. after `app.whenReady()`). - * - * This function delegates to the individual API modules - * (such as `clipboard.register()`), ensuring their IPC - * channels are set up and ready for renderer use via - * `ipcRenderer.invoke` / `contextBridge`. - */ -export function register() { - clipboard.register(); -} diff --git a/application/holder/src/service/electron/protocol.ts b/application/holder/src/service/electron/protocol.ts deleted file mode 100644 index ff372cb4cc..0000000000 --- a/application/holder/src/service/electron/protocol.ts +++ /dev/null @@ -1,101 +0,0 @@ -import { protocol } from 'electron'; - -import * as url from 'url'; -import * as fs from 'fs'; -import * as mime from 'mime-types'; -import * as path from 'path'; -import * as net from 'platform/types/net'; - -const PROTOCOL: string = 'attachment'; - -/** - * Provides a custom `attachment:` protocol for serving local files - * directly to the renderer process. - * - * @remarks - * The main communication channel between renderer and backend remains IPC, - * but attachments are delivered via direct links. For security reasons, - * file paths are URL-encoded - this is especially important on Windows, - * where backslashes must be preserved safely. - */ -export class Protocol { - /** - * Creates a new instance of the protocol handler and registers the - * custom scheme as privileged. - * - * @remarks - * The scheme is marked with `corsEnabled` and `stream` privileges, - * allowing use with the Fetch API and streaming large files directly. - * This must be called before `app.whenReady()`. - */ - constructor() { - protocol.registerSchemesAsPrivileged([ - { - scheme: PROTOCOL, - privileges: { - corsEnabled: true, - stream: true, - }, - }, - ]); - } - - /** - * Registers the `attachment:` scheme handler with Electron. - * - * @remarks - * Uses `protocol.handle` (Electron 20+) to bind the {@link Protocol.attachment} - * method as the request handler. - */ - public register() { - protocol.handle(PROTOCOL, this.attachment.bind(this)); - } - - /** - * Resolves an `attachment:` URL to a local file and returns it as a streamed response. - * - * @param request - Incoming request targeting the `attachment:` scheme. - * @returns A promise that resolves to: - * - `200 OK` with a streaming body if the file exists and is readable; - * - `404 Not Found` if the file does not exist or is inaccessible. - * - * @remarks - * - The URL is decoded with `decodeURIComponent`, then converted into a `file:` - * URL and resolved to a filesystem path using `url.fileURLToPath`. This preserves - * Windows backslashes and prevents scheme confusion. - * - Files are streamed via `fs.createReadStream` to support large attachments - * without buffering them entirely into memory. - * - The response includes `Content-Type`, `Content-Length`, and - * `Content-Disposition` headers, as well as `Accept-Ranges` and - * `Cache-Control: no-store` for predictable client behavior. - * - Fetching `file://` directly is not supported by Node’s `fetch` (undici), - * hence files are read and streamed manually. - */ - protected async attachment(request: Request): Promise { - const filePath = url.fileURLToPath( - new URL(decodeURIComponent(request.url.replace(/^attachment:/, 'file:'))), - ); - try { - const stat = await fs.promises.stat(filePath); - if (!stat.isFile()) { - return new Response('File not found', { status: 404 }); - } - - const stream = fs.createReadStream(filePath); - const contentType = - mime.contentType(path.basename(filePath)) || net.CONTENT_TYPE_OCTET_STREAM; - - return new Response(stream, { - headers: { - 'Content-Type': contentType, - 'Content-Length': String(stat.size), - 'Content-Disposition': `attachment; filename="${path.basename(filePath)}"`, - 'Accept-Ranges': net.ACCEPT_RANGES_BYTES, - 'Cache-Control': net.CACHE_CONTROL_NO_STORE, - }, - }); - } catch { - return new Response('File not found', { status: 404 }); - } - } -} diff --git a/application/holder/src/service/electron/transport.ts b/application/holder/src/service/electron/transport.ts deleted file mode 100644 index adaebda40d..0000000000 --- a/application/holder/src/service/electron/transport.ts +++ /dev/null @@ -1,278 +0,0 @@ -import { - Transport, - ISignatureRequirement, - EntityConstructor, - Package, - Packed, - Respond, - Errors, -} from 'platform/ipc/transport'; -import { Subject, Subscription } from 'platform/env/subscription'; -import { ipcMain, IpcMainEvent, BrowserWindow } from 'electron'; -import { Logger } from '@env/logs/index'; -import { error } from 'platform/log/utils'; - -import * as events from 'platform/ipc/setup/channels'; - -interface IEventDesc { - subject: Subject; - ref: EntityConstructor & ISignatureRequirement; -} - -interface PendingEntity { - resolver: (...args: any[]) => void; - rejector: (error: Error | Errors.RustNativeError) => void; - ref: EntityConstructor & ISignatureRequirement; -} - -export class Implementation extends Transport { - private _subjects: Map = new Map(); - private _log: Logger = new Logger('ElectronAPITransport'); - private _sequence = 0; - private _requests: Map = new Map(); - private _window: BrowserWindow; - private _respondents: Map< - string, - { - owner: string; - respond: Respond; - ref: EntityConstructor & ISignatureRequirement; - } - > = new Map(); - private _destroyed = false; - - constructor(window: BrowserWindow) { - super(); - this._window = window; - this._onRenderEvent = this._onRenderEvent.bind(this); - this._onRenderRequest = this._onRenderRequest.bind(this); - this._onRenderResponse = this._onRenderResponse.bind(this); - ipcMain.on(events.RENDER_EVENT_NAME, this._onRenderEvent); - ipcMain.on(events.RENDER_REQUEST_NAME, this._onRenderRequest); - ipcMain.on(events.RENDER_RESPONSE_NAME, this._onRenderResponse); - } - - public destroy(): void { - ipcMain.removeAllListeners(); - this._requests.forEach((request) => { - request.rejector(new Error(`Rejected because transport is destroying`)); - }); - this._requests.clear(); - this._respondents.clear(); - this._destroyed = true; - } - - public request( - request: Request & ISignatureRequirement, - responseConstructorRef: EntityConstructor & ISignatureRequirement, - ): Promise { - if (this._destroyed) { - return Promise.reject(new Error(`Transport is destroyed`)); - } - return new Promise((resolve, reject) => { - const pack = new Package(this._getSequence()).payload(request); - this._requests.set(pack.getSequence(), { - resolver: resolve, - rejector: reject, - ref: responseConstructorRef, - }); - try { - this._window.webContents.send(events.HOST_REQUEST_NAME, pack.packed()); - } catch (e) { - this._log.error(`Fail to parse message: ${error(e)}`); - this._log.error(`begin:`); - this._log.error(JSON.stringify(pack.packed())); - this._log.error(`:end`); - } - // TODO: add timeout - }); - } - - public respondent( - owner: string, - request: EntityConstructor & ISignatureRequirement, - respond: Respond, - ): Subscription { - const signature: string = request.getSignature(); - const respondent = this._respondents.get(signature); - if (respondent !== undefined) { - throw new Error( - `Respondent has been setup already for "${signature}". Owner: ${respondent.owner}`, - ); - } - this._respondents.set(signature, { - owner, - ref: request, - respond, - }); - return new Subscription(`${owner}:${signature}`, () => { - this._respondents.delete(signature); - }); - } - - public notify(notification: Notification & ISignatureRequirement): void { - if (this._destroyed) { - return; - } - this._window.webContents.send( - events.HOST_EVENT_NAME, - new Package(this._getSequence()).payload(notification).packed(), - ); - } - - public subscribe( - event: string, - refEventConstructor: EntityConstructor & ISignatureRequirement, - ): Subject { - if (typeof event !== 'string' || event.trim() === '') { - throw new Error(`Event name should be a not-empty string`); - } - let desc: IEventDesc | undefined = this._subjects.get(event); - if (desc === undefined) { - desc = { - subject: new Subject(), - ref: refEventConstructor, - }; - this._subjects.set(event, desc); - } - return desc.subject; - } - - public emulate(entity: Entity & ISignatureRequirement): { - event(): void; - request(): void; - response(sequence: number): void; - } { - return { - event: () => { - this._window.webContents.send( - events.RENDER_EVENT_NAME, - new Package(this._getSequence()).payload(entity).packed(), - ); - }, - request: () => { - this._window.webContents.send( - events.RENDER_REQUEST_NAME, - new Package(this._getSequence()).payload(entity).packed(), - ); - }, - response: (sequence: number) => { - this._window.webContents.send( - events.RENDER_RESPONSE_NAME, - new Package(sequence).payload(entity).packed(), - ); - }, - }; - } - - private _getSequence(): number { - return this._sequence++; - } - - private _onRenderEvent(_event: IpcMainEvent, message: Packed) { - const pack = Package.from(message); - if (pack instanceof Error) { - this._log.error(`Fail to parse income event: ${pack.message}`); - return; - } - const signature = pack.getSignature(); - if (signature instanceof Error) { - this._log.error(`Has been gotten event, but signature cannot be detected`); - return; - } - const desc: IEventDesc | undefined = this._subjects.get(signature); - if (desc === undefined) { - this._log.warn(`Event ${signature} has been gotten, but no subscribers has been found`); - return; - } - const payload = pack.getPayload(desc.ref); - if (payload instanceof Error) { - this._log.error(`Error with processing event "${signature}": ${payload.message}`); - return; - } - this._log.verbose(`Event ${signature} has been gotten and successfully constructed.`); - desc.subject.emit(payload); - } - - private _onRenderRequest(_event: IpcMainEvent, message: Packed) { - const pack = Package.from(message); - if (pack instanceof Error) { - this._log.error(`Fail to parse income event: ${pack.message}`); - return; - } - const signature = pack.getSignature(); - if (signature instanceof Error) { - this._log.error(`Has been gotten event, but signature cannot be detected`); - return; - } - const respondent = this._respondents.get(signature); - if (respondent === undefined) { - this._log.error(`No respondent for "${signature}" has been setup`); - return; - } - const payload = pack.getPayload(respondent.ref); - if (payload instanceof Error) { - this._log.error( - `Error with processing host request "${signature}": ${payload.message}`, - ); - return; - } - this._log.verbose( - `Request ${signature} (seq: ${pack.getSequence()}) has been gotten and successfully constructed.`, - ); - respondent - .respond(payload) - .then((response: ISignatureRequirement) => { - this._window.webContents.send( - events.HOST_RESPONSE_NAME, - new Package(pack.getSequence()).payload(response).packed(), - ); - }) - .canceled(() => { - this._window.webContents.send( - events.HOST_RESPONSE_NAME, - new Package(pack.getSequence()).abort().packed(), - ); - }) - .catch((err: Error) => { - this._window.webContents.send( - events.HOST_RESPONSE_NAME, - new Package(pack.getSequence()).error(error(err)).packed(), - ); - }); - } - - private _onRenderResponse(_event: unknown, message: Packed) { - const pack = Package.from(message); - if (pack instanceof Error) { - this._log.error(`Fail to parse income event: ${pack.message}`); - return; - } - const desc = this._requests.get(pack.getSequence()); - const signature = pack.getSignature(); - if (desc === undefined) { - this._log.warn( - `Has been gotten response "${ - signature instanceof Error ? 'unknown' : signature - }"; sequence: ${pack.getSequence()}. But pending entity isn't found.`, - ); - return; - } - this._requests.delete(pack.getSequence()); - const error = pack.getError(); - if (error !== undefined) { - desc.rejector(error); - return; - } - if (signature instanceof Error) { - this._log.error(`Has been gotten response, but signature cannot be detected`); - return; - } - const payload = pack.getPayload(desc.ref); - if (payload instanceof Error) { - desc.rejector(payload); - return; - } - desc.resolver(payload); - } -} diff --git a/application/holder/src/service/electron/window.ts b/application/holder/src/service/electron/window.ts deleted file mode 100644 index 714bb44c1f..0000000000 --- a/application/holder/src/service/electron/window.ts +++ /dev/null @@ -1,136 +0,0 @@ -import { Define, Implementation, Interface } from 'platform/entity/controller'; -import { services } from '@register/services'; -import { paths } from '@service/paths'; -import { BrowserWindow, Event } from 'electron'; -import { Implementation as ElectronIPCTransport } from './transport'; -import { scope } from 'platform/env/scope'; -import { system } from 'platform/modules/system'; -import { Transport } from 'platform/ipc/transport'; -import { Settings, Window as WindowSettings } from './window/settings'; -import { SettingsHolder, settingsFactory } from '@controller/settings'; -import { envvars } from '@loader/envvars'; -import { ChipmunkGlobal } from '@register/global'; - -import * as path from 'path'; -import * as Events from 'platform/ipc/event'; - -declare const global: ChipmunkGlobal; - -@Define({ name: 'Window', parent: services['electron'], accessor: system.getServicesAccessor() }) -export class Window extends Implementation { - private _window: BrowserWindow | undefined; - private _ipc: ElectronIPCTransport | undefined; - private _settings!: SettingsHolder; - - public async create(): Promise { - this._settings = settingsFactory(new Settings()); - await this._settings.read(); - this._window = new BrowserWindow({ - title: `Chipmunk`, - icon: (() => { - switch (process.platform) { - case 'linux': - return path.resolve(paths.getResources(), 'icons/png/icon.png'); - case 'win32': - return path.resolve(paths.getResources(), 'icons/ico/icon.ico'); - } - return undefined; - })(), - width: this._settings.get().width, - height: this._settings.get().height, - x: this._settings.get().x, - y: this._settings.get().y, - webPreferences: { - preload: path.resolve(paths.getPreload(), 'preload.js'), - contextIsolation: true, - devTools: true, - webviewTag: true, - spellcheck: false, - sandbox: true, - allowRunningInsecureContent: true, - }, - }); - this._ipc = new ElectronIPCTransport(this._window); - this._window.on('resize', this._resize.bind(this)); - this._window.on('move', this._resize.bind(this)); - this._window.once('close', (event: Event) => { - this.log().debug(`Closing of browser window is prevented`); - event.preventDefault(); - global.application - .shutdown('onBrowserWindowClose') - .close() - .catch((err: Error) => { - this.log().error( - `Fail to trigger closing of application; error: ${err.message}`, - ); - }); - return false; - }); - scope.setTransport(this._ipc); - Events.IpcEvent.subscribe( - Events.State.Client.Event, - (/*_event: Events.State.Client.Event*/) => { - Events.IpcEvent.emit( - new Events.State.Backend.Event({ - state: Events.State.Backend.State.Ready, - job: 'ready', - }), - ); - }, - ); - this._window.loadFile(path.resolve(paths.getClient(), 'index.html')); - envvars.get().CHIPMUNK_DEVELOPING_MODE && this._window.webContents.openDevTools(); - return Promise.resolve(); - } - - public override destroy(): Promise { - if (this._window !== undefined) { - this._window.removeAllListeners(); - this._window.destroy(); - this.log().debug(`BrowserWindow was destroyed.`); - } - if (this._ipc !== undefined) { - this._ipc.destroy(); - this.log().debug(`ICP transport was destroyed.`); - } - this._window = undefined; - this._ipc = undefined; - return Promise.resolve(); - } - - public instance(): { - created(): boolean; - focused(): boolean; - get(): BrowserWindow; - } { - return { - created: (): boolean => { - return this._window !== undefined; - }, - focused: (): boolean => { - return this.instance().get().isFocused(); - }, - get: (): BrowserWindow => { - if (this._window === undefined) { - throw new Error(this.log().error(`BrowserWindow isn't created`)); - } - return this._window; - }, - }; - } - - public ipc(): Transport { - if (this._ipc === undefined) { - throw new Error(`IPC transport isn't inited`); - } - return this._ipc; - } - - private _resize() { - if (this._window === undefined) { - return; - } - this._settings.setFrom(this._window.getBounds()); - } -} -export interface Window extends Interface {} diff --git a/application/holder/src/service/electron/window/settings.ts b/application/holder/src/service/electron/window/settings.ts deleted file mode 100644 index 4494ff692f..0000000000 --- a/application/holder/src/service/electron/window/settings.ts +++ /dev/null @@ -1,45 +0,0 @@ -import * as obj from 'platform/env/obj'; -import { Implementation } from '@controller/settings'; - -export interface Window { - width: number; - height: number; - x: number; - y: number; -} - -export class Settings extends Implementation { - private _settings: Window = { - width: 800, - height: 600, - x: 100, - y: 100, - }; - public fromString(content: string): Promise { - try { - const settings = JSON.parse(content); - obj.isObject(settings); - this._settings.width = obj.getAsValidNumber(settings, 'width', { min: 100 }); - this._settings.height = obj.getAsValidNumber(settings, 'height', { min: 100 }); - this._settings.x = obj.getAsValidNumber(settings, 'x', { min: 0 }); - this._settings.y = obj.getAsValidNumber(settings, 'y', { min: 0 }); - return Promise.resolve(); - } catch (_err) { - return Promise.reject( - new Error(this.log().error(`Fail to read settings from string: ${content}`)), - ); - } - } - public asString(): string { - return JSON.stringify(this._settings); - } - public get(): Window { - return this._settings; - } - public set(settings: Window) { - this._settings = settings; - } - public getAlias(): string { - return 'Window'; - } -} diff --git a/application/holder/src/service/env.ts b/application/holder/src/service/env.ts deleted file mode 100644 index c63b3f61b0..0000000000 --- a/application/holder/src/service/env.ts +++ /dev/null @@ -1,178 +0,0 @@ -import { - SetupService, - Interface, - Implementation, - register, - DependOn, -} from 'platform/entity/service'; -import { services } from '@register/services'; -import { electron } from '@service/electron'; -import { storage } from '@service/storage'; -import { envvars } from '@loader/envvars'; -import { CancelablePromise } from 'platform/env/promise'; -import { Storage } from './env/storage'; -import { error } from 'platform/log/utils'; - -import * as fs from 'fs'; -import * as os from 'os'; -import * as Requests from 'platform/ipc/request'; - -@DependOn(electron) -@DependOn(storage) -@SetupService(services['env']) -export class Service extends Implementation { - protected cwd: Map = new Map(); - protected readonly storage: Storage = new Storage(); - - public override ready(): Promise { - this.register( - electron - .ipc() - .respondent( - this.getName(), - Requests.Cwd.Set.Request, - ( - request: Requests.Cwd.Set.Request, - ): CancelablePromise => { - return new CancelablePromise(async (resolve, _reject) => { - const err: Error | undefined = await this._isFolder(request.cwd); - if (err instanceof Error) { - return resolve( - new Requests.Cwd.Set.Response({ - uuid: request.uuid, - error: err.message, - }), - ); - } - try { - const globalCwd = await this.storage.get().cwd(); - if (request.uuid === undefined || globalCwd === os.homedir()) { - await this.setGlobal(request.cwd); - } else { - this.cwd.set(request.uuid, request.cwd); - } - resolve( - new Requests.Cwd.Set.Response({ - uuid: request.uuid, - error: undefined, - }), - ); - } catch (err) { - resolve( - new Requests.Cwd.Set.Response({ - uuid: request.uuid, - error: error(err), - }), - ); - } - }); - }, - ), - ); - this.register( - electron - .ipc() - .respondent( - this.getName(), - Requests.Cwd.Get.Request, - ( - request: Requests.Cwd.Get.Request, - ): CancelablePromise => { - return new CancelablePromise(async (resolve, _reject) => { - const cwd = - request.uuid === undefined ? undefined : this.cwd.get(request.uuid); - try { - const globalCwd = await this.storage.get().cwd(); - resolve( - new Requests.Cwd.Get.Response({ - uuid: request.uuid, - cwd: - cwd === undefined - ? globalCwd === undefined - ? os.homedir() - : globalCwd - : cwd, - }), - ); - } catch (_err) { - resolve( - new Requests.Cwd.Get.Response({ - uuid: request.uuid, - cwd: cwd === undefined ? os.homedir() : cwd, - }), - ); - } - }); - }, - ), - ); - this.register( - electron - .ipc() - .respondent( - this.getName(), - Requests.Env.Get.Request, - ( - _request: Requests.Env.Get.Request, - ): CancelablePromise => { - return new CancelablePromise(async (resolve, _reject) => { - resolve( - new Requests.Env.Get.Response({ - env: await this.getEnvVars(), - error: undefined, - }), - ); - }); - }, - ), - ); - return Promise.resolve(); - } - - public override destroy(): Promise { - this.unsubscribe(); - return Promise.resolve(); - } - - public async setGlobal(path: string): Promise { - const error: Error | undefined = await this._isFolder(path); - if (error instanceof Error) { - return error; - } - await this.storage - .set() - .cwd(path) - .catch((err: Error) => { - this.log().error(`Error to write storage: ${err.message}`); - }); - return undefined; - } - - public async getEnvVars(): Promise<{ [key: string]: string }> { - const injected = await this.storage - .get() - .envvars() - .catch((err: Error) => { - this.log().error(`Error to write storage: ${err.message}`); - }); - const os = Object.assign({}, envvars.getOS()) as { [key: string]: string }; - return Object.assign(os, injected === undefined ? {} : injected); - } - - private _isFolder(path: string): Promise { - return new Promise((resolve) => { - fs.promises - .stat(path) - .then((stat) => { - if (!stat.isDirectory()) { - resolve(new Error(`${path} isn't a directory`)); - return; - } - resolve(undefined); - }) - .catch(resolve); - }); - } -} -export interface Service extends Interface {} -export const env = register(new Service()); diff --git a/application/holder/src/service/env/storage.ts b/application/holder/src/service/env/storage.ts deleted file mode 100644 index 8a8b35b76b..0000000000 --- a/application/holder/src/service/env/storage.ts +++ /dev/null @@ -1,83 +0,0 @@ -import { storage } from '@service/storage'; -import { error } from 'platform/log/utils'; - -import * as obj from 'platform/env/obj'; -import * as os from 'os'; -import * as fs from 'fs'; - -const KEYS = { - cwd: 'cwd', - envvars: 'envvars', -}; - -export class Storage { - static KEY = 'env_settings'; - - public set(): { - cwd(path: string): Promise; - } { - return { - cwd: (path: string): Promise => { - if (path.trim() === '') { - return storage.entries.delete(Storage.KEY, [KEYS.cwd]); - } - if (!fs.existsSync(path)) { - path = os.homedir(); - } - const entry = { uuid: KEYS.cwd, content: JSON.stringify({ value: path }) }; - return storage.entries.update(Storage.KEY, [entry]); - }, - }; - } - - public get(): { - cwd(): Promise; - envvars(): Promise<{ [key: string]: string } | undefined>; - } { - return { - cwd: (): Promise => { - return new Promise((resolve, reject) => { - storage.entries - .get(Storage.KEY) - .then((entries) => { - const cwd = entries.get(KEYS.cwd); - if (cwd === undefined) { - return resolve(undefined); - } - try { - let path = obj.getAsNotEmptyString( - JSON.parse(cwd.content), - 'value', - ); - if (!fs.existsSync(path)) { - path = os.homedir(); - } - resolve(path); - } catch (e) { - reject(new Error(error(e))); - } - }) - .catch(reject); - }); - }, - envvars: (): Promise<{ [key: string]: string } | undefined> => { - return new Promise((resolve, reject) => { - storage.entries - .get(Storage.KEY) - .then((entries) => { - const envvars = entries.get(KEYS.envvars); - if (envvars === undefined) { - return resolve(undefined); - } - try { - resolve(obj.getAsObj(JSON.parse(envvars.content), 'value')); - } catch (e) { - reject(new Error(error(e))); - } - }) - .catch(reject); - }); - }, - }; - } -} diff --git a/application/holder/src/service/github.ts b/application/holder/src/service/github.ts deleted file mode 100644 index f61d974059..0000000000 --- a/application/holder/src/service/github.ts +++ /dev/null @@ -1,742 +0,0 @@ -import { - SetupService, - Interface, - Implementation, - register, - DependOn, -} from 'platform/entity/service'; -import { services } from '@register/services'; -import { electron } from '@service/electron'; -import { jobs } from '@service/jobs'; -import { storage } from '@service/storage'; -import { CancelablePromise } from 'platform/env/promise'; -import { unique } from 'platform/env/sequence'; -import { GitHubRepo, validateGitHubRepo } from 'platform/types/github'; -import { FileObject } from './github/requests/getfilecontent'; -import { error } from 'platform/log/utils'; -import { Queue } from 'platform/env/runner'; - -import * as GitHubAPI from './github/requests/index'; -import * as Requests from 'platform/ipc/request'; -import * as md from 'platform/types/github/filemetadata'; -import * as Events from 'platform/ipc/event'; -import * as tools from './github/tools'; -import * as obj from 'platform/env/obj'; - -const STORAGE_KEY = 'github_teamwork'; -const STORAGE_REPOS = 'repos'; -const STORAGE_ACTIVE = 'active_repo'; -const DEFAULT_ENTRY = 'https://api.github.com'; - -interface MetaDataLink { - metadata: md.FileMetaData; - file: FileObject; - sha: string; - username: string; -} - -interface CommitTask { - request: Requests.GitHub.SetFileMeta.Request; - resolver: (response: Requests.GitHub.SetFileMeta.Response) => void; - uuid: string; - pending: string | undefined; -} - -@DependOn(electron) -@DependOn(storage) -@DependOn(jobs) -@SetupService(services['github']) -export class Service extends Implementation { - protected readonly repos: Map = new Map(); - protected active: GitHubRepo | undefined; - protected queue: Queue = new Queue(50); - protected files: Map = new Map(); - // List of pending write tasks. Client can send multiple write tasks. - // Doesn't make sense to write each considering time of writing in 3-5s - protected tasks: { - list: Map; - progress: Set; - } = { - list: new Map(), - progress: new Set(), - }; - - protected setActive(repo: GitHubRepo | undefined) { - if (repo === undefined) { - this.active = undefined; - } else { - if (typeof repo.entry !== 'string' || repo.entry.trim() === '') { - repo.entry = DEFAULT_ENTRY; - } - this.active = repo; - } - } - protected getRecent(filename: string): md.FileMetaData | undefined { - const recent = this.files.get(filename); - return recent === undefined ? undefined : recent.metadata; - } - protected async getFileMetaData(filename: string): Promise { - if (this.active === undefined) { - throw new Error('No active repo selected'); - } - const active = Object.assign({}, this.active); - const file: FileObject | undefined = await new GitHubAPI.GetFileContent.Request( - this.queue, - active, - filename, - ).send(); - if (file === undefined) { - return undefined; - } - const commit = await new GitHubAPI.GetCommitByFile.Request( - this.queue, - active, - filename, - ).send(); - const metasrc = md.fromJson(file.content); - if (metasrc instanceof md.ProtocolError || metasrc instanceof Error) { - throw metasrc; - } - const metadata = new md.FileMetaData(metasrc); - const link = { file, metadata, username: commit.login, sha: commit.sha }; - this.files.set(filename, link); - return link; - } - protected async checkFileMetaData( - filename: string, - candidate: md.FileMetaData, - sha: string | undefined, - ): Promise { - if (this.active === undefined) { - return Promise.reject(new Error(`No active repository selected`)); - } - const recent: MetaDataLink | undefined = await this.getFileMetaData(filename); - if (recent === undefined) { - // No data on remote - return Promise.resolve(candidate); - } else if (sha !== recent.sha) { - Events.IpcEvent.emit( - new Events.GitHub.Conflict.Event({ - username: recent.username, - sha: recent.sha, - checksum: filename, - md: recent.metadata.def, - }), - ); - return Promise.reject( - new Error(`Changes rejected. File was updated by "${recent.username}"`), - ); - } - if (!tools.hasChanges(candidate, this.getRecent(filename), this.active.settings)) { - // Same data on remote. No needs for updates - return Promise.resolve(recent.sha); - } else { - return Promise.resolve( - tools.serialize(candidate, recent.metadata, this.active.settings), - ); - } - } - protected async setFileMetaData( - filename: string, - metadata: md.FileMetaData, - sha: string | undefined, - ): Promise { - if (this.active === undefined) { - throw new Error('No active repo selected'); - } - const candidate = await this.checkFileMetaData(filename, metadata, sha); - if (typeof candidate === 'string') { - return Promise.resolve(candidate); - } - const active = Object.assign({}, this.active); - const branchSha = await new GitHubAPI.GetBrachSHA.Request(this.queue, active).send(); - const baseTreeSha = ( - await new GitHubAPI.GetCommit.Request(this.queue, active, branchSha).send() - ).tree.sha; - const newTreeSha = await new GitHubAPI.CreateTree.Request(this.queue, active, baseTreeSha, { - path: filename, - type: 'blob', - mode: '100644', - content: candidate.stringify(), - }).send(); - const newCommitSha = await new GitHubAPI.CreateCommit.Request(this.queue, active, { - message: new Date().toUTCString(), - tree: newTreeSha, - parents: [branchSha], - }).send(); - await new GitHubAPI.UpdateRef.Request(this.queue, active, { - sha: newCommitSha, - force: true, - }).send(); - return Promise.resolve(newCommitSha); - } - protected storage(): { - load(): void; - save(): void; - } { - return { - load: (): void => { - storage.entries - .get(STORAGE_KEY) - .then((entry) => { - this.repos.clear(); - this.setActive(undefined); - const repos = entry.get(STORAGE_REPOS); - const active = entry.get(STORAGE_ACTIVE); - if (repos !== undefined) { - try { - const parsed = JSON.parse(repos.content); - if (!(parsed instanceof Array)) { - throw new Error( - `List of repos isn't an Array. Expecting GitHubRepo[]; found: ${typeof parsed}`, - ); - } - parsed.forEach((repo: GitHubRepo) => { - const checked = validateGitHubRepo(repo); - this.repos.set(checked.uuid, checked); - }); - } catch (err) { - storage.entries - .delete(STORAGE_KEY, [STORAGE_REPOS]) - .catch((err: Error) => { - this.log().error( - `Fail to drop storage for ${STORAGE_ACTIVE}: ${err.message}`, - ); - }); - this.log().error( - `Fail to parse storage: ${error( - err, - )}; settings will be dropped`, - ); - } - } - if (active !== undefined && active.content.trim() !== '') { - this.setActive(this.repos.get(active.content)); - if (this.active === undefined) { - storage.entries - .delete(STORAGE_KEY, [STORAGE_ACTIVE]) - .catch((err: Error) => { - this.log().error( - `Fail to drop storage for ${STORAGE_ACTIVE}: ${err.message}`, - ); - }); - this.log().warn( - `Saved active repo isn't found in a list. Reference will be removed from storage.`, - ); - } - } - }) - .catch((err: Error) => { - this.log().error(`Fail to read storage ${STORAGE_KEY}: ${err.message}`); - }); - }, - save: (): void => { - storage.entries - .overwrite(STORAGE_KEY, [ - { - uuid: STORAGE_REPOS, - content: JSON.stringify(Array.from(this.repos.values())), - }, - { - uuid: STORAGE_ACTIVE, - content: this.active === undefined ? '' : this.active.uuid, - }, - ]) - .catch((err: Error) => { - this.log().error(`Fail save data on a disc: ${err.message}`); - }); - }, - }; - } - - protected commit(): { - schedule( - request: Requests.GitHub.SetFileMeta.Request, - resolve: (response: Requests.GitHub.SetFileMeta.Response) => void, - ): void; - next(checksum: string, sha: string | undefined): void; - procceed(checksum: string, task: CommitTask): void; - success(checksum: string, task: CommitTask, sha: string): void; - fail(chechsum: string, task: CommitTask, err: Error): void; - } { - return { - schedule: ( - request: Requests.GitHub.SetFileMeta.Request, - resolver: (response: Requests.GitHub.SetFileMeta.Response) => void, - ): void => { - let queue = this.tasks.list.get(request.checksum); - if (queue === undefined) { - this.tasks.list.set(request.checksum, []); - queue = []; - } - queue.push({ - request, - resolver, - uuid: unique(), - pending: undefined, - }); - this.tasks.list.set(request.checksum, queue); - this.commit().next(request.checksum, undefined); - }, - next: (checksum: string, sha: string | undefined): void => { - if (this.tasks.progress.has(checksum)) { - return; - } - const queue = this.tasks.list.get(checksum); - if (queue === undefined) { - return; - } - const last = queue.pop(); - if (last === undefined) { - return; - } - for (const task of queue) { - task.pending === undefined && (task.pending = last.uuid); - } - this.tasks.list.set(checksum, queue); - last.request.sha = sha !== undefined ? sha : last.request.sha; - this.commit().procceed(checksum, last); - }, - procceed: (checksum: string, task: CommitTask): void => { - this.tasks.progress.add(checksum); - const job = jobs - .create({ - name: 'github: writing file data', - icon: 'compare_arrows', - spinner: true, - }) - .start(); - this.setFileMetaData( - task.request.checksum, - new md.FileMetaData(task.request.metadata), - task.request.sha, - ) - .then((sha: string) => { - this.commit().success(checksum, task, sha); - }) - .catch((err: Error) => { - this.commit().fail(checksum, task, err); - }) - .finally(() => { - job.done(); - }); - }, - success: (checksum: string, done: CommitTask, sha: string): void => { - const queue = this.tasks.list.get(checksum); - if (queue !== undefined) { - this.tasks.list.set( - checksum, - queue.filter((task: CommitTask) => { - if (task.pending === done.uuid) { - task.resolver(new Requests.GitHub.SetFileMeta.Response({ sha })); - return false; - } else { - return true; - } - }), - ); - } - done.resolver(new Requests.GitHub.SetFileMeta.Response({ sha })); - this.tasks.progress.delete(checksum); - this.commit().next(checksum, sha); - }, - fail: (checksum: string, done: CommitTask, err: Error): void => { - const queue = this.tasks.list.get(checksum); - if (queue !== undefined) { - queue.forEach((task: CommitTask) => { - task.resolver( - new Requests.GitHub.SetFileMeta.Response({ - error: err.message, - sha: undefined, - }), - ); - }); - this.tasks.list.clear(); - } - done.resolver( - new Requests.GitHub.SetFileMeta.Response({ - error: err.message, - sha: undefined, - }), - ); - this.tasks.progress.delete(checksum); - }, - }; - } - - public override ready(): Promise { - this.storage().load(); - this.register( - electron - .ipc() - .respondent( - this.getName(), - Requests.GitHub.CheckUpdates.Request, - ( - request: Requests.GitHub.CheckUpdates.Request, - ): CancelablePromise => { - return new CancelablePromise((resolve, _reject) => { - const current = this.files.get(request.checksum); - const job = jobs - .create({ - name: 'github: loading file updates', - icon: 'compare_arrows', - spinner: true, - }) - .start(); - this.getFileMetaData(request.checksum) - .then((response: MetaDataLink | undefined) => { - if (response === undefined) { - resolve( - new Requests.GitHub.CheckUpdates.Response({ - exists: false, - updated: false, - }), - ); - } else if ( - current === undefined || - current.sha !== response.sha - ) { - Events.IpcEvent.emit( - new Events.GitHub.FileUpdated.Event({ - checksum: request.checksum, - sha: response.sha, - }), - ); - resolve( - new Requests.GitHub.CheckUpdates.Response({ - updated: true, - exists: true, - }), - ); - } else { - resolve( - new Requests.GitHub.CheckUpdates.Response({ - updated: false, - exists: true, - }), - ); - } - }) - .catch((err: Error) => { - resolve( - new Requests.GitHub.CheckUpdates.Response({ - error: `Fail to get file's metadata: ${err.message}`, - exists: false, - updated: false, - }), - ); - }) - .finally(() => { - job.done(); - }); - }); - }, - ), - electron - .ipc() - .respondent( - this.getName(), - Requests.GitHub.AddRepo.Request, - ( - request: Requests.GitHub.AddRepo.Request, - ): CancelablePromise => { - return new CancelablePromise((resolve, _reject) => { - if ( - Array.from(this.repos.values()).find((repo) => { - repo.owner == request.owner && repo.repo == request.repo; - }) !== undefined - ) { - resolve( - new Requests.GitHub.AddRepo.Response({ - error: 'Already exists', - }), - ); - } else { - const uuid = unique(); - const repo: GitHubRepo = { - uuid, - repo: request.repo, - owner: request.owner, - token: request.token, - branch: request.branch, - settings: request.settings, - entry: request.entry, - }; - this.repos.set(uuid, repo); - this.storage().save(); - this.setActive(repo); - resolve(new Requests.GitHub.AddRepo.Response({ uuid })); - } - }); - }, - ), - electron - .ipc() - .respondent( - this.getName(), - Requests.GitHub.RemoveRepo.Request, - ( - request: Requests.GitHub.RemoveRepo.Request, - ): CancelablePromise => { - return new CancelablePromise((resolve) => { - if (!this.repos.has(request.uuid)) { - resolve( - new Requests.GitHub.RemoveRepo.Response({ - error: 'Does not exist', - }), - ); - } else { - this.repos.delete(request.uuid); - if ( - this.active !== undefined && - this.active.uuid === request.uuid - ) { - this.setActive(undefined); - } - this.storage().save(); - resolve( - new Requests.GitHub.RemoveRepo.Response({ - error: undefined, - }), - ); - } - }); - }, - ), - electron - .ipc() - .respondent( - this.getName(), - Requests.GitHub.UpdateRepo.Request, - ( - request: Requests.GitHub.UpdateRepo.Request, - ): CancelablePromise => { - return new CancelablePromise((resolve) => { - if (!this.repos.has(request.uuid)) { - resolve( - new Requests.GitHub.UpdateRepo.Response({ - error: 'Does not exist', - }), - ); - } else { - const repo: GitHubRepo = { - uuid: request.uuid, - repo: request.repo, - owner: request.owner, - token: request.token, - branch: request.branch, - entry: request.entry, - settings: request.settings, - }; - this.repos.set(request.uuid, obj.clone(repo)); - if ( - this.active !== undefined && - this.active.uuid === request.uuid - ) { - this.setActive(repo); - } - this.storage().save(); - resolve( - new Requests.GitHub.UpdateRepo.Response({ - error: undefined, - }), - ); - } - }); - }, - ), - electron - .ipc() - .respondent( - this.getName(), - Requests.GitHub.SetActive.Request, - ( - request: Requests.GitHub.SetActive.Request, - ): CancelablePromise => { - return new CancelablePromise((resolve) => { - const repo = this.repos.get(request.uuid); - if (request.uuid === undefined) { - this.setActive(undefined); - this.storage().save(); - resolve( - new Requests.GitHub.SetActive.Response({ - error: undefined, - }), - ); - } else if (repo !== undefined) { - this.setActive(repo); - this.storage().save(); - resolve( - new Requests.GitHub.SetActive.Response({ - error: undefined, - }), - ); - } else { - resolve( - new Requests.GitHub.SetActive.Response({ - error: 'Does not exist', - }), - ); - } - }); - }, - ), - electron - .ipc() - .respondent( - this.getName(), - Requests.GitHub.GetActive.Request, - ( - _request: Requests.GitHub.GetActive.Request, - ): CancelablePromise => { - return new CancelablePromise((resolve) => { - resolve( - new Requests.GitHub.GetActive.Response({ - uuid: this.active === undefined ? undefined : this.active.uuid, - }), - ); - }); - }, - ), - electron - .ipc() - .respondent( - this.getName(), - Requests.GitHub.GetRepos.Request, - ( - _request: Requests.GitHub.GetRepos.Request, - ): CancelablePromise => { - return new CancelablePromise((resolve) => { - resolve( - new Requests.GitHub.GetRepos.Response({ - repos: Array.from(this.repos.values()), - }), - ); - }); - }, - ), - electron - .ipc() - .respondent( - this.getName(), - Requests.GitHub.GetFileMeta.Request, - ( - request: Requests.GitHub.GetFileMeta.Request, - ): CancelablePromise => { - return new CancelablePromise((resolve) => { - const metadata = this.files.get(request.checksum); - if ( - request.sha !== undefined && - metadata !== undefined && - request.sha === metadata.sha - ) { - return resolve( - new Requests.GitHub.GetFileMeta.Response({ - metadata: metadata.metadata.def, - sha: metadata.sha, - exists: true, - }), - ); - } - const job = jobs - .create({ - name: 'github: loading file data', - icon: 'compare_arrows', - spinner: true, - }) - .start(); - this.getFileMetaData(request.checksum) - .then((response: MetaDataLink | undefined) => { - resolve( - new Requests.GitHub.GetFileMeta.Response({ - metadata: - response === undefined - ? undefined - : response.metadata.def, - sha: response === undefined ? undefined : response.sha, - exists: response !== undefined, - }), - ); - }) - .catch((err: Error | md.ProtocolError) => { - resolve( - new Requests.GitHub.GetFileMeta.Response({ - metadata: undefined, - exists: false, - error: - err instanceof md.ProtocolError - ? `Protocol "${ - err.declared - }" isn't supported; try to update chipmunk. Supported protocols: ${err.supported.join( - ', ', - )}` - : err.message, - }), - ); - }) - .finally(() => { - job.done(); - }); - }); - }, - ), - electron - .ipc() - .respondent( - this.getName(), - Requests.GitHub.SetFileMeta.Request, - ( - request: Requests.GitHub.SetFileMeta.Request, - ): CancelablePromise => { - return new CancelablePromise((resolve) => { - this.commit().schedule(request, resolve); - }); - }, - ), - electron - .ipc() - .respondent( - this.getName(), - Requests.GitHub.GetUserName.Request, - ( - _request: Requests.GitHub.GetUserName.Request, - ): CancelablePromise => { - return new CancelablePromise((resolve, _reject) => { - if (this.active === undefined) { - return resolve( - new Requests.GitHub.GetUserName.Response({ - error: `No active profile selected`, - }), - ); - } - const active = Object.assign({}, this.active); - new GitHubAPI.GetUserName.Request(this.queue, active) - .send() - .then((username: string) => { - resolve( - new Requests.GitHub.GetUserName.Response({ - username, - }), - ); - }) - .catch((err: Error) => { - resolve( - new Requests.GitHub.GetUserName.Response({ - error: err.message, - }), - ); - }); - }); - }, - ), - ); - return Promise.resolve(); - } - - public override destroy(): Promise { - return Promise.resolve(); - } -} -export interface Service extends Interface {} -export const github = register(new Service()); diff --git a/application/holder/src/service/github/request.ts b/application/holder/src/service/github/request.ts deleted file mode 100644 index 29054b706a..0000000000 --- a/application/holder/src/service/github/request.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { GitHubRepo } from 'platform/types/github'; -import { Queue } from 'platform/env/runner'; - -export abstract class Request { - protected abstract executor(): Promise; - - constructor(protected readonly queue: Queue, protected readonly options: GitHubRepo) {} - public send(): Promise { - return this.queue.wait(this.executor.bind(this)); - } - public getHeaders(): { [key: string]: string } { - return { - Accept: 'application/vnd.github+json', - Authorization: `Bearer ${this.options.token}`, - 'X-GitHub-Api-Version': '2022-11-28', - }; - } -} diff --git a/application/holder/src/service/github/requests/createcommit.ts b/application/holder/src/service/github/requests/createcommit.ts deleted file mode 100644 index 03a7fd8e93..0000000000 --- a/application/holder/src/service/github/requests/createcommit.ts +++ /dev/null @@ -1,93 +0,0 @@ -import { net, NetworkError } from '@module/net'; -import { Request as Base } from '../request'; -import { GitHubRepo } from 'platform/types/github'; -import { error } from 'platform/log/utils'; -import { Queue } from 'platform/env/runner'; - -import * as validator from 'platform/env/obj'; - -export interface Commit { - message: string; - author?: { - name: string; - email: string; - date: string; - }; - parents: string[]; - tree: string; - signature?: string; -} - -export class Request extends Base { - constructor(queue: Queue, options: GitHubRepo, protected readonly commit: Commit) { - super(queue, options); - } - - public executor(): Promise { - return new Promise((resolve, reject) => { - net.post( - `${this.options.entry}/repos/${this.options.owner}/${this.options.repo}/git/commits`, - this.getHeaders(), - JSON.stringify(this.commit), - ) - .then((raw: string) => { - try { - const response = JSON.parse(raw); - validator.getAsNotEmptyString(response, 'sha'); - resolve(response.sha as string); - } catch (err) { - reject(new Error(`Parsing error: ${error(err)}`)); - } - }) - .catch((err: NetworkError) => { - reject(new Error(`Network error (code ${err.code}): ${err.message}`)); - }); - }); - } -} - -// https://docs.github.com/en/rest/git/commits?apiVersion=2022-11-28#get-a-commit-object -// curl -L \ -// -X POST \ -// -H "Accept: application/vnd.github+json" \ -// -H "Authorization: Bearer " \ -// -H "X-GitHub-Api-Version: 2022-11-28" \ -// https://api.github.com/repos/OWNER/REPO/git/commits \ -// -d '{"message":"my commit message","author":{"name":"Mona Octocat","email":"octocat@github.com", -// "date":"2008-07-09T16:13:30+12:00"},"parents":["7d1b31e74ee336d15cbd21741bc88a537ed063a0"], -// "tree":"827efc6d56897b048c772eb4087f854f46256132","signature":"-----BEGIN PGP SIGNATURE-----...-----END PGP SIGNATURE-----\n"}' -// -// { -// "sha": "7638417db6d59f3c431d3e1f261cc637155684cd", -// "node_id": "MDY6Q29tbWl0NzYzODQxN2RiNmQ1OWYzYzQzMWQzZTFmMjYxY2M2MzcxNTU2ODRjZA==", -// "url": "https://api.github.com/repos/octocat/Hello-World/git/commits/7638417db6d59f3c431d3e1f261cc637155684cd", -// "author": { -// "date": "2014-11-07T22:01:45Z", -// "name": "Monalisa Octocat", -// "email": "octocat@github.com" -// }, -// "committer": { -// "date": "2014-11-07T22:01:45Z", -// "name": "Monalisa Octocat", -// "email": "octocat@github.com" -// }, -// "message": "my commit message", -// "tree": { -// "url": "https://api.github.com/repos/octocat/Hello-World/git/trees/827efc6d56897b048c772eb4087f854f46256132", -// "sha": "827efc6d56897b048c772eb4087f854f46256132" -// }, -// "parents": [ -// { -// "url": "https://api.github.com/repos/octocat/Hello-World/git/commits/7d1b31e74ee336d15cbd21741bc88a537ed063a0", -// "sha": "7d1b31e74ee336d15cbd21741bc88a537ed063a0", -// "html_url": "https://github.com/octocat/Hello-World/commit/7d1b31e74ee336d15cbd21741bc88a537ed063a0" -// } -// ], -// "verification": { -// "verified": false, -// "reason": "unsigned", -// "signature": null, -// "payload": null -// }, -// "html_url": "https://github.com/octocat/Hello-World/commit/7638417db6d59f3c431d3e1f261cc637155684cd" -// } diff --git a/application/holder/src/service/github/requests/createtree.ts b/application/holder/src/service/github/requests/createtree.ts deleted file mode 100644 index d906d1e07e..0000000000 --- a/application/holder/src/service/github/requests/createtree.ts +++ /dev/null @@ -1,75 +0,0 @@ -import { net, NetworkError } from '@module/net'; -import { Request as Base } from '../request'; -import { GitHubRepo } from 'platform/types/github'; -import { error } from 'platform/log/utils'; -import { Queue } from 'platform/env/runner'; - -import * as validator from 'platform/env/obj'; - -export interface TreeElement { - path: string; - mode: '100644' | '100755' | '040000' | '160000' | '120000'; - type: 'blob' | 'tree' | 'commit'; - sha?: string; - content: string; -} - -export class Request extends Base { - constructor( - queue: Queue, - options: GitHubRepo, - protected readonly baseTreeSha: string, - protected tree: TreeElement, - ) { - super(queue, options); - } - - public executor(): Promise { - return new Promise((resolve, reject) => { - net.post( - `${this.options.entry}/repos/${this.options.owner}/${this.options.repo}/git/trees`, - this.getHeaders(), - JSON.stringify({ - base_tree: this.baseTreeSha, - tree: [this.tree], - }), - ) - .then((raw: string) => { - try { - const response = JSON.parse(raw); - validator.getAsNotEmptyString(response, 'sha'); - resolve(response.sha as string); - } catch (err) { - reject(new Error(`Parsing error: ${error(err)}`)); - } - }) - .catch((err: NetworkError) => { - reject(new Error(`Network error: ${err.message}`)); - }); - }); - } -} - -// https://docs.github.com/en/rest/git/trees?apiVersion=2022-11-28#create-a-tree -// curl -L \ -// -X POST \ -// -H "Accept: application/vnd.github+json" \ -// -H "Authorization: Bearer " \ -// -H "X-GitHub-Api-Version: 2022-11-28" \ -// https://api.github.com/repos/OWNER/REPO/git/trees \ -// -d '{"base_tree":"9fb037999f264ba9a7fc6274d15fa3ae2ab98312","tree":[{"path":"file.rb","mode":"100644","type":"blob","sha":"44b4fc6d56897b048c772eb4087f854f46256132"}]}' -// { -// "sha": "cd8274d15fa3ae2ab983129fb037999f264ba9a7", -// "url": "https://api.github.com/repos/octocat/Hello-World/trees/cd8274d15fa3ae2ab983129fb037999f264ba9a7", -// "tree": [ -// { -// "path": "file.rb", -// "mode": "100644", -// "type": "blob", -// "size": 132, -// "sha": "7c258a9869f33c1e1e1f74fbb32f07c86cb5a75b", -// "url": "https://api.github.com/repos/octocat/Hello-World/git/blobs/7c258a9869f33c1e1e1f74fbb32f07c86cb5a75b" -// } -// ], -// "truncated": true -// } diff --git a/application/holder/src/service/github/requests/getbranchsha.ts b/application/holder/src/service/github/requests/getbranchsha.ts deleted file mode 100644 index 25241e470f..0000000000 --- a/application/holder/src/service/github/requests/getbranchsha.ts +++ /dev/null @@ -1,53 +0,0 @@ -import { net, NetworkError } from '@module/net'; -import { Request as Base } from '../request'; -import { GitHubRepo } from 'platform/types/github'; -import { error } from 'platform/log/utils'; -import { Queue } from 'platform/env/runner'; - -import * as validator from 'platform/env/obj'; - -export class Request extends Base { - constructor(queue: Queue, options: GitHubRepo) { - super(queue, options); - } - - public executor(): Promise { - return new Promise((resolve, reject) => { - net.getRaw( - `${this.options.entry}/repos/${this.options.owner}/${this.options.repo}/git/ref/heads/${this.options.branch}`, - this.getHeaders(), - ) - .then((raw: string) => { - try { - const response = JSON.parse(raw); - validator.isObject(response); - const object = validator.getAsObj(response, 'object'); - const sha = validator.getAsNotEmptyString(object, 'sha'); - resolve(sha); - } catch (err) { - reject(new Error(`Parsing error: ${error(err)}`)); - } - }) - .catch((err: NetworkError) => { - reject(new Error(`Network error (code ${err.code}): ${err.message}`)); - }); - }); - } -} - -// https://docs.github.com/en/rest/git/refs?apiVersion=2022-11-28#get-a-reference -// curl -L \ -// -H "Accept: application/vnd.github+json" \ -// -H "Authorization: Bearer " \ -// -H "X-GitHub-Api-Version: 2022-11-28" \ -// https://api.github.com/repos/OWNER/REPO/git/ref/REF -// { -// "ref": "refs/heads/featureA", -// "node_id": "MDM6UmVmcmVmcy9oZWFkcy9mZWF0dXJlQQ==", -// "url": "https://api.github.com/repos/octocat/Hello-World/git/ref/heads/featureA", -// "object": { -// "type": "commit", -// "sha": "aa218f56b14c9653891f9e74264a383fa43fefbd", -// "url": "https://api.github.com/repos/octocat/Hello-World/git/commits/aa218f56b14c9653891f9e74264a383fa43fefbd" -// } -// } diff --git a/application/holder/src/service/github/requests/getcommit.ts b/application/holder/src/service/github/requests/getcommit.ts deleted file mode 100644 index b78bb61fee..0000000000 --- a/application/holder/src/service/github/requests/getcommit.ts +++ /dev/null @@ -1,88 +0,0 @@ -import { net, NetworkError } from '@module/net'; -import { Request as Base } from '../request'; -import { GitHubRepo } from 'platform/types/github'; -import { error } from 'platform/log/utils'; -import { Queue } from 'platform/env/runner'; - -import * as validator from 'platform/env/obj'; - -export interface CommitObject { - sha: string; - tree: { - sha: string; - }; - author: { - login: string; - }; -} - -export class Request extends Base { - constructor(queue: Queue, options: GitHubRepo, protected readonly sha: string) { - super(queue, options); - } - - public executor(): Promise { - return new Promise((resolve, reject) => { - net.getRaw( - `${this.options.entry}/repos/${this.options.owner}/${this.options.repo}/git/commits/${this.sha}`, - this.getHeaders(), - ) - .then((raw: string) => { - try { - const response = JSON.parse(raw); - validator.isObject(response); - validator.getAsNotEmptyString(response, 'sha'); - validator.getAsObj(response, 'tree'); - validator.getAsNotEmptyString(response.tree, 'sha'); - resolve(response); - } catch (err) { - reject(new Error(`Parsing error: ${error(err)}`)); - } - }) - .catch((err: NetworkError) => { - reject(new Error(`Network error (code ${err.code}): ${err.message}`)); - }); - }); - } -} - -// https://docs.github.com/en/rest/git/commits?apiVersion=2022-11-28#get-a-commit-object -// curl -L \ -// -H "Accept: application/vnd.github+json" \ -// -H "Authorization: Bearer " \ -// -H "X-GitHub-Api-Version: 2022-11-28" \ -// https://api.github.com/repos/OWNER/REPO/git/commits/COMMIT_SHA -// { -// "sha": "7638417db6d59f3c431d3e1f261cc637155684cd", -// "node_id": "MDY6Q29tbWl0NmRjYjA5YjViNTc4NzVmMzM0ZjYxYWViZWQ2OTVlMmU0MTkzZGI1ZQ==", -// "url": "https://api.github.com/repos/octocat/Hello-World/git/commits/7638417db6d59f3c431d3e1f261cc637155684cd", -// "html_url": "https://github.com/octocat/Hello-World/commit/7638417db6d59f3c431d3e1f261cc637155684cd", -// "author": { -// "date": "2014-11-07T22:01:45Z", -// "name": "Monalisa Octocat", -// "email": "octocat@github.com" -// }, -// "committer": { -// "date": "2014-11-07T22:01:45Z", -// "name": "Monalisa Octocat", -// "email": "octocat@github.com" -// }, -// "message": "added readme, because im a good github citizen", -// "tree": { -// "url": "https://api.github.com/repos/octocat/Hello-World/git/trees/691272480426f78a0138979dd3ce63b77f706feb", -// "sha": "691272480426f78a0138979dd3ce63b77f706feb" -// }, -// "parents": [ -// { -// "url": "https://api.github.com/repos/octocat/Hello-World/git/commits/1acc419d4d6a9ce985db7be48c6349a0475975b5", -// "sha": "1acc419d4d6a9ce985db7be48c6349a0475975b5", -// "html_url": "https://github.com/octocat/Hello-World/commit/7638417db6d59f3c431d3e1f261cc637155684cd" -// } -// ], -// "verification": { -// "verified": false, -// "reason": "unsigned", -// "signature": null, -// "payload": null -// } -// } diff --git a/application/holder/src/service/github/requests/getcommitbyfile.ts b/application/holder/src/service/github/requests/getcommitbyfile.ts deleted file mode 100644 index c775d7e6ad..0000000000 --- a/application/holder/src/service/github/requests/getcommitbyfile.ts +++ /dev/null @@ -1,90 +0,0 @@ -import { net, NetworkError } from '@module/net'; -import { Request as Base } from '../request'; -import { GitHubRepo } from 'platform/types/github'; -import { error } from 'platform/log/utils'; -import { Queue } from 'platform/env/runner'; - -import * as validator from 'platform/env/obj'; - -export interface CommitObject { - sha: string; - login: string; -} - -export class Request extends Base { - constructor(queue: Queue, options: GitHubRepo, protected readonly filename: string) { - super(queue, options); - } - - public executor(): Promise { - return new Promise((resolve, reject) => { - net.getRaw( - `${this.options.entry}/repos/${this.options.owner}/${this.options.repo}/commits?path=${this.filename}&per_page=1`, - this.getHeaders(), - ) - .then((raw: string) => { - try { - const response: { sha: string; author: { login: string } }[] = - JSON.parse(raw); - if (!(response instanceof Array)) { - throw new Error(`Expecting an array of commits data`); - } - if (response.length === 0) { - throw new Error(`No commits related to file`); - } - validator.getAsObj(response[0], 'author'); - resolve({ - sha: validator.getAsNotEmptyString(response[0], 'sha'), - login: validator.getAsNotEmptyString(response[0].author, 'login'), - }); - } catch (err) { - reject(new Error(`Parsing error: ${error(err)}`)); - } - }) - .catch((err: NetworkError) => { - reject(new Error(`Network error (code ${err.code}): ${err.message}`)); - }); - }); - } -} - -// https://docs.github.com/en/rest/git/commits?apiVersion=2022-11-28#get-a-commit-object -// curl -L \ -// -H "Accept: application/vnd.github+json" \ -// -H "Authorization: Bearer " \ -// -H "X-GitHub-Api-Version: 2022-11-28" \ -// https://api.github.com/repos/OWNER/REPO/git/commits/COMMIT_SHA -// { -// "sha": "7638417db6d59f3c431d3e1f261cc637155684cd", -// "node_id": "MDY6Q29tbWl0NmRjYjA5YjViNTc4NzVmMzM0ZjYxYWViZWQ2OTVlMmU0MTkzZGI1ZQ==", -// "url": "https://api.github.com/repos/octocat/Hello-World/git/commits/7638417db6d59f3c431d3e1f261cc637155684cd", -// "html_url": "https://github.com/octocat/Hello-World/commit/7638417db6d59f3c431d3e1f261cc637155684cd", -// "author": { -// "date": "2014-11-07T22:01:45Z", -// "name": "Monalisa Octocat", -// "email": "octocat@github.com" -// }, -// "committer": { -// "date": "2014-11-07T22:01:45Z", -// "name": "Monalisa Octocat", -// "email": "octocat@github.com" -// }, -// "message": "added readme, because im a good github citizen", -// "tree": { -// "url": "https://api.github.com/repos/octocat/Hello-World/git/trees/691272480426f78a0138979dd3ce63b77f706feb", -// "sha": "691272480426f78a0138979dd3ce63b77f706feb" -// }, -// "parents": [ -// { -// "url": "https://api.github.com/repos/octocat/Hello-World/git/commits/1acc419d4d6a9ce985db7be48c6349a0475975b5", -// "sha": "1acc419d4d6a9ce985db7be48c6349a0475975b5", -// "html_url": "https://github.com/octocat/Hello-World/commit/7638417db6d59f3c431d3e1f261cc637155684cd" -// } -// ], -// "verification": { -// "verified": false, -// "reason": "unsigned", -// "signature": null, -// "payload": null -// } -// } diff --git a/application/holder/src/service/github/requests/getfilecontent.ts b/application/holder/src/service/github/requests/getfilecontent.ts deleted file mode 100644 index 32d7d168a0..0000000000 --- a/application/holder/src/service/github/requests/getfilecontent.ts +++ /dev/null @@ -1,88 +0,0 @@ -import { net, NetworkError } from '@module/net'; -import { Request as Base } from '../request'; -import { GitHubRepo } from 'platform/types/github'; -import { error } from 'platform/log/utils'; -import { Queue } from 'platform/env/runner'; - -import * as validator from 'platform/env/obj'; - -const RESOURCE_NOT_FOUND = 404; -const BASE64_ENCODING = 'base64'; - -export interface FileObject { - type: string; - encoding: string; - size: number; - name: string; - path: string; - content: string; - sha: string; -} - -export class Request extends Base { - constructor(queue: Queue, options: GitHubRepo, protected readonly path: string) { - super(queue, options); - } - - public executor(): Promise { - return new Promise((resolve, reject) => { - net.getRaw( - `${this.options.entry}/repos/${this.options.owner}/${this.options.repo}/contents/${this.path}`, - this.getHeaders(), - ) - .then((raw: string) => { - try { - const response = JSON.parse(raw); - validator.isObject(response); - validator.getAsNotEmptyString(response, 'type'); - validator.getAsNotEmptyString(response, 'encoding'); - validator.getAsNotEmptyString(response, 'name'); - validator.getAsNotEmptyString(response, 'path'); - validator.getAsNotEmptyString(response, 'content'); - validator.getAsNotEmptyString(response, 'sha'); - validator.getAsValidNumber(response, 'size'); - if (response.encoding === BASE64_ENCODING) { - response.content = Buffer.from(response.content, 'base64').toString( - 'utf-8', - ); - } - resolve(response); - } catch (err) { - reject(new Error(`Parsing error: ${error(err)}`)); - } - }) - .catch((err: NetworkError) => { - if (err.code === RESOURCE_NOT_FOUND) { - resolve(undefined); - } else { - reject(new Error(`Network error: ${err.message}`)); - } - }); - }); - } -} - -// https://docs.github.com/en/rest/repos/contents?apiVersion=2022-11-28 -// curl -L \ -// -H "Accept: application/vnd.github+json" \ -// -H "Authorization: Bearer " \ -// -H "X-GitHub-Api-Version: 2022-11-28" \ -// https://api.github.com/repos/OWNER/REPO/contents/PATH -// { -// "type": "file", -// "encoding": "base64", -// "size": 5362, -// "name": "README.md", -// "path": "README.md", -// "content": "IyBZb2dhIEJvmsgaW4gcHJvZ3Jlc3MhIEZlZWwgdAoKOndhcm5pbmc6IFdvc\\nZnJlZSBmUgdG8gY0byBjaGVjayBvdXQgdGhlIGFwcCwgYnV0IGJlIHN1c29t\\nZSBiYWNrIG9uY2UgaXQgaXMgY29tcGxldGUuCgpBIHdlYiBhcHAgdGhhdCBs\\nZWFkcyB5b3UgdGhyb3VnaCBhIHlvZ2Egc2Vzc2lvbi4KCltXb3Jrb3V0IG5v\\ndyFdKGh0dHBzOi8vc2tlZHdhcmRzODguZ2l0aHViLmlvL3lvZ2EvKQoKPGlt\\nZyBzcmM9InNyYy9pbWFnZXMvbWFza2FibGVfaWNvbl81MTIucG5nIiBhbHQ9\\nImJvdCBsaWZ0aW5nIHdlaWdodHMiIHdpZHRoPSIxMDAiLz4KCkRvIHlvdSBo\\nYXZlIGZlZWRiYWNrIG9yIGlkZWFzIGZvciBpbXByb3ZlbWVudD8gW09wZW4g\\nYW4gaXNzdWVdKGh0dHBzOi8vZ2l0aHViLmNvbS9za2Vkd2FyZHM4OC95b2dh\\nL2lzc3Vlcy9uZXcpLgoKV2FudCBtb3JlIGdhbWVzPyBWaXNpdCBbQ25TIEdh\\nbWVzXShodHRwczovL3NrZWR3YXJkczg4LmdpdGh1Yi5pby9wb3J0Zm9saW8v\\nKS4KCiMjIERldmVsb3BtZW50CgpUbyBhZGQgYSBuZXcgcG9zZSwgYWRkIGFu\\nIGVudHJ5IHRvIHRoZSByZWxldmFudCBmaWxlIGluIGBzcmMvYXNhbmFzYC4K\\nClRvIGJ1aWxkLCBydW4gYG5wbSBydW4gYnVpbGRgLgoKVG8gcnVuIGxvY2Fs\\nbHkgd2l0aCBsaXZlIHJlbG9hZGluZyBhbmQgbm8gc2VydmljZSB3b3JrZXIs\\nIHJ1biBgbnBtIHJ1biBkZXZgLiAoSWYgYSBzZXJ2aWNlIHdvcmtlciB3YXMg\\ncHJldmlvdXNseSByZWdpc3RlcmVkLCB5b3UgY2FuIHVucmVnaXN0ZXIgaXQg\\naW4gY2hyb21lIGRldmVsb3BlciB0b29sczogYEFwcGxpY2F0aW9uYCA+IGBT\\nZXJ2aWNlIHdvcmtlcnNgID4gYFVucmVnaXN0ZXJgLikKClRvIHJ1biBsb2Nh\\nbGx5IGFuZCByZWdpc3RlciB0aGUgc2VydmljZSB3b3JrZXIsIHJ1biBgbnBt\\nIHN0YXJ0YC4KClRvIGRlcGxveSwgcHVzaCB0byBgbWFpbmAgb3IgbWFudWFs\\nbHkgdHJpZ2dlciB0aGUgYC5naXRodWIvd29ya2Zsb3dzL2RlcGxveS55bWxg\\nIHdvcmtmbG93Lgo=\\n", -// "sha": "3d21ec53a331a6f037a91c368710b99387d012c1", -// "url": "https://api.github.com/repos/octokit/octokit.rb/contents/README.md", -// "git_url": "https://api.github.com/repos/octokit/octokit.rb/git/blobs/3d21ec53a331a6f037a91c368710b99387d012c1", -// "html_url": "https://github.com/octokit/octokit.rb/blob/master/README.md", -// "download_url": "https://raw.githubusercontent.com/octokit/octokit.rb/master/README.md", -// "_links": { -// "git": "https://api.github.com/repos/octokit/octokit.rb/git/blobs/3d21ec53a331a6f037a91c368710b99387d012c1", -// "self": "https://api.github.com/repos/octokit/octokit.rb/contents/README.md", -// "html": "https://github.com/octokit/octokit.rb/blob/master/README.md" -// } -// } diff --git a/application/holder/src/service/github/requests/getusername.ts b/application/holder/src/service/github/requests/getusername.ts deleted file mode 100644 index 31a235e5dd..0000000000 --- a/application/holder/src/service/github/requests/getusername.ts +++ /dev/null @@ -1,85 +0,0 @@ -import { net, NetworkError } from '@module/net'; -import { Request as Base } from '../request'; -import { GitHubRepo } from 'platform/types/github'; -import { error } from 'platform/log/utils'; -import { Queue } from 'platform/env/runner'; - -import * as validator from 'platform/env/obj'; - -export class Request extends Base { - constructor(queue: Queue, options: GitHubRepo) { - super(queue, options); - } - - public executor(): Promise { - return new Promise((resolve, reject) => { - net.getRaw(`${this.options.entry}/user`, this.getHeaders()) - .then((raw: string) => { - try { - const response = JSON.parse(raw); - validator.isObject(response); - const login = validator.getAsNotEmptyString(response, 'login'); - resolve(login); - } catch (err) { - reject(new Error(`Parsing error: ${error(err)}`)); - } - }) - .catch((err: NetworkError) => { - reject(new Error(`Network error (code ${err.code}): ${err.message}`)); - }); - }); - } -} - -// https://docs.github.com/en/rest/users/users?apiVersion=2022-11-28#update-the-authenticated-user -// curl -L \ -// -H "Accept: application/vnd.github+json" \ -// -H "Authorization: Bearer " \ -// -H "X-GitHub-Api-Version: 2022-11-28" \ -// https://api.github.com/user -// { -// "login": "octocat", -// "id": 1, -// "node_id": "MDQ6VXNlcjE=", -// "avatar_url": "https://github.com/images/error/octocat_happy.gif", -// "gravatar_id": "", -// "url": "https://api.github.com/users/octocat", -// "html_url": "https://github.com/octocat", -// "followers_url": "https://api.github.com/users/octocat/followers", -// "following_url": "https://api.github.com/users/octocat/following{/other_user}", -// "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}", -// "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}", -// "subscriptions_url": "https://api.github.com/users/octocat/subscriptions", -// "organizations_url": "https://api.github.com/users/octocat/orgs", -// "repos_url": "https://api.github.com/users/octocat/repos", -// "events_url": "https://api.github.com/users/octocat/events{/privacy}", -// "received_events_url": "https://api.github.com/users/octocat/received_events", -// "type": "User", -// "site_admin": false, -// "name": "monalisa octocat", -// "company": "GitHub", -// "blog": "https://github.com/blog", -// "location": "San Francisco", -// "email": "octocat@github.com", -// "hireable": false, -// "bio": "There once was...", -// "twitter_username": "monatheoctocat", -// "public_repos": 2, -// "public_gists": 1, -// "followers": 20, -// "following": 0, -// "created_at": "2008-01-14T04:33:35Z", -// "updated_at": "2008-01-14T04:33:35Z", -// "private_gists": 81, -// "total_private_repos": 100, -// "owned_private_repos": 100, -// "disk_usage": 10000, -// "collaborators": 8, -// "two_factor_authentication": true, -// "plan": { -// "name": "Medium", -// "space": 400, -// "private_repos": 20, -// "collaborators": 0 -// } -// } diff --git a/application/holder/src/service/github/requests/index.ts b/application/holder/src/service/github/requests/index.ts deleted file mode 100644 index a6714bf3f2..0000000000 --- a/application/holder/src/service/github/requests/index.ts +++ /dev/null @@ -1,8 +0,0 @@ -export * as GetBrachSHA from './getbranchsha'; -export * as GetCommit from './getcommit'; -export * as GetCommitByFile from './getcommitbyfile'; -export * as GetFileContent from './getfilecontent'; -export * as CreateTree from './createtree'; -export * as CreateCommit from './createcommit'; -export * as UpdateRef from './updateref'; -export * as GetUserName from './getusername'; diff --git a/application/holder/src/service/github/requests/updateref.ts b/application/holder/src/service/github/requests/updateref.ts deleted file mode 100644 index fc415b9e92..0000000000 --- a/application/holder/src/service/github/requests/updateref.ts +++ /dev/null @@ -1,63 +0,0 @@ -import { net, NetworkError } from '@module/net'; -import { Request as Base } from '../request'; -import { GitHubRepo } from 'platform/types/github'; -import { error } from 'platform/log/utils'; -import { Queue } from 'platform/env/runner'; - -import * as validator from 'platform/env/obj'; - -export interface Update { - sha: string; - force: boolean; -} - -export class Request extends Base { - constructor(queue: Queue, options: GitHubRepo, protected readonly update: Update) { - super(queue, options); - } - - public executor(): Promise { - return new Promise((resolve, reject) => { - net.post( - `${this.options.entry}/repos/${this.options.owner}/${this.options.repo}/git/refs/heads/${this.options.branch}`, - this.getHeaders(), - JSON.stringify(this.update), - 'PATCH', - ) - .then((raw: string) => { - try { - const response = JSON.parse(raw); - validator.isObject(response); - validator.getAsObj(response, 'object'); - validator.getAsNotEmptyString(response.object, 'sha'); - resolve(response.object.sha); - } catch (err) { - reject(new Error(`Parsing error: ${error(err)}`)); - } - }) - .catch((err: NetworkError) => { - reject(new Error(`Network error (code ${err.code}): ${err.message}`)); - }); - }); - } -} - -// https://docs.github.com/en/rest/git/refs?apiVersion=2022-11-28#update-a-reference -// curl -L \ -// -X PATCH \ -// -H "Accept: application/vnd.github+json" \ -// -H "Authorization: Bearer " \ -// -H "X-GitHub-Api-Version: 2022-11-28" \ -// https://api.github.com/repos/OWNER/REPO/git/refs/REF \ -// -d '{"sha":"aa218f56b14c9653891f9e74264a383fa43fefbd","force":true}' -// -// { -// "ref": "refs/heads/featureA", -// "node_id": "MDM6UmVmcmVmcy9oZWFkcy9mZWF0dXJlQQ==", -// "url": "https://api.github.com/repos/octocat/Hello-World/git/refs/heads/featureA", -// "object": { -// "type": "commit", -// "sha": "aa218f56b14c9653891f9e74264a383fa43fefbd", -// "url": "https://api.github.com/repos/octocat/Hello-World/git/commits/aa218f56b14c9653891f9e74264a383fa43fefbd" -// } -// } diff --git a/application/holder/src/service/github/tools.ts b/application/holder/src/service/github/tools.ts deleted file mode 100644 index 182bf0b5bf..0000000000 --- a/application/holder/src/service/github/tools.ts +++ /dev/null @@ -1,48 +0,0 @@ -import { SharingSettings } from 'platform/types/github'; - -import * as md from 'platform/types/github/filemetadata'; - -export function hasChanges( - candidate: md.FileMetaData, - remote: md.FileMetaData | undefined, - settings: SharingSettings, -): boolean { - if (remote !== undefined) { - if (settings.filters && candidate.hash().filters() !== remote.hash().filters()) { - return true; - } - if (settings.charts && candidate.hash().charts() !== remote.hash().charts()) { - return true; - } - if (settings.bookmarks && candidate.hash().bookmarks() !== remote.hash().bookmarks()) { - return true; - } - if (settings.comments && candidate.hash().comments() !== remote.hash().comments()) { - return true; - } - return false; - } else { - return true; - } -} -export function serialize( - candidate: md.FileMetaData, - recent: md.FileMetaData, - settings: SharingSettings, -): md.FileMetaData { - const serialized = recent.get(); - const updates = candidate.get(); - if (settings.filters && candidate.hash().filters() !== recent.hash().filters()) { - serialized.filters = updates.filters; - } - if (settings.charts && candidate.hash().charts() !== recent.hash().charts()) { - serialized.charts = updates.charts; - } - if (settings.bookmarks && candidate.hash().bookmarks() !== recent.hash().bookmarks()) { - serialized.bookmarks = updates.bookmarks; - } - if (settings.comments && candidate.hash().comments() !== recent.hash().comments()) { - serialized.comments = updates.comments; - } - return new md.FileMetaData(serialized); -} diff --git a/application/holder/src/service/hotkeys.ts b/application/holder/src/service/hotkeys.ts deleted file mode 100644 index 6ae03d0f22..0000000000 --- a/application/holder/src/service/hotkeys.ts +++ /dev/null @@ -1,200 +0,0 @@ -import { - SetupService, - Interface, - Implementation, - register, - DependOn, -} from 'platform/entity/service'; -import { services } from '@register/services'; -import { KeysMap, KeyDescription, Requirement } from 'platform/types/hotkeys/map'; -import { app, globalShortcut, powerMonitor, BrowserWindow } from 'electron'; -import { electron } from '@service/electron'; -import { CancelablePromise } from 'platform/env/promise'; -import { ChipmunkGlobal } from '@register/global'; -import { Listeners } from 'platform/env/subscription'; - -declare const global: ChipmunkGlobal; - -import * as Events from 'platform/ipc/event'; -import * as Requests from 'platform/ipc/request'; - -@DependOn(electron) -@SetupService(services['hotkeys']) -export class Service extends Implementation { - protected window!: BrowserWindow; - protected listeners: Listeners = new Listeners(); - - public override ready(): Promise { - this.register( - electron - .ipc() - .respondent( - this.getName(), - Requests.Hotkey.On.Request, - ( - _request: Requests.Hotkey.On.Request, - ): CancelablePromise => { - return new CancelablePromise((resolve, _reject) => { - this.bind([Requirement.NoInput]); - resolve(new Requests.Hotkey.On.Response({ error: undefined })); - }); - }, - ), - ); - this.register( - electron - .ipc() - .respondent( - this.getName(), - Requests.Hotkey.Off.Request, - ( - _request: Requests.Hotkey.Off.Request, - ): CancelablePromise => { - return new CancelablePromise((resolve, _reject) => { - this.unbind([Requirement.NoInput]); - resolve(new Requests.Hotkey.Off.Response({ error: undefined })); - }); - }, - ), - ); - this.register( - electron - .ipc() - .respondent( - this.getName(), - Requests.System.Exit.Request, - ( - _request: Requests.System.Exit.Request, - ): CancelablePromise => { - return new CancelablePromise((resolve, _reject) => { - global.application - .shutdown('ClosingWithMenu') - .close() - .catch((err: Error) => { - this.log().error(`Fail to close: ${err.message}`); - }); - resolve(new Requests.System.Exit.Response()); - }); - }, - ), - ); - this.window = electron.window().instance().get(); - this.listeners.add('blur', this.window, this.unbind.bind(this)); - this.listeners.add('focus', this.window, this.resume.bind(this)); - this.listeners.add('resume', powerMonitor, this.resume.bind(this)); - this.listeners.add('shutdown', powerMonitor, this.unbind.bind(this)); - this.listeners.add('browser-window-created', app, this.bind.bind(this)); - this.listeners.add('browser-window-focus', app, this.bind.bind(this)); - this.listeners.add('browser-window-blur', app, this.unbind.bind(this)); - this.listeners.add('before-quit', app, () => { - this.listeners.unsubscribe(); - this.unbind(); - }); - this.listeners.subscribe(); - this.bind(); - return Promise.resolve(); - } - - public override destroy(): Promise { - this.listeners.unsubscribe(); - this.unbind(); - return Promise.resolve(); - } - - protected bind(filter?: Requirement[]): void { - if (this.window === undefined) { - this.log().debug(`Cannot activete hotkeys because no window available`); - return; - } - if (!this.window.isFocused()) { - this.log().debug(`Cannot activete hotkeys because window doesn't have a focus`); - return; - } - let listeners = 0; - KeysMap.forEach((key) => { - if (key.client) { - return; - } - if ( - filter !== undefined && - filter.length > 0 && - key.required.find((requirement) => { - return filter.indexOf(requirement) !== -1; - }) === undefined - ) { - return; - } - const shortcuts = key.shortkeys as { [key: string]: string[] }; - const keys: string[] = - shortcuts[process.platform] !== undefined - ? shortcuts[process.platform] - : shortcuts['others']; - keys.forEach((shortcut) => { - if (globalShortcut.isRegistered(shortcut)) { - return; - } - if (!globalShortcut.register(shortcut, this.emit.bind(this, key))) { - this.log().warn( - `Fail to register key "${shortcut}" for action "${key.alias}" as shortcut.`, - ); - } else { - listeners += 1; - } - }); - }); - listeners > 0 && this.log().verbose(`Activated ${listeners} hotkeys listeners`); - } - - protected unbind(filter: Requirement[] = []): void { - if ( - this.window.webContents.devToolsWebContents !== null && - this.window.webContents.devToolsWebContents.isFocused() - ) { - filter = []; - } - let listeners = 0; - KeysMap.forEach((key) => { - if (key.client) { - return; - } - if ( - filter.length > 0 && - key.required.find((requirement) => { - return filter.indexOf(requirement) !== -1; - }) === undefined - ) { - return; - } - const shortcuts = key.shortkeys as { [key: string]: string[] }; - const keys: string[] = - shortcuts[process.platform] !== undefined - ? shortcuts[process.platform] - : shortcuts['others']; - keys.forEach((shortcut) => { - if (globalShortcut.isRegistered(shortcut)) { - globalShortcut.unregister(shortcut); - listeners += 1; - } - }); - }); - listeners > 0 && this.log().verbose(`Deactivated ${listeners} hotkeys listeners`); - } - - protected resume() { - if (!electron.window().instance().created()) { - this.unbind(); - } else if (!electron.window().instance().focused()) { - this.unbind(); - } - } - - protected emit(desc: KeyDescription) { - Events.IpcEvent.emit( - new Events.Hotkey.Emit.Event({ - code: desc.uuid, - }), - ); - } -} -export interface Service extends Interface {} -export const hotkeys = register(new Service()); diff --git a/application/holder/src/service/jobs.ts b/application/holder/src/service/jobs.ts deleted file mode 100644 index 2082cd72e6..0000000000 --- a/application/holder/src/service/jobs.ts +++ /dev/null @@ -1,76 +0,0 @@ -import { SetupService, Interface, Implementation, register } from 'platform/entity/service'; -import { services } from '@register/services'; -import { Job } from './jobs/job'; -import { electron } from '@service/electron'; -import { LockToken } from 'platform/env/lock.token'; - -export { Job }; -export * as aliases from './jobs/aliases'; - -@SetupService(services['jobs']) -export class Service extends Implementation { - public locked: LockToken = LockToken.simple(false); - - private _jobs: Map> = new Map(); - - public override ready(): Promise { - electron.subjects.get().closing.subscribe(() => { - this._jobs.forEach((jobs) => jobs.forEach((job) => job.cancel())); - this.locked.lock(); - }); - return Promise.resolve(); - } - - public override destroy(): Promise { - this._jobs.clear(); - return Promise.resolve(); - } - - public create(inputs: { - uuid?: string; - session?: string; - name?: string; - desc?: string; - icon?: string; - spinner?: boolean; - }): Job { - const job = new Job({ - uuid: inputs.uuid, - session: inputs.session, - name: inputs.name, - desc: inputs.desc, - icon: inputs.icon, - spinner: inputs.spinner, - done: (job: Job) => { - const jobs = this._jobs.get(job.session); - if (jobs === undefined) { - return; - } - jobs.delete(job.uuid); - }, - }); - if (this.locked.isLocked()) { - job.cancel(); - } - let jobs = this._jobs.get(job.session); - if (jobs === undefined) { - jobs = new Map(); - } - jobs.set(job.uuid, job); - this._jobs.set(job.session, jobs); - return job; - } - - public find(uuid: string): Job | undefined { - let target: Job | undefined; - Array.from(this._jobs.values()).forEach((jobs) => { - if (target !== undefined) { - return; - } - target = Array.from(jobs.values()).find((j) => j.uuid === uuid); - }); - return target; - } -} -export interface Service extends Interface {} -export const jobs = register(new Service()); diff --git a/application/holder/src/service/jobs/aliases.ts b/application/holder/src/service/jobs/aliases.ts deleted file mode 100644 index 28055d54bb..0000000000 --- a/application/holder/src/service/jobs/aliases.ts +++ /dev/null @@ -1,3 +0,0 @@ -export function getFileReadingJobUuid(session: string): string { - return `reading_file:${session}`; -} diff --git a/application/holder/src/service/jobs/job.ts b/application/holder/src/service/jobs/job.ts deleted file mode 100644 index c071b048bd..0000000000 --- a/application/holder/src/service/jobs/job.ts +++ /dev/null @@ -1,139 +0,0 @@ -import { unique } from 'platform/env/sequence'; -import * as validator from 'platform/env/obj'; -import * as Events from 'platform/ipc/event'; - -const GLOBAL_JOBS = `___global_jobs___`; - -export interface IJob { - uuid: string; - progress: number; - session?: string; - desc?: string; -} - -export class Job { - public uuid: string; - public progress = 0; - public session: string; - public name?: string; - public desc?: string; - public icon?: string; - public spinner: boolean; - - private _canceled = false; - private _created: number = Date.now(); - private _done: (job: Job) => void; - - constructor(job: { - uuid?: string; - session?: string; - name?: string; - desc?: string; - progress?: number; - spinner?: boolean; - icon?: string; - done: (job: Job) => void; - }) { - this.uuid = job.uuid !== undefined ? job.uuid : unique(); - this.session = validator.getAsNotEmptyStringOrAsUndefined(job, 'session'); - this.name = validator.getAsNotEmptyStringOrAsUndefined(job, 'name'); - this.desc = validator.getAsNotEmptyStringOrAsUndefined(job, 'desc'); - this.icon = validator.getAsNotEmptyStringOrAsUndefined(job, 'icon'); - this.progress = validator.getAsValidNumber(job, 'progress', { - defaults: 0, - max: 100, - min: 0, - }); - this.spinner = typeof job.spinner === 'boolean' ? job.spinner : false; - this.session = this.session === undefined ? GLOBAL_JOBS : this.session; - this._done = job.done; - } - - public start(): Job { - if (this.isCanceled()) { - return this; - } - if (this.progress === 100) { - throw new Error(`Operation ${this.uuid} has been done already. Desc: ${this.desc}`); - } - this.progress = 0; - Events.IpcEvent.emit( - new Events.State.Job.Event({ - uuid: this.uuid, - session: this.session, - name: this.name, - desc: this.desc, - progress: this.progress, - icon: this.icon, - spinner: this.spinner, - }), - ); - return this; - } - - public rise(progress: number, desc?: string): Job { - if (this.isCanceled()) { - return this; - } - if (this.progress === 100) { - throw new Error(`Operation ${this.uuid} has been done already. Desc: ${this.desc}`); - } - this.progress = progress; - this.desc = desc; - Events.IpcEvent.emit( - new Events.State.Job.Event({ - uuid: this.uuid, - session: this.session, - name: this.name, - desc: this.desc, - progress: this.progress, - icon: this.icon, - }), - ); - return this; - } - - public done(inputs?: { - name: string | undefined; - desc: string | undefined; - icon: string | undefined; - }): Job { - if (this.isCanceled()) { - return this; - } - if (this.progress === 100) { - throw new Error(`Operation ${this.uuid} has been done already. Desc: ${this.desc}`); - } - const update: { - name?: string; - desc?: string; - icon?: string; - } = inputs === undefined ? {} : inputs; - this.name = update.name !== undefined ? update.name : this.name; - this.desc = - update.desc !== undefined ? update.desc : this.desc === undefined ? 'done' : this.desc; - this.icon = typeof update.icon === 'string' ? update.icon : this.icon; - this.progress = 100; - this.desc = `[${((Date.now() - this._created) / 1000).toFixed(2)}s] ${this.desc}`; - Events.IpcEvent.emit( - new Events.State.Job.Event({ - uuid: this.uuid, - session: this.session, - name: this.name, - desc: this.desc, - progress: this.progress, - icon: this.icon, - }), - ); - this._done(this); - return this; - } - - public cancel() { - this._canceled = true; - } - - public isCanceled(): boolean { - return this._canceled; - } -} diff --git a/application/holder/src/service/menu.ts b/application/holder/src/service/menu.ts deleted file mode 100644 index 41f3bcf130..0000000000 --- a/application/holder/src/service/menu.ts +++ /dev/null @@ -1,622 +0,0 @@ -import { - SetupService, - Interface, - Implementation, - register, - DependOn, -} from 'platform/entity/service'; -import { services } from '@register/services'; -import { cli } from '@service/cli'; -import { Menu, MenuItem } from 'electron'; -import { notifications } from '@service/notifications'; -import { unique } from 'platform/env/sequence'; -import { FileType } from 'platform/types/observe/types/file'; -import { ChipmunkGlobal } from '@register/global'; - -import * as Actions from './actions'; -import * as $ from 'platform/types/observe'; - -declare const global: ChipmunkGlobal; - -@DependOn(notifications) -@DependOn(cli) -@SetupService(services['menu']) -export class Service extends Implementation { - protected readonly isMac: boolean = process.platform === 'darwin'; - - public override ready(): Promise { - this.update().catch((err: Error) => { - this.log().error(`Fail to update/init application menu: ${err.message}`); - }); - return Promise.resolve(); - } - - public async update(): Promise { - const menu = Menu.buildFromTemplate(await this.generate()); - Menu.setApplicationMenu(menu); - } - - protected async generate(): Promise { - const cliSupported = await cli.support().available(); - const cliInstalled = await cli.support().exists(); - return [ - ...(this.isMac - ? [ - { - label: `Chipmunk`, - submenu: [ - { role: 'services' }, - { type: 'separator' }, - { role: 'hide' }, - { role: 'hideOthers' }, - { role: 'unhide' }, - { type: 'separator' }, - { - label: 'Settings', - submenu: [ - ...(cliSupported - ? [ - { - label: cliInstalled - ? 'Remove CLI support' - : 'Setup CLI support', - click: () => { - cli.support() - .toggle() - .then(() => { - this.log().warn( - `CLI setup is done.`, - ); - notifications.send( - cliInstalled - ? `Support of CLI was successfully removed` - : `CLI support was successfuly added`, - [ - { - action: { - uuid: unique(), - name: 'Ok', - description: ``, - disabled: false, - }, - handler: () => - Promise.resolve(), - }, - ], - ); - }) - .catch((err: Error) => { - this.log().warn( - `Fail to setup CLI: ${err.message}`, - ); - notifications.send( - cliInstalled - ? `Fail to remove CLI support: ${err.message}` - : `Fail to add CLI support: ${err.message}`, - [ - { - action: { - uuid: unique(), - name: 'Ok', - description: ``, - disabled: false, - }, - handler: () => - Promise.resolve(), - }, - ], - ); - }) - .finally(() => { - this.update(); - }); - }, - }, - { type: 'separator' }, - ] - : []), - { - label: 'Settings', - click: async () => { - Actions.settings().catch((err: Error) => { - this.log().error( - `Fail call action Settings: ${err.message}`, - ); - }); - }, - }, - ], - }, - { type: 'separator' }, - { - label: 'Plugins Manager', - click: async () => { - Actions.pluginsManager().catch((err: Error) => { - this.log().error( - `Fail call action Plugins Manager: ${err.message}`, - ); - }); - }, - }, - { type: 'separator' }, - { - label: 'Check for updates', - click: async () => { - Actions.updates().catch((err: Error) => { - this.log().error( - `Fail call action Updates: ${err.message}`, - ); - }); - }, - }, - { type: 'separator' }, - { - label: 'Help / Documentation', - click: async () => { - Actions.help().catch((err: Error) => { - this.log().error(`Fail call action Help: ${err.message}`); - }); - }, - }, - { - label: 'About', - click: async () => { - Actions.about().catch((err: Error) => { - this.log().error( - `Fail call action About: ${err.message}`, - ); - }); - }, - }, - { type: 'separator' }, - { - label: 'Developing', - submenu: [ - { role: 'reload' }, - { role: 'forceReload' }, - { role: 'toggleDevTools' }, - ], - }, - - { type: 'separator' }, - { - label: this.isMac ? 'Quit' : 'Close', - registerAccelerator: false, - accelerator: 'CommandOrControl + Q', - click: () => { - global.application - .shutdown('ClosingWithMenu') - .close() - .catch((err: Error) => { - this.log().error(`Fail to close: ${err.message}`); - }); - }, - }, - ], - }, - ] - : []), - ...(!this.isMac - ? [ - { - label: `Chipmunk`, - submenu: [ - { - label: 'Settings', - submenu: [ - ...(cliSupported - ? [ - { - label: cliInstalled - ? 'Remove CLI support' - : 'Setup CLI support', - click: () => { - cli.support() - .toggle() - .then(() => { - this.log().warn( - `CLI setup is done.`, - ); - notifications.send( - cliInstalled - ? `Support of CLI was successfully removed` - : `CLI support was successfuly added`, - [ - { - action: { - uuid: unique(), - name: 'Ok', - description: ``, - disabled: false, - }, - handler: () => - Promise.resolve(), - }, - ], - ); - }) - .catch((err: Error) => { - this.log().warn( - `Fail to setup CLI: ${err.message}`, - ); - notifications.send( - cliInstalled - ? `Fail to remove CLI support: ${err.message}` - : `Fail to add CLI support: ${err.message}`, - [ - { - action: { - uuid: unique(), - name: 'Ok', - description: ``, - disabled: false, - }, - handler: () => - Promise.resolve(), - }, - ], - ); - }) - .finally(() => { - this.update(); - }); - }, - }, - { type: 'separator' }, - ] - : []), - { - label: 'Settings', - click: async () => { - Actions.settings().catch((err: Error) => { - this.log().error( - `Fail call action Settings: ${err.message}`, - ); - }); - }, - }, - ], - }, - { type: 'separator' }, - { - label: 'Plugins Manager', - click: async () => { - Actions.pluginsManager().catch((err: Error) => { - this.log().error( - `Fail call action Plugins Manager: ${err.message}`, - ); - }); - }, - }, - { type: 'separator' }, - { - label: 'Check for updates', - click: async () => { - Actions.updates().catch((err: Error) => { - this.log().error( - `Fail call action Updates: ${err.message}`, - ); - }); - }, - }, - { type: 'separator' }, - { - label: 'Help / Documentation', - click: async () => { - Actions.help().catch((err: Error) => { - this.log().error(`Fail call action Help: ${err.message}`); - }); - }, - }, - { - label: 'About', - click: async () => { - Actions.about().catch((err: Error) => { - this.log().error( - `Fail call action About: ${err.message}`, - ); - }); - }, - }, - { type: 'separator' }, - { - label: 'Developing', - submenu: [ - { role: 'reload' }, - { role: 'forceReload' }, - { role: 'toggleDevTools' }, - { - label: '[Experimental] Folder with plugin parser', - click: async () => { - Actions.openFolder(FileType.ParserPlugin).catch( - (err: Error) => { - this.log().error( - `Fail call action Open Folder with Plugin: ${err.message}`, - ); - }, - ); - }, - }, - ], - }, - { type: 'separator' }, - { - label: this.isMac ? 'Quit' : 'Close', - registerAccelerator: false, - accelerator: 'CommandOrControl + Q', - click: () => { - global.application - .shutdown('ClosingWithMenu') - .close() - .catch((err: Error) => { - this.log().error(`Fail to close: ${err.message}`); - }); - }, - }, - ], - }, - ] - : []), - { - label: 'File', - submenu: [ - { - label: 'Open File(s)', - click: async () => { - Actions.openFile(undefined).catch((err: Error) => { - this.log().error(`Fail call action OpenFile: ${err.message}`); - }); - }, - }, - { type: 'separator' }, - { - label: 'Concat', - submenu: [ - { - label: 'Files', - click: async () => { - Actions.openFile(undefined).catch((err: Error) => { - this.log().error( - `Fail call action openFile: ${err.message}`, - ); - }); - }, - }, - { - label: 'Folder(s)', - click: async () => { - Actions.openFolder(undefined).catch((err: Error) => { - this.log().error( - `Fail call action OpenFolder: ${err.message}`, - ); - }); - }, - }, - { type: 'separator' }, - { - label: 'Select Files from Folder', - submenu: [ - { - label: 'Binary (Dlt, SomeIp etc.)', - click: async () => { - Actions.openFolder(FileType.Binary).catch( - (err: Error) => { - this.log().error( - `Fail call action openFile: ${err.message}`, - ); - }, - ); - }, - }, - { - label: 'PcapNG', - click: async () => { - Actions.openFolder(FileType.PcapNG).catch( - (err: Error) => { - this.log().error( - `Fail call action openFile: ${err.message}`, - ); - }, - ); - }, - }, - { - label: 'Pcap', - click: async () => { - Actions.openFolder(FileType.PcapLegacy).catch( - (err: Error) => { - this.log().error( - `Fail call action openFile: ${err.message}`, - ); - }, - ); - }, - }, - ], - }, - ], - }, - { type: 'separator' }, - { - label: 'Export Session State', - click: async () => { - Actions.exportSessionState().catch((err: Error) => { - this.log().error(`Fail call action OpenFile: ${err.message}`); - }); - }, - }, - { - label: 'Import Session State', - click: async () => { - Actions.importSessionState().catch((err: Error) => { - this.log().error(`Fail call action OpenFile: ${err.message}`); - }); - }, - }, - ], - }, - { - label: 'Connections', - submenu: [ - { - label: 'DLT on UDP', - click: async () => { - Actions.stream( - $.Parser.Protocol.Dlt, - $.Origin.Stream.Stream.Source.UDP, - ).catch((err: Error) => { - this.log().error(`Fail call action Stream: ${err.message}`); - }); - }, - }, - { - label: 'DLT on TCP', - click: async () => { - Actions.stream( - $.Parser.Protocol.Dlt, - $.Origin.Stream.Stream.Source.TCP, - ).catch((err: Error) => { - this.log().error(`Fail call action Stream: ${err.message}`); - }); - }, - }, - { - label: 'DLT on Serial Port', - click: async () => { - Actions.stream( - $.Parser.Protocol.Dlt, - $.Origin.Stream.Stream.Source.Serial, - ).catch((err: Error) => { - this.log().error(`Fail call action Stream: ${err.message}`); - }); - }, - }, - { type: 'separator' }, - { - label: 'Plain text Serial Port', - click: async () => { - Actions.stream( - $.Parser.Protocol.Text, - $.Origin.Stream.Stream.Source.Serial, - ).catch((err: Error) => { - this.log().error(`Fail call action Stream: ${err.message}`); - }); - }, - }, - { type: 'separator' }, - { - label: 'Select Source for Plain text', - click: async () => { - Actions.stream($.Parser.Protocol.Text).catch((err: Error) => { - this.log().error(`Fail call action Stream: ${err.message}`); - }); - }, - }, - { - label: 'Select Source for DLT', - click: async () => { - Actions.stream($.Parser.Protocol.Dlt).catch((err: Error) => { - this.log().error(`Fail call action Stream: ${err.message}`); - }); - }, - }, - ], - }, - { - label: 'Terminal', - submenu: [ - { - label: 'Execute command', - click: async () => { - Actions.stream( - $.Parser.Protocol.Text, - $.Origin.Stream.Stream.Source.Process, - ).catch((err: Error) => { - this.log().error(`Fail call action Stream: ${err.message}`); - }); - }, - }, - ], - }, - { - label: 'Edit', - submenu: [ - { role: 'undo' }, - { role: 'redo' }, - { type: 'separator' }, - { role: 'cut' }, - { role: 'copy' }, - { role: 'paste' }, - { type: 'separator' }, - { role: 'selectAll' }, - { type: 'separator' }, - { - label: 'Find in Search Results', - click: async () => { - Actions.find().catch((err: Error) => { - this.log().error(`Fail call action FindInSearch: ${err.message}`); - }); - }, - }, - ], - }, - { - label: 'Go', - submenu: [ - { - label: 'Jump To Row', - click: async () => { - Actions.jumpto().catch((err: Error) => { - this.log().error(`Fail call action JumpTo: ${err.message}`); - }); - }, - }, - ], - }, - { - label: 'View', - submenu: [ - { role: 'resetZoom' }, - { role: 'zoomIn' }, - { role: 'zoomOut' }, - { type: 'separator' }, - { role: 'togglefullscreen' }, - { type: 'separator' }, - { - label: 'Dark Theme', - click: async () => { - Actions.themeDark().catch((err: Error) => { - this.log().error(`Fail call action ThemeDark: ${err.message}`); - }); - }, - }, - { - label: 'Light Theme', - click: async () => { - Actions.themeLight().catch((err: Error) => { - this.log().error(`Fail call action ThemeLight: ${err.message}`); - }); - }, - }, - ], - }, - { - label: 'Window', - submenu: [ - { role: 'minimize' }, - { role: 'zoom' }, - ...(this.isMac - ? [ - { type: 'separator' }, - { role: 'front' }, - { type: 'separator' }, - { role: 'window' }, - ] - : [{ role: 'close' }]), - ], - }, - ] as unknown as MenuItem[]; - } -} -export interface Service extends Interface {} -export const menu = register(new Service()); diff --git a/application/holder/src/service/notifications.ts b/application/holder/src/service/notifications.ts deleted file mode 100644 index faf4f8e041..0000000000 --- a/application/holder/src/service/notifications.ts +++ /dev/null @@ -1,112 +0,0 @@ -import { - SetupService, - Interface, - Implementation, - register, - DependOn, -} from 'platform/entity/service'; -import { Action } from 'platform/types/notification/index'; -import { services } from '@register/services'; -import { electron } from '@service/electron'; -import { CancelablePromise } from 'platform/env/promise'; -import { unique } from 'platform/env/sequence'; - -import * as Requests from 'platform/ipc/request'; -import * as Events from 'platform/ipc/event'; - -export interface ActionHolder { - action: Action; - handler: (args: unknown) => Promise; -} - -@DependOn(electron) -@SetupService(services['notifications']) -export class Service extends Implementation { - private _actions: Map = new Map(); - - public override ready(): Promise { - this.register( - electron - .ipc() - .respondent( - this.getName(), - Requests.Action.Call.Request, - (request: Requests.Action.Call.Request) => { - return new CancelablePromise((resolve) => { - const action = this._getAction(request.uuid); - if (action === undefined) { - return resolve( - new Requests.Action.Call.Response({ - uuid: request.uuid, - output: undefined, - error: `Fail to find handler for action`, - }), - ); - } - action - .handler(request.inputs) - .then((results: unknown) => { - resolve( - new Requests.Action.Call.Response({ - uuid: request.uuid, - output: results, - error: undefined, - }), - ); - }) - .catch((err: Error) => { - resolve( - new Requests.Action.Call.Response({ - uuid: request.uuid, - output: undefined, - error: err.message, - }), - ); - }) - .finally(() => { - this._dropGroupByAction(request.uuid); - }); - }); - }, - ), - ); - return Promise.resolve(); - } - - public send( - message: string, - actions: ActionHolder[], - session: string | undefined = undefined, - ): void { - this._actions.set(unique(), actions); - Events.IpcEvent.emit( - new Events.Notification.Pop.Event({ - session, - message, - actions: actions.map((a) => a.action), - }), - ); - } - - private _getAction(uuid: string): ActionHolder | undefined { - let action: ActionHolder | undefined; - this._actions.forEach((group: ActionHolder[]) => { - if (action !== undefined) { - return; - } - action = group.find((a) => a.action.uuid === uuid); - }); - return action; - } - - private _dropGroupByAction(uuid: string): void { - this._actions.forEach((group: ActionHolder[], groupUuid: string) => { - if (group.find((a) => a.action.uuid === uuid) !== undefined) { - this._actions.delete(groupUuid); - } - }); - } -} - -export interface Service extends Interface {} -export const notifications = register(new Service()); diff --git a/application/holder/src/service/paths.ts b/application/holder/src/service/paths.ts deleted file mode 100644 index 7d406b733e..0000000000 --- a/application/holder/src/service/paths.ts +++ /dev/null @@ -1,352 +0,0 @@ -import { - SetupService, - Interface, - Implementation, - DependOn, - register, -} from 'platform/entity/service'; -import { production } from '@service/production'; -import { app } from 'electron'; -import { services } from '@register/services'; -import { setHomePath } from '@env/logs'; - -import * as os from 'os'; -import * as path from 'path'; -import * as fs from 'fs'; - -const HOME_FOLDER = '.chipmunk'; -const DOWNLOADS_FOLDER = 'downloads'; -const TMP_FOLDER = 'tmp'; -const APPS_FOLDER = 'apps'; -const SETTINGS_FOLDER = 'settings'; -const STORAGE_FOLDER = 'storage'; -const DEVELOPING_PATH = 'application/holder/node_modules/electron/dist/resources'; - -export function getHomeFolder(): string { - return path.resolve(os.homedir(), HOME_FOLDER); -} - -@DependOn(production) -@SetupService(services['paths']) -export class Service extends Implementation { - private _home = ''; - private _app = ''; - private _bin = ''; - private _root = ''; - private _exec = ''; - private _appModules = ''; - private _resources = ''; - private _downloads = ''; - private _tmp = ''; - private _apps = ''; - private _settings = ''; - private _storage = ''; - - /** - * Initialization function - * @returns Promise - */ - public override init(): Promise { - return new Promise((resolve, reject) => { - this._home = getHomeFolder(); - this._settings = path.resolve(this._home, SETTINGS_FOLDER); - this._storage = path.resolve(this._home, STORAGE_FOLDER); - this._downloads = path.resolve(this._home, DOWNLOADS_FOLDER); - this._tmp = path.resolve(this._home, TMP_FOLDER); - this._apps = path.resolve(this._home, APPS_FOLDER); - const resources: Error | string = this._getResourcePath(); - if (resources instanceof Error) { - return reject(resources); - } - this._resources = resources; - const root: string | Error = this._getRootPath(); - if (root instanceof Error) { - return reject(root); - } - this._root = root; - const exec = this._getExecPath(); - if (exec === undefined) { - return reject(new Error(`Fail to detect exec path`)); - } - this._exec = exec; - this._app = path.dirname(exec); - this._bin = (() => { - if (os.platform() === 'darwin') { - return path.resolve(this._app, '../Resources/bin'); - } else { - return path.resolve(this._app, './Resources/bin'); - } - })(); - this._appModules = path.resolve(this._root, '../../node_modules'); - this._createHomeFolder() - .then(() => { - Promise.all( - [ - this._home, - this._settings, - this._storage, - this._downloads, - this._tmp, - this._apps, - ].map((folder: string) => { - return this._mkdir(folder); - }), - ) - .then(() => { - this.log().debug( - `Paths: -\thome: ${this._home} -\tsettings: ${this._settings} -\tstorage: ${this._storage} -\troot: ${this._root} -\tapp: ${this._app} -\tbin: ${this._bin} -\texec ${this._exec} -\tresources ${this._resources} -\tclient ${this.getClient()} -\tprealod ${this.getPreload()} -\tmodules ${this._appModules}`, - ); - setHomePath(this._home) - .catch((err: Error) => { - `Fail to setup home logs path: ${err.message}`; - }) - .finally(resolve); - }) - .catch((error: Error) => { - this.log().error( - `Fail to initialize paths due error: ${error.message}`, - ); - reject(error); - }); - }) - .catch(reject); - }); - } - - /** - * Returns path to logviewer folder (created in home-folder of current user) - * @returns string - */ - public getHome(): string { - return this._home; - } - - public getSettings(): string { - return this._settings; - } - - public getStorage(): string { - return this._storage; - } - - public getRoot(): string { - return this._root; - } - - public getApp(): string { - return this._app; - } - - public getBin(): string { - return this._bin; - } - - public getClient(): string { - return path.resolve(this.getRoot(), 'client'); - } - - public getPreload(): string { - return path.resolve(this.getRoot(), 'preload'); - } - - /** - * Returns path to node_modules folder of electron app - * @returns string - */ - public getAppModules(): string { - return this._appModules; - } - - /** - * Returns path to tmp folder - * @returns string - */ - public getTmp(): string { - return this._tmp; - } - - /** - * Returns path to downloads folder - * @returns string - */ - public getDownloads(): string { - return this._downloads; - } - - /** - * Returns path to apps folder - * @returns string - */ - public getApps(): string { - return this._apps; - } - - /** - * Returns path to executable file - * @holder { boolean } in true returns chipmunk.app, instead chipmunk.app/Contents/MacOS/chipmunk. This argument is actual only for darwin - * @returns string - */ - public getExec(holder = false): string { - if (os.platform() === 'darwin' && holder) { - return path.resolve(path.dirname(this._exec), '../../'); - } else { - return this._exec; - } - } - - public isElectron(): boolean { - return this._exec.trim().endsWith('electron'); - } - - /** - * Returns path to included resources - * @returns string - */ - public getResources(): string { - return this._resources; - } - - /** - * Returns path from home perspective - * @param {string} folder path to folder - * @returns string - */ - public resoveHomeFolder(folder: string): string { - return path.normalize(path.resolve(this._home, folder)); - } - - /** - * Returns path from root perspective - * @param {string} folder path to folder - * @returns string - */ - public resoveRootFolder(folder: string): string { - return path.normalize(path.resolve(this._root, folder)); - } - - /** - * Check path - * @param {string} path path to file / folder - * @returns boolean - */ - public isExist(path: string): boolean { - return fs.existsSync(path); - } - - /** - * @MacOS only - * Check is application file (chipmunk.app) located in system folder like "tmp" or "Downloads". - * @returns boolean - */ - public doesLocatedInSysFolder(): boolean { - if (process.platform !== 'darwin') { - return false; - } - if ( - this.getRoot().indexOf('/private/var/folders') === 0 && - this.getRoot().indexOf('AppTranslocation') !== -1 - ) { - return true; - } else { - return false; - } - } - - private _getExecPath(): string | undefined { - if (app === undefined) { - return require.main?.filename; - } else { - return app.getPath('exe'); - } - } - - private _createHomeFolder(): Promise { - return this._mkdir(this._home); - } - - private _mkdir(dir: string): Promise { - return new Promise((resolve, reject) => { - if (fs.existsSync(dir)) { - return resolve(); - } - fs.promises - .mkdir(dir) - .then(() => { - resolve(); - }) - .catch((error: Error) => { - this.log().error( - `Fail to create local logviewer folder "${dir}" due error: ${error.message}`, - ); - reject(error); - }); - }); - } - - /** - * Detects root folder of application - * @returns Promise - */ - private _getRootPath(): string | Error { - if ( - typeof require.main !== 'undefined' && - typeof require.main.filename === 'string' && - require.main.filename.trim() !== '' - ) { - return path.resolve(path.dirname(require.main.filename)); - } - try { - if ( - typeof require.resolve('../main') === 'string' && - require.resolve('../main').trim() === '' - ) { - return path.dirname(require.resolve('../main')); - } - } catch (_err) { - // We are developing mode; app is running with `yarn run electron` - } - if (process.argv instanceof Array && process.argv.length > 0) { - let sourceFile = ''; - process.argv.forEach((arg: string) => { - if (sourceFile !== '') { - return; - } - if (arg.search(/\.js$|\.ts$/gi) !== -1) { - sourceFile = arg; - } - }); - return path.dirname(path.resolve(process.cwd(), sourceFile)); - } - return new Error(`Fail to detect application root folder`); - } - - private _getResourcePath(): string | Error { - if (typeof process.resourcesPath === 'string' && process.resourcesPath !== '') { - if (process.resourcesPath.includes(DEVELOPING_PATH)) { - return path.resolve( - process.resourcesPath.replace('/node_modules/electron/dist/resources', ''), - `resources`, - ); - } else { - return path.resolve(process.resourcesPath, `app.asar.unpacked/resources`); - } - } - if (require.main === undefined) { - return new Error(`Cannot detect resource path because require.main === undefined`); - } - return path.resolve(require.main.filename, '../../../../../app.asar.unpacked/resources'); - } -} -export interface Service extends Interface {} -export const paths = register(new Service()); diff --git a/application/holder/src/service/production.ts b/application/holder/src/service/production.ts deleted file mode 100644 index 0d92a55a23..0000000000 --- a/application/holder/src/service/production.ts +++ /dev/null @@ -1,33 +0,0 @@ -import { SetupService, Interface, Implementation, register } from 'platform/entity/service'; -import { envvars } from '@loader/envvars'; -import { Level } from 'platform/log'; - -import { services } from '@register/services'; - -@SetupService(services['production']) -export class Service extends Implementation { - private _production = true; - private _logLevel: Level = Level.ERROR; - - public override init(): Promise { - return new Promise((resolve) => { - if (envvars.get().CHIPMUNK_DEVELOPING_MODE) { - this._production = false; - } else { - this._production = true; - } - this.log().debug(`Production is: ${this._production ? 'ON' : 'OFF'}`); - resolve(); - }); - } - - public isProduction(): boolean { - return this._production; - } - - public getLogLevel(): Level { - return this._logLevel; - } -} -export interface Service extends Interface {} -export const production = register(new Service()); diff --git a/application/holder/src/service/sessions.ts b/application/holder/src/service/sessions.ts deleted file mode 100644 index 473ff09e16..0000000000 --- a/application/holder/src/service/sessions.ts +++ /dev/null @@ -1,331 +0,0 @@ -import { - SetupService, - Interface, - Implementation, - DependOn, - register, -} from 'platform/entity/service'; -import { electron } from '@service/electron'; -import { jobs } from '@service/jobs'; -import { services } from '@register/services'; -import { Session } from 'rustcore'; -import { Active } from './sessions/active'; -import { Holder } from './sessions/holder'; -import { Subscriber } from 'platform/env/subscription'; - -import * as RequestHandlers from './sessions/requests'; -import * as Requests from 'platform/ipc/request'; - -export { Jobs } from './sessions/holder'; - -@DependOn(jobs) -@DependOn(electron) -@SetupService(services['sessions']) -export class Service extends Implementation { - private _sessions: Map = new Map(); - private _active: Active = new Active(); - - public override ready(): Promise { - this.register( - electron - .ipc() - .respondent( - this.getName(), - Requests.Session.Create.Request, - RequestHandlers.Session.Create.handler, - ), - ); - this.register( - electron - .ipc() - .respondent( - this.getName(), - Requests.Session.Destroy.Request, - RequestHandlers.Session.Destroy.handler, - ), - ); - this.register( - electron - .ipc() - .respondent( - this.getName(), - Requests.Session.Export.Request, - RequestHandlers.Session.Export.handler, - ), - ); - this.register( - electron - .ipc() - .respondent( - this.getName(), - Requests.Session.ExportRaw.Request, - RequestHandlers.Session.ExportRaw.handler, - ), - ); - this.register( - electron - .ipc() - .respondent( - this.getName(), - Requests.Session.IsExportRawAvailable.Request, - RequestHandlers.Session.IsExportRawAvailable.handler, - ), - ); - this.register( - electron - .ipc() - .respondent( - this.getName(), - Requests.Stream.Chunk.Request, - RequestHandlers.Stream.Chunk.handler, - ), - ); - this.register( - electron - .ipc() - .respondent( - this.getName(), - Requests.Stream.Ranges.Request, - RequestHandlers.Stream.Ranges.handler, - ), - ); - this.register( - electron - .ipc() - .respondent( - this.getName(), - Requests.Stream.AddBookmark.Request, - RequestHandlers.Stream.AddBookmark.handler, - ), - ); - this.register( - electron - .ipc() - .respondent( - this.getName(), - Requests.Stream.SetBookmarks.Request, - RequestHandlers.Stream.SetBookmarks.handler, - ), - ); - this.register( - electron - .ipc() - .respondent( - this.getName(), - Requests.Stream.RemoveBookmark.Request, - RequestHandlers.Stream.RemoveBookmark.handler, - ), - ); - this.register( - electron - .ipc() - .respondent( - this.getName(), - Requests.Stream.Mode.Request, - RequestHandlers.Stream.Mode.handler, - ), - ); - this.register( - electron - .ipc() - .respondent( - this.getName(), - Requests.Stream.Expand.Request, - RequestHandlers.Stream.Expand.handler, - ), - ); - this.register( - electron - .ipc() - .respondent( - this.getName(), - Requests.Stream.Indexed.Request, - RequestHandlers.Stream.Indexed.handler, - ), - ); - this.register( - electron - .ipc() - .respondent( - this.getName(), - Requests.Stream.IndexedLen.Request, - RequestHandlers.Stream.IndexedLen.handler, - ), - ); - this.register( - electron - .ipc() - .respondent( - this.getName(), - Requests.Stream.IndexesAround.Request, - RequestHandlers.Stream.IndexesAround.handler, - ), - ); - this.register( - electron - .ipc() - .respondent( - this.getName(), - Requests.Stream.IndexesAsRanges.Request, - RequestHandlers.Stream.IndexesAsRanges.handler, - ), - ); - this.register( - electron - .ipc() - .respondent( - this.getName(), - Requests.Search.Search.Request, - RequestHandlers.Search.Search.handler, - ), - ); - this.register( - electron - .ipc() - .respondent( - this.getName(), - Requests.Search.NextNested.Request, - RequestHandlers.Search.NextNested.handler, - ), - ); - this.register( - electron - .ipc() - .respondent( - this.getName(), - Requests.Search.Drop.Request, - RequestHandlers.Search.Drop.handler, - ), - ); - this.register( - electron - .ipc() - .respondent( - this.getName(), - Requests.Search.Nearest.Request, - RequestHandlers.Search.Nearest.handler, - ), - ); - this.register( - electron - .ipc() - .respondent( - this.getName(), - Requests.Values.Extract.Request, - RequestHandlers.Values.Extract.handler, - ), - ); - this.register( - electron - .ipc() - .respondent( - this.getName(), - Requests.Values.Frame.Request, - RequestHandlers.Values.Frame.handler, - ), - ); - this.register( - electron - .ipc() - .respondent( - this.getName(), - Requests.Observe.Start.Request, - RequestHandlers.Observe.Start.handler, - ), - ); - this.register( - electron - .ipc() - .respondent( - this.getName(), - Requests.Observe.List.Request, - RequestHandlers.Observe.List.handler, - ), - ); - this.register( - electron - .ipc() - .respondent( - this.getName(), - Requests.Observe.Abort.Request, - RequestHandlers.Observe.Abort.handler, - ), - ); - this.register( - electron - .ipc() - .respondent( - this.getName(), - Requests.Observe.SDE.Request, - RequestHandlers.Observe.Sde.handler, - ), - ); - this.register( - electron - .ipc() - .respondent( - this.getName(), - Requests.Observe.SourcesDefinitionsList.Request, - RequestHandlers.Observe.Sources.handler, - ), - ); - this.register( - electron - .ipc() - .respondent( - this.getName(), - Requests.Search.Map.Request, - RequestHandlers.Search.Map.handler, - ), - ); - return Promise.resolve(); - } - - public override destroy(): Promise { - this.unsubscribe(); - return new Promise((resolve) => { - Promise.all( - Array.from(this._sessions.values()).map((session) => { - return session.destroy().catch((err: Error) => { - this.log().error( - `Fail to destroy session ${session.session.getUUID()}; error: ${ - err.message - }`, - ); - }); - }), - ) - .catch((err: Error) => { - this.log().error(`Error during destryoying sessions: ${err.message}`); - }) - .finally(resolve); - }); - } - - public add(session: Session, subscriber: Subscriber): Holder { - const holder = new Holder(session, subscriber); - this._sessions.set(session.getUUID(), holder); - return holder; - } - - public delete(uuid: string) { - this._sessions.delete(uuid); - } - - public get(uuid: string): Holder | undefined { - return this._sessions.get(uuid); - } - - public setActive(uuid: string) { - if (!this.exists(uuid)) { - throw new Error(`Fail to set session ${uuid} active. it doesn't exist`); - } - this._active.set(uuid); - } - - public exists(uuid: string): boolean { - return this._sessions.has(uuid); - } -} -export interface Service extends Interface {} -export const sessions = register(new Service()); diff --git a/application/holder/src/service/sessions/active.ts b/application/holder/src/service/sessions/active.ts deleted file mode 100644 index cd7e0acbc4..0000000000 --- a/application/holder/src/service/sessions/active.ts +++ /dev/null @@ -1,9 +0,0 @@ -export class Active { - private _uuid: string | undefined; - public set(uuid: string): void { - this._uuid = uuid; - } - public get(): string | undefined { - return this._uuid; - } -} diff --git a/application/holder/src/service/sessions/holder.ts b/application/holder/src/service/sessions/holder.ts deleted file mode 100644 index 6734ca811b..0000000000 --- a/application/holder/src/service/sessions/holder.ts +++ /dev/null @@ -1,203 +0,0 @@ -import { Subscriber } from 'platform/env/subscription'; -import { Session } from 'rustcore'; -import { JobsTracker } from 'platform/env/promise'; -import { scope } from 'platform/env/scope'; -import { Logger } from 'platform/log'; -import { jobs } from '@service/jobs'; -import { ICancelablePromise } from 'platform/env/promise'; -import { $ } from 'rustcore'; - -import * as Events from 'platform/ipc/event'; -import * as path from 'path'; - -export enum Jobs { - search = 'search', - values = 'values', -} - -export class Holder { - public readonly session: Session; - public readonly subscriber: Subscriber; - protected readonly jobs: Map = new Map(); - protected readonly observing: { - active: Map; - finished: Map; - } = { - active: new Map(), - finished: new Map(), - }; - protected readonly logger: Logger; - protected shutdown = false; - - constructor(session: Session, subscriber: Subscriber) { - this.session = session; - this.subscriber = subscriber; - this.logger = scope.getLogger(`[Session: ${this.session.getUUID()}]`); - } - - public register(family: Jobs): JobsTracker { - let jobs = this.jobs.get(family); - if (jobs === undefined) { - jobs = new JobsTracker(); - this.jobs.set(family, jobs); - } - return jobs as unknown as JobsTracker; - } - - public destroy(): Promise { - this.shutdown = true; - return new Promise((resolve, reject) => { - Promise.allSettled( - Array.from(this.jobs.values()).map((jobs) => - jobs.abort().catch((err: Error) => { - this.logger.error( - `Fail correctly stop session's jobs; error: ${err.message}`, - ); - }), - ), - ) - .catch((err: Error) => { - this.logger.error( - `Fail correctly stop all session's jobs; error: ${err.message}`, - ); - }) - .finally(() => { - this.observing.active.clear(); - this.session.destroy().then(resolve).catch(reject); - }); - }); - } - - public observe(): { - start(observe: $.IObserve): Promise; - cancel(uuid: string): Promise; - list(): { [key: string]: string }; - } { - return { - start: (cfg: $.IObserve): Promise => { - const observe = new $.Observe(cfg); - if (this.shutdown) { - return Promise.reject(new Error(`Session is closing`)); - } - let jobDesc = observe.origin.asJob(); - if (jobDesc instanceof Error) { - this.logger.error(`Fail to get job description: ${jobDesc.message}`); - jobDesc = { - name: 'unknown', - desc: 'unknown', - icon: undefined, - }; - } - const job = jobs - .create({ - session: this.session.getUUID(), - name: jobDesc.name, - desc: jobDesc.desc, - icon: jobDesc.icon, - }) - .start(); - return new Promise((resolve, reject) => { - const observer = this.session - .getStream() - .observe(cfg) - .on('confirmed', () => { - Events.IpcEvent.emit( - new Events.Observe.Started.Event({ - session: this.session.getUUID(), - operation: observer.uuid(), - source: observe.json().to(), - }), - ); - }) - .on('processing', () => { - resolve(observer.uuid()); - }) - .catch((err: Error) => { - this.logger.error(`Fail to call observe. Error: ${err.message}`); - reject(err); - }) - .finally(() => { - job.done(); - this.observing.active.delete(observer.uuid()); - this.observing.finished.set(observer.uuid(), observe); - Events.IpcEvent.emit( - new Events.Observe.Finished.Event({ - session: this.session.getUUID(), - operation: observer.uuid(), - source: observe.json().to(), - }), - ); - }); - this.observing.active.set(observer.uuid(), { source: observe, observer }); - }); - }, - cancel: (uuid: string): Promise => { - const operation = this.observing.active.get(uuid); - if (operation === undefined) { - return Promise.reject(new Error(`AAA Operation isn't found`)); - } - return new Promise((resolve) => { - operation.observer - .finally(() => { - resolve(); - }) - .abort(); - }); - }, - list: (): { [key: string]: string } => { - const list: { [key: string]: string } = {}; - this.observing.active.forEach((operation, uuid) => { - list[uuid] = operation.source.json().to(); - }); - return list; - }, - }; - } - - public getFileExt(): string | Error { - const all = [ - Array.from(this.observing.active.values()).map((o) => o.source), - Array.from(this.observing.finished.values()), - ].flat(); - const files: Array = all - .map((o) => o.origin.files()) - .filter((f) => f !== undefined) - .flat(); - if (files.filter((f) => f === undefined).length > 0) { - return new Error(`Streams arn't supported yet`); - } - const parsers: $.Parser.Protocol[] = []; - all.forEach((observe) => { - if (parsers.includes(observe.parser.alias())) { - return; - } - parsers.push(observe.parser.alias()); - }); - if (parsers.length > 1) { - return new Error(`Multiple parsers are used`); - } else if (parsers.length === 0) { - return new Error(`No parsers has been found`); - } - const exts: string[] = files - .map((f) => path.extname(f as string)) - .filter((ex) => ex.trim() !== ''); - switch (parsers[0]) { - case $.Parser.Protocol.Text: - return `.txt`; - case $.Parser.Protocol.Plugin: - return exts.length === 0 ? '.plg' : exts[0]; - case $.Parser.Protocol.Dlt: - case $.Parser.Protocol.SomeIp: - if (files.length === 0) { - return new Error( - `No assigned files are found. Exporting from stream into new session arn't supported`, - ); - } - return exts.length === 0 ? '' : exts[0]; - } - } - - public isShutdowning(): boolean { - return this.shutdown; - } -} diff --git a/application/holder/src/service/sessions/requests/index.ts b/application/holder/src/service/sessions/requests/index.ts deleted file mode 100644 index e3da844574..0000000000 --- a/application/holder/src/service/sessions/requests/index.ts +++ /dev/null @@ -1,5 +0,0 @@ -export * as Session from './session'; -export * as Stream from './stream'; -export * as Search from './search'; -export * as Observe from './observe'; -export * as Values from './values'; diff --git a/application/holder/src/service/sessions/requests/observe/abort.ts b/application/holder/src/service/sessions/requests/observe/abort.ts deleted file mode 100644 index acf7855723..0000000000 --- a/application/holder/src/service/sessions/requests/observe/abort.ts +++ /dev/null @@ -1,40 +0,0 @@ -import { CancelablePromise } from 'platform/env/promise'; -import { sessions } from '@service/sessions'; -import { Logger } from 'platform/log'; - -import * as Requests from 'platform/ipc/request'; - -export const handler = Requests.InjectLogger< - Requests.Observe.Abort.Request, - CancelablePromise ->( - ( - log: Logger, - request: Requests.Observe.Abort.Request, - ): CancelablePromise => { - return new CancelablePromise((resolve, reject) => { - const stored = sessions.get(request.session); - if (stored === undefined) { - return reject(new Error(`Session doesn't exist`)); - } - stored - .observe() - .cancel(request.operation) - .then(() => { - resolve( - new Requests.Observe.Abort.Response({ - session: stored.session.getUUID(), - }), - ); - }) - .catch((err: Error) => { - resolve( - new Requests.Observe.Abort.Response({ - session: stored.session.getUUID(), - error: err.message, - }), - ); - }); - }); - }, -); diff --git a/application/holder/src/service/sessions/requests/observe/index.ts b/application/holder/src/service/sessions/requests/observe/index.ts deleted file mode 100644 index 7b1c7e53ba..0000000000 --- a/application/holder/src/service/sessions/requests/observe/index.ts +++ /dev/null @@ -1,5 +0,0 @@ -export * as List from './list'; -export * as Abort from './abort'; -export * as Sde from './sde'; -export * as Sources from './sources'; -export * as Start from './start'; diff --git a/application/holder/src/service/sessions/requests/observe/list.ts b/application/holder/src/service/sessions/requests/observe/list.ts deleted file mode 100644 index d40a64f481..0000000000 --- a/application/holder/src/service/sessions/requests/observe/list.ts +++ /dev/null @@ -1,28 +0,0 @@ -import { CancelablePromise } from 'platform/env/promise'; -import { sessions } from '@service/sessions'; -import { Logger } from 'platform/log'; - -import * as Requests from 'platform/ipc/request'; - -export const handler = Requests.InjectLogger< - Requests.Observe.List.Request, - CancelablePromise ->( - ( - log: Logger, - request: Requests.Observe.List.Request, - ): CancelablePromise => { - return new CancelablePromise((resolve, reject) => { - const stored = sessions.get(request.session); - if (stored === undefined) { - return reject(new Error(`Session doesn't exist`)); - } - resolve( - new Requests.Observe.List.Response({ - session: stored.session.getUUID(), - sources: stored.observe().list(), - }), - ); - }); - }, -); diff --git a/application/holder/src/service/sessions/requests/observe/sde.ts b/application/holder/src/service/sessions/requests/observe/sde.ts deleted file mode 100644 index bac86213b9..0000000000 --- a/application/holder/src/service/sessions/requests/observe/sde.ts +++ /dev/null @@ -1,42 +0,0 @@ -import { CancelablePromise } from 'platform/env/promise'; -import { sessions } from '@service/sessions'; -import { Logger } from 'platform/log'; -import { SdeResponse } from 'platform/types/sde'; - -import * as Requests from 'platform/ipc/request'; - -export const handler = Requests.InjectLogger< - Requests.Observe.SDE.Request, - CancelablePromise ->( - ( - log: Logger, - request: Requests.Observe.SDE.Request, - ): CancelablePromise => { - return new CancelablePromise((resolve, reject) => { - const stored = sessions.get(request.session); - if (stored === undefined) { - return reject(new Error(`Session doesn't exist`)); - } - stored.session - .getStream() - .sde(request.operation, request.request) - .then((result: SdeResponse) => { - resolve( - new Requests.Observe.SDE.Response({ - session: stored.session.getUUID(), - result, - }), - ); - }) - .catch((err: Error) => { - resolve( - new Requests.Observe.SDE.Response({ - session: stored.session.getUUID(), - error: err.message, - }), - ); - }); - }); - }, -); diff --git a/application/holder/src/service/sessions/requests/observe/sources.ts b/application/holder/src/service/sessions/requests/observe/sources.ts deleted file mode 100644 index 58b98507aa..0000000000 --- a/application/holder/src/service/sessions/requests/observe/sources.ts +++ /dev/null @@ -1,34 +0,0 @@ -import { CancelablePromise } from 'platform/env/promise'; -import { sessions } from '@service/sessions'; -import { Logger } from 'platform/log'; - -import * as Requests from 'platform/ipc/request'; - -export const handler = Requests.InjectLogger< - Requests.Observe.SourcesDefinitionsList.Request, - CancelablePromise ->( - ( - log: Logger, - request: Requests.Observe.SourcesDefinitionsList.Request, - ): CancelablePromise => { - return new CancelablePromise((resolve, reject) => { - const stored = sessions.get(request.session); - if (stored === undefined) { - return reject(new Error(`Session doesn't exist`)); - } - stored.session - .getStream() - .getSourcesDefinitions() - .then((sources) => { - resolve( - new Requests.Observe.SourcesDefinitionsList.Response({ - session: stored.session.getUUID(), - sources, - }), - ); - }) - .catch(reject); - }); - }, -); diff --git a/application/holder/src/service/sessions/requests/observe/start.ts b/application/holder/src/service/sessions/requests/observe/start.ts deleted file mode 100644 index b84420d547..0000000000 --- a/application/holder/src/service/sessions/requests/observe/start.ts +++ /dev/null @@ -1,40 +0,0 @@ -import { CancelablePromise } from 'platform/env/promise'; -import { sessions } from '@service/sessions'; -import { Logger } from 'platform/log'; - -import * as Requests from 'platform/ipc/request'; - -export const handler = Requests.InjectLogger< - Requests.Observe.Start.Request, - CancelablePromise ->( - ( - log: Logger, - request: Requests.Observe.Start.Request, - ): CancelablePromise => { - return new CancelablePromise((resolve, reject) => { - const stored = sessions.get(request.session); - if (stored === undefined) { - return reject(new Error(`Session doesn't exist`)); - } - stored - .observe() - .start(request.observe) - .then(() => { - resolve( - new Requests.Observe.Start.Response({ - session: stored.session.getUUID(), - }), - ); - }) - .catch((err: Error) => { - resolve( - new Requests.Observe.Start.Response({ - session: stored.session.getUUID(), - error: err.message, - }), - ); - }); - }); - }, -); diff --git a/application/holder/src/service/sessions/requests/search/drop.ts b/application/holder/src/service/sessions/requests/search/drop.ts deleted file mode 100644 index 36ae2844c2..0000000000 --- a/application/holder/src/service/sessions/requests/search/drop.ts +++ /dev/null @@ -1,44 +0,0 @@ -import { CancelablePromise } from 'platform/env/promise'; -import { sessions, Jobs } from '@service/sessions'; -import { Logger } from 'platform/log'; - -import * as Requests from 'platform/ipc/request'; - -export const handler = Requests.InjectLogger< - Requests.Search.Drop.Request, - CancelablePromise ->( - ( - log: Logger, - request: Requests.Search.Drop.Request, - ): CancelablePromise => { - return new CancelablePromise((resolve, reject) => { - const stored = sessions.get(request.session); - if (stored === undefined) { - return reject(new Error(`Session doesn't exist`)); - } - if (stored.isShutdowning()) { - return reject(new Error(`Session is closing`)); - } - stored - .register(Jobs.search) - .abort('aborting') - .catch((err: Error) => { - log.error(`Fail to cancel search operations; error: ${err.message}`); - }) - .finally(() => { - stored.session - .getSearch() - .drop() - .then(() => { - resolve( - new Requests.Search.Drop.Response({ - session: request.session, - }), - ); - }) - .catch(reject); - }); - }); - }, -); diff --git a/application/holder/src/service/sessions/requests/search/index.ts b/application/holder/src/service/sessions/requests/search/index.ts deleted file mode 100644 index f7f3a3da17..0000000000 --- a/application/holder/src/service/sessions/requests/search/index.ts +++ /dev/null @@ -1,5 +0,0 @@ -export * as Search from './search'; -export * as Drop from './drop'; -export * as Nearest from './nearest'; -export * as Map from './map'; -export * as NextNested from './next_nested'; diff --git a/application/holder/src/service/sessions/requests/search/map.ts b/application/holder/src/service/sessions/requests/search/map.ts deleted file mode 100644 index 64416b63af..0000000000 --- a/application/holder/src/service/sessions/requests/search/map.ts +++ /dev/null @@ -1,41 +0,0 @@ -import { CancelablePromise } from 'platform/env/promise'; -import { sessions } from '@service/sessions'; -import { Logger } from 'platform/log'; - -import * as Requests from 'platform/ipc/request'; - -export const handler = Requests.InjectLogger< - Requests.Search.Map.Request, - CancelablePromise ->( - ( - log: Logger, - request: Requests.Search.Map.Request, - ): CancelablePromise => { - return new CancelablePromise((resolve, reject) => { - const stored = sessions.get(request.session); - if (stored === undefined) { - return reject(new Error(`Session doesn't exist`)); - } - if (stored.isShutdowning()) { - return reject(new Error(`Session is closing`)); - } - stored.session - .getSearch() - .getMap(request.len, request.from, request.to) - .then((map) => { - resolve( - new Requests.Search.Map.Response({ - session: request.session, - map, - from: request.from === undefined ? 0 : request.from, - to: request.to === undefined ? 0 : request.to, - }), - ); - }) - .catch((error: Error) => { - reject(error); - }); - }); - }, -); diff --git a/application/holder/src/service/sessions/requests/search/nearest.ts b/application/holder/src/service/sessions/requests/search/nearest.ts deleted file mode 100644 index f4c2d3e1a0..0000000000 --- a/application/holder/src/service/sessions/requests/search/nearest.ts +++ /dev/null @@ -1,47 +0,0 @@ -import { CancelablePromise } from 'platform/env/promise'; -import { sessions, Jobs } from '@service/sessions'; -import { Logger } from 'platform/log'; - -import * as Requests from 'platform/ipc/request'; - -export const handler = Requests.InjectLogger< - Requests.Search.Nearest.Request, - CancelablePromise ->( - ( - log: Logger, - request: Requests.Search.Nearest.Request, - ): CancelablePromise => { - return new CancelablePromise((resolve, reject) => { - const stored = sessions.get(request.session); - if (stored === undefined) { - return reject(new Error(`Session doesn't exist`)); - } - if (stored.isShutdowning()) { - return reject(new Error(`Session is closing`)); - } - stored - .register(Jobs.search) - .abort('aborting') - .catch((err: Error) => { - log.error(`Fail to cancel search operations; error: ${err.message}`); - }) - .finally(() => { - stored.session - .getSearch() - .getNearest(request.row) - .then((nearest) => { - resolve( - new Requests.Search.Nearest.Response({ - session: request.session, - nearest, - }), - ); - }) - .catch((error: Error) => { - reject(error); - }); - }); - }); - }, -); diff --git a/application/holder/src/service/sessions/requests/search/next_nested.ts b/application/holder/src/service/sessions/requests/search/next_nested.ts deleted file mode 100644 index 145e3a7074..0000000000 --- a/application/holder/src/service/sessions/requests/search/next_nested.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { CancelablePromise } from 'platform/env/promise'; -import { sessions } from '@service/sessions'; -import { Logger } from 'platform/log'; -import { ICancelablePromise } from 'platform/env/promise'; - -import * as Requests from 'platform/ipc/request'; - -export const handler = Requests.InjectLogger< - Requests.Search.NextNested.Request, - ICancelablePromise ->( - ( - log: Logger, - request: Requests.Search.NextNested.Request, - ): ICancelablePromise => { - return new CancelablePromise((resolve, reject) => { - const session_uuid = request.session; - const stored = sessions.get(session_uuid); - if (stored === undefined) { - return reject(new Error(`Session doesn't exist`)); - } - if (stored.isShutdowning()) { - return reject(new Error(`Session is closing`)); - } - stored.session - .getSearch() - .searchNestedMatch(request.filter, request.from, request.rev) - .then((pos: [number, number] | undefined) => { - resolve( - new Requests.Search.NextNested.Response({ - session: session_uuid, - pos, - }), - ); - }); - }); - }, -); diff --git a/application/holder/src/service/sessions/requests/search/search.ts b/application/holder/src/service/sessions/requests/search/search.ts deleted file mode 100644 index 3adb981a1f..0000000000 --- a/application/holder/src/service/sessions/requests/search/search.ts +++ /dev/null @@ -1,61 +0,0 @@ -import { CancelablePromise } from 'platform/env/promise'; -import { sessions, Jobs } from '@service/sessions'; -import { Logger } from 'platform/log'; -import { ICancelablePromise } from 'platform/env/promise'; - -import * as Requests from 'platform/ipc/request'; - -export const handler = Requests.InjectLogger< - Requests.Search.Search.Request, - ICancelablePromise ->( - ( - log: Logger, - request: Requests.Search.Search.Request, - ): ICancelablePromise => { - return new CancelablePromise((resolve, reject) => { - const session_uuid = request.session; - const stored = sessions.get(session_uuid); - if (stored === undefined) { - return reject(new Error(`Session doesn't exist`)); - } - if (stored.isShutdowning()) { - return reject(new Error(`Session is closing`)); - } - stored.register(Jobs.search).registerAsUnknown( - stored.session - .getSearch() - .search(request.filters) - .then((found: number) => { - resolve( - new Requests.Search.Search.Response({ - session: session_uuid, - found, - canceled: false, - }), - ); - }) - .canceled(() => { - resolve( - new Requests.Search.Search.Response({ - session: session_uuid, - found: 0, - canceled: true, - }), - ); - }) - .catch((err) => { - log.warn(`Search was finished with error: ${err.message}`); - resolve( - new Requests.Search.Search.Response({ - session: session_uuid, - found: 0, - canceled: false, - error: err.message, - }), - ); - }), - ); - }); - }, -); diff --git a/application/holder/src/service/sessions/requests/session/create.ts b/application/holder/src/service/sessions/requests/session/create.ts deleted file mode 100644 index 3d600b23c9..0000000000 --- a/application/holder/src/service/sessions/requests/session/create.ts +++ /dev/null @@ -1,151 +0,0 @@ -import { CancelablePromise } from 'platform/env/promise'; -import { FilterMatch, ISearchUpdated } from 'platform/types/filter'; -import { Session, IEventIndexedMapUpdated } from 'rustcore'; -import { sessions } from '@service/sessions'; -import { Subscriber } from 'platform/env/subscription'; -import { Logger } from 'platform/log'; -import { jobs, aliases } from '@service/jobs'; - -import * as Events from 'platform/ipc/event'; -import * as Requests from 'platform/ipc/request'; - -export const handler = Requests.InjectLogger< - Requests.Session.Create.Request, - CancelablePromise ->( - ( - log: Logger, - // eslint-disable-next-line @typescript-eslint/no-unused-vars - request: Requests.Session.Create.Request, - ): CancelablePromise => { - return new CancelablePromise((resolve, reject) => { - Session.create() - .then((session: Session) => { - const uuid = session.getUUID(); - const subscriber = new Subscriber(); - subscriber.register( - session.getEvents().StreamUpdated.subscribe((len: number) => { - if (!sessions.exists(uuid)) { - return; - } - Events.IpcEvent.emit( - new Events.Stream.Updated.Event({ - session: uuid, - rows: len, - }), - ); - }), - ); - subscriber.register( - session.getEvents().SearchUpdated.subscribe((event: ISearchUpdated) => { - if (!sessions.exists(uuid)) { - return; - } - Events.IpcEvent.emit( - new Events.Search.Updated.Event({ - session: uuid, - rows: event.found, - stat: event.stat, - }), - ); - }), - ); - subscriber.register( - session.getEvents().SearchValuesUpdated.subscribe((map) => { - if (!sessions.exists(uuid)) { - return; - } - Events.IpcEvent.emit( - new Events.Values.Updated.Event({ - session: uuid, - map, - }), - ); - }), - ); - subscriber.register( - session.getEvents().SearchMapUpdated.subscribe((_map: FilterMatch[]) => { - if (!sessions.exists(uuid)) { - return; - } - Events.IpcEvent.emit( - new Events.Search.MapUpdated.Event({ - session: uuid, - map: null, - }), - ); - }), - ); - subscriber.register( - session - .getEvents() - .IndexedMapUpdated.subscribe((event: IEventIndexedMapUpdated) => { - if (!sessions.exists(uuid)) { - return; - } - Events.IpcEvent.emit( - new Events.Stream.IndexedMapUpdated.Event({ - session: uuid, - len: event.len, - }), - ); - }), - ); - subscriber.register( - session.getEvents().AttachmentsUpdated.subscribe((event) => { - if (!sessions.exists(uuid)) { - return; - } - Events.IpcEvent.emit( - new Events.Stream.Attachment.Event({ - session: uuid, - len: event.len, - attachment: event.attachment, - }), - ); - }), - ); - subscriber.register( - session.getEvents().FileRead.subscribe(() => { - if (!sessions.exists(uuid)) { - return; - } - session - .getStream() - .len() - .then((len: number) => { - const job = jobs.find(aliases.getFileReadingJobUuid(uuid)); - job !== undefined && - job.done({ - icon: 'file_download', - name: 'reading', - desc: 'read', - }); - - Events.IpcEvent.emit( - new Events.Stream.Updated.Event({ - session: uuid, - rows: len, - }), - ); - }) - .catch((err: Error) => { - log.error(`Fail to get len of stream: ${err.message}`); - }); - }), - ); - sessions.add(session, subscriber); - sessions.setActive(uuid); - resolve( - new Requests.Session.Create.Response({ - uuid: uuid, - }), - ); - }) - .catch((err: Error) => { - log.error(`Fail to create session: ${err.message}`); - reject(new Error(`Fail to create session`)); - }); - }); - }, -); diff --git a/application/holder/src/service/sessions/requests/session/destroy.ts b/application/holder/src/service/sessions/requests/session/destroy.ts deleted file mode 100644 index 70def8037f..0000000000 --- a/application/holder/src/service/sessions/requests/session/destroy.ts +++ /dev/null @@ -1,49 +0,0 @@ -import { CancelablePromise } from 'platform/env/promise'; -import { sessions } from '@service/sessions'; -import { Logger } from 'platform/log'; - -import * as Requests from 'platform/ipc/request'; - -export const handler = Requests.InjectLogger< - Requests.Session.Destroy.Request, - CancelablePromise ->( - ( - _log: Logger, - request: Requests.Session.Destroy.Request, - ): CancelablePromise => { - return new CancelablePromise((resolve, reject) => { - const session_uuid = request.session; - const stored = sessions.get(session_uuid); - if (stored === undefined) { - return reject(new Error(`Session doesn't exist`)); - } - if (stored.isShutdowning()) { - return resolve( - new Requests.Session.Destroy.Response({ - session: session_uuid, - }), - ); - } else { - stored - .destroy() - .then(() => { - sessions.delete(session_uuid); - resolve( - new Requests.Session.Destroy.Response({ - session: session_uuid, - }), - ); - }) - .catch((err: Error) => { - resolve( - new Requests.Session.Destroy.Response({ - session: session_uuid, - error: err.message, - }), - ); - }); - } - }); - }, -); diff --git a/application/holder/src/service/sessions/requests/session/export.raw.awailable.ts b/application/holder/src/service/sessions/requests/session/export.raw.awailable.ts deleted file mode 100644 index b7fe322509..0000000000 --- a/application/holder/src/service/sessions/requests/session/export.raw.awailable.ts +++ /dev/null @@ -1,43 +0,0 @@ -import { CancelablePromise } from 'platform/env/promise'; -import { sessions } from '@service/sessions'; -import { Logger } from 'platform/log'; - -import * as Requests from 'platform/ipc/request'; - -export const handler = Requests.InjectLogger< - Requests.Session.IsExportRawAvailable.Request, - CancelablePromise ->( - ( - _log: Logger, - request: Requests.Session.IsExportRawAvailable.Request, - ): CancelablePromise => { - return new CancelablePromise( - (resolve, reject) => { - const session_uuid = request.session; - const stored = sessions.get(session_uuid); - if (stored === undefined) { - return reject(new Error(`Session doesn't exist`)); - } - stored.session - .isRawExportAvailable() - .then((available) => { - resolve( - new Requests.Session.IsExportRawAvailable.Response({ - available, - error: undefined, - }), - ); - }) - .catch((err: Error) => { - resolve( - new Requests.Session.IsExportRawAvailable.Response({ - available: false, - error: err.message, - }), - ); - }); - }, - ); - }, -); diff --git a/application/holder/src/service/sessions/requests/session/export.raw.ts b/application/holder/src/service/sessions/requests/session/export.raw.ts deleted file mode 100644 index 022a73be8d..0000000000 --- a/application/holder/src/service/sessions/requests/session/export.raw.ts +++ /dev/null @@ -1,65 +0,0 @@ -import { CancelablePromise } from 'platform/env/promise'; -import { sessions } from '@service/sessions'; -import { Logger } from 'platform/log'; -import { paths } from '@service/paths'; - -import * as Requests from 'platform/ipc/request'; -import * as path from 'path'; - -export const handler = Requests.InjectLogger< - Requests.Session.ExportRaw.Request, - CancelablePromise ->( - ( - _log: Logger, - request: Requests.Session.ExportRaw.Request, - ): CancelablePromise => { - return new CancelablePromise((resolve, reject) => { - const session_uuid = request.session; - const stored = sessions.get(session_uuid); - if (stored === undefined) { - return reject(new Error(`Session doesn't exist`)); - } - const dest = (() => { - if (request.dest !== undefined) { - return request.dest; - } else { - const ext = stored.getFileExt(); - if (ext instanceof Error) { - return ext; - } - return path.join( - paths.getTmp(), - `export_${new Date().toLocaleTimeString().replace(/[^\d]/gi, '_')}${ext}`, - ); - } - })(); - if (dest instanceof Error) { - return resolve( - new Requests.Session.ExportRaw.Response({ - filename: undefined, - error: dest.message, - }), - ); - } - stored.session - .getStream() - .exportRaw(dest, request.ranges) - .then((complete) => { - resolve( - new Requests.Session.ExportRaw.Response({ - filename: complete ? dest : undefined, - }), - ); - }) - .catch((err: Error) => { - resolve( - new Requests.Session.ExportRaw.Response({ - filename: undefined, - error: err.message, - }), - ); - }); - }); - }, -); diff --git a/application/holder/src/service/sessions/requests/session/export.ts b/application/holder/src/service/sessions/requests/session/export.ts deleted file mode 100644 index 0500fa0c23..0000000000 --- a/application/holder/src/service/sessions/requests/session/export.ts +++ /dev/null @@ -1,65 +0,0 @@ -import { CancelablePromise } from 'platform/env/promise'; -import { sessions } from '@service/sessions'; -import { Logger } from 'platform/log'; -import { paths } from '@service/paths'; - -import * as Requests from 'platform/ipc/request'; -import * as path from 'path'; - -export const handler = Requests.InjectLogger< - Requests.Session.Export.Request, - CancelablePromise ->( - ( - _log: Logger, - request: Requests.Session.Export.Request, - ): CancelablePromise => { - return new CancelablePromise((resolve, reject) => { - const session_uuid = request.session; - const stored = sessions.get(session_uuid); - if (stored === undefined) { - return reject(new Error(`Session doesn't exist`)); - } - const dest = (() => { - if (request.dest !== undefined) { - return request.dest; - } else { - const ext = stored.getFileExt(); - if (ext instanceof Error) { - return ext; - } - return path.join( - paths.getTmp(), - `export_${new Date().toLocaleTimeString().replace(/[^\d]/gi, '_')}${ext}`, - ); - } - })(); - if (dest instanceof Error) { - return resolve( - new Requests.Session.ExportRaw.Response({ - filename: undefined, - error: dest.message, - }), - ); - } - stored.session - .getStream() - .export(dest, request.ranges, request.options) - .then((complete) => { - resolve( - new Requests.Session.Export.Response({ - filename: complete ? dest : undefined, - }), - ); - }) - .catch((err: Error) => { - resolve( - new Requests.Session.Export.Response({ - filename: undefined, - error: err.message, - }), - ); - }); - }); - }, -); diff --git a/application/holder/src/service/sessions/requests/session/index.ts b/application/holder/src/service/sessions/requests/session/index.ts deleted file mode 100644 index 666416ca81..0000000000 --- a/application/holder/src/service/sessions/requests/session/index.ts +++ /dev/null @@ -1,5 +0,0 @@ -export * as Create from './create'; -export * as Destroy from './destroy'; -export * as Export from './export'; -export * as ExportRaw from './export.raw'; -export * as IsExportRawAvailable from './export.raw.awailable'; diff --git a/application/holder/src/service/sessions/requests/stream/add_bookmark.ts b/application/holder/src/service/sessions/requests/stream/add_bookmark.ts deleted file mode 100644 index cec37bc6a7..0000000000 --- a/application/holder/src/service/sessions/requests/stream/add_bookmark.ts +++ /dev/null @@ -1,40 +0,0 @@ -import { CancelablePromise } from 'platform/env/promise'; -import { sessions } from '@service/sessions'; -import { Logger } from 'platform/log'; - -import * as Requests from 'platform/ipc/request'; - -export const handler = Requests.InjectLogger< - Requests.Stream.AddBookmark.Request, - CancelablePromise ->( - ( - _log: Logger, - request: Requests.Stream.AddBookmark.Request, - ): CancelablePromise => { - return new CancelablePromise((resolve, reject) => { - const stored = sessions.get(request.session); - if (stored === undefined) { - return reject(new Error(`Session doesn't exist`)); - } - stored.session - .getStream() - .addBookmark(request.row) - .then(() => { - resolve( - new Requests.Stream.AddBookmark.Response({ - session: stored.session.getUUID(), - }), - ); - }) - .catch((err: Error) => { - resolve( - new Requests.Stream.AddBookmark.Response({ - session: stored.session.getUUID(), - error: err.message, - }), - ); - }); - }); - }, -); diff --git a/application/holder/src/service/sessions/requests/stream/chunk.ts b/application/holder/src/service/sessions/requests/stream/chunk.ts deleted file mode 100644 index 41f3d0f3c1..0000000000 --- a/application/holder/src/service/sessions/requests/stream/chunk.ts +++ /dev/null @@ -1,36 +0,0 @@ -import { CancelablePromise } from 'platform/env/promise'; -import { sessions } from '@service/sessions'; -import { Logger } from 'platform/log'; - -import * as Requests from 'platform/ipc/request'; - -export const handler = Requests.InjectLogger< - Requests.Stream.Chunk.Request, - CancelablePromise ->( - ( - log: Logger, - request: Requests.Stream.Chunk.Request, - ): CancelablePromise => { - return new CancelablePromise((resolve, reject) => { - const stored = sessions.get(request.session); - if (stored === undefined) { - return reject(new Error(`Session doesn't exist`)); - } - stored.session - .getStream() - .grab(request.from, request.to - request.from + 1) - .then((rows) => { - resolve( - new Requests.Stream.Chunk.Response({ - session: stored.session.getUUID(), - from: request.from, - to: request.to, - rows, - }), - ); - }) - .catch(reject); - }); - }, -); diff --git a/application/holder/src/service/sessions/requests/stream/expand_indexing_map.ts b/application/holder/src/service/sessions/requests/stream/expand_indexing_map.ts deleted file mode 100644 index 314bd6cb0a..0000000000 --- a/application/holder/src/service/sessions/requests/stream/expand_indexing_map.ts +++ /dev/null @@ -1,40 +0,0 @@ -import { CancelablePromise } from 'platform/env/promise'; -import { sessions } from '@service/sessions'; -import { Logger } from 'platform/log'; - -import * as Requests from 'platform/ipc/request'; - -export const handler = Requests.InjectLogger< - Requests.Stream.Expand.Request, - CancelablePromise ->( - ( - _log: Logger, - request: Requests.Stream.Expand.Request, - ): CancelablePromise => { - return new CancelablePromise((resolve, reject) => { - const stored = sessions.get(request.session); - if (stored === undefined) { - return reject(new Error(`Session doesn't exist`)); - } - stored.session - .getStream() - .expandBreadcrumbs(request.seporator, request.offset, request.above) - .then(() => { - resolve( - new Requests.Stream.Expand.Response({ - session: stored.session.getUUID(), - }), - ); - }) - .catch((err: Error) => { - resolve( - new Requests.Stream.Expand.Response({ - session: stored.session.getUUID(), - error: err.message, - }), - ); - }); - }); - }, -); diff --git a/application/holder/src/service/sessions/requests/stream/index.ts b/application/holder/src/service/sessions/requests/stream/index.ts deleted file mode 100644 index 72f4067b21..0000000000 --- a/application/holder/src/service/sessions/requests/stream/index.ts +++ /dev/null @@ -1,11 +0,0 @@ -export * as Chunk from './chunk'; -export * as Ranges from './ranges'; -export * as Indexed from './indexed'; -export * as AddBookmark from './add_bookmark'; -export * as SetBookmarks from './set_bookmarks'; -export * as RemoveBookmark from './remove_bookmark'; -export * as Mode from './set_indexing_mode'; -export * as Expand from './expand_indexing_map'; -export * as IndexedLen from './indexed_len'; -export * as IndexesAround from './indexes_around'; -export * as IndexesAsRanges from './indexes_as_ranges'; diff --git a/application/holder/src/service/sessions/requests/stream/indexed.ts b/application/holder/src/service/sessions/requests/stream/indexed.ts deleted file mode 100644 index 26c3082e46..0000000000 --- a/application/holder/src/service/sessions/requests/stream/indexed.ts +++ /dev/null @@ -1,36 +0,0 @@ -import { CancelablePromise } from 'platform/env/promise'; -import { sessions } from '@service/sessions'; -import { Logger } from 'platform/log'; - -import * as Requests from 'platform/ipc/request'; - -export const handler = Requests.InjectLogger< - Requests.Stream.Indexed.Request, - CancelablePromise ->( - ( - log: Logger, - request: Requests.Stream.Indexed.Request, - ): CancelablePromise => { - return new CancelablePromise((resolve, reject) => { - const stored = sessions.get(request.session); - if (stored === undefined) { - return reject(new Error(`Session doesn't exist`)); - } - stored.session - .getStream() - .grabIndexed(request.from, request.to - request.from + 1) - .then((rows) => { - resolve( - new Requests.Stream.Indexed.Response({ - session: stored.session.getUUID(), - from: request.from, - to: request.to, - rows, - }), - ); - }) - .catch(reject); - }); - }, -); diff --git a/application/holder/src/service/sessions/requests/stream/indexed_len.ts b/application/holder/src/service/sessions/requests/stream/indexed_len.ts deleted file mode 100644 index 27416be178..0000000000 --- a/application/holder/src/service/sessions/requests/stream/indexed_len.ts +++ /dev/null @@ -1,34 +0,0 @@ -import { CancelablePromise } from 'platform/env/promise'; -import { sessions } from '@service/sessions'; -import { Logger } from 'platform/log'; - -import * as Requests from 'platform/ipc/request'; - -export const handler = Requests.InjectLogger< - Requests.Stream.IndexedLen.Request, - CancelablePromise ->( - ( - _log: Logger, - request: Requests.Stream.IndexedLen.Request, - ): CancelablePromise => { - return new CancelablePromise((resolve, reject) => { - const stored = sessions.get(request.session); - if (stored === undefined) { - return reject(new Error(`Session doesn't exist`)); - } - stored.session - .getStream() - .getIndexedLen() - .then((len: number) => { - resolve( - new Requests.Stream.IndexedLen.Response({ - session: stored.session.getUUID(), - len, - }), - ); - }) - .catch(reject); - }); - }, -); diff --git a/application/holder/src/service/sessions/requests/stream/indexes_around.ts b/application/holder/src/service/sessions/requests/stream/indexes_around.ts deleted file mode 100644 index 4dc688f245..0000000000 --- a/application/holder/src/service/sessions/requests/stream/indexes_around.ts +++ /dev/null @@ -1,44 +0,0 @@ -import { CancelablePromise } from 'platform/env/promise'; -import { sessions } from '@service/sessions'; -import { Logger } from 'platform/log'; - -import * as Requests from 'platform/ipc/request'; - -export const handler = Requests.InjectLogger< - Requests.Stream.IndexesAround.Request, - CancelablePromise ->( - ( - _log: Logger, - request: Requests.Stream.IndexesAround.Request, - ): CancelablePromise => { - return new CancelablePromise((resolve, reject) => { - const stored = sessions.get(request.session); - if (stored === undefined) { - return reject(new Error(`Session doesn't exist`)); - } - stored.session - .getStream() - .getAroundIndexes(request.row) - .then((result) => { - resolve( - new Requests.Stream.IndexesAround.Response({ - session: stored.session.getUUID(), - before: result.before, - after: result.after, - }), - ); - }) - .catch((err: Error) => { - resolve( - new Requests.Stream.IndexesAround.Response({ - session: stored.session.getUUID(), - before: undefined, - after: undefined, - error: err.message, - }), - ); - }); - }); - }, -); diff --git a/application/holder/src/service/sessions/requests/stream/indexes_as_ranges.ts b/application/holder/src/service/sessions/requests/stream/indexes_as_ranges.ts deleted file mode 100644 index 2581cbfdb7..0000000000 --- a/application/holder/src/service/sessions/requests/stream/indexes_as_ranges.ts +++ /dev/null @@ -1,34 +0,0 @@ -import { CancelablePromise } from 'platform/env/promise'; -import { sessions } from '@service/sessions'; -import { Logger } from 'platform/log'; - -import * as Requests from 'platform/ipc/request'; - -export const handler = Requests.InjectLogger< - Requests.Stream.IndexesAsRanges.Request, - CancelablePromise ->( - ( - log: Logger, - request: Requests.Stream.IndexesAsRanges.Request, - ): CancelablePromise => { - return new CancelablePromise((resolve, reject) => { - const stored = sessions.get(request.session); - if (stored === undefined) { - return reject(new Error(`Session doesn't exist`)); - } - stored.session - .getStream() - .getIndexedRanges() - .then((ranges) => { - resolve( - new Requests.Stream.IndexesAsRanges.Response({ - session: stored.session.getUUID(), - ranges, - }), - ); - }) - .catch(reject); - }); - }, -); diff --git a/application/holder/src/service/sessions/requests/stream/ranges.ts b/application/holder/src/service/sessions/requests/stream/ranges.ts deleted file mode 100644 index 5c73d844ae..0000000000 --- a/application/holder/src/service/sessions/requests/stream/ranges.ts +++ /dev/null @@ -1,34 +0,0 @@ -import { CancelablePromise } from 'platform/env/promise'; -import { sessions } from '@service/sessions'; -import { Logger } from 'platform/log'; - -import * as Requests from 'platform/ipc/request'; - -export const handler = Requests.InjectLogger< - Requests.Stream.Ranges.Request, - CancelablePromise ->( - ( - log: Logger, - request: Requests.Stream.Ranges.Request, - ): CancelablePromise => { - return new CancelablePromise((resolve, reject) => { - const stored = sessions.get(request.session); - if (stored === undefined) { - return reject(new Error(`Session doesn't exist`)); - } - stored.session - .getStream() - .grabRanges(request.ranges) - .then((rows) => { - resolve( - new Requests.Stream.Ranges.Response({ - session: stored.session.getUUID(), - rows, - }), - ); - }) - .catch(reject); - }); - }, -); diff --git a/application/holder/src/service/sessions/requests/stream/remove_bookmark.ts b/application/holder/src/service/sessions/requests/stream/remove_bookmark.ts deleted file mode 100644 index 60cf1a8e5b..0000000000 --- a/application/holder/src/service/sessions/requests/stream/remove_bookmark.ts +++ /dev/null @@ -1,40 +0,0 @@ -import { CancelablePromise } from 'platform/env/promise'; -import { sessions } from '@service/sessions'; -import { Logger } from 'platform/log'; - -import * as Requests from 'platform/ipc/request'; - -export const handler = Requests.InjectLogger< - Requests.Stream.RemoveBookmark.Request, - CancelablePromise ->( - ( - _log: Logger, - request: Requests.Stream.RemoveBookmark.Request, - ): CancelablePromise => { - return new CancelablePromise((resolve, reject) => { - const stored = sessions.get(request.session); - if (stored === undefined) { - return reject(new Error(`Session doesn't exist`)); - } - stored.session - .getStream() - .removeBookmark(request.row) - .then(() => { - resolve( - new Requests.Stream.RemoveBookmark.Response({ - session: stored.session.getUUID(), - }), - ); - }) - .catch((err: Error) => { - resolve( - new Requests.Stream.RemoveBookmark.Response({ - session: stored.session.getUUID(), - error: err.message, - }), - ); - }); - }); - }, -); diff --git a/application/holder/src/service/sessions/requests/stream/set_bookmarks.ts b/application/holder/src/service/sessions/requests/stream/set_bookmarks.ts deleted file mode 100644 index b59dfb6354..0000000000 --- a/application/holder/src/service/sessions/requests/stream/set_bookmarks.ts +++ /dev/null @@ -1,40 +0,0 @@ -import { CancelablePromise } from 'platform/env/promise'; -import { sessions } from '@service/sessions'; -import { Logger } from 'platform/log'; - -import * as Requests from 'platform/ipc/request'; - -export const handler = Requests.InjectLogger< - Requests.Stream.SetBookmarks.Request, - CancelablePromise ->( - ( - _log: Logger, - request: Requests.Stream.SetBookmarks.Request, - ): CancelablePromise => { - return new CancelablePromise((resolve, reject) => { - const stored = sessions.get(request.session); - if (stored === undefined) { - return reject(new Error(`Session doesn't exist`)); - } - stored.session - .getStream() - .setBookmarks(request.rows) - .then(() => { - resolve( - new Requests.Stream.SetBookmarks.Response({ - session: stored.session.getUUID(), - }), - ); - }) - .catch((err: Error) => { - resolve( - new Requests.Stream.SetBookmarks.Response({ - session: stored.session.getUUID(), - error: err.message, - }), - ); - }); - }); - }, -); diff --git a/application/holder/src/service/sessions/requests/stream/set_indexing_mode.ts b/application/holder/src/service/sessions/requests/stream/set_indexing_mode.ts deleted file mode 100644 index b2aec35ab1..0000000000 --- a/application/holder/src/service/sessions/requests/stream/set_indexing_mode.ts +++ /dev/null @@ -1,40 +0,0 @@ -import { CancelablePromise } from 'platform/env/promise'; -import { sessions } from '@service/sessions'; -import { Logger } from 'platform/log'; - -import * as Requests from 'platform/ipc/request'; - -export const handler = Requests.InjectLogger< - Requests.Stream.Mode.Request, - CancelablePromise ->( - ( - _log: Logger, - request: Requests.Stream.Mode.Request, - ): CancelablePromise => { - return new CancelablePromise((resolve, reject) => { - const stored = sessions.get(request.session); - if (stored === undefined) { - return reject(new Error(`Session doesn't exist`)); - } - stored.session - .getStream() - .setIndexingMode(request.mode) - .then(() => { - resolve( - new Requests.Stream.Mode.Response({ - session: stored.session.getUUID(), - }), - ); - }) - .catch((err: Error) => { - resolve( - new Requests.Stream.Mode.Response({ - session: stored.session.getUUID(), - error: err.message, - }), - ); - }); - }); - }, -); diff --git a/application/holder/src/service/sessions/requests/values/extract.ts b/application/holder/src/service/sessions/requests/values/extract.ts deleted file mode 100644 index 6960719833..0000000000 --- a/application/holder/src/service/sessions/requests/values/extract.ts +++ /dev/null @@ -1,58 +0,0 @@ -import { CancelablePromise } from 'platform/env/promise'; -import { sessions, Jobs } from '@service/sessions'; -import { Logger } from 'platform/log'; -import { ICancelablePromise } from 'platform/env/promise'; - -import * as Requests from 'platform/ipc/request'; - -export const handler = Requests.InjectLogger< - Requests.Values.Extract.Request, - ICancelablePromise ->( - ( - log: Logger, - request: Requests.Values.Extract.Request, - ): ICancelablePromise => { - return new CancelablePromise((resolve, reject) => { - const session_uuid = request.session; - const stored = sessions.get(session_uuid); - if (stored === undefined) { - return reject(new Error(`Session doesn't exist`)); - } - if (stored.isShutdowning()) { - return reject(new Error(`Session is closing`)); - } - stored.register(Jobs.values).registerAsUnknown( - stored.session - .getSearch() - .values(request.filters) - .then(() => { - resolve( - new Requests.Values.Extract.Response({ - session: session_uuid, - canceled: false, - }), - ); - }) - .canceled(() => { - resolve( - new Requests.Values.Extract.Response({ - session: session_uuid, - canceled: true, - }), - ); - }) - .catch((err) => { - log.warn(`Search values was finished with error: ${err.message}`); - resolve( - new Requests.Values.Extract.Response({ - session: session_uuid, - canceled: false, - error: err.message, - }), - ); - }), - ); - }); - }, -); diff --git a/application/holder/src/service/sessions/requests/values/frame.ts b/application/holder/src/service/sessions/requests/values/frame.ts deleted file mode 100644 index 1563bead0a..0000000000 --- a/application/holder/src/service/sessions/requests/values/frame.ts +++ /dev/null @@ -1,61 +0,0 @@ -import { CancelablePromise } from 'platform/env/promise'; -import { sessions, Jobs } from '@service/sessions'; -import { Logger } from 'platform/log'; -import { ICancelablePromise } from 'platform/env/promise'; - -import * as Requests from 'platform/ipc/request'; - -export const handler = Requests.InjectLogger< - Requests.Values.Frame.Request, - ICancelablePromise ->( - ( - log: Logger, - request: Requests.Values.Frame.Request, - ): ICancelablePromise => { - return new CancelablePromise((resolve, reject) => { - const session_uuid = request.session; - const stored = sessions.get(session_uuid); - if (stored === undefined) { - return reject(new Error(`Session doesn't exist`)); - } - if (stored.isShutdowning()) { - return reject(new Error(`Session is closing`)); - } - stored.register(Jobs.values).registerAsUnknown( - stored.session - .getSearch() - .getValues(request.width, request.from, request.to) - .then((map) => { - resolve( - new Requests.Values.Frame.Response({ - session: session_uuid, - values: map, - canceled: false, - }), - ); - }) - .canceled(() => { - resolve( - new Requests.Values.Frame.Response({ - session: session_uuid, - canceled: true, - values: new Map(), - }), - ); - }) - .catch((err) => { - log.warn(`Search values was finished with error: ${err.message}`); - resolve( - new Requests.Values.Frame.Response({ - session: session_uuid, - canceled: false, - values: new Map(), - error: err.message, - }), - ); - }), - ); - }); - }, -); diff --git a/application/holder/src/service/sessions/requests/values/index.ts b/application/holder/src/service/sessions/requests/values/index.ts deleted file mode 100644 index de32ddcee8..0000000000 --- a/application/holder/src/service/sessions/requests/values/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * as Extract from './extract'; -export * as Frame from './frame'; diff --git a/application/holder/src/service/settings.ts b/application/holder/src/service/settings.ts deleted file mode 100644 index dd809b97b3..0000000000 --- a/application/holder/src/service/settings.ts +++ /dev/null @@ -1,133 +0,0 @@ -import { - SetupService, - Interface, - Implementation, - register, - DependOn, -} from 'platform/entity/service'; -import { Storage } from 'platform/types/storage/storage'; -import { Record } from 'platform/types/storage/storage.record'; -import { Entry, ISettingsEntry } from 'platform/types/settings/entry'; -import { services } from '@register/services'; -import { storage } from '@service/storage'; -import { paths } from '@service/paths'; -import { FileController } from '@env/fs/accessor'; -import { electron } from '@service/electron'; - -import * as Requests from 'platform/ipc/request'; -import * as RequestHandlers from './settings/requests'; -import * as initial from './settings/index'; -import * as path from 'path'; - -const SETTINGS_FILE = 'settings.json'; - -@DependOn(electron) -@DependOn(paths) -@DependOn(storage) -@SetupService(services['settings']) -export class Service extends Implementation { - protected storage!: Storage; - protected entries: Map> = new Map(); - - public override ready(): Promise { - this.register( - electron - .ipc() - .respondent( - this.getName(), - Requests.Settings.Entries.Request, - RequestHandlers.Entries.handler, - ), - ); - this.register( - electron - .ipc() - .respondent( - this.getName(), - Requests.Settings.Validate.Request, - RequestHandlers.Validate.handler, - ), - ); - this.register( - electron - .ipc() - .respondent( - this.getName(), - Requests.Settings.Set.Request, - RequestHandlers.Set.handler, - ), - ); - this.register( - electron - .ipc() - .respondent( - this.getName(), - Requests.Settings.Get.Request, - RequestHandlers.Get.handler, - ), - ); - return this.storage.load(); - } - - public override init(): Promise { - this.storage = new Storage( - new FileController(path.resolve(paths.getHome(), SETTINGS_FILE)).init(), - {}, - ); - return new Promise((resolve, reject) => { - this.storage - .load() - .then(() => { - this.enroll(initial.network.settings.proxy); - this.enroll(initial.network.settings.authorization); - this.enroll(initial.network.settings.strictSSL); - this.enroll(initial.updater.settings.autoUpdateCheck); - this.enroll(initial.updater.settings.allowUpdateFromPrerelease); - this.enroll(initial.colors.settings.match); - this.enroll(initial.colors.settings.default_filter); - this.enroll(initial.colors.settings.default_chart); - resolve(); - }) - .catch(reject); - }); - } - - public override destroy(): Promise { - return this.storage.destroy(); - } - - public enroll(entry: Entry): Error | undefined { - if (this.entries.has(entry.value.fullpath())) { - return new Error(`Entry "${entry.value.fullpath()}" already has been registred`); - } - entry.bind(this.storage); - this.entries.set(entry.value.fullpath(), entry); - return undefined; - } - - public get(): { - value(path: string, key: string): T | undefined; - all(): ISettingsEntry[]; - entry(path: string, key: string): Entry | undefined; - } { - return { - value: ( - path: string, - key: string, - ): T | undefined => { - return this.storage.get(path, key); - }, - all: (): ISettingsEntry[] => { - return Array.from(this.entries.values()).map((e) => e.asObj()); - }, - entry: ( - path: string, - key: string, - ): Entry | undefined => { - return this.entries.get(Record.fullpath(path, key)) as Entry; - }, - }; - } -} -export interface Service extends Interface {} -export const settings = register(new Service()); diff --git a/application/holder/src/service/settings/colors.ts b/application/holder/src/service/settings/colors.ts deleted file mode 100644 index 1800a3588a..0000000000 --- a/application/holder/src/service/settings/colors.ts +++ /dev/null @@ -1,43 +0,0 @@ -import { Description, Visibility, Render } from 'platform/types/settings/entry.description'; -import { Entry } from 'platform/types/settings/entry'; - -import * as validators from 'platform/types/storage/storage.record.validators'; - -export const settings = { - match: new Entry( - new Description({ - key: 'match', - name: 'Match Color', - desc: 'Default color for match; used to highlight matching on active search', - path: 'general.colors', - type: Visibility.standard, - allowEmpty: true, - render: Render.Color, - }), - new validators.AnyStringOrUndefined(undefined), - ), - default_filter: new Entry( - new Description({ - key: 'default_filter', - name: 'Default Filter Color', - desc: 'Default color for just created filter', - path: 'general.colors', - type: Visibility.standard, - allowEmpty: true, - render: Render.Color, - }), - new validators.AnyStringOrUndefined(undefined), - ), - default_chart: new Entry( - new Description({ - key: 'default_chart', - name: 'Default Chart Color', - desc: 'Default color for just created chart', - path: 'general.colors', - type: Visibility.standard, - allowEmpty: true, - render: Render.Color, - }), - new validators.AnyStringOrUndefined(undefined), - ), -}; diff --git a/application/holder/src/service/settings/index.ts b/application/holder/src/service/settings/index.ts deleted file mode 100644 index 2752941a92..0000000000 --- a/application/holder/src/service/settings/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -export * as network from './network'; -export * as updater from './updater'; -export * as colors from './colors'; diff --git a/application/holder/src/service/settings/network.ts b/application/holder/src/service/settings/network.ts deleted file mode 100644 index 7b7e30111f..0000000000 --- a/application/holder/src/service/settings/network.ts +++ /dev/null @@ -1,43 +0,0 @@ -import { Description, Visibility, Render } from 'platform/types/settings/entry.description'; -import { Entry } from 'platform/types/settings/entry'; - -import * as validators from 'platform/types/storage/storage.record.validators'; - -export const settings = { - proxy: new Entry( - new Description({ - key: 'proxy', - name: 'Proxy', - desc: 'Default values would be taken from the http_proxy and https_proxy environment variables.', - path: 'general.network', - type: Visibility.standard, - allowEmpty: true, - render: Render.String, - }), - new validators.AnyStringOrUndefined(undefined), - ), - authorization: new Entry( - new Description({ - key: 'authorization', - name: 'Proxy-Authorization', - desc: 'The value to send as the Proxy-Authorization header for every network request.', - path: 'general.network', - type: Visibility.standard, - allowEmpty: true, - render: Render.String, - }), - new validators.AnyStringOrUndefined(undefined), - ), - strictSSL: new Entry( - new Description({ - key: 'strictSSL', - name: 'Proxy Strict SSL', - desc: 'Controls whether the proxy server certificate should be verified against the list of supplied CAs', - path: 'general.network', - type: Visibility.standard, - allowEmpty: true, - render: Render.Bool, - }), - new validators.BoolOrUndefined(false), - ), -}; diff --git a/application/holder/src/service/settings/requests/entries.ts b/application/holder/src/service/settings/requests/entries.ts deleted file mode 100644 index 5c03013486..0000000000 --- a/application/holder/src/service/settings/requests/entries.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { CancelablePromise } from 'platform/env/promise'; -import { settings } from '@service/settings'; -import { Logger } from 'platform/log'; - -import * as Requests from 'platform/ipc/request'; - -export const handler = Requests.InjectLogger< - Requests.Settings.Entries.Request, - CancelablePromise ->( - ( - _log: Logger, - _request: Requests.Settings.Entries.Request, - ): CancelablePromise => { - return new CancelablePromise((resolve, _reject) => { - resolve( - new Requests.Settings.Entries.Response({ - entries: settings.get().all(), - }), - ); - }); - }, -); diff --git a/application/holder/src/service/settings/requests/get.ts b/application/holder/src/service/settings/requests/get.ts deleted file mode 100644 index 40b6a7d960..0000000000 --- a/application/holder/src/service/settings/requests/get.ts +++ /dev/null @@ -1,24 +0,0 @@ -import { CancelablePromise } from 'platform/env/promise'; -import { settings } from '@service/settings'; -import { Logger } from 'platform/log'; - -import * as Requests from 'platform/ipc/request'; - -export const handler = Requests.InjectLogger< - Requests.Settings.Get.Request, - CancelablePromise ->( - ( - _log: Logger, - request: Requests.Settings.Get.Request, - ): CancelablePromise => { - return new CancelablePromise((resolve, _reject) => { - const entry = settings.get().entry(request.path, request.key); - return resolve( - new Requests.Settings.Get.Response({ - value: entry === undefined ? undefined : entry.value.get(), - }), - ); - }); - }, -); diff --git a/application/holder/src/service/settings/requests/index.ts b/application/holder/src/service/settings/requests/index.ts deleted file mode 100644 index 6b6d8bcad5..0000000000 --- a/application/holder/src/service/settings/requests/index.ts +++ /dev/null @@ -1,4 +0,0 @@ -export * as Entries from './entries'; -export * as Validate from './validate'; -export * as Set from './set'; -export * as Get from './get'; diff --git a/application/holder/src/service/settings/requests/set.ts b/application/holder/src/service/settings/requests/set.ts deleted file mode 100644 index 294f517fac..0000000000 --- a/application/holder/src/service/settings/requests/set.ts +++ /dev/null @@ -1,47 +0,0 @@ -import { CancelablePromise } from 'platform/env/promise'; -import { settings } from '@service/settings'; -import { Logger } from 'platform/log'; - -import * as Requests from 'platform/ipc/request'; - -export const handler = Requests.InjectLogger< - Requests.Settings.Set.Request, - CancelablePromise ->( - ( - _log: Logger, - request: Requests.Settings.Set.Request, - ): CancelablePromise => { - return new CancelablePromise((resolve, _reject) => { - const entry = settings.get().entry(request.path, request.key); - if (entry === undefined) { - return resolve( - new Requests.Settings.Set.Response({ - error: `Entry ${request.path}:${request.key} doesn't exist`, - }), - ); - } - if (request.value === undefined && entry.desc.allowEmpty) { - const error = entry.value.delete(); - resolve( - new Requests.Settings.Set.Response({ - error: error instanceof Error ? error.message : undefined, - }), - ); - } else if (request.value === undefined && !entry.desc.allowEmpty) { - resolve( - new Requests.Settings.Set.Response({ - error: `Cannot be empty`, - }), - ); - } else if (request.value !== undefined) { - const error = entry.value.set(request.value); - resolve( - new Requests.Settings.Set.Response({ - error: error instanceof Error ? error.message : undefined, - }), - ); - } - }); - }, -); diff --git a/application/holder/src/service/settings/requests/validate.ts b/application/holder/src/service/settings/requests/validate.ts deleted file mode 100644 index 87fdf8e0a6..0000000000 --- a/application/holder/src/service/settings/requests/validate.ts +++ /dev/null @@ -1,47 +0,0 @@ -import { CancelablePromise } from 'platform/env/promise'; -import { settings } from '@service/settings'; -import { Logger } from 'platform/log'; - -import * as Requests from 'platform/ipc/request'; - -export const handler = Requests.InjectLogger< - Requests.Settings.Validate.Request, - CancelablePromise ->( - ( - _log: Logger, - request: Requests.Settings.Validate.Request, - ): CancelablePromise => { - return new CancelablePromise((resolve, _reject) => { - const entry = settings.get().entry(request.path, request.key); - if (entry === undefined) { - return resolve( - new Requests.Settings.Validate.Response({ - error: `Entry ${request.path}:${request.key} doesn't exist`, - }), - ); - } - if (request.value === undefined) { - if (entry.desc.allowEmpty) { - return resolve( - new Requests.Settings.Validate.Response({ - error: undefined, - }), - ); - } else { - return resolve( - new Requests.Settings.Validate.Response({ - error: `Cannot be empty`, - }), - ); - } - } - const error = entry.value.validate(request.value); - resolve( - new Requests.Settings.Validate.Response({ - error: error instanceof Error ? error.message : undefined, - }), - ); - }); - }, -); diff --git a/application/holder/src/service/settings/updater.ts b/application/holder/src/service/settings/updater.ts deleted file mode 100644 index ed51fcecb9..0000000000 --- a/application/holder/src/service/settings/updater.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { Description, Visibility, Render } from 'platform/types/settings/entry.description'; -import { Entry } from 'platform/types/settings/entry'; - -import * as validators from 'platform/types/storage/storage.record.validators'; - -export const settings = { - autoUpdateCheck: new Entry( - new Description({ - key: 'autoUpdateCheck', - name: 'Auto update', - desc: 'Chipmunk checks updates automatically on start', - path: 'general', - type: Visibility.standard, - allowEmpty: true, - render: Render.Bool, - }), - new validators.BoolOrUndefined(true), - ), - allowUpdateFromPrerelease: new Entry( - new Description({ - key: 'allowUpdateFromPrerelease', - name: 'Use pre-releases', - desc: 'Updates chipmunk also from pre-releases', - path: 'general', - type: Visibility.standard, - allowEmpty: true, - render: Render.Bool, - }), - new validators.BoolOrUndefined(false), - ), -}; diff --git a/application/holder/src/service/storage.ts b/application/holder/src/service/storage.ts deleted file mode 100644 index a5c4fad455..0000000000 --- a/application/holder/src/service/storage.ts +++ /dev/null @@ -1,285 +0,0 @@ -import { - SetupService, - Interface, - Implementation, - register, - DependOn, -} from 'platform/entity/service'; -import { services } from '@register/services'; -import { paths } from '@service/paths'; -import { electron } from '@service/electron'; -import { FileController } from '@env/fs/accessor'; -import { CancelablePromise } from 'platform/env/promise'; -import { Entries } from './storage/entries'; -import { error } from 'platform/log/utils'; -import { Entry } from 'platform/types/storage/entry'; - -import * as path from 'path'; -import * as Requests from 'platform/ipc/request'; - -@DependOn(paths) -@DependOn(electron) -@SetupService(services['storage']) -export class Service extends Implementation { - private _files: Map = new Map(); - public readonly entries: Entries; - - constructor() { - super(); - this.entries = new Entries(this._write.bind(this), this._read.bind(this)); - } - - public override ready(): Promise { - this.register( - electron - .ipc() - .respondent( - this.getName(), - Requests.Storage.Read.Request, - ( - request: Requests.Storage.Read.Request, - ): CancelablePromise => { - return new CancelablePromise((resolve, reject) => { - this._read(request.key) - .then((content: string) => { - resolve( - new Requests.Storage.Read.Response({ - key: request.key, - content, - }), - ); - }) - .catch(reject); - }); - }, - ), - ); - this.register( - electron - .ipc() - .respondent( - this.getName(), - Requests.Storage.Write.Request, - ( - request: Requests.Storage.Write.Request, - ): CancelablePromise => { - return new CancelablePromise((resolve, reject) => { - const error = this._write(request.key, request.content); - if (error instanceof Error) { - reject(error); - } else { - resolve(new Requests.Storage.Write.Response()); - } - }); - }, - ), - ); - this.register( - electron - .ipc() - .respondent( - this.getName(), - Requests.Storage.Delete.Request, - ( - request: Requests.Storage.Delete.Request, - ): CancelablePromise => { - return new CancelablePromise((resolve, reject) => { - this._delete(request.key) - .then(() => { - resolve(new Requests.Storage.Delete.Response()); - }) - .catch(reject); - }); - }, - ), - ); - this.register( - electron - .ipc() - .respondent( - this.getName(), - Requests.Storage.EntriesGet.Request, - ( - request: Requests.Storage.EntriesGet.Request, - ): CancelablePromise => { - return new CancelablePromise((resolve, reject) => { - if (request.key !== undefined) { - const key = request.key; - this.entries - .get(request.key) - .then((entries) => { - resolve( - new Requests.Storage.EntriesGet.Response({ - key, - entries: JSON.stringify( - Array.from(entries.values()), - ), - }), - ); - }) - .catch(reject); - } else if (request.file !== undefined) { - const filename = request.file; - const file = new FileController(request.file).init(); - file.read() - .then((content) => { - const entries = Entries.from(content, filename, this.log()); - resolve( - new Requests.Storage.EntriesGet.Response({ - key: filename, - entries: JSON.stringify( - Array.from(entries.values()), - ), - }), - ); - }) - .catch(reject); - } else { - reject( - new Error( - `Fail to read storage as soon as no "key" or "file" are defiend`, - ), - ); - } - }); - }, - ), - ); - this.register( - electron - .ipc() - .respondent( - this.getName(), - Requests.Storage.EntriesSet.Request, - ( - request: Requests.Storage.EntriesSet.Request, - ): CancelablePromise => { - return new CancelablePromise((resolve, reject) => { - const entries: Entry[] | Error = (() => { - try { - const entries: Entry[] = JSON.parse(request.entries); - if (!(entries instanceof Array)) { - throw new Error(`Expecting entries will be {Entry[]}`); - } - return entries; - } catch (e) { - return new Error(this.log().error(error(e))); - } - })(); - ((): Promise => { - if (entries instanceof Error) { - return Promise.reject(entries); - } - if (request.key !== undefined) { - switch (request.mode) { - case 'overwrite': - return this.entries.overwrite(request.key, entries); - case 'append': - return this.entries.append(request.key, entries); - case 'update': - return this.entries.update(request.key, entries); - } - } else if (request.file !== undefined) { - const file = new FileController(request.file).init(); - const error = file.write(JSON.stringify(entries)); - if (error instanceof Error) { - return Promise.reject(error); - } - return Promise.resolve(); - } - return Promise.reject( - new Error( - `Fail to write storage as soon as no "key" or "file" are defiend`, - ), - ); - })() - .then(() => { - resolve(new Requests.Storage.EntriesSet.Response()); - }) - .catch(reject); - }); - }, - ), - ); - this.register( - electron - .ipc() - .respondent( - this.getName(), - Requests.Storage.EntriesDelete.Request, - ( - request: Requests.Storage.EntriesDelete.Request, - ): CancelablePromise => { - return new CancelablePromise((resolve, reject) => { - this.entries - .delete(request.key, request.uuids) - .then(() => { - resolve(new Requests.Storage.EntriesDelete.Response()); - }) - .catch(reject); - }); - }, - ), - ); - return Promise.resolve(); - } - - public override destroy(): Promise { - this.unsubscribe(); - return Promise.all(Array.from(this._files.values()).map((f) => f.destroy())) - .then(() => undefined) - .catch((err: Error) => { - this.log().error(`Fail to properly destroy storage: ${err.message}`); - }); - } - - private _read(key: string): Promise { - if (!this._files.has(key)) { - this._files.set( - key, - new FileController(path.join(paths.getStorage(), `${key}.storage`)).init(), - ); - } - const accessor = this._files.get(key); - if (accessor === undefined) { - return Promise.reject(new Error(`Fail to find accessor for "${key}"`)); - } - return accessor.read(); - } - - private _write(key: string, content: string): Error | undefined { - key = key.replace(/[^\d\w\s]/gi, ''); - if (key.length > 50 || key.length < 3) { - return new Error(`Invalid file key`); - } - if (!this._files.has(key)) { - this._files.set( - key, - new FileController(path.join(paths.getStorage(), `${key}.storage`)).init(), - ); - } - const accessor = this._files.get(key); - if (accessor === undefined) { - return new Error(`Fail to find accessor for "${key}"`); - } - return accessor.write(content); - } - - private _delete(key: string): Promise { - const accessor = this._files.get(key); - if (accessor === undefined) { - return Promise.reject(new Error(`Fail to find accessor for "${key}"`)); - } - return new Promise((resolve, reject) => { - accessor - .delete() - .then(() => { - this._files.delete(key); - resolve(); - }) - .catch(reject); - }); - } -} -export interface Service extends Interface {} -export const storage = register(new Service()); diff --git a/application/holder/src/service/storage/entries.ts b/application/holder/src/service/storage/entries.ts deleted file mode 100644 index cded5ba8d1..0000000000 --- a/application/holder/src/service/storage/entries.ts +++ /dev/null @@ -1,169 +0,0 @@ -import { Entry } from 'platform/types/storage/entry'; -import { error } from 'platform/log/utils'; -import { SetupLogger, LoggerInterface } from 'platform/entity/logger'; -import { Logger } from 'platform/log'; - -export type Writer = (key: string, content: string) => Error | undefined; -export type Reader = (key: string) => Promise; - -@SetupLogger('EntriesHolder') -export class Entries { - static from(str: string, storageKey: string, logger: Logger): Map { - const entries = new Map(); - const parsed = ((): Entry[] => { - try { - const inner = JSON.parse(str); - return typeof inner === 'string' ? JSON.parse(inner) : inner; - } catch (e) { - throw new Error(`Fail to parse Entry[] from string: ${error(e)}`); - } - })(); - if (!(parsed instanceof Array)) { - throw new Error( - `Invalid format: expecting an Entry[], but has been gotten: ${typeof parsed}`, - ); - } - parsed.forEach((entry) => { - if (typeof entry['uuid'] !== 'string' || entry['uuid'].trim() === '') { - logger.warn(`Storage "${storageKey}" includes entries without valid "uuid"`); - return; - } - if (typeof entry['content'] !== 'string' || entry['content'].trim() === '') { - logger.warn(`Storage "${storageKey}" includes entries without valid "content"`); - return; - } - entries.set(entry.uuid, entry); - }); - return entries; - } - - private readonly _writer: Writer; - private readonly _reader: Reader; - private _entries: Map> = new Map(); - - constructor(writer: Writer, reader: Reader) { - this._writer = writer; - this._reader = reader; - } - - public get(storageKey: string): Promise> { - return new Promise((resolve, reject) => { - const stored = this._entries.get(storageKey); - if (stored !== undefined) { - return resolve(stored); - } - this._reader(storageKey) - .then((content: string) => { - try { - if (content === '') { - resolve(new Map()); - return; - } - const entries = Entries.from(content, storageKey, this.log()); - !this._entries.has(storageKey) && this._entries.set(storageKey, entries); - resolve(entries); - } catch (err) { - reject(new Error(error(err))); - } - }) - .catch((err: Error) => { - reject(err); - }); - }); - } - - public write(storageKey: string, entries: Map | Entry[]): Error | undefined { - const map = - entries instanceof Array ? this._getEntriesFromArray(entries, storageKey) : entries; - this._entries.set(storageKey, map); - return this._writer(storageKey, JSON.stringify(Array.from(map.values()))); - } - - public append(storageKey: string, entries: Entry[]): Promise { - return new Promise((resolve, reject) => { - this.get(storageKey) - .then((stored) => { - entries.forEach((entry) => { - if (!stored.has(entry.uuid)) { - stored.set(entry.uuid, entry); - } - }); - const writeError = this.write(storageKey, stored); - if (writeError instanceof Error) { - reject(writeError); - } else { - resolve(); - } - }) - .catch(reject); - }); - } - - public update(storageKey: string, entries: Entry[]): Promise { - return new Promise((resolve, reject) => { - this.get(storageKey) - .then((stored) => { - entries.forEach((entry) => { - stored.set(entry.uuid, entry); - }); - const writeError = this.write(storageKey, stored); - if (writeError instanceof Error) { - reject(writeError); - } else { - resolve(); - } - }) - .catch(reject); - }); - } - - public overwrite(storageKey: string, entries: Entry[]): Promise { - return new Promise((resolve, reject) => { - const stored = new Map(); - entries.forEach((entry) => { - stored.set(entry.uuid, entry); - }); - const writeError = this.write(storageKey, stored); - if (writeError instanceof Error) { - reject(writeError); - } else { - resolve(); - } - }); - } - - public delete(storageKey: string, entries: string[]): Promise { - return new Promise((resolve, reject) => { - this.get(storageKey) - .then((stored) => { - entries.forEach((entry) => { - stored.delete(entry); - }); - const writeError = this.write(storageKey, stored); - if (writeError instanceof Error) { - reject(writeError); - } else { - resolve(); - } - }) - .catch(reject); - }); - } - - private _getEntriesFromArray(entries: Entry[], storageKey: string): Map { - const map = new Map(); - entries.forEach((entry) => { - if (typeof entry['uuid'] !== 'string' || entry['uuid'].trim() === '') { - this.log().warn(`Storage "${storageKey}" includes entries without valid "uuid"`); - return; - } - if (typeof entry['content'] !== 'string' || entry['content'].trim() === '') { - this.log().warn(`Storage "${storageKey}" includes entries without valid "content"`); - return; - } - map.set(entry.uuid, entry); - }); - return map; - } -} -export interface Entries extends LoggerInterface {} diff --git a/application/holder/src/service/unbound.ts b/application/holder/src/service/unbound.ts deleted file mode 100644 index ece1778d63..0000000000 --- a/application/holder/src/service/unbound.ts +++ /dev/null @@ -1,178 +0,0 @@ -import { - SetupService, - Interface, - Implementation, - register, - DependOn, -} from 'platform/entity/service'; -import { services } from '@register/services'; -import { electron } from '@service/electron'; -import { Jobs } from 'rustcore'; -import { Mutable } from 'platform/types/unity/mutable'; - -import * as Requests from 'platform/ipc/request'; -import * as RequestHandlers from './unbound/index'; - -@DependOn(electron) -@SetupService(services['unbound']) -export class Service extends Implementation { - public readonly jobs!: Jobs; - - public override async ready(): Promise { - (this as Mutable).jobs = await Jobs.create(); - this.register( - electron - .ipc() - .respondent( - this.getName(), - Requests.Dlt.Stat.Request, - RequestHandlers.Dlt.Stat.handler, - ), - ); - this.register( - electron - .ipc() - .respondent( - this.getName(), - Requests.Os.Shells.Request, - RequestHandlers.Os.Shells.handler, - ), - ); - this.register( - electron - .ipc() - .respondent( - this.getName(), - Requests.Os.List.Request, - RequestHandlers.Os.List.handler, - ), - ); - this.register( - electron - .ipc() - .respondent( - this.getName(), - Requests.File.Checksum.Request, - RequestHandlers.File.Checksum.handler, - ), - ); - this.register( - electron - .ipc() - .respondent( - this.getName(), - Requests.File.IsBinary.Request, - RequestHandlers.File.IsBinary.handler, - ), - ); - this.register( - electron - .ipc() - .respondent( - this.getName(), - Requests.Serial.Ports.Request, - RequestHandlers.Serial.Ports.handler, - ), - ); - this.register( - electron - .ipc() - .respondent( - this.getName(), - Requests.Plugins.ListInstalled.Request, - RequestHandlers.Plugins.ListInstalled.handler, - ), - ); - this.register( - electron - .ipc() - .respondent( - this.getName(), - Requests.Plugins.ListInvalid.Request, - RequestHandlers.Plugins.ListInvalid.handler, - ), - ); - this.register( - electron - .ipc() - .respondent( - this.getName(), - Requests.Plugins.ListInstalledPaths.Request, - RequestHandlers.Plugins.ListInstalledPaths.handler, - ), - ); - this.register( - electron - .ipc() - .respondent( - this.getName(), - Requests.Plugins.ListInvalidPaths.Request, - RequestHandlers.Plugins.ListInvalidPaths.handler, - ), - ); - this.register( - electron - .ipc() - .respondent( - this.getName(), - Requests.Plugins.InstalledPluginInfo.Request, - RequestHandlers.Plugins.InstalledPluginInfo.handler, - ), - ); - this.register( - electron - .ipc() - .respondent( - this.getName(), - Requests.Plugins.InvalidPluginInfo.Request, - RequestHandlers.Plugins.InvalidPluginInfo.handler, - ), - ); - this.register( - electron - .ipc() - .respondent( - this.getName(), - Requests.Plugins.PluginRunData.Request, - RequestHandlers.Plugins.PluginRunData.handler, - ), - ); - this.register( - electron - .ipc() - .respondent( - this.getName(), - Requests.Plugins.Reload.Request, - RequestHandlers.Plugins.Relaod.handler, - ), - ); - this.register( - electron - .ipc() - .respondent( - this.getName(), - Requests.Plugins.AddPlugin.Request, - RequestHandlers.Plugins.AddPlugin.handler, - ), - ); - this.register( - electron - .ipc() - .respondent( - this.getName(), - Requests.Plugins.RemovePlugin.Request, - RequestHandlers.Plugins.RemovePlugin.handler, - ), - ); - return Promise.resolve(); - } - - public override destroy(): Promise { - this.unsubscribe(); - return this.jobs.destroy().catch((err: Error) => { - this.log().error(`Fail to shutdown Jobs: ${err.message}`); - }); - } -} -export interface Service extends Interface {} -export const unbound = register(new Service()); diff --git a/application/holder/src/service/unbound/dlt/index.ts b/application/holder/src/service/unbound/dlt/index.ts deleted file mode 100644 index 8d9feda931..0000000000 --- a/application/holder/src/service/unbound/dlt/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * as Stat from './stat'; diff --git a/application/holder/src/service/unbound/dlt/stat.ts b/application/holder/src/service/unbound/dlt/stat.ts deleted file mode 100644 index a87d7b20fe..0000000000 --- a/application/holder/src/service/unbound/dlt/stat.ts +++ /dev/null @@ -1,42 +0,0 @@ -import { CancelablePromise } from 'platform/env/promise'; -import { Logger } from 'platform/log'; -import { jobs } from '@service/jobs'; -import { unbound } from '@service/unbound'; -import { DltStatisticInfo } from 'platform/types/bindings'; - -import * as Requests from 'platform/ipc/request'; - -export const handler = Requests.InjectLogger< - Requests.Dlt.Stat.Request, - CancelablePromise ->( - ( - _log: Logger, - request: Requests.Dlt.Stat.Request, - ): CancelablePromise => { - return new CancelablePromise((resolve, reject) => { - const scanning = jobs - .create({ - name: 'scanning dlt', - desc: - request.files.length === 1 - ? `file: ${request.files[0]}` - : `${request.files.length} for files`, - }) - .start(); - unbound.jobs - .getDltStats(request.files) - .then((stat: DltStatisticInfo) => { - resolve( - new Requests.Dlt.Stat.Response({ - stat, - }), - ); - }) - .catch(reject) - .finally(() => { - scanning.done(); - }); - }); - }, -); diff --git a/application/holder/src/service/unbound/file/checksum.ts b/application/holder/src/service/unbound/file/checksum.ts deleted file mode 100644 index 074de3efa8..0000000000 --- a/application/holder/src/service/unbound/file/checksum.ts +++ /dev/null @@ -1,36 +0,0 @@ -import { CancelablePromise } from 'platform/env/promise'; -import { Logger } from 'platform/log'; -import { unbound } from '@service/unbound'; - -import * as Requests from 'platform/ipc/request'; - -export const handler = Requests.InjectLogger< - Requests.File.Checksum.Request, - CancelablePromise ->( - ( - log: Logger, - request: Requests.File.Checksum.Request, - ): CancelablePromise => { - return new CancelablePromise((resolve) => { - unbound.jobs - .getFileChecksum(request.filename) - .then((hash) => { - resolve( - new Requests.File.Checksum.Response({ - hash, - error: undefined, - }), - ); - }) - .catch((err: Error) => { - resolve( - new Requests.File.Checksum.Response({ - hash: undefined, - error: err.message, - }), - ); - }); - }); - }, -); diff --git a/application/holder/src/service/unbound/file/index.ts b/application/holder/src/service/unbound/file/index.ts deleted file mode 100644 index 41918e833d..0000000000 --- a/application/holder/src/service/unbound/file/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * as Checksum from './checksum'; -export * as IsBinary from './isbinary'; diff --git a/application/holder/src/service/unbound/file/isbinary.ts b/application/holder/src/service/unbound/file/isbinary.ts deleted file mode 100644 index b7e72a134a..0000000000 --- a/application/holder/src/service/unbound/file/isbinary.ts +++ /dev/null @@ -1,36 +0,0 @@ -import { CancelablePromise } from 'platform/env/promise'; -import { Logger } from 'platform/log'; -import { unbound } from '@service/unbound'; - -import * as Requests from 'platform/ipc/request'; - -export const handler = Requests.InjectLogger< - Requests.File.IsBinary.Request, - CancelablePromise ->( - ( - log: Logger, - request: Requests.File.IsBinary.Request, - ): CancelablePromise => { - return new CancelablePromise((resolve) => { - unbound.jobs - .isFileBinary({ filePath: request.file }) - .then((binary) => { - resolve( - new Requests.File.IsBinary.Response({ - binary, - error: undefined, - }), - ); - }) - .catch((err: Error) => { - resolve( - new Requests.File.IsBinary.Response({ - binary: false, - error: err.message, - }), - ); - }); - }); - }, -); diff --git a/application/holder/src/service/unbound/index.ts b/application/holder/src/service/unbound/index.ts deleted file mode 100644 index 6d30af468a..0000000000 --- a/application/holder/src/service/unbound/index.ts +++ /dev/null @@ -1,6 +0,0 @@ -export * as Dlt from './dlt'; -export * as Os from './os'; -export * as File from './file'; -export * as Serial from './serial'; -export * as Someip from './someip'; -export * as Plugins from './plugins'; diff --git a/application/holder/src/service/unbound/os/index.ts b/application/holder/src/service/unbound/os/index.ts deleted file mode 100644 index fc086dd811..0000000000 --- a/application/holder/src/service/unbound/os/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * as Shells from './shells'; -export * as List from './list'; diff --git a/application/holder/src/service/unbound/os/list.ts b/application/holder/src/service/unbound/os/list.ts deleted file mode 100644 index c3b38113c5..0000000000 --- a/application/holder/src/service/unbound/os/list.ts +++ /dev/null @@ -1,36 +0,0 @@ -import { CancelablePromise } from 'platform/env/promise'; -import { Logger } from 'platform/log'; -import { error } from 'platform/log/utils'; -import { unbound } from '@service/unbound'; -import { FoldersScanningResult } from 'platform/types/bindings'; - -import * as Requests from 'platform/ipc/request'; - -export const handler = Requests.InjectLogger< - Requests.Os.List.Request, - CancelablePromise ->( - ( - log: Logger, - request: Requests.Os.List.Request, - ): CancelablePromise => { - return new CancelablePromise((resolve, reject) => { - unbound.jobs - .listContent(request) - .then((res: FoldersScanningResult) => { - try { - resolve( - new Requests.Os.List.Response({ - entities: res.list, - max: res.max_len_reached, - }), - ); - } catch (e) { - log.warn(`Error to parse listContent data: ${error(e)}`); - reject(new Error(error(e))); - } - }) - .catch(reject); - }); - }, -); diff --git a/application/holder/src/service/unbound/os/shells.ts b/application/holder/src/service/unbound/os/shells.ts deleted file mode 100644 index 852a413184..0000000000 --- a/application/holder/src/service/unbound/os/shells.ts +++ /dev/null @@ -1,32 +0,0 @@ -import { CancelablePromise } from 'platform/env/promise'; -import { Logger } from 'platform/log'; -import { ShellProfile } from 'platform/types/bindings'; -import { unbound } from '@service/unbound'; - -import * as Requests from 'platform/ipc/request'; - -let cached: ShellProfile[] | undefined = undefined; - -export const handler = Requests.InjectLogger< - Requests.Os.Shells.Request, - CancelablePromise ->( - ( - _log: Logger, - _request: Requests.Os.Shells.Request, - ): CancelablePromise => { - return new CancelablePromise((resolve, reject) => { - if (cached !== undefined) { - resolve(new Requests.Os.Shells.Response({ shells: cached })); - } else { - unbound.jobs - .getShellProfiles() - .then((profiles) => { - cached = profiles; - resolve(new Requests.Os.Shells.Response({ shells: profiles })); - }) - .catch(reject); - } - }); - }, -); diff --git a/application/holder/src/service/unbound/plugins/add_plugin.ts b/application/holder/src/service/unbound/plugins/add_plugin.ts deleted file mode 100644 index 7c75f5d614..0000000000 --- a/application/holder/src/service/unbound/plugins/add_plugin.ts +++ /dev/null @@ -1,24 +0,0 @@ -import { CancelablePromise } from 'platform/env/promise'; -import { Logger } from 'platform/log'; -import { unbound } from '@service/unbound'; - -import * as Requests from 'platform/ipc/request'; - -export const handler = Requests.InjectLogger< - Requests.Plugins.AddPlugin.Request, - CancelablePromise ->( - ( - _log: Logger, - request: Requests.Plugins.AddPlugin.Request, - ): CancelablePromise => { - return new CancelablePromise((reslove, reject) => { - unbound.jobs - .addPlugin(request.pluginPath) - .then(() => { - reslove(new Requests.Plugins.AddPlugin.Response({})); - }) - .catch(reject); - }); - }, -); diff --git a/application/holder/src/service/unbound/plugins/index.ts b/application/holder/src/service/unbound/plugins/index.ts deleted file mode 100644 index 0439494d49..0000000000 --- a/application/holder/src/service/unbound/plugins/index.ts +++ /dev/null @@ -1,10 +0,0 @@ -export * as ListInstalled from './list_installed'; -export * as ListInstalledPaths from './list_installed_paths'; -export * as ListInvalidPaths from './list_invalid_paths'; -export * as ListInvalid from './list_invalid'; -export * as InstalledPluginInfo from './installed_plugin_info'; -export * as InvalidPluginInfo from './invalid_plugin_info'; -export * as PluginRunData from './rundata'; -export * as Relaod from './reload'; -export * as AddPlugin from './add_plugin'; -export * as RemovePlugin from './remove_plugin'; diff --git a/application/holder/src/service/unbound/plugins/installed_plugin_info.ts b/application/holder/src/service/unbound/plugins/installed_plugin_info.ts deleted file mode 100644 index c5bf5b4192..0000000000 --- a/application/holder/src/service/unbound/plugins/installed_plugin_info.ts +++ /dev/null @@ -1,24 +0,0 @@ -import { CancelablePromise } from 'platform/env/promise'; -import { Logger } from 'platform/log'; -import { unbound } from '@service/unbound'; - -import * as Requests from 'platform/ipc/request'; - -export const handler = Requests.InjectLogger< - Requests.Plugins.InstalledPluginInfo.Request, - CancelablePromise ->( - ( - _log: Logger, - request: Requests.Plugins.InstalledPluginInfo.Request, - ): CancelablePromise => { - return new CancelablePromise((reslove, reject) => { - unbound.jobs - .installedPluginsInfo(request.pluginPath) - .then((plugin) => { - reslove(new Requests.Plugins.InstalledPluginInfo.Response({ plugin })); - }) - .catch(reject); - }); - }, -); diff --git a/application/holder/src/service/unbound/plugins/invalid_plugin_info.ts b/application/holder/src/service/unbound/plugins/invalid_plugin_info.ts deleted file mode 100644 index 937b4f9728..0000000000 --- a/application/holder/src/service/unbound/plugins/invalid_plugin_info.ts +++ /dev/null @@ -1,24 +0,0 @@ -import { CancelablePromise } from 'platform/env/promise'; -import { Logger } from 'platform/log'; -import { unbound } from '@service/unbound'; - -import * as Requests from 'platform/ipc/request'; - -export const handler = Requests.InjectLogger< - Requests.Plugins.InvalidPluginInfo.Request, - CancelablePromise ->( - ( - _log: Logger, - request: Requests.Plugins.InvalidPluginInfo.Request, - ): CancelablePromise => { - return new CancelablePromise((reslove, reject) => { - unbound.jobs - .invalidPluginsInfo(request.pluginPath) - .then((invalidPlugin) => { - reslove(new Requests.Plugins.InvalidPluginInfo.Response({ invalidPlugin })); - }) - .catch(reject); - }); - }, -); diff --git a/application/holder/src/service/unbound/plugins/list_installed.ts b/application/holder/src/service/unbound/plugins/list_installed.ts deleted file mode 100644 index 0b376cf101..0000000000 --- a/application/holder/src/service/unbound/plugins/list_installed.ts +++ /dev/null @@ -1,24 +0,0 @@ -import { CancelablePromise } from 'platform/env/promise'; -import { Logger } from 'platform/log'; -import { unbound } from '@service/unbound'; - -import * as Requests from 'platform/ipc/request'; - -export const handler = Requests.InjectLogger< - Requests.Plugins.ListInstalled.Request, - CancelablePromise ->( - ( - _log: Logger, - _request: Requests.Plugins.ListInstalled.Request, - ): CancelablePromise => { - return new CancelablePromise((reslove, reject) => { - unbound.jobs - .installedPluginsList() - .then((plugins) => { - reslove(new Requests.Plugins.ListInstalled.Response({ plugins })); - }) - .catch(reject); - }); - }, -); diff --git a/application/holder/src/service/unbound/plugins/list_installed_paths.ts b/application/holder/src/service/unbound/plugins/list_installed_paths.ts deleted file mode 100644 index 07ca8639d3..0000000000 --- a/application/holder/src/service/unbound/plugins/list_installed_paths.ts +++ /dev/null @@ -1,24 +0,0 @@ -import { CancelablePromise } from 'platform/env/promise'; -import { Logger } from 'platform/log'; -import { unbound } from '@service/unbound'; - -import * as Requests from 'platform/ipc/request'; - -export const handler = Requests.InjectLogger< - Requests.Plugins.ListInstalled.Request, - CancelablePromise ->( - ( - _log: Logger, - _request: Requests.Plugins.ListInstalledPaths.Request, - ): CancelablePromise => { - return new CancelablePromise((reslove, reject) => { - unbound.jobs - .installedPluginsPaths() - .then((paths) => { - reslove(new Requests.Plugins.ListInstalledPaths.Response({ paths })); - }) - .catch(reject); - }); - }, -); diff --git a/application/holder/src/service/unbound/plugins/list_invalid.ts b/application/holder/src/service/unbound/plugins/list_invalid.ts deleted file mode 100644 index b48945c75c..0000000000 --- a/application/holder/src/service/unbound/plugins/list_invalid.ts +++ /dev/null @@ -1,24 +0,0 @@ -import { CancelablePromise } from 'platform/env/promise'; -import { Logger } from 'platform/log'; -import { unbound } from '@service/unbound'; - -import * as Requests from 'platform/ipc/request'; - -export const handler = Requests.InjectLogger< - Requests.Plugins.ListInvalid.Request, - CancelablePromise ->( - ( - _log: Logger, - _request: Requests.Plugins.ListInvalid.Request, - ): CancelablePromise => { - return new CancelablePromise((reslove, reject) => { - unbound.jobs - .invalidPluginsList() - .then((invalidPlugins) => { - reslove(new Requests.Plugins.ListInvalid.Response({ invalidPlugins })); - }) - .catch(reject); - }); - }, -); diff --git a/application/holder/src/service/unbound/plugins/list_invalid_paths.ts b/application/holder/src/service/unbound/plugins/list_invalid_paths.ts deleted file mode 100644 index 33c91c2913..0000000000 --- a/application/holder/src/service/unbound/plugins/list_invalid_paths.ts +++ /dev/null @@ -1,24 +0,0 @@ -import { CancelablePromise } from 'platform/env/promise'; -import { Logger } from 'platform/log'; -import { unbound } from '@service/unbound'; - -import * as Requests from 'platform/ipc/request'; - -export const handler = Requests.InjectLogger< - Requests.Plugins.ListInvalidPaths.Request, - CancelablePromise ->( - ( - _log: Logger, - _request: Requests.Plugins.ListInvalidPaths.Request, - ): CancelablePromise => { - return new CancelablePromise((reslove, reject) => { - unbound.jobs - .invalidPluginsPaths() - .then((paths) => { - reslove(new Requests.Plugins.ListInvalidPaths.Response({ paths })); - }) - .catch(reject); - }); - }, -); diff --git a/application/holder/src/service/unbound/plugins/reload.ts b/application/holder/src/service/unbound/plugins/reload.ts deleted file mode 100644 index efcc7a2a0b..0000000000 --- a/application/holder/src/service/unbound/plugins/reload.ts +++ /dev/null @@ -1,24 +0,0 @@ -import { CancelablePromise } from 'platform/env/promise'; -import { Logger } from 'platform/log'; -import { unbound } from '@service/unbound'; - -import * as Requests from 'platform/ipc/request'; - -export const handler = Requests.InjectLogger< - Requests.Plugins.Reload.Request, - CancelablePromise ->( - ( - _log: Logger, - _request: Requests.Plugins.Reload.Request, - ): CancelablePromise => { - return new CancelablePromise((resolve, reject) => { - unbound.jobs - .reloadPlugins() - .then(() => { - resolve(new Requests.Plugins.Reload.Response({})); - }) - .catch(reject); - }); - }, -); diff --git a/application/holder/src/service/unbound/plugins/remove_plugin.ts b/application/holder/src/service/unbound/plugins/remove_plugin.ts deleted file mode 100644 index b3893d4883..0000000000 --- a/application/holder/src/service/unbound/plugins/remove_plugin.ts +++ /dev/null @@ -1,24 +0,0 @@ -import { CancelablePromise } from 'platform/env/promise'; -import { Logger } from 'platform/log'; -import { unbound } from '@service/unbound'; - -import * as Requests from 'platform/ipc/request'; - -export const handler = Requests.InjectLogger< - Requests.Plugins.RemovePlugin.Request, - CancelablePromise ->( - ( - _log: Logger, - request: Requests.Plugins.RemovePlugin.Request, - ): CancelablePromise => { - return new CancelablePromise((reslove, reject) => { - unbound.jobs - .removePlugin(request.pluginPath) - .then(() => { - reslove(new Requests.Plugins.RemovePlugin.Response({})); - }) - .catch(reject); - }); - }, -); diff --git a/application/holder/src/service/unbound/plugins/rundata.ts b/application/holder/src/service/unbound/plugins/rundata.ts deleted file mode 100644 index a8d9ea88e9..0000000000 --- a/application/holder/src/service/unbound/plugins/rundata.ts +++ /dev/null @@ -1,24 +0,0 @@ -import { CancelablePromise } from 'platform/env/promise'; -import { Logger } from 'platform/log'; -import { unbound } from '@service/unbound'; - -import * as Requests from 'platform/ipc/request'; - -export const handler = Requests.InjectLogger< - Requests.Plugins.PluginRunData.Request, - CancelablePromise ->( - ( - _log: Logger, - request: Requests.Plugins.PluginRunData.Request, - ): CancelablePromise => { - return new CancelablePromise((reslove, reject) => { - unbound.jobs - .getPluginRunData(request.pluginPath) - .then((data) => { - reslove(new Requests.Plugins.PluginRunData.Response({ data })); - }) - .catch(reject); - }); - }, -); diff --git a/application/holder/src/service/unbound/serial/index.ts b/application/holder/src/service/unbound/serial/index.ts deleted file mode 100644 index f8810c707a..0000000000 --- a/application/holder/src/service/unbound/serial/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * as Ports from './ports'; diff --git a/application/holder/src/service/unbound/serial/ports.ts b/application/holder/src/service/unbound/serial/ports.ts deleted file mode 100644 index 9fdbfd8b70..0000000000 --- a/application/holder/src/service/unbound/serial/ports.ts +++ /dev/null @@ -1,39 +0,0 @@ -import { CancelablePromise } from 'platform/env/promise'; -import { unbound } from '@service/unbound'; -import { Logger } from 'platform/log'; -import { jobs } from '@service/jobs'; - -import * as Requests from 'platform/ipc/request'; - -export const handler = Requests.InjectLogger< - Requests.Serial.Ports.Request, - CancelablePromise ->( - ( - log: Logger, - request: Requests.Serial.Ports.Request, - ): CancelablePromise => { - return new CancelablePromise((resolve, reject) => { - log.debug(request); - const scanning = jobs - .create({ - name: 'scan ports', - desc: 'fetching serial ports data', - }) - .start(); - unbound.jobs - .getSerialPortsList() - .then((ports: string[]) => { - resolve( - new Requests.Serial.Ports.Response({ - ports, - }), - ); - }) - .catch(reject) - .finally(() => { - scanning.done(); - }); - }); - }, -); diff --git a/application/holder/src/service/unbound/someip/index.ts b/application/holder/src/service/unbound/someip/index.ts deleted file mode 100644 index 48f2d93fda..0000000000 --- a/application/holder/src/service/unbound/someip/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * as Statistic from './statistic'; diff --git a/application/holder/src/service/unbound/someip/statistic.ts b/application/holder/src/service/unbound/someip/statistic.ts deleted file mode 100644 index 1636b4aaa9..0000000000 --- a/application/holder/src/service/unbound/someip/statistic.ts +++ /dev/null @@ -1,42 +0,0 @@ -import { CancelablePromise } from 'platform/env/promise'; -import { Logger } from 'platform/log'; -import { jobs } from '@service/jobs'; -import { unbound } from '@service/unbound'; -import { SomeipStatistic } from 'platform/types/observe/parser/someip'; - -import * as Requests from 'platform/ipc/request'; - -export const handler = Requests.InjectLogger< - Requests.Dlt.Stat.Request, - CancelablePromise ->( - ( - _log: Logger, - request: Requests.Dlt.Stat.Request, - ): CancelablePromise => { - return new CancelablePromise((resolve, reject) => { - const scanning = jobs - .create({ - name: 'scanning dlt', - desc: - request.files.length === 1 - ? `file: ${request.files[0]}` - : `${request.files.length} for files`, - }) - .start(); - unbound.jobs - .getSomeipStatistic(request.files) - .then((statistic: SomeipStatistic) => { - resolve( - new Requests.Someip.Statistic.Response({ - statistic, - }), - ); - }) - .catch(reject) - .finally(() => { - scanning.done(); - }); - }); - }, -); diff --git a/application/holder/src/service/updater.ts b/application/holder/src/service/updater.ts deleted file mode 100644 index 3b16c38ead..0000000000 --- a/application/holder/src/service/updater.ts +++ /dev/null @@ -1,546 +0,0 @@ -import { - SetupService, - Interface, - Implementation, - register, - DependOn, -} from 'platform/entity/service'; -import { services } from '@register/services'; -import { paths } from '@service/paths'; -import { settings } from '@service/settings'; -import { production } from '@service/production'; -import { notifications } from '@service/notifications'; -import { storage } from '@service/storage'; -import { GitHubClient, IReleaseData, IReleaseAsset } from '@module/github'; -import { Version } from './updater/version'; -import { ReleaseFile } from './updater/releasefile'; -import { version } from '@module/version'; -import { error } from 'platform/log/utils'; -import { getExecutable } from '@env/os/platform'; -import { unique } from 'platform/env/sequence'; -import { ChipmunkGlobal } from '@register/global'; -import { exists } from '@env/fs'; -import { Update } from '@loader/exitcases/update'; -import { electron } from '@service/electron'; -import { CancelablePromise } from 'platform/env/promise'; -import { getCustomPlatform } from './updater/metadata'; -import { getAlphaRelease, getLatestAlphaRelease } from './updater/alpha'; - -import * as path from 'path'; -import * as fs from 'fs'; -import { shell } from 'electron'; -import * as Events from 'platform/ipc/event'; -import * as Requests from 'platform/ipc/request'; - -declare const global: ChipmunkGlobal; - -const UPDATER = 'updater'; -const AUTO = { key: 'autoUpdateCheck', path: 'general' }; -const PRERELEASE = { key: 'allowUpdateFromPrerelease', path: 'general' }; -// Internal storage for the last alpha tag we already announced in the UI. -const ALPHA_RELEASE_NOTIFICATION_STATE_KEY = 'updater_alpha'; -const ALPHA_RELEASE_NOTIFICATION_ENTRY = 'last_announced_alpha_tag'; - -export const REPO = 'chipmunk'; - -export function getVersionPrefix(ver: string): string { - return ver - .toLocaleLowerCase() - .replace(/-?\d{1,}\.\d{1,}\.\d{1,}/gi, '') - .trim(); -} - -export function getCleanVersion(ver: string): string { - const prefix = getVersionPrefix(ver); - return ver.toLocaleLowerCase().replace(prefix, '').replace(/-/gi, '').trim(); -} - -enum LatestReleaseNotFound { - NoUpdates, - Skipped, -} - -// Keep updater decision-making explicit. The old string-only result was fine for the -// manual dialog, but too ambiguous once the automatic flow also needed alpha fallback. -enum CandidateResultState { - Candidate, - NoUpdates, - Skipped, - Unavailable, - Alpha, -} - -interface ICandidate { - release: IReleaseData; - version: Version; -} - -interface IDownloadCandidate extends ICandidate { - compressed: string; -} - -interface ICandidateResult { - state: CandidateResultState; - candidate?: IDownloadCandidate; - report: string; -} - -@DependOn(paths) -@DependOn(settings) -@DependOn(notifications) -@DependOn(storage) -@DependOn(electron) -@SetupService(services['updater']) -export class Service extends Implementation { - protected candidate: - | { - release: IReleaseData; - filename: string; - } - | undefined; - public override ready(): Promise { - this.register( - Events.IpcEvent.subscribe( - Events.State.Client.Event, - (/*_event: Events.State.Client.Event*/) => { - this.check(false).catch((error: Error) => { - this.log().warn(`Fail to check updates due error: ${error.message}`); - }); - }, - ), - ); - this.register( - electron - .ipc() - .respondent( - this.getName(), - Requests.System.CheckUpdates.Request, - ( - _request: Requests.System.CheckUpdates.Request, - ): CancelablePromise => { - return new CancelablePromise((resolve) => { - this.find(true) - .candidate(true) - .then((candidate) => { - resolve( - new Requests.System.CheckUpdates.Response({ - report: - typeof candidate === 'string' - ? candidate - : `Found release ${candidate.release.name}. Downloading is started`, - }), - ); - }) - .catch((error: Error) => { - resolve( - new Requests.System.CheckUpdates.Response({ - error: error.message, - }), - ); - this.log().warn( - `Fail to check updates due error: ${error.message}`, - ); - }); - }); - }, - ), - ); - return Promise.resolve(); - } - - protected find(force: boolean): { - skiping(): boolean; - night(): Promise; - latest(): Promise; - result(reportAlphaInsteadOfDownload?: boolean): Promise; - candidate(reportAlphaInsteadOfDownload?: boolean): Promise; - } { - // `result()` is the internal API used by the automatic flow. - // `candidate()` keeps the older manual-check contract unchanged. - return { - skiping: (): boolean => { - const auto = settings.get().value(AUTO.path, AUTO.key); - if (!auto && !force) { - this.log().debug(`Checking of updates is skipped.`); - return true; - } - if (!production.isProduction()) { - this.log().debug(`Checking of updates is skipped because production is OFF.`); - return true; - } - return false; - }, - night: async (): Promise => { - if (this.find(force).skiping()) { - return undefined; - } - const github = new GitHubClient(); - const releases: IReleaseData[] = await github.getReleases({ repo: REPO }); - const current: Version = new Version(version.getVersion()); - let candidate: ICandidate | undefined; - releases.forEach((release: IReleaseData) => { - // Chipmunk 4 alpha releases are announced only, never installed by this updater. - if (getAlphaRelease(release) !== undefined) { - this.log().debug( - `Release "${release.name} (tag: ${release.tag_name})" ignored because alpha releases are announcement-only`, - ); - return; - } - try { - const version = new Version(getCleanVersion(release.name)); - if (current.isGivenGrander(version)) { - if ( - candidate !== undefined && - !candidate.version.isGivenGrander(version) - ) { - this.log().debug( - `Release "${release.name} (tag: ${release.tag_name})", ignored, because candidate ${candidate.release.tag_name}`, - ); - return; - } - candidate = { - release, - version, - }; - } - } catch (err) { - this.log().warn( - `Found release "${release.name} (tag: ${ - release.tag_name - })", but version isn't valid: ${error(err)}`, - ); - } - }); - return candidate; - }, - latest: async (): Promise => { - if (this.find(force).skiping()) { - return LatestReleaseNotFound.Skipped; - } - const github = new GitHubClient(); - const latest: IReleaseData = await github.getLatestRelease({ repo: REPO }); - const prefix: string = getVersionPrefix(latest.name); - if (prefix !== '') { - this.log().debug( - `Found release "${latest.name} (tag: ${latest.tag_name})" with prefix "${prefix}"`, - ); - } - const current: Version = new Version(version.getVersion()); - let candidate: ICandidate | undefined; - try { - const version = new Version(getCleanVersion(latest.name)); - if (current.isGivenGrander(version)) { - if (candidate !== undefined && !candidate.version.isGivenGrander(version)) { - this.log().debug( - `Release "${latest.name} (tag: ${latest.tag_name})", ignored, because candidate ${candidate.release.tag_name}`, - ); - return LatestReleaseNotFound.NoUpdates; - } - candidate = { - release: latest, - version, - }; - } - } catch (err) { - this.log().warn( - `Found release "${latest.name} (tag: ${ - latest.tag_name - })", but version isn't valid: ${error(err)}`, - ); - } - return candidate === undefined ? LatestReleaseNotFound.NoUpdates : candidate; - }, - result: async (reportAlphaInsteadOfDownload = false): Promise => { - let candidate: ICandidate | undefined; - const latest = await this.find(force).latest(); - if (latest === LatestReleaseNotFound.NoUpdates) { - const night = settings.get().value(PRERELEASE.path, PRERELEASE.key); - if (!night) { - this.log().debug(`No updates has been found in latest release.`); - } else { - this.log().debug( - `No updates has been found in latest release. Checking pre-releases`, - ); - candidate = await this.find(force).night(); - } - } else if (latest === LatestReleaseNotFound.Skipped) { - return { - state: CandidateResultState.Skipped, - report: `Checking of updates is skipped`, - }; - } else { - candidate = latest; - } - if (candidate === undefined) { - const alphaReport = reportAlphaInsteadOfDownload - ? await this._getManualAlphaReleaseReport() - : undefined; - if (alphaReport !== undefined) { - return { - state: CandidateResultState.Alpha, - report: alphaReport, - }; - } - this.log().debug(`No updates has been found.`); - return { - state: CandidateResultState.NoUpdates, - report: `No updates has been found.`, - }; - } - if (reportAlphaInsteadOfDownload) { - const alphaRelease = getAlphaRelease(candidate.release); - if (alphaRelease !== undefined) { - return { - state: CandidateResultState.Alpha, - report: this._getManualAlphaReleaseReportText(), - }; - } - } - const customPlatform = await getCustomPlatform(); - - const release: ReleaseFile = new ReleaseFile( - getCleanVersion(candidate.release.name), - getVersionPrefix(candidate.release.name), - customPlatform, - ); - this.log().debug(`Looking for: ${release.filename}`); - let compressed: string | undefined; - candidate.release.assets.forEach((asset: IReleaseAsset) => { - if (release.equal(asset.name)) { - compressed = asset.name; - } - }); - if (compressed === undefined) { - this.log().warn(`Fail to find archive-file with release for current platform. `); - return { - state: CandidateResultState.Unavailable, - report: `Fail to find archive-file with release for current platform. `, - }; - } - return { - state: CandidateResultState.Candidate, - report: `Found release ${candidate.release.name}. Downloading is started`, - candidate: { - release: candidate.release, - version: candidate.version, - compressed, - }, - }; - }, - candidate: async ( - reportAlphaInsteadOfDownload = false, - ): Promise => { - const result = await this.find(force).result(reportAlphaInsteadOfDownload); - return result.state === CandidateResultState.Candidate && result.candidate !== undefined - ? result.candidate - : result.report; - }, - }; - } - - public async check(force: boolean): Promise { - const result = await this.find(force).result(); - if (result.state !== CandidateResultState.Candidate || result.candidate === undefined) { - // Alpha announcements are automatic-check only and must never compete with a real - // updater candidate, including the testing prerelease path. - if (!force && result.state === CandidateResultState.NoUpdates) { - await this._checkForAlphaReleaseAnnouncement(); - } - return Promise.resolve(); - } - - const candidate = result.candidate; - const customPlatform = await getCustomPlatform(); - const release: ReleaseFile = new ReleaseFile( - getCleanVersion(candidate.release.name), - getVersionPrefix(candidate.release.name), - customPlatform, - ); - const filename: string = path.resolve(paths.getDownloads(), candidate.compressed); - if (fs.existsSync(filename)) { - // File was already downloaded - this.log().debug( - `File was already downloaded "${filename}". latest: ${candidate.release.tag_name}.`, - ); - this.candidate = { - release: candidate.release, - filename, - }; - } else { - this.log().debug( - `Found new version "${candidate.release.tag_name}". Starting downloading: ${release.filename}.`, - ); - const github = new GitHubClient(); - const filename: string = await github.download( - { - repo: REPO, - }, - { - version: candidate.release.name, - name: release.filename, - dest: paths.getDownloads(), - }, - ); - this.log().debug(`File ${release.filename} is downloaded into: ${filename}.`); - this.candidate = { - release: candidate.release as IReleaseData, - filename, - }; - } - // Check folder access - const hasAccess = this.checkFolderAccess(); - this.log().debug(`Chipmunk location sufficiently accessible for update : ${hasAccess}.`); - notifications.send( - `New version (${this.candidate.release.name}) is available${ - !hasAccess ? '; insufficient access to update' : '' - }`, - [ - { - action: { - uuid: unique(), - name: 'Restart & Update', - description: !hasAccess - ? `Unable to update` - : `Update to ${this.candidate.release.name}`, - disabled: !hasAccess, - }, - handler: () => { - if (!hasAccess) { - return Promise.reject(new Error('No access to the current folder')); - } - return this._delivery().then((updater: string) => { - global.application - .shutdown('Updating') - .update(new Update(updater, filename, paths.getExec(true))) - .catch((err: Error) => { - this.log().error( - `Fail to trigger updating; error: ${err.message}`, - ); - }); - }); - }, - }, - { - action: { - uuid: unique(), - name: 'Cancel', - description: '', - disabled: false, - }, - handler: () => Promise.resolve(), - }, - ], - ); - } - - private async _checkForAlphaReleaseAnnouncement(): Promise { - const github = new GitHubClient(); - const releases = await github.getReleases({ repo: REPO }); - const latestAlpha = getLatestAlphaRelease(releases); - // This branch never downloads assets. It only advertises the separate 4.0.0 alpha track. - if (latestAlpha === undefined) { - return; - } - const lastAnnouncedTag = await this._getLastAnnouncedAlphaTag(); - if (lastAnnouncedTag === latestAlpha.tag) { - return; - } - const releasePageUrl = latestAlpha.release.html_url; - notifications.send( - `Chipmunk's next major release is now in alpha.`, - [ - { - action: { - uuid: unique(), - name: 'Open Release Page', - description: releasePageUrl, - disabled: false, - }, - handler: () => { - return shell.openExternal(releasePageUrl); - }, - }, - { - action: { - uuid: unique(), - name: 'Dismiss', - description: '', - disabled: false, - }, - handler: () => Promise.resolve(), - }, - ], - ); - await this._setLastAnnouncedAlphaTag(latestAlpha.tag); - } - - private async _getManualAlphaReleaseReport(): Promise { - const github = new GitHubClient(); - const releases = await github.getReleases({ repo: REPO }); - const latestAlpha = getLatestAlphaRelease(releases); - if (latestAlpha === undefined) { - return undefined; - } - return this._getManualAlphaReleaseReportText(); - } - - private _getManualAlphaReleaseReportText(): string { - return 'The next major release of Chipmunk is available as an alpha release.\nPlease download it manually from the Chipmunk GitHub releases page.'; - } - - private async _getLastAnnouncedAlphaTag(): Promise { - try { - const entries = await storage.entries.get(ALPHA_RELEASE_NOTIFICATION_STATE_KEY); - return entries.get(ALPHA_RELEASE_NOTIFICATION_ENTRY)?.content; - } catch (_err) { - // Missing state just means nothing has been announced yet. - return undefined; - } - } - - private async _setLastAnnouncedAlphaTag(tag: string): Promise { - try { - await storage.entries.overwrite(ALPHA_RELEASE_NOTIFICATION_STATE_KEY, [ - { - uuid: ALPHA_RELEASE_NOTIFICATION_ENTRY, - content: tag, - }, - ]); - } catch (err) { - this.log().warn(`Fail to save alpha release notification state: ${error(err)}`); - } - } - - // Function to check access to the current folder - private checkFolderAccess(): boolean { - try { - fs.accessSync( - paths.getExec(true), - fs.constants.R_OK | fs.constants.W_OK | fs.constants.X_OK, - ); - return true; - } catch (_err) { - return false; - } - } - - private async _delivery(): Promise { - const updater = { - src: path.resolve(paths.getBin(), getExecutable(UPDATER)), - dest: path.resolve(paths.getApps(), getExecutable(UPDATER)), - }; - this.log().debug(`Updater will be copied from ${updater.src} to ${updater.dest}`); - if (!(await exists(updater.src))) { - throw new Error(`Fail to find updater: ${updater.src}`); - } - if (fs.existsSync(updater.dest)) { - await fs.promises.unlink(updater.dest); - } - await fs.promises.copyFile(updater.src, updater.dest); - this.log().debug(`Updater has beed copied from ${updater.src} to ${updater.dest}`); - return updater.dest; - } -} - -export interface Service extends Interface {} -export const updater = register(new Service()); diff --git a/application/holder/src/service/updater/alpha.ts b/application/holder/src/service/updater/alpha.ts deleted file mode 100644 index 86b0217882..0000000000 --- a/application/holder/src/service/updater/alpha.ts +++ /dev/null @@ -1,80 +0,0 @@ -import { IReleaseData } from '@module/github'; - -// Alpha announcements are intentionally separate from the main updater flow. -// The current app never installs `4.0.0-alpha.x`; it only points users to GitHub. -const ALPHA_TAG_REGEXP = /^v?4\.0\.0-alpha\.(\d+)$/i; - -export interface IAlphaRelease { - release: IReleaseData; - tag: string; - number: number; -} - -/** - * Picks the newest GitHub prerelease matching `4.0.0-alpha.{n}`. - * - * The match is based on `tag_name`, not `name`, because release titles are editable. - */ -export function getLatestAlphaRelease(releases: IReleaseData[]): IAlphaRelease | undefined { - return releases - .map((release) => getAlphaRelease(release)) - .filter((release): release is IAlphaRelease => release !== undefined) - .sort((a, b) => { - if (a.number !== b.number) { - return b.number - a.number; - } - const publishedDiff = getPublishedAtTime(b.release) - getPublishedAtTime(a.release); - if (publishedDiff !== 0) { - return publishedDiff; - } - return b.release.id - a.release.id; - })[0]; -} - -export function getAlphaRelease(release: IReleaseData): IAlphaRelease | undefined { - if (release.prerelease !== true || release.draft === true) { - return undefined; - } - if (typeof release.html_url !== 'string' || release.html_url.trim() === '') { - return undefined; - } - const parsed = parseAlphaTag(release.tag_name); - if (parsed === undefined) { - return undefined; - } - return { - release, - tag: parsed.tag, - number: parsed.number, - }; -} - -// Notifications prefer the release title when present, but parsing never depends on it. -export function getReleaseLabel(release: IReleaseData): string { - return release.name.trim() !== '' ? release.name : release.tag_name; -} - -function parseAlphaTag(tag: string): { tag: string; number: number } | undefined { - // Normalize tags so `v4.0.0-alpha.7` and `4.0.0-alpha.7` dedupe to the same key. - const match = tag.trim().toLowerCase().match(ALPHA_TAG_REGEXP); - if (match === null) { - return undefined; - } - const number = Number.parseInt(match[1], 10); - if (!Number.isSafeInteger(number)) { - return undefined; - } - return { - tag: `4.0.0-alpha.${number}`, - number, - }; -} - -function getPublishedAtTime(release: IReleaseData): number { - // GitHub ordering is not treated as authoritative for alpha announcements. - if (typeof release.published_at !== 'string' || release.published_at.trim() === '') { - return 0; - } - const publishedAt = Date.parse(release.published_at); - return Number.isNaN(publishedAt) ? 0 : publishedAt; -} diff --git a/application/holder/src/service/updater/metadata.ts b/application/holder/src/service/updater/metadata.ts deleted file mode 100644 index e0fd8ada48..0000000000 --- a/application/holder/src/service/updater/metadata.ts +++ /dev/null @@ -1,55 +0,0 @@ -import { paths } from '@service/paths'; - -import { promises as fs } from 'fs'; - -import * as path from 'path'; - -const META_FILENAME = '.metadata'; - -interface ReleaseMetadata { - custom_platform?: string | null; -} - -/** - * Parses metadata file if exists and return the custom platform name when available. - */ -export async function getCustomPlatform(): Promise { - const metaFile = path.resolve(paths.getApp(), META_FILENAME); - - if (!paths.isExist(metaFile)) { - // Only in this case we return `undefined`. In all rest cases - error if - // we cannot read "custom_platform" - return undefined; - } - - const content: string = await fs - .readFile(metaFile, 'utf-8') - .catch((err: Error) => Promise.reject(`Fail to read ${metaFile}: ${err.message}`)); - - let metadata: ReleaseMetadata | undefined; - - try { - metadata = JSON.parse(content); - } catch (err) { - return Promise.reject( - new Error( - `Fail to parse content of ${metaFile}: ${err instanceof Error ? err.message : err}`, - ), - ); - } - if (typeof metadata !== 'object' || metadata === null || metadata instanceof Array) { - // We can be here for example if content of file is "null" or "[]" - return Promise.reject(new Error(`File ${metaFile} has invalid metadata.`)); - } - - const platform = metadata.custom_platform; - - // It's possible that platform doesn't exist of that it's a null. - if (typeof platform !== 'string') { - return undefined; - } - - const trimmedPlatform = platform.trim(); - - return trimmedPlatform.length > 0 ? trimmedPlatform : undefined; -} diff --git a/application/holder/src/service/updater/releasefile.ts b/application/holder/src/service/updater/releasefile.ts deleted file mode 100644 index 5bcc6fc2b7..0000000000 --- a/application/holder/src/service/updater/releasefile.ts +++ /dev/null @@ -1,37 +0,0 @@ -import { Platform, getPlatform } from '@env/os/platform'; - -import * as os from 'os'; - -const NAME = 'chipmunk'; -const HOOKS = { - name: '', - version: '', - prefix: '', - platform: '', -}; - -const PATERN = `${HOOKS.name}${HOOKS.prefix}@${HOOKS.version}-${HOOKS.platform}-portable.tgz`; - -export class ReleaseFile { - public readonly filename: string; - constructor(version: string, prefix: string, platform?: string) { - if (platform === undefined) { - const plat = getPlatform(); - if (plat === Platform.undefined) { - throw new Error(`Fail to detect supported platform for (${os.platform()}).`); - } - platform = plat.toString(); - } - - const trimmedPrefix = prefix.trim(); - - this.filename = PATERN.replace(HOOKS.name, NAME) - .replace(HOOKS.prefix, `${trimmedPrefix === '' ? '' : `-${trimmedPrefix}`}`) - .replace(HOOKS.version, version) - .replace(HOOKS.platform, platform); - } - - public equal(filename: string): boolean { - return filename === this.filename; - } -} diff --git a/application/holder/src/service/updater/version.ts b/application/holder/src/service/updater/version.ts deleted file mode 100644 index 3344e3bbe3..0000000000 --- a/application/holder/src/service/updater/version.ts +++ /dev/null @@ -1,58 +0,0 @@ -export class Version { - public readonly parts: number[]; - - constructor(version: string) { - this.parts = version - .split('.') - .map((part: string) => { - return parseInt(part, 10); - }) - .filter((value: number) => { - return isNaN(value) ? false : isFinite(value); - }); - if (this.parts.length !== 3) { - throw new Error(`Invalid version format. Expecting xxx.yyy.zzz`); - } - } - - public ver(): { - major(): number; - minor(): number; - patch(): number; - } { - return { - major: (): number => { - return this.parts[0]; - }, - minor: (): number => { - return this.parts[1]; - }, - patch: (): number => { - return this.parts[2]; - }, - }; - } - - public isGivenGrander(version: Version): boolean { - const diff: number[] = this.parts.map((xxx: number, i: number) => { - return version.parts[i] - xxx; - }); - if (diff[0] > 0) { - return true; - } - if (diff[0] === 0 && diff[1] > 0) { - return true; - } - if (diff[0] === 0 && diff[1] === 0 && diff[2] > 0) { - return true; - } - return false; - } - - public isGivenSame(version: Version): boolean { - const diff: number[] = this.parts.map((xxx: number, i: number) => { - return version.parts[i] - xxx; - }); - return diff[0] + diff[1] + diff[2] === 0; - } -} diff --git a/application/holder/tsconfig.json b/application/holder/tsconfig.json deleted file mode 100644 index 14ddcbc2fc..0000000000 --- a/application/holder/tsconfig.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "compilerOptions": { - "baseUrl": ".", - "outDir": "./dist/", - "forceConsistentCasingInFileNames": true, - "strict": true, - "noImplicitOverride": true, - "noPropertyAccessFromIndexSignature": true, - "noImplicitReturns": true, - "noFallthroughCasesInSwitch": true, - "inlineSourceMap": true, - "declaration": true, - "downlevelIteration": true, - "experimentalDecorators": true, - "emitDecoratorMetadata": true, - "moduleResolution": "Node", - "importHelpers": true, - "noImplicitAny": true, - "target": "ESNext", - "module": "CommonJS", - "esModuleInterop": true, - "skipLibCheck": true, - "lib": ["ESNext"], - "types": ["node"], - "paths": { - "@register/*": ["src/register/*"], - "@env/*": ["src/env/*"], - "@log/*": ["src/env/logs/*"], - "@controller/*": ["src/controller/*"], - "@loader/*": ["src/loaders/*"], - "@module/*": ["src/modules/*"], - "@service/*": ["src/service/*"], - "*": ["node_modules/*"] - } - }, - "files": ["./src/app.ts", "./src/preload/preload.ts"] -} diff --git a/application/holder/yarn.lock b/application/holder/yarn.lock deleted file mode 100644 index 7d18250bb0..0000000000 --- a/application/holder/yarn.lock +++ /dev/null @@ -1,5159 +0,0 @@ -# This file is generated by running "yarn install" inside your project. -# Manual changes might be lost - proceed with caution! - -__metadata: - version: 8 - cacheKey: 10c0 - -"7zip-bin@npm:~5.2.0": - version: 5.2.0 - resolution: "7zip-bin@npm:5.2.0" - checksum: 10c0/7f6c69b4cb10c4060fb8fda258ae2ab88d30516b5a52941efa0e2cbd9ce362ab7d8d568549cd85e9f125c1c68f95c7bb076cc314c2f3c0cb306d3b638080c2ce - languageName: node - linkType: hard - -"@develar/schema-utils@npm:~2.6.5": - version: 2.6.5 - resolution: "@develar/schema-utils@npm:2.6.5" - dependencies: - ajv: "npm:^6.12.0" - ajv-keywords: "npm:^3.4.1" - checksum: 10c0/7c6075ce6742dd5c89b3cebf81351ec1d73dafc7c3409748860e4f8262fb26ffe6d998c5baab4eca579cd436e7c6c12c615fe89819c19484a22d25b3e6825cb5 - languageName: node - linkType: hard - -"@electron/asar@npm:3.4.1, @electron/asar@npm:^3.3.1": - version: 3.4.1 - resolution: "@electron/asar@npm:3.4.1" - dependencies: - commander: "npm:^5.0.0" - glob: "npm:^7.1.6" - minimatch: "npm:^3.0.4" - bin: - asar: bin/asar.js - checksum: 10c0/9df7983125faaa29c266e4beec6ceb205e139ede0e8fb81dde84c73ac8114388a99aad21379412a972163d8879ca959621f4e4896214bf8d296ba217e7cf8170 - languageName: node - linkType: hard - -"@electron/fuses@npm:^1.8.0": - version: 1.8.0 - resolution: "@electron/fuses@npm:1.8.0" - dependencies: - chalk: "npm:^4.1.1" - fs-extra: "npm:^9.0.1" - minimist: "npm:^1.2.5" - bin: - electron-fuses: dist/bin.js - checksum: 10c0/7a2eff2a700a0dc9997346a2cbef83a852ec4a743b047ef89ce8dddfb182377c3a71e340c0cd3dc729d843cccb524253f9a9b96f37271d431f4409f3d897a200 - languageName: node - linkType: hard - -"@electron/get@npm:^2.0.0": - version: 2.0.3 - resolution: "@electron/get@npm:2.0.3" - dependencies: - debug: "npm:^4.1.1" - env-paths: "npm:^2.2.0" - fs-extra: "npm:^8.1.0" - global-agent: "npm:^3.0.0" - got: "npm:^11.8.5" - progress: "npm:^2.0.3" - semver: "npm:^6.2.0" - sumchecker: "npm:^3.0.1" - dependenciesMeta: - global-agent: - optional: true - checksum: 10c0/148957d531bac50c29541515f2483c3e5c9c6ba9f0269a5d536540d2b8d849188a89588f18901f3a84c2b4fd376d1e0c5ea2159eb2d17bda68558f57df19015e - languageName: node - linkType: hard - -"@electron/get@npm:^3.0.0": - version: 3.1.0 - resolution: "@electron/get@npm:3.1.0" - dependencies: - debug: "npm:^4.1.1" - env-paths: "npm:^2.2.0" - fs-extra: "npm:^8.1.0" - global-agent: "npm:^3.0.0" - got: "npm:^11.8.5" - progress: "npm:^2.0.3" - semver: "npm:^6.2.0" - sumchecker: "npm:^3.0.1" - dependenciesMeta: - global-agent: - optional: true - checksum: 10c0/b56b18710482912681c0497a9a8d74f934e5fcefe527bb1f2be6ec837a3853ad7f4b8849584ce4578c3fdd341cb8364cee54f14d1103862891368bbc20b7c0df - languageName: node - linkType: hard - -"@electron/notarize@npm:2.5.0": - version: 2.5.0 - resolution: "@electron/notarize@npm:2.5.0" - dependencies: - debug: "npm:^4.1.1" - fs-extra: "npm:^9.0.1" - promise-retry: "npm:^2.0.1" - checksum: 10c0/262c6a90db4b18c82abb2a8f5349d1bf19ac34a440fe6c01b8aee302b1c886a79906693e6c3fdba2a4efa23a6519abf2113a882b438f7b6687eb2daed3da2afa - languageName: node - linkType: hard - -"@electron/osx-sign@npm:1.3.3": - version: 1.3.3 - resolution: "@electron/osx-sign@npm:1.3.3" - dependencies: - compare-version: "npm:^0.1.2" - debug: "npm:^4.3.4" - fs-extra: "npm:^10.0.0" - isbinaryfile: "npm:^4.0.8" - minimist: "npm:^1.2.6" - plist: "npm:^3.0.5" - bin: - electron-osx-flat: bin/electron-osx-flat.js - electron-osx-sign: bin/electron-osx-sign.js - checksum: 10c0/f8156be879b1850465da8135398b9e58aa6db9f3310cd625c471e1080008b628846c3345a171e17509bcd3c1883cbc90f49a914e7486b1f41702cf2499c657d0 - languageName: node - linkType: hard - -"@electron/rebuild@npm:^4.0.3": - version: 4.0.3 - resolution: "@electron/rebuild@npm:4.0.3" - dependencies: - "@malept/cross-spawn-promise": "npm:^2.0.0" - debug: "npm:^4.1.1" - detect-libc: "npm:^2.0.1" - got: "npm:^11.7.0" - graceful-fs: "npm:^4.2.11" - node-abi: "npm:^4.2.0" - node-api-version: "npm:^0.2.1" - node-gyp: "npm:^11.2.0" - ora: "npm:^5.1.0" - read-binary-file-arch: "npm:^1.0.6" - semver: "npm:^7.3.5" - tar: "npm:^7.5.6" - yargs: "npm:^17.0.1" - dependenciesMeta: - electron: - built: true - bin: - electron-rebuild: lib/cli.js - checksum: 10c0/43bdbf85cde13874a2185c161d1943c3c4f12323f25cc3534890b1b0ec451b5bb940aa80e2c42476fe0d8c854d2e62b0e56f0d98c482c03b0715305bf9688171 - languageName: node - linkType: hard - -"@electron/universal@npm:2.0.3": - version: 2.0.3 - resolution: "@electron/universal@npm:2.0.3" - dependencies: - "@electron/asar": "npm:^3.3.1" - "@malept/cross-spawn-promise": "npm:^2.0.0" - debug: "npm:^4.3.1" - dir-compare: "npm:^4.2.0" - fs-extra: "npm:^11.1.1" - minimatch: "npm:^9.0.3" - plist: "npm:^3.1.0" - checksum: 10c0/346b23298d4f175dc50d9b91277d8e4c30017215e1a78c985ce917cd793fc0600084d62a84f485229d781ddfeb5829b6c1125c0bda131ddb9146522d305e92aa - languageName: node - linkType: hard - -"@eslint-community/eslint-utils@npm:^4.2.0, @eslint-community/eslint-utils@npm:^4.4.0": - version: 4.4.1 - resolution: "@eslint-community/eslint-utils@npm:4.4.1" - dependencies: - eslint-visitor-keys: "npm:^3.4.3" - peerDependencies: - eslint: ^6.0.0 || ^7.0.0 || >=8.0.0 - checksum: 10c0/2aa0ac2fc50ff3f234408b10900ed4f1a0b19352f21346ad4cc3d83a1271481bdda11097baa45d484dd564c895e0762a27a8240be7a256b3ad47129e96528252 - languageName: node - linkType: hard - -"@eslint-community/regexpp@npm:^4.10.0, @eslint-community/regexpp@npm:^4.12.1": - version: 4.12.1 - resolution: "@eslint-community/regexpp@npm:4.12.1" - checksum: 10c0/a03d98c246bcb9109aec2c08e4d10c8d010256538dcb3f56610191607214523d4fb1b00aa81df830b6dffb74c5fa0be03642513a289c567949d3e550ca11cdf6 - languageName: node - linkType: hard - -"@eslint/config-array@npm:^0.19.0": - version: 0.19.1 - resolution: "@eslint/config-array@npm:0.19.1" - dependencies: - "@eslint/object-schema": "npm:^2.1.5" - debug: "npm:^4.3.1" - minimatch: "npm:^3.1.2" - checksum: 10c0/43b01f596ddad404473beae5cf95c013d29301c72778d0f5bf8a6699939c8a9a5663dbd723b53c5f476b88b0c694f76ea145d1aa9652230d140fe1161e4a4b49 - languageName: node - linkType: hard - -"@eslint/core@npm:^0.10.0": - version: 0.10.0 - resolution: "@eslint/core@npm:0.10.0" - dependencies: - "@types/json-schema": "npm:^7.0.15" - checksum: 10c0/074018075079b3ed1f14fab9d116f11a8824cdfae3e822badf7ad546962fafe717a31e61459bad8cc59cf7070dc413ea9064ddb75c114f05b05921029cde0a64 - languageName: node - linkType: hard - -"@eslint/eslintrc@npm:^3.2.0": - version: 3.2.0 - resolution: "@eslint/eslintrc@npm:3.2.0" - dependencies: - ajv: "npm:^6.12.4" - debug: "npm:^4.3.2" - espree: "npm:^10.0.1" - globals: "npm:^14.0.0" - ignore: "npm:^5.2.0" - import-fresh: "npm:^3.2.1" - js-yaml: "npm:^4.1.0" - minimatch: "npm:^3.1.2" - strip-json-comments: "npm:^3.1.1" - checksum: 10c0/43867a07ff9884d895d9855edba41acf325ef7664a8df41d957135a81a477ff4df4196f5f74dc3382627e5cc8b7ad6b815c2cea1b58f04a75aced7c43414ab8b - languageName: node - linkType: hard - -"@eslint/js@npm:9.18.0": - version: 9.18.0 - resolution: "@eslint/js@npm:9.18.0" - checksum: 10c0/3938344c5ac7feef4b73fcb30f3c3e753570cea74c24904bb5d07e9c42fcd34fcbc40f545b081356a299e11f360c9c274b348c05fb0113fc3d492e5175eee140 - languageName: node - linkType: hard - -"@eslint/object-schema@npm:^2.1.5": - version: 2.1.5 - resolution: "@eslint/object-schema@npm:2.1.5" - checksum: 10c0/5320691ed41ecd09a55aff40ce8e56596b4eb81f3d4d6fe530c50fdd6552d88102d1c1a29d970ae798ce30849752a708772de38ded07a6f25b3da32ebea081d8 - languageName: node - linkType: hard - -"@eslint/plugin-kit@npm:^0.2.5": - version: 0.2.5 - resolution: "@eslint/plugin-kit@npm:0.2.5" - dependencies: - "@eslint/core": "npm:^0.10.0" - levn: "npm:^0.4.1" - checksum: 10c0/ba9832b8409af618cf61791805fe201dd62f3c82c783adfcec0f5cd391e68b40beaecb47b9a3209e926dbcab65135f410cae405b69a559197795793399f61176 - languageName: node - linkType: hard - -"@humanfs/core@npm:^0.19.1": - version: 0.19.1 - resolution: "@humanfs/core@npm:0.19.1" - checksum: 10c0/aa4e0152171c07879b458d0e8a704b8c3a89a8c0541726c6b65b81e84fd8b7564b5d6c633feadc6598307d34564bd53294b533491424e8e313d7ab6c7bc5dc67 - languageName: node - linkType: hard - -"@humanfs/node@npm:^0.16.6": - version: 0.16.6 - resolution: "@humanfs/node@npm:0.16.6" - dependencies: - "@humanfs/core": "npm:^0.19.1" - "@humanwhocodes/retry": "npm:^0.3.0" - checksum: 10c0/8356359c9f60108ec204cbd249ecd0356667359b2524886b357617c4a7c3b6aace0fd5a369f63747b926a762a88f8a25bc066fa1778508d110195ce7686243e1 - languageName: node - linkType: hard - -"@humanwhocodes/module-importer@npm:^1.0.1": - version: 1.0.1 - resolution: "@humanwhocodes/module-importer@npm:1.0.1" - checksum: 10c0/909b69c3b86d482c26b3359db16e46a32e0fb30bd306a3c176b8313b9e7313dba0f37f519de6aa8b0a1921349e505f259d19475e123182416a506d7f87e7f529 - languageName: node - linkType: hard - -"@humanwhocodes/retry@npm:^0.3.0": - version: 0.3.1 - resolution: "@humanwhocodes/retry@npm:0.3.1" - checksum: 10c0/f0da1282dfb45e8120480b9e2e275e2ac9bbe1cf016d046fdad8e27cc1285c45bb9e711681237944445157b430093412b4446c1ab3fc4bb037861b5904101d3b - languageName: node - linkType: hard - -"@humanwhocodes/retry@npm:^0.4.1": - version: 0.4.1 - resolution: "@humanwhocodes/retry@npm:0.4.1" - checksum: 10c0/be7bb6841c4c01d0b767d9bb1ec1c9359ee61421ce8ba66c249d035c5acdfd080f32d55a5c9e859cdd7868788b8935774f65b2caf24ec0b7bd7bf333791f063b - languageName: node - linkType: hard - -"@isaacs/balanced-match@npm:^4.0.1": - version: 4.0.1 - resolution: "@isaacs/balanced-match@npm:4.0.1" - checksum: 10c0/7da011805b259ec5c955f01cee903da72ad97c5e6f01ca96197267d3f33103d5b2f8a1af192140f3aa64526c593c8d098ae366c2b11f7f17645d12387c2fd420 - languageName: node - linkType: hard - -"@isaacs/brace-expansion@npm:^5.0.1": - version: 5.0.1 - resolution: "@isaacs/brace-expansion@npm:5.0.1" - dependencies: - "@isaacs/balanced-match": "npm:^4.0.1" - checksum: 10c0/e5d67c7bbf1f17b88132a35bc638af306d48acbb72810d48fa6e6edd8ab375854773108e8bf70f021f7ef6a8273455a6d1f0c3b5aa2aff06ce7894049ab77fb8 - languageName: node - linkType: hard - -"@isaacs/cliui@npm:^8.0.2": - version: 8.0.2 - resolution: "@isaacs/cliui@npm:8.0.2" - dependencies: - string-width: "npm:^5.1.2" - string-width-cjs: "npm:string-width@^4.2.0" - strip-ansi: "npm:^7.0.1" - strip-ansi-cjs: "npm:strip-ansi@^6.0.1" - wrap-ansi: "npm:^8.1.0" - wrap-ansi-cjs: "npm:wrap-ansi@^7.0.0" - checksum: 10c0/b1bf42535d49f11dc137f18d5e4e63a28c5569de438a221c369483731e9dac9fb797af554e8bf02b6192d1e5eba6e6402cf93900c3d0ac86391d00d04876789e - languageName: node - linkType: hard - -"@isaacs/fs-minipass@npm:^4.0.0": - version: 4.0.1 - resolution: "@isaacs/fs-minipass@npm:4.0.1" - dependencies: - minipass: "npm:^7.0.4" - checksum: 10c0/c25b6dc1598790d5b55c0947a9b7d111cfa92594db5296c3b907e2f533c033666f692a3939eadac17b1c7c40d362d0b0635dc874cbfe3e70db7c2b07cc97a5d2 - languageName: node - linkType: hard - -"@malept/cross-spawn-promise@npm:^2.0.0": - version: 2.0.0 - resolution: "@malept/cross-spawn-promise@npm:2.0.0" - dependencies: - cross-spawn: "npm:^7.0.1" - checksum: 10c0/84d60b8d467f4252114849f0a33c3763f07898335269eec5c94978ccac9d5680e1e268d993dd1a6d25a91476f9e0992759d7e1f385f9f3a090d862f9bb949603 - languageName: node - linkType: hard - -"@malept/flatpak-bundler@npm:^0.4.0": - version: 0.4.0 - resolution: "@malept/flatpak-bundler@npm:0.4.0" - dependencies: - debug: "npm:^4.1.1" - fs-extra: "npm:^9.0.0" - lodash: "npm:^4.17.15" - tmp-promise: "npm:^3.0.2" - checksum: 10c0/b3c87f6482b1956411af1118c771afb39cd9a0568fbb5e86015547ff6d68d2e73a7f0d74b75a57f0a156391c347c8d0adc1037e75172b92da72b96e0a05a2f4f - languageName: node - linkType: hard - -"@nodelib/fs.scandir@npm:2.1.5": - version: 2.1.5 - resolution: "@nodelib/fs.scandir@npm:2.1.5" - dependencies: - "@nodelib/fs.stat": "npm:2.0.5" - run-parallel: "npm:^1.1.9" - checksum: 10c0/732c3b6d1b1e967440e65f284bd06e5821fedf10a1bea9ed2bb75956ea1f30e08c44d3def9d6a230666574edbaf136f8cfd319c14fd1f87c66e6a44449afb2eb - languageName: node - linkType: hard - -"@nodelib/fs.stat@npm:2.0.5, @nodelib/fs.stat@npm:^2.0.2": - version: 2.0.5 - resolution: "@nodelib/fs.stat@npm:2.0.5" - checksum: 10c0/88dafe5e3e29a388b07264680dc996c17f4bda48d163a9d4f5c1112979f0ce8ec72aa7116122c350b4e7976bc5566dc3ddb579be1ceaacc727872eb4ed93926d - languageName: node - linkType: hard - -"@nodelib/fs.walk@npm:^1.2.3": - version: 1.2.8 - resolution: "@nodelib/fs.walk@npm:1.2.8" - dependencies: - "@nodelib/fs.scandir": "npm:2.1.5" - fastq: "npm:^1.6.0" - checksum: 10c0/db9de047c3bb9b51f9335a7bb46f4fcfb6829fb628318c12115fbaf7d369bfce71c15b103d1fc3b464812d936220ee9bc1c8f762d032c9f6be9acc99249095b1 - languageName: node - linkType: hard - -"@npmcli/agent@npm:^3.0.0": - version: 3.0.0 - resolution: "@npmcli/agent@npm:3.0.0" - dependencies: - agent-base: "npm:^7.1.0" - http-proxy-agent: "npm:^7.0.0" - https-proxy-agent: "npm:^7.0.1" - lru-cache: "npm:^10.0.1" - socks-proxy-agent: "npm:^8.0.3" - checksum: 10c0/efe37b982f30740ee77696a80c196912c274ecd2cb243bc6ae7053a50c733ce0f6c09fda085145f33ecf453be19654acca74b69e81eaad4c90f00ccffe2f9271 - languageName: node - linkType: hard - -"@npmcli/fs@npm:^4.0.0": - version: 4.0.0 - resolution: "@npmcli/fs@npm:4.0.0" - dependencies: - semver: "npm:^7.3.5" - checksum: 10c0/c90935d5ce670c87b6b14fab04a965a3b8137e585f8b2a6257263bd7f97756dd736cb165bb470e5156a9e718ecd99413dccc54b1138c1a46d6ec7cf325982fe5 - languageName: node - linkType: hard - -"@pkgjs/parseargs@npm:^0.11.0": - version: 0.11.0 - resolution: "@pkgjs/parseargs@npm:0.11.0" - checksum: 10c0/5bd7576bb1b38a47a7fc7b51ac9f38748e772beebc56200450c4a817d712232b8f1d3ef70532c80840243c657d491cf6a6be1e3a214cff907645819fdc34aadd - languageName: node - linkType: hard - -"@rtsao/scc@npm:^1.1.0": - version: 1.1.0 - resolution: "@rtsao/scc@npm:1.1.0" - checksum: 10c0/b5bcfb0d87f7d1c1c7c0f7693f53b07866ed9fec4c34a97a8c948fb9a7c0082e416ce4d3b60beb4f5e167cbe04cdeefbf6771320f3ede059b9ce91188c409a5b - languageName: node - linkType: hard - -"@sindresorhus/is@npm:^4.0.0": - version: 4.6.0 - resolution: "@sindresorhus/is@npm:4.6.0" - checksum: 10c0/33b6fb1d0834ec8dd7689ddc0e2781c2bfd8b9c4e4bacbcb14111e0ae00621f2c264b8a7d36541799d74888b5dccdf422a891a5cb5a709ace26325eedc81e22e - languageName: node - linkType: hard - -"@szmarczak/http-timer@npm:^4.0.5": - version: 4.0.6 - resolution: "@szmarczak/http-timer@npm:4.0.6" - dependencies: - defer-to-connect: "npm:^2.0.0" - checksum: 10c0/73946918c025339db68b09abd91fa3001e87fc749c619d2e9c2003a663039d4c3cb89836c98a96598b3d47dec2481284ba85355392644911f5ecd2336536697f - languageName: node - linkType: hard - -"@types/cacheable-request@npm:^6.0.1": - version: 6.0.3 - resolution: "@types/cacheable-request@npm:6.0.3" - dependencies: - "@types/http-cache-semantics": "npm:*" - "@types/keyv": "npm:^3.1.4" - "@types/node": "npm:*" - "@types/responselike": "npm:^1.0.0" - checksum: 10c0/10816a88e4e5b144d43c1d15a81003f86d649776c7f410c9b5e6579d0ad9d4ca71c541962fb403077388b446e41af7ae38d313e46692144985f006ac5e11fa03 - languageName: node - linkType: hard - -"@types/caseless@npm:*": - version: 0.12.5 - resolution: "@types/caseless@npm:0.12.5" - checksum: 10c0/b1f8b8a38ce747b643115d37a40ea824c658bd7050e4b69427a10e9d12d1606ed17a0f6018241c08291cd59f70aeb3c1f3754ad61e45f8dbba708ec72dde7ec8 - languageName: node - linkType: hard - -"@types/debug@npm:^4.1.6": - version: 4.1.12 - resolution: "@types/debug@npm:4.1.12" - dependencies: - "@types/ms": "npm:*" - checksum: 10c0/5dcd465edbb5a7f226e9a5efd1f399c6172407ef5840686b73e3608ce135eeca54ae8037dcd9f16bdb2768ac74925b820a8b9ecc588a58ca09eca6acabe33e2f - languageName: node - linkType: hard - -"@types/estree@npm:^1.0.6": - version: 1.0.6 - resolution: "@types/estree@npm:1.0.6" - checksum: 10c0/cdfd751f6f9065442cd40957c07fd80361c962869aa853c1c2fd03e101af8b9389d8ff4955a43a6fcfa223dd387a089937f95be0f3eec21ca527039fd2d9859a - languageName: node - linkType: hard - -"@types/fs-extra@npm:9.0.13, @types/fs-extra@npm:^9.0.11": - version: 9.0.13 - resolution: "@types/fs-extra@npm:9.0.13" - dependencies: - "@types/node": "npm:*" - checksum: 10c0/576d4e9d382393316ed815c593f7f5c157408ec5e184521d077fcb15d514b5a985245f153ef52142b9b976cb9bd8f801850d51238153ebd0dc9e96b7a7548588 - languageName: node - linkType: hard - -"@types/http-cache-semantics@npm:*": - version: 4.0.4 - resolution: "@types/http-cache-semantics@npm:4.0.4" - checksum: 10c0/51b72568b4b2863e0fe8d6ce8aad72a784b7510d72dc866215642da51d84945a9459fa89f49ec48f1e9a1752e6a78e85a4cda0ded06b1c73e727610c925f9ce6 - languageName: node - linkType: hard - -"@types/json-schema@npm:^7.0.15": - version: 7.0.15 - resolution: "@types/json-schema@npm:7.0.15" - checksum: 10c0/a996a745e6c5d60292f36731dd41341339d4eeed8180bb09226e5c8d23759067692b1d88e5d91d72ee83dfc00d3aca8e7bd43ea120516c17922cbcb7c3e252db - languageName: node - linkType: hard - -"@types/json5@npm:^0.0.29": - version: 0.0.29 - resolution: "@types/json5@npm:0.0.29" - checksum: 10c0/6bf5337bc447b706bb5b4431d37686aa2ea6d07cfd6f79cc31de80170d6ff9b1c7384a9c0ccbc45b3f512bae9e9f75c2e12109806a15331dc94e8a8db6dbb4ac - languageName: node - linkType: hard - -"@types/keyv@npm:^3.1.4": - version: 3.1.4 - resolution: "@types/keyv@npm:3.1.4" - dependencies: - "@types/node": "npm:*" - checksum: 10c0/ff8f54fc49621210291f815fe5b15d809fd7d032941b3180743440bd507ecdf08b9e844625fa346af568c84bf34114eb378dcdc3e921a08ba1e2a08d7e3c809c - languageName: node - linkType: hard - -"@types/mime-types@npm:^3.0.1": - version: 3.0.1 - resolution: "@types/mime-types@npm:3.0.1" - checksum: 10c0/61c2056529dc5bc73c25b2a053e21f063fd547c21e12a2be94ca78b89b0f83c9a75afed9a8bda3c78592ee880acc82778302651527f7882cf5ba8e58ab320e29 - languageName: node - linkType: hard - -"@types/module-alias@npm:^2.0.2": - version: 2.0.4 - resolution: "@types/module-alias@npm:2.0.4" - checksum: 10c0/73e0993763526093d9e0993923e93a43186fac9b73e6ee6f785a34a79db6130468b2c9d9798c092ae5d50e8a2e6f7ab51a7f638ee7671037c15b5dde15dc5787 - languageName: node - linkType: hard - -"@types/ms@npm:*": - version: 2.1.0 - resolution: "@types/ms@npm:2.1.0" - checksum: 10c0/5ce692ffe1549e1b827d99ef8ff71187457e0eb44adbae38fdf7b9a74bae8d20642ee963c14516db1d35fa2652e65f47680fdf679dcbde52bbfadd021f497225 - languageName: node - linkType: hard - -"@types/node@npm:*, @types/node@npm:^22.10.10": - version: 22.10.10 - resolution: "@types/node@npm:22.10.10" - dependencies: - undici-types: "npm:~6.20.0" - checksum: 10c0/3425772d4513cd5dbdd87c00acda088113c03a97445f84f6a89744c60a66990b56c9d3a7213d09d57b6b944ae8ff45f985565e0c1846726112588e33a22dd12b - languageName: node - linkType: hard - -"@types/node@npm:^20.9.0": - version: 20.17.16 - resolution: "@types/node@npm:20.17.16" - dependencies: - undici-types: "npm:~6.19.2" - checksum: 10c0/50c589dd6a377238bc51b6fb5b8fc60ff6d688df0bde621d4a9fc59f480eb956cdf6d46052e1cb9536f150bc62e9194ddc733aa78b65e812155b4d3a32717de2 - languageName: node - linkType: hard - -"@types/plist@npm:^3.0.1": - version: 3.0.5 - resolution: "@types/plist@npm:3.0.5" - dependencies: - "@types/node": "npm:*" - xmlbuilder: "npm:>=11.0.1" - checksum: 10c0/2a929f4482e3bea8c3288a46ae589a2ae2d01df5b7841ead7032d7baa79d79af6c875a5798c90705eea9306c2fb1544d7ed12ab3c905c5626d5dd5dc9f464b94 - languageName: node - linkType: hard - -"@types/request@npm:^2.48.8": - version: 2.48.12 - resolution: "@types/request@npm:2.48.12" - dependencies: - "@types/caseless": "npm:*" - "@types/node": "npm:*" - "@types/tough-cookie": "npm:*" - form-data: "npm:^2.5.0" - checksum: 10c0/dd3d03d68af95b1e1961dc51efc63023543a91a74afd481dafb441521a31baa58c42f80d3bdd0d5d4633aa777e31b17f7ff7bed5606ad3f5eb175a65148adbce - languageName: node - linkType: hard - -"@types/responselike@npm:^1.0.0": - version: 1.0.3 - resolution: "@types/responselike@npm:1.0.3" - dependencies: - "@types/node": "npm:*" - checksum: 10c0/a58ba341cb9e7d74f71810a88862da7b2a6fa42e2a1fc0ce40498f6ea1d44382f0640117057da779f74c47039f7166bf48fad02dc876f94e005c7afa50f5e129 - languageName: node - linkType: hard - -"@types/semver@npm:^7.5.3": - version: 7.5.8 - resolution: "@types/semver@npm:7.5.8" - checksum: 10c0/8663ff927234d1c5fcc04b33062cb2b9fcfbe0f5f351ed26c4d1e1581657deebd506b41ff7fdf89e787e3d33ce05854bc01686379b89e9c49b564c4cfa988efa - languageName: node - linkType: hard - -"@types/tough-cookie@npm:*": - version: 4.0.5 - resolution: "@types/tough-cookie@npm:4.0.5" - checksum: 10c0/68c6921721a3dcb40451543db2174a145ef915bc8bcbe7ad4e59194a0238e776e782b896c7a59f4b93ac6acefca9161fccb31d1ce3b3445cb6faa467297fb473 - languageName: node - linkType: hard - -"@types/uuid@npm:^10.0.0": - version: 10.0.0 - resolution: "@types/uuid@npm:10.0.0" - checksum: 10c0/9a1404bf287164481cb9b97f6bb638f78f955be57c40c6513b7655160beb29df6f84c915aaf4089a1559c216557dc4d2f79b48d978742d3ae10b937420ddac60 - languageName: node - linkType: hard - -"@types/verror@npm:^1.10.3": - version: 1.10.10 - resolution: "@types/verror@npm:1.10.10" - checksum: 10c0/413c0c0370ed6a796d630fbcdae20049ab3e26558c62bc5f53327830ddb0965aaadedb92f4933b28ee8fc8089e1293b742a0efbf6b264d15ce3930c6b83b0984 - languageName: node - linkType: hard - -"@types/yauzl@npm:^2.9.1": - version: 2.10.3 - resolution: "@types/yauzl@npm:2.10.3" - dependencies: - "@types/node": "npm:*" - checksum: 10c0/f1b7c1b99fef9f2fe7f1985ef7426d0cebe48cd031f1780fcdc7451eec7e31ac97028f16f50121a59bcf53086a1fc8c856fd5b7d3e00970e43d92ae27d6b43dc - languageName: node - linkType: hard - -"@typescript-eslint/eslint-plugin@npm:^8.21.0": - version: 8.21.0 - resolution: "@typescript-eslint/eslint-plugin@npm:8.21.0" - dependencies: - "@eslint-community/regexpp": "npm:^4.10.0" - "@typescript-eslint/scope-manager": "npm:8.21.0" - "@typescript-eslint/type-utils": "npm:8.21.0" - "@typescript-eslint/utils": "npm:8.21.0" - "@typescript-eslint/visitor-keys": "npm:8.21.0" - graphemer: "npm:^1.4.0" - ignore: "npm:^5.3.1" - natural-compare: "npm:^1.4.0" - ts-api-utils: "npm:^2.0.0" - peerDependencies: - "@typescript-eslint/parser": ^8.0.0 || ^8.0.0-alpha.0 - eslint: ^8.57.0 || ^9.0.0 - typescript: ">=4.8.4 <5.8.0" - checksum: 10c0/4601d21ec35b9fa5cfc1ad0330733ab40d6c6822c7fc15c3584a16f678c9a72e077a1725a950823fe0f499a15f3981795b1ea5d1e7a1be5c7b8296ea9ae6327c - languageName: node - linkType: hard - -"@typescript-eslint/parser@npm:^8.21.0": - version: 8.21.0 - resolution: "@typescript-eslint/parser@npm:8.21.0" - dependencies: - "@typescript-eslint/scope-manager": "npm:8.21.0" - "@typescript-eslint/types": "npm:8.21.0" - "@typescript-eslint/typescript-estree": "npm:8.21.0" - "@typescript-eslint/visitor-keys": "npm:8.21.0" - debug: "npm:^4.3.4" - peerDependencies: - eslint: ^8.57.0 || ^9.0.0 - typescript: ">=4.8.4 <5.8.0" - checksum: 10c0/aadebd50ca7aa2d61ad85d890c0d7010f2c293ec4d50a7833ef9674f232f0bc7118faa93a898771fbea50f02d542d687cf3569421b23f72fe6fed6895d5506fc - languageName: node - linkType: hard - -"@typescript-eslint/scope-manager@npm:8.21.0": - version: 8.21.0 - resolution: "@typescript-eslint/scope-manager@npm:8.21.0" - dependencies: - "@typescript-eslint/types": "npm:8.21.0" - "@typescript-eslint/visitor-keys": "npm:8.21.0" - checksum: 10c0/ea405e79dc884ea1c76465604db52f9b0941d6cbb0bde6bce1af689ef212f782e214de69d46503c7c47bfc180d763369b7433f1965e3be3c442b417e8c9f8f75 - languageName: node - linkType: hard - -"@typescript-eslint/type-utils@npm:8.21.0": - version: 8.21.0 - resolution: "@typescript-eslint/type-utils@npm:8.21.0" - dependencies: - "@typescript-eslint/typescript-estree": "npm:8.21.0" - "@typescript-eslint/utils": "npm:8.21.0" - debug: "npm:^4.3.4" - ts-api-utils: "npm:^2.0.0" - peerDependencies: - eslint: ^8.57.0 || ^9.0.0 - typescript: ">=4.8.4 <5.8.0" - checksum: 10c0/617f5dfe83fd9a7c722b27fa4e7f0c84f29baa94f75a4e8e5ccfd5b0a373437f65724e21b9642870fb0960f204b1a7f516a038200a12f8118f21b1bf86315bf3 - languageName: node - linkType: hard - -"@typescript-eslint/types@npm:8.21.0": - version: 8.21.0 - resolution: "@typescript-eslint/types@npm:8.21.0" - checksum: 10c0/67dfd300cc614d7b02e94d0dacfb228a7f4c3fd4eede29c43adb9e9fcc16365ae3df8d6165018da3c123dce65545bef03e3e8183f35e9b3a911ffc727e3274c2 - languageName: node - linkType: hard - -"@typescript-eslint/typescript-estree@npm:8.21.0": - version: 8.21.0 - resolution: "@typescript-eslint/typescript-estree@npm:8.21.0" - dependencies: - "@typescript-eslint/types": "npm:8.21.0" - "@typescript-eslint/visitor-keys": "npm:8.21.0" - debug: "npm:^4.3.4" - fast-glob: "npm:^3.3.2" - is-glob: "npm:^4.0.3" - minimatch: "npm:^9.0.4" - semver: "npm:^7.6.0" - ts-api-utils: "npm:^2.0.0" - peerDependencies: - typescript: ">=4.8.4 <5.8.0" - checksum: 10c0/0cf5b0382524f4af54fb5ec71ca7e939ec922711f2d77b383740b28dd4b21407b0ab5dded62df6819d01c12c0b354e95667e3c7025a5d27d05b805161ab94855 - languageName: node - linkType: hard - -"@typescript-eslint/utils@npm:8.21.0": - version: 8.21.0 - resolution: "@typescript-eslint/utils@npm:8.21.0" - dependencies: - "@eslint-community/eslint-utils": "npm:^4.4.0" - "@typescript-eslint/scope-manager": "npm:8.21.0" - "@typescript-eslint/types": "npm:8.21.0" - "@typescript-eslint/typescript-estree": "npm:8.21.0" - peerDependencies: - eslint: ^8.57.0 || ^9.0.0 - typescript: ">=4.8.4 <5.8.0" - checksum: 10c0/d8347dbe9176417220aa62902cfc1b2007a9246bb7a8cccdf8590120903eb50ca14cb668efaab4646d086277f2367559985b62230e43ebd8b0723d237eeaa2f2 - languageName: node - linkType: hard - -"@typescript-eslint/visitor-keys@npm:8.21.0": - version: 8.21.0 - resolution: "@typescript-eslint/visitor-keys@npm:8.21.0" - dependencies: - "@typescript-eslint/types": "npm:8.21.0" - eslint-visitor-keys: "npm:^4.2.0" - checksum: 10c0/b3f1412f550e35c0d7ae0410db616951116b365167539f9b85710d8bc2b36b322c5e637caee84cc1ae5df8f1d961880250d52ffdef352b31e5bdbef74ba6fea9 - languageName: node - linkType: hard - -"@xmldom/xmldom@npm:^0.8.8": - version: 0.8.10 - resolution: "@xmldom/xmldom@npm:0.8.10" - checksum: 10c0/c7647c442502720182b0d65b17d45d2d95317c1c8c497626fe524bda79b4fb768a9aa4fae2da919f308e7abcff7d67c058b102a9d641097e9a57f0b80187851f - languageName: node - linkType: hard - -"abbrev@npm:^3.0.0": - version: 3.0.0 - resolution: "abbrev@npm:3.0.0" - checksum: 10c0/049704186396f571650eb7b22ed3627b77a5aedf98bb83caf2eac81ca2a3e25e795394b0464cfb2d6076df3db6a5312139eac5b6a126ca296ac53c5008069c28 - languageName: node - linkType: hard - -"acorn-jsx@npm:^5.3.2": - version: 5.3.2 - resolution: "acorn-jsx@npm:5.3.2" - peerDependencies: - acorn: ^6.0.0 || ^7.0.0 || ^8.0.0 - checksum: 10c0/4c54868fbef3b8d58927d5e33f0a4de35f59012fe7b12cf9dfbb345fb8f46607709e1c4431be869a23fb63c151033d84c4198fa9f79385cec34fcb1dd53974c1 - languageName: node - linkType: hard - -"acorn@npm:^8.14.0": - version: 8.14.0 - resolution: "acorn@npm:8.14.0" - bin: - acorn: bin/acorn - checksum: 10c0/6d4ee461a7734b2f48836ee0fbb752903606e576cc100eb49340295129ca0b452f3ba91ddd4424a1d4406a98adfb2ebb6bd0ff4c49d7a0930c10e462719bbfd7 - languageName: node - linkType: hard - -"agent-base@npm:^7.1.0, agent-base@npm:^7.1.2": - version: 7.1.3 - resolution: "agent-base@npm:7.1.3" - checksum: 10c0/6192b580c5b1d8fb399b9c62bf8343d76654c2dd62afcb9a52b2cf44a8b6ace1e3b704d3fe3547d91555c857d3df02603341ff2cb961b9cfe2b12f9f3c38ee11 - languageName: node - linkType: hard - -"ajv-keywords@npm:^3.4.1": - version: 3.5.2 - resolution: "ajv-keywords@npm:3.5.2" - peerDependencies: - ajv: ^6.9.1 - checksum: 10c0/0c57a47cbd656e8cdfd99d7c2264de5868918ffa207c8d7a72a7f63379d4333254b2ba03d69e3c035e996a3fd3eb6d5725d7a1597cca10694296e32510546360 - languageName: node - linkType: hard - -"ajv@npm:^6.10.0, ajv@npm:^6.12.0, ajv@npm:^6.12.4": - version: 6.12.6 - resolution: "ajv@npm:6.12.6" - dependencies: - fast-deep-equal: "npm:^3.1.1" - fast-json-stable-stringify: "npm:^2.0.0" - json-schema-traverse: "npm:^0.4.1" - uri-js: "npm:^4.2.2" - checksum: 10c0/41e23642cbe545889245b9d2a45854ebba51cda6c778ebced9649420d9205f2efb39cb43dbc41e358409223b1ea43303ae4839db682c848b891e4811da1a5a71 - languageName: node - linkType: hard - -"ansi-regex@npm:^5.0.1": - version: 5.0.1 - resolution: "ansi-regex@npm:5.0.1" - checksum: 10c0/9a64bb8627b434ba9327b60c027742e5d17ac69277960d041898596271d992d4d52ba7267a63ca10232e29f6107fc8a835f6ce8d719b88c5f8493f8254813737 - languageName: node - linkType: hard - -"ansi-regex@npm:^6.0.1": - version: 6.1.0 - resolution: "ansi-regex@npm:6.1.0" - checksum: 10c0/a91daeddd54746338478eef88af3439a7edf30f8e23196e2d6ed182da9add559c601266dbef01c2efa46a958ad6f1f8b176799657616c702b5b02e799e7fd8dc - languageName: node - linkType: hard - -"ansi-styles@npm:^4.0.0, ansi-styles@npm:^4.1.0": - version: 4.3.0 - resolution: "ansi-styles@npm:4.3.0" - dependencies: - color-convert: "npm:^2.0.1" - checksum: 10c0/895a23929da416f2bd3de7e9cb4eabd340949328ab85ddd6e484a637d8f6820d485f53933446f5291c3b760cbc488beb8e88573dd0f9c7daf83dccc8fe81b041 - languageName: node - linkType: hard - -"ansi-styles@npm:^6.1.0": - version: 6.2.1 - resolution: "ansi-styles@npm:6.2.1" - checksum: 10c0/5d1ec38c123984bcedd996eac680d548f31828bd679a66db2bdf11844634dde55fec3efa9c6bb1d89056a5e79c1ac540c4c784d592ea1d25028a92227d2f2d5c - languageName: node - linkType: hard - -"app-builder-bin@npm:5.0.0-alpha.12": - version: 5.0.0-alpha.12 - resolution: "app-builder-bin@npm:5.0.0-alpha.12" - checksum: 10c0/25054e31c9265066dfd59c22d4feab73df19d3724d7397404f2d71e01e97f9551003b1f3681bee51c7a33eea85abc00e473371c2a1397eb6fa89f96cde680c78 - languageName: node - linkType: hard - -"app-builder-lib@npm:26.9.0": - version: 26.9.0 - resolution: "app-builder-lib@npm:26.9.0" - dependencies: - "@develar/schema-utils": "npm:~2.6.5" - "@electron/asar": "npm:3.4.1" - "@electron/fuses": "npm:^1.8.0" - "@electron/get": "npm:^3.0.0" - "@electron/notarize": "npm:2.5.0" - "@electron/osx-sign": "npm:1.3.3" - "@electron/rebuild": "npm:^4.0.3" - "@electron/universal": "npm:2.0.3" - "@malept/flatpak-bundler": "npm:^0.4.0" - "@types/fs-extra": "npm:9.0.13" - async-exit-hook: "npm:^2.0.1" - builder-util: "npm:26.9.0" - builder-util-runtime: "npm:9.6.0" - chromium-pickle-js: "npm:^0.2.0" - ci-info: "npm:4.3.1" - debug: "npm:^4.3.4" - dotenv: "npm:^16.4.5" - dotenv-expand: "npm:^11.0.6" - ejs: "npm:^3.1.8" - electron-publish: "npm:26.9.0" - fs-extra: "npm:^10.1.0" - hosted-git-info: "npm:^4.1.0" - isbinaryfile: "npm:^5.0.0" - jiti: "npm:^2.4.2" - js-yaml: "npm:^4.1.0" - json5: "npm:^2.2.3" - lazy-val: "npm:^1.0.5" - minimatch: "npm:^10.0.3" - plist: "npm:3.1.0" - proper-lockfile: "npm:^4.1.2" - resedit: "npm:^1.7.0" - semver: "npm:~7.7.3" - tar: "npm:^7.5.7" - temp-file: "npm:^3.4.0" - tiny-async-pool: "npm:1.3.0" - which: "npm:^5.0.0" - peerDependencies: - dmg-builder: 26.9.0 - electron-builder-squirrel-windows: 26.9.0 - checksum: 10c0/302ea1c88da82d38231b16425e7fe58baeff8f0ed1a9c8bf10bf5c762e779280de67b62014485098e03f3c54aded028d60c9758ea45fe141eb4c536428e6ebfe - languageName: node - linkType: hard - -"argparse@npm:^2.0.1": - version: 2.0.1 - resolution: "argparse@npm:2.0.1" - checksum: 10c0/c5640c2d89045371c7cedd6a70212a04e360fd34d6edeae32f6952c63949e3525ea77dbec0289d8213a99bbaeab5abfa860b5c12cf88a2e6cf8106e90dd27a7e - languageName: node - linkType: hard - -"array-buffer-byte-length@npm:^1.0.1, array-buffer-byte-length@npm:^1.0.2": - version: 1.0.2 - resolution: "array-buffer-byte-length@npm:1.0.2" - dependencies: - call-bound: "npm:^1.0.3" - is-array-buffer: "npm:^3.0.5" - checksum: 10c0/74e1d2d996941c7a1badda9cabb7caab8c449db9086407cad8a1b71d2604cc8abf105db8ca4e02c04579ec58b7be40279ddb09aea4784832984485499f48432d - languageName: node - linkType: hard - -"array-includes@npm:^3.1.8": - version: 3.1.8 - resolution: "array-includes@npm:3.1.8" - dependencies: - call-bind: "npm:^1.0.7" - define-properties: "npm:^1.2.1" - es-abstract: "npm:^1.23.2" - es-object-atoms: "npm:^1.0.0" - get-intrinsic: "npm:^1.2.4" - is-string: "npm:^1.0.7" - checksum: 10c0/5b1004d203e85873b96ddc493f090c9672fd6c80d7a60b798da8a14bff8a670ff95db5aafc9abc14a211943f05220dacf8ea17638ae0af1a6a47b8c0b48ce370 - languageName: node - linkType: hard - -"array.prototype.findlastindex@npm:^1.2.5": - version: 1.2.5 - resolution: "array.prototype.findlastindex@npm:1.2.5" - dependencies: - call-bind: "npm:^1.0.7" - define-properties: "npm:^1.2.1" - es-abstract: "npm:^1.23.2" - es-errors: "npm:^1.3.0" - es-object-atoms: "npm:^1.0.0" - es-shim-unscopables: "npm:^1.0.2" - checksum: 10c0/962189487728b034f3134802b421b5f39e42ee2356d13b42d2ddb0e52057ffdcc170b9524867f4f0611a6f638f4c19b31e14606e8bcbda67799e26685b195aa3 - languageName: node - linkType: hard - -"array.prototype.flat@npm:^1.3.2": - version: 1.3.3 - resolution: "array.prototype.flat@npm:1.3.3" - dependencies: - call-bind: "npm:^1.0.8" - define-properties: "npm:^1.2.1" - es-abstract: "npm:^1.23.5" - es-shim-unscopables: "npm:^1.0.2" - checksum: 10c0/d90e04dfbc43bb96b3d2248576753d1fb2298d2d972e29ca7ad5ec621f0d9e16ff8074dae647eac4f31f4fb7d3f561a7ac005fb01a71f51705a13b5af06a7d8a - languageName: node - linkType: hard - -"array.prototype.flatmap@npm:^1.3.2": - version: 1.3.3 - resolution: "array.prototype.flatmap@npm:1.3.3" - dependencies: - call-bind: "npm:^1.0.8" - define-properties: "npm:^1.2.1" - es-abstract: "npm:^1.23.5" - es-shim-unscopables: "npm:^1.0.2" - checksum: 10c0/ba899ea22b9dc9bf276e773e98ac84638ed5e0236de06f13d63a90b18ca9e0ec7c97d622d899796e3773930b946cd2413d098656c0c5d8cc58c6f25c21e6bd54 - languageName: node - linkType: hard - -"arraybuffer.prototype.slice@npm:^1.0.4": - version: 1.0.4 - resolution: "arraybuffer.prototype.slice@npm:1.0.4" - dependencies: - array-buffer-byte-length: "npm:^1.0.1" - call-bind: "npm:^1.0.8" - define-properties: "npm:^1.2.1" - es-abstract: "npm:^1.23.5" - es-errors: "npm:^1.3.0" - get-intrinsic: "npm:^1.2.6" - is-array-buffer: "npm:^3.0.4" - checksum: 10c0/2f2459caa06ae0f7f615003f9104b01f6435cc803e11bd2a655107d52a1781dc040532dc44d93026b694cc18793993246237423e13a5337e86b43ed604932c06 - languageName: node - linkType: hard - -"asap@npm:~2.0.6": - version: 2.0.6 - resolution: "asap@npm:2.0.6" - checksum: 10c0/c6d5e39fe1f15e4b87677460bd66b66050cd14c772269cee6688824c1410a08ab20254bb6784f9afb75af9144a9f9a7692d49547f4d19d715aeb7c0318f3136d - languageName: node - linkType: hard - -"assert-plus@npm:^1.0.0": - version: 1.0.0 - resolution: "assert-plus@npm:1.0.0" - checksum: 10c0/b194b9d50c3a8f872ee85ab110784911e696a4d49f7ee6fc5fb63216dedbefd2c55999c70cb2eaeb4cf4a0e0338b44e9ace3627117b5bf0d42460e9132f21b91 - languageName: node - linkType: hard - -"astral-regex@npm:^2.0.0": - version: 2.0.0 - resolution: "astral-regex@npm:2.0.0" - checksum: 10c0/f63d439cc383db1b9c5c6080d1e240bd14dae745f15d11ec5da863e182bbeca70df6c8191cffef5deba0b566ef98834610a68be79ac6379c95eeb26e1b310e25 - languageName: node - linkType: hard - -"async-exit-hook@npm:^2.0.1": - version: 2.0.1 - resolution: "async-exit-hook@npm:2.0.1" - checksum: 10c0/81407a440ef0aab328df2369f1a9d957ee53e9a5a43e3b3dcb2be05151a68de0e4ff5e927f4718c88abf85800731f5b3f69a47a6642ce135f5e7d43ca0fce41d - languageName: node - linkType: hard - -"async-function@npm:^1.0.0": - version: 1.0.0 - resolution: "async-function@npm:1.0.0" - checksum: 10c0/669a32c2cb7e45091330c680e92eaeb791bc1d4132d827591e499cd1f776ff5a873e77e5f92d0ce795a8d60f10761dec9ddfe7225a5de680f5d357f67b1aac73 - languageName: node - linkType: hard - -"async@npm:^3.2.3": - version: 3.2.6 - resolution: "async@npm:3.2.6" - checksum: 10c0/36484bb15ceddf07078688d95e27076379cc2f87b10c03b6dd8a83e89475a3c8df5848859dd06a4c95af1e4c16fc973de0171a77f18ea00be899aca2a4f85e70 - languageName: node - linkType: hard - -"asynckit@npm:^0.4.0": - version: 0.4.0 - resolution: "asynckit@npm:0.4.0" - checksum: 10c0/d73e2ddf20c4eb9337e1b3df1a0f6159481050a5de457c55b14ea2e5cb6d90bb69e004c9af54737a5ee0917fcf2c9e25de67777bbe58261847846066ba75bc9d - languageName: node - linkType: hard - -"at-least-node@npm:^1.0.0": - version: 1.0.0 - resolution: "at-least-node@npm:1.0.0" - checksum: 10c0/4c058baf6df1bc5a1697cf182e2029c58cd99975288a13f9e70068ef5d6f4e1f1fd7c4d2c3c4912eae44797d1725be9700995736deca441b39f3e66d8dee97ef - languageName: node - linkType: hard - -"available-typed-arrays@npm:^1.0.7": - version: 1.0.7 - resolution: "available-typed-arrays@npm:1.0.7" - dependencies: - possible-typed-array-names: "npm:^1.0.0" - checksum: 10c0/d07226ef4f87daa01bd0fe80f8f310982e345f372926da2e5296aecc25c41cab440916bbaa4c5e1034b453af3392f67df5961124e4b586df1e99793a1374bdb2 - languageName: node - linkType: hard - -"balanced-match@npm:^1.0.0": - version: 1.0.2 - resolution: "balanced-match@npm:1.0.2" - checksum: 10c0/9308baf0a7e4838a82bbfd11e01b1cb0f0cf2893bc1676c27c2a8c0e70cbae1c59120c3268517a8ae7fb6376b4639ef81ca22582611dbee4ed28df945134aaee - languageName: node - linkType: hard - -"base64-js@npm:^1.3.1, base64-js@npm:^1.5.1": - version: 1.5.1 - resolution: "base64-js@npm:1.5.1" - checksum: 10c0/f23823513b63173a001030fae4f2dabe283b99a9d324ade3ad3d148e218134676f1ee8568c877cd79ec1c53158dcf2d2ba527a97c606618928ba99dd930102bf - languageName: node - linkType: hard - -"bl@npm:^4.1.0": - version: 4.1.0 - resolution: "bl@npm:4.1.0" - dependencies: - buffer: "npm:^5.5.0" - inherits: "npm:^2.0.4" - readable-stream: "npm:^3.4.0" - checksum: 10c0/02847e1d2cb089c9dc6958add42e3cdeaf07d13f575973963335ac0fdece563a50ac770ac4c8fa06492d2dd276f6cc3b7f08c7cd9c7a7ad0f8d388b2a28def5f - languageName: node - linkType: hard - -"boolean@npm:^3.0.1": - version: 3.2.0 - resolution: "boolean@npm:3.2.0" - checksum: 10c0/6a0dc9668f6f3dda42a53c181fcbdad223169c8d87b6c4011b87a8b14a21770efb2934a778f063d7ece17280f8c06d313c87f7b834bb1dd526a867ffcd00febf - languageName: node - linkType: hard - -"brace-expansion@npm:^1.1.7": - version: 1.1.11 - resolution: "brace-expansion@npm:1.1.11" - dependencies: - balanced-match: "npm:^1.0.0" - concat-map: "npm:0.0.1" - checksum: 10c0/695a56cd058096a7cb71fb09d9d6a7070113c7be516699ed361317aca2ec169f618e28b8af352e02ab4233fb54eb0168460a40dc320bab0034b36ab59aaad668 - languageName: node - linkType: hard - -"brace-expansion@npm:^2.0.1": - version: 2.0.1 - resolution: "brace-expansion@npm:2.0.1" - dependencies: - balanced-match: "npm:^1.0.0" - checksum: 10c0/b358f2fe060e2d7a87aa015979ecea07f3c37d4018f8d6deb5bd4c229ad3a0384fe6029bb76cd8be63c81e516ee52d1a0673edbe2023d53a5191732ae3c3e49f - languageName: node - linkType: hard - -"braces@npm:^3.0.3": - version: 3.0.3 - resolution: "braces@npm:3.0.3" - dependencies: - fill-range: "npm:^7.1.1" - checksum: 10c0/7c6dfd30c338d2997ba77500539227b9d1f85e388a5f43220865201e407e076783d0881f2d297b9f80951b4c957fcf0b51c1d2d24227631643c3f7c284b0aa04 - languageName: node - linkType: hard - -"buffer-crc32@npm:~0.2.3": - version: 0.2.13 - resolution: "buffer-crc32@npm:0.2.13" - checksum: 10c0/cb0a8ddf5cf4f766466db63279e47761eb825693eeba6a5a95ee4ec8cb8f81ede70aa7f9d8aeec083e781d47154290eb5d4d26b3f7a465ec57fb9e7d59c47150 - languageName: node - linkType: hard - -"buffer-from@npm:^1.0.0": - version: 1.1.2 - resolution: "buffer-from@npm:1.1.2" - checksum: 10c0/124fff9d66d691a86d3b062eff4663fe437a9d9ee4b47b1b9e97f5a5d14f6d5399345db80f796827be7c95e70a8e765dd404b7c3ff3b3324f98e9b0c8826cc34 - languageName: node - linkType: hard - -"buffer@npm:^5.1.0, buffer@npm:^5.5.0": - version: 5.7.1 - resolution: "buffer@npm:5.7.1" - dependencies: - base64-js: "npm:^1.3.1" - ieee754: "npm:^1.1.13" - checksum: 10c0/27cac81cff434ed2876058d72e7c4789d11ff1120ef32c9de48f59eab58179b66710c488987d295ae89a228f835fc66d088652dffeb8e3ba8659f80eb091d55e - languageName: node - linkType: hard - -"builder-util-runtime@npm:9.6.0": - version: 9.6.0 - resolution: "builder-util-runtime@npm:9.6.0" - dependencies: - debug: "npm:^4.3.4" - sax: "npm:^1.2.4" - checksum: 10c0/e3b0b47e20dcbb5fea4b7204bcedcf5983a58159b89af4e44c49a0aa2bff79f0d52c799303532bab3decea73bbbd3f35b0b1baa6433d19d3f806e994531295cb - languageName: node - linkType: hard - -"builder-util@npm:26.9.0": - version: 26.9.0 - resolution: "builder-util@npm:26.9.0" - dependencies: - 7zip-bin: "npm:~5.2.0" - "@types/debug": "npm:^4.1.6" - app-builder-bin: "npm:5.0.0-alpha.12" - builder-util-runtime: "npm:9.6.0" - chalk: "npm:^4.1.2" - cross-spawn: "npm:^7.0.6" - debug: "npm:^4.3.4" - fs-extra: "npm:^10.1.0" - http-proxy-agent: "npm:^7.0.0" - https-proxy-agent: "npm:^7.0.0" - js-yaml: "npm:^4.1.0" - sanitize-filename: "npm:^1.6.3" - source-map-support: "npm:^0.5.19" - stat-mode: "npm:^1.0.0" - temp-file: "npm:^3.4.0" - tiny-async-pool: "npm:1.3.0" - checksum: 10c0/72af72a97d1e4b5140cded2d498c4bb52c1ab98f9ca6677126130f8067ed48364d641a249b1c75fa033b397c892a55c40728723040f30fa11d34c8ffb188607d - languageName: node - linkType: hard - -"cacache@npm:^19.0.1": - version: 19.0.1 - resolution: "cacache@npm:19.0.1" - dependencies: - "@npmcli/fs": "npm:^4.0.0" - fs-minipass: "npm:^3.0.0" - glob: "npm:^10.2.2" - lru-cache: "npm:^10.0.1" - minipass: "npm:^7.0.3" - minipass-collect: "npm:^2.0.1" - minipass-flush: "npm:^1.0.5" - minipass-pipeline: "npm:^1.2.4" - p-map: "npm:^7.0.2" - ssri: "npm:^12.0.0" - tar: "npm:^7.4.3" - unique-filename: "npm:^4.0.0" - checksum: 10c0/01f2134e1bd7d3ab68be851df96c8d63b492b1853b67f2eecb2c37bb682d37cb70bb858a16f2f0554d3c0071be6dfe21456a1ff6fa4b7eed996570d6a25ffe9c - languageName: node - linkType: hard - -"cacheable-lookup@npm:^5.0.3": - version: 5.0.4 - resolution: "cacheable-lookup@npm:5.0.4" - checksum: 10c0/a6547fb4954b318aa831cbdd2f7b376824bc784fb1fa67610e4147099e3074726072d9af89f12efb69121415a0e1f2918a8ddd4aafcbcf4e91fbeef4a59cd42c - languageName: node - linkType: hard - -"cacheable-request@npm:^7.0.2": - version: 7.0.4 - resolution: "cacheable-request@npm:7.0.4" - dependencies: - clone-response: "npm:^1.0.2" - get-stream: "npm:^5.1.0" - http-cache-semantics: "npm:^4.0.0" - keyv: "npm:^4.0.0" - lowercase-keys: "npm:^2.0.0" - normalize-url: "npm:^6.0.1" - responselike: "npm:^2.0.0" - checksum: 10c0/0834a7d17ae71a177bc34eab06de112a43f9b5ad05ebe929bec983d890a7d9f2bc5f1aa8bb67ea2b65e07a3bc74bea35fa62dd36dbac52876afe36fdcf83da41 - languageName: node - linkType: hard - -"call-bind-apply-helpers@npm:^1.0.0, call-bind-apply-helpers@npm:^1.0.1": - version: 1.0.1 - resolution: "call-bind-apply-helpers@npm:1.0.1" - dependencies: - es-errors: "npm:^1.3.0" - function-bind: "npm:^1.1.2" - checksum: 10c0/acb2ab68bf2718e68a3e895f0d0b73ccc9e45b9b6f210f163512ba76f91dab409eb8792f6dae188356f9095747512a3101646b3dea9d37fb8c7c6bf37796d18c - languageName: node - linkType: hard - -"call-bind@npm:^1.0.7, call-bind@npm:^1.0.8": - version: 1.0.8 - resolution: "call-bind@npm:1.0.8" - dependencies: - call-bind-apply-helpers: "npm:^1.0.0" - es-define-property: "npm:^1.0.0" - get-intrinsic: "npm:^1.2.4" - set-function-length: "npm:^1.2.2" - checksum: 10c0/a13819be0681d915144467741b69875ae5f4eba8961eb0bf322aab63ec87f8250eb6d6b0dcbb2e1349876412a56129ca338592b3829ef4343527f5f18a0752d4 - languageName: node - linkType: hard - -"call-bound@npm:^1.0.2, call-bound@npm:^1.0.3": - version: 1.0.3 - resolution: "call-bound@npm:1.0.3" - dependencies: - call-bind-apply-helpers: "npm:^1.0.1" - get-intrinsic: "npm:^1.2.6" - checksum: 10c0/45257b8e7621067304b30dbd638e856cac913d31e8e00a80d6cf172911acd057846572d0b256b45e652d515db6601e2974a1b1a040e91b4fc36fb3dd86fa69cf - languageName: node - linkType: hard - -"callsites@npm:^3.0.0": - version: 3.1.0 - resolution: "callsites@npm:3.1.0" - checksum: 10c0/fff92277400eb06c3079f9e74f3af120db9f8ea03bad0e84d9aede54bbe2d44a56cccb5f6cf12211f93f52306df87077ecec5b712794c5a9b5dac6d615a3f301 - languageName: node - linkType: hard - -"chalk@npm:^4.0.0, chalk@npm:^4.0.2, chalk@npm:^4.1.0, chalk@npm:^4.1.1, chalk@npm:^4.1.2": - version: 4.1.2 - resolution: "chalk@npm:4.1.2" - dependencies: - ansi-styles: "npm:^4.1.0" - supports-color: "npm:^7.1.0" - checksum: 10c0/4a3fef5cc34975c898ffe77141450f679721df9dde00f6c304353fa9c8b571929123b26a0e4617bde5018977eb655b31970c297b91b63ee83bb82aeb04666880 - languageName: node - linkType: hard - -"chipmunk@workspace:.": - version: 0.0.0-use.local - resolution: "chipmunk@workspace:." - dependencies: - "@types/mime-types": "npm:^3.0.1" - "@types/module-alias": "npm:^2.0.2" - "@types/node": "npm:^22.10.10" - "@types/request": "npm:^2.48.8" - "@types/semver": "npm:^7.5.3" - "@types/uuid": "npm:^10.0.0" - "@typescript-eslint/eslint-plugin": "npm:^8.21.0" - "@typescript-eslint/parser": "npm:^8.21.0" - commander: "npm:^13.1.0" - dotenv: "npm:^16.4.7" - dotnet: "npm:^1.1.4" - electron: "npm:^34.0.1" - electron-builder: "npm:26.9.0" - eslint: "npm:^9.18.0" - eslint-plugin-import: "npm:^2.31.0" - eslint-plugin-node: "npm:^11.1.0" - eslint-plugin-promise: "npm:^7.2.1" - glob: "npm:^11.0.1" - http-proxy-agent: "npm:^7.0.2" - https-proxy-agent: "npm:^7.0.6" - mime-types: "npm:^3.0.1" - module-alias: "npm:^2.2.3" - moment-timezone: "npm:^0.5.46" - platform: "link:../platform" - rustcore: "link:../apps/rustcore/ts-bindings" - semver: "npm:^7.5.2" - sudo-prompt: "npm:^9.2.1" - tslib: "npm:^2.8.1" - typescript: "npm:^5.7.3" - uuid: "npm:^11.0.5" - languageName: unknown - linkType: soft - -"chownr@npm:^3.0.0": - version: 3.0.0 - resolution: "chownr@npm:3.0.0" - checksum: 10c0/43925b87700f7e3893296c8e9c56cc58f926411cce3a6e5898136daaf08f08b9a8eb76d37d3267e707d0dcc17aed2e2ebdf5848c0c3ce95cf910a919935c1b10 - languageName: node - linkType: hard - -"chromium-pickle-js@npm:^0.2.0": - version: 0.2.0 - resolution: "chromium-pickle-js@npm:0.2.0" - checksum: 10c0/0a95bd280acdf05b0e08fa1a0e1db58c815dd24e92d639add8f494d23a8a49c26e4829721224d68f2f0e57a69047714db29bcff6deb5d029332321223416cb29 - languageName: node - linkType: hard - -"ci-info@npm:4.3.1": - version: 4.3.1 - resolution: "ci-info@npm:4.3.1" - checksum: 10c0/7dd82000f514d76ddfe7775e4cb0d66e5c638f5fa0e2a3be29557e898da0d32ac04f231217d414d07fb968b1fbc6d980ee17ddde0d2c516f23da9cfff608f6c1 - languageName: node - linkType: hard - -"ci-info@npm:^4.2.0": - version: 4.4.0 - resolution: "ci-info@npm:4.4.0" - checksum: 10c0/44156201545b8dde01aa8a09ee2fe9fc7a73b1bef9adbd4606c9f61c8caeeb73fb7a575c88b0443f7b4edb5ee45debaa59ed54ba5f99698339393ca01349eb3a - languageName: node - linkType: hard - -"cli-cursor@npm:^3.1.0": - version: 3.1.0 - resolution: "cli-cursor@npm:3.1.0" - dependencies: - restore-cursor: "npm:^3.1.0" - checksum: 10c0/92a2f98ff9037d09be3dfe1f0d749664797fb674bf388375a2207a1203b69d41847abf16434203e0089212479e47a358b13a0222ab9fccfe8e2644a7ccebd111 - languageName: node - linkType: hard - -"cli-spinners@npm:^2.5.0": - version: 2.9.2 - resolution: "cli-spinners@npm:2.9.2" - checksum: 10c0/907a1c227ddf0d7a101e7ab8b300affc742ead4b4ebe920a5bf1bc6d45dce2958fcd195eb28fa25275062fe6fa9b109b93b63bc8033396ed3bcb50297008b3a3 - languageName: node - linkType: hard - -"cli-truncate@npm:^2.1.0": - version: 2.1.0 - resolution: "cli-truncate@npm:2.1.0" - dependencies: - slice-ansi: "npm:^3.0.0" - string-width: "npm:^4.2.0" - checksum: 10c0/dfaa3df675bcef7a3254773de768712b590250420345a4c7ac151f041a4bacb4c25864b1377bee54a39b5925a030c00eabf014e312e3a4ac130952ed3b3879e9 - languageName: node - linkType: hard - -"cliui@npm:^8.0.1": - version: 8.0.1 - resolution: "cliui@npm:8.0.1" - dependencies: - string-width: "npm:^4.2.0" - strip-ansi: "npm:^6.0.1" - wrap-ansi: "npm:^7.0.0" - checksum: 10c0/4bda0f09c340cbb6dfdc1ed508b3ca080f12992c18d68c6be4d9cf51756033d5266e61ec57529e610dacbf4da1c634423b0c1b11037709cc6b09045cbd815df5 - languageName: node - linkType: hard - -"clone-response@npm:^1.0.2": - version: 1.0.3 - resolution: "clone-response@npm:1.0.3" - dependencies: - mimic-response: "npm:^1.0.0" - checksum: 10c0/06a2b611824efb128810708baee3bd169ec9a1bf5976a5258cd7eb3f7db25f00166c6eee5961f075c7e38e194f373d4fdf86b8166ad5b9c7e82bbd2e333a6087 - languageName: node - linkType: hard - -"clone@npm:^1.0.2": - version: 1.0.4 - resolution: "clone@npm:1.0.4" - checksum: 10c0/2176952b3649293473999a95d7bebfc9dc96410f6cbd3d2595cf12fd401f63a4bf41a7adbfd3ab2ff09ed60cb9870c58c6acdd18b87767366fabfc163700f13b - languageName: node - linkType: hard - -"color-convert@npm:^2.0.1": - version: 2.0.1 - resolution: "color-convert@npm:2.0.1" - dependencies: - color-name: "npm:~1.1.4" - checksum: 10c0/37e1150172f2e311fe1b2df62c6293a342ee7380da7b9cfdba67ea539909afbd74da27033208d01d6d5cfc65ee7868a22e18d7e7648e004425441c0f8a15a7d7 - languageName: node - linkType: hard - -"color-name@npm:~1.1.4": - version: 1.1.4 - resolution: "color-name@npm:1.1.4" - checksum: 10c0/a1a3f914156960902f46f7f56bc62effc6c94e84b2cae157a526b1c1f74b677a47ec602bf68a61abfa2b42d15b7c5651c6dbe72a43af720bc588dff885b10f95 - languageName: node - linkType: hard - -"combined-stream@npm:^1.0.6, combined-stream@npm:^1.0.8": - version: 1.0.8 - resolution: "combined-stream@npm:1.0.8" - dependencies: - delayed-stream: "npm:~1.0.0" - checksum: 10c0/0dbb829577e1b1e839fa82b40c07ffaf7de8a09b935cadd355a73652ae70a88b4320db322f6634a4ad93424292fa80973ac6480986247f1734a1137debf271d5 - languageName: node - linkType: hard - -"commander@npm:*, commander@npm:^13.1.0": - version: 13.1.0 - resolution: "commander@npm:13.1.0" - checksum: 10c0/7b8c5544bba704fbe84b7cab2e043df8586d5c114a4c5b607f83ae5060708940ed0b5bd5838cf8ce27539cde265c1cbd59ce3c8c6b017ed3eec8943e3a415164 - languageName: node - linkType: hard - -"commander@npm:^5.0.0": - version: 5.1.0 - resolution: "commander@npm:5.1.0" - checksum: 10c0/da9d71dbe4ce039faf1fe9eac3771dca8c11d66963341f62602f7b66e36d2a3f8883407af4f9a37b1db1a55c59c0c1325f186425764c2e963dc1d67aec2a4b6d - languageName: node - linkType: hard - -"compare-version@npm:^0.1.2": - version: 0.1.2 - resolution: "compare-version@npm:0.1.2" - checksum: 10c0/f38b853cf0d244c0af5f444409abde3d2198cd97312efa1dbc4ab41b520009327c2a63db59bbaf2d69288eff6167ef22be9788dc5476157d073ecdff1a8eeb2d - languageName: node - linkType: hard - -"concat-map@npm:0.0.1": - version: 0.0.1 - resolution: "concat-map@npm:0.0.1" - checksum: 10c0/c996b1cfdf95b6c90fee4dae37e332c8b6eb7d106430c17d538034c0ad9a1630cb194d2ab37293b1bdd4d779494beee7786d586a50bd9376fd6f7bcc2bd4c98f - languageName: node - linkType: hard - -"core-util-is@npm:1.0.2": - version: 1.0.2 - resolution: "core-util-is@npm:1.0.2" - checksum: 10c0/980a37a93956d0de8a828ce508f9b9e3317039d68922ca79995421944146700e4aaf490a6dbfebcb1c5292a7184600c7710b957d724be1e37b8254c6bc0fe246 - languageName: node - linkType: hard - -"crc@npm:^3.8.0": - version: 3.8.0 - resolution: "crc@npm:3.8.0" - dependencies: - buffer: "npm:^5.1.0" - checksum: 10c0/1a0da36e5f95b19cd2a7b2eab5306a08f1c47bdd22da6f761ab764e2222e8e90a877398907cea94108bd5e41a6d311ea84d7914eaca67da2baa4050bd6384b3d - languageName: node - linkType: hard - -"cross-spawn@npm:^7.0.0, cross-spawn@npm:^7.0.1, cross-spawn@npm:^7.0.6": - version: 7.0.6 - resolution: "cross-spawn@npm:7.0.6" - dependencies: - path-key: "npm:^3.1.0" - shebang-command: "npm:^2.0.0" - which: "npm:^2.0.1" - checksum: 10c0/053ea8b2135caff68a9e81470e845613e374e7309a47731e81639de3eaeb90c3d01af0e0b44d2ab9d50b43467223b88567dfeb3262db942dc063b9976718ffc1 - languageName: node - linkType: hard - -"data-view-buffer@npm:^1.0.2": - version: 1.0.2 - resolution: "data-view-buffer@npm:1.0.2" - dependencies: - call-bound: "npm:^1.0.3" - es-errors: "npm:^1.3.0" - is-data-view: "npm:^1.0.2" - checksum: 10c0/7986d40fc7979e9e6241f85db8d17060dd9a71bd53c894fa29d126061715e322a4cd47a00b0b8c710394854183d4120462b980b8554012acc1c0fa49df7ad38c - languageName: node - linkType: hard - -"data-view-byte-length@npm:^1.0.2": - version: 1.0.2 - resolution: "data-view-byte-length@npm:1.0.2" - dependencies: - call-bound: "npm:^1.0.3" - es-errors: "npm:^1.3.0" - is-data-view: "npm:^1.0.2" - checksum: 10c0/f8a4534b5c69384d95ac18137d381f18a5cfae1f0fc1df0ef6feef51ef0d568606d970b69e02ea186c6c0f0eac77fe4e6ad96fec2569cc86c3afcc7475068c55 - languageName: node - linkType: hard - -"data-view-byte-offset@npm:^1.0.1": - version: 1.0.1 - resolution: "data-view-byte-offset@npm:1.0.1" - dependencies: - call-bound: "npm:^1.0.2" - es-errors: "npm:^1.3.0" - is-data-view: "npm:^1.0.1" - checksum: 10c0/fa7aa40078025b7810dcffc16df02c480573b7b53ef1205aa6a61533011005c1890e5ba17018c692ce7c900212b547262d33279fde801ad9843edc0863bf78c4 - languageName: node - linkType: hard - -"debug@npm:4, debug@npm:^4.1.0, debug@npm:^4.1.1, debug@npm:^4.3.1, debug@npm:^4.3.2, debug@npm:^4.3.4": - version: 4.4.0 - resolution: "debug@npm:4.4.0" - dependencies: - ms: "npm:^2.1.3" - peerDependenciesMeta: - supports-color: - optional: true - checksum: 10c0/db94f1a182bf886f57b4755f85b3a74c39b5114b9377b7ab375dc2cfa3454f09490cc6c30f829df3fc8042bc8b8995f6567ce5cd96f3bc3688bd24027197d9de - languageName: node - linkType: hard - -"debug@npm:^3.2.7": - version: 3.2.7 - resolution: "debug@npm:3.2.7" - dependencies: - ms: "npm:^2.1.1" - checksum: 10c0/37d96ae42cbc71c14844d2ae3ba55adf462ec89fd3a999459dec3833944cd999af6007ff29c780f1c61153bcaaf2c842d1e4ce1ec621e4fc4923244942e4a02a - languageName: node - linkType: hard - -"decompress-response@npm:^6.0.0": - version: 6.0.0 - resolution: "decompress-response@npm:6.0.0" - dependencies: - mimic-response: "npm:^3.1.0" - checksum: 10c0/bd89d23141b96d80577e70c54fb226b2f40e74a6817652b80a116d7befb8758261ad073a8895648a29cc0a5947021ab66705cb542fa9c143c82022b27c5b175e - languageName: node - linkType: hard - -"deep-is@npm:^0.1.3": - version: 0.1.4 - resolution: "deep-is@npm:0.1.4" - checksum: 10c0/7f0ee496e0dff14a573dc6127f14c95061b448b87b995fc96c017ce0a1e66af1675e73f1d6064407975bc4ea6ab679497a29fff7b5b9c4e99cb10797c1ad0b4c - languageName: node - linkType: hard - -"defaults@npm:^1.0.3": - version: 1.0.4 - resolution: "defaults@npm:1.0.4" - dependencies: - clone: "npm:^1.0.2" - checksum: 10c0/9cfbe498f5c8ed733775db62dfd585780387d93c17477949e1670bfcfb9346e0281ce8c4bf9f4ac1fc0f9b851113bd6dc9e41182ea1644ccd97de639fa13c35a - languageName: node - linkType: hard - -"defer-to-connect@npm:^2.0.0": - version: 2.0.1 - resolution: "defer-to-connect@npm:2.0.1" - checksum: 10c0/625ce28e1b5ad10cf77057b9a6a727bf84780c17660f6644dab61dd34c23de3001f03cedc401f7d30a4ed9965c2e8a7336e220a329146f2cf85d4eddea429782 - languageName: node - linkType: hard - -"define-data-property@npm:^1.0.1, define-data-property@npm:^1.1.4": - version: 1.1.4 - resolution: "define-data-property@npm:1.1.4" - dependencies: - es-define-property: "npm:^1.0.0" - es-errors: "npm:^1.3.0" - gopd: "npm:^1.0.1" - checksum: 10c0/dea0606d1483eb9db8d930d4eac62ca0fa16738b0b3e07046cddfacf7d8c868bbe13fa0cb263eb91c7d0d527960dc3f2f2471a69ed7816210307f6744fe62e37 - languageName: node - linkType: hard - -"define-properties@npm:^1.2.1": - version: 1.2.1 - resolution: "define-properties@npm:1.2.1" - dependencies: - define-data-property: "npm:^1.0.1" - has-property-descriptors: "npm:^1.0.0" - object-keys: "npm:^1.1.1" - checksum: 10c0/88a152319ffe1396ccc6ded510a3896e77efac7a1bfbaa174a7b00414a1747377e0bb525d303794a47cf30e805c2ec84e575758512c6e44a993076d29fd4e6c3 - languageName: node - linkType: hard - -"delayed-stream@npm:~1.0.0": - version: 1.0.0 - resolution: "delayed-stream@npm:1.0.0" - checksum: 10c0/d758899da03392e6712f042bec80aa293bbe9e9ff1b2634baae6a360113e708b91326594c8a486d475c69d6259afb7efacdc3537bfcda1c6c648e390ce601b19 - languageName: node - linkType: hard - -"detect-libc@npm:^2.0.1": - version: 2.1.2 - resolution: "detect-libc@npm:2.1.2" - checksum: 10c0/acc675c29a5649fa1fb6e255f993b8ee829e510b6b56b0910666949c80c364738833417d0edb5f90e4e46be17228b0f2b66a010513984e18b15deeeac49369c4 - languageName: node - linkType: hard - -"detect-node@npm:^2.0.4": - version: 2.1.0 - resolution: "detect-node@npm:2.1.0" - checksum: 10c0/f039f601790f2e9d4654e499913259a798b1f5246ae24f86ab5e8bd4aaf3bce50484234c494f11fb00aecb0c6e2733aa7b1cf3f530865640b65fbbd65b2c4e09 - languageName: node - linkType: hard - -"dir-compare@npm:^4.2.0": - version: 4.2.0 - resolution: "dir-compare@npm:4.2.0" - dependencies: - minimatch: "npm:^3.0.5" - p-limit: "npm:^3.1.0 " - checksum: 10c0/615c6f6804095f912d98d49f9b56798ceebbc83612d660b7faa6bdb4894d978c02cfa1a30853a7319a269141e4f2a2034d4988a1985b58382614a3942f94e5b2 - languageName: node - linkType: hard - -"dmg-builder@npm:26.9.0": - version: 26.9.0 - resolution: "dmg-builder@npm:26.9.0" - dependencies: - app-builder-lib: "npm:26.9.0" - builder-util: "npm:26.9.0" - dmg-license: "npm:^1.0.11" - fs-extra: "npm:^10.1.0" - iconv-lite: "npm:^0.6.2" - js-yaml: "npm:^4.1.0" - dependenciesMeta: - dmg-license: - optional: true - checksum: 10c0/eb62a9bd380e2251032370ceee120fdef248ed06fb626be8eebc189c2bd788bb7ae49c8d95ce8f26f580582352bcbd536d27b8f9095b3cae1da788e2f5a185aa - languageName: node - linkType: hard - -"dmg-license@npm:^1.0.11": - version: 1.0.11 - resolution: "dmg-license@npm:1.0.11" - dependencies: - "@types/plist": "npm:^3.0.1" - "@types/verror": "npm:^1.10.3" - ajv: "npm:^6.10.0" - crc: "npm:^3.8.0" - iconv-corefoundation: "npm:^1.1.7" - plist: "npm:^3.0.4" - smart-buffer: "npm:^4.0.2" - verror: "npm:^1.10.0" - bin: - dmg-license: bin/dmg-license.js - conditions: os=darwin - languageName: node - linkType: hard - -"doctrine@npm:^2.1.0": - version: 2.1.0 - resolution: "doctrine@npm:2.1.0" - dependencies: - esutils: "npm:^2.0.2" - checksum: 10c0/b6416aaff1f380bf56c3b552f31fdf7a69b45689368deca72d28636f41c16bb28ec3ebc40ace97db4c1afc0ceeb8120e8492fe0046841c94c2933b2e30a7d5ac - languageName: node - linkType: hard - -"dotenv-expand@npm:^11.0.6": - version: 11.0.7 - resolution: "dotenv-expand@npm:11.0.7" - dependencies: - dotenv: "npm:^16.4.5" - checksum: 10c0/d80b8a7be085edf351270b96ac0e794bc3ddd7f36157912939577cb4d33ba6492ebee349d59798b71b90e36f498d24a2a564fb4aa00073b2ef4c2a3a49c467b1 - languageName: node - linkType: hard - -"dotenv@npm:^16.4.5": - version: 16.6.1 - resolution: "dotenv@npm:16.6.1" - checksum: 10c0/15ce56608326ea0d1d9414a5c8ee6dcf0fffc79d2c16422b4ac2268e7e2d76ff5a572d37ffe747c377de12005f14b3cc22361e79fc7f1061cce81f77d2c973dc - languageName: node - linkType: hard - -"dotenv@npm:^16.4.7": - version: 16.4.7 - resolution: "dotenv@npm:16.4.7" - checksum: 10c0/be9f597e36a8daf834452daa1f4cc30e5375a5968f98f46d89b16b983c567398a330580c88395069a77473943c06b877d1ca25b4afafcdd6d4adb549e8293462 - languageName: node - linkType: hard - -"dotnet@npm:^1.1.4": - version: 1.1.4 - resolution: "dotnet@npm:1.1.4" - dependencies: - commander: "npm:*" - minimist: "npm:*" - promise: "npm:*" - checksum: 10c0/21872b69fb6004384a79802b04632dcd6ce1b2897102a40b6847ab583318b8c0c6c1da8857df6feb05ddc47fb5ff999a187f7bdf7e52c35b482f678d8c73d299 - languageName: node - linkType: hard - -"dunder-proto@npm:^1.0.0, dunder-proto@npm:^1.0.1": - version: 1.0.1 - resolution: "dunder-proto@npm:1.0.1" - dependencies: - call-bind-apply-helpers: "npm:^1.0.1" - es-errors: "npm:^1.3.0" - gopd: "npm:^1.2.0" - checksum: 10c0/199f2a0c1c16593ca0a145dbf76a962f8033ce3129f01284d48c45ed4e14fea9bbacd7b3610b6cdc33486cef20385ac054948fefc6272fcce645c09468f93031 - languageName: node - linkType: hard - -"eastasianwidth@npm:^0.2.0": - version: 0.2.0 - resolution: "eastasianwidth@npm:0.2.0" - checksum: 10c0/26f364ebcdb6395f95124fda411f63137a4bfb5d3a06453f7f23dfe52502905bd84e0488172e0f9ec295fdc45f05c23d5d91baf16bd26f0fe9acd777a188dc39 - languageName: node - linkType: hard - -"ejs@npm:^3.1.8": - version: 3.1.10 - resolution: "ejs@npm:3.1.10" - dependencies: - jake: "npm:^10.8.5" - bin: - ejs: bin/cli.js - checksum: 10c0/52eade9e68416ed04f7f92c492183340582a36482836b11eab97b159fcdcfdedc62233a1bf0bf5e5e1851c501f2dca0e2e9afd111db2599e4e7f53ee29429ae1 - languageName: node - linkType: hard - -"electron-builder@npm:26.9.0": - version: 26.9.0 - resolution: "electron-builder@npm:26.9.0" - dependencies: - app-builder-lib: "npm:26.9.0" - builder-util: "npm:26.9.0" - builder-util-runtime: "npm:9.6.0" - chalk: "npm:^4.1.2" - ci-info: "npm:^4.2.0" - dmg-builder: "npm:26.9.0" - fs-extra: "npm:^10.1.0" - lazy-val: "npm:^1.0.5" - simple-update-notifier: "npm:2.0.0" - yargs: "npm:^17.6.2" - bin: - electron-builder: cli.js - install-app-deps: install-app-deps.js - checksum: 10c0/6590ad90686e779dcdb8d2208c7518db45fc2754afaa15c1c154fa8eaad5445f267228d9aa235489220bc11d82235621f05e467b342621dfca6209e777bbb426 - languageName: node - linkType: hard - -"electron-publish@npm:26.9.0": - version: 26.9.0 - resolution: "electron-publish@npm:26.9.0" - dependencies: - "@types/fs-extra": "npm:^9.0.11" - builder-util: "npm:26.9.0" - builder-util-runtime: "npm:9.6.0" - chalk: "npm:^4.1.2" - form-data: "npm:^4.0.5" - fs-extra: "npm:^10.1.0" - lazy-val: "npm:^1.0.5" - mime: "npm:^2.5.2" - checksum: 10c0/9b28bcb78471f033bd552cdac712268e70ac33d1cff6f9365d775e55c2c46082d29d5207acdf9edfee5428be62e1388b8fde19310ea9e637d045fbab00e3b5c4 - languageName: node - linkType: hard - -"electron@npm:^34.0.1": - version: 34.0.1 - resolution: "electron@npm:34.0.1" - dependencies: - "@electron/get": "npm:^2.0.0" - "@types/node": "npm:^20.9.0" - extract-zip: "npm:^2.0.1" - bin: - electron: cli.js - checksum: 10c0/0a63edd57633edac8e4f4d1310dbb82ac01287f1f9113a18cef310dfef7f266ef8be98eda7d01890e23b37d03f36811bbac0fe5c4e0a27c9f3719ba3b7841f83 - languageName: node - linkType: hard - -"emoji-regex@npm:^8.0.0": - version: 8.0.0 - resolution: "emoji-regex@npm:8.0.0" - checksum: 10c0/b6053ad39951c4cf338f9092d7bfba448cdfd46fe6a2a034700b149ac9ffbc137e361cbd3c442297f86bed2e5f7576c1b54cc0a6bf8ef5106cc62f496af35010 - languageName: node - linkType: hard - -"emoji-regex@npm:^9.2.2": - version: 9.2.2 - resolution: "emoji-regex@npm:9.2.2" - checksum: 10c0/af014e759a72064cf66e6e694a7fc6b0ed3d8db680427b021a89727689671cefe9d04151b2cad51dbaf85d5ba790d061cd167f1cf32eb7b281f6368b3c181639 - languageName: node - linkType: hard - -"encoding@npm:^0.1.13": - version: 0.1.13 - resolution: "encoding@npm:0.1.13" - dependencies: - iconv-lite: "npm:^0.6.2" - checksum: 10c0/36d938712ff00fe1f4bac88b43bcffb5930c1efa57bbcdca9d67e1d9d6c57cfb1200fb01efe0f3109b2ce99b231f90779532814a81370a1bd3274a0f58585039 - languageName: node - linkType: hard - -"end-of-stream@npm:^1.1.0": - version: 1.4.4 - resolution: "end-of-stream@npm:1.4.4" - dependencies: - once: "npm:^1.4.0" - checksum: 10c0/870b423afb2d54bb8d243c63e07c170409d41e20b47eeef0727547aea5740bd6717aca45597a9f2745525667a6b804c1e7bede41f856818faee5806dd9ff3975 - languageName: node - linkType: hard - -"env-paths@npm:^2.2.0": - version: 2.2.1 - resolution: "env-paths@npm:2.2.1" - checksum: 10c0/285325677bf00e30845e330eec32894f5105529db97496ee3f598478e50f008c5352a41a30e5e72ec9de8a542b5a570b85699cd63bd2bc646dbcb9f311d83bc4 - languageName: node - linkType: hard - -"err-code@npm:^2.0.2": - version: 2.0.3 - resolution: "err-code@npm:2.0.3" - checksum: 10c0/b642f7b4dd4a376e954947550a3065a9ece6733ab8e51ad80db727aaae0817c2e99b02a97a3d6cecc648a97848305e728289cf312d09af395403a90c9d4d8a66 - languageName: node - linkType: hard - -"es-abstract@npm:^1.23.2, es-abstract@npm:^1.23.5, es-abstract@npm:^1.23.9": - version: 1.23.9 - resolution: "es-abstract@npm:1.23.9" - dependencies: - array-buffer-byte-length: "npm:^1.0.2" - arraybuffer.prototype.slice: "npm:^1.0.4" - available-typed-arrays: "npm:^1.0.7" - call-bind: "npm:^1.0.8" - call-bound: "npm:^1.0.3" - data-view-buffer: "npm:^1.0.2" - data-view-byte-length: "npm:^1.0.2" - data-view-byte-offset: "npm:^1.0.1" - es-define-property: "npm:^1.0.1" - es-errors: "npm:^1.3.0" - es-object-atoms: "npm:^1.0.0" - es-set-tostringtag: "npm:^2.1.0" - es-to-primitive: "npm:^1.3.0" - function.prototype.name: "npm:^1.1.8" - get-intrinsic: "npm:^1.2.7" - get-proto: "npm:^1.0.0" - get-symbol-description: "npm:^1.1.0" - globalthis: "npm:^1.0.4" - gopd: "npm:^1.2.0" - has-property-descriptors: "npm:^1.0.2" - has-proto: "npm:^1.2.0" - has-symbols: "npm:^1.1.0" - hasown: "npm:^2.0.2" - internal-slot: "npm:^1.1.0" - is-array-buffer: "npm:^3.0.5" - is-callable: "npm:^1.2.7" - is-data-view: "npm:^1.0.2" - is-regex: "npm:^1.2.1" - is-shared-array-buffer: "npm:^1.0.4" - is-string: "npm:^1.1.1" - is-typed-array: "npm:^1.1.15" - is-weakref: "npm:^1.1.0" - math-intrinsics: "npm:^1.1.0" - object-inspect: "npm:^1.13.3" - object-keys: "npm:^1.1.1" - object.assign: "npm:^4.1.7" - own-keys: "npm:^1.0.1" - regexp.prototype.flags: "npm:^1.5.3" - safe-array-concat: "npm:^1.1.3" - safe-push-apply: "npm:^1.0.0" - safe-regex-test: "npm:^1.1.0" - set-proto: "npm:^1.0.0" - string.prototype.trim: "npm:^1.2.10" - string.prototype.trimend: "npm:^1.0.9" - string.prototype.trimstart: "npm:^1.0.8" - typed-array-buffer: "npm:^1.0.3" - typed-array-byte-length: "npm:^1.0.3" - typed-array-byte-offset: "npm:^1.0.4" - typed-array-length: "npm:^1.0.7" - unbox-primitive: "npm:^1.1.0" - which-typed-array: "npm:^1.1.18" - checksum: 10c0/1de229c9e08fe13c17fe5abaec8221545dfcd57e51f64909599a6ae896df84b8fd2f7d16c60cb00d7bf495b9298ca3581aded19939d4b7276854a4b066f8422b - languageName: node - linkType: hard - -"es-define-property@npm:^1.0.0, es-define-property@npm:^1.0.1": - version: 1.0.1 - resolution: "es-define-property@npm:1.0.1" - checksum: 10c0/3f54eb49c16c18707949ff25a1456728c883e81259f045003499efba399c08bad00deebf65cccde8c0e07908c1a225c9d472b7107e558f2a48e28d530e34527c - languageName: node - linkType: hard - -"es-errors@npm:^1.3.0": - version: 1.3.0 - resolution: "es-errors@npm:1.3.0" - checksum: 10c0/0a61325670072f98d8ae3b914edab3559b6caa980f08054a3b872052640d91da01d38df55df797fcc916389d77fc92b8d5906cf028f4db46d7e3003abecbca85 - languageName: node - linkType: hard - -"es-object-atoms@npm:^1.0.0": - version: 1.1.1 - resolution: "es-object-atoms@npm:1.1.1" - dependencies: - es-errors: "npm:^1.3.0" - checksum: 10c0/65364812ca4daf48eb76e2a3b7a89b3f6a2e62a1c420766ce9f692665a29d94fe41fe88b65f24106f449859549711e4b40d9fb8002d862dfd7eb1c512d10be0c - languageName: node - linkType: hard - -"es-set-tostringtag@npm:^2.1.0": - version: 2.1.0 - resolution: "es-set-tostringtag@npm:2.1.0" - dependencies: - es-errors: "npm:^1.3.0" - get-intrinsic: "npm:^1.2.6" - has-tostringtag: "npm:^1.0.2" - hasown: "npm:^2.0.2" - checksum: 10c0/ef2ca9ce49afe3931cb32e35da4dcb6d86ab02592cfc2ce3e49ced199d9d0bb5085fc7e73e06312213765f5efa47cc1df553a6a5154584b21448e9fb8355b1af - languageName: node - linkType: hard - -"es-shim-unscopables@npm:^1.0.2": - version: 1.0.2 - resolution: "es-shim-unscopables@npm:1.0.2" - dependencies: - hasown: "npm:^2.0.0" - checksum: 10c0/f495af7b4b7601a4c0cfb893581c352636e5c08654d129590386a33a0432cf13a7bdc7b6493801cadd990d838e2839b9013d1de3b880440cb537825e834fe783 - languageName: node - linkType: hard - -"es-to-primitive@npm:^1.3.0": - version: 1.3.0 - resolution: "es-to-primitive@npm:1.3.0" - dependencies: - is-callable: "npm:^1.2.7" - is-date-object: "npm:^1.0.5" - is-symbol: "npm:^1.0.4" - checksum: 10c0/c7e87467abb0b438639baa8139f701a06537d2b9bc758f23e8622c3b42fd0fdb5bde0f535686119e446dd9d5e4c0f238af4e14960f4771877cf818d023f6730b - languageName: node - linkType: hard - -"es6-error@npm:^4.1.1": - version: 4.1.1 - resolution: "es6-error@npm:4.1.1" - checksum: 10c0/357663fb1e845c047d548c3d30f86e005db71e122678f4184ced0693f634688c3f3ef2d7de7d4af732f734de01f528b05954e270f06aa7d133679fb9fe6600ef - languageName: node - linkType: hard - -"escalade@npm:^3.1.1": - version: 3.2.0 - resolution: "escalade@npm:3.2.0" - checksum: 10c0/ced4dd3a78e15897ed3be74e635110bbf3b08877b0a41be50dcb325ee0e0b5f65fc2d50e9845194d7c4633f327e2e1c6cce00a71b617c5673df0374201d67f65 - languageName: node - linkType: hard - -"escape-string-regexp@npm:^4.0.0": - version: 4.0.0 - resolution: "escape-string-regexp@npm:4.0.0" - checksum: 10c0/9497d4dd307d845bd7f75180d8188bb17ea8c151c1edbf6b6717c100e104d629dc2dfb687686181b0f4b7d732c7dfdc4d5e7a8ff72de1b0ca283a75bbb3a9cd9 - languageName: node - linkType: hard - -"eslint-import-resolver-node@npm:^0.3.9": - version: 0.3.9 - resolution: "eslint-import-resolver-node@npm:0.3.9" - dependencies: - debug: "npm:^3.2.7" - is-core-module: "npm:^2.13.0" - resolve: "npm:^1.22.4" - checksum: 10c0/0ea8a24a72328a51fd95aa8f660dcca74c1429806737cf10261ab90cfcaaf62fd1eff664b76a44270868e0a932711a81b250053942595bcd00a93b1c1575dd61 - languageName: node - linkType: hard - -"eslint-module-utils@npm:^2.12.0": - version: 2.12.0 - resolution: "eslint-module-utils@npm:2.12.0" - dependencies: - debug: "npm:^3.2.7" - peerDependenciesMeta: - eslint: - optional: true - checksum: 10c0/4d8b46dcd525d71276f9be9ffac1d2be61c9d54cc53c992e6333cf957840dee09381842b1acbbb15fc6b255ebab99cd481c5007ab438e5455a14abe1a0468558 - languageName: node - linkType: hard - -"eslint-plugin-es@npm:^3.0.0": - version: 3.0.1 - resolution: "eslint-plugin-es@npm:3.0.1" - dependencies: - eslint-utils: "npm:^2.0.0" - regexpp: "npm:^3.0.0" - peerDependencies: - eslint: ">=4.19.1" - checksum: 10c0/12ae730aa9603e680af048e1653aac15e529411b68b8d0da6e290700b17c695485af7c3f5360f531f80970786cab7288c2c1d4a58c35ec1bb89649897c016c4a - languageName: node - linkType: hard - -"eslint-plugin-import@npm:^2.31.0": - version: 2.31.0 - resolution: "eslint-plugin-import@npm:2.31.0" - dependencies: - "@rtsao/scc": "npm:^1.1.0" - array-includes: "npm:^3.1.8" - array.prototype.findlastindex: "npm:^1.2.5" - array.prototype.flat: "npm:^1.3.2" - array.prototype.flatmap: "npm:^1.3.2" - debug: "npm:^3.2.7" - doctrine: "npm:^2.1.0" - eslint-import-resolver-node: "npm:^0.3.9" - eslint-module-utils: "npm:^2.12.0" - hasown: "npm:^2.0.2" - is-core-module: "npm:^2.15.1" - is-glob: "npm:^4.0.3" - minimatch: "npm:^3.1.2" - object.fromentries: "npm:^2.0.8" - object.groupby: "npm:^1.0.3" - object.values: "npm:^1.2.0" - semver: "npm:^6.3.1" - string.prototype.trimend: "npm:^1.0.8" - tsconfig-paths: "npm:^3.15.0" - peerDependencies: - eslint: ^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0 || ^8 || ^9 - checksum: 10c0/e21d116ddd1900e091ad120b3eb68c5dd5437fe2c930f1211781cd38b246f090a6b74d5f3800b8255a0ed29782591521ad44eb21c5534960a8f1fb4040fd913a - languageName: node - linkType: hard - -"eslint-plugin-node@npm:^11.1.0": - version: 11.1.0 - resolution: "eslint-plugin-node@npm:11.1.0" - dependencies: - eslint-plugin-es: "npm:^3.0.0" - eslint-utils: "npm:^2.0.0" - ignore: "npm:^5.1.1" - minimatch: "npm:^3.0.4" - resolve: "npm:^1.10.1" - semver: "npm:^6.1.0" - peerDependencies: - eslint: ">=5.16.0" - checksum: 10c0/c7716adac4020cb852fd2410dcd8bdb13a227004de77f96d7f9806d0cf2274f24e0920a7ca73bcd72d90003696c1f17fdd9fe3ca218e64ee03dc2b840e4416fa - languageName: node - linkType: hard - -"eslint-plugin-promise@npm:^7.2.1": - version: 7.2.1 - resolution: "eslint-plugin-promise@npm:7.2.1" - dependencies: - "@eslint-community/eslint-utils": "npm:^4.4.0" - peerDependencies: - eslint: ^7.0.0 || ^8.0.0 || ^9.0.0 - checksum: 10c0/d494982faeeafbd2aa5fae9cbceca546169a8399000f72d5d940fa5c4ba554612903bcafbb8033647179e5d21ccf1d621b433d089695f7f47ce3d9fcf4cd0abf - languageName: node - linkType: hard - -"eslint-scope@npm:^8.2.0": - version: 8.2.0 - resolution: "eslint-scope@npm:8.2.0" - dependencies: - esrecurse: "npm:^4.3.0" - estraverse: "npm:^5.2.0" - checksum: 10c0/8d2d58e2136d548ac7e0099b1a90d9fab56f990d86eb518de1247a7066d38c908be2f3df477a79cf60d70b30ba18735d6c6e70e9914dca2ee515a729975d70d6 - languageName: node - linkType: hard - -"eslint-utils@npm:^2.0.0": - version: 2.1.0 - resolution: "eslint-utils@npm:2.1.0" - dependencies: - eslint-visitor-keys: "npm:^1.1.0" - checksum: 10c0/69521c5d6569384b24093125d037ba238d3d6e54367f7143af9928f5286369e912c26cad5016d730c0ffb9797ac9e83831059d7f1d863f7dc84330eb02414611 - languageName: node - linkType: hard - -"eslint-visitor-keys@npm:^1.1.0": - version: 1.3.0 - resolution: "eslint-visitor-keys@npm:1.3.0" - checksum: 10c0/10c91fdbbe36810dd4308e57f9a8bc7177188b2a70247e54e3af1fa05ebc66414ae6fd4ce3c6c6821591f43a556e9037bc6b071122e099b5f8b7d2f76df553e3 - languageName: node - linkType: hard - -"eslint-visitor-keys@npm:^3.4.3": - version: 3.4.3 - resolution: "eslint-visitor-keys@npm:3.4.3" - checksum: 10c0/92708e882c0a5ffd88c23c0b404ac1628cf20104a108c745f240a13c332a11aac54f49a22d5762efbffc18ecbc9a580d1b7ad034bf5f3cc3307e5cbff2ec9820 - languageName: node - linkType: hard - -"eslint-visitor-keys@npm:^4.2.0": - version: 4.2.0 - resolution: "eslint-visitor-keys@npm:4.2.0" - checksum: 10c0/2ed81c663b147ca6f578312919483eb040295bbab759e5a371953456c636c5b49a559883e2677112453728d66293c0a4c90ab11cab3428cf02a0236d2e738269 - languageName: node - linkType: hard - -"eslint@npm:^9.18.0": - version: 9.18.0 - resolution: "eslint@npm:9.18.0" - dependencies: - "@eslint-community/eslint-utils": "npm:^4.2.0" - "@eslint-community/regexpp": "npm:^4.12.1" - "@eslint/config-array": "npm:^0.19.0" - "@eslint/core": "npm:^0.10.0" - "@eslint/eslintrc": "npm:^3.2.0" - "@eslint/js": "npm:9.18.0" - "@eslint/plugin-kit": "npm:^0.2.5" - "@humanfs/node": "npm:^0.16.6" - "@humanwhocodes/module-importer": "npm:^1.0.1" - "@humanwhocodes/retry": "npm:^0.4.1" - "@types/estree": "npm:^1.0.6" - "@types/json-schema": "npm:^7.0.15" - ajv: "npm:^6.12.4" - chalk: "npm:^4.0.0" - cross-spawn: "npm:^7.0.6" - debug: "npm:^4.3.2" - escape-string-regexp: "npm:^4.0.0" - eslint-scope: "npm:^8.2.0" - eslint-visitor-keys: "npm:^4.2.0" - espree: "npm:^10.3.0" - esquery: "npm:^1.5.0" - esutils: "npm:^2.0.2" - fast-deep-equal: "npm:^3.1.3" - file-entry-cache: "npm:^8.0.0" - find-up: "npm:^5.0.0" - glob-parent: "npm:^6.0.2" - ignore: "npm:^5.2.0" - imurmurhash: "npm:^0.1.4" - is-glob: "npm:^4.0.0" - json-stable-stringify-without-jsonify: "npm:^1.0.1" - lodash.merge: "npm:^4.6.2" - minimatch: "npm:^3.1.2" - natural-compare: "npm:^1.4.0" - optionator: "npm:^0.9.3" - peerDependencies: - jiti: "*" - peerDependenciesMeta: - jiti: - optional: true - bin: - eslint: bin/eslint.js - checksum: 10c0/7f592ad228b9bd627a24870fdc875bacdab7bf535d4b67316c4cb791e90d0125130a74769f3c407b0c4b7027b3082ef33864a63ee1024552a60a17db60493f15 - languageName: node - linkType: hard - -"espree@npm:^10.0.1, espree@npm:^10.3.0": - version: 10.3.0 - resolution: "espree@npm:10.3.0" - dependencies: - acorn: "npm:^8.14.0" - acorn-jsx: "npm:^5.3.2" - eslint-visitor-keys: "npm:^4.2.0" - checksum: 10c0/272beeaca70d0a1a047d61baff64db04664a33d7cfb5d144f84bc8a5c6194c6c8ebe9cc594093ca53add88baa23e59b01e69e8a0160ab32eac570482e165c462 - languageName: node - linkType: hard - -"esquery@npm:^1.5.0": - version: 1.6.0 - resolution: "esquery@npm:1.6.0" - dependencies: - estraverse: "npm:^5.1.0" - checksum: 10c0/cb9065ec605f9da7a76ca6dadb0619dfb611e37a81e318732977d90fab50a256b95fee2d925fba7c2f3f0523aa16f91587246693bc09bc34d5a59575fe6e93d2 - languageName: node - linkType: hard - -"esrecurse@npm:^4.3.0": - version: 4.3.0 - resolution: "esrecurse@npm:4.3.0" - dependencies: - estraverse: "npm:^5.2.0" - checksum: 10c0/81a37116d1408ded88ada45b9fb16dbd26fba3aadc369ce50fcaf82a0bac12772ebd7b24cd7b91fc66786bf2c1ac7b5f196bc990a473efff972f5cb338877cf5 - languageName: node - linkType: hard - -"estraverse@npm:^5.1.0, estraverse@npm:^5.2.0": - version: 5.3.0 - resolution: "estraverse@npm:5.3.0" - checksum: 10c0/1ff9447b96263dec95d6d67431c5e0771eb9776427421260a3e2f0fdd5d6bd4f8e37a7338f5ad2880c9f143450c9b1e4fc2069060724570a49cf9cf0312bd107 - languageName: node - linkType: hard - -"esutils@npm:^2.0.2": - version: 2.0.3 - resolution: "esutils@npm:2.0.3" - checksum: 10c0/9a2fe69a41bfdade834ba7c42de4723c97ec776e40656919c62cbd13607c45e127a003f05f724a1ea55e5029a4cf2de444b13009f2af71271e42d93a637137c7 - languageName: node - linkType: hard - -"exponential-backoff@npm:^3.1.1": - version: 3.1.1 - resolution: "exponential-backoff@npm:3.1.1" - checksum: 10c0/160456d2d647e6019640bd07111634d8c353038d9fa40176afb7cd49b0548bdae83b56d05e907c2cce2300b81cae35d800ef92fefb9d0208e190fa3b7d6bb579 - languageName: node - linkType: hard - -"extract-zip@npm:^2.0.1": - version: 2.0.1 - resolution: "extract-zip@npm:2.0.1" - dependencies: - "@types/yauzl": "npm:^2.9.1" - debug: "npm:^4.1.1" - get-stream: "npm:^5.1.0" - yauzl: "npm:^2.10.0" - dependenciesMeta: - "@types/yauzl": - optional: true - bin: - extract-zip: cli.js - checksum: 10c0/9afbd46854aa15a857ae0341a63a92743a7b89c8779102c3b4ffc207516b2019337353962309f85c66ee3d9092202a83cdc26dbf449a11981272038443974aee - languageName: node - linkType: hard - -"extsprintf@npm:^1.2.0": - version: 1.4.1 - resolution: "extsprintf@npm:1.4.1" - checksum: 10c0/e10e2769985d0e9b6c7199b053a9957589d02e84de42832c295798cb422a025e6d4a92e0259c1fb4d07090f5bfde6b55fd9f880ac5855bd61d775f8ab75a7ab0 - languageName: node - linkType: hard - -"fast-deep-equal@npm:^3.1.1, fast-deep-equal@npm:^3.1.3": - version: 3.1.3 - resolution: "fast-deep-equal@npm:3.1.3" - checksum: 10c0/40dedc862eb8992c54579c66d914635afbec43350afbbe991235fdcb4e3a8d5af1b23ae7e79bef7d4882d0ecee06c3197488026998fb19f72dc95acff1d1b1d0 - languageName: node - linkType: hard - -"fast-glob@npm:^3.3.2": - version: 3.3.3 - resolution: "fast-glob@npm:3.3.3" - dependencies: - "@nodelib/fs.stat": "npm:^2.0.2" - "@nodelib/fs.walk": "npm:^1.2.3" - glob-parent: "npm:^5.1.2" - merge2: "npm:^1.3.0" - micromatch: "npm:^4.0.8" - checksum: 10c0/f6aaa141d0d3384cf73cbcdfc52f475ed293f6d5b65bfc5def368b09163a9f7e5ec2b3014d80f733c405f58e470ee0cc451c2937685045cddcdeaa24199c43fe - languageName: node - linkType: hard - -"fast-json-stable-stringify@npm:^2.0.0": - version: 2.1.0 - resolution: "fast-json-stable-stringify@npm:2.1.0" - checksum: 10c0/7f081eb0b8a64e0057b3bb03f974b3ef00135fbf36c1c710895cd9300f13c94ba809bb3a81cf4e1b03f6e5285610a61abbd7602d0652de423144dfee5a389c9b - languageName: node - linkType: hard - -"fast-levenshtein@npm:^2.0.6": - version: 2.0.6 - resolution: "fast-levenshtein@npm:2.0.6" - checksum: 10c0/111972b37338bcb88f7d9e2c5907862c280ebf4234433b95bc611e518d192ccb2d38119c4ac86e26b668d75f7f3894f4ff5c4982899afced7ca78633b08287c4 - languageName: node - linkType: hard - -"fastq@npm:^1.6.0": - version: 1.18.0 - resolution: "fastq@npm:1.18.0" - dependencies: - reusify: "npm:^1.0.4" - checksum: 10c0/7be87ecc41762adbddf558d24182f50a4b1a3ef3ee807d33b7623da7aee5faecdcc94fce5aa13fe91df93e269f383232bbcdb2dc5338cd1826503d6063221f36 - languageName: node - linkType: hard - -"fd-slicer@npm:~1.1.0": - version: 1.1.0 - resolution: "fd-slicer@npm:1.1.0" - dependencies: - pend: "npm:~1.2.0" - checksum: 10c0/304dd70270298e3ffe3bcc05e6f7ade2511acc278bc52d025f8918b48b6aa3b77f10361bddfadfe2a28163f7af7adbdce96f4d22c31b2f648ba2901f0c5fc20e - languageName: node - linkType: hard - -"fdir@npm:^6.5.0": - version: 6.5.0 - resolution: "fdir@npm:6.5.0" - peerDependencies: - picomatch: ^3 || ^4 - peerDependenciesMeta: - picomatch: - optional: true - checksum: 10c0/e345083c4306b3aed6cb8ec551e26c36bab5c511e99ea4576a16750ddc8d3240e63826cc624f5ae17ad4dc82e68a253213b60d556c11bfad064b7607847ed07f - languageName: node - linkType: hard - -"file-entry-cache@npm:^8.0.0": - version: 8.0.0 - resolution: "file-entry-cache@npm:8.0.0" - dependencies: - flat-cache: "npm:^4.0.0" - checksum: 10c0/9e2b5938b1cd9b6d7e3612bdc533afd4ac17b2fc646569e9a8abbf2eb48e5eb8e316bc38815a3ef6a1b456f4107f0d0f055a614ca613e75db6bf9ff4d72c1638 - languageName: node - linkType: hard - -"filelist@npm:^1.0.4": - version: 1.0.4 - resolution: "filelist@npm:1.0.4" - dependencies: - minimatch: "npm:^5.0.1" - checksum: 10c0/426b1de3944a3d153b053f1c0ebfd02dccd0308a4f9e832ad220707a6d1f1b3c9784d6cadf6b2f68f09a57565f63ebc7bcdc913ccf8012d834f472c46e596f41 - languageName: node - linkType: hard - -"fill-range@npm:^7.1.1": - version: 7.1.1 - resolution: "fill-range@npm:7.1.1" - dependencies: - to-regex-range: "npm:^5.0.1" - checksum: 10c0/b75b691bbe065472f38824f694c2f7449d7f5004aa950426a2c28f0306c60db9b880c0b0e4ed819997ffb882d1da02cfcfc819bddc94d71627f5269682edf018 - languageName: node - linkType: hard - -"find-up@npm:^5.0.0": - version: 5.0.0 - resolution: "find-up@npm:5.0.0" - dependencies: - locate-path: "npm:^6.0.0" - path-exists: "npm:^4.0.0" - checksum: 10c0/062c5a83a9c02f53cdd6d175a37ecf8f87ea5bbff1fdfb828f04bfa021441bc7583e8ebc0872a4c1baab96221fb8a8a275a19809fb93fbc40bd69ec35634069a - languageName: node - linkType: hard - -"flat-cache@npm:^4.0.0": - version: 4.0.1 - resolution: "flat-cache@npm:4.0.1" - dependencies: - flatted: "npm:^3.2.9" - keyv: "npm:^4.5.4" - checksum: 10c0/2c59d93e9faa2523e4fda6b4ada749bed432cfa28c8e251f33b25795e426a1c6dbada777afb1f74fcfff33934fdbdea921ee738fcc33e71adc9d6eca984a1cfc - languageName: node - linkType: hard - -"flatted@npm:^3.2.9": - version: 3.3.2 - resolution: "flatted@npm:3.3.2" - checksum: 10c0/24cc735e74d593b6c767fe04f2ef369abe15b62f6906158079b9874bdb3ee5ae7110bb75042e70cd3f99d409d766f357caf78d5ecee9780206f5fdc5edbad334 - languageName: node - linkType: hard - -"for-each@npm:^0.3.3": - version: 0.3.3 - resolution: "for-each@npm:0.3.3" - dependencies: - is-callable: "npm:^1.1.3" - checksum: 10c0/22330d8a2db728dbf003ec9182c2d421fbcd2969b02b4f97ec288721cda63eb28f2c08585ddccd0f77cb2930af8d958005c9e72f47141dc51816127a118f39aa - languageName: node - linkType: hard - -"foreground-child@npm:^3.1.0": - version: 3.3.0 - resolution: "foreground-child@npm:3.3.0" - dependencies: - cross-spawn: "npm:^7.0.0" - signal-exit: "npm:^4.0.1" - checksum: 10c0/028f1d41000553fcfa6c4bb5c372963bf3d9bf0b1f25a87d1a6253014343fb69dfb1b42d9625d7cf44c8ba429940f3d0ff718b62105d4d4a4f6ef8ca0a53faa2 - languageName: node - linkType: hard - -"form-data@npm:^2.5.0": - version: 2.5.2 - resolution: "form-data@npm:2.5.2" - dependencies: - asynckit: "npm:^0.4.0" - combined-stream: "npm:^1.0.6" - mime-types: "npm:^2.1.12" - safe-buffer: "npm:^5.2.1" - checksum: 10c0/af7cb13fc8423ff95fd59c62d101c84b5458a73e1e426b0bc459afbf5b93b1e447dc6c225ac31c6df59f36b209904a3f1a10b4eb9e7a17e0fe394019749142cc - languageName: node - linkType: hard - -"form-data@npm:^4.0.5": - version: 4.0.5 - resolution: "form-data@npm:4.0.5" - dependencies: - asynckit: "npm:^0.4.0" - combined-stream: "npm:^1.0.8" - es-set-tostringtag: "npm:^2.1.0" - hasown: "npm:^2.0.2" - mime-types: "npm:^2.1.12" - checksum: 10c0/dd6b767ee0bbd6d84039db12a0fa5a2028160ffbfaba1800695713b46ae974a5f6e08b3356c3195137f8530dcd9dfcb5d5ae1eeff53d0db1e5aad863b619ce3b - languageName: node - linkType: hard - -"fs-extra@npm:^10.0.0, fs-extra@npm:^10.1.0": - version: 10.1.0 - resolution: "fs-extra@npm:10.1.0" - dependencies: - graceful-fs: "npm:^4.2.0" - jsonfile: "npm:^6.0.1" - universalify: "npm:^2.0.0" - checksum: 10c0/5f579466e7109719d162a9249abbeffe7f426eb133ea486e020b89bc6d67a741134076bf439983f2eb79276ceaf6bd7b7c1e43c3fd67fe889863e69072fb0a5e - languageName: node - linkType: hard - -"fs-extra@npm:^11.1.1": - version: 11.3.3 - resolution: "fs-extra@npm:11.3.3" - dependencies: - graceful-fs: "npm:^4.2.0" - jsonfile: "npm:^6.0.1" - universalify: "npm:^2.0.0" - checksum: 10c0/984924ff4104e3e9f351b658a864bf3b354b2c90429f57aec0acd12d92c4e6b762cbacacdffb4e745b280adce882e1f980c485d9f02c453f769ab4e7fc646ce3 - languageName: node - linkType: hard - -"fs-extra@npm:^8.1.0": - version: 8.1.0 - resolution: "fs-extra@npm:8.1.0" - dependencies: - graceful-fs: "npm:^4.2.0" - jsonfile: "npm:^4.0.0" - universalify: "npm:^0.1.0" - checksum: 10c0/259f7b814d9e50d686899550c4f9ded85c46c643f7fe19be69504888e007fcbc08f306fae8ec495b8b998635e997c9e3e175ff2eeed230524ef1c1684cc96423 - languageName: node - linkType: hard - -"fs-extra@npm:^9.0.0, fs-extra@npm:^9.0.1": - version: 9.1.0 - resolution: "fs-extra@npm:9.1.0" - dependencies: - at-least-node: "npm:^1.0.0" - graceful-fs: "npm:^4.2.0" - jsonfile: "npm:^6.0.1" - universalify: "npm:^2.0.0" - checksum: 10c0/9b808bd884beff5cb940773018179a6b94a966381d005479f00adda6b44e5e3d4abf765135773d849cc27efe68c349e4a7b86acd7d3306d5932c14f3a4b17a92 - languageName: node - linkType: hard - -"fs-minipass@npm:^3.0.0": - version: 3.0.3 - resolution: "fs-minipass@npm:3.0.3" - dependencies: - minipass: "npm:^7.0.3" - checksum: 10c0/63e80da2ff9b621e2cb1596abcb9207f1cf82b968b116ccd7b959e3323144cce7fb141462200971c38bbf2ecca51695069db45265705bed09a7cd93ae5b89f94 - languageName: node - linkType: hard - -"fs.realpath@npm:^1.0.0": - version: 1.0.0 - resolution: "fs.realpath@npm:1.0.0" - checksum: 10c0/444cf1291d997165dfd4c0d58b69f0e4782bfd9149fd72faa4fe299e68e0e93d6db941660b37dd29153bf7186672ececa3b50b7e7249477b03fdf850f287c948 - languageName: node - linkType: hard - -"function-bind@npm:^1.1.2": - version: 1.1.2 - resolution: "function-bind@npm:1.1.2" - checksum: 10c0/d8680ee1e5fcd4c197e4ac33b2b4dce03c71f4d91717292785703db200f5c21f977c568d28061226f9b5900cbcd2c84463646134fd5337e7925e0942bc3f46d5 - languageName: node - linkType: hard - -"function.prototype.name@npm:^1.1.6, function.prototype.name@npm:^1.1.8": - version: 1.1.8 - resolution: "function.prototype.name@npm:1.1.8" - dependencies: - call-bind: "npm:^1.0.8" - call-bound: "npm:^1.0.3" - define-properties: "npm:^1.2.1" - functions-have-names: "npm:^1.2.3" - hasown: "npm:^2.0.2" - is-callable: "npm:^1.2.7" - checksum: 10c0/e920a2ab52663005f3cbe7ee3373e3c71c1fb5558b0b0548648cdf3e51961085032458e26c71ff1a8c8c20e7ee7caeb03d43a5d1fa8610c459333323a2e71253 - languageName: node - linkType: hard - -"functions-have-names@npm:^1.2.3": - version: 1.2.3 - resolution: "functions-have-names@npm:1.2.3" - checksum: 10c0/33e77fd29bddc2d9bb78ab3eb854c165909201f88c75faa8272e35899e2d35a8a642a15e7420ef945e1f64a9670d6aa3ec744106b2aa42be68ca5114025954ca - languageName: node - linkType: hard - -"get-caller-file@npm:^2.0.5": - version: 2.0.5 - resolution: "get-caller-file@npm:2.0.5" - checksum: 10c0/c6c7b60271931fa752aeb92f2b47e355eac1af3a2673f47c9589e8f8a41adc74d45551c1bc57b5e66a80609f10ffb72b6f575e4370d61cc3f7f3aaff01757cde - languageName: node - linkType: hard - -"get-intrinsic@npm:^1.2.4, get-intrinsic@npm:^1.2.5, get-intrinsic@npm:^1.2.6, get-intrinsic@npm:^1.2.7": - version: 1.2.7 - resolution: "get-intrinsic@npm:1.2.7" - dependencies: - call-bind-apply-helpers: "npm:^1.0.1" - es-define-property: "npm:^1.0.1" - es-errors: "npm:^1.3.0" - es-object-atoms: "npm:^1.0.0" - function-bind: "npm:^1.1.2" - get-proto: "npm:^1.0.0" - gopd: "npm:^1.2.0" - has-symbols: "npm:^1.1.0" - hasown: "npm:^2.0.2" - math-intrinsics: "npm:^1.1.0" - checksum: 10c0/b475dec9f8bff6f7422f51ff4b7b8d0b68e6776ee83a753c1d627e3008c3442090992788038b37eff72e93e43dceed8c1acbdf2d6751672687ec22127933080d - languageName: node - linkType: hard - -"get-proto@npm:^1.0.0, get-proto@npm:^1.0.1": - version: 1.0.1 - resolution: "get-proto@npm:1.0.1" - dependencies: - dunder-proto: "npm:^1.0.1" - es-object-atoms: "npm:^1.0.0" - checksum: 10c0/9224acb44603c5526955e83510b9da41baf6ae73f7398875fba50edc5e944223a89c4a72b070fcd78beb5f7bdda58ecb6294adc28f7acfc0da05f76a2399643c - languageName: node - linkType: hard - -"get-stream@npm:^5.1.0": - version: 5.2.0 - resolution: "get-stream@npm:5.2.0" - dependencies: - pump: "npm:^3.0.0" - checksum: 10c0/43797ffd815fbb26685bf188c8cfebecb8af87b3925091dd7b9a9c915993293d78e3c9e1bce125928ff92f2d0796f3889b92b5ec6d58d1041b574682132e0a80 - languageName: node - linkType: hard - -"get-symbol-description@npm:^1.1.0": - version: 1.1.0 - resolution: "get-symbol-description@npm:1.1.0" - dependencies: - call-bound: "npm:^1.0.3" - es-errors: "npm:^1.3.0" - get-intrinsic: "npm:^1.2.6" - checksum: 10c0/d6a7d6afca375779a4b307738c9e80dbf7afc0bdbe5948768d54ab9653c865523d8920e670991a925936eb524b7cb6a6361d199a760b21d0ca7620194455aa4b - languageName: node - linkType: hard - -"glob-parent@npm:^5.1.2": - version: 5.1.2 - resolution: "glob-parent@npm:5.1.2" - dependencies: - is-glob: "npm:^4.0.1" - checksum: 10c0/cab87638e2112bee3f839ef5f6e0765057163d39c66be8ec1602f3823da4692297ad4e972de876ea17c44d652978638d2fd583c6713d0eb6591706825020c9ee - languageName: node - linkType: hard - -"glob-parent@npm:^6.0.2": - version: 6.0.2 - resolution: "glob-parent@npm:6.0.2" - dependencies: - is-glob: "npm:^4.0.3" - checksum: 10c0/317034d88654730230b3f43bb7ad4f7c90257a426e872ea0bf157473ac61c99bf5d205fad8f0185f989be8d2fa6d3c7dce1645d99d545b6ea9089c39f838e7f8 - languageName: node - linkType: hard - -"glob@npm:^10.2.2, glob@npm:^10.3.10, glob@npm:^10.3.7": - version: 10.4.5 - resolution: "glob@npm:10.4.5" - dependencies: - foreground-child: "npm:^3.1.0" - jackspeak: "npm:^3.1.2" - minimatch: "npm:^9.0.4" - minipass: "npm:^7.1.2" - package-json-from-dist: "npm:^1.0.0" - path-scurry: "npm:^1.11.1" - bin: - glob: dist/esm/bin.mjs - checksum: 10c0/19a9759ea77b8e3ca0a43c2f07ecddc2ad46216b786bb8f993c445aee80d345925a21e5280c7b7c6c59e860a0154b84e4b2b60321fea92cd3c56b4a7489f160e - languageName: node - linkType: hard - -"glob@npm:^11.0.1": - version: 11.0.1 - resolution: "glob@npm:11.0.1" - dependencies: - foreground-child: "npm:^3.1.0" - jackspeak: "npm:^4.0.1" - minimatch: "npm:^10.0.0" - minipass: "npm:^7.1.2" - package-json-from-dist: "npm:^1.0.0" - path-scurry: "npm:^2.0.0" - bin: - glob: dist/esm/bin.mjs - checksum: 10c0/2b32588be52e9e90f914c7d8dec32f3144b81b84054b0f70e9adfebf37cd7014570489f2a79d21f7801b9a4bd4cca94f426966bfd00fb64a5b705cfe10da3a03 - languageName: node - linkType: hard - -"glob@npm:^7.1.6": - version: 7.2.3 - resolution: "glob@npm:7.2.3" - dependencies: - fs.realpath: "npm:^1.0.0" - inflight: "npm:^1.0.4" - inherits: "npm:2" - minimatch: "npm:^3.1.1" - once: "npm:^1.3.0" - path-is-absolute: "npm:^1.0.0" - checksum: 10c0/65676153e2b0c9095100fe7f25a778bf45608eeb32c6048cf307f579649bcc30353277b3b898a3792602c65764e5baa4f643714dfbdfd64ea271d210c7a425fe - languageName: node - linkType: hard - -"global-agent@npm:^3.0.0": - version: 3.0.0 - resolution: "global-agent@npm:3.0.0" - dependencies: - boolean: "npm:^3.0.1" - es6-error: "npm:^4.1.1" - matcher: "npm:^3.0.0" - roarr: "npm:^2.15.3" - semver: "npm:^7.3.2" - serialize-error: "npm:^7.0.1" - checksum: 10c0/bb8750d026b25da437072762fd739098bad92ff72f66483c3929db4579e072f5523960f7e7fd70ee0d75db48898067b5dc1c9c1d17888128cff008fcc34d1bd3 - languageName: node - linkType: hard - -"globals@npm:^14.0.0": - version: 14.0.0 - resolution: "globals@npm:14.0.0" - checksum: 10c0/b96ff42620c9231ad468d4c58ff42afee7777ee1c963013ff8aabe095a451d0ceeb8dcd8ef4cbd64d2538cef45f787a78ba3a9574f4a634438963e334471302d - languageName: node - linkType: hard - -"globalthis@npm:^1.0.1, globalthis@npm:^1.0.4": - version: 1.0.4 - resolution: "globalthis@npm:1.0.4" - dependencies: - define-properties: "npm:^1.2.1" - gopd: "npm:^1.0.1" - checksum: 10c0/9d156f313af79d80b1566b93e19285f481c591ad6d0d319b4be5e03750d004dde40a39a0f26f7e635f9007a3600802f53ecd85a759b86f109e80a5f705e01846 - languageName: node - linkType: hard - -"gopd@npm:^1.0.1, gopd@npm:^1.2.0": - version: 1.2.0 - resolution: "gopd@npm:1.2.0" - checksum: 10c0/50fff1e04ba2b7737c097358534eacadad1e68d24cccee3272e04e007bed008e68d2614f3987788428fd192a5ae3889d08fb2331417e4fc4a9ab366b2043cead - languageName: node - linkType: hard - -"got@npm:^11.7.0, got@npm:^11.8.5": - version: 11.8.6 - resolution: "got@npm:11.8.6" - dependencies: - "@sindresorhus/is": "npm:^4.0.0" - "@szmarczak/http-timer": "npm:^4.0.5" - "@types/cacheable-request": "npm:^6.0.1" - "@types/responselike": "npm:^1.0.0" - cacheable-lookup: "npm:^5.0.3" - cacheable-request: "npm:^7.0.2" - decompress-response: "npm:^6.0.0" - http2-wrapper: "npm:^1.0.0-beta.5.2" - lowercase-keys: "npm:^2.0.0" - p-cancelable: "npm:^2.0.0" - responselike: "npm:^2.0.0" - checksum: 10c0/754dd44877e5cf6183f1e989ff01c648d9a4719e357457bd4c78943911168881f1cfb7b2cb15d885e2105b3ad313adb8f017a67265dd7ade771afdb261ee8cb1 - languageName: node - linkType: hard - -"graceful-fs@npm:^4.1.6, graceful-fs@npm:^4.2.0, graceful-fs@npm:^4.2.11, graceful-fs@npm:^4.2.4, graceful-fs@npm:^4.2.6": - version: 4.2.11 - resolution: "graceful-fs@npm:4.2.11" - checksum: 10c0/386d011a553e02bc594ac2ca0bd6d9e4c22d7fa8cfbfc448a6d148c59ea881b092db9dbe3547ae4b88e55f1b01f7c4a2ecc53b310c042793e63aa44cf6c257f2 - languageName: node - linkType: hard - -"graphemer@npm:^1.4.0": - version: 1.4.0 - resolution: "graphemer@npm:1.4.0" - checksum: 10c0/e951259d8cd2e0d196c72ec711add7115d42eb9a8146c8eeda5b8d3ac91e5dd816b9cd68920726d9fd4490368e7ed86e9c423f40db87e2d8dfafa00fa17c3a31 - languageName: node - linkType: hard - -"has-bigints@npm:^1.0.2": - version: 1.1.0 - resolution: "has-bigints@npm:1.1.0" - checksum: 10c0/2de0cdc4a1ccf7a1e75ffede1876994525ac03cc6f5ae7392d3415dd475cd9eee5bceec63669ab61aa997ff6cceebb50ef75561c7002bed8988de2b9d1b40788 - languageName: node - linkType: hard - -"has-flag@npm:^4.0.0": - version: 4.0.0 - resolution: "has-flag@npm:4.0.0" - checksum: 10c0/2e789c61b7888d66993e14e8331449e525ef42aac53c627cc53d1c3334e768bcb6abdc4f5f0de1478a25beec6f0bd62c7549058b7ac53e924040d4f301f02fd1 - languageName: node - linkType: hard - -"has-property-descriptors@npm:^1.0.0, has-property-descriptors@npm:^1.0.2": - version: 1.0.2 - resolution: "has-property-descriptors@npm:1.0.2" - dependencies: - es-define-property: "npm:^1.0.0" - checksum: 10c0/253c1f59e80bb476cf0dde8ff5284505d90c3bdb762983c3514d36414290475fe3fd6f574929d84de2a8eec00d35cf07cb6776205ff32efd7c50719125f00236 - languageName: node - linkType: hard - -"has-proto@npm:^1.2.0": - version: 1.2.0 - resolution: "has-proto@npm:1.2.0" - dependencies: - dunder-proto: "npm:^1.0.0" - checksum: 10c0/46538dddab297ec2f43923c3d35237df45d8c55a6fc1067031e04c13ed8a9a8f94954460632fd4da84c31a1721eefee16d901cbb1ae9602bab93bb6e08f93b95 - languageName: node - linkType: hard - -"has-symbols@npm:^1.0.3, has-symbols@npm:^1.1.0": - version: 1.1.0 - resolution: "has-symbols@npm:1.1.0" - checksum: 10c0/dde0a734b17ae51e84b10986e651c664379018d10b91b6b0e9b293eddb32f0f069688c841fb40f19e9611546130153e0a2a48fd7f512891fb000ddfa36f5a20e - languageName: node - linkType: hard - -"has-tostringtag@npm:^1.0.2": - version: 1.0.2 - resolution: "has-tostringtag@npm:1.0.2" - dependencies: - has-symbols: "npm:^1.0.3" - checksum: 10c0/a8b166462192bafe3d9b6e420a1d581d93dd867adb61be223a17a8d6dad147aa77a8be32c961bb2f27b3ef893cae8d36f564ab651f5e9b7938ae86f74027c48c - languageName: node - linkType: hard - -"hasown@npm:^2.0.0, hasown@npm:^2.0.2": - version: 2.0.2 - resolution: "hasown@npm:2.0.2" - dependencies: - function-bind: "npm:^1.1.2" - checksum: 10c0/3769d434703b8ac66b209a4cca0737519925bbdb61dd887f93a16372b14694c63ff4e797686d87c90f08168e81082248b9b028bad60d4da9e0d1148766f56eb9 - languageName: node - linkType: hard - -"hosted-git-info@npm:^4.1.0": - version: 4.1.0 - resolution: "hosted-git-info@npm:4.1.0" - dependencies: - lru-cache: "npm:^6.0.0" - checksum: 10c0/150fbcb001600336d17fdbae803264abed013548eea7946c2264c49ebe2ebd8c4441ba71dd23dd8e18c65de79d637f98b22d4760ba5fb2e0b15d62543d0fff07 - languageName: node - linkType: hard - -"http-cache-semantics@npm:^4.0.0, http-cache-semantics@npm:^4.1.1": - version: 4.1.1 - resolution: "http-cache-semantics@npm:4.1.1" - checksum: 10c0/ce1319b8a382eb3cbb4a37c19f6bfe14e5bb5be3d09079e885e8c513ab2d3cd9214902f8a31c9dc4e37022633ceabfc2d697405deeaf1b8f3552bb4ed996fdfc - languageName: node - linkType: hard - -"http-proxy-agent@npm:^7.0.0, http-proxy-agent@npm:^7.0.2": - version: 7.0.2 - resolution: "http-proxy-agent@npm:7.0.2" - dependencies: - agent-base: "npm:^7.1.0" - debug: "npm:^4.3.4" - checksum: 10c0/4207b06a4580fb85dd6dff521f0abf6db517489e70863dca1a0291daa7f2d3d2d6015a57bd702af068ea5cf9f1f6ff72314f5f5b4228d299c0904135d2aef921 - languageName: node - linkType: hard - -"http2-wrapper@npm:^1.0.0-beta.5.2": - version: 1.0.3 - resolution: "http2-wrapper@npm:1.0.3" - dependencies: - quick-lru: "npm:^5.1.1" - resolve-alpn: "npm:^1.0.0" - checksum: 10c0/6a9b72a033e9812e1476b9d776ce2f387bc94bc46c88aea0d5dab6bd47d0a539b8178830e77054dd26d1142c866d515a28a4dc7c3ff4232c88ff2ebe4f5d12d1 - languageName: node - linkType: hard - -"https-proxy-agent@npm:^7.0.0, https-proxy-agent@npm:^7.0.1, https-proxy-agent@npm:^7.0.6": - version: 7.0.6 - resolution: "https-proxy-agent@npm:7.0.6" - dependencies: - agent-base: "npm:^7.1.2" - debug: "npm:4" - checksum: 10c0/f729219bc735edb621fa30e6e84e60ee5d00802b8247aac0d7b79b0bd6d4b3294737a337b93b86a0bd9e68099d031858a39260c976dc14cdbba238ba1f8779ac - languageName: node - linkType: hard - -"iconv-corefoundation@npm:^1.1.7": - version: 1.1.7 - resolution: "iconv-corefoundation@npm:1.1.7" - dependencies: - cli-truncate: "npm:^2.1.0" - node-addon-api: "npm:^1.6.3" - conditions: os=darwin - languageName: node - linkType: hard - -"iconv-lite@npm:^0.6.2": - version: 0.6.3 - resolution: "iconv-lite@npm:0.6.3" - dependencies: - safer-buffer: "npm:>= 2.1.2 < 3.0.0" - checksum: 10c0/98102bc66b33fcf5ac044099d1257ba0b7ad5e3ccd3221f34dd508ab4070edff183276221684e1e0555b145fce0850c9f7d2b60a9fcac50fbb4ea0d6e845a3b1 - languageName: node - linkType: hard - -"ieee754@npm:^1.1.13": - version: 1.2.1 - resolution: "ieee754@npm:1.2.1" - checksum: 10c0/b0782ef5e0935b9f12883a2e2aa37baa75da6e66ce6515c168697b42160807d9330de9a32ec1ed73149aea02e0d822e572bca6f1e22bdcbd2149e13b050b17bb - languageName: node - linkType: hard - -"ignore@npm:^5.1.1, ignore@npm:^5.2.0, ignore@npm:^5.3.1": - version: 5.3.2 - resolution: "ignore@npm:5.3.2" - checksum: 10c0/f9f652c957983634ded1e7f02da3b559a0d4cc210fca3792cb67f1b153623c9c42efdc1c4121af171e295444459fc4a9201101fb041b1104a3c000bccb188337 - languageName: node - linkType: hard - -"import-fresh@npm:^3.2.1": - version: 3.3.0 - resolution: "import-fresh@npm:3.3.0" - dependencies: - parent-module: "npm:^1.0.0" - resolve-from: "npm:^4.0.0" - checksum: 10c0/7f882953aa6b740d1f0e384d0547158bc86efbf2eea0f1483b8900a6f65c5a5123c2cf09b0d542cc419d0b98a759ecaeb394237e97ea427f2da221dc3cd80cc3 - languageName: node - linkType: hard - -"imurmurhash@npm:^0.1.4": - version: 0.1.4 - resolution: "imurmurhash@npm:0.1.4" - checksum: 10c0/8b51313850dd33605c6c9d3fd9638b714f4c4c40250cff658209f30d40da60f78992fb2df5dabee4acf589a6a82bbc79ad5486550754bd9ec4e3fc0d4a57d6a6 - languageName: node - linkType: hard - -"inflight@npm:^1.0.4": - version: 1.0.6 - resolution: "inflight@npm:1.0.6" - dependencies: - once: "npm:^1.3.0" - wrappy: "npm:1" - checksum: 10c0/7faca22584600a9dc5b9fca2cd5feb7135ac8c935449837b315676b4c90aa4f391ec4f42240178244b5a34e8bede1948627fda392ca3191522fc46b34e985ab2 - languageName: node - linkType: hard - -"inherits@npm:2, inherits@npm:^2.0.3, inherits@npm:^2.0.4": - version: 2.0.4 - resolution: "inherits@npm:2.0.4" - checksum: 10c0/4e531f648b29039fb7426fb94075e6545faa1eb9fe83c29f0b6d9e7263aceb4289d2d4557db0d428188eeb449cc7c5e77b0a0b2c4e248ff2a65933a0dee49ef2 - languageName: node - linkType: hard - -"internal-slot@npm:^1.1.0": - version: 1.1.0 - resolution: "internal-slot@npm:1.1.0" - dependencies: - es-errors: "npm:^1.3.0" - hasown: "npm:^2.0.2" - side-channel: "npm:^1.1.0" - checksum: 10c0/03966f5e259b009a9bf1a78d60da920df198af4318ec004f57b8aef1dd3fe377fbc8cce63a96e8c810010302654de89f9e19de1cd8ad0061d15be28a695465c7 - languageName: node - linkType: hard - -"ip-address@npm:^9.0.5": - version: 9.0.5 - resolution: "ip-address@npm:9.0.5" - dependencies: - jsbn: "npm:1.1.0" - sprintf-js: "npm:^1.1.3" - checksum: 10c0/331cd07fafcb3b24100613e4b53e1a2b4feab11e671e655d46dc09ee233da5011284d09ca40c4ecbdfe1d0004f462958675c224a804259f2f78d2465a87824bc - languageName: node - linkType: hard - -"is-array-buffer@npm:^3.0.4, is-array-buffer@npm:^3.0.5": - version: 3.0.5 - resolution: "is-array-buffer@npm:3.0.5" - dependencies: - call-bind: "npm:^1.0.8" - call-bound: "npm:^1.0.3" - get-intrinsic: "npm:^1.2.6" - checksum: 10c0/c5c9f25606e86dbb12e756694afbbff64bc8b348d1bc989324c037e1068695131930199d6ad381952715dad3a9569333817f0b1a72ce5af7f883ce802e49c83d - languageName: node - linkType: hard - -"is-async-function@npm:^2.0.0": - version: 2.1.1 - resolution: "is-async-function@npm:2.1.1" - dependencies: - async-function: "npm:^1.0.0" - call-bound: "npm:^1.0.3" - get-proto: "npm:^1.0.1" - has-tostringtag: "npm:^1.0.2" - safe-regex-test: "npm:^1.1.0" - checksum: 10c0/d70c236a5e82de6fc4d44368ffd0c2fee2b088b893511ce21e679da275a5ecc6015ff59a7d7e1bdd7ca39f71a8dbdd253cf8cce5c6b3c91cdd5b42b5ce677298 - languageName: node - linkType: hard - -"is-bigint@npm:^1.1.0": - version: 1.1.0 - resolution: "is-bigint@npm:1.1.0" - dependencies: - has-bigints: "npm:^1.0.2" - checksum: 10c0/f4f4b905ceb195be90a6ea7f34323bf1c18e3793f18922e3e9a73c684c29eeeeff5175605c3a3a74cc38185fe27758f07efba3dbae812e5c5afbc0d2316b40e4 - languageName: node - linkType: hard - -"is-boolean-object@npm:^1.2.1": - version: 1.2.1 - resolution: "is-boolean-object@npm:1.2.1" - dependencies: - call-bound: "npm:^1.0.2" - has-tostringtag: "npm:^1.0.2" - checksum: 10c0/2ef601d255a39fdbde79cfe6be80c27b47430ed6712407f29b17d002e20f64c1e3d6692f1d842ba16bf1e9d8ddf1c4f13cac3ed7d9a4a21290f44879ebb4e8f5 - languageName: node - linkType: hard - -"is-callable@npm:^1.1.3, is-callable@npm:^1.2.7": - version: 1.2.7 - resolution: "is-callable@npm:1.2.7" - checksum: 10c0/ceebaeb9d92e8adee604076971dd6000d38d6afc40bb843ea8e45c5579b57671c3f3b50d7f04869618242c6cee08d1b67806a8cb8edaaaf7c0748b3720d6066f - languageName: node - linkType: hard - -"is-core-module@npm:^2.13.0, is-core-module@npm:^2.15.1, is-core-module@npm:^2.16.0": - version: 2.16.1 - resolution: "is-core-module@npm:2.16.1" - dependencies: - hasown: "npm:^2.0.2" - checksum: 10c0/898443c14780a577e807618aaae2b6f745c8538eca5c7bc11388a3f2dc6de82b9902bcc7eb74f07be672b11bbe82dd6a6edded44a00cb3d8f933d0459905eedd - languageName: node - linkType: hard - -"is-data-view@npm:^1.0.1, is-data-view@npm:^1.0.2": - version: 1.0.2 - resolution: "is-data-view@npm:1.0.2" - dependencies: - call-bound: "npm:^1.0.2" - get-intrinsic: "npm:^1.2.6" - is-typed-array: "npm:^1.1.13" - checksum: 10c0/ef3548a99d7e7f1370ce21006baca6d40c73e9f15c941f89f0049c79714c873d03b02dae1c64b3f861f55163ecc16da06506c5b8a1d4f16650b3d9351c380153 - languageName: node - linkType: hard - -"is-date-object@npm:^1.0.5, is-date-object@npm:^1.1.0": - version: 1.1.0 - resolution: "is-date-object@npm:1.1.0" - dependencies: - call-bound: "npm:^1.0.2" - has-tostringtag: "npm:^1.0.2" - checksum: 10c0/1a4d199c8e9e9cac5128d32e6626fa7805175af9df015620ac0d5d45854ccf348ba494679d872d37301032e35a54fc7978fba1687e8721b2139aea7870cafa2f - languageName: node - linkType: hard - -"is-extglob@npm:^2.1.1": - version: 2.1.1 - resolution: "is-extglob@npm:2.1.1" - checksum: 10c0/5487da35691fbc339700bbb2730430b07777a3c21b9ebaecb3072512dfd7b4ba78ac2381a87e8d78d20ea08affb3f1971b4af629173a6bf435ff8a4c47747912 - languageName: node - linkType: hard - -"is-finalizationregistry@npm:^1.1.0": - version: 1.1.1 - resolution: "is-finalizationregistry@npm:1.1.1" - dependencies: - call-bound: "npm:^1.0.3" - checksum: 10c0/818dff679b64f19e228a8205a1e2d09989a98e98def3a817f889208cfcbf918d321b251aadf2c05918194803ebd2eb01b14fc9d0b2bea53d984f4137bfca5e97 - languageName: node - linkType: hard - -"is-fullwidth-code-point@npm:^3.0.0": - version: 3.0.0 - resolution: "is-fullwidth-code-point@npm:3.0.0" - checksum: 10c0/bb11d825e049f38e04c06373a8d72782eee0205bda9d908cc550ccb3c59b99d750ff9537982e01733c1c94a58e35400661f57042158ff5e8f3e90cf936daf0fc - languageName: node - linkType: hard - -"is-generator-function@npm:^1.0.10": - version: 1.1.0 - resolution: "is-generator-function@npm:1.1.0" - dependencies: - call-bound: "npm:^1.0.3" - get-proto: "npm:^1.0.0" - has-tostringtag: "npm:^1.0.2" - safe-regex-test: "npm:^1.1.0" - checksum: 10c0/fdfa96c8087bf36fc4cd514b474ba2ff404219a4dd4cfa6cf5426404a1eed259bdcdb98f082a71029a48d01f27733e3436ecc6690129a7ec09cb0434bee03a2a - languageName: node - linkType: hard - -"is-glob@npm:^4.0.0, is-glob@npm:^4.0.1, is-glob@npm:^4.0.3": - version: 4.0.3 - resolution: "is-glob@npm:4.0.3" - dependencies: - is-extglob: "npm:^2.1.1" - checksum: 10c0/17fb4014e22be3bbecea9b2e3a76e9e34ff645466be702f1693e8f1ee1adac84710d0be0bd9f967d6354036fd51ab7c2741d954d6e91dae6bb69714de92c197a - languageName: node - linkType: hard - -"is-interactive@npm:^1.0.0": - version: 1.0.0 - resolution: "is-interactive@npm:1.0.0" - checksum: 10c0/dd47904dbf286cd20aa58c5192161be1a67138485b9836d5a70433b21a45442e9611b8498b8ab1f839fc962c7620667a50535fdfb4a6bc7989b8858645c06b4d - languageName: node - linkType: hard - -"is-map@npm:^2.0.3": - version: 2.0.3 - resolution: "is-map@npm:2.0.3" - checksum: 10c0/2c4d431b74e00fdda7162cd8e4b763d6f6f217edf97d4f8538b94b8702b150610e2c64961340015fe8df5b1fcee33ccd2e9b62619c4a8a3a155f8de6d6d355fc - languageName: node - linkType: hard - -"is-number-object@npm:^1.1.1": - version: 1.1.1 - resolution: "is-number-object@npm:1.1.1" - dependencies: - call-bound: "npm:^1.0.3" - has-tostringtag: "npm:^1.0.2" - checksum: 10c0/97b451b41f25135ff021d85c436ff0100d84a039bb87ffd799cbcdbea81ef30c464ced38258cdd34f080be08fc3b076ca1f472086286d2aa43521d6ec6a79f53 - languageName: node - linkType: hard - -"is-number@npm:^7.0.0": - version: 7.0.0 - resolution: "is-number@npm:7.0.0" - checksum: 10c0/b4686d0d3053146095ccd45346461bc8e53b80aeb7671cc52a4de02dbbf7dc0d1d2a986e2fe4ae206984b4d34ef37e8b795ebc4f4295c978373e6575e295d811 - languageName: node - linkType: hard - -"is-regex@npm:^1.2.1": - version: 1.2.1 - resolution: "is-regex@npm:1.2.1" - dependencies: - call-bound: "npm:^1.0.2" - gopd: "npm:^1.2.0" - has-tostringtag: "npm:^1.0.2" - hasown: "npm:^2.0.2" - checksum: 10c0/1d3715d2b7889932349241680032e85d0b492cfcb045acb75ffc2c3085e8d561184f1f7e84b6f8321935b4aea39bc9c6ba74ed595b57ce4881a51dfdbc214e04 - languageName: node - linkType: hard - -"is-set@npm:^2.0.3": - version: 2.0.3 - resolution: "is-set@npm:2.0.3" - checksum: 10c0/f73732e13f099b2dc879c2a12341cfc22ccaca8dd504e6edae26484bd5707a35d503fba5b4daad530a9b088ced1ae6c9d8200fd92e09b428fe14ea79ce8080b7 - languageName: node - linkType: hard - -"is-shared-array-buffer@npm:^1.0.4": - version: 1.0.4 - resolution: "is-shared-array-buffer@npm:1.0.4" - dependencies: - call-bound: "npm:^1.0.3" - checksum: 10c0/65158c2feb41ff1edd6bbd6fd8403a69861cf273ff36077982b5d4d68e1d59278c71691216a4a64632bd76d4792d4d1d2553901b6666d84ade13bba5ea7bc7db - languageName: node - linkType: hard - -"is-string@npm:^1.0.7, is-string@npm:^1.1.1": - version: 1.1.1 - resolution: "is-string@npm:1.1.1" - dependencies: - call-bound: "npm:^1.0.3" - has-tostringtag: "npm:^1.0.2" - checksum: 10c0/2f518b4e47886bb81567faba6ffd0d8a8333cf84336e2e78bf160693972e32ad00fe84b0926491cc598dee576fdc55642c92e62d0cbe96bf36f643b6f956f94d - languageName: node - linkType: hard - -"is-symbol@npm:^1.0.4, is-symbol@npm:^1.1.1": - version: 1.1.1 - resolution: "is-symbol@npm:1.1.1" - dependencies: - call-bound: "npm:^1.0.2" - has-symbols: "npm:^1.1.0" - safe-regex-test: "npm:^1.1.0" - checksum: 10c0/f08f3e255c12442e833f75a9e2b84b2d4882fdfd920513cf2a4a2324f0a5b076c8fd913778e3ea5d258d5183e9d92c0cd20e04b03ab3df05316b049b2670af1e - languageName: node - linkType: hard - -"is-typed-array@npm:^1.1.13, is-typed-array@npm:^1.1.14, is-typed-array@npm:^1.1.15": - version: 1.1.15 - resolution: "is-typed-array@npm:1.1.15" - dependencies: - which-typed-array: "npm:^1.1.16" - checksum: 10c0/415511da3669e36e002820584e264997ffe277ff136643a3126cc949197e6ca3334d0f12d084e83b1994af2e9c8141275c741cf2b7da5a2ff62dd0cac26f76c4 - languageName: node - linkType: hard - -"is-unicode-supported@npm:^0.1.0": - version: 0.1.0 - resolution: "is-unicode-supported@npm:0.1.0" - checksum: 10c0/00cbe3455c3756be68d2542c416cab888aebd5012781d6819749fefb15162ff23e38501fe681b3d751c73e8ff561ac09a5293eba6f58fdf0178462ce6dcb3453 - languageName: node - linkType: hard - -"is-weakmap@npm:^2.0.2": - version: 2.0.2 - resolution: "is-weakmap@npm:2.0.2" - checksum: 10c0/443c35bb86d5e6cc5929cd9c75a4024bb0fff9586ed50b092f94e700b89c43a33b186b76dbc6d54f3d3d09ece689ab38dcdc1af6a482cbe79c0f2da0a17f1299 - languageName: node - linkType: hard - -"is-weakref@npm:^1.0.2, is-weakref@npm:^1.1.0": - version: 1.1.0 - resolution: "is-weakref@npm:1.1.0" - dependencies: - call-bound: "npm:^1.0.2" - checksum: 10c0/aa835f62e29cb60132ecb3ec7d11bd0f39ec7322325abe8412b805aef47153ec2daefdb21759b049711c674f49b13202a31d8d126bcdff7d8671c78babd4ae5b - languageName: node - linkType: hard - -"is-weakset@npm:^2.0.3": - version: 2.0.4 - resolution: "is-weakset@npm:2.0.4" - dependencies: - call-bound: "npm:^1.0.3" - get-intrinsic: "npm:^1.2.6" - checksum: 10c0/6491eba08acb8dc9532da23cb226b7d0192ede0b88f16199e592e4769db0a077119c1f5d2283d1e0d16d739115f70046e887e477eb0e66cd90e1bb29f28ba647 - languageName: node - linkType: hard - -"isarray@npm:^2.0.5": - version: 2.0.5 - resolution: "isarray@npm:2.0.5" - checksum: 10c0/4199f14a7a13da2177c66c31080008b7124331956f47bca57dd0b6ea9f11687aa25e565a2c7a2b519bc86988d10398e3049a1f5df13c9f6b7664154690ae79fd - languageName: node - linkType: hard - -"isbinaryfile@npm:^4.0.8": - version: 4.0.10 - resolution: "isbinaryfile@npm:4.0.10" - checksum: 10c0/0703d8cfeb69ed79e6d173120f327450011a066755150a6bbf97ffecec1069a5f2092777868315b21359098c84b54984871cad1abce877ad9141fb2caf3dcabf - languageName: node - linkType: hard - -"isbinaryfile@npm:^5.0.0": - version: 5.0.4 - resolution: "isbinaryfile@npm:5.0.4" - checksum: 10c0/fea255bfae67ff4827e8dd2238d6700d4803d02b4d892b72eeac4541487284e901251a3427966af5018d4eb29fa155b036dcb75dd217634146a072991afbc2c2 - languageName: node - linkType: hard - -"isexe@npm:^2.0.0": - version: 2.0.0 - resolution: "isexe@npm:2.0.0" - checksum: 10c0/228cfa503fadc2c31596ab06ed6aa82c9976eec2bfd83397e7eaf06d0ccf42cd1dfd6743bf9aeb01aebd4156d009994c5f76ea898d2832c1fe342da923ca457d - languageName: node - linkType: hard - -"isexe@npm:^3.1.1": - version: 3.1.1 - resolution: "isexe@npm:3.1.1" - checksum: 10c0/9ec257654093443eb0a528a9c8cbba9c0ca7616ccb40abd6dde7202734d96bb86e4ac0d764f0f8cd965856aacbff2f4ce23e730dc19dfb41e3b0d865ca6fdcc7 - languageName: node - linkType: hard - -"jackspeak@npm:^3.1.2": - version: 3.4.3 - resolution: "jackspeak@npm:3.4.3" - dependencies: - "@isaacs/cliui": "npm:^8.0.2" - "@pkgjs/parseargs": "npm:^0.11.0" - dependenciesMeta: - "@pkgjs/parseargs": - optional: true - checksum: 10c0/6acc10d139eaefdbe04d2f679e6191b3abf073f111edf10b1de5302c97ec93fffeb2fdd8681ed17f16268aa9dd4f8c588ed9d1d3bffbbfa6e8bf897cbb3149b9 - languageName: node - linkType: hard - -"jackspeak@npm:^4.0.1": - version: 4.0.2 - resolution: "jackspeak@npm:4.0.2" - dependencies: - "@isaacs/cliui": "npm:^8.0.2" - checksum: 10c0/b26039d11c0163a95b1e58851b9ac453cce64ad6d1eb98a00b303ad5eeb761b29d33c9419d1e16c016d3f7151c8edf7df223e6cf93a1907655fd95d6ce85c0de - languageName: node - linkType: hard - -"jake@npm:^10.8.5": - version: 10.9.2 - resolution: "jake@npm:10.9.2" - dependencies: - async: "npm:^3.2.3" - chalk: "npm:^4.0.2" - filelist: "npm:^1.0.4" - minimatch: "npm:^3.1.2" - bin: - jake: bin/cli.js - checksum: 10c0/c4597b5ed9b6a908252feab296485a4f87cba9e26d6c20e0ca144fb69e0c40203d34a2efddb33b3d297b8bd59605e6c1f44f6221ca1e10e69175ecbf3ff5fe31 - languageName: node - linkType: hard - -"jiti@npm:^2.4.2": - version: 2.6.1 - resolution: "jiti@npm:2.6.1" - bin: - jiti: lib/jiti-cli.mjs - checksum: 10c0/79b2e96a8e623f66c1b703b98ec1b8be4500e1d217e09b09e343471bbb9c105381b83edbb979d01cef18318cc45ce6e153571b6c83122170eefa531c64b6789b - languageName: node - linkType: hard - -"js-yaml@npm:^4.1.0": - version: 4.1.0 - resolution: "js-yaml@npm:4.1.0" - dependencies: - argparse: "npm:^2.0.1" - bin: - js-yaml: bin/js-yaml.js - checksum: 10c0/184a24b4eaacfce40ad9074c64fd42ac83cf74d8c8cd137718d456ced75051229e5061b8633c3366b8aada17945a7a356b337828c19da92b51ae62126575018f - languageName: node - linkType: hard - -"jsbn@npm:1.1.0": - version: 1.1.0 - resolution: "jsbn@npm:1.1.0" - checksum: 10c0/4f907fb78d7b712e11dea8c165fe0921f81a657d3443dde75359ed52eb2b5d33ce6773d97985a089f09a65edd80b11cb75c767b57ba47391fee4c969f7215c96 - languageName: node - linkType: hard - -"json-buffer@npm:3.0.1": - version: 3.0.1 - resolution: "json-buffer@npm:3.0.1" - checksum: 10c0/0d1c91569d9588e7eef2b49b59851f297f3ab93c7b35c7c221e288099322be6b562767d11e4821da500f3219542b9afd2e54c5dc573107c1126ed1080f8e96d7 - languageName: node - linkType: hard - -"json-schema-traverse@npm:^0.4.1": - version: 0.4.1 - resolution: "json-schema-traverse@npm:0.4.1" - checksum: 10c0/108fa90d4cc6f08243aedc6da16c408daf81793bf903e9fd5ab21983cda433d5d2da49e40711da016289465ec2e62e0324dcdfbc06275a607fe3233fde4942ce - languageName: node - linkType: hard - -"json-stable-stringify-without-jsonify@npm:^1.0.1": - version: 1.0.1 - resolution: "json-stable-stringify-without-jsonify@npm:1.0.1" - checksum: 10c0/cb168b61fd4de83e58d09aaa6425ef71001bae30d260e2c57e7d09a5fd82223e2f22a042dedaab8db23b7d9ae46854b08bb1f91675a8be11c5cffebef5fb66a5 - languageName: node - linkType: hard - -"json-stringify-safe@npm:^5.0.1": - version: 5.0.1 - resolution: "json-stringify-safe@npm:5.0.1" - checksum: 10c0/7dbf35cd0411d1d648dceb6d59ce5857ec939e52e4afc37601aa3da611f0987d5cee5b38d58329ceddf3ed48bd7215229c8d52059ab01f2444a338bf24ed0f37 - languageName: node - linkType: hard - -"json5@npm:^1.0.2": - version: 1.0.2 - resolution: "json5@npm:1.0.2" - dependencies: - minimist: "npm:^1.2.0" - bin: - json5: lib/cli.js - checksum: 10c0/9ee316bf21f000b00752e6c2a3b79ecf5324515a5c60ee88983a1910a45426b643a4f3461657586e8aeca87aaf96f0a519b0516d2ae527a6c3e7eed80f68717f - languageName: node - linkType: hard - -"json5@npm:^2.2.3": - version: 2.2.3 - resolution: "json5@npm:2.2.3" - bin: - json5: lib/cli.js - checksum: 10c0/5a04eed94810fa55c5ea138b2f7a5c12b97c3750bc63d11e511dcecbfef758003861522a070c2272764ee0f4e3e323862f386945aeb5b85b87ee43f084ba586c - languageName: node - linkType: hard - -"jsonfile@npm:^4.0.0": - version: 4.0.0 - resolution: "jsonfile@npm:4.0.0" - dependencies: - graceful-fs: "npm:^4.1.6" - dependenciesMeta: - graceful-fs: - optional: true - checksum: 10c0/7dc94b628d57a66b71fb1b79510d460d662eb975b5f876d723f81549c2e9cd316d58a2ddf742b2b93a4fa6b17b2accaf1a738a0e2ea114bdfb13a32e5377e480 - languageName: node - linkType: hard - -"jsonfile@npm:^6.0.1": - version: 6.1.0 - resolution: "jsonfile@npm:6.1.0" - dependencies: - graceful-fs: "npm:^4.1.6" - universalify: "npm:^2.0.0" - dependenciesMeta: - graceful-fs: - optional: true - checksum: 10c0/4f95b5e8a5622b1e9e8f33c96b7ef3158122f595998114d1e7f03985649ea99cb3cd99ce1ed1831ae94c8c8543ab45ebd044207612f31a56fd08462140e46865 - languageName: node - linkType: hard - -"keyv@npm:^4.0.0, keyv@npm:^4.5.4": - version: 4.5.4 - resolution: "keyv@npm:4.5.4" - dependencies: - json-buffer: "npm:3.0.1" - checksum: 10c0/aa52f3c5e18e16bb6324876bb8b59dd02acf782a4b789c7b2ae21107fab95fab3890ed448d4f8dba80ce05391eeac4bfabb4f02a20221342982f806fa2cf271e - languageName: node - linkType: hard - -"lazy-val@npm:^1.0.5": - version: 1.0.5 - resolution: "lazy-val@npm:1.0.5" - checksum: 10c0/28ba7a0e704895a444eed47d110274090f485b991f2ea6fff2ab0878c529c53f60f2eb2d944cbbd68b91408e7455eabc62861c48289d4757fa9c818b97454f24 - languageName: node - linkType: hard - -"levn@npm:^0.4.1": - version: 0.4.1 - resolution: "levn@npm:0.4.1" - dependencies: - prelude-ls: "npm:^1.2.1" - type-check: "npm:~0.4.0" - checksum: 10c0/effb03cad7c89dfa5bd4f6989364bfc79994c2042ec5966cb9b95990e2edee5cd8969ddf42616a0373ac49fac1403437deaf6e9050fbbaa3546093a59b9ac94e - languageName: node - linkType: hard - -"locate-path@npm:^6.0.0": - version: 6.0.0 - resolution: "locate-path@npm:6.0.0" - dependencies: - p-locate: "npm:^5.0.0" - checksum: 10c0/d3972ab70dfe58ce620e64265f90162d247e87159b6126b01314dd67be43d50e96a50b517bce2d9452a79409c7614054c277b5232377de50416564a77ac7aad3 - languageName: node - linkType: hard - -"lodash.merge@npm:^4.6.2": - version: 4.6.2 - resolution: "lodash.merge@npm:4.6.2" - checksum: 10c0/402fa16a1edd7538de5b5903a90228aa48eb5533986ba7fa26606a49db2572bf414ff73a2c9f5d5fd36b31c46a5d5c7e1527749c07cbcf965ccff5fbdf32c506 - languageName: node - linkType: hard - -"lodash@npm:^4.17.15": - version: 4.17.21 - resolution: "lodash@npm:4.17.21" - checksum: 10c0/d8cbea072bb08655bb4c989da418994b073a608dffa608b09ac04b43a791b12aeae7cd7ad919aa4c925f33b48490b5cfe6c1f71d827956071dae2e7bb3a6b74c - languageName: node - linkType: hard - -"log-symbols@npm:^4.1.0": - version: 4.1.0 - resolution: "log-symbols@npm:4.1.0" - dependencies: - chalk: "npm:^4.1.0" - is-unicode-supported: "npm:^0.1.0" - checksum: 10c0/67f445a9ffa76db1989d0fa98586e5bc2fd5247260dafb8ad93d9f0ccd5896d53fb830b0e54dade5ad838b9de2006c826831a3c528913093af20dff8bd24aca6 - languageName: node - linkType: hard - -"lowercase-keys@npm:^2.0.0": - version: 2.0.0 - resolution: "lowercase-keys@npm:2.0.0" - checksum: 10c0/f82a2b3568910509da4b7906362efa40f5b54ea14c2584778ddb313226f9cbf21020a5db35f9b9a0e95847a9b781d548601f31793d736b22a2b8ae8eb9ab1082 - languageName: node - linkType: hard - -"lru-cache@npm:^10.0.1, lru-cache@npm:^10.2.0": - version: 10.4.3 - resolution: "lru-cache@npm:10.4.3" - checksum: 10c0/ebd04fbca961e6c1d6c0af3799adcc966a1babe798f685bb84e6599266599cd95d94630b10262f5424539bc4640107e8a33aa28585374abf561d30d16f4b39fb - languageName: node - linkType: hard - -"lru-cache@npm:^11.0.0": - version: 11.0.2 - resolution: "lru-cache@npm:11.0.2" - checksum: 10c0/c993b8e06ead0b24b969c1dbb5b301716aed66e320e9014a80012f5febe280b438f28ff50046b2c55ff404e889351ccb332ff91f8dd175a21f5eae80e3fb155f - languageName: node - linkType: hard - -"lru-cache@npm:^6.0.0": - version: 6.0.0 - resolution: "lru-cache@npm:6.0.0" - dependencies: - yallist: "npm:^4.0.0" - checksum: 10c0/cb53e582785c48187d7a188d3379c181b5ca2a9c78d2bce3e7dee36f32761d1c42983da3fe12b55cb74e1779fa94cdc2e5367c028a9b35317184ede0c07a30a9 - languageName: node - linkType: hard - -"make-fetch-happen@npm:^14.0.3": - version: 14.0.3 - resolution: "make-fetch-happen@npm:14.0.3" - dependencies: - "@npmcli/agent": "npm:^3.0.0" - cacache: "npm:^19.0.1" - http-cache-semantics: "npm:^4.1.1" - minipass: "npm:^7.0.2" - minipass-fetch: "npm:^4.0.0" - minipass-flush: "npm:^1.0.5" - minipass-pipeline: "npm:^1.2.4" - negotiator: "npm:^1.0.0" - proc-log: "npm:^5.0.0" - promise-retry: "npm:^2.0.1" - ssri: "npm:^12.0.0" - checksum: 10c0/c40efb5e5296e7feb8e37155bde8eb70bc57d731b1f7d90e35a092fde403d7697c56fb49334d92d330d6f1ca29a98142036d6480a12681133a0a1453164cb2f0 - languageName: node - linkType: hard - -"matcher@npm:^3.0.0": - version: 3.0.0 - resolution: "matcher@npm:3.0.0" - dependencies: - escape-string-regexp: "npm:^4.0.0" - checksum: 10c0/2edf24194a2879690bcdb29985fc6bc0d003df44e04df21ebcac721fa6ce2f6201c579866bb92f9380bffe946f11ecd8cd31f34117fb67ebf8aca604918e127e - languageName: node - linkType: hard - -"math-intrinsics@npm:^1.1.0": - version: 1.1.0 - resolution: "math-intrinsics@npm:1.1.0" - checksum: 10c0/7579ff94e899e2f76ab64491d76cf606274c874d8f2af4a442c016bd85688927fcfca157ba6bf74b08e9439dc010b248ce05b96cc7c126a354c3bae7fcb48b7f - languageName: node - linkType: hard - -"merge2@npm:^1.3.0": - version: 1.4.1 - resolution: "merge2@npm:1.4.1" - checksum: 10c0/254a8a4605b58f450308fc474c82ac9a094848081bf4c06778200207820e5193726dc563a0d2c16468810516a5c97d9d3ea0ca6585d23c58ccfff2403e8dbbeb - languageName: node - linkType: hard - -"micromatch@npm:^4.0.8": - version: 4.0.8 - resolution: "micromatch@npm:4.0.8" - dependencies: - braces: "npm:^3.0.3" - picomatch: "npm:^2.3.1" - checksum: 10c0/166fa6eb926b9553f32ef81f5f531d27b4ce7da60e5baf8c021d043b27a388fb95e46a8038d5045877881e673f8134122b59624d5cecbd16eb50a42e7a6b5ca8 - languageName: node - linkType: hard - -"mime-db@npm:1.52.0": - version: 1.52.0 - resolution: "mime-db@npm:1.52.0" - checksum: 10c0/0557a01deebf45ac5f5777fe7740b2a5c309c6d62d40ceab4e23da9f821899ce7a900b7ac8157d4548ddbb7beffe9abc621250e6d182b0397ec7f10c7b91a5aa - languageName: node - linkType: hard - -"mime-db@npm:^1.54.0": - version: 1.54.0 - resolution: "mime-db@npm:1.54.0" - checksum: 10c0/8d907917bc2a90fa2df842cdf5dfeaf509adc15fe0531e07bb2f6ab15992416479015828d6a74200041c492e42cce3ebf78e5ce714388a0a538ea9c53eece284 - languageName: node - linkType: hard - -"mime-types@npm:^2.1.12": - version: 2.1.35 - resolution: "mime-types@npm:2.1.35" - dependencies: - mime-db: "npm:1.52.0" - checksum: 10c0/82fb07ec56d8ff1fc999a84f2f217aa46cb6ed1033fefaabd5785b9a974ed225c90dc72fff460259e66b95b73648596dbcc50d51ed69cdf464af2d237d3149b2 - languageName: node - linkType: hard - -"mime-types@npm:^3.0.1": - version: 3.0.1 - resolution: "mime-types@npm:3.0.1" - dependencies: - mime-db: "npm:^1.54.0" - checksum: 10c0/bd8c20d3694548089cf229016124f8f40e6a60bbb600161ae13e45f793a2d5bb40f96bbc61f275836696179c77c1d6bf4967b2a75e0a8ad40fe31f4ed5be4da5 - languageName: node - linkType: hard - -"mime@npm:^2.5.2": - version: 2.6.0 - resolution: "mime@npm:2.6.0" - bin: - mime: cli.js - checksum: 10c0/a7f2589900d9c16e3bdf7672d16a6274df903da958c1643c9c45771f0478f3846dcb1097f31eb9178452570271361e2149310931ec705c037210fc69639c8e6c - languageName: node - linkType: hard - -"mimic-fn@npm:^2.1.0": - version: 2.1.0 - resolution: "mimic-fn@npm:2.1.0" - checksum: 10c0/b26f5479d7ec6cc2bce275a08f146cf78f5e7b661b18114e2506dd91ec7ec47e7a25bf4360e5438094db0560bcc868079fb3b1fb3892b833c1ecbf63f80c95a4 - languageName: node - linkType: hard - -"mimic-response@npm:^1.0.0": - version: 1.0.1 - resolution: "mimic-response@npm:1.0.1" - checksum: 10c0/c5381a5eae997f1c3b5e90ca7f209ed58c3615caeee850e85329c598f0c000ae7bec40196580eef1781c60c709f47258131dab237cad8786f8f56750594f27fa - languageName: node - linkType: hard - -"mimic-response@npm:^3.1.0": - version: 3.1.0 - resolution: "mimic-response@npm:3.1.0" - checksum: 10c0/0d6f07ce6e03e9e4445bee655202153bdb8a98d67ee8dc965ac140900d7a2688343e6b4c9a72cfc9ef2f7944dfd76eef4ab2482eb7b293a68b84916bac735362 - languageName: node - linkType: hard - -"minimatch@npm:^10.0.0": - version: 10.0.1 - resolution: "minimatch@npm:10.0.1" - dependencies: - brace-expansion: "npm:^2.0.1" - checksum: 10c0/e6c29a81fe83e1877ad51348306be2e8aeca18c88fdee7a99df44322314279e15799e41d7cb274e4e8bb0b451a3bc622d6182e157dfa1717d6cda75e9cd8cd5d - languageName: node - linkType: hard - -"minimatch@npm:^10.0.3": - version: 10.1.2 - resolution: "minimatch@npm:10.1.2" - dependencies: - "@isaacs/brace-expansion": "npm:^5.0.1" - checksum: 10c0/0cccef3622201703de6ecf9d772c0be1d5513dcc038ed9feb866c20cf798243e678ac35605dac3f1a054650c28037486713fe9e9a34b184b9097959114daf086 - languageName: node - linkType: hard - -"minimatch@npm:^3.0.4, minimatch@npm:^3.0.5, minimatch@npm:^3.1.1, minimatch@npm:^3.1.2": - version: 3.1.2 - resolution: "minimatch@npm:3.1.2" - dependencies: - brace-expansion: "npm:^1.1.7" - checksum: 10c0/0262810a8fc2e72cca45d6fd86bd349eee435eb95ac6aa45c9ea2180e7ee875ef44c32b55b5973ceabe95ea12682f6e3725cbb63d7a2d1da3ae1163c8b210311 - languageName: node - linkType: hard - -"minimatch@npm:^5.0.1": - version: 5.1.6 - resolution: "minimatch@npm:5.1.6" - dependencies: - brace-expansion: "npm:^2.0.1" - checksum: 10c0/3defdfd230914f22a8da203747c42ee3c405c39d4d37ffda284dac5e45b7e1f6c49aa8be606509002898e73091ff2a3bbfc59c2c6c71d4660609f63aa92f98e3 - languageName: node - linkType: hard - -"minimatch@npm:^9.0.3, minimatch@npm:^9.0.4": - version: 9.0.5 - resolution: "minimatch@npm:9.0.5" - dependencies: - brace-expansion: "npm:^2.0.1" - checksum: 10c0/de96cf5e35bdf0eab3e2c853522f98ffbe9a36c37797778d2665231ec1f20a9447a7e567cb640901f89e4daaa95ae5d70c65a9e8aa2bb0019b6facbc3c0575ed - languageName: node - linkType: hard - -"minimist@npm:*, minimist@npm:^1.2.0, minimist@npm:^1.2.5, minimist@npm:^1.2.6": - version: 1.2.8 - resolution: "minimist@npm:1.2.8" - checksum: 10c0/19d3fcdca050087b84c2029841a093691a91259a47def2f18222f41e7645a0b7c44ef4b40e88a1e58a40c84d2ef0ee6047c55594d298146d0eb3f6b737c20ce6 - languageName: node - linkType: hard - -"minipass-collect@npm:^2.0.1": - version: 2.0.1 - resolution: "minipass-collect@npm:2.0.1" - dependencies: - minipass: "npm:^7.0.3" - checksum: 10c0/5167e73f62bb74cc5019594709c77e6a742051a647fe9499abf03c71dca75515b7959d67a764bdc4f8b361cf897fbf25e2d9869ee039203ed45240f48b9aa06e - languageName: node - linkType: hard - -"minipass-fetch@npm:^4.0.0": - version: 4.0.0 - resolution: "minipass-fetch@npm:4.0.0" - dependencies: - encoding: "npm:^0.1.13" - minipass: "npm:^7.0.3" - minipass-sized: "npm:^1.0.3" - minizlib: "npm:^3.0.1" - dependenciesMeta: - encoding: - optional: true - checksum: 10c0/7fa30ce7c373fb6f94c086b374fff1589fd7e78451855d2d06c2e2d9df936d131e73e952163063016592ed3081444bd8d1ea608533313b0149156ce23311da4b - languageName: node - linkType: hard - -"minipass-flush@npm:^1.0.5": - version: 1.0.5 - resolution: "minipass-flush@npm:1.0.5" - dependencies: - minipass: "npm:^3.0.0" - checksum: 10c0/2a51b63feb799d2bb34669205eee7c0eaf9dce01883261a5b77410c9408aa447e478efd191b4de6fc1101e796ff5892f8443ef20d9544385819093dbb32d36bd - languageName: node - linkType: hard - -"minipass-pipeline@npm:^1.2.4": - version: 1.2.4 - resolution: "minipass-pipeline@npm:1.2.4" - dependencies: - minipass: "npm:^3.0.0" - checksum: 10c0/cbda57cea20b140b797505dc2cac71581a70b3247b84480c1fed5ca5ba46c25ecc25f68bfc9e6dcb1a6e9017dab5c7ada5eab73ad4f0a49d84e35093e0c643f2 - languageName: node - linkType: hard - -"minipass-sized@npm:^1.0.3": - version: 1.0.3 - resolution: "minipass-sized@npm:1.0.3" - dependencies: - minipass: "npm:^3.0.0" - checksum: 10c0/298f124753efdc745cfe0f2bdfdd81ba25b9f4e753ca4a2066eb17c821f25d48acea607dfc997633ee5bf7b6dfffb4eee4f2051eb168663f0b99fad2fa4829cb - languageName: node - linkType: hard - -"minipass@npm:^3.0.0": - version: 3.3.6 - resolution: "minipass@npm:3.3.6" - dependencies: - yallist: "npm:^4.0.0" - checksum: 10c0/a114746943afa1dbbca8249e706d1d38b85ed1298b530f5808ce51f8e9e941962e2a5ad2e00eae7dd21d8a4aae6586a66d4216d1a259385e9d0358f0c1eba16c - languageName: node - linkType: hard - -"minipass@npm:^5.0.0 || ^6.0.2 || ^7.0.0, minipass@npm:^7.0.2, minipass@npm:^7.0.3, minipass@npm:^7.0.4, minipass@npm:^7.1.2": - version: 7.1.2 - resolution: "minipass@npm:7.1.2" - checksum: 10c0/b0fd20bb9fb56e5fa9a8bfac539e8915ae07430a619e4b86ff71f5fc757ef3924b23b2c4230393af1eda647ed3d75739e4e0acb250a6b1eb277cf7f8fe449557 - languageName: node - linkType: hard - -"minizlib@npm:^3.0.1": - version: 3.0.1 - resolution: "minizlib@npm:3.0.1" - dependencies: - minipass: "npm:^7.0.4" - rimraf: "npm:^5.0.5" - checksum: 10c0/82f8bf70da8af656909a8ee299d7ed3b3372636749d29e105f97f20e88971be31f5ed7642f2e898f00283b68b701cc01307401cdc209b0efc5dd3818220e5093 - languageName: node - linkType: hard - -"minizlib@npm:^3.1.0": - version: 3.1.0 - resolution: "minizlib@npm:3.1.0" - dependencies: - minipass: "npm:^7.1.2" - checksum: 10c0/5aad75ab0090b8266069c9aabe582c021ae53eb33c6c691054a13a45db3b4f91a7fb1bd79151e6b4e9e9a86727b522527c0a06ec7d45206b745d54cd3097bcec - languageName: node - linkType: hard - -"mkdirp@npm:^3.0.1": - version: 3.0.1 - resolution: "mkdirp@npm:3.0.1" - bin: - mkdirp: dist/cjs/src/bin.js - checksum: 10c0/9f2b975e9246351f5e3a40dcfac99fcd0baa31fbfab615fe059fb11e51f10e4803c63de1f384c54d656e4db31d000e4767e9ef076a22e12a641357602e31d57d - languageName: node - linkType: hard - -"module-alias@npm:^2.2.3": - version: 2.2.3 - resolution: "module-alias@npm:2.2.3" - checksum: 10c0/47dc5b6d04f6e7df0ff330ca9b2a37c688a682ed661e9432b0b327e1e6c43eedad052151b8d50d6beea8b924828d2a92fa4625c18d651bf2d93d8f03aa0172fa - languageName: node - linkType: hard - -"moment-timezone@npm:^0.5.46": - version: 0.5.46 - resolution: "moment-timezone@npm:0.5.46" - dependencies: - moment: "npm:^2.29.4" - checksum: 10c0/003fd278d1aa3e63afff340a318735db80157b7a343e3f807cac10e026def214f0e71b52d582b89a11ee0a19f5d9f0da2752b7959d855429f2b715d4859d3722 - languageName: node - linkType: hard - -"moment@npm:^2.29.4": - version: 2.30.1 - resolution: "moment@npm:2.30.1" - checksum: 10c0/865e4279418c6de666fca7786607705fd0189d8a7b7624e2e56be99290ac846f90878a6f602e34b4e0455c549b85385b1baf9966845962b313699e7cb847543a - languageName: node - linkType: hard - -"ms@npm:^2.1.1, ms@npm:^2.1.3": - version: 2.1.3 - resolution: "ms@npm:2.1.3" - checksum: 10c0/d924b57e7312b3b63ad21fc5b3dc0af5e78d61a1fc7cfb5457edaf26326bf62be5307cc87ffb6862ef1c2b33b0233cdb5d4f01c4c958cc0d660948b65a287a48 - languageName: node - linkType: hard - -"natural-compare@npm:^1.4.0": - version: 1.4.0 - resolution: "natural-compare@npm:1.4.0" - checksum: 10c0/f5f9a7974bfb28a91afafa254b197f0f22c684d4a1731763dda960d2c8e375b36c7d690e0d9dc8fba774c537af14a7e979129bca23d88d052fbeb9466955e447 - languageName: node - linkType: hard - -"negotiator@npm:^1.0.0": - version: 1.0.0 - resolution: "negotiator@npm:1.0.0" - checksum: 10c0/4c559dd52669ea48e1914f9d634227c561221dd54734070791f999c52ed0ff36e437b2e07d5c1f6e32909fc625fe46491c16e4a8f0572567d4dd15c3a4fda04b - languageName: node - linkType: hard - -"node-abi@npm:^4.2.0": - version: 4.26.0 - resolution: "node-abi@npm:4.26.0" - dependencies: - semver: "npm:^7.6.3" - checksum: 10c0/73a1c144b46cd3dafa9a92e068f756f0d6418c7136bc974b1da2eb43c218f468832661bfa499ed85e24c1eabde76ba09b1c4726e2830af709353f71af0c9ae32 - languageName: node - linkType: hard - -"node-addon-api@npm:^1.6.3": - version: 1.7.2 - resolution: "node-addon-api@npm:1.7.2" - dependencies: - node-gyp: "npm:latest" - checksum: 10c0/bcf526f2ce788182730d3c3df5206585873d1e837a6e1378ff84abccf2f19cf3f93a8274f9c1245af0de63a0dbd1bb95ca2f767ecf5c678d6930326aaf396c4e - languageName: node - linkType: hard - -"node-api-version@npm:^0.2.1": - version: 0.2.1 - resolution: "node-api-version@npm:0.2.1" - dependencies: - semver: "npm:^7.3.5" - checksum: 10c0/3fe6c273e4f9dd184bb8b959ba3d8afae7eade663611d82c8538c79ac3a7b8f1d136632ceb4bf8cdc46a851fc169407746996cf7d1096de9a186e0e70fca95fa - languageName: node - linkType: hard - -"node-gyp@npm:^11.2.0": - version: 11.5.0 - resolution: "node-gyp@npm:11.5.0" - dependencies: - env-paths: "npm:^2.2.0" - exponential-backoff: "npm:^3.1.1" - graceful-fs: "npm:^4.2.6" - make-fetch-happen: "npm:^14.0.3" - nopt: "npm:^8.0.0" - proc-log: "npm:^5.0.0" - semver: "npm:^7.3.5" - tar: "npm:^7.4.3" - tinyglobby: "npm:^0.2.12" - which: "npm:^5.0.0" - bin: - node-gyp: bin/node-gyp.js - checksum: 10c0/31ff49586991b38287bb15c3d529dd689cfc32f992eed9e6997b9d712d5d21fe818a8b1bbfe3b76a7e33765c20210c5713212f4aa329306a615b87d8a786da3a - languageName: node - linkType: hard - -"node-gyp@npm:latest": - version: 11.0.0 - resolution: "node-gyp@npm:11.0.0" - dependencies: - env-paths: "npm:^2.2.0" - exponential-backoff: "npm:^3.1.1" - glob: "npm:^10.3.10" - graceful-fs: "npm:^4.2.6" - make-fetch-happen: "npm:^14.0.3" - nopt: "npm:^8.0.0" - proc-log: "npm:^5.0.0" - semver: "npm:^7.3.5" - tar: "npm:^7.4.3" - which: "npm:^5.0.0" - bin: - node-gyp: bin/node-gyp.js - checksum: 10c0/a3b885bbee2d271f1def32ba2e30ffcf4562a3db33af06b8b365e053153e2dd2051b9945783c3c8e852d26a0f20f65b251c7e83361623383a99635c0280ee573 - languageName: node - linkType: hard - -"nopt@npm:^8.0.0": - version: 8.1.0 - resolution: "nopt@npm:8.1.0" - dependencies: - abbrev: "npm:^3.0.0" - bin: - nopt: bin/nopt.js - checksum: 10c0/62e9ea70c7a3eb91d162d2c706b6606c041e4e7b547cbbb48f8b3695af457dd6479904d7ace600856bf923dd8d1ed0696f06195c8c20f02ac87c1da0e1d315ef - languageName: node - linkType: hard - -"normalize-url@npm:^6.0.1": - version: 6.1.0 - resolution: "normalize-url@npm:6.1.0" - checksum: 10c0/95d948f9bdd2cfde91aa786d1816ae40f8262946e13700bf6628105994fe0ff361662c20af3961161c38a119dc977adeb41fc0b41b1745eb77edaaf9cb22db23 - languageName: node - linkType: hard - -"object-inspect@npm:^1.13.3": - version: 1.13.3 - resolution: "object-inspect@npm:1.13.3" - checksum: 10c0/cc3f15213406be89ffdc54b525e115156086796a515410a8d390215915db9f23c8eab485a06f1297402f440a33715fe8f71a528c1dcbad6e1a3bcaf5a46921d4 - languageName: node - linkType: hard - -"object-keys@npm:^1.1.1": - version: 1.1.1 - resolution: "object-keys@npm:1.1.1" - checksum: 10c0/b11f7ccdbc6d406d1f186cdadb9d54738e347b2692a14439ca5ac70c225fa6db46db809711b78589866d47b25fc3e8dee0b4c722ac751e11180f9380e3d8601d - languageName: node - linkType: hard - -"object.assign@npm:^4.1.7": - version: 4.1.7 - resolution: "object.assign@npm:4.1.7" - dependencies: - call-bind: "npm:^1.0.8" - call-bound: "npm:^1.0.3" - define-properties: "npm:^1.2.1" - es-object-atoms: "npm:^1.0.0" - has-symbols: "npm:^1.1.0" - object-keys: "npm:^1.1.1" - checksum: 10c0/3b2732bd860567ea2579d1567525168de925a8d852638612846bd8082b3a1602b7b89b67b09913cbb5b9bd6e95923b2ae73580baa9d99cb4e990564e8cbf5ddc - languageName: node - linkType: hard - -"object.fromentries@npm:^2.0.8": - version: 2.0.8 - resolution: "object.fromentries@npm:2.0.8" - dependencies: - call-bind: "npm:^1.0.7" - define-properties: "npm:^1.2.1" - es-abstract: "npm:^1.23.2" - es-object-atoms: "npm:^1.0.0" - checksum: 10c0/cd4327e6c3369cfa805deb4cbbe919bfb7d3aeebf0bcaba291bb568ea7169f8f8cdbcabe2f00b40db0c20cd20f08e11b5f3a5a36fb7dd3fe04850c50db3bf83b - languageName: node - linkType: hard - -"object.groupby@npm:^1.0.3": - version: 1.0.3 - resolution: "object.groupby@npm:1.0.3" - dependencies: - call-bind: "npm:^1.0.7" - define-properties: "npm:^1.2.1" - es-abstract: "npm:^1.23.2" - checksum: 10c0/60d0455c85c736fbfeda0217d1a77525956f76f7b2495edeca9e9bbf8168a45783199e77b894d30638837c654d0cc410e0e02cbfcf445bc8de71c3da1ede6a9c - languageName: node - linkType: hard - -"object.values@npm:^1.2.0": - version: 1.2.1 - resolution: "object.values@npm:1.2.1" - dependencies: - call-bind: "npm:^1.0.8" - call-bound: "npm:^1.0.3" - define-properties: "npm:^1.2.1" - es-object-atoms: "npm:^1.0.0" - checksum: 10c0/3c47814fdc64842ae3d5a74bc9d06bdd8d21563c04d9939bf6716a9c00596a4ebc342552f8934013d1ec991c74e3671b26710a0c51815f0b603795605ab6b2c9 - languageName: node - linkType: hard - -"once@npm:^1.3.0, once@npm:^1.3.1, once@npm:^1.4.0": - version: 1.4.0 - resolution: "once@npm:1.4.0" - dependencies: - wrappy: "npm:1" - checksum: 10c0/5d48aca287dfefabd756621c5dfce5c91a549a93e9fdb7b8246bc4c4790aa2ec17b34a260530474635147aeb631a2dcc8b32c613df0675f96041cbb8244517d0 - languageName: node - linkType: hard - -"onetime@npm:^5.1.0": - version: 5.1.2 - resolution: "onetime@npm:5.1.2" - dependencies: - mimic-fn: "npm:^2.1.0" - checksum: 10c0/ffcef6fbb2692c3c40749f31ea2e22677a876daea92959b8a80b521d95cca7a668c884d8b2045d1d8ee7d56796aa405c405462af112a1477594cc63531baeb8f - languageName: node - linkType: hard - -"optionator@npm:^0.9.3": - version: 0.9.4 - resolution: "optionator@npm:0.9.4" - dependencies: - deep-is: "npm:^0.1.3" - fast-levenshtein: "npm:^2.0.6" - levn: "npm:^0.4.1" - prelude-ls: "npm:^1.2.1" - type-check: "npm:^0.4.0" - word-wrap: "npm:^1.2.5" - checksum: 10c0/4afb687a059ee65b61df74dfe87d8d6815cd6883cb8b3d5883a910df72d0f5d029821f37025e4bccf4048873dbdb09acc6d303d27b8f76b1a80dd5a7d5334675 - languageName: node - linkType: hard - -"ora@npm:^5.1.0": - version: 5.4.1 - resolution: "ora@npm:5.4.1" - dependencies: - bl: "npm:^4.1.0" - chalk: "npm:^4.1.0" - cli-cursor: "npm:^3.1.0" - cli-spinners: "npm:^2.5.0" - is-interactive: "npm:^1.0.0" - is-unicode-supported: "npm:^0.1.0" - log-symbols: "npm:^4.1.0" - strip-ansi: "npm:^6.0.0" - wcwidth: "npm:^1.0.1" - checksum: 10c0/10ff14aace236d0e2f044193362b22edce4784add08b779eccc8f8ef97195cae1248db8ec1ec5f5ff076f91acbe573f5f42a98c19b78dba8c54eefff983cae85 - languageName: node - linkType: hard - -"own-keys@npm:^1.0.1": - version: 1.0.1 - resolution: "own-keys@npm:1.0.1" - dependencies: - get-intrinsic: "npm:^1.2.6" - object-keys: "npm:^1.1.1" - safe-push-apply: "npm:^1.0.0" - checksum: 10c0/6dfeb3455bff92ec3f16a982d4e3e65676345f6902d9f5ded1d8265a6318d0200ce461956d6d1c70053c7fe9f9fe65e552faac03f8140d37ef0fdd108e67013a - languageName: node - linkType: hard - -"p-cancelable@npm:^2.0.0": - version: 2.1.1 - resolution: "p-cancelable@npm:2.1.1" - checksum: 10c0/8c6dc1f8dd4154fd8b96a10e55a3a832684c4365fb9108056d89e79fbf21a2465027c04a59d0d797b5ffe10b54a61a32043af287d5c4860f1e996cbdbc847f01 - languageName: node - linkType: hard - -"p-limit@npm:^3.0.2, p-limit@npm:^3.1.0 ": - version: 3.1.0 - resolution: "p-limit@npm:3.1.0" - dependencies: - yocto-queue: "npm:^0.1.0" - checksum: 10c0/9db675949dbdc9c3763c89e748d0ef8bdad0afbb24d49ceaf4c46c02c77d30db4e0652ed36d0a0a7a95154335fab810d95c86153105bb73b3a90448e2bb14e1a - languageName: node - linkType: hard - -"p-locate@npm:^5.0.0": - version: 5.0.0 - resolution: "p-locate@npm:5.0.0" - dependencies: - p-limit: "npm:^3.0.2" - checksum: 10c0/2290d627ab7903b8b70d11d384fee714b797f6040d9278932754a6860845c4d3190603a0772a663c8cb5a7b21d1b16acb3a6487ebcafa9773094edc3dfe6009a - languageName: node - linkType: hard - -"p-map@npm:^7.0.2": - version: 7.0.3 - resolution: "p-map@npm:7.0.3" - checksum: 10c0/46091610da2b38ce47bcd1d8b4835a6fa4e832848a6682cf1652bc93915770f4617afc844c10a77d1b3e56d2472bb2d5622353fa3ead01a7f42b04fc8e744a5c - languageName: node - linkType: hard - -"package-json-from-dist@npm:^1.0.0": - version: 1.0.1 - resolution: "package-json-from-dist@npm:1.0.1" - checksum: 10c0/62ba2785eb655fec084a257af34dbe24292ab74516d6aecef97ef72d4897310bc6898f6c85b5cd22770eaa1ce60d55a0230e150fb6a966e3ecd6c511e23d164b - languageName: node - linkType: hard - -"parent-module@npm:^1.0.0": - version: 1.0.1 - resolution: "parent-module@npm:1.0.1" - dependencies: - callsites: "npm:^3.0.0" - checksum: 10c0/c63d6e80000d4babd11978e0d3fee386ca7752a02b035fd2435960ffaa7219dc42146f07069fb65e6e8bf1caef89daf9af7535a39bddf354d78bf50d8294f556 - languageName: node - linkType: hard - -"path-exists@npm:^4.0.0": - version: 4.0.0 - resolution: "path-exists@npm:4.0.0" - checksum: 10c0/8c0bd3f5238188197dc78dced15207a4716c51cc4e3624c44fc97acf69558f5ebb9a2afff486fe1b4ee148e0c133e96c5e11a9aa5c48a3006e3467da070e5e1b - languageName: node - linkType: hard - -"path-is-absolute@npm:^1.0.0": - version: 1.0.1 - resolution: "path-is-absolute@npm:1.0.1" - checksum: 10c0/127da03c82172a2a50099cddbf02510c1791fc2cc5f7713ddb613a56838db1e8168b121a920079d052e0936c23005562059756d653b7c544c53185efe53be078 - languageName: node - linkType: hard - -"path-key@npm:^3.1.0": - version: 3.1.1 - resolution: "path-key@npm:3.1.1" - checksum: 10c0/748c43efd5a569c039d7a00a03b58eecd1d75f3999f5a28303d75f521288df4823bc057d8784eb72358b2895a05f29a070bc9f1f17d28226cc4e62494cc58c4c - languageName: node - linkType: hard - -"path-parse@npm:^1.0.7": - version: 1.0.7 - resolution: "path-parse@npm:1.0.7" - checksum: 10c0/11ce261f9d294cc7a58d6a574b7f1b935842355ec66fba3c3fd79e0f036462eaf07d0aa95bb74ff432f9afef97ce1926c720988c6a7451d8a584930ae7de86e1 - languageName: node - linkType: hard - -"path-scurry@npm:^1.11.1": - version: 1.11.1 - resolution: "path-scurry@npm:1.11.1" - dependencies: - lru-cache: "npm:^10.2.0" - minipass: "npm:^5.0.0 || ^6.0.2 || ^7.0.0" - checksum: 10c0/32a13711a2a505616ae1cc1b5076801e453e7aae6ac40ab55b388bb91b9d0547a52f5aaceff710ea400205f18691120d4431e520afbe4266b836fadede15872d - languageName: node - linkType: hard - -"path-scurry@npm:^2.0.0": - version: 2.0.0 - resolution: "path-scurry@npm:2.0.0" - dependencies: - lru-cache: "npm:^11.0.0" - minipass: "npm:^7.1.2" - checksum: 10c0/3da4adedaa8e7ef8d6dc4f35a0ff8f05a9b4d8365f2b28047752b62d4c1ad73eec21e37b1579ef2d075920157856a3b52ae8309c480a6f1a8bbe06ff8e52b33c - languageName: node - linkType: hard - -"pe-library@npm:^0.4.1": - version: 0.4.1 - resolution: "pe-library@npm:0.4.1" - checksum: 10c0/75c772e74c75d9710a2bf6b7e88fb57e4c26788422abd3b38c8100c796e311c72102ef71159b9e0b56f05f616a968e11b8ec218bcd625c896df067235af8da77 - languageName: node - linkType: hard - -"pend@npm:~1.2.0": - version: 1.2.0 - resolution: "pend@npm:1.2.0" - checksum: 10c0/8a87e63f7a4afcfb0f9f77b39bb92374afc723418b9cb716ee4257689224171002e07768eeade4ecd0e86f1fa3d8f022994219fb45634f2dbd78c6803e452458 - languageName: node - linkType: hard - -"picomatch@npm:^2.3.1": - version: 2.3.1 - resolution: "picomatch@npm:2.3.1" - checksum: 10c0/26c02b8d06f03206fc2ab8d16f19960f2ff9e81a658f831ecb656d8f17d9edc799e8364b1f4a7873e89d9702dff96204be0fa26fe4181f6843f040f819dac4be - languageName: node - linkType: hard - -"picomatch@npm:^4.0.3": - version: 4.0.3 - resolution: "picomatch@npm:4.0.3" - checksum: 10c0/9582c951e95eebee5434f59e426cddd228a7b97a0161a375aed4be244bd3fe8e3a31b846808ea14ef2c8a2527a6eeab7b3946a67d5979e81694654f939473ae2 - languageName: node - linkType: hard - -"platform@link:../platform::locator=chipmunk%40workspace%3A.": - version: 0.0.0-use.local - resolution: "platform@link:../platform::locator=chipmunk%40workspace%3A." - languageName: node - linkType: soft - -"plist@npm:3.1.0, plist@npm:^3.0.4, plist@npm:^3.0.5, plist@npm:^3.1.0": - version: 3.1.0 - resolution: "plist@npm:3.1.0" - dependencies: - "@xmldom/xmldom": "npm:^0.8.8" - base64-js: "npm:^1.5.1" - xmlbuilder: "npm:^15.1.1" - checksum: 10c0/db19ba50faafc4103df8e79bcd6b08004a56db2a9dd30b3e5c8b0ef30398ef44344a674e594d012c8fc39e539a2b72cb58c60a76b4b4401cbbc7c8f6b028d93d - languageName: node - linkType: hard - -"possible-typed-array-names@npm:^1.0.0": - version: 1.0.0 - resolution: "possible-typed-array-names@npm:1.0.0" - checksum: 10c0/d9aa22d31f4f7680e20269db76791b41c3a32c01a373e25f8a4813b4d45f7456bfc2b6d68f752dc4aab0e0bb0721cb3d76fb678c9101cb7a16316664bc2c73fd - languageName: node - linkType: hard - -"prelude-ls@npm:^1.2.1": - version: 1.2.1 - resolution: "prelude-ls@npm:1.2.1" - checksum: 10c0/b00d617431e7886c520a6f498a2e14c75ec58f6d93ba48c3b639cf241b54232d90daa05d83a9e9b9fef6baa63cb7e1e4602c2372fea5bc169668401eb127d0cd - languageName: node - linkType: hard - -"proc-log@npm:^5.0.0": - version: 5.0.0 - resolution: "proc-log@npm:5.0.0" - checksum: 10c0/bbe5edb944b0ad63387a1d5b1911ae93e05ce8d0f60de1035b218cdcceedfe39dbd2c697853355b70f1a090f8f58fe90da487c85216bf9671f9499d1a897e9e3 - languageName: node - linkType: hard - -"progress@npm:^2.0.3": - version: 2.0.3 - resolution: "progress@npm:2.0.3" - checksum: 10c0/1697e07cb1068055dbe9fe858d242368ff5d2073639e652b75a7eb1f2a1a8d4afd404d719de23c7b48481a6aa0040686310e2dac2f53d776daa2176d3f96369c - languageName: node - linkType: hard - -"promise-retry@npm:^2.0.1": - version: 2.0.1 - resolution: "promise-retry@npm:2.0.1" - dependencies: - err-code: "npm:^2.0.2" - retry: "npm:^0.12.0" - checksum: 10c0/9c7045a1a2928094b5b9b15336dcd2a7b1c052f674550df63cc3f36cd44028e5080448175b6f6ca32b642de81150f5e7b1a98b728f15cb069f2dd60ac2616b96 - languageName: node - linkType: hard - -"promise@npm:*": - version: 8.3.0 - resolution: "promise@npm:8.3.0" - dependencies: - asap: "npm:~2.0.6" - checksum: 10c0/6fccae27a10bcce7442daf090279968086edd2e3f6cebe054b71816403e2526553edf510d13088a4d0f14d7dfa9b9dfb188cab72d6f942e186a4353b6a29c8bf - languageName: node - linkType: hard - -"proper-lockfile@npm:^4.1.2": - version: 4.1.2 - resolution: "proper-lockfile@npm:4.1.2" - dependencies: - graceful-fs: "npm:^4.2.4" - retry: "npm:^0.12.0" - signal-exit: "npm:^3.0.2" - checksum: 10c0/2f265dbad15897a43110a02dae55105c04d356ec4ed560723dcb9f0d34bc4fb2f13f79bb930e7561be10278e2314db5aca2527d5d3dcbbdee5e6b331d1571f6d - languageName: node - linkType: hard - -"pump@npm:^3.0.0": - version: 3.0.2 - resolution: "pump@npm:3.0.2" - dependencies: - end-of-stream: "npm:^1.1.0" - once: "npm:^1.3.1" - checksum: 10c0/5ad655cb2a7738b4bcf6406b24ad0970d680649d996b55ad20d1be8e0c02394034e4c45ff7cd105d87f1e9b96a0e3d06fd28e11fae8875da26e7f7a8e2c9726f - languageName: node - linkType: hard - -"punycode@npm:^2.1.0": - version: 2.3.1 - resolution: "punycode@npm:2.3.1" - checksum: 10c0/14f76a8206bc3464f794fb2e3d3cc665ae416c01893ad7a02b23766eb07159144ee612ad67af5e84fa4479ccfe67678c4feb126b0485651b302babf66f04f9e9 - languageName: node - linkType: hard - -"queue-microtask@npm:^1.2.2": - version: 1.2.3 - resolution: "queue-microtask@npm:1.2.3" - checksum: 10c0/900a93d3cdae3acd7d16f642c29a642aea32c2026446151f0778c62ac089d4b8e6c986811076e1ae180a694cedf077d453a11b58ff0a865629a4f82ab558e102 - languageName: node - linkType: hard - -"quick-lru@npm:^5.1.1": - version: 5.1.1 - resolution: "quick-lru@npm:5.1.1" - checksum: 10c0/a24cba5da8cec30d70d2484be37622580f64765fb6390a928b17f60cd69e8dbd32a954b3ff9176fa1b86d86ff2ba05252fae55dc4d40d0291c60412b0ad096da - languageName: node - linkType: hard - -"read-binary-file-arch@npm:^1.0.6": - version: 1.0.6 - resolution: "read-binary-file-arch@npm:1.0.6" - dependencies: - debug: "npm:^4.3.4" - bin: - read-binary-file-arch: cli.js - checksum: 10c0/7665cb4ec61da1f4da7ba6c0fb64f53f6e739373d427dd0e1c4d19f240b3ebff0f596377c01e290a6370f611899b82df09edafa758200bf31216d855e3230058 - languageName: node - linkType: hard - -"readable-stream@npm:^3.4.0": - version: 3.6.2 - resolution: "readable-stream@npm:3.6.2" - dependencies: - inherits: "npm:^2.0.3" - string_decoder: "npm:^1.1.1" - util-deprecate: "npm:^1.0.1" - checksum: 10c0/e37be5c79c376fdd088a45fa31ea2e423e5d48854be7a22a58869b4e84d25047b193f6acb54f1012331e1bcd667ffb569c01b99d36b0bd59658fb33f513511b7 - languageName: node - linkType: hard - -"reflect.getprototypeof@npm:^1.0.6, reflect.getprototypeof@npm:^1.0.9": - version: 1.0.10 - resolution: "reflect.getprototypeof@npm:1.0.10" - dependencies: - call-bind: "npm:^1.0.8" - define-properties: "npm:^1.2.1" - es-abstract: "npm:^1.23.9" - es-errors: "npm:^1.3.0" - es-object-atoms: "npm:^1.0.0" - get-intrinsic: "npm:^1.2.7" - get-proto: "npm:^1.0.1" - which-builtin-type: "npm:^1.2.1" - checksum: 10c0/7facec28c8008876f8ab98e80b7b9cb4b1e9224353fd4756dda5f2a4ab0d30fa0a5074777c6df24e1e0af463a2697513b0a11e548d99cf52f21f7bc6ba48d3ac - languageName: node - linkType: hard - -"regexp.prototype.flags@npm:^1.5.3": - version: 1.5.4 - resolution: "regexp.prototype.flags@npm:1.5.4" - dependencies: - call-bind: "npm:^1.0.8" - define-properties: "npm:^1.2.1" - es-errors: "npm:^1.3.0" - get-proto: "npm:^1.0.1" - gopd: "npm:^1.2.0" - set-function-name: "npm:^2.0.2" - checksum: 10c0/83b88e6115b4af1c537f8dabf5c3744032cb875d63bc05c288b1b8c0ef37cbe55353f95d8ca817e8843806e3e150b118bc624e4279b24b4776b4198232735a77 - languageName: node - linkType: hard - -"regexpp@npm:^3.0.0": - version: 3.2.0 - resolution: "regexpp@npm:3.2.0" - checksum: 10c0/d1da82385c8754a1681416b90b9cca0e21b4a2babef159099b88f640637d789c69011d0bc94705dacab85b81133e929d027d85210e8b8b03f8035164dbc14710 - languageName: node - linkType: hard - -"require-directory@npm:^2.1.1": - version: 2.1.1 - resolution: "require-directory@npm:2.1.1" - checksum: 10c0/83aa76a7bc1531f68d92c75a2ca2f54f1b01463cb566cf3fbc787d0de8be30c9dbc211d1d46be3497dac5785fe296f2dd11d531945ac29730643357978966e99 - languageName: node - linkType: hard - -"resedit@npm:^1.7.0": - version: 1.7.2 - resolution: "resedit@npm:1.7.2" - dependencies: - pe-library: "npm:^0.4.1" - checksum: 10c0/1d21438d22ca9010611b8db3d0b122122b9d3588fa6e608eaadca38ab86d5d1c0348f7656a9c2e7f2609c30db62d1f62ddc9184e7e11920d47d2c238b1587847 - languageName: node - linkType: hard - -"resolve-alpn@npm:^1.0.0": - version: 1.2.1 - resolution: "resolve-alpn@npm:1.2.1" - checksum: 10c0/b70b29c1843bc39781ef946c8cd4482e6d425976599c0f9c138cec8209e4e0736161bf39319b01676a847000085dfdaf63583c6fb4427bf751a10635bd2aa0c4 - languageName: node - linkType: hard - -"resolve-from@npm:^4.0.0": - version: 4.0.0 - resolution: "resolve-from@npm:4.0.0" - checksum: 10c0/8408eec31a3112ef96e3746c37be7d64020cda07c03a920f5024e77290a218ea758b26ca9529fd7b1ad283947f34b2291c1c0f6aa0ed34acfdda9c6014c8d190 - languageName: node - linkType: hard - -"resolve@npm:^1.10.1, resolve@npm:^1.22.4": - version: 1.22.10 - resolution: "resolve@npm:1.22.10" - dependencies: - is-core-module: "npm:^2.16.0" - path-parse: "npm:^1.0.7" - supports-preserve-symlinks-flag: "npm:^1.0.0" - bin: - resolve: bin/resolve - checksum: 10c0/8967e1f4e2cc40f79b7e080b4582b9a8c5ee36ffb46041dccb20e6461161adf69f843b43067b4a375de926a2cd669157e29a29578191def399dd5ef89a1b5203 - languageName: node - linkType: hard - -"resolve@patch:resolve@npm%3A^1.10.1#optional!builtin, resolve@patch:resolve@npm%3A^1.22.4#optional!builtin": - version: 1.22.10 - resolution: "resolve@patch:resolve@npm%3A1.22.10#optional!builtin::version=1.22.10&hash=c3c19d" - dependencies: - is-core-module: "npm:^2.16.0" - path-parse: "npm:^1.0.7" - supports-preserve-symlinks-flag: "npm:^1.0.0" - bin: - resolve: bin/resolve - checksum: 10c0/52a4e505bbfc7925ac8f4cd91fd8c4e096b6a89728b9f46861d3b405ac9a1ccf4dcbf8befb4e89a2e11370dacd0160918163885cbc669369590f2f31f4c58939 - languageName: node - linkType: hard - -"responselike@npm:^2.0.0": - version: 2.0.1 - resolution: "responselike@npm:2.0.1" - dependencies: - lowercase-keys: "npm:^2.0.0" - checksum: 10c0/360b6deb5f101a9f8a4174f7837c523c3ec78b7ca8a7c1d45a1062b303659308a23757e318b1e91ed8684ad1205721142dd664d94771cd63499353fd4ee732b5 - languageName: node - linkType: hard - -"restore-cursor@npm:^3.1.0": - version: 3.1.0 - resolution: "restore-cursor@npm:3.1.0" - dependencies: - onetime: "npm:^5.1.0" - signal-exit: "npm:^3.0.2" - checksum: 10c0/8051a371d6aa67ff21625fa94e2357bd81ffdc96267f3fb0fc4aaf4534028343836548ef34c240ffa8c25b280ca35eb36be00b3cb2133fa4f51896d7e73c6b4f - languageName: node - linkType: hard - -"retry@npm:^0.12.0": - version: 0.12.0 - resolution: "retry@npm:0.12.0" - checksum: 10c0/59933e8501727ba13ad73ef4a04d5280b3717fd650408460c987392efe9d7be2040778ed8ebe933c5cbd63da3dcc37919c141ef8af0a54a6e4fca5a2af177bfe - languageName: node - linkType: hard - -"reusify@npm:^1.0.4": - version: 1.0.4 - resolution: "reusify@npm:1.0.4" - checksum: 10c0/c19ef26e4e188f408922c46f7ff480d38e8dfc55d448310dfb518736b23ed2c4f547fb64a6ed5bdba92cd7e7ddc889d36ff78f794816d5e71498d645ef476107 - languageName: node - linkType: hard - -"rimraf@npm:^5.0.5": - version: 5.0.10 - resolution: "rimraf@npm:5.0.10" - dependencies: - glob: "npm:^10.3.7" - bin: - rimraf: dist/esm/bin.mjs - checksum: 10c0/7da4fd0e15118ee05b918359462cfa1e7fe4b1228c7765195a45b55576e8c15b95db513b8466ec89129666f4af45ad978a3057a02139afba1a63512a2d9644cc - languageName: node - linkType: hard - -"roarr@npm:^2.15.3": - version: 2.15.4 - resolution: "roarr@npm:2.15.4" - dependencies: - boolean: "npm:^3.0.1" - detect-node: "npm:^2.0.4" - globalthis: "npm:^1.0.1" - json-stringify-safe: "npm:^5.0.1" - semver-compare: "npm:^1.0.0" - sprintf-js: "npm:^1.1.2" - checksum: 10c0/7d01d4c14513c461778dd673a8f9e53255221f8d04173aafeb8e11b23d8b659bb83f1c90cfe81af7f9c213b8084b404b918108fd792bda76678f555340cc64ec - languageName: node - linkType: hard - -"run-parallel@npm:^1.1.9": - version: 1.2.0 - resolution: "run-parallel@npm:1.2.0" - dependencies: - queue-microtask: "npm:^1.2.2" - checksum: 10c0/200b5ab25b5b8b7113f9901bfe3afc347e19bb7475b267d55ad0eb86a62a46d77510cb0f232507c9e5d497ebda569a08a9867d0d14f57a82ad5564d991588b39 - languageName: node - linkType: hard - -"rustcore@link:../apps/rustcore/ts-bindings::locator=chipmunk%40workspace%3A.": - version: 0.0.0-use.local - resolution: "rustcore@link:../apps/rustcore/ts-bindings::locator=chipmunk%40workspace%3A." - languageName: node - linkType: soft - -"safe-array-concat@npm:^1.1.3": - version: 1.1.3 - resolution: "safe-array-concat@npm:1.1.3" - dependencies: - call-bind: "npm:^1.0.8" - call-bound: "npm:^1.0.2" - get-intrinsic: "npm:^1.2.6" - has-symbols: "npm:^1.1.0" - isarray: "npm:^2.0.5" - checksum: 10c0/43c86ffdddc461fb17ff8a17c5324f392f4868f3c7dd2c6a5d9f5971713bc5fd755667212c80eab9567595f9a7509cc2f83e590ddaebd1bd19b780f9c79f9a8d - languageName: node - linkType: hard - -"safe-buffer@npm:^5.2.1, safe-buffer@npm:~5.2.0": - version: 5.2.1 - resolution: "safe-buffer@npm:5.2.1" - checksum: 10c0/6501914237c0a86e9675d4e51d89ca3c21ffd6a31642efeba25ad65720bce6921c9e7e974e5be91a786b25aa058b5303285d3c15dbabf983a919f5f630d349f3 - languageName: node - linkType: hard - -"safe-push-apply@npm:^1.0.0": - version: 1.0.0 - resolution: "safe-push-apply@npm:1.0.0" - dependencies: - es-errors: "npm:^1.3.0" - isarray: "npm:^2.0.5" - checksum: 10c0/831f1c9aae7436429e7862c7e46f847dfe490afac20d0ee61bae06108dbf5c745a0de3568ada30ccdd3eeb0864ca8331b2eef703abd69bfea0745b21fd320750 - languageName: node - linkType: hard - -"safe-regex-test@npm:^1.1.0": - version: 1.1.0 - resolution: "safe-regex-test@npm:1.1.0" - dependencies: - call-bound: "npm:^1.0.2" - es-errors: "npm:^1.3.0" - is-regex: "npm:^1.2.1" - checksum: 10c0/f2c25281bbe5d39cddbbce7f86fca5ea9b3ce3354ea6cd7c81c31b006a5a9fff4286acc5450a3b9122c56c33eba69c56b9131ad751457b2b4a585825e6a10665 - languageName: node - linkType: hard - -"safer-buffer@npm:>= 2.1.2 < 3.0.0": - version: 2.1.2 - resolution: "safer-buffer@npm:2.1.2" - checksum: 10c0/7e3c8b2e88a1841c9671094bbaeebd94448111dd90a81a1f606f3f67708a6ec57763b3b47f06da09fc6054193e0e6709e77325415dc8422b04497a8070fa02d4 - languageName: node - linkType: hard - -"sanitize-filename@npm:^1.6.3": - version: 1.6.3 - resolution: "sanitize-filename@npm:1.6.3" - dependencies: - truncate-utf8-bytes: "npm:^1.0.0" - checksum: 10c0/16ff47556a6e54e228c28db096bedd303da67b030d4bea4925fd71324932d6b02c7b0446f00ad33987b25b6414f24ae968e01a1a1679ce599542e82c4b07eb1f - languageName: node - linkType: hard - -"sax@npm:^1.2.4": - version: 1.4.1 - resolution: "sax@npm:1.4.1" - checksum: 10c0/6bf86318a254c5d898ede6bd3ded15daf68ae08a5495a2739564eb265cd13bcc64a07ab466fb204f67ce472bb534eb8612dac587435515169593f4fffa11de7c - languageName: node - linkType: hard - -"semver-compare@npm:^1.0.0": - version: 1.0.0 - resolution: "semver-compare@npm:1.0.0" - checksum: 10c0/9ef4d8b81847556f0865f46ddc4d276bace118c7cb46811867af82e837b7fc473911981d5a0abc561fa2db487065572217e5b06e18701c4281bcdd2a1affaff1 - languageName: node - linkType: hard - -"semver@npm:^5.5.0": - version: 5.7.2 - resolution: "semver@npm:5.7.2" - bin: - semver: bin/semver - checksum: 10c0/e4cf10f86f168db772ae95d86ba65b3fd6c5967c94d97c708ccb463b778c2ee53b914cd7167620950fc07faf5a564e6efe903836639e512a1aa15fbc9667fa25 - languageName: node - linkType: hard - -"semver@npm:^6.1.0, semver@npm:^6.2.0, semver@npm:^6.3.1": - version: 6.3.1 - resolution: "semver@npm:6.3.1" - bin: - semver: bin/semver.js - checksum: 10c0/e3d79b609071caa78bcb6ce2ad81c7966a46a7431d9d58b8800cfa9cb6a63699b3899a0e4bcce36167a284578212d9ae6942b6929ba4aa5015c079a67751d42d - languageName: node - linkType: hard - -"semver@npm:^7.3.2, semver@npm:^7.3.5, semver@npm:^7.5.2, semver@npm:^7.5.3, semver@npm:^7.6.0": - version: 7.6.3 - resolution: "semver@npm:7.6.3" - bin: - semver: bin/semver.js - checksum: 10c0/88f33e148b210c153873cb08cfe1e281d518aaa9a666d4d148add6560db5cd3c582f3a08ccb91f38d5f379ead256da9931234ed122057f40bb5766e65e58adaf - languageName: node - linkType: hard - -"semver@npm:^7.6.3, semver@npm:~7.7.3": - version: 7.7.3 - resolution: "semver@npm:7.7.3" - bin: - semver: bin/semver.js - checksum: 10c0/4afe5c986567db82f44c8c6faef8fe9df2a9b1d98098fc1721f57c696c4c21cebd572f297fc21002f81889492345b8470473bc6f4aff5fb032a6ea59ea2bc45e - languageName: node - linkType: hard - -"serialize-error@npm:^7.0.1": - version: 7.0.1 - resolution: "serialize-error@npm:7.0.1" - dependencies: - type-fest: "npm:^0.13.1" - checksum: 10c0/7982937d578cd901276c8ab3e2c6ed8a4c174137730f1fb0402d005af209a0e84d04acc874e317c936724c7b5b26c7a96ff7e4b8d11a469f4924a4b0ea814c05 - languageName: node - linkType: hard - -"set-function-length@npm:^1.2.2": - version: 1.2.2 - resolution: "set-function-length@npm:1.2.2" - dependencies: - define-data-property: "npm:^1.1.4" - es-errors: "npm:^1.3.0" - function-bind: "npm:^1.1.2" - get-intrinsic: "npm:^1.2.4" - gopd: "npm:^1.0.1" - has-property-descriptors: "npm:^1.0.2" - checksum: 10c0/82850e62f412a258b71e123d4ed3873fa9377c216809551192bb6769329340176f109c2eeae8c22a8d386c76739855f78e8716515c818bcaef384b51110f0f3c - languageName: node - linkType: hard - -"set-function-name@npm:^2.0.2": - version: 2.0.2 - resolution: "set-function-name@npm:2.0.2" - dependencies: - define-data-property: "npm:^1.1.4" - es-errors: "npm:^1.3.0" - functions-have-names: "npm:^1.2.3" - has-property-descriptors: "npm:^1.0.2" - checksum: 10c0/fce59f90696c450a8523e754abb305e2b8c73586452619c2bad5f7bf38c7b6b4651895c9db895679c5bef9554339cf3ef1c329b66ece3eda7255785fbe299316 - languageName: node - linkType: hard - -"set-proto@npm:^1.0.0": - version: 1.0.0 - resolution: "set-proto@npm:1.0.0" - dependencies: - dunder-proto: "npm:^1.0.1" - es-errors: "npm:^1.3.0" - es-object-atoms: "npm:^1.0.0" - checksum: 10c0/ca5c3ccbba479d07c30460e367e66337cec825560b11e8ba9c5ebe13a2a0d6021ae34eddf94ff3dfe17a3104dc1f191519cb6c48378b503e5c3f36393938776a - languageName: node - linkType: hard - -"shebang-command@npm:^2.0.0": - version: 2.0.0 - resolution: "shebang-command@npm:2.0.0" - dependencies: - shebang-regex: "npm:^3.0.0" - checksum: 10c0/a41692e7d89a553ef21d324a5cceb5f686d1f3c040759c50aab69688634688c5c327f26f3ecf7001ebfd78c01f3c7c0a11a7c8bfd0a8bc9f6240d4f40b224e4e - languageName: node - linkType: hard - -"shebang-regex@npm:^3.0.0": - version: 3.0.0 - resolution: "shebang-regex@npm:3.0.0" - checksum: 10c0/1dbed0726dd0e1152a92696c76c7f06084eb32a90f0528d11acd764043aacf76994b2fb30aa1291a21bd019d6699164d048286309a278855ee7bec06cf6fb690 - languageName: node - linkType: hard - -"side-channel-list@npm:^1.0.0": - version: 1.0.0 - resolution: "side-channel-list@npm:1.0.0" - dependencies: - es-errors: "npm:^1.3.0" - object-inspect: "npm:^1.13.3" - checksum: 10c0/644f4ac893456c9490ff388bf78aea9d333d5e5bfc64cfb84be8f04bf31ddc111a8d4b83b85d7e7e8a7b845bc185a9ad02c052d20e086983cf59f0be517d9b3d - languageName: node - linkType: hard - -"side-channel-map@npm:^1.0.1": - version: 1.0.1 - resolution: "side-channel-map@npm:1.0.1" - dependencies: - call-bound: "npm:^1.0.2" - es-errors: "npm:^1.3.0" - get-intrinsic: "npm:^1.2.5" - object-inspect: "npm:^1.13.3" - checksum: 10c0/010584e6444dd8a20b85bc926d934424bd809e1a3af941cace229f7fdcb751aada0fb7164f60c2e22292b7fa3c0ff0bce237081fd4cdbc80de1dc68e95430672 - languageName: node - linkType: hard - -"side-channel-weakmap@npm:^1.0.2": - version: 1.0.2 - resolution: "side-channel-weakmap@npm:1.0.2" - dependencies: - call-bound: "npm:^1.0.2" - es-errors: "npm:^1.3.0" - get-intrinsic: "npm:^1.2.5" - object-inspect: "npm:^1.13.3" - side-channel-map: "npm:^1.0.1" - checksum: 10c0/71362709ac233e08807ccd980101c3e2d7efe849edc51455030327b059f6c4d292c237f94dc0685031dd11c07dd17a68afde235d6cf2102d949567f98ab58185 - languageName: node - linkType: hard - -"side-channel@npm:^1.1.0": - version: 1.1.0 - resolution: "side-channel@npm:1.1.0" - dependencies: - es-errors: "npm:^1.3.0" - object-inspect: "npm:^1.13.3" - side-channel-list: "npm:^1.0.0" - side-channel-map: "npm:^1.0.1" - side-channel-weakmap: "npm:^1.0.2" - checksum: 10c0/cb20dad41eb032e6c24c0982e1e5a24963a28aa6122b4f05b3f3d6bf8ae7fd5474ef382c8f54a6a3ab86e0cac4d41a23bd64ede3970e5bfb50326ba02a7996e6 - languageName: node - linkType: hard - -"signal-exit@npm:^3.0.2": - version: 3.0.7 - resolution: "signal-exit@npm:3.0.7" - checksum: 10c0/25d272fa73e146048565e08f3309d5b942c1979a6f4a58a8c59d5fa299728e9c2fcd1a759ec870863b1fd38653670240cd420dad2ad9330c71f36608a6a1c912 - languageName: node - linkType: hard - -"signal-exit@npm:^4.0.1": - version: 4.1.0 - resolution: "signal-exit@npm:4.1.0" - checksum: 10c0/41602dce540e46d599edba9d9860193398d135f7ff72cab629db5171516cfae628d21e7bfccde1bbfdf11c48726bc2a6d1a8fb8701125852fbfda7cf19c6aa83 - languageName: node - linkType: hard - -"simple-update-notifier@npm:2.0.0": - version: 2.0.0 - resolution: "simple-update-notifier@npm:2.0.0" - dependencies: - semver: "npm:^7.5.3" - checksum: 10c0/2a00bd03bfbcbf8a737c47ab230d7920f8bfb92d1159d421bdd194479f6d01ebc995d13fbe13d45dace23066a78a3dc6642999b4e3b38b847e6664191575b20c - languageName: node - linkType: hard - -"slice-ansi@npm:^3.0.0": - version: 3.0.0 - resolution: "slice-ansi@npm:3.0.0" - dependencies: - ansi-styles: "npm:^4.0.0" - astral-regex: "npm:^2.0.0" - is-fullwidth-code-point: "npm:^3.0.0" - checksum: 10c0/88083c9d0ca67d09f8b4c78f68833d69cabbb7236b74df5d741ad572bbf022deaf243fa54009cd434350622a1174ab267710fcc80a214ecc7689797fe00cb27c - languageName: node - linkType: hard - -"smart-buffer@npm:^4.0.2, smart-buffer@npm:^4.2.0": - version: 4.2.0 - resolution: "smart-buffer@npm:4.2.0" - checksum: 10c0/a16775323e1404dd43fabafe7460be13a471e021637bc7889468eb45ce6a6b207261f454e4e530a19500cc962c4cc5348583520843b363f4193cee5c00e1e539 - languageName: node - linkType: hard - -"socks-proxy-agent@npm:^8.0.3": - version: 8.0.5 - resolution: "socks-proxy-agent@npm:8.0.5" - dependencies: - agent-base: "npm:^7.1.2" - debug: "npm:^4.3.4" - socks: "npm:^2.8.3" - checksum: 10c0/5d2c6cecba6821389aabf18728325730504bf9bb1d9e342e7987a5d13badd7a98838cc9a55b8ed3cb866ad37cc23e1086f09c4d72d93105ce9dfe76330e9d2a6 - languageName: node - linkType: hard - -"socks@npm:^2.8.3": - version: 2.8.3 - resolution: "socks@npm:2.8.3" - dependencies: - ip-address: "npm:^9.0.5" - smart-buffer: "npm:^4.2.0" - checksum: 10c0/d54a52bf9325165770b674a67241143a3d8b4e4c8884560c4e0e078aace2a728dffc7f70150660f51b85797c4e1a3b82f9b7aa25e0a0ceae1a243365da5c51a7 - languageName: node - linkType: hard - -"source-map-support@npm:^0.5.19": - version: 0.5.21 - resolution: "source-map-support@npm:0.5.21" - dependencies: - buffer-from: "npm:^1.0.0" - source-map: "npm:^0.6.0" - checksum: 10c0/9ee09942f415e0f721d6daad3917ec1516af746a8120bba7bb56278707a37f1eb8642bde456e98454b8a885023af81a16e646869975f06afc1a711fb90484e7d - languageName: node - linkType: hard - -"source-map@npm:^0.6.0": - version: 0.6.1 - resolution: "source-map@npm:0.6.1" - checksum: 10c0/ab55398007c5e5532957cb0beee2368529618ac0ab372d789806f5718123cc4367d57de3904b4e6a4170eb5a0b0f41373066d02ca0735a0c4d75c7d328d3e011 - languageName: node - linkType: hard - -"sprintf-js@npm:^1.1.2, sprintf-js@npm:^1.1.3": - version: 1.1.3 - resolution: "sprintf-js@npm:1.1.3" - checksum: 10c0/09270dc4f30d479e666aee820eacd9e464215cdff53848b443964202bf4051490538e5dd1b42e1a65cf7296916ca17640aebf63dae9812749c7542ee5f288dec - languageName: node - linkType: hard - -"ssri@npm:^12.0.0": - version: 12.0.0 - resolution: "ssri@npm:12.0.0" - dependencies: - minipass: "npm:^7.0.3" - checksum: 10c0/caddd5f544b2006e88fa6b0124d8d7b28208b83c72d7672d5ade44d794525d23b540f3396108c4eb9280dcb7c01f0bef50682f5b4b2c34291f7c5e211fd1417d - languageName: node - linkType: hard - -"stat-mode@npm:^1.0.0": - version: 1.0.0 - resolution: "stat-mode@npm:1.0.0" - checksum: 10c0/89b66a538dbfd45038fefdaf5b2104dc6e911605af1c201793e9629592ed9fdc7bdd1bca42806d0d4167c6d9cacac1f3fda41ddfe334a5c1f898113da38fae74 - languageName: node - linkType: hard - -"string-width-cjs@npm:string-width@^4.2.0, string-width@npm:^4.1.0, string-width@npm:^4.2.0, string-width@npm:^4.2.3": - version: 4.2.3 - resolution: "string-width@npm:4.2.3" - dependencies: - emoji-regex: "npm:^8.0.0" - is-fullwidth-code-point: "npm:^3.0.0" - strip-ansi: "npm:^6.0.1" - checksum: 10c0/1e525e92e5eae0afd7454086eed9c818ee84374bb80328fc41217ae72ff5f065ef1c9d7f72da41de40c75fa8bb3dee63d92373fd492c84260a552c636392a47b - languageName: node - linkType: hard - -"string-width@npm:^5.0.1, string-width@npm:^5.1.2": - version: 5.1.2 - resolution: "string-width@npm:5.1.2" - dependencies: - eastasianwidth: "npm:^0.2.0" - emoji-regex: "npm:^9.2.2" - strip-ansi: "npm:^7.0.1" - checksum: 10c0/ab9c4264443d35b8b923cbdd513a089a60de339216d3b0ed3be3ba57d6880e1a192b70ae17225f764d7adbf5994e9bb8df253a944736c15a0240eff553c678ca - languageName: node - linkType: hard - -"string.prototype.trim@npm:^1.2.10": - version: 1.2.10 - resolution: "string.prototype.trim@npm:1.2.10" - dependencies: - call-bind: "npm:^1.0.8" - call-bound: "npm:^1.0.2" - define-data-property: "npm:^1.1.4" - define-properties: "npm:^1.2.1" - es-abstract: "npm:^1.23.5" - es-object-atoms: "npm:^1.0.0" - has-property-descriptors: "npm:^1.0.2" - checksum: 10c0/8a8854241c4b54a948e992eb7dd6b8b3a97185112deb0037a134f5ba57541d8248dd610c966311887b6c2fd1181a3877bffb14d873ce937a344535dabcc648f8 - languageName: node - linkType: hard - -"string.prototype.trimend@npm:^1.0.8, string.prototype.trimend@npm:^1.0.9": - version: 1.0.9 - resolution: "string.prototype.trimend@npm:1.0.9" - dependencies: - call-bind: "npm:^1.0.8" - call-bound: "npm:^1.0.2" - define-properties: "npm:^1.2.1" - es-object-atoms: "npm:^1.0.0" - checksum: 10c0/59e1a70bf9414cb4c536a6e31bef5553c8ceb0cf44d8b4d0ed65c9653358d1c64dd0ec203b100df83d0413bbcde38b8c5d49e14bc4b86737d74adc593a0d35b6 - languageName: node - linkType: hard - -"string.prototype.trimstart@npm:^1.0.8": - version: 1.0.8 - resolution: "string.prototype.trimstart@npm:1.0.8" - dependencies: - call-bind: "npm:^1.0.7" - define-properties: "npm:^1.2.1" - es-object-atoms: "npm:^1.0.0" - checksum: 10c0/d53af1899959e53c83b64a5fd120be93e067da740e7e75acb433849aa640782fb6c7d4cd5b84c954c84413745a3764df135a8afeb22908b86a835290788d8366 - languageName: node - linkType: hard - -"string_decoder@npm:^1.1.1": - version: 1.3.0 - resolution: "string_decoder@npm:1.3.0" - dependencies: - safe-buffer: "npm:~5.2.0" - checksum: 10c0/810614ddb030e271cd591935dcd5956b2410dd079d64ff92a1844d6b7588bf992b3e1b69b0f4d34a3e06e0bd73046ac646b5264c1987b20d0601f81ef35d731d - languageName: node - linkType: hard - -"strip-ansi-cjs@npm:strip-ansi@^6.0.1, strip-ansi@npm:^6.0.0, strip-ansi@npm:^6.0.1": - version: 6.0.1 - resolution: "strip-ansi@npm:6.0.1" - dependencies: - ansi-regex: "npm:^5.0.1" - checksum: 10c0/1ae5f212a126fe5b167707f716942490e3933085a5ff6c008ab97ab2f272c8025d3aa218b7bd6ab25729ca20cc81cddb252102f8751e13482a5199e873680952 - languageName: node - linkType: hard - -"strip-ansi@npm:^7.0.1": - version: 7.1.0 - resolution: "strip-ansi@npm:7.1.0" - dependencies: - ansi-regex: "npm:^6.0.1" - checksum: 10c0/a198c3762e8832505328cbf9e8c8381de14a4fa50a4f9b2160138158ea88c0f5549fb50cb13c651c3088f47e63a108b34622ec18c0499b6c8c3a5ddf6b305ac4 - languageName: node - linkType: hard - -"strip-bom@npm:^3.0.0": - version: 3.0.0 - resolution: "strip-bom@npm:3.0.0" - checksum: 10c0/51201f50e021ef16672593d7434ca239441b7b760e905d9f33df6e4f3954ff54ec0e0a06f100d028af0982d6f25c35cd5cda2ce34eaebccd0250b8befb90d8f1 - languageName: node - linkType: hard - -"strip-json-comments@npm:^3.1.1": - version: 3.1.1 - resolution: "strip-json-comments@npm:3.1.1" - checksum: 10c0/9681a6257b925a7fa0f285851c0e613cc934a50661fa7bb41ca9cbbff89686bb4a0ee366e6ecedc4daafd01e83eee0720111ab294366fe7c185e935475ebcecd - languageName: node - linkType: hard - -"sudo-prompt@npm:^9.2.1": - version: 9.2.1 - resolution: "sudo-prompt@npm:9.2.1" - checksum: 10c0/e56793513a9c95f66367a3be2ec4c1adee84a2a62f1b7ff6453d610586dcd373d7d8f4df522a7dae03aea8b779ef7f7ba25d1130d24fb1e495cfbbc2c72c7486 - languageName: node - linkType: hard - -"sumchecker@npm:^3.0.1": - version: 3.0.1 - resolution: "sumchecker@npm:3.0.1" - dependencies: - debug: "npm:^4.1.0" - checksum: 10c0/43c387be9dfe22dbeaf39dfa4ffb279847aeb37a42a8988c0b066f548bbd209aa8c65e03da29f2b29be1a66b577801bf89fff0007df4183db2f286263a9569e5 - languageName: node - linkType: hard - -"supports-color@npm:^7.1.0": - version: 7.2.0 - resolution: "supports-color@npm:7.2.0" - dependencies: - has-flag: "npm:^4.0.0" - checksum: 10c0/afb4c88521b8b136b5f5f95160c98dee7243dc79d5432db7efc27efb219385bbc7d9427398e43dd6cc730a0f87d5085ce1652af7efbe391327bc0a7d0f7fc124 - languageName: node - linkType: hard - -"supports-preserve-symlinks-flag@npm:^1.0.0": - version: 1.0.0 - resolution: "supports-preserve-symlinks-flag@npm:1.0.0" - checksum: 10c0/6c4032340701a9950865f7ae8ef38578d8d7053f5e10518076e6554a9381fa91bd9c6850193695c141f32b21f979c985db07265a758867bac95de05f7d8aeb39 - languageName: node - linkType: hard - -"tar@npm:^7.4.3": - version: 7.4.3 - resolution: "tar@npm:7.4.3" - dependencies: - "@isaacs/fs-minipass": "npm:^4.0.0" - chownr: "npm:^3.0.0" - minipass: "npm:^7.1.2" - minizlib: "npm:^3.0.1" - mkdirp: "npm:^3.0.1" - yallist: "npm:^5.0.0" - checksum: 10c0/d4679609bb2a9b48eeaf84632b6d844128d2412b95b6de07d53d8ee8baf4ca0857c9331dfa510390a0727b550fd543d4d1a10995ad86cdf078423fbb8d99831d - languageName: node - linkType: hard - -"tar@npm:^7.5.6, tar@npm:^7.5.7": - version: 7.5.7 - resolution: "tar@npm:7.5.7" - dependencies: - "@isaacs/fs-minipass": "npm:^4.0.0" - chownr: "npm:^3.0.0" - minipass: "npm:^7.1.2" - minizlib: "npm:^3.1.0" - yallist: "npm:^5.0.0" - checksum: 10c0/51f261afc437e1112c3e7919478d6176ea83f7f7727864d8c2cce10f0b03a631d1911644a567348c3063c45abdae39718ba97abb073d22aa3538b9a53ae1e31c - languageName: node - linkType: hard - -"temp-file@npm:^3.4.0": - version: 3.4.0 - resolution: "temp-file@npm:3.4.0" - dependencies: - async-exit-hook: "npm:^2.0.1" - fs-extra: "npm:^10.0.0" - checksum: 10c0/70e441909097346a930ae02278df9b0133cd02dddf0b49e5ddaade735fef1410a50a448a2a812106f97c045294c99cc19f26943eb88f1d728d41fbc445a40298 - languageName: node - linkType: hard - -"tiny-async-pool@npm:1.3.0": - version: 1.3.0 - resolution: "tiny-async-pool@npm:1.3.0" - dependencies: - semver: "npm:^5.5.0" - checksum: 10c0/bbdece69f596f16d1a7b0df7fe451fe959c6f26af283d8919154f59abf8a853b3da1aea8d10e49e7af5b039a38a3d8b4ca0c044b59dcf19a93d63c6ee7e36507 - languageName: node - linkType: hard - -"tinyglobby@npm:^0.2.12": - version: 0.2.15 - resolution: "tinyglobby@npm:0.2.15" - dependencies: - fdir: "npm:^6.5.0" - picomatch: "npm:^4.0.3" - checksum: 10c0/869c31490d0d88eedb8305d178d4c75e7463e820df5a9b9d388291daf93e8b1eb5de1dad1c1e139767e4269fe75f3b10d5009b2cc14db96ff98986920a186844 - languageName: node - linkType: hard - -"tmp-promise@npm:^3.0.2": - version: 3.0.3 - resolution: "tmp-promise@npm:3.0.3" - dependencies: - tmp: "npm:^0.2.0" - checksum: 10c0/23b47dcb2e82b14bbd8f61ed7a9d9353cdb6a6f09d7716616cfd27d0087040cd40152965a518e598d7aabe1489b9569bf1eebde0c5fadeaf3ec8098adcebea4e - languageName: node - linkType: hard - -"tmp@npm:^0.2.0": - version: 0.2.3 - resolution: "tmp@npm:0.2.3" - checksum: 10c0/3e809d9c2f46817475b452725c2aaa5d11985cf18d32a7a970ff25b568438e2c076c2e8609224feef3b7923fa9749b74428e3e634f6b8e520c534eef2fd24125 - languageName: node - linkType: hard - -"to-regex-range@npm:^5.0.1": - version: 5.0.1 - resolution: "to-regex-range@npm:5.0.1" - dependencies: - is-number: "npm:^7.0.0" - checksum: 10c0/487988b0a19c654ff3e1961b87f471702e708fa8a8dd02a298ef16da7206692e8552a0250e8b3e8759270f62e9d8314616f6da274734d3b558b1fc7b7724e892 - languageName: node - linkType: hard - -"truncate-utf8-bytes@npm:^1.0.0": - version: 1.0.2 - resolution: "truncate-utf8-bytes@npm:1.0.2" - dependencies: - utf8-byte-length: "npm:^1.0.1" - checksum: 10c0/af2b431fc4314f119b551e5fccfad49d4c0ef82e13ba9ca61be6567801195b08e732ce9643542e8ad1b3df44f3df2d7345b3dd34f723954b6bb43a14584d6b3c - languageName: node - linkType: hard - -"ts-api-utils@npm:^2.0.0": - version: 2.0.0 - resolution: "ts-api-utils@npm:2.0.0" - peerDependencies: - typescript: ">=4.8.4" - checksum: 10c0/6165e29a5b75bd0218e3cb0f9ee31aa893dbd819c2e46dbb086c841121eb0436ed47c2c18a20cb3463d74fd1fb5af62e2604ba5971cc48e5b38ebbdc56746dfc - languageName: node - linkType: hard - -"tsconfig-paths@npm:^3.15.0": - version: 3.15.0 - resolution: "tsconfig-paths@npm:3.15.0" - dependencies: - "@types/json5": "npm:^0.0.29" - json5: "npm:^1.0.2" - minimist: "npm:^1.2.6" - strip-bom: "npm:^3.0.0" - checksum: 10c0/5b4f301a2b7a3766a986baf8fc0e177eb80bdba6e396792ff92dc23b5bca8bb279fc96517dcaaef63a3b49bebc6c4c833653ec58155780bc906bdbcf7dda0ef5 - languageName: node - linkType: hard - -"tslib@npm:^2.8.1": - version: 2.8.1 - resolution: "tslib@npm:2.8.1" - checksum: 10c0/9c4759110a19c53f992d9aae23aac5ced636e99887b51b9e61def52611732872ff7668757d4e4c61f19691e36f4da981cd9485e869b4a7408d689f6bf1f14e62 - languageName: node - linkType: hard - -"type-check@npm:^0.4.0, type-check@npm:~0.4.0": - version: 0.4.0 - resolution: "type-check@npm:0.4.0" - dependencies: - prelude-ls: "npm:^1.2.1" - checksum: 10c0/7b3fd0ed43891e2080bf0c5c504b418fbb3e5c7b9708d3d015037ba2e6323a28152ec163bcb65212741fa5d2022e3075ac3c76440dbd344c9035f818e8ecee58 - languageName: node - linkType: hard - -"type-fest@npm:^0.13.1": - version: 0.13.1 - resolution: "type-fest@npm:0.13.1" - checksum: 10c0/0c0fa07ae53d4e776cf4dac30d25ad799443e9eef9226f9fddbb69242db86b08584084a99885cfa5a9dfe4c063ebdc9aa7b69da348e735baede8d43f1aeae93b - languageName: node - linkType: hard - -"typed-array-buffer@npm:^1.0.3": - version: 1.0.3 - resolution: "typed-array-buffer@npm:1.0.3" - dependencies: - call-bound: "npm:^1.0.3" - es-errors: "npm:^1.3.0" - is-typed-array: "npm:^1.1.14" - checksum: 10c0/1105071756eb248774bc71646bfe45b682efcad93b55532c6ffa4518969fb6241354e4aa62af679ae83899ec296d69ef88f1f3763657cdb3a4d29321f7b83079 - languageName: node - linkType: hard - -"typed-array-byte-length@npm:^1.0.3": - version: 1.0.3 - resolution: "typed-array-byte-length@npm:1.0.3" - dependencies: - call-bind: "npm:^1.0.8" - for-each: "npm:^0.3.3" - gopd: "npm:^1.2.0" - has-proto: "npm:^1.2.0" - is-typed-array: "npm:^1.1.14" - checksum: 10c0/6ae083c6f0354f1fce18b90b243343b9982affd8d839c57bbd2c174a5d5dc71be9eb7019ffd12628a96a4815e7afa85d718d6f1e758615151d5f35df841ffb3e - languageName: node - linkType: hard - -"typed-array-byte-offset@npm:^1.0.4": - version: 1.0.4 - resolution: "typed-array-byte-offset@npm:1.0.4" - dependencies: - available-typed-arrays: "npm:^1.0.7" - call-bind: "npm:^1.0.8" - for-each: "npm:^0.3.3" - gopd: "npm:^1.2.0" - has-proto: "npm:^1.2.0" - is-typed-array: "npm:^1.1.15" - reflect.getprototypeof: "npm:^1.0.9" - checksum: 10c0/3d805b050c0c33b51719ee52de17c1cd8e6a571abdf0fffb110e45e8dd87a657e8b56eee94b776b13006d3d347a0c18a730b903cf05293ab6d92e99ff8f77e53 - languageName: node - linkType: hard - -"typed-array-length@npm:^1.0.7": - version: 1.0.7 - resolution: "typed-array-length@npm:1.0.7" - dependencies: - call-bind: "npm:^1.0.7" - for-each: "npm:^0.3.3" - gopd: "npm:^1.0.1" - is-typed-array: "npm:^1.1.13" - possible-typed-array-names: "npm:^1.0.0" - reflect.getprototypeof: "npm:^1.0.6" - checksum: 10c0/e38f2ae3779584c138a2d8adfa8ecf749f494af3cd3cdafe4e688ce51418c7d2c5c88df1bd6be2bbea099c3f7cea58c02ca02ed438119e91f162a9de23f61295 - languageName: node - linkType: hard - -"typescript@npm:^5.7.3": - version: 5.7.3 - resolution: "typescript@npm:5.7.3" - bin: - tsc: bin/tsc - tsserver: bin/tsserver - checksum: 10c0/b7580d716cf1824736cc6e628ab4cd8b51877408ba2be0869d2866da35ef8366dd6ae9eb9d0851470a39be17cbd61df1126f9e211d8799d764ea7431d5435afa - languageName: node - linkType: hard - -"typescript@patch:typescript@npm%3A^5.7.3#optional!builtin": - version: 5.7.3 - resolution: "typescript@patch:typescript@npm%3A5.7.3#optional!builtin::version=5.7.3&hash=5786d5" - bin: - tsc: bin/tsc - tsserver: bin/tsserver - checksum: 10c0/6fd7e0ed3bf23a81246878c613423730c40e8bdbfec4c6e4d7bf1b847cbb39076e56ad5f50aa9d7ebd89877999abaee216002d3f2818885e41c907caaa192cc4 - languageName: node - linkType: hard - -"unbox-primitive@npm:^1.1.0": - version: 1.1.0 - resolution: "unbox-primitive@npm:1.1.0" - dependencies: - call-bound: "npm:^1.0.3" - has-bigints: "npm:^1.0.2" - has-symbols: "npm:^1.1.0" - which-boxed-primitive: "npm:^1.1.1" - checksum: 10c0/7dbd35ab02b0e05fe07136c72cb9355091242455473ec15057c11430129bab38b7b3624019b8778d02a881c13de44d63cd02d122ee782fb519e1de7775b5b982 - languageName: node - linkType: hard - -"undici-types@npm:~6.19.2": - version: 6.19.8 - resolution: "undici-types@npm:6.19.8" - checksum: 10c0/078afa5990fba110f6824823ace86073b4638f1d5112ee26e790155f481f2a868cc3e0615505b6f4282bdf74a3d8caad715fd809e870c2bb0704e3ea6082f344 - languageName: node - linkType: hard - -"undici-types@npm:~6.20.0": - version: 6.20.0 - resolution: "undici-types@npm:6.20.0" - checksum: 10c0/68e659a98898d6a836a9a59e6adf14a5d799707f5ea629433e025ac90d239f75e408e2e5ff086afc3cace26f8b26ee52155293564593fbb4a2f666af57fc59bf - languageName: node - linkType: hard - -"unique-filename@npm:^4.0.0": - version: 4.0.0 - resolution: "unique-filename@npm:4.0.0" - dependencies: - unique-slug: "npm:^5.0.0" - checksum: 10c0/38ae681cceb1408ea0587b6b01e29b00eee3c84baee1e41fd5c16b9ed443b80fba90c40e0ba69627e30855570a34ba8b06702d4a35035d4b5e198bf5a64c9ddc - languageName: node - linkType: hard - -"unique-slug@npm:^5.0.0": - version: 5.0.0 - resolution: "unique-slug@npm:5.0.0" - dependencies: - imurmurhash: "npm:^0.1.4" - checksum: 10c0/d324c5a44887bd7e105ce800fcf7533d43f29c48757ac410afd42975de82cc38ea2035c0483f4de82d186691bf3208ef35c644f73aa2b1b20b8e651be5afd293 - languageName: node - linkType: hard - -"universalify@npm:^0.1.0": - version: 0.1.2 - resolution: "universalify@npm:0.1.2" - checksum: 10c0/e70e0339f6b36f34c9816f6bf9662372bd241714dc77508d231d08386d94f2c4aa1ba1318614f92015f40d45aae1b9075cd30bd490efbe39387b60a76ca3f045 - languageName: node - linkType: hard - -"universalify@npm:^2.0.0": - version: 2.0.1 - resolution: "universalify@npm:2.0.1" - checksum: 10c0/73e8ee3809041ca8b818efb141801a1004e3fc0002727f1531f4de613ea281b494a40909596dae4a042a4fb6cd385af5d4db2e137b1362e0e91384b828effd3a - languageName: node - linkType: hard - -"uri-js@npm:^4.2.2": - version: 4.4.1 - resolution: "uri-js@npm:4.4.1" - dependencies: - punycode: "npm:^2.1.0" - checksum: 10c0/4ef57b45aa820d7ac6496e9208559986c665e49447cb072744c13b66925a362d96dd5a46c4530a6b8e203e5db5fe849369444440cb22ecfc26c679359e5dfa3c - languageName: node - linkType: hard - -"utf8-byte-length@npm:^1.0.1": - version: 1.0.5 - resolution: "utf8-byte-length@npm:1.0.5" - checksum: 10c0/e69bda3299608f4cc75976da9fb74ac94801a58b9ca29fdad03a20ec952e7477d7f226c12716b5f36bd4cff8151d1d152d02ee1df3752f017d4b2c725ce3e47a - languageName: node - linkType: hard - -"util-deprecate@npm:^1.0.1": - version: 1.0.2 - resolution: "util-deprecate@npm:1.0.2" - checksum: 10c0/41a5bdd214df2f6c3ecf8622745e4a366c4adced864bc3c833739791aeeeb1838119af7daed4ba36428114b5c67dcda034a79c882e97e43c03e66a4dd7389942 - languageName: node - linkType: hard - -"uuid@npm:^11.0.5": - version: 11.0.5 - resolution: "uuid@npm:11.0.5" - bin: - uuid: dist/esm/bin/uuid - checksum: 10c0/6f59f0c605e02c14515401084ca124b9cb462b4dcac866916a49862bcf831874508a308588c23a7718269226ad11a92da29b39d761ad2b86e736623e3a33b6e7 - languageName: node - linkType: hard - -"verror@npm:^1.10.0": - version: 1.10.1 - resolution: "verror@npm:1.10.1" - dependencies: - assert-plus: "npm:^1.0.0" - core-util-is: "npm:1.0.2" - extsprintf: "npm:^1.2.0" - checksum: 10c0/293fb060a4c9b07965569a0c3e45efa954127818707995a8a4311f691b5d6687be99f972c759838ba6eecae717f9af28e3c49d2afc7bbdf5f0b675238f1426e8 - languageName: node - linkType: hard - -"wcwidth@npm:^1.0.1": - version: 1.0.1 - resolution: "wcwidth@npm:1.0.1" - dependencies: - defaults: "npm:^1.0.3" - checksum: 10c0/5b61ca583a95e2dd85d7078400190efd452e05751a64accb8c06ce4db65d7e0b0cde9917d705e826a2e05cc2548f61efde115ffa374c3e436d04be45c889e5b4 - languageName: node - linkType: hard - -"which-boxed-primitive@npm:^1.1.0, which-boxed-primitive@npm:^1.1.1": - version: 1.1.1 - resolution: "which-boxed-primitive@npm:1.1.1" - dependencies: - is-bigint: "npm:^1.1.0" - is-boolean-object: "npm:^1.2.1" - is-number-object: "npm:^1.1.1" - is-string: "npm:^1.1.1" - is-symbol: "npm:^1.1.1" - checksum: 10c0/aceea8ede3b08dede7dce168f3883323f7c62272b49801716e8332ff750e7ae59a511ae088840bc6874f16c1b7fd296c05c949b0e5b357bfe3c431b98c417abe - languageName: node - linkType: hard - -"which-builtin-type@npm:^1.2.1": - version: 1.2.1 - resolution: "which-builtin-type@npm:1.2.1" - dependencies: - call-bound: "npm:^1.0.2" - function.prototype.name: "npm:^1.1.6" - has-tostringtag: "npm:^1.0.2" - is-async-function: "npm:^2.0.0" - is-date-object: "npm:^1.1.0" - is-finalizationregistry: "npm:^1.1.0" - is-generator-function: "npm:^1.0.10" - is-regex: "npm:^1.2.1" - is-weakref: "npm:^1.0.2" - isarray: "npm:^2.0.5" - which-boxed-primitive: "npm:^1.1.0" - which-collection: "npm:^1.0.2" - which-typed-array: "npm:^1.1.16" - checksum: 10c0/8dcf323c45e5c27887800df42fbe0431d0b66b1163849bb7d46b5a730ad6a96ee8bfe827d078303f825537844ebf20c02459de41239a0a9805e2fcb3cae0d471 - languageName: node - linkType: hard - -"which-collection@npm:^1.0.2": - version: 1.0.2 - resolution: "which-collection@npm:1.0.2" - dependencies: - is-map: "npm:^2.0.3" - is-set: "npm:^2.0.3" - is-weakmap: "npm:^2.0.2" - is-weakset: "npm:^2.0.3" - checksum: 10c0/3345fde20964525a04cdf7c4a96821f85f0cc198f1b2ecb4576e08096746d129eb133571998fe121c77782ac8f21cbd67745a3d35ce100d26d4e684c142ea1f2 - languageName: node - linkType: hard - -"which-typed-array@npm:^1.1.16, which-typed-array@npm:^1.1.18": - version: 1.1.18 - resolution: "which-typed-array@npm:1.1.18" - dependencies: - available-typed-arrays: "npm:^1.0.7" - call-bind: "npm:^1.0.8" - call-bound: "npm:^1.0.3" - for-each: "npm:^0.3.3" - gopd: "npm:^1.2.0" - has-tostringtag: "npm:^1.0.2" - checksum: 10c0/0412f4a91880ca1a2a63056187c2e3de6b129b2b5b6c17bc3729f0f7041047ae48fb7424813e51506addb2c97320003ee18b8c57469d2cde37983ef62126143c - languageName: node - linkType: hard - -"which@npm:^2.0.1": - version: 2.0.2 - resolution: "which@npm:2.0.2" - dependencies: - isexe: "npm:^2.0.0" - bin: - node-which: ./bin/node-which - checksum: 10c0/66522872a768b60c2a65a57e8ad184e5372f5b6a9ca6d5f033d4b0dc98aff63995655a7503b9c0a2598936f532120e81dd8cc155e2e92ed662a2b9377cc4374f - languageName: node - linkType: hard - -"which@npm:^5.0.0": - version: 5.0.0 - resolution: "which@npm:5.0.0" - dependencies: - isexe: "npm:^3.1.1" - bin: - node-which: bin/which.js - checksum: 10c0/e556e4cd8b7dbf5df52408c9a9dd5ac6518c8c5267c8953f5b0564073c66ed5bf9503b14d876d0e9c7844d4db9725fb0dcf45d6e911e17e26ab363dc3965ae7b - languageName: node - linkType: hard - -"word-wrap@npm:^1.2.5": - version: 1.2.5 - resolution: "word-wrap@npm:1.2.5" - checksum: 10c0/e0e4a1ca27599c92a6ca4c32260e8a92e8a44f4ef6ef93f803f8ed823f486e0889fc0b93be4db59c8d51b3064951d25e43d434e95dc8c960cc3a63d65d00ba20 - languageName: node - linkType: hard - -"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0, wrap-ansi@npm:^7.0.0": - version: 7.0.0 - resolution: "wrap-ansi@npm:7.0.0" - dependencies: - ansi-styles: "npm:^4.0.0" - string-width: "npm:^4.1.0" - strip-ansi: "npm:^6.0.0" - checksum: 10c0/d15fc12c11e4cbc4044a552129ebc75ee3f57aa9c1958373a4db0292d72282f54373b536103987a4a7594db1ef6a4f10acf92978f79b98c49306a4b58c77d4da - languageName: node - linkType: hard - -"wrap-ansi@npm:^8.1.0": - version: 8.1.0 - resolution: "wrap-ansi@npm:8.1.0" - dependencies: - ansi-styles: "npm:^6.1.0" - string-width: "npm:^5.0.1" - strip-ansi: "npm:^7.0.1" - checksum: 10c0/138ff58a41d2f877eae87e3282c0630fc2789012fc1af4d6bd626eeb9a2f9a65ca92005e6e69a75c7b85a68479fe7443c7dbe1eb8fbaa681a4491364b7c55c60 - languageName: node - linkType: hard - -"wrappy@npm:1": - version: 1.0.2 - resolution: "wrappy@npm:1.0.2" - checksum: 10c0/56fece1a4018c6a6c8e28fbc88c87e0fbf4ea8fd64fc6c63b18f4acc4bd13e0ad2515189786dd2c30d3eec9663d70f4ecf699330002f8ccb547e4a18231fc9f0 - languageName: node - linkType: hard - -"xmlbuilder@npm:>=11.0.1, xmlbuilder@npm:^15.1.1": - version: 15.1.1 - resolution: "xmlbuilder@npm:15.1.1" - checksum: 10c0/665266a8916498ff8d82b3d46d3993913477a254b98149ff7cff060d9b7cc0db7cf5a3dae99aed92355254a808c0e2e3ec74ad1b04aa1061bdb8dfbea26c18b8 - languageName: node - linkType: hard - -"y18n@npm:^5.0.5": - version: 5.0.8 - resolution: "y18n@npm:5.0.8" - checksum: 10c0/4df2842c36e468590c3691c894bc9cdbac41f520566e76e24f59401ba7d8b4811eb1e34524d57e54bc6d864bcb66baab7ffd9ca42bf1eda596618f9162b91249 - languageName: node - linkType: hard - -"yallist@npm:^4.0.0": - version: 4.0.0 - resolution: "yallist@npm:4.0.0" - checksum: 10c0/2286b5e8dbfe22204ab66e2ef5cc9bbb1e55dfc873bbe0d568aa943eb255d131890dfd5bf243637273d31119b870f49c18fcde2c6ffbb7a7a092b870dc90625a - languageName: node - linkType: hard - -"yallist@npm:^5.0.0": - version: 5.0.0 - resolution: "yallist@npm:5.0.0" - checksum: 10c0/a499c81ce6d4a1d260d4ea0f6d49ab4da09681e32c3f0472dee16667ed69d01dae63a3b81745a24bd78476ec4fcf856114cb4896ace738e01da34b2c42235416 - languageName: node - linkType: hard - -"yargs-parser@npm:^21.1.1": - version: 21.1.1 - resolution: "yargs-parser@npm:21.1.1" - checksum: 10c0/f84b5e48169479d2f402239c59f084cfd1c3acc197a05c59b98bab067452e6b3ea46d4dd8ba2985ba7b3d32a343d77df0debd6b343e5dae3da2aab2cdf5886b2 - languageName: node - linkType: hard - -"yargs@npm:^17.0.1, yargs@npm:^17.6.2": - version: 17.7.2 - resolution: "yargs@npm:17.7.2" - dependencies: - cliui: "npm:^8.0.1" - escalade: "npm:^3.1.1" - get-caller-file: "npm:^2.0.5" - require-directory: "npm:^2.1.1" - string-width: "npm:^4.2.3" - y18n: "npm:^5.0.5" - yargs-parser: "npm:^21.1.1" - checksum: 10c0/ccd7e723e61ad5965fffbb791366db689572b80cca80e0f96aad968dfff4156cd7cd1ad18607afe1046d8241e6fb2d6c08bf7fa7bfb5eaec818735d8feac8f05 - languageName: node - linkType: hard - -"yauzl@npm:^2.10.0": - version: 2.10.0 - resolution: "yauzl@npm:2.10.0" - dependencies: - buffer-crc32: "npm:~0.2.3" - fd-slicer: "npm:~1.1.0" - checksum: 10c0/f265002af7541b9ec3589a27f5fb8f11cf348b53cc15e2751272e3c062cd73f3e715bc72d43257de71bbaecae446c3f1b14af7559e8ab0261625375541816422 - languageName: node - linkType: hard - -"yocto-queue@npm:^0.1.0": - version: 0.1.0 - resolution: "yocto-queue@npm:0.1.0" - checksum: 10c0/dceb44c28578b31641e13695d200d34ec4ab3966a5729814d5445b194933c096b7ced71494ce53a0e8820685d1d010df8b2422e5bf2cdea7e469d97ffbea306f - languageName: node - linkType: hard diff --git a/application/logo.ascii b/application/logo.ascii deleted file mode 100644 index 2a1e8e0b2d..0000000000 --- a/application/logo.ascii +++ /dev/null @@ -1,8 +0,0 @@ - __ _ - / / ___ __ _/\ /(_) _____ _____ _ __ - / / / _ \ / _` \ \ / / |/ _ \ \ /\ / / _ \ '__| -/ /__| (_) | (_| |\ V /| | __/\ V V / __/ | -\____/\___/ \__, | \_/ |_|\___| \_/\_/ \___|_| - |___/ - -Logs analyzer tool diff --git a/application/platform/.eslintrc.json b/application/platform/.eslintrc.json deleted file mode 100644 index 83b03bb4a6..0000000000 --- a/application/platform/.eslintrc.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "env": { - "node": true, - "browser": false, - "es2021": true - }, - "extends": [ - "eslint:recommended", - "plugin:@typescript-eslint/eslint-recommended", - "plugin:@typescript-eslint/recommended" - ], - "parser": "@typescript-eslint/parser", - "parserOptions": { - "ecmaVersion": "latest", - "sourceType": "module" - }, - "plugins": ["@typescript-eslint"], - "ignorePatterns": ["dist/**"], - "rules": { - "@typescript-eslint/no-unused-vars": [ - "error", - { - "argsIgnorePattern": "^_", - "varsIgnorePattern": "^_" - } - ], - "@typescript-eslint/no-empty-interface": "off", - "@typescript-eslint/no-explicit-any": "off", - "@typescript-eslint/no-inferrable-types": "off", - "@typescript-eslint/no-this-alias": "off", - "@typescript-eslint/no-unsafe-declaration-merging": "off", - "@typescript-eslint/ban-types": [ - "error", - { - "types": { - "{}": false - }, - "extendDefaults": true - } - ] - } -} diff --git a/application/platform/.yarnrc.yml b/application/platform/.yarnrc.yml deleted file mode 100644 index d7222b9065..0000000000 --- a/application/platform/.yarnrc.yml +++ /dev/null @@ -1,3 +0,0 @@ -nodeLinker: node-modules -enableGlobalCache: false -cacheFolder: .yarn/cache \ No newline at end of file diff --git a/application/platform/entity/controller.ts b/application/platform/entity/controller.ts deleted file mode 100644 index 56d2a59704..0000000000 --- a/application/platform/entity/controller.ts +++ /dev/null @@ -1,72 +0,0 @@ -import { decoratorFactory, DecoratorConstructor } from '../env/decorators'; -import { - Inputs as ServiceInputs, - Implementation as ServiceImplementation, - Interface as ServiceInterface, -} from './service'; -import { getWithDefaults } from '../env/obj'; -import { scope } from '../env/scope'; -import { Logger } from '../log'; -import { unique } from '../env/sequence'; - -export interface Inputs { - name: string; - parent: ServiceInputs; - accessor

(uuid: string): P; -} - -export interface Interface { - getName(): string; - getUuid(): string; - log(): Logger; - parent

(): P; -} - -export abstract class Implementation { - public destroy(): Promise { - return Promise.resolve(); - } -} - -const UUID_PROP: string = unique(); - -export const Define = decoratorFactory((constructor: DecoratorConstructor, obj: Inputs) => { - if (!obj) { - throw new Error(`Fail to declare controller. Invalid inputs.`); - } - if (!obj.parent) { - throw new Error(`Fail to declare controller "${obj.name}". Invalid parent.`); - } - const logger = scope.getLogger(`C (${obj.parent.name}): ${obj.name}`); - logger.debug(`controller is declared`); - return class extends constructor { - __name: string = obj.name; - __uuid: string = getWithDefaults(constructor, UUID_PROP, unique()); - __parent: string = obj.parent.uuid; - __logger: Logger = logger; - public getName(): string { - if (this === undefined || this.__name === undefined) { - throw new Error(`Controller ${obj.name} isn't inited`); - } - return this.__name; - } - public getUuid(): string { - if (this === undefined || this.__uuid === undefined) { - throw new Error(`Controller ${obj.name} isn't inited`); - } - return this.__uuid; - } - public log(): Logger { - if (this === undefined || this.__logger === undefined) { - throw new Error(`Controller ${obj.name} isn't inited`); - } - return this.__logger; - } - public parent

(): P { - if (this === undefined || this.__parent === undefined) { - throw new Error(`Controller ${obj.name} isn't inited`); - } - return obj.accessor(this.__parent); - } - }; -}); diff --git a/application/platform/entity/index.ts b/application/platform/entity/index.ts deleted file mode 100644 index 07a603bf51..0000000000 --- a/application/platform/entity/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -export * as controller from './controller'; -export * as logger from './logger'; -export * as service from './service'; diff --git a/application/platform/entity/logger.ts b/application/platform/entity/logger.ts deleted file mode 100644 index 318c8f402b..0000000000 --- a/application/platform/entity/logger.ts +++ /dev/null @@ -1,39 +0,0 @@ -import { decoratorFactory, DecoratorConstructor } from '../env/decorators'; -import { scope } from '../env/scope'; -import { Logger } from '../log'; - -export interface LoggerInterface { - getLoggerName(): string; - setLoggerName(name: string): string; - log(): Logger; -} - -export const SetupLogger = decoratorFactory( - (constructor: DecoratorConstructor, defaults?: string | void) => { - let alias = defaults === undefined ? 'noname' : defaults; - return class extends constructor { - __name: string = alias; - __logger: Logger = scope.getLogger(alias); - public getLoggerName(): string { - if (this === undefined || this.__name === undefined) { - throw new Error(`Entity ${alias} isn't inited`); - } - return this.__name; - } - public setLoggerName(name: string): void { - if (this === undefined) { - throw new Error(`Entity ${alias} isn't inited`); - } - alias = name; - this.__name = name; - this.__logger = scope.getLogger(name); - } - public log(): Logger { - if (this === undefined || this.__logger === undefined) { - throw new Error(`Entity ${alias} isn't inited`); - } - return this.__logger; - } - }; - }, -); diff --git a/application/platform/entity/service.ts b/application/platform/entity/service.ts deleted file mode 100644 index 8317bdc4e2..0000000000 --- a/application/platform/entity/service.ts +++ /dev/null @@ -1,104 +0,0 @@ -import { decoratorFactory, DecoratorConstructor } from '../env/decorators'; -import { getWithDefaults } from '../env/obj'; -import { scope } from '../env/scope'; -import { Logger } from '../log'; -import { unique } from '../env/sequence'; -import { Subscriber } from '../env/subscription'; - -export interface Inputs { - name: string; - uuid: string; -} - -export interface Interface { - getName(): string; - getUuid(): string; - getDepencencies(): Array; - log(): Logger; -} - -export abstract class Implementation extends Subscriber { - /** - * Initialization of service. - * Service can do some work for initialization - * @returns Promise - */ - public init(): Promise { - return Promise.resolve(); - } - /** - * Method will be called after all services are inited - * @returns Promise - */ - public ready(): Promise { - return Promise.resolve(); - } - // /** - // * Method will be called right after method "ready" to confirm: service is ready for work - // * @returns Promise - // */ - // public reaffirm(): Promise { - // return Promise.resolve(); - // } - public destroy(): Promise { - this.unsubscribe(); - return Promise.resolve(); - } -} - -const DEPENDENCY_PROP: string = unique(); -const UUID_PROP: string = unique(); - -const services: Map = new Map(); - -export function register(service: T & Interface & Implementation) { - services.set(service.getUuid(), service); - return service; -} - -export function getRegistred(): Map { - return services; -} - -/** - * Note! Properties will not be available in constructor of service's implementation - */ -export const SetupService = decoratorFactory( - (constructor: DecoratorConstructor, obj: Inputs) => { - const logger = scope.getLogger(`S: ${obj.name}`); - logger.debug(`service is declared`); - return class extends constructor { - __name: string = obj.name; - __uuid: string = getWithDefaults(constructor, UUID_PROP, obj.uuid); - __logger: Logger = logger; - public getName(): string { - if (this === undefined || this.__name === undefined) { - throw new Error(`Service ${obj.name} isn't inited`); - } - return this.__name; - } - public getDepencencies(): Array { - return getWithDefaults(constructor, DEPENDENCY_PROP, []); - } - public getUuid(): string { - if (this === undefined || this.__uuid === undefined) { - throw new Error(`Service ${obj.name} isn't inited`); - } - return this.__uuid; - } - public log(): Logger { - if (this === undefined || this.__logger === undefined) { - throw new Error(`Service ${obj.name} isn't inited`); - } - return this.__logger; - } - }; - }, -); - -export const DependOn = decoratorFactory( - (owner: DecoratorConstructor, depenceny: Interface) => { - getWithDefaults(owner, DEPENDENCY_PROP, []).push(depenceny); - return undefined; - }, -); diff --git a/application/platform/env/decorators.ts b/application/platform/env/decorators.ts deleted file mode 100644 index 7e82c6c763..0000000000 --- a/application/platform/env/decorators.ts +++ /dev/null @@ -1,84 +0,0 @@ -// eslint-disable-next-line @typescript-eslint/no-unsafe-function-type -export interface DecoratorConstructor extends Function { - new (...args: any[]): any; -} - -export type DecoratorInjector = ( - cls: DecoratorConstructor, - obj: Input, -) => DecoratorConstructor & any; - -/** - * Note! Properties will not be available in constructor - */ -export function decoratorFactory(injector: DecoratorInjector) { - return function decorator(obj: Input): any { - return (constructor: T): T & any => { - return injector(constructor, obj); - }; - }; -} - -export type SingleDecoratorInjector = (cls: DecoratorConstructor) => DecoratorConstructor & any; - -/** - * Note! Properties will not be available in constructor - */ -export function singleDecoratorFactory(injector: SingleDecoratorInjector) { - return function decorator(): any { - return (constructor: T): T & any => { - return injector(constructor); - }; - }; -} - -export type SingleParameteredDecoratorInjector = ( - cls: DecoratorConstructor, - a: A, -) => DecoratorConstructor & any; - -/** - * Note! Properties will not be available in constructor - */ -export function singleParameteredDecoratorFactory( - injector: SingleParameteredDecoratorInjector, -) { - return function decorator(a: A): any { - return (constructor: T): T & any => { - return injector(constructor, a); - }; - }; -} -// Example of generic decorator -// export function DeriveTyped() { -// return singleParameteredDecoratorFactory((constructor: DecoratorConstructor, _alias: T) => { -// constructor.prototype.alias = function (): T { -// return alias; -// }; -// (constructor as any).alias = function (): T { -// return alias; -// }; -// return class extends constructor {}; -// }); -// } -// @DeriveTyped()('some') - -export type MethodDecoratorInjector = ( - cls: DecoratorConstructor, - propertyKey: string, - descriptor: PropertyDescriptor, -) => DecoratorConstructor & any; - -export function methodDecoratorFactory(injector: MethodDecoratorInjector) { - return function decorator(): any { - return (constructor: T, propertyKey: string, descriptor: PropertyDescriptor): T & any => { - return injector(constructor, propertyKey, descriptor); - }; - }; -} - -export function Statics() { - return (constructor: U) => { - constructor; - }; -} diff --git a/application/platform/env/filters.ts b/application/platform/env/filters.ts deleted file mode 100644 index 18a1ceca9c..0000000000 --- a/application/platform/env/filters.ts +++ /dev/null @@ -1,35 +0,0 @@ -import { IFilterFlags } from '../types/filter'; -import { serialize, fromStr } from './regex'; - -export function getSearchRegExp(request: string, flags: IFilterFlags): RegExp { - if (flags.reg) { - return fromStr( - flags.word ? `\\b${request}\\b` : request, - `g${flags.cases ? '' : 'i'}m`, - ) as RegExp; - } else if (flags.word) { - return fromStr(`\\b${serialize(request)}\\b`, `g${flags.cases ? '' : 'i'}m`) as RegExp; - } else { - return fromStr(`${serialize(request)}`, `g${flags.cases ? '' : 'i'}m`) as RegExp; - } -} - -export function getMarkerRegExp(request: string, flags: IFilterFlags): RegExp { - if (flags.reg) { - return fromStr( - flags.word ? `\\b${request}\\b` : request, - `g${flags.cases ? '' : 'i'}m`, - ) as RegExp; - } else if (flags.word) { - return fromStr(`\\b${serialize(request)}\\b`, `g${flags.cases ? '' : 'i'}m`) as RegExp; - } else { - return fromStr(serialize(request), `g${flags.cases ? '' : 'i'}m`) as RegExp; - } -} - -export function hasGroups(strReg: string): boolean { - strReg = strReg.replaceAll('\\(', '').replaceAll('\\)', ''); - const left = strReg.split('').filter((s) => s === '(').length; - const right = strReg.split('').filter((s) => s === ')').length; - return left >= 1 ? left === right : false; -} diff --git a/application/platform/env/globals.ts b/application/platform/env/globals.ts deleted file mode 100644 index 899dc78e13..0000000000 --- a/application/platform/env/globals.ts +++ /dev/null @@ -1,37 +0,0 @@ -const KEY = '__CHIPMUNK_GLOBAL_SCOPE__'; - -declare const global: { [key: string]: any }; -declare const window: { [key: string]: any }; - -const scoped: { [key: string]: any } = {}; - -export class Globals { - protected scope(): { [key: string]: any } { - if (typeof global === 'object') { - return global; - } else if (typeof window === 'object') { - return window; - } else { - return scoped; - } - } - - protected storage(): { [key: string]: any } { - const scope = this.scope(); - if (scope[KEY] === undefined) { - scope[KEY] = {}; - } - return scope[KEY]; - } - public get(key: string): T | undefined { - const storage = this.storage(); - return storage[key]; - } - - public set(key: string, value: T): void { - const storage = this.storage(); - storage[key] = value; - } -} - -export const globals = new Globals(); diff --git a/application/platform/env/hash.ts b/application/platform/env/hash.ts deleted file mode 100644 index 7215326c0c..0000000000 --- a/application/platform/env/hash.ts +++ /dev/null @@ -1,12 +0,0 @@ -export function hash(str: string): number { - let hash: number = 0; - if (str.length === 0) { - return hash; - } - for (let i = 0; i < str.length; i++) { - const char = str.charCodeAt(i); - hash = (hash << 5) - hash + char; - hash = hash & hash; - } - return hash; -} diff --git a/application/platform/env/index.ts b/application/platform/env/index.ts deleted file mode 100644 index 23638213a6..0000000000 --- a/application/platform/env/index.ts +++ /dev/null @@ -1,16 +0,0 @@ -export * as decorators from './decorators'; -export * as filters from './filters'; -export * as hash from './hash'; -export * as ipaddr from './ipaddr'; -export * as lock from './lock.token'; -export * as obj from './obj'; -export * as promise from './promise'; -export * as queue from './queue'; -export * as regex from './regex'; -export * as scope from './scope'; -export * as sequence from './sequence'; -export * as str from './str'; -export * as subscription from './subscription'; -export * as togglers from './togglers'; -export * as observer from './observer'; -export * as runner from './runner'; diff --git a/application/platform/env/ipaddr.ts b/application/platform/env/ipaddr.ts deleted file mode 100644 index d6e1e1ba2a..0000000000 --- a/application/platform/env/ipaddr.ts +++ /dev/null @@ -1,88 +0,0 @@ -export enum EIPVer { - IPv4 = 'IPv4', - IPv6 = 'IPv6', -} - -export function anyIPAddr(addr: unknown): boolean { - if (typeof addr !== 'string') { - return false; - } - if (addr.trim() === '') { - return false; - } - return ( - isValidIPv4(addr) || - isValidIPv4WithPort(addr) || - isValidIPv6(addr) || - isValidIPv6WithPort(addr) - ); -} - -export function isValidIPv4(addr: unknown): boolean { - if (typeof addr !== 'string') { - return false; - } - return ( - addr - .replace( - /^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$/gi, - '', - ) - .trim() === '' - ); -} - -export function isValidIPv4WithPort(addr: unknown): boolean { - if (typeof addr !== 'string') { - return false; - } - return ( - addr - .replace( - /^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(:\d{1,})$/gi, - '', - ) - .trim() === '' - ); -} - -export function isValidIPv6(addr: unknown): boolean { - if (typeof addr !== 'string') { - return false; - } - return ( - addr - .replace( - /(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))/gi, - '', - ) - .trim() === '' - ); -} - -export function isValidIPv6WithPort(addr: unknown): boolean { - if (typeof addr !== 'string') { - return false; - } - return ( - addr - .replace( - /\[(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\]:(\d{1,})$/gi, - '', - ) - .trim() === '' - ); -} - -export function getIPVer(addr: string): EIPVer | Error { - if (typeof addr !== 'string' || addr.trim() === '') { - return new Error(`addr should be a not empty string`); - } - if (isValidIPv6(addr)) { - return EIPVer.IPv6; - } else if (isValidIPv4(addr)) { - return EIPVer.IPv4; - } else { - return new Error(`Value of address isn't valid`); - } -} diff --git a/application/platform/env/lock.token.ts b/application/platform/env/lock.token.ts deleted file mode 100644 index 8c6eb9e8f4..0000000000 --- a/application/platform/env/lock.token.ts +++ /dev/null @@ -1,78 +0,0 @@ -import { Subject } from './subscription'; - -export class LockToken { - public static timeout(locked: boolean, timeout: number): LockToken { - return new LockToken(locked, timeout); - } - public static simple(locked: boolean): LockToken { - return new LockToken(locked, 0); - } - - private _id: any = undefined; - private _timeout: number; - - constructor(locked: boolean, timeout: number = 200) { - this._id = locked ? -1 : undefined; - this._timeout = timeout; - } - - public lock() { - if (this._timeout > 0) { - this._id = setTimeout(() => { - this._id = undefined; - }, this._timeout); - } else { - this._id = -1; - } - } - - public unlock() { - clearTimeout(this._id); - this._id = undefined; - } - - public isLocked(): boolean { - return this._id !== undefined; - } -} - -export type AbortHandler = () => void; -export class AsyncLockToken { - private _locked: boolean; - private _state: Subject = new Subject(); - private _abort: AbortHandler | undefined; - - constructor(locked: boolean) { - this._locked = locked; - } - - public unlocked(): Promise { - if (!this.isLocked()) { - return Promise.resolve(); - } - if (this._abort !== undefined) { - this._abort(); - this._abort = undefined; - } - return new Promise((resolve) => { - const subscription = this._state.subscribe(() => { - subscription.destroy(); - resolve(); - }); - }); - } - - public lock(handler?: AbortHandler) { - this._abort = handler !== undefined ? handler : undefined; - this._locked = true; - } - - public unlock() { - this._locked = false; - this._state.emit(); - } - - public isLocked(): boolean { - return this._locked; - } -} diff --git a/application/platform/env/normalized.ts b/application/platform/env/normalized.ts deleted file mode 100644 index 742d46fac2..0000000000 --- a/application/platform/env/normalized.ts +++ /dev/null @@ -1,39 +0,0 @@ -export class NormalizedBackgroundTask { - protected timer: any = -1; - protected timestamp: number = 0; - protected duration: number; - protected readonly controller: AbortController = new AbortController(); - - constructor(duration: number) { - this.duration = duration; - this.timestamp = Date.now(); - this.safe = this.safe.bind(this); - } - - public run(task: () => void) { - clearTimeout(this.timer); - const diff = Date.now() - this.timestamp; - if (diff > this.duration) { - // This task should be done in any way - do not store timer ref - setTimeout(this.safe(task), 0); - } else { - // This task could be canceled, store reference - this.timer = setTimeout(this.safe(task), this.duration - diff); - } - } - - public abort(): void { - clearTimeout(this.timer); - this.controller.abort(); - } - - protected safe(task: () => void): () => void { - return () => { - if (this.controller.signal.aborted) { - return; - } - task(); - this.timestamp = Date.now(); - }; - } -} diff --git a/application/platform/env/num.ts b/application/platform/env/num.ts deleted file mode 100644 index f80a5bfd5e..0000000000 --- a/application/platform/env/num.ts +++ /dev/null @@ -1,39 +0,0 @@ -export function diffUInts(nums: unknown[], defaults: number): number { - let valid = true; - nums.forEach((n: unknown) => { - if (!valid) { - return; - } - if (typeof n !== 'number' || isNaN(n) || !isFinite(n) || n < 0) { - valid = false; - } - }); - if (!valid) { - return defaults; - } - const initial = nums.shift() as number; - return (nums as number[]).reduce((r, c) => r - c, initial); -} - -const U32 = [0, 4294967295]; - -export function isValidU32(value: string | number): boolean { - const u32: number = typeof value === 'string' ? parseInt(value, 10) : value; - if (isNaN(u32) || !isFinite(u32)) { - return false; - } - if (u32 < U32[0] || u32 > U32[1]) { - return false; - } - return true; -} - -export function isValid(value: number): boolean { - if (typeof value !== 'number') { - return false; - } - if (isNaN(value) || !isFinite(value)) { - return false; - } - return true; -} diff --git a/application/platform/env/obj.ts b/application/platform/env/obj.ts deleted file mode 100644 index f2386b2ae4..0000000000 --- a/application/platform/env/obj.ts +++ /dev/null @@ -1,434 +0,0 @@ -export type AnyObj = { [key: string]: unknown }; - -const U32 = [0, 4294967295]; - -export function isValidU32(value: string): boolean { - const u32: number = parseInt(value, 10); - if (isNaN(u32) || !isFinite(u32)) { - return false; - } - if (u32 < U32[0] || u32 > U32[1]) { - return false; - } - return true; -} - -export function sterilize(smth: T, ignore: string[] = []): T { - if (isPrimitiveOrNull(smth)) { - return smth; - } - if (['function', 'symbol'].includes(typeof smth)) { - return smth; - } - if (smth instanceof Array) { - return smth.map((el) => sterilize(el, ignore)) as T; - } else if (typeof smth === 'object') { - const clone: any = {}; - Object.keys(smth as any).forEach((key: string) => { - if (ignore.includes(key)) { - return; - } - clone[key] = sterilize((smth as any)[key], ignore); - }); - return clone; - } else { - return smth; - } -} - -export function isPrimitiveOrNull(smth: any): boolean { - if (['string', 'number', 'boolean', 'undefined'].includes(typeof smth) || smth === null) { - return true; - } - return false; -} - -export function isArrayOrObj(smth: any): boolean { - if (isPrimitiveOrNull(smth)) { - return false; - } - if (smth instanceof Array || typeof smth === 'object') { - return true; - } else { - return false; - } -} - -export function is(smth: any): boolean { - if (typeof smth !== 'object' || smth === null) { - return false; - } else if (smth instanceof Array) { - return false; - } else if ( - typeof smth.constructor === 'function' && - typeof smth.constructor.name === 'string' && - smth.constructor.name.toLowerCase() !== 'object' - ) { - return false; - } - return true; -} - -export function clone(obj: T, deep: number = 10): T { - deep -= 1; - if (deep < 0) { - throw new Error(`Fail to clone obj. Deep limit has been reached.`); - } - if (obj instanceof Array) { - return obj.map((item: any) => clone(item, deep)) as unknown as T; - } else if (!is(obj)) { - return obj as unknown as T; - } - const _obj: any = Object.assign({}, obj); - Object.keys(_obj).forEach((prop: string) => { - if (_obj[prop] instanceof Array) { - _obj[prop] = _obj[prop].map((item: any) => clone(item, deep)); - } else if (is(obj)) { - _obj[prop] = clone(_obj[prop], deep); - } - }); - return _obj; -} - -export function asAnyObj(smth: T): AnyObj { - return smth as unknown as AnyObj; -} - -export function setProp(dest: T, prop: string, value: unknown) { - if ((dest ?? true) === true || typeof dest !== 'object') { - throw new Error(`Expecting an object`); - } - (dest as any)[prop] = value; -} - -export function getProp(dest: T, prop: string): unknown { - if ((dest ?? true) === true || typeof dest !== 'object') { - throw new Error(`Expecting an object`); - } - return (dest as any)[prop]; -} - -export function getTypedProp(dest: T, prop: string): O { - if ((dest ?? true) === true || typeof dest !== 'object') { - throw new Error(`Expecting an object`); - } - if ((dest as any)[prop] === undefined) { - throw new Error(`Target property "${prop}" is undefined.`); - } - return (dest as any)[prop] as O; -} - -export function getPropByPath(dest: T, path: string): O | undefined { - if ((dest ?? true) === true) { - return undefined; - } - const parts: string[] = path.split('.'); - const current = asAnyObj(dest)[parts[0]]; - parts.splice(0, 1); - if (parts.length === 0) { - return current as O; - } else { - return getPropByPath(current, parts.join('.')); - } -} - -export function createPath(dest: T, path: string): void { - if ((dest ?? true) === true) { - return undefined; - } - const parts: string[] = path.split('.'); - if (asAnyObj(dest)[parts[0]] === undefined) { - asAnyObj(dest)[parts[0]] = {}; - } - const current = asAnyObj(dest)[parts[0]]; - parts.splice(0, 1); - if (parts.length > 0) { - createPath(current, parts.join('.')); - } -} - -export function getWithDefaults(obj: any, prop: string, defaults: T): T { - if (obj === undefined || obj === null) { - throw new Error(`Target cannot be null or undefined`); - } - if (obj[prop] === undefined || typeof obj[prop] !== typeof defaults) { - obj[prop] = defaults; - } - return obj[prop]; -} -export function isObject(src: any) { - if ((src ?? true) === true || typeof src !== 'object') { - throw new Error(`Expecting an object`); - } -} - -export function getObject(src: any): Record { - if ((src ?? true) === true || typeof src !== 'object') { - throw new Error(`Expecting an object`); - } - return src; -} -export function getAsString(src: any, key: string): string { - if (typeof src[key] !== 'string') { - throw new Error(`Parameter "${key}" should be a none-empty string`); - } - return src[key]; -} -export function getAsStringOrNull(src: any, key: string): string { - if (typeof src[key] !== 'string' && src[key] !== null) { - throw new Error(`Parameter "${key}" should be a string or null`); - } - return src[key]; -} -export function getAsNotEmptyString(src: any, key: string): string { - if (typeof src[key] !== 'string' || src[key].trim() === '') { - throw new Error(`Parameter "${key}" should be a none-empty string`); - } - return src[key]; -} -export function getAsArrayOfNotEmptyString(src: any, key: string): string[] { - if (!(src[key] instanceof Array)) { - throw new Error(`Parameter "${key}" should be valid array`); - } - for (const elem in src[key]) { - if (typeof elem !== 'string' || elem.trim() === '') { - throw new Error(`Parameter "${key}" should be a array of none-empty string`); - } - } - return src[key]; -} -export function getAsNotEmptyStringOrAsUndefined(src: any, key: string): string { - if (typeof src[key] === 'string' && src[key].trim() === '') { - throw new Error(`Parameter "${key}" should be a none-empty string`); - } - return src[key]; -} - -export function getAsBool(src: any, key: string, defaults?: boolean): boolean { - if (typeof src[key] !== 'boolean') { - if (defaults !== undefined) { - return defaults; - } - throw new Error(`Parameter "${key}" should be a boolean`); - } - return src[key]; -} - -export function getAsMap(src: any, key: string): any { - if (!(src[key] instanceof Map)) { - throw new Error(`Parameter "${key}" should be a Map`); - } - return src[key]; -} - -export function getAsMapOrNull(src: any, key: string): any { - if (!(src[key] instanceof Map)) { - if (src[key] === null) { - return null; - } - throw new Error(`Parameter "${key}" should be a Map or NULL`); - } - return src[key]; -} - -export function getAsObj(src: any, key: string, defaults?: unknown): any { - if (typeof src[key] !== 'object') { - if (defaults !== undefined) { - return defaults; - } - throw new Error(`Parameter "${key}" should be a object`); - } - return src[key]; -} - -export function getAsObjWithPrimitives(src: any, key: string): any { - if (typeof src[key] !== 'object') { - throw new Error(`Parameter "${key}" should be a object`); - } - Object.keys(src[key]).forEach((k: string) => { - const type = typeof src[key][k]; - if (type === 'function' || type === 'object' || type === 'symbol') { - throw new Error( - `Key "${k}" (of property "${key}") should be a primitive type; actual type: ${type}`, - ); - } - }); - return src[key]; -} - -export function getAsObjOrUndefined(src: any, key: string, defaults?: unknown): any { - if (typeof src[key] !== 'object' || isUndefinedOrNull(src, key)) { - if (defaults !== undefined) { - return defaults; - } else { - return undefined; - } - } - return src[key]; -} - -export function getAsValidNumber( - src: any, - key: string, - conditions?: { min?: number; max?: number; defaults?: number }, -): number { - if (typeof src[key] !== 'number' || isNaN(src[key]) || !isFinite(src[key])) { - if (conditions !== undefined) { - if (conditions.defaults !== undefined) { - return conditions.defaults; - } - } - throw new Error(`Parameter "${key}" should be valid number`); - } - if (conditions !== undefined) { - if (conditions.min !== undefined && src[key] < conditions.min) { - throw new Error(`Parameter "${key}" should be > ${conditions.min}`); - } - if (conditions.max !== undefined && src[key] > conditions.max) { - throw new Error(`Parameter "${key}" should be > ${conditions.max}`); - } - } - return src[key]; -} - -export function getAsValidNumberOrUndefined( - src: any, - key: string, - conditions?: { min?: number; max?: number; defaults?: number }, -): number | undefined { - return isUndefinedOrNull(src, key) ? undefined : getAsValidNumber(src, key, conditions); -} - -export function getAsArray(src: any, key: string): Array { - if (!(src[key] instanceof Array)) { - throw new Error(`Parameter "${key}" should be valid array`); - } - return src[key]; -} - -export function isUndefinedOrNull(src: any, key: string): boolean { - return src[key] === undefined || src[key] === null; -} - -export function getAsArrayOrUndefined(src: any, key: string): Array | undefined { - if (!(src[key] instanceof Array)) { - return undefined; - } - return src[key]; -} - -export function getAsStringsArrayOrUndefined(src: any, key: string): Array | undefined { - const target = src[key]; - if (!(target instanceof Array)) { - return undefined; - } - target.forEach((el: string) => { - if (typeof el !== 'string') { - throw new Error(`Expected type: string[]; found not string elements`); - } - }); - return target; -} - -export function getAsNotEmptyStringsArrayOrUndefined( - src: any, - key: string, -): Array | undefined { - const target = src[key]; - if (!(target instanceof Array)) { - return undefined; - } - target.forEach((el: string) => { - if (typeof el !== 'string') { - throw new Error(`Expected type: string[]; found not string elements`); - } - if (el.trim() === '') { - throw new Error(`Expected type: string[] without empty strings; found empty strings`); - } - }); - return target; -} - -export function from(src: any, props: string[]): T { - if (typeof src !== 'object') { - throw new Error(`Expecting an object`); - } - const smth: Record = {}; - props.forEach((prop: string) => { - if (src[prop] === undefined) { - throw new Error(`Property "${prop}" doesn't exist on source object`); - } - smth[prop] = src[prop]; - }); - return smth as T; -} - -export function getSafeObj(dest: unknown): { [key: string]: string } | Error { - if ( - typeof dest !== 'object' || - dest === undefined || - dest === null || - dest instanceof Array || - typeof dest === 'function' - ) { - return new Error(`Dest isn't any object; type = ${typeof dest}; value = ${dest}`); - } - const result: { [key: string]: string } = {}; - Object.keys(dest).forEach((key: any) => { - if (typeof key !== 'string') { - return; - } - if (!Object.hasOwn(dest, key)) { - return; - } - const value = (dest as any)[key]; - result[key] = typeof value !== 'string' ? `${value}` : value; - }); - return result; -} - -export function mapToObj(map: Map): { - [key: string | number | symbol]: V; -} { - const output: { - [key: string | number | symbol]: V; - } = {}; - map.forEach((v, k) => { - output[k] = v; - }); - return output; -} - -export function objToMap(obj: { - [key: string | number | symbol]: V; -}): Map { - const output: Map = new Map(); - Object.keys(obj).forEach((k) => output.set(k, obj[k])); - return output; -} - -export function objToStringMap(obj: { - [key: string | number | symbol]: string; -}): Map { - const output: Map = new Map(); - Object.keys(obj).forEach((k) => { - output.set(k, typeof obj[k] !== 'string' ? `${obj[k]}` : obj[k]); - }); - return output; -} - -export function getAsSetOfStringsOrEmpty(src: any, key: string): Set { - const target = src[key]; - - if (!(target instanceof Set)) { - return new Set(); - } - - target.forEach((el: any) => { - if (typeof el !== 'string') { - throw new Error(`Parameter "${key}" must be a Set of strings. Found a non-string value.`); - } - }); - - return target as Set; -} \ No newline at end of file diff --git a/application/platform/env/observer.ts b/application/platform/env/observer.ts deleted file mode 100644 index 41c5082f5a..0000000000 --- a/application/platform/env/observer.ts +++ /dev/null @@ -1,164 +0,0 @@ -import { Subject } from './subscription'; -import { Mutable } from '../types/unity/mutable'; -import { unique } from './sequence'; - -import * as obj from './obj'; - -export interface ObserverEvent { - target: any; - prop: string | symbol; -} - -type TRevoke = () => void; - -export class Observer { - static REVOKE = '__revoke__'; - static SIGNATURE = `__signature__`; - - static isSame(a: any, b: any): boolean { - if (!obj.isArrayOrObj(a) && !obj.isArrayOrObj(b)) { - return a === b; - } - if (!obj.isArrayOrObj(a) || !obj.isArrayOrObj(b)) { - return false; - } - - if (a instanceof Array && b instanceof Array) { - if (a.length !== b.length) { - return false; - } - try { - a.forEach((el, i) => { - if (!Observer.isSame(el, b[i])) { - throw false; - } - }); - } catch (_) { - return false; - } - return true; - } - if (a instanceof Array || b instanceof Array) { - return false; - } - if (typeof a === 'object' && typeof b === 'object') { - if (Object.keys(a).length !== Object.keys(b).length) { - return false; - } - try { - Object.keys(a).forEach((key: string) => { - if (key === Observer.SIGNATURE || key === Observer.REVOKE) { - return; - } - if (!Observer.isSame(a[key], b[key])) { - throw false; - } - }); - } catch (_) { - return false; - } - return true; - } - return false; - } - - public static sterilize(target: T): T { - return Observer.clone(target); - } - - public static clone(target: T, map?: Map): T { - if (!obj.isArrayOrObj(target)) { - return target; - } - if (target instanceof Array) { - return target.map((el) => this.clone(el, map)) as T; - } else if (typeof target === 'object') { - const cloned: any = {}; - Object.keys(target as any).forEach((key: string) => { - if (key === Observer.SIGNATURE || key === Observer.REVOKE) { - map !== undefined && map.delete((target as any)[Observer.SIGNATURE]); - return; - } - cloned[key] = this.clone((target as any)[key], map); - }); - return cloned; - } - return target; - } - - protected readonly revoke: Map = new Map(); - protected readonly pending: Map = new Map(); - - public watcher: Subject = new Subject(); - public readonly target: T; - - constructor(target: T) { - if (typeof target !== 'object' && !(target instanceof Array)) { - throw new Error(`Only objects and arrays can be observed`); - } - this.target = this.observe(target); - } - - public get(): T { - return this.target; - } - - public destroy(): void { - this.watcher.destroy(); - this.pending.forEach((id) => clearTimeout(id)); - this.revoke.forEach((revoke) => revoke()); - this.revoke.clear(); - (this as Mutable>).target = undefined; - } - - public sterilize(): T { - return Observer.sterilize(this.target); - } - - public overwrite(target: T) { - (this as Mutable>).target = this.observe(target); - } - - protected observe(target: T): T { - if (!obj.isArrayOrObj(target)) { - return target; - } - let cloned: any = Observer.clone(target, this.revoke); - if (cloned instanceof Array) { - cloned = cloned.map((el) => this.observe(el)) as T; - } else if (typeof cloned === 'object') { - Object.keys(cloned).forEach((key: string) => { - cloned[key] = this.observe(cloned[key]); - }); - } - const output = Proxy.revocable(cloned, { - set: (target, prop, value) => { - if (prop === Observer.SIGNATURE || prop === Observer.REVOKE) { - target[prop] = value; - return true; - } - if (target[prop] === value) { - return true; - } - target[prop] = this.observe(value); - this.watcher.emit({ target, prop }); - // this.emit({ target, prop }); - return true; - }, - }); - cloned[Observer.REVOKE] = output.revoke; - const uuid = unique(); - cloned[Observer.SIGNATURE] = uuid; - this.revoke.set(uuid, output.revoke); - return output.proxy; - } - - protected emit(event: ObserverEvent): void { - const uuid = unique(); - const id: number = setTimeout(() => { - this.watcher.emit(event); - this.pending.delete(uuid); - }, 0) as unknown as number; - this.pending.set(uuid, id); - } -} diff --git a/application/platform/env/promise.ts b/application/platform/env/promise.ts deleted file mode 100644 index 4c06493078..0000000000 --- a/application/platform/env/promise.ts +++ /dev/null @@ -1,553 +0,0 @@ -import { unique } from './sequence'; - -export type TResolver = (value: T) => void; - -export type TRejector = (error: Error) => void; - -export type TFinally = () => void; - -export type TCanceler = (reason?: T) => void; - -export type TExecutor = ( - resolve: TResolver, - reject: TRejector, - cancel: TCanceler, - refCancelCB: (cb: TCanceler) => void, - self: CancelablePromise, -) => void; - -export type TEventHandler = (...args: any[]) => any; - -export interface ICancelablePromise { - // new (executor: TExecutor): CancelablePromise; - then(callback: TResolver): CancelablePromise; - catch(callback: TRejector): CancelablePromise; - finally(callback: TFinally): CancelablePromise; - canceled(callback: TCanceler): CancelablePromise; - abort(reason: C): CancelablePromise; - on(event: EN, handler: EH): CancelablePromise; - isProcessing(): boolean; - isCompleted(): boolean; - isCanceling(): boolean; - emit(event: EN, ...args: any[]): void; - uuid(uuid?: string): string; - tryToStopCancellation(): boolean; - asPromise(): Promise; - grab(): { - resolve: (boundCall: boolean, value: T) => void; - reject: (boundCall: boolean, error: Error) => void; - cancel: (boundCall: boolean, reason?: C) => void; - finally: (boundCall: boolean) => void; - }; - bind( - source: ICancelablePromise, - boundCall?: boolean, - ): CancelablePromise; -} - -class PromiseBinding { - protected readonly bound: CancelablePromise[] = []; - - public bind( - source: ICancelablePromise, - boundCall?: boolean, - ): CancelablePromise { - this.bound.push(source as CancelablePromise); - !(boundCall === undefined ? false : boundCall) && source.bind(this.promise(), true); - return this.promise(); - } - - protected promise(): CancelablePromise { - return this as unknown as CancelablePromise; - } -} - -class PromiseResolutions< - T = void, - C = void, - EN = string, - EH = TEventHandler, -> extends PromiseBinding { - protected readonly resolvers: Array> = []; - protected readonly rejectors: TRejector[] = []; - protected readonly cancelers: Array> = []; - protected readonly finishes: TFinally[] = []; - protected resolved: boolean = false; - protected rejected: boolean = false; - protected finished: boolean = false; - - public then(callback: TResolver): CancelablePromise { - this.resolvers.push(callback); - return this.promise(); - } - - public catch(callback: TRejector): CancelablePromise { - this.rejectors.push(callback); - return this.promise(); - } - - public finally(callback: TFinally): CancelablePromise { - this.finishes.push(callback); - return this.promise(); - } - - public canceled(callback: TCanceler): CancelablePromise { - this.cancelers.push(callback); - return this.promise(); - } -} - -class PromiseEvents extends PromiseResolutions< - T, - C, - EN, - EH -> { - protected readonly handlers: Map = new Map(); - - public on(event: EN, handler: EH): CancelablePromise { - if (typeof event !== 'string' || event.trim() === '') { - return this.promise(); - } - if (typeof handler !== 'function') { - return this.promise(); - } - let handlers: any[] | undefined = this.handlers.get(event); - if (handlers === undefined) { - handlers = []; - } - handlers.push(handler); - this.handlers.set(event, handlers); - return this.promise(); - } - - public emit(event: EN, ...args: any[]): void { - const handlers: EH[] | undefined = this.handlers.get(event); - if (handlers === undefined) { - return; - } - handlers.forEach((handler: EH) => { - if (typeof handler !== 'function') { - return; - } - handler(...args); - }); - } - - protected unsubscribe(): void { - this.handlers.clear(); - } -} - -class PromiseCancellation< - T = void, - C = void, - EN = string, - EH = TEventHandler, -> extends PromiseEvents { - protected delegation: TCanceler | undefined; - protected cancellation: { - cancelled: boolean; - cancelling: boolean; - } = { - cancelled: false, - cancelling: false, - }; - - public tryToStopCancellation(): boolean { - if (this.cancellation.cancelled) { - return false; - } - this.cancellation.cancelling = false; - return true; - } - - public isCanceling(): boolean { - return this.cancellation.cancelling || this.cancellation.cancelled; - } - - protected tryToDelegateCancellation(reason?: C): boolean { - const delegation: TCanceler | undefined = this.findCancellationDelegation(); - if (delegation === undefined) { - return false; - } - this.cancellation.cancelling = true; - delegation(reason); - return true; - } - - protected setCancellationDelegation(delegation: TCanceler) { - this.delegation = delegation; - } - - protected getCancellationDelegation(): TCanceler | undefined { - return this.delegation; - } - - protected findCancellationDelegation(): TCanceler | undefined { - const delegations: TCanceler[] = this.bound - .map((bound) => bound.getCancellationDelegation()) - .filter((delegation) => delegation !== undefined) as TCanceler[]; - this.delegation !== undefined && delegations.push(this.delegation); - if (delegations.length === 0) { - return undefined; - } - if (delegations.length !== 1) { - throw new Error( - `Multiple delegation callbacks are defined for bound promises. Only one can be defined.`, - ); - } - return delegations[0]; - } -} - -class PromiseStates< - T = void, - C = void, - EN = string, - EH = TEventHandler, -> extends PromiseCancellation { - public isProcessing(): boolean { - if (this.resolved || this.rejected || this.finished || this.cancellation.cancelled) { - return false; - } - return true; - } - - public isCompleted(): boolean { - return !this.isProcessing(); - } - - protected set(): { - resolved(): void; - rejected(): void; - finished(): void; - cancelling(): void; - cancelled(): void; - } { - return { - resolved: (): void => { - this.resolved = true; - }, - rejected: (): void => { - this.rejected = true; - }, - finished: (): void => { - this.finished = true; - }, - cancelling: (): void => { - this.cancellation.cancelling = true; - }, - cancelled: (): void => { - this.cancellation.cancelled = true; - }, - }; - } -} - -class PromiseWorkflow extends PromiseStates< - T, - C, - EN, - EH -> { - protected doResolve(boundCall: boolean, value: T) { - this.unsubscribe(); - if (this.isCanceling() || this.isCompleted()) { - return; - } - this.set().resolved(); - this.resolvers.forEach((resolver: TResolver) => resolver(value)); - !boundCall && this.bound.forEach((bound) => bound.grab().resolve(true, value)); - this.doFinally(false); - } - - protected doReject(boundCall: boolean, error: Error) { - this.unsubscribe(); - if (this.isCanceling() || this.isCompleted()) { - return; - } - this.set().rejected(); - this.rejectors.forEach((rejector: TRejector) => rejector(error)); - !boundCall && this.bound.forEach((bound) => bound.grab().reject(true, error)); - this.doFinally(false); - } - - protected doFinally(boundCall: boolean) { - this.unsubscribe(); - if (this.finished) { - return; - } - this.set().finished(); - this.finishes.forEach((final: TFinally) => final()); - !boundCall && this.bound.forEach((bound) => bound.grab().finally(true)); - } - - protected doCancel(boundCall: boolean, reason?: C) { - this.unsubscribe(); - if (this.resolved || this.rejected || this.cancellation.cancelled) { - // Doesn't make sence to cancel, because it was resolved or rejected or canceled already - return; - } - this.set().cancelled(); - this.cancelers.forEach((cancler: TCanceler) => cancler(reason)); - !boundCall && this.bound.forEach((bound) => bound.grab().cancel(true, reason)); - this.doFinally(false); - } - - public abort(reason: C): CancelablePromise { - if (this.isCompleted()) { - return this.promise(); - } - if (this.isCanceling()) { - return this.promise(); - } - if (!this.tryToDelegateCancellation(reason)) { - this.doCancel(false, reason); - } - return this.promise(); - } - - public grab(): { - resolve: (boundCall: boolean, value: T) => void; - reject: (boundCall: boolean, error: Error) => void; - cancel: (boundCall: boolean, reason?: C) => void; - finally: (boundCall: boolean) => void; - } { - return { - resolve: this.doResolve.bind(this), - reject: this.doReject.bind(this), - cancel: this.doCancel.bind(this), - finally: this.doFinally.bind(this), - }; - } -} - -export class CancelablePromise - extends PromiseWorkflow - implements ICancelablePromise -{ - private _uuid: string = unique(); - - constructor(executor: TExecutor) { - super(); - const self = this; - // Create and execute native promise - new Promise((resolve: TResolver, reject: TRejector) => { - executor( - resolve, - reject, - this.doCancel.bind(this, false), - this.setCancellationDelegation.bind(this), - self as unknown as CancelablePromise, - ); - }) - .then(this.doResolve.bind(this, false)) - .catch(this.doReject.bind(this, false)); - } - - public uuid(uuid?: string): string { - if (typeof uuid === 'string') { - this._uuid = uuid; - } - return this._uuid; - } - - public asPromise(): Promise { - return new Promise((resolve, reject) => { - this.then(resolve); - this.catch(reject); - this.canceled(() => { - reject(new Error(`Promise is cancelled`)); - }); - }); - } -} - -export class SingleTaskTracker { - private _running: ICancelablePromise | undefined; - private _aborting: boolean = false; - - public run(executor: () => ICancelablePromise): Promise { - if (this._aborting) { - return Promise.reject(new Error(`Current task is aborting`)); - } - return new Promise((resolve) => { - if (!this._running) { - this._running = executor().finally(() => { - this._running = undefined; - }); - return resolve(); - } - this._aborting = true; - this._running - .finally(() => { - this._aborting = false; - this._running = executor().finally(() => { - this._running = undefined; - }); - resolve(); - }) - .abort(); - }); - } - - public working(): boolean { - return this._running !== undefined; - } - - public abort(): Promise { - return new Promise((resolve) => { - if (this._running === undefined) { - return resolve(); - } - this._running.finally(resolve).abort(); - }); - } -} - -export class JobsTracker { - private readonly _jobs: Map> = new Map(); - - public register(job: ICancelablePromise) { - const uuid = job.uuid(); - job.finally(() => { - this._jobs.delete(uuid); - }); - this._jobs.set(uuid, job); - } - - public registerAsUnknown(job: unknown) { - const trusted = job as ICancelablePromise; - const uuid = trusted.uuid(); - trusted.finally(() => { - this._jobs.delete(uuid); - }); - this._jobs.set(uuid, trusted); - } - - public abort(reason: C): Promise { - return new Promise((resolve) => { - if (this._jobs.size === 0) { - return resolve(); - } - this._jobs.forEach((job) => { - job.finally(() => { - this._jobs.delete(job.uuid()); - if (this._jobs.size === 0) { - resolve(); - } - }); - if (!job.isCompleted()) { - // Task wasn't canceled yet - job.abort(reason); - } - }); - }); - } -} - -export type Executor = (...args: any[]) => CancelablePromise; - -export interface IStat { - actual: number; - done: number; - canceled: number; - rejected: number; -} - -export class PromiseExecutor { - private _proccessing: Map> = new Map(); - private _stat: IStat = { - actual: 0, - done: 0, - canceled: 0, - rejected: 0, - }; - - public run(executor: Executor): CancelablePromise { - const task = new CancelablePromise((resolve, reject, cancel, cancelRef, self) => { - if (self.isCanceling()) { - // Task already was canceled - // (we don't need to resolve/reject, it would be canceled) - return; - } - this._abort(self.uuid()) - .then(() => { - if (self.isCanceling()) { - // Task already was canceled - // (we don't need to resolve/reject, it would be canceled) - return; - } - // Start internal task - const task = executor() - .then((res: T) => { - this._stat.done += 1; - resolve(res); - }) - .catch(() => { - this._stat.rejected += 1; - }); - // Set cancel reference (wrapper promise cannot be canceled while internal isn't) - cancelRef(() => { - if (!task.isProcessing()) { - // Already canceled - cancel(); - } else { - // Still in progress - task.finally(() => { - cancel(); - }); - // Cancel if it's not - if (!task.isCanceling()) { - task.abort(); - } - } - }); - }) - .catch(reject); - }) - .canceled(() => { - this._stat.canceled += 1; - }) - .finally(() => { - this._proccessing.delete(task.uuid()); - }); - this._proccessing.set(task.uuid(), task); - return task; - } - - public abort(): Promise { - return this._abort(); - } - - public getStat(): IStat { - this._stat.actual = this._proccessing.size; - return Object.assign({}, this._stat); - } - - private _abort(exception?: string): Promise { - return new Promise((resolve) => { - const tasks = Array.from(this._proccessing.values()).filter( - (v) => v.uuid() !== exception, - ); - let done = tasks.length; - if (done === 0) { - return resolve(); - } - tasks.forEach((task) => { - task.finally(() => { - this._proccessing.delete(task.uuid()); - done -= 1; - if (done === 0) { - resolve(); - } - }); - if (!task.isCompleted()) { - // Task wasn't canceled yet - task.abort(); - } - }); - }); - } -} diff --git a/application/platform/env/queue.ts b/application/platform/env/queue.ts deleted file mode 100644 index ea04b5c90c..0000000000 --- a/application/platform/env/queue.ts +++ /dev/null @@ -1,91 +0,0 @@ -import { unique } from './sequence'; -import { Logger } from '../log'; -import { LockToken } from './lock.token'; - -export type TaskExecutor = () => Promise; - -export type Handler = () => void; - -export interface Task { - uuid: string; - alias: string | undefined; - task: TaskExecutor; -} - -const WARN_DURATION_MS = 1000; - -export class Queue { - private readonly _tasks: Map = new Map(); - private _destroy: Handler | undefined; - private readonly _shutdown: LockToken = LockToken.simple(false); - private readonly _logger: Logger; - private readonly _processing: LockToken = LockToken.simple(false); - - constructor(logger: Logger) { - this._logger = logger; - } - - public add(task: TaskExecutor, uuid?: string, alias?: string) { - if (this._shutdown.isLocked()) { - this._logger.warn(`Attempt to add task in queue, but it's shutdown already.`); - return; - } - const _uuid = typeof uuid !== 'string' ? unique() : uuid; - this._tasks.set(_uuid, { - uuid: _uuid, - alias: typeof alias !== 'string' ? undefined : alias, - task: task, - }); - this._proceed(); - } - - public destroy(): Promise { - return new Promise((resolve, reject) => { - if (this._shutdown.isLocked()) { - return reject(new Error(this._logger.warn(`Queue is already shutdown.`))); - } - this._shutdown.lock(); - if (this._tasks.size === 0) { - resolve(); - } else { - this._destroy = resolve; - } - }); - } - - public has(guid: string) { - return this._tasks.has(guid); - } - - public isLocked(): boolean { - return this._shutdown.isLocked(); - } - - private _proceed() { - this._logger.verbose(`Tasks in queue: ${this._tasks.size}`); - const next: Task | undefined = this._tasks.values().next().value; - if (this._tasks.size === 0 || next === undefined) { - if (this._destroy !== undefined) { - this._destroy(); - } - return; - } - if (this._processing.isLocked()) { - return; - } - this._processing.lock(); - const ts = Date.now(); - next.task().finally(() => { - const duration = Date.now() - ts; - const alias = next.alias === undefined ? next.uuid : next.alias; - if (duration > WARN_DURATION_MS) { - this._logger.warn(`Task "${alias}" took much time to be done: ${duration}ms`); - } else { - this._logger.verbose(`Task "${alias}" is done in ${duration}ms`); - } - this._tasks.delete(next.uuid); - this._processing.unlock(); - this._proceed(); - }); - } -} diff --git a/application/platform/env/regex.ts b/application/platform/env/regex.ts deleted file mode 100644 index 20da4f710a..0000000000 --- a/application/platform/env/regex.ts +++ /dev/null @@ -1,59 +0,0 @@ -const isValidRegExpCache: { [key: string]: boolean } = {}; -const safelyCreateRegExpCache: { [key: string]: RegExp | Error } = {}; - -export function serialize(str: string): string { - const chars = '\\{}[]+$^/!.*|():?,=<>'; - Array.prototype.forEach.call(chars, (char: string) => { - str = str.replace(new RegExp('\\' + char, 'gi'), '\\' + char); - }); - return str; -} - -export function isValid(strRegExp: string, parameters: string = 'gi'): boolean { - if (typeof strRegExp !== 'string') { - return false; - } - const key = `__${strRegExp}__`; - if (isValidRegExpCache[key] !== void 0) { - return isValidRegExpCache[key]; - } - try { - const regExp = new RegExp(strRegExp, parameters); - if (regExp instanceof RegExp) { - isValidRegExpCache[key] = true; - } - } catch (_err) { - isValidRegExpCache[key] = false; - } - return isValidRegExpCache[key]; -} - -export function fromStr(strRegExp: string, parameters: string = 'gi'): RegExp | Error { - if (typeof strRegExp !== 'string') { - return new Error(`Invalid regular expresion. String should be as source.`); - } - const key = `__${strRegExp}__${parameters}__`; - if (safelyCreateRegExpCache[key] !== void 0) { - return safelyCreateRegExpCache[key]; - } - if (isValid(strRegExp, parameters)) { - strRegExp = strRegExp.replace(/\\/gi, '\\'); - safelyCreateRegExpCache[key] = new RegExp(strRegExp, parameters); - } else if (isValid(serialize(strRegExp), parameters)) { - safelyCreateRegExpCache[key] = new RegExp(serialize(strRegExp), parameters); - } else { - safelyCreateRegExpCache[key] = new Error(`Invalid regular expresion`); - } - return safelyCreateRegExpCache[key]; -} - -export function createFromSerializedStr( - strRegExp: string, - parameters: string = 'gi', -): RegExp | Error { - if (typeof strRegExp !== 'string') { - return new Error(`Invalid regular expresion. String should be as source.`); - } - strRegExp = strRegExp.replace(//gi, '>'); - return fromStr(strRegExp, parameters); -} diff --git a/application/platform/env/runner.ts b/application/platform/env/runner.ts deleted file mode 100644 index feea510ae9..0000000000 --- a/application/platform/env/runner.ts +++ /dev/null @@ -1,62 +0,0 @@ -import { unique } from './sequence'; - -type TaskExecutor = () => Promise; -type Resolver = (res: T) => void; -type Rejector = (err: Error) => void; - -export class Task { - constructor( - protected readonly uuid: string, - protected readonly executor: TaskExecutor, - protected readonly success: Resolver, - protected readonly fail: Rejector, - ) {} - public proceed(): Promise { - return new Promise((resolve) => { - this.executor() - .then((res: T) => { - this.success(res); - }) - .catch((err: Error) => { - this.fail(err); - }) - .finally(() => { - resolve(); - }); - }); - } -} - -export class Queue { - protected readonly tasks: Task[] = []; - protected working: boolean = false; - protected proceed() { - if (this.working) { - return; - } - if (this.tasks.length === 0) { - return; - } - this.working = true; - const task: Task = this.tasks.splice(0, 1)[0]; - task.proceed() - .catch((err: Error) => { - console.error(err); - }) - .finally(() => { - setTimeout(() => { - this.working = false; - this.proceed(); - }, this.delay); - }); - } - - constructor(protected readonly delay: number) {} - - public wait(executor: TaskExecutor): Promise { - return new Promise((resolve: Resolver, reject: Rejector) => { - this.tasks.push(new Task(unique(), executor, resolve, reject)); - this.proceed(); - }); - } -} diff --git a/application/platform/env/scope.ts b/application/platform/env/scope.ts deleted file mode 100644 index 9a2e804528..0000000000 --- a/application/platform/env/scope.ts +++ /dev/null @@ -1,54 +0,0 @@ -import { Transport } from '../ipc/transport'; -import { LoggerConstructor, Logger, Level } from '../log'; -import { DefaultLogger } from '../log/defaults'; -import { globals } from './globals'; - -export class Scope { - private _transport: Transport | undefined; - private _logger: LoggerConstructor | undefined; - - public setTransport(transport: Transport) { - if (this._transport !== undefined) { - throw new Error(`Transport can be setup only once`); - } - if (this._logger !== undefined) { - new this._logger('@platform').debug(`IPC transport is up`); - } - this._transport = transport; - } - - public getTransport(): Transport { - if (this._transport === undefined) { - throw new Error(`Transport isn't setup`); - } - return this._transport; - } - - public setLogger(logger: LoggerConstructor) { - this._logger = logger; - const border = '='.repeat(75); - const regular: Logger = new this._logger('@platform'); - regular.debug(`logger is up\n${border}\nSession: ${new Date().toUTCString()}\n${border}`); - const collected = DefaultLogger.getCollectedMessages(); - collected.length !== 0 && regular.push(collected); - } - - public getLogger(alias: string): Logger { - if (this._logger === undefined) { - Logger.post(`Logger isn't setup. Default logger will be used.`, Level.ERROR); - return new DefaultLogger(alias); - } else { - return new this._logger(alias); - } - } -} - -export const scope = ((): Scope => { - const key = 'scope'; - let scope = globals.get(key); - if (scope === undefined) { - scope = new Scope(); - globals.set(key, scope); - } - return scope; -})(); diff --git a/application/platform/env/sequence.ts b/application/platform/env/sequence.ts deleted file mode 100644 index 59ab5176b1..0000000000 --- a/application/platform/env/sequence.ts +++ /dev/null @@ -1,32 +0,0 @@ -type UuidGetter = () => string; - -class Sequence { - private _sequence: number = 0; - private _uuid: UuidGetter | undefined; - - public sequence(): number { - return this._sequence++; - } - - public getUnique(): string { - return this._uuid !== undefined ? this._uuid() : `sequence:${this.sequence()}`; - } - - public setUuidGenerator(generator: UuidGetter) { - this._uuid = generator; - } -} - -const sequence = new Sequence(); - -export function setUuidGenerator(generator: UuidGetter) { - sequence.setUuidGenerator(generator); -} - -export function unique(): string { - return sequence.getUnique(); -} - -export function getSequence(): number { - return sequence.sequence(); -} diff --git a/application/platform/env/str.ts b/application/platform/env/str.ts deleted file mode 100644 index 31ca1f9486..0000000000 --- a/application/platform/env/str.ts +++ /dev/null @@ -1,29 +0,0 @@ -export function serializeHtml(str: string): string { - return str.replace(//gi, '>'); -} - -export function serializeSpaces(str: string): string { - return str.replace(/\s/gi, '%20'); -} - -export function asNotEmptyString(str: unknown, msg?: string): string { - if (typeof str !== 'string' || str.trim() === '') { - throw new Error(msg !== undefined ? msg : `Value ${str} isn't a string`); - } - return str; -} - -export function hash(str: string, seed = 0): number { - let h1 = 0xdeadbeef ^ seed, - h2 = 0x41c6ce57 ^ seed; - for (let i = 0, ch; i < str.length; i++) { - ch = str.charCodeAt(i); - h1 = Math.imul(h1 ^ ch, 2654435761); - h2 = Math.imul(h2 ^ ch, 1597334677); - } - h1 = Math.imul(h1 ^ (h1 >>> 16), 2246822507); - h1 ^= Math.imul(h2 ^ (h2 >>> 13), 3266489909); - h2 = Math.imul(h2 ^ (h2 >>> 16), 2246822507); - h2 ^= Math.imul(h1 ^ (h1 >>> 13), 3266489909); - return 4294967296 * (2097151 & h2) + (h1 >>> 0); -} diff --git a/application/platform/env/subscription.ts b/application/platform/env/subscription.ts deleted file mode 100644 index 9a6eaa118f..0000000000 --- a/application/platform/env/subscription.ts +++ /dev/null @@ -1,350 +0,0 @@ -import { unique } from './sequence'; -import { NormalizedBackgroundTask } from './normalized'; - -export type THandler = (...args: any[]) => any; - -export interface IEventDesc { - self: any; - [key: string]: any; -} - -const SIGNATURE = '__subject_handler_guid'; - -export function validateEventDesc(desc: IEventDesc, target: any): Error | undefined { - const required: string[] = Object.keys(desc).filter((k) => k !== 'self'); - if (desc.self === undefined) { - return new Error(`Self cannot be undefined`); - } - if (desc.self instanceof Array) { - let valid: boolean = false; - desc.self.forEach((self) => { - if (valid) { - return; - } - const cloned = Object.assign({}, desc); - cloned.self = self; - valid = validateEventDesc(cloned, target) === undefined; - }); - return valid - ? undefined - : new Error( - `Self should be one of [${desc.self.join(', ')}], but not one is suitable.`, - ); - } - if (desc.self === null && (target === null || target === undefined)) { - return undefined; - } - if (desc.self === null && target !== null && target !== undefined) { - return new Error(`Self is defined as null, but target isn't null or undefined`); - } - if (desc.self !== null && (target === null || target === undefined)) { - return new Error( - `Self isn't null, but event object null or undefined. Required fields: ${required.join( - ', ', - )}`, - ); - } - if (typeof desc.self !== 'string') { - if (!(target instanceof desc.self)) { - return new Error(`Expecting ${desc.self}, but has been gotten ${target}`); - } else { - return undefined; - } - } - if (desc.self !== typeof target) { - return new Error(`Expecting target to be ${desc.self}, but target is ${typeof target}`); - } - if (typeof target !== 'object') { - // It's something like: number, string etc. It's primitive type - return undefined; - } - const errors: string[] = []; - required.forEach((name: string) => { - const types: any[] = desc[name] instanceof Array ? desc[name] : [desc[name]]; - let valid: boolean = false; - types.forEach((typeRef) => { - if (valid) { - return; - } - if ( - typeof typeRef === 'object' && - typeRef !== null && - typeof typeRef.self === 'string' - ) { - const err: Error | undefined = validateEventDesc(typeRef, target[name]); - if (err === undefined) { - valid = true; - } - } else if ( - typeof typeRef === 'string' && - (typeof target[name] === typeRef || typeRef === 'any') - ) { - valid = true; - } else if (typeof typeRef !== 'string' && target[name] instanceof typeRef) { - valid = true; - } - }); - if (!valid) { - errors.push( - `Expecting property "${name}" has a type "${types - .map((t) => { - if (typeof t === 'string') { - return t; - } else if (typeof t === 'object' && t === null) { - return `ERROR: null as type definition`; - } else if (typeof t === 'object' && typeof t.self === 'string') { - return JSON.stringify(t); - } else if (typeof t === 'function') { - return `${t.name}${ - t.constructor !== undefined ? `/${t.constructor.name}` : '' - }`; - } else if ( - typeof t === 'object' && - t.prototype !== undefined && - t.prototype !== null - ) { - return `${t.prototype.name}`; - } else { - return `ERROR: unknown type definition`; - } - }) - .join(' | ')}", but it has type "${typeof target[name]}"`, - ); - } - }); - if (errors.length !== 0) { - return new Error(errors.join('\n')); - } - return undefined; -} - -export class Subject { - private _handlers: Array<(value: T) => any> = []; - private _name: string = ''; - private _emitted: boolean = false; - private _runner: NormalizedBackgroundTask | undefined; - - public static unsubscribe(subjects: unknown): void { - if (typeof subjects !== 'object' || subjects === null) { - return; - } - Object.keys(subjects as object).forEach((key: string) => { - const target = (subjects as { [key: string]: Subject })[key]; - if (!(target instanceof Subject)) { - return; - } - target.destroy(); - }); - } - - constructor(name?: string) { - if (typeof name === 'string') { - this._name = name; - } - } - - public balanced(delay: number): Subject { - this._runner = new NormalizedBackgroundTask(delay); - return this; - } - - public subscribe(handler: (value: T) => void): Subscription { - if (typeof handler !== 'function') { - throw new Error(`Handler of event should be a function.`); - } - const id: string = unique(); - (handler as any)[SIGNATURE] = id; - this._handlers.push(handler); - return new Subscription(this._name, () => { - this._unsubscribe(id); - }); - } - - public destroy(): void { - this._handlers = []; - this._runner !== undefined && this._runner.abort(); - } - - public emit(value: T) { - const emit = () => { - this._emitted = true; - this._handlers.forEach((handler: (value: T) => void) => { - handler(value); - }); - }; - if (this._runner !== undefined) { - this._runner.run(() => { - emit(); - }); - } else { - emit(); - } - } - - public emitted(): boolean { - return this._emitted; - } - - public to(): Subject { - return this as unknown as Subject; - } - - public isAlone(): boolean { - return this._handlers.length === 0; - } - - private _unsubscribe(id: string) { - let index: number = -1; - this._handlers.forEach((handle: any, i: number) => { - if (index !== -1) { - return; - } - if (handle[SIGNATURE] === id) { - index = i; - } - }); - if (index === -1) { - return; - } - this._handlers.splice(index, 1); - } -} - -export class Subjects { - private readonly _subjects: T & { [key: string]: Subject }; - - constructor(subjects: T & { [key: string]: Subject }) { - this._subjects = subjects; - } - - public destroy(): void { - Object.keys(this._subjects).forEach((key: string) => { - this._subjects[key].destroy(); - }); - } - - public get(): T { - return this._subjects; - } -} - -export class Subscription { - private _unsubsribe: THandler | undefined; - private _event: string; - private _subscriptionId: string; - - constructor(event: string, unsubsribe: THandler, subscriptionId?: string) { - if (typeof unsubsribe !== 'function') { - throw new Error(`Should be provided unsubsribe function.`); - } - if (typeof subscriptionId !== 'string') { - subscriptionId = unique(); - } - this._unsubsribe = unsubsribe; - this._event = event; - this._subscriptionId = subscriptionId; - } - - public getEventName(): string { - return this._event; - } - - public getSubscriptionId(): string { - return this._subscriptionId; - } - - public unsubscribe(): void { - if (this._unsubsribe === undefined) { - return; - } - this._unsubsribe(); - } - - public destroy(): void { - this.unsubscribe(); - this._unsubsribe = undefined; - } -} - -export interface ISubscription { - destroy(): void; - unsubscribe(): void; -} - -export class Subscriber { - private _subscriptions: Map = new Map(); - public register(...subscription: ISubscription[]) { - subscription.forEach((sub) => { - this._subscriptions.set(unique(), sub); - }); - } - public unsubscribe() { - this._subscriptions.forEach((subscription) => { - subscription.unsubscribe(); - }); - this._subscriptions.clear(); - } -} - -export interface ListenerTarget { - addListener(event: string, handler: THandler): void; - removeListener(event: string, handler: THandler): void; -} - -export class Listener { - protected listening: boolean = false; - constructor( - protected readonly event: string, - protected readonly target: ListenerTarget, - protected readonly handle: THandler, - ) {} - - public subscribe() { - if (this.listening) { - return; - } - this.target.addListener(this.event, this.handle); - this.listening = true; - } - - public unsubscribe(): void { - if (!this.listening) { - return; - } - this.target.removeListener(this.event, this.handle); - this.listening = false; - } -} - -export class Listeners { - protected listeners: Listener[] = []; - - public add(event: string, target: ListenerTarget, handle: THandler): void { - this.listeners.push(new Listener(event, target, handle)); - } - - public push(listener: Listener): void { - this.listeners.push(listener); - } - - public subscribe() { - this.listeners.forEach((l) => l.subscribe()); - } - - public unsubscribe(): void { - this.listeners.forEach((l) => l.unsubscribe()); - } -} - -export function unsubscribeAllInHolder(subjects: unknown): void { - if (typeof subjects !== 'object' || subjects === null) { - return; - } - Object.keys(subjects as object).forEach((key: string) => { - const target = (subjects as { [key: string]: Subject })[key]; - if (!(target instanceof Subject)) { - return; - } - target.destroy(); - }); -} diff --git a/application/platform/env/togglers.ts b/application/platform/env/togglers.ts deleted file mode 100644 index 19f2c2cd31..0000000000 --- a/application/platform/env/togglers.ts +++ /dev/null @@ -1,42 +0,0 @@ -import { unique } from './sequence'; - -export type THandler = (...args: any[]) => any; - -export class Once { - private _toggle: THandler | undefined; - private _name: string; - private _uuid: string; - - constructor(name: string, toggle: THandler, uuid?: string) { - if (typeof toggle !== 'function') { - throw new Error(`Should be provided toggle function.`); - } - this._toggle = toggle; - this._name = name; - this._uuid = uuid === undefined ? unique() : uuid; - } - - public getName(): string { - return this._name; - } - - public getUuid(): string { - return this._uuid; - } - - public emit(): void { - if (this._toggle === undefined) { - throw new Error(`Can toggle state only once`); - } - this._toggle(); - this._toggle = undefined; - } - - public emitted(): boolean { - return this._toggle === undefined; - } - - public destroy(): void { - this.emit(); - } -} diff --git a/application/platform/eslint.config.mjs b/application/platform/eslint.config.mjs deleted file mode 100644 index 717e3ceb57..0000000000 --- a/application/platform/eslint.config.mjs +++ /dev/null @@ -1,51 +0,0 @@ -import typescriptEslint from "@typescript-eslint/eslint-plugin"; -import globals from "globals"; -import tsParser from "@typescript-eslint/parser"; -import path from "node:path"; -import { fileURLToPath } from "node:url"; -import js from "@eslint/js"; -import { FlatCompat } from "@eslint/eslintrc"; - -const __filename = fileURLToPath(import.meta.url); -const __dirname = path.dirname(__filename); -const compat = new FlatCompat({ - baseDirectory: __dirname, - recommendedConfig: js.configs.recommended, - allConfig: js.configs.all -}); - -export default [{ - ignores: ["dist/**/*"], -}, ...compat.extends("eslint:recommended", "plugin:@typescript-eslint/recommended"), { - plugins: { - "@typescript-eslint": typescriptEslint, - }, - - languageOptions: { - globals: { - ...globals.browser, - }, - - parser: tsParser, - ecmaVersion: "latest", - sourceType: "module", - }, - - rules: { - "no-control-regex": "off", - - "@typescript-eslint/no-unused-vars": ["error", { - "argsIgnorePattern": "^_", - "varsIgnorePattern": "^_", - "caughtErrorsIgnorePattern": "^_" - }], - "@typescript-eslint/no-this-alias": "off", - "@typescript-eslint/no-explicit-any": "off", - "@typescript-eslint/no-empty-interface": "off", - "@typescript-eslint/no-inferrable-types": "off", - "@typescript-eslint/no-unsafe-declaration-merging": "off", - "@typescript-eslint/no-unused-expressions": "off", - "@typescript-eslint/no-empty-object-type": "off" - - }, -}]; \ No newline at end of file diff --git a/application/platform/ipc/event/cli/done.ts b/application/platform/ipc/event/cli/done.ts deleted file mode 100644 index 4ed34fe188..0000000000 --- a/application/platform/ipc/event/cli/done.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Define, Interface, SignatureRequirement } from '../declarations'; - -@Define({ name: 'CLIProcessingFinished' }) -export class Event extends SignatureRequirement { - constructor() { - super(); - } -} - -export interface Event extends Interface {} diff --git a/application/platform/ipc/event/cli/index.ts b/application/platform/ipc/event/cli/index.ts deleted file mode 100644 index 4ef1be2f69..0000000000 --- a/application/platform/ipc/event/cli/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * as Done from './done'; diff --git a/application/platform/ipc/event/declarations.ts b/application/platform/ipc/event/declarations.ts deleted file mode 100644 index 797730bde5..0000000000 --- a/application/platform/ipc/event/declarations.ts +++ /dev/null @@ -1,95 +0,0 @@ -import { Subject, Subscription } from '../../env/subscription'; -import { decoratorFactory, DecoratorConstructor } from '../../env/decorators'; -import { scope } from '../../env/scope'; -import { ISignatureRequirement, EntityConstructor, SignatureRequirement } from '../transport/index'; - -export { EntityConstructor, SignatureRequirement }; - -export class IpcEvent { - readonly _eventBodyConstructor: EntityConstructor & ISignatureRequirement; - private _subject!: Subject; - private _subscriptions: Subscription[] = []; - - constructor(eventBodyConstructor: EntityConstructor & ISignatureRequirement) { - this._eventBodyConstructor = eventBodyConstructor; - } - - public destroy() { - this._subscriptions.forEach((subscription: Subscription) => { - subscription.destroy(); - }); - } - - public subscribe(handler: (event: E) => void): Subscription { - const signature = this._eventBodyConstructor.getSignature(); - if (typeof signature !== 'string' || signature.trim() === '') { - throw new Error(`No event signature has been found.`); - } - const subscription = (() => { - if (this._subject === undefined) { - this._subject = scope - .getTransport() - .subscribe(signature, this._eventBodyConstructor) as any; - } - return this._subject.subscribe(handler); - })(); - this._subscriptions.push(subscription); - return subscription; - } - - public emit(event: E & ISignatureRequirement) { - const signature = this._eventBodyConstructor.getSignature(); - if (typeof signature !== 'string' || signature.trim() === '') { - throw new Error(`No event signature has been found.`); - } - scope.getTransport().notify(event); - } - - public static subscribe( - eventBodyConstructor: EntityConstructor & ISignatureRequirement, - handler: (event: E & ISignatureRequirement) => void, - ): Subscription { - const signature = eventBodyConstructor.getSignature(); - if (typeof signature !== 'string' || signature.trim() === '') { - throw new Error(`No event signature has been found.`); - } - return scope - .getTransport() - .subscribe(signature, eventBodyConstructor) - .subscribe(handler as any); - } - - public static emit(event: ISignatureRequirement) { - const signature = event.getSignature(); - if (typeof signature !== 'string' || signature.trim() === '') { - throw new Error(`No event signature has been found.`); - } - scope.getTransport().notify(event); - } - - public static emulate(event: ISignatureRequirement) { - const signature = event.getSignature(); - if (typeof signature !== 'string' || signature.trim() === '') { - throw new Error(`No event signature has been found.`); - } - scope.getTransport().emulate(event).event(); - } -} - -export interface Inputs { - name: string; -} - -export interface Interface { - getSignature(): string; -} - -export const Define = decoratorFactory((constructor: DecoratorConstructor, obj: Inputs) => { - /// TODO: check and prevent names conflicts. One name "obj.name" could be used only once - const name = obj.name; - constructor.prototype.getSignature = (): string => { - return name; - }; - (constructor as any).getSignature = constructor.prototype.getSignature; - return class extends constructor {}; -}); diff --git a/application/platform/ipc/event/github/conflict.ts b/application/platform/ipc/event/github/conflict.ts deleted file mode 100644 index b23d20bbc5..0000000000 --- a/application/platform/ipc/event/github/conflict.ts +++ /dev/null @@ -1,27 +0,0 @@ -import { Define, Interface, SignatureRequirement } from '../declarations'; -import { FileMetaDataDefinition, validate } from '../../../types/github/filemetadata'; -import * as validator from '../../../env/obj'; - -@Define({ name: 'ConflictOnGitHubRepo' }) -export class Event extends SignatureRequirement { - public checksum: string; - public sha: string; - public username: string; - public md: FileMetaDataDefinition; - - constructor(input: { - checksum: string; - sha: string; - username: string; - md: FileMetaDataDefinition; - }) { - super(); - validator.isObject(input); - this.checksum = validator.getAsNotEmptyString(input, 'checksum'); - this.sha = validator.getAsNotEmptyString(input, 'sha'); - this.username = validator.getAsNotEmptyString(input, 'username'); - this.md = validate(input.md); - } -} - -export interface Event extends Interface {} diff --git a/application/platform/ipc/event/github/fileupdated.ts b/application/platform/ipc/event/github/fileupdated.ts deleted file mode 100644 index 6b0edfdf8b..0000000000 --- a/application/platform/ipc/event/github/fileupdated.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { Define, Interface, SignatureRequirement } from '../declarations'; - -import * as validator from '../../../env/obj'; - -@Define({ name: 'FileUpdatedOnGitHubRepo' }) -export class Event extends SignatureRequirement { - public checksum: string; - public sha: string; - - constructor(input: { checksum: string; sha: string }) { - super(); - validator.isObject(input); - this.checksum = validator.getAsNotEmptyString(input, 'checksum'); - this.sha = validator.getAsNotEmptyString(input, 'sha'); - } -} - -export interface Event extends Interface {} diff --git a/application/platform/ipc/event/github/index.ts b/application/platform/ipc/event/github/index.ts deleted file mode 100644 index 778c5015a4..0000000000 --- a/application/platform/ipc/event/github/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * as FileUpdated from './fileupdated'; -export * as Conflict from './conflict'; diff --git a/application/platform/ipc/event/hotkey/emit.ts b/application/platform/ipc/event/hotkey/emit.ts deleted file mode 100644 index c3a96612a3..0000000000 --- a/application/platform/ipc/event/hotkey/emit.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { Define, Interface, SignatureRequirement } from '../declarations'; - -import * as validator from '../../../env/obj'; - -@Define({ name: 'EmitHotkey' }) -export class Event extends SignatureRequirement { - public code: string; - - constructor(input: { code: string }) { - super(); - validator.isObject(input); - this.code = validator.getAsNotEmptyString(input, 'code'); - } -} - -export interface Event extends Interface {} diff --git a/application/platform/ipc/event/hotkey/index.ts b/application/platform/ipc/event/hotkey/index.ts deleted file mode 100644 index 9763343378..0000000000 --- a/application/platform/ipc/event/hotkey/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * as Emit from './emit'; diff --git a/application/platform/ipc/event/index.ts b/application/platform/ipc/event/index.ts deleted file mode 100644 index 305553c9ca..0000000000 --- a/application/platform/ipc/event/index.ts +++ /dev/null @@ -1,11 +0,0 @@ -export { IpcEvent } from './declarations'; -export * as Stream from './stream'; -export * as Search from './search'; -export * as State from './state'; -export * as Notification from './notification'; -export * as Observe from './observe'; -export * as Hotkey from './hotkey'; -export * as Cli from './cli'; -export * as Logs from './logs'; -export * as Values from './values'; -export * as GitHub from './github'; diff --git a/application/platform/ipc/event/logs/index.ts b/application/platform/ipc/event/logs/index.ts deleted file mode 100644 index 57e7b87bba..0000000000 --- a/application/platform/ipc/event/logs/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * as Write from './write'; diff --git a/application/platform/ipc/event/logs/write.ts b/application/platform/ipc/event/logs/write.ts deleted file mode 100644 index 43117ce10f..0000000000 --- a/application/platform/ipc/event/logs/write.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { Define, Interface, SignatureRequirement } from '../declarations'; -import { Level } from '../../../log'; - -import * as validator from '../../../env/obj'; - -@Define({ name: 'WriteLogMessage' }) -export class Event extends SignatureRequirement { - public message: string; - public level: Level; - - constructor(input: { message: string; level: Level }) { - super(); - validator.isObject(input); - this.message = validator.getAsNotEmptyString(input, 'message'); - this.level = validator.getAsNotEmptyString(input, 'level') as Level; - } -} - -export interface Event extends Interface {} diff --git a/application/platform/ipc/event/notification/index.ts b/application/platform/ipc/event/notification/index.ts deleted file mode 100644 index f376d21382..0000000000 --- a/application/platform/ipc/event/notification/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * as Pop from './pop'; diff --git a/application/platform/ipc/event/notification/pop.ts b/application/platform/ipc/event/notification/pop.ts deleted file mode 100644 index 8288211dfb..0000000000 --- a/application/platform/ipc/event/notification/pop.ts +++ /dev/null @@ -1,21 +0,0 @@ -import { Define, Interface, SignatureRequirement } from '../declarations'; -import { Action } from '../../../types/notification'; - -import * as validator from '../../../env/obj'; - -@Define({ name: 'NotificationPop' }) -export class Event extends SignatureRequirement { - public session: string | undefined; - public message: string; - public actions: Action[]; - - constructor(input: { session: string | undefined; message: string; actions: Action[] }) { - super(); - validator.isObject(input); - this.session = validator.getAsNotEmptyStringOrAsUndefined(input, 'session'); - this.message = validator.getAsNotEmptyString(input, 'message'); - this.actions = validator.getAsArray(input, 'actions'); - } -} - -export interface Event extends Interface {} diff --git a/application/platform/ipc/event/observe/finished.ts b/application/platform/ipc/event/observe/finished.ts deleted file mode 100644 index 585aa14a59..0000000000 --- a/application/platform/ipc/event/observe/finished.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { Define, Interface, SignatureRequirement } from '../declarations'; - -import * as validator from '../../../env/obj'; - -@Define({ name: 'ObserveOperationFinished' }) -export class Event extends SignatureRequirement { - public session: string; - public operation: string; - public source: string; - - constructor(input: { session: string; operation: string; source: string }) { - super(); - validator.isObject(input); - this.session = validator.getAsNotEmptyString(input, 'session'); - this.operation = validator.getAsNotEmptyString(input, 'operation'); - this.source = validator.getAsNotEmptyString(input, 'source'); - } -} - -export interface Event extends Interface {} diff --git a/application/platform/ipc/event/observe/index.ts b/application/platform/ipc/event/observe/index.ts deleted file mode 100644 index 4e74cdbf37..0000000000 --- a/application/platform/ipc/event/observe/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * as Started from './started'; -export * as Finished from './finished'; diff --git a/application/platform/ipc/event/observe/started.ts b/application/platform/ipc/event/observe/started.ts deleted file mode 100644 index 422837356e..0000000000 --- a/application/platform/ipc/event/observe/started.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { Define, Interface, SignatureRequirement } from '../declarations'; - -import * as validator from '../../../env/obj'; - -@Define({ name: 'ObserveOperationStarted' }) -export class Event extends SignatureRequirement { - public session: string; - public operation: string; - public source: string; - - constructor(input: { session: string; operation: string; source: string }) { - super(); - validator.isObject(input); - this.session = validator.getAsNotEmptyString(input, 'session'); - this.operation = validator.getAsNotEmptyString(input, 'operation'); - this.source = validator.getAsNotEmptyString(input, 'source'); - } -} - -export interface Event extends Interface {} diff --git a/application/platform/ipc/event/search/index.ts b/application/platform/ipc/event/search/index.ts deleted file mode 100644 index 0c2c33da9a..0000000000 --- a/application/platform/ipc/event/search/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * as Updated from './updated'; -export * as MapUpdated from './mapupdated'; diff --git a/application/platform/ipc/event/search/mapupdated.ts b/application/platform/ipc/event/search/mapupdated.ts deleted file mode 100644 index 257004fa32..0000000000 --- a/application/platform/ipc/event/search/mapupdated.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { Define, Interface, SignatureRequirement } from '../declarations'; - -import * as validator from '../../../env/obj'; - -@Define({ name: 'SearchMapUpdated' }) -export class Event extends SignatureRequirement { - public session: string; - public map: string | null; - - constructor(input: { session: string; map: string | null }) { - super(); - validator.isObject(input); - this.session = validator.getAsNotEmptyString(input, 'session'); - this.map = validator.getAsStringOrNull(input, 'map'); - } -} - -export interface Event extends Interface {} diff --git a/application/platform/ipc/event/search/updated.ts b/application/platform/ipc/event/search/updated.ts deleted file mode 100644 index 77c8fb914b..0000000000 --- a/application/platform/ipc/event/search/updated.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { Define, Interface, SignatureRequirement } from '../declarations'; - -import * as validator from '../../../env/obj'; - -@Define({ name: 'SearchUpdated' }) -export class Event extends SignatureRequirement { - public session: string; - public rows: number; - public stat: Map; - - constructor(input: { session: string; rows: number; stat: Map }) { - super(); - validator.isObject(input); - this.session = validator.getAsNotEmptyString(input, 'session'); - this.rows = validator.getAsValidNumber(input, 'rows'); - this.stat = validator.getAsObj(input, 'stat'); - } -} - -export interface Event extends Interface {} diff --git a/application/platform/ipc/event/state/backend.ts b/application/platform/ipc/event/state/backend.ts deleted file mode 100644 index 99b7724b23..0000000000 --- a/application/platform/ipc/event/state/backend.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { Define, Interface, SignatureRequirement } from '../declarations'; - -import * as validator from '../../../env/obj'; - -export enum State { - Ready = 'Ready', - Locked = 'Locked', -} - -@Define({ name: 'BackendState' }) -export class Event extends SignatureRequirement { - public state: State; - public job: string; - - constructor(input: { state: State; job: string }) { - super(); - validator.isObject(input); - this.state = input.state; - this.job = validator.getAsString(input, 'job'); - } -} - -export interface Event extends Interface {} diff --git a/application/platform/ipc/event/state/client.ts b/application/platform/ipc/event/state/client.ts deleted file mode 100644 index d295ebd364..0000000000 --- a/application/platform/ipc/event/state/client.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { Define, Interface, SignatureRequirement } from '../declarations'; - -import * as validator from '../../../env/obj'; - -export enum State { - Ready = 'Ready', - Loading = 'Loading', -} - -@Define({ name: 'ClientState' }) -export class Event extends SignatureRequirement { - public state: State; - - constructor(input: { - state: State; - }) { - super(); - validator.isObject(input); - this.state = input.state; - } -} - -export interface Event extends Interface {} diff --git a/application/platform/ipc/event/state/index.ts b/application/platform/ipc/event/state/index.ts deleted file mode 100644 index 4f5bc5e115..0000000000 --- a/application/platform/ipc/event/state/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -export * as Client from './client'; -export * as Backend from './backend'; -export * as Job from './job'; \ No newline at end of file diff --git a/application/platform/ipc/event/state/job.ts b/application/platform/ipc/event/state/job.ts deleted file mode 100644 index 1926eed7d3..0000000000 --- a/application/platform/ipc/event/state/job.ts +++ /dev/null @@ -1,36 +0,0 @@ -import { Define, Interface, SignatureRequirement } from '../declarations'; - -import * as validator from '../../../env/obj'; - -@Define({ name: 'BackendJob' }) -export class Event extends SignatureRequirement { - public uuid: string; - public progress: number; - public session?: string; - public name?: string; - public desc?: string; - public icon?: string; - public spinner?: boolean; - - constructor(input: { - uuid: string; - progress: number; - session?: string; - name?: string; - desc?: string; - icon?: string; - spinner?: boolean; - }) { - super(); - validator.isObject(input); - this.progress = validator.getAsValidNumber(input, 'progress', { min: 0, max: 100 }); - this.uuid = validator.getAsNotEmptyString(input, 'uuid'); - this.session = validator.getAsNotEmptyStringOrAsUndefined(input, 'session'); - this.name = validator.getAsNotEmptyStringOrAsUndefined(input, 'name'); - this.desc = validator.getAsNotEmptyStringOrAsUndefined(input, 'desc'); - this.icon = validator.getAsNotEmptyStringOrAsUndefined(input, 'icon'); - this.spinner = typeof input.spinner === 'boolean' ? input.spinner : undefined; - } -} - -export interface Event extends Interface {} diff --git a/application/platform/ipc/event/stream/attachment.ts b/application/platform/ipc/event/stream/attachment.ts deleted file mode 100644 index 0933ae5b14..0000000000 --- a/application/platform/ipc/event/stream/attachment.ts +++ /dev/null @@ -1,27 +0,0 @@ -import { Define, Interface, SignatureRequirement } from '../declarations'; -import { Attachment } from '../../../types/content'; -import { AttachmentInfo } from '../../../types/bindings'; - -import * as validator from '../../../env/obj'; - -@Define({ name: 'AttachmentsUpdated' }) -export class Event extends SignatureRequirement { - public session: string; - public attachment: AttachmentInfo; - public len: number; - - constructor(input: { session: string; attachment: AttachmentInfo; len: number }) { - super(); - validator.isObject(input); - this.session = validator.getAsNotEmptyString(input, 'session'); - this.len = validator.getAsValidNumber(input, 'len'); - const attachment = validator.getAsObj(input, 'attachment'); - const err = Attachment.from(attachment); - if (err instanceof Error) { - throw err; - } - this.attachment = attachment; - } -} - -export interface Event extends Interface {} diff --git a/application/platform/ipc/event/stream/index.ts b/application/platform/ipc/event/stream/index.ts deleted file mode 100644 index 8be40dd7bd..0000000000 --- a/application/platform/ipc/event/stream/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -export * as Updated from './updated'; -export * as IndexedMapUpdated from './indexed_map_updated'; -export * as Attachment from './attachment'; diff --git a/application/platform/ipc/event/stream/indexed_map_updated.ts b/application/platform/ipc/event/stream/indexed_map_updated.ts deleted file mode 100644 index 5c31055088..0000000000 --- a/application/platform/ipc/event/stream/indexed_map_updated.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { Define, Interface, SignatureRequirement } from '../declarations'; - -import * as validator from '../../../env/obj'; - -@Define({ name: 'IndexedMapUpdated' }) -export class Event extends SignatureRequirement { - public session: string; - public len: number; - - constructor(input: { session: string; len: number }) { - super(); - validator.isObject(input); - this.session = validator.getAsNotEmptyString(input, 'session'); - this.len = validator.getAsValidNumber(input, 'len'); - } -} - -export interface Event extends Interface {} diff --git a/application/platform/ipc/event/stream/updated.ts b/application/platform/ipc/event/stream/updated.ts deleted file mode 100644 index 82540f21ea..0000000000 --- a/application/platform/ipc/event/stream/updated.ts +++ /dev/null @@ -1,21 +0,0 @@ -import { Define, Interface, SignatureRequirement } from '../declarations'; - -import * as validator from '../../../env/obj'; - -@Define({ name: 'StreamUpdated' }) -export class Event extends SignatureRequirement { - public session: string; - public rows: number; - - constructor(input: { - session: string; - rows: number; - }) { - super(); - validator.isObject(input); - this.session = validator.getAsNotEmptyString(input, 'session'); - this.rows = validator.getAsValidNumber(input, 'rows'); - } -} - -export interface Event extends Interface {} diff --git a/application/platform/ipc/event/values/index.ts b/application/platform/ipc/event/values/index.ts deleted file mode 100644 index 1eb5d2fa27..0000000000 --- a/application/platform/ipc/event/values/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * as Updated from './updated'; diff --git a/application/platform/ipc/event/values/updated.ts b/application/platform/ipc/event/values/updated.ts deleted file mode 100644 index e45ec0fb97..0000000000 --- a/application/platform/ipc/event/values/updated.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { Define, Interface, SignatureRequirement } from '../declarations'; - -import * as validator from '../../../env/obj'; - -@Define({ name: 'SearchValuesUpdated' }) -export class Event extends SignatureRequirement { - public session: string; - public map: Map | null; - - constructor(input: { session: string; map: Map | null }) { - super(); - validator.isObject(input); - this.session = validator.getAsNotEmptyString(input, 'session'); - this.map = validator.getAsObjOrUndefined(input, 'map', null); - } -} - -export interface Event extends Interface {} diff --git a/application/platform/ipc/index.ts b/application/platform/ipc/index.ts deleted file mode 100644 index 3888dc3729..0000000000 --- a/application/platform/ipc/index.ts +++ /dev/null @@ -1,4 +0,0 @@ -export * as event from './event'; -export * as request from './request'; -export * as channels from './setup/channels'; -export * as transport from './transport'; diff --git a/application/platform/ipc/request/action/call.ts b/application/platform/ipc/request/action/call.ts deleted file mode 100644 index 3a46c8b067..0000000000 --- a/application/platform/ipc/request/action/call.ts +++ /dev/null @@ -1,33 +0,0 @@ -import { Define, Interface, SignatureRequirement } from '../declarations'; -import * as validator from '../../../env/obj'; - -@Define({ name: 'ActionCallRequest' }) -export class Request extends SignatureRequirement { - public uuid: string; - public inputs: unknown | undefined; - - constructor(input: { uuid: string; inputs: unknown | undefined }) { - super(); - validator.isObject(input); - this.uuid = validator.getAsNotEmptyString(input, 'uuid'); - this.inputs = input.inputs; - } -} -export interface Request extends Interface {} - -@Define({ name: 'ActionCallResponse' }) -export class Response extends SignatureRequirement { - public uuid: string; - public output: unknown | undefined; - public error: string | undefined; - - constructor(input: { uuid: string; output: unknown | undefined; error: string | undefined }) { - super(); - validator.isObject(input); - this.uuid = validator.getAsNotEmptyString(input, 'uuid'); - this.error = validator.getAsNotEmptyStringOrAsUndefined(input, 'error'); - this.output = input.output; - } -} - -export interface Response extends Interface {} diff --git a/application/platform/ipc/request/action/index.ts b/application/platform/ipc/request/action/index.ts deleted file mode 100644 index eae72c0cce..0000000000 --- a/application/platform/ipc/request/action/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * as Call from './call'; diff --git a/application/platform/ipc/request/actions/about.ts b/application/platform/ipc/request/actions/about.ts deleted file mode 100644 index f8c61a986a..0000000000 --- a/application/platform/ipc/request/actions/about.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Define, Interface, SignatureRequirement } from '../declarations'; - -@Define({ name: 'AboutDialogRequest' }) -export class Request extends SignatureRequirement {} -export interface Request extends Interface {} - -@Define({ name: 'AboutDialogResponse' }) -export class Response extends SignatureRequirement {} - -export interface Response extends Interface {} diff --git a/application/platform/ipc/request/actions/export.session.state.ts b/application/platform/ipc/request/actions/export.session.state.ts deleted file mode 100644 index 9efb6e5b93..0000000000 --- a/application/platform/ipc/request/actions/export.session.state.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Define, Interface, SignatureRequirement } from '../declarations'; - -@Define({ name: 'ExportSessionStateRequest' }) -export class Request extends SignatureRequirement {} -export interface Request extends Interface {} - -@Define({ name: 'ExportSessionStateResponse' }) -export class Response extends SignatureRequirement {} - -export interface Response extends Interface {} diff --git a/application/platform/ipc/request/actions/find.ts b/application/platform/ipc/request/actions/find.ts deleted file mode 100644 index a18fa6ccdf..0000000000 --- a/application/platform/ipc/request/actions/find.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Define, Interface, SignatureRequirement } from '../declarations'; - -@Define({ name: 'FindInSearchDialogRequest' }) -export class Request extends SignatureRequirement {} -export interface Request extends Interface {} - -@Define({ name: 'FindInSearchDialogResponse' }) -export class Response extends SignatureRequirement {} - -export interface Response extends Interface {} diff --git a/application/platform/ipc/request/actions/help.ts b/application/platform/ipc/request/actions/help.ts deleted file mode 100644 index 26a679ea45..0000000000 --- a/application/platform/ipc/request/actions/help.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Define, Interface, SignatureRequirement } from '../declarations'; - -@Define({ name: 'HelpTabRequest' }) -export class Request extends SignatureRequirement {} -export interface Request extends Interface {} - -@Define({ name: 'HelpTabResponse' }) -export class Response extends SignatureRequirement {} - -export interface Response extends Interface {} diff --git a/application/platform/ipc/request/actions/import.session.state.ts b/application/platform/ipc/request/actions/import.session.state.ts deleted file mode 100644 index c379922832..0000000000 --- a/application/platform/ipc/request/actions/import.session.state.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Define, Interface, SignatureRequirement } from '../declarations'; - -@Define({ name: 'ImportSessionStateRequest' }) -export class Request extends SignatureRequirement {} -export interface Request extends Interface {} - -@Define({ name: 'ImportSessionStateResponse' }) -export class Response extends SignatureRequirement {} - -export interface Response extends Interface {} diff --git a/application/platform/ipc/request/actions/index.ts b/application/platform/ipc/request/actions/index.ts deleted file mode 100644 index 417c6f9848..0000000000 --- a/application/platform/ipc/request/actions/index.ts +++ /dev/null @@ -1,15 +0,0 @@ -export * as OpenFile from './open.file'; -export * as OpenFolder from './open.folder'; -export * as Stream from './stream'; -export * as About from './about'; -export * as Settings from './settings'; -export * as Help from './help'; -export * as Updates from './updates'; -export * as UrlInBrowser from './open.browserurl'; -export * as JumpTo from './jumpto'; -export * as FindInSearch from './find'; -export * as ExportSessionState from './export.session.state'; -export * as ImportSessionState from './import.session.state'; -export * as ThemeLight from './theme.light'; -export * as ThemeDark from './theme.dark'; -export * as PluginsManager from './plugins_manager'; diff --git a/application/platform/ipc/request/actions/jumpto.ts b/application/platform/ipc/request/actions/jumpto.ts deleted file mode 100644 index 493ce88669..0000000000 --- a/application/platform/ipc/request/actions/jumpto.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Define, Interface, SignatureRequirement } from '../declarations'; - -@Define({ name: 'JumpToDialogRequest' }) -export class Request extends SignatureRequirement {} -export interface Request extends Interface {} - -@Define({ name: 'JumpToDialogResponse' }) -export class Response extends SignatureRequirement {} - -export interface Response extends Interface {} diff --git a/application/platform/ipc/request/actions/open.browserurl.ts b/application/platform/ipc/request/actions/open.browserurl.ts deleted file mode 100644 index 7a55c3f436..0000000000 --- a/application/platform/ipc/request/actions/open.browserurl.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { Define, Interface, SignatureRequirement } from '../declarations'; - -import * as validator from '../../../env/obj'; - -@Define({ name: 'OpenUrlInBrowserActionRequest' }) -export class Request extends SignatureRequirement { - public url: string; - - constructor(input: { url: string }) { - super(); - validator.isObject(input); - this.url = validator.getAsNotEmptyString(input, 'url'); - } -} -export interface Request extends Interface {} - -@Define({ name: 'OpenUrlInBrowserActionResponse' }) -export class Response extends SignatureRequirement {} - -export interface Response extends Interface {} diff --git a/application/platform/ipc/request/actions/open.file.ts b/application/platform/ipc/request/actions/open.file.ts deleted file mode 100644 index d2a3c0baf4..0000000000 --- a/application/platform/ipc/request/actions/open.file.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { Define, Interface, SignatureRequirement } from '../declarations'; -import { FileType } from '../../../types/observe/types/file'; - -import * as validator from '../../../env/obj'; - -@Define({ name: 'OpenFileActionRequest' }) -export class Request extends SignatureRequirement { - public type: FileType | undefined; - - constructor(input: { type: FileType | undefined }) { - super(); - validator.isObject(input); - this.type = validator.getAsNotEmptyStringOrAsUndefined(input, 'type') as - | FileType - | undefined; - } -} -export interface Request extends Interface {} - -@Define({ name: 'OpenFileActionResponse' }) -export class Response extends SignatureRequirement { - public error: string | undefined; - - constructor(input: { error: string | undefined }) { - super(); - validator.isObject(input); - this.error = validator.getAsNotEmptyStringOrAsUndefined(input, 'error'); - } -} - -export interface Response extends Interface {} diff --git a/application/platform/ipc/request/actions/open.folder.ts b/application/platform/ipc/request/actions/open.folder.ts deleted file mode 100644 index 2d8d582c5b..0000000000 --- a/application/platform/ipc/request/actions/open.folder.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { Define, Interface, SignatureRequirement } from '../declarations'; -import { FileType } from '../../../types/observe/types/file'; - -import * as validator from '../../../env/obj'; - -@Define({ name: 'OpenFolderActionRequest' }) -export class Request extends SignatureRequirement { - public type: FileType | undefined; - - constructor(input: { type: FileType | undefined }) { - super(); - validator.isObject(input); - this.type = validator.getAsNotEmptyStringOrAsUndefined(input, 'type') as - | FileType - | undefined; - } -} -export interface Request extends Interface {} - -@Define({ name: 'OpenFolderActionResponse' }) -export class Response extends SignatureRequirement { - public error: string | undefined; - - constructor(input: { error: string | undefined }) { - super(); - validator.isObject(input); - this.error = validator.getAsNotEmptyStringOrAsUndefined(input, 'error'); - } -} - -export interface Response extends Interface {} diff --git a/application/platform/ipc/request/actions/plugins_manager.ts b/application/platform/ipc/request/actions/plugins_manager.ts deleted file mode 100644 index ceba3cd55f..0000000000 --- a/application/platform/ipc/request/actions/plugins_manager.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Define, Interface, SignatureRequirement } from '../declarations'; - -@Define({ name: 'PluginsManagerRequest' }) -export class Request extends SignatureRequirement {} -export interface Request extends Interface {} - -@Define({ name: 'PluginsManagerResponse' }) -export class Response extends SignatureRequirement {} - -export interface Response extends Interface {} diff --git a/application/platform/ipc/request/actions/settings.ts b/application/platform/ipc/request/actions/settings.ts deleted file mode 100644 index c7cb153ded..0000000000 --- a/application/platform/ipc/request/actions/settings.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Define, Interface, SignatureRequirement } from '../declarations'; - -@Define({ name: 'SettingsDialogRequest' }) -export class Request extends SignatureRequirement {} -export interface Request extends Interface {} - -@Define({ name: 'SettingsDialogResponse' }) -export class Response extends SignatureRequirement {} - -export interface Response extends Interface {} diff --git a/application/platform/ipc/request/actions/stream.ts b/application/platform/ipc/request/actions/stream.ts deleted file mode 100644 index eadc44a430..0000000000 --- a/application/platform/ipc/request/actions/stream.ts +++ /dev/null @@ -1,32 +0,0 @@ -import { Define, Interface, SignatureRequirement } from '../declarations'; -import { Protocol } from '../../../types/observe/parser'; -import { Source } from '../../../types/observe/origin/stream/index'; - -import * as validator from '../../../env/obj'; - -@Define({ name: 'StreamActionRequest' }) -export class Request extends SignatureRequirement { - public protocol: Protocol; - public source?: Source; - - constructor(input: { protocol: Protocol; source: Source | undefined }) { - super(); - validator.isObject(input); - this.protocol = validator.getAsNotEmptyString(input, 'protocol') as Protocol; - this.source = validator.getAsNotEmptyStringOrAsUndefined(input, 'source') as Source; - } -} -export interface Request extends Interface {} - -@Define({ name: 'StreamActionResponse' }) -export class Response extends SignatureRequirement { - public error: string | undefined; - - constructor(input: { error: string | undefined }) { - super(); - validator.isObject(input); - this.error = validator.getAsNotEmptyStringOrAsUndefined(input, 'error'); - } -} - -export interface Response extends Interface {} diff --git a/application/platform/ipc/request/actions/theme.dark.ts b/application/platform/ipc/request/actions/theme.dark.ts deleted file mode 100644 index 933fcbec32..0000000000 --- a/application/platform/ipc/request/actions/theme.dark.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Define, Interface, SignatureRequirement } from '../declarations'; - -@Define({ name: 'ThemeDarkRequest' }) -export class Request extends SignatureRequirement {} -export interface Request extends Interface {} - -@Define({ name: 'ThemeDarkResponse' }) -export class Response extends SignatureRequirement {} - -export interface Response extends Interface {} diff --git a/application/platform/ipc/request/actions/theme.light.ts b/application/platform/ipc/request/actions/theme.light.ts deleted file mode 100644 index 60a9eb820b..0000000000 --- a/application/platform/ipc/request/actions/theme.light.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Define, Interface, SignatureRequirement } from '../declarations'; - -@Define({ name: 'ThemeLightRequest' }) -export class Request extends SignatureRequirement {} -export interface Request extends Interface {} - -@Define({ name: 'ThemeLightResponse' }) -export class Response extends SignatureRequirement {} - -export interface Response extends Interface {} diff --git a/application/platform/ipc/request/actions/updates.ts b/application/platform/ipc/request/actions/updates.ts deleted file mode 100644 index f9941ccbc8..0000000000 --- a/application/platform/ipc/request/actions/updates.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Define, Interface, SignatureRequirement } from '../declarations'; - -@Define({ name: 'CheckForUpdatesRequest' }) -export class Request extends SignatureRequirement {} -export interface Request extends Interface {} - -@Define({ name: 'CheckForUpdatesResponse' }) -export class Response extends SignatureRequirement {} - -export interface Response extends Interface {} diff --git a/application/platform/ipc/request/app/alpha_release.ts b/application/platform/ipc/request/app/alpha_release.ts deleted file mode 100644 index b4c5989e8c..0000000000 --- a/application/platform/ipc/request/app/alpha_release.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { Define, Interface, SignatureRequirement } from '../declarations'; -import * as validator from '../../../env/obj'; - -@Define({ name: 'GetAppAlphaReleaseRequest' }) -export class Request extends SignatureRequirement {} -export interface Request extends Interface {} - -@Define({ name: 'GetAppAlphaReleaseResponse' }) -export class Response extends SignatureRequirement { - public version: string | undefined; - public url: string | undefined; - public error: string | undefined; - - constructor(input: { version: string | undefined; url: string | undefined; error: string | undefined }) { - super(); - validator.isObject(input); - this.error = validator.getAsNotEmptyStringOrAsUndefined(input, 'error'); - this.version = validator.getAsNotEmptyStringOrAsUndefined(input, 'version'); - this.url = validator.getAsNotEmptyStringOrAsUndefined(input, 'url'); - } -} - -export interface Response extends Interface {} diff --git a/application/platform/ipc/request/app/changelogs.ts b/application/platform/ipc/request/app/changelogs.ts deleted file mode 100644 index a2d228e8f0..0000000000 --- a/application/platform/ipc/request/app/changelogs.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { Define, Interface, SignatureRequirement } from '../declarations'; -import * as validator from '../../../env/obj'; - -@Define({ name: 'GetAppChangelogsRequest' }) -export class Request extends SignatureRequirement { - public version?: string; - - constructor(input: { version: string | undefined }) { - super(); - validator.isObject(input); - this.version = validator.getAsNotEmptyStringOrAsUndefined(input, 'version'); - } -} -export interface Request extends Interface {} - -@Define({ name: 'GetAppChangelogsResponse' }) -export class Response extends SignatureRequirement { - public markdown: string; - public version: string; - public error: string | undefined; - - constructor(input: { markdown: string; version: string; error: string | undefined }) { - super(); - validator.isObject(input); - this.error = validator.getAsNotEmptyStringOrAsUndefined(input, 'error'); - this.markdown = validator.getAsString(input, 'markdown'); - this.version = validator.getAsString(input, 'version'); - } -} - -export interface Response extends Interface {} diff --git a/application/platform/ipc/request/app/index.ts b/application/platform/ipc/request/app/index.ts deleted file mode 100644 index ffba0f2a99..0000000000 --- a/application/platform/ipc/request/app/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -export * as Version from './version'; -export * as Changelogs from './changelogs'; -export * as AlphaRelease from './alpha_release'; diff --git a/application/platform/ipc/request/app/version.ts b/application/platform/ipc/request/app/version.ts deleted file mode 100644 index c3afb4c31c..0000000000 --- a/application/platform/ipc/request/app/version.ts +++ /dev/null @@ -1,21 +0,0 @@ -import { Define, Interface, SignatureRequirement } from '../declarations'; -import * as validator from '../../../env/obj'; - -@Define({ name: 'GetAppVersionRequest' }) -export class Request extends SignatureRequirement {} -export interface Request extends Interface {} - -@Define({ name: 'GetAppVersionResponse' }) -export class Response extends SignatureRequirement { - public version: string; - public error: string | undefined; - - constructor(input: { version: string; error: string | undefined }) { - super(); - validator.isObject(input); - this.error = validator.getAsNotEmptyStringOrAsUndefined(input, 'error'); - this.version = validator.getAsString(input, 'version'); - } -} - -export interface Response extends Interface {} diff --git a/application/platform/ipc/request/cli/getcommand.ts b/application/platform/ipc/request/cli/getcommand.ts deleted file mode 100644 index 4c220a28be..0000000000 --- a/application/platform/ipc/request/cli/getcommand.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { Define, Interface, SignatureRequirement } from '../declarations'; -import * as validator from '../../../env/obj'; - -@Define({ name: 'CliGetCommandRequest' }) -export class Request extends SignatureRequirement { - -} -export interface Request extends Interface {} - -@Define({ name: 'CliGetCommandResponse' }) -export class Response extends SignatureRequirement { - public command: string; - - constructor(input: { command: string }) { - super(); - this.command = validator.getAsNotEmptyStringOrAsUndefined(input, 'command'); - } -} - -export interface Response extends Interface {} diff --git a/application/platform/ipc/request/cli/index.ts b/application/platform/ipc/request/cli/index.ts deleted file mode 100644 index 2817373e50..0000000000 --- a/application/platform/ipc/request/cli/index.ts +++ /dev/null @@ -1,4 +0,0 @@ -export * as Search from './search'; -export * as Observe from './observe'; -export * as GetCommand from './getcommand'; -export * as MultiFiles from './multi_files'; diff --git a/application/platform/ipc/request/cli/multi_files.ts b/application/platform/ipc/request/cli/multi_files.ts deleted file mode 100644 index d50ccbceb5..0000000000 --- a/application/platform/ipc/request/cli/multi_files.ts +++ /dev/null @@ -1,22 +0,0 @@ -import { Define, Interface, SignatureRequirement } from '../declarations'; -import { File } from '../../../types/files'; - -import * as validator from '../../../env/obj'; - -@Define({ name: 'MultiFilesCLICommandRequest' }) -export class Request extends SignatureRequirement { - public files: File[]; - - constructor(input: { files: File[] }) { - super(); - validator.isObject(input); - this.files = validator.getAsObj(input, 'files'); - } -} - -export interface Request extends Interface {} - -@Define({ name: 'MultiFilesCLICommandResponse' }) -export class Response extends SignatureRequirement {} - -export interface Response extends Interface {} diff --git a/application/platform/ipc/request/cli/observe.ts b/application/platform/ipc/request/cli/observe.ts deleted file mode 100644 index 4d746469a9..0000000000 --- a/application/platform/ipc/request/cli/observe.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { Define, Interface, SignatureRequirement } from '../declarations'; -import { IObserve, Observe } from '../../../types/observe/index'; - -import * as validator from '../../../env/obj'; - -@Define({ name: 'ObserveCLICommandRequest' }) -export class Request extends SignatureRequirement { - public observe: IObserve[]; - - constructor(input: { observe: IObserve[] }) { - super(); - validator.isObject(input); - this.observe = validator.getAsObj(input, 'observe'); - for (const obsv of this.observe) { - const error = Observe.validate(obsv); - if (error instanceof Error) { - throw error; - } - } - } -} - -export interface Request extends Interface {} - -@Define({ name: 'ObserveCLICommandResponse' }) -export class Response extends SignatureRequirement { - public session: string | undefined; - public error?: string; - - constructor(input: { session: string | undefined; error?: string }) { - super(); - validator.isObject(input); - this.session = validator.getAsNotEmptyStringOrAsUndefined(input, 'session'); - this.error = validator.getAsNotEmptyStringOrAsUndefined(input, 'error'); - } -} - -export interface Response extends Interface {} diff --git a/application/platform/ipc/request/cli/search.ts b/application/platform/ipc/request/cli/search.ts deleted file mode 100644 index df58b07fdc..0000000000 --- a/application/platform/ipc/request/cli/search.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { Define, Interface, SignatureRequirement } from '../declarations'; -import * as validator from '../../../env/obj'; - -@Define({ name: 'CliSearchRequest' }) -export class Request extends SignatureRequirement { - public sessions: string[]; - public filters: string[]; - - constructor(input: { sessions: string[]; filters: string[] }) { - super(); - validator.isObject(input); - this.sessions = validator.getAsArray(input, 'sessions'); - this.filters = validator.getAsArray(input, 'filters'); - } -} -export interface Request extends Interface {} - -@Define({ name: 'CliSearchResponse' }) -export class Response extends SignatureRequirement { - public error: string | undefined; - - constructor(input: { error: string | undefined }) { - super(); - validator.isObject(input); - this.error = validator.getAsNotEmptyStringOrAsUndefined(input, 'error'); - } -} - -export interface Response extends Interface {} diff --git a/application/platform/ipc/request/cwd/get.ts b/application/platform/ipc/request/cwd/get.ts deleted file mode 100644 index 4c373cf617..0000000000 --- a/application/platform/ipc/request/cwd/get.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { Define, Interface, SignatureRequirement } from '../declarations'; -import * as validator from '../../../env/obj'; - -@Define({ name: 'CwdGetRequest' }) -export class Request extends SignatureRequirement { - public uuid: string | undefined; - - constructor(input: { uuid: string | undefined }) { - super(); - validator.isObject(input); - this.uuid = validator.getAsNotEmptyStringOrAsUndefined(input, 'uuid'); - } -} -export interface Request extends Interface {} - -@Define({ name: 'CwdGetResponse' }) -export class Response extends SignatureRequirement { - public uuid: string | undefined; - public cwd: string; - - constructor(input: { uuid: string | undefined; cwd: string }) { - super(); - validator.isObject(input); - this.uuid = validator.getAsNotEmptyStringOrAsUndefined(input, 'uuid'); - this.cwd = validator.getAsNotEmptyString(input, 'cwd'); - } -} - -export interface Response extends Interface {} diff --git a/application/platform/ipc/request/cwd/index.ts b/application/platform/ipc/request/cwd/index.ts deleted file mode 100644 index ccb1581785..0000000000 --- a/application/platform/ipc/request/cwd/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * as Get from './get'; -export * as Set from './set'; diff --git a/application/platform/ipc/request/cwd/set.ts b/application/platform/ipc/request/cwd/set.ts deleted file mode 100644 index 0054f3a764..0000000000 --- a/application/platform/ipc/request/cwd/set.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { Define, Interface, SignatureRequirement } from '../declarations'; -import * as validator from '../../../env/obj'; - -@Define({ name: 'CwdSetRequest' }) -export class Request extends SignatureRequirement { - public uuid: string | undefined; - public cwd: string; - - constructor(input: { uuid: string | undefined; cwd: string }) { - super(); - validator.isObject(input); - this.uuid = validator.getAsNotEmptyStringOrAsUndefined(input, 'uuid'); - this.cwd = validator.getAsNotEmptyString(input, 'cwd'); - } -} -export interface Request extends Interface {} - -@Define({ name: 'CwdSetResponse' }) -export class Response extends SignatureRequirement { - public uuid: string | undefined; - public error: string | undefined; - - constructor(input: { uuid: string | undefined; error: string | undefined }) { - super(); - validator.isObject(input); - this.uuid = validator.getAsNotEmptyStringOrAsUndefined(input, 'uuid'); - this.error = validator.getAsNotEmptyStringOrAsUndefined(input, 'error'); - } -} - -export interface Response extends Interface {} diff --git a/application/platform/ipc/request/declarations.ts b/application/platform/ipc/request/declarations.ts deleted file mode 100644 index 95829b643e..0000000000 --- a/application/platform/ipc/request/declarations.ts +++ /dev/null @@ -1,82 +0,0 @@ -import { wrapResponseConstructor } from '../transport'; -import { decoratorFactory, DecoratorConstructor } from '../../env/decorators'; -import { scope } from '../../env/scope'; -import { ISignatureRequirement, EntityConstructor, SignatureRequirement } from '../transport/index'; -export { EntityConstructor, SignatureRequirement }; -import { Logger } from '../../log'; - -export { Logger }; - -export const InjectLogger = function ( - handler: (log: Logger, request: R & ISignatureRequirement) => T, -): (...args: any[]) => T { - return (request: R & ISignatureRequirement): T => { - return handler(scope.getLogger(`R: ${request.getSignature()}`), request); - }; -}; - -export class IpcRequest { - readonly _responseConstructor: EntityConstructor & ISignatureRequirement; - - constructor(responseConstructor: EntityConstructor & ISignatureRequirement) { - this._responseConstructor = responseConstructor; - } - - public send(request: Q): Promise { - const signature = request.getSignature(); - if (typeof signature !== 'string' || signature.trim() === '') { - return Promise.reject(new Error(`No request signature has been found.`)); - } - return scope - .getTransport() - .request(request, wrapResponseConstructor(signature, this._responseConstructor)); - } - - public static send( - responseConstructor: EntityConstructor & ISignatureRequirement, - request: ISignatureRequirement, - ): Promise { - const signature = request.getSignature(); - if (typeof signature !== 'string' || signature.trim() === '') { - return Promise.reject(new Error(`No request signature has been found.`)); - } - return scope - .getTransport() - .request(request, wrapResponseConstructor(signature, responseConstructor)); - } - - public static emulate(entity: ISignatureRequirement): { - request(): void; - response(sequence: number): void; - } { - const signature = entity.getSignature(); - if (typeof signature !== 'string' || signature.trim() === '') { - throw new Error(`No entity signature has been found.`); - } - return { - request: () => { - scope.getTransport().emulate(entity).request(); - }, - response: (sequence: number) => { - scope.getTransport().emulate(entity).response(sequence); - }, - }; - } -} - -export interface Inputs { - name: string; -} - -export interface Interface { - getSignature(): string; -} - -export const Define = decoratorFactory((constructor: DecoratorConstructor, obj: Inputs) => { - const name = obj.name; - constructor.prototype.getSignature = (): string => { - return name; - }; - (constructor as any).getSignature = constructor.prototype.getSignature; - return class extends constructor {}; -}); diff --git a/application/platform/ipc/request/dlt/index.ts b/application/platform/ipc/request/dlt/index.ts deleted file mode 100644 index 8d9feda931..0000000000 --- a/application/platform/ipc/request/dlt/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * as Stat from './stat'; diff --git a/application/platform/ipc/request/dlt/stat.ts b/application/platform/ipc/request/dlt/stat.ts deleted file mode 100644 index ebb1364bea..0000000000 --- a/application/platform/ipc/request/dlt/stat.ts +++ /dev/null @@ -1,28 +0,0 @@ -import { Define, Interface, SignatureRequirement } from '../declarations'; -import { DltStatisticInfo } from '../../../types/bindings'; -import * as validator from '../../../env/obj'; - -@Define({ name: 'DltStatRequest' }) -export class Request extends SignatureRequirement { - public files: string[]; - - constructor(input: { files: string[] }) { - super(); - validator.isObject(input); - this.files = validator.getAsArray(input, 'files'); - } -} -export interface Request extends Interface {} - -@Define({ name: 'DltStatResponse' }) -export class Response extends SignatureRequirement { - public stat: DltStatisticInfo; - - constructor(input: { stat: DltStatisticInfo }) { - super(); - validator.isObject(input); - this.stat = validator.getAsObj(input, 'stat'); - } -} - -export interface Response extends Interface {} diff --git a/application/platform/ipc/request/env/get.ts b/application/platform/ipc/request/env/get.ts deleted file mode 100644 index 7ae98b68e9..0000000000 --- a/application/platform/ipc/request/env/get.ts +++ /dev/null @@ -1,21 +0,0 @@ -import { Define, Interface, SignatureRequirement } from '../declarations'; -import * as validator from '../../../env/obj'; - -@Define({ name: 'EnvGetRequest' }) -export class Request extends SignatureRequirement {} -export interface Request extends Interface {} - -@Define({ name: 'EnvGetResponse' }) -export class Response extends SignatureRequirement { - public env: { [key: string]: string }; - public error: string | undefined; - - constructor(input: { error: string | undefined; env: { [key: string]: string } }) { - super(); - validator.isObject(input); - this.error = validator.getAsNotEmptyStringOrAsUndefined(input, 'error'); - this.env = validator.getAsObj(input, 'env'); - } -} - -export interface Response extends Interface {} diff --git a/application/platform/ipc/request/env/index.ts b/application/platform/ipc/request/env/index.ts deleted file mode 100644 index b23516ff12..0000000000 --- a/application/platform/ipc/request/env/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * as Get from './get'; diff --git a/application/platform/ipc/request/file/checksum.ts b/application/platform/ipc/request/file/checksum.ts deleted file mode 100644 index d046185338..0000000000 --- a/application/platform/ipc/request/file/checksum.ts +++ /dev/null @@ -1,30 +0,0 @@ -import { Define, Interface, SignatureRequirement } from '../declarations'; - -import * as validator from '../../../env/obj'; - -@Define({ name: 'ChecksumFileRequest' }) -export class Request extends SignatureRequirement { - public filename: string; - - constructor(input: { filename: string }) { - super(); - validator.isObject(input); - this.filename = validator.getAsNotEmptyString(input, 'filename'); - } -} -export interface Request extends Interface {} - -@Define({ name: 'ChecksumFileResponse' }) -export class Response extends SignatureRequirement { - public hash?: string; - public error?: string; - - constructor(input: { hash?: string; error?: string }) { - super(); - validator.isObject(input); - this.hash = validator.getAsNotEmptyStringOrAsUndefined(input, 'hash'); - this.error = validator.getAsNotEmptyStringOrAsUndefined(input, 'error'); - } -} - -export interface Response extends Interface {} diff --git a/application/platform/ipc/request/file/copy.ts b/application/platform/ipc/request/file/copy.ts deleted file mode 100644 index 10c0ab6ed9..0000000000 --- a/application/platform/ipc/request/file/copy.ts +++ /dev/null @@ -1,30 +0,0 @@ -import { Define, Interface, SignatureRequirement } from '../declarations'; - -import * as validator from '../../../env/obj'; - -@Define({ name: 'CopyFilesRequest' }) -export class Request extends SignatureRequirement { - public files: string[]; - public dest: string; - - constructor(input: { files: string[]; dest: string }) { - super(); - validator.isObject(input); - this.files = validator.getAsArray(input, 'files'); - this.dest = validator.getAsNotEmptyString(input, 'dest'); - } -} -export interface Request extends Interface {} - -@Define({ name: 'CopyFilesResponse' }) -export class Response extends SignatureRequirement { - public error?: string; - - constructor(input: { error?: string }) { - super(); - validator.isObject(input); - this.error = validator.getAsNotEmptyStringOrAsUndefined(input, 'error'); - } -} - -export interface Response extends Interface {} diff --git a/application/platform/ipc/request/file/copyfile.ts b/application/platform/ipc/request/file/copyfile.ts deleted file mode 100644 index 24710b36b6..0000000000 --- a/application/platform/ipc/request/file/copyfile.ts +++ /dev/null @@ -1,30 +0,0 @@ -import { Define, Interface, SignatureRequirement } from '../declarations'; - -import * as validator from '../../../env/obj'; - -@Define({ name: 'CopyFileRequest' }) -export class Request extends SignatureRequirement { - public src: string; - public dest: string; - - constructor(input: { src: string; dest: string }) { - super(); - validator.isObject(input); - this.src = validator.getAsNotEmptyString(input, 'src'); - this.dest = validator.getAsNotEmptyString(input, 'dest'); - } -} -export interface Request extends Interface {} - -@Define({ name: 'CopyFileResponse' }) -export class Response extends SignatureRequirement { - public error?: string; - - constructor(input: { error?: string }) { - super(); - validator.isObject(input); - this.error = validator.getAsNotEmptyStringOrAsUndefined(input, 'error'); - } -} - -export interface Response extends Interface {} diff --git a/application/platform/ipc/request/file/exists.ts b/application/platform/ipc/request/file/exists.ts deleted file mode 100644 index 6da0aef730..0000000000 --- a/application/platform/ipc/request/file/exists.ts +++ /dev/null @@ -1,28 +0,0 @@ -import { Define, Interface, SignatureRequirement } from '../declarations'; - -import * as validator from '../../../env/obj'; - -@Define({ name: 'DoesExistRequest' }) -export class Request extends SignatureRequirement { - public path: string; - - constructor(input: { path: string }) { - super(); - validator.isObject(input); - this.path = validator.getAsNotEmptyString(input, 'path'); - } -} -export interface Request extends Interface {} - -@Define({ name: 'DoesExistResponse' }) -export class Response extends SignatureRequirement { - public exists: boolean; - - constructor(input: { exists: boolean }) { - super(); - validator.isObject(input); - this.exists = validator.getAsBool(input, 'exists'); - } -} - -export interface Response extends Interface {} diff --git a/application/platform/ipc/request/file/exportsession.ts b/application/platform/ipc/request/file/exportsession.ts deleted file mode 100644 index 69a773ce73..0000000000 --- a/application/platform/ipc/request/file/exportsession.ts +++ /dev/null @@ -1,28 +0,0 @@ -import { Define, Interface, SignatureRequirement } from '../declarations'; - -import * as validator from '../../../env/obj'; - -@Define({ name: 'ExportFullSessionAsTextRequest' }) -export class Request extends SignatureRequirement { - public uuid: string; - - constructor(input: { uuid: string }) { - super(); - validator.isObject(input); - this.uuid = validator.getAsNotEmptyString(input, 'uuid'); - } -} -export interface Request extends Interface {} - -@Define({ name: 'ExportFullSessionAsTextResponse' }) -export class Response extends SignatureRequirement { - public error?: string; - - constructor(input: { error?: string }) { - super(); - validator.isObject(input); - this.error = validator.getAsNotEmptyStringOrAsUndefined(input, 'error'); - } -} - -export interface Response extends Interface {} diff --git a/application/platform/ipc/request/file/file.ts b/application/platform/ipc/request/file/file.ts deleted file mode 100644 index e5b1c48437..0000000000 --- a/application/platform/ipc/request/file/file.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { Define, Interface, SignatureRequirement } from '../declarations'; -import { File } from '../../../types/files'; - -import * as validator from '../../../env/obj'; - -@Define({ name: 'FileByPathRequest' }) -export class Request extends SignatureRequirement { - public filename: string[]; - - constructor(input: { filename: string[] }) { - super(); - validator.isObject(input); - this.filename = validator.getAsArray(input, 'filename'); - } -} -export interface Request extends Interface {} - -@Define({ name: 'FileByPathResponse' }) -export class Response extends SignatureRequirement { - public files: File[]; - - constructor(input: { files: File[] }) { - super(); - validator.isObject(input); - this.files = input.files; - } -} - -export interface Response extends Interface {} diff --git a/application/platform/ipc/request/file/index.ts b/application/platform/ipc/request/file/index.ts deleted file mode 100644 index 473bbd795f..0000000000 --- a/application/platform/ipc/request/file/index.ts +++ /dev/null @@ -1,12 +0,0 @@ -export * as Select from './select'; -export * as File from './file'; -export * as Save from './save'; -export * as Checksum from './checksum'; -export * as Exists from './exists'; -export * as Name from './name'; -export * as Copy from './copy'; -export * as CopyFile from './copyfile'; -export * as Read from './read'; -export * as Write from './write'; -export * as ExportSession from './exportsession'; -export * as IsBinary from './isbinary'; diff --git a/application/platform/ipc/request/file/isbinary.ts b/application/platform/ipc/request/file/isbinary.ts deleted file mode 100644 index 9680de32cd..0000000000 --- a/application/platform/ipc/request/file/isbinary.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { Define, Interface, SignatureRequirement } from '../declarations'; - -import * as validator from '../../../env/obj'; - -@Define({ name: 'IsBinaryRequest' }) -export class Request extends SignatureRequirement { - public file: string; - - constructor(input: { file: string }) { - super(); - validator.isObject(input); - this.file = validator.getAsNotEmptyString(input, 'file'); - } -} -export interface Request extends Interface {} - -@Define({ name: 'IsBinaryResponse' }) -export class Response extends SignatureRequirement { - public error?: string; - public binary: boolean; - constructor(input: { binary: boolean; error?: string }) { - super(); - validator.isObject(input); - this.error = validator.getAsNotEmptyStringOrAsUndefined(input, 'error'); - this.binary = validator.getAsBool(input, 'binary'); - } -} - -export interface Response extends Interface {} diff --git a/application/platform/ipc/request/file/name.ts b/application/platform/ipc/request/file/name.ts deleted file mode 100644 index 43f945bb47..0000000000 --- a/application/platform/ipc/request/file/name.ts +++ /dev/null @@ -1,34 +0,0 @@ -import { Define, Interface, SignatureRequirement } from '../declarations'; - -import * as validator from '../../../env/obj'; - -@Define({ name: 'ParseFilenameRequest' }) -export class Request extends SignatureRequirement { - public path: string; - - constructor(input: { path: string }) { - super(); - validator.isObject(input); - this.path = validator.getAsNotEmptyString(input, 'path'); - } -} -export interface Request extends Interface {} - -@Define({ name: 'ParseFilenameResponse' }) -export class Response extends SignatureRequirement { - public filename: string; - public name: string; - public parent: string; - public ext: string; - - constructor(input: { name: string; filename: string; parent: string; ext: string }) { - super(); - validator.isObject(input); - this.filename = validator.getAsString(input, 'filename'); - this.name = validator.getAsString(input, 'name'); - this.parent = validator.getAsString(input, 'parent'); - this.ext = validator.getAsString(input, 'ext'); - } -} - -export interface Response extends Interface {} diff --git a/application/platform/ipc/request/file/read.ts b/application/platform/ipc/request/file/read.ts deleted file mode 100644 index cfa72e4935..0000000000 --- a/application/platform/ipc/request/file/read.ts +++ /dev/null @@ -1,30 +0,0 @@ -import { Define, Interface, SignatureRequirement } from '../declarations'; - -import * as validator from '../../../env/obj'; - -@Define({ name: 'ReadFileRequest' }) -export class Request extends SignatureRequirement { - public file: string; - - constructor(input: { file: string }) { - super(); - validator.isObject(input); - this.file = validator.getAsNotEmptyString(input, 'file'); - } -} -export interface Request extends Interface {} - -@Define({ name: 'ReadFilesResponse' }) -export class Response extends SignatureRequirement { - public error?: string; - public text?: string; - - constructor(input: { text?: string; error?: string }) { - super(); - validator.isObject(input); - this.text = validator.getAsNotEmptyStringOrAsUndefined(input, 'text'); - this.error = validator.getAsNotEmptyStringOrAsUndefined(input, 'error'); - } -} - -export interface Response extends Interface {} diff --git a/application/platform/ipc/request/file/save.ts b/application/platform/ipc/request/file/save.ts deleted file mode 100644 index 4bb4084a73..0000000000 --- a/application/platform/ipc/request/file/save.ts +++ /dev/null @@ -1,32 +0,0 @@ -import { Define, Interface, SignatureRequirement } from '../declarations'; - -import * as validator from '../../../env/obj'; - -@Define({ name: 'SaveFileRequest' }) -export class Request extends SignatureRequirement { - public ext?: string; - public defaultFileName?: string; - - constructor(input: { ext?: string; defaultFileName?: string }) { - super(); - validator.isObject(input); - this.ext = validator.getAsNotEmptyStringOrAsUndefined(input, 'ext'); - this.defaultFileName = validator.getAsNotEmptyStringOrAsUndefined(input, 'defaultFileName'); - } -} -export interface Request extends Interface {} - -@Define({ name: 'SaveFileResponse' }) -export class Response extends SignatureRequirement { - public filename?: string; - public error?: string; - - constructor(input: { filename?: string; error?: string }) { - super(); - validator.isObject(input); - this.filename = validator.getAsNotEmptyStringOrAsUndefined(input, 'filename'); - this.error = validator.getAsNotEmptyStringOrAsUndefined(input, 'error'); - } -} - -export interface Response extends Interface {} diff --git a/application/platform/ipc/request/file/select.ts b/application/platform/ipc/request/file/select.ts deleted file mode 100644 index c01841b8ab..0000000000 --- a/application/platform/ipc/request/file/select.ts +++ /dev/null @@ -1,34 +0,0 @@ -import { Define, Interface, SignatureRequirement } from '../declarations'; -import { File } from '../../../types/files'; -import { FileType } from '../../../types/observe/types/file'; - -import * as validator from '../../../env/obj'; - -@Define({ name: 'SelectFileRequest' }) -export class Request extends SignatureRequirement { - public target: FileType | undefined; - public ext?: string; - - constructor(input: { target: FileType | undefined; ext?: string }) { - super(); - validator.isObject(input); - this.target = validator.getAsNotEmptyStringOrAsUndefined(input, 'target') as - | FileType - | undefined; - this.ext = validator.getAsNotEmptyStringOrAsUndefined(input, 'ext'); - } -} -export interface Request extends Interface {} - -@Define({ name: 'SelectFileResponse' }) -export class Response extends SignatureRequirement { - public files: File[]; - - constructor(input: { files: File[] }) { - super(); - validator.isObject(input); - this.files = input.files; - } -} - -export interface Response extends Interface {} diff --git a/application/platform/ipc/request/file/write.ts b/application/platform/ipc/request/file/write.ts deleted file mode 100644 index 2347afbc01..0000000000 --- a/application/platform/ipc/request/file/write.ts +++ /dev/null @@ -1,32 +0,0 @@ -import { Define, Interface, SignatureRequirement } from '../declarations'; - -import * as validator from '../../../env/obj'; - -@Define({ name: 'WriteFileRequest' }) -export class Request extends SignatureRequirement { - public filename: string; - public content: string; - public overwrite: boolean; - - constructor(input: { filename: string; content: string; overwrite: boolean }) { - super(); - validator.isObject(input); - this.filename = validator.getAsNotEmptyString(input, 'filename'); - this.content = validator.getAsNotEmptyString(input, 'content'); - this.overwrite = validator.getAsBool(input, 'overwrite'); - } -} -export interface Request extends Interface {} - -@Define({ name: 'WriteFileResponse' }) -export class Response extends SignatureRequirement { - public error?: string; - - constructor(input: { error?: string }) { - super(); - validator.isObject(input); - this.error = validator.getAsNotEmptyStringOrAsUndefined(input, 'error'); - } -} - -export interface Response extends Interface {} diff --git a/application/platform/ipc/request/folder/choose.ts b/application/platform/ipc/request/folder/choose.ts deleted file mode 100644 index 1a3e6bf245..0000000000 --- a/application/platform/ipc/request/folder/choose.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { Define, Interface, SignatureRequirement } from '../declarations'; - -import * as validator from '../../../env/obj'; - -@Define({ name: 'ChooseFolderRequest' }) -export class Request extends SignatureRequirement {} -export interface Request extends Interface {} - -@Define({ name: 'ChooseFolderResponse' }) -export class Response extends SignatureRequirement { - public paths: string[]; - - constructor(input: { paths: string[] }) { - super(); - validator.isObject(input); - this.paths = validator.getAsArray(input, 'paths'); - } -} - -export interface Response extends Interface {} diff --git a/application/platform/ipc/request/folder/delimiter.ts b/application/platform/ipc/request/folder/delimiter.ts deleted file mode 100644 index d4947709cd..0000000000 --- a/application/platform/ipc/request/folder/delimiter.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { Define, Interface, SignatureRequirement } from '../declarations'; - -import * as validator from '../../../env/obj'; - -@Define({ name: 'FoldersDelimiterRequest' }) -export class Request extends SignatureRequirement {} -export interface Request extends Interface {} - -@Define({ name: 'FoldersDelimiterResponse' }) -export class Response extends SignatureRequirement { - public delimiter: string; - - constructor(input: { delimiter: string }) { - super(); - validator.isObject(input); - this.delimiter = validator.getAsNotEmptyString(input, 'delimiter'); - } -} - -export interface Response extends Interface {} diff --git a/application/platform/ipc/request/folder/index.ts b/application/platform/ipc/request/folder/index.ts deleted file mode 100644 index 055e99a380..0000000000 --- a/application/platform/ipc/request/folder/index.ts +++ /dev/null @@ -1,4 +0,0 @@ -export * as Select from './select'; -export * as Choose from './choose'; -export * as Delimiter from './delimiter'; -export * as ShellOpen from './shell_open'; diff --git a/application/platform/ipc/request/folder/select.ts b/application/platform/ipc/request/folder/select.ts deleted file mode 100644 index 231724530f..0000000000 --- a/application/platform/ipc/request/folder/select.ts +++ /dev/null @@ -1,34 +0,0 @@ -import { Define, Interface, SignatureRequirement } from '../declarations'; -import { File } from '../../../types/files'; -import { FileType } from '../../../types/observe/types/file'; - -import * as validator from '../../../env/obj'; - -@Define({ name: 'SelectFilesInFolderRequest' }) -export class Request extends SignatureRequirement { - public target: FileType | undefined; - public ext?: string; - - constructor(input: { target: FileType | undefined; ext?: string }) { - super(); - validator.isObject(input); - this.target = validator.getAsNotEmptyStringOrAsUndefined(input, 'target') as - | FileType - | undefined; - this.ext = validator.getAsNotEmptyStringOrAsUndefined(input, 'ext'); - } -} -export interface Request extends Interface {} - -@Define({ name: 'SelectFilesInFolderResponse' }) -export class Response extends SignatureRequirement { - public files: File[]; - - constructor(input: { files: File[] }) { - super(); - validator.isObject(input); - this.files = input.files; - } -} - -export interface Response extends Interface {} diff --git a/application/platform/ipc/request/folder/shell_open.ts b/application/platform/ipc/request/folder/shell_open.ts deleted file mode 100644 index d38967ddaa..0000000000 --- a/application/platform/ipc/request/folder/shell_open.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { Define, Interface, SignatureRequirement } from '../declarations'; - -import * as validator from '../../../env/obj'; - -@Define({ name: 'FolderShellOpenRequest' }) -export class Request extends SignatureRequirement { - public path: string; - constructor(input: { path: string }) { - super(); - validator.isObject(input); - this.path = validator.getAsNotEmptyString(input, 'path'); - } -} -export interface Request extends Interface {} - -@Define({ name: 'FolderShellOpenResponse' }) -export class Response extends SignatureRequirement {} - -export interface Response extends Interface {} diff --git a/application/platform/ipc/request/github/addrepo.ts b/application/platform/ipc/request/github/addrepo.ts deleted file mode 100644 index e53e131eca..0000000000 --- a/application/platform/ipc/request/github/addrepo.ts +++ /dev/null @@ -1,52 +0,0 @@ -import { Define, Interface, SignatureRequirement } from '../declarations'; -import { SharingSettings } from '../../../types/github'; - -import * as validator from '../../../env/obj'; - -@Define({ name: 'AddGitHubRepoRequest' }) -export class Request extends SignatureRequirement { - public owner: string; - public repo: string; - public token: string; - public branch: string; - public settings: SharingSettings; - public entry: string | undefined; - - constructor(input: { - branch: string; - token: string; - repo: string; - owner: string; - entry: string | undefined; - settings: SharingSettings; - }) { - super(); - validator.isObject(input); - this.token = validator.getAsNotEmptyString(input, 'token'); - this.repo = validator.getAsNotEmptyString(input, 'repo'); - this.owner = validator.getAsNotEmptyString(input, 'owner'); - this.branch = validator.getAsNotEmptyString(input, 'branch'); - this.entry = validator.getAsNotEmptyStringOrAsUndefined(input, 'entry'); - this.settings = validator.getAsObj(input, 'settings'); - this.settings.bookmarks = validator.getAsBool(input.settings, 'bookmarks'); - this.settings.charts = validator.getAsBool(input.settings, 'charts'); - this.settings.filters = validator.getAsBool(input.settings, 'filters'); - this.settings.comments = validator.getAsBool(input.settings, 'comments'); - } -} -export interface Request extends Interface {} - -@Define({ name: 'AddGitHubRepoResponse' }) -export class Response extends SignatureRequirement { - public error?: string; - public uuid?: string; - - constructor(input: { uuid?: string; error?: string }) { - super(); - validator.isObject(input); - this.uuid = validator.getAsNotEmptyStringOrAsUndefined(input, 'uuid'); - this.error = validator.getAsNotEmptyStringOrAsUndefined(input, 'error'); - } -} - -export interface Response extends Interface {} diff --git a/application/platform/ipc/request/github/checkupdates.ts b/application/platform/ipc/request/github/checkupdates.ts deleted file mode 100644 index aeb5f7f13c..0000000000 --- a/application/platform/ipc/request/github/checkupdates.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { Define, Interface, SignatureRequirement } from '../declarations'; - -import * as validator from '../../../env/obj'; - -@Define({ name: 'CheckFileMetaDataFromGitHubRepoRequest' }) -export class Request extends SignatureRequirement { - public checksum: string; - - constructor(input: { checksum: string }) { - super(); - validator.isObject(input); - this.checksum = validator.getAsNotEmptyString(input, 'checksum'); - } -} -export interface Request extends Interface {} - -@Define({ name: 'CheckFileMetaDataFromGitHubRepoResponse' }) -export class Response extends SignatureRequirement { - public error?: string; - public updated: boolean; - public exists: boolean; - constructor(input: { error?: string; updated: boolean; exists: boolean }) { - super(); - validator.isObject(input); - this.error = validator.getAsNotEmptyStringOrAsUndefined(input, 'error'); - this.updated = validator.getAsBool(input, 'updated'); - this.exists = validator.getAsBool(input, 'exists'); - } -} - -export interface Response extends Interface {} diff --git a/application/platform/ipc/request/github/getactive.ts b/application/platform/ipc/request/github/getactive.ts deleted file mode 100644 index 44dc6d0895..0000000000 --- a/application/platform/ipc/request/github/getactive.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { Define, Interface, SignatureRequirement } from '../declarations'; - -import * as validator from '../../../env/obj'; - -@Define({ name: 'GetActiveGitHubRepoRequest' }) -export class Request extends SignatureRequirement {} -export interface Request extends Interface {} - -@Define({ name: 'GetActiveGitHubRepoResponse' }) -export class Response extends SignatureRequirement { - public uuid: string | undefined; - - constructor(input: { uuid: string | undefined }) { - super(); - validator.isObject(input); - this.uuid = validator.getAsNotEmptyStringOrAsUndefined(input, 'uuid'); - } -} - -export interface Response extends Interface {} diff --git a/application/platform/ipc/request/github/getfilemeta.ts b/application/platform/ipc/request/github/getfilemeta.ts deleted file mode 100644 index 3290049468..0000000000 --- a/application/platform/ipc/request/github/getfilemeta.ts +++ /dev/null @@ -1,42 +0,0 @@ -import { Define, Interface, SignatureRequirement } from '../declarations'; -import { FileMetaDataDefinition } from '../../../types/github/filemetadata'; - -import * as validator from '../../../env/obj'; - -@Define({ name: 'GetFileMetaDataFromGitHubRepoRequest' }) -export class Request extends SignatureRequirement { - public checksum: string; - public sha?: string; - - constructor(input: { checksum: string; sha?: string }) { - super(); - validator.isObject(input); - this.checksum = validator.getAsNotEmptyString(input, 'checksum'); - this.sha = validator.getAsNotEmptyStringOrAsUndefined(input, 'sha'); - } -} -export interface Request extends Interface {} - -@Define({ name: 'GetFileMetaDataFromGitHubRepoResponse' }) -export class Response extends SignatureRequirement { - public error?: string; - public exists: boolean; - public metadata?: FileMetaDataDefinition; - public sha?: string; - - constructor(input: { - metadata?: FileMetaDataDefinition; - exists: boolean; - error?: string; - sha?: string; - }) { - super(); - validator.isObject(input); - this.exists = validator.getAsBool(input, 'exists'); - this.error = validator.getAsNotEmptyStringOrAsUndefined(input, 'error'); - this.metadata = validator.getAsObjOrUndefined(input, 'metadata'); - this.sha = validator.getAsNotEmptyStringOrAsUndefined(input, 'sha'); - } -} - -export interface Response extends Interface {} diff --git a/application/platform/ipc/request/github/getrepos.ts b/application/platform/ipc/request/github/getrepos.ts deleted file mode 100644 index 8a35fe0b6c..0000000000 --- a/application/platform/ipc/request/github/getrepos.ts +++ /dev/null @@ -1,26 +0,0 @@ -import { Define, Interface, SignatureRequirement } from '../declarations'; -import { GitHubRepo, validateGitHubRepo } from '../../../types/github'; - -import * as validator from '../../../env/obj'; - -@Define({ name: 'GetGitHubReposRequest' }) -export class Request extends SignatureRequirement { - constructor() { - super(); - } -} -export interface Request extends Interface {} - -@Define({ name: 'GetGitHubRepoResponse' }) -export class Response extends SignatureRequirement { - public repos: GitHubRepo[]; - - constructor(input: { repos: GitHubRepo[] }) { - super(); - validator.isObject(input); - this.repos = validator.getAsArray(input, 'repos'); - this.repos.forEach((repo) => validateGitHubRepo(repo)); - } -} - -export interface Response extends Interface {} diff --git a/application/platform/ipc/request/github/getusername.ts b/application/platform/ipc/request/github/getusername.ts deleted file mode 100644 index 7a27fc302a..0000000000 --- a/application/platform/ipc/request/github/getusername.ts +++ /dev/null @@ -1,22 +0,0 @@ -import { Define, Interface, SignatureRequirement } from '../declarations'; - -import * as validator from '../../../env/obj'; - -@Define({ name: 'GetCurrentUserNameByTokenRequest' }) -export class Request extends SignatureRequirement {} -export interface Request extends Interface {} - -@Define({ name: 'GetCurrentUserNameByTokenResponse' }) -export class Response extends SignatureRequirement { - public error?: string; - public username?: string; - - constructor(input: { username?: string; error?: string }) { - super(); - validator.isObject(input); - this.username = validator.getAsNotEmptyStringOrAsUndefined(input, 'username'); - this.error = validator.getAsNotEmptyStringOrAsUndefined(input, 'error'); - } -} - -export interface Response extends Interface {} diff --git a/application/platform/ipc/request/github/index.ts b/application/platform/ipc/request/github/index.ts deleted file mode 100644 index 2a1a965e54..0000000000 --- a/application/platform/ipc/request/github/index.ts +++ /dev/null @@ -1,10 +0,0 @@ -export * as AddRepo from './addrepo'; -export * as UpdateRepo from './updaterepo'; -export * as RemoveRepo from './removerepo'; -export * as SetActive from './setactive'; -export * as GetActive from './getactive'; -export * as GetRepos from './getrepos'; -export * as GetFileMeta from './getfilemeta'; -export * as SetFileMeta from './setfilemeta'; -export * as GetUserName from './getusername'; -export * as CheckUpdates from './checkupdates'; diff --git a/application/platform/ipc/request/github/removerepo.ts b/application/platform/ipc/request/github/removerepo.ts deleted file mode 100644 index 0cf5c7d6f1..0000000000 --- a/application/platform/ipc/request/github/removerepo.ts +++ /dev/null @@ -1,28 +0,0 @@ -import { Define, Interface, SignatureRequirement } from '../declarations'; - -import * as validator from '../../../env/obj'; - -@Define({ name: 'RemoveGitHubRepoRequest' }) -export class Request extends SignatureRequirement { - public uuid: string; - - constructor(input: { uuid: string }) { - super(); - validator.isObject(input); - this.uuid = validator.getAsNotEmptyString(input, 'uuid'); - } -} -export interface Request extends Interface {} - -@Define({ name: 'RemoveGitHubRepoResponse' }) -export class Response extends SignatureRequirement { - public error?: string; - - constructor(input: { error?: string }) { - super(); - validator.isObject(input); - this.error = validator.getAsNotEmptyStringOrAsUndefined(input, 'error'); - } -} - -export interface Response extends Interface {} diff --git a/application/platform/ipc/request/github/setactive.ts b/application/platform/ipc/request/github/setactive.ts deleted file mode 100644 index f35f61e1f9..0000000000 --- a/application/platform/ipc/request/github/setactive.ts +++ /dev/null @@ -1,28 +0,0 @@ -import { Define, Interface, SignatureRequirement } from '../declarations'; - -import * as validator from '../../../env/obj'; - -@Define({ name: 'SetActiveGitHubRepoRequest' }) -export class Request extends SignatureRequirement { - public uuid: string; - - constructor(input: { uuid: string | undefined }) { - super(); - validator.isObject(input); - this.uuid = validator.getAsNotEmptyStringOrAsUndefined(input, 'uuid'); - } -} -export interface Request extends Interface {} - -@Define({ name: 'SetActiveGitHubRepoResponse' }) -export class Response extends SignatureRequirement { - public error?: string; - - constructor(input: { error?: string }) { - super(); - validator.isObject(input); - this.error = validator.getAsNotEmptyStringOrAsUndefined(input, 'error'); - } -} - -export interface Response extends Interface {} diff --git a/application/platform/ipc/request/github/setfilemeta.ts b/application/platform/ipc/request/github/setfilemeta.ts deleted file mode 100644 index a292494af8..0000000000 --- a/application/platform/ipc/request/github/setfilemeta.ts +++ /dev/null @@ -1,39 +0,0 @@ -import { Define, Interface, SignatureRequirement } from '../declarations'; -import { FileMetaDataDefinition } from '../../../types/github/filemetadata'; - -import * as validator from '../../../env/obj'; - -@Define({ name: 'SetFileMetaDataFromGitHubRepoRequest' }) -export class Request extends SignatureRequirement { - public checksum: string; - public metadata: FileMetaDataDefinition; - public sha: string | undefined; - - constructor(input: { - metadata: FileMetaDataDefinition; - checksum: string; - sha: string | undefined; - }) { - super(); - validator.isObject(input); - this.checksum = validator.getAsNotEmptyString(input, 'checksum'); - this.sha = validator.getAsNotEmptyStringOrAsUndefined(input, 'sha'); - this.metadata = validator.getAsObj(input, 'metadata'); - } -} -export interface Request extends Interface {} - -@Define({ name: 'SetFileMetaDataFromGitHubRepoResponse' }) -export class Response extends SignatureRequirement { - public error?: string; - public sha: string | undefined; - - constructor(input: { error?: string; sha: string | undefined }) { - super(); - validator.isObject(input); - this.sha = validator.getAsNotEmptyStringOrAsUndefined(input, 'sha'); - this.error = validator.getAsNotEmptyStringOrAsUndefined(input, 'error'); - } -} - -export interface Response extends Interface {} diff --git a/application/platform/ipc/request/github/updaterepo.ts b/application/platform/ipc/request/github/updaterepo.ts deleted file mode 100644 index de9a2599d3..0000000000 --- a/application/platform/ipc/request/github/updaterepo.ts +++ /dev/null @@ -1,53 +0,0 @@ -import { Define, Interface, SignatureRequirement } from '../declarations'; -import { SharingSettings } from '../../../types/github'; - -import * as validator from '../../../env/obj'; - -@Define({ name: 'UpdateGitHubRepoRequest' }) -export class Request extends SignatureRequirement { - public uuid: string; - public owner: string; - public repo: string; - public token: string; - public branch: string; - public entry: string | undefined; - public settings: SharingSettings; - - constructor(input: { - branch: string; - uuid: string; - token: string; - repo: string; - owner: string; - entry: string | undefined; - settings: SharingSettings; - }) { - super(); - validator.isObject(input); - this.uuid = validator.getAsNotEmptyString(input, 'uuid'); - this.token = validator.getAsNotEmptyString(input, 'token'); - this.repo = validator.getAsNotEmptyString(input, 'repo'); - this.owner = validator.getAsNotEmptyString(input, 'owner'); - this.branch = validator.getAsNotEmptyString(input, 'branch'); - this.entry = validator.getAsNotEmptyStringOrAsUndefined(input, 'entry'); - this.settings = validator.getAsObj(input, 'settings'); - this.settings.bookmarks = validator.getAsBool(input.settings, 'bookmarks'); - this.settings.charts = validator.getAsBool(input.settings, 'charts'); - this.settings.filters = validator.getAsBool(input.settings, 'filters'); - this.settings.comments = validator.getAsBool(input.settings, 'comments'); - } -} -export interface Request extends Interface {} - -@Define({ name: 'UpdateGitHubRepoResponse' }) -export class Response extends SignatureRequirement { - public error?: string; - - constructor(input: { error?: string }) { - super(); - validator.isObject(input); - this.error = validator.getAsNotEmptyStringOrAsUndefined(input, 'error'); - } -} - -export interface Response extends Interface {} diff --git a/application/platform/ipc/request/hotkey/index.ts b/application/platform/ipc/request/hotkey/index.ts deleted file mode 100644 index 286dfd6ca2..0000000000 --- a/application/platform/ipc/request/hotkey/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * as On from './on'; -export * as Off from './off'; diff --git a/application/platform/ipc/request/hotkey/off.ts b/application/platform/ipc/request/hotkey/off.ts deleted file mode 100644 index f5659d83bd..0000000000 --- a/application/platform/ipc/request/hotkey/off.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { Define, Interface, SignatureRequirement } from '../declarations'; - -import * as validator from '../../../env/obj'; - -@Define({ name: 'StopListeningHotkeysRequest' }) -export class Request extends SignatureRequirement {} -export interface Request extends Interface {} - -@Define({ name: 'StopListeningHotkeysResponse' }) -export class Response extends SignatureRequirement { - public error: string | undefined; - - constructor(input: { error?: string }) { - super(); - validator.isObject(input); - this.error = validator.getAsNotEmptyStringOrAsUndefined(input, 'error'); - } -} - -export interface Response extends Interface {} diff --git a/application/platform/ipc/request/hotkey/on.ts b/application/platform/ipc/request/hotkey/on.ts deleted file mode 100644 index f00e0d693e..0000000000 --- a/application/platform/ipc/request/hotkey/on.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { Define, Interface, SignatureRequirement } from '../declarations'; - -import * as validator from '../../../env/obj'; - -@Define({ name: 'StartListeningHotkeysRequest' }) -export class Request extends SignatureRequirement {} -export interface Request extends Interface {} - -@Define({ name: 'StartListeningHotkeysResponse' }) -export class Response extends SignatureRequirement { - public error: string | undefined; - - constructor(input: { error?: string }) { - super(); - validator.isObject(input); - this.error = validator.getAsNotEmptyStringOrAsUndefined(input, 'error'); - } -} - -export interface Response extends Interface {} diff --git a/application/platform/ipc/request/index.ts b/application/platform/ipc/request/index.ts deleted file mode 100644 index 1d074a24bf..0000000000 --- a/application/platform/ipc/request/index.ts +++ /dev/null @@ -1,24 +0,0 @@ -export { IpcRequest, InjectLogger } from './declarations'; -export * as Session from './session'; -export * as File from './file'; -export * as Stream from './stream'; -export * as Dlt from './dlt'; -export * as Someip from './someip'; -export * as Search from './search'; -export * as Storage from './storage'; -export * as Os from './os'; -export * as Action from './action'; -export * as Serial from './serial'; -export * as Observe from './observe'; -export * as Cwd from './cwd'; -export * as Env from './env'; -export * as Hotkey from './hotkey'; -export * as Cli from './cli'; -export * as Actions from './actions'; -export * as Folder from './folder'; -export * as App from './app'; -export * as Settings from './settings'; -export * as System from './system'; -export * as Values from './values'; -export * as GitHub from './github'; -export * as Plugins from './plugins'; diff --git a/application/platform/ipc/request/observe/abort.ts b/application/platform/ipc/request/observe/abort.ts deleted file mode 100644 index a31324a028..0000000000 --- a/application/platform/ipc/request/observe/abort.ts +++ /dev/null @@ -1,33 +0,0 @@ -import { Define, Interface, SignatureRequirement } from '../declarations'; - -import * as validator from '../../../env/obj'; - -@Define({ name: 'ObserveAbortRequest' }) -export class Request extends SignatureRequirement { - public session: string; - public operation: string; - - constructor(input: { session: string; operation: string }) { - super(); - validator.isObject(input); - this.session = validator.getAsNotEmptyString(input, 'session'); - this.operation = validator.getAsNotEmptyString(input, 'operation'); - } -} - -export interface Request extends Interface {} - -@Define({ name: 'ObserveAbortResponse' }) -export class Response extends SignatureRequirement { - public session: string; - public error?: string; - - constructor(input: { session: string; error?: string }) { - super(); - validator.isObject(input); - this.session = validator.getAsNotEmptyString(input, 'session'); - this.error = validator.getAsNotEmptyStringOrAsUndefined(input, 'error'); - } -} - -export interface Response extends Interface {} diff --git a/application/platform/ipc/request/observe/index.ts b/application/platform/ipc/request/observe/index.ts deleted file mode 100644 index da1b3030fb..0000000000 --- a/application/platform/ipc/request/observe/index.ts +++ /dev/null @@ -1,5 +0,0 @@ -export * as List from './list'; -export * as Abort from './abort'; -export * as SDE from './sde'; -export * as SourcesDefinitionsList from './sources'; -export * as Start from './start'; diff --git a/application/platform/ipc/request/observe/list.ts b/application/platform/ipc/request/observe/list.ts deleted file mode 100644 index f1685d68b9..0000000000 --- a/application/platform/ipc/request/observe/list.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { Define, Interface, SignatureRequirement } from '../declarations'; - -import * as validator from '../../../env/obj'; - -@Define({ name: 'ObserveListRequest' }) -export class Request extends SignatureRequirement { - public session: string; - - constructor(input: { session: string }) { - super(); - validator.isObject(input); - this.session = validator.getAsNotEmptyString(input, 'session'); - } -} - -export interface Request extends Interface {} - -@Define({ name: 'ObserveListResponse' }) -export class Response extends SignatureRequirement { - public session: string; - public sources: { [key: string]: string }; - - constructor(input: { session: string; sources: { [key: string]: string } }) { - super(); - validator.isObject(input); - this.session = validator.getAsNotEmptyString(input, 'session'); - this.sources = validator.getAsObj(input, 'sources'); - } -} - -export interface Response extends Interface {} diff --git a/application/platform/ipc/request/observe/sde.ts b/application/platform/ipc/request/observe/sde.ts deleted file mode 100644 index 18eba68330..0000000000 --- a/application/platform/ipc/request/observe/sde.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { Define, Interface, SignatureRequirement } from '../declarations'; -import { SdeRequest, SdeResponse } from '../../../types/sde'; - -import * as validator from '../../../env/obj'; - -@Define({ name: 'SDERequest' }) -export class Request extends SignatureRequirement { - public session: string; - public operation: string; - public request: SdeRequest; - - constructor(input: { session: string; operation: string; request: SdeRequest }) { - super(); - validator.isObject(input); - this.session = validator.getAsNotEmptyString(input, 'session'); - this.operation = validator.getAsNotEmptyString(input, 'operation'); - this.request = validator.getAsObj(input, 'request'); - } -} - -export interface Request extends Interface {} - -@Define({ name: 'SDEResponse' }) -export class Response extends SignatureRequirement { - public session: string; - public result?: SdeResponse; - public error?: string; - - constructor(input: { session: string; result?: SdeResponse; error?: string }) { - super(); - validator.isObject(input); - this.session = validator.getAsNotEmptyString(input, 'session'); - this.result = validator.getAsObjOrUndefined(input, 'result'); - this.error = validator.getAsNotEmptyStringOrAsUndefined(input, 'error'); - } -} - -export interface Response extends Interface {} diff --git a/application/platform/ipc/request/observe/sources.ts b/application/platform/ipc/request/observe/sources.ts deleted file mode 100644 index 9724bc1bf6..0000000000 --- a/application/platform/ipc/request/observe/sources.ts +++ /dev/null @@ -1,32 +0,0 @@ -import { Define, Interface, SignatureRequirement } from '../declarations'; -import { ISourceLink } from '../../../types/observe/types/index'; - -import * as validator from '../../../env/obj'; - -@Define({ name: 'SourcesListRequest' }) -export class Request extends SignatureRequirement { - public session: string; - - constructor(input: { session: string }) { - super(); - validator.isObject(input); - this.session = validator.getAsNotEmptyString(input, 'session'); - } -} - -export interface Request extends Interface {} - -@Define({ name: 'SourcesListResponse' }) -export class Response extends SignatureRequirement { - public session: string; - public sources: ISourceLink[]; - - constructor(input: { session: string; sources: ISourceLink[] }) { - super(); - validator.isObject(input); - this.session = validator.getAsNotEmptyString(input, 'session'); - this.sources = validator.getAsArray(input, 'sources'); - } -} - -export interface Response extends Interface {} diff --git a/application/platform/ipc/request/observe/start.ts b/application/platform/ipc/request/observe/start.ts deleted file mode 100644 index b7516aa7ac..0000000000 --- a/application/platform/ipc/request/observe/start.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { Define, Interface, SignatureRequirement } from '../declarations'; -import { IObserve, Observe } from '../../../types/observe/index'; - -import * as validator from '../../../env/obj'; - -@Define({ name: 'StartObserveRequest' }) -export class Request extends SignatureRequirement { - public session: string; - public observe: IObserve; - - constructor(input: { session: string; observe: IObserve }) { - super(); - validator.isObject(input); - this.session = validator.getAsNotEmptyString(input, 'session'); - this.observe = validator.getAsObj(input, 'observe'); - const error = Observe.validate(this.observe); - if (error instanceof Error) { - throw error; - } - } -} - -export interface Request extends Interface {} - -@Define({ name: 'StartObserveResponse' }) -export class Response extends SignatureRequirement { - public session: string; - public error?: string; - - constructor(input: { session: string; error?: string }) { - super(); - validator.isObject(input); - this.session = validator.getAsNotEmptyString(input, 'session'); - this.error = validator.getAsNotEmptyStringOrAsUndefined(input, 'error'); - } -} - -export interface Response extends Interface {} diff --git a/application/platform/ipc/request/os/entity.ts b/application/platform/ipc/request/os/entity.ts deleted file mode 100644 index 5bcd93d415..0000000000 --- a/application/platform/ipc/request/os/entity.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { Define, Interface, SignatureRequirement } from '../declarations'; -import { Entity } from '../../../types/files'; - -import * as validator from '../../../env/obj'; - -@Define({ name: 'AsFSEntityRequest' }) -export class Request extends SignatureRequirement { - public path: string; - - constructor(input: { path: string }) { - super(); - validator.isObject(input); - this.path = validator.getAsNotEmptyString(input, 'path'); - } -} -export interface Request extends Interface {} - -@Define({ name: 'AsFSEntityResponse' }) -export class Response extends SignatureRequirement { - public entity: Entity | undefined; - public error: string | undefined; - - constructor(input: { entity?: Entity; error?: string }) { - super(); - validator.isObject(input); - this.entity = validator.getAsObjOrUndefined(input, 'entity'); - this.error = validator.getAsNotEmptyStringOrAsUndefined(input, 'error'); - } -} - -export interface Response extends Interface {} diff --git a/application/platform/ipc/request/os/homedir.ts b/application/platform/ipc/request/os/homedir.ts deleted file mode 100644 index d017a2bf8d..0000000000 --- a/application/platform/ipc/request/os/homedir.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { Define, Interface, SignatureRequirement } from '../declarations'; - -import * as validator from '../../../env/obj'; - -@Define({ name: 'OSHomeDirRequest' }) -export class Request extends SignatureRequirement {} -export interface Request extends Interface {} - -@Define({ name: 'OSHomeDirResponse' }) -export class Response extends SignatureRequirement { - public path: string; - - constructor(input: { path: string }) { - super(); - validator.isObject(input); - this.path = validator.getAsString(input, 'path'); - } -} - -export interface Response extends Interface {} diff --git a/application/platform/ipc/request/os/index.ts b/application/platform/ipc/request/os/index.ts deleted file mode 100644 index 33027042df..0000000000 --- a/application/platform/ipc/request/os/index.ts +++ /dev/null @@ -1,4 +0,0 @@ -export * as List from './list'; -export * as AsFSEntity from './entity'; -export * as HomeDir from './homedir'; -export * as Shells from './shells'; diff --git a/application/platform/ipc/request/os/list.ts b/application/platform/ipc/request/os/list.ts deleted file mode 100644 index d4eb87453e..0000000000 --- a/application/platform/ipc/request/os/list.ts +++ /dev/null @@ -1,44 +0,0 @@ -import { Define, Interface, SignatureRequirement } from '../declarations'; -import { FolderEntity } from '../../../types/bindings'; - -import * as validator from '../../../env/obj'; - -@Define({ name: 'ListFilesAndFoldersRequest' }) -export class Request extends SignatureRequirement { - public paths: string[]; - public depth: number; - public max: number; - public include: { files: boolean; folders: boolean }; - - constructor(input: { - paths: string[]; - depth: number; - max: number; - include: { files: boolean; folders: boolean }; - }) { - super(); - validator.isObject(input); - this.paths = validator.getAsArrayOfNotEmptyString(input, 'paths'); - this.depth = validator.getAsValidNumber(input, 'depth'); - this.max = validator.getAsValidNumber(input, 'max'); - this.include = validator.getAsObj(input, 'include'); - this.include.files = validator.getAsBool(this.include, 'files'); - this.include.folders = validator.getAsBool(this.include, 'folders'); - } -} -export interface Request extends Interface {} - -@Define({ name: 'ListFilesAndFoldersResponse' }) -export class Response extends SignatureRequirement { - public entities: FolderEntity[]; - public max: boolean; - - constructor(input: { entities: FolderEntity[]; max: boolean }) { - super(); - validator.isObject(input); - this.entities = validator.getAsArray(input, 'entities'); - this.max = validator.getAsBool(input, 'max'); - } -} - -export interface Response extends Interface {} diff --git a/application/platform/ipc/request/os/shells.ts b/application/platform/ipc/request/os/shells.ts deleted file mode 100644 index e24c06c7d4..0000000000 --- a/application/platform/ipc/request/os/shells.ts +++ /dev/null @@ -1,21 +0,0 @@ -import { Define, Interface, SignatureRequirement } from '../declarations'; -import { ShellProfile } from '../../../types/bindings'; - -import * as validator from '../../../env/obj'; - -@Define({ name: 'ShellProfilesListRequest' }) -export class Request extends SignatureRequirement {} -export interface Request extends Interface {} - -@Define({ name: 'ShellProfilesListResponse' }) -export class Response extends SignatureRequirement { - public shells: ShellProfile[]; - - constructor(input: { shells: ShellProfile[] }) { - super(); - validator.isObject(input); - this.shells = validator.getAsArray(input, 'shells'); - } -} - -export interface Response extends Interface {} diff --git a/application/platform/ipc/request/plugins/add_plugin.ts b/application/platform/ipc/request/plugins/add_plugin.ts deleted file mode 100644 index 2de0b24e19..0000000000 --- a/application/platform/ipc/request/plugins/add_plugin.ts +++ /dev/null @@ -1,28 +0,0 @@ -import { Define, Interface, SignatureRequirement } from '../declarations'; - -import * as validator from '../../../env/obj'; - -@Define({ name: 'AddPluginRequest' }) -export class Request extends SignatureRequirement { - public pluginPath: string; - - constructor(input: { pluginPath: string }) { - super(); - validator.isObject(input); - this.pluginPath = validator.getAsNotEmptyString(input, 'pluginPath'); - } -} -export interface Request extends Interface {} - -@Define({ name: 'AddPluginResponse' }) -export class Response extends SignatureRequirement { - public error?: string; - - constructor(input: { error?: string }) { - super(); - validator.isObject(input); - this.error = validator.getAsNotEmptyStringOrAsUndefined(input, 'error'); - } -} - -export interface Response extends Interface {} diff --git a/application/platform/ipc/request/plugins/index.ts b/application/platform/ipc/request/plugins/index.ts deleted file mode 100644 index 8b3ad35452..0000000000 --- a/application/platform/ipc/request/plugins/index.ts +++ /dev/null @@ -1,10 +0,0 @@ -export * as ListInstalled from './list_installed'; -export * as ListInvalid from './list_invalid'; -export * as ListInstalledPaths from './list_installed_paths'; -export * as ListInvalidPaths from './list_invalid_paths'; -export * as InstalledPluginInfo from './installed_plugin_info'; -export * as InvalidPluginInfo from './invalid_plugin_info'; -export * as PluginRunData from './rundata'; -export * as Reload from './reload'; -export * as AddPlugin from './add_plugin'; -export * as RemovePlugin from './remove_plugin'; diff --git a/application/platform/ipc/request/plugins/installed_plugin_info.ts b/application/platform/ipc/request/plugins/installed_plugin_info.ts deleted file mode 100644 index 86bc833c35..0000000000 --- a/application/platform/ipc/request/plugins/installed_plugin_info.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { Define, Interface, SignatureRequirement } from '../declarations'; - -import * as validator from '../../../env/obj'; -import { PluginEntity } from '../../../types/bindings/plugins'; - -@Define({ name: 'InstalledPluginInfoRequest' }) -export class Request extends SignatureRequirement { - public pluginPath: string; - - constructor(input: { pluginPath: string }) { - super(); - validator.isObject(input); - this.pluginPath = validator.getAsNotEmptyString(input, 'pluginPath'); - } -} -export interface Request extends Interface {} - -@Define({ name: 'InstalledPluginInfoResponse' }) -export class Response extends SignatureRequirement { - public plugin: PluginEntity | undefined; - - constructor(input: { plugin?: PluginEntity }) { - super(); - validator.isObject(input); - this.plugin = validator.getAsObjOrUndefined(input, 'plugin'); - } -} - -export interface Response extends Interface {} diff --git a/application/platform/ipc/request/plugins/invalid_plugin_info.ts b/application/platform/ipc/request/plugins/invalid_plugin_info.ts deleted file mode 100644 index 57f815e7f8..0000000000 --- a/application/platform/ipc/request/plugins/invalid_plugin_info.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { Define, Interface, SignatureRequirement } from '../declarations'; - -import * as validator from '../../../env/obj'; -import { InvalidPluginEntity } from '../../../types/bindings/plugins'; - -@Define({ name: 'InvalidPluginInfoRequest' }) -export class Request extends SignatureRequirement { - public pluginPath: string; - - constructor(input: { pluginPath: string }) { - super(); - validator.isObject(input); - this.pluginPath = validator.getAsNotEmptyString(input, 'pluginPath'); - } -} -export interface Request extends Interface {} - -@Define({ name: 'InvalidPluginInfoResponse' }) -export class Response extends SignatureRequirement { - public invalidPlugin: InvalidPluginEntity | undefined; - - constructor(input: { invalidPlugin?: InvalidPluginEntity }) { - super(); - validator.isObject(input); - this.invalidPlugin = validator.getAsObjOrUndefined(input, 'invalidPlugin'); - } -} - -export interface Response extends Interface {} diff --git a/application/platform/ipc/request/plugins/list_installed.ts b/application/platform/ipc/request/plugins/list_installed.ts deleted file mode 100644 index 876db2a494..0000000000 --- a/application/platform/ipc/request/plugins/list_installed.ts +++ /dev/null @@ -1,22 +0,0 @@ -import { Define, Interface, SignatureRequirement } from '../declarations'; - -import * as validator from '../../../env/obj'; - -import { PluginEntity } from '../../../types/bindings/plugins'; - -@Define({ name: 'ListInstalledPluginsRequest' }) -export class Request extends SignatureRequirement {} -export interface Request extends Interface {} - -@Define({ name: 'ListInstalledPluginsResponse' }) -export class Response extends SignatureRequirement { - public plugins: PluginEntity[]; - - constructor(input: { plugins: PluginEntity[] }) { - super(); - validator.isObject(input); - this.plugins = validator.getAsArray(input, 'plugins'); - } -} - -export interface Response extends Interface {} diff --git a/application/platform/ipc/request/plugins/list_installed_paths.ts b/application/platform/ipc/request/plugins/list_installed_paths.ts deleted file mode 100644 index 3c964aea02..0000000000 --- a/application/platform/ipc/request/plugins/list_installed_paths.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { Define, Interface, SignatureRequirement } from '../declarations'; - -import * as validator from '../../../env/obj'; - -@Define({ name: 'ListInstalledPluginsPathsRequest' }) -export class Request extends SignatureRequirement {} -export interface Request extends Interface {} - -@Define({ name: 'ListInstalledPluginsPathsResponse' }) -export class Response extends SignatureRequirement { - public paths: string[]; - - constructor(input: { paths: string[] }) { - super(); - validator.isObject(input); - this.paths = validator.getAsArray(input, 'paths'); - } -} - -export interface Response extends Interface {} diff --git a/application/platform/ipc/request/plugins/list_invalid.ts b/application/platform/ipc/request/plugins/list_invalid.ts deleted file mode 100644 index f3cad26f3e..0000000000 --- a/application/platform/ipc/request/plugins/list_invalid.ts +++ /dev/null @@ -1,22 +0,0 @@ -import { Define, Interface, SignatureRequirement } from '../declarations'; - -import * as validator from '../../../env/obj'; - -import { InvalidPluginEntity } from '../../../types/bindings/plugins'; - -@Define({ name: 'ListInvalidPluginsRequest' }) -export class Request extends SignatureRequirement {} -export interface Request extends Interface {} - -@Define({ name: 'ListInvalidPluginsResponse' }) -export class Response extends SignatureRequirement { - public invalidPlugins: InvalidPluginEntity[]; - - constructor(input: { invalidPlugins: InvalidPluginEntity[] }) { - super(); - validator.isObject(input); - this.invalidPlugins = validator.getAsArray(input, 'invalidPlugins'); - } -} - -export interface Response extends Interface {} diff --git a/application/platform/ipc/request/plugins/list_invalid_paths.ts b/application/platform/ipc/request/plugins/list_invalid_paths.ts deleted file mode 100644 index ba8826fae9..0000000000 --- a/application/platform/ipc/request/plugins/list_invalid_paths.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { Define, Interface, SignatureRequirement } from '../declarations'; - -import * as validator from '../../../env/obj'; - -@Define({ name: 'ListInvalidPluginsPathsRequest' }) -export class Request extends SignatureRequirement {} -export interface Request extends Interface {} - -@Define({ name: 'ListInvalidPluginsPathsResponse' }) -export class Response extends SignatureRequirement { - public paths: string[]; - - constructor(input: { paths: string[] }) { - super(); - validator.isObject(input); - this.paths = validator.getAsArray(input, 'paths'); - } -} - -export interface Response extends Interface {} diff --git a/application/platform/ipc/request/plugins/reload.ts b/application/platform/ipc/request/plugins/reload.ts deleted file mode 100644 index e4d1c686f1..0000000000 --- a/application/platform/ipc/request/plugins/reload.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { Define, Interface, SignatureRequirement } from '../declarations'; - -import * as validator from '../../../env/obj'; - -@Define({ name: 'RelaodPluginsRequest' }) -export class Request extends SignatureRequirement {} -export interface Request extends Interface {} - -@Define({ name: 'RelaodPluginsRespond' }) -export class Response extends SignatureRequirement { - public error?: string; - - constructor(input: { error?: string }) { - super(); - validator.isObject(input); - this.error = validator.getAsNotEmptyStringOrAsUndefined(input, 'error'); - } -} - -export interface Response extends Interface {} diff --git a/application/platform/ipc/request/plugins/remove_plugin.ts b/application/platform/ipc/request/plugins/remove_plugin.ts deleted file mode 100644 index f3d87f59a5..0000000000 --- a/application/platform/ipc/request/plugins/remove_plugin.ts +++ /dev/null @@ -1,28 +0,0 @@ -import { Define, Interface, SignatureRequirement } from '../declarations'; - -import * as validator from '../../../env/obj'; - -@Define({ name: 'RemovePluginRequest' }) -export class Request extends SignatureRequirement { - public pluginPath: string; - - constructor(input: { pluginPath: string }) { - super(); - validator.isObject(input); - this.pluginPath = validator.getAsNotEmptyString(input, 'pluginPath'); - } -} -export interface Request extends Interface {} - -@Define({ name: 'RemovePluginResponse' }) -export class Response extends SignatureRequirement { - public error?: string; - - constructor(input: { error?: string }) { - super(); - validator.isObject(input); - this.error = validator.getAsNotEmptyStringOrAsUndefined(input, 'error'); - } -} - -export interface Response extends Interface {} diff --git a/application/platform/ipc/request/plugins/rundata.ts b/application/platform/ipc/request/plugins/rundata.ts deleted file mode 100644 index 4d1f7b8cda..0000000000 --- a/application/platform/ipc/request/plugins/rundata.ts +++ /dev/null @@ -1,30 +0,0 @@ -import { Define, Interface, SignatureRequirement } from '../declarations'; - -import * as validator from '../../../env/obj'; - -import { PluginRunData } from '../../../types/bindings/plugins'; - -@Define({ name: 'PluginRunDataRequest' }) -export class Request extends SignatureRequirement { - public pluginPath: string; - - constructor(input: { pluginPath: string }) { - super(); - validator.isObject(input); - this.pluginPath = validator.getAsNotEmptyString(input, 'pluginPath'); - } -} -export interface Request extends Interface {} - -@Define({ name: 'PluginRunDataResponse' }) -export class Response extends SignatureRequirement { - public data: PluginRunData | undefined; - - constructor(input: { data?: PluginRunData }) { - super(); - validator.isObject(input); - this.data = validator.getAsObjOrUndefined(input, 'data'); - } -} - -export interface Response extends Interface {} diff --git a/application/platform/ipc/request/search/drop.ts b/application/platform/ipc/request/search/drop.ts deleted file mode 100644 index a4a13a5093..0000000000 --- a/application/platform/ipc/request/search/drop.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { Define, Interface, SignatureRequirement } from '../declarations'; - -import * as validator from '../../../env/obj'; - -@Define({ name: 'SearchDropRequest' }) -export class Request extends SignatureRequirement { - public session: string; - - constructor(input: { session: string }) { - super(); - validator.isObject(input); - this.session = validator.getAsNotEmptyString(input, 'session'); - } -} - -export interface Request extends Interface {} - -@Define({ name: 'SearchDropResponse' }) -export class Response extends SignatureRequirement { - public session: string; - - constructor(input: { session: string }) { - super(); - validator.isObject(input); - this.session = validator.getAsNotEmptyString(input, 'session'); - } -} - -export interface Response extends Interface {} diff --git a/application/platform/ipc/request/search/index.ts b/application/platform/ipc/request/search/index.ts deleted file mode 100644 index f7f3a3da17..0000000000 --- a/application/platform/ipc/request/search/index.ts +++ /dev/null @@ -1,5 +0,0 @@ -export * as Search from './search'; -export * as Drop from './drop'; -export * as Nearest from './nearest'; -export * as Map from './map'; -export * as NextNested from './next_nested'; diff --git a/application/platform/ipc/request/search/map.ts b/application/platform/ipc/request/search/map.ts deleted file mode 100644 index fbc921fa7a..0000000000 --- a/application/platform/ipc/request/search/map.ts +++ /dev/null @@ -1,47 +0,0 @@ -import { Define, Interface, SignatureRequirement } from '../declarations'; -import { ISearchMap } from '../../../types/filter'; - -import * as validator from '../../../env/obj'; - -@Define({ name: 'MapRequest' }) -export class Request extends SignatureRequirement { - public session: string; - public len: number; - public from?: number; - public to?: number; - - constructor(input: { - session: string; - len: number; - from: number | undefined; - to: number | undefined; - }) { - super(); - validator.isObject(input); - this.session = validator.getAsNotEmptyString(input, 'session'); - this.len = validator.getAsValidNumber(input, 'len'); - this.from = validator.getAsValidNumberOrUndefined(input, 'from'); - this.to = validator.getAsValidNumberOrUndefined(input, 'to'); - } -} - -export interface Request extends Interface {} - -@Define({ name: 'MapResponse' }) -export class Response extends SignatureRequirement { - public session: string; - public map: ISearchMap; - public from: number; - public to: number; - - constructor(input: { session: string; map: ISearchMap; from: number; to: number }) { - super(); - validator.isObject(input); - this.session = validator.getAsNotEmptyString(input, 'session'); - this.map = validator.getAsArray(input, 'map'); - this.from = validator.getAsValidNumber(input, 'from'); - this.to = validator.getAsValidNumber(input, 'to'); - } -} - -export interface Response extends Interface {} diff --git a/application/platform/ipc/request/search/nearest.ts b/application/platform/ipc/request/search/nearest.ts deleted file mode 100644 index 5f765bc273..0000000000 --- a/application/platform/ipc/request/search/nearest.ts +++ /dev/null @@ -1,34 +0,0 @@ -import { Define, Interface, SignatureRequirement } from '../declarations'; -import { NearestPosition } from '../../../types/bindings'; - -import * as validator from '../../../env/obj'; - -@Define({ name: 'NearestRequest' }) -export class Request extends SignatureRequirement { - public session: string; - public row: number; - - constructor(input: { session: string; row: number }) { - super(); - validator.isObject(input); - this.session = validator.getAsNotEmptyString(input, 'session'); - this.row = validator.getAsValidNumber(input, 'row'); - } -} - -export interface Request extends Interface {} - -@Define({ name: 'NearestResponse' }) -export class Response extends SignatureRequirement { - public session: string; - public nearest: NearestPosition | undefined; - - constructor(input: { session: string; nearest: NearestPosition | undefined }) { - super(); - validator.isObject(input); - this.session = validator.getAsNotEmptyString(input, 'session'); - this.nearest = validator.getAsObjOrUndefined(input, 'nearest'); - } -} - -export interface Response extends Interface {} diff --git a/application/platform/ipc/request/search/next_nested.ts b/application/platform/ipc/request/search/next_nested.ts deleted file mode 100644 index c15908477f..0000000000 --- a/application/platform/ipc/request/search/next_nested.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { Define, Interface, SignatureRequirement } from '../declarations'; -import { IFilter } from '../../../types/filter'; - -import * as validator from '../../../env/obj'; - -@Define({ name: 'SearchNextNestedRequest' }) -export class Request extends SignatureRequirement { - public session: string; - public filter: IFilter; - public from: number; - public rev: boolean; - - constructor(input: { session: string; filter: IFilter; from: number; rev: boolean }) { - super(); - validator.isObject(input); - this.session = validator.getAsNotEmptyString(input, 'session'); - this.filter = validator.getAsObj(input, 'filter'); - this.from = validator.getAsValidNumber(input, 'from'); - this.rev = validator.getAsBool(input, 'rev'); - } -} - -export interface Request extends Interface {} - -@Define({ name: 'SearchNextNestedResponse' }) -export class Response extends SignatureRequirement { - public session: string; - public pos: [number, number] | undefined; - - constructor(input: { session: string; pos: [number, number] | undefined }) { - super(); - validator.isObject(input); - this.session = validator.getAsNotEmptyString(input, 'session'); - this.pos = validator.getAsArrayOrUndefined(input, 'pos') as [number, number]; - } -} - -export interface Response extends Interface {} diff --git a/application/platform/ipc/request/search/search.ts b/application/platform/ipc/request/search/search.ts deleted file mode 100644 index 73bd017163..0000000000 --- a/application/platform/ipc/request/search/search.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { Define, Interface, SignatureRequirement } from '../declarations'; -import { IFilter } from '../../../types/filter'; - -import * as validator from '../../../env/obj'; - -@Define({ name: 'SearchRequest' }) -export class Request extends SignatureRequirement { - public session: string; - public filters: IFilter[]; - - constructor(input: { session: string; filters: IFilter[] }) { - super(); - validator.isObject(input); - this.session = validator.getAsNotEmptyString(input, 'session'); - this.filters = validator.getAsArray(input, 'filters'); - } -} - -export interface Request extends Interface {} - -@Define({ name: 'SearchResponse' }) -export class Response extends SignatureRequirement { - public session: string; - public found: number; - public canceled: boolean; - public error?: string; - - constructor(input: { session: string; found: number; canceled: boolean; error?: string }) { - super(); - validator.isObject(input); - this.session = validator.getAsNotEmptyString(input, 'session'); - this.found = validator.getAsValidNumber(input, 'found'); - this.canceled = validator.getAsBool(input, 'canceled'); - this.error = validator.getAsNotEmptyStringOrAsUndefined(input, 'error'); - } -} - -export interface Response extends Interface {} diff --git a/application/platform/ipc/request/serial/index.ts b/application/platform/ipc/request/serial/index.ts deleted file mode 100644 index f8810c707a..0000000000 --- a/application/platform/ipc/request/serial/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * as Ports from './ports'; diff --git a/application/platform/ipc/request/serial/ports.ts b/application/platform/ipc/request/serial/ports.ts deleted file mode 100644 index 98d3d3a9a6..0000000000 --- a/application/platform/ipc/request/serial/ports.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { Define, Interface, SignatureRequirement } from '../declarations'; -import * as validator from '../../../env/obj'; - -@Define({ name: 'SerialPortsRequest' }) -export class Request extends SignatureRequirement { - constructor() { - super(); - } -} -export interface Request extends Interface {} - -@Define({ name: 'SerialPortsResponse' }) -export class Response extends SignatureRequirement { - public ports: string[]; - - constructor(input: { ports: string[] }) { - super(); - validator.isObject(input); - this.ports = validator.getAsArray(input, 'ports'); - } -} - -export interface Response extends Interface {} diff --git a/application/platform/ipc/request/session/create.ts b/application/platform/ipc/request/session/create.ts deleted file mode 100644 index d5bb1c86b1..0000000000 --- a/application/platform/ipc/request/session/create.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { Define, Interface, SignatureRequirement } from '../declarations'; - -import * as validator from '../../../env/obj'; - -@Define({ name: 'SessionCreateRequest' }) -export class Request extends SignatureRequirement { - constructor(input: {}) { - super(); - validator.isObject(input); - } -} -export interface Request extends Interface {} - -@Define({ name: 'SessionCreateResponse' }) -export class Response extends SignatureRequirement { - public uuid: string; - - constructor(input: { uuid: string }) { - super(); - validator.isObject(input); - this.uuid = validator.getAsNotEmptyString(input, 'uuid'); - } -} - -export interface Response extends Interface {} diff --git a/application/platform/ipc/request/session/destroy.ts b/application/platform/ipc/request/session/destroy.ts deleted file mode 100644 index a3c04212df..0000000000 --- a/application/platform/ipc/request/session/destroy.ts +++ /dev/null @@ -1,30 +0,0 @@ -import { Define, Interface, SignatureRequirement } from '../declarations'; - -import * as validator from '../../../env/obj'; - -@Define({ name: 'SessionDestroyRequest' }) -export class Request extends SignatureRequirement { - public session: string; - - constructor(input: { session: string }) { - super(); - validator.isObject(input); - this.session = validator.getAsNotEmptyString(input, 'session'); - } -} -export interface Request extends Interface {} - -@Define({ name: 'SessionDestroyResponse' }) -export class Response extends SignatureRequirement { - public session: string; - public error?: string; - - constructor(input: { session: string; error?: string }) { - super(); - validator.isObject(input); - this.session = validator.getAsNotEmptyString(input, 'session'); - this.error = validator.getAsNotEmptyStringOrAsUndefined(input, 'error'); - } -} - -export interface Response extends Interface {} diff --git a/application/platform/ipc/request/session/export.raw.available.ts b/application/platform/ipc/request/session/export.raw.available.ts deleted file mode 100644 index 90fff29b84..0000000000 --- a/application/platform/ipc/request/session/export.raw.available.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { Define, Interface, SignatureRequirement } from '../declarations'; -import * as validator from '../../../env/obj'; - -@Define({ name: 'IsExportRawAvaialbleRequest' }) -export class Request extends SignatureRequirement { - public session: string; - - constructor(input: { session: string }) { - super(); - validator.isObject(input); - this.session = validator.getAsNotEmptyString(input, 'session'); - } -} -export interface Request extends Interface {} - -@Define({ name: 'IsExportRawAvaialbleResponse' }) -export class Response extends SignatureRequirement { - public error?: string; - public available: boolean; - - constructor(input: { available: boolean; error?: string }) { - super(); - validator.isObject(input); - this.error = validator.getAsNotEmptyStringOrAsUndefined(input, 'error'); - this.available = validator.getAsBool(input, 'available'); - } -} - -export interface Response extends Interface {} diff --git a/application/platform/ipc/request/session/export.raw.ts b/application/platform/ipc/request/session/export.raw.ts deleted file mode 100644 index 65bdb358d0..0000000000 --- a/application/platform/ipc/request/session/export.raw.ts +++ /dev/null @@ -1,34 +0,0 @@ -import { Define, Interface, SignatureRequirement } from '../declarations'; -import { IRange } from '../../../types/range'; -import * as validator from '../../../env/obj'; - -@Define({ name: 'SessionExportRawRequest' }) -export class Request extends SignatureRequirement { - public session: string; - public ranges: IRange[]; - public dest: string | undefined; - - constructor(input: { session: string; dest: string | undefined; ranges: IRange[] }) { - super(); - validator.isObject(input); - this.session = validator.getAsNotEmptyString(input, 'session'); - this.dest = validator.getAsNotEmptyStringOrAsUndefined(input, 'dest'); - this.ranges = validator.getAsArray(input, 'ranges'); - } -} -export interface Request extends Interface {} - -@Define({ name: 'SessionExportRawResponse' }) -export class Response extends SignatureRequirement { - public error?: string; - public filename: string | undefined; - - constructor(input: { filename: string | undefined; error?: string }) { - super(); - validator.isObject(input); - this.error = validator.getAsNotEmptyStringOrAsUndefined(input, 'error'); - this.filename = validator.getAsNotEmptyStringOrAsUndefined(input, 'filename'); - } -} - -export interface Response extends Interface {} diff --git a/application/platform/ipc/request/session/export.ts b/application/platform/ipc/request/session/export.ts deleted file mode 100644 index 6d623c9dcc..0000000000 --- a/application/platform/ipc/request/session/export.ts +++ /dev/null @@ -1,49 +0,0 @@ -import { Define, Interface, SignatureRequirement } from '../declarations'; -import { IRange } from '../../../types/range'; -import { TextExportOptions } from '../../../types/exporting'; - -import * as validator from '../../../env/obj'; - -@Define({ name: 'SessionExportRequest' }) -export class Request extends SignatureRequirement { - public session: string; - public ranges: IRange[]; - public dest: string | undefined; - public options: TextExportOptions; - - constructor(input: { - session: string; - dest: string | undefined; - ranges: IRange[]; - options: TextExportOptions; - }) { - super(); - validator.isObject(input); - this.session = validator.getAsNotEmptyString(input, 'session'); - this.dest = validator.getAsNotEmptyStringOrAsUndefined(input, 'dest'); - this.ranges = validator.getAsArray(input, 'ranges'); - this.options = validator.getAsObj(input, 'options'); - this.options.delimiter = validator.getAsNotEmptyStringOrAsUndefined( - this.options, - 'delimiter', - ); - this.options.spliter = validator.getAsNotEmptyStringOrAsUndefined(this.options, 'spliter'); - this.options.columns = validator.getAsArray(this.options, 'columns'); - } -} -export interface Request extends Interface {} - -@Define({ name: 'SessionExportResponse' }) -export class Response extends SignatureRequirement { - public error?: string; - public filename: string | undefined; - - constructor(input: { filename: string | undefined; error?: string }) { - super(); - validator.isObject(input); - this.error = validator.getAsNotEmptyStringOrAsUndefined(input, 'error'); - this.filename = validator.getAsNotEmptyStringOrAsUndefined(input, 'filename'); - } -} - -export interface Response extends Interface {} diff --git a/application/platform/ipc/request/session/index.ts b/application/platform/ipc/request/session/index.ts deleted file mode 100644 index be8b068f94..0000000000 --- a/application/platform/ipc/request/session/index.ts +++ /dev/null @@ -1,5 +0,0 @@ -export * as Create from './create'; -export * as Destroy from './destroy'; -export * as Export from './export'; -export * as ExportRaw from './export.raw'; -export * as IsExportRawAvailable from './export.raw.available'; diff --git a/application/platform/ipc/request/settings/entries.ts b/application/platform/ipc/request/settings/entries.ts deleted file mode 100644 index f7372656e6..0000000000 --- a/application/platform/ipc/request/settings/entries.ts +++ /dev/null @@ -1,21 +0,0 @@ -import { Define, Interface, SignatureRequirement } from '../declarations'; -import { ISettingsEntry } from '../../../types/settings/entry'; - -import * as validator from '../../../env/obj'; - -@Define({ name: 'SettingsEntriesRequest' }) -export class Request extends SignatureRequirement {} - -export interface Request extends Interface {} - -@Define({ name: 'SettingsEntriesResponse' }) -export class Response extends SignatureRequirement { - public entries: ISettingsEntry[]; - constructor(input: { entries: ISettingsEntry[] }) { - super(); - validator.isObject(input); - this.entries = validator.getAsArray(input, 'entries'); - } -} - -export interface Response extends Interface {} diff --git a/application/platform/ipc/request/settings/get.ts b/application/platform/ipc/request/settings/get.ts deleted file mode 100644 index b0cb36e493..0000000000 --- a/application/platform/ipc/request/settings/get.ts +++ /dev/null @@ -1,30 +0,0 @@ -import { Define, Interface, SignatureRequirement } from '../declarations'; - -import * as validator from '../../../env/obj'; - -@Define({ name: 'GetSettingValueRequest' }) -export class Request extends SignatureRequirement { - public path: string; - public key: string; - - constructor(input: { path: string; key: string }) { - super(); - validator.isObject(input); - this.path = validator.getAsNotEmptyString(input, 'path'); - this.key = validator.getAsNotEmptyString(input, 'key'); - } -} - -export interface Request extends Interface {} - -@Define({ name: 'GetSettingValueResponse' }) -export class Response extends SignatureRequirement { - public value: string | undefined | number | boolean; - constructor(input: { value: string | undefined | number | boolean }) { - super(); - validator.isObject(input); - this.value = input.value; - } -} - -export interface Response extends Interface {} diff --git a/application/platform/ipc/request/settings/index.ts b/application/platform/ipc/request/settings/index.ts deleted file mode 100644 index 6b6d8bcad5..0000000000 --- a/application/platform/ipc/request/settings/index.ts +++ /dev/null @@ -1,4 +0,0 @@ -export * as Entries from './entries'; -export * as Validate from './validate'; -export * as Set from './set'; -export * as Get from './get'; diff --git a/application/platform/ipc/request/settings/set.ts b/application/platform/ipc/request/settings/set.ts deleted file mode 100644 index 4702ecab23..0000000000 --- a/application/platform/ipc/request/settings/set.ts +++ /dev/null @@ -1,36 +0,0 @@ -import { Define, Interface, SignatureRequirement } from '../declarations'; - -import * as validator from '../../../env/obj'; - -@Define({ name: 'SetSettingValueRequest' }) -export class Request extends SignatureRequirement { - public path: string; - public key: string; - public value: string | number | boolean | undefined; - - constructor(input: { - path: string; - key: string; - value: string | number | boolean | undefined; - }) { - super(); - validator.isObject(input); - this.path = validator.getAsNotEmptyString(input, 'path'); - this.key = validator.getAsNotEmptyString(input, 'key'); - this.value = input.value; - } -} - -export interface Request extends Interface {} - -@Define({ name: 'SetSettingValueResponse' }) -export class Response extends SignatureRequirement { - public error?: string; - constructor(input: { error?: string }) { - super(); - validator.isObject(input); - this.error = validator.getAsNotEmptyStringOrAsUndefined(input, 'error'); - } -} - -export interface Response extends Interface {} diff --git a/application/platform/ipc/request/settings/validate.ts b/application/platform/ipc/request/settings/validate.ts deleted file mode 100644 index 9c5c53ec6e..0000000000 --- a/application/platform/ipc/request/settings/validate.ts +++ /dev/null @@ -1,36 +0,0 @@ -import { Define, Interface, SignatureRequirement } from '../declarations'; - -import * as validator from '../../../env/obj'; - -@Define({ name: 'ValidateSettingValueRequest' }) -export class Request extends SignatureRequirement { - public path: string; - public key: string; - public value: string | number | boolean | undefined; - - constructor(input: { - path: string; - key: string; - value: string | number | boolean | undefined; - }) { - super(); - validator.isObject(input); - this.path = validator.getAsNotEmptyString(input, 'path'); - this.key = validator.getAsNotEmptyString(input, 'key'); - this.value = input.value; - } -} - -export interface Request extends Interface {} - -@Define({ name: 'ValidateSettingValueResponse' }) -export class Response extends SignatureRequirement { - public error?: string; - constructor(input: { error?: string }) { - super(); - validator.isObject(input); - this.error = validator.getAsNotEmptyStringOrAsUndefined(input, 'error'); - } -} - -export interface Response extends Interface {} diff --git a/application/platform/ipc/request/someip/index.ts b/application/platform/ipc/request/someip/index.ts deleted file mode 100644 index 48f2d93fda..0000000000 --- a/application/platform/ipc/request/someip/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * as Statistic from './statistic'; diff --git a/application/platform/ipc/request/someip/statistic.ts b/application/platform/ipc/request/someip/statistic.ts deleted file mode 100644 index 0c3726a69a..0000000000 --- a/application/platform/ipc/request/someip/statistic.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { Define, Interface, SignatureRequirement } from '../declarations'; -import { SomeipStatistic } from '../../../types/observe/parser/someip'; - -import * as validator from '../../../env/obj'; - -@Define({ name: 'SomeipStatisticRequest' }) -export class Request extends SignatureRequirement { - public files: string[]; - - constructor(input: { files: string[] }) { - super(); - validator.isObject(input); - this.files = validator.getAsArray(input, 'files'); - } -} -export interface Request extends Interface {} - -@Define({ name: 'SomeipStatisticResponse' }) -export class Response extends SignatureRequirement { - public statistic: SomeipStatistic; - - constructor(input: { statistic: SomeipStatistic }) { - super(); - validator.isObject(input); - this.statistic = validator.getAsObj(input, 'statistic'); - } -} - -export interface Response extends Interface {} diff --git a/application/platform/ipc/request/storage/delete.ts b/application/platform/ipc/request/storage/delete.ts deleted file mode 100644 index 339c269ec2..0000000000 --- a/application/platform/ipc/request/storage/delete.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { Define, Interface, SignatureRequirement } from '../declarations'; - -import * as validator from '../../../env/obj'; - -@Define({ name: 'StorageDeleteRequest' }) -export class Request extends SignatureRequirement { - public key: string; - constructor(input: { key: string }) { - super(); - validator.isObject(input); - this.key = validator.getAsNotEmptyString(input, 'key'); - } -} - -export interface Request extends Interface {} - -@Define({ name: 'StorageDeleteResponse' }) -export class Response extends SignatureRequirement {} - -export interface Response extends Interface {} diff --git a/application/platform/ipc/request/storage/entries.delete.ts b/application/platform/ipc/request/storage/entries.delete.ts deleted file mode 100644 index 3dc2c4df72..0000000000 --- a/application/platform/ipc/request/storage/entries.delete.ts +++ /dev/null @@ -1,22 +0,0 @@ -import { Define, Interface, SignatureRequirement } from '../declarations'; - -import * as validator from '../../../env/obj'; - -@Define({ name: 'EntriesDeleteRequest' }) -export class Request extends SignatureRequirement { - public key: string; - public uuids: string[]; - constructor(input: { key: string; uuids: string[] }) { - super(); - validator.isObject(input); - this.key = validator.getAsNotEmptyString(input, 'key'); - this.uuids = validator.getAsArray(input, 'uuids'); - } -} - -export interface Request extends Interface {} - -@Define({ name: 'EntriesDeleteResponse' }) -export class Response extends SignatureRequirement {} - -export interface Response extends Interface {} diff --git a/application/platform/ipc/request/storage/entries.get.ts b/application/platform/ipc/request/storage/entries.get.ts deleted file mode 100644 index 4343081f0e..0000000000 --- a/application/platform/ipc/request/storage/entries.get.ts +++ /dev/null @@ -1,35 +0,0 @@ -import { Define, Interface, SignatureRequirement } from '../declarations'; - -import * as validator from '../../../env/obj'; - -@Define({ name: 'EntriesGetRequest' }) -export class Request extends SignatureRequirement { - public key?: string; - public file?: string; - - constructor(input: { key?: string; file?: string }) { - super(); - validator.isObject(input); - this.key = validator.getAsNotEmptyStringOrAsUndefined(input, 'key'); - this.file = validator.getAsNotEmptyStringOrAsUndefined(input, 'file'); - if (this.key === undefined && this.file === undefined) { - throw new Error(`For EntriesGetRequest should be defined "file" or "key"`); - } - } -} - -export interface Request extends Interface {} - -@Define({ name: 'EntriesGetResponse' }) -export class Response extends SignatureRequirement { - public key: string; - public entries: string; - constructor(input: { key: string; entries: string }) { - super(); - validator.isObject(input); - this.entries = validator.getAsNotEmptyString(input, 'entries'); - this.key = validator.getAsNotEmptyString(input, 'key'); - } -} - -export interface Response extends Interface {} diff --git a/application/platform/ipc/request/storage/entries.set.ts b/application/platform/ipc/request/storage/entries.set.ts deleted file mode 100644 index 2e9ae46d13..0000000000 --- a/application/platform/ipc/request/storage/entries.set.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { Define, Interface, SignatureRequirement } from '../declarations'; - -import * as validator from '../../../env/obj'; - -export type Mode = 'overwrite' | 'update' | 'append'; - -@Define({ name: 'EntriesSetRequest' }) -export class Request extends SignatureRequirement { - public key?: string; - public file?: string; - public entries: string; - public mode: Mode; - constructor(input: { key?: string; file?: string; entries: string; mode: Mode }) { - super(); - validator.isObject(input); - this.key = validator.getAsNotEmptyStringOrAsUndefined(input, 'key'); - this.file = validator.getAsNotEmptyStringOrAsUndefined(input, 'file'); - this.mode = validator.getAsNotEmptyString(input, 'mode') as Mode; - this.entries = validator.getAsNotEmptyString(input, 'entries'); - if (this.key === undefined && this.file === undefined) { - throw new Error(`For EntriesSetRequest should be defined "file" or "key"`); - } - } -} - -export interface Request extends Interface {} - -@Define({ name: 'EntriesSetResponse' }) -export class Response extends SignatureRequirement {} - -export interface Response extends Interface {} diff --git a/application/platform/ipc/request/storage/index.ts b/application/platform/ipc/request/storage/index.ts deleted file mode 100644 index 2d6faa31c6..0000000000 --- a/application/platform/ipc/request/storage/index.ts +++ /dev/null @@ -1,6 +0,0 @@ -export * as Read from './read'; -export * as Write from './write'; -export * as Delete from './delete'; -export * as EntriesSet from './entries.set'; -export * as EntriesGet from './entries.get'; -export * as EntriesDelete from './entries.delete'; diff --git a/application/platform/ipc/request/storage/read.ts b/application/platform/ipc/request/storage/read.ts deleted file mode 100644 index f23ba72749..0000000000 --- a/application/platform/ipc/request/storage/read.ts +++ /dev/null @@ -1,30 +0,0 @@ -import { Define, Interface, SignatureRequirement } from '../declarations'; - -import * as validator from '../../../env/obj'; - -@Define({ name: 'StorageReadRequest' }) -export class Request extends SignatureRequirement { - public key: string; - - constructor(input: { key: string }) { - super(); - validator.isObject(input); - this.key = validator.getAsNotEmptyString(input, 'key'); - } -} - -export interface Request extends Interface {} - -@Define({ name: 'StorageReadResponse' }) -export class Response extends SignatureRequirement { - public key: string; - public content: string; - constructor(input: { key: string; content: string }) { - super(); - validator.isObject(input); - this.key = validator.getAsNotEmptyString(input, 'key'); - this.content = validator.getAsString(input, 'content'); - } -} - -export interface Response extends Interface {} diff --git a/application/platform/ipc/request/storage/write.ts b/application/platform/ipc/request/storage/write.ts deleted file mode 100644 index ab30cc7fff..0000000000 --- a/application/platform/ipc/request/storage/write.ts +++ /dev/null @@ -1,22 +0,0 @@ -import { Define, Interface, SignatureRequirement } from '../declarations'; - -import * as validator from '../../../env/obj'; - -@Define({ name: 'StorageWriteRequest' }) -export class Request extends SignatureRequirement { - public key: string; - public content: string; - constructor(input: { key: string; content: string }) { - super(); - validator.isObject(input); - this.key = validator.getAsNotEmptyString(input, 'key'); - this.content = validator.getAsNotEmptyString(input, 'content'); - } -} - -export interface Request extends Interface {} - -@Define({ name: 'StorageWriteResponse' }) -export class Response extends SignatureRequirement {} - -export interface Response extends Interface {} diff --git a/application/platform/ipc/request/stream/add_bookmark.ts b/application/platform/ipc/request/stream/add_bookmark.ts deleted file mode 100644 index 7241be3544..0000000000 --- a/application/platform/ipc/request/stream/add_bookmark.ts +++ /dev/null @@ -1,33 +0,0 @@ -import { Define, Interface, SignatureRequirement } from '../declarations'; - -import * as validator from '../../../env/obj'; - -@Define({ name: 'AddBookmarkRequest' }) -export class Request extends SignatureRequirement { - public session: string; - public row: number; - - constructor(input: { session: string; row: number }) { - super(); - validator.isObject(input); - this.session = validator.getAsNotEmptyString(input, 'session'); - this.row = validator.getAsValidNumber(input, 'row'); - } -} - -export interface Request extends Interface {} - -@Define({ name: 'AddBookmarkResponse' }) -export class Response extends SignatureRequirement { - public session: string; - public error?: string; - - constructor(input: { session: string; error?: string }) { - super(); - validator.isObject(input); - this.session = validator.getAsNotEmptyString(input, 'session'); - this.error = validator.getAsNotEmptyStringOrAsUndefined(input, 'error'); - } -} - -export interface Response extends Interface {} diff --git a/application/platform/ipc/request/stream/chunk.ts b/application/platform/ipc/request/stream/chunk.ts deleted file mode 100644 index 4dc14948b8..0000000000 --- a/application/platform/ipc/request/stream/chunk.ts +++ /dev/null @@ -1,39 +0,0 @@ -import { Define, Interface, SignatureRequirement } from '../declarations'; -import { GrabbedElement } from '../../../types/bindings/miscellaneous'; - -import * as validator from '../../../env/obj'; - -@Define({ name: 'StreamChunkRequest' }) -export class Request extends SignatureRequirement { - public session: string; - public from: number; - public to: number; - - constructor(input: { session: string; from: number; to: number }) { - super(); - validator.isObject(input); - this.session = validator.getAsNotEmptyString(input, 'session'); - this.from = validator.getAsValidNumber(input, 'from'); - this.to = validator.getAsValidNumber(input, 'to'); - } -} - -export interface Request extends Interface {} - -@Define({ name: 'StreamChunkResponse' }) -export class Response extends SignatureRequirement { - public session: string; - public rows: GrabbedElement[]; - public from: number; - public to: number; - constructor(input: { session: string; from: number; to: number; rows: GrabbedElement[] }) { - super(); - validator.isObject(input); - this.session = validator.getAsNotEmptyString(input, 'session'); - this.from = validator.getAsValidNumber(input, 'from'); - this.to = validator.getAsValidNumber(input, 'to'); - this.rows = validator.getAsArray(input, 'rows'); - } -} - -export interface Response extends Interface {} diff --git a/application/platform/ipc/request/stream/expand.ts b/application/platform/ipc/request/stream/expand.ts deleted file mode 100644 index 922daa2f18..0000000000 --- a/application/platform/ipc/request/stream/expand.ts +++ /dev/null @@ -1,37 +0,0 @@ -import { Define, Interface, SignatureRequirement } from '../declarations'; - -import * as validator from '../../../env/obj'; - -@Define({ name: 'ExpandIndexedMapRequest' }) -export class Request extends SignatureRequirement { - public session: string; - public seporator: number; - public offset: number; - public above: boolean; - - constructor(input: { session: string; seporator: number; offset: number; above: boolean }) { - super(); - validator.isObject(input); - this.session = validator.getAsNotEmptyString(input, 'session'); - this.seporator = validator.getAsValidNumber(input, 'seporator'); - this.offset = validator.getAsValidNumber(input, 'offset'); - this.above = validator.getAsBool(input, 'above'); - } -} - -export interface Request extends Interface {} - -@Define({ name: 'ExpandIndexedMapResponse' }) -export class Response extends SignatureRequirement { - public session: string; - public error?: string; - - constructor(input: { session: string; error?: string }) { - super(); - validator.isObject(input); - this.session = validator.getAsNotEmptyString(input, 'session'); - this.error = validator.getAsNotEmptyStringOrAsUndefined(input, 'error'); - } -} - -export interface Response extends Interface {} diff --git a/application/platform/ipc/request/stream/index.ts b/application/platform/ipc/request/stream/index.ts deleted file mode 100644 index 7419e15d00..0000000000 --- a/application/platform/ipc/request/stream/index.ts +++ /dev/null @@ -1,11 +0,0 @@ -export * as Chunk from './chunk'; -export * as Ranges from './ranges'; -export * as Indexed from './indexed'; -export * as Mode from './mode'; -export * as Expand from './expand'; -export * as AddBookmark from './add_bookmark'; -export * as SetBookmarks from './set_bookmarks'; -export * as RemoveBookmark from './remove_bookmark'; -export * as IndexedLen from './indexed_len'; -export * as IndexesAround from './indexes_around'; -export * as IndexesAsRanges from './indexes_as_ranges'; diff --git a/application/platform/ipc/request/stream/indexed.ts b/application/platform/ipc/request/stream/indexed.ts deleted file mode 100644 index ea03355b93..0000000000 --- a/application/platform/ipc/request/stream/indexed.ts +++ /dev/null @@ -1,39 +0,0 @@ -import { Define, Interface, SignatureRequirement } from '../declarations'; -import { GrabbedElement } from '../../../types/bindings/miscellaneous'; - -import * as validator from '../../../env/obj'; - -@Define({ name: 'IndexedChunkRequest' }) -export class Request extends SignatureRequirement { - public session: string; - public from: number; - public to: number; - - constructor(input: { session: string; from: number; to: number }) { - super(); - validator.isObject(input); - this.session = validator.getAsNotEmptyString(input, 'session'); - this.from = validator.getAsValidNumber(input, 'from'); - this.to = validator.getAsValidNumber(input, 'to'); - } -} - -export interface Request extends Interface {} - -@Define({ name: 'IndexedChunkResponse' }) -export class Response extends SignatureRequirement { - public session: string; - public rows: GrabbedElement[]; - public from: number; - public to: number; - constructor(input: { session: string; from: number; to: number; rows: GrabbedElement[] }) { - super(); - validator.isObject(input); - this.session = validator.getAsNotEmptyString(input, 'session'); - this.from = validator.getAsValidNumber(input, 'from'); - this.to = validator.getAsValidNumber(input, 'to'); - this.rows = validator.getAsArray(input, 'rows'); - } -} - -export interface Response extends Interface {} diff --git a/application/platform/ipc/request/stream/indexed_len.ts b/application/platform/ipc/request/stream/indexed_len.ts deleted file mode 100644 index 75920df1d4..0000000000 --- a/application/platform/ipc/request/stream/indexed_len.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { Define, Interface, SignatureRequirement } from '../declarations'; - -import * as validator from '../../../env/obj'; - -@Define({ name: 'GetIndexedLenRequest' }) -export class Request extends SignatureRequirement { - public session: string; - - constructor(input: { session: string }) { - super(); - validator.isObject(input); - this.session = validator.getAsNotEmptyString(input, 'session'); - } -} - -export interface Request extends Interface {} - -@Define({ name: 'GetIndexedLenResponse' }) -export class Response extends SignatureRequirement { - public session: string; - public len: number; - - constructor(input: { session: string; len: number }) { - super(); - validator.isObject(input); - this.session = validator.getAsNotEmptyString(input, 'session'); - this.len = validator.getAsValidNumber(input, 'len'); - } -} - -export interface Response extends Interface {} diff --git a/application/platform/ipc/request/stream/indexes_around.ts b/application/platform/ipc/request/stream/indexes_around.ts deleted file mode 100644 index 6b62f26297..0000000000 --- a/application/platform/ipc/request/stream/indexes_around.ts +++ /dev/null @@ -1,42 +0,0 @@ -import { Define, Interface, SignatureRequirement } from '../declarations'; - -import * as validator from '../../../env/obj'; - -@Define({ name: 'GetIndexesAroundRequest' }) -export class Request extends SignatureRequirement { - public session: string; - public row: number; - - constructor(input: { session: string; row: number }) { - super(); - validator.isObject(input); - this.session = validator.getAsNotEmptyString(input, 'session'); - this.row = validator.getAsValidNumber(input, 'row'); - } -} - -export interface Request extends Interface {} - -@Define({ name: 'GetIndexesAroundResponse' }) -export class Response extends SignatureRequirement { - public session: string; - public before: number | undefined; - public after: number | undefined; - public error?: string; - - constructor(input: { - session: string; - before: number | undefined; - after: number | undefined; - error?: string; - }) { - super(); - validator.isObject(input); - this.session = validator.getAsNotEmptyString(input, 'session'); - this.before = validator.getAsValidNumberOrUndefined(input, 'before'); - this.after = validator.getAsValidNumberOrUndefined(input, 'after'); - this.error = validator.getAsNotEmptyStringOrAsUndefined(input, 'error'); - } -} - -export interface Response extends Interface {} diff --git a/application/platform/ipc/request/stream/indexes_as_ranges.ts b/application/platform/ipc/request/stream/indexes_as_ranges.ts deleted file mode 100644 index 08de711f06..0000000000 --- a/application/platform/ipc/request/stream/indexes_as_ranges.ts +++ /dev/null @@ -1,32 +0,0 @@ -import { Define, Interface, SignatureRequirement } from '../declarations'; -import { IRange } from '../../../types/range'; - -import * as validator from '../../../env/obj'; - -@Define({ name: 'IndexesAsRangesRequest' }) -export class Request extends SignatureRequirement { - public session: string; - - constructor(input: { session: string }) { - super(); - validator.isObject(input); - this.session = validator.getAsNotEmptyString(input, 'session'); - } -} - -export interface Request extends Interface {} - -@Define({ name: 'IndexesAsRangesResponse' }) -export class Response extends SignatureRequirement { - public session: string; - public ranges: IRange[]; - - constructor(input: { session: string; ranges: IRange[] }) { - super(); - validator.isObject(input); - this.session = validator.getAsNotEmptyString(input, 'session'); - this.ranges = validator.getAsArray(input, 'ranges'); - } -} - -export interface Response extends Interface {} diff --git a/application/platform/ipc/request/stream/mode.ts b/application/platform/ipc/request/stream/mode.ts deleted file mode 100644 index 3794c992f4..0000000000 --- a/application/platform/ipc/request/stream/mode.ts +++ /dev/null @@ -1,34 +0,0 @@ -import { Define, Interface, SignatureRequirement } from '../declarations'; -import { IndexingMode } from '../../../types/content'; - -import * as validator from '../../../env/obj'; - -@Define({ name: 'StreamIndexingModeRequest' }) -export class Request extends SignatureRequirement { - public session: string; - public mode: IndexingMode; - - constructor(input: { session: string; mode: IndexingMode }) { - super(); - validator.isObject(input); - this.session = validator.getAsNotEmptyString(input, 'session'); - this.mode = validator.getAsValidNumber(input, 'mode'); - } -} - -export interface Request extends Interface {} - -@Define({ name: 'StreamIndexingModeResponse' }) -export class Response extends SignatureRequirement { - public session: string; - public error?: string; - - constructor(input: { session: string; error?: string }) { - super(); - validator.isObject(input); - this.session = validator.getAsNotEmptyString(input, 'session'); - this.error = validator.getAsNotEmptyStringOrAsUndefined(input, 'error'); - } -} - -export interface Response extends Interface {} diff --git a/application/platform/ipc/request/stream/ranges.ts b/application/platform/ipc/request/stream/ranges.ts deleted file mode 100644 index 82e05cd3b1..0000000000 --- a/application/platform/ipc/request/stream/ranges.ts +++ /dev/null @@ -1,34 +0,0 @@ -import { Define, Interface, SignatureRequirement } from '../declarations'; -import { GrabbedElement } from '../../../types/bindings/miscellaneous'; -import { IRange } from '../../../types/range'; - -import * as validator from '../../../env/obj'; - -@Define({ name: 'StreamRangesChunkRequest' }) -export class Request extends SignatureRequirement { - public session: string; - public ranges: IRange[]; - - constructor(input: { session: string; ranges: IRange[] }) { - super(); - validator.isObject(input); - this.session = validator.getAsNotEmptyString(input, 'session'); - this.ranges = validator.getAsArray(input, 'ranges'); - } -} - -export interface Request extends Interface {} - -@Define({ name: 'StreamRangesChunkResponse' }) -export class Response extends SignatureRequirement { - public session: string; - public rows: GrabbedElement[]; - constructor(input: { session: string; rows: GrabbedElement[] }) { - super(); - validator.isObject(input); - this.session = validator.getAsNotEmptyString(input, 'session'); - this.rows = validator.getAsArray(input, 'rows'); - } -} - -export interface Response extends Interface {} diff --git a/application/platform/ipc/request/stream/remove_bookmark.ts b/application/platform/ipc/request/stream/remove_bookmark.ts deleted file mode 100644 index a0a5658716..0000000000 --- a/application/platform/ipc/request/stream/remove_bookmark.ts +++ /dev/null @@ -1,33 +0,0 @@ -import { Define, Interface, SignatureRequirement } from '../declarations'; - -import * as validator from '../../../env/obj'; - -@Define({ name: 'RemoveBookmarkRequest' }) -export class Request extends SignatureRequirement { - public session: string; - public row: number; - - constructor(input: { session: string; row: number }) { - super(); - validator.isObject(input); - this.session = validator.getAsNotEmptyString(input, 'session'); - this.row = validator.getAsValidNumber(input, 'row'); - } -} - -export interface Request extends Interface {} - -@Define({ name: 'RemoveBookmarkResponse' }) -export class Response extends SignatureRequirement { - public session: string; - public error?: string; - - constructor(input: { session: string; error?: string }) { - super(); - validator.isObject(input); - this.session = validator.getAsNotEmptyString(input, 'session'); - this.error = validator.getAsNotEmptyStringOrAsUndefined(input, 'error'); - } -} - -export interface Response extends Interface {} diff --git a/application/platform/ipc/request/stream/set_bookmarks.ts b/application/platform/ipc/request/stream/set_bookmarks.ts deleted file mode 100644 index ac2a7f28ac..0000000000 --- a/application/platform/ipc/request/stream/set_bookmarks.ts +++ /dev/null @@ -1,33 +0,0 @@ -import { Define, Interface, SignatureRequirement } from '../declarations'; - -import * as validator from '../../../env/obj'; - -@Define({ name: 'SetBookmarksRequest' }) -export class Request extends SignatureRequirement { - public session: string; - public rows: number[]; - - constructor(input: { session: string; rows: number[] }) { - super(); - validator.isObject(input); - this.session = validator.getAsNotEmptyString(input, 'session'); - this.rows = validator.getAsArray(input, 'rows'); - } -} - -export interface Request extends Interface {} - -@Define({ name: 'SetBookmarksResponse' }) -export class Response extends SignatureRequirement { - public session: string; - public error?: string; - - constructor(input: { session: string; error?: string }) { - super(); - validator.isObject(input); - this.session = validator.getAsNotEmptyString(input, 'session'); - this.error = validator.getAsNotEmptyStringOrAsUndefined(input, 'error'); - } -} - -export interface Response extends Interface {} diff --git a/application/platform/ipc/request/system/check_updates.ts b/application/platform/ipc/request/system/check_updates.ts deleted file mode 100644 index 127bebaf63..0000000000 --- a/application/platform/ipc/request/system/check_updates.ts +++ /dev/null @@ -1,22 +0,0 @@ -import { Define, Interface, SignatureRequirement } from '../declarations'; - -import * as validator from '../../../env/obj'; - -@Define({ name: 'TriggerCheckingUpdatesRequest' }) -export class Request extends SignatureRequirement {} -export interface Request extends Interface {} - -@Define({ name: 'TriggerCheckingUpdatesResponse' }) -export class Response extends SignatureRequirement { - public report?: string; - public error?: string; - - constructor(input: { report?: string; error?: string }) { - super(); - validator.isObject(input); - this.report = validator.getAsNotEmptyStringOrAsUndefined(input, 'report'); - this.error = validator.getAsNotEmptyStringOrAsUndefined(input, 'error'); - } -} - -export interface Response extends Interface {} diff --git a/application/platform/ipc/request/system/exit.ts b/application/platform/ipc/request/system/exit.ts deleted file mode 100644 index c9cfa37eb9..0000000000 --- a/application/platform/ipc/request/system/exit.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Define, Interface, SignatureRequirement } from '../declarations'; - -@Define({ name: 'ExitRequest' }) -export class Request extends SignatureRequirement {} -export interface Request extends Interface {} - -@Define({ name: 'ExitResponse' }) -export class Response extends SignatureRequirement {} - -export interface Response extends Interface {} diff --git a/application/platform/ipc/request/system/index.ts b/application/platform/ipc/request/system/index.ts deleted file mode 100644 index 954e89f01c..0000000000 --- a/application/platform/ipc/request/system/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -export * as Shutdown from './shutdown'; -export * as CheckUpdates from './check_updates'; -export * as Exit from './exit'; diff --git a/application/platform/ipc/request/system/shutdown.ts b/application/platform/ipc/request/system/shutdown.ts deleted file mode 100644 index 85ecfe76b3..0000000000 --- a/application/platform/ipc/request/system/shutdown.ts +++ /dev/null @@ -1,32 +0,0 @@ -import { Define, Interface, SignatureRequirement } from '../declarations'; - -import * as validator from '../../../env/obj'; - -export enum State { - Ready = 'Ready', - InProgress = 'InProgress', -} -@Define({ name: 'SystemShutdownRequest' }) -export class Request extends SignatureRequirement { - public force: boolean; - - constructor(input: { force: boolean }) { - super(); - validator.isObject(input); - this.force = validator.getAsBool(input, 'force'); - } -} -export interface Request extends Interface {} - -@Define({ name: 'SystemShutdownResponse' }) -export class Response extends SignatureRequirement { - public state: State; - - constructor(input: { state: State }) { - super(); - validator.isObject(input); - this.state = validator.getAsNotEmptyString(input, 'state') as State; - } -} - -export interface Response extends Interface {} diff --git a/application/platform/ipc/request/values/extract.ts b/application/platform/ipc/request/values/extract.ts deleted file mode 100644 index d23f597590..0000000000 --- a/application/platform/ipc/request/values/extract.ts +++ /dev/null @@ -1,35 +0,0 @@ -import { Define, Interface, SignatureRequirement } from '../declarations'; - -import * as validator from '../../../env/obj'; - -@Define({ name: 'SearchValuesRequest' }) -export class Request extends SignatureRequirement { - public session: string; - public filters: string[]; - - constructor(input: { session: string; filters: string[] }) { - super(); - validator.isObject(input); - this.session = validator.getAsNotEmptyString(input, 'session'); - this.filters = validator.getAsArray(input, 'filters'); - } -} - -export interface Request extends Interface {} - -@Define({ name: 'SearchValuesResponse' }) -export class Response extends SignatureRequirement { - public session: string; - public canceled: boolean; - public error?: string; - - constructor(input: { session: string; canceled: boolean; error?: string }) { - super(); - validator.isObject(input); - this.session = validator.getAsNotEmptyString(input, 'session'); - this.canceled = validator.getAsBool(input, 'canceled'); - this.error = validator.getAsNotEmptyStringOrAsUndefined(input, 'error'); - } -} - -export interface Response extends Interface {} diff --git a/application/platform/ipc/request/values/frame.ts b/application/platform/ipc/request/values/frame.ts deleted file mode 100644 index def8aeac87..0000000000 --- a/application/platform/ipc/request/values/frame.ts +++ /dev/null @@ -1,47 +0,0 @@ -import { Define, Interface, SignatureRequirement } from '../declarations'; -import { ResultSearchValues } from '../../../types/bindings'; - -import * as validator from '../../../env/obj'; - -@Define({ name: 'SearchValuesGettingRequest' }) -export class Request extends SignatureRequirement { - public session: string; - public width: number; - public from?: number; - public to?: number; - - constructor(input: { session: string; width: number; from?: number; to?: number }) { - super(); - validator.isObject(input); - this.session = validator.getAsNotEmptyString(input, 'session'); - this.width = validator.getAsValidNumber(input, 'width'); - this.from = validator.getAsValidNumberOrUndefined(input, 'from'); - this.to = validator.getAsValidNumberOrUndefined(input, 'to'); - } -} - -export interface Request extends Interface {} - -@Define({ name: 'SearchValuesGettingResponse' }) -export class Response extends SignatureRequirement { - public session: string; - public values: ResultSearchValues; - public canceled: boolean; - public error?: string; - - constructor(input: { - session: string; - values: ResultSearchValues; - canceled: boolean; - error?: string; - }) { - super(); - validator.isObject(input); - this.session = validator.getAsNotEmptyString(input, 'session'); - this.values = validator.getAsObj(input, 'values'); - this.canceled = validator.getAsBool(input, 'canceled'); - this.error = validator.getAsNotEmptyStringOrAsUndefined(input, 'error'); - } -} - -export interface Response extends Interface {} diff --git a/application/platform/ipc/request/values/index.ts b/application/platform/ipc/request/values/index.ts deleted file mode 100644 index de32ddcee8..0000000000 --- a/application/platform/ipc/request/values/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * as Extract from './extract'; -export * as Frame from './frame'; diff --git a/application/platform/ipc/setup/channels.ts b/application/platform/ipc/setup/channels.ts deleted file mode 100644 index dd008f36dd..0000000000 --- a/application/platform/ipc/setup/channels.ts +++ /dev/null @@ -1,24 +0,0 @@ -export const RENDER_EVENT_NAME = 'render_event'; -export const RENDER_REQUEST_NAME = 'render_request'; -export const RENDER_RESPONSE_NAME = 'render_response'; - -export const HOST_EVENT_NAME = 'host_event'; -export const HOST_REQUEST_NAME = 'host_request'; -export const HOST_RESPONSE_NAME = 'host_response'; - -export const ERROR_FIELD = '__e'; -export const CODE_FIELD = '__c'; -export const PAYLOAD_FIELD = '__p'; -export const SEQUENCE_FIELD = '__s'; - -export const CODES: { - unknown: number; - done: number; - error: number; - aborted: number; -} = { - unknown: -1, - done: 0, - error: 1, - aborted: 2, -}; diff --git a/application/platform/ipc/transport/errors/index.ts b/application/platform/ipc/transport/errors/index.ts deleted file mode 100644 index ef244032b4..0000000000 --- a/application/platform/ipc/transport/errors/index.ts +++ /dev/null @@ -1 +0,0 @@ -export { RustNativeError } from './native'; diff --git a/application/platform/ipc/transport/errors/native.ts b/application/platform/ipc/transport/errors/native.ts deleted file mode 100644 index 8e3e005985..0000000000 --- a/application/platform/ipc/transport/errors/native.ts +++ /dev/null @@ -1,29 +0,0 @@ -import * as obj from '../../../env/obj'; - -export class RustNativeError { - static PROP_NAME = 'NativeError'; - public static from(str: string): RustNativeError | undefined { - try { - const smth: { [key: string]: Record } = JSON.parse(str); - if (smth[RustNativeError.PROP_NAME] === undefined) { - return undefined; - } - return new RustNativeError( - obj.getAsNotEmptyString(smth[RustNativeError.PROP_NAME], 'kind'), - obj.getAsString(smth[RustNativeError.PROP_NAME], 'message'), - obj.getAsNotEmptyString(smth[RustNativeError.PROP_NAME], 'severity'), - ); - } catch (_) { - return undefined; - } - } - public kind: string; - public message: string; - public severity: string; - - constructor(kind: string, message: string, severity: string) { - this.kind = kind; - this.message = message; - this.severity = severity; - } -} diff --git a/application/platform/ipc/transport/index.ts b/application/platform/ipc/transport/index.ts deleted file mode 100644 index 566eb0bb7f..0000000000 --- a/application/platform/ipc/transport/index.ts +++ /dev/null @@ -1,268 +0,0 @@ -import { ICancelablePromise } from '../../env/promise'; -import { utils } from '../../log'; -import { Subject, Subscription } from '../../env/subscription'; - -import * as Errors from './errors'; -import * as setup from '../setup/channels'; - -export { Errors }; - -export function wrapResponseConstructor( - signature: string, - constructorRef: EntityConstructor, -): EntityConstructor & ISignatureRequirement { - (constructorRef as any).getSignature = function () { - return signature; - }; - return constructorRef as EntityConstructor & ISignatureRequirement; -} - -export interface ISignatureRequirement { - getSignature(): string; -} - -export abstract class SignatureRequirement { - static getSignature(): string { - return ''; - } -} - -export type EntityConstructor = new (...args: any[]) => Entity; - -export type Respond = ( - request: Request & ISignatureRequirement, -) => ICancelablePromise; - -export abstract class Transport { - public abstract request( - request: Request & ISignatureRequirement, - responseConstructorRef: EntityConstructor & ISignatureRequirement, - ): Promise; - - public abstract respondent( - owner: unknown, - request: EntityConstructor & ISignatureRequirement, - respond: Respond, - ): Subscription; - - public abstract notify(notification: Notification & ISignatureRequirement): void; - - public abstract emulate(entity: Entity & ISignatureRequirement): { - event(): void; - request(): void; - response(sequence: number): void; - }; - - public abstract subscribe( - event: string, - refEventConstructor: EntityConstructor & ISignatureRequirement, - ): Subject; - - public abstract destroy(): void; -} - -export interface Packed { - [key: string]: unknown; -} - -export class Package { - private _sequence: number; - private _payload: (Payload & ISignatureRequirement) | undefined; - private _packed: Packed | undefined; - private _signature: string | undefined; - private _code: number = setup.CODES.unknown; - private _error: string | undefined; - - constructor(sequence: number, packed?: Packed) { - this._sequence = sequence; - packed !== undefined && (this._packed = packed); - } - - public static from( - obj: Packed, - ref?: EntityConstructor & ISignatureRequirement, - ): Error | Package { - if ( - typeof obj !== 'object' || - obj === null || - typeof obj[setup.SEQUENCE_FIELD] !== 'number' - ) { - return this.err(`Unexpected request's structure`); - } - if ( - (obj[setup.PAYLOAD_FIELD] !== undefined && - typeof obj[setup.PAYLOAD_FIELD] !== 'object') || - obj[setup.PAYLOAD_FIELD] === null - ) { - return this.err(`Payload isn't an object`); - } - if ( - typeof obj[setup.PAYLOAD_FIELD] === 'object' && - Object.keys(obj[setup.PAYLOAD_FIELD] as object).length !== 1 - ) { - return this.err( - `Payload has incorrect structure. It should has only one field by name of signature.`, - ); - } - if (obj[setup.ERROR_FIELD] !== undefined && typeof obj[setup.ERROR_FIELD] !== 'string') { - return this.err(`Error can be only a string`); - } - if (obj[setup.PAYLOAD_FIELD] !== undefined && obj[setup.ERROR_FIELD] !== undefined) { - return this.err(`Payload and error cannot be defined in the scope of one package`); - } - if (obj[setup.ERROR_FIELD] !== undefined && obj[setup.CODE_FIELD] !== setup.CODES.error) { - return this.err(`Incorrect code for error`); - } - if ( - obj[setup.PAYLOAD_FIELD] !== undefined && - obj[setup.CODE_FIELD] === setup.CODES.aborted - ) { - return this.err(`Payload cannot be defined on aborting`); - } - const pack = new Package(obj[setup.SEQUENCE_FIELD] as number, obj) - .code(obj[setup.CODE_FIELD] as number) - .error(obj[setup.ERROR_FIELD] as string); - if (ref !== undefined && obj[setup.PAYLOAD_FIELD] !== undefined) { - const signature = pack.getSignature(); - if (pack instanceof Error) { - return pack; - } - try { - pack.payload( - new ref( - (obj[setup.PAYLOAD_FIELD] as { [key: string]: unknown })[ - signature as string - ], - ) as Payload & ISignatureRequirement, - ); - } catch (err) { - return this.err(utils.error(err)); - } - } - return pack; - } - - public done(response: Payload & ISignatureRequirement): Package { - this._payload = response; - this._code = setup.CODES.done; - return this; - } - - public error(error: string | undefined): Package { - if (error === undefined) { - return this; - } - this._error = error; - this._code = setup.CODES.error; - return this; - } - - public abort(): Package { - if (this._error !== undefined || this._payload !== undefined) { - throw this.err(`State of package already setuo. Cannot apply `); - } - this._code = setup.CODES.aborted; - return this; - } - - public code(code: number): Package { - this._code = code; - return this; - } - - public payload(payload: Payload & ISignatureRequirement): Package { - this._code = setup.CODES.done; - this._payload = payload; - return this; - } - - public getCode(): number { - return this._code; - } - - public getError(): Error | Errors.RustNativeError | undefined { - if (this._error === undefined) { - return undefined; - } - const native = Errors.RustNativeError.from(this._error); - return native === undefined ? new Error(this._error) : native; - } - - public getPayload( - ref?: EntityConstructor & ISignatureRequirement, - ): (Payload & ISignatureRequirement) | Error { - if (ref !== undefined) { - if (this._packed === undefined) { - return this.err(`Cannot build payload without packed content`); - } - const signature = this.getSignature(); - if (signature instanceof Error) { - return signature; - } - try { - this.payload( - new ref( - (this._packed[setup.PAYLOAD_FIELD] as { [key: string]: unknown })[ - signature as string - ], - ) as Payload & ISignatureRequirement, - ); - } catch (err) { - return this.err(utils.error(err)); - } - } - return this._payload !== undefined ? this._payload : this.err(`No payload`); - } - - public getSequence(): number { - return this._sequence; - } - - public getSignature(): string | Error { - if (this._packed === undefined || this._packed[setup.PAYLOAD_FIELD] === undefined) { - return this.err(`no packed contect or not payload part`); - } - if ( - this._packed[setup.PAYLOAD_FIELD] === null || - (typeof this._packed[setup.PAYLOAD_FIELD] === 'object' && - Object.keys(this._packed[setup.PAYLOAD_FIELD] as object).length !== 1) - ) { - return this.err( - `Payload has incorrect structure. It should has only one field by name of signature.`, - ); - } - const signature = Object.keys(this._packed[setup.PAYLOAD_FIELD] as object)[0]; - if (typeof signature !== 'string' || signature.trim() === '') { - return this.err(`Invalid signature format`); - } - return signature; - } - - public aborded(): boolean { - return this._code === setup.CODES.aborted; - } - - public packed(): Packed { - const packed: Packed = { - [setup.SEQUENCE_FIELD]: this._sequence, - [setup.CODE_FIELD]: this._code, - }; - if (this._payload !== undefined) { - packed[setup.PAYLOAD_FIELD] = { - [this._payload.getSignature()]: this._payload, - }; - } else if (this._error !== undefined) { - packed[setup.ERROR_FIELD] = this._error; - } - this._packed = packed; - return packed; - } - - static err(msg: string): Error { - return new Error(`PackageError: ${msg}`); - } - - private err(msg: string): Error { - return Package.err(msg); - } -} diff --git a/application/platform/lib.ts b/application/platform/lib.ts deleted file mode 100644 index 696b1ae60e..0000000000 --- a/application/platform/lib.ts +++ /dev/null @@ -1,5 +0,0 @@ -export * as entity from './entity'; -export * as env from './env'; -export * as ipc from './ipc'; -export * as modules from './modules'; -export * as types from './types'; diff --git a/application/platform/log/defaults.ts b/application/platform/log/defaults.ts deleted file mode 100644 index 63e0d02f59..0000000000 --- a/application/platform/log/defaults.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { Level } from './levels'; -import { Logger as Base } from './logger'; - -let collected: { msg: string; level: Level }[] = []; - -export class DefaultLogger extends Base { - public static getCollectedMessages(): { msg: string; level: Level }[] { - const msgs = collected; - collected = []; - return msgs; - } - - public store(msg: string, level: Level): void { - collected.push({ msg, level }); - } - public isDefault(): boolean { - return true; - } -} diff --git a/application/platform/log/index.ts b/application/platform/log/index.ts deleted file mode 100644 index 07cfd1fb08..0000000000 --- a/application/platform/log/index.ts +++ /dev/null @@ -1,5 +0,0 @@ -export { Logger, LoggerConstructor } from './logger'; -export { Level, LOGS_LEVEL_TABLE } from './levels'; -export { state, State } from './state'; - -export * as utils from './utils'; diff --git a/application/platform/log/levels.ts b/application/platform/log/levels.ts deleted file mode 100644 index d938b9d580..0000000000 --- a/application/platform/log/levels.ts +++ /dev/null @@ -1,30 +0,0 @@ -export enum Level { - 'INFO' = 'INFO', - 'DEBUG' = 'DEBUG', - 'WARNING' = 'WARNING', - 'VERBOS' = 'VERBOS', - 'ERROR' = 'ERROR', - 'WTF' = 'WTF', -} - -export const NumericLevel: { [key: number]: Level } = { - 1: Level.ERROR, - 2: Level.WARNING, - 3: Level.INFO, - 4: Level.DEBUG, - 5: Level.VERBOS, - 6: Level.WTF, -}; - -export const LOGS_LEVEL_TABLE = { - VERBOS: [Level.VERBOS, Level.DEBUG, Level.INFO, Level.WARNING, Level.ERROR], - DEBUG: [Level.DEBUG, Level.INFO, Level.WARNING, Level.ERROR], - INFO: [Level.INFO, Level.WARNING, Level.ERROR], - WARNING: [Level.WARNING, Level.ERROR], - ERROR: [Level.ERROR], - WTF: [Level.WTF], -}; - -export function isValid(level: Level): boolean { - return LOGS_LEVEL_TABLE[level] !== undefined; -} diff --git a/application/platform/log/logger.ts b/application/platform/log/logger.ts deleted file mode 100644 index 78786bf6fb..0000000000 --- a/application/platform/log/logger.ts +++ /dev/null @@ -1,225 +0,0 @@ -import { Level } from './levels'; -import { state } from './state'; - -export type LoggerConstructor = new (signature: string, ...args: any[]) => T; - -const LEFT_SPACE_ON_LOGGER_SIG = 1; -const RIGHT_SPACE_ON_LOGGER_SIG = 1; -const LOG_LEVEL_MAX = 7; -const MAX_LOG_MESSAGE_LEN = 1000; - -declare const console: { - log(...args: any[]): void; -}; - -declare const process: { - stdout: { - write(buffer: string): void; - }; -}; - -export abstract class Logger { - static post(msg: string, level: Level): void { - if (console !== undefined && console !== null && typeof console.log === 'function') { - console.log( - `%c${msg}`, - (() => { - switch (level) { - case Level.VERBOS: - case Level.WTF: - return 'color: grey'; - case Level.INFO: - return 'color: blue'; - case Level.DEBUG: - return 'color: green'; - case Level.WARNING: - return 'color: darkorange'; - case Level.ERROR: - return 'color: red'; - default: - return ''; - } - })(), - ); - if (level === Level.ERROR) { - try { - throw new Error(`Error stack`); - } catch (err) { - const stack = (err as Error).stack; - if (typeof stack === 'string') { - (err as Error).stack = stack - .split(/[\n\r]/gi) - .filter((s) => s.search(/\s*at Logger/g) === -1) - .join('\n'); - console.log(err); - } - } - } - } else if ( - process !== undefined && - process !== null && - process.stdout !== undefined && - typeof process.stdout.write === 'function' - ) { - process.stdout.write(msg); - } - } - protected signature: string; - - public static maxNameLength = 0; - - public abstract store(msg: string, level: Level): void; - - /** - * @constructor - * @param {string} signature - Signature of logger instance - * @param {LoggerParameters} params - Logger parameters - */ - constructor(signature: string) { - if (signature.length > Logger.maxNameLength) { - Logger.maxNameLength = signature.length; - } - this.signature = `${' '.repeat(LEFT_SPACE_ON_LOGGER_SIG)}${signature}${' '.repeat( - RIGHT_SPACE_ON_LOGGER_SIG, - )}`; - } - - public rename(signature: string): void { - this.signature = `${' '.repeat(LEFT_SPACE_ON_LOGGER_SIG)}${signature}${' '.repeat( - RIGHT_SPACE_ON_LOGGER_SIG, - )}`; - } - - /** - * Publish info logs - * @param {any} args - Any input for logs - * @returns {string} - Formatted log-string - */ - public info(...args: unknown[]) { - return this.log(this.msg(...args), Level.INFO); - } - - /** - * Publish warnings logs - * @param {any} args - Any input for logs - * @returns {string} - Formatted log-string - */ - public warn(...args: unknown[]) { - return this.log(this.msg(...args), Level.WARNING); - } - - /** - * Publish verbose logs - * @param {any} args - Any input for logs - * @returns {string} - Formatted log-string - */ - public verbose(...args: unknown[]) { - return this.log(this.msg(...args), Level.VERBOS); - } - - /** - * Publish error logs - * @param {any} args - Any input for logs - * @returns {string} - Formatted log-string - */ - public error(...args: unknown[]) { - return this.log(this.msg(...args), Level.ERROR); - } - - /** - * Publish debug logs - * @param {any} args - Any input for logs - * @returns {string} - Formatted log-string - */ - public debug(...args: unknown[]) { - return this.log(this.msg(...args), Level.DEBUG); - } - - /** - * Publish WTF logs. As soon as at least 1 WTF log was published - * all others logs would not be published any more. WTF logs allows - * developer to get clean logs for debugging - * @param {any} args - Any input for logs - * @returns {string} - Formatted log-string - */ - public wtf(...args: unknown[]) { - return this.log(this.msg(...args), Level.WTF); - } - - public measure(operation: string): () => void { - const started = Date.now(); - this.debug(`starting "${operation}"`); - return () => { - const duration: number = Date.now() - started; - this.debug( - `"${operation}" finished in: ${(duration / 1000).toFixed(2)} sec (${duration}ms)`, - ); - }; - } - - public push(msgs: { msg: string; level: Level }[]): void { - msgs.forEach((msg) => { - this.publish(msg.msg, msg.level); - }); - } - - public publish(msg: string, level: Level): Logger { - const defaultsLoggerInUse = - typeof (this as any).isDefault === 'function' ? (this as any).isDefault() : false; - if (defaultsLoggerInUse) { - // With default logger we do not post any logs. As soon as logger will be setup - // all collected messages will be passed into regular logger (see "scope" module) - return this; - } - if (!state.isWritable(level)) { - return this; - } - Logger.post(msg, level); - return this; - } - - protected msg(...args: unknown[]) { - let message = ``; - if (args instanceof Array) { - args.forEach((smth: unknown, index: number) => { - if (typeof smth !== 'string') { - message = `${message} (type: ${typeof smth})`; - } else { - message = `${message}${smth}`; - } - index < args.length - 1 && (message = `${message},\n `); - }); - } - return message; - } - - protected time(): string { - const time: Date = new Date(); - return `${time.toJSON()}`; - } - - protected log(original: string, level: Level) { - const cut = (msg: string): string => { - if (msg.length < MAX_LOG_MESSAGE_LEN) { - return msg; - } - return `${msg.substring(0, MAX_LOG_MESSAGE_LEN)}(...cut...)${msg.substring( - msg.length - 20, - msg.length, - )}`; - }; - if (level === Level.WTF) { - state.setDebugging(true); - } - if (state.isDebugging() && level !== Level.WTF) { - return original; - } - const levelStr = `${level}`; - const fill = LOG_LEVEL_MAX - levelStr.length; - const message = `[${this.time()}][${levelStr}${' '.repeat( - fill > 0 && isFinite(fill) && !isNaN(fill) ? fill : 0, - )}][${this.signature}]: ${cut(original)}`; - this.publish(message, level).store(message, level); - return original; - } -} diff --git a/application/platform/log/state.ts b/application/platform/log/state.ts deleted file mode 100644 index 25505bde7d..0000000000 --- a/application/platform/log/state.ts +++ /dev/null @@ -1,50 +0,0 @@ -import { Level, LOGS_LEVEL_TABLE, isValid } from './levels'; - -export class State { - protected level!: Level; - protected allowed!: { [key: string]: boolean }; - protected lockedBy: string | undefined; - protected debugging: boolean = false; - - constructor() { - this.setLevel(Level.DEBUG); - } - - public setLevel(level: Level): Error | undefined { - if (this.lockedBy !== undefined) { - return new Error(`Locked by ${this.lockedBy}`); - } - if (!isValid(level)) { - return new Error(`Log level "${level}" is invalid`); - } - this.level = level; - this.allowed = {}; - Object.keys(LOGS_LEVEL_TABLE).forEach((key: string) => { - this.allowed[key] = LOGS_LEVEL_TABLE[level].includes(key as Level); - }); - this.allowed[Level.WTF] = true; - return undefined; - } - - public isWritable(level: Level): boolean { - return typeof this.allowed[level] === 'boolean' ? this.allowed[level] : false; - } - - public lock(lockedBy: string): Error | undefined { - if (this.lockedBy !== undefined) { - return new Error(`Already locked by ${this.lockedBy}`); - } - this.lockedBy = lockedBy; - return undefined; - } - - public isDebugging(): boolean { - return this.debugging; - } - - public setDebugging(state: boolean): void { - this.debugging = state; - } -} - -export const state = new State(); diff --git a/application/platform/log/utils.ts b/application/platform/log/utils.ts deleted file mode 100644 index 10acc9d964..0000000000 --- a/application/platform/log/utils.ts +++ /dev/null @@ -1,66 +0,0 @@ -import { getProp, asAnyObj } from '../env/obj'; -import { LOGS_LEVEL_TABLE, Level, NumericLevel } from './levels'; - -export function cutUuid(uuid: string): string { - return uuid.substring(0, 8); -} - -export function isValidLevel(level: string): boolean { - return getLogLevelFromStr(level) !== undefined; -} - -export function getLogLevelFromStr(str: any): Level | undefined { - if (typeof str !== 'string') { - return undefined; - } - str = str.toUpperCase(); - if (getProp(LOGS_LEVEL_TABLE, str) === undefined) { - return undefined; - } - return str as Level; -} - -export function strToLogLevel(level: string): Level { - if (getProp(LOGS_LEVEL_TABLE, level) === undefined) { - return Level.WARNING; - } else { - return getProp(LOGS_LEVEL_TABLE, level) as Level; - } -} - -export function numToLogLevel(level: number): Level { - return NumericLevel[level] === undefined ? Level.WARNING : NumericLevel[level]; -} - -export function error(err: Error | unknown): string { - if (typeof err === 'string') { - return err; - } else if (err instanceof Error) { - return err.message; - } else if (err === undefined || err === null) { - return `undefined/null`; - } else if (typeof err === 'object') { - if ( - Object.keys(err).length === 1 && - typeof (err as any)[Object.keys(err)[0]] === 'string' - ) { - return `${Object.keys(err)[0]}: ${(err as any)[Object.keys(err)[0]]}`; - } else { - try { - const msg = JSON.stringify(err); - return msg.length > 250 ? `${msg.substring(0, 250)}(...)` : msg; - } catch (_) { - return `${err}`; - } - } - } else if (typeof (err as any).toString === 'function') { - return (err as any).toString() as string; - } else { - return `${err}`; - } -} - -export function getErrorCode(err: Error | unknown): number | string | undefined { - const code = asAnyObj(err)['code']; - return typeof code === 'string' ? code : typeof code === 'number' ? code : undefined; -} diff --git a/application/platform/modules/index.ts b/application/platform/modules/index.ts deleted file mode 100644 index 9f5a4d2c47..0000000000 --- a/application/platform/modules/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * as system from './system'; diff --git a/application/platform/modules/system.ts b/application/platform/modules/system.ts deleted file mode 100644 index 44048a8b8d..0000000000 --- a/application/platform/modules/system.ts +++ /dev/null @@ -1,170 +0,0 @@ -import { SetupService, Interface, Implementation, register, getRegistred } from '../entity/service'; -import { utils, Logger } from '../log'; - -import { scope } from '../env/scope'; -import { unique } from '../env/sequence'; -import { Subject } from '../env/subscription'; - -const SERVICE_DEF = { - name: 'system', - uuid: unique(), -}; - -export interface Destroyer { - destroyer: () => Promise; - owner: string; -} - -@SetupService(SERVICE_DEF) -export class Service extends Implementation { - private _inited: Array = []; - private _register: Map = new Map(); - private _logger: Logger = scope.getLogger(SERVICE_DEF.name); - private _destroyers: Set = new Set(); - public readonly subjects: { - inited: Subject; - ready: Subject; - } = { - inited: new Subject(), - ready: new Subject(), - }; - - public override async init(hooks?: { - // Will be triggered before sending "ready" to each service - before?: () => Promise; - // Will be triggered after "ready" sent to each service - after?: () => Promise; - }): Promise { - const inited = this._inited; - const register = this._register; - const logger = this._logger; - logger.debug(`initing services...`); - async function initialize( - service: Interface & Implementation, - uuids: string[], - ): Promise { - if (uuids.includes(service.getUuid())) { - return service.getUuid(); - } - service.getDepencencies().forEach(async (dependency) => { - if (uuids.includes(dependency.getUuid())) { - return; - } - const uuid = await initialize(dependency, uuids); - uuids.push(uuid); - }); - await service.init(); - logger.debug(`service "${service.getName()}" inited`); - inited.unshift(service); - register.set(service.getUuid(), service); - uuids.push(service.getUuid()); - return service.getUuid(); - } - const services = Array.from(getRegistred().values()).filter( - (s) => s.getUuid() !== this.getUuid(), - ); - const uuids: string[] = [this.getUuid()]; - for (const service of services) { - try { - await initialize(service, uuids); - } catch (err: unknown) { - logger.error( - `Fail to init service "${service.getName()}" (${service.getUuid()}): ${utils.error( - err, - )}`, - ); - return Promise.reject(new Error(utils.error(err))); - } - } - logger.debug(`all services are inited...`); - this.subjects.inited.emit(); - if (hooks !== undefined && hooks.before !== undefined) { - await hooks.before(); - } - return new Promise((resolve, reject) => { - setTimeout(async () => { - for (const service of services) { - try { - await service.ready(); - } catch (err: unknown) { - logger.error( - `Fail to set "ready" state to service "${service.getName()}" (${service.getUuid()}): ${utils.error( - err, - )}`, - ); - return reject(new Error(utils.error(err))); - } - } - if (hooks !== undefined && hooks.after !== undefined) { - await hooks.after(); - } - resolve(); - this.subjects.ready.emit(); - }); - }); - } - - public override async destroy(): Promise { - for (const service of this._inited) { - try { - await service.destroy(); - this._logger.debug(`service "${service.getName()}" destroyed`); - } catch (err) { - return Promise.reject(new Error(utils.error(err))); - } - } - await Promise.all( - Array.from(this._destroyers.values()).map((desc) => { - return desc.destroyer().catch((err: Error) => { - this.log().error( - `Fail to call destroyer of ${desc.owner}. Error: ${err.message}`, - ); - }); - }), - ).catch(() => { - this.log().error(`Fail to call all destroyers`); - }); - return Promise.resolve(); - } - - public doOnDestroy(owner: string, destroyer: () => Promise): void { - this._destroyers.add({ - owner, - destroyer, - }); - } - - public getByUuid(uuid: string): S { - const target = this._register.get(uuid); - if (target === undefined) { - throw new Error(`Requested service "${uuid}" has not been found`); - } - return target as S; - } - - public getServicesAccessor(): (uuid: string) => S { - return this.getByUuid.bind(this); - } - - public state(): { - ready(): boolean; - inited(): boolean; - } { - const subjects = this.subjects; - return { - ready: (): boolean => { - return subjects.ready.emitted(); - }, - inited: (): boolean => { - return subjects.inited.emitted(); - }, - }; - } - - public isReady(): boolean { - return this.subjects.ready.emitted(); - } -} -export interface Service extends Interface {} - -export const system = register(new Service()); diff --git a/application/platform/package.json b/application/platform/package.json deleted file mode 100644 index 3539c113a7..0000000000 --- a/application/platform/package.json +++ /dev/null @@ -1,150 +0,0 @@ -{ - "name": "platform", - "version": "3.9.0", - "description": "Platform for Chipmunk", - "author": { - "name": "Dmitry Astafyev", - "email": "dmitry.astafyev@esrlabs.com", - "url": "https://www.esrlabs.com/" - }, - "repository": { - "type": "git", - "url": "https://github.com/esrlabs/chipmunk.git" - }, - "contributors": [ - { - "name": "Dmitry Astafyev", - "email": "dmitry.astafyev@esrlabs.com", - "url": "https://www.esrlabs.com/" - } - ], - "main": "./dist/lib.js", - "types": "./dist/lib.d.ts", - "copyright": "Copyright © 2022 year ESR Labs", - "devDependencies": { - "@types/node": "^22.10.10", - "@typescript-eslint/eslint-plugin": "^8.21.0", - "@typescript-eslint/parser": "^8.21.0", - "eslint": "^9.18.0", - "eslint-plugin-import": "^2.31.0", - "eslint-plugin-node": "^11.1.0", - "eslint-plugin-promise": "^7.2.1", - "tslib": "^2.6.2", - "typescript": "^5.7.3" - }, - "dependencies": { - "tslib": "^2.8.1" - }, - "scripts": { - "build": "node_modules/.bin/tsc -p tsconfig.json", - "prod": "node_modules/.bin/tsc -p tsconfig.json", - "lint": "node_modules/.bin/eslint . --max-warnings=0", - "check": "node_modules/.bin/tsc -p tsconfig.json --noemit" - }, - "exports": { - "./entity": "./dist/entity/index.js", - "./entity/controller": "./dist/entity/controller.js", - "./entity/logger": "./dist/entity/logger.js", - "./entity/service": "./dist/entity/service.js", - "./log": "./dist/log/index.js", - "./log/levels": "./dist/log/levels.js", - "./log/state": "./dist/log/state.js", - "./log/utils": "./dist/log/utils.js", - "./log/logger": "./dist/log/logger.js", - "./env": "./dist/env/index.js", - "./env/observer": "./dist/env/observer.js", - "./env/globals": "./dist/env/globals.js", - "./env/decorators": "./dist/env/decorators.js", - "./env/filters": "./dist/env/filters.js", - "./env/hash": "./dist/env/hash.js", - "./env/ipaddr": "./dist/env/ipaddr.js", - "./env/lock.token": "./dist/env/lock.token.js", - "./env/obj": "./dist/env/obj.js", - "./env/promise": "./dist/env/promise.js", - "./env/queue": "./dist/env/queue.js", - "./env/runner": "./dist/env/runner.js", - "./env/regex": "./dist/env/regex.js", - "./env/scope": "./dist/env/scope.js", - "./env/sequence": "./dist/env/sequence.js", - "./env/str": "./dist/env/str.js", - "./env/subscription": "./dist/env/subscription.js", - "./env/togglers": "./dist/env/togglers.js", - "./interfaces": "./dist/interfaces/index.js", - "./interfaces/interface.adb": "./dist/interfaces/interface.adb.js", - "./interfaces/interface.detect": "./dist/interfaces/interface.detect.js", - "./interfaces/interface.electron": "./dist/interfaces/interface.electron.js", - "./interfaces/interface.node.global": "./dist/interfaces/interface.node.global.js", - "./interfaces/interface.rust.api.general": "./dist/interfaces/interface.rust.api.general.js", - "./interfaces/interface.timerange": "./dist/interfaces/interface.timerange.js", - "./ipc": "./dist/ipc/index.js", - "./ipc/event": "./dist/ipc/event/index.js", - "./ipc/request": "./dist/ipc/request/index.js", - "./ipc/setup": "./dist/ipc/setup/index.js", - "./ipc/setup/channels": "./dist/ipc/setup/channels.js", - "./ipc/transport": "./dist/ipc/transport/index.js", - "./ipc/transport/errors": "./dist/ipc/transport/errors/index.js", - "./ipc/transport/errors/native": "./dist/ipc/transport/errors/native.js", - "./modules": "./dist/modules/index.js", - "./modules/system": "./dist/modules/system.js", - "./types": "./dist/types/index.js", - "./types/sde/index": "./dist/types/sde/index.js", - "./types/files": "./dist/types/files.js", - "./types/content": "./dist/types/content.js", - "./types/filter": "./dist/types/filter.js", - "./types/chart": "./dist/types/chart.js", - "./types/comment": "./dist/types/comment.js", - "./types/bookmark": "./dist/types/bookmark.js", - "./types/exporting": "./dist/types/exporting.js", - "./types/observe": "./dist/types/observe/index.js", - "./types/observe/factory": "./dist/types/observe/factory.js", - "./types/observe/description": "./dist/types/observe/description.js", - "./types/observe/parser": "./dist/types/observe/parser/index.js", - "./types/observe/parser/dlt": "./dist/types/observe/parser/dlt/index.js", - "./types/observe/parser/someip": "./dist/types/observe/parser/someip/index.js", - "./types/observe/parser/text": "./dist/types/observe/parser/text/index.js", - "./types/observe/types": "./dist/types/observe/types/index.js", - "./types/observe/types/file": "./dist/types/observe/types/file/index.js", - "./types/observe/types/sourcelink": "./dist/types/observe/types/sourcelink.js", - "./types/observe/origin": "./dist/types/observe/origin/index.js", - "./types/observe/origin/file": "./dist/types/observe/origin/file.js", - "./types/observe/origin/concat": "./dist/types/observe/origin/concat.js", - "./types/observe/origin/stream": "./dist/types/observe/origin/stream.js", - "./types/observe/origin/stream/index": "./dist/types/observe/origin/stream/index.js", - "./types/observe/origin/stream/process": "./dist/types/observe/origin/stream/process/index.js", - "./types/observe/origin/stream/udp": "./dist/types/observe/origin/stream/udp/index.js", - "./types/observe/origin/stream/tcp": "./dist/types/observe/origin/stream/tcp/index.js", - "./types/observe/origin/stream/serial": "./dist/types/observe/origin/stream/serial/index.js", - "./types/range": "./dist/types/range.js", - "./types/hotkeys/map": "./dist/types/hotkeys/map.js", - "./types/parsers": "./dist/types/parsers/index.js", - "./types/parsers/dlt": "./dist/types/parsers/dlt.js", - "./types/parsers/someip": "./dist/types/parsers/someip.js", - "./types/storage": "./dist/types/storage/index.js", - "./types/storage/json": "./dist/types/storage/json.js", - "./types/storage/entry": "./dist/types/storage/entry.js", - "./types/storage/storage": "./dist/types/storage/storage.js", - "./types/storage/storage.record": "./dist/types/storage/storage.record.js", - "./types/storage/storage.record.validators": "./dist/types/storage/storage.record.validators.js", - "./types/transport": "./dist/types/transport/index.js", - "./types/transport/process": "./dist/types/transport/process.js", - "./types/transport/serial": "./dist/types/transport/serial.js", - "./types/transport/tcp": "./dist/types/transport/tcp.js", - "./types/transport/udp": "./dist/types/transport/udp.js", - "./types/io/read": "./dist/types/io/read.js", - "./types/io/write": "./dist/types/io/write.js", - "./types/settings/element": "./dist/types/settings/element.js", - "./types/settings/entry": "./dist/types/settings/entry.js", - "./types/settings/entry.description": "./dist/types/settings/entry.description.js", - "./types/life/destroyable": "./dist/types/life/destroyable.js", - "./types/unity/mutable": "./dist/types/unity/mutable.js", - "./types/notification/index": "./dist/types/notification/index.js", - "./types/github": "./dist/types/github/index.js", - "./types/github/chart": "./dist/types/github/chart.js", - "./types/github/filemetadata": "./dist/types/github/filemetadata.js", - "./types/github/filter": "./dist/types/github/filter.js", - "./types/bindings": "./dist/types/bindings/index.js", - "./types/net": "./dist/types/net.js", - "./package.json": "./package.json" - }, - "packageManager": "yarn@4.6.0" -} diff --git a/application/platform/tsconfig.json b/application/platform/tsconfig.json deleted file mode 100644 index 2673c48f74..0000000000 --- a/application/platform/tsconfig.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "compilerOptions": { - "baseUrl": ".", - "outDir": "./dist/", - "forceConsistentCasingInFileNames": true, - "strict": true, - "noImplicitOverride": true, - "noPropertyAccessFromIndexSignature": true, - "noImplicitReturns": true, - "noFallthroughCasesInSwitch": true, - "inlineSourceMap": true, - "declaration": true, - "downlevelIteration": true, - "experimentalDecorators": true, - "emitDecoratorMetadata": true, - "moduleResolution": "Node", - "importHelpers": true, - "noImplicitAny": true, - "target": "ESNext", - "module": "CommonJS", - "esModuleInterop": true, - "skipLibCheck": true, - "lib": ["ESNext"], - "types": ["node"] - }, - "files": ["./lib.ts"], - "include": ["./types/"] -} diff --git a/application/platform/types/bindings/attachment.ts b/application/platform/types/bindings/attachment.ts deleted file mode 100644 index 2dea61cbc9..0000000000 --- a/application/platform/types/bindings/attachment.ts +++ /dev/null @@ -1,43 +0,0 @@ -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -/** - * Describes the content of attached data found in the `payload` of a `dlt` message. - */ -export interface AttachmentInfo { - /** - * A unique identifier for the attachment. - */ - uuid: string; - /** - * The full path to the file. Note that `chipmunk` serializes the file name to ensure proper - * saving to disk, so the actual file name may differ from the value in the `name` field. - */ - filepath: string; - /** - * The name of the application, usually corresponding to the file name. - */ - name: string; - /** - * The file extension, if available. - */ - ext: string | null; - /** - * The size of the file in bytes. - */ - size: number; - /** - * The `mime` type of the file, if it could be determined. - */ - mime: string | null; - /** - * The log entry numbers containing the application data. Note that the application - * data may be contained in a single log entry or split into parts distributed - * across sequential log entries. - */ - messages: number[]; -} - -/** - * A list of attachments. - */ -export type AttachmentList = Array; diff --git a/application/platform/types/bindings/callback.ts b/application/platform/types/bindings/callback.ts deleted file mode 100644 index 96d5e7d479..0000000000 --- a/application/platform/types/bindings/callback.ts +++ /dev/null @@ -1,61 +0,0 @@ -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { AttachmentInfo } from "./attachment"; -import type { FilterMatchList } from "./miscellaneous"; -import type { NativeError } from "./error"; -import type { Progress } from "./progress"; - -/** - * Represents events sent to the client. - */ -export type CallbackEvent = { "StreamUpdated": number } | "FileRead" | { "SearchUpdated": { -/** - * The number of logs with matches. Can be `0` if the search is reset on the client side. - */ -found: number, -/** - * A map of search conditions and their global match counts within the session. - * - `String`: The search condition. - * - `u64`: The count of matches. - */ -stat: Map, } } | { "IndexedMapUpdated": { -/** - * The number of log entries from search results available for reading. - */ -len: number, } } | { "SearchMapUpdated": FilterMatchList | null } | { "SearchValuesUpdated": Map } | { "AttachmentsUpdated": { -/** - * The size of the attachment in bytes. - */ -len: number, -/** - * The description of the attachment. - */ -attachment: AttachmentInfo, } } | { "Progress": { -/** - * The unique identifier of the operation. - */ -uuid: string, -/** - * Information about the progress. - */ -progress: Progress, } } | { "SessionError": NativeError } | { "OperationError": { -/** - * The unique identifier of the operation that caused the error. - */ -uuid: string, -/** - * The error details. - */ -error: NativeError, } } | { "OperationStarted": string } | { "OperationProcessing": string } | { "OperationDone": OperationDone } | "SessionDestroyed"; - -/** - * Contains the results of an operation. - */ -export type OperationDone = { -/** - * The unique identifier of the operation. - */ -uuid: string, -/** - * The results of the operation, if available. - */ -result: Array | null, }; diff --git a/application/platform/types/bindings/command.ts b/application/platform/types/bindings/command.ts deleted file mode 100644 index fc910ad06b..0000000000 --- a/application/platform/types/bindings/command.ts +++ /dev/null @@ -1,186 +0,0 @@ -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -/** - * Represents the result of a command execution. - * At the core level, this type is used for all commands invoked within an `UnboundSession`. - * It is only used to indicate the successful completion or interruption of a command. - */ -export type CommandOutcomeBool = { Finished: boolean } | 'Cancelled'; - -/** - * Represents the result of a command execution. - * At the core level, this type is used for all commands invoked within an `UnboundSession`. - * It is only used to indicate the successful completion or interruption of a command. - */ -export type CommandOutcomeDltStatisticInfoResult = { Finished: DltStatisticInfo } | 'Cancelled'; - -/** - * Represents the result of a command execution. - * At the core level, this type is used for all commands invoked within an `UnboundSession`. - * It is only used to indicate the successful completion or interruption of a command. - */ -export type CommandOutcomeFoldersScanningResult = { Finished: FoldersScanningResult } | 'Cancelled'; - -/** - * Represents the result of a command execution. - * At the core level, this type is used for all commands invoked within an `UnboundSession`. - * It is only used to indicate the successful completion or interruption of a command. - */ -export type CommandOutcomeOptionalString = { Finished: string | null } | 'Cancelled'; - -/** - * Represents the result of a command execution. - * At the core level, this type is used for all commands invoked within an `UnboundSession`. - * It is only used to indicate the successful completion or interruption of a command. - */ -export type CommandOutcomeProfilesResult = { Finished: ProfileList } | 'Cancelled'; - -/** - * Represents the result of a command execution. - * At the core level, this type is used for all commands invoked within an `UnboundSession`. - * It is only used to indicate the successful completion or interruption of a command. - */ -export type CommandOutcomeSerialPortsList = { Finished: SerialPortsList } | 'Cancelled'; - -/** - * Represents the result of a command execution. - * At the core level, this type is used for all commands invoked within an `UnboundSession`. - * It is only used to indicate the successful completion or interruption of a command. - */ -export type CommandOutcomeString = { Finished: string } | 'Cancelled'; - -/** - * Represents the result of a command execution. - * At the core level, this type is used for all commands invoked within an `UnboundSession`. - * It is only used to indicate the successful completion or interruption of a command. - */ -export type CommandOutcomeVoid = 'Finished' | 'Cancelled'; - -/** - * Represents the result of a command execution. - * At the core level, this type is used for all commands invoked within an `UnboundSession`. - * It is only used to indicate the successful completion or interruption of a command. - */ -export type CommandOutcomei64 = { Finished: number } | 'Cancelled'; - -export type DltLevelDistribution = { - non_log: number; - log_fatal: number; - log_error: number; - log_warning: number; - log_info: number; - log_debug: number; - log_verbose: number; - log_invalid: number; -}; - -export type DltStatisticInfo = { - app_ids: Array<[string, DltLevelDistribution]>; - context_ids: Array<[string, DltLevelDistribution]>; - ecu_ids: Array<[string, DltLevelDistribution]>; - contained_non_verbose: boolean; -}; - -/** - * Represents a folder entity in the file system. - */ -export type FolderEntity = { - /** - * The name of the entity (file or folder). - */ - name: string; - /** - * The full path of the entity. - */ - fullname: string; - /** - * The type of the entity (e.g., file, directory, symbolic link). - */ - kind: FolderEntityType; - /** - * Optional detailed information about the entity. - */ - details: FolderEntityDetails | null; -}; - -/** - * Contains detailed information about a folder entity. - */ -export type FolderEntityDetails = { - /** - * The name of the file or folder. - */ - filename: string; - /** - * The full path to the file or folder. - */ - full: string; - /** - * The directory path containing the file or folder. - */ - path: string; - /** - * The base name of the file or folder. - */ - basename: string; - /** - * The file extension, if applicable. - */ - ext: string; -}; - -/** - * Represents the type of a folder entity in the file system. - */ -export enum FolderEntityType { - BlockDevice = 'BlockDevice', - CharacterDevice = 'CharacterDevice', - Directory = 'Directory', - FIFO = 'FIFO', - File = 'File', - Socket = 'Socket', - SymbolicLink = 'SymbolicLink', -} - -/** - * Represents the result of scanning a folder. - */ -export type FoldersScanningResult = { - /** - * A list of folder entities found during the scan. - */ - list: Array; - /** - * Indicates whether the maximum length of results was reached. - */ - max_len_reached: boolean; -}; - -/** - * Represents a list of serial ports. - * - * This structure contains a vector of strings, where each string represents the name - * or identifier of a serial port available on the system. - */ -export type ProfileList = Array; - -/** - * Represents a list of serial ports. - * - * This structure contains a vector of strings, where each string represents the name - * or identifier of a serial port available on the system. - */ -export type SerialPortsList = Array; - -export type ShellProfile = { - shell: ShellType; - /** - * Path to executable file of shell - */ - path: string; -}; - -/** - * Represents most well known shells that are not used by default on OS. - */ -export type ShellType = 'Bash' | 'Zsh' | 'Fish' | 'NuShell' | 'Elvish' | 'Pwsh'; diff --git a/application/platform/types/bindings/dlt.ts b/application/platform/types/bindings/dlt.ts deleted file mode 100644 index de8c67bae7..0000000000 --- a/application/platform/types/bindings/dlt.ts +++ /dev/null @@ -1,22 +0,0 @@ -export interface DltFilterConfig { - /// only select log entries with level MIN_LEVEL and more severe - /// - /// ``` text - /// 1 => FATAL - /// 2 => ERROR - /// 3 => WARN - /// 4 => INFO - /// 5 => DEBUG - /// 6 => VERBOSE - /// ``` min_log_level?: number, - /// what app ids should be allowed. - app_ids?: string[]; - /// what ecu ids should be allowed - ecu_ids?: string[]; - /// what context ids should be allowed - context_ids?: string[]; - /// how many app ids exist in total - app_id_count: number; - /// how many context ids exist in total - context_id_count: number; -} diff --git a/application/platform/types/bindings/error.ts b/application/platform/types/bindings/error.ts deleted file mode 100644 index 2d678c253d..0000000000 --- a/application/platform/types/bindings/error.ts +++ /dev/null @@ -1,33 +0,0 @@ -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -/** - * Describes the type and details of an error. - */ -export type ComputationError = "DestinationPath" | "SessionCreatingFail" | { "Communication": string } | { "OperationNotSupported": string } | { "IoOperation": string } | "InvalidData" | { "InvalidArgs": string } | { "Process": string } | { "Protocol": string } | { "SearchError": string } | "MultipleInitCall" | "SessionUnavailable" | { "NativeError": NativeError } | { "Grabbing": string } | { "Sde": string } | { "Decoding": string } | { "Encoding": string }; - -/** - * Describes the details of an error. - */ -export type NativeError = { -/** - * The severity level of the error. - */ -severity: Severity, -/** - * The type or source of the error. - */ -kind: NativeErrorKind, -/** - * A detailed message describing the error. - */ -message: string | null, }; - -/** - * Defines the source or type of an error. - */ -export type NativeErrorKind = "FileNotFound" | "UnsupportedFileType" | "ComputationFailed" | "Configuration" | "Interrupted" | "OperationSearch" | "NotYetImplemented" | "ChannelError" | "Io" | "Grabber" | "Plugins"; - -/** - * Indicates the severity level of an error. - */ -export type Severity = "WARNING" | "ERROR"; diff --git a/application/platform/types/bindings/index.ts b/application/platform/types/bindings/index.ts deleted file mode 100644 index 1ebc9c2ab8..0000000000 --- a/application/platform/types/bindings/index.ts +++ /dev/null @@ -1,11 +0,0 @@ -export * from './attachment'; -export * from './callback'; -export * from './command'; -export * from './error'; -export * from './lf_transition'; -export * from './miscellaneous'; -export * from './observe'; -export * from './progress'; -export * from './dlt'; -export * from './operations'; -export * from './plugins'; diff --git a/application/platform/types/bindings/lf_transition.ts b/application/platform/types/bindings/lf_transition.ts deleted file mode 100644 index de4a4003ee..0000000000 --- a/application/platform/types/bindings/lf_transition.ts +++ /dev/null @@ -1,23 +0,0 @@ -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { Ticks } from "./progress"; - -/** - * Describes the progress of an operation. - */ -export type LifecycleTransition = { "Started": { -/** - * The unique identifier of the operation. - */ -uuid: string, -/** - * A user-friendly name of the operation for display purposes. - */ -alias: string, } } | { "Ticks": { -/** - * The unique identifier of the operation. - */ -uuid: string, -/** - * The progress data associated with the operation. - */ -ticks: Ticks, } } | { "Stopped": string }; diff --git a/application/platform/types/bindings/miscellaneous.ts b/application/platform/types/bindings/miscellaneous.ts deleted file mode 100644 index 8b2df171f1..0000000000 --- a/application/platform/types/bindings/miscellaneous.ts +++ /dev/null @@ -1,109 +0,0 @@ -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -/** - * Data about indices (log entry numbers). Used to provide information about - * the nearest search results relative to a specific log entry number. - */ -export type AroundIndexes = [number | undefined | null, number | undefined | null]; - -/** - * Describes a match for a search condition. - */ -export type FilterMatch = { - /** - * The index (number) of the matching log entry. - */ - index: number; - /** - * The identifiers of the filters (search conditions) that matched - * the specified log entry. - */ - filters: Array; -}; - -/** - * A list of matches for a search condition. - */ -export type FilterMatchList = Array; - -/** - * Information about a log entry. - */ -export type GrabbedElement = { - /** - * The unique identifier of the source. - */ - source_id: number; - /** - * The textual content of the log entry. - */ - content: string; - /** - * The position of the log entry in the overall stream. - */ - pos: number; - /** - * The nature of the log entry, represented as a bitmask. Possible values include: - * - `SEARCH`: Nature = Nature(1) - * - `BOOKMARK`: Nature = Nature(1 << 1) - * - `EXPANDED`: Nature = Nature(1 << 5) - * - `BREADCRUMB`: Nature = Nature(1 << 6) - * - `BREADCRUMB_SEPARATOR`: Nature = Nature(1 << 7) - */ - nature: number; -}; - -/** - * A list of log entries. - */ -export type GrabbedElementList = Array; - -export type MapKeyValue = Map; - -/** - * Representation of ranges. We cannot use std ranges as soon as no way - * to derive Serialize, Deserialize - */ -export type Range = { start: number; end: number }; - -/** - * A list of ranges to read. - */ -export type Ranges = Array; - -/** - * A request to a stream that supports feedback, such as a terminal command - * that accepts input through `stdin`. - */ -export type SdeRequest = { WriteText: string } | { WriteBytes: Array }; - -/** - * The response from a source to a sent `SdeRequest`. Note that sending data - * with `SdeRequest` does not guarantee a response, as the behavior depends - * on the source. - */ -export type SdeResponse = { - /** - * The number of bytes received. - */ - bytes: number; -}; - -/** - * Describes a data source. - */ -export type SourceDefinition = { - /** - * The unique identifier of the source. - */ - id: number; - /** - * The user-friendly name of the source for display purposes. - */ - alias: string; -}; - -/** - * A list of data sources. - */ -export type Sources = Array; diff --git a/application/platform/types/bindings/observe.ts b/application/platform/types/bindings/observe.ts deleted file mode 100644 index 4abee2409e..0000000000 --- a/application/platform/types/bindings/observe.ts +++ /dev/null @@ -1,185 +0,0 @@ -/** - * ATTENTION: - * REFERENCE TO `DltFilterConfig` HAS BEEN ADDED MANUALLY - * BECAUSE THIS TYPE IS NOT GENERATED BY `ts_rs`. - */ -import { DltFilterConfig } from './dlt'; -import type { PluginParserSettings } from './plugins'; - -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { ShellProfile } from './command'; - -/** - * Settings for the DLT parser. - */ -export type DltParserSettings = { - /** - * Configuration for filtering DLT messages. - */ - filter_config: DltFilterConfig; - /** - * Paths to FIBEX files for additional interpretation of `payload` content. - */ - fibex_file_paths: Array | null; - /** - * Indicates whether the source contains a `StorageHeader`. Set to `true` if applicable. - */ - with_storage_header: boolean; - /** - * Timezone for timestamp adjustment. If specified, timestamps are converted to this timezone. - */ - tz: string | null; -}; - -/** - * Supported file formats for observation. - */ -export type FileFormat = 'PcapNG' | 'PcapLegacy' | 'Text' | 'Binary'; - -/** - * Multicast configuration information. - * - `multiaddr`: A valid multicast address. - * - `interface`: The address of the local interface used to join the multicast group. - * If set to `INADDR_ANY`, the system selects an appropriate interface. - */ -export type MulticastInfo = { multiaddr: string; interface: string | null }; - -/** - * Options for observing data within a session. - */ -export type ObserveOptions = { - /** - * The description of the data source. - */ - origin: ObserveOrigin; - /** - * The parser configuration to be applied. - */ - parser: ParserType; -}; - -/** - * Describes the source of data for observation. - */ -export type ObserveOrigin = - | { File: [string, FileFormat, string] } - | { Concat: Array<[string, FileFormat, string]> } - | { Stream: [string, Transport] }; - -/** - * Specifies the parser to be used for processing session data. - */ -export type ParserType = - | { Dlt: DltParserSettings } - | { SomeIp: SomeIpParserSettings } - | { Text: null } - | { Plugin: PluginParserSettings }; - -/** - * Configuration for executing terminal commands. - */ -export type ProcessTransportConfig = { - /** - * The working directory for the command. - */ - cwd: string; - /** - * The command to execute. - */ - command: string; - /** - * Optional shell infos if user selected one other than the default shells - */ - shell: ShellProfile | null; -}; - -/** - * Configuration for serial port connections. - */ -export type SerialTransportConfig = { - /** - * The path to the serial port. - */ - path: string; - /** - * The baud rate for the connection. - */ - baud_rate: number; - /** - * The number of data bits per frame. - */ - data_bits: number; - /** - * The flow control setting. - */ - flow_control: number; - /** - * The parity setting. - */ - parity: number; - /** - * The number of stop bits. - */ - stop_bits: number; - /** - * The delay in sending data, in milliseconds. - */ - send_data_delay: number; - /** - * Whether the connection is exclusive. - */ - exclusive: boolean; -}; - -/** - * Settings for the SomeIp parser. - */ -export type SomeIpParserSettings = { - /** - * Paths to FIBEX files for additional interpretation of `payload` content. - */ - fibex_file_paths: Array | null; -}; - -/** - * Configuration for TCP connections. - */ -export type TCPTransportConfig = { - /** - * The address to bind the TCP connection to. - */ - bind_addr: string; -}; - -/** - * Describes the transport source for a session. - */ -export type Transport = - | { Process: ProcessTransportConfig } - | { TCP: TCPTransportConfig } - | { UDP: UDPTransportConfig } - | { Serial: SerialTransportConfig }; - -/** - * Configuration for UDP connections. - */ -export type UDPTransportConfig = { - /** - * The address to bind the UDP connection to. - */ - bind_addr: string; - /** - * A list of multicast configurations. - */ - multicast: Array; -}; - -/** - * Configuration for UDP connections. - */ -export type UdpConnectionInfo = { - /** - * A list of multicast addresses to listen on. - */ - multicast_addr: Array; -}; diff --git a/application/platform/types/bindings/operations.ts b/application/platform/types/bindings/operations.ts deleted file mode 100644 index 5989527ca1..0000000000 --- a/application/platform/types/bindings/operations.ts +++ /dev/null @@ -1,48 +0,0 @@ -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -/** - * Used to delivery results of extracting values. That's used in the scope - * of chart feature - */ -export type ExtractedMatchValue = { -/** - * The index of log entry (row number) - */ -index: number, -/** - * List of matches: - * `usize` - index of filter - * `Vec` - list of extracted values - */ -values: Array<[number, Array]>, }; - -export type NearestPosition = { index: number, position: number, }; - -/** - *(row_number, min_value_in_range, max_value_in_range, value) - * value - can be last value in range or some kind of average - */ -export type Point = { row: number, min: number, max: number, y_value: number, }; - -export type ResultBool = boolean; - -/** - * The list of `ExtractedMatchValue` - */ -export type ResultExtractedMatchValues = Array; - -export type ResultNearestPosition = NearestPosition | null; - -/** - * Scaled chart data - */ -export type ResultScaledDistribution = Array>; - -export type ResultSearchValues = Map; - -/** - * Used only for debug session lifecycle - */ -export type ResultSleep = { sleep_well: boolean, }; - -export type ResultU64 = number; diff --git a/application/platform/types/bindings/plugins.ts b/application/platform/types/bindings/plugins.ts deleted file mode 100644 index fdd9107ec8..0000000000 --- a/application/platform/types/bindings/plugins.ts +++ /dev/null @@ -1,241 +0,0 @@ -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. - -/** - * Represents the infos of a column that will be used in the render options. - */ -export type ColumnInfo = { - /** - * Header title to be rendered on the top of the column in log view. - */ - caption: string; - /** - * Description to be shown as tooltip for the column. - */ - description: string; - /** - * Width of column (-1) for unlimited. - */ - width: number; -}; - -/** - * Represents the options needs to render columns information if they exist. - */ -export type ColumnsRenderOptions = { - /** - * List of columns infos providing the needed information for each column in log view. - * - * Note: The count of this list must match the count of the column of each log message. - */ - columns: Array; - /** - * Minimum column width. - */ - min_width: number; - /** - * Maximum column width. - */ - max_width: number; -}; - -/** - * Represents the informations of an invalid plugin. - */ -export type InvalidPluginEntity = { - /** - * Directory path of the plugin. Qualify as ID for the plugin. - */ - dir_path: string; - /** - * Represents the plugin type. - */ - plugin_type: PluginType; -}; - -/** - * Represents a list of [`InvalidPluginEntity`]. - */ -export type InvalidPluginsList = Array; - -/** - * Provides additional information to be rendered in the log view. - */ -export type ParserRenderOptions = { - /** - * Rendering information for the column if log messages have multiple columns. - * - * # Note: - * The count of the provided columns must match the count of the columns of each log message as well. - */ - columns_options: ColumnsRenderOptions | null; -}; - -/** - * General settings for all byte-sources as plugins - */ -export type PluginByteSourceGeneralSettings = { placeholder: string }; - -/** - * Settings for the Plugin Byte-Sources. - */ -export type PluginByteSourceSettings = { - plugin_path: string; - general_settings: PluginByteSourceGeneralSettings; - plugin_configs: Array; -}; - -/** - * Represents a configuration item, which includes an identifier and its corresponding value. - */ -export type PluginConfigItem = { id: string; value: PluginConfigValue }; - -/** - * Represents the schema for a configuration item. - */ -export type PluginConfigSchemaItem = { - id: string; - title: string; - description: string | null; - input_type: PluginConfigSchemaType; -}; - -/** - * Defines the possible input types for configuration schemas. - */ -export type PluginConfigSchemaType = - | { Boolean: boolean } - | { Integer: number } - | { Float: number } - | { Text: string } - | 'Directories' - | { Files: Array } - | { Dropdown: [Array, string] }; - -/** - * Represents the value of a configuration item. - */ -export type PluginConfigValue = - | { Boolean: boolean } - | { Integer: number } - | { Float: number } - | { Text: string } - | { Directories: Array } - | { Files: Array } - | { Dropdown: string }; - -/** - * Represents an installed plugin entity informations and configurations. - */ -export type PluginEntity = { - /** - * Directory path of the plugin. Qualify as ID for the plugin. - */ - dir_path: string; - /** - * Represents the plugin type. - */ - plugin_type: PluginType; - /** - * Include various information about the plugin. - */ - info: PluginInfo; - /** - * Provides Plugins Metadata from separate source than the plugin binary. - * Currently they are saved inside plugin `*.toml` file. - */ - metadata: PluginMetadata; - /** - * Path of the readme file for the plugin to be rendered on the front-end - */ - readme_path: string | null; -}; - -/** - * Contains the infos and options for a valid plugin. - */ -export type PluginInfo = { - wasm_file_path: string; - api_version: SemanticVersion; - plugin_version: SemanticVersion; - config_schemas: Array; - render_options: RenderOptions; -}; - -/** - * Represents different levels of logging severity for a plugin. - */ -export type PluginLogLevel = 'Err' | 'Warn' | 'Debug' | 'Info'; - -/** - * Represents a log message generated by a plugin. - */ -export type PluginLogMessage = { - /** - * The severity level of the log message. - */ - level: PluginLogLevel; - /** - * The timestamp of when the log message was generated, represented as a Unix timestamp. - */ - timestamp: bigint; - /** - * The actual content of the log message. - */ - msg: string; -}; - -/** - * Represents the plugins metadata like title, description... - */ -export type PluginMetadata = { title: string; description: string | null }; - -/** - * General settings for all parsers as plugins - */ -export type PluginParserGeneralSettings = { placeholder: string }; - -/** - * Settings for the Plugins parser. - */ -export type PluginParserSettings = { - plugin_path: string; - general_settings: PluginParserGeneralSettings; - plugin_configs: Array; -}; - -/** - * Maintains the state of a plugin, including its log messages. - * Represented as a struct (but not just a vector) to reserve - * a space for a future fields. - */ -export type PluginRunData = { - /** - * A collection of log messages associated with the plugin. - */ - logs: Array; -}; - -/** - * Represents plugins main types - */ -export type PluginType = 'Parser' | 'ByteSource'; - -/** - * Represents a list of [`PluginEntity`]. - */ -export type PluginsList = Array; - -/** - * Represents a list of [`InvalidPluginEntity`]. - */ -export type PluginsPathsList = Array; - -/** - * Represents the render options (columns headers, etc.) for the plugins. - */ -export type RenderOptions = { Parser: ParserRenderOptions } | 'ByteSource'; - -/** - * Represents the semantic version used in the plugins system. - */ -export type SemanticVersion = { major: number; minor: number; patch: number }; diff --git a/application/platform/types/bindings/progress.ts b/application/platform/types/bindings/progress.ts deleted file mode 100644 index e02a8793ee..0000000000 --- a/application/platform/types/bindings/progress.ts +++ /dev/null @@ -1,43 +0,0 @@ -// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. -import type { Severity } from "./error"; - -/** - * Represents a notification about an event (including potential errors) - * related to processing a specific log entry, if such data is available. - */ -export type Notification = { -/** - * The severity level of the event. - */ -severity: Severity, -/** - * The content or message describing the event. - */ -content: string, -/** - * The log entry number that triggered the event, if applicable. - */ -line: number | null, }; - -/** - * Describes the progress of an operation. - */ -export type Progress = { "Ticks": Ticks } | { "Notification": Notification } | "Stopped"; - -/** - * Provides detailed information about the progress of an operation. - */ -export type Ticks = { -/** - * The current progress count, typically representing `n` out of `100%`. - */ -count: number, -/** - * The name of the current progress stage, for user display purposes. - */ -state: string | null, -/** - * The total progress counter. Usually `100`, but for file operations, - * it might represent the file size, where `count` indicates the number of bytes read. - */ -total: number | null | undefined, }; diff --git a/application/platform/types/bookmark.ts b/application/platform/types/bookmark.ts deleted file mode 100644 index 6bd54f55ec..0000000000 --- a/application/platform/types/bookmark.ts +++ /dev/null @@ -1,3 +0,0 @@ -export interface BookmarkDefinition { - position: number; -} diff --git a/application/platform/types/chart.ts b/application/platform/types/chart.ts deleted file mode 100644 index dfa974cf2f..0000000000 --- a/application/platform/types/chart.ts +++ /dev/null @@ -1,17 +0,0 @@ -export enum ChartType { - Linear = 'Linear', - Stepper = 'Stepper', - Temperature = 'Temperature', -} - -export interface ChartDefinition { - filter: string; - color: string; - widths: { - line: number; - point: number; - }; - active: boolean; - type: ChartType; - uuid: string; -} diff --git a/application/platform/types/comment.ts b/application/platform/types/comment.ts deleted file mode 100644 index 464355bd76..0000000000 --- a/application/platform/types/comment.ts +++ /dev/null @@ -1,36 +0,0 @@ -export interface SelectionPoint { - position: number; - offset: number; - text: string; -} - -export interface CommentedSelection { - start: SelectionPoint; - end: SelectionPoint; - text: string; -} - -export enum CommentState { - done = 'done', - pending = 'pending', -} - -export interface Response { - uuid: string; - comment: string; - username: string; - created: number; - modified: number; -} - -export interface CommentDefinition { - uuid: string; - username: string; - state: CommentState; - comment: string; - created: number; - modified: number; - responses: Response[]; - color: string | undefined; - selection: CommentedSelection; -} diff --git a/application/platform/types/content.ts b/application/platform/types/content.ts deleted file mode 100644 index 1fbb14589b..0000000000 --- a/application/platform/types/content.ts +++ /dev/null @@ -1,166 +0,0 @@ -import { error } from '../log/utils'; -import { Mutable } from './unity/mutable'; -import { AttachmentInfo } from './bindings/attachment'; - -import * as obj from '../env/obj'; - -export enum IndexingMode { - Regular = 0, - Breadcrumbs = 1, -} - -export enum NatureTypes { - Search = 0, - Bookmark = 1, - Breadcrumb = 2, - BreadcrumbSeporator = 3, -} - -export class Nature { - static getBits(int: number, len: number): number[] { - const bits = []; - for (let i = len - 1; i > -1; --i) { - bits.push(0x01 & (int >> i)); - } - return bits; - } - - protected readonly bits: number[]; - public hidden: number = 0; - public readonly match: boolean; - public readonly bookmark: boolean; - public readonly breadcrumb: boolean; - public readonly seporator: boolean; - - constructor(int: number) { - this.bits = Nature.getBits(int, 8); - this.match = this.isMatch(); - this.bookmark = this.isBookmark(); - this.breadcrumb = this.isBreadcrumb(); - this.seporator = this.isSeporator(); - } - - protected isMatch(): boolean { - return this.bits[7] === 1; - } - - protected isBookmark(): boolean { - return this.bits[6] === 1; - } - - protected isBreadcrumb(): boolean { - return this.bits[1] === 1; - } - - protected isSeporator(): boolean { - return this.bits[0] === 1; - } - - public getTypes(): NatureTypes[] { - const types: NatureTypes[] = []; - if (this.match) { - types.push(NatureTypes.Search); - } - if (this.bookmark) { - types.push(NatureTypes.Bookmark); - } - if (this.breadcrumb) { - types.push(NatureTypes.Breadcrumb); - } - if (this.seporator) { - types.push(NatureTypes.BreadcrumbSeporator); - } - return types; - } - public isEq(nature: Nature): boolean { - return ( - this.bookmark === nature.bookmark && - this.match === nature.match && - this.breadcrumb === nature.breadcrumb && - this.seporator === nature.seporator && - this.hidden === nature.hidden - ); - } -} - -export class Attachment { - public readonly uuid: string; - public readonly filepath: string; - public readonly name: string; - public readonly ext: string | undefined; - public readonly size: number; - public readonly mime: string | undefined; - public readonly messages: number[]; - public readonly color: string | undefined; - - static from(smth: string | unknown): Attachment | Error { - try { - if (typeof smth === 'string') { - smth = JSON.parse(smth); - } - return new Attachment({ - uuid: obj.getAsString(smth, 'uuid'), - filepath: obj.getAsString(smth, 'filepath'), - name: obj.getAsString(smth, 'name'), - ext: obj.getAsNotEmptyStringOrAsUndefined(smth, 'ext'), - size: obj.getAsValidNumber(smth, 'size'), - mime: obj.getAsNotEmptyStringOrAsUndefined(smth, 'mime'), - messages: obj.getAsArray(smth, 'messages'), - }); - } catch (e) { - return new Error(error(e)); - } - } - - constructor(attachment: AttachmentInfo) { - this.uuid = attachment.uuid; - this.filepath = attachment.filepath; - this.name = attachment.name; - this.ext = attachment.ext ? attachment.ext : undefined; - this.size = attachment.size; - this.mime = attachment.mime ? attachment.mime : undefined; - this.messages = attachment.messages; - } - - public setColor(color: string): void { - (this as Mutable).color = color; - } - - public extAsString(): string { - return typeof this.ext === 'string' ? this.ext : ''; - } - - public is(): { - image(): boolean; - video(): boolean; - audio(): boolean; - text(): boolean; - } { - return { - image: (): boolean => { - if (typeof this.mime !== 'string') { - return false; - } - return this.mime.toLowerCase().includes('image'); - }, - video: (): boolean => { - if (typeof this.mime !== 'string') { - return false; - } - return this.mime.toLowerCase().includes('video'); - }, - audio: (): boolean => { - if (typeof this.mime !== 'string') { - return false; - } - return this.mime.toLowerCase().includes('audio'); - }, - text: (): boolean => { - if (typeof this.mime !== 'string') { - return false; - } - return this.mime.toLowerCase().includes('text'); - }, - }; - } -} diff --git a/application/platform/types/env/types.ts b/application/platform/types/env/types.ts deleted file mode 100644 index 32507655f7..0000000000 --- a/application/platform/types/env/types.ts +++ /dev/null @@ -1,35 +0,0 @@ -export abstract class Equal { - abstract isSame(entity: T): boolean; -} - -export abstract class Empty { - public abstract isEmpty(): boolean; -} - -export abstract class Validate { - public abstract validate(smth: T): Error | T; -} - -export abstract class SelfValidate { - public abstract validate(): Error | undefined; -} - -export abstract class Storable { - public abstract storable(): T; -} - -export abstract class Alias { - public abstract alias(): T; -} - -export abstract class Signature { - public abstract signature(): T; -} - -export abstract class Hash { - public abstract hash(): T; -} - -export abstract class Destroy { - public abstract destroy(): void; -} diff --git a/application/platform/types/exporting.ts b/application/platform/types/exporting.ts deleted file mode 100644 index 201276c01c..0000000000 --- a/application/platform/types/exporting.ts +++ /dev/null @@ -1,5 +0,0 @@ -export interface TextExportOptions { - columns: number[]; - spliter: string | undefined; - delimiter: string | undefined; -} diff --git a/application/platform/types/files.ts b/application/platform/types/files.ts deleted file mode 100644 index dc97a38621..0000000000 --- a/application/platform/types/files.ts +++ /dev/null @@ -1,129 +0,0 @@ -import { FileType } from './observe/types/file'; - -import * as obj from '../env/obj'; - -export enum EntityType { - BlockDevice = 0, - CharacterDevice = 1, - Directory = 2, - FIFO = 3, - File = 4, - Socket = 5, - SymbolicLink = 6, -} - -const EntityTypeRev: { [key: string]: EntityType } = { - ['BlockDevice']: EntityType.BlockDevice, - ['CharacterDevice']: EntityType.CharacterDevice, - ['Directory']: EntityType.Directory, - ['FIFO']: EntityType.FIFO, - ['File']: EntityType.File, - ['Socket']: EntityType.Socket, - ['SymbolicLink']: EntityType.SymbolicLink, -}; - -export interface Entity { - name: string; - fullname: string; - kind: EntityType; - details?: { - filename: string; - full: string; - path: string; - basename: string; - ext: string; - }; -} - -export function entityFromObj(smth: { [key: string]: unknown }): Entity { - if (typeof smth !== 'object') { - throw new Error(`Not an object`); - } - const entityType = EntityTypeRev[obj.getAsNotEmptyString(smth, 'kind')]; - if (entityType === undefined) { - throw new Error(`Unknown type: ${smth['kind']}`); - } - const entity: Entity = { - name: obj.getAsNotEmptyString(smth, 'name'), - fullname: obj.getAsNotEmptyString(smth, 'fullname'), - kind: entityType, - details: undefined, - }; - if (smth['details'] !== null && typeof smth['details'] === 'object') { - entity.details = { - filename: obj.getAsNotEmptyString(smth['details'], 'filename'), - full: obj.getAsNotEmptyString(smth['details'], 'full'), - path: obj.getAsNotEmptyString(smth['details'], 'path'), - basename: obj.getAsNotEmptyString(smth['details'], 'basename'), - ext: obj.getAsString(smth['details'], 'ext'), - }; - } - return entity; -} - -export interface File { - name: string; - ext: string; - path: string; - filename: string; - type: FileType; - stat: Stat; -} - -export interface Stat { - dev: number; - ino: number; - mode: number; - nlink: number; - uid: number; - gid: number; - rdev: number; - size: number; - blksize: number; - blocks: number; - atimeMs: number; - mtimeMs: number; - ctimeMs: number; - birthtimeMs: number; -} - -export interface ParsedPath { - name: string; - filename: string; - parent: string; - ext: string; -} - -const FILE_NAME_REG = /[^/\\]*$/gi; -const FILE_EXT_REG = /[^/\\.]*$/gi; - -export function getFileName(filename: string): string { - const match = FILE_NAME_REG.exec(filename); - if (match === null) { - return filename; - } - FILE_NAME_REG.lastIndex = 0; - return match[0]; -} - -export function getSafeFileName(filename: string): string { - return filename.replace(/[^\w\d\-.]/gi, '_'); -} - -export function getParentFolder(filename: string): string { - const name = getFileName(filename); - return filename.replace(name, '').replace(/[/\\]$/gi, ''); -} - -export function getFileExtention(filename: string): string { - const match = FILE_EXT_REG.exec(filename); - if (match === null) { - return ''; - } - FILE_EXT_REG.lastIndex = 0; - return match[0]; -} - -export function appendFileExtention(filename: string, ext: string) { - return `${filename}${ext.startsWith('.') || filename.endsWith('.') ? '' : '.'}${ext}`; -} diff --git a/application/platform/types/filter.ts b/application/platform/types/filter.ts deleted file mode 100644 index e5d229066c..0000000000 --- a/application/platform/types/filter.ts +++ /dev/null @@ -1,75 +0,0 @@ -export interface IFilterFlags { - reg: boolean; - word: boolean; - cases: boolean; -} - -export interface IFilter { - filter: string; - flags: IFilterFlags; -} - -export interface FilterDefinition { - filter: IFilter; - colors: FilterStyle; - active: boolean; - uuid: string; -} - -export interface FilterStyle { - color: string; - background: string; -} - -export interface FilterMatch { - index: number; - filters: number[]; -} - -export interface ISearchStats { - stats: Map; -} - -export interface ISearchUpdated { - found: number; - stat: Map; -} - -export enum EFlag { - cases = 'cases', - word = 'word', - reg = 'reg', -} - -export type ISearchMap = Array<[number, number][]>; - -export type IValuesMinMaxMap = { [key: number]: [number, number] }; - -export interface IExtractedMatch { - filter: IFilter; - values: string[]; -} - -export interface IExtractedValueSrc { - index: number; - values: Array<[number, string[]]>; -} -export type TExtractedValuesSrc = IExtractedValueSrc[]; - -export interface IExtractedValue { - position: number; // row position in the stream - values: IExtractedMatch[]; -} - -export type TExtractedValues = IExtractedValue[]; - -export interface IMatchEntity { - filter: string; - match: string; - row: number; -} - -export interface IMapEntity { - filter: string; - rows: number[]; -} diff --git a/application/platform/types/github/bookmarks.ts b/application/platform/types/github/bookmarks.ts deleted file mode 100644 index c5836ad8b7..0000000000 --- a/application/platform/types/github/bookmarks.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { BookmarkDefinition } from '../bookmark'; - -import * as validator from '../../env/obj'; - -const protocols: { [key: string]: (def: BookmarkDefinition) => BookmarkDefinition } = { - '0.0.1': (def: BookmarkDefinition): BookmarkDefinition => { - validator.isObject(def); - def.position = validator.getAsValidNumber(def, 'position'); - return def; - }, -}; - -export function getValidator(protocol: string): (def: BookmarkDefinition) => BookmarkDefinition { - if (protocols[protocol] === undefined) { - throw new Error(`No bookmarks protocol v${protocol} is found`); - } - return protocols[protocol]; -} - -export { BookmarkDefinition, protocols }; diff --git a/application/platform/types/github/chart.ts b/application/platform/types/github/chart.ts deleted file mode 100644 index 62f1bd3f57..0000000000 --- a/application/platform/types/github/chart.ts +++ /dev/null @@ -1,27 +0,0 @@ -import { ChartDefinition, ChartType } from '../chart'; - -import * as validator from '../../env/obj'; - -const protocols: { [key: string]: (def: ChartDefinition) => ChartDefinition } = { - '0.0.1': (def: ChartDefinition): ChartDefinition => { - validator.isObject(def); - def.uuid = validator.getAsNotEmptyString(def, 'uuid'); - def.color = validator.getAsNotEmptyString(def, 'color'); - def.widths = validator.getAsObj(def, 'widths'); - def.widths.line = validator.getAsValidNumber(def.widths, 'line'); - def.widths.point = validator.getAsValidNumber(def.widths, 'point'); - def.filter = validator.getAsNotEmptyString(def, 'filter'); - def.active = validator.getAsBool(def, 'active'); - def.type = validator.getAsNotEmptyString(def, 'type') as ChartType; - return def; - }, -}; - -export function getValidator(protocol: string): (def: ChartDefinition) => ChartDefinition { - if (protocols[protocol] === undefined) { - throw new Error(`No charts protocol v${protocol} is found`); - } - return protocols[protocol]; -} - -export { ChartDefinition, ChartType, protocols }; diff --git a/application/platform/types/github/comment.ts b/application/platform/types/github/comment.ts deleted file mode 100644 index 0fbdde05f7..0000000000 --- a/application/platform/types/github/comment.ts +++ /dev/null @@ -1,48 +0,0 @@ -import { - CommentDefinition, - CommentState, - CommentedSelection, - Response, - SelectionPoint, -} from '../comment'; - -import * as validator from '../../env/obj'; - -const protocols: { [key: string]: (def: CommentDefinition) => CommentDefinition } = { - '0.0.1': (def: CommentDefinition): CommentDefinition => { - validator.isObject(def); - def.uuid = validator.getAsNotEmptyString(def, 'uuid'); - def.color = validator.getAsNotEmptyStringOrAsUndefined(def, 'color'); - def.state = validator.getAsNotEmptyString(def, 'state') as CommentState; - def.created = validator.getAsValidNumber(def, 'created'); - def.modified = validator.getAsValidNumber(def, 'modified'); - def.selection = validator.getAsObj(def, 'selection'); - def.selection.text = validator.getAsString(def.selection, 'text'); - def.selection.start = validator.getAsObj(def.selection, 'start'); - def.selection.start.text = validator.getAsString(def.selection.start, 'text'); - def.selection.start.position = validator.getAsValidNumber(def.selection.start, 'position'); - def.selection.start.offset = validator.getAsValidNumber(def.selection.start, 'offset'); - def.selection.end = validator.getAsObj(def.selection, 'end'); - def.selection.end.text = validator.getAsString(def.selection.end, 'text'); - def.selection.end.position = validator.getAsValidNumber(def.selection.end, 'position'); - def.selection.end.offset = validator.getAsValidNumber(def.selection.end, 'offset'); - def.responses = validator.getAsArray(def, 'responses'); - def.responses.forEach((response) => { - validator.isObject(response); - response.created = validator.getAsValidNumber(response, 'created'); - response.modified = validator.getAsValidNumber(response, 'modified'); - response.uuid = validator.getAsNotEmptyString(response, 'uuid'); - response.comment = validator.getAsString(response, 'comment'); - }); - return def; - }, -}; - -export function getValidator(protocol: string): (def: CommentDefinition) => CommentDefinition { - if (protocols[protocol] === undefined) { - throw new Error(`No comments protocol v${protocol} is found`); - } - return protocols[protocol]; -} - -export { CommentDefinition, CommentState, CommentedSelection, Response, SelectionPoint, protocols }; diff --git a/application/platform/types/github/filemetadata.ts b/application/platform/types/github/filemetadata.ts deleted file mode 100644 index f2e1b9bc80..0000000000 --- a/application/platform/types/github/filemetadata.ts +++ /dev/null @@ -1,114 +0,0 @@ -import { hash } from '../../env/hash'; -import { SharingSettings } from './index'; - -import * as filters from './filter'; -import * as charts from './chart'; -import * as comments from './comment'; -import * as bookmarks from './bookmarks'; -import * as validator from '../../env/obj'; -import * as utils from '../../log/utils'; -import * as obj from '../../env/obj'; - -export class ProtocolError extends Error { - constructor( - msg: string, - public readonly supported: string[], - public readonly declared: string, - ) { - super(msg); - } -} -export interface FileMetaDataDefinition { - protocol: string; - filters: filters.FilterDefinition[]; - charts: charts.ChartDefinition[]; - bookmarks: bookmarks.BookmarkDefinition[]; - comments: comments.CommentDefinition[]; -} - -export class FileMetaData { - constructor(public readonly def: FileMetaDataDefinition) {} - - public get(): FileMetaDataDefinition { - return obj.clone(this.def); - } - public stringify(): string { - return JSON.stringify(this.def); - } - public hash(): { - full(): number; - filters(): number; - charts(): number; - bookmarks(): number; - comments(): number; - equal(settings: SharingSettings, target: FileMetaData): boolean; - } { - return { - full: (): number => { - return hash(JSON.stringify(this.def)); - }, - filters: (): number => { - return hash(JSON.stringify(this.def.filters)); - }, - charts: (): number => { - return hash(JSON.stringify(this.def.charts)); - }, - bookmarks: (): number => { - return hash(JSON.stringify(this.def.bookmarks)); - }, - comments: (): number => { - return hash(JSON.stringify(this.def.comments)); - }, - equal: (settings: SharingSettings, target: FileMetaData): boolean => { - if (settings.filters && this.hash().filters() !== target.hash().filters()) { - return false; - } - if (settings.charts && this.hash().charts() !== target.hash().charts()) { - return false; - } - if (settings.bookmarks && this.hash().bookmarks() !== target.hash().bookmarks()) { - return false; - } - if (settings.comments && this.hash().comments() !== target.hash().comments()) { - return false; - } - return true; - }, - }; - } -} - -export function fromJson(str: string): FileMetaDataDefinition | Error | ProtocolError { - try { - const def = JSON.parse(str); - return validate(def); - } catch (e) { - return new Error(utils.error(e)); - } -} - -export function validate(def: FileMetaDataDefinition): FileMetaDataDefinition { - validator.isObject(def); - def.protocol = validator.getAsNotEmptyString(def, 'protocol'); - if (protocols[def.protocol] === undefined) { - throw new ProtocolError('Protocol not found', Object.keys(protocols), def.protocol); - } - return protocols[def.protocol](def, def.protocol); -} - -const protocols: { - [key: string]: (def: FileMetaDataDefinition, protocol: string) => FileMetaDataDefinition; -} = { - '0.0.1': (def: FileMetaDataDefinition, protocol: string): FileMetaDataDefinition => { - validator.isObject(def); - def.filters = validator.getAsArray(def, 'filters'); - def.charts = validator.getAsArray(def, 'charts'); - def.bookmarks = validator.getAsArray(def, 'bookmarks'); - def.comments = validator.getAsArray(def, 'comments'); - def.filters.forEach((filter) => filters.getValidator(protocol)(filter)); - def.charts.forEach((chart) => charts.getValidator(protocol)(chart)); - def.comments.forEach((comment) => comments.getValidator(protocol)(comment)); - def.bookmarks.forEach((bookmark) => bookmarks.getValidator(protocol)(bookmark)); - return def; - }, -}; diff --git a/application/platform/types/github/filter.ts b/application/platform/types/github/filter.ts deleted file mode 100644 index ca0099a5ef..0000000000 --- a/application/platform/types/github/filter.ts +++ /dev/null @@ -1,30 +0,0 @@ -import { FilterDefinition } from '../filter'; - -import * as validator from '../../env/obj'; - -const protocols: { [key: string]: (def: FilterDefinition) => FilterDefinition } = { - '0.0.1': (def: FilterDefinition): FilterDefinition => { - validator.isObject(def); - def.uuid = validator.getAsNotEmptyString(def, 'uuid'); - def.colors = validator.getAsObj(def, 'colors'); - def.colors.color = validator.getAsNotEmptyString(def.colors, 'color'); - def.colors.background = validator.getAsNotEmptyString(def.colors, 'background'); - def.filter = validator.getAsObj(def, 'filter'); - def.filter.flags = validator.getAsObj(def.filter, 'flags'); - def.filter.flags.cases = validator.getAsBool(def.filter.flags, 'cases'); - def.filter.flags.word = validator.getAsBool(def.filter.flags, 'word'); - def.filter.flags.reg = validator.getAsBool(def.filter.flags, 'reg'); - def.filter.filter = validator.getAsNotEmptyString(def.filter, 'filter'); - def.active = validator.getAsBool(def, 'active'); - return def; - }, -}; - -export function getValidator(protocol: string): (def: FilterDefinition) => FilterDefinition { - if (protocols[protocol] === undefined) { - throw new Error(`No filter protocol v${protocol} is found`); - } - return protocols[protocol]; -} - -export { FilterDefinition, protocols }; diff --git a/application/platform/types/github/index.ts b/application/platform/types/github/index.ts deleted file mode 100644 index 31247bb172..0000000000 --- a/application/platform/types/github/index.ts +++ /dev/null @@ -1,44 +0,0 @@ -import * as validator from '../../env/obj'; - -export interface SharingSettings { - filters: boolean; - charts: boolean; - comments: boolean; - bookmarks: boolean; - readonly: boolean; -} - -export interface GitHubRepo { - uuid: string; - token: string; - repo: string; - owner: string; - branch: string; - entry: string | undefined; - settings: SharingSettings; -} - -export function getDefaultSharingSettings(): SharingSettings { - return { filters: true, charts: true, comments: true, bookmarks: true, readonly: false }; -} - -export function validateGitHubRepo(repo: GitHubRepo): GitHubRepo { - validator.isObject(repo); - repo.token = validator.getAsNotEmptyString(repo, 'token'); - repo.repo = validator.getAsNotEmptyString(repo, 'repo'); - repo.owner = validator.getAsNotEmptyString(repo, 'owner'); - repo.uuid = validator.getAsNotEmptyString(repo, 'uuid'); - repo.entry = validator.getAsNotEmptyStringOrAsUndefined(repo, 'entry'); - if (repo.settings === undefined) { - repo.settings = getDefaultSharingSettings(); - } else { - repo.settings = validator.getAsObj(repo, 'settings'); - repo.settings.bookmarks = validator.getAsBool(repo.settings, 'bookmarks'); - repo.settings.charts = validator.getAsBool(repo.settings, 'charts'); - repo.settings.filters = validator.getAsBool(repo.settings, 'filters'); - repo.settings.comments = validator.getAsBool(repo.settings, 'comments'); - repo.settings.readonly = - typeof repo.settings.readonly === 'boolean' ? repo.settings.readonly : false; - } - return repo; -} diff --git a/application/platform/types/hotkeys/map.ts b/application/platform/types/hotkeys/map.ts deleted file mode 100644 index 17d6c60d85..0000000000 --- a/application/platform/types/hotkeys/map.ts +++ /dev/null @@ -1,307 +0,0 @@ -export enum Category { - Files = 'Files', - Focus = 'Focus', - Tabs = 'Tabs', - Movement = 'Movement', - Areas = 'Areas', - Search = 'Search', - Other = 'Other', -} - -export enum Requirement { - Session = 'Session', - NoInput = 'NoInput', -} - -export interface Binding { - shift?: boolean; - ctrl?: boolean; - alt?: boolean; - // Should be TRUE for all keys, which are in coflict with collectable keys. - // For example, postpined = true for key 'g', because we have also key 'gg'. - postponed?: boolean; - key: string | string[]; -} - -export interface KeyDescription { - alias: string; - shortkeys: { - darwin?: string[]; - others: string[]; - }; - display: { - darwin?: string[]; - others: string[]; - }; - description: string; - category: Category; - required: Requirement[]; - uuid: string; - // Isn't visible in HotKeys popup - hidden?: boolean; - // true - listener is on browser layer; false - listener on holder(electron) - client: Binding | Binding[] | undefined; -} -//⌘ key -export const KeysMap: KeyDescription[] = [ - { - alias: 'Ctrl + T', - shortkeys: { darwin: ['Cmd + T'], others: ['Ctrl + T'] }, - display: { darwin: ['⌘ + T'], others: ['Ctrl + T'] }, - description: 'Home', - category: Category.Tabs, - required: [], - uuid: 'Ctrl + T', - client: undefined, - }, - { - alias: 'Ctrl + W', - shortkeys: { darwin: ['Cmd + W'], others: ['Ctrl + W'] }, - display: { darwin: ['⌘ + W'], others: ['Ctrl + W'] }, - description: 'Close active tab', - category: Category.Tabs, - required: [], - uuid: 'Ctrl + W', - client: undefined, - }, - { - alias: 'Ctrl + Tab', - shortkeys: { darwin: ['Control + Tab'], others: ['Ctrl + Tab'] }, - display: { darwin: ['Control + Tab'], others: ['Ctrl + Tab'] }, - description: 'Next tab', - category: Category.Tabs, - required: [], - uuid: 'Ctrl + Tab', - client: undefined, - }, - { - alias: 'Shift + Ctrl + Tab', - shortkeys: { darwin: ['Shift + Control + Tab'], others: ['Shift + Ctrl + Tab'] }, - display: { darwin: ['Shift + Control + Tab'], others: ['Shift + Ctrl + Tab'] }, - description: 'Previous tab', - category: Category.Tabs, - required: [], - uuid: 'Shift + Ctrl + Tab', - client: undefined, - }, - { - alias: 'Ctrl + P', - shortkeys: { darwin: ['Cmd + P'], others: ['Ctrl + P'] }, - display: { darwin: ['⌘ + P'], others: ['Ctrl + P'] }, - description: 'Explore files in favorites', - category: Category.Files, - required: [], - uuid: 'Ctrl + P', - client: undefined, - }, - { - alias: 'Shift + Ctrl + P', - shortkeys: { darwin: ['Shift + Cmd + P'], others: ['Shift + Ctrl + P'] }, - display: { darwin: ['Shift + ⌘ + P'], others: ['Shift + Ctrl + P'] }, - description: 'Show filter(s)/chart(s) presets', - category: Category.Search, - required: [Requirement.Session], - uuid: 'Shift + Ctrl + P', - client: undefined, - }, - { - alias: 'Ctrl + O', - shortkeys: { darwin: ['Cmd + O'], others: ['Ctrl + O'] }, - display: { darwin: ['⌘ + O'], others: ['Ctrl + O'] }, - description: 'Recent actions (Home)', - category: Category.Files, - required: [], - uuid: 'Ctrl + O', - client: undefined, - }, - { - alias: '[', - shortkeys: { others: ['['] }, - display: { others: ['['] }, - description: 'Select previous match row', - category: Category.Movement, - required: [Requirement.NoInput, Requirement.Session], - uuid: '[', - client: { key: '[' }, - }, - { - alias: ']', - shortkeys: { others: [']'] }, - display: { others: [']'] }, - description: 'Select next match row', - category: Category.Movement, - required: [Requirement.NoInput, Requirement.Session], - uuid: ']', - client: { key: ']' }, - }, - { - alias: 'j', - shortkeys: { others: ['j'] }, - display: { others: ['j'] }, - description: 'Select next bookmarked row', - category: Category.Movement, - required: [Requirement.NoInput, Requirement.Session], - uuid: 'j', - client: { key: 'j' }, - }, - { - alias: 'k', - shortkeys: { others: ['k'] }, - display: { others: ['k'] }, - description: 'Select previous bookmarked row', - category: Category.Movement, - required: [Requirement.NoInput, Requirement.Session], - uuid: 'k', - client: { key: 'k' }, - }, - { - alias: 'gg', - shortkeys: { others: ['gg'] }, - display: { others: ['gg'] }, - description: 'Scroll to beginning of main output', - category: Category.Movement, - required: [Requirement.NoInput, Requirement.Session], - uuid: 'gg', - client: { key: ['g', 'g'] }, - }, - { - alias: 'G', - shortkeys: { others: ['G'] }, - display: { others: ['G'] }, - description: 'Scroll to end of main output', - category: Category.Movement, - required: [Requirement.NoInput, Requirement.Session], - uuid: 'G', - client: { postponed: true, key: 'G' }, - }, - { - alias: 'Ctrl + G', - shortkeys: { darwin: ['Cmd + G'], others: ['Ctrl + G'] }, - display: { darwin: ['⌘ + G'], others: ['Ctrl + G'] }, - description: 'Jump to Row', - category: Category.Movement, - required: [Requirement.Session], - uuid: 'Ctrl + G', - client: undefined, - }, - { - alias: 'Ctrl + F', - shortkeys: { darwin: ['Cmd + F'], others: ['Ctrl + F'] }, - display: { darwin: ['⌘ + F'], others: ['Ctrl + F'] }, - description: 'Focus on search input', - category: Category.Focus, - required: [Requirement.Session], - uuid: 'Ctrl + F', - client: undefined, - }, - { - alias: 'Ctrl + Shift + F', - shortkeys: { darwin: ['Cmd + Shift + F'], others: ['Ctrl + Shift + F'] }, - display: { darwin: ['⌘ + Shift + F'], others: ['Ctrl + Shift + F'] }, - description: 'Toggle nested search', - category: Category.Search, - required: [Requirement.Session], - uuid: 'Ctrl + Shift + F', - client: undefined, - }, - { - alias: '/', - shortkeys: { others: ['/'] }, - display: { others: ['/'] }, - description: 'Focus on search input', - category: Category.Focus, - required: [Requirement.Session, Requirement.NoInput], - uuid: '/', - client: { key: '/' }, - }, - { - alias: 'Ctrl + 1', - shortkeys: { darwin: ['Cmd + 1'], others: ['Ctrl + 1'] }, - display: { darwin: ['⌘ + 1'], others: ['Ctrl + 1'] }, - description: 'Focus on main output', - category: Category.Focus, - required: [Requirement.Session], - uuid: 'Ctrl + 1', - client: undefined, - }, - { - alias: 'Ctrl + 2', - shortkeys: { darwin: ['Cmd + 2'], others: ['Ctrl + 2'] }, - display: { darwin: ['⌘ + 2'], others: ['Ctrl + 2'] }, - description: 'Focus on search results output', - category: Category.Focus, - required: [Requirement.Session], - uuid: 'Ctrl + 2', - client: undefined, - }, - { - alias: 'Ctrl + B', - shortkeys: { darwin: ['Cmd + B'], others: ['Ctrl + B'] }, - display: { darwin: ['⌘ + B'], others: ['Ctrl + B'] }, - description: 'Toggle sidebar', - category: Category.Areas, - required: [Requirement.Session], - uuid: 'Ctrl + B', - client: undefined, - }, - { - alias: 'Ctrl + J', - shortkeys: { darwin: ['Cmd + J'], others: ['Ctrl + J'] }, - display: { darwin: ['⌘ + J'], others: ['Ctrl + J'] }, - description: 'Toggle toolbar', - category: Category.Areas, - required: [Requirement.Session], - uuid: 'Ctrl + J', - client: undefined, - }, - { - alias: 'Ctrl + ,', - shortkeys: { darwin: ['Cmd + ,'], others: ['Ctrl + ,'] }, - display: { darwin: ['⌘ + ,'], others: ['Ctrl + ,'] }, - description: 'Show settings', - category: Category.Other, - required: [], - uuid: 'Ctrl + ,', - client: undefined, - }, - { - alias: '?', - shortkeys: { others: ['?'] }, - display: { others: ['?'] }, - description: 'Show this dialog', - category: Category.Other, - required: [Requirement.NoInput], - uuid: '?', - client: { key: '?' }, - }, - { - alias: 'Ctrl + Q', - shortkeys: { darwin: ['Cmd + Q'], others: ['Ctrl + Q'] }, - display: { darwin: ['⌘ + Q'], others: ['Ctrl + Q'] }, - description: 'Quit', - category: Category.Other, - required: [], - uuid: 'Ctrl + Q', - client: undefined, - }, - // Hidden - { - alias: 'Ctrl + C', - shortkeys: { darwin: ['Cmd + C'], others: ['Ctrl + C'] }, - display: { darwin: ['⌘ + C'], others: ['Ctrl + C'] }, - description: 'Copy to clipboard', - category: Category.Other, - required: [Requirement.NoInput], - uuid: 'Ctrl + C', - client: undefined, - hidden: true, - }, -]; - -export function getKeyByUuid(uuid: string): KeyDescription | undefined { - return KeysMap.find((k) => k.uuid === uuid); -} - -export function getKeyByAlias(alias: string): KeyDescription | undefined { - return KeysMap.find((k) => k.alias === alias); -} diff --git a/application/platform/types/index.ts b/application/platform/types/index.ts deleted file mode 100644 index ce08a3c16d..0000000000 --- a/application/platform/types/index.ts +++ /dev/null @@ -1,13 +0,0 @@ -export * as files from './files'; -export * as filter from './filter'; -export * as chart from './chart'; -export * as observe from './observe'; -export * as content from './content'; -export * as range from './range'; -export * as storage from './storage'; -export * as github from './github'; -export * as comment from './comment'; -export * as bookmark from './bookmark'; -export * as sde from './sde'; -export * as bindings from './bindings'; -export * as net from './net'; diff --git a/application/platform/types/io/read.ts b/application/platform/types/io/read.ts deleted file mode 100644 index f96522e0d2..0000000000 --- a/application/platform/types/io/read.ts +++ /dev/null @@ -1,7 +0,0 @@ -export abstract class ReadAsString { - public abstract read(): Promise; -} - -export abstract class Read { - public abstract read(): Promise; -} diff --git a/application/platform/types/io/write.ts b/application/platform/types/io/write.ts deleted file mode 100644 index 27b25b8b30..0000000000 --- a/application/platform/types/io/write.ts +++ /dev/null @@ -1,7 +0,0 @@ -export abstract class WriteAsString { - public abstract write(content: string): Error | undefined; -} - -export abstract class Write { - public abstract write(content: T): Error | undefined; -} diff --git a/application/platform/types/life/destroyable.ts b/application/platform/types/life/destroyable.ts deleted file mode 100644 index 089866e757..0000000000 --- a/application/platform/types/life/destroyable.ts +++ /dev/null @@ -1,3 +0,0 @@ -export abstract class Destroyable { - public abstract destroy(): Promise; -} diff --git a/application/platform/types/net.ts b/application/platform/types/net.ts deleted file mode 100644 index 935bf435a4..0000000000 --- a/application/platform/types/net.ts +++ /dev/null @@ -1,3 +0,0 @@ -export const CONTENT_TYPE_OCTET_STREAM = 'application/octet-stream'; -export const CACHE_CONTROL_NO_STORE = 'no-store'; -export const ACCEPT_RANGES_BYTES = 'bytes'; diff --git a/application/platform/types/notification/index.ts b/application/platform/types/notification/index.ts deleted file mode 100644 index 988ac6bebf..0000000000 --- a/application/platform/types/notification/index.ts +++ /dev/null @@ -1,6 +0,0 @@ -export interface Action { - uuid: string; - name: string; - description: string; - disabled: boolean; -} diff --git a/application/platform/types/observe/compatibility.ts b/application/platform/types/observe/compatibility.ts deleted file mode 100644 index 876dbf0bf0..0000000000 --- a/application/platform/types/observe/compatibility.ts +++ /dev/null @@ -1,91 +0,0 @@ -import * as Parser from './parser'; -import * as Stream from './origin/stream/index'; -import * as Origin from './origin/index'; -import * as File from './types/file'; - -export const Streams: { - [key: string]: Stream.Reference[]; -} = { - [Parser.Protocol.Dlt]: [ - // Supported streams - Stream.TCP.Configuration, - Stream.UDP.Configuration, - ], - [Parser.Protocol.SomeIp]: [ - // Supported streams - Stream.UDP.Configuration, - ], - [Parser.Protocol.Text]: [ - // Supported streams - Stream.Serial.Configuration, - Stream.Process.Configuration, - ], - // Make sure we support all kinds of stream - [Parser.Protocol.Plugin]: [ - Stream.TCP.Configuration, - Stream.UDP.Configuration, - Stream.Serial.Configuration, - Stream.Process.Configuration, - ], -}; - -export const Files: { - [key: string]: File.FileType[]; -} = { - [Parser.Protocol.Dlt]: [ - // Supported file types - File.FileType.Binary, - File.FileType.PcapNG, - File.FileType.PcapLegacy, - ], - [Parser.Protocol.SomeIp]: [ - // Supported file types - File.FileType.PcapNG, - File.FileType.PcapLegacy, - ], - [Parser.Protocol.Text]: [ - // Supported file types - File.FileType.Text, - ], - // Plugins support all file types. - [Parser.Protocol.Plugin]: [ - File.FileType.Text, - File.FileType.Binary, - File.FileType.PcapNG, - File.FileType.PcapLegacy, - File.FileType.ParserPlugin, - ], -}; - -export const SDESupport: { - [key: string]: boolean; -} = { - [Origin.Context.File]: false, - [Origin.Context.Concat]: false, - [Origin.Context.Plugin]: false, - [Stream.Source.Process]: true, - [Stream.Source.Serial]: true, - [Stream.Source.TCP]: false, - [Stream.Source.UDP]: false, -}; - -export const Configurable: { - [key: string]: - | { - [key: string]: boolean; - } - | boolean; -} = { - [Origin.Context.File]: { - [Parser.Protocol.Text]: false, - [Parser.Protocol.Dlt]: true, - [Parser.Protocol.SomeIp]: true, - [Parser.Protocol.Plugin]: true, - }, - [Origin.Context.Concat]: true, - [Origin.Context.Plugin]: true, - [Stream.Source.Process]: true, - [Stream.Source.Serial]: true, - [Stream.Source.TCP]: true, - [Stream.Source.UDP]: true, -}; diff --git a/application/platform/types/observe/configuration.ts b/application/platform/types/observe/configuration.ts deleted file mode 100644 index 431238743f..0000000000 --- a/application/platform/types/observe/configuration.ts +++ /dev/null @@ -1,254 +0,0 @@ -import { error } from '../../log/utils'; -import { JsonConvertor } from '../storage/json'; -import { Validate, SelfValidate, Alias, Destroy, Storable, Hash } from '../env/types'; -import { List } from './description'; -import { scope } from '../../env/scope'; -import { Subject, Subscriber, Subscription } from '../../env/subscription'; -import { unique } from '../../env/sequence'; -import { Observer } from '../../env/observer'; - -import * as Stream from './origin/stream/index'; -import * as File from './types/file'; - -export interface ConfigurationStatic extends Validate, Alias { - initial(): T; -} - -export interface ConfigurationStaticDesc extends Validate, Alias, List { - initial(): T; - inited(): boolean; -} - -export interface Reference extends ConfigurationStatic { - // new (configuration: T, linked: Linked | undefined): C & Configuration; - new (...args: any[]): C & Configuration; -} - -export interface ReferenceDesc extends ConfigurationStaticDesc { - // new (configuration: T, linked: Linked | undefined): C & Configuration; - new (...args: any[]): C & Configuration; -} - -export interface ICompatibilityMod { - Streams: { - [key: string]: Stream.Reference[]; - }; - Files: { - [key: string]: File.FileType[]; - }; - SDESupport: { - [key: string]: boolean; - }; - Configurable: { - [key: string]: - | { - [key: string]: boolean; - } - | boolean; - }; -} -// To prevent circle dependency we are loading compatibility table in async way -let compatibility: ICompatibilityMod | undefined; -import('./compatibility') - .then((mod) => { - compatibility = mod; - }) - .catch((err: Error) => { - scope.getLogger('CompatibilityModule').error(err.message); - }); - -export function getCompatibilityMod(): ICompatibilityMod { - if (compatibility === undefined) { - throw new Error(`Moudle "compatibility" isn't loaded yet`); - } - return compatibility; -} - -export type TOverwriteHandler = (configuration: T) => T; - -export interface Linked { - overwrite: TOverwriteHandler; - watcher: Subject; -} - -export abstract class Configuration - extends Subscriber - implements - JsonConvertor>, - SelfValidate, - Storable, - Hash, - Destroy -{ - protected ref: Reference; - protected readonly src: T; - protected readonly observer: Observer | undefined; - protected readonly linked: Linked | undefined; - protected overwriting: boolean = false; - - public readonly uuid: string = unique(); - public watcher: Subject = new Subject(); - - protected getOriginWatcher(): Subject { - if (this.linked !== undefined) { - return this.linked.watcher; - } - if (this.observer !== undefined) { - return this.observer.watcher; - } - throw new Error(`002: Configuration doesn't have observer or linked`); - } - - constructor(configuration: T, linked: Linked | undefined) { - super(); - if (typeof this.constructor !== 'function') { - throw new Error(`Fail to get reference to Constructor`); - } - this.ref = this.constructor as Reference; - this.src = configuration; - this.linked = linked; - if (linked === undefined) { - this.observer = new Observer(configuration); - } - this.register( - this.getOriginWatcher().subscribe(() => { - if (this.overwriting) { - return; - } - this.watcher.emit(); - }), - ); - } - - public get configuration(): T { - if (this.linked !== undefined) { - return this.src; - } - if (this.observer !== undefined) { - return this.observer.target; - } - throw new Error(`001: Configuration doesn't have observer or linked`); - } - - public destroy(): void { - if (this.observer !== undefined) { - this.observer.destroy(); - } - this.watcher.destroy(); - this.unsubscribe(); - } - - public validate(): Error | undefined { - const error: Error | T = this.ref.validate(this.sterilized()); - return error instanceof Error ? error : undefined; - } - - public alias(): A { - return this.ref.alias(); - } - - public overwrite(configuration: T): void { - this.overwriting = true; - if (this.linked !== undefined) { - (this as any).src = this.linked.overwrite(configuration); - } else if (this.observer !== undefined) { - (this as any).src = Observer.sterilize(configuration); - this.observer.overwrite(configuration); - } else { - this.overwriting = false; - throw new Error(`004: Configuration doesn't have observer or linked`); - } - this.overwriting = false; - this.watcher.emit(); - } - - public setRef(configuration: T | C): void { - if (this.linked !== undefined) { - (this as any).src = configuration; - } else if (this.observer !== undefined) { - throw new Error(`005: Only linked configuration can be rerefered to new target`); - } else { - throw new Error(`006: Configuration doesn't have observer or linked`); - } - } - - public subscribe(handler: () => void): Subscription { - return this.watcher.subscribe(() => { - setTimeout(handler); - }); - } - - public json(): { - to(): string; - from(str: string): Configuration | Error; - } { - return { - to: (): string => { - if (this.linked !== undefined) { - return JSON.stringify(Observer.sterilize(this.src)); - } - if (this.observer !== undefined) { - return JSON.stringify(this.observer.sterilize()); - } - throw new Error(`007: Configuration doesn't have observer or linked`); - }, - from: (str: string): Configuration | Error => { - try { - const configuration: T | Error = this.ref.validate(JSON.parse(str)); - if (configuration instanceof Error) { - return configuration; - } - this.overwrite(configuration); - return this; - } catch (e) { - return new Error(error(e)); - } - }, - }; - } - - public getSupportedStream(): Stream.Reference[] { - if (getCompatibilityMod().Streams[this.ref.alias() as string] === undefined) { - throw new Error( - `008: Entity "${this.ref.alias()}" isn't registred in compatibility.Streams list`, - ); - } - return getCompatibilityMod().Streams[this.ref.alias() as string]; - } - - public getSupportedFileType(): File.FileType[] { - if (getCompatibilityMod().Files[this.ref.alias() as string] === undefined) { - throw new Error( - `009: Entity "${this.ref.alias()}" isn't registred in compatibility.Files list`, - ); - } - return getCompatibilityMod().Files[this.ref.alias() as string]; - } - - public isSdeSupported(): boolean { - if (getCompatibilityMod().SDESupport[this.ref.alias() as string] === undefined) { - throw new Error( - `010: Entity "${this.ref.alias()}" isn't registred in compatibility.SDESupport list`, - ); - } - return getCompatibilityMod().SDESupport[this.ref.alias() as string]; - } - - public sterilized(): T { - if (this.linked !== undefined) { - return Observer.sterilize(this.src); - } - if (this.observer !== undefined) { - return this.observer.sterilize(); - } - throw new Error(`011: Configuration doesn't have observer or linked`); - } - - // This is default implementation, but in some cases (like "Stream.Process") - // it should be adjusted - public storable(): T { - return this.sterilized(); - } - - public abstract hash(): number; -} diff --git a/application/platform/types/observe/description.ts b/application/platform/types/observe/description.ts deleted file mode 100644 index e5bebc40f7..0000000000 --- a/application/platform/types/observe/description.ts +++ /dev/null @@ -1,39 +0,0 @@ -export interface IList { - major: string; - minor: string; - icon: string | undefined; -} - -export interface IJob { - name: string; - desc: string; - icon: string | undefined; -} - -export enum OriginType { - net = 'net', - serial = 'serial', - command = 'command', - file = 'file', - plugin = 'plugin', -} -export interface IOriginDetails extends IList { - type: OriginType; - action: string; - state: { - running: string; - stopped: string; - }; -} - -export abstract class List { - public abstract desc(): IList; -} - -export abstract class Job { - public abstract asJob(): IJob; -} - -export abstract class OriginDetails { - public abstract desc(): IOriginDetails; -} diff --git a/application/platform/types/observe/factory.ts b/application/platform/types/observe/factory.ts deleted file mode 100644 index a945549968..0000000000 --- a/application/platform/types/observe/factory.ts +++ /dev/null @@ -1,370 +0,0 @@ -import * as $ from './index'; - -export { FileType } from './types/file/index'; - -class Factory { - protected changes: { parser: boolean; origin: boolean } = { parser: false, origin: false }; - - protected updated(): { - parser(): void; - origin(): void; - } { - const update = () => { - if (this.changes.origin === this.changes.parser) { - // No needs to update if and parser and origin were changed or weren't changed both - return; - } - if (this.changes.origin) { - const parsers = this.observe.origin.getSupportedParsers(); - if (parsers.length === 0) { - throw new Error( - `No supported parser for ${this.observe.origin.instance.alias()}`, - ); - } - this.protocol(parsers[0].alias()); - } else if (this.changes.parser) { - // TODO: check source also - // switch (this.observe.origin.instance.alias()) { - // case $.Origin.Context.File: - // const _filetypes = this.observe.parser.getSupportedFileType(); - // break; - // case $.Origin.Context.Concat: - // const _filetypes = this.observe.parser.getSupportedFileType(); - // break; - // case $.Origin.Context.Stream: - // const _streams = this.observe.parser - // .getSupportedStream() - // .map((r) => r.alias()); - // break; - // } - } - }; - return { - parser: (): void => { - this.changes.parser = true; - update(); - }, - origin: (): void => { - this.changes.origin = true; - update(); - }, - }; - } - - protected observe: $.Observe = $.Observe.new(); - - public protocol(protocol: $.Parser.Protocol): T { - this.observe.parser.change($.Parser.getByAlias(protocol)); - this.updated().parser(); - return this as unknown as T; - } - - public asDlt(configuration?: $.Parser.Dlt.IConfiguration): T { - this.observe.parser.change( - new $.Parser.Dlt.Configuration( - configuration === undefined ? $.Parser.Dlt.Configuration.initial() : configuration, - undefined, - ), - ); - this.updated().parser(); - return this as unknown as T; - } - - public asSomeip(configuration?: $.Parser.SomeIp.IConfiguration): T { - this.observe.parser.change( - new $.Parser.SomeIp.Configuration( - configuration === undefined - ? $.Parser.SomeIp.Configuration.initial() - : configuration, - undefined, - ), - ); - this.updated().parser(); - return this as unknown as T; - } - - public parser(parser: $.Parser.Declaration): T { - this.observe.parser.change(parser); - return this as unknown as T; - } - - public asText(): T { - this.observe.parser.change(new $.Parser.Text.Configuration(null, undefined)); - this.updated().parser(); - return this as unknown as T; - } - - public asParserPlugin(configuration?: $.Parser.Plugin.IConfiguration): T { - this.observe.parser.change( - new $.Parser.Plugin.Configuration( - configuration === undefined - ? $.Parser.Plugin.Configuration.initial() - : configuration, - - undefined, - ), - ); - this.updated().parser(); - return this as unknown as T; - } - - public guessParser(): T { - const parsers = this.observe.origin.getSupportedParsers(); - if (parsers.length === 0) { - throw new Error( - `Origin "${this.observe.origin.getNatureAlias()}" doesn't have any suitable parseres.`, - ); - } - const Ref = parsers[0]; - this.observe.parser.change(new Ref(Ref.initial(), undefined)); - this.updated().parser(); - return this as unknown as T; - } - - public get(): $.Observe { - const parsers = this.observe.origin.getSupportedParsers().map((ref) => ref.alias()); - const selected = this.observe.parser.alias(); - if (!parsers.includes(selected)) { - throw new Error( - `Origin "${this.observe.origin.getNatureAlias()}" doesn't support parser: ${selected}; available parsers: ${parsers.join( - ', ', - )}.`, - ); - } - return this.observe; - } -} - -export class File extends Factory { - static FileType = $.Types.File.FileType; - - constructor() { - super(); - this.observe.origin.change( - new $.Origin.File.Configuration($.Origin.File.Configuration.initial(), undefined), - ); - } - - public alias(alias: string): File { - if (!(this.observe.origin.instance instanceof $.Origin.File.Configuration)) { - throw new Error(`Given observe object doesn't have File origin`); - } - this.observe.origin.instance.set().alias(alias); - this.updated().origin(); - return this; - } - - public file(filename: string): File { - if (!(this.observe.origin.instance instanceof $.Origin.File.Configuration)) { - throw new Error(`Given observe object doesn't have File origin`); - } - this.observe.origin.instance.set().filename(filename); - this.updated().origin(); - return this; - } - - public type(type: $.Types.File.FileType): File { - if (!(this.observe.origin.instance instanceof $.Origin.File.Configuration)) { - throw new Error(`Given observe object doesn't have File origin`); - } - this.observe.origin.instance.set().type(type); - this.updated().origin(); - return this; - } -} - -export class Concat extends Factory { - static FileType = $.Types.File.FileType; - - constructor() { - super(); - this.observe.origin.change( - new $.Origin.Concat.Configuration($.Origin.Concat.Configuration.initial(), undefined), - ); - } - - public files(files: string[]): Concat { - if (!(this.observe.origin.instance instanceof $.Origin.Concat.Configuration)) { - throw new Error(`Given observe object doesn't have Concat origin`); - } - this.observe.origin.instance.set().files(files); - this.updated().origin(); - return this; - } - - public type(type: $.Types.File.FileType): Concat { - if (!(this.observe.origin.instance instanceof $.Origin.Concat.Configuration)) { - throw new Error(`Given observe object doesn't have Concat origin`); - } - this.observe.origin.instance.set().type(type); - this.updated().origin(); - return this; - } - - public push(filename: string, type: $.Types.File.FileType): Concat { - if (!(this.observe.origin.instance instanceof $.Origin.Concat.Configuration)) { - throw new Error(`Given observe object doesn't have Concat origin`); - } - this.observe.origin.instance.set().push(filename, type); - this.updated().origin(); - return this; - } - - public remove(filename: string): Concat { - if (!(this.observe.origin.instance instanceof $.Origin.Concat.Configuration)) { - throw new Error(`Given observe object doesn't have Concat origin`); - } - this.observe.origin.instance.set().remove(filename); - this.updated().origin(); - return this; - } -} - -export class Stream extends Factory { - constructor() { - super(); - this.observe.origin.change( - new $.Origin.Stream.Configuration($.Origin.Stream.Configuration.initial(), undefined), - ); - } - - public process(configuration?: $.Origin.Stream.Stream.Process.IConfiguration): Stream { - if (!(this.observe.origin.instance instanceof $.Origin.Stream.Configuration)) { - throw new Error(`Given observe object doesn't have Stream origin`); - } - this.observe.origin.instance.change( - new $.Origin.Stream.Stream.Process.Configuration( - configuration !== undefined - ? configuration - : $.Origin.Stream.Stream.Process.Configuration.initial(), - undefined, - ), - ); - this.updated().origin(); - return this; - } - - public serial(configuration?: $.Origin.Stream.Stream.Serial.IConfiguration): Stream { - if (!(this.observe.origin.instance instanceof $.Origin.Stream.Configuration)) { - throw new Error(`Given observe object doesn't have Stream origin`); - } - this.observe.origin.instance.change( - new $.Origin.Stream.Stream.Serial.Configuration( - configuration !== undefined - ? configuration - : $.Origin.Stream.Stream.Serial.Configuration.initial(), - undefined, - ), - ); - this.updated().origin(); - return this; - } - - public tcp(configuration?: $.Origin.Stream.Stream.TCP.IConfiguration): Stream { - if (!(this.observe.origin.instance instanceof $.Origin.Stream.Configuration)) { - throw new Error(`Given observe object doesn't have Stream origin`); - } - this.observe.origin.instance.change( - new $.Origin.Stream.Stream.TCP.Configuration( - configuration !== undefined - ? configuration - : $.Origin.Stream.Stream.TCP.Configuration.initial(), - undefined, - ), - ); - this.updated().origin(); - return this; - } - - public udp(configuration?: $.Origin.Stream.Stream.UDP.IConfiguration): Stream { - if (!(this.observe.origin.instance instanceof $.Origin.Stream.Configuration)) { - throw new Error(`Given observe object doesn't have Stream origin`); - } - this.observe.origin.instance.change( - new $.Origin.Stream.Stream.UDP.Configuration( - configuration !== undefined - ? configuration - : $.Origin.Stream.Stream.UDP.Configuration.initial(), - undefined, - ), - ); - this.updated().origin(); - return this; - } -} - -export function map(observe: $.Observe): { - file(): boolean; - concat(): boolean; - process(): boolean; - serial(): boolean; - udp(): boolean; - tcp(): boolean; -} { - return { - file: (): boolean => { - return ( - observe.origin.as<$.Origin.File.Configuration>($.Origin.File.Configuration) !== - undefined - ); - }, - concat: (): boolean => { - return ( - observe.origin.as<$.Origin.Concat.Configuration>($.Origin.Concat.Configuration) !== - undefined - ); - }, - process: (): boolean => { - const stream = observe.origin.as<$.Origin.Stream.Configuration>( - $.Origin.Stream.Configuration, - ); - if (stream === undefined) { - return false; - } - return ( - stream.as<$.Origin.Stream.Stream.Process.Configuration>( - $.Origin.Stream.Stream.Process.Configuration, - ) !== undefined - ); - }, - serial: (): boolean => { - const stream = observe.origin.as<$.Origin.Stream.Configuration>( - $.Origin.Stream.Configuration, - ); - if (stream === undefined) { - return false; - } - return ( - stream.as<$.Origin.Stream.Stream.Serial.Configuration>( - $.Origin.Stream.Stream.Serial.Configuration, - ) !== undefined - ); - }, - udp: (): boolean => { - const stream = observe.origin.as<$.Origin.Stream.Configuration>( - $.Origin.Stream.Configuration, - ); - if (stream === undefined) { - return false; - } - return ( - stream.as<$.Origin.Stream.Stream.UDP.Configuration>( - $.Origin.Stream.Stream.UDP.Configuration, - ) !== undefined - ); - }, - tcp: (): boolean => { - const stream = observe.origin.as<$.Origin.Stream.Configuration>( - $.Origin.Stream.Configuration, - ); - if (stream === undefined) { - return false; - } - return ( - stream.as<$.Origin.Stream.Stream.TCP.Configuration>( - $.Origin.Stream.Stream.TCP.Configuration, - ) !== undefined - ); - }, - }; -} diff --git a/application/platform/types/observe/index.ts b/application/platform/types/observe/index.ts deleted file mode 100644 index 7cba9c3d76..0000000000 --- a/application/platform/types/observe/index.ts +++ /dev/null @@ -1,193 +0,0 @@ -import { Configuration as Base, getCompatibilityMod } from './configuration'; -import { Mutable } from '../unity/mutable'; -import { LockToken } from '../../env/lock.token'; -import { Signature } from '../env/types'; - -import * as Parser from './parser'; -import * as Origin from './origin'; -import * as Sde from './sde'; - -export * as Parser from './parser'; -export * as Origin from './origin'; -export * as Types from './types'; -export * as Description from './description'; - -export { IList, IOriginDetails, IJob } from './description'; - -export interface IObserve { - origin: Origin.IConfiguration; - parser: Parser.IConfiguration; -} - -export class Observe - extends Base - implements Sde.Support, Parser.Support, Signature -{ - static new(): Observe { - return new Observe({ - parser: { - Dlt: Parser.Dlt.Configuration.initial(), - }, - origin: { - Stream: Origin.Stream.Configuration.initial(), - }, - }); - } - - static from(json: string): Observe | Error { - const observe = new Observe({ - parser: { - Dlt: Parser.Dlt.Configuration.initial(), - }, - origin: { - Stream: Origin.Stream.Configuration.initial(), - }, - }); - const error = observe.json().from(json); - return error instanceof Error ? error : observe; - } - - static alias(): undefined { - return undefined; - } - - static initial(): IObserve { - return { - origin: Origin.Configuration.initial(), - parser: Parser.Configuration.initial(), - }; - } - - static validate(configuration: IObserve): Error | IObserve { - let error: Error | unknown = Origin.Configuration.validate(configuration.origin); - if (error instanceof Error) { - return error; - } - error = Parser.Configuration.validate(configuration.parser); - return error instanceof Error ? error : configuration; - } - - public readonly origin!: Origin.Configuration; - public readonly parser!: Parser.Configuration; - - /// Lock-state - /// Allows define a way to process observe data. - /// true - observe data can be used to observe (create a session); - /// false - observe data probably requires some addition configuration - /// for example settings of DLT or SomeIP - protected readonly lock: LockToken = new LockToken(false); - - protected link(): void { - (this as Mutable).origin = new Origin.Configuration(this.configuration.origin, { - watcher: this.watcher, - overwrite: (config: Origin.IConfiguration) => { - this.configuration.origin = config; - return this.configuration.origin; - }, - }); - (this as Mutable).parser = new Parser.Configuration(this.configuration.parser, { - watcher: this.watcher, - overwrite: (config: Parser.IConfiguration) => { - this.configuration.parser = config; - return this.configuration.parser; - }, - }); - } - - protected onOriginChange() { - this.parser.onOriginChange(this.origin); - } - - constructor(observe: IObserve) { - super(observe, undefined); - this.link(); - this.parser.onOriginChange(this.origin); - this.origin.watcher.subscribe(this.onOriginChange.bind(this)); - this.parser.watcher.subscribe(this.onOriginChange.bind(this)); - } - - public override destroy(): void { - super.destroy(); - this.parser !== undefined && this.parser.destroy(); - this.origin !== undefined && this.origin.destroy(); - } - - public override isSdeSupported(): boolean { - return this.origin.isSdeSupported(); - } - - public override overwrite(configuration: IObserve): void { - this.origin !== undefined && this.origin.destroy(); - this.parser !== undefined && this.parser.destroy(); - super.overwrite(configuration); - this.link(); - } - - public getSupportedParsers(): Parser.Reference[] { - return this.origin.getSupportedParsers(); - } - - public clone(): Observe { - const cloned = new Observe(this.sterilized()); - // Drop alias to prevent multiple observing entries with same UUID - cloned.origin.set().alias(); - return cloned; - } - - public locker(): { - lock(): Observe; - unlock(): Observe; - // Lock configuration if it's possible to lock - guess(): Observe; - is(): boolean; - } { - return { - lock: (): Observe => { - this.lock.lock(); - return this; - }, - unlock: (): Observe => { - this.lock.unlock(); - return this; - }, - guess: (): Observe => { - if (this.parser.instance instanceof Parser.Text.Configuration) { - this.lock.lock(); - } - return this; - }, - is: (): boolean => { - return this.lock.isLocked(); - }, - }; - } - - public isConfigurable(): boolean { - const map: any = getCompatibilityMod().Configurable; - const nature = this.origin.nature().alias(); - const parser = this.parser.alias(); - if (typeof map[nature] === 'boolean') { - return map[nature]; - } else if (typeof map[nature][parser] === 'boolean') { - return map[nature][parser]; - } - throw new Error( - `Parser "${parser}" and origin "${nature}" don't have description in Compatibility.Configurable table`, - ); - } - - public override storable(): IObserve { - return { - origin: this.origin.storable(), - parser: this.parser.storable(), - }; - } - - public override hash(): number { - return this.origin.hash() + this.parser.hash(); - } - - public signature(): string { - return `${this.origin.hash()}${this.parser.hash()}`; - } -} diff --git a/application/platform/types/observe/origin/concat.ts b/application/platform/types/observe/origin/concat.ts deleted file mode 100644 index 4928e5f08d..0000000000 --- a/application/platform/types/observe/origin/concat.ts +++ /dev/null @@ -1,176 +0,0 @@ -import { error } from '../../../log/utils'; -import { Configuration as Base, ConfigurationStaticDesc } from '../configuration'; -import { OriginDetails, IOriginDetails, IList, Job, IJob, OriginType } from '../description'; -import { Configuration as ConfigurationFile } from './file'; -import { Context, SourceUuid, IConfiguration as IOriginConfiguration } from './index'; -import { getParentFolder } from '../../files'; -import { Statics } from '../../../env/decorators'; -import { unique } from '../../../env/sequence'; - -import * as Types from '../types'; -import * as Parser from '../parser'; -import * as Sde from '../sde'; -import * as str from '../../../env/str'; - -export type IConfiguration = [SourceUuid, Types.File.FileType, Types.File.FileName][]; - -@Statics>() -export class Configuration - extends Base - implements OriginDetails, Sde.Support, Parser.Support, Job -{ - static desc(): IList { - return { - major: `Files`, - minor: 'Local Files', - icon: 'files', - }; - } - - static alias(): Context { - return Context.Concat; - } - - static validate(configuration: IConfiguration): Error | IConfiguration { - try { - if (!(configuration instanceof Array) || configuration.length === 0) { - throw new Error( - `Source "${Context.Concat}" should be represented as a not empty array.`, - ); - } else { - configuration.forEach((file) => { - // If file settings are not correct it will throw an error - new ConfigurationFile(file, undefined); - }); - } - return configuration; - } catch (e) { - return new Error(error(e)); - } - } - - // Gives initial settings. Not necessarily valid. - static initial(): IConfiguration { - return []; - } - - static inited(): boolean { - return true; - } - - protected defaultFileType: Types.File.FileType = Types.File.FileType.Text; - - public source(): string | undefined { - return undefined; - } - - public set(): { - files(files: string[]): Configuration; - type(type: Types.File.FileType): Configuration; - push(filename: string, type: Types.File.FileType): Configuration; - remove(filename: string): Configuration; - alias(alias?: string): Configuration; - } { - return { - files: (files: string[]): Configuration => { - this.configuration.push( - ...(files.map((filename: string) => { - return [unique(), this.defaultFileType, filename]; - }) as IConfiguration), - ); - return this; - }, - type: (type: Types.File.FileType): Configuration => { - this.defaultFileType = type; - this.configuration.forEach((conf) => { - conf[1] = type; - }); - return this; - }, - push: (filename: string, type: Types.File.FileType): Configuration => { - this.configuration.push([unique(), type, filename]); - return this; - }, - remove: (filename: string): Configuration => { - const index = this.configuration.findIndex((def) => def[2] === filename); - if (index !== -1) { - this.configuration.splice(index, 1); - } - return this; - }, - alias: (alias?: string): Configuration => { - this.configuration.forEach((file) => { - file[0] = alias === undefined ? unique() : alias; - }); - return this; - }, - }; - } - - public files(): string[] { - return this.configuration.map((c) => c[2]); - } - - public filetypes(): Types.File.FileType[] { - return this.configuration.map((c) => c[1]); - } - - public asFileOrigins(): IOriginConfiguration[] { - return this.configuration.map((c) => { - return { - [Context.File]: c, - }; - }); - } - - public desc(): IOriginDetails { - const first = this.configuration[0]; - return { - major: `Concating ${this.configuration.length} files`, - minor: first !== undefined ? getParentFolder(first[2]) : '', - icon: 'insert_drive_file', - type: OriginType.file, - action: 'Concat', - state: { - running: 'processing', - stopped: '', - }, - }; - } - - public asJob(): IJob { - return { - name: 'concating', - desc: `concating ${this.configuration.length} files`, - icon: 'insert_drive_file', - }; - } - - public getSupportedParsers(): Parser.Reference[] { - if (this.configuration.length === 0) { - // Returns default - return [ - Parser.Dlt.Configuration, - Parser.SomeIp.Configuration, - Parser.Text.Configuration, - Parser.Plugin.Configuration, - ]; - } - switch (this.configuration[0][1]) { - case Types.File.FileType.Binary: - return [Parser.Dlt.Configuration, Parser.SomeIp.Configuration]; - case Types.File.FileType.PcapNG: - return [Parser.Dlt.Configuration, Parser.SomeIp.Configuration]; - case Types.File.FileType.PcapLegacy: - return [Parser.Dlt.Configuration, Parser.SomeIp.Configuration]; - case Types.File.FileType.Text: - return [Parser.Text.Configuration]; - case Types.File.FileType.ParserPlugin: - return [Parser.Plugin.Configuration]; - } - } - - public override hash(): number { - return str.hash(`${this.files().join(';')};${this.filetypes().join(';')}`); - } -} diff --git a/application/platform/types/observe/origin/file.ts b/application/platform/types/observe/origin/file.ts deleted file mode 100644 index 50d31eeb35..0000000000 --- a/application/platform/types/observe/origin/file.ts +++ /dev/null @@ -1,170 +0,0 @@ -import { error } from '../../../log/utils'; -import { Configuration as Base, ConfigurationStaticDesc } from '../configuration'; -import { Context, SourceUuid } from './index'; -import { OriginDetails, IOriginDetails, IList, Job, IJob, OriginType } from '../description'; -import { getFileName, getParentFolder } from '../../files'; -import { Statics } from '../../../env/decorators'; -import { unique } from '../../../env/sequence'; - -import * as Types from '../types'; -import * as Parser from '../parser'; -import * as Sde from '../sde'; -import * as str from '../../../env/str'; - -export type IConfiguration = [SourceUuid, Types.File.FileType, Types.File.FileName]; - -@Statics>() -export class Configuration - extends Base - implements OriginDetails, Sde.Support, Parser.Support, Job -{ - static desc(): IList { - return { - major: `File`, - minor: 'Local File', - icon: 'file', - }; - } - - static alias(): Context { - return Context.File; - } - - static validate(configuration: IConfiguration): Error | IConfiguration { - try { - if (configuration instanceof Array && configuration.length === 3) { - str.asNotEmptyString( - configuration[0], - `SourceUuid isn't found: ${configuration[0]}`, - ); - str.asNotEmptyString( - configuration[2], - `Origin.FileName isn't found: ${configuration[2]}`, - ); - if (Types.File.getFileTypeFrom(configuration[1]) instanceof Error) { - throw new Error(`Invalid Origin.FileType: ${configuration[1]}`); - } - } else { - throw new Error( - `Source "${Context.File}" should be represented as an array, len = 3.`, - ); - } - return configuration; - } catch (e) { - return new Error(error(e)); - } - } - - static inited(): boolean { - return true; - } - - // Gives initial settings. Not necessarily valid. - static initial(): IConfiguration { - return [unique(), Types.File.FileType.Text, '']; - } - - public source(): string | undefined { - return this.configuration[0]; - } - - public set(): { - filename(filename: string): Configuration; - type(type: Types.File.FileType): Configuration; - alias(alias?: string): Configuration; - } { - return { - filename: (filename: string): Configuration => { - this.configuration[2] = filename; - return this; - }, - type: (type: Types.File.FileType): Configuration => { - this.configuration[1] = type; - return this; - }, - alias: (alias: string): Configuration => { - this.configuration[0] = alias === undefined ? unique() : alias; - return this; - }, - }; - } - - public get(): { - filename(): string; - type(): Types.File.FileType; - alias(): string; - } { - return { - filename: (): string => { - return this.configuration[2]; - }, - type: (): Types.File.FileType => { - return this.configuration[1]; - }, - alias: (): string => { - return this.configuration[0]; - }, - }; - } - - public filename(): string { - return this.configuration[2]; - } - - public filetype(): Types.File.FileType { - return this.configuration[1]; - } - - public desc(): IOriginDetails { - return { - major: getFileName(this.configuration[2]), - minor: getParentFolder(this.configuration[2]), - icon: 'insert_drive_file', - type: OriginType.file, - action: 'Open', - state: { - running: 'tail', - stopped: '', - }, - }; - } - - public asJob(): IJob { - return { - name: 'tail', - desc: getFileName(this.filename()), - icon: 'insert_drive_file', - }; - } - - public getSupportedParsers(): Parser.Reference[] { - switch (this.configuration[1]) { - case Types.File.FileType.Binary: - return [ - Parser.Dlt.Configuration, - Parser.SomeIp.Configuration, - Parser.Plugin.Configuration, - ]; - case Types.File.FileType.PcapNG: - return [ - Parser.Dlt.Configuration, - Parser.SomeIp.Configuration, - Parser.Plugin.Configuration, - ]; - case Types.File.FileType.PcapLegacy: - return [ - Parser.Dlt.Configuration, - Parser.SomeIp.Configuration, - Parser.Plugin.Configuration, - ]; - case Types.File.FileType.Text: - return [Parser.Text.Configuration]; - case Types.File.FileType.ParserPlugin: - return [Parser.Plugin.Configuration]; - } - } - - public override hash(): number { - return str.hash(`${this.filename()};${this.filetype()}`); - } -} diff --git a/application/platform/types/observe/origin/index.ts b/application/platform/types/observe/origin/index.ts deleted file mode 100644 index 44794c3650..0000000000 --- a/application/platform/types/observe/origin/index.ts +++ /dev/null @@ -1,258 +0,0 @@ -import { Configuration as Base, ConfigurationStatic, Linked } from '../configuration'; -import { Statics } from '../../../env/decorators'; -import { Mutable } from '../../unity/mutable'; -import { Alias } from '../../env/types'; -import { OriginDetails, IOriginDetails, Job, IJob } from '../description'; - -export * as File from './file'; -export * as Concat from './concat'; -export * as Stream from './stream'; -export * as Plugin from './plugin'; - -import * as File from './file'; -import * as Concat from './concat'; -import * as Stream from './stream'; -import * as Plugin from './plugin'; -import * as Parser from '../parser'; -import * as Sde from '../sde'; - -//TODO: Plugin byte source integration will be postponed. -export enum Context { - File = 'File', - Concat = 'Concat', - Stream = 'Stream', - Plugin = 'Plugin', -} - -export type SourceUuid = string; - -export interface OnChange { - onOriginChange(origin: Configuration): void; -} - -export interface IConfiguration { - [Context.File]?: File.IConfiguration; - [Context.Concat]?: Concat.IConfiguration; - [Context.Stream]?: Stream.IConfiguration; - [Context.Plugin]?: Plugin.IConfiguration; -} - -export const REGISTER = { - [Context.File]: File.Configuration, - [Context.Concat]: Concat.Configuration, - [Context.Stream]: Stream.Configuration, - [Context.Plugin]: Plugin.Configuration, -}; - -export const DEFAULT = File.Configuration; - -export type Declaration = - | File.Configuration - | Concat.Configuration - | Stream.Configuration - | Plugin.Configuration; - -export type OriginNature = - | File.Configuration - | Concat.Configuration - | Stream.Stream.Declaration - | Plugin.Configuration; - -@Statics>() -export class Configuration - extends Base - implements Parser.Support, Sde.Support, Job, OriginDetails -{ - static alias(): undefined { - return undefined; - } - - static validate(configuration: IConfiguration): Error | IConfiguration { - if ( - Object.keys(REGISTER) - .map((k) => configuration[k as Context]) - .filter((v) => v !== undefined).length === 0 - ) { - return new Error(`Origin isn't defined`); - } - let error: Error | undefined; - Object.keys(REGISTER).forEach((key) => { - if (error instanceof Error) { - return; - } - const config = configuration[key as Context]; - if (config === undefined) { - return; - } - const err = REGISTER[key as Context].validate(config as any); - if (err instanceof Error) { - error = err; - } else { - error = undefined; - } - }); - return error instanceof Error ? error : configuration; - } - - // Gives initial settings. Not necessarily valid. - static initial(): IConfiguration { - return { - [DEFAULT.alias()]: DEFAULT.initial(), - }; - } - - protected getContextKey(): Context | undefined { - let found: Context | undefined; - Object.keys(REGISTER).forEach((key) => { - if (found !== undefined) { - return; - } - if (this.configuration[key as Context] === undefined) { - return; - } - found = key as Context; - }); - return found; - } - - protected setInstance(): Configuration { - const context = this.getContextKey(); - if (context === undefined) { - throw new Error(`Configuration of stream doesn't have definition of known context.`); - } - if (this.instance !== undefined && this.instance.alias() === context) { - this.instance.setRef(this.configuration[context]); - return this; - } - this.instance !== undefined && this.instance.destroy(); - (this as Mutable).instance = new REGISTER[context]( - this.configuration[context] as any, - { - watcher: this.watcher, - overwrite: (config: IConfiguration) => { - this.overwrite(config); - return this.configuration[context] as any; - }, - }, - ); - return this; - } - - public readonly instance!: Declaration; - - constructor(configuration: IConfiguration, linked: Linked | undefined) { - super(configuration, linked); - this.register( - this.watcher.subscribe(() => { - if (this.overwriting) { - return; - } - this.setInstance(); - }), - ); - this.setInstance(); - } - - public override destroy(): void { - super.destroy(); - this.instance !== undefined && this.instance.destroy(); - } - - public source(): string | undefined { - return this.instance.source(); - } - - public files(): string[] | string | undefined { - if (this.instance instanceof File.Configuration) { - return this.instance.filename(); - } else if (this.instance instanceof Concat.Configuration) { - return this.instance.files(); - } else { - return undefined; - } - } - - public change(origin: Declaration): void { - this.overwrite({ [origin.alias()]: origin.configuration }); - } - - public desc(): IOriginDetails { - return this.instance.desc(); - } - - public title(): string { - const desc = this.desc().major; - if (desc.trim() === '') { - if (this.instance instanceof File.Configuration) { - return File.Configuration.desc().major; - } else if (this.instance instanceof Concat.Configuration) { - return Concat.Configuration.desc().major; - } else if (this.instance instanceof Stream.Configuration) { - return Stream.Configuration.desc().major; - } else { - throw new Error(`Origin type isn't supported yet`); - } - } else { - return desc; - } - } - - public asJob(): IJob { - return this.instance.asJob(); - } - - public override isSdeSupported(): boolean { - return this.instance.isSdeSupported(); - } - - public getSupportedParsers(): Parser.Reference[] { - return this.instance.getSupportedParsers(); - } - - public as( - Ref: { new (...args: any[]): Declaration | Stream.Stream.Declaration } & Alias, - ): T | undefined { - if (this.instance.alias() === Ref.alias()) { - return this.instance as T; - } - if (typeof (this.instance as any).as === 'function') { - return (this.instance as any).as(Ref); - } - return undefined; - } - - public nature(): OriginNature { - if (this.instance instanceof Stream.Configuration) { - return this.instance.instance.instance; - } else { - return this.instance; - } - } - - public getNatureAlias(): Context | Stream.Stream.Source { - if (this.instance instanceof Stream.Configuration) { - return this.instance.instance.instance.alias(); - } else { - return this.instance.alias(); - } - } - - public set(): { - alias(alias?: string): void; - } { - return { - // Change signature of source - alias: (alias?: string): void => { - this.instance.set().alias(alias); - }, - }; - } - - public override storable(): IConfiguration { - return { [this.instance.alias()]: this.instance.storable() }; - } - - public override hash(): number { - return this.instance.hash(); - } -} diff --git a/application/platform/types/observe/origin/plugin.ts b/application/platform/types/observe/origin/plugin.ts deleted file mode 100644 index e9f2604596..0000000000 --- a/application/platform/types/observe/origin/plugin.ts +++ /dev/null @@ -1,123 +0,0 @@ -import { Configuration as Base, ConfigurationStaticDesc } from '../configuration'; -import { OriginDetails, Job, IOriginDetails, IJob, OriginType, IList } from '../description'; -import { Context, SourceUuid } from './index'; -import { Statics } from '../../../env/decorators'; -import { unique } from '../../../env/sequence'; -import { error } from '../../../log/utils'; - -import * as Types from '../types'; -import * as Sde from '../sde'; -import * as Parser from '../parser'; -import * as str from '../../../env/str'; - -export type IConfiguration = [SourceUuid, Types.Plugin.PluginDirPath]; -const CONFIG_LEN = 2 as const; - -@Statics>() -export class Configuration - extends Base - implements OriginDetails, Sde.Support, Parser.Support, Job -{ - // Gives initial settings. Not necessarily valid. - static initial(): IConfiguration { - return [unique(), '']; - } - - static alias(): Context { - return Context.Plugin; - } - - /// Origin (source) plugin will describe itself in run-time. fields `major` will be replaced - // with plugin name; `minor` with an addition data. - /// It will work simular to `WrappedParserRef` (application/client/src/app/ui/tabs/observe/state.ts) - static desc(): IList { - return { - major: '', - minor: '', - icon: undefined, - }; - } - - static validate(configuration: IConfiguration): Error | IConfiguration { - try { - if (configuration instanceof Array && configuration.length === CONFIG_LEN) { - str.asNotEmptyString( - configuration[0], - `SourceUuid isn't found: ${configuration[0]}`, - ); - str.asNotEmptyString( - configuration[1], - `Pluging Directory Path isn't found: ${configuration[1]}`, - ); - } else { - throw new Error( - `Source "${Context.Plugin}" should be represented as an array, len = ${CONFIG_LEN}`, - ); - } - - return configuration; - } catch (e) { - return new Error(error(e)); - } - } - - static inited(): boolean { - return Configuration.desc().major.trim() !== ''; - } - - public source(): string | undefined { - return this.configuration[0]; - } - - public set(): { - alias(alias?: string): void; - pluginDir(dir: string): void; - } { - return { - alias: (alias?: string): void => { - this.configuration[0] = alias === undefined ? unique() : alias; - }, - pluginDir: (dir: string): void => { - this.configuration[1] = dir; - }, - }; - } - - public override hash(): number { - return str.hash(this.dirPath()); - } - - public dirPath(): Types.Plugin.PluginDirPath { - return this.configuration[1]; - } - - public getSupportedParsers(): Parser.Reference[] { - // Returns all - return [ - Parser.Dlt.Configuration, - Parser.SomeIp.Configuration, - Parser.Text.Configuration, - Parser.Plugin.Configuration, - ]; - } - public asJob(): IJob { - return { - name: 'plugin source', - desc: 'plugin source TODO', - icon: undefined, - }; - } - public desc(): IOriginDetails { - return { - major: 'Plugin source instance major TODO', - minor: 'Plugin source instance minor TODO', - icon: undefined, - type: OriginType.plugin, - action: 'Load TODO', - state: { - running: 'load TODO', - stopped: 'TODO', - }, - }; - } -} diff --git a/application/platform/types/observe/origin/stream.ts b/application/platform/types/observe/origin/stream.ts deleted file mode 100644 index 6634c1573b..0000000000 --- a/application/platform/types/observe/origin/stream.ts +++ /dev/null @@ -1,150 +0,0 @@ -import { error } from '../../../log/utils'; -import { Configuration as Base, ConfigurationStatic, Linked } from '../configuration'; -import { Context, SourceUuid } from './index'; -import { OriginDetails, IOriginDetails, IList, Job, IJob } from '../description'; -import { Statics } from '../../../env/decorators'; -import { unique } from '../../../env/sequence'; -import { Alias } from '../../env/types'; -import { Mutable } from '../../unity/mutable'; - -import * as str from '../../../env/str'; -import * as Stream from './stream/index'; -import * as Parser from '../parser/index'; -import * as Sde from '../sde'; - -export * as str from '../../../env/str'; -export * as Stream from './stream/index'; -export * as Parser from '../parser/index'; -export * as Sde from '../sde'; - -export type IConfiguration = [SourceUuid, Stream.IConfiguration]; - -@Statics>() -export class Configuration - extends Base - implements OriginDetails, Sde.Support, Parser.Support, Job -{ - static desc(): IList { - return { - major: `Stream`, - minor: 'Streaming', - icon: 'files', - }; - } - - static alias(): Context { - return Context.Stream; - } - - static validate(configuration: IConfiguration): Error | IConfiguration { - try { - if (configuration instanceof Array && configuration.length === 2) { - str.asNotEmptyString( - configuration[0], - `SourceUuid isn't found: ${configuration[0]}`, - ); - const error = Stream.Configuration.validate(configuration[1]); - return error instanceof Error ? error : configuration; - } else { - throw new Error( - `Source "${Context.Stream}" should be represented as an array, len = 2.`, - ); - } - } catch (e) { - return new Error(error(e)); - } - } - - // Gives initial settings. Not necessarily valid. - static initial(): IConfiguration { - return [unique(), Stream.Configuration.initial()]; - } - - protected setInstance(): Configuration { - if (this.instance !== undefined) { - this.instance.setRef(this.configuration[1]); - return this; - } else { - const instance = new Stream.Configuration(this.configuration[1], { - watcher: this.watcher, - overwrite: (config: Stream.IConfiguration) => { - this.configuration[1] = config; - return this.configuration[1]; - }, - }); - if (instance instanceof Error) { - throw instance; - } - (this as Mutable).instance = instance; - } - return this; - } - - public readonly instance!: Stream.Configuration; - - constructor(configuration: IConfiguration, linked: Linked | undefined) { - super(configuration, linked); - this.register( - this.watcher.subscribe(() => { - this.setInstance(); - }), - ); - this.setInstance(); - } - - public source(): string | undefined { - return this.configuration[0]; - } - - public override destroy(): void { - super.destroy(); - this.instance !== undefined && this.instance.destroy(); - } - - public change(stream: Stream.Declaration): void { - this.instance.change().byDeclaration(stream); - this.configuration[1] = this.instance.configuration; - } - - public desc(): IOriginDetails { - return this.instance.desc(); - } - - public asJob(): IJob { - return this.instance.asJob(); - } - - public override isSdeSupported(): boolean { - return this.instance.isSdeSupported(); - } - - public getSupportedParsers(): Parser.Reference[] { - return this.instance.getSupportedParsers(); - } - - public set(): { - alias(alias?: string): void; - } { - return { - alias: (alias?: string): void => { - this.configuration[0] = alias === undefined ? unique() : alias; - }, - }; - } - - public as( - Ref: { new (...args: any[]): Stream.Declaration } & Alias, - ): T | undefined { - return this.instance.instance.alias() === Ref.alias() - ? (this.instance.instance as T) - : undefined; - } - - public override storable(): IConfiguration { - return [this.configuration[0], this.instance.storable()]; - } - - public override hash(): number { - return this.instance.hash(); - } -} diff --git a/application/platform/types/observe/origin/stream/index.ts b/application/platform/types/observe/origin/stream/index.ts deleted file mode 100644 index 4541c45794..0000000000 --- a/application/platform/types/observe/origin/stream/index.ts +++ /dev/null @@ -1,255 +0,0 @@ -import { - Configuration as Base, - ConfigurationStatic, - ReferenceDesc, - Linked, -} from '../../configuration'; -import { OriginDetails, IOriginDetails, Job, IJob } from '../../description'; -import { Statics } from '../../../../env/decorators'; -import { Mutable } from '../../../unity/mutable'; -import { Alias } from '../../../env/types'; - -import * as Process from './process'; -import * as Serial from './serial'; -import * as TCP from './tcp'; -import * as UDP from './udp'; -import * as Parser from '../../parser'; -import * as Sde from '../../sde'; - -export * as Process from './process'; -export * as Serial from './serial'; -export * as TCP from './tcp'; -export * as UDP from './udp'; - -export type Reference = - | ReferenceDesc - | ReferenceDesc - | ReferenceDesc - | ReferenceDesc; - -export enum Source { - TCP = 'TCP', - UDP = 'UDP', - Serial = 'Serial', - Process = 'Process', -} - -export type IDeclaration = - | Serial.IConfiguration - | Process.IConfiguration - | TCP.IConfiguration - | UDP.IConfiguration; - -export type Declaration = - | Serial.Configuration - | Process.Configuration - | TCP.Configuration - | UDP.Configuration; - -export interface IConfiguration { - [Source.Serial]?: Serial.IConfiguration; - [Source.Process]?: Process.IConfiguration; - [Source.TCP]?: TCP.IConfiguration; - [Source.UDP]?: UDP.IConfiguration; -} - -export const REGISTER: { - [key: string]: Reference; -} = { - [Source.Process]: Process.Configuration, - [Source.Serial]: Serial.Configuration, - [Source.TCP]: TCP.Configuration, - [Source.UDP]: UDP.Configuration, -}; - -export function getAllRefs(): Reference[] { - return Object.keys(REGISTER).map((key) => REGISTER[key]); -} - -export abstract class Support { - public abstract getSupportedStream(): Reference[]; -} - -export const DEFAULT = TCP.Configuration; - -export function getByAlias(alias: Source, configuration?: IDeclaration): Declaration { - const Ref: Reference = REGISTER[alias]; - if (Ref === undefined) { - throw new Error(`Unknown stream: ${alias}`); - } - return new Ref(configuration === undefined ? Ref.initial() : configuration, undefined); -} - -export function getAliasByConfiguration(configuration: IConfiguration): Source { - let detected: Source | undefined; - Object.keys(configuration).forEach((key) => { - if (REGISTER[key as Source] !== undefined) { - if (detected !== undefined) { - throw new Error( - `Configuration has a multiple source defined: ${JSON.stringify(configuration)}`, - ); - } - detected = key as Source; - } - }); - if (detected === undefined) { - throw new Error( - `Configuration doesn't have any known source: ${JSON.stringify(configuration)}`, - ); - } - return detected; -} - -@Statics>() -export class Configuration - extends Base - implements OriginDetails, Sde.Support, Parser.Support, Job -{ - static alias(): Source { - //TODO: alias should be defined for holders. Same for Parser as holder of parsers - return Source.Process; - } - - static validate(configuration: IConfiguration): Error | IConfiguration { - if ( - Object.keys(REGISTER) - .map((k) => configuration[k as Source]) - .filter((v) => v !== undefined).length === 0 - ) { - return new Error(`Stream transport isn't defined`); - } - let error: Error | undefined; - Object.keys(REGISTER).forEach((key) => { - if (error instanceof Error) { - return; - } - const config: any = configuration[key as Source]; - if (config === undefined) { - return; - } - const err = REGISTER[key as Source].validate(config); - if (err instanceof Error) { - error = err; - } else { - error = undefined; - } - }); - return error instanceof Error ? error : configuration; - } - - // Gives initial settings. Not necessarily valid. - static initial(): IConfiguration { - return { - [DEFAULT.alias()]: DEFAULT.initial(), - }; - } - - protected getSourceKey(): Source | undefined { - let found: Source | undefined; - Object.keys(REGISTER).forEach((key) => { - if (found !== undefined) { - return; - } - if (this.configuration[key as Source] === undefined) { - return; - } - found = key as Source; - }); - return found; - } - - protected setInstance(): Configuration { - const source = this.getSourceKey(); - if (source === undefined) { - throw new Error(`Configuration of stream doesn't have definition of known source.`); - } - if (this.configuration[source] === undefined) { - throw new Error(`No source is defined in stream configuration`); - } - if (this.instance !== undefined && this.instance.alias() === source) { - this.instance.setRef(this.configuration[source]); - return this; - } - this.instance !== undefined && this.instance.destroy(); - (this as Mutable).instance = new REGISTER[source]( - this.configuration[source], - { - watcher: this.watcher, - overwrite: (config: IConfiguration) => { - this.overwrite({ [source]: config }); - return this.configuration[source]; - }, - }, - ); - return this; - } - - public readonly instance!: Declaration; - - constructor(configuration: IConfiguration, linked: Linked | undefined) { - super(configuration, linked); - this.register( - this.watcher.subscribe(() => { - this.setInstance(); - }), - ); - this.setInstance(); - } - - public override destroy(): void { - super.destroy(); - this.instance !== undefined && this.instance.destroy(); - } - - public change(): { - byConfiguration(configuration: IConfiguration): void; - byDeclaration(declaration: Declaration): void; - byReference(reference: Reference): void; - } { - return { - byConfiguration: (configuration: IConfiguration): void => { - this.overwrite(configuration); - }, - byDeclaration: (stream: Declaration): void => { - this.overwrite({ [stream.alias()]: stream.configuration }); - }, - byReference: (Ref: Reference): void => { - this.overwrite({ [Ref.alias()]: new Ref(Ref.initial(), this.linked) }); - }, - }; - } - - public desc(): IOriginDetails { - return this.instance.desc(); - } - - public asJob(): IJob { - return this.instance.asJob(); - } - - public override isSdeSupported(): boolean { - return this.instance.isSdeSupported(); - } - - public getSupportedParsers(): Parser.Reference[] { - return this.instance.getSupportedParsers(); - } - - public as(Ref: { new (...args: any[]): Declaration } & Alias): T | undefined { - if (this.instance.alias() === Ref.alias()) { - return this.instance as T; - } - if (typeof (this.instance as any).as === 'function') { - return (this.instance as any).as(Ref); - } - return undefined; - } - - public override storable(): IConfiguration { - return { [this.instance.alias()]: this.instance.storable() }; - } - - public override hash(): number { - return this.instance.hash(); - } -} diff --git a/application/platform/types/observe/origin/stream/process/index.ts b/application/platform/types/observe/origin/stream/process/index.ts deleted file mode 100644 index a7f5a578d1..0000000000 --- a/application/platform/types/observe/origin/stream/process/index.ts +++ /dev/null @@ -1,109 +0,0 @@ -import { error } from '../../../../../log/utils'; -import { Source } from '../index'; -import { Configuration as Base, ConfigurationStaticDesc } from '../../../configuration'; -import { OriginDetails, IOriginDetails, IList, Job, IJob, OriginType } from '../../../description'; -import { Statics } from '../../../../../env/decorators'; -import { ShellProfile } from '../../../../../types/bindings'; - -import * as obj from '../../../../../env/obj'; -import * as Parser from '../../../parser'; -import * as Sde from '../../../sde'; -import * as str from '../../../../../env/str'; - -export interface IConfiguration { - command: string; - cwd: string; - shell: ShellProfile | undefined; -} - -@Statics>() -export class Configuration - extends Base - implements OriginDetails, Sde.Support, Job -{ - public MARKER = 'application/platform/types/observe/origin/stream/process/index.ts'; - - static desc(): IList { - return { - major: `Terminal`, - minor: 'Executing Terminal Command', - icon: 'web_asset', - }; - } - - static alias(): Source { - return Source.Process; - } - - static sterilizeEnvVars(envs: { [key: string]: any }): { [key: string]: string } { - Object.keys(envs).forEach((key: string) => { - if (typeof envs[key] === 'string') { - return; - } - if (typeof envs[key].toString === 'function') { - envs[key] = envs[key].toString(); - } else { - envs[key] = JSON.stringify(envs[key]); - } - }); - return envs; - } - - static validate(configuration: IConfiguration): Error | IConfiguration { - try { - obj.getAsNotEmptyString(configuration, 'command'); - obj.getAsString(configuration, 'cwd'); - return configuration; - } catch (e) { - return new Error(error(e)); - } - } - - static inited(): boolean { - return true; - } - - // Gives initial settings. Not necessarily valid. - static initial(): IConfiguration { - return { - command: '', - cwd: '', - shell: undefined, - }; - } - - public desc(): IOriginDetails { - return { - major: `${this.configuration.command}`, - minor: this.configuration.cwd === '' ? 'no defined cwd' : this.configuration.cwd, - icon: 'web_asset', - action: 'Execute', - type: OriginType.command, - state: { - running: 'spawning', - stopped: '', - }, - }; - } - - public asJob(): IJob { - return { - name: `${this.configuration.command}`, - desc: `${this.configuration.command}`, - icon: 'web_asset', - }; - } - - public getSupportedParsers(): Parser.Reference[] { - return [Parser.Text.Configuration, Parser.Plugin.Configuration]; - } - - public override storable(): IConfiguration { - const sterilized = this.sterilized(); - return sterilized; - } - - public override hash(): number { - return str.hash(`${this.configuration.command};${this.configuration.cwd}`); - } -} diff --git a/application/platform/types/observe/origin/stream/serial/index.ts b/application/platform/types/observe/origin/stream/serial/index.ts deleted file mode 100644 index 78bc4aa60a..0000000000 --- a/application/platform/types/observe/origin/stream/serial/index.ts +++ /dev/null @@ -1,105 +0,0 @@ -import { error } from '../../../../../log/utils'; -import { Source } from '../index'; -import { Configuration as Base, ConfigurationStaticDesc } from '../../../configuration'; -import { OriginDetails, IOriginDetails, IList, Job, IJob, OriginType } from '../../../description'; -import { Statics } from '../../../../../env/decorators'; - -import * as obj from '../../../../../env/obj'; -import * as Parser from '../../../parser'; -import * as Sde from '../../../sde'; -import * as str from '../../../../../env/str'; - -export interface IConfiguration { - path: string; - baud_rate: number; - data_bits: number; - flow_control: number; - parity: number; - stop_bits: number; - send_data_delay: number; - exclusive: boolean; -} - -@Statics>() -export class Configuration - extends Base - implements OriginDetails, Sde.Support, Job -{ - public MARKER = 'application/platform/types/observe/origin/stream/serial/index.ts'; - - static desc(): IList { - return { - major: `Serial Port`, - minor: 'Connection to Serial Port', - icon: 'import_export', - }; - } - - static alias(): Source { - return Source.Serial; - } - - static validate(configuration: IConfiguration): Error | IConfiguration { - try { - obj.getAsNotEmptyString(configuration, 'path'); - obj.getAsValidNumber(configuration, 'baud_rate'); - obj.getAsValidNumber(configuration, 'data_bits'); - obj.getAsValidNumber(configuration, 'flow_control'); - obj.getAsValidNumber(configuration, 'parity'); - obj.getAsValidNumber(configuration, 'stop_bits'); - return configuration; - } catch (e) { - return new Error(error(e)); - } - } - - static inited(): boolean { - return true; - } - - // Gives initial settings. Not necessarily valid. - static initial(): IConfiguration { - return { - baud_rate: 115200, - data_bits: 8, - flow_control: 0, - parity: 0, - path: '', - stop_bits: 1, - send_data_delay: 0, - exclusive: true, - }; - } - - public desc(): IOriginDetails { - return { - major: this.configuration.path, - minor: `Baud Rate: ${this.configuration.baud_rate}`, - icon: 'import_export', - action: 'Connect', - type: OriginType.serial, - state: { - running: 'listening', - stopped: '', - }, - }; - } - - public asJob(): IJob { - return { - name: `Serial: ${this.configuration.path}`, - desc: `Baud Rate: ${this.configuration.baud_rate}`, - icon: 'import_export', - }; - } - - public getSupportedParsers(): Parser.Reference[] { - return [Parser.Text.Configuration, Parser.Plugin.Configuration]; - } - - public override hash(): number { - return str.hash( - `${this.configuration.path};${this.configuration.baud_rate};${this.configuration.data_bits};${this.configuration.flow_control};${this.configuration.parity};${this.configuration.stop_bits}`, - ); - } -} diff --git a/application/platform/types/observe/origin/stream/tcp/index.ts b/application/platform/types/observe/origin/stream/tcp/index.ts deleted file mode 100644 index 58c5166a89..0000000000 --- a/application/platform/types/observe/origin/stream/tcp/index.ts +++ /dev/null @@ -1,80 +0,0 @@ -import { Source } from '../index'; -import { Configuration as Base, ConfigurationStaticDesc } from '../../../configuration'; -import { OriginDetails, IOriginDetails, IList, Job, IJob, OriginType } from '../../../description'; -import { Statics } from '../../../../../env/decorators'; - -import * as Parser from '../../../parser'; -import * as Sde from '../../../sde'; -import * as Ip from '../../../../../env/ipaddr'; -import * as str from '../../../../../env/str'; - -export interface IConfiguration { - bind_addr: string; -} - -@Statics>() -export class Configuration - extends Base - implements OriginDetails, Sde.Support, Job -{ - public MARKER = 'application/platform/types/observe/origin/stream/tcp/index.ts'; - - static desc(): IList { - return { - major: `TCP`, - minor: 'TCP Connection', - icon: 'network_wifi_3_bar', - }; - } - - static alias(): Source { - return Source.TCP; - } - - static validate(configuration: IConfiguration): Error | IConfiguration { - return Ip.anyIPAddr(configuration.bind_addr) - ? configuration - : new Error(`Invalid IP address`); - } - - static inited(): boolean { - return true; - } - - // Gives initial settings. Not necessarily valid. - static initial(): IConfiguration { - return { - bind_addr: '', - }; - } - - public desc(): IOriginDetails { - return { - major: this.configuration.bind_addr, - minor: '', - icon: 'network_wifi_3_bar', - type: OriginType.net, - action: 'Connect', - state: { - running: 'listening', - stopped: '', - }, - }; - } - - public asJob(): IJob { - return { - name: `TCP: ${this.configuration.bind_addr}`, - desc: `Connecting to ${this.configuration.bind_addr} via TCP`, - icon: 'network_wifi_3_bar', - }; - } - - public getSupportedParsers(): Parser.Reference[] { - return [Parser.Dlt.Configuration, Parser.Plugin.Configuration]; - } - - public override hash(): number { - return str.hash(`${this.configuration.bind_addr}`); - } -} diff --git a/application/platform/types/observe/origin/stream/udp/index.ts b/application/platform/types/observe/origin/stream/udp/index.ts deleted file mode 100644 index 61a2f5124b..0000000000 --- a/application/platform/types/observe/origin/stream/udp/index.ts +++ /dev/null @@ -1,113 +0,0 @@ -import { error } from '../../../../../log/utils'; -import { Source } from '../index'; -import { Configuration as Base, ConfigurationStaticDesc } from '../../../configuration'; -import { OriginDetails, IOriginDetails, IList, Job, IJob, OriginType } from '../../../description'; -import { Statics } from '../../../../../env/decorators'; - -import * as obj from '../../../../../env/obj'; -import * as Parser from '../../../parser'; -import * as Sde from '../../../sde'; -import * as Ip from '../../../../../env/ipaddr'; -import * as str from '../../../../../env/str'; - -export interface Multicast { - multiaddr: string; - interface: string | undefined; -} - -export interface IConfiguration { - bind_addr: string; - multicast: Multicast[]; -} - -@Statics>() -export class Configuration - extends Base - implements OriginDetails, Sde.Support, Job -{ - public MARKER = 'application/platform/types/observe/origin/stream/udp/index.ts'; - - static desc(): IList { - return { - major: `UDP`, - minor: 'UDP Connection', - icon: 'network_wifi_3_bar', - }; - } - - static alias(): Source { - return Source.UDP; - } - - static validate(configuration: IConfiguration): Error | IConfiguration { - try { - if (!Ip.anyIPAddr(configuration.bind_addr)) { - return new Error(`Invalid binding address`); - } - obj.getAsArray(configuration, 'multicast'); - return configuration.multicast - .map((multicast: Multicast) => { - return ( - Ip.anyIPAddr(multicast.multiaddr) && - (Ip.isValidIPv4(multicast.interface) || Ip.isValidIPv6(multicast.interface)) - ); - }) - .filter((r) => !r).length === 0 - ? configuration - : new Error(`Invalid multicast definition`); - } catch (e) { - return new Error(error(e)); - } - } - - static inited(): boolean { - return true; - } - // Gives initial settings. Not necessarily valid. - static initial(): IConfiguration { - return { - bind_addr: '', - multicast: [], - }; - } - - public desc(): IOriginDetails { - return { - major: this.configuration.bind_addr, - minor: - this.configuration.multicast.length === 0 - ? '' - : this.configuration.multicast.map((m) => m.multiaddr).join(', '), - action: 'Connect', - icon: 'network_wifi_3_bar', - type: OriginType.net, - state: { - running: 'listening', - stopped: '', - }, - }; - } - - public asJob(): IJob { - return { - name: `UDP: ${this.configuration.bind_addr}`, - desc: - this.configuration.multicast.length === 0 - ? `Connecting to ${this.configuration.bind_addr} via UDP (no multicasts)` - : this.configuration.multicast.map((m) => m.multiaddr).join(', '), - icon: 'network_wifi_3_bar', - }; - } - - public getSupportedParsers(): Parser.Reference[] { - return [Parser.Dlt.Configuration, Parser.SomeIp.Configuration, Parser.Plugin.Configuration]; - } - - public override hash(): number { - return str.hash( - `${this.configuration.bind_addr};${this.configuration.multicast - .map((m) => `${m.multiaddr};${m.interface}`) - .join(';')}`, - ); - } -} diff --git a/application/platform/types/observe/parser/dlt/index.ts b/application/platform/types/observe/parser/dlt/index.ts deleted file mode 100644 index 4eddc0d22b..0000000000 --- a/application/platform/types/observe/parser/dlt/index.ts +++ /dev/null @@ -1,185 +0,0 @@ -import { error } from '../../../../log/utils'; -import { Protocol } from '../index'; -import { Configuration as Base, ConfigurationStaticDesc } from '../../configuration'; -import { Statics } from '../../../../env/decorators'; -import { List, IList } from '../../description'; - -import * as Stream from '../../origin/stream/index'; -import * as Files from '../../types/file'; -import * as obj from '../../../../env/obj'; -import * as Origin from '../../origin/index'; -import * as str from '../../../../env/str'; - -export function getLogLevelName(level: number): string { - const name = (DltLogLevelNames as Record)[level]; - return name === undefined ? 'unknown' : name; -} - -export const DltLogLevelNames = { - 1: 'Fatal', - 2: 'Error', - 3: 'Warn', - 4: 'Info', - 5: 'Debug', - 6: 'Verbose', -}; - -export enum LogLevel { - Fatal = 1, - Error = 2, - Warn = 3, - Info = 4, - Debug = 5, - Verbose = 6, -} - -export interface IFilters { - min_log_level: LogLevel | undefined; - app_ids: string[] | undefined; - ecu_ids: string[] | undefined; - context_ids: string[] | undefined; - app_id_count: number; - context_id_count: number; -} - -export interface IConfiguration { - filter_config: IFilters | undefined; - fibex_file_paths: string[] | undefined; - with_storage_header: boolean; - tz: string | undefined; -} - -@Statics>() -export class Configuration - extends Base - implements List, Stream.Support, Files.Support, Origin.OnChange -{ - static desc(): IList { - return { - major: 'DLT', - minor: 'Parsing DLT tracers', - icon: undefined, - }; - } - - static alias(): Protocol { - return Protocol.Dlt; - } - - static validate(configuration: IConfiguration): Error | IConfiguration { - try { - obj.getAsBool(configuration, 'with_storage_header'); - obj.getAsNotEmptyStringsArrayOrUndefined(configuration, 'fibex_file_paths'); - obj.getAsObjOrUndefined(configuration, 'filter_config'); - obj.getAsNotEmptyStringOrAsUndefined(configuration, 'tz'); - const filter_config = configuration.filter_config; - if (filter_config !== undefined) { - obj.getAsValidNumber(filter_config, 'min_log_level'); - obj.getAsNotEmptyStringsArrayOrUndefined(filter_config, 'app_ids'); - obj.getAsNotEmptyStringsArrayOrUndefined(filter_config, 'ecu_ids'); - obj.getAsNotEmptyStringsArrayOrUndefined(filter_config, 'context_ids'); - obj.getAsValidNumber(filter_config, 'app_id_count'); - obj.getAsValidNumber(filter_config, 'context_id_count'); - } - return configuration; - } catch (e) { - return new Error(error(e)); - } - } - - static inited(): boolean { - return true; - } - - // Gives initial settings. Not necessarily valid. - static initial(): IConfiguration { - return { - filter_config: undefined, - fibex_file_paths: [], - with_storage_header: true, - tz: undefined, - }; - } - - protected getDefaultsFilters(): IFilters { - return { - min_log_level: LogLevel.Verbose, - app_ids: undefined, - ecu_ids: undefined, - context_ids: undefined, - app_id_count: 0, - context_id_count: 0, - }; - } - - public onOriginChange(origin: Origin.Configuration): void { - if (origin.instance instanceof Origin.Stream.Configuration) { - this.configuration.with_storage_header = false; - } else if (origin.instance instanceof Origin.File.Configuration) { - this.configuration.with_storage_header = - origin.instance.filetype() === Files.FileType.Binary; - } else if (origin.instance instanceof Origin.Concat.Configuration) { - // TODO: could be issue if concat configuration have different types - // of files - const types = origin.instance.filetypes(); - this.configuration.with_storage_header = - types.length === 0 ? true : types[0] === Files.FileType.Binary; - } else { - throw new Error(`Not implemented usecase for DLT parser onOriginChange`); - } - } - - public desc(): IList { - return Configuration.desc(); - } - - public setDefaultsFilterConfig(): void { - if (this.configuration.filter_config !== undefined) { - return; - } - this.configuration.filter_config = this.getDefaultsFilters(); - } - - public dropFilterConfigIfPossible(): void { - if (this.configuration.filter_config === undefined) { - return; - } - if (this.configuration.filter_config.min_log_level !== LogLevel.Verbose) { - return; - } - if ( - this.configuration.filter_config.app_ids !== undefined && - this.configuration.filter_config.app_ids.length > 0 - ) { - return; - } - if ( - this.configuration.filter_config.context_ids !== undefined && - this.configuration.filter_config.context_ids.length > 0 - ) { - return; - } - if ( - this.configuration.filter_config.ecu_ids !== undefined && - this.configuration.filter_config.ecu_ids.length > 0 - ) { - return; - } - this.configuration.filter_config = undefined; - } - - public override hash(): number { - const filters = - this.configuration.filter_config === undefined - ? this.getDefaultsFilters() - : this.configuration.filter_config; - return str.hash( - `dlt:${(this.configuration.fibex_file_paths === undefined - ? [] - : this.configuration.fibex_file_paths - ).join(';')};${this.configuration.with_storage_header};${this.configuration.tz};${ - filters.min_log_level - };${filters.ecu_ids?.length};${filters.app_ids?.length};${filters.context_ids?.length}`, - ); - } -} diff --git a/application/platform/types/observe/parser/index.ts b/application/platform/types/observe/parser/index.ts deleted file mode 100644 index 985e45be5d..0000000000 --- a/application/platform/types/observe/parser/index.ts +++ /dev/null @@ -1,235 +0,0 @@ -import { - Configuration as Base, - ConfigurationStatic, - ReferenceDesc, - Linked, -} from '../configuration'; -import { Statics } from '../../../env/decorators'; -import { List, IList } from '../description'; -import { Mutable } from '../../unity/mutable'; -import { Alias } from '../../env/types'; - -import * as Dlt from './dlt'; -import * as SomeIp from './someip'; -import * as Text from './text'; -import * as Plugin from './plugin'; - -export * as Dlt from './dlt'; -export * as SomeIp from './someip'; -export * as Text from './text'; -export * as Plugin from './plugin'; -import * as Stream from '../origin/stream/index'; -import * as Files from '../types/file'; -import * as Origin from '../origin/index'; - -export type Reference = - | ReferenceDesc - | ReferenceDesc - | ReferenceDesc - | ReferenceDesc; - -export enum Protocol { - Dlt = 'Dlt', - SomeIp = 'SomeIp', - Text = 'Text', - Plugin = 'Plugin', -} - -export type IDeclaration = - | Text.IConfiguration - | Dlt.IConfiguration - | SomeIp.IConfiguration - | Plugin.IConfiguration; - -export type Declaration = - | Text.Configuration - | Dlt.Configuration - | SomeIp.Configuration - | Plugin.Configuration; - -export interface IConfiguration { - [Protocol.Dlt]?: Dlt.IConfiguration; - [Protocol.SomeIp]?: SomeIp.IConfiguration; - [Protocol.Text]?: Text.IConfiguration; - [Protocol.Plugin]?: Plugin.IConfiguration; -} - -const REGISTER: { - [key: string]: Reference; -} = { - [Protocol.Dlt]: Dlt.Configuration, - [Protocol.SomeIp]: SomeIp.Configuration, - [Protocol.Text]: Text.Configuration, - [Protocol.Plugin]: Plugin.Configuration, -}; - -export function tryAsEmbedded(alias: Protocol | string): Protocol | undefined { - if (REGISTER[alias]) { - return alias as Protocol; - } - return undefined; -} - -export function getAllRefs(): Reference[] { - return Object.keys(REGISTER).map((key) => REGISTER[key]); -} - -export abstract class Support { - public abstract getSupportedParsers(): Reference[]; -} - -const DEFAULT = Text.Configuration; - -export function getByAlias(alias: Protocol): Declaration { - const Ref: Reference = REGISTER[alias]; - if (Ref === undefined) { - throw new Error(`Unknown parser: ${alias}`); - } - return new Ref(Ref.initial(), undefined); -} - -export function suggestParserByFileExt(filename: string): Reference | undefined { - const normalized = filename.toLowerCase().trim(); - if (normalized.endsWith('.dlt')) { - return Dlt.Configuration; - } else if (normalized.endsWith('.pcapng')) { - return Dlt.Configuration; - } else { - return undefined; - } -} - -@Statics>() -export class Configuration - extends Base - implements List, Stream.Support, Files.Support, Origin.OnChange -{ - static alias(): Protocol { - throw new Error(`Alias of parsers holder should be used`); - } - - static validate(configuration: IConfiguration): Error | IConfiguration { - if ( - Object.keys(REGISTER) - .map((k) => configuration[k as Protocol]) - .filter((v) => v !== undefined).length === 0 - ) { - return new Error(`Stream transport isn't defined`); - } - let error: Error | undefined; - Object.keys(REGISTER).forEach((key) => { - if (error instanceof Error) { - return; - } - const config: any = configuration[key as Protocol]; - if (config === undefined) { - return; - } - // Error with "never" comes because text parser has settings NULL - const err = REGISTER[key as Protocol].validate(config as never); - if (err instanceof Error) { - error = err; - } else { - error = undefined; - } - }); - return error instanceof Error ? error : configuration; - } - - // Gives initial settings. Not necessarily valid. - static initial(): IConfiguration { - return { - [DEFAULT.alias()]: DEFAULT.initial(), - }; - } - - protected getProtocolKey(): Protocol | undefined { - let found: Protocol | undefined; - Object.keys(REGISTER).forEach((key) => { - if (found !== undefined) { - return; - } - if (this.configuration[key as Protocol] === undefined) { - return; - } - found = key as Protocol; - }); - return found; - } - - protected setInstance(): Configuration { - const protocol = this.getProtocolKey(); - if (protocol === undefined) { - throw new Error(`Configuration of stream doesn't have definition of known protocol.`); - } - if (this.instance !== undefined && this.instance.alias() === protocol) { - this.instance.setRef(this.configuration[protocol]); - return this; - } - this.instance !== undefined && this.instance.destroy(); - (this as Mutable).instance = new REGISTER[protocol]( - this.configuration[protocol], - { - watcher: this.watcher, - overwrite: (config: IConfiguration) => { - this.overwrite(config); - return this.configuration[protocol]; - }, - }, - ); - return this; - } - - public readonly instance!: Declaration; - - constructor(configuration: IConfiguration, linked: Linked | undefined) { - super(configuration, linked); - this.register( - this.watcher.subscribe(() => { - this.setInstance(); - }), - ); - this.setInstance(); - } - - public override destroy(): void { - super.destroy(); - this.instance !== undefined && this.instance.destroy(); - } - - public onOriginChange(origin: Origin.Configuration): void { - this.instance.onOriginChange(origin); - } - - public change(parser: Declaration): void { - this.overwrite({ [parser.alias()]: parser.configuration }); - } - - public desc(): IList { - return this.instance.desc(); - } - - public override getSupportedStream(): Stream.Reference[] { - return this.instance.getSupportedStream(); - } - - public override alias(): Protocol { - return this.instance.alias(); - } - - public override getSupportedFileType(): Files.FileType[] { - return this.instance.getSupportedFileType(); - } - - public as(Ref: { new (...args: any[]): Declaration } & Alias): T | undefined { - return this.instance.alias() === Ref.alias() ? (this.instance as T) : undefined; - } - - public override storable(): IConfiguration { - return { [this.instance.alias()]: this.instance.storable() }; - } - - public override hash(): number { - return this.instance.hash(); - } -} diff --git a/application/platform/types/observe/parser/plugin/index.ts b/application/platform/types/observe/parser/plugin/index.ts deleted file mode 100644 index ca3f52a182..0000000000 --- a/application/platform/types/observe/parser/plugin/index.ts +++ /dev/null @@ -1,129 +0,0 @@ -import { error } from '../../../../log/utils'; -import { Protocol } from '../index'; -import { Configuration as Base, ConfigurationStaticDesc } from '../../configuration'; -import { Statics } from '../../../../env/decorators'; -import { List, IList } from '../../description'; - -import * as str from '../../../../env/str'; -import * as Origin from '../../origin/index'; -import * as Stream from '../../origin/stream/index'; -import * as obj from '../../../../env/obj'; -import * as Files from '../../types/file'; - -import { PluginConfigItem, PluginConfigValue } from '../../../bindings/plugins'; - -export interface IConfiguration { - plugin_path: string; - plugin_configs: PluginConfigItem[]; -} - -@Statics>() -export class Configuration - extends Base - implements List, Stream.Support, Files.Support -{ - /// Plugin uses inner data to provide self description. In run-time fields - /// `major` will be replaced with plugin name; `minor` with an addition data - /// more details: `WrappedParserRef` (application/client/src/app/ui/tabs/observe/state.ts) - static desc(): IList { - return { - major: '', - minor: '', - icon: undefined, - }; - } - - static alias(): Protocol { - return Protocol.Plugin; - } - - static validate(configuration: IConfiguration): Error | IConfiguration { - try { - const pluginPath = obj.getAsString(configuration, 'plugin_path'); - if (pluginPath.length == 0) { - return Error('No Valid Plugin Parser is selected.'); - } - - obj.getAsArray(configuration, 'plugin_configs'); - - return configuration; - } catch (e) { - return new Error(error(e)); - } - } - - static inited(): boolean { - return Configuration.desc().major.trim() !== ''; - } - - // Gives initial settings. Not necessarily valid. - static initial(): IConfiguration { - return { - plugin_path: '', - plugin_configs: [], - }; - } - - public desc(): IList { - return { - major: 'Plugin parser instance major TODO', - minor: 'Plugin parser instance minor TODO', - icon: undefined, - }; - } - - public onOriginChange(_origin: Origin.Configuration): void { - // Plugin parsers don't need to react on changing source at the current implementation. - } - - /** - * Extract the value from the configuration value item depending on its kind, - * returning a value that can represented as a formatted string. - */ - getConfigValue(value: PluginConfigValue): string | number | boolean { - if ('Boolean' in value) { - return value.Boolean; - } - - if ('Integer' in value) { - return value.Integer; - } - - if ('Float' in value) { - return value.Float; - } - - if ('Text' in value) { - return value.Text; - } - - if ('Files' in value) { - return value.Files.join(','); - } - - if ('Directories' in value) { - return value.Directories.join(','); - } - - if ('Dropdown' in value) { - return value.Dropdown; - } - - assertNever(value); - } - - public override hash(): number { - const configs = this.configuration.plugin_configs.map( - (item) => `${item.id}:${this.getConfigValue(item.value)}`, - ); - return str.hash(`${this.configuration.plugin_path}; ${configs.join(';')}`); - } -} - -/** - * Helper function to ensure the remaining item is never for exhausting matching at compile time, - * and throwing an unhandled error at runtime. - */ -function assertNever(nev: never): never { - throw new Error(`Unhandled case: ${JSON.stringify(nev)}`); -} diff --git a/application/platform/types/observe/parser/someip/index.ts b/application/platform/types/observe/parser/someip/index.ts deleted file mode 100644 index eca02fd97d..0000000000 --- a/application/platform/types/observe/parser/someip/index.ts +++ /dev/null @@ -1,87 +0,0 @@ -import { error } from '../../../../log/utils'; -import { Protocol } from '../index'; -import { Configuration as Base, ConfigurationStaticDesc } from '../../configuration'; -import { Statics } from '../../../../env/decorators'; -import { List, IList } from '../../description'; - -import * as Stream from '../../origin/stream/index'; -import * as obj from '../../../../env/obj'; -import * as Files from '../../types/file'; -import * as Origin from '../../origin/index'; -import * as str from '../../../../env/str'; - -export interface SomeipStatistic { - /** Statistic on service-ids and related method-ids */ - services: SomeipStatisticItem[]; - /** Statistic on message-types and related return-codes */ - messages: SomeipStatisticItem[]; -} - -export interface SomeipStatisticItem { - item: SomeipStatisticDetail; - details: SomeipStatisticDetail[]; -} - -export interface SomeipStatisticDetail { - id: number; - num: number; -} - -export interface IConfiguration { - fibex_file_paths: string[] | undefined; -} - -@Statics>() -export class Configuration - extends Base - implements List, Stream.Support, Files.Support -{ - static desc(): IList { - return { - major: 'SomeIp', - minor: 'Parsing SomeIp tracers', - icon: undefined, - }; - } - - static alias(): Protocol { - return Protocol.SomeIp; - } - - static validate(configuration: IConfiguration): Error | IConfiguration { - try { - obj.getAsNotEmptyStringsArrayOrUndefined(configuration, 'fibex_file_paths'); - return configuration; - } catch (e) { - return new Error(error(e)); - } - } - - static inited(): boolean { - return true; - } - - // Gives initial settings. Not necessarily valid. - static initial(): IConfiguration { - return { - fibex_file_paths: [], - }; - } - - public onOriginChange(_origin: Origin.Configuration): void { - //Do nothing - } - - public desc(): IList { - return Configuration.desc(); - } - - public override hash(): number { - return str.hash( - `someip:${(this.configuration.fibex_file_paths === undefined - ? [] - : this.configuration.fibex_file_paths - ).join(';')}`, - ); - } -} diff --git a/application/platform/types/observe/parser/text/index.ts b/application/platform/types/observe/parser/text/index.ts deleted file mode 100644 index 5a779c9fab..0000000000 --- a/application/platform/types/observe/parser/text/index.ts +++ /dev/null @@ -1,62 +0,0 @@ -import { error } from '../../../../log/utils'; -import { Protocol } from '../index'; -import { Configuration as Base, ConfigurationStaticDesc } from '../../configuration'; -import { Statics } from '../../../../env/decorators'; -import { List, IList } from '../../description'; - -import * as str from '../../../../env/str'; -import * as Origin from '../../origin/index'; -import * as Stream from '../../origin/stream/index'; -import * as Files from '../../types/file'; - -export type IConfiguration = null; - -@Statics>() -export class Configuration - extends Base - implements List, Stream.Support, Files.Support -{ - static desc(): IList { - return { - major: 'Plain Text', - minor: 'Plain Text Parser ', - icon: undefined, - }; - } - - static alias(): Protocol { - return Protocol.Text; - } - - static validate(configuration: IConfiguration): Error | IConfiguration { - try { - if (configuration !== null) { - throw new Error(`Text parser doesn't have any configuration; it should null`); - } - return configuration; - } catch (e) { - return new Error(error(e)); - } - } - - static inited(): boolean { - return true; - } - - // Gives initial settings. Not necessarily valid. - static initial(): IConfiguration { - return null; - } - - public onOriginChange(_origin: Origin.Configuration): void { - // Do nothing - } - - public desc(): IList { - return Configuration.desc(); - } - - public override hash(): number { - return str.hash(`text`); - } -} diff --git a/application/platform/types/observe/sde.ts b/application/platform/types/observe/sde.ts deleted file mode 100644 index a045fb7192..0000000000 --- a/application/platform/types/observe/sde.ts +++ /dev/null @@ -1,3 +0,0 @@ -export abstract class Support { - public abstract isSdeSupported(): boolean; -} diff --git a/application/platform/types/observe/types/file/index.ts b/application/platform/types/observe/types/file/index.ts deleted file mode 100644 index b3ec14e012..0000000000 --- a/application/platform/types/observe/types/file/index.ts +++ /dev/null @@ -1,38 +0,0 @@ -export abstract class Support { - public abstract getSupportedFileType(): FileName[]; -} - -export enum FileType { - PcapNG = 'PcapNG', - PcapLegacy = 'PcapLegacy', - Text = 'Text', - Binary = 'Binary', - ParserPlugin = 'ParserPlugin', -} - -export function getFileTypeFrom(smth: unknown): FileType | Error { - switch (smth as FileType) { - case FileType.Binary: - return FileType.Binary; - case FileType.PcapNG: - return FileType.PcapNG; - case FileType.PcapLegacy: - return FileType.PcapLegacy; - case FileType.Text: - return FileType.Text; - case FileType.ParserPlugin: - return FileType.ParserPlugin; - default: - return new Error(`${smth} isn't FileType`); - } -} - -export function extname(filename: string): string { - const matches = filename.match(/\.[\w\d_]*$/gi); - if (matches !== null) { - return matches[0]; - } - return ''; -} - -export type FileName = string; diff --git a/application/platform/types/observe/types/index.ts b/application/platform/types/observe/types/index.ts deleted file mode 100644 index 139f68171c..0000000000 --- a/application/platform/types/observe/types/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -export * as File from './file'; -export * as Plugin from './plugin'; -export { ISourceLink } from './sourcelink'; diff --git a/application/platform/types/observe/types/plugin/index.ts b/application/platform/types/observe/types/plugin/index.ts deleted file mode 100644 index eee207940d..0000000000 --- a/application/platform/types/observe/types/plugin/index.ts +++ /dev/null @@ -1 +0,0 @@ -export type PluginDirPath = string; diff --git a/application/platform/types/observe/types/sourcelink.ts b/application/platform/types/observe/types/sourcelink.ts deleted file mode 100644 index a138ce7549..0000000000 --- a/application/platform/types/observe/types/sourcelink.ts +++ /dev/null @@ -1,4 +0,0 @@ -export interface ISourceLink { - id: number; - alias: string; -} diff --git a/application/platform/types/range.ts b/application/platform/types/range.ts deleted file mode 100644 index 7c0692244a..0000000000 --- a/application/platform/types/range.ts +++ /dev/null @@ -1,187 +0,0 @@ -import * as num from '../env/num'; - -export interface IRange { - start: number; - end: number; -} - -export function fromTuple( - range: [number, number] | { start: number; end: number } | unknown, -): IRange | Error { - if (range instanceof Array && range.length === 2) { - if (!num.isValidU32(range[0])) { - return new Error( - `Begining of range isn't valid: ${range[0]}; ${JSON.stringify(range)}`, - ); - } - if (!num.isValidU32(range[1])) { - return new Error(`End of range isn't valid: ${range[1]}; ${JSON.stringify(range)}`); - } - return { start: range[0], end: range[1] }; - } else if (typeof range === 'object' && range !== undefined && range !== null) { - const asObj = range as { start: number; end: number }; - if (!num.isValidU32(asObj.start)) { - return new Error( - `Begining of range isn't valid: ${asObj.start}; ${JSON.stringify(range)}`, - ); - } - if (!num.isValidU32(asObj.end)) { - return new Error(`End of range isn't valid: ${asObj.end}; ${JSON.stringify(range)}`); - } - return { start: asObj.start, end: asObj.end }; - } else { - return new Error(`Expecting tuple: [number, number]: ${JSON.stringify(range)}`); - } -} - -export class Range { - public readonly start: number; - public readonly end: number; - public readonly spec: { - // true - will use i >= start; false - i > start - left: boolean; - // true - will use i <= end; false - i > end - right: boolean; - // true - range in this case will be valid for i < start - before: boolean; - // true - range in this case will be valid for i > end - after: boolean; - } = { - left: true, - right: true, - before: false, - after: false, - }; - - public static get(range: Range, src: T[], index: (entry: T) => number): T[] { - return src.filter((r) => range.in(index(r))); - } - - constructor(start: number, end: number) { - if ( - start > end || - start < 0 || - end < 0 || - isNaN(start) || - isNaN(end) || - !isFinite(start) || - !isFinite(end) - ) { - throw new Error(`Invalid range: [${start} - ${end}]`); - } - this.start = start; - this.end = end; - } - - public asObj(): IRange { - return { start: this.start, end: this.end }; - } - - public len(): number { - return this.end - this.start; - } - - public get(): IRange { - return { - start: this.start, - end: this.end, - }; - } - - public left(value: boolean): Range { - this.spec.left = value; - return this; - } - - public right(value: boolean): Range { - this.spec.right = value; - return this; - } - - public after(value: boolean): Range { - this.spec.after = value; - return this; - } - - public before(value: boolean): Range { - this.spec.before = value; - return this; - } - - public in(int: number): boolean { - if (this.spec.before && this.spec.left && int <= this.start) { - return true; - } - if (this.spec.before && !this.spec.left && int < this.start) { - return true; - } - if (this.spec.after && this.spec.right && int >= this.end) { - return true; - } - if (this.spec.after && !this.spec.right && int > this.end) { - return true; - } - if (this.spec.after || this.spec.before) { - return false; - } - if (this.spec.left && this.spec.right && int >= this.start && int <= this.end) { - return true; - } - if (!this.spec.left && this.spec.right && int > this.start && int <= this.end) { - return true; - } - if (this.spec.left && !this.spec.right && int >= this.start && int < this.end) { - return true; - } - if (!this.spec.left && !this.spec.right && int > this.start && int < this.end) { - return true; - } - return false; - } - - public equal(range: Range): boolean { - if (this.start !== range.start || this.end !== range.end) { - return false; - } - if ( - this.spec.left !== range.spec.left || - this.spec.right !== range.spec.right || - this.spec.after !== range.spec.after || - this.spec.before !== range.spec.before - ) { - return false; - } - return true; - } -} - -export function fromIndexes(indexes: number[]): IRange[] { - if (indexes.length === 0) { - return []; - } - const ranges: IRange[] = []; - indexes.sort((a, b) => (a >= b ? 1 : -1)); - let start: number = -1; - let end = -1; - indexes.forEach((i) => { - if (i < 0 || isNaN(i) || !isFinite(i)) { - throw new Error(`Invalid index: ${i}`); - } - if (end === -1) { - end = i; - } - if (start === -1) { - start = i; - return; - } - if (i === end + 1) { - end = i; - return; - } - ranges.push({ start, end }); - start = i; - end = i; - }); - start !== -1 && ranges.push({ start, end: indexes[indexes.length - 1] }); - return ranges; -} diff --git a/application/platform/types/sde/index.ts b/application/platform/types/sde/index.ts deleted file mode 100644 index 1cf8704341..0000000000 --- a/application/platform/types/sde/index.ts +++ /dev/null @@ -1,8 +0,0 @@ -export interface SdeRequest { - WriteText?: string; - WriteBytes?: number[]; -} - -export interface SdeResponse { - bytes: number; -} diff --git a/application/platform/types/settings/entry.description.ts b/application/platform/types/settings/entry.description.ts deleted file mode 100644 index 758901c3e2..0000000000 --- a/application/platform/types/settings/entry.description.ts +++ /dev/null @@ -1,93 +0,0 @@ -export enum Visibility { - standard = 'standard', - advanced = 'advanced', - hidden = 'hidden', -} - -export enum Render { - String = 'String', - Number = 'Number', - Color = 'Color', - Bool = 'Bool', -} - -export interface IDescription { - key: string; - path: string; - name: string; - desc: string; - allowEmpty: boolean; - type: Visibility; - render: Render; -} - -export class Description { - static validate(spec: IDescription): Error | undefined { - if (typeof spec !== 'object' || spec === null) { - return new Error(`"spec" is not valid.`); - } - let error: Error | undefined; - [ - { name: 'key', type: 'string', canBeEmpty: false }, - { name: 'path', type: 'string', canBeEmpty: false }, - { name: 'name', type: 'string', canBeEmpty: false }, - { name: 'desc', type: 'string', canBeEmpty: false }, - { name: 'allowEmpty', type: 'boolean', canBeEmpty: false }, - { name: 'type', type: 'string', canBeEmpty: false }, - { name: 'render', type: 'string', canBeEmpty: false }, - ].forEach((desc) => { - if (error !== undefined) { - return; - } - if (typeof (spec as any)[desc.name] !== desc.type) { - error = new Error( - `Key "${desc.name}" has wrong type "${typeof (spec as any)[ - desc.name - ]}", but expected "${desc.type}"`, - ); - } - if (!desc.canBeEmpty && typeof (spec as any)[desc.name] === 'string') { - if ((spec as any)[desc.name].trim() === '') { - error = new Error( - `Key "${desc.name}" could not be empty. Some value should be defined.`, - ); - } - } - }); - return error; - } - - public readonly key: string; - public readonly name: string; - public readonly desc: string; - public readonly type: Visibility; - public readonly path: string; - public readonly allowEmpty: boolean; - public readonly render: Render; - - constructor(desc: IDescription) { - const err: Error | undefined = Description.validate(desc); - if (err instanceof Error) { - throw err; - } - this.key = desc.key; - this.name = desc.name; - this.desc = desc.desc; - this.path = desc.path; - this.type = desc.type; - this.render = desc.render; - this.allowEmpty = desc.allowEmpty; - } - - public asObj(): IDescription { - return { - key: this.key, - name: this.name, - path: this.path, - type: this.type, - desc: this.desc, - render: this.render, - allowEmpty: this.allowEmpty, - }; - } -} diff --git a/application/platform/types/settings/entry.ts b/application/platform/types/settings/entry.ts deleted file mode 100644 index d7ac5aadf5..0000000000 --- a/application/platform/types/settings/entry.ts +++ /dev/null @@ -1,33 +0,0 @@ -import { Storage } from '../storage/storage'; -import { Record } from '../storage/storage.record'; -import { Description, IDescription } from './entry.description'; - -export interface ISettingsEntry { - value: string | number | boolean | undefined; - desc: IDescription; -} - -export class Entry { - public readonly value: Record; - public readonly desc: Description; - - constructor(desc: Description, value: Record) { - this.desc = desc; - this.value = value.locate(desc.path, desc.key); - } - - public bind(storage: Storage): Error | undefined { - const error = this.value.bind(storage); - if (error instanceof Error) { - return error; - } - return this.value.read(); - } - - public asObj(): ISettingsEntry { - return { - value: this.value.get(), - desc: this.desc.asObj(), - }; - } -} diff --git a/application/platform/types/storage/entry.ts b/application/platform/types/storage/entry.ts deleted file mode 100644 index 521c6aa47c..0000000000 --- a/application/platform/types/storage/entry.ts +++ /dev/null @@ -1,41 +0,0 @@ -import { Subject } from '../../env/subscription'; -import { utils } from '../../log'; - -import * as obj from '../../env/obj'; - -export interface Entry { - uuid: string; - content: string; -} - -export interface Hash { - hash(): string; -} - -export interface Recognizable { - uuid(): string; -} - -export abstract class EntryConvertable { - public static from(str: string): Entry | Error { - try { - const parsed: unknown = JSON.parse(str); - const entry: Entry = { uuid: '', content: '' }; - entry.uuid = obj.getAsNotEmptyString(parsed, 'uuid'); - entry.content = obj.getAsNotEmptyString(parsed, 'content'); - return entry; - } catch (e) { - return new Error(utils.error(e)); - } - } - public static asStr(entry: Entry): string { - return JSON.stringify(entry); - } - public abstract entry(): { - to(): Entry; - from(entry: Entry): Error | undefined; - hash(): string; - uuid(): string; - updated(): Subject | undefined; - }; -} diff --git a/application/platform/types/storage/index.ts b/application/platform/types/storage/index.ts deleted file mode 100644 index cb31a411f9..0000000000 --- a/application/platform/types/storage/index.ts +++ /dev/null @@ -1,5 +0,0 @@ -export * as entry from './entry'; -export * as storage from './storage'; -export * as record from './storage.record'; -export * as validators from './storage.record.validators'; -export * as json from './json'; diff --git a/application/platform/types/storage/json.ts b/application/platform/types/storage/json.ts deleted file mode 100644 index cb3cf83c42..0000000000 --- a/application/platform/types/storage/json.ts +++ /dev/null @@ -1,28 +0,0 @@ -export interface JsonField { - [key: string]: string; -} - -export type JsonSet = JsonField[]; - -export abstract class Json { - abstract json(): { - to(): string; - from(str: string): T | Error; - key(): string; - }; - public asJsonField(): JsonField { - return { [this.json().key()]: this.json().to() }; - } -} - -export interface Extractor { - from(str: string): T | Error; - key(): string; -} - -export interface JsonConvertor { - json(): { - to(): string; - from(str: string): T | Error; - }; -} diff --git a/application/platform/types/storage/storage.record.ts b/application/platform/types/storage/storage.record.ts deleted file mode 100644 index 9a7b40bd61..0000000000 --- a/application/platform/types/storage/storage.record.ts +++ /dev/null @@ -1,91 +0,0 @@ -import { Mutable } from '../unity/mutable'; -import { Storage } from './storage'; - -export abstract class Record { - public static fullpath(path: string, key: string): string { - return `${path}${path === '' ? '' : '.'}${key}`; - } - public abstract validate(value: T): Error | undefined; - - protected value: T | undefined; - protected storage!: Storage; - public readonly path!: string; - public readonly key!: string; - - constructor(value: T, path?: string, key?: string) { - path !== undefined && (this.path = path); - key !== undefined && (this.key = key); - this.value = value; - } - - public locate(path: string, key: string): Record { - (this as Mutable>).path = path; - (this as Mutable>).key = key; - return this; - } - - public bind(storage: Storage): Error | undefined { - this.storage = storage; - const value = this.storage.get(this.path, this.key) as T; - if (value === undefined) { - return; - } - const error = this.validate(value); - return error instanceof Error ? error : this.set(value); - } - - public read(): Error | undefined { - const stored = this.storage.get(this.path, this.key); - if (stored !== undefined) { - const error = this.validate(stored as T); - if (error instanceof Error) { - return error; - } - this.value = stored as T; - } else if (this.value !== undefined) { - return this.set(this.value); - } - return undefined; - } - - public fullpath(): string { - return Record.fullpath(this.path, this.key); - } - - public get(): T { - return this.value as T; - } - - public set(value: T): Error | undefined { - if (this.storage === undefined) { - return new Error(`Record isn't bound with storage`); - } - if (this.path === undefined || this.key === undefined) { - return new Error(`Record isn't located. Setup "path" and "key"`); - } - if (value === undefined) { - return this.storage.delete(this.path, this.key); - } - let error = this.validate(value); - if (error instanceof Error) { - return error; - } - this.value = value; - error = this.storage.put(this.path, this.key, value); - if (error instanceof Error) { - return error; - } - this.storage.write(); - return undefined; - } - - public delete(): Error | undefined { - const error = this.storage.delete(this.path, this.key); - if (error instanceof Error) { - return error; - } - this.value = undefined; - this.storage.write(); - return undefined; - } -} diff --git a/application/platform/types/storage/storage.record.validators.ts b/application/platform/types/storage/storage.record.validators.ts deleted file mode 100644 index 7dffc3f38d..0000000000 --- a/application/platform/types/storage/storage.record.validators.ts +++ /dev/null @@ -1,76 +0,0 @@ -import { Record } from './storage.record'; - -export class BoolOrUndefined extends Record { - public validate(value: boolean | undefined): Error | undefined { - if (value === undefined) { - return undefined; - } - if (typeof value !== 'boolean') { - return new Error(`Expecting boolean or undefined`); - } - return undefined; - } -} - -export class NotEmptyStringOrUndefined extends Record { - public validate(value: string | undefined): Error | undefined { - if (value === undefined) { - return undefined; - } - if (typeof value !== 'string' || value.trim() === '') { - return new Error(`Expecting not empty string or undefined`); - } - return undefined; - } -} - -export class NotEmptyString extends Record { - public validate(value: string): Error | undefined { - if (typeof value !== 'string' || value.trim() === '') { - return new Error(`Expecting not empty string or undefined`); - } - return undefined; - } -} - -export class AnyString extends Record { - public validate(value: string): Error | undefined { - if (typeof value !== 'string') { - return new Error(`Expecting string`); - } - return undefined; - } -} - -export class AnyStringOrUndefined extends Record { - public validate(value: string | undefined): Error | undefined { - if (value === undefined) { - return undefined; - } - if (typeof value !== 'string') { - return new Error(`Expecting string or undefined`); - } - return undefined; - } -} - -export class IntOrUndefined extends Record { - public validate(value: number | undefined): Error | undefined { - if (value === undefined) { - return undefined; - } - if (typeof value !== 'number' || !isFinite(value) || isNaN(value)) { - return new Error(`Expecting valid number or undefined`); - } - return undefined; - } -} - -export class Int extends Record { - public validate(value: number): Error | undefined { - if (typeof value !== 'number' || !isFinite(value) || isNaN(value)) { - return new Error(`Expecting valid number`); - } - return undefined; - } -} diff --git a/application/platform/types/storage/storage.ts b/application/platform/types/storage/storage.ts deleted file mode 100644 index fc2675af7b..0000000000 --- a/application/platform/types/storage/storage.ts +++ /dev/null @@ -1,78 +0,0 @@ -import { Read } from '../io/read'; -import { Write } from '../io/write'; -import { Destroyable } from '../life/destroyable'; -import { utils } from '../../log'; - -import * as obj from '../../env/obj'; - -export interface IStorage { - [key: string]: number | string | boolean | IStorage; -} - -export class Storage { - protected storage: IStorage; - protected io: Read & Write & Destroyable; - - constructor(io: Read & Write & Destroyable, initial: IStorage = {}) { - this.io = io; - this.storage = initial; - } - - public destroy(): Promise { - return this.io.destroy(); - } - - public load(): Promise { - return new Promise((resolve, reject) => { - this.io - .read() - .then((content: string) => { - if (content.trim() === '') { - return resolve(); - } - try { - const stored = JSON.parse(content); - if (!obj.is(stored)) { - return reject(new Error(`Invalid content of file/storage`)); - } - this.storage = stored; - resolve(); - } catch (e) { - return reject(utils.error(e)); - } - }) - .catch(reject); - }); - } - - public write(): void { - this.io.write(JSON.stringify(this.storage)); - } - - public get(path: string, key: string): T | undefined { - return obj.getPropByPath(this.storage, `${path}${path === '' ? '' : '.'}${key}`); - } - - public put(path: string, key: string, value: string | number | boolean): Error | undefined { - obj.createPath(this.storage, path); - const seat = obj.getPropByPath(this.storage, path); - if (!obj.is(seat)) { - return new Error(`[${path}]: Fail to find destination.`); - } - (seat as IStorage)[key] = value; - return undefined; - } - - public delete(path: string, key: string): Error | undefined { - const seat = obj.getPropByPath(this.storage, path); - if (!obj.is(seat)) { - return new Error(`[${path}]: Fail to find destination.`); - } - delete (seat as IStorage)[key]; - return undefined; - } - - public overwrite(storage: IStorage): void { - this.storage = storage; - } -} diff --git a/application/platform/types/unity/mutable.ts b/application/platform/types/unity/mutable.ts deleted file mode 100644 index 1b7435394d..0000000000 --- a/application/platform/types/unity/mutable.ts +++ /dev/null @@ -1,3 +0,0 @@ -export type Mutable = { - -readonly [Key in keyof Type]: Type[Key]; -}; diff --git a/application/platform/yarn.lock b/application/platform/yarn.lock deleted file mode 100644 index 2174eb7faf..0000000000 --- a/application/platform/yarn.lock +++ /dev/null @@ -1,2414 +0,0 @@ -# This file is generated by running "yarn install" inside your project. -# Manual changes might be lost - proceed with caution! - -__metadata: - version: 8 - cacheKey: 10c0 - -"@eslint-community/eslint-utils@npm:^4.2.0, @eslint-community/eslint-utils@npm:^4.4.0": - version: 4.4.1 - resolution: "@eslint-community/eslint-utils@npm:4.4.1" - dependencies: - eslint-visitor-keys: "npm:^3.4.3" - peerDependencies: - eslint: ^6.0.0 || ^7.0.0 || >=8.0.0 - checksum: 10c0/2aa0ac2fc50ff3f234408b10900ed4f1a0b19352f21346ad4cc3d83a1271481bdda11097baa45d484dd564c895e0762a27a8240be7a256b3ad47129e96528252 - languageName: node - linkType: hard - -"@eslint-community/regexpp@npm:^4.10.0, @eslint-community/regexpp@npm:^4.12.1": - version: 4.12.1 - resolution: "@eslint-community/regexpp@npm:4.12.1" - checksum: 10c0/a03d98c246bcb9109aec2c08e4d10c8d010256538dcb3f56610191607214523d4fb1b00aa81df830b6dffb74c5fa0be03642513a289c567949d3e550ca11cdf6 - languageName: node - linkType: hard - -"@eslint/config-array@npm:^0.19.0": - version: 0.19.1 - resolution: "@eslint/config-array@npm:0.19.1" - dependencies: - "@eslint/object-schema": "npm:^2.1.5" - debug: "npm:^4.3.1" - minimatch: "npm:^3.1.2" - checksum: 10c0/43b01f596ddad404473beae5cf95c013d29301c72778d0f5bf8a6699939c8a9a5663dbd723b53c5f476b88b0c694f76ea145d1aa9652230d140fe1161e4a4b49 - languageName: node - linkType: hard - -"@eslint/core@npm:^0.10.0": - version: 0.10.0 - resolution: "@eslint/core@npm:0.10.0" - dependencies: - "@types/json-schema": "npm:^7.0.15" - checksum: 10c0/074018075079b3ed1f14fab9d116f11a8824cdfae3e822badf7ad546962fafe717a31e61459bad8cc59cf7070dc413ea9064ddb75c114f05b05921029cde0a64 - languageName: node - linkType: hard - -"@eslint/eslintrc@npm:^3.2.0": - version: 3.2.0 - resolution: "@eslint/eslintrc@npm:3.2.0" - dependencies: - ajv: "npm:^6.12.4" - debug: "npm:^4.3.2" - espree: "npm:^10.0.1" - globals: "npm:^14.0.0" - ignore: "npm:^5.2.0" - import-fresh: "npm:^3.2.1" - js-yaml: "npm:^4.1.0" - minimatch: "npm:^3.1.2" - strip-json-comments: "npm:^3.1.1" - checksum: 10c0/43867a07ff9884d895d9855edba41acf325ef7664a8df41d957135a81a477ff4df4196f5f74dc3382627e5cc8b7ad6b815c2cea1b58f04a75aced7c43414ab8b - languageName: node - linkType: hard - -"@eslint/js@npm:9.18.0": - version: 9.18.0 - resolution: "@eslint/js@npm:9.18.0" - checksum: 10c0/3938344c5ac7feef4b73fcb30f3c3e753570cea74c24904bb5d07e9c42fcd34fcbc40f545b081356a299e11f360c9c274b348c05fb0113fc3d492e5175eee140 - languageName: node - linkType: hard - -"@eslint/object-schema@npm:^2.1.5": - version: 2.1.5 - resolution: "@eslint/object-schema@npm:2.1.5" - checksum: 10c0/5320691ed41ecd09a55aff40ce8e56596b4eb81f3d4d6fe530c50fdd6552d88102d1c1a29d970ae798ce30849752a708772de38ded07a6f25b3da32ebea081d8 - languageName: node - linkType: hard - -"@eslint/plugin-kit@npm:^0.2.5": - version: 0.2.5 - resolution: "@eslint/plugin-kit@npm:0.2.5" - dependencies: - "@eslint/core": "npm:^0.10.0" - levn: "npm:^0.4.1" - checksum: 10c0/ba9832b8409af618cf61791805fe201dd62f3c82c783adfcec0f5cd391e68b40beaecb47b9a3209e926dbcab65135f410cae405b69a559197795793399f61176 - languageName: node - linkType: hard - -"@humanfs/core@npm:^0.19.1": - version: 0.19.1 - resolution: "@humanfs/core@npm:0.19.1" - checksum: 10c0/aa4e0152171c07879b458d0e8a704b8c3a89a8c0541726c6b65b81e84fd8b7564b5d6c633feadc6598307d34564bd53294b533491424e8e313d7ab6c7bc5dc67 - languageName: node - linkType: hard - -"@humanfs/node@npm:^0.16.6": - version: 0.16.6 - resolution: "@humanfs/node@npm:0.16.6" - dependencies: - "@humanfs/core": "npm:^0.19.1" - "@humanwhocodes/retry": "npm:^0.3.0" - checksum: 10c0/8356359c9f60108ec204cbd249ecd0356667359b2524886b357617c4a7c3b6aace0fd5a369f63747b926a762a88f8a25bc066fa1778508d110195ce7686243e1 - languageName: node - linkType: hard - -"@humanwhocodes/module-importer@npm:^1.0.1": - version: 1.0.1 - resolution: "@humanwhocodes/module-importer@npm:1.0.1" - checksum: 10c0/909b69c3b86d482c26b3359db16e46a32e0fb30bd306a3c176b8313b9e7313dba0f37f519de6aa8b0a1921349e505f259d19475e123182416a506d7f87e7f529 - languageName: node - linkType: hard - -"@humanwhocodes/retry@npm:^0.3.0": - version: 0.3.1 - resolution: "@humanwhocodes/retry@npm:0.3.1" - checksum: 10c0/f0da1282dfb45e8120480b9e2e275e2ac9bbe1cf016d046fdad8e27cc1285c45bb9e711681237944445157b430093412b4446c1ab3fc4bb037861b5904101d3b - languageName: node - linkType: hard - -"@humanwhocodes/retry@npm:^0.4.1": - version: 0.4.1 - resolution: "@humanwhocodes/retry@npm:0.4.1" - checksum: 10c0/be7bb6841c4c01d0b767d9bb1ec1c9359ee61421ce8ba66c249d035c5acdfd080f32d55a5c9e859cdd7868788b8935774f65b2caf24ec0b7bd7bf333791f063b - languageName: node - linkType: hard - -"@nodelib/fs.scandir@npm:2.1.5": - version: 2.1.5 - resolution: "@nodelib/fs.scandir@npm:2.1.5" - dependencies: - "@nodelib/fs.stat": "npm:2.0.5" - run-parallel: "npm:^1.1.9" - checksum: 10c0/732c3b6d1b1e967440e65f284bd06e5821fedf10a1bea9ed2bb75956ea1f30e08c44d3def9d6a230666574edbaf136f8cfd319c14fd1f87c66e6a44449afb2eb - languageName: node - linkType: hard - -"@nodelib/fs.stat@npm:2.0.5, @nodelib/fs.stat@npm:^2.0.2": - version: 2.0.5 - resolution: "@nodelib/fs.stat@npm:2.0.5" - checksum: 10c0/88dafe5e3e29a388b07264680dc996c17f4bda48d163a9d4f5c1112979f0ce8ec72aa7116122c350b4e7976bc5566dc3ddb579be1ceaacc727872eb4ed93926d - languageName: node - linkType: hard - -"@nodelib/fs.walk@npm:^1.2.3": - version: 1.2.8 - resolution: "@nodelib/fs.walk@npm:1.2.8" - dependencies: - "@nodelib/fs.scandir": "npm:2.1.5" - fastq: "npm:^1.6.0" - checksum: 10c0/db9de047c3bb9b51f9335a7bb46f4fcfb6829fb628318c12115fbaf7d369bfce71c15b103d1fc3b464812d936220ee9bc1c8f762d032c9f6be9acc99249095b1 - languageName: node - linkType: hard - -"@rtsao/scc@npm:^1.1.0": - version: 1.1.0 - resolution: "@rtsao/scc@npm:1.1.0" - checksum: 10c0/b5bcfb0d87f7d1c1c7c0f7693f53b07866ed9fec4c34a97a8c948fb9a7c0082e416ce4d3b60beb4f5e167cbe04cdeefbf6771320f3ede059b9ce91188c409a5b - languageName: node - linkType: hard - -"@types/estree@npm:^1.0.6": - version: 1.0.6 - resolution: "@types/estree@npm:1.0.6" - checksum: 10c0/cdfd751f6f9065442cd40957c07fd80361c962869aa853c1c2fd03e101af8b9389d8ff4955a43a6fcfa223dd387a089937f95be0f3eec21ca527039fd2d9859a - languageName: node - linkType: hard - -"@types/json-schema@npm:^7.0.15": - version: 7.0.15 - resolution: "@types/json-schema@npm:7.0.15" - checksum: 10c0/a996a745e6c5d60292f36731dd41341339d4eeed8180bb09226e5c8d23759067692b1d88e5d91d72ee83dfc00d3aca8e7bd43ea120516c17922cbcb7c3e252db - languageName: node - linkType: hard - -"@types/json5@npm:^0.0.29": - version: 0.0.29 - resolution: "@types/json5@npm:0.0.29" - checksum: 10c0/6bf5337bc447b706bb5b4431d37686aa2ea6d07cfd6f79cc31de80170d6ff9b1c7384a9c0ccbc45b3f512bae9e9f75c2e12109806a15331dc94e8a8db6dbb4ac - languageName: node - linkType: hard - -"@types/node@npm:^22.10.10": - version: 22.10.10 - resolution: "@types/node@npm:22.10.10" - dependencies: - undici-types: "npm:~6.20.0" - checksum: 10c0/3425772d4513cd5dbdd87c00acda088113c03a97445f84f6a89744c60a66990b56c9d3a7213d09d57b6b944ae8ff45f985565e0c1846726112588e33a22dd12b - languageName: node - linkType: hard - -"@typescript-eslint/eslint-plugin@npm:^8.21.0": - version: 8.21.0 - resolution: "@typescript-eslint/eslint-plugin@npm:8.21.0" - dependencies: - "@eslint-community/regexpp": "npm:^4.10.0" - "@typescript-eslint/scope-manager": "npm:8.21.0" - "@typescript-eslint/type-utils": "npm:8.21.0" - "@typescript-eslint/utils": "npm:8.21.0" - "@typescript-eslint/visitor-keys": "npm:8.21.0" - graphemer: "npm:^1.4.0" - ignore: "npm:^5.3.1" - natural-compare: "npm:^1.4.0" - ts-api-utils: "npm:^2.0.0" - peerDependencies: - "@typescript-eslint/parser": ^8.0.0 || ^8.0.0-alpha.0 - eslint: ^8.57.0 || ^9.0.0 - typescript: ">=4.8.4 <5.8.0" - checksum: 10c0/4601d21ec35b9fa5cfc1ad0330733ab40d6c6822c7fc15c3584a16f678c9a72e077a1725a950823fe0f499a15f3981795b1ea5d1e7a1be5c7b8296ea9ae6327c - languageName: node - linkType: hard - -"@typescript-eslint/parser@npm:^8.21.0": - version: 8.21.0 - resolution: "@typescript-eslint/parser@npm:8.21.0" - dependencies: - "@typescript-eslint/scope-manager": "npm:8.21.0" - "@typescript-eslint/types": "npm:8.21.0" - "@typescript-eslint/typescript-estree": "npm:8.21.0" - "@typescript-eslint/visitor-keys": "npm:8.21.0" - debug: "npm:^4.3.4" - peerDependencies: - eslint: ^8.57.0 || ^9.0.0 - typescript: ">=4.8.4 <5.8.0" - checksum: 10c0/aadebd50ca7aa2d61ad85d890c0d7010f2c293ec4d50a7833ef9674f232f0bc7118faa93a898771fbea50f02d542d687cf3569421b23f72fe6fed6895d5506fc - languageName: node - linkType: hard - -"@typescript-eslint/scope-manager@npm:8.21.0": - version: 8.21.0 - resolution: "@typescript-eslint/scope-manager@npm:8.21.0" - dependencies: - "@typescript-eslint/types": "npm:8.21.0" - "@typescript-eslint/visitor-keys": "npm:8.21.0" - checksum: 10c0/ea405e79dc884ea1c76465604db52f9b0941d6cbb0bde6bce1af689ef212f782e214de69d46503c7c47bfc180d763369b7433f1965e3be3c442b417e8c9f8f75 - languageName: node - linkType: hard - -"@typescript-eslint/type-utils@npm:8.21.0": - version: 8.21.0 - resolution: "@typescript-eslint/type-utils@npm:8.21.0" - dependencies: - "@typescript-eslint/typescript-estree": "npm:8.21.0" - "@typescript-eslint/utils": "npm:8.21.0" - debug: "npm:^4.3.4" - ts-api-utils: "npm:^2.0.0" - peerDependencies: - eslint: ^8.57.0 || ^9.0.0 - typescript: ">=4.8.4 <5.8.0" - checksum: 10c0/617f5dfe83fd9a7c722b27fa4e7f0c84f29baa94f75a4e8e5ccfd5b0a373437f65724e21b9642870fb0960f204b1a7f516a038200a12f8118f21b1bf86315bf3 - languageName: node - linkType: hard - -"@typescript-eslint/types@npm:8.21.0": - version: 8.21.0 - resolution: "@typescript-eslint/types@npm:8.21.0" - checksum: 10c0/67dfd300cc614d7b02e94d0dacfb228a7f4c3fd4eede29c43adb9e9fcc16365ae3df8d6165018da3c123dce65545bef03e3e8183f35e9b3a911ffc727e3274c2 - languageName: node - linkType: hard - -"@typescript-eslint/typescript-estree@npm:8.21.0": - version: 8.21.0 - resolution: "@typescript-eslint/typescript-estree@npm:8.21.0" - dependencies: - "@typescript-eslint/types": "npm:8.21.0" - "@typescript-eslint/visitor-keys": "npm:8.21.0" - debug: "npm:^4.3.4" - fast-glob: "npm:^3.3.2" - is-glob: "npm:^4.0.3" - minimatch: "npm:^9.0.4" - semver: "npm:^7.6.0" - ts-api-utils: "npm:^2.0.0" - peerDependencies: - typescript: ">=4.8.4 <5.8.0" - checksum: 10c0/0cf5b0382524f4af54fb5ec71ca7e939ec922711f2d77b383740b28dd4b21407b0ab5dded62df6819d01c12c0b354e95667e3c7025a5d27d05b805161ab94855 - languageName: node - linkType: hard - -"@typescript-eslint/utils@npm:8.21.0": - version: 8.21.0 - resolution: "@typescript-eslint/utils@npm:8.21.0" - dependencies: - "@eslint-community/eslint-utils": "npm:^4.4.0" - "@typescript-eslint/scope-manager": "npm:8.21.0" - "@typescript-eslint/types": "npm:8.21.0" - "@typescript-eslint/typescript-estree": "npm:8.21.0" - peerDependencies: - eslint: ^8.57.0 || ^9.0.0 - typescript: ">=4.8.4 <5.8.0" - checksum: 10c0/d8347dbe9176417220aa62902cfc1b2007a9246bb7a8cccdf8590120903eb50ca14cb668efaab4646d086277f2367559985b62230e43ebd8b0723d237eeaa2f2 - languageName: node - linkType: hard - -"@typescript-eslint/visitor-keys@npm:8.21.0": - version: 8.21.0 - resolution: "@typescript-eslint/visitor-keys@npm:8.21.0" - dependencies: - "@typescript-eslint/types": "npm:8.21.0" - eslint-visitor-keys: "npm:^4.2.0" - checksum: 10c0/b3f1412f550e35c0d7ae0410db616951116b365167539f9b85710d8bc2b36b322c5e637caee84cc1ae5df8f1d961880250d52ffdef352b31e5bdbef74ba6fea9 - languageName: node - linkType: hard - -"acorn-jsx@npm:^5.3.2": - version: 5.3.2 - resolution: "acorn-jsx@npm:5.3.2" - peerDependencies: - acorn: ^6.0.0 || ^7.0.0 || ^8.0.0 - checksum: 10c0/4c54868fbef3b8d58927d5e33f0a4de35f59012fe7b12cf9dfbb345fb8f46607709e1c4431be869a23fb63c151033d84c4198fa9f79385cec34fcb1dd53974c1 - languageName: node - linkType: hard - -"acorn@npm:^8.14.0": - version: 8.14.0 - resolution: "acorn@npm:8.14.0" - bin: - acorn: bin/acorn - checksum: 10c0/6d4ee461a7734b2f48836ee0fbb752903606e576cc100eb49340295129ca0b452f3ba91ddd4424a1d4406a98adfb2ebb6bd0ff4c49d7a0930c10e462719bbfd7 - languageName: node - linkType: hard - -"ajv@npm:^6.12.4": - version: 6.12.6 - resolution: "ajv@npm:6.12.6" - dependencies: - fast-deep-equal: "npm:^3.1.1" - fast-json-stable-stringify: "npm:^2.0.0" - json-schema-traverse: "npm:^0.4.1" - uri-js: "npm:^4.2.2" - checksum: 10c0/41e23642cbe545889245b9d2a45854ebba51cda6c778ebced9649420d9205f2efb39cb43dbc41e358409223b1ea43303ae4839db682c848b891e4811da1a5a71 - languageName: node - linkType: hard - -"ansi-styles@npm:^4.1.0": - version: 4.3.0 - resolution: "ansi-styles@npm:4.3.0" - dependencies: - color-convert: "npm:^2.0.1" - checksum: 10c0/895a23929da416f2bd3de7e9cb4eabd340949328ab85ddd6e484a637d8f6820d485f53933446f5291c3b760cbc488beb8e88573dd0f9c7daf83dccc8fe81b041 - languageName: node - linkType: hard - -"argparse@npm:^2.0.1": - version: 2.0.1 - resolution: "argparse@npm:2.0.1" - checksum: 10c0/c5640c2d89045371c7cedd6a70212a04e360fd34d6edeae32f6952c63949e3525ea77dbec0289d8213a99bbaeab5abfa860b5c12cf88a2e6cf8106e90dd27a7e - languageName: node - linkType: hard - -"array-buffer-byte-length@npm:^1.0.1, array-buffer-byte-length@npm:^1.0.2": - version: 1.0.2 - resolution: "array-buffer-byte-length@npm:1.0.2" - dependencies: - call-bound: "npm:^1.0.3" - is-array-buffer: "npm:^3.0.5" - checksum: 10c0/74e1d2d996941c7a1badda9cabb7caab8c449db9086407cad8a1b71d2604cc8abf105db8ca4e02c04579ec58b7be40279ddb09aea4784832984485499f48432d - languageName: node - linkType: hard - -"array-includes@npm:^3.1.8": - version: 3.1.8 - resolution: "array-includes@npm:3.1.8" - dependencies: - call-bind: "npm:^1.0.7" - define-properties: "npm:^1.2.1" - es-abstract: "npm:^1.23.2" - es-object-atoms: "npm:^1.0.0" - get-intrinsic: "npm:^1.2.4" - is-string: "npm:^1.0.7" - checksum: 10c0/5b1004d203e85873b96ddc493f090c9672fd6c80d7a60b798da8a14bff8a670ff95db5aafc9abc14a211943f05220dacf8ea17638ae0af1a6a47b8c0b48ce370 - languageName: node - linkType: hard - -"array.prototype.findlastindex@npm:^1.2.5": - version: 1.2.5 - resolution: "array.prototype.findlastindex@npm:1.2.5" - dependencies: - call-bind: "npm:^1.0.7" - define-properties: "npm:^1.2.1" - es-abstract: "npm:^1.23.2" - es-errors: "npm:^1.3.0" - es-object-atoms: "npm:^1.0.0" - es-shim-unscopables: "npm:^1.0.2" - checksum: 10c0/962189487728b034f3134802b421b5f39e42ee2356d13b42d2ddb0e52057ffdcc170b9524867f4f0611a6f638f4c19b31e14606e8bcbda67799e26685b195aa3 - languageName: node - linkType: hard - -"array.prototype.flat@npm:^1.3.2": - version: 1.3.3 - resolution: "array.prototype.flat@npm:1.3.3" - dependencies: - call-bind: "npm:^1.0.8" - define-properties: "npm:^1.2.1" - es-abstract: "npm:^1.23.5" - es-shim-unscopables: "npm:^1.0.2" - checksum: 10c0/d90e04dfbc43bb96b3d2248576753d1fb2298d2d972e29ca7ad5ec621f0d9e16ff8074dae647eac4f31f4fb7d3f561a7ac005fb01a71f51705a13b5af06a7d8a - languageName: node - linkType: hard - -"array.prototype.flatmap@npm:^1.3.2": - version: 1.3.3 - resolution: "array.prototype.flatmap@npm:1.3.3" - dependencies: - call-bind: "npm:^1.0.8" - define-properties: "npm:^1.2.1" - es-abstract: "npm:^1.23.5" - es-shim-unscopables: "npm:^1.0.2" - checksum: 10c0/ba899ea22b9dc9bf276e773e98ac84638ed5e0236de06f13d63a90b18ca9e0ec7c97d622d899796e3773930b946cd2413d098656c0c5d8cc58c6f25c21e6bd54 - languageName: node - linkType: hard - -"arraybuffer.prototype.slice@npm:^1.0.4": - version: 1.0.4 - resolution: "arraybuffer.prototype.slice@npm:1.0.4" - dependencies: - array-buffer-byte-length: "npm:^1.0.1" - call-bind: "npm:^1.0.8" - define-properties: "npm:^1.2.1" - es-abstract: "npm:^1.23.5" - es-errors: "npm:^1.3.0" - get-intrinsic: "npm:^1.2.6" - is-array-buffer: "npm:^3.0.4" - checksum: 10c0/2f2459caa06ae0f7f615003f9104b01f6435cc803e11bd2a655107d52a1781dc040532dc44d93026b694cc18793993246237423e13a5337e86b43ed604932c06 - languageName: node - linkType: hard - -"async-function@npm:^1.0.0": - version: 1.0.0 - resolution: "async-function@npm:1.0.0" - checksum: 10c0/669a32c2cb7e45091330c680e92eaeb791bc1d4132d827591e499cd1f776ff5a873e77e5f92d0ce795a8d60f10761dec9ddfe7225a5de680f5d357f67b1aac73 - languageName: node - linkType: hard - -"available-typed-arrays@npm:^1.0.7": - version: 1.0.7 - resolution: "available-typed-arrays@npm:1.0.7" - dependencies: - possible-typed-array-names: "npm:^1.0.0" - checksum: 10c0/d07226ef4f87daa01bd0fe80f8f310982e345f372926da2e5296aecc25c41cab440916bbaa4c5e1034b453af3392f67df5961124e4b586df1e99793a1374bdb2 - languageName: node - linkType: hard - -"balanced-match@npm:^1.0.0": - version: 1.0.2 - resolution: "balanced-match@npm:1.0.2" - checksum: 10c0/9308baf0a7e4838a82bbfd11e01b1cb0f0cf2893bc1676c27c2a8c0e70cbae1c59120c3268517a8ae7fb6376b4639ef81ca22582611dbee4ed28df945134aaee - languageName: node - linkType: hard - -"brace-expansion@npm:^1.1.7": - version: 1.1.11 - resolution: "brace-expansion@npm:1.1.11" - dependencies: - balanced-match: "npm:^1.0.0" - concat-map: "npm:0.0.1" - checksum: 10c0/695a56cd058096a7cb71fb09d9d6a7070113c7be516699ed361317aca2ec169f618e28b8af352e02ab4233fb54eb0168460a40dc320bab0034b36ab59aaad668 - languageName: node - linkType: hard - -"brace-expansion@npm:^2.0.1": - version: 2.0.1 - resolution: "brace-expansion@npm:2.0.1" - dependencies: - balanced-match: "npm:^1.0.0" - checksum: 10c0/b358f2fe060e2d7a87aa015979ecea07f3c37d4018f8d6deb5bd4c229ad3a0384fe6029bb76cd8be63c81e516ee52d1a0673edbe2023d53a5191732ae3c3e49f - languageName: node - linkType: hard - -"braces@npm:^3.0.3": - version: 3.0.3 - resolution: "braces@npm:3.0.3" - dependencies: - fill-range: "npm:^7.1.1" - checksum: 10c0/7c6dfd30c338d2997ba77500539227b9d1f85e388a5f43220865201e407e076783d0881f2d297b9f80951b4c957fcf0b51c1d2d24227631643c3f7c284b0aa04 - languageName: node - linkType: hard - -"call-bind-apply-helpers@npm:^1.0.0, call-bind-apply-helpers@npm:^1.0.1": - version: 1.0.1 - resolution: "call-bind-apply-helpers@npm:1.0.1" - dependencies: - es-errors: "npm:^1.3.0" - function-bind: "npm:^1.1.2" - checksum: 10c0/acb2ab68bf2718e68a3e895f0d0b73ccc9e45b9b6f210f163512ba76f91dab409eb8792f6dae188356f9095747512a3101646b3dea9d37fb8c7c6bf37796d18c - languageName: node - linkType: hard - -"call-bind@npm:^1.0.7, call-bind@npm:^1.0.8": - version: 1.0.8 - resolution: "call-bind@npm:1.0.8" - dependencies: - call-bind-apply-helpers: "npm:^1.0.0" - es-define-property: "npm:^1.0.0" - get-intrinsic: "npm:^1.2.4" - set-function-length: "npm:^1.2.2" - checksum: 10c0/a13819be0681d915144467741b69875ae5f4eba8961eb0bf322aab63ec87f8250eb6d6b0dcbb2e1349876412a56129ca338592b3829ef4343527f5f18a0752d4 - languageName: node - linkType: hard - -"call-bound@npm:^1.0.2, call-bound@npm:^1.0.3": - version: 1.0.3 - resolution: "call-bound@npm:1.0.3" - dependencies: - call-bind-apply-helpers: "npm:^1.0.1" - get-intrinsic: "npm:^1.2.6" - checksum: 10c0/45257b8e7621067304b30dbd638e856cac913d31e8e00a80d6cf172911acd057846572d0b256b45e652d515db6601e2974a1b1a040e91b4fc36fb3dd86fa69cf - languageName: node - linkType: hard - -"callsites@npm:^3.0.0": - version: 3.1.0 - resolution: "callsites@npm:3.1.0" - checksum: 10c0/fff92277400eb06c3079f9e74f3af120db9f8ea03bad0e84d9aede54bbe2d44a56cccb5f6cf12211f93f52306df87077ecec5b712794c5a9b5dac6d615a3f301 - languageName: node - linkType: hard - -"chalk@npm:^4.0.0": - version: 4.1.2 - resolution: "chalk@npm:4.1.2" - dependencies: - ansi-styles: "npm:^4.1.0" - supports-color: "npm:^7.1.0" - checksum: 10c0/4a3fef5cc34975c898ffe77141450f679721df9dde00f6c304353fa9c8b571929123b26a0e4617bde5018977eb655b31970c297b91b63ee83bb82aeb04666880 - languageName: node - linkType: hard - -"color-convert@npm:^2.0.1": - version: 2.0.1 - resolution: "color-convert@npm:2.0.1" - dependencies: - color-name: "npm:~1.1.4" - checksum: 10c0/37e1150172f2e311fe1b2df62c6293a342ee7380da7b9cfdba67ea539909afbd74da27033208d01d6d5cfc65ee7868a22e18d7e7648e004425441c0f8a15a7d7 - languageName: node - linkType: hard - -"color-name@npm:~1.1.4": - version: 1.1.4 - resolution: "color-name@npm:1.1.4" - checksum: 10c0/a1a3f914156960902f46f7f56bc62effc6c94e84b2cae157a526b1c1f74b677a47ec602bf68a61abfa2b42d15b7c5651c6dbe72a43af720bc588dff885b10f95 - languageName: node - linkType: hard - -"concat-map@npm:0.0.1": - version: 0.0.1 - resolution: "concat-map@npm:0.0.1" - checksum: 10c0/c996b1cfdf95b6c90fee4dae37e332c8b6eb7d106430c17d538034c0ad9a1630cb194d2ab37293b1bdd4d779494beee7786d586a50bd9376fd6f7bcc2bd4c98f - languageName: node - linkType: hard - -"cross-spawn@npm:^7.0.6": - version: 7.0.6 - resolution: "cross-spawn@npm:7.0.6" - dependencies: - path-key: "npm:^3.1.0" - shebang-command: "npm:^2.0.0" - which: "npm:^2.0.1" - checksum: 10c0/053ea8b2135caff68a9e81470e845613e374e7309a47731e81639de3eaeb90c3d01af0e0b44d2ab9d50b43467223b88567dfeb3262db942dc063b9976718ffc1 - languageName: node - linkType: hard - -"data-view-buffer@npm:^1.0.2": - version: 1.0.2 - resolution: "data-view-buffer@npm:1.0.2" - dependencies: - call-bound: "npm:^1.0.3" - es-errors: "npm:^1.3.0" - is-data-view: "npm:^1.0.2" - checksum: 10c0/7986d40fc7979e9e6241f85db8d17060dd9a71bd53c894fa29d126061715e322a4cd47a00b0b8c710394854183d4120462b980b8554012acc1c0fa49df7ad38c - languageName: node - linkType: hard - -"data-view-byte-length@npm:^1.0.2": - version: 1.0.2 - resolution: "data-view-byte-length@npm:1.0.2" - dependencies: - call-bound: "npm:^1.0.3" - es-errors: "npm:^1.3.0" - is-data-view: "npm:^1.0.2" - checksum: 10c0/f8a4534b5c69384d95ac18137d381f18a5cfae1f0fc1df0ef6feef51ef0d568606d970b69e02ea186c6c0f0eac77fe4e6ad96fec2569cc86c3afcc7475068c55 - languageName: node - linkType: hard - -"data-view-byte-offset@npm:^1.0.1": - version: 1.0.1 - resolution: "data-view-byte-offset@npm:1.0.1" - dependencies: - call-bound: "npm:^1.0.2" - es-errors: "npm:^1.3.0" - is-data-view: "npm:^1.0.1" - checksum: 10c0/fa7aa40078025b7810dcffc16df02c480573b7b53ef1205aa6a61533011005c1890e5ba17018c692ce7c900212b547262d33279fde801ad9843edc0863bf78c4 - languageName: node - linkType: hard - -"debug@npm:^3.2.7": - version: 3.2.7 - resolution: "debug@npm:3.2.7" - dependencies: - ms: "npm:^2.1.1" - checksum: 10c0/37d96ae42cbc71c14844d2ae3ba55adf462ec89fd3a999459dec3833944cd999af6007ff29c780f1c61153bcaaf2c842d1e4ce1ec621e4fc4923244942e4a02a - languageName: node - linkType: hard - -"debug@npm:^4.3.1, debug@npm:^4.3.2, debug@npm:^4.3.4": - version: 4.4.0 - resolution: "debug@npm:4.4.0" - dependencies: - ms: "npm:^2.1.3" - peerDependenciesMeta: - supports-color: - optional: true - checksum: 10c0/db94f1a182bf886f57b4755f85b3a74c39b5114b9377b7ab375dc2cfa3454f09490cc6c30f829df3fc8042bc8b8995f6567ce5cd96f3bc3688bd24027197d9de - languageName: node - linkType: hard - -"deep-is@npm:^0.1.3": - version: 0.1.4 - resolution: "deep-is@npm:0.1.4" - checksum: 10c0/7f0ee496e0dff14a573dc6127f14c95061b448b87b995fc96c017ce0a1e66af1675e73f1d6064407975bc4ea6ab679497a29fff7b5b9c4e99cb10797c1ad0b4c - languageName: node - linkType: hard - -"define-data-property@npm:^1.0.1, define-data-property@npm:^1.1.4": - version: 1.1.4 - resolution: "define-data-property@npm:1.1.4" - dependencies: - es-define-property: "npm:^1.0.0" - es-errors: "npm:^1.3.0" - gopd: "npm:^1.0.1" - checksum: 10c0/dea0606d1483eb9db8d930d4eac62ca0fa16738b0b3e07046cddfacf7d8c868bbe13fa0cb263eb91c7d0d527960dc3f2f2471a69ed7816210307f6744fe62e37 - languageName: node - linkType: hard - -"define-properties@npm:^1.2.1": - version: 1.2.1 - resolution: "define-properties@npm:1.2.1" - dependencies: - define-data-property: "npm:^1.0.1" - has-property-descriptors: "npm:^1.0.0" - object-keys: "npm:^1.1.1" - checksum: 10c0/88a152319ffe1396ccc6ded510a3896e77efac7a1bfbaa174a7b00414a1747377e0bb525d303794a47cf30e805c2ec84e575758512c6e44a993076d29fd4e6c3 - languageName: node - linkType: hard - -"doctrine@npm:^2.1.0": - version: 2.1.0 - resolution: "doctrine@npm:2.1.0" - dependencies: - esutils: "npm:^2.0.2" - checksum: 10c0/b6416aaff1f380bf56c3b552f31fdf7a69b45689368deca72d28636f41c16bb28ec3ebc40ace97db4c1afc0ceeb8120e8492fe0046841c94c2933b2e30a7d5ac - languageName: node - linkType: hard - -"dunder-proto@npm:^1.0.0, dunder-proto@npm:^1.0.1": - version: 1.0.1 - resolution: "dunder-proto@npm:1.0.1" - dependencies: - call-bind-apply-helpers: "npm:^1.0.1" - es-errors: "npm:^1.3.0" - gopd: "npm:^1.2.0" - checksum: 10c0/199f2a0c1c16593ca0a145dbf76a962f8033ce3129f01284d48c45ed4e14fea9bbacd7b3610b6cdc33486cef20385ac054948fefc6272fcce645c09468f93031 - languageName: node - linkType: hard - -"es-abstract@npm:^1.23.2, es-abstract@npm:^1.23.5, es-abstract@npm:^1.23.9": - version: 1.23.9 - resolution: "es-abstract@npm:1.23.9" - dependencies: - array-buffer-byte-length: "npm:^1.0.2" - arraybuffer.prototype.slice: "npm:^1.0.4" - available-typed-arrays: "npm:^1.0.7" - call-bind: "npm:^1.0.8" - call-bound: "npm:^1.0.3" - data-view-buffer: "npm:^1.0.2" - data-view-byte-length: "npm:^1.0.2" - data-view-byte-offset: "npm:^1.0.1" - es-define-property: "npm:^1.0.1" - es-errors: "npm:^1.3.0" - es-object-atoms: "npm:^1.0.0" - es-set-tostringtag: "npm:^2.1.0" - es-to-primitive: "npm:^1.3.0" - function.prototype.name: "npm:^1.1.8" - get-intrinsic: "npm:^1.2.7" - get-proto: "npm:^1.0.0" - get-symbol-description: "npm:^1.1.0" - globalthis: "npm:^1.0.4" - gopd: "npm:^1.2.0" - has-property-descriptors: "npm:^1.0.2" - has-proto: "npm:^1.2.0" - has-symbols: "npm:^1.1.0" - hasown: "npm:^2.0.2" - internal-slot: "npm:^1.1.0" - is-array-buffer: "npm:^3.0.5" - is-callable: "npm:^1.2.7" - is-data-view: "npm:^1.0.2" - is-regex: "npm:^1.2.1" - is-shared-array-buffer: "npm:^1.0.4" - is-string: "npm:^1.1.1" - is-typed-array: "npm:^1.1.15" - is-weakref: "npm:^1.1.0" - math-intrinsics: "npm:^1.1.0" - object-inspect: "npm:^1.13.3" - object-keys: "npm:^1.1.1" - object.assign: "npm:^4.1.7" - own-keys: "npm:^1.0.1" - regexp.prototype.flags: "npm:^1.5.3" - safe-array-concat: "npm:^1.1.3" - safe-push-apply: "npm:^1.0.0" - safe-regex-test: "npm:^1.1.0" - set-proto: "npm:^1.0.0" - string.prototype.trim: "npm:^1.2.10" - string.prototype.trimend: "npm:^1.0.9" - string.prototype.trimstart: "npm:^1.0.8" - typed-array-buffer: "npm:^1.0.3" - typed-array-byte-length: "npm:^1.0.3" - typed-array-byte-offset: "npm:^1.0.4" - typed-array-length: "npm:^1.0.7" - unbox-primitive: "npm:^1.1.0" - which-typed-array: "npm:^1.1.18" - checksum: 10c0/1de229c9e08fe13c17fe5abaec8221545dfcd57e51f64909599a6ae896df84b8fd2f7d16c60cb00d7bf495b9298ca3581aded19939d4b7276854a4b066f8422b - languageName: node - linkType: hard - -"es-define-property@npm:^1.0.0, es-define-property@npm:^1.0.1": - version: 1.0.1 - resolution: "es-define-property@npm:1.0.1" - checksum: 10c0/3f54eb49c16c18707949ff25a1456728c883e81259f045003499efba399c08bad00deebf65cccde8c0e07908c1a225c9d472b7107e558f2a48e28d530e34527c - languageName: node - linkType: hard - -"es-errors@npm:^1.3.0": - version: 1.3.0 - resolution: "es-errors@npm:1.3.0" - checksum: 10c0/0a61325670072f98d8ae3b914edab3559b6caa980f08054a3b872052640d91da01d38df55df797fcc916389d77fc92b8d5906cf028f4db46d7e3003abecbca85 - languageName: node - linkType: hard - -"es-object-atoms@npm:^1.0.0": - version: 1.1.1 - resolution: "es-object-atoms@npm:1.1.1" - dependencies: - es-errors: "npm:^1.3.0" - checksum: 10c0/65364812ca4daf48eb76e2a3b7a89b3f6a2e62a1c420766ce9f692665a29d94fe41fe88b65f24106f449859549711e4b40d9fb8002d862dfd7eb1c512d10be0c - languageName: node - linkType: hard - -"es-set-tostringtag@npm:^2.1.0": - version: 2.1.0 - resolution: "es-set-tostringtag@npm:2.1.0" - dependencies: - es-errors: "npm:^1.3.0" - get-intrinsic: "npm:^1.2.6" - has-tostringtag: "npm:^1.0.2" - hasown: "npm:^2.0.2" - checksum: 10c0/ef2ca9ce49afe3931cb32e35da4dcb6d86ab02592cfc2ce3e49ced199d9d0bb5085fc7e73e06312213765f5efa47cc1df553a6a5154584b21448e9fb8355b1af - languageName: node - linkType: hard - -"es-shim-unscopables@npm:^1.0.2": - version: 1.0.2 - resolution: "es-shim-unscopables@npm:1.0.2" - dependencies: - hasown: "npm:^2.0.0" - checksum: 10c0/f495af7b4b7601a4c0cfb893581c352636e5c08654d129590386a33a0432cf13a7bdc7b6493801cadd990d838e2839b9013d1de3b880440cb537825e834fe783 - languageName: node - linkType: hard - -"es-to-primitive@npm:^1.3.0": - version: 1.3.0 - resolution: "es-to-primitive@npm:1.3.0" - dependencies: - is-callable: "npm:^1.2.7" - is-date-object: "npm:^1.0.5" - is-symbol: "npm:^1.0.4" - checksum: 10c0/c7e87467abb0b438639baa8139f701a06537d2b9bc758f23e8622c3b42fd0fdb5bde0f535686119e446dd9d5e4c0f238af4e14960f4771877cf818d023f6730b - languageName: node - linkType: hard - -"escape-string-regexp@npm:^4.0.0": - version: 4.0.0 - resolution: "escape-string-regexp@npm:4.0.0" - checksum: 10c0/9497d4dd307d845bd7f75180d8188bb17ea8c151c1edbf6b6717c100e104d629dc2dfb687686181b0f4b7d732c7dfdc4d5e7a8ff72de1b0ca283a75bbb3a9cd9 - languageName: node - linkType: hard - -"eslint-import-resolver-node@npm:^0.3.9": - version: 0.3.9 - resolution: "eslint-import-resolver-node@npm:0.3.9" - dependencies: - debug: "npm:^3.2.7" - is-core-module: "npm:^2.13.0" - resolve: "npm:^1.22.4" - checksum: 10c0/0ea8a24a72328a51fd95aa8f660dcca74c1429806737cf10261ab90cfcaaf62fd1eff664b76a44270868e0a932711a81b250053942595bcd00a93b1c1575dd61 - languageName: node - linkType: hard - -"eslint-module-utils@npm:^2.12.0": - version: 2.12.0 - resolution: "eslint-module-utils@npm:2.12.0" - dependencies: - debug: "npm:^3.2.7" - peerDependenciesMeta: - eslint: - optional: true - checksum: 10c0/4d8b46dcd525d71276f9be9ffac1d2be61c9d54cc53c992e6333cf957840dee09381842b1acbbb15fc6b255ebab99cd481c5007ab438e5455a14abe1a0468558 - languageName: node - linkType: hard - -"eslint-plugin-es@npm:^3.0.0": - version: 3.0.1 - resolution: "eslint-plugin-es@npm:3.0.1" - dependencies: - eslint-utils: "npm:^2.0.0" - regexpp: "npm:^3.0.0" - peerDependencies: - eslint: ">=4.19.1" - checksum: 10c0/12ae730aa9603e680af048e1653aac15e529411b68b8d0da6e290700b17c695485af7c3f5360f531f80970786cab7288c2c1d4a58c35ec1bb89649897c016c4a - languageName: node - linkType: hard - -"eslint-plugin-import@npm:^2.31.0": - version: 2.31.0 - resolution: "eslint-plugin-import@npm:2.31.0" - dependencies: - "@rtsao/scc": "npm:^1.1.0" - array-includes: "npm:^3.1.8" - array.prototype.findlastindex: "npm:^1.2.5" - array.prototype.flat: "npm:^1.3.2" - array.prototype.flatmap: "npm:^1.3.2" - debug: "npm:^3.2.7" - doctrine: "npm:^2.1.0" - eslint-import-resolver-node: "npm:^0.3.9" - eslint-module-utils: "npm:^2.12.0" - hasown: "npm:^2.0.2" - is-core-module: "npm:^2.15.1" - is-glob: "npm:^4.0.3" - minimatch: "npm:^3.1.2" - object.fromentries: "npm:^2.0.8" - object.groupby: "npm:^1.0.3" - object.values: "npm:^1.2.0" - semver: "npm:^6.3.1" - string.prototype.trimend: "npm:^1.0.8" - tsconfig-paths: "npm:^3.15.0" - peerDependencies: - eslint: ^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0 || ^8 || ^9 - checksum: 10c0/e21d116ddd1900e091ad120b3eb68c5dd5437fe2c930f1211781cd38b246f090a6b74d5f3800b8255a0ed29782591521ad44eb21c5534960a8f1fb4040fd913a - languageName: node - linkType: hard - -"eslint-plugin-node@npm:^11.1.0": - version: 11.1.0 - resolution: "eslint-plugin-node@npm:11.1.0" - dependencies: - eslint-plugin-es: "npm:^3.0.0" - eslint-utils: "npm:^2.0.0" - ignore: "npm:^5.1.1" - minimatch: "npm:^3.0.4" - resolve: "npm:^1.10.1" - semver: "npm:^6.1.0" - peerDependencies: - eslint: ">=5.16.0" - checksum: 10c0/c7716adac4020cb852fd2410dcd8bdb13a227004de77f96d7f9806d0cf2274f24e0920a7ca73bcd72d90003696c1f17fdd9fe3ca218e64ee03dc2b840e4416fa - languageName: node - linkType: hard - -"eslint-plugin-promise@npm:^7.2.1": - version: 7.2.1 - resolution: "eslint-plugin-promise@npm:7.2.1" - dependencies: - "@eslint-community/eslint-utils": "npm:^4.4.0" - peerDependencies: - eslint: ^7.0.0 || ^8.0.0 || ^9.0.0 - checksum: 10c0/d494982faeeafbd2aa5fae9cbceca546169a8399000f72d5d940fa5c4ba554612903bcafbb8033647179e5d21ccf1d621b433d089695f7f47ce3d9fcf4cd0abf - languageName: node - linkType: hard - -"eslint-scope@npm:^8.2.0": - version: 8.2.0 - resolution: "eslint-scope@npm:8.2.0" - dependencies: - esrecurse: "npm:^4.3.0" - estraverse: "npm:^5.2.0" - checksum: 10c0/8d2d58e2136d548ac7e0099b1a90d9fab56f990d86eb518de1247a7066d38c908be2f3df477a79cf60d70b30ba18735d6c6e70e9914dca2ee515a729975d70d6 - languageName: node - linkType: hard - -"eslint-utils@npm:^2.0.0": - version: 2.1.0 - resolution: "eslint-utils@npm:2.1.0" - dependencies: - eslint-visitor-keys: "npm:^1.1.0" - checksum: 10c0/69521c5d6569384b24093125d037ba238d3d6e54367f7143af9928f5286369e912c26cad5016d730c0ffb9797ac9e83831059d7f1d863f7dc84330eb02414611 - languageName: node - linkType: hard - -"eslint-visitor-keys@npm:^1.1.0": - version: 1.3.0 - resolution: "eslint-visitor-keys@npm:1.3.0" - checksum: 10c0/10c91fdbbe36810dd4308e57f9a8bc7177188b2a70247e54e3af1fa05ebc66414ae6fd4ce3c6c6821591f43a556e9037bc6b071122e099b5f8b7d2f76df553e3 - languageName: node - linkType: hard - -"eslint-visitor-keys@npm:^3.4.3": - version: 3.4.3 - resolution: "eslint-visitor-keys@npm:3.4.3" - checksum: 10c0/92708e882c0a5ffd88c23c0b404ac1628cf20104a108c745f240a13c332a11aac54f49a22d5762efbffc18ecbc9a580d1b7ad034bf5f3cc3307e5cbff2ec9820 - languageName: node - linkType: hard - -"eslint-visitor-keys@npm:^4.2.0": - version: 4.2.0 - resolution: "eslint-visitor-keys@npm:4.2.0" - checksum: 10c0/2ed81c663b147ca6f578312919483eb040295bbab759e5a371953456c636c5b49a559883e2677112453728d66293c0a4c90ab11cab3428cf02a0236d2e738269 - languageName: node - linkType: hard - -"eslint@npm:^9.18.0": - version: 9.18.0 - resolution: "eslint@npm:9.18.0" - dependencies: - "@eslint-community/eslint-utils": "npm:^4.2.0" - "@eslint-community/regexpp": "npm:^4.12.1" - "@eslint/config-array": "npm:^0.19.0" - "@eslint/core": "npm:^0.10.0" - "@eslint/eslintrc": "npm:^3.2.0" - "@eslint/js": "npm:9.18.0" - "@eslint/plugin-kit": "npm:^0.2.5" - "@humanfs/node": "npm:^0.16.6" - "@humanwhocodes/module-importer": "npm:^1.0.1" - "@humanwhocodes/retry": "npm:^0.4.1" - "@types/estree": "npm:^1.0.6" - "@types/json-schema": "npm:^7.0.15" - ajv: "npm:^6.12.4" - chalk: "npm:^4.0.0" - cross-spawn: "npm:^7.0.6" - debug: "npm:^4.3.2" - escape-string-regexp: "npm:^4.0.0" - eslint-scope: "npm:^8.2.0" - eslint-visitor-keys: "npm:^4.2.0" - espree: "npm:^10.3.0" - esquery: "npm:^1.5.0" - esutils: "npm:^2.0.2" - fast-deep-equal: "npm:^3.1.3" - file-entry-cache: "npm:^8.0.0" - find-up: "npm:^5.0.0" - glob-parent: "npm:^6.0.2" - ignore: "npm:^5.2.0" - imurmurhash: "npm:^0.1.4" - is-glob: "npm:^4.0.0" - json-stable-stringify-without-jsonify: "npm:^1.0.1" - lodash.merge: "npm:^4.6.2" - minimatch: "npm:^3.1.2" - natural-compare: "npm:^1.4.0" - optionator: "npm:^0.9.3" - peerDependencies: - jiti: "*" - peerDependenciesMeta: - jiti: - optional: true - bin: - eslint: bin/eslint.js - checksum: 10c0/7f592ad228b9bd627a24870fdc875bacdab7bf535d4b67316c4cb791e90d0125130a74769f3c407b0c4b7027b3082ef33864a63ee1024552a60a17db60493f15 - languageName: node - linkType: hard - -"espree@npm:^10.0.1, espree@npm:^10.3.0": - version: 10.3.0 - resolution: "espree@npm:10.3.0" - dependencies: - acorn: "npm:^8.14.0" - acorn-jsx: "npm:^5.3.2" - eslint-visitor-keys: "npm:^4.2.0" - checksum: 10c0/272beeaca70d0a1a047d61baff64db04664a33d7cfb5d144f84bc8a5c6194c6c8ebe9cc594093ca53add88baa23e59b01e69e8a0160ab32eac570482e165c462 - languageName: node - linkType: hard - -"esquery@npm:^1.5.0": - version: 1.6.0 - resolution: "esquery@npm:1.6.0" - dependencies: - estraverse: "npm:^5.1.0" - checksum: 10c0/cb9065ec605f9da7a76ca6dadb0619dfb611e37a81e318732977d90fab50a256b95fee2d925fba7c2f3f0523aa16f91587246693bc09bc34d5a59575fe6e93d2 - languageName: node - linkType: hard - -"esrecurse@npm:^4.3.0": - version: 4.3.0 - resolution: "esrecurse@npm:4.3.0" - dependencies: - estraverse: "npm:^5.2.0" - checksum: 10c0/81a37116d1408ded88ada45b9fb16dbd26fba3aadc369ce50fcaf82a0bac12772ebd7b24cd7b91fc66786bf2c1ac7b5f196bc990a473efff972f5cb338877cf5 - languageName: node - linkType: hard - -"estraverse@npm:^5.1.0, estraverse@npm:^5.2.0": - version: 5.3.0 - resolution: "estraverse@npm:5.3.0" - checksum: 10c0/1ff9447b96263dec95d6d67431c5e0771eb9776427421260a3e2f0fdd5d6bd4f8e37a7338f5ad2880c9f143450c9b1e4fc2069060724570a49cf9cf0312bd107 - languageName: node - linkType: hard - -"esutils@npm:^2.0.2": - version: 2.0.3 - resolution: "esutils@npm:2.0.3" - checksum: 10c0/9a2fe69a41bfdade834ba7c42de4723c97ec776e40656919c62cbd13607c45e127a003f05f724a1ea55e5029a4cf2de444b13009f2af71271e42d93a637137c7 - languageName: node - linkType: hard - -"fast-deep-equal@npm:^3.1.1, fast-deep-equal@npm:^3.1.3": - version: 3.1.3 - resolution: "fast-deep-equal@npm:3.1.3" - checksum: 10c0/40dedc862eb8992c54579c66d914635afbec43350afbbe991235fdcb4e3a8d5af1b23ae7e79bef7d4882d0ecee06c3197488026998fb19f72dc95acff1d1b1d0 - languageName: node - linkType: hard - -"fast-glob@npm:^3.3.2": - version: 3.3.3 - resolution: "fast-glob@npm:3.3.3" - dependencies: - "@nodelib/fs.stat": "npm:^2.0.2" - "@nodelib/fs.walk": "npm:^1.2.3" - glob-parent: "npm:^5.1.2" - merge2: "npm:^1.3.0" - micromatch: "npm:^4.0.8" - checksum: 10c0/f6aaa141d0d3384cf73cbcdfc52f475ed293f6d5b65bfc5def368b09163a9f7e5ec2b3014d80f733c405f58e470ee0cc451c2937685045cddcdeaa24199c43fe - languageName: node - linkType: hard - -"fast-json-stable-stringify@npm:^2.0.0": - version: 2.1.0 - resolution: "fast-json-stable-stringify@npm:2.1.0" - checksum: 10c0/7f081eb0b8a64e0057b3bb03f974b3ef00135fbf36c1c710895cd9300f13c94ba809bb3a81cf4e1b03f6e5285610a61abbd7602d0652de423144dfee5a389c9b - languageName: node - linkType: hard - -"fast-levenshtein@npm:^2.0.6": - version: 2.0.6 - resolution: "fast-levenshtein@npm:2.0.6" - checksum: 10c0/111972b37338bcb88f7d9e2c5907862c280ebf4234433b95bc611e518d192ccb2d38119c4ac86e26b668d75f7f3894f4ff5c4982899afced7ca78633b08287c4 - languageName: node - linkType: hard - -"fastq@npm:^1.6.0": - version: 1.18.0 - resolution: "fastq@npm:1.18.0" - dependencies: - reusify: "npm:^1.0.4" - checksum: 10c0/7be87ecc41762adbddf558d24182f50a4b1a3ef3ee807d33b7623da7aee5faecdcc94fce5aa13fe91df93e269f383232bbcdb2dc5338cd1826503d6063221f36 - languageName: node - linkType: hard - -"file-entry-cache@npm:^8.0.0": - version: 8.0.0 - resolution: "file-entry-cache@npm:8.0.0" - dependencies: - flat-cache: "npm:^4.0.0" - checksum: 10c0/9e2b5938b1cd9b6d7e3612bdc533afd4ac17b2fc646569e9a8abbf2eb48e5eb8e316bc38815a3ef6a1b456f4107f0d0f055a614ca613e75db6bf9ff4d72c1638 - languageName: node - linkType: hard - -"fill-range@npm:^7.1.1": - version: 7.1.1 - resolution: "fill-range@npm:7.1.1" - dependencies: - to-regex-range: "npm:^5.0.1" - checksum: 10c0/b75b691bbe065472f38824f694c2f7449d7f5004aa950426a2c28f0306c60db9b880c0b0e4ed819997ffb882d1da02cfcfc819bddc94d71627f5269682edf018 - languageName: node - linkType: hard - -"find-up@npm:^5.0.0": - version: 5.0.0 - resolution: "find-up@npm:5.0.0" - dependencies: - locate-path: "npm:^6.0.0" - path-exists: "npm:^4.0.0" - checksum: 10c0/062c5a83a9c02f53cdd6d175a37ecf8f87ea5bbff1fdfb828f04bfa021441bc7583e8ebc0872a4c1baab96221fb8a8a275a19809fb93fbc40bd69ec35634069a - languageName: node - linkType: hard - -"flat-cache@npm:^4.0.0": - version: 4.0.1 - resolution: "flat-cache@npm:4.0.1" - dependencies: - flatted: "npm:^3.2.9" - keyv: "npm:^4.5.4" - checksum: 10c0/2c59d93e9faa2523e4fda6b4ada749bed432cfa28c8e251f33b25795e426a1c6dbada777afb1f74fcfff33934fdbdea921ee738fcc33e71adc9d6eca984a1cfc - languageName: node - linkType: hard - -"flatted@npm:^3.2.9": - version: 3.3.2 - resolution: "flatted@npm:3.3.2" - checksum: 10c0/24cc735e74d593b6c767fe04f2ef369abe15b62f6906158079b9874bdb3ee5ae7110bb75042e70cd3f99d409d766f357caf78d5ecee9780206f5fdc5edbad334 - languageName: node - linkType: hard - -"for-each@npm:^0.3.3": - version: 0.3.3 - resolution: "for-each@npm:0.3.3" - dependencies: - is-callable: "npm:^1.1.3" - checksum: 10c0/22330d8a2db728dbf003ec9182c2d421fbcd2969b02b4f97ec288721cda63eb28f2c08585ddccd0f77cb2930af8d958005c9e72f47141dc51816127a118f39aa - languageName: node - linkType: hard - -"function-bind@npm:^1.1.2": - version: 1.1.2 - resolution: "function-bind@npm:1.1.2" - checksum: 10c0/d8680ee1e5fcd4c197e4ac33b2b4dce03c71f4d91717292785703db200f5c21f977c568d28061226f9b5900cbcd2c84463646134fd5337e7925e0942bc3f46d5 - languageName: node - linkType: hard - -"function.prototype.name@npm:^1.1.6, function.prototype.name@npm:^1.1.8": - version: 1.1.8 - resolution: "function.prototype.name@npm:1.1.8" - dependencies: - call-bind: "npm:^1.0.8" - call-bound: "npm:^1.0.3" - define-properties: "npm:^1.2.1" - functions-have-names: "npm:^1.2.3" - hasown: "npm:^2.0.2" - is-callable: "npm:^1.2.7" - checksum: 10c0/e920a2ab52663005f3cbe7ee3373e3c71c1fb5558b0b0548648cdf3e51961085032458e26c71ff1a8c8c20e7ee7caeb03d43a5d1fa8610c459333323a2e71253 - languageName: node - linkType: hard - -"functions-have-names@npm:^1.2.3": - version: 1.2.3 - resolution: "functions-have-names@npm:1.2.3" - checksum: 10c0/33e77fd29bddc2d9bb78ab3eb854c165909201f88c75faa8272e35899e2d35a8a642a15e7420ef945e1f64a9670d6aa3ec744106b2aa42be68ca5114025954ca - languageName: node - linkType: hard - -"get-intrinsic@npm:^1.2.4, get-intrinsic@npm:^1.2.5, get-intrinsic@npm:^1.2.6, get-intrinsic@npm:^1.2.7": - version: 1.2.7 - resolution: "get-intrinsic@npm:1.2.7" - dependencies: - call-bind-apply-helpers: "npm:^1.0.1" - es-define-property: "npm:^1.0.1" - es-errors: "npm:^1.3.0" - es-object-atoms: "npm:^1.0.0" - function-bind: "npm:^1.1.2" - get-proto: "npm:^1.0.0" - gopd: "npm:^1.2.0" - has-symbols: "npm:^1.1.0" - hasown: "npm:^2.0.2" - math-intrinsics: "npm:^1.1.0" - checksum: 10c0/b475dec9f8bff6f7422f51ff4b7b8d0b68e6776ee83a753c1d627e3008c3442090992788038b37eff72e93e43dceed8c1acbdf2d6751672687ec22127933080d - languageName: node - linkType: hard - -"get-proto@npm:^1.0.0, get-proto@npm:^1.0.1": - version: 1.0.1 - resolution: "get-proto@npm:1.0.1" - dependencies: - dunder-proto: "npm:^1.0.1" - es-object-atoms: "npm:^1.0.0" - checksum: 10c0/9224acb44603c5526955e83510b9da41baf6ae73f7398875fba50edc5e944223a89c4a72b070fcd78beb5f7bdda58ecb6294adc28f7acfc0da05f76a2399643c - languageName: node - linkType: hard - -"get-symbol-description@npm:^1.1.0": - version: 1.1.0 - resolution: "get-symbol-description@npm:1.1.0" - dependencies: - call-bound: "npm:^1.0.3" - es-errors: "npm:^1.3.0" - get-intrinsic: "npm:^1.2.6" - checksum: 10c0/d6a7d6afca375779a4b307738c9e80dbf7afc0bdbe5948768d54ab9653c865523d8920e670991a925936eb524b7cb6a6361d199a760b21d0ca7620194455aa4b - languageName: node - linkType: hard - -"glob-parent@npm:^5.1.2": - version: 5.1.2 - resolution: "glob-parent@npm:5.1.2" - dependencies: - is-glob: "npm:^4.0.1" - checksum: 10c0/cab87638e2112bee3f839ef5f6e0765057163d39c66be8ec1602f3823da4692297ad4e972de876ea17c44d652978638d2fd583c6713d0eb6591706825020c9ee - languageName: node - linkType: hard - -"glob-parent@npm:^6.0.2": - version: 6.0.2 - resolution: "glob-parent@npm:6.0.2" - dependencies: - is-glob: "npm:^4.0.3" - checksum: 10c0/317034d88654730230b3f43bb7ad4f7c90257a426e872ea0bf157473ac61c99bf5d205fad8f0185f989be8d2fa6d3c7dce1645d99d545b6ea9089c39f838e7f8 - languageName: node - linkType: hard - -"globals@npm:^14.0.0": - version: 14.0.0 - resolution: "globals@npm:14.0.0" - checksum: 10c0/b96ff42620c9231ad468d4c58ff42afee7777ee1c963013ff8aabe095a451d0ceeb8dcd8ef4cbd64d2538cef45f787a78ba3a9574f4a634438963e334471302d - languageName: node - linkType: hard - -"globalthis@npm:^1.0.4": - version: 1.0.4 - resolution: "globalthis@npm:1.0.4" - dependencies: - define-properties: "npm:^1.2.1" - gopd: "npm:^1.0.1" - checksum: 10c0/9d156f313af79d80b1566b93e19285f481c591ad6d0d319b4be5e03750d004dde40a39a0f26f7e635f9007a3600802f53ecd85a759b86f109e80a5f705e01846 - languageName: node - linkType: hard - -"gopd@npm:^1.0.1, gopd@npm:^1.2.0": - version: 1.2.0 - resolution: "gopd@npm:1.2.0" - checksum: 10c0/50fff1e04ba2b7737c097358534eacadad1e68d24cccee3272e04e007bed008e68d2614f3987788428fd192a5ae3889d08fb2331417e4fc4a9ab366b2043cead - languageName: node - linkType: hard - -"graphemer@npm:^1.4.0": - version: 1.4.0 - resolution: "graphemer@npm:1.4.0" - checksum: 10c0/e951259d8cd2e0d196c72ec711add7115d42eb9a8146c8eeda5b8d3ac91e5dd816b9cd68920726d9fd4490368e7ed86e9c423f40db87e2d8dfafa00fa17c3a31 - languageName: node - linkType: hard - -"has-bigints@npm:^1.0.2": - version: 1.1.0 - resolution: "has-bigints@npm:1.1.0" - checksum: 10c0/2de0cdc4a1ccf7a1e75ffede1876994525ac03cc6f5ae7392d3415dd475cd9eee5bceec63669ab61aa997ff6cceebb50ef75561c7002bed8988de2b9d1b40788 - languageName: node - linkType: hard - -"has-flag@npm:^4.0.0": - version: 4.0.0 - resolution: "has-flag@npm:4.0.0" - checksum: 10c0/2e789c61b7888d66993e14e8331449e525ef42aac53c627cc53d1c3334e768bcb6abdc4f5f0de1478a25beec6f0bd62c7549058b7ac53e924040d4f301f02fd1 - languageName: node - linkType: hard - -"has-property-descriptors@npm:^1.0.0, has-property-descriptors@npm:^1.0.2": - version: 1.0.2 - resolution: "has-property-descriptors@npm:1.0.2" - dependencies: - es-define-property: "npm:^1.0.0" - checksum: 10c0/253c1f59e80bb476cf0dde8ff5284505d90c3bdb762983c3514d36414290475fe3fd6f574929d84de2a8eec00d35cf07cb6776205ff32efd7c50719125f00236 - languageName: node - linkType: hard - -"has-proto@npm:^1.2.0": - version: 1.2.0 - resolution: "has-proto@npm:1.2.0" - dependencies: - dunder-proto: "npm:^1.0.0" - checksum: 10c0/46538dddab297ec2f43923c3d35237df45d8c55a6fc1067031e04c13ed8a9a8f94954460632fd4da84c31a1721eefee16d901cbb1ae9602bab93bb6e08f93b95 - languageName: node - linkType: hard - -"has-symbols@npm:^1.0.3, has-symbols@npm:^1.1.0": - version: 1.1.0 - resolution: "has-symbols@npm:1.1.0" - checksum: 10c0/dde0a734b17ae51e84b10986e651c664379018d10b91b6b0e9b293eddb32f0f069688c841fb40f19e9611546130153e0a2a48fd7f512891fb000ddfa36f5a20e - languageName: node - linkType: hard - -"has-tostringtag@npm:^1.0.2": - version: 1.0.2 - resolution: "has-tostringtag@npm:1.0.2" - dependencies: - has-symbols: "npm:^1.0.3" - checksum: 10c0/a8b166462192bafe3d9b6e420a1d581d93dd867adb61be223a17a8d6dad147aa77a8be32c961bb2f27b3ef893cae8d36f564ab651f5e9b7938ae86f74027c48c - languageName: node - linkType: hard - -"hasown@npm:^2.0.0, hasown@npm:^2.0.2": - version: 2.0.2 - resolution: "hasown@npm:2.0.2" - dependencies: - function-bind: "npm:^1.1.2" - checksum: 10c0/3769d434703b8ac66b209a4cca0737519925bbdb61dd887f93a16372b14694c63ff4e797686d87c90f08168e81082248b9b028bad60d4da9e0d1148766f56eb9 - languageName: node - linkType: hard - -"ignore@npm:^5.1.1, ignore@npm:^5.2.0, ignore@npm:^5.3.1": - version: 5.3.2 - resolution: "ignore@npm:5.3.2" - checksum: 10c0/f9f652c957983634ded1e7f02da3b559a0d4cc210fca3792cb67f1b153623c9c42efdc1c4121af171e295444459fc4a9201101fb041b1104a3c000bccb188337 - languageName: node - linkType: hard - -"import-fresh@npm:^3.2.1": - version: 3.3.0 - resolution: "import-fresh@npm:3.3.0" - dependencies: - parent-module: "npm:^1.0.0" - resolve-from: "npm:^4.0.0" - checksum: 10c0/7f882953aa6b740d1f0e384d0547158bc86efbf2eea0f1483b8900a6f65c5a5123c2cf09b0d542cc419d0b98a759ecaeb394237e97ea427f2da221dc3cd80cc3 - languageName: node - linkType: hard - -"imurmurhash@npm:^0.1.4": - version: 0.1.4 - resolution: "imurmurhash@npm:0.1.4" - checksum: 10c0/8b51313850dd33605c6c9d3fd9638b714f4c4c40250cff658209f30d40da60f78992fb2df5dabee4acf589a6a82bbc79ad5486550754bd9ec4e3fc0d4a57d6a6 - languageName: node - linkType: hard - -"internal-slot@npm:^1.1.0": - version: 1.1.0 - resolution: "internal-slot@npm:1.1.0" - dependencies: - es-errors: "npm:^1.3.0" - hasown: "npm:^2.0.2" - side-channel: "npm:^1.1.0" - checksum: 10c0/03966f5e259b009a9bf1a78d60da920df198af4318ec004f57b8aef1dd3fe377fbc8cce63a96e8c810010302654de89f9e19de1cd8ad0061d15be28a695465c7 - languageName: node - linkType: hard - -"is-array-buffer@npm:^3.0.4, is-array-buffer@npm:^3.0.5": - version: 3.0.5 - resolution: "is-array-buffer@npm:3.0.5" - dependencies: - call-bind: "npm:^1.0.8" - call-bound: "npm:^1.0.3" - get-intrinsic: "npm:^1.2.6" - checksum: 10c0/c5c9f25606e86dbb12e756694afbbff64bc8b348d1bc989324c037e1068695131930199d6ad381952715dad3a9569333817f0b1a72ce5af7f883ce802e49c83d - languageName: node - linkType: hard - -"is-async-function@npm:^2.0.0": - version: 2.1.1 - resolution: "is-async-function@npm:2.1.1" - dependencies: - async-function: "npm:^1.0.0" - call-bound: "npm:^1.0.3" - get-proto: "npm:^1.0.1" - has-tostringtag: "npm:^1.0.2" - safe-regex-test: "npm:^1.1.0" - checksum: 10c0/d70c236a5e82de6fc4d44368ffd0c2fee2b088b893511ce21e679da275a5ecc6015ff59a7d7e1bdd7ca39f71a8dbdd253cf8cce5c6b3c91cdd5b42b5ce677298 - languageName: node - linkType: hard - -"is-bigint@npm:^1.1.0": - version: 1.1.0 - resolution: "is-bigint@npm:1.1.0" - dependencies: - has-bigints: "npm:^1.0.2" - checksum: 10c0/f4f4b905ceb195be90a6ea7f34323bf1c18e3793f18922e3e9a73c684c29eeeeff5175605c3a3a74cc38185fe27758f07efba3dbae812e5c5afbc0d2316b40e4 - languageName: node - linkType: hard - -"is-boolean-object@npm:^1.2.1": - version: 1.2.1 - resolution: "is-boolean-object@npm:1.2.1" - dependencies: - call-bound: "npm:^1.0.2" - has-tostringtag: "npm:^1.0.2" - checksum: 10c0/2ef601d255a39fdbde79cfe6be80c27b47430ed6712407f29b17d002e20f64c1e3d6692f1d842ba16bf1e9d8ddf1c4f13cac3ed7d9a4a21290f44879ebb4e8f5 - languageName: node - linkType: hard - -"is-callable@npm:^1.1.3, is-callable@npm:^1.2.7": - version: 1.2.7 - resolution: "is-callable@npm:1.2.7" - checksum: 10c0/ceebaeb9d92e8adee604076971dd6000d38d6afc40bb843ea8e45c5579b57671c3f3b50d7f04869618242c6cee08d1b67806a8cb8edaaaf7c0748b3720d6066f - languageName: node - linkType: hard - -"is-core-module@npm:^2.13.0, is-core-module@npm:^2.15.1, is-core-module@npm:^2.16.0": - version: 2.16.1 - resolution: "is-core-module@npm:2.16.1" - dependencies: - hasown: "npm:^2.0.2" - checksum: 10c0/898443c14780a577e807618aaae2b6f745c8538eca5c7bc11388a3f2dc6de82b9902bcc7eb74f07be672b11bbe82dd6a6edded44a00cb3d8f933d0459905eedd - languageName: node - linkType: hard - -"is-data-view@npm:^1.0.1, is-data-view@npm:^1.0.2": - version: 1.0.2 - resolution: "is-data-view@npm:1.0.2" - dependencies: - call-bound: "npm:^1.0.2" - get-intrinsic: "npm:^1.2.6" - is-typed-array: "npm:^1.1.13" - checksum: 10c0/ef3548a99d7e7f1370ce21006baca6d40c73e9f15c941f89f0049c79714c873d03b02dae1c64b3f861f55163ecc16da06506c5b8a1d4f16650b3d9351c380153 - languageName: node - linkType: hard - -"is-date-object@npm:^1.0.5, is-date-object@npm:^1.1.0": - version: 1.1.0 - resolution: "is-date-object@npm:1.1.0" - dependencies: - call-bound: "npm:^1.0.2" - has-tostringtag: "npm:^1.0.2" - checksum: 10c0/1a4d199c8e9e9cac5128d32e6626fa7805175af9df015620ac0d5d45854ccf348ba494679d872d37301032e35a54fc7978fba1687e8721b2139aea7870cafa2f - languageName: node - linkType: hard - -"is-extglob@npm:^2.1.1": - version: 2.1.1 - resolution: "is-extglob@npm:2.1.1" - checksum: 10c0/5487da35691fbc339700bbb2730430b07777a3c21b9ebaecb3072512dfd7b4ba78ac2381a87e8d78d20ea08affb3f1971b4af629173a6bf435ff8a4c47747912 - languageName: node - linkType: hard - -"is-finalizationregistry@npm:^1.1.0": - version: 1.1.1 - resolution: "is-finalizationregistry@npm:1.1.1" - dependencies: - call-bound: "npm:^1.0.3" - checksum: 10c0/818dff679b64f19e228a8205a1e2d09989a98e98def3a817f889208cfcbf918d321b251aadf2c05918194803ebd2eb01b14fc9d0b2bea53d984f4137bfca5e97 - languageName: node - linkType: hard - -"is-generator-function@npm:^1.0.10": - version: 1.1.0 - resolution: "is-generator-function@npm:1.1.0" - dependencies: - call-bound: "npm:^1.0.3" - get-proto: "npm:^1.0.0" - has-tostringtag: "npm:^1.0.2" - safe-regex-test: "npm:^1.1.0" - checksum: 10c0/fdfa96c8087bf36fc4cd514b474ba2ff404219a4dd4cfa6cf5426404a1eed259bdcdb98f082a71029a48d01f27733e3436ecc6690129a7ec09cb0434bee03a2a - languageName: node - linkType: hard - -"is-glob@npm:^4.0.0, is-glob@npm:^4.0.1, is-glob@npm:^4.0.3": - version: 4.0.3 - resolution: "is-glob@npm:4.0.3" - dependencies: - is-extglob: "npm:^2.1.1" - checksum: 10c0/17fb4014e22be3bbecea9b2e3a76e9e34ff645466be702f1693e8f1ee1adac84710d0be0bd9f967d6354036fd51ab7c2741d954d6e91dae6bb69714de92c197a - languageName: node - linkType: hard - -"is-map@npm:^2.0.3": - version: 2.0.3 - resolution: "is-map@npm:2.0.3" - checksum: 10c0/2c4d431b74e00fdda7162cd8e4b763d6f6f217edf97d4f8538b94b8702b150610e2c64961340015fe8df5b1fcee33ccd2e9b62619c4a8a3a155f8de6d6d355fc - languageName: node - linkType: hard - -"is-number-object@npm:^1.1.1": - version: 1.1.1 - resolution: "is-number-object@npm:1.1.1" - dependencies: - call-bound: "npm:^1.0.3" - has-tostringtag: "npm:^1.0.2" - checksum: 10c0/97b451b41f25135ff021d85c436ff0100d84a039bb87ffd799cbcdbea81ef30c464ced38258cdd34f080be08fc3b076ca1f472086286d2aa43521d6ec6a79f53 - languageName: node - linkType: hard - -"is-number@npm:^7.0.0": - version: 7.0.0 - resolution: "is-number@npm:7.0.0" - checksum: 10c0/b4686d0d3053146095ccd45346461bc8e53b80aeb7671cc52a4de02dbbf7dc0d1d2a986e2fe4ae206984b4d34ef37e8b795ebc4f4295c978373e6575e295d811 - languageName: node - linkType: hard - -"is-regex@npm:^1.2.1": - version: 1.2.1 - resolution: "is-regex@npm:1.2.1" - dependencies: - call-bound: "npm:^1.0.2" - gopd: "npm:^1.2.0" - has-tostringtag: "npm:^1.0.2" - hasown: "npm:^2.0.2" - checksum: 10c0/1d3715d2b7889932349241680032e85d0b492cfcb045acb75ffc2c3085e8d561184f1f7e84b6f8321935b4aea39bc9c6ba74ed595b57ce4881a51dfdbc214e04 - languageName: node - linkType: hard - -"is-set@npm:^2.0.3": - version: 2.0.3 - resolution: "is-set@npm:2.0.3" - checksum: 10c0/f73732e13f099b2dc879c2a12341cfc22ccaca8dd504e6edae26484bd5707a35d503fba5b4daad530a9b088ced1ae6c9d8200fd92e09b428fe14ea79ce8080b7 - languageName: node - linkType: hard - -"is-shared-array-buffer@npm:^1.0.4": - version: 1.0.4 - resolution: "is-shared-array-buffer@npm:1.0.4" - dependencies: - call-bound: "npm:^1.0.3" - checksum: 10c0/65158c2feb41ff1edd6bbd6fd8403a69861cf273ff36077982b5d4d68e1d59278c71691216a4a64632bd76d4792d4d1d2553901b6666d84ade13bba5ea7bc7db - languageName: node - linkType: hard - -"is-string@npm:^1.0.7, is-string@npm:^1.1.1": - version: 1.1.1 - resolution: "is-string@npm:1.1.1" - dependencies: - call-bound: "npm:^1.0.3" - has-tostringtag: "npm:^1.0.2" - checksum: 10c0/2f518b4e47886bb81567faba6ffd0d8a8333cf84336e2e78bf160693972e32ad00fe84b0926491cc598dee576fdc55642c92e62d0cbe96bf36f643b6f956f94d - languageName: node - linkType: hard - -"is-symbol@npm:^1.0.4, is-symbol@npm:^1.1.1": - version: 1.1.1 - resolution: "is-symbol@npm:1.1.1" - dependencies: - call-bound: "npm:^1.0.2" - has-symbols: "npm:^1.1.0" - safe-regex-test: "npm:^1.1.0" - checksum: 10c0/f08f3e255c12442e833f75a9e2b84b2d4882fdfd920513cf2a4a2324f0a5b076c8fd913778e3ea5d258d5183e9d92c0cd20e04b03ab3df05316b049b2670af1e - languageName: node - linkType: hard - -"is-typed-array@npm:^1.1.13, is-typed-array@npm:^1.1.14, is-typed-array@npm:^1.1.15": - version: 1.1.15 - resolution: "is-typed-array@npm:1.1.15" - dependencies: - which-typed-array: "npm:^1.1.16" - checksum: 10c0/415511da3669e36e002820584e264997ffe277ff136643a3126cc949197e6ca3334d0f12d084e83b1994af2e9c8141275c741cf2b7da5a2ff62dd0cac26f76c4 - languageName: node - linkType: hard - -"is-weakmap@npm:^2.0.2": - version: 2.0.2 - resolution: "is-weakmap@npm:2.0.2" - checksum: 10c0/443c35bb86d5e6cc5929cd9c75a4024bb0fff9586ed50b092f94e700b89c43a33b186b76dbc6d54f3d3d09ece689ab38dcdc1af6a482cbe79c0f2da0a17f1299 - languageName: node - linkType: hard - -"is-weakref@npm:^1.0.2, is-weakref@npm:^1.1.0": - version: 1.1.0 - resolution: "is-weakref@npm:1.1.0" - dependencies: - call-bound: "npm:^1.0.2" - checksum: 10c0/aa835f62e29cb60132ecb3ec7d11bd0f39ec7322325abe8412b805aef47153ec2daefdb21759b049711c674f49b13202a31d8d126bcdff7d8671c78babd4ae5b - languageName: node - linkType: hard - -"is-weakset@npm:^2.0.3": - version: 2.0.4 - resolution: "is-weakset@npm:2.0.4" - dependencies: - call-bound: "npm:^1.0.3" - get-intrinsic: "npm:^1.2.6" - checksum: 10c0/6491eba08acb8dc9532da23cb226b7d0192ede0b88f16199e592e4769db0a077119c1f5d2283d1e0d16d739115f70046e887e477eb0e66cd90e1bb29f28ba647 - languageName: node - linkType: hard - -"isarray@npm:^2.0.5": - version: 2.0.5 - resolution: "isarray@npm:2.0.5" - checksum: 10c0/4199f14a7a13da2177c66c31080008b7124331956f47bca57dd0b6ea9f11687aa25e565a2c7a2b519bc86988d10398e3049a1f5df13c9f6b7664154690ae79fd - languageName: node - linkType: hard - -"isexe@npm:^2.0.0": - version: 2.0.0 - resolution: "isexe@npm:2.0.0" - checksum: 10c0/228cfa503fadc2c31596ab06ed6aa82c9976eec2bfd83397e7eaf06d0ccf42cd1dfd6743bf9aeb01aebd4156d009994c5f76ea898d2832c1fe342da923ca457d - languageName: node - linkType: hard - -"js-yaml@npm:^4.1.0": - version: 4.1.0 - resolution: "js-yaml@npm:4.1.0" - dependencies: - argparse: "npm:^2.0.1" - bin: - js-yaml: bin/js-yaml.js - checksum: 10c0/184a24b4eaacfce40ad9074c64fd42ac83cf74d8c8cd137718d456ced75051229e5061b8633c3366b8aada17945a7a356b337828c19da92b51ae62126575018f - languageName: node - linkType: hard - -"json-buffer@npm:3.0.1": - version: 3.0.1 - resolution: "json-buffer@npm:3.0.1" - checksum: 10c0/0d1c91569d9588e7eef2b49b59851f297f3ab93c7b35c7c221e288099322be6b562767d11e4821da500f3219542b9afd2e54c5dc573107c1126ed1080f8e96d7 - languageName: node - linkType: hard - -"json-schema-traverse@npm:^0.4.1": - version: 0.4.1 - resolution: "json-schema-traverse@npm:0.4.1" - checksum: 10c0/108fa90d4cc6f08243aedc6da16c408daf81793bf903e9fd5ab21983cda433d5d2da49e40711da016289465ec2e62e0324dcdfbc06275a607fe3233fde4942ce - languageName: node - linkType: hard - -"json-stable-stringify-without-jsonify@npm:^1.0.1": - version: 1.0.1 - resolution: "json-stable-stringify-without-jsonify@npm:1.0.1" - checksum: 10c0/cb168b61fd4de83e58d09aaa6425ef71001bae30d260e2c57e7d09a5fd82223e2f22a042dedaab8db23b7d9ae46854b08bb1f91675a8be11c5cffebef5fb66a5 - languageName: node - linkType: hard - -"json5@npm:^1.0.2": - version: 1.0.2 - resolution: "json5@npm:1.0.2" - dependencies: - minimist: "npm:^1.2.0" - bin: - json5: lib/cli.js - checksum: 10c0/9ee316bf21f000b00752e6c2a3b79ecf5324515a5c60ee88983a1910a45426b643a4f3461657586e8aeca87aaf96f0a519b0516d2ae527a6c3e7eed80f68717f - languageName: node - linkType: hard - -"keyv@npm:^4.5.4": - version: 4.5.4 - resolution: "keyv@npm:4.5.4" - dependencies: - json-buffer: "npm:3.0.1" - checksum: 10c0/aa52f3c5e18e16bb6324876bb8b59dd02acf782a4b789c7b2ae21107fab95fab3890ed448d4f8dba80ce05391eeac4bfabb4f02a20221342982f806fa2cf271e - languageName: node - linkType: hard - -"levn@npm:^0.4.1": - version: 0.4.1 - resolution: "levn@npm:0.4.1" - dependencies: - prelude-ls: "npm:^1.2.1" - type-check: "npm:~0.4.0" - checksum: 10c0/effb03cad7c89dfa5bd4f6989364bfc79994c2042ec5966cb9b95990e2edee5cd8969ddf42616a0373ac49fac1403437deaf6e9050fbbaa3546093a59b9ac94e - languageName: node - linkType: hard - -"locate-path@npm:^6.0.0": - version: 6.0.0 - resolution: "locate-path@npm:6.0.0" - dependencies: - p-locate: "npm:^5.0.0" - checksum: 10c0/d3972ab70dfe58ce620e64265f90162d247e87159b6126b01314dd67be43d50e96a50b517bce2d9452a79409c7614054c277b5232377de50416564a77ac7aad3 - languageName: node - linkType: hard - -"lodash.merge@npm:^4.6.2": - version: 4.6.2 - resolution: "lodash.merge@npm:4.6.2" - checksum: 10c0/402fa16a1edd7538de5b5903a90228aa48eb5533986ba7fa26606a49db2572bf414ff73a2c9f5d5fd36b31c46a5d5c7e1527749c07cbcf965ccff5fbdf32c506 - languageName: node - linkType: hard - -"math-intrinsics@npm:^1.1.0": - version: 1.1.0 - resolution: "math-intrinsics@npm:1.1.0" - checksum: 10c0/7579ff94e899e2f76ab64491d76cf606274c874d8f2af4a442c016bd85688927fcfca157ba6bf74b08e9439dc010b248ce05b96cc7c126a354c3bae7fcb48b7f - languageName: node - linkType: hard - -"merge2@npm:^1.3.0": - version: 1.4.1 - resolution: "merge2@npm:1.4.1" - checksum: 10c0/254a8a4605b58f450308fc474c82ac9a094848081bf4c06778200207820e5193726dc563a0d2c16468810516a5c97d9d3ea0ca6585d23c58ccfff2403e8dbbeb - languageName: node - linkType: hard - -"micromatch@npm:^4.0.8": - version: 4.0.8 - resolution: "micromatch@npm:4.0.8" - dependencies: - braces: "npm:^3.0.3" - picomatch: "npm:^2.3.1" - checksum: 10c0/166fa6eb926b9553f32ef81f5f531d27b4ce7da60e5baf8c021d043b27a388fb95e46a8038d5045877881e673f8134122b59624d5cecbd16eb50a42e7a6b5ca8 - languageName: node - linkType: hard - -"minimatch@npm:^3.0.4, minimatch@npm:^3.1.2": - version: 3.1.2 - resolution: "minimatch@npm:3.1.2" - dependencies: - brace-expansion: "npm:^1.1.7" - checksum: 10c0/0262810a8fc2e72cca45d6fd86bd349eee435eb95ac6aa45c9ea2180e7ee875ef44c32b55b5973ceabe95ea12682f6e3725cbb63d7a2d1da3ae1163c8b210311 - languageName: node - linkType: hard - -"minimatch@npm:^9.0.4": - version: 9.0.5 - resolution: "minimatch@npm:9.0.5" - dependencies: - brace-expansion: "npm:^2.0.1" - checksum: 10c0/de96cf5e35bdf0eab3e2c853522f98ffbe9a36c37797778d2665231ec1f20a9447a7e567cb640901f89e4daaa95ae5d70c65a9e8aa2bb0019b6facbc3c0575ed - languageName: node - linkType: hard - -"minimist@npm:^1.2.0, minimist@npm:^1.2.6": - version: 1.2.8 - resolution: "minimist@npm:1.2.8" - checksum: 10c0/19d3fcdca050087b84c2029841a093691a91259a47def2f18222f41e7645a0b7c44ef4b40e88a1e58a40c84d2ef0ee6047c55594d298146d0eb3f6b737c20ce6 - languageName: node - linkType: hard - -"ms@npm:^2.1.1, ms@npm:^2.1.3": - version: 2.1.3 - resolution: "ms@npm:2.1.3" - checksum: 10c0/d924b57e7312b3b63ad21fc5b3dc0af5e78d61a1fc7cfb5457edaf26326bf62be5307cc87ffb6862ef1c2b33b0233cdb5d4f01c4c958cc0d660948b65a287a48 - languageName: node - linkType: hard - -"natural-compare@npm:^1.4.0": - version: 1.4.0 - resolution: "natural-compare@npm:1.4.0" - checksum: 10c0/f5f9a7974bfb28a91afafa254b197f0f22c684d4a1731763dda960d2c8e375b36c7d690e0d9dc8fba774c537af14a7e979129bca23d88d052fbeb9466955e447 - languageName: node - linkType: hard - -"object-inspect@npm:^1.13.3": - version: 1.13.3 - resolution: "object-inspect@npm:1.13.3" - checksum: 10c0/cc3f15213406be89ffdc54b525e115156086796a515410a8d390215915db9f23c8eab485a06f1297402f440a33715fe8f71a528c1dcbad6e1a3bcaf5a46921d4 - languageName: node - linkType: hard - -"object-keys@npm:^1.1.1": - version: 1.1.1 - resolution: "object-keys@npm:1.1.1" - checksum: 10c0/b11f7ccdbc6d406d1f186cdadb9d54738e347b2692a14439ca5ac70c225fa6db46db809711b78589866d47b25fc3e8dee0b4c722ac751e11180f9380e3d8601d - languageName: node - linkType: hard - -"object.assign@npm:^4.1.7": - version: 4.1.7 - resolution: "object.assign@npm:4.1.7" - dependencies: - call-bind: "npm:^1.0.8" - call-bound: "npm:^1.0.3" - define-properties: "npm:^1.2.1" - es-object-atoms: "npm:^1.0.0" - has-symbols: "npm:^1.1.0" - object-keys: "npm:^1.1.1" - checksum: 10c0/3b2732bd860567ea2579d1567525168de925a8d852638612846bd8082b3a1602b7b89b67b09913cbb5b9bd6e95923b2ae73580baa9d99cb4e990564e8cbf5ddc - languageName: node - linkType: hard - -"object.fromentries@npm:^2.0.8": - version: 2.0.8 - resolution: "object.fromentries@npm:2.0.8" - dependencies: - call-bind: "npm:^1.0.7" - define-properties: "npm:^1.2.1" - es-abstract: "npm:^1.23.2" - es-object-atoms: "npm:^1.0.0" - checksum: 10c0/cd4327e6c3369cfa805deb4cbbe919bfb7d3aeebf0bcaba291bb568ea7169f8f8cdbcabe2f00b40db0c20cd20f08e11b5f3a5a36fb7dd3fe04850c50db3bf83b - languageName: node - linkType: hard - -"object.groupby@npm:^1.0.3": - version: 1.0.3 - resolution: "object.groupby@npm:1.0.3" - dependencies: - call-bind: "npm:^1.0.7" - define-properties: "npm:^1.2.1" - es-abstract: "npm:^1.23.2" - checksum: 10c0/60d0455c85c736fbfeda0217d1a77525956f76f7b2495edeca9e9bbf8168a45783199e77b894d30638837c654d0cc410e0e02cbfcf445bc8de71c3da1ede6a9c - languageName: node - linkType: hard - -"object.values@npm:^1.2.0": - version: 1.2.1 - resolution: "object.values@npm:1.2.1" - dependencies: - call-bind: "npm:^1.0.8" - call-bound: "npm:^1.0.3" - define-properties: "npm:^1.2.1" - es-object-atoms: "npm:^1.0.0" - checksum: 10c0/3c47814fdc64842ae3d5a74bc9d06bdd8d21563c04d9939bf6716a9c00596a4ebc342552f8934013d1ec991c74e3671b26710a0c51815f0b603795605ab6b2c9 - languageName: node - linkType: hard - -"optionator@npm:^0.9.3": - version: 0.9.4 - resolution: "optionator@npm:0.9.4" - dependencies: - deep-is: "npm:^0.1.3" - fast-levenshtein: "npm:^2.0.6" - levn: "npm:^0.4.1" - prelude-ls: "npm:^1.2.1" - type-check: "npm:^0.4.0" - word-wrap: "npm:^1.2.5" - checksum: 10c0/4afb687a059ee65b61df74dfe87d8d6815cd6883cb8b3d5883a910df72d0f5d029821f37025e4bccf4048873dbdb09acc6d303d27b8f76b1a80dd5a7d5334675 - languageName: node - linkType: hard - -"own-keys@npm:^1.0.1": - version: 1.0.1 - resolution: "own-keys@npm:1.0.1" - dependencies: - get-intrinsic: "npm:^1.2.6" - object-keys: "npm:^1.1.1" - safe-push-apply: "npm:^1.0.0" - checksum: 10c0/6dfeb3455bff92ec3f16a982d4e3e65676345f6902d9f5ded1d8265a6318d0200ce461956d6d1c70053c7fe9f9fe65e552faac03f8140d37ef0fdd108e67013a - languageName: node - linkType: hard - -"p-limit@npm:^3.0.2": - version: 3.1.0 - resolution: "p-limit@npm:3.1.0" - dependencies: - yocto-queue: "npm:^0.1.0" - checksum: 10c0/9db675949dbdc9c3763c89e748d0ef8bdad0afbb24d49ceaf4c46c02c77d30db4e0652ed36d0a0a7a95154335fab810d95c86153105bb73b3a90448e2bb14e1a - languageName: node - linkType: hard - -"p-locate@npm:^5.0.0": - version: 5.0.0 - resolution: "p-locate@npm:5.0.0" - dependencies: - p-limit: "npm:^3.0.2" - checksum: 10c0/2290d627ab7903b8b70d11d384fee714b797f6040d9278932754a6860845c4d3190603a0772a663c8cb5a7b21d1b16acb3a6487ebcafa9773094edc3dfe6009a - languageName: node - linkType: hard - -"parent-module@npm:^1.0.0": - version: 1.0.1 - resolution: "parent-module@npm:1.0.1" - dependencies: - callsites: "npm:^3.0.0" - checksum: 10c0/c63d6e80000d4babd11978e0d3fee386ca7752a02b035fd2435960ffaa7219dc42146f07069fb65e6e8bf1caef89daf9af7535a39bddf354d78bf50d8294f556 - languageName: node - linkType: hard - -"path-exists@npm:^4.0.0": - version: 4.0.0 - resolution: "path-exists@npm:4.0.0" - checksum: 10c0/8c0bd3f5238188197dc78dced15207a4716c51cc4e3624c44fc97acf69558f5ebb9a2afff486fe1b4ee148e0c133e96c5e11a9aa5c48a3006e3467da070e5e1b - languageName: node - linkType: hard - -"path-key@npm:^3.1.0": - version: 3.1.1 - resolution: "path-key@npm:3.1.1" - checksum: 10c0/748c43efd5a569c039d7a00a03b58eecd1d75f3999f5a28303d75f521288df4823bc057d8784eb72358b2895a05f29a070bc9f1f17d28226cc4e62494cc58c4c - languageName: node - linkType: hard - -"path-parse@npm:^1.0.7": - version: 1.0.7 - resolution: "path-parse@npm:1.0.7" - checksum: 10c0/11ce261f9d294cc7a58d6a574b7f1b935842355ec66fba3c3fd79e0f036462eaf07d0aa95bb74ff432f9afef97ce1926c720988c6a7451d8a584930ae7de86e1 - languageName: node - linkType: hard - -"picomatch@npm:^2.3.1": - version: 2.3.1 - resolution: "picomatch@npm:2.3.1" - checksum: 10c0/26c02b8d06f03206fc2ab8d16f19960f2ff9e81a658f831ecb656d8f17d9edc799e8364b1f4a7873e89d9702dff96204be0fa26fe4181f6843f040f819dac4be - languageName: node - linkType: hard - -"platform@workspace:.": - version: 0.0.0-use.local - resolution: "platform@workspace:." - dependencies: - "@types/node": "npm:^22.10.10" - "@typescript-eslint/eslint-plugin": "npm:^8.21.0" - "@typescript-eslint/parser": "npm:^8.21.0" - eslint: "npm:^9.18.0" - eslint-plugin-import: "npm:^2.31.0" - eslint-plugin-node: "npm:^11.1.0" - eslint-plugin-promise: "npm:^7.2.1" - tslib: "npm:^2.6.2" - typescript: "npm:^5.7.3" - languageName: unknown - linkType: soft - -"possible-typed-array-names@npm:^1.0.0": - version: 1.0.0 - resolution: "possible-typed-array-names@npm:1.0.0" - checksum: 10c0/d9aa22d31f4f7680e20269db76791b41c3a32c01a373e25f8a4813b4d45f7456bfc2b6d68f752dc4aab0e0bb0721cb3d76fb678c9101cb7a16316664bc2c73fd - languageName: node - linkType: hard - -"prelude-ls@npm:^1.2.1": - version: 1.2.1 - resolution: "prelude-ls@npm:1.2.1" - checksum: 10c0/b00d617431e7886c520a6f498a2e14c75ec58f6d93ba48c3b639cf241b54232d90daa05d83a9e9b9fef6baa63cb7e1e4602c2372fea5bc169668401eb127d0cd - languageName: node - linkType: hard - -"punycode@npm:^2.1.0": - version: 2.3.1 - resolution: "punycode@npm:2.3.1" - checksum: 10c0/14f76a8206bc3464f794fb2e3d3cc665ae416c01893ad7a02b23766eb07159144ee612ad67af5e84fa4479ccfe67678c4feb126b0485651b302babf66f04f9e9 - languageName: node - linkType: hard - -"queue-microtask@npm:^1.2.2": - version: 1.2.3 - resolution: "queue-microtask@npm:1.2.3" - checksum: 10c0/900a93d3cdae3acd7d16f642c29a642aea32c2026446151f0778c62ac089d4b8e6c986811076e1ae180a694cedf077d453a11b58ff0a865629a4f82ab558e102 - languageName: node - linkType: hard - -"reflect.getprototypeof@npm:^1.0.6, reflect.getprototypeof@npm:^1.0.9": - version: 1.0.10 - resolution: "reflect.getprototypeof@npm:1.0.10" - dependencies: - call-bind: "npm:^1.0.8" - define-properties: "npm:^1.2.1" - es-abstract: "npm:^1.23.9" - es-errors: "npm:^1.3.0" - es-object-atoms: "npm:^1.0.0" - get-intrinsic: "npm:^1.2.7" - get-proto: "npm:^1.0.1" - which-builtin-type: "npm:^1.2.1" - checksum: 10c0/7facec28c8008876f8ab98e80b7b9cb4b1e9224353fd4756dda5f2a4ab0d30fa0a5074777c6df24e1e0af463a2697513b0a11e548d99cf52f21f7bc6ba48d3ac - languageName: node - linkType: hard - -"regexp.prototype.flags@npm:^1.5.3": - version: 1.5.4 - resolution: "regexp.prototype.flags@npm:1.5.4" - dependencies: - call-bind: "npm:^1.0.8" - define-properties: "npm:^1.2.1" - es-errors: "npm:^1.3.0" - get-proto: "npm:^1.0.1" - gopd: "npm:^1.2.0" - set-function-name: "npm:^2.0.2" - checksum: 10c0/83b88e6115b4af1c537f8dabf5c3744032cb875d63bc05c288b1b8c0ef37cbe55353f95d8ca817e8843806e3e150b118bc624e4279b24b4776b4198232735a77 - languageName: node - linkType: hard - -"regexpp@npm:^3.0.0": - version: 3.2.0 - resolution: "regexpp@npm:3.2.0" - checksum: 10c0/d1da82385c8754a1681416b90b9cca0e21b4a2babef159099b88f640637d789c69011d0bc94705dacab85b81133e929d027d85210e8b8b03f8035164dbc14710 - languageName: node - linkType: hard - -"resolve-from@npm:^4.0.0": - version: 4.0.0 - resolution: "resolve-from@npm:4.0.0" - checksum: 10c0/8408eec31a3112ef96e3746c37be7d64020cda07c03a920f5024e77290a218ea758b26ca9529fd7b1ad283947f34b2291c1c0f6aa0ed34acfdda9c6014c8d190 - languageName: node - linkType: hard - -"resolve@npm:^1.10.1, resolve@npm:^1.22.4": - version: 1.22.10 - resolution: "resolve@npm:1.22.10" - dependencies: - is-core-module: "npm:^2.16.0" - path-parse: "npm:^1.0.7" - supports-preserve-symlinks-flag: "npm:^1.0.0" - bin: - resolve: bin/resolve - checksum: 10c0/8967e1f4e2cc40f79b7e080b4582b9a8c5ee36ffb46041dccb20e6461161adf69f843b43067b4a375de926a2cd669157e29a29578191def399dd5ef89a1b5203 - languageName: node - linkType: hard - -"resolve@patch:resolve@npm%3A^1.10.1#optional!builtin, resolve@patch:resolve@npm%3A^1.22.4#optional!builtin": - version: 1.22.10 - resolution: "resolve@patch:resolve@npm%3A1.22.10#optional!builtin::version=1.22.10&hash=c3c19d" - dependencies: - is-core-module: "npm:^2.16.0" - path-parse: "npm:^1.0.7" - supports-preserve-symlinks-flag: "npm:^1.0.0" - bin: - resolve: bin/resolve - checksum: 10c0/52a4e505bbfc7925ac8f4cd91fd8c4e096b6a89728b9f46861d3b405ac9a1ccf4dcbf8befb4e89a2e11370dacd0160918163885cbc669369590f2f31f4c58939 - languageName: node - linkType: hard - -"reusify@npm:^1.0.4": - version: 1.0.4 - resolution: "reusify@npm:1.0.4" - checksum: 10c0/c19ef26e4e188f408922c46f7ff480d38e8dfc55d448310dfb518736b23ed2c4f547fb64a6ed5bdba92cd7e7ddc889d36ff78f794816d5e71498d645ef476107 - languageName: node - linkType: hard - -"run-parallel@npm:^1.1.9": - version: 1.2.0 - resolution: "run-parallel@npm:1.2.0" - dependencies: - queue-microtask: "npm:^1.2.2" - checksum: 10c0/200b5ab25b5b8b7113f9901bfe3afc347e19bb7475b267d55ad0eb86a62a46d77510cb0f232507c9e5d497ebda569a08a9867d0d14f57a82ad5564d991588b39 - languageName: node - linkType: hard - -"safe-array-concat@npm:^1.1.3": - version: 1.1.3 - resolution: "safe-array-concat@npm:1.1.3" - dependencies: - call-bind: "npm:^1.0.8" - call-bound: "npm:^1.0.2" - get-intrinsic: "npm:^1.2.6" - has-symbols: "npm:^1.1.0" - isarray: "npm:^2.0.5" - checksum: 10c0/43c86ffdddc461fb17ff8a17c5324f392f4868f3c7dd2c6a5d9f5971713bc5fd755667212c80eab9567595f9a7509cc2f83e590ddaebd1bd19b780f9c79f9a8d - languageName: node - linkType: hard - -"safe-push-apply@npm:^1.0.0": - version: 1.0.0 - resolution: "safe-push-apply@npm:1.0.0" - dependencies: - es-errors: "npm:^1.3.0" - isarray: "npm:^2.0.5" - checksum: 10c0/831f1c9aae7436429e7862c7e46f847dfe490afac20d0ee61bae06108dbf5c745a0de3568ada30ccdd3eeb0864ca8331b2eef703abd69bfea0745b21fd320750 - languageName: node - linkType: hard - -"safe-regex-test@npm:^1.1.0": - version: 1.1.0 - resolution: "safe-regex-test@npm:1.1.0" - dependencies: - call-bound: "npm:^1.0.2" - es-errors: "npm:^1.3.0" - is-regex: "npm:^1.2.1" - checksum: 10c0/f2c25281bbe5d39cddbbce7f86fca5ea9b3ce3354ea6cd7c81c31b006a5a9fff4286acc5450a3b9122c56c33eba69c56b9131ad751457b2b4a585825e6a10665 - languageName: node - linkType: hard - -"semver@npm:^6.1.0, semver@npm:^6.3.1": - version: 6.3.1 - resolution: "semver@npm:6.3.1" - bin: - semver: bin/semver.js - checksum: 10c0/e3d79b609071caa78bcb6ce2ad81c7966a46a7431d9d58b8800cfa9cb6a63699b3899a0e4bcce36167a284578212d9ae6942b6929ba4aa5015c079a67751d42d - languageName: node - linkType: hard - -"semver@npm:^7.6.0": - version: 7.6.3 - resolution: "semver@npm:7.6.3" - bin: - semver: bin/semver.js - checksum: 10c0/88f33e148b210c153873cb08cfe1e281d518aaa9a666d4d148add6560db5cd3c582f3a08ccb91f38d5f379ead256da9931234ed122057f40bb5766e65e58adaf - languageName: node - linkType: hard - -"set-function-length@npm:^1.2.2": - version: 1.2.2 - resolution: "set-function-length@npm:1.2.2" - dependencies: - define-data-property: "npm:^1.1.4" - es-errors: "npm:^1.3.0" - function-bind: "npm:^1.1.2" - get-intrinsic: "npm:^1.2.4" - gopd: "npm:^1.0.1" - has-property-descriptors: "npm:^1.0.2" - checksum: 10c0/82850e62f412a258b71e123d4ed3873fa9377c216809551192bb6769329340176f109c2eeae8c22a8d386c76739855f78e8716515c818bcaef384b51110f0f3c - languageName: node - linkType: hard - -"set-function-name@npm:^2.0.2": - version: 2.0.2 - resolution: "set-function-name@npm:2.0.2" - dependencies: - define-data-property: "npm:^1.1.4" - es-errors: "npm:^1.3.0" - functions-have-names: "npm:^1.2.3" - has-property-descriptors: "npm:^1.0.2" - checksum: 10c0/fce59f90696c450a8523e754abb305e2b8c73586452619c2bad5f7bf38c7b6b4651895c9db895679c5bef9554339cf3ef1c329b66ece3eda7255785fbe299316 - languageName: node - linkType: hard - -"set-proto@npm:^1.0.0": - version: 1.0.0 - resolution: "set-proto@npm:1.0.0" - dependencies: - dunder-proto: "npm:^1.0.1" - es-errors: "npm:^1.3.0" - es-object-atoms: "npm:^1.0.0" - checksum: 10c0/ca5c3ccbba479d07c30460e367e66337cec825560b11e8ba9c5ebe13a2a0d6021ae34eddf94ff3dfe17a3104dc1f191519cb6c48378b503e5c3f36393938776a - languageName: node - linkType: hard - -"shebang-command@npm:^2.0.0": - version: 2.0.0 - resolution: "shebang-command@npm:2.0.0" - dependencies: - shebang-regex: "npm:^3.0.0" - checksum: 10c0/a41692e7d89a553ef21d324a5cceb5f686d1f3c040759c50aab69688634688c5c327f26f3ecf7001ebfd78c01f3c7c0a11a7c8bfd0a8bc9f6240d4f40b224e4e - languageName: node - linkType: hard - -"shebang-regex@npm:^3.0.0": - version: 3.0.0 - resolution: "shebang-regex@npm:3.0.0" - checksum: 10c0/1dbed0726dd0e1152a92696c76c7f06084eb32a90f0528d11acd764043aacf76994b2fb30aa1291a21bd019d6699164d048286309a278855ee7bec06cf6fb690 - languageName: node - linkType: hard - -"side-channel-list@npm:^1.0.0": - version: 1.0.0 - resolution: "side-channel-list@npm:1.0.0" - dependencies: - es-errors: "npm:^1.3.0" - object-inspect: "npm:^1.13.3" - checksum: 10c0/644f4ac893456c9490ff388bf78aea9d333d5e5bfc64cfb84be8f04bf31ddc111a8d4b83b85d7e7e8a7b845bc185a9ad02c052d20e086983cf59f0be517d9b3d - languageName: node - linkType: hard - -"side-channel-map@npm:^1.0.1": - version: 1.0.1 - resolution: "side-channel-map@npm:1.0.1" - dependencies: - call-bound: "npm:^1.0.2" - es-errors: "npm:^1.3.0" - get-intrinsic: "npm:^1.2.5" - object-inspect: "npm:^1.13.3" - checksum: 10c0/010584e6444dd8a20b85bc926d934424bd809e1a3af941cace229f7fdcb751aada0fb7164f60c2e22292b7fa3c0ff0bce237081fd4cdbc80de1dc68e95430672 - languageName: node - linkType: hard - -"side-channel-weakmap@npm:^1.0.2": - version: 1.0.2 - resolution: "side-channel-weakmap@npm:1.0.2" - dependencies: - call-bound: "npm:^1.0.2" - es-errors: "npm:^1.3.0" - get-intrinsic: "npm:^1.2.5" - object-inspect: "npm:^1.13.3" - side-channel-map: "npm:^1.0.1" - checksum: 10c0/71362709ac233e08807ccd980101c3e2d7efe849edc51455030327b059f6c4d292c237f94dc0685031dd11c07dd17a68afde235d6cf2102d949567f98ab58185 - languageName: node - linkType: hard - -"side-channel@npm:^1.1.0": - version: 1.1.0 - resolution: "side-channel@npm:1.1.0" - dependencies: - es-errors: "npm:^1.3.0" - object-inspect: "npm:^1.13.3" - side-channel-list: "npm:^1.0.0" - side-channel-map: "npm:^1.0.1" - side-channel-weakmap: "npm:^1.0.2" - checksum: 10c0/cb20dad41eb032e6c24c0982e1e5a24963a28aa6122b4f05b3f3d6bf8ae7fd5474ef382c8f54a6a3ab86e0cac4d41a23bd64ede3970e5bfb50326ba02a7996e6 - languageName: node - linkType: hard - -"string.prototype.trim@npm:^1.2.10": - version: 1.2.10 - resolution: "string.prototype.trim@npm:1.2.10" - dependencies: - call-bind: "npm:^1.0.8" - call-bound: "npm:^1.0.2" - define-data-property: "npm:^1.1.4" - define-properties: "npm:^1.2.1" - es-abstract: "npm:^1.23.5" - es-object-atoms: "npm:^1.0.0" - has-property-descriptors: "npm:^1.0.2" - checksum: 10c0/8a8854241c4b54a948e992eb7dd6b8b3a97185112deb0037a134f5ba57541d8248dd610c966311887b6c2fd1181a3877bffb14d873ce937a344535dabcc648f8 - languageName: node - linkType: hard - -"string.prototype.trimend@npm:^1.0.8, string.prototype.trimend@npm:^1.0.9": - version: 1.0.9 - resolution: "string.prototype.trimend@npm:1.0.9" - dependencies: - call-bind: "npm:^1.0.8" - call-bound: "npm:^1.0.2" - define-properties: "npm:^1.2.1" - es-object-atoms: "npm:^1.0.0" - checksum: 10c0/59e1a70bf9414cb4c536a6e31bef5553c8ceb0cf44d8b4d0ed65c9653358d1c64dd0ec203b100df83d0413bbcde38b8c5d49e14bc4b86737d74adc593a0d35b6 - languageName: node - linkType: hard - -"string.prototype.trimstart@npm:^1.0.8": - version: 1.0.8 - resolution: "string.prototype.trimstart@npm:1.0.8" - dependencies: - call-bind: "npm:^1.0.7" - define-properties: "npm:^1.2.1" - es-object-atoms: "npm:^1.0.0" - checksum: 10c0/d53af1899959e53c83b64a5fd120be93e067da740e7e75acb433849aa640782fb6c7d4cd5b84c954c84413745a3764df135a8afeb22908b86a835290788d8366 - languageName: node - linkType: hard - -"strip-bom@npm:^3.0.0": - version: 3.0.0 - resolution: "strip-bom@npm:3.0.0" - checksum: 10c0/51201f50e021ef16672593d7434ca239441b7b760e905d9f33df6e4f3954ff54ec0e0a06f100d028af0982d6f25c35cd5cda2ce34eaebccd0250b8befb90d8f1 - languageName: node - linkType: hard - -"strip-json-comments@npm:^3.1.1": - version: 3.1.1 - resolution: "strip-json-comments@npm:3.1.1" - checksum: 10c0/9681a6257b925a7fa0f285851c0e613cc934a50661fa7bb41ca9cbbff89686bb4a0ee366e6ecedc4daafd01e83eee0720111ab294366fe7c185e935475ebcecd - languageName: node - linkType: hard - -"supports-color@npm:^7.1.0": - version: 7.2.0 - resolution: "supports-color@npm:7.2.0" - dependencies: - has-flag: "npm:^4.0.0" - checksum: 10c0/afb4c88521b8b136b5f5f95160c98dee7243dc79d5432db7efc27efb219385bbc7d9427398e43dd6cc730a0f87d5085ce1652af7efbe391327bc0a7d0f7fc124 - languageName: node - linkType: hard - -"supports-preserve-symlinks-flag@npm:^1.0.0": - version: 1.0.0 - resolution: "supports-preserve-symlinks-flag@npm:1.0.0" - checksum: 10c0/6c4032340701a9950865f7ae8ef38578d8d7053f5e10518076e6554a9381fa91bd9c6850193695c141f32b21f979c985db07265a758867bac95de05f7d8aeb39 - languageName: node - linkType: hard - -"to-regex-range@npm:^5.0.1": - version: 5.0.1 - resolution: "to-regex-range@npm:5.0.1" - dependencies: - is-number: "npm:^7.0.0" - checksum: 10c0/487988b0a19c654ff3e1961b87f471702e708fa8a8dd02a298ef16da7206692e8552a0250e8b3e8759270f62e9d8314616f6da274734d3b558b1fc7b7724e892 - languageName: node - linkType: hard - -"ts-api-utils@npm:^2.0.0": - version: 2.0.0 - resolution: "ts-api-utils@npm:2.0.0" - peerDependencies: - typescript: ">=4.8.4" - checksum: 10c0/6165e29a5b75bd0218e3cb0f9ee31aa893dbd819c2e46dbb086c841121eb0436ed47c2c18a20cb3463d74fd1fb5af62e2604ba5971cc48e5b38ebbdc56746dfc - languageName: node - linkType: hard - -"tsconfig-paths@npm:^3.15.0": - version: 3.15.0 - resolution: "tsconfig-paths@npm:3.15.0" - dependencies: - "@types/json5": "npm:^0.0.29" - json5: "npm:^1.0.2" - minimist: "npm:^1.2.6" - strip-bom: "npm:^3.0.0" - checksum: 10c0/5b4f301a2b7a3766a986baf8fc0e177eb80bdba6e396792ff92dc23b5bca8bb279fc96517dcaaef63a3b49bebc6c4c833653ec58155780bc906bdbcf7dda0ef5 - languageName: node - linkType: hard - -"tslib@npm:^2.6.2": - version: 2.8.1 - resolution: "tslib@npm:2.8.1" - checksum: 10c0/9c4759110a19c53f992d9aae23aac5ced636e99887b51b9e61def52611732872ff7668757d4e4c61f19691e36f4da981cd9485e869b4a7408d689f6bf1f14e62 - languageName: node - linkType: hard - -"type-check@npm:^0.4.0, type-check@npm:~0.4.0": - version: 0.4.0 - resolution: "type-check@npm:0.4.0" - dependencies: - prelude-ls: "npm:^1.2.1" - checksum: 10c0/7b3fd0ed43891e2080bf0c5c504b418fbb3e5c7b9708d3d015037ba2e6323a28152ec163bcb65212741fa5d2022e3075ac3c76440dbd344c9035f818e8ecee58 - languageName: node - linkType: hard - -"typed-array-buffer@npm:^1.0.3": - version: 1.0.3 - resolution: "typed-array-buffer@npm:1.0.3" - dependencies: - call-bound: "npm:^1.0.3" - es-errors: "npm:^1.3.0" - is-typed-array: "npm:^1.1.14" - checksum: 10c0/1105071756eb248774bc71646bfe45b682efcad93b55532c6ffa4518969fb6241354e4aa62af679ae83899ec296d69ef88f1f3763657cdb3a4d29321f7b83079 - languageName: node - linkType: hard - -"typed-array-byte-length@npm:^1.0.3": - version: 1.0.3 - resolution: "typed-array-byte-length@npm:1.0.3" - dependencies: - call-bind: "npm:^1.0.8" - for-each: "npm:^0.3.3" - gopd: "npm:^1.2.0" - has-proto: "npm:^1.2.0" - is-typed-array: "npm:^1.1.14" - checksum: 10c0/6ae083c6f0354f1fce18b90b243343b9982affd8d839c57bbd2c174a5d5dc71be9eb7019ffd12628a96a4815e7afa85d718d6f1e758615151d5f35df841ffb3e - languageName: node - linkType: hard - -"typed-array-byte-offset@npm:^1.0.4": - version: 1.0.4 - resolution: "typed-array-byte-offset@npm:1.0.4" - dependencies: - available-typed-arrays: "npm:^1.0.7" - call-bind: "npm:^1.0.8" - for-each: "npm:^0.3.3" - gopd: "npm:^1.2.0" - has-proto: "npm:^1.2.0" - is-typed-array: "npm:^1.1.15" - reflect.getprototypeof: "npm:^1.0.9" - checksum: 10c0/3d805b050c0c33b51719ee52de17c1cd8e6a571abdf0fffb110e45e8dd87a657e8b56eee94b776b13006d3d347a0c18a730b903cf05293ab6d92e99ff8f77e53 - languageName: node - linkType: hard - -"typed-array-length@npm:^1.0.7": - version: 1.0.7 - resolution: "typed-array-length@npm:1.0.7" - dependencies: - call-bind: "npm:^1.0.7" - for-each: "npm:^0.3.3" - gopd: "npm:^1.0.1" - is-typed-array: "npm:^1.1.13" - possible-typed-array-names: "npm:^1.0.0" - reflect.getprototypeof: "npm:^1.0.6" - checksum: 10c0/e38f2ae3779584c138a2d8adfa8ecf749f494af3cd3cdafe4e688ce51418c7d2c5c88df1bd6be2bbea099c3f7cea58c02ca02ed438119e91f162a9de23f61295 - languageName: node - linkType: hard - -"typescript@npm:^5.7.3": - version: 5.7.3 - resolution: "typescript@npm:5.7.3" - bin: - tsc: bin/tsc - tsserver: bin/tsserver - checksum: 10c0/b7580d716cf1824736cc6e628ab4cd8b51877408ba2be0869d2866da35ef8366dd6ae9eb9d0851470a39be17cbd61df1126f9e211d8799d764ea7431d5435afa - languageName: node - linkType: hard - -"typescript@patch:typescript@npm%3A^5.7.3#optional!builtin": - version: 5.7.3 - resolution: "typescript@patch:typescript@npm%3A5.7.3#optional!builtin::version=5.7.3&hash=5786d5" - bin: - tsc: bin/tsc - tsserver: bin/tsserver - checksum: 10c0/6fd7e0ed3bf23a81246878c613423730c40e8bdbfec4c6e4d7bf1b847cbb39076e56ad5f50aa9d7ebd89877999abaee216002d3f2818885e41c907caaa192cc4 - languageName: node - linkType: hard - -"unbox-primitive@npm:^1.1.0": - version: 1.1.0 - resolution: "unbox-primitive@npm:1.1.0" - dependencies: - call-bound: "npm:^1.0.3" - has-bigints: "npm:^1.0.2" - has-symbols: "npm:^1.1.0" - which-boxed-primitive: "npm:^1.1.1" - checksum: 10c0/7dbd35ab02b0e05fe07136c72cb9355091242455473ec15057c11430129bab38b7b3624019b8778d02a881c13de44d63cd02d122ee782fb519e1de7775b5b982 - languageName: node - linkType: hard - -"undici-types@npm:~6.20.0": - version: 6.20.0 - resolution: "undici-types@npm:6.20.0" - checksum: 10c0/68e659a98898d6a836a9a59e6adf14a5d799707f5ea629433e025ac90d239f75e408e2e5ff086afc3cace26f8b26ee52155293564593fbb4a2f666af57fc59bf - languageName: node - linkType: hard - -"uri-js@npm:^4.2.2": - version: 4.4.1 - resolution: "uri-js@npm:4.4.1" - dependencies: - punycode: "npm:^2.1.0" - checksum: 10c0/4ef57b45aa820d7ac6496e9208559986c665e49447cb072744c13b66925a362d96dd5a46c4530a6b8e203e5db5fe849369444440cb22ecfc26c679359e5dfa3c - languageName: node - linkType: hard - -"which-boxed-primitive@npm:^1.1.0, which-boxed-primitive@npm:^1.1.1": - version: 1.1.1 - resolution: "which-boxed-primitive@npm:1.1.1" - dependencies: - is-bigint: "npm:^1.1.0" - is-boolean-object: "npm:^1.2.1" - is-number-object: "npm:^1.1.1" - is-string: "npm:^1.1.1" - is-symbol: "npm:^1.1.1" - checksum: 10c0/aceea8ede3b08dede7dce168f3883323f7c62272b49801716e8332ff750e7ae59a511ae088840bc6874f16c1b7fd296c05c949b0e5b357bfe3c431b98c417abe - languageName: node - linkType: hard - -"which-builtin-type@npm:^1.2.1": - version: 1.2.1 - resolution: "which-builtin-type@npm:1.2.1" - dependencies: - call-bound: "npm:^1.0.2" - function.prototype.name: "npm:^1.1.6" - has-tostringtag: "npm:^1.0.2" - is-async-function: "npm:^2.0.0" - is-date-object: "npm:^1.1.0" - is-finalizationregistry: "npm:^1.1.0" - is-generator-function: "npm:^1.0.10" - is-regex: "npm:^1.2.1" - is-weakref: "npm:^1.0.2" - isarray: "npm:^2.0.5" - which-boxed-primitive: "npm:^1.1.0" - which-collection: "npm:^1.0.2" - which-typed-array: "npm:^1.1.16" - checksum: 10c0/8dcf323c45e5c27887800df42fbe0431d0b66b1163849bb7d46b5a730ad6a96ee8bfe827d078303f825537844ebf20c02459de41239a0a9805e2fcb3cae0d471 - languageName: node - linkType: hard - -"which-collection@npm:^1.0.2": - version: 1.0.2 - resolution: "which-collection@npm:1.0.2" - dependencies: - is-map: "npm:^2.0.3" - is-set: "npm:^2.0.3" - is-weakmap: "npm:^2.0.2" - is-weakset: "npm:^2.0.3" - checksum: 10c0/3345fde20964525a04cdf7c4a96821f85f0cc198f1b2ecb4576e08096746d129eb133571998fe121c77782ac8f21cbd67745a3d35ce100d26d4e684c142ea1f2 - languageName: node - linkType: hard - -"which-typed-array@npm:^1.1.16, which-typed-array@npm:^1.1.18": - version: 1.1.18 - resolution: "which-typed-array@npm:1.1.18" - dependencies: - available-typed-arrays: "npm:^1.0.7" - call-bind: "npm:^1.0.8" - call-bound: "npm:^1.0.3" - for-each: "npm:^0.3.3" - gopd: "npm:^1.2.0" - has-tostringtag: "npm:^1.0.2" - checksum: 10c0/0412f4a91880ca1a2a63056187c2e3de6b129b2b5b6c17bc3729f0f7041047ae48fb7424813e51506addb2c97320003ee18b8c57469d2cde37983ef62126143c - languageName: node - linkType: hard - -"which@npm:^2.0.1": - version: 2.0.2 - resolution: "which@npm:2.0.2" - dependencies: - isexe: "npm:^2.0.0" - bin: - node-which: ./bin/node-which - checksum: 10c0/66522872a768b60c2a65a57e8ad184e5372f5b6a9ca6d5f033d4b0dc98aff63995655a7503b9c0a2598936f532120e81dd8cc155e2e92ed662a2b9377cc4374f - languageName: node - linkType: hard - -"word-wrap@npm:^1.2.5": - version: 1.2.5 - resolution: "word-wrap@npm:1.2.5" - checksum: 10c0/e0e4a1ca27599c92a6ca4c32260e8a92e8a44f4ef6ef93f803f8ed823f486e0889fc0b93be4db59c8d51b3064951d25e43d434e95dc8c960cc3a63d65d00ba20 - languageName: node - linkType: hard - -"yocto-queue@npm:^0.1.0": - version: 0.1.0 - resolution: "yocto-queue@npm:0.1.0" - checksum: 10c0/dceb44c28578b31641e13695d200d34ec4ab3966a5729814d5445b194933c096b7ced71494ce53a0e8820685d1d010df8b2422e5bf2cdea7e469d97ffbea306f - languageName: node - linkType: hard diff --git a/cli/chipmunk-cli/.gitignore b/cli/chipmunk-cli/.gitignore deleted file mode 100644 index e9a83dd15c..0000000000 --- a/cli/chipmunk-cli/.gitignore +++ /dev/null @@ -1,6 +0,0 @@ -/target -**/*.rs.bk -*.out -lineMetadata.json -vim-markdown-preview.html -.DS_Store diff --git a/cli/chipmunk-cli/Cargo.lock b/cli/chipmunk-cli/Cargo.lock deleted file mode 100644 index ce3648f208..0000000000 --- a/cli/chipmunk-cli/Cargo.lock +++ /dev/null @@ -1,1879 +0,0 @@ -# This file is automatically @generated by Cargo. -# It is not intended for manual editing. -version = 4 - -[[package]] -name = "addr2line" -version = "0.24.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfbe277e56a376000877090da837660b4427aad530e3028d44e0bffe4f89a1c1" -dependencies = [ - "gimli", -] - -[[package]] -name = "adler2" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "512761e0bb2578dd7380c6baaa0f4ce03e84f95e960231d1dec8bf4d7d6e2627" - -[[package]] -name = "aho-corasick" -version = "1.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916" -dependencies = [ - "memchr", -] - -[[package]] -name = "android-tzdata" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0" - -[[package]] -name = "android_system_properties" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311" -dependencies = [ - "libc", -] - -[[package]] -name = "anstream" -version = "0.6.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8acc5369981196006228e28809f761875c0327210a891e941f4c683b3a99529b" -dependencies = [ - "anstyle", - "anstyle-parse", - "anstyle-query", - "anstyle-wincon", - "colorchoice", - "is_terminal_polyfill", - "utf8parse", -] - -[[package]] -name = "anstyle" -version = "1.0.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55cc3b69f167a1ef2e161439aa98aed94e6028e5f9a59be9a6ffb47aef1651f9" - -[[package]] -name = "anstyle-parse" -version = "0.2.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b2d16507662817a6a20a9ea92df6652ee4f94f914589377d69f3b21bc5798a9" -dependencies = [ - "utf8parse", -] - -[[package]] -name = "anstyle-query" -version = "1.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "79947af37f4177cfead1110013d678905c37501914fba0efea834c3fe9a8d60c" -dependencies = [ - "windows-sys 0.59.0", -] - -[[package]] -name = "anstyle-wincon" -version = "3.0.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6680de5231bd6ee4c6191b8a1325daa282b415391ec9d3a37bd34f2060dc73fa" -dependencies = [ - "anstyle", - "once_cell_polyfill", - "windows-sys 0.59.0", -] - -[[package]] -name = "anyhow" -version = "1.0.98" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e16d2d3311acee920a9eb8d33b8cbc1787ce4a264e85f964c2404b969bdcd487" - -[[package]] -name = "arrayvec" -version = "0.7.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50" - -[[package]] -name = "autocfg" -version = "1.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26" - -[[package]] -name = "backtrace" -version = "0.3.75" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6806a6321ec58106fea15becdad98371e28d92ccbc7c8f1b3b6dd724fe8f1002" -dependencies = [ - "addr2line", - "cfg-if", - "libc", - "miniz_oxide", - "object", - "rustc-demangle", - "windows-targets", -] - -[[package]] -name = "bincode" -version = "1.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1f45e9417d87227c7a56d22e471c6206462cba514c7590c09aff4cf6d1ddcad" -dependencies = [ - "serde", -] - -[[package]] -name = "bitflags" -version = "1.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" - -[[package]] -name = "bitflags" -version = "2.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b8e56985ec62d17e9c1001dc89c88ecd7dc08e47eba5ec7c29c7b5eeecde967" - -[[package]] -name = "bstr" -version = "1.12.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "234113d19d0d7d613b40e86fb654acf958910802bcceab913a4f9e7cda03b1a4" -dependencies = [ - "memchr", - "regex-automata", - "serde", -] - -[[package]] -name = "bufread" -version = "4.0.0-alpha.1" - -[[package]] -name = "bumpalo" -version = "3.17.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1628fb46dfa0b37568d12e5edd512553eccf6a22a78e8bde00bb4aed84d5bdbf" - -[[package]] -name = "bytecount" -version = "0.6.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "175812e0be2bccb6abe50bb8d566126198344f707e304f45c648fd8f2cc0365e" - -[[package]] -name = "byteorder" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" - -[[package]] -name = "bytes" -version = "1.10.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d71b6127be86fdcfddb610f7182ac57211d4b18a3e9c82eb2d17662f2227ad6a" - -[[package]] -name = "cc" -version = "1.2.25" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0fc897dc1e865cc67c0e05a836d9d3f1df3cbe442aa4a9473b18e12624a4951" -dependencies = [ - "shlex", -] - -[[package]] -name = "cfg-if" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" - -[[package]] -name = "cfg_aliases" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724" - -[[package]] -name = "chipmunk-cli" -version = "0.2.2" -dependencies = [ - "anyhow", - "clap", - "futures", - "parsers", - "processor", - "sources", - "tokio", - "tokio-util", -] - -[[package]] -name = "chrono" -version = "0.4.41" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c469d952047f47f91b68d1cba3f10d63c11d73e4636f24f08daf0278abf01c4d" -dependencies = [ - "android-tzdata", - "iana-time-zone", - "js-sys", - "num-traits", - "wasm-bindgen", - "windows-link", -] - -[[package]] -name = "chrono-tz" -version = "0.10.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "efdce149c370f133a071ca8ef6ea340b7b88748ab0810097a9e2976eaa34b4f3" -dependencies = [ - "chrono", - "chrono-tz-build", - "phf", -] - -[[package]] -name = "chrono-tz-build" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f10f8c9340e31fc120ff885fcdb54a0b48e474bbd77cab557f0c30a3e569402" -dependencies = [ - "parse-zoneinfo", - "phf_codegen", -] - -[[package]] -name = "circular" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0fc239e0f6cb375d2402d48afb92f76f5404fd1df208a41930ec81eda078bea" - -[[package]] -name = "clap" -version = "4.5.39" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd60e63e9be68e5fb56422e397cf9baddded06dae1d2e523401542383bc72a9f" -dependencies = [ - "clap_builder", - "clap_derive", -] - -[[package]] -name = "clap_builder" -version = "4.5.39" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89cc6392a1f72bbeb820d71f32108f61fdaf18bc526e1d23954168a67759ef51" -dependencies = [ - "anstream", - "anstyle", - "clap_lex", - "strsim", -] - -[[package]] -name = "clap_derive" -version = "4.5.32" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09176aae279615badda0765c0c0b3f6ed53f4709118af73cf4655d85d1530cd7" -dependencies = [ - "heck", - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "clap_lex" -version = "0.7.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f46ad14479a25103f283c0f10005961cf086d8dc42205bb44c46ac563475dca6" - -[[package]] -name = "colorchoice" -version = "1.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b63caa9aa9397e2d9480a9b13673856c78d8ac123288526c37d7839f2a86990" - -[[package]] -name = "core-foundation" -version = "0.10.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2a6cd9ae233e7f62ba4e9353e81a88df7fc8a5987b8d445b4d90c879bd156f6" -dependencies = [ - "core-foundation-sys", - "libc", -] - -[[package]] -name = "core-foundation-sys" -version = "0.8.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" - -[[package]] -name = "darling" -version = "0.20.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc7f46116c46ff9ab3eb1597a45688b6715c6e628b5c133e288e709a29bcb4ee" -dependencies = [ - "darling_core", - "darling_macro", -] - -[[package]] -name = "darling_core" -version = "0.20.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d00b9596d185e565c2207a0b01f8bd1a135483d02d9b7b0a54b11da8d53412e" -dependencies = [ - "fnv", - "ident_case", - "proc-macro2", - "quote", - "strsim", - "syn", -] - -[[package]] -name = "darling_macro" -version = "0.20.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc34b93ccb385b40dc71c6fceac4b2ad23662c7eeb248cf10d529b7e055b6ead" -dependencies = [ - "darling_core", - "quote", - "syn", -] - -[[package]] -name = "derive_builder" -version = "0.20.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "507dfb09ea8b7fa618fcf76e953f4f5e192547945816d5358edffe39f6f94947" -dependencies = [ - "derive_builder_macro", -] - -[[package]] -name = "derive_builder_core" -version = "0.20.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d5bcf7b024d6835cfb3d473887cd966994907effbe9227e8c8219824d06c4e8" -dependencies = [ - "darling", - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "derive_builder_macro" -version = "0.20.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab63b0e2bf4d5928aff72e83a7dace85d7bba5fe12dcc3c5a572d78caffd3f3c" -dependencies = [ - "derive_builder_core", - "syn", -] - -[[package]] -name = "dlt-core" -version = "0.20.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3360c83b1e02a2543d44fa9ba640f0199c43bcde51abd7fa113f1a25d11f17a1" -dependencies = [ - "byteorder", - "bytes", - "futures", - "log", - "memchr", - "nom", - "quick-xml 0.29.0", - "rustc-hash", - "serde", - "serde_json", - "thiserror 1.0.69", -] - -[[package]] -name = "either" -version = "1.15.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "48c757948c5ede0e46177b7add2e67155f70e33c07fea8284df6576da70b3719" - -[[package]] -name = "encoding_rs" -version = "0.8.35" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75030f3c4f45dafd7586dd6780965a8c7e8e285a5ecb86713e63a79c5b2766f3" -dependencies = [ - "cfg-if", -] - -[[package]] -name = "encoding_rs_io" -version = "0.1.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1cc3c5651fb62ab8aa3103998dade57efdd028544bd300516baa31840c252a83" -dependencies = [ - "encoding_rs", -] - -[[package]] -name = "env_home" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7f84e12ccf0a7ddc17a6c41c93326024c42920d7ee630d04950e6926645c0fe" - -[[package]] -name = "errno" -version = "0.3.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb" -dependencies = [ - "libc", - "windows-sys 0.59.0", -] - -[[package]] -name = "etherparse" -version = "0.16.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8d8a704b617484e9d867a0423cd45f7577f008c4068e2e33378f8d3860a6d73" -dependencies = [ - "arrayvec", -] - -[[package]] -name = "extend" -version = "0.1.0" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "fnv" -version = "1.0.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" - -[[package]] -name = "futures" -version = "0.3.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "65bc07b1a8bc7c85c5f2e110c476c7389b4554ba72af57d8445ea63a576b0876" -dependencies = [ - "futures-channel", - "futures-core", - "futures-executor", - "futures-io", - "futures-sink", - "futures-task", - "futures-util", -] - -[[package]] -name = "futures-channel" -version = "0.3.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2dff15bf788c671c1934e366d07e30c1814a8ef514e1af724a602e8a2fbe1b10" -dependencies = [ - "futures-core", - "futures-sink", -] - -[[package]] -name = "futures-core" -version = "0.3.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e" - -[[package]] -name = "futures-executor" -version = "0.3.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e28d1d997f585e54aebc3f97d39e72338912123a67330d723fdbb564d646c9f" -dependencies = [ - "futures-core", - "futures-task", - "futures-util", -] - -[[package]] -name = "futures-io" -version = "0.3.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e5c1b78ca4aae1ac06c48a526a655760685149f0d465d21f37abfe57ce075c6" - -[[package]] -name = "futures-macro" -version = "0.3.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "futures-sink" -version = "0.3.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e575fab7d1e0dcb8d0c7bcf9a63ee213816ab51902e6d244a95819acacf1d4f7" - -[[package]] -name = "futures-task" -version = "0.3.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f90f7dce0722e95104fcb095585910c0977252f286e354b5e3bd38902cd99988" - -[[package]] -name = "futures-util" -version = "0.3.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fa08315bb612088cc391249efdc3bc77536f16c91f6cf495e6fbe85b20a4a81" -dependencies = [ - "futures-channel", - "futures-core", - "futures-io", - "futures-macro", - "futures-sink", - "futures-task", - "memchr", - "pin-project-lite", - "pin-utils", - "slab", -] - -[[package]] -name = "getrandom" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26145e563e54f2cadc477553f1ec5ee650b00862f0a58bcd12cbdc5f0ea2d2f4" -dependencies = [ - "cfg-if", - "libc", - "r-efi", - "wasi 0.14.2+wasi-0.2.4", -] - -[[package]] -name = "gimli" -version = "0.31.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07e28edb80900c19c28f1072f2e8aeca7fa06b23cd4169cefe1af5aa3260783f" - -[[package]] -name = "grep-matcher" -version = "0.1.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "47a3141a10a43acfedc7c98a60a834d7ba00dfe7bec9071cbfc19b55b292ac02" -dependencies = [ - "memchr", -] - -[[package]] -name = "grep-regex" -version = "0.1.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9edd147c7e3296e7a26bd3a81345ce849557d5a8e48ed88f736074e760f91f7e" -dependencies = [ - "bstr", - "grep-matcher", - "log", - "regex-automata", - "regex-syntax", -] - -[[package]] -name = "grep-searcher" -version = "0.1.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9b6c14b3fc2e0a107d6604d3231dec0509e691e62447104bc385a46a7892cda" -dependencies = [ - "bstr", - "encoding_rs", - "encoding_rs_io", - "grep-matcher", - "log", - "memchr", - "memmap2", -] - -[[package]] -name = "hashbrown" -version = "0.15.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "84b26c544d002229e640969970a2e74021aadf6e2f96372b9c58eff97de08eb3" - -[[package]] -name = "heck" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" - -[[package]] -name = "iana-time-zone" -version = "0.1.63" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0c919e5debc312ad217002b8048a17b7d83f80703865bbfcfebb0458b0b27d8" -dependencies = [ - "android_system_properties", - "core-foundation-sys", - "iana-time-zone-haiku", - "js-sys", - "log", - "wasm-bindgen", - "windows-core", -] - -[[package]] -name = "iana-time-zone-haiku" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f" -dependencies = [ - "cc", -] - -[[package]] -name = "ident_case" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" - -[[package]] -name = "indexer_base" -version = "4.0.0-alpha.1" -dependencies = [ - "log", - "serde", - "thiserror 2.0.12", -] - -[[package]] -name = "io-kit-sys" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "617ee6cf8e3f66f3b4ea67a4058564628cde41901316e19f559e14c7c72c5e7b" -dependencies = [ - "core-foundation-sys", - "mach2", -] - -[[package]] -name = "is_terminal_polyfill" -version = "1.70.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7943c866cc5cd64cbc25b2e01621d07fa8eb2a1a23160ee81ce38704e97b8ecf" - -[[package]] -name = "itertools" -version = "0.14.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b192c782037fadd9cfa75548310488aabdbf3d2da73885b31bd0abd03351285" -dependencies = [ - "either", -] - -[[package]] -name = "itoa" -version = "1.0.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a5f13b858c8d314ee3e8f639011f7ccefe71f97f96e50151fb991f267928e2c" - -[[package]] -name = "js-sys" -version = "0.3.77" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1cfaf33c695fc6e08064efbc1f72ec937429614f25eef83af942d0e227c3a28f" -dependencies = [ - "once_cell", - "wasm-bindgen", -] - -[[package]] -name = "lazy_static" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" - -[[package]] -name = "libc" -version = "0.2.180" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bcc35a38544a891a5f7c865aca548a982ccb3b8650a5b06d0fd33a10283c56fc" - -[[package]] -name = "linux-raw-sys" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df1d3c3b53da64cf5760482273a98e575c651a67eec7f77df96b5b642de8f039" - -[[package]] -name = "lock_api" -version = "0.4.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96936507f153605bddfcda068dd804796c84324ed2510809e5b2a624c81da765" -dependencies = [ - "autocfg", - "scopeguard", -] - -[[package]] -name = "log" -version = "0.4.27" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13dc2df351e3202783a1fe0d44375f7295ffb4049267b0f3018346dc122a1d94" - -[[package]] -name = "mach2" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19b955cdeb2a02b9117f121ce63aa52d08ade45de53e48fe6a38b39c10f6f709" -dependencies = [ - "libc", -] - -[[package]] -name = "memchr" -version = "2.7.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" - -[[package]] -name = "memmap2" -version = "0.9.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "843a98750cd611cc2965a8213b53b43e715f13c37a9e096c6408e69990961db7" -dependencies = [ - "libc", -] - -[[package]] -name = "minimal-lexical" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" - -[[package]] -name = "miniz_oxide" -version = "0.8.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3be647b768db090acb35d5ec5db2b0e1f1de11133ca123b9eacf5137868f892a" -dependencies = [ - "adler2", -] - -[[package]] -name = "mio" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78bed444cc8a2160f01cbcf811ef18cac863ad68ae8ca62092e8db51d51c761c" -dependencies = [ - "libc", - "log", - "wasi 0.11.0+wasi-snapshot-preview1", - "windows-sys 0.59.0", -] - -[[package]] -name = "mio-serial" -version = "5.0.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "029e1f407e261176a983a6599c084efd322d9301028055c87174beac71397ba3" -dependencies = [ - "log", - "mio", - "nix 0.29.0", - "serialport", - "winapi", -] - -[[package]] -name = "nix" -version = "0.26.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "598beaf3cc6fdd9a5dfb1630c2800c7acd31df7aaf0f565796fba2b53ca1af1b" -dependencies = [ - "bitflags 1.3.2", - "cfg-if", - "libc", -] - -[[package]] -name = "nix" -version = "0.29.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "71e2746dc3a24dd78b3cfcb7be93368c6de9963d30f43a6a73998a9cf4b17b46" -dependencies = [ - "bitflags 2.9.1", - "cfg-if", - "cfg_aliases", - "libc", -] - -[[package]] -name = "nom" -version = "7.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a" -dependencies = [ - "memchr", - "minimal-lexical", -] - -[[package]] -name = "num-traits" -version = "0.2.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" -dependencies = [ - "autocfg", -] - -[[package]] -name = "object" -version = "0.36.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62948e14d923ea95ea2c7c86c71013138b66525b86bdc08d2dcc262bdb497b87" -dependencies = [ - "memchr", -] - -[[package]] -name = "once_cell" -version = "1.21.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d" - -[[package]] -name = "once_cell_polyfill" -version = "1.70.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4895175b425cb1f87721b59f0f286c2092bd4af812243672510e1ac53e2e0ad" - -[[package]] -name = "parking_lot" -version = "0.12.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70d58bf43669b5795d1576d0641cfb6fbb2057bf629506267a92807158584a13" -dependencies = [ - "lock_api", - "parking_lot_core", -] - -[[package]] -name = "parking_lot_core" -version = "0.9.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc838d2a56b5b1a6c25f55575dfc605fabb63bb2365f6c2353ef9159aa69e4a5" -dependencies = [ - "cfg-if", - "libc", - "redox_syscall", - "smallvec", - "windows-targets", -] - -[[package]] -name = "parse-zoneinfo" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f2a05b18d44e2957b88f96ba460715e295bc1d7510468a2f3d3b44535d26c24" -dependencies = [ - "regex", -] - -[[package]] -name = "parsers" -version = "4.0.0-alpha.1" -dependencies = [ - "byteorder", - "chrono", - "chrono-tz", - "dlt-core", - "lazy_static", - "log", - "memchr", - "rand 0.9.1", - "regex", - "serde", - "someip-messages", - "someip-payload", - "someip-tools", - "thiserror 2.0.12", -] - -[[package]] -name = "pcap-parser" -version = "0.16.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f8d57cc6bdf76d7abd6d3cc1113278047dab29c2ff6d97190e8d1c29d4efdac" -dependencies = [ - "circular", - "nom", - "rusticata-macros", -] - -[[package]] -name = "phf" -version = "0.11.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fd6780a80ae0c52cc120a26a1a42c1ae51b247a253e4e06113d23d2c2edd078" -dependencies = [ - "phf_shared", -] - -[[package]] -name = "phf_codegen" -version = "0.11.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aef8048c789fa5e851558d709946d6d79a8ff88c0440c587967f8e94bfb1216a" -dependencies = [ - "phf_generator", - "phf_shared", -] - -[[package]] -name = "phf_generator" -version = "0.11.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c80231409c20246a13fddb31776fb942c38553c51e871f8cbd687a4cfb5843d" -dependencies = [ - "phf_shared", - "rand 0.8.5", -] - -[[package]] -name = "phf_shared" -version = "0.11.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67eabc2ef2a60eb7faa00097bd1ffdb5bd28e62bf39990626a582201b7a754e5" -dependencies = [ - "siphasher", -] - -[[package]] -name = "pin-project-lite" -version = "0.2.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b3cff922bd51709b605d9ead9aa71031d81447142d828eb4a6eba76fe619f9b" - -[[package]] -name = "pin-utils" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" - -[[package]] -name = "ppv-lite86" -version = "0.2.21" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85eae3c4ed2f50dcfe72643da4befc30deadb458a9b590d720cde2f2b1e97da9" -dependencies = [ - "zerocopy", -] - -[[package]] -name = "proc-macro2" -version = "1.0.95" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02b3e5e68a3a1a02aad3ec490a98007cbc13c37cbe84a3cd7b8e406d76e7f778" -dependencies = [ - "unicode-ident", -] - -[[package]] -name = "processor" -version = "4.0.0-alpha.1" -dependencies = [ - "bincode", - "bufread", - "bytecount", - "futures", - "grep-regex", - "grep-searcher", - "indexer_base", - "itertools", - "lazy_static", - "log", - "parsers", - "regex", - "serde", - "serde_json", - "sources", - "stypes", - "text_grep", - "thiserror 2.0.12", - "tokio-util", -] - -[[package]] -name = "quick-xml" -version = "0.23.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11bafc859c6815fbaffbbbf4229ecb767ac913fecb27f9ad4343662e9ef099ea" -dependencies = [ - "memchr", -] - -[[package]] -name = "quick-xml" -version = "0.29.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81b9228215d82c7b61490fec1de287136b5de6f5700f6e58ea9ad61a7964ca51" -dependencies = [ - "memchr", -] - -[[package]] -name = "quote" -version = "1.0.40" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1885c039570dc00dcb4ff087a89e185fd56bae234ddc7f056a945bf36467248d" -dependencies = [ - "proc-macro2", -] - -[[package]] -name = "r-efi" -version = "5.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74765f6d916ee2faa39bc8e68e4f3ed8949b48cccdac59983d287a7cb71ce9c5" - -[[package]] -name = "rand" -version = "0.8.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" -dependencies = [ - "rand_core 0.6.4", -] - -[[package]] -name = "rand" -version = "0.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fbfd9d094a40bf3ae768db9361049ace4c0e04a4fd6b359518bd7b73a73dd97" -dependencies = [ - "rand_chacha", - "rand_core 0.9.3", -] - -[[package]] -name = "rand_chacha" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3022b5f1df60f26e1ffddd6c66e8aa15de382ae63b3a0c1bfc0e4d3e3f325cb" -dependencies = [ - "ppv-lite86", - "rand_core 0.9.3", -] - -[[package]] -name = "rand_core" -version = "0.6.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" - -[[package]] -name = "rand_core" -version = "0.9.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "99d9a13982dcf210057a8a78572b2217b667c3beacbf3a0d8b454f6f82837d38" -dependencies = [ - "getrandom", -] - -[[package]] -name = "redox_syscall" -version = "0.5.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "928fca9cf2aa042393a8325b9ead81d2f0df4cb12e1e24cef072922ccd99c5af" -dependencies = [ - "bitflags 2.9.1", -] - -[[package]] -name = "regex" -version = "1.11.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b544ef1b4eac5dc2db33ea63606ae9ffcfac26c1416a2806ae0bf5f56b201191" -dependencies = [ - "aho-corasick", - "memchr", - "regex-automata", - "regex-syntax", -] - -[[package]] -name = "regex-automata" -version = "0.4.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "809e8dc61f6de73b46c85f4c96486310fe304c434cfa43669d7b40f711150908" -dependencies = [ - "aho-corasick", - "memchr", - "regex-syntax", -] - -[[package]] -name = "regex-syntax" -version = "0.8.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" - -[[package]] -name = "rustc-demangle" -version = "0.1.24" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f" - -[[package]] -name = "rustc-hash" -version = "2.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "357703d41365b4b27c590e3ed91eabb1b663f07c4c084095e60cbed4362dff0d" - -[[package]] -name = "rusticata-macros" -version = "4.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "faf0c4a6ece9950b9abdb62b1cfcf2a68b3b67a10ba445b3bb85be2a293d0632" -dependencies = [ - "nom", -] - -[[package]] -name = "rustix" -version = "1.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "146c9e247ccc180c1f61615433868c99f3de3ae256a30a43b49f67c2d9171f34" -dependencies = [ - "bitflags 2.9.1", - "errno", - "libc", - "linux-raw-sys", - "windows-sys 0.59.0", -] - -[[package]] -name = "rustversion" -version = "1.0.21" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a0d197bd2c9dc6e53b84da9556a69ba4cdfab8619eb41a8bd1cc2027a0f6b1d" - -[[package]] -name = "ryu" -version = "1.0.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28d3b2b1366ec20994f1fd18c3c594f05c5dd4bc44d8bb0c1c632c8d6829481f" - -[[package]] -name = "same-file" -version = "1.0.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" -dependencies = [ - "winapi-util", -] - -[[package]] -name = "scopeguard" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" - -[[package]] -name = "serde" -version = "1.0.219" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f0e2c6ed6606019b4e29e69dbaba95b11854410e5347d525002456dbbb786b6" -dependencies = [ - "serde_derive", -] - -[[package]] -name = "serde_derive" -version = "1.0.219" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b0276cf7f2c73365f7157c8123c21cd9a50fbbd844757af28ca1f5925fc2a00" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "serde_json" -version = "1.0.140" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "20068b6e96dc6c9bd23e01df8827e6c7e1f2fddd43c21810382803c136b99373" -dependencies = [ - "itoa", - "memchr", - "ryu", - "serde", -] - -[[package]] -name = "serialport" -version = "4.7.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cdb0bc984f6af6ef8bab54e6cf2071579ee75b9286aa9f2319a0d220c28b0a2b" -dependencies = [ - "bitflags 2.9.1", - "cfg-if", - "core-foundation", - "core-foundation-sys", - "io-kit-sys", - "mach2", - "nix 0.26.4", - "scopeguard", - "unescaper", - "winapi", -] - -[[package]] -name = "shell-tools" -version = "0.1.0" -dependencies = [ - "log", - "stypes", - "which", -] - -[[package]] -name = "shlex" -version = "1.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" - -[[package]] -name = "signal-hook-registry" -version = "1.4.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9203b8055f63a2a00e2f593bb0510367fe707d7ff1e5c872de2f537b339e5410" -dependencies = [ - "libc", -] - -[[package]] -name = "siphasher" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56199f7ddabf13fe5074ce809e7d3f42b42ae711800501b5b16ea82ad029c39d" - -[[package]] -name = "slab" -version = "0.4.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67" -dependencies = [ - "autocfg", -] - -[[package]] -name = "smallvec" -version = "1.15.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8917285742e9f3e1683f0a9c4e6b57960b7314d0b08d30d1ecd426713ee2eee9" - -[[package]] -name = "socket2" -version = "0.5.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e22376abed350d73dd1cd119b57ffccad95b4e585a7cda43e286245ce23c0678" -dependencies = [ - "libc", - "windows-sys 0.52.0", -] - -[[package]] -name = "someip-messages" -version = "0.3.1" -source = "git+https://github.com/esrlabs/someip#59b27a6689d72948c4569bc6037c2387c1a661ed" -dependencies = [ - "byteorder", - "derive_builder", - "thiserror 1.0.69", -] - -[[package]] -name = "someip-payload" -version = "0.1.5" -source = "git+https://github.com/esrlabs/someip-payload?rev=b9aa52c96fcbdb0e5aa1ee5258299f0ff7e3a094#b9aa52c96fcbdb0e5aa1ee5258299f0ff7e3a094" -dependencies = [ - "byteorder", - "log", - "quick-xml 0.23.1", - "regex", - "thiserror 1.0.69", - "ux", - "voca_rs", -] - -[[package]] -name = "someip-tools" -version = "4.0.0-alpha.1" -dependencies = [ - "nom", - "thiserror 2.0.12", -] - -[[package]] -name = "sources" -version = "4.0.0-alpha.1" -dependencies = [ - "bufread", - "bytes", - "etherparse", - "futures", - "log", - "pcap-parser", - "serde", - "shell-tools", - "socket2", - "stypes", - "thiserror 2.0.12", - "tokio", - "tokio-serial", - "tokio-stream", - "tokio-util", - "uuid", -] - -[[package]] -name = "stfu8" -version = "0.2.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e51f1e89f093f99e7432c491c382b88a6860a5adbe6bf02574bf0a08efff1978" - -[[package]] -name = "strsim" -version = "0.11.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" - -[[package]] -name = "stypes" -version = "4.0.0-alpha.1" -dependencies = [ - "anyhow", - "bincode", - "dlt-core", - "extend", - "serde", - "thiserror 2.0.12", - "tokio", - "uuid", - "walkdir", -] - -[[package]] -name = "syn" -version = "2.0.101" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ce2b7fc941b3a24138a0a7cf8e858bfc6a992e7978a068a5c760deb0ed43caf" -dependencies = [ - "proc-macro2", - "quote", - "unicode-ident", -] - -[[package]] -name = "text_grep" -version = "4.0.0-alpha.1" -dependencies = [ - "bufread", - "grep-regex", - "grep-searcher", - "regex", - "thiserror 2.0.12", - "tokio", - "tokio-util", -] - -[[package]] -name = "thiserror" -version = "1.0.69" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52" -dependencies = [ - "thiserror-impl 1.0.69", -] - -[[package]] -name = "thiserror" -version = "2.0.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "567b8a2dae586314f7be2a752ec7474332959c6460e02bde30d702a66d488708" -dependencies = [ - "thiserror-impl 2.0.12", -] - -[[package]] -name = "thiserror-impl" -version = "1.0.69" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "thiserror-impl" -version = "2.0.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f7cf42b4507d8ea322120659672cf1b9dbb93f8f2d4ecfd6e51350ff5b17a1d" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "tokio" -version = "1.45.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75ef51a33ef1da925cea3e4eb122833cb377c61439ca401b770f54902b806779" -dependencies = [ - "backtrace", - "bytes", - "libc", - "mio", - "parking_lot", - "pin-project-lite", - "signal-hook-registry", - "socket2", - "tokio-macros", - "windows-sys 0.52.0", -] - -[[package]] -name = "tokio-macros" -version = "2.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e06d43f1345a3bcd39f6a56dbb7dcab2ba47e68e8ac134855e7e2bdbaf8cab8" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "tokio-serial" -version = "5.4.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa1d5427f11ba7c5e6384521cfd76f2d64572ff29f3f4f7aa0f496282923fdc8" -dependencies = [ - "cfg-if", - "futures", - "log", - "mio-serial", - "serialport", - "tokio", -] - -[[package]] -name = "tokio-stream" -version = "0.1.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eca58d7bba4a75707817a2c44174253f9236b2d5fbd055602e9d5c07c139a047" -dependencies = [ - "futures-core", - "pin-project-lite", - "tokio", -] - -[[package]] -name = "tokio-util" -version = "0.7.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "66a539a9ad6d5d281510d5bd368c973d636c02dbf8a67300bfb6b950696ad7df" -dependencies = [ - "bytes", - "futures-core", - "futures-io", - "futures-sink", - "futures-util", - "hashbrown", - "pin-project-lite", - "slab", - "tokio", -] - -[[package]] -name = "unescaper" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c01d12e3a56a4432a8b436f293c25f4808bdf9e9f9f98f9260bba1f1bc5a1f26" -dependencies = [ - "thiserror 2.0.12", -] - -[[package]] -name = "unicode-ident" -version = "1.0.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a5f39404a5da50712a4c1eecf25e90dd62b613502b7e925fd4e4d19b5c96512" - -[[package]] -name = "unicode-segmentation" -version = "1.12.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6ccf251212114b54433ec949fd6a7841275f9ada20dddd2f29e9ceea4501493" - -[[package]] -name = "utf8parse" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" - -[[package]] -name = "uuid" -version = "1.17.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3cf4199d1e5d15ddd86a694e4d0dffa9c323ce759fea589f00fef9d81cc1931d" -dependencies = [ - "getrandom", - "js-sys", - "serde", - "wasm-bindgen", -] - -[[package]] -name = "ux" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b59fc5417e036e53226bbebd90196825d358624fd5577432c4e486c95b1b096" - -[[package]] -name = "voca_rs" -version = "1.15.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e44efbf25e32768d5ecd22244feacc3d3b3eca72d318f5ef0a4764c2c158e18" -dependencies = [ - "regex", - "stfu8", - "unicode-segmentation", -] - -[[package]] -name = "walkdir" -version = "2.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29790946404f91d9c5d06f9874efddea1dc06c5efe94541a7d6863108e3a5e4b" -dependencies = [ - "same-file", - "winapi-util", -] - -[[package]] -name = "wasi" -version = "0.11.0+wasi-snapshot-preview1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" - -[[package]] -name = "wasi" -version = "0.14.2+wasi-0.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9683f9a5a998d873c0d21fcbe3c083009670149a8fab228644b8bd36b2c48cb3" -dependencies = [ - "wit-bindgen-rt", -] - -[[package]] -name = "wasm-bindgen" -version = "0.2.100" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1edc8929d7499fc4e8f0be2262a241556cfc54a0bea223790e71446f2aab1ef5" -dependencies = [ - "cfg-if", - "once_cell", - "rustversion", - "wasm-bindgen-macro", -] - -[[package]] -name = "wasm-bindgen-backend" -version = "0.2.100" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f0a0651a5c2bc21487bde11ee802ccaf4c51935d0d3d42a6101f98161700bc6" -dependencies = [ - "bumpalo", - "log", - "proc-macro2", - "quote", - "syn", - "wasm-bindgen-shared", -] - -[[package]] -name = "wasm-bindgen-macro" -version = "0.2.100" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fe63fc6d09ed3792bd0897b314f53de8e16568c2b3f7982f468c0bf9bd0b407" -dependencies = [ - "quote", - "wasm-bindgen-macro-support", -] - -[[package]] -name = "wasm-bindgen-macro-support" -version = "0.2.100" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ae87ea40c9f689fc23f209965b6fb8a99ad69aeeb0231408be24920604395de" -dependencies = [ - "proc-macro2", - "quote", - "syn", - "wasm-bindgen-backend", - "wasm-bindgen-shared", -] - -[[package]] -name = "wasm-bindgen-shared" -version = "0.2.100" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a05d73b933a847d6cccdda8f838a22ff101ad9bf93e33684f39c1f5f0eece3d" -dependencies = [ - "unicode-ident", -] - -[[package]] -name = "which" -version = "8.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3fabb953106c3c8eea8306e4393700d7657561cb43122571b172bbfb7c7ba1d" -dependencies = [ - "env_home", - "rustix", - "winsafe", -] - -[[package]] -name = "winapi" -version = "0.3.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" -dependencies = [ - "winapi-i686-pc-windows-gnu", - "winapi-x86_64-pc-windows-gnu", -] - -[[package]] -name = "winapi-i686-pc-windows-gnu" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" - -[[package]] -name = "winapi-util" -version = "0.1.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb" -dependencies = [ - "windows-sys 0.59.0", -] - -[[package]] -name = "winapi-x86_64-pc-windows-gnu" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" - -[[package]] -name = "windows-core" -version = "0.61.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0fdd3ddb90610c7638aa2b3a3ab2904fb9e5cdbecc643ddb3647212781c4ae3" -dependencies = [ - "windows-implement", - "windows-interface", - "windows-link", - "windows-result", - "windows-strings", -] - -[[package]] -name = "windows-implement" -version = "0.60.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a47fddd13af08290e67f4acabf4b459f647552718f683a7b415d290ac744a836" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "windows-interface" -version = "0.59.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd9211b69f8dcdfa817bfd14bf1c97c9188afa36f4750130fcdf3f400eca9fa8" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "windows-link" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76840935b766e1b0a05c0066835fb9ec80071d4c09a16f6bd5f7e655e3c14c38" - -[[package]] -name = "windows-result" -version = "0.3.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56f42bd332cc6c8eac5af113fc0c1fd6a8fd2aa08a0119358686e5160d0586c6" -dependencies = [ - "windows-link", -] - -[[package]] -name = "windows-strings" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56e6c93f3a0c3b36176cb1327a4958a0353d5d166c2a35cb268ace15e91d3b57" -dependencies = [ - "windows-link", -] - -[[package]] -name = "windows-sys" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" -dependencies = [ - "windows-targets", -] - -[[package]] -name = "windows-sys" -version = "0.59.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" -dependencies = [ - "windows-targets", -] - -[[package]] -name = "windows-targets" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" -dependencies = [ - "windows_aarch64_gnullvm", - "windows_aarch64_msvc", - "windows_i686_gnu", - "windows_i686_gnullvm", - "windows_i686_msvc", - "windows_x86_64_gnu", - "windows_x86_64_gnullvm", - "windows_x86_64_msvc", -] - -[[package]] -name = "windows_aarch64_gnullvm" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" - -[[package]] -name = "windows_aarch64_msvc" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" - -[[package]] -name = "windows_i686_gnu" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" - -[[package]] -name = "windows_i686_gnullvm" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" - -[[package]] -name = "windows_i686_msvc" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" - -[[package]] -name = "windows_x86_64_gnu" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" - -[[package]] -name = "windows_x86_64_gnullvm" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" - -[[package]] -name = "windows_x86_64_msvc" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" - -[[package]] -name = "winsafe" -version = "0.0.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d135d17ab770252ad95e9a872d365cf3090e3be864a34ab46f48555993efc904" - -[[package]] -name = "wit-bindgen-rt" -version = "0.39.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f42320e61fe2cfd34354ecb597f86f413484a798ba44a8ca1165c58d42da6c1" -dependencies = [ - "bitflags 2.9.1", -] - -[[package]] -name = "zerocopy" -version = "0.8.25" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1702d9583232ddb9174e01bb7c15a2ab8fb1bc6f227aa1233858c351a3ba0cb" -dependencies = [ - "zerocopy-derive", -] - -[[package]] -name = "zerocopy-derive" -version = "0.8.25" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28a6e20d751156648aa063f3800b706ee209a32c0b4d9f24be3d980b01be55ef" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] diff --git a/cli/chipmunk-cli/Cargo.toml b/cli/chipmunk-cli/Cargo.toml deleted file mode 100644 index 71359efea9..0000000000 --- a/cli/chipmunk-cli/Cargo.toml +++ /dev/null @@ -1,18 +0,0 @@ -[package] -name = "chipmunk-cli" -version = "0.2.2" -authors = ["Ammar Abou Zor "] -edition = "2024" -description = "CLI Tool for parsing bytes form different source supporting multiple data formats" -documentation = "README.md" -readme = "README.md" - -[dependencies] -anyhow = "1.0" -clap = { version = "4.5", features = ["derive"] } -tokio = { version = "1.45", features = ["full"] } -parsers = {path = "../../application/apps/indexer/parsers"} -sources = {path = "../../application/apps/indexer/sources"} -processor = {path = "../../application/apps/indexer/processor"} -futures = "0.3" -tokio-util = "0.7" diff --git a/cli/development-cli/.dockerignore b/cli/development-cli/.dockerignore deleted file mode 100644 index 395665b2c5..0000000000 --- a/cli/development-cli/.dockerignore +++ /dev/null @@ -1,14 +0,0 @@ -# .gitignore content -/target -**/*.rs.bk -*.out -lineMetadata.json -vim-markdown-preview.html -.DS_Store - -# Markdown files -*.md - -# Python integration tests aren't needed since we are copying -# the content for building the tool in the docker image only. -/integration_tests diff --git a/cli/development-cli/.gitignore b/cli/development-cli/.gitignore deleted file mode 100644 index e9a83dd15c..0000000000 --- a/cli/development-cli/.gitignore +++ /dev/null @@ -1,6 +0,0 @@ -/target -**/*.rs.bk -*.out -lineMetadata.json -vim-markdown-preview.html -.DS_Store diff --git a/cli/development-cli/CHANGELOG.md b/cli/development-cli/CHANGELOG.md deleted file mode 100644 index 5f0a63a062..0000000000 --- a/cli/development-cli/CHANGELOG.md +++ /dev/null @@ -1,232 +0,0 @@ -# 0.5.4 - -## Changed: - -* Run Typescript tests in parallel after removing shell tests - -# 0.5.3 - -## Added: - -* Custom platform name via command line argument. -* Write metadata file once custom platform is provided. - -# 0.5.2 - -## Fixes: - -* Remove short-form CLI arguments for skipping environment checks to prevent conflicts with other arguments. - -# 0.5.1 - -## Changes: - -* Update to rust edition 2024. - -# 0.5.0 - -## Changes: - -* Include Plugin API target & related functionality and tests. - -# 0.4.3 - -## Added: - -* Check for minimum needed versions for external tools used in Chipmunk development. -* Option to skip environment checks via CLI argument or User configurations. - -# 0.4.2 - -## Changes: - -* Include Chipmunk CLI tool in release command. - -# 0.4.1 - -## Changes: - -* Clean command removes checksum records entirely, making it more reliable. - -# 0.4.0 - -## Changes: - -* Include Chipmunk CLI target & related functionality. -* Adjustments to the changes directories structures, including code, integration tests and documentation. - -# 0.3.1 - -## Changes: - -* List only build related jobs as dependencies allowing lint and test jobs to run in parallel. -* Add rust core as dependency for protocol and rs-bindings to ensure they will be rebuilt on changes in rust core. -* Skip build, test, lint job if any of the build related jobs of their all dependencies failed. -* Build related jobs for linting and testing can be skipped if possible. -* Remove test and lint jobs from dependencies if the targets aren't included in the original targets. -* Differentiate between finished and skipped jobs in the UI and logs. -* Stop release if any build jobs has failed + Enable fail fast on release by default. -* Add UI-Mode argument to run command. -* Always show message on mismatch build CLI versions. -* Update dependencies - -# 0.3.0 - -## Changes: - -* Include protocol related functionality - -# 0.2.14 - -## Changes: - -* Remove rust core target from build dependencies, because it's not being build directly, instead it'll be build from rs-bindings. -* Last build states keeps track of the targets involved in the last build only. - -# 0.2.13 - -## Changes: - -* Include the applied additional features in the persisted records of the last build besides the checksum of the files of each target. -* Use one file to persist the build state of the last build instead of two files. - -# 0.2.12 - -## Changes: - -* Update dependencies - -# 0.2.11 - -## Features: - -* Provide option to test command to accept snapshot tests. -* Prevent snapshot tests to generate files when the value aren't gonna be accepted. - -# 0.2.10 - -## Features: - -* Add `additional features` to both CLI arguments and user configuration to enable additional features in the build process. -* Add `custom-alloc` additional feature to enable using custom memory allocators in rs-bindings. - -## Fixes: - -* Fix UI bars unintended up movements and clearing up the messages once done. -* Keep logs indentation when printing them. - -# 0.2.9 - -## Fixes: - -* Show notarize command logs before checking its status to ensure that logs will be always printed. -* Hide credentials when printing notarize command. - -# 0.2.8 - -## Features: - -* User can configure the tool on user levels to set their preferred shell and UI mode. -* Default shell will be retrieved from environment variables in unix-based environments. - -# 0.2.7 - -## Features: - -* Add sample size CLI argument on benchmarks for rust core. - - -# 0.2.6 - -## Features: - -* Check the latest version of this tool on the local repository and compare it to the installed one. -* Add the running process commands and their current directory to the logs. - - -# 0.2.5 - -## Features: - -* Added `benchmark` commands to run benchmarks specified in a separate configuration `toml` file. - - -# 0.2.4 - -## Changes: - -* Run all commands from within the standard shell on each platform avoiding resolving the path manually and resolving some issue due to missing shell configurations. - - -# 0.2.3 - -## Changes: - -* Pick TypeScript tests based on naming conventions in specs directory instead of using hard-coded list. - -# 0.2.2 - -## Features: - -* Add custom specifications CLI argument for tests and implement it for wrapper test to enable users form running tests for a specific file. Example: - - `cargo chipmunk test wrapper -s spec/build/spec/session.jobs.spec.js`: Runs single specification. - - `cargo chipmunk test wrapper -s spec/build/spec/session.jobs.spec.js -s spec/build/spec/session.search.spec.js`: Runs multiple specifications. -* Support Code sign process on MacOS. - -## Fixes: - -* Fix dependencies to build rust core on linting and testing of binding, wrapper and app targets. - -# 0.2.1 - -## Fixes: - -* Disable skip checks for building Chipmunk while creating releases. -* Fix potential freezes if graceful shutdown fails, by forcing the app to close after a timeout of 4 seconds. - -## Changes: - -* Deactivate reinstalling TypeScript in production mode after building for local builds, keeping it for creating releases only. -* Remove `--production` from `Reset-Checksum` sub-command, resetting the scores for both environments since only one can exist at a time. - -# 0.2.0 - -## Fixes: - -* Fix dependencies between Rust core and binding targets. -* Remove false positives in the checksum records when builds run between development and production simultaneously. - This has been achieved by resetting the checksums for one environment once the other is built. -* Fix copying files between `App` and `Client` targets. -* Add missing copy command for `json.packages` after building the `App` target. - -## Changes: - -* Logs can no longer be printed to a file using CLI arguments. This can be easily achieved by piping the command output to a file from the shell directly. - -## Features: - -* Provide release sub-commands to build Chipmunk, bundle, and compress it for use within the GitHub CD pipeline. -* Provide four UI modes: - - **Bars (default):** Displays TUI progress-bars, providing logs at the end for failed jobs only. - - **Report:** Displays TUI progress-bars and provides the full logs once all jobs are done. - - **Print:** Hides TUI progress-bars, printing the logs of each job once it's done without waiting for other jobs. - - **Immediate:** Hides TUI progress-bars, printing each log immediately when produced. -* Add `fail-fast` flag to stop running jobs once one of them fails, enabled by default for the run command. -* Implement graceful shutdown to close the spawned jobs gracefully on fail-fast or when `Ctrl-C` is called. -* Add ANSI terminal colors to log reports. -* Provide documentation for all modules, generated with the command `cargo doc`. - -# 0.1.0 - -## Features: - -* Sub-commands for build, clean, lint, test, and run for Chipmunk's multiple parts. -* Resolving dependencies upfront and running tasks concurrently when possible. -* Displays the current progress via TUI progress bars. -* Provide the option to print logs after all jobs finish, with the option to write these logs to a file as well. -* Track changes in source code files by saving their checksum scores to skip jobs where no change has been detected. -* Provide CLI sub-commands to reset the checksum scores to bypass skipping the targets. -* Provide CLI sub-commands to print the dependencies in `print-dot` format for `Graphviz`. -* Provide CLI sub-command to generate shell completion for a variety of shells. -* Check build environment and provide information about it. -* Provide integration tests in a Python script, which can be used in CI checks for PRs related to this tool. diff --git a/cli/development-cli/Cargo.lock b/cli/development-cli/Cargo.lock deleted file mode 100644 index c28e439e10..0000000000 --- a/cli/development-cli/Cargo.lock +++ /dev/null @@ -1,1635 +0,0 @@ -# This file is automatically @generated by Cargo. -# It is not intended for manual editing. -version = 4 - -[[package]] -name = "aho-corasick" -version = "1.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ddd31a130427c27518df266943a5308ed92d4b226cc639f5a8f1002816174301" -dependencies = [ - "memchr", -] - -[[package]] -name = "anstream" -version = "0.6.21" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43d5b281e737544384e969a5ccad3f1cdd24b48086a0fc1b2a5262a26b8f4f4a" -dependencies = [ - "anstyle", - "anstyle-parse", - "anstyle-query", - "anstyle-wincon", - "colorchoice", - "is_terminal_polyfill", - "utf8parse", -] - -[[package]] -name = "anstyle" -version = "1.0.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5192cca8006f1fd4f7237516f40fa183bb07f8fbdfedaa0036de5ea9b0b45e78" - -[[package]] -name = "anstyle-parse" -version = "0.2.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e7644824f0aa2c7b9384579234ef10eb7efb6a0deb83f9630a49594dd9c15c2" -dependencies = [ - "utf8parse", -] - -[[package]] -name = "anstyle-query" -version = "1.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "40c48f72fd53cd289104fc64099abca73db4166ad86ea0b4341abe65af83dadc" -dependencies = [ - "windows-sys 0.61.2", -] - -[[package]] -name = "anstyle-wincon" -version = "3.0.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "291e6a250ff86cd4a820112fb8898808a366d8f9f58ce16d1f538353ad55747d" -dependencies = [ - "anstyle", - "once_cell_polyfill", - "windows-sys 0.61.2", -] - -[[package]] -name = "anyhow" -version = "1.0.100" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a23eb6b1614318a8071c9b2521f36b424b2c83db5eb3a0fead4a6c0809af6e61" - -[[package]] -name = "arrayref" -version = "0.3.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76a2e8124351fda1ef8aaaa3bbd7ebbcb486bbcd4225aca0aa0d84bb2db8fecb" - -[[package]] -name = "arrayvec" -version = "0.7.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50" - -[[package]] -name = "bitflags" -version = "2.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "812e12b5285cc515a9c72a5c1d3b6d46a19dac5acfef5265968c166106e31dd3" - -[[package]] -name = "blake3" -version = "1.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3888aaa89e4b2a40fca9848e400f6a658a5a3978de7be858e209cafa8be9a4a0" -dependencies = [ - "arrayref", - "arrayvec", - "cc", - "cfg-if", - "constant_time_eq", - "rayon-core", -] - -[[package]] -name = "bstr" -version = "1.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "63044e1ae8e69f3b5a92c736ca6269b8d12fa7efe39bf34ddb06d102cf0e2cab" -dependencies = [ - "memchr", - "serde", -] - -[[package]] -name = "bumpalo" -version = "3.19.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46c5e41b57b8bba42a04676d81cb89e9ee8e859a1a66f80a5a72e1cb76b34d43" - -[[package]] -name = "bytes" -version = "1.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b35204fbdc0b3f4446b89fc1ac2cf84a8a68971995d0bf2e925ec7cd960f9cb3" - -[[package]] -name = "cargo-chipmunk" -version = "0.5.5" -dependencies = [ - "anyhow", - "clap", - "clap_complete", - "console", - "dir_checksum", - "dirs", - "dotenvy", - "fs_extra", - "futures", - "git2", - "glob", - "indicatif", - "pretty_assertions", - "rayon", - "regex", - "serde", - "serde_json", - "tempdir", - "tokio", - "tokio-util", - "toml", -] - -[[package]] -name = "cc" -version = "1.2.49" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90583009037521a116abf44494efecd645ba48b6622457080f080b85544e2215" -dependencies = [ - "find-msvc-tools", - "jobserver", - "libc", - "shlex", -] - -[[package]] -name = "cfg-if" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801" - -[[package]] -name = "clap" -version = "4.5.53" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c9e340e012a1bf4935f5282ed1436d1489548e8f72308207ea5df0e23d2d03f8" -dependencies = [ - "clap_builder", - "clap_derive", -] - -[[package]] -name = "clap_builder" -version = "4.5.53" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d76b5d13eaa18c901fd2f7fca939fefe3a0727a953561fefdf3b2922b8569d00" -dependencies = [ - "anstream", - "anstyle", - "clap_lex", - "strsim", -] - -[[package]] -name = "clap_complete" -version = "4.5.61" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39615915e2ece2550c0149addac32fb5bd312c657f43845bb9088cb9c8a7c992" -dependencies = [ - "clap", -] - -[[package]] -name = "clap_derive" -version = "4.5.49" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a0b5487afeab2deb2ff4e03a807ad1a03ac532ff5a2cee5d86884440c7f7671" -dependencies = [ - "heck", - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "clap_lex" -version = "0.7.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1d728cc89cf3aee9ff92b05e62b19ee65a02b5702cff7d5a377e32c6ae29d8d" - -[[package]] -name = "colorchoice" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b05b61dc5112cbb17e4b6cd61790d9845d13888356391624cbe7e41efeac1e75" - -[[package]] -name = "console" -version = "0.16.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b430743a6eb14e9764d4260d4c0d8123087d504eeb9c48f2b2a5e810dd369df4" -dependencies = [ - "encode_unicode", - "libc", - "once_cell", - "unicode-width", - "windows-sys 0.61.2", -] - -[[package]] -name = "constant_time_eq" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c74b8349d32d297c9134b8c88677813a227df8f779daa29bfc29c183fe3dca6" - -[[package]] -name = "crossbeam-deque" -version = "0.8.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9dd111b7b7f7d55b72c0a6ae361660ee5853c9af73f70c3c2ef6858b950e2e51" -dependencies = [ - "crossbeam-epoch", - "crossbeam-utils", -] - -[[package]] -name = "crossbeam-epoch" -version = "0.9.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b82ac4a3c2ca9c3460964f020e1402edd5753411d7737aa39c3714ad1b5420e" -dependencies = [ - "crossbeam-utils", -] - -[[package]] -name = "crossbeam-utils" -version = "0.8.21" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0a5c400df2834b80a4c3327b3aad3a4c4cd4de0629063962b03235697506a28" - -[[package]] -name = "diff" -version = "0.1.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56254986775e3233ffa9c4d7d3faaf6d36a2c09d30b20687e9f88bc8bafc16c8" - -[[package]] -name = "dir_checksum" -version = "0.1.0" -dependencies = [ - "anyhow", - "blake3", - "ignore", - "log", - "memmap2", - "pretty_assertions", - "rayon", - "tempdir", - "thiserror", -] - -[[package]] -name = "dirs" -version = "6.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3e8aa94d75141228480295a7d0e7feb620b1a5ad9f12bc40be62411e38cce4e" -dependencies = [ - "dirs-sys", -] - -[[package]] -name = "dirs-sys" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e01a3366d27ee9890022452ee61b2b63a67e6f13f58900b651ff5665f0bb1fab" -dependencies = [ - "libc", - "option-ext", - "redox_users", - "windows-sys 0.61.2", -] - -[[package]] -name = "displaydoc" -version = "0.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "dotenvy" -version = "0.15.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1aaf95b3e5c8f23aa320147307562d361db0ae0d51242340f558153b4eb2439b" - -[[package]] -name = "either" -version = "1.15.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "48c757948c5ede0e46177b7add2e67155f70e33c07fea8284df6576da70b3719" - -[[package]] -name = "encode_unicode" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34aa73646ffb006b8f5147f3dc182bd4bcb190227ce861fc4a4844bf8e3cb2c0" - -[[package]] -name = "equivalent" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f" - -[[package]] -name = "find-msvc-tools" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3a3076410a55c90011c298b04d0cfa770b00fa04e1e3c97d3f6c9de105a03844" - -[[package]] -name = "form_urlencoded" -version = "1.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb4cb245038516f5f85277875cdaa4f7d2c9a0fa0468de06ed190163b1581fcf" -dependencies = [ - "percent-encoding", -] - -[[package]] -name = "fs_extra" -version = "1.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42703706b716c37f96a77aea830392ad231f44c9e9a67872fa5548707e11b11c" - -[[package]] -name = "fuchsia-cprng" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a06f77d526c1a601b7c4cdd98f54b5eaabffc14d5f2f0296febdc7f357c6d3ba" - -[[package]] -name = "futures" -version = "0.3.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "65bc07b1a8bc7c85c5f2e110c476c7389b4554ba72af57d8445ea63a576b0876" -dependencies = [ - "futures-channel", - "futures-core", - "futures-executor", - "futures-io", - "futures-sink", - "futures-task", - "futures-util", -] - -[[package]] -name = "futures-channel" -version = "0.3.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2dff15bf788c671c1934e366d07e30c1814a8ef514e1af724a602e8a2fbe1b10" -dependencies = [ - "futures-core", - "futures-sink", -] - -[[package]] -name = "futures-core" -version = "0.3.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e" - -[[package]] -name = "futures-executor" -version = "0.3.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e28d1d997f585e54aebc3f97d39e72338912123a67330d723fdbb564d646c9f" -dependencies = [ - "futures-core", - "futures-task", - "futures-util", -] - -[[package]] -name = "futures-io" -version = "0.3.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e5c1b78ca4aae1ac06c48a526a655760685149f0d465d21f37abfe57ce075c6" - -[[package]] -name = "futures-macro" -version = "0.3.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "futures-sink" -version = "0.3.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e575fab7d1e0dcb8d0c7bcf9a63ee213816ab51902e6d244a95819acacf1d4f7" - -[[package]] -name = "futures-task" -version = "0.3.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f90f7dce0722e95104fcb095585910c0977252f286e354b5e3bd38902cd99988" - -[[package]] -name = "futures-util" -version = "0.3.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fa08315bb612088cc391249efdc3bc77536f16c91f6cf495e6fbe85b20a4a81" -dependencies = [ - "futures-channel", - "futures-core", - "futures-io", - "futures-macro", - "futures-sink", - "futures-task", - "memchr", - "pin-project-lite", - "pin-utils", - "slab", -] - -[[package]] -name = "getrandom" -version = "0.2.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "335ff9f135e4384c8150d6f27c6daed433577f86b4750418338c01a1a2528592" -dependencies = [ - "cfg-if", - "libc", - "wasi", -] - -[[package]] -name = "getrandom" -version = "0.3.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "899def5c37c4fd7b2664648c28120ecec138e4d395b459e5ca34f9cce2dd77fd" -dependencies = [ - "cfg-if", - "libc", - "r-efi", - "wasip2", -] - -[[package]] -name = "git2" -version = "0.20.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e2b37e2f62729cdada11f0e6b3b6fe383c69c29fc619e391223e12856af308c" -dependencies = [ - "bitflags", - "libc", - "libgit2-sys", - "log", - "url", -] - -[[package]] -name = "glob" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0cc23270f6e1808e30a928bdc84dea0b9b4136a8bc82338574f23baf47bbd280" - -[[package]] -name = "globset" -version = "0.4.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52dfc19153a48bde0cbd630453615c8151bce3a5adfac7a0aebfbf0a1e1f57e3" -dependencies = [ - "aho-corasick", - "bstr", - "log", - "regex-automata", - "regex-syntax", -] - -[[package]] -name = "hashbrown" -version = "0.16.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "841d1cc9bed7f9236f321df977030373f4a4163ae1a7dbfe1a51a2c1a51d9100" - -[[package]] -name = "heck" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" - -[[package]] -name = "icu_collections" -version = "2.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c6b649701667bbe825c3b7e6388cb521c23d88644678e83c0c4d0a621a34b43" -dependencies = [ - "displaydoc", - "potential_utf", - "yoke", - "zerofrom", - "zerovec", -] - -[[package]] -name = "icu_locale_core" -version = "2.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "edba7861004dd3714265b4db54a3c390e880ab658fec5f7db895fae2046b5bb6" -dependencies = [ - "displaydoc", - "litemap", - "tinystr", - "writeable", - "zerovec", -] - -[[package]] -name = "icu_normalizer" -version = "2.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f6c8828b67bf8908d82127b2054ea1b4427ff0230ee9141c54251934ab1b599" -dependencies = [ - "icu_collections", - "icu_normalizer_data", - "icu_properties", - "icu_provider", - "smallvec", - "zerovec", -] - -[[package]] -name = "icu_normalizer_data" -version = "2.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7aedcccd01fc5fe81e6b489c15b247b8b0690feb23304303a9e560f37efc560a" - -[[package]] -name = "icu_properties" -version = "2.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "020bfc02fe870ec3a66d93e677ccca0562506e5872c650f893269e08615d74ec" -dependencies = [ - "icu_collections", - "icu_locale_core", - "icu_properties_data", - "icu_provider", - "zerotrie", - "zerovec", -] - -[[package]] -name = "icu_properties_data" -version = "2.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "616c294cf8d725c6afcd8f55abc17c56464ef6211f9ed59cccffe534129c77af" - -[[package]] -name = "icu_provider" -version = "2.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85962cf0ce02e1e0a629cc34e7ca3e373ce20dda4c4d7294bbd0bf1fdb59e614" -dependencies = [ - "displaydoc", - "icu_locale_core", - "writeable", - "yoke", - "zerofrom", - "zerotrie", - "zerovec", -] - -[[package]] -name = "idna" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b0875f23caa03898994f6ddc501886a45c7d3d62d04d2d90788d47be1b1e4de" -dependencies = [ - "idna_adapter", - "smallvec", - "utf8_iter", -] - -[[package]] -name = "idna_adapter" -version = "1.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3acae9609540aa318d1bc588455225fb2085b9ed0c4f6bd0d9d5bcd86f1a0344" -dependencies = [ - "icu_normalizer", - "icu_properties", -] - -[[package]] -name = "ignore" -version = "0.4.25" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3d782a365a015e0f5c04902246139249abf769125006fbe7649e2ee88169b4a" -dependencies = [ - "crossbeam-deque", - "globset", - "log", - "memchr", - "regex-automata", - "same-file", - "walkdir", - "winapi-util", -] - -[[package]] -name = "indexmap" -version = "2.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ad4bb2b565bca0645f4d68c5c9af97fba094e9791da685bf83cb5f3ce74acf2" -dependencies = [ - "equivalent", - "hashbrown", -] - -[[package]] -name = "indicatif" -version = "0.18.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9375e112e4b463ec1b1c6c011953545c65a30164fbab5b581df32b3abf0dcb88" -dependencies = [ - "console", - "portable-atomic", - "unicode-width", - "unit-prefix", - "web-time", -] - -[[package]] -name = "is_terminal_polyfill" -version = "1.70.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a6cb138bb79a146c1bd460005623e142ef0181e3d0219cb493e02f7d08a35695" - -[[package]] -name = "itoa" -version = "1.0.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a5f13b858c8d314ee3e8f639011f7ccefe71f97f96e50151fb991f267928e2c" - -[[package]] -name = "jobserver" -version = "0.1.34" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9afb3de4395d6b3e67a780b6de64b51c978ecf11cb9a462c66be7d4ca9039d33" -dependencies = [ - "getrandom 0.3.4", - "libc", -] - -[[package]] -name = "js-sys" -version = "0.3.83" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "464a3709c7f55f1f721e5389aa6ea4e3bc6aba669353300af094b29ffbdde1d8" -dependencies = [ - "once_cell", - "wasm-bindgen", -] - -[[package]] -name = "libc" -version = "0.2.178" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37c93d8daa9d8a012fd8ab92f088405fb202ea0b6ab73ee2482ae66af4f42091" - -[[package]] -name = "libgit2-sys" -version = "0.18.3+1.9.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c9b3acc4b91781bb0b3386669d325163746af5f6e4f73e6d2d630e09a35f3487" -dependencies = [ - "cc", - "libc", - "libz-sys", - "pkg-config", -] - -[[package]] -name = "libredox" -version = "0.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "416f7e718bdb06000964960ffa43b4335ad4012ae8b99060261aa4a8088d5ccb" -dependencies = [ - "bitflags", - "libc", -] - -[[package]] -name = "libz-sys" -version = "1.1.23" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "15d118bbf3771060e7311cc7bb0545b01d08a8b4a7de949198dec1fa0ca1c0f7" -dependencies = [ - "cc", - "libc", - "pkg-config", - "vcpkg", -] - -[[package]] -name = "litemap" -version = "0.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6373607a59f0be73a39b6fe456b8192fcc3585f602af20751600e974dd455e77" - -[[package]] -name = "lock_api" -version = "0.4.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "224399e74b87b5f3557511d98dff8b14089b3dadafcab6bb93eab67d3aace965" -dependencies = [ - "scopeguard", -] - -[[package]] -name = "log" -version = "0.4.29" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e5032e24019045c762d3c0f28f5b6b8bbf38563a65908389bf7978758920897" - -[[package]] -name = "memchr" -version = "2.7.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f52b00d39961fc5b2736ea853c9cc86238e165017a493d1d5c8eac6bdc4cc273" - -[[package]] -name = "memmap2" -version = "0.9.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "744133e4a0e0a658e1374cf3bf8e415c4052a15a111acd372764c55b4177d490" -dependencies = [ - "libc", -] - -[[package]] -name = "mio" -version = "1.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a69bcab0ad47271a0234d9422b131806bf3968021e5dc9328caf2d4cd58557fc" -dependencies = [ - "libc", - "wasi", - "windows-sys 0.61.2", -] - -[[package]] -name = "once_cell" -version = "1.21.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d" - -[[package]] -name = "once_cell_polyfill" -version = "1.70.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "384b8ab6d37215f3c5301a95a4accb5d64aa607f1fcb26a11b5303878451b4fe" - -[[package]] -name = "option-ext" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d" - -[[package]] -name = "parking_lot" -version = "0.12.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93857453250e3077bd71ff98b6a65ea6621a19bb0f559a85248955ac12c45a1a" -dependencies = [ - "lock_api", - "parking_lot_core", -] - -[[package]] -name = "parking_lot_core" -version = "0.9.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2621685985a2ebf1c516881c026032ac7deafcda1a2c9b7850dc81e3dfcb64c1" -dependencies = [ - "cfg-if", - "libc", - "redox_syscall", - "smallvec", - "windows-link", -] - -[[package]] -name = "percent-encoding" -version = "2.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b4f627cb1b25917193a259e49bdad08f671f8d9708acfd5fe0a8c1455d87220" - -[[package]] -name = "pin-project-lite" -version = "0.2.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b3cff922bd51709b605d9ead9aa71031d81447142d828eb4a6eba76fe619f9b" - -[[package]] -name = "pin-utils" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" - -[[package]] -name = "pkg-config" -version = "0.3.32" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7edddbd0b52d732b21ad9a5fab5c704c14cd949e5e9a1ec5929a24fded1b904c" - -[[package]] -name = "portable-atomic" -version = "1.11.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f84267b20a16ea918e43c6a88433c2d54fa145c92a811b5b047ccbe153674483" - -[[package]] -name = "potential_utf" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b73949432f5e2a09657003c25bca5e19a0e9c84f8058ca374f49e0ebe605af77" -dependencies = [ - "zerovec", -] - -[[package]] -name = "pretty_assertions" -version = "1.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ae130e2f271fbc2ac3a40fb1d07180839cdbbe443c7a27e1e3c13c5cac0116d" -dependencies = [ - "diff", - "yansi", -] - -[[package]] -name = "proc-macro2" -version = "1.0.103" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ee95bc4ef87b8d5ba32e8b7714ccc834865276eab0aed5c9958d00ec45f49e8" -dependencies = [ - "unicode-ident", -] - -[[package]] -name = "quote" -version = "1.0.42" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a338cc41d27e6cc6dce6cefc13a0729dfbb81c262b1f519331575dd80ef3067f" -dependencies = [ - "proc-macro2", -] - -[[package]] -name = "r-efi" -version = "5.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69cdb34c158ceb288df11e18b4bd39de994f6657d83847bdffdbd7f346754b0f" - -[[package]] -name = "rand" -version = "0.4.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "552840b97013b1a26992c11eac34bdd778e464601a4c2054b5f0bff7c6761293" -dependencies = [ - "fuchsia-cprng", - "libc", - "rand_core 0.3.1", - "rdrand", - "winapi", -] - -[[package]] -name = "rand_core" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a6fdeb83b075e8266dcc8762c22776f6877a63111121f5f8c7411e5be7eed4b" -dependencies = [ - "rand_core 0.4.2", -] - -[[package]] -name = "rand_core" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c33a3c44ca05fa6f1807d8e6743f3824e8509beca625669633be0acbdf509dc" - -[[package]] -name = "rayon" -version = "1.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "368f01d005bf8fd9b1206fb6fa653e6c4a81ceb1466406b81792d87c5677a58f" -dependencies = [ - "either", - "rayon-core", -] - -[[package]] -name = "rayon-core" -version = "1.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22e18b0f0062d30d4230b2e85ff77fdfe4326feb054b9783a3460d8435c8ab91" -dependencies = [ - "crossbeam-deque", - "crossbeam-utils", -] - -[[package]] -name = "rdrand" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "678054eb77286b51581ba43620cc911abf02758c91f93f479767aed0f90458b2" -dependencies = [ - "rand_core 0.3.1", -] - -[[package]] -name = "redox_syscall" -version = "0.5.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed2bf2547551a7053d6fdfafda3f938979645c44812fbfcda098faae3f1a362d" -dependencies = [ - "bitflags", -] - -[[package]] -name = "redox_users" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4e608c6638b9c18977b00b475ac1f28d14e84b27d8d42f70e0bf1e3dec127ac" -dependencies = [ - "getrandom 0.2.16", - "libredox", - "thiserror", -] - -[[package]] -name = "regex" -version = "1.12.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "843bc0191f75f3e22651ae5f1e72939ab2f72a4bc30fa80a066bd66edefc24d4" -dependencies = [ - "aho-corasick", - "memchr", - "regex-automata", - "regex-syntax", -] - -[[package]] -name = "regex-automata" -version = "0.4.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5276caf25ac86c8d810222b3dbb938e512c55c6831a10f3e6ed1c93b84041f1c" -dependencies = [ - "aho-corasick", - "memchr", - "regex-syntax", -] - -[[package]] -name = "regex-syntax" -version = "0.8.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a2d987857b319362043e95f5353c0535c1f58eec5336fdfcf626430af7def58" - -[[package]] -name = "remove_dir_all" -version = "0.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3acd125665422973a33ac9d3dd2df85edad0f4ae9b00dafb1a05e43a9f5ef8e7" -dependencies = [ - "winapi", -] - -[[package]] -name = "rustversion" -version = "1.0.22" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b39cdef0fa800fc44525c84ccb54a029961a8215f9619753635a9c0d2538d46d" - -[[package]] -name = "ryu" -version = "1.0.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28d3b2b1366ec20994f1fd18c3c594f05c5dd4bc44d8bb0c1c632c8d6829481f" - -[[package]] -name = "same-file" -version = "1.0.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" -dependencies = [ - "winapi-util", -] - -[[package]] -name = "scopeguard" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" - -[[package]] -name = "serde" -version = "1.0.228" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a8e94ea7f378bd32cbbd37198a4a91436180c5bb472411e48b5ec2e2124ae9e" -dependencies = [ - "serde_core", - "serde_derive", -] - -[[package]] -name = "serde_core" -version = "1.0.228" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41d385c7d4ca58e59fc732af25c3983b67ac852c1a25000afe1175de458b67ad" -dependencies = [ - "serde_derive", -] - -[[package]] -name = "serde_derive" -version = "1.0.228" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d540f220d3187173da220f885ab66608367b6574e925011a9353e4badda91d79" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "serde_json" -version = "1.0.145" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "402a6f66d8c709116cf22f558eab210f5a50187f702eb4d7e5ef38d9a7f1c79c" -dependencies = [ - "itoa", - "memchr", - "ryu", - "serde", - "serde_core", -] - -[[package]] -name = "serde_spanned" -version = "1.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e24345aa0fe688594e73770a5f6d1b216508b4f93484c0026d521acd30134392" -dependencies = [ - "serde_core", -] - -[[package]] -name = "shlex" -version = "1.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" - -[[package]] -name = "signal-hook-registry" -version = "1.4.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7664a098b8e616bdfcc2dc0e9ac44eb231eedf41db4e9fe95d8d32ec728dedad" -dependencies = [ - "libc", -] - -[[package]] -name = "slab" -version = "0.4.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a2ae44ef20feb57a68b23d846850f861394c2e02dc425a50098ae8c90267589" - -[[package]] -name = "smallvec" -version = "1.15.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67b1b7a3b5fe4f1376887184045fcf45c69e92af734b7aaddc05fb777b6fbd03" - -[[package]] -name = "socket2" -version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17129e116933cf371d018bb80ae557e889637989d8638274fb25622827b03881" -dependencies = [ - "libc", - "windows-sys 0.60.2", -] - -[[package]] -name = "stable_deref_trait" -version = "1.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ce2be8dc25455e1f91df71bfa12ad37d7af1092ae736f3a6cd0e37bc7810596" - -[[package]] -name = "strsim" -version = "0.11.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" - -[[package]] -name = "syn" -version = "2.0.111" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "390cc9a294ab71bdb1aa2e99d13be9c753cd2d7bd6560c77118597410c4d2e87" -dependencies = [ - "proc-macro2", - "quote", - "unicode-ident", -] - -[[package]] -name = "synstructure" -version = "0.13.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "728a70f3dbaf5bab7f0c4b1ac8d7ae5ea60a4b5549c8a5914361c99147a709d2" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "tempdir" -version = "0.3.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "15f2b5fb00ccdf689e0149d1b1b3c03fead81c2b37735d812fa8bddbbf41b6d8" -dependencies = [ - "rand", - "remove_dir_all", -] - -[[package]] -name = "thiserror" -version = "2.0.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f63587ca0f12b72a0600bcba1d40081f830876000bb46dd2337a3051618f4fc8" -dependencies = [ - "thiserror-impl", -] - -[[package]] -name = "thiserror-impl" -version = "2.0.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ff15c8ecd7de3849db632e14d18d2571fa09dfc5ed93479bc4485c7a517c913" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "tinystr" -version = "0.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42d3e9c45c09de15d06dd8acf5f4e0e399e85927b7f00711024eb7ae10fa4869" -dependencies = [ - "displaydoc", - "zerovec", -] - -[[package]] -name = "tokio" -version = "1.48.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff360e02eab121e0bc37a2d3b4d4dc622e6eda3a8e5253d5435ecf5bd4c68408" -dependencies = [ - "bytes", - "libc", - "mio", - "parking_lot", - "pin-project-lite", - "signal-hook-registry", - "socket2", - "tokio-macros", - "windows-sys 0.61.2", -] - -[[package]] -name = "tokio-macros" -version = "2.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af407857209536a95c8e56f8231ef2c2e2aff839b22e07a1ffcbc617e9db9fa5" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "tokio-util" -version = "0.7.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2efa149fe76073d6e8fd97ef4f4eca7b67f599660115591483572e406e165594" -dependencies = [ - "bytes", - "futures-core", - "futures-sink", - "futures-util", - "pin-project-lite", - "tokio", -] - -[[package]] -name = "toml" -version = "0.9.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0dc8b1fb61449e27716ec0e1bdf0f6b8f3e8f6b05391e8497b8b6d7804ea6d8" -dependencies = [ - "indexmap", - "serde_core", - "serde_spanned", - "toml_datetime", - "toml_parser", - "toml_writer", - "winnow", -] - -[[package]] -name = "toml_datetime" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2cdb639ebbc97961c51720f858597f7f24c4fc295327923af55b74c3c724533" -dependencies = [ - "serde_core", -] - -[[package]] -name = "toml_parser" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0cbe268d35bdb4bb5a56a2de88d0ad0eb70af5384a99d648cd4b3d04039800e" -dependencies = [ - "winnow", -] - -[[package]] -name = "toml_writer" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df8b2b54733674ad286d16267dcfc7a71ed5c776e4ac7aa3c3e2561f7c637bf2" - -[[package]] -name = "unicode-ident" -version = "1.0.22" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9312f7c4f6ff9069b165498234ce8be658059c6728633667c526e27dc2cf1df5" - -[[package]] -name = "unicode-width" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4ac048d71ede7ee76d585517add45da530660ef4390e49b098733c6e897f254" - -[[package]] -name = "unit-prefix" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81e544489bf3d8ef66c953931f56617f423cd4b5494be343d9b9d3dda037b9a3" - -[[package]] -name = "url" -version = "2.5.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08bc136a29a3d1758e07a9cca267be308aeebf5cfd5a10f3f67ab2097683ef5b" -dependencies = [ - "form_urlencoded", - "idna", - "percent-encoding", - "serde", -] - -[[package]] -name = "utf8_iter" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be" - -[[package]] -name = "utf8parse" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" - -[[package]] -name = "vcpkg" -version = "0.2.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" - -[[package]] -name = "walkdir" -version = "2.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29790946404f91d9c5d06f9874efddea1dc06c5efe94541a7d6863108e3a5e4b" -dependencies = [ - "same-file", - "winapi-util", -] - -[[package]] -name = "wasi" -version = "0.11.1+wasi-snapshot-preview1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b" - -[[package]] -name = "wasip2" -version = "1.0.1+wasi-0.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0562428422c63773dad2c345a1882263bbf4d65cf3f42e90921f787ef5ad58e7" -dependencies = [ - "wit-bindgen", -] - -[[package]] -name = "wasm-bindgen" -version = "0.2.106" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d759f433fa64a2d763d1340820e46e111a7a5ab75f993d1852d70b03dbb80fd" -dependencies = [ - "cfg-if", - "once_cell", - "rustversion", - "wasm-bindgen-macro", - "wasm-bindgen-shared", -] - -[[package]] -name = "wasm-bindgen-macro" -version = "0.2.106" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "48cb0d2638f8baedbc542ed444afc0644a29166f1595371af4fecf8ce1e7eeb3" -dependencies = [ - "quote", - "wasm-bindgen-macro-support", -] - -[[package]] -name = "wasm-bindgen-macro-support" -version = "0.2.106" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cefb59d5cd5f92d9dcf80e4683949f15ca4b511f4ac0a6e14d4e1ac60c6ecd40" -dependencies = [ - "bumpalo", - "proc-macro2", - "quote", - "syn", - "wasm-bindgen-shared", -] - -[[package]] -name = "wasm-bindgen-shared" -version = "0.2.106" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cbc538057e648b67f72a982e708d485b2efa771e1ac05fec311f9f63e5800db4" -dependencies = [ - "unicode-ident", -] - -[[package]] -name = "web-time" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a6580f308b1fad9207618087a65c04e7a10bc77e02c8e84e9b00dd4b12fa0bb" -dependencies = [ - "js-sys", - "wasm-bindgen", -] - -[[package]] -name = "winapi" -version = "0.3.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" -dependencies = [ - "winapi-i686-pc-windows-gnu", - "winapi-x86_64-pc-windows-gnu", -] - -[[package]] -name = "winapi-i686-pc-windows-gnu" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" - -[[package]] -name = "winapi-util" -version = "0.1.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c2a7b1c03c876122aa43f3020e6c3c3ee5c05081c9a00739faf7503aeba10d22" -dependencies = [ - "windows-sys 0.61.2", -] - -[[package]] -name = "winapi-x86_64-pc-windows-gnu" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" - -[[package]] -name = "windows-link" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5" - -[[package]] -name = "windows-sys" -version = "0.60.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2f500e4d28234f72040990ec9d39e3a6b950f9f22d3dba18416c35882612bcb" -dependencies = [ - "windows-targets", -] - -[[package]] -name = "windows-sys" -version = "0.61.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae137229bcbd6cdf0f7b80a31df61766145077ddf49416a728b02cb3921ff3fc" -dependencies = [ - "windows-link", -] - -[[package]] -name = "windows-targets" -version = "0.53.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4945f9f551b88e0d65f3db0bc25c33b8acea4d9e41163edf90dcd0b19f9069f3" -dependencies = [ - "windows-link", - "windows_aarch64_gnullvm", - "windows_aarch64_msvc", - "windows_i686_gnu", - "windows_i686_gnullvm", - "windows_i686_msvc", - "windows_x86_64_gnu", - "windows_x86_64_gnullvm", - "windows_x86_64_msvc", -] - -[[package]] -name = "windows_aarch64_gnullvm" -version = "0.53.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9d8416fa8b42f5c947f8482c43e7d89e73a173cead56d044f6a56104a6d1b53" - -[[package]] -name = "windows_aarch64_msvc" -version = "0.53.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9d782e804c2f632e395708e99a94275910eb9100b2114651e04744e9b125006" - -[[package]] -name = "windows_i686_gnu" -version = "0.53.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "960e6da069d81e09becb0ca57a65220ddff016ff2d6af6a223cf372a506593a3" - -[[package]] -name = "windows_i686_gnullvm" -version = "0.53.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa7359d10048f68ab8b09fa71c3daccfb0e9b559aed648a8f95469c27057180c" - -[[package]] -name = "windows_i686_msvc" -version = "0.53.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e7ac75179f18232fe9c285163565a57ef8d3c89254a30685b57d83a38d326c2" - -[[package]] -name = "windows_x86_64_gnu" -version = "0.53.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c3842cdd74a865a8066ab39c8a7a473c0778a3f29370b5fd6b4b9aa7df4a499" - -[[package]] -name = "windows_x86_64_gnullvm" -version = "0.53.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ffa179e2d07eee8ad8f57493436566c7cc30ac536a3379fdf008f47f6bb7ae1" - -[[package]] -name = "windows_x86_64_msvc" -version = "0.53.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d6bbff5f0aada427a1e5a6da5f1f98158182f26556f345ac9e04d36d0ebed650" - -[[package]] -name = "winnow" -version = "0.7.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a5364e9d77fcdeeaa6062ced926ee3381faa2ee02d3eb83a5c27a8825540829" - -[[package]] -name = "wit-bindgen" -version = "0.46.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f17a85883d4e6d00e8a97c586de764dabcc06133f7f1d55dce5cdc070ad7fe59" - -[[package]] -name = "writeable" -version = "0.6.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9edde0db4769d2dc68579893f2306b26c6ecfbe0ef499b013d731b7b9247e0b9" - -[[package]] -name = "yansi" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cfe53a6657fd280eaa890a3bc59152892ffa3e30101319d168b781ed6529b049" - -[[package]] -name = "yoke" -version = "0.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72d6e5c6afb84d73944e5cedb052c4680d5657337201555f9f2a16b7406d4954" -dependencies = [ - "stable_deref_trait", - "yoke-derive", - "zerofrom", -] - -[[package]] -name = "yoke-derive" -version = "0.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b659052874eb698efe5b9e8cf382204678a0086ebf46982b79d6ca3182927e5d" -dependencies = [ - "proc-macro2", - "quote", - "syn", - "synstructure", -] - -[[package]] -name = "zerofrom" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50cc42e0333e05660c3587f3bf9d0478688e15d870fab3346451ce7f8c9fbea5" -dependencies = [ - "zerofrom-derive", -] - -[[package]] -name = "zerofrom-derive" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d71e5d6e06ab090c67b5e44993ec16b72dcbaabc526db883a360057678b48502" -dependencies = [ - "proc-macro2", - "quote", - "syn", - "synstructure", -] - -[[package]] -name = "zerotrie" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a59c17a5562d507e4b54960e8569ebee33bee890c70aa3fe7b97e85a9fd7851" -dependencies = [ - "displaydoc", - "yoke", - "zerofrom", -] - -[[package]] -name = "zerovec" -version = "0.11.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c28719294829477f525be0186d13efa9a3c602f7ec202ca9e353d310fb9a002" -dependencies = [ - "yoke", - "zerofrom", - "zerovec-derive", -] - -[[package]] -name = "zerovec-derive" -version = "0.11.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eadce39539ca5cb3985590102671f2567e659fca9666581ad3411d59207951f3" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] diff --git a/cli/development-cli/Cargo.toml b/cli/development-cli/Cargo.toml deleted file mode 100644 index f8141789ab..0000000000 --- a/cli/development-cli/Cargo.toml +++ /dev/null @@ -1,48 +0,0 @@ -[package] -name = "cargo-chipmunk" -version = "0.5.5" -authors = ["Ammar Abou Zor "] -edition = "2024" -description = "CLI Tool for chipmunk application development" -documentation = "README.md" -readme = "README.md" - -[workspace] -members = ["dir_checksum"] - -# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html - -[workspace.dependencies] -tempdir = "0.3" -anyhow = "1" -pretty_assertions = "1" -rayon = "1" - -[dependencies] -anyhow.workspace = true -clap = { version = "4.5", features = ["derive"] } -console = "0.16" -fs_extra = "1.3" -futures = "0.3" -git2 = { version = "0.20", default-features = false } -indicatif = "0.18" -tokio = { version = "1", features = ["full"] } -tokio-util = { version = "0.7", features = ["rt"] } -dir_checksum = { path = "./dir_checksum" } -clap_complete = "4.5" -dotenvy = "0.15" -serde = {version = "1", features = ["derive"]} -serde_json = "1" -glob = "0.3" -toml = "0.9" -dirs = "6" -regex = "1" -rayon.workspace = true - -[dev-dependencies] -tempdir.workspace = true -pretty_assertions.workspace = true - -[[test]] -name = "dir_checksum" -path = "dir_checksum/tests/integration_tests.rs" diff --git a/cli/development-cli/README.md b/cli/development-cli/README.md deleted file mode 100644 index f3bf8a5e0c..0000000000 --- a/cli/development-cli/README.md +++ /dev/null @@ -1,44 +0,0 @@ -[![LICENSE](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](LICENSE.txt) - -# Chipmunk Development CLI Tool - -This CLI Tool provides an easier way to manage various development tasks for Chipmunk. -Chipmunk consists of multiple modules with complex dependencies on each other, and this tool helps streamline the development process by coordinating these tasks seamlessly. -This tool acts as a cargo extension. Once installed, you can access it by running `cargo chipmunk ` from anywhere within the repository. - ---- - -> [!IMPORTANT] -> For comprehensive documentation, including detailed installation steps, full command references, usage examples, and configuration options, please visit the official documentation site: [Chipmunk Development CLI Tool Documentation]({URL_TO_PUBLISHED_CLI_DOCS}) - ---- - -## Getting Started - -### Installation - -Ensure you have **Rust** installed on your system (visit [rustup.rs](https://rustup.rs/) for instructions). - -To install the Chipmunk Development CLI tool, navigate to the root of the Chipmunk repository in your terminal and run: - -`cargo install --path cli/development-cli` - -Once installed, you can access it by running `cargo chipmunk `. - -## Usage Overview - -This CLI tool provides commands to manage the Chipmunk application's development cycle, including environment checks, building, testing, linting, running the application, and generating releases. It also offers features for managing user-level configurations and running project benchmarks. - -For a complete list of commands, their arguments, and detailed usage instructions, please refer to the [full documentation](https://esrlabs.github.io/chipmunk/contributing/dev-cli/). - -## Changelogs - -Changelogs can be found [here](CHANGELOG.md). - -## Contributing - -Contributions to the Chipmunk Development CLI tool are very welcome! - -After making any changes, please ensure that all commands in this tool are still working as expected by running its integration tests. Additionally, consider adding new tests when introducing new features. - -For more details on contributing to Chipmunk, including how to run tests for this CLI tool, please see our main [contribution guide](https://esrlabs.github.io/chipmunk/contributing/welcome/). diff --git a/cli/development-cli/config/bench_core.toml b/cli/development-cli/config/bench_core.toml deleted file mode 100644 index 916c663097..0000000000 --- a/cli/development-cli/config/bench_core.toml +++ /dev/null @@ -1,43 +0,0 @@ -[[bench]] -name = "map_benchmarks" -library = "processor" - -[[bench]] -name = "dlt_producer" -library = "processor" - -[[bench]] -name = "someip_producer" -library = "processor" - -[[bench]] -name = "someip_legacy_producer" -library = "processor" - -[[bench]] -name = "text_producer" -library = "processor" - -[[bench]] -name = "plugin_praser_producer" -library = "processor" - -[[bench]] -name = "mocks_once_producer" -library = "processor" - -[[bench]] -name = "mocks_once_parallel" -library = "processor" - -[[bench]] -name = "mocks_multi_producer" -library = "processor" - -[[bench]] -name = "mocks_multi_parallel" -library = "processor" - -[[bench]] -name = "plugin_parser_init" -library = "plugins_host" diff --git a/cli/development-cli/config/codesign_macos.toml b/cli/development-cli/config/codesign_macos.toml deleted file mode 100644 index ef54b45a5e..0000000000 --- a/cli/development-cli/config/codesign_macos.toml +++ /dev/null @@ -1,59 +0,0 @@ -############################################################## -### Configuration for code signing and notarizing on MacOS ### -############################################################## - - -# Provided Options to be given as arguments for the standard code signing command -# for files and directories to be -sign_cmd_options = "--force --timestamp --options runtime --verbose=4 --deep --strict --entitlements ./resources/mac/entitlements.mac.plist" - -# Represents the needed environment variables while code signing -[env_vars] -# Environment variable which must be activated to start code signing and notarizing -check_enabled = [ "APPLEID", "APPLEIDPASS"] -# Environment variable which can't exist to start code signing and notarizing -check_disabled = ["SKIP_NOTARIZE"] -# Environment variable to set before starting code signing -set_on_start = [[ "CSC_IDENTITY_AUTO_DISCOVERY", "true" ]] -# Environment variable for code signing ID -signing_id = "SIGNING_ID" - -# Represents relative paths and glob patterns which must be code signed. -# All paths starts form `release build path` -[sign_paths] -# Paths to single files and directories -single_paths = [ - "chipmunk.app/Contents/Resources/bin/updater", - "chipmunk.app/Contents/MacOS/chipmunk", - "chipmunk.app", -] -# Patterns to be used with glob to retrieve all matching files under that patterns. -glob_patterns = [ - # Frameworks - "chipmunk.app/Contents/Frameworks/**/*.framework/**", - "chipmunk.app/Contents/Frameworks/**/*.dylib", - "chipmunk.app/Contents/Frameworks/**/*.app", - "chipmunk.app/Contents/Frameworks/**/Resources/ShipIt", - # Unpacked asar resources - "chipmunk.app/Contents/Resources/app.asar.unpacked/**/*.node", -] - -# Represents the components for the final sign command (Command for deep and strict code signing) -[final_sign_command] -# The command with its arguments. -command = "codesign -vvv --deep --strict" -# Relative path to be code signed starting from `release build path` -sign_path = "chipmunk.app" - -# Represents the code notarizing command with its arguments and environment variables. -[notarize_command] -# Notarize command with each arguments before providing the path. -command = "xcrun notarytool submit --force --wait --verbose" -# Environment variable for Apple ID to be provided as CLI argument. -env_apple_id = "APPLEID" -# Environment variable for Team ID to be provided as CLI argument. -env_team_id = "TEAMID" -# Environment variable for Password to be provided as CLI argument. -env_password = "APPLEIDPASS" -# Line to look for in the output of the notarizing command to ensure it has been accepted. -accepted_line = "status: Accepted" diff --git a/cli/development-cli/config/min_versions.toml b/cli/development-cli/config/min_versions.toml deleted file mode 100644 index df0a87566f..0000000000 --- a/cli/development-cli/config/min_versions.toml +++ /dev/null @@ -1,33 +0,0 @@ -########################################################## -### Minimum required versions for Chipmunk development ### -########################################################## - -[cargo] -major = 1 -minor = 81 -patch = 0 - -[node] -major = 20 -minor = 9 -patch = 0 - -[npm] -major = 10 -minor = 0 -patch = 0 - -[yarn] -major = 1 -minor = 22 -patch = 0 - -[wasm_pack] -major = 0 -minor = 13 -patch = 0 - -[nj_cli] -major = 0 -minor = 4 -patch = 4 diff --git a/cli/development-cli/integration_tests/.gitignore b/cli/development-cli/integration_tests/.gitignore deleted file mode 100644 index bee8a64b79..0000000000 --- a/cli/development-cli/integration_tests/.gitignore +++ /dev/null @@ -1 +0,0 @@ -__pycache__ diff --git a/cli/development-cli/integration_tests/bench.py b/cli/development-cli/integration_tests/bench.py deleted file mode 100644 index a43fa4a4bf..0000000000 --- a/cli/development-cli/integration_tests/bench.py +++ /dev/null @@ -1,36 +0,0 @@ -""" -Provides methods to test the Benchmark command in Chipmunk Build CLI Tool. -""" - -from utls import get_root, run_command, print_green_bold, print_blue_bold - - -# We can only list the benchmarks since this command will test loading the benchmarks from the configuration file. -# Running the actual benchmarks will take too much time and it will be tedious to keep the benchmarks between -# this script and the configuration file in sync. -BENCH_LIST_COMMAND = [ - "cargo", - "run", - "-r", - "--", - "chipmunk", - "bench", - "list", -] - - -def run_benchmark_command(): - """ - Runs benchmark command for Chipmunk. - This command will list the available tests only, loading the configuration of all benchmarks. - """ - - print_blue_bold("Running Benchmark Command...") - - run_command(BENCH_LIST_COMMAND) - - print_green_bold("*** Check for Benchmark Command Succeeded ***") - - -if __name__ == "__main__": - run_benchmark_command() diff --git a/cli/development-cli/integration_tests/build.py b/cli/development-cli/integration_tests/build.py deleted file mode 100644 index 138ac280d8..0000000000 --- a/cli/development-cli/integration_tests/build.py +++ /dev/null @@ -1,338 +0,0 @@ -""" -Provides methods to test the Build command and build state records implementation to watch source -code changes in Chipmunk Build CLI Tool. -""" - -from pathlib import Path -from utls import get_root, run_command, print_green_bold, print_blue_bold -from datetime import datetime -from typing import Dict -import platform - -####################################################################### -######################## RUN ALL TESTS ############################ -####################################################################### - - -def run_build_tests(): - """Runs many tests for build command: - - General Test: General test for build command and the created directories and build record file. - - Build Records Test: Test how changing files in some target will affect the build on it and other targets depending on it. - - Reset Build Records Test: Make sure build records file will deleted when the command is called. - """ - print_blue_bold("Running General Checks for Build Command...") - _build_general_check() - print_green_bold("*** General Check for Build Command Succeeded ***") - - print("---------------------------------------------------------------") - - print_blue_bold("Running Build Records Checks for Build Command...") - _build_states_records_check() - print_green_bold("*** Build Records Check for Build Command Succeeded ***") - - print("---------------------------------------------------------------") - - print_blue_bold("Running Reset Build Records Command...") - _run_reset_build_records_command() - print_green_bold("*** Test Running Reset Build Records Command Succeeded ***") - - -####################################################################### -################ GENERAL TEST FOR BUILD COMMAND ################### -####################################################################### - -# Build command to be used in general build test -# This command should build all the targets expect the Build CLI Tool -BUILD_COMMAND = [ - "cargo", - "run", - "-r", - "--", - "chipmunk", - "build", - # Provide app target only and it should pull all other GUI-app targets expect for build CLI, - # which isn't possible to build on Windows because it's not allowed to replace a binary while - # it's running. - "app", - # Chipmunk CLI tool isn't included with app target. - "cli-chipmunk", - # Plugin API isn't included with app target. - "plugins-api", -] - -# These paths must exist after build command has been finished. -# The paths are relative starting from `chipmunk_root` -APP_PATHS_FOR_BUILD_CHECK = [ - # Core - "application/apps/indexer/target", - # Shared - "application/platform/dist", - "application/platform/node_modules", - # Protocol - "application/apps/protocol/pkg", - # Binding - "application/apps/rustcore/rs-bindings/dist", - "application/apps/rustcore/rs-bindings/target", - # Wrapper - "application/apps/rustcore/ts-bindings/dist", - "application/apps/rustcore/ts-bindings/node_modules", - "application/apps/rustcore/ts-bindings/src/native/index.node", - # Wasm - "application/apps/rustcore/wasm-bindings/pkg", - "application/apps/rustcore/wasm-bindings/node_modules", - # Client - "application/client/dist/debug", - "application/client/node_modules", - # Updater - "application/apps/precompiled/updater/target", - # App - "application/holder/dist", - "application/holder/node_modules", - # Chipmunk CLI - "cli/chipmunk-cli/target", - # Plugins API - "plugins/plugins_api/target", -] - -# The name of the file where the states of the latest build are saved. -BUILD_RECORDS_FILENAME = ".build_last_state" - - -def get_build_paths(root_dir: Path) -> list[Path]: - """Provides the paths for the directories that must be created after running the build command""" - build_paths = [root_dir.joinpath(sub_dir) for sub_dir in APP_PATHS_FOR_BUILD_CHECK] - return build_paths - - -def _build_general_check(): - """ - Runs Build command for app targets and checks if all build directories + Last build states records file are created. - Build command will run with the default arguments regarding the ui and fail-fast - """ - print("Running build command...") - root_dir = get_root() - # The path for the file where build states are saved. - # This file must be written on every call of build. - last_build_state_path = root_dir.joinpath(BUILD_RECORDS_FILENAME) - - # Get last modification date for states file if exists otherwise get minimal date - build_state_modified_before = ( - get_last_modification_date(last_build_state_path) - if last_build_state_path.exists() - else datetime.min - ) - run_command(BUILD_COMMAND) - - # Check if all the targets directory exists after running build command. - print("Checking created directories...") - for path in get_build_paths(root_dir): - if not path.exists(): - raise AssertionError(f"Path doesn't exist after build. Path: {path}") - - print("Checking created directories Succeeded") - - # Build Records file Checks: File must exist after build, - # and it must have a more resent modification date compared to before build - print("Checking Build states Records file changed...") - - assert ( - last_build_state_path.exists() - ), f"Build states record file doesn't exist after build. File Path: {last_build_state_path}" - - build_state_modified_after = get_last_modification_date(last_build_state_path) - - assert ( - build_state_modified_after > build_state_modified_before - ), f"Build states records file modification date after build isn't greater as before build.\ - Before: {build_state_modified_before} , After: {build_state_modified_after}" - print("Checking if Build States Records file changed Succeeded") - - -####################################################################### -################### LAST BUILD RECORDS TESTS ###################### -####################################################################### - -# Name of the temporary file which will be used for testing if file changes will lead to rebuild -# the direct target and all other targets that depend on here. -# This file should be created then deleted after the test is done. -TEMP_FILE_NAME = "tmp_for_cli_test.txt" - -# Content of temporary file for testing build records checks. -# It should provide a clear message for the users to delete the file if the file somehow didn't -# get deleted after the test has finished. -TEMP_FILE_CONTENT = """This file is created to test the build CLI tool only and it should be deleted after each test. -Please delete this file manually if it still exists after build CLI tests are done, -and please consider opening an issue if you can reproduce this behavior""" - -# Paths of files and directory in platform target and all other targets depending on it. -# The modification date for this files will be read before the build records test starts, then it will be -# compared after the build command has finished to insure that the those targets have been rebuilt. -INVOLVED_PATHS_BUILD_RECORDS_CHECK = [ - # Shared - "platform/dist/lib.js", - # Binding - "apps/rustcore/rs-bindings/dist/index.node", - # Wrapper - "apps/rustcore/ts-bindings/dist/index.js", - # Client - "client/dist/debug", - # App - "holder/dist/app.js", -] - -# Paths of files and directory that must be not changed after running the build with the changes in platform -# The modification date for this files will be read before the build records test starts, then it will be -# compared after the build command has finished to insure that the those targets have not been rebuilt. -PATHS_NON_INVOLVED_BUILD_RECORDS_CHECK = [ - # Core - "apps/indexer/target", - # Wasm - "apps/rustcore/wasm-bindings/pkg", - # Updater - "apps/precompiled/updater/target", -] - - -def get_last_modification_date(path: Path) -> datetime: - """Gets the last modification date for the given path on different platforms - On Unix it will return the last time the meta data of the file has been changed - On Windows it will return the more recent between creating and last modification times - """ - # Get file stats - stats = path.stat() - - # On Unix, return the last time any of the file meta data has changed - if platform.system() != "Windows": - return datetime.fromtimestamp(stats.st_ctime) - - # On Windows, return the greater of st_mtime and st_birthtime because time information on Windows can be misleading, - # like it's possible to get a creation time that is more recent than the modification time. - else: - most_recent_time = max( - stats.st_mtime, - stats.st_birthtime, - ) - return datetime.fromtimestamp(most_recent_time) - - -def _build_states_records_check(): - """!!!This function must run directly after a full build!!! - It creates a dummy file in platform directory and checks that all dependencies (Binding, Wrapper, Client, App) - has been newly built. - This runs the build command with the UI option set to "print" - """ - root_dir = get_root() - application_dir = root_dir.joinpath("application") - - # Get and validate build states record file - build_state_file = root_dir.joinpath(BUILD_RECORDS_FILENAME) - assert ( - build_state_file.exists() - ), f"Build State Records File must exist before running Build State Records tests. File Path: {build_state_file}" - - # Save modification date for build paths that must change before start to compare them later. - modifi_involved_before_start: Dict[Path, datetime] = {} - for sub_path in INVOLVED_PATHS_BUILD_RECORDS_CHECK: - sub_path = application_dir.joinpath(sub_path) - assert ( - sub_path.exists() - ), f"Build Path must exist before build state records tests starts. Path {sub_path}" - modifi_date = get_last_modification_date(sub_path) - modifi_involved_before_start[sub_path] = modifi_date - - # Save modification date for build paths that must sta before start to compare them later. - modifi_non_involved_before_start: Dict[Path, datetime] = {} - for sub_path in PATHS_NON_INVOLVED_BUILD_RECORDS_CHECK: - sub_path = application_dir.joinpath(sub_path) - assert ( - sub_path.exists() - ), f"Build Path must exist before build state records tests starts. Path {sub_path}" - modifi_date = get_last_modification_date(sub_path) - modifi_non_involved_before_start[sub_path] = modifi_date - - # Define temporary file path in platform directory to insure it will be rebuilt - # with all other targets depending on it. - temp_file_path = application_dir.joinpath(f"platform/{TEMP_FILE_NAME}") - assert ( - not temp_file_path.exists() - ), f"Temporary file can't exist before build state records test start. File Path: {temp_file_path}" - - try: - # Create temporary file in platform directory - with open(temp_file_path, "w") as f: - f.write(TEMP_FILE_CONTENT) - - # Run build command with the UI option to suppress the bars and show the logs once each command finishes. - - print("Running build command with ui option set to 'print'") - - build_cmd = BUILD_COMMAND.copy() - build_cmd.extend(["-u", "print"]) - run_command(build_cmd) - - # Compare modification date for involved targets on different platforms - if platform.system() != "Windows": - # On Unix systems we compare all the involved targets to insure the build records solution is - # working and to test the build dependencies logic - for path, modifi_before in modifi_involved_before_start.items(): - modifi_after = get_last_modification_date(path) - assert ( - modifi_after > modifi_before - ), f"Involved target modification date after must be more recent than before.\n\ - Target Path: {path}.\n\ - Before: {modifi_before}, After: {modifi_after}" - else: - # On Windows it's enough that only one of the involved target has more recent date - # because the file system here isn't reliable in delivering the current time of the - # latest change on a file or directory - date_changed = False - for path, modifi_before in modifi_involved_before_start.items(): - modifi_after = get_last_modification_date(path) - date_changed = modifi_after > modifi_before - if date_changed: - break - assert ( - date_changed - ), "None of the involved targets' modification date is more recent than before build" - - # Compare modification date for not involved targets - for path, modifi_before in modifi_non_involved_before_start.items(): - modifi_after = get_last_modification_date(path) - assert ( - modifi_after == modifi_before - ), f"Not involved target modification date must not be changed.\n\ - Target Path: {path}.\n\ - Before: {modifi_before}, After: {modifi_after}" - finally: - # Insure temporary file is deleted - if temp_file_path.exists(): - temp_file_path.unlink() - - -###################################################################### -################## RESET BUILD RECORDS COMMAND ##################### -###################################################################### - -RESET_BUILD_RECORDS_COMMAND = ["cargo", "run", "-r", "--", "chipmunk", "reset-records"] - - -def _run_reset_build_records_command(): - """This test will run reset-records command in development mode, then it insure that - the records file has been deleted""" - - records_path = get_root().joinpath(BUILD_RECORDS_FILENAME) - assert ( - records_path.exists() - ), f"Build state records file must exist before running 'reset-records' command. File Path: {records_path}" - - run_command(RESET_BUILD_RECORDS_COMMAND) - - assert ( - not records_path.exists() - ), f"Build state records file must not exist after running 'reset-records' command. File Path: {records_path}" - - pass - - -if __name__ == "__main__": - run_build_tests() diff --git a/cli/development-cli/integration_tests/clean.py b/cli/development-cli/integration_tests/clean.py deleted file mode 100644 index 1bd2b47b1b..0000000000 --- a/cli/development-cli/integration_tests/clean.py +++ /dev/null @@ -1,93 +0,0 @@ -""" -Provides methods to test the Clean command in Chipmunk Build CLI Tool -Clean command will be invoked here for all targets but the CLI tool itself, -then it checks that all the paths that must be removed don't exist anymore. -Clean command will run in the UI mode "immediate" -""" - -from pathlib import Path -from utls import run_command, print_blue_bold, print_green_bold, get_root - -CLEAN_COMMAND = [ - "cargo", - "run", - "-r", - "--", - "chipmunk", - "clean", - # We need to set targets explicitly because we need to clean everything expect the build CLI tools - # binaries to avoid failing on Windows when CLI tool tries to remove it's own binary. - "core", - "shared", - "protocol", - "binding", - "wrapper", - "wasm", - "client", - "updater", - "app", - "cli-chipmunk", - "plugins-api", - # Set UI mode to immediate. - "-u", - "immediate", -] - -# These paths must not exist after clean build is done. -# The paths are relative starting from `chipmunk_root` -PATHS_TO_CHECK = [ - # Core - "application/apps/indexer/target", - # Shared - "application/platform/dist", - "application/platform/node_modules", - # Protocol - "application/apps/protocol/pkg", - # Binding - "application/apps/rustcore/rs-bindings/dist", - "application/apps/rustcore/rs-bindings/target", - # Wrapper - "application/apps/rustcore/ts-bindings/dist", - "application/apps/rustcore/ts-bindings/node_modules", - "application/apps/rustcore/ts-bindings/spec/build", - "application/apps/rustcore/ts-bindings/src/native/index.node", - # Wasm - "application/apps/rustcore/wasm-bindings/pkg", - "application/apps/rustcore/wasm-bindings/node_modules", - "application/apps/rustcore/wasm-bindings/test_output", - # Client - "application/client/dist", - "application/client/node_modules", - # Updater - "application/apps/precompiled/updater/target", - # App - "application/holder/dist", - "application/holder/node_modules", - # Chipmunk CLI - "cli/chipmunk-cli/target", - # Plugins API - "plugins/plugins_api/target", -] - - -def run_clean_command(): - """Runs Clean Commands on all targets and insure that all build directories are deleted. - Clean command will run in the UI mode "immediate" - """ - print_blue_bold("Running clean command...") - run_command(CLEAN_COMMAND) - for path in get_removed_paths(): - if path.exists(): - raise AssertionError(f"Path exists after clean. Path: {path}") - - print_green_bold("*** Check for Clean Command Succeeded ***") - - -def get_removed_paths() -> list[Path]: - """Provides the paths for the directories that must be removed after running the clean command""" - root_dir = get_root() - return [root_dir.joinpath(sub_dir) for sub_dir in PATHS_TO_CHECK] - - -if __name__ == "__main__": - run_clean_command() diff --git a/cli/development-cli/integration_tests/environment.py b/cli/development-cli/integration_tests/environment.py deleted file mode 100644 index 82a1b7d981..0000000000 --- a/cli/development-cli/integration_tests/environment.py +++ /dev/null @@ -1,41 +0,0 @@ -""" -Provides methods to test the Environment commands in Chipmunk Build CLI Tool -""" - -from utls import run_command, print_blue_bold, print_green_bold - -ENVIRONMENT_CHECK_COMMAND = [ - "cargo", - "run", - "-r", - "--", - "chipmunk", - "environment", - "check", -] - -ENVIRONMENT_PRINT_COMMAND = [ - "cargo", - "run", - "-r", - "--", - "chipmunk", - "environment", - "print", -] - - -def run_environment_commands(): - """Runs environment command to check the installed development tools for chipmunk, - and the command to print infos about those tools""" - print_blue_bold("Running Environment Check command...") - run_command(ENVIRONMENT_CHECK_COMMAND) - print_green_bold("*** Environment Check Command Succeeded ***") - - print_blue_bold("Running Environment Print command...") - run_command(ENVIRONMENT_PRINT_COMMAND) - print_green_bold("*** Environment Print Command Succeeded ***") - - -if __name__ == "__main__": - run_environment_commands() diff --git a/cli/development-cli/integration_tests/lint.py b/cli/development-cli/integration_tests/lint.py deleted file mode 100644 index 827efdd707..0000000000 --- a/cli/development-cli/integration_tests/lint.py +++ /dev/null @@ -1,37 +0,0 @@ -""" -Provides methods to test the Lint command in Chipmunk Build CLI Tool. -It tests the fail-fast option and the "report" option on the UI -""" - -from utls import run_command, print_green_bold, print_blue_bold - -LINT_COMMAND = [ - "cargo", - "run", - "-r", - "--", - "chipmunk", - "lint", - # Set fail fast - "-f", - # Set the UI mode to report. - "-u", - "report", -] - - -def run_lint_command(): - """Runs lint command for all targets. This test will fail on linting errors as well. - Fail fast option is activated for the lint command here. - UI option set to "report" - """ - - print_blue_bold( - "Running Lint command with fail fast, showing log reprots once done..." - ) - run_command(LINT_COMMAND) - print_green_bold("*** Check for Lint Command Succeeded ***") - - -if __name__ == "__main__": - run_lint_command() diff --git a/cli/development-cli/integration_tests/print_dot.py b/cli/development-cli/integration_tests/print_dot.py deleted file mode 100644 index 01c3224edc..0000000000 --- a/cli/development-cli/integration_tests/print_dot.py +++ /dev/null @@ -1,41 +0,0 @@ -""" -Provides methods to test the Print-dot commands in Chipmunk Build CLI Tool -""" - -from utls import run_command, print_green_bold, print_blue_bold - -# Command and Args for the general print dot command -PRINT_DOT_COMMAND = [ - "cargo", - "run", - "-r", - "--", - "chipmunk", - "print-dot", -] - -# Command and Args for the print dot command with `--all` flag -PRINT_DOT_ALL_COMMAND = [ - "cargo", - "run", - "-r", - "--", - "chipmunk", - "print-dot", - "-a", -] - - -def run_print_dot_commands(): - """Runs print dot commands for both targets and tasks""" - print_blue_bold("Running General Print Dot command...") - run_command(PRINT_DOT_COMMAND) - print_green_bold("*** General Print Dot command Succeeded ***") - - print_blue_bold("Running Print Dot command with flag `--all`...") - run_command(PRINT_DOT_ALL_COMMAND) - print_green_bold("*** Print Dot command with flag `--all` Succeeded ***") - - -if __name__ == "__main__": - run_print_dot_commands() diff --git a/cli/development-cli/integration_tests/release.py b/cli/development-cli/integration_tests/release.py deleted file mode 100644 index a1c3bb6396..0000000000 --- a/cli/development-cli/integration_tests/release.py +++ /dev/null @@ -1,45 +0,0 @@ -""" -Provides methods to test the Release command in Chipmunk Build CLI Tool. -""" - -from utls import get_root, run_command, print_green_bold, print_blue_bold - - -RELEASE_COMMAND = [ - "cargo", - "run", - "-r", - "--", - "chipmunk", - "release", -] - - -def run_release_command(): - """Runs release command for Chipmunk. This command will fail if building Chipmunk in release mode fails too.""" - - print_blue_bold("Running Release Command...") - - run_command(RELEASE_COMMAND) - - print("Checking if release directory is not empty...") - - release_dir = get_root().joinpath("application/holder/release") - - if not release_dir.exists() or not release_dir.is_dir(): - raise AssertionError( - f"Release Path doesn't exist after release. Path: {release_dir}" - ) - - if not any(release_dir.iterdir()): - raise AssertionError( - f"Release Path exists after release but it's empty. Path: {release_dir}" - ) - - print("Checking release directory Succeeded") - - print_green_bold("*** Check for Release Command Succeeded ***") - - -if __name__ == "__main__": - run_release_command() diff --git a/cli/development-cli/integration_tests/run_all.py b/cli/development-cli/integration_tests/run_all.py deleted file mode 100644 index 5dc3b380b2..0000000000 --- a/cli/development-cli/integration_tests/run_all.py +++ /dev/null @@ -1,119 +0,0 @@ -""" -Provide method to run the tests for all the commands provided by Chipmunk Build CLI Tool -All the tests build and run the current build CLI implementation in release mode, therefore -it must be invoked from withing `Chipmunk/cli/development-cli` directory -""" - -from utls import print_red_bold, print_blue_bold, print_green_bold, print_cyan -from build import run_build_tests -from clean import run_clean_command -from environment import run_environment_commands -from lint import run_lint_command -from print_dot import run_print_dot_commands -from shell_compl import run_shell_completion_commands -from test_cmd import run_test_command -from release import run_release_command -from bench import run_benchmark_command -from user_config import run_user_configs_commands - - -def run_all(): - """Run the tests for all commands provided by Chipmunk Build CLI Tool""" - print_blue_bold("Running tests for all commands of Chipmunk Build CLI Tool") - - ### Environment ### - try: - run_environment_commands() - except Exception: - print_err("Environment") - raise - print_separator() - - ### Lint ### - try: - run_lint_command() - except Exception: - print_err("Lint") - raise - print_separator() - - ### Clean ### - try: - run_clean_command() - except Exception: - print_err("Clean") - raise - print_separator() - - ### Build ### - try: - run_build_tests() - except Exception: - print_err("Build") - raise - print_separator() - - ### Test ### - try: - run_test_command() - except Exception: - print_err("Test") - raise - print_separator() - - ### Release ### - try: - run_release_command() - except Exception: - print_err("Release") - raise - print_separator() - - ### Benchmarks ### - try: - run_benchmark_command() - except Exception: - print_err("Benchmarks") - raise - print_separator() - - ### Print Dots ### - try: - run_print_dot_commands() - except Exception: - print_err("Print Dots") - raise - print_separator() - - ### User Configurations ### - try: - run_user_configs_commands() - except Exception: - print_err("User Configurations") - raise - print_separator() - - ### Shell Completion ### - try: - run_shell_completion_commands() - except Exception: - print_err("Shell Completion") - raise - - print_green_bold( - "******** Tests for all commands of Chipmunk Build CLI Tool succeeded ********" - ) - - -def print_err(cmd_name: str): - """Prints a formatted error with the main command name""" - print_red_bold(f"Error while running tests for {cmd_name} commands") - - -def print_separator(): - """Prints a colored separator between main commands""" - print_cyan("------------------------------------------------------------------") - - -if __name__ == "__main__": - run_all() diff --git a/cli/development-cli/integration_tests/shell_compl.py b/cli/development-cli/integration_tests/shell_compl.py deleted file mode 100644 index f2f214239a..0000000000 --- a/cli/development-cli/integration_tests/shell_compl.py +++ /dev/null @@ -1,31 +0,0 @@ -""" -Provides methods to test the Shell Completion command for variety of shells in Chipmunk Build CLI Tool -""" - -from utls import run_command, print_blue_bold, print_green_bold - -PRINT_COMPLETION_COMMAND = [ - "cargo", - "run", - "-r", - "--", - "chipmunk", - "shell-completion", -] - -# These are all the supported shells for completion -SHELLS = ["bash", "elvish", "fish", "powershell", "zsh"] - - -def run_shell_completion_commands(): - """Runs commands to generate shell completion on all the available shells""" - for shell in SHELLS: - print_blue_bold(f"Running Shell Completion command for {shell}") - shell_command = PRINT_COMPLETION_COMMAND.copy() - shell_command.append(shell) - run_command(shell_command) - print_green_bold(f"*** Shell Completion Command for {shell} Succeeded ***") - - -if __name__ == "__main__": - run_shell_completion_commands() diff --git a/cli/development-cli/integration_tests/test_cmd.py b/cli/development-cli/integration_tests/test_cmd.py deleted file mode 100644 index 87c32cc4ab..0000000000 --- a/cli/development-cli/integration_tests/test_cmd.py +++ /dev/null @@ -1,31 +0,0 @@ -""" -Provides methods to test the Test Command in Chipmunk Build CLI Tool. -The command will have the UI option "report". -""" - -from utls import run_command, print_blue_bold, print_green_bold - -TEST_COMMAND = [ - "cargo", - "run", - "-r", - "--", - "chipmunk", - "test", - # Add UI option bar explicitly. - "-u", - "report", -] - - -def run_test_command(): - """Runs test command on all targets. This test will fail on test errors of chipmunk targets as well. - The command will have the UI option "report". - """ - print_blue_bold("Running test command with UI option 'report'...") - run_command(TEST_COMMAND) - print_green_bold("*** Check for Test Command Succeeded ***") - - -if __name__ == "__main__": - run_test_command() diff --git a/cli/development-cli/integration_tests/user_config.py b/cli/development-cli/integration_tests/user_config.py deleted file mode 100644 index 2b14465dc1..0000000000 --- a/cli/development-cli/integration_tests/user_config.py +++ /dev/null @@ -1,33 +0,0 @@ -""" -Provides methods to test the User Configurations commands in Chipmunk Build CLI Tool -""" - -from utls import run_command, print_blue_bold, print_green_bold - -CONFIG_BASE_COMMAND = [ - "cargo", - "run", - "-r", - "--", - "chipmunk", - "config", -] - - -def run_user_configs_commands(): - """Runs commands to print the default configurations and the path for the configurations file""" - print_blue_bold("Running print configurations file path Command...") - print_path_cmd = CONFIG_BASE_COMMAND.copy() - print_path_cmd.append("path") - run_command(print_path_cmd) - print_green_bold("*** Print configurations file path Command Succeeded ***") - - print_blue_bold("Running print default configurations Command...") - print_default_cmd = CONFIG_BASE_COMMAND.copy() - print_default_cmd.append("default") - run_command(print_default_cmd) - print_green_bold("*** Print default configurations Command Succeeded ***") - - -if __name__ == "__main__": - run_user_configs_commands() diff --git a/cli/development-cli/integration_tests/utls.py b/cli/development-cli/integration_tests/utls.py deleted file mode 100644 index 26f97b5fdf..0000000000 --- a/cli/development-cli/integration_tests/utls.py +++ /dev/null @@ -1,81 +0,0 @@ -""" -Utilities function to be used among the modules to test Chipmunk Build CLI Tool -""" - -from pathlib import Path -import subprocess - - -def get_root() -> Path: - """Get and validate the root directory of chipmunk repository - - Raises: - SystemError: If validation of root directory fails - - Returns: - Root directory of chipmunk - """ - - # We are using the utls file with the assumption that is path is `root/cli/development-cli/integration_tests` - root_dir = Path(__file__).parent.parent.parent.parent - - # Root Dir checks. This checks depends on the current chipmunk directories' structure - sub_dirs = ( - root_dir.joinpath(dir_name) - for dir_name in ["application", "developing", "cli", "scripts"] - ) - - if any(not path.exists() for path in sub_dirs): - raise SystemError(f"Root directory verification fail. Root Dir: {root_dir}") - - return root_dir - - -def run_command(command_args: list[str]): - """Runs the commands and its arguments after printing it to stdout - - Args: - command_args: The command and its arguments in one string list - """ - command_txt = " ".join(command_args) - print_bold(f"Command: {command_txt}") - subprocess.run(command_args, check=True) - - -class bcolors: - """Color codes representation in ANSI""" - - HEADER = "\033[95m" - OKBLUE = "\033[94m" - OKCYAN = "\033[96m" - OKGREEN = "\033[92m" - WARNING = "\033[93m" - FAIL = "\033[91m" - ENDC = "\033[0m" - BOLD = "\033[1m" - UNDERLINE = "\033[4m" - - -def print_bold(text: str): - """Prints the given text to stdout with bold attribute""" - print(f"{bcolors.BOLD}{text}{bcolors.ENDC}") - - -def print_blue_bold(text: str): - """Prints the given text to stdout with bold and blue attribute""" - print(f"{bcolors.BOLD}{bcolors.OKBLUE}{text}{bcolors.ENDC}{bcolors.ENDC}") - - -def print_green_bold(text: str): - """Prints the given text to stdout with bold and green attribute""" - print(f"{bcolors.BOLD}{bcolors.OKGREEN}{text}{bcolors.ENDC}{bcolors.ENDC}") - - -def print_red_bold(text: str): - """Prints the given text to stdout with bold and red attribute""" - print(f"{bcolors.BOLD}{bcolors.FAIL}{text}{bcolors.ENDC}{bcolors.ENDC}") - - -def print_cyan(text: str): - """Prints the given text to stdout with cyan color attribute""" - print(f"{bcolors.OKCYAN}{text}{bcolors.ENDC}") diff --git a/cli/development-cli/src/benchmark/core.rs b/cli/development-cli/src/benchmark/core.rs deleted file mode 100644 index b70d8b8698..0000000000 --- a/cli/development-cli/src/benchmark/core.rs +++ /dev/null @@ -1,159 +0,0 @@ -//! Manages benchmarks commands for rust core target. - -use std::{borrow::Cow, ffi::OsStr, fs::read_to_string, path::PathBuf}; - -use anyhow::{Context, ensure}; -use console::style; -use serde::Deserialize; - -use crate::{ - location::global_configs_path, log_print::print_log_separator, shell::shell_std_command, - target::Target, -}; - -/// Filename for rust core benchmarks configurations. -pub const BENCHES_CONFIG_FILENAME: &str = "bench_core.toml"; - -/// Environment variables to pass input source to benchmarks. -pub const INPUT_SOURCE_ENV_VAR: &str = "CHIPMUNK_BENCH_SOURCE"; -/// Environment variables to pass configurations to benchmarks. -pub const CONFIG_ENV_VAR: &str = "CHIPMUNK_BENCH_CONFIG"; -/// Environment variables to pass sample size to benchmarks. -pub const SAMPLE_SIZE_ENV_VAR: &str = "CHIPMUNK_BENCH_SAMPLE_SIZE"; - -#[derive(Debug, Clone, Deserialize)] -/// Configurations info for rust core benchmarks. -pub struct ConfigsInfos { - #[serde(rename = "bench")] - benches: Vec, -} - -impl ConfigsInfos { - /// Loads benchmarks infos from configuration file. - pub fn load() -> anyhow::Result { - let config_file_path = global_configs_path().join(BENCHES_CONFIG_FILENAME); - ensure!( - config_file_path.exists(), - "Benchmarks Configuration file doesn't exist. Path: {}", - config_file_path.display() - ); - - let content = read_to_string(&config_file_path).with_context(|| { - format!( - "Error while reading benchmarks configuration file. Path: {}", - config_file_path.display() - ) - })?; - - let config = toml::from_str(&content).with_context(|| { - format!( - "Error while parsing benchmarks configuration file. Path: {}", - config_file_path.display() - ) - })?; - - Ok(config) - } - - /// Prints the benchmarks infos from the configuration file. - pub fn print_list(&self) { - println!("Target Rust Core:"); - for (idx, bench) in self.benches.iter().enumerate() { - if idx > 0 { - println!(" --------------------"); - } - println!(" Benchmark: {}", bench.name); - println!(" Library: {}", bench.library); - } - } -} - -#[derive(Debug, Clone, Deserialize)] -/// Infos for a benchmark in rust core. -pub struct BenchmarkInfo { - /// Name of the benchmark as defined in `Cargo.toml` file. - name: String, - /// Library name where the benchmark is defined. - /// It represents the relative path of this library starting from rust core main path `.../indexer`. - library: String, -} - -pub fn run_benchmark( - name: String, - input_source: Option, - additional_config: Option, - run_count: u8, - sample_size: Option, -) -> anyhow::Result<()> { - let config_info = ConfigsInfos::load()?; - let bench = config_info - .benches - .into_iter() - .find(|b| b.name == name) - .with_context(|| format!("Benchmark with the name '{name}' is not defined"))?; - - let cwd = Target::Core.cwd().join(bench.library); - let cmd = format!("cargo bench --bench {}", bench.name); - - for i in 0..run_count { - if i > 0 { - print_log_separator(); - } - - let msg = if run_count > 1 { - format!("Running benchmark {name} for the {} time...", i + 1) - } else { - format!("Running benchmark {name}...") - }; - - println!("{}\n", style(msg).bold().blue()); - - let mut command = shell_std_command(); - command.arg(&cmd); - - if let Some(input) = input_source.as_deref() { - // Assuming that the input can be a path for a file in most cases, we need to resolve - // it and provide the absolute path before changing the current directory when running - // the benchmark command. - let input = resolve_if_path(input); - command.env(INPUT_SOURCE_ENV_VAR, input); - } - - if let Some(config) = additional_config.as_deref() { - // Same Case as input source above - let config = resolve_if_path(config); - command.env(CONFIG_ENV_VAR, config); - } - - if let Some(sample_size) = sample_size { - command.env(SAMPLE_SIZE_ENV_VAR, sample_size.to_string()); - } - - command.current_dir(&cwd); - - let status = command - .status() - .with_context(|| format!("Error while running bench command: {cmd}"))?; - - ensure!(status.success(), "Benchmark command failed. Command: {cmd}"); - } - - Ok(()) -} - -/// Resolves a relative path to its absolute path if the given argument is a valid path -/// in the current directory returning the absolute path in that case, otherwise it'll -/// return the same argument back. -/// -/// This function is needed to resolve the relative paths before changing the current directory -/// while running the benchmark commands. -fn resolve_if_path(arg: &str) -> Cow<'_, OsStr> { - let potential_path = PathBuf::from(&arg); - if potential_path.exists() - && let Ok(path) = std::path::absolute(potential_path) - { - return Cow::Owned(path.into_os_string()); - } - - Cow::Borrowed(arg.as_ref()) -} diff --git a/cli/development-cli/src/benchmark/mod.rs b/cli/development-cli/src/benchmark/mod.rs deleted file mode 100644 index f5a22f125a..0000000000 --- a/cli/development-cli/src/benchmark/mod.rs +++ /dev/null @@ -1,61 +0,0 @@ -//! Manages benchmarks commands to run the given benchmark or list all of the available ones. - -mod core; - -use clap::Subcommand; - -#[derive(Debug, Clone, Subcommand)] -/// Represents benchmarks commands to run the given benchmark or list all of the available ones. -pub enum BenchTarget { - /// Run benchmarks in Rust Core - Core { - /// Name of the benchmark as stated in configurations file. - #[arg(index = 1, required = true)] - name: String, - - /// Path or configurations of the input source to be used in the benchmarks - #[arg(short, long = "input")] - input_source: Option, - - /// Additional configurations for the benchmarks - #[arg(short, long)] - config: Option, - - /// Determines how many times to run the benchmark. - #[arg(short, long, default_value = "1")] - run_count: u8, - - /// Sets sample size on criterion benchmarks - #[arg(short, long)] - sample_size: Option, - }, - /// Lists all the available benchmarks in configuration files. - List, -} - -impl BenchTarget { - /// Runs the operations defined by each [`BenchTarget`] - pub fn run(self) -> anyhow::Result<()> { - match self { - BenchTarget::Core { - name, - input_source, - config, - run_count, - sample_size, - } => { - core::run_benchmark(name, input_source, config, run_count, sample_size)?; - } - BenchTarget::List => { - println!("Listing all benchmarks from configurations..."); - println!(); - - let core = core::ConfigsInfos::load()?; - core.print_list(); - println!(); - } - } - - Ok(()) - } -} diff --git a/cli/development-cli/src/build_state_records.rs b/cli/development-cli/src/build_state_records.rs deleted file mode 100644 index 3b5387ca8d..0000000000 --- a/cli/development-cli/src/build_state_records.rs +++ /dev/null @@ -1,269 +0,0 @@ -//! Module to manage the track changes between each run by comparing the files' states -//! and the included additional features between the current and the previous build run. -//! File comparison is done by calculating the checksum of the files on each target then comparing -//! it with persisted checksum from the last run. -//! -//! This module manages saving the loading the state records as well. - -use std::{ - collections::{BTreeMap, BTreeSet}, - fs::File, - io::{BufReader, BufWriter}, - path::PathBuf, - sync::{Mutex, OnceLock}, -}; - -use anyhow::{Context, anyhow}; -use dir_checksum::calc_combined_checksum; -use serde::{Deserialize, Serialize}; - -use crate::{ - JobsState, job_type::JobType, jobs_runner::additional_features::AdditionalFeatures, - location::get_root, target::Target, -}; - -/// Name of the file used to save the state of the last build run. -const PERSIST_FILE_NAME: &str = ".build_last_state"; - -#[derive(Debug, Serialize, Deserialize)] -/// Manages and compares the file states for the targets between current and previous builds. -/// It calculates the checksums of the files for each targets and saves them to a file after -/// each build, and for the next build it'll calculate the checksum again and compare it with -/// the saved one. -/// It also manages loading and clearing the saved checksum records as well. -pub struct BuildStateRecords { - production: bool, - states: BTreeMap, - #[serde(skip)] - involved_targets: BTreeSet, -} - -#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] -struct TargetBuildState { - hash: String, - #[serde(skip_serializing_if = "Option::is_none")] - #[serde(default)] - features: Option>, -} - -impl TargetBuildState { - pub fn new(hash: String) -> Self { - Self { - hash, - features: None, - } - } - - pub fn add_feature(&mut self, feature: AdditionalFeatures) { - let features = self.features.get_or_insert_with(BTreeSet::new); - features.insert(feature); - } -} - -/// Represents the comparison's result between the saved Checksum and the calculate one for the -/// build target -#[derive(Debug, Clone, Copy, Eq, PartialEq)] -pub enum ChecksumCompareResult { - Same, - Changed, -} - -impl BuildStateRecords { - pub fn new(production: bool) -> Self { - Self { - production, - states: BTreeMap::default(), - involved_targets: BTreeSet::default(), - } - } - - /// Update checksum records for involved jobs depending on the job type. - /// It will calculate new checksums if build tasks were involved. - pub fn update_and_save(job_type: JobType) -> anyhow::Result<()> { - // Records should be involved when build is called at some point of the job or by clean. - let (records_involved, prod) = match &job_type { - // Linting build targets for TS targets and their dependencies - JobType::Lint => (true, false), - JobType::Build { production } - | JobType::Run { production } - | JobType::Test { production } => (true, *production), - // With clean we need to remove the whole records file. - JobType::Clean => return Self::remove_records_file(), - JobType::Install { production } | JobType::AfterBuild { production } => { - (false, *production) - } - }; - - let records = Self::get(prod)?; - - let mut rec = records - .lock() - .map_err(|err| anyhow!("Error while acquiring items jobs mutex: Error {err}"))?; - - if records_involved { - rec.update_records()?; - } - - rec.persist_build_state() - .context("Error while saving the updated build states")?; - - Ok(()) - } - - /// Returns a reference to build states' records manager singleton - pub fn get(production: bool) -> anyhow::Result<&'static Mutex> { - static CHECKSUM_RECORDS: OnceLock>> = - OnceLock::new(); - - CHECKSUM_RECORDS - .get_or_init(|| BuildStateRecords::load(production).map(Mutex::new)) - .as_ref() - .map_err(|err| anyhow!("{err}")) - } - - /// Loads the persisted records from states file if exist - /// The states from previous build will be ignored in case production state between - /// them is different. - fn load(production: bool) -> anyhow::Result { - let file_path = Self::persist_file_path(); - - let records = if file_path.exists() { - let file = File::open(&file_path).with_context(|| { - format!( - "Error while opening last build state records file. Path: {}", - file_path.display() - ) - })?; - let reader = BufReader::new(file); - let mut records: Self = serde_json::from_reader(reader)?; - - // Production and development use the same artifacts which will lead to false - // positives when the artifacts are modified via another build but the checksum of - // source files still the same. - // To solve this problem we will reset the states of the opposite build production - // type when build is involved in the current process - if records.production != production { - records = Self::new(production); - } - records - } else { - Self::new(production) - }; - - Ok(records) - } - - /// Gets the path of the file where the build states are saved - fn persist_file_path() -> PathBuf { - get_root().join(PERSIST_FILE_NAME) - } - - /// Removes the records file if exists - pub fn remove_records_file() -> anyhow::Result<()> { - let file_path = Self::persist_file_path(); - if file_path.exists() { - std::fs::remove_file(&file_path).with_context(|| { - format!( - "Error while removing the file {} to reset build state records", - file_path.display() - ) - })?; - } - - Ok(()) - } - - /// Marks the job is involved in the record tracker - pub fn register_job(&mut self, target: Target) -> anyhow::Result<()> { - self.involved_targets.insert(target); - Ok(()) - } - - /// Compares the current build state for the given target with the previous run by calculating - /// and comparing the files checksum and the applied additional features to the given target. - /// - /// # Panics - /// - /// This method panics if the provided target isn't registered - pub fn compare_checksum(&self, target: Target) -> anyhow::Result { - assert!(self.involved_targets.contains(&target)); - let saved_state = match self.states.get(&target) { - Some(state) => state, - // If there is no existing checksum to compare with, then the checksums state has - // changed. - None => return Ok(ChecksumCompareResult::Changed), - }; - - let current_hash = Self::calc_hash_for_target(target)?; - - // Check for the hash only at first then check the additional features. - let comparison = if current_hash == saved_state.hash { - let mut target_features = None; - JobsState::get() - .additional_features() - .iter() - .filter(|f| f.apply_to_target() == target) - .for_each(|feature| { - target_features - .get_or_insert_with(BTreeSet::new) - .insert(*feature); - }); - - if target_features == saved_state.features { - ChecksumCompareResult::Same - } else { - ChecksumCompareResult::Changed - } - } else { - ChecksumCompareResult::Changed - }; - - Ok(comparison) - } - - /// Calculates the checksums for the source files of the given target - /// returning it converted to a string. - fn calc_hash_for_target(target: Target) -> anyhow::Result { - let path = target.cwd(); - calc_combined_checksum(path) - .map(|digst| digst.to_string()) - .with_context(|| { - format!("Error while calculating the current hash for target: {target}",) - }) - } - - /// Clears the states from previous build then calculates the states for the involved targets. - fn update_records(&mut self) -> anyhow::Result<()> { - self.states.clear(); - - let additional_features = JobsState::get().additional_features(); - for target in self.involved_targets.clone() { - let hash = Self::calc_hash_for_target(target)?; - let mut target_state = TargetBuildState::new(hash); - additional_features - .iter() - .filter(|f| f.apply_to_target() == target) - .for_each(|f| { - target_state.add_feature(*f); - }); - self.states.insert(target, target_state); - } - - Ok(()) - } - - fn persist_build_state(&self) -> anyhow::Result<()> { - let file_path = Self::persist_file_path(); - - let file = File::create(&file_path).with_context(|| { - format!( - "Creating build states file failed. Path: {}", - file_path.display() - ) - })?; - let writer = BufWriter::new(file); - serde_json::to_writer_pretty(writer, self) - .context("Error while serializing build state to persist them")?; - Ok(()) - } -} diff --git a/cli/development-cli/src/chipmunk_runner.rs b/cli/development-cli/src/chipmunk_runner.rs deleted file mode 100644 index 96f8eb2760..0000000000 --- a/cli/development-cli/src/chipmunk_runner.rs +++ /dev/null @@ -1,25 +0,0 @@ -//! Module to manage running Chipmunk after being built. - -use std::{io, process::ExitStatus}; - -use crate::{dev_tools::DevTool, shell::shell_tokio_command, target::Target}; - -/// Runs Chipmunk application from its electron path. -pub async fn run_chipmunk() -> io::Result { - let electron_path = Target::App.cwd(); - - let yarn_cmd = DevTool::Yarn.cmd(); - - let electron_arg = if cfg!(windows) { - "electron-win" - } else { - "electron" - }; - - shell_tokio_command() - .arg([yarn_cmd, "run", electron_arg].join(" ")) - .current_dir(electron_path) - .kill_on_drop(true) - .status() - .await -} diff --git a/cli/development-cli/src/cli_args.rs b/cli/development-cli/src/cli_args.rs deleted file mode 100644 index b649ebedc7..0000000000 --- a/cli/development-cli/src/cli_args.rs +++ /dev/null @@ -1,252 +0,0 @@ -//! Module for Command line commands and arguments and their descriptions. - -use std::path::PathBuf; - -use clap::{Parser, Subcommand}; -use serde::{Deserialize, Serialize}; - -use crate::{ - benchmark::BenchTarget, jobs_runner::additional_features::AdditionalFeatures, target::Target, -}; - -const FAIL_FAST_HELP_TEXT: &str = "Stops execution immediately if any job fails."; -const NO_FAIL_FAST_HELP_TEXT: &str = "Don't stops execution immediately if any job fails."; -const UI_LOG_OPTION_HELP_TEXT: &str = - "Specifies the UI options for displaying command logs and progress in the terminal"; -const ADDITIONAL_FEATURES_HELP_TEXT: &str = - "Specifies additional features to be enabled in the build process"; -const SKIP_ENV_CHECKS_TEXT: &str = "Skip development environment checks."; - -const HELP_TEMPLATE: &str = "\ -{before-help}{about} -version: {version} - -{usage-heading} {usage} - -{all-args}{after-help} -"; - -// To enable calling the app as cargo subcommand the following changes were made: -// * Cli commands are nested are subcommand within Chipmunk command -// * Command name set to "cargo" -#[derive(Parser)] -#[command(name = "cargo", bin_name = "cargo")] -pub enum CargoCli { - Chipmunk(Cli), -} - -#[derive(clap::Args, Debug)] -#[command(author, version, about, help_template = HELP_TEMPLATE)] -pub struct Cli { - #[command(subcommand)] - pub command: Command, -} - -// TODO: Keep tracking on GitHub issue Nr. 4416 on clap crate to remove the hard-coded -// alaises in options description. -// Link for the issue: https://github.com/clap-rs/clap/issues/4416. - -#[derive(Debug, Clone, Copy, Default, clap::ValueEnum, Serialize, Deserialize)] -/// Specifies the UI mode for displaying command logs and progress in the terminal. -pub enum UiMode { - /// Displays progress bars, showing the current line of the output of each command. [aliases: 'b'] - #[default] - #[value(name = "bars", alias("b"))] - #[serde(rename = "bars")] - ProgressBars, - /// Displays progress bars and prints a summary of all command logs to stdout after all jobs have finished. [aliases: 'r'] - #[value(name = "report", alias("r"))] - #[serde(rename = "report")] - BarsWithReport, - /// Outputs each job's result to stdout once the job finishes. No progress bars are displayed. [aliases: 'p'] - #[value(name = "print", alias("p"))] - #[serde(rename = "print")] - PrintOnJobFinish, - /// Outputs logs immediately as they are produced, which may cause overlapping logs for parallel jobs. - /// No progress bars are displayed. [aliases: 'i'] - #[value(name = "immediate", alias("i"))] - #[serde(rename = "immediate")] - PrintImmediately, -} - -#[derive(Subcommand, Debug, Clone)] -pub enum Command { - /// Provides commands for the needed tools for the development - #[clap(visible_alias = "env")] - #[command(subcommand)] - Environment(EnvironmentCommand), - /// Prints an overview of targets dependencies in print-dot format for `Graphviz` - #[clap(visible_alias = "dot")] - PrintDot { - /// Show all jobs and their relations - #[arg(short, long, default_value_t = false)] - all_jobs: bool, - }, - #[clap(name = "configuration", visible_alias = "config")] - #[command(subcommand)] - /// Provides commands for the configuration of this tool on user level. - UserConfiguration(UserConfigCommand), - /// Runs linting & clippy for all or the specified targets - Lint { - /// Target to lint, by default whole application will be linted - #[arg(index = 1)] - target: Option>, - - #[arg(short, long, help = FAIL_FAST_HELP_TEXT)] - fail_fast: bool, - - #[arg(short, long, help = UI_LOG_OPTION_HELP_TEXT, value_enum)] - ui_mode: Option, - - #[arg(long = "skip-check", help = SKIP_ENV_CHECKS_TEXT, default_value_t = false)] - skip_env_checks: bool, - }, - /// Build all or the specified targets - Build { - /// Target to build, by default whole application will be built - #[arg(index = 1)] - target: Option>, - - /// Build release version - #[arg(short, long, default_value_t = false)] - production: bool, - - #[arg(short, long, help = FAIL_FAST_HELP_TEXT)] - fail_fast: bool, - - #[arg(short, long, help = UI_LOG_OPTION_HELP_TEXT, value_enum)] - ui_mode: Option, - - #[arg(long = "skip-check", help = SKIP_ENV_CHECKS_TEXT, default_value_t = false)] - skip_env_checks: bool, - - #[arg(short, long, help = ADDITIONAL_FEATURES_HELP_TEXT)] - additional_features: Option>, - }, - /// Clean all or the specified targets - Clean { - /// Target to clean, by default whole application will be cleaned - #[arg(index = 1)] - target: Option>, - - #[arg(short, long, help = UI_LOG_OPTION_HELP_TEXT, value_enum)] - ui_mode: Option, - - #[arg(long = "skip-check", help = SKIP_ENV_CHECKS_TEXT, default_value_t = false)] - skip_env_checks: bool, - }, - /// Run tests for all or the specified targets - Test { - /// Target to test, by default whole application will be tested - #[arg(index = 1)] - target: Option>, - - /// Test release version - #[arg(short, long, default_value_t = false)] - production: bool, - - #[arg(short, long, help = FAIL_FAST_HELP_TEXT)] - fail_fast: bool, - - #[arg(short, long, help = UI_LOG_OPTION_HELP_TEXT, value_enum)] - ui_mode: Option, - - #[arg(long = "skip-check", help = SKIP_ENV_CHECKS_TEXT, default_value_t = false)] - skip_env_checks: bool, - - /// Accepts the new results in all snapshot tests. - #[arg(short, long, default_value_t = false)] - accept_snapshots: bool, - - /// Sets which test specifications should be run. - /// Currently implemented for wrapper target (ts-bindings) only - #[arg(short, long = "specs")] - specifications: Vec, - }, - /// Build and Run the application - Run { - /// Run release version - #[arg(short, long, default_value_t = false)] - production: bool, - - #[arg(short, long, help = NO_FAIL_FAST_HELP_TEXT)] - no_fail_fast: bool, - - #[arg(short, long, help = UI_LOG_OPTION_HELP_TEXT, value_enum)] - ui_mode: Option, - - #[arg(long = "skip-check", help = SKIP_ENV_CHECKS_TEXT, default_value_t = false)] - skip_env_checks: bool, - - #[arg(short, long, help = ADDITIONAL_FEATURES_HELP_TEXT)] - additional_features: Option>, - }, - /// Builds Chipmunk and generates a release (defaults to Release mode). - Release { - /// Verbose logging - #[arg(short, long, default_value_t = false)] - verbose: bool, - #[arg(short, long, help = NO_FAIL_FAST_HELP_TEXT)] - no_fail_fast: bool, - /// Build chipmunk in development mode - #[arg(short, long, default_value_t = false)] - development: bool, - /// Path to the configuration file for code signing - #[arg(short, long)] - code_sign: Option, - /// Custom platform name to be used in release archive file name. - #[arg(short = 'p', long = "platform")] - custom_platform: Option, - }, - /// Runs benchmarks for the given target, its input source and configuration. - #[clap(visible_alias = "bench")] - #[command(subcommand)] - Benchmark(BenchTarget), - /// Resets the build states records what is used to check if there were any changes for - /// each target. - #[clap(visible_alias = "reset")] - ResetRecords, - /// Generate shell completion for the commands of this tool in the given shell, - /// printing them to stdout. - #[clap(visible_alias = "compl")] - ShellCompletion { - /// Shell to generate the completion for - #[arg(value_enum)] - shell: clap_complete::Shell, - }, -} - -#[derive(Subcommand, Debug, Clone)] -pub enum EnvironmentCommand { - /// Checks that all needed tools for the development are installed - Check, - /// Prints the information of the needed tools for the development - #[clap(visible_alias = "list")] - Print, -} - -#[derive(Debug, Subcommand, Clone, Copy)] -pub enum UserConfigCommand { - #[clap(visible_alias = "path")] - /// Prints the path to the user configurations file. - PrintPath, - #[clap(name = "print-default", visible_alias = "default")] - /// Dumps the configurations with the default values to be used as a reference and base to - /// user configurations. - DumpDefaultConfiguration, - #[clap(name = "write-default", visible_alias = "write")] - /// Creates user configurations file if doesn't exist then writes the default configurations to it. - WriteDefaultToFile, -} - -#[cfg(test)] -mod tests { - use super::*; - - /// Ensure the CLI configurations are valid. - #[test] - fn verify_cli() { - use clap::CommandFactory; - CargoCli::command().debug_assert(); - } -} diff --git a/cli/development-cli/src/dev_environment/min_versions.rs b/cli/development-cli/src/dev_environment/min_versions.rs deleted file mode 100644 index 7682637443..0000000000 --- a/cli/development-cli/src/dev_environment/min_versions.rs +++ /dev/null @@ -1,74 +0,0 @@ -//! Manages the Loading and providing the minimal required version for the development tools -//! used in Chipmunk. - -use anyhow::Context; -use serde::Deserialize; - -use crate::{dev_tools::DevTool, location::global_configs_path, version::Version}; - -/// Filename of minimum required versions of development tools. -const MIN_VERSIONS_FILENAME: &str = "min_versions.toml"; - -#[derive(Debug, Clone, Deserialize)] -/// Represents the minimum versions required for the development of Chipmunk -pub struct MinVersions { - cargo: Version, - node: Version, - npm: Version, - yarn: Version, - wasm_pack: Version, - nj_cli: Version, -} - -impl MinVersions { - /// Loads the minimum required versions from their configuration files within - /// Chipmunk repository. - pub fn load() -> anyhow::Result { - let min_versions_path = global_configs_path().join(MIN_VERSIONS_FILENAME); - // Don't break if versions file doesn't exist, to avoid forcing developers to merge - // master into their branches once they updated the development tool. - if !min_versions_path.exists() { - let mock_min_versions = Self::get_mock(); - return Ok(mock_min_versions); - } - let file_content = std::fs::read_to_string(&min_versions_path).with_context(|| { - format!( - "Reading min versions file content failed. Path: {}", - min_versions_path.display() - ) - })?; - toml::from_str(&file_content).with_context(|| { - format!( - "Desrializing min versions text failed. File Path: {}", - min_versions_path.display(), - ) - }) - } - - /// Provides an instance of [`MinVersions`] with the lowest version for each of its fields. - /// It can be used as fallback when there is no configuration files for min versions exist. - fn get_mock() -> Self { - let version = Version::new(0, 1, 0); - Self { - cargo: version, - node: version, - npm: version, - yarn: version, - wasm_pack: version, - nj_cli: version, - } - } - - /// Provides the minimum required version for the provided development tool - /// when configured. - pub fn get_version(&self, tool: DevTool) -> Option<&Version> { - match tool { - DevTool::Node => Some(&self.node), - DevTool::Npm => Some(&self.npm), - DevTool::Yarn => Some(&self.yarn), - DevTool::Cargo => Some(&self.cargo), - DevTool::WasmPack => Some(&self.wasm_pack), - DevTool::NjCli => Some(&self.nj_cli), - } - } -} diff --git a/cli/development-cli/src/dev_environment/mod.rs b/cli/development-cli/src/dev_environment/mod.rs deleted file mode 100644 index 70f13a864f..0000000000 --- a/cli/development-cli/src/dev_environment/mod.rs +++ /dev/null @@ -1,179 +0,0 @@ -//! Manages the information and checks for the needed tools for Chipmunk development. -//! -//! Chipmunk is built using different technologies and need a variety of development tools to be -//! installed to build it and run it in development environment. - -use core::str; -use std::{fmt::Write, io}; - -use anyhow::{Context, anyhow, bail}; -use console::style; -use min_versions::MinVersions; -use rayon::iter::{IntoParallelIterator, ParallelIterator}; - -use crate::{dev_tools::DevTool, shell::shell_std_command, version::Version}; - -mod min_versions; - -const VERSION_ARG: &str = "--version"; - -/// The result of running a validation process for a development tool. -#[derive(Debug)] -enum ToolValidationResult { - /// Tool is valid. - Valid, - /// Check is skipped. - Skipped, - /// Process command to get tool version failed with the command error when exists. - CommandFailed(Option), - /// Installed version of the tool is outdated. - VersionOutdated { - installed: Version, - required: Version, - }, -} - -/// Validates development tools required for Chipmunk development. -/// -/// Checks installed development tools by running process commands to retrieve their versions -/// and comparing them against minimum required versions. -/// -/// This function will validate all tools returning an error if any tool is invalid with the error -/// messages for all tools. -pub fn validate_dev_tools() -> anyhow::Result<()> { - let min_versions = MinVersions::load().context("Loading minimal required versions failed")?; - - // Running the validation in parallel improved the performance significantly since - // each tool will spawn a process command and have a regex validation afterward. - let validation_errors: Vec = DevTool::all() - .into_par_iter() - .filter_map(|tool| { - let mut error_msg = match validate_tool(*tool, &min_versions) { - ToolValidationResult::Valid | ToolValidationResult::Skipped => return None, - ToolValidationResult::CommandFailed(cmd_error) => { - let mut err_msg = format!("Required dependency '{tool}' is not installed.\n"); - if let Some(cmd_error) = cmd_error { - let _ = writeln!(&mut err_msg, "Command Error info: {cmd_error}"); - } - err_msg - } - ToolValidationResult::VersionOutdated { - installed, - required, - } => { - format!( - "Installed version for '{tool}' is outdated.\n\ - Installed Version: {installed}. Minimum Required: {required}\n" - ) - } - }; - - if let Some(install_hint) = tool.install_hint() { - let _ = writeln!( - error_msg, - "Consider installing/updating it using the command '{install_hint}'" - ); - } - - Some(error_msg) - }) - .collect(); - - if validation_errors.is_empty() { - return Ok(()); - } - - let mut error_lines = String::from("Following dependencies are missing/outdated:\n"); - for err_msg in validation_errors { - write!(error_lines, "{err_msg}")?; - writeln!( - error_lines, - "------------------------------------------------------------------" - )?; - } - - Err(anyhow!("{error_lines}")) -} - -/// Checks if tool is installed by calling for its version then verify that -/// the installed version isn't outdated. -/// -/// # Note: -/// -/// This function will skip version validation if it's unable to parse its version from the -/// command output, while printing and error on the screen. -fn validate_tool(tool: DevTool, min_versions: &MinVersions) -> ToolValidationResult { - let cmd_status = shell_std_command() - .arg(format! {"{} {VERSION_ARG}", tool.cmd()}) - .output(); - - match cmd_status { - Ok(out) => { - if !out.status.success() { - return ToolValidationResult::CommandFailed(None); - } - // Ensure installed version matches or greater than minimal required version. - let min_version = match min_versions.get_version(tool) { - Some(min_version) => min_version, - None => return ToolValidationResult::Skipped, - }; - let output = String::from_utf8_lossy(&out.stdout); - match Version::regex_extract(&output) { - Ok(installed) => { - if &installed < min_version { - ToolValidationResult::VersionOutdated { - installed, - required: min_version.to_owned(), - } - } else { - ToolValidationResult::Valid - } - } - Err(error) => { - // Don't stop the whole process of parsing output errors. - // It's possible for this parsing to fail on future outputs - // and we want to avoid stopping all tasks because of that. - let msg = format!( - "Verifying {tool} version skipped due to error while parsing its version. Error: {error}" - ); - eprintln!("{}", style(msg).yellow()); - - ToolValidationResult::Skipped - } - } - } - Err(err) => ToolValidationResult::CommandFailed(Some(err)), - } -} - -/// Prints the information of the needed tools for the development if available, otherwise prints -/// error information to `stderr` -pub fn print_env_info() -> anyhow::Result<()> { - let mut errored = false; - for tool in DevTool::all() { - println!("{tool} Info:"); - let cmd = tool.cmd(); - match shell_std_command() - .arg(format!("{cmd} {VERSION_ARG}")) - .status() - { - Ok(s) => { - if !s.success() { - errored = true; - eprintln!("Error while retrieving dependency's information"); - } - } - Err(err) => { - errored = true; - eprintln!("Error while retrieving dependency's information: {err}") - } - } - println!("------------------------------------------------------------------"); - } - - if errored { - bail!("Error(s) while resolving development tools"); - } - - Ok(()) -} diff --git a/cli/development-cli/src/dev_tools.rs b/cli/development-cli/src/dev_tools.rs deleted file mode 100644 index f36e7408ab..0000000000 --- a/cli/development-cli/src/dev_tools.rs +++ /dev/null @@ -1,77 +0,0 @@ -//! Manages finding and resolving the paths of the installed development tools on different -//! platforms. - -use std::fmt::Display; - -#[derive(Debug, Clone, Copy)] -/// Represents the development tools which used to build & test the app -pub enum DevTool { - Node, - Npm, - Yarn, - Cargo, - WasmPack, - NjCli, -} - -impl Display for DevTool { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - match self { - DevTool::Node => write!(f, "NodeJS"), - DevTool::Npm => write!(f, "npm"), - DevTool::Yarn => write!(f, "yarn"), - DevTool::Cargo => write!(f, "cargo"), - DevTool::WasmPack => write!(f, "wasm-pack"), - DevTool::NjCli => write!(f, "nj-cl"), - } - } -} - -impl DevTool { - /// Returns all needed tools to chipmunk development - pub fn all() -> &'static [DevTool] { - if cfg!(debug_assertions) { - // This check to remember to add the newly added enums to this function - match DevTool::Node { - DevTool::Node => (), - DevTool::Npm => (), - DevTool::Yarn => (), - DevTool::Cargo => (), - DevTool::WasmPack => (), - DevTool::NjCli => (), - }; - } - - [ - DevTool::Node, - DevTool::Npm, - DevTool::Yarn, - DevTool::Cargo, - DevTool::WasmPack, - DevTool::NjCli, - ] - .as_slice() - } - - /// Provide the suggested way to install the tool - pub fn install_hint(self) -> Option<&'static str> { - match self { - DevTool::Node | DevTool::Npm | DevTool::Cargo => None, - DevTool::Yarn => Some("npm install --global yarn"), - DevTool::WasmPack => Some("cargo install wasm-pack"), - DevTool::NjCli => Some("cargo install nj-cli"), - } - } - - /// Provides the command line command for the development tool. - pub const fn cmd(self) -> &'static str { - match self { - DevTool::Node => "node", - DevTool::Npm => "npm", - DevTool::Yarn => "yarn", - DevTool::Cargo => "cargo", - DevTool::WasmPack => "wasm-pack", - DevTool::NjCli => "nj-cli", - } - } -} diff --git a/cli/development-cli/src/fstools.rs b/cli/development-cli/src/fstools.rs deleted file mode 100644 index ba155da9ce..0000000000 --- a/cli/development-cli/src/fstools.rs +++ /dev/null @@ -1,91 +0,0 @@ -//! Provides function to do file system operation while communicating the progress with the -//! `Tracker`. - -extern crate fs_extra; -use anyhow::{Context, Error}; -use fs_extra::dir::{CopyOptions, TransitProcess, TransitProcessResult, copy_with_progress}; -use std::collections::HashSet; -use std::sync::mpsc; -use std::{fs, path::PathBuf}; - -use crate::jobs_runner::JobDefinition; -use crate::tracker::get_tracker; - -/// Spawn a job to copy a file, adding the info the report logs -pub fn cp_file(job_def: JobDefinition, src: PathBuf, dest: PathBuf) -> Result<(), Error> { - let msg = format!("copying file: '{}' to '{}'", src.display(), dest.display()); - let tracker = get_tracker(); - tracker.msg(job_def, msg); - - fs::copy(&src, &dest).with_context(|| { - format!( - "Error while copying file '{}' to '{}'", - src.display(), - dest.display() - ) - })?; - tracker.msg( - job_def, - format!("copied: {} to {}", src.display(), dest.display()), - ); - Ok(()) -} - -/// Spawn a job to copy a directory, adding the info the report logs -pub async fn cp_folder(job_def: JobDefinition, src: PathBuf, dest: PathBuf) -> Result<(), Error> { - let options = CopyOptions::new(); - let (tx, rx): (mpsc::Sender, mpsc::Receiver) = mpsc::channel(); - - let path_display = format!("'{}' to '{}'", src.display(), dest.display()); - - let report_msg = format!("copying directory: {path_display}"); - - let tracker = get_tracker(); - tracker.msg(job_def, report_msg); - - let _ = tokio::spawn(async move { - copy_with_progress(src, dest, &options, |info| { - if tx.send(info).is_err() { - eprintln!("Fail to send copying progress"); - } - TransitProcessResult::ContinueOrAbort - }) - }) - .await - .with_context(|| format!("Error while copying directory: {path_display}"))?; - - // Don't send update msg for each file more than once. - let mut copied_set = HashSet::new(); - - while let Ok(info) = rx.recv() { - if copied_set.insert(info.file_name.clone()) { - tracker.msg( - job_def, - format!( - "copied: {} bytes; current: {}", - info.copied_bytes, info.file_name - ), - ); - } - - tracker.progress(job_def, None); - } - - let msg = format!("copied: {path_display}"); - tracker.msg(job_def, msg); - Ok(()) -} - -/// Spawn a job to remove a directory recursively, adding the info the report logs -pub fn rm_folder(job_def: JobDefinition, path: &PathBuf) -> Result<(), Error> { - if !path.exists() { - return Ok(()); - } - let tracker = get_tracker(); - tracker.msg(job_def, format!("removing directory: {}", path.display())); - - fs::remove_dir_all(path)?; - - tracker.msg(job_def, format!("removed: {}", path.display(),)); - Ok(()) -} diff --git a/cli/development-cli/src/job_type.rs b/cli/development-cli/src/job_type.rs deleted file mode 100644 index 1d64521354..0000000000 --- a/cli/development-cli/src/job_type.rs +++ /dev/null @@ -1,106 +0,0 @@ -//! Provides the definitions of job types (build, lint ...) and their relations. - -use std::fmt::Display; - -#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord)] -// * NOTE: The order of job types must match the running-order of them because it's used by -// solving their dependencies-graph using BTreeMap -// -// * NOTE: We provide all job types in match arms without using wild-card matching nor -// `matches!()` macro to keep the compiler assistance when adding new job types. -pub enum JobType { - Clean, - Install { production: bool }, - Build { production: bool }, - AfterBuild { production: bool }, - Lint, - Test { production: bool }, - Run { production: bool }, -} - -impl Display for JobType { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - match self { - JobType::Lint => write!(f, "Lint"), - JobType::Clean => write!(f, "Clean"), - JobType::Build { .. } => write!(f, "Build"), - JobType::Install { .. } => write!(f, "Install"), - JobType::AfterBuild { .. } => write!(f, "After Build"), - JobType::Test { .. } => write!(f, "Test"), - JobType::Run { .. } => write!(f, "Run"), - } - } -} - -impl JobType { - pub fn is_production(&self) -> Option { - match self { - JobType::Lint | JobType::Clean => None, - JobType::Build { production } - | JobType::Install { production } - | JobType::AfterBuild { production } - | JobType::Test { production } - | JobType::Run { production } => Some(*production), - } - } - - /// Returns job types that are involved with this job and should run with it. - pub fn get_involved_jobs(&self) -> Vec { - match self { - // Linting TS needs to building too to check for type errors - JobType::Lint => vec![JobType::Build { production: false }], - JobType::Build { production } => vec![ - JobType::Install { - production: *production, - }, - JobType::AfterBuild { - production: *production, - }, - ], - // Only TS and WASM Tests need to build before running the tests - JobType::Run { production } | JobType::Test { production } => vec![JobType::Build { - production: *production, - }], - JobType::Clean | JobType::Install { .. } | JobType::AfterBuild { .. } => Vec::new(), - } - } - - /// Returns if the job type is related to the build process. (install, build, or after build) - pub fn is_build_related(&self) -> bool { - match self { - JobType::Install { .. } | JobType::Build { .. } | JobType::AfterBuild { .. } => true, - JobType::Clean | JobType::Lint | JobType::Test { .. } | JobType::Run { .. } => false, - } - } -} - -#[cfg(test)] -impl JobType { - /// Returns all existing targets with production set to false for the types with - /// production infos - pub fn all() -> &'static [JobType] { - if cfg!(debug_assertions) { - // This check to remember to add the newly added enums to this function - match JobType::Lint { - JobType::Lint => (), - JobType::Clean => (), - JobType::Build { .. } => (), - JobType::Install { .. } => (), - JobType::AfterBuild { .. } => (), - JobType::Test { .. } => (), - JobType::Run { .. } => (), - }; - } - - [ - JobType::Lint, - JobType::Clean, - JobType::Build { production: false }, - JobType::Install { production: false }, - JobType::AfterBuild { production: false }, - JobType::Test { production: false }, - JobType::Run { production: false }, - ] - .as_slice() - } -} diff --git a/cli/development-cli/src/jobs_runner/additional_features.rs b/cli/development-cli/src/jobs_runner/additional_features.rs deleted file mode 100644 index bd479df0f6..0000000000 --- a/cli/development-cli/src/jobs_runner/additional_features.rs +++ /dev/null @@ -1,31 +0,0 @@ -//! Module for type definitions and implementations of additional features that can be applied -//! to specific targets in the build process. - -use serde::{Deserialize, Serialize}; - -use crate::target::Target; - -/// Represents defined additional features that can activated on parts on build process. -#[derive( - Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, clap::ValueEnum, Serialize, Deserialize, -)] -pub enum AdditionalFeatures { - /// Activate `custom-alloc` feature in rs-binding to use custom memory allocator - /// instead of the default one. - #[serde(rename = "custom-alloc")] - #[value(name = "custom-alloc")] - CustomAllocator = 1, -} - -impl AdditionalFeatures { - pub fn as_usize(self) -> usize { - self as usize - } - - /// Returns the target to which this feature applies. - pub fn apply_to_target(self) -> Target { - match self { - AdditionalFeatures::CustomAllocator => Target::Binding, - } - } -} diff --git a/cli/development-cli/src/jobs_runner/job_definition.rs b/cli/development-cli/src/jobs_runner/job_definition.rs deleted file mode 100644 index d27f67296f..0000000000 --- a/cli/development-cli/src/jobs_runner/job_definition.rs +++ /dev/null @@ -1,103 +0,0 @@ -//! Provides the type definitions and methods for a job defined with job type and the given target. - -use crate::{job_type::JobType, spawner::SpawnResult, target::Target, tracker::get_tracker}; - -#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord)] -/// Represents a development job definition -/// -/// * `target`: Job Target (Shared, Client...) -/// * `job_type`: Job Type (Build, Test...) -pub struct JobDefinition { - pub target: Target, - pub job_type: JobType, -} - -impl JobDefinition { - pub fn new(target: Target, job_type: JobType) -> Self { - Self { target, job_type } - } - - /// Provide formatted job title with target and job type infos - pub fn job_title(self) -> String { - format!("{} {}", self.target, self.job_type) - } - - /// Run the job definition if it has a job, communicating its status with the UI bars - pub async fn run(self, skip: bool) -> Option> { - let tracker = get_tracker(); - if let Err(err) = tracker.start(self).await { - return Some(Err(err)); - } - - let res = self.run_intern(skip).await; - - match res.as_ref() { - Some(Ok(res)) => { - if res.status.success() { - if res.skipped { - tracker.skipped(self, String::default()); - } else { - tracker.success(self, String::default()); - } - } else { - tracker.fail(self, "finished with errors".into()); - } - } - Some(Err(err)) => tracker.fail(self, format!("finished with errors. {err}")), - None => (), - } - - res - } - - #[inline] - /// Runs the job definition if it has a job - async fn run_intern(self, skip: bool) -> Option> { - let res = match self.job_type { - JobType::Lint => self.target.check().await, - JobType::Build { production } => self.target.build(production, skip).await, - // Install run always in development at first then it should get reinstalled with - // production after build command is ran. - // We must deliver the correct jobtype though for the communication with tracker. - JobType::Install { production } => { - return self - .target - .install(false, skip, Some(JobType::Install { production })) - .await; - } - JobType::AfterBuild { production } => { - return self.target.after_build(production, skip).await; - } - JobType::Clean => self.target.reset().await, - JobType::Test { production } => return self.target.test(production, skip).await, - JobType::Run { .. } => return None, - }; - - Some(res) - } -} - -#[cfg(test)] -mod tests { - - use crate::{job_type::JobType, jobs_runner::JobDefinition}; - - use super::Target; - - #[tokio::test] - async fn target_has_job() { - for target in Target::all() { - for job_type in JobType::all() { - if !target.has_job(*job_type) { - let job_def = JobDefinition::new(*target, *job_type); - assert!( - job_def.run_intern(false).await.is_none(), - "'{}' has no job for '{}' but it returns Some when calling run", - target, - job_type - ) - } - } - } - } -} diff --git a/cli/development-cli/src/jobs_runner/jobs_resolver.rs b/cli/development-cli/src/jobs_runner/jobs_resolver.rs deleted file mode 100644 index e58166f898..0000000000 --- a/cli/development-cli/src/jobs_runner/jobs_resolver.rs +++ /dev/null @@ -1,663 +0,0 @@ -//! Provides methods to resolve all the dependencies for the given job definition. - -use std::collections::{BTreeMap, BTreeSet}; - -use crate::{job_type::JobType, target::Target}; - -use super::JobDefinition; - -/// Resolve tasks dependencies for the given targets and job, -/// returning dependencies map for the tasks -pub fn resolve( - targets: &[Target], - main_job: JobType, -) -> BTreeMap> { - let involved_jobs = flatten_jobs(main_job); - - let has_build_deps = involved_jobs - .iter() - .any(|job| matches!(job, JobType::Build { .. })); - - let involved_targets = if has_build_deps { - flatten_targets_for_build(targets) - } else { - BTreeSet::from_iter(targets.to_owned()) - }; - - let mut jobs_tree: BTreeMap> = BTreeMap::new(); - - for target in involved_targets { - for job in involved_jobs - .iter() - .filter(|&&j| is_job_involved(target, j, &main_job, targets)) - { - // Start with dependencies from other targets (Applies for Build & Install jobs only) - let mut dep_jobs = match job { - // Install jobs are involved here too because copying the files in the after build - // process could delete the current files. - JobType::Build { .. } | JobType::Install { .. } => { - let deps = target.flatten_deps(); - - // Jobs of the dependencies are already included in the jobs tree because we - // are iterating through targets and jobs in the matching order of their - // dependencies relations. - jobs_tree - .keys() - .filter(|job_def| { - job_def.job_type.is_build_related() && deps.contains(&job_def.target) - }) - .cloned() - .collect() - } - - // Other job types doesn't have dependencies - JobType::Clean - | JobType::AfterBuild { .. } - | JobType::Lint - | JobType::Test { .. } - | JobType::Run { .. } => Vec::new(), - }; - - // Add dependencies jobs from the same target - // NOTE: This relays on that JobType enums are listed in the current order - dep_jobs.extend( - jobs_tree - .keys() - .filter(|job_d| job_d.target == target) - .cloned(), - ); - - let job_def = JobDefinition::new(target, *job); - - assert!( - jobs_tree.insert(job_def, dep_jobs).is_none(), - "JobDefinition is added to tree more than once. Target: {target}, Job: {job}", - ); - } - } - - jobs_tree -} - -/// Returns all involved job types according to the given job type. -fn flatten_jobs(main_job: JobType) -> BTreeSet { - fn flatten_rec(job: JobType, involved_jobs: &mut BTreeSet) { - if !involved_jobs.insert(job) { - return; - } - for involved_job in job.get_involved_jobs() { - flatten_rec(involved_job, involved_jobs); - } - } - - let mut jobs = BTreeSet::new(); - - flatten_rec(main_job, &mut jobs); - - jobs -} - -/// Returns all involved targets for the given target for build tasks -fn flatten_targets_for_build(targets: &[Target]) -> BTreeSet { - let mut resolved_targets = BTreeSet::from_iter(targets.iter().copied()); - - for target in targets { - resolved_targets.extend(target.flatten_deps()); - } - - resolved_targets -} - -/// Check if job involved depending if the target has a job for the current job type + Additional -/// filter based on the main job type. -/// The additional filter is currently used because linting and running tests on TS and WASM targets -/// require all build steps to be done on them and their dependencies. -/// -/// * `target`: Job Target -/// * `current_job`: Current job type to check if it has job for the given target -/// * `main_job`: Main job type, which is used for the additional filter -/// * `original_targets`: original targets associated with the main job -fn is_job_involved( - target: Target, - current_job: JobType, - main_job: &JobType, - original_targets: &[Target], -) -> bool { - // This filter handle the special cases of adding build steps for TS and WASM lints and tests - // and remove those jobs from the not involved targets - let additional_filter = || { - match main_job { - // Linting for TS and WASM targets inquire that those targets are built - JobType::Lint => match target { - // * Linting for Rust core doesn't need any build and must be excluded in the - // additional filter. - Target::Core => match current_job { - // When the current job matches the main job we need to check if the target is - // included in the original targets - JobType::Lint => original_targets.contains(&target), - // Otherwise we need to check if the targets have core in their dependencies to - // build the core since it's needed for their linting jobs. - _ => original_targets - .iter() - .any(|t| t.flatten_deps().contains(&Target::Core)), - }, - // These targets aren't involved in the dependencies tree. - Target::CliDev | Target::Updater | Target::CliChipmunk | Target::PluginsApi => { - matches!(current_job, JobType::Lint) - } - // TS and Bindings targets need to be built with all their dependencies to perform the - // needed type checks on TypeScript - Target::Shared - | Target::Binding - | Target::Wrapper - | Target::Wasm - | Target::Protocol - | Target::Client - | Target::App => { - // Only building jobs for dependencies is required. - // For example: Linting jobs for dependencies shouldn't be involved when they - // are not included in the original targets. - current_job.is_build_related() || original_targets.contains(&target) - } - }, - - // Tests for TS and WASM targets inquire that those targets are built - JobType::Test { .. } => match target { - // * Running tests for rust core doesn't inquire running build on it. - // * It should excluded in the filter if it's not included in the original targets - // dependencies before being flatted. This is to avoid running test on core if we - // want to run test on Binding or Wrapper. - Target::Core => match current_job { - // When the current job matches the main job we need to check if the target is - // included in the original targets - JobType::Test { .. } => original_targets.contains(&target), - // Otherwise we need to check if the targets have core in their dependencies to - // build the core since it's needed for their testing jobs. - _ => original_targets - .iter() - .any(|t| t.flatten_deps().contains(&Target::Core)), - }, - // These targets aren't involved in the dependencies tree. - Target::CliDev | Target::Updater | Target::CliChipmunk | Target::PluginsApi => { - matches!(current_job, JobType::Test { .. }) - } - - // TS and Bindings targets need to be built with all their dependencies to perform the - // needed tests on TypeScript targets. - Target::Shared - | Target::Binding - | Target::Wrapper - | Target::Wasm - | Target::Protocol - | Target::Client - | Target::App => { - // Only building jobs for dependencies is required. - // For example: Test jobs for dependencies shouldn't be involved when they - // are not included in the original targets. - current_job.is_build_related() || original_targets.contains(&target) - } - }, - JobType::Clean - | JobType::Install { .. } - | JobType::Build { .. } - | JobType::AfterBuild { .. } - | JobType::Run { .. } => true, - } - }; - - target.has_job(current_job) && additional_filter() -} - -#[cfg(test)] -mod tests { - use super::*; - use pretty_assertions::assert_eq; - - #[test] - fn flatten_clean_job() { - let expected_clean = BTreeSet::from([JobType::Clean]); - assert_eq!(flatten_jobs(JobType::Clean), expected_clean); - } - - #[test] - fn flatten_lint_job() { - let production = false; - let expected_lint = BTreeSet::from([ - JobType::Lint, - JobType::Install { production }, - JobType::Build { production }, - JobType::AfterBuild { production }, - ]); - assert_eq!(flatten_jobs(JobType::Lint), expected_lint); - } - - #[test] - fn flatten_install_job() { - let production = false; - let expected_install = BTreeSet::from([JobType::Install { production }]); - assert_eq!( - flatten_jobs(JobType::Install { production }), - expected_install - ); - } - - #[test] - fn flatten_build_job() { - let production = false; - let expected_build = BTreeSet::from([ - JobType::Build { production }, - JobType::Install { production }, - JobType::AfterBuild { production }, - ]); - assert_eq!(flatten_jobs(JobType::Build { production }), expected_build); - } - - #[test] - fn flatten_test_job() { - let production = false; - let expected_test = BTreeSet::from([ - JobType::Build { production }, - JobType::Install { production }, - JobType::AfterBuild { production }, - JobType::Test { production }, - ]); - assert_eq!(flatten_jobs(JobType::Test { production }), expected_test); - } - - #[test] - fn flatten_core_target() { - let expected = BTreeSet::from([Target::Core]); - assert_eq!(flatten_targets_for_build(&[Target::Core]), expected); - } - - #[test] - fn flatten_wrapper_target() { - let expected = BTreeSet::from([ - Target::Shared, - Target::Core, - Target::Binding, - Target::Protocol, - Target::Wrapper, - ]); - assert_eq!(flatten_targets_for_build(&[Target::Wrapper]), expected); - } - - #[test] - fn flatten_app_target() { - let expected = BTreeSet::from([ - Target::Core, - Target::Shared, - Target::Protocol, - Target::Binding, - Target::Wrapper, - Target::Client, - Target::Wasm, - Target::Updater, - Target::App, - ]); - assert_eq!(flatten_targets_for_build(&[Target::App]), expected); - } - - #[test] - fn flatten_all_target() { - let expected = BTreeSet::from_iter(Target::all().to_owned()); - assert_eq!(flatten_targets_for_build(Target::all()), expected); - } - - #[test] - fn flatten_core_client_target() { - let expected = BTreeSet::from_iter([ - Target::Core, - Target::Protocol, - Target::Shared, - Target::Wasm, - Target::Client, - ]); - assert_eq!( - flatten_targets_for_build(&[Target::Core, Target::Client]), - expected - ); - } - - #[test] - fn resolve_lint_core_cli() { - let expected = BTreeMap::from([ - (JobDefinition::new(Target::Core, JobType::Lint), Vec::new()), - ( - JobDefinition::new(Target::CliDev, JobType::Lint), - Vec::new(), - ), - ]); - - assert_eq!( - expected, - resolve(&[Target::Core, Target::CliDev], JobType::Lint) - ); - } - - #[test] - fn resolve_test_core() { - let production = false; - let expected = BTreeMap::from([( - JobDefinition::new(Target::Core, JobType::Test { production }), - vec![], - )]); - - assert_eq!( - expected, - resolve(&[Target::Core], JobType::Test { production }) - ); - } - - #[test] - fn resolve_build_binding() { - let production = false; - let expected = BTreeMap::from([ - ( - JobDefinition::new(Target::Core, JobType::Build { production }), - vec![], - ), - ( - JobDefinition::new(Target::Protocol, JobType::Build { production }), - vec![JobDefinition::new( - Target::Core, - JobType::Build { production }, - )], - ), - ( - JobDefinition::new(Target::Shared, JobType::Install { production }), - vec![], - ), - ( - JobDefinition::new(Target::Shared, JobType::Build { production }), - vec![JobDefinition::new( - Target::Shared, - JobType::Install { production }, - )], - ), - ( - JobDefinition::new(Target::Binding, JobType::Install { production }), - vec![ - JobDefinition::new(Target::Core, JobType::Build { production }), - JobDefinition::new(Target::Shared, JobType::Install { production }), - JobDefinition::new(Target::Shared, JobType::Build { production }), - JobDefinition::new(Target::Protocol, JobType::Build { production }), - ], - ), - ( - JobDefinition::new(Target::Binding, JobType::Build { production }), - vec![ - JobDefinition::new(Target::Core, JobType::Build { production }), - JobDefinition::new(Target::Shared, JobType::Install { production }), - JobDefinition::new(Target::Shared, JobType::Build { production }), - JobDefinition::new(Target::Protocol, JobType::Build { production }), - JobDefinition::new(Target::Binding, JobType::Install { production }), - ], - ), - ( - JobDefinition::new(Target::Binding, JobType::AfterBuild { production }), - vec![ - JobDefinition::new(Target::Binding, JobType::Install { production }), - JobDefinition::new(Target::Binding, JobType::Build { production }), - ], - ), - ]); - - assert_eq!( - expected, - resolve(&[Target::Binding], JobType::Build { production }) - ); - } - - #[test] - /// Ensure linting ts targets will invoke all building targets involved in the dependencies tree. - /// And on build should wait for a lint job to start. - fn resolve_lint_wrapper() { - let production = false; - let expected = BTreeMap::from([ - ( - JobDefinition::new(Target::Shared, JobType::Install { production }), - vec![], - ), - ( - JobDefinition::new(Target::Core, JobType::Build { production }), - vec![], - ), - ( - JobDefinition::new(Target::Protocol, JobType::Build { production }), - vec![JobDefinition::new( - Target::Core, - JobType::Build { production }, - )], - ), - ( - JobDefinition::new(Target::Shared, JobType::Build { production }), - vec![JobDefinition::new( - Target::Shared, - JobType::Install { production }, - )], - ), - ( - JobDefinition::new(Target::Binding, JobType::Install { production }), - vec![ - JobDefinition::new(Target::Core, JobType::Build { production }), - JobDefinition::new(Target::Shared, JobType::Install { production }), - JobDefinition::new(Target::Shared, JobType::Build { production }), - JobDefinition::new(Target::Protocol, JobType::Build { production }), - ], - ), - ( - JobDefinition::new(Target::Binding, JobType::Build { production }), - vec![ - JobDefinition::new(Target::Core, JobType::Build { production }), - JobDefinition::new(Target::Shared, JobType::Install { production }), - JobDefinition::new(Target::Shared, JobType::Build { production }), - JobDefinition::new(Target::Protocol, JobType::Build { production }), - JobDefinition::new(Target::Binding, JobType::Install { production }), - ], - ), - ( - JobDefinition::new(Target::Binding, JobType::AfterBuild { production }), - vec![ - JobDefinition::new(Target::Binding, JobType::Install { production }), - JobDefinition::new(Target::Binding, JobType::Build { production }), - ], - ), - ( - JobDefinition::new(Target::Wrapper, JobType::Build { production }), - vec![ - JobDefinition::new(Target::Core, JobType::Build { production }), - JobDefinition::new(Target::Shared, JobType::Install { production }), - JobDefinition::new(Target::Shared, JobType::Build { production }), - JobDefinition::new(Target::Protocol, JobType::Build { production }), - JobDefinition::new(Target::Binding, JobType::Install { production }), - JobDefinition::new(Target::Binding, JobType::Build { production }), - JobDefinition::new(Target::Binding, JobType::AfterBuild { production }), - ], - ), - ( - JobDefinition::new(Target::Wrapper, JobType::Lint), - vec![JobDefinition::new( - Target::Wrapper, - JobType::Build { production }, - )], - ), - ]); - - assert_eq!(expected, resolve(&[Target::Wrapper], JobType::Lint)); - } - - #[test] - /// Ensure testing ts targets will invoke all building targets involved in the dependencies tree. - fn resolve_test_wrapper() { - let production = false; - let expected = BTreeMap::from([ - ( - JobDefinition::new(Target::Shared, JobType::Install { production }), - vec![], - ), - ( - JobDefinition::new(Target::Core, JobType::Build { production }), - vec![], - ), - ( - JobDefinition::new(Target::Protocol, JobType::Build { production }), - vec![JobDefinition::new( - Target::Core, - JobType::Build { production }, - )], - ), - ( - JobDefinition::new(Target::Shared, JobType::Build { production }), - vec![JobDefinition::new( - Target::Shared, - JobType::Install { production }, - )], - ), - ( - JobDefinition::new(Target::Binding, JobType::Install { production }), - vec![ - JobDefinition::new(Target::Core, JobType::Build { production }), - JobDefinition::new(Target::Shared, JobType::Install { production }), - JobDefinition::new(Target::Shared, JobType::Build { production }), - JobDefinition::new(Target::Protocol, JobType::Build { production }), - ], - ), - ( - JobDefinition::new(Target::Binding, JobType::Build { production }), - vec![ - JobDefinition::new(Target::Core, JobType::Build { production }), - JobDefinition::new(Target::Shared, JobType::Install { production }), - JobDefinition::new(Target::Shared, JobType::Build { production }), - JobDefinition::new(Target::Protocol, JobType::Build { production }), - JobDefinition::new(Target::Binding, JobType::Install { production }), - ], - ), - ( - JobDefinition::new(Target::Binding, JobType::AfterBuild { production }), - vec![ - JobDefinition::new(Target::Binding, JobType::Install { production }), - JobDefinition::new(Target::Binding, JobType::Build { production }), - ], - ), - ( - JobDefinition::new(Target::Wrapper, JobType::Build { production }), - vec![ - JobDefinition::new(Target::Core, JobType::Build { production }), - JobDefinition::new(Target::Shared, JobType::Install { production }), - JobDefinition::new(Target::Shared, JobType::Build { production }), - JobDefinition::new(Target::Protocol, JobType::Build { production }), - JobDefinition::new(Target::Binding, JobType::Install { production }), - JobDefinition::new(Target::Binding, JobType::Build { production }), - JobDefinition::new(Target::Binding, JobType::AfterBuild { production }), - ], - ), - ( - JobDefinition::new(Target::Wrapper, JobType::Test { production }), - vec![JobDefinition::new( - Target::Wrapper, - JobType::Build { production }, - )], - ), - ]); - - assert_eq!( - expected, - resolve(&[Target::Wrapper], JobType::Test { production }) - ); - } - - #[test] - /// Resolves build for all targets and checks some cases in the dependencies-tree since the - /// tree is too huge to be tested one by one. - fn resolve_build_all_fuzzy() { - let production = false; - - let tree = resolve(Target::all(), JobType::Build { production }); - - assert!( - tree.get(&JobDefinition::new( - Target::CliDev, - JobType::Build { production } - )) - .is_some_and(|dep| dep.is_empty()), - "Build CLI should have no dependencies" - ); - - assert!( - tree.get(&JobDefinition::new( - Target::App, - JobType::Build { production } - )) - .is_some_and(|dep| dep.contains(&JobDefinition::new( - Target::Shared, - JobType::Build { production } - ))), - "Build App should have dependency on shared build" - ); - - assert!( - tree.get(&JobDefinition::new( - Target::Wrapper, - JobType::Build { production } - )) - .is_some_and(|dep| dep.contains(&JobDefinition::new( - Target::Binding, - JobType::AfterBuild { production } - ))), - "Build Wrapper should have dependency on Binding AfterBuild" - ); - - assert!( - tree.get(&JobDefinition::new( - Target::Wrapper, - JobType::Build { production } - )) - .is_some_and(|dep| dep.contains(&JobDefinition::new( - Target::Binding, - JobType::AfterBuild { production } - ))), - "Build Wrapper should have dependency on Binding AfterBuild" - ); - - assert!( - tree.get(&JobDefinition::new( - Target::App, - JobType::Install { production } - )) - .is_some_and(|dep| dep.contains(&JobDefinition::new( - Target::Wasm, - JobType::Build { production } - ))), - "Install App should have dependency on Wasm Build" - ); - } - - #[test] - fn resolve_build_plugins_api() { - let production = false; - let expected = BTreeMap::from([( - JobDefinition::new(Target::PluginsApi, JobType::Build { production }), - vec![], - )]); - - assert_eq!( - expected, - resolve(&[Target::PluginsApi], JobType::Build { production }) - ); - } - - #[test] - fn resolve_test_plugins_api() { - let production = false; - let expected = BTreeMap::from([( - JobDefinition::new(Target::PluginsApi, JobType::Test { production }), - vec![], - )]); - - assert_eq!( - expected, - resolve(&[Target::PluginsApi], JobType::Test { production }) - ); - } -} diff --git a/cli/development-cli/src/jobs_runner/jobs_state.rs b/cli/development-cli/src/jobs_runner/jobs_state.rs deleted file mode 100644 index 0194bee8ea..0000000000 --- a/cli/development-cli/src/jobs_runner/jobs_state.rs +++ /dev/null @@ -1,187 +0,0 @@ -//! Manages the state of the running jobs, keeping track on all their spawned tasks, providing -//! method to gracefully close them within a timeout and keeping info if the task should fail fast. - -use std::{sync::OnceLock, time::Duration}; - -use tokio::time::timeout; -use tokio_util::{sync::CancellationToken, task::TaskTracker}; - -use crate::tracker::get_tracker; - -use super::additional_features::AdditionalFeatures; - -/// Duration to wait for jobs when cancellation is invoked. -pub const TIMEOUT_DURATION: Duration = Duration::from_secs(2); - -/// Duration to wait after starting the shutdown process, to force the program to exit if it's -/// still active after the given has passed. -pub const FORCE_EXIT_DURATION: Duration = Duration::from_secs(3); - -/// [`JobsState`] singleton -static JOBS_STATE: OnceLock = OnceLock::new(); - -/// Manages the state of the currently running jobs, keeping track on all their spawned tasks, -/// providing method to gracefully close them within a timeout. -/// It keeps the info in task should fail fast too. -#[derive(Debug)] -pub struct JobsState { - cancellation_token: CancellationToken, - task_tracker: TaskTracker, - configuration: JobsConfig, -} - -#[derive(Debug, Clone, Default)] -/// Represents the configuration and specification for the jobs. -pub struct JobsConfig { - fail_fast: bool, - is_release_build: bool, - /// Custom specifications for the given jobs. - custom_specs: Vec, - // Additional features for the given jobs. - additional_features: Vec, - /// Set to accept the changes in snapshot testing. - /// Snapshot testing is currently implemented in some Rust parts only. - accept_snapshots: bool, -} - -impl JobsConfig { - pub fn new(fail_fast: bool) -> Self { - Self { - fail_fast, - ..Default::default() - } - } - - #[must_use] - pub fn release_build(mut self, is_release_build: bool) -> Self { - self.is_release_build = is_release_build; - self - } - - #[must_use] - pub fn custom_specs(mut self, custom_specs: Vec) -> Self { - self.custom_specs = custom_specs; - self - } - - #[must_use] - pub fn additional_features(mut self, additional_features: Vec) -> Self { - self.additional_features = additional_features; - self - } - - #[must_use] - pub fn accept_snapshots(mut self, accept_snapshots: bool) -> Self { - self.accept_snapshots = accept_snapshots; - self - } -} - -impl From for JobsState { - fn from(config: JobsConfig) -> Self { - Self { - cancellation_token: CancellationToken::new(), - task_tracker: TaskTracker::new(), - configuration: config, - } - } -} - -impl JobsState { - fn new(config: JobsConfig) -> Self { - Self::from(config) - } - - /// Provides a reference for [`JobsState`] struct, initializing it with default values - /// if not initializing before. - pub fn get() -> &'static JobsState { - JOBS_STATE.get_or_init(|| JobsState::new(JobsConfig::default())) - } - - /// Initialize jobs state struct setting the fail fast option - /// - /// # Panics - /// This function panics if [`JobsState`] already have been initialized or retrieved - /// before the function call - pub fn init(config: JobsConfig) { - JOBS_STATE - .set(JobsState::new(config)) - .expect("Jobs state can't be initialized twice"); - } - - /// Returns a reference to the shared [`CancellationToken`] across all the tasks in process - pub fn cancellation_token(&self) -> &CancellationToken { - &self.cancellation_token - } - - /// Returns a reference to the [`TaskTracker`] that will be used to spawn all - /// the task across the process. - pub fn task_tracker(&self) -> &TaskTracker { - &self.task_tracker - } - - /// Closes the tasks trackers and waits for spawned jobs to exit gracefully within - /// the [`TIMEOUT_DURATION`]. - /// - /// # Note: - /// - /// This function will spawn another thread to close the program immediately if graceful - /// shutdown has failed, which will wait for [`FORCE_EXIT_DURATION`] then forces the program - /// to exit. - pub async fn graceful_shutdown(&self) { - self.task_tracker.close(); - - if timeout(TIMEOUT_DURATION, self.task_tracker.wait()) - .await - .is_err() - { - // If task_tracker fails to close here, then it could be a dead-lock or another - // undefined behavior while closing the running commands. - // In this case we wait on other OS thread for couple seconds then force everything - // to shutdown. - std::thread::spawn(|| { - eprintln!(); - eprintln!("Graceful shutdown failed, trying to close the app..."); - std::thread::sleep(FORCE_EXIT_DURATION); - // Exit the app with error signal - eprintln!("Forcing the program to exit..."); - std::process::exit(1) - }); - - let tracker = get_tracker(); - tracker.print("Graceful shutdown timed out"); - tracker.print(format!( - "Forcing close in {} seconds...", - FORCE_EXIT_DURATION.as_secs() - )); - } - } - - /// Gets if the processes should be cancelled once any task fails. - /// This function will set the value of fail fast to false if it doesn't - /// contain a value before. - pub fn fail_fast(&self) -> bool { - self.configuration.fail_fast - } - - /// Determines whether jobs are currently running to build and bundle a release of Chipmunk. - pub fn is_release_build(&self) -> bool { - self.configuration.is_release_build - } - - /// Gets the job custom specifications if specified. - pub fn custom_specs(&self) -> &[String] { - self.configuration.custom_specs.as_slice() - } - - /// Gets the additional features for the running job. - pub fn additional_features(&self) -> &[AdditionalFeatures] { - self.configuration.additional_features.as_slice() - } - - /// Gets if changes of all snapshots in tests should be accepted. - /// Snapshot testing is implemented only for some Rust parts. - pub fn accept_snapshots(&self) -> bool { - self.configuration.accept_snapshots - } -} diff --git a/cli/development-cli/src/jobs_runner/mod.rs b/cli/development-cli/src/jobs_runner/mod.rs deleted file mode 100644 index 6dfbe002a6..0000000000 --- a/cli/development-cli/src/jobs_runner/mod.rs +++ /dev/null @@ -1,236 +0,0 @@ -//! Manages running the provided main job for the given targets after resolving the job -//! dependencies, then it manages running them concurrently when possible. - -pub mod additional_features; -mod job_definition; -pub mod jobs_resolver; -pub mod jobs_state; - -use std::{collections::BTreeMap, ops::Not}; -use tokio::sync::mpsc::{UnboundedSender, unbounded_channel}; - -pub use job_definition::JobDefinition; - -use crate::{ - JobsState, - build_state_records::{BuildStateRecords, ChecksumCompareResult}, - cli_args::UiMode, - job_type::JobType, - log_print::{print_log_separator, print_report}, - spawner::SpawnResult, - target::Target, - tracker::get_tracker, -}; - -use anyhow::Result; - -type SpawnResultsCollection = Vec>; - -#[derive(Debug, Clone)] -/// Represents the current state of the task. -enum JobPhase { - /// Job is waiting to the jobs in the list to finish - Awaiting(Vec), - /// Job is running currently - Running, - /// Job is finished - Done, -} - -/// Runs all the needed tasks for the given targets and the main jobs asynchronously, -/// returning a list of the tasks results -pub async fn run(targets: &[Target], main_job: JobType) -> Result { - let jobs_tree = jobs_resolver::resolve(targets, main_job); - - let tracker = get_tracker(); - tracker - .register_all(jobs_tree.keys().cloned().collect()) - .await?; - - let mut jobs_status: BTreeMap = jobs_tree - .into_iter() - .map(|(job, deps)| (job, JobPhase::Awaiting(deps))) - .collect(); - - let (tx, mut rx) = unbounded_channel::<(JobDefinition, Result)>(); - - let mut checksum_compare_map = BTreeMap::new(); - let mut failed_build_jobs = Vec::new(); - - // Spawn free job at first - spawn_jobs( - tx.clone(), - &mut jobs_status, - &mut checksum_compare_map, - &failed_build_jobs, - )?; - - let mut results = Vec::new(); - - while let Some((job_def, result)) = rx.recv().await { - // Update job state - jobs_status - .entry(job_def) - .and_modify(|phase| *phase = JobPhase::Done); - - let failed = match &result { - Ok(res) => res.status.success().not(), - Err(_) => true, - }; - - if matches!(tracker.ui_mode(), UiMode::PrintOnJobFinish) { - print_log_separator(); - match result.as_ref() { - Ok(res) => { - print_report(res); - } - Err(err) => { - eprintln!("Job '{}' failed with error: {err}", job_def.job_title()) - } - } - print_log_separator(); - } - - results.push(result); - - let jobs_state = JobsState::get(); - - if failed { - if job_def.job_type.is_build_related() { - failed_build_jobs.push(job_def.target); - } - - if jobs_state.fail_fast() { - jobs_state.cancellation_token().cancel(); - - jobs_state.graceful_shutdown().await; - - return Ok(results); - } - } - - let mut all_done = true; - - // Remove finished job from waiting lists to the awaiting jobs. - // And check if all jobs are done at same time. - for (_, mut phase) in jobs_status.iter_mut() { - let deps = match &mut phase { - JobPhase::Awaiting(deps) => { - all_done = false; - deps - } - JobPhase::Running => { - all_done = false; - continue; - } - JobPhase::Done => continue, - }; - - if let Some(dep_idx) = deps.iter().position(|j| *j == job_def) { - let _ = deps.swap_remove(dep_idx); - } - } - - if all_done { - return Ok(results); - } - - // Skip spawning new jobs if cancel is already invoked. - if jobs_state.cancellation_token().is_cancelled() { - return Ok(results); - } - - // Spawn more jobs after updating jobs_status tree. - spawn_jobs( - tx.clone(), - &mut jobs_status, - &mut checksum_compare_map, - &failed_build_jobs, - )?; - } - - Ok(results) -} - -/// Iterate over jobs states maps and spawn the jobs that aren't waiting for any jobs to be done -fn spawn_jobs( - sender: UnboundedSender<(JobDefinition, Result)>, - jobs_status: &mut BTreeMap, - checksum_compare_map: &mut BTreeMap, - failed_build_jobs: &[Target], -) -> Result<()> { - let jobs_state = JobsState::get(); - let task_tracker = jobs_state.task_tracker(); - for (job_def, phase) in jobs_status.iter_mut() { - let JobPhase::Awaiting(deps) = phase else { - continue; - }; - - if !deps.is_empty() { - continue; - } - - let deps_fail = job_def - .target - .flatten_deps() - .into_iter() - .chain(std::iter::once(job_def.target)) - .any(|t| failed_build_jobs.contains(&t)); - - // Skip on dependencies failing, no matter what the job is. - let skip = if deps_fail { - true - } else if job_def.job_type.is_build_related() && !jobs_state.is_release_build() { - // Check if target is already registered and checked - if let Some(&chksm_compare) = checksum_compare_map.get(&job_def.target) { - chksm_compare == ChecksumCompareResult::Same - } else { - // Calculate target checksums and compare it the persisted one - let prod = job_def.job_type.is_production().is_some_and(|prod| prod); - let mut checksum_rec = BuildStateRecords::get(prod)?.lock().map_err(|err| { - anyhow::anyhow!("Error while acquiring items jobs mutex: Error {err}") - })?; - checksum_rec.register_job(job_def.target)?; - - // Check if all dependent jobs are skipped, then do the checksum calculations - if job_def.target.direct_deps().iter().all(|dep| { - checksum_compare_map - .get(dep) - .is_some_and(|&chksm| chksm == ChecksumCompareResult::Same) - }) { - let chksm_compare = checksum_rec.compare_checksum(job_def.target)?; - checksum_compare_map.insert(job_def.target, chksm_compare); - chksm_compare == ChecksumCompareResult::Same - } else { - false - } - } - } else { - false - }; - - // Spawn the job - let sender = sender.clone(); - let job_def = *job_def; - task_tracker.spawn(async move { - let result = job_def.run(skip).await; - - let result = match result { - Some(res) => res, - None => panic!("Spawned jobs already resolved and must have return value."), - }; - - if sender.send((job_def, result)).is_err() - && !jobs_state.cancellation_token().is_cancelled() - { - let tracker = get_tracker(); - tracker.print(format!( - "Error: Job results can't be sent to receiver. Job: {job_def:?}" - )); - }; - }); - - *phase = JobPhase::Running; - } - Ok(()) -} diff --git a/cli/development-cli/src/location.rs b/cli/development-cli/src/location.rs deleted file mode 100644 index 1a0c5fb49e..0000000000 --- a/cli/development-cli/src/location.rs +++ /dev/null @@ -1,80 +0,0 @@ -//! Manages finding the root of Chipmunk repository to make it possible to call the app from -//! anywhere within the repo and exit early if the CLI tool is invoked form outside of the repo. - -use anyhow::{Context, Error, bail}; -use git2::Repository; - -use std::{env::current_dir, path::PathBuf, sync::OnceLock}; - -use crate::target::Target; - -pub static LOCATION: OnceLock = OnceLock::new(); - -#[derive(Clone, Debug)] -pub struct Location { - pub root: PathBuf, -} - -impl Location { - fn new() -> Result { - let current_dir = current_dir()?; - let repo = - Repository::discover(current_dir).context("Fail to find chipmunk root directory")?; - let Some(root) = repo.workdir() else { - bail!("Fail to find chipmunk root directory") - }; - - // Make sure we are in the chipmunk repository - // Note: This check will fail if the structure of the repo changes - if root.join("application").is_dir() && root.join("developing").is_dir() { - Ok(Self { root: root.into() }) - } else { - bail!("Fail to find project's root location") - } - } -} - -/// Get the path of the root repository -pub fn get_root() -> &'static PathBuf { - &LOCATION - .get() - .expect("Developer Error: Location is initialized in main function") - .root -} - -/// Initial location instance to get the path of the root repository -/// return `Error` If the program isn't invoked inside chipmunk repository -pub fn init_location() -> Result<(), Error> { - assert!(LOCATION.get().is_none()); - - let location = Location::new()?; - LOCATION - .set(location) - .expect("Developer Error: init location can't be called more than once"); - Ok(()) -} - -/// Return the path for the global configuration directory of the Development CLI Tool -/// within Chipmunk repo. -pub fn global_configs_path() -> PathBuf { - Target::CliDev.cwd().join("config") -} - -/// Return the path for the home directory directory where logs and configuration are placed. -pub fn chipmunk_home_dir() -> anyhow::Result { - let home_dir = dirs::home_dir() - .map(|home| home.join(".chipmunk")) - .context("Resolving home directory failed")?; - - Ok(home_dir) -} - -/// Return the path for the build CLI directory in Chipmunk home directory. -pub fn build_cli_home_dir() -> anyhow::Result { - let chipmunk_home = - chipmunk_home_dir().context("Error while resolving Chipmunk home directory")?; - const BUILD_CLI_DIR_NAME: &str = "build_cli"; - let build_cli_path = chipmunk_home.join(BUILD_CLI_DIR_NAME); - - Ok(build_cli_path) -} diff --git a/cli/development-cli/src/log_print.rs b/cli/development-cli/src/log_print.rs deleted file mode 100644 index 5118ae4e99..0000000000 --- a/cli/development-cli/src/log_print.rs +++ /dev/null @@ -1,46 +0,0 @@ -//! Provides methods to print the logs of the results of spawned jobs to the console. - -use console::style; - -use crate::spawner::SpawnResult; - -/// Prints the log report for the given job result -pub fn print_report(spawn_result: &SpawnResult) { - match (spawn_result.skipped, spawn_result.status.success()) { - // Skipped - (true, _) => { - let msg = format!("Job '{}' has been skipped", spawn_result.job); - println!("{}", style(msg).cyan().bold()); - } - // Succeeded - (_, true) => { - let msg = format!("Job '{}' has succeeded", spawn_result.job); - println!("{}", style(msg).green().bold()); - } - // Failed - (_, false) => { - let msg = format!("Job '{}' has failed", spawn_result.job); - println!("{}", style(msg).red().bold()); - } - }; - println!(); - - println!("Command: {}", spawn_result.cmd); - if spawn_result.skipped { - return; - } - - println!("Logs:"); - - spawn_result - .report - .iter() - .for_each(|line| println!("{}", line.trim_end())) -} - -/// Prints a separator to be used between the jobs reports. -pub fn print_log_separator() { - println!(); - println!("===================================================="); - println!(); -} diff --git a/cli/development-cli/src/main.rs b/cli/development-cli/src/main.rs deleted file mode 100644 index 9557325583..0000000000 --- a/cli/development-cli/src/main.rs +++ /dev/null @@ -1,369 +0,0 @@ -// Use the readme as the main documentation page. -#![doc = include_str!("../README.md")] - -mod benchmark; -mod build_state_records; -mod chipmunk_runner; -mod cli_args; -mod dev_environment; -mod dev_tools; -mod fstools; -mod job_type; -mod jobs_runner; -mod location; -mod log_print; -mod print_dot; -mod release; -mod shell; -mod spawner; -mod target; -mod tracker; -mod user_config; -mod version; - -use anyhow::{Context, Error, bail}; -use build_state_records::BuildStateRecords; -use clap::Parser; -use cli_args::{CargoCli, Command, UiMode, UserConfigCommand}; -use console::style; -use dev_environment::{print_env_info, validate_dev_tools}; -use job_type::JobType; -use jobs_runner::jobs_state::JobsConfig; -use location::init_location; -use log_print::{print_log_separator, print_report}; -use release::do_release; -use target::Target; -use tokio::signal; -use tracker::{get_tracker, init_tracker}; - -pub use jobs_runner::jobs_state::JobsState; -use user_config::UserConfiguration; - -use crate::cli_args::EnvironmentCommand; - -#[tokio::main] -async fn main() -> Result<(), Error> { - // CLI command parsing. - let CargoCli::Chipmunk(cli) = CargoCli::parse(); - let command = cli.command; - - // Validate current directory location. - init_location()?; - - // Load and validate user configurations - UserConfiguration::init()?; - - // Check for newer versions - version::check_version(); - - // Handle the app main process in a separate method, keeping this method for handling - // manual cancelling as well. - - tokio::select! { - main_res = main_process(command) => { - return main_res - } - _ = signal::ctrl_c() => { - let jobs_state = JobsState::get(); - // Cancel all the running tasks and wait for them to return. - jobs_state.cancellation_token().cancel(); - jobs_state.graceful_shutdown().await; - - // Shutdown the tracker channels. - let tracker = get_tracker(); - tracker.shutdown(false).await?; - - eprintln!(); - eprintln!("Tasks have been cancelled"); - - return Ok(()) - } - } -} - -/// The main process of the app is encapsulated in this method, to be used inside `select!()` -/// macro to handle manual cancellation scenarios. -async fn main_process(command: Command) -> Result<(), Error> { - // Run the given command - let (job_type, results) = match command { - Command::Environment(sub_command) => match sub_command { - EnvironmentCommand::Check => { - validate_dev_tools()?; - println!("All needed tools for development are installed"); - return Ok(()); - } - EnvironmentCommand::Print => { - return print_env_info(); - } - }, - Command::PrintDot { all_jobs } => { - if all_jobs { - print_dot::print_dependencies_jobs(); - } else { - print_dot::print_dependencies_targets(); - } - return Ok(()); - } - Command::UserConfiguration(sub_command) => match sub_command { - UserConfigCommand::PrintPath => { - let config_path = UserConfiguration::file_path() - .context("Error while resolving user configurations file path")?; - - println!("{}", config_path.display()); - - return Ok(()); - } - UserConfigCommand::DumpDefaultConfiguration => { - return UserConfiguration::print_default(); - } - UserConfigCommand::WriteDefaultToFile => { - return UserConfiguration::write_default_to_file(); - } - }, - Command::Lint { - target, - fail_fast, - ui_mode, - skip_env_checks, - } => { - JobsState::init(JobsConfig::new(fail_fast)); - init_tracker(ui_mode); - if !skip_env_checks && !UserConfiguration::get().skip_env_checks { - validate_dev_tools()?; - } - let targets = get_targets_or_all(target); - let results = jobs_runner::run(&targets, JobType::Lint).await?; - (JobType::Lint, results) - } - Command::Build { - target, - production, - fail_fast, - ui_mode, - skip_env_checks, - additional_features, - } => { - let features = additional_features - .unwrap_or_else(|| UserConfiguration::get().additional_features.clone()); - JobsState::init(JobsConfig::new(fail_fast).additional_features(features)); - init_tracker(ui_mode); - if !skip_env_checks && !UserConfiguration::get().skip_env_checks { - validate_dev_tools()?; - } - let targets = get_targets_or_all(target); - let results = jobs_runner::run(&targets, JobType::Build { production }).await?; - (JobType::Build { production }, results) - } - Command::Clean { - target, - ui_mode, - skip_env_checks, - } => { - JobsState::init(JobsConfig::new(false)); - init_tracker(ui_mode); - if !skip_env_checks && !UserConfiguration::get().skip_env_checks { - validate_dev_tools()?; - } - - BuildStateRecords::remove_records_file()?; - let targets = get_targets_or_all(target); - let results = jobs_runner::run(&targets, JobType::Clean).await?; - (JobType::Clean, results) - } - Command::Test { - target, - production, - fail_fast, - ui_mode, - skip_env_checks, - accept_snapshots, - specifications, - } => { - JobsState::init( - JobsConfig::new(fail_fast) - .custom_specs(specifications) - .accept_snapshots(accept_snapshots), - ); - init_tracker(ui_mode); - if !skip_env_checks && !UserConfiguration::get().skip_env_checks { - validate_dev_tools()?; - } - let targets = get_targets_or_all(target); - let results = jobs_runner::run(&targets, JobType::Test { production }).await?; - (JobType::Test { production }, results) - } - Command::Run { - production, - no_fail_fast, - ui_mode, - skip_env_checks, - additional_features, - } => { - let features = additional_features - .unwrap_or_else(|| UserConfiguration::get().additional_features.clone()); - JobsState::init(JobsConfig::new(!no_fail_fast).additional_features(features)); - init_tracker(ui_mode); - if !skip_env_checks && !UserConfiguration::get().skip_env_checks { - validate_dev_tools()?; - } - let results = jobs_runner::run(&[Target::App], JobType::Build { production }).await?; - (JobType::Run { production }, results) - } - Command::ResetRecords => { - BuildStateRecords::remove_records_file()?; - println!("Checksum-Records has been reset",); - - return Ok(()); - } - Command::ShellCompletion { shell } => { - return shell::generate_completion(shell); - } - Command::Release { - verbose, - no_fail_fast, - development, - code_sign, - custom_platform, - } => { - JobsState::init(JobsConfig::new(!no_fail_fast).release_build(true)); - let ui_mode = if verbose { - UiMode::PrintImmediately - } else { - UiMode::PrintOnJobFinish - }; - init_tracker(Some(ui_mode)); - validate_dev_tools()?; - do_release(development, code_sign, custom_platform.as_deref()).await?; - let tracker = get_tracker(); - tracker.shutdown(false).await?; - - BuildStateRecords::update_and_save(JobType::Build { - production: !development, - })?; - - return Ok(()); - } - Command::Benchmark(bench) => return bench.run(), - }; - - // Shutdown and show results & report - let tracker = get_tracker(); - tracker.shutdown(true).await?; - let mut success: bool = true; - let print_err = match tracker.ui_mode() { - UiMode::ProgressBars => true, - UiMode::BarsWithReport | UiMode::PrintOnJobFinish | UiMode::PrintImmediately => { - // logs have been already printed. - false - } - }; - for (idx, res) in results.iter().enumerate() { - match res { - Ok(status) => { - if matches!(tracker.ui_mode(), UiMode::BarsWithReport) { - if idx == 0 { - println!(); - println!(); - println!("{}", style("Build Logs Report:").bold().blue()); - println!(); - } - print_report(status); - print_log_separator(); - } - - if !status.status.success() { - if print_err { - eprintln!("Failed with errors"); - eprintln!("{}:", status.job); - status - .report - .iter() - .for_each(|line| eprintln!("{}", line.trim_end())); - - eprintln!( - "---------------------------------------------------------------------" - ); - } - success = false; - } - } - Err(err) => { - eprintln!("Error: {err:?}"); - eprintln!("---------------------------------------------------------------------"); - success = false; - } - } - } - if !success { - bail!("Some tasks have failed") - }; - - BuildStateRecords::update_and_save(job_type)?; - - if matches!(job_type, JobType::Run { .. }) { - println!("Starting chipmunk..."); - ensure_electron_sandbox().await?; - let status = chipmunk_runner::run_chipmunk().await?; - if !status.success() { - bail!("Error: Chipmunk Exited with the Code {status}"); - } - } - Ok(()) -} - -/// filters out duplications in the provided targets if any, otherwise it provides all targets. -fn get_targets_or_all(targets: Option>) -> Vec { - if let Some(mut list) = targets { - list.dedup(); - list - } else { - Target::all().to_vec() - } -} - -#[cfg(target_os = "linux")] -async fn ensure_electron_sandbox() -> anyhow::Result<()> { - use std::os::unix::fs::{MetadataExt, PermissionsExt}; - - let sandbox = Target::App - .cwd() - .join("node_modules/electron/dist/chrome-sandbox"); - - if sandbox.exists() { - let meta = std::fs::metadata(&sandbox)?; - if meta.uid() == 0 && (meta.permissions().mode() & 0o4000) != 0 { - return Ok(()); - } - - eprintln!("\n[!] ACTION REQUIRED: Fixing Electron Sandbox permissions."); - eprintln!("[!] Please enter your password for sudo:"); - - let status = std::process::Command::new("sudo") - .arg("sh") - .arg("-c") - .arg(format!( - "chown root {0} && chmod 4755 {0}", - sandbox.display() - )) - .stdin(std::process::Stdio::inherit()) - .stdout(std::process::Stdio::inherit()) - .stderr(std::process::Stdio::inherit()) - .status()?; - - if status.success() { - eprintln!("[+] Permissions fixed successfully.\n"); - Ok(()) - } else { - eprintln!("You may need to run manually:"); - eprintln!(" sudo chown root && sudo chmod 4755 "); - anyhow::bail!("Sudo prompt failed or was cancelled by user.") - } - } else { - Ok(()) - } -} - -#[cfg(not(target_os = "linux"))] -async fn ensure_electron_sandbox() -> anyhow::Result<()> { - Ok(()) -} diff --git a/cli/development-cli/src/print_dot.rs b/cli/development-cli/src/print_dot.rs deleted file mode 100644 index 5cc480bcef..0000000000 --- a/cli/development-cli/src/print_dot.rs +++ /dev/null @@ -1,49 +0,0 @@ -//! Provides the methods to print the dependencies between the targets in the `pritn-dot` -//! format to be used with `Graphviz`. - -use crate::{ - job_type::JobType, - jobs_runner::{JobDefinition, jobs_resolver}, - target::Target, -}; - -/// Prints an overview of targets dependencies in print-dot format for `Graphviz` -pub fn print_dependencies_targets() { - println!("digraph dependencies {{"); - - for target in Target::all() { - for dep in target.direct_deps() { - println!(r#" "{target}" -> "{dep}""#); - } - } - - println!("}}"); -} - -/// Prints an overview of jobs dependencies in print-dot format for `Graphviz` -pub fn print_dependencies_jobs() { - let deps_tree = jobs_resolver::resolve(Target::all(), JobType::Build { production: false }); - println!("digraph dependencies {{"); - - for (job, deps) in deps_tree { - let job_txt = job_to_dot_string(&job); - for dep in deps { - println!(r#" "{job_txt}" -> "{}""#, job_to_dot_string(&dep)); - } - } - - println!("}}"); -} - -fn job_to_dot_string(job_def: &JobDefinition) -> String { - let job_type = match job_def.job_type { - JobType::Install { .. } => "Install", - JobType::Build { .. } => "Build", - JobType::AfterBuild { .. } => "After Build (Copy & Reinstall)", - JobType::Clean | JobType::Lint | JobType::Test { .. } | JobType::Run { .. } => { - unreachable!("Only build-related jobs are included in dot print") - } - }; - - format!("{}: {job_type}", job_def.target) -} diff --git a/cli/development-cli/src/release/bundle.rs b/cli/development-cli/src/release/bundle.rs deleted file mode 100644 index fa4d74e1c3..0000000000 --- a/cli/development-cli/src/release/bundle.rs +++ /dev/null @@ -1,201 +0,0 @@ -//! Manages bundling chipmunk after being built, providing a snapshot file when needed. - -use std::io::{BufWriter, Write}; - -use console::style; -use env_utls::is_arm_archit; -use fs::File; -use paths::release_bin_path; - -use super::*; -use crate::{ - release::metadata::write_metadata, - shell::shell_tokio_command, - target::{ProcessCommand, Target}, -}; - -/// Runs bundle command on the already built Chipmunk, providing a snapshot file and release -/// metadata file if needed. -pub async fn bundle_release(custom_platform: Option<&str>) -> anyhow::Result<()> { - debug_assert!( - !get_tracker().show_bars(), - "Release shouldn't run with UI bars" - ); - - // *** Run build bundle command *** - - println!("{}", style("Start Build Bundle command...").blue().bright()); - let build_cmd = bundle_cmd().context("Error while retrieving command to bundle release")?; - let pwd = Target::App.cwd(); - let status = shell_tokio_command() - .arg(build_cmd.combine()) - .current_dir(pwd) - .kill_on_drop(true) - .status() - .await - .context("Error while running bundle release command")?; - - ensure!(status.success(), "Release: Bundle command failed"); - - println!("{}", style("Build Bundle Command succeeded...").green()); - - println!(); - println!("-----------------------------------------------"); - println!(); - - // *** Create File Snapshot *** - - println!( - "{}", - style("Start creating files snapshot...").blue().bright() - ); - - create_snapshot().await?; - - println!( - "{}", - style("files snapshot has been successfully created...").green() - ); - - println!(); - println!("-----------------------------------------------"); - println!(); - - if let Some(platform) = custom_platform { - println!( - "{}", - style("Start creating release metadata file...") - .blue() - .bright() - ); - - write_metadata(platform).context("Creating release metadata file failed")?; - - println!( - "{}", - style("Createing relasee metadata file succeeded...").green() - ); - } - - Ok(()) -} - -/// Provide the command to bundle Chipmunk on the current platform -fn bundle_cmd() -> anyhow::Result { - // `cfg!` macro is used instead of `cfg` attribute to keep linting and build checks - // activated on all method independent from development environment. - if cfg!(target_os = "linux") { - Ok(bundle_cmd_linux()) - } else if cfg!(target_os = "macos") { - Ok(build_cmd_mac()) - } else if cfg!(target_os = "windows") { - build_cmd_windows() - } else { - panic!( - "Unknown target os: {}, Arch: {}", - std::env::consts::OS, - std::env::consts::ARCH - ); - } -} - -/// Provide bundle command on Linux -fn bundle_cmd_linux() -> ProcessCommand { - let cmd = electron_builder_cmd(); - let args = vec![ - String::from("--linux"), - String::from("--dir"), - String::from("--config=./electron.config.linux.json"), - ]; - - ProcessCommand::new(cmd, args) -} - -fn electron_builder_cmd() -> String { - Target::App - .cwd() - .join("node_modules") - .join(".bin") - .join("electron-builder") - .to_string_lossy() - .into() -} - -/// Provide bundle command on Mac -fn build_cmd_mac() -> ProcessCommand { - if is_arm_archit() { - let cmd = electron_builder_cmd(); - let args = vec![ - String::from("--mac"), - String::from("--dir"), - String::from("--config=./electron.config.darwin.arm64.json"), - String::from("-c.mac.identity=null"), - ]; - ProcessCommand::new(cmd, args) - } else { - let cmd = electron_builder_cmd(); - let args = vec![ - String::from("--mac"), - String::from("--dir"), - String::from("--config=./electron.config.darwin.x86.json"), - String::from("-c.mac.identity=null"), - ]; - ProcessCommand::new(cmd, args) - } -} - -/// Provide bundle command on Windows -fn build_cmd_windows() -> anyhow::Result { - let cmd = electron_builder_cmd(); - let args = vec![ - String::from("--win"), - String::from("--dir"), - String::from("--config=./electron.config.win.json"), - ]; - - Ok(ProcessCommand::new(cmd, args)) -} - -/// Creates snapshot file if needed. -async fn create_snapshot() -> anyhow::Result<()> { - if cfg!(target_os = "macos") { - println!("build for darwin doesn't require snapshot"); - - return Ok(()); - } - - let release_bin = release_bin_path(); - const SNAPSHOT_FILE_NAME: &str = ".release"; - - let snapshot_file = release_bin.join(SNAPSHOT_FILE_NAME); - if snapshot_file.exists() { - println!( - "Removing already existing snapshot file to be rewritten. File: {}", - snapshot_file.display() - ); - fs::remove_file(&snapshot_file).context("Error while removing snapshot file")?; - } - - let mut entries = vec![String::from(SNAPSHOT_FILE_NAME)]; - - let bin_entries = fs::read_dir(&release_bin) - .with_context(|| { - format!( - "Error while reading release bin directory. Path: {}", - release_bin.display() - ) - })? - .filter_map(|f| f.ok()) - .filter_map(|f| f.file_name().into_string().ok()) - .filter(|f| f.as_str() != "." && f.as_str() != ".."); - - entries.extend(bin_entries); - - let f = File::create(snapshot_file).context("Error while creating snapshot file")?; - let mut writer = BufWriter::new(f); - for entry in entries { - writeln!(writer, "{entry}").context("Error while writing to snapshot file")?; - } - - Ok(()) -} diff --git a/cli/development-cli/src/release/codesign/macos.rs b/cli/development-cli/src/release/codesign/macos.rs deleted file mode 100644 index a301bf5121..0000000000 --- a/cli/development-cli/src/release/codesign/macos.rs +++ /dev/null @@ -1,315 +0,0 @@ -//! Manages code signing and notarizing on MacOS. - -use std::{env, io::BufRead}; - -use anyhow::{Context, ensure}; -use serde::{Deserialize, Serialize}; - -use crate::{ - release::{ - compress::{cli_release_file_name, release_file_name}, - paths::{cli_binary_dir, cli_binary_name, release_build_path, release_path}, - }, - shell::shell_std_command, - target::Target, -}; - -#[derive(Debug, Clone, Serialize, Deserialize)] -/// Represents the configurations needed for code signing on MacOS -pub struct MacOsConfig { - /// Needed environment variables while code signing - env_vars: EnvironmentVariables, - /// Provided Options to be given as arguments for the standard code signing command - /// for files and directories to be - sign_cmd_options: String, - /// Paths for files and directories to be code signed. - sign_paths: SignPaths, - /// Final signing command with deep and strict flags. - final_sign_command: FinalSignCommand, - /// Command used in notarizing process. - notarize_command: NotarizeCommand, -} - -#[derive(Debug, Clone, Serialize, Deserialize)] -/// Represents the needed environment variables while code signing -struct EnvironmentVariables { - /// Variable that must be activated to start code signing - check_enabled: Vec, - /// Variable that can't exist to start code signing - check_disabled: Vec, - /// Variables to set by the start of code signing - set_on_start: Vec<(String, String)>, - /// Variable name for signing id. - signing_id: String, -} - -#[derive(Debug, Clone, Serialize, Deserialize)] -/// Represents relative paths and glob patterns which must be code signed. -/// All paths starts form `release build path` -struct SignPaths { - /// Paths to single files and directories - single_paths: Vec, - /// Patterns to be used with glob to retrieve all matching files under that patterns. - glob_patterns: Vec, -} - -#[derive(Debug, Clone, Serialize, Deserialize)] -/// Represents the components for the final sign command (Command for deep and strict code signing) -struct FinalSignCommand { - /// Command and its arguments. - command: String, - /// Relative path to be code signed starting from `release build path` - sign_path: String, -} - -#[derive(Debug, Clone, Serialize, Deserialize)] -/// Represents the code notarizing command with its arguments and environment variables. -struct NotarizeCommand { - /// Notarize command with each arguments before providing the path. - command: String, - /// Environment variable for Apple ID to be provided as CLI argument. - env_apple_id: String, - /// Environment variable for Team ID to be provided as CLI argument. - env_team_id: String, - /// Environment variable for Password to be provided as CLI argument. - env_password: String, - /// Line to look for in the output of the notarizing command to ensure it has been accepted. - accepted_line: String, -} - -/// Check if code signing and notarizing is allowed according to the environment variables. -pub fn allowed(config: &MacOsConfig) -> bool { - config - .env_vars - .check_enabled - .iter() - .all(|e| env::var(e).is_ok()) - && config - .env_vars - .check_disabled - .iter() - .all(|e| env::var(e).is_err()) -} - -/// Applies code signing form the given configurations. -/// -/// # Panic: -/// -/// This function panics if code signing isn't allowed according to environment variables. -pub fn apply_codesign(config: &MacOsConfig) -> anyhow::Result<()> { - assert!(allowed(config), "Code sign isn't allowed"); - - // Set environment variable on start - for (key, value) in config.env_vars.set_on_start.iter() { - // Safety: Environment variables access only happen in this single-threaded code. - unsafe { env::set_var(key, value) }; - } - - let app_root = Target::App.cwd(); - let release_build_path = release_build_path(); - - let release_build_path_str = release_build_path.to_string_lossy(); - - // Retrieve sign paths - let mut sign_paths: Vec<_> = Vec::new(); - - // First: glob paths. - for glob_path in config - .sign_paths - .glob_patterns - .iter() - .map(|p| format!("{release_build_path_str}/{p}")) - { - let paths: Vec<_> = glob::glob(&glob_path) - .context("Error while retrieving file paths via glob")? - .flat_map(|p| p.ok()) - .filter(|p| p.is_file()) - .filter(|p| !p.is_symlink()) - .collect(); - - sign_paths.extend(paths); - } - - // Second: single paths. - sign_paths.extend( - config - .sign_paths - .single_paths - .iter() - .map(|p| release_build_path.join(p)), - ); - - // Third: Chipmunk CLI binary path. - let cli_binary_path = cli_binary_dir().join(cli_binary_name()); - sign_paths.push(cli_binary_path); - - // Start signing files - let sign_id = env::var(&config.env_vars.signing_id) - .context("Error while retrieving signing ID environment variable")?; - for path in sign_paths { - let cmd = format!( - "codesign --sign \"{sign_id}\" {} \"{}\"", - config.sign_cmd_options, - path.to_string_lossy() - ); - println!("DEBUG: CodeSign CMD: '{cmd}'"); - let cmd_status = shell_std_command() - .arg(&cmd) - .current_dir(&app_root) - .status() - .context("Error while running command codesign for files.")?; - - ensure!(cmd_status.success(), "Codesign failed. Command : '{cmd}'"); - } - - // Deep struct command - let final_sign_path = release_build_path.join(&config.final_sign_command.sign_path); - let final_cmd = format!( - "{} {}", - config.final_sign_command.command, - final_sign_path.to_string_lossy() - ); - let cmd_status = shell_std_command() - .arg(&final_cmd) - .current_dir(&app_root) - .status() - .with_context(|| format!("Error while running final sign command. Command: {final_cmd}"))?; - - ensure!( - cmd_status.success(), - "Final Codesign failed. Command : '{final_cmd}'" - ); - - Ok(()) -} - -pub fn notarize(config: &MacOsConfig, custom_platform: Option<&str>) -> anyhow::Result<()> { - assert!(allowed(config), "Code notarizing isn't allowed"); - let apple_id = env::var(&config.notarize_command.env_apple_id).with_context(|| { - format!( - "Error while retrieving environment variable: {}", - config.notarize_command.env_apple_id - ) - })?; - - let team_id = env::var(&config.notarize_command.env_team_id).with_context(|| { - format!( - "Error while retrieving environment variable: {}", - config.notarize_command.env_team_id - ) - })?; - - let password = env::var(&config.notarize_command.env_password).with_context(|| { - format!( - "Error while retrieving environment variable: {}", - config.notarize_command.env_password - ) - })?; - - let release_file_name = release_file_name(custom_platform)?; - let archname = format!("{release_file_name}.tgz"); - - let cli_archname = format!("{}.tgz", cli_release_file_name(custom_platform)?); - - for arch in [archname, cli_archname] { - println!("Running notarize command on `{arch}`..."); - - let release_file_path = release_path().join(arch); - let cmd = format!( - "{} \"{}\" --apple-id \"{apple_id}\" --team-id \"{team_id}\" --password \"{password}\"", - config.notarize_command.command, - release_file_path.to_string_lossy() - ); - - let app_root = Target::App.cwd(); - - let cmd_output = shell_std_command() - .arg(&cmd) - .current_dir(&app_root) - .output() - .context("Error while running notarize command.")?; - - let mut accepted = false; - - println!("Notarize commnad output on stdout:"); - for line in cmd_output.stdout.lines().map_while(Result::ok) { - println!("{line}"); - if !accepted && line.trim() == config.notarize_command.accepted_line.as_str() { - accepted = true; - } - } - - println!("---------------------------------"); - - println!("Notarize commnad output on stderr:"); - for line in cmd_output.stderr.lines().map_while(Result::ok) { - println!("{line}"); - if !accepted && line.trim() == config.notarize_command.accepted_line.as_str() { - accepted = true; - } - } - - ensure!( - cmd_output.status.success(), - "Code notarize failed. Command : '{}'", - cmd.replace(&apple_id, "***") - .replace(&team_id, "***") - .replace(&password, "***") - ); - - ensure!( - accepted, - r"Accepted line couldn't be found in notarize command output -Ensure that the content of the `accepted_line` field in the codesign configuration file is included as a single line in the output of the notarize command" - ); - } - - Ok(()) -} - -/// Used only during development to create a prototype configuration for serialization and generating -/// configurations files for prototyping. -pub fn __generate_config_for_prototyping() -> MacOsConfig { - let env_vars = EnvironmentVariables { - check_enabled: vec!["APPLEID".into(), "APPLEIDPASS".into()], - check_disabled: vec!["SKIP_NOTARIZE".into()], - set_on_start: vec![("CSC_IDENTITY_AUTO_DISCOVERY".into(), "true".into())], - signing_id: String::from("SIGNING_ID"), - }; - - let sign_cmd_options = String::from( - "--force --timestamp --options runtime --verbose --deep --strict --entitlements ./resources/mac/entitlements.mac.plist", - ); - - let sign_paths = SignPaths { - single_paths: vec![ - String::from("chipmunk.app/Contents/Resources/bin/updater"), - String::from("chipmunk.app/Contents/MacOS/chipmunk"), - String::from("chipmunk.app"), - ], - glob_patterns: vec![String::from( - "chipmunk.app/Contents/Frameworks/*.framework/Versions/A/**/**", - )], - }; - - let final_sign_command = FinalSignCommand { - command: String::from("codesign -vvv --deep --strict"), - sign_path: String::from("chipmunk.app"), - }; - - let notarize_command = NotarizeCommand { - command: String::from("xcrun notarytool submit --force --wait --verbose"), - env_apple_id: String::from("APPLEID"), - env_team_id: String::from("TEAMID"), - env_password: String::from("APPLEIDPASS"), - accepted_line: String::from("status: Accepted"), - }; - - MacOsConfig { - env_vars, - sign_cmd_options, - sign_paths, - final_sign_command, - notarize_command, - } -} diff --git a/cli/development-cli/src/release/codesign/mod.rs b/cli/development-cli/src/release/codesign/mod.rs deleted file mode 100644 index 8413c23dd7..0000000000 --- a/cli/development-cli/src/release/codesign/mod.rs +++ /dev/null @@ -1,62 +0,0 @@ -//! Manages code signing and notarizing across multiple platform when needed. - -use std::path::PathBuf; - -use anyhow::{Context, bail, ensure}; -use macos::MacOsConfig; - -mod macos; - -#[derive(Debug, Clone)] -/// Manages code signing and notarizing across multiple platform. -pub enum CodeSign { - MacOs(MacOsConfig), -} - -impl CodeSign { - /// Load and validate the given configurations file, creating [`CodeSign`] instance. - pub fn load(config_path: PathBuf) -> anyhow::Result { - if !cfg!(target_os = "macos") { - bail!("Code Sign isn't supported on this platform") - } - - ensure!( - config_path.exists(), - "Code-Sign configuration file doesn't exists" - ); - - let config_str = std::fs::read_to_string(config_path) - .context("Error while reading code sign configuration file")?; - let mac_config = toml::from_str(&config_str) - .context("Error while serializing code sign configuration file")?; - - Ok(Self::MacOs(mac_config)) - } - - /// Check if code signing and notarizing is allowed according to the environment variables. - pub fn allowed(&self) -> bool { - match self { - CodeSign::MacOs(config) => macos::allowed(config), - } - } - - /// Applies code signing with the given configurations. - /// - /// # Panic: - /// - /// This function panics if code signing isn't allowed according to environment variables. - pub fn apply_codesign(&self) -> anyhow::Result<()> { - assert!(self.allowed(), "Code sign isn't allowed"); - - match self { - CodeSign::MacOs(config) => macos::apply_codesign(config), - } - } - - pub fn notarize(&self, custom_platform: Option<&str>) -> anyhow::Result<()> { - assert!(self.allowed(), "Code Notarizing isn't allowed"); - match self { - CodeSign::MacOs(config) => macos::notarize(config, custom_platform), - } - } -} diff --git a/cli/development-cli/src/release/compress.rs b/cli/development-cli/src/release/compress.rs deleted file mode 100644 index b9dd8a34d7..0000000000 --- a/cli/development-cli/src/release/compress.rs +++ /dev/null @@ -1,238 +0,0 @@ -//! Manages compressing the bundled Chipmunk app and CLI tool, providing one compressed file -//! for each per platform and including the current version of Chipmunk in the file name. - -use std::{ - borrow::Cow, - fs::{self, File}, - io::BufReader, -}; - -use anyhow::{Context, ensure}; -use serde_json::Value; - -use crate::{ - release::{ - metadata::{METADATA_FILENAME, metadata_path}, - paths::{cli_binary_dir, cli_binary_name, release_build_path, release_path}, - }, - shell::shell_tokio_command, - target::Target, -}; - -use super::env_utls::is_arm_archit; - -/// Compresses the bundled Chipmunk on the current platform, Creating one compressed file to be -/// used on releases. -/// * `custom_platform`: Optional Custom platform name to be used in archive name. -pub async fn compress(custom_platform: Option<&str>) -> anyhow::Result<()> { - let release_file_name = release_file_name(custom_platform)?; - let archname = format!("{release_file_name}.tgz"); - - let mut tar_cmd = format!("tar -czf ../{archname} "); - - if cfg!(target_os = "macos") { - tar_cmd.push_str("./chipmunk.app"); - } else { - tar_cmd.push_str("* .release"); - }; - - let metafile = metadata_path(); - if metafile.exists() { - use std::fmt::Write; - let _ = write!(&mut tar_cmd, " {METADATA_FILENAME}"); - } - - println!("Running command: '{tar_cmd}'"); - - // We must call the shell and pass it all the arguments at once because we are using the shell - // wild card `*` which can't be running without a shell. - let mut command = shell_tokio_command(); - - let release_build_path = release_build_path(); - let cmd_status = command - .arg(tar_cmd) - .current_dir(release_build_path) - .kill_on_drop(true) - .status() - .await - .context("Error while running compress command")?; - - ensure!(cmd_status.success(), "Release: Compress Command failed"); - - let created_file_path = release_path().join(archname); - - ensure!( - created_file_path.exists(), - "Compressed file doesn't exist. Path {}", - created_file_path.display() - ); - - println!( - "Compressed file for release successfully created: {}", - created_file_path.display() - ); - - Ok(()) -} - -/// Provides the release file on the current platform, reading and adding -/// Chipmunk version to the filename. -/// -/// * `custom_platform`: Optional Custom platform name to be used in archive name, -/// to replace the default operating system when provided. -pub fn release_file_name(custom_platform: Option<&str>) -> anyhow::Result { - let version = chipmunk_version().context("Error while retrieving Chipmunk version")?; - let platform = custom_platform.map_or_else(|| os_env_platform().into(), Cow::from); - - let file_name = format!("chipmunk@{version}-{platform}-portable"); - - Ok(file_name) -} - -/// Provides the platform for release file names based on the operating system and -/// the system's architecture. -fn os_env_platform() -> String { - let mut platform = if cfg!(target_os = "linux") { - String::from("linux") - } else if cfg!(target_os = "macos") { - String::from("darwin") - } else if cfg!(target_os = "windows") { - String::from("win64") - } else { - panic!( - "Unknown target os: {}, Arch: {}", - std::env::consts::OS, - std::env::consts::ARCH - ); - }; - - if is_arm_archit() { - platform.push_str("-arm64"); - } - - platform -} - -/// Reads current Chipmunk version from `package.json` file. -fn chipmunk_version() -> anyhow::Result { - let package_path = Target::App.cwd().join("package.json"); - - ensure!( - package_path.exists(), - "Electron `package.json` file doesn't exit. File path: {}", - package_path.display() - ); - - let f = File::open(&package_path).with_context(|| { - format!( - "Error while opening Electron `package.json` file. File Path: {}", - package_path.display() - ) - })?; - - let reader = BufReader::new(f); - - let json_content: Value = serde_json::from_reader(reader) - .context("Error while parsing Electron `package.json` file.")?; - - json_content - .get("version") - .and_then(|v| { - if let Value::String(version) = v { - Some(version.to_owned()) - } else { - None - } - }) - .context("Chipmunk version doesn't exist in json value from Electron `package.json` file.") -} - -/// Compresses the bundled Chipmunk CLI on the current platform, Creating one compressed file -/// to be used on releases. -pub async fn compress_cli(custom_platform: Option<&str>) -> anyhow::Result<()> { - let release_file_name = cli_release_file_name(custom_platform)?; - - let arch_name = format!("{release_file_name}.tgz"); - - let tar_cmd = format!( - "tar -czf {arch_name} --directory={binary_path} {binary_name}", - binary_path = cli_binary_dir().to_string_lossy(), - binary_name = cli_binary_name() - ); - - println!("Running command: '{tar_cmd}'"); - - // We must call the shell and pass it all the arguments at once because we are using the shell - // wild card `*` which can't be running without a shell. - let mut command = shell_tokio_command(); - - let cmd_status = command - .arg(tar_cmd) - .current_dir(release_path()) - .kill_on_drop(true) - .status() - .await - .context("Error while running compress command")?; - - ensure!(cmd_status.success(), "Release: Compress Command failed"); - - let created_file_path = release_path().join(arch_name); - - ensure!( - created_file_path.exists(), - "Chipmunk CLI compressed file doesn't exist. Path {}", - created_file_path.display() - ); - - println!( - "Compressed file for release successfully created: {}", - created_file_path.display() - ); - - Ok(()) -} - -/// Provides the release file name for Chipmunk CLI on the current platform. -/// -/// * `custom_platform`: Optional Custom platform name to be used in archive name, -/// to replace the default operating system when provided. -pub fn cli_release_file_name(custom_platform: Option<&str>) -> anyhow::Result { - let version = chipmunk_cli_version().context("Error while retrieving chipmunk cli version")?; - let platform: Cow<_> = custom_platform - .map(|p| p.into()) - .unwrap_or_else(|| os_env_platform().into()); - - let file_name = format!("chipmunk-cli@{version}-{platform}-portable"); - - Ok(file_name) -} - -/// Reads current Chipmunk CLI version from `cargo.toml` file. -fn chipmunk_cli_version() -> anyhow::Result { - let cargo_path = Target::CliChipmunk.cwd().join("Cargo.toml"); - - ensure!( - cargo_path.exists(), - "`Cargo.toml` file doesn't exit. File path: {}", - cargo_path.display() - ); - - let cargo_content = - fs::read_to_string(&cargo_path).context("Error while reading `Cargo.toml` file")?; - - let cargo_toml: toml::Table = cargo_content - .parse() - .context("Parsing content of `Cargo.toml` file failed")?; - - cargo_toml - .get("package") - .and_then(|pkg| pkg.get("version")) - .and_then(|ver| { - if let toml::Value::String(version) = ver { - Some(version.to_owned()) - } else { - None - } - }) - .context("Enable to find Chipmunk CLI version on `Cargo.toml` file") -} diff --git a/cli/development-cli/src/release/env_utls.rs b/cli/development-cli/src/release/env_utls.rs deleted file mode 100644 index 71e4b53b5c..0000000000 --- a/cli/development-cli/src/release/env_utls.rs +++ /dev/null @@ -1,28 +0,0 @@ -//! Manages the environment variables for the release job, including loading them from `.env` files. - -use console::style; - -/// Loads the environment variables form `.env` file if available, -/// printing the loading state to the console. -pub fn load_from_env_file() { - match dotenvy::dotenv() { - Ok(path) => { - println!( - "{}\n`.env` file path: {}", - style("`.env` file loaded").green(), - path.display() - ) - } - Err(err) => { - println!( - "{} Info: {err}", - style("dotenv for local environment not found, not considering .env file.").cyan() - ); - } - } -} - -/// Checks if the tool is running on arm architecture. -pub const fn is_arm_archit() -> bool { - cfg!(any(target_arch = "arm", target_arch = "aarch64")) -} diff --git a/cli/development-cli/src/release/metadata.rs b/cli/development-cli/src/release/metadata.rs deleted file mode 100644 index ac5e2e2e36..0000000000 --- a/cli/development-cli/src/release/metadata.rs +++ /dev/null @@ -1,61 +0,0 @@ -//! The module handles serializing and writing release metadata such as custom prefix for -//! archive name ...etc. - -use std::{ - fs::{self, File}, - path::PathBuf, -}; - -use anyhow::Context; -use serde::Serialize; - -use crate::release::paths::release_bin_path; - -pub const METADATA_FILENAME: &str = ".metadata"; - -/// Includes metadata related to the app and the release such as custom platform for -/// archive name... -#[derive(Debug, Clone, Serialize)] -pub struct ReleaseMetadata<'a> { - pub custom_platform: Option<&'a str>, -} - -impl ReleaseMetadata<'_> { - /// Checks if metadata struct actually contains metadata within. - pub fn is_empty(&self) -> bool { - let Self { custom_platform } = self; - - !custom_platform.is_some() - } -} - -/// Write metadata file into the release path. -/// Metadata includes data related to Chipmunk app and release such as `custom_platform` -pub fn write_metadata(custom_platform: &str) -> anyhow::Result<()> { - let metadata = ReleaseMetadata { - custom_platform: Some(custom_platform), - }; - - assert!( - !metadata.is_empty(), - "We shouldn't write an empty metadata file." - ); - - let metadata_file = metadata_path(); - - if metadata_file.exists() { - println!( - "Removing already existing metadata file to be rewritten. File: {}", - metadata_file.display() - ); - fs::remove_file(&metadata_file).context("Error while removing snapshot file")?; - } - - let mut file = File::create(metadata_file).context("Error while creating metadata file")?; - - serde_json::to_writer_pretty(&mut file, &metadata).context("Error while writing metadata file") -} - -pub fn metadata_path() -> PathBuf { - release_bin_path().join(METADATA_FILENAME) -} diff --git a/cli/development-cli/src/release/mod.rs b/cli/development-cli/src/release/mod.rs deleted file mode 100644 index 2e2e8c0d73..0000000000 --- a/cli/development-cli/src/release/mod.rs +++ /dev/null @@ -1,254 +0,0 @@ -//! Manages creating releases of Chipmunk on the current platform, including building, bundling the -//! app with snapshot file if needed, then compressing to provide one file for each platform with -//! current version of Chipmunk. -//! -//! This method is meant to be used in CD pipeline when a release is created to provide the release -//! assets for each supported platform. - -mod bundle; -mod codesign; -mod compress; -mod env_utls; -mod metadata; -mod paths; - -use std::{fs, path::PathBuf, time::Instant}; - -use anyhow::{Context, ensure}; -use bundle::bundle_release; -use codesign::CodeSign; -use compress::{compress, compress_cli}; -use console::style; -use env_utls::load_from_env_file; -use paths::release_path; - -use crate::{ - job_type::JobType, jobs_runner, log_print::print_log_separator, target::Target, - tracker::get_tracker, -}; - -/// Builds, bundles and compress Chipmunk with configurations for each platform. -/// -/// * `development`: Sets if Chipmunk should be built in development mode. -/// * `code_sign_path`: Path to the configuration file to do code signing. -/// * `custom_platform`: Custom platform name to be used in release archive file name. -pub async fn do_release( - development: bool, - code_sign_path: Option, - custom_platform: Option<&str>, -) -> anyhow::Result<()> { - debug_assert!( - !get_tracker().show_bars(), - "Release shouldn't run with UI bars" - ); - - let code_sign = match code_sign_path { - Some(config_path) => Some(CodeSign::load(config_path)?), - None => None, - }; - - let release_start = Instant::now(); - - load_from_env_file(); - - // *** Clean previous releases *** - - println!( - "{}", - style("Start Clean previous release...") - .blue() - .bright() - .bold() - ); - - clean_release()?; - - println!( - "{}", - style("Clean previous release succeeded...").green().bold() - ); - - print_log_separator(); - - // *** Build Chipmunk *** - - println!( - "{}", - style("Start Building Chipmunk Application...") - .blue() - .bright() - .bold() - ); - - // *** Build Chipmunk *** - - let build_start = Instant::now(); - - println!( - "{}", - style("Start Building Chipmunk Process...") - .blue() - .bright() - .bold() - ); - - let results = jobs_runner::run( - &[Target::App, Target::Updater, Target::CliChipmunk], - JobType::Build { - production: !development, - }, - ) - .await - .context("Build Chipmunk failed")?; - - // Check for failing jobs - let success = results - .iter() - .all(|r| r.as_ref().is_ok_and(|s| s.status.success())); - ensure!(success, "Build Chipmunk failed: Some tasks have failed"); - - let msg = format!( - "Building Chipmunk Application succeeded in {} seconds.", - build_start.elapsed().as_secs().max(1) - ); - println!("{}", style(msg).green().bold()); - - print_log_separator(); - - // *** Bundle Chipmunk *** - - println!( - "{}", - style("Start Release Bundle Process...") - .blue() - .bright() - .bold() - ); - - let bundle_start = Instant::now(); - - bundle_release(custom_platform).await?; - - let finish_msg = format!( - "Release Bundle succeeded in {} seconds.", - bundle_start.elapsed().as_secs().max(1) - ); - println!("{}", style(finish_msg).green().bold()); - - print_log_separator(); - - // *** Code Sign *** - - if let Some(code_sign) = code_sign.as_ref() { - if code_sign.allowed() { - println!("{}", style("Start Code Signing...").blue().bright().bold()); - let codesign_start = Instant::now(); - code_sign.apply_codesign()?; - - let finish_msg = format!( - "Code signing succeeded in {} seconds.", - codesign_start.elapsed().as_secs().max(1) - ); - println!("{}", style(finish_msg).green().bold()); - } else { - println!(); - println!( - "{}", - style("Code Signing isn't allowed due to the environment variables") - .yellow() - .bold() - ); - } - - print_log_separator(); - } - - // *** Compressing *** - - println!( - "{}", - style("Start Compressing release files...") - .blue() - .bright() - .bold() - ); - - let compress_start = Instant::now(); - - compress(custom_platform).await?; - compress_cli(custom_platform) - .await - .context("Error while compressing Chipmunk CLI binary")?; - - let finish_msg = format!( - "Compressing succeeded in {} seconds.", - compress_start.elapsed().as_secs().max(1) - ); - println!("{}", style(finish_msg).green().bold()); - - print_log_separator(); - - // *** Notarize *** - - if let Some(code_sign) = code_sign { - if code_sign.allowed() { - println!( - "{}", - style("Start Code Notarizing...").blue().bright().bold() - ); - let notarizing_start = Instant::now(); - code_sign.notarize(custom_platform)?; - - let finish_msg = format!( - "Code notarizing succeeded in {} seconds.", - notarizing_start.elapsed().as_secs().max(1) - ); - println!("{}", style(finish_msg).green().bold()); - } else { - println!(); - println!( - "{}", - style("Code Notarizing isn't allowed due to the environment variables") - .yellow() - .bold() - ); - } - - print_log_separator(); - } - - // *** Final results *** - - println!(); - let finish_msg = format!( - "*** Chipmunk Release succeeded in {} seconds. ***", - release_start.elapsed().as_secs() - ); - - println!("{}", style(finish_msg).green().bold()); - - Ok(()) -} - -/// Clean existing release if needed. -fn clean_release() -> anyhow::Result<()> { - let release_path = release_path(); - - if !release_path.exists() { - return Ok(()); - } - - println!( - "Removing release directory, path: {}", - release_path.display() - ); - - fs::remove_dir_all(&release_path)?; - - println!( - "Release directory removed, path: {}", - release_path.display() - ); - - Ok(()) -} diff --git a/cli/development-cli/src/release/paths.rs b/cli/development-cli/src/release/paths.rs deleted file mode 100644 index 9323954795..0000000000 --- a/cli/development-cli/src/release/paths.rs +++ /dev/null @@ -1,84 +0,0 @@ -//! Manage resolving and providing the needed paths for the release job. - -use std::path::PathBuf; - -use crate::target::Target; - -use super::env_utls::is_arm_archit; - -/// Provides the full path of the release directory for App target. -pub fn release_path() -> PathBuf { - Target::App.cwd().join("release") -} - -/// Provides the full path of the bin directory in release directory. -pub fn release_bin_path() -> PathBuf { - release_path().join(release_bin_dir()) -} - -/// Provides the name of the bin directory inside the release directory on current platform. -fn release_bin_dir() -> &'static str { - let is_arm = is_arm_archit(); - if cfg!(target_os = "linux") { - if is_arm { - "linux-arm64-unpacked" - } else { - "linux-unpacked" - } - } else if cfg!(target_os = "macos") { - if is_arm { - "mac-arm64/chipmunk.app/Contents/MacOS" - } else { - "mac/chipmunk.app/Contents/MacOS" - } - } else if cfg!(target_os = "windows") { - "win-unpacked" - } else { - panic!( - "Unknown target os: {}, Arch: {}", - std::env::consts::OS, - std::env::consts::ARCH - ); - } -} - -/// Provides the full path of the build directory in release directory. -pub fn release_build_path() -> PathBuf { - release_path().join(release_build_dir()) -} - -/// Provides the name of the build directory inside the release directory on current platform. -pub fn release_build_dir() -> &'static str { - let is_arm = is_arm_archit(); - if cfg!(target_os = "linux") { - if is_arm { - "linux-arm64-unpacked" - } else { - "linux-unpacked" - } - } else if cfg!(target_os = "macos") { - if is_arm { "mac-arm64" } else { "mac" } - } else if cfg!(target_os = "windows") { - "win-unpacked" - } else { - panic!( - "Unknown target os: {}, Arch: {}", - std::env::consts::OS, - std::env::consts::ARCH - ); - } -} - -/// Provides the path for release directory Chipmunk CLI binary file. -pub fn cli_binary_dir() -> PathBuf { - Target::CliChipmunk.cwd().join("target").join("release") -} - -/// Filename of Chipmunk CLI binary file. -pub fn cli_binary_name() -> &'static str { - if cfg!(target_os = "windows") { - "chipmunk-cli.exe" - } else { - "chipmunk-cli" - } -} diff --git a/cli/development-cli/src/shell.rs b/cli/development-cli/src/shell.rs deleted file mode 100644 index e78fc0ace7..0000000000 --- a/cli/development-cli/src/shell.rs +++ /dev/null @@ -1,175 +0,0 @@ -//! Provides struct representing the shell running by user besides a method to generate -//! completion of the CLI sub-commands and arguments for the given shell. - -use std::{fmt::Display, io}; - -use anyhow::Context; -use clap::CommandFactory; -use clap_complete::{Shell, generate}; -use serde::{Deserialize, Serialize}; - -use crate::{cli_args::CargoCli, user_config::UserConfiguration}; - -#[derive(Debug, Clone, Copy, Eq, PartialEq, Serialize, Deserialize)] -#[serde(rename_all = "kebab-case")] -/// Represents the shell running by users providing method to create commands to run process -/// on the given shell. -pub enum UserShell { - #[cfg(unix)] - Sh, - #[cfg(windows)] - Cmd, - Bash, - Zsh, - Fish, - NuShell, - Elvish, - PowerShell, -} - -impl Display for UserShell { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - match self { - #[cfg(unix)] - UserShell::Sh => write!(f, "Sh"), - #[cfg(windows)] - UserShell::Cmd => write!(f, "Cmd"), - UserShell::Bash => write!(f, "Bash"), - UserShell::Zsh => write!(f, "Zsh"), - UserShell::Fish => write!(f, "Fish"), - UserShell::NuShell => write!(f, "Nu Shell"), - UserShell::Elvish => write!(f, "Envish"), - UserShell::PowerShell => write!(f, "Power Shell"), - } - } -} - -#[cfg(unix)] -impl Default for UserShell { - fn default() -> Self { - use std::sync::LazyLock; - // Try to retrieve the default shell from the environment variable if available, - // otherwise use 'sh' - static DEFAULT_SHELL: LazyLock = LazyLock::new(|| { - std::env::var("SHELL") - .ok() - .and_then(|shell| shell.rsplit('/').next().map(|a| a.to_owned())) - .map(|shell| match shell.to_lowercase().as_str() { - "bash" => UserShell::Bash, - "zsh" => UserShell::Zsh, - "fish" => UserShell::Fish, - "pwsh" => UserShell::PowerShell, - "nu" => UserShell::NuShell, - "elvish" => UserShell::Elvish, - _ => UserShell::Sh, - }) - .unwrap_or(UserShell::Sh) - }); - - *DEFAULT_SHELL - } -} - -#[cfg(windows)] -impl Default for UserShell { - fn default() -> Self { - UserShell::Cmd - } -} - -impl UserShell { - /// Provides [`std::process::Command`] to run a process on the given shell. - pub fn std_command(self) -> std::process::Command { - let mut cmd = std::process::Command::new(self.bin()); - cmd.arg(self.arg()); - - cmd - } - - /// Provides an asynchronous [`tokio::process::Command`] to run a process on the given shell. - pub fn tokio_command(self) -> tokio::process::Command { - let mut cmd = tokio::process::Command::new(self.bin()); - cmd.arg(self.arg()); - - cmd - } - - /// Binary name for the shell - pub const fn bin(self) -> &'static str { - match self { - #[cfg(unix)] - UserShell::Sh => "sh", - #[cfg(windows)] - UserShell::Cmd => "cmd", - UserShell::Bash => "bash", - UserShell::Zsh => "zsh", - UserShell::Fish => "fish", - UserShell::NuShell => "nu", - UserShell::Elvish => "elvish", - UserShell::PowerShell => "pwsh", - } - } - - /// Argument provided by each shell to run the provided process command and its arguments. - const fn arg(self) -> &'static str { - match self { - #[cfg(unix)] - UserShell::Sh => "-c", - #[cfg(windows)] - UserShell::Cmd => "/C", - UserShell::Bash - | UserShell::Zsh - | UserShell::Fish - | UserShell::NuShell - | UserShell::Elvish => "-c", - UserShell::PowerShell => "-Command", - } - } - - /// Checks if the shell exist on the system by running it with the version argument. - pub fn exist(self) -> bool { - // Default shells are always installed on their respecting operating system and don't need - // extra checks avoiding other potential problem because `sh` doesn't have a version - // argument. - let version_arg = match self { - #[cfg(unix)] - UserShell::Sh => return true, - #[cfg(windows)] - UserShell::Cmd => return true, - UserShell::Bash - | UserShell::Zsh - | UserShell::Fish - | UserShell::NuShell - | UserShell::Elvish => "--version", - UserShell::PowerShell => "-Version", - }; - - // Other wise run the shell with version argument to check if exists. - std::process::Command::new(self.bin()) - .arg(version_arg) - .output() - .is_ok_and(|o| o.status.success()) - } -} - -/// Creates [`std::process::Command`] running in the corresponding standard shell to each platform. -pub fn shell_std_command() -> std::process::Command { - UserConfiguration::get().shell.std_command() -} - -/// Creates [`tokio::process::Command`] running in the corresponding standard shell to each platform. -pub fn shell_tokio_command() -> tokio::process::Command { - UserConfiguration::get().shell.tokio_command() -} - -/// Generates shell completion for the given shell printing them to stdout -pub fn generate_completion(shell: Shell) -> anyhow::Result<()> { - let mut cmd = CargoCli::command(); - let bin_name = cmd - .get_bin_name() - .context("Error while getting bin name")? - .to_owned(); - - generate(shell, &mut cmd, bin_name, &mut io::stdout()); - Ok(()) -} diff --git a/cli/development-cli/src/spawner.rs b/cli/development-cli/src/spawner.rs deleted file mode 100644 index fd11aec8b7..0000000000 --- a/cli/development-cli/src/spawner.rs +++ /dev/null @@ -1,182 +0,0 @@ -//! Manages spawning the provided commands in both concurrent and sequential ways, while sending -//! their output and status to the `Tracker`. - -use crate::{ - JobsState, jobs_runner::JobDefinition, location::get_root, shell::shell_tokio_command, - target::ProcessCommand, tracker::get_tracker, -}; -use anyhow::Context; -use core::panic; -use std::{ - path::PathBuf, - process::{ExitStatus, Stdio}, -}; -use tokio::io::{AsyncBufReadExt, BufReader}; - -#[derive(Clone, Debug)] -pub struct SpawnResult { - pub report: Vec, - pub status: ExitStatus, - pub job: String, - pub cmd: String, - pub skipped: bool, -} - -impl SpawnResult { - /// Create spawn for multiple file system commands - pub fn create_for_fs(job: String, report: Vec) -> Self { - SpawnResult { - report, - job, - status: ExitStatus::default(), - cmd: "Multiple file system commands".into(), - skipped: false, - } - } - - /// Create spawn for jobs that has been skipped - pub fn create_for_skipped(job: String, cmd: String) -> Self { - SpawnResult { - report: Vec::new(), - job, - status: ExitStatus::default(), - cmd, - skipped: true, - } - } - - /// Append other result to the current one producing a combined results form them - pub fn append(&mut self, other: SpawnResult) { - if !other.report.is_empty() { - self.report.extend( - [ - String::default(), - String::from("-------------------------------------------------------------------------------"), - String::default() - ]); - self.report.extend(other.report); - } - - self.job = format!("{} & {}", self.job, other.job); - self.status = match (self.status.success(), other.status.success()) { - (_, true) => self.status, - (false, false) => self.status, - (_, false) => other.status, - }; - - self.cmd = format!("{} \n {}", self.cmd, other.cmd); - self.skipped = self.skipped && other.skipped; - } -} - -#[derive(Debug, Clone, Default)] -pub(crate) struct SpawnOptions { - /// Indicates that log messages should be not shown on UI. - pub suppress_ui: bool, -} - -/// Spawns and runs a job asynchronously, updating the bar when job infos are available -pub async fn spawn( - job_def: JobDefinition, - command: ProcessCommand, - cwd: Option, - environment_vars: impl IntoIterator, - opts: Option, -) -> anyhow::Result { - let opts = opts.unwrap_or_default(); - let cwd = cwd.unwrap_or_else(|| get_root().clone()); - let mut combined_env_vars = vec![(String::from("TERM"), String::from("xterm-256color"))]; - combined_env_vars.extend(environment_vars); - - let tracker = get_tracker(); - let cmd_combined = command.combine(); - let cmd_msg = format!("Running command: {cmd_combined}"); - tracker.msg(job_def, cmd_msg); - let cwd_msg = format!("Running in directory: {}", cwd.display()); - tracker.msg(job_def, cwd_msg); - - let command_result = shell_tokio_command() - .arg(cmd_combined) - .current_dir(&cwd) - .envs(combined_env_vars) - .stdout(Stdio::piped()) - .stderr(Stdio::piped()) - .kill_on_drop(true) - .spawn() - .with_context(|| { - format!( - "Error While running the command '{}'\nwith arguments: {:?}", - command.cmd, command.args - ) - }); - - let mut child = command_result?; - - let stdout = child.stdout.take() - .expect("Developer Error: Stdout is implicitly set in command definition from which the child is spawn"); - let stderr = child.stderr.take() - .expect("Developer Error: Stderr is implicitly set in command definition from which the child is spawn"); - let mut stdout_buf = BufReader::new(stdout); - let mut stderr_buf = BufReader::new(stderr); - - let cancel = JobsState::get().cancellation_token(); - loop { - let mut stdout_line = String::new(); - let mut stderr_line = String::new(); - tokio::select! { - stdout_read_result = stdout_buf.read_line(&mut stdout_line) => { - let stdout_read_bytes = stdout_read_result?; - if stdout_read_bytes == 0 { - break; - } - - if opts.suppress_ui { - tracker.log(job_def, stdout_line); - } else{ - tracker.msg(job_def, stdout_line); - } - - tracker.progress(job_def, None); - } - stderr_read_result = stderr_buf.read_line(&mut stderr_line) => { - let stderr_read_bytes = stderr_read_result?; - if stderr_read_bytes == 0 { - break; - } - - if !stderr_line.trim().is_empty() { - if opts.suppress_ui { - tracker.log_err(job_def, stderr_line); - } else { - tracker.msg_err(job_def, stderr_line); - } - } - - tracker.progress(job_def, None); - - } - _ = cancel.cancelled() => { - child.start_kill().context("Error while trying to kill the process as cancellation token has been invoked")?; - }, - } - } - - let status = child.wait().await?; - - let report_lines = tracker.get_logs(job_def).await?.unwrap_or_default(); - - Ok(SpawnResult { - report: report_lines, - status, - job: job_def.job_title(), - cmd: command.to_string(), - skipped: false, - }) -} - -/// This spawns a new task and return immediately showing that the job has been skipped -pub async fn spawn_skip(job_def: JobDefinition, command: String) -> anyhow::Result { - let skip_result = SpawnResult::create_for_skipped(job_def.job_title(), command); - - Ok(skip_result) -} diff --git a/cli/development-cli/src/target/app.rs b/cli/development-cli/src/target/app.rs deleted file mode 100644 index d10f4a710c..0000000000 --- a/cli/development-cli/src/target/app.rs +++ /dev/null @@ -1,42 +0,0 @@ -use std::fs; - -use anyhow::{Context, ensure}; - -use crate::{fstools, jobs_runner::JobDefinition, spawner::SpawnResult, tracker::get_tracker}; - -use super::Target; - -pub async fn copy_package_file_to_dist( - job_def: JobDefinition, -) -> Result { - const PACKAGE_FILE_NAME: &str = "package.json"; - - let package_file_path = Target::App.cwd().join(PACKAGE_FILE_NAME); - - ensure!( - package_file_path.exists(), - "Package.json File doesn't exist in App. Path: {}", - package_file_path.display() - ); - let tracker = get_tracker(); - - let dist = Target::App.cwd().join("dist"); - if !dist.exists() { - let msg = format!("Creating directory: {}", dist.display()); - tracker.msg(job_def, msg); - - fs::create_dir(&dist) - .with_context(|| format!("Error while creating directory: {}", dist.display()))?; - } - - fstools::cp_file(job_def, package_file_path, dist.join(PACKAGE_FILE_NAME))?; - - let report_logs = tracker.get_logs(job_def).await?.unwrap_or_default(); - - let spawn_res = SpawnResult::create_for_fs( - "Copy `package.json` file to holder/dest directory".into(), - report_logs, - ); - - Ok(spawn_res) -} diff --git a/cli/development-cli/src/target/binding.rs b/cli/development-cli/src/target/binding.rs deleted file mode 100644 index bd14198e0b..0000000000 --- a/cli/development-cli/src/target/binding.rs +++ /dev/null @@ -1,94 +0,0 @@ -use std::fs; - -use anyhow::{Context, bail}; - -use crate::{ - JobsState, fstools, - jobs_runner::{JobDefinition, additional_features::AdditionalFeatures}, - spawner::SpawnResult, - tracker::get_tracker, -}; - -use super::{ProcessCommand, Target}; - -pub fn get_build_cmd(prod: bool) -> anyhow::Result { - let path = Target::Wrapper - .cwd() - .join("node_modules") - .join(".bin") - .join("electron-build-env"); - - let mut args = vec![String::from("nj-cli"), String::from("build")]; - - if prod { - args.push("--release".into()); - } - - if JobsState::get() - .additional_features() - .contains(&AdditionalFeatures::CustomAllocator) - { - args.push(String::from("--")); - args.push(String::from("--features custom-alloc")); - } - - Ok(ProcessCommand::new( - path.to_string_lossy().to_string(), - args, - )) -} - -pub async fn copy_index_node(job_def: JobDefinition) -> Result { - let tracker = get_tracker(); - - // *** Copy `index.node` from rs to ts bindings dist *** - tracker.msg( - job_def, - String::from("Copying `index.node` to ts-bindings dist..."), - ); - - let src_file = Target::Binding.cwd().join("dist").join("index.node"); - if !src_file.exists() { - bail!( - "Error while copying `rs-bindings`. Err: Not found: {}", - src_file.to_string_lossy() - ); - } - - let ts_dist_native_dir = Target::Wrapper.cwd().join("dist").join("native"); - if !ts_dist_native_dir.exists() { - let msg = format!("creating directory: {}", ts_dist_native_dir.display()); - tracker.msg(job_def, msg); - - fs::create_dir_all(&ts_dist_native_dir).with_context(|| { - format!( - "Error while creating directory: {}", - ts_dist_native_dir.display() - ) - })?; - } - - fstools::cp_file( - job_def, - src_file.clone(), - ts_dist_native_dir.join("index.node"), - )?; - - // *** Copy `index.node` from rs to ts bindings src native (dir-tests) *** - tracker.msg( - job_def, - String::from("Copying `index.node` to ts-bindings src native..."), - ); - - let dir_tests = Target::Wrapper.cwd().join("src").join("native"); - let mod_file = dir_tests.join("index.node"); - - fstools::cp_file(job_def, src_file, mod_file)?; - - let report_logs = tracker.get_logs(job_def).await?.unwrap_or_default(); - - Ok(SpawnResult::create_for_fs( - "Copying `index.node` from rs to ts bindings".into(), - report_logs, - )) -} diff --git a/cli/development-cli/src/target/client.rs b/cli/development-cli/src/target/client.rs deleted file mode 100644 index 3e8878e642..0000000000 --- a/cli/development-cli/src/target/client.rs +++ /dev/null @@ -1,68 +0,0 @@ -use std::{fs, path::PathBuf}; - -use anyhow::{Context, bail}; - -use crate::{fstools, jobs_runner::JobDefinition, spawner::SpawnResult, tracker::get_tracker}; - -use super::Target; - -pub fn get_dist_path(prod: bool) -> PathBuf { - Target::Client - .cwd() - .join("dist") - .join(if prod { "release" } else { "debug" }) -} - -pub async fn copy_client_to_app(job_def: JobDefinition) -> Result { - let prod = job_def.job_type.is_production().unwrap_or(false); - let src = get_dist_path(prod); - let dest = Target::App.cwd().join("dist"); - if !src.exists() { - bail!("Not found: {}", src.display()); - } - let tracker = get_tracker(); - if !dest.exists() { - let msg = format!("creating directory: {}", dest.display()); - tracker.msg(job_def, msg); - - fs::create_dir(&dest) - .with_context(|| format!("Error while creating directory: {}", dest.display()))?; - } - let prev = dest.join("client"); - if prev.exists() { - let msg = format!("removing directory: {}", prev.display()); - tracker.msg(job_def, msg); - - fstools::rm_folder(job_def, &prev)?; - } - - fstools::cp_folder(job_def, src.clone(), dest.clone()).await?; - - let rename_from = dest.join( - src.file_name() - .context("Fail to parse client artifacts path")?, - ); - let rename_to = dest.join("client"); - - // Remove the rename to directory if already exists. - if rename_to.exists() { - fstools::rm_folder(job_def, &rename_to)?; - } - - let msg = format!( - "renaming '{}' to '{}'", - rename_from.display(), - rename_to.display() - ); - tracker.msg(job_def, msg); - - std::fs::rename(&rename_from, &rename_to) - .with_context(|| format!("Error while renaming {}", rename_from.display()))?; - - let report_logs = tracker.get_logs(job_def).await?.unwrap_or_default(); - - Ok(SpawnResult::create_for_fs( - "Copy App Build Artifacts".into(), - report_logs, - )) -} diff --git a/cli/development-cli/src/target/mod.rs b/cli/development-cli/src/target/mod.rs deleted file mode 100644 index 1d11a7bea7..0000000000 --- a/cli/development-cli/src/target/mod.rs +++ /dev/null @@ -1,740 +0,0 @@ -//! Manages the definitions of the targets of the jobs providing all the needed methods for -//! each target to run the needed job on it. - -use anyhow::bail; -use clap::ValueEnum; -use futures::future::join_all; -use serde::{Deserialize, Serialize}; -use std::{borrow::Cow, collections::BTreeSet, fmt::Display, iter, path::PathBuf, str::FromStr}; -use tokio::fs; - -use crate::{ - JobsState, - dev_tools::DevTool, - fstools, - job_type::JobType, - jobs_runner::JobDefinition, - location::get_root, - spawner::{SpawnOptions, SpawnResult, spawn, spawn_skip}, - tracker::get_tracker, -}; - -use target_kind::TargetKind; - -mod app; -mod binding; -mod client; -mod protocol; -mod target_kind; -mod updater; -mod wasm; -mod wrapper; - -#[derive( - Debug, ValueEnum, Clone, Copy, Hash, PartialEq, Eq, PartialOrd, Ord, Serialize, Deserialize, -)] -// * NOTE: The order of targets must match the running-order between them because it's used for -// solving their dependencies-graph using BTreeMap -// -// * NOTE: We provide all targets with match arms without using wild-card matching nor -// `matches!()` macro to keep the compiler assistance when adding new targets. -pub enum Target { - /// Represents the path `application/apps/indexer` - Core, - /// Represents the path `application/platform` - Shared, - /// Represents the path `application/apps/protocol` - Protocol, - /// Represents the path `application/apps/rustcore/rs-bindings` - Binding, - /// Represents the path `application/apps/rustcore/ts-bindings` - Wrapper, - /// Represents the path `application/apps/rustcore/wasm-bindings` - Wasm, - /// Represents the path `application/client` - Client, - /// Represents the path `application/apps/precompiled/updater` - Updater, - /// Represents the path `application/holder` - App, - /// Represents the path `cli/development-cli` - CliDev, - /// Represents the path `cli/chipmunk-cli` - CliChipmunk, - /// Represents the path `plugins/plugins_api` - PluginsApi, -} - -#[derive(Debug, Clone)] -/// Represents a command to run with `process::Command` and its arguments -pub struct ProcessCommand { - pub cmd: Cow<'static, str>, - pub args: Vec, -} - -impl ProcessCommand { - pub fn new(cmd: impl Into>, args: Vec) -> Self { - Self { - cmd: cmd.into(), - args, - } - } - - /// Combines the command and its arguments in one line to be used as a shell command. - pub fn combine(&self) -> String { - format!("{} {}", self.cmd, self.args.join(" ")) - } -} - -impl Display for ProcessCommand { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - write!(f, "{} {}", self.cmd, self.args.join(" ")) - } -} - -#[derive(Debug, Clone)] -/// Represents command and spawns infos to run with `Target::Test` -pub struct TestSpawnCommand { - command: ProcessCommand, - cwd: PathBuf, - spawn_opts: Option, -} - -impl TestSpawnCommand { - fn new(command: ProcessCommand, cwd: PathBuf, spawn_opts: Option) -> Self { - Self { - command, - cwd, - spawn_opts, - } - } -} - -impl std::fmt::Display for Target { - fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { - write!( - f, - "{}", - match self { - Target::Core => "Core", - Target::Wrapper => "Wrapper", - Target::Protocol => "Protocol", - Target::Binding => "Binding", - Target::CliDev => "Development-Cli", - Target::CliChipmunk => "Chipmunk-Cli", - Target::Client => "Client", - Target::Shared => "Shared", - Target::App => "App", - Target::Wasm => "Wasm", - Target::Updater => "Updater", - Target::PluginsApi => "PluginsApi", - } - ) - } -} - -impl FromStr for Target { - type Err = anyhow::Error; - - fn from_str(input: &str) -> Result { - type T = Target; - - if cfg!(debug_assertions) { - // This check to remember to add the newly added enums to this function - match T::App { - T::Core => (), - T::Protocol => (), - T::Binding => (), - T::Wrapper => (), - T::Client => (), - T::Shared => (), - T::App => (), - T::CliDev => (), - T::Wasm => (), - T::Updater => (), - T::CliChipmunk => (), - T::PluginsApi => (), - }; - } - - match input { - "Core" => Ok(T::Core), - "Wrapper" => Ok(T::Wrapper), - "Protocol" => Ok(T::Protocol), - "Binding" => Ok(T::Binding), - "Development-Cli" => Ok(T::CliDev), - "Chipmunk-Cli" => Ok(T::CliChipmunk), - "Client" => Ok(T::Client), - "Shared" => Ok(T::Shared), - "App" => Ok(T::App), - "Wasm" => Ok(T::Wasm), - "Updater" => Ok(T::Updater), - "PluginsApi" => Ok(T::PluginsApi), - invalid => bail!("Invalid input for Parsing Target: {invalid}"), - } - } -} - -impl Target { - /// Return all the available targets - pub fn all() -> &'static [Target] { - if cfg!(debug_assertions) { - // This check to remember to add the newly added enums to this function - match Target::App { - Target::Core => (), - Target::Protocol => (), - Target::Binding => (), - Target::Wrapper => (), - Target::Client => (), - Target::Shared => (), - Target::App => (), - Target::CliDev => (), - Target::Wasm => (), - Target::Updater => (), - Target::CliChipmunk => (), - Target::PluginsApi => (), - }; - } - - [ - Target::Binding, - Target::Protocol, - Target::CliDev, - Target::App, - Target::Core, - Target::Wrapper, - Target::Shared, - Target::Client, - Target::Wasm, - Target::Updater, - Target::CliChipmunk, - Target::PluginsApi, - ] - .as_slice() - } - - /// Provides the absolute path to the target - pub fn cwd(self) -> PathBuf { - let root = get_root(); - let relative_path = self.relative_cwd(); - - root.join(relative_path) - } - - /// Provides the relative path to the target starting from chipmunk root directory - pub fn relative_cwd(self) -> PathBuf { - let sub_parts = match self { - Target::Core => ["application", "apps", "indexer"].iter(), - Target::Protocol => ["application", "apps", "protocol"].iter(), - Target::Binding => ["application", "apps", "rustcore", "rs-bindings"].iter(), - Target::Wrapper => ["application", "apps", "rustcore", "ts-bindings"].iter(), - Target::Client => ["application", "client"].iter(), - Target::Shared => ["application", "platform"].iter(), - Target::App => ["application", "holder"].iter(), - Target::CliDev => ["cli", "development-cli"].iter(), - Target::CliChipmunk => ["cli", "chipmunk-cli"].iter(), - Target::Wasm => ["application", "apps", "rustcore", "wasm-bindings"].iter(), - Target::Updater => ["application", "apps", "precompiled", "updater"].iter(), - Target::PluginsApi => ["plugins", "plugins_api"].iter(), - }; - - sub_parts.collect() - } - - /// Provide the kind of the target between Rust or Type-Script - pub fn kind(self) -> TargetKind { - match self { - Target::Protocol - | Target::Binding - | Target::Core - | Target::CliDev - | Target::CliChipmunk - | Target::Wasm - | Target::Updater - | Target::PluginsApi => TargetKind::Rs, - Target::Client | Target::Wrapper | Target::Shared | Target::App => TargetKind::Ts, - } - } - - /// Provides the targets which this target directly depend on - pub fn direct_deps(self) -> Vec { - match self { - Target::Core - | Target::CliDev - // Cargo take care of the dependency between indexer and the CLI tool, - // it's not need to be resolved manually in this tool. - | Target::CliChipmunk - | Target::Shared - | Target::Wasm - | Target::Updater - | Target::PluginsApi => Vec::new(), - Target::Protocol => vec![Target::Core], - Target::Binding => vec![Target::Shared, Target::Core, Target::Protocol], - Target::Wrapper => vec![Target::Binding, Target::Shared, Target::Protocol], - Target::Client => vec![Target::Shared, Target::Wasm, Target::Protocol], - Target::App => vec![Target::Wrapper, Target::Client, Target::Updater], - } - } - - /// Provides all the dependencies of this target and its dependencies recursively. - pub fn flatten_deps(self) -> BTreeSet { - fn flatten_rec(target: Target, involved_targets: &mut BTreeSet) { - if !involved_targets.insert(target) { - return; - } - for involved_target in target.direct_deps() { - flatten_rec(involved_target, involved_targets); - } - } - - let mut resolved_targets = BTreeSet::new(); - for target in self.direct_deps() { - flatten_rec(target, &mut resolved_targets); - } - - resolved_targets - } - - /// Returns if the current target has a job to the given job type - pub fn has_job(self, job_type: JobType) -> bool { - match job_type { - JobType::Lint | JobType::Clean | JobType::Build { .. } => true, - - JobType::Install { .. } => match self { - Target::Binding | Target::Client | Target::Shared | Target::App | Target::Wasm => { - true - } - Target::Core - | Target::Wrapper - | Target::Updater - | Target::CliDev - | Target::CliChipmunk - | Target::Protocol - | Target::PluginsApi => false, - }, - - JobType::AfterBuild { .. } => match self { - Target::Binding | Target::Client | Target::App => true, - Target::Core - | Target::Shared - | Target::Wrapper - | Target::Wasm - | Target::Updater - | Target::CliDev - | Target::CliChipmunk - | Target::Protocol - | Target::PluginsApi => false, - }, - JobType::Test { .. } => match self { - Target::Wrapper - | Target::Core - | Target::CliDev - | Target::Wasm - | Target::CliChipmunk - | Target::PluginsApi => true, - Target::Shared - | Target::Binding - | Target::Client - | Target::Updater - | Target::App - | Target::Protocol => false, - }, - JobType::Run { .. } => false, - } - } - - /// Provide the command that should be used in to build the target - pub fn build_cmd(self, prod: bool) -> anyhow::Result { - let build_cmd = match self { - Target::Binding => binding::get_build_cmd(prod)?, - Target::Wasm => wasm::get_build_cmd(prod), - Target::Protocol => protocol::get_build_cmd(prod), - Target::Updater => updater::get_build_cmd(), - rest_targets => rest_targets.kind().build_cmd(prod), - }; - - Ok(build_cmd) - } - - /// Installs the needed module to perform the development task - /// - /// * `prod`: run install in production - /// * `skip`: skip the task - /// * `overridden_job_type`: override job type to communicate with tracker when install is ran - /// from within another task or when the production flag must be ignored - pub async fn install( - &self, - prod: bool, - skip: bool, - overridden_job_type: Option, - ) -> Option> { - if skip { - return Some( - spawn_skip( - JobDefinition::new(*self, JobType::Install { production: prod }), - format!("Install command for {self}"), - ) - .await, - ); - } - - let job_type = overridden_job_type.unwrap_or(JobType::Install { production: prod }); - - match self { - // We must install ts binding tools before running rs bindings, therefore we call - // wrapper (ts-bindings) install in the rs bindings install. - // Since rs bindings is a dependency for ts bindings, we don't need to call to install - // on ts bindings again. - Target::Binding => { - install_general(Target::Wrapper, prod, job_type, Some(Target::Binding)).await - } - Target::Wrapper => None, - // For app we don't need --production - Target::App => install_general(Target::App, false, job_type, None).await, - rest_targets => install_general(*rest_targets, prod, job_type, None).await, - } - } - - /// Run tests for the giving the target - pub async fn test( - &self, - production: bool, - skip: bool, - ) -> Option> { - match self { - Target::Wrapper => Some(wrapper::run_test(production, skip).await), - rest_targets => rest_targets.run_test_general(production, skip).await, - } - } - - /// Provides the test commands for the given target if available - fn test_cmds(self, production: bool) -> Option> { - match self { - Target::Core | Target::CliDev | Target::CliChipmunk => Some(rust_test_commands( - self.cwd(), - production, - RustFeatureOptions::None, - )), - Target::PluginsApi => Some(rust_test_commands( - self.cwd(), - production, - RustFeatureOptions::All, - )), - Target::Wasm => Some(wasm::get_test_cmds()), - Target::Shared - | Target::Binding - | Target::Wrapper - | Target::Client - | Target::Updater - | Target::Protocol - | Target::App => None, - } - } - - /// run test using the general routine with `test_cmds()` method - async fn run_test_general( - &self, - production: bool, - skip: bool, - ) -> Option> { - let test_cmds = self.test_cmds(production)?; - - debug_assert!(!test_cmds.is_empty()); - - let job_def = JobDefinition::new(*self, JobType::Test { production }); - - // Environment value to set with for snapshot testing using `isnta` crate. - let insta_env = if JobsState::get().accept_snapshots() { - // This value will overwrite all changes on snapshots. - "always" - } else { - // This will show the changes without writing any temporary file (with format - // `*.snap.new`) - "no" - }; - let spawn_results = if skip { - join_all( - test_cmds - .into_iter() - .map(|cmd| spawn_skip(job_def, cmd.command.to_string())), - ) - .await - } else { - join_all(test_cmds.into_iter().map(|cmd| { - spawn( - job_def, - cmd.command, - Some(cmd.cwd), - [(String::from("INSTA_UPDATE"), String::from(insta_env))], - cmd.spawn_opts, - ) - })) - .await - }; - - let mut spawn_results = spawn_results.into_iter(); - - let mut result = match spawn_results.next()? { - Ok(result) => result, - Err(err) => return Some(Err(err)), - }; - - for next_result in spawn_results { - match next_result { - Ok(next_res) => result.append(next_res), - Err(err) => return Some(Err(err)), - } - } - - Some(Ok(result)) - } - - /// Perform Linting Checks on the giving target - pub async fn check(&self) -> Result { - match self.kind() { - TargetKind::Ts => self.ts_lint().await, - TargetKind::Rs => self.clippy().await, - } - } - - /// Perform Linting the Building the giving target since linting Type-Script doesn't check for - /// compiling errors - async fn ts_lint(&self) -> Result { - let path = self.cwd(); - let job_def = JobDefinition::new(*self, JobType::Lint); - - let command = yarn_command(vec![String::from("run"), String::from("lint")]); - spawn(job_def, command, Some(path), iter::empty(), None).await - } - - /// Runs Clippy for the given rust target - async fn clippy(&self) -> Result { - let path = get_root().join(self.cwd()); - - let job_def = JobDefinition::new(*self, JobType::Lint); - - let command = ProcessCommand::new( - DevTool::Cargo.cmd(), - vec![ - String::from("clippy"), - String::from("--color"), - String::from("always"), - String::from("--all"), - String::from("--all-features"), - String::from("--"), - String::from("-D"), - String::from("warnings"), - ], - ); - - spawn(job_def, command, Some(path), iter::empty(), None).await - } - - /// Clean the given target, removing it from the checksum tracker as well. - pub async fn reset(&self) -> anyhow::Result { - let job_def = JobDefinition::new(*self, JobType::Clean); - - let mut paths_to_remove = vec![self.cwd().join("dist")]; - let path = match self.kind() { - TargetKind::Ts => self.cwd().join("node_modules"), - TargetKind::Rs => self.cwd().join("target"), - }; - paths_to_remove.push(path); - - let tracker = get_tracker(); - - match self { - Target::Wasm => { - paths_to_remove.push(self.cwd().join("pkg")); - paths_to_remove.push(self.cwd().join("test_output")); - paths_to_remove.push(self.cwd().join("node_modules")); - } - Target::Protocol => { - paths_to_remove.push(self.cwd().join("pkg")); - } - Target::Wrapper => { - paths_to_remove.push(self.cwd().join("spec").join("build")); - let index_node_path = self.cwd().join("src").join("native").join("index.node"); - if index_node_path.exists() { - tracker.msg( - job_def, - format!("removing file: {}", index_node_path.display()), - ); - fs::remove_file(index_node_path).await?; - } - } - Target::Core - | Target::Shared - | Target::Binding - | Target::Client - | Target::Updater - | Target::App - | Target::CliDev - | Target::CliChipmunk - | Target::PluginsApi => {} - } - - for path in paths_to_remove.into_iter().filter(|p| p.exists()) { - let remove_log = format!("removing directory {}", path.display()); - tracker.msg(job_def, remove_log); - - fstools::rm_folder(job_def, &path)?; - } - - let job = format!("Clean {self}"); - - let logs = tracker.get_logs(job_def).await?.unwrap_or_default(); - - Ok(SpawnResult::create_for_fs(job, logs)) - } - - /// Runs build considering the currently running builds and already finished ones as well. - pub async fn build(&self, prod: bool, skip: bool) -> Result { - let path = get_root().join(self.cwd()); - let cmd = self.build_cmd(prod)?; - - let job_def = JobDefinition::new(*self, JobType::Build { production: prod }); - - if skip { - spawn_skip(job_def, cmd.to_string()).await - } else { - spawn(job_def, cmd, Some(path), iter::empty(), None).await - } - } - - /// Performs any needed copy operation after the build is done - pub async fn after_build( - &self, - prod: bool, - skip: bool, - ) -> Option> { - let job_type = JobType::AfterBuild { production: prod }; - let job_def = JobDefinition::new(*self, job_type); - - if skip { - return Some(spawn_skip(job_def, "Multiple file system commands".into()).await); - } - - // Taken from a discussion on GitHub: - // To build an npm package you would need (in most cases) to be in dev-mode - install dev-dependencies + dependencies, - // therefore we always install in development mode at first. - // But to prepare a package for production, you have to remove dev-dependencies. - // That's not an issue, if npm-package is published in npmjs; but we are coping packages manually in a right destination - // and before copy it, we have to reinstall it to get rid of dev-dependencies. - let reinstall_res = - if JobsState::get().is_release_build() && prod && matches!(self.kind(), TargetKind::Ts) - { - let node_path = self.cwd().join("node_modules"); - let remove_log = format!("removing directory {}", node_path.display()); - - if let Err(err) = fstools::rm_folder(job_def, &node_path) { - return Some(Err(err)); - } - - match self.install(true, false, Some(job_type)).await { - Some(Ok(mut spawn_res)) => { - spawn_res.report.insert(0, remove_log); - - // Return early if the reinstall command fails - if !spawn_res.status.success() { - return Some(Ok(spawn_res)); - } - - Some(spawn_res) - } - Some(Err(err)) => return Some(Err(err)), - None => None, - } - } else { - None - }; - - let after_res = match self { - Target::Binding => binding::copy_index_node(job_def).await, - Target::Client => client::copy_client_to_app(job_def).await, - Target::App => app::copy_package_file_to_dist(job_def).await, - Target::Core - | Target::Shared - | Target::Wrapper - | Target::Wasm - | Target::Updater - | Target::Protocol - | Target::CliDev - | Target::CliChipmunk - | Target::PluginsApi => return None, - }; - - match (after_res, reinstall_res) { - (res, None) => Some(res), - (Err(err), _) => Some(Err(err)), - (Ok(after_res), Some(mut install_res)) => { - install_res.append(after_res); - Some(Ok(install_res)) - } - } - } -} - -/// run install using the general routine for the given target -/// * `target`: job target to perform its after build jobs -/// * `prod`: build for production -/// * `job_type`: job type to communicate with `tracker` -/// * `overridden_target`: override target to communicate with `tracker` when install is called -/// from within another task. -async fn install_general( - target: Target, - prod: bool, - job_type: JobType, - overridden_target: Option, -) -> Option> { - let cmd = match target { - // Wasm needs `yarn install` command despite having the kind `TargetKind::Rs` - Target::Wasm => TargetKind::Ts.install_cmd(prod), - t => t.kind().install_cmd(prod), - }; - - let job_def = JobDefinition::new(overridden_target.unwrap_or(target), job_type); - - if let Some(cmd) = cmd { - let res = spawn(job_def, cmd, Some(target.cwd()), iter::empty(), None).await; - Some(res) - } else { - None - } -} - -/// Provides a process command with yarn as [`ProcessCommand::cmd`] and the given arguments -/// as [`ProcessCommand::args`] -fn yarn_command(args: Vec) -> ProcessCommand { - ProcessCommand::new(DevTool::Yarn.cmd(), args) -} - -/// Feature options for rust commands -enum RustFeatureOptions { - /// Include all features - All, - /// Don't include any options for rust features. - None, -} - -/// Provides the general commands to run tests on rust targets. -fn rust_test_commands( - path: PathBuf, - production: bool, - feature_opts: RustFeatureOptions, -) -> Vec { - let mut args = vec![String::from("+stable"), String::from("test")]; - if production { - args.push("-r".into()); - } - match feature_opts { - RustFeatureOptions::All => args.push("--all-features".into()), - RustFeatureOptions::None => {} - } - args.push("--color".into()); - args.push("always".into()); - - let cmd = ProcessCommand::new(DevTool::Cargo.cmd(), args); - - vec![TestSpawnCommand::new(cmd, path, None)] -} diff --git a/cli/development-cli/src/target/protocol.rs b/cli/development-cli/src/target/protocol.rs deleted file mode 100644 index bc59bd05d6..0000000000 --- a/cli/development-cli/src/target/protocol.rs +++ /dev/null @@ -1,19 +0,0 @@ -use crate::dev_tools::DevTool; - -use super::ProcessCommand; - -pub fn get_build_cmd(prod: bool) -> ProcessCommand { - let env = if prod { "--release" } else { "--dev" }; - - ProcessCommand::new( - DevTool::WasmPack.cmd(), - vec![ - String::from("build"), - String::from(env), - String::from("--target"), - String::from("nodejs"), - String::from("--color"), - String::from("always"), - ], - ) -} diff --git a/cli/development-cli/src/target/target_kind.rs b/cli/development-cli/src/target/target_kind.rs deleted file mode 100644 index 7f66bc1084..0000000000 --- a/cli/development-cli/src/target/target_kind.rs +++ /dev/null @@ -1,64 +0,0 @@ -//! Provides the types and methods to define the target kind (Rust or Type Script). - -use crate::dev_tools::DevTool; - -use super::{ProcessCommand, yarn_command}; - -#[derive(Debug, Clone, Copy, PartialEq, Eq)] -pub enum TargetKind { - /// TypeScript - Ts, - /// Rust - Rs, -} - -impl TargetKind { - /// Provide the general build command for each target type - pub fn build_cmd(&self, prod: bool) -> ProcessCommand { - match self { - TargetKind::Ts => { - let mut args = vec![String::from("run")]; - if prod { - args.push("prod".into()); - } else { - args.push("build".into()); - } - - yarn_command(args) - } - TargetKind::Rs => { - let mut args = vec![ - String::from("build"), - String::from("--color"), - String::from("always"), - ]; - if prod { - args.push("--release".into()); - } - - ProcessCommand::new(DevTool::Cargo.cmd(), args) - } - } - } - /// Provide the general install command for each target type - pub fn install_cmd(&self, prod: bool) -> Option { - match self { - TargetKind::Ts => { - let args = if prod { - vec![ - String::from("workspaces"), - String::from("focus"), - String::from("--production"), - ] - } else { - vec![String::from("install")] - }; - - let command = yarn_command(args); - - Some(command) - } - TargetKind::Rs => None, - } - } -} diff --git a/cli/development-cli/src/target/updater.rs b/cli/development-cli/src/target/updater.rs deleted file mode 100644 index 98e08f85ce..0000000000 --- a/cli/development-cli/src/target/updater.rs +++ /dev/null @@ -1,16 +0,0 @@ -use crate::dev_tools::DevTool; - -use super::ProcessCommand; - -pub fn get_build_cmd() -> ProcessCommand { - ProcessCommand::new( - DevTool::Cargo.cmd(), - vec![ - String::from("+stable"), - String::from("build"), - String::from("--color"), - String::from("always"), - String::from("--release"), - ], - ) -} diff --git a/cli/development-cli/src/target/wasm.rs b/cli/development-cli/src/target/wasm.rs deleted file mode 100644 index 19a5f4ecc6..0000000000 --- a/cli/development-cli/src/target/wasm.rs +++ /dev/null @@ -1,52 +0,0 @@ -use crate::{dev_tools::DevTool, spawner::SpawnOptions, target::Target}; - -use super::{ProcessCommand, TestSpawnCommand}; - -pub fn get_build_cmd(prod: bool) -> ProcessCommand { - let env = if prod { "--release" } else { "--dev" }; - - ProcessCommand::new( - DevTool::WasmPack.cmd(), - vec![ - String::from("build"), - String::from(env), - String::from("--target"), - String::from("bundler"), - String::from("--color"), - String::from("always"), - ], - ) -} - -pub fn get_test_cmds() -> Vec { - let cwd = Target::Wasm.cwd(); - - let npm_test_command = if cfg!(windows) { "test_win" } else { "test" }; - - vec![ - TestSpawnCommand::new( - ProcessCommand::new( - DevTool::WasmPack.cmd(), - vec![ - String::from("test"), - String::from("--node"), - String::from("--color"), - String::from("always"), - ], - ), - cwd.clone(), - None, - ), - TestSpawnCommand::new( - ProcessCommand::new( - DevTool::Npm.cmd(), - vec![String::from("run"), String::from(npm_test_command)], - ), - cwd.join("spec"), - Some(SpawnOptions { - // The output of this command causes a weird behavior on the progress bars. - suppress_ui: true, - }), - ), - ] -} diff --git a/cli/development-cli/src/target/wrapper.rs b/cli/development-cli/src/target/wrapper.rs deleted file mode 100644 index 93e7f7c81e..0000000000 --- a/cli/development-cli/src/target/wrapper.rs +++ /dev/null @@ -1,127 +0,0 @@ -use std::{fs, iter, path::PathBuf}; - -use anyhow::Context; -use futures::future::join_all; - -use crate::{ - JobsState, fstools, - job_type::JobType, - jobs_runner::JobDefinition, - spawner::{SpawnResult, spawn, spawn_skip}, -}; - -use super::{ProcessCommand, Target}; - -// Naming convention for test files is `session.**.spec.[j-t]s`. -const TEST_FILES_PREFIX: &str = "session."; -const TEST_FILES_SUFFIXES: &[&str] = &[".spec.js", ".spec.ts"]; - -pub async fn run_test(production: bool, skip: bool) -> Result { - let job_def = JobDefinition::new(Target::Wrapper, JobType::Test { production }); - - if skip { - return spawn_skip(job_def, "Various test wrapper commands".into()).await; - } - - let cwd = Target::Wrapper.cwd(); - - let build_spec_path = cwd.join("spec"); - - let tests_build_dir = build_spec_path.join("build"); - if tests_build_dir.exists() { - fstools::rm_folder(job_def, &tests_build_dir)?; - } - - // Finding tsc path on different platforms - let test_runner_path = cwd.join("node_modules").join(".bin").join("tsc"); - - let build_spec_cmd = ProcessCommand::new( - test_runner_path.to_string_lossy().to_string(), - vec![String::from("-p"), String::from("tsconfig.json")], - ); - - let spec_res = spawn( - job_def, - build_spec_cmd, - Some(build_spec_path), - iter::empty(), - None, - ) - .await?; - - let mut final_result = spec_res; - - let electron_path: PathBuf = cwd.join("node_modules").join(".bin").join("electron"); - - let electron_path = electron_path.to_string_lossy(); - - let jasmine_path: PathBuf = [".", "node_modules", "jasmine", "bin", "jasmine.js"] - .iter() - .collect(); - let jasmine_path = jasmine_path.to_string_lossy(); - - let jobs_state = JobsState::get(); - - let custom_specs = jobs_state.custom_specs(); - - // The users have option here to provide the path of their specifications to run tests on. - // Otherwise All test files from spec directory with names matching the naming convention - // will be picked. - let involved_specs = if custom_specs.is_empty() { - let specs_path = cwd.join("spec").join("build").join("spec"); - - // Read all files in the specs directory and pick the matching test files. - let standard_specs: Vec<_> = fs::read_dir(&specs_path) - .with_context(|| { - format!( - "Failed to retrieve test spec files from directory: {}", - specs_path.display() - ) - })? - .filter_map(|e| e.ok()) - .filter(|e| e.file_type().is_ok_and(|t| t.is_file())) - .filter(|e| { - let file_name = e.file_name(); - let file_name = file_name.to_string_lossy(); - file_name.starts_with(TEST_FILES_PREFIX) - && TEST_FILES_SUFFIXES.iter().any(|s| file_name.ends_with(s)) - }) - .filter_map(|e| { - e.path() - .strip_prefix(&cwd) // Test command takes the relative path of test files - .map(|p| p.to_string_lossy().to_string()) - .ok() - }) - .collect(); - - standard_specs - } else { - custom_specs.to_vec() - }; - - let jobs = involved_specs.into_iter().map(|spec_file_path| { - let electron_cmd = electron_path.to_string(); - let jasmine_arg = jasmine_path.to_string(); - let cwd_path = cwd.clone(); - - let command = ProcessCommand::new(electron_cmd, vec![jasmine_arg, spec_file_path]); - - spawn( - job_def, - command, - Some(cwd_path), - vec![(String::from("ELECTRON_RUN_AS_NODE"), String::from("1"))], - None, - ) - }); - - let spawn_results = join_all(jobs).await; - - for result in spawn_results { - let spawn_res = result?; - - final_result.append(spawn_res); - } - - Ok(final_result) -} diff --git a/cli/development-cli/src/tracker.rs b/cli/development-cli/src/tracker.rs deleted file mode 100644 index 20392dfed3..0000000000 --- a/cli/development-cli/src/tracker.rs +++ /dev/null @@ -1,642 +0,0 @@ -//! Keeps track on the running jobs and their states and outputs. It support showing the results on -//! console using TUI progress bars and caching commands output to be used later when commands' -//! logs are needed. - -use anyhow::{Context, Error}; -use console::style; -use indicatif::{MultiProgress, ProgressBar, ProgressStyle}; -use std::{collections::BTreeMap, sync::OnceLock, time::Instant}; -use tokio::sync::{ - mpsc::{UnboundedReceiver, UnboundedSender, unbounded_channel}, - oneshot, -}; - -use crate::{cli_args::UiMode, jobs_runner::JobDefinition, user_config::UserConfiguration}; - -const TIME_BAR_WIDTH: usize = 5; - -static TRACKER: OnceLock = OnceLock::new(); - -#[derive(Debug, Clone, Copy)] -pub enum OperationResult { - Success, - Failed, - Skipped, -} - -impl std::fmt::Display for OperationResult { - fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { - write!( - f, - "{}", - match self { - OperationResult::Success => style("done").bold().green(), - OperationResult::Failed => style("fail").bold().red(), - OperationResult::Skipped => style("skip").bold().cyan(), - } - ) - } -} - -#[derive(Debug)] -/// Represents tasks information that can be sent to and from the tracker -enum UiTick { - /// Change job status from awaiting to started. - Started(JobDefinition, oneshot::Sender<()>), - /// Start a job giving the job name and the sender to return the job number. - StartAll(Vec, oneshot::Sender<()>), - /// Update the job providing an optional progress value. - Progress(JobDefinition, Option), - /// Send a message to the job - Message(JobDefinition, String), - /// Sets the job as finished providing the job result and a message - Finished(JobDefinition, OperationResult, String), - /// Prints the given text outside the progress bar - Print(String), - /// Close all the jobs and shutdown the progress bars, with the option to display - /// the total processing time. - Shutdown { - total_time: bool, - tx_response: oneshot::Sender<()>, - }, -} - -#[derive(Debug)] -/// Represents Log messages that can be sent to be saved in the log cache then retrieved one needed -enum LogTick { - RegisterAll(Vec, oneshot::Sender<()>), - /// Sends the given log to be saved with the associated job definition. - SendSingleLog(JobDefinition, String), - /// Retrieves all the logs for the giving job, clearing them from the cache. - GetLogs(JobDefinition, oneshot::Sender>), - /// Shutdowns the logs cache channel. - Shutdown, -} - -#[derive(Debug, Clone, Copy)] -/// Represents the standard output target. -enum OutputTarget { - Stdout, - Stderr, -} - -#[derive(Clone, Debug)] -pub struct Tracker { - ui_tx: UnboundedSender, - log_tx: UnboundedSender, - ui_mode: UiMode, -} - -enum JobBarPhase { - Pending, - Running(Instant), - Finished((OperationResult, u64)), -} - -struct JobBarState { - name: String, - bar: ProgressBar, - phase: JobBarPhase, -} - -impl JobBarState { - fn new(name: String, bar: ProgressBar) -> Self { - Self { - name, - bar, - phase: JobBarPhase::Pending, - } - } - - fn start(&mut self) { - assert!( - matches!(self.phase, JobBarPhase::Pending), - "Start can be called on pending jobs only" - ); - - let start_time = Instant::now(); - self.phase = JobBarPhase::Running(start_time); - } -} - -/// Initialize progress tracker with the given configurations. -/// -/// * `ui_mode`: Optionally override the UI mode from user configurations, when not provided -/// then the value from [`UserConfiguration`] will be used. -/// -/// # Panics -/// -/// This functions panics if it is initialized more than once. -pub fn init_tracker(ui_mode: Option) { - let ui_mode = ui_mode.unwrap_or_else(|| UserConfiguration::get().ui_mode); - - TRACKER - .set(Tracker::new(ui_mode)) - .expect("Progress Tracker can't be initialized more than once"); -} - -/// Gets a reference to the initialized progress tracker -/// -/// # Panics -/// -/// This function panics if the tracker isn't initialized yet. -pub fn get_tracker() -> &'static Tracker { - TRACKER - .get() - .expect("Tracker must be initialized before it's called") -} - -impl Tracker { - fn new(ui_mode: UiMode) -> Self { - // Logs - let (log_tx, log_rx) = unbounded_channel(); - - // UI - let (ui_tx, ui_rx) = unbounded_channel(); - - let tracker = Self { - ui_tx, - log_tx, - ui_mode, - }; - - if tracker.cache_logs() { - tokio::spawn(Tracker::run_logs_cache(log_rx)); - } - - if tracker.show_bars() { - tokio::spawn(Tracker::run_ui(ui_rx)); - } - - tracker - } - - /// Return the current mode for UI and logs. - #[inline] - pub fn ui_mode(&self) -> UiMode { - self.ui_mode - } - - /// Indicates if progress bars should be shown according the given UI option. - #[inline] - pub fn show_bars(&self) -> bool { - match self.ui_mode { - UiMode::ProgressBars | UiMode::BarsWithReport => true, - UiMode::PrintOnJobFinish | UiMode::PrintImmediately => false, - } - } - - /// Indicates if the logs should be printed immediately - #[inline] - pub fn print_immediately(&self) -> bool { - match self.ui_mode() { - UiMode::ProgressBars | UiMode::BarsWithReport | UiMode::PrintOnJobFinish => false, - UiMode::PrintImmediately => true, - } - } - - /// Indicates if logs should be cached according the given UI option. - #[inline] - fn cache_logs(&self) -> bool { - !self.print_immediately() - } - - async fn run_logs_cache(mut rx: UnboundedReceiver) { - let mut logs_map: BTreeMap> = BTreeMap::new(); - - while let Some(tick) = rx.recv().await { - match tick { - LogTick::RegisterAll(jobs, tx_response) => { - debug_assert!( - logs_map.is_empty(), - "Jobs must be registered in logs once only" - ); - logs_map.extend(jobs.into_iter().map(|job| (job, Vec::new()))); - - if tx_response.send(()).is_err() { - eprintln!("Fail to send response after registering the jobs for logs"); - } - } - LogTick::SendSingleLog(job, log) => { - let log_records = logs_map - .get_mut(&job) - .expect("Job must be registered in logs map"); - log_records.push(log); - } - LogTick::GetLogs(job, tx) => { - let log_records = logs_map - .get_mut(&job) - .expect("Job must be registered in logs map"); - - let logs = std::mem::take(log_records); - - if tx.send(logs).is_err() { - eprintln!("Fail to send response with the cached logs"); - } - } - LogTick::Shutdown => { - return; - } - } - } - } - - async fn run_ui(mut rx: UnboundedReceiver) { - let spinner_style = ProgressStyle::with_template("{spinner} {prefix:.bold.dim} {wide_msg}") - .expect("Progress template must be valid") - .tick_chars("▂▃▅▆▇▆▅▃▂ "); - let mut max_time_len = 0; - let max = u64::MAX; - let mut bars: BTreeMap = BTreeMap::new(); - let mp = MultiProgress::new(); - - let start_time = Instant::now(); - while let Some(tick) = rx.recv().await { - match tick { - UiTick::Started(job_def, tx_response) => { - let Some(job) = bars.get_mut(&job_def) else { - unreachable!( - "Job must exist in progress bar before starting it. Job Info: {job_def:?}" - ) - }; - if matches!(job.phase, JobBarPhase::Pending) { - job.start(); - Self::refresh_all_bars(&mut bars, max_time_len, None); - } - - if tx_response.send(()).is_err() { - let _ = mp.println("Fail to send response while starting the jobs"); - } - } - UiTick::StartAll(jobs, tx_response) => { - for job in jobs.into_iter() { - let bar = mp.add(ProgressBar::new(max)); - bar.set_style(spinner_style.clone()); - let bar_text = format!( - "{}: {}", - job.target.relative_cwd().display(), - job.job_title() - ); - let job_bar = JobBarState::new(bar_text, bar); - bars.insert(job, job_bar); - } - - Self::refresh_all_bars(&mut bars, max_time_len, None); - if tx_response.send(()).is_err() { - let _ = mp.println("Fail to send response while starting the jobs"); - } - } - UiTick::Message(job_def, log) => { - if !log.trim().is_empty() { - match bars.get(&job_def) { - Some(job_bar) => job_bar.bar.set_message(log), - None => unreachable!( - "Job must exist in progress bar before messaging it. Job Info: {job_def:?}" - ), - } - } - } - UiTick::Progress(job_def, pos) => { - let Some(job_bar) = bars.get(&job_def) else { - unreachable!( - "Job must exist in progress bar before changing it progress. Job Info: {job_def:?}" - ) - }; - - if let Some(pos) = pos { - job_bar.bar.set_position(pos); - } else { - job_bar.bar.inc(1); - } - } - UiTick::Finished(job_def, result, msg) => { - let Some(job_bar) = bars.get_mut(&job_def) else { - unreachable!( - "Job must exist in progress bar before finishing it. Job Info: {job_def:?}" - ) - }; - - // It doesn't make sense to show that a job is done in 0 seconds - let time = match job_bar.phase { - JobBarPhase::Running(start_time) => start_time.elapsed().as_secs().max(1), - _ => unreachable!("Job must be running when finish is called"), - }; - - max_time_len = max_time_len.max(Self::count_digits(time)); - - job_bar.bar.finish_with_message(msg); - job_bar.phase = JobBarPhase::Finished((result, time)); - - Self::refresh_all_bars(&mut bars, max_time_len, None); - } - UiTick::Print(msg) => { - let _ = mp.println(msg); - } - UiTick::Shutdown { - total_time, - tx_response, - } => { - // Finish jobs that are still running - for (_job_def, job_bar) in bars.iter_mut() { - let time = match job_bar.phase { - JobBarPhase::Pending => 1, - JobBarPhase::Running(start_time) => { - start_time.elapsed().as_secs().max(1) - } - JobBarPhase::Finished(_) => continue, - }; - - job_bar.phase = JobBarPhase::Finished((OperationResult::Skipped, time)); - max_time_len = max_time_len.max(Self::count_digits(time)); - - job_bar.bar.finish(); - } - - if total_time { - // Insert graphic bar for the running duration of each bars - let total_time = start_time.elapsed().as_secs().max(1) as usize; - Self::refresh_all_bars(&mut bars, max_time_len, Some(total_time)); - - // Insert total time bar - let total_bar = mp.add(ProgressBar::new((bars.len() + 1) as u64)); - total_bar.set_style(spinner_style.clone()); - total_bar.set_prefix(format!("[total] done all in {total_time}s.")); - total_bar.finish(); - } - - bars.clear(); - - if tx_response.send(()).is_err() { - let _ = mp.println("Fail to send response"); - } - - return; - } - } - } - } - - fn refresh_all_bars( - bars: &mut BTreeMap, - max_time_len: usize, - total_time: Option, - ) { - let jobs_count_txt = bars.len().to_string(); - - bars.iter_mut().enumerate().for_each(|(idx, (_job_def ,job_bar))| { - let job_number = idx + 1; - let seq_width = jobs_count_txt.len(); - let job = job_bar.name.as_str(); - let line_prefix = match &job_bar.phase { - JobBarPhase::Pending => format!("[{job_number:seq_width$}/{jobs_count_txt}][{}][{job}]", style("wait").bold().yellow()), - JobBarPhase::Running(_) => format!("[{job_number:seq_width$}/{jobs_count_txt}][....][{job}]"), - JobBarPhase::Finished((res, time)) => { - if let Some(total_time) = total_time { - let finish_limit = (*time as usize * TIME_BAR_WIDTH) / total_time; - let time_bar: String = (0..TIME_BAR_WIDTH).map(|idx| if idx <= finish_limit {'█'}else {'░'}).collect(); - format!("[{job_number:seq_width$}/{jobs_count_txt}][{res}][{time_bar} {time:max_time_len$}s][{job}].") - }else { - format!("[{job_number:seq_width$}/{jobs_count_txt}][{res}][{time:max_time_len$}s][{job}].") - } - }, - }; - - job_bar.bar.set_prefix(line_prefix); - }); - } - - /// Counts the digits in a number without allocating new string - fn count_digits(mut num: u64) -> usize { - if num == 0 { - return 1; // Special case for zero - } - - let mut count = 0; - while num > 0 { - num /= 10; - count += 1; - } - count - } - - /// Registers all the given jobs for Logs and UI if available, setting their status - /// to awaiting. This function must be called once on the start of running the tasks - pub async fn register_all(&self, jobs: Vec) -> Result<(), Error> { - if self.cache_logs() { - let (log_tx, log_rx) = oneshot::channel(); - self.log_tx - .send(LogTick::RegisterAll(jobs.clone(), log_tx)) - .context("Fail to send log Tick")?; - log_rx - .await - .context("Fail to receive log tick for register all jobs")?; - } - - if self.show_bars() { - let (ui_tx, ui_rx) = oneshot::channel(); - self.ui_tx - .send(UiTick::StartAll(jobs, ui_tx)) - .context("Fail to send tick")?; - - ui_rx - .await - .context("Fail to receive ui tick for register all jobs")?; - } - - Ok(()) - } - - /// Change job status on UI from awaiting to started. - pub async fn start(&self, job_def: JobDefinition) -> Result<(), Error> { - if !self.show_bars() { - let msg = format!("Job '{}' started...", job_def.job_title()); - println!("{}", style(msg).blue().bright()); - return Ok(()); - } - - let (tx_response, rx_response) = oneshot::channel(); - self.ui_tx - .send(UiTick::Started(job_def, tx_response)) - .context("Fail to send tick")?; - rx_response - .await - .context("Fail to receive tick Start Single") - } - - /// Update the job on UI providing an optional progress value. - pub fn progress(&self, job_def: JobDefinition, pos: Option) { - if !self.show_bars() { - return; - } - - self.send_ui_tick(UiTick::Progress(job_def, pos)); - } - - /// Send a message of the job to be shown on UI and saved in logs cache. - pub fn msg(&self, job_def: JobDefinition, log: String) { - self.msg_intern(job_def, log, OutputTarget::Stdout) - } - - /// Send a error message of the job to be shown on UI and saved in logs cache. - pub fn msg_err(&self, job_def: JobDefinition, log: String) { - self.msg_intern(job_def, log, OutputTarget::Stderr) - } - - /// Internal implementation for sending messages (standard and error) - fn msg_intern(&self, job_def: JobDefinition, log: String, target: OutputTarget) { - let log = log.trim_end(); - if self.print_immediately() { - let msg = format!("Job '{}': {}", job_def.job_title(), log); - match target { - OutputTarget::Stdout => println!("{msg}"), - OutputTarget::Stderr => eprintln!("{msg}"), - }; - - return; - } - - if self.cache_logs() { - self.send_log_tick(LogTick::SendSingleLog(job_def, log.to_owned())); - } - - if self.show_bars() { - self.send_ui_tick(UiTick::Message(job_def, log.to_owned())); - } - } - - /// Send a message of the job to be be saved within logs cache without showing it in UI. - pub fn log(&self, job_def: JobDefinition, log: String) { - self.log_intern(job_def, log, OutputTarget::Stdout) - } - - /// Send a error message of the job to be be saved within logs cache without showing it in UI. - pub fn log_err(&self, job_def: JobDefinition, log: String) { - self.log_intern(job_def, log, OutputTarget::Stderr) - } - - /// Internal implementation for sending log messages (standard and error) - fn log_intern(&self, job_def: JobDefinition, log: String, target: OutputTarget) { - let log = log.trim_end(); - if self.print_immediately() { - let msg = format!("Job '{}': {}", job_def.job_title(), log); - match target { - OutputTarget::Stdout => println!("{msg}"), - OutputTarget::Stderr => eprintln!("{msg}"), - } - return; - } - - if self.cache_logs() { - self.send_log_tick(LogTick::SendSingleLog(job_def, log.to_owned())); - } - } - - /// Sets the job on UI as finished providing successful result and a message. - pub fn success(&self, job_def: JobDefinition, msg: String) { - if self.show_bars() { - self.send_ui_tick(UiTick::Finished(job_def, OperationResult::Success, msg)); - } else if self.print_immediately() { - let success_txt = format!("Job '{}' succeeded", job_def.job_title()); - println!("{}", style(success_txt).green().bold()); - } - } - - /// Sets the job on UI as finished providing skipped result and a message. - pub fn skipped(&self, job_def: JobDefinition, msg: String) { - if self.show_bars() { - self.send_ui_tick(UiTick::Finished(job_def, OperationResult::Skipped, msg)); - } else if self.print_immediately() { - let success_txt = format!("Job '{}' Skipped", job_def.job_title()); - println!("{}", style(success_txt).cyan().bold()); - } - } - - /// Sets the job on UI as finished providing failed result and a message - pub fn fail(&self, job_def: JobDefinition, msg: String) { - if self.show_bars() { - self.send_ui_tick(UiTick::Finished(job_def, OperationResult::Failed, msg)); - } else if self.print_immediately() { - let fail_txt = format!("Job '{}' failed", job_def.job_title()); - println!("{}", style(fail_txt).red().bold()); - } - } - - /// Close all the jobs and shutdown the progress bars, with the option to display - /// the total processing time. - pub async fn shutdown(&self, total_time: bool) -> Result<(), Error> { - if self.cache_logs() { - self.log_tx - .send(LogTick::Shutdown) - .context("Failed to send tick to logs")?; - } - - if self.show_bars() { - let (tx_response, rx_response) = oneshot::channel(); - self.ui_tx - .send(UiTick::Shutdown { - total_time, - tx_response, - }) - .context("Fail to send tick")?; - - rx_response.await.context("Fail to receive tick from UI")?; - } - - Ok(()) - } - - /// Prints the given text on UI outside the progress bar. - /// This message won't be included in any logs cache. - pub fn print(&self, msg: impl Into) { - let msg = msg.into(); - if self.show_bars() { - self.send_ui_tick(UiTick::Print(msg)); - } else { - println!("{msg}",); - } - } - - /// Retrieves all the logs for the giving job, clearing them from the cache. - /// This will return None if the UI mode doesn't support saving the logs for caches. - /// - /// # Panics - /// - /// This function panics if the jobs wasn't registered - pub async fn get_logs(&self, job_def: JobDefinition) -> anyhow::Result>> { - if self.print_immediately() { - return Ok(None); - } - - let (tx, rx) = oneshot::channel(); - - self.log_tx - .send(LogTick::GetLogs(job_def, tx)) - .with_context(|| { - format!( - "Fail to send log Tick while getting logs for job: {}", - job_def.job_title() - ) - })?; - - let logs = rx.await.with_context(|| { - format!( - "Fail to receive get logs tick results while getting logs for job: {}", - job_def.job_title() - ) - })?; - - Ok(Some(logs)) - } - - fn send_log_tick(&self, tick: LogTick) { - if let Err(err) = self.log_tx.send(tick) { - eprintln!("Fail to communicate with tracker: {err}"); - } - } - - fn send_ui_tick(&self, tick: UiTick) { - if let Err(err) = self.ui_tx.send(tick) { - eprintln!("Fail to communicate with tracker: {err}"); - } - } -} diff --git a/cli/development-cli/src/user_config.rs b/cli/development-cli/src/user_config.rs deleted file mode 100644 index 44cbc4afc5..0000000000 --- a/cli/development-cli/src/user_config.rs +++ /dev/null @@ -1,176 +0,0 @@ -//! Manages loading and providing the user configurations of the Build CLI Tool like the used -//! [`UserShell`] and the preferred [`UiMode`] - -use std::{fs::read_to_string, path::PathBuf, sync::OnceLock}; - -use anyhow::{Context, ensure}; -use console::style; -use serde::{Deserialize, Serialize}; - -use crate::{ - cli_args::UiMode, jobs_runner::additional_features::AdditionalFeatures, - location::build_cli_home_dir, shell::UserShell, -}; - -static USER_CONFIGURATION: OnceLock = OnceLock::new(); - -#[derive(Debug, Clone, Default, Serialize, Deserialize)] -/// Represents the configuration of this tool on the user level, providing settings like -/// [`UserShell`], [`UiMode`] and [`AdditionalFeatures`] besides methods to load this -/// configurations from a file. -pub struct UserConfiguration { - #[serde(default)] - pub shell: UserShell, - #[serde(default)] - pub ui_mode: UiMode, - /// Skip environment checks before running development commands. - #[serde(default)] - pub skip_env_checks: bool, - #[serde(default)] - pub additional_features: Vec, -} - -impl UserConfiguration { - /// Loads and initializes the user configurations reading from the configuration file when - /// exists, otherwise loading the default configurations. - /// - /// # Panics - /// This method can't be called more than once. - pub fn init() -> anyhow::Result<()> { - assert!(USER_CONFIGURATION.get().is_none()); - - let config = Self::load().context("Error while loading user configuration")?; - - config - .validate() - .context("Validation of user configuration failed")?; - - USER_CONFIGURATION - .set(config) - .expect("User configuration can't be load more than once"); - - Ok(()) - } - - /// Provides a reference to the loaded configuration on the user levels. - /// - /// # Panics - /// This function panics if called before running [`UserConfiguration::init()`]. - pub fn get() -> &'static UserConfiguration { - USER_CONFIGURATION - .get() - .expect("Developer Error: User configuration getter called before initialization") - } - - /// Provides the path for the configuration file. - pub fn file_path() -> anyhow::Result { - let build_cli_dir = - build_cli_home_dir().context("Error while resolving build cli home directory")?; - - const USER_CONFIG_FILE_NAME: &str = "config.toml"; - - let config_path = build_cli_dir.join(USER_CONFIG_FILE_NAME); - - Ok(config_path) - } - - /// Serializes the default configurations to `toml` pretty format. - fn default_serialized() -> anyhow::Result { - let config = Self::default(); - let config_print = toml::to_string_pretty(&config) - .context("Error while serializing user configurations to toml format")?; - - Ok(config_print) - } - - /// Prints the default configurations in to `stdout` in `toml` format, to be used as a - /// reference in creating configuration files - pub fn print_default() -> anyhow::Result<()> { - let config_print = Self::default_serialized()?; - - println!("{config_print}"); - - Ok(()) - } - - /// Writes the default configurations to the configuration file if it doesn't exit, creating - /// all the directories to the file path if needed. - /// - /// # Errors - /// This function errors if the file already exists, besides other IO and serialization errors. - pub fn write_default_to_file() -> anyhow::Result<()> { - let file_path = - Self::file_path().context("Error while resolving user configuration file")?; - - ensure!( - !file_path.exists(), - "Abort because configuration file already exists. Path: {}", - file_path.display() - ); - - let config_serialized = Self::default_serialized()?; - - // Create directories if needed. - let parent_dir = file_path - .parent() - .expect("User config path always has parent directory"); - if !parent_dir.exists() { - std::fs::create_dir_all(parent_dir).with_context(|| { - format!("Error while creating directory: {}", parent_dir.display()) - })?; - } - - std::fs::write(&file_path, config_serialized.as_bytes()).with_context(|| { - format!( - "Error while writing user configuration for file. Path: {}", - file_path.display() - ) - })?; - - println!( - "{}", - style("Default user configuration written to file successfully").green() - ); - println!("Config file path: {}", file_path.display()); - - Ok(()) - } - - /// Loads the configuration from the config file if exists, otherwise it'll provide the default - /// user configurations - fn load() -> anyhow::Result { - let config_file = Self::file_path()?; - if !config_file.exists() { - return Ok(UserConfiguration::default()); - } - - let config_content = read_to_string(&config_file).with_context(|| { - format!( - "Error while reading user config file content. Path: {}", - config_file.display() - ) - })?; - - let config = toml::from_str(&config_content).with_context(|| { - format!( - "Error while parsing user configuration file. Path: {}", - config_file.display() - ) - })?; - - Ok(config) - } - - fn validate(&self) -> anyhow::Result<()> { - ensure!( - self.shell.exist(), - "Configured shell doesn't exist on the system. Shell: {}, Shell binary name: {}\n\ - Please check your configuration file in: {}", - self.shell, - self.shell.bin(), - Self::file_path().unwrap_or_default().display() - ); - - Ok(()) - } -} diff --git a/cli/development-cli/src/version.rs b/cli/development-cli/src/version.rs deleted file mode 100644 index 2deed417d5..0000000000 --- a/cli/development-cli/src/version.rs +++ /dev/null @@ -1,268 +0,0 @@ -//! Manages Comparing the current version of the binary to the version of this CLI tool from the -//! current local repository of the user, printing a message to the user on newer editions. - -use std::{cmp::Ordering, fmt::Display, str::FromStr, sync::LazyLock}; - -use anyhow::{Context, ensure}; -use console::style; -use regex::Regex; -use serde::Deserialize; -use toml::{Table, Value}; - -use crate::target::Target; - -#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Deserialize)] -/// Represents a semantic Version with major, minor, patch parts -pub struct Version { - pub major: usize, - pub minor: usize, - pub patch: usize, -} - -impl Version { - /// Creates a new instance with the provided arguments. - pub fn new(major: usize, minor: usize, patch: usize) -> Self { - Self { - major, - minor, - patch, - } - } - - /// Tries to extract the semantic version from text using regex. - /// - /// # Examples - /// - /// ```rust - /// let version = Version::regex_extract("Some text v11.2.111:ignored_infos").unwrap(); - /// assert_eq!(version, Version(11, 2, 111)); - /// ``` - pub fn regex_extract(text: &str) -> anyhow::Result { - static RE: LazyLock = LazyLock::new(|| { - Regex::new(r"(?P0|[1-9]\d*)\.(?P0|[1-9]\d*)\.(?P0|[1-9]\d*)") - .expect("Regex with const expression must be always valid") - }); - - let caps = RE - .captures(text) - .context("No text version found in provided text")?; - - let major = caps.name("major").context("Major version not found")?; - let minor = caps.name("minor").context("Minor version not found")?; - let patch = caps.name("patch").context("Patch version not found")?; - - let major = major - .as_str() - .parse() - .context("Parsing major version failed")?; - let minor = minor - .as_str() - .parse() - .context("Parsing minor version failed")?; - let patch = patch - .as_str() - .parse() - .context("Parsing patch version failed")?; - - Ok(Self::new(major, minor, patch)) - } -} - -impl FromStr for Version { - type Err = anyhow::Error; - - fn from_str(s: &str) -> Result { - let mut parts = s.split('.'); - const ERROR_MSG: &str = "String is invalid"; - - let major = parts - .next() - .and_then(|m| m.parse().ok()) - .context(ERROR_MSG)?; - let minor = parts - .next() - .and_then(|m| m.parse().ok()) - .context(ERROR_MSG)?; - let patch = parts - .next() - .and_then(|m| m.parse().ok()) - .context(ERROR_MSG)?; - - Ok(Version::new(major, minor, patch)) - } -} - -impl Display for Version { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - write!(f, "{}.{}.{}", self.major, self.minor, self.patch) - } -} - -/// Compares the version of this CLI tool of the version in `cargo.toml` in the -/// local repository, printing a warning if a newer version is available. -pub fn check_version() { - if let Err(err) = try_check_version() { - let msg = format!("Check for version of Build CLI Tool Failed.\nError: {err:?}\n"); - eprintln!("{}", style(msg).yellow()); - } -} - -/// Reads and parses the version from the current local repo and compare it to version of the -/// current binary file, printing a message if a newer version is available. -fn try_check_version() -> anyhow::Result<()> { - let bin_version = bin_version(); - let bin_version: Version = bin_version.parse().with_context(|| { - format!("Parsing current binary version text failed. Version: {bin_version}") - })?; - let repo_version = - version_in_repo().context("Parsing version of CLI from local repo failed")?; - let repo_version: Version = repo_version.parse().with_context(|| { - format!("Parsing local repo version text failed. Version: {repo_version}") - })?; - - match repo_version.cmp(&bin_version) { - Ordering::Less => { - let info_msg = format!( - "The version of the installed Build CLI Tool is more recent than the current one in the local repository\n\ - Installed Version: {bin_version}\n\ - Local repo Version: {repo_version}\n" - ); - eprintln!("{}", style(info_msg).cyan()); - } - Ordering::Equal => {} - Ordering::Greater => { - let warn_msg = format!( - "A newer version of the Build CLI Tool is available in the local repository\n\ - Installed Version: {bin_version}\n\ - Local repo Version: {repo_version}\n" - ); - eprintln!("{}", style(warn_msg).yellow()); - } - } - - Ok(()) -} - -/// Returns the version of current binary. -fn bin_version() -> &'static str { - env!("CARGO_PKG_VERSION") -} - -/// Reads `cargo.toml` of build CLI tool in the local repo, returning the current version of -/// the app from it. -fn version_in_repo() -> anyhow::Result { - let cargo_path = Target::CliDev.cwd().join("Cargo.toml"); - ensure!( - cargo_path.exists(), - "Cargo file for build_cli doesn't exit. Path: {}", - cargo_path.display() - ); - - let cargo_content = std::fs::read_to_string(&cargo_path).with_context(|| { - format!( - "Reading CLI Cargo file failed. Path {}", - cargo_path.display() - ) - })?; - - let cargo_toml: Table = cargo_content.parse().with_context(|| { - format!( - "Parsing the content of CLI cargo file failed. Path: {}", - cargo_path.display() - ) - })?; - - let version = cargo_toml - .get("package") - .and_then(|pkg| pkg.get("version")) - .and_then(|v| match v { - Value::String(s) => Some(s.to_owned()), - _ => None, - }) - .context("Failed to parse app version from CLI cargo.toml file")?; - - Ok(version) -} - -#[cfg(test)] -mod tests { - use super::*; - use Version as V; - use pretty_assertions::assert_eq; - - #[test] - fn version_ord() { - assert!(V::new(1, 1, 1) > V::new(1, 1, 0)); - assert!(V::new(1, 0, 1) < V::new(1, 1, 0)); - assert!(V::new(2, 0, 1) > V::new(1, 1, 0)); - assert!(V::new(0, 0, 1) < V::new(1, 1, 0)); - assert!(V::new(0, 0, 2) > V::new(0, 0, 1)); - assert!(V::new(0, 1, 0) > V::new(0, 0, 1)); - assert!(V::new(0, 2, 0) > V::new(0, 1, 9)); - assert!(V::new(1, 0, 0) > V::new(0, 9, 9)); - } - - #[test] - fn version_parse() { - assert_eq!(V::from_str("1.2.3").unwrap(), V::new(1, 2, 3)); - - assert!(V::from_str("1.2").is_err()); - assert!(V::from_str("1111").is_err()); - assert!(V::from_str("").is_err()); - assert!(V::from_str("one.two.three").is_err()); - } - - #[test] - fn version_ord_str() { - let ver1: V = "1.2.3".parse().unwrap(); - let ver2: V = "0.4.5".parse().unwrap(); - assert!(ver1 > ver2); - - let ver3: V = "2.0.0".parse().unwrap(); - assert!(ver3 > ver1); - assert!(ver3 > ver2); - } - - #[test] - fn version_regex_valid() { - let ver = Version::regex_extract("10.20.30").unwrap(); - assert_eq!(Version::new(10, 20, 30), ver); - - let ver = Version::regex_extract("0.2.111").unwrap(); - assert_eq!(Version::new(0, 2, 111), ver); - - let ver = Version::regex_extract("v0.2.111").unwrap(); - assert_eq!(Version::new(0, 2, 111), ver); - - let ver = Version::regex_extract("v11.2.111").unwrap(); - assert_eq!(Version::new(11, 2, 111), ver); - - let ver = Version::regex_extract("Some text 1.2.0").unwrap(); - assert_eq!(Version::new(1, 2, 0), ver); - - let ver = Version::regex_extract("Some text v1.2.0").unwrap(); - assert_eq!(Version::new(1, 2, 0), ver); - - let ver = Version::regex_extract("1.2.0 text after").unwrap(); - assert_eq!(Version::new(1, 2, 0), ver); - - let ver = Version::regex_extract("v0.2.355 text after").unwrap(); - assert_eq!(Version::new(0, 2, 355), ver); - - let ver = Version::regex_extract("1.2.12:pre-release").unwrap(); - assert_eq!(Version::new(1, 2, 12), ver); - } - - #[test] - fn version_regex_invalid() { - let invalid_patterns = [ - "", " ", "0.1", "0.01.2", "234", "owieurw", "aa.bb.cc", "a.b.c", "v01.2.", "1 .2.3", - ]; - for invalid in invalid_patterns { - assert!( - Version::regex_extract(invalid).is_err(), - "pattern '{invalid}' must be invalid" - ); - } - } -} diff --git a/application/apps/indexer/addons/bufread/Cargo.toml b/crates/bufread/Cargo.toml similarity index 100% rename from application/apps/indexer/addons/bufread/Cargo.toml rename to crates/bufread/Cargo.toml diff --git a/application/apps/indexer/addons/bufread/README.md b/crates/bufread/README.md similarity index 100% rename from application/apps/indexer/addons/bufread/README.md rename to crates/bufread/README.md diff --git a/application/apps/indexer/addons/bufread/benches/bench_config.rs b/crates/bufread/benches/bench_config.rs similarity index 100% rename from application/apps/indexer/addons/bufread/benches/bench_config.rs rename to crates/bufread/benches/bench_config.rs diff --git a/application/apps/indexer/addons/bufread/benches/buffer_benches.rs b/crates/bufread/benches/buffer_benches.rs similarity index 100% rename from application/apps/indexer/addons/bufread/benches/buffer_benches.rs rename to crates/bufread/benches/buffer_benches.rs diff --git a/application/apps/indexer/addons/bufread/benches/reader_benches.rs b/crates/bufread/benches/reader_benches.rs similarity index 100% rename from application/apps/indexer/addons/bufread/benches/reader_benches.rs rename to crates/bufread/benches/reader_benches.rs diff --git a/application/apps/indexer/addons/bufread/src/lib.rs b/crates/bufread/src/lib.rs similarity index 100% rename from application/apps/indexer/addons/bufread/src/lib.rs rename to crates/bufread/src/lib.rs diff --git a/application/apps/indexer/addons/bufread/tests/buffer_probtest.rs b/crates/bufread/tests/buffer_probtest.rs similarity index 100% rename from application/apps/indexer/addons/bufread/tests/buffer_probtest.rs rename to crates/bufread/tests/buffer_probtest.rs diff --git a/application/apps/indexer/addons/bufread/tests/proto.rs b/crates/bufread/tests/proto.rs similarity index 100% rename from application/apps/indexer/addons/bufread/tests/proto.rs rename to crates/bufread/tests/proto.rs diff --git a/application/apps/indexer/addons/bufread/tests/proto_tests.rs b/crates/bufread/tests/proto_tests.rs similarity index 100% rename from application/apps/indexer/addons/bufread/tests/proto_tests.rs rename to crates/bufread/tests/proto_tests.rs diff --git a/application/apps/indexer/addons/bufread/tests/reader_proptest.rs b/crates/bufread/tests/reader_proptest.rs similarity index 100% rename from application/apps/indexer/addons/bufread/tests/reader_proptest.rs rename to crates/bufread/tests/reader_proptest.rs diff --git a/application/apps/indexer/gui/application/Cargo.toml b/crates/chipmunk-app/Cargo.toml similarity index 91% rename from application/apps/indexer/gui/application/Cargo.toml rename to crates/chipmunk-app/Cargo.toml index 17a072ac64..334b19f6d6 100644 --- a/application/apps/indexer/gui/application/Cargo.toml +++ b/crates/chipmunk-app/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "application" +name = "chipmunk-app" authors.workspace = true description = "Chipmunk is one of the fastest desktop applications for viewing log files, with no limitations on data size." version.workspace = true @@ -13,8 +13,8 @@ path = "src/main.rs" [dependencies] -# *** Internal *** -stypes = { workspace = true, features=["rustcore"] } +# Internal crates +stypes.workspace = true merging.workspace = true processor.workspace = true sources.workspace = true @@ -23,9 +23,9 @@ shell-tools.workspace = true parsers.workspace = true plugins_host.workspace = true #TODO: We need to avoid clashing with module `session` in Workaround to avoid potential merge conflict -session_core = { package = "session", path = "../../session" } +session_core.workspace = true -# *** External *** +# External crates anyhow.workspace = true thiserror.workspace = true clap.workspace = true diff --git a/application/apps/indexer/gui/application/README.md b/crates/chipmunk-app/README.md similarity index 98% rename from application/apps/indexer/gui/application/README.md rename to crates/chipmunk-app/README.md index d7c3c0972d..3a6a8b47a2 100644 --- a/application/apps/indexer/gui/application/README.md +++ b/crates/chipmunk-app/README.md @@ -114,7 +114,7 @@ During alpha, use pre-release builds and look for versions like `4.0.0-alpha.1`. From the repository root: ```sh -cargo install --path application/apps/indexer/gui/application +cargo install --path crates/chipmunk-app ``` From this directory: diff --git a/application/apps/indexer/gui/application/data/fonts/IBMPlexSans-OFL.txt b/crates/chipmunk-app/data/fonts/IBMPlexSans-OFL.txt similarity index 100% rename from application/apps/indexer/gui/application/data/fonts/IBMPlexSans-OFL.txt rename to crates/chipmunk-app/data/fonts/IBMPlexSans-OFL.txt diff --git a/application/apps/indexer/gui/application/data/fonts/IBMPlexSans-Regular.ttf b/crates/chipmunk-app/data/fonts/IBMPlexSans-Regular.ttf similarity index 100% rename from application/apps/indexer/gui/application/data/fonts/IBMPlexSans-Regular.ttf rename to crates/chipmunk-app/data/fonts/IBMPlexSans-Regular.ttf diff --git a/application/apps/indexer/gui/application/data/fonts/JetBrainsMono-OFL.txt b/crates/chipmunk-app/data/fonts/JetBrainsMono-OFL.txt similarity index 100% rename from application/apps/indexer/gui/application/data/fonts/JetBrainsMono-OFL.txt rename to crates/chipmunk-app/data/fonts/JetBrainsMono-OFL.txt diff --git a/application/apps/indexer/gui/application/data/fonts/JetBrainsMono-Regular.ttf b/crates/chipmunk-app/data/fonts/JetBrainsMono-Regular.ttf similarity index 100% rename from application/apps/indexer/gui/application/data/fonts/JetBrainsMono-Regular.ttf rename to crates/chipmunk-app/data/fonts/JetBrainsMono-Regular.ttf diff --git a/application/holder/resources/icons/ico/icon.ico b/crates/chipmunk-app/data/icons/ico/icon.ico similarity index 100% rename from application/holder/resources/icons/ico/icon.ico rename to crates/chipmunk-app/data/icons/ico/icon.ico diff --git a/application/holder/resources/icons/png/128.png b/crates/chipmunk-app/data/icons/png/128.png similarity index 100% rename from application/holder/resources/icons/png/128.png rename to crates/chipmunk-app/data/icons/png/128.png diff --git a/application/holder/resources/icons/png/16.png b/crates/chipmunk-app/data/icons/png/16.png similarity index 100% rename from application/holder/resources/icons/png/16.png rename to crates/chipmunk-app/data/icons/png/16.png diff --git a/application/holder/resources/icons/png/24.png b/crates/chipmunk-app/data/icons/png/24.png similarity index 100% rename from application/holder/resources/icons/png/24.png rename to crates/chipmunk-app/data/icons/png/24.png diff --git a/application/holder/resources/icons/png/256.png b/crates/chipmunk-app/data/icons/png/256.png similarity index 100% rename from application/holder/resources/icons/png/256.png rename to crates/chipmunk-app/data/icons/png/256.png diff --git a/application/holder/resources/icons/png/32.png b/crates/chipmunk-app/data/icons/png/32.png similarity index 100% rename from application/holder/resources/icons/png/32.png rename to crates/chipmunk-app/data/icons/png/32.png diff --git a/application/holder/resources/icons/png/512.png b/crates/chipmunk-app/data/icons/png/512.png similarity index 100% rename from application/holder/resources/icons/png/512.png rename to crates/chipmunk-app/data/icons/png/512.png diff --git a/application/holder/resources/icons/png/64.png b/crates/chipmunk-app/data/icons/png/64.png similarity index 100% rename from application/holder/resources/icons/png/64.png rename to crates/chipmunk-app/data/icons/png/64.png diff --git a/application/holder/resources/icons/png/icon.png b/crates/chipmunk-app/data/icons/png/icon.png similarity index 100% rename from application/holder/resources/icons/png/icon.png rename to crates/chipmunk-app/data/icons/png/icon.png diff --git a/application/holder/resources/linux/chipmunk.desktop b/crates/chipmunk-app/data/linux/chipmunk.desktop similarity index 100% rename from application/holder/resources/linux/chipmunk.desktop rename to crates/chipmunk-app/data/linux/chipmunk.desktop diff --git a/application/holder/resources/linux/chipmunk.png b/crates/chipmunk-app/data/linux/chipmunk.png similarity index 100% rename from application/holder/resources/linux/chipmunk.png rename to crates/chipmunk-app/data/linux/chipmunk.png diff --git a/application/holder/resources/mac/chipmunk.icns b/crates/chipmunk-app/data/mac/chipmunk.icns similarity index 100% rename from application/holder/resources/mac/chipmunk.icns rename to crates/chipmunk-app/data/mac/chipmunk.icns diff --git a/application/holder/resources/mac/entitlements.mac.plist b/crates/chipmunk-app/data/mac/entitlements.mac.plist similarity index 100% rename from application/holder/resources/mac/entitlements.mac.plist rename to crates/chipmunk-app/data/mac/entitlements.mac.plist diff --git a/application/holder/resources/win/chipmunk.ico b/crates/chipmunk-app/data/win/chipmunk.ico similarity index 100% rename from application/holder/resources/win/chipmunk.ico rename to crates/chipmunk-app/data/win/chipmunk.ico diff --git a/application/apps/indexer/gui/application/src/cli/command.rs b/crates/chipmunk-app/src/cli/command.rs similarity index 100% rename from application/apps/indexer/gui/application/src/cli/command.rs rename to crates/chipmunk-app/src/cli/command.rs diff --git a/application/apps/indexer/gui/application/src/cli/mod.rs b/crates/chipmunk-app/src/cli/mod.rs similarity index 100% rename from application/apps/indexer/gui/application/src/cli/mod.rs rename to crates/chipmunk-app/src/cli/mod.rs diff --git a/application/apps/indexer/gui/application/src/common/action_throttle.rs b/crates/chipmunk-app/src/common/action_throttle.rs similarity index 100% rename from application/apps/indexer/gui/application/src/common/action_throttle.rs rename to crates/chipmunk-app/src/common/action_throttle.rs diff --git a/application/apps/indexer/gui/application/src/common/app_info.rs b/crates/chipmunk-app/src/common/app_info.rs similarity index 94% rename from application/apps/indexer/gui/application/src/common/app_info.rs rename to crates/chipmunk-app/src/common/app_info.rs index fc11d761c9..c69b70d989 100644 --- a/application/apps/indexer/gui/application/src/common/app_info.rs +++ b/crates/chipmunk-app/src/common/app_info.rs @@ -22,7 +22,7 @@ pub fn current_version() -> &'static Version { pub fn icon() -> egui::IconData { let icon_bytes = include_bytes!(concat!( env!("CARGO_MANIFEST_DIR"), - "/../../../../holder/resources/icons/png/icon.png" + "/data/icons/png/icon.png" )); match eframe::icon_data::from_png_bytes(icon_bytes) { diff --git a/application/apps/indexer/gui/application/src/common/comm_utls.rs b/crates/chipmunk-app/src/common/comm_utls.rs similarity index 100% rename from application/apps/indexer/gui/application/src/common/comm_utls.rs rename to crates/chipmunk-app/src/common/comm_utls.rs diff --git a/application/apps/indexer/gui/application/src/common/fixed_queue.rs b/crates/chipmunk-app/src/common/fixed_queue.rs similarity index 100% rename from application/apps/indexer/gui/application/src/common/fixed_queue.rs rename to crates/chipmunk-app/src/common/fixed_queue.rs diff --git a/application/apps/indexer/gui/application/src/common/fonts.rs b/crates/chipmunk-app/src/common/fonts.rs similarity index 100% rename from application/apps/indexer/gui/application/src/common/fonts.rs rename to crates/chipmunk-app/src/common/fonts.rs diff --git a/application/apps/indexer/gui/application/src/common/logging.rs b/crates/chipmunk-app/src/common/logging.rs similarity index 100% rename from application/apps/indexer/gui/application/src/common/logging.rs rename to crates/chipmunk-app/src/common/logging.rs diff --git a/application/apps/indexer/gui/application/src/common/matcher/fuzzy_matcher.rs b/crates/chipmunk-app/src/common/matcher/fuzzy_matcher.rs similarity index 100% rename from application/apps/indexer/gui/application/src/common/matcher/fuzzy_matcher.rs rename to crates/chipmunk-app/src/common/matcher/fuzzy_matcher.rs diff --git a/application/apps/indexer/gui/application/src/common/matcher/mod.rs b/crates/chipmunk-app/src/common/matcher/mod.rs similarity index 100% rename from application/apps/indexer/gui/application/src/common/matcher/mod.rs rename to crates/chipmunk-app/src/common/matcher/mod.rs diff --git a/application/apps/indexer/gui/application/src/common/matcher/substring_matcher.rs b/crates/chipmunk-app/src/common/matcher/substring_matcher.rs similarity index 100% rename from application/apps/indexer/gui/application/src/common/matcher/substring_matcher.rs rename to crates/chipmunk-app/src/common/matcher/substring_matcher.rs diff --git a/application/apps/indexer/gui/application/src/common/mod.rs b/crates/chipmunk-app/src/common/mod.rs similarity index 100% rename from application/apps/indexer/gui/application/src/common/mod.rs rename to crates/chipmunk-app/src/common/mod.rs diff --git a/application/apps/indexer/gui/application/src/common/phosphor.rs b/crates/chipmunk-app/src/common/phosphor.rs similarity index 100% rename from application/apps/indexer/gui/application/src/common/phosphor.rs rename to crates/chipmunk-app/src/common/phosphor.rs diff --git a/application/apps/indexer/gui/application/src/common/time.rs b/crates/chipmunk-app/src/common/time.rs similarity index 100% rename from application/apps/indexer/gui/application/src/common/time.rs rename to crates/chipmunk-app/src/common/time.rs diff --git a/application/apps/indexer/gui/application/src/common/ui/buttons.rs b/crates/chipmunk-app/src/common/ui/buttons.rs similarity index 100% rename from application/apps/indexer/gui/application/src/common/ui/buttons.rs rename to crates/chipmunk-app/src/common/ui/buttons.rs diff --git a/application/apps/indexer/gui/application/src/common/ui/mod.rs b/crates/chipmunk-app/src/common/ui/mod.rs similarity index 100% rename from application/apps/indexer/gui/application/src/common/ui/mod.rs rename to crates/chipmunk-app/src/common/ui/mod.rs diff --git a/application/apps/indexer/gui/application/src/common/ui/modal.rs b/crates/chipmunk-app/src/common/ui/modal.rs similarity index 100% rename from application/apps/indexer/gui/application/src/common/ui/modal.rs rename to crates/chipmunk-app/src/common/ui/modal.rs diff --git a/application/apps/indexer/gui/application/src/common/ui/search_picker.rs b/crates/chipmunk-app/src/common/ui/search_picker.rs similarity index 100% rename from application/apps/indexer/gui/application/src/common/ui/search_picker.rs rename to crates/chipmunk-app/src/common/ui/search_picker.rs diff --git a/application/apps/indexer/gui/application/src/common/ui/tab_strip.rs b/crates/chipmunk-app/src/common/ui/tab_strip.rs similarity index 100% rename from application/apps/indexer/gui/application/src/common/ui/tab_strip.rs rename to crates/chipmunk-app/src/common/ui/tab_strip.rs diff --git a/application/apps/indexer/gui/application/src/common/ui/visibility_tracker.rs b/crates/chipmunk-app/src/common/ui/visibility_tracker.rs similarity index 100% rename from application/apps/indexer/gui/application/src/common/ui/visibility_tracker.rs rename to crates/chipmunk-app/src/common/ui/visibility_tracker.rs diff --git a/application/apps/indexer/gui/application/src/common/validation/filter.rs b/crates/chipmunk-app/src/common/validation/filter.rs similarity index 100% rename from application/apps/indexer/gui/application/src/common/validation/filter.rs rename to crates/chipmunk-app/src/common/validation/filter.rs diff --git a/application/apps/indexer/gui/application/src/common/validation/mod.rs b/crates/chipmunk-app/src/common/validation/mod.rs similarity index 100% rename from application/apps/indexer/gui/application/src/common/validation/mod.rs rename to crates/chipmunk-app/src/common/validation/mod.rs diff --git a/application/apps/indexer/gui/application/src/common/validation/search_value.rs b/crates/chipmunk-app/src/common/validation/search_value.rs similarity index 100% rename from application/apps/indexer/gui/application/src/common/validation/search_value.rs rename to crates/chipmunk-app/src/common/validation/search_value.rs diff --git a/application/apps/indexer/gui/application/src/host/command.rs b/crates/chipmunk-app/src/host/command.rs similarity index 100% rename from application/apps/indexer/gui/application/src/host/command.rs rename to crates/chipmunk-app/src/host/command.rs diff --git a/application/apps/indexer/gui/application/src/host/common/app_style.rs b/crates/chipmunk-app/src/host/common/app_style.rs similarity index 100% rename from application/apps/indexer/gui/application/src/host/common/app_style.rs rename to crates/chipmunk-app/src/host/common/app_style.rs diff --git a/application/apps/indexer/gui/application/src/host/common/colors.rs b/crates/chipmunk-app/src/host/common/colors.rs similarity index 100% rename from application/apps/indexer/gui/application/src/host/common/colors.rs rename to crates/chipmunk-app/src/host/common/colors.rs diff --git a/application/apps/indexer/gui/application/src/host/common/dlt_stats.rs b/crates/chipmunk-app/src/host/common/dlt_stats.rs similarity index 100% rename from application/apps/indexer/gui/application/src/host/common/dlt_stats.rs rename to crates/chipmunk-app/src/host/common/dlt_stats.rs diff --git a/application/apps/indexer/gui/application/src/host/common/file_utls.rs b/crates/chipmunk-app/src/host/common/file_utls.rs similarity index 100% rename from application/apps/indexer/gui/application/src/host/common/file_utls.rs rename to crates/chipmunk-app/src/host/common/file_utls.rs diff --git a/application/apps/indexer/gui/application/src/host/common/mod.rs b/crates/chipmunk-app/src/host/common/mod.rs similarity index 100% rename from application/apps/indexer/gui/application/src/host/common/mod.rs rename to crates/chipmunk-app/src/host/common/mod.rs diff --git a/application/apps/indexer/gui/application/src/host/common/parsers.rs b/crates/chipmunk-app/src/host/common/parsers.rs similarity index 100% rename from application/apps/indexer/gui/application/src/host/common/parsers.rs rename to crates/chipmunk-app/src/host/common/parsers.rs diff --git a/application/apps/indexer/gui/application/src/host/common/sources.rs b/crates/chipmunk-app/src/host/common/sources.rs similarity index 100% rename from application/apps/indexer/gui/application/src/host/common/sources.rs rename to crates/chipmunk-app/src/host/common/sources.rs diff --git a/application/apps/indexer/gui/application/src/host/common/ui_utls.rs b/crates/chipmunk-app/src/host/common/ui_utls.rs similarity index 100% rename from application/apps/indexer/gui/application/src/host/common/ui_utls.rs rename to crates/chipmunk-app/src/host/common/ui_utls.rs diff --git a/application/apps/indexer/gui/application/src/host/communication.rs b/crates/chipmunk-app/src/host/communication.rs similarity index 100% rename from application/apps/indexer/gui/application/src/host/communication.rs rename to crates/chipmunk-app/src/host/communication.rs diff --git a/application/apps/indexer/gui/application/src/host/error.rs b/crates/chipmunk-app/src/host/error.rs similarity index 100% rename from application/apps/indexer/gui/application/src/host/error.rs rename to crates/chipmunk-app/src/host/error.rs diff --git a/application/apps/indexer/gui/application/src/host/message.rs b/crates/chipmunk-app/src/host/message.rs similarity index 100% rename from application/apps/indexer/gui/application/src/host/message.rs rename to crates/chipmunk-app/src/host/message.rs diff --git a/application/apps/indexer/gui/application/src/host/mod.rs b/crates/chipmunk-app/src/host/mod.rs similarity index 100% rename from application/apps/indexer/gui/application/src/host/mod.rs rename to crates/chipmunk-app/src/host/mod.rs diff --git a/application/apps/indexer/gui/application/src/host/notification.rs b/crates/chipmunk-app/src/host/notification.rs similarity index 100% rename from application/apps/indexer/gui/application/src/host/notification.rs rename to crates/chipmunk-app/src/host/notification.rs diff --git a/application/apps/indexer/gui/application/src/host/service/file.rs b/crates/chipmunk-app/src/host/service/file.rs similarity index 100% rename from application/apps/indexer/gui/application/src/host/service/file.rs rename to crates/chipmunk-app/src/host/service/file.rs diff --git a/application/apps/indexer/gui/application/src/host/service/mod.rs b/crates/chipmunk-app/src/host/service/mod.rs similarity index 100% rename from application/apps/indexer/gui/application/src/host/service/mod.rs rename to crates/chipmunk-app/src/host/service/mod.rs diff --git a/application/apps/indexer/gui/application/src/host/service/plugin/mod.rs b/crates/chipmunk-app/src/host/service/plugin/mod.rs similarity index 100% rename from application/apps/indexer/gui/application/src/host/service/plugin/mod.rs rename to crates/chipmunk-app/src/host/service/plugin/mod.rs diff --git a/application/apps/indexer/gui/application/src/host/service/presets_io.rs b/crates/chipmunk-app/src/host/service/presets_io.rs similarity index 100% rename from application/apps/indexer/gui/application/src/host/service/presets_io.rs rename to crates/chipmunk-app/src/host/service/presets_io.rs diff --git a/application/apps/indexer/gui/application/src/host/service/release_info.rs b/crates/chipmunk-app/src/host/service/release_info.rs similarity index 100% rename from application/apps/indexer/gui/application/src/host/service/release_info.rs rename to crates/chipmunk-app/src/host/service/release_info.rs diff --git a/application/apps/indexer/gui/application/src/host/service/storage/app_version.rs b/crates/chipmunk-app/src/host/service/storage/app_version.rs similarity index 100% rename from application/apps/indexer/gui/application/src/host/service/storage/app_version.rs rename to crates/chipmunk-app/src/host/service/storage/app_version.rs diff --git a/application/apps/indexer/gui/application/src/host/service/storage/file_explorer.rs b/crates/chipmunk-app/src/host/service/storage/file_explorer.rs similarity index 100% rename from application/apps/indexer/gui/application/src/host/service/storage/file_explorer.rs rename to crates/chipmunk-app/src/host/service/storage/file_explorer.rs diff --git a/application/apps/indexer/gui/application/src/host/service/storage/mod.rs b/crates/chipmunk-app/src/host/service/storage/mod.rs similarity index 100% rename from application/apps/indexer/gui/application/src/host/service/storage/mod.rs rename to crates/chipmunk-app/src/host/service/storage/mod.rs diff --git a/application/apps/indexer/gui/application/src/host/service/storage/recent.rs b/crates/chipmunk-app/src/host/service/storage/recent.rs similarity index 100% rename from application/apps/indexer/gui/application/src/host/service/storage/recent.rs rename to crates/chipmunk-app/src/host/service/storage/recent.rs diff --git a/application/apps/indexer/gui/application/src/host/service/storage/settings.rs b/crates/chipmunk-app/src/host/service/storage/settings.rs similarity index 100% rename from application/apps/indexer/gui/application/src/host/service/storage/settings.rs rename to crates/chipmunk-app/src/host/service/storage/settings.rs diff --git a/application/apps/indexer/gui/application/src/host/ui/actions/file_dialog.rs b/crates/chipmunk-app/src/host/ui/actions/file_dialog.rs similarity index 100% rename from application/apps/indexer/gui/application/src/host/ui/actions/file_dialog.rs rename to crates/chipmunk-app/src/host/ui/actions/file_dialog.rs diff --git a/application/apps/indexer/gui/application/src/host/ui/actions/host_action.rs b/crates/chipmunk-app/src/host/ui/actions/host_action.rs similarity index 100% rename from application/apps/indexer/gui/application/src/host/ui/actions/host_action.rs rename to crates/chipmunk-app/src/host/ui/actions/host_action.rs diff --git a/application/apps/indexer/gui/application/src/host/ui/actions/mod.rs b/crates/chipmunk-app/src/host/ui/actions/mod.rs similarity index 100% rename from application/apps/indexer/gui/application/src/host/ui/actions/mod.rs rename to crates/chipmunk-app/src/host/ui/actions/mod.rs diff --git a/application/apps/indexer/gui/application/src/host/ui/app_settings/mod.rs b/crates/chipmunk-app/src/host/ui/app_settings/mod.rs similarity index 100% rename from application/apps/indexer/gui/application/src/host/ui/app_settings/mod.rs rename to crates/chipmunk-app/src/host/ui/app_settings/mod.rs diff --git a/application/apps/indexer/gui/application/src/host/ui/banners/mod.rs b/crates/chipmunk-app/src/host/ui/banners/mod.rs similarity index 100% rename from application/apps/indexer/gui/application/src/host/ui/banners/mod.rs rename to crates/chipmunk-app/src/host/ui/banners/mod.rs diff --git a/application/apps/indexer/gui/application/src/host/ui/banners/update.rs b/crates/chipmunk-app/src/host/ui/banners/update.rs similarity index 100% rename from application/apps/indexer/gui/application/src/host/ui/banners/update.rs rename to crates/chipmunk-app/src/host/ui/banners/update.rs diff --git a/application/apps/indexer/gui/application/src/host/ui/command_palette/commands.rs b/crates/chipmunk-app/src/host/ui/command_palette/commands.rs similarity index 100% rename from application/apps/indexer/gui/application/src/host/ui/command_palette/commands.rs rename to crates/chipmunk-app/src/host/ui/command_palette/commands.rs diff --git a/application/apps/indexer/gui/application/src/host/ui/command_palette/mod.rs b/crates/chipmunk-app/src/host/ui/command_palette/mod.rs similarity index 100% rename from application/apps/indexer/gui/application/src/host/ui/command_palette/mod.rs rename to crates/chipmunk-app/src/host/ui/command_palette/mod.rs diff --git a/application/apps/indexer/gui/application/src/host/ui/command_palette/row.rs b/crates/chipmunk-app/src/host/ui/command_palette/row.rs similarity index 100% rename from application/apps/indexer/gui/application/src/host/ui/command_palette/row.rs rename to crates/chipmunk-app/src/host/ui/command_palette/row.rs diff --git a/application/apps/indexer/gui/application/src/host/ui/dnd_paths.rs b/crates/chipmunk-app/src/host/ui/dnd_paths.rs similarity index 100% rename from application/apps/indexer/gui/application/src/host/ui/dnd_paths.rs rename to crates/chipmunk-app/src/host/ui/dnd_paths.rs diff --git a/application/apps/indexer/gui/application/src/host/ui/file_dialog_commands.rs b/crates/chipmunk-app/src/host/ui/file_dialog_commands.rs similarity index 100% rename from application/apps/indexer/gui/application/src/host/ui/file_dialog_commands.rs rename to crates/chipmunk-app/src/host/ui/file_dialog_commands.rs diff --git a/application/apps/indexer/gui/application/src/host/ui/home/file_explorer.rs b/crates/chipmunk-app/src/host/ui/home/file_explorer.rs similarity index 100% rename from application/apps/indexer/gui/application/src/host/ui/home/file_explorer.rs rename to crates/chipmunk-app/src/host/ui/home/file_explorer.rs diff --git a/application/apps/indexer/gui/application/src/host/ui/home/mod.rs b/crates/chipmunk-app/src/host/ui/home/mod.rs similarity index 100% rename from application/apps/indexer/gui/application/src/host/ui/home/mod.rs rename to crates/chipmunk-app/src/host/ui/home/mod.rs diff --git a/application/apps/indexer/gui/application/src/host/ui/home/recent.rs b/crates/chipmunk-app/src/host/ui/home/recent.rs similarity index 100% rename from application/apps/indexer/gui/application/src/host/ui/home/recent.rs rename to crates/chipmunk-app/src/host/ui/home/recent.rs diff --git a/application/apps/indexer/gui/application/src/host/ui/menu.rs b/crates/chipmunk-app/src/host/ui/menu.rs similarity index 100% rename from application/apps/indexer/gui/application/src/host/ui/menu.rs rename to crates/chipmunk-app/src/host/ui/menu.rs diff --git a/application/apps/indexer/gui/application/src/host/ui/mod.rs b/crates/chipmunk-app/src/host/ui/mod.rs similarity index 100% rename from application/apps/indexer/gui/application/src/host/ui/mod.rs rename to crates/chipmunk-app/src/host/ui/mod.rs diff --git a/application/apps/indexer/gui/application/src/host/ui/modals/about.rs b/crates/chipmunk-app/src/host/ui/modals/about.rs similarity index 100% rename from application/apps/indexer/gui/application/src/host/ui/modals/about.rs rename to crates/chipmunk-app/src/host/ui/modals/about.rs diff --git a/application/apps/indexer/gui/application/src/host/ui/modals/changelog.rs b/crates/chipmunk-app/src/host/ui/modals/changelog.rs similarity index 100% rename from application/apps/indexer/gui/application/src/host/ui/modals/changelog.rs rename to crates/chipmunk-app/src/host/ui/modals/changelog.rs diff --git a/application/apps/indexer/gui/application/src/host/ui/modals/confirmation.rs b/crates/chipmunk-app/src/host/ui/modals/confirmation.rs similarity index 100% rename from application/apps/indexer/gui/application/src/host/ui/modals/confirmation.rs rename to crates/chipmunk-app/src/host/ui/modals/confirmation.rs diff --git a/application/apps/indexer/gui/application/src/host/ui/modals/mod.rs b/crates/chipmunk-app/src/host/ui/modals/mod.rs similarity index 100% rename from application/apps/indexer/gui/application/src/host/ui/modals/mod.rs rename to crates/chipmunk-app/src/host/ui/modals/mod.rs diff --git a/application/apps/indexer/gui/application/src/host/ui/multi_setup/main_table/mod.rs b/crates/chipmunk-app/src/host/ui/multi_setup/main_table/mod.rs similarity index 100% rename from application/apps/indexer/gui/application/src/host/ui/multi_setup/main_table/mod.rs rename to crates/chipmunk-app/src/host/ui/multi_setup/main_table/mod.rs diff --git a/application/apps/indexer/gui/application/src/host/ui/multi_setup/main_table/table_columns.rs b/crates/chipmunk-app/src/host/ui/multi_setup/main_table/table_columns.rs similarity index 100% rename from application/apps/indexer/gui/application/src/host/ui/multi_setup/main_table/table_columns.rs rename to crates/chipmunk-app/src/host/ui/multi_setup/main_table/table_columns.rs diff --git a/application/apps/indexer/gui/application/src/host/ui/multi_setup/mod.rs b/crates/chipmunk-app/src/host/ui/multi_setup/mod.rs similarity index 100% rename from application/apps/indexer/gui/application/src/host/ui/multi_setup/mod.rs rename to crates/chipmunk-app/src/host/ui/multi_setup/mod.rs diff --git a/application/apps/indexer/gui/application/src/host/ui/multi_setup/side_panel.rs b/crates/chipmunk-app/src/host/ui/multi_setup/side_panel.rs similarity index 100% rename from application/apps/indexer/gui/application/src/host/ui/multi_setup/side_panel.rs rename to crates/chipmunk-app/src/host/ui/multi_setup/side_panel.rs diff --git a/application/apps/indexer/gui/application/src/host/ui/multi_setup/state/file.rs b/crates/chipmunk-app/src/host/ui/multi_setup/state/file.rs similarity index 100% rename from application/apps/indexer/gui/application/src/host/ui/multi_setup/state/file.rs rename to crates/chipmunk-app/src/host/ui/multi_setup/state/file.rs diff --git a/application/apps/indexer/gui/application/src/host/ui/multi_setup/state/mod.rs b/crates/chipmunk-app/src/host/ui/multi_setup/state/mod.rs similarity index 100% rename from application/apps/indexer/gui/application/src/host/ui/multi_setup/state/mod.rs rename to crates/chipmunk-app/src/host/ui/multi_setup/state/mod.rs diff --git a/application/apps/indexer/gui/application/src/host/ui/notification.rs b/crates/chipmunk-app/src/host/ui/notification.rs similarity index 100% rename from application/apps/indexer/gui/application/src/host/ui/notification.rs rename to crates/chipmunk-app/src/host/ui/notification.rs diff --git a/application/apps/indexer/gui/application/src/host/ui/persist.rs b/crates/chipmunk-app/src/host/ui/persist.rs similarity index 100% rename from application/apps/indexer/gui/application/src/host/ui/persist.rs rename to crates/chipmunk-app/src/host/ui/persist.rs diff --git a/application/apps/indexer/gui/application/src/host/ui/plugin_manager/details.rs b/crates/chipmunk-app/src/host/ui/plugin_manager/details.rs similarity index 100% rename from application/apps/indexer/gui/application/src/host/ui/plugin_manager/details.rs rename to crates/chipmunk-app/src/host/ui/plugin_manager/details.rs diff --git a/application/apps/indexer/gui/application/src/host/ui/plugin_manager/list.rs b/crates/chipmunk-app/src/host/ui/plugin_manager/list.rs similarity index 100% rename from application/apps/indexer/gui/application/src/host/ui/plugin_manager/list.rs rename to crates/chipmunk-app/src/host/ui/plugin_manager/list.rs diff --git a/application/apps/indexer/gui/application/src/host/ui/plugin_manager/mod.rs b/crates/chipmunk-app/src/host/ui/plugin_manager/mod.rs similarity index 100% rename from application/apps/indexer/gui/application/src/host/ui/plugin_manager/mod.rs rename to crates/chipmunk-app/src/host/ui/plugin_manager/mod.rs diff --git a/application/apps/indexer/gui/application/src/host/ui/plugin_manager/readme.rs b/crates/chipmunk-app/src/host/ui/plugin_manager/readme.rs similarity index 100% rename from application/apps/indexer/gui/application/src/host/ui/plugin_manager/readme.rs rename to crates/chipmunk-app/src/host/ui/plugin_manager/readme.rs diff --git a/application/apps/indexer/gui/application/src/host/ui/quick_open/mod.rs b/crates/chipmunk-app/src/host/ui/quick_open/mod.rs similarity index 100% rename from application/apps/indexer/gui/application/src/host/ui/quick_open/mod.rs rename to crates/chipmunk-app/src/host/ui/quick_open/mod.rs diff --git a/application/apps/indexer/gui/application/src/host/ui/quick_open/row.rs b/crates/chipmunk-app/src/host/ui/quick_open/row.rs similarity index 100% rename from application/apps/indexer/gui/application/src/host/ui/quick_open/row.rs rename to crates/chipmunk-app/src/host/ui/quick_open/row.rs diff --git a/application/apps/indexer/gui/application/src/host/ui/quick_open/search.rs b/crates/chipmunk-app/src/host/ui/quick_open/search.rs similarity index 100% rename from application/apps/indexer/gui/application/src/host/ui/quick_open/search.rs rename to crates/chipmunk-app/src/host/ui/quick_open/search.rs diff --git a/application/apps/indexer/gui/application/src/host/ui/recent_session.rs b/crates/chipmunk-app/src/host/ui/recent_session.rs similarity index 100% rename from application/apps/indexer/gui/application/src/host/ui/recent_session.rs rename to crates/chipmunk-app/src/host/ui/recent_session.rs diff --git a/application/apps/indexer/gui/application/src/host/ui/registry/filters.rs b/crates/chipmunk-app/src/host/ui/registry/filters.rs similarity index 100% rename from application/apps/indexer/gui/application/src/host/ui/registry/filters.rs rename to crates/chipmunk-app/src/host/ui/registry/filters.rs diff --git a/application/apps/indexer/gui/application/src/host/ui/registry/mod.rs b/crates/chipmunk-app/src/host/ui/registry/mod.rs similarity index 100% rename from application/apps/indexer/gui/application/src/host/ui/registry/mod.rs rename to crates/chipmunk-app/src/host/ui/registry/mod.rs diff --git a/application/apps/indexer/gui/application/src/host/ui/registry/presets.rs b/crates/chipmunk-app/src/host/ui/registry/presets.rs similarity index 100% rename from application/apps/indexer/gui/application/src/host/ui/registry/presets.rs rename to crates/chipmunk-app/src/host/ui/registry/presets.rs diff --git a/application/apps/indexer/gui/application/src/host/ui/session_setup/main_config/dlt.rs b/crates/chipmunk-app/src/host/ui/session_setup/main_config/dlt.rs similarity index 100% rename from application/apps/indexer/gui/application/src/host/ui/session_setup/main_config/dlt.rs rename to crates/chipmunk-app/src/host/ui/session_setup/main_config/dlt.rs diff --git a/application/apps/indexer/gui/application/src/host/ui/session_setup/main_config/mod.rs b/crates/chipmunk-app/src/host/ui/session_setup/main_config/mod.rs similarity index 100% rename from application/apps/indexer/gui/application/src/host/ui/session_setup/main_config/mod.rs rename to crates/chipmunk-app/src/host/ui/session_setup/main_config/mod.rs diff --git a/application/apps/indexer/gui/application/src/host/ui/session_setup/main_config/process.rs b/crates/chipmunk-app/src/host/ui/session_setup/main_config/process.rs similarity index 100% rename from application/apps/indexer/gui/application/src/host/ui/session_setup/main_config/process.rs rename to crates/chipmunk-app/src/host/ui/session_setup/main_config/process.rs diff --git a/application/apps/indexer/gui/application/src/host/ui/session_setup/main_config/recent.rs b/crates/chipmunk-app/src/host/ui/session_setup/main_config/recent.rs similarity index 100% rename from application/apps/indexer/gui/application/src/host/ui/session_setup/main_config/recent.rs rename to crates/chipmunk-app/src/host/ui/session_setup/main_config/recent.rs diff --git a/application/apps/indexer/gui/application/src/host/ui/session_setup/main_config/serial.rs b/crates/chipmunk-app/src/host/ui/session_setup/main_config/serial.rs similarity index 100% rename from application/apps/indexer/gui/application/src/host/ui/session_setup/main_config/serial.rs rename to crates/chipmunk-app/src/host/ui/session_setup/main_config/serial.rs diff --git a/application/apps/indexer/gui/application/src/host/ui/session_setup/main_config/tcp.rs b/crates/chipmunk-app/src/host/ui/session_setup/main_config/tcp.rs similarity index 100% rename from application/apps/indexer/gui/application/src/host/ui/session_setup/main_config/tcp.rs rename to crates/chipmunk-app/src/host/ui/session_setup/main_config/tcp.rs diff --git a/application/apps/indexer/gui/application/src/host/ui/session_setup/main_config/udp.rs b/crates/chipmunk-app/src/host/ui/session_setup/main_config/udp.rs similarity index 100% rename from application/apps/indexer/gui/application/src/host/ui/session_setup/main_config/udp.rs rename to crates/chipmunk-app/src/host/ui/session_setup/main_config/udp.rs diff --git a/application/apps/indexer/gui/application/src/host/ui/session_setup/mod.rs b/crates/chipmunk-app/src/host/ui/session_setup/mod.rs similarity index 100% rename from application/apps/indexer/gui/application/src/host/ui/session_setup/mod.rs rename to crates/chipmunk-app/src/host/ui/session_setup/mod.rs diff --git a/application/apps/indexer/gui/application/src/host/ui/session_setup/side_config/dlt.rs b/crates/chipmunk-app/src/host/ui/session_setup/side_config/dlt.rs similarity index 100% rename from application/apps/indexer/gui/application/src/host/ui/session_setup/side_config/dlt.rs rename to crates/chipmunk-app/src/host/ui/session_setup/side_config/dlt.rs diff --git a/application/apps/indexer/gui/application/src/host/ui/session_setup/side_config/mod.rs b/crates/chipmunk-app/src/host/ui/session_setup/side_config/mod.rs similarity index 100% rename from application/apps/indexer/gui/application/src/host/ui/session_setup/side_config/mod.rs rename to crates/chipmunk-app/src/host/ui/session_setup/side_config/mod.rs diff --git a/application/apps/indexer/gui/application/src/host/ui/session_setup/side_config/plugins/fields.rs b/crates/chipmunk-app/src/host/ui/session_setup/side_config/plugins/fields.rs similarity index 100% rename from application/apps/indexer/gui/application/src/host/ui/session_setup/side_config/plugins/fields.rs rename to crates/chipmunk-app/src/host/ui/session_setup/side_config/plugins/fields.rs diff --git a/application/apps/indexer/gui/application/src/host/ui/session_setup/side_config/plugins/mod.rs b/crates/chipmunk-app/src/host/ui/session_setup/side_config/plugins/mod.rs similarity index 100% rename from application/apps/indexer/gui/application/src/host/ui/session_setup/side_config/plugins/mod.rs rename to crates/chipmunk-app/src/host/ui/session_setup/side_config/plugins/mod.rs diff --git a/application/apps/indexer/gui/application/src/host/ui/session_setup/side_config/shared.rs b/crates/chipmunk-app/src/host/ui/session_setup/side_config/shared.rs similarity index 100% rename from application/apps/indexer/gui/application/src/host/ui/session_setup/side_config/shared.rs rename to crates/chipmunk-app/src/host/ui/session_setup/side_config/shared.rs diff --git a/application/apps/indexer/gui/application/src/host/ui/session_setup/side_config/someip.rs b/crates/chipmunk-app/src/host/ui/session_setup/side_config/someip.rs similarity index 100% rename from application/apps/indexer/gui/application/src/host/ui/session_setup/side_config/someip.rs rename to crates/chipmunk-app/src/host/ui/session_setup/side_config/someip.rs diff --git a/application/apps/indexer/gui/application/src/host/ui/session_setup/side_config/text.rs b/crates/chipmunk-app/src/host/ui/session_setup/side_config/text.rs similarity index 100% rename from application/apps/indexer/gui/application/src/host/ui/session_setup/side_config/text.rs rename to crates/chipmunk-app/src/host/ui/session_setup/side_config/text.rs diff --git a/application/apps/indexer/gui/application/src/host/ui/session_setup/state/mod.rs b/crates/chipmunk-app/src/host/ui/session_setup/state/mod.rs similarity index 100% rename from application/apps/indexer/gui/application/src/host/ui/session_setup/state/mod.rs rename to crates/chipmunk-app/src/host/ui/session_setup/state/mod.rs diff --git a/application/apps/indexer/gui/application/src/host/ui/session_setup/state/parsers/dlt.rs b/crates/chipmunk-app/src/host/ui/session_setup/state/parsers/dlt.rs similarity index 100% rename from application/apps/indexer/gui/application/src/host/ui/session_setup/state/parsers/dlt.rs rename to crates/chipmunk-app/src/host/ui/session_setup/state/parsers/dlt.rs diff --git a/application/apps/indexer/gui/application/src/host/ui/session_setup/state/parsers/mod.rs b/crates/chipmunk-app/src/host/ui/session_setup/state/parsers/mod.rs similarity index 100% rename from application/apps/indexer/gui/application/src/host/ui/session_setup/state/parsers/mod.rs rename to crates/chipmunk-app/src/host/ui/session_setup/state/parsers/mod.rs diff --git a/application/apps/indexer/gui/application/src/host/ui/session_setup/state/parsers/plugins.rs b/crates/chipmunk-app/src/host/ui/session_setup/state/parsers/plugins.rs similarity index 100% rename from application/apps/indexer/gui/application/src/host/ui/session_setup/state/parsers/plugins.rs rename to crates/chipmunk-app/src/host/ui/session_setup/state/parsers/plugins.rs diff --git a/application/apps/indexer/gui/application/src/host/ui/session_setup/state/parsers/someip.rs b/crates/chipmunk-app/src/host/ui/session_setup/state/parsers/someip.rs similarity index 100% rename from application/apps/indexer/gui/application/src/host/ui/session_setup/state/parsers/someip.rs rename to crates/chipmunk-app/src/host/ui/session_setup/state/parsers/someip.rs diff --git a/application/apps/indexer/gui/application/src/host/ui/session_setup/state/sources/file.rs b/crates/chipmunk-app/src/host/ui/session_setup/state/sources/file.rs similarity index 100% rename from application/apps/indexer/gui/application/src/host/ui/session_setup/state/sources/file.rs rename to crates/chipmunk-app/src/host/ui/session_setup/state/sources/file.rs diff --git a/application/apps/indexer/gui/application/src/host/ui/session_setup/state/sources/mod.rs b/crates/chipmunk-app/src/host/ui/session_setup/state/sources/mod.rs similarity index 100% rename from application/apps/indexer/gui/application/src/host/ui/session_setup/state/sources/mod.rs rename to crates/chipmunk-app/src/host/ui/session_setup/state/sources/mod.rs diff --git a/application/apps/indexer/gui/application/src/host/ui/session_setup/state/sources/process.rs b/crates/chipmunk-app/src/host/ui/session_setup/state/sources/process.rs similarity index 100% rename from application/apps/indexer/gui/application/src/host/ui/session_setup/state/sources/process.rs rename to crates/chipmunk-app/src/host/ui/session_setup/state/sources/process.rs diff --git a/application/apps/indexer/gui/application/src/host/ui/session_setup/state/sources/serial.rs b/crates/chipmunk-app/src/host/ui/session_setup/state/sources/serial.rs similarity index 100% rename from application/apps/indexer/gui/application/src/host/ui/session_setup/state/sources/serial.rs rename to crates/chipmunk-app/src/host/ui/session_setup/state/sources/serial.rs diff --git a/application/apps/indexer/gui/application/src/host/ui/session_setup/state/sources/tcp.rs b/crates/chipmunk-app/src/host/ui/session_setup/state/sources/tcp.rs similarity index 100% rename from application/apps/indexer/gui/application/src/host/ui/session_setup/state/sources/tcp.rs rename to crates/chipmunk-app/src/host/ui/session_setup/state/sources/tcp.rs diff --git a/application/apps/indexer/gui/application/src/host/ui/session_setup/state/sources/udp.rs b/crates/chipmunk-app/src/host/ui/session_setup/state/sources/udp.rs similarity index 100% rename from application/apps/indexer/gui/application/src/host/ui/session_setup/state/sources/udp.rs rename to crates/chipmunk-app/src/host/ui/session_setup/state/sources/udp.rs diff --git a/application/apps/indexer/gui/application/src/host/ui/shortcuts/definitions.rs b/crates/chipmunk-app/src/host/ui/shortcuts/definitions.rs similarity index 100% rename from application/apps/indexer/gui/application/src/host/ui/shortcuts/definitions.rs rename to crates/chipmunk-app/src/host/ui/shortcuts/definitions.rs diff --git a/application/apps/indexer/gui/application/src/host/ui/shortcuts/handler.rs b/crates/chipmunk-app/src/host/ui/shortcuts/handler.rs similarity index 100% rename from application/apps/indexer/gui/application/src/host/ui/shortcuts/handler.rs rename to crates/chipmunk-app/src/host/ui/shortcuts/handler.rs diff --git a/application/apps/indexer/gui/application/src/host/ui/shortcuts/matching.rs b/crates/chipmunk-app/src/host/ui/shortcuts/matching.rs similarity index 100% rename from application/apps/indexer/gui/application/src/host/ui/shortcuts/matching.rs rename to crates/chipmunk-app/src/host/ui/shortcuts/matching.rs diff --git a/application/apps/indexer/gui/application/src/host/ui/shortcuts/mod.rs b/crates/chipmunk-app/src/host/ui/shortcuts/mod.rs similarity index 100% rename from application/apps/indexer/gui/application/src/host/ui/shortcuts/mod.rs rename to crates/chipmunk-app/src/host/ui/shortcuts/mod.rs diff --git a/application/apps/indexer/gui/application/src/host/ui/shortcuts/modal.rs b/crates/chipmunk-app/src/host/ui/shortcuts/modal.rs similarity index 100% rename from application/apps/indexer/gui/application/src/host/ui/shortcuts/modal.rs rename to crates/chipmunk-app/src/host/ui/shortcuts/modal.rs diff --git a/application/apps/indexer/gui/application/src/host/ui/shortcuts/state.rs b/crates/chipmunk-app/src/host/ui/shortcuts/state.rs similarity index 100% rename from application/apps/indexer/gui/application/src/host/ui/shortcuts/state.rs rename to crates/chipmunk-app/src/host/ui/shortcuts/state.rs diff --git a/application/apps/indexer/gui/application/src/host/ui/state/info.rs b/crates/chipmunk-app/src/host/ui/state/info.rs similarity index 100% rename from application/apps/indexer/gui/application/src/host/ui/state/info.rs rename to crates/chipmunk-app/src/host/ui/state/info.rs diff --git a/application/apps/indexer/gui/application/src/host/ui/state/mod.rs b/crates/chipmunk-app/src/host/ui/state/mod.rs similarity index 100% rename from application/apps/indexer/gui/application/src/host/ui/state/mod.rs rename to crates/chipmunk-app/src/host/ui/state/mod.rs diff --git a/application/apps/indexer/gui/application/src/host/ui/state/modal.rs b/crates/chipmunk-app/src/host/ui/state/modal.rs similarity index 100% rename from application/apps/indexer/gui/application/src/host/ui/state/modal.rs rename to crates/chipmunk-app/src/host/ui/state/modal.rs diff --git a/application/apps/indexer/gui/application/src/host/ui/state/plugin/mod.rs b/crates/chipmunk-app/src/host/ui/state/plugin/mod.rs similarity index 100% rename from application/apps/indexer/gui/application/src/host/ui/state/plugin/mod.rs rename to crates/chipmunk-app/src/host/ui/state/plugin/mod.rs diff --git a/application/apps/indexer/gui/application/src/host/ui/state/preferences.rs b/crates/chipmunk-app/src/host/ui/state/preferences.rs similarity index 100% rename from application/apps/indexer/gui/application/src/host/ui/state/preferences.rs rename to crates/chipmunk-app/src/host/ui/state/preferences.rs diff --git a/application/apps/indexer/gui/application/src/host/ui/state/presets.rs b/crates/chipmunk-app/src/host/ui/state/presets.rs similarity index 100% rename from application/apps/indexer/gui/application/src/host/ui/state/presets.rs rename to crates/chipmunk-app/src/host/ui/state/presets.rs diff --git a/application/apps/indexer/gui/application/src/host/ui/state/version.rs b/crates/chipmunk-app/src/host/ui/state/version.rs similarity index 100% rename from application/apps/indexer/gui/application/src/host/ui/state/version.rs rename to crates/chipmunk-app/src/host/ui/state/version.rs diff --git a/application/apps/indexer/gui/application/src/host/ui/storage/file_explorer.rs b/crates/chipmunk-app/src/host/ui/storage/file_explorer.rs similarity index 100% rename from application/apps/indexer/gui/application/src/host/ui/storage/file_explorer.rs rename to crates/chipmunk-app/src/host/ui/storage/file_explorer.rs diff --git a/application/apps/indexer/gui/application/src/host/ui/storage/mod.rs b/crates/chipmunk-app/src/host/ui/storage/mod.rs similarity index 100% rename from application/apps/indexer/gui/application/src/host/ui/storage/mod.rs rename to crates/chipmunk-app/src/host/ui/storage/mod.rs diff --git a/application/apps/indexer/gui/application/src/host/ui/storage/recent/mod.rs b/crates/chipmunk-app/src/host/ui/storage/recent/mod.rs similarity index 100% rename from application/apps/indexer/gui/application/src/host/ui/storage/recent/mod.rs rename to crates/chipmunk-app/src/host/ui/storage/recent/mod.rs diff --git a/application/apps/indexer/gui/application/src/host/ui/storage/recent/session.rs b/crates/chipmunk-app/src/host/ui/storage/recent/session.rs similarity index 100% rename from application/apps/indexer/gui/application/src/host/ui/storage/recent/session.rs rename to crates/chipmunk-app/src/host/ui/storage/recent/session.rs diff --git a/application/apps/indexer/gui/application/src/host/ui/storage/recent/source_key.rs b/crates/chipmunk-app/src/host/ui/storage/recent/source_key.rs similarity index 100% rename from application/apps/indexer/gui/application/src/host/ui/storage/recent/source_key.rs rename to crates/chipmunk-app/src/host/ui/storage/recent/source_key.rs diff --git a/application/apps/indexer/gui/application/src/host/ui/storage/recent/storage.rs b/crates/chipmunk-app/src/host/ui/storage/recent/storage.rs similarity index 100% rename from application/apps/indexer/gui/application/src/host/ui/storage/recent/storage.rs rename to crates/chipmunk-app/src/host/ui/storage/recent/storage.rs diff --git a/application/apps/indexer/gui/application/src/host/ui/storage/recent/validation.rs b/crates/chipmunk-app/src/host/ui/storage/recent/validation.rs similarity index 100% rename from application/apps/indexer/gui/application/src/host/ui/storage/recent/validation.rs rename to crates/chipmunk-app/src/host/ui/storage/recent/validation.rs diff --git a/application/apps/indexer/gui/application/src/host/ui/storage/settings.rs b/crates/chipmunk-app/src/host/ui/storage/settings.rs similarity index 100% rename from application/apps/indexer/gui/application/src/host/ui/storage/settings.rs rename to crates/chipmunk-app/src/host/ui/storage/settings.rs diff --git a/application/apps/indexer/gui/application/src/host/ui/storage/types.rs b/crates/chipmunk-app/src/host/ui/storage/types.rs similarity index 100% rename from application/apps/indexer/gui/application/src/host/ui/storage/types.rs rename to crates/chipmunk-app/src/host/ui/storage/types.rs diff --git a/application/apps/indexer/gui/application/src/host/ui/tabs/mod.rs b/crates/chipmunk-app/src/host/ui/tabs/mod.rs similarity index 100% rename from application/apps/indexer/gui/application/src/host/ui/tabs/mod.rs rename to crates/chipmunk-app/src/host/ui/tabs/mod.rs diff --git a/application/apps/indexer/gui/application/src/host/ui/tabs/render.rs b/crates/chipmunk-app/src/host/ui/tabs/render.rs similarity index 100% rename from application/apps/indexer/gui/application/src/host/ui/tabs/render.rs rename to crates/chipmunk-app/src/host/ui/tabs/render.rs diff --git a/application/apps/indexer/gui/application/src/lib.rs b/crates/chipmunk-app/src/lib.rs similarity index 100% rename from application/apps/indexer/gui/application/src/lib.rs rename to crates/chipmunk-app/src/lib.rs diff --git a/application/apps/indexer/gui/application/src/main.rs b/crates/chipmunk-app/src/main.rs similarity index 56% rename from application/apps/indexer/gui/application/src/main.rs rename to crates/chipmunk-app/src/main.rs index 0a144f1006..6a246c762a 100644 --- a/application/apps/indexer/gui/application/src/main.rs +++ b/crates/chipmunk-app/src/main.rs @@ -1,3 +1,3 @@ fn main() -> anyhow::Result<()> { - application::run_app() + chipmunk_app::run_app() } diff --git a/application/apps/indexer/gui/application/src/session/command.rs b/crates/chipmunk-app/src/session/command.rs similarity index 100% rename from application/apps/indexer/gui/application/src/session/command.rs rename to crates/chipmunk-app/src/session/command.rs diff --git a/application/apps/indexer/gui/application/src/session/common/mod.rs b/crates/chipmunk-app/src/session/common/mod.rs similarity index 100% rename from application/apps/indexer/gui/application/src/session/common/mod.rs rename to crates/chipmunk-app/src/session/common/mod.rs diff --git a/application/apps/indexer/gui/application/src/session/common/search_results_tab.rs b/crates/chipmunk-app/src/session/common/search_results_tab.rs similarity index 100% rename from application/apps/indexer/gui/application/src/session/common/search_results_tab.rs rename to crates/chipmunk-app/src/session/common/search_results_tab.rs diff --git a/application/apps/indexer/gui/application/src/session/communication.rs b/crates/chipmunk-app/src/session/communication.rs similarity index 100% rename from application/apps/indexer/gui/application/src/session/communication.rs rename to crates/chipmunk-app/src/session/communication.rs diff --git a/application/apps/indexer/gui/application/src/session/error.rs b/crates/chipmunk-app/src/session/error.rs similarity index 100% rename from application/apps/indexer/gui/application/src/session/error.rs rename to crates/chipmunk-app/src/session/error.rs diff --git a/application/apps/indexer/gui/application/src/session/message.rs b/crates/chipmunk-app/src/session/message.rs similarity index 100% rename from application/apps/indexer/gui/application/src/session/message.rs rename to crates/chipmunk-app/src/session/message.rs diff --git a/application/apps/indexer/gui/application/src/session/mod.rs b/crates/chipmunk-app/src/session/mod.rs similarity index 100% rename from application/apps/indexer/gui/application/src/session/mod.rs rename to crates/chipmunk-app/src/session/mod.rs diff --git a/application/apps/indexer/gui/application/src/session/service/export.rs b/crates/chipmunk-app/src/session/service/export.rs similarity index 100% rename from application/apps/indexer/gui/application/src/session/service/export.rs rename to crates/chipmunk-app/src/session/service/export.rs diff --git a/application/apps/indexer/gui/application/src/session/service/mod.rs b/crates/chipmunk-app/src/session/service/mod.rs similarity index 100% rename from application/apps/indexer/gui/application/src/session/service/mod.rs rename to crates/chipmunk-app/src/session/service/mod.rs diff --git a/application/apps/indexer/gui/application/src/session/service/tracker.rs b/crates/chipmunk-app/src/session/service/tracker.rs similarity index 100% rename from application/apps/indexer/gui/application/src/session/service/tracker.rs rename to crates/chipmunk-app/src/session/service/tracker.rs diff --git a/application/apps/indexer/gui/application/src/session/types/attachment.rs b/crates/chipmunk-app/src/session/types/attachment.rs similarity index 100% rename from application/apps/indexer/gui/application/src/session/types/attachment.rs rename to crates/chipmunk-app/src/session/types/attachment.rs diff --git a/application/apps/indexer/gui/application/src/session/types/mod.rs b/crates/chipmunk-app/src/session/types/mod.rs similarity index 100% rename from application/apps/indexer/gui/application/src/session/types/mod.rs rename to crates/chipmunk-app/src/session/types/mod.rs diff --git a/application/apps/indexer/gui/application/src/session/ui/attachment_modal.rs b/crates/chipmunk-app/src/session/ui/attachment_modal.rs similarity index 100% rename from application/apps/indexer/gui/application/src/session/ui/attachment_modal.rs rename to crates/chipmunk-app/src/session/ui/attachment_modal.rs diff --git a/application/apps/indexer/gui/application/src/session/ui/bottom_panel/chart/data.rs b/crates/chipmunk-app/src/session/ui/bottom_panel/chart/data.rs similarity index 100% rename from application/apps/indexer/gui/application/src/session/ui/bottom_panel/chart/data.rs rename to crates/chipmunk-app/src/session/ui/bottom_panel/chart/data.rs diff --git a/application/apps/indexer/gui/application/src/session/ui/bottom_panel/chart/mod.rs b/crates/chipmunk-app/src/session/ui/bottom_panel/chart/mod.rs similarity index 100% rename from application/apps/indexer/gui/application/src/session/ui/bottom_panel/chart/mod.rs rename to crates/chipmunk-app/src/session/ui/bottom_panel/chart/mod.rs diff --git a/application/apps/indexer/gui/application/src/session/ui/bottom_panel/details/mod.rs b/crates/chipmunk-app/src/session/ui/bottom_panel/details/mod.rs similarity index 100% rename from application/apps/indexer/gui/application/src/session/ui/bottom_panel/details/mod.rs rename to crates/chipmunk-app/src/session/ui/bottom_panel/details/mod.rs diff --git a/application/apps/indexer/gui/application/src/session/ui/bottom_panel/library/mod.rs b/crates/chipmunk-app/src/session/ui/bottom_panel/library/mod.rs similarity index 100% rename from application/apps/indexer/gui/application/src/session/ui/bottom_panel/library/mod.rs rename to crates/chipmunk-app/src/session/ui/bottom_panel/library/mod.rs diff --git a/application/apps/indexer/gui/application/src/session/ui/bottom_panel/mod.rs b/crates/chipmunk-app/src/session/ui/bottom_panel/mod.rs similarity index 100% rename from application/apps/indexer/gui/application/src/session/ui/bottom_panel/mod.rs rename to crates/chipmunk-app/src/session/ui/bottom_panel/mod.rs diff --git a/application/apps/indexer/gui/application/src/session/ui/bottom_panel/presets/mod.rs b/crates/chipmunk-app/src/session/ui/bottom_panel/presets/mod.rs similarity index 100% rename from application/apps/indexer/gui/application/src/session/ui/bottom_panel/presets/mod.rs rename to crates/chipmunk-app/src/session/ui/bottom_panel/presets/mod.rs diff --git a/application/apps/indexer/gui/application/src/session/ui/bottom_panel/presets/query.rs b/crates/chipmunk-app/src/session/ui/bottom_panel/presets/query.rs similarity index 100% rename from application/apps/indexer/gui/application/src/session/ui/bottom_panel/presets/query.rs rename to crates/chipmunk-app/src/session/ui/bottom_panel/presets/query.rs diff --git a/application/apps/indexer/gui/application/src/session/ui/bottom_panel/presets/render.rs b/crates/chipmunk-app/src/session/ui/bottom_panel/presets/render.rs similarity index 100% rename from application/apps/indexer/gui/application/src/session/ui/bottom_panel/presets/render.rs rename to crates/chipmunk-app/src/session/ui/bottom_panel/presets/render.rs diff --git a/application/apps/indexer/gui/application/src/session/ui/bottom_panel/search/mod.rs b/crates/chipmunk-app/src/session/ui/bottom_panel/search/mod.rs similarity index 100% rename from application/apps/indexer/gui/application/src/session/ui/bottom_panel/search/mod.rs rename to crates/chipmunk-app/src/session/ui/bottom_panel/search/mod.rs diff --git a/application/apps/indexer/gui/application/src/session/ui/bottom_panel/search/search_bar.rs b/crates/chipmunk-app/src/session/ui/bottom_panel/search/search_bar.rs similarity index 100% rename from application/apps/indexer/gui/application/src/session/ui/bottom_panel/search/search_bar.rs rename to crates/chipmunk-app/src/session/ui/bottom_panel/search/search_bar.rs diff --git a/application/apps/indexer/gui/application/src/session/ui/bottom_panel/search/search_table.rs b/crates/chipmunk-app/src/session/ui/bottom_panel/search/search_table.rs similarity index 100% rename from application/apps/indexer/gui/application/src/session/ui/bottom_panel/search/search_table.rs rename to crates/chipmunk-app/src/session/ui/bottom_panel/search/search_table.rs diff --git a/application/apps/indexer/gui/application/src/session/ui/bottom_panel/tab_types.rs b/crates/chipmunk-app/src/session/ui/bottom_panel/tab_types.rs similarity index 100% rename from application/apps/indexer/gui/application/src/session/ui/bottom_panel/tab_types.rs rename to crates/chipmunk-app/src/session/ui/bottom_panel/tab_types.rs diff --git a/application/apps/indexer/gui/application/src/session/ui/common/ansi_text.rs b/crates/chipmunk-app/src/session/ui/common/ansi_text.rs similarity index 100% rename from application/apps/indexer/gui/application/src/session/ui/common/ansi_text.rs rename to crates/chipmunk-app/src/session/ui/common/ansi_text.rs diff --git a/application/apps/indexer/gui/application/src/session/ui/common/log_table/mod.rs b/crates/chipmunk-app/src/session/ui/common/log_table/mod.rs similarity index 100% rename from application/apps/indexer/gui/application/src/session/ui/common/log_table/mod.rs rename to crates/chipmunk-app/src/session/ui/common/log_table/mod.rs diff --git a/application/apps/indexer/gui/application/src/session/ui/common/log_table/table.rs b/crates/chipmunk-app/src/session/ui/common/log_table/table.rs similarity index 100% rename from application/apps/indexer/gui/application/src/session/ui/common/log_table/table.rs rename to crates/chipmunk-app/src/session/ui/common/log_table/table.rs diff --git a/application/apps/indexer/gui/application/src/session/ui/common/log_table/text.rs b/crates/chipmunk-app/src/session/ui/common/log_table/text.rs similarity index 100% rename from application/apps/indexer/gui/application/src/session/ui/common/log_table/text.rs rename to crates/chipmunk-app/src/session/ui/common/log_table/text.rs diff --git a/application/apps/indexer/gui/application/src/session/ui/common/logs_mapped.rs b/crates/chipmunk-app/src/session/ui/common/logs_mapped.rs similarity index 100% rename from application/apps/indexer/gui/application/src/session/ui/common/logs_mapped.rs rename to crates/chipmunk-app/src/session/ui/common/logs_mapped.rs diff --git a/application/apps/indexer/gui/application/src/session/ui/common/mod.rs b/crates/chipmunk-app/src/session/ui/common/mod.rs similarity index 100% rename from application/apps/indexer/gui/application/src/session/ui/common/mod.rs rename to crates/chipmunk-app/src/session/ui/common/mod.rs diff --git a/application/apps/indexer/gui/application/src/session/ui/definitions/mod.rs b/crates/chipmunk-app/src/session/ui/definitions/mod.rs similarity index 100% rename from application/apps/indexer/gui/application/src/session/ui/definitions/mod.rs rename to crates/chipmunk-app/src/session/ui/definitions/mod.rs diff --git a/application/apps/indexer/gui/application/src/session/ui/definitions/schema/dlt.rs b/crates/chipmunk-app/src/session/ui/definitions/schema/dlt.rs similarity index 100% rename from application/apps/indexer/gui/application/src/session/ui/definitions/schema/dlt.rs rename to crates/chipmunk-app/src/session/ui/definitions/schema/dlt.rs diff --git a/application/apps/indexer/gui/application/src/session/ui/definitions/schema/mod.rs b/crates/chipmunk-app/src/session/ui/definitions/schema/mod.rs similarity index 100% rename from application/apps/indexer/gui/application/src/session/ui/definitions/schema/mod.rs rename to crates/chipmunk-app/src/session/ui/definitions/schema/mod.rs diff --git a/application/apps/indexer/gui/application/src/session/ui/definitions/schema/plugins.rs b/crates/chipmunk-app/src/session/ui/definitions/schema/plugins.rs similarity index 100% rename from application/apps/indexer/gui/application/src/session/ui/definitions/schema/plugins.rs rename to crates/chipmunk-app/src/session/ui/definitions/schema/plugins.rs diff --git a/application/apps/indexer/gui/application/src/session/ui/definitions/schema/someip.rs b/crates/chipmunk-app/src/session/ui/definitions/schema/someip.rs similarity index 100% rename from application/apps/indexer/gui/application/src/session/ui/definitions/schema/someip.rs rename to crates/chipmunk-app/src/session/ui/definitions/schema/someip.rs diff --git a/application/apps/indexer/gui/application/src/session/ui/definitions/schema/text.rs b/crates/chipmunk-app/src/session/ui/definitions/schema/text.rs similarity index 100% rename from application/apps/indexer/gui/application/src/session/ui/definitions/schema/text.rs rename to crates/chipmunk-app/src/session/ui/definitions/schema/text.rs diff --git a/application/apps/indexer/gui/application/src/session/ui/export_modal.rs b/crates/chipmunk-app/src/session/ui/export_modal.rs similarity index 100% rename from application/apps/indexer/gui/application/src/session/ui/export_modal.rs rename to crates/chipmunk-app/src/session/ui/export_modal.rs diff --git a/application/apps/indexer/gui/application/src/session/ui/logs_table/mod.rs b/crates/chipmunk-app/src/session/ui/logs_table/mod.rs similarity index 100% rename from application/apps/indexer/gui/application/src/session/ui/logs_table/mod.rs rename to crates/chipmunk-app/src/session/ui/logs_table/mod.rs diff --git a/application/apps/indexer/gui/application/src/session/ui/mod.rs b/crates/chipmunk-app/src/session/ui/mod.rs similarity index 100% rename from application/apps/indexer/gui/application/src/session/ui/mod.rs rename to crates/chipmunk-app/src/session/ui/mod.rs diff --git a/application/apps/indexer/gui/application/src/session/ui/recent.rs b/crates/chipmunk-app/src/session/ui/recent.rs similarity index 100% rename from application/apps/indexer/gui/application/src/session/ui/recent.rs rename to crates/chipmunk-app/src/session/ui/recent.rs diff --git a/application/apps/indexer/gui/application/src/session/ui/shared/attachments.rs b/crates/chipmunk-app/src/session/ui/shared/attachments.rs similarity index 100% rename from application/apps/indexer/gui/application/src/session/ui/shared/attachments.rs rename to crates/chipmunk-app/src/session/ui/shared/attachments.rs diff --git a/application/apps/indexer/gui/application/src/session/ui/shared/export/file_dialog.rs b/crates/chipmunk-app/src/session/ui/shared/export/file_dialog.rs similarity index 100% rename from application/apps/indexer/gui/application/src/session/ui/shared/export/file_dialog.rs rename to crates/chipmunk-app/src/session/ui/shared/export/file_dialog.rs diff --git a/application/apps/indexer/gui/application/src/session/ui/shared/export/mod.rs b/crates/chipmunk-app/src/session/ui/shared/export/mod.rs similarity index 100% rename from application/apps/indexer/gui/application/src/session/ui/shared/export/mod.rs rename to crates/chipmunk-app/src/session/ui/shared/export/mod.rs diff --git a/application/apps/indexer/gui/application/src/session/ui/shared/export/modal.rs b/crates/chipmunk-app/src/session/ui/shared/export/modal.rs similarity index 100% rename from application/apps/indexer/gui/application/src/session/ui/shared/export/modal.rs rename to crates/chipmunk-app/src/session/ui/shared/export/modal.rs diff --git a/application/apps/indexer/gui/application/src/session/ui/shared/info.rs b/crates/chipmunk-app/src/session/ui/shared/info.rs similarity index 100% rename from application/apps/indexer/gui/application/src/session/ui/shared/info.rs rename to crates/chipmunk-app/src/session/ui/shared/info.rs diff --git a/application/apps/indexer/gui/application/src/session/ui/shared/logs.rs b/crates/chipmunk-app/src/session/ui/shared/logs.rs similarity index 100% rename from application/apps/indexer/gui/application/src/session/ui/shared/logs.rs rename to crates/chipmunk-app/src/session/ui/shared/logs.rs diff --git a/application/apps/indexer/gui/application/src/session/ui/shared/mod.rs b/crates/chipmunk-app/src/session/ui/shared/mod.rs similarity index 100% rename from application/apps/indexer/gui/application/src/session/ui/shared/mod.rs rename to crates/chipmunk-app/src/session/ui/shared/mod.rs diff --git a/application/apps/indexer/gui/application/src/session/ui/shared/observe.rs b/crates/chipmunk-app/src/session/ui/shared/observe.rs similarity index 100% rename from application/apps/indexer/gui/application/src/session/ui/shared/observe.rs rename to crates/chipmunk-app/src/session/ui/shared/observe.rs diff --git a/application/apps/indexer/gui/application/src/session/ui/shared/searching/filters.rs b/crates/chipmunk-app/src/session/ui/shared/searching/filters.rs similarity index 100% rename from application/apps/indexer/gui/application/src/session/ui/shared/searching/filters.rs rename to crates/chipmunk-app/src/session/ui/shared/searching/filters.rs diff --git a/application/apps/indexer/gui/application/src/session/ui/shared/searching/mod.rs b/crates/chipmunk-app/src/session/ui/shared/searching/mod.rs similarity index 100% rename from application/apps/indexer/gui/application/src/session/ui/shared/searching/mod.rs rename to crates/chipmunk-app/src/session/ui/shared/searching/mod.rs diff --git a/application/apps/indexer/gui/application/src/session/ui/shared/searching/search.rs b/crates/chipmunk-app/src/session/ui/shared/searching/search.rs similarity index 100% rename from application/apps/indexer/gui/application/src/session/ui/shared/searching/search.rs rename to crates/chipmunk-app/src/session/ui/shared/searching/search.rs diff --git a/application/apps/indexer/gui/application/src/session/ui/shared/searching/search_values.rs b/crates/chipmunk-app/src/session/ui/shared/searching/search_values.rs similarity index 100% rename from application/apps/indexer/gui/application/src/session/ui/shared/searching/search_values.rs rename to crates/chipmunk-app/src/session/ui/shared/searching/search_values.rs diff --git a/application/apps/indexer/gui/application/src/session/ui/shared/signal.rs b/crates/chipmunk-app/src/session/ui/shared/signal.rs similarity index 100% rename from application/apps/indexer/gui/application/src/session/ui/shared/signal.rs rename to crates/chipmunk-app/src/session/ui/shared/signal.rs diff --git a/application/apps/indexer/gui/application/src/session/ui/shared/view.rs b/crates/chipmunk-app/src/session/ui/shared/view.rs similarity index 100% rename from application/apps/indexer/gui/application/src/session/ui/shared/view.rs rename to crates/chipmunk-app/src/session/ui/shared/view.rs diff --git a/application/apps/indexer/gui/application/src/session/ui/shortcuts.rs b/crates/chipmunk-app/src/session/ui/shortcuts.rs similarity index 100% rename from application/apps/indexer/gui/application/src/session/ui/shortcuts.rs rename to crates/chipmunk-app/src/session/ui/shortcuts.rs diff --git a/application/apps/indexer/gui/application/src/session/ui/side_panel/attachments.rs b/crates/chipmunk-app/src/session/ui/side_panel/attachments.rs similarity index 100% rename from application/apps/indexer/gui/application/src/session/ui/side_panel/attachments.rs rename to crates/chipmunk-app/src/session/ui/side_panel/attachments.rs diff --git a/application/apps/indexer/gui/application/src/session/ui/side_panel/filters.rs b/crates/chipmunk-app/src/session/ui/side_panel/filters.rs similarity index 100% rename from application/apps/indexer/gui/application/src/session/ui/side_panel/filters.rs rename to crates/chipmunk-app/src/session/ui/side_panel/filters.rs diff --git a/application/apps/indexer/gui/application/src/session/ui/side_panel/mod.rs b/crates/chipmunk-app/src/session/ui/side_panel/mod.rs similarity index 100% rename from application/apps/indexer/gui/application/src/session/ui/side_panel/mod.rs rename to crates/chipmunk-app/src/session/ui/side_panel/mod.rs diff --git a/application/apps/indexer/gui/application/src/session/ui/side_panel/observing/file.rs b/crates/chipmunk-app/src/session/ui/side_panel/observing/file.rs similarity index 100% rename from application/apps/indexer/gui/application/src/session/ui/side_panel/observing/file.rs rename to crates/chipmunk-app/src/session/ui/side_panel/observing/file.rs diff --git a/application/apps/indexer/gui/application/src/session/ui/side_panel/observing/mod.rs b/crates/chipmunk-app/src/session/ui/side_panel/observing/mod.rs similarity index 100% rename from application/apps/indexer/gui/application/src/session/ui/side_panel/observing/mod.rs rename to crates/chipmunk-app/src/session/ui/side_panel/observing/mod.rs diff --git a/application/apps/indexer/gui/application/src/session/ui/side_panel/observing/process.rs b/crates/chipmunk-app/src/session/ui/side_panel/observing/process.rs similarity index 100% rename from application/apps/indexer/gui/application/src/session/ui/side_panel/observing/process.rs rename to crates/chipmunk-app/src/session/ui/side_panel/observing/process.rs diff --git a/application/apps/indexer/gui/application/src/session/ui/side_panel/observing/serial.rs b/crates/chipmunk-app/src/session/ui/side_panel/observing/serial.rs similarity index 100% rename from application/apps/indexer/gui/application/src/session/ui/side_panel/observing/serial.rs rename to crates/chipmunk-app/src/session/ui/side_panel/observing/serial.rs diff --git a/application/apps/indexer/gui/application/src/session/ui/side_panel/observing/tcp.rs b/crates/chipmunk-app/src/session/ui/side_panel/observing/tcp.rs similarity index 100% rename from application/apps/indexer/gui/application/src/session/ui/side_panel/observing/tcp.rs rename to crates/chipmunk-app/src/session/ui/side_panel/observing/tcp.rs diff --git a/application/apps/indexer/gui/application/src/session/ui/side_panel/observing/udp.rs b/crates/chipmunk-app/src/session/ui/side_panel/observing/udp.rs similarity index 100% rename from application/apps/indexer/gui/application/src/session/ui/side_panel/observing/udp.rs rename to crates/chipmunk-app/src/session/ui/side_panel/observing/udp.rs diff --git a/application/apps/indexer/gui/application/src/session/ui/side_panel/types.rs b/crates/chipmunk-app/src/session/ui/side_panel/types.rs similarity index 100% rename from application/apps/indexer/gui/application/src/session/ui/side_panel/types.rs rename to crates/chipmunk-app/src/session/ui/side_panel/types.rs diff --git a/application/apps/indexer/gui/application/src/session/ui/status_bar.rs b/crates/chipmunk-app/src/session/ui/status_bar.rs similarity index 100% rename from application/apps/indexer/gui/application/src/session/ui/status_bar.rs rename to crates/chipmunk-app/src/session/ui/status_bar.rs diff --git a/application/apps/indexer/gui/application/testdata/presets_io/filters_1.json b/crates/chipmunk-app/testdata/presets_io/filters_1.json similarity index 100% rename from application/apps/indexer/gui/application/testdata/presets_io/filters_1.json rename to crates/chipmunk-app/testdata/presets_io/filters_1.json diff --git a/application/apps/indexer/gui/application/testdata/presets_io/multiple_presets_1.json b/crates/chipmunk-app/testdata/presets_io/multiple_presets_1.json similarity index 100% rename from application/apps/indexer/gui/application/testdata/presets_io/multiple_presets_1.json rename to crates/chipmunk-app/testdata/presets_io/multiple_presets_1.json diff --git a/application/apps/indexer/gui/application/testdata/presets_io/one_preset_1.json b/crates/chipmunk-app/testdata/presets_io/one_preset_1.json similarity index 100% rename from application/apps/indexer/gui/application/testdata/presets_io/one_preset_1.json rename to crates/chipmunk-app/testdata/presets_io/one_preset_1.json diff --git a/application/apps/indexer/gui/application/testdata/presets_io/preset_chart_only.json b/crates/chipmunk-app/testdata/presets_io/preset_chart_only.json similarity index 100% rename from application/apps/indexer/gui/application/testdata/presets_io/preset_chart_only.json rename to crates/chipmunk-app/testdata/presets_io/preset_chart_only.json diff --git a/application/apps/indexer/gui/application/testdata/presets_io/presets_filter_only.json b/crates/chipmunk-app/testdata/presets_io/presets_filter_only.json similarity index 100% rename from application/apps/indexer/gui/application/testdata/presets_io/presets_filter_only.json rename to crates/chipmunk-app/testdata/presets_io/presets_filter_only.json diff --git a/application/apps/indexer/gui/application/testdata/presets_io/presets_same_name.json b/crates/chipmunk-app/testdata/presets_io/presets_same_name.json similarity index 100% rename from application/apps/indexer/gui/application/testdata/presets_io/presets_same_name.json rename to crates/chipmunk-app/testdata/presets_io/presets_same_name.json diff --git a/application/apps/indexer/gui/application/testdata/presets_io/same_as_filters_1_as_preset.json b/crates/chipmunk-app/testdata/presets_io/same_as_filters_1_as_preset.json similarity index 100% rename from application/apps/indexer/gui/application/testdata/presets_io/same_as_filters_1_as_preset.json rename to crates/chipmunk-app/testdata/presets_io/same_as_filters_1_as_preset.json diff --git a/cli/chipmunk-cli/CHANGELOG.md b/crates/chipmunk-cli/CHANGELOG.md similarity index 100% rename from cli/chipmunk-cli/CHANGELOG.md rename to crates/chipmunk-cli/CHANGELOG.md diff --git a/crates/chipmunk-cli/Cargo.toml b/crates/chipmunk-cli/Cargo.toml new file mode 100644 index 0000000000..b158e1f570 --- /dev/null +++ b/crates/chipmunk-cli/Cargo.toml @@ -0,0 +1,21 @@ +[package] +name = "chipmunk-cli" +version = "0.2.2" +authors = ["Ammar Abou Zor "] +edition = "2024" +description = "CLI Tool for parsing bytes form different source supporting multiple data formats" +documentation = "README.md" +readme = "README.md" + +[dependencies] +# Internal crates +parsers.workspace = true +sources.workspace = true +processor.workspace = true + +# External crates +anyhow.workspace = true +clap.workspace = true +tokio.workspace = true +futures.workspace = true +tokio-util.workspace = true diff --git a/cli/chipmunk-cli/README.md b/crates/chipmunk-cli/README.md similarity index 97% rename from cli/chipmunk-cli/README.md rename to crates/chipmunk-cli/README.md index d77a3dd2ae..5f97dac134 100644 --- a/cli/chipmunk-cli/README.md +++ b/crates/chipmunk-cli/README.md @@ -28,7 +28,7 @@ Ensure that **Rust** is installed on your system. If not, follow the official in Navigate to the root directory of the Chipmunk repository in your terminal and run: -`cargo install --path cli/chipmunk-cli` +`cargo install --path crates/chipmunk-cli` This command installs the `chipmunk-cli` tool, allowing you to execute parsing tasks using various parsers and input sources. diff --git a/cli/chipmunk-cli/src/cli_args/mod.rs b/crates/chipmunk-cli/src/cli_args/mod.rs similarity index 100% rename from cli/chipmunk-cli/src/cli_args/mod.rs rename to crates/chipmunk-cli/src/cli_args/mod.rs diff --git a/cli/chipmunk-cli/src/lib.rs b/crates/chipmunk-cli/src/lib.rs similarity index 100% rename from cli/chipmunk-cli/src/lib.rs rename to crates/chipmunk-cli/src/lib.rs diff --git a/cli/chipmunk-cli/src/main.rs b/crates/chipmunk-cli/src/main.rs similarity index 100% rename from cli/chipmunk-cli/src/main.rs rename to crates/chipmunk-cli/src/main.rs diff --git a/cli/chipmunk-cli/src/session/file.rs b/crates/chipmunk-cli/src/session/file.rs similarity index 100% rename from cli/chipmunk-cli/src/session/file.rs rename to crates/chipmunk-cli/src/session/file.rs diff --git a/cli/chipmunk-cli/src/session/format/binary.rs b/crates/chipmunk-cli/src/session/format/binary.rs similarity index 100% rename from cli/chipmunk-cli/src/session/format/binary.rs rename to crates/chipmunk-cli/src/session/format/binary.rs diff --git a/cli/chipmunk-cli/src/session/format/mod.rs b/crates/chipmunk-cli/src/session/format/mod.rs similarity index 100% rename from cli/chipmunk-cli/src/session/format/mod.rs rename to crates/chipmunk-cli/src/session/format/mod.rs diff --git a/cli/chipmunk-cli/src/session/format/text.rs b/crates/chipmunk-cli/src/session/format/text.rs similarity index 100% rename from cli/chipmunk-cli/src/session/format/text.rs rename to crates/chipmunk-cli/src/session/format/text.rs diff --git a/cli/chipmunk-cli/src/session/mod.rs b/crates/chipmunk-cli/src/session/mod.rs similarity index 100% rename from cli/chipmunk-cli/src/session/mod.rs rename to crates/chipmunk-cli/src/session/mod.rs diff --git a/cli/chipmunk-cli/src/session/parser/dlt.rs b/crates/chipmunk-cli/src/session/parser/dlt.rs similarity index 100% rename from cli/chipmunk-cli/src/session/parser/dlt.rs rename to crates/chipmunk-cli/src/session/parser/dlt.rs diff --git a/cli/chipmunk-cli/src/session/parser/mod.rs b/crates/chipmunk-cli/src/session/parser/mod.rs similarity index 100% rename from cli/chipmunk-cli/src/session/parser/mod.rs rename to crates/chipmunk-cli/src/session/parser/mod.rs diff --git a/cli/chipmunk-cli/src/session/socket.rs b/crates/chipmunk-cli/src/session/socket.rs similarity index 100% rename from cli/chipmunk-cli/src/session/socket.rs rename to crates/chipmunk-cli/src/session/socket.rs diff --git a/application/apps/indexer/README.md b/crates/core/README.md similarity index 100% rename from application/apps/indexer/README.md rename to crates/core/README.md diff --git a/application/apps/indexer/addons/dlt-tools/Cargo.toml b/crates/core/dlt-tools/Cargo.toml similarity index 91% rename from application/apps/indexer/addons/dlt-tools/Cargo.toml rename to crates/core/dlt-tools/Cargo.toml index 8dbbd58807..f226267941 100644 --- a/application/apps/indexer/addons/dlt-tools/Cargo.toml +++ b/crates/core/dlt-tools/Cargo.toml @@ -7,12 +7,15 @@ edition.workspace = true workspace = true [dependencies] -dlt-core.workspace = true +# Internal crates indexer_base.workspace = true -log.workspace = true parsers.workspace = true sources.workspace = true processor.workspace = true + +# External crates +dlt-core.workspace = true +log.workspace = true tokio = { workspace = true , features = ["full"] } tokio-util = { workspace = true, features = ["codec", "net"] } diff --git a/application/apps/indexer/addons/dlt-tools/src/attachments_collector.rs b/crates/core/dlt-tools/src/attachments_collector.rs similarity index 100% rename from application/apps/indexer/addons/dlt-tools/src/attachments_collector.rs rename to crates/core/dlt-tools/src/attachments_collector.rs diff --git a/application/apps/indexer/addons/dlt-tools/src/lib.rs b/crates/core/dlt-tools/src/lib.rs similarity index 99% rename from application/apps/indexer/addons/dlt-tools/src/lib.rs rename to crates/core/dlt-tools/src/lib.rs index a2431ea99c..a6fcd6a5a4 100644 --- a/application/apps/indexer/addons/dlt-tools/src/lib.rs +++ b/crates/core/dlt-tools/src/lib.rs @@ -130,7 +130,7 @@ mod tests { use super::*; use std::path::Path; - const DLT_FT_SAMPLE: &str = "../../../../../application/developing/resources/attachments.dlt"; + const DLT_FT_SAMPLE: &str = "../../../development/resources/attachments.dlt"; #[tokio::test] async fn test_scan_dlt_ft() { diff --git a/application/apps/indexer/indexer_base/Cargo.toml b/crates/core/indexer_base/Cargo.toml similarity index 100% rename from application/apps/indexer/indexer_base/Cargo.toml rename to crates/core/indexer_base/Cargo.toml diff --git a/application/apps/indexer/indexer_base/src/chunks.rs b/crates/core/indexer_base/src/chunks.rs similarity index 100% rename from application/apps/indexer/indexer_base/src/chunks.rs rename to crates/core/indexer_base/src/chunks.rs diff --git a/application/apps/indexer/indexer_base/src/config.rs b/crates/core/indexer_base/src/config.rs similarity index 100% rename from application/apps/indexer/indexer_base/src/config.rs rename to crates/core/indexer_base/src/config.rs diff --git a/application/apps/indexer/indexer_base/src/lib.rs b/crates/core/indexer_base/src/lib.rs similarity index 100% rename from application/apps/indexer/indexer_base/src/lib.rs rename to crates/core/indexer_base/src/lib.rs diff --git a/application/apps/indexer/indexer_base/src/tests/mod.rs b/crates/core/indexer_base/src/tests/mod.rs similarity index 100% rename from application/apps/indexer/indexer_base/src/tests/mod.rs rename to crates/core/indexer_base/src/tests/mod.rs diff --git a/application/apps/indexer/indexer_base/src/tests/utils_tests.rs b/crates/core/indexer_base/src/tests/utils_tests.rs similarity index 100% rename from application/apps/indexer/indexer_base/src/tests/utils_tests.rs rename to crates/core/indexer_base/src/tests/utils_tests.rs diff --git a/application/apps/indexer/indexer_base/src/timedline.rs b/crates/core/indexer_base/src/timedline.rs similarity index 100% rename from application/apps/indexer/indexer_base/src/timedline.rs rename to crates/core/indexer_base/src/timedline.rs diff --git a/application/apps/indexer/indexer_base/src/utils.rs b/crates/core/indexer_base/src/utils.rs similarity index 100% rename from application/apps/indexer/indexer_base/src/utils.rs rename to crates/core/indexer_base/src/utils.rs diff --git a/application/apps/indexer/merging/Cargo.toml b/crates/core/merging/Cargo.toml similarity index 100% rename from application/apps/indexer/merging/Cargo.toml rename to crates/core/merging/Cargo.toml diff --git a/application/apps/indexer/merging/src/concatenator.rs b/crates/core/merging/src/concatenator.rs similarity index 100% rename from application/apps/indexer/merging/src/concatenator.rs rename to crates/core/merging/src/concatenator.rs diff --git a/application/apps/indexer/merging/src/lib.rs b/crates/core/merging/src/lib.rs similarity index 100% rename from application/apps/indexer/merging/src/lib.rs rename to crates/core/merging/src/lib.rs diff --git a/application/apps/indexer/merging/src/merger.rs b/crates/core/merging/src/merger.rs similarity index 100% rename from application/apps/indexer/merging/src/merger.rs rename to crates/core/merging/src/merger.rs diff --git a/application/apps/indexer/merging/src/tests/merger_tests.rs b/crates/core/merging/src/tests/merger_tests.rs similarity index 100% rename from application/apps/indexer/merging/src/tests/merger_tests.rs rename to crates/core/merging/src/tests/merger_tests.rs diff --git a/application/apps/indexer/merging/src/tests/mod.rs b/crates/core/merging/src/tests/mod.rs similarity index 100% rename from application/apps/indexer/merging/src/tests/mod.rs rename to crates/core/merging/src/tests/mod.rs diff --git a/application/apps/indexer/merging/test_samples/appending_to_empty_file/a.log b/crates/core/merging/test_samples/appending_to_empty_file/a.log similarity index 100% rename from application/apps/indexer/merging/test_samples/appending_to_empty_file/a.log rename to crates/core/merging/test_samples/appending_to_empty_file/a.log diff --git a/application/apps/indexer/merging/test_samples/appending_to_empty_file/append_here.log b/crates/core/merging/test_samples/appending_to_empty_file/append_here.log similarity index 100% rename from application/apps/indexer/merging/test_samples/appending_to_empty_file/append_here.log rename to crates/core/merging/test_samples/appending_to_empty_file/append_here.log diff --git a/application/apps/indexer/merging/test_samples/appending_to_empty_file/b.log b/crates/core/merging/test_samples/appending_to_empty_file/b.log similarity index 100% rename from application/apps/indexer/merging/test_samples/appending_to_empty_file/b.log rename to crates/core/merging/test_samples/appending_to_empty_file/b.log diff --git a/application/apps/indexer/merging/test_samples/appending_to_empty_file/config.json b/crates/core/merging/test_samples/appending_to_empty_file/config.json similarity index 100% rename from application/apps/indexer/merging/test_samples/appending_to_empty_file/config.json rename to crates/core/merging/test_samples/appending_to_empty_file/config.json diff --git a/application/apps/indexer/merging/test_samples/appending_to_empty_file/expected.merged b/crates/core/merging/test_samples/appending_to_empty_file/expected.merged similarity index 100% rename from application/apps/indexer/merging/test_samples/appending_to_empty_file/expected.merged rename to crates/core/merging/test_samples/appending_to_empty_file/expected.merged diff --git a/application/apps/indexer/merging/test_samples/appending_to_existing_file/a.log b/crates/core/merging/test_samples/appending_to_existing_file/a.log similarity index 100% rename from application/apps/indexer/merging/test_samples/appending_to_existing_file/a.log rename to crates/core/merging/test_samples/appending_to_existing_file/a.log diff --git a/application/apps/indexer/merging/test_samples/appending_to_existing_file/append_here.log b/crates/core/merging/test_samples/appending_to_existing_file/append_here.log similarity index 100% rename from application/apps/indexer/merging/test_samples/appending_to_existing_file/append_here.log rename to crates/core/merging/test_samples/appending_to_existing_file/append_here.log diff --git a/application/apps/indexer/merging/test_samples/appending_to_existing_file/b.log b/crates/core/merging/test_samples/appending_to_existing_file/b.log similarity index 100% rename from application/apps/indexer/merging/test_samples/appending_to_existing_file/b.log rename to crates/core/merging/test_samples/appending_to_existing_file/b.log diff --git a/application/apps/indexer/merging/test_samples/appending_to_existing_file/config.json b/crates/core/merging/test_samples/appending_to_existing_file/config.json similarity index 100% rename from application/apps/indexer/merging/test_samples/appending_to_existing_file/config.json rename to crates/core/merging/test_samples/appending_to_existing_file/config.json diff --git a/application/apps/indexer/merging/test_samples/appending_to_existing_file/expected.merged b/crates/core/merging/test_samples/appending_to_existing_file/expected.merged similarity index 100% rename from application/apps/indexer/merging/test_samples/appending_to_existing_file/expected.merged rename to crates/core/merging/test_samples/appending_to_existing_file/expected.merged diff --git a/application/apps/indexer/merging/test_samples/indexer_log_files/a.log b/crates/core/merging/test_samples/indexer_log_files/a.log similarity index 100% rename from application/apps/indexer/merging/test_samples/indexer_log_files/a.log rename to crates/core/merging/test_samples/indexer_log_files/a.log diff --git a/application/apps/indexer/merging/test_samples/indexer_log_files/b.log b/crates/core/merging/test_samples/indexer_log_files/b.log similarity index 100% rename from application/apps/indexer/merging/test_samples/indexer_log_files/b.log rename to crates/core/merging/test_samples/indexer_log_files/b.log diff --git a/application/apps/indexer/merging/test_samples/indexer_log_files/config.json b/crates/core/merging/test_samples/indexer_log_files/config.json similarity index 100% rename from application/apps/indexer/merging/test_samples/indexer_log_files/config.json rename to crates/core/merging/test_samples/indexer_log_files/config.json diff --git a/application/apps/indexer/merging/test_samples/indexer_log_files/expected.merged b/crates/core/merging/test_samples/indexer_log_files/expected.merged similarity index 100% rename from application/apps/indexer/merging/test_samples/indexer_log_files/expected.merged rename to crates/core/merging/test_samples/indexer_log_files/expected.merged diff --git a/application/apps/indexer/merging/test_samples/missing_timestamp_lines/a.log b/crates/core/merging/test_samples/missing_timestamp_lines/a.log similarity index 100% rename from application/apps/indexer/merging/test_samples/missing_timestamp_lines/a.log rename to crates/core/merging/test_samples/missing_timestamp_lines/a.log diff --git a/application/apps/indexer/merging/test_samples/missing_timestamp_lines/b.log b/crates/core/merging/test_samples/missing_timestamp_lines/b.log similarity index 100% rename from application/apps/indexer/merging/test_samples/missing_timestamp_lines/b.log rename to crates/core/merging/test_samples/missing_timestamp_lines/b.log diff --git a/application/apps/indexer/merging/test_samples/missing_timestamp_lines/config.json b/crates/core/merging/test_samples/missing_timestamp_lines/config.json similarity index 100% rename from application/apps/indexer/merging/test_samples/missing_timestamp_lines/config.json rename to crates/core/merging/test_samples/missing_timestamp_lines/config.json diff --git a/application/apps/indexer/merging/test_samples/missing_timestamp_lines/expected.merged b/crates/core/merging/test_samples/missing_timestamp_lines/expected.merged similarity index 100% rename from application/apps/indexer/merging/test_samples/missing_timestamp_lines/expected.merged rename to crates/core/merging/test_samples/missing_timestamp_lines/expected.merged diff --git a/application/apps/indexer/merging/test_samples/not_standard_format/a.log b/crates/core/merging/test_samples/not_standard_format/a.log similarity index 100% rename from application/apps/indexer/merging/test_samples/not_standard_format/a.log rename to crates/core/merging/test_samples/not_standard_format/a.log diff --git a/application/apps/indexer/merging/test_samples/not_standard_format/b.log b/crates/core/merging/test_samples/not_standard_format/b.log similarity index 100% rename from application/apps/indexer/merging/test_samples/not_standard_format/b.log rename to crates/core/merging/test_samples/not_standard_format/b.log diff --git a/application/apps/indexer/merging/test_samples/not_standard_format/config.json b/crates/core/merging/test_samples/not_standard_format/config.json similarity index 100% rename from application/apps/indexer/merging/test_samples/not_standard_format/config.json rename to crates/core/merging/test_samples/not_standard_format/config.json diff --git a/application/apps/indexer/merging/test_samples/not_standard_format/expected.merged b/crates/core/merging/test_samples/not_standard_format/expected.merged similarity index 100% rename from application/apps/indexer/merging/test_samples/not_standard_format/expected.merged rename to crates/core/merging/test_samples/not_standard_format/expected.merged diff --git a/application/apps/indexer/merging/test_samples/simple_both_regex_2/a.log b/crates/core/merging/test_samples/simple_both_regex_2/a.log similarity index 100% rename from application/apps/indexer/merging/test_samples/simple_both_regex_2/a.log rename to crates/core/merging/test_samples/simple_both_regex_2/a.log diff --git a/application/apps/indexer/merging/test_samples/simple_both_regex_2/b.log b/crates/core/merging/test_samples/simple_both_regex_2/b.log similarity index 100% rename from application/apps/indexer/merging/test_samples/simple_both_regex_2/b.log rename to crates/core/merging/test_samples/simple_both_regex_2/b.log diff --git a/application/apps/indexer/merging/test_samples/simple_both_regex_2/config.json b/crates/core/merging/test_samples/simple_both_regex_2/config.json similarity index 100% rename from application/apps/indexer/merging/test_samples/simple_both_regex_2/config.json rename to crates/core/merging/test_samples/simple_both_regex_2/config.json diff --git a/application/apps/indexer/merging/test_samples/simple_both_regex_2/expected.merged b/crates/core/merging/test_samples/simple_both_regex_2/expected.merged similarity index 100% rename from application/apps/indexer/merging/test_samples/simple_both_regex_2/expected.merged rename to crates/core/merging/test_samples/simple_both_regex_2/expected.merged diff --git a/application/apps/indexer/merging/test_samples/simple_regex_1_regex_2/a.log b/crates/core/merging/test_samples/simple_regex_1_regex_2/a.log similarity index 100% rename from application/apps/indexer/merging/test_samples/simple_regex_1_regex_2/a.log rename to crates/core/merging/test_samples/simple_regex_1_regex_2/a.log diff --git a/application/apps/indexer/merging/test_samples/simple_regex_1_regex_2/b.log b/crates/core/merging/test_samples/simple_regex_1_regex_2/b.log similarity index 100% rename from application/apps/indexer/merging/test_samples/simple_regex_1_regex_2/b.log rename to crates/core/merging/test_samples/simple_regex_1_regex_2/b.log diff --git a/application/apps/indexer/merging/test_samples/simple_regex_1_regex_2/config.json b/crates/core/merging/test_samples/simple_regex_1_regex_2/config.json similarity index 100% rename from application/apps/indexer/merging/test_samples/simple_regex_1_regex_2/config.json rename to crates/core/merging/test_samples/simple_regex_1_regex_2/config.json diff --git a/application/apps/indexer/merging/test_samples/simple_regex_1_regex_2/expected.merged b/crates/core/merging/test_samples/simple_regex_1_regex_2/expected.merged similarity index 100% rename from application/apps/indexer/merging/test_samples/simple_regex_1_regex_2/expected.merged rename to crates/core/merging/test_samples/simple_regex_1_regex_2/expected.merged diff --git a/application/apps/indexer/merging/test_samples/two_adb_files/a.log b/crates/core/merging/test_samples/two_adb_files/a.log similarity index 100% rename from application/apps/indexer/merging/test_samples/two_adb_files/a.log rename to crates/core/merging/test_samples/two_adb_files/a.log diff --git a/application/apps/indexer/merging/test_samples/two_adb_files/b.log b/crates/core/merging/test_samples/two_adb_files/b.log similarity index 100% rename from application/apps/indexer/merging/test_samples/two_adb_files/b.log rename to crates/core/merging/test_samples/two_adb_files/b.log diff --git a/application/apps/indexer/merging/test_samples/two_adb_files/config.json b/crates/core/merging/test_samples/two_adb_files/config.json similarity index 100% rename from application/apps/indexer/merging/test_samples/two_adb_files/config.json rename to crates/core/merging/test_samples/two_adb_files/config.json diff --git a/application/apps/indexer/merging/test_samples/two_adb_files/expected.merged b/crates/core/merging/test_samples/two_adb_files/expected.merged similarity index 100% rename from application/apps/indexer/merging/test_samples/two_adb_files/expected.merged rename to crates/core/merging/test_samples/two_adb_files/expected.merged diff --git a/application/apps/indexer/parsers/Cargo.toml b/crates/core/parsers/Cargo.toml similarity index 50% rename from application/apps/indexer/parsers/Cargo.toml rename to crates/core/parsers/Cargo.toml index 2051c8fe57..0e6a991184 100644 --- a/application/apps/indexer/parsers/Cargo.toml +++ b/crates/core/parsers/Cargo.toml @@ -7,9 +7,13 @@ edition.workspace = true workspace = true [dependencies] -byteorder = "1.5" -chrono = "0.4" -chrono-tz = "0.10" +# Internal crates +someip-tools.workspace = true + +# External crates +byteorder.workspace = true +chrono.workspace = true +chrono-tz.workspace = true dlt-core = { workspace = true, features = ["serialization", "fibex"] } lazy_static.workspace = true log.workspace = true @@ -18,13 +22,8 @@ memchr.workspace = true serde = { workspace = true , features = ["derive"] } thiserror.workspace = true rand.workspace = true -someip-messages = { git = "https://github.com/esrlabs/someip" } - -# NOTE: Pinned to a specific commit because our unsafe code in `someip.rs` -# depends on the internal implementation of this library. -# Verify safety contract on update. -someip-payload = { git = "https://github.com/esrlabs/someip-payload", rev= "b9aa52c96fcbdb0e5aa1ee5258299f0ff7e3a094" } -someip-tools.workspace = true +someip-messages.workspace = true +someip-payload.workspace = true [dev-dependencies] -stringreader = "0.1" +stringreader.workspace = true diff --git a/application/apps/indexer/parsers/src/dlt/attachment.rs b/crates/core/parsers/src/dlt/attachment.rs similarity index 100% rename from application/apps/indexer/parsers/src/dlt/attachment.rs rename to crates/core/parsers/src/dlt/attachment.rs diff --git a/application/apps/indexer/parsers/src/dlt/fmt.rs b/crates/core/parsers/src/dlt/fmt.rs similarity index 100% rename from application/apps/indexer/parsers/src/dlt/fmt.rs rename to crates/core/parsers/src/dlt/fmt.rs diff --git a/application/apps/indexer/parsers/src/dlt/mod.rs b/crates/core/parsers/src/dlt/mod.rs similarity index 100% rename from application/apps/indexer/parsers/src/dlt/mod.rs rename to crates/core/parsers/src/dlt/mod.rs diff --git a/application/apps/indexer/parsers/src/lib.rs b/crates/core/parsers/src/lib.rs similarity index 100% rename from application/apps/indexer/parsers/src/lib.rs rename to crates/core/parsers/src/lib.rs diff --git a/application/apps/indexer/parsers/src/someip.rs b/crates/core/parsers/src/someip.rs similarity index 100% rename from application/apps/indexer/parsers/src/someip.rs rename to crates/core/parsers/src/someip.rs diff --git a/application/apps/indexer/parsers/src/text.rs b/crates/core/parsers/src/text.rs similarity index 100% rename from application/apps/indexer/parsers/src/text.rs rename to crates/core/parsers/src/text.rs diff --git a/application/apps/indexer/plugins_host/Cargo.toml b/crates/core/plugins_host/Cargo.toml similarity index 76% rename from application/apps/indexer/plugins_host/Cargo.toml rename to crates/core/plugins_host/Cargo.toml index 9f4a72e28c..fa162791f6 100644 --- a/application/apps/indexer/plugins_host/Cargo.toml +++ b/crates/core/plugins_host/Cargo.toml @@ -7,6 +7,12 @@ edition.workspace = true workspace = true [dependencies] +# Internal crates +parsers.workspace = true +stypes.workspace = true +dir_checksum.workspace = true + +# External crates tokio.workspace = true thiserror.workspace = true anyhow.workspace = true @@ -17,18 +23,12 @@ dirs.workspace = true toml.workspace = true blake3.workspace = true rand.workspace = true - -wasmtime = "33.0" -wasmtime-wasi = "33.0" - -parsers.workspace = true -stypes.workspace = true -# TODO : Introduce shared crates and move dir_checksum to it. -dir_checksum = { path = "../../../../cli/development-cli/dir_checksum" } +wasmtime.workspace = true +wasmtime-wasi.workspace = true [dev-dependencies] -criterion = { workspace = true, features = ["async_tokio"] } processor.workspace = true +criterion = { workspace = true, features = ["async_tokio"] } [[bench]] name = "plugin_parser_init" diff --git a/application/apps/indexer/plugins_host/benches/plugin_parser_init.rs b/crates/core/plugins_host/benches/plugin_parser_init.rs similarity index 100% rename from application/apps/indexer/plugins_host/benches/plugin_parser_init.rs rename to crates/core/plugins_host/benches/plugin_parser_init.rs diff --git a/application/apps/indexer/plugins_host/benches/plugin_utls.rs b/crates/core/plugins_host/benches/plugin_utls.rs similarity index 100% rename from application/apps/indexer/plugins_host/benches/plugin_utls.rs rename to crates/core/plugins_host/benches/plugin_utls.rs diff --git a/application/apps/indexer/plugins_host/src/bytesource_shared/mod.rs b/crates/core/plugins_host/src/bytesource_shared/mod.rs similarity index 100% rename from application/apps/indexer/plugins_host/src/bytesource_shared/mod.rs rename to crates/core/plugins_host/src/bytesource_shared/mod.rs diff --git a/application/apps/indexer/plugins_host/src/lib.rs b/crates/core/plugins_host/src/lib.rs similarity index 100% rename from application/apps/indexer/plugins_host/src/lib.rs rename to crates/core/plugins_host/src/lib.rs diff --git a/application/apps/indexer/plugins_host/src/parser_shared/mod.rs b/crates/core/plugins_host/src/parser_shared/mod.rs similarity index 100% rename from application/apps/indexer/plugins_host/src/parser_shared/mod.rs rename to crates/core/plugins_host/src/parser_shared/mod.rs diff --git a/application/apps/indexer/plugins_host/src/parser_shared/plugin_parse_message.rs b/crates/core/plugins_host/src/parser_shared/plugin_parse_message.rs similarity index 100% rename from application/apps/indexer/plugins_host/src/parser_shared/plugin_parse_message.rs rename to crates/core/plugins_host/src/parser_shared/plugin_parse_message.rs diff --git a/application/apps/indexer/plugins_host/src/plugins_manager/cache/mod.rs b/crates/core/plugins_host/src/plugins_manager/cache/mod.rs similarity index 100% rename from application/apps/indexer/plugins_host/src/plugins_manager/cache/mod.rs rename to crates/core/plugins_host/src/plugins_manager/cache/mod.rs diff --git a/application/apps/indexer/plugins_host/src/plugins_manager/errors.rs b/crates/core/plugins_host/src/plugins_manager/errors.rs similarity index 100% rename from application/apps/indexer/plugins_host/src/plugins_manager/errors.rs rename to crates/core/plugins_host/src/plugins_manager/errors.rs diff --git a/application/apps/indexer/plugins_host/src/plugins_manager/load.rs b/crates/core/plugins_host/src/plugins_manager/load.rs similarity index 100% rename from application/apps/indexer/plugins_host/src/plugins_manager/load.rs rename to crates/core/plugins_host/src/plugins_manager/load.rs diff --git a/application/apps/indexer/plugins_host/src/plugins_manager/mod.rs b/crates/core/plugins_host/src/plugins_manager/mod.rs similarity index 100% rename from application/apps/indexer/plugins_host/src/plugins_manager/mod.rs rename to crates/core/plugins_host/src/plugins_manager/mod.rs diff --git a/application/apps/indexer/plugins_host/src/plugins_manager/paths.rs b/crates/core/plugins_host/src/plugins_manager/paths.rs similarity index 100% rename from application/apps/indexer/plugins_host/src/plugins_manager/paths.rs rename to crates/core/plugins_host/src/plugins_manager/paths.rs diff --git a/application/apps/indexer/plugins_host/src/plugins_manager/tests.rs b/crates/core/plugins_host/src/plugins_manager/tests.rs similarity index 100% rename from application/apps/indexer/plugins_host/src/plugins_manager/tests.rs rename to crates/core/plugins_host/src/plugins_manager/tests.rs diff --git a/application/apps/indexer/plugins_host/src/plugins_manager/validator.rs b/crates/core/plugins_host/src/plugins_manager/validator.rs similarity index 100% rename from application/apps/indexer/plugins_host/src/plugins_manager/validator.rs rename to crates/core/plugins_host/src/plugins_manager/validator.rs diff --git a/application/apps/indexer/plugins_host/src/plugins_shared/load.rs b/crates/core/plugins_host/src/plugins_shared/load.rs similarity index 100% rename from application/apps/indexer/plugins_host/src/plugins_shared/load.rs rename to crates/core/plugins_host/src/plugins_shared/load.rs diff --git a/application/apps/indexer/plugins_host/src/plugins_shared/mod.rs b/crates/core/plugins_host/src/plugins_shared/mod.rs similarity index 100% rename from application/apps/indexer/plugins_host/src/plugins_shared/mod.rs rename to crates/core/plugins_host/src/plugins_shared/mod.rs diff --git a/application/apps/indexer/plugins_host/src/plugins_shared/plugin_errors.rs b/crates/core/plugins_host/src/plugins_shared/plugin_errors.rs similarity index 100% rename from application/apps/indexer/plugins_host/src/plugins_shared/plugin_errors.rs rename to crates/core/plugins_host/src/plugins_shared/plugin_errors.rs diff --git a/application/apps/indexer/plugins_host/src/v0_1_0/bytesource/bindings.rs b/crates/core/plugins_host/src/v0_1_0/bytesource/bindings.rs similarity index 97% rename from application/apps/indexer/plugins_host/src/v0_1_0/bytesource/bindings.rs rename to crates/core/plugins_host/src/v0_1_0/bytesource/bindings.rs index 9810410478..8f3dd52e59 100644 --- a/application/apps/indexer/plugins_host/src/v0_1_0/bytesource/bindings.rs +++ b/crates/core/plugins_host/src/v0_1_0/bytesource/bindings.rs @@ -3,7 +3,7 @@ use std::io; pub use self::chipmunk::bytesource::bytesource_types; wasmtime::component::bindgen!({ - path: "../../../../plugins/plugins_api/wit/v0.1.0", + path: "../../plugins_api/wit/v0.1.0", world: "chipmunk:bytesource/bytesource", // Activate async but shrink its interfaces as possible. // Without activating async, wasmtime will spawn new runtime on its own, diff --git a/application/apps/indexer/plugins_host/src/v0_1_0/bytesource/bytesource_plugin_state.rs b/crates/core/plugins_host/src/v0_1_0/bytesource/bytesource_plugin_state.rs similarity index 100% rename from application/apps/indexer/plugins_host/src/v0_1_0/bytesource/bytesource_plugin_state.rs rename to crates/core/plugins_host/src/v0_1_0/bytesource/bytesource_plugin_state.rs diff --git a/application/apps/indexer/plugins_host/src/v0_1_0/bytesource/mod.rs b/crates/core/plugins_host/src/v0_1_0/bytesource/mod.rs similarity index 100% rename from application/apps/indexer/plugins_host/src/v0_1_0/bytesource/mod.rs rename to crates/core/plugins_host/src/v0_1_0/bytesource/mod.rs diff --git a/application/apps/indexer/plugins_host/src/v0_1_0/mod.rs b/crates/core/plugins_host/src/v0_1_0/mod.rs similarity index 100% rename from application/apps/indexer/plugins_host/src/v0_1_0/mod.rs rename to crates/core/plugins_host/src/v0_1_0/mod.rs diff --git a/application/apps/indexer/plugins_host/src/v0_1_0/parser/bindings.rs b/crates/core/plugins_host/src/v0_1_0/parser/bindings.rs similarity index 98% rename from application/apps/indexer/plugins_host/src/v0_1_0/parser/bindings.rs rename to crates/core/plugins_host/src/v0_1_0/parser/bindings.rs index b6089d8924..ab9f46a098 100644 --- a/application/apps/indexer/plugins_host/src/v0_1_0/parser/bindings.rs +++ b/crates/core/plugins_host/src/v0_1_0/parser/bindings.rs @@ -5,7 +5,7 @@ pub use self::chipmunk::parser::parse_types::*; use stypes::ParserRenderOptions; wasmtime::component::bindgen!({ - path: "../../../../plugins/plugins_api/wit/v0.1.0", + path: "../../plugins_api/wit/v0.1.0", world: "chipmunk:parser/parse", additional_derives: [Clone], // Activate async but shrink its interfaces as possible. diff --git a/application/apps/indexer/plugins_host/src/v0_1_0/parser/mod.rs b/crates/core/plugins_host/src/v0_1_0/parser/mod.rs similarity index 100% rename from application/apps/indexer/plugins_host/src/v0_1_0/parser/mod.rs rename to crates/core/plugins_host/src/v0_1_0/parser/mod.rs diff --git a/application/apps/indexer/plugins_host/src/v0_1_0/parser/parser_plugin_state.rs b/crates/core/plugins_host/src/v0_1_0/parser/parser_plugin_state.rs similarity index 100% rename from application/apps/indexer/plugins_host/src/v0_1_0/parser/parser_plugin_state.rs rename to crates/core/plugins_host/src/v0_1_0/parser/parser_plugin_state.rs diff --git a/application/apps/indexer/plugins_host/src/v0_1_0/shared/bindings.rs b/crates/core/plugins_host/src/v0_1_0/shared/bindings.rs similarity index 98% rename from application/apps/indexer/plugins_host/src/v0_1_0/shared/bindings.rs rename to crates/core/plugins_host/src/v0_1_0/shared/bindings.rs index 6010203f80..a9653b48ee 100644 --- a/application/apps/indexer/plugins_host/src/v0_1_0/shared/bindings.rs +++ b/crates/core/plugins_host/src/v0_1_0/shared/bindings.rs @@ -7,7 +7,7 @@ use stypes::{ SemanticVersion as HostVersion, }; wasmtime::component::bindgen!({ - path: "../../../../plugins/plugins_api/wit/v0.1.0", + path: "../../plugins_api/wit/v0.1.0", // Generate the shared type separately so we can reference those types on each plugin // kind to avoid duplicating those generated types and all the mapping happens afterwords. world: "chipmunk:shared/bindings", diff --git a/application/apps/indexer/plugins_host/src/v0_1_0/shared/mod.rs b/crates/core/plugins_host/src/v0_1_0/shared/mod.rs similarity index 100% rename from application/apps/indexer/plugins_host/src/v0_1_0/shared/mod.rs rename to crates/core/plugins_host/src/v0_1_0/shared/mod.rs diff --git a/application/apps/indexer/plugins_host/src/wasm_host/mod.rs b/crates/core/plugins_host/src/wasm_host/mod.rs similarity index 100% rename from application/apps/indexer/plugins_host/src/wasm_host/mod.rs rename to crates/core/plugins_host/src/wasm_host/mod.rs diff --git a/application/apps/indexer/processor/Cargo.toml b/crates/core/processor/Cargo.toml similarity index 90% rename from application/apps/indexer/processor/Cargo.toml rename to crates/core/processor/Cargo.toml index 804f37ddd2..8bf46aa1f7 100644 --- a/application/apps/indexer/processor/Cargo.toml +++ b/crates/core/processor/Cargo.toml @@ -8,33 +8,36 @@ edition.workspace = true workspace = true [dependencies] -bincode = "1.3" +# Internal crates bufread.workspace = true -bytecount = "0.6" +indexer_base.workspace = true +parsers.workspace = true +sources.workspace = true +text_grep.workspace = true +stypes.workspace = true + +# External crates +bincode.workspace = true +bytecount.workspace = true futures.workspace = true grep-regex.workspace = true grep-searcher.workspace = true -indexer_base.workspace = true itertools.workspace = true lazy_static.workspace = true log.workspace = true -parsers.workspace = true -sources.workspace = true regex.workspace = true serde = { workspace = true , features = ["derive"] } serde_json.workspace = true -text_grep.workspace = true thiserror.workspace = true tokio-util.workspace = true -stypes = { workspace = true, features=["rustcore"] } [dev-dependencies] +plugins_host.workspace = true criterion = { workspace = true, features = ["async_tokio"] } -pretty_assertions = "1.4" +pretty_assertions.workspace = true rand.workspace = true tempfile.workspace = true tokio.workspace = true -plugins_host.workspace = true toml.workspace = true [[bench]] diff --git a/application/apps/indexer/processor/benches/bench_utls.rs b/crates/core/processor/benches/bench_utls.rs similarity index 93% rename from application/apps/indexer/processor/benches/bench_utls.rs rename to crates/core/processor/benches/bench_utls.rs index 4f08e99630..d0eacdebfb 100644 --- a/application/apps/indexer/processor/benches/bench_utls.rs +++ b/crates/core/processor/benches/bench_utls.rs @@ -28,10 +28,11 @@ pub const SAMPLE_SIZE_ENV_VAR: &str = "CHIPMUNK_BENCH_SAMPLE_SIZE"; /// or can't be read. pub fn read_binary() -> &'static [u8] { let input_file = match std::env::var(INPUT_SOURCE_ENV_VAR) { - Ok(input) =>PathBuf::from(input), - Err(err) => panic!("Error while retrieving input file.\n -Please ensure to provide the path of input file for benchmarks via command line arguments if you are using chipmunk build cli tool\ -or via the environment variable: '{INPUT_SOURCE_ENV_VAR}' if you are running the benchmark directly.\n Error Info: {err}"), + Ok(input) => PathBuf::from(input), + Err(err) => panic!( + "Error while retrieving input file.\nProvide the input file path via the \ + '{INPUT_SOURCE_ENV_VAR}' environment variable.\nError Info: {err}" + ), }; assert!( diff --git a/application/apps/indexer/processor/benches/dlt_producer.rs b/crates/core/processor/benches/dlt_producer.rs similarity index 100% rename from application/apps/indexer/processor/benches/dlt_producer.rs rename to crates/core/processor/benches/dlt_producer.rs diff --git a/application/apps/indexer/processor/benches/map_benchmarks.rs b/crates/core/processor/benches/map_benchmarks.rs similarity index 100% rename from application/apps/indexer/processor/benches/map_benchmarks.rs rename to crates/core/processor/benches/map_benchmarks.rs diff --git a/application/apps/indexer/processor/benches/mocks/mock_parser.rs b/crates/core/processor/benches/mocks/mock_parser.rs similarity index 100% rename from application/apps/indexer/processor/benches/mocks/mock_parser.rs rename to crates/core/processor/benches/mocks/mock_parser.rs diff --git a/application/apps/indexer/processor/benches/mocks/mock_source.rs b/crates/core/processor/benches/mocks/mock_source.rs similarity index 100% rename from application/apps/indexer/processor/benches/mocks/mock_source.rs rename to crates/core/processor/benches/mocks/mock_source.rs diff --git a/application/apps/indexer/processor/benches/mocks/mod.rs b/crates/core/processor/benches/mocks/mod.rs similarity index 100% rename from application/apps/indexer/processor/benches/mocks/mod.rs rename to crates/core/processor/benches/mocks/mod.rs diff --git a/application/apps/indexer/processor/benches/mocks_multi_parallel.rs b/crates/core/processor/benches/mocks_multi_parallel.rs similarity index 100% rename from application/apps/indexer/processor/benches/mocks_multi_parallel.rs rename to crates/core/processor/benches/mocks_multi_parallel.rs diff --git a/application/apps/indexer/processor/benches/mocks_multi_producer.rs b/crates/core/processor/benches/mocks_multi_producer.rs similarity index 100% rename from application/apps/indexer/processor/benches/mocks_multi_producer.rs rename to crates/core/processor/benches/mocks_multi_producer.rs diff --git a/application/apps/indexer/processor/benches/mocks_once_parallel.rs b/crates/core/processor/benches/mocks_once_parallel.rs similarity index 100% rename from application/apps/indexer/processor/benches/mocks_once_parallel.rs rename to crates/core/processor/benches/mocks_once_parallel.rs diff --git a/application/apps/indexer/processor/benches/mocks_once_producer.rs b/crates/core/processor/benches/mocks_once_producer.rs similarity index 100% rename from application/apps/indexer/processor/benches/mocks_once_producer.rs rename to crates/core/processor/benches/mocks_once_producer.rs diff --git a/application/apps/indexer/processor/benches/plugin_praser_producer.rs b/crates/core/processor/benches/plugin_praser_producer.rs similarity index 100% rename from application/apps/indexer/processor/benches/plugin_praser_producer.rs rename to crates/core/processor/benches/plugin_praser_producer.rs diff --git a/application/apps/indexer/processor/benches/someip_legacy_producer.rs b/crates/core/processor/benches/someip_legacy_producer.rs similarity index 100% rename from application/apps/indexer/processor/benches/someip_legacy_producer.rs rename to crates/core/processor/benches/someip_legacy_producer.rs diff --git a/application/apps/indexer/processor/benches/someip_producer.rs b/crates/core/processor/benches/someip_producer.rs similarity index 100% rename from application/apps/indexer/processor/benches/someip_producer.rs rename to crates/core/processor/benches/someip_producer.rs diff --git a/application/apps/indexer/processor/benches/text_producer.rs b/crates/core/processor/benches/text_producer.rs similarity index 100% rename from application/apps/indexer/processor/benches/text_producer.rs rename to crates/core/processor/benches/text_producer.rs diff --git a/application/apps/indexer/processor/src/export/mod.rs b/crates/core/processor/src/export/mod.rs similarity index 100% rename from application/apps/indexer/processor/src/export/mod.rs rename to crates/core/processor/src/export/mod.rs diff --git a/application/apps/indexer/processor/src/grabber/factory.rs b/crates/core/processor/src/grabber/factory.rs similarity index 100% rename from application/apps/indexer/processor/src/grabber/factory.rs rename to crates/core/processor/src/grabber/factory.rs diff --git a/application/apps/indexer/processor/src/grabber/mod.rs b/crates/core/processor/src/grabber/mod.rs similarity index 100% rename from application/apps/indexer/processor/src/grabber/mod.rs rename to crates/core/processor/src/grabber/mod.rs diff --git a/application/apps/indexer/processor/src/lib.rs b/crates/core/processor/src/lib.rs similarity index 100% rename from application/apps/indexer/processor/src/lib.rs rename to crates/core/processor/src/lib.rs diff --git a/application/apps/indexer/processor/src/map.rs b/crates/core/processor/src/map.rs similarity index 100% rename from application/apps/indexer/processor/src/map.rs rename to crates/core/processor/src/map.rs diff --git a/application/apps/indexer/processor/src/processor.rs b/crates/core/processor/src/processor.rs similarity index 100% rename from application/apps/indexer/processor/src/processor.rs rename to crates/core/processor/src/processor.rs diff --git a/application/apps/indexer/processor/src/producer/logs_collector.rs b/crates/core/processor/src/producer/logs_collector.rs similarity index 100% rename from application/apps/indexer/processor/src/producer/logs_collector.rs rename to crates/core/processor/src/producer/logs_collector.rs diff --git a/application/apps/indexer/processor/src/producer/mod.rs b/crates/core/processor/src/producer/mod.rs similarity index 100% rename from application/apps/indexer/processor/src/producer/mod.rs rename to crates/core/processor/src/producer/mod.rs diff --git a/application/apps/indexer/processor/src/producer/tests/cancel_safety.rs b/crates/core/processor/src/producer/tests/cancel_safety.rs similarity index 100% rename from application/apps/indexer/processor/src/producer/tests/cancel_safety.rs rename to crates/core/processor/src/producer/tests/cancel_safety.rs diff --git a/application/apps/indexer/processor/src/producer/tests/mock_byte_source.rs b/crates/core/processor/src/producer/tests/mock_byte_source.rs similarity index 100% rename from application/apps/indexer/processor/src/producer/tests/mock_byte_source.rs rename to crates/core/processor/src/producer/tests/mock_byte_source.rs diff --git a/application/apps/indexer/processor/src/producer/tests/mock_parser.rs b/crates/core/processor/src/producer/tests/mock_parser.rs similarity index 100% rename from application/apps/indexer/processor/src/producer/tests/mock_parser.rs rename to crates/core/processor/src/producer/tests/mock_parser.rs diff --git a/application/apps/indexer/processor/src/producer/tests/mod.rs b/crates/core/processor/src/producer/tests/mod.rs similarity index 100% rename from application/apps/indexer/processor/src/producer/tests/mod.rs rename to crates/core/processor/src/producer/tests/mod.rs diff --git a/application/apps/indexer/processor/src/producer/tests/multi_parse.rs b/crates/core/processor/src/producer/tests/multi_parse.rs similarity index 100% rename from application/apps/indexer/processor/src/producer/tests/multi_parse.rs rename to crates/core/processor/src/producer/tests/multi_parse.rs diff --git a/application/apps/indexer/processor/src/producer/tests/single_parse.rs b/crates/core/processor/src/producer/tests/single_parse.rs similarity index 100% rename from application/apps/indexer/processor/src/producer/tests/single_parse.rs rename to crates/core/processor/src/producer/tests/single_parse.rs diff --git a/application/apps/indexer/processor/src/search/error.rs b/crates/core/processor/src/search/error.rs similarity index 100% rename from application/apps/indexer/processor/src/search/error.rs rename to crates/core/processor/src/search/error.rs diff --git a/application/apps/indexer/processor/src/search/extractor.rs b/crates/core/processor/src/search/extractor.rs similarity index 100% rename from application/apps/indexer/processor/src/search/extractor.rs rename to crates/core/processor/src/search/extractor.rs diff --git a/application/apps/indexer/processor/src/search/filter.rs b/crates/core/processor/src/search/filter.rs similarity index 100% rename from application/apps/indexer/processor/src/search/filter.rs rename to crates/core/processor/src/search/filter.rs diff --git a/application/apps/indexer/processor/src/search/mod.rs b/crates/core/processor/src/search/mod.rs similarity index 100% rename from application/apps/indexer/processor/src/search/mod.rs rename to crates/core/processor/src/search/mod.rs diff --git a/application/apps/indexer/processor/src/search/searchers/linear.rs b/crates/core/processor/src/search/searchers/linear.rs similarity index 100% rename from application/apps/indexer/processor/src/search/searchers/linear.rs rename to crates/core/processor/src/search/searchers/linear.rs diff --git a/application/apps/indexer/processor/src/search/searchers/mod.rs b/crates/core/processor/src/search/searchers/mod.rs similarity index 100% rename from application/apps/indexer/processor/src/search/searchers/mod.rs rename to crates/core/processor/src/search/searchers/mod.rs diff --git a/application/apps/indexer/processor/src/search/searchers/regular.rs b/crates/core/processor/src/search/searchers/regular.rs similarity index 100% rename from application/apps/indexer/processor/src/search/searchers/regular.rs rename to crates/core/processor/src/search/searchers/regular.rs diff --git a/application/apps/indexer/processor/src/search/searchers/tests_linear.rs b/crates/core/processor/src/search/searchers/tests_linear.rs similarity index 100% rename from application/apps/indexer/processor/src/search/searchers/tests_linear.rs rename to crates/core/processor/src/search/searchers/tests_linear.rs diff --git a/application/apps/indexer/processor/src/search/searchers/tests_regular.rs b/crates/core/processor/src/search/searchers/tests_regular.rs similarity index 100% rename from application/apps/indexer/processor/src/search/searchers/tests_regular.rs rename to crates/core/processor/src/search/searchers/tests_regular.rs diff --git a/application/apps/indexer/processor/src/search/searchers/tests_values.rs b/crates/core/processor/src/search/searchers/tests_values.rs similarity index 100% rename from application/apps/indexer/processor/src/search/searchers/tests_values.rs rename to crates/core/processor/src/search/searchers/tests_values.rs diff --git a/application/apps/indexer/processor/src/search/searchers/values.rs b/crates/core/processor/src/search/searchers/values.rs similarity index 100% rename from application/apps/indexer/processor/src/search/searchers/values.rs rename to crates/core/processor/src/search/searchers/values.rs diff --git a/application/apps/indexer/processor/src/tests/grabber_tests.rs b/crates/core/processor/src/tests/grabber_tests.rs similarity index 100% rename from application/apps/indexer/processor/src/tests/grabber_tests.rs rename to crates/core/processor/src/tests/grabber_tests.rs diff --git a/application/apps/indexer/processor/src/tests/mod.rs b/crates/core/processor/src/tests/mod.rs similarity index 100% rename from application/apps/indexer/processor/src/tests/mod.rs rename to crates/core/processor/src/tests/mod.rs diff --git a/application/apps/indexer/processor/src/text_source.rs b/crates/core/processor/src/text_source.rs similarity index 100% rename from application/apps/indexer/processor/src/text_source.rs rename to crates/core/processor/src/text_source.rs diff --git a/application/apps/indexer/processor/test_samples/detecting/simple_regex_1/expected.format b/crates/core/processor/test_samples/detecting/simple_regex_1/expected.format similarity index 100% rename from application/apps/indexer/processor/test_samples/detecting/simple_regex_1/expected.format rename to crates/core/processor/test_samples/detecting/simple_regex_1/expected.format diff --git a/application/apps/indexer/processor/test_samples/detecting/simple_regex_1/in.log b/crates/core/processor/test_samples/detecting/simple_regex_1/in.log similarity index 100% rename from application/apps/indexer/processor/test_samples/detecting/simple_regex_1/in.log rename to crates/core/processor/test_samples/detecting/simple_regex_1/in.log diff --git a/application/apps/indexer/processor/test_samples/detecting/simple_regex_2/expected.format b/crates/core/processor/test_samples/detecting/simple_regex_2/expected.format similarity index 100% rename from application/apps/indexer/processor/test_samples/detecting/simple_regex_2/expected.format rename to crates/core/processor/test_samples/detecting/simple_regex_2/expected.format diff --git a/application/apps/indexer/processor/test_samples/detecting/simple_regex_2/in.log b/crates/core/processor/test_samples/detecting/simple_regex_2/in.log similarity index 100% rename from application/apps/indexer/processor/test_samples/detecting/simple_regex_2/in.log rename to crates/core/processor/test_samples/detecting/simple_regex_2/in.log diff --git a/application/apps/indexer/processor/test_samples/detecting/simple_regex_3/expected.format b/crates/core/processor/test_samples/detecting/simple_regex_3/expected.format similarity index 100% rename from application/apps/indexer/processor/test_samples/detecting/simple_regex_3/expected.format rename to crates/core/processor/test_samples/detecting/simple_regex_3/expected.format diff --git a/application/apps/indexer/processor/test_samples/detecting/simple_regex_3/in.log b/crates/core/processor/test_samples/detecting/simple_regex_3/in.log similarity index 100% rename from application/apps/indexer/processor/test_samples/detecting/simple_regex_3/in.log rename to crates/core/processor/test_samples/detecting/simple_regex_3/in.log diff --git a/application/apps/indexer/processor/test_samples/detecting/simple_regex_4/expected.format b/crates/core/processor/test_samples/detecting/simple_regex_4/expected.format similarity index 100% rename from application/apps/indexer/processor/test_samples/detecting/simple_regex_4/expected.format rename to crates/core/processor/test_samples/detecting/simple_regex_4/expected.format diff --git a/application/apps/indexer/processor/test_samples/detecting/simple_regex_4/in.log b/crates/core/processor/test_samples/detecting/simple_regex_4/in.log similarity index 100% rename from application/apps/indexer/processor/test_samples/detecting/simple_regex_4/in.log rename to crates/core/processor/test_samples/detecting/simple_regex_4/in.log diff --git a/application/apps/indexer/processor/test_samples/indexing/append_one_line_non_empty/append_here.log b/crates/core/processor/test_samples/indexing/append_one_line_non_empty/append_here.log similarity index 100% rename from application/apps/indexer/processor/test_samples/indexing/append_one_line_non_empty/append_here.log rename to crates/core/processor/test_samples/indexing/append_one_line_non_empty/append_here.log diff --git a/application/apps/indexer/processor/test_samples/indexing/append_one_line_non_empty/expected.output b/crates/core/processor/test_samples/indexing/append_one_line_non_empty/expected.output similarity index 100% rename from application/apps/indexer/processor/test_samples/indexing/append_one_line_non_empty/expected.output rename to crates/core/processor/test_samples/indexing/append_one_line_non_empty/expected.output diff --git a/application/apps/indexer/processor/test_samples/indexing/append_one_line_non_empty/in.txt b/crates/core/processor/test_samples/indexing/append_one_line_non_empty/in.txt similarity index 100% rename from application/apps/indexer/processor/test_samples/indexing/append_one_line_non_empty/in.txt rename to crates/core/processor/test_samples/indexing/append_one_line_non_empty/in.txt diff --git a/application/apps/indexer/processor/test_samples/indexing/append_one_line_to_empty_file/append_here.log b/crates/core/processor/test_samples/indexing/append_one_line_to_empty_file/append_here.log similarity index 100% rename from application/apps/indexer/processor/test_samples/indexing/append_one_line_to_empty_file/append_here.log rename to crates/core/processor/test_samples/indexing/append_one_line_to_empty_file/append_here.log diff --git a/application/apps/indexer/processor/test_samples/indexing/append_one_line_to_empty_file/expected.output b/crates/core/processor/test_samples/indexing/append_one_line_to_empty_file/expected.output similarity index 100% rename from application/apps/indexer/processor/test_samples/indexing/append_one_line_to_empty_file/expected.output rename to crates/core/processor/test_samples/indexing/append_one_line_to_empty_file/expected.output diff --git a/application/apps/indexer/processor/test_samples/indexing/append_one_line_to_empty_file/in.txt b/crates/core/processor/test_samples/indexing/append_one_line_to_empty_file/in.txt similarity index 100% rename from application/apps/indexer/processor/test_samples/indexing/append_one_line_to_empty_file/in.txt rename to crates/core/processor/test_samples/indexing/append_one_line_to_empty_file/in.txt diff --git a/application/apps/indexer/processor/test_samples/indexing/empty_input/expected.output b/crates/core/processor/test_samples/indexing/empty_input/expected.output similarity index 100% rename from application/apps/indexer/processor/test_samples/indexing/empty_input/expected.output rename to crates/core/processor/test_samples/indexing/empty_input/expected.output diff --git a/application/apps/indexer/processor/test_samples/indexing/empty_input/in.txt b/crates/core/processor/test_samples/indexing/empty_input/in.txt similarity index 100% rename from application/apps/indexer/processor/test_samples/indexing/empty_input/in.txt rename to crates/core/processor/test_samples/indexing/empty_input/in.txt diff --git a/application/apps/indexer/processor/test_samples/indexing/invalid_content/expected.output b/crates/core/processor/test_samples/indexing/invalid_content/expected.output similarity index 100% rename from application/apps/indexer/processor/test_samples/indexing/invalid_content/expected.output rename to crates/core/processor/test_samples/indexing/invalid_content/expected.output diff --git a/application/apps/indexer/processor/test_samples/indexing/invalid_content/in.txt b/crates/core/processor/test_samples/indexing/invalid_content/in.txt similarity index 100% rename from application/apps/indexer/processor/test_samples/indexing/invalid_content/in.txt rename to crates/core/processor/test_samples/indexing/invalid_content/in.txt diff --git a/application/apps/indexer/processor/test_samples/indexing/multiple_lines_with_lf/expected.output b/crates/core/processor/test_samples/indexing/multiple_lines_with_lf/expected.output similarity index 100% rename from application/apps/indexer/processor/test_samples/indexing/multiple_lines_with_lf/expected.output rename to crates/core/processor/test_samples/indexing/multiple_lines_with_lf/expected.output diff --git a/application/apps/indexer/processor/test_samples/indexing/multiple_lines_with_lf/in.txt b/crates/core/processor/test_samples/indexing/multiple_lines_with_lf/in.txt similarity index 100% rename from application/apps/indexer/processor/test_samples/indexing/multiple_lines_with_lf/in.txt rename to crates/core/processor/test_samples/indexing/multiple_lines_with_lf/in.txt diff --git a/application/apps/indexer/processor/test_samples/indexing/one_line/expected.output b/crates/core/processor/test_samples/indexing/one_line/expected.output similarity index 100% rename from application/apps/indexer/processor/test_samples/indexing/one_line/expected.output rename to crates/core/processor/test_samples/indexing/one_line/expected.output diff --git a/application/apps/indexer/processor/test_samples/indexing/one_line/in.txt b/crates/core/processor/test_samples/indexing/one_line/in.txt similarity index 100% rename from application/apps/indexer/processor/test_samples/indexing/one_line/in.txt rename to crates/core/processor/test_samples/indexing/one_line/in.txt diff --git a/application/apps/indexer/processor/test_samples/indexing/one_line_with_2_nl/expected.output b/crates/core/processor/test_samples/indexing/one_line_with_2_nl/expected.output similarity index 100% rename from application/apps/indexer/processor/test_samples/indexing/one_line_with_2_nl/expected.output rename to crates/core/processor/test_samples/indexing/one_line_with_2_nl/expected.output diff --git a/application/apps/indexer/processor/test_samples/indexing/one_line_with_2_nl/in.txt b/crates/core/processor/test_samples/indexing/one_line_with_2_nl/in.txt similarity index 100% rename from application/apps/indexer/processor/test_samples/indexing/one_line_with_2_nl/in.txt rename to crates/core/processor/test_samples/indexing/one_line_with_2_nl/in.txt diff --git a/application/apps/indexer/processor/test_samples/indexing/one_line_with_crlf/expected.output b/crates/core/processor/test_samples/indexing/one_line_with_crlf/expected.output similarity index 100% rename from application/apps/indexer/processor/test_samples/indexing/one_line_with_crlf/expected.output rename to crates/core/processor/test_samples/indexing/one_line_with_crlf/expected.output diff --git a/application/apps/indexer/processor/test_samples/indexing/one_line_with_crlf/in.txt b/crates/core/processor/test_samples/indexing/one_line_with_crlf/in.txt similarity index 100% rename from application/apps/indexer/processor/test_samples/indexing/one_line_with_crlf/in.txt rename to crates/core/processor/test_samples/indexing/one_line_with_crlf/in.txt diff --git a/application/apps/indexer/processor/test_samples/indexing/one_line_with_crlf_at_beginning/expected.output b/crates/core/processor/test_samples/indexing/one_line_with_crlf_at_beginning/expected.output similarity index 100% rename from application/apps/indexer/processor/test_samples/indexing/one_line_with_crlf_at_beginning/expected.output rename to crates/core/processor/test_samples/indexing/one_line_with_crlf_at_beginning/expected.output diff --git a/application/apps/indexer/processor/test_samples/indexing/one_line_with_crlf_at_beginning/in.txt b/crates/core/processor/test_samples/indexing/one_line_with_crlf_at_beginning/in.txt similarity index 100% rename from application/apps/indexer/processor/test_samples/indexing/one_line_with_crlf_at_beginning/in.txt rename to crates/core/processor/test_samples/indexing/one_line_with_crlf_at_beginning/in.txt diff --git a/application/apps/indexer/processor/test_samples/indexing/one_line_with_nl/expected.output b/crates/core/processor/test_samples/indexing/one_line_with_nl/expected.output similarity index 100% rename from application/apps/indexer/processor/test_samples/indexing/one_line_with_nl/expected.output rename to crates/core/processor/test_samples/indexing/one_line_with_nl/expected.output diff --git a/application/apps/indexer/processor/test_samples/indexing/one_line_with_nl/in.txt b/crates/core/processor/test_samples/indexing/one_line_with_nl/in.txt similarity index 100% rename from application/apps/indexer/processor/test_samples/indexing/one_line_with_nl/in.txt rename to crates/core/processor/test_samples/indexing/one_line_with_nl/in.txt diff --git a/application/apps/indexer/processor/test_samples/indexing/ten_lines_with_lf/expected.output b/crates/core/processor/test_samples/indexing/ten_lines_with_lf/expected.output similarity index 100% rename from application/apps/indexer/processor/test_samples/indexing/ten_lines_with_lf/expected.output rename to crates/core/processor/test_samples/indexing/ten_lines_with_lf/expected.output diff --git a/application/apps/indexer/processor/test_samples/indexing/ten_lines_with_lf/in.txt b/crates/core/processor/test_samples/indexing/ten_lines_with_lf/in.txt similarity index 100% rename from application/apps/indexer/processor/test_samples/indexing/ten_lines_with_lf/in.txt rename to crates/core/processor/test_samples/indexing/ten_lines_with_lf/in.txt diff --git a/application/apps/indexer/session/Cargo.toml b/crates/core/session/Cargo.toml similarity index 87% rename from application/apps/indexer/session/Cargo.toml rename to crates/core/session/Cargo.toml index 5e5b7c2f2b..101a20d6dc 100644 --- a/application/apps/indexer/session/Cargo.toml +++ b/crates/core/session/Cargo.toml @@ -8,32 +8,36 @@ edition.workspace = true workspace = true [dependencies] -blake3.workspace = true -dirs.workspace = true -dlt-core = { workspace = true, features = ["statistics", "serialization"] } +# Internal crates file-tools.workspace = true shell-tools.workspace = true -futures.workspace = true indexer_base.workspace = true -lazy_static.workspace = true -log.workspace = true merging.workspace = true -mime_guess = "2.0" parsers.workspace = true processor.workspace = true -rustc-hash = "2.1" -stypes = { workspace = true, features=["rustcore"] } +stypes.workspace = true +sources.workspace = true +plugins_host.workspace = true + +# External crates +blake3.workspace = true +dirs.workspace = true +dlt-core = { workspace = true, features = ["statistics", "serialization"] } +futures.workspace = true +lazy_static.workspace = true +log.workspace = true +mime_guess.workspace = true +rustc-hash.workspace = true serde = { workspace = true , features = ["derive"] } +bincode.workspace = true serde_json.workspace = true serialport.workspace = true -sources.workspace = true thiserror.workspace = true tokio = { workspace = true , features = ["full"] } tokio-stream.workspace = true tokio-util.workspace = true uuid = { workspace = true , features = ["serde", "v4"] } walkdir.workspace = true -plugins_host.workspace = true [dev-dependencies] lazy_static.workspace = true diff --git a/application/apps/indexer/session/src/handlers/export_raw.rs b/crates/core/session/src/handlers/export_raw.rs similarity index 100% rename from application/apps/indexer/session/src/handlers/export_raw.rs rename to crates/core/session/src/handlers/export_raw.rs diff --git a/application/apps/indexer/session/src/handlers/extract.rs b/crates/core/session/src/handlers/extract.rs similarity index 100% rename from application/apps/indexer/session/src/handlers/extract.rs rename to crates/core/session/src/handlers/extract.rs diff --git a/application/apps/indexer/session/src/handlers/mod.rs b/crates/core/session/src/handlers/mod.rs similarity index 100% rename from application/apps/indexer/session/src/handlers/mod.rs rename to crates/core/session/src/handlers/mod.rs diff --git a/application/apps/indexer/session/src/handlers/observe.rs b/crates/core/session/src/handlers/observe.rs similarity index 100% rename from application/apps/indexer/session/src/handlers/observe.rs rename to crates/core/session/src/handlers/observe.rs diff --git a/application/apps/indexer/session/src/handlers/observing/concat.rs b/crates/core/session/src/handlers/observing/concat.rs similarity index 100% rename from application/apps/indexer/session/src/handlers/observing/concat.rs rename to crates/core/session/src/handlers/observing/concat.rs diff --git a/application/apps/indexer/session/src/handlers/observing/file.rs b/crates/core/session/src/handlers/observing/file.rs similarity index 100% rename from application/apps/indexer/session/src/handlers/observing/file.rs rename to crates/core/session/src/handlers/observing/file.rs diff --git a/application/apps/indexer/session/src/handlers/observing/logs_writer.rs b/crates/core/session/src/handlers/observing/logs_writer.rs similarity index 100% rename from application/apps/indexer/session/src/handlers/observing/logs_writer.rs rename to crates/core/session/src/handlers/observing/logs_writer.rs diff --git a/application/apps/indexer/session/src/handlers/observing/mod.rs b/crates/core/session/src/handlers/observing/mod.rs similarity index 100% rename from application/apps/indexer/session/src/handlers/observing/mod.rs rename to crates/core/session/src/handlers/observing/mod.rs diff --git a/application/apps/indexer/session/src/handlers/observing/stream.rs b/crates/core/session/src/handlers/observing/stream.rs similarity index 100% rename from application/apps/indexer/session/src/handlers/observing/stream.rs rename to crates/core/session/src/handlers/observing/stream.rs diff --git a/application/apps/indexer/session/src/handlers/search.rs b/crates/core/session/src/handlers/search.rs similarity index 100% rename from application/apps/indexer/session/src/handlers/search.rs rename to crates/core/session/src/handlers/search.rs diff --git a/application/apps/indexer/session/src/handlers/search_values.rs b/crates/core/session/src/handlers/search_values.rs similarity index 100% rename from application/apps/indexer/session/src/handlers/search_values.rs rename to crates/core/session/src/handlers/search_values.rs diff --git a/application/apps/indexer/session/src/handlers/sleep.rs b/crates/core/session/src/handlers/sleep.rs similarity index 100% rename from application/apps/indexer/session/src/handlers/sleep.rs rename to crates/core/session/src/handlers/sleep.rs diff --git a/application/apps/indexer/session/src/lib.rs b/crates/core/session/src/lib.rs similarity index 100% rename from application/apps/indexer/session/src/lib.rs rename to crates/core/session/src/lib.rs diff --git a/application/apps/indexer/session/src/operations.rs b/crates/core/session/src/operations.rs similarity index 99% rename from application/apps/indexer/session/src/operations.rs rename to crates/core/session/src/operations.rs index 4f9193b741..1d12cce707 100644 --- a/application/apps/indexer/session/src/operations.rs +++ b/crates/core/session/src/operations.rs @@ -227,7 +227,7 @@ impl OperationAPI { let event = match result { Ok(result) => { if let Some(result) = result.as_ref() { - match stypes::serialize(result) { + match bincode::serialize(result) { Ok(bytes) => stypes::CallbackEvent::OperationDone(stypes::OperationDone { uuid: self.operation_id, result: Some(bytes), diff --git a/application/apps/indexer/session/src/paths.rs b/crates/core/session/src/paths.rs similarity index 100% rename from application/apps/indexer/session/src/paths.rs rename to crates/core/session/src/paths.rs diff --git a/application/apps/indexer/session/src/progress.rs b/crates/core/session/src/progress.rs similarity index 100% rename from application/apps/indexer/session/src/progress.rs rename to crates/core/session/src/progress.rs diff --git a/application/apps/indexer/session/src/session.rs b/crates/core/session/src/session.rs similarity index 100% rename from application/apps/indexer/session/src/session.rs rename to crates/core/session/src/session.rs diff --git a/application/apps/indexer/session/src/state/api.rs b/crates/core/session/src/state/api.rs similarity index 100% rename from application/apps/indexer/session/src/state/api.rs rename to crates/core/session/src/state/api.rs diff --git a/application/apps/indexer/session/src/state/attachments.rs b/crates/core/session/src/state/attachments.rs similarity index 100% rename from application/apps/indexer/session/src/state/attachments.rs rename to crates/core/session/src/state/attachments.rs diff --git a/application/apps/indexer/session/src/state/indexes/controller.rs b/crates/core/session/src/state/indexes/controller.rs similarity index 100% rename from application/apps/indexer/session/src/state/indexes/controller.rs rename to crates/core/session/src/state/indexes/controller.rs diff --git a/application/apps/indexer/session/src/state/indexes/frame.rs b/crates/core/session/src/state/indexes/frame.rs similarity index 100% rename from application/apps/indexer/session/src/state/indexes/frame.rs rename to crates/core/session/src/state/indexes/frame.rs diff --git a/application/apps/indexer/session/src/state/indexes/keys.rs b/crates/core/session/src/state/indexes/keys.rs similarity index 100% rename from application/apps/indexer/session/src/state/indexes/keys.rs rename to crates/core/session/src/state/indexes/keys.rs diff --git a/application/apps/indexer/session/src/state/indexes/map.rs b/crates/core/session/src/state/indexes/map.rs similarity index 100% rename from application/apps/indexer/session/src/state/indexes/map.rs rename to crates/core/session/src/state/indexes/map.rs diff --git a/application/apps/indexer/session/src/state/indexes/mod.rs b/crates/core/session/src/state/indexes/mod.rs similarity index 100% rename from application/apps/indexer/session/src/state/indexes/mod.rs rename to crates/core/session/src/state/indexes/mod.rs diff --git a/application/apps/indexer/session/src/state/indexes/nature.rs b/crates/core/session/src/state/indexes/nature.rs similarity index 100% rename from application/apps/indexer/session/src/state/indexes/nature.rs rename to crates/core/session/src/state/indexes/nature.rs diff --git a/application/apps/indexer/session/src/state/indexes/tests_controller.rs b/crates/core/session/src/state/indexes/tests_controller.rs similarity index 100% rename from application/apps/indexer/session/src/state/indexes/tests_controller.rs rename to crates/core/session/src/state/indexes/tests_controller.rs diff --git a/application/apps/indexer/session/src/state/indexes/tests_map_cases.rs b/crates/core/session/src/state/indexes/tests_map_cases.rs similarity index 100% rename from application/apps/indexer/session/src/state/indexes/tests_map_cases.rs rename to crates/core/session/src/state/indexes/tests_map_cases.rs diff --git a/application/apps/indexer/session/src/state/indexes/tests_map_performance.rs b/crates/core/session/src/state/indexes/tests_map_performance.rs similarity index 100% rename from application/apps/indexer/session/src/state/indexes/tests_map_performance.rs rename to crates/core/session/src/state/indexes/tests_map_performance.rs diff --git a/application/apps/indexer/session/src/state/mod.rs b/crates/core/session/src/state/mod.rs similarity index 100% rename from application/apps/indexer/session/src/state/mod.rs rename to crates/core/session/src/state/mod.rs diff --git a/application/apps/indexer/session/src/state/observed.rs b/crates/core/session/src/state/observed.rs similarity index 100% rename from application/apps/indexer/session/src/state/observed.rs rename to crates/core/session/src/state/observed.rs diff --git a/application/apps/indexer/session/src/state/searchers.rs b/crates/core/session/src/state/searchers.rs similarity index 100% rename from application/apps/indexer/session/src/state/searchers.rs rename to crates/core/session/src/state/searchers.rs diff --git a/application/apps/indexer/session/src/state/searchers/definitions.rs b/crates/core/session/src/state/searchers/definitions.rs similarity index 100% rename from application/apps/indexer/session/src/state/searchers/definitions.rs rename to crates/core/session/src/state/searchers/definitions.rs diff --git a/application/apps/indexer/session/src/state/session_file.rs b/crates/core/session/src/state/session_file.rs similarity index 100% rename from application/apps/indexer/session/src/state/session_file.rs rename to crates/core/session/src/state/session_file.rs diff --git a/application/apps/indexer/session/src/state/source_ids.rs b/crates/core/session/src/state/source_ids.rs similarity index 100% rename from application/apps/indexer/session/src/state/source_ids.rs rename to crates/core/session/src/state/source_ids.rs diff --git a/application/apps/indexer/session/src/state/values/graph.rs b/crates/core/session/src/state/values/graph.rs similarity index 100% rename from application/apps/indexer/session/src/state/values/graph.rs rename to crates/core/session/src/state/values/graph.rs diff --git a/application/apps/indexer/session/src/state/values/mod.rs b/crates/core/session/src/state/values/mod.rs similarity index 100% rename from application/apps/indexer/session/src/state/values/mod.rs rename to crates/core/session/src/state/values/mod.rs diff --git a/application/apps/indexer/session/src/tail/mod.rs b/crates/core/session/src/tail/mod.rs similarity index 100% rename from application/apps/indexer/session/src/tail/mod.rs rename to crates/core/session/src/tail/mod.rs diff --git a/application/apps/indexer/session/src/tracker.rs b/crates/core/session/src/tracker.rs similarity index 100% rename from application/apps/indexer/session/src/tracker.rs rename to crates/core/session/src/tracker.rs diff --git a/application/apps/indexer/session/src/unbound/api.rs b/crates/core/session/src/unbound/api.rs similarity index 100% rename from application/apps/indexer/session/src/unbound/api.rs rename to crates/core/session/src/unbound/api.rs diff --git a/application/apps/indexer/session/src/unbound/cleanup.rs b/crates/core/session/src/unbound/cleanup.rs similarity index 100% rename from application/apps/indexer/session/src/unbound/cleanup.rs rename to crates/core/session/src/unbound/cleanup.rs diff --git a/application/apps/indexer/session/src/unbound/commands/cancel_test.rs b/crates/core/session/src/unbound/commands/cancel_test.rs similarity index 100% rename from application/apps/indexer/session/src/unbound/commands/cancel_test.rs rename to crates/core/session/src/unbound/commands/cancel_test.rs diff --git a/application/apps/indexer/session/src/unbound/commands/checksum.rs b/crates/core/session/src/unbound/commands/checksum.rs similarity index 100% rename from application/apps/indexer/session/src/unbound/commands/checksum.rs rename to crates/core/session/src/unbound/commands/checksum.rs diff --git a/application/apps/indexer/session/src/unbound/commands/dlt.rs b/crates/core/session/src/unbound/commands/dlt.rs similarity index 100% rename from application/apps/indexer/session/src/unbound/commands/dlt.rs rename to crates/core/session/src/unbound/commands/dlt.rs diff --git a/application/apps/indexer/session/src/unbound/commands/file.rs b/crates/core/session/src/unbound/commands/file.rs similarity index 100% rename from application/apps/indexer/session/src/unbound/commands/file.rs rename to crates/core/session/src/unbound/commands/file.rs diff --git a/application/apps/indexer/session/src/unbound/commands/folder.rs b/crates/core/session/src/unbound/commands/folder.rs similarity index 100% rename from application/apps/indexer/session/src/unbound/commands/folder.rs rename to crates/core/session/src/unbound/commands/folder.rs diff --git a/application/apps/indexer/session/src/unbound/commands/mod.rs b/crates/core/session/src/unbound/commands/mod.rs similarity index 100% rename from application/apps/indexer/session/src/unbound/commands/mod.rs rename to crates/core/session/src/unbound/commands/mod.rs diff --git a/application/apps/indexer/session/src/unbound/commands/plugins.rs b/crates/core/session/src/unbound/commands/plugins.rs similarity index 100% rename from application/apps/indexer/session/src/unbound/commands/plugins.rs rename to crates/core/session/src/unbound/commands/plugins.rs diff --git a/application/apps/indexer/session/src/unbound/commands/regex.rs b/crates/core/session/src/unbound/commands/regex.rs similarity index 100% rename from application/apps/indexer/session/src/unbound/commands/regex.rs rename to crates/core/session/src/unbound/commands/regex.rs diff --git a/application/apps/indexer/session/src/unbound/commands/serial.rs b/crates/core/session/src/unbound/commands/serial.rs similarity index 100% rename from application/apps/indexer/session/src/unbound/commands/serial.rs rename to crates/core/session/src/unbound/commands/serial.rs diff --git a/application/apps/indexer/session/src/unbound/commands/shells.rs b/crates/core/session/src/unbound/commands/shells.rs similarity index 100% rename from application/apps/indexer/session/src/unbound/commands/shells.rs rename to crates/core/session/src/unbound/commands/shells.rs diff --git a/application/apps/indexer/session/src/unbound/commands/sleep.rs b/crates/core/session/src/unbound/commands/sleep.rs similarity index 100% rename from application/apps/indexer/session/src/unbound/commands/sleep.rs rename to crates/core/session/src/unbound/commands/sleep.rs diff --git a/application/apps/indexer/session/src/unbound/commands/someip.rs b/crates/core/session/src/unbound/commands/someip.rs similarity index 100% rename from application/apps/indexer/session/src/unbound/commands/someip.rs rename to crates/core/session/src/unbound/commands/someip.rs diff --git a/application/apps/indexer/session/src/unbound/mod.rs b/crates/core/session/src/unbound/mod.rs similarity index 100% rename from application/apps/indexer/session/src/unbound/mod.rs rename to crates/core/session/src/unbound/mod.rs diff --git a/application/apps/indexer/session/src/unbound/signal.rs b/crates/core/session/src/unbound/signal.rs similarity index 100% rename from application/apps/indexer/session/src/unbound/signal.rs rename to crates/core/session/src/unbound/signal.rs diff --git a/application/apps/indexer/session/tests/lib.rs b/crates/core/session/tests/lib.rs similarity index 100% rename from application/apps/indexer/session/tests/lib.rs rename to crates/core/session/tests/lib.rs diff --git a/application/apps/indexer/session/tests/snapshot_tests/mod.rs b/crates/core/session/tests/snapshot_tests/mod.rs similarity index 70% rename from application/apps/indexer/session/tests/snapshot_tests/mod.rs rename to crates/core/session/tests/snapshot_tests/mod.rs index c955927871..cfcacd4f39 100644 --- a/application/apps/indexer/session/tests/snapshot_tests/mod.rs +++ b/crates/core/session/tests/snapshot_tests/mod.rs @@ -1,19 +1,12 @@ -//! Snapshot testing is set here using the crate `insta` and optionally its CLI tool `cargo-insta`. +//! Snapshot tests for session output using `insta`. //! -//! Each test will created a snapshot file for its results, which will be saved with the path -//! './snapshots/{test_name}.snap'. These files will be used as reference for future tests then -//! tests will fail on changes. -//! Changes can be seen in our build CLI tool and can be accepted via CLI arguments, however it's -//! better to use the CLI tool `cargo insta` because it's output is colored and more clear compared -//! to the build CLI tool and it provides the possibility to review and accept each change one by -//! one, on the contrary to our build tool than can only accept all changes at once. +//! Snapshots are stored in `./snapshots/{test_name}.snap` and are part of the repository. +//! Valid snapshot changes must be reviewed and committed with the code that caused them. //! -//! Snapshot files are parts of the repository and valid changes in them must be committed as well. +//! Run `just test-snapshots` to execute these tests in CI mode. CI mode fails on snapshot +//! mismatches without writing `{name}.snap.new` files. //! -//! Running the tests via `cargo test` will create temporary files with the name pattern -//! '{name}.snap.new'. These files are used by `cargo-insta` tool and they aren't part of the -//! repo history. -//! Running the tests via `cargo chipmunk test` will avoid creating these temporary files. +//! For local review of intentional changes, install `cargo-insta` and run `cargo insta review`. mod utls; @@ -22,7 +15,7 @@ use utls::*; #[tokio::test] async fn observe_dlt_session() { - let input = "../../../developing/resources/attachments.dlt"; + let input = "../../../development/resources/attachments.dlt"; let parser_settings = stypes::DltParserSettings::default(); let session_main_file = run_observe_session( input, @@ -45,8 +38,8 @@ async fn observe_dlt_session() { #[tokio::test] async fn observe_dlt_with_someip_session() { - let input = "../../../developing/resources/someip.dlt"; - let fibex_file = "../../../developing/resources/someip.xml"; + let input = "../../../development/resources/someip.dlt"; + let fibex_file = "../../../development/resources/someip.xml"; assert!( PathBuf::from(fibex_file).exists(), @@ -81,8 +74,8 @@ async fn observe_dlt_with_someip_session() { // on CPU heavy blocks. #[tokio::test(flavor = "multi_thread", worker_threads = 1)] async fn observe_someip_bcapng_session() { - let input = "../../../developing/resources/someip.pcapng"; - let fibex_file = "../../../developing/resources/someip.xml"; + let input = "../../../development/resources/someip.pcapng"; + let fibex_file = "../../../development/resources/someip.xml"; assert!( PathBuf::from(fibex_file).exists(), @@ -116,8 +109,8 @@ async fn observe_someip_bcapng_session() { // on CPU heavy blocks. #[tokio::test(flavor = "multi_thread", worker_threads = 1)] async fn observe_someip_legacy_session() { - let input = "../../../developing/resources/someip.pcap"; - let fibex_file = "../../../developing/resources/someip.xml"; + let input = "../../../development/resources/someip.pcap"; + let fibex_file = "../../../development/resources/someip.xml"; assert!( PathBuf::from(fibex_file).exists(), diff --git a/application/apps/indexer/session/tests/snapshot_tests/snapshots/.gitignore b/crates/core/session/tests/snapshot_tests/snapshots/.gitignore similarity index 100% rename from application/apps/indexer/session/tests/snapshot_tests/snapshots/.gitignore rename to crates/core/session/tests/snapshot_tests/snapshots/.gitignore diff --git a/application/apps/indexer/session/tests/snapshot_tests/snapshots/observe_dlt_session.snap b/crates/core/session/tests/snapshot_tests/snapshots/observe_dlt_session.snap similarity index 100% rename from application/apps/indexer/session/tests/snapshot_tests/snapshots/observe_dlt_session.snap rename to crates/core/session/tests/snapshot_tests/snapshots/observe_dlt_session.snap diff --git a/application/apps/indexer/session/tests/snapshot_tests/snapshots/observe_dlt_with_someip_session.snap b/crates/core/session/tests/snapshot_tests/snapshots/observe_dlt_with_someip_session.snap similarity index 97% rename from application/apps/indexer/session/tests/snapshot_tests/snapshots/observe_dlt_with_someip_session.snap rename to crates/core/session/tests/snapshot_tests/snapshots/observe_dlt_with_someip_session.snap index 14e9a15ebf..9e9b1eb5eb 100644 --- a/application/apps/indexer/session/tests/snapshot_tests/snapshots/observe_dlt_with_someip_session.snap +++ b/crates/core/session/tests/snapshot_tests/snapshots/observe_dlt_with_someip_session.snap @@ -4,7 +4,7 @@ description: Snapshot for DLT file with SomeIP network trace. info: filter_config: ~ fibex_file_paths: - - "../../../developing/resources/someip.xml" + - "../../../development/resources/someip.xml" with_storage_header: true tz: ~ snapshot_kind: text diff --git a/application/apps/indexer/session/tests/snapshot_tests/snapshots/observe_someip_bcapng_session.snap b/crates/core/session/tests/snapshot_tests/snapshots/observe_someip_bcapng_session.snap similarity index 99% rename from application/apps/indexer/session/tests/snapshot_tests/snapshots/observe_someip_bcapng_session.snap rename to crates/core/session/tests/snapshot_tests/snapshots/observe_someip_bcapng_session.snap index b68202b7f8..4327c667bb 100644 --- a/application/apps/indexer/session/tests/snapshot_tests/snapshots/observe_someip_bcapng_session.snap +++ b/crates/core/session/tests/snapshot_tests/snapshots/observe_someip_bcapng_session.snap @@ -3,7 +3,7 @@ source: session/tests/snapshot_tests/mod.rs description: Snapshot for SomeIP file with Pcapng byte source. info: fibex_file_paths: - - "../../../developing/resources/someip.xml" + - "../../../development/resources/someip.xml" snapshot_kind: text --- session_file: diff --git a/application/apps/indexer/session/tests/snapshot_tests/snapshots/observe_someip_legacy_session.snap b/crates/core/session/tests/snapshot_tests/snapshots/observe_someip_legacy_session.snap similarity index 99% rename from application/apps/indexer/session/tests/snapshot_tests/snapshots/observe_someip_legacy_session.snap rename to crates/core/session/tests/snapshot_tests/snapshots/observe_someip_legacy_session.snap index 2557d86c56..32d85080ee 100644 --- a/application/apps/indexer/session/tests/snapshot_tests/snapshots/observe_someip_legacy_session.snap +++ b/crates/core/session/tests/snapshot_tests/snapshots/observe_someip_legacy_session.snap @@ -3,7 +3,7 @@ source: session/tests/snapshot_tests/mod.rs description: Snapshot for SomeIP file with Pcap Legacy byte source. info: fibex_file_paths: - - "../../../developing/resources/someip.xml" + - "../../../development/resources/someip.xml" snapshot_kind: text --- session_file: diff --git a/application/apps/indexer/session/tests/snapshot_tests/utls.rs b/crates/core/session/tests/snapshot_tests/utls.rs similarity index 100% rename from application/apps/indexer/session/tests/snapshot_tests/utls.rs rename to crates/core/session/tests/snapshot_tests/utls.rs diff --git a/application/apps/indexer/addons/someip-tools/Cargo.toml b/crates/core/someip-tools/Cargo.toml similarity index 89% rename from application/apps/indexer/addons/someip-tools/Cargo.toml rename to crates/core/someip-tools/Cargo.toml index 0100a85edf..c1c326d84c 100644 --- a/application/apps/indexer/addons/someip-tools/Cargo.toml +++ b/crates/core/someip-tools/Cargo.toml @@ -7,7 +7,7 @@ edition.workspace = true workspace = true [dependencies] -nom = "7.1" +nom.workspace = true thiserror.workspace = true [dev-dependencies] diff --git a/application/apps/indexer/addons/someip-tools/src/lib.rs b/crates/core/someip-tools/src/lib.rs similarity index 100% rename from application/apps/indexer/addons/someip-tools/src/lib.rs rename to crates/core/someip-tools/src/lib.rs diff --git a/application/apps/indexer/sources/Cargo.toml b/crates/core/sources/Cargo.toml similarity index 70% rename from application/apps/indexer/sources/Cargo.toml rename to crates/core/sources/Cargo.toml index f8a87616da..dfbeb82b5b 100644 --- a/application/apps/indexer/sources/Cargo.toml +++ b/crates/core/sources/Cargo.toml @@ -8,24 +8,27 @@ edition.workspace = true workspace = true [dependencies] +# Internal crates bufread.workspace = true -bytes = "1.3" -etherparse = "0.16" +stypes.workspace = true + +# External crates +bytes.workspace = true +etherparse.workspace = true futures.workspace = true log.workspace = true -pcap-parser = "0.16" +pcap-parser.workspace = true thiserror.workspace = true tokio.workspace = true -tokio-serial = "5.4" +tokio-serial.workspace = true tokio-stream.workspace = true tokio-util = { workspace = true , features = ["full"] } serde = { workspace = true, features = ["derive"] } uuid = { workspace = true , features = ["serde", "v4"] } -stypes = { workspace = true, features=["rustcore"] } -socket2 = "0.5.8" +socket2.workspace = true [target.'cfg(windows)'.dependencies] -shell-tools = { path = "../addons/shell-tools" } +shell-tools.workspace = true [dev-dependencies] env_logger.workspace = true diff --git a/application/apps/indexer/sources/samples/minimal.pcapng b/crates/core/sources/samples/minimal.pcapng similarity index 100% rename from application/apps/indexer/sources/samples/minimal.pcapng rename to crates/core/sources/samples/minimal.pcapng diff --git a/application/apps/indexer/sources/src/binary/mod.rs b/crates/core/sources/src/binary/mod.rs similarity index 100% rename from application/apps/indexer/sources/src/binary/mod.rs rename to crates/core/sources/src/binary/mod.rs diff --git a/application/apps/indexer/sources/src/binary/pcap/legacy.rs b/crates/core/sources/src/binary/pcap/legacy.rs similarity index 99% rename from application/apps/indexer/sources/src/binary/pcap/legacy.rs rename to crates/core/sources/src/binary/pcap/legacy.rs index 64786938ea..2b527c8ded 100644 --- a/application/apps/indexer/sources/src/binary/pcap/legacy.rs +++ b/crates/core/sources/src/binary/pcap/legacy.rs @@ -210,7 +210,7 @@ mod tests { #[tokio::test] async fn test_general_source_reload() { - // This is part of the file "chipmunk/application/developing/resources". + // This is part of a sample file in "chipmunk/development/resources". // In this test we just need enough bytes to call reload twice on it, and we will not // call parse on any of this data. const SAMPLE_PCAP_DATA: &[u8] = &[ diff --git a/application/apps/indexer/sources/src/binary/pcap/mod.rs b/crates/core/sources/src/binary/pcap/mod.rs similarity index 100% rename from application/apps/indexer/sources/src/binary/pcap/mod.rs rename to crates/core/sources/src/binary/pcap/mod.rs diff --git a/application/apps/indexer/sources/src/binary/pcap/ng.rs b/crates/core/sources/src/binary/pcap/ng.rs similarity index 100% rename from application/apps/indexer/sources/src/binary/pcap/ng.rs rename to crates/core/sources/src/binary/pcap/ng.rs diff --git a/application/apps/indexer/sources/src/binary/raw.rs b/crates/core/sources/src/binary/raw.rs similarity index 100% rename from application/apps/indexer/sources/src/binary/raw.rs rename to crates/core/sources/src/binary/raw.rs diff --git a/application/apps/indexer/sources/src/command/mod.rs b/crates/core/sources/src/command/mod.rs similarity index 100% rename from application/apps/indexer/sources/src/command/mod.rs rename to crates/core/sources/src/command/mod.rs diff --git a/application/apps/indexer/sources/src/command/process.rs b/crates/core/sources/src/command/process.rs similarity index 100% rename from application/apps/indexer/sources/src/command/process.rs rename to crates/core/sources/src/command/process.rs diff --git a/application/apps/indexer/sources/src/lib.rs b/crates/core/sources/src/lib.rs similarity index 100% rename from application/apps/indexer/sources/src/lib.rs rename to crates/core/sources/src/lib.rs diff --git a/application/apps/indexer/sources/src/sde.rs b/crates/core/sources/src/sde.rs similarity index 100% rename from application/apps/indexer/sources/src/sde.rs rename to crates/core/sources/src/sde.rs diff --git a/application/apps/indexer/sources/src/serial/mod.rs b/crates/core/sources/src/serial/mod.rs similarity index 100% rename from application/apps/indexer/sources/src/serial/mod.rs rename to crates/core/sources/src/serial/mod.rs diff --git a/application/apps/indexer/sources/src/serial/serialport.rs b/crates/core/sources/src/serial/serialport.rs similarity index 100% rename from application/apps/indexer/sources/src/serial/serialport.rs rename to crates/core/sources/src/serial/serialport.rs diff --git a/application/apps/indexer/sources/src/socket/mod.rs b/crates/core/sources/src/socket/mod.rs similarity index 100% rename from application/apps/indexer/sources/src/socket/mod.rs rename to crates/core/sources/src/socket/mod.rs diff --git a/application/apps/indexer/sources/src/socket/tcp.rs b/crates/core/sources/src/socket/tcp.rs similarity index 100% rename from application/apps/indexer/sources/src/socket/tcp.rs rename to crates/core/sources/src/socket/tcp.rs diff --git a/application/apps/indexer/sources/src/socket/tcp/reconnect.rs b/crates/core/sources/src/socket/tcp/reconnect.rs similarity index 100% rename from application/apps/indexer/sources/src/socket/tcp/reconnect.rs rename to crates/core/sources/src/socket/tcp/reconnect.rs diff --git a/application/apps/indexer/sources/src/socket/udp.rs b/crates/core/sources/src/socket/udp.rs similarity index 100% rename from application/apps/indexer/sources/src/socket/udp.rs rename to crates/core/sources/src/socket/udp.rs diff --git a/application/apps/indexer/sources/src/tests/mock_read.rs b/crates/core/sources/src/tests/mock_read.rs similarity index 100% rename from application/apps/indexer/sources/src/tests/mock_read.rs rename to crates/core/sources/src/tests/mock_read.rs diff --git a/application/apps/indexer/sources/src/tests/mod.rs b/crates/core/sources/src/tests/mod.rs similarity index 100% rename from application/apps/indexer/sources/src/tests/mod.rs rename to crates/core/sources/src/tests/mod.rs diff --git a/application/apps/indexer/sources/src/usecases.plant b/crates/core/sources/src/usecases.plant similarity index 100% rename from application/apps/indexer/sources/src/usecases.plant rename to crates/core/sources/src/usecases.plant diff --git a/application/apps/indexer/addons/text_grep/Cargo.toml b/crates/core/text_grep/Cargo.toml similarity index 93% rename from application/apps/indexer/addons/text_grep/Cargo.toml rename to crates/core/text_grep/Cargo.toml index b9147875e4..6293d92dc6 100644 --- a/application/apps/indexer/addons/text_grep/Cargo.toml +++ b/crates/core/text_grep/Cargo.toml @@ -13,8 +13,11 @@ workspace = true # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -tokio = { workspace = true, features = ["full"] } +# Internal crates bufread.workspace = true + +# External crates +tokio = { workspace = true, features = ["full"] } tokio-util.workspace = true grep-searcher.workspace = true grep-regex.workspace = true diff --git a/application/apps/indexer/addons/text_grep/README.md b/crates/core/text_grep/README.md similarity index 100% rename from application/apps/indexer/addons/text_grep/README.md rename to crates/core/text_grep/README.md diff --git a/application/apps/indexer/addons/text_grep/src/buffer.rs b/crates/core/text_grep/src/buffer.rs similarity index 100% rename from application/apps/indexer/addons/text_grep/src/buffer.rs rename to crates/core/text_grep/src/buffer.rs diff --git a/application/apps/indexer/addons/text_grep/src/lib.rs b/crates/core/text_grep/src/lib.rs similarity index 100% rename from application/apps/indexer/addons/text_grep/src/lib.rs rename to crates/core/text_grep/src/lib.rs diff --git a/application/apps/indexer/addons/text_grep/tests/grep_tests.rs b/crates/core/text_grep/tests/grep_tests.rs similarity index 100% rename from application/apps/indexer/addons/text_grep/tests/grep_tests.rs rename to crates/core/text_grep/tests/grep_tests.rs diff --git a/cli/development-cli/dir_checksum/Cargo.toml b/crates/dir_checksum/Cargo.toml similarity index 73% rename from cli/development-cli/dir_checksum/Cargo.toml rename to crates/dir_checksum/Cargo.toml index b4bdfb1934..c87cffff62 100644 --- a/cli/development-cli/dir_checksum/Cargo.toml +++ b/crates/dir_checksum/Cargo.toml @@ -6,12 +6,12 @@ edition = "2024" description = "A Library which provides methods to calculate the checksum of the files in a given path recursively considering `gitignore` rules" [dependencies] -blake3 = { version = "1", features = ["rayon"] } -ignore = "0.4" -memmap2 = "0.9" +blake3 = { workspace = true, features = ["rayon"] } +ignore.workspace = true +memmap2.workspace = true rayon.workspace = true -thiserror = "2" -log = "0.4" +thiserror.workspace = true +log.workspace = true [dev-dependencies] tempdir.workspace = true diff --git a/cli/development-cli/dir_checksum/src/file_hash_digest.rs b/crates/dir_checksum/src/file_hash_digest.rs similarity index 100% rename from cli/development-cli/dir_checksum/src/file_hash_digest.rs rename to crates/dir_checksum/src/file_hash_digest.rs diff --git a/cli/development-cli/dir_checksum/src/hash_digest.rs b/crates/dir_checksum/src/hash_digest.rs similarity index 100% rename from cli/development-cli/dir_checksum/src/hash_digest.rs rename to crates/dir_checksum/src/hash_digest.rs diff --git a/cli/development-cli/dir_checksum/src/hash_error.rs b/crates/dir_checksum/src/hash_error.rs similarity index 100% rename from cli/development-cli/dir_checksum/src/hash_error.rs rename to crates/dir_checksum/src/hash_error.rs diff --git a/cli/development-cli/dir_checksum/src/input.rs b/crates/dir_checksum/src/input.rs similarity index 100% rename from cli/development-cli/dir_checksum/src/input.rs rename to crates/dir_checksum/src/input.rs diff --git a/cli/development-cli/dir_checksum/src/lib.rs b/crates/dir_checksum/src/lib.rs similarity index 100% rename from cli/development-cli/dir_checksum/src/lib.rs rename to crates/dir_checksum/src/lib.rs diff --git a/cli/development-cli/dir_checksum/tests/integration_tests.rs b/crates/dir_checksum/tests/integration_tests.rs similarity index 100% rename from cli/development-cli/dir_checksum/tests/integration_tests.rs rename to crates/dir_checksum/tests/integration_tests.rs diff --git a/application/apps/indexer/addons/file-tools/Cargo.toml b/crates/file-tools/Cargo.toml similarity index 90% rename from application/apps/indexer/addons/file-tools/Cargo.toml rename to crates/file-tools/Cargo.toml index 0fd0410a6b..e21d839cdf 100644 --- a/application/apps/indexer/addons/file-tools/Cargo.toml +++ b/crates/file-tools/Cargo.toml @@ -9,4 +9,4 @@ workspace = true # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -anyhow = "1.0" +anyhow.workspace = true diff --git a/application/apps/indexer/addons/file-tools/src/lib.rs b/crates/file-tools/src/lib.rs similarity index 68% rename from application/apps/indexer/addons/file-tools/src/lib.rs rename to crates/file-tools/src/lib.rs index 8dc4b30e22..19b3f96d03 100644 --- a/application/apps/indexer/addons/file-tools/src/lib.rs +++ b/crates/file-tools/src/lib.rs @@ -28,9 +28,8 @@ mod test { #[test] fn test_fetch_starting_chunk() -> Result<()> { - let chunks: Vec = fetch_starting_chunk(Path::new( - "../../../../developing/resources/chinese_poem.txt", - ))?; + let chunks: Vec = + fetch_starting_chunk(Path::new("../../development/resources/chinese_poem.txt"))?; assert_eq!(chunks[0..5], [32, 32, 32, 32, 229]); Ok(()) } @@ -38,7 +37,10 @@ mod test { #[test] fn test_fetch_starting_chunk_when_file_is_missing() -> Result<()> { assert!( - fetch_starting_chunk(Path::new("../../developing/resources/chinese_poem.txt")).is_err() + fetch_starting_chunk(Path::new( + "../../development/resources/missing_chinese_poem.txt" + )) + .is_err() ); Ok(()) } @@ -46,7 +48,7 @@ mod test { #[test] fn test_fetch_starting_chunk_when_file_is_empty() -> Result<()> { let chunks: Vec = - fetch_starting_chunk(Path::new("../../../../developing/resources/empty.txt"))?; + fetch_starting_chunk(Path::new("../../development/resources/empty.txt"))?; assert_eq!(chunks, []); Ok(()) } @@ -54,13 +56,13 @@ mod test { #[test] fn test_is_binary_when_file_is_binary() -> Result<()> { assert!(is_binary(String::from( - "../../../../developing/resources/attachments.dlt" + "../../development/resources/attachments.dlt" ))?); assert!(is_binary(String::from( - "../../../../developing/resources/someip.pcap" + "../../development/resources/someip.pcap" ))?); assert!(is_binary(String::from( - "../../../../developing/resources/someip.pcapng" + "../../development/resources/someip.pcapng" ))?); Ok(()) } @@ -68,27 +70,27 @@ mod test { #[test] fn test_is_binary_when_file_is_not_binary() -> Result<()> { assert!(!is_binary(String::from( - "../../../../developing/resources/chinese_poem.txt" + "../../development/resources/chinese_poem.txt" ))?); assert!(!is_binary(String::from( - "../../../../developing/resources/sample_utf_8.txt" + "../../development/resources/sample_utf_8.txt" ))?); assert!(!is_binary(String::from( - "../../../../developing/resources/someip.xml" + "../../development/resources/someip.xml" ))?); Ok(()) } #[test] fn test_is_binary_when_wrong_file_path_is_given() -> Result<()> { - assert!(is_binary(String::from("../../developing/resources/empty.text")).is_err()); + assert!(is_binary(String::from("../../development/resources/empty.text")).is_err()); Ok(()) } #[test] fn test_is_binary_when_file_is_empty() -> Result<()> { assert!(!is_binary(String::from( - "../../../../developing/resources/empty.txt" + "../../development/resources/empty.txt" ))?); Ok(()) } diff --git a/plugins/plugins_api/Cargo.toml b/crates/plugins_api/Cargo.toml similarity index 88% rename from plugins/plugins_api/Cargo.toml rename to crates/plugins_api/Cargo.toml index 1e6c6a225b..d5e55e011b 100644 --- a/plugins/plugins_api/Cargo.toml +++ b/crates/plugins_api/Cargo.toml @@ -1,16 +1,14 @@ -[workspace] - [package] name = "plugins_api" version = "0.1.0" edition = "2024" [dependencies] -log = "0.4" -wit-bindgen = "0.42" +log.workspace = true +wit-bindgen.workspace = true [dev-dependencies] -trybuild = "1.0" +trybuild.workspace = true [features] default = [] diff --git a/plugins/plugins_api/README.md b/crates/plugins_api/README.md similarity index 100% rename from plugins/plugins_api/README.md rename to crates/plugins_api/README.md diff --git a/plugins/plugins_api/open_docs.sh b/crates/plugins_api/open_docs.sh similarity index 100% rename from plugins/plugins_api/open_docs.sh rename to crates/plugins_api/open_docs.sh diff --git a/plugins/plugins_api/src/bytesource/mod.rs b/crates/plugins_api/src/bytesource/mod.rs similarity index 100% rename from plugins/plugins_api/src/bytesource/mod.rs rename to crates/plugins_api/src/bytesource/mod.rs diff --git a/plugins/plugins_api/src/lib.rs b/crates/plugins_api/src/lib.rs similarity index 100% rename from plugins/plugins_api/src/lib.rs rename to crates/plugins_api/src/lib.rs diff --git a/plugins/plugins_api/src/parser/mod.rs b/crates/plugins_api/src/parser/mod.rs similarity index 100% rename from plugins/plugins_api/src/parser/mod.rs rename to crates/plugins_api/src/parser/mod.rs diff --git a/plugins/plugins_api/src/shared/config.rs b/crates/plugins_api/src/shared/config.rs similarity index 100% rename from plugins/plugins_api/src/shared/config.rs rename to crates/plugins_api/src/shared/config.rs diff --git a/plugins/plugins_api/src/shared/logging.rs b/crates/plugins_api/src/shared/logging.rs similarity index 100% rename from plugins/plugins_api/src/shared/logging.rs rename to crates/plugins_api/src/shared/logging.rs diff --git a/plugins/plugins_api/src/shared/mod.rs b/crates/plugins_api/src/shared/mod.rs similarity index 100% rename from plugins/plugins_api/src/shared/mod.rs rename to crates/plugins_api/src/shared/mod.rs diff --git a/plugins/plugins_api/src/shared/plugin_logger.rs b/crates/plugins_api/src/shared/plugin_logger.rs similarity index 100% rename from plugins/plugins_api/src/shared/plugin_logger.rs rename to crates/plugins_api/src/shared/plugin_logger.rs diff --git a/plugins/plugins_api/src/shared/sandbox.rs b/crates/plugins_api/src/shared/sandbox.rs similarity index 100% rename from plugins/plugins_api/src/shared/sandbox.rs rename to crates/plugins_api/src/shared/sandbox.rs diff --git a/plugins/plugins_api/tests/.gitignore b/crates/plugins_api/tests/.gitignore similarity index 100% rename from plugins/plugins_api/tests/.gitignore rename to crates/plugins_api/tests/.gitignore diff --git a/plugins/plugins_api/tests/bytesource.rs b/crates/plugins_api/tests/bytesource.rs similarity index 76% rename from plugins/plugins_api/tests/bytesource.rs rename to crates/plugins_api/tests/bytesource.rs index 1b5366c9df..7f1de91136 100644 --- a/plugins/plugins_api/tests/bytesource.rs +++ b/crates/plugins_api/tests/bytesource.rs @@ -3,9 +3,12 @@ fn bytesource_macro_tests() { // Setting this env variable will tell trybuild to rewrite stderr files for failing tests // on every run to skip comparing compile error messages since they do string comparison which // could lead to false negative on different Rust versions or environments. - // SAFETY: All tests either need those variables or don't check for them + // trybuild spawns Cargo in a temporary crate that inherits root patches; quiet mode hides + // Cargo's unused-patch warnings for GUI crates that this API crate does not depend on. + // SAFETY: All tests either need those variables or don't check for them. unsafe { std::env::set_var("TRYBUILD", "overwrite"); + std::env::set_var("CARGO_TERM_QUIET", "true"); } let t = trybuild::TestCases::new(); diff --git a/plugins/plugins_api/tests/bytesource_macro/expression_fail.rs b/crates/plugins_api/tests/bytesource_macro/expression_fail.rs similarity index 100% rename from plugins/plugins_api/tests/bytesource_macro/expression_fail.rs rename to crates/plugins_api/tests/bytesource_macro/expression_fail.rs diff --git a/plugins/plugins_api/tests/bytesource_macro/extend_trait_pass.rs b/crates/plugins_api/tests/bytesource_macro/extend_trait_pass.rs similarity index 100% rename from plugins/plugins_api/tests/bytesource_macro/extend_trait_pass.rs rename to crates/plugins_api/tests/bytesource_macro/extend_trait_pass.rs diff --git a/plugins/plugins_api/tests/bytesource_macro/imp_bytesource_diff_mod_pass.rs b/crates/plugins_api/tests/bytesource_macro/imp_bytesource_diff_mod_pass.rs similarity index 100% rename from plugins/plugins_api/tests/bytesource_macro/imp_bytesource_diff_mod_pass.rs rename to crates/plugins_api/tests/bytesource_macro/imp_bytesource_diff_mod_pass.rs diff --git a/plugins/plugins_api/tests/bytesource_macro/imp_bytesource_pass.rs b/crates/plugins_api/tests/bytesource_macro/imp_bytesource_pass.rs similarity index 100% rename from plugins/plugins_api/tests/bytesource_macro/imp_bytesource_pass.rs rename to crates/plugins_api/tests/bytesource_macro/imp_bytesource_pass.rs diff --git a/plugins/plugins_api/tests/bytesource_macro/not_imp_bytesource_fail.rs b/crates/plugins_api/tests/bytesource_macro/not_imp_bytesource_fail.rs similarity index 100% rename from plugins/plugins_api/tests/bytesource_macro/not_imp_bytesource_fail.rs rename to crates/plugins_api/tests/bytesource_macro/not_imp_bytesource_fail.rs diff --git a/plugins/plugins_api/tests/parser.rs b/crates/plugins_api/tests/parser.rs similarity index 75% rename from plugins/plugins_api/tests/parser.rs rename to crates/plugins_api/tests/parser.rs index 5e4b7c8e95..08e9e7bc3f 100644 --- a/plugins/plugins_api/tests/parser.rs +++ b/crates/plugins_api/tests/parser.rs @@ -3,9 +3,12 @@ fn parser_macro_tests() { // Setting this env variable will tell trybuild to rewrite stderr files for failing tests // on every run to skip comparing compile error messages since they do string comparison which // could lead to false negative on different Rust versions or environments. - // SAFETY: All tests either need those variables or don't check for them + // trybuild spawns Cargo in a temporary crate that inherits root patches; quiet mode hides + // Cargo's unused-patch warnings for GUI crates that this API crate does not depend on. + // SAFETY: All tests either need those variables or don't check for them. unsafe { std::env::set_var("TRYBUILD", "overwrite"); + std::env::set_var("CARGO_TERM_QUIET", "true"); } let t = trybuild::TestCases::new(); diff --git a/plugins/plugins_api/tests/parser_macro/expression_fail.rs b/crates/plugins_api/tests/parser_macro/expression_fail.rs similarity index 100% rename from plugins/plugins_api/tests/parser_macro/expression_fail.rs rename to crates/plugins_api/tests/parser_macro/expression_fail.rs diff --git a/plugins/plugins_api/tests/parser_macro/extend_trait_pass.rs b/crates/plugins_api/tests/parser_macro/extend_trait_pass.rs similarity index 100% rename from plugins/plugins_api/tests/parser_macro/extend_trait_pass.rs rename to crates/plugins_api/tests/parser_macro/extend_trait_pass.rs diff --git a/plugins/plugins_api/tests/parser_macro/imp_parser_diff_mod_pass.rs b/crates/plugins_api/tests/parser_macro/imp_parser_diff_mod_pass.rs similarity index 100% rename from plugins/plugins_api/tests/parser_macro/imp_parser_diff_mod_pass.rs rename to crates/plugins_api/tests/parser_macro/imp_parser_diff_mod_pass.rs diff --git a/plugins/plugins_api/tests/parser_macro/imp_parser_pass.rs b/crates/plugins_api/tests/parser_macro/imp_parser_pass.rs similarity index 100% rename from plugins/plugins_api/tests/parser_macro/imp_parser_pass.rs rename to crates/plugins_api/tests/parser_macro/imp_parser_pass.rs diff --git a/plugins/plugins_api/tests/parser_macro/not_imp_parser_fail.rs b/crates/plugins_api/tests/parser_macro/not_imp_parser_fail.rs similarity index 100% rename from plugins/plugins_api/tests/parser_macro/not_imp_parser_fail.rs rename to crates/plugins_api/tests/parser_macro/not_imp_parser_fail.rs diff --git a/plugins/plugins_api/wit/v0.1.0/deps/bytesource/bytesource.wit b/crates/plugins_api/wit/v0.1.0/deps/bytesource/bytesource.wit similarity index 100% rename from plugins/plugins_api/wit/v0.1.0/deps/bytesource/bytesource.wit rename to crates/plugins_api/wit/v0.1.0/deps/bytesource/bytesource.wit diff --git a/plugins/plugins_api/wit/v0.1.0/deps/bytesource/types.wit b/crates/plugins_api/wit/v0.1.0/deps/bytesource/types.wit similarity index 100% rename from plugins/plugins_api/wit/v0.1.0/deps/bytesource/types.wit rename to crates/plugins_api/wit/v0.1.0/deps/bytesource/types.wit diff --git a/plugins/plugins_api/wit/v0.1.0/deps/bytesource/world.wit b/crates/plugins_api/wit/v0.1.0/deps/bytesource/world.wit similarity index 100% rename from plugins/plugins_api/wit/v0.1.0/deps/bytesource/world.wit rename to crates/plugins_api/wit/v0.1.0/deps/bytesource/world.wit diff --git a/plugins/plugins_api/wit/v0.1.0/deps/parser/parser.wit b/crates/plugins_api/wit/v0.1.0/deps/parser/parser.wit similarity index 100% rename from plugins/plugins_api/wit/v0.1.0/deps/parser/parser.wit rename to crates/plugins_api/wit/v0.1.0/deps/parser/parser.wit diff --git a/plugins/plugins_api/wit/v0.1.0/deps/parser/types.wit b/crates/plugins_api/wit/v0.1.0/deps/parser/types.wit similarity index 100% rename from plugins/plugins_api/wit/v0.1.0/deps/parser/types.wit rename to crates/plugins_api/wit/v0.1.0/deps/parser/types.wit diff --git a/plugins/plugins_api/wit/v0.1.0/deps/parser/world.wit b/crates/plugins_api/wit/v0.1.0/deps/parser/world.wit similarity index 100% rename from plugins/plugins_api/wit/v0.1.0/deps/parser/world.wit rename to crates/plugins_api/wit/v0.1.0/deps/parser/world.wit diff --git a/plugins/plugins_api/wit/v0.1.0/deps/shared/logging.wit b/crates/plugins_api/wit/v0.1.0/deps/shared/logging.wit similarity index 100% rename from plugins/plugins_api/wit/v0.1.0/deps/shared/logging.wit rename to crates/plugins_api/wit/v0.1.0/deps/shared/logging.wit diff --git a/plugins/plugins_api/wit/v0.1.0/deps/shared/sandbox.wit b/crates/plugins_api/wit/v0.1.0/deps/shared/sandbox.wit similarity index 100% rename from plugins/plugins_api/wit/v0.1.0/deps/shared/sandbox.wit rename to crates/plugins_api/wit/v0.1.0/deps/shared/sandbox.wit diff --git a/plugins/plugins_api/wit/v0.1.0/deps/shared/shared-types.wit b/crates/plugins_api/wit/v0.1.0/deps/shared/shared-types.wit similarity index 100% rename from plugins/plugins_api/wit/v0.1.0/deps/shared/shared-types.wit rename to crates/plugins_api/wit/v0.1.0/deps/shared/shared-types.wit diff --git a/plugins/plugins_api/wit/v0.1.0/deps/shared/world.wit b/crates/plugins_api/wit/v0.1.0/deps/shared/world.wit similarity index 100% rename from plugins/plugins_api/wit/v0.1.0/deps/shared/world.wit rename to crates/plugins_api/wit/v0.1.0/deps/shared/world.wit diff --git a/plugins/plugins_api/wit/v0.1.0/world.wit b/crates/plugins_api/wit/v0.1.0/world.wit similarity index 100% rename from plugins/plugins_api/wit/v0.1.0/world.wit rename to crates/plugins_api/wit/v0.1.0/world.wit diff --git a/application/apps/indexer/addons/shell-tools/Cargo.toml b/crates/shell-tools/Cargo.toml similarity index 71% rename from application/apps/indexer/addons/shell-tools/Cargo.toml rename to crates/shell-tools/Cargo.toml index 2b6be34dcb..6e05ec1a75 100644 --- a/application/apps/indexer/addons/shell-tools/Cargo.toml +++ b/crates/shell-tools/Cargo.toml @@ -4,9 +4,12 @@ version = "0.1.0" edition = "2024" [dependencies] +# Internal crates +stypes.workspace = true + +# External crates which.workspace = true log.workspace = true -stypes = { path = "../../stypes", features=["rustcore"] } [lints] workspace = true diff --git a/application/apps/indexer/addons/shell-tools/src/lib.rs b/crates/shell-tools/src/lib.rs similarity index 100% rename from application/apps/indexer/addons/shell-tools/src/lib.rs rename to crates/shell-tools/src/lib.rs diff --git a/crates/stypes/Cargo.toml b/crates/stypes/Cargo.toml new file mode 100644 index 0000000000..ce66c348bd --- /dev/null +++ b/crates/stypes/Cargo.toml @@ -0,0 +1,17 @@ +[package] +name = "stypes" +description = "Shared types" +version.workspace = true +edition.workspace = true + +[lints] +workspace = true + +[dependencies] +serde = { workspace = true, features = ["derive"] } +dlt-core = { workspace = true, features = ["fibex", "statistics", "serialization"] } +uuid = { workspace = true, features = ["serde", "v4"] } +tokio.workspace = true +thiserror.workspace = true +walkdir.workspace = true +anyhow.workspace = true diff --git a/application/apps/indexer/stypes/src/attachment/converting.rs b/crates/stypes/src/attachment/converting.rs similarity index 100% rename from application/apps/indexer/stypes/src/attachment/converting.rs rename to crates/stypes/src/attachment/converting.rs diff --git a/application/apps/indexer/stypes/src/attachment/mod.rs b/crates/stypes/src/attachment/mod.rs similarity index 69% rename from application/apps/indexer/stypes/src/attachment/mod.rs rename to crates/stypes/src/attachment/mod.rs index eea6c8d4b2..8cbb09d1e6 100644 --- a/application/apps/indexer/stypes/src/attachment/mod.rs +++ b/crates/stypes/src/attachment/mod.rs @@ -1,20 +1,9 @@ -#[cfg(feature = "rustcore")] mod converting; -#[cfg(feature = "nodejs")] -mod nodejs; -#[cfg(test)] -mod proptest; use crate::*; /// Describes the content of attached data found in the `payload` of a `dlt` message. #[derive(Debug, Serialize, Deserialize, Clone)] -#[extend::encode_decode] -#[cfg_attr( - all(test, feature = "test_and_gen"), - derive(TS), - ts(export, export_to = "attachment.ts") -)] pub struct AttachmentInfo { /// A unique identifier for the attachment. pub uuid: Uuid, @@ -26,23 +15,15 @@ pub struct AttachmentInfo { /// The file extension, if available. pub ext: Option, /// The size of the file in bytes. - #[cfg_attr(all(test, feature = "test_and_gen"), ts(type = "number"))] pub size: usize, /// The `mime` type of the file, if it could be determined. pub mime: Option, /// The log entry numbers containing the application data. Note that the application /// data may be contained in a single log entry or split into parts distributed /// across sequential log entries. - #[cfg_attr(all(test, feature = "test_and_gen"), ts(type = "number[]"))] pub messages: Vec, } /// A list of attachments. #[derive(Debug, Serialize, Deserialize, Clone)] -#[extend::encode_decode] -#[cfg_attr( - all(test, feature = "test_and_gen"), - derive(TS), - ts(export, export_to = "attachment.ts") -)] pub struct AttachmentList(pub Vec); diff --git a/application/apps/indexer/stypes/src/callback/extending.rs b/crates/stypes/src/callback/extending.rs similarity index 100% rename from application/apps/indexer/stypes/src/callback/extending.rs rename to crates/stypes/src/callback/extending.rs diff --git a/application/apps/indexer/stypes/src/callback/formating.rs b/crates/stypes/src/callback/formating.rs similarity index 100% rename from application/apps/indexer/stypes/src/callback/formating.rs rename to crates/stypes/src/callback/formating.rs diff --git a/application/apps/indexer/stypes/src/callback/mod.rs b/crates/stypes/src/callback/mod.rs similarity index 81% rename from application/apps/indexer/stypes/src/callback/mod.rs rename to crates/stypes/src/callback/mod.rs index 849408ab09..c1a5c8b1b0 100644 --- a/application/apps/indexer/stypes/src/callback/mod.rs +++ b/crates/stypes/src/callback/mod.rs @@ -1,22 +1,10 @@ -#[cfg(feature = "rustcore")] mod extending; -#[cfg(feature = "rustcore")] mod formating; -#[cfg(feature = "nodejs")] -mod nodejs; -#[cfg(test)] -mod proptest; use crate::*; /// Contains the results of an operation. #[derive(Debug, Serialize, Deserialize, Clone)] -#[extend::encode_decode] -#[cfg_attr( - all(test, feature = "test_and_gen"), - derive(TS), - ts(export, export_to = "callback.ts") -)] pub struct OperationDone { /// The unique identifier of the operation. pub uuid: Uuid, @@ -26,17 +14,10 @@ pub struct OperationDone { /// Represents events sent to the client. #[derive(Debug, Serialize, Deserialize, Clone)] -#[extend::encode_decode] -#[cfg_attr( - all(test, feature = "test_and_gen"), - derive(TS), - ts(export, export_to = "callback.ts") -)] pub enum CallbackEvent { /// Triggered when the content of the current session is updated. /// - `u64`: The current number of log entries in the stream. - /// This can be triggered with `0` when the session is created. - #[cfg_attr(all(test, feature = "test_and_gen"), ts(type = "number"))] + /// This can be triggered with `0` when the session is created. StreamUpdated(u64), /// Triggered when a file is opened within the session. @@ -48,12 +29,10 @@ pub enum CallbackEvent { /// Triggered when search results are updated. SearchUpdated { /// The number of logs with matches. Can be `0` if the search is reset on the client side. - #[cfg_attr(all(test, feature = "test_and_gen"), ts(type = "number"))] found: u64, /// A map of search conditions and their global match counts within the session. /// - `String`: The search condition. /// - `u64`: The count of matches. - #[cfg_attr(all(test, feature = "test_and_gen"), ts(type = "Map"))] stat: HashMap, }, @@ -61,7 +40,6 @@ pub enum CallbackEvent { /// the number of log entries from search results that are available for reading. IndexedMapUpdated { /// The number of log entries from search results available for reading. - #[cfg_attr(all(test, feature = "test_and_gen"), ts(type = "number"))] len: u64, }, @@ -73,16 +51,11 @@ pub enum CallbackEvent { /// Triggered when the "value map" is updated. The "value map" is used to build charts /// from search results. Always triggered immediately after `SearchUpdated`. /// - `Option>`: The value map. - #[cfg_attr( - all(test, feature = "test_and_gen"), - ts(type = "Map") - )] SearchValuesUpdated(Option>), /// Triggered whenever a new attachment is detected in the logs. AttachmentsUpdated { /// The size of the attachment in bytes. - #[cfg_attr(all(test, feature = "test_and_gen"), ts(type = "number"))] len: u64, /// The description of the attachment. attachment: AttachmentInfo, diff --git a/application/apps/indexer/stypes/src/command/dltstat/converting.rs b/crates/stypes/src/command/dltstat/converting.rs similarity index 100% rename from application/apps/indexer/stypes/src/command/dltstat/converting.rs rename to crates/stypes/src/command/dltstat/converting.rs diff --git a/application/apps/indexer/stypes/src/command/dltstat/mod.rs b/crates/stypes/src/command/dltstat/mod.rs similarity index 62% rename from application/apps/indexer/stypes/src/command/dltstat/mod.rs rename to crates/stypes/src/command/dltstat/mod.rs index 2caf117dc8..6e693d8941 100644 --- a/application/apps/indexer/stypes/src/command/dltstat/mod.rs +++ b/crates/stypes/src/command/dltstat/mod.rs @@ -1,19 +1,8 @@ -#[cfg(feature = "rustcore")] mod converting; -#[cfg(feature = "nodejs")] -mod nodejs; -#[cfg(test)] -mod proptest; use crate::*; #[derive(Clone, Serialize, Deserialize, Debug)] -#[extend::encode_decode] -#[cfg_attr( - all(test, feature = "test_and_gen"), - derive(TS), - ts(export, export_to = "command.ts") -)] pub struct DltLevelDistribution { pub non_log: usize, pub log_fatal: usize, @@ -26,12 +15,6 @@ pub struct DltLevelDistribution { } #[derive(Clone, Serialize, Deserialize, Debug)] -#[extend::encode_decode] -#[cfg_attr( - all(test, feature = "test_and_gen"), - derive(TS), - ts(export, export_to = "command.ts") -)] pub struct DltStatisticInfo { pub app_ids: Vec<(String, DltLevelDistribution)>, pub context_ids: Vec<(String, DltLevelDistribution)>, diff --git a/application/apps/indexer/stypes/src/command/extending.rs b/crates/stypes/src/command/extending.rs similarity index 100% rename from application/apps/indexer/stypes/src/command/extending.rs rename to crates/stypes/src/command/extending.rs diff --git a/application/apps/indexer/stypes/src/command/folders/extending.rs b/crates/stypes/src/command/folders/extending.rs similarity index 100% rename from application/apps/indexer/stypes/src/command/folders/extending.rs rename to crates/stypes/src/command/folders/extending.rs diff --git a/application/apps/indexer/stypes/src/command/folders/mod.rs b/crates/stypes/src/command/folders/mod.rs similarity index 73% rename from application/apps/indexer/stypes/src/command/folders/mod.rs rename to crates/stypes/src/command/folders/mod.rs index 175f3d3c2c..50c2b27dfd 100644 --- a/application/apps/indexer/stypes/src/command/folders/mod.rs +++ b/crates/stypes/src/command/folders/mod.rs @@ -1,21 +1,10 @@ -#[cfg(feature = "rustcore")] mod extending; -#[cfg(feature = "nodejs")] -mod nodejs; -#[cfg(test)] -mod proptest; use crate::*; /// Represents the type of a folder entity in the file system. #[allow(clippy::upper_case_acronyms)] #[derive(Clone, Serialize, Deserialize, Debug)] -#[extend::encode_decode] -#[cfg_attr( - all(test, feature = "test_and_gen"), - derive(TS), - ts(export, export_to = "command.ts") -)] pub enum FolderEntityType { /// A block device (e.g., a disk or partition). BlockDevice, @@ -35,12 +24,6 @@ pub enum FolderEntityType { /// Contains detailed information about a folder entity. #[derive(Clone, Serialize, Deserialize, Debug)] -#[extend::encode_decode] -#[cfg_attr( - all(test, feature = "test_and_gen"), - derive(TS), - ts(export, export_to = "command.ts") -)] pub struct FolderEntityDetails { /// The name of the file or folder. filename: String, @@ -56,12 +39,6 @@ pub struct FolderEntityDetails { /// Represents the result of scanning a folder. #[derive(Clone, Serialize, Deserialize, Debug)] -#[extend::encode_decode] -#[cfg_attr( - all(test, feature = "test_and_gen"), - derive(TS), - ts(export, export_to = "command.ts") -)] pub struct FoldersScanningResult { /// A list of folder entities found during the scan. pub list: Vec, @@ -71,12 +48,6 @@ pub struct FoldersScanningResult { /// Represents a folder entity in the file system. #[derive(Clone, Serialize, Deserialize, Debug)] -#[extend::encode_decode] -#[cfg_attr( - all(test, feature = "test_and_gen"), - derive(TS), - ts(export, export_to = "command.ts") -)] pub struct FolderEntity { /// The name of the entity (file or folder). name: String, diff --git a/application/apps/indexer/stypes/src/command/mod.rs b/crates/stypes/src/command/mod.rs similarity index 88% rename from application/apps/indexer/stypes/src/command/mod.rs rename to crates/stypes/src/command/mod.rs index 8ebea6102d..eb058a5993 100644 --- a/application/apps/indexer/stypes/src/command/mod.rs +++ b/crates/stypes/src/command/mod.rs @@ -1,11 +1,4 @@ -#[cfg(feature = "rustcore")] mod extending; -#[cfg(feature = "nodejs")] -mod nodejs; -#[cfg(test)] -mod proptest; -#[cfg(test)] -mod ts; mod dltstat; mod folders; @@ -24,7 +17,6 @@ use crate::*; /// It is only used to indicate the successful completion or interruption of a command. #[derive(Clone, Serialize, Deserialize, Debug)] #[serde(bound(deserialize = "T: DeserializeOwned"))] -#[extend::encode_decode] pub enum CommandOutcome { /// Indicates that the command was successfully completed. Finished(T), diff --git a/application/apps/indexer/stypes/src/command/profiles/extending.rs b/crates/stypes/src/command/profiles/extending.rs similarity index 100% rename from application/apps/indexer/stypes/src/command/profiles/extending.rs rename to crates/stypes/src/command/profiles/extending.rs diff --git a/application/apps/indexer/stypes/src/command/profiles/mod.rs b/crates/stypes/src/command/profiles/mod.rs similarity index 59% rename from application/apps/indexer/stypes/src/command/profiles/mod.rs rename to crates/stypes/src/command/profiles/mod.rs index cdd75a3f0c..4eb77f0b84 100644 --- a/application/apps/indexer/stypes/src/command/profiles/mod.rs +++ b/crates/stypes/src/command/profiles/mod.rs @@ -1,20 +1,9 @@ -#[cfg(feature = "rustcore")] mod extending; -#[cfg(feature = "nodejs")] -mod nodejs; -#[cfg(test)] -mod proptest; use crate::*; /// Represents most well known shells that are not used by default on OS. #[derive(Debug, Clone, Copy, Eq, PartialEq, Serialize, Deserialize)] -#[extend::encode_decode] -#[cfg_attr( - all(test, feature = "test_and_gen"), - derive(TS), - ts(export, export_to = "command.ts") -)] pub enum ShellType { Bash, Zsh, @@ -26,12 +15,6 @@ pub enum ShellType { } #[derive(Clone, Serialize, Deserialize, Debug, PartialEq, Eq)] -#[extend::encode_decode] -#[cfg_attr( - all(test, feature = "test_and_gen"), - derive(TS), - ts(export, export_to = "command.ts") -)] pub struct ShellProfile { pub shell: ShellType, /// Path to executable file of shell @@ -43,10 +26,4 @@ pub struct ShellProfile { /// This structure contains a vector of strings, where each string represents the name /// or identifier of a serial port available on the system. #[derive(Clone, Serialize, Deserialize, Debug)] -#[extend::encode_decode] -#[cfg_attr( - all(test, feature = "test_and_gen"), - derive(TS), - ts(export, export_to = "command.ts") -)] pub struct ProfileList(pub Vec); diff --git a/application/apps/indexer/stypes/src/command/serial/mod.rs b/crates/stypes/src/command/serial/mod.rs similarity index 64% rename from application/apps/indexer/stypes/src/command/serial/mod.rs rename to crates/stypes/src/command/serial/mod.rs index 69f3755b58..1e98012697 100644 --- a/application/apps/indexer/stypes/src/command/serial/mod.rs +++ b/crates/stypes/src/command/serial/mod.rs @@ -1,6 +1,3 @@ -#[cfg(test)] -mod proptest; - use crate::*; /// Represents a list of serial ports. @@ -8,10 +5,4 @@ use crate::*; /// This structure contains a vector of strings, where each string represents the name /// or identifier of a serial port available on the system. #[derive(Clone, Serialize, Deserialize, Debug)] -#[extend::encode_decode] -#[cfg_attr( - all(test, feature = "test_and_gen"), - derive(TS), - ts(export, export_to = "command.ts") -)] pub struct SerialPortsList(pub Vec); diff --git a/application/apps/indexer/stypes/src/error/converting.rs b/crates/stypes/src/error/converting.rs similarity index 100% rename from application/apps/indexer/stypes/src/error/converting.rs rename to crates/stypes/src/error/converting.rs diff --git a/application/apps/indexer/stypes/src/error/extending.rs b/crates/stypes/src/error/extending.rs similarity index 100% rename from application/apps/indexer/stypes/src/error/extending.rs rename to crates/stypes/src/error/extending.rs diff --git a/application/apps/indexer/stypes/src/error/formating.rs b/crates/stypes/src/error/formating.rs similarity index 100% rename from application/apps/indexer/stypes/src/error/formating.rs rename to crates/stypes/src/error/formating.rs diff --git a/application/apps/indexer/stypes/src/error/mod.rs b/crates/stypes/src/error/mod.rs similarity index 85% rename from application/apps/indexer/stypes/src/error/mod.rs rename to crates/stypes/src/error/mod.rs index 8a2eaa255a..9751d4a17e 100644 --- a/application/apps/indexer/stypes/src/error/mod.rs +++ b/crates/stypes/src/error/mod.rs @@ -1,12 +1,6 @@ -#[cfg(feature = "rustcore")] mod converting; -#[cfg(feature = "rustcore")] mod extending; mod formating; -#[cfg(feature = "nodejs")] -mod nodejs; -#[cfg(test)] -mod proptest; use crate::*; use thiserror::Error; @@ -14,12 +8,6 @@ use thiserror::Error; /// Indicates the severity level of an error. #[allow(clippy::upper_case_acronyms)] #[derive(Serialize, Deserialize, Debug, PartialEq, Eq, Clone)] -#[extend::encode_decode] -#[cfg_attr( - all(test, feature = "test_and_gen"), - derive(TS), - ts(export, export_to = "error.ts") -)] pub enum Severity { /// Warning level, indicates a recoverable issue. WARNING, @@ -29,12 +17,6 @@ pub enum Severity { /// Defines the source or type of an error. #[derive(Debug, Serialize, Deserialize, Clone)] -#[extend::encode_decode] -#[cfg_attr( - all(test, feature = "test_and_gen"), - derive(TS), - ts(export, export_to = "error.ts") -)] pub enum NativeErrorKind { /// The file was not found. FileNotFound, @@ -63,12 +45,6 @@ pub enum NativeErrorKind { /// Describes the details of an error. #[derive(Debug, Serialize, Deserialize, Clone)] -#[extend::encode_decode] -#[cfg_attr( - all(test, feature = "test_and_gen"), - derive(TS), - ts(export, export_to = "error.ts") -)] pub struct NativeError { /// The severity level of the error. pub severity: Severity, @@ -80,12 +56,6 @@ pub struct NativeError { /// Describes the type and details of an error. #[derive(Error, Debug, Serialize, Deserialize, Clone)] -#[extend::encode_decode] -#[cfg_attr( - all(test, feature = "test_and_gen"), - derive(TS), - ts(export, export_to = "error.ts") -)] pub enum ComputationError { /// The destination path must be defined to stream from `MessageProducer`. #[error("Destination path should be defined to stream from MessageProducer")] diff --git a/application/apps/indexer/stypes/src/lf_transition/extending.rs b/crates/stypes/src/lf_transition/extending.rs similarity index 100% rename from application/apps/indexer/stypes/src/lf_transition/extending.rs rename to crates/stypes/src/lf_transition/extending.rs diff --git a/application/apps/indexer/stypes/src/lf_transition/mod.rs b/crates/stypes/src/lf_transition/mod.rs similarity index 75% rename from application/apps/indexer/stypes/src/lf_transition/mod.rs rename to crates/stypes/src/lf_transition/mod.rs index 4b76047ce3..8d198d895d 100644 --- a/application/apps/indexer/stypes/src/lf_transition/mod.rs +++ b/crates/stypes/src/lf_transition/mod.rs @@ -1,20 +1,9 @@ -#[cfg(feature = "rustcore")] mod extending; -#[cfg(feature = "nodejs")] -mod nodejs; -#[cfg(test)] -mod proptest; use crate::*; /// Describes the progress of an operation. #[derive(Debug, Serialize, Deserialize, Clone)] -#[extend::encode_decode] -#[cfg_attr( - all(test, feature = "test_and_gen"), - derive(TS), - ts(export, export_to = "lf_transition.ts") -)] pub enum LifecycleTransition { /// The operation has started. Started { diff --git a/crates/stypes/src/lib.rs b/crates/stypes/src/lib.rs new file mode 100644 index 0000000000..fc2c4f1498 --- /dev/null +++ b/crates/stypes/src/lib.rs @@ -0,0 +1,27 @@ +//! Shared Rust data types used by the indexer core and native UI. + +mod attachment; +mod callback; +mod command; +mod error; +mod lf_transition; +mod miscellaneous; +mod observe; +mod operations; +mod plugins; +mod progress; + +pub use attachment::*; +pub use callback::*; +pub use command::*; +pub use error::*; +pub use lf_transition::*; +pub use miscellaneous::*; +pub use observe::*; +pub use operations::*; +pub use plugins::*; +pub use progress::*; + +pub(crate) use serde::{Deserialize, Serialize, de::DeserializeOwned}; +pub(crate) use std::{collections::HashMap, path::PathBuf}; +pub(crate) use uuid::Uuid; diff --git a/application/apps/indexer/stypes/src/miscellaneous/converting.rs b/crates/stypes/src/miscellaneous/converting.rs similarity index 100% rename from application/apps/indexer/stypes/src/miscellaneous/converting.rs rename to crates/stypes/src/miscellaneous/converting.rs diff --git a/application/apps/indexer/stypes/src/miscellaneous/extending.rs b/crates/stypes/src/miscellaneous/extending.rs similarity index 100% rename from application/apps/indexer/stypes/src/miscellaneous/extending.rs rename to crates/stypes/src/miscellaneous/extending.rs diff --git a/application/apps/indexer/stypes/src/miscellaneous/mod.rs b/crates/stypes/src/miscellaneous/mod.rs similarity index 56% rename from application/apps/indexer/stypes/src/miscellaneous/mod.rs rename to crates/stypes/src/miscellaneous/mod.rs index df677ac90a..0fddeff26f 100644 --- a/application/apps/indexer/stypes/src/miscellaneous/mod.rs +++ b/crates/stypes/src/miscellaneous/mod.rs @@ -1,57 +1,25 @@ -#[cfg(feature = "rustcore")] mod converting; -#[cfg(feature = "rustcore")] mod extending; -#[cfg(feature = "nodejs")] -mod nodejs; -#[cfg(test)] -mod proptest; use crate::*; #[derive(Clone, Serialize, Deserialize, Debug)] -#[extend::encode_decode] -#[cfg_attr( - all(test, feature = "test_and_gen"), - derive(TS), - ts(export, export_to = "miscellaneous.ts") -)] pub struct MapKeyValue(pub HashMap); /// Representation of ranges. We cannot use std ranges as soon as no way /// to derive Serialize, Deserialize #[derive(Clone, Serialize, Deserialize, Debug)] -#[extend::encode_decode] -#[cfg_attr( - all(test, feature = "test_and_gen"), - derive(TS), - ts(export, export_to = "miscellaneous.ts") -)] pub struct Range { - #[cfg_attr(all(test, feature = "test_and_gen"), ts(type = "number"))] pub start: u64, - #[cfg_attr(all(test, feature = "test_and_gen"), ts(type = "number"))] pub end: u64, } /// A list of ranges to read. #[derive(Clone, Serialize, Deserialize, Debug)] -#[extend::encode_decode] -#[cfg_attr( - all(test, feature = "test_and_gen"), - derive(TS), - ts(export, export_to = "miscellaneous.ts") -)] pub struct Ranges(pub Vec); /// Describes a data source. #[derive(Clone, Serialize, Deserialize, Debug)] -#[extend::encode_decode] -#[cfg_attr( - all(test, feature = "test_and_gen"), - derive(TS), - ts(export, export_to = "miscellaneous.ts") -)] pub struct SourceDefinition { /// The unique identifier of the source. pub id: u16, @@ -61,23 +29,11 @@ pub struct SourceDefinition { /// A list of data sources. #[derive(Clone, Serialize, Deserialize, Debug)] -#[extend::encode_decode] -#[cfg_attr( - all(test, feature = "test_and_gen"), - derive(TS), - ts(export, export_to = "miscellaneous.ts") -)] pub struct Sources(pub Vec); /// A request to a stream that supports feedback, such as a terminal command /// that accepts input through `stdin`. #[derive(Clone, Serialize, Deserialize, Debug)] -#[extend::encode_decode] -#[cfg_attr( - all(test, feature = "test_and_gen"), - derive(TS), - ts(export, export_to = "miscellaneous.ts") -)] pub enum SdeRequest { /// Sends a text string. WriteText(String), @@ -89,33 +45,19 @@ pub enum SdeRequest { /// with `SdeRequest` does not guarantee a response, as the behavior depends /// on the source. #[derive(Clone, Serialize, Deserialize, Debug)] -#[extend::encode_decode] -#[cfg_attr( - all(test, feature = "test_and_gen"), - derive(TS), - ts(export, export_to = "miscellaneous.ts") -)] pub struct SdeResponse { /// The number of bytes received. - #[cfg_attr(all(test, feature = "test_and_gen"), ts(type = "number"))] pub bytes: usize, } /// Information about a log entry. #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] -#[extend::encode_decode] -#[cfg_attr( - all(test, feature = "test_and_gen"), - derive(TS), - ts(export, export_to = "miscellaneous.ts") -)] pub struct GrabbedElement { /// The unique identifier of the source. pub source_id: u16, /// The textual content of the log entry. pub content: String, /// The position of the log entry in the overall stream. - #[cfg_attr(all(test, feature = "test_and_gen"), ts(type = "number"))] pub pos: usize, /// The nature of the log entry, represented as a bitmask. Possible values include: /// - `SEARCH`: Nature = Nature(1) @@ -128,40 +70,17 @@ pub struct GrabbedElement { /// A list of log entries. #[derive(Clone, Serialize, Deserialize, Debug)] -#[extend::encode_decode] -#[cfg_attr( - all(test, feature = "test_and_gen"), - derive(TS), - ts(export, export_to = "miscellaneous.ts") -)] pub struct GrabbedElementList(pub Vec); /// Data about indices (log entry numbers). Used to provide information about /// the nearest search results relative to a specific log entry number. #[derive(Clone, Serialize, Deserialize, Debug)] -#[extend::encode_decode] -#[cfg_attr( - all(test, feature = "test_and_gen"), - derive(TS), - ts(export, export_to = "miscellaneous.ts") -)] -#[cfg_attr( - all(test, feature = "test_and_gen"), - ts(type = "[number | undefined | null, number | undefined | null]") -)] pub struct AroundIndexes(pub (Option, Option)); /// Describes a match for a search condition. #[derive(Clone, Serialize, Deserialize, Debug)] -#[extend::encode_decode] -#[cfg_attr( - all(test, feature = "test_and_gen"), - derive(TS), - ts(export, export_to = "miscellaneous.ts") -)] pub struct FilterMatch { /// The index (number) of the matching log entry. - #[cfg_attr(all(test, feature = "test_and_gen"), ts(type = "number"))] pub index: u64, /// The identifiers of the filters (search conditions) that matched /// the specified log entry. @@ -170,10 +89,4 @@ pub struct FilterMatch { /// A list of matches for a search condition. #[derive(Clone, Serialize, Deserialize, Debug)] -#[extend::encode_decode] -#[cfg_attr( - all(test, feature = "test_and_gen"), - derive(TS), - ts(export, export_to = "miscellaneous.ts") -)] pub struct FilterMatchList(pub Vec); diff --git a/application/apps/indexer/stypes/src/observe/extending.rs b/crates/stypes/src/observe/extending.rs similarity index 100% rename from application/apps/indexer/stypes/src/observe/extending.rs rename to crates/stypes/src/observe/extending.rs diff --git a/application/apps/indexer/stypes/src/observe/mod.rs b/crates/stypes/src/observe/mod.rs similarity index 72% rename from application/apps/indexer/stypes/src/observe/mod.rs rename to crates/stypes/src/observe/mod.rs index cec8d79c39..8c820ea8be 100644 --- a/application/apps/indexer/stypes/src/observe/mod.rs +++ b/crates/stypes/src/observe/mod.rs @@ -1,11 +1,5 @@ -#[cfg(feature = "rustcore")] mod extending; -#[cfg(feature = "nodejs")] -mod nodejs; -#[cfg(test)] -mod proptest; -#[cfg(feature = "rustcore")] pub use extending::*; use crate::*; @@ -16,12 +10,6 @@ use dlt_core::filtering::DltFilterConfig; /// - `interface`: The address of the local interface used to join the multicast group. /// If set to `INADDR_ANY`, the system selects an appropriate interface. #[derive(Clone, Serialize, Deserialize, Debug)] -#[extend::encode_decode] -#[cfg_attr( - all(test, feature = "test_and_gen"), - derive(TS), - ts(export, export_to = "observe.ts") -)] pub struct MulticastInfo { pub multiaddr: String, pub interface: Option, @@ -29,12 +17,6 @@ pub struct MulticastInfo { /// Configuration for UDP connections. #[derive(Clone, Serialize, Deserialize, Debug)] -#[extend::encode_decode] -#[cfg_attr( - all(test, feature = "test_and_gen"), - derive(TS), - ts(export, export_to = "observe.ts") -)] pub struct UdpConnectionInfo { /// A list of multicast addresses to listen on. pub multicast_addr: Vec, @@ -43,12 +25,6 @@ pub struct UdpConnectionInfo { /// Specifies the parser to be used for processing session data. #[allow(clippy::large_enum_variant)] #[derive(Debug, Serialize, Deserialize, Clone)] -#[extend::encode_decode] -#[cfg_attr( - all(test, feature = "test_and_gen"), - derive(TS), - ts(export, export_to = "observe.ts") -)] pub enum ParserType { /// DLT parser for files (including PCAP files) or streams (TCP/UDP). Dlt(DltParserSettings), @@ -62,15 +38,8 @@ pub enum ParserType { /// Settings for the DLT parser. #[derive(Debug, Serialize, Deserialize, Clone)] -#[extend::encode_decode] -#[cfg_attr( - all(test, feature = "test_and_gen"), - derive(TS), - ts(export, export_to = "observe.ts") -)] pub struct DltParserSettings { /// Configuration for filtering DLT messages. - #[cfg_attr(all(test, feature = "test_and_gen"), ts(type = "DltFilterConfig"))] pub filter_config: Option, /// Paths to FIBEX files for additional interpretation of `payload` content. pub fibex_file_paths: Option>, @@ -85,12 +54,6 @@ pub struct DltParserSettings { /// Settings for the SomeIp parser. #[derive(Debug, Serialize, Deserialize, Clone)] -#[extend::encode_decode] -#[cfg_attr( - all(test, feature = "test_and_gen"), - derive(TS), - ts(export, export_to = "observe.ts") -)] pub struct SomeIpParserSettings { /// Paths to FIBEX files for additional interpretation of `payload` content. pub fibex_file_paths: Option>, @@ -98,12 +61,6 @@ pub struct SomeIpParserSettings { /// Describes the transport source for a session. #[derive(Debug, Serialize, Deserialize, Clone)] -#[extend::encode_decode] -#[cfg_attr( - all(test, feature = "test_and_gen"), - derive(TS), - ts(export, export_to = "observe.ts") -)] pub enum Transport { /// Terminal command execution. Process(ProcessTransportConfig), @@ -117,12 +74,6 @@ pub enum Transport { /// Configuration for executing terminal commands. #[derive(Debug, Serialize, Deserialize, Clone)] -#[extend::encode_decode] -#[cfg_attr( - all(test, feature = "test_and_gen"), - derive(TS), - ts(export, export_to = "observe.ts") -)] pub struct ProcessTransportConfig { /// The working directory for the command. pub cwd: PathBuf, @@ -134,12 +85,6 @@ pub struct ProcessTransportConfig { /// Configuration for serial port connections. #[derive(Debug, Serialize, Deserialize, Clone)] -#[extend::encode_decode] -#[cfg_attr( - all(test, feature = "test_and_gen"), - derive(TS), - ts(export, export_to = "observe.ts") -)] pub struct SerialTransportConfig { /// The path to the serial port. pub path: String, @@ -161,12 +106,6 @@ pub struct SerialTransportConfig { /// Configuration for TCP connections. #[derive(Debug, Serialize, Deserialize, Clone)] -#[extend::encode_decode] -#[cfg_attr( - all(test, feature = "test_and_gen"), - derive(TS), - ts(export, export_to = "observe.ts") -)] pub struct TCPTransportConfig { /// The address to bind the TCP connection to. pub bind_addr: String, @@ -174,12 +113,6 @@ pub struct TCPTransportConfig { /// Configuration for UDP connections. #[derive(Clone, Debug, Serialize, Deserialize)] -#[extend::encode_decode] -#[cfg_attr( - all(test, feature = "test_and_gen"), - derive(TS), - ts(export, export_to = "observe.ts") -)] pub struct UDPTransportConfig { /// The address to bind the UDP connection to. pub bind_addr: String, @@ -189,12 +122,6 @@ pub struct UDPTransportConfig { /// Supported file formats for observation. #[derive(Debug, Serialize, Deserialize, Clone, Copy, Eq, PartialEq, Hash)] -#[extend::encode_decode] -#[cfg_attr( - all(test, feature = "test_and_gen"), - derive(TS), - ts(export, export_to = "observe.ts") -)] pub enum FileFormat { PcapNG, PcapLegacy, @@ -207,12 +134,6 @@ pub enum FileFormat { /// Describes the source of data for observation. #[derive(Debug, Serialize, Deserialize, Clone)] -#[extend::encode_decode] -#[cfg_attr( - all(test, feature = "test_and_gen"), - derive(TS), - ts(export, export_to = "observe.ts") -)] pub enum ObserveOrigin { /// The source is a single file. File(String, FileFormat, PathBuf), @@ -224,12 +145,6 @@ pub enum ObserveOrigin { /// Options for observing data within a session. #[derive(Debug, Serialize, Deserialize, Clone)] -#[extend::encode_decode] -#[cfg_attr( - all(test, feature = "test_and_gen"), - derive(TS), - ts(export, export_to = "observe.ts") -)] pub struct ObserveOptions { /// The description of the data source. pub origin: ObserveOrigin, diff --git a/crates/stypes/src/operations/mod.rs b/crates/stypes/src/operations/mod.rs new file mode 100644 index 0000000000..22d00e4b6e --- /dev/null +++ b/crates/stypes/src/operations/mod.rs @@ -0,0 +1,55 @@ +use crate::*; + +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct NearestPosition { + pub index: u64, // Position in search results + pub position: u64, // Position in original stream/file +} + +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct ResultNearestPosition(pub Option); + +///(row_number, min_value_in_range, max_value_in_range, value) +/// value - can be last value in range or some kind of average +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct Point { + pub row: u64, + pub min: f64, + pub max: f64, + pub y_value: f64, +} + +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct ResultSearchValues(pub HashMap>); + +/// Scaled chart data +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct ResultScaledDistribution(pub Vec>); + +/// Used to delivery results of extracting values. That's used in the scope +/// of chart feature +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct ExtractedMatchValue { + /// The index of log entry (row number) + pub index: u64, + /// List of matches: + /// `usize` - index of filter + /// `Vec` - list of extracted values + pub values: Vec<(usize, Vec)>, +} + +/// The list of `ExtractedMatchValue` +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct ResultExtractedMatchValues(pub Vec); + +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct ResultU64(pub u64); + +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct ResultBool(pub bool); + +/// Used only for debug session lifecycle +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct ResultSleep { + pub sleep_well: bool, +} diff --git a/application/apps/indexer/stypes/src/plugins/converting.rs b/crates/stypes/src/plugins/converting.rs similarity index 100% rename from application/apps/indexer/stypes/src/plugins/converting.rs rename to crates/stypes/src/plugins/converting.rs diff --git a/application/apps/indexer/stypes/src/plugins/extending.rs b/crates/stypes/src/plugins/extending.rs similarity index 100% rename from application/apps/indexer/stypes/src/plugins/extending.rs rename to crates/stypes/src/plugins/extending.rs diff --git a/application/apps/indexer/stypes/src/plugins/mod.rs b/crates/stypes/src/plugins/mod.rs similarity index 69% rename from application/apps/indexer/stypes/src/plugins/mod.rs rename to crates/stypes/src/plugins/mod.rs index f3aa9f73f1..43e415a4cd 100644 --- a/application/apps/indexer/stypes/src/plugins/mod.rs +++ b/crates/stypes/src/plugins/mod.rs @@ -1,25 +1,12 @@ -#[cfg(feature = "rustcore")] mod converting; -#[cfg(feature = "rustcore")] mod extending; -#[cfg(feature = "nodejs")] -mod nodejs; -#[cfg(test)] -mod proptest; -#[cfg(feature = "rustcore")] pub use extending::*; use crate::*; /// Settings for the Plugins parser. #[derive(Debug, Serialize, Deserialize, Clone)] -#[extend::encode_decode] -#[cfg_attr( - all(test, feature = "test_and_gen"), - derive(TS), - ts(export, export_to = "plugins.ts") -)] pub struct PluginParserSettings { pub plugin_path: PathBuf, // General setting doesn't exist in front-end since it doesn't have real fields yet. @@ -31,24 +18,12 @@ pub struct PluginParserSettings { //TODO: This struct is a place holder currently and doesn't provide any value yet. /// General settings for all parsers as plugins #[derive(Debug, Serialize, Deserialize, Clone, Default)] -#[extend::encode_decode] -#[cfg_attr( - all(test, feature = "test_and_gen"), - derive(TS), - ts(export, export_to = "plugins.ts") -)] pub struct PluginParserGeneralSettings { pub placeholder: String, } /// Settings for the Plugin Byte-Sources. #[derive(Debug, Clone, Serialize, Deserialize)] -#[extend::encode_decode] -#[cfg_attr( - all(test, feature = "test_and_gen"), - derive(TS), - ts(export, export_to = "plugins.ts") -)] pub struct PluginByteSourceSettings { pub plugin_path: PathBuf, pub general_settings: PluginByteSourceGeneralSettings, @@ -58,24 +33,12 @@ pub struct PluginByteSourceSettings { //TODO: This struct is a place holder currently and doesn't provide any value yet. /// General settings for all byte-sources as plugins #[derive(Debug, Serialize, Deserialize, Clone, Default)] -#[extend::encode_decode] -#[cfg_attr( - all(test, feature = "test_and_gen"), - derive(TS), - ts(export, export_to = "plugins.ts") -)] pub struct PluginByteSourceGeneralSettings { pub placeholder: String, } /// Represents a configuration item, which includes an identifier and its corresponding value. #[derive(Debug, Clone, Serialize, Deserialize)] -#[extend::encode_decode] -#[cfg_attr( - all(test, feature = "test_and_gen"), - derive(TS), - ts(export, export_to = "plugins.ts") -)] pub struct PluginConfigItem { pub id: String, pub value: PluginConfigValue, @@ -83,12 +46,6 @@ pub struct PluginConfigItem { /// Represents the value of a configuration item. #[derive(Debug, Clone, Serialize, Deserialize)] -#[extend::encode_decode] -#[cfg_attr( - all(test, feature = "test_and_gen"), - derive(TS), - ts(export, export_to = "plugins.ts") -)] pub enum PluginConfigValue { Boolean(bool), Integer(i32), @@ -104,12 +61,6 @@ pub enum PluginConfigValue { /// Defines the possible input types for configuration schemas. #[derive(Debug, Clone, Serialize, Deserialize)] -#[extend::encode_decode] -#[cfg_attr( - all(test, feature = "test_and_gen"), - derive(TS), - ts(export, export_to = "plugins.ts") -)] pub enum PluginConfigSchemaType { /// Represents boolean type with the default value. Boolean(bool), @@ -129,12 +80,6 @@ pub enum PluginConfigSchemaType { /// Represents the schema for a configuration item. #[derive(Debug, Clone, Serialize, Deserialize)] -#[extend::encode_decode] -#[cfg_attr( - all(test, feature = "test_and_gen"), - derive(TS), - ts(export, export_to = "plugins.ts") -)] pub struct PluginConfigSchemaItem { pub id: String, pub title: String, @@ -144,12 +89,6 @@ pub struct PluginConfigSchemaItem { /// Represents an installed plugin entity informations and configurations. #[derive(Debug, Clone, Serialize, Deserialize)] -#[extend::encode_decode] -#[cfg_attr( - all(test, feature = "test_and_gen"), - derive(TS), - ts(export, export_to = "plugins.ts") -)] pub struct PluginEntity { /// Directory path of the plugin. Qualify as ID for the plugin. pub dir_path: PathBuf, @@ -166,12 +105,6 @@ pub struct PluginEntity { /// Represents different levels of logging severity for a plugin. #[derive(Debug, Clone, Serialize, Deserialize)] -#[extend::encode_decode] -#[cfg_attr( - all(test, feature = "test_and_gen"), - derive(TS), - ts(export, export_to = "plugins.ts") -)] pub enum PluginLogLevel { /// Represents an error message. Err, @@ -185,12 +118,6 @@ pub enum PluginLogLevel { /// Represents a log message generated by a plugin. #[derive(Debug, Clone, Serialize, Deserialize)] -#[extend::encode_decode] -#[cfg_attr( - all(test, feature = "test_and_gen"), - derive(TS), - ts(export, export_to = "plugins.ts") -)] pub struct PluginLogMessage { /// The severity level of the log message. pub level: PluginLogLevel, @@ -204,12 +131,6 @@ pub struct PluginLogMessage { /// Represented as a struct (but not just a vector) to reserve /// a space for a future fields. #[derive(Debug, Clone, Serialize, Deserialize, Default)] -#[extend::encode_decode] -#[cfg_attr( - all(test, feature = "test_and_gen"), - derive(TS), - ts(export, export_to = "plugins.ts") -)] pub struct PluginRunData { /// A collection of log messages associated with the plugin. pub logs: Vec, @@ -217,12 +138,6 @@ pub struct PluginRunData { /// Represents the informations of an invalid plugin. #[derive(Debug, Clone, Serialize, Deserialize)] -#[extend::encode_decode] -#[cfg_attr( - all(test, feature = "test_and_gen"), - derive(TS), - ts(export, export_to = "plugins.ts") -)] pub struct InvalidPluginEntity { /// Directory path of the plugin. Qualify as ID for the plugin. pub dir_path: PathBuf, @@ -232,12 +147,6 @@ pub struct InvalidPluginEntity { /// Represents the plugins metadata like title, description... #[derive(Debug, Clone, Serialize, Deserialize)] -#[extend::encode_decode] -#[cfg_attr( - all(test, feature = "test_and_gen"), - derive(TS), - ts(export, export_to = "plugins.ts") -)] pub struct PluginMetadata { pub title: String, pub description: Option, @@ -245,12 +154,6 @@ pub struct PluginMetadata { /// Represents plugins main types #[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize)] -#[extend::encode_decode] -#[cfg_attr( - all(test, feature = "test_and_gen"), - derive(TS), - ts(export, export_to = "plugins.ts") -)] pub enum PluginType { Parser, ByteSource, @@ -258,12 +161,6 @@ pub enum PluginType { /// Contains the infos and options for a valid plugin. #[derive(Debug, Clone, Serialize, Deserialize)] -#[extend::encode_decode] -#[cfg_attr( - all(test, feature = "test_and_gen"), - derive(TS), - ts(export, export_to = "plugins.ts") -)] pub struct PluginInfo { pub wasm_file_path: PathBuf, pub api_version: SemanticVersion, @@ -274,12 +171,6 @@ pub struct PluginInfo { /// Represents the semantic version used in the plugins system. #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Serialize, Deserialize)] -#[extend::encode_decode] -#[cfg_attr( - all(test, feature = "test_and_gen"), - derive(TS), - ts(export, export_to = "plugins.ts") -)] pub struct SemanticVersion { pub major: u16, pub minor: u16, @@ -288,12 +179,6 @@ pub struct SemanticVersion { /// Represents the render options (columns headers, etc.) for the plugins. #[derive(Debug, Clone, Serialize, Deserialize)] -#[extend::encode_decode] -#[cfg_attr( - all(test, feature = "test_and_gen"), - derive(TS), - ts(export, export_to = "plugins.ts") -)] pub enum RenderOptions { Parser(Box), ByteSource, @@ -301,12 +186,6 @@ pub enum RenderOptions { /// Provides additional information to be rendered in the log view. #[derive(Debug, Clone, Serialize, Deserialize)] -#[extend::encode_decode] -#[cfg_attr( - all(test, feature = "test_and_gen"), - derive(TS), - ts(export, export_to = "plugins.ts") -)] pub struct ParserRenderOptions { /// Rendering information for the column if log messages have multiple columns. /// @@ -317,12 +196,6 @@ pub struct ParserRenderOptions { /// Represents the options needs to render columns information if they exist. #[derive(Debug, Clone, Serialize, Deserialize)] -#[extend::encode_decode] -#[cfg_attr( - all(test, feature = "test_and_gen"), - derive(TS), - ts(export, export_to = "plugins.ts") -)] pub struct ColumnsRenderOptions { /// List of columns infos providing the needed information for each column in log view. /// @@ -336,12 +209,6 @@ pub struct ColumnsRenderOptions { /// Represents the infos of a column that will be used in the render options. #[derive(Debug, Clone, Serialize, Deserialize)] -#[extend::encode_decode] -#[cfg_attr( - all(test, feature = "test_and_gen"), - derive(TS), - ts(export, export_to = "plugins.ts") -)] pub struct ColumnInfo { /// Header title to be rendered on the top of the column in log view. pub caption: String, @@ -353,30 +220,12 @@ pub struct ColumnInfo { /// Represents a list of [`PluginEntity`]. #[derive(Clone, Serialize, Deserialize, Debug)] -#[extend::encode_decode] -#[cfg_attr( - all(test, feature = "test_and_gen"), - derive(TS), - ts(export, export_to = "plugins.ts") -)] pub struct PluginsList(pub Vec); /// Represents a list of [`InvalidPluginEntity`]. #[derive(Clone, Serialize, Deserialize, Debug)] -#[extend::encode_decode] -#[cfg_attr( - all(test, feature = "test_and_gen"), - derive(TS), - ts(export, export_to = "plugins.ts") -)] pub struct InvalidPluginsList(pub Vec); /// Represents a list of [`InvalidPluginEntity`]. #[derive(Clone, Serialize, Deserialize, Debug)] -#[extend::encode_decode] -#[cfg_attr( - all(test, feature = "test_and_gen"), - derive(TS), - ts(export, export_to = "plugins.ts") -)] pub struct PluginsPathsList(pub Vec); diff --git a/application/apps/indexer/stypes/src/progress/extending.rs b/crates/stypes/src/progress/extending.rs similarity index 100% rename from application/apps/indexer/stypes/src/progress/extending.rs rename to crates/stypes/src/progress/extending.rs diff --git a/application/apps/indexer/stypes/src/progress/mod.rs b/crates/stypes/src/progress/mod.rs similarity index 66% rename from application/apps/indexer/stypes/src/progress/mod.rs rename to crates/stypes/src/progress/mod.rs index 6cbda01d3c..87dcf8608c 100644 --- a/application/apps/indexer/stypes/src/progress/mod.rs +++ b/crates/stypes/src/progress/mod.rs @@ -1,21 +1,10 @@ -#[cfg(feature = "rustcore")] mod extending; -#[cfg(feature = "nodejs")] -mod nodejs; -#[cfg(test)] -mod proptest; use crate::*; /// Represents a notification about an event (including potential errors) /// related to processing a specific log entry, if such data is available. #[derive(Debug, Serialize, Deserialize, Clone)] -#[extend::encode_decode] -#[cfg_attr( - all(test, feature = "test_and_gen"), - derive(TS), - ts(export, export_to = "progress.ts") -)] pub struct Notification { /// The severity level of the event. pub severity: Severity, @@ -27,12 +16,6 @@ pub struct Notification { /// Describes the progress of an operation. #[derive(Debug, Serialize, Deserialize, Clone)] -#[extend::encode_decode] -#[cfg_attr( - all(test, feature = "test_and_gen"), - derive(TS), - ts(export, export_to = "progress.ts") -)] pub enum Progress { /// Represents the current progress status. Ticks(Ticks), @@ -44,23 +27,12 @@ pub enum Progress { /// Provides detailed information about the progress of an operation. #[derive(Debug, Serialize, Deserialize, Clone, Default)] -#[extend::encode_decode] -#[cfg_attr( - all(test, feature = "test_and_gen"), - derive(TS), - ts(export, export_to = "progress.ts") -)] pub struct Ticks { /// The current progress count, typically representing `n` out of `100%`. - #[cfg_attr(all(test, feature = "test_and_gen"), ts(type = "number"))] pub count: u64, /// The name of the current progress stage, for user display purposes. pub state: Option, /// The total progress counter. Usually `100`, but for file operations, /// it might represent the file size, where `count` indicates the number of bytes read. - #[cfg_attr( - all(test, feature = "test_and_gen"), - ts(type = "number | null | undefined") - )] pub total: Option, } diff --git a/developing/resources/someip/example.pcapng b/developing/resources/someip/example.pcapng deleted file mode 100644 index 671a375faf..0000000000 Binary files a/developing/resources/someip/example.pcapng and /dev/null differ diff --git a/developing/resources/someip/example.xml b/developing/resources/someip/example.xml deleted file mode 100644 index 079dde72c5..0000000000 --- a/developing/resources/someip/example.xml +++ /dev/null @@ -1,50 +0,0 @@ - - - - simulation - - - - - SOMEIP - - - TEST - - - - - - TestService - 123 - - - 1 - 0 - - - - TimeEvent - 32773 - FIRE_AND_FORGET - - - Timestamp - - - true - - 0 - - - - - - - - - INT64 - - - - \ No newline at end of file diff --git a/developing/scripts/check.sh b/developing/scripts/check.sh deleted file mode 100755 index cf35a04ecb..0000000000 --- a/developing/scripts/check.sh +++ /dev/null @@ -1,55 +0,0 @@ -#!/bin/bash - -# This script isn't used anymore because the environment checks are -# included within Chipmunk Development CLI Tool in `{CHIPMUNK_ROOT}/cli/dev-cli`. - -ERRORS=0; -if node -v &>/dev/null; then - echo "NodeJS is OK" -else - ERRORS=1; - echo "NodeJS is missed."; -fi -if npm -v &>/dev/null; then - echo "npm is OK" -else - ERRORS=1; - echo "npm is missed."; -fi -if rustup -V &>/dev/null; then - echo "rust is OK" -else - ERRORS=1; - echo "rust is missed."; -fi -if cargo -V &>/dev/null; then - echo "cargo is OK" -else - ERRORS=1; - echo "cargo is missed."; -fi -if wasm-pack --help &>/dev/null; then - echo "wasm-pack is OK" -else - ERRORS=1; - echo "wasm-pack is missed. (cargo install wasm-pack)"; -fi -if nj-cli -V &>/dev/null; then - echo "nj-cli is OK" -else - ERRORS=1; - echo "nj-cli is missed. (cargo install nj-cli)"; -fi - -if cargo chipmunk --help &>/dev/null; then - echo "cargo chipmunk is OK" -else - ERRORS=1; - echo "cargo chipmunk is missing. (cargo install --path=cli/development-cli/)" -fi - -if (($ERRORS>0)); then - exit 1 -else - echo "all good" -fi diff --git a/developing/scripts/install.sh b/developing/scripts/install.sh deleted file mode 100755 index dee69c9200..0000000000 --- a/developing/scripts/install.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh -cargo install nj-cli -cargo install wasm-pack diff --git a/application/developing/resources/attachments.dlt b/development/resources/attachments.dlt similarity index 100% rename from application/developing/resources/attachments.dlt rename to development/resources/attachments.dlt diff --git a/application/developing/resources/chinese_poem.txt b/development/resources/chinese_poem.txt similarity index 100% rename from application/developing/resources/chinese_poem.txt rename to development/resources/chinese_poem.txt diff --git a/application/developing/resources/empty.txt b/development/resources/empty.txt similarity index 100% rename from application/developing/resources/empty.txt rename to development/resources/empty.txt diff --git a/application/developing/resources/sample_utf_8.txt b/development/resources/sample_utf_8.txt similarity index 100% rename from application/developing/resources/sample_utf_8.txt rename to development/resources/sample_utf_8.txt diff --git a/application/developing/resources/someip.dlt b/development/resources/someip.dlt similarity index 100% rename from application/developing/resources/someip.dlt rename to development/resources/someip.dlt diff --git a/application/developing/resources/someip.pcap b/development/resources/someip.pcap similarity index 100% rename from application/developing/resources/someip.pcap rename to development/resources/someip.pcap diff --git a/application/developing/resources/someip.pcapng b/development/resources/someip.pcapng similarity index 100% rename from application/developing/resources/someip.pcapng rename to development/resources/someip.pcapng diff --git a/application/developing/resources/someip.xml b/development/resources/someip.xml similarity index 100% rename from application/developing/resources/someip.xml rename to development/resources/someip.xml diff --git a/scripts/release_app.py b/development/scripts/release_app.py similarity index 92% rename from scripts/release_app.py rename to development/scripts/release_app.py index 472f657055..c8c6d090e6 100755 --- a/scripts/release_app.py +++ b/development/scripts/release_app.py @@ -58,9 +58,9 @@ def build_app(): "--release", "--locked", "--manifest-path", - "gui/application/Cargo.toml", + str(app_manifest_path()), ], - cwd=app_workspace_root(), + cwd=workspace_root(), error="Building Chipmunk failed", ) @@ -222,7 +222,7 @@ def clean_release(): def app_version(): - manifest = app_workspace_root() / "Cargo.toml" + manifest = workspace_root() / "Cargo.toml" if tomllib is not None: with manifest.open("rb") as file: cargo_toml = tomllib.load(file) @@ -282,23 +282,27 @@ def run(command, error, cwd=None): def repo_root(): - return Path(__file__).resolve().parent.parent + return Path(__file__).resolve().parents[2] def app_root(): - return repo_root() / "application" / "apps" / "indexer" / "gui" / "application" + return repo_root() / "crates" / "chipmunk-app" + + +def app_manifest_path(): + return app_root() / "Cargo.toml" def app_release_path(): - return app_root() / "release" + return repo_root() / "target" / "dist" -def app_workspace_root(): - return repo_root() / "application" / "apps" / "indexer" +def workspace_root(): + return repo_root() def app_binary_path(): - path = app_workspace_root() / "target" / "release" / app_binary_name() + path = workspace_root() / "target" / "release" / app_binary_name() if not path.exists(): raise RuntimeError("Chipmunk binary doesn't exist: {}".format(path)) return path @@ -313,18 +317,11 @@ def repo_readme_path(): def icon_path(): - return repo_root() / "application" / "holder" / "resources" / "mac" / "chipmunk.icns" + return app_root() / "data" / "mac" / "chipmunk.icns" def entitlements_path(): - return ( - repo_root() - / "application" - / "holder" - / "resources" - / "mac" - / "entitlements.mac.plist" - ) + return app_root() / "data" / "mac" / "entitlements.mac.plist" def platform_name(): diff --git a/developing/scripts/replay_pcap_tcp.py b/development/scripts/replay_pcap_tcp.py similarity index 100% rename from developing/scripts/replay_pcap_tcp.py rename to development/scripts/replay_pcap_tcp.py diff --git a/developing/scripts/replay_pcap_udp.py b/development/scripts/replay_pcap_udp.py similarity index 100% rename from developing/scripts/replay_pcap_udp.py rename to development/scripts/replay_pcap_udp.py diff --git a/docker/ubuntu-20.04/Dockerfile b/docker/ubuntu-20.04/Dockerfile deleted file mode 100644 index f1ad0e6489..0000000000 --- a/docker/ubuntu-20.04/Dockerfile +++ /dev/null @@ -1,82 +0,0 @@ -# Docker file to build chipmunk release in ubuntu-20.04 after it lost support -# on GitHub Actions. -# -# Building the image must run form the repo root with specifying the path for the -# docker file and providing the user and group ID for the current user. -# Note: The current user can't be root. -# -# Build example (pwd is chipmunk repo root): -# docker build \ -# --build-arg USER_ID=$(id -u) \ -# --build-arg GROUP_ID=$(id -g) \ -# -t ubuntu2004 \ -# -f docker/ubuntu-20.04/Dockerfile\ -# . -# -# Running the container require mounting the root with read and write access to -# the directory 'chipmunk' in docker image root. -# -# Run example for release (pwd is chipmunk repo root): -# docker run -v .:/chipmunk:rw ubuntu2004 -# -# Run example for interactive session (pwd is chipmunk repo root): -# docker run --rm -it -v .:/chipmunk:rw ubuntu2004 bash - -FROM ubuntu:20.04 - -ARG DEBIAN_FRONTEND=noninteractive - -# --- USER SETUP --- -# Mandatory Arguments for user and group IDs. -# Note: User can't be root user. -# Example: -# docker build --build-arg USER_ID=$(id -u) --build-arg GROUP_ID=$(id -g) ... -ARG USER_ID -ARG GROUP_ID -RUN if [ -z "$USER_ID" ] || [ "$USER_ID" -eq 0 ] || [ -z "$GROUP_ID" ] || [ "$GROUP_ID" -eq 0 ]; then \ - echo "Error: USER_ID and GROUP_ID are mandatory and must not be 0 (root)." >&2; \ - exit 1; \ - fi -RUN addgroup --gid $GROUP_ID app && \ - adduser --uid $USER_ID --ingroup app --disabled-password --gecos '' appuser - -# --- Dependencies --- -# Packages needed: -# - curl & gnupg: Node installation -# - build-essential: Rust -# - libudev-dev & pkg-config: Chipmunk -# - git: Chipmunk Dev CLI -RUN apt-get update && \ - apt-get install -y curl gnupg libudev-dev build-essential pkg-config git && \ - # Add Node.js from source - curl -fsSL https://deb.nodesource.com/setup_24.x | bash - && \ - apt-get install -y nodejs && \ - # Clean up - rm -rf /var/lib/apt/lists/* - -# Enable yarn -RUN corepack enable && yarn cache clean - -USER appuser - -# Install Rust -ENV PATH="/home/appuser/.cargo/bin:${PATH}" -RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y -RUN rustup target add wasm32-unknown-unknown - -# Rust tools -RUN cargo install nj-cli wasm-pack - -# Development CLI tool -COPY --chown=appuser:app cli/development-cli /home/appuser/dev-cli -RUN cargo install --path /home/appuser/dev-cli - -# Setup Git Configurations (Needed for Dev CLI) -RUN git config --global user.name "user" && \ - git config --global user.email "user@user" && \ - git config --global safe.directory "*" - -# We expect the repo to be mounted to the directory `/home/appuser/chipmunk` -WORKDIR /home/appuser/chipmunk - -CMD ["cargo", "chipmunk", "release", "-p", "ubuntu-20.04"] diff --git a/docker/ubuntu-20.04/build.sh b/docker/ubuntu-20.04/build.sh deleted file mode 100755 index cd71f192f5..0000000000 --- a/docker/ubuntu-20.04/build.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/bash - -# Build docker image using current user infos. - -set -e - -SCRIPT_DIR=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" &>/dev/null && pwd) - -REPO_ROOT=$(dirname "$(dirname "$SCRIPT_DIR")") - -docker build \ - --build-arg USER_ID=$(id -u) \ - --build-arg GROUP_ID=$(id -g) \ - -t ubuntu2004 \ - -f "$SCRIPT_DIR/Dockerfile" \ - "$REPO_ROOT" # Set the build context to the repository root diff --git a/docker/ubuntu-20.04/run.sh b/docker/ubuntu-20.04/run.sh deleted file mode 100755 index 94eb2e95ca..0000000000 --- a/docker/ubuntu-20.04/run.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/bash - -# Run docker container using its default command (release for ubuntu 20.04). - -set -e - -SCRIPT_DIR=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" &>/dev/null && pwd) - -REPO_ROOT=$(dirname "$(dirname "$SCRIPT_DIR")") - -docker run --rm \ - -v "$REPO_ROOT":/home/appuser/chipmunk:rw \ - ubuntu2004 \ - "$@" diff --git a/docs/cli.md b/docs/cli.md index 914c349a93..f6f79361e5 100644 --- a/docs/cli.md +++ b/docs/cli.md @@ -26,7 +26,7 @@ Before installing the Chipmunk CLI tool, ensure that Rust is installed on your s Navigate to the root directory of the Chipmunk repository in your terminal and run the following command to install the Chipmunk CLI tool: ```bash -cargo install --path cli/chipmunk-cli +cargo install --path crates/chipmunk-cli ``` This command installs the tool `chipmunk-cli`, allowing you to use `chipmunk-cli ` to execute parsing tasks using multiple parsers and input sources. diff --git a/docs/contributing/dev-cli.md b/docs/contributing/dev-cli.md index 9b6a41500d..ecace82618 100644 --- a/docs/contributing/dev-cli.md +++ b/docs/contributing/dev-cli.md @@ -66,17 +66,16 @@ Arguments: Target to build, by default whole application will be built Possible values: - - core: Represents the path `application/apps/indexer` + - core: Represents the path `crates/core` - shared: Represents the path `application/platform` - protocol: Represents the path `application/apps/protocol` - binding: Represents the path `application/apps/rustcore/rs-bindings` - wrapper: Represents the path `application/apps/rustcore/ts-bindings` - wasm: Represents the path `application/apps/rustcore/wasm-bindings` - client: Represents the path `application/client` - - updater: Represents the path `application/apps/precompiled/updater` - app: Represents the path `application/holder` - cli-dev: Represents the path `cli/development-cli` - - cli-chipmunk: Represents the path `cli/chipmunk-cli` + - cli-chipmunk: Represents the path `crates/chipmunk-cli` Options: -p, --production diff --git a/docs/plugins/c-cpp.md b/docs/plugins/c-cpp.md index 587c46940b..a789ec6ec8 100644 --- a/docs/plugins/c-cpp.md +++ b/docs/plugins/c-cpp.md @@ -13,7 +13,7 @@ Although the pre-generated C header is included in the [C/C++ templates](https:/ ### Chipmunk Plugins WIT Definitions -To generate the specific C/C++ functions and types that interface with Chipmunk, developers need to have the [Chipmunk plugins WIT files](https://github.com/esrlabs/chipmunk/tree/master/plugins/plugins_api/wit) available locally on their machines. +To generate the specific C/C++ functions and types that interface with Chipmunk, developers need to have the [Chipmunk plugins WIT files](https://github.com/esrlabs/chipmunk/tree/master/crates/plugins_api/wit) available locally on their machines. ### WASI SDK diff --git a/docs/plugins/development-guide.md b/docs/plugins/development-guide.md index 49e26869bf..29ee277744 100644 --- a/docs/plugins/development-guide.md +++ b/docs/plugins/development-guide.md @@ -95,8 +95,8 @@ Please refer to [C/C++ Plugins Development](./c-cpp.md) for detailed info develo ## Plugin Configuration Plugins can define their own configuration schemas. These schemas are presented to users so they can provide the necessary settings. The configuration is then delivered back to the plugin during the session initialization phase. For details on schema definitions, refer to: -- The [WIT definitions](https://github.com/esrlabs/chipmunk/tree/master/plugins/plugins_api/wit). -- The [`plugins-api`](https://github.com/esrlabs/chipmunk/tree/master/plugins/plugins_api/) crate documentation. +- The [WIT definitions](https://github.com/esrlabs/chipmunk/tree/master/crates/plugins_api/wit). +- The [`plugins-api`](https://github.com/esrlabs/chipmunk/tree/master/crates/plugins_api/) crate documentation. - The provided examples. --- @@ -111,10 +111,10 @@ Chipmunk currently supports two main types of plugins: Parser plugins receive an array of bytes, attempt to parse them, and return the parsed items. They can also define configuration schemas and specify rendering options if needed. #### Development in Rust: -* Create a struct that implements to the `Parser` trait defined in the [`plugins-api`](https://github.com/esrlabs/chipmunk/tree/master/plugins/plugins_api/) crate. +* Create a struct that implements to the `Parser` trait defined in the [`plugins-api`](https://github.com/esrlabs/chipmunk/tree/master/crates/plugins_api/) crate. * Use the `parser_export!()` macro to export your parser struct. -The [`plugins-api`](https://github.com/esrlabs/chipmunk/tree/master/plugins/plugins_api/) crate also offers helper functions for logging, access to temp directory and configuration management. +The [`plugins-api`](https://github.com/esrlabs/chipmunk/tree/master/crates/plugins_api/) crate also offers helper functions for logging, access to temp directory and configuration management. #### Integration: * Use the "Add" function in the Chipmunk UI Plugins Manager, as described in the [Building and Integrating Plugins](#building-and-integrating-plugins) section. @@ -130,10 +130,10 @@ For reference, see the `string_parser` and `dlt_parser` examples. Byte-source plugins deliver arrays of bytes of a specified length during each load call. These bytes are then processed by a selected parser. Like parser plugins, they can define configuration schemas that are provided during session initialization. #### Development in Rust: -- Create a struct that implements to the `ByteSource` trait defined in the [`plugins-api`](https://github.com/esrlabs/chipmunk/tree/master/plugins/plugins_api/) crate. +- Create a struct that implements to the `ByteSource` trait defined in the [`plugins-api`](https://github.com/esrlabs/chipmunk/tree/master/crates/plugins_api/) crate. - Use the `bytesource_export!()` macro to export your byte-source struct. -The [`plugins-api`](https://github.com/esrlabs/chipmunk/tree/master/plugins/plugins_api/) crate again provides helper functions for logging, access to temp directory and configuration management. +The [`plugins-api`](https://github.com/esrlabs/chipmunk/tree/master/crates/plugins_api/) crate again provides helper functions for logging, access to temp directory and configuration management. #### Integration: - Use the "Add" function in the Chipmunk UI Plugins Manager, as described in the [Building and Integrating Plugins](#building-and-integrating-plugins) section. diff --git a/docs/plugins/plugins-api.md b/docs/plugins/plugins-api.md index 98d52247c8..34ac7c3d76 100644 --- a/docs/plugins/plugins-api.md +++ b/docs/plugins/plugins-api.md @@ -1,6 +1,6 @@ # Chipmunk Plugins API Crate -This crate simplifies the development of plugins for [Chipmunk](https://github.com/esrlabs/chipmunk) in Rust. Its source code can be found on GitHub: [Plugins API Crate](https://github.com/esrlabs/chipmunk/tree/master/plugins/plugins_api). +This crate simplifies the development of plugins for [Chipmunk](https://github.com/esrlabs/chipmunk) in Rust. Its source code can be found on GitHub: [Plugins API Crate](https://github.com/esrlabs/chipmunk/tree/master/crates/plugins_api). Chipmunk supports plugins using [WebAssembly (Wasm)](https://webassembly.org/) and the [WebAssembly Component Model](https://component-model.bytecodealliance.org/). It exposes its public API via the [WASM Interface Format (WIT)](https://github.com/WebAssembly/component-model/blob/main/design/mvp/WIT.md), enabling developers to write plugins in any language that supports Wasm and the Component Model. diff --git a/justfile b/justfile new file mode 100644 index 0000000000..b5b4bbb7ec --- /dev/null +++ b/justfile @@ -0,0 +1,68 @@ +# Use PowerShell for recipes on Windows. +set windows-shell := ["powershell", "-c"] + +python := if os_family() == "windows" { "python" } else { "python3" } + +alias f := fmt-check +alias pr := validate +alias v := validate + +# Command kept first so bare `just` shows this list. +# Show available recipes. +list: + @just --list + +# Run the full local validation suite. +validate: fmt-check check clippy test + +# Compile all workspace targets without producing final binaries. +check: + cargo check --workspace --all-targets --all-features --locked + +# Run Clippy on all workspace targets and fail on warnings. +clippy: + cargo clippy --workspace --all-targets --all-features --locked -- -D warnings + +# Run workspace tests without benchmark targets. +test: + cargo test --workspace --all-features --locked + +# Run session snapshot tests without writing .snap.new files. +test-snapshots: + CI=true cargo test -p session --test lib --locked snapshot_tests + +# Check Rust formatting without changing files. +fmt-check: + cargo fmt --all -- --check + +# Format Rust code in the workspace. +fmt: + cargo fmt --all + +# Run the native app. Pass Cargo/app args after the recipe: `just run -r -- file ...`. +run *args: + cargo run -p chipmunk-app --locked {{ args }} + +# Install the native app binary with Cargo. +install-app: + cargo install --path crates/chipmunk-app --locked + +# Install the Chipmunk CLI with Cargo. +install-cli: + cargo install --path crates/chipmunk-cli --locked + +# Remove release artifacts. +clean-dist: + rm -rf target/dist + +# Remove Cargo build outputs and release artifacts. +clean: clean-dist + cargo clean + +# Build and package a local release artifact. +release: + {{ python }} development/scripts/release_app.py + +# Build, package, sign, notarize, and staple the macOS release when env vars are set. +release-signed: + {{ python }} development/scripts/release_app.py --code-sign diff --git a/plugins/README.md b/plugins/README.md index 4884a0c78d..e248d446d6 100644 --- a/plugins/README.md +++ b/plugins/README.md @@ -42,4 +42,4 @@ To help you begin developing your own Chipmunk plugins, we provide comprehensive ## Developing Plugins with Rust -Rust developers can use the dedicated [`plugins-api`](https://github.com/esrlabs/chipmunk/tree/master/plugins/plugins_api) crate to simplify plugin development, handling WIT interactions, type generation, and export macros. Detailed prerequisites, building instructions with `cargo component`, and integration steps are available in the [full documentation](https://esrlabs.github.io/chipmunk/plugins/development-guide/). +Rust developers can use the dedicated [`plugins-api`](https://github.com/esrlabs/chipmunk/tree/master/crates/plugins_api) crate to simplify plugin development, handling WIT interactions, type generation, and export macros. Detailed prerequisites, building instructions with `cargo component`, and integration steps are available in the [full documentation](https://esrlabs.github.io/chipmunk/plugins/development-guide/). diff --git a/plugins/examples/rust/dlt_parser/Cargo.lock b/plugins/examples/rust/dlt_parser/Cargo.lock index 985fba739c..062d055ee9 100644 --- a/plugins/examples/rust/dlt_parser/Cargo.lock +++ b/plugins/examples/rust/dlt_parser/Cargo.lock @@ -120,9 +120,9 @@ checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" [[package]] name = "dlt-core" -version = "0.20.1" +version = "0.20.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b30630aabfec167a260bdd37bcb381ce7f8b9c41f5ada4182aa7b20e0bb691f" +checksum = "3360c83b1e02a2543d44fa9ba640f0199c43bcde51abd7fa113f1a25d11f17a1" dependencies = [ "byteorder", "bytes", diff --git a/plugins/examples/rust/dlt_parser/Cargo.toml b/plugins/examples/rust/dlt_parser/Cargo.toml index 2b10d5e038..f8e6c9210e 100644 --- a/plugins/examples/rust/dlt_parser/Cargo.toml +++ b/plugins/examples/rust/dlt_parser/Cargo.toml @@ -1,3 +1,5 @@ +[workspace] + [package] name = "dlt_parser" version = "0.1.0" @@ -6,8 +8,8 @@ authors = ["Ammar Abou Zor "] description = "An example of a Chipmunk parser that replicate the dlt parser that is built-in into Chipmunk" [dependencies] -plugins_api = {path = "../../../plugins_api", features = ["parser"] } -dlt-core = { version = "0.20", features = ["fibex"] } +plugins_api = { path = "../../../../crates/plugins_api", features = ["parser"] } +dlt-core = { version = "0.20.2", features = ["fibex"] } chrono = "0.4" chrono-tz = "0.10" diff --git a/plugins/examples/rust/dlt_parser/bench_config.toml b/plugins/examples/rust/dlt_parser/bench_config.toml index c22c4da576..b21febfb2a 100644 --- a/plugins/examples/rust/dlt_parser/bench_config.toml +++ b/plugins/examples/rust/dlt_parser/bench_config.toml @@ -1,13 +1,15 @@ # Configuration required to run the parser in Chipmunk benchmarks. -# Example command to run parsing benchmarks using Chipmunk development tool +# Example command to run parsing benchmarks from the repository root: # ```sh -# cargo chipmunk bench core plugin_praser_producer -i {input_file_path}.dlt -c {path_to_this_file}.toml +# CHIPMUNK_BENCH_SOURCE={input_file_path}.dlt \ +# CHIPMUNK_BENCH_CONFIG={path_to_this_file}.toml \ +# cargo bench -p processor --bench plugin_praser_producer --locked # ``` # Path to the plugin WebAssembly (WASM) file. -# Can be absolute or relative to the `indexer` directory within the Chipmunk repository. -binary_path = "../../../../plugins/examples/rust/dlt_parser/target/wasm32-wasip1/release/dlt_parser.wasm" +# Can be absolute or relative to the `crates/core/processor` directory. +binary_path = "../../../plugins/examples/rust/dlt_parser/target/wasm32-wasip1/release/dlt_parser.wasm" # Plugin-specific configurations: diff --git a/plugins/examples/rust/file_source/Cargo.toml b/plugins/examples/rust/file_source/Cargo.toml index 3514f77479..e4f2e0efcc 100644 --- a/plugins/examples/rust/file_source/Cargo.toml +++ b/plugins/examples/rust/file_source/Cargo.toml @@ -8,7 +8,7 @@ authors = ["Ammar Abou Zor "] description = "An example of a Chipmunk bytesource plugin that reads byte data from a file and provides it to the Chipmunk application." [dependencies] -plugins_api = {path = "../../../plugins_api", features = ["bytesource"]} +plugins_api = { path = "../../../../crates/plugins_api", features = ["bytesource"] } [lib] crate-type = ["cdylib"] diff --git a/plugins/examples/rust/file_source/bench_config.toml b/plugins/examples/rust/file_source/bench_config.toml index a84528b6a9..f72a8c2342 100644 --- a/plugins/examples/rust/file_source/bench_config.toml +++ b/plugins/examples/rust/file_source/bench_config.toml @@ -1,8 +1,8 @@ # Configuration required to run the byte source in Chipmunk benchmarks. # Path to the plugin WebAssembly (WASM) file. -# Can be absolute or relative to the `indexer` directory within the Chipmunk repository. -binary_path = "../../../../plugins/examples/rust/file_source/target/wasm32-wasip1/release/file_source.wasm" +# Can be absolute or relative to the `crates/core/processor` directory. +binary_path = "../../../plugins/examples/rust/file_source/target/wasm32-wasip1/release/file_source.wasm" # Plugin-specific configurations: # TODO: diff --git a/plugins/examples/rust/protobuf/Cargo.toml b/plugins/examples/rust/protobuf/Cargo.toml index 7a9549ac41..4ad32c6da1 100644 --- a/plugins/examples/rust/protobuf/Cargo.toml +++ b/plugins/examples/rust/protobuf/Cargo.toml @@ -1,3 +1,5 @@ +[workspace] + [package] name = "protobuf_parser" version = "0.1.0" @@ -6,7 +8,7 @@ authors = ["Dmitry Astafyev"] description = "An example of a Chipmunk parser that replicate the dlt parser that is built-in into Chipmunk" [dependencies] -plugins_api = {path = "../../../plugins_api", features = ["parser"]} +plugins_api = { path = "../../../../crates/plugins_api", features = ["parser"] } prost = "0.13" prost-reflect = { version = "0.15", features = ["text-format"]} thiserror = "2.0" diff --git a/plugins/examples/rust/protobuf/bench_config.toml b/plugins/examples/rust/protobuf/bench_config.toml index dcf8501951..e21f960a70 100644 --- a/plugins/examples/rust/protobuf/bench_config.toml +++ b/plugins/examples/rust/protobuf/bench_config.toml @@ -1,8 +1,8 @@ # Configuration required to run the parser in Chipmunk benchmarks. # Path to the plugin WebAssembly (WASM) file. -# Can be absolute or relative to the `indexer` directory within the Chipmunk repository. -binary_path = "../../../../plugins/examples/rust/protobuf/target/wasm32-wasip1/release/protobuf.wasm" +# Can be absolute or relative to the `crates/core/processor` directory. +binary_path = "../../../plugins/examples/rust/protobuf/target/wasm32-wasip1/release/protobuf.wasm" # Plugin-specific configurations: # TODO: diff --git a/plugins/examples/rust/string_parser/Cargo.toml b/plugins/examples/rust/string_parser/Cargo.toml index ce2b47e344..08812b7ba2 100644 --- a/plugins/examples/rust/string_parser/Cargo.toml +++ b/plugins/examples/rust/string_parser/Cargo.toml @@ -8,7 +8,7 @@ authors = ["Ammar Abou Zor "] description = "An example of a Chipmunk parser that parses the bytes into valid UTF-8 strings line by line" [dependencies] -plugins_api = {path = "../../../plugins_api", features = ["parser"]} +plugins_api = { path = "../../../../crates/plugins_api", features = ["parser"] } memchr = "2.7" [lib] diff --git a/plugins/examples/rust/string_parser/bench_config.toml b/plugins/examples/rust/string_parser/bench_config.toml index 733560315d..8a00b67cd4 100644 --- a/plugins/examples/rust/string_parser/bench_config.toml +++ b/plugins/examples/rust/string_parser/bench_config.toml @@ -1,8 +1,8 @@ # Configuration required to run the parser in Chipmunk benchmarks. # Path to the plugin WebAssembly (WASM) file. -# Can be absolute or relative to the `indexer` directory within the Chipmunk repository. -binary_path = "../../../../plugins/examples/rust/string_parser/target/wasm32-wasip1/release/string_parser.wasm" +# Can be absolute or relative to the `crates/core/processor` directory. +binary_path = "../../../plugins/examples/rust/string_parser/target/wasm32-wasip1/release/string_parser.wasm" # Plugin-specific configurations: diff --git a/plugins/plugins_api/.gitignore b/plugins/plugins_api/.gitignore deleted file mode 100644 index 58f4d267f1..0000000000 --- a/plugins/plugins_api/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -**/target -Cargo.lock diff --git a/plugins/templates/c-cpp/parser_c/Makefile b/plugins/templates/c-cpp/parser_c/Makefile index d8ef061e22..fe08b0e6cb 100644 --- a/plugins/templates/c-cpp/parser_c/Makefile +++ b/plugins/templates/c-cpp/parser_c/Makefile @@ -7,7 +7,7 @@ WASI_SDK_PATH ?= {PATH_TO_LOCAL_WASI_SDK} # Path for the directory where the WIT files are defined withing chipmunk repository. -WIT_DIR ?= {PATH_OF_CHIPMUNK_REPO}/plugins/plugins_api/wit/v0.1.0/ +WIT_DIR ?= {PATH_OF_CHIPMUNK_REPO}/crates/plugins_api/wit/v0.1.0/ # The path WASI Adapter file. It defaults to have the file in vendor directory and it will # download the latest version of the files in case it doesn't exist and if not provided. diff --git a/plugins/templates/c-cpp/parser_cpp/Makefile b/plugins/templates/c-cpp/parser_cpp/Makefile index 15fb0cd467..942b2f4efa 100644 --- a/plugins/templates/c-cpp/parser_cpp/Makefile +++ b/plugins/templates/c-cpp/parser_cpp/Makefile @@ -7,7 +7,7 @@ WASI_SDK_PATH ?= {PATH_TO_LOCAL_WASI_SDK} # Path for the directory where the WIT files are defined withing chipmunk repository. -WIT_DIR ?= {PATH_OF_CHIPMUNK_REPO}/plugins/plugins_api/wit/v0.1.0/ +WIT_DIR ?= {PATH_OF_CHIPMUNK_REPO}/crates/plugins_api/wit/v0.1.0/ # The path WASI Adapter file. It defaults to have the file in vendor directory and it will # download the latest version of the files in case it doesn't exist and if not provided. diff --git a/plugins/templates/rust/parser/Cargo.toml b/plugins/templates/rust/parser/Cargo.toml index 47901d9083..48e9ebfbc5 100644 --- a/plugins/templates/rust/parser/Cargo.toml +++ b/plugins/templates/rust/parser/Cargo.toml @@ -9,7 +9,7 @@ description = "Tempalte for parser plugins in Chipmunk" [dependencies] plugins_api = { git = "https://github.com/esrlabs/chipmunk", features = ["parser"]} # Alternatively, local path can be used to avoid cloning chipmunk multiple times. -# plugins_api = { path = "{path_for_chipmunk}/plugins/plugins_api", features = ["parser"]} +# plugins_api = { path = "{path_for_chipmunk}/crates/plugins_api", features = ["parser"] } [lib] crate-type = ["cdylib"] diff --git a/plugins/templates/rust/parser/bench_config.toml b/plugins/templates/rust/parser/bench_config.toml index d2f593cf81..f6e3513220 100644 --- a/plugins/templates/rust/parser/bench_config.toml +++ b/plugins/templates/rust/parser/bench_config.toml @@ -1,8 +1,8 @@ # Configuration required to run the parser in Chipmunk benchmarks. # Path to the plugin WebAssembly (WASM) file. -# Can be absolute or relative to the `indexer` directory within the Chipmunk repository. -binary_path = "../../../../plugins/templates/parser_template/target/wasm32-wasip1/release/parser_template.wasm" +# Can be absolute or relative to the `crates/core/processor` directory. +binary_path = "../../../plugins/templates/rust/parser/target/wasm32-wasip1/release/parser_template.wasm" # Plugin-specific configurations: diff --git a/rakefile.rb b/rakefile.rb deleted file mode 100644 index f300b62174..0000000000 --- a/rakefile.rb +++ /dev/null @@ -1,169 +0,0 @@ -# frozen_string_literal: true - -# NOTE: Rake isn't used in the development anymore and has been replaced -# with Chipmunk Development CLI Tool in `{CHIPMUNK_ROOT}/cli/dev-cli`. -# The implementation here kept for reference. - -require 'rake/clean' -require 'fileutils' -require 'set' -require './scripts/elements/wasm' -require './scripts/elements/bindings' -require './scripts/elements/platform' -require './scripts/elements/client' -require './scripts/elements/electron' -require './scripts/elements/release' -require './scripts/elements/updater' -require './scripts/elements/protocol' -require './scripts/tools/change_checker' - -CLOBBER.include("#{Paths::CLIENT}/.angular") -CLOBBER.include('./**/node_modules') - -task clean: 'clean:all' - -namespace :clean do - task all: [ - 'protocol:clean', - 'bindings:clean', - 'electron:clean', - 'client:clean', - 'updater:clean', - 'wasm:clean', - 'platform:clean', - 'release:clean', - 'indexer:clean', - 'clean_change_list' - ] -end - -namespace :test do - desc 'test rust core' - task :rust do - cd Paths::INDEXER do - Shell.timed_operation(-> { sh 'cargo +stable test' }, 'cargo test') - end - end - - desc 'test js/webassembly parts' - task js: ['bindings:test:all', - 'wasm:test'] - - desc 'run all test' - task all: ['test:rust', 'test:js'] -end - -# Makes sure clippy is installed and correclty executed -class Clippy - def initialize - Rake.sh 'rustup component add clippy' - end - - def check(owner, path) - Shell.chdir(path) do - clippy = 'cargo +stable clippy --all --all-features -- -D warnings -A clippy::uninlined_format_args' - Shell.timed_operation(-> { Rake.sh clippy}, 'clippy') - fmt = 'cargo +stable fmt -- --color=always --check' - Shell.timed_operation(-> { Rake.sh fmt}, 'clippy') - end - Reporter.other(owner, "checked: #{path}", '') - end -end - -namespace :lint do - desc 'lint all rust modules' - task :rust do - clippy = Clippy.new - clippy.check('Indexer', Paths::INDEXER) - clippy.check('Rustbinding', Paths::RS_BINDINGS) - clippy.check('Wasm', "#{Paths::WASM}/src") - clippy.check('Updater', Paths::UPDATER) - Reporter.print - end - - desc 'lint all js/ts modules' - task js: ['platform:lint', 'electron:lint', 'client:lint', 'bindings:lint'] - - desc 'lint everything' - task all: ['lint:js', 'lint:rust'] do - Reporter.print - end -end - -desc 'check with typscript compiler' -task tsc: ['client:check', 'electron:check', 'platform:check'] - -desc 'build chipmunk (dev)' -task build_dev: 'electron:build_dev' - -desc 'build chipmunk (prod)' -task build_prod: 'electron:build_prod' - -def visible_tasks - visible = `rake -T` - visible.lines.map do |line| - if (match = line.match(/rake\s([\w:]*)/i)) - one = match.captures - one[0] - end - end -end - -def print_deps - visited = Set.new - recursion_stack = Set.new - puts 'digraph dependencies {' - visible_tasks.each do |t| - puts "\s\s\"#{t}\" [style=filled,color=\"orange\"];" - end - Rake::Task.tasks.each do |task| - print_recursively(task, visited, recursion_stack) - end - puts '}' -end - -def print_recursively(task, visited, recursion_stack) - return if visited.include?(task) - - visited.add(task) - recursion_stack.add(task) - - task.prerequisite_tasks.each do |dependency| - raise "Cyclic dependency detected: #{task} -> #{dependency}" if recursion_stack.include?(dependency) - - puts " \"#{task}\" -> \"#{dependency}\"" - print_recursively(dependency, visited, recursion_stack) - end - recursion_stack.delete(task) -end - -desc 'overview of task dependencies' -task :print_dot do - print_deps -end - -desc 'start chipmunk (dev)' -task run_dev: 'electron:build_dev' do - cd Paths::ELECTRON do - Shell.sh 'yarn run electron' - end -end - -desc 'start chipmunk (prod)' -task run_prod: 'electron:build_prod' do - cd Paths::ELECTRON do - Shell.sh 'yarn run electron' - end -end - -# # uncomment for benchmarking the tasks -# require 'benchmark' -# class Rake::Task -# def execute_with_benchmark(*args) -# bm = Benchmark.measure { execute_without_benchmark(*args) } -# puts " #{name} --> #{bm}" -# end - -# alias_method :execute_without_benchmark, :execute -# alias_method :execute, :execute_with_benchmark -# end diff --git a/application/apps/indexer/rustfmt.toml b/rustfmt.toml similarity index 100% rename from application/apps/indexer/rustfmt.toml rename to rustfmt.toml diff --git a/scripts/README.md b/scripts/README.md deleted file mode 100644 index 39e7d8b18e..0000000000 --- a/scripts/README.md +++ /dev/null @@ -1,70 +0,0 @@ -> [!NOTE] -> This system is deprecated and is kept here for reference purposes. -> Please use the [Chipmunk Development CLI Tool](../cli/development-cli) for all development tasks instead. - -## Build System - -In order to build and run chipmunk, several steps have to be executed: - -* build all rust parts -* build all binding layers (rust and node) -* build various javascript parts -* build and bundle the electron application - -We use `rake` as our build system. So a valid ruby needs to be present on the system in order to use -it. - -The three main tasks to execute are: - -* `rake clean` (clean everything) -* `rake lint:all` (run all lint checks) -* `rake test:all` (run all tests) -* `rake run_dev/run_prod` (to build and run chipmunk) -* `rake build_dev/build_prod` (to only build the complete application) -* `rake release:dev/release:prod` (to create a release package) - -``` -rake ansi:build # Build ansi -rake ansi:test # run ansi tests -rake bindings:build # Build bindings -rake bindings:clean # clean bindings -rake bindings:lint # Lint TS bindings -rake bindings:test # run binding tests -rake build_dev # build chipmunk (dev) -rake build_prod # build chipmunk (prod) -rake clean # Remove any temporary products -rake clean_change_list # Clean change list -rake client:build_dev # Build client (dev) -rake client:build_prod # Build client (prod) -rake client:clean # clean client -rake client:install # Install client -rake client:lint # Lint client -rake clobber # Remove any generated files -rake electron:build_dev # build dev version of electron -rake electron:build_prod # build production version of electron -rake electron:lint # Lint electron -rake environment:check # check that all needed tools are installed -rake environment:list # list info of needed tools -rake lint:all # lint everything -rake lint:js # lint all js/ts modules -rake lint:rust # lint all rust modules -rake matcher:build # Build matcher -rake matcher:test # run matcher tests -rake platform:build # build platform -rake platform:lint # Lint platform -rake print_dot # overview of task dependencies -rake release:dev # Create release (dev mode) -rake release:prod # Create release (production mode) -rake run_dev # start chipmunk (dev) -rake run_prod # start chipmunk (prod) -rake test:all # run all test -rake test:js # test js/webassembly parts -rake test:rust # test rust core -rake updater:build # Build updater -rake utils:build # Build utils -rake utils:test # run utils tests -``` - -![task-overview](images/tasks_1.png) -![task-overview](images/tasks_2.png) -![task-overview](images/tasks_3.png) diff --git a/scripts/benchmarks/process.rb b/scripts/benchmarks/process.rb deleted file mode 100644 index 1abfa6b6c8..0000000000 --- a/scripts/benchmarks/process.rb +++ /dev/null @@ -1,201 +0,0 @@ -require 'octokit' -require 'tmpdir' -require 'fileutils' -require 'json' - -ENV['REPO_OWNER'] = 'esrlabs' -ENV['REPO_NAME'] = 'chipmunk' - -COMMANDS = [ - "cargo install --path=cli_path", - 'cargo chipmunk test wrapper -p -s spec/build/spec/_session.benchmark.spec.js -u print' -] - -SHELL_SCRIPT_PATH = 'application/apps/rustcore/ts-bindings/spec' - -def usage - puts "Usage: ruby scripts/benchmarks/process.rb //PR~" - exit(1) -end - -def compute_average_of_benchmarks(result_path) - data = JSON.parse(File.read(result_path)) - - grouped_data = data.group_by { |test| test['name'] } - - averages = grouped_data.map do |name, tests| - passed_tests = tests.select { |test| test['passed'] } - - if passed_tests.any? - average_actual = passed_tests.sum { |test| test['actual'].to_f } / passed_tests.size - average_expected = passed_tests.sum { |test| test['expectation'].to_f } / passed_tests.size - { 'name' => name, 'actual' => average_actual, 'expectation' => average_expected, 'passed' => average_actual <= average_expected } - else - { 'name' => name, 'actual' => 0, 'expectation' => 0, 'passed' => false } - end - end - - File.write(result_path, JSON.pretty_generate(averages)) -end - -client = Octokit::Client.new - -def fetch_pull_request(client, pr_number) - client.pull_request("#{ENV['REPO_OWNER']}/#{ENV['REPO_NAME']}", pr_number) -end - -def fetch_releases(client) - client.releases("#{ENV['REPO_OWNER']}/#{ENV['REPO_NAME']}") -end - -def parse_arguments(arg) - if arg.start_with?('PR~') - pr_number = arg.split('~').last - { type: :pr, value: pr_number } - elsif arg.match?(/\A\d+(\.\d+)?\z/) - number_of_releases = arg.to_i == 0 ? 1 : arg.to_i - { type: :number_of_releases, value: number_of_releases } - elsif arg.include?('-') - start_tag, end_tag = arg.split('-') - { type: :range, value: [start_tag, end_tag] } - else - usage - end -end - -def set_environment_vars - { - 'JASMIN_TEST_CONFIGURATION' => './spec/benchmarks.json', - 'PERFORMANCE_RESULTS_FOLDER' => 'chipmunk_performance_results', - 'PERFORMANCE_RESULTS' => '', - 'SH_HOME_DIR' => "/chipmunk" - # 'SH_HOME_DIR' => "/Users/sameer.g.srivastava" - } -end - -def clone_and_setup_repo(branch_or_tag_name, temp_dir) - system("git clone --depth 1 --branch #{branch_or_tag_name} https://github.com/#{ENV['REPO_OWNER']}/#{ENV['REPO_NAME']}.git #{temp_dir}") - FileUtils.cp_r("#{SHELL_SCRIPT_PATH}/.", "#{temp_dir}/#{SHELL_SCRIPT_PATH}/.", verbose: true) -end - -def process_release_or_pr(branch_or_tag_name, identifier, env_vars) - Dir.mktmpdir do |temp_dir| - begin - clone_and_setup_repo(branch_or_tag_name, temp_dir) - result_path = "#{env_vars['SH_HOME_DIR']}/#{env_vars['PERFORMANCE_RESULTS_FOLDER']}/Benchmark_#{identifier}.json" - - Dir.chdir(temp_dir) do - env_vars.each { |key, value| ENV[key] = value } - ENV['PERFORMANCE_RESULTS'] = "Benchmark_#{identifier}.json" - system("corepack enable") - system("yarn cache clean") - path = Dir.exist?('cli/development-cli') ? 'cli/development-cli' : 'cli' - puts "Path is #{path}" - system(COMMANDS[0].gsub("cli_path",path)) - - next unless File.exist?("#{SHELL_SCRIPT_PATH}/#{env_vars['JASMIN_TEST_CONFIGURATION'].gsub('./spec/', '')}") - - puts "Benchmark.json file available." - - FileUtils.rm(result_path, verbose: true) if File.exist?(result_path) - iterations = 6 - for i in 1..iterations do - puts "Running #{COMMANDS[1]} for #{identifier} - iteration #{i}" - begin - system(COMMANDS[1]) - rescue - next - end - end - end - - if File.exist?(result_path) - compute_average_of_benchmarks(result_path) - puts "Benchmark results:" - system("cat #{result_path}") - else - raise "Benchmark results not found at #{result_path}." - end - rescue => e - puts "An error occurred while processing #{identifier}: #{e.message}" - end - - puts "Completed processing #{identifier}" - end -end - -def read_benchmark_data(file_path) - data = JSON.parse(File.read(file_path)) - { file_name: File.basename(file_path), data: data } -end - -def collect_latest_benchmark_data(directory) - Dir.glob("#{directory}/Benchmark_*.json").reject { |file| File.basename(file).start_with?('Benchmark_PR') }.map do |file| - read_benchmark_data(file) - end -end - -def update_performance_data(new_data, data_file_path) - existing_data = File.exist?(data_file_path) ? JSON.parse(File.read(data_file_path)) : {} - - # Transforming the new data into the expected format - new_test_data = new_data.each_with_object({}) do |benchmark, hash| - benchmark[:data].each do |entry| - test_name = entry['name'] - actual_value = entry['actual'] - release = benchmark[:file_name].gsub("Benchmark_", "").gsub(".json", "") - - hash[test_name] ||= [] - hash[test_name] << { "release" => release, "actual_value" => actual_value } - end - end - - # Merging new data with the existing data - new_test_data.each do |test_name, new_entries| - existing_data[test_name] ||= [] - - new_entries.each do |new_entry| - release = new_entry["release"] - # Removing existing entry for the same release before appending the new one - existing_data[test_name].reject! { |entry| entry["release"] == release } - existing_data[test_name] << new_entry - end - end - - File.write(data_file_path, JSON.pretty_generate(existing_data)) - puts "Updated benchmark data written to #{data_file_path}." -end - -arg = ARGV[0] || usage -parsed_arg = parse_arguments(arg) -env_vars = set_environment_vars - -case parsed_arg[:type] -when :pr - pr_number = parsed_arg[:value] - pull_request = fetch_pull_request(client, pr_number) - branch_name = pull_request.head.ref - ENV['REPO_OWNER'] = pull_request.head.user.login - ENV['REPO_NAME'] = pull_request.head.repo.name - puts "Running benchmarks for the pull request: #{pull_request.title} (#{branch_name})" - process_release_or_pr(branch_name, "PR_#{pr_number}", env_vars) -when :number_of_releases - releases = fetch_releases(client).take(parsed_arg[:value]) rescue 1 - puts "Running benchmarks for the last #{parsed_arg[:value]} release/s" - releases.each { |release| process_release_or_pr(release.tag_name, release.tag_name, env_vars) } -when :range - start_tag, end_tag = parsed_arg[:value] - releases = fetch_releases(client).select { |release| release.tag_name >= start_tag && release.tag_name <= end_tag } - puts "Running benchmarks for releases #{start_tag} - #{end_tag}" - releases.each { |release| process_release_or_pr(release.tag_name, release.tag_name, env_vars) } -end - -benchmark_data = collect_latest_benchmark_data("#{env_vars['SH_HOME_DIR']}/#{env_vars['PERFORMANCE_RESULTS_FOLDER']}") - -DATA_JSON_PATH = "#{env_vars['SH_HOME_DIR']}/#{env_vars['PERFORMANCE_RESULTS_FOLDER']}/data.json" -if parsed_arg[:type] == :pr - pr_data_filepath = "#{env_vars['SH_HOME_DIR']}/#{env_vars['PERFORMANCE_RESULTS_FOLDER']}/Benchmark_PR_#{pr_number}.json" - update_performance_data([read_benchmark_data(pr_data_filepath)], pr_data_filepath) -elsif !File.exist?(DATA_JSON_PATH) || benchmark_data.any? { |file| File.mtime(DATA_JSON_PATH) < File.mtime("#{env_vars['SH_HOME_DIR']}/#{env_vars['PERFORMANCE_RESULTS_FOLDER']}/#{file[:file_name]}") && !file[:file_name].start_with?('Benchmark_PR') } - update_performance_data(benchmark_data, DATA_JSON_PATH) -end diff --git a/scripts/benchmarks/setup_dependencies.sh b/scripts/benchmarks/setup_dependencies.sh deleted file mode 100755 index ed7dda41eb..0000000000 --- a/scripts/benchmarks/setup_dependencies.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/bash -# Multiple dependencies required to be explicitly installed since self hosted runners do not support some github actions. -sudo apt-get update -sudo apt-get install -y gconf-service libgbm-dev libasound2 libatk1.0-0 libc6 libcairo2 libcups2 \ -libdbus-1-3 libexpat1 libfontconfig1 libgcc1 libgconf-2-4 libgdk-pixbuf2.0-0 libglib2.0-0 \ -libgtk-3-0 libnspr4 libpango-1.0-0 libpangocairo-1.0-0 libstdc++6 libx11-6 libx11-xcb1 \ -libxcb1 libxcomposite1 libxcursor1 libxdamage1 libxext6 libxfixes3 libxi6 libxrandr2 \ -libxrender1 libxss1 libxtst6 ca-certificates fonts-liberation libnss3 lsb-release xdg-utils wget \ -libudev-dev cargo npm imagemagick libmagickwand-dev cmake jq \ No newline at end of file diff --git a/scripts/benchmarks/setup_dev_tools.sh b/scripts/benchmarks/setup_dev_tools.sh deleted file mode 100755 index 70c1c714f3..0000000000 --- a/scripts/benchmarks/setup_dev_tools.sh +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/bash -# Need to install ruby separately because github action for installing ruby does not work on self hosted runner. -whoami -npm install -g corepack -corepack enable -curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add - -echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list -sudo apt-get update && sudo apt-get install -y yarn software-properties-common -apt-add-repository -y ppa:rael-gc/rvm -sudo apt-get update && sudo apt-get install -y rvm -echo 'source "/etc/profile.d/rvm.sh"' >> ~/.bashrc -source /etc/profile.d/rvm.sh -rvm install ruby-3.1.2 -ruby --version -sudo chown -R $(whoami) /usr/local -rvm use 3.1.2 --default -export PATH="/usr/share/rvm:$PATH" -gem install dotenv json octokit tmpdir fileutils -curl https://sh.rustup.rs -sSf | RUSTUP_INIT_SKIP_PATH_CHECK=yes sh -s -- -y -rustup default stable -rustup update stable -export PATH="/root/.cargo/bin:$PATH" -source ~/.bashrc \ No newline at end of file diff --git a/scripts/build_times.md b/scripts/build_times.md deleted file mode 100644 index a107eabdb0..0000000000 --- a/scripts/build_times.md +++ /dev/null @@ -1,90 +0,0 @@ -# Clobber + Build - -➜ chipmunk git:(rake2) time rake run_dev -platform:install --> 0.000115 0.000878 5.226109 ( 25.216403) -environment:check --> 0.001253 0.003210 0.100817 ( 0.109530) -platform:build --> 0.000110 0.000817 2.800214 ( 2.052837) -bindings:copy_platform --> 0.024677 0.159303 0.183980 ( 1.743161) -bindings:install --> 0.000142 0.001142 15.188426 ( 40.399107) -bindings:build_rs_bindings --> 0.000411 0.009482 299.881109 ( 57.763232) -bindings:build_ts_bindings --> 0.000791 0.004130 3.373583 ( 2.256861) -bindings:build --> 0.000014 0.000017 0.000031 ( 0.000031) -electron:copy_tsbindings_and_platform --> 1.640815 14.022996 15.663811 ( 66.666204) -electron:install --> 0.000240 0.003755 43.011919 ( 88.139600) -client:install --> 0.000124 0.001277 32.600830 ( 91.624079) -matcher:install --> 0.000117 0.001169 6.006892 ( 13.506261) -matcher:build --> 0.000657 0.002195 19.954481 ( 8.476216) -ansi:install --> 0.000104 0.001087 5.898064 ( 14.154683) -ansi:build --> 0.000390 0.001882 38.506075 ( 9.280191) -utils:install --> 0.000109 0.001128 6.149039 ( 14.491074) -utils:build --> 0.000405 0.002037 34.002975 ( 9.009222) -client:build_dev --> 0.003083 0.025821 62.672229 ( 54.622763) -electron:copy_client_debug --> 0.001988 0.023736 0.025724 ( 0.040875) -updater:build --> 0.000194 0.001710 73.950498 ( 15.906165) -electron:do_build --> 0.000865 0.006287 5.051707 ( 4.491143) -electron:build_dev --> 0.000063 0.000033 0.000096 ( 0.000119) -[2023-07-16T10:54:13.986Z][DEBUG ][ app ]: On close events stack: -- ClosingWithMenu -[2023-07-16T10:54:13.986Z][DEBUG ][ app ]: Application will be closed with REGULAR case. -✨ Done in 14.22s. -cd - -run_dev --> 0.000101 0.001269 8.123875 ( 14.803803) -rake run_dev 541.84s user 136.64s system 126% cpu 8:40.87 total - -# clean + build - -platform:install --> 0.000115 0.000916 0.220439 ( 0.216618) -environment:check --> 0.001281 0.003099 0.103841 ( 0.184593) -platform:build --> 0.000120 0.000889 2.925978 ( 2.376089) -bindings:copy_platform --> 0.079909 0.674489 0.754398 ( 1.530808) -bindings:install --> 0.000128 0.001629 0.347821 ( 0.215729) -bindings:build_rs_bindings --> 0.000366 0.006391 291.020236 ( 49.206934) -bindings:build_ts_bindings --> 0.000779 0.004191 3.291229 ( 2.309365) -bindings:build --> 0.000014 0.000013 0.000027 ( 0.000027) -electron:copy_tsbindings_and_platform --> 1.095132 9.714298 10.809430 ( 38.002880) -electron:install --> 0.000207 0.002563 1.606739 ( 4.083538) -client:install --> 0.000110 0.001014 0.521979 ( 0.307294) -matcher:install --> 0.000108 0.000935 0.359388 ( 0.225401) -matcher:build --> 0.000361 0.001748 18.984907 ( 7.723089) -ansi:install --> 0.000095 0.000835 0.369448 ( 0.234557) -ansi:build --> 0.000424 0.001867 38.282280 ( 9.275230) -utils:install --> 0.000094 0.000893 0.367374 ( 0.248383) -utils:build --> 0.000418 0.001865 32.790024 ( 8.057873) -client:build_dev --> 0.002986 0.022383 25.553641 ( 27.884154) -electron:copy_client_debug --> 0.001527 0.020387 0.021914 ( 0.035207) -updater:build --> 0.000160 0.001463 69.996343 ( 11.642987) -electron:do_build --> 0.000976 0.006168 4.590163 ( 3.911150) -electron:build_dev --> 0.000059 0.000027 0.000086 ( 0.000086) -[2023-07-16T11:04:11.852Z][DEBUG ][ app ]: Application will be closed with REGULAR case. -✨ Done in 33.11s. -cd - -run_dev --> 0.000087 0.001104 13.650802 (333.282709) -rake run_dev 467.52s user 49.19s system 103% cpu 2:51.19 total - -# build again - -platform:install --> 0.000252 0.002335 0.242489 ( 0.230406) -environment:check --> 0.001189 0.002906 0.101878 ( 0.167542) -platform:build --> 0.000170 0.001413 3.353629 ( 4.526456) -bindings:copy_platform --> 0.025781 0.178307 0.204088 ( 0.351560) -bindings:install --> 0.000133 0.001384 0.352696 ( 0.220717) -bindings:build_rs_bindings --> 0.000316 0.006140 0.572571 ( 1.531530) -bindings:build_ts_bindings --> 0.000373 0.001653 0.002026 ( 0.010760) -bindings:build --> 0.000011 0.000007 0.000018 ( 0.000018) -electron:copy_tsbindings_and_platform --> 1.073376 9.239767 10.313143 ( 37.006132) -electron:install --> 0.000222 0.002624 1.674580 ( 3.952649) -client:install --> 0.000112 0.001187 0.571174 ( 0.658443) -matcher:install --> 0.000111 0.001050 0.362326 ( 0.247056) -matcher:build --> 0.000240 0.000712 0.000952 ( 0.008467) -ansi:install --> 0.000099 0.001089 0.357378 ( 0.243218) -ansi:build --> 0.000244 0.000718 0.000962 ( 0.013227) -utils:install --> 0.000100 0.000988 0.377068 ( 0.230513) -utils:build --> 0.000217 0.000636 0.000853 ( 0.007550) -client:build_dev --> 0.002789 0.021073 0.023862 ( 0.060404) -electron:copy_client_debug --> 0.004487 0.053177 0.057664 ( 1.207130) -updater:build --> 0.000252 0.002090 0.260711 ( 1.101829) -electron:do_build --> 0.001642 0.013003 0.014645 ( 0.023079) -electron:build_dev --> 0.000105 0.000057 0.000162 ( 0.000160) -run_dev --> 0.000146 0.002071 8.891770 ( 14.998834) -rake run_dev 15.85s user 12.23s system 41% cpu 1:08.29 total - diff --git a/scripts/elements/bindings.rb b/scripts/elements/bindings.rb deleted file mode 100644 index 0365d3bdee..0000000000 --- a/scripts/elements/bindings.rb +++ /dev/null @@ -1,165 +0,0 @@ -# frozen_string_literal: true - -require './scripts/env/paths' -require './scripts/env/env' -require './scripts/tools/shell' -module Bindings - DIST = "#{Paths::TS_BINDINGS}/dist" - DIST_RS = "#{Paths::RS_BINDINGS}/dist" - TARGET = "#{Paths::RS_BINDINGS}/target" - SPEC = "#{Paths::TS_BINDINGS}/spec/build" - TS_BINDINGS_LIB = "#{Paths::TS_BINDINGS}/src/native/index.node" - TS_NODE_MODULES = "#{Paths::TS_BINDINGS}/node_modules" - BUILD_ENV = "#{TS_NODE_MODULES}/.bin/electron-build-env" - TARGETS = [DIST, TS_NODE_MODULES, TARGET, DIST_RS, SPEC, TS_BINDINGS_LIB].freeze - - def self.run_jasmine_spec(spec) - run_benchmarks = spec == 'benchmark' ? true : false - ENV['ELECTRON_RUN_AS_NODE'] = '1' - Shell.chdir(Paths::TS_BINDINGS) do - if run_benchmarks - iterations = 6 - if !ENV['JASMIN_TEST_CONFIGURATION'] - Bindings.set_environment_vars - iterations = 1 - end - for i in 1..iterations do - begin - Shell.sh "#{Paths::JASMINE} spec/build/spec/session.#{spec}.spec.js" - rescue - next - end - end - else - Shell.sh "#{Paths::JASMINE} spec/build/spec/session.#{spec}.spec.js" - end - end - end - - def self.environment_vars - { - 'JASMIN_TEST_CONFIGURATION' => './spec/benchmarks.json', - 'PERFORMANCE_RESULTS_FOLDER' => 'chipmunk_performance_results', - 'PERFORMANCE_RESULTS' => 'Benchmark_PR_00', - 'SH_HOME_DIR' => "/chipmunk" - # 'SH_HOME_DIR' => "/Users/sameer.g.srivastava" - } - end - - def self.set_environment_vars - env_vars = environment_vars - env_vars.each { |key, value| ENV[key] = value } - end -end - -namespace :bindings do - task :install do - Shell.chdir(Paths::TS_BINDINGS) do - Reporter.log 'Installing ts-binding libraries' - duration = Shell.timed_sh("yarn install", 'yarn install bindings') - Reporter.done('bindings', 'installing', '', duration) - end - end - - desc 'Lint TS bindings' - task lint: 'bindings:install' do - Shell.chdir(Paths::TS_BINDINGS) do - duration = Shell.timed_sh 'yarn run lint', 'lint ts-bindings' - Reporter.done('bindings', 'linting', '', duration) - end - end - - task build_spec: ['bindings:install'] do - Shell.chdir("#{Paths::TS_BINDINGS}/spec") do - Shell.sh "#{Bindings::TS_NODE_MODULES}/.bin/tsc -p tsconfig.json" unless File.exist?('./build') - end - end - - namespace :test do - test_specs = %w[ - jobs - search - values - extract - ranges - exporting - map - observe - observing - indexes - concat - cancel - errors - stream - promises - benchmark - protocol - ] - test_specs.each do |spec| - desc "run jasmine #{spec}-spec" - task spec.to_sym => ['bindings:build', 'bindings:build_spec'] do - Bindings.run_jasmine_spec(spec) - end - end - - desc 'run binding tests' - task all: test_specs.select { |spec| "bindings:test:#{spec}" if spec!='benchmark'} - end - - desc 'clean bindings' - task :clean do - Bindings::TARGETS.each do |path| - path = "#{path}/.node_integrity" if File.basename(path) == 'node_modules' - if File.exist?(path) - Shell.rm_rf(path) - Reporter.removed('bindings', "removed: #{File.basename(path)}", '') - end - end - end - - task :build_rs_bindings do - Shell.chdir(Paths::RS_BINDINGS) do - duration = Shell.timed_sh "#{Bindings::BUILD_ENV} nj-cli build --release", 'nj-cli build bindings' - Reporter.done('bindings', 'build rs bindings', '', duration) - end - FileUtils.mkdir_p "#{Bindings::DIST}/native" - FileUtils.cp "#{Paths::RS_BINDINGS}/dist/index.node", "#{Bindings::DIST}/native/index.node" - dir_tests = "#{Paths::TS_BINDINGS}/src/native" - mod_file = "#{dir_tests}/index.node" - FileUtils.rm_f(mod_file) - FileUtils.cp "#{Paths::RS_BINDINGS}/dist/index.node", "#{Paths::TS_BINDINGS}/src/native/index.node" - end - - task :build_ts_bindings do - changes_to_ts = ChangeChecker.changes?('bindings', Paths::TS_BINDINGS) - if changes_to_ts - begin - duration = 0 - Shell.chdir(Paths::TS_BINDINGS) do - duration += Shell.timed_sh 'yarn run build', 'build ts-bindings' - ChangeChecker.reset('bindings', Paths::TS_BINDINGS, - [Bindings::DIST, Bindings::SPEC, Bindings::TS_NODE_MODULES]) - Reporter.done('bindings', 'build ts bindings', '', duration) - end - duration += ChangeChecker.create_changelist('bindings', Paths::TS_BINDINGS, Bindings::TARGETS) - Reporter.done('bindings', 'delivery', '', duration) - rescue StandardError => e - puts "An error of type #{e.class} happened, message is #{e.message}" - Reporter.failed('bindings', 'build ts bindings', '') - end - else - Reporter.skipped('bindings', 'build', '') - end - Reporter.print - end - - desc 'Build bindings' - task build: [ - 'protocol:build', - 'platform:build', - 'bindings:install', - 'environment:check', - 'bindings:build_rs_bindings', - 'bindings:build_ts_bindings' - ] -end diff --git a/scripts/elements/client.rb b/scripts/elements/client.rb deleted file mode 100644 index 46bd34d5d3..0000000000 --- a/scripts/elements/client.rb +++ /dev/null @@ -1,110 +0,0 @@ -# frozen_string_literal: true - -require './scripts/elements/wasm' -module Client - DIST = Paths::CLIENT_DIST.to_s - NODE_MODULES = "#{Paths::CLIENT}/node_modules" - TARGETS = [DIST, NODE_MODULES].freeze - - def self.client_dist(kind) - "#{Paths::CLIENT_DIST}/#{output(kind)}" - end -end - -namespace :client do - desc 'clean client' - task :clean do - Client::TARGETS.each do |path| - path = "#{path}/.node_integrity" if File.basename(path) == 'node_modules' - if File.exist?(path) - Shell.rm_rf(path) - Reporter.removed('client', "removed: #{File.basename(path)}", '') - end - end - Shell.rm_rf(Paths::ELECTRON_CLIENT_DEST) - end - - task :wipe_installation do - Shell.rm_rf(Client::NODE_MODULES) - end - - task reinstall: ['client:wipe_installation', 'client:install'] - - desc 'Install client' - task :install do - Shell.chdir(Paths::CLIENT) do - Reporter.log 'Installing client libraries' - duration = Shell.timed_sh("yarn install", 'yarn install client') - Reporter.done('client', 'installing', '', duration) - end - end - - desc 'Build client (prod)' - task build_prod: [ - 'client:install', - 'wasm:build', - 'environment:check' - ] do - execute_client_build(:production) - end - - desc 'Build client (dev)' - task build_dev: [ - 'client:install', - 'wasm:build' - ] do - execute_client_build(:debug) - end - - desc 'Lint client' - task lint: 'client:install' do - Shell.chdir(Paths::CLIENT) do - duration = Shell.timed_sh 'yarn run lint', 'lint client' - Reporter.done('client', 'linting', '', duration) - end - end - - desc 'tsc compile check client' - task check: ['client:install', 'wasm:build', 'bindings:build'] do - Shell.chdir(Paths::CLIENT) do - duration = Shell.timed_sh 'yarn run check', 'tsc check client' - Reporter.done('client', 'check', '', duration) - end - end - -end - -def output(kind) - case kind - when :production - 'release' - when :debug - 'debug' - else - raise "output #{kind} not supported" - end -end - -def yarn_target(kind) - case kind - when :production - 'prod' - when :debug - 'build' - else - raise "target #{kind} not supported" - end -end - -def execute_client_build(kind) - puts "execute_client_build(#{kind})" - Shell.chdir(Paths::CLIENT) do - duration = Shell.timed_sh "yarn run #{yarn_target(kind)}", "build client (#{output(kind)})" - ChangeChecker.reset("client_#{kind}", Paths::CLIENT, Client::TARGETS) - Reporter.done('client', "build in #{kind} mode", '', duration) - end -rescue StandardError => e - puts "An error of type #{e.class} happened, message is #{e.message}" - ChangeChecker.clean_entry("client_#{kind}", Paths::CLIENT) - Reporter.failed('client', "build in #{kind} mode", '') -end diff --git a/scripts/elements/electron.rb b/scripts/elements/electron.rb deleted file mode 100644 index a2f24f77a3..0000000000 --- a/scripts/elements/electron.rb +++ /dev/null @@ -1,109 +0,0 @@ -# frozen_string_literal: true - -require './scripts/elements/indexer' -require 'pathname' - -module Electron - DIST = "#{Paths::ELECTRON}/dist" - RELEASE = "#{Paths::ELECTRON}/release" - NODE_MODULES = "#{Paths::ELECTRON}/node_modules" - TARGETS = [DIST, RELEASE, NODE_MODULES].freeze -end - -namespace :electron do - task :clean do - Electron::TARGETS.each do |path| - path = "#{path}/.node_integrity" if File.basename(path) == 'node_modules' - if File.exist?(path) - Shell.rm_rf(path) - Reporter.removed(self, "removed: #{File.basename(path)}", '') - end - end - end - - task :clean_installation do - Shell.rm_rf(Electron::NODE_MODULES) - end - - task reinstall: ['electron:clean_installation', 'electron:install'] - - task :install do - puts 'trying to install electron yarn stuff' - Shell.chdir(Paths::ELECTRON) do - Reporter.log 'Installing Electron libraries' - duration = Shell.timed_sh("yarn install", 'yarn install electron') - Reporter.done('electron', 'installing', '', duration) - end - end - - task copy_client_debug: ['client:build_dev'] do - FileUtils.mkdir_p(Paths::ELECTRON_CLIENT_DEST) - duration = Shell.cp_r "#{Client.client_dist(:debug)}/.", Paths::ELECTRON_CLIENT_DEST, 'copy client to electron' - short_dest = Reporter.short_path(Paths::ELECTRON_CLIENT_DEST) - Reporter.done('client', "copy client to #{short_dest}", '', duration) - end - - task copy_client_prod: ['client:build_prod'] do - FileUtils.mkdir_p(Paths::ELECTRON_CLIENT_DEST) - duration = Shell.cp_r "#{Client.client_dist(:production)}/.", Paths::ELECTRON_CLIENT_DEST, 'copy client to electron' - short_dest = Reporter.short_path(Paths::ELECTRON_CLIENT_DEST) - Reporter.done('client', "copy client to #{short_dest}", '', duration) - end - - task do_build: 'updater:build' do - changes_to_electron = ChangeChecker.changes?('electron', Paths::ELECTRON) - if changes_to_electron - begin - Shell.chdir(Paths::ELECTRON) do - duration = Shell.timed_sh 'yarn run build', 'build electron' - ChangeChecker.reset('electron', Paths::ELECTRON, Electron::TARGETS) - Reporter.done('electron', 'built', '', duration) - end - rescue StandardError => e - puts "An error of type #{e.class} happened, message is #{e.message}" - Reporter.failed('electron', 'build', e.message.to_s) - end - FileUtils.cp "#{Paths::ELECTRON}/package.json", Electron::DIST - else - Reporter.skipped('electron', 'build', '') - end - end - - desc 'build dev version of electron' - task build_dev: [ - 'bindings:build', - 'electron:install', - 'electron:copy_client_debug', - 'environment:check', - 'electron:do_build' - ] do - Reporter.print - end - - desc 'build production version of electron' - task build_prod: [ - 'bindings:build', - 'electron:install', - 'electron:copy_client_prod', - 'environment:check', - 'electron:do_build' - ] do - Reporter.print - end - - desc 'Lint electron' - task lint: 'electron:install' do - Shell.chdir(Paths::ELECTRON) do - duration = Shell.timed_sh 'yarn run lint', 'lint electron' - Reporter.done('electron', 'linting', '', duration) - end - end - - desc 'tsc compile check electron' - task check: ['electron:install', 'wasm:build', 'bindings:build'] do - Shell.chdir(Paths::ELECTRON) do - duration = Shell.timed_sh 'yarn run check', 'tsc check electron' - Reporter.done('electron', 'check', '', duration) - end - end -end diff --git a/scripts/elements/indexer.rb b/scripts/elements/indexer.rb deleted file mode 100644 index b2ea298f01..0000000000 --- a/scripts/elements/indexer.rb +++ /dev/null @@ -1,29 +0,0 @@ -# frozen_string_literal: true - -require './scripts/env/paths' -module Indexer - TARGET_INDEXER_BASE = "#{Paths::INDEXER}/indexer_base/target" - TARGET_INDEXER_CLI = "#{Paths::INDEXER}/indexer_cli/target" - TARGET_MERGING = "#{Paths::INDEXER}/merging/target" - TARGET_PARSERS = "#{Paths::INDEXER}/parsers/target" - TARGET_PROCESSOR = "#{Paths::INDEXER}/processor/target" - TARGET_SESSION = "#{Paths::INDEXER}/session/target" - TARGET_SOURCES = "#{Paths::INDEXER}/sources/target" - TARGETS = [ - TARGET_INDEXER_BASE, - TARGET_INDEXER_CLI, - TARGET_MERGING, - TARGET_PARSERS, - TARGET_PROCESSOR, - TARGET_SESSION, - TARGET_SOURCES - ].freeze -end - -namespace :indexer do - task :clean do - Shell.chdir Paths::INDEXER do - Shell.sh 'cargo +stable clean' - end - end -end diff --git a/scripts/elements/matcher.rb b/scripts/elements/matcher.rb deleted file mode 100644 index 193ceb2fd8..0000000000 --- a/scripts/elements/matcher.rb +++ /dev/null @@ -1,72 +0,0 @@ -# # frozen_string_literal: true - -# module Matcher -# PKG = "#{Paths::MATCHER}/pkg" -# TARGET = "#{Paths::MATCHER}/target" -# NODE_MODULES = "#{Paths::MATCHER}/node_modules" -# TEST_OUTPUT = "#{Paths::MATCHER}/test_output" -# TARGETS = [PKG, TARGET, NODE_MODULES, TEST_OUTPUT].freeze -# end - -# namespace :matcher do -# task :clean do -# Matcher::TARGETS.each do |path| -# path = "#{path}/.node_integrity" if File.basename(path) == 'node_modules' -# if File.exist?(path) -# Shell.rm_rf(path) -# Reporter.removed('matcher', "removed: #{File.basename(path)}", '') -# end -# end -# end - -# task :wipe_installation do -# Shell.rm_rf(Matcher::NODE_MODULES) -# end - -# task reinstall: ['matcher:wipe_installation', 'matcher:install'] - -# task :install do -# Shell.chdir(Paths::MATCHER) do -# Reporter.log 'Installing matcher libraries' -# duration = Shell.timed_sh('yarn install', 'yarn install matcher') -# Reporter.done('matcher', 'installing', '', duration) -# end -# end - -# desc 'Build matcher' -# task build: ['environment:check', 'matcher:install'] do -# changes_to_files = ChangeChecker.changes?('matcher', Paths::MATCHER) -# if changes_to_files -# duration = 0 -# [Matcher::PKG, Matcher::TARGET].each do |path| -# Shell.rm_rf(path) -# Reporter.removed('matcher', File.basename(path), '') -# end -# Shell.chdir(Paths::MATCHER) do -# duration = Shell.timed_sh 'wasm-pack build --target bundler', 'wasm-pack build matcher' -# ChangeChecker.reset('matcher', Paths::MATCHER, Matcher::TARGETS) -# end -# Reporter.done('matcher', "build #{Matcher::TARGET}", '', duration) -# else -# Reporter.skipped('matcher', 'already built', '') -# end -# Reporter.print -# end - -# task test_karma: 'matcher:install' do -# Reporter.print -# Shell.chdir("#{Paths::MATCHER}/spec") do -# Shell.timed_sh 'npm run test', 'npm test matcher' -# end -# end - -# task :test_rust do -# Reporter.print -# Shell.chdir(Paths::MATCHER) do -# Shell.timed_sh 'wasm-pack test --node', 'wasm-pack test matcher' -# end -# end - -# desc 'run matcher tests' -# task test: ['matcher:test_karma', 'matcher:test_rust'] -# end diff --git a/scripts/elements/platform.rb b/scripts/elements/platform.rb deleted file mode 100644 index 826f37eb6f..0000000000 --- a/scripts/elements/platform.rb +++ /dev/null @@ -1,124 +0,0 @@ -# frozen_string_literal: true - -module Platform - DIST = "#{Paths::PLATFORM}/dist" - NODE_MODULES = "#{Paths::PLATFORM}/node_modules" - TARGETS = [DIST, NODE_MODULES].freeze -end - -def check_if_files_are_updated(path_in_platform) - require 'digest' - require 'find' - path_to_check = "#{Paths::PLATFORM}/#{path_in_platform}" - reference_checksum = Digest::MD5.file(path_to_check).hexdigest - root_p = Pathname.new(Paths::ROOT) - puts "compare with reference : #{Pathname.new(path_to_check).relative_path_from(root_p)}" - Find.find("#{Paths::ROOT}/application") do |path| - if path =~ /request\/file\/checksum.ts/ - p = Pathname.new(path) - p_rel = p.relative_path_from(root_p) - checksum = Digest::MD5.file(path).hexdigest - puts "path: #{p_rel}: #{checksum == reference_checksum ? 'OK' : 'OUT OF SYNC!'}" - end - end -end - -namespace :platform do - desc 'check if copied files are synced' - task :check_sync do - require 'digest' - require 'find' - path_to_check = "#{Paths::PLATFORM}/ipc/request/file/checksum.ts" - reference_checksum = Digest::MD5.file(path_to_check).hexdigest - root_p = Pathname.new(Paths::ROOT) - puts "compare with reference : #{Pathname.new(path_to_check).relative_path_from(root_p)}" - Find.find("#{Paths::ROOT}/application") do |path| - if path =~ /request\/file\/checksum.ts/ - p = Pathname.new(path) - p_rel = p.relative_path_from(root_p) - checksum = Digest::MD5.file(path).hexdigest - puts "path: #{p_rel}: #{checksum == reference_checksum ? 'OK' : 'OUT OF SYNC!'}" - end - end - - path_to_check = "#{Paths::ROOT}/application/platform/modules/system.ts" - reference_checksum = Digest::MD5.file(path_to_check).hexdigest - puts "compare with reference : #{Pathname.new(path_to_check).relative_path_from(root_p)}" - Find.find("#{Paths::ROOT}") do |path| - if path =~ /platform\/modules\/system.ts/ - p = Pathname.new(path) - p_rel = p.relative_path_from(root_p) - checksum = Digest::MD5.file(path).hexdigest - puts "path: #{p_rel}: #{checksum == reference_checksum ? 'OK' : 'OUT OF SYNC!'}" - end - end - - path_to_check = "#{Paths::ROOT}/application/platform/dist/modules/system.js" - reference_checksum = Digest::MD5.file(path_to_check).hexdigest - puts "compare with reference : #{Pathname.new(path_to_check).relative_path_from(root_p)}" - Find.find("#{Paths::ROOT}") do |path| - if path =~ /dist\.*\/system.js/ - p = Pathname.new(path) - p_rel = p.relative_path_from(root_p) - checksum = Digest::MD5.file(path).hexdigest - puts "path: #{p_rel}: #{checksum == reference_checksum ? 'OK' : 'OUT OF SYNC!'}" - end - end - end - - task :clean do - Platform::TARGETS.each do |path| - path = "#{path}/.node_integrity" if File.basename(path) == 'node_modules' - if File.exist?(path) - Shell.rm_rf(path) - Reporter.removed('platform', "removed: #{File.basename(path)}", '') - end - end - end - - task :wipe_installation do - Shell.rm_rf(Platform::NODE_MODULES) - end - - task reinstall: ['platform:wipe_installation', 'platform:install'] - - task :install do - Shell.chdir(Paths::PLATFORM) do - Reporter.log 'Installing platform libraries' - duration = Shell.timed_sh("yarn install", 'yarn install platform') - Reporter.done('platform', 'installing', '', duration) - end - end - - task rebuild: ['platform:clean', 'platform:build'] - - desc 'build platform' - task build: ['platform:install', 'environment:check'] do - Shell.rm_rf(Platform::DIST) if @rebuild - Reporter.removed('platform', File.basename(Platform::DIST), '') - begin - Shell.chdir(Paths::PLATFORM) do - duration = Shell.timed_sh 'yarn run build', 'build platform' - Reporter.done('platform', 'build', '', duration) - end - rescue StandardError - Reporter.failed('platform', 'build', '') - end - end - - desc 'Lint platform' - task lint: 'platform:install' do - Shell.chdir(Paths::PLATFORM) do - duration = Shell.timed_sh 'yarn run lint', 'lint platform' - Reporter.done('platform', 'linting', '', duration) - end - end - - desc 'tsc comile check platform' - task check: 'platform:install' do - Shell.chdir(Paths::PLATFORM) do - duration = Shell.timed_sh 'yarn run check', 'tsc check platform' - Reporter.done('platform', 'check', '', duration) - end - end -end diff --git a/scripts/elements/protocol.rb b/scripts/elements/protocol.rb deleted file mode 100644 index dba59838da..0000000000 --- a/scripts/elements/protocol.rb +++ /dev/null @@ -1,45 +0,0 @@ -# frozen_string_literal: true - -module Protocol - PKG = "#{Paths::PROTOCOL}/pkg" - TARGET = "#{Paths::PROTOCOL}/target" - TARGETS = [PKG, TARGET].freeze -end - -namespace :protocol do - - task :clean do - Protocol::TARGETS.each do |path| - path = "#{path}/.node_integrity" if File.basename(path) == 'node_modules' - if File.exist?(path) - Shell.rm_rf(path) - Reporter.removed('protocol', "removed: #{File.basename(path)}", '') - end - end - end - - task rebuild: ['protocol:clean', 'protocol:build'] - - desc 'build protocol' - task build: ['environment:check'] do - Shell.rm_rf(Protocol::PKG) if @rebuild - Reporter.removed('protocol', File.basename(Protocol::PKG), '') - begin - Shell.chdir(Paths::PROTOCOL) do - duration = Shell.timed_sh 'wasm-pack build --target nodejs', 'build protocol' - Reporter.done('protocol', 'build', '', duration) - end - rescue StandardError - Reporter.failed('protocol', 'build', '') - end - end - - desc 'Lint protocol' - task lint: 'protocol:install' do - Shell.chdir(Paths::PROTOCOL) do - duration = Shell.timed_sh 'cargo clippy', 'lint protocol' - Reporter.done('protocol', 'linting', '', duration) - end - end - -end diff --git a/scripts/elements/release.rb b/scripts/elements/release.rb deleted file mode 100644 index dfca205c0a..0000000000 --- a/scripts/elements/release.rb +++ /dev/null @@ -1,139 +0,0 @@ -# frozen_string_literal: true -require 'json' -require './scripts/tools/compressor' - -# Needed to get release meta data -module Release - def self.load_from_env - require 'dotenv' - Dotenv.load - rescue LoadError - puts 'dotenv not found, not considering .env file!' - end - - def self.build_cmd - Release.load_from_env - if OS.mac? - if OS.arm64? - './node_modules/.bin/electron-builder --mac --dir --config=./electron.config.darwin.arm64.json -c.mac.identity=null' - else - './node_modules/.bin/electron-builder --mac --dir --config=./electron.config.darwin.x86.json -c.mac.identity=null' - end - elsif OS.linux? - './node_modules/.bin/electron-builder --linux --dir --config=./electron.config.linux.json' - else - './node_modules/.bin/electron-builder --win --dir --config=./electron.config.win.json' - end - end - - def self.snapshot - if OS.mac? - Reporter.skipped(self, "build for darwin doesn't require snapshot", '') - return - end - snapshot_file = "#{Paths::RELEASE_BIN}/.release" - FileUtils.rm_f(snapshot_file) - lines = ".release\n" - Dir.foreach(Paths::RELEASE_BIN) do |entry| - lines = "#{lines}#{entry}\n" if entry != '.' && entry != '..' - end - File.open(snapshot_file, 'a') do |fd| - fd.puts lines - fd.flush - fd.close - end - Reporter.done('release', 'files snapshot has been created', '') - end - - def self.version - package = JSON.parse(File.read("#{Paths::ELECTRON}/package.json")) - package['version'] - end -end - -def release_file_name - prefix = OS.prefix - prefix += '64' if prefix == 'win' - prefix += '-arm64' if OS.arm64? - "chipmunk@#{Release.version}-#{prefix}-portable" -end - -namespace :release do - task :clean do - if File.exist?(Paths::RELEASE) - Shell.rm_rf(Paths::RELEASE) - Reporter.removed('release', "removed: #{File.basename(Paths::RELEASE)}", '') - end - end - - task prepare_build: ['environment:check', 'release:clean', 'updater:build'] - - desc 'Create release (production mode)' - task prod: [ - 'release:prepare_build', - 'electron:build_prod', - 'release:bundle', - 'release:compress' - ] - - desc 'Create release (dev mode)' - task dev: [ - 'release:prepare_build', - 'electron:build_dev', - 'release:bundle' - ] - - task :bundle do - Shell.chdir(Paths::ELECTRON) do - Release.load_from_env - duration = Shell.timed_sh(Release.build_cmd, 'invoke electron builder') - Reporter.done('release', 'built', '', duration) - end - Release.snapshot - Reporter.done('release', "done: #{Paths::RELEASE_BUILD}", '') - end - - task :codesign_for_mac do - Shell.chdir(Paths::ELECTRON) do - ENV['CSC_IDENTITY_AUTO_DISCOVERY'] = 'true' - options = "--force --timestamp --options runtime --verbose --deep --strict --entitlements ./resources/mac/entitlements.mac.plist" - app_path = "#{Paths::RELEASE_BUILD}/chipmunk.app" - - # Array of paths to sign - paths_to_sign = [] - paths_to_sign << "#{app_path}/Contents/Resources/bin/updater" # add updater - paths_to_sign << "#{app_path}/Contents/MacOS/chipmunk" # add executable - paths_to_sign += Dir.glob("#{app_path}/Contents/Frameworks/*.framework/Versions/A/**/**").select { |path| File.file?(path) && !File.symlink?(path)} # add all frameworks - paths_to_sign << app_path # add main app - - # Sign each path - paths_to_sign.each do |path| - command = "codesign --sign \"#{ENV['SIGNING_ID']}\" #{options} \"#{path}\"" - Shell.sh "#{command}" - end - - Shell.sh "codesign -vvv --deep --strict \"#{app_path}\"" - end - end - - task :compress do - if OS.mac? - if ENV.key?('APPLEID') && ENV.key?('APPLEIDPASS') && !ENV.key?('SKIP_NOTARIZE') - Rake::Task["release:codesign_for_mac"].invoke - end - end - Compressor.new(Paths::RELEASE_BUILD, release_file_name).compress - if OS.mac? - if ENV.key?('APPLEID') && ENV.key?('APPLEIDPASS') && !ENV.key?('SKIP_NOTARIZE') - Rake::Task["release:notarize_for_mac"].invoke - end - end - end - - task :notarize_for_mac do - Shell.chdir(Paths::ELECTRON) do - # Run the notarytool submit command - Shell.sh("xcrun notarytool submit --force --wait --verbose \"#{Paths::RELEASE}/#{release_file_name}.tgz\" --apple-id \"$APPLEID\" --team-id \"$TEAMID\" --password \"$APPLEIDPASS\"") - end - end -end diff --git a/scripts/elements/updater.rb b/scripts/elements/updater.rb deleted file mode 100644 index e837472d39..0000000000 --- a/scripts/elements/updater.rb +++ /dev/null @@ -1,27 +0,0 @@ -# frozen_string_literal: true - -module Updater - DEST = "#{Paths::UPDATER}/target" - TARGET = OS.executable("#{Paths::UPDATER}/target/release/updater") - TARGETS = [DEST].freeze -end - -namespace :updater do - task :clean do - Updater::TARGETS.each do |path| - if File.exist?(path) - Shell.rm_rf(path) - Reporter.removed(self, "removed: #{File.basename(path)}", '') - end - end - end - - desc 'Build updater' - task build: 'environment:check' do - Shell.chdir(Paths::UPDATER) do - duration = Shell.timed_sh 'cargo +stable build --release', 'build updater' - Reporter.done('updater', 'built', '', duration) - end - Reporter.print - end -end diff --git a/scripts/elements/wasm.rb b/scripts/elements/wasm.rb deleted file mode 100644 index 8d0de1b47a..0000000000 --- a/scripts/elements/wasm.rb +++ /dev/null @@ -1,76 +0,0 @@ -# frozen_string_literal: true - -require './scripts/env/paths' -require './scripts/tools/change_checker' -require './scripts/tools/reporter' - -module Wasm - PKG = "#{Paths::WASM}/pkg" - TARGET = "#{Paths::WASM}/target" - NODE_MODULES = "#{Paths::WASM}/node_modules" - TEST_OUTPUT = "#{Paths::WASM}/test_output" - TARGETS = [PKG, TARGET, NODE_MODULES, TEST_OUTPUT].freeze -end - -namespace :wasm do - task :clean do - Wasm::TARGETS.each do |path| - path = "#{path}/.node_integrity" if File.basename(path) == 'node_modules' - if File.exist?(path) - Shell.rm_rf(path) - Reporter.removed('wasm', "removed: #{File.basename(path)}", '') - end - end - end - - task :wipe_installation do - Shell.rm_rf(Wasm::NODE_MODULES) - end - - task reinstall: ['wasm:wipe_installation', 'wasm:install'] - - task :install do - Shell.chdir(Paths::WASM) do - Reporter.log 'Installing wasm libraries' - duration = Shell.timed_sh("yarn install", 'yarn install wasm') - Reporter.done('wasm', 'installing', '', duration) - end - end - - desc 'Build wasm' - task build: ['environment:check', 'wasm:install'] do - changes_to_files = ChangeChecker.changes?('wasm', Paths::WASM) - if changes_to_files - duration = 0 - [Wasm::PKG, Wasm::TARGET].each do |path| - Shell.rm_rf(path) - Reporter.removed('wasm', File.basename(path), '') - end - Shell.chdir(Paths::WASM) do - duration += Shell.timed_sh 'wasm-pack build --target bundler', 'wasm-pack build wasm' - ChangeChecker.reset('wasm', Paths::WASM, Wasm::TARGETS) - end - Reporter.done('wasm', "build #{Wasm::TARGET}", '', duration) - else - Reporter.skipped('wasm', 'already built', '') - end - Reporter.print - end - - task test_karma: 'wasm:install' do - Reporter.print - Shell.chdir("#{Paths::WASM}/spec") do - Shell.timed_sh 'npm run test', 'npm test wasm' - end - end - - task :test_rust do - Reporter.print - Shell.chdir(Paths::WASM) do - Shell.timed_sh 'wasm-pack test --node', 'wasm-pack test wasm-bindings' - end - end - - desc 'run wasm tests' - task test: ['wasm:test_karma', 'wasm:test_rust'] -end diff --git a/scripts/env/env.rb b/scripts/env/env.rb deleted file mode 100644 index 1125687839..0000000000 --- a/scripts/env/env.rb +++ /dev/null @@ -1,76 +0,0 @@ -# frozen_string_literal: true - -require './scripts/elements/platform' - -def command_exists(command) - require 'open3' - begin - _stdout, _stderr, status = Open3.capture3(command) - rescue StandardError - puts "command could not be checked: #{command}" - return false - end - puts "command #{command} could not be executed" unless status.success? - status.success? -end - -namespace :environment do - desc 'check that all needed tools are installed' - task :check do - check_node - check_rust - check_nj_cli - check_wasm_pack - check_yarn - Reporter.done('Env', 'checking environment', '') - end - - desc 'list info of needed tools' - task :list do - Shell.sh 'nj-cli -V' - Shell.sh 'node -v' - Shell.sh 'yarn -v' - # put back in when wasm-pack supports the version again - # Shell.sh 'wasm-pack -V' - Shell.sh 'rustup toolchain list' - end -end - -def check_node - return if command_exists('node -v') - - raise 'node not installed, please install before' -end - -def check_yarn - return if command_exists('yarn -v') - - Shell.sh 'npm install --global yarn' - Reporter.done('Env', 'yarn is installed', '') -end - -def check_rust - return if command_exists('rustup -V') - - output = `rustup toolchain list` - prefered_rust_version = 'stable' - is_installed = output.lines.map { |l| l =~ /#{prefered_rust_version}/ }.any? { |x| !x.nil? } - return if is_installed - - Shell.sh "rustup install #{prefered_rust_version}" - Reporter.done('Env', "Installed rust (#{prefered_rust_version})", '') -end - -def check_nj_cli - return if command_exists('nj-cli -V') - - Shell.sh 'cargo install nj-cli' - Reporter.done('Env', 'nj-cli is installed', '') -end - -def check_wasm_pack - return if command_exists('wasm-pack --help') - - Shell.sh 'cargo install wasm-pack' - Reporter.done('Env', 'wasm-pack is installed', '') -end diff --git a/scripts/env/paths.rb b/scripts/env/paths.rb deleted file mode 100644 index fa20ff1290..0000000000 --- a/scripts/env/paths.rb +++ /dev/null @@ -1,76 +0,0 @@ -# frozen_string_literal: true - -require './scripts/tools/os' - -# info of all paths used in chipmunk (OS dependend) -module Paths - def self.release_build_folder - if OS.windows? - 'win-unpacked' - elsif OS.linux? && OS.arm64? - 'linux-arm64-unpacked' - elsif OS.linux? - 'linux-unpacked' - elsif OS.arm64? - 'mac-arm64' - else - 'mac' - end - end - - def self.release_bin_folder - if OS.windows? - 'win-unpacked' - elsif OS.linux? && OS.arm64? - 'linux-arm64-unpacked' - elsif OS.linux? - 'linux-unpacked' - elsif OS.arm64? - 'mac-arm64/chipmunk.app/Contents/MacOS' - else - 'mac/chipmunk.app/Contents/MacOS' - end - end - - def self.release_resources_folder - if OS.windows? - 'win-unpacked/Resources' - elsif OS.linux? && OS.arm64? - 'linux-arm64-unpacked/Resources' - elsif OS.linux? - 'linux-unpacked/Resources' - elsif OS.arm64? - 'mac-arm64/chipmunk.app/Contents/Resources' - else - 'mac/chipmunk.app/Contents/Resources' - end - end - - ROOT = File.expand_path('../..', __dir__) - APPS = "#{ROOT}/application/apps" - - WASM = "#{APPS}/rustcore/wasm-bindings" - - CHECKLISTS = "#{ROOT}/scripts/tools/file_checklists" - CLIENT = "#{ROOT}/application/client" - CLIENT_DIST = "#{CLIENT}/dist" - - ELECTRON = "#{ROOT}/application/holder" - ELECTRON_DIST = "#{ELECTRON}/dist" - ELECTRON_CLIENT_DEST = "#{ELECTRON_DIST}/client" - TSC = "#{ELECTRON}/node_modules/.bin/tsc" - - INDEXER = "#{APPS}/indexer" - JASMINE = './node_modules/.bin/electron ./node_modules/jasmine/bin/jasmine.js' - PLATFORM = "#{ROOT}/application/platform" - PLATFORM_DIST = "#{PLATFORM}/dist" - PROTOCOL = "#{ROOT}/application/apps/protocol" - RELEASE = "#{ELECTRON}/release" - RELEASE_BIN = "#{RELEASE}/#{Paths.release_bin_folder}" - RELEASE_BUILD = "#{RELEASE}/#{Paths.release_build_folder}" - RELEASE_RESOURCES = "#{RELEASE}/#{Paths.release_resources_folder}" - RUSTCORE = "#{ROOT}/application/apps/rustcore" - RS_BINDINGS = "#{RUSTCORE}/rs-bindings" - TS_BINDINGS = "#{RUSTCORE}/ts-bindings" - UPDATER = "#{APPS}/precompiled/updater" -end diff --git a/scripts/images/tasks_1.png b/scripts/images/tasks_1.png deleted file mode 100644 index 8d4e9025ec..0000000000 Binary files a/scripts/images/tasks_1.png and /dev/null differ diff --git a/scripts/images/tasks_2.png b/scripts/images/tasks_2.png deleted file mode 100644 index 504e44bd9d..0000000000 Binary files a/scripts/images/tasks_2.png and /dev/null differ diff --git a/scripts/images/tasks_3.png b/scripts/images/tasks_3.png deleted file mode 100644 index 5b0aef6a6a..0000000000 Binary files a/scripts/images/tasks_3.png and /dev/null differ diff --git a/scripts/os/ubuntu_enabler.sh b/scripts/os/ubuntu_enabler.sh deleted file mode 100755 index 8ac46696f0..0000000000 --- a/scripts/os/ubuntu_enabler.sh +++ /dev/null @@ -1,34 +0,0 @@ -#!/bin/bash -set -euo pipefail - -PROFILE_URL="https://raw.githubusercontent.com/esrlabs/chipmunk-distribution/master/apt/apparmor/chipmunk" -PROFILE_NAME="chipmunk" -PROFILE_PATH="/etc/apparmor.d/$PROFILE_NAME" - -if [[ $EUID -ne 0 ]]; then - echo "Please run with sudo." - exit 1 -fi - -if ! systemctl is-active --quiet apparmor; then - echo "AppArmor is not active. Installing and enabling..." - apt update - apt install -y apparmor apparmor-utils - systemctl enable apparmor - systemctl start apparmor -fi - -echo "Downloading Chipmunk AppArmor profile..." -curl -fsSL "$PROFILE_URL" -o "$PROFILE_PATH" -chmod 644 "$PROFILE_PATH" - -echo "Reloading AppArmor profile..." -apparmor_parser -r "$PROFILE_PATH" - -echo "Verifying profile load..." -aa-status | grep "$PROFILE_NAME" || { - echo "Profile not loaded correctly!" - exit 1 -} - -echo "AppArmor profile installed and active." \ No newline at end of file diff --git a/scripts/tools/change_checker.rb b/scripts/tools/change_checker.rb deleted file mode 100644 index fd8dc85f98..0000000000 --- a/scripts/tools/change_checker.rb +++ /dev/null @@ -1,96 +0,0 @@ -# frozen_string_literal: true - -require 'rake' -require 'set' -require './scripts/tools/shell' -require './scripts/env/paths' - -# functionality to detect changes on monitored files -module ChangeChecker - # Creates a file with the last modified time of the latest changed file in the list of underlying folders, - # except the omitted folder locations. - # This creates an offline map of changes made to a path, and helps - # to check if any changes in files have been done in the path since - # the previous run. - def self.create_changelist(user, path, omissions = []) - starting = Process.clock_gettime(Process::CLOCK_MONOTONIC) - FileUtils.mkdir_p Paths::CHECKLISTS - checklist_path = ChangeChecker.checklist_path(user, path) - File.write(checklist_path, ChangeChecker.fingerprint(path, omissions)) - ending = Process.clock_gettime(Process::CLOCK_MONOTONIC) - ending - starting - end - - # Method checks whether a 'path' has changes to files in underlying folders, excluding the folders in the 'omissions' list. - # Returns true if its the first time we are building the checklist of file changes or if any file has changed since last run. - def self.changes?(user, path) - old_checklist_file = ChangeChecker.checklist_path(user, path) - @first_run = !File.file?(old_checklist_file) - return true if @first_run - - old_fingerprint = eval(File.read(old_checklist_file)) - new_fingerprint = ChangeChecker.fingerprint(path, old_fingerprint[:omissions]) - old_fingerprint[:entries] != new_fingerprint[:entries] - end - - def self.reset(user, path, omissions = nil) - old_checklist_file = ChangeChecker.checklist_path(user, path) - if !omissions.nil? && ChangeChecker.changefile_exists?(user, path) - old_fingerprint = eval(File.read(old_checklist_file)) - # reuse omissions - old_omissions = old_fingerprint[:omissions] - ChangeChecker.create_changelist(user, path, old_omissions) - else - omissions ||= [] - ChangeChecker.create_changelist(user, path, omissions) - end - end - - def self.clean_entry(user, path) - checklist_file = ChangeChecker.checklist_path(user, path) - FileUtils.rm_f(checklist_file) - end - - def self.changefile_exists?(user, path) - checklist_file = ChangeChecker.checklist_path(user, path) - File.file?(checklist_file) - end - - def self.fingerprint(path, omissions = []) - current_entries = {} - ChangeChecker.folders_to_check(path, omissions).each do |loc| - current_entries[loc] = ChangeChecker.timestamp_of_newest_file(loc, path).to_s - end - { entries: current_entries, omissions: omissions } - end - - def self.timestamp_of_newest_file(loc, path) - files_to_check = Dir.glob(loc + (loc == path ? '/*.*' : '/**/*.*')).select do |f| - File.file?(f) && f != "#{Paths::TS_BINDINGS}/src/native/index.node" - end - files_to_check.map { |f| File.mtime(f) }.max - end - - def self.checklist_path(user, path) - "#{Paths::CHECKLISTS}/.#{ChangeChecker.element_name(path)}_#{user}_checklist.chk" - end - - def self.element_name(path) - path.split('/')[-1] - end - - def self.folders_to_check(path, omissions = []) - Dir.glob("#{path}/*").select { |f| File.directory?(f) && !omissions.include?(f) } << path - end - - def self.clean_change_list - files_to_clean = Dir.glob("#{Paths::CHECKLISTS}/.*") - puts "removing change checker files: #{files_to_clean.map { |p| File.basename(p) }}" - FileUtils.rm_f files_to_clean - end -end - -desc 'Clean change list' -task :clean_change_list do - ChangeChecker.clean_change_list -end diff --git a/scripts/tools/compressor.rb b/scripts/tools/compressor.rb deleted file mode 100644 index 9e9c9d0428..0000000000 --- a/scripts/tools/compressor.rb +++ /dev/null @@ -1,23 +0,0 @@ -# frozen_string_literal: true -require './scripts/tools/shell' - -# Create compressed archive of application -class Compressor - def initialize(location, archname) - @location = location - @archname = archname - end - - def compress - target = if OS.mac? - './chipmunk.app' - else - '* .release' - end - @archname += '.tgz' - Shell.chdir(@location) do - duration = Shell.timed_sh "tar -czf ../#{@archname} #{target}", "compress #{target}" - Reporter.done('Compressor', "compressed: #{@archname}", '', duration) - end - end -end diff --git a/scripts/tools/mod.rb b/scripts/tools/mod.rb deleted file mode 100644 index b4fd83526e..0000000000 --- a/scripts/tools/mod.rb +++ /dev/null @@ -1,7 +0,0 @@ -# frozen_string_literal: true - -require './scripts/tools/os' -require './scripts/tools/reporter' -require './scripts/tools/compressor' -require './scripts/tools/shell' -require './scripts/tools/change_checker' diff --git a/scripts/tools/os.rb b/scripts/tools/os.rb deleted file mode 100644 index c2fa11b470..0000000000 --- a/scripts/tools/os.rb +++ /dev/null @@ -1,45 +0,0 @@ -# frozen_string_literal: true - -# os detection -module OS - def self.windows? - (/cygwin|mswin|mingw|bccwin|wince|emx/ =~ RUBY_PLATFORM) != nil - end - - def self.mac? - (/darwin/ =~ RUBY_PLATFORM) != nil - end - - def self.unix? - !OS.windows? - end - - def self.linux? - OS.unix? && !OS.mac? - end - - def self.arm64? - arch = (OS.unix? || OS.mac?) ? `uname -m` : `echo %PROCESSOR_ARCHITECTURE%` - arch.chomp!.downcase! - arch=='arm64' || arch=='aarch64' - end - - def self.executable(filename) - exe = if OS.windows? - '.exe' - else - '' - end - "#{filename}#{exe}" - end - - def self.prefix - if OS.windows? - 'win' - elsif OS.linux? - 'linux' - else - 'darwin' - end - end -end diff --git a/scripts/tools/reporter.rb b/scripts/tools/reporter.rb deleted file mode 100644 index cec91ec77c..0000000000 --- a/scripts/tools/reporter.rb +++ /dev/null @@ -1,80 +0,0 @@ -# frozen_string_literal: true - -require './scripts/tools/shell' - -module Status - Done = 'done' - Skipped = 'skipped' - Failed = 'failed' - Removed = 'removed' - Other = 'other' -end - -class Reporter - def self.log(msg) - puts "#{Time.now}: #{msg}" - end - - @jobs = [] - - %i[done skipped failed removed other].each do |status| - singleton_class.define_method status do |owner, description, icon, duration = nil| - Reporter.add(status, owner, description, icon, duration) - end - end - - def self.add(type, owner, description, icon, duration) - owner_str = if owner.is_a? String - owner - else - owner.class.to_s - end - @jobs.push({ - 'type' => type, - 'owner' => owner_str, - 'description' => description, - 'icon' => icon, - 'duration' => duration, - }) - return if Shell.is_verbose_hidden - - duration_string = duration.nil? ? '' : " (duration: #{duration.round(1)}s)" - puts "#{icon_type(type)}\t[#{align(type, 10)}]\t[#{align(owner_str, 10)}]: #{description}#{duration_string}" - end - - def self.print - @jobs.each do |job| - duration_string = job['duration'].nil? ? '' : " (duration: #{job['duration'].round(1)}s)" - puts "#{icon_type(job['type'])}\t[#{align(job['type'], 10)}]\t[#{align(job['owner'], 10)}]: #{job['description']}#{duration_string}" - end - Shell.report - end - - def self.short_path(p) - require 'pathname' - Pathname.new(p).each_filename.to_a.last(4).join('/') - end -end - -def align(content, len) - spaces = len - content.length - spaces = 0 if spaces.negative? - "#{content}#{' ' * spaces}" -end - -def icon_type(type) - case type - when :done - '*' - when :skipped - '-' - when :failed - 'x' - when :removed - '>' - when :other - '?' - else - '...' - end -end diff --git a/scripts/tools/shell.rb b/scripts/tools/shell.rb deleted file mode 100644 index 8d972611ac..0000000000 --- a/scripts/tools/shell.rb +++ /dev/null @@ -1,79 +0,0 @@ -# frozen_string_literal: true - -require 'English' -module Shell - @@cwd = '' - @times = {} - - def self.suppress_output - original_stdout = $stdout.clone - original_stderr = $stderr.clone - $stderr.reopen File.new('/dev/null', 'w') - $stdout.reopen File.new('/dev/null', 'w') - yield - ensure - $stdout.reopen original_stdout - $stderr.reopen original_stderr - end - - def self.timed_sh(cmd, desc) - desc = cmd if desc.nil? - timed_operation(-> { sh cmd }, desc) - end - - def self.cp_r(src, dest, desc = nil) - cmd = "cp_r(#{src}, #{dest})" - desc = cmd if desc.nil? - timed_operation(-> { FileUtils.cp_r src, dest, verbose: true }, desc) - end - - def self.timed_operation(cmd, tag) - starting = Process.clock_gettime(Process::CLOCK_MONOTONIC) - cmd.call - ending = Process.clock_gettime(Process::CLOCK_MONOTONIC) - elapsed = ending - starting - current = @times[tag] || 0 - new_elapsed = current + elapsed - @times[tag] = new_elapsed - elapsed - end - - def self.report - @times.each { |key, value| puts "#{key} took #{value.round(1)}s" } - end - - def self.sh(cmd) - puts "[sh ] #{Shell.cwd}> #{cmd}" - if Shell.is_verbose_hidden - Shell.suppress_output do - raise "#{cmd}: failed with #{$CHILD_STATUS.exitstatus}" unless Kernel.system(cmd, exception: true) - end - elsif !Kernel.system(cmd, exception: true) - raise "#{cmd}: failed with #{$CHILD_STATUS.exitstatus}" - end - end - - def self.is_verbose_hidden - ENV['CHIPMUNK_BUILD_VERBOSE_HIDE'] == 'true' || ENV['CHIPMUNK_BUILD_VERBOSE_HIDE'] == 'on' || ENV['CHIPMUNK_BUILD_VERBOSE_HIDE'] == '1' - end - - def self.rm_rf(dir) - puts "[rm_rf] #{Shell.cwd}> #{dir}" if Shell.is_verbose_hidden - FileUtils.rm_rf(dir) - end - - def self.rm(file) - puts "[rm ] #{Shell.cwd}> #{file}" if Shell.is_verbose_hidden - FileUtils.rm_f(file) - end - - def self.chdir(dir, &block) - @@cwd = dir.to_s - Dir.chdir(dir, &block) - @@cwd = '' - end - - def self.cwd - "\e[36m#{@@cwd}\e[0m" - end -end \ No newline at end of file diff --git a/scripts/tools/spec/change_checker_spec.rb b/scripts/tools/spec/change_checker_spec.rb deleted file mode 100644 index d04fc76ca9..0000000000 --- a/scripts/tools/spec/change_checker_spec.rb +++ /dev/null @@ -1,46 +0,0 @@ -# frozen_string_literal: true - -require 'rspec' -require './scripts/tools/change_checker' - -RSpec.describe ChangeChecker do - let(:path) { 'scripts' } - let(:targets) { Paths::CHECKLISTS } - let(:result) { ChangeChecker.changes?('rspec', path) } - - describe '.changes?' do - context 'given checklist file was not cleaned' do - it 'should not exist' do - ChangeChecker.clean_change_list - expect(ChangeChecker.changefile_exists?('rspec', path)).to eq(false) - end - end - - context 'given checklist file was created' do - it 'should exist' do - ChangeChecker.clean_change_list - ChangeChecker.create_changelist('rspec', path, targets) - expect(ChangeChecker.changefile_exists?('rspec', path)).to eq(true) - end - end - - context 'given no changes made to underlying files since last run' do - it 'should not report changes' do - ChangeChecker.clean_change_list - ChangeChecker.create_changelist('rspec', path, targets) - expect(ChangeChecker.changes?('rspec', path)).to eq(false) - end - end - - context 'given changes made to underlying files since last run' do - it 'should report changes' do - ChangeChecker.clean_change_list - ChangeChecker.create_changelist('rspec', path, targets) - test_file = "#{path}/new.txt" - File.write(test_file, 'hi') - expect(ChangeChecker.changes?('rspec', path)).to eq(true) - FileUtils.rm_f test_file - end - end - end -end