@voxgig/sdkgen 4.24.0 → 4.24.2

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 (29) hide show
  1. package/bin/voxgig-sdkgen +1 -1
  2. package/dist/cmp/Deploy.js +9 -6
  3. package/dist/cmp/Deploy.js.map +1 -1
  4. package/dist/helpers/semver.js +3 -1
  5. package/dist/helpers/semver.js.map +1 -1
  6. package/dist/tsconfig.tsbuildinfo +1 -1
  7. package/package.json +4 -4
  8. package/project/.sdk/tm/go/test/pipeline_test.go +163 -57
  9. package/project/.sdk/tm/go/test/primary_utility_test.go +53 -0
  10. package/project/.sdk/tm/java/test/PipelineTest.java +141 -48
  11. package/project/.sdk/tm/java/test/PrimaryUtilityTest.java +67 -6
  12. package/project/.sdk/tm/js/test/pipeline.test.js +88 -22
  13. package/project/.sdk/tm/js/test/utility/PrimaryUtility.test.js +47 -1
  14. package/project/.sdk/tm/lua/test/omni.lua +8 -1
  15. package/project/.sdk/tm/lua/test/pipeline_test.lua +107 -28
  16. package/project/.sdk/tm/lua/test/primary_utility_test.lua +83 -3
  17. package/project/.sdk/tm/perl/t/omni.pm +7 -1
  18. package/project/.sdk/tm/perl/t/pipeline.t +124 -27
  19. package/project/.sdk/tm/perl/t/primary_utility.t +73 -0
  20. package/project/.sdk/tm/php/test/PipelineTest.php +143 -26
  21. package/project/.sdk/tm/php/test/PrimaryUtilityTest.php +80 -2
  22. package/project/.sdk/tm/py/test/test_pipeline.py +108 -31
  23. package/project/.sdk/tm/py/test/test_primary_utility.py +76 -1
  24. package/project/.sdk/tm/rb/test/pipeline_test.rb +100 -24
  25. package/project/.sdk/tm/rb/test/primary_utility_test.rb +59 -1
  26. package/project/.sdk/tm/ts/test/pipeline.test.ts +52 -11
  27. package/project/sdkgen-package.json +1 -1
  28. package/src/cmp/Deploy.ts +11 -6
  29. package/src/helpers/semver.ts +3 -1
package/src/cmp/Deploy.ts CHANGED
@@ -1,5 +1,7 @@
1
1
  import { cmp, each, Content, File } from 'jostraca'
2
2
 
3
+ import { packageVersion } from '../helpers/packageMeta'
4
+
3
5
  import {
4
6
  KIT,
5
7
  getModelPath
@@ -119,7 +121,7 @@ deploy-${t.name}:
119
121
 
120
122
  deploy-dry-${t.name}:
121
123
  \tboru vault exec --dry-run ${ghArgs} -- $(MAKE) tag-push-${t.name}
122
- ${tagPushRecipe(t.name, 'tag-only port')}
124
+ ${tagPushRecipe(t.name, packageVersion(model, t.name), 'tag-only port')}
123
125
  `
124
126
  }
125
127
 
@@ -131,7 +133,7 @@ deploy-${t.name}:
131
133
 
132
134
  deploy-dry-${t.name}:
133
135
  \tboru vault exec --dry-run ${ghArgs} -- $(MAKE) tag-push-${t.name}
134
- ${tagPushRecipe(t.name, reg.name + ' publication pending — tag-only deploy')}
136
+ ${tagPushRecipe(t.name, packageVersion(model, t.name), reg.name + ' publication pending — tag-only deploy')}
135
137
  `
136
138
  }
137
139
 
@@ -175,8 +177,6 @@ SHELL := /bin/bash
175
177
 
176
178
  ${varLines}
177
179
 
178
- # Lockstep SDK version, read from the canonical ts manifest.
179
- VERSION := $(shell node -p "require('./ts/package.json').version" 2>/dev/null || echo 0.0.0)
180
180
  BORU_DRY_RUN_FILLER := BORU-DRY-RUN-FILLER-NOT-A-REAL-SECRET
181
181
 
182
182
  TARGETS := ${targets.map((t: any) => t.name).join(' ')}
@@ -206,10 +206,15 @@ ${deployRules}`
206
206
  // The root-level tag creation + push recipe for a target: boru --dry-run
207
207
  // filler cooperation, idempotent tag creation, token-authenticated https
208
208
  // push (works from an ssh-remote clone without ssh keys).
209
- function tagPushRecipe(name: string, note: string): string {
209
+ function tagPushRecipe(name: string, version: string, note: string): string {
210
+ // The version is embedded in both Make and shell syntax.
211
+ if (!/^[0-9A-Za-z][0-9A-Za-z.+-]*$/.test(version)) {
212
+ throw new Error('Deploy: invalid publish.version for target "' + name + '": ' + JSON.stringify(version))
213
+ }
214
+
210
215
  return `
211
216
  tag-push-${name}:
212
- \t@set -e; tag="${name}/v$(VERSION)"; \\
217
+ \t@set -e; tag="${name}/v${version}"; \\
213
218
  \ttoken="\$\${GITHUB_TOKEN:-$$GH_TOKEN}"; \\
214
219
  \tif [ "$$token" = "$(BORU_DRY_RUN_FILLER)" ]; then \\
215
220
  \t echo "[dry-run] boru filler token detected: would create (if missing) and push tag $$tag; nothing pushed."; exit 0; fi; \\
@@ -114,7 +114,9 @@ function satisfies(version: string, range: string): boolean | undefined {
114
114
  let unknown = false
115
115
 
116
116
  for (const alt of text.split('||')) {
117
- const comparators = alt.trim().split(/\s+/).filter((s) => '' !== s)
117
+ const comparators = alt.trim()
118
+ .replace(/(^|\s)(>=|<=|>|<|=|\^|~)\s+(?=v?\d)/g, '$1$2')
119
+ .split(/\s+/).filter((s) => '' !== s)
118
120
 
119
121
  if (0 === comparators.length) {
120
122
  unknown = true