@agentuity/cli 0.0.21 → 0.0.23

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.
@@ -1 +1 @@
1
- {"version":3,"file":"download.d.ts","sourceRoot":"","sources":["../../../src/cmd/project/download.ts"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAG3C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAKhD,UAAU,eAAe;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,YAAY,CAAC;IACvB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,MAAM,EAAE,MAAM,CAAC;CACf;AAED,UAAU,YAAY;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,OAAO,CAAC;IACnB,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;CACf;AAsBD,wBAAsB,gBAAgB,CAAC,OAAO,EAAE,eAAe,GAAG,OAAO,CAAC,IAAI,CAAC,CAsH9E;AAED,wBAAsB,YAAY,CAAC,OAAO,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC,CAgCvE"}
1
+ {"version":3,"file":"download.d.ts","sourceRoot":"","sources":["../../../src/cmd/project/download.ts"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAG3C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAKhD,UAAU,eAAe;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,YAAY,CAAC;IACvB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,MAAM,EAAE,MAAM,CAAC;CACf;AAED,UAAU,YAAY;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,OAAO,CAAC;IACnB,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;CACf;AAsBD,wBAAsB,gBAAgB,CAAC,OAAO,EAAE,eAAe,GAAG,OAAO,CAAC,IAAI,CAAC,CAyH9E;AAED,wBAAsB,YAAY,CAAC,OAAO,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC,CAgCvE"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agentuity/cli",
3
- "version": "0.0.21",
3
+ "version": "0.0.23",
4
4
  "type": "module",
5
5
  "main": "./src/index.ts",
6
6
  "types": "./dist/index.d.ts",
@@ -108,7 +108,7 @@ export const command = createCommand({
108
108
  cwd: rootDir,
109
109
  clearOnSuccess: true,
110
110
  truncate: false,
111
- maxLinesOutput: 1,
111
+ maxLinesOutput: 2,
112
112
  maxLinesOnFailure: 15,
113
113
  }),
114
114
  tui.spinner('Building project', async () => {
@@ -125,39 +125,42 @@ export async function downloadTemplate(options: DownloadOptions): Promise<void>
125
125
  let ignoredCount = 0;
126
126
  let extractedCount = 0;
127
127
 
128
+ // Track which entries we've mapped so we don't ignore them later
129
+ // Note: tar-fs calls map BEFORE ignore (despite what docs say)
130
+ const mappedEntries = new Set<string>();
131
+
128
132
  const extractor = extract(extractDir, {
129
- // ignore callback: called BEFORE map, receives original tar entry name in header.name
133
+ // map callback: called FIRST, allows modifying the entry before extraction
134
+ // We strip the prefix so files are extracted to the root of extractDir
135
+ map: (header: Headers) => {
136
+ const originalName = header.name;
137
+ if (header.name.startsWith(prefix) && header.name.length > prefix.length) {
138
+ // This is a file/dir we want to extract - strip the prefix
139
+ header.name = header.name.substring(prefix.length);
140
+ mappedEntries.add(header.name); // Track that we mapped this
141
+ logger.debug('[extract] MAP:', originalName, '->', header.name);
142
+ logger.debug('[extract] EXTRACT:', originalName);
143
+ extractedCount++;
144
+ }
145
+ return header;
146
+ },
147
+ // ignore callback: called AFTER map, receives the MAPPED name
130
148
  // Return true to skip the entry, false to extract it
131
- ignore: (_name: string, header?: Headers) => {
149
+ ignore: (name: string, header?: Headers) => {
132
150
  if (!header) {
133
151
  ignoredCount++;
134
152
  return true;
135
153
  }
136
154
 
137
- // Skip entries that don't start with our prefix
138
- // Also skip the exact prefix directory itself (empty name after substring)
139
- const shouldIgnore =
140
- !header.name.startsWith(prefix) || header.name.length === prefix.length;
141
-
142
- if (shouldIgnore) {
143
- logger.debug('[extract] IGNORE:', header.name);
144
- ignoredCount++;
145
- } else {
146
- logger.debug('[extract] EXTRACT:', header.name);
147
- extractedCount++;
155
+ // If we already mapped this entry, don't ignore it
156
+ if (mappedEntries.has(header.name)) {
157
+ return false;
148
158
  }
149
159
 
150
- return shouldIgnore;
151
- },
152
- // map callback: called AFTER ignore, allows modifying the entry before extraction
153
- // We strip the prefix so files are extracted to the root of extractDir
154
- map: (header: Headers) => {
155
- if (header.name.startsWith(prefix)) {
156
- const originalName = header.name;
157
- header.name = header.name.substring(prefix.length);
158
- logger.debug('[extract] MAP:', originalName, '->', header.name);
159
- }
160
- return header;
160
+ // Otherwise, ignore it
161
+ logger.debug('[extract] IGNORE:', header.name);
162
+ ignoredCount++;
163
+ return true;
161
164
  },
162
165
  });
163
166