@sous-io/sous 0.2.36 → 1.0.1
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/README.md +14 -256
- package/dist/bin.js +11 -0
- package/dist/sous.js +1093 -0
- package/docs/markdown/README.md +5 -4
- package/docs/markdown/_sidebar.md +21 -1
- package/docs/markdown/commands.md +294 -431
- package/docs/markdown/config-discovery.md +25 -14
- package/docs/markdown/config-inspection.md +53 -31
- package/docs/markdown/config-layers.md +168 -66
- package/docs/markdown/config-variables.md +44 -11
- package/docs/markdown/configuration.md +104 -17
- package/docs/markdown/design-principles.md +4 -1
- package/docs/markdown/repositories-authoring.md +30 -0
- package/docs/markdown/repositories-consuming.md +72 -14
- package/docs/markdown/repositories-file-formats.md +31 -13
- package/docs/markdown/repositories-providers.md +48 -57
- package/docs/markdown/repositories-quickstart.md +3 -2
- package/docs/markdown/repositories-troubleshooting.md +27 -1
- package/docs/markdown/repositories-variables.md +6 -1
- package/docs/markdown/repositories.md +18 -8
- package/package.json +48 -107
- package/recipes/core/sous-skills/skills/about-liquid-templates/SKILL.tpl.md +4 -6
- package/recipes/core/sous-skills/skills/about-liquid-templates/references/liquid-filters.tpl.md +2 -0
- package/recipes/core/sous-skills/skills/about-sous/SKILL.tpl.md +10 -9
- package/recipes/core/sous-skills/skills/about-sous-configuration/SKILL.tpl.md +35 -14
- package/recipes/core/sous-skills/skills/about-sous-recipes/SKILL.tpl.md +51 -20
- package/recipes/core/sous-skills/sous.recipe.yaml +1 -1
- package/sous.config.schema.json +351 -132
- package/bin/run.js +0 -51
- package/src/base-command.ts +0 -457
- package/src/commands/build.ts +0 -181
- package/src/commands/clear.ts +0 -79
- package/src/commands/compile.ts +0 -155
- package/src/commands/config/get.ts +0 -110
- package/src/commands/config/show.ts +0 -32
- package/src/commands/config/validate.ts +0 -53
- package/src/commands/help.ts +0 -46
- package/src/commands/init.ts +0 -289
- package/src/commands/launch.ts +0 -139
- package/src/commands/lock/rebuild.ts +0 -239
- package/src/commands/lock/show.ts +0 -115
- package/src/commands/namespace/list.ts +0 -138
- package/src/commands/namespace/show.ts +0 -130
- package/src/commands/prune.ts +0 -43
- package/src/commands/recipe/list.ts +0 -112
- package/src/commands/recipe/show.ts +0 -439
- package/src/commands/repo/add.ts +0 -145
- package/src/commands/repo/contribute.ts +0 -604
- package/src/commands/repo/gc.ts +0 -173
- package/src/commands/repo/init.ts +0 -136
- package/src/commands/repo/link.ts +0 -899
- package/src/commands/repo/list.ts +0 -236
- package/src/commands/repo/release.ts +0 -685
- package/src/commands/repo/remove.ts +0 -194
- package/src/commands/repo/search.ts +0 -243
- package/src/commands/repo/submit.ts +0 -341
- package/src/commands/repo/unlink.ts +0 -461
- package/src/commands/subscription/add.ts +0 -286
- package/src/commands/subscription/list.ts +0 -208
- package/src/commands/subscription/remove.ts +0 -182
- package/src/commands/subscription/update.ts +0 -216
- package/src/commands/update.ts +0 -178
- package/src/commands/vars/ask.ts +0 -417
- package/src/commands/vars/index.ts +0 -79
- package/src/commands/vars/list.ts +0 -67
- package/src/commands/vars/show.ts +0 -77
- package/src/config-command.ts +0 -30
- package/src/lib/build-preparation.ts +0 -128
- package/src/lib/build-service.ts +0 -580
- package/src/lib/config-discovery.ts +0 -378
- package/src/lib/config-inspect.ts +0 -145
- package/src/lib/config-kernel.mjs +0 -379
- package/src/lib/config-schema.ts +0 -401
- package/src/lib/env-file.ts +0 -328
- package/src/lib/env-local.ts +0 -212
- package/src/lib/errors.ts +0 -32
- package/src/lib/glob-pattern.ts +0 -24
- package/src/lib/include-resolver.ts +0 -523
- package/src/lib/interactive.ts +0 -165
- package/src/lib/markdown-compiler.ts +0 -947
- package/src/lib/package-info.ts +0 -25
- package/src/lib/pid-service.ts +0 -99
- package/src/lib/project-install.d.mts +0 -44
- package/src/lib/project-install.mjs +0 -234
- package/src/lib/project-scaffold/index.ts +0 -332
- package/src/lib/project-scaffold/templates.ts +0 -240
- package/src/lib/repos/catalog-display.ts +0 -215
- package/src/lib/repos/catalog-inputs.ts +0 -288
- package/src/lib/repos/catalog.ts +0 -842
- package/src/lib/repos/contribute.ts +0 -452
- package/src/lib/repos/core-recipe.ts +0 -105
- package/src/lib/repos/declarations.ts +0 -187
- package/src/lib/repos/defaults.ts +0 -175
- package/src/lib/repos/formats/common.ts +0 -440
- package/src/lib/repos/formats/index-file.ts +0 -253
- package/src/lib/repos/formats/links-map.ts +0 -98
- package/src/lib/repos/formats/lockfile.ts +0 -169
- package/src/lib/repos/formats/patterns.ts +0 -57
- package/src/lib/repos/formats/recipe-manifest.ts +0 -205
- package/src/lib/repos/formats/repo-manifest.ts +0 -97
- package/src/lib/repos/formats/store-entry.ts +0 -84
- package/src/lib/repos/formats/variable-definition.ts +0 -268
- package/src/lib/repos/freshness.ts +0 -264
- package/src/lib/repos/git-clone.ts +0 -850
- package/src/lib/repos/identity.ts +0 -89
- package/src/lib/repos/index.ts +0 -57
- package/src/lib/repos/links.ts +0 -356
- package/src/lib/repos/load-manifest.ts +0 -237
- package/src/lib/repos/lock-service.ts +0 -454
- package/src/lib/repos/locked-namespace-resolver.ts +0 -232
- package/src/lib/repos/locked-recipe-lookup.ts +0 -123
- package/src/lib/repos/locked-recipes.ts +0 -254
- package/src/lib/repos/managed-layer.ts +0 -422
- package/src/lib/repos/memories-hash-name.ts +0 -33
- package/src/lib/repos/namespace-resolver.ts +0 -527
- package/src/lib/repos/providers/base.ts +0 -268
- package/src/lib/repos/providers/git.ts +0 -237
- package/src/lib/repos/providers/github.ts +0 -589
- package/src/lib/repos/providers/gitlab.ts +0 -332
- package/src/lib/repos/providers/http.ts +0 -128
- package/src/lib/repos/providers/index-cache.ts +0 -421
- package/src/lib/repos/providers/index.ts +0 -106
- package/src/lib/repos/providers/local.ts +0 -391
- package/src/lib/repos/providers/provider.ts +0 -615
- package/src/lib/repos/recipe-config-layers.ts +0 -316
- package/src/lib/repos/recipe-key-matcher.ts +0 -62
- package/src/lib/repos/recipe-memories.ts +0 -178
- package/src/lib/repos/recipe-targets.ts +0 -236
- package/src/lib/repos/ref-search.ts +0 -46
- package/src/lib/repos/release/bump.ts +0 -161
- package/src/lib/repos/release/changelog.ts +0 -461
- package/src/lib/repos/release/git-state.ts +0 -460
- package/src/lib/repos/release/index-builder.ts +0 -1108
- package/src/lib/repos/release/index.ts +0 -19
- package/src/lib/repos/release/plan.ts +0 -521
- package/src/lib/repos/release/settle.ts +0 -154
- package/src/lib/repos/release/submissions.ts +0 -214
- package/src/lib/repos/release/submit-checkout.ts +0 -290
- package/src/lib/repos/release/submit-questions.ts +0 -153
- package/src/lib/repos/release/submit-service.ts +0 -898
- package/src/lib/repos/release/tags.ts +0 -239
- package/src/lib/repos/release/validate.ts +0 -463
- package/src/lib/repos/resolver.ts +0 -1028
- package/src/lib/repos/scaffold/index.ts +0 -245
- package/src/lib/repos/scaffold/templates.ts +0 -517
- package/src/lib/repos/seed.ts +0 -473
- package/src/lib/repos/store/contract.ts +0 -64
- package/src/lib/repos/store/hash.ts +0 -191
- package/src/lib/repos/store/recipe-store.ts +0 -599
- package/src/lib/repos/store/settings.ts +0 -58
- package/src/lib/repos/subscription-service.ts +0 -3859
- package/src/lib/repos/trust.ts +0 -447
- package/src/lib/repos/update-plan.ts +0 -235
- package/src/lib/self-update/index.ts +0 -14
- package/src/lib/self-update/installs.ts +0 -412
- package/src/lib/self-update/managers.ts +0 -126
- package/src/lib/self-update/plan.ts +0 -315
- package/src/lib/self-update/registry.ts +0 -99
- package/src/lib/self-update/run.ts +0 -506
- package/src/lib/self-update/versions.ts +0 -243
- package/src/lib/settings.ts +0 -1105
- package/src/lib/sous-home.ts +0 -104
- package/src/lib/state.ts +0 -167
- package/src/lib/vars/answers.ts +0 -192
- package/src/lib/vars/ask.ts +0 -1152
- package/src/lib/vars/definition-source.ts +0 -261
- package/src/lib/vars/display.ts +0 -231
- package/src/lib/vars/index.ts +0 -20
- package/src/lib/vars/ladder.ts +0 -282
- package/src/lib/vars/mappings.ts +0 -260
- package/src/lib/vars/names.ts +0 -94
- package/src/lib/vars/preanswers.ts +0 -395
- package/src/lib/vars/question-plan.ts +0 -241
- package/src/lib/vars/report.ts +0 -228
- package/src/lib/vars/safe-regex.ts +0 -235
- package/src/lib/vars/secrets.ts +0 -131
- package/src/lib/vars/validate.ts +0 -312
- package/src/lib/version-report.ts +0 -90
- package/src/lib/watch-loop.ts +0 -148
- package/src/lib/watch-service.ts +0 -116
- package/src/services/ref-resolver/container.ts +0 -107
- package/src/services/ref-resolver/dependency.ts +0 -60
- package/src/services/ref-resolver/format.ts +0 -197
- package/src/services/ref-resolver/glob.ts +0 -115
- package/src/services/ref-resolver/hash-names.ts +0 -155
- package/src/services/ref-resolver/index.ts +0 -55
- package/src/services/ref-resolver/injectable.ts +0 -36
- package/src/services/ref-resolver/location.ts +0 -62
- package/src/services/ref-resolver/lookups/cached-index-lookup.ts +0 -53
- package/src/services/ref-resolver/lookups/catalog-lookup.ts +0 -23
- package/src/services/ref-resolver/lookups/catalog-matcher.ts +0 -261
- package/src/services/ref-resolver/lookups/chained-lookup.ts +0 -27
- package/src/services/ref-resolver/lookups/env-var-lookup.ts +0 -65
- package/src/services/ref-resolver/lookups/fetched-index-lookup.ts +0 -150
- package/src/services/ref-resolver/lookups/recorded-dependency-lookup.ts +0 -62
- package/src/services/ref-resolver/lookups/ref-lookup.ts +0 -54
- package/src/services/ref-resolver/lookups/variable-lookup.ts +0 -123
- package/src/services/ref-resolver/named-refs.ts +0 -144
- package/src/services/ref-resolver/parser/env-var-splitter.ts +0 -27
- package/src/services/ref-resolver/parser/location-splitter.ts +0 -239
- package/src/services/ref-resolver/parser/name-path-splitter.ts +0 -200
- package/src/services/ref-resolver/parser/partial-ref.ts +0 -84
- package/src/services/ref-resolver/parser/query-splitter.ts +0 -61
- package/src/services/ref-resolver/parser/range-splitter.ts +0 -52
- package/src/services/ref-resolver/parser/ref-parser.ts +0 -115
- package/src/services/ref-resolver/parser/repo-qualifier-splitter.ts +0 -51
- package/src/services/ref-resolver/parts.ts +0 -115
- package/src/services/ref-resolver/pruners/command-line-pruner.ts +0 -47
- package/src/services/ref-resolver/pruners/include-pruner.ts +0 -66
- package/src/services/ref-resolver/pruners/manifest-pruner.ts +0 -130
- package/src/services/ref-resolver/pruners/ref-pruner.ts +0 -135
- package/src/services/ref-resolver/pruners/rule-helpers.ts +0 -44
- package/src/services/ref-resolver/pruners/stored-key-pruner.ts +0 -136
- package/src/services/ref-resolver/ref-helpers.ts +0 -62
- package/src/services/ref-resolver/ref-picker-service.ts +0 -204
- package/src/services/ref-resolver/ref-report.ts +0 -84
- package/src/services/ref-resolver/ref-resolve-arguments.ts +0 -47
- package/src/services/ref-resolver/ref-resolve-result.ts +0 -36
- package/src/services/ref-resolver/ref-resolver-service.ts +0 -323
- package/src/services/ref-resolver/source.ts +0 -48
- package/src/services/ref-resolver/tokens.ts +0 -25
- package/src/services/ref-resolver/types.ts +0 -155
- package/src/templating/filters/bullet-list.ts +0 -9
- package/src/templating/filters/index.ts +0 -8
- package/src/templating/init-liquid-engine.ts +0 -139
- package/src/templating/lib/glob-files.ts +0 -74
- package/src/templating/lib/import-export.ts +0 -32
- package/src/templating/lib/secret-scope.ts +0 -41
- package/src/templating/lib/tag-args.ts +0 -19
- package/src/templating/tags/exportScalarVarsJs.ts +0 -46
- package/src/templating/tags/getFiles.ts +0 -89
- package/src/templating/tags/index.ts +0 -14
- package/src/templating/tags/listFiles.ts +0 -54
- package/src/templating/tags/showVars.ts +0 -28
- package/src/utils/choice-prompt.ts +0 -143
- package/src/utils/command-errors.ts +0 -186
- package/src/utils/command-help.ts +0 -45
- package/src/utils/confirm-prompt.ts +0 -110
- package/src/utils/flags.ts +0 -177
- package/src/utils/formatting.ts +0 -849
- package/src/utils/prompts.ts +0 -53
- package/src/utils/sous-directory.ts +0 -245
- package/src/utils/table.ts +0 -603
- package/src/utils/value-prompt.ts +0 -119
package/sous.config.schema.json
CHANGED
|
@@ -1,33 +1,11 @@
|
|
|
1
1
|
{
|
|
2
|
-
"$schema": "
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://sous-io.github.io/sous/sous.config.schema.json",
|
|
4
|
+
"title": "Sous config",
|
|
3
5
|
"type": "object",
|
|
4
6
|
"properties": {
|
|
5
|
-
"$schema": {
|
|
6
|
-
"type": "string"
|
|
7
|
-
},
|
|
8
|
-
"version": {
|
|
9
|
-
"type": "number",
|
|
10
|
-
"const": 1
|
|
11
|
-
},
|
|
12
|
-
"_env": {
|
|
13
|
-
"type": "object",
|
|
14
|
-
"propertyNames": {
|
|
15
|
-
"type": "string"
|
|
16
|
-
},
|
|
17
|
-
"additionalProperties": {
|
|
18
|
-
"type": "string"
|
|
19
|
-
}
|
|
20
|
-
},
|
|
21
|
-
"_vars": {
|
|
22
|
-
"type": "object",
|
|
23
|
-
"propertyNames": {
|
|
24
|
-
"type": "string"
|
|
25
|
-
},
|
|
26
|
-
"additionalProperties": {
|
|
27
|
-
"type": "string"
|
|
28
|
-
}
|
|
29
|
-
},
|
|
30
7
|
"_aliases": {
|
|
8
|
+
"description": "Include aliases: a name to one base directory or several, tried in order.",
|
|
31
9
|
"type": "object",
|
|
32
10
|
"propertyNames": {
|
|
33
11
|
"type": "string"
|
|
@@ -46,10 +24,46 @@
|
|
|
46
24
|
]
|
|
47
25
|
}
|
|
48
26
|
},
|
|
49
|
-
"
|
|
27
|
+
"_env": {
|
|
28
|
+
"description": "Config variables read from the environment: each name mapped to an environment variable."
|
|
29
|
+
},
|
|
30
|
+
"_vars": {
|
|
31
|
+
"description": "Config variables, used as ${name}. Values may refer to each other in any order."
|
|
32
|
+
},
|
|
33
|
+
"$schema": {
|
|
34
|
+
"description": "The JSON Schema the file declares, for editors. Sous ignores it.",
|
|
50
35
|
"type": "string"
|
|
51
36
|
},
|
|
37
|
+
"budgets": {
|
|
38
|
+
"description": "Time budgets in milliseconds, by \"<category>\" or \"<category>:<name>\"; false turns a warning off.",
|
|
39
|
+
"type": "object",
|
|
40
|
+
"additionalProperties": {
|
|
41
|
+
"anyOf": [
|
|
42
|
+
{
|
|
43
|
+
"type": "number"
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
"const": false
|
|
47
|
+
}
|
|
48
|
+
]
|
|
49
|
+
},
|
|
50
|
+
"default": {}
|
|
51
|
+
},
|
|
52
|
+
"cli": {
|
|
53
|
+
"description": "CLI settings: cli.pick.\"<command words>\": \"<plugin>\" picks between two commands claiming the same words.",
|
|
54
|
+
"type": "object",
|
|
55
|
+
"properties": {
|
|
56
|
+
"pick": {
|
|
57
|
+
"type": "object",
|
|
58
|
+
"additionalProperties": {
|
|
59
|
+
"type": "string"
|
|
60
|
+
},
|
|
61
|
+
"default": {}
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
},
|
|
52
65
|
"compilation": {
|
|
66
|
+
"description": "What to compile: targets, their outputs, source comments, the state file, overwriting files sous did not write.",
|
|
53
67
|
"type": "object",
|
|
54
68
|
"properties": {
|
|
55
69
|
"_vars": {
|
|
@@ -62,13 +76,27 @@
|
|
|
62
76
|
}
|
|
63
77
|
},
|
|
64
78
|
"includeSourceComments": {
|
|
79
|
+
"default": false,
|
|
65
80
|
"type": "boolean"
|
|
66
81
|
},
|
|
82
|
+
"overwriteUntracked": {
|
|
83
|
+
"default": true,
|
|
84
|
+
"type": "boolean"
|
|
85
|
+
},
|
|
86
|
+
"stateFile": {
|
|
87
|
+
"default": "${sousDir}/sous.state.json",
|
|
88
|
+
"type": "string"
|
|
89
|
+
},
|
|
67
90
|
"targets": {
|
|
91
|
+
"default": [],
|
|
68
92
|
"type": "array",
|
|
69
93
|
"items": {
|
|
70
94
|
"type": "object",
|
|
71
95
|
"properties": {
|
|
96
|
+
"id": {
|
|
97
|
+
"type": "string",
|
|
98
|
+
"minLength": 1
|
|
99
|
+
},
|
|
72
100
|
"_vars": {
|
|
73
101
|
"type": "object",
|
|
74
102
|
"propertyNames": {
|
|
@@ -84,12 +112,39 @@
|
|
|
84
112
|
"entryGlob": {
|
|
85
113
|
"type": "string"
|
|
86
114
|
},
|
|
115
|
+
"content": {
|
|
116
|
+
"type": "string"
|
|
117
|
+
},
|
|
87
118
|
"globBase": {
|
|
88
119
|
"type": "string"
|
|
89
120
|
},
|
|
121
|
+
"includeSourceComments": {
|
|
122
|
+
"type": "boolean"
|
|
123
|
+
},
|
|
90
124
|
"generateRuntimeContext": {
|
|
91
125
|
"type": "boolean"
|
|
92
126
|
},
|
|
127
|
+
"transforms": {
|
|
128
|
+
"type": "array",
|
|
129
|
+
"items": {
|
|
130
|
+
"type": "string"
|
|
131
|
+
}
|
|
132
|
+
},
|
|
133
|
+
"origin": {
|
|
134
|
+
"type": "object",
|
|
135
|
+
"properties": {
|
|
136
|
+
"plugin": {
|
|
137
|
+
"type": "string"
|
|
138
|
+
},
|
|
139
|
+
"recipe": {
|
|
140
|
+
"type": "string"
|
|
141
|
+
},
|
|
142
|
+
"repository": {
|
|
143
|
+
"type": "string"
|
|
144
|
+
}
|
|
145
|
+
},
|
|
146
|
+
"additionalProperties": false
|
|
147
|
+
},
|
|
93
148
|
"outputs": {
|
|
94
149
|
"type": "array",
|
|
95
150
|
"items": {
|
|
@@ -127,6 +182,12 @@
|
|
|
127
182
|
},
|
|
128
183
|
"destinationDir": {
|
|
129
184
|
"type": "string"
|
|
185
|
+
},
|
|
186
|
+
"transforms": {
|
|
187
|
+
"type": "array",
|
|
188
|
+
"items": {
|
|
189
|
+
"type": "string"
|
|
190
|
+
}
|
|
130
191
|
}
|
|
131
192
|
},
|
|
132
193
|
"additionalProperties": false
|
|
@@ -140,95 +201,130 @@
|
|
|
140
201
|
}
|
|
141
202
|
}
|
|
142
203
|
},
|
|
143
|
-
"required": [
|
|
144
|
-
"targets"
|
|
145
|
-
],
|
|
146
204
|
"additionalProperties": false
|
|
147
205
|
},
|
|
148
|
-
"
|
|
206
|
+
"intents": {
|
|
207
|
+
"description": "Which plugin's intent wins when two add one name: intents.replace.\"<intent>\": \"<plugin>\".",
|
|
149
208
|
"type": "object",
|
|
150
209
|
"properties": {
|
|
151
|
-
"
|
|
152
|
-
"type": "
|
|
210
|
+
"replace": {
|
|
211
|
+
"type": "object",
|
|
212
|
+
"additionalProperties": {
|
|
213
|
+
"type": "string"
|
|
214
|
+
},
|
|
215
|
+
"default": {}
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
},
|
|
219
|
+
"limits": {
|
|
220
|
+
"description": "The loop-detection limits.",
|
|
221
|
+
"type": "object",
|
|
222
|
+
"properties": {
|
|
223
|
+
"configPasses": {
|
|
224
|
+
"type": "integer"
|
|
153
225
|
},
|
|
154
|
-
"
|
|
155
|
-
"type": "
|
|
226
|
+
"rebuildsChanging": {
|
|
227
|
+
"type": "integer"
|
|
156
228
|
},
|
|
157
|
-
"
|
|
158
|
-
"type": "
|
|
229
|
+
"rebuildsRepeating": {
|
|
230
|
+
"type": "integer"
|
|
159
231
|
},
|
|
160
|
-
"
|
|
161
|
-
"type": "
|
|
232
|
+
"runDepth": {
|
|
233
|
+
"type": "integer"
|
|
234
|
+
},
|
|
235
|
+
"sameIntentDepth": {
|
|
236
|
+
"type": "integer"
|
|
237
|
+
},
|
|
238
|
+
"eventDepth": {
|
|
239
|
+
"type": "integer"
|
|
162
240
|
}
|
|
163
241
|
},
|
|
164
|
-
"
|
|
165
|
-
|
|
166
|
-
"outputPath",
|
|
167
|
-
"taskFileRoot"
|
|
168
|
-
],
|
|
169
|
-
"additionalProperties": false
|
|
242
|
+
"additionalProperties": false,
|
|
243
|
+
"default": {}
|
|
170
244
|
},
|
|
171
|
-
"
|
|
245
|
+
"mcp": {
|
|
246
|
+
"description": "MCP server settings: mcp.include and mcp.exclude pick tools by name, with globs.",
|
|
172
247
|
"type": "object",
|
|
173
|
-
"
|
|
174
|
-
"
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
"type": "object",
|
|
178
|
-
"properties": {
|
|
179
|
-
"command": {
|
|
248
|
+
"properties": {
|
|
249
|
+
"include": {
|
|
250
|
+
"type": "array",
|
|
251
|
+
"items": {
|
|
180
252
|
"type": "string"
|
|
181
253
|
},
|
|
182
|
-
"
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
254
|
+
"description": "Only tools whose names match these globs."
|
|
255
|
+
},
|
|
256
|
+
"exclude": {
|
|
257
|
+
"type": "array",
|
|
258
|
+
"items": {
|
|
259
|
+
"type": "string"
|
|
187
260
|
},
|
|
188
|
-
"
|
|
261
|
+
"default": [],
|
|
262
|
+
"description": "Leaves out tools whose names match these globs."
|
|
263
|
+
}
|
|
264
|
+
},
|
|
265
|
+
"additionalProperties": false
|
|
266
|
+
},
|
|
267
|
+
"name": {
|
|
268
|
+
"description": "A display name for the project.",
|
|
269
|
+
"type": "string"
|
|
270
|
+
},
|
|
271
|
+
"plugins": {
|
|
272
|
+
"description": "Which plugins load, which never load, and each plugin's own options (S1).",
|
|
273
|
+
"type": "object",
|
|
274
|
+
"properties": {
|
|
275
|
+
"discover": {
|
|
276
|
+
"enum": [
|
|
277
|
+
"dependencies",
|
|
278
|
+
"scan"
|
|
279
|
+
],
|
|
280
|
+
"default": "dependencies"
|
|
281
|
+
},
|
|
282
|
+
"load": {
|
|
283
|
+
"type": "array",
|
|
284
|
+
"items": {
|
|
189
285
|
"type": "string"
|
|
190
|
-
}
|
|
286
|
+
},
|
|
287
|
+
"default": []
|
|
191
288
|
},
|
|
192
|
-
"
|
|
193
|
-
"
|
|
194
|
-
|
|
195
|
-
|
|
289
|
+
"disabled": {
|
|
290
|
+
"type": "array",
|
|
291
|
+
"items": {
|
|
292
|
+
"type": "string"
|
|
293
|
+
},
|
|
294
|
+
"default": []
|
|
295
|
+
},
|
|
296
|
+
"options": {
|
|
297
|
+
"type": "object",
|
|
298
|
+
"additionalProperties": {
|
|
299
|
+
"type": "object"
|
|
300
|
+
},
|
|
301
|
+
"default": {}
|
|
302
|
+
}
|
|
196
303
|
}
|
|
197
304
|
},
|
|
198
305
|
"repos": {
|
|
306
|
+
"description": "The repositories this project trusts, by short name.",
|
|
199
307
|
"type": "object",
|
|
200
|
-
"
|
|
201
|
-
"type": "string",
|
|
202
|
-
"pattern": "^[a-z][a-z0-9-]*$"
|
|
203
|
-
},
|
|
308
|
+
"default": {},
|
|
204
309
|
"additionalProperties": {
|
|
205
310
|
"type": "object",
|
|
311
|
+
"description": "One trusted repository. Adding it trusts it.",
|
|
206
312
|
"properties": {
|
|
207
313
|
"url": {
|
|
208
|
-
"
|
|
209
|
-
|
|
210
|
-
"type": "string",
|
|
211
|
-
"format": "uri"
|
|
212
|
-
},
|
|
213
|
-
{
|
|
214
|
-
"type": "string",
|
|
215
|
-
"minLength": 1
|
|
216
|
-
}
|
|
217
|
-
]
|
|
314
|
+
"type": "string",
|
|
315
|
+
"description": "Where the repository lives."
|
|
218
316
|
},
|
|
219
317
|
"enabled": {
|
|
220
|
-
"type": "boolean"
|
|
318
|
+
"type": "boolean",
|
|
319
|
+
"description": "False opts out of a repository sous provides itself."
|
|
221
320
|
},
|
|
222
321
|
"provider": {
|
|
223
322
|
"type": "string",
|
|
224
|
-
"
|
|
225
|
-
"github",
|
|
226
|
-
"gitlab",
|
|
227
|
-
"local"
|
|
228
|
-
]
|
|
323
|
+
"description": "The repository host, when the URL does not give it away."
|
|
229
324
|
},
|
|
230
325
|
"alwaysPull": {
|
|
231
|
-
"type": "boolean"
|
|
326
|
+
"type": "boolean",
|
|
327
|
+
"description": "Install a newer in-range version whenever one exists."
|
|
232
328
|
},
|
|
233
329
|
"addedAt": {
|
|
234
330
|
"type": "string"
|
|
@@ -237,26 +333,88 @@
|
|
|
237
333
|
"type": "string"
|
|
238
334
|
}
|
|
239
335
|
},
|
|
240
|
-
"
|
|
241
|
-
"url"
|
|
242
|
-
],
|
|
243
|
-
"additionalProperties": false
|
|
336
|
+
"additionalProperties": true
|
|
244
337
|
}
|
|
245
338
|
},
|
|
246
|
-
"
|
|
339
|
+
"runtimeContext": {
|
|
340
|
+
"description": "The runtime context file a target with generateRuntimeContext includes: git branch and task file.",
|
|
247
341
|
"type": "object",
|
|
248
|
-
"
|
|
249
|
-
"
|
|
250
|
-
|
|
342
|
+
"properties": {
|
|
343
|
+
"gitRoot": {
|
|
344
|
+
"type": "string",
|
|
345
|
+
"description": "The git repository branch detection reads (${var} allowed)."
|
|
346
|
+
},
|
|
347
|
+
"outputPath": {
|
|
348
|
+
"type": "string",
|
|
349
|
+
"description": "Where the runtime context file is written."
|
|
350
|
+
},
|
|
351
|
+
"taskFileRoot": {
|
|
352
|
+
"type": "string",
|
|
353
|
+
"description": "The directory task files live in."
|
|
354
|
+
},
|
|
355
|
+
"branchPattern": {
|
|
356
|
+
"type": "string",
|
|
357
|
+
"description": "A regular expression; only matching branches look for a task file."
|
|
358
|
+
}
|
|
359
|
+
},
|
|
360
|
+
"required": [
|
|
361
|
+
"gitRoot",
|
|
362
|
+
"outputPath",
|
|
363
|
+
"taskFileRoot"
|
|
364
|
+
],
|
|
365
|
+
"additionalProperties": false
|
|
366
|
+
},
|
|
367
|
+
"services": {
|
|
368
|
+
"description": "Which plugin's replacement of a service wins: services.replace.\"<name>\": \"<plugin>\".",
|
|
369
|
+
"type": "object",
|
|
370
|
+
"properties": {
|
|
371
|
+
"replace": {
|
|
372
|
+
"type": "object",
|
|
373
|
+
"additionalProperties": {
|
|
374
|
+
"type": "string"
|
|
375
|
+
},
|
|
376
|
+
"default": {}
|
|
377
|
+
}
|
|
378
|
+
}
|
|
379
|
+
},
|
|
380
|
+
"store": {
|
|
381
|
+
"description": "The machine-wide recipe store.",
|
|
382
|
+
"type": "object",
|
|
383
|
+
"default": {},
|
|
384
|
+
"properties": {
|
|
385
|
+
"maxBytes": {
|
|
386
|
+
"type": "integer",
|
|
387
|
+
"default": 1073741824,
|
|
388
|
+
"description": "Size cap past which old entries are collected."
|
|
389
|
+
},
|
|
390
|
+
"freshnessSeconds": {
|
|
391
|
+
"type": "integer",
|
|
392
|
+
"default": 300,
|
|
393
|
+
"description": "How long a fetched index stays fresh."
|
|
394
|
+
},
|
|
395
|
+
"watchPollSeconds": {
|
|
396
|
+
"type": "integer",
|
|
397
|
+
"default": 300,
|
|
398
|
+
"description": "How often watch mode checks upstream."
|
|
399
|
+
}
|
|
251
400
|
},
|
|
401
|
+
"additionalProperties": false
|
|
402
|
+
},
|
|
403
|
+
"subscriptions": {
|
|
404
|
+
"description": "What this project subscribes to, keyed by namespace or namespace/recipe.",
|
|
405
|
+
"type": "object",
|
|
406
|
+
"default": {},
|
|
252
407
|
"additionalProperties": {
|
|
253
408
|
"type": "object",
|
|
409
|
+
"description": "One subscription, to a namespace or to one recipe.",
|
|
254
410
|
"properties": {
|
|
255
411
|
"enabled": {
|
|
256
|
-
"type": "boolean"
|
|
412
|
+
"type": "boolean",
|
|
413
|
+
"description": "False switches it off on this machine, keeping its pins."
|
|
257
414
|
},
|
|
258
415
|
"range": {
|
|
259
|
-
"type": "string"
|
|
416
|
+
"type": "string",
|
|
417
|
+
"description": "The version range. Default `*`."
|
|
260
418
|
},
|
|
261
419
|
"prerelease": {
|
|
262
420
|
"type": "boolean"
|
|
@@ -271,26 +429,83 @@
|
|
|
271
429
|
"type": "string"
|
|
272
430
|
}
|
|
273
431
|
},
|
|
274
|
-
"additionalProperties":
|
|
432
|
+
"additionalProperties": true
|
|
275
433
|
}
|
|
276
434
|
},
|
|
277
|
-
"
|
|
435
|
+
"tools": {
|
|
436
|
+
"description": "Tools you can launch with `sous launch <name>`: command, args, promptFile, headless.",
|
|
437
|
+
"type": "object",
|
|
438
|
+
"additionalProperties": {
|
|
439
|
+
"type": "object",
|
|
440
|
+
"properties": {
|
|
441
|
+
"command": {
|
|
442
|
+
"type": "string",
|
|
443
|
+
"description": "The command to run."
|
|
444
|
+
},
|
|
445
|
+
"args": {
|
|
446
|
+
"type": "array",
|
|
447
|
+
"items": {
|
|
448
|
+
"type": "string"
|
|
449
|
+
},
|
|
450
|
+
"description": "Arguments always passed, before yours."
|
|
451
|
+
},
|
|
452
|
+
"promptFile": {
|
|
453
|
+
"type": "string",
|
|
454
|
+
"description": "A file whose content is passed as the last argument."
|
|
455
|
+
},
|
|
456
|
+
"headless": {
|
|
457
|
+
"type": "object",
|
|
458
|
+
"properties": {
|
|
459
|
+
"command": {
|
|
460
|
+
"type": "string"
|
|
461
|
+
},
|
|
462
|
+
"args": {
|
|
463
|
+
"type": "array",
|
|
464
|
+
"items": {
|
|
465
|
+
"type": "string"
|
|
466
|
+
}
|
|
467
|
+
}
|
|
468
|
+
},
|
|
469
|
+
"additionalProperties": false,
|
|
470
|
+
"description": "The command and arguments for a headless run; the prompt is sent on standard input."
|
|
471
|
+
}
|
|
472
|
+
},
|
|
473
|
+
"additionalProperties": false
|
|
474
|
+
},
|
|
475
|
+
"default": {}
|
|
476
|
+
},
|
|
477
|
+
"varMappings": {
|
|
478
|
+
"description": "Environment variable names bound to recipe variables (conf.d/520-var-mappings.jsonc).",
|
|
479
|
+
"type": "object",
|
|
480
|
+
"additionalProperties": {
|
|
481
|
+
"type": "string"
|
|
482
|
+
},
|
|
483
|
+
"default": {}
|
|
484
|
+
},
|
|
485
|
+
"version": {
|
|
486
|
+
"description": "The config format version. This sous understands version 1.",
|
|
487
|
+
"const": 1
|
|
488
|
+
},
|
|
489
|
+
"watch": {
|
|
490
|
+
"description": "Watch mode: more paths that trigger a full rebuild, the debounce, and how often to check upstream.",
|
|
278
491
|
"type": "object",
|
|
279
492
|
"properties": {
|
|
280
|
-
"
|
|
493
|
+
"pollSeconds": {
|
|
281
494
|
"type": "integer",
|
|
282
|
-
"
|
|
283
|
-
"maximum": 9007199254740991
|
|
495
|
+
"description": "How often watch mode checks upstream for newer recipes, in seconds; 0 never. Default: store.watchPollSeconds."
|
|
284
496
|
},
|
|
285
|
-
"
|
|
286
|
-
"type": "
|
|
287
|
-
"
|
|
288
|
-
|
|
497
|
+
"paths": {
|
|
498
|
+
"type": "array",
|
|
499
|
+
"items": {
|
|
500
|
+
"type": "string"
|
|
501
|
+
},
|
|
502
|
+
"default": [],
|
|
503
|
+
"description": "More files, directories or globs whose change triggers a full rebuild."
|
|
289
504
|
},
|
|
290
|
-
"
|
|
505
|
+
"debounceMs": {
|
|
291
506
|
"type": "integer",
|
|
292
|
-
"
|
|
293
|
-
"
|
|
507
|
+
"default": 200,
|
|
508
|
+
"description": "How long to wait for more changes before building, in milliseconds."
|
|
294
509
|
}
|
|
295
510
|
},
|
|
296
511
|
"additionalProperties": false
|
|
@@ -298,52 +513,56 @@
|
|
|
298
513
|
"recipes": {
|
|
299
514
|
"type": "object",
|
|
300
515
|
"properties": {
|
|
301
|
-
"
|
|
516
|
+
"memories": {
|
|
517
|
+
"description": "Which recipe memories memory targets and the #memories view take, and in what order.",
|
|
302
518
|
"type": "object",
|
|
519
|
+
"additionalProperties": false,
|
|
303
520
|
"properties": {
|
|
304
|
-
"
|
|
521
|
+
"first": {
|
|
305
522
|
"type": "array",
|
|
306
523
|
"items": {
|
|
307
524
|
"type": "string"
|
|
308
|
-
}
|
|
525
|
+
},
|
|
526
|
+
"default": [],
|
|
527
|
+
"description": "Recipe keys, globs or /regular expressions/ whose memories come first, in this order."
|
|
528
|
+
},
|
|
529
|
+
"exclude": {
|
|
530
|
+
"type": "array",
|
|
531
|
+
"items": {
|
|
532
|
+
"type": "string"
|
|
533
|
+
},
|
|
534
|
+
"default": [],
|
|
535
|
+
"description": "Recipe keys, globs or /regular expressions/ whose memories are left out."
|
|
309
536
|
}
|
|
310
537
|
},
|
|
311
|
-
"
|
|
538
|
+
"default": {}
|
|
312
539
|
},
|
|
313
|
-
"
|
|
540
|
+
"skills": {
|
|
541
|
+
"description": "Where skills go (outputs, `${var}` allowed) and directories of your own skills (include).",
|
|
314
542
|
"type": "object",
|
|
315
543
|
"properties": {
|
|
316
|
-
"
|
|
544
|
+
"outputs": {
|
|
317
545
|
"type": "array",
|
|
318
546
|
"items": {
|
|
319
547
|
"type": "string"
|
|
320
|
-
}
|
|
548
|
+
},
|
|
549
|
+
"default": [],
|
|
550
|
+
"description": "Directories skills are also written to."
|
|
321
551
|
},
|
|
322
|
-
"
|
|
552
|
+
"include": {
|
|
323
553
|
"type": "array",
|
|
324
554
|
"items": {
|
|
325
555
|
"type": "string"
|
|
326
|
-
}
|
|
556
|
+
},
|
|
557
|
+
"default": [],
|
|
558
|
+
"description": "Directories of your own skills, compiled like a recipe's."
|
|
327
559
|
}
|
|
328
560
|
},
|
|
329
|
-
"additionalProperties": false
|
|
561
|
+
"additionalProperties": false,
|
|
562
|
+
"default": {}
|
|
330
563
|
}
|
|
331
|
-
},
|
|
332
|
-
"additionalProperties": false
|
|
333
|
-
},
|
|
334
|
-
"varMappings": {
|
|
335
|
-
"type": "object",
|
|
336
|
-
"propertyNames": {
|
|
337
|
-
"type": "string",
|
|
338
|
-
"pattern": "^[A-Z][A-Z0-9_]*$"
|
|
339
|
-
},
|
|
340
|
-
"additionalProperties": {
|
|
341
|
-
"type": "string",
|
|
342
|
-
"pattern": "^([a-z][a-z0-9-]*:)?[a-z][a-z0-9-]*\\/[a-z][a-z0-9-]*\\/[a-z][a-zA-Z0-9]*$"
|
|
343
564
|
}
|
|
344
565
|
}
|
|
345
566
|
},
|
|
346
|
-
"additionalProperties": false
|
|
347
|
-
"$id": "https://sous-io.github.io/sous/sous.config.schema.json",
|
|
348
|
-
"title": "Sous config"
|
|
567
|
+
"additionalProperties": false
|
|
349
568
|
}
|
package/bin/run.js
DELETED
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import path from "node:path";
|
|
3
|
-
import { fileURLToPath } from "node:url";
|
|
4
|
-
import { handOffToProjectInstall, isEnvFlagOn } from "../src/lib/project-install.mjs";
|
|
5
|
-
|
|
6
|
-
// A project that installs @sous-io/sous itself has pinned the version its
|
|
7
|
-
// templates and lockfile were written against, so that copy does the work.
|
|
8
|
-
// This runs before anything else is loaded: when a project copy is found, its
|
|
9
|
-
// own bin is imported into this process and this one loads nothing further
|
|
10
|
-
// (see src/lib/project-install.mjs for the rules, and SOUS_NO_DELEGATE to
|
|
11
|
-
// keep the invoked copy running).
|
|
12
|
-
const ownRoot = path.resolve(path.dirname(fileURLToPath(import.meta.url)), "..");
|
|
13
|
-
const handedOff = await handOffToProjectInstall({ ownRoot });
|
|
14
|
-
|
|
15
|
-
if (!handedOff) {
|
|
16
|
-
// The CLI runs from TypeScript source; register tsx before oclif dynamically
|
|
17
|
-
// imports any command module. Resolving "tsx" from this file (rather than a
|
|
18
|
-
// $PKG_ROOT/node_modules path) works in every install layout: repo clone,
|
|
19
|
-
// global install (nested deps), and local/npx installs (hoisted deps).
|
|
20
|
-
const { register } = await import("tsx/esm/api");
|
|
21
|
-
register();
|
|
22
|
-
|
|
23
|
-
// `sous --version` is answered here rather than by oclif, whose answer is
|
|
24
|
-
// its user agent string. Plain, it is the version alone; `--verbose` adds
|
|
25
|
-
// the package, where it is installed, the platform and the Node build.
|
|
26
|
-
const argv = process.argv.slice(2);
|
|
27
|
-
const { isVersionRequest, printVersion } = await import("../src/lib/version-report.ts");
|
|
28
|
-
if (isVersionRequest(argv)) {
|
|
29
|
-
printVersion(argv, ownRoot);
|
|
30
|
-
} else {
|
|
31
|
-
await runCommand();
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
async function runCommand() {
|
|
36
|
-
const { execute, settings } = await import("@oclif/core");
|
|
37
|
-
|
|
38
|
-
// tsx (above) already makes .ts imports work, so oclif's own auto-transpile
|
|
39
|
-
// machinery is redundant; leaving it on makes every downstream run warn that
|
|
40
|
-
// the (unshipped) typescript devDependency is missing.
|
|
41
|
-
settings.enableAutoTranspile = false;
|
|
42
|
-
|
|
43
|
-
// oclif's development mode turns on its debug setting, which makes every error
|
|
44
|
-
// it prints a raw stack trace. Sous reports its own errors as sentences (see
|
|
45
|
-
// src/utils/command-errors.ts), so development mode is switched on only when
|
|
46
|
-
// SOUS_DEBUG asks for the traces; anything that gets past a command's own
|
|
47
|
-
// reporting then prints its stack too.
|
|
48
|
-
const debugRequested = isEnvFlagOn(process.env.SOUS_DEBUG);
|
|
49
|
-
|
|
50
|
-
await execute({ development: debugRequested, dir: import.meta.url });
|
|
51
|
-
}
|