@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,16 @@
|
|
|
1
|
+
import fs from "fs"
|
|
2
|
+
import checkFileExists from "./checkFileExists.js"
|
|
3
|
+
|
|
4
|
+
export default async _url => {
|
|
5
|
+
// try {
|
|
6
|
+
if (!(await checkFileExists(_url))) {
|
|
7
|
+
return null
|
|
8
|
+
}
|
|
9
|
+
const fileUrl = new URL(_url, import.meta.url)
|
|
10
|
+
const parsedPackageJSON = JSON.parse(await fs.promises.readFile(fileUrl, 'utf8'))
|
|
11
|
+
return parsedPackageJSON
|
|
12
|
+
// } catch (e) {
|
|
13
|
+
// console.log("[Servable]", `importJSONAsync → `, e)
|
|
14
|
+
// return null
|
|
15
|
+
// }
|
|
16
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
export default ({ item, tree, }) => {
|
|
2
|
+
|
|
3
|
+
if (!item.parents || !item.parents.length) {
|
|
4
|
+
if (tree.id === item.id) {
|
|
5
|
+
return tree
|
|
6
|
+
}
|
|
7
|
+
if (tree.id !== 'root') {
|
|
8
|
+
return null
|
|
9
|
+
}
|
|
10
|
+
if (!tree.children) {
|
|
11
|
+
return null
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
let candidates = tree.children.filter(a => (a.id === item.id))
|
|
15
|
+
if (candidates && candidates.length) {
|
|
16
|
+
return candidates[0]
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
const parents = [...(item.parents ? item.parents : [])]
|
|
21
|
+
let result
|
|
22
|
+
let subTree = tree
|
|
23
|
+
for (var i = 0; i < parents.length; i++) {
|
|
24
|
+
|
|
25
|
+
if (!subTree.children || !subTree.children.length) {
|
|
26
|
+
break
|
|
27
|
+
}
|
|
28
|
+
const parent = parents[i]
|
|
29
|
+
let candidates = subTree.children.filter(a => (a.id === parent))
|
|
30
|
+
if (!candidates || !candidates.length) {
|
|
31
|
+
break
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
if (i === parents.length - 1) {
|
|
35
|
+
result = candidates[0]
|
|
36
|
+
break
|
|
37
|
+
}
|
|
38
|
+
subTree = candidates[0]
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
if (result && result.children && result.children.length) {
|
|
42
|
+
let candidates = result.children.filter(a => (a.id === item.id))
|
|
43
|
+
if (candidates && candidates.length) {
|
|
44
|
+
return candidates[0]
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
return null
|
|
49
|
+
}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import extract from '../extract/index.js'
|
|
2
|
+
import accessChildInTreeWithRoute from './accessChildInTreeWithRoute.js'
|
|
3
|
+
import sanitizePath from '../../lib/sanitizePath.js'
|
|
4
|
+
import { DataTemplateType } from '../data/1.0.0/enums.js'
|
|
5
|
+
|
|
6
|
+
export default async ({
|
|
7
|
+
path,
|
|
8
|
+
variant,
|
|
9
|
+
mimeType,
|
|
10
|
+
item,
|
|
11
|
+
type = DataTemplateType.Feature,
|
|
12
|
+
formatData = true,
|
|
13
|
+
extraction: _extraction
|
|
14
|
+
}) => {
|
|
15
|
+
|
|
16
|
+
let extraction = _extraction
|
|
17
|
+
if (!extraction && path) {
|
|
18
|
+
extraction = await extract({ path: `${sanitizePath(path)}`, dataTemplateType: type })
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
if (!extraction) {
|
|
22
|
+
return null
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
const { reference, tree } = extraction
|
|
26
|
+
const result = accessChildInTreeWithRoute({ item, tree })
|
|
27
|
+
if (!result) {
|
|
28
|
+
return null
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
if (formatData && result.data) {
|
|
32
|
+
switch (result.type) {
|
|
33
|
+
default: break
|
|
34
|
+
case 'file': {
|
|
35
|
+
if (!result.data.length) {
|
|
36
|
+
break
|
|
37
|
+
}
|
|
38
|
+
if (mimeType) {
|
|
39
|
+
let candidates = result.data.filter(a => a.mimeType === mimeType)
|
|
40
|
+
result.data = candidates
|
|
41
|
+
}
|
|
42
|
+
if (variant) {
|
|
43
|
+
let candidates = result.data.filter(a => a.variant === variant)
|
|
44
|
+
if (candidates && candidates.length) {
|
|
45
|
+
result.data = candidates[0]
|
|
46
|
+
} else {
|
|
47
|
+
result.data = null
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
else {
|
|
51
|
+
result.data = result.data[0]
|
|
52
|
+
}
|
|
53
|
+
} break
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
return result
|
|
58
|
+
}
|
|
@@ -0,0 +1,233 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "root",
|
|
3
|
+
"name": "class",
|
|
4
|
+
"description": "class",
|
|
5
|
+
"routes": [
|
|
6
|
+
{
|
|
7
|
+
"type": "folder",
|
|
8
|
+
"path": "",
|
|
9
|
+
"priority": 0,
|
|
10
|
+
"children": [
|
|
11
|
+
{
|
|
12
|
+
"id": "index",
|
|
13
|
+
"name": "Index",
|
|
14
|
+
"description": "Index",
|
|
15
|
+
"routes": [
|
|
16
|
+
{
|
|
17
|
+
"type": "file",
|
|
18
|
+
"path": "index",
|
|
19
|
+
"mimeTypes": [
|
|
20
|
+
"application/json"
|
|
21
|
+
]
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
"type": "file",
|
|
25
|
+
"path": "manifest",
|
|
26
|
+
"mimeTypes": [
|
|
27
|
+
"application/json"
|
|
28
|
+
]
|
|
29
|
+
}
|
|
30
|
+
]
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"id": "license",
|
|
34
|
+
"name": "License",
|
|
35
|
+
"description": "License",
|
|
36
|
+
"routes": [
|
|
37
|
+
{
|
|
38
|
+
"type": "file",
|
|
39
|
+
"path": "LICENSE",
|
|
40
|
+
"mimeTypes": [
|
|
41
|
+
"text/plain"
|
|
42
|
+
]
|
|
43
|
+
}
|
|
44
|
+
]
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
"id": "functions",
|
|
48
|
+
"routes": [
|
|
49
|
+
{
|
|
50
|
+
"type": "filesCollection",
|
|
51
|
+
"path": "functions",
|
|
52
|
+
"priority": 0
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
"path": "cloudcode",
|
|
56
|
+
"priority": 1,
|
|
57
|
+
"isDeprecated": true
|
|
58
|
+
}
|
|
59
|
+
]
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
"id": "class",
|
|
63
|
+
"routes": [
|
|
64
|
+
{
|
|
65
|
+
"type": "folder",
|
|
66
|
+
"path": "class",
|
|
67
|
+
"priority": 0,
|
|
68
|
+
"isDeprecated": false,
|
|
69
|
+
"children": [
|
|
70
|
+
{
|
|
71
|
+
"id": "index",
|
|
72
|
+
"routes": [
|
|
73
|
+
{
|
|
74
|
+
"type": "file",
|
|
75
|
+
"mimeTypes": [
|
|
76
|
+
"text/javascript"
|
|
77
|
+
],
|
|
78
|
+
"path": "index"
|
|
79
|
+
}
|
|
80
|
+
]
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
"id": "features",
|
|
84
|
+
"routes": [
|
|
85
|
+
{
|
|
86
|
+
"type": "file",
|
|
87
|
+
"mimeTypes": [
|
|
88
|
+
"text/javascript"
|
|
89
|
+
],
|
|
90
|
+
"path": "features"
|
|
91
|
+
}
|
|
92
|
+
]
|
|
93
|
+
}
|
|
94
|
+
]
|
|
95
|
+
}
|
|
96
|
+
]
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
"id": "seed",
|
|
100
|
+
"routes": [
|
|
101
|
+
{
|
|
102
|
+
"type": "folder",
|
|
103
|
+
"path": "seed",
|
|
104
|
+
"priority": 0,
|
|
105
|
+
"isDeprecated": false,
|
|
106
|
+
"children": [
|
|
107
|
+
{
|
|
108
|
+
"id": "index",
|
|
109
|
+
"routes": [
|
|
110
|
+
{
|
|
111
|
+
"type": "file",
|
|
112
|
+
"mimeTypes": [
|
|
113
|
+
"text/javascript"
|
|
114
|
+
],
|
|
115
|
+
"path": "index"
|
|
116
|
+
}
|
|
117
|
+
]
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
"id": "ref",
|
|
121
|
+
"routes": [
|
|
122
|
+
{
|
|
123
|
+
"type": "file",
|
|
124
|
+
"mimeTypes": [
|
|
125
|
+
"text/javascript"
|
|
126
|
+
],
|
|
127
|
+
"path": "ref"
|
|
128
|
+
}
|
|
129
|
+
]
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
"id": "transformer",
|
|
133
|
+
"routes": [
|
|
134
|
+
{
|
|
135
|
+
"type": "file",
|
|
136
|
+
"mimeTypes": [
|
|
137
|
+
"text/javascript"
|
|
138
|
+
],
|
|
139
|
+
"path": "transformer"
|
|
140
|
+
}
|
|
141
|
+
]
|
|
142
|
+
},
|
|
143
|
+
{
|
|
144
|
+
"id": "executor",
|
|
145
|
+
"routes": [
|
|
146
|
+
{
|
|
147
|
+
"type": "file",
|
|
148
|
+
"mimeTypes": [
|
|
149
|
+
"application/json"
|
|
150
|
+
],
|
|
151
|
+
"path": "executor"
|
|
152
|
+
}
|
|
153
|
+
]
|
|
154
|
+
},
|
|
155
|
+
{
|
|
156
|
+
"id": "data",
|
|
157
|
+
"routes": [
|
|
158
|
+
{
|
|
159
|
+
"type": "file",
|
|
160
|
+
"mimeTypes": [
|
|
161
|
+
"application/json"
|
|
162
|
+
],
|
|
163
|
+
"path": "data"
|
|
164
|
+
}
|
|
165
|
+
]
|
|
166
|
+
},
|
|
167
|
+
{
|
|
168
|
+
"id": "validator",
|
|
169
|
+
"routes": [
|
|
170
|
+
{
|
|
171
|
+
"type": "file",
|
|
172
|
+
"mimeTypes": [
|
|
173
|
+
"text/javascript"
|
|
174
|
+
],
|
|
175
|
+
"path": "validator"
|
|
176
|
+
}
|
|
177
|
+
]
|
|
178
|
+
}
|
|
179
|
+
]
|
|
180
|
+
}
|
|
181
|
+
]
|
|
182
|
+
},
|
|
183
|
+
{
|
|
184
|
+
"id": "lib",
|
|
185
|
+
"routes": [
|
|
186
|
+
{
|
|
187
|
+
"type": "filesCollection",
|
|
188
|
+
"path": "lib",
|
|
189
|
+
"priority": 0
|
|
190
|
+
}
|
|
191
|
+
]
|
|
192
|
+
},
|
|
193
|
+
{
|
|
194
|
+
"id": "triggers",
|
|
195
|
+
"routes": [
|
|
196
|
+
{
|
|
197
|
+
"type": "folder",
|
|
198
|
+
"path": "triggers",
|
|
199
|
+
"priority": 0,
|
|
200
|
+
"isDeprecated": false,
|
|
201
|
+
"children": [
|
|
202
|
+
{
|
|
203
|
+
"id": "beforeSave",
|
|
204
|
+
"routes": [
|
|
205
|
+
{
|
|
206
|
+
"type": "file",
|
|
207
|
+
"mimeTypes": [
|
|
208
|
+
"text/javascript"
|
|
209
|
+
],
|
|
210
|
+
"path": "beforesave"
|
|
211
|
+
}
|
|
212
|
+
]
|
|
213
|
+
},
|
|
214
|
+
{
|
|
215
|
+
"id": "afterSave",
|
|
216
|
+
"routes": [
|
|
217
|
+
{
|
|
218
|
+
"type": "file",
|
|
219
|
+
"mimeTypes": [
|
|
220
|
+
"text/javascript"
|
|
221
|
+
],
|
|
222
|
+
"path": "aftersave"
|
|
223
|
+
}
|
|
224
|
+
]
|
|
225
|
+
}
|
|
226
|
+
]
|
|
227
|
+
}
|
|
228
|
+
]
|
|
229
|
+
}
|
|
230
|
+
]
|
|
231
|
+
}
|
|
232
|
+
]
|
|
233
|
+
}
|
|
@@ -0,0 +1,255 @@
|
|
|
1
|
+
export const FeatureEnum = {
|
|
2
|
+
Index: {
|
|
3
|
+
id: 'index'
|
|
4
|
+
},
|
|
5
|
+
Packages: {
|
|
6
|
+
id: 'packages'
|
|
7
|
+
},
|
|
8
|
+
License: {
|
|
9
|
+
id: 'license'
|
|
10
|
+
},
|
|
11
|
+
Assets: {
|
|
12
|
+
id: 'assets',
|
|
13
|
+
Icon: {
|
|
14
|
+
id: 'icon',
|
|
15
|
+
parents: ['assets'],
|
|
16
|
+
variants: {
|
|
17
|
+
x2: '@2x',
|
|
18
|
+
x3: '@3x'
|
|
19
|
+
},
|
|
20
|
+
mimeTypes: {
|
|
21
|
+
SVG: 'image/svg+xml',
|
|
22
|
+
PNG: 'image/png'
|
|
23
|
+
},
|
|
24
|
+
},
|
|
25
|
+
Thumbnail: {
|
|
26
|
+
id: 'thumbnail',
|
|
27
|
+
parents: ['assets'],
|
|
28
|
+
variants: {
|
|
29
|
+
x2: '@2x',
|
|
30
|
+
x3: '@3x'
|
|
31
|
+
},
|
|
32
|
+
},
|
|
33
|
+
Cover: {
|
|
34
|
+
id: 'cover',
|
|
35
|
+
parents: ['assets'],
|
|
36
|
+
variants: {
|
|
37
|
+
x2: '@2x',
|
|
38
|
+
x3: '@3x'
|
|
39
|
+
},
|
|
40
|
+
},
|
|
41
|
+
},
|
|
42
|
+
LiveClasses: {
|
|
43
|
+
id: 'liveClasses'
|
|
44
|
+
},
|
|
45
|
+
Classes: {
|
|
46
|
+
id: 'classes',
|
|
47
|
+
},
|
|
48
|
+
Class: {
|
|
49
|
+
id: 'class',
|
|
50
|
+
Index: {
|
|
51
|
+
id: 'index',
|
|
52
|
+
parents: ['class'],
|
|
53
|
+
},
|
|
54
|
+
Features: {
|
|
55
|
+
id: 'features',
|
|
56
|
+
parents: ['class']
|
|
57
|
+
},
|
|
58
|
+
},
|
|
59
|
+
Functions: {
|
|
60
|
+
id: 'functions',
|
|
61
|
+
},
|
|
62
|
+
Routes: {
|
|
63
|
+
id: 'functions',
|
|
64
|
+
},
|
|
65
|
+
Lib: {
|
|
66
|
+
id: 'lib',
|
|
67
|
+
},
|
|
68
|
+
Schema: {
|
|
69
|
+
id: 'schema'
|
|
70
|
+
},
|
|
71
|
+
BeforeInit: {
|
|
72
|
+
id: 'beforeInit',
|
|
73
|
+
Index: {
|
|
74
|
+
id: 'index',
|
|
75
|
+
parents: ['beforeInit'],
|
|
76
|
+
}
|
|
77
|
+
},
|
|
78
|
+
AfterInit: {
|
|
79
|
+
id: 'afterInit',
|
|
80
|
+
Index: {
|
|
81
|
+
id: 'index',
|
|
82
|
+
parents: ['afterInit'],
|
|
83
|
+
}
|
|
84
|
+
},
|
|
85
|
+
System: {
|
|
86
|
+
id: 'system',
|
|
87
|
+
Docker: {
|
|
88
|
+
id: 'docker',
|
|
89
|
+
parents: ['system'],
|
|
90
|
+
DockerCompose: {
|
|
91
|
+
id: 'index',
|
|
92
|
+
parents: ['system', 'docker'],
|
|
93
|
+
}
|
|
94
|
+
},
|
|
95
|
+
},
|
|
96
|
+
Config: {
|
|
97
|
+
id: 'config',
|
|
98
|
+
Conditions: {
|
|
99
|
+
id: 'conditions',
|
|
100
|
+
parents: ['config']
|
|
101
|
+
},
|
|
102
|
+
Entries: {
|
|
103
|
+
id: 'entries',
|
|
104
|
+
parents: ['config']
|
|
105
|
+
},
|
|
106
|
+
Groups: {
|
|
107
|
+
id: 'groups',
|
|
108
|
+
parents: ['config']
|
|
109
|
+
},
|
|
110
|
+
},
|
|
111
|
+
Seed: {
|
|
112
|
+
id: 'seed',
|
|
113
|
+
Index: {
|
|
114
|
+
id: 'index',
|
|
115
|
+
parents: ['seed']
|
|
116
|
+
},
|
|
117
|
+
},
|
|
118
|
+
Triggers: {
|
|
119
|
+
id: 'triggers',
|
|
120
|
+
beforeSave: {
|
|
121
|
+
id: 'beforeSave',
|
|
122
|
+
parents: ['triggers']
|
|
123
|
+
},
|
|
124
|
+
afterSave: {
|
|
125
|
+
id: 'afterSave',
|
|
126
|
+
parents: ['triggers']
|
|
127
|
+
},
|
|
128
|
+
beforeDelete: {
|
|
129
|
+
id: 'beforeDelete',
|
|
130
|
+
parents: ['triggers']
|
|
131
|
+
},
|
|
132
|
+
afterDelete: {
|
|
133
|
+
id: 'afterDelete',
|
|
134
|
+
parents: ['triggers']
|
|
135
|
+
},
|
|
136
|
+
beforeFind: {
|
|
137
|
+
id: 'beforeFind',
|
|
138
|
+
parents: ['triggers']
|
|
139
|
+
},
|
|
140
|
+
afterFind: {
|
|
141
|
+
id: 'afterFind',
|
|
142
|
+
parents: ['triggers']
|
|
143
|
+
}
|
|
144
|
+
},
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
export const ClassEnum = {
|
|
148
|
+
Index: {
|
|
149
|
+
id: 'index'
|
|
150
|
+
},
|
|
151
|
+
Class: {
|
|
152
|
+
id: 'class',
|
|
153
|
+
Index: {
|
|
154
|
+
id: 'index',
|
|
155
|
+
parents: ['class']
|
|
156
|
+
},
|
|
157
|
+
Features: {
|
|
158
|
+
id: 'features',
|
|
159
|
+
parents: ['class']
|
|
160
|
+
},
|
|
161
|
+
},
|
|
162
|
+
Lib: {
|
|
163
|
+
id: 'lib',
|
|
164
|
+
},
|
|
165
|
+
Seed: {
|
|
166
|
+
id: 'seed',
|
|
167
|
+
Index: {
|
|
168
|
+
id: 'index',
|
|
169
|
+
parents: ['seed']
|
|
170
|
+
},
|
|
171
|
+
Ref: {
|
|
172
|
+
id: 'ref',
|
|
173
|
+
parents: ['seed']
|
|
174
|
+
},
|
|
175
|
+
Executor: {
|
|
176
|
+
id: 'executor',
|
|
177
|
+
parents: ['seed']
|
|
178
|
+
},
|
|
179
|
+
Transformer: {
|
|
180
|
+
id: 'transformer',
|
|
181
|
+
parents: ['seed']
|
|
182
|
+
},
|
|
183
|
+
Validator: {
|
|
184
|
+
id: 'validator',
|
|
185
|
+
parents: ['seed']
|
|
186
|
+
},
|
|
187
|
+
},
|
|
188
|
+
Functions: {
|
|
189
|
+
id: 'functions'
|
|
190
|
+
},
|
|
191
|
+
Triggers: {
|
|
192
|
+
id: 'triggers',
|
|
193
|
+
beforeSave: {
|
|
194
|
+
id: 'beforeSave',
|
|
195
|
+
parents: ['triggers']
|
|
196
|
+
},
|
|
197
|
+
afterSave: {
|
|
198
|
+
id: 'afterSave',
|
|
199
|
+
parents: ['triggers']
|
|
200
|
+
},
|
|
201
|
+
beforeDelete: {
|
|
202
|
+
id: 'beforeDelete',
|
|
203
|
+
parents: ['triggers']
|
|
204
|
+
},
|
|
205
|
+
afterDelete: {
|
|
206
|
+
id: 'afterDelete',
|
|
207
|
+
parents: ['triggers']
|
|
208
|
+
},
|
|
209
|
+
beforeFind: {
|
|
210
|
+
id: 'beforeFind',
|
|
211
|
+
parents: ['triggers']
|
|
212
|
+
},
|
|
213
|
+
afterFind: {
|
|
214
|
+
id: 'afterFind',
|
|
215
|
+
parents: ['triggers']
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
export const SchemaEnum = {
|
|
220
|
+
Index: {
|
|
221
|
+
id: 'index'
|
|
222
|
+
},
|
|
223
|
+
ClassLevelPermissions: {
|
|
224
|
+
id: 'classLevelPermissions'
|
|
225
|
+
},
|
|
226
|
+
Migration: {
|
|
227
|
+
id: 'migration',
|
|
228
|
+
Index: {
|
|
229
|
+
id: 'index',
|
|
230
|
+
parents: ['migration']
|
|
231
|
+
},
|
|
232
|
+
Up: {
|
|
233
|
+
id: 'up',
|
|
234
|
+
Index: {
|
|
235
|
+
id: 'index',
|
|
236
|
+
parents: ['migration', 'up']
|
|
237
|
+
},
|
|
238
|
+
parents: ['migration']
|
|
239
|
+
},
|
|
240
|
+
Down: {
|
|
241
|
+
id: 'down',
|
|
242
|
+
Index: {
|
|
243
|
+
id: 'index',
|
|
244
|
+
parents: ['migration', 'down']
|
|
245
|
+
},
|
|
246
|
+
parents: ['migration']
|
|
247
|
+
},
|
|
248
|
+
},
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
export const DataTemplateType = {
|
|
252
|
+
Feature: 'feature',
|
|
253
|
+
Class: 'class',
|
|
254
|
+
Schema: 'schema',
|
|
255
|
+
}
|