@digicatapult/dtdl-parser 0.0.4 → 0.0.7
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/README.md +29 -1
- package/build/interop/.stamp +0 -0
- package/build/interop/DTDLParserJSInterop.runtimeconfig.json +42 -0
- package/build/interop/_framework/DTDLParser.wasm +0 -0
- package/build/interop/_framework/DTDLParserJSInterop.pdb +0 -0
- package/build/interop/_framework/DTDLParserJSInterop.wasm +0 -0
- package/build/interop/_framework/Microsoft.CSharp.wasm +0 -0
- package/build/interop/_framework/Microsoft.VisualBasic.Core.wasm +0 -0
- package/build/interop/_framework/Microsoft.VisualBasic.wasm +0 -0
- package/build/interop/_framework/Microsoft.Win32.Primitives.wasm +0 -0
- package/build/interop/_framework/Microsoft.Win32.Registry.wasm +0 -0
- package/build/interop/_framework/System.AppContext.wasm +0 -0
- package/build/interop/_framework/System.Buffers.wasm +0 -0
- package/build/interop/_framework/System.Collections.Concurrent.wasm +0 -0
- package/build/interop/_framework/System.Collections.Immutable.wasm +0 -0
- package/build/interop/_framework/System.Collections.NonGeneric.wasm +0 -0
- package/build/interop/_framework/System.Collections.Specialized.wasm +0 -0
- package/build/interop/_framework/System.Collections.wasm +0 -0
- package/build/interop/_framework/System.ComponentModel.Annotations.wasm +0 -0
- package/build/interop/_framework/System.ComponentModel.DataAnnotations.wasm +0 -0
- package/build/interop/_framework/System.ComponentModel.EventBasedAsync.wasm +0 -0
- package/build/interop/_framework/System.ComponentModel.Primitives.wasm +0 -0
- package/build/interop/_framework/System.ComponentModel.TypeConverter.wasm +0 -0
- package/build/interop/_framework/System.ComponentModel.wasm +0 -0
- package/build/interop/_framework/System.Configuration.wasm +0 -0
- package/build/interop/_framework/System.Console.wasm +0 -0
- package/build/interop/_framework/System.Core.wasm +0 -0
- package/build/interop/_framework/System.Data.Common.wasm +0 -0
- package/build/interop/_framework/System.Data.DataSetExtensions.wasm +0 -0
- package/build/interop/_framework/System.Data.wasm +0 -0
- package/build/interop/_framework/System.Diagnostics.Contracts.wasm +0 -0
- package/build/interop/_framework/System.Diagnostics.Debug.wasm +0 -0
- package/build/interop/_framework/System.Diagnostics.DiagnosticSource.wasm +0 -0
- package/build/interop/_framework/System.Diagnostics.FileVersionInfo.wasm +0 -0
- package/build/interop/_framework/System.Diagnostics.Process.wasm +0 -0
- package/build/interop/_framework/System.Diagnostics.StackTrace.wasm +0 -0
- package/build/interop/_framework/System.Diagnostics.TextWriterTraceListener.wasm +0 -0
- package/build/interop/_framework/System.Diagnostics.Tools.wasm +0 -0
- package/build/interop/_framework/System.Diagnostics.TraceSource.wasm +0 -0
- package/build/interop/_framework/System.Diagnostics.Tracing.wasm +0 -0
- package/build/interop/_framework/System.Drawing.Primitives.wasm +0 -0
- package/build/interop/_framework/System.Drawing.wasm +0 -0
- package/build/interop/_framework/System.Dynamic.Runtime.wasm +0 -0
- package/build/interop/_framework/System.Formats.Asn1.wasm +0 -0
- package/build/interop/_framework/System.Formats.Tar.wasm +0 -0
- package/build/interop/_framework/System.Globalization.Calendars.wasm +0 -0
- package/build/interop/_framework/System.Globalization.Extensions.wasm +0 -0
- package/build/interop/_framework/System.Globalization.wasm +0 -0
- package/build/interop/_framework/System.IO.Compression.Brotli.wasm +0 -0
- package/build/interop/_framework/System.IO.Compression.FileSystem.wasm +0 -0
- package/build/interop/_framework/System.IO.Compression.ZipFile.wasm +0 -0
- package/build/interop/_framework/System.IO.Compression.wasm +0 -0
- package/build/interop/_framework/System.IO.FileSystem.AccessControl.wasm +0 -0
- package/build/interop/_framework/System.IO.FileSystem.DriveInfo.wasm +0 -0
- package/build/interop/_framework/System.IO.FileSystem.Primitives.wasm +0 -0
- package/build/interop/_framework/System.IO.FileSystem.Watcher.wasm +0 -0
- package/build/interop/_framework/System.IO.FileSystem.wasm +0 -0
- package/build/interop/_framework/System.IO.IsolatedStorage.wasm +0 -0
- package/build/interop/_framework/System.IO.MemoryMappedFiles.wasm +0 -0
- package/build/interop/_framework/System.IO.Pipes.AccessControl.wasm +0 -0
- package/build/interop/_framework/System.IO.Pipes.wasm +0 -0
- package/build/interop/_framework/System.IO.UnmanagedMemoryStream.wasm +0 -0
- package/build/interop/_framework/System.IO.wasm +0 -0
- package/build/interop/_framework/System.Linq.Expressions.wasm +0 -0
- package/build/interop/_framework/System.Linq.Parallel.wasm +0 -0
- package/build/interop/_framework/System.Linq.Queryable.wasm +0 -0
- package/build/interop/_framework/System.Linq.wasm +0 -0
- package/build/interop/_framework/System.Memory.wasm +0 -0
- package/build/interop/_framework/System.Net.Http.Json.wasm +0 -0
- package/build/interop/_framework/System.Net.Http.wasm +0 -0
- package/build/interop/_framework/System.Net.HttpListener.wasm +0 -0
- package/build/interop/_framework/System.Net.Mail.wasm +0 -0
- package/build/interop/_framework/System.Net.NameResolution.wasm +0 -0
- package/build/interop/_framework/System.Net.NetworkInformation.wasm +0 -0
- package/build/interop/_framework/System.Net.Ping.wasm +0 -0
- package/build/interop/_framework/System.Net.Primitives.wasm +0 -0
- package/build/interop/_framework/System.Net.Quic.wasm +0 -0
- package/build/interop/_framework/System.Net.Requests.wasm +0 -0
- package/build/interop/_framework/System.Net.Security.wasm +0 -0
- package/build/interop/_framework/System.Net.ServicePoint.wasm +0 -0
- package/build/interop/_framework/System.Net.Sockets.wasm +0 -0
- package/build/interop/_framework/System.Net.WebClient.wasm +0 -0
- package/build/interop/_framework/System.Net.WebHeaderCollection.wasm +0 -0
- package/build/interop/_framework/System.Net.WebProxy.wasm +0 -0
- package/build/interop/_framework/System.Net.WebSockets.Client.wasm +0 -0
- package/build/interop/_framework/System.Net.WebSockets.wasm +0 -0
- package/build/interop/_framework/System.Net.wasm +0 -0
- package/build/interop/_framework/System.Numerics.Vectors.wasm +0 -0
- package/build/interop/_framework/System.Numerics.wasm +0 -0
- package/build/interop/_framework/System.ObjectModel.wasm +0 -0
- package/build/interop/_framework/System.Private.CoreLib.wasm +0 -0
- package/build/interop/_framework/System.Private.DataContractSerialization.wasm +0 -0
- package/build/interop/_framework/System.Private.Uri.wasm +0 -0
- package/build/interop/_framework/System.Private.Xml.Linq.wasm +0 -0
- package/build/interop/_framework/System.Private.Xml.wasm +0 -0
- package/build/interop/_framework/System.Reflection.DispatchProxy.wasm +0 -0
- package/build/interop/_framework/System.Reflection.Emit.ILGeneration.wasm +0 -0
- package/build/interop/_framework/System.Reflection.Emit.Lightweight.wasm +0 -0
- package/build/interop/_framework/System.Reflection.Emit.wasm +0 -0
- package/build/interop/_framework/System.Reflection.Extensions.wasm +0 -0
- package/build/interop/_framework/System.Reflection.Metadata.wasm +0 -0
- package/build/interop/_framework/System.Reflection.Primitives.wasm +0 -0
- package/build/interop/_framework/System.Reflection.TypeExtensions.wasm +0 -0
- package/build/interop/_framework/System.Reflection.wasm +0 -0
- package/build/interop/_framework/System.Resources.Reader.wasm +0 -0
- package/build/interop/_framework/System.Resources.ResourceManager.wasm +0 -0
- package/build/interop/_framework/System.Resources.Writer.wasm +0 -0
- package/build/interop/_framework/System.Runtime.CompilerServices.Unsafe.wasm +0 -0
- package/build/interop/_framework/System.Runtime.CompilerServices.VisualC.wasm +0 -0
- package/build/interop/_framework/System.Runtime.Extensions.wasm +0 -0
- package/build/interop/_framework/System.Runtime.Handles.wasm +0 -0
- package/build/interop/_framework/System.Runtime.InteropServices.JavaScript.wasm +0 -0
- package/build/interop/_framework/System.Runtime.InteropServices.RuntimeInformation.wasm +0 -0
- package/build/interop/_framework/System.Runtime.InteropServices.wasm +0 -0
- package/build/interop/_framework/System.Runtime.Intrinsics.wasm +0 -0
- package/build/interop/_framework/System.Runtime.Loader.wasm +0 -0
- package/build/interop/_framework/System.Runtime.Numerics.wasm +0 -0
- package/build/interop/_framework/System.Runtime.Serialization.Formatters.wasm +0 -0
- package/build/interop/_framework/System.Runtime.Serialization.Json.wasm +0 -0
- package/build/interop/_framework/System.Runtime.Serialization.Primitives.wasm +0 -0
- package/build/interop/_framework/System.Runtime.Serialization.Xml.wasm +0 -0
- package/build/interop/_framework/System.Runtime.Serialization.wasm +0 -0
- package/build/interop/_framework/System.Runtime.wasm +0 -0
- package/build/interop/_framework/System.Security.AccessControl.wasm +0 -0
- package/build/interop/_framework/System.Security.Claims.wasm +0 -0
- package/build/interop/_framework/System.Security.Cryptography.Algorithms.wasm +0 -0
- package/build/interop/_framework/System.Security.Cryptography.Cng.wasm +0 -0
- package/build/interop/_framework/System.Security.Cryptography.Csp.wasm +0 -0
- package/build/interop/_framework/System.Security.Cryptography.Encoding.wasm +0 -0
- package/build/interop/_framework/System.Security.Cryptography.OpenSsl.wasm +0 -0
- package/build/interop/_framework/System.Security.Cryptography.Primitives.wasm +0 -0
- package/build/interop/_framework/System.Security.Cryptography.X509Certificates.wasm +0 -0
- package/build/interop/_framework/System.Security.Cryptography.wasm +0 -0
- package/build/interop/_framework/System.Security.Principal.Windows.wasm +0 -0
- package/build/interop/_framework/System.Security.Principal.wasm +0 -0
- package/build/interop/_framework/System.Security.SecureString.wasm +0 -0
- package/build/interop/_framework/System.Security.wasm +0 -0
- package/build/interop/_framework/System.ServiceModel.Web.wasm +0 -0
- package/build/interop/_framework/System.ServiceProcess.wasm +0 -0
- package/build/interop/_framework/System.Text.Encoding.CodePages.wasm +0 -0
- package/build/interop/_framework/System.Text.Encoding.Extensions.wasm +0 -0
- package/build/interop/_framework/System.Text.Encoding.wasm +0 -0
- package/build/interop/_framework/System.Text.Encodings.Web.wasm +0 -0
- package/build/interop/_framework/System.Text.Json.wasm +0 -0
- package/build/interop/_framework/System.Text.RegularExpressions.wasm +0 -0
- package/build/interop/_framework/System.Threading.Channels.wasm +0 -0
- package/build/interop/_framework/System.Threading.Overlapped.wasm +0 -0
- package/build/interop/_framework/System.Threading.Tasks.Dataflow.wasm +0 -0
- package/build/interop/_framework/System.Threading.Tasks.Extensions.wasm +0 -0
- package/build/interop/_framework/System.Threading.Tasks.Parallel.wasm +0 -0
- package/build/interop/_framework/System.Threading.Tasks.wasm +0 -0
- package/build/interop/_framework/System.Threading.Thread.wasm +0 -0
- package/build/interop/_framework/System.Threading.ThreadPool.wasm +0 -0
- package/build/interop/_framework/System.Threading.Timer.wasm +0 -0
- package/build/interop/_framework/System.Threading.wasm +0 -0
- package/build/interop/_framework/System.Transactions.Local.wasm +0 -0
- package/build/interop/_framework/System.Transactions.wasm +0 -0
- package/build/interop/_framework/System.ValueTuple.wasm +0 -0
- package/build/interop/_framework/System.Web.HttpUtility.wasm +0 -0
- package/build/interop/_framework/System.Web.wasm +0 -0
- package/build/interop/_framework/System.Windows.wasm +0 -0
- package/build/interop/_framework/System.Xml.Linq.wasm +0 -0
- package/build/interop/_framework/System.Xml.ReaderWriter.wasm +0 -0
- package/build/interop/_framework/System.Xml.Serialization.wasm +0 -0
- package/build/interop/_framework/System.Xml.XDocument.wasm +0 -0
- package/build/interop/_framework/System.Xml.XPath.XDocument.wasm +0 -0
- package/build/interop/_framework/System.Xml.XPath.wasm +0 -0
- package/build/interop/_framework/System.Xml.XmlDocument.wasm +0 -0
- package/build/interop/_framework/System.Xml.XmlSerializer.wasm +0 -0
- package/build/interop/_framework/System.Xml.wasm +0 -0
- package/build/interop/_framework/System.wasm +0 -0
- package/build/interop/_framework/WindowsBase.wasm +0 -0
- package/build/interop/_framework/blazor.boot.json +197 -0
- package/build/interop/_framework/dotnet.js +4 -0
- package/build/interop/_framework/dotnet.js.map +1 -0
- package/build/interop/_framework/dotnet.native.js +17 -0
- package/build/interop/_framework/dotnet.native.wasm +0 -0
- package/build/interop/_framework/dotnet.runtime.js +4 -0
- package/build/interop/_framework/dotnet.runtime.js.map +1 -0
- package/build/interop/_framework/mscorlib.wasm +0 -0
- package/build/interop/_framework/netstandard.wasm +0 -0
- package/build/interop/_framework/supportFiles/0_runtimeconfig.bin +1 -0
- package/build/interop/package.json +1 -0
- package/build/package.json +62 -0
- package/build/src/error.js +2 -0
- package/build/src/error.js.map +1 -0
- package/build/src/index.js +6 -0
- package/build/src/index.js.map +1 -0
- package/build/src/interop.js +2 -0
- package/build/src/interop.js.map +1 -0
- package/package.json +7 -2
- package/.depcheckrc +0 -6
- package/.github/CODEOWNERS +0 -4
- package/.github/workflows/release.yml +0 -211
- package/.github/workflows/test.yml +0 -87
- package/.prettierrc +0 -9
- package/.swcrc +0 -32
- package/dtdl/error/error.json +0 -11
- package/dtdl/simple/simple.json +0 -9
- package/eslint.config.mjs +0 -52
- package/interop/DTDLParserJSInterop.csproj +0 -26
- package/interop/DtdlErr.d.ts +0 -26
- package/interop/DtdlOm.d.ts +0 -372
- package/interop/LICENSE +0 -21
- package/interop/ModelParserInterop.cs +0 -19
- package/interop/README.md +0 -1
- package/interop/runtimeconfig.template.json +0 -11
- package/src/__tests__/index.test.ts +0 -119
- package/src/error.ts +0 -25
- package/src/interop.ts +0 -9
- package/test/mocharc.json +0 -6
- package/tsconfig.json +0 -21
- /package/{interop → build/interop}/modelParser.js +0 -0
- /package/{src → build/src}/__tests__/fixtures/empty.json +0 -0
- /package/{src → build/src}/__tests__/fixtures/nested/nested.json +0 -0
package/README.md
CHANGED
|
@@ -1 +1,29 @@
|
|
|
1
|
-
# dtdl-parser
|
|
1
|
+
# dtdl-parser
|
|
2
|
+
|
|
3
|
+
A library for parsing and validating (DTDL)[https://learn.microsoft.com/en-us/azure/digital-twins/concepts-models] ontologies.
|
|
4
|
+
|
|
5
|
+
## Prerequisites
|
|
6
|
+
|
|
7
|
+
`node` >= 20
|
|
8
|
+
`dotnet` [CLI](https://learn.microsoft.com/en-us/dotnet/core/install/)
|
|
9
|
+
Run `dotnet workload install wasm-tools` to install `wasm-tools`
|
|
10
|
+
|
|
11
|
+
## Getting started
|
|
12
|
+
|
|
13
|
+
Install dependencies
|
|
14
|
+
|
|
15
|
+
`npm install`
|
|
16
|
+
|
|
17
|
+
Build javascript files
|
|
18
|
+
|
|
19
|
+
`npm run build`
|
|
20
|
+
|
|
21
|
+
Basic usage
|
|
22
|
+
|
|
23
|
+
```javascript
|
|
24
|
+
import { parseDirectories, validateDirectories} from "dtdl-parser"
|
|
25
|
+
import { getInterop } from 'dtdl-parser/src/interop'
|
|
26
|
+
|
|
27
|
+
const parser = await getInterop()
|
|
28
|
+
parseDirectories('../dtdl/simple', parser)
|
|
29
|
+
```
|
|
File without changes
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
{
|
|
2
|
+
"runtimeOptions": {
|
|
3
|
+
"tfm": "net8.0",
|
|
4
|
+
"includedFrameworks": [
|
|
5
|
+
{
|
|
6
|
+
"name": "Microsoft.NETCore.App",
|
|
7
|
+
"version": "8.0.10"
|
|
8
|
+
}
|
|
9
|
+
],
|
|
10
|
+
"wasmHostProperties": {
|
|
11
|
+
"perHostConfig": [
|
|
12
|
+
{
|
|
13
|
+
"name": "node",
|
|
14
|
+
"js-path": "modelParser.js",
|
|
15
|
+
"host": "nodejs"
|
|
16
|
+
}
|
|
17
|
+
],
|
|
18
|
+
"runtimeArgs": [],
|
|
19
|
+
"mainAssembly": "DTDLParserJSInterop.dll"
|
|
20
|
+
},
|
|
21
|
+
"configProperties": {
|
|
22
|
+
"Microsoft.Extensions.DependencyInjection.VerifyOpenGenericServiceTrimmability": true,
|
|
23
|
+
"System.ComponentModel.TypeConverter.EnableUnsafeBinaryFormatterInDesigntimeLicenseContextSerialization": false,
|
|
24
|
+
"System.Diagnostics.Debugger.IsSupported": false,
|
|
25
|
+
"System.Diagnostics.Tracing.EventSource.IsSupported": false,
|
|
26
|
+
"System.Globalization.Invariant": true,
|
|
27
|
+
"System.Globalization.PredefinedCulturesOnly": true,
|
|
28
|
+
"System.Reflection.Metadata.MetadataUpdater.IsSupported": false,
|
|
29
|
+
"System.Resources.ResourceManager.AllowCustomResourceTypes": false,
|
|
30
|
+
"System.Resources.UseSystemResourceKeys": true,
|
|
31
|
+
"System.Runtime.InteropServices.BuiltInComInterop.IsSupported": false,
|
|
32
|
+
"System.Runtime.InteropServices.EnableConsumingManagedCodeFromNativeHosting": false,
|
|
33
|
+
"System.Runtime.InteropServices.EnableCppCLIHostActivation": false,
|
|
34
|
+
"System.Runtime.InteropServices.Marshalling.EnableGeneratedComInterfaceComImportInterop": false,
|
|
35
|
+
"System.Runtime.Serialization.EnableUnsafeBinaryFormatterSerialization": false,
|
|
36
|
+
"System.StartupHookProvider.IsSupported": false,
|
|
37
|
+
"System.Text.Encoding.EnableUnsafeUTF7Encoding": false,
|
|
38
|
+
"System.Text.Json.JsonSerializer.IsReflectionEnabledByDefault": false,
|
|
39
|
+
"System.Threading.Thread.EnableAutoreleasePool": false
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
}
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|