@semaphore-protocol/cli 3.6.0-beta.4 → 3.7.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/README.md CHANGED
@@ -75,8 +75,10 @@ Options:
75
75
  -h, --help Display this help.
76
76
 
77
77
  Commands:
78
- create <project-directory> Create a Semaphore project with a supported template.
79
- get-groups [options] Get the list of groups from a supported network (Goerli or Arbitrum).
80
- get-group [options] <group-id> Get the data of a group from a supported network (Goerli or Arbitrum).
81
- help [command] Display help for a specific command.
78
+ create [options] [project-directory] Create a Semaphore project with a supported template.
79
+ get-groups [options] Get the list of groups from a supported network (e.g. goerli or arbitrum).
80
+ get-group [options] [group-id] Get the data of a group from a supported network (e.g. goerli or arbitrum).
81
+ get-members [options] [group-id] Get the members of a group from a supported network (e.g. goerli or arbitrum).
82
+ get-proofs [options] [group-id] Get the proofs from a supported network (e.g. goerli or arbitrum).
83
+ help [command] Display help for a specific command.
82
84
  ```
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.4
5
+ * @version 3.7.0
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,7 +13,7 @@ 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, unlinkSync } from 'fs';
16
+ import { readFileSync, existsSync, unlinkSync, copyFileSync } from 'fs';
17
17
  import logSymbols from 'log-symbols';
18
18
  import pacote from 'pacote';
19
19
  import decompress from 'decompress';
@@ -150,10 +150,6 @@ const packagePath = `${dirname(fileURLToPath(import.meta.url))}/..`;
150
150
  const { description, version } = JSON.parse(readFileSync(`${packagePath}/package.json`, "utf8"));
151
151
  const supportedNetworks = ["sepolia", "goerli", "mumbai", "optimism-goerli", "arbitrum", "arbitrum-goerli"];
152
152
  const supportedTemplates = [
153
- {
154
- value: "contracts-hardhat",
155
- name: "Hardhat"
156
- },
157
153
  {
158
154
  value: "monorepo-ethers",
159
155
  name: "Hardhat + Next.js + SemaphoreEthers"
@@ -161,6 +157,10 @@ const supportedTemplates = [
161
157
  {
162
158
  value: "monorepo-subgraph",
163
159
  name: "Hardhat + Next.js + SemaphoreSubgraph"
160
+ },
161
+ {
162
+ value: "contracts-hardhat",
163
+ name: "Hardhat"
164
164
  }
165
165
  ];
166
166
  program
@@ -204,6 +204,7 @@ program
204
204
  await pacote.extract(`@semaphore-protocol/cli-template-${template}@${version}`, `${currentDirectory}/${projectDirectory}`);
205
205
  await decompress(`${currentDirectory}/${projectDirectory}/files.tgz`, `${currentDirectory}/${projectDirectory}`);
206
206
  unlinkSync(`${currentDirectory}/${projectDirectory}/files.tgz`);
207
+ copyFileSync(`${currentDirectory}/${projectDirectory}/.env.example`, `${currentDirectory}/${projectDirectory}/.env`);
207
208
  spinner.stop();
208
209
  console.info(`\n ${logSymbols.success}`, `Your project is ready!\n`);
209
210
  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",
4
+ "version": "3.7.0",
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,7 +43,7 @@
43
43
  "typedoc": "^0.22.11"
44
44
  },
45
45
  "dependencies": {
46
- "@semaphore-protocol/data": "3.6.0-beta.4",
46
+ "@semaphore-protocol/data": "3.7.0",
47
47
  "axios": "^1.3.2",
48
48
  "boxen": "^7.0.1",
49
49
  "chalk": "^5.1.2",
@@ -55,6 +55,5 @@
55
55
  "ora": "^6.1.2",
56
56
  "pacote": "^15.1.1",
57
57
  "semver": "^7.3.8"
58
- },
59
- "stableVersion": "3.6.0-beta.3"
58
+ }
60
59
  }
package/src/index.ts CHANGED
@@ -2,7 +2,7 @@ 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, unlinkSync } from "fs"
5
+ import { existsSync, readFileSync, unlinkSync, copyFileSync } from "fs"
6
6
  import logSymbols from "log-symbols"
7
7
  import pacote from "pacote"
8
8
  import decompress from "decompress"
@@ -19,10 +19,6 @@ const { description, version } = JSON.parse(readFileSync(`${packagePath}/package
19
19
  const supportedNetworks = ["sepolia", "goerli", "mumbai", "optimism-goerli", "arbitrum", "arbitrum-goerli"]
20
20
 
21
21
  const supportedTemplates = [
22
- {
23
- value: "contracts-hardhat",
24
- name: "Hardhat"
25
- },
26
22
  {
27
23
  value: "monorepo-ethers",
28
24
  name: "Hardhat + Next.js + SemaphoreEthers"
@@ -30,6 +26,10 @@ const supportedTemplates = [
30
26
  {
31
27
  value: "monorepo-subgraph",
32
28
  name: "Hardhat + Next.js + SemaphoreSubgraph"
29
+ },
30
+ {
31
+ value: "contracts-hardhat",
32
+ name: "Hardhat"
33
33
  }
34
34
  ]
35
35
 
@@ -88,6 +88,11 @@ program
88
88
 
89
89
  unlinkSync(`${currentDirectory}/${projectDirectory}/files.tgz`)
90
90
 
91
+ copyFileSync(
92
+ `${currentDirectory}/${projectDirectory}/.env.example`,
93
+ `${currentDirectory}/${projectDirectory}/.env`
94
+ )
95
+
91
96
  spinner.stop()
92
97
 
93
98
  console.info(`\n ${logSymbols.success}`, `Your project is ready!\n`)