commit | 06ff72491363f5afd26b5f0769cfdac1b97c5204 | [log] [tgz] |
---|---|---|
author | dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> | Mon Jul 01 01:23:21 2024 +0000 |
committer | GitHub <noreply@github.com> | Mon Jul 01 01:23:21 2024 +0000 |
tree | 1e684f3d402cded06e29c40ee4ccb029d0ddca72 | |
parent | a5b220643d94db9265614aafe6e23a94a27957fd [diff] |
Bump the github-actions group with 2 updates (#190) Bumps the github-actions group with 2 updates: [actions/checkout](https://github.com/actions/checkout) and [dart-lang/setup-dart](https://github.com/dart-lang/setup-dart). Updates `actions/checkout` from 4.1.6 to 4.1.7 <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/actions/checkout/releases">actions/checkout's releases</a>.</em></p> <blockquote> <h2>v4.1.7</h2> <h2>What's Changed</h2> <ul> <li>Bump the minor-npm-dependencies group across 1 directory with 4 updates by <a href="https://github.com/dependabot"><code>@âdependabot</code></a> in <a href="https://redirect.github.com/actions/checkout/pull/1739">actions/checkout#1739</a></li> <li>Bump actions/checkout from 3 to 4 by <a href="https://github.com/dependabot"><code>@âdependabot</code></a> in <a href="https://redirect.github.com/actions/checkout/pull/1697">actions/checkout#1697</a></li> <li>Check out other refs/* by commit by <a href="https://github.com/orhantoy"><code>@âorhantoy</code></a> in <a href="https://redirect.github.com/actions/checkout/pull/1774">actions/checkout#1774</a></li> <li>Pin actions/checkout's own workflows to a known, good, stable version. by <a href="https://github.com/jww3"><code>@âjww3</code></a> in <a href="https://redirect.github.com/actions/checkout/pull/1776">actions/checkout#1776</a></li> </ul> <h2>New Contributors</h2> <ul> <li><a href="https://github.com/orhantoy"><code>@âorhantoy</code></a> made their first contribution in <a href="https://redirect.github.com/actions/checkout/pull/1774">actions/checkout#1774</a></li> </ul> <p><strong>Full Changelog</strong>: <a href="https://github.com/actions/checkout/compare/v4.1.6...v4.1.7">https://github.com/actions/checkout/compare/v4.1.6...v4.1.7</a></p> </blockquote> </details> <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/actions/checkout/blob/main/CHANGELOG.md">actions/checkout's changelog</a>.</em></p> <blockquote> <h1>Changelog</h1> <h2>v4.1.7</h2> <ul> <li>Bump the minor-npm-dependencies group across 1 directory with 4 updates by <a href="https://github.com/dependabot"><code>@âdependabot</code></a> in <a href="https://redirect.github.com/actions/checkout/pull/1739">actions/checkout#1739</a></li> <li>Bump actions/checkout from 3 to 4 by <a href="https://github.com/dependabot"><code>@âdependabot</code></a> in <a href="https://redirect.github.com/actions/checkout/pull/1697">actions/checkout#1697</a></li> <li>Check out other refs/* by commit by <a href="https://github.com/orhantoy"><code>@âorhantoy</code></a> in <a href="https://redirect.github.com/actions/checkout/pull/1774">actions/checkout#1774</a></li> <li>Pin actions/checkout's own workflows to a known, good, stable version. by <a href="https://github.com/jww3"><code>@âjww3</code></a> in <a href="https://redirect.github.com/actions/checkout/pull/1776">actions/checkout#1776</a></li> </ul> <h2>v4.1.6</h2> <ul> <li>Check platform to set archive extension appropriately by <a href="https://github.com/cory-miller"><code>@âcory-miller</code></a> in <a href="https://redirect.github.com/actions/checkout/pull/1732">actions/checkout#1732</a></li> </ul> <h2>v4.1.5</h2> <ul> <li>Update NPM dependencies by <a href="https://github.com/cory-miller"><code>@âcory-miller</code></a> in <a href="https://redirect.github.com/actions/checkout/pull/1703">actions/checkout#1703</a></li> <li>Bump github/codeql-action from 2 to 3 by <a href="https://github.com/dependabot"><code>@âdependabot</code></a> in <a href="https://redirect.github.com/actions/checkout/pull/1694">actions/checkout#1694</a></li> <li>Bump actions/setup-node from 1 to 4 by <a href="https://github.com/dependabot"><code>@âdependabot</code></a> in <a href="https://redirect.github.com/actions/checkout/pull/1696">actions/checkout#1696</a></li> <li>Bump actions/upload-artifact from 2 to 4 by <a href="https://github.com/dependabot"><code>@âdependabot</code></a> in <a href="https://redirect.github.com/actions/checkout/pull/1695">actions/checkout#1695</a></li> <li>README: Suggest <code>user.email</code> to be <code>41898282+github-actions[bot]@users.noreply.github.com</code> by <a href="https://github.com/cory-miller"><code>@âcory-miller</code></a> in <a href="https://redirect.github.com/actions/checkout/pull/1707">actions/checkout#1707</a></li> </ul> <h2>v4.1.4</h2> <ul> <li>Disable <code>extensions.worktreeConfig</code> when disabling <code>sparse-checkout</code> by <a href="https://github.com/jww3"><code>@âjww3</code></a> in <a href="https://redirect.github.com/actions/checkout/pull/1692">actions/checkout#1692</a></li> <li>Add dependabot config by <a href="https://github.com/cory-miller"><code>@âcory-miller</code></a> in <a href="https://redirect.github.com/actions/checkout/pull/1688">actions/checkout#1688</a></li> <li>Bump the minor-actions-dependencies group with 2 updates by <a href="https://github.com/dependabot"><code>@âdependabot</code></a> in <a href="https://redirect.github.com/actions/checkout/pull/1693">actions/checkout#1693</a></li> <li>Bump word-wrap from 1.2.3 to 1.2.5 by <a href="https://github.com/dependabot"><code>@âdependabot</code></a> in <a href="https://redirect.github.com/actions/checkout/pull/1643">actions/checkout#1643</a></li> </ul> <h2>v4.1.3</h2> <ul> <li>Check git version before attempting to disable <code>sparse-checkout</code> by <a href="https://github.com/jww3"><code>@âjww3</code></a> in <a href="https://redirect.github.com/actions/checkout/pull/1656">actions/checkout#1656</a></li> <li>Add SSH user parameter by <a href="https://github.com/cory-miller"><code>@âcory-miller</code></a> in <a href="https://redirect.github.com/actions/checkout/pull/1685">actions/checkout#1685</a></li> <li>Update <code>actions/checkout</code> version in <code>update-main-version.yml</code> by <a href="https://github.com/jww3"><code>@âjww3</code></a> in <a href="https://redirect.github.com/actions/checkout/pull/1650">actions/checkout#1650</a></li> </ul> <h2>v4.1.2</h2> <ul> <li>Fix: Disable sparse checkout whenever <code>sparse-checkout</code> option is not present <a href="https://github.com/dscho"><code>@âdscho</code></a> in <a href="https://redirect.github.com/actions/checkout/pull/1598">actions/checkout#1598</a></li> </ul> <h2>v4.1.1</h2> <ul> <li>Correct link to GitHub Docs by <a href="https://github.com/peterbe"><code>@âpeterbe</code></a> in <a href="https://redirect.github.com/actions/checkout/pull/1511">actions/checkout#1511</a></li> <li>Link to release page from what's new section by <a href="https://github.com/cory-miller"><code>@âcory-miller</code></a> in <a href="https://redirect.github.com/actions/checkout/pull/1514">actions/checkout#1514</a></li> </ul> <h2>v4.1.0</h2> <ul> <li><a href="https://redirect.github.com/actions/checkout/pull/1396">Add support for partial checkout filters</a></li> </ul> <h2>v4.0.0</h2> <ul> <li><a href="https://redirect.github.com/actions/checkout/pull/1067">Support fetching without the --progress option</a></li> <li><a href="https://redirect.github.com/actions/checkout/pull/1436">Update to node20</a></li> </ul> <h2>v3.6.0</h2> <ul> <li><a href="https://redirect.github.com/actions/checkout/pull/1377">Fix: Mark test scripts with Bash'isms to be run via Bash</a></li> <li><a href="https://redirect.github.com/actions/checkout/pull/579">Add option to fetch tags even if fetch-depth > 0</a></li> </ul> <h2>v3.5.3</h2> <ul> <li><a href="https://redirect.github.com/actions/checkout/pull/1196">Fix: Checkout fail in self-hosted runners when faulty submodule are checked-in</a></li> <li><a href="https://redirect.github.com/actions/checkout/pull/1287">Fix typos found by codespell</a></li> </ul> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/actions/checkout/commit/692973e3d937129bcbf40652eb9f2f61becf3332"><code>692973e</code></a> Prepare 4.1.7 release (<a href="https://redirect.github.com/actions/checkout/issues/1775">#1775</a>)</li> <li><a href="https://github.com/actions/checkout/commit/6ccd57f4c5d15bdc2fef309bd9fb6cc9db2ef1c6"><code>6ccd57f</code></a> Pin actions/checkout's own workflows to a known, good, stable version. (<a href="https://redirect.github.com/actions/checkout/issues/1776">#1776</a>)</li> <li><a href="https://github.com/actions/checkout/commit/b17fe1e4d59a9d1d95a7aead5e6fcd13e50939a5"><code>b17fe1e</code></a> Handle hidden refs (<a href="https://redirect.github.com/actions/checkout/issues/1774">#1774</a>)</li> <li><a href="https://github.com/actions/checkout/commit/b80ff79f1755d06ba70441c368a6fe801f5f3a62"><code>b80ff79</code></a> Bump actions/checkout from 3 to 4 (<a href="https://redirect.github.com/actions/checkout/issues/1697">#1697</a>)</li> <li><a href="https://github.com/actions/checkout/commit/b1ec3021b8fa02164da82ca1557d017d83b0e179"><code>b1ec302</code></a> Bump the minor-npm-dependencies group across 1 directory with 4 updates (<a href="https://redirect.github.com/actions/checkout/issues/1739">#1739</a>)</li> <li>See full diff in <a href="https://github.com/actions/checkout/compare/a5ac7e51b41094c92402da3b24376905380afc29...692973e3d937129bcbf40652eb9f2f61becf3332">compare view</a></li> </ul> </details> <br /> Updates `dart-lang/setup-dart` from 1.6.4 to 1.6.5 <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/dart-lang/setup-dart/releases">dart-lang/setup-dart's releases</a>.</em></p> <blockquote> <h2>v1.6.5</h2> <ul> <li>Fix zip path handling on Windows 11 (<a href="https://redirect.github.com/dart-lang/setup-dart/issues/118">#118</a>[])</li> </ul> <p><a href="https://redirect.github.com/dart-lang/setup-dart/issues/118">#118</a>: <a href="https://redirect.github.com/dart-lang/setup-dart/issues/118">dart-lang/setup-dart#118</a></p> </blockquote> </details> <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/dart-lang/setup-dart/blob/main/CHANGELOG.md">dart-lang/setup-dart's changelog</a>.</em></p> <blockquote> <h2>v1.6.5</h2> <ul> <li>Fix zip path handling on Windows 11 (<a href="https://redirect.github.com/dart-lang/setup-dart/issues/118">#118</a>[])</li> </ul> <p><a href="https://redirect.github.com/dart-lang/setup-dart/issues/118">#118</a>: <a href="https://redirect.github.com/dart-lang/setup-dart/issues/118">dart-lang/setup-dart#118</a></p> <h2>v1.6.4</h2> <ul> <li>Rebuild JS code.</li> </ul> <h2>v1.6.3</h2> <ul> <li>Roll <code>undici</code> dependency to address <a href="https://github.com/nodejs/undici/security/advisories/GHSA-m4v8-wqvr-p9f7">CVE-2024-30260</a> and <a href="https://github.com/nodejs/undici/security/advisories/GHSA-9qxr-qj54-h672">CVE-2024-30261</a>.</li> </ul> <h2>v1.6.2</h2> <ul> <li>Switch to running the workflow on <code>node20`` from </code>node16`. See also <a href="https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/">Transitioning from Node 16 to Node 20</a>.</li> </ul> <h2>v1.6.1</h2> <ul> <li>Updated the google storage url for <code>main</code> channel releases.</li> </ul> <h2>v1.6.0</h2> <ul> <li>Enable provisioning of the latest Dart SDK patch release by specifying just the major and minor version (e.g. <code>3.2</code>).</li> </ul> <h2>v1.5.1</h2> <ul> <li>No longer test the <code>setup-dart</code> action on pre-2.12 SDKs.</li> <li>Upgrade JS interop code to use extension types (the new name for inline classes).</li> <li>The upcoming rename of the <code>be</code> channel to <code>main</code> is now supported with forward compatibility that switches when the rename happens.</li> </ul> <h2>v1.5.0</h2> <ul> <li>Re-wrote the implementation of the action into Dart.</li> <li>Auto-detect the platform architecture (<code>x64</code>, <code>ia32</code>, <code>arm</code>, <code>arm64</code>).</li> <li>Improved the caching and download resilience of the sdk.</li> <li>Added a new action output: <code>dart-version</code> - the installed version of the sdk.</li> </ul> <h2>v1.4.0</h2> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/dart-lang/setup-dart/commit/0a8a0fc875eb934c15d08629302413c671d3f672"><code>0a8a0fc</code></a> rev to v1.6.5 in prep for publishing (<a href="https://redirect.github.com/dart-lang/setup-dart/issues/135">#135</a>)</li> <li><a href="https://github.com/dart-lang/setup-dart/commit/4e61f04f255b227a0511bf9ef0f5ddc7c8542531"><code>4e61f04</code></a> fix: Use <code>.zip</code> in archive path (<a href="https://redirect.github.com/dart-lang/setup-dart/issues/119">#119</a>)</li> <li><a href="https://github.com/dart-lang/setup-dart/commit/2986c8e337a31eb7b455ce93dc984e9bf5797756"><code>2986c8e</code></a> blast_repo fixes (<a href="https://redirect.github.com/dart-lang/setup-dart/issues/132">#132</a>)</li> <li><a href="https://github.com/dart-lang/setup-dart/commit/40a7d12289757ab3aaa39d47d6f99a9cb1dd701e"><code>40a7d12</code></a> Bump dart-lang/setup-dart from 1.6.2 to 1.6.4 (<a href="https://redirect.github.com/dart-lang/setup-dart/issues/131">#131</a>)</li> <li><a href="https://github.com/dart-lang/setup-dart/commit/40f1ce0b1c8f24a4e9cb7eb026e4dbbdb431eb76"><code>40f1ce0</code></a> Update dart.yml (<a href="https://redirect.github.com/dart-lang/setup-dart/issues/130">#130</a>)</li> <li>See full diff in <a href="https://github.com/dart-lang/setup-dart/compare/f0ead981b4d9a35b37f30d36160575d60931ec30...0a8a0fc875eb934c15d08629302413c671d3f672">compare view</a></li> </ul> </details> <br /> Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore <dependency name> major version` will close this group update PR and stop Dependabot creating any more for the specific dependency's major version (unless you unignore this specific dependency's major version or upgrade to it yourself) - `@dependabot ignore <dependency name> minor version` will close this group update PR and stop Dependabot creating any more for the specific dependency's minor version (unless you unignore this specific dependency's minor version or upgrade to it yourself) - `@dependabot ignore <dependency name>` will close this group update PR and stop Dependabot creating any more for the specific dependency (unless you unignore this specific dependency or upgrade to it yourself) - `@dependabot unignore <dependency name>` will remove all of the ignore conditions of the specified dependency - `@dependabot unignore <dependency name> <ignore condition>` will remove the ignore condition of the specified dependency and ignore conditions </details>
The gcloud
package provides a high level idiomatic Dart interface to some of the most widely used Google Cloud Platform services.
Currently the following services are supported:
NOTE: This package is currently experimental and published under the labs.dart.dev pub publisher in order to solicit feedback.
For packages in the labs.dart.dev publisher we generally plan to either graduate the package into a supported publisher (dart.dev, tools.dart.dev) after a period of feedback and iteration, or discontinue the package. These packages have a much higher expected rate of API and breaking changes.
Your feedback is valuable and will help us evolve this package. For general feedback, suggestions, and comments, please file an issue in the bug tracker.
The APIs in this package are all based on the generic generated APIs in the googleapis and googleapis_beta packages.
This means that the authentication model for using the APIs in this package uses the googleapis_auth package.
Note that this package is only intended for being used with the standalone VM in a server or command line application. Don't expect this package to work on the browser or in Flutter.
The code snippets below demonstrating the use of this package all assume that the following imports are present:
import 'dart:io'; import 'package:googleapis_auth/auth_io.dart' as auth; import 'package:http/http.dart' as http; import 'package:gcloud/db.dart'; import 'package:gcloud/storage.dart'; import 'package:gcloud/pubsub.dart'; import 'package:gcloud/service_scope.dart' as ss; import 'package:gcloud/datastore.dart' as datastore;
The first step in using the APIs is to get an authenticated HTTP client and with that create API class instances for accessing the different APIs. The code below assumes that you have a Google Cloud Project called my-project
with credentials for a service account from that project stored in the file my-project.json
.
// Read the service account credentials from the file. var jsonCredentials = new File('my-project.json').readAsStringSync(); var credentials = new auth.ServiceAccountCredentials.fromJson(jsonCredentials); // Get an HTTP authenticated client using the service account credentials. var scopes = [] ..addAll(datastore.Datastore.Scopes) ..addAll(Storage.SCOPES) ..addAll(PubSub.SCOPES); var client = await auth.clientViaServiceAccount(credentials, scopes); // Instantiate objects to access Cloud Datastore, Cloud Storage // and Cloud Pub/Sub APIs. var db = new DatastoreDB( new datastore.Datastore(client, 's~my-project')); var storage = new Storage(client, 'my-project'); var pubsub = new PubSub(client, 'my-project');
All the APIs in this package supports the use of ‘service scopes’. Service scopes are described in details below.
ss.fork(() { // register the services in the new service scope. registerDbService(db); registerStorageService(storage); registerPubSubService(pubsub); // Run application using these services. });
The services registered with the service scope can now be reached from within all the code running in the same service scope using the below getters.
dbService. storageService. pubsubService.
This way it is not necessary to pass the service objects around in your code.
The gcloud
package is also integrated in the Dart appengine package. This means the gcloud
services are available both via the appengine context and service scopes. The authentication required to access the Google Cloud Platform services is handled automatically.
This means that getting to the App Engine Datastore can be through either the App Engine context
var db = context.services.db;
or just using the service scope registration.
var db = dbService;
Google Cloud Datastore provide a NoSQL, schemaless database for storing non-relational data. See the product page https://cloud.google.com/datastore/ for more information.
The Cloud Datastore API provides a mapping of Dart objects to entities stored in the Datastore. The following example shows how to annotate a class to make it possible to store instances of it in the Datastore.
@db.Kind() class Person extends db.Model { @db.StringProperty() String name; @db.IntProperty() int age; }
The Kind
annotation tell that instances of this class can be stored. The class must also inherit from Model
. Now to store an object into the Datastore create an instance and use the commit
function.
var person = new Person() ..name = '' ..age = 42; await db.commit(inserts: [person]);
The function query
is used to build a Query
object which can be run to perform the query.
var persons = (await db.query<Person>().run()).toList();
To fetch one or multiple existing entities, use lookup
.
var key = new Person() ..name = 'UniqueName' ..age = 42 ..parentKey = db.emptyKey; var person = (await db.lookup<Person>([key])).single; var people = await db.lookup<Person>([key1, key2]);
NOTE: This package include a lower level API provided through the class Datastore
on top of which the DatastoreDB
API is build. The main reason for this additional API level is to bridge the gap between the different APIs exposed inside App Engine and through the public REST API. We reserve the rights to modify and maybe even remove this additional layer at any time.
Google Cloud Storage provide a highly available object store (aka BLOB store). See the product page https://cloud.google.com/storage/ for more information.
In Cloud Storage the objects (BLOBs) are organized in buckets. Each bucket has a name in a global namespace. The following code creates a new bucket named my-bucket
and writes the content of the file my-file.txt
to the object named my-object
.
var bucket = await storage.createBucket('my-bucket'); new File('my-file.txt').openRead().pipe(bucket.write('my-object'));
The following code will read back the object.
bucket.read('my-object').pipe(new File('my-file-copy.txt').openWrite());
Google Cloud Pub/Sub provides many-to-many, asynchronous messaging. See the product page https://cloud.google.com/pubsub/ for more information.
Cloud Pub/Sub uses two concepts for messaging. Topics are used if you want to send messages and subscriptions are used to subscribe to topics and receive the messages. This decouples the producer of a message from the consumer of a message.
The following code creates a topic and sends a simple test message:
var topic = await pubsub.createTopic('my-topic'); await topic.publishString('Hello, world!')
With the following code a subscription is created on the topic and a message is pulled using the subscription. A received message must be acknowledged when the consumer has processed it.
var subscription = await pubsub.createSubscription('my-subscription', 'my-topic'); var pullEvent = await subscription.pull(); print(pullEvent.message.asString); await pullEvent.acknowledge();
It is also possible to receive messages using push events instead of pulling from the subscription. To do this the subscription should be configured as a push subscription with an HTTP endpoint.
await pubsub.createSubscription( 'my-subscription', 'my-topic', endpoint: Uri.parse('https://server.example.com/push'));
With this subscription all messages will be send to the URL provided in the endpoint
argument. The server needs to acknowledge the reception of the message with a 200 OK
reply.
If you want to run the end-to-end tests, a Google Cloud project is required. When running these tests the following environment variables need to be set:
GCLOUD_E2E_TEST_PROJECT
The value of the environment variable GCLOUD_E2E_TEST_PROJECT
is the name of the Google Cloud project to use. Authentication for testing uses Application Default Credentials locally you can provide GOOGLE_APPLICATION_CREDENTIALS
or use gcloud auth application-default login
.
You will also need to create indexes as follows:
gcloud --project "$GCLOUD_E2E_TEST_PROJECT" datastore indexes create test/index.yaml