@solongate/proxy 0.1.7 → 0.1.8
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/create.js +11 -11
- package/dist/index.js +11 -11
- package/package.json +1 -1
package/dist/create.js
CHANGED
|
@@ -255,11 +255,7 @@ async function main() {
|
|
|
255
255
|
log(` ${c.red}Error:${c.reset} Directory "${opts.name}" already exists.`);
|
|
256
256
|
process.exit(1);
|
|
257
257
|
}
|
|
258
|
-
|
|
259
|
-
log(` ${c.blue3}Language${c.reset} TypeScript`);
|
|
260
|
-
log(` ${c.blue3}Policy${c.reset} ${opts.policy}`);
|
|
261
|
-
log("");
|
|
262
|
-
withSpinner("Scaffolding project files...", () => {
|
|
258
|
+
withSpinner(`Setting up ${opts.name}...`, () => {
|
|
263
259
|
mkdirSync(dir, { recursive: true });
|
|
264
260
|
createProject(dir, opts.name, opts.policy);
|
|
265
261
|
});
|
|
@@ -269,13 +265,17 @@ async function main() {
|
|
|
269
265
|
});
|
|
270
266
|
}
|
|
271
267
|
log("");
|
|
268
|
+
const stripAnsi = (s) => s.replace(/\x1b\[[0-9;]*m/g, "");
|
|
272
269
|
const W = 52;
|
|
273
|
-
const hr = "\u2500".repeat(W);
|
|
274
|
-
const
|
|
275
|
-
|
|
276
|
-
|
|
270
|
+
const hr = "\u2500".repeat(W + 2);
|
|
271
|
+
const bLine = (text) => {
|
|
272
|
+
const visible = stripAnsi(text);
|
|
273
|
+
const padding = W - visible.length;
|
|
274
|
+
log(` ${c.dim}\u2502${c.reset} ${text}${" ".repeat(Math.max(0, padding))} ${c.dim}\u2502${c.reset}`);
|
|
275
|
+
};
|
|
276
|
+
const bEmpty = () => log(` ${c.dim}\u2502${c.reset} ${" ".repeat(W)} ${c.dim}\u2502${c.reset}`);
|
|
277
277
|
log(` ${c.dim}\u256D${hr}\u256E${c.reset}`);
|
|
278
|
-
log(` ${c.dim}\u2502${c.reset} ${c.green}${c.bold}
|
|
278
|
+
log(` ${c.dim}\u2502${c.reset} ${c.green}${c.bold}\u2714 Project created successfully!${c.reset}${" ".repeat(W - 32)} ${c.dim}\u2502${c.reset}`);
|
|
279
279
|
log(` ${c.dim}\u251C${hr}\u2524${c.reset}`);
|
|
280
280
|
bEmpty();
|
|
281
281
|
bLine(`${c.yellow}Next steps:${c.reset}`);
|
|
@@ -291,7 +291,7 @@ async function main() {
|
|
|
291
291
|
bEmpty();
|
|
292
292
|
bLine(` ${c.cyan}$${c.reset} export SOLONGATE_API_KEY=${c.blue3}sg_live_xxx${c.reset}`);
|
|
293
293
|
bEmpty();
|
|
294
|
-
bLine(`${c.dim}
|
|
294
|
+
bLine(`${c.dim}https://dashboard.solongate.com/api-keys/${c.reset}`);
|
|
295
295
|
bEmpty();
|
|
296
296
|
log(` ${c.dim}\u2570${hr}\u256F${c.reset}`);
|
|
297
297
|
log("");
|
package/dist/index.js
CHANGED
|
@@ -916,11 +916,7 @@ async function main3() {
|
|
|
916
916
|
log3(` ${c2.red}Error:${c2.reset} Directory "${opts.name}" already exists.`);
|
|
917
917
|
process.exit(1);
|
|
918
918
|
}
|
|
919
|
-
|
|
920
|
-
log3(` ${c2.blue3}Language${c2.reset} TypeScript`);
|
|
921
|
-
log3(` ${c2.blue3}Policy${c2.reset} ${opts.policy}`);
|
|
922
|
-
log3("");
|
|
923
|
-
withSpinner("Scaffolding project files...", () => {
|
|
919
|
+
withSpinner(`Setting up ${opts.name}...`, () => {
|
|
924
920
|
mkdirSync(dir, { recursive: true });
|
|
925
921
|
createProject(dir, opts.name, opts.policy);
|
|
926
922
|
});
|
|
@@ -930,13 +926,17 @@ async function main3() {
|
|
|
930
926
|
});
|
|
931
927
|
}
|
|
932
928
|
log3("");
|
|
929
|
+
const stripAnsi = (s) => s.replace(/\x1b\[[0-9;]*m/g, "");
|
|
933
930
|
const W = 52;
|
|
934
|
-
const hr = "\u2500".repeat(W);
|
|
935
|
-
const
|
|
936
|
-
|
|
937
|
-
|
|
931
|
+
const hr = "\u2500".repeat(W + 2);
|
|
932
|
+
const bLine = (text) => {
|
|
933
|
+
const visible = stripAnsi(text);
|
|
934
|
+
const padding = W - visible.length;
|
|
935
|
+
log3(` ${c2.dim}\u2502${c2.reset} ${text}${" ".repeat(Math.max(0, padding))} ${c2.dim}\u2502${c2.reset}`);
|
|
936
|
+
};
|
|
937
|
+
const bEmpty = () => log3(` ${c2.dim}\u2502${c2.reset} ${" ".repeat(W)} ${c2.dim}\u2502${c2.reset}`);
|
|
938
938
|
log3(` ${c2.dim}\u256D${hr}\u256E${c2.reset}`);
|
|
939
|
-
log3(` ${c2.dim}\u2502${c2.reset} ${c2.green}${c2.bold}
|
|
939
|
+
log3(` ${c2.dim}\u2502${c2.reset} ${c2.green}${c2.bold}\u2714 Project created successfully!${c2.reset}${" ".repeat(W - 32)} ${c2.dim}\u2502${c2.reset}`);
|
|
940
940
|
log3(` ${c2.dim}\u251C${hr}\u2524${c2.reset}`);
|
|
941
941
|
bEmpty();
|
|
942
942
|
bLine(`${c2.yellow}Next steps:${c2.reset}`);
|
|
@@ -952,7 +952,7 @@ async function main3() {
|
|
|
952
952
|
bEmpty();
|
|
953
953
|
bLine(` ${c2.cyan}$${c2.reset} export SOLONGATE_API_KEY=${c2.blue3}sg_live_xxx${c2.reset}`);
|
|
954
954
|
bEmpty();
|
|
955
|
-
bLine(`${c2.dim}
|
|
955
|
+
bLine(`${c2.dim}https://dashboard.solongate.com/api-keys/${c2.reset}`);
|
|
956
956
|
bEmpty();
|
|
957
957
|
log3(` ${c2.dim}\u2570${hr}\u256F${c2.reset}`);
|
|
958
958
|
log3("");
|
package/package.json
CHANGED