Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into feat-improve-pub-score
Browse files Browse the repository at this point in the history
  • Loading branch information
lohanidamodar committed Feb 16, 2023
2 parents 0c2ad3f + 650e8a8 commit 273c8a8
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 6 deletions.
3 changes: 2 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ env:
- SDK=CLINode16
- SDK=DartBeta
- SDK=DartStable
- SDK=Deno1171
- SDK=Deno1193
- SDK=Deno1303
- SDK=FlutterStable
- SDK=FlutterBeta
- SDK=Go112
Expand Down
2 changes: 2 additions & 0 deletions templates/deno/README.md.twig
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ import * as sdk from "https://deno.land/x/{{ spec.title | caseDash }}/mod.ts";
{{ sdk.gettingStarted|raw }}
{% endif %}

> Minimal supported version for Deno SDK is 1.19.0.

## Contribution

This library is auto-generated by Appwrite custom [SDK Generator](https://github.com/appwrite/sdk-generator). To learn more about how you can help us improve this SDK, please check the [contribution guide](https://github.com/appwrite/sdk-generator/blob/master/CONTRIBUTING.md) before sending a pull-request.
Expand Down
4 changes: 1 addition & 3 deletions templates/deno/src/inputFile.ts.twig
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import { readableStreamFromReader } from "https://deno.land/std/streams/conversion.ts";

const _bufferToString = (buffer: Uint8Array): ReadableStream<Uint8Array> => {
return new ReadableStream({
start(controller) {
Expand All @@ -16,7 +14,7 @@ export class InputFile {

static fromPath = (filePath: string, filename: string): InputFile => {
const file = Deno.openSync(filePath);
const stream = readableStreamFromReader(file);
const stream = file.readable;
const size = Deno.statSync(filePath).size;
return new InputFile(stream, filename, size);
};
Expand Down
4 changes: 2 additions & 2 deletions tests/Deno1171Test.php → tests/Deno1193Test.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace Tests;

class Deno1171Test extends Base
class Deno1193Test extends Base
{
protected string $sdkName = 'deno';
protected string $sdkPlatform = 'server';
Expand All @@ -13,7 +13,7 @@ class Deno1171Test extends Base
protected string $class = 'Appwrite\SDK\Language\Deno';
protected array $build = [];
protected string $command =
'docker run --rm -v $(pwd):/app -w /app denoland/deno:alpine-1.17.1 run --allow-net --allow-read tests/languages/deno/tests.ts';
'docker run --rm -v $(pwd):/app -w /app denoland/deno:alpine-1.19.3 run --allow-net --allow-read tests/languages/deno/tests.ts';

protected array $expectedOutput = [
...Base::FOO_RESPONSES,
Expand Down
28 changes: 28 additions & 0 deletions tests/Deno1303Test.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<?php

namespace Tests;

class Deno1303Test extends Base
{
protected string $sdkName = 'deno';
protected string $sdkPlatform = 'server';
protected string $sdkLanguage = 'deno';
protected string $version = '0.0.1';

protected string $language = 'deno';
protected string $class = 'Appwrite\SDK\Language\Deno';
protected array $build = [];
protected string $command =
'docker run --rm -v $(pwd):/app -w /app denoland/deno:alpine-1.30.3 run --allow-net --allow-read tests/languages/deno/tests.ts';

protected array $expectedOutput = [
...Base::FOO_RESPONSES,
...Base::BAR_RESPONSES,
...Base::GENERAL_RESPONSES,
...Base::LARGE_FILE_RESPONSES,
...Base::EXCEPTION_RESPONSES,
...Base::QUERY_HELPER_RESPONSES,
...Base::PERMISSION_HELPER_RESPONSES,
...Base::ID_HELPER_RESPONSES
];
}

0 comments on commit 273c8a8

Please sign in to comment.