🐛 Compatible with downloading and using actions.
This commit is contained in:
2
app.csv
2
app.csv
@@ -1,7 +1,7 @@
|
|||||||
name(Linux),name(Mac/Windows),name_zh,url
|
name(Linux),name(Mac/Windows),name_zh,url
|
||||||
programmusic,ProgramMusic,ProgramMusic,https://musicforprogramming.net/
|
programmusic,ProgramMusic,ProgramMusic,https://musicforprogramming.net/
|
||||||
twitter,Twitter,推特,https://twitter.com/
|
twitter,Twitter,推特,https://twitter.com/
|
||||||
youtube,YouTube,YouTube,https://youtube.com
|
youtube,YouTube,YouTube,https://www.youtube.com
|
||||||
reference,Reference,Reference,https://quickref.me/zh-CN/
|
reference,Reference,Reference,https://quickref.me/zh-CN/
|
||||||
coderunner,CodeRunner,CodeRunner,https://riju.codes/
|
coderunner,CodeRunner,CodeRunner,https://riju.codes/
|
||||||
chatgpt,ChatGPT,ChatGPT,https://chat.openai.com/chat
|
chatgpt,ChatGPT,ChatGPT,https://chat.openai.com/chat
|
||||||
|
|||||||
|
3
bin/helpers/rust.ts
vendored
3
bin/helpers/rust.ts
vendored
@@ -7,8 +7,9 @@ import { shellExec } from '@/utils/shell';
|
|||||||
import { isChinaDomain } from '@/utils/ip';
|
import { isChinaDomain } from '@/utils/ip';
|
||||||
|
|
||||||
export async function installRust() {
|
export async function installRust() {
|
||||||
|
const isActions = process.env.GITHUB_ACTIONS;
|
||||||
const isInChina = await isChinaDomain('sh.rustup.rs');
|
const isInChina = await isChinaDomain('sh.rustup.rs');
|
||||||
const rustInstallScriptForMac = isInChina
|
const rustInstallScriptForMac = isInChina && !isActions
|
||||||
? 'export RUSTUP_DIST_SERVER="https://rsproxy.cn" && export RUSTUP_UPDATE_ROOT="https://rsproxy.cn/rustup" && curl --proto "=https" --tlsv1.2 -sSf https://rsproxy.cn/rustup-init.sh | sh'
|
? 'export RUSTUP_DIST_SERVER="https://rsproxy.cn" && export RUSTUP_UPDATE_ROOT="https://rsproxy.cn/rustup" && curl --proto "=https" --tlsv1.2 -sSf https://rsproxy.cn/rustup-init.sh | sh'
|
||||||
: "curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y";
|
: "curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y";
|
||||||
const rustInstallScriptForWindows = 'winget install --id Rustlang.Rustup';
|
const rustInstallScriptForWindows = 'winget install --id Rustlang.Rustup';
|
||||||
|
|||||||
5
dist/cli.js
vendored
5
dist/cli.js
vendored
@@ -20,7 +20,7 @@ import isUrl from 'is-url';
|
|||||||
import fs from 'fs';
|
import fs from 'fs';
|
||||||
|
|
||||||
var name = "pake-cli";
|
var name = "pake-cli";
|
||||||
var version = "2.2.0";
|
var version = "2.2.1";
|
||||||
var description = "🤱🏻 Turn any webpage into a desktop app with Rust. 🤱🏻 很简单的用 Rust 打包网页生成很小的桌面 App。";
|
var description = "🤱🏻 Turn any webpage into a desktop app with Rust. 🤱🏻 很简单的用 Rust 打包网页生成很小的桌面 App。";
|
||||||
var engines = {
|
var engines = {
|
||||||
node: ">=16.0.0"
|
node: ">=16.0.0"
|
||||||
@@ -436,8 +436,9 @@ async function isChinaIP(ip, domain) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async function installRust() {
|
async function installRust() {
|
||||||
|
const isActions = process.env.GITHUB_ACTIONS;
|
||||||
const isInChina = await isChinaDomain('sh.rustup.rs');
|
const isInChina = await isChinaDomain('sh.rustup.rs');
|
||||||
const rustInstallScriptForMac = isInChina
|
const rustInstallScriptForMac = isInChina && !isActions
|
||||||
? 'export RUSTUP_DIST_SERVER="https://rsproxy.cn" && export RUSTUP_UPDATE_ROOT="https://rsproxy.cn/rustup" && curl --proto "=https" --tlsv1.2 -sSf https://rsproxy.cn/rustup-init.sh | sh'
|
? 'export RUSTUP_DIST_SERVER="https://rsproxy.cn" && export RUSTUP_UPDATE_ROOT="https://rsproxy.cn/rustup" && curl --proto "=https" --tlsv1.2 -sSf https://rsproxy.cn/rustup-init.sh | sh'
|
||||||
: "curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y";
|
: "curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y";
|
||||||
const rustInstallScriptForWindows = 'winget install --id Rustlang.Rustup';
|
const rustInstallScriptForWindows = 'winget install --id Rustlang.Rustup';
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "pake-cli",
|
"name": "pake-cli",
|
||||||
"version": "2.2.0",
|
"version": "2.2.1",
|
||||||
"description": "🤱🏻 Turn any webpage into a desktop app with Rust. 🤱🏻 很简单的用 Rust 打包网页生成很小的桌面 App。",
|
"description": "🤱🏻 Turn any webpage into a desktop app with Rust. 🤱🏻 很简单的用 Rust 打包网页生成很小的桌面 App。",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=16.0.0"
|
"node": ">=16.0.0"
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
[source.crates-io]
|
[source.crates-io]
|
||||||
# To use sparse index, change 'rsproxy' to 'rsproxy-sparse'
|
# To use sparse index, change 'rsproxy' to 'rsproxy-sparse'
|
||||||
replace-with = 'rsproxy'
|
replace-with = 'rsproxy-sparse'
|
||||||
|
|
||||||
[source.rsproxy]
|
[source.rsproxy]
|
||||||
registry = "https://rsproxy.cn/crates.io-index"
|
registry = "https://rsproxy.cn/crates.io-index"
|
||||||
|
|||||||
Reference in New Issue
Block a user