diff --git a/.gitignore b/.gitignore index bc8178e..2978a98 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,4 @@ yarn-error.log junk virtual-disks/vdisk1 virtual-disks/vdisk2 +roadmap.txt diff --git a/src/packages/dlayer-symbol-all/index.js b/src/packages/dlayer-symbol-all/index.js new file mode 100644 index 0000000..6a70705 --- /dev/null +++ b/src/packages/dlayer-symbol-all/index.js @@ -0,0 +1,3 @@ +"use strict"; + +module.exports = Symbol("All"); diff --git a/src/packages/evaluate-and-pick/index.js b/src/packages/evaluate-and-pick/index.js index 3abdfca..f226128 100644 --- a/src/packages/evaluate-and-pick/index.js +++ b/src/packages/evaluate-and-pick/index.js @@ -4,7 +4,7 @@ const Promise = require("bluebird"); const memoizee = require("memoizee"); // FIXME: Figure out a reasonable way to make this symbol its own (conflict-free) package, given that it'll be used all across both sysquery and CVM -const All = require("../graphql-interface/symbols/all"); +const All = require("../dlayer-symbol-all"); // This generates a (memoized) source function for commands that always produce an entire list, that needs to be filtered for the desired item(s) module.exports = function evaluateAndPick({ command, selectResult, selectID, many }) { diff --git a/src/packages/evaluate-single/index.js b/src/packages/evaluate-single/index.js index b244aa3..720739c 100644 --- a/src/packages/evaluate-single/index.js +++ b/src/packages/evaluate-single/index.js @@ -1,7 +1,7 @@ "use strict"; const mapAsync = require("../map-async"); -const All = require("../graphql-interface/symbols/all"); +const All = require("../dlayer-symbol-all"); module.exports = function evaluateSingle({ command, selectResult }) { return function (ids) { diff --git a/src/packages/graphql-interface/symbols/all.js b/src/packages/graphql-interface/symbols/all.js deleted file mode 100644 index a0d7e3e..0000000 --- a/src/packages/graphql-interface/symbols/all.js +++ /dev/null @@ -1,3 +0,0 @@ -"use strict"; - -module.exports = Symbol("All"); \ No newline at end of file diff --git a/src/packages/map-from-source/index.js b/src/packages/map-from-source/index.js index b848e2f..de783fb 100644 --- a/src/packages/map-from-source/index.js +++ b/src/packages/map-from-source/index.js @@ -1,7 +1,7 @@ "use strict"; const Promise = require("bluebird"); -const All = require("../graphql-interface/symbols/all"); +const All = require("../dlayer-symbol-all"); module.exports = async function mapFromSource(source, ids, mapper) { let results = (ids === All || ids == null) diff --git a/src/packages/sysquery-block-devices/index.js b/src/packages/sysquery-block-devices/index.js index 4bc590d..d102335 100644 --- a/src/packages/sysquery-block-devices/index.js +++ b/src/packages/sysquery-block-devices/index.js @@ -8,7 +8,7 @@ const { InvalidObject } = require("dlayer"); const unreachable = require("@joepie91/unreachable")("@sysquery/block-devices"); const dlayerSource = require("../dlayer-source"); -const All = require("../graphql-interface/symbols/all"); +const All = require("../dlayer-symbol-all"); const lsblk = require("../exec-lsblk"); const mapFromSource = require("../map-from-source"); const treeMapAsync = require("../tree-map-async"); diff --git a/src/packages/sysquery-lvm/index.js b/src/packages/sysquery-lvm/index.js index 8c9b58f..68c00bd 100644 --- a/src/packages/sysquery-lvm/index.js +++ b/src/packages/sysquery-lvm/index.js @@ -6,7 +6,7 @@ const dlayerSource = require("../dlayer-source"); const evaluateAndPick = require("../evaluate-and-pick"); const mapFromSource = require("../map-from-source"); const lvm = require("../exec-lvm"); -const All = require("../graphql-interface/symbols/all"); +const All = require("../dlayer-symbol-all"); module.exports = { name: "sysquery.lvm", diff --git a/src/packages/sysquery-mounts/index.js b/src/packages/sysquery-mounts/index.js index 9e58cc7..ad23146 100644 --- a/src/packages/sysquery-mounts/index.js +++ b/src/packages/sysquery-mounts/index.js @@ -9,7 +9,7 @@ const dlayerSource = require("../dlayer-source"); const treeFilterFlatAsync = require("../tree-filter-flat-async"); const treeMapAsync = require("../tree-map-async"); const treeFind = require("../tree-find"); -const All = require("../graphql-interface/symbols/all"); +const All = require("../dlayer-symbol-all"); const mapAsync = require("../map-async"); module.exports = { diff --git a/try/source.js b/try/source.js index 8fd906e..0c68fce 100644 --- a/try/source.js +++ b/try/source.js @@ -3,7 +3,7 @@ require("@babel/register"); const Promise = require("bluebird"); const createLoaders = require("../src/api/loaders"); -const All = require("../src/packages/graphql-interface/symbols/all"); +const All = require("../src/packages/dlayer-symbol-all"); let loaders = createLoaders();