@voxgig/sdkgen 4.45.0 → 4.46.0
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/bin/voxgig-sdkgen +1 -1
- package/dist/action/check.js +15 -0
- package/dist/action/check.js.map +1 -1
- package/dist/action/copies.js +1 -0
- package/dist/action/copies.js.map +1 -1
- package/dist/action/doctor.d.ts +21 -2
- package/dist/action/doctor.js +166 -9
- package/dist/action/doctor.js.map +1 -1
- package/dist/action/package.js +9 -0
- package/dist/action/package.js.map +1 -1
- package/dist/action/remove.js +2 -1
- package/dist/action/remove.js.map +1 -1
- package/dist/action/target.d.ts +2 -1
- package/dist/action/target.js +50 -11
- package/dist/action/target.js.map +1 -1
- package/dist/cmp/AgentGuide.js +19 -8
- package/dist/cmp/AgentGuide.js.map +1 -1
- package/dist/cmp/AgentGuideContent.d.ts +6 -4
- package/dist/cmp/AgentGuideContent.js +51 -32
- package/dist/cmp/AgentGuideContent.js.map +1 -1
- package/dist/cmp/AgentGuideFeature.js +5 -3
- package/dist/cmp/AgentGuideFeature.js.map +1 -1
- package/dist/cmp/AgentGuideTop.js +84 -46
- package/dist/cmp/AgentGuideTop.js.map +1 -1
- package/dist/cmp/Changelog.js +12 -1
- package/dist/cmp/Changelog.js.map +1 -1
- package/dist/cmp/Deploy.js +22 -20
- package/dist/cmp/Deploy.js.map +1 -1
- package/dist/cmp/ExternalTarget.js +5 -5
- package/dist/cmp/ExternalTarget.js.map +1 -1
- package/dist/cmp/Feature.js +10 -3
- package/dist/cmp/Feature.js.map +1 -1
- package/dist/cmp/FeatureDocs.d.ts +6 -4
- package/dist/cmp/FeatureDocs.js +14 -39
- package/dist/cmp/FeatureDocs.js.map +1 -1
- package/dist/cmp/FeatureHook.d.ts +7 -1
- package/dist/cmp/FeatureHook.js +34 -1
- package/dist/cmp/FeatureHook.js.map +1 -1
- package/dist/cmp/PublishWorkflow.js +30 -6
- package/dist/cmp/PublishWorkflow.js.map +1 -1
- package/dist/cmp/ReadmeErrors.js +521 -18
- package/dist/cmp/ReadmeErrors.js.map +1 -1
- package/dist/cmp/ReadmeExplanation.js +280 -44
- package/dist/cmp/ReadmeExplanation.js.map +1 -1
- package/dist/cmp/ReadmeFeatures.js +16 -7
- package/dist/cmp/ReadmeFeatures.js.map +1 -1
- package/dist/cmp/ReadmeIntro.js +3 -2
- package/dist/cmp/ReadmeIntro.js.map +1 -1
- package/dist/cmp/ReadmeRefFeatures.js +34 -24
- package/dist/cmp/ReadmeRefFeatures.js.map +1 -1
- package/dist/cmp/ReadmeStation.js +11 -8
- package/dist/cmp/ReadmeStation.js.map +1 -1
- package/dist/cmp/ReadmeTop.js +472 -373
- package/dist/cmp/ReadmeTop.js.map +1 -1
- package/dist/cmp/ReadmeUnions.js +8 -2
- package/dist/cmp/ReadmeUnions.js.map +1 -1
- package/dist/cmp/Security.js +3 -2
- package/dist/cmp/Security.js.map +1 -1
- package/dist/helpers/applicability.d.ts +2 -1
- package/dist/helpers/applicability.js +26 -0
- package/dist/helpers/applicability.js.map +1 -1
- package/dist/helpers/copymerge.d.ts +3 -0
- package/dist/helpers/copymerge.js +43 -10
- package/dist/helpers/copymerge.js.map +1 -1
- package/dist/helpers/doccheck.d.ts +11 -0
- package/dist/helpers/doccheck.js +146 -0
- package/dist/helpers/doccheck.js.map +1 -0
- package/dist/helpers/doctext.d.ts +11 -0
- package/dist/helpers/doctext.js +84 -0
- package/dist/helpers/doctext.js.map +1 -0
- package/dist/helpers/exampleCall.d.ts +16 -0
- package/dist/helpers/exampleCall.js +334 -0
- package/dist/helpers/exampleCall.js.map +1 -0
- package/dist/helpers/exportnames.d.ts +4 -0
- package/dist/helpers/exportnames.js +35 -0
- package/dist/helpers/exportnames.js.map +1 -0
- package/dist/helpers/facts.d.ts +2 -1
- package/dist/helpers/facts.js +37 -2
- package/dist/helpers/facts.js.map +1 -1
- package/dist/helpers/modelcheck.d.ts +2 -1
- package/dist/helpers/modelcheck.js +13 -0
- package/dist/helpers/modelcheck.js.map +1 -1
- package/dist/helpers/opExample.d.ts +9 -2
- package/dist/helpers/opExample.js +22 -2
- package/dist/helpers/opExample.js.map +1 -1
- package/dist/helpers/opShape.d.ts +2 -1
- package/dist/helpers/opShape.js +12 -0
- package/dist/helpers/opShape.js.map +1 -1
- package/dist/helpers/packageMeta.js +21 -8
- package/dist/helpers/packageMeta.js.map +1 -1
- package/dist/helpers/semver.d.ts +2 -1
- package/dist/helpers/semver.js +7 -0
- package/dist/helpers/semver.js.map +1 -1
- package/dist/sdkgen.js +21 -2
- package/dist/sdkgen.js.map +1 -1
- package/dist/testkit.d.ts +1 -0
- package/dist/testkit.js +23 -19
- package/dist/testkit.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/utility.js +2 -1
- package/dist/utility.js.map +1 -1
- package/model/fact.aontu +44 -0
- package/model/sdkgen.aontu +6 -2
- package/package.json +3 -1
- package/project/.sdk/src/cmp/c/ReadmeQuick_c.ts +1 -1
- package/project/.sdk/src/cmp/c/ReadmeTopQuick_c.ts +1 -1
- package/project/.sdk/src/cmp/clojure/ReadmeEntity_clojure.ts +12 -3
- package/project/.sdk/src/cmp/scala/ReadmeRef_scala.ts +4 -1
- package/project/.sdk/src/cmp/swift/ReadmeQuick_swift.ts +1 -0
- package/project/.sdk/src/cmp/swift/ReadmeRef_swift.ts +3 -0
- package/project/.sdk/src/cmp/swift/ReadmeTopQuick_swift.ts +2 -1
- package/project/.sdk/src/cmp/zig/ReadmeOptions_zig.ts +1 -1
- package/project/.sdk/src/cmp/zig/ReadmeQuick_zig.ts +2 -2
- package/project/.sdk/src/cmp/zig/ReadmeTopQuick_zig.ts +2 -2
- package/project/sdkgen-package.json +1 -1
- package/src/action/check.ts +21 -0
- package/src/action/copies.ts +2 -0
- package/src/action/doctor.ts +244 -13
- package/src/action/package.ts +10 -0
- package/src/action/remove.ts +2 -1
- package/src/action/target.ts +66 -15
- package/src/cmp/AgentGuide.ts +24 -10
- package/src/cmp/AgentGuideContent.ts +53 -32
- package/src/cmp/AgentGuideFeature.ts +6 -4
- package/src/cmp/AgentGuideTop.ts +108 -47
- package/src/cmp/Changelog.ts +13 -2
- package/src/cmp/Deploy.ts +23 -21
- package/src/cmp/ExternalTarget.ts +6 -6
- package/src/cmp/Feature.ts +11 -4
- package/src/cmp/FeatureDocs.ts +21 -40
- package/src/cmp/FeatureHook.ts +38 -1
- package/src/cmp/PublishWorkflow.ts +33 -7
- package/src/cmp/ReadmeErrors.ts +555 -25
- package/src/cmp/ReadmeExplanation.ts +316 -52
- package/src/cmp/ReadmeFeatures.ts +18 -8
- package/src/cmp/ReadmeIntro.ts +3 -2
- package/src/cmp/ReadmeRefFeatures.ts +39 -27
- package/src/cmp/ReadmeStation.ts +12 -14
- package/src/cmp/ReadmeTop.ts +528 -387
- package/src/cmp/ReadmeUnions.ts +10 -2
- package/src/cmp/Security.ts +3 -2
- package/src/helpers/applicability.ts +28 -0
- package/src/helpers/copymerge.ts +58 -10
- package/src/helpers/doccheck.ts +174 -0
- package/src/helpers/doctext.ts +113 -0
- package/src/helpers/exampleCall.ts +415 -0
- package/src/helpers/exportnames.ts +47 -0
- package/src/helpers/facts.ts +47 -2
- package/src/helpers/modelcheck.ts +16 -0
- package/src/helpers/opExample.ts +34 -2
- package/src/helpers/opShape.ts +13 -0
- package/src/helpers/packageMeta.ts +21 -8
- package/src/helpers/semver.ts +9 -0
- package/src/sdkgen.ts +27 -3
- package/src/testkit.ts +30 -20
- package/src/utility.ts +2 -1
package/src/helpers/opShape.ts
CHANGED
|
@@ -427,6 +427,18 @@ function introOps(model: any): string[] {
|
|
|
427
427
|
}
|
|
428
428
|
|
|
429
429
|
|
|
430
|
+
// The operations the active entities have a generated method for, in
|
|
431
|
+
// canonical order; none when no entity has one.
|
|
432
|
+
function generatedOps(model: any): string[] {
|
|
433
|
+
const entity = getModelPath(model, `main.${KIT}.entity`, { required: false }) || {}
|
|
434
|
+
const found = new Set<string>()
|
|
435
|
+
for (const e of Object.values(entity) as any[]) {
|
|
436
|
+
for (const o of entityOps(e)) found.add(o)
|
|
437
|
+
}
|
|
438
|
+
return CANON_OP_ORDER.filter((o) => found.has(o))
|
|
439
|
+
}
|
|
440
|
+
|
|
441
|
+
|
|
430
442
|
type UngeneratedOp = { entity: string, op: string, points: string[] }
|
|
431
443
|
|
|
432
444
|
|
|
@@ -792,6 +804,7 @@ export {
|
|
|
792
804
|
entityRecordIdField,
|
|
793
805
|
entityOps,
|
|
794
806
|
introOps,
|
|
807
|
+
generatedOps,
|
|
795
808
|
invalidRequest,
|
|
796
809
|
entityPrimaryOp,
|
|
797
810
|
pickExampleEntity,
|
|
@@ -171,11 +171,12 @@ function goPackageIdent(model: any, target: string): string {
|
|
|
171
171
|
}
|
|
172
172
|
|
|
173
173
|
|
|
174
|
+
// A registry named `none` is no registry: c, cpp and zig declare it.
|
|
174
175
|
function registryState(model: any, target: string): 'tag' | 'pending' | 'active' | 'inactive' {
|
|
175
176
|
const eco = originName(model, target)
|
|
176
177
|
if ('go' === eco || 'go-cli' === eco || 'go-mcp' === eco) return 'tag'
|
|
177
178
|
const reg = model?.main?.[KIT]?.target?.[target]?.publish?.registry
|
|
178
|
-
if (null == reg || '' === (
|
|
179
|
+
if (null == reg || '' === registryName(model, target)) return 'tag'
|
|
179
180
|
if (true === reg.active) return 'active'
|
|
180
181
|
const s = reg.state
|
|
181
182
|
if ('active' === s || 'inactive' === s || 'pending' === s) return s
|
|
@@ -193,14 +194,14 @@ function isPublished(model: any, target: string): boolean {
|
|
|
193
194
|
// for tag-only ports. Used in the "not yet on <registry>" pending message.
|
|
194
195
|
function registryName(model: any, target: string): string {
|
|
195
196
|
const reg = model?.main?.[KIT]?.target?.[target]?.publish?.registry
|
|
196
|
-
|
|
197
|
+
const name = (reg && reg.name) ? String(reg.name) : ''
|
|
198
|
+
return 'none' === name ? '' : name
|
|
197
199
|
}
|
|
198
200
|
|
|
199
|
-
// The
|
|
200
|
-
// go
|
|
201
|
-
//
|
|
202
|
-
//
|
|
203
|
-
// pointer carrying the tags URL.
|
|
201
|
+
// The install route for a target not on a registry: `go get <module>@latest`
|
|
202
|
+
// for go, resolved by the proxy from the `go/vX.Y.Z` tag. go-cli, go-mcp and a
|
|
203
|
+
// port with no registry get '', and their README's build steps are the route.
|
|
204
|
+
// A declared registry gets a "not yet on <registry>" pointer to the git tag.
|
|
204
205
|
function vendorCommand(model: any, target: string): string {
|
|
205
206
|
const { tagsUrl } = repoInfo(model)
|
|
206
207
|
switch (originName(model, target)) {
|
|
@@ -218,7 +219,7 @@ function vendorCommand(model: any, target: string): string {
|
|
|
218
219
|
return ''
|
|
219
220
|
default: {
|
|
220
221
|
const reg = registryName(model, target)
|
|
221
|
-
return `not yet on ${reg
|
|
222
|
+
return '' === reg ? '' : `not yet on ${reg} — install from the git tag: ${tagsUrl}`
|
|
222
223
|
}
|
|
223
224
|
}
|
|
224
225
|
}
|
|
@@ -317,6 +318,18 @@ function installCommand(model: any, target: string): string {
|
|
|
317
318
|
return `luarocks install ${packageName(model, target)}`
|
|
318
319
|
case 'go':
|
|
319
320
|
return `go get ${packageName(model, target)}`
|
|
321
|
+
case 'rust':
|
|
322
|
+
return `cargo add ${packageName(model, target)}`
|
|
323
|
+
case 'csharp':
|
|
324
|
+
return `dotnet add package ${packageName(model, target)}`
|
|
325
|
+
case 'perl':
|
|
326
|
+
return `cpanm ${packageName(model, target)}`
|
|
327
|
+
case 'ocaml':
|
|
328
|
+
return `opam install ${packageName(model, target)}`
|
|
329
|
+
// No package manager installs these: the release tag is the route.
|
|
330
|
+
case 'c':
|
|
331
|
+
case 'zig':
|
|
332
|
+
return `install from the git tag: ${repoInfo(model).tagsUrl}`
|
|
320
333
|
default:
|
|
321
334
|
return ''
|
|
322
335
|
}
|
package/src/helpers/semver.ts
CHANGED
|
@@ -86,6 +86,14 @@ function satisfiesOne(version: Parts, comparator: string): boolean | undefined {
|
|
|
86
86
|
}
|
|
87
87
|
|
|
88
88
|
|
|
89
|
+
// Undefined when either is not a plain version, so no order is claimed.
|
|
90
|
+
function compareVersions(a: string, b: string): number | undefined {
|
|
91
|
+
const pa = parseVersion(a)
|
|
92
|
+
const pb = parseVersion(b)
|
|
93
|
+
return null == pa || null == pb ? undefined : compare(pa, pb)
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
|
|
89
97
|
// Does `version` satisfy `range`?
|
|
90
98
|
//
|
|
91
99
|
// `true` / `false` / `undefined` — see the note at the top: undefined means
|
|
@@ -149,4 +157,5 @@ function satisfies(version: string, range: string): boolean | undefined {
|
|
|
149
157
|
export {
|
|
150
158
|
satisfies,
|
|
151
159
|
parseVersion,
|
|
160
|
+
compareVersions,
|
|
152
161
|
}
|
package/src/sdkgen.ts
CHANGED
|
@@ -65,7 +65,8 @@ import { getMatchEntries } from './helpers/getMatchEntries'
|
|
|
65
65
|
import { collectDeps } from './helpers/collectDeps'
|
|
66
66
|
import { guardModelNames } from './helpers/modelNames'
|
|
67
67
|
import { guardFlowSteps } from './helpers/flowGuard'
|
|
68
|
-
import { applyFacts, fact } from './helpers/facts'
|
|
68
|
+
import { applyFacts, fact, refuseRootPlan } from './helpers/facts'
|
|
69
|
+
import { docFindings } from './helpers/doccheck'
|
|
69
70
|
import { claimedFiles, pruneGenerated } from './helpers/generated'
|
|
70
71
|
import { cmp as labelledCmp } from './helpers/component'
|
|
71
72
|
import type { DepEntry } from './helpers/collectDeps'
|
|
@@ -370,7 +371,8 @@ function SdkGen(opts: SdkGenOptions) {
|
|
|
370
371
|
// generator, so an outdated copy would otherwise be used without a word.
|
|
371
372
|
await warnCopies(root, model)
|
|
372
373
|
|
|
373
|
-
const externalOverride = resolveExternalOverride(
|
|
374
|
+
const externalOverride = resolveExternalOverride(
|
|
375
|
+
opts, log, Object.keys(model?.main?.[KIT]?.target || {}))
|
|
374
376
|
// Snapshot the decision before preflight. In particular, do not check a
|
|
375
377
|
// missing optional destination once for safety and AGAIN before writing:
|
|
376
378
|
// if it appeared between those checks, the pass could write into content
|
|
@@ -380,12 +382,14 @@ function SdkGen(opts: SdkGenOptions) {
|
|
|
380
382
|
.map((ext) => ({ ...ext, skip: externalSkipReason(ext, fs) }))
|
|
381
383
|
|
|
382
384
|
checkExternalFolders(external, root, fs)
|
|
385
|
+
refuseRootPlan(model, external.map((ext) => ext.name))
|
|
383
386
|
|
|
384
387
|
const tree: { root?: any } = {}
|
|
385
388
|
const jres = await jostraca.generate(jopts, keepingTree(
|
|
386
389
|
() => Root({ model: 0 === external.length ? model : withoutExternal(model, external) }), tree))
|
|
387
390
|
|
|
388
391
|
showChanges(jopts.log, 'generate-result', jres, Path.dirname(process.cwd()))
|
|
392
|
+
checkDocs(tree.root, folder)
|
|
389
393
|
pruneGenerated({
|
|
390
394
|
fs, log, project: root, out: root, jres, claims: claimedFiles(tree.root, folder),
|
|
391
395
|
dryrun: !!opts.dryrun,
|
|
@@ -433,6 +437,7 @@ function SdkGen(opts: SdkGenOptions) {
|
|
|
433
437
|
}), etree))
|
|
434
438
|
|
|
435
439
|
showChanges(jopts.log, 'generate-result', eres, Path.dirname(process.cwd()))
|
|
440
|
+
checkDocs(etree.root, ext.folder)
|
|
436
441
|
pruneGenerated({
|
|
437
442
|
fs, log, project: root, out: ext.folder, jres: eres,
|
|
438
443
|
claims: claimedFiles(etree.root, ext.folder),
|
|
@@ -446,6 +451,15 @@ function SdkGen(opts: SdkGenOptions) {
|
|
|
446
451
|
}
|
|
447
452
|
|
|
448
453
|
|
|
454
|
+
// A warning, never a failure: the text that breaks a link or a table may be
|
|
455
|
+
// the spec's, which the project cannot edit.
|
|
456
|
+
function checkDocs(tree: any, out: string) {
|
|
457
|
+
for (const f of docFindings(tree, out, (path: string) => fs.existsSync(path), !!opts.dryrun)) {
|
|
458
|
+
log.warn({ point: f.point, file: f.file, line: f.line, note: f.note })
|
|
459
|
+
}
|
|
460
|
+
}
|
|
461
|
+
|
|
462
|
+
|
|
449
463
|
// A warning, never a failure: a difference may be a deliberate edit, and a
|
|
450
464
|
// check that cannot run must not stop a build.
|
|
451
465
|
async function warnCopies(root: string, model: any) {
|
|
@@ -694,7 +708,7 @@ type ExternalPlan = ExternalSpec & {
|
|
|
694
708
|
|
|
695
709
|
|
|
696
710
|
function resolveExternalOverride(
|
|
697
|
-
opts: SdkGenOptions, log: any,
|
|
711
|
+
opts: SdkGenOptions, log: any, targets: string[],
|
|
698
712
|
): Record<string, ExternalOverride> {
|
|
699
713
|
const declared = opts.external || {}
|
|
700
714
|
const raw = process.env.SDKGEN_EXTERNAL
|
|
@@ -723,6 +737,16 @@ function resolveExternalOverride(
|
|
|
723
737
|
'\n Got: ' + raw.slice(0, 200))
|
|
724
738
|
}
|
|
725
739
|
|
|
740
|
+
// A misspelled name would otherwise change nothing and still be logged as
|
|
741
|
+
// an override.
|
|
742
|
+
const unknown = Object.keys(parsed).filter((name: string) => !targets.includes(name)).sort()
|
|
743
|
+
if (0 < unknown.length) {
|
|
744
|
+
throw new SdkGenError(
|
|
745
|
+
'SDKGEN_EXTERNAL names ' + unknown.join(', ') + ', which ' +
|
|
746
|
+
(1 === unknown.length ? 'is not a target' : 'are not targets') + ' of this model' +
|
|
747
|
+
'\n Its targets are: ' + [...targets].sort().join(', '))
|
|
748
|
+
}
|
|
749
|
+
|
|
726
750
|
const merged: Record<string, ExternalOverride> = { ...declared }
|
|
727
751
|
|
|
728
752
|
for (const name of Object.keys(parsed)) {
|
package/src/testkit.ts
CHANGED
|
@@ -394,6 +394,11 @@ type GenerateOptions = {
|
|
|
394
394
|
|
|
395
395
|
root?: any
|
|
396
396
|
|
|
397
|
+
// The root documents (README, AGENTS.md, LICENSE and the rest), written as
|
|
398
|
+
// the standard Root writes them when the model's top phase is on. Off by
|
|
399
|
+
// default, so a package's suite sees only its targets' files.
|
|
400
|
+
top?: boolean
|
|
401
|
+
|
|
397
402
|
allowPlaceholder?: (path: string, token: string) => boolean
|
|
398
403
|
|
|
399
404
|
outside?: string[]
|
|
@@ -448,7 +453,7 @@ async function generateInto(
|
|
|
448
453
|
try {
|
|
449
454
|
res = await sdkgen.generate({
|
|
450
455
|
model: opts.model,
|
|
451
|
-
root: opts.root ?? defaultRoot(),
|
|
456
|
+
root: opts.root ?? defaultRoot({ top: opts.top }),
|
|
452
457
|
})
|
|
453
458
|
}
|
|
454
459
|
finally {
|
|
@@ -562,10 +567,11 @@ function layeredFs(mem: any): any {
|
|
|
562
567
|
}
|
|
563
568
|
|
|
564
569
|
|
|
565
|
-
function defaultRoot(): any {
|
|
570
|
+
function defaultRoot(opts: { top?: boolean } = {}): any {
|
|
566
571
|
const { cmp, each, names, Project, Folder } = require('jostraca')
|
|
567
572
|
const {
|
|
568
|
-
Main, Entity, Feature, Test, Readme, AgentGuide,
|
|
573
|
+
Main, Entity, Feature, Test, Readme, AgentGuide, fact,
|
|
574
|
+
ReadmeTop, AgentGuideTop, License, Security, Changelog, Deploy, PublishWorkflow,
|
|
569
575
|
} = require('./sdkgen')
|
|
570
576
|
|
|
571
577
|
return cmp(function Root(props: any) {
|
|
@@ -580,27 +586,31 @@ function defaultRoot(): any {
|
|
|
580
586
|
ctx$.stdrep = ctx$.stdrep || {}
|
|
581
587
|
names(ctx$.stdrep, model.Name, 'Project' + 'Name')
|
|
582
588
|
|
|
583
|
-
const
|
|
584
|
-
const
|
|
585
|
-
const
|
|
589
|
+
const kit = model.main[KIT]
|
|
590
|
+
const target = kit.target || {}
|
|
591
|
+
const feature = kit.feature || {}
|
|
592
|
+
const entity = kit.entity || {}
|
|
586
593
|
|
|
587
594
|
const active = each(target).filter((t: any) => t && false !== t.active)
|
|
588
595
|
|
|
589
|
-
const atRoot = active.filter((t: any) => true === t.output?.root)
|
|
590
|
-
if (1 < atRoot.length) {
|
|
591
|
-
throw new SdkGenError('Only one target can be generated at the ' +
|
|
592
|
-
'project root: ' + atRoot.map((t: any) => t.name).join(', '))
|
|
593
|
-
}
|
|
594
|
-
|
|
595
596
|
Project({}, () => {
|
|
597
|
+
if (true === opts.top && fact(kit, 'top')) {
|
|
598
|
+
ReadmeTop({})
|
|
599
|
+
AgentGuideTop({})
|
|
600
|
+
License({})
|
|
601
|
+
Security({})
|
|
602
|
+
Changelog({})
|
|
603
|
+
Deploy({})
|
|
604
|
+
PublishWorkflow({})
|
|
605
|
+
}
|
|
606
|
+
|
|
596
607
|
active.map((t: any) => {
|
|
597
608
|
names(t, t.name)
|
|
598
609
|
|
|
599
|
-
const phase = t
|
|
600
|
-
const on = (n: string) => false !== (phase[n] && phase[n].active)
|
|
610
|
+
const phase = fact(t, 'phase')
|
|
601
611
|
|
|
602
612
|
const phases = () => {
|
|
603
|
-
if (
|
|
613
|
+
if (phase.entity) {
|
|
604
614
|
each(entity)
|
|
605
615
|
.filter((e: any) => e && false !== e.active)
|
|
606
616
|
.map((e: any) => {
|
|
@@ -609,7 +619,7 @@ function defaultRoot(): any {
|
|
|
609
619
|
})
|
|
610
620
|
}
|
|
611
621
|
|
|
612
|
-
if (
|
|
622
|
+
if (phase.feature) {
|
|
613
623
|
each(feature)
|
|
614
624
|
.filter((f: any) => f && f.active)
|
|
615
625
|
.map((f: any) => {
|
|
@@ -620,12 +630,12 @@ function defaultRoot(): any {
|
|
|
620
630
|
|
|
621
631
|
Main({ target: t })
|
|
622
632
|
|
|
623
|
-
if (
|
|
624
|
-
if (
|
|
625
|
-
if (
|
|
633
|
+
if (phase.readme) Readme({ target: t })
|
|
634
|
+
if (phase.agentguide) AgentGuide({ target: t })
|
|
635
|
+
if (phase.test) Test({ target: t })
|
|
626
636
|
}
|
|
627
637
|
|
|
628
|
-
if (
|
|
638
|
+
if ('root' === fact(t, 'place')) {
|
|
629
639
|
phases()
|
|
630
640
|
}
|
|
631
641
|
else {
|
package/src/utility.ts
CHANGED
|
@@ -335,7 +335,8 @@ function configDefinition(model: any, targetname?: string): { def: any, json: st
|
|
|
335
335
|
|
|
336
336
|
const authActive = isAuthActive(model)
|
|
337
337
|
const authPrefix = resolveAuthPrefix(model)
|
|
338
|
-
|
|
338
|
+
// PrepareAuth composes Basic only in the header; elsewhere nothing reads the flag.
|
|
339
|
+
const authBasic = isHttpBasicAuth(model) && 'header' === resolveAuthIn(model)
|
|
339
340
|
|
|
340
341
|
let baseUrl = ''
|
|
341
342
|
try { baseUrl = getModelPath(model, `main.${KIT}.info.servers.0.url`) } catch (_e) { }
|