@digicatapult/dtdl-parser 0.0.9 → 0.0.10

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.
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "mainAssemblyName": "DTDLParserJSInterop.dll",
3
3
  "resources": {
4
- "hash": "sha256-pS2isxsHeDi3zNtNpTkvz56+EitA16di1WMyupkkbBI=",
4
+ "hash": "sha256-TCb+gdR4wD9I5Ho3Cfz2AEySad5W57YKQQn3y82dkU4=",
5
5
  "jsModuleNative": {
6
6
  "dotnet.native.js": "sha256-79LdZogK41buIci0KtOWmQvQc2swMI3jvDQCoN23NBM="
7
7
  },
@@ -181,10 +181,10 @@
181
181
  "mscorlib.wasm": "sha256-KvqZaNpjwhrOuzE4b4aMFsI+VUTyiWfoDI4zn4l9BM8=",
182
182
  "netstandard.wasm": "sha256-v+s7sWxtOM6bnOvC0jFrtnm6uMfbDymwl2nHNgbS2LM=",
183
183
  "System.Private.CoreLib.wasm": "sha256-pklll63uFQoY6vaD3vbluS9osYiJWLLLmob1yHFgepI=",
184
- "DTDLParserJSInterop.wasm": "sha256-TgZBZ8steA3llk7NE8rGQvzlh5c6+Y7VaqvkuUjc1/g="
184
+ "DTDLParserJSInterop.wasm": "sha256-s2HRbKevr+9HNtqfgQqcb4wtap0lhibEu+mEHv+gpPo="
185
185
  },
186
186
  "pdb": {
187
- "DTDLParserJSInterop.pdb": "sha256-ySOOWsKiqmgdLPRxWO6IhseZBSt39He+ph+zlcl6qMk="
187
+ "DTDLParserJSInterop.pdb": "sha256-/RowHo8egn7n/kS6BPLbcWjE/cssFY5Yzy1B40xBELE="
188
188
  },
