@hasna/skills 0.1.38 → 0.1.39
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/bin/index.js +1 -1
- package/bin/mcp.js +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/skills/convert/src/index-local.ts +9 -11
package/bin/index.js
CHANGED
|
@@ -1910,7 +1910,7 @@ var package_default;
|
|
|
1910
1910
|
var init_package = __esm(() => {
|
|
1911
1911
|
package_default = {
|
|
1912
1912
|
name: "@hasna/skills",
|
|
1913
|
-
version: "0.1.
|
|
1913
|
+
version: "0.1.39",
|
|
1914
1914
|
description: "Skills library for AI coding agents",
|
|
1915
1915
|
type: "module",
|
|
1916
1916
|
bin: {
|
package/bin/mcp.js
CHANGED
|
@@ -21796,7 +21796,7 @@ class StdioServerTransport {
|
|
|
21796
21796
|
// package.json
|
|
21797
21797
|
var package_default = {
|
|
21798
21798
|
name: "@hasna/skills",
|
|
21799
|
-
version: "0.1.
|
|
21799
|
+
version: "0.1.39",
|
|
21800
21800
|
description: "Skills library for AI coding agents",
|
|
21801
21801
|
type: "module",
|
|
21802
21802
|
bin: {
|
package/dist/index.js
CHANGED
|
@@ -18035,7 +18035,7 @@ import { dirname as dirname3, relative as relative2 } from "path";
|
|
|
18035
18035
|
// package.json
|
|
18036
18036
|
var package_default = {
|
|
18037
18037
|
name: "@hasna/skills",
|
|
18038
|
-
version: "0.1.
|
|
18038
|
+
version: "0.1.39",
|
|
18039
18039
|
description: "Skills library for AI coding agents",
|
|
18040
18040
|
type: "module",
|
|
18041
18041
|
bin: {
|
package/package.json
CHANGED
|
@@ -37,17 +37,6 @@ import {
|
|
|
37
37
|
requiresAI,
|
|
38
38
|
getFormatCategory,
|
|
39
39
|
} from './types';
|
|
40
|
-
import {
|
|
41
|
-
convertImage,
|
|
42
|
-
convertDocument,
|
|
43
|
-
convertData,
|
|
44
|
-
convertWithAI,
|
|
45
|
-
pdfToText,
|
|
46
|
-
imagesToPdf,
|
|
47
|
-
getPdfMetadata,
|
|
48
|
-
getImageMetadata,
|
|
49
|
-
} from './converters';
|
|
50
|
-
|
|
51
40
|
// Parse command line arguments
|
|
52
41
|
function parseArgs(): {
|
|
53
42
|
command: string;
|
|
@@ -285,6 +274,7 @@ async function showInfo(filePath: string): Promise<void> {
|
|
|
285
274
|
// Format-specific info
|
|
286
275
|
if (category === 'image') {
|
|
287
276
|
try {
|
|
277
|
+
const { getImageMetadata } = await import('./converters/image');
|
|
288
278
|
const metadata = await getImageMetadata(filePath);
|
|
289
279
|
console.log(`Dimensions: ${metadata.width}x${metadata.height}`);
|
|
290
280
|
console.log(`Channels: ${metadata.channels}`);
|
|
@@ -293,6 +283,7 @@ async function showInfo(filePath: string): Promise<void> {
|
|
|
293
283
|
}
|
|
294
284
|
} else if (format === 'pdf') {
|
|
295
285
|
try {
|
|
286
|
+
const { getPdfMetadata } = await import('./converters/pdf');
|
|
296
287
|
const metadata = await getPdfMetadata(filePath);
|
|
297
288
|
console.log(`Pages: ${metadata.pageCount}`);
|
|
298
289
|
if (metadata.title) console.log(`Title: ${metadata.title}`);
|
|
@@ -335,11 +326,13 @@ async function convert(options: ConvertOptions): Promise<ConvertResult> {
|
|
|
335
326
|
duration: 0,
|
|
336
327
|
};
|
|
337
328
|
}
|
|
329
|
+
const { convertWithAI } = await import('./converters/ai');
|
|
338
330
|
return convertWithAI(options);
|
|
339
331
|
}
|
|
340
332
|
|
|
341
333
|
// Image to image
|
|
342
334
|
if (inputCategory === 'image' && outputCategory === 'image') {
|
|
335
|
+
const { convertImage } = await import('./converters/image');
|
|
343
336
|
return convertImage(options);
|
|
344
337
|
}
|
|
345
338
|
|
|
@@ -351,21 +344,25 @@ async function convert(options: ConvertOptions): Promise<ConvertResult> {
|
|
|
351
344
|
|
|
352
345
|
// PDF to text
|
|
353
346
|
if (inputFormat === 'pdf' && outputFormat === 'txt') {
|
|
347
|
+
const { pdfToText } = await import('./converters/pdf');
|
|
354
348
|
return pdfToText(options);
|
|
355
349
|
}
|
|
356
350
|
|
|
357
351
|
// Document conversions
|
|
358
352
|
if (inputCategory === 'document' || outputCategory === 'document') {
|
|
353
|
+
const { convertDocument } = await import('./converters/document');
|
|
359
354
|
return convertDocument(options);
|
|
360
355
|
}
|
|
361
356
|
|
|
362
357
|
// Data conversions
|
|
363
358
|
if (inputCategory === 'data' || outputCategory === 'data') {
|
|
359
|
+
const { convertData } = await import('./converters/data');
|
|
364
360
|
return convertData(options);
|
|
365
361
|
}
|
|
366
362
|
|
|
367
363
|
// Markup conversions
|
|
368
364
|
if (inputCategory === 'markup' || outputCategory === 'markup') {
|
|
365
|
+
const { convertDocument } = await import('./converters/document');
|
|
369
366
|
return convertDocument(options);
|
|
370
367
|
}
|
|
371
368
|
|
|
@@ -400,6 +397,7 @@ async function main(): Promise<void> {
|
|
|
400
397
|
|
|
401
398
|
// Check if multiple inputs for PDF creation
|
|
402
399
|
if (args.inputs && args.inputs.length > 1 && args.format === 'pdf') {
|
|
400
|
+
const { imagesToPdf } = await import('./converters/pdf');
|
|
403
401
|
console.log(`\nCombining ${args.inputs.length} images into PDF...`);
|
|
404
402
|
const result = await imagesToPdf(
|
|
405
403
|
args.inputs,
|