diff --git a/package-lock.json b/package-lock.json index 6a4ae1f70f..46116c0614 100644 --- a/package-lock.json +++ b/package-lock.json @@ -608,6 +608,14 @@ "minimatch": "^3.0.4", "npmlog": "^4.1.2", "slash": "^1.0.0" + }, + "dependencies": { + "slash": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-1.0.0.tgz", + "integrity": "sha1-xB8vbDn8FtHNF61LXYlhFK5HDVU=", + "dev": true + } } }, "@lerna/command": { @@ -725,6 +733,12 @@ "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", "dev": true + }, + "slash": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-1.0.0.tgz", + "integrity": "sha1-xB8vbDn8FtHNF61LXYlhFK5HDVU=", + "dev": true } } }, @@ -957,6 +971,14 @@ "@lerna/symlink-dependencies": "3.14.2", "p-map": "^1.2.0", "slash": "^1.0.0" + }, + "dependencies": { + "slash": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-1.0.0.tgz", + "integrity": "sha1-xB8vbDn8FtHNF61LXYlhFK5HDVU=", + "dev": true + } } }, "@lerna/list": { @@ -1763,6 +1785,12 @@ "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", "dev": true }, + "slash": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-1.0.0.tgz", + "integrity": "sha1-xB8vbDn8FtHNF61LXYlhFK5HDVU=", + "dev": true + }, "supports-color": { "version": "5.5.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", @@ -6269,6 +6297,12 @@ "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", "dev": true + }, + "slash": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-1.0.0.tgz", + "integrity": "sha1-xB8vbDn8FtHNF61LXYlhFK5HDVU=", + "dev": true } } }, @@ -9747,6 +9781,14 @@ "json-parse-better-errors": "^1.0.1", "normalize-package-data": "^2.0.0", "slash": "^1.0.0" + }, + "dependencies": { + "slash": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-1.0.0.tgz", + "integrity": "sha1-xB8vbDn8FtHNF61LXYlhFK5HDVU=", + "dev": true + } } }, "read-package-tree": { @@ -10231,10 +10273,9 @@ "integrity": "sha512-r2JhDY7gbbmh5z3Q62pNbrjxZdOAjpsqW/8yxAZRSqLZqowmfGZPGUZPFf3UX36NLis0cv8VEM5IJh9HgkSOAA==" }, "slash": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-1.0.0.tgz", - "integrity": "sha1-xB8vbDn8FtHNF61LXYlhFK5HDVU=", - "dev": true + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", + "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==" }, "slice-ansi": { "version": "2.1.0", diff --git a/packages/concerto-core/lib/modelmanager.js b/packages/concerto-core/lib/modelmanager.js index 9b110edfd5..e1a210ef31 100644 --- a/packages/concerto-core/lib/modelmanager.js +++ b/packages/concerto-core/lib/modelmanager.js @@ -16,6 +16,7 @@ const fs = require('fs'); const fsPath = require('path'); +const slash = require('slash'); const DefaultModelFileLoader = require('./introspect/loaders/defaultmodelfileloader'); const Factory = require('./factory'); @@ -394,7 +395,8 @@ class ModelManager { if (file.isExternal() && !opts.includeExternalModels) { return; } - const filename = file.fileName.split(fsPath.sep).pop(); + // Always assume file names have been normalized from `\` to `/` + const filename = slash(file.fileName).split('/').pop(); fs.writeFileSync(path + fsPath.sep + filename, file.definitions); }); } diff --git a/packages/concerto-core/package.json b/packages/concerto-core/package.json index 1c3089591c..8c67cb1cac 100644 --- a/packages/concerto-core/package.json +++ b/packages/concerto-core/package.json @@ -68,6 +68,7 @@ "jsome": "2.5.0", "lorem-ipsum": "1.0.6", "moment-mini": "2.22.1", + "slash": "3.0.0", "triple-beam": "1.3.0", "urijs": "1.19.1", "uuid": "3.3.2",