diff --git a/docs/api/cautious-journey.md b/docs/api/cautious-journey.md index a8f5418..05f6a39 100644 --- a/docs/api/cautious-journey.md +++ b/docs/api/cautious-journey.md @@ -15,9 +15,9 @@ | Function | Description | | --- | --- | -| [resolveProject(options)](./cautious-journey.resolveproject.md) | | +| [resolveProject(options)](./cautious-journey.resolveproject.md) | TODO | | [syncIssueLabels(options)](./cautious-journey.syncissuelabels.md) | goes through and resolves each issue in the project. if there are changes and no errors, then updates the issue. | -| [syncProjectLabels(options)](./cautious-journey.syncprojectlabels.md) | | +| [syncProjectLabels(options)](./cautious-journey.syncprojectlabels.md) | TODO | ## Interfaces @@ -25,12 +25,12 @@ | --- | --- | | [ChangeSet](./cautious-journey.changeset.md) | A set of labels to add and/or remove. | | [Remote](./cautious-journey.remote.md) | Basic functions which every remote API must provide. | -| [RemoteOptions](./cautious-journey.remoteoptions.md) | | +| [RemoteOptions](./cautious-journey.remoteoptions.md) | Options for a new remote instance. | | [ResolveInput](./cautious-journey.resolveinput.md) | Collected inputs for a resolver run. | | [ResolveResult](./cautious-journey.resolveresult.md) | Collected results from a resolver run. | | [StateLabel](./cautious-journey.statelabel.md) | Grouped labels: the equivalent of a radio group. | | [StateValue](./cautious-journey.statevalue.md) | One of many values for a particular state. | -| [SyncOptions](./cautious-journey.syncoptions.md) | | +| [SyncOptions](./cautious-journey.syncoptions.md) | TODO | ## Type Aliases diff --git a/docs/api/cautious-journey.remoteoptions.md b/docs/api/cautious-journey.remoteoptions.md index 629737e..559718a 100644 --- a/docs/api/cautious-journey.remoteoptions.md +++ b/docs/api/cautious-journey.remoteoptions.md @@ -4,6 +4,8 @@ ## RemoteOptions interface +Options for a new remote instance. + Signature: ```typescript diff --git a/docs/api/cautious-journey.resolveproject.md b/docs/api/cautious-journey.resolveproject.md index 4c5f737..89aeeca 100644 --- a/docs/api/cautious-journey.resolveproject.md +++ b/docs/api/cautious-journey.resolveproject.md @@ -4,6 +4,8 @@ ## resolveProject() function +TODO + Signature: ```typescript diff --git a/docs/api/cautious-journey.syncoptions.md b/docs/api/cautious-journey.syncoptions.md index 899ac64..c87f2cd 100644 --- a/docs/api/cautious-journey.syncoptions.md +++ b/docs/api/cautious-journey.syncoptions.md @@ -4,6 +4,8 @@ ## SyncOptions interface +TODO + Signature: ```typescript diff --git a/docs/api/cautious-journey.syncprojectlabels.md b/docs/api/cautious-journey.syncprojectlabels.md index a3cb017..fad568d 100644 --- a/docs/api/cautious-journey.syncprojectlabels.md +++ b/docs/api/cautious-journey.syncprojectlabels.md @@ -4,6 +4,8 @@ ## syncProjectLabels() function +TODO + Signature: ```typescript diff --git a/docs/cautious-journey.api.md b/docs/cautious-journey.api.md index 6c4cc1a..77f447c 100644 --- a/docs/cautious-journey.api.md +++ b/docs/cautious-journey.api.md @@ -106,7 +106,7 @@ export interface Remote { updateLabel(options: LabelUpdate): Promise; } -// @public (undocumented) +// @public export interface RemoteOptions extends BaseOptions { data: Record; dryrun: boolean; @@ -127,7 +127,7 @@ export interface ResolveInput { states: Array; } -// @public (undocumented) +// @public export function resolveProject(options: ResolveInput): ResolveResult; // @public @@ -160,7 +160,7 @@ export interface StateValue extends BaseLabel { // @public export function syncIssueLabels(options: SyncOptions): Promise; -// @public (undocumented) +// @public export interface SyncOptions { // (undocumented) logger: Logger; @@ -176,7 +176,7 @@ export interface SyncOptions { remote: Remote; } -// @public (undocumented) +// @public export function syncProjectLabels(options: SyncOptions): Promise; // (No @packageDocumentation comment for this package) diff --git a/src/config/index.ts b/src/config/index.ts index dd17634..873da5f 100644 --- a/src/config/index.ts +++ b/src/config/index.ts @@ -42,7 +42,7 @@ export interface ProjectConfig { /** * Leave a comment along with any update, explaining the changes that were made. * - * @default `true` + * Defaults to true. */ comment: boolean; @@ -80,6 +80,7 @@ export interface ConfigData { export const CONFIG_SCHEMA_KEY = 'cautious-journey#/definitions/config'; export function configSchemaPath(): URL { + // TODO: do something for bundled version, where import.meta.url is empty return new URL(join('.', 'schema.yml'), import.meta.url); } diff --git a/src/labels.ts b/src/labels.ts index 79e4ed8..680a535 100644 --- a/src/labels.ts +++ b/src/labels.ts @@ -11,6 +11,8 @@ export interface LabelRef { /** * A set of labels to add and/or remove. + * + * @public */ export interface ChangeSet { adds: Array; @@ -49,6 +51,8 @@ export interface BaseLabel extends ChangeSet { /** * Individual labels: the equivalent of a checkbox. + * + * @public */ export type FlagLabel = BaseLabel; @@ -58,6 +62,8 @@ export interface StateChange extends ChangeSet { /** * One of many values for a particular state. + * + * @public */ export interface StateValue extends BaseLabel { /** @@ -68,6 +74,8 @@ export interface StateValue extends BaseLabel { /** * Grouped labels: the equivalent of a radio group. + * + * @public */ export interface StateLabel extends BaseLabel { divider: string; diff --git a/src/remote/github.ts b/src/remote/github.ts index 1caebe1..5c1b616 100644 --- a/src/remote/github.ts +++ b/src/remote/github.ts @@ -7,6 +7,8 @@ import { BaseRemote } from './base.js'; /** * Github/Octokit API implementation of the `Remote` contract. + * + * @public */ export class GithubRemote extends BaseRemote implements Remote { constructor(options: RemoteOptions) { diff --git a/src/remote/gitlab.ts b/src/remote/gitlab.ts index 73e5238..bad8b06 100644 --- a/src/remote/gitlab.ts +++ b/src/remote/gitlab.ts @@ -14,6 +14,8 @@ export interface GitlabOptions extends BaseOptions { /** * Gitlab API implementation of the `Remote` contract. + * + * @public */ export class GitlabRemote extends BaseRemote implements Remote { constructor(options: RemoteOptions) { diff --git a/src/remote/index.ts b/src/remote/index.ts index 599d5ab..2b2b149 100644 --- a/src/remote/index.ts +++ b/src/remote/index.ts @@ -33,6 +33,11 @@ export interface LabelUpdate extends LabelQuery { desc: string; } +/** + * Options for a new remote instance. + * + * @public + */ export interface RemoteOptions extends BaseOptions { /** * Arbitrary key-value data for this remote, usually credentials and base URLs. @@ -54,6 +59,8 @@ export interface RemoteOptions extends BaseOptions { /** * Basic functions which every remote API must provide. + * + * @public */ export interface Remote { connect(): Promise; diff --git a/src/resolve.ts b/src/resolve.ts index 1a6dd6d..fd6521e 100644 --- a/src/resolve.ts +++ b/src/resolve.ts @@ -42,6 +42,8 @@ export interface ErrorRecord { /** * Collected inputs for a resolver run. + * + * @public */ export interface ResolveInput { flags: Array; @@ -52,6 +54,8 @@ export interface ResolveInput { /** * Collected results from a resolver run. + * + * @public */ export interface ResolveResult { changes: Array; @@ -183,6 +187,11 @@ function resolveState(state: StateLabel, anticipatedResult: ResolveResult, activ } } +/** + * TODO + * + * @public + */ export function resolveProject(options: ResolveInput): ResolveResult { const result: ResolveResult = { changes: [], diff --git a/src/sync.ts b/src/sync.ts index 65bdc6e..1d43ddf 100644 --- a/src/sync.ts +++ b/src/sync.ts @@ -7,6 +7,11 @@ import { LabelUpdate, Remote } from './remote/index.js'; import { resolveProject } from './resolve.js'; import { compareItems, defaultTo, defaultUntil, RandomGenerator } from './utils.js'; +/** + * TODO + * + * @public + */ export interface SyncOptions { logger: Logger; project: ProjectConfig; @@ -17,6 +22,8 @@ export interface SyncOptions { /** * goes through and resolves each issue in the project. * if there are changes and no errors, then updates the issue. + * + * @public */ export async function syncIssueLabels(options: SyncOptions): Promise { const { logger, project, remote } = options; @@ -69,6 +76,11 @@ export async function syncIssueLabels(options: SyncOptions): Promise { return undefined; } +/** + * TODO + * + * @public + */ /* eslint-disable-next-line sonarjs/cognitive-complexity */ export async function syncProjectLabels(options: SyncOptions): Promise { const { logger, project, remote } = options;