mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-12-04 08:09:16 +00:00
fix: tighten generated SQL names, flow input lookup and app install steps (#12748)
* fix: refuse database manager names that would break the generated SQL * fix: read a flow argument directly only for a plain argument name * fix: drop the hook's delivery URL from GitHub webhook payloads * fix: use a pinned non-redirecting client for Nextcloud servers a connection names * fix: build raw apps without their bunfig.toml or the job's own env vars * fix(cli): skip lifecycle scripts when installing app dependencies * fix(cli): keep resources stored under a dbt project folder out of its bundle * fix: keep only the registry settings of a raw app's bunfig.toml when building it * feat: allow private Nextcloud servers listed in ALLOW_PRIVATE_NEXTCLOUD_URLS
This commit is contained in:
@@ -268,7 +268,9 @@ export async function createFrameworkPlugins(
|
||||
|
||||
/**
|
||||
* Ensures node_modules exists in the specified directory
|
||||
* Runs npm install if node_modules is missing
|
||||
* Runs npm install if node_modules is missing, without lifecycle scripts: the
|
||||
* app's package.json may come from a sync pull of someone else's app. An app
|
||||
* whose dependencies need their scripts can run `npm install` itself first.
|
||||
* @param appDir Directory to check for node_modules (defaults to entry point directory)
|
||||
*/
|
||||
export async function ensureNodeModules(appDir?: string): Promise<void> {
|
||||
@@ -276,9 +278,13 @@ export async function ensureNodeModules(appDir?: string): Promise<void> {
|
||||
const nodeModulesPath = path.join(targetDir, "node_modules");
|
||||
|
||||
if (!fs.existsSync(nodeModulesPath)) {
|
||||
log.info(colors.yellow("📦 node_modules not found, running npm install..."));
|
||||
log.info(
|
||||
colors.yellow(
|
||||
"📦 node_modules not found, running npm install --ignore-scripts..."
|
||||
)
|
||||
);
|
||||
const code = await new Promise<number>((resolve, reject) => {
|
||||
const npmInstall = spawn("npm", ["install"], {
|
||||
const npmInstall = spawn("npm", ["install", "--ignore-scripts"], {
|
||||
cwd: targetDir,
|
||||
stdio: "inherit",
|
||||
shell: true,
|
||||
|
||||
@@ -845,6 +845,19 @@ export async function readModulesFromDisk(
|
||||
const relPath = relPrefix ? relPrefix + "/" + entry.name : entry.name;
|
||||
const isTopLevel = relPrefix === "";
|
||||
|
||||
// A resource whose path lies under the project's folder is written there by a
|
||||
// pull, but it is its own item, possibly someone else's: not a project file.
|
||||
if (
|
||||
verbatim &&
|
||||
(entry.isDirectory()
|
||||
? entry.name.endsWith(".fileset")
|
||||
: isFileResource(entry.name) || /\.resource\.(json|ya?ml)$/.test(entry.name))
|
||||
) {
|
||||
log.warn(
|
||||
`Skipping ${relPath}: a resource stored under the dbt project's folder is not part of the project`,
|
||||
);
|
||||
continue;
|
||||
}
|
||||
if (entry.isDirectory()) {
|
||||
// A configured `target-path` may be nested (`build/target`), so the
|
||||
// comparison is on the project-relative path, not the entry name.
|
||||
|
||||
Reference in New Issue
Block a user