@stacksjs/stx 0.0.9 → 0.1.6
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.
- package/README.md +69 -21
- package/dist/a11y.d.ts +40 -0
- package/dist/analyzer.d.ts +64 -0
- package/dist/animation.d.ts +64 -0
- package/dist/assets.d.ts +19 -0
- package/dist/auth.d.ts +11 -0
- package/dist/bin/cli.js +2821 -154
- package/dist/caching.d.ts +18 -6
- package/dist/chunk-2ndtnc0t.js +9822 -0
- package/dist/{chunk-ywm063e4.js → chunk-e11q5a3p.js} +2 -2
- package/dist/chunk-vsbm352h.js +670 -0
- package/dist/client.d.ts +19 -35
- package/dist/components.d.ts +6 -0
- package/dist/conditionals.d.ts +17 -1
- package/dist/config.d.ts +6 -2
- package/dist/csrf.d.ts +28 -0
- package/dist/custom-directives.d.ts +5 -6
- package/dist/dev-server.d.ts +21 -0
- package/dist/docs.d.ts +39 -3
- package/dist/error-handling.d.ts +101 -0
- package/dist/expressions.d.ts +43 -4
- package/dist/formatter.d.ts +16 -0
- package/dist/forms.d.ts +15 -25
- package/dist/i18n.d.ts +17 -20
- package/dist/includes.d.ts +21 -18
- package/dist/index.d.ts +30 -24
- package/dist/init.d.ts +9 -0
- package/dist/js-ts.d.ts +10 -0
- package/dist/loops.d.ts +4 -3
- package/dist/markdown.d.ts +8 -0
- package/dist/method-spoofing.d.ts +13 -0
- package/dist/middleware.d.ts +9 -1
- package/dist/performance-utils.d.ts +58 -0
- package/dist/plugin.d.ts +2 -0
- package/dist/process.d.ts +9 -7
- package/dist/release.d.ts +1 -0
- package/dist/routes.d.ts +36 -0
- package/dist/safe-evaluator.d.ts +16 -0
- package/dist/seo.d.ts +33 -0
- package/dist/serve.d.ts +35 -0
- package/dist/src/index.js +2893 -135
- package/dist/streaming.d.ts +30 -14
- package/dist/types.d.ts +214 -48
- package/dist/utils.d.ts +21 -3
- package/dist/view-composers.d.ts +26 -0
- package/dist/web-components.d.ts +7 -14
- package/package.json +18 -9
- package/dist/chunk-04bqmpzb.js +0 -7069
- package/dist/chunk-8ehp5m3y.js +0 -4279
- package/dist/chunk-9ynf73q9.js +0 -2502
package/dist/caching.d.ts
CHANGED
|
@@ -1,11 +1,23 @@
|
|
|
1
1
|
import type { StxOptions } from './types';
|
|
2
|
-
|
|
2
|
+
/**
|
|
3
|
+
* Check if a cached version of the template is available and valid
|
|
4
|
+
*/
|
|
5
|
+
export declare function checkCache(filePath: string, options: StxOptions): Promise<string | null>;
|
|
6
|
+
/**
|
|
7
|
+
* Cache the processed template
|
|
8
|
+
*/
|
|
9
|
+
export declare function cacheTemplate(filePath: string, output: string, dependencies: Set<string>, options: StxOptions): Promise<void>;
|
|
10
|
+
/**
|
|
11
|
+
* Create a hash of the file path for cache filenames
|
|
12
|
+
*/
|
|
13
|
+
export declare function hashFilePath(filePath: string): string;
|
|
14
|
+
// Memory cache for compiled templates
|
|
15
|
+
export declare const templateCache: Map<string, CacheEntry>;
|
|
16
|
+
/**
|
|
17
|
+
* Cache entry structure
|
|
18
|
+
*/
|
|
3
19
|
declare interface CacheEntry {
|
|
4
20
|
output: string
|
|
5
21
|
mtime: number
|
|
6
22
|
dependencies: Set<string>
|
|
7
|
-
}
|
|
8
|
-
export declare const templateCache: Map<string, CacheEntry>;
|
|
9
|
-
export declare function checkCache(filePath: string, options: StxOptions): Promise<string | null>;
|
|
10
|
-
export declare function cacheTemplate(filePath: string, output: string, dependencies: Set<string>, options: StxOptions): Promise<void>;
|
|
11
|
-
export declare function hashFilePath(filePath: string): string;
|
|
23
|
+
}
|