@xcelera/cli 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.devcontainer/devcontainer.json +41 -0
- package/.env.example +61 -0
- package/.gitattributes +3 -0
- package/.github/dependabot.yml +30 -0
- package/.github/workflows/check-dist.yml +72 -0
- package/.github/workflows/ci.yml +65 -0
- package/.github/workflows/codeql-analysis.yml +48 -0
- package/.github/workflows/licensed.yml +74 -0
- package/.github/workflows/linter.yml +53 -0
- package/.licensed.yml +18 -0
- package/.licenses/npm/@actions/core.dep.yml +20 -0
- package/.licenses/npm/@actions/exec.dep.yml +20 -0
- package/.licenses/npm/@actions/http-client.dep.yml +32 -0
- package/.licenses/npm/@actions/io.dep.yml +20 -0
- package/.licenses/npm/@fastify/busboy.dep.yml +30 -0
- package/.licenses/npm/tunnel.dep.yml +35 -0
- package/.licenses/npm/undici.dep.yml +34 -0
- package/.markdown-lint.yml +24 -0
- package/.node-version +1 -0
- package/.nvmrc +1 -0
- package/.prettierignore +5 -0
- package/.prettierrc.yml +16 -0
- package/.vscode/launch.json +15 -0
- package/.yaml-lint.yml +14 -0
- package/CODEOWNERS +7 -0
- package/LICENSE +21 -0
- package/README.md +30 -0
- package/action.yml +29 -0
- package/badges/coverage.svg +1 -0
- package/dist/action.js +31290 -0
- package/dist/action.js.map +1 -0
- package/dist/cli.js +95 -0
- package/eslint.config.mjs +81 -0
- package/jest.config.js +40 -0
- package/package.json +76 -0
- package/rollup.config.ts +30 -0
- package/script/release +133 -0
- package/src/action.ts +35 -0
- package/src/api.ts +46 -0
- package/src/cli.ts +84 -0
- package/src/git.ts +66 -0
- package/src/types/git.ts +5 -0
- package/src/types/parse-github-url.d.ts +12 -0
- package/tsconfig.base.json +23 -0
- package/tsconfig.eslint.json +17 -0
- package/tsconfig.json +11 -0
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# See: https://github.com/DavidAnson/markdownlint
|
|
2
|
+
|
|
3
|
+
# Unordered list style
|
|
4
|
+
MD004:
|
|
5
|
+
style: dash
|
|
6
|
+
|
|
7
|
+
# Disable line length for tables
|
|
8
|
+
MD013:
|
|
9
|
+
tables: false
|
|
10
|
+
|
|
11
|
+
# Ordered list item prefix
|
|
12
|
+
MD029:
|
|
13
|
+
style: one
|
|
14
|
+
|
|
15
|
+
# Spaces after list markers
|
|
16
|
+
MD030:
|
|
17
|
+
ul_single: 1
|
|
18
|
+
ol_single: 1
|
|
19
|
+
ul_multi: 1
|
|
20
|
+
ol_multi: 1
|
|
21
|
+
|
|
22
|
+
# Code block style
|
|
23
|
+
MD046:
|
|
24
|
+
style: fenced
|
package/.node-version
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
20.18.1
|
package/.nvmrc
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
20.18.1
|
package/.prettierignore
ADDED
package/.prettierrc.yml
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# See: https://prettier.io/docs/en/configuration
|
|
2
|
+
|
|
3
|
+
printWidth: 80
|
|
4
|
+
tabWidth: 2
|
|
5
|
+
useTabs: false
|
|
6
|
+
semi: false
|
|
7
|
+
singleQuote: true
|
|
8
|
+
quoteProps: as-needed
|
|
9
|
+
jsxSingleQuote: false
|
|
10
|
+
trailingComma: none
|
|
11
|
+
bracketSpacing: true
|
|
12
|
+
bracketSameLine: true
|
|
13
|
+
arrowParens: always
|
|
14
|
+
proseWrap: always
|
|
15
|
+
htmlWhitespaceSensitivity: css
|
|
16
|
+
endOfLine: lf
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": "0.2.0",
|
|
3
|
+
"configurations": [
|
|
4
|
+
{
|
|
5
|
+
"name": "Debug Action",
|
|
6
|
+
"type": "node",
|
|
7
|
+
"request": "launch",
|
|
8
|
+
"runtimeExecutable": "npx",
|
|
9
|
+
"cwd": "${workspaceRoot}",
|
|
10
|
+
"args": ["@github/local-action", ".", "src/action.ts", ".env"],
|
|
11
|
+
"console": "integratedTerminal",
|
|
12
|
+
"skipFiles": ["<node_internals>/**", "node_modules/**"]
|
|
13
|
+
}
|
|
14
|
+
]
|
|
15
|
+
}
|
package/.yaml-lint.yml
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# See: https://yamllint.readthedocs.io/en/stable/
|
|
2
|
+
|
|
3
|
+
rules:
|
|
4
|
+
document-end: disable
|
|
5
|
+
document-start:
|
|
6
|
+
level: warning
|
|
7
|
+
present: false
|
|
8
|
+
line-length:
|
|
9
|
+
level: warning
|
|
10
|
+
max: 80
|
|
11
|
+
allow-non-breakable-words: true
|
|
12
|
+
allow-non-breakable-inline-mappings: true
|
|
13
|
+
ignore:
|
|
14
|
+
- .licenses/
|
package/CODEOWNERS
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
############################################################################
|
|
2
|
+
# Repository CODEOWNERS #
|
|
3
|
+
# Order is important! The last matching pattern takes the most precedence. #
|
|
4
|
+
############################################################################
|
|
5
|
+
|
|
6
|
+
# Default owners, unless a later match takes precedence.
|
|
7
|
+
* @ztsmith
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright GitHub
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# xcelera CLI
|
|
2
|
+
|
|
3
|
+
A CLI for running Lighthouse performance audits using xcelera.dev
|
|
4
|
+
|
|
5
|
+
## Usage
|
|
6
|
+
|
|
7
|
+
### GitHub Action Usage
|
|
8
|
+
|
|
9
|
+
```yaml
|
|
10
|
+
- name: Lighthouse Performance Audit
|
|
11
|
+
uses: xcelera/cli@v1
|
|
12
|
+
with:
|
|
13
|
+
url: https://example.com
|
|
14
|
+
token: ${{ secrets.XCELERA_TOKEN }}
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## Setup
|
|
18
|
+
|
|
19
|
+
### 1. Get Your API Token
|
|
20
|
+
|
|
21
|
+
1. Go to [Xcelera Settings](https://xcelera.dev/settings/api-tokens)
|
|
22
|
+
2. Create a new API token
|
|
23
|
+
3. Copy the token value
|
|
24
|
+
|
|
25
|
+
### 2. Add Token to GitHub Secrets
|
|
26
|
+
|
|
27
|
+
1. Go to your repository settings
|
|
28
|
+
2. Navigate to "Secrets and variables" → "Actions"
|
|
29
|
+
3. Create a new repository secret named `XCELERA_TOKEN`
|
|
30
|
+
4. Paste your API token as the value
|
package/action.yml
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
name: xcelera performance audit
|
|
2
|
+
description:
|
|
3
|
+
Perform a performance audit of a web page using Xcelera's Lighthouse testing
|
|
4
|
+
service
|
|
5
|
+
author: xcelera.dev
|
|
6
|
+
|
|
7
|
+
branding:
|
|
8
|
+
icon: zap
|
|
9
|
+
color: yellow
|
|
10
|
+
|
|
11
|
+
inputs:
|
|
12
|
+
url:
|
|
13
|
+
description: The URL of the web page to audit
|
|
14
|
+
required: true
|
|
15
|
+
token:
|
|
16
|
+
description: Xcelera API token for authentication
|
|
17
|
+
required: true
|
|
18
|
+
|
|
19
|
+
outputs:
|
|
20
|
+
auditId:
|
|
21
|
+
description: The ID of the scheduled test
|
|
22
|
+
status:
|
|
23
|
+
description: The status of the audit request (scheduled, failed)
|
|
24
|
+
error:
|
|
25
|
+
description: The error message if the audit request fails
|
|
26
|
+
|
|
27
|
+
runs:
|
|
28
|
+
using: node20
|
|
29
|
+
main: dist/action.js
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="136" height="20" role="img" aria-label="Coverage: Unknown%"><title>Coverage: Unknown%</title><linearGradient id="s" x2="0" y2="100%"><stop offset="0" stop-color="#bbb" stop-opacity=".1"/><stop offset="1" stop-opacity=".1"/></linearGradient><clipPath id="r"><rect width="136" height="20" rx="3" fill="#fff"/></clipPath><g clip-path="url(#r)"><rect width="63" height="20" fill="#555"/><rect x="63" width="73" height="20" fill="#4c1"/><rect width="136" height="20" fill="url(#s)"/></g><g fill="#fff" text-anchor="middle" font-family="Verdana,Geneva,DejaVu Sans,sans-serif" text-rendering="geometricPrecision" font-size="110"><text aria-hidden="true" x="325" y="150" fill="#010101" fill-opacity=".3" transform="scale(.1)" textLength="530">Coverage</text><text x="325" y="140" transform="scale(.1)" fill="#fff" textLength="530">Coverage</text><text aria-hidden="true" x="985" y="150" fill="#010101" fill-opacity=".3" transform="scale(.1)" textLength="630">Unknown%</text><text x="985" y="140" transform="scale(.1)" fill="#fff" textLength="630">Unknown%</text></g></svg>
|