@xcelera/cli 1.2.2 → 1.4.0

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.
Files changed (48) hide show
  1. package/dist/action.js +81 -18
  2. package/dist/action.js.map +1 -1
  3. package/dist/cli.js +94 -19
  4. package/dist/cli.js.map +1 -0
  5. package/package.json +10 -3
  6. package/.commitlintrc.json +0 -3
  7. package/.devcontainer/devcontainer.json +0 -41
  8. package/.env.example +0 -61
  9. package/.gitattributes +0 -3
  10. package/.github/dependabot.yml +0 -30
  11. package/.github/workflows/check-dist.yml +0 -72
  12. package/.github/workflows/ci.yml +0 -70
  13. package/.github/workflows/codeql-analysis.yml +0 -48
  14. package/.github/workflows/licensed.yml +0 -74
  15. package/.github/workflows/linter.yml +0 -53
  16. package/.github/workflows/release.yml +0 -56
  17. package/.licensed.yml +0 -18
  18. package/.licenses/npm/@actions/core.dep.yml +0 -20
  19. package/.licenses/npm/@actions/exec.dep.yml +0 -20
  20. package/.licenses/npm/@actions/http-client.dep.yml +0 -32
  21. package/.licenses/npm/@actions/io.dep.yml +0 -20
  22. package/.licenses/npm/@fastify/busboy.dep.yml +0 -30
  23. package/.licenses/npm/tunnel.dep.yml +0 -35
  24. package/.licenses/npm/undici.dep.yml +0 -34
  25. package/.markdown-lint.yml +0 -24
  26. package/.node-version +0 -1
  27. package/.nvmrc +0 -1
  28. package/.prettierignore +0 -5
  29. package/.prettierrc.yml +0 -16
  30. package/.vscode/launch.json +0 -15
  31. package/.yaml-lint.yml +0 -14
  32. package/CODEOWNERS +0 -7
  33. package/action.yml +0 -29
  34. package/badges/coverage.svg +0 -1
  35. package/eslint.config.mjs +0 -81
  36. package/jest.config.js +0 -40
  37. package/release.config.mjs +0 -12
  38. package/rollup.config.ts +0 -30
  39. package/script/release +0 -133
  40. package/src/action.ts +0 -35
  41. package/src/api.ts +0 -46
  42. package/src/cli.ts +0 -79
  43. package/src/git.ts +0 -66
  44. package/src/types/git.ts +0 -5
  45. package/src/types/parse-github-url.d.ts +0 -12
  46. package/tsconfig.base.json +0 -23
  47. package/tsconfig.eslint.json +0 -18
  48. package/tsconfig.json +0 -11
package/dist/cli.js CHANGED
@@ -3,29 +3,92 @@ import { parseArgs } from 'node:util';
3
3
  import { execSync } from 'node:child_process';
4
4
  import require$$0 from 'url';
5
5
 
