@stacksjs/cli 0.58.71 → 0.58.73
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/index.js +21 -2
- package/package.json +2 -1
- package/src/utils.ts +20 -0
package/dist/index.js
CHANGED
|
@@ -76,9 +76,10 @@ async function execSync(command, options) {
|
|
|
76
76
|
}
|
|
77
77
|
|
|
78
78
|
// src/utils.ts
|
|
79
|
+
import {collect} from "@stacksjs/collections";
|
|
79
80
|
import * as kolorist from "kolorist";
|
|
80
81
|
|
|
81
|
-
//
|
|
82
|
+
// ../../../../node_modules/consola/dist/utils.mjs
|
|
82
83
|
import * as tty from "tty";
|
|
83
84
|
var replaceClose = function(index, string, close, replace, head = string.slice(0, Math.max(0, index)) + replace, tail = string.slice(Math.max(0, index + close.length)), next = tail.indexOf(close)) {
|
|
84
85
|
return head + (next < 0 ? tail : replaceClose(next, tail, close, replace));
|
|
@@ -386,6 +387,23 @@ trueColor,
|
|
|
386
387
|
trueColorBg,
|
|
387
388
|
stripColors
|
|
388
389
|
} from "kolorist";
|
|
390
|
+
var quotes = collect([
|
|
391
|
+
"The best way to get started is to quit talking and begin doing.",
|
|
392
|
+
"The pessimist sees difficulty in every opportunity. The optimist sees opportunity in every difficulty.",
|
|
393
|
+
"Don\u2019t let yesterday take up too much of today.",
|
|
394
|
+
"You learn more from failure than from success. Don\u2019t let it stop you. Failure builds character.",
|
|
395
|
+
"It\u2019s not whether you get knocked down, it\u2019s whether you get up.",
|
|
396
|
+
"If you are working on something that you really care about, you don\u2019t have to be pushed. The vision pulls you.",
|
|
397
|
+
"People who are crazy enough to think they can change the world, are the ones who do.",
|
|
398
|
+
"Failure will never overtake me if my determination to succeed is strong enough.",
|
|
399
|
+
"Entrepreneurs are great at dealing with uncertainty and also very good at minimizing risk. That\u2019s the classic entrepreneur.",
|
|
400
|
+
"We may encounter many defeats but we must not be defeated.",
|
|
401
|
+
"Knowing is not enough; we must apply. Wishing is not enough; we must do.",
|
|
402
|
+
"Imagine your life is perfect in every respect; what would it look like?",
|
|
403
|
+
"We generate fears while we sit. We overcome them by action.",
|
|
404
|
+
"Whether you think you can or think you can\u2019t, you\u2019re right.",
|
|
405
|
+
"Security is mostly a superstition. Life is either a daring adventure or nothing."
|
|
406
|
+
]);
|
|
389
407
|
|
|
390
408
|
// src/console.ts
|
|
391
409
|
import {log as log2, logger} from "@stacksjs/logging";
|
|
@@ -502,7 +520,7 @@ import {log as log3} from "@stacksjs/logging";
|
|
|
502
520
|
import {ExitCode as ExitCode2} from "@stacksjs/types";
|
|
503
521
|
import {bgCyan as bgCyan2, bold as bold2, cyan as cyan2, dim as dim2, gray as gray2, green as green2, italic as italic2} from "kolorist";
|
|
504
522
|
// package.json
|
|
505
|
-
var version = "0.58.
|
|
523
|
+
var version = "0.58.73";
|
|
506
524
|
|
|
507
525
|
// src/helpers.ts
|
|
508
526
|
async function intro(command2, options) {
|
|
@@ -694,6 +712,7 @@ export {
|
|
|
694
712
|
rightAlign,
|
|
695
713
|
reset,
|
|
696
714
|
red,
|
|
715
|
+
quotes,
|
|
697
716
|
prompts,
|
|
698
717
|
prompt,
|
|
699
718
|
parseOptions,
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stacksjs/cli",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.58.
|
|
4
|
+
"version": "0.58.73",
|
|
5
5
|
"description": "TypeScript framework for CLI artisans. Build beautiful console apps with ease.",
|
|
6
6
|
"author": "Chris Breuer",
|
|
7
7
|
"license": "MIT",
|
|
@@ -72,6 +72,7 @@
|
|
|
72
72
|
},
|
|
73
73
|
"dependencies": {
|
|
74
74
|
"@antfu/install-pkg": "^0.3.1",
|
|
75
|
+
"@stacksjs/collections": "latest",
|
|
75
76
|
"@stacksjs/config": "latest",
|
|
76
77
|
"@stacksjs/error-handling": "latest",
|
|
77
78
|
"@stacksjs/logging": "latest",
|
package/src/utils.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { collect } from '@stacksjs/collections'
|
|
2
|
+
|
|
1
3
|
export * as kolorist from 'kolorist'
|
|
2
4
|
|
|
3
5
|
export {
|
|
@@ -60,3 +62,21 @@ export {
|
|
|
60
62
|
trueColorBg,
|
|
61
63
|
stripColors,
|
|
62
64
|
} from 'kolorist'
|
|
65
|
+
|
|
66
|
+
export const quotes = collect([ // could be queried from any API or database
|
|
67
|
+
'The best way to get started is to quit talking and begin doing.',
|
|
68
|
+
'The pessimist sees difficulty in every opportunity. The optimist sees opportunity in every difficulty.',
|
|
69
|
+
'Don’t let yesterday take up too much of today.',
|
|
70
|
+
'You learn more from failure than from success. Don’t let it stop you. Failure builds character.',
|
|
71
|
+
'It’s not whether you get knocked down, it’s whether you get up.',
|
|
72
|
+
'If you are working on something that you really care about, you don’t have to be pushed. The vision pulls you.',
|
|
73
|
+
'People who are crazy enough to think they can change the world, are the ones who do.',
|
|
74
|
+
'Failure will never overtake me if my determination to succeed is strong enough.',
|
|
75
|
+
'Entrepreneurs are great at dealing with uncertainty and also very good at minimizing risk. That’s the classic entrepreneur.',
|
|
76
|
+
'We may encounter many defeats but we must not be defeated.',
|
|
77
|
+
'Knowing is not enough; we must apply. Wishing is not enough; we must do.',
|
|
78
|
+
'Imagine your life is perfect in every respect; what would it look like?',
|
|
79
|
+
'We generate fears while we sit. We overcome them by action.',
|
|
80
|
+
'Whether you think you can or think you can’t, you’re right.',
|
|
81
|
+
'Security is mostly a superstition. Life is either a daring adventure or nothing.',
|
|
82
|
+
])
|