@quenty/nevermore-cli 4.43.3 → 4.44.0
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/CHANGELOG.md +10 -0
- package/build-scripts/{combine-test-places.luau → combine-test-places.lua} +3 -3
- package/build-scripts/{transform-inject-deploy-metadata.luau → transform-inject-deploy-metadata.lua} +3 -3
- package/dist/commands/batch-command/batch-deploy-command.js +4 -4
- package/dist/commands/batch-command/batch-deploy-command.js.map +1 -1
- package/dist/commands/batch-command/batch-test-command.d.ts.map +1 -1
- package/dist/commands/batch-command/batch-test-command.js +76 -19
- package/dist/commands/batch-command/batch-test-command.js.map +1 -1
- package/dist/commands/deploy-command/deploy-init-utils.d.ts.map +1 -1
- package/dist/commands/deploy-command/deploy-init-utils.js +7 -1
- package/dist/commands/deploy-command/deploy-init-utils.js.map +1 -1
- package/dist/commands/deploy-command/index.js +1 -1
- package/dist/commands/deploy-command/index.js.map +1 -1
- package/dist/commands/init-command/init-game-command.js +2 -2
- package/dist/commands/init-command/init-game-command.js.map +1 -1
- package/dist/commands/install-package-command.d.ts +14 -0
- package/dist/commands/install-package-command.d.ts.map +1 -1
- package/dist/commands/install-package-command.js +65 -12
- package/dist/commands/install-package-command.js.map +1 -1
- package/dist/utils/deploy/deploy-github-columns.d.ts +12 -2
- package/dist/utils/deploy/deploy-github-columns.d.ts.map +1 -1
- package/dist/utils/deploy/deploy-github-columns.js +11 -4
- package/dist/utils/deploy/deploy-github-columns.js.map +1 -1
- package/dist/utils/deploy/deploy-metadata.js +1 -1
- package/dist/utils/deploy/deploy-metadata.js.map +1 -1
- package/dist/utils/job-context/base-job-context.d.ts +2 -2
- package/dist/utils/job-context/base-job-context.d.ts.map +1 -1
- package/dist/utils/job-context/base-job-context.js +1 -1
- package/dist/utils/job-context/base-job-context.js.map +1 -1
- package/dist/utils/job-context/batch-script-job-context.d.ts +37 -2
- package/dist/utils/job-context/batch-script-job-context.d.ts.map +1 -1
- package/dist/utils/job-context/batch-script-job-context.js +59 -22
- package/dist/utils/job-context/batch-script-job-context.js.map +1 -1
- package/dist/utils/job-context/cloud-job-context.d.ts +2 -2
- package/dist/utils/job-context/cloud-job-context.d.ts.map +1 -1
- package/dist/utils/job-context/cloud-job-context.js +10 -5
- package/dist/utils/job-context/cloud-job-context.js.map +1 -1
- package/dist/utils/job-context/cloud-job-context.test.d.ts +7 -0
- package/dist/utils/job-context/cloud-job-context.test.d.ts.map +1 -0
- package/dist/utils/job-context/cloud-job-context.test.js +91 -0
- package/dist/utils/job-context/cloud-job-context.test.js.map +1 -0
- package/dist/utils/job-context/job-context.d.ts +70 -2
- package/dist/utils/job-context/job-context.d.ts.map +1 -1
- package/dist/utils/job-context/local-job-context.d.ts +2 -2
- package/dist/utils/job-context/local-job-context.d.ts.map +1 -1
- package/dist/utils/job-context/local-job-context.js +4 -2
- package/dist/utils/job-context/local-job-context.js.map +1 -1
- package/dist/utils/job-context/local-job-context.test.d.ts +7 -0
- package/dist/utils/job-context/local-job-context.test.d.ts.map +1 -0
- package/dist/utils/job-context/local-job-context.test.js +68 -0
- package/dist/utils/job-context/local-job-context.test.js.map +1 -0
- package/dist/utils/open-cloud/open-cloud-client.d.ts +50 -7
- package/dist/utils/open-cloud/open-cloud-client.d.ts.map +1 -1
- package/dist/utils/open-cloud/open-cloud-client.js +49 -13
- package/dist/utils/open-cloud/open-cloud-client.js.map +1 -1
- package/dist/utils/open-cloud/open-cloud-client.test.js +125 -1
- package/dist/utils/open-cloud/open-cloud-client.test.js.map +1 -1
- package/dist/utils/open-cloud/open-cloud-logs.characterization.test.d.ts +22 -0
- package/dist/utils/open-cloud/open-cloud-logs.characterization.test.d.ts.map +1 -0
- package/dist/utils/open-cloud/open-cloud-logs.characterization.test.js +202 -0
- package/dist/utils/open-cloud/open-cloud-logs.characterization.test.js.map +1 -0
- package/dist/utils/package-manager-utils.d.ts +29 -0
- package/dist/utils/package-manager-utils.d.ts.map +1 -0
- package/dist/utils/package-manager-utils.js +120 -0
- package/dist/utils/package-manager-utils.js.map +1 -0
- package/dist/utils/package-manager-utils.test.d.ts +2 -0
- package/dist/utils/package-manager-utils.test.d.ts.map +1 -0
- package/dist/utils/package-manager-utils.test.js +121 -0
- package/dist/utils/package-manager-utils.test.js.map +1 -0
- package/dist/utils/testing/batch-run.e2e.test.d.ts +17 -0
- package/dist/utils/testing/batch-run.e2e.test.d.ts.map +1 -0
- package/dist/utils/testing/batch-run.e2e.test.js +343 -0
- package/dist/utils/testing/batch-run.e2e.test.js.map +1 -0
- package/dist/utils/testing/batch-test-runner-template.test.d.ts +11 -0
- package/dist/utils/testing/batch-test-runner-template.test.d.ts.map +1 -0
- package/dist/utils/testing/batch-test-runner-template.test.js +38 -0
- package/dist/utils/testing/batch-test-runner-template.test.js.map +1 -0
- package/dist/utils/testing/log-fetch-stats.d.ts +40 -0
- package/dist/utils/testing/log-fetch-stats.d.ts.map +1 -0
- package/dist/utils/testing/log-fetch-stats.js +18 -0
- package/dist/utils/testing/log-fetch-stats.js.map +1 -0
- package/dist/utils/testing/log-fetch-stats.test.d.ts +2 -0
- package/dist/utils/testing/log-fetch-stats.test.d.ts.map +1 -0
- package/dist/utils/testing/log-fetch-stats.test.js +41 -0
- package/dist/utils/testing/log-fetch-stats.test.js.map +1 -0
- package/dist/utils/testing/parsers/batch-log-parser.d.ts +126 -1
- package/dist/utils/testing/parsers/batch-log-parser.d.ts.map +1 -1
- package/dist/utils/testing/parsers/batch-log-parser.js +440 -103
- package/dist/utils/testing/parsers/batch-log-parser.js.map +1 -1
- package/dist/utils/testing/parsers/batch-log-parser.test.js +494 -1
- package/dist/utils/testing/parsers/batch-log-parser.test.js.map +1 -1
- package/dist/utils/testing/parsers/batch-log-renderer.d.ts +79 -0
- package/dist/utils/testing/parsers/batch-log-renderer.d.ts.map +1 -0
- package/dist/utils/testing/parsers/batch-log-renderer.js +241 -0
- package/dist/utils/testing/parsers/batch-log-renderer.js.map +1 -0
- package/dist/utils/testing/parsers/batch-log-renderer.test.d.ts +2 -0
- package/dist/utils/testing/parsers/batch-log-renderer.test.d.ts.map +1 -0
- package/dist/utils/testing/parsers/batch-log-renderer.test.js +202 -0
- package/dist/utils/testing/parsers/batch-log-renderer.test.js.map +1 -0
- package/dist/utils/testing/runner/combined-project-generator.js +1 -1
- package/dist/utils/testing/runner/combined-project-generator.js.map +1 -1
- package/dist/utils/testing/runner/test-runner.d.ts +24 -0
- package/dist/utils/testing/runner/test-runner.d.ts.map +1 -1
- package/dist/utils/testing/runner/test-runner.js +166 -6
- package/dist/utils/testing/runner/test-runner.js.map +1 -1
- package/dist/utils/testing/runner/test-runner.test.js +228 -2
- package/dist/utils/testing/runner/test-runner.test.js.map +1 -1
- package/dist/utils/testing/structured-test-results.d.ts +77 -0
- package/dist/utils/testing/structured-test-results.d.ts.map +1 -0
- package/dist/utils/testing/structured-test-results.js +140 -0
- package/dist/utils/testing/structured-test-results.js.map +1 -0
- package/dist/utils/testing/structured-test-results.test.d.ts +7 -0
- package/dist/utils/testing/structured-test-results.test.d.ts.map +1 -0
- package/dist/utils/testing/structured-test-results.test.js +179 -0
- package/dist/utils/testing/structured-test-results.test.js.map +1 -0
- package/package.json +6 -6
- package/src/commands/batch-command/batch-deploy-command.ts +4 -4
- package/src/commands/batch-command/batch-test-command.ts +94 -19
- package/src/commands/deploy-command/deploy-init-utils.ts +7 -1
- package/src/commands/deploy-command/index.ts +1 -1
- package/src/commands/init-command/init-game-command.ts +2 -2
- package/src/commands/install-package-command.ts +107 -14
- package/src/utils/deploy/deploy-github-columns.ts +14 -4
- package/src/utils/deploy/deploy-metadata.ts +1 -1
- package/src/utils/job-context/base-job-context.ts +3 -2
- package/src/utils/job-context/batch-script-job-context.ts +98 -17
- package/src/utils/job-context/cloud-job-context.test.ts +112 -0
- package/src/utils/job-context/cloud-job-context.ts +12 -6
- package/src/utils/job-context/job-context.ts +71 -2
- package/src/utils/job-context/local-job-context.test.ts +89 -0
- package/src/utils/job-context/local-job-context.ts +7 -3
- package/src/utils/open-cloud/open-cloud-client.test.ts +155 -1
- package/src/utils/open-cloud/open-cloud-client.ts +94 -18
- package/src/utils/open-cloud/open-cloud-logs.characterization.test.ts +277 -0
- package/src/utils/package-manager-utils.test.ts +174 -0
- package/src/utils/package-manager-utils.ts +148 -0
- package/src/utils/testing/batch-run.e2e.test.ts +425 -0
- package/src/utils/testing/batch-test-runner-template.test.ts +62 -0
- package/src/utils/testing/log-fetch-stats.test.ts +48 -0
- package/src/utils/testing/log-fetch-stats.ts +55 -0
- package/src/utils/testing/parsers/batch-log-parser.test.ts +660 -1
- package/src/utils/testing/parsers/batch-log-parser.ts +721 -116
- package/src/utils/testing/parsers/batch-log-renderer.test.ts +330 -0
- package/src/utils/testing/parsers/batch-log-renderer.ts +329 -0
- package/src/utils/testing/runner/combined-project-generator.ts +1 -1
- package/src/utils/testing/runner/test-runner.test.ts +332 -2
- package/src/utils/testing/runner/test-runner.ts +231 -9
- package/src/utils/testing/structured-test-results.test.ts +267 -0
- package/src/utils/testing/structured-test-results.ts +199 -0
- package/templates/batch-test-runner.lua +242 -0
- package/tsconfig.tsbuildinfo +1 -1
- package/templates/batch-test-runner.luau +0 -137
- /package/build-scripts/{smoke-test-server.luau → smoke-test-server.lua} +0 -0
- /package/build-scripts/{transform-rojo-merge-place.luau → transform-rojo-merge-place.lua} +0 -0
|
@@ -1,137 +0,0 @@
|
|
|
1
|
-
-- batch-test-runner.luau
|
|
2
|
-
-- Runs all test scripts sequentially in a single execution task.
|
|
3
|
-
-- PACKAGE_SLUGS_JSON placeholder is replaced with a JSON array of slug strings at runtime.
|
|
4
|
-
|
|
5
|
-
local CollectionService = game:GetService("CollectionService")
|
|
6
|
-
local HttpService = game:GetService("HttpService")
|
|
7
|
-
local ReplicatedStorage = game:GetService("ReplicatedStorage")
|
|
8
|
-
local RunService = game:GetService("RunService")
|
|
9
|
-
local ServerScriptService = game:GetService("ServerScriptService")
|
|
10
|
-
|
|
11
|
-
-- stylua: ignore
|
|
12
|
-
local packageSlugs: { string } = HttpService:JSONDecode([==[{{ PACKAGE_SLUGS_JSON }}]==])
|
|
13
|
-
|
|
14
|
-
-- Discover test scripts via tags (set by combine-test-places.luau)
|
|
15
|
-
local scriptSources = {}
|
|
16
|
-
for _, slug in packageSlugs do
|
|
17
|
-
local tagged = CollectionService:GetTagged(`_BatchTest_{slug}`)
|
|
18
|
-
local inst = tagged[1]
|
|
19
|
-
if inst then
|
|
20
|
-
scriptSources[slug] = inst.Source
|
|
21
|
-
else
|
|
22
|
-
warn(`[BatchTest] Failed to find script source for {slug}`)
|
|
23
|
-
end
|
|
24
|
-
end
|
|
25
|
-
|
|
26
|
-
-- Snapshot all package roots (keep references even when unparented)
|
|
27
|
-
local allPackages = {}
|
|
28
|
-
for _, child in ServerScriptService:GetChildren() do
|
|
29
|
-
allPackages[child.Name] = child
|
|
30
|
-
end
|
|
31
|
-
|
|
32
|
-
type Result = {
|
|
33
|
-
success: boolean,
|
|
34
|
-
slug: string,
|
|
35
|
-
durationMs: number,
|
|
36
|
-
error: string?,
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
local results: { Result } = {}
|
|
40
|
-
|
|
41
|
-
for _, slug in packageSlugs do
|
|
42
|
-
local scriptSource = scriptSources[slug]
|
|
43
|
-
if not scriptSource then
|
|
44
|
-
print("===BATCH_TEST_BEGIN " .. slug .. "===")
|
|
45
|
-
warn(`[BatchTest] {slug}: No test script found for {slug}. Is it tagged with _BatchTest_{slug}?`)
|
|
46
|
-
print("===BATCH_TEST_END " .. slug .. " FAIL 0===")
|
|
47
|
-
table.insert(results, { slug = slug, success = false, durationMs = 0, error = "No test script found" })
|
|
48
|
-
continue
|
|
49
|
-
end
|
|
50
|
-
|
|
51
|
-
-- ISOLATE: unparent all, show only this package
|
|
52
|
-
for _, package in allPackages do
|
|
53
|
-
package.Parent = nil
|
|
54
|
-
end
|
|
55
|
-
allPackages[slug].Parent = ServerScriptService
|
|
56
|
-
|
|
57
|
-
-- Snapshot services for cleanup
|
|
58
|
-
local preWorkspace = {}
|
|
59
|
-
for _, child in workspace:GetChildren() do
|
|
60
|
-
preWorkspace[child] = true
|
|
61
|
-
end
|
|
62
|
-
local preRunService = {}
|
|
63
|
-
for _, child in ReplicatedStorage:GetChildren() do
|
|
64
|
-
preRunService[child] = true
|
|
65
|
-
end
|
|
66
|
-
|
|
67
|
-
-- Yield before the BEGIN marker so deferred callbacks triggered by
|
|
68
|
-
-- reparenting flush before the marker enters the log stream. This
|
|
69
|
-
-- prevents Open Cloud log reordering from placing leaked output
|
|
70
|
-
-- inside this package's section.
|
|
71
|
-
RunService.Heartbeat:Wait()
|
|
72
|
-
|
|
73
|
-
print("===BATCH_TEST_BEGIN " .. slug .. "===")
|
|
74
|
-
|
|
75
|
-
-- Measure pcall execution time only. The surrounding cleanup/yield cost
|
|
76
|
-
-- is amortized across all packages and would otherwise dominate fast tests.
|
|
77
|
-
local startClock = os.clock()
|
|
78
|
-
|
|
79
|
-
local testOk, testErr = pcall(function()
|
|
80
|
-
local fn, compileErr = loadstring(scriptSource, slug)
|
|
81
|
-
if not fn then
|
|
82
|
-
error("Compile error: " .. tostring(compileErr))
|
|
83
|
-
end
|
|
84
|
-
fn()
|
|
85
|
-
end)
|
|
86
|
-
|
|
87
|
-
local durationMs = math.floor((os.clock() - startClock) * 1000 + 0.5)
|
|
88
|
-
|
|
89
|
-
-- Yield before the END marker for the same reason: leaked deferred
|
|
90
|
-
-- callbacks may fire during fn() and their output must land before
|
|
91
|
-
-- the marker in the log stream.
|
|
92
|
-
RunService.Heartbeat:Wait()
|
|
93
|
-
|
|
94
|
-
-- CLEANUP: restore service state
|
|
95
|
-
allPackages[slug].Parent = nil
|
|
96
|
-
for _, child in workspace:GetChildren() do
|
|
97
|
-
if not preWorkspace[child] and not child:IsA("Terrain") and not child:IsA("Camera") then
|
|
98
|
-
pcall(child.Destroy, child)
|
|
99
|
-
end
|
|
100
|
-
end
|
|
101
|
-
for _, child in ReplicatedStorage:GetChildren() do
|
|
102
|
-
if not preRunService[child] then
|
|
103
|
-
pcall(child.Destroy, child)
|
|
104
|
-
end
|
|
105
|
-
end
|
|
106
|
-
-- Destroy injected LoaderLinks (non-archivable, created by LoaderLinkCreator)
|
|
107
|
-
for _, desc in allPackages[slug]:GetDescendants() do
|
|
108
|
-
if not desc.Archivable and desc:IsA("ModuleScript") and desc.Name == "loader" then
|
|
109
|
-
pcall(desc.Destroy, desc)
|
|
110
|
-
end
|
|
111
|
-
end
|
|
112
|
-
|
|
113
|
-
-- Flush lingering deferred callbacks. Heavy packages (Binder, ServiceBag)
|
|
114
|
-
-- schedule deferred callbacks via CollectionService that survive cleanup.
|
|
115
|
-
-- Yielding across multiple heartbeat frames is more reliable than a fixed
|
|
116
|
-
-- time wait, since each frame drains its deferred queue.
|
|
117
|
-
for _ = 1, 3 do
|
|
118
|
-
RunService.Heartbeat:Wait()
|
|
119
|
-
end
|
|
120
|
-
|
|
121
|
-
if testOk then
|
|
122
|
-
print("===BATCH_TEST_END " .. slug .. " PASS " .. tostring(durationMs) .. "===")
|
|
123
|
-
table.insert(results, { slug = slug, success = true, durationMs = durationMs })
|
|
124
|
-
else
|
|
125
|
-
warn("[BatchTest] " .. slug .. ": " .. tostring(testErr))
|
|
126
|
-
print("===BATCH_TEST_END " .. slug .. " FAIL " .. tostring(durationMs) .. "===")
|
|
127
|
-
table.insert(results, { slug = slug, success = false, durationMs = durationMs, error = tostring(testErr) })
|
|
128
|
-
end
|
|
129
|
-
end
|
|
130
|
-
|
|
131
|
-
-- Restore all packages
|
|
132
|
-
for _, package in allPackages do
|
|
133
|
-
package.Parent = ServerScriptService
|
|
134
|
-
end
|
|
135
|
-
|
|
136
|
-
print("===BATCH_TEST_SUMMARY===")
|
|
137
|
-
print(HttpService:JSONEncode(results))
|
|
File without changes
|
|
File without changes
|