@semaphore-protocol/cli 3.6.0-beta.0 → 3.6.0-beta.1
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/dist/index.js +5 -2
- package/package.json +4 -3
- package/src/index.ts +6 -1
package/dist/index.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* @module @semaphore-protocol/cli
|
|
5
|
-
* @version 3.6.0-beta.
|
|
5
|
+
* @version 3.6.0-beta.1
|
|
6
6
|
* @file A command line tool to set up your Semaphore project and get group data.
|
|
7
7
|
* @copyright Ethereum Foundation 2022
|
|
8
8
|
* @license MIT
|
|
@@ -13,9 +13,10 @@ import { SemaphoreSubgraph, SemaphoreEthers } from '@semaphore-protocol/data';
|
|
|
13
13
|
import chalk from 'chalk';
|
|
14
14
|
import { program } from 'commander';
|
|
15
15
|
import figlet from 'figlet';
|
|
16
|
-
import { readFileSync, existsSync } from 'fs';
|
|
16
|
+
import { readFileSync, existsSync, unlinkSync } from 'fs';
|
|
17
17
|
import logSymbols from 'log-symbols';
|
|
18
18
|
import pacote from 'pacote';
|
|
19
|
+
import decompress from 'decompress';
|
|
19
20
|
import { dirname } from 'path';
|
|
20
21
|
import { fileURLToPath } from 'url';
|
|
21
22
|
import axios from 'axios';
|
|
@@ -201,6 +202,8 @@ program
|
|
|
201
202
|
spinner.start();
|
|
202
203
|
await checkLatestVersion(version);
|
|
203
204
|
await pacote.extract(`@semaphore-protocol/cli-template-${template}@${version}`, `${currentDirectory}/${projectDirectory}`);
|
|
205
|
+
await decompress(`${currentDirectory}/${projectDirectory}/files.tgz`, `${currentDirectory}/${projectDirectory}`);
|
|
206
|
+
unlinkSync(`${currentDirectory}/${projectDirectory}/files.tgz`);
|
|
204
207
|
spinner.stop();
|
|
205
208
|
console.info(`\n ${logSymbols.success}`, `Your project is ready!\n`);
|
|
206
209
|
console.info(` Please, install your dependencies by running:\n`);
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@semaphore-protocol/cli",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "3.6.0-beta.
|
|
4
|
+
"version": "3.6.0-beta.1",
|
|
5
5
|
"description": "A command line tool to set up your Semaphore project and get group data.",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"bin": {
|
|
@@ -43,11 +43,12 @@
|
|
|
43
43
|
"typedoc": "^0.22.11"
|
|
44
44
|
},
|
|
45
45
|
"dependencies": {
|
|
46
|
-
"@semaphore-protocol/data": "3.6.0-beta.
|
|
46
|
+
"@semaphore-protocol/data": "3.6.0-beta.1",
|
|
47
47
|
"axios": "^1.3.2",
|
|
48
48
|
"boxen": "^7.0.1",
|
|
49
49
|
"chalk": "^5.1.2",
|
|
50
50
|
"commander": "^9.4.1",
|
|
51
|
+
"decompress": "^4.2.1",
|
|
51
52
|
"figlet": "^1.5.2",
|
|
52
53
|
"inquirer": "^9.1.4",
|
|
53
54
|
"log-symbols": "^5.1.0",
|
|
@@ -55,5 +56,5 @@
|
|
|
55
56
|
"pacote": "^15.1.1",
|
|
56
57
|
"semver": "^7.3.8"
|
|
57
58
|
},
|
|
58
|
-
"stableVersion": "3.
|
|
59
|
+
"stableVersion": "3.6.0-beta.0"
|
|
59
60
|
}
|
package/src/index.ts
CHANGED
|
@@ -2,9 +2,10 @@ import { GroupResponse, SemaphoreEthers, SemaphoreSubgraph } from "@semaphore-pr
|
|
|
2
2
|
import chalk from "chalk"
|
|
3
3
|
import { program } from "commander"
|
|
4
4
|
import figlet from "figlet"
|
|
5
|
-
import { existsSync, readFileSync } from "fs"
|
|
5
|
+
import { existsSync, readFileSync, unlinkSync } from "fs"
|
|
6
6
|
import logSymbols from "log-symbols"
|
|
7
7
|
import pacote from "pacote"
|
|
8
|
+
import decompress from "decompress"
|
|
8
9
|
import { dirname } from "path"
|
|
9
10
|
import { fileURLToPath } from "url"
|
|
10
11
|
import checkLatestVersion from "./checkLatestVersion.js"
|
|
@@ -83,6 +84,10 @@ program
|
|
|
83
84
|
`${currentDirectory}/${projectDirectory}`
|
|
84
85
|
)
|
|
85
86
|
|
|
87
|
+
await decompress(`${currentDirectory}/${projectDirectory}/files.tgz`, `${currentDirectory}/${projectDirectory}`)
|
|
88
|
+
|
|
89
|
+
unlinkSync(`${currentDirectory}/${projectDirectory}/files.tgz`)
|
|
90
|
+
|
|
86
91
|
spinner.stop()
|
|
87
92
|
|
|
88
93
|
console.info(`\n ${logSymbols.success}`, `Your project is ready!\n`)
|