ic-mops 0.10.0 → 0.11.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/commands/docs.js CHANGED
@@ -33,6 +33,10 @@ export async function docs({silent} = {}) {
33
33
  // stdout
34
34
  proc.stdout.on('data', (data) => {
35
35
  let text = data.toString().trim();
36
+ let failedText = 'Failed to extract documentation';
37
+ if (text.includes(failedText)) {
38
+ console.log(text.replaceAll(failedText, chalk.yellow('Warning: ') + failedText));
39
+ }
36
40
  silent || console.log('stdout', text);
37
41
  });
38
42
 
@@ -67,7 +71,11 @@ export async function docs({silent} = {}) {
67
71
  });
68
72
 
69
73
  // create archive
70
- let files = glob.sync(`${docsDir}/**/*.adoc`).map(f => path.relative(docsDir, f));
74
+ let ignore = [
75
+ `${docsDir}/**/*.test.adoc`,
76
+ `${docsDir}/test/**/*`,
77
+ ];
78
+ let files = glob.sync(`${docsDir}/**/*.adoc`, {ignore}).map(f => path.relative(docsDir, f));
71
79
  if (files.length) {
72
80
  let stream = tar.create(
73
81
  {
package/commands/test.js CHANGED
@@ -53,7 +53,7 @@ export async function test(filter = '', {watch = false} = {}) {
53
53
  }
54
54
  }
55
55
 
56
- let dfxCache;
56
+ let mocPath = process.env.DFX_MOC_PATH;
57
57
 
58
58
  export async function runAll(filter = '') {
59
59
  let start = Date.now();
@@ -93,8 +93,9 @@ export async function runAll(filter = '') {
93
93
  let passed = 0;
94
94
  let skipped = 0;
95
95
  let sourcesArr = await sources();
96
- if (!dfxCache) {
97
- dfxCache = execSync('dfx cache show').toString().trim();
96
+
97
+ if (!mocPath) {
98
+ mocPath = execSync('dfx cache show').toString().trim() + '/moc';
98
99
  }
99
100
 
100
101
  for (let file of files) {
@@ -104,7 +105,7 @@ export async function runAll(filter = '') {
104
105
  file !== files[0] && console.log('-'.repeat(50));
105
106
  console.log(`Running ${chalk.gray(absToRel(file))}`);
106
107
 
107
- let proc = spawn(`${dfxCache}/moc`, ['-r', '-wasi-system-api', '-ref-system-api', '--hide-warnings', '--error-detail=2', ...sourcesArr.join(' ').split(' '), file]);
108
+ let proc = spawn(mocPath, ['-r', '-wasi-system-api', '-ref-system-api', '--hide-warnings', '--error-detail=2', ...sourcesArr.join(' ').split(' '), file]);
108
109
 
109
110
  // stdout
110
111
  proc.stdout.on('data', (data) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ic-mops",
3
- "version": "0.10.0",
3
+ "version": "0.11.0",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "mops": "cli.js"