acker-dacker 0.2.0 → 0.3.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.
package/README.md CHANGED
@@ -81,6 +81,17 @@ In all cases, repository `.git/info/exclude` rules and local/nested `.gitignore`
81
81
 
82
82
  Git handoff mode asks Git for tracked files and standard-ignore-aware untracked files. Tracked files remain eligible by design; sensitive and generated files are safety-filtered only when untracked. Deleted tracked files missing from the worktree are omitted from the archive and recorded in the report. Absolute, escaping, dangling, and cyclic symlinks are rejected, as are symlinked ancestor directories. Output and report artifact paths must reside outside the worktree and cannot alias each other via directory symlinks or hard links. `--exclude`, `--filter`, `--profile`, and `--report` are applied as documented above.
83
83
 
84
+ For a slim source handoff, repeat `--exclude` for known assets and duplicated captures; no new profile is needed:
85
+
86
+ ```bash
87
+ bunx acker-dacker ../my-repository --git-handoff \
88
+ --exclude '**/*.[gG][lL][bB]' --exclude '**/*.[pP][nN][gG]' \
89
+ --exclude recovery/original/public --exclude recovery/original/bundle.js \
90
+ --output ./handoff-slim.zip --report ./handoff-slim.json
91
+ ```
92
+
93
+ Exclusions are case-sensitive, root-relative paths/globs; `**/` also matches the root, character classes cover mixed-case extensions, and excluding a directory excludes its descendants. The example omits GLBs, PNGs, the captured public tree and captured bundle only; add the other media extensions present in your repository explicitly. File size alone never determines exclusion. Source/shader text, configs, lockfiles and recovery evidence remain unless explicitly matched. Reports list included paths and omission counts per pattern (overlaps count toward the first matching pattern). Keep a full packet for browser parity, asset checks and recovery reproduction, and document which static checks still work in the slim packet.
94
+
84
95
  ### Determinism and format limits
85
96
 
86
97
  Archives are deterministic: file ordering, ZIP timestamps (normalized to 1980-01-01), and compression choices do not depend on the current clock. ZIP files are created using maximum DEFLATE compression (`level: 9, memLevel: 9`), with streaming deflation spooled for entries over 64 MiB (falling back to STORE only if compression does not reduce size). Archive files are written atomically via temporary siblings to ensure existing files are never corrupted on failure.
