Skip to content
Open
Show file tree
Hide file tree
Changes from 12 commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
9145702
feat: add extension.yaml adapter for Functions deployment
taeold Aug 17, 2025
4238d98
refactor: improve extensionAdapter test file
taeold Aug 17, 2025
108ba75
refactor: simplify extensionAdapter code
taeold Aug 17, 2025
1b2aa27
refactor: unify endpoint creation and remove any types
taeold Aug 17, 2025
5bc2318
refactor: simplify parameter conversion logic
taeold Aug 17, 2025
a3ff006
refactor: remove runtime parameter from extensionAdapter
taeold Aug 17, 2025
d44834a
fix: address code review feedback for extensionAdapter
taeold Aug 17, 2025
1a5ff94
refactor: simplify IAM and lifecycle handling with TODOs
taeold Aug 17, 2025
3000da5
refactor: simplify extensionAdapter using existing utilities
taeold Aug 17, 2025
f6a5f91
style: clean up extensionAdapter per code review
taeold Aug 17, 2025
4f55af6
fix: address extensionAdapter code review feedback and add edge case …
taeold Aug 17, 2025
90b33fa
refactor: improve extensionAdapter based on code review feedback
taeold Aug 18, 2025
27486aa
fix: address additional extensionAdapter review feedback
taeold Aug 18, 2025
d62d0ff
fix: optimize extension detection and clean up code
taeold Aug 18, 2025
3a8f3d2
feat: add default Firestore v2 filters for parity with emulator
taeold Aug 18, 2025
9f154da
test: update expected output for v2-function test
taeold Aug 18, 2025
8a6cabc
refactor: remove redundant endpoints initialization
taeold Aug 18, 2025
12b3dee
Merge branch 'master' into extension-adapter-support
taeold Aug 18, 2025
786f483
fix: convert multiSelect extension params to list type in functions
taeold Aug 19, 2025
07bcfda
fix: auto-detect numeric select params and convert to IntParam
taeold Aug 19, 2025
319553b
docs: add comprehensive documentation about system params in extensio…
taeold Aug 19, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 40 additions & 0 deletions src/deploy/functions/extensionAdapter.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
import { expect } from "chai";
import * as fs from "fs";
import * as path from "path";
import { detectAndAdaptExtension } from "./extensionAdapter";

describe("extensionAdapter golden tests", () => {
const fixturesDir = path.resolve(__dirname, "../../../src/test/fixtures/extensionAdapter");

const getFixtures = (): string[] => {
return fs.readdirSync(fixturesDir).filter((dir) => {
const stats = fs.statSync(path.join(fixturesDir, dir));
return (
stats.isDirectory() &&
fs.existsSync(path.join(fixturesDir, dir, "extension.yaml")) &&
fs.existsSync(path.join(fixturesDir, dir, "expected.json"))
);
});
};

const fixtures = getFixtures();

fixtures.forEach((fixtureName) => {
it(`should correctly convert ${fixtureName}`, async () => {
const fixtureDir = path.join(fixturesDir, fixtureName);
const expectedPath = path.join(fixtureDir, "expected.json");
const expected = JSON.parse(fs.readFileSync(expectedPath, "utf8"));

Check warning on line 26 in src/deploy/functions/extensionAdapter.spec.ts

View workflow job for this annotation

GitHub Actions / lint (20)

Unsafe assignment of an `any` value

const result = await detectAndAdaptExtension(fixtureDir, "test-project");

expect(result).to.not.be.undefined;
expect(result).to.deep.equal(expected);
});
});

it("should return undefined for directory without extension.yaml", async () => {
const result = await detectAndAdaptExtension("/tmp/no-extension", "test-project");

expect(result).to.be.undefined;
});
});
Loading
Loading