Skip to content

Commit a51a34a

Browse files
committed
Rename markdown-patterns to markdown-db
1 parent 4512f97 commit a51a34a

File tree

16 files changed

+37
-34
lines changed

16 files changed

+37
-34
lines changed
File renamed without changes.

packages/markdown-patterns/package.json renamed to packages/markdown-db/package.json

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,29 @@
11
{
2-
"name": "@synstack/markdown-patterns",
2+
"name": "@synstack/markdown-db",
33
"type": "module",
44
"publishConfig": {
55
"access": "public"
66
},
7-
"version": "2.0.1",
8-
"description": "Query-based configuration engine for markdown files",
7+
"version": "3.0.0",
8+
"description": "Markdown database using Frontmatter",
99
"keywords": [
10-
"pattern",
11-
"engine",
10+
"database",
1211
"configuration",
1312
"query",
1413
"matching",
1514
"markdown",
1615
"typescript",
17-
"ts",
18-
"rules",
19-
"hierarchy"
16+
"ts"
2017
],
2118
"author": {
2219
"name": "pAIrprog",
2320
"url": "https://pairprog.io"
2421
},
25-
"homepage": "https://github.com/pAIrprogio/synscript/tree/main/packages/markdown-patterns",
22+
"homepage": "https://github.com/pAIrprogio/synscript/tree/main/packages/markdown-db",
2623
"repository": {
2724
"type": "git",
2825
"url": "https://github.com/pAIrprogio/synscript.git",
29-
"directory": "packages/markdown-patterns"
26+
"directory": "packages/markdown-db"
3027
},
3128
"license": "Apache-2.0",
3229
"scripts": {
@@ -41,12 +38,12 @@
4138
"exports": {
4239
".": {
4340
"import": {
44-
"types": "./dist/markdown-patterns.index.d.ts",
45-
"default": "./dist/markdown-patterns.index.js"
41+
"types": "./dist/markdown-db.index.d.ts",
42+
"default": "./dist/markdown-db.index.js"
4643
},
4744
"require": {
48-
"types": "./dist/markdown-patterns.index.d.cts",
49-
"default": "./dist/markdown-patterns.index.cjs"
45+
"types": "./dist/markdown-db.index.d.cts",
46+
"default": "./dist/markdown-db.index.cjs"
5047
}
5148
}
5249
},
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

packages/markdown-patterns/src/markdown-patterns.engine.test.ts renamed to packages/markdown-db/src/markdown-db.engine.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import assert from "node:assert/strict";
44
import { describe, it } from "node:test";
55
import path from "path";
66
import { z } from "zod/v4";
7-
import { MarkdownPatternsEngine } from "./markdown-patterns.engine.ts";
7+
import { MarkdownPatternsEngine } from "./markdown-db.engine.ts";
88

99
const currentDirectoryPath =
1010
import.meta.dirname || path.dirname(import.meta.url.replace("file://", ""));

packages/markdown-patterns/src/markdown-patterns.engine.ts renamed to packages/markdown-db/src/markdown-db.engine.ts

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
import type { FsDir } from "@synstack/fs";
22
import { QueryEngine } from "@synstack/query";
33
import { z } from "zod/v4";
4-
import { getPatterns, NAME_SEPARATOR } from "./markdown-patterns.lib.ts";
4+
import { getMarkdownEntries, NAME_SEPARATOR } from "./markdown-db.lib.ts";
55

66
type BaseConfigSchema = z.ZodObject<{
77
query: z.ZodType<unknown>;
88
}>;
99

1010
type Pattern<CONFIG_SCHEMA extends BaseConfigSchema> = Awaited<
11-
ReturnType<typeof getPatterns<CONFIG_SCHEMA>>
11+
ReturnType<typeof getMarkdownEntries<CONFIG_SCHEMA>>
1212
>[number];
1313

1414
export class MarkdownPatternsEngine<
@@ -90,7 +90,11 @@ export class MarkdownPatternsEngine<
9090
}
9191

9292
public async refreshPatterns() {
93-
this._patternsPromise = getPatterns(this._cwd, this.schema, this._glob);
93+
this._patternsPromise = getMarkdownEntries(
94+
this._cwd,
95+
this.schema,
96+
this._glob,
97+
);
9498
this._patternsMapPromise = this._patternsPromise.then(
9599
(patterns) =>
96100
new Map(patterns.map((pattern) => [pattern.$name, pattern])),
@@ -100,7 +104,11 @@ export class MarkdownPatternsEngine<
100104

101105
public async getPatterns() {
102106
if (!this._patternsPromise) {
103-
this._patternsPromise = getPatterns(this._cwd, this.schema, this._glob);
107+
this._patternsPromise = getMarkdownEntries(
108+
this._cwd,
109+
this.schema,
110+
this._glob,
111+
);
104112
}
105113
return this._patternsPromise;
106114
}

0 commit comments

Comments
 (0)