ic-mops 1.6.0 → 1.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/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Mops CLI Changelog
2
2
 
3
+ ## 1.7.0
4
+ - Add support for `actor class` detection to run replica tests in `mops test` command
5
+
6
+ ## 1.6.1
7
+ - Fix `mops i` alias for `mops install` command (was broken in 1.3.0)
8
+
3
9
  ## 1.6.0
4
10
  - Add support for `.bash_profile` and `.zprofile` files to `mops toolchain init` command
5
11
 
package/bundle/cli.tgz CHANGED
Binary file
package/cli.ts CHANGED
@@ -99,7 +99,7 @@ program
99
99
  .option('--verbose')
100
100
  .addOption(new Option('--lock <action>', 'Lockfile action').choices(['check', 'update', 'ignore']))
101
101
  .action(async (options) => {
102
- if (process.argv.at(-1) !== 'install') {
102
+ if (process.argv.at(-1) !== 'install' && process.argv.at(-1) !== 'i') {
103
103
  console.log(`${chalk.red('Error:')} ${chalk.yellow('mops install')} command installs all dependencies.\nUse ${chalk.green(`mops add ${process.argv.at(-1)}`)} instead.`);
104
104
  process.exit(1);
105
105
  }
@@ -234,7 +234,7 @@ export async function testWithReporter(reporterName : ReporterName | Reporter |
234
234
  if (lines.includes('// @testmode wasi')) {
235
235
  mode = 'wasi';
236
236
  }
237
- else if (lines.includes('actor {') || lines.includes('// @testmode replica')) {
237
+ else if (lines.includes('actor {') || lines.includes('// @testmode replica') || lines.find(line => line.startsWith('actor class'))) {
238
238
  mode = 'replica';
239
239
  }
240
240
 
package/dist/cli.js CHANGED
@@ -81,7 +81,7 @@ program
81
81
  .option('--verbose')
82
82
  .addOption(new Option('--lock <action>', 'Lockfile action').choices(['check', 'update', 'ignore']))
83
83
  .action(async (options) => {
84
- if (process.argv.at(-1) !== 'install') {
84
+ if (process.argv.at(-1) !== 'install' && process.argv.at(-1) !== 'i') {
85
85
  console.log(`${chalk.red('Error:')} ${chalk.yellow('mops install')} command installs all dependencies.\nUse ${chalk.green(`mops add ${process.argv.at(-1)}`)} instead.`);
86
86
  process.exit(1);
87
87
  }
@@ -182,7 +182,7 @@ export async function testWithReporter(reporterName, filter = '', defaultMode =
182
182
  if (lines.includes('// @testmode wasi')) {
183
183
  mode = 'wasi';
184
184
  }
185
- else if (lines.includes('actor {') || lines.includes('// @testmode replica')) {
185
+ else if (lines.includes('actor {') || lines.includes('// @testmode replica') || lines.find(line => line.startsWith('actor class'))) {
186
186
  mode = 'replica';
187
187
  }
188
188
  if (mode === 'wasi' && !wasmtimePath) {
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ic-mops",
3
- "version": "1.6.0",
3
+ "version": "1.7.0",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "mops": "bin/mops.js",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ic-mops",
3
- "version": "1.6.0",
3
+ "version": "1.7.0",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "mops": "dist/bin/mops.js",