-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(cli) rewrite the core CLI in Rust (#851)
- Loading branch information
1 parent
23132ac
commit 3e8abe3
Showing
87 changed files
with
11,428 additions
and
14,064 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
"tauri-cli": minor | ||
"tauri-bundler": minor | ||
--- | ||
|
||
The `dev` and `build` pipeline is now written in Rust. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
--- | ||
"tauri.js": minor | ||
--- | ||
|
||
The Tauri API interface is now shipped with the `@tauri-apps/api` package instead of the deprecated `tauri` package. | ||
To use the new API package, delete the old `tauri` from your `package.json` and install the new package: | ||
`$ yarn remove tauri && yarn add @tauri-apps/api` or `$ npm uninstall tauri && npm install @tauri-apps/api`. | ||
And change all `import { someApi } from 'tauri/api` to `import { someApi } from '@tauri-apps/api'`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
"tauri.js": minor | ||
--- | ||
|
||
The Tauri Node.js CLI package is now `@tauri-apps/cli`. | ||
To use the new CLI, delete the old `tauri` from your `package.json` and install the new package: | ||
`$ yarn remove tauri && yarn add --dev @tauri-apps/cli` or `$ npm uninstall tauri && npm install --save-dev @tauri-apps/cli`. |
Validating CODEOWNERS rules …
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -76,7 +76,7 @@ TODO.md | |
target | ||
|
||
# lock for libs | ||
Cargo.lock | ||
/Cargo.lock | ||
yarn.lock | ||
|
||
/cli/tauri.js/test/jest/tmp | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/src/types/config.validator.ts |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
module.exports = { | ||
root: true, | ||
|
||
env: { | ||
node: true, | ||
jest: true, | ||
}, | ||
|
||
parser: "@typescript-eslint/parser", | ||
|
||
extends: [ | ||
"standard-with-typescript", | ||
"plugin:@typescript-eslint/recommended-requiring-type-checking", | ||
"plugin:lodash-template/recommended", | ||
// TODO: make this work with typescript | ||
// 'plugin:node/recommended' | ||
"prettier", | ||
"prettier/@typescript-eslint", | ||
], | ||
|
||
plugins: ["@typescript-eslint", "node", "security"], | ||
|
||
parserOptions: { | ||
tsconfigRootDir: __dirname, | ||
project: "./tsconfig.json", | ||
}, | ||
|
||
globals: { | ||
__statics: true, | ||
process: true, | ||
}, | ||
|
||
// add your custom rules here | ||
rules: { | ||
// allow console.log during development only | ||
"no-console": process.env.NODE_ENV === "production" ? "error" : "off", | ||
// allow debugger during development only | ||
"no-debugger": process.env.NODE_ENV === "production" ? "error" : "off", | ||
"no-process-exit": "off", | ||
"security/detect-non-literal-fs-filename": "warn", | ||
"security/detect-unsafe-regex": "error", | ||
"security/detect-buffer-noassert": "error", | ||
"security/detect-child-process": "warn", | ||
"security/detect-disable-mustache-escape": "error", | ||
"security/detect-eval-with-expression": "error", | ||
"security/detect-no-csrf-before-method-override": "error", | ||
"security/detect-non-literal-regexp": "error", | ||
"security/detect-non-literal-require": "warn", | ||
"security/detect-object-injection": "warn", | ||
"security/detect-possible-timing-attacks": "error", | ||
"security/detect-pseudoRandomBytes": "error", | ||
"space-before-function-paren": "off", | ||
"@typescript-eslint/default-param-last": "off", | ||
"@typescript-eslint/strict-boolean-expressions": 0, | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
# Build output | ||
dist/ | ||
|
||
# Logs | ||
logs | ||
*.log | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
|
||
# Runtime data | ||
pids | ||
*.pid | ||
*.seed | ||
*.pid.lock | ||
|
||
# Directory for instrumented libs generated by jscoverage/JSCover | ||
lib-cov | ||
|
||
# Coverage directory used by tools like istanbul | ||
coverage | ||
|
||
# nyc test coverage | ||
.nyc_output | ||
|
||
# node-waf configuration | ||
.lock-wscript | ||
|
||
# Compiled binary addons (http://nodejs.org/api/addons.html) | ||
build/Release | ||
|
||
# Dependency directories | ||
node_modules/ | ||
jspm_packages/ | ||
|
||
# Typescript v1 declaration files | ||
typings/ | ||
|
||
# Optional npm cache directory | ||
.npm | ||
|
||
# Optional eslint cache | ||
.eslintcache | ||
|
||
# Optional REPL history | ||
.node_repl_history | ||
|
||
# Output of 'npm pack' | ||
*.tgz | ||
|
||
# Yarn Integrity file | ||
.yarn-integrity | ||
|
||
# dotenv environment variables file | ||
.env | ||
|
||
/.vs | ||
.DS_Store | ||
.Thumbs.db | ||
*.sublime* | ||
.idea/ | ||
debug.log | ||
package-lock.json | ||
.vscode/settings.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
module.exports = { | ||
presets: [ | ||
[ | ||
"@babel/preset-env", | ||
{ | ||
targets: { | ||
node: "current", | ||
}, | ||
modules: "commonjs", | ||
}, | ||
], | ||
"@babel/preset-typescript", | ||
], | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
{ | ||
"name": "@tauri-apps/api", | ||
"version": "0.1.0", | ||
"description": "Tauri API definitions", | ||
"main": "./dist/index", | ||
"funding": { | ||
"type": "opencollective", | ||
"url": "https://opencollective.com/tauri" | ||
}, | ||
"scripts": { | ||
"build": "rimraf ./dist && rollup -c --silent", | ||
"prepublishOnly": "yarn build", | ||
"lint": "eslint --ext ts \"./src/**/*.ts\"", | ||
"lint-fix": "eslint --fix --ext ts \"./src/**/*.ts\"", | ||
"lint:lockfile": "lockfile-lint --path yarn.lock --type yarn --validate-https --allowed-hosts npm yarn", | ||
"format": "prettier --write --end-of-line=auto \"./**/*.{js,jsx,ts,tsx,html,css,json}\" --ignore-path .gitignore", | ||
"format:check": "prettier --check --end-of-line=auto \"./**/*.{js,jsx,ts,tsx,html,css,json}\" --ignore-path .gitignore" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/tauri-apps/tauri.git" | ||
}, | ||
"contributors": [ | ||
"Tauri Team <team@tauri-apps.org> (https://tauri.studio)", | ||
"Daniel Thompson-Yvetot <denjell@sfosc.org>", | ||
"Lucas Fernandes Gonçalves Nogueira <lucas@tauri.studio>" | ||
], | ||
"license": "MIT", | ||
"bugs": { | ||
"url": "https://github.com/tauri-apps/tauri/issues" | ||
}, | ||
"homepage": "https://github.com/tauri-apps/tauri#readme", | ||
"publishConfig": { | ||
"access": "public" | ||
}, | ||
"engines": { | ||
"node": ">= 10.17.0", | ||
"npm": ">= 6.6.0", | ||
"yarn": ">= 1.19.1" | ||
}, | ||
"devDependencies": { | ||
"@babel/core": "7.12.9", | ||
"@babel/preset-env": "7.12.7", | ||
"@babel/preset-typescript": "7.12.7", | ||
"@rollup/plugin-babel": "5.2.2", | ||
"@rollup/plugin-commonjs": "17.0.0", | ||
"@rollup/plugin-json": "4.1.0", | ||
"@rollup/plugin-node-resolve": "11.0.0", | ||
"@rollup/plugin-sucrase": "3.1.0", | ||
"@rollup/plugin-typescript": "8.0.0", | ||
"@typescript-eslint/eslint-plugin": "4.9.0", | ||
"@typescript-eslint/parser": "4.9.0", | ||
"eslint": "7.14.0", | ||
"eslint-config-prettier": "6.15.0", | ||
"eslint-config-standard-with-typescript": "19.0.1", | ||
"eslint-plugin-import": "2.22.1", | ||
"eslint-plugin-lodash-template": "0.19.0", | ||
"eslint-plugin-node": "11.1.0", | ||
"eslint-plugin-promise": "4.2.1", | ||
"eslint-plugin-security": "1.4.0", | ||
"eslint-plugin-standard": "4.1.0", | ||
"husky": "4.3.0", | ||
"lint-staged": "10.5.3", | ||
"lockfile-lint": "4.3.7", | ||
"prettier": "2.2.1", | ||
"rimraf": "3.0.2", | ||
"rollup": "2.34.1", | ||
"rollup-plugin-terser": "7.0.2", | ||
"rollup-plugin-typescript2": "0.29.0", | ||
"typescript": "4.1.2" | ||
}, | ||
"resolutions": { | ||
"**/lodash": ">=4.17.19" | ||
}, | ||
"husky": { | ||
"hooks": { | ||
"pre-commit": "lint-staged" | ||
} | ||
}, | ||
"lint-staged": { | ||
"*.{js,jsx,ts,tsx,md,html,css,json}": "prettier --write --end-of-line=auto \"./**/*.{js,jsx,ts,tsx,html,css,json}\" --ignore-path .gitignore", | ||
"*.{ts,tsx}": "eslint --fix --ext ts ./src/**/*.ts" | ||
} | ||
} |
Oops, something went wrong.