Skip to content

Commit 5b8a900

Browse files
🧹 chore(latest): latest
1 parent 40ed426 commit 5b8a900

58 files changed

Lines changed: 538 additions & 456 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.config/common-keywords.json

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
11
{
2-
"keywords": ["mblabs", "megabytelabs", "plugin", "professormanhattan", "washingtondc"]
2+
"keywords": [
3+
"mblabs",
4+
"megabytelabs",
5+
"plugin",
6+
"professormanhattan",
7+
"washingtondc"
8+
]
39
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,18 @@
11
## Requirements
22

3+
If you are simply including this library in your project, all you need is a recent version of Node.js. **[Node.js >14.18.0]({{ repository.project.node }})** is sometimes required and is the only version range we actively support. Albeit, it is highly probable that lower versions will work as well depending on the requirements that this project imports.
4+
5+
### Developer Requirements
6+
7+
The following versions of Node.js and Python are required for development:
8+
39
- **[Node.js >14.18.0]({{ repository.project.node }})**
410
- **[Python >3.10.0]({{ repository.project.python }})**
11+
12+
Other versions may work, but only the above versions are supported. Most development dependencies are installed automatically by our `Taskfile.yml` set-up (even Node.js and Python). Run `bash start.sh` to install **[Bodega](https://github.com/ProfessorManhattan/Bodega)** (an improved fork of [go-task](https://github.com/go-task/task)) and run the initialization sequence. The taskfiles will automatically install dependencies as they are needed, based on what development tasks you are running. For more information, check out the [CONTRIBUTING.md]({{ repository.github }}/blob/main/docs/CONTRIBUTING.md) or simply run:
13+
14+
```shell
15+
npm run help
16+
```
17+
18+
`npm run help` will ensure Bodega is installed and then open an interactive dialog where you can explore and learn about various developer commands.

.config/docs/readme/subheader.md

Lines changed: 42 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,44 @@
11
<div align="center">
2-
<h4 align="center">
3-
<a href="{{ website.homepage }}" title="Megabyte Labs homepage" target="_blank">
4-
<img src="https://gitlab.com/megabyte-labs/assets/-/raw/master/svg/home-solid.svg" />
5-
</a>
6-
<a href="{{ repository.group.npm }}/{{ slug }}/-/blob/master/CONTRIBUTING.md" title="Learn about contributing" target="_blank">
7-
<img src="https://gitlab.com/megabyte-labs/assets/-/raw/master/svg/contributing-solid.svg" />
8-
</a>
9-
<a href="{{ chat_url }}" title="Slack chat room" target="_blank">
10-
<img src="https://gitlab.com/megabyte-labs/assets/-/raw/master/svg/chat-solid.svg" />
11-
</a>
12-
<a href="{{ profile.github }}/npm-{{ slug }}" title="GitHub mirror" target="_blank">
13-
<img src="https://gitlab.com/megabyte-labs/assets/-/raw/master/svg/github-solid.svg" />
14-
</a>
15-
<a href="{{ repository.group.npm }}/{{ slug }}" title="GitLab repository" target="_blank">
16-
<img src="https://gitlab.com/megabyte-labs/assets/-/raw/master/svg/gitlab-solid.svg" />
17-
</a>
18-
</h4>
19-
<p align="center">
20-
<a href="{{ website.npm_package }}/{{ pkg.name }}" target="_blank">
21-
<img alt="Version: {{ pkg.version }}" src="https://img.shields.io/badge/version-{{ pkg.version }}-blue.svg?cacheSeconds=2592000&style={{ badge_style }}" />
22-
</a>
23-
<a href="{{ repository.group.npm }}/{{ slug }}/commits/master" title="GitLab CI build status" target="_blank">
24-
<img alt="Build status" src="{{ repository.group.npm }}/{{ slug }}/badges/master/pipeline.svg">
25-
</a>
26-
<a href="{{ website.npm_package }}/{{ pkg.name }}" title="Dependency status reported by Depfu">
27-
<img alt="Dependency status reported by Depfu" src="https://img.shields.io/depfu/megabyte-labs/npm-{{ slug }}?style={{ badge_style }}&logo=npm" />
28-
</a>
29-
<a href="{{ website.npm_package }}/{{ pkg.name }}" title="Zip file size">
30-
<img alt="Zip file size" src="https://img.shields.io/bundlephobia/minzip/{{ pkg.name }}?style={{ bad_style }}&logo=npm" />
31-
</a>
32-
<a href="" title="Total downloads of {{ pkg.name }} on npmjs.org">
33-
<img alt="Total downloads of {{ pkg.name }} on npmjs.org" src="https://img.shields.io/npm/dt/{{ pkg.name }}?logo=npm&style={{ badge_style }}&logo=npm" />
34-
</a>
35-
<a href="{{ website.npm_package }}/{{ pkg.name }}" title="Number of vulnerabilities from Snyk scan on {{ pkg.name }}">
36-
<img alt="Number of vulnerabilities from Snyk scan on {{ pkg.name }}" src="https://img.shields.io/snyk/vulnerabilities/npm/{{ pkg.name }}?style={{ badge_style }}&logo=npm" />
37-
</a>
38-
<a href="{{ website.documentation }}/npm" target="_blank">
39-
<img alt="Documentation" src="https://img.shields.io/badge/documentation-yes-brightgreen.svg?logo=readthedocs&style={{ badge_style }}" />
40-
</a>
41-
<a href="{{ repository.group.npm }}/{{ slug }}/-/raw/master/LICENSE" target="_blank">
42-
<img alt="License: {{ license }}" src="https://img.shields.io/badge/license-{{ license }}-yellow.svg?style={{ badge_style }}" />
43-
</a>
44-
</p>
2+
<a href="{{ link.home }}" title="{{ organization }} homepage" target="_blank">
3+
<img alt="Homepage" src="https://img.shields.io/website?down_color=%23FF4136&down_message=Down&label=Homepage&logo=home-assistant&logoColor=white&up_color=%232ECC40&up_message=Up&url=https%3A%2F%2Fmegabyte.space&style={{ badge_style }}" />
4+
</a>
5+
<a href="{{ repository.github }}{{ repository.location.contributing.github }}" title="Learn about contributing" target="_blank">
6+
<img alt="Contributing" src="https://img.shields.io/badge/Contributing-Guide-0074D9?logo=github-sponsors&logoColor=white&style={{ badge_style }}" />
7+
</a>
8+
<a href="{{ link.chat }}" title="Chat with us on Slack" target="_blank">
9+
<img alt="Slack" src="https://img.shields.io/badge/Slack-Chat-e01e5a?logo=slack&logoColor=white&style={{ badge_style }}" />
10+
</a>
11+
<a href="{{ repository.github }}" title="GitHub mirror" target="_blank">
12+
<img alt="GitHub" src="https://img.shields.io/badge/Mirror-GitHub-333333?logo=github&style={{ badge_style }}" />
13+
</a>
14+
<a href="{{ repository.gitlab }}" title="GitLab repository" target="_blank">
15+
<img alt="GitLab" src="https://img.shields.io/badge/Repo-GitLab-fc6d26?logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgAQMAAABJtOi3AAAABlBMVEUAAAD///+l2Z/dAAAAAXRSTlMAQObYZgAAAHJJREFUCNdNxKENwzAQQNEfWU1ZPUF1cxR5lYxQqQMkLEsUdIxCM7PMkMgLGB6wopxkYvAeI0xdHkqXgCLL0Beiqy2CmUIdeYs+WioqVF9C6/RlZvblRNZD8etRuKe843KKkBPw2azX13r+rdvPctEaFi4NVzAN2FhJMQAAAABJRU5ErkJggg==&style={{ badge_style }}" />
16+
</a>
17+
</div>
18+
<br/>
19+
<div align="center">
20+
<a href="https://www.npmjs.com/package/{{ pkg.name }}" title="Version {{ pkg.version }}" target="_blank">
21+
<img alt="Version: {{ pkg.version }}" src="https://img.shields.io/badge/version-{{ pkg.version }}-blue.svg?cacheSeconds=2592000&logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgAQMAAABJtOi3AAAABlBMVEUAAAD///+l2Z/dAAAAAXRSTlMAQObYZgAAACNJREFUCNdjIACY//+BEp9hhM3hAzYQwoBIAqEDYQrCZLwAAGlFKxU1nF9cAAAAAElFTkSuQmCC&style={{ alt_badge_style }}" />
22+
</a>
23+
<a href="{{ repository.gitlab }}{{ repository.location.commits.gitlab }}" title="GitLab CI build status" target="_blank">
24+
<img alt="Build status" src="https://img.shields.io/gitlab/pipeline-status/{{ repository.group.npm_path }}/{{ subgroup }}/{{ slug }}?branch=master&label=build&logo=gitlab&logoColor=white&style={{ alt_badge_style }}">
25+
</a>
26+
<a href="https://www.npmjs.com/package/{{ pkg.name }}" title="Dependency status reported by Depfu" target="_blank">
27+
<img alt="Dependency status reported by Depfu" src="https://img.shields.io/depfu/megabyte-labs/{{ customPackageName }}?logo=codeforces&logoColor=white&style={{ alt_badge_style }}&logo=npm" />
28+
</a>
29+
<a href="https://www.npmjs.com/package/{{ pkg.name }}" title="Zip file size" target="_blank">
30+
<img alt="Zip file size" src="https://img.shields.io/bundlephobia/minzip/{{ pkg.name }}?style={{ alt_badge_style }}&logo=npm&logoColor=white" />
31+
</a>
32+
<a href="https://www.npmjs.com/package/{{ pkg.name }}" title="Total downloads of {{ pkg.name }} on npmjs.org" target="_blank">
33+
<img alt="Total downloads of {{ pkg.name }} on npmjs.org" src="https://img.shields.io/npm/dt/{{ pkg.name }}?style={{ alt_badge_style }}&logo=npm&logoColor=white" />
34+
</a>
35+
<a href="https://snyk.io/advisor/npm-package/{{ pkg.name }}" title="Number of vulnerabilities from Snyk scan on {{ pkg.name }}" target="_blank">
36+
<img alt="Number of vulnerabilities from Snyk scan on {{ pkg.name }}" src="https://img.shields.io/snyk/vulnerabilities/npm/{{ pkg.name }}?style={{ alt_badge_style }}&logo=snyk&logoColor=white" />
37+
</a>
38+
<a href="{{ website.documentation }}/{{ group }}" target="_blank">
39+
<img alt="Documentation" src="https://img.shields.io/badge/documentation-yes-brightgreen.svg?logo=readthedocs&logoColor=white&style={{ alt_badge_style }}" />
40+
</a>
41+
<a href="{{ repository.github }}{{ repository.location.license.github }}" target="_blank">
42+
<img alt="License: {{ license }}" src="https://img.shields.io/badge/license-{{ license }}-yellow.svg?logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgAQMAAABJtOi3AAAABlBMVEUAAAD///+l2Z/dAAAAAXRSTlMAQObYZgAAAHpJREFUCNdjYOD/wMDAUP+PgYHxhzwDA/MB5gMM7AwMDxj4GBgKGGQYGCyAEEgbMDDwAAWAwmk8958xpIOI5zKH2RmOyhxmZjguAiKmgIgtQOIYmFgCIp4AlaQ9OczGkJYCJEAGgI0CGwo2HmwR2Eqw5SBnNIAdBHYaAJb6KLM15W/CAAAAAElFTkSuQmCC&style={{ alt_badge_style }}" />
43+
</a>
4544
</div>

.config/docs/variables.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -103,11 +103,11 @@
103103
},
104104
"releaseRules": [
105105
{
106-
"release": "patch",
106+
"release": false,
107107
"type": "build"
108108
},
109109
{
110-
"release": "patch",
110+
"release": false,
111111
"type": "ci"
112112
},
113113
{
@@ -193,16 +193,16 @@
193193
"gitlab_e2e": "/-/commits/e2e"
194194
},
195195
"conduct": {
196-
"github": "/blob/master/CODE_OF_CONDUCT.md",
197-
"gitlab": "/-/blob/master/CODE_OF_CONDUCT.md"
196+
"github": "/blob/master/docs/CODE_OF_CONDUCT.md",
197+
"gitlab": "/-/blob/master/docs/CODE_OF_CONDUCT.md"
198198
},
199199
"contributing": {
200-
"github": "/blob/master/CONTRIBUTING.md",
201-
"gitlab": "/-/blob/master/CONTRIBUTING.md"
200+
"github": "/blob/master/docs/CONTRIBUTING.md",
201+
"gitlab": "/-/blob/master/docs/CONTRIBUTING.md"
202202
},
203203
"demo": {
204-
"github": "/raw/master/.demo.gif",
205-
"gitlab": "/-/raw/master/.demo.gif"
204+
"github": "/raw/master/docs/demo.gif",
205+
"gitlab": "/-/raw/master/docs/demo.gif"
206206
},
207207
"issues": {
208208
"github": "/issues",

.config/taskfiles/ansible/Taskfile.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -211,9 +211,9 @@ tasks:
211211
212212
prepare:
213213
log:
214-
error: Failed to ensure GitLab and GitHub are in sync
215214
start: Preparing for Ansible Galaxy upload
216215
success: GitLab and GitHub are in sync
216+
error: Failed to ensure GitLab and GitHub are in sync
217217
cmds:
218218
- task: :git:remotes
219219
- git pull origin master
@@ -350,8 +350,8 @@ tasks:
350350
351351
verify:
352352
log:
353-
error: Failed to connect to Ansible Galaxy with provided token
354353
start: Verifying connection can be made to Ansible Galaxy
355354
success: Successfully connected to Ansible Galaxy
355+
error: Failed to connect to Ansible Galaxy with provided token
356356
cmds:
357357
- ansible-galaxy role setup --token "$ANSIBLE_GALAXY_TOKEN" null null null null --list > /dev/null

.config/taskfiles/docker/Taskfile-update.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,5 +93,6 @@ tasks:
9393
sed -i "s^.*org.opencontainers.image.description.*^LABEL org.opencontainers.image.description=${DESCRIPTION}^g" Dockerfile
9494
- sed -i "s^.*org.opencontainers.image.documentation.*^LABEL org.opencontainers.image.documentation={{.GROUP_URL}}/{{.REPOSITORY_SUBTYPE}}/{{.SLUG}}/-/blob/master/README.md\"^g" Dockerfile
9595
- sed -i "s^.*org.opencontainers.image.source.\*^LABEL org.opencontainers.image.source={{.GROUP_URL}}/{{.REPOSITORY_SUBTYPE}}/{{.SLUG}}.git\"^g" Dockerfile
96+
9697
# yamllint enable rule:line-length
9798
# eslint-enable max-len

.config/taskfiles/fix/Taskfile.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,9 +268,9 @@ tasks:
268268
**Example fixing specific `.xml` file(s):**
269269
`task fix:xml -- 'file_name.xml'`
270270
log:
271-
error: Errors were reported by ESLint when auto-fixing XML
272271
start: Attempting to auto-fix any XML files with ESLint
273272
success: Any XML files present in the project were successfully fixed/validated by ESLint
273+
error: Errors were reported by ESLint when auto-fixing XML
274274
cmds:
275275
- '{{.NPX_HANDLE}}eslint -c package.json --no-eslintrc --cache --cache-location .cache/eslintcache --fix
276276
--format pretty --ext .xml {{if .CLI_ARGS}}{{.CLI_ARGS}}{{else}}.{{end}}'

.config/taskfiles/git/Taskfile-github.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ tasks:
1818
sh: if [[ $(jq -r '.private' package.json) == 'true' ]]; then echo '--private'; else echo '--public'; fi
1919
run: once
2020
log:
21-
error: Error while ensuring GitHub repository exists
2221
start: Checking for presence of GitHub repository and creating one if it does not exist
2322
success: Ensure GitHub repository is present
23+
error: Error while ensuring GitHub repository exists
2424
cmds:
2525
- cmd: gh repo create "{{.GITHUB_SLUG}}" --enable-wiki={{.GITHUB_WIKI}} -y --description "{{.EMOJI_START}}{{.DESCRIPTION}}{{.EMOJI_END}}"
2626
--homepage "{{.HOMEPAGE}}" {{.PROJECT_TYPE}} > /dev/null
@@ -49,9 +49,9 @@ tasks:
4949
PROJECT_ID:
5050
sh: gh repo view --json id | jq -r '.id'
5151
log:
52-
error: Failed to add GitHub project ID to package.json
5352
start: Saving GitHub project ID to package.json
5453
success: Added GitHub project ID to package.json
54+
error: Failed to add GitHub project ID to package.json
5555
cmds:
5656
- TMP="$(mktemp)" && jq --arg projectId "{{.PROJECT_ID}}" '.blueprint.github_id = $projectId' package.json > "$TMP" && mv "$TMP" package.json
5757
status:
@@ -78,9 +78,9 @@ tasks:
7878
PRIVATE:
7979
sh: jq -r '.private' package.json | sed 's/null/false/'
8080
log:
81-
error: Error while updating GitHub repository metadata
8281
start: Updating GitHub project metadata
8382
success: Updated GitHub repository metadata
83+
error: Error while updating GitHub repository metadata
8484
cmds:
8585
- |
8686
OPTIONAL_TAGS="$(jq '.keywords' .config/common-keywords.json)"
@@ -125,9 +125,9 @@ tasks:
125125
- :install:software:gh
126126
- create
127127
log:
128-
error: Error setting GitHub Actions Ansible Galaxy token
129128
start: Setting GitHub Actions Ansible Galaxy token
130129
success: GitHub Actions Ansible Galaxy token set
130+
error: Error setting GitHub Actions Ansible Galaxy token
131131
cmds:
132132
- gh secret set ANSIBLE_GALAXY_TOKEN -b "$ANSIBLE_GALAXY_TOKEN"
133133
status:

.config/taskfiles/git/Taskfile-gitlab.yml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ tasks:
1818
sh: glab api projects/:fullpath/access_tokens | jq -r '.[] | select(.name=="PROJECT_CI_ACCESS_TOKENX") | .id'
1919
run: once
2020
log:
21-
error: Failed to configure project-specific access token
2221
start: Configuring project-specific access token
2322
success: Configured project-specific access token
23+
error: Failed to configure project-specific access token
2424
cmds:
2525
- |
2626
curl -sSL --request POST --header "PRIVATE-TOKEN: $GITLAB_TOKEN" --header \
@@ -38,9 +38,9 @@ tasks:
3838
sh: glab api projects/:fullpath | jq '.id'
3939
run: once
4040
log:
41-
error: Error encountered while setting up protected branches
4241
start: Setting up protected branches
4342
success: Set up protected branches
43+
error: Error encountered while setting up protected branches
4444
cmds:
4545
- |
4646
glab api projects/:fullpath/protected_branches -X POST -f name=master -f code_owner_approval_required=true > /dev/null &
@@ -88,9 +88,9 @@ tasks:
8888
sh: mktemp
8989
run: once
9090
log:
91-
error: Encountered error while creating GitLab repository
9291
start: Ensuring GitLab repository has been created
9392
success: Ensured GitLab repository exists
93+
error: Encountered error while creating GitLab repository
9494
cmds:
9595
- cmd: |
9696
NO_PROMPT=1 glab repo create '{{.GITLAB_PATH}}' --group '{{.GITLAB_GROUP}}'
@@ -177,9 +177,9 @@ tasks:
177177
**Example specifying a group and subgroup:**
178178
`task {{.TASK}} -- megabyte-labs/ansible-roles`
179179
log:
180-
error: Encountered error while generating a list of repositories
181180
start: Generating list of repositories
182181
success: List of repositories generated
182+
error: Encountered error while generating a list of repositories
183183
cmds:
184184
- mkdir -p .cache
185185
- rm -f {{.REPOSITORY_LIST}}
@@ -204,9 +204,9 @@ tasks:
204204
- :install:software:jq
205205
- create
206206
log:
207-
error: Error acquiring GitLab project and group IDs
208207
start: Acquiring GitLab project and group IDs
209208
success: Saved GitLab project and group IDs to package.json
209+
error: Error acquiring GitLab project and group IDs
210210
cmds:
211211
- |
212212
API_RES="$(glab api projects/:fullpath)"
@@ -230,9 +230,9 @@ tasks:
230230
- :install:software:glab
231231
- :install:software:jq
232232
log:
233-
error: Error enabling GitLab's GitHub integration
234233
start: Ensuring GitLab's GitHub integration is enabled
235234
success: GitLab's GitHub integration is enabled
235+
error: Error enabling GitLab's GitHub integration
236236
cmds:
237237
- glab api projects/:fullpath/integrations/github -X PUT -f token="$GITHUB_TOKEN"
238238
-f repository_url="$(jq -r '.blueprint.repository.github' package.json)" --silent
@@ -253,9 +253,9 @@ tasks:
253253
PUSH_MIRROR_COUNT:
254254
sh: glab api projects/:fullpath/remote_mirrors | jq '. | length'
255255
log:
256-
error: Error ensuring push/pull mirroring is enabled between GitLab and GitHub
257256
start: Ensuring push/pull mirroring from GitLab to GitHub is set up
258257
success: Push and pull mirroring from GitLab to GitHub are enabled
258+
error: Error ensuring push/pull mirroring is enabled between GitLab and GitHub
259259
cmds:
260260
- |
261261
if [[ "{{.PUSH_MIRROR_COUNT}}" == '0' ]]; then
@@ -280,9 +280,9 @@ tasks:
280280
PIPELINE_COUNT:
281281
sh: jq -r '.gitlab_pipelines | length' .variables.json
282282
log:
283-
error: Error setting up GitLab pipelines
284283
start: Ensuring GitLab pipelines are set up according to the configuration
285284
success: GitLab pipelines are set up
285+
error: Error setting up GitLab pipelines
286286
cmds:
287287
- |
288288
PIPELINES="$(jq -r '.gitlab_pipelines' .variables.json)"
@@ -308,9 +308,9 @@ tasks:
308308
deps:
309309
- create
310310
log:
311-
error: Error clearing GitLab pipelines
312311
start: Clearing GitLab pipelines
313312
success: Cleared GitLab pipelines
313+
error: Error clearing GitLab pipelines
314314
cmds:
315315
- |
316316
TMP="$(mktemp)"
@@ -358,9 +358,9 @@ tasks:
358358
TEST_COVERAGE_REGEX:
359359
sh: jq -r '.build_coverage_regex' .variables.json | sed 's/^null$//'
360360
log:
361-
error: Error ensuring GitLab metadata is up-to-date
362361
start: Ensuring GitLab metadata is up-to-date
363362
success: GitLab metadata is up-to-date
363+
error: Error ensuring GitLab metadata is up-to-date
364364
cmds:
365365
- |
366366
KEYWORDS="$(jq -r '.keywords | tostring' package.json | sed 's/\[//' | sed 's/\]//' | sed 's/"//g')"
@@ -387,9 +387,9 @@ tasks:
387387
DOCS_URL:
388388
sh: jq -r '.docs.link' .variables.json
389389
log:
390-
error: Failed to update GitLab wiki settings
391390
start: Setting GitLab wiki settings
392391
success: GitLab wiki settings are up-to-date
392+
error: Failed to update GitLab wiki settings
393393
cmds:
394394
- glab api projects/:fullpath/services/external-wiki -X PUT -f external_wiki_url="{{.DOCS_URL}}" --silent
395395
status:

0 commit comments

Comments
 (0)