electron-version-deployer-cli 0.0.3 → 0.0.5

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.
Files changed (2) hide show
  1. package/dist/cli.cjs +9 -7
  2. package/package.json +1 -1
package/dist/cli.cjs CHANGED
@@ -157,6 +157,7 @@ async function bundleConfigFileAndRead(configFilePath) {
157
157
  }
158
158
  },
159
159
  build: {
160
+ ssr: true,
160
161
  write: false,
161
162
  commonjsOptions: {
162
163
  esmExternals: true
@@ -167,17 +168,18 @@ async function bundleConfigFileAndRead(configFilePath) {
167
168
  minify: false,
168
169
  lib: {
169
170
  entry: configFilePath,
170
- // 注意,由于我们需要将文件打包到一起,所以用的 iife 格式
171
- // 这里给一个全局名称,方便等等在上下文中获取
172
171
  name: "_",
173
- formats: ["iife"]
172
+ formats: ["cjs"]
174
173
  }
175
174
  }
176
175
  }).then((data) => {
177
176
  const script = new vm.Script(data[0].output[0].code);
178
- const ctx = {};
177
+ const ctx = {
178
+ require,
179
+ module
180
+ };
179
181
  script.runInNewContext(ctx);
180
- resolve(ctx._);
182
+ resolve(ctx.module.exports);
181
183
  });
182
184
  });
183
185
  }
@@ -212,8 +214,8 @@ commander.program.command("prepare").description(
212
214
  const configs = await getConfigs();
213
215
  try {
214
216
  await genTmpFolder();
215
- await compile(configs);
216
217
  await genChangelog(configs);
218
+ await compile(configs);
217
219
  await copySourceAndZipFiles(configs);
218
220
  } catch (e) {
219
221
  console.log(logSymbols.error, e.toString());
@@ -493,4 +495,4 @@ async function installPrebuilt(configs) {
493
495
  }
494
496
  commander.program.description(
495
497
  "Electron 版本部署 CLI,简化你的 Electron 软件更新,让一切变得简单。"
496
- ).helpOption("-h, --help", "使用帮助").version("0.0.3", "-V, --version", "显示版本号").parse(process.argv);
498
+ ).helpOption("-h, --help", "使用帮助").version("0.0.5", "-V, --version", "显示版本号").parse(process.argv);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "electron-version-deployer-cli",
3
3
  "private": false,
4
- "version": "0.0.3",
4
+ "version": "0.0.5",
5
5
  "types": "./dist/index.d.ts",
6
6
  "main": "./dist/index.cjs.js",
7
7
  "module": "./dist/index.es.js",