Skip to content

Commit 650e8a8

Browse files
Merge pull request appwrite#606 from appwrite/fix-deno-missing-library
2 parents 93ef96d + d46d139 commit 650e8a8

File tree

5 files changed

+35
-6
lines changed

5 files changed

+35
-6
lines changed

.travis.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@ env:
2727
- SDK=CLINode16
2828
- SDK=DartBeta
2929
- SDK=DartStable
30-
- SDK=Deno1171
30+
- SDK=Deno1193
31+
- SDK=Deno1303
3132
- SDK=FlutterStable
3233
- SDK=FlutterBeta
3334
- SDK=Go112

templates/deno/README.md.twig

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ import * as sdk from "https://deno.land/x/{{ spec.title | caseDash }}/mod.ts";
3232
{{ sdk.gettingStarted|raw }}
3333
{% endif %}
3434

35+
> Minimal supported version for Deno SDK is 1.19.0.
36+
3537
## Contribution
3638

3739
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.

templates/deno/src/inputFile.ts.twig

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
import { readableStreamFromReader } from "https://deno.land/std/streams/conversion.ts";
2-
31
const _bufferToString = (buffer: Uint8Array): ReadableStream<Uint8Array> => {
42
return new ReadableStream({
53
start(controller) {
@@ -16,7 +14,7 @@ export class InputFile {
1614

1715
static fromPath = (filePath: string, filename: string): InputFile => {
1816
const file = Deno.openSync(filePath);
19-
const stream = readableStreamFromReader(file);
17+
const stream = file.readable;
2018
const size = Deno.statSync(filePath).size;
2119
return new InputFile(stream, filename, size);
2220
};

tests/Deno1171Test.php renamed to tests/Deno1193Test.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
namespace Tests;
44

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

1818
protected array $expectedOutput = [
1919
...Base::FOO_RESPONSES,

tests/Deno1303Test.php

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
<?php
2+
3+
namespace Tests;
4+
5+
class Deno1303Test extends Base
6+
{
7+
protected string $sdkName = 'deno';
8+
protected string $sdkPlatform = 'server';
9+
protected string $sdkLanguage = 'deno';
10+
protected string $version = '0.0.1';
11+
12+
protected string $language = 'deno';
13+
protected string $class = 'Appwrite\SDK\Language\Deno';
14+
protected array $build = [];
15+
protected string $command =
16+
'docker run --rm -v $(pwd):/app -w /app denoland/deno:alpine-1.30.3 run --allow-net --allow-read tests/languages/deno/tests.ts';
17+
18+
protected array $expectedOutput = [
19+
...Base::FOO_RESPONSES,
20+
...Base::BAR_RESPONSES,
21+
...Base::GENERAL_RESPONSES,
22+
...Base::LARGE_FILE_RESPONSES,
23+
...Base::EXCEPTION_RESPONSES,
24+
...Base::QUERY_HELPER_RESPONSES,
25+
...Base::PERMISSION_HELPER_RESPONSES,
26+
...Base::ID_HELPER_RESPONSES
27+
];
28+
}

0 commit comments

Comments
 (0)