ic-mops 0.42.1 → 0.44.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 +9 -0
- package/bin/moc-wrapper.sh +39 -2
- package/bundle/cli.js +31 -31
- package/bundle/cli.tgz +0 -0
- package/bundle/package.json +1 -1
- package/cache.ts +4 -0
- package/cli.ts +5 -2
- package/commands/install/install-all.ts +1 -1
- package/commands/install/sync-local-cache.ts +3 -1
- package/dist/bin/moc-wrapper.sh +39 -2
- package/dist/cache.d.ts +1 -0
- package/dist/cache.js +3 -0
- package/dist/cli.js +5 -2
- package/dist/commands/install/install-all.js +1 -1
- package/dist/commands/install/sync-local-cache.js +3 -1
- package/dist/package.json +1 -1
- package/dist/vessel.js +2 -3
- package/package.json +1 -1
- package/vessel.ts +2 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,15 @@
|
|
|
1
1
|
# Mops CLI Changelog
|
|
2
2
|
|
|
3
3
|
## unreleased
|
|
4
|
+
|
|
5
|
+
## 0.44.0
|
|
6
|
+
- Optimized toolchain `moc` resolving (~30% faster builds).
|
|
7
|
+
|
|
8
|
+
## 0.43.0
|
|
9
|
+
- Add `mops cache show` command
|
|
10
|
+
- Fix github legacy deps install
|
|
11
|
+
|
|
12
|
+
## 0.42.1
|
|
4
13
|
- Fix package requirements check from subdirectories
|
|
5
14
|
- Fix local and global cache inconsistency
|
|
6
15
|
|
package/bin/moc-wrapper.sh
CHANGED
|
@@ -1,3 +1,40 @@
|
|
|
1
1
|
#!/bin/bash
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
|
|
3
|
+
# set -e
|
|
4
|
+
|
|
5
|
+
findRootDir() {
|
|
6
|
+
dir="$(pwd)"
|
|
7
|
+
while [[ "$dir" != "" && ! -e "$dir/mops.toml" ]]; do
|
|
8
|
+
dir=${dir%/*}
|
|
9
|
+
done
|
|
10
|
+
echo "$dir"
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
rootDir=$(findRootDir)
|
|
14
|
+
mopsToml="$rootDir/mops.toml"
|
|
15
|
+
|
|
16
|
+
if [[ $rootDir == "" ]] || [[ ! -f $mopsToml ]]; then
|
|
17
|
+
echo "mops.toml not found in $rootDir or its parent directories"
|
|
18
|
+
exit 1;
|
|
19
|
+
fi;
|
|
20
|
+
|
|
21
|
+
if command -v openssl &> /dev/null; then
|
|
22
|
+
mopsTomlHash=$(openssl sha256 $mopsToml | awk -F'= ' '{print $2}')
|
|
23
|
+
else
|
|
24
|
+
mopsTomlHash=$(shasum $mopsToml -a 256 | awk -F' ' '{print $1}')
|
|
25
|
+
fi;
|
|
26
|
+
|
|
27
|
+
cached="$rootDir/.mops/moc-$mopsTomlHash"
|
|
28
|
+
|
|
29
|
+
if [ -f $cached ]; then
|
|
30
|
+
mocPath=$(cat $cached)
|
|
31
|
+
if [[ "$mocPath" != *"/moc" ]] ; then
|
|
32
|
+
mocPath="$(mops toolchain bin moc --fallback)"
|
|
33
|
+
echo -n $mocPath > "$cached"
|
|
34
|
+
fi;
|
|
35
|
+
else
|
|
36
|
+
mocPath="$(mops toolchain bin moc --fallback)"
|
|
37
|
+
echo -n $mocPath > "$cached"
|
|
38
|
+
fi;
|
|
39
|
+
|
|
40
|
+
$mocPath "$@"
|