diff options
Diffstat (limited to 'src/install/npm.zig')
-rw-r--r-- | src/install/npm.zig | 21 |
1 files changed, 8 insertions, 13 deletions
diff --git a/src/install/npm.zig b/src/install/npm.zig index 965157d50..3874c2c01 100644 --- a/src/install/npm.zig +++ b/src/install/npm.zig @@ -35,12 +35,7 @@ const ComptimeStringMap = @import("../comptime_string_map.zig").ComptimeStringMa const Npm = @This(); pub const Registry = struct { - url: URL = URL.parse("https://registry.npmjs.org/"), - scopes: Map = Map{}, - - token: string = "", - auth: string = "", - + pub const DefaultURL = "https://registry.npmjs.org/"; pub const BodyPool = ObjectPool(MutableString, MutableString.init2048, true, 8); pub const Scope = struct { @@ -72,7 +67,7 @@ pub const Registry = struct { pub fn fromAPI(name: string, registry_: Api.NpmRegistry, allocator: std.mem.Allocator, env: *DotEnv.Loader) !Scope { var registry = registry_; - var url = URL.parse(registry.url); + var url = URL.parse(if (registry.url.len == 0) DefaultURL else registry.url); var auth: string = ""; if (registry.token.len == 0) { @@ -620,15 +615,15 @@ pub const PackageManifest = struct { pub fn reportSize(this: *const PackageManifest) void { Output.prettyErrorln( - \\ Versions count: {d} - \\ External Strings count: {d} + \\ Versions count: {d} + \\ External Strings count: {d} \\ Package Versions count: {d} - \\ + \\ \\ Bytes: \\ - \\ Versions: {d} - \\ External: {d} - \\ Packages: {d} + \\ Versions: {d} + \\ External: {d} + \\ Packages: {d} \\ Strings: {d} \\ Total: {d} , .{ |