189
189
  "vfs": {
190
190
  "runtimeconfig.bin": {
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@digicatapult/dtdl-parser",
3
- "version": "0.0.9",
3
+ "version": "0.0.10",
4
4
  "description": "JS tool to parse DTDL defined Ontologies",
5
- "main": "build/index.js",
5
+ "main": "build/src/index.js",
6
6
  "type": "module",
7
7
  "scripts": {
8
8
  "test": "NODE_ENV=test ./node_modules/.bin/mocha --config ./test/mocharc.json ./src/**/*.test.ts",
9
- "build": "swc ./src ./package.json -d build --strip-leading-paths --copy-files && npm run interop:build",
9
+ "build": "swc ./src ./package.json -d build --copy-files && npm run interop:build",
10
10
  "interop:debug": "dotnet build interop",
11
11
  "interop:build": "dotnet build interop --configuration Release",
12
12
  "clean": "rimraf -rf ./build",
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/error.ts"],"sourcesContent":["import { ModelingException, ParsingException, ResolutionException } from '../interop/DtdlErr.js'\n\nconst { error } = console\n\nconst isParsingEx = (exception: ModelingException): exception is ParsingException => {\n return exception.ExceptionKind === 'Parsing'\n}\n\nconst isResolutionEx = (exception: ModelingException): exception is ResolutionException => {\n return exception.ExceptionKind === 'Resolution'\n}\n\nexport const isResolutionException = (err: unknown) => {\n if (!(err instanceof Error)) return false\n return isResolutionEx(JSON.parse(err.message))\n}\n\nexport const errorHandler = (err: unknown) => {\n if (!(err instanceof Error)) return error(`Unexpected error: ${err}`)\n\n const exception = JSON.parse(err.message) as ModelingException\n\n if (!(isParsingEx(exception) || isResolutionEx(exception))) error('Unknown exception type')\n error(exception)\n}\n"],"names":["error","console","isParsingEx","exception","ExceptionKind","isResolutionEx","isResolutionException","err","Error","JSON","parse","message","errorHandler"],"mappings":"AAEA,GAAM,CAAEA,MAAAA,CAAK,CAAE,CAAGC,QAEZC,EAAc,AAACC,GACZA,AAA4B,YAA5BA,EAAUC,aAAa,CAG1BC,EAAiB,AAACF,GACfA,AAA4B,eAA5BA,EAAUC,aAAa,AAGhC,QAAO,MAAME,sBAAwB,AAACC,GACpC,AAAMA,aAAeC,OACdH,EAAeI,KAAKC,KAAK,CAACH,EAAII,OAAO,EAC7C,AAED,QAAO,MAAMC,aAAe,AAACL,IAC3B,GAAI,CAAEA,CAAAA,aAAeC,KAAI,EAAI,OAAOR,EAAM,CAAC,kBAAkB,EAAEO,EAAI,CAAC,EAEpE,IAAMJ,EAAYM,KAAKC,KAAK,CAACH,EAAII,OAAO,EAElCT,EAAYC,IAAcE,EAAeF,IAAaH,EAAM,0BAClEA,EAAMG,EACR,CAAC"}
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/index.ts"],"sourcesContent":["import fs from 'fs'\nimport path from 'path'\nimport { DtdlObjectModel, InterfaceInfo } from '../interop/DtdlOm.js'\nimport { errorHandler, isResolutionException } from './error.js'\nimport { Parser, getInterop } from './interop.js'\n\nconst { log, error } = console\n\nexport const searchForJsonFiles = (directory: string): string[] => {\n if (!fs.existsSync(directory)) {\n error(`'${directory}' not a valid filepath`)\n return []\n }\n\n return fs\n .readdirSync(directory)\n .map((file) => path.join(directory, file))\n .reduce((jsonFiles, fullPath) => {\n if (fs.statSync(fullPath).isDirectory()) {\n return jsonFiles.concat(searchForJsonFiles(fullPath)) //recursive\n } else if (path.extname(fullPath) === '.json') {\n return jsonFiles.concat(fullPath)\n }\n return jsonFiles\n }, [] as string[])\n}\n\nconst readJsonFile = (filepath: string): unknown | null => {\n try {\n const file = fs.readFileSync(filepath, 'utf-8')\n const json = JSON.parse(file)\n return json\n } catch (err) {\n error(`Invalid JSON at '${filepath}'`)\n error(err)\n return null\n }\n}\n\nconst combineJson = (filepaths: string[]) => {\n const combinedJson: unknown[] = []\n\n for (const filepath of filepaths) {\n const json = readJsonFile(filepath)\n if (json === null) {\n return null // exit on any error\n }\n combinedJson.push(json)\n }\n\n return combinedJson\n}\n\nconst validateFile = (filepath: string, parserModule: Parser, incResolutionException: boolean): boolean => {\n try {\n const file = fs.readFileSync(filepath, 'utf-8')\n parserModule.parse(file)\n log(`Successfully validated '${filepath}'`)\n return true\n } catch (err) {\n if (!incResolutionException && isResolutionException(err)) {\n // ignore resolution exception\n log(`Successfully validated '${filepath}'`)\n return true\n }\n error(`Error parsing '${filepath}'`)\n errorHandler(err)\n return false\n }\n}\n\nconst parseDtdl = (json: unknown[], parserModule: Parser): DtdlObjectModel | null => {\n try {\n const model = JSON.parse(parserModule.parse(JSON.stringify(json))) as DtdlObjectModel\n log(`Successfully parsed`)\n return model\n } catch (err) {\n error(`Error parsing`)\n errorHandler(err)\n return null\n }\n}\n\nexport const validateDirectories = (directory: string, parser: Parser, incResolutionException: boolean): boolean => {\n log(`${parser.parserVersion()}\\n`)\n log(`Validating DTDL at: '${directory}'`)\n\n const filepaths = searchForJsonFiles(directory)\n if (filepaths.length < 1) return false\n\n log(`Found ${filepaths.length} files:`)\n log(filepaths)\n\n for (const filepath of filepaths) {\n const isValid = validateFile(filepath, parser, incResolutionException)\n if (!isValid) return false // stop validating if error\n }\n\n log(`All files validated!\\n`)\n return true\n}\n\nexport const parseDirectories = (directory: string, parser: Parser): DtdlObjectModel | null => {\n log(`${parser.parserVersion()}\\n`)\n log(`Parsing DTDL at: '${directory}'`)\n\n const filepaths = searchForJsonFiles(directory)\n if (filepaths.length < 1) return null\n\n log(`Found ${filepaths.length} files:`)\n log(filepaths)\n\n const fullJson = combineJson(filepaths)\n if (fullJson === null) return null\n\n const fullModel = parseDtdl(fullJson, parser)\n if (fullModel === null) return null\n\n log(`All files parsed!\\n`)\n log(`Entities:`)\n log(Object.keys(fullModel))\n\n // Example type guard\n const interfaces: InterfaceInfo[] = Object.values(fullModel).filter(\n (value): value is InterfaceInfo => value.EntityKind === 'Interface'\n )\n log(`Number of interfaces: ${interfaces.length}`)\n\n return fullModel\n}\n\nexport { errorHandler, getInterop, isResolutionException }\n"],"names":["fs","path","errorHandler","isResolutionException","getInterop","log","error","console","searchForJsonFiles","directory","existsSync","readdirSync","map","file","join","reduce","jsonFiles","fullPath","statSync","isDirectory","concat","extname","readJsonFile","filepath","readFileSync","JSON","parse","err","combineJson","filepaths","combinedJson","json","push","validateFile","parserModule","incResolutionException","parseDtdl","model","stringify","validateDirectories","parser","parserVersion","length","parseDirectories","fullJson","fullModel","Object","keys","interfaces","values","filter","value","EntityKind"],"mappings":"AAAA,OAAOA,MAAQ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AUa,MAAM,CAAC,OAAO,CAAC,EACtCrC,EAAIwB,GAEJ,IAAMe,EAAWhB,EAAYC,GAC7B,GAAIe,AAAa,OAAbA,EAAmB,OAAO,KAE9B,IAAMC,EAAYT,EAAUQ,EAAUJ,GACtC,GAAIK,AAAc,OAAdA,EAAoB,OAAO,KAE/BxC,EAAI,CAAC;AAAmB,CAAC,EACzBA,EAAI,aACJA,EAAIyC,OAAOC,IAAI,CAACF,IAGhB,IAAMG,EAA8BF,OAAOG,MAAM,CAACJ,GAAWK,MAAM,CACjE,AAACC,GAAkCA,AAAqB,cAArBA,EAAMC,UAAU,EAIrD,OAFA/C,EAAI,CAAC,sBAAsB,EAAE2C,EAAWN,MAAM,CAAC,CAAC,EAEzCG,CACT,CAAC,QAEQ3C,KAAAA,YAAY,CAAEE,KAAAA,UAAU,CAAED,KAAAA,qBAAqB"}
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/interop.ts"],"sourcesContent":["export const getInterop = async (): Promise<Parser> => {\n const module = await import('../interop/modelParser.js')\n return module as Parser\n}\n\nexport interface Parser {\n parse: (file: string) => string\n parserVersion: () => string\n}\n"],"names":["getInterop"],"mappings":"AAAA,OAAO,MAAMA,WAAa,SACT,MAAM,MAAM,CAAC,4BAE7B"}
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@digicatapult/dtdl-parser",
3
- "version": "0.0.9",
3
+ "version": "0.0.10",
4
4
  "description": "JS tool to parse DTDL defined Ontologies",
5
- "main": "build/index.js",
5
+ "main": "build/src/index.js",
6
6
  "type": "module",
7
7
  "scripts": {
8
8
  "test": "NODE_ENV=test ./node_modules/.bin/mocha --config ./test/mocharc.json ./src/**/*.test.ts",
9
- "build": "swc ./src ./package.json -d build --strip-leading-paths --copy-files && npm run interop:build",
9
+ "build": "swc ./src ./package.json -d build --copy-files && npm run interop:build",
10
10
  "interop:debug": "dotnet build interop",
11
11
  "interop:build": "dotnet build interop --configuration Release",
12
12
  "clean": "rimraf -rf ./build",
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/error.ts"],"sourcesContent":["import { ModelingException, ParsingException, ResolutionException } from '../interop/DtdlErr.js'\n\nconst { error } = console\n\nconst isParsingEx = (exception: ModelingException): exception is ParsingException => {\n return exception.ExceptionKind === 'Parsing'\n}\n\nconst isResolutionEx = (exception: ModelingException): exception is ResolutionException => {\n return exception.ExceptionKind === 'Resolution'\n}\n\nexport const isResolutionException = (err: unknown) => {\n if (!(err instanceof Error)) return false\n return isResolutionEx(JSON.parse(err.message))\n}\n\nexport const errorHandler = (err: unknown) => {\n if (!(err instanceof Error)) return error(`Unexpected error: ${err}`)\n\n const exception = JSON.parse(err.message) as ModelingException\n\n if (!(isParsingEx(exception) || isResolutionEx(exception))) error('Unknown exception type')\n error(exception)\n}\n"],"names":["error","console","isParsingEx","exception","ExceptionKind","isResolutionEx","isResolutionException","err","Error","JSON","parse","message","errorHandler"],"mappings":"AAEA,GAAM,CAAEA,MAAAA,CAAK,CAAE,CAAGC,QAEZC,EAAc,AAACC,GACZA,AAA4B,YAA5BA,EAAUC,aAAa,CAG1BC,EAAiB,AAACF,GACfA,AAA4B,eAA5BA,EAAUC,aAAa,AAGhC,QAAO,MAAME,sBAAwB,AAACC,GACpC,AAAMA,aAAeC,OACdH,EAAeI,KAAKC,KAAK,CAACH,EAAII,OAAO,EAC7C,AAED,QAAO,MAAMC,aAAe,AAACL,IAC3B,GAAI,CAAEA,CAAAA,aAAeC,KAAI,EAAI,OAAOR,EAAM,CAAC,kBAAkB,EAAEO,EAAI,CAAC,EAEpE,IAAMJ,EAAYM,KAAKC,KAAK,CAACH,EAAII,OAAO,EAElCT,EAAYC,IAAcE,EAAeF,IAAaH,EAAM,0BAClEA,EAAMG,EACR,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/index.ts"],"sourcesContent":["import fs from 'fs'\nimport path from 'path'\nimport { DtdlObjectModel, InterfaceInfo } from '../interop/DtdlOm.js'\nimport { errorHandler, isResolutionException } from './error.js'\nimport { Parser, getInterop } from './interop.js'\n\nconst { log, error } = console\n\nexport const searchForJsonFiles = (directory: string): string[] => {\n if (!fs.existsSync(directory)) {\n error(`'${directory}' not a valid filepath`)\n return []\n }\n\n return fs\n .readdirSync(directory)\n .map((file) => path.join(directory, file))\n .reduce((jsonFiles, fullPath) => {\n if (fs.statSync(fullPath).isDirectory()) {\n return jsonFiles.concat(searchForJsonFiles(fullPath)) //recursive\n } else if (path.extname(fullPath) === '.json') {\n return jsonFiles.concat(fullPath)\n }\n return jsonFiles\n }, [] as string[])\n}\n\nconst readJsonFile = (filepath: string): unknown | null => {\n try {\n const file = fs.readFileSync(filepath, 'utf-8')\n const json = JSON.parse(file)\n return json\n } catch (err) {\n error(`Invalid JSON at '${filepath}'`)\n error(err)\n return null\n }\n}\n\nconst combineJson = (filepaths: string[]) => {\n const combinedJson: unknown[] = []\n\n for (const filepath of filepaths) {\n const json = readJsonFile(filepath)\n if (json === null) {\n return null // exit on any error\n }\n combinedJson.push(json)\n }\n\n return combinedJson\n}\n\nconst validateFile = (filepath: string, parserModule: Parser, incResolutionException: boolean): boolean => {\n try {\n const file = fs.readFileSync(filepath, 'utf-8')\n parserModule.parse(file)\n log(`Successfully validated '${filepath}'`)\n return true\n } catch (err) {\n if (!incResolutionException && isResolutionException(err)) {\n // ignore resolution exception\n log(`Successfully validated '${filepath}'`)\n return true\n }\n error(`Error parsing '${filepath}'`)\n errorHandler(err)\n return false\n }\n}\n\nconst parseDtdl = (json: unknown[], parserModule: Parser): DtdlObjectModel | null => {\n try {\n const model = JSON.parse(parserModule.parse(JSON.stringify(json))) as DtdlObjectModel\n log(`Successfully parsed`)\n return model\n } catch (err) {\n error(`Error parsing`)\n errorHandler(err)\n return null\n }\n}\n\nexport const validateDirectories = (directory: string, parser: Parser, incResolutionException: boolean): boolean => {\n log(`${parser.parserVersion()}\\n`)\n log(`Validating DTDL at: '${directory}'`)\n\n const filepaths = searchForJsonFiles(directory)\n if (filepaths.length < 1) return false\n\n log(`Found ${filepaths.length} files:`)\n log(filepaths)\n\n for (const filepath of filepaths) {\n const isValid = validateFile(filepath, parser, incResolutionException)\n if (!isValid) return false // stop validating if error\n }\n\n log(`All files validated!\\n`)\n return true\n}\n\nexport const parseDirectories = (directory: string, parser: Parser): DtdlObjectModel | null => {\n log(`${parser.parserVersion()}\\n`)\n log(`Parsing DTDL at: '${directory}'`)\n\n const filepaths = searchForJsonFiles(directory)\n if (filepaths.length < 1) return null\n\n log(`Found ${filepaths.length} files:`)\n log(filepaths)\n\n const fullJson = combineJson(filepaths)\n if (fullJson === null) return null\n\n const fullModel = parseDtdl(fullJson, parser)\n if (fullModel === null) return null\n\n log(`All files parsed!\\n`)\n log(`Entities:`)\n log(Object.keys(fullModel))\n\n // Example type guard\n const interfaces: InterfaceInfo[] = Object.values(fullModel).filter(\n (value): value is InterfaceInfo => value.EntityKind === 'Interface'\n )\n log(`Number of interfaces: ${interfaces.length}`)\n\n return fullModel\n}\n\nexport { errorHandler, getInterop, isResolutionException }\n"],"names":["fs","path","errorHandler","isResolutionException","getInterop","log","error","console","searchForJsonFiles","directory","existsSync","readdirSync","map","file","join","reduce","jsonFiles","fullPath","statSync","isDirectory","concat","extname","readJsonFile","filepath","readFileSync","JSON","parse","err","combineJson","filepaths","combinedJson","json","push","validateFile","parserModule","incResolutionException","parseDtdl","model","stringify","validateDirectories","parser","parserVersion","length","parseDirectories","fullJson","fullModel","Object","keys","interfaces","values","filter","value","EntityKind"],"mappings":"AAAA,OAAOA,MAAQ,IAAI,AACnB,QAAOC,MAAU,MAAM,AAEvB,QAASC,gBAAAA,CAAY,CAAEC,yBAAAA,CAAqB,KAAQ,YAAY,AAChE,QAAiBC,cAAAA,CAAU,KAAQ,cAAc,CAEjD,GAAM,CAAEC,IAAAA,CAAG,CAAEC,MAAAA,CAAK,CAAE,CAAGC,OAEvB,QAAO,MAAMC,mBAAqB,AAACC,GACjC,AAAKT,EAAGU,UAAU,CAACD,GAKZT,EAC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,IAAMG,EAA8BF,OAAOG,MAAM,CAACJ,GAAWK,MAAM,CACjE,AAACC,GAAkCA,AAAqB,cAArBA,EAAMC,UAAU,EAIrD,OAFA/C,EAAI,CAAC,sBAAsB,EAAE2C,EAAWN,MAAM,CAAC,CAAC,EAEzCG,CACT,CAAC,QAEQ3C,KAAAA,YAAY,CAAEE,KAAAA,UAAU,CAAED,KAAAA,qBAAqB"}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/interop.ts"],"sourcesContent":["export const getInterop = async (): Promise<Parser> => {\n const module = await import('../interop/modelParser.js')\n return module as Parser\n}\n\nexport interface Parser {\n parse: (file: string) => string\n parserVersion: () => string\n}\n"],"names":["getInterop"],"mappings":"AAAA,OAAO,MAAMA,WAAa,SACT,MAAM,MAAM,CAAC,4BAE7B"}
File without changes
File without changes
File without changes