@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.
Files changed (156) hide show
  1. package/bin/voxgig-sdkgen +1 -1
  2. package/dist/action/check.js +15 -0
  3. package/dist/action/check.js.map +1 -1
  4. package/dist/action/copies.js +1 -0
  5. package/dist/action/copies.js.map +1 -1
  6. package/dist/action/doctor.d.ts +21 -2
  7. package/dist/action/doctor.js +166 -9
  8. package/dist/action/doctor.js.map +1 -1
  9. package/dist/action/package.js +9 -0
  10. package/dist/action/package.js.map +1 -1
  11. package/dist/action/remove.js +2 -1
  12. package/dist/action/remove.js.map +1 -1
  13. package/dist/action/target.d.ts +2 -1
  14. package/dist/action/target.js +50 -11
  15. package/dist/action/target.js.map +1 -1
  16. package/dist/cmp/AgentGuide.js +19 -8
  17. package/dist/cmp/AgentGuide.js.map +1 -1
  18. package/dist/cmp/AgentGuideContent.d.ts +6 -4
  19. package/dist/cmp/AgentGuideContent.js +51 -32
  20. package/dist/cmp/AgentGuideContent.js.map +1 -1
  21. package/dist/cmp/AgentGuideFeature.js +5 -3
  22. package/dist/cmp/AgentGuideFeature.js.map +1 -1
  23. package/dist/cmp/AgentGuideTop.js +84 -46
  24. package/dist/cmp/AgentGuideTop.js.map +1 -1
  25. package/dist/cmp/Changelog.js +12 -1
  26. package/dist/cmp/Changelog.js.map +1 -1
  27. package/dist/cmp/Deploy.js +22 -20
  28. package/dist/cmp/Deploy.js.map +1 -1
  29. package/dist/cmp/ExternalTarget.js +5 -5
  30. package/dist/cmp/ExternalTarget.js.map +1 -1
  31. package/dist/cmp/Feature.js +10 -3
  32. package/dist/cmp/Feature.js.map +1 -1
  33. package/dist/cmp/FeatureDocs.d.ts +6 -4
  34. package/dist/cmp/FeatureDocs.js +14 -39
  35. package/dist/cmp/FeatureDocs.js.map +1 -1
  36. package/dist/cmp/FeatureHook.d.ts +7 -1
  37. package/dist/cmp/FeatureHook.js +34 -1
  38. package/dist/cmp/FeatureHook.js.map +1 -1
  39. package/dist/cmp/PublishWorkflow.js +30 -6
  40. package/dist/cmp/PublishWorkflow.js.map +1 -1
  41. package/dist/cmp/ReadmeErrors.js +521 -18
  42. package/dist/cmp/ReadmeErrors.js.map +1 -1
  43. package/dist/cmp/ReadmeExplanation.js +280 -44
  44. package/dist/cmp/ReadmeExplanation.js.map +1 -1
  45. package/dist/cmp/ReadmeFeatures.js +16 -7
  46. package/dist/cmp/ReadmeFeatures.js.map +1 -1
  47. package/dist/cmp/ReadmeIntro.js +3 -2
  48. package/dist/cmp/ReadmeIntro.js.map +1 -1
  49. package/dist/cmp/ReadmeRefFeatures.js +34 -24
  50. package/dist/cmp/ReadmeRefFeatures.js.map +1 -1
  51. package/dist/cmp/ReadmeStation.js +11 -8
  52. package/dist/cmp/ReadmeStation.js.map +1 -1
  53. package/dist/cmp/ReadmeTop.js +472 -373
  54. package/dist/cmp/ReadmeTop.js.map +1 -1
  55. package/dist/cmp/ReadmeUnions.js +8 -2
  56. package/dist/cmp/ReadmeUnions.js.map +1 -1
  57. package/dist/cmp/Security.js +3 -2
  58. package/dist/cmp/Security.js.map +1 -1
  59. package/dist/helpers/applicability.d.ts +2 -1
  60. package/dist/helpers/applicability.js +26 -0
  61. package/dist/helpers/applicability.js.map +1 -1
  62. package/dist/helpers/copymerge.d.ts +3 -0
  63. package/dist/helpers/copymerge.js +43 -10
  64. package/dist/helpers/copymerge.js.map +1 -1
  65. package/dist/helpers/doccheck.d.ts +11 -0
  66. package/dist/helpers/doccheck.js +146 -0
  67. package/dist/helpers/doccheck.js.map +1 -0
  68. package/dist/helpers/doctext.d.ts +11 -0
  69. package/dist/helpers/doctext.js +84 -0
  70. package/dist/helpers/doctext.js.map +1 -0
  71. package/dist/helpers/exampleCall.d.ts +16 -0
  72. package/dist/helpers/exampleCall.js +334 -0
  73. package/dist/helpers/exampleCall.js.map +1 -0
  74. package/dist/helpers/exportnames.d.ts +4 -0
  75. package/dist/helpers/exportnames.js +35 -0
  76. package/dist/helpers/exportnames.js.map +1 -0
  77. package/dist/helpers/facts.d.ts +2 -1
  78. package/dist/helpers/facts.js +37 -2
  79. package/dist/helpers/facts.js.map +1 -1
  80. package/dist/helpers/modelcheck.d.ts +2 -1
  81. package/dist/helpers/modelcheck.js +13 -0
  82. package/dist/helpers/modelcheck.js.map +1 -1
  83. package/dist/helpers/opExample.d.ts +9 -2
  84. package/dist/helpers/opExample.js +22 -2
  85. package/dist/helpers/opExample.js.map +1 -1
  86. package/dist/helpers/opShape.d.ts +2 -1
  87. package/dist/helpers/opShape.js +12 -0
  88. package/dist/helpers/opShape.js.map +1 -1
  89. package/dist/helpers/packageMeta.js +21 -8
  90. package/dist/helpers/packageMeta.js.map +1 -1
  91. package/dist/helpers/semver.d.ts +2 -1
  92. package/dist/helpers/semver.js +7 -0
  93. package/dist/helpers/semver.js.map +1 -1
  94. package/dist/sdkgen.js +21 -2
  95. package/dist/sdkgen.js.map +1 -1
  96. package/dist/testkit.d.ts +1 -0
  97. package/dist/testkit.js +23 -19
  98. package/dist/testkit.js.map +1 -1
  99. package/dist/tsconfig.tsbuildinfo +1 -1
  100. package/dist/utility.js +2 -1
  101. package/dist/utility.js.map +1 -1
  102. package/model/fact.aontu +44 -0
  103. package/model/sdkgen.aontu +6 -2
  104. package/package.json +3 -1
  105. package/project/.sdk/src/cmp/c/ReadmeQuick_c.ts +1 -1
  106. package/project/.sdk/src/cmp/c/ReadmeTopQuick_c.ts +1 -1
  107. package/project/.sdk/src/cmp/clojure/ReadmeEntity_clojure.ts +12 -3
  108. package/project/.sdk/src/cmp/scala/ReadmeRef_scala.ts +4 -1
  109. package/project/.sdk/src/cmp/swift/ReadmeQuick_swift.ts +1 -0
  110. package/project/.sdk/src/cmp/swift/ReadmeRef_swift.ts +3 -0
  111. package/project/.sdk/src/cmp/swift/ReadmeTopQuick_swift.ts +2 -1
  112. package/project/.sdk/src/cmp/zig/ReadmeOptions_zig.ts +1 -1
  113. package/project/.sdk/src/cmp/zig/ReadmeQuick_zig.ts +2 -2
  114. package/project/.sdk/src/cmp/zig/ReadmeTopQuick_zig.ts +2 -2
  115. package/project/sdkgen-package.json +1 -1
  116. package/src/action/check.ts +21 -0
  117. package/src/action/copies.ts +2 -0
  118. package/src/action/doctor.ts +244 -13
  119. package/src/action/package.ts +10 -0
  120. package/src/action/remove.ts +2 -1
  121. package/src/action/target.ts +66 -15
  122. package/src/cmp/AgentGuide.ts +24 -10
  123. package/src/cmp/AgentGuideContent.ts +53 -32
  124. package/src/cmp/AgentGuideFeature.ts +6 -4
  125. package/src/cmp/AgentGuideTop.ts +108 -47
  126. package/src/cmp/Changelog.ts +13 -2
  127. package/src/cmp/Deploy.ts +23 -21
  128. package/src/cmp/ExternalTarget.ts +6 -6
  129. package/src/cmp/Feature.ts +11 -4
  130. package/src/cmp/FeatureDocs.ts +21 -40
  131. package/src/cmp/FeatureHook.ts +38 -1
  132. package/src/cmp/PublishWorkflow.ts +33 -7
  133. package/src/cmp/ReadmeErrors.ts +555 -25
  134. package/src/cmp/ReadmeExplanation.ts +316 -52
  135. package/src/cmp/ReadmeFeatures.ts +18 -8
  136. package/src/cmp/ReadmeIntro.ts +3 -2
  137. package/src/cmp/ReadmeRefFeatures.ts +39 -27
  138. package/src/cmp/ReadmeStation.ts +12 -14
  139. package/src/cmp/ReadmeTop.ts +528 -387
  140. package/src/cmp/ReadmeUnions.ts +10 -2
  141. package/src/cmp/Security.ts +3 -2
  142. package/src/helpers/applicability.ts +28 -0
  143. package/src/helpers/copymerge.ts +58 -10
  144. package/src/helpers/doccheck.ts +174 -0
  145. package/src/helpers/doctext.ts +113 -0
  146. package/src/helpers/exampleCall.ts +415 -0
  147. package/src/helpers/exportnames.ts +47 -0
  148. package/src/helpers/facts.ts +47 -2
  149. package/src/helpers/modelcheck.ts +16 -0
  150. package/src/helpers/opExample.ts +34 -2
  151. package/src/helpers/opShape.ts +13 -0
  152. package/src/helpers/packageMeta.ts +21 -8
  153. package/src/helpers/semver.ts +9 -0
  154. package/src/sdkgen.ts +27 -3
  155. package/src/testkit.ts +30 -20
  156. package/src/utility.ts +2 -1
@@ -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 || '' === (reg.name || '')) return 'tag'
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
- return (reg && reg.name) ? String(reg.name) : ''
197
+ const name = (reg && reg.name) ? String(reg.name) : ''
198
+ return 'none' === name ? '' : name
197
199
  }
198
200
 
199
- // The vendor / git-tag install pointer for a NOT-yet-published target. For
200
- // go this is the canonical install (`go get <module>@latest`, which the Go
201
- // proxy resolves from the `go/vX.Y.Z` tag); go-cli and go-mcp get ''. For registry
202
- // ports it is a short "not yet on <registry> — install from the git tag"
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 || 'the registry'} — install from the git tag: ${tagsUrl}`
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
  }
@@ -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(opts, log)
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, SdkGenError,
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 target = model.main[KIT].target || {}
584
- const feature = model.main[KIT].feature || {}
585
- const entity = model.main[KIT].entity || {}
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.phase || {}
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 (on('entity')) {
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 (on('feature')) {
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 (on('readme')) Readme({ target: t })
624
- if (on('agentguide')) AgentGuide({ target: t })
625
- if (on('test')) Test({ target: t })
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 (true === t.output?.root) {
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
- const authBasic = isHttpBasicAuth(model)
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) { }