@blocklet/constant 1.16.20 → 1.16.21-beta-edf184e1

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 (4) hide show
  1. package/index.js +1094 -296
  2. package/index.ts +326 -0
  3. package/package.json +6 -4
  4. package/index.d.ts +0 -252
package/index.js CHANGED
@@ -1,316 +1,1114 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.BLOCKLET_APP_SPACE_ENDPOINTS = exports.BLOCKLET_CONFIGURABLE_KEY = exports.BLOCKLET_LATEST_REQUIREMENT_ABTNODE = exports.BLOCKLET_LATEST_REQUIREMENT_SERVER = exports.BLOCKLET_LATEST_SPEC_VERSION = exports.BLOCKLET_UPLOADS_DIR = exports.BLOCKLET_DEFAULT_VERSION = exports.PROJECT = exports.BLOCKLET_PREFERENCE_PREFIX = exports.BLOCKLET_PREFERENCE_FILE = exports.BLOCKLET_META_FILE_ALT = exports.BLOCKLET_META_FILE = exports.BLOCKLET_ENTRY_FILE = exports.BLOCKLET_BUNDLE_FILE = exports.BLOCKLET_BUNDLE_FOLDER_NAME = exports.BLOCKLET_RELEASE_FOLDER_NAME = exports.BLOCKLET_BUNDLE_FOLDER = exports.BLOCKLET_RELEASE_FILE = exports.BLOCKLET_RELEASE_FOLDER = exports.BLOCKLET_DEFAULT_PATH_REWRITE = exports.BLOCKLET_DEFAULT_PORT_NAME = exports.BLOCKLET_DYNAMIC_PATH_PREFIX = exports.BLOCKLET_INTERFACE_PROTOCOLS = exports.BLOCKLET_INTERFACE_PROTOCOL_UDP = exports.BLOCKLET_INTERFACE_PROTOCOL_TCP = exports.BLOCKLET_INTERFACE_PROTOCOL_HTTP = exports.BLOCKLET_STANDARD_INTERFACES = exports.BLOCKLET_UI_INTERFACES = exports.BLOCKLET_INTERFACE_WELLKNOWN = exports.BLOCKLET_INTERFACE_PUBLIC = exports.BLOCKLET_INTERFACE_TYPES = exports.BLOCKLET_INTERFACE_TYPE_WELLKNOWN = exports.BLOCKLET_INTERFACE_TYPE_SERVICE = exports.BLOCKLET_INTERFACE_TYPE_WEB = exports.BLOCKLET_FACTORY_SHARES = exports.BLOCKLET_MODES = exports.BLOCKLET_ARCHITECTURES = exports.BLOCKLET_PLATFORMS = exports.BlockletInternalEvents = exports.BlockletEvents = exports.BLOCKLET_GROUPS = exports.BlockletGroup = exports.toBlockletSource = exports.fromBlockletSource = exports.BlockletSource = exports.toBlockletStatus = exports.fromBlockletStatus = exports.SUSPENDED_REASON = exports.BLOCKLET_CONTROLLER_STATUS = exports.BlockletStatus = void 0;
4
- exports.MAX_TITLE_LENGTH = exports.COMPONENT_ENV_FILE_NAME = exports.APP_CONFIG_FILE_PATH = exports.APP_CONFIG_DIR = exports.LOGIN_PROVIDER = exports.SUPPORTED_LANGUAGES = exports.CHAIN_PROP_MAP_REVERSE = exports.CHAIN_PROP_MAP = exports.RESTORE_PROGRESS_STATUS = exports.CHAIN_INFO_CONFIG = void 0;
5
- const fromEntry = (entries) => (v) => {
6
- const match = Object.entries(entries).find((x) => x[1] === Number(v));
7
- return match ? match[0] : 'unknown';
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __export = (target, all) => {
6
+ for (var name in all)
7
+ __defProp(target, name, { get: all[name], enumerable: true });
8
8
  };
9
- // deprecated: toEntry is same as fromEntry
10
- const toEntry = (entries) => (v) => Object.keys(entries).find((x) => entries[x] === Number(v));
11
- // Blocklet Status
12
- exports.BlockletStatus = Object.freeze({
13
- added: 0,
14
- downloading: 1,
15
- downloaded: 2,
16
- installing: 3,
17
- installed: 4,
18
- starting: 5,
19
- running: 6,
20
- stopping: 7,
21
- stopped: 8,
22
- error: 9,
23
- upgrading: 10,
24
- restarting: 11,
25
- corrupted: 12,
26
- waiting: 13,
27
- deleted: 14,
9
+ var __copyProps = (to, from, except, desc) => {
10
+ if (from && typeof from === "object" || typeof from === "function") {
11
+ for (let key of __getOwnPropNames(from))
12
+ if (!__hasOwnProp.call(to, key) && key !== except)
13
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
+ }
15
+ return to;
16
+ };
17
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
+
19
+ // index.ts
20
+ var constant_exports = {};
21
+ __export(constant_exports, {
22
+ APP_CONFIG_DIR: () => APP_CONFIG_DIR,
23
+ APP_CONFIG_FILE_PATH: () => APP_CONFIG_FILE_PATH,
24
+ BLOCKLET_APP_SPACE_ENDPOINTS: () => BLOCKLET_APP_SPACE_ENDPOINTS,
25
+ BLOCKLET_ARCHITECTURES: () => BLOCKLET_ARCHITECTURES,
26
+ BLOCKLET_BUNDLE_FILE: () => BLOCKLET_BUNDLE_FILE,
27
+ BLOCKLET_BUNDLE_FOLDER: () => BLOCKLET_BUNDLE_FOLDER,
28
+ BLOCKLET_BUNDLE_FOLDER_NAME: () => BLOCKLET_BUNDLE_FOLDER_NAME,
29
+ BLOCKLET_CONFIGURABLE_KEY: () => BLOCKLET_CONFIGURABLE_KEY,
30
+ BLOCKLET_CONTROLLER_STATUS: () => BLOCKLET_CONTROLLER_STATUS,
31
+ BLOCKLET_DEFAULT_PATH_REWRITE: () => BLOCKLET_DEFAULT_PATH_REWRITE,
32
+ BLOCKLET_DEFAULT_PORT_NAME: () => BLOCKLET_DEFAULT_PORT_NAME,
33
+ BLOCKLET_DEFAULT_VERSION: () => BLOCKLET_DEFAULT_VERSION,
34
+ BLOCKLET_DYNAMIC_PATH_PREFIX: () => BLOCKLET_DYNAMIC_PATH_PREFIX,
35
+ BLOCKLET_ENTRY_FILE: () => BLOCKLET_ENTRY_FILE,
36
+ BLOCKLET_FACTORY_SHARES: () => BLOCKLET_FACTORY_SHARES,
37
+ BLOCKLET_GROUPS: () => BLOCKLET_GROUPS,
38
+ BLOCKLET_INTERFACE_PROTOCOLS: () => BLOCKLET_INTERFACE_PROTOCOLS,
39
+ BLOCKLET_INTERFACE_PROTOCOL_HTTP: () => BLOCKLET_INTERFACE_PROTOCOL_HTTP,
40
+ BLOCKLET_INTERFACE_PROTOCOL_TCP: () => BLOCKLET_INTERFACE_PROTOCOL_TCP,
41
+ BLOCKLET_INTERFACE_PROTOCOL_UDP: () => BLOCKLET_INTERFACE_PROTOCOL_UDP,
42
+ BLOCKLET_INTERFACE_PUBLIC: () => BLOCKLET_INTERFACE_PUBLIC,
43
+ BLOCKLET_INTERFACE_TYPES: () => BLOCKLET_INTERFACE_TYPES,
44
+ BLOCKLET_INTERFACE_TYPE_SERVICE: () => BLOCKLET_INTERFACE_TYPE_SERVICE,
45
+ BLOCKLET_INTERFACE_TYPE_WEB: () => BLOCKLET_INTERFACE_TYPE_WEB,
46
+ BLOCKLET_INTERFACE_TYPE_WELLKNOWN: () => BLOCKLET_INTERFACE_TYPE_WELLKNOWN,
47
+ BLOCKLET_INTERFACE_WELLKNOWN: () => BLOCKLET_INTERFACE_WELLKNOWN,
48
+ BLOCKLET_LATEST_REQUIREMENT_ABTNODE: () => BLOCKLET_LATEST_REQUIREMENT_ABTNODE,
49
+ BLOCKLET_LATEST_REQUIREMENT_SERVER: () => BLOCKLET_LATEST_REQUIREMENT_SERVER,
50
+ BLOCKLET_LATEST_SPEC_VERSION: () => BLOCKLET_LATEST_SPEC_VERSION,
51
+ BLOCKLET_META_FILE: () => BLOCKLET_META_FILE,
52
+ BLOCKLET_META_FILE_ALT: () => BLOCKLET_META_FILE_ALT,
53
+ BLOCKLET_MODES: () => BLOCKLET_MODES,
54
+ BLOCKLET_PLATFORMS: () => BLOCKLET_PLATFORMS,
55
+ BLOCKLET_PREFERENCE_FILE: () => BLOCKLET_PREFERENCE_FILE,
56
+ BLOCKLET_PREFERENCE_PREFIX: () => BLOCKLET_PREFERENCE_PREFIX,
57
+ BLOCKLET_RELEASE_FILE: () => BLOCKLET_RELEASE_FILE,
58
+ BLOCKLET_RELEASE_FOLDER: () => BLOCKLET_RELEASE_FOLDER,
59
+ BLOCKLET_RELEASE_FOLDER_NAME: () => BLOCKLET_RELEASE_FOLDER_NAME,
60
+ BLOCKLET_STANDARD_INTERFACES: () => BLOCKLET_STANDARD_INTERFACES,
61
+ BLOCKLET_UI_INTERFACES: () => BLOCKLET_UI_INTERFACES,
62
+ BLOCKLET_UPLOADS_DIR: () => BLOCKLET_UPLOADS_DIR,
63
+ BlockletEvents: () => BlockletEvents,
64
+ BlockletGroup: () => BlockletGroup,
65
+ BlockletInternalEvents: () => BlockletInternalEvents,
66
+ BlockletSource: () => BlockletSource,
67
+ BlockletStatus: () => BlockletStatus,
68
+ CHAIN_INFO_CONFIG: () => CHAIN_INFO_CONFIG,
69
+ CHAIN_PROP_MAP: () => CHAIN_PROP_MAP,
70
+ CHAIN_PROP_MAP_REVERSE: () => CHAIN_PROP_MAP_REVERSE,
71
+ COMPONENT_ENV_FILE_NAME: () => COMPONENT_ENV_FILE_NAME,
72
+ LOGIN_PROVIDER: () => LOGIN_PROVIDER,
73
+ MAX_TITLE_LENGTH: () => MAX_TITLE_LENGTH,
74
+ PROJECT: () => PROJECT,
75
+ RESTORE_PROGRESS_STATUS: () => RESTORE_PROGRESS_STATUS,
76
+ SUPPORTED_LANGUAGES: () => languages_default,
77
+ SUSPENDED_REASON: () => SUSPENDED_REASON,
78
+ fromBlockletSource: () => fromBlockletSource,
79
+ fromBlockletStatus: () => fromBlockletStatus,
80
+ toBlockletSource: () => toBlockletSource,
81
+ toBlockletStatus: () => toBlockletStatus
82
+ });
83
+ module.exports = __toCommonJS(constant_exports);
84
+
85
+ // languages.ts
86
+ var SUPPORTED_LANGUAGES = {
87
+ en: {
88
+ name: "English",
89
+ nativeName: "English"
90
+ },
91
+ es: {
92
+ name: "Spanish",
93
+ nativeName: "Espa\xF1ol"
94
+ },
95
+ zh: {
96
+ name: "Simplified Chinese",
97
+ nativeName: "\u7B80\u4F53\u4E2D\u6587"
98
+ },
99
+ "zh-TW": {
100
+ name: "Traditional Chinese",
101
+ nativeName: "\u7E41\u9AD4\u4E2D\u6587"
102
+ },
103
+ fr: {
104
+ name: "French",
105
+ nativeName: "Fran\xE7ais"
106
+ },
107
+ it: {
108
+ name: "Italian",
109
+ nativeName: "Italiano"
110
+ },
111
+ ja: {
112
+ name: "Japanese",
113
+ nativeName: "\u65E5\u672C\u8A9E"
114
+ },
115
+ ko: {
116
+ name: "Korean",
117
+ nativeName: "\uD55C\uAD6D\uC5B4"
118
+ },
119
+ pt: {
120
+ name: "Portuguese",
121
+ nativeName: "Portugu\xEAs"
122
+ },
123
+ ru: {
124
+ name: "Russian",
125
+ nativeName: "\u0420\u0443\u0441\u0441\u043A\u0438\u0439"
126
+ },
127
+ ar: {
128
+ name: "Arabic",
129
+ nativeName: "\u0627\u064E\u0644\u0652\u0639\u064E\u0631\u064E\u0628\u0650\u064A\u064E\u0651\u0629\u064F"
130
+ },
131
+ de: {
132
+ name: "German",
133
+ nativeName: "Deutsch"
134
+ },
135
+ mn: {
136
+ name: "Mongolian",
137
+ nativeName: "\u041C\u043E\u043D\u0433\u043E\u043B \u0445\u044D\u043B"
138
+ },
139
+ hi: {
140
+ name: "Hindi",
141
+ nativeName: "\u0939\u093F\u0928\u094D\u0926\u0940"
142
+ },
143
+ bn: {
144
+ name: "Bengali",
145
+ nativeName: "\u09AC\u09BE\u0982\u09B2\u09BE"
146
+ },
147
+ vi: {
148
+ name: "Vietnamese",
149
+ nativeName: "Ti\u1EBFng Vi\u1EC7t"
150
+ },
151
+ tr: {
152
+ name: "Turkish",
153
+ nativeName: "T\xFCrk\xE7e"
154
+ },
155
+ te: {
156
+ name: "Telugu",
157
+ nativeName: "\u0C24\u0C46\u0C32\u0C41\u0C17\u0C41"
158
+ },
159
+ ur: {
160
+ name: "Urdu",
161
+ nativeName: "\u0627\u0631\u062F\u0648"
162
+ },
163
+ mr: {
164
+ name: "Marathi",
165
+ nativeName: "\u092E\u0930\u093E\u0920\u0940"
166
+ },
167
+ pa: {
168
+ name: "Panjabi",
169
+ nativeName: "\u0A2A\u0A70\u0A1C\u0A3E\u0A2C\u0A40"
170
+ },
171
+ aa: {
172
+ name: "Afar",
173
+ nativeName: "Afaraf"
174
+ },
175
+ ab: {
176
+ name: "Abkhaz",
177
+ nativeName: "\u0430\u04A7\u0441\u0443\u0430 \u0431\u044B\u0437\u0448\u04D9\u0430"
178
+ },
179
+ ae: {
180
+ name: "Avestan",
181
+ nativeName: "avesta"
182
+ },
183
+ af: {
184
+ name: "Afrikaans",
185
+ nativeName: "Afrikaans"
186
+ },
187
+ ak: {
188
+ name: "Akan",
189
+ nativeName: "Akan"
190
+ },
191
+ am: {
192
+ name: "Amharic",
193
+ nativeName: "\u12A0\u121B\u122D\u129B"
194
+ },
195
+ an: {
196
+ name: "Aragonese",
197
+ nativeName: "aragon\xE9s"
198
+ },
199
+ as: {
200
+ name: "Assamese",
201
+ nativeName: "\u0985\u09B8\u09AE\u09C0\u09AF\u09BC\u09BE"
202
+ },
203
+ av: {
204
+ name: "Avaric",
205
+ nativeName: "\u0430\u0432\u0430\u0440 \u043C\u0430\u0446\u04C0"
206
+ },
207
+ ay: {
208
+ name: "Aymara",
209
+ nativeName: "aymar aru"
210
+ },
211
+ az: {
212
+ name: "Azerbaijani",
213
+ nativeName: "az\u0259rbaycan dili"
214
+ },
215
+ ba: {
216
+ name: "Bashkir",
217
+ nativeName: "\u0431\u0430\u0448\u04A1\u043E\u0440\u0442 \u0442\u0435\u043B\u0435"
218
+ },
219
+ be: {
220
+ name: "Belarusian",
221
+ nativeName: "\u0431\u0435\u043B\u0430\u0440\u0443\u0441\u043A\u0430\u044F \u043C\u043E\u0432\u0430"
222
+ },
223
+ bg: {
224
+ name: "Bulgarian",
225
+ nativeName: "\u0431\u044A\u043B\u0433\u0430\u0440\u0441\u043A\u0438 \u0435\u0437\u0438\u043A"
226
+ },
227
+ bi: {
228
+ name: "Bislama",
229
+ nativeName: "Bislama"
230
+ },
231
+ bm: {
232
+ name: "Bambara",
233
+ nativeName: "bamanankan"
234
+ },
235
+ bo: {
236
+ name: "Tibetan",
237
+ nativeName: "\u0F56\u0F7C\u0F51\u0F0B\u0F61\u0F72\u0F42"
238
+ },
239
+ br: {
240
+ name: "Breton",
241
+ nativeName: "brezhoneg"
242
+ },
243
+ bs: {
244
+ name: "Bosnian",
245
+ nativeName: "bosanski jezik"
246
+ },
247
+ ca: {
248
+ name: "Catalan",
249
+ nativeName: "Catal\xE0"
250
+ },
251
+ ce: {
252
+ name: "Chechen",
253
+ nativeName: "\u043D\u043E\u0445\u0447\u0438\u0439\u043D \u043C\u043E\u0442\u0442"
254
+ },
255
+ ch: {
256
+ name: "Chamorro",
257
+ nativeName: "Chamoru"
258
+ },
259
+ co: {
260
+ name: "Corsican",
261
+ nativeName: "corsu"
262
+ },
263
+ cr: {
264
+ name: "Cree",
265
+ nativeName: "\u14C0\u1426\u1403\u152D\u140D\u140F\u1423"
266
+ },
267
+ cs: {
268
+ name: "Czech",
269
+ nativeName: "\u010De\u0161tina"
270
+ },
271
+ cu: {
272
+ name: "Old Church Slavonic",
273
+ nativeName: "\u0469\u0437\u044B\u043A\u044A \u0441\u043B\u043E\u0432\u0463\u043D\u044C\u0441\u043A\u044A"
274
+ },
275
+ cv: {
276
+ name: "Chuvash",
277
+ nativeName: "\u0447\u04D1\u0432\u0430\u0448 \u0447\u04D7\u043B\u0445\u0438"
278
+ },
279
+ cy: {
280
+ name: "Welsh",
281
+ nativeName: "Cymraeg"
282
+ },
283
+ da: {
284
+ name: "Danish",
285
+ nativeName: "dansk"
286
+ },
287
+ dv: {
288
+ name: "Divehi",
289
+ nativeName: "\u078B\u07A8\u0788\u07AC\u0780\u07A8"
290
+ },
291
+ dz: {
292
+ name: "Dzongkha",
293
+ nativeName: "\u0F62\u0FAB\u0F7C\u0F44\u0F0B\u0F41"
294
+ },
295
+ ee: {
296
+ name: "Ewe",
297
+ nativeName: "E\u028Begbe"
298
+ },
299
+ el: {
300
+ name: "Greek",
301
+ nativeName: "\u0395\u03BB\u03BB\u03B7\u03BD\u03B9\u03BA\u03AC"
302
+ },
303
+ eo: {
304
+ name: "Esperanto",
305
+ nativeName: "Esperanto"
306
+ },
307
+ et: {
308
+ name: "Estonian",
309
+ nativeName: "eesti"
310
+ },
311
+ eu: {
312
+ name: "Basque",
313
+ nativeName: "euskara"
314
+ },
315
+ fa: {
316
+ name: "Persian",
317
+ nativeName: "\u0641\u0627\u0631\u0633\u06CC"
318
+ },
319
+ ff: {
320
+ name: "Fula",
321
+ nativeName: "Fulfulde"
322
+ },
323
+ fi: {
324
+ name: "Finnish",
325
+ nativeName: "suomi"
326
+ },
327
+ fj: {
328
+ name: "Fijian",
329
+ nativeName: "vosa Vakaviti"
330
+ },
331
+ fo: {
332
+ name: "Faroese",
333
+ nativeName: "f\xF8royskt"
334
+ },
335
+ fy: {
336
+ name: "Western Frisian",
337
+ nativeName: "Frysk"
338
+ },
339
+ ga: {
340
+ name: "Irish",
341
+ nativeName: "Gaeilge"
342
+ },
343
+ gd: {
344
+ name: "Scottish Gaelic",
345
+ nativeName: "G\xE0idhlig"
346
+ },
347
+ gl: {
348
+ name: "Galician",
349
+ nativeName: "galego"
350
+ },
351
+ gn: {
352
+ name: "Guaran\xED",
353
+ nativeName: "Ava\xF1e'\u1EBD"
354
+ },
355
+ gu: {
356
+ name: "Gujarati",
357
+ nativeName: "\u0A97\u0AC1\u0A9C\u0AB0\u0ABE\u0AA4\u0AC0"
358
+ },
359
+ gv: {
360
+ name: "Manx",
361
+ nativeName: "Gaelg"
362
+ },
363
+ ha: {
364
+ name: "Hausa",
365
+ nativeName: "\u0647\u064E\u0648\u064F\u0633\u064E"
366
+ },
367
+ he: {
368
+ name: "Hebrew",
369
+ nativeName: "\u05E2\u05D1\u05E8\u05D9\u05EA"
370
+ },
371
+ ho: {
372
+ name: "Hiri Motu",
373
+ nativeName: "Hiri Motu"
374
+ },
375
+ hr: {
376
+ name: "Croatian",
377
+ nativeName: "Hrvatski"
378
+ },
379
+ ht: {
380
+ name: "Haitian",
381
+ nativeName: "Krey\xF2l ayisyen"
382
+ },
383
+ hu: {
384
+ name: "Hungarian",
385
+ nativeName: "magyar"
386
+ },
387
+ hy: {
388
+ name: "Armenian",
389
+ nativeName: "\u0540\u0561\u0575\u0565\u0580\u0565\u0576"
390
+ },
391
+ hz: {
392
+ name: "Herero",
393
+ nativeName: "Otjiherero"
394
+ },
395
+ ia: {
396
+ name: "Interlingua",
397
+ nativeName: "Interlingua"
398
+ },
399
+ id: {
400
+ name: "Indonesian",
401
+ nativeName: "Bahasa Indonesia"
402
+ },
403
+ ie: {
404
+ name: "Interlingue",
405
+ nativeName: "Interlingue"
406
+ },
407
+ ig: {
408
+ name: "Igbo",
409
+ nativeName: "As\u1EE5s\u1EE5 Igbo"
410
+ },
411
+ ii: {
412
+ name: "Nuosu",
413
+ nativeName: "\uA188\uA320\uA4BF Nuosuhxop"
414
+ },
415
+ ik: {
416
+ name: "Inupiaq",
417
+ nativeName: "I\xF1upiaq"
418
+ },
419
+ io: {
420
+ name: "Ido",
421
+ nativeName: "Ido"
422
+ },
423
+ is: {
424
+ name: "Icelandic",
425
+ nativeName: "\xCDslenska"
426
+ },
427
+ iu: {
428
+ name: "Inuktitut",
429
+ nativeName: "\u1403\u14C4\u1483\u144E\u1450\u1466"
430
+ },
431
+ jv: {
432
+ name: "Javanese",
433
+ nativeName: "basa Jawa"
434
+ },
435
+ ka: {
436
+ name: "Georgian",
437
+ nativeName: "\u10E5\u10D0\u10E0\u10D7\u10E3\u10DA\u10D8"
438
+ },
439
+ kg: {
440
+ name: "Kongo",
441
+ nativeName: "Kikongo"
442
+ },
443
+ ki: {
444
+ name: "Kikuyu",
445
+ nativeName: "G\u0129k\u0169y\u0169"
446
+ },
447
+ kj: {
448
+ name: "Kwanyama",
449
+ nativeName: "Kuanyama"
450
+ },
451
+ kk: {
452
+ name: "Kazakh",
453
+ nativeName: "\u049B\u0430\u0437\u0430\u049B \u0442\u0456\u043B\u0456"
454
+ },
455
+ kl: {
456
+ name: "Kalaallisut",
457
+ nativeName: "kalaallisut"
458
+ },
459
+ km: {
460
+ name: "Khmer",
461
+ nativeName: "\u1781\u17C1\u1798\u179A\u1797\u17B6\u179F\u17B6"
462
+ },
463
+ kn: {
464
+ name: "Kannada",
465
+ nativeName: "\u0C95\u0CA8\u0CCD\u0CA8\u0CA1"
466
+ },
467
+ kr: {
468
+ name: "Kanuri",
469
+ nativeName: "Kanuri"
470
+ },
471
+ ks: {
472
+ name: "Kashmiri",
473
+ nativeName: "\u0915\u0936\u094D\u092E\u0940\u0930\u0940"
474
+ },
475
+ ku: {
476
+ name: "Kurdish",
477
+ nativeName: "Kurd\xEE"
478
+ },
479
+ kv: {
480
+ name: "Komi",
481
+ nativeName: "\u043A\u043E\u043C\u0438 \u043A\u044B\u0432"
482
+ },
483
+ kw: {
484
+ name: "Cornish",
485
+ nativeName: "Kernewek"
486
+ },
487
+ ky: {
488
+ name: "Kyrgyz",
489
+ nativeName: "\u041A\u044B\u0440\u0433\u044B\u0437\u0447\u0430"
490
+ },
491
+ la: {
492
+ name: "Latin",
493
+ nativeName: "latine"
494
+ },
495
+ lb: {
496
+ name: "Luxembourgish",
497
+ nativeName: "L\xEBtzebuergesch"
498
+ },
499
+ lg: {
500
+ name: "Ganda",
501
+ nativeName: "Luganda"
502
+ },
503
+ li: {
504
+ name: "Limburgish",
505
+ nativeName: "Limburgs"
506
+ },
507
+ ln: {
508
+ name: "Lingala",
509
+ nativeName: "Ling\xE1la"
510
+ },
511
+ lo: {
512
+ name: "Lao",
513
+ nativeName: "\u0E9E\u0EB2\u0EAA\u0EB2\u0EA5\u0EB2\u0EA7"
514
+ },
515
+ lt: {
516
+ name: "Lithuanian",
517
+ nativeName: "lietuvi\u0173 kalba"
518
+ },
519
+ lu: {
520
+ name: "Luba-Katanga",
521
+ nativeName: "Kiluba"
522
+ },
523
+ lv: {
524
+ name: "Latvian",
525
+ nativeName: "latvie\u0161u valoda"
526
+ },
527
+ mg: {
528
+ name: "Malagasy",
529
+ nativeName: "fiteny malagasy"
530
+ },
531
+ mh: {
532
+ name: "Marshallese",
533
+ nativeName: "Kajin M\u0327aje\u013C"
534
+ },
535
+ mi: {
536
+ name: "M\u0101ori",
537
+ nativeName: "te reo M\u0101ori"
538
+ },
539
+ mk: {
540
+ name: "Macedonian",
541
+ nativeName: "\u043C\u0430\u043A\u0435\u0434\u043E\u043D\u0441\u043A\u0438 \u0458\u0430\u0437\u0438\u043A"
542
+ },
543
+ ml: {
544
+ name: "Malayalam",
545
+ nativeName: "\u0D2E\u0D32\u0D2F\u0D3E\u0D33\u0D02"
546
+ },
547
+ ms: {
548
+ name: "Malay",
549
+ nativeName: "Bahasa Melayu"
550
+ },
551
+ mt: {
552
+ name: "Maltese",
553
+ nativeName: "Malti"
554
+ },
555
+ my: {
556
+ name: "Burmese",
557
+ nativeName: "\u1017\u1019\u102C\u1005\u102C"
558
+ },
559
+ na: {
560
+ name: "Nauru",
561
+ nativeName: "Dorerin Naoero"
562
+ },
563
+ nb: {
564
+ name: "Norwegian Bokm\xE5l",
565
+ nativeName: "Norsk bokm\xE5l"
566
+ },
567
+ nd: {
568
+ name: "Northern Ndebele",
569
+ nativeName: "isiNdebele"
570
+ },
571
+ ne: {
572
+ name: "Nepali",
573
+ nativeName: "\u0928\u0947\u092A\u093E\u0932\u0940"
574
+ },
575
+ ng: {
576
+ name: "Ndonga",
577
+ nativeName: "Owambo"
578
+ },
579
+ nl: {
580
+ name: "Dutch",
581
+ nativeName: "Nederlands"
582
+ },
583
+ nn: {
584
+ name: "Norwegian Nynorsk",
585
+ nativeName: "Norsk nynorsk"
586
+ },
587
+ no: {
588
+ name: "Norwegian",
589
+ nativeName: "Norsk"
590
+ },
591
+ nr: {
592
+ name: "Southern Ndebele",
593
+ nativeName: "isiNdebele"
594
+ },
595
+ nv: {
596
+ name: "Navajo",
597
+ nativeName: "Din\xE9 bizaad"
598
+ },
599
+ ny: {
600
+ name: "Chichewa",
601
+ nativeName: "chiChe\u0175a"
602
+ },
603
+ oc: {
604
+ name: "Occitan",
605
+ nativeName: "occitan"
606
+ },
607
+ oj: {
608
+ name: "Ojibwe",
609
+ nativeName: "\u140A\u14C2\u1511\u14C8\u142F\u14A7\u140E\u14D0"
610
+ },
611
+ om: {
612
+ name: "Oromo",
613
+ nativeName: "Afaan Oromoo"
614
+ },
615
+ or: {
616
+ name: "Oriya",
617
+ nativeName: "\u0B13\u0B21\u0B3C\u0B3F\u0B06"
618
+ },
619
+ os: {
620
+ name: "Ossetian",
621
+ nativeName: "\u0438\u0440\u043E\u043D \xE6\u0432\u0437\u0430\u0433"
622
+ },
623
+ pi: {
624
+ name: "P\u0101li",
625
+ nativeName: "\u092A\u093E\u0934\u093F"
626
+ },
627
+ pl: {
628
+ name: "Polish",
629
+ nativeName: "Polski"
630
+ },
631
+ ps: {
632
+ name: "Pashto",
633
+ nativeName: "\u067E\u069A\u062A\u0648"
634
+ },
635
+ qu: {
636
+ name: "Quechua",
637
+ nativeName: "Runa Simi"
638
+ },
639
+ rm: {
640
+ name: "Romansh",
641
+ nativeName: "rumantsch grischun"
642
+ },
643
+ rn: {
644
+ name: "Kirundi",
645
+ nativeName: "Ikirundi"
646
+ },
647
+ ro: {
648
+ name: "Romanian",
649
+ nativeName: "Rom\xE2n\u0103"
650
+ },
651
+ rw: {
652
+ name: "Kinyarwanda",
653
+ nativeName: "Ikinyarwanda"
654
+ },
655
+ sa: {
656
+ name: "Sanskrit",
657
+ nativeName: "\u0938\u0902\u0938\u094D\u0915\u0943\u0924\u092E\u094D"
658
+ },
659
+ sc: {
660
+ name: "Sardinian",
661
+ nativeName: "sardu"
662
+ },
663
+ sd: {
664
+ name: "Sindhi",
665
+ nativeName: "\u0938\u093F\u0928\u094D\u0927\u0940"
666
+ },
667
+ se: {
668
+ name: "Northern Sami",
669
+ nativeName: "Davvis\xE1megiella"
670
+ },
671
+ sg: {
672
+ name: "Sango",
673
+ nativeName: "y\xE2ng\xE2 t\xEE s\xE4ng\xF6"
674
+ },
675
+ si: {
676
+ name: "Sinhala",
677
+ nativeName: "\u0DC3\u0DD2\u0D82\u0DC4\u0DBD"
678
+ },
679
+ sk: {
680
+ name: "Slovak",
681
+ nativeName: "sloven\u010Dina"
682
+ },
683
+ sl: {
684
+ name: "Slovenian",
685
+ nativeName: "sloven\u0161\u010Dina"
686
+ },
687
+ sm: {
688
+ name: "Samoan",
689
+ nativeName: "gagana fa'a Samoa"
690
+ },
691
+ sn: {
692
+ name: "Shona",
693
+ nativeName: "chiShona"
694
+ },
695
+ so: {
696
+ name: "Somali",
697
+ nativeName: "Soomaaliga"
698
+ },
699
+ sq: {
700
+ name: "Albanian",
701
+ nativeName: "Shqip"
702
+ },
703
+ sr: {
704
+ name: "Serbian",
705
+ nativeName: "\u0441\u0440\u043F\u0441\u043A\u0438 \u0458\u0435\u0437\u0438\u043A"
706
+ },
707
+ ss: {
708
+ name: "Swati",
709
+ nativeName: "SiSwati"
710
+ },
711
+ st: {
712
+ name: "Southern Sotho",
713
+ nativeName: "Sesotho"
714
+ },
715
+ su: {
716
+ name: "Sundanese",
717
+ nativeName: "Basa Sunda"
718
+ },
719
+ sv: {
720
+ name: "Swedish",
721
+ nativeName: "Svenska"
722
+ },
723
+ sw: {
724
+ name: "Swahili",
725
+ nativeName: "Kiswahili"
726
+ },
727
+ ta: {
728
+ name: "Tamil",
729
+ nativeName: "\u0BA4\u0BAE\u0BBF\u0BB4\u0BCD"
730
+ },
731
+ tg: {
732
+ name: "Tajik",
733
+ nativeName: "\u0442\u043E\u04B7\u0438\u043A\u04E3"
734
+ },
735
+ th: {
736
+ name: "Thai",
737
+ nativeName: "\u0E44\u0E17\u0E22"
738
+ },
739
+ ti: {
740
+ name: "Tigrinya",
741
+ nativeName: "\u1275\u130D\u122D\u129B"
742
+ },
743
+ tk: {
744
+ name: "Turkmen",
745
+ nativeName: "T\xFCrkmen\xE7e"
746
+ },
747
+ tl: {
748
+ name: "Tagalog",
749
+ nativeName: "Wikang Tagalog"
750
+ },
751
+ tn: {
752
+ name: "Tswana",
753
+ nativeName: "Setswana"
754
+ },
755
+ to: {
756
+ name: "Tonga",
757
+ nativeName: "faka Tonga"
758
+ },
759
+ ts: {
760
+ name: "Tsonga",
761
+ nativeName: "Xitsonga"
762
+ },
763
+ tt: {
764
+ name: "Tatar",
765
+ nativeName: "\u0442\u0430\u0442\u0430\u0440 \u0442\u0435\u043B\u0435"
766
+ },
767
+ tw: {
768
+ name: "Twi",
769
+ nativeName: "Twi"
770
+ },
771
+ ty: {
772
+ name: "Tahitian",
773
+ nativeName: "Reo Tahiti"
774
+ },
775
+ ug: {
776
+ name: "Uyghur",
777
+ nativeName: "\u0626\u06C7\u064A\u063A\u06C7\u0631\u0686\u06D5\u200E"
778
+ },
779
+ uk: {
780
+ name: "Ukrainian",
781
+ nativeName: "\u0423\u043A\u0440\u0430\u0457\u043D\u0441\u044C\u043A\u0430"
782
+ },
783
+ uz: {
784
+ name: "Uzbek",
785
+ nativeName: "\u040E\u0437\u0431\u0435\u043A"
786
+ },
787
+ ve: {
788
+ name: "Venda",
789
+ nativeName: "Tshiven\u1E13a"
790
+ },
791
+ vo: {
792
+ name: "Volap\xFCk",
793
+ nativeName: "Volap\xFCk"
794
+ },
795
+ wa: {
796
+ name: "Walloon",
797
+ nativeName: "walon"
798
+ },
799
+ wo: {
800
+ name: "Wolof",
801
+ nativeName: "Wollof"
802
+ },
803
+ xh: {
804
+ name: "Xhosa",
805
+ nativeName: "isiXhosa"
806
+ },
807
+ yi: {
808
+ name: "Yiddish",
809
+ nativeName: "\u05D9\u05D9\u05B4\u05D3\u05D9\u05E9"
810
+ },
811
+ yo: {
812
+ name: "Yoruba",
813
+ nativeName: "Yor\xF9b\xE1"
814
+ },
815
+ za: {
816
+ name: "Zhuang",
817
+ nativeName: "Sa\u026F cue\u014B\u0185"
818
+ },
819
+ zu: {
820
+ name: "Zulu",
821
+ nativeName: "isiZulu"
822
+ }
823
+ };
824
+ var languages_default = SUPPORTED_LANGUAGES;
825
+
826
+ // index.ts
827
+ var fromEntry = (entries) => (v) => {
828
+ const match = Object.entries(entries).find((x) => x[1] === Number(v));
829
+ return match ? match[0] : "unknown";
830
+ };
831
+ var toEntry = (entries) => (v) => Object.keys(entries).find((x) => entries[x] === Number(v));
832
+ var BlockletStatus = Object.freeze({
833
+ added: 0,
834
+ downloading: 1,
835
+ downloaded: 2,
836
+ installing: 3,
837
+ installed: 4,
838
+ starting: 5,
839
+ running: 6,
840
+ stopping: 7,
841
+ stopped: 8,
842
+ error: 9,
843
+ upgrading: 10,
844
+ restarting: 11,
845
+ corrupted: 12,
846
+ waiting: 13,
847
+ deleted: 14
28
848
  });
29
- exports.BLOCKLET_CONTROLLER_STATUS = {
30
- normal: 0,
31
- suspended: 10,
849
+ var BLOCKLET_CONTROLLER_STATUS = {
850
+ normal: 0,
851
+ suspended: 10
32
852
  };
33
- exports.SUSPENDED_REASON = {
34
- expired: 'expired',
853
+ var SUSPENDED_REASON = {
854
+ expired: "expired"
35
855
  };
36
- exports.fromBlockletStatus = fromEntry(exports.BlockletStatus);
37
- exports.toBlockletStatus = toEntry(exports.BlockletStatus); // deprecated
38
- // Blocklet Source
39
- exports.BlockletSource = Object.freeze({
40
- // Installed from Blocklet Store
41
- registry: 0,
42
- // Installed from local development source folder
43
- local: 1,
44
- // Installed from uploading bundle directly
45
- upload: 2,
46
- // Installed from a url (similar to Blocklet Store)
47
- url: 3,
48
- // Installed by custom creation
49
- custom: 4,
856
+ var fromBlockletStatus = fromEntry(BlockletStatus);
857
+ var toBlockletStatus = toEntry(BlockletStatus);
858
+ var BlockletSource = Object.freeze({
859
+ registry: 0,
860
+ local: 1,
861
+ upload: 2,
862
+ url: 3,
863
+ custom: 4
50
864
  });
51
- exports.fromBlockletSource = fromEntry(exports.BlockletSource);
52
- exports.toBlockletSource = toEntry(exports.BlockletSource); // deprecated
53
- // Blocklet Group(Type)
54
- exports.BlockletGroup = Object.freeze({
55
- // Only static website
56
- // The website is served by by Blocklet Server at runtime
57
- static: 'static',
58
- // The runtime instance is provided by its own backend server
59
- dapp: 'dapp',
60
- starter: false,
61
- // This type is used to combine other component blocklets
62
- // No instance will be spawned at runtime
63
- gateway: 'gateway',
865
+ var fromBlockletSource = fromEntry(BlockletSource);
866
+ var toBlockletSource = toEntry(BlockletSource);
867
+ var BlockletGroup = Object.freeze({
868
+ static: "static",
869
+ dapp: "dapp",
870
+ starter: false,
871
+ gateway: "gateway"
64
872
  });
65
- exports.BLOCKLET_GROUPS = ['dapp', 'static', 'gateway'];
66
- // Blocklet Events
67
- exports.BlockletEvents = Object.freeze({
68
- // status updated
69
- added: 'blocklet.added',
70
- downloadFailed: 'blocklet.downloadFailed',
71
- installed: 'blocklet.installed',
72
- installFailed: 'blocklet.installFailed',
73
- upgraded: 'blocklet.upgraded',
74
- removed: 'blocklet.removed',
75
- started: 'blocklet.started',
76
- startFailed: 'blocklet.startFailed',
77
- stopped: 'blocklet.stopped',
78
- reloaded: 'blocklet.reloaded',
79
- statusChange: 'blocklet.statusChange',
80
- dataCleaned: 'blocklet.dataCleaned',
81
- componentInstalled: 'blocklet.componentInstalled',
82
- componentInstallFailed: 'blocklet.componentInstallFailed',
83
- componentUpgraded: 'blocklet.componentUpgraded',
84
- componentUpgradeFailed: 'blocklet.componentUpgradeFailed',
85
- componentRemoved: 'blocklet.componentRemoved',
86
- // 备份还原进度
87
- backupProgress: 'blocklet.backupProgress',
88
- restoreProgress: 'blocklet.restoreProgress',
89
- downloadBundleProgress: 'blocklet.downloadBundleProgress',
90
- // state updated
91
- updated: 'blocklet.updated',
92
- domainStatus: 'blocklet.domainStatus',
93
- storeChange: 'blocklet.storeChange',
94
- appDidChanged: 'blocklet.appDidChanged',
95
- // purchase
96
- purchaseChange: 'blocklet.purchaseChange',
97
- // cert
98
- certError: 'blocklet.certError',
99
- certIssued: 'blocklet.certIssued',
100
- // did-space
101
- spaceConnected: 'blocklet.spaceConnected',
102
- // install by nft
103
- nftConsumed: 'blocklet.nftConsumed',
873
+ var BLOCKLET_GROUPS = ["dapp", "static", "gateway"];
874
+ var BlockletEvents = Object.freeze({
875
+ added: "blocklet.added",
876
+ downloadFailed: "blocklet.downloadFailed",
877
+ installed: "blocklet.installed",
878
+ installFailed: "blocklet.installFailed",
879
+ upgraded: "blocklet.upgraded",
880
+ removed: "blocklet.removed",
881
+ started: "blocklet.started",
882
+ startFailed: "blocklet.startFailed",
883
+ stopped: "blocklet.stopped",
884
+ reloaded: "blocklet.reloaded",
885
+ statusChange: "blocklet.statusChange",
886
+ dataCleaned: "blocklet.dataCleaned",
887
+ componentInstalled: "blocklet.componentInstalled",
888
+ componentInstallFailed: "blocklet.componentInstallFailed",
889
+ componentUpgraded: "blocklet.componentUpgraded",
890
+ componentUpgradeFailed: "blocklet.componentUpgradeFailed",
891
+ componentRemoved: "blocklet.componentRemoved",
892
+ backupProgress: "blocklet.backupProgress",
893
+ restoreProgress: "blocklet.restoreProgress",
894
+ downloadBundleProgress: "blocklet.downloadBundleProgress",
895
+ updated: "blocklet.updated",
896
+ domainStatus: "blocklet.domainStatus",
897
+ storeChange: "blocklet.storeChange",
898
+ appDidChanged: "blocklet.appDidChanged",
899
+ purchaseChange: "blocklet.purchaseChange",
900
+ certError: "blocklet.certError",
901
+ certIssued: "blocklet.certIssued",
902
+ spaceConnected: "blocklet.spaceConnected",
903
+ nftConsumed: "blocklet.nftConsumed"
104
904
  });
105
- exports.BlockletInternalEvents = Object.freeze({
106
- appConfigChanged: 'blocklet.appConfigChanged',
107
- appSettingChanged: 'blocklet.appSettingChanged',
108
- componentInstalled: 'blocklet._componentInstalled',
109
- componentUpgraded: 'blocklet._componentUpgraded',
110
- componentUpdated: 'blocklet._componentUpdated',
111
- componentStarted: 'blocklet._componentStarted',
112
- componentStopped: 'blocklet._componentStopped',
113
- componentRemoved: 'blocklet._componentRemoved',
114
- componentConfigChanged: 'blocklet._componentConfigChanged',
115
- componentsUpdated: 'blocklet.componentsUpdated', // deprecated, for backward compatibility
905
+ var BlockletInternalEvents = Object.freeze({
906
+ appConfigChanged: "blocklet.appConfigChanged",
907
+ appSettingChanged: "blocklet.appSettingChanged",
908
+ componentInstalled: "blocklet._componentInstalled",
909
+ componentUpgraded: "blocklet._componentUpgraded",
910
+ componentUpdated: "blocklet._componentUpdated",
911
+ componentStarted: "blocklet._componentStarted",
912
+ componentStopped: "blocklet._componentStopped",
913
+ componentRemoved: "blocklet._componentRemoved",
914
+ componentConfigChanged: "blocklet._componentConfigChanged",
915
+ componentsUpdated: "blocklet.componentsUpdated"
116
916
  });
117
- exports.BLOCKLET_PLATFORMS = ['aix', 'darwin', 'freebsd', 'linux', 'openbsd', 'sunos', 'win32'];
118
- exports.BLOCKLET_ARCHITECTURES = [
119
- 'arm',
120
- 'arm64',
121
- 'ia32',
122
- 'mips',
123
- 'mipsel',
124
- 'ppc',
125
- 'ppc64',
126
- 's390',
127
- 's390x',
128
- 'x32',
129
- 'x64',
917
+ var BLOCKLET_PLATFORMS = ["aix", "darwin", "freebsd", "linux", "openbsd", "sunos", "win32"];
918
+ var BLOCKLET_ARCHITECTURES = [
919
+ "arm",
920
+ "arm64",
921
+ "ia32",
922
+ "mips",
923
+ "mipsel",
924
+ "ppc",
925
+ "ppc64",
926
+ "s390",
927
+ "s390x",
928
+ "x32",
929
+ "x64"
130
930
  ];
131
- exports.BLOCKLET_MODES = Object.freeze({
132
- PRODUCTION: 'production',
133
- DEVELOPMENT: 'development',
931
+ var BLOCKLET_MODES = Object.freeze({
932
+ PRODUCTION: "production",
933
+ DEVELOPMENT: "development"
134
934
  });
135
- exports.BLOCKLET_FACTORY_SHARES = { developer: 0.7, store: 0.3 };
136
- // Blocklet Interface
137
- exports.BLOCKLET_INTERFACE_TYPE_WEB = 'web';
138
- exports.BLOCKLET_INTERFACE_TYPE_SERVICE = 'service';
139
- // Wellknown interface declares an sub-interface under web interface
140
- // The path of the wellknown interface must starts with /.well-known, e.g. /.well-known/acme-challenge)
141
- // The wellknown interface can be mounted to every endpoint of the abtnode and all blocklets on the abtnode
142
- exports.BLOCKLET_INTERFACE_TYPE_WELLKNOWN = 'wellknown';
143
- exports.BLOCKLET_INTERFACE_TYPES = [
144
- exports.BLOCKLET_INTERFACE_TYPE_WEB,
145
- exports.BLOCKLET_INTERFACE_TYPE_SERVICE,
146
- exports.BLOCKLET_INTERFACE_TYPE_WELLKNOWN,
935
+ var BLOCKLET_FACTORY_SHARES = { developer: 0.7, store: 0.3 };
936
+ var BLOCKLET_INTERFACE_TYPE_WEB = "web";
937
+ var BLOCKLET_INTERFACE_TYPE_SERVICE = "service";
938
+ var BLOCKLET_INTERFACE_TYPE_WELLKNOWN = "wellknown";
939
+ var BLOCKLET_INTERFACE_TYPES = [
940
+ BLOCKLET_INTERFACE_TYPE_WEB,
941
+ BLOCKLET_INTERFACE_TYPE_SERVICE,
942
+ BLOCKLET_INTERFACE_TYPE_WELLKNOWN
147
943
  ];
148
- exports.BLOCKLET_INTERFACE_PUBLIC = 'publicUrl';
149
- exports.BLOCKLET_INTERFACE_WELLKNOWN = 'wellknownUrl'; // Deprecated
150
- exports.BLOCKLET_UI_INTERFACES = [exports.BLOCKLET_INTERFACE_PUBLIC];
151
- exports.BLOCKLET_STANDARD_INTERFACES = [exports.BLOCKLET_INTERFACE_PUBLIC, exports.BLOCKLET_INTERFACE_WELLKNOWN];
152
- exports.BLOCKLET_INTERFACE_PROTOCOL_HTTP = 'http';
153
- exports.BLOCKLET_INTERFACE_PROTOCOL_TCP = 'tcp';
154
- exports.BLOCKLET_INTERFACE_PROTOCOL_UDP = 'udp';
155
- exports.BLOCKLET_INTERFACE_PROTOCOLS = [
156
- exports.BLOCKLET_INTERFACE_PROTOCOL_TCP,
157
- exports.BLOCKLET_INTERFACE_PROTOCOL_UDP,
158
- exports.BLOCKLET_INTERFACE_PROTOCOL_HTTP,
944
+ var BLOCKLET_INTERFACE_PUBLIC = "publicUrl";
945
+ var BLOCKLET_INTERFACE_WELLKNOWN = "wellknownUrl";
946
+ var BLOCKLET_UI_INTERFACES = [BLOCKLET_INTERFACE_PUBLIC];
947
+ var BLOCKLET_STANDARD_INTERFACES = [BLOCKLET_INTERFACE_PUBLIC, BLOCKLET_INTERFACE_WELLKNOWN];
948
+ var BLOCKLET_INTERFACE_PROTOCOL_HTTP = "http";
949
+ var BLOCKLET_INTERFACE_PROTOCOL_TCP = "tcp";
950
+ var BLOCKLET_INTERFACE_PROTOCOL_UDP = "udp";
951
+ var BLOCKLET_INTERFACE_PROTOCOLS = [
952
+ BLOCKLET_INTERFACE_PROTOCOL_TCP,
953
+ BLOCKLET_INTERFACE_PROTOCOL_UDP,
954
+ BLOCKLET_INTERFACE_PROTOCOL_HTTP
159
955
  ];
160
- exports.BLOCKLET_DYNAMIC_PATH_PREFIX = '*';
161
- exports.BLOCKLET_DEFAULT_PORT_NAME = 'BLOCKLET_PORT';
162
- exports.BLOCKLET_DEFAULT_PATH_REWRITE = '/';
163
- // bundle
164
- exports.BLOCKLET_RELEASE_FOLDER = '.blocklet/release';
165
- exports.BLOCKLET_RELEASE_FILE = 'blocklet.json';
166
- exports.BLOCKLET_BUNDLE_FOLDER = '.blocklet/bundle';
167
- exports.BLOCKLET_RELEASE_FOLDER_NAME = 'release';
168
- exports.BLOCKLET_BUNDLE_FOLDER_NAME = 'bundle';
169
- exports.BLOCKLET_BUNDLE_FILE = 'blocklet.zip';
170
- exports.BLOCKLET_ENTRY_FILE = 'blocklet.js';
171
- exports.BLOCKLET_META_FILE = 'blocklet.yml';
172
- exports.BLOCKLET_META_FILE_ALT = 'blocklet.yaml';
173
- exports.BLOCKLET_PREFERENCE_FILE = 'blocklet.prefs.json';
174
- exports.BLOCKLET_PREFERENCE_PREFIX = 'prefs.';
175
- // project
176
- exports.PROJECT = {
177
- DIR: '.projects',
178
- RELEASE_DIR: 'releases',
179
- RESOURCE_DIR: 'resource',
180
- ASSET_DIR: 'assets',
181
- TYPES: {
182
- resource: 'resource',
183
- pack: 'pack',
184
- },
185
- RELEASE_STATUS: {
186
- draft: 'draft',
187
- published: 'published',
188
- },
189
- MAX_NOTE_LENGTH: 1000,
190
- MAX_INTRO_LENGTH: 3000,
956
+ var BLOCKLET_DYNAMIC_PATH_PREFIX = "*";
957
+ var BLOCKLET_DEFAULT_PORT_NAME = "BLOCKLET_PORT";
958
+ var BLOCKLET_DEFAULT_PATH_REWRITE = "/";
959
+ var BLOCKLET_RELEASE_FOLDER = ".blocklet/release";
960
+ var BLOCKLET_RELEASE_FILE = "blocklet.json";
961
+ var BLOCKLET_BUNDLE_FOLDER = ".blocklet/bundle";
962
+ var BLOCKLET_RELEASE_FOLDER_NAME = "release";
963
+ var BLOCKLET_BUNDLE_FOLDER_NAME = "bundle";
964
+ var BLOCKLET_BUNDLE_FILE = "blocklet.zip";
965
+ var BLOCKLET_ENTRY_FILE = "blocklet.js";
966
+ var BLOCKLET_META_FILE = "blocklet.yml";
967
+ var BLOCKLET_META_FILE_ALT = "blocklet.yaml";
968
+ var BLOCKLET_PREFERENCE_FILE = "blocklet.prefs.json";
969
+ var BLOCKLET_PREFERENCE_PREFIX = "prefs.";
970
+ var PROJECT = {
971
+ DIR: ".projects",
972
+ RELEASE_DIR: "releases",
973
+ RESOURCE_DIR: "resource",
974
+ ASSET_DIR: "assets",
975
+ TYPES: {
976
+ resource: "resource",
977
+ pack: "pack"
978
+ },
979
+ RELEASE_STATUS: {
980
+ draft: "draft",
981
+ published: "published"
982
+ },
983
+ MAX_NOTE_LENGTH: 1e3,
984
+ MAX_INTRO_LENGTH: 3e3
191
985
  };
192
- exports.BLOCKLET_DEFAULT_VERSION = '1.0.0';
193
- exports.BLOCKLET_UPLOADS_DIR = '__uploads';
194
- exports.BLOCKLET_LATEST_SPEC_VERSION = '1.2.8';
195
- exports.BLOCKLET_LATEST_REQUIREMENT_SERVER = '>=1.7.0';
196
- exports.BLOCKLET_LATEST_REQUIREMENT_ABTNODE = '>=1.5.15'; // Deprecated
197
- exports.BLOCKLET_CONFIGURABLE_KEY = {
198
- // APP Config Key that start with BLOCKLET_ cannot set to child component
199
- BLOCKLET_CLUSTER_SIZE: 'BLOCKLET_CLUSTER_SIZE',
200
- BLOCKLET_APP_NAME: 'BLOCKLET_APP_NAME',
201
- BLOCKLET_APP_DESCRIPTION: 'BLOCKLET_APP_DESCRIPTION',
202
- BLOCKLET_APP_SK: 'BLOCKLET_APP_SK',
203
- BLOCKLET_APP_LOGO: 'BLOCKLET_APP_LOGO',
204
- BLOCKLET_APP_LOGO_SQUARE: 'BLOCKLET_APP_LOGO_SQUARE',
205
- BLOCKLET_APP_LOGO_RECT: 'BLOCKLET_APP_LOGO_RECT',
206
- BLOCKLET_APP_LOGO_FAVICON: 'BLOCKLET_APP_LOGO_FAVICON',
207
- BLOCKLET_APP_URL: 'BLOCKLET_APP_URL',
208
- BLOCKLET_APP_LANGUAGES: 'BLOCKLET_APP_LANGUAGES',
209
- BLOCKLET_PASSPORT_COLOR: 'BLOCKLET_PASSPORT_COLOR',
210
- BLOCKLET_WALLET_TYPE: 'BLOCKLET_WALLET_TYPE',
211
- BLOCKLET_DELETABLE: 'BLOCKLET_DELETABLE',
212
- BLOCKLET_APP_COPYRIGHT_OWNER: 'BLOCKLET_APP_COPYRIGHT_OWNER',
213
- BLOCKLET_APP_COPYRIGHT_YEAR: 'BLOCKLET_APP_COPYRIGHT_YEAR',
214
- // 应用使用 DID Spaces 存储 文件/nft 的时候使用的环境变量
215
- BLOCKLET_APP_SPACE_ENDPOINT: 'BLOCKLET_APP_SPACE_ENDPOINT',
216
- BLOCKLET_APP_SPACES_URL: 'BLOCKLET_APP_SPACES_URL',
217
- // 应用使用 DID Spaces 备份的时候使用的环境变量
218
- BLOCKLET_APP_BACKUP_ENDPOINT: 'BLOCKLET_APP_BACKUP_ENDPOINT',
219
- BLOCKLET_APP_CHAIN_HOST: 'BLOCKLET_APP_CHAIN_HOST',
220
- BLOCKLET_APP_CHAIN_TYPE: 'BLOCKLET_APP_CHAIN_TYPE',
221
- BLOCKLET_APP_CHAIN_ID: 'BLOCKLET_APP_CHAIN_ID',
222
- // Component Key
223
- COMPONENT_ACCESS_WHO: 'COMPONENT_ACCESS_WHO',
986
+ var BLOCKLET_DEFAULT_VERSION = "1.0.0";
987
+ var BLOCKLET_UPLOADS_DIR = "__uploads";
988
+ var BLOCKLET_LATEST_SPEC_VERSION = "1.2.8";
989
+ var BLOCKLET_LATEST_REQUIREMENT_SERVER = ">=1.7.0";
990
+ var BLOCKLET_LATEST_REQUIREMENT_ABTNODE = ">=1.5.15";
991
+ var BLOCKLET_CONFIGURABLE_KEY = {
992
+ BLOCKLET_CLUSTER_SIZE: "BLOCKLET_CLUSTER_SIZE",
993
+ BLOCKLET_APP_NAME: "BLOCKLET_APP_NAME",
994
+ BLOCKLET_APP_DESCRIPTION: "BLOCKLET_APP_DESCRIPTION",
995
+ BLOCKLET_APP_SK: "BLOCKLET_APP_SK",
996
+ BLOCKLET_APP_LOGO: "BLOCKLET_APP_LOGO",
997
+ BLOCKLET_APP_LOGO_SQUARE: "BLOCKLET_APP_LOGO_SQUARE",
998
+ BLOCKLET_APP_LOGO_RECT: "BLOCKLET_APP_LOGO_RECT",
999
+ BLOCKLET_APP_LOGO_FAVICON: "BLOCKLET_APP_LOGO_FAVICON",
1000
+ BLOCKLET_APP_URL: "BLOCKLET_APP_URL",
1001
+ BLOCKLET_APP_LANGUAGES: "BLOCKLET_APP_LANGUAGES",
1002
+ BLOCKLET_PASSPORT_COLOR: "BLOCKLET_PASSPORT_COLOR",
1003
+ BLOCKLET_WALLET_TYPE: "BLOCKLET_WALLET_TYPE",
1004
+ BLOCKLET_DELETABLE: "BLOCKLET_DELETABLE",
1005
+ BLOCKLET_APP_COPYRIGHT_OWNER: "BLOCKLET_APP_COPYRIGHT_OWNER",
1006
+ BLOCKLET_APP_COPYRIGHT_YEAR: "BLOCKLET_APP_COPYRIGHT_YEAR",
1007
+ BLOCKLET_APP_SPACE_ENDPOINT: "BLOCKLET_APP_SPACE_ENDPOINT",
1008
+ BLOCKLET_APP_SPACES_URL: "BLOCKLET_APP_SPACES_URL",
1009
+ BLOCKLET_APP_BACKUP_ENDPOINT: "BLOCKLET_APP_BACKUP_ENDPOINT",
1010
+ BLOCKLET_APP_CHAIN_HOST: "BLOCKLET_APP_CHAIN_HOST",
1011
+ BLOCKLET_APP_CHAIN_TYPE: "BLOCKLET_APP_CHAIN_TYPE",
1012
+ BLOCKLET_APP_CHAIN_ID: "BLOCKLET_APP_CHAIN_ID",
1013
+ COMPONENT_ACCESS_WHO: "COMPONENT_ACCESS_WHO"
224
1014
  };
225
- exports.BLOCKLET_APP_SPACE_ENDPOINTS = {
226
- REQUIRED: 'required',
227
- OPTIONAL: 'optional',
1015
+ var BLOCKLET_APP_SPACE_ENDPOINTS = {
1016
+ REQUIRED: "required",
1017
+ OPTIONAL: "optional"
228
1018
  };
229
- exports.CHAIN_INFO_CONFIG = {
230
- CHAIN_TYPE: ['type', 'arcblock'],
231
- CHAIN_ID: ['id', 'none'],
232
- CHAIN_HOST: ['host', 'none'],
1019
+ var CHAIN_INFO_CONFIG = {
1020
+ CHAIN_TYPE: ["type", "arcblock"],
1021
+ CHAIN_ID: ["id", "none"],
1022
+ CHAIN_HOST: ["host", "none"]
233
1023
  };
234
- exports.RESTORE_PROGRESS_STATUS = {
235
- waiting: 0,
236
- start: 10,
237
- importData: 20,
238
- downloading: 30,
239
- importDataSuccess: 40,
240
- installing: 50,
241
- completed: 60,
242
- error: 70,
1024
+ var RESTORE_PROGRESS_STATUS = {
1025
+ waiting: 0,
1026
+ start: 10,
1027
+ importData: 20,
1028
+ downloading: 30,
1029
+ importDataSuccess: 40,
1030
+ installing: 50,
1031
+ completed: 60,
1032
+ error: 70
243
1033
  };
244
- exports.CHAIN_PROP_MAP = {
245
- BLOCKLET_APP_CHAIN_HOST: 'CHAIN_HOST',
246
- BLOCKLET_APP_CHAIN_ID: 'CHAIN_ID',
247
- BLOCKLET_APP_CHAIN_TYPE: 'CHAIN_TYPE',
1034
+ var CHAIN_PROP_MAP = {
1035
+ BLOCKLET_APP_CHAIN_HOST: "CHAIN_HOST",
1036
+ BLOCKLET_APP_CHAIN_ID: "CHAIN_ID",
1037
+ BLOCKLET_APP_CHAIN_TYPE: "CHAIN_TYPE"
248
1038
  };
249
- exports.CHAIN_PROP_MAP_REVERSE = Object.keys(exports.CHAIN_PROP_MAP).reduce((acc, key) => {
250
- acc[exports.CHAIN_PROP_MAP[key]] = key;
251
- return acc;
1039
+ var CHAIN_PROP_MAP_REVERSE = Object.keys(CHAIN_PROP_MAP).reduce((acc, key) => {
1040
+ acc[CHAIN_PROP_MAP[key]] = key;
1041
+ return acc;
252
1042
  }, {});
253
- // CAUTION: if we change this, please change ux/src/Locale/languages accordingly
254
- exports.SUPPORTED_LANGUAGES = {
255
- en: {
256
- name: 'English',
257
- nativeName: 'English',
258
- },
259
- es: {
260
- name: 'Spanish',
261
- nativeName: 'Español',
262
- },
263
- fr: {
264
- name: 'French',
265
- nativeName: 'Français',
266
- },
267
- it: {
268
- name: 'Italian',
269
- nativeName: 'Italiano',
270
- },
271
- zh: {
272
- name: 'Simplified Chinese',
273
- nativeName: '简体中文',
274
- },
275
- 'zh-TW': {
276
- name: 'Traditional Chinese',
277
- nativeName: '繁體中文',
278
- },
279
- ja: {
280
- name: 'Japanese',
281
- nativeName: '日本語',
282
- },
283
- ko: {
284
- name: 'Korean',
285
- nativeName: '한국어',
286
- },
287
- pt: {
288
- name: 'Portuguese',
289
- nativeName: 'Português',
290
- },
291
- ru: {
292
- name: 'Russian',
293
- nativeName: 'Русский',
294
- },
295
- ar: {
296
- name: 'Arabic',
297
- nativeName: 'اَلْعَرَبِيَّةُ',
298
- },
299
- de: {
300
- name: 'German',
301
- nativeName: 'Deutsch',
302
- },
303
- mn: {
304
- name: 'Mongolian',
305
- nativeName: 'Монгол хэл',
306
- },
307
- };
308
- exports.LOGIN_PROVIDER = {
309
- AUTH0: 'auth0',
310
- WALLET: 'wallet',
311
- NFT: 'nft',
1043
+ var LOGIN_PROVIDER = {
1044
+ AUTH0: "auth0",
1045
+ WALLET: "wallet",
1046
+ NFT: "nft"
312
1047
  };
313
- exports.APP_CONFIG_DIR = '/.config';
314
- exports.APP_CONFIG_FILE_PATH = '/.config/config.json';
315
- exports.COMPONENT_ENV_FILE_NAME = 'env';
316
- exports.MAX_TITLE_LENGTH = 40;
1048
+ var APP_CONFIG_DIR = "/.config";
1049
+ var APP_CONFIG_FILE_PATH = "/.config/config.json";
1050
+ var COMPONENT_ENV_FILE_NAME = "env";
1051
+ var MAX_TITLE_LENGTH = 40;
1052
+ // Annotate the CommonJS export names for ESM import in node:
1053
+ 0 && (module.exports = {
1054
+ APP_CONFIG_DIR,
1055
+ APP_CONFIG_FILE_PATH,
1056
+ BLOCKLET_APP_SPACE_ENDPOINTS,
1057
+ BLOCKLET_ARCHITECTURES,
1058
+ BLOCKLET_BUNDLE_FILE,
1059
+ BLOCKLET_BUNDLE_FOLDER,
1060
+ BLOCKLET_BUNDLE_FOLDER_NAME,
1061
+ BLOCKLET_CONFIGURABLE_KEY,
1062
+ BLOCKLET_CONTROLLER_STATUS,
1063
+ BLOCKLET_DEFAULT_PATH_REWRITE,
1064
+ BLOCKLET_DEFAULT_PORT_NAME,
1065
+ BLOCKLET_DEFAULT_VERSION,
1066
+ BLOCKLET_DYNAMIC_PATH_PREFIX,
1067
+ BLOCKLET_ENTRY_FILE,
1068
+ BLOCKLET_FACTORY_SHARES,
1069
+ BLOCKLET_GROUPS,
1070
+ BLOCKLET_INTERFACE_PROTOCOLS,
1071
+ BLOCKLET_INTERFACE_PROTOCOL_HTTP,
1072
+ BLOCKLET_INTERFACE_PROTOCOL_TCP,
1073
+ BLOCKLET_INTERFACE_PROTOCOL_UDP,
1074
+ BLOCKLET_INTERFACE_PUBLIC,
1075
+ BLOCKLET_INTERFACE_TYPES,
1076
+ BLOCKLET_INTERFACE_TYPE_SERVICE,
1077
+ BLOCKLET_INTERFACE_TYPE_WEB,
1078
+ BLOCKLET_INTERFACE_TYPE_WELLKNOWN,
1079
+ BLOCKLET_INTERFACE_WELLKNOWN,
1080
+ BLOCKLET_LATEST_REQUIREMENT_ABTNODE,
1081
+ BLOCKLET_LATEST_REQUIREMENT_SERVER,
1082
+ BLOCKLET_LATEST_SPEC_VERSION,
1083
+ BLOCKLET_META_FILE,
1084
+ BLOCKLET_META_FILE_ALT,
1085
+ BLOCKLET_MODES,
1086
+ BLOCKLET_PLATFORMS,
1087
+ BLOCKLET_PREFERENCE_FILE,
1088
+ BLOCKLET_PREFERENCE_PREFIX,
1089
+ BLOCKLET_RELEASE_FILE,
1090
+ BLOCKLET_RELEASE_FOLDER,
1091
+ BLOCKLET_RELEASE_FOLDER_NAME,
1092
+ BLOCKLET_STANDARD_INTERFACES,
1093
+ BLOCKLET_UI_INTERFACES,
1094
+ BLOCKLET_UPLOADS_DIR,
1095
+ BlockletEvents,
1096
+ BlockletGroup,
1097
+ BlockletInternalEvents,
1098
+ BlockletSource,
1099
+ BlockletStatus,
1100
+ CHAIN_INFO_CONFIG,
1101
+ CHAIN_PROP_MAP,
1102
+ CHAIN_PROP_MAP_REVERSE,
1103
+ COMPONENT_ENV_FILE_NAME,
1104
+ LOGIN_PROVIDER,
1105
+ MAX_TITLE_LENGTH,
1106
+ PROJECT,
1107
+ RESTORE_PROGRESS_STATUS,
1108
+ SUPPORTED_LANGUAGES,
1109
+ SUSPENDED_REASON,
1110
+ fromBlockletSource,
1111
+ fromBlockletStatus,
1112
+ toBlockletSource,
1113
+ toBlockletStatus
1114
+ });