angular-rust-plugins 0.1.0

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.
Files changed (50) hide show
  1. package/README.md +118 -0
  2. package/binding/angular-binding.darwin-arm64.node +0 -0
  3. package/binding/index.d.ts +13 -0
  4. package/binding/index.js +316 -0
  5. package/binding/package.json +1 -0
  6. package/compiler/index.cjs +135 -0
  7. package/compiler/index.cjs.map +1 -0
  8. package/compiler/index.d.cts +12 -0
  9. package/compiler/index.d.ts +12 -0
  10. package/compiler/index.js +107 -0
  11. package/compiler/index.js.map +1 -0
  12. package/compiler/vite.cjs +135 -0
  13. package/compiler/vite.cjs.map +1 -0
  14. package/compiler/vite.d.cts +41 -0
  15. package/compiler/vite.d.ts +41 -0
  16. package/compiler/vite.js +109 -0
  17. package/compiler/vite.js.map +1 -0
  18. package/index.cjs +479 -0
  19. package/index.cjs.map +1 -0
  20. package/index.d.cts +8 -0
  21. package/index.d.ts +8 -0
  22. package/index.js +438 -0
  23. package/index.js.map +1 -0
  24. package/linker/esbuild.cjs +125 -0
  25. package/linker/esbuild.cjs.map +1 -0
  26. package/linker/esbuild.d.cts +39 -0
  27. package/linker/esbuild.d.ts +39 -0
  28. package/linker/esbuild.js +99 -0
  29. package/linker/esbuild.js.map +1 -0
  30. package/linker/index.cjs +372 -0
  31. package/linker/index.cjs.map +1 -0
  32. package/linker/index.d.cts +6 -0
  33. package/linker/index.d.ts +6 -0
  34. package/linker/index.js +333 -0
  35. package/linker/index.js.map +1 -0
  36. package/linker/rolldown.cjs +135 -0
  37. package/linker/rolldown.cjs.map +1 -0
  38. package/linker/rolldown.d.cts +36 -0
  39. package/linker/rolldown.d.ts +36 -0
  40. package/linker/rolldown.js +109 -0
  41. package/linker/rolldown.js.map +1 -0
  42. package/linker/vite.cjs +184 -0
  43. package/linker/vite.cjs.map +1 -0
  44. package/linker/vite.d.cts +58 -0
  45. package/linker/vite.d.ts +58 -0
  46. package/linker/vite.js +155 -0
  47. package/linker/vite.js.map +1 -0
  48. package/package.json +77 -0
  49. package/types-BTaYbdhr.d.cts +45 -0
  50. package/types-BTaYbdhr.d.ts +45 -0
