1819 lines
38 KiB
Text
1819 lines
38 KiB
Text
// Bun Snapshot v1, https://bun.sh/docs/test/snapshots
|
|
|
|
exports[`Compiler Snapshots should compile with_warnings.gram correctly 1`] = `
|
|
{
|
|
"cookware": [],
|
|
"meta": {
|
|
"title": "Recipe with ALL warnings",
|
|
},
|
|
"metrics": {
|
|
"activeBreakdown": [
|
|
{
|
|
"duration": 14,
|
|
"label": "section_active:Business Errors",
|
|
},
|
|
{
|
|
"duration": 2,
|
|
"label": "section_active:Scope Conflict",
|
|
},
|
|
],
|
|
"activeTime": 16,
|
|
"idleTime": 0,
|
|
"prepBreakdown": [
|
|
{
|
|
"duration": 5,
|
|
"label": "ingredients_overhead",
|
|
},
|
|
],
|
|
"preparationTime": 5,
|
|
"totalBreakdown": [
|
|
{
|
|
"duration": 14,
|
|
"label": "section_active:Business Errors",
|
|
},
|
|
{
|
|
"duration": 2,
|
|
"label": "section_active:Scope Conflict",
|
|
},
|
|
],
|
|
"totalTime": 21,
|
|
},
|
|
"miseEnPlace": [
|
|
{
|
|
"duration": 5,
|
|
"items": [
|
|
{
|
|
"count": 5,
|
|
"duration": 5,
|
|
"intermediates": 1,
|
|
"kind": "gather",
|
|
"target": "ingredient",
|
|
},
|
|
],
|
|
"section": 0,
|
|
},
|
|
],
|
|
"registry": {
|
|
"cookware": {},
|
|
"ingredients": {
|
|
"absurd": {
|
|
"default_unit": "g",
|
|
"id": "absurd",
|
|
"name": "absurd",
|
|
},
|
|
"dup": {
|
|
"id": "dup",
|
|
"is_intermediate": true,
|
|
"name": "dup",
|
|
},
|
|
"ghost-var": {
|
|
"default_unit": "g",
|
|
"id": "ghost-var",
|
|
"name": "ghost_var",
|
|
},
|
|
"salt": {
|
|
"id": "salt",
|
|
"name": "salt",
|
|
},
|
|
"sugar": {
|
|
"id": "sugar",
|
|
"name": "sugar",
|
|
},
|
|
},
|
|
},
|
|
"schedule": {
|
|
"activeTime": 16,
|
|
"blocks": [
|
|
{
|
|
"end": 5,
|
|
"kind": "prep",
|
|
"section": 0,
|
|
"start": 0,
|
|
"task": "s0.prep",
|
|
},
|
|
{
|
|
"end": 7,
|
|
"kind": "step",
|
|
"section": 0,
|
|
"start": 5,
|
|
"step": 0,
|
|
"task": "s0.0",
|
|
},
|
|
{
|
|
"end": 9,
|
|
"kind": "step",
|
|
"section": 0,
|
|
"start": 7,
|
|
"step": 1,
|
|
"task": "s0.1",
|
|
},
|
|
{
|
|
"end": 11,
|
|
"kind": "step",
|
|
"section": 0,
|
|
"start": 9,
|
|
"step": 2,
|
|
"task": "s0.2",
|
|
},
|
|
{
|
|
"end": 13,
|
|
"kind": "step",
|
|
"section": 0,
|
|
"start": 11,
|
|
"step": 3,
|
|
"task": "s0.3",
|
|
},
|
|
{
|
|
"end": 15,
|
|
"kind": "step",
|
|
"section": 0,
|
|
"start": 13,
|
|
"step": 4,
|
|
"task": "s0.4",
|
|
},
|
|
{
|
|
"end": 17,
|
|
"kind": "step",
|
|
"section": 0,
|
|
"start": 15,
|
|
"step": 5,
|
|
"task": "s0.5",
|
|
},
|
|
{
|
|
"end": 19,
|
|
"kind": "step",
|
|
"section": 0,
|
|
"start": 17,
|
|
"step": 6,
|
|
"task": "s0.6",
|
|
},
|
|
{
|
|
"end": 21,
|
|
"kind": "step",
|
|
"section": 1,
|
|
"start": 19,
|
|
"step": 0,
|
|
"task": "s1.0",
|
|
},
|
|
],
|
|
"days": [
|
|
{
|
|
"day": 0,
|
|
"end": 21,
|
|
"sections": [
|
|
0,
|
|
1,
|
|
],
|
|
"start": 0,
|
|
},
|
|
],
|
|
"idleTime": 0,
|
|
"miseEnPlace": "perSection",
|
|
"preparationTime": 5,
|
|
"rests": "shortest",
|
|
"totalTime": 21,
|
|
},
|
|
"sections": [
|
|
{
|
|
"cookware": [],
|
|
"ingredients": [
|
|
{
|
|
"_usageId": "1",
|
|
"id": "ghost-step",
|
|
"name": "ghost_step",
|
|
"type": "reference",
|
|
},
|
|
{
|
|
"_usageId": "2",
|
|
"id": "ghost-var",
|
|
"modifiers": [
|
|
"reference",
|
|
],
|
|
"qty": 10,
|
|
"unit": "g",
|
|
},
|
|
{
|
|
"_usageId": "3",
|
|
"id": "absurd",
|
|
"modifiers": [
|
|
"optional",
|
|
"bakers_percentage",
|
|
],
|
|
"qty": 10,
|
|
"unit": "g",
|
|
},
|
|
{
|
|
"_usageId": "4",
|
|
"dependencies": [
|
|
"flour",
|
|
],
|
|
"formula": {
|
|
"isGhost": true,
|
|
"percent": 50,
|
|
"raw": "50% of flour",
|
|
"target": "flour",
|
|
},
|
|
"id": "sugar",
|
|
"qty": {
|
|
"loc": {
|
|
"end": 293,
|
|
"start": 282,
|
|
},
|
|
"percent": 50,
|
|
"referenceType": "ingredient",
|
|
"target": "flour",
|
|
"type": "RelativeQuantity",
|
|
},
|
|
},
|
|
{
|
|
"_usageId": "5",
|
|
"dependencies": [
|
|
"salt",
|
|
],
|
|
"formula": {
|
|
"isGhost": true,
|
|
"percent": 10,
|
|
"raw": "10% of salt",
|
|
"target": "salt",
|
|
},
|
|
"id": "salt",
|
|
"isCircular": true,
|
|
"qty": {
|
|
"loc": {
|
|
"end": 340,
|
|
"start": 330,
|
|
},
|
|
"percent": 10,
|
|
"referenceType": "ingredient",
|
|
"target": "salt",
|
|
"type": "RelativeQuantity",
|
|
},
|
|
},
|
|
],
|
|
"intermediate_preparation": "dup",
|
|
"steps": [
|
|
{
|
|
"content": [
|
|
"We will use a step reference that does not exist: ",
|
|
{
|
|
"_usageId": "1",
|
|
"id": "ghost-step",
|
|
"name": "ghost_step",
|
|
"type": "reference",
|
|
},
|
|
],
|
|
"timings": {
|
|
"activeDuration": 2,
|
|
"end": 2,
|
|
"start": 0,
|
|
},
|
|
"type": "step",
|
|
},
|
|
{
|
|
"content": [
|
|
"And an undeclared ingredient variable: ",
|
|
{
|
|
"_usageId": "2",
|
|
"id": "ghost-var",
|
|
"modifiers": [
|
|
"reference",
|
|
],
|
|
"qty": 10,
|
|
"unit": "g",
|
|
},
|
|
],
|
|
"timings": {
|
|
"activeDuration": 2,
|
|
"end": 4,
|
|
"start": 2,
|
|
},
|
|
"type": "step",
|
|
},
|
|
{
|
|
"content": [
|
|
"Invalid modifier combination: ",
|
|
{
|
|
"_usageId": "3",
|
|
"id": "absurd",
|
|
"modifiers": [
|
|
"optional",
|
|
"bakers_percentage",
|
|
],
|
|
"qty": 10,
|
|
"unit": "g",
|
|
},
|
|
],
|
|
"timings": {
|
|
"activeDuration": 2,
|
|
"end": 6,
|
|
"start": 4,
|
|
},
|
|
"type": "step",
|
|
},
|
|
{
|
|
"content": [
|
|
"Relative quantity pointing to nothing: ",
|
|
{
|
|
"_usageId": "4",
|
|
"dependencies": [
|
|
"flour",
|
|
],
|
|
"formula": {
|
|
"isGhost": true,
|
|
"percent": 50,
|
|
"raw": "50% of flour",
|
|
"target": "flour",
|
|
},
|
|
"id": "sugar",
|
|
"qty": {
|
|
"loc": {
|
|
"end": 293,
|
|
"start": 282,
|
|
},
|
|
"percent": 50,
|
|
"referenceType": "ingredient",
|
|
"target": "flour",
|
|
"type": "RelativeQuantity",
|
|
},
|
|
},
|
|
],
|
|
"timings": {
|
|
"activeDuration": 2,
|
|
"end": 8,
|
|
"start": 6,
|
|
},
|
|
"type": "step",
|
|
},
|
|
{
|
|
"content": [
|
|
"Circular relative quantity: ",
|
|
{
|
|
"_usageId": "5",
|
|
"dependencies": [
|
|
"salt",
|
|
],
|
|
"formula": {
|
|
"isGhost": true,
|
|
"percent": 10,
|
|
"raw": "10% of salt",
|
|
"target": "salt",
|
|
},
|
|
"id": "salt",
|
|
"isCircular": true,
|
|
"qty": {
|
|
"loc": {
|
|
"end": 340,
|
|
"start": 330,
|
|
},
|
|
"percent": 10,
|
|
"referenceType": "ingredient",
|
|
"target": "salt",
|
|
"type": "RelativeQuantity",
|
|
},
|
|
},
|
|
],
|
|
"timings": {
|
|
"activeDuration": 2,
|
|
"end": 10,
|
|
"start": 8,
|
|
},
|
|
"type": "step",
|
|
},
|
|
{
|
|
"content": [
|
|
"Timer missing unit: ",
|
|
{
|
|
"name": "timer",
|
|
"raw": "10",
|
|
"type": "timer",
|
|
},
|
|
],
|
|
"timings": {
|
|
"activeDuration": 2,
|
|
"end": 12,
|
|
"start": 10,
|
|
},
|
|
"type": "step",
|
|
},
|
|
{
|
|
"content": [
|
|
"Temperature missing unit: ",
|
|
{
|
|
"quantity": {
|
|
"text": "180",
|
|
"type": "single",
|
|
"value": 180,
|
|
},
|
|
"type": "temperature",
|
|
},
|
|
],
|
|
"timings": {
|
|
"activeDuration": 2,
|
|
"end": 14,
|
|
"start": 12,
|
|
},
|
|
"type": "step",
|
|
},
|
|
],
|
|
"title": "Business Errors",
|
|
},
|
|
{
|
|
"cookware": [],
|
|
"ingredients": [],
|
|
"intermediate_preparation": "dup",
|
|
"steps": [
|
|
{
|
|
"content": [
|
|
"This section re-declares the same output variable 'dup', which should trigger a SCOPE_CONFLICT.",
|
|
],
|
|
"timings": {
|
|
"activeDuration": 2,
|
|
"end": 16,
|
|
"start": 14,
|
|
},
|
|
"type": "step",
|
|
},
|
|
],
|
|
"title": "Scope Conflict",
|
|
},
|
|
],
|
|
"shopping_list": [
|
|
{
|
|
"_usageIds": [
|
|
"2",
|
|
],
|
|
"id": "ghost-var",
|
|
"modifiers": [
|
|
"reference",
|
|
],
|
|
"name": "ghost_var",
|
|
"qty": 10,
|
|
"unit": "g",
|
|
},
|
|
{
|
|
"_usageIds": [
|
|
"3",
|
|
],
|
|
"id": "absurd",
|
|
"modifiers": [
|
|
"optional",
|
|
"bakers_percentage",
|
|
],
|
|
"name": "absurd",
|
|
"qty": 10,
|
|
"unit": "g",
|
|
},
|
|
{
|
|
"_usageIds": [
|
|
"4",
|
|
],
|
|
"id": "sugar",
|
|
"name": "sugar",
|
|
"relative": true,
|
|
"variable_entries": [
|
|
"(50% of flour ❓)",
|
|
],
|
|
},
|
|
{
|
|
"_usageIds": [
|
|
"5",
|
|
],
|
|
"id": "salt",
|
|
"name": "salt",
|
|
"relative": true,
|
|
"variable_entries": [
|
|
"(10% of salt ❓)",
|
|
],
|
|
},
|
|
],
|
|
"slug": "recipe-with-all-warnings",
|
|
"tasks": {
|
|
"sections": [
|
|
{
|
|
"day": 0,
|
|
"intermediate": "dup",
|
|
},
|
|
{
|
|
"day": 0,
|
|
"intermediate": "dup",
|
|
},
|
|
],
|
|
"tasks": [
|
|
{
|
|
"after": [],
|
|
"duration": {
|
|
"nominal": 4,
|
|
},
|
|
"id": "s0.prep",
|
|
"items": [
|
|
{
|
|
"count": 4,
|
|
"duration": 4,
|
|
"kind": "gather",
|
|
"target": "ingredient",
|
|
},
|
|
],
|
|
"kind": "prep",
|
|
"section": 0,
|
|
},
|
|
{
|
|
"after": [
|
|
"s0.6",
|
|
],
|
|
"duration": {
|
|
"nominal": 1,
|
|
},
|
|
"id": "s0.prep.dup",
|
|
"intermediate": "dup",
|
|
"items": [
|
|
{
|
|
"count": 1,
|
|
"duration": 1,
|
|
"intermediates": 1,
|
|
"kind": "gather",
|
|
"target": "ingredient",
|
|
},
|
|
],
|
|
"kind": "prep",
|
|
"section": 0,
|
|
},
|
|
{
|
|
"after": [],
|
|
"consumes": [
|
|
"ghost-step",
|
|
],
|
|
"duration": {
|
|
"nominal": 2,
|
|
},
|
|
"id": "s0.0",
|
|
"kind": "step",
|
|
"section": 0,
|
|
"step": 0,
|
|
},
|
|
{
|
|
"after": [
|
|
"s0.0",
|
|
],
|
|
"duration": {
|
|
"nominal": 2,
|
|
},
|
|
"id": "s0.1",
|
|
"kind": "step",
|
|
"section": 0,
|
|
"step": 1,
|
|
},
|
|
{
|
|
"after": [
|
|
"s0.1",
|
|
],
|
|
"duration": {
|
|
"nominal": 2,
|
|
},
|
|
"id": "s0.2",
|
|
"kind": "step",
|
|
"section": 0,
|
|
"step": 2,
|
|
},
|
|
{
|
|
"after": [
|
|
"s0.2",
|
|
],
|
|
"duration": {
|
|
"nominal": 2,
|
|
},
|
|
"id": "s0.3",
|
|
"kind": "step",
|
|
"section": 0,
|
|
"step": 3,
|
|
},
|
|
{
|
|
"after": [
|
|
"s0.3",
|
|
],
|
|
"duration": {
|
|
"nominal": 2,
|
|
},
|
|
"id": "s0.4",
|
|
"kind": "step",
|
|
"section": 0,
|
|
"step": 4,
|
|
},
|
|
{
|
|
"after": [
|
|
"s0.4",
|
|
],
|
|
"duration": {
|
|
"nominal": 2,
|
|
},
|
|
"id": "s0.5",
|
|
"kind": "step",
|
|
"section": 0,
|
|
"step": 5,
|
|
},
|
|
{
|
|
"after": [
|
|
"s0.5",
|
|
],
|
|
"duration": {
|
|
"nominal": 2,
|
|
},
|
|
"id": "s0.6",
|
|
"kind": "step",
|
|
"section": 0,
|
|
"step": 6,
|
|
},
|
|
{
|
|
"after": [],
|
|
"duration": {
|
|
"nominal": 2,
|
|
},
|
|
"id": "s1.0",
|
|
"kind": "step",
|
|
"section": 1,
|
|
"step": 0,
|
|
},
|
|
],
|
|
},
|
|
"title": "Recipe with ALL warnings",
|
|
"warnings": [
|
|
{
|
|
"code": "UNDEFINED_REFERENCE",
|
|
"item": "ghost_step",
|
|
"loc": {
|
|
"end": 131,
|
|
"start": 120,
|
|
},
|
|
"message": "Undefined reference '&ghost_step' — no prior step or section produces this item.",
|
|
},
|
|
{
|
|
"code": "UNDEFINED_REFERENCE",
|
|
"item": "ghost_var",
|
|
"loc": {
|
|
"end": 188,
|
|
"start": 172,
|
|
},
|
|
"message": "Undefined reference '@&ghost_var' — no prior step or section produces this item.",
|
|
},
|
|
{
|
|
"code": "INVALID_MODIFIER_COMBINATION",
|
|
"item": "absurd",
|
|
"loc": {
|
|
"end": 234,
|
|
"start": 220,
|
|
},
|
|
"message": "Incompatible modifiers on "absurd": Optional (?) and Important (*).",
|
|
},
|
|
{
|
|
"code": "RELATIVE_QUANTITY_UNRESOLVED",
|
|
"item": "sugar",
|
|
"loc": {
|
|
"end": 294,
|
|
"start": 275,
|
|
},
|
|
"message": "Cannot resolve relative quantity: target ingredient '@flour' was not found in the current section.",
|
|
},
|
|
{
|
|
"code": "RELATIVE_QUANTITY_UNRESOLVED",
|
|
"item": "salt",
|
|
"loc": {
|
|
"end": 341,
|
|
"start": 324,
|
|
},
|
|
"message": "Cannot resolve relative quantity: target ingredient '@salt' was not found in the current section.",
|
|
},
|
|
{
|
|
"code": "CIRCULAR_REFERENCE",
|
|
"item": "salt",
|
|
"loc": {
|
|
"end": 341,
|
|
"start": 324,
|
|
},
|
|
"message": "Circular reference detected: 'salt' depends on itself.",
|
|
},
|
|
{
|
|
"code": "MISSING_UNIT",
|
|
"item": "timer",
|
|
"loc": {
|
|
"end": 373,
|
|
"start": 363,
|
|
},
|
|
"message": "Timer requires an explicit unit (e.g. min, s, °C).",
|
|
},
|
|
{
|
|
"code": "MISSING_UNIT",
|
|
"item": "Temperature",
|
|
"loc": {
|
|
"end": 407,
|
|
"start": 401,
|
|
},
|
|
"message": "Temperature requires an explicit unit (e.g. min, s, °C).",
|
|
},
|
|
{
|
|
"code": "SCOPE_CONFLICT",
|
|
"loc": {
|
|
"end": 433,
|
|
"start": 427,
|
|
},
|
|
"message": "Intermediate variable '&dup' is redefined; variable names must be unique across the recipe.",
|
|
"section": "Scope Conflict",
|
|
},
|
|
],
|
|
}
|
|
`;
|
|
|
|
exports[`Compiler Snapshots should compile simple_recipe.gram correctly 1`] = `
|
|
{
|
|
"cookware": [
|
|
{
|
|
"_usageId": "1",
|
|
"fixed": false,
|
|
"id": "bowl",
|
|
},
|
|
{
|
|
"id": "alternative",
|
|
"options": [
|
|
{
|
|
"_usageId": "14",
|
|
"alias": "pan",
|
|
"id": "frying-pan",
|
|
"preparation": "25cm",
|
|
"qty": 2,
|
|
},
|
|
{
|
|
"_usageId": "15",
|
|
"fixed": false,
|
|
"id": "griddle",
|
|
},
|
|
],
|
|
"type": "alternative",
|
|
},
|
|
],
|
|
"meta": {
|
|
"author": [
|
|
"The Gram chef",
|
|
],
|
|
"category": "Dessert",
|
|
"date": "2026-01-01",
|
|
"densities": [
|
|
"flour: 0.6",
|
|
"milk: 1.03",
|
|
],
|
|
"description": "Please do not try this recipe at home !",
|
|
"lastUpdated": "",
|
|
"original_title": "",
|
|
"size": "12 crepes",
|
|
"source": [
|
|
"https://gram-chef.com/",
|
|
],
|
|
"tags": [
|
|
"dessert",
|
|
"easy",
|
|
],
|
|
"title": "Crepes",
|
|
},
|
|
"metrics": {
|
|
"activeBreakdown": [
|
|
{
|
|
"duration": 68,
|
|
"label": "section_active:Crepe Batter",
|
|
},
|
|
],
|
|
"activeTime": 68,
|
|
"idleTime": 62,
|
|
"prepBreakdown": [
|
|
{
|
|
"duration": 12,
|
|
"label": "ingredients_overhead",
|
|
},
|
|
{
|
|
"duration": 3,
|
|
"label": "cookware_overhead",
|
|
},
|
|
{
|
|
"duration": 2,
|
|
"label": "prep_butter",
|
|
},
|
|
{
|
|
"duration": 2,
|
|
"label": "prep_frying-pan",
|
|
},
|
|
],
|
|
"preparationTime": 19,
|
|
"totalBreakdown": [
|
|
{
|
|
"duration": 68,
|
|
"label": "section_active:Crepe Batter",
|
|
},
|
|
{
|
|
"duration": 2,
|
|
"label": "timer_passive",
|
|
},
|
|
],
|
|
"totalTime": 149,
|
|
},
|
|
"miseEnPlace": [
|
|
{
|
|
"duration": 14,
|
|
"items": [
|
|
{
|
|
"count": 11,
|
|
"duration": 11,
|
|
"intermediates": 1,
|
|
"kind": "gather",
|
|
"target": "ingredient",
|
|
},
|
|
{
|
|
"count": 1,
|
|
"duration": 1,
|
|
"kind": "gather",
|
|
"target": "cookware",
|
|
},
|
|
{
|
|
"duration": 2,
|
|
"kind": "prepare",
|
|
"ref": {
|
|
"id": "butter",
|
|
"type": "ingredient",
|
|
},
|
|
},
|
|
],
|
|
"section": 0,
|
|
},
|
|
{
|
|
"duration": 5,
|
|
"items": [
|
|
{
|
|
"count": 1,
|
|
"duration": 1,
|
|
"intermediates": 1,
|
|
"kind": "gather",
|
|
"target": "ingredient",
|
|
},
|
|
{
|
|
"count": 2,
|
|
"duration": 2,
|
|
"kind": "gather",
|
|
"target": "cookware",
|
|
},
|
|
{
|
|
"duration": 2,
|
|
"kind": "prepare",
|
|
"ref": {
|
|
"id": "frying-pan",
|
|
"type": "cookware",
|
|
},
|
|
},
|
|
],
|
|
"section": 1,
|
|
},
|
|
],
|
|
"registry": {
|
|
"cookware": {
|
|
"bowl": {
|
|
"id": "bowl",
|
|
"name": "bowl",
|
|
},
|
|
"frying-pan": {
|
|
"id": "frying-pan",
|
|
"name": "frying pan",
|
|
},
|
|
"griddle": {
|
|
"id": "griddle",
|
|
"name": "griddle",
|
|
},
|
|
},
|
|
"ingredients": {
|
|
"apple-cider-vinegar": {
|
|
"id": "apple-cider-vinegar",
|
|
"name": "apple cider vinegar",
|
|
},
|
|
"batter": {
|
|
"id": "batter",
|
|
"is_intermediate": true,
|
|
"name": "batter",
|
|
},
|
|
"butter": {
|
|
"default_unit": "g",
|
|
"id": "butter",
|
|
"name": "butter",
|
|
},
|
|
"egg-yolks": {
|
|
"id": "egg-yolks",
|
|
"is_composite": true,
|
|
"name": "egg yolks",
|
|
"parent": "eggs",
|
|
},
|
|
"eggs": {
|
|
"id": "eggs",
|
|
"is_composite": true,
|
|
"name": "eggs",
|
|
},
|
|
"flour": {
|
|
"default_unit": "g",
|
|
"id": "flour",
|
|
"name": "flour",
|
|
},
|
|
"milk": {
|
|
"id": "milk",
|
|
"name": "milk",
|
|
},
|
|
"mixture": {
|
|
"id": "mixture",
|
|
"is_intermediate": true,
|
|
"name": "mixture",
|
|
},
|
|
"orange-blossom-water": {
|
|
"default_unit": "tbsp",
|
|
"id": "orange-blossom-water",
|
|
"name": "orange blossom water",
|
|
},
|
|
"secret-ingredient": {
|
|
"default_unit": "pinch",
|
|
"id": "secret-ingredient",
|
|
"name": "secret ingredient",
|
|
},
|
|
"vanilla-extract": {
|
|
"default_unit": "tsp",
|
|
"id": "vanilla-extract",
|
|
"name": "vanilla extract",
|
|
},
|
|
"vanilla-paste": {
|
|
"default_unit": "tsp",
|
|
"id": "vanilla-paste",
|
|
"name": "vanilla paste",
|
|
},
|
|
},
|
|
},
|
|
"schedule": {
|
|
"activeTime": 68,
|
|
"blocks": [
|
|
{
|
|
"end": 14,
|
|
"kind": "prep",
|
|
"section": 0,
|
|
"start": 0,
|
|
"task": "s0.prep",
|
|
},
|
|
{
|
|
"end": 16,
|
|
"kind": "step",
|
|
"section": 0,
|
|
"start": 14,
|
|
"step": 0,
|
|
"task": "s0.0",
|
|
},
|
|
{
|
|
"end": 18,
|
|
"kind": "step",
|
|
"section": 0,
|
|
"start": 16,
|
|
"step": 1,
|
|
"task": "s0.1",
|
|
},
|
|
{
|
|
"end": 20,
|
|
"kind": "step",
|
|
"section": 0,
|
|
"start": 18,
|
|
"step": 2,
|
|
"task": "s0.2",
|
|
},
|
|
{
|
|
"end": 22,
|
|
"kind": "step",
|
|
"section": 0,
|
|
"start": 20,
|
|
"step": 3,
|
|
"task": "s0.3",
|
|
},
|
|
{
|
|
"end": 82,
|
|
"kind": "step",
|
|
"section": 0,
|
|
"start": 22,
|
|
"step": 4,
|
|
"task": "s0.4",
|
|
},
|
|
{
|
|
"end": 142,
|
|
"kind": "prep",
|
|
"section": 1,
|
|
"start": 137,
|
|
"task": "s1.prep",
|
|
},
|
|
{
|
|
"end": 142,
|
|
"kind": "step",
|
|
"section": 1,
|
|
"start": 142,
|
|
"step": 0,
|
|
"task": "s1.0",
|
|
},
|
|
{
|
|
"end": 144,
|
|
"kind": "passive",
|
|
"section": 1,
|
|
"start": 142,
|
|
"step": 0,
|
|
"task": "s1.0.t0",
|
|
},
|
|
],
|
|
"days": [
|
|
{
|
|
"day": 0,
|
|
"end": 142,
|
|
"sections": [
|
|
0,
|
|
1,
|
|
],
|
|
"start": 0,
|
|
},
|
|
],
|
|
"idleTime": 57,
|
|
"miseEnPlace": "perSection",
|
|
"preparationTime": 19,
|
|
"rests": "shortest",
|
|
"totalTime": 144,
|
|
},
|
|
"sections": [
|
|
{
|
|
"cookware": [
|
|
{
|
|
"_usageId": "1",
|
|
"fixed": false,
|
|
"id": "bowl",
|
|
},
|
|
],
|
|
"ingredients": [
|
|
{
|
|
"_usageId": "2",
|
|
"id": "flour",
|
|
"modifiers": [
|
|
"bakers_percentage",
|
|
],
|
|
"qty": 250,
|
|
"unit": "g",
|
|
},
|
|
{
|
|
"_usageId": "3",
|
|
"composite": {
|
|
"parent": "eggs",
|
|
"quantity": 2,
|
|
},
|
|
"id": "egg-yolks",
|
|
"qty": 2,
|
|
},
|
|
{
|
|
"_usageId": "4",
|
|
"id": "eggs",
|
|
"qty": {
|
|
"range": {
|
|
"max": 2,
|
|
"min": 1,
|
|
},
|
|
"text": "1-2",
|
|
"type": "range",
|
|
"value": 1.5,
|
|
},
|
|
},
|
|
{
|
|
"_usageId": "5",
|
|
"dependencies": [
|
|
"flour",
|
|
],
|
|
"formula": {
|
|
"isGhost": false,
|
|
"percent": 200,
|
|
"raw": "200% of flour",
|
|
"target": "flour",
|
|
},
|
|
"id": "milk",
|
|
"qty": {
|
|
"loc": {
|
|
"end": 513,
|
|
"start": 501,
|
|
},
|
|
"percent": 200,
|
|
"referenceType": "ingredient",
|
|
"target": "flour",
|
|
"type": "RelativeQuantity",
|
|
},
|
|
},
|
|
{
|
|
"_usageId": "7",
|
|
"id": "butter",
|
|
"preparation": "melted",
|
|
"qty": 30,
|
|
"unit": "g",
|
|
},
|
|
{
|
|
"id": "alternative",
|
|
"options": [
|
|
{
|
|
"_usageId": "8",
|
|
"id": "vanilla-extract",
|
|
"qty": 1,
|
|
"unit": "tsp",
|
|
},
|
|
{
|
|
"_usageId": "9",
|
|
"id": "vanilla-paste",
|
|
"qty": {
|
|
"denominator": 2,
|
|
"numerator": 1,
|
|
"text": "1/2",
|
|
"type": "fraction",
|
|
"value": 0.5,
|
|
},
|
|
"unit": "tsp",
|
|
},
|
|
],
|
|
"type": "alternative",
|
|
},
|
|
{
|
|
"_usageId": "10",
|
|
"alias": "vinegar",
|
|
"id": "apple-cider-vinegar",
|
|
},
|
|
{
|
|
"_usageId": "11",
|
|
"id": "secret-ingredient",
|
|
"modifiers": [
|
|
"hidden",
|
|
],
|
|
"qty": 1,
|
|
"unit": "pinch",
|
|
},
|
|
{
|
|
"_usageId": "12",
|
|
"id": "orange-blossom-water",
|
|
"modifiers": [
|
|
"optional",
|
|
],
|
|
"qty": 1,
|
|
"unit": "tbsp",
|
|
},
|
|
],
|
|
"intermediate_preparation": "batter",
|
|
"retro_planning": {
|
|
"minutes": -60,
|
|
"raw": "-1h",
|
|
"sign": -1,
|
|
"unit": "h",
|
|
"value": 1,
|
|
},
|
|
"steps": [
|
|
{
|
|
"content": [
|
|
{
|
|
"kind": "block",
|
|
"type": "comment",
|
|
"value": "Again, don't try this recipe at home !",
|
|
},
|
|
],
|
|
"timings": {
|
|
"activeDuration": 2,
|
|
"end": 2,
|
|
"start": 0,
|
|
},
|
|
"type": "step",
|
|
},
|
|
{
|
|
"action": "Mix",
|
|
"content": [
|
|
"In a ",
|
|
{
|
|
"_usageId": "1",
|
|
"fixed": false,
|
|
"id": "bowl",
|
|
},
|
|
", mix the ",
|
|
{
|
|
"_usageId": "2",
|
|
"id": "flour",
|
|
"modifiers": [
|
|
"bakers_percentage",
|
|
],
|
|
"qty": 250,
|
|
"unit": "g",
|
|
},
|
|
"with the ",
|
|
{
|
|
"_usageId": "3",
|
|
"composite": {
|
|
"parent": "eggs",
|
|
"quantity": 2,
|
|
},
|
|
"id": "egg-yolks",
|
|
"qty": 2,
|
|
},
|
|
"and the ",
|
|
{
|
|
"_usageId": "4",
|
|
"id": "eggs",
|
|
"qty": {
|
|
"range": {
|
|
"max": 2,
|
|
"min": 1,
|
|
},
|
|
"text": "1-2",
|
|
"type": "range",
|
|
"value": 1.5,
|
|
},
|
|
},
|
|
". ",
|
|
{
|
|
"id": "mixture",
|
|
"name": "mixture",
|
|
"type": "declaration",
|
|
},
|
|
],
|
|
"intermediate_preparation": "mixture",
|
|
"timings": {
|
|
"activeDuration": 2,
|
|
"end": 4,
|
|
"start": 2,
|
|
},
|
|
"type": "step",
|
|
},
|
|
{
|
|
"action": "Whisk",
|
|
"content": [
|
|
"In the ",
|
|
{
|
|
"_usageId": "5",
|
|
"dependencies": [
|
|
"flour",
|
|
],
|
|
"formula": {
|
|
"isGhost": false,
|
|
"percent": 200,
|
|
"raw": "200% of flour",
|
|
"target": "flour",
|
|
},
|
|
"id": "milk",
|
|
"qty": {
|
|
"loc": {
|
|
"end": 513,
|
|
"start": 501,
|
|
},
|
|
"percent": 200,
|
|
"referenceType": "ingredient",
|
|
"target": "flour",
|
|
"type": "RelativeQuantity",
|
|
},
|
|
},
|
|
"into the ",
|
|
{
|
|
"_usageId": "6",
|
|
"id": "mixture",
|
|
"name": "mixture",
|
|
"type": "reference",
|
|
},
|
|
". ",
|
|
{
|
|
"kind": "line",
|
|
"type": "comment",
|
|
"value": "Don't overmix !",
|
|
},
|
|
],
|
|
"timings": {
|
|
"activeDuration": 2,
|
|
"end": 6,
|
|
"start": 4,
|
|
},
|
|
"type": "step",
|
|
},
|
|
{
|
|
"action": "Add",
|
|
"content": [
|
|
"Some ",
|
|
{
|
|
"_usageId": "7",
|
|
"id": "butter",
|
|
"preparation": "melted",
|
|
"qty": 30,
|
|
"unit": "g",
|
|
},
|
|
", the ",
|
|
{
|
|
"id": "alternative",
|
|
"options": [
|
|
{
|
|
"_usageId": "8",
|
|
"id": "vanilla-extract",
|
|
"qty": 1,
|
|
"unit": "tsp",
|
|
},
|
|
{
|
|
"_usageId": "9",
|
|
"id": "vanilla-paste",
|
|
"qty": {
|
|
"denominator": 2,
|
|
"numerator": 1,
|
|
"text": "1/2",
|
|
"type": "fraction",
|
|
"value": 0.5,
|
|
},
|
|
"unit": "tsp",
|
|
},
|
|
],
|
|
"type": "alternative",
|
|
},
|
|
", the ",
|
|
{
|
|
"_usageId": "10",
|
|
"alias": "vinegar",
|
|
"id": "apple-cider-vinegar",
|
|
},
|
|
", a ",
|
|
{
|
|
"_usageId": "11",
|
|
"id": "secret-ingredient",
|
|
"modifiers": [
|
|
"hidden",
|
|
],
|
|
"qty": 1,
|
|
"unit": "pinch",
|
|
},
|
|
"and ",
|
|
{
|
|
"_usageId": "12",
|
|
"id": "orange-blossom-water",
|
|
"modifiers": [
|
|
"optional",
|
|
],
|
|
"qty": 1,
|
|
"unit": "tbsp",
|
|
},
|
|
".",
|
|
],
|
|
"timings": {
|
|
"activeDuration": 2,
|
|
"end": 8,
|
|
"start": 6,
|
|
},
|
|
"type": "step",
|
|
},
|
|
{
|
|
"action": "Rest",
|
|
"content": [
|
|
"Let it rest ",
|
|
{
|
|
"minutes": 60,
|
|
"name": "rest",
|
|
"quantity": {
|
|
"text": "1",
|
|
"type": "single",
|
|
"value": 1,
|
|
},
|
|
"raw": "1h",
|
|
"type": "timer",
|
|
"unit": "h",
|
|
},
|
|
".",
|
|
],
|
|
"timings": {
|
|
"activeDuration": 60,
|
|
"end": 68,
|
|
"start": 8,
|
|
},
|
|
"type": "step",
|
|
},
|
|
],
|
|
"title": "Crepe Batter",
|
|
},
|
|
{
|
|
"cookware": [
|
|
{
|
|
"id": "alternative",
|
|
"options": [
|
|
{
|
|
"_usageId": "14",
|
|
"alias": "pan",
|
|
"id": "frying-pan",
|
|
"preparation": "25cm",
|
|
"qty": 2,
|
|
},
|
|
{
|
|
"_usageId": "15",
|
|
"fixed": false,
|
|
"id": "griddle",
|
|
},
|
|
],
|
|
"type": "alternative",
|
|
},
|
|
],
|
|
"ingredients": [
|
|
{
|
|
"_usageId": "13",
|
|
"id": "batter",
|
|
"name": "batter",
|
|
"type": "reference",
|
|
},
|
|
{
|
|
"_usageId": "16",
|
|
"id": "butter",
|
|
"modifiers": [
|
|
"reference",
|
|
],
|
|
"qty": 10,
|
|
"unit": "g",
|
|
},
|
|
],
|
|
"steps": [
|
|
{
|
|
"action": "Cook",
|
|
"backgroundTasks": [
|
|
{
|
|
"duration": 2,
|
|
"startOffset": 0,
|
|
},
|
|
],
|
|
"content": [
|
|
"The ",
|
|
{
|
|
"_usageId": "13",
|
|
"id": "batter",
|
|
"name": "batter",
|
|
"type": "reference",
|
|
},
|
|
"in a ",
|
|
{
|
|
"id": "alternative",
|
|
"options": [
|
|
{
|
|
"_usageId": "14",
|
|
"alias": "pan",
|
|
"id": "frying-pan",
|
|
"preparation": "25cm",
|
|
"qty": 2,
|
|
},
|
|
{
|
|
"_usageId": "15",
|
|
"fixed": false,
|
|
"id": "griddle",
|
|
},
|
|
],
|
|
"type": "alternative",
|
|
},
|
|
"with some ",
|
|
{
|
|
"_usageId": "16",
|
|
"id": "butter",
|
|
"modifiers": [
|
|
"reference",
|
|
],
|
|
"qty": 10,
|
|
"unit": "g",
|
|
},
|
|
"over ",
|
|
{
|
|
"text": "medium heat",
|
|
"type": "temperature",
|
|
},
|
|
"for about ",
|
|
{
|
|
"isPassive": true,
|
|
"minutes": 2,
|
|
"quantity": {
|
|
"text": "2",
|
|
"type": "single",
|
|
"value": 2,
|
|
},
|
|
"raw": "2min",
|
|
"type": "timer",
|
|
"unit": "min",
|
|
},
|
|
".²",
|
|
],
|
|
"timings": {
|
|
"activeDuration": 0,
|
|
"end": 128,
|
|
"start": 128,
|
|
},
|
|
"type": "step",
|
|
},
|
|
],
|
|
"title": "Cooking",
|
|
},
|
|
],
|
|
"shopping_list": [
|
|
{
|
|
"_usageIds": [
|
|
"2",
|
|
],
|
|
"id": "flour",
|
|
"modifiers": [
|
|
"bakers_percentage",
|
|
],
|
|
"name": "flour",
|
|
"qty": 250,
|
|
"unit": "g",
|
|
},
|
|
{
|
|
"_usageIds": [
|
|
"5",
|
|
],
|
|
"id": "milk",
|
|
"name": "milk",
|
|
"relative": true,
|
|
"variable_entries": [
|
|
"200% of flour",
|
|
],
|
|
},
|
|
{
|
|
"_usageIds": [
|
|
"7",
|
|
"16",
|
|
],
|
|
"id": "butter",
|
|
"modifiers": [
|
|
"reference",
|
|
],
|
|
"name": "butter",
|
|
"qty": 40,
|
|
"unit": "g",
|
|
},
|
|
{
|
|
"_usageIds": [
|
|
"10",
|
|
],
|
|
"id": "apple-cider-vinegar",
|
|
"name": "apple cider vinegar",
|
|
},
|
|
{
|
|
"_usageIds": [
|
|
"11",
|
|
],
|
|
"id": "secret-ingredient",
|
|
"modifiers": [
|
|
"hidden",
|
|
],
|
|
"name": "secret ingredient",
|
|
"qty": 1,
|
|
"unit": "pinch",
|
|
},
|
|
{
|
|
"_usageIds": [
|
|
"12",
|
|
],
|
|
"id": "orange-blossom-water",
|
|
"modifiers": [
|
|
"optional",
|
|
],
|
|
"name": "orange blossom water",
|
|
"qty": 1,
|
|
"unit": "tbsp",
|
|
},
|
|
{
|
|
"id": "eggs",
|
|
"name": "eggs",
|
|
"qty": 3.5,
|
|
"type": "composite",
|
|
"usage": [
|
|
{
|
|
"id": "egg-yolks",
|
|
"qty": 2,
|
|
},
|
|
{
|
|
"alias": "Direct Use",
|
|
"id": "eggs",
|
|
"qty": 1.5,
|
|
},
|
|
],
|
|
},
|
|
{
|
|
"id": "alternative",
|
|
"options": [
|
|
{
|
|
"_usageId": "8",
|
|
"id": "vanilla-extract",
|
|
"qty": 1,
|
|
"unit": "tsp",
|
|
},
|
|
{
|
|
"_usageId": "9",
|
|
"id": "vanilla-paste",
|
|
"qty": {
|
|
"denominator": 2,
|
|
"numerator": 1,
|
|
"text": "1/2",
|
|
"type": "fraction",
|
|
"value": 0.5,
|
|
},
|
|
"unit": "tsp",
|
|
},
|
|
],
|
|
"type": "alternative",
|
|
},
|
|
],
|
|
"slug": "crepes",
|
|
"tasks": {
|
|
"sections": [
|
|
{
|
|
"day": 0,
|
|
"deadline": 60,
|
|
"intermediate": "batter",
|
|
},
|
|
{
|
|
"day": 0,
|
|
},
|
|
],
|
|
"tasks": [
|
|
{
|
|
"after": [],
|
|
"duration": {
|
|
"nominal": 13,
|
|
},
|
|
"id": "s0.prep",
|
|
"items": [
|
|
{
|
|
"count": 10,
|
|
"duration": 10,
|
|
"kind": "gather",
|
|
"target": "ingredient",
|
|
},
|
|
{
|
|
"count": 1,
|
|
"duration": 1,
|
|
"kind": "gather",
|
|
"target": "cookware",
|
|
},
|
|
{
|
|
"duration": 2,
|
|
"kind": "prepare",
|
|
"ref": {
|
|
"id": "butter",
|
|
"type": "ingredient",
|
|
},
|
|
},
|
|
],
|
|
"kind": "prep",
|
|
"section": 0,
|
|
},
|
|
{
|
|
"after": [
|
|
"s0.1",
|
|
],
|
|
"duration": {
|
|
"nominal": 1,
|
|
},
|
|
"id": "s0.prep.mixture",
|
|
"intermediate": "mixture",
|
|
"items": [
|
|
{
|
|
"count": 1,
|
|
"duration": 1,
|
|
"intermediates": 1,
|
|
"kind": "gather",
|
|
"target": "ingredient",
|
|
},
|
|
],
|
|
"kind": "prep",
|
|
"section": 0,
|
|
},
|
|
{
|
|
"after": [],
|
|
"duration": {
|
|
"nominal": 2,
|
|
},
|
|
"id": "s0.0",
|
|
"kind": "step",
|
|
"section": 0,
|
|
"step": 0,
|
|
},
|
|
{
|
|
"after": [
|
|
"s0.0",
|
|
],
|
|
"duration": {
|
|
"nominal": 2,
|
|
},
|
|
"id": "s0.1",
|
|
"kind": "step",
|
|
"produces": [
|
|
"mixture",
|
|
],
|
|
"section": 0,
|
|
"step": 1,
|
|
},
|
|
{
|
|
"after": [
|
|
"s0.1",
|
|
],
|
|
"consumes": [
|
|
"mixture",
|
|
],
|
|
"duration": {
|
|
"nominal": 2,
|
|
},
|
|
"id": "s0.2",
|
|
"kind": "step",
|
|
"section": 0,
|
|
"step": 2,
|
|
},
|
|
{
|
|
"after": [
|
|
"s0.2",
|
|
],
|
|
"duration": {
|
|
"nominal": 2,
|
|
},
|
|
"id": "s0.3",
|
|
"kind": "step",
|
|
"section": 0,
|
|
"step": 3,
|
|
},
|
|
{
|
|
"after": [
|
|
"s0.3",
|
|
],
|
|
"duration": {
|
|
"nominal": 60,
|
|
},
|
|
"id": "s0.4",
|
|
"kind": "step",
|
|
"section": 0,
|
|
"step": 4,
|
|
},
|
|
{
|
|
"after": [],
|
|
"duration": {
|
|
"nominal": 4,
|
|
},
|
|
"id": "s1.prep",
|
|
"items": [
|
|
{
|
|
"count": 2,
|
|
"duration": 2,
|
|
"kind": "gather",
|
|
"target": "cookware",
|
|
},
|
|
{
|
|
"duration": 2,
|
|
"kind": "prepare",
|
|
"ref": {
|
|
"id": "frying-pan",
|
|
"type": "cookware",
|
|
},
|
|
},
|
|
],
|
|
"kind": "prep",
|
|
"section": 1,
|
|
},
|
|
{
|
|
"after": [
|
|
"s0.4",
|
|
],
|
|
"duration": {
|
|
"nominal": 1,
|
|
},
|
|
"id": "s1.prep.batter",
|
|
"intermediate": "batter",
|
|
"items": [
|
|
{
|
|
"count": 1,
|
|
"duration": 1,
|
|
"intermediates": 1,
|
|
"kind": "gather",
|
|
"target": "ingredient",
|
|
},
|
|
],
|
|
"kind": "prep",
|
|
"section": 1,
|
|
},
|
|
{
|
|
"after": [
|
|
"s0.4",
|
|
],
|
|
"consumes": [
|
|
"batter",
|
|
],
|
|
"duration": {
|
|
"nominal": 0,
|
|
},
|
|
"id": "s1.0",
|
|
"kind": "step",
|
|
"section": 1,
|
|
"step": 0,
|
|
},
|
|
{
|
|
"after": [
|
|
"s1.0",
|
|
],
|
|
"duration": {
|
|
"nominal": 2,
|
|
},
|
|
"id": "s1.0.t0",
|
|
"kind": "passive",
|
|
"offset": 0,
|
|
"section": 1,
|
|
"step": 0,
|
|
},
|
|
],
|
|
},
|
|
"title": "Crepes",
|
|
"warnings": [],
|
|
}
|
|
`;
|