@greatstore/cli 0.0.8 → 0.0.10
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/dist/cli.js +11 -2
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -71,7 +71,9 @@ var SUCCESS_HTML = `<!doctype html>
|
|
|
71
71
|
<style>body{font:14px/1.5 system-ui;margin:4rem auto;max-width:32rem;color:#222;text-align:center}
|
|
72
72
|
h1{font-size:1.4rem}code{background:#f4f4f4;padding:.1em .3em;border-radius:.2em}</style></head>
|
|
73
73
|
<body><h1>You're signed in.</h1>
|
|
74
|
-
<p>
|
|
74
|
+
<p>This window will close automatically. If it doesn't, you can close it and return to your terminal.</p>
|
|
75
|
+
<script>setTimeout(function(){window.close();},250);</script>
|
|
76
|
+
</body></html>`;
|
|
75
77
|
var FAILURE_HTML = `<!doctype html>
|
|
76
78
|
<html lang="en"><head><meta charset="utf-8"><title>GreatStore CLI</title>
|
|
77
79
|
<style>body{font:14px/1.5 system-ui;margin:4rem auto;max-width:32rem;color:#222;text-align:center}
|
|
@@ -731,6 +733,7 @@ function manifest(name) {
|
|
|
731
733
|
return JSON.stringify(
|
|
732
734
|
{
|
|
733
735
|
name,
|
|
736
|
+
displayName: defaultDisplayName(name),
|
|
734
737
|
description: `Renders the ${name} widget.`,
|
|
735
738
|
displayMode: "inline",
|
|
736
739
|
inputSchema: {
|
|
@@ -742,6 +745,12 @@ function manifest(name) {
|
|
|
742
745
|
2
|
|
743
746
|
) + "\n";
|
|
744
747
|
}
|
|
748
|
+
function defaultDisplayName(name) {
|
|
749
|
+
const words = name.split("_").filter(Boolean);
|
|
750
|
+
if (words.length === 0) return name;
|
|
751
|
+
const first = words[0];
|
|
752
|
+
return first.charAt(0).toUpperCase() + first.slice(1) + (words.length > 1 ? " " + words.slice(1).join(" ") : "");
|
|
753
|
+
}
|
|
745
754
|
function component(name) {
|
|
746
755
|
return `import React from "react";
|
|
747
756
|
|
|
@@ -877,7 +886,7 @@ function pascal(name) {
|
|
|
877
886
|
}
|
|
878
887
|
|
|
879
888
|
// src/index.ts
|
|
880
|
-
var VERSION = true ? "0.0.
|
|
889
|
+
var VERSION = true ? "0.0.10" : "0.0.0-dev";
|
|
881
890
|
var HELP = `gs \u2014 GreatStore CLI (v${VERSION})
|
|
882
891
|
|
|
883
892
|
Usage:
|