Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: update code docs and styling #116

Merged
merged 2 commits into from
Aug 10, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,6 @@ Scopes can be used to denote which package this change is affecting
- _**sdk**_: The CircleCI Configuration SDK
- **parser**: The CircleCI Configuration Parser


#### <a name="pull"></a>Submitting a Pull Request

After searching for potentially existing pull requests or issues in progress, if
Expand All @@ -144,9 +143,9 @@ After the issue has been created, follow these steps to create a Pull Request.
1. Run `npm run setup`
1. Implement your change with appropriate test coverage.
1. Utilize our [commit message conventions](commit).
2. Run tests, linters, and formatters locally, with: `npm run prep`
3. Push all changes back to GitHub `git push origin fix_my_issue`
4. In GitHub, send a Pull Request to `circleci-config-sdk-ts:main`
1. Run tests, linters, and formatters locally, with: `npm run prep`
1. Push all changes back to GitHub `git push origin fix_my_issue`
1. In GitHub, send a Pull Request to `circleci-config-sdk-ts:main`

Thank you for your contribution!

Expand Down
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