Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FDC: Upgrade to v1beta #8485

Merged
merged 3 commits into from
Sep 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
6 changes: 3 additions & 3 deletions packages/data-connect/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"dev": "rollup -c -w",
"test": "run-p --npm-path npm test:emulator",
"test:ci": "node ../../scripts/run_tests_in_ci.js -s test:emulator",
"test:all": "npm run test:unit",
"test:all": "run-p --npm-path npm lint test:unit",
"test:browser": "karma start --single-run",
"test:node": "TS_NODE_FILES=true TS_NODE_CACHE=NO TS_NODE_COMPILER_OPTIONS='{\"module\":\"commonjs\"}' nyc --reporter lcovonly -- mocha 'test/{,!(browser)/**/}*.test.ts' --file src/index.node.ts --config ../../config/mocharc.node.js",
"test:unit": "TS_NODE_FILES=true TS_NODE_CACHE=NO TS_NODE_COMPILER_OPTIONS='{\"module\":\"commonjs\"}' nyc --reporter lcovonly -- mocha 'test/unit/**/*.test.ts' --file src/index.node.ts --config ../../config/mocharc.node.js",
Expand All @@ -44,14 +44,14 @@
"api-report:api-json": "rm -rf temp && api-extractor run --local --verbose",
"doc": "api-documenter markdown --input temp --output docs",
"typings:public": "node ../../scripts/build/use_typings.js ./dist/public.d.ts"
},
},
"license": "Apache-2.0",
"peerDependencies": {
"@firebase/app": "0.x"
},
"dependencies": {
"@firebase/auth-interop-types": "0.2.3",
"@firebase/component": "0.6.8",
"@firebase/component": "0.6.9",
"@firebase/logger": "0.4.2",
"@firebase/util": "1.10.0",
"tslib": "^2.1.0"
Expand Down
2 changes: 1 addition & 1 deletion packages/data-connect/src/util/url.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export function urlBuilder(
'Incorrect type for port passed in!'
);
}
return `${baseUrl}/v1alpha/projects/${project}/locations/${location}/services/${service}/connectors/${connector}`;
return `${baseUrl}/v1beta/projects/${project}/locations/${location}/services/${service}/connectors/${connector}`;
}
export function addToken(url: string, apiKey?: string): string {
if (!apiKey) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ authMode: "PUBLIC"
generate:
javascriptSdk:
outputDir: "./gen/web"
jsPackageName: "@movie-app-ssr/movies"
package: "@movie-app-ssr/movies"
3 changes: 2 additions & 1 deletion packages/data-connect/test/dataconnect/dataconnect.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
specVersion: "v1alpha"
specVersion: "v1beta"
serviceId: "dataconnect"
location: "us-west2"
schema:
source: "./schema"
datasource:
Expand Down
1 change: 0 additions & 1 deletion packages/data-connect/test/emulatorSeeder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,6 @@ export async function setupQueries(
connection_string:
'postgresql://postgres:secretpassword@localhost:5432/postgres?sslmode=disable'
};
fs.writeFileSync('./emulator.json', JSON.stringify(toWrite));
return fetch(`http://localhost:${EMULATOR_PORT}/setupSchema`, {
method: 'POST',
body: JSON.stringify(toWrite)
Expand Down
4 changes: 2 additions & 2 deletions packages/data-connect/test/unit/userAgent.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ describe('User Agent Tests', () => {
// @ts-ignore
await executeQuery(queryRef(dc, '')).catch(() => {});
expect(fakeFetchImpl).to.be.calledWithMatch(
'https://firebasedataconnect.googleapis.com/v1alpha/projects/p/locations/l/services/s/connectors/c:executeQuery',
'https://firebasedataconnect.googleapis.com/v1beta/projects/p/locations/l/services/s/connectors/c:executeQuery',
{
headers: {
['X-Goog-Api-Client']: 'gl-js/ fire/' + SDK_VERSION + ' web/gen'
Expand All @@ -66,7 +66,7 @@ describe('User Agent Tests', () => {
// @ts-ignore
await executeQuery(queryRef(dc, '')).catch(() => {});
expect(fakeFetchImpl).to.be.calledWithMatch(
'https://firebasedataconnect.googleapis.com/v1alpha/projects/p/locations/l/services/s/connectors/c:executeQuery',
'https://firebasedataconnect.googleapis.com/v1beta/projects/p/locations/l/services/s/connectors/c:executeQuery',
{
headers: {
['X-Goog-Api-Client']: 'gl-js/ fire/' + SDK_VERSION
Expand Down
8 changes: 4 additions & 4 deletions scripts/emulator-testing/emulators/dataconnect-emulator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
import { platform } from 'os';
import { Emulator } from './emulator';

const DATABASE_EMULATOR_VERSION = '1.1.17';
const DATABASE_EMULATOR_VERSION = '1.3.7';

export class DataConnectEmulator extends Emulator {
// namespace: string;
Expand All @@ -29,15 +29,15 @@ export class DataConnectEmulator extends Emulator {
switch (os) {
case 'darwin':
urlString =
'https://firebasestorage.googleapis.com/v0/b/firemat-preview-drop/o/emulator%2Fdataconnect-emulator-macos-v1.3.5?alt=media&token=52c3db6e-2a2a-4094-a482-a8c85ae67a88';
'https://firebasestorage.googleapis.com/v0/b/firemat-preview-drop/o/emulator%2Fdataconnect-emulator-macos-v1.3.7?alt=media&token=2cf32435-d479-4929-b963-a97ae1ac3f0b';
break;
case 'linux':
urlString =
'https://firebasestorage.googleapis.com/v0/b/firemat-preview-drop/o/emulator%2Fdataconnect-emulator-linux-v1.3.5?alt=media&token=bafb1f81-2a27-4851-b655-59934985b492';
'https://firebasestorage.googleapis.com/v0/b/firemat-preview-drop/o/emulator%2Fdataconnect-emulator-linux-v1.3.7?alt=media&token=fd33b4fc-2e27-4874-893a-2d1f0ecbf116';
break;
case 'win32':
urlString =
'https://firebasestorage.googleapis.com/v0/b/firemat-preview-drop/o/emulator%2Fdataconnect-emulator-windows-v1.3.5?alt=media&token=d3d04c57-992f-4a4b-931d-5c90efd54c5a';
'https://firebasestorage.googleapis.com/v0/b/firemat-preview-drop/o/emulator%2Fdataconnect-emulator-windows-v1.3.7?alt=media&token=bd6e60b0-50b4-46db-aa6c-5fcc6e991f39';
break;
default:
throw new Error(
Expand Down
15 changes: 0 additions & 15 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1639,21 +1639,6 @@
resolved "https://registry.npmjs.org/@eslint/js/-/js-8.56.0.tgz#ef20350fec605a7f7035a01764731b2de0f3782b"
integrity sha512-gMsVel9D7f2HLkBma9VbtzZRehRogVRfbr++f06nL2vnCGCNlzOD+/MUov/F4p8myyAHspEhVobgjpX64q5m6A==

"@firebase/component@0.6.8":
version "0.6.8"
resolved "https://registry.npmjs.org/@firebase/component/-/component-0.6.8.tgz#899b9318c0ce0586580e8cda7eaf61296f7fb43b"
integrity sha512-LcNvxGLLGjBwB0dJUsBGCej2fqAepWyBubs4jt1Tiuns7QLbXHuyObZ4aMeBjZjWx4m8g1LoVI9QFpSaq/k4/g==
dependencies:
"@firebase/util" "1.9.7"
tslib "^2.1.0"

"@firebase/util@1.9.7":
version "1.9.7"
resolved "https://registry.npmjs.org/@firebase/util/-/util-1.9.7.tgz#c03b0ae065b3bba22800da0bd5314ef030848038"
integrity sha512-fBVNH/8bRbYjqlbIhZ+lBtdAAS4WqZumx03K06/u7fJSpz1TGjEMm1ImvKD47w+xaFKIP2ori6z8BrbakRfjJA==
dependencies:
tslib "^2.1.0"

"@gar/promisify@^1.0.1":
version "1.1.2"
resolved "https://registry.npmjs.org/@gar/promisify/-/promisify-1.1.2.tgz"
Expand Down
Loading