@@ -111,3 +122,7 @@ npm pack --dry-run
111
122
  ```
112
123
 
113
124
  The package exposes the `acker-dacker` bin and intentionally ships only `src/` (excluding tests) as application files, plus npm's standard metadata files.
125
+
126
+ ### Slim Git handoffs
127
+
128
+ Use `acker-dacker ../repo --git-handoff --slim --output ../repo-slim.zip --report ../repo-slim.json`. `--slim` requires `--git-handoff` and composes with repeatable `--exclude`. It omits case-insensitive extensions GLB, GLTF, PNG, JPG, JPEG, WebP, GIF, AVIF, ICO, KTX, KTX2, HDR, EXR, MP3, WAV, OGG, MP4, WebM, MOV, WASM, WOFF, WOFF2, TTF and OTF at any depth. Source, shaders, configs, lockfiles and text evidence remain, regardless of size. Captured text bundles remain unless explicitly excluded. Omission counts use the existing report. Default/full behavior is unchanged; keep full assets for browser parity and asset-dependent checks.
package/package.json CHANGED
@@ -1,36 +1,36 @@
1
1
  {
2
- "name": "acker-dacker",
3
- "author": {
4
- "name": "Ragaeeb Haq",
5
- "url": "https://github.com/ragaeeb"
6
- },
7
- "bugs": {
8
- "url": "https://github.com/ragaeeb/acker-dacker/issues"
9
- },
10
- "version": "0.2.0",
11
- "description": "Create deterministic, privacy-aware repository ZIPs for AI handoffs and code review.",
12
- "type": "module",
13
- "bin": {
14
- "acker-dacker": "src/index.ts"
15
- },
16
- "files": [
17
- "src",
18
- "!src/__tests__"
19
- ],
20
- "scripts": {
21
- "build": "bun build ./src/index.ts --compile --minify --bytecode --format=esm --outfile ./dist/acker-dacker",
22
- "check": "bun run typecheck && bun test && bun build ./src/index.ts --target=bun --outfile /tmp/acker-dacker-check.js",
23
- "prepublishOnly": "bun run check",
24
- "test": "bun test",
25
- "typecheck": "tsc --noEmit"
26
- },
27
- "engines": {
28
- "bun": ">=1.4.2",
29
- "node": ">=26.x"
30
- },
31
- "packageManager": "bun@1.4.2",
32
- "devDependencies": {
33
- "@types/bun": "^1.4.2",
34
- "typescript": "^7.0.2"
35
- }
2
+ "name": "acker-dacker",
3
+ "author": {
4
+ "name": "Ragaeeb Haq",
5
+ "url": "https://github.com/ragaeeb"
6
+ },
7
+ "bugs": {
8
+ "url": "https://github.com/ragaeeb/acker-dacker/issues"
9
+ },
10
+ "version": "0.3.0",
11
+ "description": "Create deterministic, privacy-aware repository ZIPs for AI handoffs and code review.",
12
+ "type": "module",
13
+ "bin": {
14
+ "acker-dacker": "src/index.ts"
15
+ },
16
+ "files": [
17
+ "src",
18
+ "!src/__tests__"
19
+ ],
20
+ "scripts": {
21
+ "build": "bun build ./src/index.ts --compile --minify --bytecode --format=esm --outfile ./dist/acker-dacker",
22
+ "check": "bun run typecheck && bun test && bun build ./src/index.ts --target=bun --outfile /tmp/acker-dacker-check.js",
23
+ "prepublishOnly": "bun run check",
24
+ "test": "bun test",
25
+ "typecheck": "tsc --noEmit"
26
+ },
27
+ "engines": {
28
+ "bun": ">=1.4.4",
29
+ "node": ">=26.x"
30
+ },
31
+ "packageManager": "bun@1.4.2",
32
+ "devDependencies": {
33
+ "@types/bun": "^1.4.4",
34
+ "typescript": "^7.0.2"
35
+ }
36
36
  }
@@ -2,6 +2,7 @@ export type CliOptions = {
2
2
  readonly excludes: readonly string[];
3
3
  readonly filters: readonly string[];
4
4
  readonly gitHandoff: boolean;
5
+ readonly slim: boolean;
5
6
  readonly includes: readonly string[];
6
7
  readonly outputFile: string | null;
7
8
  readonly profile: string | null;
@@ -15,6 +16,7 @@ export const parseCliArgs = (args: readonly string[]): CliOptions => {
15
16
  const filters: string[] = [];
16
17
  const includes: string[] = [];
17
18
  let gitHandoff = false;
19
+ let slim = false;
18
20
  let outputFile: string | null = null;
19
21
  let profile: string | null = null;
20
22
  let reportFile: string | null = null;
@@ -67,6 +69,8 @@ export const parseCliArgs = (args: readonly string[]): CliOptions => {
67
69
 
68
70
  if (argument === '--help' || argument === '-h') {
69
71
  showHelp = true;
72
+ } else if (argument === '--slim') {
73
+ slim = true;
70
74
  } else if (argument === '--git-handoff') {
71
75
  gitHandoff = true;
72
76
  } else if (argument.startsWith('--profile=')) {
@@ -141,7 +145,7 @@ export const parseCliArgs = (args: readonly string[]): CliOptions => {
141
145
  }
142
146
  }
143
147
 
144
- return { excludes, filters, gitHandoff, includes, outputFile, profile, reportFile, showHelp, targetDir };
148
+ return { excludes, filters, gitHandoff, slim, includes, outputFile, profile, reportFile, showHelp, targetDir };
145
149
  };
146
150
 
147
151
  export const printUsage = (): void => {
@@ -150,6 +154,7 @@ Usage: acker-dacker [targetRepoPath] [options]
150
154
 
151
155
  Options:
152
156
  --git-handoff Use Git's tracked + eligible-untracked set and preserve modes/symlinks
157
+ --slim Omit media/fonts/WASM in Git handoffs; keep source/config/evidence (requires --git-handoff)
153
158
  --profile <name> Select a named Git handoff profile (currently rust-stage3; requires --git-handoff)
154
159
  --filter, -f <pattern> Include ONLY files matching pattern (e.g. *.md, *.ts; can be specified multiple times)
155
160
  --include, -i <path|glob> Additional folder path, repo name, or glob pattern to include (can be specified multiple times)
package/src/cli/cli.ts CHANGED
@@ -103,7 +103,7 @@ export const main = async (args: readonly string[] = process.argv.slice(2)): Pro
103
103
  throw new Error('--include is not supported with --git-handoff; Git defines the handoff boundary.');
104
104
  }
105
105
  await runGitHandoff({
106
- excludes: options.excludes,
106
+ excludes: options.slim ? [...options.excludes, ...['glb', 'gltf', 'png', 'jpg', 'jpeg', 'webp', 'gif', 'avif', 'ico', 'ktx', 'ktx2', 'hdr', 'exr', 'mp3', 'wav', 'ogg', 'mp4', 'webm', 'mov', 'wasm', 'woff', 'woff2', 'ttf', 'otf'].map(extension => `**/*.${[...extension].map(c => /[a-z]/.test(c) ? `[${c}${c.toUpperCase()}]` : c).join('')}`)] : options.excludes,
107
107
  filters: options.filters.map(globToRegex),
108
108
  outputFile: options.outputFile,
109
109
  profile: options.profile,
@@ -113,8 +113,8 @@ export const main = async (args: readonly string[] = process.argv.slice(2)): Pro
113
113
  return;
114
114
  }
115
115
 
116
- if (options.excludes.length > 0 || options.profile || options.reportFile) {
117
- throw new Error('--exclude, --profile, and --report require --git-handoff.');
116
+ if (options.slim || options.excludes.length > 0 || options.profile || options.reportFile) {
117
+ throw new Error('--slim, --exclude, --profile, and --report require --git-handoff.');
118
118
  }
119
119
 
120
120
  await runDefaultPack({