2026-03-13 12:21:09 -06:00
|
|
|
{
|
2026-04-15 22:56:33 +02:00
|
|
|
"name": "@singularity-forge/native",
|
2026-04-17 17:26:31 +00:00
|
|
|
"version": "2.75.0",
|
2026-04-15 13:38:15 +02:00
|
|
|
"description": "Native Rust bindings for sf-run — high-performance native modules via N-API",
|
2026-03-30 15:51:57 -04:00
|
|
|
"type": "commonjs",
|
2026-03-13 14:05:41 -06:00
|
|
|
"main": "./dist/index.js",
|
|
|
|
|
"types": "./dist/index.d.ts",
|
2026-03-13 12:21:09 -06:00
|
|
|
"scripts": {
|
2026-03-13 14:05:41 -06:00
|
|
|
"build": "tsc -p tsconfig.json",
|
2026-04-30 20:21:12 +02:00
|
|
|
"build:native": "node ../../rust-engine/scripts/build.js",
|
|
|
|
|
"build:native:dev": "node ../../rust-engine/scripts/build.js --dev",
|
2026-05-02 08:31:44 +02:00
|
|
|
"test": "npm run build:native:dev && node --test src/__tests__/grep.test.mjs src/__tests__/ps.test.mjs src/__tests__/glob.test.mjs src/__tests__/clipboard.test.mjs src/__tests__/highlight.test.mjs src/__tests__/html.test.mjs src/__tests__/text.test.mjs src/__tests__/fd.test.mjs src/__tests__/image.test.mjs src/__tests__/edit.test.mjs src/__tests__/symbol.test.mjs src/__tests__/watch.test.mjs"
|
2026-03-13 12:21:09 -06:00
|
|
|
},
|
|
|
|
|
"exports": {
|
|
|
|
|
".": {
|
2026-03-13 14:05:41 -06:00
|
|
|
"types": "./dist/index.d.ts",
|
2026-03-30 15:51:57 -04:00
|
|
|
"default": "./dist/index.js"
|
2026-03-13 12:21:09 -06:00
|
|
|
},
|
|
|
|
|
"./grep": {
|
2026-03-13 14:05:41 -06:00
|
|
|
"types": "./dist/grep/index.d.ts",
|
2026-03-30 15:51:57 -04:00
|
|
|
"default": "./dist/grep/index.js"
|
2026-03-13 12:43:50 -06:00
|
|
|
},
|
|
|
|
|
"./ps": {
|
2026-03-13 14:05:41 -06:00
|
|
|
"types": "./dist/ps/index.d.ts",
|
2026-03-30 15:51:57 -04:00
|
|
|
"default": "./dist/ps/index.js"
|
feat: add native glob and fs_cache modules with gitignore-aware discovery (#226)
Port glob, glob_util, and fs_cache modules from Oh My Pi's pi-natives crate,
adapted for napi-rs v2. Provides gitignore-respecting filesystem discovery
with a TTL-based scan cache, mtime sorting, file-type filtering, and
node_modules exclusion.
Includes a task module for async N-API work scheduling with cooperative
cancellation (timeout-based), TypeScript type declarations and wrapper,
and 12 integration tests covering pattern matching, recursion, gitignore,
maxResults, sortByMtime, fileType filtering, and cache invalidation.
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-13 12:45:56 -06:00
|
|
|
},
|
|
|
|
|
"./glob": {
|
2026-03-13 14:05:41 -06:00
|
|
|
"types": "./dist/glob/index.d.ts",
|
2026-03-30 15:51:57 -04:00
|
|
|
"default": "./dist/glob/index.js"
|
2026-03-13 12:48:27 -06:00
|
|
|
},
|
|
|
|
|
"./clipboard": {
|
2026-03-13 14:05:41 -06:00
|
|
|
"types": "./dist/clipboard/index.d.ts",
|
2026-03-30 15:51:57 -04:00
|
|
|
"default": "./dist/clipboard/index.js"
|
2026-03-13 13:01:41 -06:00
|
|
|
},
|
|
|
|
|
"./ast": {
|
2026-03-13 14:05:41 -06:00
|
|
|
"types": "./dist/ast/index.d.ts",
|
2026-03-30 15:51:57 -04:00
|
|
|
"default": "./dist/ast/index.js"
|
2026-03-13 13:11:40 -06:00
|
|
|
},
|
2026-03-13 12:40:22 -06:00
|
|
|
"./html": {
|
2026-03-13 14:05:41 -06:00
|
|
|
"types": "./dist/html/index.d.ts",
|
2026-03-30 15:51:57 -04:00
|
|
|
"default": "./dist/html/index.js"
|
2026-03-13 13:12:40 -06:00
|
|
|
},
|
2026-03-13 12:42:42 -06:00
|
|
|
"./text": {
|
2026-03-13 14:05:41 -06:00
|
|
|
"types": "./dist/text/index.d.ts",
|
2026-03-30 15:51:57 -04:00
|
|
|
"default": "./dist/text/index.js"
|
2026-03-13 13:13:43 -06:00
|
|
|
},
|
|
|
|
|
"./fd": {
|
2026-03-13 14:05:41 -06:00
|
|
|
"types": "./dist/fd/index.d.ts",
|
2026-03-30 15:51:57 -04:00
|
|
|
"default": "./dist/fd/index.js"
|
2026-03-13 13:22:09 -06:00
|
|
|
},
|
feat: add native image module — decode, encode, and resize via Rust image crate
Port image processing from Oh My Pi's pi-natives crate, adapted for napi-rs v2.
Exposes NativeImage class with async parse/encode/resize methods backed by the
Rust `image` crate (PNG, JPEG, WebP, GIF support).
Includes:
- task.rs: lightweight async task scheduling for libuv thread pool
- image.rs: NativeImage class with SamplingFilter enum
- TypeScript types and wrapper (parseImage, ImageFormat, SamplingFilter)
- 8 passing tests covering decode, encode, resize, round-trip, error cases
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-13 12:51:49 -06:00
|
|
|
"./image": {
|
2026-03-13 14:05:41 -06:00
|
|
|
"types": "./dist/image/index.d.ts",
|
2026-03-30 15:51:57 -04:00
|
|
|
"default": "./dist/image/index.js"
|
2026-03-13 16:46:08 -06:00
|
|
|
},
|
|
|
|
|
"./xxhash": {
|
|
|
|
|
"types": "./dist/xxhash/index.d.ts",
|
2026-03-30 15:51:57 -04:00
|
|
|
"default": "./dist/xxhash/index.js"
|
2026-03-17 18:01:56 -06:00
|
|
|
},
|
|
|
|
|
"./diff": {
|
|
|
|
|
"types": "./dist/diff/index.d.ts",
|
2026-03-30 15:51:57 -04:00
|
|
|
"default": "./dist/diff/index.js"
|
2026-03-17 18:01:56 -06:00
|
|
|
},
|
2026-05-02 08:31:44 +02:00
|
|
|
"./edit": {
|
|
|
|
|
"types": "./dist/edit/index.d.ts",
|
|
|
|
|
"default": "./dist/edit/index.js"
|
|
|
|
|
},
|
2026-04-15 14:22:21 +02:00
|
|
|
"./forge-parser": {
|
|
|
|
|
"types": "./dist/forge-parser/index.d.ts",
|
|
|
|
|
"default": "./dist/forge-parser/index.js"
|
2026-03-17 18:01:56 -06:00
|
|
|
},
|
|
|
|
|
"./highlight": {
|
|
|
|
|
"types": "./dist/highlight/index.d.ts",
|
2026-03-30 15:51:57 -04:00
|
|
|
"default": "./dist/highlight/index.js"
|
2026-03-17 18:01:56 -06:00
|
|
|
},
|
|
|
|
|
"./json-parse": {
|
|
|
|
|
"types": "./dist/json-parse/index.d.ts",
|
2026-03-30 15:51:57 -04:00
|
|
|
"default": "./dist/json-parse/index.js"
|
2026-03-17 18:01:56 -06:00
|
|
|
},
|
|
|
|
|
"./stream-process": {
|
|
|
|
|
"types": "./dist/stream-process/index.d.ts",
|
2026-03-30 15:51:57 -04:00
|
|
|
"default": "./dist/stream-process/index.js"
|
2026-03-17 18:01:56 -06:00
|
|
|
},
|
|
|
|
|
"./truncate": {
|
|
|
|
|
"types": "./dist/truncate/index.d.ts",
|
2026-03-30 15:51:57 -04:00
|
|
|
"default": "./dist/truncate/index.js"
|
2026-03-17 18:01:56 -06:00
|
|
|
},
|
|
|
|
|
"./ttsr": {
|
|
|
|
|
"types": "./dist/ttsr/index.d.ts",
|
2026-03-30 15:51:57 -04:00
|
|
|
"default": "./dist/ttsr/index.js"
|
2026-03-13 12:21:09 -06:00
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
"files": [
|
2026-03-13 14:05:41 -06:00
|
|
|
"dist"
|
2026-03-13 12:21:09 -06:00
|
|
|
],
|
2026-05-02 06:18:25 +02:00
|
|
|
"engines": {
|
2026-05-02 06:30:45 +02:00
|
|
|
"node": ">=24.15.0"
|
2026-05-02 06:18:25 +02:00
|
|
|
},
|
2026-04-28 21:10:17 +02:00
|
|
|
"optionalDependencies": {
|
|
|
|
|
"@singularity-forge/engine-darwin-arm64": ">=2.75.0",
|
|
|
|
|
"@singularity-forge/engine-darwin-x64": ">=2.75.0",
|
|
|
|
|
"@singularity-forge/engine-linux-x64-gnu": ">=2.75.0",
|
|
|
|
|
"@singularity-forge/engine-linux-arm64-gnu": ">=2.75.0",
|
|
|
|
|
"@singularity-forge/engine-win32-x64-msvc": ">=2.75.0"
|
|
|
|
|
},
|
2026-03-13 12:21:09 -06:00
|
|
|
"license": "MIT"
|
|
|
|
|
}
|