@nfdi4plants/arctrl 1.0.0-alpha6 → 1.0.0-alpha7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/ISA/ISA/ArcTypes/ArcTableAux.js +14 -50
- package/Templates/{Templates.Json.js → Template.Json.js} +49 -5
- package/Templates/{Templates.Spreadsheet.js → Template.Spreadsheet.js} +6 -6
- package/Templates/Template.Web.js +13 -0
- package/Templates/{Templates.js → Template.js} +3 -3
- package/WebRequest/WebRequest.js +38 -0
- package/fable_modules/Fable.Fetch.2.6.0/Fable.Fetch.fableproj +21 -0
- package/fable_modules/Fable.Fetch.2.6.0/Fetch.fs +469 -0
- package/fable_modules/Fable.Fetch.2.6.0/Fetch.fs.js +111 -0
- package/fable_modules/Fable.Promise.3.2.0/AsyncIterable.fs +57 -0
- package/fable_modules/Fable.Promise.3.2.0/AsyncIterable.fs.js +104 -0
- package/fable_modules/Fable.Promise.3.2.0/Fable.Promise.fableproj +20 -0
- package/fable_modules/Fable.Promise.3.2.0/Promise.fs +766 -0
- package/fable_modules/Fable.Promise.3.2.0/Promise.fs.js +217 -0
- package/fable_modules/Fable.Promise.3.2.0/PromiseImpl.fs +31 -0
- package/fable_modules/Fable.Promise.3.2.0/PromiseImpl.fs.js +19 -0
- package/fable_modules/Fable.SimpleHttp.3.5.0/Fable.SimpleHttp.fableproj +23 -0
- package/fable_modules/Fable.SimpleHttp.3.5.0/Http.fs +357 -0
- package/fable_modules/Fable.SimpleHttp.3.5.0/Http.fs.js +429 -0
- package/fable_modules/Fable.SimpleHttp.3.5.0/Types.fs +52 -0
- package/fable_modules/Fable.SimpleHttp.3.5.0/Types.fs.js +112 -0
- package/fable_modules/project_cracked.json +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import { value as value_1 } from "../fable-library.4.1.4/Option.js";
|
|
2
|
+
import { class_type } from "../fable-library.4.1.4/Reflection.js";
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Creates AsyncIterable. See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for-await...of#specifications
|
|
6
|
+
*/
|
|
7
|
+
export function create(onNext) {
|
|
8
|
+
return {
|
|
9
|
+
[Symbol.asyncIterator]() {
|
|
10
|
+
return {
|
|
11
|
+
next: (() => {
|
|
12
|
+
const pr = onNext();
|
|
13
|
+
return pr.then((_arg) => {
|
|
14
|
+
if (_arg == null) {
|
|
15
|
+
return {
|
|
16
|
+
done: true,
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
else {
|
|
20
|
+
return {
|
|
21
|
+
value: value_1(_arg),
|
|
22
|
+
done: false,
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
});
|
|
26
|
+
}),
|
|
27
|
+
return: (() => ({
|
|
28
|
+
done: true,
|
|
29
|
+
}))
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* Creates AsyncIterable with a cleaning function for cancellation (JS caller invokes `break` or `return` during iteration)
|
|
37
|
+
*/
|
|
38
|
+
export function createCancellable(onCancel, onNext) {
|
|
39
|
+
return {
|
|
40
|
+
[Symbol.asyncIterator]() {
|
|
41
|
+
return {
|
|
42
|
+
next: (() => {
|
|
43
|
+
const pr = onNext();
|
|
44
|
+
return pr.then((_arg) => {
|
|
45
|
+
if (_arg == null) {
|
|
46
|
+
return {
|
|
47
|
+
done: true,
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
else {
|
|
51
|
+
return {
|
|
52
|
+
value: value_1(_arg),
|
|
53
|
+
done: false,
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
});
|
|
57
|
+
}),
|
|
58
|
+
return: (() => {
|
|
59
|
+
onCancel();
|
|
60
|
+
return {
|
|
61
|
+
done: true,
|
|
62
|
+
};
|
|
63
|
+
})
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
export class CancellationToken {
|
|
70
|
+
constructor() {
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
export function CancellationToken_$reflection() {
|
|
75
|
+
return class_type("AsyncIterable.CancellationToken", void 0, CancellationToken);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
export function CancellationToken_$ctor() {
|
|
79
|
+
return new CancellationToken();
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
export function CancellationToken__Cancel(this$) {
|
|
83
|
+
throw this$;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* Iterates AsyncIterable. See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for-await...of
|
|
88
|
+
*/
|
|
89
|
+
export function iter(action, iterable) {
|
|
90
|
+
const token = CancellationToken_$ctor();
|
|
91
|
+
return (async () => {
|
|
92
|
+
for await (const value of iterable) {
|
|
93
|
+
try {
|
|
94
|
+
action(token, value)
|
|
95
|
+
} catch (err) {
|
|
96
|
+
if (err instanceof token.constructor) {
|
|
97
|
+
break;
|
|
98
|
+
}
|
|
99
|
+
throw(err);
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
})();
|
|
103
|
+
}
|
|
104
|
+
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
|
2
|
+
<Project Sdk="Microsoft.NET.Sdk">
|
|
3
|
+
<PropertyGroup>
|
|
4
|
+
<Version>3.2.0</Version>
|
|
5
|
+
<PackageVersion>3.2.0</PackageVersion>
|
|
6
|
+
<TargetFramework>netstandard2.0</TargetFramework>
|
|
7
|
+
</PropertyGroup>
|
|
8
|
+
<ItemGroup>
|
|
9
|
+
<Compile Include="Promise.fs" />
|
|
10
|
+
<Compile Include="PromiseImpl.fs" />
|
|
11
|
+
<Compile Include="AsyncIterable.fs" />
|
|
12
|
+
</ItemGroup>
|
|
13
|
+
<ItemGroup>
|
|
14
|
+
<Content Include="*.fsproj; *.fs" PackagePath="fable\" />
|
|
15
|
+
</ItemGroup>
|
|
16
|
+
<ItemGroup>
|
|
17
|
+
<PackageReference Include="Fable.Core" Version="3.7.1" />
|
|
18
|
+
<PackageReference Update="FSharp.Core" Version="4.7.2" />
|
|
19
|
+
</ItemGroup>
|
|
20
|
+
</Project>
|