Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@tauri-apps/api

Package Overview
Dependencies
Maintainers
5
Versions
81
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@tauri-apps/api - npm Package Compare versions

Comparing version 2.0.0-alpha.5 to 2.0.0-alpha.6

chunk-4EPV3FVZ.js

6

CHANGELOG.md
# Changelog
## \[2.0.0-alpha.6]
### New Features
- [`4af5c5a8`](https://www.github.com/tauri-apps/tauri/commit/4af5c5a8293263c16f8a65e8d232f2de52f41701)([#7170](https://www.github.com/tauri-apps/tauri/pull/7170)) Change the IPC call to align with the new format for the custom protocol based API.
## \[2.0.0-alpha.5]

@@ -4,0 +10,0 @@

2

event.js

@@ -1,1 +0,1 @@

import{a,b,c,d}from"./chunk-Z6K374JS.js";import"./chunk-3YK5DLRW.js";import"./chunk-WVIOQTRJ.js";export{a as TauriEvent,d as emit,b as listen,c as once};
import{a,b,c,d}from"./chunk-4EPV3FVZ.js";import"./chunk-VMGITBBQ.js";import"./chunk-WVIOQTRJ.js";export{a as TauriEvent,d as emit,b as listen,c as once};
export { e as event } from './event-506df71d.js';
import { i as invoke$1 } from './tauri-d78b6be0.js';
export { t as tauri } from './tauri-d78b6be0.js';
export { p as path } from './path-f8d71c21.js';
import { i as invoke$1 } from './tauri-ace39cd1.js';
export { t as tauri } from './tauri-ace39cd1.js';
export { p as path } from './path-9694881f.js';

@@ -6,0 +6,0 @@ /**

@@ -1,1 +0,1 @@

import{e as t}from"./chunk-Z6K374JS.js";import{I as i}from"./chunk-7WJWFJRR.js";import{e as o,g as r}from"./chunk-3YK5DLRW.js";import"./chunk-WVIOQTRJ.js";var a=o;export{t as event,a as invoke,i as path,r as tauri};
import{e as t}from"./chunk-4EPV3FVZ.js";import{I as i}from"./chunk-EWD5IYKL.js";import{e as o,g as r}from"./chunk-VMGITBBQ.js";import"./chunk-WVIOQTRJ.js";var a=o;export{t as event,a as invoke,i as path,r as tauri};

@@ -31,6 +31,6 @@ /** @ignore */

* test("mocked command", () => {
* mockIPC((cmd, args) => {
* mockIPC((cmd, payload) => {
* switch (cmd) {
* case "add":
* return (args.a as number) + (args.b as number);
* return (payload.a as number) + (payload.b as number);
* default:

@@ -55,3 +55,3 @@ * break;

* test("mocked command", () => {
* mockIPC((cmd, args) => {
* mockIPC((cmd, payload) => {
* if(cmd === "get_data") {

@@ -69,3 +69,3 @@ * return fetch("https://example.com/data.json")

*/
declare function mockIPC(cb: (cmd: string, args: Record<string, unknown>) => any | Promise<any>): void;
declare function mockIPC(cb: (cmd: string, payload: Record<string, unknown>) => any | Promise<any>): void;
/**

@@ -97,17 +97,9 @@ * Mocks one or many window labels.

* mockIPC((cmd, args) => {
* if (cmd === "tauri") {
* if (
* args?.__tauriModule === "Window" &&
* args?.message?.cmd === "manage" &&
* args?.message?.data?.cmd?.type === "close"
* ) {
* console.log('closing window!');
* }
* if (cmd === "plugin:event|emit") {
* console.log('emit event', args?.event, args?.payload);
* }
* });
*
* const { getCurrent } = await import("@tauri-apps/api/window");
*
* const win = getCurrent();
* await win.close(); // this will cause the mocked IPC handler to log to the console.
* const { emit } = await import("@tauri-apps/api/event");
* await emit('loaded'); // this will cause the mocked IPC handler to log to the console.
* ```

@@ -114,0 +106,0 @@ *

@@ -1,1 +0,1 @@

import"./chunk-WVIOQTRJ.js";function w(n){window.__TAURI_IPC__=async({cmd:e,callback:_,error:i,...o})=>{try{window[`_${_}`](await n(e,o))}catch(r){window[`_${i}`](r)}}}function d(n,...e){window.__TAURI_METADATA__={__windows:[n,...e].map(_=>({label:_})),__currentWindow:{label:n}}}function t(){delete window.__TAURI_IPC__,delete window.__TAURI_METADATA__}export{t as clearMocks,w as mockIPC,d as mockWindows};
import"./chunk-WVIOQTRJ.js";function w(n){window.__TAURI_IPC__=async({cmd:e,callback:_,error:o,payload:i})=>{try{window[`_${_}`](await n(e,i))}catch(r){window[`_${o}`](r)}}}function d(n,...e){window.__TAURI_METADATA__={__windows:[n,...e].map(_=>({label:_})),__currentWindow:{label:n}}}function t(){delete window.__TAURI_IPC__,delete window.__TAURI_METADATA__}export{t as clearMocks,w as mockIPC,d as mockWindows};
{
"name": "@tauri-apps/api",
"version": "2.0.0-alpha.5",
"version": "2.0.0-alpha.6",
"description": "Tauri API definitions",

@@ -63,3 +63,6 @@ "type": "module",

},
"devDependencies": {}
"devDependencies": {},
"resolutions": {
"semver": ">=7.5.2"
}
}

@@ -1,1 +0,1 @@

export { B as BaseDirectory, d as appCacheDir, a as appConfigDir, b as appDataDir, c as appLocalDataDir, e as appLogDir, f as audioDir, G as basename, g as cacheDir, h as configDir, i as dataDir, z as delimiter, j as desktopDir, E as dirname, k as documentDir, l as downloadDir, m as executableDir, F as extname, n as fontDir, o as homeDir, H as isAbsolute, D as join, q as localDataDir, C as normalize, r as pictureDir, s as publicDir, A as resolve, u as resolveResource, t as resourceDir, v as runtimeDir, y as sep, I as tempDir, w as templateDir, x as videoDir } from './path-f8d71c21.js';
export { B as BaseDirectory, d as appCacheDir, a as appConfigDir, b as appDataDir, c as appLocalDataDir, e as appLogDir, f as audioDir, G as basename, g as cacheDir, h as configDir, i as dataDir, z as delimiter, j as desktopDir, E as dirname, k as documentDir, l as downloadDir, m as executableDir, F as extname, n as fontDir, o as homeDir, H as isAbsolute, D as join, q as localDataDir, C as normalize, r as pictureDir, s as publicDir, A as resolve, u as resolveResource, t as resourceDir, v as runtimeDir, y as sep, I as tempDir, w as templateDir, x as videoDir } from './path-9694881f.js';

@@ -1,1 +0,1 @@

import{A,B,C,D,E,F,G,H,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z}from"./chunk-7WJWFJRR.js";import"./chunk-3YK5DLRW.js";import"./chunk-WVIOQTRJ.js";export{a as BaseDirectory,e as appCacheDir,b as appConfigDir,c as appDataDir,d as appLocalDataDir,x as appLogDir,f as audioDir,G as basename,g as cacheDir,h as configDir,i as dataDir,A as delimiter,j as desktopDir,E as dirname,k as documentDir,l as downloadDir,m as executableDir,F as extname,n as fontDir,o as homeDir,H as isAbsolute,D as join,p as localDataDir,C as normalize,q as pictureDir,r as publicDir,B as resolve,t as resolveResource,s as resourceDir,u as runtimeDir,z as sep,y as tempDir,v as templateDir,w as videoDir};
import{A,B,C,D,E,F,G,H,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z}from"./chunk-EWD5IYKL.js";import"./chunk-VMGITBBQ.js";import"./chunk-WVIOQTRJ.js";export{a as BaseDirectory,e as appCacheDir,b as appConfigDir,c as appDataDir,d as appLocalDataDir,x as appLogDir,f as audioDir,G as basename,g as cacheDir,h as configDir,i as dataDir,A as delimiter,j as desktopDir,E as dirname,k as documentDir,l as downloadDir,m as executableDir,F as extname,n as fontDir,o as homeDir,H as isAbsolute,D as join,p as localDataDir,C as normalize,q as pictureDir,r as publicDir,B as resolve,t as resolveResource,s as resourceDir,u as runtimeDir,z as sep,y as tempDir,v as templateDir,w as videoDir};

@@ -1,1 +0,1 @@

export { C as Channel, I as InvokeArgs, P as PluginListener, b as addPluginListener, c as convertFileSrc, i as invoke, a as transformCallback } from './tauri-d78b6be0.js';
export { C as Channel, I as InvokeArgs, a as InvokeOptions, P as PluginListener, c as addPluginListener, d as convertFileSrc, i as invoke, b as transformCallback } from './tauri-ace39cd1.js';

@@ -1,1 +0,1 @@

import{a,b,c,d,e,f}from"./chunk-3YK5DLRW.js";import"./chunk-WVIOQTRJ.js";export{b as Channel,c as PluginListener,d as addPluginListener,f as convertFileSrc,e as invoke,a as transformCallback};
import{a,b,c,d,e,f}from"./chunk-VMGITBBQ.js";import"./chunk-WVIOQTRJ.js";export{b as Channel,c as PluginListener,d as addPluginListener,f as convertFileSrc,e as invoke,a as transformCallback};

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc