ic-mops 0.8.8 → 0.8.9

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.
@@ -52,6 +52,24 @@ type Result =
52
52
  };
53
53
  type PublishingId = text;
54
54
  type PublishingErr = text;
55
+ type PackageSummary__1 =
56
+ record {
57
+ config: PackageConfigV2__1;
58
+ downloadsInLast30Days: nat;
59
+ downloadsInLast7Days: nat;
60
+ downloadsTotal: nat;
61
+ owner: principal;
62
+ publication: PackagePublication;
63
+ };
64
+ type PackageSummary =
65
+ record {
66
+ config: PackageConfigV2__1;
67
+ downloadsInLast30Days: nat;
68
+ downloadsInLast7Days: nat;
69
+ downloadsTotal: nat;
70
+ owner: principal;
71
+ publication: PackagePublication;
72
+ };
55
73
  type PackagePublication =
56
74
  record {
57
75
  storage: principal;
@@ -64,11 +82,15 @@ type PackageId = text;
64
82
  type PackageDetails =
65
83
  record {
66
84
  config: PackageConfigV2__1;
85
+ dependents: vec PackageSummary__1;
86
+ deps: vec PackageSummary__1;
87
+ devDeps: vec PackageSummary__1;
67
88
  downloadsInLast30Days: nat;
68
89
  downloadsInLast7Days: nat;
69
90
  downloadsTotal: nat;
70
91
  owner: principal;
71
92
  publication: PackagePublication;
93
+ versionHistory: vec PackageSummary__1;
72
94
  };
73
95
  type PackageConfigV2__1 =
74
96
  record {
@@ -127,10 +149,10 @@ service : {
127
149
  getDownloadTrendByPackageName: (PackageName__1) -> (vec Snapshot) query;
128
150
  getFileIds: (PackageName__1, Ver) -> (Result_5) query;
129
151
  getHighestVersion: (PackageName__1) -> (Result_4) query;
130
- getMostDownloadedPackages: () -> (vec PackageDetails) query;
131
- getMostDownloadedPackagesIn7Days: () -> (vec PackageDetails) query;
152
+ getMostDownloadedPackages: () -> (vec PackageSummary) query;
153
+ getMostDownloadedPackagesIn7Days: () -> (vec PackageSummary) query;
132
154
  getPackageDetails: (PackageName__1, Ver) -> (Result_3) query;
133
- getRecentlyUpdatedPackages: () -> (vec PackageDetails) query;
155
+ getRecentlyUpdatedPackages: () -> (vec PackageSummary) query;
134
156
  getStoragesStats: () -> (vec record {
135
157
  StorageId;
136
158
  StorageStats;
@@ -138,7 +160,7 @@ service : {
138
160
  getTotalDownloads: () -> (nat) query;
139
161
  getTotalPackages: () -> (nat) query;
140
162
  notifyInstall: (PackageName__1, Ver) -> () oneway;
141
- search: (Text) -> (vec PackageDetails) query;
163
+ search: (Text) -> (vec PackageSummary) query;
142
164
  startFileUpload: (PublishingId, Text, nat, blob) -> (Result_2);
143
165
  startPublish: (PackageConfigV2) -> (Result_1);
144
166
  uploadFileChunk: (PublishingId, FileId, nat, blob) -> (Result);
@@ -46,8 +46,12 @@ export interface PackageConfigV2__1 {
46
46
  }
47
47
  export interface PackageDetails {
48
48
  'owner' : Principal,
49
+ 'deps' : Array<PackageSummary__1>,
49
50
  'downloadsTotal' : bigint,
50
51
  'downloadsInLast30Days' : bigint,
52
+ 'versionHistory' : Array<PackageSummary__1>,
53
+ 'dependents' : Array<PackageSummary__1>,
54
+ 'devDeps' : Array<PackageSummary__1>,
51
55
  'downloadsInLast7Days' : bigint,
52
56
  'config' : PackageConfigV2__1,
53
57
  'publication' : PackagePublication,
@@ -60,6 +64,22 @@ export interface PackagePublication {
60
64
  'time' : Time,
61
65
  'user' : Principal,
62
66
  }
67
+ export interface PackageSummary {
68
+ 'owner' : Principal,
69
+ 'downloadsTotal' : bigint,
70
+ 'downloadsInLast30Days' : bigint,
71
+ 'downloadsInLast7Days' : bigint,
72
+ 'config' : PackageConfigV2__1,
73
+ 'publication' : PackagePublication,
74
+ }
75
+ export interface PackageSummary__1 {
76
+ 'owner' : Principal,
77
+ 'downloadsTotal' : bigint,
78
+ 'downloadsInLast30Days' : bigint,
79
+ 'downloadsInLast7Days' : bigint,
80
+ 'config' : PackageConfigV2__1,
81
+ 'publication' : PackagePublication,
82
+ }
63
83
  export type PublishingErr = string;
64
84
  export type PublishingId = string;
65
85
  export type Result = { 'ok' : null } |
@@ -104,15 +124,15 @@ export interface _SERVICE {
104
124
  >,
105
125
  'getFileIds' : ActorMethod<[PackageName__1, Ver], Result_5>,
106
126
  'getHighestVersion' : ActorMethod<[PackageName__1], Result_4>,
107
- 'getMostDownloadedPackages' : ActorMethod<[], Array<PackageDetails>>,
108
- 'getMostDownloadedPackagesIn7Days' : ActorMethod<[], Array<PackageDetails>>,
127
+ 'getMostDownloadedPackages' : ActorMethod<[], Array<PackageSummary>>,
128
+ 'getMostDownloadedPackagesIn7Days' : ActorMethod<[], Array<PackageSummary>>,
109
129
  'getPackageDetails' : ActorMethod<[PackageName__1, Ver], Result_3>,
110
- 'getRecentlyUpdatedPackages' : ActorMethod<[], Array<PackageDetails>>,
130
+ 'getRecentlyUpdatedPackages' : ActorMethod<[], Array<PackageSummary>>,
111
131
  'getStoragesStats' : ActorMethod<[], Array<[StorageId, StorageStats]>>,
112
132
  'getTotalDownloads' : ActorMethod<[], bigint>,
113
133
  'getTotalPackages' : ActorMethod<[], bigint>,
114
134
  'notifyInstall' : ActorMethod<[PackageName__1, Ver], undefined>,
115
- 'search' : ActorMethod<[Text], Array<PackageDetails>>,
135
+ 'search' : ActorMethod<[Text], Array<PackageSummary>>,
116
136
  'startFileUpload' : ActorMethod<
117
137
  [PublishingId, Text, bigint, Uint8Array | number[]],
118
138
  Result_2
@@ -46,10 +46,30 @@ export const idlFactory = ({ IDL }) => {
46
46
  'time' : Time,
47
47
  'user' : IDL.Principal,
48
48
  });
49
+ const PackageSummary = IDL.Record({
50
+ 'owner' : IDL.Principal,
51
+ 'downloadsTotal' : IDL.Nat,
52
+ 'downloadsInLast30Days' : IDL.Nat,
53
+ 'downloadsInLast7Days' : IDL.Nat,
54
+ 'config' : PackageConfigV2__1,
55
+ 'publication' : PackagePublication,
56
+ });
57
+ const PackageSummary__1 = IDL.Record({
58
+ 'owner' : IDL.Principal,
59
+ 'downloadsTotal' : IDL.Nat,
60
+ 'downloadsInLast30Days' : IDL.Nat,
61
+ 'downloadsInLast7Days' : IDL.Nat,
62
+ 'config' : PackageConfigV2__1,
63
+ 'publication' : PackagePublication,
64
+ });
49
65
  const PackageDetails = IDL.Record({
50
66
  'owner' : IDL.Principal,
67
+ 'deps' : IDL.Vec(PackageSummary__1),
51
68
  'downloadsTotal' : IDL.Nat,
52
69
  'downloadsInLast30Days' : IDL.Nat,
70
+ 'versionHistory' : IDL.Vec(PackageSummary__1),
71
+ 'dependents' : IDL.Vec(PackageSummary__1),
72
+ 'devDeps' : IDL.Vec(PackageSummary__1),
53
73
  'downloadsInLast7Days' : IDL.Nat,
54
74
  'config' : PackageConfigV2__1,
55
75
  'publication' : PackagePublication,
@@ -104,12 +124,12 @@ export const idlFactory = ({ IDL }) => {
104
124
  'getHighestVersion' : IDL.Func([PackageName__1], [Result_4], ['query']),
105
125
  'getMostDownloadedPackages' : IDL.Func(
106
126
  [],
107
- [IDL.Vec(PackageDetails)],
127
+ [IDL.Vec(PackageSummary)],
108
128
  ['query'],
109
129
  ),
110
130
  'getMostDownloadedPackagesIn7Days' : IDL.Func(
111
131
  [],
112
- [IDL.Vec(PackageDetails)],
132
+ [IDL.Vec(PackageSummary)],
113
133
  ['query'],
114
134
  ),
115
135
  'getPackageDetails' : IDL.Func(
@@ -119,7 +139,7 @@ export const idlFactory = ({ IDL }) => {
119
139
  ),
120
140
  'getRecentlyUpdatedPackages' : IDL.Func(
121
141
  [],
122
- [IDL.Vec(PackageDetails)],
142
+ [IDL.Vec(PackageSummary)],
123
143
  ['query'],
124
144
  ),
125
145
  'getStoragesStats' : IDL.Func(
@@ -130,7 +150,7 @@ export const idlFactory = ({ IDL }) => {
130
150
  'getTotalDownloads' : IDL.Func([], [IDL.Nat], ['query']),
131
151
  'getTotalPackages' : IDL.Func([], [IDL.Nat], ['query']),
132
152
  'notifyInstall' : IDL.Func([PackageName__1, Ver], [], ['oneway']),
133
- 'search' : IDL.Func([Text], [IDL.Vec(PackageDetails)], ['query']),
153
+ 'search' : IDL.Func([Text], [IDL.Vec(PackageSummary)], ['query']),
134
154
  'startFileUpload' : IDL.Func(
135
155
  [PublishingId, Text, IDL.Nat, IDL.Vec(IDL.Nat8)],
136
156
  [Result_2],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ic-mops",
3
- "version": "0.8.8",
3
+ "version": "0.8.9",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "mops": "cli.js"
@@ -1,6 +1,11 @@
1
1
  name: mops test
2
2
 
3
- on: [push, pull_request]
3
+ on:
4
+ push:
5
+ branches:
6
+ - main
7
+ - master
8
+ pull_request:
4
9
 
5
10
  jobs:
6
11
  test: