@gamely/gly-engine-lite 0.2.5 → 0.2.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.
Files changed (2) hide show
  1. package/dist/main.lua +110 -159
  2. package/package.json +1 -1
package/dist/main.lua CHANGED
@@ -1,58 +1,36 @@
1
+ local b247f = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}
2
+ local r247f = function(i, f)
3
+ return function()
4
+ local c = f()
5
+ b247f[i] = function() return c end
6
+ return c
7
+ end
8
+ end
1
9
  local math = ((function() local x, y = pcall(require, 'math'); return x and y end)()) or _G.math
2
- local source_version_23a4 = nil
3
- local source_shared_engine_loadcore_23af = nil
4
- local source_shared_engine_loadgame_23ba = nil
5
- local source_engine_api_data_encoder_23cc = nil
6
- local source_engine_api_system_app_23d7 = nil
7
- local source_engine_api_data_hash_23e2 = nil
8
- local source_engine_api_io_http_23ed = nil
9
- local source_engine_api_data_i18n_23f8 = nil
10
- local source_engine_api_system_key_2403 = nil
11
- local source_engine_api_debug_log_240e = nil
12
- local source_engine_api_math_basic_2419 = nil
13
- local source_engine_api_math_clib_2424 = nil
14
- local source_engine_api_math_random_242f = nil
15
- local source_engine_api_data_array_243a = nil
16
- local source_engine_api_io_media_2445 = nil
17
- local source_engine_api_draw_fps_2450 = nil
18
- local source_engine_api_draw_text_245b = nil
19
- local source_engine_api_draw_poly_2466 = nil
20
- local source_engine_api_raw_memory_2471 = nil
21
- local source_engine_protocol_http_callback_2483 = nil
22
- local source_shared_var_object_root_2495 = nil
23
- local source_engine_api_system_color_24a0 = nil
24
- local source_shared_var_object_std_24ab = nil
25
- local source_shared_functional_pipeline_2959 = nil
26
- local source_shared_string_dsl_requires_2964 = nil
27
- local source_shared_string_eval_file_2bcb = nil
28
- local source_shared_string_eval_code_2bd6 = nil
29
- local source_shared_functional_decorator_2e77 = nil
30
- local source_shared_string_encode_http_5c63 = nil
31
- local source_shared_string_encode_url_5c6e = nil
32
- local function main_239b()
33
- local version = source_version_23a4()
34
- local loadcore = source_shared_engine_loadcore_23af()
35
- local loadgame = source_shared_engine_loadgame_23ba()
36
- local engine_encoder = source_engine_api_data_encoder_23cc()
37
- local engine_game = source_engine_api_system_app_23d7()
38
- local engine_hash = source_engine_api_data_hash_23e2()
39
- local engine_http = source_engine_api_io_http_23ed()
40
- local engine_i18n = source_engine_api_data_i18n_23f8()
41
- local engine_key = source_engine_api_system_key_2403()
42
- local engine_log = source_engine_api_debug_log_240e()
43
- local engine_math = source_engine_api_math_basic_2419()
44
- local engine_math_clib = source_engine_api_math_clib_2424()
45
- local engine_math_random = source_engine_api_math_random_242f()
46
- local engine_array = source_engine_api_data_array_243a()
47
- local engine_media = source_engine_api_io_media_2445()
48
- local engine_api_draw_fps = source_engine_api_draw_fps_2450()
49
- local engine_api_draw_text = source_engine_api_draw_text_245b()
50
- local engine_api_draw_poly = source_engine_api_draw_poly_2466()
51
- local engine_raw_memory = source_engine_api_raw_memory_2471()
52
- local callback_http = source_engine_protocol_http_callback_2483()
53
- local application_default = source_shared_var_object_root_2495()
54
- local color = source_engine_api_system_color_24a0()
55
- local std = source_shared_var_object_std_24ab()
10
+ local function m247f()
11
+ local version = b247f[1]('source_version')
12
+ local loadcore = b247f[2]('source_shared_engine_loadcore')
13
+ local loadgame = b247f[3]('source_shared_engine_loadgame')
14
+ local engine_encoder = b247f[4]('source_engine_api_data_encoder')
15
+ local engine_game = b247f[5]('source_engine_api_system_app')
16
+ local engine_hash = b247f[6]('source_engine_api_data_hash')
17
+ local engine_http = b247f[7]('source_engine_api_io_http')
18
+ local engine_i18n = b247f[8]('source_engine_api_data_i18n')
19
+ local engine_key = b247f[9]('source_engine_api_system_key')
20
+ local engine_log = b247f[10]('source_engine_api_debug_log')
21
+ local engine_math = b247f[11]('source_engine_api_math_basic')
22
+ local engine_math_clib = b247f[12]('source_engine_api_math_clib')
23
+ local engine_math_random = b247f[13]('source_engine_api_math_random')
24
+ local engine_array = b247f[14]('source_engine_api_data_array')
25
+ local engine_media = b247f[15]('source_engine_api_io_media')
26
+ local engine_api_draw_fps = b247f[16]('source_engine_api_draw_fps')
27
+ local engine_api_draw_text = b247f[17]('source_engine_api_draw_text')
28
+ local engine_api_draw_poly = b247f[18]('source_engine_api_draw_poly')
29
+ local engine_raw_memory = b247f[19]('source_engine_api_raw_memory')
30
+ local callback_http = b247f[20]('source_engine_protocol_http_callback')
31
+ local application_default = b247f[21]('source_shared_var_object_root')
32
+ local color = b247f[22]('source_engine_api_system_color')
33
+ local std = b247f[23]('source_shared_var_object_std')
56
34
  local application = application_default
