ic-mops 2.0.1 → 2.2.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 (189) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/RELEASE.md +198 -0
  3. package/bundle/cli.tgz +0 -0
  4. package/check-requirements.ts +3 -8
  5. package/cli.ts +94 -11
  6. package/commands/bench/bench-canister.mo +17 -6
  7. package/commands/bench.ts +13 -16
  8. package/commands/build.ts +5 -6
  9. package/commands/check.ts +121 -0
  10. package/commands/format.ts +3 -18
  11. package/commands/lint.ts +92 -0
  12. package/commands/sync.ts +2 -8
  13. package/commands/test/test.ts +10 -20
  14. package/commands/toolchain/index.ts +21 -8
  15. package/commands/toolchain/lintoko.ts +54 -0
  16. package/commands/toolchain/toolchain-utils.ts +2 -0
  17. package/commands/watch/error-checker.ts +8 -2
  18. package/commands/watch/warning-checker.ts +8 -2
  19. package/constants.ts +23 -0
  20. package/dist/check-requirements.js +3 -8
  21. package/dist/cli.js +73 -11
  22. package/dist/commands/bench/bench-canister.mo +17 -6
  23. package/dist/commands/bench.js +7 -15
  24. package/dist/commands/build.js +5 -6
  25. package/dist/commands/check.d.ts +6 -0
  26. package/dist/commands/check.js +82 -0
  27. package/dist/commands/format.js +3 -16
  28. package/dist/commands/lint.d.ts +7 -0
  29. package/dist/commands/lint.js +69 -0
  30. package/dist/commands/sync.js +2 -7
  31. package/dist/commands/test/test.js +10 -18
  32. package/dist/commands/toolchain/index.d.ts +2 -2
  33. package/dist/commands/toolchain/index.js +18 -7
  34. package/dist/commands/toolchain/lintoko.d.ts +8 -0
  35. package/dist/commands/toolchain/lintoko.js +36 -0
  36. package/dist/commands/toolchain/toolchain-utils.d.ts +1 -0
  37. package/dist/commands/toolchain/toolchain-utils.js +1 -0
  38. package/dist/commands/watch/error-checker.js +8 -2
  39. package/dist/commands/watch/warning-checker.js +8 -2
  40. package/dist/constants.d.ts +15 -0
  41. package/dist/constants.js +21 -0
  42. package/dist/environments/nodejs/cli.js +6 -1
  43. package/dist/error.d.ts +1 -1
  44. package/dist/helpers/autofix-motoko.d.ts +26 -0
  45. package/dist/helpers/autofix-motoko.js +150 -0
  46. package/dist/helpers/get-moc-version.d.ts +2 -0
  47. package/dist/helpers/get-moc-version.js +10 -1
  48. package/dist/mops.d.ts +1 -0
  49. package/dist/mops.js +12 -1
  50. package/dist/package.json +3 -2
  51. package/dist/tests/build-no-dfx.test.d.ts +1 -0
  52. package/dist/tests/build-no-dfx.test.js +9 -0
  53. package/dist/tests/build.test.d.ts +1 -0
  54. package/dist/tests/build.test.js +18 -0
  55. package/dist/tests/check-candid.test.d.ts +1 -0
  56. package/dist/tests/check-candid.test.js +20 -0
  57. package/dist/tests/check-fix.test.d.ts +1 -0
  58. package/dist/tests/check-fix.test.js +89 -0
  59. package/dist/tests/check.test.d.ts +1 -0
  60. package/dist/tests/check.test.js +37 -0
  61. package/dist/tests/cli.test.js +4 -57
  62. package/dist/tests/helpers.d.ts +22 -0
  63. package/dist/tests/helpers.js +43 -0
  64. package/dist/tests/lint.test.d.ts +1 -0
  65. package/dist/tests/lint.test.js +15 -0
  66. package/dist/tests/moc-args.test.d.ts +1 -0
  67. package/dist/tests/moc-args.test.js +17 -0
  68. package/dist/tests/toolchain.test.d.ts +1 -0
  69. package/dist/tests/toolchain.test.js +11 -0
  70. package/dist/types.d.ts +8 -1
  71. package/dist/wasm/pkg/nodejs/wasm_bg.wasm +0 -0
  72. package/dist/wasm/pkg/web/wasm_bg.wasm +0 -0
  73. package/environments/nodejs/cli.ts +7 -1
  74. package/error.ts +1 -1
  75. package/helpers/autofix-motoko.ts +240 -0
  76. package/helpers/get-moc-version.ts +12 -1
  77. package/mops.ts +15 -1
  78. package/package.json +3 -2
  79. package/tests/__snapshots__/build-no-dfx.test.ts.snap +11 -0
  80. package/tests/__snapshots__/build.test.ts.snap +77 -0
  81. package/tests/__snapshots__/check-candid.test.ts.snap +73 -0
  82. package/tests/__snapshots__/check-fix.test.ts.snap +261 -0
  83. package/tests/__snapshots__/check.test.ts.snap +81 -0
  84. package/tests/__snapshots__/lint.test.ts.snap +78 -0
  85. package/tests/build/no-dfx/mops.toml +5 -0
  86. package/tests/build/no-dfx/src/Main.mo +5 -0
  87. package/tests/build-no-dfx.test.ts +10 -0
  88. package/tests/build.test.ts +24 -0
  89. package/tests/check/error/Error.mo +7 -0
  90. package/tests/check/error/mops.toml +2 -0
  91. package/tests/check/fix/M0223.mo +11 -0
  92. package/tests/check/fix/M0236.mo +11 -0
  93. package/tests/check/fix/M0237.mo +11 -0
  94. package/tests/check/fix/Ok.mo +7 -0
  95. package/tests/check/fix/edit-suggestions.mo +143 -0
  96. package/tests/check/fix/mops.toml +5 -0
  97. package/tests/check/fix/overlapping.mo +10 -0
  98. package/tests/check/fix/transitive-lib.mo +9 -0
  99. package/tests/check/fix/transitive-main.mo +9 -0
  100. package/tests/check/moc-args/Warning.mo +5 -0
  101. package/tests/check/moc-args/mops.toml +2 -0
  102. package/tests/check/success/Ok.mo +5 -0
  103. package/tests/check/success/Warning.mo +5 -0
  104. package/tests/check/success/mops.toml +2 -0
  105. package/tests/check-candid.test.ts +22 -0
  106. package/tests/check-fix.test.ts +134 -0
  107. package/tests/check.test.ts +51 -0
  108. package/tests/cli.test.ts +4 -74
  109. package/tests/helpers.ts +58 -0
  110. package/tests/lint/lints/no-bool-switch.toml +9 -0
  111. package/tests/lint/mops.toml +4 -0
  112. package/tests/lint/src/NoBoolSwitch.mo +8 -0
  113. package/tests/lint/src/Ok.mo +5 -0
  114. package/tests/lint.test.ts +17 -0
  115. package/tests/moc-args.test.ts +19 -0
  116. package/tests/toolchain/mock +2 -0
  117. package/tests/toolchain/mops.toml +2 -0
  118. package/tests/toolchain.test.ts +12 -0
  119. package/types.ts +8 -1
  120. package/wasm/Cargo.lock +101 -54
  121. package/wasm/pkg/nodejs/wasm_bg.wasm +0 -0
  122. package/wasm/pkg/web/wasm_bg.wasm +0 -0
  123. package/.DS_Store +0 -0
  124. package/bundle/bench/bench-canister.mo +0 -121
  125. package/bundle/bench/user-bench.mo +0 -10
  126. package/bundle/bin/moc-wrapper.sh +0 -40
  127. package/bundle/bin/mops.js +0 -3
  128. package/bundle/cli.js +0 -2144
  129. package/bundle/declarations/bench/bench.did +0 -30
  130. package/bundle/declarations/bench/bench.did.d.ts +0 -33
  131. package/bundle/declarations/bench/bench.did.js +0 -30
  132. package/bundle/declarations/bench/index.d.ts +0 -50
  133. package/bundle/declarations/bench/index.js +0 -40
  134. package/bundle/declarations/main/index.d.ts +0 -50
  135. package/bundle/declarations/main/index.js +0 -40
  136. package/bundle/declarations/main/main.did +0 -428
  137. package/bundle/declarations/main/main.did.d.ts +0 -348
  138. package/bundle/declarations/main/main.did.js +0 -406
  139. package/bundle/declarations/storage/index.d.ts +0 -50
  140. package/bundle/declarations/storage/index.js +0 -30
  141. package/bundle/declarations/storage/storage.did +0 -46
  142. package/bundle/declarations/storage/storage.did.d.ts +0 -40
  143. package/bundle/declarations/storage/storage.did.js +0 -38
  144. package/bundle/package.json +0 -36
  145. package/bundle/templates/README.md +0 -13
  146. package/bundle/templates/licenses/Apache-2.0 +0 -202
  147. package/bundle/templates/licenses/Apache-2.0-NOTICE +0 -13
  148. package/bundle/templates/licenses/MIT +0 -21
  149. package/bundle/templates/mops-publish.yml +0 -17
  150. package/bundle/templates/mops-test.yml +0 -24
  151. package/bundle/templates/src/lib.mo +0 -15
  152. package/bundle/templates/test/lib.test.mo +0 -4
  153. package/bundle/wasm_bg.wasm +0 -0
  154. package/bundle/xhr-sync-worker.js +0 -59
  155. package/dist/wasm/pkg/bundler/package.json +0 -20
  156. package/dist/wasm/pkg/bundler/wasm.d.ts +0 -3
  157. package/dist/wasm/pkg/bundler/wasm.js +0 -5
  158. package/dist/wasm/pkg/bundler/wasm_bg.js +0 -93
  159. package/dist/wasm/pkg/bundler/wasm_bg.wasm +0 -0
  160. package/dist/wasm/pkg/bundler/wasm_bg.wasm.d.ts +0 -8
  161. package/tests/__snapshots__/cli.test.ts.snap +0 -202
  162. package/tests/build/success/.dfx/local/canister_ids.json +0 -17
  163. package/tests/build/success/.dfx/local/canisters/bar/bar.did +0 -3
  164. package/tests/build/success/.dfx/local/canisters/bar/bar.most +0 -4
  165. package/tests/build/success/.dfx/local/canisters/bar/bar.wasm +0 -0
  166. package/tests/build/success/.dfx/local/canisters/bar/constructor.did +0 -3
  167. package/tests/build/success/.dfx/local/canisters/bar/index.js +0 -42
  168. package/tests/build/success/.dfx/local/canisters/bar/init_args.txt +0 -1
  169. package/tests/build/success/.dfx/local/canisters/bar/service.did +0 -3
  170. package/tests/build/success/.dfx/local/canisters/bar/service.did.d.ts +0 -7
  171. package/tests/build/success/.dfx/local/canisters/bar/service.did.js +0 -4
  172. package/tests/build/success/.dfx/local/canisters/foo/constructor.did +0 -3
  173. package/tests/build/success/.dfx/local/canisters/foo/foo.did +0 -3
  174. package/tests/build/success/.dfx/local/canisters/foo/foo.most +0 -4
  175. package/tests/build/success/.dfx/local/canisters/foo/foo.wasm +0 -0
  176. package/tests/build/success/.dfx/local/canisters/foo/index.js +0 -42
  177. package/tests/build/success/.dfx/local/canisters/foo/init_args.txt +0 -1
  178. package/tests/build/success/.dfx/local/canisters/foo/service.did +0 -3
  179. package/tests/build/success/.dfx/local/canisters/foo/service.did.d.ts +0 -7
  180. package/tests/build/success/.dfx/local/canisters/foo/service.did.js +0 -4
  181. package/tests/build/success/.dfx/local/lsp/ucwa4-rx777-77774-qaada-cai.did +0 -3
  182. package/tests/build/success/.dfx/local/lsp/ulvla-h7777-77774-qaacq-cai.did +0 -3
  183. package/tests/build/success/.dfx/local/network-id +0 -4
  184. package/wasm/pkg/bundler/package.json +0 -20
  185. package/wasm/pkg/bundler/wasm.d.ts +0 -3
  186. package/wasm/pkg/bundler/wasm.js +0 -5
  187. package/wasm/pkg/bundler/wasm_bg.js +0 -93
  188. package/wasm/pkg/bundler/wasm_bg.wasm +0 -0
  189. package/wasm/pkg/bundler/wasm_bg.wasm.d.ts +0 -8
