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

@tauri-apps/plugin-shell

Package Overview
Dependencies
Maintainers
5
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@tauri-apps/plugin-shell - npm Package Compare versions

Comparing version 2.0.0-rc.1 to 2.0.0

6

dist-js/index.d.ts

@@ -204,3 +204,3 @@ /**

static create(program: string, args?: string | string[], options?: SpawnOptions & {
encoding: "raw";
encoding: 'raw';
}): Command<Uint8Array>;

@@ -210,3 +210,3 @@ static create(program: string, args?: string | string[], options?: SpawnOptions): Command<string>;

static sidecar(program: string, args?: string | string[], options?: SpawnOptions & {
encoding: "raw";
encoding: 'raw';
}): Command<Uint8Array>;

@@ -279,2 +279,2 @@ static sidecar(program: string, args?: string | string[], options?: SpawnOptions): Command<string>;

export { Command, Child, EventEmitter, open };
export type { IOPayload, CommandEvents, TerminatedPayload, OutputEvents, ChildProcess, SpawnOptions, };
export type { IOPayload, CommandEvents, TerminatedPayload, OutputEvents, ChildProcess, SpawnOptions };

@@ -26,3 +26,3 @@ import { invoke, Channel } from '@tauri-apps/api/core';

* - `name`: the unique identifier of the command, passed to the {@link Command.create | Command.create function}.
* If it's a sidecar, this must be the value defined on `tauri.conf.json > tauri > bundle > externalBin`.
* If it's a sidecar, this must be the value defined on `tauri.conf.json > bundle > externalBin`.
* - `cmd`: the program that is executed on this configuration. If it's a sidecar, this value is ignored.

@@ -254,5 +254,5 @@ * - `sidecar`: whether the object configures a sidecar or a system program.

async write(data) {
await invoke("plugin:shell|stdin_write", {
await invoke('plugin:shell|stdin_write', {
pid: this.pid,
buffer: data,
buffer: data
});

@@ -268,5 +268,5 @@ }

async kill() {
await invoke("plugin:shell|kill", {
cmd: "killChild",
pid: this.pid,
await invoke('plugin:shell|kill', {
cmd: 'killChild',
pid: this.pid
});

@@ -313,3 +313,3 @@ }

this.program = program;
this.args = typeof args === "string" ? [args] : args;
this.args = typeof args === 'string' ? [args] : args;
this.options = options ?? {};

@@ -360,3 +360,3 @@ }

const options = this.options;
if (typeof args === "object") {
if (typeof args === 'object') {
Object.freeze(args);

@@ -367,21 +367,21 @@ }

switch (event.event) {
case "Error":
this.emit("error", event.payload);
case 'Error':
this.emit('error', event.payload);
break;
case "Terminated":
this.emit("close", event.payload);
case 'Terminated':
this.emit('close', event.payload);
break;
case "Stdout":
this.stdout.emit("data", event.payload);
case 'Stdout':
this.stdout.emit('data', event.payload);
break;
case "Stderr":
this.stderr.emit("data", event.payload);
case 'Stderr':
this.stderr.emit('data', event.payload);
break;
}
};
return await invoke("plugin:shell|spawn", {
return await invoke('plugin:shell|spawn', {
program,
args,
options,
onEvent,
onEvent
}).then((pid) => new Child(pid));

@@ -409,9 +409,9 @@ }

const options = this.options;
if (typeof args === "object") {
if (typeof args === 'object') {
Object.freeze(args);
}
return await invoke("plugin:shell|execute", {
return await invoke('plugin:shell|execute', {
program,
args,
options,
options
});

@@ -447,5 +447,5 @@ }

async function open(path, openWith) {
await invoke("plugin:shell|open", {
await invoke('plugin:shell|open', {
path,
with: openWith,
with: openWith
});

@@ -452,0 +452,0 @@ }

{
"name": "@tauri-apps/plugin-shell",
"version": "2.0.0-rc.1",
"license": "MIT or APACHE-2.0",
"version": "2.0.0",
"license": "MIT OR Apache-2.0",
"authors": [

@@ -27,4 +27,4 @@ "Tauri Programme within The Commons Conservancy"

"dependencies": {
"@tauri-apps/api": "^2.0.0-rc.4"
"@tauri-apps/api": "^2.0.0"
}
}

@@ -5,5 +5,13 @@ ![plugin-shell](https://github.com/tauri-apps/plugins-workspace/raw/v2/plugins/shell/banner.png)

| Platform | Supported |
| -------- | --------- |
| Linux | ✓ |
| Windows | ✓ |
| macOS | ✓ |
| Android | ✓ |
| iOS | ✓ |
## Install
_This plugin requires a Rust version of at least **1.75**_
_This plugin requires a Rust version of at least **1.78**_

@@ -22,3 +30,3 @@ There are three general methods of installation that we can recommend.

[dependencies]
tauri-plugin-shell = "2.0.0-rc"
tauri-plugin-shell = "2.0.0"
# alternatively with Git:

@@ -65,4 +73,4 @@ tauri-plugin-shell = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "v2" }

```javascript
import { Command } from "@tauri-apps/plugin-shell";
Command.create("git", ["commit", "-m", "the commit message"]);
import { Command } from '@tauri-apps/plugin-shell'
Command.create('git', ['commit', '-m', 'the commit message'])
```

@@ -69,0 +77,0 @@

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