ic-mops 0.42.0 → 0.43.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.
package/vessel.ts CHANGED
@@ -8,7 +8,7 @@ import chalk from 'chalk';
8
8
  import {createLogUpdate} from 'log-update';
9
9
  import got from 'got';
10
10
  import decompress from 'decompress';
11
- import {formatGithubDir, parseGithubURL, progressBar} from './mops.js';
11
+ import {parseGithubURL, progressBar} from './mops.js';
12
12
  import {getDepCacheDir, getGithubDepCacheName, isDepCached} from './cache.js';
13
13
 
14
14
  const dhallFileToJson = async (filePath : string, silent : boolean) => {
@@ -150,20 +150,15 @@ export const downloadFromGithub = async (repo : string, dest : string, onProgres
150
150
  };
151
151
 
152
152
  export const installFromGithub = async (name : string, repo : string, {verbose = false, dep = false, silent = false} = {}) => {
153
- let dir = formatGithubDir(name, repo);
154
153
  let cacheName = getGithubDepCacheName(name, repo);
155
154
  let cacheDir = getDepCacheDir(cacheName);
156
155
 
157
156
  let logUpdate = createLogUpdate(process.stdout, {showCursor: true});
158
157
 
159
- if (existsSync(dir)) {
160
- silent || logUpdate(`${dep ? 'Dependency' : 'Installing'} ${repo} (local cache)`);
161
- }
162
- else if (isDepCached(cacheName)) {
163
- silent || logUpdate(`${dep ? 'Dependency' : 'Installing'} ${repo} (global cache)`);
158
+ if (isDepCached(cacheName)) {
159
+ silent || logUpdate(`${dep ? 'Dependency' : 'Installing'} ${repo} (cache)`);
164
160
  }
165
161
  else {
166
-
167
162
  let progress = (step : number, total : number) => {
168
163
  silent || logUpdate(`${dep ? 'Dependency' : 'Installing'} ${repo} ${progressBar(step, total)}`);
169
164
  };
@@ -188,7 +183,7 @@ export const installFromGithub = async (name : string, repo : string, {verbose =
188
183
  logUpdate.clear();
189
184
  }
190
185
 
191
- const config = await readVesselConfig(dir, {silent});
186
+ const config = await readVesselConfig(cacheDir, {silent});
192
187
 
193
188
  if (config) {
194
189
  for (const {name, repo} of config.dependencies) {