@analogjs/vite-plugin-angular 3.0.0-alpha.94 → 3.0.0-alpha.96
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 +2 -6
- package/src/lib/angular-vite-plugin.js +11 -21
- package/src/lib/angular-vite-plugin.js.map +1 -1
- package/src/lib/compilation-api/compilation-api-plugin.js +4 -4
- package/src/lib/compilation-api/compilation-api-plugin.js.map +1 -1
- package/src/lib/compiler/angular-version.d.ts +1 -1
- package/src/lib/compiler/angular-version.js +2 -2
- package/src/lib/compiler/angular-version.js.map +1 -1
- package/src/lib/compiler/compile.js +4 -14
- package/src/lib/compiler/compile.js.map +1 -1
- package/src/lib/utils/devkit.d.ts +3 -6
- package/src/lib/utils/devkit.js +9 -30
- package/src/lib/utils/devkit.js.map +1 -1
- package/src/lib/angular-pending-tasks.plugin.d.ts +0 -9
- package/src/lib/angular-pending-tasks.plugin.js +0 -20
- package/src/lib/angular-pending-tasks.plugin.js.map +0 -1
- package/src/lib/utils/source-file-cache.js +0 -37
- package/src/lib/utils/source-file-cache.js.map +0 -1
|
@@ -1,37 +0,0 @@
|
|
|
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
|
|
5
|
-
/**
|
|
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
|
-
|
|
37
|
-
//# sourceMappingURL=source-file-cache.js.map
|
|
@@ -1 +0,0 @@
|
|
|
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"}
|