@sentio/cli 2.0.0 → 2.0.1-rc.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.
@@ -91,6 +91,10 @@ export async function runCreate(argv) {
91
91
  },
92
92
  overwrite: false,
93
93
  });
94
+ const gitignoreFile = path.join(dstFolder, 'gitignore');
95
+ if (fs.existsSync(gitignoreFile)) {
96
+ fs.renameSync(gitignoreFile, path.join(dstFolder, '.gitignore'));
97
+ }
94
98
  if (options.name) {
95
99
  const sentioYamlPath = path.resolve(dstFolder, 'sentio.yaml');
96
100
  fs.writeFileSync(sentioYamlPath, 'project: ' + projectName + '\n', { flag: 'w+' });
@@ -1 +1 @@
1
- {"version":3,"file":"run-create.js","sourceRoot":"","sources":["../../src/commands/run-create.ts"],"names":[],"mappings":"AAAA,OAAO,eAAe,MAAM,mBAAmB,CAAA;AAC/C,OAAO,gBAAgB,MAAM,oBAAoB,CAAA;AACjD,OAAO,IAAI,MAAM,MAAM,CAAA;AACvB,OAAO,EAAE,MAAM,UAAU,CAAA;AACzB,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,aAAa,MAAM,gBAAgB,CAAA;AAE1C,MAAM,CAAC,KAAK,UAAU,SAAS,CAAC,IAAc;IAC5C,MAAM,iBAAiB,GAAG;QACxB;YACE,IAAI,EAAE,MAAM;YACZ,KAAK,EAAE,GAAG;YACV,IAAI,EAAE,OAAO;YACb,WAAW,EAAE,2BAA2B;SACzC;QACD;YACE,IAAI,EAAE,MAAM;YACZ,KAAK,EAAE,GAAG;YACV,aAAa,EAAE,IAAI;YACnB,IAAI,EAAE,MAAM;YACZ,WAAW,EAAE,cAAc;SAC5B;QACD;YACE,IAAI,EAAE,YAAY;YAClB,KAAK,EAAE,GAAG;YACV,IAAI,EAAE,OAAO;YACb,WAAW,EACT,4GAA4G;SAC/G;QACD;YACE,IAAI,EAAE,WAAW;YACjB,KAAK,EAAE,GAAG;YACV,WAAW,EAAE,qFAAq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AA;YAC7D,WAAW,CAAC,YAAY,CAAC,aAAa,CAAC,GAAG,UAAU,CAAA;YAEpD,MAAM,UAAU,GAAG,GAAG,GAAG,CAAC,MAAM,aAAa,CAAC,aAAa,CAAC,CAAC,CAAA;YAC7D,WAAW,CAAC,eAAe,CAAC,aAAa,CAAC,GAAG,UAAU,CAAA;YACvD,WAAW,CAAC,IAAI,GAAG,WAAW,CAAA;YAE9B,IAAI,OAAO,CAAC,UAAU,EAAE;gBACtB,OAAO,WAAW,CAAC,YAAY,CAAC,aAAa,CAAC,CAAA;gBAC9C,OAAO,WAAW,CAAC,eAAe,CAAC,aAAa,CAAC,CAAA;aAClD;YAED,yCAAyC;YACzC,WAAW,CAAC,OAAO,CAAC,WAAW,GAAG,YAAY,CAAA;YAE9C,EAAE,CAAC,aAAa,CAAC,eAAe,EAAE,IAAI,CAAC,SAAS,CAAC,WAAW,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAA;SACxE;QACD,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,KAAK,CAAC,+BAA+B,GAAG,WAAW,GAAG,GAAG,CAAC,CAAC,CAAA;KAC9E;AACH,CAAC","sourcesContent":["import commandLineArgs from 'command-line-args'\nimport commandLineUsage from 'command-line-usage'\nimport path from 'path'\nimport fs from 'fs-extra'\nimport chalk from 'chalk'\nimport latestVersion from 'latest-version'\n\nexport async function runCreate(argv: string[]) {\n const optionDefinitions = [\n {\n name: 'help',\n alias: 'h',\n type: Boolean,\n description: 'Display this usage guide.',\n },\n {\n name: 'name',\n alias: 'n',\n defaultOption: true,\n type: String,\n description: 'Project name',\n },\n {\n name: 'subproject',\n alias: 'p',\n type: Boolean,\n description:\n 'If this is a subproject in mono-repo setup, in this case sdk version is controlled in parent package.json.',\n },\n {\n name: 'directory',\n alias: 'd',\n description: '(Optional) The root direct new project will be created, default current working dir',\n type: String,\n },\n {\n name: 'chain-type',\n alias: 'c',\n description:\n 'The type of project you want to create, can be evm, aptos, solana, raw (if you want to start from scratch and support multiple types of chains)',\n type: String,\n defaultValue: 'evm',\n },\n ]\n\n const options = commandLineArgs(optionDefinitions, { argv })\n const usage = commandLineUsage([\n {\n header: 'Create a template project',\n content: 'sentio create <name>',\n },\n {\n header: 'Options',\n optionList: optionDefinitions,\n },\n ])\n\n if (options.help || !options.name) {\n console.log(usage)\n } else {\n const chainType: string = options['chain-type'].toLowerCase()\n switch (chainType) {\n case 'evm':\n break\n case 'aptos':\n break\n case 'raw':\n break\n case 'solana':\n break\n default:\n console.error(chalk.red('non supported chain-type for template creation, use --help for more information.'))\n console.log(usage)\n process.exit(1)\n }\n const templateFolder = path.resolve(__dirname, '../../templates', chainType)\n const projectName = options.name || 'default'\n\n const rootDir = options.directory || process.cwd()\n const dstFolder = path.resolve(rootDir, projectName)\n if (fs.existsSync(dstFolder)) {\n console.error(chalk.red(\"can't create project '\" + projectName + \"', directory already existed\"))\n process.exit(1)\n }\n\n fs.copySync(templateFolder, dstFolder, {\n filter: (src, _) => {\n // TODO read from .gitignore to be more reliable\n if (\n src.endsWith('types') ||\n src.endsWith('dist') ||\n src.endsWith('node_modules') ||\n src.endsWith('.lock') ||\n src.endsWith('dist')\n ) {\n return false\n }\n return true\n },\n overwrite: false,\n })\n if (options.name) {\n const sentioYamlPath = path.resolve(dstFolder, 'sentio.yaml')\n fs.writeFileSync(sentioYamlPath, 'project: ' + projectName + '\\n', { flag: 'w+' })\n\n const packageJsonPath = path.resolve(dstFolder, 'package.json')\n const packageJson = JSON.parse(fs.readFileSync(packageJsonPath, 'utf8'))\n\n const sdkVersion = '^' + (await latestVersion('@sentio/sdk'))\n packageJson.dependencies['@sentio/sdk'] = sdkVersion\n\n const cliVersion = '^' + (await latestVersion('@sentio/cli'))\n packageJson.devDependencies['@sentio/cli'] = cliVersion\n packageJson.name = projectName\n\n if (options.subproject) {\n delete packageJson.dependencies['@sentio/sdk']\n delete packageJson.devDependencies['@sentio/cli']\n }\n\n // Don't add directly to avoid deps issue\n packageJson.scripts.postinstall = 'sentio gen'\n\n fs.writeFileSync(packageJsonPath, JSON.stringify(packageJson, null, 2))\n }\n console.log(chalk.green(\"successfully create project '\" + projectName + \"'\"))\n }\n}\n"]}
1
+ {"version":3,"file":"run-create.js","sourceRoot":"","sources":["../../src/commands/run-create.ts"],"names":[],"mappings":"AAAA,OAAO,eAAe,MAAM,mBAAmB,CAAA;AAC/C,OAAO,gBAAgB,MAAM,oBAAoB,CAAA;AACjD,OAAO,IAAI,MAAM,MAAM,CAAA;AACvB,OAAO,EAAE,MAAM,UAAU,CAAA;AACzB,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,aAAa,MAAM,gBAAgB,CAAA;AAE1C,MAAM,CAAC,KAAK,UAAU,SAAS,CAAC,IAAc;IAC5C,MAAM,iBAAiB,GAAG;QACxB;YACE,IAAI,EAAE,MAAM;YACZ,KAAK,EAAE,GAAG;YACV,IAAI,EAAE,OAAO;YACb,WAAW,EAAE,2BAA2B;SACzC;QACD;YACE,IAAI,EAAE,MAAM;YACZ,KAAK,EAAE,GAAG;YACV,aAAa,EAAE,IAAI;YACnB,IAAI,EAAE,MAAM;YACZ,WAAW,EAAE,cAAc;SAC5B;QACD;YACE,IAAI,EAAE,YAAY;YAClB,KAAK,EAAE,GAAG;YACV,IAAI,EAAE,OAAO;YACb,WAAW,EACT,4GAA4G;SAC/G;QACD;YACE,IAAI,EAAE,WAAW;YACjB,KAAK,EAAE,GAAG;YACV,WAAW,EAAE,qFAAqF;YAClG,IAAI,EAAE,MAAM;SACb;QACD;YACE,IAAI,EAAE,YAAY;YAClB,KAAK,EAAE,GAAG;YACV,WAAW,EACT,iJAAiJ;YACnJ,IAAI,EAAE,MAAM;YACZ,YAAY,EAAE,KAAK;SACpB;KACF,CAAA;IAED,MAAM,OAAO,GAAG,eAAe,CAAC,iBAAiB,EAAE,EAAE,IAAI,EAAE,CAAC,CAAA;IAC5D,MAAM,KAAK,GAAG,gBAAgB,CAAC;QAC7B;YACE,MAAM,EAAE,2BAA2B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AAG,GAAG,GAAG,CAAC,MAAM,aAAa,CAAC,aAAa,CAAC,CAAC,CAAA;YAC7D,WAAW,CAAC,eAAe,CAAC,aAAa,CAAC,GAAG,UAAU,CAAA;YACvD,WAAW,CAAC,IAAI,GAAG,WAAW,CAAA;YAE9B,IAAI,OAAO,CAAC,UAAU,EAAE;gBACtB,OAAO,WAAW,CAAC,YAAY,CAAC,aAAa,CAAC,CAAA;gBAC9C,OAAO,WAAW,CAAC,eAAe,CAAC,aAAa,CAAC,CAAA;aAClD;YAED,yCAAyC;YACzC,WAAW,CAAC,OAAO,CAAC,WAAW,GAAG,YAAY,CAAA;YAE9C,EAAE,CAAC,aAAa,CAAC,eAAe,EAAE,IAAI,CAAC,SAAS,CAAC,WAAW,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAA;SACxE;QACD,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,KAAK,CAAC,+BAA+B,GAAG,WAAW,GAAG,GAAG,CAAC,CAAC,CAAA;KAC9E;AACH,CAAC","sourcesContent":["import commandLineArgs from 'command-line-args'\nimport commandLineUsage from 'command-line-usage'\nimport path from 'path'\nimport fs from 'fs-extra'\nimport chalk from 'chalk'\nimport latestVersion from 'latest-version'\n\nexport async function runCreate(argv: string[]) {\n const optionDefinitions = [\n {\n name: 'help',\n alias: 'h',\n type: Boolean,\n description: 'Display this usage guide.',\n },\n {\n name: 'name',\n alias: 'n',\n defaultOption: true,\n type: String,\n description: 'Project name',\n },\n {\n name: 'subproject',\n alias: 'p',\n type: Boolean,\n description:\n 'If this is a subproject in mono-repo setup, in this case sdk version is controlled in parent package.json.',\n },\n {\n name: 'directory',\n alias: 'd',\n description: '(Optional) The root direct new project will be created, default current working dir',\n type: String,\n },\n {\n name: 'chain-type',\n alias: 'c',\n description:\n 'The type of project you want to create, can be evm, aptos, solana, raw (if you want to start from scratch and support multiple types of chains)',\n type: String,\n defaultValue: 'evm',\n },\n ]\n\n const options = commandLineArgs(optionDefinitions, { argv })\n const usage = commandLineUsage([\n {\n header: 'Create a template project',\n content: 'sentio create <name>',\n },\n {\n header: 'Options',\n optionList: optionDefinitions,\n },\n ])\n\n if (options.help || !options.name) {\n console.log(usage)\n } else {\n const chainType: string = options['chain-type'].toLowerCase()\n switch (chainType) {\n case 'evm':\n break\n case 'aptos':\n break\n case 'raw':\n break\n case 'solana':\n break\n default:\n console.error(chalk.red('non supported chain-type for template creation, use --help for more information.'))\n console.log(usage)\n process.exit(1)\n }\n const templateFolder = path.resolve(__dirname, '../../templates', chainType)\n const projectName = options.name || 'default'\n\n const rootDir = options.directory || process.cwd()\n const dstFolder = path.resolve(rootDir, projectName)\n if (fs.existsSync(dstFolder)) {\n console.error(chalk.red(\"can't create project '\" + projectName + \"', directory already existed\"))\n process.exit(1)\n }\n\n fs.copySync(templateFolder, dstFolder, {\n filter: (src, _) => {\n // TODO read from .gitignore to be more reliable\n if (\n src.endsWith('types') ||\n src.endsWith('dist') ||\n src.endsWith('node_modules') ||\n src.endsWith('.lock') ||\n src.endsWith('dist')\n ) {\n return false\n }\n return true\n },\n overwrite: false,\n })\n const gitignoreFile = path.join(dstFolder, 'gitignore')\n if (fs.existsSync(gitignoreFile)) {\n fs.renameSync(gitignoreFile, path.join(dstFolder, '.gitignore'))\n }\n if (options.name) {\n const sentioYamlPath = path.resolve(dstFolder, 'sentio.yaml')\n fs.writeFileSync(sentioYamlPath, 'project: ' + projectName + '\\n', { flag: 'w+' })\n\n const packageJsonPath = path.resolve(dstFolder, 'package.json')\n const packageJson = JSON.parse(fs.readFileSync(packageJsonPath, 'utf8'))\n\n const sdkVersion = '^' + (await latestVersion('@sentio/sdk'))\n packageJson.dependencies['@sentio/sdk'] = sdkVersion\n\n const cliVersion = '^' + (await latestVersion('@sentio/cli'))\n packageJson.devDependencies['@sentio/cli'] = cliVersion\n packageJson.name = projectName\n\n if (options.subproject) {\n delete packageJson.dependencies['@sentio/sdk']\n delete packageJson.devDependencies['@sentio/cli']\n }\n\n // Don't add directly to avoid deps issue\n packageJson.scripts.postinstall = 'sentio gen'\n\n fs.writeFileSync(packageJsonPath, JSON.stringify(packageJson, null, 2))\n }\n console.log(chalk.green(\"successfully create project '\" + projectName + \"'\"))\n }\n}\n"]}
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "license": "Apache-2.0",
4
4
  "private": false,
5
5
  "type": "module",
6
- "version": "2.0.0",
6
+ "version": "2.0.1-rc.1",
7
7
  "scripts": {
8
8
  "compile": "tsc",
9
9
  "build": "yarn compile",
@@ -99,6 +99,10 @@ export async function runCreate(argv: string[]) {
99
99
  },
100
100
  overwrite: false,
101
101
  })