57
35
  local engine = {
58
36
  keyboard = function(a, b, c, d) end,
@@ -210,13 +188,12 @@ version=version
210
188
  }
211
189
  return P
212
190
  end
213
- source_version_23a4 = function()
214
- return '0.2.5'
215
- end
216
- --
217
- source_shared_engine_loadcore_23af = function()
218
- local zeebo_pipeline = source_shared_functional_pipeline_2959()
219
- local requires = source_shared_string_dsl_requires_2964()
191
+ b247f[1] = r247f(1, function()
192
+ return '0.2.7'
193
+ end)
194
+ b247f[2] = r247f(2, function()
195
+ local zeebo_pipeline = b247f[24]('source_shared_functional_pipeline')
196
+ local requires = b247f[25]('source_shared_string_dsl_requires')
220
197
  local function step_install_libsys(self, lib_name, library, custom, is_system)
221
198
  if not is_system then return end
222
199
  local ok, msg = pcall(function()
@@ -296,11 +273,10 @@ local P = {
296
273
  setup = setup
297
274
  }
298
275
  return P
299
- end
300
- --
301
- source_shared_engine_loadgame_23ba = function()
302
- local eval_file = source_shared_string_eval_file_2bcb()
303
- local eval_code = source_shared_string_eval_code_2bd6()
276
+ end)
277
+ b247f[3] = r247f(3, function()
278
+ local eval_file = b247f[26]('source_shared_string_eval_file')
279
+ local eval_code = b247f[27]('source_shared_string_eval_code')
304
280
  local has_io_open = io and io.open
305
281
  local function normalize(app, base)
306
282
  if not app then return nil end
@@ -371,9 +347,8 @@ local P = {
371
347
  script = script
372
348
  }
373
349
  return P
374
- end
375
- --
376
- source_engine_api_data_encoder_23cc = function()
350
+ end)
351
+ b247f[4] = r247f(4, function()
377
352
  local function install(std, engine, library, name)
378
353
  std = std or {}
379
354
  std[name] = {
@@ -386,10 +361,9 @@ local P = {
386
361
  install=install
387
362
  }
388
363
  return P
389
- end
390
- --
391
- source_engine_api_system_app_23d7 = function()
392
- local util_decorator = source_shared_functional_decorator_2e77()
364
+ end)
365
+ b247f[5] = r247f(5, function()
366
+ local util_decorator = b247f[28]('source_shared_functional_decorator')
393
367
  local function reset(std, engine)
394
368
  if std.node then
395
369
  std.bus.emit('exit')
@@ -427,9 +401,8 @@ local P = {
427
401
  install=install
428
402
  }
429
403
  return P
430
- end
431
- --
432
- source_engine_api_data_hash_23e2 = function()
404
+ end)
405
+ b247f[6] = r247f(6, function()
433
406
  local function djb2(digest)
434
407
  local index = 1
435
408
  local hash = 5381
@@ -451,10 +424,9 @@ local P = {
451
424
  install = install
452
425
  }
453
426
  return P
454
- end
455
- --
456
- source_engine_api_io_http_23ed = function()
457
- local zeebo_pipeline = source_shared_functional_pipeline_2959()
427
+ end)
428
+ b247f[7] = r247f(7, function()
429
+ local zeebo_pipeline = b247f[24]('source_shared_functional_pipeline')
458
430
  local function json(self)
459
431
  self.options['json'] = true
460
432
  return self
@@ -610,9 +582,8 @@ local P = {
610
582
  install=install
611
583
  }
612
584
  return P
613
- end
614
- --
615
- source_engine_api_data_i18n_23f8 = function()
585
+ end)
586
+ b247f[8] = r247f(8, function()
616
587
  local language = 'en-US'
617
588
  local language_default = 'en-US'
618
589
  local language_list = {}
@@ -702,9 +673,8 @@ local P = {
702
673
  install=install
703
674
  }
704
675
  return P
705
- end
706
- --
707
- source_engine_api_system_key_2403 = function()
676
+ end)
677
+ b247f[9] = r247f(9, function()
708
678
  local function real_key(std, engine, rkey, rvalue)
709
679
  local value = rvalue == 1 or rvalue == true
710
680
  local key = engine.key_bindings[rkey] or (std.key.axis[rkey] and rkey)
@@ -739,10 +709,9 @@ local P = {
739
709
  install = install
740
710
  }
741
711
  return P
742
- end
743
- --
744
- source_engine_api_debug_log_240e = function()
745
- local util_decorator = source_shared_functional_decorator_2e77()
712
+ end)
713
+ b247f[10] = r247f(10, function()
714
+ local util_decorator = b247f[28]('source_shared_functional_decorator')
746
715
  local logging_types = {
747
716
  'none', 'fatal', 'error', 'warn', 'debug', 'info'
748
717
  }
@@ -786,9 +755,8 @@ local P = {
786
755
  install = install
787
756
  }
788
757
  return P
789
- end
790
- --
791
- source_engine_api_math_basic_2419 = function()
758
+ end)
759
+ b247f[11] = r247f(11, function()
792
760
  local function abs(value)
793
761
  if value < 0 then
794
762
  return -value
@@ -885,9 +853,8 @@ local P = {
885
853
  install = install
886
854
  }
887
855
  return P
888
- end
889
- --
890
- source_engine_api_math_clib_2424 = function()
856
+ end)
857
+ b247f[12] = r247f(12, function()
891
858
  local function install(std)
892
859
  assert(math and (1/2 ~= 0))
893
860
  std.math = std.math or {}
@@ -921,9 +888,8 @@ local P = {
921
888
  install = install
922
889
  }
923
890
  return P
924
- end
925
- --
926
- source_engine_api_math_random_242f = function()
891
+ end)
892
+ b247f[13] = r247f(13, function()
927
893
  local function install(std)
928
894
  assert(math and (1/2 ~= 0))
929
895
  std.math = std.math or {}
@@ -938,10 +904,9 @@ local P = {
938
904
  install = install
939
905
  }
940
906
  return P
941
- end
942
- --
943
- source_engine_api_data_array_243a = function()
944
- local util_decorator = source_shared_functional_decorator_2e77()
907
+ end)
908
+ b247f[14] = r247f(14, function()
909
+ local util_decorator = b247f[28]('source_shared_functional_decorator')
945
910
  local function array_map(array, func)
946
911
  local res = {}
947
912
  local index = 1
@@ -1100,14 +1065,13 @@ local P = {
1100
1065
  install = install
1101
1066
  }
1102
1067
  return P
1103
- end
1104
- --
1105
- source_engine_api_io_media_2445 = function()
1068
+ end)
1069
+ b247f[15] = r247f(15, function()
1106
1070
  local function media_create(node, channels, handler)
1107
1071
  local decorator = function(func)
1108
1072
  func = func or function() end
1109
- return function(self, a, b, c, d)
1110
- func(0, a, b, c, d)
1073
+ return function(self, a, b, c, d, e, f)
1074
+ func(0, a, b, c, d, e, f)
1111
1075
  return self
1112
1076
  end
1113
1077
  end
@@ -1146,9 +1110,8 @@ local P = {
1146
1110
  install=install
1147
1111
  }
1148
1112
  return P
1149
- end
1150
- --
1151
- source_engine_api_draw_fps_2450 = function()
1113
+ end)
1114
+ b247f[16] = r247f(16, function()
1152
1115
  local function draw_fps(std, engine, show, pos_x, pos_y)
1153
1116
  if show < 1 then return end
1154
1117
  local x = engine.current.config.offset_x + pos_x
@@ -1195,10 +1158,9 @@ local P = {
1195
1158
  install=install
1196
1159
  }
1197
1160
  return P
1198
- end
1199
- --
1200
- source_engine_api_draw_text_245b = function()
1201
- local util_decorator = source_shared_functional_decorator_2e77()
1161
+ end)
1162
+ b247f[17] = r247f(17, function()
1163
+ local util_decorator = b247f[28]('source_shared_functional_decorator')
1202
1164
  local function text_put(std, engine, font_previous, pos_x, pos_y, text, size)
1203
1165
  size = size or 2
1204
1166
  local hem = engine.current.data.width / 80
@@ -1225,9 +1187,8 @@ local P = {
1225
1187
  install=install
1226
1188
  }
1227
1189
  return P
1228
- end
1229
- --
1230
- source_engine_api_draw_poly_2466 = function()
1190
+ end)
1191
+ b247f[18] = r247f(18, function()
1231
1192
  local function decorator_poo(object, func)
1232
1193
  if not object or not func then return func end
1233
1194
  return function(a, b, c, d)
@@ -1332,9 +1293,8 @@ local P = {
1332
1293
  install=install
1333
1294
  }
1334
1295
  return P
1335
- end
1336
- --
1337
- source_engine_api_raw_memory_2471 = function()
1296
+ end)
1297
+ b247f[19] = r247f(19, function()
1338
1298
  local memory_dict_unload = {}
1339
1299
  local memory_dict = {}
1340
1300
  local memory_list = {}
@@ -1387,11 +1347,10 @@ local P = {
1387
1347
  install=install
1388
1348
  }
1389
1349
  return P
1390
- end
1391
- --
1392
- source_engine_protocol_http_callback_2483 = function()
1393
- local str_http = source_shared_string_encode_http_5c63()
1394
- local str_url = source_shared_string_encode_url_5c6e()
1350
+ end)
1351
+ b247f[20] = r247f(20, function()
1352
+ local str_http = b247f[30]('source_shared_string_encode_http')
1353
+ local str_url = b247f[31]('source_shared_string_encode_url')
1395
1354
  local callbacks = {
1396
1355
  ['async-promise'] = function(self)
1397
1356
  return self:promise()
@@ -1442,6 +1401,9 @@ end,
1442
1401
  ['set-body'] = function(self, data)
1443
1402
  self.set('body', data)
1444
1403
  end,
1404
+ ['set-headers'] = function(self, data)
1405
+ self.set('headers', data or {})
1406
+ end,
1445
1407
  ['add-body-data'] = function(self, data, std)
1446
1408
  self.set('body', (std.http.body or '')..data)
1447
1409
  end
@@ -1456,9 +1418,8 @@ local P = {
1456
1418
  func = native_http_callback
1457
1419
  }
1458
1420
  return P
1459
- end
1460
- --
1461
- source_shared_var_object_root_2495 = function()
1421
+ end)
1422
+ b247f[21] = r247f(21, function()
1462
1423
  local P = {
1463
1424
  data={
1464
1425
  width=1280,
@@ -1486,9 +1447,8 @@ callbacks={
1486
1447
  }
1487
1448
  }
1488
1449
  return P;
1489
- end
1490
- --
1491
- source_engine_api_system_color_24a0 = function()
1450
+ end)
1451
+ b247f[22] = r247f(22, function()
1492
1452
  local function install(std)
1493
1453
  std.color = std.color or {}
1494
1454
  std.color.white = 0xFFFFFFFF
@@ -1521,9 +1481,8 @@ local P = {
1521
1481
  install = install
1522
1482
  }
1523
1483
  return P
1524
- end
1525
- --
1526
- source_shared_var_object_std_24ab = function()
1484
+ end)
1485
+ b247f[23] = r247f(23, function()
1527
1486
  local P = {
1528
1487
  milis = 0,
1529
1488
  delta = 0,
@@ -1589,9 +1548,8 @@ any=false
1589
1548
  }
1590
1549
  }
1591
1550
  return P;
1592
- end
1593
- --
1594
- source_shared_functional_pipeline_2959 = function()
1551
+ end)
1552
+ b247f[24] = r247f(24, function()
1595
1553
  local function pipe(self)
1596
1554
  return function()
1597
1555
  self:run()
@@ -1639,9 +1597,8 @@ resume=resume,
1639
1597
  run=run
1640
1598
  }
1641
1599
  return P
1642
- end
1643
- --
1644
- source_shared_string_dsl_requires_2964 = function()
1600
+ end)
1601
+ b247f[25] = r247f(25, function()
1645
1602
  local function encode(dsl_string)
1646
1603
  local spec = {
1647
1604
  list = {},
@@ -1688,9 +1645,8 @@ missing = missing,
1688
1645
  should_import = should_import
1689
1646
  }
1690
1647
  return P
1691
- end
1692
- --
1693
- source_shared_string_eval_file_2bcb = function()
1648
+ end)
1649
+ b247f[26] = r247f(26, function()
1694
1650
  local function script(src)
1695
1651
  local ok, app = false, nil
1696
1652
  if require then
@@ -1714,9 +1670,8 @@ local P = {
1714
1670
  script = script,
1715
1671
  }
1716
1672
  return P
1717
- end
1718
- --
1719
- source_shared_string_eval_code_2bd6 = function()
1673
+ end)
1674
+ b247f[27] = r247f(27, function()
1720
1675
  local function script(src)
1721
1676
  local loader = loadstring or load
1722
1677
  if not loader then
@@ -1735,9 +1690,8 @@ local P = {
1735
1690
  script = script,
1736
1691
  }
1737
1692
  return P
1738
- end
1739
- --
1740
- source_shared_functional_decorator_2e77 = function()
1693
+ end)
1694
+ b247f[28] = r247f(28, function()
1741
1695
  local function decorator_prefix3(zig, zag, zom, func)
1742
1696
  return function (a, b, c, d, e, f)
1743
1697
  return func(zig, zag, zom, a, b, c, d, e, f)
@@ -1793,9 +1747,8 @@ prefix1 = decorator_prefix1,
1793
1747
  prefix1_t = table_prefix1
1794
1748
  }
1795
1749
  return P
1796
- end
1797
- --
1798
- source_shared_string_encode_http_5c63 = function()
1750
+ end)
1751
+ b247f[30] = r247f(30, function()
1799
1752
  local function is_ok(status)
1800
1753
  return (status and 200 <= status and status < 300) or false
1801
1754
  end
@@ -1940,9 +1893,8 @@ get_content=get_content,
1940
1893
  get_user_agent=get_user_agent,
1941
1894
  create_request=create_request
1942
1895
  }
1943
- end
1944
- --
1945
- source_shared_string_encode_url_5c6e = function()
1896
+ end)
1897
+ b247f[31] = r247f(31, function()
1946
1898
  local function search_param(param_list, param_dict)
1947
1899
  local index, params = 1, ''
1948
1900
  while param_list and param_dict and index <= #param_list do
@@ -1962,6 +1914,5 @@ local P = {
1962
1914
  search_param = search_param
1963
1915
  }
1964
1916
  return P
1965
- end
1966
- --
1967
- return main_239b()
1917
+ end)
1918
+ return m247f()
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gamely/gly-engine-lite",
3
- "version": "0.2.5",
3
+ "version": "0.2.7",
4
4
  "author": "RodrigoDornelles",
5
5
  "license": "Apache-2.0",
6
6
  "homepage": "https://docs.gamely.com.br",