esm fuckery
This commit is contained in:
parent
ea3975cc89
commit
a4a0b4febd
6
packages/ai-tools/dist/lib/tools/git.js
vendored
6
packages/ai-tools/dist/lib/tools/git.js
vendored
File diff suppressed because one or more lines are too long
6660
packages/ai-tools/package-lock.json
generated
Normal file
6660
packages/ai-tools/package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
@ -36,7 +36,7 @@
|
||||
"@polymech/log": "file:../log",
|
||||
"axios": "^1.7.9",
|
||||
"cheerio": "^1.0.0",
|
||||
"find-up": "^5.0.0",
|
||||
"find-up": "^7.0.0",
|
||||
"glob": "^11.0.1",
|
||||
"inquirer": "^12.2.0",
|
||||
"jsdom": "^25.0.1",
|
||||
|
||||
@ -5,11 +5,12 @@ import { simpleGit } from 'simple-git'
|
||||
|
||||
import { sync as exists } from '@polymech/fs/exists'
|
||||
import { substitute } from '@polymech/commons'
|
||||
|
||||
import { logger } from '../../index.js'
|
||||
import { toolLogger } from '../../index.js'
|
||||
|
||||
import { IKBotTask } from '../../types.js'
|
||||
import { sync as findUp } from 'find-up'
|
||||
|
||||
import { findUpSync } from 'find-up'
|
||||
|
||||
const commitFiles = async (filePaths: string[], commitMessage: string, targetDirectory: string, variables: Record<string, string> = {}) => {
|
||||
try {
|
||||
@ -94,7 +95,7 @@ export const tools = (target: string, options: IKBotTask): Array<any> => {
|
||||
},
|
||||
function: async (params) => {
|
||||
logger.info(`Tool::init_repository Init Repository in ${target}`)
|
||||
const gitDir = findUp('.git',{ type: 'directory', cwd: target})
|
||||
const gitDir = findUpSync('.git',{ type: 'directory', cwd: target})
|
||||
if(gitDir && exists(gitDir)){
|
||||
logger.info(`Repository already exists at ${gitDir}`)
|
||||
return true
|
||||
|
||||
4
packages/fs/dist/utils/matcher.js
vendored
4
packages/fs/dist/utils/matcher.js
vendored
@ -1,4 +1,4 @@
|
||||
import { Minimatch } from 'minimatch';
|
||||
import * as Minimatch from 'minimatch';
|
||||
const patternToAbsolutePath = (basePath, pattern) => {
|
||||
// All patterns without slash are left as they are, if pattern contain
|
||||
// any slash we need to turn it into absolute path.
|
||||
@ -30,7 +30,7 @@ export function create(basePath, patterns, options) {
|
||||
matchers = patterns.map(pattern => {
|
||||
return patternToAbsolutePath(basePath, pattern);
|
||||
}).map(pattern => {
|
||||
return new Minimatch(pattern, options || {
|
||||
return new Minimatch.Minimatch(pattern, options || {
|
||||
matchBase: true,
|
||||
nocomment: true,
|
||||
dot: true
|
||||
|
||||
1177
packages/fs/package-lock.json
generated
Normal file
1177
packages/fs/package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
@ -37,7 +37,8 @@
|
||||
}
|
||||
},
|
||||
"dependencies": {
|
||||
"@polymech/core": "link:..\\core",
|
||||
"@polymech/core": "file:../core",
|
||||
"@repo/typescript-config": "file:../typescript-config",
|
||||
"denodeify": "^1.2.1",
|
||||
"glob": "^10.4.1",
|
||||
"mime": "^2.0.3",
|
||||
@ -49,7 +50,6 @@
|
||||
"yargs": "^17.7.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@repo/typescript-config": "workspace:*",
|
||||
"@types/denodeify": "^1.2.31",
|
||||
"@types/mime": "^2.0.0",
|
||||
"@types/node": "^22.10.2",
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import { Minimatch } from 'minimatch'
|
||||
import * as Minimatch from 'minimatch'
|
||||
|
||||
export interface IOptions {
|
||||
matchBase: boolean;
|
||||
@ -40,7 +40,7 @@ export function create(basePath: string, patterns: string[], options?: IOptions)
|
||||
matchers = patterns.map(pattern => {
|
||||
return patternToAbsolutePath(basePath, pattern);
|
||||
}).map(pattern => {
|
||||
return new Minimatch(pattern, options || {
|
||||
return new Minimatch.Minimatch(pattern, options || {
|
||||
matchBase: true,
|
||||
nocomment: true,
|
||||
dot: true
|
||||
|
||||
Loading…
Reference in New Issue
Block a user