@finos/legend-server-showcase-deployment 10.43.0 → 10.45.0
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.
@@ -14,7 +14,7 @@
|
|
14
14
|
* limitations under the License.
|
15
15
|
*/
|
16
16
|
|
17
|
-
import { resolve, join, relative } from 'path';
|
17
|
+
import { resolve, join, relative, sep } from 'path';
|
18
18
|
import { readFileSync, statSync, readdirSync, writeFileSync } from 'fs';
|
19
19
|
import { parse } from 'yaml';
|
20
20
|
|
@@ -44,14 +44,22 @@ const extractShowcaseInfo = (file) => {
|
|
44
44
|
}
|
45
45
|
}
|
46
46
|
const metadata = parse(frontMatter ?? '');
|
47
|
-
|
47
|
+
const data = {
|
48
48
|
title: typeof metadata.title === 'string' ? metadata.title : 'Untitled',
|
49
49
|
description:
|
50
50
|
typeof metadata.description === 'string'
|
51
51
|
? metadata.description
|
52
52
|
: undefined,
|
53
|
-
|
53
|
+
documentation: markdownText?.trim(),
|
54
54
|
};
|
55
|
+
const development =
|
56
|
+
typeof metadata.development === 'boolean'
|
57
|
+
? metadata.development
|
58
|
+
: undefined;
|
59
|
+
if (development !== undefined) {
|
60
|
+
data.development = development;
|
61
|
+
}
|
62
|
+
return data;
|
55
63
|
};
|
56
64
|
|
57
65
|
export const buildShowcaseRegistryData = (showcaseDirectoryPath) => {
|
@@ -61,9 +69,12 @@ export const buildShowcaseRegistryData = (showcaseDirectoryPath) => {
|
|
61
69
|
const files = readdirSync(directory);
|
62
70
|
for (const file of files) {
|
63
71
|
const absolutePath = join(directory, file);
|
72
|
+
const systemSeparator = sep;
|
64
73
|
if (statSync(absolutePath).isDirectory()) {
|
65
74
|
resolveShowcasePaths(absolutePath);
|
66
|
-
} else if (
|
75
|
+
} else if (
|
76
|
+
absolutePath.endsWith(`${systemSeparator}${SHOWCASE_INFO_FILE}`)
|
77
|
+
) {
|
67
78
|
if (!uniqueShowcasePaths.has(directory)) {
|
68
79
|
uniqueShowcasePaths.add(directory);
|
69
80
|
showcasePaths.push(directory);
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@finos/legend-server-showcase-deployment",
|
3
|
-
"version": "10.
|
3
|
+
"version": "10.45.0",
|
4
4
|
"description": "Legend Showcase server deployment",
|
5
5
|
"keywords": [
|
6
6
|
"legend",
|
@@ -51,7 +51,7 @@
|
|
51
51
|
},
|
52
52
|
"dependencies": {
|
53
53
|
"@fastify/cors": "8.4.0",
|
54
|
-
"@finos/legend-server-showcase": "0.0
|
54
|
+
"@finos/legend-server-showcase": "0.2.0",
|
55
55
|
"@finos/legend-shared": "10.0.27",
|
56
56
|
"fastify": "4.23.2"
|
57
57
|
},
|