aboutsummaryrefslogtreecommitdiff
path: root/node_modules/nexe/lib/compiler.d.ts
diff options
context:
space:
mode:
authorMinteck <nekostarfan@gmail.com>2021-08-24 14:41:48 +0200
committerMinteck <nekostarfan@gmail.com>2021-08-24 14:41:48 +0200
commitd25e11bee6ca5ca523884da132d18e1400e077b9 (patch)
tree8af39fde19f7ed640a60fb397c7edd647dff1c4c /node_modules/nexe/lib/compiler.d.ts
downloadkartik-iridium-d25e11bee6ca5ca523884da132d18e1400e077b9.tar.gz
kartik-iridium-d25e11bee6ca5ca523884da132d18e1400e077b9.tar.bz2
kartik-iridium-d25e11bee6ca5ca523884da132d18e1400e077b9.zip
Initial commit
Diffstat (limited to 'node_modules/nexe/lib/compiler.d.ts')
-rw-r--r--node_modules/nexe/lib/compiler.d.ts100
1 files changed, 100 insertions, 0 deletions
diff --git a/node_modules/nexe/lib/compiler.d.ts b/node_modules/nexe/lib/compiler.d.ts
new file mode 100644
index 0000000..37ed527
--- /dev/null
+++ b/node_modules/nexe/lib/compiler.d.ts
@@ -0,0 +1,100 @@
+/// <reference types="node" />
+import { ReadStream } from 'fs';
+import { Logger } from './logger';
+import { NexeOptions } from './options';
+import { NexeTarget } from './target';
+import { Bundle } from './fs/bundle';
+import { File } from 'resolve-dependencies';
+declare type StringReplacer = (match: string) => string;
+export interface NexeFile {
+ filename: string;
+ absPath: string;
+ contents: string | Buffer;
+}
+export { NexeOptions };
+export declare class NexeError extends Error {
+ constructor(m: string);
+}
+export declare class NexeCompiler {
+ options: NexeOptions;
+ /**
+ * Epoch of when compilation started
+ */
+ private start;
+ private compileStep;
+ log: Logger;
+ /**
+ * Copy of process.env
+ */
+ env: {
+ [x: string]: string | undefined;
+ };
+ /**
+ * Virtual FileSystem
+ */
+ bundle: Bundle;
+ /**
+ * Root directory for the source of the current build
+ */
+ src: string;
+ /**
+ * In memory files that are being manipulated by the compiler
+ */
+ files: NexeFile[];
+ /**
+ * Standalone pieces of code run before the application entrypoint
+ */
+ shims: string[];
+ /**
+ * The last shim (defaults to "require('module').runMain()")
+ */
+ startup: string;
+ /**
+ * The main entrypoint filename for your application - eg. node mainFile.js
+ */
+ entrypoint: string | undefined;
+ /**
+ * Not used
+ */
+ targets: NexeTarget[];
+ /**
+ * Current target of the compiler
+ */
+ target: NexeTarget;
+ /**
+ * Output filename (-o myapp.exe)
+ */
+ output: string;
+ /**
+ * Flag to indicate whether or notstdin was used for input
+ */
+ stdinUsed: boolean;
+ /**
+ * Path to the configure script
+ */
+ configureScript: string;
+ /**
+ * The file path of node binary
+ */
+ nodeSrcBinPath: string;
+ /**
+ * Remote asset path if available
+ */
+ remoteAsset: string;
+ constructor(options: NexeOptions);
+ addResource(absoluteFileName: string, content?: Buffer | string | File): Promise<number>;
+ readFileAsync(file: string): Promise<NexeFile>;
+ writeFileAsync(file: string, contents: string | Buffer): Promise<void>;
+ replaceInFileAsync(file: string, replace: string | RegExp, value: string | StringReplacer): Promise<void>;
+ setFileContentsAsync(file: string, contents: string | Buffer): Promise<void>;
+ quit(error?: any): Promise<unknown>;
+ assertBuild(): void;
+ getNodeExecutableLocation(target?: NexeTarget): string;
+ private _runBuildCommandAsync;
+ private _configureAsync;
+ build(): Promise<ReadStream>;
+ private _shouldCompileBinaryAsync;
+ compileAsync(target: NexeTarget): Promise<any>;
+ code(): string;
+ private _assembleDeliverable;
+}