@particle-academy/fancy-connector-core 0.5.0 → 0.6.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/CHANGELOG.md +46 -1
- package/README.md +7 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,46 @@ All notable changes to `fancy-connector-core` are documented here, in
|
|
|
6
6
|
**This package is pre-1.0, so breaking changes land in MINOR releases.** The
|
|
7
7
|
version number is not a promise it can keep yet; the entries below are.
|
|
8
8
|
|
|
9
|
+
## [0.6.0] - 2026-09-13
|
|
10
|
+
|
|
11
|
+
Additive only. **What a consumer must DO: nothing** — see each entry.
|
|
12
|
+
|
|
13
|
+
### Added
|
|
14
|
+
|
|
15
|
+
- **PHP: the exception a failed call throws now carries `attempts` and
|
|
16
|
+
`idempotent`**, as the TypeScript error has since 0.1.0. `attempts` is every
|
|
17
|
+
failed attempt of the call, in order, as `list<Attempt>`; `idempotent` is
|
|
18
|
+
what the call declared. Without them a PHP host could see *what* failed but
|
|
19
|
+
not whether a timeout went unretried because the connector is not idempotent
|
|
20
|
+
or was retried until the budget ran out — which is the difference between
|
|
21
|
+
*go and look* and *run it again*.
|
|
22
|
+
|
|
23
|
+
Both are `null` on any exception that did not end a call — one you construct
|
|
24
|
+
yourself, one from `HttpErrors::classify()`, and the classified exception
|
|
25
|
+
chained as `getPrevious()`. Deliberately not `[]` / `false`, which would
|
|
26
|
+
claim nothing was tried, or that the connector declared a retry unsafe.
|
|
27
|
+
TypeScript is unchanged: there they stay absent.
|
|
28
|
+
|
|
29
|
+
**What a consumer must DO: nothing.** Both are new trailing, optional
|
|
30
|
+
constructor parameters on `ConnectorException` and
|
|
31
|
+
`ConnectorRateLimitedException`, so existing `new …Exception(...)` calls,
|
|
32
|
+
positional or named, keep working. A subclass of `ConnectorException` that
|
|
33
|
+
declares its own constructor does not need to pass them.
|
|
34
|
+
|
|
35
|
+
### Changed
|
|
36
|
+
|
|
37
|
+
- **CI now runs `pint --test` on the PHP tree**, and the tree passes it. Pint
|
|
38
|
+
was already a dev dependency and `composer lint` already called it, but no
|
|
39
|
+
workflow did, so three files had drifted (`RenderRules.php`,
|
|
40
|
+
`ServiceDescriptor.php`, `Socialite/SocialiteBridge.php`) — formatting only,
|
|
41
|
+
no behaviour change.
|
|
42
|
+
- **Line endings are pinned to LF in `.gitattributes`.** A Windows clone with
|
|
43
|
+
`core.autocrlf=true` checked every file out as CRLF, which made `pint --test`
|
|
44
|
+
fail on nearly every PHP file locally while CI saw three, and made
|
|
45
|
+
`scripts/vendor.mjs` generate a `_connector/` copy whose bytes depended on
|
|
46
|
+
the machine it ran on. **What a consumer must DO: nothing** — the published
|
|
47
|
+
files were already LF; only a checkout of this repository changes.
|
|
48
|
+
|
|
9
49
|
## [0.5.0] - 2026-09-13
|
|
10
50
|
|
|
11
51
|
### Fixed
|
|
@@ -371,6 +411,11 @@ clock; this package is the runtime it is written on.
|
|
|
371
411
|
satisfies it with no dependency in either direction and a host that has never
|
|
372
412
|
heard of a workflow engine can implement it.
|
|
373
413
|
|
|
374
|
-
[Unreleased]: https://github.com/Particle-Academy/fancy-connector-core/compare/v0.
|
|
414
|
+
[Unreleased]: https://github.com/Particle-Academy/fancy-connector-core/compare/v0.6.0...HEAD
|
|
415
|
+
[0.6.0]: https://github.com/Particle-Academy/fancy-connector-core/compare/v0.5.0...v0.6.0
|
|
416
|
+
[0.5.0]: https://github.com/Particle-Academy/fancy-connector-core/compare/v0.4.0...v0.5.0
|
|
417
|
+
[0.4.0]: https://github.com/Particle-Academy/fancy-connector-core/compare/v0.3.1...v0.4.0
|
|
418
|
+
[0.3.1]: https://github.com/Particle-Academy/fancy-connector-core/compare/v0.3.0...v0.3.1
|
|
419
|
+
[0.3.0]: https://github.com/Particle-Academy/fancy-connector-core/compare/v0.2.0...v0.3.0
|
|
375
420
|
[0.2.0]: https://github.com/Particle-Academy/fancy-connector-core/compare/v0.1.0...v0.2.0
|
|
376
421
|
[0.1.0]: https://github.com/Particle-Academy/fancy-connector-core/releases/tag/v0.1.0
|
package/README.md
CHANGED
|
@@ -84,11 +84,17 @@ try {
|
|
|
84
84
|
error.kind; // the retry primitive
|
|
85
85
|
error.providerCode; // only where the service declared `providerCodeFrom`
|
|
86
86
|
error.cause; // the classified error; for a thrown transport, the original below it
|
|
87
|
+
// Set at runtime but not declared on the `ConnectorError` type, so read them
|
|
88
|
+
// through a narrowing of your own:
|
|
89
|
+
(error as { attempts?: Attempt[] }).attempts; // every failed attempt of the call, in order
|
|
90
|
+
(error as { idempotent?: boolean }).idempotent; // what the call declared — "never allowed to retry" vs "retries ran out"
|
|
87
91
|
}
|
|
88
92
|
```
|
|
89
93
|
|
|
90
94
|
PHP is the same: `ConnectorAuthException`, `->status`, `->providerCode`,
|
|
91
|
-
`->getPrevious()
|
|
95
|
+
`->getPrevious()`, `->attempts`, `->idempotent`. The last two are set only on the
|
|
96
|
+
error a call throws; anywhere else they are absent (TS) or `null` (PHP), never
|
|
97
|
+
`[]` or `false`. A provider's own error code is read only where its
|
|
92
98
|
`ServiceDescriptor` says where it lives (`providerCodeFrom`) — Bluesky's `error`
|
|
93
99
|
is a code and Mastodon's `error` is a sentence, so a guess would be wrong in the
|
|
94
100
|
most plausible way available.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@particle-academy/fancy-connector-core",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.0",
|
|
4
4
|
"description": "The runtime under every Fancy connector: modes and estates, connections, one call path, a failure taxonomy that separates \"it never arrived\" from \"nobody can tell\", deterministic fakers, webhook verification, pure versioned rendering, declared metric shapes, credential-free probes, and API-drift reporting. Owns the wire; never the gates.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|