inngest-cli 0.23.1 → 0.24.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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/postinstall.js +3 -6
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "inngest-cli",
3
- "version": "0.23.1",
3
+ "version": "0.24.1",
4
4
  "description": "The event-driven queue for any language.",
5
5
  "license": "SEE LICENSE IN LICENSE.md",
6
6
  "scripts": {
package/postinstall.js CHANGED
@@ -19,6 +19,7 @@ const node_fetch_1 = __importDefault(require("node-fetch"));
19
19
  const path_1 = __importDefault(require("path"));
20
20
  const tar_1 = __importDefault(require("tar"));
21
21
  const url_1 = require("url");
22
+ const package_json_1 = __importDefault(require("./package.json"));
22
23
  const rootDebug = (0, debug_1.default)("inngest:cli");
23
24
  const archMap = {
24
25
  arm64: "arm64",
@@ -35,16 +36,12 @@ const platformMap = {
35
36
  win32: { platform: "windows", extension: KnownExtension.Zip },
36
37
  };
37
38
  function getBinaryUrl() {
38
- var _a;
39
39
  return __awaiter(this, void 0, void 0, function* () {
40
40
  const debug = rootDebug.extend("getBinaryUrl");
41
41
  const { arch, platform } = getArchPlatform();
42
42
  debug({ arch, platform });
43
- let version = (_a = process.env.npm_package_version) === null || _a === void 0 ? void 0 : _a.trim();
44
- debug("npm_package_version:", version);
45
- if (!version) {
46
- throw new Error("Could not find package version to install binary");
47
- }
43
+ let version = package_json_1.default.version.trim();
44
+ debug("package.json version:", version);
48
45
  const targetUrl = new url_1.URL(`https://cli.inngest.com/artifact/v${version}/inngest_${version}_${platform.platform}_${arch}${platform.extension}`);
49
46
  debug("targetUrl:", targetUrl.href);
50
47
  return targetUrl;