102
+ const gitignoreFile = path.join(dstFolder, 'gitignore')
103
+ if (fs.existsSync(gitignoreFile)) {
104
+ fs.renameSync(gitignoreFile, path.join(dstFolder, '.gitignore'))
105
+ }
102
106
  if (options.name) {
103
107
  const sentioYamlPath = path.resolve(dstFolder, 'sentio.yaml')
104
108
  fs.writeFileSync(sentioYamlPath, 'project: ' + projectName + '\n', { flag: 'w+' })
@@ -0,0 +1,107 @@
1
+ .idea
2
+ src/types
3
+
4
+ # Logs
5
+ logs
6
+ *.log
7
+ npm-debug.log*
8
+ yarn-debug.log*
9
+ yarn-error.log*
10
+ lerna-debug.log*
11
+
12
+ # Diagnostic reports (https://nodejs.org/api/report.html)
13
+ report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
14
+
15
+ # Runtime data
16
+ pids
17
+ *.pid
18
+ *.seed
19
+ *.pid.lock
20
+
21
+ # Directory for instrumented libs generated by jscoverage/JSCover
22
+ lib-cov
23
+
24
+ # Coverage directory used by tools like istanbul
25
+ coverage
26
+ *.lcov
27
+
28
+ # nyc test coverage
29
+ .nyc_output
30
+
31
+ # Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
32
+ .grunt
33
+
34
+ # Bower dependency directory (https://bower.io/)
35
+ bower_components
36
+
37
+ # node-waf configuration
38
+ .lock-wscript
39
+
40
+ # Compiled binary addons (https://nodejs.org/api/addons.html)
41
+ build/Release
42
+
43
+ # Dependency directories
44
+ node_modules/
45
+ jspm_packages/
46
+
47
+ # TypeScript v1 declaration files
48
+ typings/
49
+
50
+ # TypeScript cache
51
+ *.tsbuildinfo
52
+
53
+ # Optional npm cache directory
54
+ .npm
55
+
56
+ # Optional eslint cache
57
+ .eslintcache
58
+
59
+ # Microbundle cache
60
+ .rpt2_cache/
61
+ .rts2_cache_cjs/
62
+ .rts2_cache_es/
63
+ .rts2_cache_umd/
64
+
65
+ # Optional REPL history
66
+ .node_repl_history
67
+
68
+ # Output of 'npm pack'
69
+ *.tgz
70
+
71
+ # Yarn Integrity file
72
+ .yarn-integrity
73
+
74
+ # dotenv environment variables file
75
+ .env
76
+ .env.test
77
+
78
+ # parcel-bundler cache (https://parceljs.org/)
79
+ .cache
80
+
81
+ # Next.js build output
82
+ .next
83
+
84
+ # Nuxt.js build / generate output
85
+ .nuxt
86
+ dist
87
+
88
+ # Gatsby files
89
+ .cache/
90
+ # Comment in the public line in if your project uses Gatsby and *not* Next.js
91
+ # https://nextjs.org/blog/next-9-1#public-directory-support
92
+ # public
93
+
94
+ # vuepress build output
95
+ .vuepress/dist
96
+
97
+ # Serverless directories
98
+ .serverless/
99
+
100
+ # FuseBox cache
101
+ .fusebox/
102
+
103
+ # DynamoDB Local files
104
+ .dynamodb/
105
+
106
+ # TernJS port file
107
+ .tern-port
@@ -0,0 +1,107 @@
1
+ .idea
2
+ src/types
3
+
4
+ # Logs
5
+ logs
6
+ *.log
7
+ npm-debug.log*
8
+ yarn-debug.log*
9
+ yarn-error.log*
10
+ lerna-debug.log*
11
+
12
+ # Diagnostic reports (https://nodejs.org/api/report.html)
13
+ report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
14
+
15
+ # Runtime data
16
+ pids
17
+ *.pid
18
+ *.seed
19
+ *.pid.lock
20
+
21
+ # Directory for instrumented libs generated by jscoverage/JSCover
22
+ lib-cov
23
+
24
+ # Coverage directory used by tools like istanbul
25
+ coverage
26
+ *.lcov
27
+
28
+ # nyc test coverage
29
+ .nyc_output
30
+
31
+ # Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
32
+ .grunt
33
+
34
+ # Bower dependency directory (https://bower.io/)
35
+ bower_components
36
+
37
+ # node-waf configuration
38
+ .lock-wscript
39
+
40
+ # Compiled binary addons (https://nodejs.org/api/addons.html)
41
+ build/Release
42
+
43
+ # Dependency directories
44
+ node_modules/
45
+ jspm_packages/
46
+
47
+ # TypeScript v1 declaration files
48
+ typings/
49
+
50
+ # TypeScript cache
51
+ *.tsbuildinfo
52
+
53
+ # Optional npm cache directory
54
+ .npm
55
+
56
+ # Optional eslint cache
57
+ .eslintcache
58
+
59
+ # Microbundle cache
60
+ .rpt2_cache/
61
+ .rts2_cache_cjs/
62
+ .rts2_cache_es/
63
+ .rts2_cache_umd/
64
+
65
+ # Optional REPL history
66
+ .node_repl_history
67
+
68
+ # Output of 'npm pack'
69
+ *.tgz
70
+
71
+ # Yarn Integrity file
72
+ .yarn-integrity
73
+
74
+ # dotenv environment variables file
75
+ .env
76
+ .env.test
77
+
78
+ # parcel-bundler cache (https://parceljs.org/)
79
+ .cache
80
+
81
+ # Next.js build output
82
+ .next
83
+
84
+ # Nuxt.js build / generate output
85
+ .nuxt
86
+ dist
87
+
88
+ # Gatsby files
89
+ .cache/
90
+ # Comment in the public line in if your project uses Gatsby and *not* Next.js
91
+ # https://nextjs.org/blog/next-9-1#public-directory-support
92
+ # public
93
+
94
+ # vuepress build output
95
+ .vuepress/dist
96
+
97
+ # Serverless directories
98
+ .serverless/
99
+
100
+ # FuseBox cache
101
+ .fusebox/
102
+
103
+ # DynamoDB Local files
104
+ .dynamodb/
105
+
106
+ # TernJS port file
107
+ .tern-port
@@ -0,0 +1,107 @@
1
+ .idea
2
+ src/types
3
+
4
+ # Logs
5
+ logs
6
+ *.log
7
+ npm-debug.log*
8
+ yarn-debug.log*
9
+ yarn-error.log*
10
+ lerna-debug.log*
11
+
12
+ # Diagnostic reports (https://nodejs.org/api/report.html)
13
+ report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
14
+
15
+ # Runtime data
16
+ pids
17
+ *.pid
18
+ *.seed
19
+ *.pid.lock
20
+
21
+ # Directory for instrumented libs generated by jscoverage/JSCover
22
+ lib-cov
23
+
24
+ # Coverage directory used by tools like istanbul
25
+ coverage
26
+ *.lcov
27
+
28
+ # nyc test coverage
29
+ .nyc_output
30
+
31
+ # Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
32
+ .grunt
33
+
34
+ # Bower dependency directory (https://bower.io/)
35
+ bower_components
36
+
37
+ # node-waf configuration
38
+ .lock-wscript
39
+
40
+ # Compiled binary addons (https://nodejs.org/api/addons.html)
41
+ build/Release
42
+
43
+ # Dependency directories
44
+ node_modules/
45
+ jspm_packages/
46
+
47
+ # TypeScript v1 declaration files
48
+ typings/
49
+
50
+ # TypeScript cache
51
+ *.tsbuildinfo
52
+
53
+ # Optional npm cache directory
54
+ .npm
55
+
56
+ # Optional eslint cache
57
+ .eslintcache
58
+
59
+ # Microbundle cache
60
+ .rpt2_cache/
61
+ .rts2_cache_cjs/
62
+ .rts2_cache_es/
63
+ .rts2_cache_umd/
64
+
65
+ # Optional REPL history
66
+ .node_repl_history
67
+
68
+ # Output of 'npm pack'
69
+ *.tgz
70
+
71
+ # Yarn Integrity file
72
+ .yarn-integrity
73
+
74
+ # dotenv environment variables file
75
+ .env
76
+ .env.test
77
+
78
+ # parcel-bundler cache (https://parceljs.org/)
79
+ .cache
80
+
81
+ # Next.js build output
82
+ .next
83
+
84
+ # Nuxt.js build / generate output
85
+ .nuxt
86
+ dist
87
+
88
+ # Gatsby files
89
+ .cache/
90
+ # Comment in the public line in if your project uses Gatsby and *not* Next.js
91
+ # https://nextjs.org/blog/next-9-1#public-directory-support
92
+ # public
93
+
94
+ # vuepress build output
95
+ .vuepress/dist
96
+
97
+ # Serverless directories
98
+ .serverless/
99
+
100
+ # FuseBox cache
101
+ .fusebox/
102
+
103
+ # DynamoDB Local files
104
+ .dynamodb/
105
+
106
+ # TernJS port file
107
+ .tern-port
@@ -0,0 +1,107 @@
1
+ .idea
2
+ src/types
3
+
4
+ # Logs
5
+ logs
6
+ *.log
7
+ npm-debug.log*
8
+ yarn-debug.log*
9
+ yarn-error.log*
10
+ lerna-debug.log*
11
+
12
+ # Diagnostic reports (https://nodejs.org/api/report.html)
13
+ report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
14
+
15
+ # Runtime data
16
+ pids
17
+ *.pid
18
+ *.seed
19
+ *.pid.lock
20
+
21
+ # Directory for instrumented libs generated by jscoverage/JSCover
22
+ lib-cov
23
+
24
+ # Coverage directory used by tools like istanbul
25
+ coverage
26
+ *.lcov
27
+
28
+ # nyc test coverage
29
+ .nyc_output
30
+
31
+ # Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
32
+ .grunt
33
+
34
+ # Bower dependency directory (https://bower.io/)
35
+ bower_components
36
+
37
+ # node-waf configuration
38
+ .lock-wscript
39
+
40
+ # Compiled binary addons (https://nodejs.org/api/addons.html)
41
+ build/Release
42
+
43
+ # Dependency directories
44
+ node_modules/
45
+ jspm_packages/
46
+
47
+ # TypeScript v1 declaration files
48
+ typings/
49
+
50
+ # TypeScript cache
51
+ *.tsbuildinfo
52
+
53
+ # Optional npm cache directory
54
+ .npm
55
+
56
+ # Optional eslint cache
57
+ .eslintcache
58
+
59
+ # Microbundle cache
60
+ .rpt2_cache/
61
+ .rts2_cache_cjs/
62
+ .rts2_cache_es/
63
+ .rts2_cache_umd/
64
+
65
+ # Optional REPL history
66
+ .node_repl_history
67
+
68
+ # Output of 'npm pack'
69
+ *.tgz
70
+
71
+ # Yarn Integrity file
72
+ .yarn-integrity
73
+
74
+ # dotenv environment variables file
75
+ .env
76
+ .env.test
77
+
78
+ # parcel-bundler cache (https://parceljs.org/)
79
+ .cache
80
+
81
+ # Next.js build output
82
+ .next
83
+
84
+ # Nuxt.js build / generate output
85
+ .nuxt
86
+ dist
87
+
88
+ # Gatsby files
89
+ .cache/
90
+ # Comment in the public line in if your project uses Gatsby and *not* Next.js
91
+ # https://nextjs.org/blog/next-9-1#public-directory-support
92
+ # public
93
+
94
+ # vuepress build output
95
+ .vuepress/dist
96
+
97
+ # Serverless directories
98
+ .serverless/
99
+
100
+ # FuseBox cache
101
+ .fusebox/
102
+
103
+ # DynamoDB Local files
104
+ .dynamodb/
105
+
106
+ # TernJS port file
107
+ .tern-port