Skip to content

Commit

Permalink
chore: moving some classes around
Browse files Browse the repository at this point in the history
  • Loading branch information
elbywan committed Jan 31, 2024
1 parent de3ecda commit 05a7878
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 6 deletions.
1 change: 1 addition & 0 deletions src/commands/install/install.cr
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ require "../../config"
require "../../npmrc"
require "./resolver"
require "./state"
require "./registry_clients"
require "../../installer/isolated"
require "../../installer/classic"
require "../../installer/pnp"
Expand Down
4 changes: 2 additions & 2 deletions src/manifest.cr → src/commands/install/manifest.cr
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
require "json"
require "msgpack"
require "./utils/semver"
require "../../utils/semver"

struct Zap::Manifest
struct Zap::Commands::Install::Manifest
include JSON::Serializable
include MessagePack::Serializable

Expand Down
4 changes: 2 additions & 2 deletions src/commands/install/protocol/registry/resolver.cr
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
require "../base"
require "../resolver"
require "../../manifest"
require "../../registry_clients"
require "../../../../utils/fetch"
require "../../../../registry_clients"
require "../../../../manifest"

struct Zap::Commands::Install::Protocol::Registry < Zap::Commands::Install::Protocol::Base
end
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
require "./manifest"
require "./utils/fetch"
require "../../utils/fetch"

# Exposes a pool of http(s) clients for each registry and convenience methods to access the pools.
#
# The pools are lazily initialized and cached.
class Zap::RegistryClients
class Zap::Commands::Install::RegistryClients
# The pool of clients for each registry
@client_pool_by_registry : Hash(String, Utils::Fetch(Manifest)) = Hash(String, Utils::Fetch(Manifest)).new
# Lock to synchronize access to the pools
Expand Down
1 change: 1 addition & 0 deletions src/commands/install/state.cr
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ require "../../reporter/interactive"
require "../../utils/concurrent/pipeline"
require "../config"
require "./config"
require "./registry_clients"

module Zap::Commands::Install
record State,
Expand Down

0 comments on commit 05a7878

Please sign in to comment.