package/package.json ADDED
@@ -0,0 +1,77 @@
1
+ {
2
+ "name": "angular-rust-plugins",
3
+ "version": "0.1.0",
4
+ "description": "Angular plugins for bundlers (Vite, esbuild, Rolldown, Webpack, Rspack) - powered by Rust compiler",
5
+ "author": "Truonglv4",
6
+ "license": "MIT",
7
+ "type": "module",
8
+ "main": "./index.cjs",
9
+ "module": "./index.js",
10
+ "types": "./index.d.ts",
11
+ "exports": {
12
+ ".": {
13
+ "types": "./index.d.ts",
14
+ "import": "./index.js",
15
+ "require": "./index.cjs"
16
+ },
17
+ "./linker": {
18
+ "types": "./linker/index.d.ts",
19
+ "import": "./linker/index.js",
20
+ "require": "./linker/index.cjs"
21
+ },
22
+ "./linker/vite": {
23
+ "types": "./linker/vite.d.ts",
24
+ "import": "./linker/vite.js",
25
+ "require": "./linker/vite.cjs"
26
+ },
27
+ "./linker/esbuild": {
28
+ "types": "./linker/esbuild.d.ts",
29
+ "import": "./linker/esbuild.js",
30
+ "require": "./linker/esbuild.cjs"
31
+ },
32
+ "./linker/rolldown": {
33
+ "types": "./linker/rolldown.d.ts",
34
+ "import": "./linker/rolldown.js",
35
+ "require": "./linker/rolldown.cjs"
36
+ },
37
+ "./compiler": {
38
+ "types": "./compiler/index.d.ts",
39
+ "import": "./compiler/index.js",
40
+ "require": "./compiler/index.cjs"
41
+ },
42
+ "./compiler/vite": {
43
+ "types": "./compiler/vite.d.ts",
44
+ "import": "./compiler/vite.js",
45
+ "require": "./compiler/vite.cjs"
46
+ }
47
+ },
48
+ "files": [
49
+ "binding",
50
+ "linker",
51
+ "compiler",
52
+ "index.js",
53
+ "index.cjs",
54
+ "index.d.ts",
55
+ "index.d.cts",
56
+ "*.map",
57
+ "types-*.d.ts",
58
+ "types-*.d.cts"
59
+ ],
60
+ "keywords": [
61
+ "angular",
62
+ "linker",
63
+ "compiler",
64
+ "vite",
65
+ "esbuild",
66
+ "rolldown",
67
+ "webpack",
68
+ "rspack",
69
+ "rust",
70
+ "aot",
71
+ "bundler"
72
+ ],
73
+ "repository": {
74
+ "type": "git",
75
+ "url": "https://github.com/anthropic/angular-rust-compiler"
76
+ }
77
+ }
@@ -0,0 +1,45 @@
1
+ /**
2
+ * Angular Linker Plugin Types
3
+ */
4
+ interface LinkerOptions {
5
+ /**
6
+ * Enable debug logging
7
+ * @default false
8
+ */
9
+ debug?: boolean;
10
+ /**
11
+ * Custom path to the Angular Rust binding package
12
+ * If not specified, will try to resolve @anthropic/angular-rust-binding
13
+ */
14
+ bindingPath?: string;
15
+ }
16
+ interface LinkerResult {
17
+ code: string;
18
+ map: null | undefined;
19
+ }
20
+ /**
21
+ * Check if file contains Angular partial declarations that need linking
22
+ */
23
+ declare function needsLinking(code: string): boolean;
24
+ /**
25
+ * Check if file is an Angular package file
26
+ */
27
+ declare function isAngularPackage(id: string): boolean;
28
+ /**
29
+ * Check if file is a JavaScript/MJS file
30
+ */
31
+ declare function isJsFile(id: string): boolean;
32
+ /**
33
+ * Clean module ID by removing query strings
34
+ */
35
+ declare function cleanModuleId(id: string): string;
36
+ /**
37
+ * Default Angular packages to exclude from pre-bundling
38
+ */
39
+ declare const ANGULAR_PACKAGES: string[];
40
+ /**
41
+ * Packages that don't need linking and should be included in pre-bundling
42
+ */
43
+ declare const NON_ANGULAR_PACKAGES: string[];
44
+
45
+ export { ANGULAR_PACKAGES as A, type LinkerOptions as L, NON_ANGULAR_PACKAGES as N, isJsFile as a, type LinkerResult as b, cleanModuleId as c, isAngularPackage as i, needsLinking as n };
@@ -0,0 +1,45 @@
1
+ /**
2
+ * Angular Linker Plugin Types
3
+ */
4
+ interface LinkerOptions {
5
+ /**
6
+ * Enable debug logging
7
+ * @default false
8
+ */
9
+ debug?: boolean;
10
+ /**
11
+ * Custom path to the Angular Rust binding package
12
+ * If not specified, will try to resolve @anthropic/angular-rust-binding
13
+ */
14
+ bindingPath?: string;
15
+ }
16
+ interface LinkerResult {
17
+ code: string;
18
+ map: null | undefined;
19
+ }
20
+ /**
21
+ * Check if file contains Angular partial declarations that need linking
22
+ */
23
+ declare function needsLinking(code: string): boolean;
24
+ /**
25
+ * Check if file is an Angular package file
26
+ */
27
+ declare function isAngularPackage(id: string): boolean;
28
+ /**
29
+ * Check if file is a JavaScript/MJS file
30
+ */
31
+ declare function isJsFile(id: string): boolean;
32
+ /**
33
+ * Clean module ID by removing query strings
34
+ */
35
+ declare function cleanModuleId(id: string): string;
36
+ /**
37
+ * Default Angular packages to exclude from pre-bundling
38
+ */
39
+ declare const ANGULAR_PACKAGES: string[];
40
+ /**
41
+ * Packages that don't need linking and should be included in pre-bundling
42
+ */
43
+ declare const NON_ANGULAR_PACKAGES: string[];
44
+
45
+ export { ANGULAR_PACKAGES as A, type LinkerOptions as L, NON_ANGULAR_PACKAGES as N, isJsFile as a, type LinkerResult as b, cleanModuleId as c, isAngularPackage as i, needsLinking as n };