ic-mops 0.6.2 → 0.6.3

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.
Files changed (2) hide show
  1. package/cli.js +51 -0
  2. package/package.json +1 -1
package/cli.js CHANGED
@@ -113,6 +113,7 @@ program
113
113
  .description('for dfx packtool')
114
114
  .option('--verbose')
115
115
  .action(async (options) => {
116
+ await installAll({silent: true});
116
117
  await sources(options);
117
118
  });
118
119
 
@@ -166,6 +167,56 @@ program
166
167
  // child_process.execSync('node -v', {stdio: 'inherit'});
167
168
  });
168
169
 
170
+ program
171
+ .command('sp <e>')
172
+ .action((e) => {
173
+ console.log('...');
174
+ let [proc, ...args] = e.split(' ');
175
+ let child = child_process.spawn(proc, args, {stdio: ['inherit', 'ignore', 'inherit'], detached: true});
176
+ // child.unref();
177
+ child.addListener('exit', (code) => {
178
+ if (code === 0) {
179
+ console.log('ok');
180
+ }
181
+ else {
182
+ console.log('err');
183
+ }
184
+ });
185
+ });
186
+
187
+ program
188
+ .command('spd <e>')
189
+ .action((e) => {
190
+ console.log('...');
191
+ let [proc, ...args] = e.split(' ');
192
+ child_process.spawn(proc, args, {stdio: ['inherit', 'ignore', 'inherit'], detached: true});
193
+ });
194
+
195
+ program
196
+ .command('spu <e>')
197
+ .action((e) => {
198
+ console.log('...');
199
+ let [proc, ...args] = e.split(' ');
200
+ let child = child_process.spawn(proc, args, {stdio: ['inherit', 'inherit', 'inherit'], detached: true});
201
+ child.unref();
202
+ });
203
+
204
+ program
205
+ .command('sh <e>')
206
+ .action((e) => {
207
+ console.log('...');
208
+ let [proc, ...args] = e.split(' ');
209
+ let child = child_process.spawn(proc, args, {stdio: ['inherit', 'inherit', 'inherit'], detached: false, shell: true});
210
+ });
211
+
212
+ program
213
+ .command('shd <e>')
214
+ .action((e) => {
215
+ console.log('...');
216
+ let [proc, ...args] = e.split(' ');
217
+ let child = child_process.spawn(proc, args, {stdio: ['inherit', 'inherit', 'inherit'], detached: true, shell: true});
218
+ });
219
+
169
220
  program
170
221
  .command('es <e>')
171
222
  .action((e) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ic-mops",
3
- "version": "0.6.2",
3
+ "version": "0.6.3",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "mops": "cli.js"