Skip to content

Update default endpoint #30

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

Merged
merged 2 commits into from
Apr 25, 2025
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
4 changes: 2 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ on: push

env:
# Keep this in sync with the version used by FlutterFlow.
DART_VERSION: 3.5.2
FLUTTER_VERSION: 3.24.2
DART_VERSION: 3.6.1
FLUTTER_VERSION: 3.27.3

jobs:
check:
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 0.0.27

- Update default endpoint.

## 0.0.26

- Update dependency versions.
Expand Down
4 changes: 2 additions & 2 deletions bin/flutterflow_cli.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import 'dart:io';
import 'package:args/args.dart';
import 'package:flutterflow_cli/src/flutterflow_api_client.dart';

const kDefaultEndpoint = 'https://api.flutterflow.io/v1';
const kDefaultEndpoint = 'https://api.flutterflow.io/v2';

Future<void> appMain(List<String> args) async {
final parsedArguments = _parseArgs(args);
Expand Down Expand Up @@ -38,7 +38,7 @@ Future<void> appMain(List<String> args) async {
endpoint = parsedArguments['endpoint'];
} else if (parsedArguments['environment'] != null) {
endpoint =
"https://api-${parsedArguments['environment']}.flutterflow.io/v1";
"https://api-${parsedArguments['environment']}.flutterflow.io/v2";
} else {
endpoint = Platform.environment['FLUTTERFLOW_ENDPOINT'] ?? kDefaultEndpoint;
}
Expand Down
6 changes: 3 additions & 3 deletions lib/src/flutterflow_api_client.dart
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import 'package:path/path.dart' as path_util;

import 'flutterflow_ignore.dart';

const kDefaultEndpoint = 'https://api.flutterflow.io/v1';
const kDefaultEndpoint = 'https://api.flutterflow.io/v2';

/// The `FlutterFlowApi` class provides methods for exporting code from a
/// FlutterFlow project.
Expand Down Expand Up @@ -179,7 +179,7 @@ Future<dynamic> _callExport({
required bool exportAsDebug,
}) async {
final body = jsonEncode({
'project': {'path': 'projects/$projectId'},
'project_id': projectId,
if (branchName != null) 'branch_name': branchName,
if (environmentName != null) 'environment_name': environmentName,
if (commitHash != null) 'commit': {'path': 'commits/$commitHash'},
Expand Down Expand Up @@ -328,7 +328,7 @@ Future firebaseDeploy({
}) async {
final endpointUrl = Uri.parse(endpoint);
final body = jsonEncode({
'project': {'path': 'projects/$projectId'},
'project_id': projectId,
'append_rules': appendRules,
});
final result = await _callEndpoint(
Expand Down
21 changes: 4 additions & 17 deletions pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,18 @@ packages:
dependency: transitive
description:
name: _fe_analyzer_shared
sha256: "45cfa8471b89fb6643fe9bf51bd7931a76b8f5ec2d65de4fb176dba8d4f22c77"
sha256: e55636ed79578b9abca5fecf9437947798f5ef7456308b5cb85720b793eac92f
url: "https://pub.dev"
source: hosted
version: "73.0.0"
_macros:
dependency: transitive
description: dart
source: sdk
version: "0.3.2"
version: "82.0.0"
analyzer:
dependency: transitive
description:
name: analyzer
sha256: "4959fec185fe70cce007c57e9ab6983101dbe593d2bf8bbfb4453aaec0cf470a"
sha256: "13c1e6c6fd460522ea840abec3f677cc226f5fec7872c04ad7b425517ccf54f7"
url: "https://pub.dev"
source: hosted
version: "6.8.0"
version: "7.4.4"
archive:
dependency: "direct main"
description:
Expand Down Expand Up @@ -174,14 +169,6 @@ packages:
url: "https://pub.dev"
source: hosted
version: "1.3.0"
macros:
dependency: transitive
description:
name: macros
sha256: "0acaed5d6b7eab89f63350bccd82119e6c602df0f391260d0e32b5e23db79536"
url: "https://pub.dev"
source: hosted
version: "0.1.2-main.4"
matcher:
dependency: transitive
description:
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: flutterflow_cli
description: >-
Command-line client for FlutterFlow. Export code from FlutterFlow projects.
version: 0.0.26
version: 0.0.27
homepage: https://github.com/FlutterFlow/flutterflow-cli
issue_tracker: https://github.com/flutterflow/flutterflow-issues

Expand Down
Loading