usf-cli 1.2.5 → 1.2.6
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/package.json +1 -1
- package/utils/uploader/index.js +7 -5
package/package.json
CHANGED
package/utils/uploader/index.js
CHANGED
|
@@ -6,6 +6,8 @@ import JSZip from "jszip";
|
|
|
6
6
|
import axios from "axios";
|
|
7
7
|
import COS from "cos-nodejs-sdk-v5";
|
|
8
8
|
|
|
9
|
+
const UOS_FUNCTION_DOMAIN = "https://func.unity.cn";
|
|
10
|
+
|
|
9
11
|
const igonreList = [
|
|
10
12
|
".DS_Store",
|
|
11
13
|
".idea",
|
|
@@ -109,7 +111,7 @@ const creatZip = async function (dir) {
|
|
|
109
111
|
|
|
110
112
|
const getToken = async function (auth) {
|
|
111
113
|
const res = await axios.get(
|
|
112
|
-
|
|
114
|
+
`${UOS_FUNCTION_DOMAIN}/v1/func-stateless/functions/` +
|
|
113
115
|
auth.id +
|
|
114
116
|
"/get-transfer-token",
|
|
115
117
|
{
|
|
@@ -173,7 +175,7 @@ const createScf = async function (auth, entries) {
|
|
|
173
175
|
}
|
|
174
176
|
|
|
175
177
|
await axios.post(
|
|
176
|
-
|
|
178
|
+
`${UOS_FUNCTION_DOMAIN}/v1/func-stateless/functions/` + auth.id + "/scf",
|
|
177
179
|
payLoad,
|
|
178
180
|
{
|
|
179
181
|
headers: {
|
|
@@ -200,7 +202,7 @@ const checkFunctionStatus = function (auth) {
|
|
|
200
202
|
const getFunctionInfo = async () => {
|
|
201
203
|
try {
|
|
202
204
|
const res = await axios.get(
|
|
203
|
-
|
|
205
|
+
`${UOS_FUNCTION_DOMAIN}/v1/func-stateless/functions/` + auth.id,
|
|
204
206
|
{
|
|
205
207
|
headers: {
|
|
206
208
|
Authorization: "Basic " + btoa(auth.id + ":" + auth.secret),
|
|
@@ -233,7 +235,7 @@ const updateInstallDependency = async function (install = false, auth) {
|
|
|
233
235
|
};
|
|
234
236
|
|
|
235
237
|
await axios.put(
|
|
236
|
-
|
|
238
|
+
`${UOS_FUNCTION_DOMAIN}/v1/func-stateless/functions/` + auth.id,
|
|
237
239
|
payload,
|
|
238
240
|
{
|
|
239
241
|
headers: {
|
|
@@ -263,7 +265,7 @@ const listFunctions = async function (version, auth) {
|
|
|
263
265
|
version: version,
|
|
264
266
|
};
|
|
265
267
|
const res = await axios.get(
|
|
266
|
-
|
|
268
|
+
`${UOS_FUNCTION_DOMAIN}/v1/func-stateless/functions/${auth.id}/scf`,
|
|
267
269
|
{
|
|
268
270
|
params: params,
|
|
269
271
|
headers: {
|