@0xweb/hardhat 0.1.14 → 0.1.16

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.
@@ -0,0 +1,5 @@
1
+ {
2
+ "cSpell.words": [
3
+ "tsgen"
4
+ ]
5
+ }
package/lib/index.js CHANGED
@@ -142,7 +142,7 @@ const taskArgsStore = { compileAll: false };
142
142
  (0, config_1.task)(task_names_1.TASK_COMPILE, 'Compiles the entire project, building all artifacts')
143
143
  .addOptionalParam('sources', 'Override the sources directory')
144
144
  .addOptionalParam('artifacts', 'Override the artifacts output directory')
145
- .addOptionalParam('root', 'Overrides root directory. If sources is also overriden must be the sub-folder of the sources dir')
145
+ .addOptionalParam('root', 'Overrides root directory. If sources is also overridden must be the sub-folder of the sources dir')
146
146
  .addOptionalParam('watch', 'Re-runs compilation task on changes', false, {
147
147
  name: 'boolean',
148
148
  validate(argName, argumentValue) { },
@@ -155,9 +155,9 @@ const taskArgsStore = { compileAll: false };
155
155
  })
156
156
  .addOptionalParam('tsgen', 'Skip the TypeScript class generation', true, {
157
157
  name: 'boolean',
158
- validate(argName, argumentValue) { },
159
- parse(val) {
160
- if (val === '0' || val === 0 || val === false || val === 'false') {
158
+ validate(key, value) { },
159
+ parse(key, value) {
160
+ if (value === '0' || value === 0 || value === false || value === 'false') {
161
161
  return false;
162
162
  }
163
163
  return true;
@@ -168,6 +168,15 @@ const taskArgsStore = { compileAll: false };
168
168
  config['0xweb'].tsgen = false;
169
169
  }
170
170
  ConfigHelper.resetPaths(config.paths);
171
+ // Re-set Artifacts Path manually, as Hardhat initializes the Artifacts Instance before this task runs.
172
+ // Other paths (sources, cache) will be resolved later by hardhat from config
173
+ const artifactsInstance = artifacts;
174
+ if (artifactsInstance._artifactsPath == null) {
175
+ console.error(`Artifacts Internal interface was changed. Trying to set private _artifactsPath, but it doesn't exist.`);
176
+ }
177
+ // Clean artifacts from previous compile
178
+ artifactsInstance._validArtifacts = [];
179
+ artifactsInstance._artifactsPath = config.paths.artifacts;
171
180
  let { sources: sourcesDir, artifacts: artifactsDir, root: rootDir } = compilationArgs;
172
181
  if (rootDir != null) {
173
182
  rootDir = _path_1.$path.resolve(rootDir);
@@ -187,15 +196,7 @@ const taskArgsStore = { compileAll: false };
187
196
  if (artifactsDir) {
188
197
  artifactsDir = _path_1.$path.resolve(artifactsDir);
189
198
  config.paths.artifacts = artifactsDir;
190
- // Re-set Artifacts Path manually, as Hardhat initializes the Artifacts Instance before this task runs.
191
- // Other paths (sources, cache) will be resolved later by hardhat from config
192
- const artifactsInstance = artifacts;
193
- if (artifactsInstance._artifactsPath == null) {
194
- console.error(`Articats Internal interface was changed. Trying to set private _artifactsPath, but it doesn't exist.`);
195
- }
196
199
  artifactsInstance._artifactsPath = artifactsDir;
197
- // Clean artifacts from previous compile
198
- artifactsInstance._validArtifacts = [];
199
200
  }
200
201
  if (compilationArgs.watch) {
201
202
  const directory = `file://${config.paths.sources}/`;
@@ -248,7 +249,7 @@ const taskArgsStore = { compileAll: false };
248
249
  await runSuper();
249
250
  });
250
251
  async function getCompiledAbis(config, compileSolOutput) {
251
- const emitedArtifacts = (0, alot_1.default)(compileSolOutput.artifactsEmittedPerJob).mapMany((a) => {
252
+ const emittedArtifacts = (0, alot_1.default)(compileSolOutput.artifactsEmittedPerJob).mapMany((a) => {
252
253
  return (0, alot_1.default)(a.artifactsEmittedPerFile).mapMany((artifactPerFile) => {
253
254
  return (0, alot_1.default)(artifactPerFile.artifactsEmitted).map((artifactName) => {
254
255
  return {
@@ -260,7 +261,7 @@ async function getCompiledAbis(config, compileSolOutput) {
260
261
  .toArray();
261
262
  }).toArray();
262
263
  }).toArray();
263
- let namesHash = (0, alot_1.default)(emitedArtifacts).toDictionary(x => x.name);
264
+ let namesHash = (0, alot_1.default)(emittedArtifacts).toDictionary(x => x.name);
264
265
  let files = await atma_io_1.Directory.readFilesAsync(`file://${config.paths.artifacts}/`, '**.json');
265
266
  let compileAll = taskArgsStore.compileAll;
266
267
  let arr = files
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@0xweb/hardhat",
3
3
  "description": "Hardhat plugin for 0xweb",
4
- "version": "0.1.14",
4
+ "version": "0.1.16",
5
5
  "main": "./lib/index.js",
6
6
  "author": {
7
7
  "name": "Alex Kit",
@@ -18,7 +18,7 @@
18
18
  ],
19
19
  "license": "MIT",
20
20
  "dependencies": {
21
- "0xweb": "^0.9.25",
21
+ "0xweb": "^0.9.91",
22
22
  "alot": "^0.3.0",
23
23
  "atma-io": "^1.2.65",
24
24
  "memd": "^0.3.10"