mam 1.11.964 → 1.11.966
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/node.d.ts +13 -13
- package/node.test.js +61 -26
- package/node.test.js.map +1 -1
- package/package.json +1 -1
package/node.d.ts
CHANGED
|
@@ -804,8 +804,8 @@ declare namespace $ {
|
|
|
804
804
|
dir: string;
|
|
805
805
|
}> {
|
|
806
806
|
}
|
|
807
|
-
const $mol_run_spawn: (...args: Parameters<(typeof $node)["child_process"]["spawn"]>) => import("child_process").ChildProcess;
|
|
808
|
-
const $mol_run_spawn_sync: (...args: Parameters<(typeof $node)["child_process"]["spawnSync"]>) => import("child_process").SpawnSyncReturns<string | NonSharedBuffer>;
|
|
807
|
+
const $mol_run_spawn: (...args: Parameters<(typeof $node)["child_process"]["spawn"]>) => import("node:child_process").ChildProcess;
|
|
808
|
+
const $mol_run_spawn_sync: (...args: Parameters<(typeof $node)["child_process"]["spawnSync"]>) => import("node:child_process").SpawnSyncReturns<string | NonSharedBuffer>;
|
|
809
809
|
type $mol_run_options = {
|
|
810
810
|
command: readonly string[] | string;
|
|
811
811
|
dir: string;
|
|
@@ -814,10 +814,10 @@ declare namespace $ {
|
|
|
814
814
|
};
|
|
815
815
|
class $mol_run extends $mol_object {
|
|
816
816
|
static async_enabled(): boolean;
|
|
817
|
-
static spawn(options: $mol_run_options): import("child_process").SpawnSyncReturns<string | NonSharedBuffer> | $mol_run_error_context;
|
|
817
|
+
static spawn(options: $mol_run_options): import("node:child_process").SpawnSyncReturns<string | NonSharedBuffer> | $mol_run_error_context;
|
|
818
818
|
static spawn_async({ dir, sync, timeout, command, env }: $mol_run_options & {
|
|
819
819
|
sync?: boolean;
|
|
820
|
-
}): import("child_process").SpawnSyncReturns<string | NonSharedBuffer> | (Promise<$mol_run_error_context> & {
|
|
820
|
+
}): import("node:child_process").SpawnSyncReturns<string | NonSharedBuffer> | (Promise<$mol_run_error_context> & {
|
|
821
821
|
destructor: () => void;
|
|
822
822
|
});
|
|
823
823
|
static error_message(res?: $mol_run_error_context): string;
|
|
@@ -832,7 +832,7 @@ declare namespace $ {
|
|
|
832
832
|
uri(): string;
|
|
833
833
|
options(): import("node:worker_threads").WorkerOptions;
|
|
834
834
|
worker_data(): unknown;
|
|
835
|
-
worker(): Promise<import("worker_threads").Worker & {
|
|
835
|
+
worker(): Promise<import("node:worker_threads").Worker & {
|
|
836
836
|
destructor: () => void;
|
|
837
837
|
}>;
|
|
838
838
|
restarts(next?: null): number;
|
|
@@ -1408,7 +1408,7 @@ declare namespace $ {
|
|
|
1408
1408
|
declare namespace $ {
|
|
1409
1409
|
class $mol_storage_node extends $mol_storage {
|
|
1410
1410
|
static persisted(): boolean;
|
|
1411
|
-
static stats(): import("fs").StatsFs;
|
|
1411
|
+
static stats(): import("node:fs").StatsFs;
|
|
1412
1412
|
static total(): number;
|
|
1413
1413
|
static used(): number;
|
|
1414
1414
|
static free(): number;
|
|
@@ -1862,9 +1862,9 @@ declare namespace $ {
|
|
|
1862
1862
|
class $mol_server extends $mol_object {
|
|
1863
1863
|
express(): import("express-serve-static-core").Express;
|
|
1864
1864
|
internal_ip(): string;
|
|
1865
|
-
http(): import("http").Server<typeof import("http").IncomingMessage, typeof import("http").ServerResponse>;
|
|
1865
|
+
http(): import("node:http").Server<typeof import("node:http").IncomingMessage, typeof import("node:http").ServerResponse>;
|
|
1866
1866
|
connections: Set<import("ws").default>;
|
|
1867
|
-
socket(): import("ws").Server<typeof import("ws").default, typeof import("http").IncomingMessage>;
|
|
1867
|
+
socket(): import("ws").Server<typeof import("ws").default, typeof import("node:http").IncomingMessage>;
|
|
1868
1868
|
expressHandlers(): readonly $mol_server_middleware[];
|
|
1869
1869
|
expressCompressor(): $mol_server_middleware;
|
|
1870
1870
|
expressCors(): $mol_server_middleware;
|
|
@@ -1893,8 +1893,8 @@ declare namespace $ {
|
|
|
1893
1893
|
expressIndexRequest(req: typeof $node.express.request, res: typeof $node.express.response): true | undefined;
|
|
1894
1894
|
port(): number;
|
|
1895
1895
|
lines(next?: Map<import("ws").default, string>): Map<import("ws").default, string>;
|
|
1896
|
-
socket(): import("ws").Server<typeof import("ws").default, typeof import("http").IncomingMessage>;
|
|
1897
|
-
start(): import("ws").Server<typeof import("ws").default, typeof import("http").IncomingMessage>;
|
|
1896
|
+
socket(): import("ws").Server<typeof import("ws").default, typeof import("node:http").IncomingMessage>;
|
|
1897
|
+
start(): import("ws").Server<typeof import("ws").default, typeof import("node:http").IncomingMessage>;
|
|
1898
1898
|
protected bundles_count(reset?: null): number;
|
|
1899
1899
|
/**
|
|
1900
1900
|
* Держать в памяти собранные бандлы плохо, т.к. gc их может долго не утилизировать и node сожрет память и упадет.
|
|
@@ -1910,13 +1910,13 @@ declare namespace $ {
|
|
|
1910
1910
|
bundle_changed_at(path: string): Date;
|
|
1911
1911
|
notify([line, path]: [InstanceType<$node['ws']['WebSocket']>, string]): boolean;
|
|
1912
1912
|
slave_commands(next?: string[]): string[];
|
|
1913
|
-
slave_servers(): ((import("child_process").ChildProcessByStdio<import("stream").Writable, null, null> & {
|
|
1913
|
+
slave_servers(): ((import("node:child_process").ChildProcessByStdio<import("node:stream").Writable, null, null> & {
|
|
1914
1914
|
destructor: () => void;
|
|
1915
1915
|
}) | null)[];
|
|
1916
|
-
slave_server(cmd: string): (import("child_process").ChildProcessByStdio<import("stream").Writable, null, null> & {
|
|
1916
|
+
slave_server(cmd: string): (import("node:child_process").ChildProcessByStdio<import("node:stream").Writable, null, null> & {
|
|
1917
1917
|
destructor: () => void;
|
|
1918
1918
|
}) | null;
|
|
1919
|
-
repl(): import("readline").Interface;
|
|
1919
|
+
repl(): import("node:readline").Interface;
|
|
1920
1920
|
}
|
|
1921
1921
|
}
|
|
1922
1922
|
|
package/node.test.js
CHANGED
|
@@ -13949,7 +13949,7 @@ var $;
|
|
|
13949
13949
|
})($ || ($ = {}));
|
|
13950
13950
|
|
|
13951
13951
|
;
|
|
13952
|
-
($.$
|
|
13952
|
+
($.$mol_hotkey2) = class $mol_hotkey2 extends ($.$mol_plugin) {
|
|
13953
13953
|
keydown(next){
|
|
13954
13954
|
if(next !== undefined) return next;
|
|
13955
13955
|
return null;
|
|
@@ -13957,20 +13957,11 @@ var $;
|
|
|
13957
13957
|
event(){
|
|
13958
13958
|
return {...(super.event()), "keydown": (next) => (this.keydown(next))};
|
|
13959
13959
|
}
|
|
13960
|
-
|
|
13960
|
+
action(){
|
|
13961
13961
|
return {};
|
|
13962
13962
|
}
|
|
13963
|
-
mod_ctrl(){
|
|
13964
|
-
return false;
|
|
13965
|
-
}
|
|
13966
|
-
mod_alt(){
|
|
13967
|
-
return false;
|
|
13968
|
-
}
|
|
13969
|
-
mod_shift(){
|
|
13970
|
-
return false;
|
|
13971
|
-
}
|
|
13972
13963
|
};
|
|
13973
|
-
($mol_mem(($.$
|
|
13964
|
+
($mol_mem(($.$mol_hotkey2.prototype), "keydown"));
|
|
13974
13965
|
|
|
13975
13966
|
|
|
13976
13967
|
;
|
|
@@ -14100,27 +14091,71 @@ var $;
|
|
|
14100
14091
|
* Plugin which adds handlers for keyboard keys.
|
|
14101
14092
|
* @see [mol_keyboard_code](../keyboard/code/code.ts)
|
|
14102
14093
|
*/
|
|
14103
|
-
class $
|
|
14104
|
-
key() {
|
|
14105
|
-
return super.key();
|
|
14106
|
-
}
|
|
14094
|
+
class $mol_hotkey2 extends $.$mol_hotkey2 {
|
|
14107
14095
|
keydown(event) {
|
|
14108
14096
|
if (!event)
|
|
14109
14097
|
return;
|
|
14110
14098
|
if (event.defaultPrevented)
|
|
14111
14099
|
return;
|
|
14112
|
-
|
|
14113
|
-
|
|
14114
|
-
|
|
14115
|
-
|
|
14116
|
-
|
|
14117
|
-
|
|
14118
|
-
|
|
14119
|
-
const handle = this.key()[name];
|
|
14120
|
-
if (handle)
|
|
14121
|
-
handle(event);
|
|
14100
|
+
const key = [...new Set([
|
|
14101
|
+
...(event.ctrlKey || event.metaKey) ? ['ctrl'] : [],
|
|
14102
|
+
...event.altKey ? ['alt'] : [],
|
|
14103
|
+
...event.shiftKey ? ['shift'] : [],
|
|
14104
|
+
$mol_keyboard_code[event.keyCode] ?? '?',
|
|
14105
|
+
])].join('_');
|
|
14106
|
+
this.action()[key]?.(event);
|
|
14122
14107
|
}
|
|
14123
14108
|
}
|
|
14109
|
+
$$.$mol_hotkey2 = $mol_hotkey2;
|
|
14110
|
+
})($$ = $.$$ || ($.$$ = {}));
|
|
14111
|
+
})($ || ($ = {}));
|
|
14112
|
+
|
|
14113
|
+
;
|
|
14114
|
+
($.$mol_hotkey) = class $mol_hotkey extends ($.$mol_hotkey2) {
|
|
14115
|
+
key(){
|
|
14116
|
+
return {};
|
|
14117
|
+
}
|
|
14118
|
+
mod_ctrl(){
|
|
14119
|
+
return false;
|
|
14120
|
+
}
|
|
14121
|
+
mod_alt(){
|
|
14122
|
+
return false;
|
|
14123
|
+
}
|
|
14124
|
+
mod_shift(){
|
|
14125
|
+
return false;
|
|
14126
|
+
}
|
|
14127
|
+
};
|
|
14128
|
+
|
|
14129
|
+
|
|
14130
|
+
;
|
|
14131
|
+
"use strict";
|
|
14132
|
+
|
|
14133
|
+
|
|
14134
|
+
;
|
|
14135
|
+
"use strict";
|
|
14136
|
+
var $;
|
|
14137
|
+
(function ($) {
|
|
14138
|
+
var $$;
|
|
14139
|
+
(function ($$) {
|
|
14140
|
+
/**
|
|
14141
|
+
* Plugin which adds handlers for keyboard keys.
|
|
14142
|
+
* @deprecated Use $mol_hotkey2
|
|
14143
|
+
* @see [mol_keyboard_code](../keyboard/code/code.ts)
|
|
14144
|
+
*/
|
|
14145
|
+
class $mol_hotkey extends $.$mol_hotkey {
|
|
14146
|
+
action() {
|
|
14147
|
+
const prefix = [...new Set([
|
|
14148
|
+
...this.mod_ctrl() ? ['ctrl_'] : [],
|
|
14149
|
+
...this.mod_alt() ? ['alt_'] : [],
|
|
14150
|
+
...this.mod_shift() ? ['shift_'] : [],
|
|
14151
|
+
])].join('');
|
|
14152
|
+
return Object.fromEntries(Object.entries(this.key())
|
|
14153
|
+
.map(([key, val]) => [prefix + key, val]));
|
|
14154
|
+
}
|
|
14155
|
+
}
|
|
14156
|
+
__decorate([
|
|
14157
|
+
$mol_mem
|
|
14158
|
+
], $mol_hotkey.prototype, "action", null);
|
|
14124
14159
|
$$.$mol_hotkey = $mol_hotkey;
|
|
14125
14160
|
})($$ = $.$$ || ($.$$ = {}));
|
|
14126
14161
|
})($ || ($ = {}));
|