@abs-test/absolutejs-test 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (107) hide show
  1. package/.claude/settings.local.json +10 -0
  2. package/.hmr-temp/App.3e3a3834.js +65 -0
  3. package/.hmr-temp/App.462a6bf2.js +65 -0
  4. package/.hmr-temp/App.9d060aa8.js +65 -0
  5. package/.hmr-temp/Dropdown.4cb79868.js +43 -0
  6. package/.hmr-temp/Head.92c96724.js +51 -0
  7. package/.hmr-temp/ReactExample.031ea6c9.js +28 -0
  8. package/.hmr-temp/ReactExample.3ad8f8c9.js +29 -0
  9. package/.hmr-temp/ReactExample.b28ebc93.js +27 -0
  10. package/.hmr-temp/ReactExample.c4bbd06e.js +27 -0
  11. package/.hmr-temp/ReactExample.dcc8d0d4.js +27 -0
  12. package/CLAUDE.md +65 -0
  13. package/LICENSE +80 -0
  14. package/README.md +163 -0
  15. package/THIRD_PARTY_NOTICES.md +61 -0
  16. package/abs-test-absolutejs-test-0.1.0.tgz +0 -0
  17. package/absolutejs-absolute-0.15.12.tgz +0 -0
  18. package/dist/cli/index.js +98 -0
  19. package/dist/dev/client/cssUtils.ts +288 -0
  20. package/dist/dev/client/domDiff.ts +261 -0
  21. package/dist/dev/client/domState.ts +271 -0
  22. package/dist/dev/client/errorOverlay.ts +168 -0
  23. package/dist/dev/client/frameworkDetect.ts +63 -0
  24. package/dist/dev/client/handlers/html.ts +415 -0
  25. package/dist/dev/client/handlers/htmx.ts +248 -0
  26. package/dist/dev/client/handlers/react.ts +86 -0
  27. package/dist/dev/client/handlers/rebuild.ts +153 -0
  28. package/dist/dev/client/handlers/svelte.ts +129 -0
  29. package/dist/dev/client/handlers/vue.ts +254 -0
  30. package/dist/dev/client/headPatch.ts +213 -0
  31. package/dist/dev/client/hmrClient.ts +237 -0
  32. package/dist/dev/client/moduleVersions.ts +57 -0
  33. package/dist/dev/client/reactRefreshSetup.ts +21 -0
  34. package/dist/index.js +3667 -0
  35. package/dist/index.js.map +65 -0
  36. package/dist/src/build/buildReactVendor.d.ts +8 -0
  37. package/dist/src/build/compileSvelte.d.ts +11 -0
  38. package/dist/src/build/compileVue.d.ts +33 -0
  39. package/dist/src/build/generateManifest.d.ts +2 -0
  40. package/dist/src/build/generateReactIndexes.d.ts +1 -0
  41. package/dist/src/build/htmlScriptHMRPlugin.d.ts +13 -0
  42. package/dist/src/build/outputLogs.d.ts +1 -0
  43. package/dist/src/build/rewriteReactImports.d.ts +8 -0
  44. package/dist/src/build/scanEntryPoints.d.ts +1 -0
  45. package/dist/src/build/updateAssetPaths.d.ts +1 -0
  46. package/dist/src/build/wrapHTMLScript.d.ts +24 -0
  47. package/dist/src/cli/index.d.ts +2 -0
  48. package/dist/src/constants.d.ts +12 -0
  49. package/dist/src/core/build.d.ts +2 -0
  50. package/dist/src/core/devBuild.d.ts +6 -0
  51. package/dist/src/core/devVendorPaths.d.ts +7 -0
  52. package/dist/src/core/index.d.ts +4 -0
  53. package/dist/src/core/lookup.d.ts +3 -0
  54. package/dist/src/core/pageHandlers.d.ts +15 -0
  55. package/dist/src/dev/assetStore.d.ts +12 -0
  56. package/dist/src/dev/buildHMRClient.d.ts +1 -0
  57. package/dist/src/dev/clientManager.d.ts +26 -0
  58. package/dist/src/dev/configResolver.d.ts +13 -0
  59. package/dist/src/dev/dependencyGraph.d.ts +13 -0
  60. package/dist/src/dev/fileHashTracker.d.ts +2 -0
  61. package/dist/src/dev/fileWatcher.d.ts +3 -0
  62. package/dist/src/dev/moduleMapper.d.ts +21 -0
  63. package/dist/src/dev/moduleVersionTracker.d.ts +7 -0
  64. package/dist/src/dev/pathUtils.d.ts +5 -0
  65. package/dist/src/dev/reactComponentClassifier.d.ts +2 -0
  66. package/dist/src/dev/rebuildTrigger.d.ts +10 -0
  67. package/dist/src/dev/simpleHTMLHMR.d.ts +4 -0
  68. package/dist/src/dev/simpleHTMXHMR.d.ts +4 -0
  69. package/dist/src/dev/simpleSvelteHMR.d.ts +1 -0
  70. package/dist/src/dev/simpleVueHMR.d.ts +1 -0
  71. package/dist/src/dev/webSocket.d.ts +9 -0
  72. package/dist/src/index.d.ts +5 -0
  73. package/dist/src/plugins/hmr.d.ts +62 -0
  74. package/dist/src/plugins/index.d.ts +3 -0
  75. package/dist/src/plugins/networking.d.ts +29 -0
  76. package/dist/src/plugins/pageRouter.d.ts +1 -0
  77. package/dist/src/svelte/renderToPipeableStream.d.ts +12 -0
  78. package/dist/src/svelte/renderToReadableStream.d.ts +13 -0
  79. package/dist/src/svelte/renderToString.d.ts +9 -0
  80. package/dist/src/utils/cleanup.d.ts +7 -0
  81. package/dist/src/utils/commonAncestor.d.ts +1 -0
  82. package/dist/src/utils/escapeScriptContent.d.ts +1 -0
  83. package/dist/src/utils/generateHeadElement.d.ts +17 -0
  84. package/dist/src/utils/getDurationString.d.ts +1 -0
  85. package/dist/src/utils/getEnv.d.ts +1 -0
  86. package/dist/src/utils/getRegisterClientScript.d.ts +10 -0
  87. package/dist/src/utils/index.d.ts +6 -0
  88. package/dist/src/utils/logger.d.ts +54 -0
  89. package/dist/src/utils/networking.d.ts +2 -0
  90. package/dist/src/utils/normalizePath.d.ts +9 -0
  91. package/dist/src/utils/registerClientScript.d.ts +51 -0
  92. package/dist/src/utils/stringModifiers.d.ts +2 -0
  93. package/dist/src/utils/validateSafePath.d.ts +1 -0
  94. package/dist/types/build.d.ts +41 -0
  95. package/dist/types/client.d.ts +108 -0
  96. package/dist/types/index.d.ts +4 -0
  97. package/dist/types/messages.d.ts +138 -0
  98. package/dist/types/websocket.d.ts +6 -0
  99. package/eslint.config.mjs +238 -0
  100. package/package.json +67 -0
  101. package/tsconfig.build.json +20 -0
  102. package/types/build.ts +54 -0
  103. package/types/client.ts +111 -0
  104. package/types/index.ts +4 -0
  105. package/types/messages.ts +205 -0
  106. package/types/websocket.ts +12 -0
  107. package/types/window-globals.ts +53 -0
