@servable/tools 1.6.5 → 1.6.6
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/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"type": "module",
|
|
4
4
|
"source": "src/index.js",
|
|
5
5
|
"main": "src/index.js",
|
|
6
|
-
"version": "1.6.
|
|
6
|
+
"version": "1.6.6",
|
|
7
7
|
"description": "Servable tools is a utility that builds a protocol's manifest and documents it.",
|
|
8
8
|
"author": "Servable Community",
|
|
9
9
|
"license": "ISC",
|
|
@@ -18,7 +18,7 @@ export default async props => {
|
|
|
18
18
|
throw new Error('No module found for api version')
|
|
19
19
|
}
|
|
20
20
|
|
|
21
|
-
console.log(
|
|
21
|
+
console.log("[@servable/tools/document/gateway/generateGithubReadme] default() → Loading GitHub README generator for API version:", apiVersion, "Module path:", modulePath)
|
|
22
22
|
const module = (await import(modulePath)).default
|
|
23
23
|
return module(props)
|
|
24
24
|
}
|
|
@@ -39,7 +39,7 @@ export default class ProtocolInstance {
|
|
|
39
39
|
this._protocolPayload = { ...protocolPayload }
|
|
40
40
|
this._instancesPathId = [...instancesPathId]
|
|
41
41
|
this._instancesPathIdString = instancesPathIdUniqueId({ instancesPathId, currentProtocolId: this._id })
|
|
42
|
-
console.log(this._instancesPathIdString)
|
|
42
|
+
console.log("[@servable/tools/domain/protocolInstance] constructor() → Protocol instance initialized with ID:", this._id, "Unique path ID:", this._instancesPathIdString)
|
|
43
43
|
}
|
|
44
44
|
|
|
45
45
|
async load({ servableConfig } = {}) {
|
|
@@ -9,7 +9,6 @@ import directoryGlob from '../../lib/directoryGlob.js'
|
|
|
9
9
|
|
|
10
10
|
import checkFileExists from '../../lib/checkFileExists.js'
|
|
11
11
|
import directoryFilesRecursive from '../../lib/directoryFilesRecursive.js'
|
|
12
|
-
import { ProtocolEnum } from '../../manifest/data/1.0.0/enums.js'
|
|
13
12
|
|
|
14
13
|
import triggerItems from './lib/triggerItems.js'
|
|
15
14
|
import fs from 'fs'
|
|
@@ -557,14 +556,14 @@ export default class ProtocolLoaderV1_1_0 extends BaseClass {
|
|
|
557
556
|
}
|
|
558
557
|
|
|
559
558
|
async schemaRaw(props = {}) {
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
559
|
+
// schemaFields()/schemaIndexes()/schemaClassLevelPermissions() each call
|
|
560
|
+
// this independently for every protocol attached to every class, so
|
|
561
|
+
// without caching the same schema/<version>/index.json gets read and
|
|
562
|
+
// JSON.parse'd up to 3x per class-protocol edge across the whole build.
|
|
563
|
+
const cacheKey = 'schemaRaw'
|
|
564
|
+
if (this._valueInCache(cacheKey)) {
|
|
565
|
+
return this._valueInCache(cacheKey)
|
|
566
|
+
}
|
|
568
567
|
|
|
569
568
|
const schemaPath = await this._schemaPath()
|
|
570
569
|
|
|
@@ -585,6 +584,7 @@ export default class ProtocolLoaderV1_1_0 extends BaseClass {
|
|
|
585
584
|
}
|
|
586
585
|
|
|
587
586
|
const b = await this._importJSONDefault({ path, })
|
|
587
|
+
this.cache[cacheKey] = b
|
|
588
588
|
return b
|
|
589
589
|
}
|
|
590
590
|
|
|
@@ -15,7 +15,7 @@ const perform = async ({
|
|
|
15
15
|
|
|
16
16
|
//#TODO: protocol.loader
|
|
17
17
|
if (!(await protocol.loader.isValid())) {
|
|
18
|
-
console.log(
|
|
18
|
+
console.log("[@servable/tools/schema/build/buildProtocol] perform() → Protocol validation failed - Protocol ID:", protocol.id, "Path:", protocol.loader.path)
|
|
19
19
|
return defaultResult
|
|
20
20
|
}
|
|
21
21
|
|