Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
];
return deps
.map(dep => {
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
const depPackageJson = resolveCwd(path.join(dep, 'package.json'))!;
if (!depPackageJson) {
return null;
}
return { name: dep, path: path.dirname(fs.realpathSync(depPackageJson)) };
})
.filter(p => p && p.path.indexOf('node_modules') === -1 && isChildOf(p.path, gitRoot)) as DepInfo[];
} catch (e) {
logger.error(`Invalid package.json detected at ${packageJsonFile} `, e);
return [];
}
}
try {
const parsedOptions = JSON.parse(options);
if (
typeof parsedOptions.connectionString !== "string" ||
typeof parsedOptions.container !== "string"
) {
throw new Error("Incorrect blob storage configuration");
}
return {
provider: "azure-blob",
options: { ...parsedOptions }
};
} catch (e) {
logger.error(e.message);
throw new Error("Invalid blob storage options");
}
}
transpileOnly,
skipProject: true,
compilerOptions: {
target: 'esnext',
module: 'commonjs',
strict: false,
skipLibCheck: true,
skipDefaultLibCheck: true,
moduleResolution: 'node',
allowJs: true,
esModuleInterop: true
},
files: ['just.config.ts']
});
} else {
logger.error(`In order to use TypeScript with just.config.ts, you need to install "ts-node" module:
npm install -D ts-node
or
yarn add -D ts-node
`);
}
}
try {
const parsedOptions = JSON.parse(options);
if (
typeof parsedOptions.npmPackageName !== "string" ||
typeof parsedOptions.registryUrl !== "string"
) {
throw new Error("Incorrect npm storage configuration");
}
return {
provider: "npm",
options: { ...parsedOptions }
};
} catch (e) {
logger.error(e.message);
throw new Error("Invalid npm storage options");
}
}