@voxgig/sdkgen 4.18.3 → 4.18.5
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/action.d.ts +1 -1
- package/dist/cmp/AgentGuide.d.ts +1 -1
- package/dist/cmp/AgentGuideFeature.d.ts +1 -1
- package/dist/cmp/AgentGuideTop.d.ts +1 -1
- package/dist/cmp/Changelog.d.ts +1 -1
- package/dist/cmp/Deploy.d.ts +1 -1
- package/dist/cmp/Entity.d.ts +1 -1
- package/dist/cmp/ExternalTarget.d.ts +1 -1
- package/dist/cmp/Feature.d.ts +1 -1
- package/dist/cmp/FeatureHook.d.ts +1 -1
- package/dist/cmp/License.d.ts +1 -1
- package/dist/cmp/Main.d.ts +1 -1
- package/dist/cmp/PublishWorkflow.d.ts +1 -1
- package/dist/cmp/Readme.d.ts +1 -1
- package/dist/cmp/ReadmeEntity.d.ts +1 -1
- package/dist/cmp/ReadmeErrors.d.ts +1 -1
- package/dist/cmp/ReadmeExplanation.d.ts +1 -1
- package/dist/cmp/ReadmeFeatures.d.ts +1 -1
- package/dist/cmp/ReadmeHowto.d.ts +1 -1
- package/dist/cmp/ReadmeInstall.d.ts +1 -1
- package/dist/cmp/ReadmeIntro.d.ts +1 -1
- package/dist/cmp/ReadmeModel.d.ts +1 -1
- package/dist/cmp/ReadmeOptions.d.ts +1 -1
- package/dist/cmp/ReadmeQuick.d.ts +1 -1
- package/dist/cmp/ReadmeRef.d.ts +1 -1
- package/dist/cmp/ReadmeRefFeatures.d.ts +1 -1
- package/dist/cmp/ReadmeStation.d.ts +1 -1
- package/dist/cmp/ReadmeTop.d.ts +1 -1
- package/dist/cmp/ReadmeTop.js +13 -2
- package/dist/cmp/ReadmeTop.js.map +1 -1
- package/dist/cmp/ReadmeUnions.d.ts +1 -1
- package/dist/cmp/Registered.d.ts +1 -1
- package/dist/cmp/Security.d.ts +1 -1
- package/dist/cmp/Test.d.ts +1 -1
- package/dist/cmp/TestControl.d.ts +7 -1
- package/dist/helpers/packageMeta.d.ts +3 -1
- package/dist/helpers/packageMeta.js +51 -5
- package/dist/helpers/packageMeta.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +3 -3
- package/project/sdkgen-package.json +1 -1
- package/src/cmp/ReadmeTop.ts +15 -2
- package/src/helpers/packageMeta.ts +59 -5
|
@@ -18,6 +18,8 @@ import { each } from 'jostraca'
|
|
|
18
18
|
|
|
19
19
|
import { KIT, nom } from '@voxgig/apidef'
|
|
20
20
|
|
|
21
|
+
import { kindCollection } from './kindCollection'
|
|
22
|
+
|
|
21
23
|
const PUBLISHER = 'Voxgig'
|
|
22
24
|
const PUBLISHER_URL = 'https://voxgig.com'
|
|
23
25
|
const SECURITY_EMAIL = 'security@voxgig.com'
|
|
@@ -101,13 +103,64 @@ function repoInfo(model: any) {
|
|
|
101
103
|
repoUrl,
|
|
102
104
|
issuesUrl: `${repoUrl}/issues`,
|
|
103
105
|
changelogUrl: `${repoUrl}/blob/main/CHANGELOG.md`,
|
|
104
|
-
//
|
|
105
|
-
//
|
|
106
|
+
// The Releases page. Honest where a link is LABELLED "Releases", which is
|
|
107
|
+
// what the twenty per-target ReadmeInstall components do with it. Those
|
|
108
|
+
// are project-owned and install-once, so this key has to keep existing:
|
|
109
|
+
// dropping it stops every already-generated SDK compiling.
|
|
106
110
|
releasesUrl: `${repoUrl}/releases`,
|
|
111
|
+
// The TAGS page: where the `<target>/vX.Y.Z` tags a pending
|
|
112
|
+
// (not-yet-on-registry) package is installed from actually live.
|
|
113
|
+
//
|
|
114
|
+
// SEPARATE FROM `releasesUrl`, because they are separate pages and only
|
|
115
|
+
// one of them holds tags. A GitHub Release is an object a human publishes;
|
|
116
|
+
// a tag is not one. This fleet pushes tags and cuts no Releases, so every
|
|
117
|
+
// pending target told the reader to install from a git tag and then linked
|
|
118
|
+
// a page reading "There aren't any releases" -- on a repository carrying
|
|
119
|
+
// 72 of them. Use this wherever the sentence promises a tag.
|
|
120
|
+
tagsUrl: `${repoUrl}/tags`,
|
|
107
121
|
}
|
|
108
122
|
}
|
|
109
123
|
|
|
110
124
|
|
|
125
|
+
// THE GENERATED DOCUMENTATION SITE, when this project publishes one.
|
|
126
|
+
//
|
|
127
|
+
// `docs_url` in the OpenAPI info block is the UPSTREAM API's documentation —
|
|
128
|
+
// docs.nofrixion.com and its like — so nothing in a generated README ever
|
|
129
|
+
// pointed at the site docgen builds from the same model. The repository was
|
|
130
|
+
// therefore the one place the documentation could not be found from: no link
|
|
131
|
+
// in the README, and GitHub's `homepage` field is not ours to set.
|
|
132
|
+
//
|
|
133
|
+
// Derived, not declared, because a GitHub project page has exactly one
|
|
134
|
+
// address: `https://<org>.github.io/<repo>/`. Reading it from the model would
|
|
135
|
+
// mean a second place for it to be wrong.
|
|
136
|
+
//
|
|
137
|
+
// NOTHING IS RETURNED UNLESS THE SITE WILL EXIST. The edition has to be
|
|
138
|
+
// declared, of kind `github-pages`, and not switched off; and the host has to
|
|
139
|
+
// be github.com, since the derivation is GitHub's and holds nowhere else. A
|
|
140
|
+
// link to a Pages site that was never deployed is worse than no link.
|
|
141
|
+
function docsSiteUrl(model: any): string {
|
|
142
|
+
const { host, path } = repoInfo(model)
|
|
143
|
+
|
|
144
|
+
if ('github.com' !== host) {
|
|
145
|
+
return ''
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
const editions = kindCollection(model, 'edition')
|
|
149
|
+
const pages: any = Object.values(editions || {})
|
|
150
|
+
.find((e: any) => 'github-pages' === e?.kind && false !== e?.active)
|
|
151
|
+
|
|
152
|
+
if (null == pages) {
|
|
153
|
+
return ''
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
const seg = path.split('/')
|
|
157
|
+
const org = seg[0]
|
|
158
|
+
const repo = seg[seg.length - 1]
|
|
159
|
+
|
|
160
|
+
return org && repo ? `https://${org}.github.io/${repo}/` : ''
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
|
|
111
164
|
// The go module path for a go-family target: the declared override, else the
|
|
112
165
|
// repo path plus the target's subdirectory.
|
|
113
166
|
//
|
|
@@ -236,9 +289,9 @@ function registryName(model: any, target: string): string {
|
|
|
236
289
|
// the go family this is the canonical install (`go get <module>@latest`,
|
|
237
290
|
// which the Go proxy resolves from the `<subdir>/vX.Y.Z` tag). For registry
|
|
238
291
|
// ports it is a short "not yet on <registry> — install from the git tag"
|
|
239
|
-
// pointer carrying the
|
|
292
|
+
// pointer carrying the tags URL.
|
|
240
293
|
function vendorCommand(model: any, target: string): string {
|
|
241
|
-
const {
|
|
294
|
+
const { tagsUrl } = repoInfo(model)
|
|
242
295
|
switch (originName(model, target)) {
|
|
243
296
|
// `target`, not the literal — the case says WHICH command, the argument
|
|
244
297
|
// says whose module. Writing the literal here reintroduces the same bug
|
|
@@ -251,7 +304,7 @@ function vendorCommand(model: any, target: string): string {
|
|
|
251
304
|
return `go install ${packageName(model, target)}/cmd/${model.name}@latest`
|
|
252
305
|
default: {
|
|
253
306
|
const reg = registryName(model, target)
|
|
254
|
-
return `not yet on ${reg || 'the registry'} — install from the git tag: ${
|
|
307
|
+
return `not yet on ${reg || 'the registry'} — install from the git tag: ${tagsUrl}`
|
|
255
308
|
}
|
|
256
309
|
}
|
|
257
310
|
}
|
|
@@ -495,4 +548,5 @@ export {
|
|
|
495
548
|
goVersion,
|
|
496
549
|
goPackageIdent,
|
|
497
550
|
packageVersion,
|
|
551
|
+
docsSiteUrl,
|
|
498
552
|
}
|