@particle-academy/fancy-connector-core 0.6.0 → 0.6.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.
- package/CHANGELOG.md +31 -0
- package/README.md +8 -6
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +13 -0
- package/dist/index.d.ts +13 -0
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -1134,6 +1134,19 @@ declare class ConnectorError extends Error {
|
|
|
1134
1134
|
readonly operation: string;
|
|
1135
1135
|
readonly status?: number;
|
|
1136
1136
|
readonly providerCode?: string;
|
|
1137
|
+
/**
|
|
1138
|
+
* Every failed attempt of the call, in order. Set on the error a call throws
|
|
1139
|
+
* (`callConnector`), absent on one built anywhere else.
|
|
1140
|
+
*
|
|
1141
|
+
* `declare`, not a field: it is attached with `Object.defineProperty` when the
|
|
1142
|
+
* call gives up, so an error that did not end a call carries no such property.
|
|
1143
|
+
*/
|
|
1144
|
+
readonly attempts?: Attempt[];
|
|
1145
|
+
/**
|
|
1146
|
+
* What the call declared. With `attempts`, it separates "never allowed to
|
|
1147
|
+
* retry" from "retries ran out". Same presence rule as `attempts`.
|
|
1148
|
+
*/
|
|
1149
|
+
readonly idempotent?: boolean;
|
|
1137
1150
|
/**
|
|
1138
1151
|
* What kind of failure this is. The primitive every retry decision reads.
|
|
1139
1152
|
*
|
package/dist/index.d.ts
CHANGED
|
@@ -1134,6 +1134,19 @@ declare class ConnectorError extends Error {
|
|
|
1134
1134
|
readonly operation: string;
|
|
1135
1135
|
readonly status?: number;
|
|
1136
1136
|
readonly providerCode?: string;
|
|
1137
|
+
/**
|
|
1138
|
+
* Every failed attempt of the call, in order. Set on the error a call throws
|
|
1139
|
+
* (`callConnector`), absent on one built anywhere else.
|
|
1140
|
+
*
|
|
1141
|
+
* `declare`, not a field: it is attached with `Object.defineProperty` when the
|
|
1142
|
+
* call gives up, so an error that did not end a call carries no such property.
|
|
1143
|
+
*/
|
|
1144
|
+
readonly attempts?: Attempt[];
|
|
1145
|
+
/**
|
|
1146
|
+
* What the call declared. With `attempts`, it separates "never allowed to
|
|
1147
|
+
* retry" from "retries ran out". Same presence rule as `attempts`.
|
|
1148
|
+
*/
|
|
1149
|
+
readonly idempotent?: boolean;
|
|
1137
1150
|
/**
|
|
1138
1151
|
* What kind of failure this is. The primitive every retry decision reads.
|
|
1139
1152
|
*
|
package/dist/index.js
CHANGED
|
@@ -34,7 +34,7 @@ function assertConnectorApi(connectorId, declared) {
|
|
|
34
34
|
if (SUPPORTED_CONNECTOR_API.includes(declared)) return;
|
|
35
35
|
const supported = SUPPORTED_CONNECTOR_API.join(", ");
|
|
36
36
|
throw new ConnectorApiMismatch(
|
|
37
|
-
declared > CONNECTOR_API_VERSION ? `"${connectorId}" was written against connector API ${declared}, and this core implements ${supported}. The CONNECTOR is newer: upgrade @particle-academy/fancy-connector-core. Vendoring a connector ahead of the core it needs is the one direction that cannot be made to work by trying.` : `"${connectorId}" was written against connector API ${declared}, which is older than anything this core still runs (${supported}). The CONNECTOR is behind:
|
|
37
|
+
declared > CONNECTOR_API_VERSION ? `"${connectorId}" was written against connector API ${declared}, and this core implements ${supported}. The CONNECTOR is newer: upgrade @particle-academy/fancy-connector-core. Vendoring a connector ahead of the core it needs is the one direction that cannot be made to work by trying.` : `"${connectorId}" was written against connector API ${declared}, which is older than anything this core still runs (${supported}). The CONNECTOR is behind: move it to a release written for this core \u2014 upgrade its package (@particle-academy/${connectorId}-js, particle-academy/${connectorId}-php), or regenerate a vendored copy from that release; its CHANGELOG names the connector API each release targets. Nothing is adapted automatically, because guessing what a two-version-old connector meant is how a connector quietly starts doing something else.`,
|
|
38
38
|
connectorId,
|
|
39
39
|
declared
|
|
40
40
|
);
|