@danypops/papyrus 0.50.1 → 0.50.2
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/package.json
CHANGED
|
@@ -99,12 +99,14 @@ export function listScoped(
|
|
|
99
99
|
}
|
|
100
100
|
const projectRoot = normalizeProjectRoot(filter.projectRoot);
|
|
101
101
|
const ids = scopes.ids(projectRoot, ARTIFACT_SCOPE_MAX_ARTIFACTS);
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
102
|
+
if (ids.length === 0) return [];
|
|
103
|
+
// artifacts.query (not a manual ids.map(artifacts.get)) so a trashed member is excluded the
|
|
104
|
+
// same way every other listing path already excludes trash by default -- a real, confirmed
|
|
105
|
+
// bug live-verifying this feature: artifacts.get() has no trash awareness at all, so a
|
|
106
|
+
// project-scoped listing kept surfacing an artifact for weeks after artifact.remove trashed
|
|
107
|
+
// it, while the unscoped and applicable branches (both already query-backed) never did.
|
|
108
|
+
return artifacts
|
|
109
|
+
.query({ ids, kind, excludeSubtype, status: filter.status, text: filter.text })
|
|
108
110
|
.sort((left, right) => right.updated_at.localeCompare(left.updated_at) || left.id.localeCompare(right.id))
|
|
109
111
|
.slice(0, limit);
|
|
110
112
|
}
|