@junobuild/cli 0.0.64 → 0.0.65
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/dist/index.js
CHANGED
|
@@ -2219,7 +2219,7 @@ Are you sure the folder containing your built app (the "source" tag in the confi
|
|
|
2219
2219
|
${r}`,"utf-8")},mNe=async()=>{await cNe(iQ,{recursive:!0}),await gu({command:"ic-wasm",args:[af(nQ,"satellite.wasm"),"-o",Zo,"shrink"]}),await gu({command:"ic-wasm",args:[Zo,"-o",Zo,"metadata","candid:service","-f",aQ,"-v","public"]}),await gu({command:"ic-wasm",args:[Zo,"-o",Zo,"metadata","juno:build","-d","extended","-v","public"]}),await gu({command:"ic-wasm",args:[Zo,"-o",Zo,"metadata","supported_certificate_versions","-d",'"1,2"',"-v","public"]})},yNe=async e=>{let t=`${Zo}.gz`,{size:r}=await lNe(t),n=i=>Intl.NumberFormat("en-US",{maximumSignificantDigits:2}).format(i/(1024*1024));e.succeed(`${(0,kl.green)("Success!")}
|
|
2220
2220
|
|
|
2221
2221
|
The satellite has been compiled.
|
|
2222
|
-
Output file: ${(0,kl.yellow)(`${dNe(process.cwd(),t)}`)} ${(0,kl.grey)(`(${n(r)}MB)`)}`)},gNe=async()=>{let{valid:e}=await eQ();return e===!1?{valid:e}:(e==="error"&&(await us(`The ${(0,kl.magenta)("ic-wasm")} ${(0,kl.yellow)(`v${hm}`)} tool is required to build a satellite but appears to be not available. Would you like to install it on your machine?`),await Vl({command:"cargo",args:["install",`ic-wasm@${hm}`]})),{valid:!0})},bNe=async()=>{let{valid:e}=await tQ();return e===!1?{valid:e}:(e==="error"&&(await us(`The ${(0,kl.magenta)("candid-extractor")} tool is required to generate the API ("did file") of your custom satellite but appears to be not available. Would you like to install it on your machine?`),await Vl({command:"cargo",args:["install","candid-extractor"]})),{valid:!0})};var pQ=Ot(er(),1);import{existsSync as vNe}from"node:fs";import{writeFile as xNe}from"node:fs/promises";import{join as ENe}from"node:path";var uQ={filename:my},lQ=async()=>await Qg(uQ),cQ=()=>gf(uQ);var dQ="../templates/docker",fQ=process.cwd(),hQ=async()=>{let{valid:e}=await B3();e==="error"||!e||(await R3(),await wNe(),await _Ne(),await Vl({command:"docker",args:["compose","up"]}))},mQ=async()=>{let{valid:e}=await B3();e==="error"||!e||(await R3(),await Vl({command:"docker",args:["compose","stop"]}))},wNe=async()=>{if(await lQ())return;await us("A config file is required for development. Would you like the CLI to create one for you?");let e=await yE();await Pp({template:`${my}.${e}`,sourceFolder:dQ,destinationFolder:fQ})},_Ne=async()=>{if(vNe("docker-compose.yml"))return;await us(`The CLI utilizes Docker Compose, which is handy for customizing configurations. Would you like the CLI to generate a default ${(0,pQ.magenta)("docker-compose.yml")} file for you?`);let{configType:e}=cQ(),t=await Dh({template:"docker-compose.yml",sourceFolder:dQ}),r=`${my}.${e}`,n=t.replaceAll("<JUNO_DEV_CONFIG>",r);await xNe(ENe(fQ,"docker-compose.yml"),n,"utf-8")};var Hp=Ot(er(),1);import{mkdir as ANe}from"node:fs/promises";import{join as AQ}from"node:path";var It=Ot(er(),1);var yw="0.0.
|
|
2222
|
+
Output file: ${(0,kl.yellow)(`${dNe(process.cwd(),t)}`)} ${(0,kl.grey)(`(${n(r)}MB)`)}`)},gNe=async()=>{let{valid:e}=await eQ();return e===!1?{valid:e}:(e==="error"&&(await us(`The ${(0,kl.magenta)("ic-wasm")} ${(0,kl.yellow)(`v${hm}`)} tool is required to build a satellite but appears to be not available. Would you like to install it on your machine?`),await Vl({command:"cargo",args:["install",`ic-wasm@${hm}`]})),{valid:!0})},bNe=async()=>{let{valid:e}=await tQ();return e===!1?{valid:e}:(e==="error"&&(await us(`The ${(0,kl.magenta)("candid-extractor")} tool is required to generate the API ("did file") of your custom satellite but appears to be not available. Would you like to install it on your machine?`),await Vl({command:"cargo",args:["install","candid-extractor"]})),{valid:!0})};var pQ=Ot(er(),1);import{existsSync as vNe}from"node:fs";import{writeFile as xNe}from"node:fs/promises";import{join as ENe}from"node:path";var uQ={filename:my},lQ=async()=>await Qg(uQ),cQ=()=>gf(uQ);var dQ="../templates/docker",fQ=process.cwd(),hQ=async()=>{let{valid:e}=await B3();e==="error"||!e||(await R3(),await wNe(),await _Ne(),await Vl({command:"docker",args:["compose","up"]}))},mQ=async()=>{let{valid:e}=await B3();e==="error"||!e||(await R3(),await Vl({command:"docker",args:["compose","stop"]}))},wNe=async()=>{if(await lQ())return;await us("A config file is required for development. Would you like the CLI to create one for you?");let e=await yE();await Pp({template:`${my}.${e}`,sourceFolder:dQ,destinationFolder:fQ})},_Ne=async()=>{if(vNe("docker-compose.yml"))return;await us(`The CLI utilizes Docker Compose, which is handy for customizing configurations. Would you like the CLI to generate a default ${(0,pQ.magenta)("docker-compose.yml")} file for you?`);let{configType:e}=cQ(),t=await Dh({template:"docker-compose.yml",sourceFolder:dQ}),r=`${my}.${e}`,n=t.replaceAll("<JUNO_DEV_CONFIG>",r);await xNe(ENe(fQ,"docker-compose.yml"),n,"utf-8")};var Hp=Ot(er(),1);import{mkdir as ANe}from"node:fs/promises";import{join as AQ}from"node:path";var It=Ot(er(),1);var yw="0.0.65";var TNe=` __ __ __ __ _ ____
|
|
2223
2223
|
__) || | || \\| |/ \\
|
|
2224
2224
|
\\___/ \\___/ |_|\\__|\\____/`,jl=`${TNe} CLI ${(0,It.grey)(`v${yw}`)}`,gw=`
|
|
2225
2225
|
${jl}
|
package/package.json
CHANGED
|
@@ -17,6 +17,13 @@ type AssetNoContent = record {
|
|
|
17
17
|
encodings : vec record { text; AssetEncodingNoContent };
|
|
18
18
|
headers : vec record { text; text };
|
|
19
19
|
created_at : nat64;
|
|
20
|
+
version : opt nat64;
|
|
21
|
+
};
|
|
22
|
+
type AuthenticationConfig = record {
|
|
23
|
+
internet_identity : opt AuthenticationConfigInternetIdentity;
|
|
24
|
+
};
|
|
25
|
+
type AuthenticationConfigInternetIdentity = record {
|
|
26
|
+
derivation_origin : opt text;
|
|
20
27
|
};
|
|
21
28
|
type CommitBatch = record {
|
|
22
29
|
batch_id : nat;
|
|
@@ -35,9 +42,10 @@ type ControllerScope = variant { Write; Admin };
|
|
|
35
42
|
type CustomDomain = record {
|
|
36
43
|
updated_at : nat64;
|
|
37
44
|
created_at : nat64;
|
|
45
|
+
version : opt nat64;
|
|
38
46
|
bn_id : opt text;
|
|
39
47
|
};
|
|
40
|
-
type DelDoc = record {
|
|
48
|
+
type DelDoc = record { version : opt nat64 };
|
|
41
49
|
type DeleteControllersArgs = record { controllers : vec principal };
|
|
42
50
|
type DepositCyclesArgs = record { cycles : nat; destination_id : principal };
|
|
43
51
|
type Doc = record {
|
|
@@ -46,6 +54,7 @@ type Doc = record {
|
|
|
46
54
|
data : vec nat8;
|
|
47
55
|
description : opt text;
|
|
48
56
|
created_at : nat64;
|
|
57
|
+
version : opt nat64;
|
|
49
58
|
};
|
|
50
59
|
type HttpRequest = record {
|
|
51
60
|
url : text;
|
|
@@ -97,11 +106,13 @@ type Memory = variant { Heap; Stable };
|
|
|
97
106
|
type MemorySize = record { stable : nat64; heap : nat64 };
|
|
98
107
|
type Permission = variant { Controllers; Private; Public; Managed };
|
|
99
108
|
type Rule = record {
|
|
109
|
+
max_capacity : opt nat32;
|
|
100
110
|
memory : opt Memory;
|
|
101
111
|
updated_at : nat64;
|
|
102
112
|
max_size : opt nat;
|
|
103
113
|
read : Permission;
|
|
104
114
|
created_at : nat64;
|
|
115
|
+
version : opt nat64;
|
|
105
116
|
mutable_permissions : opt bool;
|
|
106
117
|
write : Permission;
|
|
107
118
|
};
|
|
@@ -116,15 +127,16 @@ type SetControllersArgs = record {
|
|
|
116
127
|
controllers : vec principal;
|
|
117
128
|
};
|
|
118
129
|
type SetDoc = record {
|
|
119
|
-
updated_at : opt nat64;
|
|
120
130
|
data : vec nat8;
|
|
121
131
|
description : opt text;
|
|
132
|
+
version : opt nat64;
|
|
122
133
|
};
|
|
123
134
|
type SetRule = record {
|
|
135
|
+
max_capacity : opt nat32;
|
|
124
136
|
memory : opt Memory;
|
|
125
|
-
updated_at : opt nat64;
|
|
126
137
|
max_size : opt nat;
|
|
127
138
|
read : Permission;
|
|
139
|
+
version : opt nat64;
|
|
128
140
|
mutable_permissions : opt bool;
|
|
129
141
|
write : Permission;
|
|
130
142
|
};
|
|
@@ -132,9 +144,11 @@ type StorageConfig = record {
|
|
|
132
144
|
iframe : opt StorageConfigIFrame;
|
|
133
145
|
rewrites : vec record { text; text };
|
|
134
146
|
headers : vec record { text; vec record { text; text } };
|
|
147
|
+
raw_access : opt StorageConfigRawAccess;
|
|
135
148
|
redirects : opt vec record { text; StorageConfigRedirect };
|
|
136
149
|
};
|
|
137
150
|
type StorageConfigIFrame = variant { Deny; AllowAny; SameOrigin };
|
|
151
|
+
type StorageConfigRawAccess = variant { Deny; Allow };
|
|
138
152
|
type StorageConfigRedirect = record { status_code : nat16; location : text };
|
|
139
153
|
type StreamingCallbackHttpResponse = record {
|
|
140
154
|
token : opt StreamingCallbackToken;
|
|
@@ -178,6 +192,7 @@ service : () -> {
|
|
|
178
192
|
del_rule : (RulesType, text, DelDoc) -> ();
|
|
179
193
|
deposit_cycles : (DepositCyclesArgs) -> ();
|
|
180
194
|
get_asset : (text, text) -> (opt AssetNoContent) query;
|
|
195
|
+
get_auth_config : () -> (opt AuthenticationConfig) query;
|
|
181
196
|
get_config : () -> (Config);
|
|
182
197
|
get_doc : (text, text) -> (opt Doc) query;
|
|
183
198
|
get_many_assets : (vec record { text; text }) -> (
|
|
@@ -197,6 +212,7 @@ service : () -> {
|
|
|
197
212
|
list_docs : (text, ListParams) -> (ListResults_1) query;
|
|
198
213
|
list_rules : (RulesType) -> (vec record { text; Rule }) query;
|
|
199
214
|
memory_size : () -> (MemorySize) query;
|
|
215
|
+
set_auth_config : (AuthenticationConfig) -> ();
|
|
200
216
|
set_config : (Config) -> ();
|
|
201
217
|
set_controllers : (SetControllersArgs) -> (
|
|
202
218
|
vec record { principal; Controller },
|