soustack 0.3.0 → 0.4.1

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.
Files changed (148) hide show
  1. package/README.md +44 -27
  2. package/dist/cli/index.js +5225 -992
  3. package/dist/cli/index.js.map +1 -1
  4. package/dist/index.d.mts +163 -91
  5. package/dist/index.d.ts +163 -91
  6. package/dist/index.js +5077 -1007
  7. package/dist/index.js.map +1 -1
  8. package/dist/index.mjs +5076 -1007
  9. package/dist/index.mjs.map +1 -1
  10. package/dist/{scrape.d.mts → scrape/index.d.mts} +88 -74
  11. package/dist/{scrape.d.ts → scrape/index.d.ts} +88 -74
  12. package/dist/{scrape.js → scrape/index.js} +255 -124
  13. package/dist/scrape/index.js.map +1 -0
  14. package/dist/{scrape.mjs → scrape/index.mjs} +255 -124
  15. package/dist/scrape/index.mjs.map +1 -0
  16. package/package.json +21 -9
  17. package/spec/.sync-meta.json +149 -0
  18. package/spec/SOUSTACK_SPEC_VERSION +1 -0
  19. package/spec/defs/common.schema.json +46 -0
  20. package/spec/defs/duration.schema.json +33 -0
  21. package/spec/defs/entities.schema.json +111 -0
  22. package/spec/defs/ingredientQuantified.schema.json +9 -0
  23. package/spec/defs/quantity.schema.json +16 -0
  24. package/spec/defs/scalingRule.schema.json +127 -0
  25. package/spec/defs/temperature.schema.json +63 -0
  26. package/spec/fixtures/content/illustrated-step.valid.json +24 -0
  27. package/spec/fixtures/invalid/equipment-unknown-reference.invalid.json +38 -0
  28. package/spec/fixtures/invalid/mise-en-place-unknown-equipment.invalid.json +37 -0
  29. package/spec/fixtures/invalid/mise-en-place-unknown-input.invalid.json +41 -0
  30. package/spec/fixtures/invalid/storage-leftovers-missing-method.invalid.json +31 -0
  31. package/spec/fixtures/invalid/storage-leftovers-wrong-type.invalid.json +23 -0
  32. package/spec/fixtures/level/base-full.valid.json +162 -0
  33. package/spec/fixtures/level/base-missing-yield.invalid.json +12 -0
  34. package/spec/fixtures/level/lite-min.valid.json +14 -0
  35. package/spec/fixtures/profile/profile-base.valid.json +20 -0
  36. package/spec/fixtures/profile/profile-equipped.valid.json +28 -0
  37. package/spec/fixtures/profile/profile-illustrated.valid.json +28 -0
  38. package/spec/fixtures/profile/profile-lite.valid.json +13 -0
  39. package/spec/fixtures/profile/profile-prepped.valid.json +31 -0
  40. package/spec/fixtures/profile/profile-scalable-missing-scaling.invalid.json +29 -0
  41. package/spec/fixtures/profile/profile-scalable.valid.json +49 -0
  42. package/spec/fixtures/profile/profile-timed-missing-structured.invalid.json +30 -0
  43. package/spec/fixtures/scaling/bakers-percent-missing-ref.invalid.json +41 -0
  44. package/spec/fixtures/scaling/bakers-percent.valid.json +51 -0
  45. package/spec/fixtures/scaling/discrete-range.invalid.json +36 -0
  46. package/spec/fixtures/scaling/missing-quantified.invalid.json +40 -0
  47. package/spec/fixtures/scaling/reject-bakersPercentage.invalid.json +50 -0
  48. package/spec/fixtures/stacks/compute-missing-timed.invalid.json +32 -0
  49. package/spec/fixtures/stacks/dietary-no-signal.invalid.json +16 -0
  50. package/spec/fixtures/stacks/illustrated-empty.invalid.json +13 -0
  51. package/spec/fixtures/stacks/quantified-string.invalid.json +22 -0
  52. package/spec/fixtures/stacks/referenced-missing-input.invalid.json +32 -0
  53. package/spec/fixtures/stacks/storage-min.valid.json +20 -0
  54. package/spec/fixtures/stacks/storage-no-duration.invalid.json +16 -0
  55. package/spec/fixtures/stacks/timed-implies-structured.valid.json +50 -0
  56. package/spec/fixtures/stacks/timed-range.invalid.json +33 -0
  57. package/spec/fixtures/valid/equipment-scaling-rules.valid.json +76 -0
  58. package/spec/fixtures/valid/equipment-strings.valid.json +31 -0
  59. package/spec/fixtures/valid/equipment-structured-uses.valid.json +47 -0
  60. package/spec/fixtures/valid/mise-en-place-basic.valid.json +31 -0
  61. package/spec/fixtures/valid/mise-en-place-referenced-equipment.valid.json +51 -0
  62. package/spec/fixtures/valid/prep-ingredient-strings.valid.json +48 -0
  63. package/spec/fixtures/valid/prep-ingredient-structured.valid.json +45 -0
  64. package/spec/fixtures/valid/profile-equipped.valid.json +29 -0
  65. package/spec/fixtures/valid/profile-prepped.valid.json +32 -0
  66. package/spec/fixtures/valid/quantified-nested-ingredient-sections.valid.json +61 -0
  67. package/spec/fixtures/valid/referenced-scaling.valid.json +67 -0
  68. package/spec/fixtures/valid/storage-leftovers-simple.valid.json +27 -0
  69. package/spec/fixtures/valid/storage-leftovers-structured.valid.json +43 -0
  70. package/spec/fixtures/valid/structured-nested-step-sections.valid.json +84 -0
  71. package/spec/schemas/stacks-registry.schema.json +108 -0
  72. package/spec/soustack.schema.json +2379 -0
  73. package/spec/stacks/compute.schema.json +7 -0
  74. package/spec/stacks/compute@1.md +22 -0
  75. package/spec/stacks/dietary.schema.json +45 -0
  76. package/spec/stacks/dietary@1.md +24 -0
  77. package/spec/stacks/equipment.schema.json +98 -0
  78. package/spec/stacks/equipment@1.md +244 -0
  79. package/spec/stacks/illustrated.schema.json +54 -0
  80. package/spec/stacks/illustrated@1.md +24 -0
  81. package/spec/stacks/prep.schema.json +76 -0
  82. package/spec/stacks/prep@1.md +276 -0
  83. package/spec/stacks/quantified.schema.json +74 -0
  84. package/spec/stacks/quantified@1.md +24 -0
  85. package/spec/stacks/referenced.schema.json +96 -0
  86. package/spec/stacks/referenced@1.md +23 -0
  87. package/spec/stacks/registry.json +112 -0
  88. package/spec/stacks/scaling.schema.json +99 -0
  89. package/spec/stacks/scaling@1.md +238 -0
  90. package/spec/stacks/storage.schema.json +132 -0
  91. package/spec/stacks/storage@1.md +256 -0
  92. package/spec/stacks/structured.schema.json +48 -0
  93. package/spec/stacks/structured@1.md +24 -0
  94. package/spec/stacks/substitutions.schema.json +43 -0
  95. package/spec/stacks/substitutions@1.md +24 -0
  96. package/spec/stacks/techniques.schema.json +28 -0
  97. package/spec/stacks/techniques@1.md +23 -0
  98. package/spec/stacks/timed.schema.json +60 -0
  99. package/spec/stacks/timed@1.md +23 -0
  100. package/src/defs/common.schema.json +46 -0
  101. package/src/defs/duration.schema.json +33 -0
  102. package/src/defs/entities.schema.json +111 -0
  103. package/src/defs/ingredientQuantified.schema.json +9 -0
  104. package/src/defs/quantity.schema.json +16 -0
  105. package/src/defs/scalingRule.schema.json +127 -0
  106. package/src/defs/temperature.schema.json +63 -0
  107. package/src/profiles/base.schema.json +2 -2
  108. package/src/profiles/equipped.schema.json +10 -0
  109. package/src/profiles/illustrated.schema.json +4 -4
  110. package/src/profiles/lite.schema.json +10 -0
  111. package/src/profiles/prepped.schema.json +10 -0
  112. package/src/profiles/scalable.schema.json +6 -6
  113. package/src/profiles/timed.schema.json +10 -0
  114. package/src/schema.json +2271 -248
  115. package/src/schemas/stacks-registry.schema.json +108 -0
  116. package/src/soustack.schema.json +2271 -248
  117. package/src/stacks/compute.schema.json +7 -0
  118. package/src/stacks/compute@1.md +22 -0
  119. package/src/stacks/dietary.schema.json +45 -0
  120. package/src/stacks/dietary@1.md +24 -0
  121. package/src/stacks/equipment.schema.json +98 -0
  122. package/src/stacks/equipment@1.md +244 -0
  123. package/src/stacks/illustrated.schema.json +54 -0
  124. package/src/stacks/illustrated@1.md +24 -0
  125. package/src/stacks/prep.schema.json +76 -0
  126. package/src/stacks/prep@1.md +276 -0
  127. package/src/stacks/quantified.schema.json +74 -0
  128. package/src/stacks/quantified@1.md +24 -0
  129. package/src/stacks/referenced.schema.json +96 -0
  130. package/src/stacks/referenced@1.md +23 -0
  131. package/src/stacks/registry.json +112 -0
  132. package/src/stacks/scaling.schema.json +99 -0
  133. package/src/stacks/scaling@1.md +238 -0
  134. package/src/stacks/storage.schema.json +132 -0
  135. package/src/stacks/storage@1.md +256 -0
  136. package/src/stacks/structured.schema.json +48 -0
  137. package/src/stacks/structured@1.md +24 -0
  138. package/src/stacks/substitutions.schema.json +43 -0
  139. package/src/stacks/substitutions@1.md +24 -0
  140. package/src/stacks/techniques.schema.json +28 -0
  141. package/src/stacks/techniques@1.md +23 -0
  142. package/src/stacks/timed.schema.json +60 -0
  143. package/src/stacks/timed@1.md +23 -0
  144. package/dist/scrape.js.map +0 -1
  145. package/dist/scrape.mjs.map +0 -1
  146. package/src/profiles/cookable.schema.json +0 -18
  147. package/src/profiles/quantified.schema.json +0 -43
  148. package/src/profiles/schedulable.schema.json +0 -43
