@voxgig/sdkgen 4.53.0 → 4.54.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.
- package/bin/voxgig-sdkgen +1 -1
- package/dist/action/doctor.js +4 -4
- package/dist/action/doctor.js.map +1 -1
- package/dist/cmp/AgentGuide.js +5 -0
- package/dist/cmp/AgentGuide.js.map +1 -1
- package/dist/cmp/AgentGuideTop.js +2 -0
- package/dist/cmp/AgentGuideTop.js.map +1 -1
- package/dist/cmp/Readme.js +4 -0
- package/dist/cmp/Readme.js.map +1 -1
- package/dist/cmp/ReadmeAgentSetup.d.ts +10 -0
- package/dist/cmp/ReadmeAgentSetup.js +131 -0
- package/dist/cmp/ReadmeAgentSetup.js.map +1 -0
- package/dist/cmp/ReadmeErrors.js +41 -21
- package/dist/cmp/ReadmeErrors.js.map +1 -1
- package/dist/cmp/ReadmeShell.d.ts +2 -0
- package/dist/cmp/ReadmeShell.js +25 -0
- package/dist/cmp/ReadmeShell.js.map +1 -0
- package/dist/cmp/ReadmeStation.js +6 -4
- package/dist/cmp/ReadmeStation.js.map +1 -1
- package/dist/cmp/ReadmeTop.js +2 -0
- package/dist/cmp/ReadmeTop.js.map +1 -1
- package/dist/cmp/Skill.d.ts +3 -0
- package/dist/cmp/Skill.js +145 -0
- package/dist/cmp/Skill.js.map +1 -0
- package/dist/helpers/naming.d.ts +3 -1
- package/dist/helpers/naming.js +17 -0
- package/dist/helpers/naming.js.map +1 -1
- package/dist/helpers/opExample.js +1 -1
- package/dist/helpers/opExample.js.map +1 -1
- package/dist/helpers/optional.d.ts +1 -0
- package/dist/helpers/optional.js +1 -0
- package/dist/helpers/optional.js.map +1 -1
- package/dist/helpers/text.d.ts +2 -1
- package/dist/helpers/text.js +23 -0
- package/dist/helpers/text.js.map +1 -1
- package/dist/sdkgen.d.ts +2 -2
- package/dist/sdkgen.js +5 -3
- package/dist/sdkgen.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/model/sdkgen.aontu +2 -0
- package/package.json +1 -1
- package/project/.sdk/model/target/c.aontu +3 -0
- package/project/.sdk/model/target/clojure.aontu +3 -0
- package/project/.sdk/model/target/cpp.aontu +3 -0
- package/project/.sdk/model/target/csharp.aontu +3 -0
- package/project/.sdk/model/target/elixir.aontu +3 -0
- package/project/.sdk/model/target/go.aontu +3 -0
- package/project/.sdk/model/target/java.aontu +3 -0
- package/project/.sdk/model/target/js.aontu +3 -0
- package/project/.sdk/model/target/kotlin.aontu +3 -0
- package/project/.sdk/model/target/lua.aontu +3 -0
- package/project/.sdk/model/target/ocaml.aontu +3 -0
- package/project/.sdk/model/target/perl.aontu +3 -0
- package/project/.sdk/model/target/php.aontu +3 -0
- package/project/.sdk/model/target/py-data.aontu +3 -0
- package/project/.sdk/model/target/py.aontu +3 -0
- package/project/.sdk/model/target/rb.aontu +3 -0
- package/project/.sdk/model/target/rust.aontu +3 -0
- package/project/.sdk/model/target/scala.aontu +3 -0
- package/project/.sdk/model/target/swift.aontu +3 -0
- package/project/.sdk/model/target/ts.aontu +3 -0
- package/project/.sdk/model/target/zig.aontu +3 -0
- package/project/.sdk/src/cmp/c/ReadmeEntity_c.ts +4 -4
- package/project/.sdk/src/cmp/c/ReadmeHowto_c.ts +3 -3
- package/project/.sdk/src/cmp/c/ReadmeQuick_c.ts +4 -4
- package/project/.sdk/src/cmp/c/ReadmeTopQuick_c.ts +5 -5
- package/project/.sdk/src/cmp/c/ReadmeTopTest_c.ts +4 -4
- package/project/.sdk/src/cmp/clojure/ReadmeEntity_clojure.ts +2 -2
- package/project/.sdk/src/cmp/clojure/ReadmeHowto_clojure.ts +3 -3
- package/project/.sdk/src/cmp/clojure/ReadmeTopQuick_clojure.ts +2 -2
- package/project/.sdk/src/cmp/clojure/ReadmeTopTest_clojure.ts +3 -3
- package/project/.sdk/src/cmp/cpp/ReadmeEntity_cpp.ts +3 -3
- package/project/.sdk/src/cmp/cpp/ReadmeQuick_cpp.ts +3 -3
- package/project/.sdk/src/cmp/cpp/ReadmeTopQuick_cpp.ts +5 -4
- package/project/.sdk/src/cmp/csharp/ReadmeTopQuick_csharp.ts +2 -2
- package/project/.sdk/src/cmp/elixir/ReadmeEntity_elixir.ts +2 -2
- package/project/.sdk/src/cmp/elixir/ReadmeHowto_elixir.ts +4 -4
- package/project/.sdk/src/cmp/elixir/ReadmeQuick_elixir.ts +4 -4
- package/project/.sdk/src/cmp/elixir/ReadmeRef_elixir.ts +2 -2
- package/project/.sdk/src/cmp/elixir/ReadmeTopQuick_elixir.ts +5 -5
- package/project/.sdk/src/cmp/elixir/ReadmeTopTest_elixir.ts +4 -4
- package/project/.sdk/src/cmp/go/ReadmeEntity_go.ts +3 -3
- package/project/.sdk/src/cmp/go/ReadmeHowto_go.ts +3 -3
- package/project/.sdk/src/cmp/go/ReadmeQuick_go.ts +3 -3
- package/project/.sdk/src/cmp/go/ReadmeTopQuick_go.ts +4 -4
- package/project/.sdk/src/cmp/java/ReadmeTopQuick_java.ts +2 -2
- package/project/.sdk/src/cmp/js/Package_js.ts +1 -1
- package/project/.sdk/src/cmp/js/ReadmeEntity_js.ts +2 -2
- package/project/.sdk/src/cmp/js/ReadmeHowto_js.ts +4 -4
- package/project/.sdk/src/cmp/js/ReadmeQuick_js.ts +3 -3
- package/project/.sdk/src/cmp/js/ReadmeTopQuick_js.ts +4 -4
- package/project/.sdk/src/cmp/js/ReadmeTopTest_js.ts +4 -4
- package/project/.sdk/src/cmp/kotlin/ReadmeTopQuick_kotlin.ts +2 -2
- package/project/.sdk/src/cmp/lua/ReadmeEntity_lua.ts +2 -2
- package/project/.sdk/src/cmp/lua/ReadmeQuick_lua.ts +3 -3
- package/project/.sdk/src/cmp/lua/ReadmeTopQuick_lua.ts +4 -4
- package/project/.sdk/src/cmp/ocaml/ReadmeEntity_ocaml.ts +3 -3
- package/project/.sdk/src/cmp/ocaml/ReadmeHowto_ocaml.ts +3 -3
- package/project/.sdk/src/cmp/ocaml/ReadmeQuick_ocaml.ts +3 -3
- package/project/.sdk/src/cmp/ocaml/ReadmeTopQuick_ocaml.ts +3 -3
- package/project/.sdk/src/cmp/perl/ReadmeEntity_perl.ts +3 -3
- package/project/.sdk/src/cmp/perl/ReadmeQuick_perl.ts +3 -3
- package/project/.sdk/src/cmp/perl/ReadmeTopQuick_perl.ts +4 -4
- package/project/.sdk/src/cmp/perl/ReadmeTopTest_perl.ts +2 -2
- package/project/.sdk/src/cmp/php/ReadmeEntity_php.ts +2 -2
- package/project/.sdk/src/cmp/php/ReadmeQuick_php.ts +3 -3
- package/project/.sdk/src/cmp/php/ReadmeTopQuick_php.ts +4 -4
- package/project/.sdk/src/cmp/php/ReadmeTopTest_php.ts +2 -2
- package/project/.sdk/src/cmp/py/ReadmeEntity_py.ts +2 -2
- package/project/.sdk/src/cmp/py/ReadmeQuick_py.ts +3 -3
- package/project/.sdk/src/cmp/py/ReadmeTopQuick_py.ts +4 -4
- package/project/.sdk/src/cmp/py/ReadmeTopTest_py.ts +3 -2
- package/project/.sdk/src/cmp/rb/ReadmeEntity_rb.ts +3 -3
- package/project/.sdk/src/cmp/rb/ReadmeHowto_rb.ts +3 -3
- package/project/.sdk/src/cmp/rb/ReadmeQuick_rb.ts +3 -3
- package/project/.sdk/src/cmp/rb/ReadmeTopQuick_rb.ts +4 -4
- package/project/.sdk/src/cmp/rb/ReadmeTopTest_rb.ts +3 -2
- package/project/.sdk/src/cmp/rust/ReadmeEntity_rust.ts +3 -3
- package/project/.sdk/src/cmp/rust/ReadmeQuick_rust.ts +3 -3
- package/project/.sdk/src/cmp/rust/ReadmeTopQuick_rust.ts +4 -4
- package/project/.sdk/src/cmp/scala/ReadmeTopQuick_scala.ts +2 -2
- package/project/.sdk/src/cmp/swift/ReadmeTopQuick_swift.ts +2 -2
- package/project/.sdk/src/cmp/ts/Package_ts.ts +1 -1
- package/project/.sdk/src/cmp/ts/ReadmeEntity_ts.ts +2 -2
- package/project/.sdk/src/cmp/ts/ReadmeHowto_ts.ts +4 -4
- package/project/.sdk/src/cmp/ts/ReadmeQuick_ts.ts +3 -3
- package/project/.sdk/src/cmp/ts/ReadmeTopQuick_ts.ts +4 -4
- package/project/.sdk/src/cmp/ts/ReadmeTopTest_ts.ts +4 -4
- package/project/.sdk/src/cmp/zig/ReadmeEntity_zig.ts +3 -3
- package/project/.sdk/src/cmp/zig/ReadmeHowto_zig.ts +3 -3
- package/project/.sdk/src/cmp/zig/ReadmeQuick_zig.ts +3 -3
- package/project/.sdk/src/cmp/zig/ReadmeTopQuick_zig.ts +4 -4
- package/project/.sdk/src/cmp/zig/ReadmeTopTest_zig.ts +3 -3
- package/project/.sdk/tm/c/Makefile +1 -1
- package/project/.sdk/tm/cpp/Makefile +1 -1
- package/project/.sdk/tm/csharp/Makefile +6 -1
- package/project/.sdk/tm/go/Makefile +1 -1
- package/project/.sdk/tm/java/Makefile +1 -1
- package/project/.sdk/tm/js/Makefile +3 -3
- package/project/.sdk/tm/kotlin/Makefile +1 -1
- package/project/.sdk/tm/lua/Makefile +1 -1
- package/project/.sdk/tm/perl/Makefile +1 -1
- package/project/.sdk/tm/php/Makefile +1 -1
- package/project/.sdk/tm/py/Makefile +1 -1
- package/project/.sdk/tm/py/pkg/utility/fetcher.py +14 -2
- package/project/.sdk/tm/py/test/test_primary_utility.py +4 -0
- package/project/.sdk/tm/py-data/Makefile +1 -1
- package/project/.sdk/tm/rb/Makefile +1 -1
- package/project/.sdk/tm/rust/Makefile +1 -1
- package/project/.sdk/tm/swift/Makefile +2 -3
- package/project/.sdk/tm/ts/Makefile +3 -3
- package/project/sdkgen-package.json +1 -1
- package/src/action/doctor.ts +4 -4
- package/src/cmp/AgentGuide.ts +6 -0
- package/src/cmp/AgentGuideTop.ts +3 -0
- package/src/cmp/Readme.ts +4 -0
- package/src/cmp/ReadmeAgentSetup.ts +159 -0
- package/src/cmp/ReadmeErrors.ts +43 -22
- package/src/cmp/ReadmeShell.ts +31 -0
- package/src/cmp/ReadmeStation.ts +6 -5
- package/src/cmp/ReadmeTop.ts +2 -0
- package/src/cmp/Skill.ts +168 -0
- package/src/helpers/naming.ts +20 -0
- package/src/helpers/opExample.ts +2 -2
- package/src/helpers/optional.ts +1 -0
- package/src/helpers/text.ts +25 -0
- package/src/sdkgen.ts +3 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
import { cmp, Content, isAuthActive, envName, canonKey, canonScalarKey, entityIdField, opRequestShape, safeVarName, exampleVarName, matchExampleItems, litString, entityOps, fact } from '@voxgig/sdkgen'
|
|
2
|
+
import { cmp, Content, isAuthActive, envName, canonKey, canonScalarKey, entityIdField, opRequestShape, safeVarName, exampleVarName, matchExampleItems, litString, entityOps, fact, entityListVar, entityItemsPhrase } from '@voxgig/sdkgen'
|
|
3
3
|
|
|
4
4
|
import {
|
|
5
5
|
KIT,
|
|
@@ -62,9 +62,9 @@ client = ${ctor}
|
|
|
62
62
|
let hasCall = false
|
|
63
63
|
|
|
64
64
|
if (opnames.includes('list')) {
|
|
65
|
-
Content(`# List all ${eName
|
|
66
|
-
${eVar}
|
|
67
|
-
${eVar}
|
|
65
|
+
Content(`# List all ${entityItemsPhrase(eName)} (an Array of entities, one per record; raises on error)
|
|
66
|
+
${entityListVar(eVar, 'rb')} = client.${eName}.list${rbListArgs(exampleEntity)}
|
|
67
|
+
${entityListVar(eVar, 'rb')}.each { |item| puts item.data_get }
|
|
68
68
|
`)
|
|
69
69
|
hasCall = true
|
|
70
70
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
import { cmp, Content, canonKey, canonScalarKey, entityIdField, pickExampleEntity, safeVarName, exampleVarName, seededList, litPair, matchExampleItems, requestExampleItems } from '@voxgig/sdkgen'
|
|
2
|
+
import { cmp, Content, canonKey, canonScalarKey, entityIdField, pickExampleEntity, safeVarName, exampleVarName, seededList, litPair, matchExampleItems, requestExampleItems, entityListVar } from '@voxgig/sdkgen'
|
|
3
3
|
|
|
4
4
|
import {
|
|
5
5
|
KIT,
|
|
@@ -59,7 +59,8 @@ const ReadmeTopTest = cmp(function ReadmeTopTest(props: any) {
|
|
|
59
59
|
// base name — an entity whose lowercased name is a Ruby keyword (e.g.
|
|
60
60
|
// `self`) would otherwise emit uncompilable code. The fixture key is the
|
|
61
61
|
// model name, which the mock looks the entity up by.
|
|
62
|
-
const
|
|
62
|
+
const one = exampleVarName(ename, 'rb')
|
|
63
|
+
const eVar = 'list' === primaryOp ? entityListVar(one, 'rb') : one
|
|
63
64
|
Content(`\`\`\`ruby
|
|
64
65
|
# Seed fixture data so offline calls resolve without a live server.
|
|
65
66
|
client = ${model.const.Name}SDK.test({
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
import { cmp, each, Content, canonToType, canonKey, canonScalarKey, entityIdField, entityOps, matchExampleItems, requestExampleItems, fact } from '@voxgig/sdkgen'
|
|
2
|
+
import { cmp, each, Content, canonToType, canonKey, canonScalarKey, entityIdField, entityOps, matchExampleItems, requestExampleItems, fact, entityListVar } from '@voxgig/sdkgen'
|
|
3
3
|
|
|
4
4
|
import {
|
|
5
5
|
KIT,
|
|
@@ -133,8 +133,8 @@ println!("{:?}", ${eVar}.data(None));
|
|
|
133
133
|
Content(`#### Example: List
|
|
134
134
|
|
|
135
135
|
\`\`\`rust
|
|
136
|
-
let ${eVar}
|
|
137
|
-
for ${eVar} in &${eVar}
|
|
136
|
+
let ${entityListVar(eVar, 'rust')} = client.${method}(Value::Noval).list(${rustListMatch(entity)}, Value::Noval).unwrap();
|
|
137
|
+
for ${eVar} in &${entityListVar(eVar, 'rust')} {
|
|
138
138
|
println!("{:?}", ${eVar}.data(None));
|
|
139
139
|
}
|
|
140
140
|
\`\`\`
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
import { cmp, Content, isAuthActive, envName, canonKey, canonScalarKey, opRequestShape, entityIdField, entityDataIdField, entityOps, matchExampleItems, requiredItems, requestExampleItems, sendsId, fact, seriesList } from '@voxgig/sdkgen'
|
|
2
|
+
import { cmp, Content, isAuthActive, envName, canonKey, canonScalarKey, opRequestShape, entityIdField, entityDataIdField, entityOps, matchExampleItems, requiredItems, requestExampleItems, sendsId, fact, seriesList, entityListVar } from '@voxgig/sdkgen'
|
|
3
3
|
|
|
4
4
|
import {
|
|
5
5
|
KIT,
|
|
@@ -85,8 +85,8 @@ the \`Result\`. \`data(None)\` reads an entity's record.
|
|
|
85
85
|
|
|
86
86
|
\`\`\`rust
|
|
87
87
|
match client.${method}(Value::Noval).list(${rustListMatch(exampleEntity)}, Value::Noval) {
|
|
88
|
-
Ok(${eVar}
|
|
89
|
-
for ${eVar} in &${eVar}
|
|
88
|
+
Ok(${entityListVar(eVar, 'rust')}) => {
|
|
89
|
+
for ${eVar} in &${entityListVar(eVar, 'rust')} {
|
|
90
90
|
println!("{:?}", ${eVar}.data(None));
|
|
91
91
|
}
|
|
92
92
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
import { cmp, Content, isAuthActive, envName, canonKey, canonScalarKey, entityIdField, opRequestShape, matchExampleItems, entityOps, fact } from '@voxgig/sdkgen'
|
|
2
|
+
import { cmp, Content, isAuthActive, envName, canonKey, canonScalarKey, entityIdField, opRequestShape, matchExampleItems, entityOps, fact, entityListVar, entityItemsPhrase } from '@voxgig/sdkgen'
|
|
3
3
|
|
|
4
4
|
import {
|
|
5
5
|
KIT,
|
|
@@ -62,9 +62,9 @@ let client = ${ctor};
|
|
|
62
62
|
const idF = entityIdField(exampleEntity)
|
|
63
63
|
|
|
64
64
|
if (opnames.includes('list')) {
|
|
65
|
-
Content(`// List all ${eName
|
|
66
|
-
let ${eVar}
|
|
67
|
-
for ${eVar} in &${eVar}
|
|
65
|
+
Content(`// List all ${entityItemsPhrase(eName)} (one entity per record, Err on failure)
|
|
66
|
+
let ${entityListVar(eVar, 'rust')} = client.${method}(Value::Noval).list(${rustListMatch(exampleEntity)}, Value::Noval).unwrap();
|
|
67
|
+
for ${eVar} in &${entityListVar(eVar, 'rust')} {
|
|
68
68
|
println!("{:?}", ${eVar}.data(None));
|
|
69
69
|
}
|
|
70
70
|
`)
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
import { cmp, Content, isAuthActive, envName, canonKey, entityIdField, opRequestShape, javaMapOf, matchExampleItems, javaMapItems, entityOps, fact } from '@voxgig/sdkgen'
|
|
2
|
+
import { cmp, Content, isAuthActive, envName, canonKey, entityIdField, opRequestShape, javaMapOf, matchExampleItems, javaMapItems, entityOps, fact, entityItemsPhrase } from '@voxgig/sdkgen'
|
|
3
3
|
|
|
4
4
|
import {
|
|
5
5
|
KIT,
|
|
@@ -53,7 +53,7 @@ ${shown ? `import ${scalaPackage(model)}.core.SdkEntity\n` : ''}
|
|
|
53
53
|
const idF = entityIdField(exampleEntity)
|
|
54
54
|
|
|
55
55
|
if (opnames.includes('list')) {
|
|
56
|
-
Content(`// List all ${
|
|
56
|
+
Content(`// List all ${entityItemsPhrase(nom(exampleEntity, 'Name'))} (a list of entities, one per record; raises on error)
|
|
57
57
|
val ${eVar}List = client.${accessor}(null).list(${scalaListMatch(exampleEntity)}, null).asInstanceOf[java.util.List[SdkEntity]]
|
|
58
58
|
${eVar}List.forEach(${eVar}Item => println(${eVar}Item.data()))
|
|
59
59
|
`)
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
import { cmp, Content, isAuthActive, envName, canonKey, canonScalarKey, entityIdField, opRequestShape, matchExampleItems, entityOps, fact } from '@voxgig/sdkgen'
|
|
2
|
+
import { cmp, Content, isAuthActive, envName, canonKey, canonScalarKey, entityIdField, opRequestShape, matchExampleItems, entityOps, fact, entityItemsPhrase } from '@voxgig/sdkgen'
|
|
3
3
|
|
|
4
4
|
import {
|
|
5
5
|
KIT,
|
|
@@ -69,7 +69,7 @@ ${authActive ? 'import Foundation\n' : ''}
|
|
|
69
69
|
const idF = entityIdField(exampleEntity)
|
|
70
70
|
|
|
71
71
|
if (opnames.includes('list')) {
|
|
72
|
-
Content(`// List all ${
|
|
72
|
+
Content(`// List all ${entityItemsPhrase(eName)} (a Value list of entities, one per record; throws on error)
|
|
73
73
|
let ${eVar}List = try client.${eName}().list(${swiftListMatch(exampleEntity)}, nil)
|
|
74
74
|
for ${eVar}Item in ${eVar}List.asList?.items ?? [] {
|
|
75
75
|
if let ${eVar}Entity = ${eVar}Item.asNative as? Entity {
|
|
@@ -77,7 +77,7 @@ const Package = cmp(async function Package(props: any) {
|
|
|
77
77
|
type: 'commonjs',
|
|
78
78
|
types: `dist/${SdkName}SDK.d.ts`,
|
|
79
79
|
|
|
80
|
-
files: ['dist', '!dist/**/*.tsbuildinfo', 'src', 'README.md', 'REFERENCE.md'],
|
|
80
|
+
files: ['dist', '!dist/**/*.tsbuildinfo', 'src', '!src/**/AGENTS.md', '!src/**/CLAUDE.md', 'README.md', 'REFERENCE.md', 'SKILL.md'],
|
|
81
81
|
scripts: {
|
|
82
82
|
...(hasLiveScenarios(model) ? {
|
|
83
83
|
'test:live': 'npm run build && node ' +
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
import { cmp, each, Content, canonToType, entityIdField, safeVarName, exampleVarName, jsKey, entityOps, listMatchArg, matchExampleItems, requestExampleItems, fact } from '@voxgig/sdkgen'
|
|
2
|
+
import { cmp, each, Content, canonToType, entityIdField, safeVarName, exampleVarName, jsKey, entityOps, listMatchArg, matchExampleItems, requestExampleItems, fact, entityListVar } from '@voxgig/sdkgen'
|
|
3
3
|
|
|
4
4
|
import {
|
|
5
5
|
KIT,
|
|
@@ -120,7 +120,7 @@ const ${eVar} = await client.${entity.Name}().load(${loadArg})
|
|
|
120
120
|
Content(`#### Example: List
|
|
121
121
|
|
|
122
122
|
\`\`\`ts
|
|
123
|
-
const ${eVar}
|
|
123
|
+
const ${entityListVar(eVar, 'ts')} = await client.${entity.Name}().list(${listMatchArg('ts', entity)})
|
|
124
124
|
\`\`\`
|
|
125
125
|
|
|
126
126
|
`)
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
import { cmp, Content, isAuthActive, entityIdField, entityDataIdField, pickExampleEntity, exampleVarName, jsKey, requiredItems, matchExampleItems, jsProp, requestExampleItems, envLocalAt, cdTarget, fact, directRoute } from '@voxgig/sdkgen'
|
|
2
|
+
import { cmp, Content, isAuthActive, entityIdField, entityDataIdField, pickExampleEntity, exampleVarName, jsKey, requiredItems, matchExampleItems, jsProp, requestExampleItems, envLocalAt, cdTarget, fact, directRoute, entityListVar } from '@voxgig/sdkgen'
|
|
3
3
|
|
|
4
4
|
import {
|
|
5
5
|
KIT,
|
|
@@ -61,9 +61,9 @@ const ReadmeHowto = cmp(function ReadmeHowto(props: any) {
|
|
|
61
61
|
// The op-driven example lines, shown only when the SDK has an entity op.
|
|
62
62
|
// A direct()-only SDK (no ops anywhere) shows a direct() test call instead.
|
|
63
63
|
const testModeExample = 'list' === primaryOp
|
|
64
|
-
? `const ${eVar}
|
|
65
|
-
// ${eVar}
|
|
66
|
-
console.log(${eVar}
|
|
64
|
+
? `const ${entityListVar(eVar, 'ts')} = await client.${eName}().list(${testCallArg})
|
|
65
|
+
// ${entityListVar(eVar, 'ts')} is an array of ${eName} entities, one per mock record
|
|
66
|
+
console.log(${entityListVar(eVar, 'ts')}.map((${eVar}) => ${eVar}.data()))`
|
|
67
67
|
: primaryOp
|
|
68
68
|
? `const ${eVar} = await client.${eName}().${primaryOp}(${testCallArg})
|
|
69
69
|
// ${eVar} is the ${eName} entity; .data() reads its mock record
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
import { cmp, each, Content, isAuthActive, packageName, envName, opRequestShape, entityIdField, entityDataIdField, entityOps, safeVarName, exampleVarName, jsKey, listMatchArg, matchExampleItems, requiredItems, jsProp, requestExampleItems, sendsId, fact, seriesList } from '@voxgig/sdkgen'
|
|
2
|
+
import { cmp, each, Content, isAuthActive, packageName, envName, opRequestShape, entityIdField, entityDataIdField, entityOps, safeVarName, exampleVarName, jsKey, listMatchArg, matchExampleItems, requiredItems, jsProp, requestExampleItems, sendsId, fact, seriesList, entityListVar } from '@voxgig/sdkgen'
|
|
3
3
|
|
|
4
4
|
import {
|
|
5
5
|
KIT,
|
|
@@ -75,9 +75,9 @@ resolves to entities, not raw records. Iterate them directly, and call
|
|
|
75
75
|
\`.data()\` on one for the record it holds:
|
|
76
76
|
|
|
77
77
|
\`\`\`ts
|
|
78
|
-
const ${eVar}
|
|
78
|
+
const ${entityListVar(eVar, 'ts')} = await client.${eName}().list(${listMatchArg('ts', exampleEntity)})
|
|
79
79
|
|
|
80
|
-
for (const ${eVar} of ${eVar}
|
|
80
|
+
for (const ${eVar} of ${entityListVar(eVar, 'ts')}) {
|
|
81
81
|
console.log(${eVar}.data())
|
|
82
82
|
}
|
|
83
83
|
\`\`\`
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
import { cmp, Content, isAuthActive, packageName, envName, entityIdField, entityOps, opRequestShape, safeVarName, exampleVarName, jsKey, listMatchArg, matchExampleItems, entityClassName, entityCollection, fact } from '@voxgig/sdkgen'
|
|
2
|
+
import { cmp, Content, isAuthActive, packageName, envName, entityIdField, entityOps, opRequestShape, safeVarName, exampleVarName, jsKey, listMatchArg, matchExampleItems, entityClassName, entityCollection, fact, entityListVar, entityItemsPhrase } from '@voxgig/sdkgen'
|
|
3
3
|
|
|
4
4
|
import {
|
|
5
5
|
KIT,
|
|
@@ -51,9 +51,9 @@ const client = ${ctor}
|
|
|
51
51
|
let hasCall = false
|
|
52
52
|
|
|
53
53
|
if (opnames.includes('list')) {
|
|
54
|
-
Content(`// List all ${eName
|
|
55
|
-
const ${eVar}
|
|
56
|
-
for (const ${eVar} of ${eVar}
|
|
54
|
+
Content(`// List all ${entityItemsPhrase(eName)} (returns ${entityClassName(exampleEntity, entityCollection(model))}[], one entity per record)
|
|
55
|
+
const ${entityListVar(eVar, 'ts')} = await client.${eName}().list(${listMatchArg('ts', exampleEntity)})
|
|
56
|
+
for (const ${eVar} of ${entityListVar(eVar, 'ts')}) {
|
|
57
57
|
console.log(${eVar}.data())
|
|
58
58
|
}
|
|
59
59
|
`)
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
import { cmp, Content, entityIdField, pickExampleEntity, requiredItems, safeVarName, exampleVarName, jsKey, matchExampleItems, requestExampleItems } from '@voxgig/sdkgen'
|
|
2
|
+
import { cmp, Content, entityIdField, pickExampleEntity, requiredItems, safeVarName, exampleVarName, jsKey, matchExampleItems, requestExampleItems, entityListVar } from '@voxgig/sdkgen'
|
|
3
3
|
|
|
4
4
|
import {
|
|
5
5
|
KIT,
|
|
@@ -59,9 +59,9 @@ const client = ${model.const.Name}SDK.test({
|
|
|
59
59
|
|
|
60
60
|
if (exampleEntity && primaryOp) {
|
|
61
61
|
const eName = nom(exampleEntity, 'Name')
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
(
|
|
62
|
+
const eVar = 'list' === primaryOp
|
|
63
|
+
? entityListVar(exampleVarName(eName.toLowerCase(), 'ts'), 'ts')
|
|
64
|
+
: exampleVarName(eName.toLowerCase(), 'ts')
|
|
65
65
|
const primaryOpDef = exampleEntity.op && exampleEntity.op[primaryOp]
|
|
66
66
|
let arg = ''
|
|
67
67
|
const isMatchOp = 'load' === primaryOp || 'remove' === primaryOp
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
import { cmp, each, Content, canonKey, canonScalarKey, entityIdField, entityOps, matchExampleItems, requestExampleItems, fact } from '@voxgig/sdkgen'
|
|
2
|
+
import { cmp, each, Content, canonKey, canonScalarKey, entityIdField, entityOps, matchExampleItems, requestExampleItems, fact, entityListVar } from '@voxgig/sdkgen'
|
|
3
3
|
|
|
4
4
|
import {
|
|
5
5
|
KIT,
|
|
@@ -153,8 +153,8 @@ switch (client.${method}(h.vnull()).load(${loadArg}, h.vnull())) {
|
|
|
153
153
|
|
|
154
154
|
\`\`\`zig
|
|
155
155
|
switch (client.${method}(h.vnull()).list(${zigListMatch(entity)}, h.vnull())) {
|
|
156
|
-
.ok => |${eVar}
|
|
157
|
-
for (${eVar}
|
|
156
|
+
.ok => |${entityListVar(eVar, 'zig')}| {
|
|
157
|
+
for (${entityListVar(eVar, 'zig')}) |${eVar}| {
|
|
158
158
|
std.debug.print("{s}\\n", .{h.stringify(${eVar}.asEntity().data(null))});
|
|
159
159
|
}
|
|
160
160
|
},
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
import { cmp, Content, canonScalarKey, entityIdField, pickExampleEntity, requiredItems, matchExampleItems, requestExampleItems, cdTarget, directRoute } from '@voxgig/sdkgen'
|
|
2
|
+
import { cmp, Content, canonScalarKey, entityIdField, pickExampleEntity, requiredItems, matchExampleItems, requestExampleItems, cdTarget, directRoute, entityListVar } from '@voxgig/sdkgen'
|
|
3
3
|
|
|
4
4
|
import {
|
|
5
5
|
KIT,
|
|
@@ -59,8 +59,8 @@ const ReadmeHowto = cmp(function ReadmeHowto(props: any) {
|
|
|
59
59
|
const testModeExample = 'list' === primaryOp
|
|
60
60
|
? `// list's .ok is one entity per mock record, .err the error.
|
|
61
61
|
switch (client.${method}(h.vnull()).list(${testArg}, h.vnull())) {
|
|
62
|
-
.ok => |${eVar}
|
|
63
|
-
for (${eVar}
|
|
62
|
+
.ok => |${entityListVar(eVar, 'zig')}| {
|
|
63
|
+
for (${entityListVar(eVar, 'zig')}) |${eVar}| {
|
|
64
64
|
std.debug.print("{s}\\n", .{h.stringify(${eVar}.asEntity().data(null))});
|
|
65
65
|
}
|
|
66
66
|
},
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
import { cmp, Content, isAuthActive, envName, canonKey, canonScalarKey, opRequestShape, entityIdField, entityOps, matchExampleItems, requiredItems, requestExampleItems, sendsId, fact, seriesList } from '@voxgig/sdkgen'
|
|
2
|
+
import { cmp, Content, isAuthActive, envName, canonKey, canonScalarKey, opRequestShape, entityIdField, entityOps, matchExampleItems, requiredItems, requestExampleItems, sendsId, fact, seriesList, entityListVar } from '@voxgig/sdkgen'
|
|
3
3
|
|
|
4
4
|
import {
|
|
5
5
|
KIT,
|
|
@@ -85,8 +85,8 @@ it. \`asEntity().data(null)\` reads an entity's record.
|
|
|
85
85
|
|
|
86
86
|
\`\`\`zig
|
|
87
87
|
switch (client.${method}(h.vnull()).list(${zigListMatch(exampleEntity)}, h.vnull())) {
|
|
88
|
-
.ok => |${eVar}
|
|
89
|
-
for (${eVar}
|
|
88
|
+
.ok => |${entityListVar(eVar, 'zig')}| {
|
|
89
|
+
for (${entityListVar(eVar, 'zig')}) |${eVar}| {
|
|
90
90
|
std.debug.print("{s}\\n", .{h.stringify(${eVar}.asEntity().data(null))});
|
|
91
91
|
}
|
|
92
92
|
},
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
import { cmp, Content, isAuthActive, envName, canonKey, canonScalarKey, entityIdField, opRequestShape, matchExampleItems, entityOps, fact } from '@voxgig/sdkgen'
|
|
2
|
+
import { cmp, Content, isAuthActive, envName, canonKey, canonScalarKey, entityIdField, opRequestShape, matchExampleItems, entityOps, fact, entityListVar, entityItemsPhrase } from '@voxgig/sdkgen'
|
|
3
3
|
|
|
4
4
|
import {
|
|
5
5
|
KIT,
|
|
@@ -65,10 +65,10 @@ ${authActive ? '// init is the std.process.Init that main receives.\n' : ''}cons
|
|
|
65
65
|
const idF = entityIdField(exampleEntity)
|
|
66
66
|
|
|
67
67
|
if (opnames.includes('list')) {
|
|
68
|
-
Content(`// List all ${eName
|
|
68
|
+
Content(`// List all ${entityItemsPhrase(eName)} (one entity per record, .err on failure)
|
|
69
69
|
switch (client.${method}(h.vnull()).list(${zigListMatch(exampleEntity)}, h.vnull())) {
|
|
70
|
-
.ok => |${eVar}
|
|
71
|
-
for (${eVar}
|
|
70
|
+
.ok => |${entityListVar(eVar, 'zig')}| {
|
|
71
|
+
for (${entityListVar(eVar, 'zig')}) |${eVar}| {
|
|
72
72
|
std.debug.print("{s}\\n", .{h.stringify(${eVar}.asEntity().data(null))});
|
|
73
73
|
}
|
|
74
74
|
},
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
import { cmp, Content, canonKey, canonScalarKey, entityIdField, pickExampleEntity, requiredItems, matchExampleItems, requestExampleItems } from '@voxgig/sdkgen'
|
|
2
|
+
import { cmp, Content, canonKey, canonScalarKey, entityIdField, pickExampleEntity, requiredItems, matchExampleItems, requestExampleItems, entityListVar } from '@voxgig/sdkgen'
|
|
3
3
|
|
|
4
4
|
import {
|
|
5
5
|
KIT,
|
|
@@ -65,8 +65,8 @@ const client = sdk.test_sdk(h.vnull(), h.vnull());
|
|
|
65
65
|
}
|
|
66
66
|
const eVar = zigVarName(exampleEntity.name)
|
|
67
67
|
const ok = 'list' === primaryOp
|
|
68
|
-
? `.ok => |${eVar}
|
|
69
|
-
for (${eVar}
|
|
68
|
+
? `.ok => |${entityListVar(eVar, 'zig')}| {
|
|
69
|
+
for (${entityListVar(eVar, 'zig')}) |${eVar}| {
|
|
70
70
|
std.debug.print("{s}\\n", .{h.stringify(${eVar}.asEntity().data(null))});
|
|
71
71
|
}
|
|
72
72
|
},`
|
|
@@ -269,7 +269,7 @@ clean:
|
|
|
269
269
|
rm -rf build/plain $(TLS_STAMP)
|
|
270
270
|
|
|
271
271
|
# C has no central registry — publishing IS the git tag.
|
|
272
|
-
VERSION
|
|
272
|
+
VERSION = $(shell cat VERSION 2>/dev/null || echo 0.0.1)
|
|
273
273
|
TAG := RELEASETAG
|
|
274
274
|
publish:
|
|
275
275
|
@echo "C target: $(if $(TAG),tag-only publish ($(TAG)),no release tag); no registry."
|
|
@@ -93,7 +93,7 @@ clean:
|
|
|
93
93
|
rm -f test/*.out test/*/*/*.out $(FEATURE_OBJS) libsdkfeature.a
|
|
94
94
|
|
|
95
95
|
# --- Release: the git tag (header-only; no registry) -----------------------
|
|
96
|
-
VERSION
|
|
96
|
+
VERSION = $(shell cat VERSION 2>/dev/null || echo 0.0.1)
|
|
97
97
|
TAG := RELEASETAG
|
|
98
98
|
publish:
|
|
99
99
|
@echo "Header-only C++ SDK; $(if $(TAG),publishing is the git tag $(TAG),the model cuts no release tag)."
|
|
@@ -7,8 +7,13 @@ build:
|
|
|
7
7
|
dotnet build ProjectNameSDK.csproj
|
|
8
8
|
|
|
9
9
|
clean:
|
|
10
|
+
ifeq ($(OS),Windows_NT)
|
|
11
|
+
-dotnet clean ProjectNameSDK.csproj
|
|
12
|
+
-dotnet clean test/ProjectNameSDKTest.csproj
|
|
13
|
+
else
|
|
10
14
|
dotnet clean ProjectNameSDK.csproj 2>/dev/null || true
|
|
11
15
|
rm -rf bin obj test/bin test/obj
|
|
16
|
+
endif
|
|
12
17
|
|
|
13
18
|
# --- Release: the git tag (no NuGet upload) --------------------------------
|
|
14
19
|
# Publishing a version means pushing its release tag: this template has no
|
|
@@ -19,7 +24,7 @@ clean:
|
|
|
19
24
|
# boru vault exec --for=github=<alias> -- make publish
|
|
20
25
|
# boru `--dry-run` injects a filler token we detect to rehearse (no tag/push).
|
|
21
26
|
# set -e + tag-last: a failed push never leaves a tag behind.
|
|
22
|
-
VERSION
|
|
27
|
+
VERSION = $(shell cat VERSION)
|
|
23
28
|
TAG := RELEASETAG
|
|
24
29
|
BORU_DRY_RUN_FILLER := BORU-DRY-RUN-FILLER-NOT-A-REAL-SECRET
|
|
25
30
|
publish: test
|
|
@@ -21,7 +21,7 @@ clean:
|
|
|
21
21
|
# NOTE: publishing the git tag is deliberately NOT gated on `go test` (every
|
|
22
22
|
# other target's deploy just pushes its tag; a generated-test quirk must not
|
|
23
23
|
# block the module tag). Run `make test` separately in CI to gate quality.
|
|
24
|
-
VERSION
|
|
24
|
+
VERSION = $(shell cat VERSION)
|
|
25
25
|
TAG := RELEASETAG
|
|
26
26
|
BORU_DRY_RUN_FILLER := BORU-DRY-RUN-FILLER-NOT-A-REAL-SECRET
|
|
27
27
|
publish:
|
|
@@ -21,7 +21,7 @@ clean:
|
|
|
21
21
|
# NOTE: publishing the git tag is deliberately NOT gated on `mvn test` (every
|
|
22
22
|
# other target's deploy just pushes its tag; a generated-test quirk must not
|
|
23
23
|
# block the tag). Run `make test` separately in CI to gate quality.
|
|
24
|
-
VERSION
|
|
24
|
+
VERSION = $(shell cat VERSION)
|
|
25
25
|
TAG := RELEASETAG
|
|
26
26
|
BORU_DRY_RUN_FILLER := BORU-DRY-RUN-FILLER-NOT-A-REAL-SECRET
|
|
27
27
|
publish:
|
|
@@ -7,7 +7,7 @@ build:
|
|
|
7
7
|
@echo "No build step for JavaScript"
|
|
8
8
|
|
|
9
9
|
clean:
|
|
10
|
-
|
|
10
|
+
node -e "for (const p of ['node_modules']) require('fs').rmSync(p, { recursive: true, force: true })"
|
|
11
11
|
|
|
12
12
|
# --- Release: publish to npm ----------------------------------------------
|
|
13
13
|
# Publish this package to npm, then push its release tag. Run headless under
|
|
@@ -16,8 +16,8 @@ clean:
|
|
|
16
16
|
# boru vault exec --for=npm=<alias> --for=github=<alias> -- make publish
|
|
17
17
|
# boru `--dry-run` injects a filler token we detect to rehearse (no publish/tag).
|
|
18
18
|
# set -e + tag-last: a failed publish never leaves a tag behind.
|
|
19
|
-
SHELL := /bin/bash
|
|
20
|
-
VERSION
|
|
19
|
+
publish: SHELL := /bin/bash
|
|
20
|
+
VERSION = $(shell node -p "require('./package.json').version")
|
|
21
21
|
TAG := RELEASETAG
|
|
22
22
|
BORU_DRY_RUN_FILLER := BORU-DRY-RUN-FILLER-NOT-A-REAL-SECRET
|
|
23
23
|
publish: test
|
|
@@ -20,7 +20,7 @@ clean:
|
|
|
20
20
|
# argv:
|
|
21
21
|
# boru vault exec --for=github=<alias> -- make publish
|
|
22
22
|
# boru `--dry-run` injects a filler token we detect to rehearse (no tag/push).
|
|
23
|
-
VERSION
|
|
23
|
+
VERSION = $(shell cat VERSION)
|
|
24
24
|
TAG := RELEASETAG
|
|
25
25
|
BORU_DRY_RUN_FILLER := BORU-DRY-RUN-FILLER-NOT-A-REAL-SECRET
|
|
26
26
|
publish:
|
|
@@ -33,7 +33,7 @@ clean:
|
|
|
33
33
|
# <package>-<version>.rockspec, so we upload a canonically-named copy. boru
|
|
34
34
|
# `--dry-run` rehearses (no upload/tag). set -e + tag-last: a failed upload
|
|
35
35
|
# never leaves a tag behind.
|
|
36
|
-
VERSION
|
|
36
|
+
VERSION = $(shell sed -nE 's/^version *= *"([0-9.]+).*/\1/p' *.rockspec | head -1)
|
|
37
37
|
TAG := RELEASETAG
|
|
38
38
|
BORU_DRY_RUN_FILLER := BORU-DRY-RUN-FILLER-NOT-A-REAL-SECRET
|
|
39
39
|
publish: test
|
|
@@ -34,7 +34,7 @@ clean:
|
|
|
34
34
|
# NOTE: `perl Makefile.PL` (ExtUtils::MakeMaker) GENERATES a file named
|
|
35
35
|
# `Makefile`, which would OVERWRITE this hand-written Makefile - so the
|
|
36
36
|
# dist build always happens inside .release/, never in place.
|
|
37
|
-
VERSION
|
|
37
|
+
VERSION = $(shell sed -nE "s/.*VERSION *= *'([^']+)'.*/\1/p" lib/*SDK.pm | head -1)
|
|
38
38
|
TAG := RELEASETAG
|
|
39
39
|
BORU_DRY_RUN_FILLER := BORU-DRY-RUN-FILLER-NOT-A-REAL-SECRET
|
|
40
40
|
publish: test
|
|
@@ -17,7 +17,7 @@ clean:
|
|
|
17
17
|
# boru vault exec --for=github=<alias> -- make publish
|
|
18
18
|
# boru `--dry-run` injects a filler token we detect to rehearse (no tag/push).
|
|
19
19
|
# set -e + tag-last: a failed push never leaves a tag behind.
|
|
20
|
-
VERSION
|
|
20
|
+
VERSION = $(shell cat VERSION)
|
|
21
21
|
TAG := RELEASETAG
|
|
22
22
|
BORU_DRY_RUN_FILLER := BORU-DRY-RUN-FILLER-NOT-A-REAL-SECRET
|
|
23
23
|
publish: test
|
|
@@ -17,7 +17,7 @@ clean:
|
|
|
17
17
|
# boru `--dry-run` injects a filler token we detect to rehearse: builds the dist
|
|
18
18
|
# but performs no upload, tag, or push. set -e + tag-last: a failed upload never
|
|
19
19
|
# leaves a tag behind. Needs python `build` + `twine` (pip install build twine).
|
|
20
|
-
VERSION
|
|
20
|
+
VERSION = $(shell sed -nE 's/^version *= *"([^"]+)".*/\1/p' pyproject.toml | head -1)
|
|
21
21
|
TAG := RELEASETAG
|
|
22
22
|
BORU_DRY_RUN_FILLER := BORU-DRY-RUN-FILLER-NOT-A-REAL-SECRET
|
|
23
23
|
publish: test
|
|
@@ -190,9 +190,15 @@ def _wrap(sock, context, host):
|
|
|
190
190
|
|
|
191
191
|
# TLS to the server inside TLS to an https proxy. The ssl module cannot wrap
|
|
192
192
|
# an SSLSocket, so the inner session runs on memory BIOs over the outer one.
|
|
193
|
+
# close() keeps a socket's meaning: http.client closes the connection once a
|
|
194
|
+
# response that will not keep it alive has its headers, then reads the body
|
|
195
|
+
# through the file makefile() gave it, so the outer socket closes with the
|
|
196
|
+
# last of those files.
|
|
193
197
|
class _Nested:
|
|
194
198
|
def __init__(self, outer, context, host):
|
|
195
199
|
self._outer = outer
|
|
200
|
+
self._io_refs = 0
|
|
201
|
+
self._closed = False
|
|
196
202
|
self._incoming = ssl.MemoryBIO()
|
|
197
203
|
self._outgoing = ssl.MemoryBIO()
|
|
198
204
|
self._tls = context.wrap_bio(self._incoming, self._outgoing, server_hostname=host)
|
|
@@ -251,11 +257,15 @@ class _Nested:
|
|
|
251
257
|
view = view[self.send(view):]
|
|
252
258
|
|
|
253
259
|
def makefile(self, mode="rb", buffering=-1, **_kw):
|
|
260
|
+
self._io_refs += 1
|
|
254
261
|
raw = socket.SocketIO(self, "rb")
|
|
255
262
|
return raw if 0 == buffering else io.BufferedReader(raw)
|
|
256
263
|
|
|
257
264
|
def _decref_socketios(self):
|
|
258
|
-
|
|
265
|
+
if 0 < self._io_refs:
|
|
266
|
+
self._io_refs -= 1
|
|
267
|
+
if self._closed:
|
|
268
|
+
self.close()
|
|
259
269
|
|
|
260
270
|
def getpeercert(self, binary_form=False):
|
|
261
271
|
return self._tls.getpeercert(binary_form)
|
|
@@ -267,7 +277,9 @@ class _Nested:
|
|
|
267
277
|
return self._outer.fileno()
|
|
268
278
|
|
|
269
279
|
def close(self):
|
|
270
|
-
self.
|
|
280
|
+
self._closed = True
|
|
281
|
+
if self._io_refs <= 0:
|
|
282
|
+
self._outer.close()
|
|
271
283
|
|
|
272
284
|
def __enter__(self):
|
|
273
285
|
return self
|
|
@@ -23,6 +23,7 @@ import os
|
|
|
23
23
|
import subprocess
|
|
24
24
|
import sys
|
|
25
25
|
import threading
|
|
26
|
+
import time
|
|
26
27
|
|
|
27
28
|
import pytest
|
|
28
29
|
|
|
@@ -508,6 +509,9 @@ class TestPrimaryUtility:
|
|
|
508
509
|
self.send_header("content-type", "application/json")
|
|
509
510
|
self.send_header("content-length", "16")
|
|
510
511
|
self.end_headers()
|
|
512
|
+
# The body a beat after the headers, as macOS delivers it: the
|
|
513
|
+
# client has closed its connection by then and must still read it.
|
|
514
|
+
time.sleep(0.05)
|
|
511
515
|
self.wfile.write(b'{"over":"proxy"}')
|
|
512
516
|
|
|
513
517
|
def log_message(self, *args):
|
|
@@ -31,7 +31,7 @@ clean:
|
|
|
31
31
|
# boru `--dry-run` injects a filler token we detect to rehearse: builds the dist
|
|
32
32
|
# but performs no upload, tag, or push. set -e + tag-last: a failed upload never
|
|
33
33
|
# leaves a tag behind. Needs python `build` + `twine` (pip install build twine).
|
|
34
|
-
VERSION
|
|
34
|
+
VERSION = $(shell sed -nE 's/^version *= *"([^"]+)".*/\1/p' pyproject.toml | head -1)
|
|
35
35
|
TAG := RELEASETAG
|
|
36
36
|
BORU_DRY_RUN_FILLER := BORU-DRY-RUN-FILLER-NOT-A-REAL-SECRET
|
|
37
37
|
publish: test
|
|
@@ -24,7 +24,7 @@ clean:
|
|
|
24
24
|
# boru vault exec --for=gem=<alias> --for=github=<alias> -- make publish
|
|
25
25
|
# boru `--dry-run` injects a filler token we detect to rehearse (build only, no
|
|
26
26
|
# push/tag). set -e + tag-last: a failed push never leaves a tag behind.
|
|
27
|
-
VERSION
|
|
27
|
+
VERSION = $(shell sed -nE 's/.*\.version *= *"([^"]+)".*/\1/p' *.gemspec | head -1)
|
|
28
28
|
TAG := RELEASETAG
|
|
29
29
|
BORU_DRY_RUN_FILLER := BORU-DRY-RUN-FILLER-NOT-A-REAL-SECRET
|
|
30
30
|
publish: test
|
|
@@ -17,7 +17,7 @@ clean:
|
|
|
17
17
|
# boru vault exec --for=github=<alias> -- make publish
|
|
18
18
|
# boru `--dry-run` injects a filler token we detect to rehearse (no tag/push).
|
|
19
19
|
# set -e + tag-last: a failed push never leaves a tag behind.
|
|
20
|
-
VERSION
|
|
20
|
+
VERSION = $(shell cat VERSION)
|
|
21
21
|
TAG := RELEASETAG
|
|
22
22
|
BORU_DRY_RUN_FILLER := BORU-DRY-RUN-FILLER-NOT-A-REAL-SECRET
|
|
23
23
|
publish:
|
|
@@ -7,8 +7,7 @@ build:
|
|
|
7
7
|
swift build
|
|
8
8
|
|
|
9
9
|
clean:
|
|
10
|
-
swift package
|
|
11
|
-
rm -rf .build
|
|
10
|
+
-swift package reset
|
|
12
11
|
|
|
13
12
|
# --- Release: the git tag (SwiftPM) ----------------------------------------
|
|
14
13
|
# SwiftPM has no upload step - publishing IS the git tag, so publishing a
|
|
@@ -17,7 +16,7 @@ clean:
|
|
|
17
16
|
# boru vault exec --for=github=<alias> -- make publish
|
|
18
17
|
# boru `--dry-run` injects a filler token we detect to rehearse (no tag/push).
|
|
19
18
|
# set -e + tag-last: a failed push never leaves a tag behind.
|
|
20
|
-
VERSION
|
|
19
|
+
VERSION = $(shell cat VERSION)
|
|
21
20
|
TAG := RELEASETAG
|
|
22
21
|
BORU_DRY_RUN_FILLER := BORU-DRY-RUN-FILLER-NOT-A-REAL-SECRET
|
|
23
22
|
publish: test
|
|
@@ -13,7 +13,7 @@ build:
|
|
|
13
13
|
npm run build
|
|
14
14
|
|
|
15
15
|
clean:
|
|
16
|
-
|
|
16
|
+
node -e "for (const p of ['dist', 'dist-test', 'node_modules']) require('fs').rmSync(p, { recursive: true, force: true })"
|
|
17
17
|
|
|
18
18
|
# --- Release: publish to npm ----------------------------------------------
|
|
19
19
|
# Compile, then publish this package to npm and push its release tag. Run headless
|
|
@@ -22,8 +22,8 @@ clean:
|
|
|
22
22
|
# boru vault exec --for=npm=<alias> --for=github=<alias> -- make publish
|
|
23
23
|
# boru `--dry-run` injects a filler token we detect to rehearse (build only, no
|
|
24
24
|
# publish/tag). set -e + tag-last: a failed publish never leaves a tag behind.
|
|
25
|
-
SHELL := /bin/bash
|
|
26
|
-
VERSION
|
|
25
|
+
publish: SHELL := /bin/bash
|
|
26
|
+
VERSION = $(shell node -p "require('./package.json').version")
|
|
27
27
|
TAG := RELEASETAG
|
|
28
28
|
BORU_DRY_RUN_FILLER := BORU-DRY-RUN-FILLER-NOT-A-REAL-SECRET
|
|
29
29
|
publish: test
|