windmill-components 1.13.21 → 1.13.22
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/components/ArgInfo.svelte +1 -1
- package/components/FlowBuilder.svelte +26 -40
- package/components/FlowBuilder.svelte.d.ts +1 -1
- package/components/FlowEditor.svelte +1 -1
- package/components/FlowEditor.svelte.d.ts +1 -1
- package/components/FlowPreview.svelte +1 -1
- package/components/FlowPreview.svelte.d.ts +1 -1
- package/components/FlowStatusViewer.svelte +1 -1
- package/components/FlowStatusViewer.svelte.d.ts +1 -1
- package/components/GroupModal.svelte +1 -1
- package/components/InviteGlobalUser.svelte +1 -1
- package/components/InviteUser.svelte +1 -1
- package/components/JobStatus.svelte.d.ts +1 -1
- package/components/ModuleStep.svelte.d.ts +1 -1
- package/components/ObjectResourceInput.svelte +1 -1
- package/components/Path.svelte +1 -1
- package/components/ResourceEditor.svelte +8 -13
- package/components/ResourcePicker.svelte +1 -1
- package/components/ResourceTypePicker.svelte +1 -1
- package/components/RunForm.svelte.d.ts +1 -1
- package/components/SchemaEditor.svelte +8 -19
- package/components/ScriptBuilder.svelte +1 -1
- package/components/ScriptBuilder.svelte.d.ts +1 -1
- package/components/ScriptEditor.svelte +2 -2
- package/components/ScriptPicker.svelte +8 -13
- package/components/ShareModal.svelte +9 -14
- package/components/VariableEditor.svelte +13 -18
- package/gen/core/ApiError.js +4 -0
- package/gen/core/CancelablePromise.js +8 -1
- package/infer.js +26 -32
- package/logout.js +1 -1
- package/package.json +1 -1
- package/user.js +1 -1
|
@@ -4,7 +4,7 @@ import Tooltip from './Tooltip.svelte';
|
|
|
4
4
|
import json from 'svelte-highlight/languages/json';
|
|
5
5
|
import github from 'svelte-highlight/styles/github';
|
|
6
6
|
import { Highlight } from 'svelte-highlight';
|
|
7
|
-
import { ResourceService } from '../gen
|
|
7
|
+
import { ResourceService } from '../gen';
|
|
8
8
|
import { workspaceStore } from '../stores';
|
|
9
9
|
export let value;
|
|
10
10
|
let resourceViewer;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<script>import { FlowService } from '../gen
|
|
1
|
+
<script>import { FlowService } from '../gen';
|
|
2
2
|
import { sendUserToast } from '../utils';
|
|
3
3
|
import { page } from '$app/stores';
|
|
4
4
|
import { goto } from '$app/navigation';
|
|
@@ -12,47 +12,33 @@ export let flow;
|
|
|
12
12
|
export let initialPath = '';
|
|
13
13
|
$: step = Number($page.url.searchParams.get('step')) || 1;
|
|
14
14
|
async function saveFlow() {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
});
|
|
27
|
-
}
|
|
28
|
-
else {
|
|
29
|
-
await FlowService.updateFlow({
|
|
30
|
-
workspace: $workspaceStore,
|
|
31
|
-
path: initialPath,
|
|
32
|
-
requestBody: {
|
|
33
|
-
path: flow.path,
|
|
34
|
-
summary: flow.summary,
|
|
35
|
-
description: flow.description ?? '',
|
|
36
|
-
value: flow.value,
|
|
37
|
-
schema: flow.schema
|
|
38
|
-
}
|
|
39
|
-
});
|
|
40
|
-
}
|
|
41
|
-
sendUserToast(`Success! flow saved at ${flow.path}`);
|
|
42
|
-
goto(`/flows/get/${flow.path}`);
|
|
15
|
+
if (initialPath == '') {
|
|
16
|
+
await FlowService.createFlow({
|
|
17
|
+
workspace: $workspaceStore,
|
|
18
|
+
requestBody: {
|
|
19
|
+
path: flow.path,
|
|
20
|
+
summary: flow.summary,
|
|
21
|
+
description: flow.description ?? '',
|
|
22
|
+
value: flow.value,
|
|
23
|
+
schema: flow.schema
|
|
24
|
+
}
|
|
25
|
+
});
|
|
43
26
|
}
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
27
|
+
else {
|
|
28
|
+
await FlowService.updateFlow({
|
|
29
|
+
workspace: $workspaceStore,
|
|
30
|
+
path: initialPath,
|
|
31
|
+
requestBody: {
|
|
32
|
+
path: flow.path,
|
|
33
|
+
summary: flow.summary,
|
|
34
|
+
description: flow.description ?? '',
|
|
35
|
+
value: flow.value,
|
|
36
|
+
schema: flow.schema
|
|
37
|
+
}
|
|
38
|
+
});
|
|
52
39
|
}
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
//await inferArgs(flow.content, flow.schema);
|
|
40
|
+
sendUserToast(`Success! flow saved at ${flow.path}`);
|
|
41
|
+
goto(`/flows/get/${flow.path}`);
|
|
56
42
|
}
|
|
57
43
|
async function changeStep(step) {
|
|
58
44
|
goto(`?step=${step}`);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<script>import { faPlus } from '@fortawesome/free-solid-svg-icons';
|
|
2
2
|
import { emptySchema } from '../utils';
|
|
3
3
|
import Icon from 'svelte-awesome';
|
|
4
|
-
import { FlowModuleValue, ScriptService } from '../gen
|
|
4
|
+
import { FlowModuleValue, ScriptService } from '../gen';
|
|
5
5
|
import SchemaEditor from './SchemaEditor.svelte';
|
|
6
6
|
import { workspaceStore } from '../stores';
|
|
7
7
|
import ModuleStep from './ModuleStep.svelte';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<script>import { faChevronDown, faChevronUp } from '@fortawesome/free-solid-svg-icons';
|
|
2
2
|
import { sendUserToast, truncateRev } from '../utils';
|
|
3
3
|
import Icon from 'svelte-awesome';
|
|
4
|
-
import { Job, JobService, InputTransform } from '../gen
|
|
4
|
+
import { Job, JobService, InputTransform } from '../gen';
|
|
5
5
|
import { workspaceStore } from '../stores';
|
|
6
6
|
import RunForm from './RunForm.svelte';
|
|
7
7
|
import FlowStatusViewer from './FlowStatusViewer.svelte';
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { truncateRev } from '../utils';
|
|
3
3
|
import Icon from 'svelte-awesome';
|
|
4
4
|
import { check } from 'svelte-awesome/icons';
|
|
5
|
-
import { CompletedJob, FlowModuleValue, FlowStatusModule, JobService, QueuedJob } from '../gen
|
|
5
|
+
import { CompletedJob, FlowModuleValue, FlowStatusModule, JobService, QueuedJob } from '../gen';
|
|
6
6
|
import { workspaceStore } from '../stores';
|
|
7
7
|
import DisplayResult from './DisplayResult.svelte';
|
|
8
8
|
import ChevronButton from './ChevronButton.svelte';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<script>import { userStore, workspaceStore } from '../stores';
|
|
2
2
|
import Modal from './Modal.svelte';
|
|
3
|
-
import { GroupService, UserService } from '../gen
|
|
3
|
+
import { GroupService, UserService } from '../gen';
|
|
4
4
|
import AutoComplete from 'simple-svelte-autocomplete';
|
|
5
5
|
import PageHeader from './PageHeader.svelte';
|
|
6
6
|
import TableCustom from './TableCustom.svelte';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<script>import { sendUserToast } from '../utils';
|
|
2
2
|
import Switch from './Switch.svelte';
|
|
3
3
|
import { createEventDispatcher } from 'svelte';
|
|
4
|
-
import { UserService } from '../gen
|
|
4
|
+
import { UserService } from '../gen';
|
|
5
5
|
const dispatch = createEventDispatcher();
|
|
6
6
|
let valid = true;
|
|
7
7
|
let modal;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import Switch from './Switch.svelte';
|
|
3
3
|
import { createEventDispatcher } from 'svelte';
|
|
4
4
|
import { workspaceStore } from '../stores';
|
|
5
|
-
import { WorkspaceService } from '../gen
|
|
5
|
+
import { WorkspaceService } from '../gen';
|
|
6
6
|
const dispatch = createEventDispatcher();
|
|
7
7
|
let valid = true;
|
|
8
8
|
let modal;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { SvelteComponentTyped } from "svelte";
|
|
2
2
|
import type { Schema } from '../common';
|
|
3
|
-
import type { Flow, FlowModule } from '../gen
|
|
3
|
+
import type { Flow, FlowModule } from '../gen';
|
|
4
4
|
import SchemaForm from './SchemaForm.svelte';
|
|
5
5
|
declare const __propDef: {
|
|
6
6
|
props: {
|
package/components/Path.svelte
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<script>import { pathToMeta } from '../common';
|
|
2
|
-
import { GroupService } from '../gen
|
|
2
|
+
import { GroupService } from '../gen';
|
|
3
3
|
import Tooltip from './Tooltip.svelte';
|
|
4
4
|
import { userStore, workspaceStore } from '../stores';
|
|
5
5
|
import { sleep } from '../utils';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<script>import { ResourceService, VariableService } from '../gen
|
|
1
|
+
<script>import { ResourceService, VariableService } from '../gen';
|
|
2
2
|
import { allTrue, emptySchema, sendUserToast } from '../utils';
|
|
3
3
|
import { createEventDispatcher } from 'svelte';
|
|
4
4
|
import Modal from './Modal.svelte';
|
|
@@ -50,18 +50,13 @@ export async function initEdit(p) {
|
|
|
50
50
|
modal.openModal();
|
|
51
51
|
}
|
|
52
52
|
async function createResource() {
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
modal.closeModal();
|
|
61
|
-
}
|
|
62
|
-
catch (err) {
|
|
63
|
-
sendUserToast(`${err}`, true);
|
|
64
|
-
}
|
|
53
|
+
await ResourceService.createResource({
|
|
54
|
+
workspace: $workspaceStore,
|
|
55
|
+
requestBody: { path, value: args, description, resource_type: resourceType.name }
|
|
56
|
+
});
|
|
57
|
+
sendUserToast(`Successfully created resource at ${path}`);
|
|
58
|
+
dispatch('refresh');
|
|
59
|
+
modal.closeModal();
|
|
65
60
|
}
|
|
66
61
|
async function editResource() {
|
|
67
62
|
try {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<script>import { createEventDispatcher } from 'svelte';
|
|
2
|
-
import { ResourceService } from '../gen
|
|
2
|
+
import { ResourceService } from '../gen';
|
|
3
3
|
import { workspaceStore } from '../stores';
|
|
4
4
|
import IconedResourceType from './IconedResourceType.svelte';
|
|
5
5
|
let resources = [];
|
|
@@ -14,23 +14,18 @@ let oldArgName; // when editing argument and changing name
|
|
|
14
14
|
let viewJsonSchema = false;
|
|
15
15
|
// Binding is not enough because monaco Editor does not support two-way binding
|
|
16
16
|
export function getSchema() {
|
|
17
|
-
|
|
18
|
-
|
|
17
|
+
try {
|
|
18
|
+
if (viewJsonSchema) {
|
|
19
19
|
schema = JSON.parse(schemaString);
|
|
20
20
|
return schema;
|
|
21
21
|
}
|
|
22
|
-
|
|
23
|
-
throw Error(`Error: input is not a valid schema: ${err}`);
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
else {
|
|
27
|
-
try {
|
|
22
|
+
else {
|
|
28
23
|
schemaString = JSON.stringify(schema, null, '\t');
|
|
29
24
|
return schema;
|
|
30
25
|
}
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
}
|
|
26
|
+
}
|
|
27
|
+
catch (err) {
|
|
28
|
+
throw Error(`Error: input is not a valid schema: ${err}`);
|
|
34
29
|
}
|
|
35
30
|
}
|
|
36
31
|
function handleAddOrEditArgument() {
|
|
@@ -88,7 +83,6 @@ function handleDeleteArgument(argName) {
|
|
|
88
83
|
}
|
|
89
84
|
}
|
|
90
85
|
catch (err) {
|
|
91
|
-
console.error(err);
|
|
92
86
|
sendUserToast(`Could not delete argument: ${err}`, true);
|
|
93
87
|
}
|
|
94
88
|
}
|
|
@@ -100,13 +94,8 @@ function switchTab() {
|
|
|
100
94
|
viewJsonSchema = false;
|
|
101
95
|
}
|
|
102
96
|
else {
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
viewJsonSchema = true;
|
|
106
|
-
}
|
|
107
|
-
catch (err) {
|
|
108
|
-
sendUserToast(err, true);
|
|
109
|
-
}
|
|
97
|
+
schemaString = JSON.stringify(schema, null, '\t');
|
|
98
|
+
viewJsonSchema = true;
|
|
110
99
|
}
|
|
111
100
|
}
|
|
112
101
|
</script>
|
|
@@ -46,7 +46,7 @@ export async function main(x: string, y: string = 'default arg') {
|
|
|
46
46
|
`
|
|
47
47
|
</script>
|
|
48
48
|
|
|
49
|
-
<script>import { ScriptService } from '../gen
|
|
49
|
+
<script>import { ScriptService } from '../gen';
|
|
50
50
|
import { emptySchema, sendUserToast } from '../utils';
|
|
51
51
|
import { onDestroy } from 'svelte';
|
|
52
52
|
import ScriptEditor from './ScriptEditor.svelte';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<script>import { JobService, Job, CompletedJob, VariableService, ResourceService, ScriptService } from '../gen
|
|
1
|
+
<script>import { JobService, Job, CompletedJob, VariableService, ResourceService, ScriptService } from '../gen';
|
|
2
2
|
import { sendUserToast, emptySchema, displayDate } from '../utils';
|
|
3
3
|
import { fade } from 'svelte/transition';
|
|
4
4
|
import Icon from 'svelte-awesome';
|
|
@@ -88,7 +88,7 @@ export async function runPreview() {
|
|
|
88
88
|
}
|
|
89
89
|
catch (err) {
|
|
90
90
|
previewIsLoading = false;
|
|
91
|
-
|
|
91
|
+
throw err;
|
|
92
92
|
}
|
|
93
93
|
}
|
|
94
94
|
async function loadPastPreviews() {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<script>import { sendUserToast } from '../utils';
|
|
2
|
-
import { ScriptService, FlowService, Script } from '../gen
|
|
2
|
+
import { ScriptService, FlowService, Script } from '../gen';
|
|
3
3
|
import Icon from 'svelte-awesome';
|
|
4
4
|
import { faSearch } from '@fortawesome/free-solid-svg-icons';
|
|
5
5
|
import { hubScripts, workspaceStore } from '../stores';
|
|
@@ -38,19 +38,14 @@ async function getScript() {
|
|
|
38
38
|
}
|
|
39
39
|
}
|
|
40
40
|
async function loadItems() {
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
items = await FlowService.listFlows({ workspace: $workspaceStore });
|
|
44
|
-
}
|
|
45
|
-
else if (itemKind == 'script') {
|
|
46
|
-
items = await ScriptService.listScripts({ workspace: $workspaceStore });
|
|
47
|
-
}
|
|
48
|
-
else {
|
|
49
|
-
items = $hubScripts ?? [];
|
|
50
|
-
}
|
|
41
|
+
if (itemKind == 'flow') {
|
|
42
|
+
items = await FlowService.listFlows({ workspace: $workspaceStore });
|
|
51
43
|
}
|
|
52
|
-
|
|
53
|
-
|
|
44
|
+
else if (itemKind == 'script') {
|
|
45
|
+
items = await ScriptService.listScripts({ workspace: $workspaceStore });
|
|
46
|
+
}
|
|
47
|
+
else {
|
|
48
|
+
items = $hubScripts ?? [];
|
|
54
49
|
}
|
|
55
50
|
}
|
|
56
51
|
$: {
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import TableCustom from './TableCustom.svelte';
|
|
3
3
|
import { GranularAclService } from '../gen/services/GranularAclService';
|
|
4
4
|
import { sendUserToast } from '../utils';
|
|
5
|
-
import { GroupService, UserService } from '../gen
|
|
5
|
+
import { GroupService, UserService } from '../gen';
|
|
6
6
|
import { createEventDispatcher } from 'svelte';
|
|
7
7
|
import AutoComplete from 'simple-svelte-autocomplete';
|
|
8
8
|
import { workspaceStore } from '../stores';
|
|
@@ -52,19 +52,14 @@ async function deleteAcl(owner) {
|
|
|
52
52
|
}
|
|
53
53
|
}
|
|
54
54
|
async function addAcl(owner, write) {
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
dispatch('change');
|
|
64
|
-
}
|
|
65
|
-
catch (err) {
|
|
66
|
-
sendUserToast(err.toString(), true);
|
|
67
|
-
}
|
|
55
|
+
await GranularAclService.addGranularAcls({
|
|
56
|
+
workspace: $workspaceStore,
|
|
57
|
+
path,
|
|
58
|
+
kind,
|
|
59
|
+
requestBody: { owner, write }
|
|
60
|
+
});
|
|
61
|
+
loadAcls();
|
|
62
|
+
dispatch('change');
|
|
68
63
|
}
|
|
69
64
|
</script>
|
|
70
65
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<script>import Password from './Password.svelte';
|
|
2
2
|
import { sendUserToast } from '../utils';
|
|
3
|
-
import { VariableService } from '../gen
|
|
3
|
+
import { VariableService } from '../gen';
|
|
4
4
|
import AutosizedTextarea from './AutosizedTextarea.svelte';
|
|
5
5
|
import Path from './Path.svelte';
|
|
6
6
|
import Modal from './Modal.svelte';
|
|
@@ -45,23 +45,18 @@ export async function editVariable(path) {
|
|
|
45
45
|
const MAX_VARIABLE_LENGTH = 3000;
|
|
46
46
|
$: valid = variable.value.length < MAX_VARIABLE_LENGTH;
|
|
47
47
|
async function createVariable() {
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
modal.closeModal();
|
|
61
|
-
}
|
|
62
|
-
catch (err) {
|
|
63
|
-
sendUserToast(`Could not create variable: ${err.body}`, true);
|
|
64
|
-
}
|
|
48
|
+
await VariableService.createVariable({
|
|
49
|
+
workspace: $workspaceStore,
|
|
50
|
+
requestBody: {
|
|
51
|
+
path,
|
|
52
|
+
value: variable.value,
|
|
53
|
+
is_secret: variable.is_secret,
|
|
54
|
+
description: variable.description
|
|
55
|
+
}
|
|
56
|
+
});
|
|
57
|
+
sendUserToast(`Successfully created variable ${path}`);
|
|
58
|
+
dispatch('create');
|
|
59
|
+
modal.closeModal();
|
|
65
60
|
}
|
|
66
61
|
async function updateVariable() {
|
|
67
62
|
try {
|
package/gen/core/ApiError.js
CHANGED
|
@@ -11,6 +11,14 @@ export class CancelError extends Error {
|
|
|
11
11
|
}
|
|
12
12
|
}
|
|
13
13
|
export class CancelablePromise {
|
|
14
|
+
[Symbol.toStringTag];
|
|
15
|
+
_isResolved;
|
|
16
|
+
_isRejected;
|
|
17
|
+
_isCancelled;
|
|
18
|
+
_cancelHandlers;
|
|
19
|
+
_promise;
|
|
20
|
+
_resolve;
|
|
21
|
+
_reject;
|
|
14
22
|
constructor(executor) {
|
|
15
23
|
this._isResolved = false;
|
|
16
24
|
this._isRejected = false;
|
|
@@ -83,4 +91,3 @@ export class CancelablePromise {
|
|
|
83
91
|
return this._isCancelled;
|
|
84
92
|
}
|
|
85
93
|
}
|
|
86
|
-
Symbol.toStringTag;
|
package/infer.js
CHANGED
|
@@ -1,42 +1,36 @@
|
|
|
1
|
-
import { ScriptService } from './gen
|
|
1
|
+
import { ScriptService } from './gen';
|
|
2
2
|
import { sendUserToast } from './utils.js';
|
|
3
3
|
export async function inferArgs(language, code, schema) {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
4
|
+
let inferedSchema;
|
|
5
|
+
if (language == 'python3') {
|
|
6
|
+
inferedSchema = await ScriptService.pythonToJsonschema({
|
|
7
|
+
requestBody: code
|
|
8
|
+
});
|
|
9
|
+
}
|
|
10
|
+
else if (language == 'deno') {
|
|
11
|
+
inferedSchema = await ScriptService.denoToJsonschema({
|
|
12
|
+
requestBody: code
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
else {
|
|
16
|
+
return;
|
|
17
|
+
}
|
|
18
|
+
schema.required = [];
|
|
19
|
+
const oldProperties = Object.assign({}, schema.properties);
|
|
20
|
+
schema.properties = {};
|
|
21
|
+
for (const arg of inferedSchema.args) {
|
|
22
|
+
if (!(arg.name in oldProperties)) {
|
|
23
|
+
schema.properties[arg.name] = { description: '', type: '' };
|
|
15
24
|
}
|
|
16
25
|
else {
|
|
17
|
-
|
|
26
|
+
schema.properties[arg.name] = oldProperties[arg.name];
|
|
18
27
|
}
|
|
19
|
-
schema.
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
if (!(arg.name in oldProperties)) {
|
|
24
|
-
schema.properties[arg.name] = { description: '', type: '' };
|
|
25
|
-
}
|
|
26
|
-
else {
|
|
27
|
-
schema.properties[arg.name] = oldProperties[arg.name];
|
|
28
|
-
}
|
|
29
|
-
argSigToJsonSchemaType(arg.typ, schema.properties[arg.name]);
|
|
30
|
-
schema.properties[arg.name].default = arg.default;
|
|
31
|
-
if (!arg.has_default) {
|
|
32
|
-
schema.required.push(arg.name);
|
|
33
|
-
}
|
|
28
|
+
argSigToJsonSchemaType(arg.typ, schema.properties[arg.name]);
|
|
29
|
+
schema.properties[arg.name].default = arg.default;
|
|
30
|
+
if (!arg.has_default) {
|
|
31
|
+
schema.required.push(arg.name);
|
|
34
32
|
}
|
|
35
33
|
}
|
|
36
|
-
catch (err) {
|
|
37
|
-
console.error(err);
|
|
38
|
-
sendUserToast(`Could not infer schema: ${err.body ?? err}`, true);
|
|
39
|
-
}
|
|
40
34
|
}
|
|
41
35
|
function argSigToJsonSchemaType(t, s) {
|
|
42
36
|
if (t === 'int') {
|
package/logout.js
CHANGED
package/package.json
CHANGED
package/user.js
CHANGED