summaryrefslogtreecommitdiff
path: root/node_modules/liquidjs/dist/fs
diff options
context:
space:
mode:
Diffstat (limited to 'node_modules/liquidjs/dist/fs')
-rw-r--r--node_modules/liquidjs/dist/fs/fs-impl.d.ts9
-rw-r--r--node_modules/liquidjs/dist/fs/fs-impl.spec.d.ts1
-rw-r--r--node_modules/liquidjs/dist/fs/fs.d.ts20
-rw-r--r--node_modules/liquidjs/dist/fs/index.d.ts2
-rw-r--r--node_modules/liquidjs/dist/fs/loader.d.ts24
-rw-r--r--node_modules/liquidjs/dist/fs/loader.spec.d.ts1
-rw-r--r--node_modules/liquidjs/dist/fs/map-fs.d.ts13
-rw-r--r--node_modules/liquidjs/dist/fs/map-fs.spec.d.ts1
-rw-r--r--node_modules/liquidjs/dist/fs/node-require.d.ts1
9 files changed, 72 insertions, 0 deletions
diff --git a/node_modules/liquidjs/dist/fs/fs-impl.d.ts b/node_modules/liquidjs/dist/fs/fs-impl.d.ts
new file mode 100644
index 0000000..0d82dad
--- /dev/null
+++ b/node_modules/liquidjs/dist/fs/fs-impl.d.ts
@@ -0,0 +1,9 @@
+export declare function exists(filepath: string): Promise<boolean>;
+export declare function readFile(filepath: string): Promise<string>;
+export declare function existsSync(filepath: string): boolean;
+export declare function readFileSync(filepath: string): string;
+export declare function resolve(root: string, file: string, ext: string): string;
+export declare function fallback(file: string): string | undefined;
+export declare function dirname(filepath: string): string;
+export declare function contains(root: string, file: string): boolean;
+export { sep } from 'path';
diff --git a/node_modules/liquidjs/dist/fs/fs-impl.spec.d.ts b/node_modules/liquidjs/dist/fs/fs-impl.spec.d.ts
new file mode 100644
index 0000000..509db18
--- /dev/null
+++ b/node_modules/liquidjs/dist/fs/fs-impl.spec.d.ts
@@ -0,0 +1 @@
+export {};
diff --git a/node_modules/liquidjs/dist/fs/fs.d.ts b/node_modules/liquidjs/dist/fs/fs.d.ts
new file mode 100644
index 0000000..86cf1e1
--- /dev/null
+++ b/node_modules/liquidjs/dist/fs/fs.d.ts
@@ -0,0 +1,20 @@
+export interface FS {
+ /** check if a file exists asynchronously */
+ exists: (filepath: string) => Promise<boolean>;
+ /** check if a file exists synchronously */
+ existsSync: (filepath: string) => boolean;
+ /** read a file asynchronously */
+ readFile: (filepath: string) => Promise<string>;
+ /** read a file synchronously */
+ readFileSync: (filepath: string) => string;
+ /** resolve a file against directory, for given `ext` option */
+ resolve: (dir: string, file: string, ext: string) => string;
+ /** check if file is contained in `root`, always return `true` by default. Warning: not setting this could expose path traversal vulnerabilities. */
+ contains?: (root: string, file: string) => boolean;
+ /** defaults to "/" */
+ sep?: string;
+ /** required for relative path resolving */
+ dirname?: (file: string) => string;
+ /** fallback file for lookup failure */
+ fallback?: (file: string) => string | undefined;
+}
diff --git a/node_modules/liquidjs/dist/fs/index.d.ts b/node_modules/liquidjs/dist/fs/index.d.ts
new file mode 100644
index 0000000..b40725f
--- /dev/null
+++ b/node_modules/liquidjs/dist/fs/index.d.ts
@@ -0,0 +1,2 @@
+export * from './loader';
+export * from './fs';
diff --git a/node_modules/liquidjs/dist/fs/loader.d.ts b/node_modules/liquidjs/dist/fs/loader.d.ts
new file mode 100644
index 0000000..6d590b7
--- /dev/null
+++ b/node_modules/liquidjs/dist/fs/loader.d.ts
@@ -0,0 +1,24 @@
+import { FS } from './fs';
+export interface LoaderOptions {
+ fs: FS;
+ extname: string;
+ root: string[];
+ partials: string[];
+ layouts: string[];
+ relativeReference: boolean;
+}
+export declare enum LookupType {
+ Partials = "partials",
+ Layouts = "layouts",
+ Root = "root"
+}
+export declare class Loader {
+ shouldLoadRelative: (referencedFile: string) => boolean;
+ private options;
+ private contains;
+ constructor(options: LoaderOptions);
+ lookup(file: string, type: LookupType, sync?: boolean, currentFile?: string): Generator<unknown, string, string>;
+ candidates(file: string, dirs: string[], currentFile?: string, enforceRoot?: boolean): Generator<string, void, unknown>;
+ private dirname;
+ private lookupError;
+}
diff --git a/node_modules/liquidjs/dist/fs/loader.spec.d.ts b/node_modules/liquidjs/dist/fs/loader.spec.d.ts
new file mode 100644
index 0000000..509db18
--- /dev/null
+++ b/node_modules/liquidjs/dist/fs/loader.spec.d.ts
@@ -0,0 +1 @@
+export {};
diff --git a/node_modules/liquidjs/dist/fs/map-fs.d.ts b/node_modules/liquidjs/dist/fs/map-fs.d.ts
new file mode 100644
index 0000000..c5d6d79
--- /dev/null
+++ b/node_modules/liquidjs/dist/fs/map-fs.d.ts
@@ -0,0 +1,13 @@
+export declare class MapFS {
+ private mapping;
+ constructor(mapping: {
+ [key: string]: string;
+ });
+ sep: string;
+ exists(filepath: string): Promise<boolean>;
+ existsSync(filepath: string): boolean;
+ readFile(filepath: string): Promise<string>;
+ readFileSync(filepath: string): string;
+ dirname(filepath: string): string;
+ resolve(dir: string, file: string, ext: string): string;
+}
diff --git a/node_modules/liquidjs/dist/fs/map-fs.spec.d.ts b/node_modules/liquidjs/dist/fs/map-fs.spec.d.ts
new file mode 100644
index 0000000..509db18
--- /dev/null
+++ b/node_modules/liquidjs/dist/fs/map-fs.spec.d.ts
@@ -0,0 +1 @@
+export {};
diff --git a/node_modules/liquidjs/dist/fs/node-require.d.ts b/node_modules/liquidjs/dist/fs/node-require.d.ts
new file mode 100644
index 0000000..6b117df
--- /dev/null
+++ b/node_modules/liquidjs/dist/fs/node-require.d.ts
@@ -0,0 +1 @@
+export declare const requireResolve: (partial: string) => string;