esa-cli 1.0.4-beta.2 → 1.0.4

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.
@@ -27,8 +27,12 @@ const renameMock = {
27
27
  return;
28
28
  }
29
29
  if (((_a = path.parentPath) === null || _a === void 0 ? void 0 : _a.type) === 'MemberExpression' &&
30
- path.key === 'object') {
31
- path.node.name = replacements[name];
30
+ path.key === 'object' &&
31
+ path.node.name === 'cache') {
32
+ path.node.name = 'mockCache';
33
+ }
34
+ else if (path.node.name === 'EdgeKV') {
35
+ path.node.name = 'mockKV';
32
36
  }
33
37
  }
34
38
  });
@@ -8,7 +8,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
8
8
  });
9
9
  };
10
10
  import { execSync } from 'child_process';
11
- import https from 'https';
11
+ import http from 'http';
12
12
  import os from 'os';
13
13
  import path from 'path';
14
14
  import util from 'util';
@@ -65,8 +65,8 @@ export function preCheckEw2() {
65
65
  }
66
66
  export function fetchRemoteManifest() {
67
67
  return new Promise((resolve, reject) => {
68
- https
69
- .get('https://edgestar-cn.oss-cn-beijing.aliyuncs.com/ew2/manifest.json', (res) => {
68
+ http
69
+ .get('http://esa-runtime.myalicdn.com/ew2/manifest.json', (res) => {
70
70
  let data = '';
71
71
  res.on('data', (chunk) => (data += chunk));
72
72
  res.on('end', () => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "esa-cli",
3
- "version": "1.0.4-beta.2",
3
+ "version": "1.0.4",
4
4
  "description": "A CLI for operating Alibaba Cloud ESA Functions and Pages.",
5
5
  "main": "bin/enter.cjs",
6
6
  "type": "module",
@@ -19,6 +19,7 @@
19
19
  "dev": "tsc --watch",
20
20
  "eslint": "eslint src/ --ext .js,.jsx,.ts,.tsx",
21
21
  "prepare": "husky install",
22
+ "prepublishOnly": "npm run build",
22
23
  "lint-staged": "lint-staged",
23
24
  "test": "vitest --coverage",
24
25
  "coverage": "vitest --coverage",