@frontmcp/utils 1.10.14 → 1.10.16
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/content/content.d.ts +8 -0
- package/content/index.d.ts +1 -1
- package/esm/index.mjs +1 -1
- package/fs/fs.d.ts +25 -0
- package/fs/index.d.ts +1 -1
- package/index.d.ts +2 -2
- package/index.js +1 -1
- package/package.json +2 -2
package/fs/fs.d.ts
CHANGED
|
@@ -200,6 +200,31 @@ export declare function ensureDir(p: string): Promise<void>;
|
|
|
200
200
|
* if (stats.isDirectory()) { ... }
|
|
201
201
|
*/
|
|
202
202
|
export declare function stat(p: string): Promise<import('fs').Stats>;
|
|
203
|
+
/**
|
|
204
|
+
* Get file/directory stats without following a symlink.
|
|
205
|
+
*
|
|
206
|
+
* **Node.js only** - throws an error if called in browser.
|
|
207
|
+
*
|
|
208
|
+
* @param p - Path to file, directory, socket or symlink
|
|
209
|
+
* @returns Stats of the entry itself (isSocket(), isSymbolicLink(), mode, uid, ...)
|
|
210
|
+
*
|
|
211
|
+
* @example
|
|
212
|
+
* const stats = await lstat('/tmp/app.sock');
|
|
213
|
+
* if (stats.isSocket()) { ... }
|
|
214
|
+
*/
|
|
215
|
+
export declare function lstat(p: string): Promise<import('fs').Stats>;
|
|
216
|
+
/**
|
|
217
|
+
* Change the permission bits of a file or directory.
|
|
218
|
+
*
|
|
219
|
+
* **Node.js only** - throws an error if called in browser.
|
|
220
|
+
*
|
|
221
|
+
* @param p - Path to file or directory
|
|
222
|
+
* @param mode - Permission bits, e.g. 0o600
|
|
223
|
+
*
|
|
224
|
+
* @example
|
|
225
|
+
* await chmod('/tmp/app.sock', 0o600);
|
|
226
|
+
*/
|
|
227
|
+
export declare function chmod(p: string, mode: number): Promise<void>;
|
|
203
228
|
/** Link type accepted by {@link symlink}; only meaningful on Windows. */
|
|
204
229
|
export type SymlinkType = 'dir' | 'file' | 'junction';
|
|
205
230
|
/**
|
package/fs/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { readFile, readFileSync, readFileBuffer, writeFile, mkdir, rename, unlink, stat, copyFile, cp, readdir, readdirSync, realpath, rm, mkdtemp, symlink, access, fileExists, fileExistsSync, readJSON, writeJSON, ensureDir, ensureDirSync, isDirEmpty, runCmd, watchFile, getSpawnFn, } from './fs';
|
|
1
|
+
export { readFile, readFileSync, readFileBuffer, writeFile, mkdir, rename, unlink, stat, lstat, chmod, copyFile, cp, readdir, readdirSync, realpath, rm, mkdtemp, symlink, access, fileExists, fileExistsSync, readJSON, writeJSON, ensureDir, ensureDirSync, isDirEmpty, runCmd, watchFile, getSpawnFn, } from './fs';
|
|
2
2
|
export type { FileWatcherHandle, SymlinkType } from './fs';
|
package/index.d.ts
CHANGED
|
@@ -10,12 +10,12 @@ export type { NameCase } from './naming';
|
|
|
10
10
|
export { isValidMcpUri, extractUriScheme, isValidMcpUriTemplate, parseUriTemplate, matchUriTemplate, expandUriTemplate, extractTemplateParams, isUriTemplate, } from './uri';
|
|
11
11
|
export type { ParsedUriTemplate } from './uri';
|
|
12
12
|
export { trimSlashes, joinPath, pathResolve, pathJoin, basename, dirname, extname, isAbsolute, pathToFileURL, sep, } from './path';
|
|
13
|
-
export { sanitizeToJson, inferMimeType, findNonFiniteNumber } from './content';
|
|
13
|
+
export { sanitizeToJson, inferMimeType, findNonFiniteNumber, findDroppedKeys } from './content';
|
|
14
14
|
export { validateBaseUrl, buildSetCookie, parseCookies, getCookie, isLocalhost, isSecureRequest } from './http';
|
|
15
15
|
export type { CookieOptions, SecureDetectionRequest } from './http';
|
|
16
16
|
export { classifyIpAddress, expandIpv6, extractEmbeddedIpv4, parseIpv4, isRedirectResponse } from './net';
|
|
17
17
|
export type { IpAddressClassification, IpAddressRange, SpecialPurposeIpRange, RedirectCandidate } from './net';
|
|
18
|
-
export { readFile, readFileSync, readFileBuffer, writeFile, mkdir, rename, unlink, stat, copyFile, cp, readdir, readdirSync, realpath, rm, mkdtemp, symlink, access, fileExists, fileExistsSync, readJSON, writeJSON, ensureDir, ensureDirSync, isDirEmpty, runCmd, watchFile, getSpawnFn, } from './fs';
|
|
18
|
+
export { readFile, readFileSync, readFileBuffer, writeFile, mkdir, rename, unlink, stat, lstat, chmod, copyFile, cp, readdir, readdirSync, realpath, rm, mkdtemp, symlink, access, fileExists, fileExistsSync, readJSON, writeJSON, ensureDir, ensureDirSync, isDirEmpty, runCmd, watchFile, getSpawnFn, } from './fs';
|
|
19
19
|
export type { FileWatcherHandle } from './fs';
|
|
20
20
|
export { escapeHtml, escapeHtmlAttr, escapeJsString, escapeScriptClose, safeJsonForScript } from './escape';
|
|
21
21
|
export { brandClass, isBrandedInstance } from './class-brand';
|