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/CHANGELOG.md +8 -0
- package/bundle/cli.js +31 -31
- package/bundle/cli.tgz +0 -0
- package/bundle/package.json +1 -1
- package/cache.ts +4 -0
- package/check-requirements.ts +3 -2
- package/cli.ts +9 -3
- package/commands/install/install-all.ts +8 -6
- package/commands/install/install-dep.ts +3 -3
- package/commands/install/install-deps.ts +4 -11
- package/commands/install/install-local-dep.ts +1 -1
- package/commands/install/install-mops-dep.ts +18 -22
- package/commands/install/sync-local-cache.ts +3 -1
- package/dist/cache.d.ts +1 -0
- package/dist/cache.js +3 -0
- package/dist/check-requirements.js +3 -2
- package/dist/cli.js +9 -3
- package/dist/commands/install/install-all.d.ts +1 -1
- package/dist/commands/install/install-all.js +6 -5
- package/dist/commands/install/install-dep.d.ts +1 -1
- package/dist/commands/install/install-dep.js +2 -2
- package/dist/commands/install/install-deps.d.ts +1 -1
- package/dist/commands/install/install-deps.js +2 -9
- package/dist/commands/install/install-local-dep.d.ts +1 -1
- package/dist/commands/install/install-mops-dep.d.ts +1 -1
- package/dist/commands/install/install-mops-dep.js +15 -21
- package/dist/commands/install/sync-local-cache.js +3 -1
- package/dist/package.json +1 -1
- package/dist/vessel.js +4 -8
- package/package.json +1 -1
- package/vessel.ts +4 -9
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 {
|
|
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 (
|
|
160
|
-
silent || logUpdate(`${dep ? 'Dependency' : 'Installing'} ${repo} (
|
|
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(
|
|
186
|
+
const config = await readVesselConfig(cacheDir, {silent});
|
|
192
187
|
|
|
193
188
|
if (config) {
|
|
194
189
|
for (const {name, repo} of config.dependencies) {
|