@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,
|
|
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
package/src/cmd/dev/index.ts
CHANGED
|
@@ -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
|
-
//
|
|
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: (
|
|
149
|
+
ignore: (name: string, header?: Headers) => {
|
|
132
150
|
if (!header) {
|
|
133
151
|
ignoredCount++;
|
|
134
152
|
return true;
|
|
135
153
|
}
|
|
136
154
|
|
|
137
|
-
//
|
|
138
|
-
|
|
139
|
-
|
|
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
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
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
|
|