@voxgig/sdkgen-infrapack 0.0.8 → 0.0.10
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.
|
@@ -84,6 +84,17 @@ main: kit: target: 'seneca-provider': {
|
|
|
84
84
|
# Windows alike. A knob that produces an uninstallable dependency is worse
|
|
85
85
|
# than no knob.
|
|
86
86
|
#
|
|
87
|
+
# NPM 12 REFUSES BOTH BY DEFAULT. `allow-git` and `allow-remote` default to
|
|
88
|
+
# "none", so a git or tarball dependency is rejected before anything is
|
|
89
|
+
# fetched (EALLOWGIT / EALLOWREMOTE). The generated CI passes the matching
|
|
90
|
+
# `--allow-*=all` for whichever kind is configured, because the project
|
|
91
|
+
# opting into what it declared is reasonable — but a CONSUMER of the
|
|
92
|
+
# published provider gets no such flag, and will hit the same wall.
|
|
93
|
+
#
|
|
94
|
+
# So this is a stopgap for an SDK that is not published YET, not a
|
|
95
|
+
# substitute for publishing it. An SDK on a registry needs none of it, and
|
|
96
|
+
# the default `npm` kind is the one that works everywhere.
|
|
97
|
+
#
|
|
87
98
|
# `spec` states the whole dependency value outright and wins over
|
|
88
99
|
# everything.
|
|
89
100
|
sdk: dep: {
|
|
@@ -1621,14 +1621,26 @@ const Workflow = cmp(function Workflow(props: any) {
|
|
|
1621
1621
|
File({ name: 'build.yml' }, () => {
|
|
1622
1622
|
Content(`# Generated by @voxgig/sdkgen. Do not edit.
|
|
1623
1623
|
#
|
|
1624
|
-
${provider.
|
|
1624
|
+
${'git' === provider.sdkDepKind ?
|
|
1625
1625
|
`# The ${provider.api} SDK is depended on by GIT TAG rather than taken from a\n` +
|
|
1626
1626
|
'# registry, so `npm install` resolves the tag named in package.json and\n' +
|
|
1627
|
-
'# needs git on PATH — every GitHub runner has it
|
|
1628
|
-
'
|
|
1629
|
-
|
|
1630
|
-
'#
|
|
1631
|
-
'# platform.'
|
|
1627
|
+
'# needs git on PATH — every GitHub runner has it.\n' +
|
|
1628
|
+
'#\n' +
|
|
1629
|
+
'# npm 12 refuses a git dependency by default (allow-git defaults to\n' +
|
|
1630
|
+
'# "none"), which is what --allow-git=all below opts back into. Nothing\n' +
|
|
1631
|
+
'# else is needed to build and run the offline tests on any platform.' :
|
|
1632
|
+
'release' === provider.sdkDepKind ?
|
|
1633
|
+
`# The ${provider.api} SDK is depended on by GITHUB RELEASE ASSET rather than\n` +
|
|
1634
|
+
'# taken from a registry: an npm-pack tarball attached to the tag, which\n' +
|
|
1635
|
+
'# npm installs without looking at the repository layout.\n' +
|
|
1636
|
+
'#\n' +
|
|
1637
|
+
'# npm 12 refuses a remote tarball by default (allow-remote defaults to\n' +
|
|
1638
|
+
'# "none"), which is what --allow-remote=all below opts back into. That\n' +
|
|
1639
|
+
'# flag does not travel to consumers of this package, so publishing the\n' +
|
|
1640
|
+
'# SDK remains the durable answer.' :
|
|
1641
|
+
`# The ${provider.api} SDK is a normal published dependency, so \`npm install\`\n` +
|
|
1642
|
+
'# is all that is needed to build and run the offline tests on every\n' +
|
|
1643
|
+
'# platform.'}
|
|
1632
1644
|
${!provider.liveApp ? '' : `#
|
|
1633
1645
|
# The live tests additionally need the companion server, which is only
|
|
1634
1646
|
# distributed in the SDK's source repository (it is not published). That repo
|
|
@@ -1699,7 +1711,7 @@ ${!provider.liveApp ? '' : `
|
|
|
1699
1711
|
done
|
|
1700
1712
|
echo "server did not start; live tests will skip"
|
|
1701
1713
|
`}
|
|
1702
|
-
- run: npm install
|
|
1714
|
+
- run: npm install${provider.sdkInstallFlag}
|
|
1703
1715
|
|
|
1704
1716
|
# The Seneca host framework is a PEER dependency, so the test suite needs
|
|
1705
1717
|
# it installed explicitly. --no-save keeps npm from rewriting the peer
|
|
@@ -1798,7 +1810,7 @@ jobs:
|
|
|
1798
1810
|
node-version: 24.x
|
|
1799
1811
|
|
|
1800
1812
|
# install, not ci: this package does not commit a lockfile.
|
|
1801
|
-
- run: npm install
|
|
1813
|
+
- run: npm install${provider.sdkInstallFlag}
|
|
1802
1814
|
|
|
1803
1815
|
# The Seneca host framework is a PEER dependency, so the test suite
|
|
1804
1816
|
# needs it installed explicitly.
|
|
@@ -723,6 +723,26 @@ const Main = cmp(function Main(props: any) {
|
|
|
723
723
|
// CI note says so, because "npm install is all you need" stops being
|
|
724
724
|
// true the moment git or a tarball URL is in the path.
|
|
725
725
|
sdkGit: !sdkDep.startsWith('^'),
|
|
726
|
+
// WHICH non-registry kind, because the CI note has to be true: a git
|
|
727
|
+
// dependency needs git on PATH and a release asset does not, and a note
|
|
728
|
+
// that says the wrong one is worse than no note.
|
|
729
|
+
sdkDepKind: sdkDep.startsWith('github:') ? 'git' :
|
|
730
|
+
(sdkDep.startsWith('http') ? 'release' : 'npm'),
|
|
731
|
+
// THE OPT-IN A NON-REGISTRY DEPENDENCY NEEDS, or ''.
|
|
732
|
+
//
|
|
733
|
+
// npm 12 defaults `allow-git` and `allow-remote` to "none" and REFUSES
|
|
734
|
+
// such a dependency outright — EALLOWGIT / EALLOWREMOTE, before it
|
|
735
|
+
// fetches anything. Older npm allowed both, so a workflow that passes
|
|
736
|
+
// today fails the moment its runner image updates; this provider's own
|
|
737
|
+
// publish run failed that way within hours of the build run passing,
|
|
738
|
+
// because publishing upgrades npm first.
|
|
739
|
+
//
|
|
740
|
+
// Emitted ONLY where the project chose such a dependency: it is the
|
|
741
|
+
// project opting into what it already declared, not a default weakened
|
|
742
|
+
// for everyone. Publishing the SDK remains the durable answer, and this
|
|
743
|
+
// flag exists so an unpublished one is workable meanwhile.
|
|
744
|
+
sdkInstallFlag: sdkDep.startsWith('github:') ? ' --allow-git=all' :
|
|
745
|
+
(sdkDep.startsWith('http') ? ' --allow-remote=all' : ''),
|
|
726
746
|
repoUrl: repo.url,
|
|
727
747
|
// The SDK's own repo, for pointing at the companion test server which is
|
|
728
748
|
// only distributed in source.
|
package/package.json
CHANGED