@suss/extractor 0.5.7 → 0.5.8
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/dist/index.cjs +1 -1
- package/dist/index.d.cts +9 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.js +1 -1
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -969,7 +969,7 @@ var terminalConverters = {
|
|
|
969
969
|
return { type: "response", statusCode, body, headers: {} };
|
|
970
970
|
},
|
|
971
971
|
throw: (t) => {
|
|
972
|
-
if (t.statusCode) {
|
|
972
|
+
if (t.statusCode && t.producesResponse === true) {
|
|
973
973
|
const statusCode = t.statusCode.type === "literal" ? { type: "literal", value: t.statusCode.value } : { type: "unresolved", sourceText: t.statusCode.sourceText };
|
|
974
974
|
return {
|
|
975
975
|
type: "response",
|
package/dist/index.d.cts
CHANGED
|
@@ -922,6 +922,13 @@ interface TerminalPattern {
|
|
|
922
922
|
kind: "response" | "throw" | "return" | "render";
|
|
923
923
|
match: TerminalMatch;
|
|
924
924
|
extraction: TerminalExtraction;
|
|
925
|
+
/**
|
|
926
|
+
* On a throw terminal: the framework turns the thrown status into
|
|
927
|
+
* the wire response, so a resolved status makes the output a
|
|
928
|
+
* response. HTTP packs state this; a pack reading a non-HTTP code
|
|
929
|
+
* space off throws leaves it off and the throw stays a throw (#149).
|
|
930
|
+
*/
|
|
931
|
+
producesResponse?: boolean;
|
|
925
932
|
}
|
|
926
933
|
interface ContractPattern {
|
|
927
934
|
/** How to find the contract object. A contract is a data structure rather
|
|
@@ -1596,6 +1603,8 @@ interface RawTerminal {
|
|
|
1596
1603
|
} | null;
|
|
1597
1604
|
exceptionType: string | null;
|
|
1598
1605
|
message: string | null;
|
|
1606
|
+
/** Set on a throw whose pack declared the thrown status is the wire response. */
|
|
1607
|
+
producesResponse?: boolean;
|
|
1599
1608
|
component: string | null;
|
|
1600
1609
|
/** Null when the pack read only the root element name, not the tree under it. */
|
|
1601
1610
|
renderTree: RenderNode | null;
|
package/dist/index.d.ts
CHANGED
|
@@ -922,6 +922,13 @@ interface TerminalPattern {
|
|
|
922
922
|
kind: "response" | "throw" | "return" | "render";
|
|
923
923
|
match: TerminalMatch;
|
|
924
924
|
extraction: TerminalExtraction;
|
|
925
|
+
/**
|
|
926
|
+
* On a throw terminal: the framework turns the thrown status into
|
|
927
|
+
* the wire response, so a resolved status makes the output a
|
|
928
|
+
* response. HTTP packs state this; a pack reading a non-HTTP code
|
|
929
|
+
* space off throws leaves it off and the throw stays a throw (#149).
|
|
930
|
+
*/
|
|
931
|
+
producesResponse?: boolean;
|
|
925
932
|
}
|
|
926
933
|
interface ContractPattern {
|
|
927
934
|
/** How to find the contract object. A contract is a data structure rather
|
|
@@ -1596,6 +1603,8 @@ interface RawTerminal {
|
|
|
1596
1603
|
} | null;
|
|
1597
1604
|
exceptionType: string | null;
|
|
1598
1605
|
message: string | null;
|
|
1606
|
+
/** Set on a throw whose pack declared the thrown status is the wire response. */
|
|
1607
|
+
producesResponse?: boolean;
|
|
1599
1608
|
component: string | null;
|
|
1600
1609
|
/** Null when the pack read only the root element name, not the tree under it. */
|
|
1601
1610
|
renderTree: RenderNode | null;
|
package/dist/index.js
CHANGED
|
@@ -927,7 +927,7 @@ var terminalConverters = {
|
|
|
927
927
|
return { type: "response", statusCode, body, headers: {} };
|
|
928
928
|
},
|
|
929
929
|
throw: (t) => {
|
|
930
|
-
if (t.statusCode) {
|
|
930
|
+
if (t.statusCode && t.producesResponse === true) {
|
|
931
931
|
const statusCode = t.statusCode.type === "literal" ? { type: "literal", value: t.statusCode.value } : { type: "unresolved", sourceText: t.statusCode.sourceText };
|
|
932
932
|
return {
|
|
933
933
|
type: "response",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@suss/extractor",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.8",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Framework-agnostic extraction pipeline that turns raw extractions into suss behavioral summaries.",
|
|
6
6
|
"keywords": [
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
"typecheck": "tsc --noEmit"
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@suss/behavioral-ir": "0.5.
|
|
48
|
+
"@suss/behavioral-ir": "0.5.8"
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|
|
51
51
|
"tsup": "*",
|