6
+ const objectToString = Object.prototype.toString;
7
+
8
+ const isError = value => objectToString.call(value) === '[object Error]';
9
+
10
+ const errorMessages = new Set([
11
+ 'network error', // Chrome
12
+ 'Failed to fetch', // Chrome
13
+ 'NetworkError when attempting to fetch resource.', // Firefox
14
+ 'The Internet connection appears to be offline.', // Safari 16
15
+ 'Load failed', // Safari 17+
16
+ 'Network request failed', // `cross-fetch`
17
+ 'fetch failed', // Undici (Node.js)
18
+ 'terminated', // Undici (Node.js)
19
+ ]);
20
+
21
+ function isNetworkError(error) {
22
+ const isValid = error
23
+ && isError(error)
24
+ && error.name === 'TypeError'
25
+ && typeof error.message === 'string';
26
+
27
+ if (!isValid) {
28
+ return false;
29
+ }
30
+
31
+ // We do an extra check for Safari 17+ as it has a very generic error message.
32
+ // Network errors in Safari have no stack.
33
+ if (error.message === 'Load failed') {
34
+ return error.stack === undefined;
35
+ }
36
+
37
+ return errorMessages.has(error.message);
38
+ }
39
+
6
40
  async function requestAudit(url, token, github) {
7
41
  const apiUrl = `${getApiBaseUrl()}/api/v1/audit`;
8
- const response = await fetch(apiUrl, {
9
- method: 'POST',
10
- headers: {
11
- 'Content-Type': 'application/json',
12
- Authorization: `Bearer ${token}`
13
- },
14
- body: JSON.stringify({
15
- url,
16
- github
17
- })
18
- });
19
- if (!response.ok) {
20
- const errorText = await response.text();
21
- throw new Error(`API request failed: ${response.status} ${response.statusText} - ${errorText}`);
42
+ try {
43
+ const response = await fetch(apiUrl, {
44
+ method: 'POST',
45
+ headers: {
46
+ 'Content-Type': 'application/json',
47
+ Authorization: `Bearer ${token}`
48
+ },
49
+ body: JSON.stringify({
50
+ url,
51
+ github
52
+ })
53
+ });
54
+ if (!response.ok) {
55
+ // handle expected errors
56
+ if (response.headers.get('content-type')?.includes('application/json')) {
57
+ const errorResponse = (await response.json());
58
+ return {
59
+ success: false,
60
+ error: {
61
+ code: response.status,
62
+ message: errorResponse.error,
63
+ details: errorResponse.details
64
+ }
65
+ };
66
+ }
67
+ // handle unexpected errors
68
+ const errorText = await response.text();
69
+ throw new Error(`Operation failed: ${response.status} ${response.statusText} - ${errorText}`);
70
+ }
71
+ const data = (await response.json());
72
+ return {
73
+ success: true,
74
+ data
75
+ };
76
+ }
77
+ catch (error) {
78
+ if (isNetworkError(error)) {
79
+ return {
80
+ success: false,
81
+ error: {
82
+ message: 'Network error',
83
+ details: error.message
84
+ }
85
+ };
86
+ }
87
+ throw error;
22
88
  }
23
- const data = await response.json();
24
- return data;
25
89
  }
26
90
  function getApiBaseUrl() {
27
- if (process.env.NODE_ENV === 'development' ||
28
- process.env.GITHUB_ACTIONS !== 'true') {
91
+ if (process.env.NODE_ENV === 'development') {
29
92
  return 'http://localhost:3000';
30
93
  }
31
94
  return 'https://xcelera.dev';
@@ -287,7 +350,19 @@ if (!token) {
287
350
  }
288
351
  try {
289
352
  const githubContext = inferGitContext();
290
- await requestAudit(url, token, githubContext);
353
+ console.log('🔍 Inferred GitHub context:');
354
+ console.log(` • repository: ${githubContext.owner}/${githubContext.repo}`);
355
+ console.log(` • sha: ${githubContext.sha}`);
356
+ console.log('');
357
+ const response = await requestAudit(url, token, githubContext);
358
+ if (!response.success) {
359
+ const { message, details, code } = response.error;
360
+ console.error(`❌ Unabled to schedule audit: ${message}`);
361
+ if (details) {
362
+ console.error(`↳ ${code ? `[${code}]: ` : ''}${details}`);
363
+ }
364
+ process.exit(1);
365
+ }
291
366
  console.log('✅ Audit scheduled successfully!');
292
367
  }
293
368
  catch (error) {
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cli.js","sources":["../node_modules/is-network-error/index.js","../src/api.ts","../node_modules/parse-github-url/index.js","../src/git.ts","../src/cli.ts"],"sourcesContent":["const objectToString = Object.prototype.toString;\n\nconst isError = value => objectToString.call(value) === '[object Error]';\n\nconst errorMessages = new Set([\n\t'network error', // Chrome\n\t'Failed to fetch', // Chrome\n\t'NetworkError when attempting to fetch resource.', // Firefox\n\t'The Internet connection appears to be offline.', // Safari 16\n\t'Load failed', // Safari 17+\n\t'Network request failed', // `cross-fetch`\n\t'fetch failed', // Undici (Node.js)\n\t'terminated', // Undici (Node.js)\n]);\n\nexport default function isNetworkError(error) {\n\tconst isValid = error\n\t\t&& isError(error)\n\t\t&& error.name === 'TypeError'\n\t\t&& typeof error.message === 'string';\n\n\tif (!isValid) {\n\t\treturn false;\n\t}\n\n\t// We do an extra check for Safari 17+ as it has a very generic error message.\n\t// Network errors in Safari have no stack.\n\tif (error.message === 'Load failed') {\n\t\treturn error.stack === undefined;\n\t}\n\n\treturn errorMessages.has(error.message);\n}\n","import isNetworkError from 'is-network-error'\n\nimport type { GitContext } from './types/git.js'\nimport { ApiResponse } from './types/index.js'\n\ntype AuditData = {\n auditId: string\n status: string\n}\n\ntype AuditError = {\n code?: number\n message: string\n details: string\n}\n\ntype AuditResponse = ApiResponse<AuditData, AuditError>\n\nexport async function requestAudit(\n url: string,\n token: string,\n github: GitContext\n): Promise<AuditResponse> {\n const apiUrl = `${getApiBaseUrl()}/api/v1/audit`\n\n try {\n const response = await fetch(apiUrl, {\n method: 'POST',\n headers: {\n 'Content-Type': 'application/json',\n Authorization: `Bearer ${token}`\n },\n body: JSON.stringify({\n url,\n github\n })\n })\n if (!response.ok) {\n // handle expected errors\n if (response.headers.get('content-type')?.includes('application/json')) {\n const errorResponse = (await response.json()) as {\n error: string\n details: string\n }\n return {\n success: false,\n error: {\n code: response.status,\n message: errorResponse.error,\n details: errorResponse.details\n }\n }\n }\n // handle unexpected errors\n const errorText = await response.text()\n throw new Error(\n `Operation failed: ${response.status} ${response.statusText} - ${errorText}`\n )\n }\n\n const data = (await response.json()) as {\n auditId: string\n status: string\n }\n return {\n success: true,\n data\n }\n } catch (error) {\n if (isNetworkError(error)) {\n return {\n success: false,\n error: {\n message: 'Network error',\n details: error.message\n }\n }\n }\n throw error\n }\n}\n\nfunction getApiBaseUrl(): string {\n if (process.env.NODE_ENV === 'development') {\n return 'http://localhost:3000'\n }\n return 'https://xcelera.dev'\n}\n","/*!\n * parse-github-url <https://github.com/jonschlinkert/parse-github-url>\n *\n * Copyright (c) 2015-2017, Jon Schlinkert.\n * Released under the MIT License.\n */\n\n'use strict';\n\nvar url = require('url');\nvar cache = { __proto__: null };\n\nfunction isChecksum(str) {\n\treturn (/^[a-f0-9]{40}$/i).test(str);\n}\n\nfunction getBranch(str, obj) {\n\tvar segs = str.split('#');\n\tvar branch;\n\tif (segs.length > 1) {\n\t\tbranch = segs[segs.length - 1];\n\t}\n\tif (!branch && obj.hash && obj.hash.charAt(0) === '#') {\n\t\tbranch = obj.hash.slice(1);\n\t}\n\treturn branch || 'master';\n}\n\nfunction trimSlash(path) {\n\treturn path.charAt(0) === '/' ? path.slice(1) : path;\n}\n\nfunction name(str) {\n\treturn str ? str.replace(/\\.git$/, '') : null;\n}\n\nfunction owner(str) {\n\tif (!str) {\n\t\treturn null;\n\t}\n\tvar idx = str.indexOf(':');\n\tif (idx > -1) {\n\t\treturn str.slice(idx + 1);\n\t}\n\treturn str;\n}\n\nfunction parse(str) {\n\tif (typeof str !== 'string' || !str.length) {\n\t\treturn null;\n\t}\n\n\tif (str.indexOf('git@gist') !== -1 || str.indexOf('//gist') !== -1) {\n\t\treturn null;\n\t}\n\n\t// parse the URL\n\tvar obj = url.parse(str);\n\tif (typeof obj.path !== 'string' || !obj.path.length || typeof obj.pathname !== 'string' || !obj.pathname.length) {\n\t\treturn null;\n\t}\n\n\tif (!obj.host && (/^git@/).test(str) === true) {\n\t\t// return the correct host for git@ URLs\n\t\tobj.host = url.parse('http://' + str.replace(/git@([^:]+):/, '$1/')).host;\n\t}\n\n\tobj.path = trimSlash(obj.path);\n\tobj.pathname = trimSlash(obj.pathname);\n\tobj.filepath = null;\n\n\tif (obj.path.indexOf('repos') === 0) {\n\t\tobj.path = obj.path.slice(6);\n\t}\n\n\tvar seg = obj.path.split('/').filter(Boolean);\n\tvar hasBlob = seg[2] === 'blob';\n\tif (hasBlob && !isChecksum(seg[3])) {\n\t\tobj.branch = seg[3];\n\t\tif (seg.length > 4) {\n\t\t\tobj.filepath = seg.slice(4).join('/');\n\t\t}\n\t}\n\n\tvar blob = str.indexOf('blob');\n\tif (hasBlob && blob !== -1) {\n\t\tobj.blob = str.slice(blob + 5);\n\t}\n\n\tvar hasTree = seg[2] === 'tree';\n\tvar tree = str.indexOf('tree');\n\tif (hasTree && tree !== -1) {\n\t\tvar idx = tree + 5;\n\t\tvar branch = str.slice(idx);\n\t\tvar slash = branch.indexOf('/');\n\t\tif (slash !== -1) {\n\t\t\tbranch = branch.slice(0, slash);\n\t\t}\n\t\tobj.branch = branch;\n\t}\n\n\tobj.owner = owner(seg[0]);\n\tobj.name = name(seg[1]);\n\n\tif (seg.length > 1 && obj.owner && obj.name) {\n\t\tobj.repo = obj.owner + '/' + obj.name;\n\t} else {\n\t\tvar href = obj.href.split(':');\n\t\tif (href.length === 2 && obj.href.indexOf('//') === -1) {\n\t\t\tobj.repo = obj.repo || href[href.length - 1];\n\t\t\tvar repoSegments = obj.repo.split('/');\n\t\t\tobj.owner = repoSegments[0];\n\t\t\tobj.name = repoSegments[1];\n\n\t\t} else {\n\t\t\tvar match = obj.href.match(/\\/([^/]*)$/);\n\t\t\tobj.owner = match ? match[1] : null;\n\t\t\tobj.repo = null;\n\t\t}\n\n\t\tif (obj.repo && (!obj.owner || !obj.name)) {\n\t\t\tvar segs = obj.repo.split('/');\n\t\t\tif (segs.length === 2) {\n\t\t\t\tobj.owner = segs[0];\n\t\t\t\tobj.name = segs[1];\n\t\t\t}\n\t\t}\n\t}\n\n\tif (!obj.branch) {\n\t\tobj.branch = seg[2] || getBranch(obj.path, obj);\n\t\tif (seg.length > 3) {\n\t\t\tobj.filepath = seg.slice(3).join('/');\n\t\t}\n\t}\n\n\tobj.host = obj.host || 'github.com';\n\tobj.owner = obj.owner || null;\n\tobj.name = obj.name || null;\n\tobj.repository = obj.repo;\n\treturn obj;\n}\n\nmodule.exports = function parseGithubUrl(str) {\n\tif (!cache[str]) {\n\t\tcache[str] = parse(str);\n\t}\n\treturn cache[str];\n};\n","import { execSync } from 'node:child_process'\nimport parseGithubUrl from 'parse-github-url'\nimport type { GitContext } from './types/git.js'\n\nexport function inferGitContext(): GitContext {\n if (!isGitRepository()) {\n throw new Error('Not git repository detected.')\n }\n\n const remoteUrl = getRemoteUrl()\n\n const parsed = parseGithubUrl(remoteUrl)\n if (!parsed || !parsed.owner || !parsed.repo) {\n throw new Error(\n `Could not parse GitHub URL: ${remoteUrl}. Expected format: https://github.com/owner/repo or git@github.com:owner/repo`\n )\n }\n\n const { owner, repo } = parsed\n\n const sha = getCurrentSha()\n\n // repo is parsed as owner/repo but we want to use just the repo name\n const repoName = repo.replace(`${owner}/`, '')\n\n return { owner, repo: repoName, sha }\n}\n\nfunction isGitRepository(): boolean {\n try {\n execSync('git rev-parse --git-dir', { stdio: 'ignore' })\n return true\n } catch {\n return false\n }\n}\n\nfunction getRemoteUrl(): string {\n try {\n const remoteUrl = execSync('git remote get-url origin', {\n encoding: 'utf8',\n stdio: 'pipe'\n }).trim()\n\n if (!remoteUrl) {\n throw new Error('No origin remote found')\n }\n\n return remoteUrl\n } catch {\n throw new Error(\n 'Could not determine git remote URL. Please ensure you have an origin remote configured.'\n )\n }\n}\n\nfunction getCurrentSha(): string {\n try {\n return execSync('git rev-parse HEAD', {\n encoding: 'utf8',\n stdio: 'pipe'\n }).trim()\n } catch {\n throw new Error('Could not determine current commit SHA')\n }\n}\n","#!/usr/bin/env node\n\nimport { parseArgs } from 'node:util'\n\nimport { requestAudit } from './api.js'\nimport { inferGitContext } from './git.js'\n\nconst options = {\n url: {\n type: 'string' as const,\n required: true\n },\n token: {\n type: 'string' as const,\n required: true,\n default: process.env.XCELERA_TOKEN\n }\n}\n\nconst { positionals, values } = parseArgs({\n options,\n allowPositionals: true,\n args: process.argv.slice(2)\n})\n\nconst command = positionals[0]\n\nif (!command) {\n console.error('A command is required. Only \"audit\" is currently supported.')\n printHelp()\n process.exit(1)\n}\n\nif (command === 'help') {\n printHelp()\n}\n\nif (command !== 'audit') {\n console.error('Invalid command. Only \"audit\" is currently supported.')\n printHelp()\n process.exit(1)\n}\n\nconst { url, token } = values\n\nif (!url) {\n console.error('URL is required. Use --url <url> to specify the URL to audit.')\n process.exit(1)\n}\n\nif (!token) {\n console.error(\n 'A token is required. Use --token or set XCELERA_TOKEN environment variable.'\n )\n process.exit(1)\n}\n\ntry {\n const githubContext = inferGitContext()\n console.log('🔍 Inferred GitHub context:')\n console.log(` • repository: ${githubContext.owner}/${githubContext.repo}`)\n console.log(` • sha: ${githubContext.sha}`)\n console.log('')\n\n const response = await requestAudit(url, token, githubContext)\n if (!response.success) {\n const { message, details, code } = response.error\n console.error(`❌ Unabled to schedule audit: ${message}`)\n if (details) {\n console.error(`↳ ${code ? `[${code}]: ` : ''}${details}`)\n }\n process.exit(1)\n }\n\n console.log('✅ Audit scheduled successfully!')\n} catch (error) {\n const errorMessage =\n error instanceof Error ? error.message : 'Unknown error occurred'\n console.error(`❌ ${errorMessage}`)\n process.exit(1)\n}\n\nfunction printHelp() {\n console.log('Usage: xcelera audit --url <url> [--token <token>]')\n console.log('')\n console.log('Options:')\n console.log(\n ' --token <token> The xcelera API token to use for authentication.'\n )\n console.log('Can also be set with the XCELERA_TOKEN environment variable.')\n console.log(' --url <url> The URL to audit.')\n console.log('')\n}\n"],"names":["parseGithubUrl"],"mappings":";;;;;AAAA,MAAM,cAAc,GAAG,MAAM,CAAC,SAAS,CAAC,QAAQ;;AAEhD,MAAM,OAAO,GAAG,KAAK,IAAI,cAAc,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,gBAAgB;;AAExE,MAAM,aAAa,GAAG,IAAI,GA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AC,EAAE,CAAC;AACf,IAAA,OAAO,CAAC,GAAG,CAAC,UAAU,CAAC;AACvB,IAAA,OAAO,CAAC,GAAG,CACT,qEAAqE,CACtE;AACD,IAAA,OAAO,CAAC,GAAG,CAAC,8DAA8D,CAAC;AAC3E,IAAA,OAAO,CAAC,GAAG,CAAC,sCAAsC,CAAC;AACnD,IAAA,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC;AACjB","x_google_ignoreList":[0,2]}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@xcelera/cli",
3
3
  "description": "CLI for xcelera.dev",
4
- "version": "1.2.2",
4
+ "version": "1.4.0",
5
5
  "author": "",
6
6
  "type": "module",
7
7
  "repository": {
@@ -21,13 +21,18 @@
21
21
  ".": "./dist/action.js"
22
22
  },
23
23
  "bin": {
24
- "xcelera": "./dist/cli.js"
24
+ "xcelera": "dist/cli.js"
25
25
  },
26
+ "files": [
27
+ "dist",
28
+ "LICENSE",
29
+ "README.md"
30
+ ],
26
31
  "engines": {
27
32
  "node": ">=20"
28
33
  },
29
34
  "scripts": {
30
- "ci-test": "NODE_OPTIONS=--experimental-vm-modules NODE_NO_WARNINGS=1 npx jest --passWithNoTests",
35
+ "bundle": "npm run format:write && npm run package",
31
36
  "coverage": "npx make-coverage-badge --output-path ./badges/coverage.svg",
32
37
  "format:write": "npx prettier --write .",
33
38
  "format:check": "npx prettier --check .",
@@ -41,6 +46,7 @@
41
46
  "license": "MIT",
42
47
  "dependencies": {
43
48
  "@actions/core": "^1.11.1",
49
+ "is-network-error": "^1.1.0",
44
50
  "parse-github-url": "^1.0.3"
45
51
  },
46
52
  "devDependencies": {
@@ -64,6 +70,7 @@
64
70
  "eslint-plugin-prettier": "^5.5.1",
65
71
  "jest": "^30.0.4",
66
72
  "make-coverage-badge": "^1.2.0",
73
+ "msw": "^2.10.5",
67
74
  "prettier": "^3.6.2",
68
75
  "prettier-eslint": "^16.4.2",
69
76
  "rollup": "^4.44.2",
@@ -1,3 +0,0 @@
1
- {
2
- "extends": ["@commitlint/config-conventional"]
3
- }
@@ -1,41 +0,0 @@
1
- {
2
- "name": "GitHub Actions (TypeScript)",
3
- "image": "mcr.microsoft.com/devcontainers/typescript-node:20",
4
- "postCreateCommand": "npm install",
5
- "customizations": {
6
- "codespaces": {
7
- "openFiles": ["README.md"]
8
- },
9
- "vscode": {
10
- "extensions": [
11
- "bierner.markdown-preview-github-styles",
12
- "davidanson.vscode-markdownlint",
13
- "dbaeumer.vscode-eslint",
14
- "esbenp.prettier-vscode",
15
- "github.copilot",
16
- "github.copilot-chat",
17
- "github.vscode-github-actions",
18
- "github.vscode-pull-request-github",
19
- "me-dutour-mathieu.vscode-github-actions",
20
- "redhat.vscode-yaml",
21
- "rvest.vs-code-prettier-eslint",
22
- "yzhang.markdown-all-in-one"
23
- ],
24
- "settings": {
25
- "editor.defaultFormatter": "esbenp.prettier-vscode",
26
- "editor.tabSize": 2,
27
- "editor.formatOnSave": true,
28
- "markdown.extension.list.indentationSize": "adaptive",
29
- "markdown.extension.italic.indicator": "_",
30
- "markdown.extension.orderedList.marker": "one"
31
- }
32
- }
33
- },
34
- "remoteEnv": {
35
- "GITHUB_TOKEN": "${localEnv:GITHUB_TOKEN}"
36
- },
37
- "features": {
38
- "ghcr.io/devcontainers/features/github-cli:1": {},
39
- "ghcr.io/devcontainers-community/npm-features/prettier:1": {}
40
- }
41
- }
package/.env.example DELETED
@@ -1,61 +0,0 @@
1
- # dotenv-linter:off IncorrectDelimiter
2
-
3
- # Do not commit your actual .env file to Git! This may contain secrets or other
4
- # private information.
5
-
6
- # Enable/disable step debug logging (default: `false`). For local debugging, it
7
- # may be useful to set it to `true`.
8
- ACTIONS_STEP_DEBUG=true
9
-
10
- # GitHub Actions inputs should follow `INPUT_<name>` format (case-sensitive).
11
- # Hyphens should not be converted to underscores!
12
- INPUT_MILLISECONDS=2400
13
-
14
- # GitHub Actions default environment variables. These are set for every run of a
15
- # workflow and can be used in your actions. Setting the value here will override
16
- # any value set by the local-action tool.
17
- # https://docs.github.com/en/actions/learn-github-actions/variables#default-environment-variables
18
-
19
- # CI="true"
20
- # GITHUB_ACTION=""
21
- # GITHUB_ACTION_PATH=""
22
- # GITHUB_ACTION_REPOSITORY=""
23
- # GITHUB_ACTIONS=""
24
- # GITHUB_ACTOR=""
25
- # GITHUB_ACTOR_ID=""
26
- # GITHUB_API_URL=""
27
- # GITHUB_BASE_REF=""
28
- # GITHUB_ENV=""
29
- # GITHUB_EVENT_NAME=""
30
- # GITHUB_EVENT_PATH=""
31
- # GITHUB_GRAPHQL_URL=""
32
- # GITHUB_HEAD_REF=""
33
- # GITHUB_JOB=""
34
- # GITHUB_OUTPUT=""
35
- # GITHUB_PATH=""
36
- # GITHUB_REF=""
37
- # GITHUB_REF_NAME=""
38
- # GITHUB_REF_PROTECTED=""
39
- # GITHUB_REF_TYPE=""
40
- # GITHUB_REPOSITORY=""
41
- # GITHUB_REPOSITORY_ID=""
42
- # GITHUB_REPOSITORY_OWNER=""
43
- # GITHUB_REPOSITORY_OWNER_ID=""
44
- # GITHUB_RETENTION_DAYS=""
45
- # GITHUB_RUN_ATTEMPT=""
46
- # GITHUB_RUN_ID=""
47
- # GITHUB_RUN_NUMBER=""
48
- # GITHUB_SERVER_URL=""
49
- # GITHUB_SHA=""
50
- # GITHUB_STEP_SUMMARY=""
51
- # GITHUB_TRIGGERING_ACTOR=""
52
- # GITHUB_WORKFLOW=""
53
- # GITHUB_WORKFLOW_REF=""
54
- # GITHUB_WORKFLOW_SHA=""
55
- # GITHUB_WORKSPACE=""
56
- # RUNNER_ARCH=""
57
- # RUNNER_DEBUG=""
58
- # RUNNER_NAME=""
59
- # RUNNER_OS=""
60
- # RUNNER_TEMP=""
61
- # RUNNER_TOOL_CACHE=""
package/.gitattributes DELETED
@@ -1,3 +0,0 @@
1
- * text=auto eol=lf
2
-
3
- dist/** -diff linguist-generated=true
@@ -1,30 +0,0 @@
1
- version: 2
2
- updates:
3
- - package-ecosystem: github-actions
4
- directory: /
5
- schedule:
6
- interval: weekly
7
- groups:
8
- actions-minor:
9
- update-types:
10
- - minor
11
- - patch
12
-
13
- - package-ecosystem: npm
14
- directory: /
15
- schedule:
16
- interval: weekly
17
- ignore:
18
- - dependency-name: '@types/node'
19
- update-types:
20
- - 'version-update:semver-major'
21
- groups:
22
- npm-development:
23
- dependency-type: development
24
- update-types:
25
- - minor
26
- - patch
27
- npm-production:
28
- dependency-type: production
29
- update-types:
30
- - patch
@@ -1,72 +0,0 @@
1
- # In TypeScript actions, `dist/` is a special directory. When you reference
2
- # an action with the `uses:` property, `dist/action.js` is the code that will be
3
- # run. For this project, the `dist/action.js` file is transpiled from other
4
- # source files. This workflow ensures the `dist/` directory contains the
5
- # expected transpiled code.
6
- #
7
- # If this workflow is run from a feature branch, it will act as an additional CI
8
- # check and fail if the checked-in `dist/` directory does not match what is
9
- # expected from the build.
10
- name: Check Transpiled JavaScript
11
-
12
- on:
13
- pull_request:
14
- branches:
15
- - main
16
- push:
17
- branches:
18
- - main
19
-
20
- permissions:
21
- contents: read
22
-
23
- jobs:
24
- check-dist:
25
- name: Check dist/
26
- runs-on: ubuntu-latest
27
-
28
- steps:
29
- - name: Checkout
30
- id: checkout
31
- uses: actions/checkout@v4
32
-
33
- - name: Setup Node.js
34
- id: setup-node
35
- uses: actions/setup-node@v4
36
- with:
37
- node-version-file: .node-version
38
- cache: npm
39
-
40
- - name: Install Dependencies
41
- id: install
42
- run: npm ci
43
-
44
- - name: Build dist/ Directory
45
- id: build
46
- run: npm run bundle
47
-
48
- # This will fail the workflow if the `dist/` directory is different than
49
- # expected.
50
- - name: Compare Directories
51
- id: diff
52
- run: |
53
- if [ ! -d dist/ ]; then
54
- echo "Expected dist/ directory does not exist. See status below:"
55
- ls -la ./
56
- exit 1
57
- fi
58
- if [ "$(git diff --ignore-space-at-eol --text dist/ | wc -l)" -gt "0" ]; then
59
- echo "Detected uncommitted changes after build. See status below:"
60
- git diff --ignore-space-at-eol --text dist/
61
- exit 1
62
- fi
63
-
64
- # If `dist/` was different than expected, upload the expected version as a
65
- # workflow artifact.
66
- - if: ${{ failure() && steps.diff.outcome == 'failure' }}
67
- name: Upload Artifact
68
- id: upload
69
- uses: actions/upload-artifact@v4
70
- with:
71
- name: dist
72
- path: dist/
@@ -1,70 +0,0 @@
1
- name: Continuous Integration
2
-
3
- on:
4
- pull_request:
5
- branches:
6
- - main
7
- push:
8
- branches:
9
- - main
10
-
11
- permissions:
12
- contents: read
13
-
14
- jobs:
15
- test-typescript:
16
- name: TypeScript Tests
17
- runs-on: ubuntu-latest
18
-
19
- steps:
20
- - name: Checkout
21
- id: checkout
22
- uses: actions/checkout@v4
23
-
24
- - name: Setup Node.js
25
- id: setup-node
26
- uses: actions/setup-node@v4
27
- with:
28
- node-version-file: .node-version
29
- cache: npm
30
-
31
- - name: Install Dependencies
32
- id: npm-ci
33
- run: npm ci
34
-
35
- - name: Check Format
36
- id: npm-format-check
37
- run: npm run format:check
38
-
39
- - name: Lint
40
- id: npm-lint
41
- run: npm run lint
42
-
43
- - name: Test
44
- id: npm-ci-test
45
- run: npm run ci-test
46
-
47
- test-action:
48
- name: GitHub Actions Test
49
- runs-on: ubuntu-latest
50
- permissions:
51
- contents: write # to be able to publish a GitHub release
52
- issues: write # to be able to comment on released issues
53
- pull-requests: write # to be able to comment on released pull requests
54
- id-token: write # to enable use of OIDC for npm provenance
55
-
56
- steps:
57
- - name: Checkout
58
- id: checkout
59
- uses: actions/checkout@v4
60
-
61
- - name: Test Local Action
62
- id: test-action
63
- uses: ./
64
- with:
65
- url: https://xcelera.dev
66
- token: ${{ secrets.XCELERA_TOKEN }}
67
-
68
- - name: Print Output
69
- id: output
70
- run: echo "${{ steps.test-action.outputs.status }}"
@@ -1,48 +0,0 @@
1
- name: CodeQL
2
-
3
- on:
4
- pull_request:
5
- branches:
6
- - main
7
- push:
8
- branches:
9
- - main
10
- schedule:
11
- - cron: '31 7 * * 3'
12
-
13
- permissions:
14
- actions: read
15
- checks: write
16
- contents: read
17
- security-events: write
18
-
19
- jobs:
20
- analyze:
21
- name: Analyze
22
- runs-on: ubuntu-latest
23
-
24
- strategy:
25
- fail-fast: false
26
- matrix:
27
- language:
28
- - TypeScript
29
-
30
- steps:
31
- - name: Checkout
32
- id: checkout
33
- uses: actions/checkout@v4
34
-
35
- - name: Initialize CodeQL
36
- id: initialize
37
- uses: github/codeql-action/init@v3
38
- with:
39
- languages: ${{ matrix.language }}
40
- source-root: src
41
-
42
- - name: Autobuild
43
- id: autobuild
44
- uses: github/codeql-action/autobuild@v3
45
-
46
- - name: Perform CodeQL Analysis
47
- id: analyze
48
- uses: github/codeql-action/analyze@v3
@@ -1,74 +0,0 @@
1
- # This workflow checks the statuses of cached dependencies used in this action
2
- # with the help of the Licensed tool. If any licenses are invalid or missing,
3
- # this workflow will fail. See: https://github.com/licensee/licensed
4
-
5
- name: Licensed
6
-
7
- on:
8
- # Uncomment the below lines to run this workflow on pull requests and pushes
9
- # to the default branch. This is useful for checking licenses before merging
10
- # changes into the default branch.
11
- # pull_request:
12
- # branches:
13
- # - main
14
- # push:
15
- # branches:
16
- # - main
17
- workflow_dispatch:
18
-
19
- permissions:
20
- contents: write
21
-
22
- jobs:
23
- licensed:
24
- name: Check Licenses
25
- runs-on: ubuntu-latest
26
-
27
- steps:
28
- - name: Checkout
29
- id: checkout
30
- uses: actions/checkout@v4
31
-
32
- - name: Setup Node.js
33
- id: setup-node
34
- uses: actions/setup-node@v4
35
- with:
36
- node-version-file: .node-version
37
- cache: npm
38
-
39
- - name: Install Dependencies
40
- id: npm-ci
41
- run: npm ci
42
-
43
- - name: Setup Ruby
44
- id: setup-ruby
45
- uses: ruby/setup-ruby@v1
46
- with:
47
- ruby-version: ruby
48
-
49
- - uses: licensee/setup-licensed@v1.3.2
50
- with:
51
- version: 4.x
52
- github_token: ${{ secrets.GITHUB_TOKEN }}
53
-
54
- # If this is a workflow_dispatch event, update the cached licenses.
55
- - if: ${{ github.event_name == 'workflow_dispatch' }}
56
- name: Update Licenses
57
- id: update-licenses
58
- run: licensed cache
59
-
60
- # Then, commit the updated licenses to the repository.
61
- - if: ${{ github.event_name == 'workflow_dispatch' }}
62
- name: Commit Licenses
63
- id: commit-licenses
64
- run: |
65
- git config --local user.email "licensed-ci@users.noreply.github.com"
66
- git config --local user.name "licensed-ci"
67
- git add .
68
- git commit -m "Auto-update license files"
69
- git push
70
-
71
- # Last, check the status of the cached licenses.
72
- - name: Check Licenses
73
- id: check-licenses
74
- run: licensed status