Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5702898
commit 9c063d5
Showing
58 changed files
with
1,444 additions
and
261 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
# Contributing | ||
|
||
- Love your input! Contributing to this project should be as easy and transparent as possible, whether it's: | ||
- Reporting a bug | ||
- Discussing the current state of the code | ||
- Submitting a fix | ||
- Proposing new features | ||
- Becoming a maintainer | ||
|
||
## Pull Request Process | ||
|
||
- [GitHub flow](https://guides.github.com/introduction/flow/index.html) is used | ||
- Your pull requests are actively welcomed. | ||
- The steps: | ||
1. Fork the repo and create your branch from master. | ||
2. If you've added code that should be tested, add tests. | ||
3. If you've changed APIs, update the documentation. | ||
4. Ensure the test suite passes. | ||
5. Make sure your code lints. | ||
6. Issue that pull request! | ||
- 🙏 DO | ||
- Document your changes in the pull request | ||
- 💡 Check [developer notes](./docs/developer-notes.md) if you need help | ||
- ❗ DON'T | ||
- Do not update the versions, current version is only [set by the maintainer](./docs/gitops.png) and updated automatically by [bump-everywhere](https://github.com/undergroundwires/bump-everywhere) | ||
|
||
## Guidelines | ||
|
||
### Extend scripts | ||
|
||
- Create a [pull request](./../CONTRIBUTING.md#Pull+Request+Process) for [application.yaml](./../src/application/application.yaml) | ||
- 🙏 For any new script, try to add `revertCode` that'll revert the changes caused by the script. | ||
- See [typings](./../src/application/application.yaml.d.ts) for documentation as code. | ||
|
||
### Handle the state in presentation layer | ||
|
||
- There are two types of components: | ||
- **Stateless**, extends `Vue` | ||
- **Stateful**, extends [`StatefulVue`](./src/presentation/StatefulVue.ts) | ||
- The source of truth for the state lies in [application layer](./src/application/state) and must be updated from the views if they're mutating the state | ||
- They mutate or/and reacts to changes in [application state](./src/application/state). | ||
- You can react by getting the state and listening to it and update the view accordingly in [`mounted()`](https://vuejs.org/v2/api/#mounted) method. | ||
|
||
## License | ||
|
||
By contributing, you agree that your contributions will be licensed under its GNU General Public License v3.0. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import { Script } from '@/domain/Script'; | ||
import { YamlScript } from 'js-yaml-loader!./application.yaml'; | ||
import { parseDocUrls } from './DocumentationParser'; | ||
|
||
export function parseScript(yamlScript: YamlScript): Script { | ||
if (!yamlScript) { | ||
throw new Error('script is null or undefined'); | ||
} | ||
const script = new Script( | ||
/* name */ yamlScript.name, | ||
/* code */ yamlScript.code, | ||
/* revertCode */ yamlScript.revertCode, | ||
/* docs */ parseDocUrls(yamlScript), | ||
/* isRecommended */ yamlScript.recommend); | ||
return script; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import { SelectedScript } from '@/application/State/Selection/SelectedScript'; | ||
|
||
export interface IUserScriptGenerator { | ||
buildCode(selectedScripts: ReadonlyArray<SelectedScript>, version: string): string; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import { BaseEntity } from '@/infrastructure/Entity/BaseEntity'; | ||
import { IScript } from '@/domain/IScript'; | ||
|
||
export class SelectedScript extends BaseEntity<string> { | ||
constructor( | ||
public readonly script: IScript, | ||
public readonly revert: boolean, | ||
) { | ||
super(script.id); | ||
if (revert && !script.canRevert()) { | ||
throw new Error('cannot revert an irreversible script'); | ||
} | ||
} | ||
} |
Oops, something went wrong.