ic-mops 0.6.1 → 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.
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/commands/install.js
CHANGED
|
@@ -39,6 +39,7 @@ export async function install(pkg, version = '', {verbose, silent, dep} = {}) {
|
|
|
39
39
|
}
|
|
40
40
|
// copy from cache
|
|
41
41
|
else if (isCached(`${pkg}@${version}`)) {
|
|
42
|
+
actor.notifyInstall(pkg, version);
|
|
42
43
|
await copyCache(`${pkg}@${version}`, dir);
|
|
43
44
|
silent || logUpdate(`${dep ? 'Dependency' : 'Installing'} ${pkg}@${version} (cache)`);
|
|
44
45
|
}
|
|
@@ -58,6 +58,7 @@ type PackageDetails =
|
|
|
58
58
|
record {
|
|
59
59
|
config: PackageConfigV2__1;
|
|
60
60
|
downloadsInLast30Days: nat;
|
|
61
|
+
downloadsInLast7Days: nat;
|
|
61
62
|
downloadsTotal: nat;
|
|
62
63
|
owner: principal;
|
|
63
64
|
publication: PackagePublication;
|
|
@@ -118,6 +119,7 @@ service : {
|
|
|
118
119
|
getFileIds: (PackageName__1, Ver) -> (Result_5) query;
|
|
119
120
|
getHighestVersion: (PackageName__1) -> (Result_4) query;
|
|
120
121
|
getMostDownloadedPackages: () -> (vec PackageDetails) query;
|
|
122
|
+
getMostDownloadedPackagesIn7Days: () -> (vec PackageDetails) query;
|
|
121
123
|
getPackageDetails: (PackageName__1, Ver) -> (Result_3) query;
|
|
122
124
|
getRecentlyUpdatedPackages: () -> (vec PackageDetails) query;
|
|
123
125
|
getStoragesStats: () -> (vec record {
|
|
@@ -48,6 +48,7 @@ export interface PackageDetails {
|
|
|
48
48
|
'owner' : Principal,
|
|
49
49
|
'downloadsTotal' : bigint,
|
|
50
50
|
'downloadsInLast30Days' : bigint,
|
|
51
|
+
'downloadsInLast7Days' : bigint,
|
|
51
52
|
'config' : PackageConfigV2__1,
|
|
52
53
|
'publication' : PackagePublication,
|
|
53
54
|
}
|
|
@@ -93,6 +94,7 @@ export interface _SERVICE {
|
|
|
93
94
|
'getFileIds' : ActorMethod<[PackageName__1, Ver], Result_5>,
|
|
94
95
|
'getHighestVersion' : ActorMethod<[PackageName__1], Result_4>,
|
|
95
96
|
'getMostDownloadedPackages' : ActorMethod<[], Array<PackageDetails>>,
|
|
97
|
+
'getMostDownloadedPackagesIn7Days' : ActorMethod<[], Array<PackageDetails>>,
|
|
96
98
|
'getPackageDetails' : ActorMethod<[PackageName__1, Ver], Result_3>,
|
|
97
99
|
'getRecentlyUpdatedPackages' : ActorMethod<[], Array<PackageDetails>>,
|
|
98
100
|
'getStoragesStats' : ActorMethod<[], Array<[StorageId, StorageStats]>>,
|
|
@@ -44,6 +44,7 @@ export const idlFactory = ({ IDL }) => {
|
|
|
44
44
|
'owner' : IDL.Principal,
|
|
45
45
|
'downloadsTotal' : IDL.Nat,
|
|
46
46
|
'downloadsInLast30Days' : IDL.Nat,
|
|
47
|
+
'downloadsInLast7Days' : IDL.Nat,
|
|
47
48
|
'config' : PackageConfigV2__1,
|
|
48
49
|
'publication' : PackagePublication,
|
|
49
50
|
});
|
|
@@ -90,6 +91,11 @@ export const idlFactory = ({ IDL }) => {
|
|
|
90
91
|
[IDL.Vec(PackageDetails)],
|
|
91
92
|
['query'],
|
|
92
93
|
),
|
|
94
|
+
'getMostDownloadedPackagesIn7Days' : IDL.Func(
|
|
95
|
+
[],
|
|
96
|
+
[IDL.Vec(PackageDetails)],
|
|
97
|
+
['query'],
|
|
98
|
+
),
|
|
93
99
|
'getPackageDetails' : IDL.Func(
|
|
94
100
|
[PackageName__1, Ver],
|
|
95
101
|
[Result_3],
|