@leverege/build-tools 2.58.2 → 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.
Files changed (58) hide show
  1. package/package.json +6 -1
  2. package/src/Utils.mjs +17 -0
  3. package/src/generate-docs.mjs +9 -41
  4. package/src/helm-charts/elasticsearch8/helmup.plugin +1 -1
  5. package/src/helm-charts/redis/helmup.plugin +1 -1
  6. package/src/helm-charts/velero/helmup.plugin +1 -1
  7. package/src/helmup.sh +2 -2
  8. package/src/jsdoc-template/README.md +62 -0
  9. package/src/jsdoc-template/jsdoc.json +40 -0
  10. package/src/jsdoc-template/package.json +24 -0
  11. package/src/jsdoc-template/publish.js +828 -0
  12. package/src/jsdoc-template/static/fonts/Montserrat/Montserrat-Bold.eot +0 -0
  13. package/src/jsdoc-template/static/fonts/Montserrat/Montserrat-Bold.ttf +0 -0
  14. package/src/jsdoc-template/static/fonts/Montserrat/Montserrat-Bold.woff +0 -0
  15. package/src/jsdoc-template/static/fonts/Montserrat/Montserrat-Bold.woff2 +0 -0
  16. package/src/jsdoc-template/static/fonts/Montserrat/Montserrat-Regular.eot +0 -0
  17. package/src/jsdoc-template/static/fonts/Montserrat/Montserrat-Regular.ttf +0 -0
  18. package/src/jsdoc-template/static/fonts/Montserrat/Montserrat-Regular.woff +0 -0
  19. package/src/jsdoc-template/static/fonts/Montserrat/Montserrat-Regular.woff2 +0 -0
  20. package/src/jsdoc-template/static/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.eot +0 -0
  21. package/src/jsdoc-template/static/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.svg +978 -0
  22. package/src/jsdoc-template/static/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.ttf +0 -0
  23. package/src/jsdoc-template/static/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.woff +0 -0
  24. package/src/jsdoc-template/static/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.woff2 +0 -0
  25. package/src/jsdoc-template/static/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.eot +0 -0
  26. package/src/jsdoc-template/static/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.svg +1049 -0
  27. package/src/jsdoc-template/static/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.ttf +0 -0
  28. package/src/jsdoc-template/static/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.woff +0 -0
  29. package/src/jsdoc-template/static/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.woff2 +0 -0
  30. package/src/jsdoc-template/static/scripts/collapse.js +39 -0
  31. package/src/jsdoc-template/static/scripts/commonNav.js +28 -0
  32. package/src/jsdoc-template/static/scripts/linenumber.js +25 -0
  33. package/src/jsdoc-template/static/scripts/nav.js +12 -0
  34. package/src/jsdoc-template/static/scripts/polyfill.js +4 -0
  35. package/src/jsdoc-template/static/scripts/prettify/Apache-License-2.0.txt +202 -0
  36. package/src/jsdoc-template/static/scripts/prettify/lang-css.js +2 -0
  37. package/src/jsdoc-template/static/scripts/prettify/prettify.js +28 -0
  38. package/src/jsdoc-template/static/scripts/search.js +99 -0
  39. package/src/jsdoc-template/static/styles/jsdoc.css +795 -0
  40. package/src/jsdoc-template/static/styles/prettify.css +80 -0
  41. package/src/jsdoc-template/tmpl/augments.tmpl +10 -0
  42. package/src/jsdoc-template/tmpl/container.tmpl +204 -0
  43. package/src/jsdoc-template/tmpl/details.tmpl +152 -0
  44. package/src/jsdoc-template/tmpl/example.tmpl +2 -0
  45. package/src/jsdoc-template/tmpl/examples.tmpl +13 -0
  46. package/src/jsdoc-template/tmpl/exceptions.tmpl +32 -0
  47. package/src/jsdoc-template/tmpl/layout.tmpl +102 -0
  48. package/src/jsdoc-template/tmpl/mainpage.tmpl +15 -0
  49. package/src/jsdoc-template/tmpl/members.tmpl +38 -0
  50. package/src/jsdoc-template/tmpl/method.tmpl +132 -0
  51. package/src/jsdoc-template/tmpl/modifies.tmpl +14 -0
  52. package/src/jsdoc-template/tmpl/namespace.tmpl +133 -0
  53. package/src/jsdoc-template/tmpl/params.tmpl +132 -0
  54. package/src/jsdoc-template/tmpl/properties.tmpl +107 -0
  55. package/src/jsdoc-template/tmpl/returns.tmpl +19 -0
  56. package/src/jsdoc-template/tmpl/source.tmpl +8 -0
  57. package/src/jsdoc-template/tmpl/tutorial.tmpl +19 -0
  58. 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.2",
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,6 +61,8 @@
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",
@@ -70,6 +74,7 @@
70
74
  "handlebars": "^4.7.8",
71
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/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
  }
@@ -11,51 +11,19 @@ import {
11
11
  condir,
12
12
  debug,
13
13
  getRepositoryDescr,
14
+ getSourceTop,
14
15
  log,
15
16
  shellCmd,
16
17
  } from './Utils.mjs'
17
18
 
18
- const jsdocConfig = `{
19
- "tags": {
20
- "allowUnknownTags": false
21
- },
22
- "source": {
23
- "includePattern": "\\.(js|mjs|jsx)$",
24
- "excludePattern": "(node_modules/|docs)"
25
- },
26
- "plugins": [],
27
- "templates": {
28
- "cleverLinks": true,
29
- "monospaceLinks": false,
30
- "default": {
31
- "useLongnameInNav": true,
32
- "outputSourceFiles": false
33
- }
34
- },
35
- "opts": {
36
- "template": "node_modules/@leverege/jsdoc-template",
37
- "encoding": "utf8",
38
- "lenient": false
39
- },
40
- "docdash": {
41
- "static": true,
42
- "sort": false,
43
- "search": true,
44
- "collapse": true,
45
- "typedefs": true,
46
- "removeQuotes": "none",
47
- "scripts": [],
48
- "menu":{
49
- "Bitbucket": {
50
- "href":"https://bitbucket.org/leverege/IF_THIS_MAKES_SENSE",
51
- "target":"_blank",
52
- "class":"menu-item",
53
- "id":"repository"
54
- }
55
- }
56
- }
57
- }`
19
+
20
+ const jsdocTemplate = `${getSourceTop()}/jsdoc-template`
21
+ const jsdocConfig = `${jsdocTemplate}/jsdoc.json`
58
22
 
59
23
  const repoDescr = await getRepositoryDescr()
60
24
 
61
- condir( { jsdocConfig, repoDescr }, '<==The Repo' )
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' } } )
@@ -2,7 +2,7 @@
2
2
  #
3
3
  showInstalling "Elastic Search 8"
4
4
 
5
- [ -z "$ELASTIC_CHART_VERSION" ] && ELASTIC_CHART_VERSION="21.3.22"
5
+ [ -z "$ELASTIC_CHART_VERSION" ] && ELASTIC_CHART_VERSION="21.4.0"
6
6
 
7
7
  OCI_CHART="oci://registry-1.docker.io/bitnamicharts/elasticsearch"
8
8
 
@@ -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.3.0"
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"
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 "$VELERO_HELM_CHART" ] && VELERO_HELM_CHART="7"
702
+ [ -z "$VELERO_CHART_VERSION" ] && VELERO_CHART_VERSION="8"
703
703
 
704
704
  ## Create a bucket
705
- BUCKET="$GCP_PROJECT_ID-velero-$VELERO_HELM_CHART"
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
+ }