ic-mops 1.0.0 → 1.0.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.
- package/CHANGELOG.md +3 -0
- package/bundle/cli.tgz +0 -0
- package/cli.ts +39 -47
- package/dist/cli.js +34 -43
- package/dist/package.json +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/bundle/cli.tgz
CHANGED
|
Binary file
|
package/cli.ts
CHANGED
|
@@ -25,7 +25,6 @@ import {toolchain} from './commands/toolchain/index.js';
|
|
|
25
25
|
import {Tool} from './types.js';
|
|
26
26
|
import * as self from './commands/self.js';
|
|
27
27
|
import {resolvePackages} from './resolve-packages.js';
|
|
28
|
-
// import {docs} from './commands/docs.js';
|
|
29
28
|
|
|
30
29
|
declare global {
|
|
31
30
|
// eslint-disable-next-line no-var
|
|
@@ -152,16 +151,6 @@ program
|
|
|
152
151
|
console.log(getNetwork());
|
|
153
152
|
});
|
|
154
153
|
|
|
155
|
-
// user import
|
|
156
|
-
program
|
|
157
|
-
.command('mops user import <data>')
|
|
158
|
-
.description('Import .pem file data to use as identity')
|
|
159
|
-
.addOption(new Option('--no-encrypt', 'Do not ask for a password to encrypt identity'))
|
|
160
|
-
.action(async (data, options) => {
|
|
161
|
-
await importPem(data, options);
|
|
162
|
-
await getPrincipal();
|
|
163
|
-
});
|
|
164
|
-
|
|
165
154
|
// sources
|
|
166
155
|
program
|
|
167
156
|
.command('sources')
|
|
@@ -180,14 +169,6 @@ program
|
|
|
180
169
|
console.log(sourcesArr.join('\n'));
|
|
181
170
|
});
|
|
182
171
|
|
|
183
|
-
// get-principal
|
|
184
|
-
program
|
|
185
|
-
.command('get-principal')
|
|
186
|
-
.description('Print your principal')
|
|
187
|
-
.action(async () => {
|
|
188
|
-
await getPrincipal();
|
|
189
|
-
});
|
|
190
|
-
|
|
191
172
|
// search
|
|
192
173
|
program
|
|
193
174
|
.command('search <text>')
|
|
@@ -256,37 +237,48 @@ program
|
|
|
256
237
|
await template();
|
|
257
238
|
});
|
|
258
239
|
|
|
259
|
-
//
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
//
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
// user
|
|
271
|
-
|
|
272
|
-
.command('
|
|
273
|
-
.
|
|
240
|
+
// mops user *
|
|
241
|
+
const userCommand = new Command('user').description('User management');
|
|
242
|
+
|
|
243
|
+
// user get-principal
|
|
244
|
+
userCommand
|
|
245
|
+
.command('get-principal')
|
|
246
|
+
.description('Print your principal')
|
|
247
|
+
.action(async () => {
|
|
248
|
+
await getPrincipal();
|
|
249
|
+
});
|
|
250
|
+
|
|
251
|
+
// user import
|
|
252
|
+
userCommand
|
|
253
|
+
.command('import <data>')
|
|
254
|
+
.description('Import .pem file data to use as identity')
|
|
255
|
+
.addOption(new Option('--no-encrypt', 'Do not ask for a password to encrypt identity'))
|
|
256
|
+
.action(async (data, options) => {
|
|
257
|
+
await importPem(data, options);
|
|
258
|
+
await getPrincipal();
|
|
259
|
+
});
|
|
260
|
+
|
|
261
|
+
// user set <prop> <value>
|
|
262
|
+
userCommand
|
|
263
|
+
.command('set')
|
|
274
264
|
.addArgument(new Argument('<prop>').choices(['name', 'site', 'email', 'github', 'twitter']))
|
|
275
|
-
.addArgument(new Argument('
|
|
276
|
-
.description('
|
|
277
|
-
.action(async (
|
|
278
|
-
|
|
279
|
-
await getUserProp(prop);
|
|
280
|
-
}
|
|
281
|
-
else if (sub == 'set') {
|
|
282
|
-
if (!value) {
|
|
283
|
-
console.log('error: missing required argument "value"');
|
|
284
|
-
return;
|
|
285
|
-
}
|
|
286
|
-
await setUserProp(prop, value);
|
|
287
|
-
}
|
|
265
|
+
.addArgument(new Argument('<value>'))
|
|
266
|
+
.description('Set user property')
|
|
267
|
+
.action(async (prop, value) => {
|
|
268
|
+
await setUserProp(prop, value);
|
|
288
269
|
});
|
|
289
270
|
|
|
271
|
+
// user get <prop>
|
|
272
|
+
userCommand
|
|
273
|
+
.command('get')
|
|
274
|
+
.addArgument(new Argument('<prop>').choices(['name', 'site', 'email', 'github', 'twitter']))
|
|
275
|
+
.description('Get user property')
|
|
276
|
+
.action(async (prop) => {
|
|
277
|
+
await getUserProp(prop);
|
|
278
|
+
});
|
|
279
|
+
|
|
280
|
+
program.addCommand(userCommand);
|
|
281
|
+
|
|
290
282
|
// bump
|
|
291
283
|
program
|
|
292
284
|
.command('bump [major|minor|patch]')
|
package/dist/cli.js
CHANGED
|
@@ -125,15 +125,6 @@ program
|
|
|
125
125
|
.action(async () => {
|
|
126
126
|
console.log(getNetwork());
|
|
127
127
|
});
|
|
128
|
-
// user import
|
|
129
|
-
program
|
|
130
|
-
.command('mops user import <data>')
|
|
131
|
-
.description('Import .pem file data to use as identity')
|
|
132
|
-
.addOption(new Option('--no-encrypt', 'Do not ask for a password to encrypt identity'))
|
|
133
|
-
.action(async (data, options) => {
|
|
134
|
-
await importPem(data, options);
|
|
135
|
-
await getPrincipal();
|
|
136
|
-
});
|
|
137
128
|
// sources
|
|
138
129
|
program
|
|
139
130
|
.command('sources')
|
|
@@ -151,13 +142,6 @@ program
|
|
|
151
142
|
let sourcesArr = await sources(options);
|
|
152
143
|
console.log(sourcesArr.join('\n'));
|
|
153
144
|
});
|
|
154
|
-
// get-principal
|
|
155
|
-
program
|
|
156
|
-
.command('get-principal')
|
|
157
|
-
.description('Print your principal')
|
|
158
|
-
.action(async () => {
|
|
159
|
-
await getPrincipal();
|
|
160
|
-
});
|
|
161
145
|
// search
|
|
162
146
|
program
|
|
163
147
|
.command('search <text>')
|
|
@@ -221,35 +205,42 @@ program
|
|
|
221
205
|
}
|
|
222
206
|
await template();
|
|
223
207
|
});
|
|
224
|
-
//
|
|
225
|
-
|
|
226
|
-
//
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
//
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
.
|
|
237
|
-
.
|
|
208
|
+
// mops user *
|
|
209
|
+
const userCommand = new Command('user').description('User management');
|
|
210
|
+
// user get-principal
|
|
211
|
+
userCommand
|
|
212
|
+
.command('get-principal')
|
|
213
|
+
.description('Print your principal')
|
|
214
|
+
.action(async () => {
|
|
215
|
+
await getPrincipal();
|
|
216
|
+
});
|
|
217
|
+
// user import
|
|
218
|
+
userCommand
|
|
219
|
+
.command('import <data>')
|
|
220
|
+
.description('Import .pem file data to use as identity')
|
|
221
|
+
.addOption(new Option('--no-encrypt', 'Do not ask for a password to encrypt identity'))
|
|
222
|
+
.action(async (data, options) => {
|
|
223
|
+
await importPem(data, options);
|
|
224
|
+
await getPrincipal();
|
|
225
|
+
});
|
|
226
|
+
// user set <prop> <value>
|
|
227
|
+
userCommand
|
|
228
|
+
.command('set')
|
|
238
229
|
.addArgument(new Argument('<prop>').choices(['name', 'site', 'email', 'github', 'twitter']))
|
|
239
|
-
.addArgument(new Argument('
|
|
240
|
-
.description('
|
|
241
|
-
.action(async (
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
}
|
|
230
|
+
.addArgument(new Argument('<value>'))
|
|
231
|
+
.description('Set user property')
|
|
232
|
+
.action(async (prop, value) => {
|
|
233
|
+
await setUserProp(prop, value);
|
|
234
|
+
});
|
|
235
|
+
// user get <prop>
|
|
236
|
+
userCommand
|
|
237
|
+
.command('get')
|
|
238
|
+
.addArgument(new Argument('<prop>').choices(['name', 'site', 'email', 'github', 'twitter']))
|
|
239
|
+
.description('Get user property')
|
|
240
|
+
.action(async (prop) => {
|
|
241
|
+
await getUserProp(prop);
|
|
252
242
|
});
|
|
243
|
+
program.addCommand(userCommand);
|
|
253
244
|
// bump
|
|
254
245
|
program
|
|
255
246
|
.command('bump [major|minor|patch]')
|
package/dist/package.json
CHANGED