local_repo.ts

view source

Declarations
#

7 declarations

local_repo_load
#

local_repo.ts view source

({ local_repo_path, modules, log }: LocalRepoLoadOptions & { local_repo_path: LocalRepoPath; }): Promise<LocalRepo> import {local_repo_load} from '@fuzdev/fuz_repos/local_repo.js';

Loads a resolved repo as its working tree sits (the tasks read where each repo sits from repos status, and repos sync moves them). Moves no ref.

  1. Loads library_json, with the module analysis or without it (modules)
  2. Creates Library and extracts dependency maps

A repo with no package.json but a Rust Cargo.toml loads as a dashboard-only cargo repo instead.

__0

type LocalRepoLoadOptions & { local_repo_path: LocalRepoPath; }

returns

Promise<LocalRepo>

throws

  • TaskError - if the `package.json` or the analysis fails

local_repos_load
#

local_repo.ts view source

({ local_repo_paths, modules, log, parallel, concurrency }: LocalRepoLoadOptions & { local_repo_paths: LocalRepoPath[]; parallel?: boolean | undefined; concurrency?: number | undefined; }): Promise<...> import {local_repos_load} from '@fuzdev/fuz_repos/local_repo.js';

Loads each resolved repo (local_repo_load), in order.

__0

type LocalRepoLoadOptions & { local_repo_paths: LocalRepoPath[]; parallel?: boolean | undefined; concurrency?: number | undefined; }

returns

Promise<LocalRepo[]>

throws

  • TaskError - naming every repo that failed to load

local_repos_resolve
#

local_repo.ts view source

(options: { keys: readonly string[]; report: { version: 20; workspace: string; registry: string; fetched: boolean; sessions: { kind: "available"; unscoped: { pid: number; cwd: string; worktree: string | null; process_cwd: string | null; source: "session_file" | "roster_worker"; }[]; } | { ...; }; entries: { ...; }[]; unregistered: ({ ...; } | ... 4 more ... | { ...; })[] | null; }; host?: { ...; } | undefined; registry?: string | undefined; }): Result<...> import {local_repos_resolve} from '@fuzdev/fuz_repos/local_repo.js';

Resolves a gitops config's registry keys against a repos status report, in config order. Every key must name an owned repo that's present and was probed; each that doesn't is a problem, and any problem fails the whole resolve, naming them all.

options

type { keys: readonly string[]; report: { version: 20; workspace: string; registry: string; fetched: boolean; sessions: { kind: "available"; unscoped: { pid: number; cwd: string; worktree: string | null; process_cwd: string | null; source: "session_file" | "roster_worker"; }[]; } | { ...; }; entries: { ...; }[]; unregist...

returns

Result

the repos in config order, or a message listing every problem

LocalRepo
#

local_repo.ts view source

LocalRepo import type {LocalRepo} from '@fuzdev/fuz_repos/local_repo.js';

Fully loaded local repo with Library and extracted dependency data. Does not extend LocalRepoPath - Library is source of truth for name/repo_url/etc.

kind

Which packaging ecosystem the repo belongs to. npm repos (with a package.json) take part in the changeset publishing cascade; cargo repos (a Rust Cargo.toml, no package.json) are dashboard-only — fetched and rendered like any repo but excluded from publishing/analysis. See repo_is_npm.

type "npm" | "cargo"

library

type Library

package_json

The repo's full package.json (with dependencies/devDependencies).

type PackageJson

repo_dir

type string

entry

The repo's registry entry as repos status --json reported it: its branch, visibility, ci, and archived, and its git state.

type ReposEntryStatus

dependencies?

type Map<string, string>

dev_dependencies?

type Map<string, string>

peer_dependencies?

type Map<string, string>

LocalRepoLoadOptions
#

local_repo.ts view source

LocalRepoLoadOptions import type {LocalRepoLoadOptions} from '@fuzdev/fuz_repos/local_repo.js';

Options for loading resolved repos (local_repo_load, local_repos_load).

modules

Whether an npm repo's library carries its modules. true runs gro's library_load_from_repo — the svelte-docinfo analysis, cached at .gro/library.json in the repo at a clean commit — for the dashboard, which renders each repo's source_json. false reads the package.json alone into a Library with no modules, analyzing and writing nothing: the publishing and dependency tasks read only the package's name, version, and dependencies. A cargo repo never has modules.

type boolean

log?

type Logger

LocalRepoPath
#

local_repo.ts view source

LocalRepoPath import type {LocalRepoPath} from '@fuzdev/fuz_repos/local_repo.js';

A configured repo resolved through repos status: present on disk, before its library is loaded. See local_repos_resolve.

repo_name

The repo's registry key (for display/logging before Library is loaded).

type string

repo_dir

The workspace root joined with the entry's dir.

type string

repo_url

The registry's HTTPS URL for the repo.

type string

entry

The repo's registry entry as repos status --json reported it.

type ReposEntryStatus

repo_is_npm
#

local_repo.ts view source

(repo: LocalRepo): boolean import {repo_is_npm} from '@fuzdev/fuz_repos/local_repo.js';

Whether a repo is an npm package and so participates in publishing and dependency analysis. Non-npm repos (e.g. Rust cargo repos) are still rendered on the dashboard, but excluded from the changeset cascade.

repo

returns

boolean

Depends on
#

Imported by
#