Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const { path, postcss } = require("@statusfy/common");
const pkg = require("./package");
const langDir = "locales/";
const mainColor = "#000000";
const iconSizes = [16, 120, 144, 152, 192, 384, 512];
const modulesDir = [path.join(__dirname, "node_modules")];
const tailwindJS = path.resolve(__dirname, "tailwind.js");
// Hack: allow to execute using lerna/yarn workspaces on testing
if (process.env.STATUSFY_LERNA) {
modulesDir.push(
path.relative(
__dirname,
path.join(__dirname, "..", "..", "..", "node_modules")
)
);
}
/**
* @type { import("@nuxt/types").Configuration }
*/
const config = {
srcDir: path.join(__dirname, "./client/"),
modulesDir,
mode: "universal",
/*
** Environment variables
*/
const { path } = require("@statusfy/common");
const pkg = require("./package");
const langDir = "locales/";
const mainColor = "#000000";
const iconSizes = [16, 120, 144, 152, 192, 384, 512];
const modulesDir = [path.join(__dirname, "node_modules")];
// Hack: allow to execute using lerna/yarn workspaces on testing
if (process.env.STATUSFY_LERNA) {
modulesDir.push(
path.relative(
__dirname,
path.join(__dirname, "..", "..", "..", "node_modules")
)
);
}
module.exports = {
srcDir: path.join(__dirname, "./client/"),
modulesDir,
mode: "universal",
/*
** Environment variables
*/
env: {
isDev: process.env.NODE_ENV !== "production"
},
} else {
filePath = path.join(contentPath, locale.code, fileName + ".md");
}
if (fs.existsSync(filePath)) {
logger.error(
`An incident with a similar title already exists.\n${filePath}`
);
error = true;
} else {
fse.outputFileSync(
filePath,
`${content}\n\n`
);
createdFiles.push(path.relative(contentPath, filePath));
if (answers.open) {
opener(filePath);
}
}
});
.map(p => path.relative(sourceDir, p))
.join("\n")}`
if (!exists) {
logger.warn(`Content Directory not found: ${dirPath}`);
} else {
try {
const files = (await readdirP(dirPath)).map(f => path.join(dirPath, f));
for (let i = 0; i < files.length; i++) {
const filePath = files[i];
const isFile = (await statP(filePath)).isFile();
if (
isFile &&
path.extname(filePath) === ".md" &&
path.basename(filePath).toLowerCase() !== "readme.md"
) {
const fileName = path.relative(dirPath, filePath);
const fileContent = (await readFileP(filePath)).toString("utf8");
const incident = new Incident(fileContent, fileName).getData();
if (!incident.modified) {
try {
incident.modified = new Date(
getGitLastUpdatedTimeStamp(filePath)
).toISOString();
} catch (error) {
incident.modified = null;
}
}
allIncidents.push(incident);
}
}