@@ -1,348 +0,0 @@
1
- import type { Principal } from '@icp-sdk/core/principal';
2
- import type { ActorMethod } from '@icp-sdk/core/agent';
3
- import type { IDL } from '@icp-sdk/core/candid';
4
-
5
- export interface Benchmark {
6
- 'gc' : string,
7
- 'metrics' : Array<[BenchmarkMetric, Array<Array<bigint>>]>,
8
- 'cols' : Array<string>,
9
- 'file' : string,
10
- 'name' : string,
11
- 'rows' : Array<string>,
12
- 'description' : string,
13
- 'compilerVersion' : string,
14
- 'compiler' : string,
15
- 'replica' : string,
16
- 'replicaVersion' : string,
17
- 'forceGC' : boolean,
18
- }
19
- export type BenchmarkMetric = string;
20
- export type Benchmarks = Array<Benchmark>;
21
- export interface DepChange {
22
- 'oldVersion' : string,
23
- 'name' : string,
24
- 'newVersion' : string,
25
- }
26
- export interface DependencyV2 {
27
- 'name' : PackageName,
28
- 'repo' : string,
29
- 'version' : string,
30
- }
31
- export type DepsStatus = { 'allLatest' : null } |
32
- { 'tooOld' : null } |
33
- { 'updatesAvailable' : null };
34
- export interface DownloadsSnapshot {
35
- 'startTime' : Time,
36
- 'endTime' : Time,
37
- 'downloads' : bigint,
38
- }
39
- export type Err = string;
40
- export type FileId = string;
41
- export type Header = [string, string];
42
- export interface HttpHeader { 'value' : string, 'name' : string }
43
- export interface HttpRequestResult {
44
- 'status' : bigint,
45
- 'body' : Uint8Array | number[],
46
- 'headers' : Array<HttpHeader>,
47
- }
48
- export interface Main {
49
- 'addMaintainer' : ActorMethod<[PackageName, Principal], Result_3>,
50
- 'addOwner' : ActorMethod<[PackageName, Principal], Result_3>,
51
- 'backup' : ActorMethod<[], undefined>,
52
- 'computeHashesForExistingFiles' : ActorMethod<[], undefined>,
53
- 'finishPublish' : ActorMethod<[PublishingId], Result>,
54
- 'getApiVersion' : ActorMethod<[], Text>,
55
- 'getBackupCanisterId' : ActorMethod<[], Principal>,
56
- 'getDefaultPackages' : ActorMethod<
57
- [string],
58
- Array<[PackageName, PackageVersion]>
59
- >,
60
- 'getDownloadTrendByPackageId' : ActorMethod<
61
- [PackageId],
62
- Array<DownloadsSnapshot>
63
- >,
64
- 'getDownloadTrendByPackageName' : ActorMethod<
65
- [PackageName],
66
- Array<DownloadsSnapshot>
67
- >,
68
- 'getFileHashes' : ActorMethod<[PackageName, PackageVersion], Result_8>,
69
- 'getFileHashesByPackageIds' : ActorMethod<
70
- [Array<PackageId>],
71
- Array<[PackageId, Array<[FileId, Uint8Array | number[]]>]>
72
- >,
73
- 'getFileHashesQuery' : ActorMethod<[PackageName, PackageVersion], Result_8>,
74
- 'getFileIds' : ActorMethod<[PackageName, PackageVersion], Result_7>,
75
- 'getHighestSemverBatch' : ActorMethod<
76
- [Array<[PackageName, PackageVersion, SemverPart]>],
77
- Result_6
78
- >,
79
- 'getHighestVersion' : ActorMethod<[PackageName], Result_5>,
80
- 'getMostDownloadedPackages' : ActorMethod<[], Array<PackageSummary>>,
81
- 'getMostDownloadedPackagesIn7Days' : ActorMethod<[], Array<PackageSummary>>,
82
- 'getNewPackages' : ActorMethod<[], Array<PackageSummary>>,
83
- 'getPackageDependents' : ActorMethod<
84
- [PackageName, bigint, bigint],
85
- [Array<PackageSummary>, bigint]
86
- >,
87
- 'getPackageDetails' : ActorMethod<[PackageName, PackageVersion], Result_4>,
88
- 'getPackageMaintainers' : ActorMethod<[PackageName], Array<Principal>>,
89
- 'getPackageOwners' : ActorMethod<[PackageName], Array<Principal>>,
90
- 'getPackageVersionHistory' : ActorMethod<
91
- [PackageName],
92
- Array<PackageSummaryWithChanges>
93
- >,
94
- 'getPackagesByCategory' : ActorMethod<
95
- [],
96
- Array<[string, Array<PackageSummary>]>
97
- >,
98
- 'getRecentlyUpdatedPackages' : ActorMethod<
99
- [],
100
- Array<PackageSummaryWithChanges>
101
- >,
102
- 'getStoragesStats' : ActorMethod<[], Array<[StorageId, StorageStats]>>,
103
- 'getTotalDownloads' : ActorMethod<[], bigint>,
104
- 'getTotalPackages' : ActorMethod<[], bigint>,
105
- 'getUser' : ActorMethod<[Principal], [] | [User]>,
106
- 'http_request' : ActorMethod<[Request], Response>,
107
- 'notifyInstall' : ActorMethod<[PackageName, PackageVersion], undefined>,
108
- 'notifyInstalls' : ActorMethod<
109
- [Array<[PackageName, PackageVersion]>],
110
- undefined
111
- >,
112
- 'removeMaintainer' : ActorMethod<[PackageName, Principal], Result_3>,
113
- 'removeOwner' : ActorMethod<[PackageName, Principal], Result_3>,
114
- 'restore' : ActorMethod<[bigint], undefined>,
115
- 'search' : ActorMethod<
116
- [Text, [] | [bigint], [] | [bigint]],
117
- [Array<PackageSummary>, PageCount]
118
- >,
119
- 'setStorageControllers' : ActorMethod<[], undefined>,
120
- 'setUserProp' : ActorMethod<[string, string], Result_3>,
121
- 'startFileUpload' : ActorMethod<
122
- [PublishingId, Text, bigint, Uint8Array | number[]],
123
- Result_2
124
- >,
125
- 'startPublish' : ActorMethod<[PackageConfigV3_Publishing], Result_1>,
126
- 'takeSnapshotsIfNeeded' : ActorMethod<[], undefined>,
127
- 'transformRequest' : ActorMethod<[TransformArg], HttpRequestResult>,
128
- 'uploadBenchmarks' : ActorMethod<[PublishingId, Benchmarks], Result>,
129
- 'uploadDocsCoverage' : ActorMethod<[PublishingId, number], Result>,
130
- 'uploadFileChunk' : ActorMethod<
131
- [PublishingId, FileId, bigint, Uint8Array | number[]],
132
- Result
133
- >,
134
- 'uploadNotes' : ActorMethod<[PublishingId, string], Result>,
135
- 'uploadTestStats' : ActorMethod<[PublishingId, TestStats], Result>,
136
- }
137
- export interface PackageChanges {
138
- 'tests' : TestsChanges,
139
- 'deps' : Array<DepChange>,
140
- 'curBenchmarks' : Benchmarks,
141
- 'prevDocsCoverage' : number,
142
- 'prevBenchmarks' : Benchmarks,
143
- 'notes' : string,
144
- 'curDocsCoverage' : number,
145
- 'devDeps' : Array<DepChange>,
146
- }
147
- export interface PackageConfigV3 {
148
- 'dfx' : string,
149
- 'moc' : string,
150
- 'scripts' : Array<Script>,
151
- 'baseDir' : string,
152
- 'documentation' : string,
153
- 'name' : PackageName,
154
- 'homepage' : string,
155
- 'description' : string,
156
- 'version' : string,
157
- 'keywords' : Array<string>,
158
- 'donation' : string,
159
- 'devDependencies' : Array<DependencyV2>,
160
- 'repository' : string,
161
- 'dependencies' : Array<DependencyV2>,
162
- 'requirements' : Array<Requirement>,
163
- 'license' : string,
164
- 'readme' : string,
165
- }
166
- export interface PackageConfigV3_Publishing {
167
- 'dfx' : string,
168
- 'moc' : string,
169
- 'scripts' : Array<Script>,
170
- 'baseDir' : string,
171
- 'documentation' : string,
172
- 'name' : PackageName,
173
- 'homepage' : string,
174
- 'description' : string,
175
- 'version' : string,
176
- 'keywords' : Array<string>,
177
- 'donation' : string,
178
- 'devDependencies' : Array<DependencyV2>,
179
- 'repository' : string,
180
- 'dependencies' : Array<DependencyV2>,
181
- 'requirements' : [] | [Array<Requirement>],
182
- 'license' : string,
183
- 'readme' : string,
184
- }
185
- export interface PackageDetails {
186
- 'benchmarks' : Benchmarks,
187
- 'ownerInfo' : User,
188
- 'owners' : Array<User>,
189
- 'maintainers' : Array<User>,
190
- 'owner' : Principal,
191
- 'depAlias' : string,
192
- 'deps' : Array<PackageSummary>,
193
- 'quality' : PackageQuality,
194
- 'publisher' : User,
195
- 'testStats' : TestStats,
196
- 'docsCoverage' : number,
197
- 'highestVersion' : PackageVersion,
198
- 'downloadsTotal' : bigint,
199
- 'downloadsInLast30Days' : bigint,
200
- 'dependentsCount' : bigint,
201
- 'downloadTrend' : Array<DownloadsSnapshot>,
202
- 'fileStats' : PackageFileStatsPublic,
203
- 'versionHistory' : Array<PackageSummaryWithChanges>,
204
- 'dependents' : Array<PackageSummary>,
205
- 'devDeps' : Array<PackageSummary>,
206
- 'downloadsInLast7Days' : bigint,
207
- 'config' : PackageConfigV3,
208
- 'changes' : PackageChanges,
209
- 'versions' : Array<PackageVersion>,
210
- 'publication' : PackagePublication,
211
- }
212
- export interface PackageFileStatsPublic {
213
- 'sourceFiles' : bigint,
214
- 'sourceSize' : bigint,
215
- }
216
- export type PackageId = string;
217
- export type PackageName = string;
218
- export interface PackagePublication {
219
- 'storage' : Principal,
220
- 'time' : Time,
221
- 'user' : Principal,
222
- }
223
- export interface PackageQuality {
224
- 'depsStatus' : DepsStatus,
225
- 'docsCoverage' : number,
226
- 'hasDescription' : boolean,
227
- 'hasKeywords' : boolean,
228
- 'hasLicense' : boolean,
229
- 'hasDocumentation' : boolean,
230
- 'hasTests' : boolean,
231
- 'hasRepository' : boolean,
232
- 'hasReleaseNotes' : boolean,
233
- }
234
- export interface PackageSummary {
235
- 'ownerInfo' : User,
236
- 'owners' : Array<User>,
237
- 'maintainers' : Array<User>,
238
- 'owner' : Principal,
239
- 'depAlias' : string,
240
- 'quality' : PackageQuality,
241
- 'publisher' : User,
242
- 'highestVersion' : PackageVersion,
243
- 'downloadsTotal' : bigint,
244
- 'downloadsInLast30Days' : bigint,
245
- 'downloadsInLast7Days' : bigint,
246
- 'config' : PackageConfigV3,
247
- 'publication' : PackagePublication,
248
- }
249
- export interface PackageSummaryWithChanges {
250
- 'ownerInfo' : User,
251
- 'owners' : Array<User>,
252
- 'maintainers' : Array<User>,
253
- 'owner' : Principal,
254
- 'depAlias' : string,
255
- 'quality' : PackageQuality,
256
- 'publisher' : User,
257
- 'highestVersion' : PackageVersion,
258
- 'downloadsTotal' : bigint,
259
- 'downloadsInLast30Days' : bigint,
260
- 'downloadsInLast7Days' : bigint,
261
- 'config' : PackageConfigV3,
262
- 'changes' : PackageChanges,
263
- 'publication' : PackagePublication,
264
- }
265
- export type PackageVersion = string;
266
- export type PageCount = bigint;
267
- export type PublishingId = string;
268
- export interface Request {
269
- 'url' : string,
270
- 'method' : string,
271
- 'body' : Uint8Array | number[],
272
- 'headers' : Array<Header>,
273
- 'certificate_version' : [] | [number],
274
- }
275
- export interface Requirement { 'value' : string, 'name' : string }
276
- export interface Response {
277
- 'body' : Uint8Array | number[],
278
- 'headers' : Array<Header>,
279
- 'upgrade' : [] | [boolean],
280
- 'streaming_strategy' : [] | [StreamingStrategy],
281
- 'status_code' : number,
282
- }
283
- export type Result = { 'ok' : null } |
284
- { 'err' : Err };
285
- export type Result_1 = { 'ok' : PublishingId } |
286
- { 'err' : Err };
287
- export type Result_2 = { 'ok' : FileId } |
288
- { 'err' : Err };
289
- export type Result_3 = { 'ok' : null } |
290
- { 'err' : string };
291
- export type Result_4 = { 'ok' : PackageDetails } |
292
- { 'err' : Err };
293
- export type Result_5 = { 'ok' : PackageVersion } |
294
- { 'err' : Err };
295
- export type Result_6 = { 'ok' : Array<[PackageName, PackageVersion]> } |
296
- { 'err' : Err };
297
- export type Result_7 = { 'ok' : Array<FileId> } |
298
- { 'err' : Err };
299
- export type Result_8 = { 'ok' : Array<[FileId, Uint8Array | number[]]> } |
300
- { 'err' : Err };
301
- export interface Script { 'value' : string, 'name' : string }
302
- export type SemverPart = { 'major' : null } |
303
- { 'minor' : null } |
304
- { 'patch' : null };
305
- export type StorageId = Principal;
306
- export interface StorageStats {
307
- 'fileCount' : bigint,
308
- 'cyclesBalance' : bigint,
309
- 'memorySize' : bigint,
310
- }
311
- export type StreamingCallback = ActorMethod<
312
- [StreamingToken],
313
- [] | [StreamingCallbackResponse]
314
- >;
315
- export interface StreamingCallbackResponse {
316
- 'token' : [] | [StreamingToken],
317
- 'body' : Uint8Array | number[],
318
- }
319
- export type StreamingStrategy = {
320
- 'Callback' : { 'token' : StreamingToken, 'callback' : StreamingCallback }
321
- };
322
- export type StreamingToken = Uint8Array | number[];
323
- export interface TestStats { 'passedNames' : Array<string>, 'passed' : bigint }
324
- export interface TestsChanges {
325
- 'addedNames' : Array<string>,
326
- 'removedNames' : Array<string>,
327
- }
328
- export type Text = string;
329
- export type Time = bigint;
330
- export interface TransformArg {
331
- 'context' : Uint8Array | number[],
332
- 'response' : HttpRequestResult,
333
- }
334
- export interface User {
335
- 'id' : Principal,
336
- 'emailVerified' : boolean,
337
- 'twitter' : string,
338
- 'displayName' : string,
339
- 'name' : string,
340
- 'site' : string,
341
- 'email' : string,
342
- 'twitterVerified' : boolean,
343
- 'githubVerified' : boolean,
344
- 'github' : string,
345
- }
346
- export interface _SERVICE extends Main {}
347
- export declare const idlFactory: IDL.InterfaceFactory;
348
- export declare const init: (args: { IDL: typeof IDL }) => IDL.Type[];