@vibe-forge/core 0.2.0-alpha.9 → 0.3.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vibe-forge/core",
3
- "version": "0.2.0-alpha.9",
3
+ "version": "0.3.0",
4
4
  "imports": {
5
5
  "#~/*.js": {
6
6
  "__vibe-forge__": {
@@ -14,6 +14,7 @@ export interface Filter {
14
14
  export interface Rule {
15
15
  name?: string
16
16
  description?: string
17
+ globs?: string | string[]
17
18
  /**
18
19
  * 是否默认加载至系统上下文
19
20
  */
@@ -89,7 +90,12 @@ export class DefinitionLoader {
89
90
  patterns: string[],
90
91
  cwd: string = this.cwd
91
92
  ): Promise<string[]> {
92
- return glob(patterns, { cwd, absolute: true })
93
+ const paths = await glob(patterns, { cwd, absolute: true })
94
+ return paths.sort((a, b) => {
95
+ const aKey = relative(cwd, a).split('\\').join('/')
96
+ const bKey = relative(cwd, b).split('\\').join('/')
97
+ return aKey.localeCompare(bKey)
98
+ })
93
99
  }
94
100
 
95
101
  async loadRules(rules: string[]) {