Skip to content

Commit dcc628a

Browse files
authored
Update default endpoint (#30)
1 parent da469d0 commit dcc628a

File tree

6 files changed

+16
-25
lines changed

6 files changed

+16
-25
lines changed

.github/workflows/main.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ on: push
33

44
env:
55
# Keep this in sync with the version used by FlutterFlow.
6-
DART_VERSION: 3.5.2
7-
FLUTTER_VERSION: 3.24.2
6+
DART_VERSION: 3.6.1
7+
FLUTTER_VERSION: 3.27.3
88

99
jobs:
1010
check:

CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 0.0.27
2+
3+
- Update default endpoint.
4+
15
## 0.0.26
26

37
- Update dependency versions.

bin/flutterflow_cli.dart

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import 'dart:io';
33
import 'package:args/args.dart';
44
import 'package:flutterflow_cli/src/flutterflow_api_client.dart';
55

6-
const kDefaultEndpoint = 'https://api.flutterflow.io/v1';
6+
const kDefaultEndpoint = 'https://api.flutterflow.io/v2';
77

88
Future<void> appMain(List<String> args) async {
99
final parsedArguments = _parseArgs(args);
@@ -38,7 +38,7 @@ Future<void> appMain(List<String> args) async {
3838
endpoint = parsedArguments['endpoint'];
3939
} else if (parsedArguments['environment'] != null) {
4040
endpoint =
41-
"https://api-${parsedArguments['environment']}.flutterflow.io/v1";
41+
"https://api-${parsedArguments['environment']}.flutterflow.io/v2";
4242
} else {
4343
endpoint = Platform.environment['FLUTTERFLOW_ENDPOINT'] ?? kDefaultEndpoint;
4444
}

lib/src/flutterflow_api_client.dart

+3-3
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import 'package:path/path.dart' as path_util;
77

88
import 'flutterflow_ignore.dart';
99

10-
const kDefaultEndpoint = 'https://api.flutterflow.io/v1';
10+
const kDefaultEndpoint = 'https://api.flutterflow.io/v2';
1111

1212
/// The `FlutterFlowApi` class provides methods for exporting code from a
1313
/// FlutterFlow project.
@@ -179,7 +179,7 @@ Future<dynamic> _callExport({
179179
required bool exportAsDebug,
180180
}) async {
181181
final body = jsonEncode({
182-
'project': {'path': 'projects/$projectId'},
182+
'project_id': projectId,
183183
if (branchName != null) 'branch_name': branchName,
184184
if (environmentName != null) 'environment_name': environmentName,
185185
if (commitHash != null) 'commit': {'path': 'commits/$commitHash'},
@@ -328,7 +328,7 @@ Future firebaseDeploy({
328328
}) async {
329329
final endpointUrl = Uri.parse(endpoint);
330330
final body = jsonEncode({
331-
'project': {'path': 'projects/$projectId'},
331+
'project_id': projectId,
332332
'append_rules': appendRules,
333333
});
334334
final result = await _callEndpoint(

pubspec.lock

+4-17
Original file line numberDiff line numberDiff line change
@@ -5,23 +5,18 @@ packages:
55
dependency: transitive
66
description:
77
name: _fe_analyzer_shared
8-
sha256: "45cfa8471b89fb6643fe9bf51bd7931a76b8f5ec2d65de4fb176dba8d4f22c77"
8+
sha256: e55636ed79578b9abca5fecf9437947798f5ef7456308b5cb85720b793eac92f
99
url: "https://pub.dev"
1010
source: hosted
11-
version: "73.0.0"
12-
_macros:
13-
dependency: transitive
14-
description: dart
15-
source: sdk
16-
version: "0.3.2"
11+
version: "82.0.0"
1712
analyzer:
1813
dependency: transitive
1914
description:
2015
name: analyzer
21-
sha256: "4959fec185fe70cce007c57e9ab6983101dbe593d2bf8bbfb4453aaec0cf470a"
16+
sha256: "13c1e6c6fd460522ea840abec3f677cc226f5fec7872c04ad7b425517ccf54f7"
2217
url: "https://pub.dev"
2318
source: hosted
24-
version: "6.8.0"
19+
version: "7.4.4"
2520
archive:
2621
dependency: "direct main"
2722
description:
@@ -174,14 +169,6 @@ packages:
174169
url: "https://pub.dev"
175170
source: hosted
176171
version: "1.3.0"
177-
macros:
178-
dependency: transitive
179-
description:
180-
name: macros
181-
sha256: "0acaed5d6b7eab89f63350bccd82119e6c602df0f391260d0e32b5e23db79536"
182-
url: "https://pub.dev"
183-
source: hosted
184-
version: "0.1.2-main.4"
185172
matcher:
186173
dependency: transitive
187174
description:

pubspec.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: flutterflow_cli
22
description: >-
33
Command-line client for FlutterFlow. Export code from FlutterFlow projects.
4-
version: 0.0.26
4+
version: 0.0.27
55
homepage: https://github.com/FlutterFlow/flutterflow-cli
66
issue_tracker: https://github.com/flutterflow/flutterflow-issues
77

0 commit comments

Comments
 (0)