@servable/tools 1.0.1
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/LICENSE +21 -0
- package/README.md +33 -0
- package/package.json +106 -0
- package/src/config/candidates/featureCandidates/index.js +48 -0
- package/src/config/candidates/index.js +18 -0
- package/src/config/index.js +2 -0
- package/src/config/validate/feature/index.js +7 -0
- package/src/config/validate/index.js +5 -0
- package/src/document/1.0.0/all/build/class/index.js +67 -0
- package/src/document/1.0.0/all/build/feature/index.js +135 -0
- package/src/document/1.0.0/all/index.js +17 -0
- package/src/document/1.0.0/all/write/class/index.js +25 -0
- package/src/document/1.0.0/all/write/feature/index.js +43 -0
- package/src/document/1.0.0/all/write/index.js +10 -0
- package/src/document/1.0.0/all/write/utils/chunk.js +19 -0
- package/src/document/1.0.0/chunks/build/class/class.js +20 -0
- package/src/document/1.0.0/chunks/build/class/functions.js +21 -0
- package/src/document/1.0.0/chunks/build/class/lib.js +21 -0
- package/src/document/1.0.0/chunks/build/class/seed.js +21 -0
- package/src/document/1.0.0/chunks/build/class/triggers.js +26 -0
- package/src/document/1.0.0/chunks/build/feature/afterInit.js +20 -0
- package/src/document/1.0.0/chunks/build/feature/beforeInit.js +20 -0
- package/src/document/1.0.0/chunks/build/feature/class.js +42 -0
- package/src/document/1.0.0/chunks/build/feature/config.js +20 -0
- package/src/document/1.0.0/chunks/build/feature/functions.js +20 -0
- package/src/document/1.0.0/chunks/build/feature/lib.js +21 -0
- package/src/document/1.0.0/chunks/build/feature/liveClasses.js +20 -0
- package/src/document/1.0.0/chunks/build/feature/schema.js +206 -0
- package/src/document/1.0.0/chunks/build/feature/seed.js +20 -0
- package/src/document/1.0.0/chunks/build/feature/system.js +20 -0
- package/src/document/1.0.0/chunks/build/feature/triggers.js +20 -0
- package/src/document/1.0.0/generateGithubReadme/build/chunks/_generateBadge.js +4 -0
- package/src/document/1.0.0/generateGithubReadme/build/chunks/_githubPackage.js +4 -0
- package/src/document/1.0.0/generateGithubReadme/build/chunks/adapters.js +40 -0
- package/src/document/1.0.0/generateGithubReadme/build/chunks/apis.js +39 -0
- package/src/document/1.0.0/generateGithubReadme/build/chunks/categories.js +32 -0
- package/src/document/1.0.0/generateGithubReadme/build/chunks/dependencies/build.js +29 -0
- package/src/document/1.0.0/generateGithubReadme/build/chunks/dependencies/index.js +40 -0
- package/src/document/1.0.0/generateGithubReadme/build/chunks/footer.js +33 -0
- package/src/document/1.0.0/generateGithubReadme/build/chunks/githubTags.js +42 -0
- package/src/document/1.0.0/generateGithubReadme/build/chunks/install.js +29 -0
- package/src/document/1.0.0/generateGithubReadme/build/chunks/packages.js +26 -0
- package/src/document/1.0.0/generateGithubReadme/build/chunks/registry.js +42 -0
- package/src/document/1.0.0/generateGithubReadme/build/chunks/usage.js +68 -0
- package/src/document/1.0.0/generateGithubReadme/build/index.js +224 -0
- package/src/document/1.0.0/generateGithubReadme/index.js +28 -0
- package/src/document/1.1.0/all/build/class/index.js +67 -0
- package/src/document/1.1.0/all/build/feature/index.js +135 -0
- package/src/document/1.1.0/all/index.js +17 -0
- package/src/document/1.1.0/all/write/class/index.js +25 -0
- package/src/document/1.1.0/all/write/feature/index.js +43 -0
- package/src/document/1.1.0/all/write/index.js +10 -0
- package/src/document/1.1.0/all/write/utils/chunk.js +19 -0
- package/src/document/1.1.0/chunks/build/class/class.js +20 -0
- package/src/document/1.1.0/chunks/build/class/functions.js +21 -0
- package/src/document/1.1.0/chunks/build/class/lib.js +21 -0
- package/src/document/1.1.0/chunks/build/class/seed.js +21 -0
- package/src/document/1.1.0/chunks/build/class/triggers.js +26 -0
- package/src/document/1.1.0/chunks/build/feature/afterInit.js +20 -0
- package/src/document/1.1.0/chunks/build/feature/beforeInit.js +20 -0
- package/src/document/1.1.0/chunks/build/feature/class.js +42 -0
- package/src/document/1.1.0/chunks/build/feature/config.js +20 -0
- package/src/document/1.1.0/chunks/build/feature/functions.js +20 -0
- package/src/document/1.1.0/chunks/build/feature/lib.js +21 -0
- package/src/document/1.1.0/chunks/build/feature/liveClasses.js +20 -0
- package/src/document/1.1.0/chunks/build/feature/schema.js +206 -0
- package/src/document/1.1.0/chunks/build/feature/seed.js +20 -0
- package/src/document/1.1.0/chunks/build/feature/system.js +20 -0
- package/src/document/1.1.0/chunks/build/feature/triggers.js +20 -0
- package/src/document/1.1.0/generateGithubReadme/build/chunks/_generateBadge.js +4 -0
- package/src/document/1.1.0/generateGithubReadme/build/chunks/_githubPackage.js +4 -0
- package/src/document/1.1.0/generateGithubReadme/build/chunks/adapters.js +40 -0
- package/src/document/1.1.0/generateGithubReadme/build/chunks/apis.js +39 -0
- package/src/document/1.1.0/generateGithubReadme/build/chunks/categories.js +32 -0
- package/src/document/1.1.0/generateGithubReadme/build/chunks/dependencies/build.js +29 -0
- package/src/document/1.1.0/generateGithubReadme/build/chunks/dependencies/index.js +40 -0
- package/src/document/1.1.0/generateGithubReadme/build/chunks/footer.js +33 -0
- package/src/document/1.1.0/generateGithubReadme/build/chunks/githubTags.js +42 -0
- package/src/document/1.1.0/generateGithubReadme/build/chunks/install.js +29 -0
- package/src/document/1.1.0/generateGithubReadme/build/chunks/packages.js +26 -0
- package/src/document/1.1.0/generateGithubReadme/build/chunks/registry.js +42 -0
- package/src/document/1.1.0/generateGithubReadme/build/chunks/usage.js +68 -0
- package/src/document/1.1.0/generateGithubReadme/build/index.js +224 -0
- package/src/document/1.1.0/generateGithubReadme/index.js +28 -0
- package/src/document/gateway/all/index.js +23 -0
- package/src/document/gateway/generateGithubReadme/index.js +24 -0
- package/src/domain/feature/factory/absoluteModuleSrcPath.js +10 -0
- package/src/domain/feature/factory/featurePath.js +41 -0
- package/src/domain/feature/factory/index.js +71 -0
- package/src/domain/feature/index.js +117 -0
- package/src/domain/feature/lib/instancesPathIdUniqueId.js +17 -0
- package/src/domain/featureInstance/factory/getLoaderWithPayload.js +7 -0
- package/src/domain/featureInstance/factory/index.js +65 -0
- package/src/domain/featureInstance/factory/instancesWithPath.js +12 -0
- package/src/domain/featureInstance/index.js +199 -0
- package/src/domain/featureLoader/base.js +100 -0
- package/src/domain/featureLoader/factory/getModule.js +40 -0
- package/src/domain/featureLoader/factory/index.js +9 -0
- package/src/domain/featureLoader/lib/importJSDefault.js +12 -0
- package/src/domain/featureLoader/lib/importJSONDefault.js +14 -0
- package/src/domain/featureLoader/lib/mergeClassFeatures.js +17 -0
- package/src/domain/featureLoader/lib/triggerItems.js +8 -0
- package/src/domain/featureLoader/v1.0.0.js +861 -0
- package/src/domain/featureLoader/v1.1.0.js +871 -0
- package/src/domain/lib/checkFileExists.js +6 -0
- package/src/domain/servable/index.js +19 -0
- package/src/domain/servable/parse/index.js +5 -0
- package/src/domain/servable/parse/utils/index.js +216 -0
- package/src/index.js +29 -0
- package/src/lib/adaptConfig/basic.js +85 -0
- package/src/lib/adaptFeaturePayload.js +18 -0
- package/src/lib/checkFileExists.js +6 -0
- package/src/lib/cleanFeatures.js +25 -0
- package/src/lib/directories.js +49 -0
- package/src/lib/directoryFilesRecursive.js +83 -0
- package/src/lib/directoryGlob.js +14 -0
- package/src/lib/ensureDirectoryExists.js +14 -0
- package/src/lib/featureApiVersion.js +30 -0
- package/src/lib/foldersInFolder.js +46 -0
- package/src/lib/getModuleDir.js +19 -0
- package/src/lib/importFileAsText.js +15 -0
- package/src/lib/importJSONAsync.js +16 -0
- package/src/lib/sanitizePath.js +4 -0
- package/src/manifest/access/accessChildInTreeWithRoute.js +49 -0
- package/src/manifest/access/index.js +58 -0
- package/src/manifest/data/1.0.0/class.json +233 -0
- package/src/manifest/data/1.0.0/enums.js +255 -0
- package/src/manifest/data/1.0.0/feature.json +503 -0
- package/src/manifest/data/1.0.0/schema.json +145 -0
- package/src/manifest/data/1.1.0/class.json +233 -0
- package/src/manifest/data/1.1.0/enums.js +267 -0
- package/src/manifest/data/1.1.0/feature.json +542 -0
- package/src/manifest/data/1.1.0/schema.json +145 -0
- package/src/manifest/extract/extractAst.js +36 -0
- package/src/manifest/extract/extractItem.js +70 -0
- package/src/manifest/extract/formatFile.js +22 -0
- package/src/manifest/extract/index.js +23 -0
- package/src/manifest/extract/route/extractFileWithVariants.js +38 -0
- package/src/manifest/extract/route/extractFiles.js +87 -0
- package/src/manifest/extract/route/imageToBase64.js +42 -0
- package/src/manifest/extract/route/index.js +102 -0
- package/src/manifest/extract/templateDataForId.js +44 -0
- package/src/schema/build/buildFeature/classStruct/extractFeaturesFeatures.js +29 -0
- package/src/schema/build/buildFeature/classStruct/featureInClassClassSchema.js +36 -0
- package/src/schema/build/buildFeature/classStruct/index.js +62 -0
- package/src/schema/build/buildFeature/classStruct/preserveMostRestricted.js +68 -0
- package/src/schema/build/buildFeature/extractClassesFeature.js +49 -0
- package/src/schema/build/buildFeature/index.js +119 -0
- package/src/schema/build/index.js +54 -0
- package/src/schema/build/lib/getFeaturesLiveClasses.js +14 -0
- package/src/schema/build/lib/updateFeaturesExcerpt.js +24 -0
- package/src/schema/index.js +57 -0
- package/src/schema/validate/handleFeature/computeVersions.js +48 -0
- package/src/schema/validate/handleFeature/index.js +5 -0
- package/src/schema/validate/index.js +52 -0
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
import { FeatureEnum } from "../../../../../manifest/data/1.0.0/enums.js"
|
|
2
|
+
// import append from "../utils/builder/append.js"
|
|
3
|
+
import access from '../../../../../manifest/access/index.js'
|
|
4
|
+
import buildSeed from '../../../chunks/build/feature/seed.js'
|
|
5
|
+
import buildFeatureClass from '../../../chunks/build/feature/class.js'
|
|
6
|
+
import buildConfig from '../../../chunks/build/feature/config.js'
|
|
7
|
+
import buildLiveClasses from '../../../chunks/build/feature/liveClasses.js'
|
|
8
|
+
import buildAfterInit from '../../../chunks/build/feature/afterInit.js'
|
|
9
|
+
import buildBeforeInit from '../../../chunks/build/feature/beforeInit.js'
|
|
10
|
+
import buildFunctions from '../../../chunks/build/feature/functions.js'
|
|
11
|
+
import buildSchema from '../../../chunks/build/feature/schema.js'
|
|
12
|
+
import buildSystem from '../../../chunks/build/feature/system.js'
|
|
13
|
+
import buildLib from '../../../chunks/build/feature/lib.js'
|
|
14
|
+
import buildTriggers from '../../../chunks/build/feature/triggers.js'
|
|
15
|
+
import documentClass from '../class/index.js'
|
|
16
|
+
|
|
17
|
+
export default async props => {
|
|
18
|
+
const { path, includeChunksInMain = true } = props
|
|
19
|
+
let payload = []
|
|
20
|
+
|
|
21
|
+
let extraction = null
|
|
22
|
+
let index = await access({
|
|
23
|
+
item: FeatureEnum.Index,
|
|
24
|
+
extraction,
|
|
25
|
+
path
|
|
26
|
+
})
|
|
27
|
+
if (index && index.data && index.data.module) {
|
|
28
|
+
const { name, description, id, version } = index.data.module
|
|
29
|
+
payload.push({ h1: name })
|
|
30
|
+
payload.push({ p: `@${id}, #${version}` })
|
|
31
|
+
payload.push({ p: description })
|
|
32
|
+
// payload.push({ p: '' })
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
let icon = await access({
|
|
36
|
+
item: FeatureEnum.Assets.Icon,
|
|
37
|
+
// variant: FeatureEnum.Assets.Icon.variants.x2,
|
|
38
|
+
mimeType: FeatureEnum.Assets.Icon.mimeTypes.SVG,
|
|
39
|
+
extraction,
|
|
40
|
+
path
|
|
41
|
+
})
|
|
42
|
+
|
|
43
|
+
// if (icon && icon.data && icon.data.module) {
|
|
44
|
+
if (false) {
|
|
45
|
+
payload.push({
|
|
46
|
+
p: icon.data.module,
|
|
47
|
+
})
|
|
48
|
+
}
|
|
49
|
+
else {
|
|
50
|
+
icon = await access({
|
|
51
|
+
item: FeatureEnum.Assets.Icon,
|
|
52
|
+
variant: FeatureEnum.Assets.Icon.variants.x2,
|
|
53
|
+
mimeType: FeatureEnum.Assets.Icon.mimeTypes.PNG,
|
|
54
|
+
extraction,
|
|
55
|
+
path
|
|
56
|
+
})
|
|
57
|
+
if (icon && icon.data && icon.data.module && icon.data.module.base64) {
|
|
58
|
+
payload.push({
|
|
59
|
+
img: {
|
|
60
|
+
title: 'icon',
|
|
61
|
+
source: `${icon.data.module.base64}`,
|
|
62
|
+
alt: 'icon',
|
|
63
|
+
style: { width: "20px" }
|
|
64
|
+
}
|
|
65
|
+
})
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
payload.push({ p: '' })
|
|
69
|
+
const chunks = {}
|
|
70
|
+
|
|
71
|
+
chunks.seed = await buildSeed({ path })
|
|
72
|
+
payload.push({ h2: chunks.seed.name })
|
|
73
|
+
payload = payload.concat(chunks.seed.payload)
|
|
74
|
+
|
|
75
|
+
chunks.featureClass = await buildFeatureClass({ path })
|
|
76
|
+
payload.push({ h2: chunks.featureClass.name })
|
|
77
|
+
payload = payload.concat(chunks.featureClass.payload)
|
|
78
|
+
|
|
79
|
+
chunks.beforeInit = await buildBeforeInit({ path })
|
|
80
|
+
payload.push({ h2: chunks.beforeInit.name })
|
|
81
|
+
payload = payload.concat(chunks.beforeInit.payload)
|
|
82
|
+
|
|
83
|
+
chunks.afterInit = await buildAfterInit({ path })
|
|
84
|
+
payload.push({ h2: chunks.afterInit.name })
|
|
85
|
+
payload = payload.concat(chunks.afterInit.payload)
|
|
86
|
+
|
|
87
|
+
chunks.config = await buildConfig({ path })
|
|
88
|
+
payload.push({ h2: chunks.config.name })
|
|
89
|
+
payload = payload.concat(chunks.config.payload)
|
|
90
|
+
|
|
91
|
+
chunks.functions = await buildFunctions({ path })
|
|
92
|
+
payload.push({ h2: chunks.functions.name })
|
|
93
|
+
payload = payload.concat(chunks.functions.payload)
|
|
94
|
+
|
|
95
|
+
chunks.liveClasses = await buildLiveClasses({ path })
|
|
96
|
+
payload.push({ h2: chunks.liveClasses.name })
|
|
97
|
+
payload = payload.concat(chunks.liveClasses.payload)
|
|
98
|
+
|
|
99
|
+
chunks.schema = await buildSchema({ path })
|
|
100
|
+
payload.push({ h2: chunks.schema.name })
|
|
101
|
+
payload = payload.concat(chunks.schema.payload)
|
|
102
|
+
|
|
103
|
+
chunks.system = await buildSystem({ path })
|
|
104
|
+
payload.push({ h2: chunks.system.name })
|
|
105
|
+
payload = payload.concat(chunks.system.payload)
|
|
106
|
+
|
|
107
|
+
chunks.lib = await buildLib({ path })
|
|
108
|
+
payload.push({ h2: chunks.lib.name })
|
|
109
|
+
payload = payload.concat(chunks.lib.payload)
|
|
110
|
+
|
|
111
|
+
chunks.triggers = await buildTriggers({ path })
|
|
112
|
+
payload.push({ h2: chunks.triggers.name })
|
|
113
|
+
payload = payload.concat(chunks.triggers.payload)
|
|
114
|
+
|
|
115
|
+
payload = payload.filter(a => a)
|
|
116
|
+
|
|
117
|
+
|
|
118
|
+
|
|
119
|
+
let classes = null
|
|
120
|
+
const _classes = await access({
|
|
121
|
+
item: FeatureEnum.Classes,
|
|
122
|
+
path
|
|
123
|
+
})
|
|
124
|
+
if (_classes && _classes.children) {
|
|
125
|
+
classes = await Promise.all(_classes.children.map(async _class => documentClass({
|
|
126
|
+
path: _class.fullPath
|
|
127
|
+
})))
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
return {
|
|
131
|
+
payload,
|
|
132
|
+
chunks,
|
|
133
|
+
classes
|
|
134
|
+
}
|
|
135
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import buildFeature from './build/feature/index.js'
|
|
2
|
+
import writeFeature from './write/feature/index.js'
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
export default async props => {
|
|
6
|
+
const { path, write = false, includeAuxiliary = true, print = false } = props
|
|
7
|
+
const item = await buildFeature({ path })
|
|
8
|
+
if (print) {
|
|
9
|
+
console.log(item)
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
if (write) {
|
|
13
|
+
const written = await writeFeature({ item, path, includeAuxiliary })
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
return item
|
|
17
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import fse from 'fs-extra'
|
|
2
|
+
import json2md from 'json2md'
|
|
3
|
+
import writeChunk from '../utils/chunk.js'
|
|
4
|
+
import checkFileExists from "../../../../../lib/checkFileExists.js"
|
|
5
|
+
|
|
6
|
+
export default async ({ item, path, includeAuxiliary }) => {
|
|
7
|
+
const {
|
|
8
|
+
payload,
|
|
9
|
+
chunks,
|
|
10
|
+
} = item
|
|
11
|
+
|
|
12
|
+
const rootPath = path
|
|
13
|
+
|
|
14
|
+
if ((await checkFileExists(rootPath))) {
|
|
15
|
+
await fse.emptyDir(rootPath)
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
const indexPath = `/${rootPath}/index.md`
|
|
19
|
+
const chunksRootPath = `/${rootPath}`
|
|
20
|
+
|
|
21
|
+
const text = json2md(payload)
|
|
22
|
+
await fse.outputFile(indexPath, text)
|
|
23
|
+
|
|
24
|
+
await Promise.all(Object.keys(chunks).map(async chunk => writeChunk({ chunk: chunks[chunk], path: chunksRootPath, includeAuxiliary })))
|
|
25
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import sanitizePath from 'path-sanitizer'
|
|
2
|
+
import fse from 'fs-extra'
|
|
3
|
+
import json2md from 'json2md'
|
|
4
|
+
import writeChunk from '../utils/chunk.js'
|
|
5
|
+
import checkFileExists from "../../../../../lib/checkFileExists.js"
|
|
6
|
+
import writeClass from '../class/index.js'
|
|
7
|
+
|
|
8
|
+
export default async ({ item, path, includeAuxiliary }) => {
|
|
9
|
+
const {
|
|
10
|
+
payload,
|
|
11
|
+
chunks,
|
|
12
|
+
classes,
|
|
13
|
+
} = item
|
|
14
|
+
|
|
15
|
+
const rootPath = sanitizePath(`${path}/documentation/generated`)
|
|
16
|
+
|
|
17
|
+
if ((await checkFileExists(rootPath))) {
|
|
18
|
+
await fse.emptyDir(rootPath)
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
const indexPath = `/${rootPath}/index.md`
|
|
22
|
+
const chunksRootPath = `/${rootPath}`
|
|
23
|
+
|
|
24
|
+
const text = json2md(payload)
|
|
25
|
+
await fse.outputFile(indexPath, text)
|
|
26
|
+
|
|
27
|
+
await Promise.all(Object.keys(chunks).map(async chunk => writeChunk({ chunk: chunks[chunk], path: chunksRootPath, includeAuxiliary })))
|
|
28
|
+
|
|
29
|
+
if (classes && classes.length) {
|
|
30
|
+
|
|
31
|
+
await Promise.all(classes.map(async _item => {
|
|
32
|
+
if (!_item.id) {
|
|
33
|
+
return
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
return writeClass({
|
|
37
|
+
item: _item,
|
|
38
|
+
path: `/${rootPath}/classes/${_item.id}`,
|
|
39
|
+
includeAuxiliary
|
|
40
|
+
})
|
|
41
|
+
}))
|
|
42
|
+
}
|
|
43
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import sanitizePath from 'path-sanitizer'
|
|
2
|
+
import fs from 'fs'
|
|
3
|
+
|
|
4
|
+
export default async ({ payload, path }) => {
|
|
5
|
+
const { path, feature, classes } = payload
|
|
6
|
+
const rootPath = sanitizePath(`${path}/generated`)
|
|
7
|
+
|
|
8
|
+
const featurePath = sanitizePath(`${rootPath}/index.md`)
|
|
9
|
+
fs.promises.writeFile(featurePath, feature)
|
|
10
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import sanitizePath from 'path-sanitizer'
|
|
2
|
+
import fse from 'fs-extra'
|
|
3
|
+
import json2md from 'json2md'
|
|
4
|
+
|
|
5
|
+
export default async ({ chunk, path, includeAuxiliary }) => {
|
|
6
|
+
const {
|
|
7
|
+
payload,
|
|
8
|
+
name,
|
|
9
|
+
id,
|
|
10
|
+
auxiliary
|
|
11
|
+
} = chunk
|
|
12
|
+
|
|
13
|
+
const chunkPath = `/${sanitizePath(`${path}/${id}.md`)}`
|
|
14
|
+
let text = json2md([{ h1: name }, ...payload])
|
|
15
|
+
if (includeAuxiliary && auxiliary) {
|
|
16
|
+
text = `${text}\n${auxiliary}`
|
|
17
|
+
}
|
|
18
|
+
await fse.outputFile(chunkPath, text)
|
|
19
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { FeatureEnum, DataTemplateType } from "../../../../../manifest/data/1.0.0/enums.js"
|
|
2
|
+
import access from '../../../../../manifest/access/index.js'
|
|
3
|
+
|
|
4
|
+
export default async props => {
|
|
5
|
+
const { path, extraction } = props
|
|
6
|
+
const payload = []
|
|
7
|
+
const target = await access({
|
|
8
|
+
item: FeatureEnum.Class.Index,
|
|
9
|
+
type: DataTemplateType.Class,
|
|
10
|
+
path,
|
|
11
|
+
extraction
|
|
12
|
+
})
|
|
13
|
+
if (target && target.data) {
|
|
14
|
+
const { astAdapted } = target.data
|
|
15
|
+
if (astAdapted) {
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
return { payload, name: 'Class', id: 'class', auxiliary: (target && target.data) ? target.data.documentation : null }
|
|
20
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { FeatureEnum, DataTemplateType } from "../../../../../manifest/data/1.0.0/enums.js"
|
|
2
|
+
import access from '../../../../../manifest/access/index.js'
|
|
3
|
+
|
|
4
|
+
export default async props => {
|
|
5
|
+
const { path, extraction } = props
|
|
6
|
+
const payload = []
|
|
7
|
+
|
|
8
|
+
const target = await access({
|
|
9
|
+
item: FeatureEnum.Functions,
|
|
10
|
+
type: DataTemplateType.Class,
|
|
11
|
+
path,
|
|
12
|
+
extraction
|
|
13
|
+
})
|
|
14
|
+
if (target && target.data) {
|
|
15
|
+
const { astAdapted } = target.data
|
|
16
|
+
if (astAdapted) {
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
return { payload, name: 'Functions', id: 'functions', auxiliary: (target && target.data) ? target.data.documentation : null }
|
|
21
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { FeatureEnum, DataTemplateType } from "../../../../../manifest/data/1.0.0/enums.js"
|
|
2
|
+
import access from '../../../../../manifest/access/index.js'
|
|
3
|
+
|
|
4
|
+
export default async props => {
|
|
5
|
+
const { path, extraction } = props
|
|
6
|
+
const payload = []
|
|
7
|
+
|
|
8
|
+
const target = await access({
|
|
9
|
+
item: FeatureEnum.Lib,
|
|
10
|
+
type: DataTemplateType.Class,
|
|
11
|
+
path,
|
|
12
|
+
extraction
|
|
13
|
+
})
|
|
14
|
+
if (target && target.data) {
|
|
15
|
+
const { astAdapted } = target.data
|
|
16
|
+
if (astAdapted) {
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
return { payload, name: 'Lib', id: 'lib', auxiliary: (target && target.data) ? target.data.documentation : null }
|
|
21
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { FeatureEnum, DataTemplateType } from "../../../../../manifest/data/1.0.0/enums.js"
|
|
2
|
+
import access from '../../../../../manifest/access/index.js'
|
|
3
|
+
|
|
4
|
+
export default async props => {
|
|
5
|
+
const { path, extraction, includeAuxiliary = true } = props
|
|
6
|
+
const payload = []
|
|
7
|
+
|
|
8
|
+
const target = await access({
|
|
9
|
+
item: FeatureEnum.Class.Index,
|
|
10
|
+
type: DataTemplateType.Class,
|
|
11
|
+
path,
|
|
12
|
+
extraction
|
|
13
|
+
})
|
|
14
|
+
if (target && target.data) {
|
|
15
|
+
const { astAdapted } = target.data
|
|
16
|
+
if (astAdapted) {
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
return { payload, name: 'Seed', id: 'seed', auxiliary: (target && target.data) ? target.data.documentation : null }
|
|
21
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { FeatureEnum, DataTemplateType } from "../../../../../manifest/data/1.0.0/enums.js"
|
|
2
|
+
import access from '../../../../../manifest/access/index.js'
|
|
3
|
+
|
|
4
|
+
export default async props => {
|
|
5
|
+
const { path, extraction } = props
|
|
6
|
+
const payload = []
|
|
7
|
+
|
|
8
|
+
const target = await access({
|
|
9
|
+
item: FeatureEnum.Triggers,
|
|
10
|
+
type: DataTemplateType.Class,
|
|
11
|
+
path,
|
|
12
|
+
extraction
|
|
13
|
+
})
|
|
14
|
+
if (target && target.data) {
|
|
15
|
+
const { astAdapted } = target.data
|
|
16
|
+
if (astAdapted) {
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
return {
|
|
21
|
+
payload,
|
|
22
|
+
name: 'Triggers',
|
|
23
|
+
id: 'triggers',
|
|
24
|
+
auxiliary: (target && target.data) ? target.data.documentation : null
|
|
25
|
+
}
|
|
26
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { FeatureEnum } from "../../../../../manifest/data/1.0.0/enums.js"
|
|
2
|
+
import access from '../../../../../manifest/access/index.js'
|
|
3
|
+
|
|
4
|
+
export default async props => {
|
|
5
|
+
const { path, extraction } = props
|
|
6
|
+
const payload = []
|
|
7
|
+
|
|
8
|
+
const target = await access({
|
|
9
|
+
item: FeatureEnum.AfterInit,
|
|
10
|
+
path,
|
|
11
|
+
extraction
|
|
12
|
+
})
|
|
13
|
+
if (target && target.data) {
|
|
14
|
+
const { astAdapted } = target.data
|
|
15
|
+
if (astAdapted) {
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
return { payload, name: 'After init', id: 'afterInit', auxiliary: (target && target.data) ? target.data.documentation : null }
|
|
20
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { FeatureEnum } from "../../../../../manifest/data/1.0.0/enums.js"
|
|
2
|
+
import access from '../../../../../manifest/access/index.js'
|
|
3
|
+
|
|
4
|
+
export default async props => {
|
|
5
|
+
const { path, extraction } = props
|
|
6
|
+
const payload = []
|
|
7
|
+
|
|
8
|
+
const target = await access({
|
|
9
|
+
item: FeatureEnum.BeforeInit,
|
|
10
|
+
path,
|
|
11
|
+
extraction
|
|
12
|
+
})
|
|
13
|
+
if (target && target.data) {
|
|
14
|
+
const { astAdapted } = target.data
|
|
15
|
+
if (astAdapted) {
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
return { payload, name: 'Before init', id: 'beforeInit', auxiliary: (target && target.data) ? target.data.documentation : null }
|
|
20
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { FeatureEnum } from "../../../../../manifest/data/1.0.0/enums.js"
|
|
2
|
+
import access from '../../../../../manifest/access/index.js'
|
|
3
|
+
|
|
4
|
+
export default async props => {
|
|
5
|
+
const { path, extraction } = props
|
|
6
|
+
const payload = []
|
|
7
|
+
|
|
8
|
+
const target = await access({
|
|
9
|
+
item: FeatureEnum.Class.Index,
|
|
10
|
+
path,
|
|
11
|
+
extraction
|
|
12
|
+
})
|
|
13
|
+
if (target && target.data) {
|
|
14
|
+
const { astAdapted } = target.data
|
|
15
|
+
if (astAdapted) {
|
|
16
|
+
const { description, params = [], } = astAdapted
|
|
17
|
+
const rows = []
|
|
18
|
+
|
|
19
|
+
payload.push({
|
|
20
|
+
p: description
|
|
21
|
+
})
|
|
22
|
+
params.forEach(param => {
|
|
23
|
+
const { title, name, description: paramDescription, type } = param
|
|
24
|
+
rows.push([name ? name : "", description ? description : "", type.name ? type.name : ""])
|
|
25
|
+
})
|
|
26
|
+
if (rows && rows.length) {
|
|
27
|
+
payload.push({
|
|
28
|
+
table: {
|
|
29
|
+
headers: ["Name", "Description", "Type"],
|
|
30
|
+
rows
|
|
31
|
+
}
|
|
32
|
+
})
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
return {
|
|
38
|
+
payload, name: 'Feature class',
|
|
39
|
+
id: 'class',
|
|
40
|
+
auxiliary: (target && target.data) ? target.data.documentation : null
|
|
41
|
+
}
|
|
42
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { FeatureEnum } from "../../../../../manifest/data/1.0.0/enums.js"
|
|
2
|
+
import access from '../../../../../manifest/access/index.js'
|
|
3
|
+
|
|
4
|
+
export default async props => {
|
|
5
|
+
const { path, extraction } = props
|
|
6
|
+
const payload = []
|
|
7
|
+
|
|
8
|
+
const target = await access({
|
|
9
|
+
item: FeatureEnum.Config,
|
|
10
|
+
path,
|
|
11
|
+
extraction
|
|
12
|
+
})
|
|
13
|
+
if (target && target.data) {
|
|
14
|
+
const { astAdapted } = target.data
|
|
15
|
+
if (astAdapted) {
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
return { payload, name: 'Config', id: 'config', auxiliary: (target && target.data) ? target.data.documentation : null }
|
|
20
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { FeatureEnum } from "../../../../../manifest/data/1.0.0/enums.js"
|
|
2
|
+
import access from '../../../../../manifest/access/index.js'
|
|
3
|
+
|
|
4
|
+
export default async props => {
|
|
5
|
+
const { path, extraction } = props
|
|
6
|
+
const payload = []
|
|
7
|
+
|
|
8
|
+
const target = await access({
|
|
9
|
+
item: FeatureEnum.Functions,
|
|
10
|
+
path,
|
|
11
|
+
extraction
|
|
12
|
+
})
|
|
13
|
+
if (target && target.data) {
|
|
14
|
+
const { astAdapted } = target.data
|
|
15
|
+
if (astAdapted) {
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
return { payload, name: 'Functions', id: 'functions', auxiliary: (target && target.data) ? target.data.documentation : null }
|
|
20
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { FeatureEnum } from "../../../../../manifest/data/1.0.0/enums.js"
|
|
2
|
+
import access from '../../../../../manifest/access/index.js'
|
|
3
|
+
|
|
4
|
+
export default async props => {
|
|
5
|
+
const { path, extraction } = props
|
|
6
|
+
const payload = []
|
|
7
|
+
|
|
8
|
+
const target = await access({
|
|
9
|
+
item: FeatureEnum.Lib,
|
|
10
|
+
path,
|
|
11
|
+
extraction
|
|
12
|
+
})
|
|
13
|
+
if (target && target.data) {
|
|
14
|
+
const { astAdapted } = target.data
|
|
15
|
+
if (astAdapted) {
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
return { payload, name: 'Lib', id: 'lib', auxiliary: (target && target.data) ? target.data.documentation : null }
|
|
20
|
+
|
|
21
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { FeatureEnum } from "../../../../../manifest/data/1.0.0/enums.js"
|
|
2
|
+
import access from '../../../../../manifest/access/index.js'
|
|
3
|
+
|
|
4
|
+
export default async props => {
|
|
5
|
+
const { path, extraction } = props
|
|
6
|
+
const payload = []
|
|
7
|
+
|
|
8
|
+
const target = await access({
|
|
9
|
+
item: FeatureEnum.LiveClasses,
|
|
10
|
+
path,
|
|
11
|
+
extraction
|
|
12
|
+
})
|
|
13
|
+
if (target && target.data) {
|
|
14
|
+
const { astAdapted } = target.data
|
|
15
|
+
if (astAdapted) {
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
return { payload, name: 'Live Classes', id: 'liveClasses', auxiliary: (target && target.data) ? target.data.documentation : null }
|
|
20
|
+
}
|