@@ -0,0 +1,8 @@
1
+ /** Compute the deterministic vendor paths mapping (no build needed).
2
+ * This can be called before vendor files exist on disk. */
3
+ export declare const computeVendorPaths: () => Record<string, string>;
4
+ /** Build React packages into stable vendor files (no content hash).
5
+ * Output goes to {buildDir}/react/vendor/ with predictable names like
6
+ * react.js, react-dom_client.js, etc. These files never change between
7
+ * rebuilds, so the browser always loads React from a single source. */
8
+ export declare const buildReactVendor: (buildDir: string) => Promise<void>;
@@ -0,0 +1,11 @@
1
+ type Built = {
2
+ ssr: string;
3
+ client: string;
4
+ };
5
+ type Cache = Map<string, Built>;
6
+ export declare const compileSvelte: (entryPoints: string[], svelteRoot: string, cache?: Cache, isDev?: boolean) => Promise<{
7
+ svelteIndexPaths: string[];
8
+ svelteClientPaths: string[];
9
+ svelteServerPaths: string[];
10
+ }>;
11
+ export {};
@@ -0,0 +1,33 @@
1
+ import { type SFCDescriptor } from '@vue/compiler-sfc';
2
+ export type VueChangeType = 'style-only' | 'template-only' | 'script' | 'full';
3
+ export declare const vueHmrMetadata: Map<string, {
4
+ hmrId: string;
5
+ changeType: VueChangeType;
6
+ }>;
7
+ /**
8
+ * Detect what type of change occurred in a Vue component
9
+ * Returns 'template-only' for template changes (supports rerender)
10
+ * Returns 'script' for script/scriptSetup changes (requires reload)
11
+ * Returns 'full' for first compile or when detection fails
12
+ */
13
+ export declare const detectVueChangeType: (filePath: string, descriptor: SFCDescriptor) => VueChangeType;
14
+ /**
15
+ * Generate a stable HMR ID for a Vue component
16
+ * Uses relative path from Vue root without extension
17
+ * Example: "pages/VueExample" or "components/CountButton"
18
+ */
19
+ export declare const generateVueHmrId: (sourceFilePath: string, vueRootDir: string) => string;
20
+ /**
21
+ * Clear HMR caches (useful for testing or full rebuilds)
22
+ */
23
+ export declare const clearVueHmrCaches: () => void;
24
+ export declare const compileVue: (entryPoints: string[], vueRootDir: string, isDev?: boolean) => Promise<{
25
+ vueClientPaths: string[];
26
+ vueCssPaths: string[];
27
+ vueIndexPaths: string[];
28
+ vueServerPaths: string[];
29
+ hmrMetadata: Map<string, {
30
+ hmrId: string;
31
+ changeType: VueChangeType;
32
+ }>;
33
+ }>;
@@ -0,0 +1,2 @@
1
+ import { BuildArtifact } from 'bun';
2
+ export declare const generateManifest: (outputs: BuildArtifact[], buildPath: string) => Record<string, string>;
@@ -0,0 +1 @@
1
+ export declare const generateReactIndexFiles: (reactPagesDirectory: string, reactIndexesDirectory: string, isDev?: boolean) => Promise<void>;
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Bun build plugin that wraps HTML/HTMX scripts with import.meta.hot support
3
+ * for granular HMR. This allows script changes to hot-reload independently
4
+ * without triggering a full HTML page rebuild.
5
+ */
6
+ import type { BunPlugin } from 'bun';
7
+ /**
8
+ * Creates a Bun build plugin that wraps HTML/HTMX scripts with HMR support
9
+ * @param htmlDir - The HTML directory path (normalized with forward slashes)
10
+ * @param htmxDir - The HTMX directory path (normalized with forward slashes)
11
+ * @returns Bun build plugin
12
+ */
13
+ export declare const createHTMLScriptHMRPlugin: (htmlDir?: string, htmxDir?: string) => BunPlugin;
@@ -0,0 +1 @@
1
+ export declare const outputLogs: (logs: (BuildMessage | ResolveMessage)[]) => void;
@@ -0,0 +1,8 @@
1
+ /** Post-process bundled output files to rewrite bare React specifiers
2
+ * (e.g. `from "react"`) to stable vendor paths (e.g. `from "/vendor/react.js"`).
3
+ *
4
+ * This runs after Bun.build() when React is marked as external in dev mode.
5
+ * Bun preserves bare specifiers for external packages, but browsers can't
6
+ * resolve them. Rewriting to absolute URL paths lets the browser load
7
+ * the pre-built vendor files directly. */
8
+ export declare const rewriteReactImports: (outputPaths: string[], vendorPaths: Record<string, string>) => Promise<void>;
@@ -0,0 +1 @@
1
+ export declare const scanEntryPoints: (dir: string, pattern: string) => Promise<string[]>;
@@ -0,0 +1 @@
1
+ export declare const updateAssetPaths: (manifest: Record<string, string>, directory: string) => Promise<void>;
@@ -0,0 +1,24 @@
1
+ /**
2
+ * Wraps HTML/HTMX TypeScript/JavaScript scripts with import.meta.hot support
3
+ * for granular HMR updates. This allows script changes to hot-reload
4
+ * without triggering a full HTML page rebuild.
5
+ *
6
+ * The wrapper is minimal - it just adds import.meta.hot.accept() so Bun
7
+ * knows this module can be hot-reloaded. Event listener cleanup is handled
8
+ * by the HMR client (cloning elements before script re-execution).
9
+ */
10
+ /**
11
+ * Wrap a script with HMR support using Bun's import.meta.hot API
12
+ * @param code - The original script code
13
+ * @param scriptId - Unique identifier for this script (usually the file path)
14
+ * @returns Wrapped code with HMR support
15
+ */
16
+ export declare const wrapHTMLScriptWithHMR: (code: string, scriptId: string) => string;
17
+ /**
18
+ * Check if a file path is an HTML/HTMX script that should be wrapped
19
+ * @param filePath - The file path to check
20
+ * @param htmlDir - The HTML directory path
21
+ * @param htmxDir - The HTMX directory path
22
+ * @returns true if this script should be wrapped with HMR
23
+ */
24
+ export declare const isHTMLScript: (filePath: string, htmlDir?: string, htmxDir?: string) => boolean;
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env bun
2
+ export {};
@@ -0,0 +1,12 @@
1
+ export declare const UNFOUND_INDEX = -1;
2
+ export declare const SECONDS_IN_A_MINUTE = 60;
3
+ export declare const MILLISECONDS_IN_A_SECOND = 1000;
4
+ export declare const MILLISECONDS_IN_A_MINUTE: number;
5
+ export declare const MINUTES_IN_AN_HOUR = 60;
6
+ export declare const HOURS_IN_DAY = 24;
7
+ export declare const MILLISECONDS_IN_A_DAY: number;
8
+ export declare const TIME_PRECISION = 2;
9
+ export declare const TWO_THIRDS: number;
10
+ export declare const DEFAULT_PORT = 3000;
11
+ export declare const DEFAULT_CHUNK_SIZE = 16384;
12
+ export declare const BUN_BUILD_WARNING_SUPPRESSION = "wildcard sideEffects are not supported yet";
@@ -0,0 +1,2 @@
1
+ import type { BuildConfig } from '../../types/build';
2
+ export declare const build: ({ buildDirectory, assetsDirectory, publicDirectory, reactDirectory, htmlDirectory, htmxDirectory, angularDirectory, svelteDirectory, vueDirectory, tailwind, options, incrementalFiles }: BuildConfig) => Promise<Record<string, string>>;
@@ -0,0 +1,6 @@
1
+ import type { BuildConfig } from '../../types/build';
2
+ import { type HMRState } from '../dev/clientManager';
3
+ export declare const devBuild: (config: BuildConfig) => Promise<{
4
+ hmrState: HMRState;
5
+ manifest: Record<string, string>;
6
+ }>;
@@ -0,0 +1,7 @@
1
+ /** Module-level dev vendor paths state.
2
+ * Set by devBuild() before the initial build so that build() can
3
+ * externalize React and rewrite imports to stable vendor files.
4
+ * Production builds never call setDevVendorPaths, so the getter
5
+ * returns null and build() bundles React normally. */
6
+ export declare const setDevVendorPaths: (paths: Record<string, string>) => void;
7
+ export declare const getDevVendorPaths: () => Record<string, string> | null;
@@ -0,0 +1,4 @@
1
+ export * from './build';
2
+ export * from './devBuild';
3
+ export * from './lookup';
4
+ export * from './pageHandlers';
@@ -0,0 +1,3 @@
1
+ export declare const asset: (source: Record<string, string> | {
2
+ manifest: Record<string, string>;
3
+ }, name: string) => string;
@@ -0,0 +1,15 @@
1
+ import { ComponentType as ReactComponent } from 'react';
2
+ import { Component as SvelteComponent } from 'svelte';
3
+ import { Component as VueComponent } from 'vue';
4
+ import { PropsArgs } from '../../types/build';
5
+ export declare const handleReactPageRequest: <Props extends Record<string, unknown> = Record<never, never>>(PageComponent: ReactComponent<Props>, index: string, ...props: keyof Props extends never ? [] : [props: Props]) => Promise<Response>;
6
+ type HandleSveltePageRequest = {
7
+ (PageComponent: SvelteComponent<Record<string, never>>, pagePath: string, indexPath: string): Promise<Response>;
8
+ <P extends Record<string, unknown>>(PageComponent: SvelteComponent<P>, pagePath: string, indexPath: string, props: P): Promise<Response>;
9
+ };
10
+ export declare const handleSveltePageRequest: HandleSveltePageRequest;
11
+ export declare const handleVuePageRequest: <Props extends Record<string, unknown> = Record<never, never>>(_PageComponent: VueComponent<Props>, pagePath: string, indexPath: string, headTag?: `<head>${string}</head>`, ...props: keyof Props extends never ? [] : [props: Props]) => Promise<Response>;
12
+ export declare const handleHTMLPageRequest: (pagePath: string) => Bun.BunFile;
13
+ export declare const handleHTMXPageRequest: (pagePath: string) => Bun.BunFile;
14
+ export declare const handlePageRequest: <Component>(PageComponent: Component, ...props: PropsArgs<Component>) => void;
15
+ export {};
@@ -0,0 +1,12 @@
1
+ /** Determine Content-Type from a file path extension */
2
+ export declare const getMimeType: (filePath: string) => string;
3
+ /** Upsert build outputs into the in-memory asset store.
4
+ * Evicts previous entries for the same logical asset (same base name,
5
+ * different hash) so stale paths don't accumulate. */
6
+ export declare const populateAssetStore: (store: Map<string, Uint8Array>, manifest: Record<string, string>, buildDir: string) => Promise<void>;
7
+ /** Remove hashed build files whose logical identity has a newer version.
8
+ * Checks both client assets (from the store) and SSR server files (from
9
+ * the manifest's absolute-path entries). Non-blocking async version. */
10
+ export declare const cleanStaleAssets: (store: Map<string, Uint8Array>, manifest: Record<string, string>, buildDir: string) => Promise<void>;
11
+ /** Look up an asset by its web path. Returns bytes or undefined. */
12
+ export declare const lookupAsset: (store: Map<string, Uint8Array>, path: string) => Uint8Array | undefined;
@@ -0,0 +1 @@
1
+ export declare const buildHMRClient: () => Promise<string>;
@@ -0,0 +1,26 @@
1
+ import type { FSWatcher } from 'fs';
2
+ import { type DependencyGraph } from './dependencyGraph';
3
+ import { type ModuleVersions } from './moduleVersionTracker';
4
+ import type { HMRWebSocket } from '../../types/websocket';
5
+ import type { BuildConfig } from '../../types/build';
6
+ import { type ResolvedBuildPaths } from './configResolver';
7
+ export type HMRState = {
8
+ connectedClients: Set<HMRWebSocket>;
9
+ dependencyGraph: DependencyGraph;
10
+ isRebuilding: boolean;
11
+ rebuildQueue: Set<string>;
12
+ rebuildTimeout: NodeJS.Timeout | null;
13
+ fileChangeQueue: Map<string, string[]>;
14
+ debounceTimeout: NodeJS.Timeout | null;
15
+ fileHashes: Map<string, string>;
16
+ watchers: FSWatcher[];
17
+ moduleVersions: ModuleVersions;
18
+ sourceFileVersions: Map<string, number>;
19
+ config: BuildConfig;
20
+ resolvedPaths: ResolvedBuildPaths;
21
+ vueChangeTypes: Map<string, 'template-only' | 'script' | 'full'>;
22
+ assetStore: Map<string, Uint8Array>;
23
+ };
24
+ export declare const createHMRState: (config: BuildConfig) => HMRState;
25
+ export declare const incrementSourceFileVersion: (state: HMRState, filePath: string) => number;
26
+ export declare const incrementSourceFileVersions: (state: HMRState, filePaths: string[]) => void;
@@ -0,0 +1,13 @@
1
+ import type { BuildConfig } from '../../types/build';
2
+ /** Normalize and default build paths so HMR works outside the example app. */
3
+ export declare const resolveBuildPaths: (config: BuildConfig) => {
4
+ buildDir: string;
5
+ assetsDir: string | undefined;
6
+ reactDir: string | undefined;
7
+ svelteDir: string | undefined;
8
+ vueDir: string | undefined;
9
+ angularDir: string | undefined;
10
+ htmlDir: string | undefined;
11
+ htmxDir: string | undefined;
12
+ };
13
+ export type ResolvedBuildPaths = ReturnType<typeof resolveBuildPaths>;
@@ -0,0 +1,13 @@
1
+ export type DependencyGraph = {
2
+ dependents: Map<string, Set<string>>;
3
+ dependencies: Map<string, Set<string>>;
4
+ };
5
+ export declare const createDependencyGraph: () => {
6
+ dependencies: Map<any, any>;
7
+ dependents: Map<any, any>;
8
+ };
9
+ export declare const extractDependencies: (filePath: string) => string[];
10
+ export declare const addFileToGraph: (graph: DependencyGraph, filePath: string) => void;
11
+ export declare const getAffectedFiles: (graph: DependencyGraph, changedFile: string) => string[];
12
+ export declare const removeFileFromGraph: (graph: DependencyGraph, filePath: string) => void;
13
+ export declare const buildInitialDependencyGraph: (graph: DependencyGraph, directories: string[]) => void;
@@ -0,0 +1,2 @@
1
+ export declare const computeFileHash: (filePath: string) => string;
2
+ export declare const hasFileChanged: (filePath: string, currentHash: string, previousHashes: Map<string, string>) => boolean;
@@ -0,0 +1,3 @@
1
+ import type { BuildConfig } from '../../types/build';
2
+ import type { HMRState } from './clientManager';
3
+ export declare const startFileWatching: (state: HMRState, config: BuildConfig, onFileChange: (filePath: string) => void) => void;
@@ -0,0 +1,21 @@
1
+ import { type ComponentType } from './reactComponentClassifier';
2
+ export type ModuleUpdate = {
3
+ sourceFile: string;
4
+ framework: string;
5
+ moduleKeys: string[];
6
+ modulePaths: Record<string, string>;
7
+ componentType?: ComponentType;
8
+ };
9
+ export declare const mapSourceFileToManifestKeys: (sourceFile: string, framework: string, resolvedPaths?: {
10
+ reactDir?: string;
11
+ svelteDir?: string;
12
+ vueDir?: string;
13
+ angularDir?: string;
14
+ }) => string[];
15
+ export declare const createModuleUpdates: (changedFiles: string[], framework: string, manifest: Record<string, string>, resolvedPaths?: {
16
+ reactDir?: string;
17
+ svelteDir?: string;
18
+ vueDir?: string;
19
+ angularDir?: string;
20
+ }) => ModuleUpdate[];
21
+ export declare const groupModuleUpdatesByFramework: (updates: ModuleUpdate[]) => Map<string, ModuleUpdate[]>;
@@ -0,0 +1,7 @@
1
+ export type ModuleVersion = number;
2
+ export type ModuleVersions = Map<string, ModuleVersion>;
3
+ export declare const getNextVersion: () => number;
4
+ export declare const createModuleVersionTracker: () => Map<string, number>;
5
+ export declare const incrementModuleVersion: (versions: ModuleVersions, modulePath: string) => number;
6
+ export declare const incrementModuleVersions: (versions: ModuleVersions, modulePaths: string[]) => Map<string, number>;
7
+ export declare const serializeModuleVersions: (versions: ModuleVersions) => Record<string, number>;
@@ -0,0 +1,5 @@
1
+ import { BuildConfig } from '../../types/build';
2
+ import type { ResolvedBuildPaths } from './configResolver';
3
+ export declare const getWatchPaths: (config: BuildConfig, resolved?: ResolvedBuildPaths) => string[];
4
+ export declare const shouldIgnorePath: (path: string) => boolean;
5
+ export declare const detectFramework: (filePath: string, resolved?: ResolvedBuildPaths) => "react" | "vue" | "svelte" | "html" | "assets" | "htmx" | "ignored" | "angular" | "unknown";
@@ -0,0 +1,2 @@
1
+ export type ComponentType = 'client' | 'server';
2
+ export declare const classifyComponent: (filePath: string) => "client" | "server";
@@ -0,0 +1,10 @@
1
+ import type { BuildConfig } from '../../types/build';
2
+ import type { HMRState } from './clientManager';
3
+ export declare const queueFileChange: (state: HMRState, filePath: string, config: BuildConfig, onRebuildComplete: (result: {
4
+ manifest: Record<string, string>;
5
+ hmrState: HMRState;
6
+ }) => void) => void;
7
+ export declare const triggerRebuild: (state: HMRState, config: BuildConfig, onRebuildComplete: (result: {
8
+ manifest: Record<string, string>;
9
+ hmrState: HMRState;
10
+ }) => void, filesToRebuild?: string[]) => Promise<Record<string, string> | null>;
@@ -0,0 +1,4 @@
1
+ export declare const handleHTMLUpdate: (htmlFilePath: string) => Promise<string | {
2
+ body: string;
3
+ head: string | null;
4
+ } | null>;
@@ -0,0 +1,4 @@
1
+ export declare const handleHTMXUpdate: (htmxFilePath: string) => Promise<string | {
2
+ body: string;
3
+ head: string | null;
4
+ } | null>;
@@ -0,0 +1 @@
1
+ export declare const handleSvelteUpdate: (svelteFilePath: string, manifest: Record<string, string>, buildDir?: string) => Promise<string | null>;
@@ -0,0 +1 @@
1
+ export declare const handleVueUpdate: (vueFilePath: string, manifest: Record<string, string>, buildDir?: string) => Promise<string | null>;
@@ -0,0 +1,9 @@
1
+ import type { HMRState } from './clientManager';
2
+ import type { HMRWebSocket } from '../../types/websocket';
3
+ export declare const handleClientConnect: (state: HMRState, client: HMRWebSocket, manifest: Record<string, string>) => void;
4
+ export declare const handleClientDisconnect: (state: HMRState, client: HMRWebSocket) => void;
5
+ export declare const handleHMRMessage: (state: HMRState, client: HMRWebSocket, message: unknown) => void;
6
+ export declare const broadcastToClients: (state: HMRState, message: {
7
+ type: string;
8
+ [key: string]: any;
9
+ }) => void;
@@ -0,0 +1,5 @@
1
+ export * from '../types';
2
+ export * from './constants';
3
+ export * from './core';
4
+ export * from './plugins/index';
5
+ export * from './utils/index';
@@ -0,0 +1,62 @@
1
+ import Elysia from 'elysia';
2
+ import { HMRState } from '../dev/clientManager';
3
+ export declare const hmr: (hmrState: HMRState, manifest: Record<string, string>) => (app: Elysia) => Elysia<"", {
4
+ decorator: {};
5
+ store: {};
6
+ derive: {};
7
+ resolve: {};
8
+ }, {
9
+ typebox: {};
10
+ error: {};
11
+ }, {
12
+ schema: {};
13
+ standaloneSchema: {};
14
+ macro: {};
15
+ macroFn: {};
16
+ parser: {};
17
+ response: {};
18
+ }, {
19
+ hmr: {
20
+ subscribe: {
21
+ body: unknown;
22
+ params: {};
23
+ query: unknown;
24
+ headers: unknown;
25
+ response: {
26
+ 200: Response;
27
+ };
28
+ };
29
+ };
30
+ } & {
31
+ "hmr-status": {
32
+ get: {
33
+ body: unknown;
34
+ params: {};
35
+ query: unknown;
36
+ headers: unknown;
37
+ response: {
38
+ 200: Response | {
39
+ connectedClients: number;
40
+ isRebuilding: boolean;
41
+ manifestKeys: string[];
42
+ rebuildQueue: string[];
43
+ timestamp: number;
44
+ };
45
+ };
46
+ };
47
+ };
48
+ }, {
49
+ derive: {};
50
+ resolve: {};
51
+ schema: {};
52
+ standaloneSchema: {};
53
+ response: {};
54
+ }, {
55
+ derive: {};
56
+ resolve: {};
57
+ schema: {};
58
+ standaloneSchema: {};
59
+ response: {
60
+ 200: Response;
61
+ };
62
+ }>;
@@ -0,0 +1,3 @@
1
+ export * from './pageRouter';
2
+ export * from './hmr';
3
+ export * from './networking';
@@ -0,0 +1,29 @@
1
+ import { Elysia } from 'elysia';
2
+ export declare const networking: (app: Elysia) => Elysia<"", {
3
+ decorator: {};
4
+ store: {};
5
+ derive: {};
6
+ resolve: {};
7
+ }, {
8
+ typebox: {};
9
+ error: {};
10
+ }, {
11
+ schema: {};
12
+ standaloneSchema: {};
13
+ macro: {};
14
+ macroFn: {};
15
+ parser: {};
16
+ response: {};
17
+ }, {}, {
18
+ derive: {};
19
+ resolve: {};
20
+ schema: {};
21
+ standaloneSchema: {};
22
+ response: {};
23
+ }, {
24
+ derive: {};
25
+ resolve: {};
26
+ schema: {};
27
+ standaloneSchema: {};
28
+ response: {};
29
+ }>;
@@ -0,0 +1 @@
1
+ export declare const pageRouterPlugin: () => void;
@@ -0,0 +1,12 @@
1
+ import { Readable } from 'node:stream';
2
+ import type { Component } from 'svelte';
3
+ export type RenderPipeableOptions = {
4
+ bootstrapScriptContent?: string;
5
+ bootstrapScripts?: string[];
6
+ bootstrapModules?: string[];
7
+ nonce?: string;
8
+ onError?: (error: unknown) => void;
9
+ progressiveChunkSize?: number;
10
+ signal?: AbortSignal;
11
+ };
12
+ export declare const renderToPipeableStream: <Props extends Record<string, unknown> = Record<string, never>>(component: Component<Props>, props?: Props, { bootstrapScriptContent, bootstrapScripts, bootstrapModules, nonce, onError, progressiveChunkSize, signal }?: RenderPipeableOptions) => Readable;
@@ -0,0 +1,13 @@
1
+ import type { Component } from 'svelte';
2
+ export type RenderStreamOptions = {
3
+ bootstrapScriptContent?: string;
4
+ bootstrapScripts?: string[];
5
+ bootstrapModules?: string[];
6
+ nonce?: string;
7
+ onError?: (error: unknown) => void;
8
+ progressiveChunkSize?: number;
9
+ signal?: AbortSignal;
10
+ headContent?: string;
11
+ bodyContent?: string;
12
+ };
13
+ export declare const renderToReadableStream: <Props extends Record<string, unknown> = Record<string, never>>(component: Component<Props>, props?: Props, { bootstrapScriptContent, bootstrapScripts, bootstrapModules, nonce, onError, progressiveChunkSize, signal, headContent, bodyContent }?: RenderStreamOptions) => Promise<ReadableStream<Uint8Array<ArrayBufferLike>>>;
@@ -0,0 +1,9 @@
1
+ import type { Component } from 'svelte';
2
+ export type RenderStringOptions = {
3
+ bootstrapScriptContent?: string;
4
+ bootstrapScripts?: string[];
5
+ bootstrapModules?: string[];
6
+ nonce?: string;
7
+ onError?: (error: unknown) => void;
8
+ };
9
+ export declare const renderToString: <Props extends Record<string, unknown> = Record<string, never>>(component: Component<Props>, props?: Props, { bootstrapScriptContent, bootstrapScripts, bootstrapModules, nonce, onError }?: RenderStringOptions) => string;
@@ -0,0 +1,7 @@
1
+ type CleanupProps = {
2
+ svelteDir?: string;
3
+ vueDir?: string;
4
+ reactIndexesPath?: string;
5
+ };
6
+ export declare const cleanup: ({ svelteDir, vueDir, reactIndexesPath }: CleanupProps) => Promise<void>;
7
+ export {};
@@ -0,0 +1 @@
1
+ export declare const commonAncestor: (paths: string[], fallback?: string) => string | undefined;
@@ -0,0 +1 @@
1
+ export declare const escapeScriptContent: (content: string) => string;
@@ -0,0 +1,17 @@
1
+ type GenerateHeadElementProps = {
2
+ cssPath?: string;
3
+ title?: string;
4
+ icon?: string;
5
+ description?: string;
6
+ font?: string;
7
+ };
8
+ export declare const generateHeadElement: ({ cssPath, title, description, font, icon }?: GenerateHeadElementProps) => `<head>
9
+ <meta charset="UTF-8">
10
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
11
+ <title>${string}</title>
12
+ <meta name="description" content="${string}">
13
+ <link rel="icon" href="${string}" type="image/x-icon">
14
+ ${string}
15
+ ${string}
16
+ </head>`;
17
+ export {};
@@ -0,0 +1 @@
1
+ export declare const getDurationString: (duration: number) => string;
@@ -0,0 +1 @@
1
+ export declare const getEnv: (key: string) => string;
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Type-safe helper to get the registerClientScript function during SSR.
3
+ *
4
+ * This function safely accesses the global registerClientScript that's made
5
+ * available during Angular SSR rendering. It returns null if not available
6
+ * (e.g., when running outside of SSR context).
7
+ *
8
+ * @returns The registerClientScript function if available, null otherwise
9
+ */
10
+ export declare const getRegisterClientScript: () => ((script: () => void) => string) | null;
@@ -0,0 +1,6 @@
1
+ export * from './networking';
2
+ export * from '../build/updateAssetPaths';
3
+ export * from './generateHeadElement';
4
+ export * from './getEnv';
5
+ export * from './registerClientScript';
6
+ export * from './getRegisterClientScript';
@@ -0,0 +1,54 @@
1
+ /**
2
+ * Centralized logger utility for AbsoluteJS
3
+ * Provides formatted output with ANSI colors and timestamps
4
+ */
5
+ export declare const logger: {
6
+ /**
7
+ * HMR update message
8
+ * Format: "10:30:45 AM [hmr] hmr update /pages/App.tsx"
9
+ */
10
+ hmrUpdate(path: string, framework?: string, duration?: number): void;
11
+ /**
12
+ * Page reload message
13
+ * Format: "10:30:45 AM [hmr] page reload /src/App.tsx (125ms)"
14
+ */
15
+ pageReload(path: string, framework?: string, duration?: number): void;
16
+ /**
17
+ * CSS update message
18
+ * Format: "10:30:45 AM [hmr] css update /styles/main.css (125ms)"
19
+ */
20
+ cssUpdate(path: string, framework?: string, duration?: number): void;
21
+ /**
22
+ * Script update message
23
+ * Format: "10:30:45 AM [hmr] script update /scripts/counter.ts (125ms)"
24
+ */
25
+ scriptUpdate(path: string, framework?: string, duration?: number): void;
26
+ /**
27
+ * Build error
28
+ * Format: "10:30:45 AM [hmr] error Build failed: ..."
29
+ */
30
+ error(message: string, error?: Error | string): void;
31
+ /**
32
+ * Warning message
33
+ * Format: "10:30:45 AM [hmr] warning ..."
34
+ */
35
+ warn(message: string): void;
36
+ /**
37
+ * Generic info message
38
+ */
39
+ info(message: string): void;
40
+ /**
41
+ * Server module reloaded (Bun --hot triggered a server-side change)
42
+ */
43
+ serverReload(): void;
44
+ /**
45
+ * Startup banner
46
+ */
47
+ ready: (options: {
48
+ version: string;
49
+ duration: number;
50
+ port: string | number;
51
+ host: string;
52
+ networkUrl?: string;
53
+ }) => void;
54
+ };
@@ -0,0 +1,2 @@
1
+ export declare const getAllNetworkIPs: () => string[];
2
+ export declare const getLocalIPAddress: () => string;