@superhero/core 4.0.9 → 4.0.11
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/index.js +3 -43
- package/package.json +3 -3
package/index.js
CHANGED
|
@@ -291,8 +291,6 @@ export default class Core
|
|
|
291
291
|
}
|
|
292
292
|
else if(false === this.#isBooted)
|
|
293
293
|
{
|
|
294
|
-
await this.#normalizeServcieMapPaths()
|
|
295
|
-
|
|
296
294
|
freeze && this.config.freeze()
|
|
297
295
|
|
|
298
296
|
const locatorMap = this.config.find('locator')
|
|
@@ -370,44 +368,6 @@ export default class Core
|
|
|
370
368
|
return branch + forks
|
|
371
369
|
}
|
|
372
370
|
|
|
373
|
-
/**
|
|
374
|
-
* Eagerload services by the configured locator service map.
|
|
375
|
-
*
|
|
376
|
-
* Resolves the absolute path if any of the services to eagerload is refferencing
|
|
377
|
-
* a relative path.
|
|
378
|
-
*
|
|
379
|
-
* Resolves the absolute path by the config entry, through the config instance.
|
|
380
|
-
*/
|
|
381
|
-
async #normalizeServcieMapPaths()
|
|
382
|
-
{
|
|
383
|
-
const locatorMap = this.config.find('locator')
|
|
384
|
-
|
|
385
|
-
if(locatorMap)
|
|
386
|
-
{
|
|
387
|
-
const serviceMap = this.locate.normaliseServiceMap(locatorMap)
|
|
388
|
-
|
|
389
|
-
for(const entry in serviceMap)
|
|
390
|
-
{
|
|
391
|
-
const servicePath = serviceMap[entry]
|
|
392
|
-
|
|
393
|
-
if('string' === typeof servicePath)
|
|
394
|
-
{
|
|
395
|
-
if(servicePath.startsWith('.'))
|
|
396
|
-
{
|
|
397
|
-
const
|
|
398
|
-
configPath = 'locator/' + entry,
|
|
399
|
-
absolutePath = this.config.findAbsoluteDirPathByConfigEntry(configPath, servicePath)
|
|
400
|
-
|
|
401
|
-
if('string' === typeof absolutePath)
|
|
402
|
-
{
|
|
403
|
-
serviceMap[entry] = path.normalize(path.join(absolutePath, servicePath))
|
|
404
|
-
}
|
|
405
|
-
}
|
|
406
|
-
}
|
|
407
|
-
}
|
|
408
|
-
}
|
|
409
|
-
}
|
|
410
|
-
|
|
411
371
|
#createSynchoronizer(id)
|
|
412
372
|
{
|
|
413
373
|
const
|
|
@@ -589,7 +549,7 @@ export default class Core
|
|
|
589
549
|
async #addConfigPath(configPath)
|
|
590
550
|
{
|
|
591
551
|
const { filepath, config } = await this.config.resolve(configPath)
|
|
592
|
-
this.#addConfigDependencies(filepath, config)
|
|
552
|
+
await this.#addConfigDependencies(filepath, config)
|
|
593
553
|
this.config.add(filepath, config)
|
|
594
554
|
Core.log.info`assigned config ${configPath}`
|
|
595
555
|
|
|
@@ -598,7 +558,7 @@ export default class Core
|
|
|
598
558
|
try
|
|
599
559
|
{
|
|
600
560
|
const { filepath, config } = await this.config.resolve(configPath, this.branch)
|
|
601
|
-
this.#addConfigDependencies(filepath, config)
|
|
561
|
+
await this.#addConfigDependencies(filepath, config)
|
|
602
562
|
this.config.add(filepath, config)
|
|
603
563
|
Core.log.info`assigned config ${configPath + '-' + this.branch}`
|
|
604
564
|
}
|
|
@@ -658,7 +618,7 @@ export default class Core
|
|
|
658
618
|
}
|
|
659
619
|
|
|
660
620
|
const { filepath, config } = await this.config.resolve(dependencyPath)
|
|
661
|
-
this.#addConfigDependencies(filepath, config)
|
|
621
|
+
await this.#addConfigDependencies(filepath, config)
|
|
662
622
|
this.config.add(filepath, config)
|
|
663
623
|
}
|
|
664
624
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@superhero/core",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.11",
|
|
4
4
|
"description": "Core functionalities for the superhero framework.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"license": "MIT",
|
|
@@ -9,8 +9,8 @@
|
|
|
9
9
|
".": "./index.js"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
|
-
"@superhero/locator": "^4.
|
|
13
|
-
"@superhero/bootstrap": "^4.1.
|
|
12
|
+
"@superhero/locator": "^4.3.0",
|
|
13
|
+
"@superhero/bootstrap": "^4.1.5"
|
|
14
14
|
},
|
|
15
15
|
"scripts": {
|
|
16
16
|
"test": "node --trace-warnings --test --experimental-test-coverage"
|