electron-version-deployer-cli 0.0.18 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.cjs +148 -85
- package/dist/main.d.ts +2 -1
- package/dist/main.js +27 -19
- package/dist/templates/evd.config.ts +5 -0
- package/dist/types/EVDConfigType.d.ts +6 -1
- package/package.json +12 -10
package/dist/cli.cjs
CHANGED
|
@@ -1,10 +1,15 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
"use strict";
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
5
|
+
var __publicField = (obj, key, value) => {
|
|
6
|
+
__defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
7
|
+
return value;
|
|
8
|
+
};
|
|
3
9
|
const commander = require("commander");
|
|
4
10
|
const pkgUp = require("pkg-up");
|
|
5
11
|
const node_fs = require("node:fs");
|
|
6
12
|
const logSymbols = require("log-symbols");
|
|
7
|
-
const prompts = require("@inquirer/prompts");
|
|
8
13
|
const node_path = require("node:path");
|
|
9
14
|
const vite = require("vite");
|
|
10
15
|
const vm = require("node:vm");
|
|
@@ -14,6 +19,7 @@ const marked = require("marked");
|
|
|
14
19
|
const jsdom = require("jsdom");
|
|
15
20
|
const DOMPurify = require("dompurify");
|
|
16
21
|
const archiver = require("archiver");
|
|
22
|
+
const prompts = require("@inquirer/prompts");
|
|
17
23
|
const node_https = require("node:https");
|
|
18
24
|
const node_os = require("node:os");
|
|
19
25
|
const download = require("download");
|
|
@@ -36,7 +42,7 @@ function formatBytes(bytes) {
|
|
|
36
42
|
}
|
|
37
43
|
const CLI_NAME = "electron-version-deployer-cli";
|
|
38
44
|
const CONFIG_FILE_NAME = "evd.config.js";
|
|
39
|
-
commander.program.command("init").
|
|
45
|
+
commander.program.command("init").description("生成配置文件").action(async (source, destination) => {
|
|
40
46
|
const pkgPath2 = pkgUp.sync();
|
|
41
47
|
if (!pkgPath2)
|
|
42
48
|
return console.log(
|
|
@@ -59,58 +65,13 @@ commander.program.command("init").option("-y", "自动确认初始化", false).d
|
|
|
59
65
|
token: "",
|
|
60
66
|
siteID: ""
|
|
61
67
|
},
|
|
68
|
+
cloudflare: {
|
|
69
|
+
url: "",
|
|
70
|
+
token: "",
|
|
71
|
+
projectName: ""
|
|
72
|
+
},
|
|
62
73
|
prebuiltConfig: {}
|
|
63
74
|
};
|
|
64
|
-
if (!source.y) {
|
|
65
|
-
defaultConfig.compileCommand = await prompts.input({
|
|
66
|
-
message: "请输入编译命令",
|
|
67
|
-
default: defaultConfig.compileCommand
|
|
68
|
-
// validate(str) {
|
|
69
|
-
// const scripts = pkgContent.scripts ?? {};
|
|
70
|
-
// return Promise.resolve(
|
|
71
|
-
// scripts[str] ? true : `无法在 package.json 中找到该命令!`
|
|
72
|
-
// );
|
|
73
|
-
// },
|
|
74
|
-
});
|
|
75
|
-
defaultConfig.changelogsPath = await prompts.input({
|
|
76
|
-
message: "请输入 changelogs 文件位置(以项目根目录为准的相对路径)",
|
|
77
|
-
default: defaultConfig.changelogsPath
|
|
78
|
-
// validate(str) {
|
|
79
|
-
// return Promise.resolve(
|
|
80
|
-
// existsSync(r(str))
|
|
81
|
-
// ? /\.md$/.test(str)
|
|
82
|
-
// ? true
|
|
83
|
-
// : "该文件必须是以 .md 结尾的 Markdown 文件"
|
|
84
|
-
// : "该文件不存在!"
|
|
85
|
-
// );
|
|
86
|
-
// },
|
|
87
|
-
});
|
|
88
|
-
defaultConfig.sources.folder = await prompts.input({
|
|
89
|
-
message: "请输入源文件目录",
|
|
90
|
-
default: `dist/mac-arm64/myapp.app/Resources/app`
|
|
91
|
-
});
|
|
92
|
-
defaultConfig.sources.nodeModules = await prompts.input({
|
|
93
|
-
message: "请输入源文件 node_modules 目录",
|
|
94
|
-
default: defaultConfig.sources.nodeModules
|
|
95
|
-
});
|
|
96
|
-
defaultConfig.sources.codes = await prompts.input({
|
|
97
|
-
message: "请输入源文件 逻辑代码目录",
|
|
98
|
-
default: defaultConfig.sources.codes
|
|
99
|
-
});
|
|
100
|
-
defaultConfig.sources.packageJSON = await prompts.input({
|
|
101
|
-
message: "请输入源文件 package.json 路径",
|
|
102
|
-
default: defaultConfig.sources.packageJSON
|
|
103
|
-
});
|
|
104
|
-
defaultConfig.netlify.url = await prompts.input({
|
|
105
|
-
message: "请输入 Netlify 网站域名"
|
|
106
|
-
});
|
|
107
|
-
defaultConfig.netlify.token = await prompts.input({
|
|
108
|
-
message: "请输入 Netlify Token"
|
|
109
|
-
});
|
|
110
|
-
defaultConfig.netlify.siteID = await prompts.input({
|
|
111
|
-
message: "请输入 Netlify SiteID"
|
|
112
|
-
});
|
|
113
|
-
}
|
|
114
75
|
let evdConfigContent = node_fs.readFileSync(
|
|
115
76
|
node_path.join(node_path.resolve(__dirname), "templates", "evd.config.ts"),
|
|
116
77
|
"utf-8"
|
|
@@ -379,6 +340,122 @@ function versionToNum(a) {
|
|
|
379
340
|
let res = c.join("");
|
|
380
341
|
return res;
|
|
381
342
|
}
|
|
343
|
+
const _Netlify = class {
|
|
344
|
+
static get instance() {
|
|
345
|
+
if (!this._instance) {
|
|
346
|
+
this._instance = new _Netlify();
|
|
347
|
+
}
|
|
348
|
+
return this._instance;
|
|
349
|
+
}
|
|
350
|
+
getUrl(configs) {
|
|
351
|
+
var _a;
|
|
352
|
+
return (_a = configs.netlify) == null ? void 0 : _a.url;
|
|
353
|
+
}
|
|
354
|
+
deploy(props) {
|
|
355
|
+
const netlifyConfig = props.configs.netlify;
|
|
356
|
+
if (!netlifyConfig)
|
|
357
|
+
throw new Error("netlify 配置为空");
|
|
358
|
+
return new Promise((res) => {
|
|
359
|
+
const cmd = node_os.platform() === "win32" ? "netlify.cmd" : "netlify";
|
|
360
|
+
const output = node_child_process.spawn(cmd, [
|
|
361
|
+
"deploy",
|
|
362
|
+
"--dir",
|
|
363
|
+
props.folder,
|
|
364
|
+
"--site",
|
|
365
|
+
netlifyConfig.siteID,
|
|
366
|
+
"--auth",
|
|
367
|
+
netlifyConfig.token,
|
|
368
|
+
"--prod",
|
|
369
|
+
"--debug"
|
|
370
|
+
], {
|
|
371
|
+
stdio: ["pipe", "inherit", "inherit"]
|
|
372
|
+
});
|
|
373
|
+
output.on("exit", function(code) {
|
|
374
|
+
if (code === 0) {
|
|
375
|
+
console.log(logSymbols.success, "部署完成!");
|
|
376
|
+
res();
|
|
377
|
+
return;
|
|
378
|
+
}
|
|
379
|
+
throw new Error("部署失败!");
|
|
380
|
+
});
|
|
381
|
+
});
|
|
382
|
+
}
|
|
383
|
+
validateConfig(configs) {
|
|
384
|
+
if (configs.netlify) {
|
|
385
|
+
if (!configs.netlify.url || !/^https/.test(configs.netlify.url)) {
|
|
386
|
+
return `configs.netlify.url 配置不正确`;
|
|
387
|
+
}
|
|
388
|
+
if (!configs.netlify.token) {
|
|
389
|
+
return `configs.netlify.token 未配置`;
|
|
390
|
+
}
|
|
391
|
+
if (!configs.netlify.siteID) {
|
|
392
|
+
return `configs.netlify.siteID 未配置`;
|
|
393
|
+
}
|
|
394
|
+
return;
|
|
395
|
+
}
|
|
396
|
+
return `configs.netlify 配置不存在`;
|
|
397
|
+
}
|
|
398
|
+
};
|
|
399
|
+
let Netlify = _Netlify;
|
|
400
|
+
__publicField(Netlify, "_instance");
|
|
401
|
+
const _Cloudflare = class {
|
|
402
|
+
static get instance() {
|
|
403
|
+
if (!this._instance) {
|
|
404
|
+
this._instance = new _Cloudflare();
|
|
405
|
+
}
|
|
406
|
+
return this._instance;
|
|
407
|
+
}
|
|
408
|
+
getUrl(configs) {
|
|
409
|
+
var _a;
|
|
410
|
+
return (_a = configs.cloudflare) == null ? void 0 : _a.url;
|
|
411
|
+
}
|
|
412
|
+
deploy(props) {
|
|
413
|
+
const cloudflareConfig = props.configs.cloudflare;
|
|
414
|
+
if (!cloudflareConfig)
|
|
415
|
+
throw new Error("cloudflare 配置为空");
|
|
416
|
+
return new Promise((res) => {
|
|
417
|
+
const cmd = node_os.platform() === "win32" ? "wrangler.cmd" : "wrangler";
|
|
418
|
+
const output = node_child_process.spawn(cmd, [
|
|
419
|
+
"pages",
|
|
420
|
+
"deploy",
|
|
421
|
+
props.folder,
|
|
422
|
+
"--project-name",
|
|
423
|
+
cloudflareConfig.projectName
|
|
424
|
+
], {
|
|
425
|
+
stdio: ["pipe", "inherit", "inherit"],
|
|
426
|
+
env: {
|
|
427
|
+
...process.env,
|
|
428
|
+
"CLOUDFLARE_API_TOKEN": cloudflareConfig.token
|
|
429
|
+
}
|
|
430
|
+
});
|
|
431
|
+
output.on("exit", function(code) {
|
|
432
|
+
if (code === 0) {
|
|
433
|
+
console.log(logSymbols.success, "部署完成!");
|
|
434
|
+
res();
|
|
435
|
+
return;
|
|
436
|
+
}
|
|
437
|
+
throw new Error("部署失败!");
|
|
438
|
+
});
|
|
439
|
+
});
|
|
440
|
+
}
|
|
441
|
+
validateConfig(configs) {
|
|
442
|
+
if (configs.cloudflare) {
|
|
443
|
+
if (!configs.cloudflare.url || !/^https/.test(configs.cloudflare.url)) {
|
|
444
|
+
return `configs.cloudflare.url 配置不正确`;
|
|
445
|
+
}
|
|
446
|
+
if (!configs.cloudflare.token) {
|
|
447
|
+
return `configs.cloudflare.token 未配置`;
|
|
448
|
+
}
|
|
449
|
+
if (!configs.cloudflare.projectName) {
|
|
450
|
+
return `configs.cloudflare.projectName 未配置`;
|
|
451
|
+
}
|
|
452
|
+
return;
|
|
453
|
+
}
|
|
454
|
+
return `configs.cloudflare 配置不存在`;
|
|
455
|
+
}
|
|
456
|
+
};
|
|
457
|
+
let Cloudflare = _Cloudflare;
|
|
458
|
+
__publicField(Cloudflare, "_instance");
|
|
382
459
|
commander.program.command("deploy").description("执行部署").action(async (source, destination) => {
|
|
383
460
|
const configs = await getConfigs();
|
|
384
461
|
try {
|
|
@@ -393,34 +470,18 @@ commander.program.command("deploy").description("执行部署").action(async (so
|
|
|
393
470
|
});
|
|
394
471
|
async function deploy(configs) {
|
|
395
472
|
console.log(logSymbols.info, "开始部署", r());
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
"--dir",
|
|
400
|
-
r("node_modules/.evd"),
|
|
401
|
-
"--site",
|
|
402
|
-
configs.netlify.siteID,
|
|
403
|
-
"--auth",
|
|
404
|
-
configs.netlify.token,
|
|
405
|
-
"--prod",
|
|
406
|
-
"--debug"
|
|
407
|
-
], {
|
|
408
|
-
stdio: ["pipe", "inherit", "inherit"]
|
|
409
|
-
});
|
|
410
|
-
output.on("exit", function(code) {
|
|
411
|
-
if (code === 0) {
|
|
412
|
-
console.log(logSymbols.success, "部署完成!");
|
|
413
|
-
return;
|
|
414
|
-
}
|
|
415
|
-
throw new Error("部署失败!");
|
|
473
|
+
await getWhichProvider(configs).deploy({
|
|
474
|
+
folder: r("node_modules/.evd"),
|
|
475
|
+
configs
|
|
416
476
|
});
|
|
417
477
|
}
|
|
418
478
|
async function validateRemotePackageJSON(configs) {
|
|
479
|
+
const url = getWhichProvider(configs).getUrl(configs);
|
|
419
480
|
const compiledPackageJSON = JSON.parse(
|
|
420
481
|
node_fs.readFileSync(r("node_modules/.evd/package.json"), "utf-8")
|
|
421
482
|
);
|
|
422
483
|
const compiledName = compiledPackageJSON.name;
|
|
423
|
-
const remotePKG = await fetchRemotePkgJSON(
|
|
484
|
+
const remotePKG = await fetchRemotePkgJSON(url);
|
|
424
485
|
if (!remotePKG)
|
|
425
486
|
return;
|
|
426
487
|
const remoteName = remotePKG.name;
|
|
@@ -453,10 +514,11 @@ async function validateRemotePackageJSON(configs) {
|
|
|
453
514
|
}
|
|
454
515
|
}
|
|
455
516
|
async function checkIsFirstTimeDeploy(configs) {
|
|
456
|
-
const
|
|
517
|
+
const url = getWhichProvider(configs).getUrl(configs);
|
|
518
|
+
const remotePKG = await fetchRemotePkgJSON(url);
|
|
457
519
|
if (!remotePKG) {
|
|
458
520
|
const answer = await prompts.confirm({
|
|
459
|
-
message: `似乎 ${
|
|
521
|
+
message: `似乎 ${url} 还未部署过任何版本,确认继续吗?`
|
|
460
522
|
});
|
|
461
523
|
if (!answer) {
|
|
462
524
|
throw new Error("部署已停止!");
|
|
@@ -464,15 +526,16 @@ async function checkIsFirstTimeDeploy(configs) {
|
|
|
464
526
|
}
|
|
465
527
|
}
|
|
466
528
|
async function validateConfigs(configs) {
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
529
|
+
const error = getWhichProvider(configs).validateConfig(configs);
|
|
530
|
+
if (error)
|
|
531
|
+
throw new Error(error);
|
|
532
|
+
}
|
|
533
|
+
function getWhichProvider(configs) {
|
|
534
|
+
if (configs.netlify && configs.netlify.url && configs.netlify.siteID && configs.netlify.token)
|
|
535
|
+
return Netlify.instance;
|
|
536
|
+
if (configs.cloudflare && configs.cloudflare.projectName && configs.cloudflare.token && configs.cloudflare.url)
|
|
537
|
+
return Cloudflare.instance;
|
|
538
|
+
throw new Error("未提供/配置不正确 configs.netlify / configs.cloudflare");
|
|
476
539
|
}
|
|
477
540
|
async function checkEVDFolderExist() {
|
|
478
541
|
if (!node_fs.existsSync(r("node_modules/.evd"))) {
|
|
@@ -507,4 +570,4 @@ async function installPrebuilt(configs) {
|
|
|
507
570
|
}
|
|
508
571
|
commander.program.description(
|
|
509
572
|
"Electron 版本部署 CLI,简化你的 Electron 软件更新,让一切变得简单。"
|
|
510
|
-
).helpOption("-h, --help", "使用帮助").version("0.
|
|
573
|
+
).helpOption("-h, --help", "使用帮助").version("0.1.1", "-V, --version", "显示版本号").parse(process.argv);
|
package/dist/main.d.ts
CHANGED
|
@@ -7,13 +7,14 @@ export declare enum EVDEventEnum {
|
|
|
7
7
|
}
|
|
8
8
|
type EVDInitPropsType = {
|
|
9
9
|
netlifyUrl: string;
|
|
10
|
+
remoteUrl: string;
|
|
10
11
|
windowWidth?: number;
|
|
11
12
|
windowHeight?: number;
|
|
12
13
|
logo?: string;
|
|
13
14
|
detectionFrequency?: number;
|
|
14
15
|
detectAtStart?: boolean;
|
|
15
16
|
onError?: (err: unknown) => void;
|
|
16
|
-
onBeforeNewPkgInstall?: (next: () => any) => void;
|
|
17
|
+
onBeforeNewPkgInstall?: (next: () => any, version: string) => void;
|
|
17
18
|
};
|
|
18
19
|
export declare function EVDInit(props: EVDInitPropsType): void;
|
|
19
20
|
export declare function EVDCheckUpdate(): Promise<boolean>;
|
package/dist/main.js
CHANGED
|
@@ -82,6 +82,12 @@ var EVDEventEnum = /* @__PURE__ */ ((EVDEventEnum2) => {
|
|
|
82
82
|
let globalArgs = null;
|
|
83
83
|
let cacheCurrentPkgJSON = null;
|
|
84
84
|
function EVDInit(props) {
|
|
85
|
+
if (props.netlifyUrl) {
|
|
86
|
+
props.remoteUrl = props.netlifyUrl;
|
|
87
|
+
console.warn(
|
|
88
|
+
"EVDInit 中的 netlifyUrl 参数已废弃,将会在下个主版本更新时删除,请使用 remoteUrl 代替"
|
|
89
|
+
);
|
|
90
|
+
}
|
|
85
91
|
globalArgs = props;
|
|
86
92
|
const { detectionFrequency, detectAtStart, onError } = getConfigs();
|
|
87
93
|
setInterval(async () => {
|
|
@@ -106,11 +112,11 @@ function EVDInit(props) {
|
|
|
106
112
|
);
|
|
107
113
|
}
|
|
108
114
|
async function EVDCheckUpdate() {
|
|
109
|
-
const {
|
|
115
|
+
const { remoteUrl } = getConfigs();
|
|
110
116
|
const { version } = cacheCurrentPkgJSON;
|
|
111
|
-
const remoteJSON = await fetchRemotePkgJSON(
|
|
117
|
+
const remoteJSON = await fetchRemotePkgJSON(remoteUrl);
|
|
112
118
|
if (!remoteJSON)
|
|
113
|
-
throw new Error(`${
|
|
119
|
+
throw new Error(`${remoteUrl}package.json 文件不存在`);
|
|
114
120
|
const localVersion = versionToNum(version);
|
|
115
121
|
const remoteVersion = versionToNum(remoteJSON.version);
|
|
116
122
|
if (remoteVersion > localVersion) {
|
|
@@ -184,8 +190,8 @@ async function showNewVersionDialog() {
|
|
|
184
190
|
});
|
|
185
191
|
}
|
|
186
192
|
async function installNewVersion() {
|
|
187
|
-
const {
|
|
188
|
-
const remoteJSON = await fetchRemotePkgJSON(
|
|
193
|
+
const { remoteUrl, onError } = getConfigs();
|
|
194
|
+
const remoteJSON = await fetchRemotePkgJSON(remoteUrl);
|
|
189
195
|
const needInstallFullSize = compareObjectsIsEqual(
|
|
190
196
|
remoteJSON.dependencies,
|
|
191
197
|
cacheCurrentPkgJSON.dependencies
|
|
@@ -197,7 +203,7 @@ async function installNewVersion() {
|
|
|
197
203
|
}
|
|
198
204
|
}
|
|
199
205
|
async function installPkg(zipFile) {
|
|
200
|
-
const {
|
|
206
|
+
const { remoteUrl } = getConfigs();
|
|
201
207
|
const appPath = electron.app.getAppPath();
|
|
202
208
|
const unzipPath = node_path.join(appPath, "evdUnzip");
|
|
203
209
|
const installerFile = node_path.join(appPath, "_evdInstallerTmp.js");
|
|
@@ -211,7 +217,7 @@ async function installPkg(zipFile) {
|
|
|
211
217
|
node_fs.mkdirSync(unzipPath);
|
|
212
218
|
const tmpZipFilePath = node_fs.createWriteStream(unzipPath + ".zip");
|
|
213
219
|
await new Promise(
|
|
214
|
-
(res, rej) => node_https.get(`${
|
|
220
|
+
(res, rej) => node_https.get(`${remoteUrl}/${zipFile}`, (response) => {
|
|
215
221
|
response.pipe(tmpZipFilePath).on("finish", () => {
|
|
216
222
|
res();
|
|
217
223
|
}).on("error", (err) => {
|
|
@@ -250,7 +256,7 @@ async function installPkg(zipFile) {
|
|
|
250
256
|
]);
|
|
251
257
|
}
|
|
252
258
|
function bindEvent(promptWindow, onError) {
|
|
253
|
-
const { logo, onBeforeNewPkgInstall } = getConfigs();
|
|
259
|
+
const { logo, onBeforeNewPkgInstall, remoteUrl } = getConfigs();
|
|
254
260
|
electron.ipcMain.on("evd-open-link", (_, link) => {
|
|
255
261
|
electron.shell.openExternal(link);
|
|
256
262
|
});
|
|
@@ -258,22 +264,24 @@ function bindEvent(promptWindow, onError) {
|
|
|
258
264
|
promptWindow.close();
|
|
259
265
|
});
|
|
260
266
|
electron.ipcMain.on("evd-update-now", (_) => {
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
267
|
+
fetchRemotePkgJSON(remoteUrl).then((pkg) => {
|
|
268
|
+
onBeforeNewPkgInstall(() => {
|
|
269
|
+
installNewVersion().then(() => {
|
|
270
|
+
setTimeout(() => promptWindow.close(), 1);
|
|
271
|
+
setTimeout(() => electron.app.relaunch(), 1);
|
|
272
|
+
setTimeout(() => electron.app.exit(), 1);
|
|
273
|
+
}).catch((e) => {
|
|
274
|
+
onError(e);
|
|
275
|
+
});
|
|
276
|
+
}, pkg.version);
|
|
269
277
|
});
|
|
270
278
|
});
|
|
271
279
|
electron.ipcMain.handle("evd-get-logo", () => {
|
|
272
280
|
return logo;
|
|
273
281
|
});
|
|
274
282
|
electron.ipcMain.handle("evd-get-change-logs", async () => {
|
|
275
|
-
const {
|
|
276
|
-
return await fetchRemoteChangelogJSON(
|
|
283
|
+
const { remoteUrl: remoteUrl2 } = getConfigs();
|
|
284
|
+
return await fetchRemoteChangelogJSON(remoteUrl2);
|
|
277
285
|
});
|
|
278
286
|
}
|
|
279
287
|
function cleanup(promptWindow) {
|
|
@@ -310,7 +318,7 @@ function getConfigs() {
|
|
|
310
318
|
...{
|
|
311
319
|
onError: () => {
|
|
312
320
|
},
|
|
313
|
-
onBeforeNewPkgInstall: (next) => {
|
|
321
|
+
onBeforeNewPkgInstall: (next, version) => {
|
|
314
322
|
next();
|
|
315
323
|
},
|
|
316
324
|
windowHeight: 360,
|
|
@@ -11,10 +11,15 @@ export type EVDConfigType = {
|
|
|
11
11
|
codes: string;
|
|
12
12
|
packageJSON: string;
|
|
13
13
|
};
|
|
14
|
-
netlify
|
|
14
|
+
netlify?: {
|
|
15
15
|
url: string;
|
|
16
16
|
token: string;
|
|
17
17
|
siteID: string;
|
|
18
18
|
};
|
|
19
|
+
cloudflare?: {
|
|
20
|
+
url: string;
|
|
21
|
+
token: string;
|
|
22
|
+
projectName: string;
|
|
23
|
+
};
|
|
19
24
|
prebuiltConfig: PrebuiltConfigType;
|
|
20
25
|
};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "electron-version-deployer-cli",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.1.1",
|
|
5
5
|
"types": "./dist/index.d.ts",
|
|
6
6
|
"main": "./dist/index.cjs.js",
|
|
7
7
|
"module": "./dist/index.es.js",
|
|
@@ -18,23 +18,24 @@
|
|
|
18
18
|
"dist"
|
|
19
19
|
],
|
|
20
20
|
"devDependencies": {
|
|
21
|
+
"@inquirer/prompts": "^1.2.3",
|
|
21
22
|
"@types/archiver": "^5.3.2",
|
|
22
23
|
"@types/node": "^20.2.5",
|
|
23
|
-
"electron": "^25.0.1",
|
|
24
|
-
"prettier": "^2.8.8",
|
|
25
|
-
"tsc-alias": "^1.8.6",
|
|
26
|
-
"typescript": "^5.0.2",
|
|
27
|
-
"vite": "^4.3.9",
|
|
28
|
-
"@inquirer/prompts": "^1.2.3",
|
|
29
24
|
"changelog-parser": "^3.0.1",
|
|
30
25
|
"commander": "^10.0.1",
|
|
31
26
|
"dompurify": "^3.0.3",
|
|
32
27
|
"download": "^8.0.0",
|
|
28
|
+
"electron": "^25.0.1",
|
|
33
29
|
"esno": "^0.16.3",
|
|
34
30
|
"jsdom": "^22.1.0",
|
|
35
31
|
"log-symbols": "=4.1.0",
|
|
36
32
|
"marked": "^5.0.4",
|
|
37
|
-
"netlify-cli": "^15.2.0"
|
|
33
|
+
"netlify-cli": "^15.2.0",
|
|
34
|
+
"prettier": "^2.8.8",
|
|
35
|
+
"tsc-alias": "^1.8.6",
|
|
36
|
+
"typescript": "^5.0.2",
|
|
37
|
+
"vite": "^4.3.9",
|
|
38
|
+
"wrangler": "^3.3.0"
|
|
38
39
|
},
|
|
39
40
|
"dependencies": {
|
|
40
41
|
"archiver": "^5.3.1",
|
|
@@ -42,17 +43,18 @@
|
|
|
42
43
|
"pkg-up": "3.1.0"
|
|
43
44
|
},
|
|
44
45
|
"peerDependencies": {
|
|
45
|
-
"electron": ">=10.0.0",
|
|
46
46
|
"@inquirer/prompts": "^1.2.3",
|
|
47
47
|
"changelog-parser": "^3.0.1",
|
|
48
48
|
"commander": "^10.0.1",
|
|
49
49
|
"dompurify": "^3.0.3",
|
|
50
50
|
"download": "^8.0.0",
|
|
51
|
+
"electron": ">=10.0.0",
|
|
51
52
|
"esno": "^0.16.3",
|
|
52
53
|
"jsdom": "^22.1.0",
|
|
53
54
|
"log-symbols": "=4.1.0",
|
|
54
55
|
"marked": "^5.0.4",
|
|
55
56
|
"netlify-cli": "^15.2.0",
|
|
56
|
-
"vite": "^4.3.9"
|
|
57
|
+
"vite": "^4.3.9",
|
|
58
|
+
"wrangler": "^3.3.0"
|
|
57
59
|
}
|
|
58
60
|
}
|