@analogjs/vite-plugin-angular 2.4.0-beta.9 → 3.0.0-alpha.10
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/package.json +7 -9
- package/setup-vitest.d.ts +5 -4
- package/setup-vitest.js +154 -195
- package/setup-vitest.js.map +1 -1
- package/src/index.d.ts +2 -2
- package/src/index.js +6 -2
- package/src/index.js.map +1 -1
- package/src/lib/angular-build-optimizer-plugin.d.ts +4 -4
- package/src/lib/angular-build-optimizer-plugin.js +48 -62
- package/src/lib/angular-build-optimizer-plugin.js.map +1 -1
- package/src/lib/angular-jit-plugin.d.ts +3 -3
- package/src/lib/angular-jit-plugin.js +31 -37
- package/src/lib/angular-jit-plugin.js.map +1 -1
- package/src/lib/angular-pending-tasks.plugin.d.ts +7 -7
- package/src/lib/angular-pending-tasks.plugin.js +17 -18
- package/src/lib/angular-pending-tasks.plugin.js.map +1 -1
- package/src/lib/angular-vite-plugin.d.ts +68 -45
- package/src/lib/angular-vite-plugin.js +795 -963
- package/src/lib/angular-vite-plugin.js.map +1 -1
- package/src/lib/angular-vitest-plugin.d.ts +20 -16
- package/src/lib/angular-vitest-plugin.js +98 -114
- package/src/lib/angular-vitest-plugin.js.map +1 -1
- package/src/lib/compiler-plugin.d.ts +11 -11
- package/src/lib/compiler-plugin.js +43 -44
- package/src/lib/compiler-plugin.js.map +1 -1
- package/src/lib/component-resolvers.d.ts +8 -6
- package/src/lib/component-resolvers.js +93 -64
- package/src/lib/component-resolvers.js.map +1 -1
- package/src/lib/host.d.ts +8 -8
- package/src/lib/host.js +69 -101
- package/src/lib/host.js.map +1 -1
- package/src/lib/live-reload-plugin.d.ts +5 -5
- package/src/lib/live-reload-plugin.js +51 -63
- package/src/lib/live-reload-plugin.js.map +1 -1
- package/src/lib/models.d.ts +9 -9
- package/src/lib/nx-folder-plugin.d.ts +5 -5
- package/src/lib/nx-folder-plugin.js +18 -16
- package/src/lib/nx-folder-plugin.js.map +1 -1
- package/src/lib/plugins/file-replacements.plugin.d.ts +4 -4
- package/src/lib/plugins/file-replacements.plugin.js +35 -62
- package/src/lib/plugins/file-replacements.plugin.js.map +1 -1
- package/src/lib/router-plugin.d.ts +1 -1
- package/src/lib/router-plugin.js +23 -23
- package/src/lib/router-plugin.js.map +1 -1
- package/src/lib/tools/package.json +2 -7
- package/src/lib/tools/src/builders/vite/vite-build.impl.js +31 -35
- package/src/lib/tools/src/builders/vite/vite-build.impl.js.map +1 -1
- package/src/lib/tools/src/builders/vite-dev-server/dev-server.impl.js +51 -59
- package/src/lib/tools/src/builders/vite-dev-server/dev-server.impl.js.map +1 -1
- package/src/lib/tools/src/index.js +0 -1
- package/src/lib/utils/compiler-plugin-options.d.ts +11 -11
- package/src/lib/utils/devkit.d.ts +4 -4
- package/src/lib/utils/devkit.js +34 -38
- package/src/lib/utils/devkit.js.map +1 -1
- package/src/lib/utils/hmr-candidates.d.ts +28 -28
- package/src/lib/utils/rolldown.d.ts +2 -0
- package/src/lib/utils/rolldown.js +12 -0
- package/src/lib/utils/rolldown.js.map +1 -0
- package/src/lib/utils/source-file-cache.d.ts +8 -15
- package/src/lib/utils/source-file-cache.js +35 -37
- package/src/lib/utils/source-file-cache.js.map +1 -1
- package/src/test-setup.d.ts +3 -0
- package/src/lib/models.js +0 -1
- package/src/lib/models.js.map +0 -1
- package/src/lib/tools/README.md +0 -3
- package/src/lib/tools/src/index.d.ts +0 -0
- package/src/lib/tools/src/index.js.map +0 -1
- package/src/lib/utils/compiler-plugin-options.js +0 -1
- package/src/lib/utils/compiler-plugin-options.js.map +0 -1
- package/src/lib/utils/hmr-candidates.js +0 -272
- package/src/lib/utils/hmr-candidates.js.map +0 -1
- package/vite.config.d.ts +0 -2
- package/vite.config.js +0 -22
- package/vite.config.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"angular-build-optimizer-plugin.js","
|
|
1
|
+
{"version":3,"file":"angular-build-optimizer-plugin.js","names":[],"sources":["../../../../../packages/vite-plugin-angular/src/lib/angular-build-optimizer-plugin.ts"],"sourcesContent":["import type { Plugin, UserConfig } from 'vite';\nimport { JavaScriptTransformer } from './utils/devkit.js';\nimport { getJsTransformConfigKey } from './utils/rolldown.js';\n\nexport function buildOptimizerPlugin({\n jit,\n}: {\n supportedBrowsers: string[];\n jit: boolean;\n}): Plugin {\n const javascriptTransformer = new JavaScriptTransformer(\n {\n sourcemap: false,\n thirdPartySourcemaps: false,\n advancedOptimizations: true,\n jit: true,\n },\n 1,\n );\n let isProd = false;\n\n return {\n name: '@analogjs/vite-plugin-angular-optimizer',\n apply: 'build',\n config(userConfig) {\n isProd =\n userConfig.mode === 'production' ||\n process.env['NODE_ENV'] === 'production';\n const jsTransformConfigKey = getJsTransformConfigKey();\n\n return {\n define: isProd\n ? {\n ngJitMode: 'false',\n ngI18nClosureMode: 'false',\n ngDevMode: 'false',\n ngServerMode: `${!!userConfig.build?.ssr}`,\n }\n : {},\n [jsTransformConfigKey]: {\n define: isProd\n ? {\n ngDevMode: 'false',\n ngJitMode: 'false',\n ngI18nClosureMode: 'false',\n ngServerMode: `${!!userConfig.build?.ssr}`,\n }\n : undefined,\n },\n } as UserConfig;\n },\n transform: {\n filter: {\n id: /\\.[cm]?js$/,\n },\n async handler(code, id) {\n const angularPackage = /fesm20/.test(id);\n\n if (!angularPackage) {\n return {\n code: isProd\n ? code.replace(/^\\/\\/# sourceMappingURL=[^\\r\\n]*/gm, '')\n : code,\n map: {\n mappings: '',\n },\n };\n }\n\n const sideEffects =\n jit && id.includes('@angular/compiler') ? true : false;\n const result: Uint8Array = await javascriptTransformer.transformData(\n id,\n code,\n false,\n sideEffects,\n );\n\n return {\n code: Buffer.from(result).toString(),\n };\n },\n },\n };\n}\n"],"mappings":";;;AAIA,SAAgB,qBAAqB,EACnC,OAIS;CACT,MAAM,wBAAwB,IAAI,GAChC;EACE,WAAW;EACX,sBAAsB;EACtB,uBAAuB;EACvB,KAAK;EACN,EACD,EACD;CACD,IAAI,SAAS;AAEb,QAAO;EACL,MAAM;EACN,OAAO;EACP,OAAO,YAAY;AACjB,YACE,WAAW,SAAS,gBAAA,QAAA,IAAA,aACQ;GAC9B,MAAM,uBAAuB,yBAAyB;AAEtD,UAAO;IACL,QAAQ,SACJ;KACE,WAAW;KACX,mBAAmB;KACnB,WAAW;KACX,cAAc,GAAG,CAAC,CAAC,WAAW,OAAO;KACtC,GACD,EAAE;KACL,uBAAuB,EACtB,QAAQ,SACJ;KACE,WAAW;KACX,WAAW;KACX,mBAAmB;KACnB,cAAc,GAAG,CAAC,CAAC,WAAW,OAAO;KACtC,GACD,KAAA,GACL;IACF;;EAEH,WAAW;GACT,QAAQ,EACN,IAAI,cACL;GACD,MAAM,QAAQ,MAAM,IAAI;AAGtB,QAAI,CAFmB,SAAS,KAAK,GAAG,CAGtC,QAAO;KACL,MAAM,SACF,KAAK,QAAQ,sCAAsC,GAAG,GACtD;KACJ,KAAK,EACH,UAAU,IACX;KACF;IAGH,MAAM,cACJ,OAAO,GAAG,SAAS,oBAAoB,GAAG,OAAO;IACnD,MAAM,SAAqB,MAAM,sBAAsB,cACrD,IACA,MACA,OACA,YACD;AAED,WAAO,EACL,MAAM,OAAO,KAAK,OAAO,CAAC,UAAU,EACrC;;GAEJ;EACF"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Plugin } from
|
|
2
|
-
export declare function jitPlugin({ inlineStylesExtension
|
|
3
|
-
|
|
1
|
+
import { Plugin } from "vite";
|
|
2
|
+
export declare function jitPlugin({ inlineStylesExtension }: {
|
|
3
|
+
inlineStylesExtension: string;
|
|
4
4
|
}): Plugin;
|
|
@@ -1,39 +1,33 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
}
|
|
30
|
-
catch (e) {
|
|
31
|
-
console.error(`${e}`);
|
|
32
|
-
}
|
|
33
|
-
return `export default \`${styles}\``;
|
|
34
|
-
}
|
|
35
|
-
return;
|
|
36
|
-
},
|
|
37
|
-
};
|
|
1
|
+
import { preprocessCSS } from "vite";
|
|
2
|
+
import { createHash } from "node:crypto";
|
|
3
|
+
//#region packages/vite-plugin-angular/src/lib/angular-jit-plugin.ts
|
|
4
|
+
function jitPlugin({ inlineStylesExtension }) {
|
|
5
|
+
let config;
|
|
6
|
+
return {
|
|
7
|
+
name: "@analogjs/vite-plugin-angular-jit",
|
|
8
|
+
configResolved(_config) {
|
|
9
|
+
config = _config;
|
|
10
|
+
},
|
|
11
|
+
resolveId(id) {
|
|
12
|
+
if (id.startsWith("virtual:angular")) return `\0${id}`;
|
|
13
|
+
},
|
|
14
|
+
async load(id) {
|
|
15
|
+
if (id.includes("virtual:angular:jit:style:inline;")) {
|
|
16
|
+
const styleId = id.split("style:inline;")[1];
|
|
17
|
+
const styleIdHash = createHash("sha256").update(styleId).digest("hex").slice(0, 16);
|
|
18
|
+
const decodedStyles = Buffer.from(decodeURIComponent(styleId), "base64").toString();
|
|
19
|
+
let styles = "";
|
|
20
|
+
try {
|
|
21
|
+
styles = (await preprocessCSS(decodedStyles, `${styleIdHash}.${inlineStylesExtension}?direct`, config))?.code;
|
|
22
|
+
} catch (e) {
|
|
23
|
+
console.error(`${e}`);
|
|
24
|
+
}
|
|
25
|
+
return `export default \`${styles}\``;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
};
|
|
38
29
|
}
|
|
30
|
+
//#endregion
|
|
31
|
+
export { jitPlugin };
|
|
32
|
+
|
|
39
33
|
//# sourceMappingURL=angular-jit-plugin.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"angular-jit-plugin.js","
|
|
1
|
+
{"version":3,"file":"angular-jit-plugin.js","names":[],"sources":["../../../../../packages/vite-plugin-angular/src/lib/angular-jit-plugin.ts"],"sourcesContent":["import { createHash } from 'node:crypto';\nimport { Plugin, ResolvedConfig, preprocessCSS } from 'vite';\n\nexport function jitPlugin({\n inlineStylesExtension,\n}: {\n inlineStylesExtension: string;\n}): Plugin {\n let config: ResolvedConfig;\n\n return {\n name: '@analogjs/vite-plugin-angular-jit',\n configResolved(_config) {\n config = _config;\n },\n resolveId(id: string) {\n if (id.startsWith('virtual:angular')) {\n return `\\0${id}`;\n }\n\n return;\n },\n async load(id: string) {\n if (id.includes('virtual:angular:jit:style:inline;')) {\n const styleId = id.split('style:inline;')[1];\n // styleId may exceed 255 bytes of base64-encoded content, limit to 16\n const styleIdHash = createHash('sha256')\n .update(styleId)\n .digest('hex')\n .slice(0, 16);\n\n const decodedStyles = Buffer.from(\n decodeURIComponent(styleId),\n 'base64',\n ).toString();\n\n let styles: string | undefined = '';\n\n try {\n const compiled = await preprocessCSS(\n decodedStyles,\n `${styleIdHash}.${inlineStylesExtension}?direct`,\n config,\n );\n styles = compiled?.code;\n } catch (e) {\n console.error(`${e}`);\n }\n\n return `export default \\`${styles}\\``;\n }\n\n return;\n },\n };\n}\n"],"mappings":";;;AAGA,SAAgB,UAAU,EACxB,yBAGS;CACT,IAAI;AAEJ,QAAO;EACL,MAAM;EACN,eAAe,SAAS;AACtB,YAAS;;EAEX,UAAU,IAAY;AACpB,OAAI,GAAG,WAAW,kBAAkB,CAClC,QAAO,KAAK;;EAKhB,MAAM,KAAK,IAAY;AACrB,OAAI,GAAG,SAAS,oCAAoC,EAAE;IACpD,MAAM,UAAU,GAAG,MAAM,gBAAgB,CAAC;IAE1C,MAAM,cAAc,WAAW,SAAS,CACrC,OAAO,QAAQ,CACf,OAAO,MAAM,CACb,MAAM,GAAG,GAAG;IAEf,MAAM,gBAAgB,OAAO,KAC3B,mBAAmB,QAAQ,EAC3B,SACD,CAAC,UAAU;IAEZ,IAAI,SAA6B;AAEjC,QAAI;AAMF,eALiB,MAAM,cACrB,eACA,GAAG,YAAY,GAAG,sBAAsB,UACxC,OACD,GACkB;aACZ,GAAG;AACV,aAAQ,MAAM,GAAG,IAAI;;AAGvB,WAAO,oBAAoB,OAAO;;;EAKvC"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { Plugin } from
|
|
1
|
+
import { Plugin } from "vite";
|
|
2
2
|
/**
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
3
|
+
* This plugin is a workaround for the ɵPendingTasks symbol being renamed
|
|
4
|
+
* to ɵPendingTasksInternal in Angular v19.0.4. The symbol is renamed to support previous versions of
|
|
5
|
+
* Angular with Analog that used the ɵPendingTasks symbol.
|
|
6
|
+
*
|
|
7
|
+
* Commmit: https://github.com/angular/angular/commit/24e317cb157bf1ef159ed8554f1b79cb3443edf4
|
|
8
|
+
*/
|
|
9
9
|
export declare function pendingTasksPlugin(): Plugin;
|
|
@@ -1,21 +1,20 @@
|
|
|
1
|
+
//#region packages/vite-plugin-angular/src/lib/angular-pending-tasks.plugin.ts
|
|
1
2
|
/**
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
};
|
|
16
|
-
}
|
|
17
|
-
return;
|
|
18
|
-
},
|
|
19
|
-
};
|
|
3
|
+
* This plugin is a workaround for the ɵPendingTasks symbol being renamed
|
|
4
|
+
* to ɵPendingTasksInternal in Angular v19.0.4. The symbol is renamed to support previous versions of
|
|
5
|
+
* Angular with Analog that used the ɵPendingTasks symbol.
|
|
6
|
+
*
|
|
7
|
+
* Commmit: https://github.com/angular/angular/commit/24e317cb157bf1ef159ed8554f1b79cb3443edf4
|
|
8
|
+
*/
|
|
9
|
+
function pendingTasksPlugin() {
|
|
10
|
+
return {
|
|
11
|
+
name: "analogjs-pending-tasks-plugin",
|
|
12
|
+
transform(code, id) {
|
|
13
|
+
if (id.includes("analogjs-content.mjs")) return { code: code.replace("ɵPendingTasksInternal", "ɵPendingTasks") };
|
|
14
|
+
}
|
|
15
|
+
};
|
|
20
16
|
}
|
|
17
|
+
//#endregion
|
|
18
|
+
export { pendingTasksPlugin };
|
|
19
|
+
|
|
21
20
|
//# sourceMappingURL=angular-pending-tasks.plugin.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"angular-pending-tasks.plugin.js","
|
|
1
|
+
{"version":3,"file":"angular-pending-tasks.plugin.js","names":[],"sources":["../../../../../packages/vite-plugin-angular/src/lib/angular-pending-tasks.plugin.ts"],"sourcesContent":["import { Plugin } from 'vite';\n\nimport { angularFullVersion } from './utils/devkit.js';\n\n/**\n * This plugin is a workaround for the ɵPendingTasks symbol being renamed\n * to ɵPendingTasksInternal in Angular v19.0.4. The symbol is renamed to support previous versions of\n * Angular with Analog that used the ɵPendingTasks symbol.\n *\n * Commmit: https://github.com/angular/angular/commit/24e317cb157bf1ef159ed8554f1b79cb3443edf4\n */\nexport function pendingTasksPlugin(): Plugin {\n return {\n name: 'analogjs-pending-tasks-plugin',\n transform(code, id) {\n if (id.includes('analogjs-content.mjs')) {\n return {\n code: code.replace('ɵPendingTasksInternal', 'ɵPendingTasks'),\n };\n }\n return;\n },\n };\n}\n"],"mappings":";;;;;;;;AAWA,SAAgB,qBAA6B;AAC3C,QAAO;EACL,MAAM;EACN,UAAU,MAAM,IAAI;AAClB,OAAI,GAAG,SAAS,uBAAuB,CACrC,QAAO,EACL,MAAM,KAAK,QAAQ,yBAAyB,gBAAgB,EAC7D;;EAIN"}
|
|
@@ -1,53 +1,76 @@
|
|
|
1
|
-
import { NgtscProgram } from
|
|
2
|
-
import * as ts from
|
|
3
|
-
import { Plugin } from
|
|
4
|
-
import { FileReplacement } from
|
|
1
|
+
import { NgtscProgram } from "@angular/compiler-cli";
|
|
2
|
+
import * as ts from "typescript";
|
|
3
|
+
import { Plugin } from "vite";
|
|
4
|
+
import { FileReplacement } from "./plugins/file-replacements.plugin.js";
|
|
5
5
|
export declare enum DiagnosticModes {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
6
|
+
None = 0,
|
|
7
|
+
Option = 1,
|
|
8
|
+
Syntactic = 2,
|
|
9
|
+
Semantic = 4,
|
|
10
|
+
All = 7
|
|
11
11
|
}
|
|
12
12
|
export interface PluginOptions {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
13
|
+
tsconfig?: string | (() => string);
|
|
14
|
+
workspaceRoot?: string;
|
|
15
|
+
inlineStylesExtension?: string;
|
|
16
|
+
jit?: boolean;
|
|
17
|
+
advanced?: {
|
|
18
|
+
/**
|
|
19
|
+
* Custom TypeScript transformers that are run before Angular compilation
|
|
20
|
+
*/
|
|
21
|
+
tsTransformers?: ts.CustomTransformers;
|
|
22
|
+
};
|
|
23
|
+
supportedBrowsers?: string[];
|
|
24
|
+
transformFilter?: (code: string, id: string) => boolean;
|
|
25
|
+
/**
|
|
26
|
+
* Additional files to include in compilation
|
|
27
|
+
*/
|
|
28
|
+
include?: string[];
|
|
29
|
+
additionalContentDirs?: string[];
|
|
30
|
+
liveReload?: boolean;
|
|
31
|
+
disableTypeChecking?: boolean;
|
|
32
|
+
fileReplacements?: FileReplacement[];
|
|
33
|
+
experimental?: {
|
|
34
|
+
useAngularCompilationAPI?: boolean;
|
|
35
|
+
};
|
|
36
36
|
}
|
|
37
37
|
export declare function angular(options?: PluginOptions): Plugin[];
|
|
38
|
-
export declare function
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
38
|
+
export declare function createFsWatcherCacheInvalidator(invalidateFsCaches: () => void, invalidateTsconfigCaches: () => void, performCompilation: () => Promise<void>): () => Promise<void>;
|
|
39
|
+
/**
|
|
40
|
+
* Convert Analog/Angular CLI-style file replacements into the flat record
|
|
41
|
+
* expected by `AngularHostOptions.fileReplacements`.
|
|
42
|
+
*
|
|
43
|
+
* Only browser replacements (`{ replace, with }`) are converted. SSR-only
|
|
44
|
+
* replacements (`{ replace, ssr }`) are left for the Vite runtime plugin to
|
|
45
|
+
* handle — they should not be baked into the Angular compilation host because
|
|
46
|
+
* that would apply them to both browser and server builds.
|
|
47
|
+
*
|
|
48
|
+
* Relative paths are resolved against `workspaceRoot` so that the host
|
|
49
|
+
* receives the same absolute paths it would get from the Angular CLI.
|
|
50
|
+
*/
|
|
51
|
+
export declare function toAngularCompilationFileReplacements(replacements: FileReplacement[], workspaceRoot: string): Record<string, string> | undefined;
|
|
52
|
+
/**
|
|
53
|
+
* Map Angular's `templateUpdates` (keyed by `encodedFilePath@ClassName`)
|
|
54
|
+
* back to absolute file paths with their associated HMR code and component
|
|
55
|
+
* class name.
|
|
56
|
+
*
|
|
57
|
+
* Angular's private Compilation API emits template update keys in the form
|
|
58
|
+
* `encodeURIComponent(relativePath + '@' + className)`. We decode and resolve
|
|
59
|
+
* them so the caller can look up updates by the same normalized absolute path
|
|
60
|
+
* used elsewhere in the plugin (`outputFiles`, `classNames`, etc.).
|
|
61
|
+
*/
|
|
62
|
+
export declare function mapTemplateUpdatesToFiles(templateUpdates: ReadonlyMap<string, string> | undefined): Map<string, {
|
|
63
|
+
className: string;
|
|
64
|
+
code: string;
|
|
65
|
+
}>;
|
|
66
|
+
export declare function getFileMetadata(program: ts.BuilderProgram, angularCompiler?: NgtscProgram["compiler"], liveReload?: boolean, disableTypeChecking?: boolean): (file: string) => {
|
|
67
|
+
errors?: string[];
|
|
68
|
+
warnings?: (string | ts.DiagnosticMessageChain)[];
|
|
69
|
+
hmrUpdateCode?: string | null;
|
|
70
|
+
hmrEligible?: boolean;
|
|
48
71
|
};
|
|
49
72
|
/**
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
73
|
+
* Checks for vitest run from the command line
|
|
74
|
+
* @returns boolean
|
|
75
|
+
*/
|
|
53
76
|
export declare function isTestWatchMode(args?: string[]): boolean;
|