Skip to content

Commit

Permalink
fix actions contents formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
TimurRin committed Jul 15, 2024
1 parent aac41a6 commit 132abc8
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 18 deletions.
7 changes: 5 additions & 2 deletions src/actions/nodejs-sea.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,12 +58,15 @@ const buildCrossPlatform = function () {
const nodeBinaryPath = process.execPath;
const baseName = "app";
const destinationPath = path.join(BUILD_DIR, isWindows ? \`\${baseName}.exe\` : baseName);
const destinationPath = path.join(
BUILD_DIR,
isWindows ? \`\${baseName}.exe\` : baseName,
);
fs.copyFileSync(nodeBinaryPath, destinationPath);
const postjectCommandBase = \`npx postject \${destinationPath} NODE_SEA_BLOB \${path.join(BUILD_DIR, "prep.blob")} --sentinel-fuse ${Buffer.from("Tk9ERV9TRUFfRlVTRV9mY2U2ODBhYjJjYzQ2N2I2ZTA3MmI4YjVkZjE5OTZiMg==", "base64").toString("ascii")}\`;
const postjectCommand = isWindows
? postjectCommandBase.replace(/\\//g, "\\")
? postjectCommandBase.replace(/\\//g, "\\\\")
: postjectCommandBase;
execSync(postjectCommand, { stdio: "inherit" });
};
Expand Down
33 changes: 17 additions & 16 deletions src/actions/nodejs-tsconfig.ts
Original file line number Diff line number Diff line change
@@ -1,20 +1,21 @@
import { AncaDevelopment } from "../schema.js";
import { stringifyJson, writeFolderJsonFile } from "../utils.js";
import { writeFolderFile } from "../utils.js";

const TSCONFIG = {
compilerOptions: {
esModuleInterop: true,
forceConsistentCasingInFileNames: true,
module: "es2022",
moduleResolution: "node",
outDir: "./build/dev",
rootDir: "./",
skipLibCheck: true,
strict: true,
target: "es2022",
const TSCONFIG = `{
"compilerOptions": {
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true,
"module": "es2022",
"moduleResolution": "node",
"outDir": "./build/dev",
"rootDir": "./",
"skipLibCheck": true,
"strict": true,
"target": "es2022"
},
include: ["./src/**/*", "./test/**/*"],
};
"include": ["./src/**/*", "./test/**/*"]
}
`;

const FILE_PATH = "tsconfig.json";

Expand All @@ -31,7 +32,7 @@ export async function checkNodejsTsconfigJson(development: AncaDevelopment) {
return false;
}

return contents === stringifyJson(TSCONFIG);
return contents === TSCONFIG;
}

/**
Expand All @@ -42,5 +43,5 @@ export async function fixNodejsTsconfigJson(development: AncaDevelopment) {
if (development.state == null) {
return;
}
await writeFolderJsonFile(development.fullPath, FILE_PATH, TSCONFIG);
await writeFolderFile(development.fullPath, FILE_PATH, TSCONFIG);
}

0 comments on commit 132abc8

Please sign in to comment.