Merge remote-tracking branch 'origin/main' into hugo/resource-type-guidance

This commit is contained in:
hugocasa
2026-10-12 09:51:15 +02:00
338 changed files with 7866 additions and 3496 deletions
+1 -5
View File
@@ -56,8 +56,6 @@ test("Init: createWorkspaceProfile includes defaults when no repositories exist"
expect(Array.isArray(workspaceProfile.excludes)).toBeTruthy();
expect(workspaceProfile.excludes.length).toEqual(0);
expect(workspaceProfile.defaultTs).toEqual('bun');
console.log('Workspace profile correctly includes default sync settings when no repositories exist');
});
@@ -74,8 +72,6 @@ test("Init: verify DEFAULT_SYNC_OPTIONS has expected values", () => {
expect(Array.isArray(DEFAULT_SYNC_OPTIONS.excludes)).toBeTruthy();
expect(DEFAULT_SYNC_OPTIONS.excludes.length).toEqual(0);
expect(DEFAULT_SYNC_OPTIONS.defaultTs).toEqual('bun');
console.log('DEFAULT_SYNC_OPTIONS has expected values');
});
@@ -178,7 +174,7 @@ test.skipIf(shouldSkipOnCI())("Init: --use-default bypasses backend settings che
// Should have default settings, not backend settings
expect(wmillYaml).toContain("includes:\n - f/**");
expect(wmillYaml).toContain("defaultTs: bun");
expect(wmillYaml).not.toContain("defaultTs");
// Should NOT have backend-specific settings
expect(wmillYaml.includes("f/should-be-ignored/**")).toEqual(false);
-1
View File
@@ -90,7 +90,6 @@ describe("generateCommentedTemplate", () => {
test("default values match expected defaults", () => {
const config = parse(generateCommentedTemplate("main"));
expect(config.defaultTs).toBe("bun");
expect(config.skipSecrets).toBe(true);
expect(config.nonDottedPaths).toBe(true);
expect(config.codebases).toEqual([]);
@@ -0,0 +1,27 @@
/**
* Regression guard: a superadmin whose `usr` row in the workspace is not an
* admin still preserves ownership on the backend, so the CLI must not refuse
* their push as if it would reassign every item to them.
*/
import { expect, test } from "bun:test";
import { mockServices } from "./mock_services.ts";
mockServices({
whoami: async () => ({
email: "super@windmill.dev",
username: "super",
is_admin: false,
is_super_admin: true,
groups: [],
}),
});
const { buildPermissionedAsContext } = await import(
"../src/core/permissioned_as.ts"
);
test("a superadmin with a non-admin membership counts as able to preserve", async () => {
const ctx = await buildPermissionedAsContext("w", "v1");
expect(ctx?.userIsAdminOrDeployer).toBe(true);
});