@scalar/cli 0.2.323 → 0.2.324
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.
|
@@ -16,7 +16,7 @@ function BundleCommand() {
|
|
|
16
16
|
const { specification: newContent } = await loadOpenApiFile(file);
|
|
17
17
|
// Replace file content with newContent
|
|
18
18
|
const cache = [];
|
|
19
|
-
const json = JSON.stringify(newContent, (
|
|
19
|
+
const json = JSON.stringify(newContent, (_key, value) => {
|
|
20
20
|
if (typeof value === 'object' && value !== null) {
|
|
21
21
|
if (cache.indexOf(value) !== -1) {
|
|
22
22
|
// Circular reference found, discard key
|
|
@@ -20,8 +20,8 @@ function CheckCommand() {
|
|
|
20
20
|
// Check if `scalar.config.json` already exists
|
|
21
21
|
if (!fs.existsSync(file)) {
|
|
22
22
|
console.log();
|
|
23
|
-
console.error(kleur.red().bold(
|
|
24
|
-
console.error(kleur.red(
|
|
23
|
+
console.error(kleur.red().bold('ERROR'));
|
|
24
|
+
console.error(kleur.red('Couldn’t find the Scalar Configuration file:'));
|
|
25
25
|
console.error(kleur.red(file));
|
|
26
26
|
console.log();
|
|
27
27
|
process.exit(1);
|
|
@@ -66,10 +66,10 @@ function InitCommand() {
|
|
|
66
66
|
validInput = !!subdomain;
|
|
67
67
|
while (!validInput) {
|
|
68
68
|
const response = await text({
|
|
69
|
-
message:
|
|
69
|
+
message: 'What’s the name of your project? We’ll use that to create a custom subdomain for you.',
|
|
70
70
|
validate(value) {
|
|
71
71
|
if (value.trim().length === 0) {
|
|
72
|
-
return
|
|
72
|
+
return 'You didn’t provide a project name. Please provide a name!';
|
|
73
73
|
}
|
|
74
74
|
return;
|
|
75
75
|
},
|
|
@@ -103,7 +103,7 @@ function InitCommand() {
|
|
|
103
103
|
message: `Where is your OpenAPI file? ${kleur.reset().grey('(Add a path to the file)')}`,
|
|
104
104
|
validate(value) {
|
|
105
105
|
if (value.length === 0) {
|
|
106
|
-
return
|
|
106
|
+
return 'Value is required!';
|
|
107
107
|
}
|
|
108
108
|
return;
|
|
109
109
|
},
|
|
@@ -33,7 +33,7 @@ function ShareCommand() {
|
|
|
33
33
|
console.log();
|
|
34
34
|
console.log(kleur.white('Use the token to update the existing sandbox:'));
|
|
35
35
|
console.log();
|
|
36
|
-
console.log(`${kleur.grey('$')} ${kleur.bold().white(
|
|
36
|
+
console.log(`${kleur.grey('$')} ${kleur.bold().white('scalar share --token=')}${kleur.bold().cyan(`${newToken}`)} `);
|
|
37
37
|
console.log();
|
|
38
38
|
})
|
|
39
39
|
.catch((error) => {
|
package/dist/package.json.js
CHANGED
package/dist/utils/watchFile.js
CHANGED
|
@@ -22,7 +22,7 @@ async function watchFile(file, callback, options) {
|
|
|
22
22
|
// Get path where the file is located
|
|
23
23
|
const directory = path.dirname(absoluteFilePath);
|
|
24
24
|
// Start the watcher
|
|
25
|
-
await watcher.subscribe(directory, (
|
|
25
|
+
await watcher.subscribe(directory, (_err, events) => {
|
|
26
26
|
// Match the file path
|
|
27
27
|
if (events.some((event) => event.path === absoluteFilePath)) {
|
|
28
28
|
callback();
|
package/package.json
CHANGED
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"swagger",
|
|
17
17
|
"cli"
|
|
18
18
|
],
|
|
19
|
-
"version": "0.2.
|
|
19
|
+
"version": "0.2.324",
|
|
20
20
|
"engines": {
|
|
21
21
|
"node": ">=18"
|
|
22
22
|
},
|
|
@@ -44,12 +44,12 @@
|
|
|
44
44
|
"hono": "^4.6.5",
|
|
45
45
|
"kleur": "^4.1.5",
|
|
46
46
|
"prettyjson": "^1.2.5",
|
|
47
|
-
"@scalar/api-reference": "1.28.
|
|
47
|
+
"@scalar/api-reference": "1.28.6",
|
|
48
48
|
"@scalar/config": "0.1.3",
|
|
49
|
-
"@scalar/mock-server": "0.3.
|
|
50
|
-
"@scalar/oas-utils": "0.2.120",
|
|
51
|
-
"@scalar/openapi-parser": "0.10.10",
|
|
49
|
+
"@scalar/mock-server": "0.3.3",
|
|
52
50
|
"@scalar/openapi-types": "0.1.9",
|
|
51
|
+
"@scalar/oas-utils": "0.2.121",
|
|
52
|
+
"@scalar/openapi-parser": "0.10.11",
|
|
53
53
|
"@scalar/void-server": "2.0.17"
|
|
54
54
|
},
|
|
55
55
|
"devDependencies": {
|