gdharness 1.3.41 → 1.3.43
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/build/cli.js +131 -47
- package/build/godot/addons/auto_reload/auto_reload.gd +18 -19
- package/build/godot/addons/gdharness_editor/animation_reads.gd +84 -35
- package/build/godot/addons/gdharness_editor/bridge_client.gd +53 -58
- package/build/godot/addons/gdharness_editor/declared_values.gd +68 -32
- package/build/godot/addons/gdharness_editor/file_reads.gd +114 -39
- package/build/godot/addons/gdharness_editor/file_walk.gd +12 -5
- package/build/godot/addons/gdharness_editor/headless_check.gd +94 -41
- package/build/godot/addons/gdharness_editor/plugin.gd +2 -3
- package/build/godot/addons/gdharness_editor/property_paths.gd +22 -12
- package/build/godot/addons/gdharness_editor/property_values.gd +143 -78
- package/build/godot/addons/gdharness_editor/reading.gd +37 -12
- package/build/godot/addons/gdharness_editor/same_values.gd +4 -4
- package/build/godot/addons/gdharness_editor/scene_file.gd +136 -79
- package/build/godot/addons/gdharness_editor/scene_uids.gd +12 -6
- package/build/godot/addons/gdharness_editor/serialisation.gd +75 -51
- package/build/godot/addons/gdharness_editor/setting_reads.gd +7 -6
- package/build/godot/addons/gdharness_editor/tool_executor.gd +3 -6
- package/build/godot/addons/gdharness_editor/tools/animation_states.gd +41 -28
- package/build/godot/addons/gdharness_editor/tools/animation_tools.gd +84 -50
- package/build/godot/addons/gdharness_editor/tools/animation_tracks.gd +70 -40
- package/build/godot/addons/gdharness_editor/tools/class_tools.gd +34 -30
- package/build/godot/addons/gdharness_editor/tools/filesystem_tools.gd +24 -22
- package/build/godot/addons/gdharness_editor/tools/navigation_bake.gd +49 -29
- package/build/godot/addons/gdharness_editor/tools/play_tools.gd +26 -21
- package/build/godot/addons/gdharness_editor/tools/profile_tools.gd +40 -40
- package/build/godot/addons/gdharness_editor/tools/resource_tools.gd +181 -107
- package/build/godot/addons/gdharness_editor/tools/scene_groups.gd +16 -9
- package/build/godot/addons/gdharness_editor/tools/scene_kin.gd +75 -43
- package/build/godot/addons/gdharness_editor/tools/scene_paths.gd +35 -20
- package/build/godot/addons/gdharness_editor/tools/scene_placing.gd +28 -13
- package/build/godot/addons/gdharness_editor/tools/scene_sharing.gd +66 -0
- package/build/godot/addons/gdharness_editor/tools/scene_sharing.gd.uid +1 -0
- package/build/godot/addons/gdharness_editor/tools/scene_tools.gd +171 -62
- package/build/godot/addons/gdharness_editor/tools/script_paths.gd +20 -8
- package/build/godot/addons/gdharness_editor/tools/settings_tools.gd +11 -8
- package/build/godot/addons/gdharness_editor/tools/signal_tools.gd +47 -34
- package/build/godot/addons/gdharness_editor/tools/tileset_tools.gd +77 -50
- package/build/godot/addons/gdharness_editor/value_shapes.gd +5 -6
- package/build/godot/addons/gdharness_runtime/call_errors.gd +1 -2
- package/build/godot/addons/gdharness_runtime/declared_values.gd +68 -32
- package/build/godot/addons/gdharness_runtime/error_report.gd +1 -2
- package/build/godot/addons/gdharness_runtime/reading.gd +37 -12
- package/build/godot/addons/gdharness_runtime/runtime_accessibility.gd +84 -63
- package/build/godot/addons/gdharness_runtime/runtime_autoload.gd +153 -148
- package/build/godot/addons/gdharness_runtime/runtime_capture.gd +64 -42
- package/build/godot/addons/gdharness_runtime/runtime_changes.gd +184 -122
- package/build/godot/addons/gdharness_runtime/runtime_frames.gd +2 -2
- package/build/godot/addons/gdharness_runtime/runtime_hover.gd +24 -20
- package/build/godot/addons/gdharness_runtime/runtime_input.gd +134 -92
- package/build/godot/addons/gdharness_runtime/runtime_items.gd +29 -13
- package/build/godot/addons/gdharness_runtime/runtime_menus.gd +0 -1
- package/build/godot/addons/gdharness_runtime/runtime_mouse.gd +38 -20
- package/build/godot/addons/gdharness_runtime/runtime_pad.gd +17 -13
- package/build/godot/addons/gdharness_runtime/runtime_paths.gd +84 -46
- package/build/godot/addons/gdharness_runtime/runtime_queries.gd +117 -79
- package/build/godot/addons/gdharness_runtime/runtime_says.gd +14 -17
- package/build/godot/addons/gdharness_runtime/runtime_screen.gd +23 -16
- package/build/godot/addons/gdharness_runtime/runtime_targets.gd +117 -66
- package/build/godot/addons/gdharness_runtime/runtime_touch.gd +211 -0
- package/build/godot/addons/gdharness_runtime/runtime_touch.gd.uid +1 -0
- package/build/godot/addons/gdharness_runtime/runtime_typing.gd +44 -27
- package/build/godot/addons/gdharness_runtime/runtime_values.gd +108 -73
- package/build/godot/addons/gdharness_runtime/runtime_waits.gd +111 -84
- package/build/godot/addons/gdharness_runtime/runtime_words.gd +10 -7
- package/build/godot/addons/gdharness_runtime/serialisation.gd +75 -51
- package/build/godot/addons/gdharness_runtime/value_shapes.gd +5 -6
- package/build/godot/addons/gdharness_tests/bench.gd +4 -5
- package/build/godot/addons/gdharness_tests/event.gd +10 -5
- package/build/godot/addons/gdharness_tests/share.gd +38 -18
- package/build/godot/addons/gdharness_tests/suites.gd +3 -3
- package/build/godot/addons/gdharness_tests/wait.gd +3 -2
- package/build/godot/loader/loader.gd +9 -9
- package/build/godot/operations/animation_reads.gd +84 -35
- package/build/godot/operations/audio_buses.gd +48 -19
- package/build/godot/operations/class_cache.gd +16 -11
- package/build/godot/operations/classdb_queries.gd +89 -44
- package/build/godot/operations/declared_values.gd +68 -32
- package/build/godot/operations/dependencies.gd +139 -93
- package/build/godot/operations/editor_tools.gd +9 -10
- package/build/godot/operations/export_presets.gd +100 -54
- package/build/godot/operations/file_reads.gd +114 -39
- package/build/godot/operations/file_walk.gd +12 -5
- package/build/godot/operations/gdscript_analysis.gd +105 -66
- package/build/godot/operations/gdscript_authoring.gd +138 -39
- package/build/godot/operations/godot_operations.gd +17 -11
- package/build/godot/operations/import_pipeline.gd +110 -59
- package/build/godot/operations/input_actions.gd +63 -39
- package/build/godot/operations/patterns.gd +3 -1
- package/build/godot/operations/plugins.gd +36 -16
- package/build/godot/operations/project_config.gd +144 -27
- package/build/godot/operations/project_diagnostics.gd +24 -11
- package/build/godot/operations/project_file.gd +16 -16
- package/build/godot/operations/project_validation.gd +71 -44
- package/build/godot/operations/property_paths.gd +22 -12
- package/build/godot/operations/property_values.gd +143 -78
- package/build/godot/operations/reading.gd +37 -12
- package/build/godot/operations/rename_checks.gd +2 -2
- package/build/godot/operations/resource_files.gd +11 -9
- package/build/godot/operations/same_values.gd +4 -4
- package/build/godot/operations/scene_connections.gd +27 -13
- package/build/godot/operations/script_check.gd +52 -49
- package/build/godot/operations/serialisation.gd +75 -51
- package/build/godot/operations/setting_reads.gd +7 -6
- package/build/godot/operations/value_shapes.gd +5 -6
- package/build/godot/tests/listed.gd +321 -268
- package/package.json +1 -1
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
@tool
|
|
2
2
|
extends Node
|
|
3
|
-
|
|
4
3
|
## The engine's script profiler on a game the editor plays, summed here for the server.
|
|
5
4
|
##
|
|
6
5
|
## The editor is that game's debugger, so the profiler is switched on through the editor's own
|
|
@@ -11,7 +10,6 @@ extends Node
|
|
|
11
10
|
## expose to scripts: found by its class in the editor's tree and connected to by name.
|
|
12
11
|
|
|
13
12
|
const GdhRead = preload("../reading.gd")
|
|
14
|
-
|
|
15
13
|
## The most functions a frame may carry when the server does not say. The engine names a function
|
|
16
14
|
## once, as it first appears, and the game's debugger queue drops those messages past its size, so
|
|
17
15
|
## the server keeps this below the queue the project sets; this is that for the engine's default.
|
|
@@ -26,37 +24,10 @@ const PROFILE_RECEIVED: String = "gdharness:profile_received"
|
|
|
26
24
|
## Kept in step with the runtime addon's runtime_autoload.gd.
|
|
27
25
|
const PROFILE_FROM_START: String = "GDHARNESS_PROFILE_FROM_START"
|
|
28
26
|
|
|
29
|
-
|
|
30
|
-
## The editor's debugger sessions, numbered as the editor numbers its debugger tabs.
|
|
31
|
-
class GdhSessions:
|
|
32
|
-
extends EditorDebuggerPlugin
|
|
33
|
-
|
|
34
|
-
signal session_started(session_id: int)
|
|
35
|
-
|
|
36
|
-
func _setup_session(session_id: int) -> void:
|
|
37
|
-
var session: EditorDebuggerSession = get_session(session_id)
|
|
38
|
-
# int rather than Error: Signal.connect answers with a plain int.
|
|
39
|
-
var joined: int = session.started.connect(func() -> void: session_started.emit(session_id))
|
|
40
|
-
if joined != OK:
|
|
41
|
-
push_error("gdharness could not watch debugger session %d start: %d" % [session_id, joined])
|
|
42
|
-
|
|
43
|
-
func _has_capture(capture: String) -> bool:
|
|
44
|
-
return capture == PROFILE_CAPTURE
|
|
45
|
-
|
|
46
|
-
## Answers a quitting game that its profile's totals arrived, which it waits for before it exits.
|
|
47
|
-
## The editor reads a session's messages in order, so the totals sent before this have been read.
|
|
48
|
-
func _capture(message: String, _data: Array, session_id: int) -> bool:
|
|
49
|
-
if message != PROFILE_SENT:
|
|
50
|
-
return false
|
|
51
|
-
get_session(session_id).send_message(PROFILE_RECEIVED, [])
|
|
52
|
-
return true
|
|
53
|
-
|
|
54
|
-
|
|
55
27
|
var _editor_plugin: EditorPlugin = null
|
|
56
28
|
var _sessions: GdhSessions = null
|
|
57
29
|
## The debugger tabs connected to, by instance id, so none is connected twice.
|
|
58
30
|
var _hooked: Dictionary[int, bool] = {}
|
|
59
|
-
|
|
60
31
|
## A play asked to be profiled before its session started.
|
|
61
32
|
var _armed: bool = false
|
|
62
33
|
var _session: int = -1
|
|
@@ -73,6 +44,12 @@ var _names: Dictionary[int, String] = {}
|
|
|
73
44
|
var _totals: Dictionary[String, PackedFloat64Array] = {}
|
|
74
45
|
|
|
75
46
|
|
|
47
|
+
func _exit_tree() -> void:
|
|
48
|
+
if _editor_plugin != null and _sessions != null:
|
|
49
|
+
_editor_plugin.remove_debugger_plugin(_sessions)
|
|
50
|
+
_sessions = null
|
|
51
|
+
|
|
52
|
+
|
|
76
53
|
func set_editor_plugin(plugin: EditorPlugin) -> void:
|
|
77
54
|
_editor_plugin = plugin
|
|
78
55
|
_sessions = GdhSessions.new()
|
|
@@ -82,12 +59,6 @@ func set_editor_plugin(plugin: EditorPlugin) -> void:
|
|
|
82
59
|
plugin.add_debugger_plugin(_sessions)
|
|
83
60
|
|
|
84
61
|
|
|
85
|
-
func _exit_tree() -> void:
|
|
86
|
-
if _editor_plugin != null and _sessions != null:
|
|
87
|
-
_editor_plugin.remove_debugger_plugin(_sessions)
|
|
88
|
-
_sessions = null
|
|
89
|
-
|
|
90
|
-
|
|
91
62
|
## Switches the profiler on for the game being played, or with [code]arm[/code] for the next one
|
|
92
63
|
## to start and never the one playing: a start ends the game before it, which can still be going.
|
|
93
64
|
## Either way what was summed before is dropped.
|
|
@@ -98,8 +69,9 @@ func profile_start(args: Dictionary) -> Dictionary:
|
|
|
98
69
|
"error":
|
|
99
70
|
(
|
|
100
71
|
(
|
|
101
|
-
"This editor's debugger has no %s node to read the profiler from, which is
|
|
102
|
-
+ " 4.7 keeps it: a Godot that moved it has to be met by a
|
|
72
|
+
"This editor's debugger has no %s node to read the profiler from, which is "
|
|
73
|
+
+ "where Godot 4.7 keeps it: a Godot that moved it has to be met by a "
|
|
74
|
+
+ "gdharness that knows where."
|
|
103
75
|
)
|
|
104
76
|
% DEBUGGER_CLASS
|
|
105
77
|
),
|
|
@@ -113,12 +85,12 @@ func profile_start(args: Dictionary) -> Dictionary:
|
|
|
113
85
|
# runtime addon to hold its start until the profiler is on, which the session's start
|
|
114
86
|
# switches on with a message the game reads only on a later poll.
|
|
115
87
|
OS.set_environment(PROFILE_FROM_START, "1")
|
|
116
|
-
return {"ok": true, "started": false, "armed": true, "session": -1}
|
|
88
|
+
return { "ok": true, "started": false, "armed": true, "session": -1 }
|
|
117
89
|
var active: int = _active_session()
|
|
118
90
|
if active < 0:
|
|
119
|
-
return {"ok": true, "started": false, "armed": false, "session": -1}
|
|
91
|
+
return { "ok": true, "started": false, "armed": false, "session": -1 }
|
|
120
92
|
_switch_on(active)
|
|
121
|
-
return {"ok": true, "started": true, "armed": false, "session": active}
|
|
93
|
+
return { "ok": true, "started": true, "armed": false, "session": active }
|
|
122
94
|
|
|
123
95
|
|
|
124
96
|
## What has been summed, for the server to put into an answer.
|
|
@@ -256,3 +228,31 @@ func _add(data: Array, into: Dictionary[String, PackedFloat64Array]) -> int:
|
|
|
256
228
|
into[signature] = sum
|
|
257
229
|
carried += 1
|
|
258
230
|
return carried
|
|
231
|
+
|
|
232
|
+
|
|
233
|
+
## The editor's debugger sessions, numbered as the editor numbers its debugger tabs.
|
|
234
|
+
class GdhSessions:
|
|
235
|
+
extends EditorDebuggerPlugin
|
|
236
|
+
|
|
237
|
+
signal session_started(session_id: int)
|
|
238
|
+
|
|
239
|
+
func _setup_session(session_id: int) -> void:
|
|
240
|
+
var session: EditorDebuggerSession = get_session(session_id)
|
|
241
|
+
# int rather than Error: Signal.connect answers with a plain int.
|
|
242
|
+
var joined: int = session.started.connect(func() -> void: session_started.emit(session_id))
|
|
243
|
+
if joined != OK:
|
|
244
|
+
push_error(
|
|
245
|
+
"gdharness could not watch debugger session %d start: %d" % [session_id, joined]
|
|
246
|
+
)
|
|
247
|
+
|
|
248
|
+
func _has_capture(capture: String) -> bool:
|
|
249
|
+
return capture == PROFILE_CAPTURE
|
|
250
|
+
|
|
251
|
+
## Answers a quitting game that its profile's totals arrived, which it waits for before it
|
|
252
|
+
## exits. The editor reads a session's messages in order, so the totals sent before this have
|
|
253
|
+
## been read.
|
|
254
|
+
func _capture(message: String, _data: Array, session_id: int) -> bool:
|
|
255
|
+
if message != PROFILE_SENT:
|
|
256
|
+
return false
|
|
257
|
+
get_session(session_id).send_message(PROFILE_RECEIVED, [])
|
|
258
|
+
return true
|