refactor(naming): command-layer consistency — narrow→pushdown, findEval/findParse→snake_case, history_cmd→history, rm_command→rm_cmd
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -13,7 +13,7 @@
|
||||
# ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========
|
||||
|
||||
from mirage.accessor.box import BoxAccessor
|
||||
from mirage.commands.builtin.box.narrow import narrow_scope
|
||||
from mirage.commands.builtin.box.pushdown import narrow_scope
|
||||
from mirage.commands.builtin.generic.grep import grep as generic_grep
|
||||
from mirage.commands.builtin.generic_bind.adapter import bound_op
|
||||
from mirage.commands.builtin.grep_helper import pattern_arg
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
from collections.abc import Mapping
|
||||
|
||||
from mirage.accessor.box import BoxAccessor
|
||||
from mirage.commands.builtin.box.narrow import narrow_scope
|
||||
from mirage.commands.builtin.box.pushdown import narrow_scope
|
||||
from mirage.commands.builtin.generic.rg import rg as generic_rg
|
||||
from mirage.commands.builtin.generic_bind.adapter import bound_op
|
||||
from mirage.commands.builtin.grep_helper import pattern_arg
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
# ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========
|
||||
|
||||
from mirage.accessor.dropbox import DropboxAccessor
|
||||
from mirage.commands.builtin.dropbox.narrow import narrow_scope
|
||||
from mirage.commands.builtin.dropbox.pushdown import narrow_scope
|
||||
from mirage.commands.builtin.generic.grep import grep as generic_grep
|
||||
from mirage.commands.builtin.generic_bind.adapter import bound_op
|
||||
from mirage.commands.builtin.grep_helper import pattern_arg
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
from collections.abc import Mapping
|
||||
|
||||
from mirage.accessor.dropbox import DropboxAccessor
|
||||
from mirage.commands.builtin.dropbox.narrow import narrow_scope
|
||||
from mirage.commands.builtin.dropbox.pushdown import narrow_scope
|
||||
from mirage.commands.builtin.generic.rg import rg as generic_rg
|
||||
from mirage.commands.builtin.generic_bind.adapter import bound_op
|
||||
from mirage.commands.builtin.grep_helper import pattern_arg
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
# ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========
|
||||
|
||||
from mirage.commands.builtin.gcal.io import resolve_glob
|
||||
from mirage.commands.builtin.generic.rm_command import make_rm
|
||||
from mirage.commands.builtin.generic.rm_cmd import make_rm
|
||||
from mirage.core.gcal.unlink import unlink
|
||||
|
||||
rm = make_rm(resource="gcal", glob_fn=resolve_glob, unlink=unlink)
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
# ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========
|
||||
|
||||
from mirage.commands.builtin.gdocs.io import resolve_glob
|
||||
from mirage.commands.builtin.generic.rm_command import make_rm
|
||||
from mirage.commands.builtin.generic.rm_cmd import make_rm
|
||||
from mirage.core.gdocs.unlink import unlink
|
||||
|
||||
rm = make_rm(resource="gdocs", glob_fn=resolve_glob, unlink=unlink)
|
||||
|
||||
@@ -16,7 +16,7 @@ from mirage.accessor.github import GitHubAccessor
|
||||
from mirage.commands.builtin.aggregators import prefix_aggregate
|
||||
from mirage.commands.builtin.generic.grep import grep as generic_grep
|
||||
from mirage.commands.builtin.generic_bind.adapter import bound_op
|
||||
from mirage.commands.builtin.github.narrow import narrow_scope
|
||||
from mirage.commands.builtin.github.pushdown import narrow_scope
|
||||
from mirage.commands.builtin.grep_helper import pattern_arg
|
||||
from mirage.commands.config import CommandOpts
|
||||
from mirage.commands.registry import command
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
from mirage.accessor.github import GitHubAccessor
|
||||
from mirage.commands.builtin.generic.rg import rg as generic_rg
|
||||
from mirage.commands.builtin.generic_bind.adapter import bound_op
|
||||
from mirage.commands.builtin.github.narrow import narrow_scope
|
||||
from mirage.commands.builtin.github.pushdown import narrow_scope
|
||||
from mirage.commands.builtin.grep_helper import pattern_arg
|
||||
from mirage.commands.config import CommandOpts
|
||||
from mirage.commands.errors import UsageError
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
# limitations under the License.
|
||||
# ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========
|
||||
|
||||
from mirage.commands.builtin.generic.rm_command import make_rm
|
||||
from mirage.commands.builtin.generic.rm_cmd import make_rm
|
||||
from mirage.commands.builtin.gsheets.io import resolve_glob
|
||||
from mirage.core.gsheets.unlink import unlink
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
# limitations under the License.
|
||||
# ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========
|
||||
|
||||
from mirage.commands.builtin.generic.rm_command import make_rm
|
||||
from mirage.commands.builtin.generic.rm_cmd import make_rm
|
||||
from mirage.commands.builtin.gslides.io import resolve_glob
|
||||
from mirage.core.gslides.unlink import unlink
|
||||
|
||||
|
||||
+1
-1
@@ -18,7 +18,7 @@ import pytest
|
||||
|
||||
from mirage.accessor.box import BoxAccessor
|
||||
from mirage.cache.index.ram import RAMIndexCacheStore
|
||||
from mirage.commands.builtin.box.narrow import narrow_scope
|
||||
from mirage.commands.builtin.box.pushdown import narrow_scope
|
||||
from mirage.core.box._client import BoxTokenManager
|
||||
from mirage.core.box.config import BoxConfig
|
||||
from mirage.types import FileStat, FileType, PathSpec
|
||||
+1
-1
@@ -18,7 +18,7 @@ import pytest
|
||||
|
||||
from mirage.accessor.dropbox import DropboxAccessor
|
||||
from mirage.cache.index.ram import RAMIndexCacheStore
|
||||
from mirage.commands.builtin.dropbox.narrow import narrow_scope
|
||||
from mirage.commands.builtin.dropbox.pushdown import narrow_scope
|
||||
from mirage.core.dropbox._client import DropboxTokenManager
|
||||
from mirage.resource.dropbox.config import DropboxConfig
|
||||
from mirage.types import FileStat, FileType, PathSpec
|
||||
+1
-1
@@ -15,7 +15,7 @@
|
||||
import pytest
|
||||
|
||||
from mirage.cache.index import NULL_INDEX
|
||||
from mirage.commands.builtin.generic.rm_command import make_rm
|
||||
from mirage.commands.builtin.generic.rm_cmd import make_rm
|
||||
from mirage.commands.config import CommandOpts
|
||||
from mirage.types import PathSpec
|
||||
|
||||
@@ -17,7 +17,7 @@ from unittest.mock import AsyncMock
|
||||
import pytest
|
||||
|
||||
from mirage.commands.builtin.github.grep import grep
|
||||
from mirage.commands.builtin.github.narrow import narrow_scope
|
||||
from mirage.commands.builtin.github.pushdown import narrow_scope
|
||||
from mirage.commands.config import CommandOpts
|
||||
from mirage.types import PathSpec
|
||||
from tests.fixtures.github_mock import MOCK_BLOBS
|
||||
|
||||
+1
-1
@@ -17,7 +17,7 @@ import pytest
|
||||
from mirage.accessor.github import GitHubAccessor
|
||||
from mirage.commands.builtin.github.du import _du_size
|
||||
from mirage.commands.builtin.github.grep import grep
|
||||
from mirage.commands.builtin.github.narrow import narrow_scope
|
||||
from mirage.commands.builtin.github.pushdown import narrow_scope
|
||||
from mirage.commands.builtin.github.rg import rg
|
||||
from mirage.commands.config import CommandOpts
|
||||
from mirage.core.github.tree_entry import TreeEntry
|
||||
@@ -16,7 +16,7 @@ from unittest.mock import AsyncMock
|
||||
|
||||
import pytest
|
||||
|
||||
from mirage.commands.builtin.github.narrow import narrow_scope
|
||||
from mirage.commands.builtin.github.pushdown import narrow_scope
|
||||
from mirage.commands.builtin.github.rg import rg
|
||||
from mirage.commands.config import CommandOpts
|
||||
from mirage.io.stream import materialize
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"baseline": 297,
|
||||
"baseline": 293,
|
||||
"baseline_reason": "Every divergence below the excused ones predates the gate and each needs its own decision, so --strict fails on a rise rather than demanding zero. Lower this number whenever a divergence is closed; the gate fails on a drop too, so an improvement cannot be silently spent. Items 31-37 of the cleanup plan are scoped from this report. The unit is one module, never one directory: a one-sided directory counts once per module inside it, so it cannot absorb new modules without moving the number. An excused directory is the deliberate exception -- it excuses its whole subtree, because the excuse is that there is no counterpart to mirror, which makes growth inside it expected rather than drift.",
|
||||
"directories": {
|
||||
"python_only": {
|
||||
|
||||
@@ -17,8 +17,8 @@ import {
|
||||
emitStartPath,
|
||||
keep,
|
||||
startBasename,
|
||||
} from '@struktoai/mirage-core/commands/builtin/findEval'
|
||||
import type { PredNode } from '@struktoai/mirage-core/commands/builtin/findEval'
|
||||
} from '@struktoai/mirage-core/commands/builtin/find_eval'
|
||||
import type { PredNode } from '@struktoai/mirage-core/commands/builtin/find_eval'
|
||||
import type { PathSpec } from '@struktoai/mirage-core/types'
|
||||
import { compareCodePoints } from '@struktoai/mirage-core/utils/sort'
|
||||
import type { OPFSAccessor } from '../../accessor/opfs.ts'
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
|
||||
import { beforeEach, describe, expect, it, vi } from 'vitest'
|
||||
|
||||
vi.mock('./narrow.ts', () => ({ narrowScope: vi.fn() }))
|
||||
vi.mock('./pushdown.ts', () => ({ narrowScope: vi.fn() }))
|
||||
vi.mock('../generic/grep.ts', () => ({ grepGeneric: vi.fn() }))
|
||||
|
||||
import { BoxAccessor } from '../../../accessor/box.ts'
|
||||
@@ -26,7 +26,7 @@ import { PathSpec } from '../../../types.ts'
|
||||
import type { CommandFnResult, CommandOpts } from '../../config.ts'
|
||||
import { grepGeneric } from '../generic/grep.ts'
|
||||
import { BOX_GREP } from './grep.ts'
|
||||
import { narrowScope } from './narrow.ts'
|
||||
import { narrowScope } from './pushdown.ts'
|
||||
|
||||
const STUB_TM = {} as BoxTokenManager
|
||||
const narrow = vi.mocked(narrowScope)
|
||||
|
||||
@@ -22,7 +22,7 @@ import { command, type CommandFnResult, type CommandOpts } from '../../config.ts
|
||||
import { specOf } from '../../spec/builtins.ts'
|
||||
import { patternArg } from '../grep_helper.ts'
|
||||
import { grepGeneric } from '../generic/grep.ts'
|
||||
import { narrowScope } from './narrow.ts'
|
||||
import { narrowScope } from './pushdown.ts'
|
||||
import { FlagView } from '../../spec/types.ts'
|
||||
|
||||
async function grepCommand(
|
||||
|
||||
+1
-1
@@ -32,7 +32,7 @@ import type { BoxTokenManager } from '../../../core/box/_client.ts'
|
||||
import * as searchModule from '../../../core/box/search.ts'
|
||||
import * as statModule from '../../../core/box/stat.ts'
|
||||
import { FileStat, FileType, PathSpec } from '../../../types.ts'
|
||||
import { narrowScope } from './narrow.ts'
|
||||
import { narrowScope } from './pushdown.ts'
|
||||
|
||||
const STUB_TM = {} as BoxTokenManager
|
||||
const narrow = vi.mocked(searchModule.narrowPaths)
|
||||
@@ -16,7 +16,7 @@
|
||||
|
||||
import { beforeEach, describe, expect, it, vi } from 'vitest'
|
||||
|
||||
vi.mock('./narrow.ts', () => ({ narrowScope: vi.fn() }))
|
||||
vi.mock('./pushdown.ts', () => ({ narrowScope: vi.fn() }))
|
||||
vi.mock('../generic/rg.ts', () => ({ rgGeneric: vi.fn() }))
|
||||
|
||||
import { BoxAccessor } from '../../../accessor/box.ts'
|
||||
@@ -25,7 +25,7 @@ import { IOResult } from '../../../io/types.ts'
|
||||
import { PathSpec } from '../../../types.ts'
|
||||
import type { CommandFnResult, CommandOpts } from '../../config.ts'
|
||||
import { rgGeneric } from '../generic/rg.ts'
|
||||
import { narrowScope } from './narrow.ts'
|
||||
import { narrowScope } from './pushdown.ts'
|
||||
import { BOX_RG, keepVisible } from './rg.ts'
|
||||
|
||||
const STUB_TM = {} as BoxTokenManager
|
||||
|
||||
@@ -22,7 +22,7 @@ import { command, type CommandFnResult, type CommandOpts } from '../../config.ts
|
||||
import { specOf } from '../../spec/builtins.ts'
|
||||
import { patternArg } from '../grep_helper.ts'
|
||||
import { rgGeneric } from '../generic/rg.ts'
|
||||
import { narrowScope } from './narrow.ts'
|
||||
import { narrowScope } from './pushdown.ts'
|
||||
import { FlagView } from '../../spec/types.ts'
|
||||
|
||||
// Reproduce rg's dotfile pruning for search-narrowed candidates: the generic
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
|
||||
import { beforeEach, describe, expect, it, vi } from 'vitest'
|
||||
|
||||
vi.mock('./narrow.ts', () => ({ narrowScope: vi.fn() }))
|
||||
vi.mock('./pushdown.ts', () => ({ narrowScope: vi.fn() }))
|
||||
vi.mock('../generic/grep.ts', () => ({ grepGeneric: vi.fn() }))
|
||||
|
||||
import { DropboxAccessor } from '../../../accessor/dropbox.ts'
|
||||
@@ -26,7 +26,7 @@ import { PathSpec } from '../../../types.ts'
|
||||
import type { CommandFnResult, CommandOpts } from '../../config.ts'
|
||||
import { grepGeneric } from '../generic/grep.ts'
|
||||
import { DROPBOX_GREP } from './grep.ts'
|
||||
import { narrowScope } from './narrow.ts'
|
||||
import { narrowScope } from './pushdown.ts'
|
||||
|
||||
const STUB_TM = {} as DropboxTokenManager
|
||||
const narrow = vi.mocked(narrowScope)
|
||||
|
||||
@@ -22,7 +22,7 @@ import { command, type CommandFnResult, type CommandOpts } from '../../config.ts
|
||||
import { specOf } from '../../spec/builtins.ts'
|
||||
import { patternArg } from '../grep_helper.ts'
|
||||
import { grepGeneric } from '../generic/grep.ts'
|
||||
import { narrowScope } from './narrow.ts'
|
||||
import { narrowScope } from './pushdown.ts'
|
||||
import { FlagView } from '../../spec/types.ts'
|
||||
|
||||
async function grepCommand(
|
||||
|
||||
+1
-1
@@ -32,7 +32,7 @@ import type { DropboxTokenManager } from '../../../core/dropbox/_client.ts'
|
||||
import * as searchModule from '../../../core/dropbox/search.ts'
|
||||
import * as statModule from '../../../core/dropbox/stat.ts'
|
||||
import { FileStat, FileType, PathSpec } from '../../../types.ts'
|
||||
import { narrowScope } from './narrow.ts'
|
||||
import { narrowScope } from './pushdown.ts'
|
||||
|
||||
const STUB_TM = {} as DropboxTokenManager
|
||||
const narrow = vi.mocked(searchModule.narrowPaths)
|
||||
@@ -16,7 +16,7 @@
|
||||
|
||||
import { beforeEach, describe, expect, it, vi } from 'vitest'
|
||||
|
||||
vi.mock('./narrow.ts', () => ({ narrowScope: vi.fn() }))
|
||||
vi.mock('./pushdown.ts', () => ({ narrowScope: vi.fn() }))
|
||||
vi.mock('../generic/rg.ts', () => ({ rgGeneric: vi.fn() }))
|
||||
|
||||
import { DropboxAccessor } from '../../../accessor/dropbox.ts'
|
||||
@@ -25,7 +25,7 @@ import { IOResult } from '../../../io/types.ts'
|
||||
import { PathSpec } from '../../../types.ts'
|
||||
import type { CommandFnResult, CommandOpts } from '../../config.ts'
|
||||
import { rgGeneric } from '../generic/rg.ts'
|
||||
import { narrowScope } from './narrow.ts'
|
||||
import { narrowScope } from './pushdown.ts'
|
||||
import { DROPBOX_RG, keepVisible } from './rg.ts'
|
||||
|
||||
const STUB_TM = {} as DropboxTokenManager
|
||||
|
||||
@@ -22,7 +22,7 @@ import { command, type CommandFnResult, type CommandOpts } from '../../config.ts
|
||||
import { specOf } from '../../spec/builtins.ts'
|
||||
import { patternArg } from '../grep_helper.ts'
|
||||
import { rgGeneric } from '../generic/rg.ts'
|
||||
import { narrowScope } from './narrow.ts'
|
||||
import { narrowScope } from './pushdown.ts'
|
||||
import { FlagView } from '../../spec/types.ts'
|
||||
|
||||
// Reproduce rg's dotfile pruning for search-narrowed candidates: the
|
||||
|
||||
+1
-1
@@ -26,7 +26,7 @@ import {
|
||||
emitStartPath,
|
||||
prefixPathNodes,
|
||||
unrespellRaw,
|
||||
} from './findEval.ts'
|
||||
} from './find_eval.ts'
|
||||
|
||||
function entry(over: Partial<FindEntry> = {}): FindEntry {
|
||||
return { key: '/data/a.txt', name: 'a.txt', kind: 'f', depth: 1, ...over }
|
||||
+2
-2
@@ -13,8 +13,8 @@
|
||||
// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========
|
||||
|
||||
import { describe, expect, it } from 'vitest'
|
||||
import { evalPredicate } from './findEval.ts'
|
||||
import { FindParseError, parseFindExpression } from './findParse.ts'
|
||||
import { evalPredicate } from './find_eval.ts'
|
||||
import { FindParseError, parseFindExpression } from './find_parse.ts'
|
||||
|
||||
describe('parseFindExpression', () => {
|
||||
it('negation', () => {
|
||||
+1
-1
@@ -12,7 +12,7 @@
|
||||
// limitations under the License.
|
||||
// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========
|
||||
|
||||
import type { PredNode } from './findEval.ts'
|
||||
import type { PredNode } from './find_eval.ts'
|
||||
|
||||
const VALUE_PREDICATES = new Set([
|
||||
'-name',
|
||||
@@ -14,7 +14,7 @@
|
||||
|
||||
import { unlink } from '../../../core/gcal/unlink.ts'
|
||||
import { ResourceName } from '../../../types.ts'
|
||||
import { makeRm } from '../generic/rm_command.ts'
|
||||
import { makeRm } from '../generic/rm_cmd.ts'
|
||||
import { GCAL_IO } from './io.ts'
|
||||
|
||||
export const GCAL_RM = makeRm(ResourceName.GCAL, GCAL_IO, unlink)
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
|
||||
import { unlink } from '../../../core/gdocs/unlink.ts'
|
||||
import { ResourceName } from '../../../types.ts'
|
||||
import { makeRm } from '../generic/rm_command.ts'
|
||||
import { makeRm } from '../generic/rm_cmd.ts'
|
||||
import { GDOCS_IO } from './io.ts'
|
||||
|
||||
export const GDOCS_RM = makeRm(ResourceName.GDOCS, GDOCS_IO, unlink)
|
||||
|
||||
@@ -18,7 +18,7 @@ import { modifiedTs } from '../../../core/generic/find.ts'
|
||||
import { isEnoent } from '../../../utils/errors.ts'
|
||||
import { IOResult, type ByteSource } from '../../../io/types.ts'
|
||||
import type { FindOptions } from '../../../resource/base.ts'
|
||||
import { parseFindExpression, parseSize } from '../findParse.ts'
|
||||
import { parseFindExpression, parseSize } from '../find_parse.ts'
|
||||
import { FileType, PathSpec, type FileStat } from '../../../types.ts'
|
||||
import type { CommandFnResult, CommandOpts } from '../../config.ts'
|
||||
import { rstripSlash, stripSlash } from '../../../utils/slash.ts'
|
||||
@@ -38,7 +38,7 @@ import {
|
||||
type FindEntry,
|
||||
type PredNode,
|
||||
type PrintfStatFacts,
|
||||
} from '../findEval.ts'
|
||||
} from '../find_eval.ts'
|
||||
import type { LinkView } from '../../../ops/types.ts'
|
||||
import { pathAllowed } from '../../../context/session_context.ts'
|
||||
import { compareCodePoints } from '../../../utils/sort.ts'
|
||||
|
||||
@@ -24,7 +24,7 @@ import { specOf } from '../../spec/builtins.ts'
|
||||
import { prefixAggregate } from '../aggregators.ts'
|
||||
import { patternArg } from '../grep_helper.ts'
|
||||
import { grepGeneric } from '../generic/grep.ts'
|
||||
import { narrowScope } from './narrow.ts'
|
||||
import { narrowScope } from './pushdown.ts'
|
||||
import { FlagView } from '../../spec/types.ts'
|
||||
|
||||
const ENC = new TextEncoder()
|
||||
|
||||
+1
-1
@@ -22,7 +22,7 @@ import { GitHubAccessor } from '../../../accessor/github.ts'
|
||||
import type { GitHubTransport } from '../../../core/github/_client.ts'
|
||||
import type { TreeEntry } from '../../../core/github/tree_entry.ts'
|
||||
import { PathSpec } from '../../../types.ts'
|
||||
import { narrowScope } from './narrow.ts'
|
||||
import { narrowScope } from './pushdown.ts'
|
||||
|
||||
// 150 blobs under src/ so the scope clears SCOPE_WARN (100) and search kicks in.
|
||||
function bigTree(): Record<string, TreeEntry> {
|
||||
@@ -23,7 +23,7 @@ import { command, type CommandFnResult, type CommandOpts } from '../../config.ts
|
||||
import { specOf } from '../../spec/builtins.ts'
|
||||
import { patternArg } from '../grep_helper.ts'
|
||||
import { rgGeneric } from '../generic/rg.ts'
|
||||
import { narrowScope } from './narrow.ts'
|
||||
import { narrowScope } from './pushdown.ts'
|
||||
import { FlagView } from '../../spec/types.ts'
|
||||
|
||||
const ENC = new TextEncoder()
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
|
||||
import { unlink } from '../../../core/gsheets/unlink.ts'
|
||||
import { ResourceName } from '../../../types.ts'
|
||||
import { makeRm } from '../generic/rm_command.ts'
|
||||
import { makeRm } from '../generic/rm_cmd.ts'
|
||||
import { GSHEETS_IO } from './io.ts'
|
||||
|
||||
export const GSHEETS_RM = makeRm(ResourceName.GSHEETS, GSHEETS_IO, unlink)
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
|
||||
import { unlink } from '../../../core/gslides/unlink.ts'
|
||||
import { ResourceName } from '../../../types.ts'
|
||||
import { makeRm } from '../generic/rm_command.ts'
|
||||
import { makeRm } from '../generic/rm_cmd.ts'
|
||||
import { GSLIDES_IO } from './io.ts'
|
||||
|
||||
export const GSLIDES_RM = makeRm(ResourceName.GSLIDES, GSLIDES_IO, unlink)
|
||||
|
||||
@@ -33,7 +33,7 @@ import { statGeneric } from '../generic/stat.ts'
|
||||
import { tailGeneric } from '../generic/tail.ts'
|
||||
import { treeGeneric } from '../generic/tree.ts'
|
||||
import { wcGeneric } from '../generic/wc.ts'
|
||||
import { HISTORY_HISTORY } from './history_cmd.ts'
|
||||
import { HISTORY_HISTORY } from './history.ts'
|
||||
|
||||
const R = ResourceName.HISTORY
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@ import {
|
||||
type PredNode,
|
||||
startBasename,
|
||||
treeHasType,
|
||||
} from '../../commands/builtin/findEval.ts'
|
||||
} from '../../commands/builtin/find_eval.ts'
|
||||
import { lstripSlash, rstripSlash, stripSlash } from '../../utils/slash.ts'
|
||||
import { modifiedTs } from '../generic/find.ts'
|
||||
import { resolvePath } from './path.ts'
|
||||
|
||||
@@ -24,7 +24,7 @@ import {
|
||||
type PredNode,
|
||||
startBasename,
|
||||
treeHasType,
|
||||
} from '../../commands/builtin/findEval.ts'
|
||||
} from '../../commands/builtin/find_eval.ts'
|
||||
import { lstripSlash, rstripSlash, stripSlash } from '../../utils/slash.ts'
|
||||
import { modifiedTs } from '../generic/find.ts'
|
||||
import { resolvePath } from './path.ts'
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========
|
||||
|
||||
import type { GDriveAccessor } from '../../accessor/gdrive.ts'
|
||||
import { buildTree, emitStartPath, keep, startBasename } from '../../commands/builtin/findEval.ts'
|
||||
import { buildTree, emitStartPath, keep, startBasename } from '../../commands/builtin/find_eval.ts'
|
||||
import type { FindOptions } from '../../resource/base.ts'
|
||||
import type { PathSpec } from '../../types.ts'
|
||||
import { isFolder, resolveKey } from './resolve.ts'
|
||||
|
||||
@@ -23,7 +23,7 @@ import {
|
||||
treeHasEmpty,
|
||||
type FindEntry,
|
||||
keep,
|
||||
} from '../../commands/builtin/findEval.ts'
|
||||
} from '../../commands/builtin/find_eval.ts'
|
||||
import { FileType, PathSpec, type FileStat } from '../../types.ts'
|
||||
import type { LinkView } from '../../ops/types.ts'
|
||||
import { rstripSlash } from '../../utils/slash.ts'
|
||||
|
||||
@@ -16,7 +16,7 @@ import { mountPrefixOf } from '../../utils/key_prefix.ts'
|
||||
import type { GitHubAccessor } from '../../accessor/github.ts'
|
||||
import type { FindOptions } from '../../resource/base.ts'
|
||||
import type { PathSpec } from '../../types.ts'
|
||||
import { buildTree, emitStartPath, keep, startBasename } from '../../commands/builtin/findEval.ts'
|
||||
import { buildTree, emitStartPath, keep, startBasename } from '../../commands/builtin/find_eval.ts'
|
||||
import { stripSlash } from '../../utils/slash.ts'
|
||||
import { compareCodePoints } from '../../utils/sort.ts'
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========
|
||||
|
||||
import type { HistoryAccessor } from '../../accessor/history.ts'
|
||||
import { buildTree, type FindEntry, keep } from '../../commands/builtin/findEval.ts'
|
||||
import { buildTree, type FindEntry, keep } from '../../commands/builtin/find_eval.ts'
|
||||
import type { FindOptions } from '../ram/find.ts'
|
||||
import { stripSlash } from '../../utils/slash.ts'
|
||||
import type { PathSpec } from '../../types.ts'
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
import { invalidateAfterWrite } from '../../cache/context.ts'
|
||||
import { IndexEntry, ResourceType } from '../../cache/index/config.ts'
|
||||
import type { IndexCacheStore } from '../../cache/index/store.ts'
|
||||
import { buildTree, emitStartPath, keep, type PredNode } from '../../commands/builtin/findEval.ts'
|
||||
import { buildTree, emitStartPath, keep, type PredNode } from '../../commands/builtin/find_eval.ts'
|
||||
import { record, recordingActive, recordStream, revisionFor } from '../../observe/context.ts'
|
||||
import type { FindOptions } from '../../resource/base.ts'
|
||||
import { FileStat, FileType, PathSpec } from '../../types.ts'
|
||||
|
||||
@@ -20,7 +20,7 @@ import type { NotionStatAccessor } from './stat.ts'
|
||||
import { readdir } from './readdir.ts'
|
||||
import { stat } from './stat.ts'
|
||||
import { stripSlash } from '../../utils/slash.ts'
|
||||
import { buildTree, keep, startBasename } from '../../commands/builtin/findEval.ts'
|
||||
import { buildTree, keep, startBasename } from '../../commands/builtin/find_eval.ts'
|
||||
import { compareCodePoints } from '../../utils/sort.ts'
|
||||
|
||||
async function collect(
|
||||
|
||||
@@ -19,7 +19,7 @@ import {
|
||||
invalidateAncestors,
|
||||
} from '../../cache/context.ts'
|
||||
import type { IndexCacheStore } from '../../cache/index/store.ts'
|
||||
import { startBasename } from '../../commands/builtin/findEval.ts'
|
||||
import { startBasename } from '../../commands/builtin/find_eval.ts'
|
||||
import { record } from '../../observe/context.ts'
|
||||
import type { FindOptions } from '../../resource/base.ts'
|
||||
import { FileStat, FileType, type PathSpec } from '../../types.ts'
|
||||
|
||||
@@ -23,7 +23,7 @@ import {
|
||||
keep,
|
||||
type PredNode,
|
||||
startBasename,
|
||||
} from '../../commands/builtin/findEval.ts'
|
||||
} from '../../commands/builtin/find_eval.ts'
|
||||
import { compareCodePoints } from '../../utils/sort.ts'
|
||||
|
||||
export interface FindOptions {
|
||||
|
||||
@@ -17,7 +17,7 @@ import type { PathSpec } from '../../types.ts'
|
||||
import type { S3Accessor } from '../../accessor/s3.ts'
|
||||
import { loadS3Module, rawPathOf, s3Prefix, stripKeyPrefix, withClient } from './_client.ts'
|
||||
import { rstripSlash } from '../../utils/slash.ts'
|
||||
import { buildTree, emitStartPath, keep, startBasename } from '../../commands/builtin/findEval.ts'
|
||||
import { buildTree, emitStartPath, keep, startBasename } from '../../commands/builtin/find_eval.ts'
|
||||
import { compareCodePoints } from '../../utils/sort.ts'
|
||||
|
||||
export async function find(
|
||||
|
||||
@@ -27,7 +27,7 @@ import {
|
||||
startBasename,
|
||||
type FindEntry,
|
||||
type PredNode,
|
||||
} from '../../commands/builtin/findEval.ts'
|
||||
} from '../../commands/builtin/find_eval.ts'
|
||||
import { record } from '../../observe/context.ts'
|
||||
import type { FindOptions } from '../../resource/base.ts'
|
||||
import { FileStat, FileType, type PathSpec } from '../../types.ts'
|
||||
|
||||
@@ -17,7 +17,7 @@ import { IndexType, type IndexConfig, type RedisIndexConfig } from '../cache/ind
|
||||
import { RAMIndexCacheStore } from '../cache/index/ram.ts'
|
||||
import { RedisIndexCacheStore } from '../cache/index/redis.ts'
|
||||
import type { IndexCacheStore } from '../cache/index/store.ts'
|
||||
import type { PredNode } from '../commands/builtin/findEval.ts'
|
||||
import type { PredNode } from '../commands/builtin/find_eval.ts'
|
||||
import type { RegisteredCommand } from '../commands/config.ts'
|
||||
import type { RegisteredOp } from '../ops/registry.ts'
|
||||
import type { CapacityResult, FileStat, PathSpec } from '../types.ts'
|
||||
|
||||
@@ -42,7 +42,7 @@ import {
|
||||
FindParseError,
|
||||
findExprTail,
|
||||
parseFindExpression,
|
||||
} from '../../commands/builtin/findParse.ts'
|
||||
} from '../../commands/builtin/find_parse.ts'
|
||||
import { maybeWithTimeout } from '../../commands/builtin/utils/limit.ts'
|
||||
import { resolveProducer, resolveLimit } from '../../policy/index.ts'
|
||||
import type { ExecuteNodeFn, JobHandlerResult } from './jobs.ts'
|
||||
|
||||
@@ -23,12 +23,12 @@ import { ExecutionNode } from '../types.ts'
|
||||
import { applyFindActions } from './find_action_dispatch.ts'
|
||||
import { respellOne } from '../../utils/path.ts'
|
||||
import { rstripSlash, stripSlash } from '../../utils/slash.ts'
|
||||
import { keep } from '../../commands/builtin/findEval.ts'
|
||||
import { keep } from '../../commands/builtin/find_eval.ts'
|
||||
import {
|
||||
FindParseError,
|
||||
parseFindExpression,
|
||||
type FindExpr,
|
||||
} from '../../commands/builtin/findParse.ts'
|
||||
} from '../../commands/builtin/find_parse.ts'
|
||||
import type { FlagValue } from '../../commands/spec/types.ts'
|
||||
import type { RunSingle } from '../../commands/builtin/generic/crossmount/types.ts'
|
||||
import type { NamespaceView, StatPath } from '../../ops/types.ts'
|
||||
|
||||
@@ -20,8 +20,8 @@ import {
|
||||
emitStartPath,
|
||||
keep,
|
||||
startBasename,
|
||||
} from '@struktoai/mirage-core/commands/builtin/findEval'
|
||||
import type { PredNode } from '@struktoai/mirage-core/commands/builtin/findEval'
|
||||
} from '@struktoai/mirage-core/commands/builtin/find_eval'
|
||||
import type { PredNode } from '@struktoai/mirage-core/commands/builtin/find_eval'
|
||||
import type { PathSpec } from '@struktoai/mirage-core/types'
|
||||
import { compareCodePoints } from '@struktoai/mirage-core/utils/sort'
|
||||
import { norm, resolveSafe } from './utils.ts'
|
||||
|
||||
@@ -17,7 +17,7 @@ import {
|
||||
emitStartPath,
|
||||
keep,
|
||||
startBasename,
|
||||
} from '@struktoai/mirage-core/commands/builtin/findEval'
|
||||
} from '@struktoai/mirage-core/commands/builtin/find_eval'
|
||||
import type { FindOptions } from '@struktoai/mirage-core/resource/base'
|
||||
import type { PathSpec } from '@struktoai/mirage-core/types'
|
||||
import { rstripSlash } from '@struktoai/mirage-core/utils/slash'
|
||||
|
||||
@@ -17,8 +17,8 @@ import {
|
||||
emitStartPath,
|
||||
keep,
|
||||
startBasename,
|
||||
} from '@struktoai/mirage-core/commands/builtin/findEval'
|
||||
import type { PredNode } from '@struktoai/mirage-core/commands/builtin/findEval'
|
||||
} from '@struktoai/mirage-core/commands/builtin/find_eval'
|
||||
import type { PredNode } from '@struktoai/mirage-core/commands/builtin/find_eval'
|
||||
import type { FindOptions } from '@struktoai/mirage-core/resource/base'
|
||||
import type { PathSpec } from '@struktoai/mirage-core/types'
|
||||
import { rstripSlash, stripSlash } from '@struktoai/mirage-core/utils/slash'
|
||||
|
||||
@@ -4,8 +4,8 @@ import {
|
||||
optionsTree,
|
||||
startBasename,
|
||||
treeHasEmpty,
|
||||
} from '@struktoai/mirage-core/commands/builtin/findEval'
|
||||
import type { FindEntry, PredNode } from '@struktoai/mirage-core/commands/builtin/findEval'
|
||||
} from '@struktoai/mirage-core/commands/builtin/find_eval'
|
||||
import type { FindEntry, PredNode } from '@struktoai/mirage-core/commands/builtin/find_eval'
|
||||
import type { FindOptions } from '@struktoai/mirage-core/resource/base'
|
||||
import type { PathSpec } from '@struktoai/mirage-core/types'
|
||||
import { rstripSlash, stripSlash } from '@struktoai/mirage-core/utils/slash'
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { PredNode } from '@struktoai/mirage-core/commands/builtin/findEval'
|
||||
import type { PredNode } from '@struktoai/mirage-core/commands/builtin/find_eval'
|
||||
import { PathSpec } from '@struktoai/mirage-core/types'
|
||||
import { afterEach, describe, expect, it, vi } from 'vitest'
|
||||
import { NextcloudAccessor } from '../../accessor/nextcloud.ts'
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { PredNode } from '@struktoai/mirage-core/commands/builtin/findEval'
|
||||
import type { PredNode } from '@struktoai/mirage-core/commands/builtin/find_eval'
|
||||
import type { PathSpec } from '@struktoai/mirage-core/types'
|
||||
import {
|
||||
DISPLAY_NAME,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { PredNode } from '@struktoai/mirage-core/commands/builtin/findEval'
|
||||
import type { PredNode } from '@struktoai/mirage-core/commands/builtin/find_eval'
|
||||
|
||||
export const Namespace = {
|
||||
DAV: 'DAV:',
|
||||
|
||||
@@ -18,8 +18,8 @@ import {
|
||||
emitStartPath,
|
||||
keep,
|
||||
startBasename,
|
||||
} from '@struktoai/mirage-core/commands/builtin/findEval'
|
||||
import type { PredNode } from '@struktoai/mirage-core/commands/builtin/findEval'
|
||||
} from '@struktoai/mirage-core/commands/builtin/find_eval'
|
||||
import type { PredNode } from '@struktoai/mirage-core/commands/builtin/find_eval'
|
||||
import type { PathSpec } from '@struktoai/mirage-core/types'
|
||||
import { rstripSlash } from '@struktoai/mirage-core/utils/slash'
|
||||
import { compareCodePoints } from '@struktoai/mirage-core/utils/sort'
|
||||
|
||||
@@ -18,8 +18,8 @@ import {
|
||||
emitStartPath,
|
||||
keep,
|
||||
startBasename,
|
||||
} from '@struktoai/mirage-core/commands/builtin/findEval'
|
||||
import type { PredNode } from '@struktoai/mirage-core/commands/builtin/findEval'
|
||||
} from '@struktoai/mirage-core/commands/builtin/find_eval'
|
||||
import type { PredNode } from '@struktoai/mirage-core/commands/builtin/find_eval'
|
||||
import type { PathSpec } from '@struktoai/mirage-core/types'
|
||||
import { norm } from '@struktoai/mirage-core/utils/path'
|
||||
import { compareCodePoints } from '@struktoai/mirage-core/utils/sort'
|
||||
|
||||
Reference in New Issue
Block a user