@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.
- package/README.md +21 -25
- package/README.ru.md +22 -24
- package/as/amxts.d.ts +63 -3
- package/as/constants.ts +684 -116
- package/as/entities.ts +1905 -1364
- package/as/events.ts +1696 -907
- package/as/facade.ts +1240 -220
- package/as/fetch.ts +1519 -0
- package/as/flags.ts +159 -145
- package/as/hlds.ts +1071 -0
- package/as/hooks.ts +5226 -5379
- package/as/kit.ts +15 -5
- package/as/lib/check.ts +1 -1
- package/as/natives.ts +2658 -2499
- package/as/remote.ts +39 -15
- package/as/tsconfig.json +7 -2
- package/as/vector.ts +12 -9
- package/includes/order.txt +22 -29
- package/includes/sources.json +0 -8
- package/node_modules/assemblyscript/std/assembly/index.d.ts +20 -11
- package/package.json +29 -7
- package/runtime/deps/assemblyscript/dist/asc.js +86 -16
- package/runtime/deps/assemblyscript/dist/assemblyscript.js +29 -29
- package/runtime/licenses/MPL-2.0.txt +373 -0
- package/runtime/licenses/README.md +5 -1
- package/runtime/licenses/curl-COPYING +22 -0
- package/runtime/licenses/libssh2-COPYING +43 -0
- package/runtime/licenses/mbedTLS-LICENSE +553 -0
- package/runtime/natives.txt +108 -105
- package/runtime/patches/assemblyscript-0.28.20-amxts.patch +752 -296
- package/runtime/patches/wamr-2.4.5-amxts.patch +148 -0
- package/scripts/apply-docs.ts +2 -2
- package/scripts/auto-imports.ts +2 -2
- package/scripts/build-identity.ts +115 -0
- package/scripts/build-wasm.ts +101 -50
- package/scripts/check.ts +17 -3
- package/scripts/client-messages.ts +246 -0
- package/scripts/compile-cache.ts +4 -2
- package/scripts/compile-pool.ts +128 -0
- package/scripts/compile-worker.ts +23 -0
- package/scripts/compile.ts +156 -59
- package/scripts/docker-server.ts +13 -3
- package/scripts/docs/as/amxts.ts +86 -0
- package/scripts/docs/as/facade.ts +688 -188
- package/scripts/docs/as/fetch.ts +805 -0
- package/scripts/docs/entities.ts +43 -144
- package/scripts/docs/events.ts +17 -28
- package/scripts/docs/game.ts +68 -22
- package/scripts/docs/messages.ts +330 -16
- package/scripts/editor-api.ts +101 -0
- package/scripts/hlds-events.ts +370 -0
- package/scripts/includes.ts +12 -10
- package/scripts/player-fields.ts +16 -15
- package/scripts/prebuilt.ts +65 -23
- package/scripts/prepare.ts +42 -28
- package/scripts/project.ts +120 -20
- package/scripts/reapi-events.ts +98 -0
- package/scripts/shared-modules.ts +85 -23
- package/scripts/source-map.ts +242 -0
- package/scripts/system.ts +1 -1
- package/scripts/typed-commands.ts +263 -0
- package/scripts/typed-configs.ts +23 -12
- package/scripts/ui.ts +3 -1
- package/scripts/upgrade-menus.ts +274 -0
- package/scripts/upgrade-names.ts +384 -0
- package/scripts/upgrade.ts +857 -0
- package/src/cli-api.mjs +37 -4
- package/src/system.mjs +74 -3
- package/src/testing/compile.ts +8 -5
- package/src/testing/index.ts +2 -1
- package/src/testing/natives.ts +199 -5
- package/src/testing/network.ts +531 -0
- package/src/testing/server.ts +572 -48
- package/src/testing/setup.ts +1 -1
- package/src/testing/tables.ts +25 -0
- package/as/modules/http.ts +0 -184
- 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.
|
|
7
|
-
//
|
|
8
|
-
//
|
|
9
|
-
//
|
|
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 "
|
|
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
|