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

@tauri-apps/api

Package Overview
Dependencies
Maintainers
4
Versions
82
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 1.0.0 to 1.0.1

fs-af92a606.js

5

CHANGELOG.md
# Changelog
## \[1.0.1]
- Fixes the `writeBinaryFile` sending an empty file contents when only the first argument is passed.
- [ea43cf52](https://www.github.com/tauri-apps/tauri/commit/ea43cf52db8541d20a6397ef3ecd40f0f2bd6113) fix(api): `writeBinaryFile` sends an empty contents with only one arg ([#4368](https://www.github.com/tauri-apps/tauri/pull/4368)) on 2022-06-16
## \[1.0.0]

@@ -4,0 +9,0 @@

2

fs.d.ts

@@ -124,3 +124,3 @@ export declare enum BaseDirectory {

* Writes a byte array content to a file.
* @example Write a binary file to the `$APPEDIR/avatar.png` path
* @example Write a binary file to the `$APPDIR/avatar.png` path
* ```typescript

@@ -127,0 +127,0 @@ * import { writeBinaryFile, BaseDirectory } from '@tauri-apps/api/fs';

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

export{B as BaseDirectory,B as Dir,f as copyFile,d as createDir,a as readBinaryFile,c as readDir,r as readTextFile,e as removeDir,g as removeFile,h as renameFile,b as writeBinaryFile,w as writeFile,w as writeTextFile}from"./fs-bd4345ae.js";import"./tslib.es6-9bc0804d.js";import"./tauri-7cafdaf8.js";import"./tauri-fa8f44bd.js";
export{B as BaseDirectory,B as Dir,f as copyFile,d as createDir,a as readBinaryFile,c as readDir,r as readTextFile,e as removeDir,g as removeFile,h as renameFile,b as writeBinaryFile,w as writeFile,w as writeTextFile}from"./fs-af92a606.js";import"./tslib.es6-9bc0804d.js";import"./tauri-7cafdaf8.js";import"./tauri-fa8f44bd.js";

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

import{i as t}from"./tauri-fa8f44bd.js";export{a as tauri}from"./tauri-fa8f44bd.js";export{i as fs}from"./fs-bd4345ae.js";export{h as http}from"./http-44986c42.js";export{p as path}from"./path-27dfac27.js";export{s as shell}from"./shell-0d054540.js";export{w as window}from"./window-39e643b2.js";export{o as os}from"./os-568baf9e.js";export{c as app}from"./app-b150971f.js";export{c as cli}from"./cli-0a14b129.js";export{c as clipboard}from"./clipboard-6ac7f168.js";export{d as dialog}from"./dialog-f100421e.js";export{a as event}from"./event-ba1b22ef.js";export{g as globalShortcut}from"./globalShortcut-37a16ba5.js";export{n as notification}from"./notification-1da296a1.js";export{p as process}from"./process-67cf9ac3.js";export{u as updater}from"./updater-0d747ff0.js";import"./tslib.es6-9bc0804d.js";import"./tauri-7cafdaf8.js";import"./os-check-094ffe86.js";import"./event-aba177ae.js";function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}!function(t){var e=function(t){var e,o=Object.prototype,n=o.hasOwnProperty,i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",f=i.toStringTag||"@@toStringTag";function u(t,r,e){return Object.defineProperty(t,r,{value:e,enumerable:!0,configurable:!0,writable:!0}),t[r]}try{u({},"")}catch(t){u=function(t,r,e){return t[r]=e}}function s(t,r,e,o){var n=r&&r.prototype instanceof v?r:v,i=Object.create(n.prototype),a=new G(o||[]);return i._invoke=function(t,r,e){var o=l;return function(n,i){if(o===y)throw new Error("Generator is already running");if(o===d){if("throw"===n)throw i;return T()}for(e.method=n,e.arg=i;;){var a=e.delegate;if(a){var c=S(a,e);if(c){if(c===m)continue;return c}}if("next"===e.method)e.sent=e._sent=e.arg;else if("throw"===e.method){if(o===l)throw o=d,e.arg;e.dispatchException(e.arg)}else"return"===e.method&&e.abrupt("return",e.arg);o=y;var f=h(t,r,e);if("normal"===f.type){if(o=e.done?d:p,f.arg===m)continue;return{value:f.arg,done:e.done}}"throw"===f.type&&(o=d,e.method="throw",e.arg=f.arg)}}}(t,e,a),i}function h(t,r,e){try{return{type:"normal",arg:t.call(r,e)}}catch(t){return{type:"throw",arg:t}}}t.wrap=s;var l="suspendedStart",p="suspendedYield",y="executing",d="completed",m={};function v(){}function g(){}function b(){}var w={};u(w,a,(function(){return this}));var x=Object.getPrototypeOf,j=x&&x(x(N([])));j&&j!==o&&n.call(j,a)&&(w=j);var L=b.prototype=v.prototype=Object.create(w);function E(t){["next","throw","return"].forEach((function(r){u(t,r,(function(t){return this._invoke(r,t)}))}))}function _(t,e){function o(i,a,c,f){var u=h(t[i],t,a);if("throw"!==u.type){var s=u.arg,l=s.value;return l&&"object"===r(l)&&n.call(l,"__await")?e.resolve(l.__await).then((function(t){o("next",t,c,f)}),(function(t){o("throw",t,c,f)})):e.resolve(l).then((function(t){s.value=t,c(s)}),(function(t){return o("throw",t,c,f)}))}f(u.arg)}var i;this._invoke=function(t,r){function n(){return new e((function(e,n){o(t,r,e,n)}))}return i=i?i.then(n,n):n()}}function S(t,r){var o=t.iterator[r.method];if(o===e){if(r.delegate=null,"throw"===r.method){if(t.iterator.return&&(r.method="return",r.arg=e,S(t,r),"throw"===r.method))return m;r.method="throw",r.arg=new TypeError("The iterator does not provide a 'throw' method")}return m}var n=h(o,t.iterator,r.arg);if("throw"===n.type)return r.method="throw",r.arg=n.arg,r.delegate=null,m;var i=n.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function O(t){var r={tryLoc:t[0]};1 in t&&(r.catchLoc=t[1]),2 in t&&(r.finallyLoc=t[2],r.afterLoc=t[3]),this.tryEntries.push(r)}function k(t){var r=t.completion||{};r.type="normal",delete r.arg,t.completion=r}function G(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(O,this),this.reset(!0)}function N(t){if(t){var r=t[a];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function r(){for(;++o<t.length;)if(n.call(t,o))return r.value=t[o],r.done=!1,r;return r.value=e,r.done=!0,r};return i.next=i}}return{next:T}}function T(){return{value:e,done:!0}}return g.prototype=b,u(L,"constructor",b),u(b,"constructor",g),g.displayName=u(b,f,"GeneratorFunction"),t.isGeneratorFunction=function(t){var r="function"==typeof t&&t.constructor;return!!r&&(r===g||"GeneratorFunction"===(r.displayName||r.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,u(t,f,"GeneratorFunction")),t.prototype=Object.create(L),t},t.awrap=function(t){return{__await:t}},E(_.prototype),u(_.prototype,c,(function(){return this})),t.AsyncIterator=_,t.async=function(r,e,o,n,i){void 0===i&&(i=Promise);var a=new _(s(r,e,o,n),i);return t.isGeneratorFunction(e)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},E(L),u(L,f,"Generator"),u(L,a,(function(){return this})),u(L,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var r=[];for(var e in t)r.push(e);return r.reverse(),function e(){for(;r.length;){var o=r.pop();if(o in t)return e.value=o,e.done=!1,e}return e.done=!0,e}},t.values=N,G.prototype={constructor:G,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(k),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function o(o,n){return c.type="throw",c.arg=t,r.next=o,n&&(r.method="next",r.arg=e),!!n}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var f=n.call(a,"catchLoc"),u=n.call(a,"finallyLoc");if(f&&u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(f){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,r){for(var e=this.tryEntries.length-1;e>=0;--e){var o=this.tryEntries[e];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=r&&r<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=r,i?(this.method="next",this.next=i.finallyLoc,m):this.complete(a)},complete:function(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),m},finish:function(t){for(var r=this.tryEntries.length-1;r>=0;--r){var e=this.tryEntries[r];if(e.finallyLoc===t)return this.complete(e.completion,e.afterLoc),k(e),m}},catch:function(t){for(var r=this.tryEntries.length-1;r>=0;--r){var e=this.tryEntries[r];if(e.tryLoc===t){var o=e.completion;if("throw"===o.type){var n=o.arg;k(e)}return n}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,o){return this.delegate={iterator:N(t),resultName:r,nextLoc:o},"next"===this.method&&(this.arg=e),m}},t}(t.exports);try{regeneratorRuntime=e}catch(t){"object"===("undefined"==typeof globalThis?"undefined":r(globalThis))?globalThis.regeneratorRuntime=e:Function("r","regeneratorRuntime = r")(e)}}({exports:{}});var e=t;export{e as invoke};
import{i as t}from"./tauri-fa8f44bd.js";export{a as tauri}from"./tauri-fa8f44bd.js";export{i as fs}from"./fs-af92a606.js";export{h as http}from"./http-44986c42.js";export{p as path}from"./path-bb188e20.js";export{s as shell}from"./shell-0d054540.js";export{w as window}from"./window-39e643b2.js";export{o as os}from"./os-568baf9e.js";export{c as app}from"./app-b150971f.js";export{c as cli}from"./cli-0a14b129.js";export{c as clipboard}from"./clipboard-6ac7f168.js";export{d as dialog}from"./dialog-f100421e.js";export{a as event}from"./event-ba1b22ef.js";export{g as globalShortcut}from"./globalShortcut-37a16ba5.js";export{n as notification}from"./notification-1da296a1.js";export{p as process}from"./process-67cf9ac3.js";export{u as updater}from"./updater-0d747ff0.js";import"./tslib.es6-9bc0804d.js";import"./tauri-7cafdaf8.js";import"./os-check-094ffe86.js";import"./event-aba177ae.js";function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}!function(t){var e=function(t){var e,o=Object.prototype,n=o.hasOwnProperty,i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",f=i.toStringTag||"@@toStringTag";function u(t,r,e){return Object.defineProperty(t,r,{value:e,enumerable:!0,configurable:!0,writable:!0}),t[r]}try{u({},"")}catch(t){u=function(t,r,e){return t[r]=e}}function s(t,r,e,o){var n=r&&r.prototype instanceof v?r:v,i=Object.create(n.prototype),a=new G(o||[]);return i._invoke=function(t,r,e){var o=l;return function(n,i){if(o===y)throw new Error("Generator is already running");if(o===d){if("throw"===n)throw i;return T()}for(e.method=n,e.arg=i;;){var a=e.delegate;if(a){var c=S(a,e);if(c){if(c===m)continue;return c}}if("next"===e.method)e.sent=e._sent=e.arg;else if("throw"===e.method){if(o===l)throw o=d,e.arg;e.dispatchException(e.arg)}else"return"===e.method&&e.abrupt("return",e.arg);o=y;var f=h(t,r,e);if("normal"===f.type){if(o=e.done?d:p,f.arg===m)continue;return{value:f.arg,done:e.done}}"throw"===f.type&&(o=d,e.method="throw",e.arg=f.arg)}}}(t,e,a),i}function h(t,r,e){try{return{type:"normal",arg:t.call(r,e)}}catch(t){return{type:"throw",arg:t}}}t.wrap=s;var l="suspendedStart",p="suspendedYield",y="executing",d="completed",m={};function v(){}function g(){}function b(){}var w={};u(w,a,(function(){return this}));var x=Object.getPrototypeOf,j=x&&x(x(N([])));j&&j!==o&&n.call(j,a)&&(w=j);var L=b.prototype=v.prototype=Object.create(w);function E(t){["next","throw","return"].forEach((function(r){u(t,r,(function(t){return this._invoke(r,t)}))}))}function _(t,e){function o(i,a,c,f){var u=h(t[i],t,a);if("throw"!==u.type){var s=u.arg,l=s.value;return l&&"object"===r(l)&&n.call(l,"__await")?e.resolve(l.__await).then((function(t){o("next",t,c,f)}),(function(t){o("throw",t,c,f)})):e.resolve(l).then((function(t){s.value=t,c(s)}),(function(t){return o("throw",t,c,f)}))}f(u.arg)}var i;this._invoke=function(t,r){function n(){return new e((function(e,n){o(t,r,e,n)}))}return i=i?i.then(n,n):n()}}function S(t,r){var o=t.iterator[r.method];if(o===e){if(r.delegate=null,"throw"===r.method){if(t.iterator.return&&(r.method="return",r.arg=e,S(t,r),"throw"===r.method))return m;r.method="throw",r.arg=new TypeError("The iterator does not provide a 'throw' method")}return m}var n=h(o,t.iterator,r.arg);if("throw"===n.type)return r.method="throw",r.arg=n.arg,r.delegate=null,m;var i=n.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function O(t){var r={tryLoc:t[0]};1 in t&&(r.catchLoc=t[1]),2 in t&&(r.finallyLoc=t[2],r.afterLoc=t[3]),this.tryEntries.push(r)}function k(t){var r=t.completion||{};r.type="normal",delete r.arg,t.completion=r}function G(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(O,this),this.reset(!0)}function N(t){if(t){var r=t[a];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function r(){for(;++o<t.length;)if(n.call(t,o))return r.value=t[o],r.done=!1,r;return r.value=e,r.done=!0,r};return i.next=i}}return{next:T}}function T(){return{value:e,done:!0}}return g.prototype=b,u(L,"constructor",b),u(b,"constructor",g),g.displayName=u(b,f,"GeneratorFunction"),t.isGeneratorFunction=function(t){var r="function"==typeof t&&t.constructor;return!!r&&(r===g||"GeneratorFunction"===(r.displayName||r.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,u(t,f,"GeneratorFunction")),t.prototype=Object.create(L),t},t.awrap=function(t){return{__await:t}},E(_.prototype),u(_.prototype,c,(function(){return this})),t.AsyncIterator=_,t.async=function(r,e,o,n,i){void 0===i&&(i=Promise);var a=new _(s(r,e,o,n),i);return t.isGeneratorFunction(e)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},E(L),u(L,f,"Generator"),u(L,a,(function(){return this})),u(L,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var r=[];for(var e in t)r.push(e);return r.reverse(),function e(){for(;r.length;){var o=r.pop();if(o in t)return e.value=o,e.done=!1,e}return e.done=!0,e}},t.values=N,G.prototype={constructor:G,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(k),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function o(o,n){return c.type="throw",c.arg=t,r.next=o,n&&(r.method="next",r.arg=e),!!n}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var f=n.call(a,"catchLoc"),u=n.call(a,"finallyLoc");if(f&&u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(f){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,r){for(var e=this.tryEntries.length-1;e>=0;--e){var o=this.tryEntries[e];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=r&&r<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=r,i?(this.method="next",this.next=i.finallyLoc,m):this.complete(a)},complete:function(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),m},finish:function(t){for(var r=this.tryEntries.length-1;r>=0;--r){var e=this.tryEntries[r];if(e.finallyLoc===t)return this.complete(e.completion,e.afterLoc),k(e),m}},catch:function(t){for(var r=this.tryEntries.length-1;r>=0;--r){var e=this.tryEntries[r];if(e.tryLoc===t){var o=e.completion;if("throw"===o.type){var n=o.arg;k(e)}return n}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,o){return this.delegate={iterator:N(t),resultName:r,nextLoc:o},"next"===this.method&&(this.arg=e),m}},t}(t.exports);try{regeneratorRuntime=e}catch(t){"object"===("undefined"==typeof globalThis?"undefined":r(globalThis))?globalThis.regeneratorRuntime=e:Function("r","regeneratorRuntime = r")(e)}}({exports:{}});var e=t;export{e as invoke};
{
"name": "@tauri-apps/api",
"version": "1.0.0",
"version": "1.0.1",
"description": "Tauri API definitions",

@@ -5,0 +5,0 @@ "type": "module",

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

export{a as appDir,b as audioDir,C as basename,c as cacheDir,d as configDir,e as dataDir,w as delimiter,f as desktopDir,A as dirname,g as documentDir,h as downloadDir,i as executableDir,B as extname,j as fontDir,k as homeDir,D as isAbsolute,z as join,l as localDataDir,s as logDir,y as normalize,m as pictureDir,n as publicDir,x as resolve,o as resolveResource,r as resourceDir,q as runtimeDir,u as sep,t as templateDir,v as videoDir}from"./path-27dfac27.js";export{B as BaseDirectory}from"./fs-bd4345ae.js";import"./tslib.es6-9bc0804d.js";import"./tauri-7cafdaf8.js";import"./tauri-fa8f44bd.js";import"./os-check-094ffe86.js";
export{a as appDir,b as audioDir,C as basename,c as cacheDir,d as configDir,e as dataDir,w as delimiter,f as desktopDir,A as dirname,g as documentDir,h as downloadDir,i as executableDir,B as extname,j as fontDir,k as homeDir,D as isAbsolute,z as join,l as localDataDir,s as logDir,y as normalize,m as pictureDir,n as publicDir,x as resolve,o as resolveResource,r as resourceDir,q as runtimeDir,u as sep,t as templateDir,v as videoDir}from"./path-bb188e20.js";export{B as BaseDirectory}from"./fs-af92a606.js";import"./tslib.es6-9bc0804d.js";import"./tauri-7cafdaf8.js";import"./tauri-fa8f44bd.js";import"./os-check-094ffe86.js";

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