windmill-components 1.379.2 → 1.379.3
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/package/components/common/table/AppRow.svelte +2 -1
- package/package/components/common/table/FlowRow.svelte +2 -1
- package/package/components/common/table/RawAppRow.svelte +1 -1
- package/package/components/common/table/ScriptRow.svelte +2 -1
- package/package/utils.d.ts +1 -4
- package/package/utils.js +0 -19
- package/package/utils_deployable.d.ts +5 -0
- package/package/utils_deployable.js +19 -0
- package/package.json +1 -1
|
@@ -11,9 +11,10 @@ import Badge from '../badge/Badge.svelte';
|
|
|
11
11
|
import { ExternalLink, Eye, File, FileJson, FileUp, GitFork, Globe, History, Pen, Share, Trash, Clipboard } from 'lucide-svelte';
|
|
12
12
|
import { goto as gotoUrl } from '$app/navigation';
|
|
13
13
|
import { page } from '$app/stores';
|
|
14
|
-
import { DELETE, copyToClipboard
|
|
14
|
+
import { DELETE, copyToClipboard } from '../../../utils';
|
|
15
15
|
import AppDeploymentHistory from '../../apps/editor/AppDeploymentHistory.svelte';
|
|
16
16
|
import AppJsonEditor from '../../apps/editor/AppJsonEditor.svelte';
|
|
17
|
+
import { isDeployable } from '../../../utils_deployable';
|
|
17
18
|
export let app;
|
|
18
19
|
export let marked;
|
|
19
20
|
export let starred;
|
|
@@ -11,7 +11,8 @@ import Button from '../button/Button.svelte';
|
|
|
11
11
|
import Row from './Row.svelte';
|
|
12
12
|
import DraftBadge from '../../DraftBadge.svelte';
|
|
13
13
|
import { sendUserToast } from '../../../toast';
|
|
14
|
-
import { DELETE, copyToClipboard,
|
|
14
|
+
import { DELETE, copyToClipboard, isOwner } from '../../../utils';
|
|
15
|
+
import { isDeployable } from '../../../utils_deployable';
|
|
15
16
|
import { Pen, GitFork, Trash, List, FileUp, Globe, Calendar, Share, Archive, Clipboard, Eye, HistoryIcon } from 'lucide-svelte';
|
|
16
17
|
import FlowHistory from '../../flows/FlowHistory.svelte';
|
|
17
18
|
export let flow;
|
|
@@ -11,7 +11,7 @@ import DrawerContent from '../drawer/DrawerContent.svelte';
|
|
|
11
11
|
import FileInput from '../fileInput/FileInput.svelte';
|
|
12
12
|
import { goto } from '../../../navigation';
|
|
13
13
|
import { FileUp, Globe, Pen, Share, Trash } from 'lucide-svelte';
|
|
14
|
-
import { isDeployable } from '../../../
|
|
14
|
+
import { isDeployable } from '../../../utils_deployable';
|
|
15
15
|
export let app;
|
|
16
16
|
export let marked;
|
|
17
17
|
export let starred;
|
|
@@ -11,7 +11,8 @@ import Button from '../button/Button.svelte';
|
|
|
11
11
|
import Row from './Row.svelte';
|
|
12
12
|
import DraftBadge from '../../DraftBadge.svelte';
|
|
13
13
|
import { sendUserToast } from '../../../toast';
|
|
14
|
-
import { copyToClipboard, DELETE,
|
|
14
|
+
import { copyToClipboard, DELETE, isOwner } from '../../../utils';
|
|
15
|
+
import { isDeployable } from '../../../utils_deployable';
|
|
15
16
|
import { LanguageIcon } from '../languageIcons';
|
|
16
17
|
import { Archive, Calendar, Code, Copy, Eye, FileUp, GitFork, List, Pen, Share, Trash, History } from 'lucide-svelte';
|
|
17
18
|
import ScriptVersionHistory from '../../ScriptVersionHistory.svelte';
|
package/package/utils.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { UserExt } from './stores';
|
|
2
2
|
import { sendUserToast } from './toast';
|
|
3
|
-
import type { Script
|
|
3
|
+
import type { Script } from './gen';
|
|
4
4
|
import type { EnumType, SchemaProperty } from './common';
|
|
5
5
|
import type { Schema } from './common';
|
|
6
6
|
export { sendUserToast };
|
|
@@ -105,6 +105,3 @@ export declare function shouldDisplayPlaceholder(type: string | undefined, forma
|
|
|
105
105
|
export declare function getSchemaFromProperties(properties: {
|
|
106
106
|
[name: string]: SchemaProperty;
|
|
107
107
|
}): Schema;
|
|
108
|
-
type DeployUIType = 'script' | 'flow' | 'app' | 'resource' | 'variable' | 'secret';
|
|
109
|
-
export declare function isDeployable(type: DeployUIType, path: string, deployUiSettings: WorkspaceDeployUISettings | undefined): boolean;
|
|
110
|
-
export declare const ALL_DEPLOYABLE: WorkspaceDeployUISettings;
|
package/package/utils.js
CHANGED
|
@@ -9,7 +9,6 @@
|
|
|
9
9
|
import { deepEqual } from 'fast-equals';
|
|
10
10
|
import YAML from 'yaml';
|
|
11
11
|
import { sendUserToast } from './toast';
|
|
12
|
-
import { minimatch } from 'minimatch';
|
|
13
12
|
export { sendUserToast };
|
|
14
13
|
export function validateUsername(username) {
|
|
15
14
|
if (username != '' && !/^[a-zA-Z]\w+$/.test(username)) {
|
|
@@ -800,21 +799,3 @@ export function getSchemaFromProperties(properties) {
|
|
|
800
799
|
order: Object.keys(properties).filter((k) => k !== 'label')
|
|
801
800
|
};
|
|
802
801
|
}
|
|
803
|
-
export function isDeployable(type, path, deployUiSettings) {
|
|
804
|
-
if (deployUiSettings == undefined) {
|
|
805
|
-
return false;
|
|
806
|
-
}
|
|
807
|
-
if (deployUiSettings.include_type != undefined && !deployUiSettings.include_type.includes(type)) {
|
|
808
|
-
return false;
|
|
809
|
-
}
|
|
810
|
-
if (deployUiSettings.include_path != undefined &&
|
|
811
|
-
deployUiSettings.include_path.length != 0 &&
|
|
812
|
-
deployUiSettings.include_path.every((x) => !minimatch(path, x))) {
|
|
813
|
-
return false;
|
|
814
|
-
}
|
|
815
|
-
return true;
|
|
816
|
-
}
|
|
817
|
-
export const ALL_DEPLOYABLE = {
|
|
818
|
-
include_path: [],
|
|
819
|
-
include_type: ['script', 'flow', 'app', 'resource', 'variable', 'secret']
|
|
820
|
-
};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { WorkspaceDeployUISettings } from './gen';
|
|
2
|
+
type DeployUIType = 'script' | 'flow' | 'app' | 'resource' | 'variable' | 'secret';
|
|
3
|
+
export declare function isDeployable(type: DeployUIType, path: string, deployUiSettings: WorkspaceDeployUISettings | undefined): boolean;
|
|
4
|
+
export declare const ALL_DEPLOYABLE: WorkspaceDeployUISettings;
|
|
5
|
+
export {};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { minimatch } from 'minimatch';
|
|
2
|
+
export function isDeployable(type, path, deployUiSettings) {
|
|
3
|
+
if (deployUiSettings == undefined) {
|
|
4
|
+
return false;
|
|
5
|
+
}
|
|
6
|
+
if (deployUiSettings.include_type != undefined && !deployUiSettings.include_type.includes(type)) {
|
|
7
|
+
return false;
|
|
8
|
+
}
|
|
9
|
+
if (deployUiSettings.include_path != undefined &&
|
|
10
|
+
deployUiSettings.include_path.length != 0 &&
|
|
11
|
+
deployUiSettings.include_path.every((x) => !minimatch(path, x))) {
|
|
12
|
+
return false;
|
|
13
|
+
}
|
|
14
|
+
return true;
|
|
15
|
+
}
|
|
16
|
+
export const ALL_DEPLOYABLE = {
|
|
17
|
+
include_path: [],
|
|
18
|
+
include_type: ['script', 'flow', 'app', 'resource', 'variable', 'secret']
|
|
19
|
+
};
|