@biffo/cli 0.303.3 → 0.303.4

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.
@@ -137,7 +137,7 @@ repository with its own independent `uv sync` / `uv.lock`, not inside
137
137
  biffo-template's workspace. Once copied out, `uv sync && uv run pytest`
138
138
  works standalone with no dependency on the rest of biffo-template.
139
139
 
140
- ## The `biffo-plugin-sdk` dependency: PyPI pin, pending the first release
140
+ ## The `biffo-plugin-sdk` dependency: PyPI pin
141
141
 
142
142
  `pyproject.toml` declares:
143
143
 
@@ -148,41 +148,30 @@ dependencies = [
148
148
  ]
149
149
  ```
150
150
 
151
- This is a **PyPI-style version pin**, and it is the correct end state: the
152
- SDK is versioned `1.0.0` and biffo-template's
151
+ This is a **PyPI-style version pin**: the SDK is published via
152
+ biffo-template's
153
153
  [`.github/workflows/publish-sdk.yml`](https://github.com/keiranholloway/biffo-template/blob/main/.github/workflows/publish-sdk.yml)
154
- builds and publishes it to PyPI (via Trusted Publishing) on a pushed
155
- `sdk-v*` tag. `>=1.0,<2.0` matches the `"biffo-plugin-sdk": "^1.0"` that
154
+ (Trusted Publishing) on a pushed `sdk-v*` tag, and the first release has
155
+ already happened — this skeleton's own `uv.lock` resolves `biffo-plugin-sdk`
156
+ 1.4.0 from `https://pypi.org/simple` (see its `biffo-plugin-sdk` entry).
157
+ `>=1.0,<2.0` matches the `"biffo-plugin-sdk": "^1.0"` that
156
158
  `biffo.plugin.json` declares, and the SDK carries its own independent
157
159
  semver — it is **not** tied to the template's core version, so a major
158
160
  bump here means the plugin API broke and nothing else.
159
161
 
160
- **Ordering caveat.** The release _pipeline_ exists; the _release_ does not
161
- yet. `biffo-plugin-sdk` has never been uploaded — the PyPI project is
162
- unregistered until the owner configures the Trusted Publisher and pushes
163
- `sdk-v1.0.0`. Until that happens, `uv sync` in a freshly-copied plugin repo
164
- still cannot resolve this dependency, and you need one of the two local
165
- overrides below. Once 1.0.0 is live, **delete the override** — the
166
- `dependencies` entry above already points at the real thing.
167
-
168
- Two ways to make local development work before that happens:
169
-
170
- 1. **Path dependency** (if developing inside a biffo-template checkout,
171
- e.g. for a plugin you plan to upstream into `services/`): add
172
- ```toml
173
- [tool.uv.sources]
174
- biffo-plugin-sdk = { path = "../../packages/python-sdk", editable = true }
175
- ```
176
- 2. **Git dependency** (developing this plugin as a genuinely separate repo
177
- against an unpublished SDK):
178
- ```toml
179
- [tool.uv.sources]
180
- biffo-plugin-sdk = { git = "https://github.com/keiranholloway/biffo-template", subdirectory = "packages/python-sdk" }
181
- ```
182
-
183
- Either override goes in `[tool.uv.sources]` only — the PyPI-style
184
- `dependencies` entry above stays as-is, so removing the override is the
185
- only change needed once the SDK actually ships to PyPI.
162
+ `uv sync` in a freshly-copied plugin repo resolves this pin normally; no
163
+ `[tool.uv.sources]` override is needed. If you are developing this plugin
164
+ *inside* a `biffo-template` checkout (e.g. one you plan to upstream into
165
+ `services/`) and want to iterate against an unreleased SDK change before it
166
+ ships, a local override still works:
167
+
168
+ ```toml
169
+ [tool.uv.sources]
170
+ biffo-plugin-sdk = { path = "../../packages/python-sdk", editable = true }
171
+ ```
172
+
173
+ Keep it local (uncommitted, or removed before committing) — the PyPI-style
174
+ `dependencies` entry above is what every scaffolded plugin repo ships with.
186
175
 
187
176
  ## Manifest validation: why CI doesn't hard-gate on `registry-schema.json`
188
177
 
@@ -4,22 +4,14 @@ version = "0.1.0"
4
4
  description = "Example Biffo plugin — replace this with your own plugin's name and description"
5
5
  requires-python = ">=3.13"