@@ -0,0 +1,111 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://soustack.spec/defs/entities.schema.json",
4
+ "title": "Soustack entity bases",
5
+ "type": "object",
6
+ "$defs": {
7
+ "IngredientBase": {
8
+ "type": "object",
9
+ "properties": {
10
+ "id": { "type": "string" },
11
+ "name": { "type": "string" },
12
+ "quantity": { "$ref": "./quantity.schema.json" },
13
+ "temperature": { "$ref": "./temperature.schema.json" },
14
+ "notes": { "type": "string" },
15
+ "prep": {
16
+ "oneOf": [
17
+ { "type": "string", "minLength": 1 },
18
+ {
19
+ "type": "array",
20
+ "minItems": 1,
21
+ "items": {
22
+ "anyOf": [
23
+ { "type": "string", "minLength": 1 },
24
+ { "$ref": "../stacks/prep.schema.json#/$defs/prepItem" }
25
+ ]
26
+ }
27
+ }
28
+ ]
29
+ },
30
+ "metadata": { "type": "object", "additionalProperties": true },
31
+ "scaling": { "$ref": "./scalingRule.schema.json" }
32
+ },
33
+ "required": ["name"],
34
+ "additionalProperties": false,
35
+ "patternProperties": {
36
+ "^x-": { "$ref": "./common.schema.json#/properties/extensionLaneValue" }
37
+ }
38
+ },
39
+ "StepBase": {
40
+ "type": "object",
41
+ "properties": {
42
+ "id": { "type": "string" },
43
+ "text": { "type": "string" },
44
+ "dependsOn": {
45
+ "type": "array",
46
+ "items": { "type": "string" },
47
+ "uniqueItems": true
48
+ },
49
+ "inputs": {
50
+ "type": "array",
51
+ "items": { "type": "string" },
52
+ "uniqueItems": true
53
+ },
54
+ "techniqueIds": {
55
+ "type": "array",
56
+ "items": { "type": "string" },
57
+ "uniqueItems": true
58
+ },
59
+ "usesEquipment": {
60
+ "type": "array",
61
+ "items": {
62
+ "type": "string",
63
+ "pattern": "^[A-Za-z0-9._-]+$"
64
+ },
65
+ "uniqueItems": true
66
+ },
67
+ "temperature": { "$ref": "./temperature.schema.json" },
68
+ "timing": {
69
+ "type": "object",
70
+ "properties": {
71
+ "activity": { "type": "string", "enum": ["active", "passive"] },
72
+ "duration": {
73
+ "type": "object",
74
+ "oneOf": [
75
+ { "$ref": "./duration.schema.json#/properties/DurationMinutes" },
76
+ {
77
+ "type": "object",
78
+ "properties": {
79
+ "minMinutes": { "type": "number", "exclusiveMinimum": 0 },
80
+ "maxMinutes": { "type": "number", "exclusiveMinimum": 0 }
81
+ },
82
+ "required": ["minMinutes", "maxMinutes"],
83
+ "additionalProperties": false
84
+ }
85
+ ]
86
+ },
87
+ "completionCue": { "type": "string" },
88
+ "metadata": { "type": "object", "additionalProperties": true }
89
+ },
90
+ "anyOf": [
91
+ { "required": ["duration"] },
92
+ { "required": ["completionCue"] }
93
+ ],
94
+ "additionalProperties": false,
95
+ "patternProperties": {
96
+ "^x-": { "$ref": "./common.schema.json#/properties/extensionLaneValue" }
97
+ }
98
+ },
99
+ "images": { "type": "array", "items": { "$ref": "./common.schema.json#/properties/uri" } },
100
+ "videos": { "type": "array", "items": { "$ref": "./common.schema.json#/properties/uri" } },
101
+ "metadata": { "type": "object", "additionalProperties": true }
102
+ },
103
+ "required": ["text"],
104
+ "additionalProperties": false,
105
+ "patternProperties": {
106
+ "^x-": { "$ref": "./common.schema.json#/properties/extensionLaneValue" }
107
+ }
108
+ }
109
+ },
110
+ "additionalProperties": false
111
+ }
@@ -0,0 +1,9 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://soustack.spec/defs/ingredientQuantified.schema.json",
4
+ "title": "Quantified Ingredient",
5
+ "allOf": [
6
+ { "$ref": "./entities.schema.json#/$defs/IngredientBase" },
7
+ { "required": ["id", "quantity"] }
8
+ ]
9
+ }
@@ -0,0 +1,16 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://soustack.spec/defs/quantity.schema.json",
4
+ "title": "Quantity",
5
+ "type": "object",
6
+ "properties": {
7
+ "amount": { "type": "number" },
8
+ "unit": { "type": "string", "minLength": 1 },
9
+ "metadata": { "type": "object", "additionalProperties": true }
10
+ },
11
+ "required": ["amount", "unit"],
12
+ "additionalProperties": false,
13
+ "patternProperties": {
14
+ "^x-": { "$ref": "./common.schema.json#/properties/extensionLaneValue" }
15
+ }
16
+ }
@@ -0,0 +1,127 @@
1
+ {
2
+ "$id": "https://soustack.spec/defs/scalingRule.schema.json",
3
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
4
+ "title": "Soustack ScalingRule",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": ["mode"],
8
+ "properties": {
9
+ "mode": {
10
+ "type": "string",
11
+ "enum": ["linear", "fixed", "discrete", "toTaste", "bakersPercent"]
12
+ },
13
+
14
+ "step": {
15
+ "type": "number",
16
+ "exclusiveMinimum": 0
17
+ },
18
+ "rounding": {
19
+ "type": "string",
20
+ "enum": ["nearest", "ceil", "floor"]
21
+ },
22
+ "min": {
23
+ "type": "number"
24
+ },
25
+ "max": {
26
+ "type": "number"
27
+ },
28
+
29
+ "percent": {
30
+ "type": "number",
31
+ "exclusiveMinimum": 0
32
+ },
33
+ "of": {
34
+ "type": "string",
35
+ "minLength": 1
36
+ }
37
+
38
+ },
39
+
40
+ "allOf": [
41
+ {
42
+ "if": {
43
+ "properties": { "mode": { "const": "linear" } },
44
+ "required": ["mode"]
45
+ },
46
+ "then": {
47
+ "not": {
48
+ "anyOf": [
49
+ { "required": ["step"] },
50
+ { "required": ["rounding"] },
51
+ { "required": ["min"] },
52
+ { "required": ["max"] },
53
+ { "required": ["percent"] },
54
+ { "required": ["of"] }
55
+ ]
56
+ }
57
+ }
58
+ },
59
+ {
60
+ "if": {
61
+ "properties": { "mode": { "const": "fixed" } },
62
+ "required": ["mode"]
63
+ },
64
+ "then": {
65
+ "not": {
66
+ "anyOf": [
67
+ { "required": ["step"] },
68
+ { "required": ["rounding"] },
69
+ { "required": ["min"] },
70
+ { "required": ["max"] },
71
+ { "required": ["percent"] },
72
+ { "required": ["of"] }
73
+ ]
74
+ }
75
+ }
76
+ },
77
+ {
78
+ "if": {
79
+ "properties": { "mode": { "const": "toTaste" } },
80
+ "required": ["mode"]
81
+ },
82
+ "then": {
83
+ "not": {
84
+ "anyOf": [
85
+ { "required": ["step"] },
86
+ { "required": ["rounding"] },
87
+ { "required": ["min"] },
88
+ { "required": ["max"] },
89
+ { "required": ["percent"] },
90
+ { "required": ["of"] }
91
+ ]
92
+ }
93
+ }
94
+ },
95
+ {
96
+ "if": {
97
+ "properties": { "mode": { "const": "discrete" } },
98
+ "required": ["mode"]
99
+ },
100
+ "then": {
101
+ "not": {
102
+ "anyOf": [
103
+ { "required": ["percent"] },
104
+ { "required": ["of"] }
105
+ ]
106
+ }
107
+ }
108
+ },
109
+ {
110
+ "if": {
111
+ "properties": { "mode": { "const": "bakersPercent" } },
112
+ "required": ["mode"]
113
+ },
114
+ "then": {
115
+ "required": ["percent", "of"],
116
+ "not": {
117
+ "anyOf": [
118
+ { "required": ["step"] },
119
+ { "required": ["rounding"] },
120
+ { "required": ["min"] },
121
+ { "required": ["max"] }
122
+ ]
123
+ }
124
+ }
125
+ }
126
+ ]
127
+ }
@@ -0,0 +1,63 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://soustack.spec/defs/temperature.schema.json",
4
+ "title": "Temperature",
5
+ "type": "object",
6
+ "oneOf": [
7
+ {
8
+ "type": "object",
9
+ "properties": {
10
+ "target": {
11
+ "type": "string",
12
+ "enum": ["oven", "stovetop", "pan", "oil", "water", "grill", "broiler", "internal", "ambient", "surface"]
13
+ },
14
+ "level": {
15
+ "type": "string",
16
+ "enum": ["veryLow", "low", "medium", "mediumHigh", "high", "veryHigh"]
17
+ },
18
+ "metadata": { "type": "object", "additionalProperties": true }
19
+ },
20
+ "required": ["target", "level"],
21
+ "additionalProperties": false,
22
+ "patternProperties": {
23
+ "^x-": { "$ref": "./common.schema.json#/properties/extensionLaneValue" }
24
+ }
25
+ },
26
+ {
27
+ "type": "object",
28
+ "properties": {
29
+ "target": {
30
+ "type": "string",
31
+ "enum": ["oven", "stovetop", "pan", "oil", "water", "grill", "broiler", "internal", "ambient", "surface"]
32
+ },
33
+ "unit": { "type": "string", "enum": ["celsius", "fahrenheit"] },
34
+ "value": { "type": "number" },
35
+ "approximate": { "type": "boolean" },
36
+ "metadata": { "type": "object", "additionalProperties": true }
37
+ },
38
+ "required": ["target", "unit", "value"],
39
+ "additionalProperties": false,
40
+ "patternProperties": {
41
+ "^x-": { "$ref": "./common.schema.json#/properties/extensionLaneValue" }
42
+ }
43
+ },
44
+ {
45
+ "type": "object",
46
+ "properties": {
47
+ "target": {
48
+ "type": "string",
49
+ "enum": ["oven", "stovetop", "pan", "oil", "water", "grill", "broiler", "internal", "ambient", "surface"]
50
+ },
51
+ "unit": { "type": "string", "enum": ["celsius", "fahrenheit"] },
52
+ "minValue": { "type": "number" },
53
+ "maxValue": { "type": "number" },
54
+ "metadata": { "type": "object", "additionalProperties": true }
55
+ },
56
+ "required": ["target", "unit", "minValue", "maxValue"],
57
+ "additionalProperties": false,
58
+ "patternProperties": {
59
+ "^x-": { "$ref": "./common.schema.json#/properties/extensionLaneValue" }
60
+ }
61
+ }
62
+ ]
63
+ }
@@ -0,0 +1,24 @@
1
+ {
2
+ "$schema": "https://soustack.spec/soustack.schema.json",
3
+ "stacks": {
4
+ "structured": 1,
5
+ "illustrated": 1
6
+ },
7
+ "name": "Picture Smoothie",
8
+ "ingredients": [
9
+ "fruit",
10
+ "yogurt"
11
+ ],
12
+ "instructions": [
13
+ {
14
+ "id": "s1",
15
+ "text": "blend",
16
+ "images": [
17
+ "http://example.com/blend.jpg"
18
+ ]
19
+ }
20
+ ],
21
+ "images": [
22
+ "http://example.com/cover2.jpg"
23
+ ]
24
+ }
@@ -0,0 +1,38 @@
1
+ {
2
+ "$schema": "https://soustack.spec/soustack.schema.json",
3
+ "stacks": {
4
+ "equipment": 1,
5
+ "structured": 1
6
+ },
7
+ "name": "Recipe with Invalid Equipment Reference",
8
+ "yield": {
9
+ "amount": 1,
10
+ "unit": "serving"
11
+ },
12
+ "time": {
13
+ "total": {
14
+ "minutes": 30
15
+ }
16
+ },
17
+ "equipment": [
18
+ {
19
+ "id": "skillet",
20
+ "name": "8-inch skillet"
21
+ }
22
+ ],
23
+ "ingredients": [
24
+ {
25
+ "id": "meat",
26
+ "name": "Meat"
27
+ }
28
+ ],
29
+ "instructions": [
30
+ {
31
+ "id": "sear",
32
+ "text": "Sear the meat",
33
+ "usesEquipment": [
34
+ "nonexistent"
35
+ ]
36
+ }
37
+ ]
38
+ }
@@ -0,0 +1,37 @@
1
+ {
2
+ "$schema": "https://soustack.spec/soustack.schema.json",
3
+ "stacks": {
4
+ "prep": 1,
5
+ "equipment": 1
6
+ },
7
+ "name": "Recipe with Unknown Equipment Reference",
8
+ "yield": {
9
+ "amount": 1,
10
+ "unit": "serving"
11
+ },
12
+ "time": {
13
+ "total": {
14
+ "minutes": 30
15
+ }
16
+ },
17
+ "equipment": [
18
+ {
19
+ "id": "knife",
20
+ "name": "Chef's knife"
21
+ }
22
+ ],
23
+ "ingredients": [
24
+ "onion"
25
+ ],
26
+ "instructions": [
27
+ "Cook"
28
+ ],
29
+ "miseEnPlace": [
30
+ {
31
+ "text": "Use the missing equipment",
32
+ "usesEquipment": [
33
+ "missing-equipment"
34
+ ]
35
+ }
36
+ ]
37
+ }
@@ -0,0 +1,41 @@
1
+ {
2
+ "$schema": "https://soustack.spec/soustack.schema.json",
3
+ "stacks": {
4
+ "prep": 1,
5
+ "referenced": 1,
6
+ "structured": 1
7
+ },
8
+ "name": "Recipe with Unknown Input Reference",
9
+ "yield": {
10
+ "amount": 1,
11
+ "unit": "serving"
12
+ },
13
+ "time": {
14
+ "total": {
15
+ "minutes": 30
16
+ }
17
+ },
18
+ "ingredients": [
19
+ {
20
+ "id": "onion",
21
+ "name": "Onion"
22
+ }
23
+ ],
24
+ "instructions": [
25
+ {
26
+ "id": "cook",
27
+ "text": "Cook",
28
+ "inputs": [
29
+ "onion"
30
+ ]
31
+ }
32
+ ],
33
+ "miseEnPlace": [
34
+ {
35
+ "text": "Prepare the missing ingredient",
36
+ "inputs": [
37
+ "missing-ingredient"
38
+ ]
39
+ }
40
+ ]
41
+ }
@@ -0,0 +1,31 @@
1
+ {
2
+ "$schema": "https://soustack.spec/soustack.schema.json",
3
+ "stacks": {
4
+ "storage": 1
5
+ },
6
+ "name": "Recipe with Invalid Reheat Instruction",
7
+ "ingredients": [
8
+ "food"
9
+ ],
10
+ "instructions": [
11
+ "Cook the food"
12
+ ],
13
+ "storage": {
14
+ "refrigerated": {
15
+ "duration": {
16
+ "iso8601": "P3D"
17
+ }
18
+ },
19
+ "leftovers": {
20
+ "reheat": [
21
+ {
22
+ "duration": {
23
+ "minMinutes": 2,
24
+ "maxMinutes": 3
25
+ },
26
+ "notes": "Missing required method field"
27
+ }
28
+ ]
29
+ }
30
+ }
31
+ }
@@ -0,0 +1,23 @@
1
+ {
2
+ "$schema": "https://soustack.spec/soustack.schema.json",
3
+ "stacks": {
4
+ "storage": 1
5
+ },
6
+ "name": "Recipe with Wrong Reheat Type",
7
+ "ingredients": [
8
+ "food"
9
+ ],
10
+ "instructions": [
11
+ "Cook the food"
12
+ ],
13
+ "storage": {
14
+ "refrigerated": {
15
+ "duration": {
16
+ "iso8601": "P3D"
17
+ }
18
+ },
19
+ "leftovers": {
20
+ "reheat": "Microwave 2\u20133 minutes"
21
+ }
22
+ }
23
+ }
@@ -0,0 +1,162 @@
1
+ {
2
+ "$schema": "https://soustack.spec/soustack.schema.json",
3
+ "profile": "base",
4
+ "stacks": {
5
+ "quantified": 1,
6
+ "structured": 1,
7
+ "timed": 1,
8
+ "referenced": 1,
9
+ "compute": 1,
10
+ "storage": 1,
11
+ "dietary": 1,
12
+ "substitutions": 1,
13
+ "techniques": 1,
14
+ "illustrated": 1
15
+ },
16
+ "name": "Garlic Pasta",
17
+ "yield": {
18
+ "amount": 4,
19
+ "unit": "servings"
20
+ },
21
+ "time": {
22
+ "total": {
23
+ "minutes": 45
24
+ }
25
+ },
26
+ "ingredients": [
27
+ {
28
+ "id": "i1",
29
+ "name": "pasta",
30
+ "quantity": {
31
+ "amount": 500,
32
+ "unit": "g"
33
+ }
34
+ },
35
+ {
36
+ "id": "i2",
37
+ "name": "garlic",
38
+ "quantity": {
39
+ "amount": 4,
40
+ "unit": "clove"
41
+ }
42
+ }
43
+ ],
44
+ "instructions": [
45
+ {
46
+ "id": "s1",
47
+ "text": "Boil water",
48
+ "timing": {
49
+ "activity": "active",
50
+ "duration": {
51
+ "minutes": 10
52
+ }
53
+ },
54
+ "inputs": [
55
+ "i1"
56
+ ],
57
+ "techniqueIds": [
58
+ "t1"
59
+ ],
60
+ "images": [
61
+ "http://example.com/step1.jpg"
62
+ ]
63
+ },
64
+ {
65
+ "id": "s2",
66
+ "text": "Cook pasta",
67
+ "timing": {
68
+ "activity": "active",
69
+ "duration": {
70
+ "minMinutes": 8,
71
+ "maxMinutes": 10
72
+ }
73
+ },
74
+ "dependsOn": [
75
+ "s1"
76
+ ],
77
+ "inputs": [
78
+ "i1"
79
+ ],
80
+ "techniqueIds": [
81
+ "t2"
82
+ ],
83
+ "temperature": {
84
+ "target": "water",
85
+ "level": "high"
86
+ },
87
+ "videos": [
88
+ "http://example.com/v1.mp4"
89
+ ]
90
+ },
91
+ {
92
+ "id": "s3",
93
+ "text": "Saute garlic",
94
+ "timing": {
95
+ "activity": "active",
96
+ "duration": {
97
+ "minutes": 5
98
+ },
99
+ "completionCue": "fragrant"
100
+ },
101
+ "dependsOn": [
102
+ "s2"
103
+ ],
104
+ "inputs": [
105
+ "i2"
106
+ ],
107
+ "techniqueIds": [
108
+ "t1",
109
+ "t3"
110
+ ],
111
+ "temperature": {
112
+ "target": "stovetop",
113
+ "level": "medium"
114
+ }
115
+ }
116
+ ],
117
+ "images": [
118
+ "http://example.com/cover.jpg"
119
+ ],
120
+ "videos": [
121
+ "http://example.com/cover.mp4"
122
+ ],
123
+ "dietary": {
124
+ "basis": "perServing",
125
+ "calories": 400,
126
+ "diets": [
127
+ "vegetarian"
128
+ ]
129
+ },
130
+ "storage": {
131
+ "refrigerated": {
132
+ "duration": {
133
+ "iso8601": "P2D"
134
+ }
135
+ }
136
+ },
137
+ "substitutions": [
138
+ {
139
+ "for": "garlic",
140
+ "alternatives": [
141
+ {
142
+ "name": "shallot",
143
+ "ratio": "1:1"
144
+ }
145
+ ]
146
+ }
147
+ ],
148
+ "techniques": [
149
+ {
150
+ "id": "t1",
151
+ "name": "Boil"
152
+ },
153
+ {
154
+ "id": "t2",
155
+ "name": "Simmer"
156
+ },
157
+ {
158
+ "id": "t3",
159
+ "name": "Saute"
160
+ }
161
+ ]
162
+ }