@alterior/platform-angular 3.0.0-rc.5 → 3.0.0
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/dist/index.js +1 -1
- package/dist/platform.js +17 -27
- package/dist/platform.js.map +1 -1
- package/dist/test.js +1 -1
- package/dist/test.js.map +1 -1
- package/package.json +7 -7
package/dist/index.js
CHANGED
package/dist/platform.js
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
/// <reference types="zone.js" />
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
exports.AngularPlatform = void 0;
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
const tslib_1 = require("tslib");
|
|
6
|
+
const runtime_1 = require("@alterior/runtime");
|
|
7
|
+
const di_1 = require("@alterior/di");
|
|
8
8
|
/**
|
|
9
9
|
* Provides support for using Alterior modules within a larger Angular host
|
|
10
10
|
* application.
|
|
@@ -24,9 +24,7 @@ var di_1 = require("@alterior/di");
|
|
|
24
24
|
* to be unable to properly resolve the dependency injections within your classes
|
|
25
25
|
* defined in the application project.
|
|
26
26
|
*/
|
|
27
|
-
|
|
28
|
-
function AngularPlatform() {
|
|
29
|
-
}
|
|
27
|
+
class AngularPlatform {
|
|
30
28
|
/**
|
|
31
29
|
* Bootstraps an Alterior application module and returns a set of Angular
|
|
32
30
|
* compatible dependency injection providers. You should then pass those providers
|
|
@@ -34,16 +32,16 @@ var AngularPlatform = /** @class */ (function () {
|
|
|
34
32
|
*
|
|
35
33
|
* @param entryModule
|
|
36
34
|
*/
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
return app.runtime.providers.map(
|
|
40
|
-
|
|
35
|
+
static bootstrap(entryModule) {
|
|
36
|
+
let app = runtime_1.Application.bootstrap(entryModule);
|
|
37
|
+
return app.runtime.providers.map(provider => {
|
|
38
|
+
let token = provider['provide'] ? provider['provide'] : provider;
|
|
41
39
|
return {
|
|
42
40
|
provide: token,
|
|
43
41
|
useValue: app.injector.get(token)
|
|
44
42
|
};
|
|
45
43
|
});
|
|
46
|
-
}
|
|
44
|
+
}
|
|
47
45
|
/**
|
|
48
46
|
* Creates a new dynamic Alterior application module which imports the given
|
|
49
47
|
* modules and returns a set of Angular-compatible dependency injection
|
|
@@ -53,22 +51,14 @@ var AngularPlatform = /** @class */ (function () {
|
|
|
53
51
|
*
|
|
54
52
|
* @param imports The set of Alterior modules you wish to bootstrap
|
|
55
53
|
*/
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
function DynamicEntryModule() {
|
|
63
|
-
}
|
|
64
|
-
DynamicEntryModule = (0, tslib_1.__decorate)([
|
|
65
|
-
(0, di_1.Module)({ imports: imports })
|
|
66
|
-
], DynamicEntryModule);
|
|
67
|
-
return DynamicEntryModule;
|
|
68
|
-
}());
|
|
54
|
+
static bridge(...imports) {
|
|
55
|
+
let DynamicEntryModule = class DynamicEntryModule {
|
|
56
|
+
};
|
|
57
|
+
DynamicEntryModule = (0, tslib_1.__decorate)([
|
|
58
|
+
(0, di_1.Module)({ imports })
|
|
59
|
+
], DynamicEntryModule);
|
|
69
60
|
return AngularPlatform.bootstrap(DynamicEntryModule);
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
}());
|
|
61
|
+
}
|
|
62
|
+
}
|
|
73
63
|
exports.AngularPlatform = AngularPlatform;
|
|
74
64
|
//# sourceMappingURL=platform.js.map
|
package/dist/platform.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"platform.js","sourceRoot":"","sources":["../src/platform.ts"],"names":[],"mappings":";AAAA,iCAAiC;;;;AAEjC
|
|
1
|
+
{"version":3,"file":"platform.js","sourceRoot":"","sources":["../src/platform.ts"],"names":[],"mappings":";AAAA,iCAAiC;;;;AAEjC,+CAAgD;AAChD,qCAAsC;AAGtC;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAa,eAAe;IAC1B;;;;;;OAMG;IACH,MAAM,CAAC,SAAS,CAAC,WAAW;QAC1B,IAAI,GAAG,GAAG,qBAAW,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC;QAC7C,OAAO,GAAG,CAAC,OAAO,CAAC,SAAS,CAAC,GAAG,CAAC,QAAQ,CAAC,EAAE;YAC1C,IAAI,KAAK,GAAG,QAAQ,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC;YACjE,OAAO;gBACL,OAAO,EAAE,KAAK;gBACd,QAAQ,EAAE,GAAG,CAAC,QAAQ,CAAC,GAAG,CAAC,KAAK,CAAC;aAClC,CAAA;QACH,CAAC,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;OAQG;IACH,MAAM,CAAC,MAAM,CAAC,GAAG,OAAO;QAEtB,IAAM,kBAAkB,GAAxB,MAAM,kBAAkB;SAAG,CAAA;QAArB,kBAAkB;YADvB,IAAA,WAAM,EAAC,EAAE,OAAO,EAAE,CAAC;WACd,kBAAkB,CAAG;QAE3B,OAAO,eAAe,CAAC,SAAS,CAAC,kBAAkB,CAAC,CAAC;IACvD,CAAC;CACF;AAlCD,0CAkCC"}
|
package/dist/test.js
CHANGED
package/dist/test.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"test.js","sourceRoot":"","sources":["../src/test.ts"],"names":[],"mappings":";;AAAA,
|
|
1
|
+
{"version":3,"file":"test.js","sourceRoot":"","sources":["../src/test.ts"],"names":[],"mappings":";;AAAA,mCAA+B;AAE/B,IAAA,cAAK,GAAE;KACF,OAAO,CAAC,CAAC,gBAAgB,CAAC,CAAC;KAC3B,GAAG,EAAE,CACT"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alterior/platform-angular",
|
|
3
|
-
"version": "3.0.0
|
|
3
|
+
"version": "3.0.0",
|
|
4
4
|
"description": "Use Alterior modules in Angular apps",
|
|
5
5
|
"author": "The Alterior Project (https://github.com/alterior-mvc)",
|
|
6
6
|
"license": "MIT",
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"docs": "typedoc ."
|
|
36
36
|
},
|
|
37
37
|
"peerDependencies": {
|
|
38
|
-
"@angular/core": "^9.1.0"
|
|
38
|
+
"@angular/core": "^9.1.0 || ^10 || ^11 || ^12 || ^13 || ^14"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
41
|
"@angular/core": "^9.1.9",
|
|
@@ -47,10 +47,10 @@
|
|
|
47
47
|
"zone.js": "^0.11.4"
|
|
48
48
|
},
|
|
49
49
|
"dependencies": {
|
|
50
|
-
"@alterior/annotations": "^3.0.0
|
|
51
|
-
"@alterior/common": "^3.0.0
|
|
52
|
-
"@alterior/di": "^3.0.0
|
|
53
|
-
"@alterior/runtime": "^3.0.0
|
|
50
|
+
"@alterior/annotations": "^3.0.0",
|
|
51
|
+
"@alterior/common": "^3.0.0",
|
|
52
|
+
"@alterior/di": "^3.0.0",
|
|
53
|
+
"@alterior/runtime": "^3.0.0"
|
|
54
54
|
},
|
|
55
|
-
"gitHead": "
|
|
55
|
+
"gitHead": "fd4bec44c069c95ed93d6126085c32a63eb67bf5"
|
|
56
56
|
}
|