codemelt-shared 0.1.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.
@@ -0,0 +1,9 @@
1
+ export declare const MAX_FILES = 3000;
2
+ export declare const MAX_TOTAL_BYTES: number;
3
+ export declare const MAX_FILE_SIZE: number;
4
+ export declare const MAX_CONTENT_CHARS: number;
5
+ export declare const MAX_EXPORT_FILES = 3000;
6
+ export declare const MAX_EXPORT_BYTES: number;
7
+ export declare const MAX_DIRECTORY_DEPTH = 10;
8
+ export declare const DEFAULT_IGNORES: string[];
9
+ //# sourceMappingURL=constants.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,SAAS,OAAO,CAAC;AAC9B,eAAO,MAAM,eAAe,QAAmB,CAAC;AAChD,eAAO,MAAM,aAAa,QAAkB,CAAC;AAC7C,eAAO,MAAM,iBAAiB,QAAa,CAAC;AAC5C,eAAO,MAAM,gBAAgB,OAAO,CAAC;AACrC,eAAO,MAAM,gBAAgB,QAAmB,CAAC;AACjD,eAAO,MAAM,mBAAmB,KAAK,CAAC;AAEtC,eAAO,MAAM,eAAe,UAyD3B,CAAC"}
@@ -0,0 +1,56 @@
1
+ export const MAX_FILES = 3000;
2
+ export const MAX_TOTAL_BYTES = 50 * 1024 * 1024; // 50MB
3
+ export const MAX_FILE_SIZE = 1 * 1024 * 1024; // 1MB
4
+ export const MAX_CONTENT_CHARS = 100 * 1024; // 100KB
5
+ export const MAX_EXPORT_FILES = 3000;
6
+ export const MAX_EXPORT_BYTES = 50 * 1024 * 1024;
7
+ export const MAX_DIRECTORY_DEPTH = 10;
8
+ export const DEFAULT_IGNORES = [
9
+ // Direct directory and recursive child ignores for early pruning
10
+ "node_modules",
11
+ "**/node_modules",
12
+ "**/node_modules/**",
13
+ ".git",
14
+ "**/.git",
15
+ "**/.git/**",
16
+ ".next",
17
+ "**/.next",
18
+ "**/.next/**",
19
+ "dist",
20
+ "**/dist",
21
+ "**/dist/**",
22
+ "build",
23
+ "**/build",
24
+ "**/build/**",
25
+ "coverage",
26
+ "**/coverage",
27
+ "**/coverage/**",
28
+ ".env",
29
+ ".env.*",
30
+ "*.png",
31
+ "*.jpg",
32
+ "*.jpeg",
33
+ "*.gif",
34
+ "*.webp",
35
+ "*.ico",
36
+ "*.mp4",
37
+ "*.mp3",
38
+ "*.zip",
39
+ "*.tar",
40
+ "*.gz",
41
+ "*.tar.gz",
42
+ "*.tgz",
43
+ "codemelt-context.md",
44
+ "codemelt-context.xml",
45
+ "*.log",
46
+ ".DS_Store",
47
+ "Thumbs.db",
48
+ "**/public/**",
49
+ "**/assets/**",
50
+ "**/*.svg",
51
+ // Lockfiles & build info (AI-irrelevant noise excluded by default)
52
+ "**/package-lock.json",
53
+ "**/yarn.lock",
54
+ "**/pnpm-lock.yaml",
55
+ "**/*.tsbuildinfo",
56
+ ];
@@ -0,0 +1,4 @@
1
+ export * from "./types.js";
2
+ export { MAX_FILES, MAX_TOTAL_BYTES, MAX_FILE_SIZE, MAX_CONTENT_CHARS, MAX_EXPORT_FILES, MAX_EXPORT_BYTES, MAX_DIRECTORY_DEPTH, DEFAULT_IGNORES, } from "./constants.js";
3
+ export declare function normalizePath(p: string): string;
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,OAAO,EACH,SAAS,EACT,eAAe,EACf,aAAa,EACb,iBAAiB,EACjB,gBAAgB,EAChB,gBAAgB,EAChB,mBAAmB,EACnB,eAAe,GAClB,MAAM,gBAAgB,CAAC;AAExB,wBAAgB,aAAa,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,CAE/C"}
package/dist/index.js ADDED
@@ -0,0 +1,5 @@
1
+ export * from "./types.js";
2
+ export { MAX_FILES, MAX_TOTAL_BYTES, MAX_FILE_SIZE, MAX_CONTENT_CHARS, MAX_EXPORT_FILES, MAX_EXPORT_BYTES, MAX_DIRECTORY_DEPTH, DEFAULT_IGNORES, } from "./constants.js";
3
+ export function normalizePath(p) {
4
+ return p.replace(/\\/g, "/");
5
+ }
@@ -0,0 +1,30 @@
1
+ export interface RawFile {
2
+ name: string;
3
+ path: string;
4
+ size: number;
5
+ text: () => Promise<string> | string;
6
+ readChunk?: (bytes: number) => Promise<Uint8Array | any>;
7
+ }
8
+ export type FileType = "text" | "binary" | "oversized";
9
+ export type FileImportance = "critical" | "high" | "normal" | "low";
10
+ export interface ScannedFile {
11
+ name: string;
12
+ path: string;
13
+ extension: string;
14
+ size: number;
15
+ content: string;
16
+ included: boolean;
17
+ type: FileType;
18
+ importance: FileImportance;
19
+ hash?: string;
20
+ }
21
+ export interface ScanResult {
22
+ scannedFiles: ScannedFile[];
23
+ ignoredCount: number;
24
+ ignoredBytes: number;
25
+ totalFiles: number;
26
+ totalBytes: number;
27
+ }
28
+ export type ExportMode = "tiny" | "standard" | "deep" | "maximum";
29
+ export type ExportIntent = "general" | "debugging" | "onboarding" | "architecture" | "security";
30
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,OAAO;IACpB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,OAAO,CAAC,MAAM,CAAC,GAAG,MAAM,CAAC;IACrC,SAAS,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,OAAO,CAAC,UAAU,GAAG,GAAG,CAAC,CAAC;CAC5D;AAED,MAAM,MAAM,QAAQ,GAAG,MAAM,GAAG,QAAQ,GAAG,WAAW,CAAC;AAEvD,MAAM,MAAM,cAAc,GAAG,UAAU,GAAG,MAAM,GAAG,QAAQ,GAAG,KAAK,CAAC;AAEpE,MAAM,WAAW,WAAW;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,OAAO,CAAC;IAClB,IAAI,EAAE,QAAQ,CAAC;IACf,UAAU,EAAE,cAAc,CAAC;IAC3B,IAAI,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,UAAU;IACvB,YAAY,EAAE,WAAW,EAAE,CAAC;IAC5B,YAAY,EAAE,MAAM,CAAC;IACrB,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,MAAM,UAAU,GAAG,MAAM,GAAG,UAAU,GAAG,MAAM,GAAG,SAAS,CAAC;AAElE,MAAM,MAAM,YAAY,GAAG,SAAS,GAAG,WAAW,GAAG,YAAY,GAAG,cAAc,GAAG,UAAU,CAAC"}
package/dist/types.js ADDED
@@ -0,0 +1 @@
1
+ export {};
package/package.json ADDED
@@ -0,0 +1,24 @@
1
+ {
2
+ "name": "codemelt-shared",
3
+ "version": "0.1.0",
4
+ "type": "module",
5
+ "license": "MIT",
6
+ "main": "./dist/index.js",
7
+ "module": "./dist/index.js",
8
+ "types": "./dist/index.d.ts",
9
+ "exports": {
10
+ ".": {
11
+ "types": "./dist/index.d.ts",
12
+ "import": "./dist/index.js"
13
+ }
14
+ },
15
+ "files": [
16
+ "dist"
17
+ ],
18
+ "scripts": {
19
+ "build": "tsc"
20
+ },
21
+ "engines": {
22
+ "node": ">=18"
23
+ }
24
+ }