6
6
  dependencies = [
7
- # biffo-plugin-sdk has a real release path as of biffo-template's
8
- # .github/workflows/publish-sdk.yml: the package is versioned 1.0.0 and
9
- # publishes to PyPI (via Trusted Publishing) when an `sdk-v*` tag is
10
- # pushed. This pin is therefore the *correct end state* and is left as-is.
11
- #
12
- # ORDERING: the pin only resolves once the owner has actually pushed
13
- # `sdk-v1.0.0` and PyPI has the release. Until that first publish,
14
- # `uv sync` in a freshly-copied plugin repo cannot resolve it — the same
15
- # as before this comment was written, so nothing regressed here; what
16
- # changed is that the fix is now one tag push away rather than unbuilt.
17
- # Deliberately NOT worked around with a git/path source in the committed
18
- # file: baking one in would mean every plugin repo forked from this
19
- # skeleton silently keeps building against a moving git ref long after
20
- # the real release exists. Use a local `[tool.uv.sources]` override until
21
- # then — see the README's "biffo-plugin-sdk dependency" section, which
22
- # documents both options and says which to delete once 1.0.0 is live.
7
+ # biffo-plugin-sdk has a real release path via biffo-template's
8
+ # .github/workflows/publish-sdk.yml: it publishes to PyPI (via Trusted
9
+ # Publishing) when an `sdk-v*` tag is pushed. That first publish has
10
+ # already happened — this skeleton's own uv.lock resolves biffo-plugin-sdk
11
+ # 1.4.0 from https://pypi.org/simple (see uv.lock's own `biffo-plugin-sdk`
12
+ # entry) — so `uv sync` in a freshly-copied plugin repo resolves this pin
13
+ # normally, with no `[tool.uv.sources]` override needed (biffo-template#1769
14
+ # side finding).
23
15
  "biffo-plugin-sdk>=1.0,<2.0",
24
16
  "aws-lambda-powertools[tracer]>=3.4.0",
25
17
  "httpx>=0.28.1",
package/dist/index.js CHANGED
@@ -8273,7 +8273,8 @@ import {
8273
8273
  import { dirname as dirname7, join as join26 } from "path";
8274
8274
  var STANDALONE_ONLY_ENTRIES = {
8275
8275
  ".github": "standalone-repo CI/release workflows \u2014 the host monorepo already runs lint/type/test/security over services/",
8276
- "registry-schema.json": "the plugin-registry publishing schema, used when submitting a *published* plugin to the registry repo, not by an in-tree plugin"
8276
+ "registry-schema.json": "the plugin-registry publishing schema, used when submitting a *published* plugin to the registry repo, not by an in-tree plugin",
8277
+ "uv.lock": "a standalone repo's own lockfile, substituted like any other text file (issue #1769) \u2014 a nested lock inside a monorepo's services/ would be wrong there, since the host resolves its own dependency tree"
8277
8278
  };
8278
8279
  var NEVER_COPY = /* @__PURE__ */ new Set([
8279
8280
  ".git",
@@ -8284,7 +8285,6 @@ var NEVER_COPY = /* @__PURE__ */ new Set([
8284
8285
  ".pytest_cache",
8285
8286
  ".mypy_cache",
8286
8287
  "dist",
8287
- "uv.lock",
8288
8288
  ".DS_Store"
8289
8289
  ]);
8290
8290
  var PLUGIN_NAME_PATTERN = /^[a-z][a-z0-9-]*$/;
@@ -8537,6 +8537,11 @@ async function runStandaloneCreate(names, options, deps) {
8537
8537
  `
8538
8538
  );
8539
8539
  if (options.commit) {
8540
+ if (!existsSync27(join27(destDir, "uv.lock"))) {
8541
+ throw new Error(
8542
+ `Scaffolded plugin at ${destDir} has no uv.lock. The standalone layout must carry a substituted uv.lock (see plugin-scaffold.ts STANDALONE_ONLY_ENTRIES) so the first commit's CI run can satisfy 'uv sync --locked'. Refusing to commit a repo that would ship red on its very first push (issue #1769) \u2014 run 'uv lock' in ${destDir} first.`
8543
+ );
8544
+ }
8540
8545
  await deps.git.init(destDir);
8541
8546
  await deps.git.add(destDir, ["."]);
8542
8547
  await deps.git.commit(destDir, `feat: scaffold ${names.slug} plugin`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@biffo/cli",
3
- "version": "0.303.3",
3
+ "version": "0.303.4",
4
4
  "description": "Biffo project scaffolding CLI",
5
5
  "license": "MIT",
6
6
  "type": "module",