@babashka/cli 0.12.75
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/LICENSE +21 -0
- package/README.html +1229 -0
- package/README.md +1837 -0
- package/index.mjs +70 -0
- package/js/babashka/cli/internal.mjs +36 -0
- package/js/babashka/cli.mjs +2797 -0
- package/package.json +28 -0
package/index.mjs
ADDED
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
// Public JS API for @babashka/cli, compiled from src/babashka/cli.cljc by squint.
|
|
2
|
+
// Friendly camelCase names are the documented surface; the squint-compiled names
|
|
3
|
+
// (parse_opts, spec__GT_opts, ...) are re-exported too for direct interop.
|
|
4
|
+
import {
|
|
5
|
+
parse_opts,
|
|
6
|
+
parse_opts_STAR_,
|
|
7
|
+
parse_args,
|
|
8
|
+
parse_cmds,
|
|
9
|
+
coerce,
|
|
10
|
+
coerce_opts,
|
|
11
|
+
auto_coerce,
|
|
12
|
+
parse_keyword,
|
|
13
|
+
validate_opts,
|
|
14
|
+
apply_defaults,
|
|
15
|
+
spec__GT_opts,
|
|
16
|
+
merge_opts,
|
|
17
|
+
dispatch,
|
|
18
|
+
format_opts,
|
|
19
|
+
format_table,
|
|
20
|
+
opts__GT_table,
|
|
21
|
+
table__GT_tree,
|
|
22
|
+
format_command_help,
|
|
23
|
+
format_command_error,
|
|
24
|
+
default_width_fn,
|
|
25
|
+
_STAR_exit_fn_STAR_,
|
|
26
|
+
} from './js/babashka/cli.mjs';
|
|
27
|
+
|
|
28
|
+
export {
|
|
29
|
+
// squint names
|
|
30
|
+
parse_opts,
|
|
31
|
+
parse_opts_STAR_,
|
|
32
|
+
parse_args,
|
|
33
|
+
parse_cmds,
|
|
34
|
+
coerce,
|
|
35
|
+
coerce_opts,
|
|
36
|
+
auto_coerce,
|
|
37
|
+
parse_keyword,
|
|
38
|
+
validate_opts,
|
|
39
|
+
apply_defaults,
|
|
40
|
+
spec__GT_opts,
|
|
41
|
+
merge_opts,
|
|
42
|
+
dispatch,
|
|
43
|
+
format_opts,
|
|
44
|
+
format_table,
|
|
45
|
+
opts__GT_table,
|
|
46
|
+
table__GT_tree,
|
|
47
|
+
format_command_help,
|
|
48
|
+
format_command_error,
|
|
49
|
+
default_width_fn,
|
|
50
|
+
_STAR_exit_fn_STAR_,
|
|
51
|
+
// friendly camelCase aliases
|
|
52
|
+
parse_opts as parseOpts,
|
|
53
|
+
parse_opts_STAR_ as parseOptsRaw,
|
|
54
|
+
parse_args as parseArgs,
|
|
55
|
+
parse_cmds as parseCmds,
|
|
56
|
+
coerce_opts as coerceOpts,
|
|
57
|
+
auto_coerce as autoCoerce,
|
|
58
|
+
parse_keyword as parseKeyword,
|
|
59
|
+
validate_opts as validateOpts,
|
|
60
|
+
apply_defaults as applyDefaults,
|
|
61
|
+
spec__GT_opts as specToOpts,
|
|
62
|
+
merge_opts as mergeOpts,
|
|
63
|
+
format_opts as formatOpts,
|
|
64
|
+
format_table as formatTable,
|
|
65
|
+
opts__GT_table as optsToTable,
|
|
66
|
+
table__GT_tree as tableToTree,
|
|
67
|
+
format_command_help as formatCommandHelp,
|
|
68
|
+
format_command_error as formatCommandError,
|
|
69
|
+
default_width_fn as defaultWidthFn,
|
|
70
|
+
};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import * as squint_core from 'squint-cljs/core.js';
|
|
2
|
+
var into_able_QMARK_ = function (x) {
|
|
3
|
+
const and__23691__auto__1 = squint_core.coll_QMARK_(x);
|
|
4
|
+
if (squint_core.truth_(and__23691__auto__1)) {
|
|
5
|
+
const or__23664__auto__2 = squint_core.sequential_QMARK_(x);
|
|
6
|
+
if (squint_core.truth_(or__23664__auto__2)) {
|
|
7
|
+
return or__23664__auto__2} else {
|
|
8
|
+
return squint_core.set_QMARK_(x)};
|
|
9
|
+
} else {
|
|
10
|
+
return and__23691__auto__1};
|
|
11
|
+
|
|
12
|
+
};
|
|
13
|
+
var merge_STAR_ = function (x, y) {
|
|
14
|
+
if (squint_core.truth_((() => {
|
|
15
|
+
const and__23691__auto__1 = squint_core.map_QMARK_(x);
|
|
16
|
+
if (squint_core.truth_(and__23691__auto__1)) {
|
|
17
|
+
return squint_core.map_QMARK_(y)} else {
|
|
18
|
+
return and__23691__auto__1};
|
|
19
|
+
|
|
20
|
+
})())) {
|
|
21
|
+
return squint_core.merge(x, y)} else {
|
|
22
|
+
if (squint_core.truth_((() => {
|
|
23
|
+
const and__23691__auto__2 = into_able_QMARK_(x);
|
|
24
|
+
if (squint_core.truth_(and__23691__auto__2)) {
|
|
25
|
+
return into_able_QMARK_(y)} else {
|
|
26
|
+
return and__23691__auto__2};
|
|
27
|
+
|
|
28
|
+
})())) {
|
|
29
|
+
return squint_core.into(x, y)} else {
|
|
30
|
+
if ("else") {
|
|
31
|
+
return y} else {
|
|
32
|
+
return null}}};
|
|
33
|
+
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
export { merge_STAR_ }
|