ic-mops 0.34.4 → 0.35.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.
Files changed (48) hide show
  1. package/cli.ts +9 -44
  2. package/commands/add.ts +7 -5
  3. package/commands/install-all.ts +4 -4
  4. package/commands/remove.ts +4 -4
  5. package/commands/sync.ts +5 -5
  6. package/commands/update.ts +3 -3
  7. package/declarations/main/main.did +67 -78
  8. package/declarations/main/main.did.d.ts +72 -83
  9. package/declarations/main/main.did.js +12 -23
  10. package/dist/bin/mops.d.ts +2 -0
  11. package/dist/bin/mops.js +2 -0
  12. package/dist/cli.js +9 -43
  13. package/dist/commands/add.d.ts +2 -2
  14. package/dist/commands/add.js +6 -3
  15. package/dist/commands/install-all.d.ts +2 -2
  16. package/dist/commands/install-all.js +3 -3
  17. package/dist/commands/remove.d.ts +2 -2
  18. package/dist/commands/remove.js +3 -2
  19. package/dist/commands/sync.d.ts +2 -2
  20. package/dist/commands/sync.js +4 -4
  21. package/dist/commands/toolchain/moc.d.ts +4 -0
  22. package/dist/commands/toolchain/moc.js +36 -0
  23. package/dist/commands/toolchain/mocv.d.ts +1 -0
  24. package/dist/commands/toolchain/mocv.js +272 -0
  25. package/dist/commands/toolchain/toolchain-utils.d.ts +3 -0
  26. package/dist/commands/toolchain/toolchain-utils.js +56 -0
  27. package/dist/commands/toolchain/wasmtime.d.ts +4 -0
  28. package/dist/commands/toolchain/wasmtime.js +23 -0
  29. package/dist/commands/update.d.ts +2 -2
  30. package/dist/commands/update.js +2 -2
  31. package/dist/declarations/main/main.did +67 -78
  32. package/dist/declarations/main/main.did.d.ts +72 -83
  33. package/dist/declarations/main/main.did.js +12 -23
  34. package/dist/integrity.d.ts +2 -2
  35. package/dist/integrity.js +4 -4
  36. package/dist/moc-wrapper.d.ts +2 -0
  37. package/dist/moc-wrapper.js +8 -0
  38. package/dist/out/cli.d.ts +2 -0
  39. package/dist/out/cli.js +115242 -0
  40. package/dist/package.json +1 -1
  41. package/dist/templates/cli.d.ts +2 -0
  42. package/dist/templates/cli.js +3660 -0
  43. package/integrity.ts +5 -5
  44. package/package.json +1 -1
  45. package/dist/helpers/download-package-files.d.ts +0 -12
  46. package/dist/helpers/download-package-files.js +0 -62
  47. package/dist/helpers/resolve-version.d.ts +0 -1
  48. package/dist/helpers/resolve-version.js +0 -11
package/cli.ts CHANGED
@@ -3,15 +3,13 @@
3
3
  import fs from 'node:fs';
4
4
  import {program, Argument, Option} from 'commander';
5
5
  import chalk from 'chalk';
6
- import {Principal} from '@dfinity/principal';
7
6
 
8
7
  import {init} from './commands/init.js';
9
8
  import {publish} from './commands/publish.js';
10
9
  import {importPem} from './commands/import-identity.js';
11
10
  import {sources} from './commands/sources.js';
12
- import {checkApiCompatibility, setNetwork, apiVersion, checkConfigFile, getNetworkFile, getIdentity} from './mops.js';
11
+ import {checkApiCompatibility, setNetwork, apiVersion, checkConfigFile, getNetworkFile} from './mops.js';
13
12
  import {getNetwork} from './api/network.js';
14
- import {mainActor} from './api/actors.js';
15
13
  import {whoami} from './commands/whoami.js';
16
14
  import {installAll} from './commands/install-all.js';
17
15
  import {search} from './commands/search.js';
@@ -62,7 +60,7 @@ program
62
60
  .description('Install the package and save it to mops.toml')
63
61
  .option('--dev')
64
62
  .option('--verbose')
