diff --git a/lib/builder/builder.js b/lib/builder/builder.js index a4a0d415e..a495b4a97 100644 --- a/lib/builder/builder.js +++ b/lib/builder/builder.js @@ -274,8 +274,17 @@ module.exports = { const projectType = typeRepository.getType(project.type); const resourceCollections = resourceFactory.createCollectionsForTree(project, { - useNamespaces: true, - virtualReaders: projectWriters + virtualReaders: projectWriters, + getVirtualBasePathPrefix: function({project, virBasePath}) { + if (project.type === "application" && project.metadata.namespace) { + return "/resources/" + project.metadata.namespace; + } + }, + getProjectExcludes: function(project) { + if (project.builder && project.builder.resources) { + return project.builder.resources.excludes; + } + } }); const writer = new MemAdapter({ diff --git a/package-lock.json b/package-lock.json index e5266f387..93e23c915 100644 --- a/package-lock.json +++ b/package-lock.json @@ -280,6 +280,20 @@ } } }, + "@mrmlnc/readdir-enhanced": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/@mrmlnc/readdir-enhanced/-/readdir-enhanced-2.2.1.tgz", + "integrity": "sha512-bPHp6Ji8b41szTOcaP63VlnbbO5Ny6dwAATtY6JTjh5N2OLrb5Qk/Th5cRkRQhkWCt+EJsYrNB0MiL+Gpn6e3g==", + "requires": { + "call-me-maybe": "^1.0.1", + "glob-to-regexp": "^0.3.0" + } + }, + "@nodelib/fs.stat": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-1.1.3.tgz", + "integrity": "sha512-shAmDyaQC4H92APFoIaVDHCx5bStIocgvbwQyxPRrbUY20V1EYTbSDchWbuwlMG3V17cprZhA6+78JfB+3DTPw==" + }, "@sinonjs/commons": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-1.4.0.tgz", @@ -316,22 +330,94 @@ "integrity": "sha512-+iTbntw2IZPb/anVDbypzfQa+ay64MW0Zo8aJ8gZPWMMK6/OubMVb6lUPMagqjOPnmtauXnFCACVl3O7ogjeqQ==", "dev": true }, + "@types/events": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@types/events/-/events-3.0.0.tgz", + "integrity": "sha512-EaObqwIvayI5a8dCzhFrjKzVwKLxjoG9T6Ppd5CEo07LRKfQ8Yokw54r5+Wq7FaBQ+yXRvQAYPrHwya1/UFt9g==" + }, + "@types/glob": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/@types/glob/-/glob-7.1.1.tgz", + "integrity": "sha512-1Bh06cbWJUHMC97acuD6UMG29nMt0Aqz1vF3guLfG+kHHJhy3AyohZFFxYk2f7Q1SQIrNwvncxAE0N/9s70F2w==", + "requires": { + "@types/events": "*", + "@types/minimatch": "*", + "@types/node": "*" + } + }, + "@types/minimatch": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@types/minimatch/-/minimatch-3.0.3.tgz", + "integrity": "sha512-tHq6qdbT9U1IRSGf14CL0pUlULksvY9OZ+5eEgl1N7t+OA3tGvNpxJCzuKQlsNgCVwbAs670L1vcVQi8j9HjnA==" + }, + "@types/node": { + "version": "12.0.2", + "resolved": "https://registry.npmjs.org/@types/node/-/node-12.0.2.tgz", + "integrity": "sha512-5tabW/i+9mhrfEOUcLDu2xBPsHJ+X5Orqy9FKpale3SjDA17j5AEpYq5vfy3oAeAHGcvANRCO3NV3d2D6q3NiA==" + }, "@ui5/fs": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/@ui5/fs/-/fs-1.0.2.tgz", - "integrity": "sha512-8Fc4iqpo/sm2KMGV0MiesqWPoCVDf9OnWVWqdoJ0c7GwAh6olt2EDPtnjtQ0tLMW2Uovdh/Nz+S1qecY0Yb1GA==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@ui5/fs/-/fs-1.1.0.tgz", + "integrity": "sha512-3RPbt3cIG5vY34ssSnr5KlROxqSG6y7sn9TarspPd0+7j1VvKY2leWASNOfuFCISmAnJGbNdFZcfmJfhbTWlEA==", "requires": { "@ui5/logger": "^1.0.1", "clone": "^2.1.0", - "dir-glob": "2.0.0", - "globby": "^7.1.1", + "globby": "^9.2.0", "graceful-fs": "^4.1.15", - "make-dir": "^2.1.0", - "micromatch": "^3.1.4", + "make-dir": "^3.0.0", + "micromatch": "^4.0.2", "minimatch": "^3.0.3", "mock-require": "^3.0.3", "pretty-hrtime": "^1.0.3", - "random-int": "^1.0.0" + "random-int": "^2.0.0" + }, + "dependencies": { + "braces": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "requires": { + "fill-range": "^7.0.1" + } + }, + "fill-range": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", + "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "requires": { + "to-regex-range": "^5.0.1" + } + }, + "is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==" + }, + "make-dir": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.0.0.tgz", + "integrity": "sha512-grNJDhb8b1Jm1qeqW5R/O63wUo4UXo2v2HMic6YT9i/HBlF93S8jkMgH7yugvY9ABDShH4VZMn8I+U8+fCNegw==", + "requires": { + "semver": "^6.0.0" + } + }, + "micromatch": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.2.tgz", + "integrity": "sha512-y7FpHSbMUMoyPbYUSzO6PaZ6FyRnQOpHuKwbo1G+Knck95XVU4QAiKdGEnj5wwoS7PlOgthX/09u5iFJ+aYf5Q==", + "requires": { + "braces": "^3.0.1", + "picomatch": "^2.0.5" + } + }, + "to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "requires": { + "is-number": "^7.0.0" + } + } } }, "@ui5/logger": { @@ -626,7 +712,8 @@ "arrify": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz", - "integrity": "sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0=" + "integrity": "sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0=", + "dev": true }, "asn1": { "version": "0.2.4", @@ -1624,8 +1711,7 @@ "call-me-maybe": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/call-me-maybe/-/call-me-maybe-1.0.1.tgz", - "integrity": "sha1-JtII6onje1y95gJQoV8DHBak1ms=", - "dev": true + "integrity": "sha1-JtII6onje1y95gJQoV8DHBak1ms=" }, "call-signature": { "version": "0.0.2", @@ -2428,15 +2514,6 @@ "integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==", "dev": true }, - "dir-glob": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-2.0.0.tgz", - "integrity": "sha512-37qirFDz8cA5fimp9feo43fSuRo2gHwaIn6dXL8Ber1dGwUosDrGZeCCXq57WnIqE4aQ+u3eQZzsk1yOzhdwag==", - "requires": { - "arrify": "^1.0.1", - "path-type": "^3.0.0" - } - }, "docdash": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/docdash/-/docdash-1.1.1.tgz", @@ -3138,6 +3215,53 @@ "integrity": "sha512-xJuoT5+L99XlZ8twedaRf6Ax2TgQVxvgZOYoPKqZufmJib0tL2tegPBOZb1pVNgIhlqDlA0eO0c3wBvQcmzx4w==", "dev": true }, + "fast-glob": { + "version": "2.2.7", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-2.2.7.tgz", + "integrity": "sha512-g1KuQwHOZAmOZMuBtHdxDtju+T2RT8jgCC9aANsbpdiDDTSnjgfuVsIBNKbUeJI3oKMRExcfNDtJl4OhbffMsw==", + "requires": { + "@mrmlnc/readdir-enhanced": "^2.2.1", + "@nodelib/fs.stat": "^1.1.2", + "glob-parent": "^3.1.0", + "is-glob": "^4.0.0", + "merge2": "^1.2.3", + "micromatch": "^3.1.10" + }, + "dependencies": { + "glob-parent": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-3.1.0.tgz", + "integrity": "sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4=", + "requires": { + "is-glob": "^3.1.0", + "path-dirname": "^1.0.0" + }, + "dependencies": { + "is-glob": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz", + "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=", + "requires": { + "is-extglob": "^2.1.0" + } + } + } + }, + "is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=" + }, + "is-glob": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz", + "integrity": "sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg==", + "requires": { + "is-extglob": "^2.1.1" + } + } + } + }, "fast-json-stable-stringify": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz", @@ -3978,8 +4102,7 @@ "glob-to-regexp": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/glob-to-regexp/-/glob-to-regexp-0.3.0.tgz", - "integrity": "sha1-jFoUlNIGbFcMw7/kSWF1rMTVAqs=", - "dev": true + "integrity": "sha1-jFoUlNIGbFcMw7/kSWF1rMTVAqs=" }, "global-dirs": { "version": "0.1.1", @@ -3997,16 +4120,38 @@ "dev": true }, "globby": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/globby/-/globby-7.1.1.tgz", - "integrity": "sha1-+yzP+UAfhgCUXfral0QMypcrhoA=", - "requires": { - "array-union": "^1.0.1", - "dir-glob": "^2.0.0", - "glob": "^7.1.2", - "ignore": "^3.3.5", - "pify": "^3.0.0", - "slash": "^1.0.0" + "version": "9.2.0", + "resolved": "https://registry.npmjs.org/globby/-/globby-9.2.0.tgz", + "integrity": "sha512-ollPHROa5mcxDEkwg6bPt3QbEf4pDQSNtd6JPL1YvOvAo/7/0VAm9TccUeoTmarjPw4pfUthSCqcyfNB1I3ZSg==", + "requires": { + "@types/glob": "^7.1.1", + "array-union": "^1.0.2", + "dir-glob": "^2.2.2", + "fast-glob": "^2.2.6", + "glob": "^7.1.3", + "ignore": "^4.0.3", + "pify": "^4.0.1", + "slash": "^2.0.0" + }, + "dependencies": { + "dir-glob": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-2.2.2.tgz", + "integrity": "sha512-f9LBi5QWzIW3I6e//uxZoLBlUt9kcp66qo0sSCxL6YZKc75R1c4MFCoe/LaZiBGmgujvQdxc5Bn3QhfyvK5Hsw==", + "requires": { + "path-type": "^3.0.0" + } + }, + "pify": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", + "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==" + }, + "slash": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-2.0.0.tgz", + "integrity": "sha512-ZYKh3Wh2z1PpEXWr0MpSBZ0V6mZHAQfYevttO11c51CaWjGTaadiKZ+wVt1PbMlDV5qhMFslpZCemhwOK7C89A==" + } } }, "got": { @@ -4244,9 +4389,9 @@ } }, "ignore": { - "version": "3.3.10", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-3.3.10.tgz", - "integrity": "sha512-Pgs951kaMm5GXP7MOvxERINe3gsaVjUWFm+UZPSq9xYriQAksyhg0csnS0KXSNRD5NmNdapXEpjxG49+AKh/ug==" + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", + "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==" }, "ignore-by-default": { "version": "1.0.1", @@ -5448,6 +5593,11 @@ } } }, + "merge2": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.2.3.tgz", + "integrity": "sha512-gdUU1Fwj5ep4kplwcmftruWofEFt6lfpkkr3h860CXbAB9c3hGb55EOL2ali0Td5oebvW0E1+3Sr+Ur7XfKpRA==" + }, "micromatch": { "version": "3.1.10", "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz", @@ -6313,6 +6463,11 @@ "resolved": "https://registry.npmjs.org/pascalcase/-/pascalcase-0.1.1.tgz", "integrity": "sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ=" }, + "path-dirname": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/path-dirname/-/path-dirname-1.0.2.tgz", + "integrity": "sha1-zDPSTVJeCZpTiMAzbG4yuRYGCeA=" + }, "path-exists": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", @@ -6384,6 +6539,11 @@ "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=" }, + "picomatch": { + "version": "2.0.7", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.0.7.tgz", + "integrity": "sha512-oLHIdio3tZ0qH76NybpeneBhYVj0QFTfXEFTc/B3zKQspYfYYkWYgFsmzo+4kvId/bQRcNkVeguI3y+CD22BtA==" + }, "pify": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", @@ -6560,9 +6720,9 @@ "dev": true }, "random-int": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/random-int/-/random-int-1.0.0.tgz", - "integrity": "sha1-5qLtNEisnGZGoGV0Q7HBUhWS7Qg=" + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/random-int/-/random-int-2.0.0.tgz", + "integrity": "sha512-jCJ4a8BJ+z3f4SYSFtYIiRfcdxe2Bvh+Gg2J+LjriL3dVOtrF77u0tklYbO8acHoZQ7JlYJn3lNKfW5TFjcwdQ==" }, "randomatic": { "version": "3.1.1", @@ -7075,7 +7235,8 @@ "slash": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/slash/-/slash-1.0.0.tgz", - "integrity": "sha1-xB8vbDn8FtHNF61LXYlhFK5HDVU=" + "integrity": "sha1-xB8vbDn8FtHNF61LXYlhFK5HDVU=", + "dev": true }, "slice-ansi": { "version": "1.0.0", diff --git a/package.json b/package.json index 4c99ad367..bc3c02231 100644 --- a/package.json +++ b/package.json @@ -96,14 +96,14 @@ "url": "git@github.com:SAP/ui5-builder.git" }, "dependencies": { - "@ui5/fs": "^1.0.2", + "@ui5/fs": "^1.1.0", "@ui5/logger": "^1.0.1", "cheerio": "^0.22.0", "escodegen": "^1.11.1", "escope": "^3.6.0", "esprima": "^4.0.1", "estraverse": "^4.2.0", - "globby": "^7.1.1", + "globby": "^9.2.0", "graceful-fs": "^4.1.15", "jsdoc": "3.5.5", "less-openui5": "^0.6.0", diff --git a/test/expected/build/application.g/excludes/manifest.json b/test/expected/build/application.g/excludes/manifest.json new file mode 100644 index 000000000..56cc0ec3b --- /dev/null +++ b/test/expected/build/application.g/excludes/manifest.json @@ -0,0 +1,14 @@ +{ + "_version": "1.1.0", + "sap.app": { + "_version": "1.1.0", + "id": "application.g", + "type": "application", + "applicationVersion": { + "version": "${version}" + }, + "embeds": ["embedded"], + "title": "{{title}}" + }, + "customCopyrightString": "${copyright}" +} diff --git a/test/expected/build/application.g/excludes/subcomponentA/manifest.json b/test/expected/build/application.g/excludes/subcomponentA/manifest.json new file mode 100644 index 000000000..ac1f84ae8 --- /dev/null +++ b/test/expected/build/application.g/excludes/subcomponentA/manifest.json @@ -0,0 +1,13 @@ +{ + "_version": "1.1.0", + "sap.app": { + "_version": "1.1.0", + "id": "application.g.subcomponentA", + "type": "application", + "applicationVersion": { + "version": "1.2.2" + }, + "embeds": ["embedded"], + "title": "{{title}}" + } +} \ No newline at end of file diff --git a/test/lib/builder/builder.js b/test/lib/builder/builder.js index 975878066..500dd374b 100644 --- a/test/lib/builder/builder.js +++ b/test/lib/builder/builder.js @@ -169,6 +169,27 @@ test("Build application.g with component preload paths", (t) => { }); }); +test("Build application.g with excludes", (t) => { + const destPath = "./test/tmp/build/application.g/excludes"; + const expectedPath = path.join("test", "expected", "build", "application.g", "excludes"); + + return builder.build({ + tree: applicationGTreeWithExcludes, + destPath, + includeTasks: ["createDebugFiles"], + excludedTasks: ["*"] + }).then(() => { + return findFiles(expectedPath); + }).then((expectedFiles) => { + // Check for all directories and files + assert.directoryDeepEqual(destPath, expectedPath); + // Check for all file contents + return checkFileContentsIgnoreLineFeeds(expectedFiles, expectedPath, destPath); + }).then(() => { + t.pass(); + }); +}); + test("Build application.h", (t) => { const destPath = "./test/tmp/build/application.h/dest"; const expectedPath = path.join("test", "expected", "build", "application.h", "dest"); @@ -176,7 +197,8 @@ test("Build application.h", (t) => { return builder.build({ tree: applicationHTree, destPath, - excludedTasks: ["createDebugFiles", "generateComponentPreload", "generateStandaloneAppBundle", "generateVersionInfo"] + excludedTasks: ["createDebugFiles", "generateComponentPreload", + "generateStandaloneAppBundle", "generateVersionInfo"] }).then(() => { return findFiles(expectedPath); }).then((expectedFiles) => { @@ -572,6 +594,41 @@ const applicationGTree = { } }; +const applicationGTreeWithExcludes = { + "id": "application.g", + "version": "1.0.0", + "path": applicationGPath, + "_level": 0, + "specVersion": "0.1", + "type": "application", + "metadata": { + "name": "application.g", + "namespace": "application/g", + "copyright": "Some fancy copyright" + }, + "dependencies": [], + "resources": { + "configuration": { + "paths": { + "webapp": "webapp" + } + }, + "pathMappings": { + "/": "webapp" + } + }, + "builder": { + "resources": { + "excludes": [ + "/subcomponentA/**", + "!**/manifest.json", + "/subcomponentB/**", + "/Component.js", + ] + } + } +}; + const applicationGTreeComponentPreloadPaths = { "id": "application.g", "version": "1.0.0", @@ -918,8 +975,7 @@ const libraryITree = { } }, "pathMappings": { - "/resources/": "main/src", - "/test-resources/": "main/test" + "/resources/": "main/src" } } }; @@ -968,8 +1024,7 @@ const themeJTree = { } }, "pathMappings": { - "/resources/": "main/src", - "/test-resources/": "main/test" + "/resources/": "main/src" } } }; diff --git a/test/lib/tasks/bundlers/generateManifestBundle.js b/test/lib/tasks/bundlers/generateManifestBundle.js index bd0a7a24a..a13a72ee2 100644 --- a/test/lib/tasks/bundlers/generateManifestBundle.js +++ b/test/lib/tasks/bundlers/generateManifestBundle.js @@ -8,7 +8,7 @@ const assert = chai.assert; const ui5Builder = require("../../../../"); const builder = ui5Builder.builder; const applicationBPath = path.join(__dirname, "..", "..", "..", "fixtures", "application.b"); -const libraryCore = path.join(__dirname, "..", "..", "fixtures", "sap.ui.core-evo"); +const libraryCore = path.join(__dirname, "..", "..", "..", "fixtures", "sap.ui.core-evo"); const libraryKPath = path.join(__dirname, "..", "..", "..", "fixtures", "library.k"); const {promisify} = require("util"); const extractZip = promisify(require("extract-zip")); @@ -95,7 +95,7 @@ const applicationBTree = { { "id": "library.d", "version": "1.0.0", - "path": path.join(applicationBPath, "node_modules", "library.d"), + "path": path.join(applicationBPath, "..", "library.d"), "dependencies": [], "_level": 1, "specVersion": "0.1", @@ -120,7 +120,7 @@ const applicationBTree = { { "id": "library.a", "version": "1.0.0", - "path": path.join(applicationBPath, "node_modules", "collection", "library.a"), + "path": path.join(applicationBPath, "..", "collection", "library.a"), "dependencies": [], "_level": 1, "specVersion": "0.1", @@ -145,7 +145,7 @@ const applicationBTree = { { "id": "library.b", "version": "1.0.0", - "path": path.join(applicationBPath, "node_modules", "collection", "library.b"), + "path": path.join(applicationBPath, "..", "collection", "library.b"), "dependencies": [], "_level": 1, "specVersion": "0.1", @@ -170,7 +170,7 @@ const applicationBTree = { { "id": "library.c", "version": "1.0.0", - "path": path.join(applicationBPath, "node_modules", "collection", "library.c"), + "path": path.join(applicationBPath, "..", "collection", "library.c"), "dependencies": [], "_level": 1, "specVersion": "0.1", @@ -257,8 +257,7 @@ const libraryKTree = { } }, "pathMappings": { - "/resources/": "src", - "/test-resources/": "test" + "/resources/": "src" } } }; diff --git a/test/lib/tasks/bundlers/generateStandaloneAppBundle.js b/test/lib/tasks/bundlers/generateStandaloneAppBundle.js index f59e93e65..d6f245c90 100644 --- a/test/lib/tasks/bundlers/generateStandaloneAppBundle.js +++ b/test/lib/tasks/bundlers/generateStandaloneAppBundle.js @@ -219,7 +219,7 @@ const applicationBTree = { { "id": "library.d", "version": "1.0.0", - "path": path.join(applicationBPath, "node_modules", "library.d"), + "path": path.join(applicationBPath, "..", "library.d"), "dependencies": [], "_level": 1, "specVersion": "0.1", @@ -244,7 +244,7 @@ const applicationBTree = { { "id": "library.a", "version": "1.0.0", - "path": path.join(applicationBPath, "node_modules", "collection", "library.a"), + "path": path.join(applicationBPath, "..", "collection", "library.a"), "dependencies": [], "_level": 1, "specVersion": "0.1", @@ -269,7 +269,7 @@ const applicationBTree = { { "id": "library.b", "version": "1.0.0", - "path": path.join(applicationBPath, "node_modules", "collection", "library.b"), + "path": path.join(applicationBPath, "..", "collection", "library.b"), "dependencies": [], "_level": 1, "specVersion": "0.1", @@ -294,7 +294,7 @@ const applicationBTree = { { "id": "library.c", "version": "1.0.0", - "path": path.join(applicationBPath, "node_modules", "collection", "library.c"), + "path": path.join(applicationBPath, "..", "collection", "library.c"), "dependencies": [], "_level": 1, "specVersion": "0.1",