Skip to content

Commit

Permalink
docs: update code docs and styling #116
Browse files Browse the repository at this point in the history
docs: update code docs and styling
  • Loading branch information
KyleTryon committed Aug 10, 2022
2 parents e57fcba + 1266325 commit 456fbc7
Show file tree
Hide file tree
Showing 11 changed files with 31 additions and 7 deletions.
4 changes: 2 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export * as parameters from './lib/Components/Parameters';
export * as executors from './lib/Components/Executors';

/**
* Logical conditions for conditional components.
* Conditional statements for 2.1 config conditionals.
*/
export * as logic from './lib/Components/Logic';

Expand All @@ -36,7 +36,7 @@ export * as types from './lib/Types';
export * as workflow from './lib/Components/Workflow';

/**
* All imports pertaining to orbs
* All orb components.
*/
export * as orb from './lib/Orb';

Expand Down
4 changes: 2 additions & 2 deletions src/lib/Components/Logic/exports/Conditional.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import { When } from './When';

/**
Conditional logic interface.
https://circleci.com/docs/2.0/configuration-reference/#logic-statements
@see {@link https://circleci.com/docs/2.0/configuration-reference/#logic-statements}
{@label STATIC_2.1}
*/
export interface Conditional {
when?: When;
Expand Down
4 changes: 4 additions & 0 deletions src/lib/Components/Logic/exports/conditions/And.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ import { GenerableType } from '../../../../Config/exports/Mapping';
import { AndConditionShape, ConditionOrValue } from '../../types';
import { Condition } from '../Condition';

/**
* True if all arguments are truthy.
* @see {@link https://circleci.com/docs/configuration-reference#logic-statements}
*/
export class And extends Condition {
conditions: Condition[];

Expand Down
3 changes: 2 additions & 1 deletion src/lib/Components/Logic/exports/conditions/Equal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ import { ConditionValue, EqualConditionShape } from '../../types';
import { Condition } from '../Condition';

/**
* Compare two or more values.
* True if all arguments evaluate to equal values.
* @see {@link https://circleci.com/docs/configuration-reference#logic-statements}
*/
export class Equal extends Condition {
constructor(private values: ConditionValue[]) {
Expand Down
4 changes: 4 additions & 0 deletions src/lib/Components/Logic/exports/conditions/Not.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ import { GenerableType } from '../../../../Config/exports/Mapping';
import { ConditionOrValue, NotConditionShape } from '../../types';
import { Condition } from '../Condition';

/**
* True the argument is not truthy.
* @see {@link https://circleci.com/docs/configuration-reference#logic-statements}
*/
export class Not extends Condition {
condition: Condition;

Expand Down
4 changes: 4 additions & 0 deletions src/lib/Components/Logic/exports/conditions/Or.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ import { GenerableType } from '../../../../Config/exports/Mapping';
import { ConditionOrValue, OrConditionShape } from '../../types';
import { Condition } from '../Condition';

/**
* True if any argument is truthy.
* @see {@link https://circleci.com/docs/configuration-reference#logic-statements}
*/
export class Or extends Condition {
conditions: Condition[];

Expand Down
4 changes: 4 additions & 0 deletions src/lib/Config/Pipeline/Git.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
/**
* Not fully implemented yet. Fetch git pipeline parameters from inside a CircleCI job.
* @alpha
*/
export class Git {
public _isLocal = true;
constructor(isLocal: boolean) {
Expand Down
3 changes: 2 additions & 1 deletion src/lib/Config/Pipeline/Project.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
export type VCSLiteral = 'bitbucket' | 'github' | 'local';

/**
* Pipeline Project level information
* Not fully implemented yet. Fetch project pipeline parameters from inside a CircleCI job.
* @alpha
*/
export class Project {
private _isLocal: boolean;
Expand Down
3 changes: 2 additions & 1 deletion src/lib/Config/Pipeline/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import { Project } from './Project';
import { Git } from './Git';
/**
* Access Pipeline variables from within CircleCI Cloud.
* Not fully implemented yet. Fetch pipeline parameters from inside a CircleCI job.
* @alpha
*/
export class Pipeline {
/**
Expand Down
4 changes: 4 additions & 0 deletions src/lib/Orb/exports/OrbImport.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ import { GenerableType } from '../../Config/exports/Mapping';
import { OrbDisplayMeta, OrbImportManifest } from '../types/Orb.types';
import { OrbRef } from './OrbRef';

/**
* A reference to an imported Orb.
* {@label STATIC_2.1}
*/
export class OrbImport implements Generable {
alias: string;
namespace: string;
Expand Down
1 change: 1 addition & 0 deletions src/lib/Orb/exports/OrbRef.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { OrbImport } from './OrbImport';

/**
* An abstract reference to an orb component.
* {@label STATIC_2.1}
*/
export class OrbRef<Literal extends AnyParameterLiteral> {
private _parameters: CustomParametersList<Literal>;
Expand Down

0 comments on commit 456fbc7

Please sign in to comment.