lawspec 0.31.0 → 0.31.3
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 +116 -1
- package/README.md +86 -4
- package/api.mjs +14 -9
- package/authoring.mjs +899 -0
- package/beam-coverage.mjs +190 -65
- package/beam-doctor.mjs +343 -124
- package/bin/lawspec.mjs +1955 -657
- package/build.json +135 -129
- package/component-packages.mjs +662 -176
- package/component.d.ts +82 -20
- package/component.mjs +317 -94
- package/core.wasm +2 -2
- package/core_jsffi.js +5 -5
- package/doctor.mjs +558 -299
- package/examples-command.mjs +44 -23
- package/failure-database.mjs +60 -17
- package/files.mjs +122 -62
- package/index.d.ts +585 -312
- package/input-files.mjs +90 -25
- package/launcher.mjs +72 -31
- package/learn/adapters.mjs +226 -0
- package/learn/app.mjs +1279 -0
- package/learn/assert.mjs +33 -0
- package/learn/assets.mjs +15 -0
- package/learn/browser-runtime.mjs +58 -0
- package/learn/bundle.mjs +118 -0
- package/learn/compile-worker.mjs +106 -0
- package/learn/compiler.mjs +230 -0
- package/learn/coverage.json +8259 -0
- package/learn/curriculum.json +2955 -0
- package/learn/fantomas-worker.mjs +25 -0
- package/learn/format-worker.mjs +148 -0
- package/learn/fsharp.mjs +83 -0
- package/learn/harness-host.mjs +22 -0
- package/learn/index.html +326 -0
- package/learn/lawspec-core.mjs +223 -0
- package/learn/lawspec-language.mjs +69 -0
- package/learn/node-test.mjs +11 -0
- package/learn/presentation.mjs +73 -0
- package/learn/runner.mjs +72 -0
- package/learn/sandbox-frame.html +34 -0
- package/learn/sandbox.mjs +91 -0
- package/learn/store.mjs +141 -0
- package/learn/story.mjs +42 -0
- package/learn/style-options.json +16 -0
- package/learn/style.css +1023 -0
- package/learn/theme.js +77 -0
- package/learn/typescript.mjs +53 -0
- package/learn/vendor/@fontsource-atkinson-hyperlegible-LICENSE.txt +93 -0
- package/learn/vendor/@fontsource-atkinson-hyperlegible-mono-LICENSE.txt +93 -0
- package/learn/vendor/@fontsource-overpass-LICENSE.txt +93 -0
- package/learn/vendor/assemblies.json +1 -0
- package/learn/vendor/editor-worker.js +30 -0
- package/learn/vendor/editor.css +1 -0
- package/learn/vendor/editor.mjs +931 -0
- package/learn/vendor/esbuild-wasm-LICENSE.txt +21 -0
- package/learn/vendor/esbuild.mjs +2683 -0
- package/learn/vendor/esbuild.wasm +0 -0
- package/learn/vendor/fable-library/Array.js +1347 -0
- package/learn/vendor/fable-library/Async.js +134 -0
- package/learn/vendor/fable-library/AsyncBuilder.js +183 -0
- package/learn/vendor/fable-library/BigInt.js +306 -0
- package/learn/vendor/fable-library/BitConverter.js +138 -0
- package/learn/vendor/fable-library/Boolean.js +22 -0
- package/learn/vendor/fable-library/CHANGELOG.md +242 -0
- package/learn/vendor/fable-library/Char.js +202 -0
- package/learn/vendor/fable-library/Choice.js +184 -0
- package/learn/vendor/fable-library/CollectionUtil.js +182 -0
- package/learn/vendor/fable-library/ConditionalWeakTable.js +21 -0
- package/learn/vendor/fable-library/Date.js +841 -0
- package/learn/vendor/fable-library/DateOffset.js +261 -0
- package/learn/vendor/fable-library/DateOnly.js +124 -0
- package/learn/vendor/fable-library/Decimal.js +238 -0
- package/learn/vendor/fable-library/Double.js +47 -0
- package/learn/vendor/fable-library/Encoding.js +185 -0
- package/learn/vendor/fable-library/Event.js +93 -0
- package/learn/vendor/fable-library/FSharp.Collections.js +45 -0
- package/learn/vendor/fable-library/FSharp.Core.CompilerServices.js +27 -0
- package/learn/vendor/fable-library/FSharp.Core.js +156 -0
- package/learn/vendor/fable-library/Global.js +29 -0
- package/learn/vendor/fable-library/Guid.js +161 -0
- package/learn/vendor/fable-library/Int32.js +135 -0
- package/learn/vendor/fable-library/List.js +1323 -0
- package/learn/vendor/fable-library/Long.js +47 -0
- package/learn/vendor/fable-library/MailboxProcessor.js +94 -0
- package/learn/vendor/fable-library/Map.js +1396 -0
- package/learn/vendor/fable-library/MapUtil.js +130 -0
- package/learn/vendor/fable-library/MutableMap.js +339 -0
- package/learn/vendor/fable-library/MutableSet.js +233 -0
- package/learn/vendor/fable-library/Native.js +14 -0
- package/learn/vendor/fable-library/Numeric.js +75 -0
- package/learn/vendor/fable-library/Observable.js +113 -0
- package/learn/vendor/fable-library/Option.js +104 -0
- package/learn/vendor/fable-library/README.md +3 -0
- package/learn/vendor/fable-library/Random.js +172 -0
- package/learn/vendor/fable-library/Range.js +45 -0
- package/learn/vendor/fable-library/Reflection.js +479 -0
- package/learn/vendor/fable-library/RegExp.js +141 -0
- package/learn/vendor/fable-library/Result.js +165 -0
- package/learn/vendor/fable-library/Seq.js +1417 -0
- package/learn/vendor/fable-library/Seq2.js +111 -0
- package/learn/vendor/fable-library/Set.js +1816 -0
- package/learn/vendor/fable-library/String.js +674 -0
- package/learn/vendor/fable-library/System.Collections.Generic.js +333 -0
- package/learn/vendor/fable-library/System.Text.js +200 -0
- package/learn/vendor/fable-library/System.js +289 -0
- package/learn/vendor/fable-library/TimeOnly.js +122 -0
- package/learn/vendor/fable-library/TimeSpan.js +180 -0
- package/learn/vendor/fable-library/Timer.js +67 -0
- package/learn/vendor/fable-library/Types.js +198 -0
- package/learn/vendor/fable-library/Unicode.13.0.0.js +4 -0
- package/learn/vendor/fable-library/Uri.js +165 -0
- package/learn/vendor/fable-library/Util.js +796 -0
- package/learn/vendor/fable-library/big.d.ts +338 -0
- package/learn/vendor/fable-library/lib/big.js +825 -0
- package/learn/vendor/fable-library/package.json +24 -0
- package/learn/vendor/fable-library/quotation.js +618 -0
- package/learn/vendor/fable.js +430 -0
- package/learn/vendor/fantomas/FSharp.Core.uawo19tl4c.wasm +0 -0
- package/learn/vendor/fantomas/Fantomas.Core.stnanlnpyw.wasm +0 -0
- package/learn/vendor/fantomas/Fantomas.FCS.lqohfu5o9y.wasm +0 -0
- package/learn/vendor/fantomas/LawSpec.Learn.Formatter.poiijdbsl9.wasm +0 -0
- package/learn/vendor/fantomas/Microsoft.CSharp.mp8lhr6rez.wasm +0 -0
- package/learn/vendor/fantomas/Microsoft.VisualBasic.0e5fchkecn.wasm +0 -0
- package/learn/vendor/fantomas/Microsoft.VisualBasic.Core.17wn27qal2.wasm +0 -0
- package/learn/vendor/fantomas/Microsoft.Win32.Primitives.9d566sle9e.wasm +0 -0
- package/learn/vendor/fantomas/Microsoft.Win32.Registry.52dy96yk8i.wasm +0 -0
- package/learn/vendor/fantomas/System.AppContext.jwujeh069z.wasm +0 -0
- package/learn/vendor/fantomas/System.Buffers.y0isk1x97h.wasm +0 -0
- package/learn/vendor/fantomas/System.Collections.Concurrent.x5koi7bzem.wasm +0 -0
- package/learn/vendor/fantomas/System.Collections.Immutable.diwg7advch.wasm +0 -0
- package/learn/vendor/fantomas/System.Collections.NonGeneric.4089xs440e.wasm +0 -0
- package/learn/vendor/fantomas/System.Collections.Specialized.hj81u7zblb.wasm +0 -0
- package/learn/vendor/fantomas/System.Collections.nvrdeoknr1.wasm +0 -0
- package/learn/vendor/fantomas/System.ComponentModel.Annotations.yatcnfjeuk.wasm +0 -0
- package/learn/vendor/fantomas/System.ComponentModel.DataAnnotations.led9l5awu3.wasm +0 -0
- package/learn/vendor/fantomas/System.ComponentModel.EventBasedAsync.hpvp6cf4de.wasm +0 -0
- package/learn/vendor/fantomas/System.ComponentModel.Primitives.v7cajwpaqo.wasm +0 -0
- package/learn/vendor/fantomas/System.ComponentModel.TypeConverter.xk1hnyt762.wasm +0 -0
- package/learn/vendor/fantomas/System.ComponentModel.rrnda1lucx.wasm +0 -0
- package/learn/vendor/fantomas/System.Configuration.bn9vghjcq8.wasm +0 -0
- package/learn/vendor/fantomas/System.Console.09ajpiafhz.wasm +0 -0
- package/learn/vendor/fantomas/System.Core.wc649o5mw9.wasm +0 -0
- package/learn/vendor/fantomas/System.Data.Common.s4cowzd9a9.wasm +0 -0
- package/learn/vendor/fantomas/System.Data.DataSetExtensions.5fm360ikxl.wasm +0 -0
- package/learn/vendor/fantomas/System.Data.fsu4j4t4jw.wasm +0 -0
- package/learn/vendor/fantomas/System.Diagnostics.Contracts.p74re5oxzn.wasm +0 -0
- package/learn/vendor/fantomas/System.Diagnostics.Debug.622sixg49n.wasm +0 -0
- package/learn/vendor/fantomas/System.Diagnostics.DiagnosticSource.2j35bc2g2b.wasm +0 -0
- package/learn/vendor/fantomas/System.Diagnostics.FileVersionInfo.7n0wdvltaa.wasm +0 -0
- package/learn/vendor/fantomas/System.Diagnostics.Process.8iffh49mew.wasm +0 -0
- package/learn/vendor/fantomas/System.Diagnostics.StackTrace.1yz88vico8.wasm +0 -0
- package/learn/vendor/fantomas/System.Diagnostics.TextWriterTraceListener.ua8iuh2vhj.wasm +0 -0
- package/learn/vendor/fantomas/System.Diagnostics.Tools.roy5445ugj.wasm +0 -0
- package/learn/vendor/fantomas/System.Diagnostics.TraceSource.6qx1ldzz7g.wasm +0 -0
- package/learn/vendor/fantomas/System.Diagnostics.Tracing.b4799zpaas.wasm +0 -0
- package/learn/vendor/fantomas/System.Drawing.8gcjjqj0pu.wasm +0 -0
- package/learn/vendor/fantomas/System.Drawing.Primitives.y2uveru2yk.wasm +0 -0
- package/learn/vendor/fantomas/System.Dynamic.Runtime.023zrvzh9x.wasm +0 -0
- package/learn/vendor/fantomas/System.Formats.Asn1.znpklkbgqv.wasm +0 -0
- package/learn/vendor/fantomas/System.Formats.Tar.5yybjepfi2.wasm +0 -0
- package/learn/vendor/fantomas/System.Globalization.Calendars.10g6hyjy3k.wasm +0 -0
- package/learn/vendor/fantomas/System.Globalization.Extensions.hrinfrismg.wasm +0 -0
- package/learn/vendor/fantomas/System.Globalization.uvs4rah8fk.wasm +0 -0
- package/learn/vendor/fantomas/System.IO.4j645gw40d.wasm +0 -0
- package/learn/vendor/fantomas/System.IO.Compression.2z7vdt6tfb.wasm +0 -0
- package/learn/vendor/fantomas/System.IO.Compression.Brotli.fv80xs79j3.wasm +0 -0
- package/learn/vendor/fantomas/System.IO.Compression.FileSystem.88jdddz3sw.wasm +0 -0
- package/learn/vendor/fantomas/System.IO.Compression.ZipFile.jkn9avr4vo.wasm +0 -0
- package/learn/vendor/fantomas/System.IO.FileSystem.AccessControl.yme0uhbu37.wasm +0 -0
- package/learn/vendor/fantomas/System.IO.FileSystem.DriveInfo.qas7wf73rs.wasm +0 -0
- package/learn/vendor/fantomas/System.IO.FileSystem.Primitives.d1jmhkzu0e.wasm +0 -0
- package/learn/vendor/fantomas/System.IO.FileSystem.Watcher.z570derp0d.wasm +0 -0
- package/learn/vendor/fantomas/System.IO.FileSystem.o6jtz51fup.wasm +0 -0
- package/learn/vendor/fantomas/System.IO.IsolatedStorage.hqyeyb5ipe.wasm +0 -0
- package/learn/vendor/fantomas/System.IO.MemoryMappedFiles.zhamjnusxd.wasm +0 -0
- package/learn/vendor/fantomas/System.IO.Pipelines.wrmw5vws31.wasm +0 -0
- package/learn/vendor/fantomas/System.IO.Pipes.AccessControl.qcancj8gj2.wasm +0 -0
- package/learn/vendor/fantomas/System.IO.Pipes.zhcyguvwkr.wasm +0 -0
- package/learn/vendor/fantomas/System.IO.UnmanagedMemoryStream.o8cpjnlard.wasm +0 -0
- package/learn/vendor/fantomas/System.Linq.AsyncEnumerable.hyc0b7okjw.wasm +0 -0
- package/learn/vendor/fantomas/System.Linq.Expressions.ldibvm0efj.wasm +0 -0
- package/learn/vendor/fantomas/System.Linq.Parallel.2buevezvch.wasm +0 -0
- package/learn/vendor/fantomas/System.Linq.Queryable.cvq43g1awj.wasm +0 -0
- package/learn/vendor/fantomas/System.Linq.lz6mvi0hm2.wasm +0 -0
- package/learn/vendor/fantomas/System.Memory.3jekerw0ga.wasm +0 -0
- package/learn/vendor/fantomas/System.Net.Http.Json.8k237kkwec.wasm +0 -0
- package/learn/vendor/fantomas/System.Net.Http.cityx2bvcl.wasm +0 -0
- package/learn/vendor/fantomas/System.Net.HttpListener.s1jreclykx.wasm +0 -0
- package/learn/vendor/fantomas/System.Net.Mail.cmlj4c0gto.wasm +0 -0
- package/learn/vendor/fantomas/System.Net.NameResolution.q3gf18q13l.wasm +0 -0
- package/learn/vendor/fantomas/System.Net.NetworkInformation.xaz5tjw7d0.wasm +0 -0
- package/learn/vendor/fantomas/System.Net.Ping.a40atim1h0.wasm +0 -0
- package/learn/vendor/fantomas/System.Net.Primitives.i88i20r8sr.wasm +0 -0
- package/learn/vendor/fantomas/System.Net.Quic.hx06eo5xkj.wasm +0 -0
- package/learn/vendor/fantomas/System.Net.Requests.hkjxlfe5f5.wasm +0 -0
- package/learn/vendor/fantomas/System.Net.Security.ch34yya69o.wasm +0 -0
- package/learn/vendor/fantomas/System.Net.ServerSentEvents.0u7o0jk3p1.wasm +0 -0
- package/learn/vendor/fantomas/System.Net.ServicePoint.xbhxnytx4l.wasm +0 -0
- package/learn/vendor/fantomas/System.Net.Sockets.hzgzlvkc9l.wasm +0 -0
- package/learn/vendor/fantomas/System.Net.WebClient.84i8nwzbgu.wasm +0 -0
- package/learn/vendor/fantomas/System.Net.WebHeaderCollection.326nl7s9g3.wasm +0 -0
- package/learn/vendor/fantomas/System.Net.WebProxy.oq3mgkkqef.wasm +0 -0
- package/learn/vendor/fantomas/System.Net.WebSockets.2cx1v74vg8.wasm +0 -0
- package/learn/vendor/fantomas/System.Net.WebSockets.Client.rafzkktw8j.wasm +0 -0
- package/learn/vendor/fantomas/System.Net.w1hpj3bo6r.wasm +0 -0
- package/learn/vendor/fantomas/System.Numerics.Vectors.oyv7biw9ux.wasm +0 -0
- package/learn/vendor/fantomas/System.Numerics.lyu36wqn19.wasm +0 -0
- package/learn/vendor/fantomas/System.ObjectModel.kxu80demuu.wasm +0 -0
- package/learn/vendor/fantomas/System.Private.CoreLib.1vy46s12u6.wasm +0 -0
- package/learn/vendor/fantomas/System.Private.DataContractSerialization.ao8k9iu77a.wasm +0 -0
- package/learn/vendor/fantomas/System.Private.Uri.itn0n2zjd0.wasm +0 -0
- package/learn/vendor/fantomas/System.Private.Xml.19nzpxrx8w.wasm +0 -0
- package/learn/vendor/fantomas/System.Private.Xml.Linq.tw5eq1hjvo.wasm +0 -0
- package/learn/vendor/fantomas/System.Reflection.DispatchProxy.7lajnj8s8c.wasm +0 -0
- package/learn/vendor/fantomas/System.Reflection.Emit.7liz9zln06.wasm +0 -0
- package/learn/vendor/fantomas/System.Reflection.Emit.ILGeneration.1ut3qgacw8.wasm +0 -0
- package/learn/vendor/fantomas/System.Reflection.Emit.Lightweight.d0gvllb1jj.wasm +0 -0
- package/learn/vendor/fantomas/System.Reflection.Extensions.zr5bhwfczd.wasm +0 -0
- package/learn/vendor/fantomas/System.Reflection.Metadata.ff6np6mz2j.wasm +0 -0
- package/learn/vendor/fantomas/System.Reflection.Primitives.igpmvwv78c.wasm +0 -0
- package/learn/vendor/fantomas/System.Reflection.TypeExtensions.qouojzlnp9.wasm +0 -0
- package/learn/vendor/fantomas/System.Reflection.mk3jyxvh13.wasm +0 -0
- package/learn/vendor/fantomas/System.Resources.Reader.41ppfyz2vc.wasm +0 -0
- package/learn/vendor/fantomas/System.Resources.ResourceManager.sfwvfmw1ea.wasm +0 -0
- package/learn/vendor/fantomas/System.Resources.Writer.3uvs9tp38z.wasm +0 -0
- package/learn/vendor/fantomas/System.Runtime.CompilerServices.Unsafe.puz1xm53oc.wasm +0 -0
- package/learn/vendor/fantomas/System.Runtime.CompilerServices.VisualC.9qdau315py.wasm +0 -0
- package/learn/vendor/fantomas/System.Runtime.Extensions.i7gntui96b.wasm +0 -0
- package/learn/vendor/fantomas/System.Runtime.Handles.00oxj4o6ov.wasm +0 -0
- package/learn/vendor/fantomas/System.Runtime.InteropServices.JavaScript.9kq1vofond.wasm +0 -0
- package/learn/vendor/fantomas/System.Runtime.InteropServices.RuntimeInformation.my7qeqbhfh.wasm +0 -0
- package/learn/vendor/fantomas/System.Runtime.InteropServices.vqp80tnwc7.wasm +0 -0
- package/learn/vendor/fantomas/System.Runtime.Intrinsics.u0samjybfo.wasm +0 -0
- package/learn/vendor/fantomas/System.Runtime.Loader.n6zxw1b98a.wasm +0 -0
- package/learn/vendor/fantomas/System.Runtime.Numerics.o40sjhz59x.wasm +0 -0
- package/learn/vendor/fantomas/System.Runtime.Serialization.Formatters.1esvva4te3.wasm +0 -0
- package/learn/vendor/fantomas/System.Runtime.Serialization.Json.4n7u09advh.wasm +0 -0
- package/learn/vendor/fantomas/System.Runtime.Serialization.Primitives.xs2bo91wvk.wasm +0 -0
- package/learn/vendor/fantomas/System.Runtime.Serialization.Xml.ny21jmziti.wasm +0 -0
- package/learn/vendor/fantomas/System.Runtime.Serialization.qcxaur5wqs.wasm +0 -0
- package/learn/vendor/fantomas/System.Runtime.odq454d6j9.wasm +0 -0
- package/learn/vendor/fantomas/System.Security.AccessControl.8yfnzmqzaq.wasm +0 -0
- package/learn/vendor/fantomas/System.Security.Claims.8ogy0860de.wasm +0 -0
- package/learn/vendor/fantomas/System.Security.Cryptography.Algorithms.8zijp1svfw.wasm +0 -0
- package/learn/vendor/fantomas/System.Security.Cryptography.Cng.yxagtt77no.wasm +0 -0
- package/learn/vendor/fantomas/System.Security.Cryptography.Csp.uhfbvvau84.wasm +0 -0
- package/learn/vendor/fantomas/System.Security.Cryptography.Encoding.2ywrusvy8q.wasm +0 -0
- package/learn/vendor/fantomas/System.Security.Cryptography.OpenSsl.oa268u7i92.wasm +0 -0
- package/learn/vendor/fantomas/System.Security.Cryptography.Primitives.5uhvqe8puk.wasm +0 -0
- package/learn/vendor/fantomas/System.Security.Cryptography.X509Certificates.6i7pxilopt.wasm +0 -0
- package/learn/vendor/fantomas/System.Security.Cryptography.d0quqk1iyr.wasm +0 -0
- package/learn/vendor/fantomas/System.Security.Principal.Windows.gpqua4rz29.wasm +0 -0
- package/learn/vendor/fantomas/System.Security.Principal.i20kfklf3g.wasm +0 -0
- package/learn/vendor/fantomas/System.Security.SecureString.x2y8tzci3c.wasm +0 -0
- package/learn/vendor/fantomas/System.Security.e83vvh6sl2.wasm +0 -0
- package/learn/vendor/fantomas/System.ServiceModel.Web.poglliv2no.wasm +0 -0
- package/learn/vendor/fantomas/System.ServiceProcess.yro5uj2opo.wasm +0 -0
- package/learn/vendor/fantomas/System.Text.Encoding.CodePages.2wchx40i7z.wasm +0 -0
- package/learn/vendor/fantomas/System.Text.Encoding.Extensions.8utaw61kn5.wasm +0 -0
- package/learn/vendor/fantomas/System.Text.Encoding.cxdyfepnpj.wasm +0 -0
- package/learn/vendor/fantomas/System.Text.Encodings.Web.37ehbi7cye.wasm +0 -0
- package/learn/vendor/fantomas/System.Text.Json.ixiaa8hd3h.wasm +0 -0
- package/learn/vendor/fantomas/System.Text.RegularExpressions.2fhfmkk6vf.wasm +0 -0
- package/learn/vendor/fantomas/System.Threading.6pry74a050.wasm +0 -0
- package/learn/vendor/fantomas/System.Threading.AccessControl.76zfdfy8go.wasm +0 -0
- package/learn/vendor/fantomas/System.Threading.Channels.gpxnr01lmp.wasm +0 -0
- package/learn/vendor/fantomas/System.Threading.Overlapped.aqpl8tzdyc.wasm +0 -0
- package/learn/vendor/fantomas/System.Threading.Tasks.Dataflow.ytwttt7fzh.wasm +0 -0
- package/learn/vendor/fantomas/System.Threading.Tasks.Extensions.0deavcb00v.wasm +0 -0
- package/learn/vendor/fantomas/System.Threading.Tasks.Parallel.tjwtxugso0.wasm +0 -0
- package/learn/vendor/fantomas/System.Threading.Tasks.fu4qd5h3qy.wasm +0 -0
- package/learn/vendor/fantomas/System.Threading.Thread.klaua2by9m.wasm +0 -0
- package/learn/vendor/fantomas/System.Threading.ThreadPool.mkzm212njz.wasm +0 -0
- package/learn/vendor/fantomas/System.Threading.Timer.yp49llu5h2.wasm +0 -0
- package/learn/vendor/fantomas/System.Transactions.Local.vz6cgeh4w7.wasm +0 -0
- package/learn/vendor/fantomas/System.Transactions.ipwm3rsy66.wasm +0 -0
- package/learn/vendor/fantomas/System.ValueTuple.7ol6ljuhx8.wasm +0 -0
- package/learn/vendor/fantomas/System.Web.HttpUtility.itlvncjd96.wasm +0 -0
- package/learn/vendor/fantomas/System.Web.np8uzzakvl.wasm +0 -0
- package/learn/vendor/fantomas/System.Windows.18nzio44t3.wasm +0 -0
- package/learn/vendor/fantomas/System.Xml.45jprtg1pa.wasm +0 -0
- package/learn/vendor/fantomas/System.Xml.Linq.v9v8udncm1.wasm +0 -0
- package/learn/vendor/fantomas/System.Xml.ReaderWriter.a9mr08uzci.wasm +0 -0
- package/learn/vendor/fantomas/System.Xml.Serialization.03juoguwgc.wasm +0 -0
- package/learn/vendor/fantomas/System.Xml.XDocument.c9dhjnzqjb.wasm +0 -0
- package/learn/vendor/fantomas/System.Xml.XPath.XDocument.138b12i1pm.wasm +0 -0
- package/learn/vendor/fantomas/System.Xml.XPath.pvxm9341ce.wasm +0 -0
- package/learn/vendor/fantomas/System.Xml.XmlDocument.450wsyxvl0.wasm +0 -0
- package/learn/vendor/fantomas/System.Xml.XmlSerializer.y3t2n0tce7.wasm +0 -0
- package/learn/vendor/fantomas/System.gjriafnqmz.wasm +0 -0
- package/learn/vendor/fantomas/WindowsBase.8zsce9qxfb.wasm +0 -0
- package/learn/vendor/fantomas/cs/FSharp.Core.resources.9ehmavdel7.wasm +0 -0
- package/learn/vendor/fantomas/de/FSharp.Core.resources.2ofmxloa01.wasm +0 -0
- package/learn/vendor/fantomas/dotnet.js +1233 -0
- package/learn/vendor/fantomas/dotnet.native.b6l13xorvf.js +16 -0
- package/learn/vendor/fantomas/dotnet.native.rw4kynp763.wasm +0 -0
- package/learn/vendor/fantomas/dotnet.runtime.v06hirbjsv.js +4 -0
- package/learn/vendor/fantomas/es/FSharp.Core.resources.hkr5ggb4tr.wasm +0 -0
- package/learn/vendor/fantomas/fr/FSharp.Core.resources.43soen28ow.wasm +0 -0
- package/learn/vendor/fantomas/icudt_CJK.tjcz0u77k5.dat +0 -0
- package/learn/vendor/fantomas/icudt_EFIGS.tptq2av103.dat +0 -0
- package/learn/vendor/fantomas/icudt_no_CJK.lfu7j35m59.dat +0 -0
- package/learn/vendor/fantomas/it/FSharp.Core.resources.m60n5ls7oq.wasm +0 -0
- package/learn/vendor/fantomas/ja/FSharp.Core.resources.o6oof69v14.wasm +0 -0
- package/learn/vendor/fantomas/ko/FSharp.Core.resources.q6l4snlu9o.wasm +0 -0
- package/learn/vendor/fantomas/mscorlib.8ptuc08eli.wasm +0 -0
- package/learn/vendor/fantomas/netstandard.eymp85mooh.wasm +0 -0
- package/learn/vendor/fantomas/pl/FSharp.Core.resources.8bni0w6j8b.wasm +0 -0
- package/learn/vendor/fantomas/pt-BR/FSharp.Core.resources.k849vqm41u.wasm +0 -0
- package/learn/vendor/fantomas/ru/FSharp.Core.resources.jz9rhhtsla.wasm +0 -0
- package/learn/vendor/fantomas/tr/FSharp.Core.resources.wn6vbvjm1u.wasm +0 -0
- package/learn/vendor/fantomas/zh-Hans/FSharp.Core.resources.z7zzbso094.wasm +0 -0
- package/learn/vendor/fantomas/zh-Hant/FSharp.Core.resources.iammfsi7ls.wasm +0 -0
- package/learn/vendor/fast-check-LICENSE.txt +21 -0
- package/learn/vendor/fast-check.mjs +37 -0
- package/learn/vendor/fonts/atkinson-hyperlegible-latin-400-normal.woff2 +0 -0
- package/learn/vendor/fonts/atkinson-hyperlegible-latin-700-normal.woff2 +0 -0
- package/learn/vendor/fonts/atkinson-hyperlegible-mono-latin-400-normal.woff2 +0 -0
- package/learn/vendor/fonts/overpass-latin-600-normal.woff2 +0 -0
- package/learn/vendor/fonts/overpass-latin-700-normal.woff2 +0 -0
- package/learn/vendor/formatter-licenses/DotNet-LICENSE.txt +23 -0
- package/learn/vendor/formatter-licenses/DotNet-THIRD-PARTY-NOTICES.txt +1418 -0
- package/learn/vendor/formatter-licenses/FSharp-LICENSE.txt +23 -0
- package/learn/vendor/formatter-licenses/Fantomas-LICENSE.txt +202 -0
- package/learn/vendor/formatter-licenses/README.md +12 -0
- package/learn/vendor/manifest.json +1354 -0
- package/learn/vendor/metadata/Browser.Blob.dll +0 -0
- package/learn/vendor/metadata/Browser.Dom.dll +0 -0
- package/learn/vendor/metadata/Browser.Event.dll +0 -0
- package/learn/vendor/metadata/Browser.Gamepad.dll +0 -0
- package/learn/vendor/metadata/Browser.WebGL.dll +0 -0
- package/learn/vendor/metadata/Browser.WebStorage.dll +0 -0
- package/learn/vendor/metadata/FSharp.Core.dll +0 -0
- package/learn/vendor/metadata/Fable.Core.dll +0 -0
- package/learn/vendor/metadata/Fable.Repl.Lib.dll +0 -0
- package/learn/vendor/metadata/System.Collections.Concurrent.dll +0 -0
- package/learn/vendor/metadata/System.Collections.dll +0 -0
- package/learn/vendor/metadata/System.ComponentModel.Primitives.dll +0 -0
- package/learn/vendor/metadata/System.ComponentModel.TypeConverter.dll +0 -0
- package/learn/vendor/metadata/System.ComponentModel.dll +0 -0
- package/learn/vendor/metadata/System.Console.dll +0 -0
- package/learn/vendor/metadata/System.Core.dll +0 -0
- package/learn/vendor/metadata/System.Diagnostics.Debug.dll +0 -0
- package/learn/vendor/metadata/System.Diagnostics.Tools.dll +0 -0
- package/learn/vendor/metadata/System.Diagnostics.Tracing.dll +0 -0
- package/learn/vendor/metadata/System.Globalization.dll +0 -0
- package/learn/vendor/metadata/System.IO.dll +0 -0
- package/learn/vendor/metadata/System.Net.Requests.dll +0 -0
- package/learn/vendor/metadata/System.Net.WebClient.dll +0 -0
- package/learn/vendor/metadata/System.Numerics.dll +0 -0
- package/learn/vendor/metadata/System.Reflection.Extensions.dll +0 -0
- package/learn/vendor/metadata/System.Reflection.Metadata.dll +0 -0
- package/learn/vendor/metadata/System.Reflection.Primitives.dll +0 -0
- package/learn/vendor/metadata/System.Reflection.TypeExtensions.dll +0 -0
- package/learn/vendor/metadata/System.Reflection.dll +0 -0
- package/learn/vendor/metadata/System.Runtime.Extensions.dll +0 -0
- package/learn/vendor/metadata/System.Runtime.InteropServices.dll +0 -0
- package/learn/vendor/metadata/System.Runtime.Numerics.dll +0 -0
- package/learn/vendor/metadata/System.Runtime.dll +0 -0
- package/learn/vendor/metadata/System.Text.Encoding.Extensions.dll +0 -0
- package/learn/vendor/metadata/System.Text.Encoding.dll +0 -0
- package/learn/vendor/metadata/System.Text.RegularExpressions.dll +0 -0
- package/learn/vendor/metadata/System.Threading.Tasks.dll +0 -0
- package/learn/vendor/metadata/System.Threading.Thread.dll +0 -0
- package/learn/vendor/metadata/System.Threading.dll +0 -0
- package/learn/vendor/metadata/System.ValueTuple.dll +0 -0
- package/learn/vendor/metadata/System.dll +0 -0
- package/learn/vendor/metadata/mscorlib.dll +0 -0
- package/learn/vendor/metadata/netstandard.dll +0 -0
- package/learn/vendor/monaco-editor-LICENSE.txt +21 -0
- package/learn/vendor/prettier/babel.mjs +16 -0
- package/learn/vendor/prettier/brace-style.mjs +376 -0
- package/learn/vendor/prettier/estree.mjs +44 -0
- package/learn/vendor/prettier/standalone.mjs +29 -0
- package/learn/vendor/prettier/typescript.mjs +22 -0
- package/learn/vendor/prettier-LICENSE.txt +7 -0
- package/learn/vendor/prettier-plugin-brace-style-LICENSE.txt +21 -0
- package/learn/vendor/typescript-LICENSE.txt +55 -0
- package/learn/vendor/typescript-libs.json +1 -0
- package/learn/vendor/typescript.mjs +451 -0
- package/learn/vendor/zod-LICENSE.txt +21 -0
- package/learn/web-format.mjs +8 -0
- package/learn.mjs +126 -0
- package/lsp.mjs +444 -133
- package/mcp.mjs +250 -0
- package/native-evidence.mjs +668 -182
- package/native-examples.mjs +56 -19
- package/native-host.mjs +136 -42
- package/native-parsers/clojure.LICENSE +121 -0
- package/native-parsers/clojure.wasm +0 -0
- package/native-parsers/csharp.LICENSE +21 -0
- package/native-parsers/csharp.wasm +0 -0
- package/native-parsers/elixir.LICENSE +176 -0
- package/native-parsers/elixir.wasm +0 -0
- package/native-parsers/erlang.LICENSE +201 -0
- package/native-parsers/erlang.wasm +0 -0
- package/native-parsers/fsharp.LICENSE +21 -0
- package/native-parsers/fsharp.wasm +0 -0
- package/native-parsers/gleam.LICENSE +202 -0
- package/native-parsers/gleam.wasm +0 -0
- package/native-parsers/go.LICENSE +21 -0
- package/native-parsers/go.wasm +0 -0
- package/native-parsers/groovy.LICENSE +21 -0
- package/native-parsers/groovy.wasm +0 -0
- package/native-parsers/haskell.LICENSE +21 -0
- package/native-parsers/haskell.wasm +0 -0
- package/native-parsers/java.LICENSE +21 -0
- package/native-parsers/java.wasm +0 -0
- package/native-parsers/javascript.LICENSE +21 -0
- package/native-parsers/javascript.wasm +0 -0
- package/native-parsers/kotlin.LICENSE +9 -0
- package/native-parsers/kotlin.wasm +0 -0
- package/native-parsers/lock.json +114 -0
- package/native-parsers/prolog.LICENSE +21 -0
- package/native-parsers/prolog.wasm +0 -0
- package/native-parsers/python.LICENSE +21 -0
- package/native-parsers/python.wasm +0 -0
- package/native-parsers/rust.LICENSE +21 -0
- package/native-parsers/rust.wasm +0 -0
- package/native-parsers/scala.LICENSE +21 -0
- package/native-parsers/scala.wasm +0 -0
- package/native-parsers/swift.LICENSE +21 -0
- package/native-parsers/swift.wasm +0 -0
- package/native-parsers/typescript.LICENSE +21 -0
- package/native-parsers/typescript.wasm +0 -0
- package/node-events-reporter.mjs +41 -17
- package/package.json +5 -3
- package/project.mjs +338 -0
- package/proof.d.ts +93 -19
- package/proof.mjs +1538 -447
- package/read-only-hpack.mjs +6 -5
- package/scala-build-state.mjs +131 -41
- package/scala-coverage.mjs +57 -34
- package/scalars.mjs +23 -8
- package/templates.mjs +566 -617
- package/test-command.mjs +1671 -521
package/doctor.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// Generated from templates/npm/doctor.mjs by lawspec-dev generate. Do not edit.
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import {execFile} from 'node:child_process';
|
|
3
|
+
import {promisify} from 'node:util';
|
|
4
4
|
import {
|
|
5
5
|
readFile,
|
|
6
6
|
readdir,
|
|
@@ -8,30 +8,34 @@ import {
|
|
|
8
8
|
mkdtemp,
|
|
9
9
|
rm,
|
|
10
10
|
writeFile,
|
|
11
|
-
} from
|
|
12
|
-
import {
|
|
13
|
-
import path from
|
|
14
|
-
import os from
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
11
|
+
} from 'node:fs/promises';
|
|
12
|
+
import {createRequire} from 'node:module';
|
|
13
|
+
import path from 'node:path';
|
|
14
|
+
import os from 'node:os';
|
|
15
|
+
import {fileURLToPath} from 'node:url';
|
|
16
|
+
import {setup, artifactTargets} from './templates.mjs';
|
|
17
|
+
import {beamDoctor} from './beam-doctor.mjs';
|
|
18
18
|
const exec = promisify(execFile);
|
|
19
19
|
const profiles = JSON.parse(
|
|
20
|
-
await readFile(new URL(
|
|
20
|
+
await readFile(new URL('./compatibility.json', import.meta.url), 'utf8'),
|
|
21
21
|
).targets;
|
|
22
|
-
function versionParts(v)
|
|
23
|
-
|
|
22
|
+
function versionParts(v)
|
|
23
|
+
{
|
|
24
|
+
return String(v).replace(/^v/, '').split('.').map(Number);
|
|
24
25
|
}
|
|
25
|
-
function compare(a, b)
|
|
26
|
+
function compare(a, b)
|
|
27
|
+
{
|
|
26
28
|
const x = versionParts(a),
|
|
27
29
|
y = versionParts(b);
|
|
28
|
-
for (let i = 0; i < Math.max(x.length, y.length); i++)
|
|
30
|
+
for (let i = 0; i < Math.max(x.length, y.length); i++)
|
|
31
|
+
{
|
|
29
32
|
const d = (x[i] || 0) - (y[i] || 0);
|
|
30
33
|
if (d) return Math.sign(d);
|
|
31
34
|
}
|
|
32
35
|
return 0;
|
|
33
36
|
}
|
|
34
|
-
export function supported(target, dependency, version)
|
|
37
|
+
export function supported(target, dependency, version)
|
|
38
|
+
{
|
|
35
39
|
const range = profiles[target]?.[dependency];
|
|
36
40
|
return (
|
|
37
41
|
!!range &&
|
|
@@ -40,294 +44,354 @@ export function supported(target, dependency, version) {
|
|
|
40
44
|
compare(version, range[1]) < 0
|
|
41
45
|
);
|
|
42
46
|
}
|
|
43
|
-
export async function run(command, args, cwd, extra = {})
|
|
47
|
+
export async function run(command, args, cwd, extra = {})
|
|
48
|
+
{
|
|
44
49
|
const result = await exec(command, args, {
|
|
45
50
|
cwd,
|
|
46
|
-
encoding:
|
|
51
|
+
encoding: 'utf8',
|
|
47
52
|
maxBuffer: 8 * 1024 * 1024,
|
|
48
53
|
timeout: 120000,
|
|
49
54
|
...extra,
|
|
50
55
|
});
|
|
51
|
-
return result.stdout.replace(/\x1b\[[0-9;]*m/g,
|
|
56
|
+
return result.stdout.replace(/\x1b\[[0-9;]*m/g, '');
|
|
52
57
|
}
|
|
53
|
-
const major =
|
|
54
|
-
Number(String(version).replace(/^v/,
|
|
55
|
-
function requireThat(condition, message)
|
|
58
|
+
const major = version =>
|
|
59
|
+
Number(String(version).replace(/^v/, '').split('.')[0]);
|
|
60
|
+
function requireThat(condition, message)
|
|
61
|
+
{
|
|
56
62
|
if (!condition) throw new Error(message);
|
|
57
63
|
}
|
|
58
|
-
async function installed(req, name)
|
|
64
|
+
async function installed(req, name)
|
|
65
|
+
{
|
|
59
66
|
let dir = path.dirname(req.resolve(name));
|
|
60
|
-
for (;;)
|
|
61
|
-
|
|
67
|
+
for (;;)
|
|
68
|
+
{
|
|
69
|
+
try
|
|
70
|
+
{
|
|
62
71
|
const pkg = JSON.parse(
|
|
63
|
-
await readFile(path.join(dir,
|
|
72
|
+
await readFile(path.join(dir, 'package.json'), 'utf8'),
|
|
64
73
|
);
|
|
65
74
|
if (pkg.name === name) return pkg.version;
|
|
66
|
-
}
|
|
75
|
+
}
|
|
76
|
+
catch
|
|
77
|
+
{}
|
|
67
78
|
const parent = path.dirname(dir);
|
|
68
79
|
if (parent === dir) throw new Error(`Cannot resolve installed ${name}`);
|
|
69
80
|
dir = parent;
|
|
70
81
|
}
|
|
71
82
|
}
|
|
72
|
-
export async function doctor(target, root, plannedArtifacts = [])
|
|
83
|
+
export async function doctor(target, root, plannedArtifacts = [])
|
|
84
|
+
{
|
|
73
85
|
const name = target.language;
|
|
74
86
|
if (artifactTargets.includes(name))
|
|
75
|
-
return {
|
|
87
|
+
return {
|
|
88
|
+
target: name,
|
|
89
|
+
ok: true,
|
|
90
|
+
versions: {},
|
|
91
|
+
kind: 'artifact',
|
|
92
|
+
instructions: setup[name],
|
|
93
|
+
};
|
|
76
94
|
const defaults =
|
|
77
|
-
name ===
|
|
78
|
-
? [
|
|
79
|
-
: name ===
|
|
80
|
-
? [
|
|
81
|
-
: name ===
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
95
|
+
name === 'java'
|
|
96
|
+
? ['src/main/java', 'src/test/java']
|
|
97
|
+
: name === 'kotlin'
|
|
98
|
+
? ['src/main/kotlin', 'src/test/kotlin']
|
|
99
|
+
: name === 'scala'
|
|
100
|
+
? ['src/main/scala', 'src/test/scala']
|
|
101
|
+
: name === 'groovy'
|
|
102
|
+
? ['src/main/groovy', 'src/test/groovy']
|
|
103
|
+
: name === 'clojure'
|
|
104
|
+
? ['src', 'test']
|
|
105
|
+
: [
|
|
106
|
+
'src',
|
|
107
|
+
[
|
|
108
|
+
'python',
|
|
109
|
+
'prolog',
|
|
110
|
+
'rust',
|
|
111
|
+
'fsharp',
|
|
112
|
+
'csharp',
|
|
113
|
+
'swift',
|
|
114
|
+
].includes(name)
|
|
115
|
+
? 'tests'
|
|
116
|
+
: 'test',
|
|
117
|
+
];
|
|
88
118
|
const sourceDir = target.sourceDir ?? defaults[0];
|
|
89
119
|
const testDir = target.testDir ?? defaults[1];
|
|
90
|
-
try
|
|
91
|
-
|
|
120
|
+
try
|
|
121
|
+
{
|
|
122
|
+
requireThat(major(process.versions.node) >= 22, 'Node 22+ is required');
|
|
92
123
|
const versions = {};
|
|
93
124
|
let coverage;
|
|
94
|
-
if ([
|
|
125
|
+
if (['javascript', 'typescript'].includes(name))
|
|
126
|
+
{
|
|
95
127
|
const pkg = JSON.parse(
|
|
96
|
-
await readFile(path.join(root,
|
|
128
|
+
await readFile(path.join(root, 'package.json'), 'utf8'),
|
|
97
129
|
);
|
|
98
130
|
requireThat(
|
|
99
|
-
pkg.type ===
|
|
100
|
-
|
|
131
|
+
pkg.type === 'module',
|
|
132
|
+
'package.json must specify type=module',
|
|
101
133
|
);
|
|
102
|
-
const req = createRequire(path.join(root,
|
|
103
|
-
versions[
|
|
134
|
+
const req = createRequire(path.join(root, 'package.json'));
|
|
135
|
+
versions['fast-check'] = await installed(req, 'fast-check');
|
|
104
136
|
requireThat(
|
|
105
|
-
/^4\./.test(versions[
|
|
106
|
-
|
|
137
|
+
/^4\./.test(versions['fast-check']),
|
|
138
|
+
'fast-check 4.x is required',
|
|
107
139
|
);
|
|
108
|
-
if (name ===
|
|
109
|
-
|
|
140
|
+
if (name === 'typescript')
|
|
141
|
+
{
|
|
142
|
+
versions.typescript = await installed(req, 'typescript');
|
|
110
143
|
requireThat(
|
|
111
144
|
/^5\.9\./.test(versions.typescript),
|
|
112
|
-
|
|
145
|
+
'TypeScript 5.9.x is required',
|
|
113
146
|
);
|
|
114
|
-
const ts = req(
|
|
115
|
-
const configPath = path.join(root,
|
|
147
|
+
const ts = req('typescript');
|
|
148
|
+
const configPath = path.join(root, 'tsconfig.json');
|
|
116
149
|
const read = ts.readConfigFile(configPath, ts.sys.readFile);
|
|
117
|
-
requireThat(!read.error,
|
|
150
|
+
requireThat(!read.error, 'Cannot read tsconfig.json');
|
|
118
151
|
const config = ts.parseJsonConfigFileContent(read.config, ts.sys, root);
|
|
119
152
|
requireThat(
|
|
120
|
-
config.errors.every(
|
|
121
|
-
|
|
153
|
+
config.errors.every(e => e.code === 18003),
|
|
154
|
+
'Invalid TypeScript configuration',
|
|
122
155
|
);
|
|
123
156
|
requireThat(
|
|
124
157
|
config.options.module === ts.ModuleKind.NodeNext &&
|
|
125
|
-
config.options.outDir === path.join(root,
|
|
158
|
+
config.options.outDir === path.join(root, 'dist') &&
|
|
126
159
|
config.options.rootDir === root,
|
|
127
|
-
|
|
160
|
+
'TypeScript requires module=NodeNext, rootDir=., outDir=dist',
|
|
128
161
|
);
|
|
129
162
|
requireThat(
|
|
130
163
|
!config.options.noEmit &&
|
|
131
164
|
config.options.target >= ts.ScriptTarget.ES2022,
|
|
132
|
-
|
|
165
|
+
'TypeScript requires emission and target ES2022+',
|
|
133
166
|
);
|
|
134
167
|
requireThat(
|
|
135
168
|
config.raw.include?.includes(`${sourceDir}/**/*.ts`) &&
|
|
136
169
|
config.raw.include?.includes(`${testDir}/**/*.ts`),
|
|
137
|
-
|
|
170
|
+
'TypeScript must include the configured source and test directories',
|
|
138
171
|
);
|
|
139
172
|
requireThat(
|
|
140
173
|
!config.raw.exclude ||
|
|
141
|
-
config.raw.exclude.every((p)
|
|
142
|
-
|
|
143
|
-
),
|
|
144
|
-
"Custom TypeScript exclusions cannot be verified",
|
|
174
|
+
config.raw.exclude.every(p => ['node_modules', 'dist'].includes(p)),
|
|
175
|
+
'Custom TypeScript exclusions cannot be verified',
|
|
145
176
|
);
|
|
146
|
-
versions[
|
|
147
|
-
await readFile(req.resolve(
|
|
177
|
+
versions['@types/node'] = JSON.parse(
|
|
178
|
+
await readFile(req.resolve('@types/node/package.json'), 'utf8'),
|
|
148
179
|
).version;
|
|
149
180
|
requireThat(
|
|
150
|
-
major(versions[
|
|
151
|
-
|
|
181
|
+
major(versions['@types/node']) >= 22,
|
|
182
|
+
'@types/node 22+ is required',
|
|
152
183
|
);
|
|
153
184
|
}
|
|
154
|
-
}
|
|
185
|
+
}
|
|
186
|
+
else if (name === 'python' || name === 'prolog')
|
|
187
|
+
{
|
|
155
188
|
const script = `import sys,json,importlib.metadata as m,tomllib,pathlib\np=tomllib.loads(pathlib.Path('pyproject.toml').read_text())\nprint(json.dumps({'python':'.'.join(map(str,sys.version_info[:3])),'optimization':sys.flags.optimize,'pytest':m.version('pytest'),'hypothesis':m.version('hypothesis'),'config':p.get('tool',{}).get('pytest',{}).get('ini_options',{})}))`;
|
|
156
189
|
Object.assign(
|
|
157
190
|
versions,
|
|
158
|
-
JSON.parse(await run(target.python ||
|
|
191
|
+
JSON.parse(await run(target.python || 'python3', ['-c', script], root)),
|
|
159
192
|
);
|
|
160
193
|
requireThat(
|
|
161
194
|
major(versions.python) === 3 &&
|
|
162
|
-
Number(versions.python.split(
|
|
163
|
-
|
|
195
|
+
Number(versions.python.split('.')[1]) >= 13,
|
|
196
|
+
'Python 3.13+ is required',
|
|
164
197
|
);
|
|
165
198
|
requireThat(
|
|
166
199
|
/^8\.4\./.test(versions.pytest) && /^6\./.test(versions.hypothesis),
|
|
167
|
-
|
|
200
|
+
'pytest 8.4.x and Hypothesis 6.x are required',
|
|
168
201
|
);
|
|
169
202
|
requireThat(
|
|
170
203
|
versions.config.pythonpath?.includes(sourceDir) &&
|
|
171
204
|
versions.config.testpaths?.includes(testDir),
|
|
172
|
-
|
|
205
|
+
'pytest must include the configured source and test directories',
|
|
173
206
|
);
|
|
174
207
|
requireThat(
|
|
175
208
|
!versions.config.addopts &&
|
|
176
209
|
!versions.config.python_files &&
|
|
177
210
|
!versions.config.python_functions,
|
|
178
|
-
|
|
211
|
+
'Custom pytest selection options cannot be verified',
|
|
179
212
|
);
|
|
180
213
|
requireThat(
|
|
181
214
|
!process.env.PYTEST_ADDOPTS,
|
|
182
|
-
|
|
215
|
+
'Clear PYTEST_ADDOPTS before compatibility checks',
|
|
183
216
|
);
|
|
184
217
|
delete versions.config;
|
|
185
|
-
if (name ===
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
218
|
+
if (name === 'prolog')
|
|
219
|
+
{
|
|
220
|
+
requireThat(
|
|
221
|
+
versions.optimization === 0,
|
|
222
|
+
'Prolog host tests require enabled Python assertions; remove -O/PYTHONOPTIMIZE',
|
|
223
|
+
);
|
|
224
|
+
const probe =
|
|
225
|
+
"import json,importlib.metadata as m,janus_swi as j; v=j.query_once('current_prolog_flag(version_data,swi(Major,Minor,Patch,_)),use_module(library(plunit)),current_prolog_flag(determinism_error,error)'); print(json.dumps({'janus':m.version('janus-swi'),'swi':[v['Major'],v['Minor'],v['Patch']],'ready':v['truth']}))";
|
|
226
|
+
Object.assign(
|
|
227
|
+
versions,
|
|
228
|
+
JSON.parse(
|
|
229
|
+
await run(target.python || 'python3', ['-c', probe], root),
|
|
230
|
+
),
|
|
231
|
+
);
|
|
232
|
+
requireThat(
|
|
233
|
+
versions.janus === '1.5.3' &&
|
|
234
|
+
versions.swi[0] === 10 &&
|
|
235
|
+
versions.ready === true,
|
|
236
|
+
'Prolog requires janus-swi 1.5.3, SWI-Prolog 10.x, PLUnit and determinism guards',
|
|
237
|
+
);
|
|
192
238
|
}
|
|
193
|
-
}
|
|
194
|
-
|
|
239
|
+
}
|
|
240
|
+
else if (name === 'go')
|
|
241
|
+
{
|
|
242
|
+
versions.go = (await run('go', ['version'], root)).match(
|
|
195
243
|
/go(\d+\.\d+(?:\.\d+)?)/,
|
|
196
244
|
)?.[1];
|
|
197
245
|
requireThat(
|
|
198
|
-
versions.go && Number(versions.go.split(
|
|
199
|
-
|
|
246
|
+
versions.go && Number(versions.go.split('.')[1]) >= 22,
|
|
247
|
+
'Go 1.22+ is required',
|
|
200
248
|
);
|
|
201
249
|
const data = JSON.parse(
|
|
202
250
|
await run(
|
|
203
|
-
|
|
204
|
-
[
|
|
251
|
+
'go',
|
|
252
|
+
['list', '-mod=readonly', '-m', '-json', 'pgregory.net/rapid'],
|
|
205
253
|
root,
|
|
206
|
-
{
|
|
254
|
+
{env: {...process.env, GOTOOLCHAIN: 'local', GOFLAGS: ''}},
|
|
207
255
|
),
|
|
208
256
|
);
|
|
209
257
|
requireThat(
|
|
210
|
-
!data.Replace && data.Version ===
|
|
211
|
-
|
|
258
|
+
!data.Replace && data.Version === 'v1.2.0',
|
|
259
|
+
'Rapid v1.2.0 without local replacement is required',
|
|
212
260
|
);
|
|
213
|
-
await run(
|
|
214
|
-
env: {
|
|
261
|
+
await run('go', ['list', '-mod=readonly', 'pgregory.net/rapid'], root, {
|
|
262
|
+
env: {...process.env, GOTOOLCHAIN: 'local', GOFLAGS: ''},
|
|
215
263
|
});
|
|
216
264
|
versions.rapid = data.Version;
|
|
217
|
-
}
|
|
265
|
+
}
|
|
266
|
+
else if (name === 'haskell')
|
|
267
|
+
{
|
|
218
268
|
const compiler = (
|
|
219
269
|
await run(
|
|
220
|
-
|
|
270
|
+
'stack',
|
|
221
271
|
[
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
fileURLToPath(new URL(
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
272
|
+
'--no-terminal',
|
|
273
|
+
'--no-install-ghc',
|
|
274
|
+
'--with-hpack',
|
|
275
|
+
fileURLToPath(new URL('./read-only-hpack.mjs', import.meta.url)),
|
|
276
|
+
'--lock-file',
|
|
277
|
+
'read-only',
|
|
278
|
+
'path',
|
|
279
|
+
'--compiler-exe',
|
|
230
280
|
],
|
|
231
281
|
root,
|
|
232
282
|
)
|
|
233
283
|
).trim();
|
|
234
284
|
await access(compiler);
|
|
235
|
-
versions.ghc = (await run(compiler, [
|
|
285
|
+
versions.ghc = (await run(compiler, ['--numeric-version'], root)).trim();
|
|
236
286
|
const deps = JSON.parse(
|
|
237
287
|
await run(
|
|
238
|
-
|
|
288
|
+
'stack',
|
|
239
289
|
[
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
fileURLToPath(new URL(
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
290
|
+
'--no-terminal',
|
|
291
|
+
'--with-hpack',
|
|
292
|
+
fileURLToPath(new URL('./read-only-hpack.mjs', import.meta.url)),
|
|
293
|
+
'--lock-file',
|
|
294
|
+
'read-only',
|
|
295
|
+
'ls',
|
|
296
|
+
'dependencies',
|
|
297
|
+
'json',
|
|
298
|
+
'--test',
|
|
299
|
+
'--global-hints',
|
|
250
300
|
],
|
|
251
301
|
root,
|
|
252
302
|
),
|
|
253
303
|
);
|
|
254
304
|
for (const dep of deps) versions[dep.name] = dep.version;
|
|
255
305
|
for (const dep of [
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
306
|
+
'hspec',
|
|
307
|
+
'hedgehog',
|
|
308
|
+
'hspec-hedgehog',
|
|
309
|
+
'hspec-discover',
|
|
260
310
|
])
|
|
261
311
|
requireThat(versions[dep], `Stack test plan is missing ${dep}`);
|
|
262
312
|
// Nodes reach each other over TCP and HTTP with the network package.
|
|
263
313
|
requireThat(
|
|
264
314
|
versions.network,
|
|
265
|
-
|
|
315
|
+
'Stack plan is missing network (a library dependency, for distribution)',
|
|
266
316
|
);
|
|
267
317
|
requireThat(
|
|
268
318
|
/^2\.11\./.test(versions.hspec) &&
|
|
269
319
|
/^1\./.test(versions.hedgehog) &&
|
|
270
|
-
/^0\.3\./.test(versions[
|
|
271
|
-
|
|
320
|
+
/^0\.3\./.test(versions['hspec-hedgehog']),
|
|
321
|
+
'Unsupported Hspec/Hedgehog combination; use lts-24.58',
|
|
272
322
|
);
|
|
273
|
-
const entry = await readFile(path.join(root, testDir,
|
|
323
|
+
const entry = await readFile(path.join(root, testDir, 'Spec.hs'), 'utf8');
|
|
274
324
|
requireThat(
|
|
275
|
-
entry.includes(
|
|
276
|
-
|
|
325
|
+
entry.includes('hspec-discover'),
|
|
326
|
+
'test/Spec.hs must use hspec-discover',
|
|
277
327
|
);
|
|
278
|
-
const cabals = (await readdir(root)).filter(
|
|
328
|
+
const cabals = (await readdir(root)).filter(f => f.endsWith('.cabal'));
|
|
279
329
|
requireThat(
|
|
280
330
|
cabals.length === 1,
|
|
281
|
-
|
|
331
|
+
'The Stack profile requires one package per target root',
|
|
332
|
+
);
|
|
333
|
+
const cabal = await readFile(path.join(root, cabals[0]), 'utf8');
|
|
334
|
+
const components = cabal
|
|
335
|
+
.split(/^(?:library(?:[ \t]+\S+)?|test-suite[ \t]+\S+)[ \t]*\n/m)
|
|
336
|
+
.slice(1)
|
|
337
|
+
.map(s => s.split(/\n(?=\S)/)[0]);
|
|
338
|
+
requireThat(
|
|
339
|
+
components.some(
|
|
340
|
+
s =>
|
|
341
|
+
s.includes(sourceDir) &&
|
|
342
|
+
['text', 'bytestring'].every(dep =>
|
|
343
|
+
new RegExp(`(?:^|[\\s,])${dep}(?=[\\s,<>=]|$)`).test(s),
|
|
344
|
+
),
|
|
345
|
+
),
|
|
346
|
+
'The component compiling generated source must directly depend on text and bytestring',
|
|
282
347
|
);
|
|
283
|
-
const cabal = await readFile(path.join(root, cabals[0]), "utf8");
|
|
284
|
-
const components = cabal.split(/^(?:library(?:[ \t]+\S+)?|test-suite[ \t]+\S+)[ \t]*\n/m).slice(1).map(s => s.split(/\n(?=\S)/)[0]);
|
|
285
|
-
requireThat(components.some(s => s.includes(sourceDir) && ['text','bytestring'].every(dep => new RegExp(`(?:^|[\\s,])${dep}(?=[\\s,<>=]|$)`).test(s))), "The component compiling generated source must directly depend on text and bytestring");
|
|
286
348
|
const suites = cabal
|
|
287
349
|
.split(/^test-suite\s+/m)
|
|
288
350
|
.slice(1)
|
|
289
|
-
.map(
|
|
351
|
+
.map(s => s.split(/\n(?=\S)/)[0]);
|
|
290
352
|
requireThat(
|
|
291
353
|
suites.some(
|
|
292
|
-
|
|
293
|
-
[
|
|
354
|
+
s =>
|
|
355
|
+
['hspec', 'hedgehog', 'hspec-hedgehog'].every(dep =>
|
|
294
356
|
new RegExp(`(?:^|[\\s,])${dep}(?=[\\s,<>=]|$)`).test(s),
|
|
295
357
|
) &&
|
|
296
358
|
s.includes(testDir) &&
|
|
297
|
-
s.includes(
|
|
359
|
+
s.includes('Spec.hs'),
|
|
298
360
|
),
|
|
299
|
-
|
|
361
|
+
'A test suite must directly depend on Hspec/Hedgehog and discover the configured test directory',
|
|
300
362
|
);
|
|
301
|
-
}
|
|
302
|
-
|
|
303
|
-
|
|
363
|
+
}
|
|
364
|
+
else if (name === 'java')
|
|
365
|
+
{
|
|
366
|
+
const cmd = target.maven || 'mvn';
|
|
367
|
+
const version = await run(cmd, ['-version'], root);
|
|
304
368
|
versions.java = version.match(/Java version:\s*([\d.]+)/)?.[1];
|
|
305
|
-
requireThat(major(versions.java) >= 25,
|
|
306
|
-
const pom = await run(cmd, [
|
|
369
|
+
requireThat(major(versions.java) >= 25, 'Maven must run on Java 25+');
|
|
370
|
+
const pom = await run(cmd, ['help:effective-pom'], root);
|
|
307
371
|
const plugins = [...pom.matchAll(/<plugin>([\s\S]*?)<\/plugin>/g)].map(
|
|
308
|
-
|
|
372
|
+
m => m[1],
|
|
309
373
|
);
|
|
310
374
|
const compiler =
|
|
311
375
|
plugins
|
|
312
|
-
.filter(
|
|
313
|
-
p.includes(
|
|
376
|
+
.filter(p =>
|
|
377
|
+
p.includes('<artifactId>maven-compiler-plugin</artifactId>'),
|
|
314
378
|
)
|
|
315
|
-
.at(-1) ||
|
|
379
|
+
.at(-1) || '';
|
|
316
380
|
requireThat(
|
|
317
381
|
/<version>3\.(?:14|15)\./.test(compiler),
|
|
318
|
-
|
|
382
|
+
'Maven compiler plugin 3.14.x or 3.15.x is required',
|
|
319
383
|
);
|
|
320
384
|
requireThat(
|
|
321
385
|
!/<(?:jdkToolchain|executable|jvm)>/.test(pom),
|
|
322
|
-
|
|
386
|
+
'Custom JVM/toolchain overrides cannot be verified by the v0.1 Maven profile',
|
|
323
387
|
);
|
|
324
388
|
requireThat(
|
|
325
389
|
!/<(?:release|testRelease)>((?!25<)[^<]+)<\//.test(compiler),
|
|
326
|
-
|
|
390
|
+
'All effective compiler releases must be 25',
|
|
327
391
|
);
|
|
328
392
|
requireThat(
|
|
329
393
|
/<(?:maven\.compiler\.release|release)>25<\//.test(pom),
|
|
330
|
-
|
|
394
|
+
'The effective Maven compiler release must be 25',
|
|
331
395
|
);
|
|
332
396
|
requireThat(
|
|
333
397
|
pom.includes(
|
|
@@ -336,18 +400,19 @@ export async function doctor(target, root, plannedArtifacts = []) {
|
|
|
336
400
|
pom.includes(
|
|
337
401
|
`<testSourceDirectory>${path.join(root, testDir)}</testSourceDirectory>`,
|
|
338
402
|
),
|
|
339
|
-
|
|
403
|
+
'Maven source directories must match the configured LawSpec layout',
|
|
340
404
|
);
|
|
341
405
|
const tree = await run(
|
|
342
406
|
cmd,
|
|
343
|
-
[
|
|
407
|
+
['dependency:tree', '-Dscope=test', '-DoutputType=text'],
|
|
344
408
|
root,
|
|
345
409
|
);
|
|
346
410
|
for (const [key, pattern] of Object.entries({
|
|
347
411
|
jetCheck: /org\.jetbrains:jetCheck:jar:(0\.3\.0):test/,
|
|
348
|
-
|
|
412
|
+
'junit-jupiter':
|
|
349
413
|
/org\.junit\.jupiter:junit-jupiter(?:-api)?:jar:(5\.14\.\d+):test/,
|
|
350
|
-
}))
|
|
414
|
+
}))
|
|
415
|
+
{
|
|
351
416
|
versions[key] = tree.match(pattern)?.[1];
|
|
352
417
|
requireThat(versions[key], `Missing compatible resolved ${key}`);
|
|
353
418
|
}
|
|
@@ -355,70 +420,133 @@ export async function doctor(target, root, plannedArtifacts = []) {
|
|
|
355
420
|
/<artifactId>maven-surefire-plugin<\/artifactId>\s*<version>3\.5\./.test(
|
|
356
421
|
pom,
|
|
357
422
|
),
|
|
358
|
-
|
|
423
|
+
'Surefire 3.5.x is required',
|
|
359
424
|
);
|
|
360
425
|
requireThat(
|
|
361
426
|
!/<skipTests>true<\/skipTests>|<maven.test.skip>true<\/maven.test.skip>/.test(
|
|
362
427
|
pom,
|
|
363
428
|
),
|
|
364
|
-
|
|
429
|
+
'Maven test execution is disabled',
|
|
365
430
|
);
|
|
366
431
|
const surefire =
|
|
367
432
|
plugins
|
|
368
|
-
.filter(
|
|
369
|
-
p.includes(
|
|
433
|
+
.filter(p =>
|
|
434
|
+
p.includes('<artifactId>maven-surefire-plugin</artifactId>'),
|
|
370
435
|
)
|
|
371
|
-
.at(-1) ||
|
|
436
|
+
.at(-1) || '';
|
|
372
437
|
requireThat(
|
|
373
438
|
!/<(?:includes|excludes|groups|excludedGroups)>|<(?:skip|testFailureIgnore)>true</.test(
|
|
374
439
|
surefire,
|
|
375
440
|
),
|
|
376
|
-
|
|
441
|
+
'Custom Surefire filtering or ignored failures cannot be verified',
|
|
377
442
|
);
|
|
378
443
|
requireThat(
|
|
379
444
|
/org\.junit\.jupiter:junit-jupiter-engine:jar:5\.14\.\d+:test/.test(
|
|
380
445
|
tree,
|
|
381
446
|
),
|
|
382
|
-
|
|
383
|
-
);
|
|
384
|
-
}
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
requireThat(
|
|
447
|
+
'The JUnit Jupiter test engine must be on the test classpath',
|
|
448
|
+
);
|
|
449
|
+
}
|
|
450
|
+
else if (name === 'rust')
|
|
451
|
+
{
|
|
452
|
+
const compiler = target.rustc || 'rustc';
|
|
453
|
+
const cargo = target.cargo || 'cargo';
|
|
454
|
+
versions.rust = (await run(compiler, ['--version'], root)).match(
|
|
455
|
+
/^rustc (\d+\.\d+\.\d+)/,
|
|
456
|
+
)?.[1];
|
|
457
|
+
requireThat(
|
|
458
|
+
versions.rust && compare(versions.rust, '1.85.0') >= 0,
|
|
459
|
+
'Rust 1.85+ is required',
|
|
460
|
+
);
|
|
461
|
+
const data = JSON.parse(
|
|
462
|
+
await run(cargo, ['metadata', '--format-version', '1'], root),
|
|
463
|
+
);
|
|
464
|
+
const pkg = data.packages.find(
|
|
465
|
+
p => path.resolve(p.manifest_path) === path.join(root, 'Cargo.toml'),
|
|
466
|
+
);
|
|
467
|
+
requireThat(
|
|
468
|
+
pkg,
|
|
469
|
+
'Select a Cargo package directory containing Cargo.toml',
|
|
470
|
+
);
|
|
471
|
+
requireThat(
|
|
472
|
+
pkg.edition === '2024',
|
|
473
|
+
'Cargo package must use edition 2024',
|
|
474
|
+
);
|
|
393
475
|
const node = data.resolve.nodes.find(n => n.id === pkg.id);
|
|
394
|
-
for (const dep of [
|
|
395
|
-
|
|
396
|
-
|
|
476
|
+
for (const dep of [
|
|
477
|
+
'proptest',
|
|
478
|
+
'num-bigint',
|
|
479
|
+
'num-rational',
|
|
480
|
+
'num-complex',
|
|
481
|
+
'num-traits',
|
|
482
|
+
])
|
|
483
|
+
{
|
|
484
|
+
const reference = node.deps.find(
|
|
485
|
+
d => d.name === dep.replaceAll('-', '_'),
|
|
486
|
+
);
|
|
487
|
+
versions[dep] = data.packages.find(
|
|
488
|
+
p => p.id === reference?.pkg,
|
|
489
|
+
)?.version;
|
|
397
490
|
requireThat(versions[dep], `Missing direct Cargo dependency: ${dep}`);
|
|
398
491
|
}
|
|
399
|
-
const manifest = await readFile(path.join(root,
|
|
400
|
-
requireThat(
|
|
492
|
+
const manifest = await readFile(path.join(root, 'Cargo.toml'), 'utf8');
|
|
493
|
+
requireThat(
|
|
494
|
+
!/harness\s*=\s*false/.test(manifest),
|
|
495
|
+
'Rust generated tests require the standard Cargo test harness',
|
|
496
|
+
);
|
|
401
497
|
const testRoot = path.resolve(root, testDir);
|
|
402
498
|
const expectedTests = plannedArtifacts.length
|
|
403
|
-
? plannedArtifacts
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
499
|
+
? plannedArtifacts
|
|
500
|
+
.filter(
|
|
501
|
+
f => f.placement === 'test' && f.path.endsWith('_lawspec.rs'),
|
|
502
|
+
)
|
|
503
|
+
.map(f => path.resolve(root, f.path))
|
|
504
|
+
: (
|
|
505
|
+
await readdir(testRoot).catch(error =>
|
|
506
|
+
{
|
|
507
|
+
if (error.code === 'ENOENT') return [];
|
|
508
|
+
throw error;
|
|
509
|
+
})
|
|
510
|
+
)
|
|
511
|
+
.filter(n => n.endsWith('_lawspec.rs'))
|
|
512
|
+
.map(n => path.join(testRoot, n));
|
|
513
|
+
if (testDir !== 'tests' || /autotests\s*=\s*false/.test(manifest))
|
|
514
|
+
{
|
|
515
|
+
const registered = new Set(
|
|
516
|
+
pkg.targets
|
|
517
|
+
.filter(t => t.kind.includes('test') && t.test)
|
|
518
|
+
.map(t => path.resolve(t.src_path)),
|
|
519
|
+
);
|
|
520
|
+
requireThat(
|
|
521
|
+
expectedTests.length
|
|
522
|
+
? expectedTests.every(file => registered.has(file))
|
|
523
|
+
: [...registered].some(file =>
|
|
524
|
+
file.startsWith(testRoot + path.sep),
|
|
525
|
+
),
|
|
526
|
+
'Register every generated Rust test file with Cargo [[test]] entries for this custom layout',
|
|
527
|
+
);
|
|
408
528
|
}
|
|
409
|
-
const library = pkg.targets.find(t => t.kind.includes(
|
|
410
|
-
requireThat(
|
|
411
|
-
|
|
529
|
+
const library = pkg.targets.find(t => t.kind.includes('lib'));
|
|
530
|
+
requireThat(
|
|
531
|
+
!library ||
|
|
532
|
+
path.dirname(path.resolve(library.src_path)) ===
|
|
533
|
+
path.resolve(root, sourceDir),
|
|
534
|
+
'Cargo library path must match the configured sourceDir',
|
|
535
|
+
);
|
|
536
|
+
}
|
|
537
|
+
else if (name === 'kotlin')
|
|
538
|
+
{
|
|
412
539
|
const command =
|
|
413
540
|
target.gradle ||
|
|
414
|
-
(await access(path.join(root,
|
|
415
|
-
() => path.join(root,
|
|
416
|
-
() =>
|
|
541
|
+
(await access(path.join(root, 'gradlew')).then(
|
|
542
|
+
() => path.join(root, 'gradlew'),
|
|
543
|
+
() => 'gradle',
|
|
417
544
|
));
|
|
418
|
-
const tmp = await mkdtemp(path.join(os.tmpdir(),
|
|
419
|
-
try
|
|
420
|
-
|
|
421
|
-
const
|
|
545
|
+
const tmp = await mkdtemp(path.join(os.tmpdir(), 'lawspec-gradle-'));
|
|
546
|
+
try
|
|
547
|
+
{
|
|
548
|
+
const report = path.join(tmp, 'report.json');
|
|
549
|
+
const init = path.join(tmp, 'inspect.gradle');
|
|
422
550
|
await writeFile(
|
|
423
551
|
init,
|
|
424
552
|
`import groovy.json.JsonOutput\ngradle.projectsEvaluated {\n def p = gradle.rootProject\n p.tasks.register('lawspecEnvironmentReport') { doLast {\n def k = p.tasks.findByName('compileTestKotlin')\n def j = p.tasks.findByName('test')\n def plugin = p.plugins.findPlugin('org.jetbrains.kotlin.jvm')\n def kv = plugin.class.classLoader.loadClass('org.jetbrains.kotlin.gradle.plugin.KotlinPluginWrapperKt').getMethod('getKotlinPluginVersion', org.gradle.api.Project).invoke(null, p)\n def deps = p.configurations.testRuntimeClasspath.resolvedConfiguration.resolvedArtifacts.collect { [name: it.moduleVersion.id.group + ':' + it.name, version: it.moduleVersion.id.version] }\n def mainDeps = p.configurations.runtimeClasspath.resolvedConfiguration.resolvedArtifacts.collect { it.moduleVersion.id.group + ':' + it.name }\n new File(System.getenv('LAWSPEC_REPORT')).text = JsonOutput.toJson([kotlin: kv, gradle: gradle.gradleVersion, java: System.getProperty('java.version'), target: k?.compilerOptions?.jvmTarget?.get()?.target, testJava: j?.javaLauncher?.get()?.metadata?.languageVersion?.asInt(), runner: j?.options?.class?.name, enabled: j.enabled, includes: j.filter.includePatterns, excludes: j.filter.excludePatterns, sourceDirs: p.sourceSets.main.allSource.srcDirs.collect { it.canonicalPath }, testDirs: p.sourceSets.test.allSource.srcDirs.collect { it.canonicalPath }, dependencies: deps, mainDependencies: mainDeps])\n } }\n}\n`,
|
|
@@ -426,183 +554,314 @@ export async function doctor(target, root, plannedArtifacts = []) {
|
|
|
426
554
|
await run(
|
|
427
555
|
command,
|
|
428
556
|
[
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
557
|
+
'--no-daemon',
|
|
558
|
+
'--console=plain',
|
|
559
|
+
'-I',
|
|
432
560
|
init,
|
|
433
|
-
|
|
561
|
+
'lawspecEnvironmentReport',
|
|
434
562
|
],
|
|
435
563
|
root,
|
|
436
|
-
{
|
|
564
|
+
{env: {...process.env, LAWSPEC_REPORT: report}},
|
|
437
565
|
);
|
|
438
|
-
const data = JSON.parse(await readFile(report,
|
|
566
|
+
const data = JSON.parse(await readFile(report, 'utf8'));
|
|
439
567
|
requireThat(
|
|
440
568
|
/^9\.[1-3]\./.test(data.gradle) &&
|
|
441
569
|
major(data.java) >= 25 &&
|
|
442
570
|
Number(data.target) >= 25 &&
|
|
443
571
|
data.testJava >= 25,
|
|
444
|
-
|
|
572
|
+
'Kotlin requires Gradle 9.1–9.3 and Java/JVM target/test runtime 25+',
|
|
445
573
|
);
|
|
446
574
|
requireThat(
|
|
447
|
-
data.runner?.includes(
|
|
575
|
+
data.runner?.includes('JUnitPlatform') &&
|
|
448
576
|
data.enabled &&
|
|
449
577
|
!data.includes.length &&
|
|
450
578
|
!data.excludes.length,
|
|
451
|
-
|
|
579
|
+
'Gradle test must enable unfiltered JUnit Platform execution',
|
|
452
580
|
);
|
|
453
581
|
requireThat(
|
|
454
582
|
data.sourceDirs.includes(path.join(root, sourceDir)) &&
|
|
455
583
|
data.testDirs.includes(path.join(root, testDir)),
|
|
456
|
-
|
|
584
|
+
'Gradle source sets must include the configured LawSpec directories',
|
|
457
585
|
);
|
|
458
586
|
for (const dep of [
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
587
|
+
'io.kotest:kotest-property-jvm',
|
|
588
|
+
'io.kotest:kotest-runner-junit5-jvm',
|
|
589
|
+
'io.kotest:kotest-assertions-core-jvm',
|
|
462
590
|
])
|
|
463
591
|
requireThat(
|
|
464
592
|
data.dependencies.some(
|
|
465
|
-
|
|
593
|
+
d => d.name === dep && d.version === '5.9.1',
|
|
466
594
|
),
|
|
467
595
|
`Missing ${dep}:5.9.1`,
|
|
468
596
|
);
|
|
469
597
|
// Workflows block on asynchronous Kotlin steps with runBlocking.
|
|
470
598
|
requireThat(
|
|
471
|
-
(data.mainDependencies ?? []).includes(
|
|
472
|
-
|
|
599
|
+
(data.mainDependencies ?? []).includes(
|
|
600
|
+
'org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm',
|
|
601
|
+
),
|
|
602
|
+
'Missing org.jetbrains.kotlinx:kotlinx-coroutines-core (an implementation dependency, for workflows)',
|
|
473
603
|
);
|
|
474
604
|
Object.assign(versions, data);
|
|
475
605
|
requireThat(
|
|
476
606
|
data.kotlin,
|
|
477
|
-
|
|
607
|
+
'Cannot determine the Kotlin Gradle plugin version',
|
|
478
608
|
);
|
|
479
|
-
} finally {
|
|
480
|
-
await rm(tmp, { recursive: true, force: true });
|
|
481
609
|
}
|
|
482
|
-
|
|
610
|
+
finally
|
|
611
|
+
{
|
|
612
|
+
await rm(tmp, {recursive: true, force: true});
|
|
613
|
+
}
|
|
614
|
+
}
|
|
615
|
+
else if (name === 'scala')
|
|
616
|
+
{
|
|
483
617
|
// Scala CLI reads the build from project.scala's directives; the
|
|
484
618
|
// sources keep sbt's layout, which Scala CLI compiles as main and test.
|
|
485
|
-
const command = target.scala ||
|
|
486
|
-
const reported = await run(command, [
|
|
487
|
-
versions[
|
|
619
|
+
const command = target.scala || 'scala';
|
|
620
|
+
const reported = await run(command, ['version'], root);
|
|
621
|
+
versions['scala-cli'] =
|
|
622
|
+
reported.match(/Scala code runner version:\s*(\S+)/)?.[1] ??
|
|
623
|
+
reported.match(/Scala CLI version:\s*(\S+)/)?.[1];
|
|
488
624
|
// java --version prints to standard output (-version prints to standard error).
|
|
489
|
-
const java = await run(
|
|
625
|
+
const java = await run('java', ['--version'], root).catch(error =>
|
|
626
|
+
String(error.message),
|
|
627
|
+
);
|
|
490
628
|
versions.java = java.match(/^(?:openjdk|java)\s+(\S+)/m)?.[1];
|
|
491
|
-
requireThat(major(versions.java ??
|
|
492
|
-
const project = await readFile(
|
|
493
|
-
|
|
629
|
+
requireThat(major(versions.java ?? '0') >= 25, 'Scala requires JDK 25+');
|
|
630
|
+
const project = await readFile(
|
|
631
|
+
path.join(root, 'project.scala'),
|
|
632
|
+
'utf8',
|
|
633
|
+
).catch(() => '');
|
|
634
|
+
const directive = pattern => project.match(pattern)?.[1];
|
|
494
635
|
versions.scala = directive(/\/\/>\s*using\s+scala\s+"?([0-9][^\s"]*)/);
|
|
495
|
-
versions.scalacheck = directive(
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
636
|
+
versions.scalacheck = directive(
|
|
637
|
+
/\/\/>\s*using\s+test\.deps?\s+"?org\.scalacheck::scalacheck:([^\s"]+)/,
|
|
638
|
+
);
|
|
639
|
+
versions.scalatest = directive(
|
|
640
|
+
/\/\/>\s*using\s+test\.deps?\s+"?org\.scalatest::scalatest-funsuite:([^\s"]+)/,
|
|
641
|
+
);
|
|
642
|
+
requireThat(
|
|
643
|
+
versions.scala,
|
|
644
|
+
'project.scala must name Scala 3 (//> using scala 3.9.0)',
|
|
645
|
+
);
|
|
646
|
+
requireThat(
|
|
647
|
+
versions.scalacheck,
|
|
648
|
+
'project.scala must add ScalaCheck (//> using test.dep org.scalacheck::scalacheck:1.20.0)',
|
|
649
|
+
);
|
|
650
|
+
requireThat(
|
|
651
|
+
versions.scalatest,
|
|
652
|
+
'project.scala must add ScalaTest (//> using test.dep org.scalatest::scalatest-funsuite:3.2.20)',
|
|
653
|
+
);
|
|
654
|
+
requireThat(
|
|
655
|
+
sourceDir.split('/').includes('main') ||
|
|
656
|
+
!sourceDir.split('/').includes('test'),
|
|
657
|
+
'The Scala source directory must not be under a directory named test, which Scala CLI compiles as tests',
|
|
658
|
+
);
|
|
659
|
+
requireThat(
|
|
660
|
+
testDir.split('/').includes('test'),
|
|
661
|
+
'The Scala test directory must be under a directory named test, which Scala CLI compiles as tests',
|
|
662
|
+
);
|
|
663
|
+
}
|
|
664
|
+
else if (name === 'clojure')
|
|
665
|
+
{
|
|
505
666
|
// Clojure over the Java model: deps.edn's :test alias runs LawSpec's
|
|
506
667
|
// runner, which compiles java/ into target/classes first.
|
|
507
|
-
const deps = await readFile(path.join(root,
|
|
508
|
-
requireThat(
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
668
|
+
const deps = await readFile(path.join(root, 'deps.edn'), 'utf8');
|
|
669
|
+
requireThat(
|
|
670
|
+
deps.includes('"target/classes"') &&
|
|
671
|
+
deps.includes('"target/test-classes"'),
|
|
672
|
+
"deps.edn must put target/classes on :paths and target/test-classes on the :test alias's :extra-paths",
|
|
673
|
+
);
|
|
674
|
+
requireThat(
|
|
675
|
+
deps.includes('lawspec.test-runner'),
|
|
676
|
+
'deps.edn\'s :test alias must run lawspec.test-runner (:main-opts ["-m" "lawspec.test-runner"])',
|
|
677
|
+
);
|
|
678
|
+
const command = target.clojure || 'clojure';
|
|
679
|
+
const classpath = await run(command, ['-Spath', '-M:test'], root);
|
|
513
680
|
versions.clojure = classpath.match(/clojure-(\d+\.\d+\.\d+)\.jar/)?.[1];
|
|
514
|
-
versions[
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
versions.
|
|
518
|
-
requireThat(
|
|
519
|
-
|
|
681
|
+
versions['test.check'] = classpath.match(
|
|
682
|
+
/test\.check-(\d+\.\d+\.\d+)\.jar/,
|
|
683
|
+
)?.[1];
|
|
684
|
+
requireThat(versions.clojure, 'Missing org.clojure/clojure in deps.edn');
|
|
685
|
+
requireThat(
|
|
686
|
+
versions['test.check'],
|
|
687
|
+
"Missing org.clojure/test.check in deps.edn's :test alias",
|
|
688
|
+
);
|
|
689
|
+
versions.java = (await run('java', ['--version'], root)).match(
|
|
690
|
+
/\b(\d+)(\.\d+)*/,
|
|
691
|
+
)?.[0];
|
|
692
|
+
requireThat(
|
|
693
|
+
major(versions.java) >= 25,
|
|
694
|
+
'Clojure needs a JDK 25+ (its compiler builds the Java model)',
|
|
695
|
+
);
|
|
696
|
+
}
|
|
697
|
+
else if (name === 'groovy')
|
|
698
|
+
{
|
|
520
699
|
// Groovy over the Java model: Gradle's groovy plugin compiles both
|
|
521
700
|
// jointly, Spock runs the specifications and JetCheck the properties.
|
|
522
701
|
const command =
|
|
523
702
|
target.gradle ||
|
|
524
|
-
(await access(path.join(root,
|
|
525
|
-
() => path.join(root,
|
|
526
|
-
() =>
|
|
703
|
+
(await access(path.join(root, 'gradlew')).then(
|
|
704
|
+
() => path.join(root, 'gradlew'),
|
|
705
|
+
() => 'gradle',
|
|
527
706
|
));
|
|
528
|
-
const tmp = await mkdtemp(path.join(os.tmpdir(),
|
|
529
|
-
try
|
|
530
|
-
|
|
531
|
-
const
|
|
707
|
+
const tmp = await mkdtemp(path.join(os.tmpdir(), 'lawspec-gradle-'));
|
|
708
|
+
try
|
|
709
|
+
{
|
|
710
|
+
const report = path.join(tmp, 'report.json');
|
|
711
|
+
const init = path.join(tmp, 'inspect.gradle');
|
|
532
712
|
await writeFile(
|
|
533
713
|
init,
|
|
534
714
|
`import groovy.json.JsonOutput\ngradle.projectsEvaluated {\n def p = gradle.rootProject\n p.tasks.register('lawspecEnvironmentReport') { doLast {\n def j = p.tasks.findByName('test')\n def deps = p.configurations.testRuntimeClasspath.resolvedConfiguration.resolvedArtifacts.collect { [name: it.moduleVersion.id.group + ':' + it.name, version: it.moduleVersion.id.version] }\n new File(System.getenv('LAWSPEC_REPORT')).text = JsonOutput.toJson([gradle: gradle.gradleVersion, java: System.getProperty('java.version'), testJava: j?.javaLauncher?.get()?.metadata?.languageVersion?.asInt(), runner: j?.options?.class?.name, enabled: j.enabled, includes: j.filter.includePatterns, excludes: j.filter.excludePatterns, sourceDirs: p.sourceSets.main.groovy.srcDirs.collect { it.canonicalPath }, testDirs: p.sourceSets.test.groovy.srcDirs.collect { it.canonicalPath }, dependencies: deps])\n } }\n}\n`,
|
|
535
715
|
);
|
|
536
|
-
await run(
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
716
|
+
await run(
|
|
717
|
+
command,
|
|
718
|
+
[
|
|
719
|
+
'--no-daemon',
|
|
720
|
+
'--console=plain',
|
|
721
|
+
'-I',
|
|
722
|
+
init,
|
|
723
|
+
'lawspecEnvironmentReport',
|
|
724
|
+
],
|
|
725
|
+
root,
|
|
726
|
+
{env: {...process.env, LAWSPEC_REPORT: report}},
|
|
727
|
+
);
|
|
728
|
+
const data = JSON.parse(await readFile(report, 'utf8'));
|
|
729
|
+
requireThat(
|
|
730
|
+
/^9\.[1-3]\./.test(data.gradle) &&
|
|
731
|
+
major(data.java) >= 25 &&
|
|
732
|
+
data.testJava >= 25,
|
|
733
|
+
'Groovy requires Gradle 9.1–9.3 and a Java 25+ toolchain',
|
|
734
|
+
);
|
|
735
|
+
requireThat(
|
|
736
|
+
data.runner?.includes('JUnitPlatform') &&
|
|
737
|
+
data.enabled &&
|
|
738
|
+
!data.includes.length &&
|
|
739
|
+
!data.excludes.length,
|
|
740
|
+
'Gradle test must enable unfiltered JUnit Platform execution',
|
|
741
|
+
);
|
|
543
742
|
// The Java model compiles jointly with the Groovy sources.
|
|
544
743
|
// A custom sourceDir or testDir holds the Java model too.
|
|
545
|
-
const sources = target.sourceDir
|
|
546
|
-
|
|
744
|
+
const sources = target.sourceDir
|
|
745
|
+
? [sourceDir]
|
|
746
|
+
: [sourceDir, 'src/main/java'];
|
|
747
|
+
const tests = target.testDir ? [testDir] : [testDir, 'src/test/java'];
|
|
748
|
+
requireThat(
|
|
749
|
+
sources.every(d => data.sourceDirs.includes(path.join(root, d))) &&
|
|
750
|
+
tests.every(d => data.testDirs.includes(path.join(root, d))),
|
|
751
|
+
`Gradle's Groovy source sets must include ${sources.join(' and ')}, and ${tests.join(' and ')}`,
|
|
752
|
+
);
|
|
753
|
+
const version = dep =>
|
|
754
|
+
data.dependencies.find(d => d.name === dep)?.version;
|
|
755
|
+
versions.groovy = version('org.apache.groovy:groovy');
|
|
756
|
+
versions.spock = version('org.spockframework:spock-core')?.replace(
|
|
757
|
+
/-groovy-.*/,
|
|
758
|
+
'',
|
|
759
|
+
);
|
|
760
|
+
requireThat(versions.groovy, 'Missing org.apache.groovy:groovy');
|
|
761
|
+
requireThat(versions.spock, 'Missing org.spockframework:spock-core');
|
|
547
762
|
requireThat(
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
`Gradle's Groovy source sets must include ${sources.join(" and ")}, and ${tests.join(" and ")}`,
|
|
763
|
+
version('org.jetbrains:jetCheck') === '0.3.0',
|
|
764
|
+
'Missing org.jetbrains:jetCheck:0.3.0',
|
|
551
765
|
);
|
|
552
|
-
|
|
553
|
-
versions.groovy = version("org.apache.groovy:groovy");
|
|
554
|
-
versions.spock = version("org.spockframework:spock-core")?.replace(/-groovy-.*/, "");
|
|
555
|
-
requireThat(versions.groovy, "Missing org.apache.groovy:groovy");
|
|
556
|
-
requireThat(versions.spock, "Missing org.spockframework:spock-core");
|
|
557
|
-
requireThat(version("org.jetbrains:jetCheck") === "0.3.0", "Missing org.jetbrains:jetCheck:0.3.0");
|
|
558
|
-
Object.assign(versions, { gradle: data.gradle, java: data.java });
|
|
559
|
-
} finally {
|
|
560
|
-
await rm(tmp, { recursive: true, force: true });
|
|
766
|
+
Object.assign(versions, {gradle: data.gradle, java: data.java});
|
|
561
767
|
}
|
|
562
|
-
|
|
768
|
+
finally
|
|
769
|
+
{
|
|
770
|
+
await rm(tmp, {recursive: true, force: true});
|
|
771
|
+
}
|
|
772
|
+
}
|
|
773
|
+
else if (name === 'fsharp' || name === 'csharp')
|
|
774
|
+
{
|
|
563
775
|
// .NET: the SDK, xUnit v3 on Microsoft.Testing.Platform (selected in
|
|
564
776
|
// global.json), and projects that import the generated props.
|
|
565
|
-
const extension = name ===
|
|
566
|
-
versions.dotnet = (
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
requireThat(
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
777
|
+
const extension = name === 'fsharp' ? '.fsproj' : '.csproj';
|
|
778
|
+
versions.dotnet = (
|
|
779
|
+
await run(target.dotnet || 'dotnet', ['--version'], root)
|
|
780
|
+
).trim();
|
|
781
|
+
requireThat(major(versions.dotnet) >= 10, '.NET SDK 10+ is required');
|
|
782
|
+
const global = JSON.parse(
|
|
783
|
+
await readFile(path.join(root, 'global.json'), 'utf8').catch(
|
|
784
|
+
() => '{}',
|
|
785
|
+
),
|
|
786
|
+
);
|
|
787
|
+
requireThat(
|
|
788
|
+
global?.test?.runner === 'Microsoft.Testing.Platform',
|
|
789
|
+
'global.json must select the Microsoft.Testing.Platform test runner: { "test": { "runner": "Microsoft.Testing.Platform" } }',
|
|
790
|
+
);
|
|
791
|
+
const projects = async folder =>
|
|
792
|
+
(await readdir(path.join(root, folder)).catch(() => [])).filter(file =>
|
|
793
|
+
file.endsWith(extension),
|
|
794
|
+
);
|
|
573
795
|
const sources = await projects(sourceDir);
|
|
574
796
|
const tests = await projects(testDir);
|
|
575
|
-
requireThat(
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
requireThat(
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
797
|
+
requireThat(
|
|
798
|
+
sources.length === 1,
|
|
799
|
+
`Expected one ${extension} project in ${sourceDir}`,
|
|
800
|
+
);
|
|
801
|
+
requireThat(
|
|
802
|
+
tests.length === 1,
|
|
803
|
+
`Expected one ${extension} project in ${testDir}`,
|
|
804
|
+
);
|
|
805
|
+
const source = await readFile(
|
|
806
|
+
path.join(root, sourceDir, sources[0]),
|
|
807
|
+
'utf8',
|
|
808
|
+
);
|
|
809
|
+
const test = await readFile(path.join(root, testDir, tests[0]), 'utf8');
|
|
810
|
+
requireThat(
|
|
811
|
+
source.includes('LawSpec.Sources.props'),
|
|
812
|
+
`${sourceDir}/${sources[0]} must import LawSpec.Sources.props`,
|
|
813
|
+
);
|
|
814
|
+
requireThat(
|
|
815
|
+
test.includes('LawSpec.Tests.props'),
|
|
816
|
+
`${testDir}/${tests[0]} must import LawSpec.Tests.props`,
|
|
817
|
+
);
|
|
818
|
+
versions['xunit.v3'] = test.match(
|
|
819
|
+
/<PackageReference\s+Include="xunit\.v3"\s+Version="([^"]+)"/,
|
|
820
|
+
)?.[1];
|
|
821
|
+
requireThat(
|
|
822
|
+
versions['xunit.v3'],
|
|
823
|
+
`${testDir}/${tests[0]} must reference the xunit.v3 package`,
|
|
824
|
+
);
|
|
825
|
+
}
|
|
826
|
+
else if (name === 'swift')
|
|
827
|
+
{
|
|
584
828
|
// Swift: the toolchain (SwiftPM and Swift Testing come with it) and a
|
|
585
829
|
// package that declares the generated runtime targets under lawspec/.
|
|
586
|
-
const reported = await run(target.swift ||
|
|
587
|
-
versions.swift = reported.match(
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
requireThat(
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
830
|
+
const reported = await run(target.swift || 'swift', ['--version'], root);
|
|
831
|
+
versions.swift = reported.match(
|
|
832
|
+
/Swift version (\d+\.\d+(?:\.\d+)?)/,
|
|
833
|
+
)?.[1];
|
|
834
|
+
requireThat(
|
|
835
|
+
versions.swift,
|
|
836
|
+
'Cannot determine the Swift version (swift --version)',
|
|
837
|
+
);
|
|
838
|
+
const manifest = await readFile(
|
|
839
|
+
path.join(root, 'Package.swift'),
|
|
840
|
+
'utf8',
|
|
841
|
+
).catch(() => '');
|
|
842
|
+
requireThat(manifest, 'Missing Package.swift');
|
|
843
|
+
for (const module of ['LawSpecRuntime', 'LawSpecTesting'])
|
|
844
|
+
requireThat(
|
|
845
|
+
manifest.includes(`"lawspec/${module}"`),
|
|
846
|
+
`Package.swift must declare the target ${module} at lawspec/${module}, as lawspec init does`,
|
|
847
|
+
);
|
|
848
|
+
}
|
|
849
|
+
else if (['erlang', 'elixir', 'gleam'].includes(name))
|
|
850
|
+
{
|
|
595
851
|
const beam = await beamDoctor(target, root, plannedArtifacts, run);
|
|
596
852
|
Object.assign(versions, beam.versions);
|
|
597
853
|
coverage = beam.coverage;
|
|
598
|
-
}
|
|
854
|
+
}
|
|
855
|
+
else throw new Error(`Unsupported target ${name}`);
|
|
599
856
|
for (const dependency of Object.keys(profiles[name] || {}))
|
|
600
857
|
requireThat(
|
|
601
858
|
supported(name, dependency, versions[dependency]),
|
|
602
|
-
`${dependency} ${versions[dependency] ||
|
|
859
|
+
`${dependency} ${versions[dependency] || '(unknown)'} is outside the verified ${name} profile [${profiles[name][dependency].join(', ')})`,
|
|
603
860
|
);
|
|
604
|
-
return {
|
|
605
|
-
}
|
|
861
|
+
return {target: name, ok: true, versions, ...(coverage ? {coverage} : {})};
|
|
862
|
+
}
|
|
863
|
+
catch (error)
|
|
864
|
+
{
|
|
606
865
|
return {
|
|
607
866
|
target: name,
|
|
608
867
|
ok: false,
|