@caiqueoak/flow 0.5.2 → 0.5.3
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 +1 -1
- package/src/shared/profiles.mjs +6 -1
package/package.json
CHANGED
package/src/shared/profiles.mjs
CHANGED
|
@@ -4,7 +4,12 @@ const text = fs.readFileSync(
|
|
|
4
4
|
new URL('../../skills/flow/engineering/profiles/readability-first.md', import.meta.url),
|
|
5
5
|
'utf8'
|
|
6
6
|
);
|
|
7
|
-
export
|
|
7
|
+
export function parseProfileFrontmatter(text) {
|
|
8
|
+
const match = text.match(/^---\r?\n([\s\S]*?)\r?\n---(?:\r?\n|$)/);
|
|
9
|
+
if (!match) throw new Error('Missing YAML frontmatter in Flow profile.');
|
|
10
|
+
return parse(match[1]);
|
|
11
|
+
}
|
|
12
|
+
export const READABILITY_FIRST_PROFILE = parseProfileFrontmatter(text);
|
|
8
13
|
export const ENGINEERING_PROFILES = {
|
|
9
14
|
'readability-first': READABILITY_FIRST_PROFILE,
|
|
10
15
|
[READABILITY_FIRST_PROFILE.id]: READABILITY_FIRST_PROFILE
|