From 60a09d62fd347976856a6461d0a69ca6a462f32e Mon Sep 17 00:00:00 2001 From: Fred Kleuver Date: Fri, 16 Feb 2018 04:56:43 +0100 Subject: [PATCH] 0.2.0 --- dist/amd/map-routables.js | 18 +++++++++++------- dist/amd/map-routables.js.map | 2 +- dist/commonjs/map-routables.js | 18 +++++++++++------- dist/commonjs/map-routables.js.map | 2 +- dist/es2015/map-routables.js | 5 ++++- dist/es2015/map-routables.js.map | 2 +- dist/es2017/map-routables.js | 5 ++++- dist/es2017/map-routables.js.map | 2 +- dist/native-modules/map-routables.js | 18 +++++++++++------- dist/native-modules/map-routables.js.map | 2 +- dist/system/map-routables.js | 18 +++++++++++------- dist/system/map-routables.js.map | 2 +- doc/CHANGELOG.md | 5 +++++ package.json | 2 +- 14 files changed, 64 insertions(+), 37 deletions(-) diff --git a/dist/amd/map-routables.js b/dist/amd/map-routables.js index b71af71..3066954 100644 --- a/dist/amd/map-routables.js +++ b/dist/amd/map-routables.js @@ -46,9 +46,9 @@ define(["require", "exports", "aurelia-dependency-injection", "aurelia-loader", routable_resource_1.RoutableResource.setTarget(ownModuleId, target); var resource = aurelia_metadata_1.metadata.getOrCreateOwn(metadataKey, routable_resource_1.RoutableResource, target); var loadChildRoutes = function () { return __awaiter(_this, void 0, void 0, function () { - var filterRoute, moduleIds, loader, routes, _i, moduleIds_1, id, trg, res, _a, _b, route; - return __generator(this, function (_c) { - switch (_c.label) { + var filterRoute, moduleIds, loader, routes, _i, moduleIds_1, id, trg, res, _a, _b, route, childRoutes, _c, routes_1, route; + return __generator(this, function (_d) { + switch (_d.label) { case 0: if (Array.isArray(resource.childRoutes)) { return [2, resource.childRoutes]; @@ -58,10 +58,10 @@ define(["require", "exports", "aurelia-dependency-injection", "aurelia-loader", loader = aurelia_dependency_injection_1.Container.instance.get(aurelia_loader_1.Loader); return [4, loader.loadAllModules(moduleIds)]; case 1: - _c.sent(); + _d.sent(); routes = []; _i = 0, moduleIds_1 = moduleIds; - _c.label = 2; + _d.label = 2; case 2: if (!(_i < moduleIds_1.length)) return [3, 5]; id = moduleIds_1[_i]; @@ -79,8 +79,12 @@ define(["require", "exports", "aurelia-dependency-injection", "aurelia-loader", if (!(eagerLoadChildRoutes && res.loadChildRoutes !== undefined)) return [3, 4]; return [4, res.loadChildRoutes()]; case 3: - _c.sent(); - _c.label = 4; + childRoutes = _d.sent(); + for (_c = 0, routes_1 = routes; _c < routes_1.length; _c++) { + route = routes_1[_c]; + route.settings.childRoutes = childRoutes; + } + _d.label = 4; case 4: _i++; return [3, 2]; diff --git a/dist/amd/map-routables.js.map b/dist/amd/map-routables.js.map index 258c892..27ee33b 100644 --- a/dist/amd/map-routables.js.map +++ b/dist/amd/map-routables.js.map @@ -1 +1 @@ -{"version":3,"file":"map-routables.js","sourceRoot":"","sources":["../../src/map-routables.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAOA,IAAM,qBAAqB,GAAG,MAAM,CAAC,iBAAiB,CAAkB,CAAC;IACzE,IAAM,WAAW,GAAG,oCAAgB,CAAC,2BAA2B,CAAC;IASjE,sBACE,QAA2B,EAC3B,oBAAqC,EACrC,MAAwC;QAH1C,iBAsDC;QApDC,qCAAA,EAAA,4BAAqC;QAGrC,MAAM,CAAC,UAAC,MAAW;YACjB,IAAM,WAAW,GAAW,mBAAW,CAAC,MAAM,CAAC,CAAC;YAChD,oCAAgB,CAAC,SAAS,CAAC,WAAW,EAAE,MAAM,CAAC,CAAC;YAEhD,IAAM,QAAQ,GAAG,2BAAQ,CAAC,cAAc,CAAC,WAAW,EAAE,oCAAgB,EAAE,MAAM,CAA4B,CAAC;YAE3G,IAAM,eAAe,GAAG;;;;;4BACtB,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC;gCACxC,MAAM,KAAC,QAAQ,CAAC,WAAW,EAAC;4BAC9B,CAAC;4BAEK,WAAW,GAAG,CAAC,OAAO,M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;wBACzC,QAAQ,GAAG,2BAAQ,CAAC,MAAM,CAAC,WAAW,EAAE,MAAM,CAA4B,CAAC;wBAClE,WAAM,QAAQ,CAAC,eAAe,EAAE,EAAA;;wBAAzC,MAAM,GAAG,SAAiD;wBAChE,MAAM,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;wBAEb,uBAAuB,GAAG,OAAO,CAAC,qBAAqB,CAAoB,CAAC;wBAClF,EAAE,CAAC,CAAC,uBAAuB,KAAK,SAAS,CAAC,CAAC,CAAC;4BAC1C,MAAM,KAAC,uBAAuB,CAAC,IAAI,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,CAAC,EAAC;wBAC/D,CAAC;;;;;KACF"} \ No newline at end of file diff --git a/dist/commonjs/map-routables.js b/dist/commonjs/map-routables.js index d65c6ef..aa88f0e 100644 --- a/dist/commonjs/map-routables.js +++ b/dist/commonjs/map-routables.js @@ -50,9 +50,9 @@ function mapRoutables(moduleId, eagerLoadChildRoutes, filter) { routable_resource_1.RoutableResource.setTarget(ownModuleId, target); var resource = aurelia_metadata_1.metadata.getOrCreateOwn(metadataKey, routable_resource_1.RoutableResource, target); var loadChildRoutes = function () { return __awaiter(_this, void 0, void 0, function () { - var filterRoute, moduleIds, loader, routes, _i, moduleIds_1, id, trg, res, _a, _b, route; - return __generator(this, function (_c) { - switch (_c.label) { + var filterRoute, moduleIds, loader, routes, _i, moduleIds_1, id, trg, res, _a, _b, route, childRoutes, _c, routes_1, route; + return __generator(this, function (_d) { + switch (_d.label) { case 0: if (Array.isArray(resource.childRoutes)) { return [2, resource.childRoutes]; @@ -62,10 +62,10 @@ function mapRoutables(moduleId, eagerLoadChildRoutes, filter) { loader = aurelia_dependency_injection_1.Container.instance.get(aurelia_loader_1.Loader); return [4, loader.loadAllModules(moduleIds)]; case 1: - _c.sent(); + _d.sent(); routes = []; _i = 0, moduleIds_1 = moduleIds; - _c.label = 2; + _d.label = 2; case 2: if (!(_i < moduleIds_1.length)) return [3, 5]; id = moduleIds_1[_i]; @@ -83,8 +83,12 @@ function mapRoutables(moduleId, eagerLoadChildRoutes, filter) { if (!(eagerLoadChildRoutes && res.loadChildRoutes !== undefined)) return [3, 4]; return [4, res.loadChildRoutes()]; case 3: - _c.sent(); - _c.label = 4; + childRoutes = _d.sent(); + for (_c = 0, routes_1 = routes; _c < routes_1.length; _c++) { + route = routes_1[_c]; + route.settings.childRoutes = childRoutes; + } + _d.label = 4; case 4: _i++; return [3, 2]; diff --git a/dist/commonjs/map-routables.js.map b/dist/commonjs/map-routables.js.map index ac081bf..4bef950 100644 --- a/dist/commonjs/map-routables.js.map +++ b/dist/commonjs/map-routables.js.map @@ -1 +1 @@ -{"version":3,"file":"map-routables.js","sourceRoot":"","sources":["../../src/map-routables.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6EAAyD;AACzD,iDAAwC;AACxC,qDAA4C;AAE5C,yDAAuD;AACvD,iCAAsC;AAEtC,IAAM,qBAAqB,GAAG,MAAM,CAAC,iBAAiB,CAAkB,CAAC;AACzE,IAAM,WAAW,GAAG,oCAAgB,CAAC,2BAA2B,CAAC;AASjE,sBACE,QAA2B,EAC3B,oBAAqC,EACrC,MAAwC;IAH1C,iBAsDC;IApDC,qCAAA,EAAA,4BAAqC;IAGrC,MAAM,CAAC,UAAC,MAAW;QACjB,IAAM,WAAW,GAAW,mBAAW,CAAC,MAAM,CAAC,CAAC;QAChD,oCAAgB,CAAC,SAAS,CAAC,WAAW,EAAE,MAAM,CAAC,CAAC;QAEhD,IAAM,QAAQ,GAAG,2BAAQ,CAAC,cAAc,CAAC,WAAW,EAAE,oCAAgB,EAAE,MAAM,CAA4B,CAAC;QAE3G,IAAM,eAAe,GAAG;;;;;wBACtB,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC;4BACxC,MAAM,KAAC,QAAQ,CAAC,WAAW,EAAC;wBAC9B,CAA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B,MAA2B,EAAE,MAAc;;;;;;oBAElE,OAAO,GAAG,IAAI,CAAC;oBACf,MAAM,GAAG,OAAO,CAAC,WAAuB,CAAC;oBACzC,QAAQ,GAAG,2BAAQ,CAAC,MAAM,CAAC,WAAW,EAAE,MAAM,CAA4B,CAAC;oBAClE,WAAM,QAAQ,CAAC,eAAe,EAAE,EAAA;;oBAAzC,MAAM,GAAG,SAAiD;oBAChE,MAAM,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;oBAEb,uBAAuB,GAAG,OAAO,CAAC,qBAAqB,CAAoB,CAAC;oBAClF,EAAE,CAAC,CAAC,uBAAuB,KAAK,SAAS,CAAC,CAAC,CAAC;wBAC1C,MAAM,KAAC,uBAAuB,CAAC,IAAI,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,CAAC,EAAC;oBAC/D,CAAC;;;;;CACF"} \ No newline at end of file diff --git a/dist/es2015/map-routables.js b/dist/es2015/map-routables.js index 9aef130..e172210 100644 --- a/dist/es2015/map-routables.js +++ b/dist/es2015/map-routables.js @@ -40,7 +40,10 @@ export function mapRoutables(moduleId, eagerLoadChildRoutes = false, filter) { } } if (eagerLoadChildRoutes && res.loadChildRoutes !== undefined) { - yield res.loadChildRoutes(); + const childRoutes = yield res.loadChildRoutes(); + for (const route of routes) { + route.settings.childRoutes = childRoutes; + } } } resource.childRoutes = routes; diff --git a/dist/es2015/map-routables.js.map b/dist/es2015/map-routables.js.map index 838e394..4318e1c 100644 --- a/dist/es2015/map-routables.js.map +++ b/dist/es2015/map-routables.js.map @@ -1 +1 @@ -{"version":3,"file":"map-routables.js","sourceRoot":"","sources":["../../src/map-routables.ts"],"names":[],"mappings":";;;;;;;;AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AACzD,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AACxC,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAE5C,OAAO,EAAE,gBAAgB,EAAE,M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,uBAAuB,CAAC,IAAI,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;QAC/D,CAAC;IACH,CAAC;CAAA"} \ No newline at end of file diff --git a/dist/es2017/map-routables.js b/dist/es2017/map-routables.js index 20e706f..fd2c72e 100644 --- a/dist/es2017/map-routables.js +++ b/dist/es2017/map-routables.js @@ -32,7 +32,10 @@ export function mapRoutables(moduleId, eagerLoadChildRoutes = false, filter) { } } if (eagerLoadChildRoutes && res.loadChildRoutes !== undefined) { - await res.loadChildRoutes(); + const childRoutes = await res.loadChildRoutes(); + for (const route of routes) { + route.settings.childRoutes = childRoutes; + } } } resource.childRoutes = routes; diff --git a/dist/es2017/map-routables.js.map b/dist/es2017/map-routables.js.map index 523b016..6553aa1 100644 --- a/dist/es2017/map-routables.js.map +++ b/dist/es2017/map-routables.js.map @@ -1 +1 @@ -{"version":3,"file":"map-routables.js","sourceRoot":"","sources":["../../src/map-routables.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AACzD,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AACxC,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAE5C,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAEtC,MAAM,qBAAqB,GAAG,MAAM,CAAC,iBAAiB,CAAkB,CAAC;AACzE,MAAM,WAAW,GAAG,gBAAgB,CAAC,2BAA2B,CAAC;AASjE,MAAM,uBACJ,QAA2B,EAC3B,uBAAgC,KAAK,EACrC,MAAwC;IAExC,MAAM,CAAC,CAAC,MAAW,EAAO,EAAE;QAC1B,MAAM,WAAW,GAAW,WAAW,CAAC,MAAM,CAAC,CAAC;QAChD,gBAAgB,CAAC,SAAS,CAAC,WAAW,EAAE,MAAM,CAAC,CAAC;QAEhD,MAAM,QAAQ,GAAG,QAAQ,CAAC,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eAAe,GAAG,eAAe,CAAC;QAE3C,EAAE,CAAC,CAAC,iBAAiB,IAAI,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC;YAC1C,MAAM,uBAAuB,GAAG,MAAM,CAAC,SAAS,CAAC,eAAkC,CAAC;YACpF,MAAM,CAAC,SAAS,CAAC,qBAAqB,CAAC,GAAG,uBAAuB,CAAC;QACpE,CAAC;QACD,MAAM,CAAC,SAAS,CAAC,eAAe,GAAG,eAAe,CAAC;IACrD,CAAC,CAAC;AACJ,CAAC;AAED,KAAK,0BAA0B,MAA2B,EAAE,MAAc;IAExE,MAAM,OAAO,GAAG,IAAI,CAAC;IACrB,MAAM,MAAM,GAAG,OAAO,CAAC,WAAuB,CAAC;IAC/C,MAAM,QAAQ,GAAG,QAAQ,CAAC,MAAM,CAAC,WAAW,EAAE,MAAM,CAA4B,CAAC;IACjF,MAAM,MAAM,GAAG,MAAM,QAAQ,CAAC,eAAe,EAAmB,CAAC;IACjE,MAAM,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IAEnB,MAAM,uBAAuB,GAAG,OAAO,CAAC,qBAAqB,CAAoB,CAAC;IAClF,EAAE,CAAC,CAAC,uBAAuB,KAAK,SAAS,CAAC,CAAC,CAAC;QAC1C,MAAM,CAAC,uBAAuB,CAAC,IAAI,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;IAC/D,CAAC;AACH,CAAC"} \ No newline at end of file diff --git a/dist/native-modules/map-routables.js b/dist/native-modules/map-routables.js index d288248..ccb826e 100644 --- a/dist/native-modules/map-routables.js +++ b/dist/native-modules/map-routables.js @@ -48,9 +48,9 @@ export function mapRoutables(moduleId, eagerLoadChildRoutes, filter) { RoutableResource.setTarget(ownModuleId, target); var resource = metadata.getOrCreateOwn(metadataKey, RoutableResource, target); var loadChildRoutes = function () { return __awaiter(_this, void 0, void 0, function () { - var filterRoute, moduleIds, loader, routes, _i, moduleIds_1, id, trg, res, _a, _b, route; - return __generator(this, function (_c) { - switch (_c.label) { + var filterRoute, moduleIds, loader, routes, _i, moduleIds_1, id, trg, res, _a, _b, route, childRoutes, _c, routes_1, route; + return __generator(this, function (_d) { + switch (_d.label) { case 0: if (Array.isArray(resource.childRoutes)) { return [2, resource.childRoutes]; @@ -60,10 +60,10 @@ export function mapRoutables(moduleId, eagerLoadChildRoutes, filter) { loader = Container.instance.get(Loader); return [4, loader.loadAllModules(moduleIds)]; case 1: - _c.sent(); + _d.sent(); routes = []; _i = 0, moduleIds_1 = moduleIds; - _c.label = 2; + _d.label = 2; case 2: if (!(_i < moduleIds_1.length)) return [3, 5]; id = moduleIds_1[_i]; @@ -81,8 +81,12 @@ export function mapRoutables(moduleId, eagerLoadChildRoutes, filter) { if (!(eagerLoadChildRoutes && res.loadChildRoutes !== undefined)) return [3, 4]; return [4, res.loadChildRoutes()]; case 3: - _c.sent(); - _c.label = 4; + childRoutes = _d.sent(); + for (_c = 0, routes_1 = routes; _c < routes_1.length; _c++) { + route = routes_1[_c]; + route.settings.childRoutes = childRoutes; + } + _d.label = 4; case 4: _i++; return [3, 2]; diff --git a/dist/native-modules/map-routables.js.map b/dist/native-modules/map-routables.js.map index ba481e4..d5b490c 100644 --- a/dist/native-modules/map-routables.js.map +++ b/dist/native-modules/map-routables.js.map @@ -1 +1 @@ -{"version":3,"file":"map-routables.js","sourceRoot":"","sources":["../../src/map-routables.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AACzD,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AACxC,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAE5C,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAEtC,IAAM,qBAAqB,GAAG,MAAM,CAAC,iBAAiB,CAAkB,CAAC;AACzE,IAA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AC;;;;;CACF"} \ No newline at end of file diff --git a/dist/system/map-routables.js b/dist/system/map-routables.js index 95cbbba..cef0f88 100644 --- a/dist/system/map-routables.js +++ b/dist/system/map-routables.js @@ -44,9 +44,9 @@ System.register(["aurelia-dependency-injection", "aurelia-loader", "aurelia-meta routable_resource_1.RoutableResource.setTarget(ownModuleId, target); var resource = aurelia_metadata_1.metadata.getOrCreateOwn(metadataKey, routable_resource_1.RoutableResource, target); var loadChildRoutes = function () { return __awaiter(_this, void 0, void 0, function () { - var filterRoute, moduleIds, loader, routes, _i, moduleIds_1, id, trg, res, _a, _b, route; - return __generator(this, function (_c) { - switch (_c.label) { + var filterRoute, moduleIds, loader, routes, _i, moduleIds_1, id, trg, res, _a, _b, route, childRoutes, _c, routes_1, route; + return __generator(this, function (_d) { + switch (_d.label) { case 0: if (Array.isArray(resource.childRoutes)) { return [2, resource.childRoutes]; @@ -56,10 +56,10 @@ System.register(["aurelia-dependency-injection", "aurelia-loader", "aurelia-meta loader = aurelia_dependency_injection_1.Container.instance.get(aurelia_loader_1.Loader); return [4, loader.loadAllModules(moduleIds)]; case 1: - _c.sent(); + _d.sent(); routes = []; _i = 0, moduleIds_1 = moduleIds; - _c.label = 2; + _d.label = 2; case 2: if (!(_i < moduleIds_1.length)) return [3, 5]; id = moduleIds_1[_i]; @@ -77,8 +77,12 @@ System.register(["aurelia-dependency-injection", "aurelia-loader", "aurelia-meta if (!(eagerLoadChildRoutes && res.loadChildRoutes !== undefined)) return [3, 4]; return [4, res.loadChildRoutes()]; case 3: - _c.sent(); - _c.label = 4; + childRoutes = _d.sent(); + for (_c = 0, routes_1 = routes; _c < routes_1.length; _c++) { + route = routes_1[_c]; + route.settings.childRoutes = childRoutes; + } + _d.label = 4; case 4: _i++; return [3, 2]; diff --git a/dist/system/map-routables.js.map b/dist/system/map-routables.js.map index ca37b54..d43ca0e 100644 --- a/dist/system/map-routables.js.map +++ b/dist/system/map-routables.js.map @@ -1 +1 @@ -{"version":3,"file":"map-routables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/CHANGELOG.md index 146e0b7..675bca7 100644 --- a/doc/CHANGELOG.md +++ b/doc/CHANGELOG.md @@ -1,3 +1,8 @@ + +# [0.2.0](https://github.com/fkleuver/aurelia-router-metadata/compare/v0.1.0...v0.2.0) (2018-02-16) + + + # 0.1.0 (2018-02-13) diff --git a/package.json b/package.json index 48441d5..129041c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "aurelia-router-metadata", - "version": "0.1.0", + "version": "0.2.0", "description": "Adds decorator configuration with conventions and eager loading capabilities to aurelia-router", "keywords": [ "aurelia",