@absolutejs/absolute 0.20.0-beta.140 → 0.20.0-beta.143

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.
@@ -0,0 +1 @@
1
+ export declare const importFromProject: (specifier: string, projectRoot?: string) => Promise<any>;
@@ -0,0 +1,2 @@
1
+ export declare const isWorkspacePackageSpecifier: (specifier: string, projectRoot?: string) => boolean;
2
+ export declare const workspacePackageDirs: (projectRoot?: string) => string[];
@@ -0,0 +1,23 @@
1
+ import { Elysia } from 'elysia';
2
+ /** The encodings this browser accepts, in the order the server prefers. */
3
+ export declare const acceptedEncodings: (header: string | null) => ({
4
+ readonly encoding: "br";
5
+ readonly suffix: ".br";
6
+ } | {
7
+ readonly encoding: "gzip";
8
+ readonly suffix: ".gz";
9
+ })[];
10
+ /** The cache policy for a static file: forever for a content-hashed name,
11
+ * revalidate for anything else. */
12
+ export declare const assetCacheControl: (pathname: string) => "public, max-age=31536000, immutable" | "public, max-age=0, must-revalidate";
13
+ /** Serves the precompressed copy of a static file to a browser that accepts
14
+ * it. Files without copies, and browsers that accept neither, fall through
15
+ * to the regular static handler. */
16
+ export declare const createPrecompressedPlugin: (buildDir: string) => Promise<Elysia<"", "local", import("elysia").DefaultSingleton, {
17
+ typebox: {};
18
+ error: [];
19
+ }, import("elysia").DefaultMetadata, {}, import("elysia").DefaultEphemeral, import("elysia").DefaultEphemeral>>;
20
+ export declare const isFingerprintedAsset: (pathname: string) => boolean;
21
+ /** Writes `.br` and `.gz` beside every compressible file in `buildDir` that
22
+ * compression actually shrinks. Returns how many files got copies. */
23
+ export declare const writePrecompressedAssets: (buildDir: string) => Promise<number>;
@@ -6,6 +6,10 @@ type HotPluginOptions = {
6
6
  /** Directories whose files are never managed (framework pages, build
7
7
  * output, assets). */
8
8
  excludedDirs: string[];
9
+ /** The app's own workspace packages: source outside `root` that the
10
+ * server imports, edited in place like the app's own files instead of
11
+ * restarting the server. */
12
+ extraRoots?: string[];
9
13
  };
10
14
  type Analysis = HotModuleAnalysis | HotModuleRejection;
11
15
  type InstalledOptions = HotPluginOptions & {
@@ -28,6 +32,7 @@ export declare const analyzeSource: (canonicalPath: string, source: string) => P
28
32
  * CommonJS package served as module source loses its named exports — so
29
33
  * everything unmanaged must not match at all. */
30
34
  export declare const installHotModulePlugin: (options: HotPluginOptions) => Promise<boolean>;
35
+ /** A filter for the app's files and its workspace packages' files. */
31
36
  export declare const managedFilter: (options: HotPluginOptions & {
32
37
  root: string;
33
38
  }) => RegExp;
@@ -0,0 +1,4 @@
1
+ /** `@up/core/x.ts` → `../core/x.ts`, for resolving against the app folder. */
2
+ export declare const decodeSrcPath: (srcPath: string) => string;
3
+ /** `../core/x.ts` → `@up/core/x.ts`; a path inside the app is unchanged. */
4
+ export declare const encodeSrcPath: (relativePath: string) => string;
@@ -0,0 +1,11 @@
1
+ import type { AnyElysia } from 'elysia';
2
+ /**
3
+ * Answers HEAD for every GET route: the same status and headers, no body.
4
+ *
5
+ * Elysia 2 no longer answers HEAD for a GET route, so every AbsoluteJS app
6
+ * answered 404 to it -- pages and static files alike -- while GET answered
7
+ * 200. Uptime monitors, link checkers, crawlers and validators ask with HEAD
8
+ * and read that as down (absolutejs#76). An app's own `.head()` route still
9
+ * wins over this fallback.
10
+ */
11
+ export declare const headFallback: <A extends AnyElysia>(app: A) => import("elysia/types").AddRoute<any, any, any, any, any, any, any, any, "head", "/*", import("elysia/types").IntersectIfObjectSchema<import("elysia").UnwrapRoute<{}, any, `${any}/*`>, import("elysia/types").MergeScopedSchemas<any, any, any>>, {}, import("elysia/types").InlineHandlerNonMacro<NoInfer<import("elysia/types").IntersectIfObjectSchema<import("elysia").UnwrapRoute<{}, any, `${any}/*`>, import("elysia/types").MergeScopedSchemas<any, any, any>>>, any>>;
package/package.json CHANGED
@@ -339,7 +339,7 @@
339
339
  "@expo/code-signing-certificates": "0.0.6",
340
340
  "@libsql/client": ">=0.15.0 <1",
341
341
  "@vue/compiler-sfc": "^3.5.27",
342
- "elysia": "^2.0.0-beta.21",
342
+ "elysia": "2.0.0-beta.21",
343
343
  "less": "^4.6.0",
344
344
  "mssql": ">=11.0.0 <13",
345
345
  "postcss": "^8.5.0",
@@ -563,7 +563,7 @@
563
563
  ]
564
564
  }
565
565
  },
566
- "version": "0.20.0-beta.140",
566
+ "version": "0.20.0-beta.143",
567
567
  "workspaces": [
568
568
  "tests/fixtures/*",
569
569
  "tests/fixtures/_packages/*"
@@ -1,8 +0,0 @@
1
- // @bun
2
- // src/utils/isTestSourcePath.ts
3
- var isTestSourcePath = (file) => {
4
- const normalized = file.replace(/\\/g, "/");
5
- return normalized.includes("/__tests__/") || /\.(?:test|spec)\.[cm]?[jt]sx?$/.test(normalized);
6
- };
7
-
8
- export { isTestSourcePath };