##// END OF EJS Templates
tests moved under src/ folder...
cin -
r50:7a4fac383b10 di-typescript
parent child
Show More
1 NO CONTENT: new file 100644
NO CONTENT: new file 100644
@@ -0,0 +1,11
1 {
2 "extends": "../tsconfig.json",
3 "compilerOptions": {
4 "types": [
5 "@types/node"
6 ]
7 },
8 "include": [
9 "ts/**/*.ts"
10 ]
11 } No newline at end of file
@@ -1,456 +1,456
1 {
1 {
2 "name": "@implab/core",
2 "name": "@implab/core",
3 "version": "0.0.1-dev",
3 "version": "0.0.1-dev",
4 "lockfileVersion": 1,
4 "lockfileVersion": 1,
5 "requires": true,
5 "requires": true,
6 "dependencies": {
6 "dependencies": {
7 "@types/node": {
7 "@types/node": {
8 "version": "10.12.12",
8 "version": "10.12.12",
9 "resolved": "https://registry.npmjs.org/@types/node/-/node-10.12.12.tgz",
9 "resolved": "https://registry.npmjs.org/@types/node/-/node-10.12.12.tgz",
10 "integrity": "sha512-Pr+6JRiKkfsFvmU/LK68oBRCQeEg36TyAbPhc2xpez24OOZZCuoIhWGTd39VZy6nGafSbxzGouFPTFD/rR1A0A==",
10 "integrity": "sha512-Pr+6JRiKkfsFvmU/LK68oBRCQeEg36TyAbPhc2xpez24OOZZCuoIhWGTd39VZy6nGafSbxzGouFPTFD/rR1A0A==",
11 "dev": true
11 "dev": true
12 },
12 },
13 "@types/requirejs": {
13 "@types/requirejs": {
14 "version": "2.1.31",
14 "version": "2.1.31",
15 "resolved": "https://registry.npmjs.org/@types/requirejs/-/requirejs-2.1.31.tgz",
15 "resolved": "https://registry.npmjs.org/@types/requirejs/-/requirejs-2.1.31.tgz",
16 "integrity": "sha512-b2soeyuU76rMbcRJ4e0hEl0tbMhFwZeTC0VZnfuWlfGlk6BwWNsev6kFu/twKABPX29wkX84wU2o+cEJoXsiTw==",
16 "integrity": "sha512-b2soeyuU76rMbcRJ4e0hEl0tbMhFwZeTC0VZnfuWlfGlk6BwWNsev6kFu/twKABPX29wkX84wU2o+cEJoXsiTw==",
17 "dev": true
17 "dev": true
18 },
18 },
19 "@types/tape": {
19 "@types/tape": {
20 "version": "4.2.32",
20 "version": "4.2.32",
21 "resolved": "http://registry.npmjs.org/@types/tape/-/tape-4.2.32.tgz",
21 "resolved": "http://registry.npmjs.org/@types/tape/-/tape-4.2.32.tgz",
22 "integrity": "sha512-xil0KO5wkPoixdBWGIGolPv9dekf6dVkjjJLAFYchfKcd4DICou67rgGCIO7wAh3i5Ff/6j9IDgZz+GU9cMaqQ==",
22 "integrity": "sha512-xil0KO5wkPoixdBWGIGolPv9dekf6dVkjjJLAFYchfKcd4DICou67rgGCIO7wAh3i5Ff/6j9IDgZz+GU9cMaqQ==",
23 "dev": true,
23 "dev": true,
24 "requires": {
24 "requires": {
25 "@types/node": "*"
25 "@types/node": "*"
26 }
26 }
27 },
27 },
28 "balanced-match": {
28 "balanced-match": {
29 "version": "1.0.0",
29 "version": "1.0.0",
30 "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz",
30 "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz",
31 "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=",
31 "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=",
32 "dev": true
32 "dev": true
33 },
33 },
34 "brace-expansion": {
34 "brace-expansion": {
35 "version": "1.1.11",
35 "version": "1.1.11",
36 "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
36 "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
37 "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
37 "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
38 "dev": true,
38 "dev": true,
39 "requires": {
39 "requires": {
40 "balanced-match": "^1.0.0",
40 "balanced-match": "^1.0.0",
41 "concat-map": "0.0.1"
41 "concat-map": "0.0.1"
42 }
42 }
43 },
43 },
44 "concat-map": {
44 "concat-map": {
45 "version": "0.0.1",
45 "version": "0.0.1",
46 "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
46 "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
47 "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=",
47 "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=",
48 "dev": true
48 "dev": true
49 },
49 },
50 "core-util-is": {
50 "core-util-is": {
51 "version": "1.0.2",
51 "version": "1.0.2",
52 "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz",
52 "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz",
53 "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=",
53 "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=",
54 "dev": true
54 "dev": true
55 },
55 },
56 "deep-equal": {
56 "deep-equal": {
57 "version": "0.1.2",
57 "version": "0.1.2",
58 "resolved": "https://registry.npmjs.org/deep-equal/-/deep-equal-0.1.2.tgz",
58 "resolved": "https://registry.npmjs.org/deep-equal/-/deep-equal-0.1.2.tgz",
59 "integrity": "sha1-skbCuApXCkfBG+HZvRBw7IeLh84=",
59 "integrity": "sha1-skbCuApXCkfBG+HZvRBw7IeLh84=",
60 "dev": true
60 "dev": true
61 },
61 },
62 "define-properties": {
62 "define-properties": {
63 "version": "1.1.3",
63 "version": "1.1.3",
64 "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz",
64 "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz",
65 "integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==",
65 "integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==",
66 "dev": true,
66 "dev": true,
67 "requires": {
67 "requires": {
68 "object-keys": "^1.0.12"
68 "object-keys": "^1.0.12"
69 },
69 },
70 "dependencies": {
70 "dependencies": {
71 "object-keys": {
71 "object-keys": {
72 "version": "1.0.12",
72 "version": "1.0.12",
73 "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.0.12.tgz",
73 "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.0.12.tgz",
74 "integrity": "sha512-FTMyFUm2wBcGHnH2eXmz7tC6IwlqQZ6mVZ+6dm6vZ4IQIHjs6FdNsQBuKGPuUUUY6NfJw2PshC08Tn6LzLDOag==",
74 "integrity": "sha512-FTMyFUm2wBcGHnH2eXmz7tC6IwlqQZ6mVZ+6dm6vZ4IQIHjs6FdNsQBuKGPuUUUY6NfJw2PshC08Tn6LzLDOag==",
75 "dev": true
75 "dev": true
76 }
76 }
77 }
77 }
78 },
78 },
79 "defined": {
79 "defined": {
80 "version": "0.0.0",
80 "version": "0.0.0",
81 "resolved": "https://registry.npmjs.org/defined/-/defined-0.0.0.tgz",
81 "resolved": "https://registry.npmjs.org/defined/-/defined-0.0.0.tgz",
82 "integrity": "sha1-817qfXBekzuvE7LwOz+D2SFAOz4=",
82 "integrity": "sha1-817qfXBekzuvE7LwOz+D2SFAOz4=",
83 "dev": true
83 "dev": true
84 },
84 },
85 "dojo": {
85 "dojo": {
86 "version": "1.14.2",
86 "version": "1.14.2",
87 "resolved": "https://registry.npmjs.org/dojo/-/dojo-1.14.2.tgz",
87 "resolved": "https://registry.npmjs.org/dojo/-/dojo-1.14.2.tgz",
88 "integrity": "sha512-TI+Ytgfh/VfmHWERp45Jte6NFMdoJTPsvUP/uzJUvAXET8FP2h442LePWWJ/q/xZ4V0V8OtdJhx8It/GB+Zbxg==",
88 "integrity": "sha512-TI+Ytgfh/VfmHWERp45Jte6NFMdoJTPsvUP/uzJUvAXET8FP2h442LePWWJ/q/xZ4V0V8OtdJhx8It/GB+Zbxg==",
89 "dev": true
89 "dev": true
90 },
90 },
91 "duplexer": {
91 "duplexer": {
92 "version": "0.1.1",
92 "version": "0.1.1",
93 "resolved": "http://registry.npmjs.org/duplexer/-/duplexer-0.1.1.tgz",
93 "resolved": "https://registry.npmjs.org/duplexer/-/duplexer-0.1.1.tgz",
94 "integrity": "sha1-rOb/gIwc5mtX0ev5eXessCM0z8E=",
94 "integrity": "sha1-rOb/gIwc5mtX0ev5eXessCM0z8E=",
95 "dev": true
95 "dev": true
96 },
96 },
97 "es-abstract": {
97 "es-abstract": {
98 "version": "1.12.0",
98 "version": "1.12.0",
99 "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.12.0.tgz",
99 "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.12.0.tgz",
100 "integrity": "sha512-C8Fx/0jFmV5IPoMOFPA9P9G5NtqW+4cOPit3MIuvR2t7Ag2K15EJTpxnHAYTzL+aYQJIESYeXZmDBfOBE1HcpA==",
100 "integrity": "sha512-C8Fx/0jFmV5IPoMOFPA9P9G5NtqW+4cOPit3MIuvR2t7Ag2K15EJTpxnHAYTzL+aYQJIESYeXZmDBfOBE1HcpA==",
101 "dev": true,
101 "dev": true,
102 "requires": {
102 "requires": {
103 "es-to-primitive": "^1.1.1",
103 "es-to-primitive": "^1.1.1",
104 "function-bind": "^1.1.1",
104 "function-bind": "^1.1.1",
105 "has": "^1.0.1",
105 "has": "^1.0.1",
106 "is-callable": "^1.1.3",
106 "is-callable": "^1.1.3",
107 "is-regex": "^1.0.4"
107 "is-regex": "^1.0.4"
108 }
108 }
109 },
109 },
110 "es-to-primitive": {
110 "es-to-primitive": {
111 "version": "1.2.0",
111 "version": "1.2.0",
112 "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.0.tgz",
112 "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.0.tgz",
113 "integrity": "sha512-qZryBOJjV//LaxLTV6UC//WewneB3LcXOL9NP++ozKVXsIIIpm/2c13UDiD9Jp2eThsecw9m3jPqDwTyobcdbg==",
113 "integrity": "sha512-qZryBOJjV//LaxLTV6UC//WewneB3LcXOL9NP++ozKVXsIIIpm/2c13UDiD9Jp2eThsecw9m3jPqDwTyobcdbg==",
114 "dev": true,
114 "dev": true,
115 "requires": {
115 "requires": {
116 "is-callable": "^1.1.4",
116 "is-callable": "^1.1.4",
117 "is-date-object": "^1.0.1",
117 "is-date-object": "^1.0.1",
118 "is-symbol": "^1.0.2"
118 "is-symbol": "^1.0.2"
119 }
119 }
120 },
120 },
121 "faucet": {
121 "faucet": {
122 "version": "0.0.1",
122 "version": "0.0.1",
123 "resolved": "https://registry.npmjs.org/faucet/-/faucet-0.0.1.tgz",
123 "resolved": "https://registry.npmjs.org/faucet/-/faucet-0.0.1.tgz",
124 "integrity": "sha1-WX3PHSGJosBiMhtZHo8VHtIDnZw=",
124 "integrity": "sha1-WX3PHSGJosBiMhtZHo8VHtIDnZw=",
125 "dev": true,
125 "dev": true,
126 "requires": {
126 "requires": {
127 "defined": "0.0.0",
127 "defined": "0.0.0",
128 "duplexer": "~0.1.1",
128 "duplexer": "~0.1.1",
129 "minimist": "0.0.5",
129 "minimist": "0.0.5",
130 "sprintf": "~0.1.3",
130 "sprintf": "~0.1.3",
131 "tap-parser": "~0.4.0",
131 "tap-parser": "~0.4.0",
132 "tape": "~2.3.2",
132 "tape": "~2.3.2",
133 "through2": "~0.2.3"
133 "through2": "~0.2.3"
134 },
134 },
135 "dependencies": {
135 "dependencies": {
136 "tape": {
136 "tape": {
137 "version": "2.3.3",
137 "version": "2.3.3",
138 "resolved": "http://registry.npmjs.org/tape/-/tape-2.3.3.tgz",
138 "resolved": "https://registry.npmjs.org/tape/-/tape-2.3.3.tgz",
139 "integrity": "sha1-Lnzgox3wn41oUWZKcYQuDKUFevc=",
139 "integrity": "sha1-Lnzgox3wn41oUWZKcYQuDKUFevc=",
140 "dev": true,
140 "dev": true,
141 "requires": {
141 "requires": {
142 "deep-equal": "~0.1.0",
142 "deep-equal": "~0.1.0",
143 "defined": "~0.0.0",
143 "defined": "~0.0.0",
144 "inherits": "~2.0.1",
144 "inherits": "~2.0.1",
145 "jsonify": "~0.0.0",
145 "jsonify": "~0.0.0",
146 "resumer": "~0.0.0",
146 "resumer": "~0.0.0",
147 "through": "~2.3.4"
147 "through": "~2.3.4"
148 }
148 }
149 }
149 }
150 }
150 }
151 },
151 },
152 "for-each": {
152 "for-each": {
153 "version": "0.3.3",
153 "version": "0.3.3",
154 "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.3.tgz",
154 "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.3.tgz",
155 "integrity": "sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==",
155 "integrity": "sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==",
156 "dev": true,
156 "dev": true,
157 "requires": {
157 "requires": {
158 "is-callable": "^1.1.3"
158 "is-callable": "^1.1.3"
159 }
159 }
160 },
160 },
161 "fs.realpath": {
161 "fs.realpath": {
162 "version": "1.0.0",
162 "version": "1.0.0",
163 "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",
163 "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",
164 "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=",
164 "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=",
165 "dev": true
165 "dev": true
166 },
166 },
167 "function-bind": {
167 "function-bind": {
168 "version": "1.1.1",
168 "version": "1.1.1",
169 "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz",
169 "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz",
170 "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==",
170 "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==",
171 "dev": true
171 "dev": true
172 },
172 },
173 "glob": {
173 "glob": {
174 "version": "7.1.3",
174 "version": "7.1.3",
175 "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz",
175 "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz",
176 "integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==",
176 "integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==",
177 "dev": true,
177 "dev": true,
178 "requires": {
178 "requires": {
179 "fs.realpath": "^1.0.0",
179 "fs.realpath": "^1.0.0",
180 "inflight": "^1.0.4",
180 "inflight": "^1.0.4",
181 "inherits": "2",
181 "inherits": "2",
182 "minimatch": "^3.0.4",
182 "minimatch": "^3.0.4",
183 "once": "^1.3.0",
183 "once": "^1.3.0",
184 "path-is-absolute": "^1.0.0"
184 "path-is-absolute": "^1.0.0"
185 }
185 }
186 },
186 },
187 "has": {
187 "has": {
188 "version": "1.0.3",
188 "version": "1.0.3",
189 "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz",
189 "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz",
190 "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==",
190 "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==",
191 "dev": true,
191 "dev": true,
192 "requires": {
192 "requires": {
193 "function-bind": "^1.1.1"
193 "function-bind": "^1.1.1"
194 }
194 }
195 },
195 },
196 "has-symbols": {
196 "has-symbols": {
197 "version": "1.0.0",
197 "version": "1.0.0",
198 "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.0.tgz",
198 "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.0.tgz",
199 "integrity": "sha1-uhqPGvKg/DllD1yFA2dwQSIGO0Q=",
199 "integrity": "sha1-uhqPGvKg/DllD1yFA2dwQSIGO0Q=",
200 "dev": true
200 "dev": true
201 },
201 },
202 "inflight": {
202 "inflight": {
203 "version": "1.0.6",
203 "version": "1.0.6",
204 "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz",
204 "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz",
205 "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=",
205 "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=",
206 "dev": true,
206 "dev": true,
207 "requires": {
207 "requires": {
208 "once": "^1.3.0",
208 "once": "^1.3.0",
209 "wrappy": "1"
209 "wrappy": "1"
210 }
210 }
211 },
211 },
212 "inherits": {
212 "inherits": {
213 "version": "2.0.3",
213 "version": "2.0.3",
214 "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz",
214 "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz",
215 "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=",
215 "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=",
216 "dev": true
216 "dev": true
217 },
217 },
218 "is-callable": {
218 "is-callable": {
219 "version": "1.1.4",
219 "version": "1.1.4",
220 "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.1.4.tgz",
220 "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.1.4.tgz",
221 "integrity": "sha512-r5p9sxJjYnArLjObpjA4xu5EKI3CuKHkJXMhT7kwbpUyIFD1n5PMAsoPvWnvtZiNz7LjkYDRZhd7FlI0eMijEA==",
221 "integrity": "sha512-r5p9sxJjYnArLjObpjA4xu5EKI3CuKHkJXMhT7kwbpUyIFD1n5PMAsoPvWnvtZiNz7LjkYDRZhd7FlI0eMijEA==",
222 "dev": true
222 "dev": true
223 },
223 },
224 "is-date-object": {
224 "is-date-object": {
225 "version": "1.0.1",
225 "version": "1.0.1",
226 "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.1.tgz",
226 "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.1.tgz",
227 "integrity": "sha1-mqIOtq7rv/d/vTPnTKAbM1gdOhY=",
227 "integrity": "sha1-mqIOtq7rv/d/vTPnTKAbM1gdOhY=",
228 "dev": true
228 "dev": true
229 },
229 },
230 "is-regex": {
230 "is-regex": {
231 "version": "1.0.4",
231 "version": "1.0.4",
232 "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.0.4.tgz",
232 "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.0.4.tgz",
233 "integrity": "sha1-VRdIm1RwkbCTDglWVM7SXul+lJE=",
233 "integrity": "sha1-VRdIm1RwkbCTDglWVM7SXul+lJE=",
234 "dev": true,
234 "dev": true,
235 "requires": {
235 "requires": {
236 "has": "^1.0.1"
236 "has": "^1.0.1"
237 }
237 }
238 },
238 },
239 "is-symbol": {
239 "is-symbol": {
240 "version": "1.0.2",
240 "version": "1.0.2",
241 "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.2.tgz",
241 "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.2.tgz",
242 "integrity": "sha512-HS8bZ9ox60yCJLH9snBpIwv9pYUAkcuLhSA1oero1UB5y9aiQpRA8y2ex945AOtCZL1lJDeIk3G5LthswI46Lw==",
242 "integrity": "sha512-HS8bZ9ox60yCJLH9snBpIwv9pYUAkcuLhSA1oero1UB5y9aiQpRA8y2ex945AOtCZL1lJDeIk3G5LthswI46Lw==",
243 "dev": true,
243 "dev": true,
244 "requires": {
244 "requires": {
245 "has-symbols": "^1.0.0"
245 "has-symbols": "^1.0.0"
246 }
246 }
247 },
247 },
248 "isarray": {
248 "isarray": {
249 "version": "0.0.1",
249 "version": "0.0.1",
250 "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz",
250 "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz",
251 "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=",
251 "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=",
252 "dev": true
252 "dev": true
253 },
253 },
254 "jsonify": {
254 "jsonify": {
255 "version": "0.0.0",
255 "version": "0.0.0",
256 "resolved": "https://registry.npmjs.org/jsonify/-/jsonify-0.0.0.tgz",
256 "resolved": "https://registry.npmjs.org/jsonify/-/jsonify-0.0.0.tgz",
257 "integrity": "sha1-LHS27kHZPKUbe1qu6PUDYx0lKnM=",
257 "integrity": "sha1-LHS27kHZPKUbe1qu6PUDYx0lKnM=",
258 "dev": true
258 "dev": true
259 },
259 },
260 "minimatch": {
260 "minimatch": {
261 "version": "3.0.4",
261 "version": "3.0.4",
262 "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz",
262 "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz",
263 "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==",
263 "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==",
264 "dev": true,
264 "dev": true,
265 "requires": {
265 "requires": {
266 "brace-expansion": "^1.1.7"
266 "brace-expansion": "^1.1.7"
267 }
267 }
268 },
268 },
269 "minimist": {
269 "minimist": {
270 "version": "0.0.5",
270 "version": "0.0.5",
271 "resolved": "http://registry.npmjs.org/minimist/-/minimist-0.0.5.tgz",
271 "resolved": "http://registry.npmjs.org/minimist/-/minimist-0.0.5.tgz",
272 "integrity": "sha1-16oye87PUY+RBqxrjwA/o7zqhWY=",
272 "integrity": "sha1-16oye87PUY+RBqxrjwA/o7zqhWY=",
273 "dev": true
273 "dev": true
274 },
274 },
275 "object-inspect": {
275 "object-inspect": {
276 "version": "1.6.0",
276 "version": "1.6.0",
277 "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.6.0.tgz",
277 "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.6.0.tgz",
278 "integrity": "sha512-GJzfBZ6DgDAmnuaM3104jR4s1Myxr3Y3zfIyN4z3UdqN69oSRacNK8UhnobDdC+7J2AHCjGwxQubNJfE70SXXQ==",
278 "integrity": "sha512-GJzfBZ6DgDAmnuaM3104jR4s1Myxr3Y3zfIyN4z3UdqN69oSRacNK8UhnobDdC+7J2AHCjGwxQubNJfE70SXXQ==",
279 "dev": true
279 "dev": true
280 },
280 },
281 "object-keys": {
281 "object-keys": {
282 "version": "0.4.0",
282 "version": "0.4.0",
283 "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-0.4.0.tgz",
283 "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-0.4.0.tgz",
284 "integrity": "sha1-KKaq50KN0sOpLz2V8hM13SBOAzY=",
284 "integrity": "sha1-KKaq50KN0sOpLz2V8hM13SBOAzY=",
285 "dev": true
285 "dev": true
286 },
286 },
287 "once": {
287 "once": {
288 "version": "1.4.0",
288 "version": "1.4.0",
289 "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
289 "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
290 "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=",
290 "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=",
291 "dev": true,
291 "dev": true,
292 "requires": {
292 "requires": {
293 "wrappy": "1"
293 "wrappy": "1"
294 }
294 }
295 },
295 },
296 "path-is-absolute": {
296 "path-is-absolute": {
297 "version": "1.0.1",
297 "version": "1.0.1",
298 "resolved": "http://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz",
298 "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz",
299 "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=",
299 "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=",
300 "dev": true
300 "dev": true
301 },
301 },
302 "path-parse": {
302 "path-parse": {
303 "version": "1.0.6",
303 "version": "1.0.6",
304 "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz",
304 "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz",
305 "integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==",
305 "integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==",
306 "dev": true
306 "dev": true
307 },
307 },
308 "readable-stream": {
308 "readable-stream": {
309 "version": "1.1.14",
309 "version": "1.1.14",
310 "resolved": "http://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz",
310 "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz",
311 "integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=",
311 "integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=",
312 "dev": true,
312 "dev": true,
313 "requires": {
313 "requires": {
314 "core-util-is": "~1.0.0",
314 "core-util-is": "~1.0.0",
315 "inherits": "~2.0.1",
315 "inherits": "~2.0.1",
316 "isarray": "0.0.1",
316 "isarray": "0.0.1",
317 "string_decoder": "~0.10.x"
317 "string_decoder": "~0.10.x"
318 }
318 }
319 },
319 },
320 "requirejs": {
320 "requirejs": {
321 "version": "2.3.6",
321 "version": "2.3.6",
322 "resolved": "https://registry.npmjs.org/requirejs/-/requirejs-2.3.6.tgz",
322 "resolved": "https://registry.npmjs.org/requirejs/-/requirejs-2.3.6.tgz",
323 "integrity": "sha512-ipEzlWQe6RK3jkzikgCupiTbTvm4S0/CAU5GlgptkN5SO6F3u0UD0K18wy6ErDqiCyP4J4YYe1HuAShvsxePLg==",
323 "integrity": "sha512-ipEzlWQe6RK3jkzikgCupiTbTvm4S0/CAU5GlgptkN5SO6F3u0UD0K18wy6ErDqiCyP4J4YYe1HuAShvsxePLg==",
324 "dev": true
324 "dev": true
325 },
325 },
326 "resolve": {
326 "resolve": {
327 "version": "1.7.1",
327 "version": "1.7.1",
328 "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.7.1.tgz",
328 "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.7.1.tgz",
329 "integrity": "sha512-c7rwLofp8g1U+h1KNyHL/jicrKg1Ek4q+Lr33AL65uZTinUZHe30D5HlyN5V9NW0JX1D5dXQ4jqW5l7Sy/kGfw==",
329 "integrity": "sha512-c7rwLofp8g1U+h1KNyHL/jicrKg1Ek4q+Lr33AL65uZTinUZHe30D5HlyN5V9NW0JX1D5dXQ4jqW5l7Sy/kGfw==",
330 "dev": true,
330 "dev": true,
331 "requires": {
331 "requires": {
332 "path-parse": "^1.0.5"
332 "path-parse": "^1.0.5"
333 }
333 }
334 },
334 },
335 "resumer": {
335 "resumer": {
336 "version": "0.0.0",
336 "version": "0.0.0",
337 "resolved": "https://registry.npmjs.org/resumer/-/resumer-0.0.0.tgz",
337 "resolved": "https://registry.npmjs.org/resumer/-/resumer-0.0.0.tgz",
338 "integrity": "sha1-8ej0YeQGS6Oegq883CqMiT0HZ1k=",
338 "integrity": "sha1-8ej0YeQGS6Oegq883CqMiT0HZ1k=",
339 "dev": true,
339 "dev": true,
340 "requires": {
340 "requires": {
341 "through": "~2.3.4"
341 "through": "~2.3.4"
342 }
342 }
343 },
343 },
344 "sprintf": {
344 "sprintf": {
345 "version": "0.1.5",
345 "version": "0.1.5",
346 "resolved": "https://registry.npmjs.org/sprintf/-/sprintf-0.1.5.tgz",
346 "resolved": "https://registry.npmjs.org/sprintf/-/sprintf-0.1.5.tgz",
347 "integrity": "sha1-j4PjmpMXwaUCy324BQ5Rxnn27c8=",
347 "integrity": "sha1-j4PjmpMXwaUCy324BQ5Rxnn27c8=",
348 "dev": true
348 "dev": true
349 },
349 },
350 "string.prototype.trim": {
350 "string.prototype.trim": {
351 "version": "1.1.2",
351 "version": "1.1.2",
352 "resolved": "https://registry.npmjs.org/string.prototype.trim/-/string.prototype.trim-1.1.2.tgz",
352 "resolved": "https://registry.npmjs.org/string.prototype.trim/-/string.prototype.trim-1.1.2.tgz",
353 "integrity": "sha1-0E3iyJ4Tf019IG8Ia17S+ua+jOo=",
353 "integrity": "sha1-0E3iyJ4Tf019IG8Ia17S+ua+jOo=",
354 "dev": true,
354 "dev": true,
355 "requires": {
355 "requires": {
356 "define-properties": "^1.1.2",
356 "define-properties": "^1.1.2",
357 "es-abstract": "^1.5.0",
357 "es-abstract": "^1.5.0",
358 "function-bind": "^1.0.2"
358 "function-bind": "^1.0.2"
359 }
359 }
360 },
360 },
361 "string_decoder": {
361 "string_decoder": {
362 "version": "0.10.31",
362 "version": "0.10.31",
363 "resolved": "http://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz",
363 "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz",
364 "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=",
364 "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=",
365 "dev": true
365 "dev": true
366 },
366 },
367 "tap-parser": {
367 "tap-parser": {
368 "version": "0.4.3",
368 "version": "0.4.3",
369 "resolved": "https://registry.npmjs.org/tap-parser/-/tap-parser-0.4.3.tgz",
369 "resolved": "https://registry.npmjs.org/tap-parser/-/tap-parser-0.4.3.tgz",
370 "integrity": "sha1-pOrhkMENdsehEZIf84u+TVjwnuo=",
370 "integrity": "sha1-pOrhkMENdsehEZIf84u+TVjwnuo=",
371 "dev": true,
371 "dev": true,
372 "requires": {
372 "requires": {
373 "inherits": "~2.0.1",
373 "inherits": "~2.0.1",
374 "readable-stream": "~1.1.11"
374 "readable-stream": "~1.1.11"
375 }
375 }
376 },
376 },
377 "tape": {
377 "tape": {
378 "version": "4.9.1",
378 "version": "4.9.1",
379 "resolved": "https://registry.npmjs.org/tape/-/tape-4.9.1.tgz",
379 "resolved": "https://registry.npmjs.org/tape/-/tape-4.9.1.tgz",
380 "integrity": "sha512-6fKIXknLpoe/Jp4rzHKFPpJUHDHDqn8jus99IfPnHIjyz78HYlefTGD3b5EkbQzuLfaEvmfPK3IolLgq2xT3kw==",
380 "integrity": "sha512-6fKIXknLpoe/Jp4rzHKFPpJUHDHDqn8jus99IfPnHIjyz78HYlefTGD3b5EkbQzuLfaEvmfPK3IolLgq2xT3kw==",
381 "dev": true,
381 "dev": true,
382 "requires": {
382 "requires": {
383 "deep-equal": "~1.0.1",
383 "deep-equal": "~1.0.1",
384 "defined": "~1.0.0",
384 "defined": "~1.0.0",
385 "for-each": "~0.3.3",
385 "for-each": "~0.3.3",
386 "function-bind": "~1.1.1",
386 "function-bind": "~1.1.1",
387 "glob": "~7.1.2",
387 "glob": "~7.1.2",
388 "has": "~1.0.3",
388 "has": "~1.0.3",
389 "inherits": "~2.0.3",
389 "inherits": "~2.0.3",
390 "minimist": "~1.2.0",
390 "minimist": "~1.2.0",
391 "object-inspect": "~1.6.0",
391 "object-inspect": "~1.6.0",
392 "resolve": "~1.7.1",
392 "resolve": "~1.7.1",
393 "resumer": "~0.0.0",
393 "resumer": "~0.0.0",
394 "string.prototype.trim": "~1.1.2",
394 "string.prototype.trim": "~1.1.2",
395 "through": "~2.3.8"
395 "through": "~2.3.8"
396 },
396 },
397 "dependencies": {
397 "dependencies": {
398 "deep-equal": {
398 "deep-equal": {
399 "version": "1.0.1",
399 "version": "1.0.1",
400 "resolved": "https://registry.npmjs.org/deep-equal/-/deep-equal-1.0.1.tgz",
400 "resolved": "https://registry.npmjs.org/deep-equal/-/deep-equal-1.0.1.tgz",
401 "integrity": "sha1-9dJgKStmDghO/0zbyfCK0yR0SLU=",
401 "integrity": "sha1-9dJgKStmDghO/0zbyfCK0yR0SLU=",
402 "dev": true
402 "dev": true
403 },
403 },
404 "defined": {
404 "defined": {
405 "version": "1.0.0",
405 "version": "1.0.0",
406 "resolved": "https://registry.npmjs.org/defined/-/defined-1.0.0.tgz",
406 "resolved": "https://registry.npmjs.org/defined/-/defined-1.0.0.tgz",
407 "integrity": "sha1-yY2bzvdWdBiOEQlpFRGZ45sfppM=",
407 "integrity": "sha1-yY2bzvdWdBiOEQlpFRGZ45sfppM=",
408 "dev": true
408 "dev": true
409 },
409 },
410 "minimist": {
410 "minimist": {
411 "version": "1.2.0",
411 "version": "1.2.0",
412 "resolved": "http://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz",
412 "resolved": "http://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz",
413 "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=",
413 "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=",
414 "dev": true
414 "dev": true
415 }
415 }
416 }
416 }
417 },
417 },
418 "through": {
418 "through": {
419 "version": "2.3.8",
419 "version": "2.3.8",
420 "resolved": "http://registry.npmjs.org/through/-/through-2.3.8.tgz",
420 "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz",
421 "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=",
421 "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=",
422 "dev": true
422 "dev": true
423 },
423 },
424 "through2": {
424 "through2": {
425 "version": "0.2.3",
425 "version": "0.2.3",
426 "resolved": "http://registry.npmjs.org/through2/-/through2-0.2.3.tgz",
426 "resolved": "https://registry.npmjs.org/through2/-/through2-0.2.3.tgz",
427 "integrity": "sha1-6zKE2k6jEbbMis42U3SKUqvyWj8=",
427 "integrity": "sha1-6zKE2k6jEbbMis42U3SKUqvyWj8=",
428 "dev": true,
428 "dev": true,
429 "requires": {
429 "requires": {
430 "readable-stream": "~1.1.9",
430 "readable-stream": "~1.1.9",
431 "xtend": "~2.1.1"
431 "xtend": "~2.1.1"
432 }
432 }
433 },
433 },
434 "typescript": {
434 "typescript": {
435 "version": "3.2.1",
435 "version": "3.2.1",
436 "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.2.1.tgz",
436 "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.2.1.tgz",
437 "integrity": "sha512-jw7P2z/h6aPT4AENXDGjcfHTu5CSqzsbZc6YlUIebTyBAq8XaKp78x7VcSh30xwSCcsu5irZkYZUSFP1MrAMbg==",
437 "integrity": "sha512-jw7P2z/h6aPT4AENXDGjcfHTu5CSqzsbZc6YlUIebTyBAq8XaKp78x7VcSh30xwSCcsu5irZkYZUSFP1MrAMbg==",
438 "dev": true
438 "dev": true
439 },
439 },
440 "wrappy": {
440 "wrappy": {
441 "version": "1.0.2",
441 "version": "1.0.2",
442 "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
442 "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
443 "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=",
443 "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=",
444 "dev": true
444 "dev": true
445 },
445 },
446 "xtend": {
446 "xtend": {
447 "version": "2.1.2",
447 "version": "2.1.2",
448 "resolved": "https://registry.npmjs.org/xtend/-/xtend-2.1.2.tgz",
448 "resolved": "https://registry.npmjs.org/xtend/-/xtend-2.1.2.tgz",
449 "integrity": "sha1-bv7MKk2tjmlixJAbM3znuoe10os=",
449 "integrity": "sha1-bv7MKk2tjmlixJAbM3znuoe10os=",
450 "dev": true,
450 "dev": true,
451 "requires": {
451 "requires": {
452 "object-keys": "~0.4.0"
452 "object-keys": "~0.4.0"
453 }
453 }
454 }
454 }
455 }
455 }
456 }
456 }
@@ -1,35 +1,40
1 import { Uuid } from "../Uuid";
1 import { Uuid } from "../Uuid";
2 import { argumentNotEmptyString } from "../safe";
2 import { argumentNotEmptyString, argumentNotNull } from "../safe";
3 import { TraceSource } from "../log/TraceSource";
3 import { TraceSource } from "../log/TraceSource";
4
4
5 export const rjs = require;
6
7 declare function define(name: string, modules: string[], cb?: (...args: any[]) => any, eb?: (e) => any): void;
8 declare function define(modules: string[], cb?: (...args: any[]) => any, eb?: (e) => any): void;
9
10 const trace = TraceSource.get("@implab/core/di/RequireJsHelper");
5 const trace = TraceSource.get("@implab/core/di/RequireJsHelper");
11
6
12 export async function createContextRequire(moduleName: string): Promise<Require> {
7 export async function createContextRequire(moduleName: string): Promise<Require> {
13 argumentNotEmptyString(moduleName, "moduleName");
8 argumentNotEmptyString(moduleName, "moduleName");
14
9
15 const parts = moduleName.split("/");
10 const parts = moduleName.split("/");
16 if (parts[0] === ".")
11 if (parts[0] === ".")
17 throw new Error("An absolute module path is required");
12 throw new Error("An absolute module path is required");
18
13
19 if (parts.length > 1)
14 if (parts.length > 1)
20 parts.splice(-1, 1, Uuid());
15 parts.splice(-1, 1, Uuid());
21 else
16 else
22 parts.push(Uuid());
17 parts.push(Uuid());
23
18
24 const shim = parts.join("/");
19 const shim = parts.join("/");
25
20
26 trace.debug(`define shim ${shim}`);
21 trace.debug(`define shim ${shim}`);
27
22
28 return new Promise<Require>(fulfill => {
23 return new Promise<Require>(cb => {
29 define(shim, ["require"], r => {
24 define(shim, ["require"], r => {
30 trace.debug("shim resolved");
25 trace.debug("shim resolved");
31 return r;
26 return r;
32 });
27 });
33 require([shim], fulfill);
28 require([shim], cb);
34 });
29 });
35 }
30 }
31
32 export function makeResolver(req: Require) {
33 argumentNotNull(req, "req");
34
35 return (name: string) => {
36 return new Promise<any>((cb, eb) => {
37 req([name], cb, eb);
38 });
39 };
40 }
@@ -1,353 +1,322
1 import {
1 import {
2 ServiceRegistration,
2 ServiceRegistration,
3 TypeRegistration,
3 TypeRegistration,
4 FactoryRegistration,
4 FactoryRegistration,
5 ServiceMap,
5 ServiceMap,
6 isDescriptor,
6 isDescriptor,
7 isDependencyRegistration,
7 isDependencyRegistration,
8 DependencyRegistration,
8 DependencyRegistration,
9 ValueRegistration,
9 ValueRegistration,
10 ActivationType,
10 ActivationType,
11 isValueRegistration,
11 isValueRegistration,
12 isTypeRegistration,
12 isTypeRegistration,
13 isFactoryRegistration
13 isFactoryRegistration
14 } from "./interfaces";
14 } from "./interfaces";
15
15
16 import { argumentNotEmptyString, isPrimitive, isPromise, delegate, argumentOfType, argumentNotNull, get } from "../safe";
16 import { argumentNotEmptyString, isPrimitive, isPromise, delegate, argumentOfType, argumentNotNull, get } from "../safe";
17 import { AggregateDescriptor } from "./AggregateDescriptor";
17 import { AggregateDescriptor } from "./AggregateDescriptor";
18 import { ValueDescriptor } from "./ValueDescriptor";
18 import { ValueDescriptor } from "./ValueDescriptor";
19 import { Container } from "./Container";
19 import { Container } from "./Container";
20 import { ReferenceDescriptor } from "./ReferenceDescriptor";
20 import { ReferenceDescriptor } from "./ReferenceDescriptor";
21 import { TypeServiceDescriptor } from "./TypeServiceDescriptor";
21 import { TypeServiceDescriptor } from "./TypeServiceDescriptor";
22 import { FactoryServiceDescriptor } from "./FactoryServiceDescriptor";
22 import { FactoryServiceDescriptor } from "./FactoryServiceDescriptor";
23 import { rjs, createContextRequire } from "./RequireJsHelper";
24 import { TraceSource } from "../log/TraceSource";
23 import { TraceSource } from "../log/TraceSource";
25 import { ConfigError } from "./ConfigError";
24 import { ConfigError } from "./ConfigError";
26 import { Cancellation } from "../Cancellation";
25 import { Cancellation } from "../Cancellation";
27
26
28 const trace = TraceSource.get("@implab/core/di/Configuration");
27 const trace = TraceSource.get("@implab/core/di/Configuration");
29
28
30 async function mapAll(data: object | any[], map?: (v, k) => any): Promise<any> {
29 async function mapAll(data: object | any[], map?: (v, k) => any): Promise<any> {
31 if (data instanceof Array) {
30 if (data instanceof Array) {
32 return Promise.all(map ? data.map(map) : data);
31 return Promise.all(map ? data.map(map) : data);
33 } else {
32 } else {
34 const keys = Object.keys(data);
33 const keys = Object.keys(data);
35
34
36 const o: any = {};
35 const o: any = {};
37
36
38 await Promise.all(keys.map(async k => {
37 await Promise.all(keys.map(async k => {
39 const v = map ? map(data[k], k) : data[k];
38 const v = map ? map(data[k], k) : data[k];
40 o[k] = isPromise(v) ? await v : v;
39 o[k] = isPromise(v) ? await v : v;
41 }));
40 }));
42
41
43 return o;
42 return o;
44 }
43 }
45 }
44 }
46
45
47 interface MapOf<T> {
46 type Resolver = (qname: string) => any;
48 [key: string]: T;
49 }
50
47
51 type _key = string | number;
48 type _key = string | number;
52
49
53 export class Configuration {
50 export class Configuration {
54
51
55 _hasInnerDescriptors = false;
52 _hasInnerDescriptors = false;
56
53
57 _container: Container;
54 _container: Container;
58
55
59 _path: Array<_key>;
56 _path: Array<_key>;
60
57
61 _configName: string;
58 _configName: string;
62
59
63 _require = rjs;
60 _require: Resolver;
64
61
65 constructor(container: Container) {
62 constructor(container: Container) {
66 argumentNotNull(container, container);
63 argumentNotNull(container, container);
67 this._container = container;
64 this._container = container;
68 this._path = [];
65 this._path = [];
69 }
66 }
70
67
71 async loadConfiguration(moduleName: string, ct = Cancellation.none) {
68 async applyConfiguration(data: object, resolver?: Resolver, ct = Cancellation.none) {
72 argumentNotEmptyString(moduleName, "moduleName");
73
74 trace.log("loadConfiguration {0}", moduleName);
75
76 this._configName = moduleName;
77
78 const config = await this._loadModule(moduleName);
79
80 this._require = await this._createContextRequire(moduleName);
81
82 let services: ServiceMap;
83
84 try {
85 services = await this._visitRegistrations(config, moduleName);
86 } catch (e) {
87 throw this._makeError(e);
88 }
89
90 this._container.register(services);
91 }
92
93 async applyConfiguration(data: object, contextRequire?: Require, ct = Cancellation.none) {
94 argumentNotNull(data, "data");
69 argumentNotNull(data, "data");
95
70
96 trace.log("applyConfiguration");
71 trace.log("applyConfiguration");
97
72
98 this._configName = "$";
73 this._configName = "$";
99
74
100 if (contextRequire)
75 if (resolver)
101 this._require = contextRequire;
76 this._require = resolver;
102
77
103 let services: ServiceMap;
78 let services: ServiceMap;
104
79
105 try {
80 try {
106 services = await this._visitRegistrations(data, "$");
81 services = await this._visitRegistrations(data, "$");
107 } catch (e) {
82 } catch (e) {
108 throw this._makeError(e);
83 throw this._makeError(e);
109 }
84 }
110
85
111 this._container.register(services);
86 this._container.register(services);
112 }
87 }
113
88
114 _makeError(inner) {
89 _makeError(inner) {
115 const e = new ConfigError("Failed to load configuration", inner);
90 const e = new ConfigError("Failed to load configuration", inner);
116 e.configName = this._configName;
91 e.configName = this._configName;
117 e.path = this._makePath();
92 e.path = this._makePath();
118 return e;
93 return e;
119 }
94 }
120
95
121 _makePath() {
96 _makePath() {
122 return this._path
97 return this._path
123 .reduce(
98 .reduce(
124 (prev, cur) => typeof cur === "number" ?
99 (prev, cur) => typeof cur === "number" ?
125 `${prev}[${cur}]` :
100 `${prev}[${cur}]` :
126 `${prev}.${cur}`
101 `${prev}.${cur}`
127 )
102 )
128 .toString();
103 .toString();
129 }
104 }
130
105
131 async _resolveType(moduleName: string, localName: string) {
106 async _resolveType(moduleName: string, localName: string) {
132 trace.log("resolveType moduleName={0}, localName={1}", moduleName, localName);
107 trace.log("resolveType moduleName={0}, localName={1}", moduleName, localName);
133 try {
108 try {
134 const m = await this._loadModule(moduleName);
109 const m = await this._loadModule(moduleName);
135 return localName ? get(localName, m) : m;
110 return localName ? get(localName, m) : m;
136 } catch (e) {
111 } catch (e) {
137 trace.error("Failed to resolve type moduleName={0}, localName={1}", moduleName, localName);
112 trace.error("Failed to resolve type moduleName={0}, localName={1}", moduleName, localName);
138 throw e;
113 throw e;
139 }
114 }
140 }
115 }
141
116
142 async _loadModule(moduleName: string) {
117 async _loadModule(moduleName: string) {
143 trace.debug("loadModule {0}", moduleName);
118 trace.debug("loadModule {0}", moduleName);
144
119
145 const m = await new Promise(fulfill => {
120 const m = await this._require(moduleName);
146 this._require([moduleName], fulfill);
147 });
148
121
149 return m;
122 return m;
150 }
123 }
151
124
152 _createContextRequire(moduleName: string) {
153 return createContextRequire(moduleName);
154 }
155
156 async _visitRegistrations(data, name: _key) {
125 async _visitRegistrations(data, name: _key) {
157 this._enter(name);
126 this._enter(name);
158
127
159 if (data.constructor &&
128 if (data.constructor &&
160 data.constructor.prototype !== Object.prototype)
129 data.constructor.prototype !== Object.prototype)
161 throw new Error("Configuration must be a simple object");
130 throw new Error("Configuration must be a simple object");
162
131
163 const o: ServiceMap = {};
132 const o: ServiceMap = {};
164 const keys = Object.keys(data);
133 const keys = Object.keys(data);
165
134
166 const services = await mapAll(data, async (v, k) => {
135 const services = await mapAll(data, async (v, k) => {
167 const d = await this._visit(v, k);
136 const d = await this._visit(v, k);
168 return isDescriptor(d) ? d : new AggregateDescriptor(d);
137 return isDescriptor(d) ? d : new AggregateDescriptor(d);
169 }) as ServiceMap;
138 }) as ServiceMap;
170
139
171 this._leave();
140 this._leave();
172
141
173 return services;
142 return services;
174 }
143 }
175
144
176 _enter(name: _key) {
145 _enter(name: _key) {
177 this._path.push(name);
146 this._path.push(name);
178 trace.debug(">{0}", name);
147 trace.debug(">{0}", name);
179 }
148 }
180
149
181 _leave() {
150 _leave() {
182 const name = this._path.pop();
151 const name = this._path.pop();
183 trace.debug("<{0}", name);
152 trace.debug("<{0}", name);
184 }
153 }
185
154
186 async _visit(data, name: string): Promise<any> {
155 async _visit(data, name: string): Promise<any> {
187 if (isPrimitive(data) || isDescriptor(data))
156 if (isPrimitive(data) || isDescriptor(data))
188 return data;
157 return data;
189
158
190 if (isDependencyRegistration(data)) {
159 if (isDependencyRegistration(data)) {
191 return this._visitDependencyRegistration(data, name);
160 return this._visitDependencyRegistration(data, name);
192 } else if (isValueRegistration(data)) {
161 } else if (isValueRegistration(data)) {
193 return this._visitValueRegistration(data, name);
162 return this._visitValueRegistration(data, name);
194 } else if (isTypeRegistration(data)) {
163 } else if (isTypeRegistration(data)) {
195 return this._visitTypeRegistration(data, name);
164 return this._visitTypeRegistration(data, name);
196 } else if (isFactoryRegistration(data)) {
165 } else if (isFactoryRegistration(data)) {
197 return this._visitFactoryRegistration(data, name);
166 return this._visitFactoryRegistration(data, name);
198 } else if (data instanceof Array) {
167 } else if (data instanceof Array) {
199 return this._visitArray(data, name);
168 return this._visitArray(data, name);
200 }
169 }
201
170
202 return this._visitObject(data, name);
171 return this._visitObject(data, name);
203 }
172 }
204
173
205 async _visitObject(data: object, name: _key) {
174 async _visitObject(data: object, name: _key) {
206 if (data.constructor &&
175 if (data.constructor &&
207 data.constructor.prototype !== Object.prototype)
176 data.constructor.prototype !== Object.prototype)
208 return new ValueDescriptor(data);
177 return new ValueDescriptor(data);
209
178
210 this._enter(name);
179 this._enter(name);
211
180
212 const v = await mapAll(data, delegate(this, "_visit"));
181 const v = await mapAll(data, delegate(this, "_visit"));
213
182
214 // TODO: handle inline descriptors properly
183 // TODO: handle inline descriptors properly
215 // const ex = {
184 // const ex = {
216 // activate(ctx) {
185 // activate(ctx) {
217 // const value = ctx.activate(this.prop, "prop");
186 // const value = ctx.activate(this.prop, "prop");
218 // // some code
187 // // some code
219 // },
188 // },
220 // // will be turned to ReferenceDescriptor
189 // // will be turned to ReferenceDescriptor
221 // prop: { $dependency: "depName" }
190 // prop: { $dependency: "depName" }
222 // };
191 // };
223
192
224 this._leave();
193 this._leave();
225 return v;
194 return v;
226 }
195 }
227
196
228 async _visitArray(data: any[], name: _key) {
197 async _visitArray(data: any[], name: _key) {
229 if (data.constructor &&
198 if (data.constructor &&
230 data.constructor.prototype !== Array.prototype)
199 data.constructor.prototype !== Array.prototype)
231 return new ValueDescriptor(data);
200 return new ValueDescriptor(data);
232
201
233 this._enter(name);
202 this._enter(name);
234
203
235 const v = await mapAll(data, delegate(this, "_visit"));
204 const v = await mapAll(data, delegate(this, "_visit"));
236 this._leave();
205 this._leave();
237
206
238 return v;
207 return v;
239 }
208 }
240
209
241 _makeServiceParams(data: ServiceRegistration) {
210 _makeServiceParams(data: ServiceRegistration) {
242 const opts: any = {
211 const opts: any = {
243 owner: this._container
212 owner: this._container
244 };
213 };
245 if (data.services)
214 if (data.services)
246 opts.services = this._visitRegistrations(data.services, "services");
215 opts.services = this._visitRegistrations(data.services, "services");
247
216
248 if (data.inject) {
217 if (data.inject) {
249 this._path.push("inject");
218 this._path.push("inject");
250 opts.inject = mapAll(
219 opts.inject = mapAll(
251 data.inject instanceof Array ?
220 data.inject instanceof Array ?
252 data.inject :
221 data.inject :
253 [data.inject],
222 [data.inject],
254 delegate(this, "_visitObject")
223 delegate(this, "_visitObject")
255 );
224 );
256 this._leave();
225 this._leave();
257 }
226 }
258
227
259 if ("params" in data)
228 if ("params" in data)
260 opts.params = data.params instanceof Array ?
229 opts.params = data.params instanceof Array ?
261 this._visitArray(data.params, "params") :
230 this._visitArray(data.params, "params") :
262 this._visit(data.params, "params");
231 this._visit(data.params, "params");
263
232
264 if (data.activation) {
233 if (data.activation) {
265 if (typeof (data.activation) === "string") {
234 if (typeof (data.activation) === "string") {
266 switch (data.activation.toLowerCase()) {
235 switch (data.activation.toLowerCase()) {
267 case "singleton":
236 case "singleton":
268 opts.activation = ActivationType.Singleton;
237 opts.activation = ActivationType.Singleton;
269 break;
238 break;
270 case "container":
239 case "container":
271 opts.activation = ActivationType.Container;
240 opts.activation = ActivationType.Container;
272 break;
241 break;
273 case "hierarchy":
242 case "hierarchy":
274 opts.activation = ActivationType.Hierarchy;
243 opts.activation = ActivationType.Hierarchy;
275 break;
244 break;
276 case "context":
245 case "context":
277 opts.activation = ActivationType.Context;
246 opts.activation = ActivationType.Context;
278 break;
247 break;
279 case "call":
248 case "call":
280 opts.activation = ActivationType.Call;
249 opts.activation = ActivationType.Call;
281 break;
250 break;
282 default:
251 default:
283 throw new Error("Unknown activation type: " +
252 throw new Error("Unknown activation type: " +
284 data.activation);
253 data.activation);
285 }
254 }
286 } else {
255 } else {
287 opts.activation = Number(data.activation);
256 opts.activation = Number(data.activation);
288 }
257 }
289 }
258 }
290
259
291 if (data.cleanup)
260 if (data.cleanup)
292 opts.cleanup = data.cleanup;
261 opts.cleanup = data.cleanup;
293
262
294 return opts;
263 return opts;
295 }
264 }
296
265
297 async _visitValueRegistration(data: ValueRegistration, name: _key) {
266 async _visitValueRegistration(data: ValueRegistration, name: _key) {
298 this._enter(name);
267 this._enter(name);
299 const d = data.parse ? new AggregateDescriptor(data.$value) : new ValueDescriptor(data.$value);
268 const d = data.parse ? new AggregateDescriptor(data.$value) : new ValueDescriptor(data.$value);
300 this._leave();
269 this._leave();
301 return d;
270 return d;
302 }
271 }
303
272
304 async _visitDependencyRegistration(data: DependencyRegistration, name: _key) {
273 async _visitDependencyRegistration(data: DependencyRegistration, name: _key) {
305 argumentNotEmptyString(data && data.$dependency, "data.$dependency");
274 argumentNotEmptyString(data && data.$dependency, "data.$dependency");
306 this._enter(name);
275 this._enter(name);
307 const d = new ReferenceDescriptor({
276 const d = new ReferenceDescriptor({
308 name: data.$dependency,
277 name: data.$dependency,
309 lazy: data.lazy,
278 lazy: data.lazy,
310 optional: data.optional,
279 optional: data.optional,
311 default: data.default,
280 default: data.default,
312 services: data.services && await this._visitRegistrations(data.services, "services")
281 services: data.services && await this._visitRegistrations(data.services, "services")
313 });
282 });
314 this._leave();
283 this._leave();
315 return d;
284 return d;
316 }
285 }
317
286
318 async _visitTypeRegistration(data: TypeRegistration, name: _key) {
287 async _visitTypeRegistration(data: TypeRegistration, name: _key) {
319 argumentNotNull(data.$type, "data.$type");
288 argumentNotNull(data.$type, "data.$type");
320 this._enter(name);
289 this._enter(name);
321
290
322 const opts = this._makeServiceParams(data);
291 const opts = this._makeServiceParams(data);
323 if (data.$type instanceof Function) {
292 if (data.$type instanceof Function) {
324 opts.type = data.$type;
293 opts.type = data.$type;
325 } else {
294 } else {
326 const [moduleName, typeName] = data.$type.split(":", 2);
295 const [moduleName, typeName] = data.$type.split(":", 2);
327 opts.type = this._resolveType(moduleName, typeName);
296 opts.type = this._resolveType(moduleName, typeName);
328 }
297 }
329
298
330 const d = new TypeServiceDescriptor(
299 const d = new TypeServiceDescriptor(
331 await mapAll(opts)
300 await mapAll(opts)
332 );
301 );
333
302
334 this._leave();
303 this._leave();
335
304
336 return d;
305 return d;
337 }
306 }
338
307
339 async _visitFactoryRegistration(data: FactoryRegistration, name: _key) {
308 async _visitFactoryRegistration(data: FactoryRegistration, name: _key) {
340 argumentOfType(data.$factory, Function, "data.$type");
309 argumentOfType(data.$factory, Function, "data.$type");
341 this._enter(name);
310 this._enter(name);
342
311
343 const opts = this._makeServiceParams(data);
312 const opts = this._makeServiceParams(data);
344 opts.factory = opts.$factory;
313 opts.factory = opts.$factory;
345
314
346 const d = new FactoryServiceDescriptor(
315 const d = new FactoryServiceDescriptor(
347 await mapAll(opts)
316 await mapAll(opts)
348 );
317 );
349
318
350 this._leave();
319 this._leave();
351 return d;
320 return d;
352 }
321 }
353 }
322 }
@@ -1,128 +1,128
1 import { ActivationContext } from "./ActivationContext";
1 import { ActivationContext } from "./ActivationContext";
2 import { ValueDescriptor } from "./ValueDescriptor";
2 import { ValueDescriptor } from "./ValueDescriptor";
3 import { ActivationError } from "./ActivationError";
3 import { ActivationError } from "./ActivationError";
4 import { isDescriptor, ServiceMap } from "./interfaces";
4 import { isDescriptor, ServiceMap } from "./interfaces";
5 import { TraceSource } from "../log/TraceSource";
5 import { TraceSource } from "../log/TraceSource";
6 import { Configuration } from "./Configuration";
6 import { Configuration } from "./Configuration";
7 import { Cancellation } from "../Cancellation";
7 import { Cancellation } from "../Cancellation";
8
8
9 const trace = TraceSource.get("@implab/core/di/ActivationContext");
9 const trace = TraceSource.get("@implab/core/di/ActivationContext");
10
10
11 export class Container {
11 export class Container {
12 _services: ServiceMap;
12 _services: ServiceMap;
13
13
14 _cache: object;
14 _cache: object;
15
15
16 _cleanup: (() => void)[];
16 _cleanup: (() => void)[];
17
17
18 _root: Container;
18 _root: Container;
19
19
20 _parent: Container;
20 _parent: Container;
21
21
22 constructor(parent?: Container) {
22 constructor(parent?: Container) {
23 this._parent = parent;
23 this._parent = parent;
24 this._services = parent ? Object.create(parent._services) : {};
24 this._services = parent ? Object.create(parent._services) : {};
25 this._cache = {};
25 this._cache = {};
26 this._cleanup = [];
26 this._cleanup = [];
27 this._root = parent ? parent.getRootContainer() : this;
27 this._root = parent ? parent.getRootContainer() : this;
28 this._services.container = new ValueDescriptor(this);
28 this._services.container = new ValueDescriptor(this);
29 }
29 }
30
30
31 getRootContainer() {
31 getRootContainer() {
32 return this._root;
32 return this._root;
33 }
33 }
34
34
35 getParent() {
35 getParent() {
36 return this._parent;
36 return this._parent;
37 }
37 }
38
38
39 resolve(name: string, def?) {
39 resolve(name: string, def?) {
40 trace.debug("resolve {0}", name);
40 trace.debug("resolve {0}", name);
41 const d = this._services[name];
41 const d = this._services[name];
42 if (d === undefined) {
42 if (d === undefined) {
43 if (arguments.length > 1)
43 if (arguments.length > 1)
44 return def;
44 return def;
45 else
45 else
46 throw new Error("Service '" + name + "' isn't found");
46 throw new Error("Service '" + name + "' isn't found");
47 }
47 }
48
48
49 const context = new ActivationContext(this, this._services);
49 const context = new ActivationContext(this, this._services);
50 try {
50 try {
51 return context.activate(d, name);
51 return context.activate(d, name);
52 } catch (error) {
52 } catch (error) {
53 throw new ActivationError(name, context.getStack(), error);
53 throw new ActivationError(name, context.getStack(), error);
54 }
54 }
55 }
55 }
56
56
57 /**
57 /**
58 * @deprecated use resolve() method
58 * @deprecated use resolve() method
59 */
59 */
60 getService() {
60 getService() {
61 return this.resolve.apply(this, arguments);
61 return this.resolve.apply(this, arguments);
62 }
62 }
63
63
64 register(nameOrCollection, service?) {
64 register(nameOrCollection, service?) {
65 if (arguments.length === 1) {
65 if (arguments.length === 1) {
66 const data = nameOrCollection;
66 const data = nameOrCollection;
67 for (const name in data)
67 for (const name in data)
68 this.register(name, data[name]);
68 this.register(name, data[name]);
69 } else {
69 } else {
70 if (!isDescriptor(service))
70 if (!isDescriptor(service))
71 throw new Error("The service parameter must be a descriptor");
71 throw new Error("The service parameter must be a descriptor");
72
72
73 this._services[nameOrCollection] = service;
73 this._services[nameOrCollection] = service;
74 }
74 }
75 return this;
75 return this;
76 }
76 }
77
77
78 onDispose(callback) {
78 onDispose(callback) {
79 if (!(callback instanceof Function))
79 if (!(callback instanceof Function))
80 throw new Error("The callback must be a function");
80 throw new Error("The callback must be a function");
81 this._cleanup.push(callback);
81 this._cleanup.push(callback);
82 }
82 }
83
83
84 dispose() {
84 dispose() {
85 if (this._cleanup) {
85 if (this._cleanup) {
86 for (const f of this._cleanup)
86 for (const f of this._cleanup)
87 f();
87 f();
88 this._cleanup = null;
88 this._cleanup = null;
89 }
89 }
90 }
90 }
91
91
92 /**
92 /**
93 * @param{String|Object} config
93 * @param{String|Object} config
94 * The configuration of the contaier. Can be either a string or an object,
94 * The configuration of the contaier. Can be either a string or an object,
95 * if the configuration is an object it's treated as a collection of
95 * if the configuration is an object it's treated as a collection of
96 * services which will be registed in the contaier.
96 * services which will be registed in the contaier.
97 *
97 *
98 * @param{Function} opts.contextRequire
98 * @param{Function} opts.contextRequire
99 * The function which will be used to load a configuration or types for services.
99 * The function which will be used to load a configuration or types for services.
100 *
100 *
101 */
101 */
102 async configure(config: string | object, opts?: any, ct = Cancellation.none) {
102 async configure(config: string | object, opts?, ct = Cancellation.none) {
103 const c = new Configuration(this);
103 const c = new Configuration(this);
104
104
105 if (typeof (config) === "string") {
105 if (typeof (config) === "string") {
106 return c.loadConfiguration(config, ct);
106 return c.loadConfiguration(config, ct);
107 } else {
107 } else {
108 return c.applyConfiguration(config, opts && opts.contextRequire, ct);
108 return c.applyConfiguration(config, opts && opts.contextRequire, ct);
109 }
109 }
110 }
110 }
111
111
112 createChildContainer() {
112 createChildContainer() {
113 return new Container(this);
113 return new Container(this);
114 }
114 }
115
115
116 has(id) {
116 has(id) {
117 return id in this._cache;
117 return id in this._cache;
118 }
118 }
119
119
120 get(id) {
120 get(id) {
121 return this._cache[id];
121 return this._cache[id];
122 }
122 }
123
123
124 store(id, value) {
124 store(id, value) {
125 return (this._cache[id] = value);
125 return (this._cache[id] = value);
126 }
126 }
127
127
128 }
128 }
1 NO CONTENT: file renamed from test/js/example.js to src/test/js/example.js
NO CONTENT: file renamed from test/js/example.js to src/test/js/example.js
1 NO CONTENT: file renamed from test/js/mock/config1.js to src/test/js/mock/config1.js
NO CONTENT: file renamed from test/js/mock/config1.js to src/test/js/mock/config1.js
1 NO CONTENT: file renamed from test/js/plan.js to src/test/js/plan.js
NO CONTENT: file renamed from test/js/plan.js to src/test/js/plan.js
1 NO CONTENT: file renamed from test/js/trace-test.js to src/test/js/trace-test.js
NO CONTENT: file renamed from test/js/trace-test.js to src/test/js/trace-test.js
1 NO CONTENT: file renamed from test/ts/ActivatableTests.ts to src/test/ts/ActivatableTests.ts
NO CONTENT: file renamed from test/ts/ActivatableTests.ts to src/test/ts/ActivatableTests.ts
1 NO CONTENT: file renamed from test/ts/CancellationTests.ts to src/test/ts/CancellationTests.ts
NO CONTENT: file renamed from test/ts/CancellationTests.ts to src/test/ts/CancellationTests.ts
1 NO CONTENT: file renamed from test/ts/ContainerTests.ts to src/test/ts/ContainerTests.ts
NO CONTENT: file renamed from test/ts/ContainerTests.ts to src/test/ts/ContainerTests.ts
1 NO CONTENT: file renamed from test/ts/ObservableTests.ts to src/test/ts/ObservableTests.ts
NO CONTENT: file renamed from test/ts/ObservableTests.ts to src/test/ts/ObservableTests.ts
1 NO CONTENT: file renamed from test/ts/TestTraits.ts to src/test/ts/TestTraits.ts
NO CONTENT: file renamed from test/ts/TestTraits.ts to src/test/ts/TestTraits.ts
1 NO CONTENT: file renamed from test/ts/TraceSourceTests.ts to src/test/ts/TraceSourceTests.ts
NO CONTENT: file renamed from test/ts/TraceSourceTests.ts to src/test/ts/TraceSourceTests.ts
1 NO CONTENT: file renamed from test/ts/dummy.ts to src/test/ts/dummy.ts
NO CONTENT: file renamed from test/ts/dummy.ts to src/test/ts/dummy.ts
1 NO CONTENT: file renamed from test/ts/mock/Bar.ts to src/test/ts/mock/Bar.ts
NO CONTENT: file renamed from test/ts/mock/Bar.ts to src/test/ts/mock/Bar.ts
1 NO CONTENT: file renamed from test/ts/mock/Foo.ts to src/test/ts/mock/Foo.ts
NO CONTENT: file renamed from test/ts/mock/Foo.ts to src/test/ts/mock/Foo.ts
1 NO CONTENT: file renamed from test/ts/mock/MockActivationController.ts to src/test/ts/mock/MockActivationController.ts
NO CONTENT: file renamed from test/ts/mock/MockActivationController.ts to src/test/ts/mock/MockActivationController.ts
1 NO CONTENT: file renamed from test/ts/mock/SimpleActivatable.ts to src/test/ts/mock/SimpleActivatable.ts
NO CONTENT: file renamed from test/ts/mock/SimpleActivatable.ts to src/test/ts/mock/SimpleActivatable.ts
1 NO CONTENT: file renamed from test/tsconfig.json to src/test/tsconfig.json
NO CONTENT: file renamed from test/tsconfig.json to src/test/tsconfig.json
@@ -1,21 +1,22
1 {
1 {
2 "compilerOptions": {
2 "compilerOptions": {
3 "target": "es3",
3 "target": "es3",
4 "module": "amd",
4 "module": "amd",
5 "sourceMap": true,
5 "sourceMap": true,
6 "declaration": true,
6 "declaration": true,
7 "moduleResolution": "node",
7 "moduleResolution": "node",
8 "listFiles": true,
8 "listFiles": true,
9 "lib": [
9 "lib": [
10 "es5",
10 "es5",
11 "es2015.promise",
11 "es2015.promise",
12 "es2015.symbol",
12 "es2015.symbol",
13 "dom"
13 "dom"
14 ],
14 ],
15 "rootDirs": [
15 "rootDirs": [
16 "main/ts",
16 "main/ts",
17 "amd/ts"
17 "amd/ts",
18 "cjs/ts"
18 ],
19 ],
19 "types": []
20 "types": []
20 }
21 }
21 } No newline at end of file
22 }
General Comments 0
You need to be logged in to leave comments. Login now