kourou 1.5.1-dev.1 → 1.5.1-dev.2
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/README.md +5 -1
- package/lib/commands/app/scaffold.js +10 -4
- package/lib/common.js +12 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -27,7 +27,7 @@ $ npm install -g kourou
|
|
|
27
27
|
$ kourou COMMAND
|
|
28
28
|
running command...
|
|
29
29
|
$ kourou (--version)
|
|
30
|
-
kourou/1.5.1-dev.
|
|
30
|
+
kourou/1.5.1-dev.2 linux-x64 node-v24.21.0
|
|
31
31
|
$ kourou --help [COMMAND]
|
|
32
32
|
USAGE
|
|
33
33
|
$ kourou COMMAND
|
|
@@ -387,6 +387,10 @@ FLAGS
|
|
|
387
387
|
|
|
388
388
|
DESCRIPTION
|
|
389
389
|
Scaffolds a new Kuzzle application
|
|
390
|
+
|
|
391
|
+
Template repositories are private: this command is reserved to Kuzzle customers
|
|
392
|
+
and members of the kuzzleio GitHub organization. It requires GitHub credentials
|
|
393
|
+
allowed to read the template repositories (see --token).
|
|
390
394
|
```
|
|
391
395
|
|
|
392
396
|
_See code: [src/commands/app/scaffold.ts](src/commands/app/scaffold.ts)_
|
|
@@ -137,9 +137,11 @@ class AppScaffold extends common_1.Kommand {
|
|
|
137
137
|
}
|
|
138
138
|
}
|
|
139
139
|
throw new Error(`Unable to clone the template repository "kuzzleio/${repo}". ` +
|
|
140
|
-
"
|
|
141
|
-
"
|
|
142
|
-
|
|
140
|
+
"Template repositories are private and reserved to Kuzzle customers and " +
|
|
141
|
+
"members of the kuzzleio GitHub organization. Provide credentials allowed " +
|
|
142
|
+
"to read it with the --token flag, the GITHUB_TOKEN environment variable, " +
|
|
143
|
+
"the GitHub CLI (gh auth login) or a SSH key. " +
|
|
144
|
+
`If you need access, contact Kuzzle support.\n${this.hideToken((lastError === null || lastError === void 0 ? void 0 : lastError.message) || "")}`);
|
|
143
145
|
}
|
|
144
146
|
async copyTemplate(destination) {
|
|
145
147
|
// -R (and not -r) so symlinks contained in the template are copied as
|
|
@@ -153,7 +155,11 @@ class AppScaffold extends common_1.Kommand {
|
|
|
153
155
|
}
|
|
154
156
|
}
|
|
155
157
|
AppScaffold.initSdk = false;
|
|
156
|
-
AppScaffold.description =
|
|
158
|
+
AppScaffold.description = `Scaffolds a new Kuzzle application
|
|
159
|
+
|
|
160
|
+
Template repositories are private: this command is reserved to Kuzzle customers
|
|
161
|
+
and members of the kuzzleio GitHub organization. It requires GitHub credentials
|
|
162
|
+
allowed to read the template repositories (see --token).`;
|
|
157
163
|
AppScaffold.flags = {
|
|
158
164
|
help: core_1.Flags.help(),
|
|
159
165
|
flavor: core_1.Flags.string({
|
package/lib/common.js
CHANGED
|
@@ -111,13 +111,23 @@ class Kommand extends core_1.Command {
|
|
|
111
111
|
const esDetails = esBody
|
|
112
112
|
? `\n\nElasticsearch response: ${JSON.stringify(esBody)}`
|
|
113
113
|
: "";
|
|
114
|
-
|
|
114
|
+
const status = (_d = (_c = error.status) !== null && _c !== void 0 ? _c : error.statusCode) !== null && _d !== void 0 ? _d : (_e = error.meta) === null || _e === void 0 ? void 0 : _e.statusCode;
|
|
115
|
+
// Status and id only exist on Kuzzle and Elasticsearch errors, don't
|
|
116
|
+
// display them for other errors
|
|
117
|
+
let message = `Error stack: \n${stack || error.message}${esDetails}`;
|
|
118
|
+
if (status !== undefined) {
|
|
119
|
+
message += `\n\nError status: ${status}`;
|
|
120
|
+
}
|
|
121
|
+
if (error.id !== undefined) {
|
|
122
|
+
message += `\n\nError id: ${error.id}${errorLink}`;
|
|
123
|
+
}
|
|
124
|
+
this.logKo(message);
|
|
115
125
|
if (Array.isArray(error.errors)) {
|
|
116
126
|
for (const e of error.errors) {
|
|
117
127
|
this.logKo(`${e.document._id} : ${e.reason}`);
|
|
118
128
|
}
|
|
119
129
|
}
|
|
120
|
-
else {
|
|
130
|
+
else if (error.reason !== undefined) {
|
|
121
131
|
this.logKo(JSON.stringify(error.reason));
|
|
122
132
|
}
|
|
123
133
|
err = true;
|