gdharness 1.3.64 → 1.3.66
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
CHANGED
|
@@ -19349,7 +19349,7 @@ var init_tool_definitions = __esm(() => {
|
|
|
19349
19349
|
{
|
|
19350
19350
|
name: "resource_edit",
|
|
19351
19351
|
title: "Edit resources",
|
|
19352
|
-
description: "Resource files: read one, create any ClassDB resource as .tres, change one, write a shader, build a TileSet, or set a Theme colour or font size. A material is a create with resourceType StandardMaterial3D, ShaderMaterial or CanvasItemMaterial. read answers with the properties the file sets, in the form modify takes, with resourceType the engine class and scriptClass the class_name of its script when it declares one, and a Theme lists its items there as `Button/colors/font_color`, so a style box, a font or a constant is set through modify by that name, as `Button/styles/normal` given the res:// path of a StyleBox. A Curve, Curve2D or Curve3D reads as the inspector shows it, point_count and point_0/position and the rest, rather than the _data list the file stores, and so does one built into a resource or a scene. create and modify answer each property given under properties as the file holds it once saved, in the same form. A create or modify whose properties made the engine change others, as a Gradient given more colours than offsets gives each new point an offset of 0, names each of those under alsoChanged with what it held before and holds now. The engine saves only what it loaded, so a modify can drop a line it does not load, such as a shader parameter whose uniform was renamed. In a .tres file, alsoSaved lists each other property of the main resource that the save changed, added or dropped, as {property, was, saved} in the file's own text.
|
|
19352
|
+
description: "Resource files: read one, create any ClassDB resource as .tres, change one, write a shader, build a TileSet, or set a Theme colour or font size. A material is a create with resourceType StandardMaterial3D, ShaderMaterial or CanvasItemMaterial. read answers with the properties the file sets, in the form modify takes, with resourceType the engine class and scriptClass the class_name of its script when it declares one, and a Theme lists its items there as `Button/colors/font_color`, so a style box, a font or a constant is set through modify by that name, as `Button/styles/normal` given the res:// path of a StyleBox. A Curve, Curve2D or Curve3D reads as the inspector shows it, point_count and point_0/position and the rest, rather than the _data list the file stores, and so does one built into a resource or a scene. create and modify answer each property given under properties as the file holds it once saved, in the same form. A create or modify whose properties made the engine change others, as a Gradient given more colours than offsets gives each new point an offset of 0, names each of those under alsoChanged with what it held before and holds now. The engine saves only what it loaded, so a modify can drop a line it does not load, such as a shader parameter whose uniform was renamed. In a .tres file, alsoSaved lists each other property of the main resource that the save changed, added or dropped, as {property, was, saved} in the file's own text. An added entry has no was key, and a dropped entry has no saved key. Embedded resources and values that read the same are not listed. read of a shader says whether it compiles under compiles, with compileErrors as create_shader gives them. A property holding a resource takes its res:// path. A file never imported is refused with the reimport that imports it. move takes any file of the project, a script or an image as much as a resource, or a directory, and works from the files, so it needs no editor. One serving the project is brought up to it as after a move in its own FileSystem dock, its open scenes and cached resources named for the new paths and the project settings the move rewrote taken from the file. read needs no editor either: with none serving the project, a headless engine reads the file. The ops that write a resource go through the editor when one serves the project. With none, a headless engine runs the tool the editor would and the answer says so under writtenBy. That engine runs the script of the resource, where the editor runs only tool scripts, so what a script changes as the file loads or as a property is set is put back before the save, and answered under setByScript rather than alsoChanged, with setByScriptNote. A resource where that cannot be done is refused and the file left as it was. A read with none leaves out what such a script set as the file loaded.",
|
|
19353
19353
|
parameters: {
|
|
19354
19354
|
projectPath: PROJECT_PATH,
|
|
19355
19355
|
resourcePath: {
|
|
@@ -51071,9 +51071,15 @@ function selectTests(projectPath, asked, given) {
|
|
|
51071
51071
|
return { ok: false, reason: `${said}: none of them declares a func test_ at the top level.` };
|
|
51072
51072
|
}
|
|
51073
51073
|
const written = declared.map((one) => `${nameOf(one.suite)}:${one.test}`);
|
|
51074
|
-
const
|
|
51075
|
-
|
|
51076
|
-
|
|
51074
|
+
const bare = (name) => name.replace(/^test_/, "");
|
|
51075
|
+
const inSuite = suiteNamed === null ? declared : declared.filter((one) => one.suite === suitePath || nameOf(one.suite) === suiteNamed);
|
|
51076
|
+
const spell = (one) => suiteNamed === null ? one.test : `${nameOf(one.suite)}:${one.test}`;
|
|
51077
|
+
const close = [
|
|
51078
|
+
...new Set([
|
|
51079
|
+
...nearest(bare(test), [...new Set(inSuite.map((one) => bare(one.test)))]).flatMap((name) => inSuite.filter((one) => bare(one.test) === name).map(spell)),
|
|
51080
|
+
...suiteNamed === null ? [] : declared.filter((one) => one.test === test).map(spell)
|
|
51081
|
+
])
|
|
51082
|
+
];
|
|
51077
51083
|
return {
|
|
51078
51084
|
ok: false,
|
|
51079
51085
|
reason: close.length > 0 ? `${said}. The nearest ${close.length === 1 ? "is" : "are"} ${close.join(", ")}.` : `${said}. The cases there are ${written.slice(0, 12).join(", ")}${written.length > 12 ? `, and ${written.length - 12} more` : ""}.`
|
|
@@ -623,6 +623,12 @@ static func resource(res_path: String, include_defaults: bool) -> Dictionary:
|
|
|
623
623
|
## A shader is compiled once something reads what it declares, and a create answering only the path
|
|
624
624
|
## left a missing semicolon to show up wherever the shader was first drawn with.
|
|
625
625
|
static func shader_errors(path: String) -> Array[Dictionary]:
|
|
626
|
+
# A headless engine's output comes back with the answer, where these errors came a second time
|
|
627
|
+
# with a backtrace through gdharness's own scripts. The marks are logger.gd's ASIDE and RESUMED,
|
|
628
|
+
# which the editor addon does not ship, and an editor's Output panel would show them.
|
|
629
|
+
var headless: bool = not Engine.is_editor_hint()
|
|
630
|
+
if headless:
|
|
631
|
+
printerr("[gdharness] aside")
|
|
626
632
|
var caught: GdhShaderErrors = GdhShaderErrors.new()
|
|
627
633
|
OS.add_logger(caught)
|
|
628
634
|
var shader: Shader = (
|
|
@@ -631,6 +637,8 @@ static func shader_errors(path: String) -> Array[Dictionary]:
|
|
|
631
637
|
if shader != null:
|
|
632
638
|
var _uniforms: Array = shader.get_shader_uniform_list()
|
|
633
639
|
OS.remove_logger(caught)
|
|
640
|
+
if headless:
|
|
641
|
+
printerr("[gdharness] resumed")
|
|
634
642
|
return caught.raised
|
|
635
643
|
|
|
636
644
|
|
|
@@ -623,6 +623,12 @@ static func resource(res_path: String, include_defaults: bool) -> Dictionary:
|
|
|
623
623
|
## A shader is compiled once something reads what it declares, and a create answering only the path
|
|
624
624
|
## left a missing semicolon to show up wherever the shader was first drawn with.
|
|
625
625
|
static func shader_errors(path: String) -> Array[Dictionary]:
|
|
626
|
+
# A headless engine's output comes back with the answer, where these errors came a second time
|
|
627
|
+
# with a backtrace through gdharness's own scripts. The marks are logger.gd's ASIDE and RESUMED,
|
|
628
|
+
# which the editor addon does not ship, and an editor's Output panel would show them.
|
|
629
|
+
var headless: bool = not Engine.is_editor_hint()
|
|
630
|
+
if headless:
|
|
631
|
+
printerr("[gdharness] aside")
|
|
626
632
|
var caught: GdhShaderErrors = GdhShaderErrors.new()
|
|
627
633
|
OS.add_logger(caught)
|
|
628
634
|
var shader: Shader = (
|
|
@@ -631,6 +637,8 @@ static func shader_errors(path: String) -> Array[Dictionary]:
|
|
|
631
637
|
if shader != null:
|
|
632
638
|
var _uniforms: Array = shader.get_shader_uniform_list()
|
|
633
639
|
OS.remove_logger(caught)
|
|
640
|
+
if headless:
|
|
641
|
+
printerr("[gdharness] resumed")
|
|
634
642
|
return caught.raised
|
|
635
643
|
|
|
636
644
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "gdharness",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.66",
|
|
4
4
|
"mcpName": "io.github.Aureliolo/gdharness",
|
|
5
5
|
"description": "A harness for driving a Godot 4 project from an agent: editor addons, a runtime bridge into the running game, an MCP server in front of them, and a CLI that installs and diagnoses the Godot side.",
|
|
6
6
|
"type": "module",
|