@amxts/core 0.1.0 → 0.2.1

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 (77) hide show
  1. package/README.md +21 -25
  2. package/README.ru.md +22 -24
  3. package/as/amxts.d.ts +63 -3
  4. package/as/constants.ts +684 -116
  5. package/as/entities.ts +1905 -1364
  6. package/as/events.ts +1696 -907
  7. package/as/facade.ts +1240 -220
  8. package/as/fetch.ts +1519 -0
  9. package/as/flags.ts +159 -145
  10. package/as/hlds.ts +1071 -0
  11. package/as/hooks.ts +5226 -5379
  12. package/as/kit.ts +15 -5
  13. package/as/lib/check.ts +1 -1
  14. package/as/natives.ts +2658 -2499
  15. package/as/remote.ts +39 -15
  16. package/as/tsconfig.json +7 -2
  17. package/as/vector.ts +12 -9
  18. package/includes/order.txt +22 -29
  19. package/includes/sources.json +0 -8
  20. package/node_modules/assemblyscript/std/assembly/index.d.ts +20 -11
  21. package/package.json +29 -7
  22. package/runtime/deps/assemblyscript/dist/asc.js +86 -16
  23. package/runtime/deps/assemblyscript/dist/assemblyscript.js +29 -29
  24. package/runtime/licenses/MPL-2.0.txt +373 -0
  25. package/runtime/licenses/README.md +5 -1
  26. package/runtime/licenses/curl-COPYING +22 -0
  27. package/runtime/licenses/libssh2-COPYING +43 -0
  28. package/runtime/licenses/mbedTLS-LICENSE +553 -0
  29. package/runtime/natives.txt +108 -105
  30. package/runtime/patches/assemblyscript-0.28.20-amxts.patch +752 -296
  31. package/runtime/patches/wamr-2.4.5-amxts.patch +148 -0
  32. package/scripts/apply-docs.ts +2 -2
  33. package/scripts/auto-imports.ts +2 -2
  34. package/scripts/build-identity.ts +115 -0
  35. package/scripts/build-wasm.ts +101 -50
  36. package/scripts/check.ts +17 -3
  37. package/scripts/client-messages.ts +246 -0
  38. package/scripts/compile-cache.ts +4 -2
  39. package/scripts/compile-pool.ts +128 -0
  40. package/scripts/compile-worker.ts +23 -0
  41. package/scripts/compile.ts +156 -59
  42. package/scripts/docker-server.ts +13 -3
  43. package/scripts/docs/as/amxts.ts +86 -0
  44. package/scripts/docs/as/facade.ts +688 -188
  45. package/scripts/docs/as/fetch.ts +805 -0
  46. package/scripts/docs/entities.ts +43 -144
  47. package/scripts/docs/events.ts +17 -28
  48. package/scripts/docs/game.ts +68 -22
  49. package/scripts/docs/messages.ts +330 -16
  50. package/scripts/editor-api.ts +101 -0
  51. package/scripts/hlds-events.ts +370 -0
  52. package/scripts/includes.ts +12 -10
  53. package/scripts/player-fields.ts +16 -15
  54. package/scripts/prebuilt.ts +65 -23
  55. package/scripts/prepare.ts +42 -28
  56. package/scripts/project.ts +120 -20
  57. package/scripts/reapi-events.ts +98 -0
  58. package/scripts/shared-modules.ts +85 -23
  59. package/scripts/source-map.ts +242 -0
  60. package/scripts/system.ts +1 -1
  61. package/scripts/typed-commands.ts +263 -0
  62. package/scripts/typed-configs.ts +23 -12
  63. package/scripts/ui.ts +3 -1
  64. package/scripts/upgrade-menus.ts +274 -0
  65. package/scripts/upgrade-names.ts +384 -0
  66. package/scripts/upgrade.ts +857 -0
  67. package/src/cli-api.mjs +37 -4
  68. package/src/system.mjs +74 -3
  69. package/src/testing/compile.ts +8 -5
  70. package/src/testing/index.ts +2 -1
  71. package/src/testing/natives.ts +199 -5
  72. package/src/testing/network.ts +531 -0
  73. package/src/testing/server.ts +572 -48
  74. package/src/testing/setup.ts +1 -1
  75. package/src/testing/tables.ts +25 -0
  76. package/as/modules/http.ts +0 -184
  77. package/scripts/docs/as/modules/http.ts +0 -66
package/as/kit.ts CHANGED
@@ -1,14 +1,19 @@
1
1
  // What a module's own code needs besides the facade:
2
2
  //
3
- // import { defineModule, PawnFunction, caller } from "@amxts/core/kit";
3
+ // import { defineModule, PawnFunction, caller, request } from "@amxts/core/kit";
4
4
  //
5
5
  // defineModule is also global (amxts.d.ts), so a module file may leave it
6
- // unimported. The rest serves a module's natives for Pawn plugins: calling a
7
- // Pawn plugin's public back, reading and filling its `Array:`, a menu of any
8
- // length. They live in the facade - this file only gathers them - and a
9
- // plugin never needs them: what a plugin does has a facade object of its own.
6
+ // unimported. callingPlugin and onPluginStop let a module drop what a plugin
7
+ // gave it once that plugin stops. Most of the rest serves a module's natives
8
+ // for Pawn plugins: calling a Pawn plugin's public back, reading and filling
9
+ // its `Array:`, a menu of any length. `request` is the server's network client as it is -
10
+ // HTTP, FTP, FTPS and SFTP, files streamed to and from the disk - for a
11
+ // module that speaks more than fetch. They live in the facade - this file
12
+ // only gathers them - and a plugin never needs them: what a plugin does has
13
+ // a facade object of its own.
10
14
  export {
11
15
  caller,
16
+ callingPlugin,
12
17
  cellArrayRows,
13
18
  cellsText,
14
19
  colorTags,
@@ -16,10 +21,15 @@ export {
16
21
  defineModule,
17
22
  destroyCellArray,
18
23
  menuColors,
24
+ onPluginStop,
19
25
  PawnCall,
20
26
  PawnFunction,
21
27
  publicFor,
22
28
  pushCellArrayRow,
29
+ request,
30
+ RequestErrorKind,
31
+ RequestOptions,
32
+ RequestResult,
23
33
  showMenu,
24
34
  textCells,
25
35
  } from "./facade";
package/as/lib/check.ts CHANGED
@@ -16,7 +16,7 @@
16
16
  // over rcon - is made without a player, and its total goes to the log alone:
17
17
  //
18
18
  // const check = new Checks("cvar");
19
- import { Player, print } from "~/facade";
19
+ import { Player, print } from "../facade";
20
20
 
21
21
  /**
22
22
  * Checks of one piece of the API on a live server. Each goes to the server