@leverege/build-tools 2.58.1 → 2.58.3-svcman.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/package.json +8 -3
- package/src/Docker.mjs +11 -4
- package/src/Utils.mjs +17 -0
- package/src/generate-docs-conf.json +40 -0
- package/src/generate-docs.mjs +29 -0
- package/src/helm-charts/elasticsearch8/helmup.plugin +1 -1
- package/src/helm-charts/redis/helmup.plugin +1 -1
- package/src/helm-charts/velero/helmup.plugin +1 -1
- package/src/helmup.sh +2 -2
- package/src/jsdoc-template/README.md +62 -0
- package/src/jsdoc-template/jsdoc.json +40 -0
- package/src/jsdoc-template/package.json +24 -0
- package/src/jsdoc-template/publish.js +828 -0
- package/src/jsdoc-template/static/fonts/Montserrat/Montserrat-Bold.eot +0 -0
- package/src/jsdoc-template/static/fonts/Montserrat/Montserrat-Bold.ttf +0 -0
- package/src/jsdoc-template/static/fonts/Montserrat/Montserrat-Bold.woff +0 -0
- package/src/jsdoc-template/static/fonts/Montserrat/Montserrat-Bold.woff2 +0 -0
- package/src/jsdoc-template/static/fonts/Montserrat/Montserrat-Regular.eot +0 -0
- package/src/jsdoc-template/static/fonts/Montserrat/Montserrat-Regular.ttf +0 -0
- package/src/jsdoc-template/static/fonts/Montserrat/Montserrat-Regular.woff +0 -0
- package/src/jsdoc-template/static/fonts/Montserrat/Montserrat-Regular.woff2 +0 -0
- package/src/jsdoc-template/static/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.eot +0 -0
- package/src/jsdoc-template/static/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.svg +978 -0
- package/src/jsdoc-template/static/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.ttf +0 -0
- package/src/jsdoc-template/static/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.woff +0 -0
- package/src/jsdoc-template/static/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.woff2 +0 -0
- package/src/jsdoc-template/static/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.eot +0 -0
- package/src/jsdoc-template/static/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.svg +1049 -0
- package/src/jsdoc-template/static/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.ttf +0 -0
- package/src/jsdoc-template/static/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.woff +0 -0
- package/src/jsdoc-template/static/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.woff2 +0 -0
- package/src/jsdoc-template/static/scripts/collapse.js +39 -0
- package/src/jsdoc-template/static/scripts/commonNav.js +28 -0
- package/src/jsdoc-template/static/scripts/linenumber.js +25 -0
- package/src/jsdoc-template/static/scripts/nav.js +12 -0
- package/src/jsdoc-template/static/scripts/polyfill.js +4 -0
- package/src/jsdoc-template/static/scripts/prettify/Apache-License-2.0.txt +202 -0
- package/src/jsdoc-template/static/scripts/prettify/lang-css.js +2 -0
- package/src/jsdoc-template/static/scripts/prettify/prettify.js +28 -0
- package/src/jsdoc-template/static/scripts/search.js +99 -0
- package/src/jsdoc-template/static/styles/jsdoc.css +795 -0
- package/src/jsdoc-template/static/styles/prettify.css +80 -0
- package/src/jsdoc-template/tmpl/augments.tmpl +10 -0
- package/src/jsdoc-template/tmpl/container.tmpl +204 -0
- package/src/jsdoc-template/tmpl/details.tmpl +152 -0
- package/src/jsdoc-template/tmpl/example.tmpl +2 -0
- package/src/jsdoc-template/tmpl/examples.tmpl +13 -0
- package/src/jsdoc-template/tmpl/exceptions.tmpl +32 -0
- package/src/jsdoc-template/tmpl/layout.tmpl +102 -0
- package/src/jsdoc-template/tmpl/mainpage.tmpl +15 -0
- package/src/jsdoc-template/tmpl/members.tmpl +38 -0
- package/src/jsdoc-template/tmpl/method.tmpl +132 -0
- package/src/jsdoc-template/tmpl/modifies.tmpl +14 -0
- package/src/jsdoc-template/tmpl/namespace.tmpl +133 -0
- package/src/jsdoc-template/tmpl/params.tmpl +132 -0
- package/src/jsdoc-template/tmpl/properties.tmpl +107 -0
- package/src/jsdoc-template/tmpl/returns.tmpl +19 -0
- package/src/jsdoc-template/tmpl/source.tmpl +8 -0
- package/src/jsdoc-template/tmpl/tutorial.tmpl +19 -0
- package/src/jsdoc-template/tmpl/type.tmpl +26 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@leverege/build-tools",
|
|
3
|
-
"version": "2.58.1",
|
|
3
|
+
"version": "2.58.3-svcman.1",
|
|
4
4
|
"description": "A collection of build / support tools for Leverege developers",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"repository": {
|
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
"clean": "rm -rf lib",
|
|
12
12
|
"lint": "find ./src -name \\*.\\*js | xargs npx eslint --report-unused-disable-directives",
|
|
13
13
|
"prepare": "[ $SKIP_PREPARE ] && exit 0 || hook-and-release",
|
|
14
|
+
"postinstall": "ln -sf node_modules/@leverege/service-man/bin/service-man bin/service-man",
|
|
14
15
|
"test": "echo \"no tests specified\" && exit 0"
|
|
15
16
|
},
|
|
16
17
|
"bin": {
|
|
@@ -27,6 +28,7 @@
|
|
|
27
28
|
"encrypt-secrets": "src/encrypt-secrets.sh",
|
|
28
29
|
"firebaseDeploy": "src/firebaseDeploy.mjs",
|
|
29
30
|
"firebaseServe": "src/firebaseServe.mjs",
|
|
31
|
+
"generate-docs": "src/generate-docs.mjs",
|
|
30
32
|
"getfbcfg": "src/getfbcfg.mjs",
|
|
31
33
|
"getjson": "src/getjson.mjs",
|
|
32
34
|
"git-tar": "src/git-tar.sh",
|
|
@@ -59,17 +61,20 @@
|
|
|
59
61
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
60
62
|
"dependencies": {
|
|
61
63
|
"@google-cloud/artifact-registry": "^3.5.0",
|
|
64
|
+
"@leverege/jsdoc-template": "^1.0.1",
|
|
65
|
+
"@leverege/service-man": "^1.8.0",
|
|
62
66
|
"ansi-colors": "^4.1.3",
|
|
63
67
|
"chalk": "^5.3.0",
|
|
64
68
|
"command-line-args": "^6.0.1",
|
|
65
69
|
"command-line-usage": "^7.0.3",
|
|
66
70
|
"deepmerge": "^4.3.1",
|
|
67
71
|
"enquirer": "^2.4.1",
|
|
68
|
-
"execa": "^9.5.
|
|
72
|
+
"execa": "^9.5.2",
|
|
69
73
|
"glob": "^11.0.0",
|
|
70
74
|
"handlebars": "^4.7.8",
|
|
71
|
-
"inquirer": "^12.
|
|
75
|
+
"inquirer": "^12.2.0",
|
|
72
76
|
"js-yaml": "^4.1.0",
|
|
77
|
+
"jsdoc": "^4.0.4",
|
|
73
78
|
"ms": "^2.1.3",
|
|
74
79
|
"npm-registry-fetch": "^18.0.2",
|
|
75
80
|
"package-up": "^5.0.0",
|
package/src/Docker.mjs
CHANGED
|
@@ -13,6 +13,9 @@ import {
|
|
|
13
13
|
warning
|
|
14
14
|
} from './Utils.mjs'
|
|
15
15
|
|
|
16
|
+
// TODO: change default to node 22 (jod) after 01/01/25
|
|
17
|
+
const dockerfileNodeVersion = process.env.USE_NODEJS_22 ? 'jod-alpine' : 'iron-alpine'
|
|
18
|
+
|
|
16
19
|
// The contents of these variables were initially located in files that live in
|
|
17
20
|
// the build-tools repository, but it just became simpler to pull the contents
|
|
18
21
|
// directly into these variables and forego the file loading.
|
|
@@ -187,7 +190,11 @@ const generateDockerfile = ( options ) => {
|
|
|
187
190
|
|
|
188
191
|
const settings = { ...defaultSettings, ...options }
|
|
189
192
|
|
|
190
|
-
|
|
193
|
+
// defaults to the current "official" version of node unless it gets
|
|
194
|
+
// overridden in the leverege.nodeimg package.json stanza
|
|
195
|
+
if ( !settings.nodeimage ) {
|
|
196
|
+
settings.nodeimage = dockerfileNodeVersion
|
|
197
|
+
}
|
|
191
198
|
|
|
192
199
|
// Ensure the presence of the docker dir with plugin and bashrc - this code
|
|
193
200
|
// could probably be tightened up a little.
|
|
@@ -227,14 +234,14 @@ const generateDockerfile = ( options ) => {
|
|
|
227
234
|
|
|
228
235
|
// At this point the plugin template better exist.
|
|
229
236
|
if ( fs.existsSync( dockerfilePlugin ) ) {
|
|
230
|
-
|
|
237
|
+
settings.pluginfile = fs.readFileSync( dockerfilePlugin )
|
|
231
238
|
} else {
|
|
232
239
|
errorExit( `***ERROR: something went wrong with ${dockerfilePlugin} plugin creation` )
|
|
233
240
|
}
|
|
234
241
|
|
|
235
242
|
const dockerfilePrePlugin = './docker/DockerfilePreInstall.plugin'
|
|
236
243
|
if ( fs.existsSync( dockerfilePrePlugin ) ) {
|
|
237
|
-
|
|
244
|
+
settings.preInstallPluginfile = fs.readFileSync( dockerfilePrePlugin )
|
|
238
245
|
}
|
|
239
246
|
|
|
240
247
|
const compiled = handlebars.compile( dockerfileTemplate, { noEscape : true } )
|
|
@@ -249,7 +256,7 @@ const generateDockerfile = ( options ) => {
|
|
|
249
256
|
}
|
|
250
257
|
|
|
251
258
|
const previousBuild = getPreviousBuild()
|
|
252
|
-
const dockerInfo = { dockerfile, previousBuild, ...
|
|
259
|
+
const dockerInfo = { dockerfile, previousBuild, ...settings }
|
|
253
260
|
delete dockerInfo.pluginfile
|
|
254
261
|
return dockerInfo
|
|
255
262
|
}
|
package/src/Utils.mjs
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { existsSync, readdirSync, readFileSync } from 'node:fs'
|
|
2
|
+
import path from 'node:path'
|
|
3
|
+
import url from 'node:url'
|
|
2
4
|
|
|
3
5
|
import chalk from 'chalk'
|
|
4
6
|
import { $ } from 'execa'
|
|
@@ -36,6 +38,21 @@ export const errorExit = ( error, opts = { errorCode : 1 } ) => {
|
|
|
36
38
|
}
|
|
37
39
|
/* eslint-enable no-console */
|
|
38
40
|
|
|
41
|
+
const getFilename = () => {
|
|
42
|
+
const filename = url.fileURLToPath( import.meta.url )
|
|
43
|
+
return filename
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
const getDirname = () => {
|
|
47
|
+
const dirname = path.dirname( getFilename() )
|
|
48
|
+
return dirname
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
// because __dirname goes away with ESM
|
|
52
|
+
export const getSourceTop = () => {
|
|
53
|
+
return getDirname()
|
|
54
|
+
}
|
|
55
|
+
|
|
39
56
|
export const isHex = ( hex ) => {
|
|
40
57
|
return hex instanceof Buffer || /^[0-9a-f]+$/i.test( hex )
|
|
41
58
|
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
{
|
|
2
|
+
"tags": {
|
|
3
|
+
"allowUnknownTags": false
|
|
4
|
+
},
|
|
5
|
+
"source": {
|
|
6
|
+
"includePattern": "\\.(js|mjs|jsx)$",
|
|
7
|
+
"excludePattern": "(node_modules/|docs)"
|
|
8
|
+
},
|
|
9
|
+
"plugins": [],
|
|
10
|
+
"templates": {
|
|
11
|
+
"cleverLinks": true,
|
|
12
|
+
"monospaceLinks": false,
|
|
13
|
+
"default": {
|
|
14
|
+
"useLongnameInNav": true,
|
|
15
|
+
"outputSourceFiles": false
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
"opts": {
|
|
19
|
+
"template": "node_modules/@leverege/jsdoc-template",
|
|
20
|
+
"encoding": "utf8",
|
|
21
|
+
"lenient": false
|
|
22
|
+
},
|
|
23
|
+
"docdash": {
|
|
24
|
+
"static": true,
|
|
25
|
+
"sort": false,
|
|
26
|
+
"search": true,
|
|
27
|
+
"collapse": true,
|
|
28
|
+
"typedefs": true,
|
|
29
|
+
"removeQuotes": "none",
|
|
30
|
+
"scripts": [],
|
|
31
|
+
"menu":{
|
|
32
|
+
"Bitbucket": {
|
|
33
|
+
"href":"https://bitbucket.org/leverege/IF_THIS_MAKES_SENSE",
|
|
34
|
+
"target":"_blank",
|
|
35
|
+
"class":"menu-item",
|
|
36
|
+
"id":"repository"
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/*
|
|
3
|
+
* Encapsulates the rather lengthy jsdoc / md docs npm script:
|
|
4
|
+
*
|
|
5
|
+
* npx jsdoc -c ./jsdoc.json -R README.md -d docs src && \
|
|
6
|
+
* mkdir -p docs/md && \
|
|
7
|
+
* npx --package=jsdoc-to-markdown jsdoc2md --files src/*.js --configure ./jsdoc.json > docs/md/API.md
|
|
8
|
+
*
|
|
9
|
+
*/
|
|
10
|
+
import {
|
|
11
|
+
condir,
|
|
12
|
+
debug,
|
|
13
|
+
getRepositoryDescr,
|
|
14
|
+
getSourceTop,
|
|
15
|
+
log,
|
|
16
|
+
shellCmd,
|
|
17
|
+
} from './Utils.mjs'
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
const jsdocTemplate = `${getSourceTop()}/jsdoc-template`
|
|
21
|
+
const jsdocConfig = `${jsdocTemplate}/jsdoc.json`
|
|
22
|
+
|
|
23
|
+
const repoDescr = await getRepositoryDescr()
|
|
24
|
+
|
|
25
|
+
condir( { jsdocTemplate, jsdocConfig, repoDescr }, '<==The Repo' )
|
|
26
|
+
|
|
27
|
+
await shellCmd( `npx jsdoc -c ${jsdocConfig} -R README.md -d docs src` )
|
|
28
|
+
await shellCmd( 'mkdir -p docs/md' )
|
|
29
|
+
await shellCmd( `npx --package=jsdoc-to-markdown jsdoc2md --files src/*.js --configure ./jsdoc.json`, { stdout : { file : 'docs/md/API.md' } } )
|
|
@@ -4,7 +4,7 @@ showInstalling "Redis"
|
|
|
4
4
|
|
|
5
5
|
OCI_CHART="oci://registry-1.docker.io/bitnamicharts/redis"
|
|
6
6
|
|
|
7
|
-
[ -z "$REDIS_CHART_VERSION" ] && REDIS_CHART_VERSION="20.
|
|
7
|
+
[ -z "$REDIS_CHART_VERSION" ] && REDIS_CHART_VERSION="20.5.0"
|
|
8
8
|
|
|
9
9
|
helm upgrade --install redis $OCI_CHART \
|
|
10
10
|
--values redis/redis-local.yaml \
|
|
@@ -4,7 +4,7 @@ showInstalling "Velero Backup System"
|
|
|
4
4
|
|
|
5
5
|
addHelmRepo vmware-tanzu https://vmware-tanzu.github.io/helm-charts
|
|
6
6
|
|
|
7
|
-
[ -z "$VELERO_CHART_VERSION" ] && VELERO_CHART_VERSION="
|
|
7
|
+
[ -z "$VELERO_CHART_VERSION" ] && VELERO_CHART_VERSION="8"
|
|
8
8
|
#
|
|
9
9
|
# Build the bucket, region and SA email variables and use --set to mod the
|
|
10
10
|
# chart values as opposed to using an OVH:<label> approach. This eliminates
|
package/src/helmup.sh
CHANGED
|
@@ -699,10 +699,10 @@ function installVeleroEnvironment() {
|
|
|
699
699
|
gcloud config set project $GCP_PROJECT_ID
|
|
700
700
|
|
|
701
701
|
## The major chart version will determine the bucket suffix
|
|
702
|
-
[ -z "$
|
|
702
|
+
[ -z "$VELERO_CHART_VERSION" ] && VELERO_CHART_VERSION="8"
|
|
703
703
|
|
|
704
704
|
## Create a bucket
|
|
705
|
-
BUCKET="$GCP_PROJECT_ID-velero-$
|
|
705
|
+
BUCKET="$GCP_PROJECT_ID-velero-$VELERO_CHART_VERSION"
|
|
706
706
|
printf "\nCreating storage bucket `color g $BUCKET` in `color g $GCE_REGION`\n"
|
|
707
707
|
gsutil mb -l $GCE_REGION gs://$BUCKET/ &> $DEVNULL
|
|
708
708
|
warnOnError $? "Bucket failed to create or already exists - go check it\n"
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
# JSDoc Template
|
|
2
|
+
|
|
3
|
+
## Install
|
|
4
|
+
|
|
5
|
+
```bash
|
|
6
|
+
$ npm install --save-dev @leverege/jsdoc-template
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
## Usage
|
|
10
|
+
|
|
11
|
+
In your package.json, update doces to look like:
|
|
12
|
+
|
|
13
|
+
```
|
|
14
|
+
"docs": "npx jsdoc -c jsdoc.json -R README.md -d docs src && mkdir -p docs/md && npx --package=jsdoc-to-markdown jsdoc2md --files src/*.js --configure ./jsdoc.json > docs/md/API.md",
|
|
15
|
+
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
Make a `jsdoc.json` file that looks like this:
|
|
19
|
+
|
|
20
|
+
```
|
|
21
|
+
{
|
|
22
|
+
"tags": {
|
|
23
|
+
"allowUnknownTags": false
|
|
24
|
+
},
|
|
25
|
+
"source": {
|
|
26
|
+
"includePattern": ".js?$",
|
|
27
|
+
"excludePattern": "(node_modules/|docs)"
|
|
28
|
+
},
|
|
29
|
+
"plugins": [],
|
|
30
|
+
"templates": {
|
|
31
|
+
"cleverLinks": true,
|
|
32
|
+
"monospaceLinks": false,
|
|
33
|
+
"default": {
|
|
34
|
+
"useLongnameInNav": true,
|
|
35
|
+
"outputSourceFiles": false
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
"opts": {
|
|
39
|
+
// FOR MONOREPOS: "template": "../../node_modules/@leverege/jsdoc-template",
|
|
40
|
+
"template": "node_modules/@leverege/jsdoc-template",
|
|
41
|
+
"encoding": "utf8",
|
|
42
|
+
"lenient": false
|
|
43
|
+
},
|
|
44
|
+
"docdash": {
|
|
45
|
+
"static": true,
|
|
46
|
+
"sort": false,
|
|
47
|
+
"search": true,
|
|
48
|
+
"collapse": true,
|
|
49
|
+
"typedefs": true,
|
|
50
|
+
"removeQuotes": "none",
|
|
51
|
+
"scripts": [],
|
|
52
|
+
"menu":{
|
|
53
|
+
"Bitbucket": {
|
|
54
|
+
"href":"https://bitbucket.org/leverege/IF_THIS_MAKES_SENSE",
|
|
55
|
+
"target":"_blank",
|
|
56
|
+
"class":"menu-item",
|
|
57
|
+
"id":"repository"
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
```
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
{
|
|
2
|
+
"tags": {
|
|
3
|
+
"allowUnknownTags": false
|
|
4
|
+
},
|
|
5
|
+
"source": {
|
|
6
|
+
"includePattern": "\\.(js|mjs|jsx)$",
|
|
7
|
+
"excludePattern": "(node_modules/|docs)"
|
|
8
|
+
},
|
|
9
|
+
"plugins": [],
|
|
10
|
+
"templates": {
|
|
11
|
+
"cleverLinks": true,
|
|
12
|
+
"monospaceLinks": false,
|
|
13
|
+
"default": {
|
|
14
|
+
"useLongnameInNav": true,
|
|
15
|
+
"outputSourceFiles": false
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
"opts": {
|
|
19
|
+
"template": "node_modules/@leverege/jsdoc-template",
|
|
20
|
+
"encoding": "utf8",
|
|
21
|
+
"lenient": false
|
|
22
|
+
},
|
|
23
|
+
"docdash": {
|
|
24
|
+
"static": true,
|
|
25
|
+
"sort": false,
|
|
26
|
+
"search": true,
|
|
27
|
+
"collapse": true,
|
|
28
|
+
"typedefs": true,
|
|
29
|
+
"removeQuotes": "none",
|
|
30
|
+
"scripts": [],
|
|
31
|
+
"menu":{
|
|
32
|
+
"Bitbucket": {
|
|
33
|
+
"href":"https://bitbucket.org/leverege/IF_THIS_MAKES_SENSE",
|
|
34
|
+
"target":"_blank",
|
|
35
|
+
"class":"menu-item",
|
|
36
|
+
"id":"repository"
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@leverege/jsdoc-template",
|
|
3
|
+
"version": "1.0.1",
|
|
4
|
+
"description": "A JSDoc Template based on Docdash with a few mods to template",
|
|
5
|
+
"main": "publish.js",
|
|
6
|
+
"scripts": {
|
|
7
|
+
},
|
|
8
|
+
"devDependencies": {
|
|
9
|
+
"jsdoc": "latest"
|
|
10
|
+
},
|
|
11
|
+
"license": "Apache-2.0",
|
|
12
|
+
"keywords": [
|
|
13
|
+
"jsdoc",
|
|
14
|
+
"template"
|
|
15
|
+
],
|
|
16
|
+
"files": [
|
|
17
|
+
"publish.js",
|
|
18
|
+
"static",
|
|
19
|
+
"tmpl"
|
|
20
|
+
],
|
|
21
|
+
"dependencies": {
|
|
22
|
+
"@jsdoc/salty": "^0.2.1"
|
|
23
|
+
}
|
|
24
|
+
}
|