ic-mops 0.37.5 → 0.37.7
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/commands/publish.ts +1 -1
- package/commands/toolchain/index.ts +2 -0
- package/declarations/main/main.did +17 -0
- package/declarations/main/main.did.d.ts +11 -0
- package/declarations/main/main.did.js +11 -0
- package/dist/commands/publish.js +1 -1
- package/dist/commands/toolchain/index.js +2 -0
- package/dist/declarations/main/main.did +17 -0
- package/dist/declarations/main/main.did.d.ts +11 -0
- package/dist/declarations/main/main.did.js +11 -0
- package/dist/package.json +1 -1
- package/package.json +1 -1
package/commands/publish.ts
CHANGED
|
@@ -43,7 +43,7 @@ export async function publish(options: {docs?: boolean, test?: boolean} = {}) {
|
|
|
43
43
|
for (let key of ['name', 'version']) {
|
|
44
44
|
// @ts-ignore
|
|
45
45
|
if (!config.package[key]) {
|
|
46
|
-
console.log(chalk.red('Error: ') + `Please specify "${key}" in [
|
|
46
|
+
console.log(chalk.red('Error: ') + `Please specify "${key}" in [package] section in your mops.toml`);
|
|
47
47
|
process.exit(1);
|
|
48
48
|
}
|
|
49
49
|
}
|
|
@@ -66,6 +66,8 @@ async function init({reset = false, silent = false} = {}) {
|
|
|
66
66
|
console.log('Steps to uninstall mocv:');
|
|
67
67
|
console.log('1. Run "mocv reset"');
|
|
68
68
|
console.log('2. Run "npm uninstall -g mocv"');
|
|
69
|
+
console.log('TIP: Alternative to "mocv use <version>" is "mops toolchain use moc <version>" (installs moc only for current project)');
|
|
70
|
+
console.log('TIP: More details at https://docs.mops.one/cli/toolchain');
|
|
69
71
|
process.exit(1);
|
|
70
72
|
}
|
|
71
73
|
}
|
|
@@ -24,6 +24,11 @@ type User =
|
|
|
24
24
|
twitter: text;
|
|
25
25
|
twitterVerified: bool;
|
|
26
26
|
};
|
|
27
|
+
type TransformArg =
|
|
28
|
+
record {
|
|
29
|
+
context: vec nat8;
|
|
30
|
+
response: HttpResponse;
|
|
31
|
+
};
|
|
27
32
|
type Time = int;
|
|
28
33
|
type Text = text;
|
|
29
34
|
type TestsChanges =
|
|
@@ -339,10 +344,22 @@ type Main =
|
|
|
339
344
|
startFileUpload: (PublishingId, Text, nat, blob) -> (Result_3);
|
|
340
345
|
startPublish: (PackageConfigV2) -> (Result_2);
|
|
341
346
|
transferOwnership: (PackageName, principal) -> (Result_1);
|
|
347
|
+
transformRequest: (TransformArg) -> (HttpResponse) query;
|
|
342
348
|
uploadFileChunk: (PublishingId, FileId, nat, blob) -> (Result);
|
|
343
349
|
uploadNotes: (PublishingId, text) -> (Result);
|
|
344
350
|
uploadTestStats: (PublishingId, TestStats) -> (Result);
|
|
345
351
|
};
|
|
352
|
+
type HttpResponse =
|
|
353
|
+
record {
|
|
354
|
+
body: vec nat8;
|
|
355
|
+
headers: vec HttpHeader;
|
|
356
|
+
status: nat;
|
|
357
|
+
};
|
|
358
|
+
type HttpHeader =
|
|
359
|
+
record {
|
|
360
|
+
name: text;
|
|
361
|
+
value: text;
|
|
362
|
+
};
|
|
346
363
|
type Header =
|
|
347
364
|
record {
|
|
348
365
|
text;
|
|
@@ -27,6 +27,12 @@ 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 HttpHeader { 'value' : string, 'name' : string }
|
|
31
|
+
export interface HttpResponse {
|
|
32
|
+
'status' : bigint,
|
|
33
|
+
'body' : Uint8Array | number[],
|
|
34
|
+
'headers' : Array<HttpHeader>,
|
|
35
|
+
}
|
|
30
36
|
export interface Main {
|
|
31
37
|
'backup' : ActorMethod<[], undefined>,
|
|
32
38
|
'computeHashesForExistingFiles' : ActorMethod<[], undefined>,
|
|
@@ -90,6 +96,7 @@ export interface Main {
|
|
|
90
96
|
>,
|
|
91
97
|
'startPublish' : ActorMethod<[PackageConfigV2], Result_2>,
|
|
92
98
|
'transferOwnership' : ActorMethod<[PackageName, Principal], Result_1>,
|
|
99
|
+
'transformRequest' : ActorMethod<[TransformArg], HttpResponse>,
|
|
93
100
|
'uploadFileChunk' : ActorMethod<
|
|
94
101
|
[PublishingId, FileId, bigint, Uint8Array | number[]],
|
|
95
102
|
Result
|
|
@@ -289,6 +296,10 @@ export interface TestsChanges {
|
|
|
289
296
|
}
|
|
290
297
|
export type Text = string;
|
|
291
298
|
export type Time = bigint;
|
|
299
|
+
export interface TransformArg {
|
|
300
|
+
'context' : Uint8Array | number[],
|
|
301
|
+
'response' : HttpResponse,
|
|
302
|
+
}
|
|
292
303
|
export interface User {
|
|
293
304
|
'id' : Principal,
|
|
294
305
|
'emailVerified' : boolean,
|
|
@@ -245,6 +245,16 @@ export const idlFactory = ({ IDL }) => {
|
|
|
245
245
|
'readme' : IDL.Text,
|
|
246
246
|
});
|
|
247
247
|
const Result_2 = IDL.Variant({ 'ok' : PublishingId, 'err' : Err });
|
|
248
|
+
const HttpHeader = IDL.Record({ 'value' : IDL.Text, 'name' : IDL.Text });
|
|
249
|
+
const HttpResponse = IDL.Record({
|
|
250
|
+
'status' : IDL.Nat,
|
|
251
|
+
'body' : IDL.Vec(IDL.Nat8),
|
|
252
|
+
'headers' : IDL.Vec(HttpHeader),
|
|
253
|
+
});
|
|
254
|
+
const TransformArg = IDL.Record({
|
|
255
|
+
'context' : IDL.Vec(IDL.Nat8),
|
|
256
|
+
'response' : HttpResponse,
|
|
257
|
+
});
|
|
248
258
|
const TestStats = IDL.Record({
|
|
249
259
|
'passedNames' : IDL.Vec(IDL.Text),
|
|
250
260
|
'passed' : IDL.Nat,
|
|
@@ -350,6 +360,7 @@ export const idlFactory = ({ IDL }) => {
|
|
|
350
360
|
[Result_1],
|
|
351
361
|
[],
|
|
352
362
|
),
|
|
363
|
+
'transformRequest' : IDL.Func([TransformArg], [HttpResponse], ['query']),
|
|
353
364
|
'uploadFileChunk' : IDL.Func(
|
|
354
365
|
[PublishingId, FileId, IDL.Nat, IDL.Vec(IDL.Nat8)],
|
|
355
366
|
[Result],
|
package/dist/commands/publish.js
CHANGED
|
@@ -35,7 +35,7 @@ export async function publish(options = {}) {
|
|
|
35
35
|
for (let key of ['name', 'version']) {
|
|
36
36
|
// @ts-ignore
|
|
37
37
|
if (!config.package[key]) {
|
|
38
|
-
console.log(chalk.red('Error: ') + `Please specify "${key}" in [
|
|
38
|
+
console.log(chalk.red('Error: ') + `Please specify "${key}" in [package] section in your mops.toml`);
|
|
39
39
|
process.exit(1);
|
|
40
40
|
}
|
|
41
41
|
}
|
|
@@ -59,6 +59,8 @@ async function init({ reset = false, silent = false } = {}) {
|
|
|
59
59
|
console.log('Steps to uninstall mocv:');
|
|
60
60
|
console.log('1. Run "mocv reset"');
|
|
61
61
|
console.log('2. Run "npm uninstall -g mocv"');
|
|
62
|
+
console.log('TIP: Alternative to "mocv use <version>" is "mops toolchain use moc <version>" (installs moc only for current project)');
|
|
63
|
+
console.log('TIP: More details at https://docs.mops.one/cli/toolchain');
|
|
62
64
|
process.exit(1);
|
|
63
65
|
}
|
|
64
66
|
}
|
|
@@ -24,6 +24,11 @@ type User =
|
|
|
24
24
|
twitter: text;
|
|
25
25
|
twitterVerified: bool;
|
|
26
26
|
};
|
|
27
|
+
type TransformArg =
|
|
28
|
+
record {
|
|
29
|
+
context: vec nat8;
|
|
30
|
+
response: HttpResponse;
|
|
31
|
+
};
|
|
27
32
|
type Time = int;
|
|
28
33
|
type Text = text;
|
|
29
34
|
type TestsChanges =
|
|
@@ -339,10 +344,22 @@ type Main =
|
|
|
339
344
|
startFileUpload: (PublishingId, Text, nat, blob) -> (Result_3);
|
|
340
345
|
startPublish: (PackageConfigV2) -> (Result_2);
|
|
341
346
|
transferOwnership: (PackageName, principal) -> (Result_1);
|
|
347
|
+
transformRequest: (TransformArg) -> (HttpResponse) query;
|
|
342
348
|
uploadFileChunk: (PublishingId, FileId, nat, blob) -> (Result);
|
|
343
349
|
uploadNotes: (PublishingId, text) -> (Result);
|
|
344
350
|
uploadTestStats: (PublishingId, TestStats) -> (Result);
|
|
345
351
|
};
|
|
352
|
+
type HttpResponse =
|
|
353
|
+
record {
|
|
354
|
+
body: vec nat8;
|
|
355
|
+
headers: vec HttpHeader;
|
|
356
|
+
status: nat;
|
|
357
|
+
};
|
|
358
|
+
type HttpHeader =
|
|
359
|
+
record {
|
|
360
|
+
name: text;
|
|
361
|
+
value: text;
|
|
362
|
+
};
|
|
346
363
|
type Header =
|
|
347
364
|
record {
|
|
348
365
|
text;
|
|
@@ -27,6 +27,12 @@ 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 HttpHeader { 'value' : string, 'name' : string }
|
|
31
|
+
export interface HttpResponse {
|
|
32
|
+
'status' : bigint,
|
|
33
|
+
'body' : Uint8Array | number[],
|
|
34
|
+
'headers' : Array<HttpHeader>,
|
|
35
|
+
}
|
|
30
36
|
export interface Main {
|
|
31
37
|
'backup' : ActorMethod<[], undefined>,
|
|
32
38
|
'computeHashesForExistingFiles' : ActorMethod<[], undefined>,
|
|
@@ -90,6 +96,7 @@ export interface Main {
|
|
|
90
96
|
>,
|
|
91
97
|
'startPublish' : ActorMethod<[PackageConfigV2], Result_2>,
|
|
92
98
|
'transferOwnership' : ActorMethod<[PackageName, Principal], Result_1>,
|
|
99
|
+
'transformRequest' : ActorMethod<[TransformArg], HttpResponse>,
|
|
93
100
|
'uploadFileChunk' : ActorMethod<
|
|
94
101
|
[PublishingId, FileId, bigint, Uint8Array | number[]],
|
|
95
102
|
Result
|
|
@@ -289,6 +296,10 @@ export interface TestsChanges {
|
|
|
289
296
|
}
|
|
290
297
|
export type Text = string;
|
|
291
298
|
export type Time = bigint;
|
|
299
|
+
export interface TransformArg {
|
|
300
|
+
'context' : Uint8Array | number[],
|
|
301
|
+
'response' : HttpResponse,
|
|
302
|
+
}
|
|
292
303
|
export interface User {
|
|
293
304
|
'id' : Principal,
|
|
294
305
|
'emailVerified' : boolean,
|
|
@@ -245,6 +245,16 @@ export const idlFactory = ({ IDL }) => {
|
|
|
245
245
|
'readme' : IDL.Text,
|
|
246
246
|
});
|
|
247
247
|
const Result_2 = IDL.Variant({ 'ok' : PublishingId, 'err' : Err });
|
|
248
|
+
const HttpHeader = IDL.Record({ 'value' : IDL.Text, 'name' : IDL.Text });
|
|
249
|
+
const HttpResponse = IDL.Record({
|
|
250
|
+
'status' : IDL.Nat,
|
|
251
|
+
'body' : IDL.Vec(IDL.Nat8),
|
|
252
|
+
'headers' : IDL.Vec(HttpHeader),
|
|
253
|
+
});
|
|
254
|
+
const TransformArg = IDL.Record({
|
|
255
|
+
'context' : IDL.Vec(IDL.Nat8),
|
|
256
|
+
'response' : HttpResponse,
|
|
257
|
+
});
|
|
248
258
|
const TestStats = IDL.Record({
|
|
249
259
|
'passedNames' : IDL.Vec(IDL.Text),
|
|
250
260
|
'passed' : IDL.Nat,
|
|
@@ -350,6 +360,7 @@ export const idlFactory = ({ IDL }) => {
|
|
|
350
360
|
[Result_1],
|
|
351
361
|
[],
|
|
352
362
|
),
|
|
363
|
+
'transformRequest' : IDL.Func([TransformArg], [HttpResponse], ['query']),
|
|
353
364
|
'uploadFileChunk' : IDL.Func(
|
|
354
365
|
[PublishingId, FileId, IDL.Nat, IDL.Vec(IDL.Nat8)],
|
|
355
366
|
[Result],
|
package/dist/package.json
CHANGED