Skip to content

Commit

Permalink
build: update dist files
Browse files Browse the repository at this point in the history
  • Loading branch information
Rubilmax committed Feb 1, 2023
1 parent 47da4e7 commit a1a16e7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
8 changes: 5 additions & 3 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -457,7 +457,7 @@ async function run() {
});
if (diffs.length > 0) {
core.info(`Parse source code`);
const cmpDef = (0, input_1.parseSource)(contract);
const cmpDef = (0, input_1.parseSource)(contract, workingDirectory);
const formattedDiffs = diffs.map((diff) => {
const formattedDiff = (0, format_1.formatDiff)(cmpDef, diff);
const title = format_1.diffTitles[formattedDiff.type];
Expand Down Expand Up @@ -524,6 +524,7 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.parseSource = exports.parseLayout = exports.createLayout = void 0;
const child_process_1 = __nccwpck_require__(2081);
const fs_1 = __importDefault(__nccwpck_require__(7147));
const path_1 = __nccwpck_require__(1017);
const parser = __importStar(__nccwpck_require__(4834));
const exactify = (variable) => ({
...variable,
Expand Down Expand Up @@ -558,8 +559,9 @@ const parseLayout = (content) => {
}
};
exports.parseLayout = parseLayout;
const parseSource = (contract) => {
const [path, contractName] = contract.split(":");
const parseSource = (contract, cwd = "") => {
const [relPath, contractName] = contract.split(":");
const path = (0, path_1.join)(cwd, relPath);
const { children, tokens = [] } = parser.parse(fs_1.default.readFileSync(path, { encoding: "utf-8" }), {
tolerant: true,
tokens: true,
Expand Down
2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

0 comments on commit a1a16e7

Please sign in to comment.