windmill-components 1.430.4 → 1.430.6
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.
|
@@ -5,7 +5,6 @@ import TableCustom from './TableCustom.svelte';
|
|
|
5
5
|
import { Button } from './common';
|
|
6
6
|
import Drawer from './common/drawer/Drawer.svelte';
|
|
7
7
|
import DrawerContent from './common/drawer/DrawerContent.svelte';
|
|
8
|
-
import { goto as gotoUrl } from '$app/navigation';
|
|
9
8
|
import { sendUserToast } from '../toast';
|
|
10
9
|
import Tooltip from './Tooltip.svelte';
|
|
11
10
|
import Version from './Version.svelte';
|
|
@@ -35,12 +34,7 @@ export function closeDrawer() {
|
|
|
35
34
|
removeHash();
|
|
36
35
|
}
|
|
37
36
|
function removeHash() {
|
|
38
|
-
|
|
39
|
-
const index = href.lastIndexOf('#');
|
|
40
|
-
if (index === -1)
|
|
41
|
-
return;
|
|
42
|
-
const hashRemoved = href.slice(0, index);
|
|
43
|
-
gotoUrl(hashRemoved);
|
|
37
|
+
window.location.hash = '';
|
|
44
38
|
}
|
|
45
39
|
async function setPassword() {
|
|
46
40
|
if (newPassword) {
|
|
@@ -13,7 +13,6 @@ import { Loader2, Save, Pipette } from 'lucide-svelte';
|
|
|
13
13
|
import Label from '../Label.svelte';
|
|
14
14
|
import ToggleButton from '../common/toggleButton-v2/ToggleButton.svelte';
|
|
15
15
|
import ToggleButtonGroup from '../common/toggleButton-v2/ToggleButtonGroup.svelte';
|
|
16
|
-
import { page } from '$app/stores';
|
|
17
16
|
import { isCloudHosted } from '../../cloud';
|
|
18
17
|
import { base } from '../../base';
|
|
19
18
|
import S3FilePicker from '../S3FilePicker.svelte';
|
|
@@ -149,7 +148,7 @@ async function triggerScript() {
|
|
|
149
148
|
}
|
|
150
149
|
let drawer;
|
|
151
150
|
let dirtyPath = false;
|
|
152
|
-
$: fullRoute = `${
|
|
151
|
+
$: fullRoute = `${window.location.origin}${base}/api/r/${isCloudHosted() ? $workspaceStore + '/' : ''}${route_path}`;
|
|
153
152
|
async function routeExists(route_path, method) {
|
|
154
153
|
return await HttpTriggerService.existsRoute({
|
|
155
154
|
workspace: $workspaceStore,
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
<script>import
|
|
2
|
-
import Tooltip from '../Tooltip.svelte';
|
|
1
|
+
<script>import Tooltip from '../Tooltip.svelte';
|
|
3
2
|
import { userStore, workspaceStore } from '../../stores';
|
|
4
3
|
import bash from 'svelte-highlight/languages/bash';
|
|
5
4
|
import { Tabs, Tab, TabContent, Button, Alert } from '../common';
|
|
@@ -29,7 +28,7 @@ let selectedTab = 'rest';
|
|
|
29
28
|
let webhooks;
|
|
30
29
|
$: webhooks = isFlow ? computeFlowWebhooks(path) : computeScriptWebhooks(hash, path);
|
|
31
30
|
function computeScriptWebhooks(hash, path) {
|
|
32
|
-
let webhookBase = `${
|
|
31
|
+
let webhookBase = `${window.location.origin}${base}/api/w/${$workspaceStore}/jobs`;
|
|
33
32
|
return {
|
|
34
33
|
async: {
|
|
35
34
|
hash: `${webhookBase}/run/h/${hash}`,
|
|
@@ -43,7 +42,7 @@ function computeScriptWebhooks(hash, path) {
|
|
|
43
42
|
};
|
|
44
43
|
}
|
|
45
44
|
function computeFlowWebhooks(path) {
|
|
46
|
-
let webhooksBase = `${
|
|
45
|
+
let webhooksBase = `${window.location.origin}${base}/api/w/${$workspaceStore}/jobs`;
|
|
47
46
|
let urlAsync = `${webhooksBase}/run/f/${path}`;
|
|
48
47
|
let urlSync = `${webhooksBase}/run_wait_result/f/${path}`;
|
|
49
48
|
return {
|
|
@@ -128,7 +127,7 @@ async function triggerJob() {
|
|
|
128
127
|
function waitForJobCompletion(UUID) {
|
|
129
128
|
return new Promise(async (resolve, reject) => {
|
|
130
129
|
try {
|
|
131
|
-
const endpoint = \`${
|
|
130
|
+
const endpoint = \`${window.location.origin}/api/w/${$workspaceStore}/jobs_u/completed/get_result_maybe/\${UUID}\`;
|
|
132
131
|
const checkResponse = await fetch(endpoint, {
|
|
133
132
|
method: 'GET',
|
|
134
133
|
headers: ${JSON.stringify(headers(), null, 2).replaceAll('\n', '\n\t\t\t\t')}
|
|
@@ -162,7 +161,7 @@ ${webhookType === 'sync' ? 'RESULT' : 'UUID'}=$(curl -s ${requestType != 'get_pa
|
|
|
162
161
|
${webhookType === 'sync'
|
|
163
162
|
? 'echo -E $RESULT | jq'
|
|
164
163
|
: `
|
|
165
|
-
URL="${
|
|
164
|
+
URL="${window.location.origin}/api/w/${$workspaceStore}/jobs_u/completed/get_result_maybe/$UUID"
|
|
166
165
|
while true; do
|
|
167
166
|
curl -s -H "Authorization: Bearer $TOKEN" $URL -o res.json
|
|
168
167
|
COMPLETED=$(cat res.json | jq .completed)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "windmill-components",
|
|
3
|
-
"version": "1.430.
|
|
3
|
+
"version": "1.430.6",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"dev": "vite dev",
|
|
6
6
|
"build": "vite build",
|
|
@@ -256,9 +256,9 @@
|
|
|
256
256
|
"default": "./package/components/FlowBuilder.svelte"
|
|
257
257
|
},
|
|
258
258
|
"./components/AppEditor.svelte": {
|
|
259
|
-
"types": "./package/components/
|
|
260
|
-
"svelte": "./package/components/
|
|
261
|
-
"default": "./package/components/
|
|
259
|
+
"types": "./package/components/apps/editor/AppEditor.svelte.d.ts",
|
|
260
|
+
"svelte": "./package/components/apps/editor/AppEditor.svelte",
|
|
261
|
+
"default": "./package/components/apps/editor/AppEditor.svelte"
|
|
262
262
|
},
|
|
263
263
|
"./components/ScriptBuilder.svelte": {
|
|
264
264
|
"types": "./package/components/ScriptBuilder.svelte.d.ts",
|
|
@@ -438,7 +438,7 @@
|
|
|
438
438
|
"./package/components/FlowBuilder.svelte.d.ts"
|
|
439
439
|
],
|
|
440
440
|
"components/AppEditor.svelte": [
|
|
441
|
-
"./package/components/
|
|
441
|
+
"./package/components/apps/editor/AppEditor.svelte.d.ts"
|
|
442
442
|
],
|
|
443
443
|
"components/ScriptBuilder.svelte": [
|
|
444
444
|
"./package/components/ScriptBuilder.svelte.d.ts"
|