windmill-components 1.103.0 → 1.103.2

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/cloud.js CHANGED
@@ -1,11 +1,10 @@
1
1
  import { BROWSER } from 'esm-env';
2
- import { page } from '$app/stores';
3
2
  import { get } from 'svelte/store';
4
3
  import { premiumStore, userStore, workspaceStore } from './stores';
5
4
  import { getUserExt } from './user';
6
5
  import { WorkspaceService } from './gen';
7
6
  export function isCloudHosted() {
8
- return get(page)?.url?.hostname == 'app.windmill.dev';
7
+ return BROWSER && window.location.hostname == 'app.windmill.dev';
9
8
  }
10
9
  if (BROWSER) {
11
10
  workspaceStore.subscribe(async (workspace) => {
@@ -1,6 +1,6 @@
1
1
  export const OpenAPI = {
2
2
  BASE: '/api',
3
- VERSION: '1.101.1',
3
+ VERSION: '1.103.0',
4
4
  WITH_CREDENTIALS: false,
5
5
  CREDENTIALS: 'include',
6
6
  TOKEN: undefined,
@@ -3,4 +3,5 @@ export type EditSchedule = {
3
3
  schedule: string;
4
4
  timezone: string;
5
5
  args: ScriptArgs;
6
+ on_failure?: string;
6
7
  };
@@ -7,4 +7,5 @@ export type NewSchedule = {
7
7
  is_flow: boolean;
8
8
  args: ScriptArgs;
9
9
  enabled?: boolean;
10
+ on_failure?: string;
10
11
  };
@@ -12,4 +12,5 @@ export type Schedule = {
12
12
  extra_perms: Record<string, boolean>;
13
13
  email: string;
14
14
  error?: string;
15
+ on_failure?: string;
15
16
  };
@@ -0,0 +1 @@
1
+ export declare function refreshSuperadmin(): Promise<void>;
@@ -0,0 +1,21 @@
1
+ import { get } from 'svelte/store';
2
+ import { UserService } from './gen';
3
+ import { superadmin } from './stores.js';
4
+ import { goto } from '$app/navigation';
5
+ export async function refreshSuperadmin() {
6
+ if (get(superadmin) == undefined) {
7
+ try {
8
+ const me = await UserService.globalWhoami();
9
+ if (me.super_admin) {
10
+ superadmin.set(me.email);
11
+ }
12
+ else {
13
+ superadmin.set(false);
14
+ }
15
+ }
16
+ catch {
17
+ superadmin.set(false);
18
+ goto('/user/logout');
19
+ }
20
+ }
21
+ }
package/package/user.d.ts CHANGED
@@ -1,3 +1,2 @@
1
- import { type UserExt } from './stores.js';
2
- export declare function refreshSuperadmin(): Promise<void>;
1
+ import type { UserExt } from './stores.js';
3
2
  export declare function getUserExt(workspace: string): Promise<UserExt | undefined>;
package/package/user.js CHANGED
@@ -1,24 +1,4 @@
1
- import { get } from 'svelte/store';
2
1
  import { UserService } from './gen';
3
- import { superadmin } from './stores.js';
4
- import { goto } from '$app/navigation';
5
- export async function refreshSuperadmin() {
6
- if (get(superadmin) == undefined) {
7
- try {
8
- const me = await UserService.globalWhoami();
9
- if (me.super_admin) {
10
- superadmin.set(me.email);
11
- }
12
- else {
13
- superadmin.set(false);
14
- }
15
- }
16
- catch {
17
- superadmin.set(false);
18
- goto('/user/logout');
19
- }
20
- }
21
- }
22
2
  export async function getUserExt(workspace) {
23
3
  try {
24
4
  const user = await UserService.whoami({ workspace });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "windmill-components",
3
- "version": "1.103.0",
3
+ "version": "1.103.2",
4
4
  "scripts": {
5
5
  "dev": "vite dev",
6
6
  "build": "vite build",