usf-cli 1.2.7 → 1.2.9
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/index.js +9 -1
- package/package.json +1 -1
- package/utils/uploader/index.js +4 -0
package/index.js
CHANGED
|
@@ -76,7 +76,7 @@ Usage:
|
|
|
76
76
|
-c --f=<function-name> --t=<template> create function <function-name> with specified template code (see Supported template code) & its test event data template
|
|
77
77
|
-r --f=<function-name> run function <function-name> with default event data(./uos_test/<function-name>_event.json)
|
|
78
78
|
-r --f=<function-name> --e=<event-dir> run function <function-name> with specified event data
|
|
79
|
-
-a --id=<
|
|
79
|
+
-a [--id=<id> --secret=<secret>] set or show app id and service secret for this project (used for generating auth token)
|
|
80
80
|
-d upload current stateless functions to UOS platform with UOS auth and deploy automatically
|
|
81
81
|
-d --installDependency upload current stateless functions to UOS platform with UOS auth and deploy automatically (auto install dependency)
|
|
82
82
|
|
|
@@ -130,6 +130,14 @@ const runFunction = async function () {
|
|
|
130
130
|
};
|
|
131
131
|
|
|
132
132
|
const setAuthInfo = async function () {
|
|
133
|
+
const auth = (await getAuthInfoFromFile()) || {};
|
|
134
|
+
if (!this.id && !this.secret) {
|
|
135
|
+
if (auth.id && auth.secret) {
|
|
136
|
+
console.log(`Current authenticated app id: ${auth.id}`);
|
|
137
|
+
return;
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
|
|
133
141
|
if (!this.id) {
|
|
134
142
|
console.error(
|
|
135
143
|
`Please specify app id with "--id".\n\nIf not sure about app id, you can go to uos dev portal(https://uos.unity.cn/apps) to find your apps and get app id.`
|
package/package.json
CHANGED
package/utils/uploader/index.js
CHANGED
|
@@ -186,6 +186,10 @@ const createScf = async function (auth, entries) {
|
|
|
186
186
|
};
|
|
187
187
|
|
|
188
188
|
const loadingAnimation = function (loadingLabel) {
|
|
189
|
+
if (!process.stdout.isTTY) {
|
|
190
|
+
console.log(`${loadingLabel}...`);
|
|
191
|
+
return setInterval(() => {}, 1000); // Return a dummy interval to keep stepWrapper happy
|
|
192
|
+
}
|
|
189
193
|
const frames = ["-", "\\", "|", "/"];
|
|
190
194
|
let i = 0;
|
|
191
195
|
|