@analogjs/vite-plugin-angular 3.0.0-alpha.3 → 3.0.0-alpha.31
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/migrations/migrate-setup-vitest/migrate-setup-vitest.d.ts +2 -0
- package/migrations/migrate-setup-vitest/migrate-setup-vitest.js +49 -0
- package/migrations/migrate-setup-vitest/migrate-setup-vitest.js.map +1 -0
- package/migrations/migration.json +7 -1
- package/migrations/migrations.json +9 -0
- package/migrations/update-3-0-0/migrate-setup-vitest.d.ts +2 -0
- package/migrations/update-3-0-0/migrate-setup-vitest.js +36 -0
- package/migrations/update-3-0-0/migrate-setup-vitest.js.map +1 -0
- package/package.json +27 -13
- package/src/index.d.ts +3 -2
- package/src/index.js +6 -2
- package/src/index.js.map +1 -1
- package/src/lib/analog-compiler-plugin.d.ts +14 -0
- package/src/lib/analog-compiler-plugin.js +257 -0
- package/src/lib/analog-compiler-plugin.js.map +1 -0
- 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 +37 -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 +231 -40
- package/src/lib/angular-vite-plugin.js +1948 -964
- package/src/lib/angular-vite-plugin.js.map +1 -1
- package/src/lib/angular-vitest-plugin.d.ts +19 -15
- package/src/lib/angular-vitest-plugin.js +99 -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 +23 -5
- package/src/lib/component-resolvers.js +153 -63
- package/src/lib/component-resolvers.js.map +1 -1
- package/src/lib/host.d.ts +10 -8
- package/src/lib/host.js +109 -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 +57 -62
- 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 +40 -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/style-pipeline.d.ts +15 -0
- package/src/lib/style-pipeline.js +31 -0
- package/src/lib/style-pipeline.js.map +1 -0
- package/src/lib/style-preprocessor.d.ts +35 -0
- package/src/lib/style-preprocessor.js +35 -0
- package/src/lib/style-preprocessor.js.map +1 -0
- package/src/lib/stylesheet-registry.d.ts +73 -0
- package/src/lib/stylesheet-registry.js +168 -0
- package/src/lib/stylesheet-registry.js.map +1 -0
- package/src/lib/tools/package.json +2 -7
- package/src/lib/tools/src/builders/vite/vite-build.impl.js +31 -38
- 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 -62
- package/src/lib/tools/src/builders/vite-dev-server/dev-server.impl.js.map +1 -1
- package/src/lib/tools/src/index.js +0 -2
- package/src/lib/utils/compiler-plugin-options.d.ts +11 -11
- package/src/lib/utils/debug-harness.d.ts +23 -0
- package/src/lib/utils/debug-harness.js +88 -0
- package/src/lib/utils/debug-harness.js.map +1 -0
- package/src/lib/utils/debug-log-file.d.ts +5 -0
- package/src/lib/utils/debug-log-file.js +56 -0
- package/src/lib/utils/debug-log-file.js.map +1 -0
- package/src/lib/utils/debug.d.ts +26 -0
- package/src/lib/utils/debug.js +35 -0
- package/src/lib/utils/debug.js.map +1 -0
- package/src/lib/utils/devkit.d.ts +6 -6
- 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/plugin-config.d.ts +30 -0
- package/src/lib/utils/plugin-config.js +64 -0
- package/src/lib/utils/plugin-config.js.map +1 -0
- 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/lib/utils/virtual-ids.d.ts +8 -0
- package/src/lib/utils/virtual-ids.js +35 -0
- package/src/lib/utils/virtual-ids.js.map +1 -0
- package/src/lib/utils/virtual-resources.d.ts +31 -0
- package/src/lib/utils/virtual-resources.js +60 -0
- package/src/lib/utils/virtual-resources.js.map +1 -0
- package/src/test-setup.d.ts +2 -0
- package/setup-vitest.d.ts +0 -4
- package/setup-vitest.js +0 -215
- package/setup-vitest.js.map +0 -1
- 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
|
@@ -1,39 +1,37 @@
|
|
|
1
|
+
import * as path$1 from "node:path";
|
|
2
|
+
import { platform } from "node:os";
|
|
3
|
+
import { pathToFileURL } from "node:url";
|
|
4
|
+
//#region packages/vite-plugin-angular/src/lib/utils/source-file-cache.ts
|
|
1
5
|
/**
|
|
2
|
-
|
|
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
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
}
|
|
34
|
-
this.delete(file);
|
|
35
|
-
this.modifiedFiles.add(file);
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
}
|
|
6
|
+
* @license
|
|
7
|
+
* Copyright Google LLC All Rights Reserved.
|
|
8
|
+
*
|
|
9
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
10
|
+
* found in the LICENSE file at https://angular.io/license
|
|
11
|
+
*/
|
|
12
|
+
var USING_WINDOWS = platform() === "win32";
|
|
13
|
+
var WINDOWS_SEP_REGEXP = new RegExp(`\\${path$1.win32.sep}`, "g");
|
|
14
|
+
var SourceFileCache = class extends Map {
|
|
15
|
+
modifiedFiles = /* @__PURE__ */ new Set();
|
|
16
|
+
babelFileCache = /* @__PURE__ */ new Map();
|
|
17
|
+
typeScriptFileCache = /* @__PURE__ */ new Map();
|
|
18
|
+
referencedFiles;
|
|
19
|
+
constructor(persistentCachePath) {
|
|
20
|
+
super();
|
|
21
|
+
this.persistentCachePath = persistentCachePath;
|
|
22
|
+
}
|
|
23
|
+
invalidate(files) {
|
|
24
|
+
if (files !== this.modifiedFiles) this.modifiedFiles.clear();
|
|
25
|
+
for (let file of files) {
|
|
26
|
+
this.babelFileCache.delete(file);
|
|
27
|
+
this.typeScriptFileCache.delete(pathToFileURL(file).href);
|
|
28
|
+
if (USING_WINDOWS) file = file.replace(WINDOWS_SEP_REGEXP, path$1.posix.sep);
|
|
29
|
+
this.delete(file);
|
|
30
|
+
this.modifiedFiles.add(file);
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
//#endregion
|
|
35
|
+
export { SourceFileCache };
|
|
36
|
+
|
|
39
37
|
//# sourceMappingURL=source-file-cache.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"source-file-cache.js","
|
|
1
|
+
{"version":3,"file":"source-file-cache.js","names":[],"sources":["../../../../src/lib/utils/source-file-cache.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport { platform } from 'node:os';\nimport * as path from 'node:path';\nimport { pathToFileURL } from 'node:url';\nimport type ts from 'typescript';\n\nconst USING_WINDOWS = platform() === 'win32';\nconst WINDOWS_SEP_REGEXP = new RegExp(`\\\\${path.win32.sep}`, 'g');\n\nexport class SourceFileCache extends Map<string, ts.SourceFile> {\n readonly modifiedFiles: Set<string> = new Set<string>();\n readonly babelFileCache: Map<string, Uint8Array> = new Map<\n string,\n Uint8Array\n >();\n readonly typeScriptFileCache: Map<string, string | Uint8Array> = new Map<\n string,\n string | Uint8Array\n >();\n\n referencedFiles?: readonly string[];\n\n constructor(readonly persistentCachePath?: string) {\n super();\n }\n\n invalidate(files: Iterable<string>): void {\n if (files !== this.modifiedFiles) {\n this.modifiedFiles.clear();\n }\n for (let file of files) {\n this.babelFileCache.delete(file);\n this.typeScriptFileCache.delete(pathToFileURL(file).href);\n\n // Normalize separators to allow matching TypeScript Host paths\n if (USING_WINDOWS) {\n file = file.replace(WINDOWS_SEP_REGEXP, path.posix.sep);\n }\n\n this.delete(file);\n this.modifiedFiles.add(file);\n }\n }\n}\n"],"mappings":";;;;;;;;;;;AAaA,IAAM,gBAAgB,UAAU,KAAK;AACrC,IAAM,qBAAqB,IAAI,OAAO,KAAK,OAAK,MAAM,OAAO,IAAI;AAEjE,IAAa,kBAAb,cAAqC,IAA2B;CAC9D,gCAAsC,IAAI,KAAa;CACvD,iCAAmD,IAAI,KAGpD;CACH,sCAAiE,IAAI,KAGlE;CAEH;CAEA,YAAY,qBAAuC;AACjD,SAAO;AADY,OAAA,sBAAA;;CAIrB,WAAW,OAA+B;AACxC,MAAI,UAAU,KAAK,cACjB,MAAK,cAAc,OAAO;AAE5B,OAAK,IAAI,QAAQ,OAAO;AACtB,QAAK,eAAe,OAAO,KAAK;AAChC,QAAK,oBAAoB,OAAO,cAAc,KAAK,CAAC,KAAK;AAGzD,OAAI,cACF,QAAO,KAAK,QAAQ,oBAAoB,OAAK,MAAM,IAAI;AAGzD,QAAK,OAAO,KAAK;AACjB,QAAK,cAAc,IAAI,KAAK"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare const VIRTUAL_STYLE_PREFIX = "virtual:@analogjs/vite-plugin-angular:inline-style:";
|
|
2
|
+
export declare const VIRTUAL_RAW_PREFIX = "virtual:@analogjs/vite-plugin-angular:raw:";
|
|
3
|
+
export declare function toVirtualStyleId(absPath: string): string;
|
|
4
|
+
export declare function isVirtualStyleId(id: string): boolean;
|
|
5
|
+
export declare function fromVirtualStyleId(id: string): string;
|
|
6
|
+
export declare function toVirtualRawId(absPath: string): string;
|
|
7
|
+
export declare function isVirtualRawId(id: string): boolean;
|
|
8
|
+
export declare function fromVirtualRawId(id: string): string;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
//#region packages/vite-plugin-angular/src/lib/utils/virtual-ids.ts
|
|
2
|
+
var VIRTUAL_STYLE_PREFIX = "virtual:@analogjs/vite-plugin-angular:inline-style:";
|
|
3
|
+
var VIRTUAL_RAW_PREFIX = "virtual:@analogjs/vite-plugin-angular:raw:";
|
|
4
|
+
function encode(absPath) {
|
|
5
|
+
return Buffer.from(absPath, "utf-8").toString("base64url");
|
|
6
|
+
}
|
|
7
|
+
function decode(encoded) {
|
|
8
|
+
return Buffer.from(encoded, "base64url").toString("utf-8");
|
|
9
|
+
}
|
|
10
|
+
function toVirtualStyleId(absPath) {
|
|
11
|
+
return `${VIRTUAL_STYLE_PREFIX}${encode(absPath)}`;
|
|
12
|
+
}
|
|
13
|
+
function isVirtualStyleId(id) {
|
|
14
|
+
return (id.startsWith("\0") ? id.slice(1) : id).startsWith(VIRTUAL_STYLE_PREFIX);
|
|
15
|
+
}
|
|
16
|
+
function fromVirtualStyleId(id) {
|
|
17
|
+
const normalizedId = id.startsWith("\0") ? id.slice(1) : id;
|
|
18
|
+
if (!normalizedId.startsWith("virtual:@analogjs/vite-plugin-angular:inline-style:")) throw new Error(`Invalid virtual style id: ${id}`);
|
|
19
|
+
return decode(normalizedId.slice(51));
|
|
20
|
+
}
|
|
21
|
+
function toVirtualRawId(absPath) {
|
|
22
|
+
return `${VIRTUAL_RAW_PREFIX}${encode(absPath)}`;
|
|
23
|
+
}
|
|
24
|
+
function isVirtualRawId(id) {
|
|
25
|
+
return (id.startsWith("\0") ? id.slice(1) : id).startsWith(VIRTUAL_RAW_PREFIX);
|
|
26
|
+
}
|
|
27
|
+
function fromVirtualRawId(id) {
|
|
28
|
+
const normalizedId = id.startsWith("\0") ? id.slice(1) : id;
|
|
29
|
+
if (!normalizedId.startsWith("virtual:@analogjs/vite-plugin-angular:raw:")) throw new Error(`Invalid virtual raw id: ${id}`);
|
|
30
|
+
return decode(normalizedId.slice(42));
|
|
31
|
+
}
|
|
32
|
+
//#endregion
|
|
33
|
+
export { VIRTUAL_RAW_PREFIX, VIRTUAL_STYLE_PREFIX, fromVirtualRawId, fromVirtualStyleId, isVirtualRawId, isVirtualStyleId, toVirtualRawId, toVirtualStyleId };
|
|
34
|
+
|
|
35
|
+
//# sourceMappingURL=virtual-ids.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"virtual-ids.js","names":[],"sources":["../../../../src/lib/utils/virtual-ids.ts"],"sourcesContent":["// Virtual module id helpers for external component resources (template and\n// style files). Routing through virtual ids keeps Vite's built-in plugins\n// (vite:css, vite:asset, the server.fs Denied ID check) out of the picture:\n// the id Vite sees has no file extension, so extension-based matchers never\n// fire, and it does not match the /[?&](raw|inline)\\b/ security regex that\n// blocks user-facing ?raw and ?inline queries.\n//\n// Both prefixes share the same shape — a literal prefix followed by a\n// base64url-encoded absolute file path — so load hooks can round-trip back\n// to the source file for reading and watching. See #2263 / #2283.\n\nexport const VIRTUAL_STYLE_PREFIX =\n 'virtual:@analogjs/vite-plugin-angular:inline-style:';\n\nexport const VIRTUAL_RAW_PREFIX = 'virtual:@analogjs/vite-plugin-angular:raw:';\n\nfunction encode(absPath: string): string {\n return Buffer.from(absPath, 'utf-8').toString('base64url');\n}\n\nfunction decode(encoded: string): string {\n return Buffer.from(encoded, 'base64url').toString('utf-8');\n}\n\nexport function toVirtualStyleId(absPath: string): string {\n return `${VIRTUAL_STYLE_PREFIX}${encode(absPath)}`;\n}\n\nexport function isVirtualStyleId(id: string): boolean {\n const stripped = id.startsWith('\\0') ? id.slice(1) : id;\n return stripped.startsWith(VIRTUAL_STYLE_PREFIX);\n}\n\nexport function fromVirtualStyleId(id: string): string {\n const normalizedId = id.startsWith('\\0') ? id.slice(1) : id;\n if (!normalizedId.startsWith(VIRTUAL_STYLE_PREFIX)) {\n throw new Error(`Invalid virtual style id: ${id}`);\n }\n return decode(normalizedId.slice(VIRTUAL_STYLE_PREFIX.length));\n}\n\nexport function toVirtualRawId(absPath: string): string {\n return `${VIRTUAL_RAW_PREFIX}${encode(absPath)}`;\n}\n\nexport function isVirtualRawId(id: string): boolean {\n const stripped = id.startsWith('\\0') ? id.slice(1) : id;\n return stripped.startsWith(VIRTUAL_RAW_PREFIX);\n}\n\nexport function fromVirtualRawId(id: string): string {\n const normalizedId = id.startsWith('\\0') ? id.slice(1) : id;\n if (!normalizedId.startsWith(VIRTUAL_RAW_PREFIX)) {\n throw new Error(`Invalid virtual raw id: ${id}`);\n }\n return decode(normalizedId.slice(VIRTUAL_RAW_PREFIX.length));\n}\n"],"mappings":";AAWA,IAAa,uBACX;AAEF,IAAa,qBAAqB;AAElC,SAAS,OAAO,SAAyB;AACvC,QAAO,OAAO,KAAK,SAAS,QAAQ,CAAC,SAAS,YAAY;;AAG5D,SAAS,OAAO,SAAyB;AACvC,QAAO,OAAO,KAAK,SAAS,YAAY,CAAC,SAAS,QAAQ;;AAG5D,SAAgB,iBAAiB,SAAyB;AACxD,QAAO,GAAG,uBAAuB,OAAO,QAAQ;;AAGlD,SAAgB,iBAAiB,IAAqB;AAEpD,SADiB,GAAG,WAAW,KAAK,GAAG,GAAG,MAAM,EAAE,GAAG,IACrC,WAAW,qBAAqB;;AAGlD,SAAgB,mBAAmB,IAAoB;CACrD,MAAM,eAAe,GAAG,WAAW,KAAK,GAAG,GAAG,MAAM,EAAE,GAAG;AACzD,KAAI,CAAC,aAAa,WAAA,sDAAgC,CAChD,OAAM,IAAI,MAAM,6BAA6B,KAAK;AAEpD,QAAO,OAAO,aAAa,MAAM,GAA4B,CAAC;;AAGhE,SAAgB,eAAe,SAAyB;AACtD,QAAO,GAAG,qBAAqB,OAAO,QAAQ;;AAGhD,SAAgB,eAAe,IAAqB;AAElD,SADiB,GAAG,WAAW,KAAK,GAAG,GAAG,MAAM,EAAE,GAAG,IACrC,WAAW,mBAAmB;;AAGhD,SAAgB,iBAAiB,IAAoB;CACnD,MAAM,eAAe,GAAG,WAAW,KAAK,GAAG,GAAG,MAAM,EAAE,GAAG;AACzD,KAAI,CAAC,aAAa,WAAA,6CAA8B,CAC9C,OAAM,IAAI,MAAM,2BAA2B,KAAK;AAElD,QAAO,OAAO,aAAa,MAAM,GAA0B,CAAC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { type ResolvedConfig } from "vite";
|
|
2
|
+
interface PluginContextLike {
|
|
3
|
+
addWatchFile(path: string): void;
|
|
4
|
+
}
|
|
5
|
+
/**
|
|
6
|
+
* Rewrite a user `.html?raw` import to a virtual raw id. Returns undefined
|
|
7
|
+
* when the id doesn't match, so callers can fall through to the next check.
|
|
8
|
+
*
|
|
9
|
+
* Routed through a virtual id (rather than `?analog-raw`) so the path Vite
|
|
10
|
+
* sees has no file extension — keeps vite:asset / vite:css from re-tagging
|
|
11
|
+
* the id before our load hook runs.
|
|
12
|
+
*/
|
|
13
|
+
export declare function rewriteHtmlRawImport(id: string, importer: string | undefined): string | undefined;
|
|
14
|
+
/**
|
|
15
|
+
* Rewrite a user `.scss?inline` / `.css?inline` / … import to a virtual
|
|
16
|
+
* style id. Returns undefined when the id doesn't match.
|
|
17
|
+
*/
|
|
18
|
+
export declare function rewriteInlineStyleImport(id: string, importer: string | undefined): string | undefined;
|
|
19
|
+
/**
|
|
20
|
+
* Load a virtual raw module: reads the backing file, registers it for HMR
|
|
21
|
+
* watching, and returns its content as a default-exported string. Returns
|
|
22
|
+
* undefined when the id is not a virtual raw id.
|
|
23
|
+
*/
|
|
24
|
+
export declare function loadVirtualRawModule(ctx: PluginContextLike, id: string): Promise<string | undefined>;
|
|
25
|
+
/**
|
|
26
|
+
* Load a virtual style module: reads the backing stylesheet, runs it through
|
|
27
|
+
* Vite's CSS preprocessor, and returns the result as a default-exported
|
|
28
|
+
* string. Returns undefined when the id is not a virtual style id.
|
|
29
|
+
*/
|
|
30
|
+
export declare function loadVirtualStyleModule(ctx: PluginContextLike, id: string, resolvedConfig: ResolvedConfig): Promise<string | undefined>;
|
|
31
|
+
export {};
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { fromVirtualRawId, fromVirtualStyleId, isVirtualRawId, isVirtualStyleId, toVirtualRawId, toVirtualStyleId } from "./virtual-ids.js";
|
|
2
|
+
import { promises } from "node:fs";
|
|
3
|
+
import { dirname, isAbsolute, resolve } from "node:path";
|
|
4
|
+
import { normalizePath, preprocessCSS } from "vite";
|
|
5
|
+
//#region packages/vite-plugin-angular/src/lib/utils/virtual-resources.ts
|
|
6
|
+
var INLINE_STYLE_QUERY_RE = /\.(css|scss|sass|less)\?inline$/;
|
|
7
|
+
function resolveImportPath(id, importer) {
|
|
8
|
+
const filePath = id.split("?")[0];
|
|
9
|
+
return isAbsolute(filePath) ? normalizePath(filePath) : importer ? normalizePath(resolve(dirname(importer), filePath)) : void 0;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Rewrite a user `.html?raw` import to a virtual raw id. Returns undefined
|
|
13
|
+
* when the id doesn't match, so callers can fall through to the next check.
|
|
14
|
+
*
|
|
15
|
+
* Routed through a virtual id (rather than `?analog-raw`) so the path Vite
|
|
16
|
+
* sees has no file extension — keeps vite:asset / vite:css from re-tagging
|
|
17
|
+
* the id before our load hook runs.
|
|
18
|
+
*/
|
|
19
|
+
function rewriteHtmlRawImport(id, importer) {
|
|
20
|
+
if (!id.includes(".html?raw")) return void 0;
|
|
21
|
+
const resolved = resolveImportPath(id, importer);
|
|
22
|
+
return resolved ? toVirtualRawId(resolved) : void 0;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Rewrite a user `.scss?inline` / `.css?inline` / … import to a virtual
|
|
26
|
+
* style id. Returns undefined when the id doesn't match.
|
|
27
|
+
*/
|
|
28
|
+
function rewriteInlineStyleImport(id, importer) {
|
|
29
|
+
if (!INLINE_STYLE_QUERY_RE.test(id)) return void 0;
|
|
30
|
+
const resolved = resolveImportPath(id, importer);
|
|
31
|
+
return resolved ? toVirtualStyleId(resolved) : void 0;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Load a virtual raw module: reads the backing file, registers it for HMR
|
|
35
|
+
* watching, and returns its content as a default-exported string. Returns
|
|
36
|
+
* undefined when the id is not a virtual raw id.
|
|
37
|
+
*/
|
|
38
|
+
async function loadVirtualRawModule(ctx, id) {
|
|
39
|
+
if (!isVirtualRawId(id)) return void 0;
|
|
40
|
+
const filePath = fromVirtualRawId(id);
|
|
41
|
+
ctx.addWatchFile(filePath);
|
|
42
|
+
const content = await promises.readFile(filePath, "utf-8");
|
|
43
|
+
return `export default ${JSON.stringify(content)}`;
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Load a virtual style module: reads the backing stylesheet, runs it through
|
|
47
|
+
* Vite's CSS preprocessor, and returns the result as a default-exported
|
|
48
|
+
* string. Returns undefined when the id is not a virtual style id.
|
|
49
|
+
*/
|
|
50
|
+
async function loadVirtualStyleModule(ctx, id, resolvedConfig) {
|
|
51
|
+
if (!isVirtualStyleId(id)) return void 0;
|
|
52
|
+
const filePath = fromVirtualStyleId(id);
|
|
53
|
+
ctx.addWatchFile(filePath);
|
|
54
|
+
const result = await preprocessCSS(await promises.readFile(filePath, "utf-8"), filePath, resolvedConfig);
|
|
55
|
+
return `export default ${JSON.stringify(result.code)}`;
|
|
56
|
+
}
|
|
57
|
+
//#endregion
|
|
58
|
+
export { loadVirtualRawModule, loadVirtualStyleModule, rewriteHtmlRawImport, rewriteInlineStyleImport };
|
|
59
|
+
|
|
60
|
+
//# sourceMappingURL=virtual-resources.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"virtual-resources.js","names":[],"sources":["../../../../src/lib/utils/virtual-resources.ts"],"sourcesContent":["// Shared Vite plugin helpers for routing component resources (templates,\n// external styles) through virtual module ids. Both angular-vite-plugin and\n// analog-compiler-plugin use these so the rewriting + loading behavior stays\n// in sync between them.\n\nimport { promises as fsPromises } from 'node:fs';\nimport { dirname, isAbsolute, resolve } from 'node:path';\nimport { normalizePath, preprocessCSS, type ResolvedConfig } from 'vite';\n\nimport {\n fromVirtualRawId,\n fromVirtualStyleId,\n isVirtualRawId,\n isVirtualStyleId,\n toVirtualRawId,\n toVirtualStyleId,\n} from './virtual-ids.js';\n\nconst INLINE_STYLE_QUERY_RE = /\\.(css|scss|sass|less)\\?inline$/;\n\ninterface PluginContextLike {\n addWatchFile(path: string): void;\n}\n\nfunction resolveImportPath(\n id: string,\n importer: string | undefined,\n): string | undefined {\n const filePath = id.split('?')[0];\n return isAbsolute(filePath)\n ? normalizePath(filePath)\n : importer\n ? normalizePath(resolve(dirname(importer), filePath))\n : undefined;\n}\n\n/**\n * Rewrite a user `.html?raw` import to a virtual raw id. Returns undefined\n * when the id doesn't match, so callers can fall through to the next check.\n *\n * Routed through a virtual id (rather than `?analog-raw`) so the path Vite\n * sees has no file extension — keeps vite:asset / vite:css from re-tagging\n * the id before our load hook runs.\n */\nexport function rewriteHtmlRawImport(\n id: string,\n importer: string | undefined,\n): string | undefined {\n if (!id.includes('.html?raw')) return undefined;\n const resolved = resolveImportPath(id, importer);\n return resolved ? toVirtualRawId(resolved) : undefined;\n}\n\n/**\n * Rewrite a user `.scss?inline` / `.css?inline` / … import to a virtual\n * style id. Returns undefined when the id doesn't match.\n */\nexport function rewriteInlineStyleImport(\n id: string,\n importer: string | undefined,\n): string | undefined {\n if (!INLINE_STYLE_QUERY_RE.test(id)) return undefined;\n const resolved = resolveImportPath(id, importer);\n return resolved ? toVirtualStyleId(resolved) : undefined;\n}\n\n/**\n * Load a virtual raw module: reads the backing file, registers it for HMR\n * watching, and returns its content as a default-exported string. Returns\n * undefined when the id is not a virtual raw id.\n */\nexport async function loadVirtualRawModule(\n ctx: PluginContextLike,\n id: string,\n): Promise<string | undefined> {\n if (!isVirtualRawId(id)) return undefined;\n const filePath = fromVirtualRawId(id);\n ctx.addWatchFile(filePath);\n const content = await fsPromises.readFile(filePath, 'utf-8');\n return `export default ${JSON.stringify(content)}`;\n}\n\n/**\n * Load a virtual style module: reads the backing stylesheet, runs it through\n * Vite's CSS preprocessor, and returns the result as a default-exported\n * string. Returns undefined when the id is not a virtual style id.\n */\nexport async function loadVirtualStyleModule(\n ctx: PluginContextLike,\n id: string,\n resolvedConfig: ResolvedConfig,\n): Promise<string | undefined> {\n if (!isVirtualStyleId(id)) return undefined;\n const filePath = fromVirtualStyleId(id);\n ctx.addWatchFile(filePath);\n const code = await fsPromises.readFile(filePath, 'utf-8');\n const result = await preprocessCSS(code, filePath, resolvedConfig);\n return `export default ${JSON.stringify(result.code)}`;\n}\n"],"mappings":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ugins/proxy';
|
|
4
|
-
import 'zone.js/testing';
|
|
5
|
-
/**
|
|
6
|
-
* Patch Vitest's describe/test/beforeEach/afterEach functions so test code
|
|
7
|
-
* always runs in a testZone (ProxyZone).
|
|
8
|
-
*/
|
|
9
|
-
/* global Zone */
|
|
10
|
-
const { Zone } = globalThis;
|
|
11
|
-
if (Zone === undefined) {
|
|
12
|
-
throw new Error('Missing: Zone (zone.js)');
|
|
13
|
-
}
|
|
14
|
-
if (globalThis['__vitest_zone_patch__'] === true) {
|
|
15
|
-
throw new Error("'vitest' has already been patched with 'Zone'.");
|
|
16
|
-
}
|
|
17
|
-
globalThis['__vitest_zone_patch__'] = true;
|
|
18
|
-
const { SyncTestZoneSpec } = Zone;
|
|
19
|
-
const { ProxyZoneSpec } = Zone;
|
|
20
|
-
if (SyncTestZoneSpec === undefined) {
|
|
21
|
-
throw new Error('Missing: SyncTestZoneSpec (zone.js/plugins/sync-test)');
|
|
22
|
-
}
|
|
23
|
-
if (ProxyZoneSpec === undefined) {
|
|
24
|
-
throw new Error('Missing: ProxyZoneSpec (zone.js/plugins/proxy.js)');
|
|
25
|
-
}
|
|
26
|
-
const env = globalThis;
|
|
27
|
-
const ambientZone = Zone.current;
|
|
28
|
-
// Create a synchronous-only zone in which to run `describe` blocks in order to
|
|
29
|
-
// Raise an error if any asynchronous operations are attempted
|
|
30
|
-
// Inside of a `describe` but outside of a `beforeEach` or `it`.
|
|
31
|
-
const syncZone = ambientZone.fork(new SyncTestZoneSpec('vitest.describe'));
|
|
32
|
-
function wrapDescribeInZone(describeBody) {
|
|
33
|
-
return function (...args) {
|
|
34
|
-
return syncZone.run(describeBody, null, args);
|
|
35
|
-
};
|
|
36
|
-
}
|
|
37
|
-
// Create a proxy zone in which to run `test` blocks so that the tests function
|
|
38
|
-
// Can retroactively install different zones.
|
|
39
|
-
const testProxyZone = ambientZone.fork(new ProxyZoneSpec());
|
|
40
|
-
function wrapTestInZone(testBody) {
|
|
41
|
-
if (testBody === undefined) {
|
|
42
|
-
return;
|
|
43
|
-
}
|
|
44
|
-
const wrappedFunc = function wrappedFunc(...args) {
|
|
45
|
-
return testProxyZone.run(testBody, null, args);
|
|
46
|
-
};
|
|
47
|
-
try {
|
|
48
|
-
Object.defineProperty(wrappedFunc, 'length', {
|
|
49
|
-
configurable: true,
|
|
50
|
-
enumerable: false,
|
|
51
|
-
writable: true,
|
|
52
|
-
});
|
|
53
|
-
wrappedFunc.length = testBody.length;
|
|
54
|
-
}
|
|
55
|
-
catch (e) {
|
|
56
|
-
return testBody.length === 0
|
|
57
|
-
? () => testProxyZone.run(testBody, null)
|
|
58
|
-
: (done) => testProxyZone.run(testBody, null, [done]);
|
|
59
|
-
}
|
|
60
|
-
return wrappedFunc;
|
|
61
|
-
}
|
|
62
|
-
/**
|
|
63
|
-
* Allows Vitest to handle Angular test fixtures
|
|
64
|
-
*
|
|
65
|
-
* Vitest Snapshot guide ==> https://vitest.dev/guide/snapshot.html
|
|
66
|
-
*
|
|
67
|
-
* @returns customSnapshotSerializer for Angular Fixture Component
|
|
68
|
-
*/
|
|
69
|
-
const customSnapshotSerializer = () => {
|
|
70
|
-
function serialize(val, config, indentation, depth, refs, printer) {
|
|
71
|
-
// `printer` is a function that serializes a value using existing plugins.
|
|
72
|
-
return `${printer(fixtureVitestSerializer(val), config, indentation, depth, refs)}`;
|
|
73
|
-
}
|
|
74
|
-
function test(val) {
|
|
75
|
-
// * If it's a ComponentFixture we apply the transformation rules
|
|
76
|
-
return val && isAngularFixture(val);
|
|
77
|
-
}
|
|
78
|
-
return {
|
|
79
|
-
serialize,
|
|
80
|
-
test,
|
|
81
|
-
};
|
|
82
|
-
};
|
|
83
|
-
/**
|
|
84
|
-
* Check if is an Angular fixture
|
|
85
|
-
*
|
|
86
|
-
* @param val Angular fixture
|
|
87
|
-
* @returns boolean who check if is an angular fixture
|
|
88
|
-
*/
|
|
89
|
-
function isAngularFixture(val) {
|
|
90
|
-
if (typeof val !== 'object') {
|
|
91
|
-
return false;
|
|
92
|
-
}
|
|
93
|
-
if (val['componentRef'] || val['componentInstance']) {
|
|
94
|
-
return true;
|
|
95
|
-
}
|
|
96
|
-
if (val['componentType']) {
|
|
97
|
-
return true;
|
|
98
|
-
}
|
|
99
|
-
// * Angular fixture keys in Fixture component Object
|
|
100
|
-
const fixtureKeys = [
|
|
101
|
-
'componentRef',
|
|
102
|
-
'ngZone',
|
|
103
|
-
'effectRunner',
|
|
104
|
-
'_autoDetect',
|
|
105
|
-
'_isStable',
|
|
106
|
-
'_isDestroyed',
|
|
107
|
-
'_resolve',
|
|
108
|
-
'_promise',
|
|
109
|
-
'_onUnstableSubscription',
|
|
110
|
-
'_onStableSubscription',
|
|
111
|
-
'_onMicrotaskEmptySubscription',
|
|
112
|
-
'_onErrorSubscription',
|
|
113
|
-
'changeDetectorRef',
|
|
114
|
-
'elementRef',
|
|
115
|
-
'debugElement',
|
|
116
|
-
'componentInstance',
|
|
117
|
-
'nativeElement',
|
|
118
|
-
];
|
|
119
|
-
// * Angular fixture keys in Fixture componentRef Object
|
|
120
|
-
const fixtureComponentRefKeys = [
|
|
121
|
-
'location',
|
|
122
|
-
'_rootLView',
|
|
123
|
-
'_tNode',
|
|
124
|
-
'previousInputValues',
|
|
125
|
-
'instance',
|
|
126
|
-
'changeDetectorRef',
|
|
127
|
-
'hostView',
|
|
128
|
-
'componentType',
|
|
129
|
-
];
|
|
130
|
-
return (JSON.stringify(Object.keys(val)) === JSON.stringify(fixtureKeys) ||
|
|
131
|
-
JSON.stringify(Object.keys(val)) === JSON.stringify(fixtureComponentRefKeys));
|
|
132
|
-
}
|
|
133
|
-
/**
|
|
134
|
-
* Serialize Angular fixture for Vitest
|
|
135
|
-
*
|
|
136
|
-
* @param fixture Angular Fixture Component
|
|
137
|
-
* @returns HTML Child Node
|
|
138
|
-
*/
|
|
139
|
-
function fixtureVitestSerializer(fixture) {
|
|
140
|
-
// * Get Component meta data
|
|
141
|
-
const componentType = (fixture && fixture.componentType
|
|
142
|
-
? fixture.componentType
|
|
143
|
-
: fixture.componentRef.componentType);
|
|
144
|
-
let inputsData = '';
|
|
145
|
-
const selector = Reflect.getOwnPropertyDescriptor(componentType, '__annotations__')?.value[0].selector;
|
|
146
|
-
if (componentType && componentType.propDecorators) {
|
|
147
|
-
inputsData = Object.entries(componentType.propDecorators)
|
|
148
|
-
.map(([key, value]) => `${key}="${value}"`)
|
|
149
|
-
.join('');
|
|
150
|
-
}
|
|
151
|
-
// * Get DOM Elements
|
|
152
|
-
const divElement = fixture && fixture.nativeElement
|
|
153
|
-
? fixture.nativeElement
|
|
154
|
-
: fixture.location.nativeElement;
|
|
155
|
-
// * Convert string data to HTML data
|
|
156
|
-
const doc = new DOMParser().parseFromString(`<${selector} ${inputsData}>${divElement.innerHTML}</${selector}>`, 'text/html');
|
|
157
|
-
return doc.body.childNodes[0];
|
|
158
|
-
}
|
|
159
|
-
/**
|
|
160
|
-
* Bind describe method to wrap describe.each function
|
|
161
|
-
*/
|
|
162
|
-
const bindDescribe = (self, originalVitestFn) => function bindDescribe(...eachArgs) {
|
|
163
|
-
return function bindDescribe(...args) {
|
|
164
|
-
args[1] = wrapDescribeInZone(args[1]);
|
|
165
|
-
return originalVitestFn.apply(self, eachArgs).apply(self, args);
|
|
166
|
-
};
|
|
167
|
-
};
|
|
168
|
-
/**
|
|
169
|
-
* Bind test method to wrap test.each function
|
|
170
|
-
*/
|
|
171
|
-
const bindTest = (self, originalVitestFn) => function bindTest(...eachArgs) {
|
|
172
|
-
return function bindTest(...args) {
|
|
173
|
-
args[1] = wrapTestInZone(args[1]);
|
|
174
|
-
return originalVitestFn.apply(self, eachArgs).apply(self, args);
|
|
175
|
-
};
|
|
176
|
-
};
|
|
177
|
-
['describe'].forEach((methodName) => {
|
|
178
|
-
const originalvitestFn = env[methodName];
|
|
179
|
-
env[methodName] = function (...args) {
|
|
180
|
-
args[1] = wrapDescribeInZone(args[1]);
|
|
181
|
-
return originalvitestFn.apply(this, args);
|
|
182
|
-
};
|
|
183
|
-
env[methodName].each = bindDescribe(originalvitestFn, originalvitestFn.each);
|
|
184
|
-
if (methodName === 'describe') {
|
|
185
|
-
env[methodName].only = bindDescribe(originalvitestFn, originalvitestFn.only);
|
|
186
|
-
env[methodName].skip = bindDescribe(originalvitestFn, originalvitestFn.skip);
|
|
187
|
-
}
|
|
188
|
-
});
|
|
189
|
-
['test', 'it'].forEach((methodName) => {
|
|
190
|
-
const originalvitestFn = env[methodName];
|
|
191
|
-
env[methodName] = function (...args) {
|
|
192
|
-
args[1] = wrapTestInZone(args[1]);
|
|
193
|
-
return originalvitestFn.apply(this, args);
|
|
194
|
-
};
|
|
195
|
-
env[methodName].each = bindTest(originalvitestFn, originalvitestFn.each);
|
|
196
|
-
env[methodName].only = bindTest(originalvitestFn, originalvitestFn.only);
|
|
197
|
-
env[methodName].skip = bindTest(originalvitestFn, originalvitestFn.skip);
|
|
198
|
-
if (methodName === 'test' || methodName === 'it') {
|
|
199
|
-
env[methodName].todo = function todo(...args) {
|
|
200
|
-
return originalvitestFn.todo.apply(this, args);
|
|
201
|
-
};
|
|
202
|
-
}
|
|
203
|
-
});
|
|
204
|
-
['beforeEach', 'afterEach', 'beforeAll', 'afterAll'].forEach((methodName) => {
|
|
205
|
-
const originalvitestFn = env[methodName];
|
|
206
|
-
env[methodName] = function (...args) {
|
|
207
|
-
args[0] = wrapTestInZone(args[0]);
|
|
208
|
-
return originalvitestFn.apply(this, args);
|
|
209
|
-
};
|
|
210
|
-
});
|
|
211
|
-
['expect'].forEach((methodName) => {
|
|
212
|
-
const originalvitestFn = env[methodName];
|
|
213
|
-
return originalvitestFn.addSnapshotSerializer(customSnapshotSerializer());
|
|
214
|
-
});
|
|
215
|
-
//# sourceMappingURL=setup-vitest.js.map
|
package/setup-vitest.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"setup-vitest.js","sourceRoot":"","sources":["../../../packages/vite-plugin-angular/setup-vitest.ts"],"names":[],"mappings":"AAAA,OAAO,S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C,CAAC,CAAC,CAAC;QAElC,OAAO,gBAAgB,CAAC,KAAK,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IAC5C,CAAC,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,CAAC,QAAQ,CAAC,CAAC,OAAO,CAAC,CAAC,UAAU,EAAE,EAAE;IAChC,MAAM,gBAAgB,GAAG,GAAG,CAAC,UAAU,CAAC,CAAC;IACzC,OAAO,gBAAgB,CAAC,qBAAqB,CAAC,wBAAwB,EAAE,CAAC,CAAC;AAC5E,CAAC,CAAC,CAAC"}
|
package/src/lib/models.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
//# sourceMappingURL=models.js.map
|
package/src/lib/models.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"models.js","sourceRoot":"","sources":["../../../../../packages/vite-plugin-angular/src/lib/models.ts"],"names":[],"mappings":""}
|
package/src/lib/tools/README.md
DELETED
|
File without changes
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../packages/vite-plugin-angular-tools/src/index.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
//# sourceMappingURL=compiler-plugin-options.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"compiler-plugin-options.js","sourceRoot":"","sources":["../../../../../../packages/vite-plugin-angular/src/lib/utils/compiler-plugin-options.ts"],"names":[],"mappings":""}
|