diff --git a/imports/packages.ts b/imports/packages.ts index 94562d8e..cddb8f58 100644 --- a/imports/packages.ts +++ b/imports/packages.ts @@ -10,17 +10,21 @@ export class Packages { constructor(deep) { this.deep = deep; } - async select() { + async select(query) { const deep = this.deep; - return await deep.select({ + const _or = [{ type_id: deep.idLocal('@deep-foundation/core', 'Package'), string: { value: { _neq: 'deep' } }, + }]; + if (query) _or.push(query); + return await deep.select({ + _or, }); } - async export(): Promise<{ [name: string]: Package }> { + async export(query): Promise<{ [name: string]: Package }> { const deep = this.deep; const packager = deep.Packager(); - const { data: packages } = await this.select(); + const { data: packages } = await this.select(query); console.log('export packages', packages.map(p => p.id).join(', ')); const results = {}; for (let i = 0; i < packages.length; i++) { diff --git a/package.json b/package.json index a9de59b4..aec1f48c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@deep-foundation/deeplinks", - "version": "0.0.583", + "version": "0.0.584", "license": "Unlicense", "type": "module", "main": "import.js",