Skip to content

Commit

Permalink
Merge pull request #3 from algorandfoundation/dist
Browse files Browse the repository at this point in the history
Dist
  • Loading branch information
SudoWeezy authored Sep 11, 2024
2 parents 988f85c + 8e23905 commit f75debb
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 23 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ jobs:
fetch-depth: 0

- name: Setup
uses: actions/setup-node@094c36e88e2a3ffdf4d3a5bb935088ac39a46acc
uses: actions/setup-node@main
with:
node-version: 16
node-version: 20

- name: Install
run: npm ci
Expand Down
Binary file modified dist/arcw_lint_js_bg.wasm
Binary file not shown.
22 changes: 10 additions & 12 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ ${val.stack}`;
getInt32Memory0()[arg0 / 4 + 1] = len0;
getInt32Memory0()[arg0 / 4 + 0] = ptr0;
};
module2.exports.__wbg_readFile_95feebe794c92b99 = function() {
module2.exports.__wbg_readFile_994689c073ed9f84 = function() {
return handleError(function(arg0, arg1) {
const ret = readFile(getObject(arg0), getObject(arg1));
return addHeapObject(ret);
Expand Down Expand Up @@ -9371,27 +9371,25 @@ var import_github = __toESM(require_github(), 1);
var import_utils = __toESM(require_utils4(), 1);
var import_plugin_throttling = __toESM(require_dist_node11(), 1);
async function main() {
var _a, _b, _c, _d;
try {
const ThrottledOctokit = import_utils.GitHub.plugin(import_plugin_throttling.throttling);
const context = import_github.default.context;
const githubToken = import_core.default.getInput("token");
const throttle = {
onRateLimit: (retryAfter, options) => {
var _a2;
const method = (options == null ? void 0 : options.method) || "<unknown>";
const url = (options == null ? void 0 : options.url) || "<unknown>";
const method = options?.method || "<unknown>";
const url = options?.url || "<unknown>";
octokit.log.warn(
`Request quota exhausted for request ${method} ${url}`
);
if (((_a2 = options == null ? void 0 : options.request) == null ? void 0 : _a2.retryCount) <= 2) {
if (options?.request?.retryCount <= 2) {
console.log(`Retrying after ${retryAfter} seconds!`);
return true;
}
},
onSecondaryRateLimit: (_retryAfter, options) => {
const method = (options == null ? void 0 : options.method) || "<unknown>";
const url = (options == null ? void 0 : options.url) || "<unknown>";
const method = options?.method || "<unknown>";
const url = options?.url || "<unknown>";
octokit.log.warn(`Abuse detected for request ${method} ${url}`);
}
};
Expand Down Expand Up @@ -9447,23 +9445,23 @@ async function main() {
try {
formatted = arcw.format(snippet);
} catch {
formatted = (_a = snippet.title) == null ? void 0 : _a.label;
formatted = snippet.title?.label;
if (!formatted) {
formatted = "<failed to render diagnostic, this is a bug in arcw>";
}
}
let lineNumber = null;
let file = null;
if (((_b = snippet.slices) == null ? void 0 : _b.length) > 0) {
if (snippet.slices?.length > 0) {
lineNumber = snippet.slices[0].line_start;
file = snippet.slices[0].origin;
}
const properties = {
title: (_c = snippet.title) == null ? void 0 : _c.label,
title: snippet.title?.label,
startLine: lineNumber,
file
};
switch ((_d = snippet.title) == null ? void 0 : _d.annotation_type) {
switch (snippet.title?.annotation_type) {
case "Help":
case "Note":
case "Info":
Expand Down
17 changes: 10 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 5 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"main": "dist/index.js",
"type": "module",
"scripts": {
"build": "esbuild src/main.ts --bundle --platform=node --target=node16 --outfile=dist/index.js && shx cp node_modules/arcw-lint-js/arcw_lint_js_bg.wasm dist && echo { \"type\": \"commonjs\" } > dist/package.json",
"build": "esbuild src/main.ts --bundle --platform=node --target=node20 --outfile=dist/index.js && shx cp node_modules/arcw-lint-js/arcw_lint_js_bg.wasm dist && echo { \"type\": \"commonjs\" } > dist/package.json",
"test": "prettier --check src/**/*.ts",
"format": "prettier --write src/**/*.ts"
},
Expand All @@ -17,13 +17,16 @@
"@actions/github": "^5.0.3",
"@octokit/plugin-throttling": "^4.1.0",
"@octokit/webhooks-types": "^6.2.2",
"arcw-lint-js": "^0.1.14",
"arcw-lint-js": "^0.1.15",
"tr46": "^3.0.0"
},
"devDependencies": {
"esbuild": "0.15.5",
"prettier": "^2.7.1",
"shx": "^0.3.4",
"typescript": "^4.7.4"
},
"engines": {
"node": ">=20"
}
}

0 comments on commit f75debb

Please sign in to comment.