Skip to content

Commit

Permalink
FDC: Upgrade to v1beta (#8485)
Browse files Browse the repository at this point in the history
  • Loading branch information
maneesht committed Sep 19, 2024
1 parent ac13c80 commit 13abf2d
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 25 deletions.
2 changes: 1 addition & 1 deletion 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 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
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

0 comments on commit 13abf2d

Please sign in to comment.