diff options
Diffstat (limited to 'src/install/npm.zig')
-rw-r--r-- | src/install/npm.zig | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/install/npm.zig b/src/install/npm.zig index 3c56d5f80..4fdd2189d 100644 --- a/src/install/npm.zig +++ b/src/install/npm.zig @@ -78,6 +78,14 @@ pub const Registry = struct { url: URL = URL.parse("https://registry.npmjs.org/"), pub const BodyPool = ObjectPool(MutableString, MutableString.init2048, true); + pub const Scope = struct { + name: string, + url: URL, + token: string = "", + }; + + pub const Map = std.HashMapUnmanaged(u64, Scope, IdentityContext(u64), 80); + const PackageVersionResponse = union(Tag) { pub const Tag = enum { cached, @@ -338,6 +346,10 @@ pub const PackageVersion = extern struct { man_dir: ExternalString = ExternalString{}, + /// can be empty! + /// When empty, it means that the tarball URL can be inferred + tarball_url: ExternalString = ExternalString{}, + unpacked_size: u32 = 0, file_count: u32 = 0, |