65
- .addOption(new Option('--lockfile <lockfile>', 'Lockfile action').choices(['save', 'ignore']))
63
+ .addOption(new Option('--lock <action>', 'Lockfile action').choices(['update', 'ignore']))
66
64
  .action(async (pkg, options) => {
67
65
  if (!checkConfigFile()) {
68
66
  process.exit(1);
@@ -78,7 +76,7 @@ program
78
76
  .option('--dev', 'Remove from dev-dependencies instead of dependencies')
79
77
  .option('--verbose', 'Show more information')
80
78
  .option('--dry-run', 'Do not actually remove anything')
81
- .addOption(new Option('--lockfile <lockfile>', 'Lockfile action').choices(['save', 'ignore']))
79
+ .addOption(new Option('--lock <action>', 'Lockfile action').choices(['update', 'ignore']))
82
80
  .action(async (pkg, options) => {
83
81
  if (!checkConfigFile()) {
84
82
  process.exit(1);
@@ -92,7 +90,7 @@ program
92
90
  .alias('i')
93
91
  .description('Install all dependencies specified in mops.toml')
94
92
  .option('--verbose')
95
- .addOption(new Option('--lockfile <lockfile>', 'Lockfile action').choices(['save', 'check', 'ignore']))
93
+ .addOption(new Option('--lock <action>', 'Lockfile action').choices(['check', 'update', 'ignore']))
96
94
  .action(async (pkg, options) => {
97
95
  if (!checkConfigFile()) {
98
96
  process.exit(1);
@@ -167,7 +165,7 @@ program
167
165
  if (!checkConfigFile()) {
168
166
  process.exit(1);
169
167
  }
170
- await installAll({silent: true, lockfile: 'ignore'});
168
+ await installAll({silent: true, lock: 'ignore'});
171
169
  let sourcesArr = await sources(options);
172
170
  console.log(sourcesArr.join('\n'));
173
171
  });
@@ -212,7 +210,7 @@ program
212
210
  .addOption(new Option('--mode <mode>', 'Test mode').choices(['interpreter', 'wasi']).default('interpreter'))
213
211
  .option('-w, --watch', 'Enable watch mode')
214
212
  .action(async (filter, options) => {
215
- await installAll({silent: true, lockfile: 'ignore'});
213
+ await installAll({silent: true, lock: 'ignore'});
216
214
  await test(filter, options);
217
215
  });
218
216
 
@@ -226,7 +224,7 @@ program
226
224
  // .addOption(new Option('--force-gc', 'Force GC'))
227
225
  .addOption(new Option('--verbose', 'Show more information'))
228
226
  .action(async (filter, options) => {
229
- await installAll({silent: true, lockfile: 'ignore'});
227
+ await installAll({silent: true, lock: 'ignore'});
230
228
  await bench(filter, options);
231
229
  });
232
230
 
@@ -287,39 +285,6 @@ program
287
285
  }
288
286
  });
289
287
 
290
- // temp: airdrop
291
- program
292
- .command('airdrop <check|claim> [canister]')
293
- .action(async (sub, canister) => {
294
- let identity = await getIdentity();
295
- let main = await mainActor(identity);
296
- if (sub === 'check') {
297
- let amount = await main.getAirdropAmount();
298
- if (amount === 0n) {
299
- console.log('No airdrop available');
300
- return;
301
- }
302
- console.log(`You can claim ${Number(amount) / 1_000_000_000_000} TCycles`);
303
- }
304
- else if (sub === 'claim') {
305
- let principal;
306
- try {
307
- principal = Principal.fromText(canister);
308
- }
309
- catch (err) {
310
- console.log('Invalid canister id');
311
- console.log(err);
312
- return;
313
- }
314
- console.log('Sending cycles to the canister ' + canister);
315
- let res = await main.claimAirdrop(principal);
316
- console.log(res);
317
- }
318
- else {
319
- console.log('Unknown sub command. Available sub commands: check, claim');
320
- }
321
- });
322
-
323
288
  // bump
324
289
  program
325
290
  .command('bump [major|minor|patch]')
@@ -332,7 +297,7 @@ program
332
297
  program
333
298
  .command('sync')
334
299
  .description('Add missing packages and remove unused packages')
335
- .addOption(new Option('--lockfile <lockfile>', 'Lockfile action').choices(['save', 'ignore']))
300
+ .addOption(new Option('--lock <action>', 'Lockfile action').choices(['update', 'ignore']))
336
301
  .action(async (options) => {
337
302
  await sync(options);
338
303
  });
@@ -349,7 +314,7 @@ program
349
314
  program
350
315
  .command('update [pkg]')
351
316
  .description('Update dependencies specified in mops.toml')
352
- .addOption(new Option('--lockfile <lockfile>', 'Lockfile action').choices(['save', 'ignore']))
317
+ .addOption(new Option('--lock <action>', 'Lockfile action').choices(['update', 'ignore']))
353
318
  .action(async (pkg, options) => {
354
319
  await update(pkg, options);
355
320
  });
package/commands/add.ts CHANGED
@@ -6,16 +6,16 @@ import {getHighestVersion} from '../api/getHighestVersion.js';
6
6
  import {installFromGithub} from '../vessel.js';
7
7
  import {install} from './install.js';
8
8
  import {notifyInstalls} from '../notify-installs.js';
9
- // import {checkIntegrity} from '../integrity.js';
9
+ import {checkIntegrity} from '../integrity.js';
10
10
 
11
11
  type AddOptions = {
12
12
  verbose?: boolean;
13
13
  dev?: boolean;
14
- lockfile?: 'save' | 'ignore';
14
+ lock?: 'update' | 'ignore';
15
15
  };
16
16
 
17
17
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
18
- export async function add(name: string, {verbose = false, dev = false, lockfile}: AddOptions = {}, asName?: string) {
18
+ export async function add(name: string, {verbose = false, dev = false, lock}: AddOptions = {}, asName?: string) {
19
19
  if (!checkConfigFile()) {
20
20
  return;
21
21
  }
@@ -109,10 +109,12 @@ export async function add(name: string, {verbose = false, dev = false, lockfile}
109
109
 
110
110
  writeConfig(config);
111
111
 
112
- // logUpdate('Checking integrity...');
112
+ if (lock !== 'ignore') {
113
+ logUpdate('Checking integrity...');
114
+ }
113
115
  await Promise.all([
114
116
  notifyInstalls(Object.keys(installedPackages)),
115
- // checkIntegrity(lockfile),
117
+ checkIntegrity(lock),
116
118
  ]);
117
119
 
118
120
  logUpdate.clear();
@@ -9,10 +9,10 @@ import {checkIntegrity} from '../integrity.js';
9
9
  type InstallAllOptions = {
10
10
  verbose?: boolean;
11
11
  silent?: boolean;
12
- lockfile?: 'save' | 'check' | 'ignore';
12
+ lock?: 'check' | 'update' | 'ignore';
13
13
  }
14
14
 
15
- export async function installAll({verbose = false, silent = false, lockfile}: InstallAllOptions = {}) {
15
+ export async function installAll({verbose = false, silent = false, lock}: InstallAllOptions = {}) {
16
16
  if (!checkConfigFile()) {
17
17
  return;
18
18
  }
@@ -36,12 +36,12 @@ export async function installAll({verbose = false, silent = false, lockfile}: In
36
36
  }
37
37
  }
38
38
 
39
- if (!silent && lockfile !== 'ignore') {
39
+ if (!silent && lock !== 'ignore') {
40
40
  logUpdate('Checking integrity...');
41
41
  }
42
42
  await Promise.all([
43
43
  notifyInstalls(Object.keys(installedPackages)),
44
- checkIntegrity(lockfile),
44
+ checkIntegrity(lock),
45
45
  ]);
46
46
 
47
47
  if (!silent) {
@@ -3,17 +3,17 @@ import {deleteSync} from 'del';
3
3
  import chalk from 'chalk';
4
4
  import {formatDir, formatGithubDir, checkConfigFile, readConfig, writeConfig} from '../mops.js';
5
5
  import {Config, Dependency} from '../types.js';
6
- // import {checkIntegrity} from '../integrity.js';
6
+ import {checkIntegrity} from '../integrity.js';
7
7
 
8
8
  type RemoveOptions = {
9
9
  verbose?: boolean;
10
10
  dev?: boolean;
11
11
  dryRun?: boolean;
12
- lockfile?: 'save' | 'ignore';
12
+ lock?: 'update' | 'ignore';
13
13
  };
14
14
 
15
15
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
16
- export async function remove(name: string, {dev = false, verbose = false, dryRun = false, lockfile}: RemoveOptions = {}) {
16
+ export async function remove(name: string, {dev = false, verbose = false, dryRun = false, lock}: RemoveOptions = {}) {
17
17
  if (!checkConfigFile()) {
18
18
  return;
19
19
  }
@@ -100,7 +100,7 @@ export async function remove(name: string, {dev = false, verbose = false, dryRun
100
100
  }
101
101
  dryRun || writeConfig(config);
102
102
 
103
- // await checkIntegrity(lockfile);
103
+ await checkIntegrity(lock);
104
104
 
105
105
  console.log(chalk.green('Package removed ') + `${name} = "${version}"`);
106
106
  }
package/commands/sync.ts CHANGED
@@ -8,10 +8,10 @@ import {remove} from './remove.js';
8
8
  import {checkIntegrity} from '../integrity.js';
9
9
 
10
10
  type SyncOptions = {
11
- lockfile?: 'save' | 'ignore';
11
+ lock?: 'update' | 'ignore';
12
12
  };
13
13
 
14
- export async function sync({lockfile}: SyncOptions = {}) {
14
+ export async function sync({lock}: SyncOptions = {}) {
15
15
  if (!checkConfigFile()) {
16
16
  return;
17
17
  }
@@ -28,16 +28,16 @@ export async function sync({lockfile}: SyncOptions = {}) {
28
28
 
29
29
  // add missing packages
30
30
  for (let pkg of missing) {
31
- await add(pkg, {lockfile: 'ignore'});
31
+ await add(pkg, {lock: 'ignore'});
32
32
  }
33
33
 
34
34
  // remove unused packages
35
35
  for (let pkg of unused) {
36
36
  let dev = devDeps.has(pkg) && !deps.has(pkg);
37
- await remove(pkg, {dev, lockfile: 'ignore'});
37
+ await remove(pkg, {dev, lock: 'ignore'});
38
38
  }
39
39
 
40
- await checkIntegrity(lockfile);
40
+ await checkIntegrity(lock);
41
41
  }
42
42
 
43
43
  let ignore = [
@@ -7,10 +7,10 @@ import {checkIntegrity} from '../integrity.js';
7
7
  type UpdateOptions = {
8
8
  verbose?: boolean;
9
9
  dev?: boolean;
10
- lockfile?: 'save' | 'ignore';
10
+ lock?: 'update' | 'ignore';
11
11
  };
12
12
 
13
- export async function update(pkg?: string, {lockfile}: UpdateOptions = {}) {
13
+ export async function update(pkg?: string, {lock}: UpdateOptions = {}) {
14
14
  if (!checkConfigFile()) {
15
15
  return;
16
16
  }
@@ -56,5 +56,5 @@ export async function update(pkg?: string, {lockfile}: UpdateOptions = {}) {
56
56
  }
57
57
  }
58
58
 
59
- await checkIntegrity(lockfile);
59
+ await checkIntegrity(lock);
60
60
  }
@@ -111,7 +111,7 @@ type Result_3 =
111
111
  };
112
112
  type Result_2 =
113
113
  variant {
114
- err: PublishingErr;
114
+ err: Err;
115
115
  ok: PublishingId;
116
116
  };
117
117
  type Result_1 =
@@ -141,7 +141,6 @@ type Request =
141
141
  url: text;
142
142
  };
143
143
  type PublishingId = text;
144
- type PublishingErr = text;
145
144
  type PageCount = nat;
146
145
  type PackageVersion = text;
147
146
  type PackageSummary__1 =
@@ -272,13 +271,6 @@ type PackageConfigV2 =
272
271
  scripts: vec Script;
273
272
  version: text;
274
273
  };
275
- type PackageChanges__1 =
276
- record {
277
- deps: vec DepChange;
278
- devDeps: vec DepChange;
279
- notes: text;
280
- tests: TestsChanges;
281
- };
282
274
  type PackageChanges =
283
275
  record {
284
276
  deps: vec DepChange;
@@ -286,6 +278,71 @@ type PackageChanges =
286
278
  notes: text;
287
279
  tests: TestsChanges;
288
280
  };
281
+ type Main =
282
+ service {
283
+ backup: () -> ();
284
+ computeHashesForExistingFiles: () -> ();
285
+ finishPublish: (PublishingId) -> (Result);
286
+ getApiVersion: () -> (Text) query;
287
+ getBackupCanisterId: () -> (principal) query;
288
+ getDefaultPackages: (text) ->
289
+ (vec record {
290
+ PackageName;
291
+ PackageVersion;
292
+ }) query;
293
+ getDownloadTrendByPackageId: (PackageId) ->
294
+ (vec DownloadsSnapshot__1) query;
295
+ getDownloadTrendByPackageName: (PackageName) ->
296
+ (vec DownloadsSnapshot__1) query;
297
+ getFileHashes: (PackageName, PackageVersion) -> (Result_8);
298
+ getFileHashesByPackageIds: (vec PackageId) ->
299
+ (vec record {
300
+ PackageId;
301
+ vec record {
302
+ FileId;
303
+ blob;
304
+ };
305
+ });
306
+ getFileIds: (PackageName, PackageVersion) -> (Result_7) query;
307
+ getHighestSemverBatch:
308
+ (vec record {
309
+ PackageName;
310
+ PackageVersion;
311
+ SemverPart;
312
+ }) -> (Result_6) query;
313
+ getHighestVersion: (PackageName) -> (Result_5) query;
314
+ getMostDownloadedPackages: () -> (vec PackageSummary) query;
315
+ getMostDownloadedPackagesIn7Days: () -> (vec PackageSummary) query;
316
+ getNewPackages: () -> (vec PackageSummary) query;
317
+ getPackageDetails: (PackageName, PackageVersion) -> (Result_4) query;
318
+ getPackagesByCategory: () -> (vec record {
319
+ text;
320
+ vec PackageSummary;
321
+ }) query;
322
+ getRecentlyUpdatedPackages: () -> (vec PackageSummaryWithChanges) query;
323
+ getStoragesStats: () -> (vec record {
324
+ StorageId;
325
+ StorageStats;
326
+ }) query;
327
+ getTotalDownloads: () -> (nat) query;
328
+ getTotalPackages: () -> (nat) query;
329
+ getUser: (principal) -> (opt User__1) query;
330
+ http_request: (Request) -> (Response) query;
331
+ notifyInstall: (PackageName, PackageVersion) -> () oneway;
332
+ notifyInstalls: (vec record {
333
+ PackageName;
334
+ PackageVersion;
335
+ }) -> () oneway;
336
+ restore: (nat, nat) -> ();
337
+ search: (Text, opt nat, opt nat) -> (vec PackageSummary, PageCount) query;
338
+ setUserProp: (text, text) -> (Result_1);
339
+ startFileUpload: (PublishingId, Text, nat, blob) -> (Result_3);
340
+ startPublish: (PackageConfigV2) -> (Result_2);
341
+ transferOwnership: (PackageName, principal) -> (Result_1);
342
+ uploadFileChunk: (PublishingId, FileId, nat, blob) -> (Result);
343
+ uploadNotes: (PublishingId, text) -> (Result);
344
+ uploadTestStats: (PublishingId, TestStats) -> (Result);
345
+ };
289
346
  type Header =
290
347
  record {
291
348
  text;
@@ -323,72 +380,4 @@ type DepChange =
323
380
  newVersion: text;
324
381
  oldVersion: text;
325
382
  };
326
- service : {
327
- backup: () -> ();
328
- claimAirdrop: (principal) -> (text);
329
- computeHashesForExistingFiles: () -> ();
330
- diff: (text, text) -> (PackageChanges__1) query;
331
- finishPublish: (PublishingId) -> (Result);
332
- getAirdropAmount: () -> (nat) query;
333
- getAirdropAmountAll: () -> (nat) query;
334
- getApiVersion: () -> (Text) query;
335
- getBackupCanisterId: () -> (principal) query;
336
- getDefaultPackages: (text) ->
337
- (vec record {
338
- PackageName;
339
- PackageVersion;
340
- }) query;
341
- getDownloadTrendByPackageId: (PackageId) ->
342
- (vec DownloadsSnapshot__1) query;
343
- getDownloadTrendByPackageName: (PackageName) ->
344
- (vec DownloadsSnapshot__1) query;
345
- getFileHashes: (PackageName, PackageVersion) -> (Result_8);
346
- getFileHashesByPackageIds: (vec PackageId) ->
347
- (vec record {
348
- PackageId;
349
- vec record {
350
- FileId;
351
- blob;
352
- };
353
- });
354
- getFileIds: (PackageName, PackageVersion) -> (Result_7) query;
355
- getHighestSemverBatch:
356
- (vec record {
357
- PackageName;
358
- PackageVersion;
359
- SemverPart;
360
- }) -> (Result_6) query;
361
- getHighestVersion: (PackageName) -> (Result_5) query;
362
- getMostDownloadedPackages: () -> (vec PackageSummary) query;
363
- getMostDownloadedPackagesIn7Days: () -> (vec PackageSummary) query;
364
- getNewPackages: () -> (vec PackageSummary) query;
365
- getPackageDetails: (PackageName, PackageVersion) -> (Result_4) query;
366
- getPackagesByCategory: () -> (vec record {
367
- text;
368
- vec PackageSummary;
369
- }) query;
370
- getRecentlyUpdatedPackages: () -> (vec PackageSummaryWithChanges) query;
371
- getStoragesStats: () -> (vec record {
372
- StorageId;
373
- StorageStats;
374
- }) query;
375
- getTotalDownloads: () -> (nat) query;
376
- getTotalPackages: () -> (nat) query;
377
- getUser: (principal) -> (opt User__1) query;
378
- http_request: (Request) -> (Response) query;
379
- notifyInstall: (PackageName, PackageVersion) -> () oneway;
380
- notifyInstalls: (vec record {
381
- PackageName;
382
- PackageVersion;
383
- }) -> () oneway;
384
- restore: (nat, nat) -> ();
385
- search: (Text, opt nat, opt nat) -> (vec PackageSummary, PageCount) query;
386
- setUserProp: (text, text) -> (Result_1);
387
- startFileUpload: (PublishingId, Text, nat, blob) -> (Result_3);
388
- startPublish: (PackageConfigV2) -> (Result_2);
389
- takeAirdropSnapshot: () -> () oneway;
390
- transferOwnership: (PackageName, principal) -> (Result_1);
391
- uploadFileChunk: (PublishingId, FileId, nat, blob) -> (Result);
392
- uploadNotes: (PublishingId, text) -> (Result);
393
- uploadTestStats: (PublishingId, TestStats) -> (Result);
394
- }
383
+ service : () -> Main
@@ -27,13 +27,77 @@ export interface DownloadsSnapshot__1 {
27
27
  export type Err = string;
28
28
  export type FileId = string;
29
29
  export type Header = [string, string];
30
- export interface PackageChanges {
31
- 'tests' : TestsChanges,
32
- 'deps' : Array<DepChange>,
33
- 'notes' : string,
34
- 'devDeps' : Array<DepChange>,
30
+ export interface Main {
31
+ 'backup' : ActorMethod<[], undefined>,
32
+ 'computeHashesForExistingFiles' : ActorMethod<[], undefined>,
33
+ 'finishPublish' : ActorMethod<[PublishingId], Result>,
34
+ 'getApiVersion' : ActorMethod<[], Text>,
35
+ 'getBackupCanisterId' : ActorMethod<[], Principal>,
36
+ 'getDefaultPackages' : ActorMethod<
37
+ [string],
38
+ Array<[PackageName, PackageVersion]>
39
+ >,
40
+ 'getDownloadTrendByPackageId' : ActorMethod<
41
+ [PackageId],
42
+ Array<DownloadsSnapshot__1>
43
+ >,
44
+ 'getDownloadTrendByPackageName' : ActorMethod<
45
+ [PackageName],
46
+ Array<DownloadsSnapshot__1>
47
+ >,
48
+ 'getFileHashes' : ActorMethod<[PackageName, PackageVersion], Result_8>,
49
+ 'getFileHashesByPackageIds' : ActorMethod<
50
+ [Array<PackageId>],
51
+ Array<[PackageId, Array<[FileId, Uint8Array | number[]]>]>
52
+ >,
53
+ 'getFileIds' : ActorMethod<[PackageName, PackageVersion], Result_7>,
54
+ 'getHighestSemverBatch' : ActorMethod<
55
+ [Array<[PackageName, PackageVersion, SemverPart]>],
56
+ Result_6
57
+ >,
58
+ 'getHighestVersion' : ActorMethod<[PackageName], Result_5>,
59
+ 'getMostDownloadedPackages' : ActorMethod<[], Array<PackageSummary>>,
60
+ 'getMostDownloadedPackagesIn7Days' : ActorMethod<[], Array<PackageSummary>>,
61
+ 'getNewPackages' : ActorMethod<[], Array<PackageSummary>>,
62
+ 'getPackageDetails' : ActorMethod<[PackageName, PackageVersion], Result_4>,
63
+ 'getPackagesByCategory' : ActorMethod<
64
+ [],
65
+ Array<[string, Array<PackageSummary>]>
66
+ >,
67
+ 'getRecentlyUpdatedPackages' : ActorMethod<
68
+ [],
69
+ Array<PackageSummaryWithChanges>
70
+ >,
71
+ 'getStoragesStats' : ActorMethod<[], Array<[StorageId, StorageStats]>>,
72
+ 'getTotalDownloads' : ActorMethod<[], bigint>,
73
+ 'getTotalPackages' : ActorMethod<[], bigint>,
74
+ 'getUser' : ActorMethod<[Principal], [] | [User__1]>,
75
+ 'http_request' : ActorMethod<[Request], Response>,
76
+ 'notifyInstall' : ActorMethod<[PackageName, PackageVersion], undefined>,
77
+ 'notifyInstalls' : ActorMethod<
78
+ [Array<[PackageName, PackageVersion]>],
79
+ undefined
80
+ >,
81
+ 'restore' : ActorMethod<[bigint, bigint], undefined>,
82
+ 'search' : ActorMethod<
83
+ [Text, [] | [bigint], [] | [bigint]],
84
+ [Array<PackageSummary>, PageCount]
85
+ >,
86
+ 'setUserProp' : ActorMethod<[string, string], Result_1>,
87
+ 'startFileUpload' : ActorMethod<
88
+ [PublishingId, Text, bigint, Uint8Array | number[]],
89
+ Result_3
90
+ >,
91
+ 'startPublish' : ActorMethod<[PackageConfigV2], Result_2>,
92
+ 'transferOwnership' : ActorMethod<[PackageName, Principal], Result_1>,
93
+ 'uploadFileChunk' : ActorMethod<
94
+ [PublishingId, FileId, bigint, Uint8Array | number[]],
95
+ Result
96
+ >,
97
+ 'uploadNotes' : ActorMethod<[PublishingId, string], Result>,
98
+ 'uploadTestStats' : ActorMethod<[PublishingId, TestStats], Result>,
35
99
  }
36
- export interface PackageChanges__1 {
100
+ export interface PackageChanges {
37
101
  'tests' : TestsChanges,
38
102
  'deps' : Array<DepChange>,
39
103
  'notes' : string,
@@ -159,7 +223,6 @@ export interface PackageSummary__1 {
159
223
  }
160
224
  export type PackageVersion = string;
161
225
  export type PageCount = bigint;
162
- export type PublishingErr = string;
163
226
  export type PublishingId = string;
164
227
  export interface Request {
165
228
  'url' : string,
@@ -180,7 +243,7 @@ export type Result = { 'ok' : null } |
180
243
  export type Result_1 = { 'ok' : null } |
181
244
  { 'err' : string };
182
245
  export type Result_2 = { 'ok' : PublishingId } |
183
- { 'err' : PublishingErr };
246
+ { 'err' : Err };
184
247
  export type Result_3 = { 'ok' : FileId } |
185
248
  { 'err' : Err };
186
249
  export type Result_4 = { 'ok' : PackageDetails } |
@@ -250,78 +313,4 @@ export interface User__1 {
250
313
  'githubVerified' : boolean,
251
314
  'github' : string,
252
315
  }
253
- export interface _SERVICE {
254
- 'backup' : ActorMethod<[], undefined>,
255
- 'claimAirdrop' : ActorMethod<[Principal], string>,
256
- 'computeHashesForExistingFiles' : ActorMethod<[], undefined>,
257
- 'diff' : ActorMethod<[string, string], PackageChanges__1>,
258
- 'finishPublish' : ActorMethod<[PublishingId], Result>,
259
- 'getAirdropAmount' : ActorMethod<[], bigint>,
260
- 'getAirdropAmountAll' : ActorMethod<[], bigint>,
261
- 'getApiVersion' : ActorMethod<[], Text>,
262
- 'getBackupCanisterId' : ActorMethod<[], Principal>,
263
- 'getDefaultPackages' : ActorMethod<
264
- [string],
265
- Array<[PackageName, PackageVersion]>
266
- >,
267
- 'getDownloadTrendByPackageId' : ActorMethod<
268
- [PackageId],
269
- Array<DownloadsSnapshot__1>
270
- >,
271
- 'getDownloadTrendByPackageName' : ActorMethod<
272
- [PackageName],
273
- Array<DownloadsSnapshot__1>
274
- >,
275
- 'getFileHashes' : ActorMethod<[PackageName, PackageVersion], Result_8>,
276
- 'getFileHashesByPackageIds' : ActorMethod<
277
- [Array<PackageId>],
278
- Array<[PackageId, Array<[FileId, Uint8Array | number[]]>]>
279
- >,
280
- 'getFileIds' : ActorMethod<[PackageName, PackageVersion], Result_7>,
281
- 'getHighestSemverBatch' : ActorMethod<
282
- [Array<[PackageName, PackageVersion, SemverPart]>],
283
- Result_6
284
- >,
285
- 'getHighestVersion' : ActorMethod<[PackageName], Result_5>,
286
- 'getMostDownloadedPackages' : ActorMethod<[], Array<PackageSummary>>,
287
- 'getMostDownloadedPackagesIn7Days' : ActorMethod<[], Array<PackageSummary>>,
288
- 'getNewPackages' : ActorMethod<[], Array<PackageSummary>>,
289
- 'getPackageDetails' : ActorMethod<[PackageName, PackageVersion], Result_4>,
290
- 'getPackagesByCategory' : ActorMethod<
291
- [],
292
- Array<[string, Array<PackageSummary>]>
293
- >,
294
- 'getRecentlyUpdatedPackages' : ActorMethod<
295
- [],
296
- Array<PackageSummaryWithChanges>
297
- >,
298
- 'getStoragesStats' : ActorMethod<[], Array<[StorageId, StorageStats]>>,
299
- 'getTotalDownloads' : ActorMethod<[], bigint>,
300
- 'getTotalPackages' : ActorMethod<[], bigint>,
301
- 'getUser' : ActorMethod<[Principal], [] | [User__1]>,
302
- 'http_request' : ActorMethod<[Request], Response>,
303
- 'notifyInstall' : ActorMethod<[PackageName, PackageVersion], undefined>,
304
- 'notifyInstalls' : ActorMethod<
305
- [Array<[PackageName, PackageVersion]>],
306
- undefined
307
- >,
308
- 'restore' : ActorMethod<[bigint, bigint], undefined>,
309
- 'search' : ActorMethod<
310
- [Text, [] | [bigint], [] | [bigint]],
311
- [Array<PackageSummary>, PageCount]
312
- >,
313
- 'setUserProp' : ActorMethod<[string, string], Result_1>,
314
- 'startFileUpload' : ActorMethod<
315
- [PublishingId, Text, bigint, Uint8Array | number[]],
316
- Result_3
317
- >,
318
- 'startPublish' : ActorMethod<[PackageConfigV2], Result_2>,
319
- 'takeAirdropSnapshot' : ActorMethod<[], undefined>,
320
- 'transferOwnership' : ActorMethod<[PackageName, Principal], Result_1>,
321
- 'uploadFileChunk' : ActorMethod<
322
- [PublishingId, FileId, bigint, Uint8Array | number[]],
323
- Result
324
- >,
325
- 'uploadNotes' : ActorMethod<[PublishingId, string], Result>,
326
- 'uploadTestStats' : ActorMethod<[PublishingId, TestStats], Result>,
327
- }
316
+ export interface _SERVICE extends Main {}