diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 2df6d79..b1644d2 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -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: diff --git a/CHANGELOG.md b/CHANGELOG.md index fc2d7ac..44c5ee7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.0.27 + +- Update default endpoint. + ## 0.0.26 - Update dependency versions. diff --git a/bin/flutterflow_cli.dart b/bin/flutterflow_cli.dart index 5eb543f..aed73d7 100644 --- a/bin/flutterflow_cli.dart +++ b/bin/flutterflow_cli.dart @@ -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 appMain(List args) async { final parsedArguments = _parseArgs(args); @@ -38,7 +38,7 @@ Future appMain(List 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; } diff --git a/lib/src/flutterflow_api_client.dart b/lib/src/flutterflow_api_client.dart index c1def91..fa3762d 100644 --- a/lib/src/flutterflow_api_client.dart +++ b/lib/src/flutterflow_api_client.dart @@ -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. @@ -179,7 +179,7 @@ Future _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'}, @@ -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( diff --git a/pubspec.lock b/pubspec.lock index a5887d9..ca19ee8 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -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: @@ -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: diff --git a/pubspec.yaml b/pubspec.yaml index dc14770..cd693e6 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -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