hammerkit 1.27.0-next.9 → 2.0.0-next.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/build.schema.json +176 -6
- package/dist/cache/backends/local-cache-backend.js +6 -0
- package/dist/cache/backends/registry/registry-client.js +1 -0
- package/dist/cache/cache-sync.js +1 -1
- package/dist/cache/explain.js +17 -0
- package/dist/cli.js +2 -0
- package/dist/dashboard/assets/index-CjnKm5-3.css +2 -0
- package/dist/dashboard/assets/index-zPXa4klZ.js +13 -0
- package/dist/dashboard/favicon.svg +1 -0
- package/dist/dashboard/index.html +15 -0
- package/dist/docker/item-network.js +13 -5
- package/dist/executer/archive-task-entry.js +4 -2
- package/dist/executer/deadline.js +17 -3
- package/dist/executer/deferred-restore.js +36 -0
- package/dist/executer/docker-service.js +30 -8
- package/dist/executer/docker-task.js +21 -1
- package/dist/executer/execute-work-service.js +2 -0
- package/dist/executer/execute-work-task.js +11 -4
- package/dist/executer/execution-steps.js +25 -4
- package/dist/executer/reset-work-tree.js +4 -0
- package/dist/executer/scheduler/enqueue-next.js +57 -6
- package/dist/executer/scheduler/state-key.js +42 -5
- package/dist/executer/watch-loop.js +6 -3
- package/dist/harness/connect.js +20 -6
- package/dist/harness/mcp-command.js +22 -6
- package/dist/harness/mcp.js +63 -114
- package/dist/harness/opencode.js +158 -50
- package/dist/harness/pi.js +29 -0
- package/dist/harness/sandbox-client.js +194 -23
- package/dist/harness/service-tools.js +141 -0
- package/dist/harness/task-tools.js +221 -0
- package/dist/kubernetes/apply.js +49 -1
- package/dist/kubernetes/await-running-state.js +172 -13
- package/dist/kubernetes/cluster-state.js +245 -0
- package/dist/kubernetes/ensure-kubernetes-deployment-exists.js +133 -9
- package/dist/kubernetes/ensure-kubernetes-service-exists.js +2 -0
- package/dist/kubernetes/ensure-persistent-data.js +211 -6
- package/dist/kubernetes/follow-pod-logs.js +182 -0
- package/dist/kubernetes/job-placement.js +36 -12
- package/dist/kubernetes/kubernetes-instance.js +1 -0
- package/dist/kubernetes/network-policy.js +2 -1
- package/dist/kubernetes/remove-stale-items.js +46 -0
- package/dist/kubernetes/restore-kubernetes-data.js +9 -5
- package/dist/kubernetes/sandbox-runner.js +628 -0
- package/dist/kubernetes/service-rollouts.js +74 -0
- package/dist/kubernetes/store-kubernetes-data.js +5 -2
- package/dist/kubernetes/volumes.js +94 -9
- package/dist/main.js +2 -0
- package/dist/optimizer/calculate-checksum.js +3 -2
- package/dist/optimizer/check-key.js +94 -0
- package/dist/optimizer/check-keys.js +64 -0
- package/dist/optimizer/get-work-cache-stats.js +17 -3
- package/dist/optimizer/work-task-cache-description.js +49 -1
- package/dist/planner/service-definition.js +9 -4
- package/dist/planner/utils/append-work-dependencies.js +5 -3
- package/dist/planner/utils/append-work-service.js +18 -1
- package/dist/planner/utils/append-work-task.js +13 -3
- package/dist/planner/utils/get-work-runtime.js +6 -1
- package/dist/planner/utils/normalize-path.js +19 -1
- package/dist/planner/utils/parse-work-mount.js +7 -1
- package/dist/planner/utils/parse-work-port.js +4 -1
- package/dist/planner/validate.js +22 -0
- package/dist/planner/work-network.js +3 -1
- package/dist/planner/work-runtime-aggregate.js +32 -0
- package/dist/planner/work-runtime-kubernetes.js +136 -13
- package/dist/planner/work-task.js +6 -1
- package/dist/program.js +27 -9
- package/dist/remote/device-login.js +7 -2
- package/dist/remote/host-config.js +69 -3
- package/dist/remote/remote-commands.js +33 -7
- package/dist/remote/remote-status.js +112 -0
- package/dist/remote/remote-work-commands.js +562 -45
- package/dist/remote/server-client.js +15 -2
- package/dist/remote/token-source.js +64 -26
- package/dist/run-program.js +9 -0
- package/dist/schema/build-file-base-task-schema.js +3 -3
- package/dist/schema/build-file-container-service-schema.js +10 -0
- package/dist/schema/build-file-container-task-schema.js +16 -1
- package/dist/schema/build-file-include-schema.js +18 -4
- package/dist/schema/build-file-kubernetes-service-schema.js +2 -0
- package/dist/schema/build-file-task-schema.js +5 -1
- package/dist/schema/capabilities-schema.js +56 -0
- package/dist/schema/reference-parser.js +119 -11
- package/dist/schema/removed-properties.js +20 -0
- package/dist/schema/schema-parser.js +94 -41
- package/dist/schema/work-scope-parser.js +33 -10
- package/dist/secrets/command-secret-provider.js +3 -1
- package/dist/secrets/github-app-token-command.js +3 -1
- package/dist/secrets/secret-catalog.js +43 -19
- package/dist/server/accounts-api.js +4 -1
- package/dist/server/approvals-api.js +1 -1
- package/dist/server/capacity-format.js +36 -0
- package/dist/server/capacity.js +300 -0
- package/dist/server/checks-api.js +83 -0
- package/dist/server/checks.js +116 -0
- package/dist/server/dashboard.js +196 -0
- package/dist/server/definitions-api.js +66 -3
- package/dist/server/endpoints.js +794 -0
- package/dist/server/executor.js +164 -9
- package/dist/server/kubernetes-backend.js +415 -48
- package/dist/server/kubernetes-sandbox-storage.js +46 -2
- package/dist/server/overview.js +271 -0
- package/dist/server/plan.js +170 -121
- package/dist/server/policy.js +34 -2
- package/dist/server/proposals-api.js +17 -8
- package/dist/server/repo-access.js +5 -0
- package/dist/server/run-logs.js +4 -0
- package/dist/server/run-plan.js +38 -4
- package/dist/server/run-request.js +58 -3
- package/dist/server/run-worker.js +262 -13
- package/dist/server/runs.js +962 -36
- package/dist/server/sandbox-pod.js +28 -0
- package/dist/server/sandbox-storage.js +23 -0
- package/dist/server/sandboxes.js +8 -0
- package/dist/server/server-config.js +246 -10
- package/dist/server/server.js +429 -32
- package/dist/server/service-runs.js +82 -0
- package/dist/server/timings.js +132 -0
- package/dist/server/wait-reason.js +21 -0
- package/dist/utils/tar.js +28 -1
- package/dist/utils/terminal-prompt.js +53 -0
- package/package.json +8 -2
package/build.schema.json
CHANGED
|
@@ -191,9 +191,6 @@
|
|
|
191
191
|
"shell": {
|
|
192
192
|
"type": "string"
|
|
193
193
|
},
|
|
194
|
-
"continuous": {
|
|
195
|
-
"type": "boolean"
|
|
196
|
-
},
|
|
197
194
|
"timeout": {
|
|
198
195
|
"type": "string"
|
|
199
196
|
},
|
|
@@ -296,6 +293,9 @@
|
|
|
296
293
|
"type": "string",
|
|
297
294
|
"minLength": 1
|
|
298
295
|
},
|
|
296
|
+
"publish": {
|
|
297
|
+
"type": "boolean"
|
|
298
|
+
},
|
|
299
299
|
"image": {
|
|
300
300
|
"type": "string"
|
|
301
301
|
},
|
|
@@ -308,6 +308,56 @@
|
|
|
308
308
|
"volumeSize": {
|
|
309
309
|
"type": "string",
|
|
310
310
|
"description": "size of its claim on Kubernetes, e.g. 10Gi"
|
|
311
|
+
},
|
|
312
|
+
"capAdd": {
|
|
313
|
+
"type": "array",
|
|
314
|
+
"items": {
|
|
315
|
+
"type": "string",
|
|
316
|
+
"enum": [
|
|
317
|
+
"AUDIT_CONTROL",
|
|
318
|
+
"AUDIT_READ",
|
|
319
|
+
"AUDIT_WRITE",
|
|
320
|
+
"BLOCK_SUSPEND",
|
|
321
|
+
"BPF",
|
|
322
|
+
"CHECKPOINT_RESTORE",
|
|
323
|
+
"CHOWN",
|
|
324
|
+
"DAC_OVERRIDE",
|
|
325
|
+
"DAC_READ_SEARCH",
|
|
326
|
+
"FOWNER",
|
|
327
|
+
"FSETID",
|
|
328
|
+
"IPC_LOCK",
|
|
329
|
+
"IPC_OWNER",
|
|
330
|
+
"KILL",
|
|
331
|
+
"LEASE",
|
|
332
|
+
"LINUX_IMMUTABLE",
|
|
333
|
+
"MAC_ADMIN",
|
|
334
|
+
"MAC_OVERRIDE",
|
|
335
|
+
"MKNOD",
|
|
336
|
+
"NET_ADMIN",
|
|
337
|
+
"NET_BIND_SERVICE",
|
|
338
|
+
"NET_BROADCAST",
|
|
339
|
+
"NET_RAW",
|
|
340
|
+
"PERFMON",
|
|
341
|
+
"SETFCAP",
|
|
342
|
+
"SETGID",
|
|
343
|
+
"SETPCAP",
|
|
344
|
+
"SETUID",
|
|
345
|
+
"SYS_ADMIN",
|
|
346
|
+
"SYS_BOOT",
|
|
347
|
+
"SYS_CHROOT",
|
|
348
|
+
"SYS_MODULE",
|
|
349
|
+
"SYS_NICE",
|
|
350
|
+
"SYS_PACCT",
|
|
351
|
+
"SYS_PTRACE",
|
|
352
|
+
"SYS_RAWIO",
|
|
353
|
+
"SYS_RESOURCE",
|
|
354
|
+
"SYS_TIME",
|
|
355
|
+
"SYS_TTY_CONFIG",
|
|
356
|
+
"SYSLOG",
|
|
357
|
+
"WAKE_ALARM"
|
|
358
|
+
]
|
|
359
|
+
},
|
|
360
|
+
"description": "Linux capabilities added to the container, e.g. [SYS_ADMIN]"
|
|
311
361
|
}
|
|
312
362
|
},
|
|
313
363
|
"required": [
|
|
@@ -355,9 +405,6 @@
|
|
|
355
405
|
"shell": {
|
|
356
406
|
"$ref": "#/definitions/hammerkit/properties/tasks/additionalProperties/anyOf/0/properties/shell"
|
|
357
407
|
},
|
|
358
|
-
"continuous": {
|
|
359
|
-
"$ref": "#/definitions/hammerkit/properties/tasks/additionalProperties/anyOf/0/properties/continuous"
|
|
360
|
-
},
|
|
361
408
|
"timeout": {
|
|
362
409
|
"$ref": "#/definitions/hammerkit/properties/tasks/additionalProperties/anyOf/0/properties/timeout"
|
|
363
410
|
},
|
|
@@ -379,6 +426,9 @@
|
|
|
379
426
|
"runner": {
|
|
380
427
|
"$ref": "#/definitions/hammerkit/properties/tasks/additionalProperties/anyOf/0/properties/runner"
|
|
381
428
|
},
|
|
429
|
+
"publish": {
|
|
430
|
+
"$ref": "#/definitions/hammerkit/properties/tasks/additionalProperties/anyOf/0/properties/publish"
|
|
431
|
+
},
|
|
382
432
|
"platform": {
|
|
383
433
|
"type": "object",
|
|
384
434
|
"properties": {
|
|
@@ -403,6 +453,88 @@
|
|
|
403
453
|
},
|
|
404
454
|
"additionalProperties": false,
|
|
405
455
|
"description": "local task"
|
|
456
|
+
},
|
|
457
|
+
{
|
|
458
|
+
"type": "object",
|
|
459
|
+
"properties": {
|
|
460
|
+
"deps": {
|
|
461
|
+
"$ref": "#/definitions/hammerkit/properties/tasks/additionalProperties/anyOf/0/properties/deps"
|
|
462
|
+
},
|
|
463
|
+
"needs": {
|
|
464
|
+
"$ref": "#/definitions/hammerkit/properties/tasks/additionalProperties/anyOf/0/properties/needs"
|
|
465
|
+
},
|
|
466
|
+
"description": {
|
|
467
|
+
"$ref": "#/definitions/hammerkit/properties/tasks/additionalProperties/anyOf/0/properties/description"
|
|
468
|
+
},
|
|
469
|
+
"extend": {
|
|
470
|
+
"type": "string"
|
|
471
|
+
},
|
|
472
|
+
"reset": {
|
|
473
|
+
"$ref": "#/definitions/hammerkit/properties/tasks/additionalProperties/anyOf/0/properties/reset"
|
|
474
|
+
},
|
|
475
|
+
"envs": {
|
|
476
|
+
"$ref": "#/definitions/hammerkit/properties/tasks/additionalProperties/anyOf/0/properties/envs"
|
|
477
|
+
},
|
|
478
|
+
"labels": {
|
|
479
|
+
"$ref": "#/definitions/hammerkit/properties/tasks/additionalProperties/anyOf/0/properties/labels"
|
|
480
|
+
},
|
|
481
|
+
"cache": {
|
|
482
|
+
"$ref": "#/definitions/hammerkit/properties/tasks/additionalProperties/anyOf/0/properties/cache"
|
|
483
|
+
},
|
|
484
|
+
"cmds": {
|
|
485
|
+
"$ref": "#/definitions/hammerkit/properties/tasks/additionalProperties/anyOf/0/properties/cmds"
|
|
486
|
+
},
|
|
487
|
+
"src": {
|
|
488
|
+
"$ref": "#/definitions/hammerkit/properties/tasks/additionalProperties/anyOf/0/properties/src"
|
|
489
|
+
},
|
|
490
|
+
"generates": {
|
|
491
|
+
"$ref": "#/definitions/hammerkit/properties/tasks/additionalProperties/anyOf/0/properties/generates"
|
|
492
|
+
},
|
|
493
|
+
"shell": {
|
|
494
|
+
"$ref": "#/definitions/hammerkit/properties/tasks/additionalProperties/anyOf/0/properties/shell"
|
|
495
|
+
},
|
|
496
|
+
"timeout": {
|
|
497
|
+
"$ref": "#/definitions/hammerkit/properties/tasks/additionalProperties/anyOf/0/properties/timeout"
|
|
498
|
+
},
|
|
499
|
+
"secrets": {
|
|
500
|
+
"$ref": "#/definitions/hammerkit/properties/tasks/additionalProperties/anyOf/0/properties/secrets"
|
|
501
|
+
},
|
|
502
|
+
"account": {
|
|
503
|
+
"$ref": "#/definitions/hammerkit/properties/tasks/additionalProperties/anyOf/0/properties/account"
|
|
504
|
+
},
|
|
505
|
+
"resources": {
|
|
506
|
+
"$ref": "#/definitions/hammerkit/properties/tasks/additionalProperties/anyOf/0/properties/resources"
|
|
507
|
+
},
|
|
508
|
+
"network": {
|
|
509
|
+
"$ref": "#/definitions/hammerkit/properties/tasks/additionalProperties/anyOf/0/properties/network"
|
|
510
|
+
},
|
|
511
|
+
"args": {
|
|
512
|
+
"$ref": "#/definitions/hammerkit/properties/tasks/additionalProperties/anyOf/0/properties/args"
|
|
513
|
+
},
|
|
514
|
+
"runner": {
|
|
515
|
+
"$ref": "#/definitions/hammerkit/properties/tasks/additionalProperties/anyOf/0/properties/runner"
|
|
516
|
+
},
|
|
517
|
+
"publish": {
|
|
518
|
+
"$ref": "#/definitions/hammerkit/properties/tasks/additionalProperties/anyOf/0/properties/publish"
|
|
519
|
+
},
|
|
520
|
+
"image": {
|
|
521
|
+
"type": "string"
|
|
522
|
+
},
|
|
523
|
+
"mounts": {
|
|
524
|
+
"$ref": "#/definitions/hammerkit/properties/tasks/additionalProperties/anyOf/0/properties/mounts"
|
|
525
|
+
},
|
|
526
|
+
"volumeSize": {
|
|
527
|
+
"$ref": "#/definitions/hammerkit/properties/tasks/additionalProperties/anyOf/0/properties/volumeSize"
|
|
528
|
+
},
|
|
529
|
+
"capAdd": {
|
|
530
|
+
"$ref": "#/definitions/hammerkit/properties/tasks/additionalProperties/anyOf/0/properties/capAdd"
|
|
531
|
+
}
|
|
532
|
+
},
|
|
533
|
+
"required": [
|
|
534
|
+
"extend"
|
|
535
|
+
],
|
|
536
|
+
"additionalProperties": false,
|
|
537
|
+
"description": "container task taking its image from the task it extends"
|
|
406
538
|
}
|
|
407
539
|
]
|
|
408
540
|
}
|
|
@@ -510,6 +642,12 @@
|
|
|
510
642
|
"$ref": "#/definitions/hammerkit/properties/tasks/additionalProperties/anyOf/0/properties/resources",
|
|
511
643
|
"description": "cpu and memory requests and limits"
|
|
512
644
|
},
|
|
645
|
+
"restarts": {
|
|
646
|
+
"type": "integer",
|
|
647
|
+
"minimum": 0,
|
|
648
|
+
"maximum": 10,
|
|
649
|
+
"description": "crashes restarted before it fails on Kubernetes, 0 to 10, 2 by default"
|
|
650
|
+
},
|
|
513
651
|
"volumeSize": {
|
|
514
652
|
"$ref": "#/definitions/hammerkit/properties/tasks/additionalProperties/anyOf/0/properties/volumeSize",
|
|
515
653
|
"description": "size of its claim on Kubernetes, e.g. 10Gi"
|
|
@@ -520,6 +658,9 @@
|
|
|
520
658
|
},
|
|
521
659
|
"args": {
|
|
522
660
|
"type": "boolean"
|
|
661
|
+
},
|
|
662
|
+
"publish": {
|
|
663
|
+
"type": "boolean"
|
|
523
664
|
}
|
|
524
665
|
},
|
|
525
666
|
"required": [
|
|
@@ -576,6 +717,9 @@
|
|
|
576
717
|
"number"
|
|
577
718
|
]
|
|
578
719
|
}
|
|
720
|
+
},
|
|
721
|
+
"publish": {
|
|
722
|
+
"type": "boolean"
|
|
579
723
|
}
|
|
580
724
|
},
|
|
581
725
|
"required": [
|
|
@@ -595,6 +739,28 @@
|
|
|
595
739
|
{
|
|
596
740
|
"type": "string"
|
|
597
741
|
},
|
|
742
|
+
{
|
|
743
|
+
"type": "object",
|
|
744
|
+
"properties": {
|
|
745
|
+
"path": {
|
|
746
|
+
"type": "string",
|
|
747
|
+
"minLength": 1,
|
|
748
|
+
"description": "Build file or directory, relative to the including file"
|
|
749
|
+
},
|
|
750
|
+
"with": {
|
|
751
|
+
"$ref": "#/definitions/hammerkit/properties/envs",
|
|
752
|
+
"description": "Environment values for the current build task\nhttps://hammerkit.dev/docs/build-file/environment-variables"
|
|
753
|
+
},
|
|
754
|
+
"publish": {
|
|
755
|
+
"type": "boolean",
|
|
756
|
+
"description": "false: a server leaves out what this file declares"
|
|
757
|
+
}
|
|
758
|
+
},
|
|
759
|
+
"required": [
|
|
760
|
+
"path"
|
|
761
|
+
],
|
|
762
|
+
"additionalProperties": false
|
|
763
|
+
},
|
|
598
764
|
{
|
|
599
765
|
"type": "object",
|
|
600
766
|
"properties": {
|
|
@@ -615,6 +781,10 @@
|
|
|
615
781
|
"with": {
|
|
616
782
|
"$ref": "#/definitions/hammerkit/properties/envs",
|
|
617
783
|
"description": "Environment values for the current build task\nhttps://hammerkit.dev/docs/build-file/environment-variables"
|
|
784
|
+
},
|
|
785
|
+
"publish": {
|
|
786
|
+
"type": "boolean",
|
|
787
|
+
"description": "false: a server leaves out what this file declares"
|
|
618
788
|
}
|
|
619
789
|
},
|
|
620
790
|
"required": [
|
|
@@ -80,6 +80,12 @@ function createLocalCacheBackend(spec) {
|
|
|
80
80
|
return false;
|
|
81
81
|
}
|
|
82
82
|
},
|
|
83
|
+
async touch(taskId, stateKey, environment) {
|
|
84
|
+
const remoteDir = (0, path_1.join)(root, taskId, stateKey);
|
|
85
|
+
if (await environment.file.exists((0, path_1.join)(remoteDir, 'stats.json'))) {
|
|
86
|
+
await (0, promises_1.writeFile)((0, path_1.join)(remoteDir, LAST_ACCESS_FILE), `${Date.now()}`);
|
|
87
|
+
}
|
|
88
|
+
},
|
|
83
89
|
async push(taskId, stateKey, from, environment) {
|
|
84
90
|
const remoteDir = (0, path_1.join)(root, taskId, stateKey);
|
|
85
91
|
await environment.file.createDirectory(remoteDir);
|
|
@@ -117,6 +117,7 @@ class RegistryClient {
|
|
|
117
117
|
const send = () => fetch(url, {
|
|
118
118
|
method,
|
|
119
119
|
headers: { ...(init.headers ?? {}), ...(this.authorization ? { authorization: this.authorization } : {}) },
|
|
120
|
+
// BodyInit of Node's fetch, also when the dashboard checks these types with the DOM's
|
|
120
121
|
body: init.body?.(),
|
|
121
122
|
redirect: init.redirect ?? 'follow',
|
|
122
123
|
});
|
package/dist/cache/cache-sync.js
CHANGED
|
@@ -50,7 +50,7 @@ async function syncCache(workTree, options, environment) {
|
|
|
50
50
|
results.push(result('missing'));
|
|
51
51
|
continue;
|
|
52
52
|
}
|
|
53
|
-
await remote.push(item.id(), stateKey, await (0, archive_task_entry_1.archiveTaskEntry)(item, environment), environment);
|
|
53
|
+
await remote.push(item.id(), stateKey, await (0, archive_task_entry_1.archiveTaskEntry)(item, environment, stateKey), environment);
|
|
54
54
|
results.push(result('transferred'));
|
|
55
55
|
continue;
|
|
56
56
|
}
|
package/dist/cache/explain.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.explainWorkTree = exports.explainTask = exports.describeCause = void 0;
|
|
4
|
+
const work_task_1 = require("../planner/work-task");
|
|
4
5
|
const state_key_1 = require("../executer/scheduler/state-key");
|
|
5
6
|
const work_task_cache_description_1 = require("../optimizer/work-task-cache-description");
|
|
6
7
|
const get_cache_directory_1 = require("../optimizer/get-cache-directory");
|
|
@@ -157,6 +158,22 @@ async function explainTask(item, defaultCacheMethod, environment, memo = new Map
|
|
|
157
158
|
visiting.delete(item.id());
|
|
158
159
|
return explanation;
|
|
159
160
|
}
|
|
161
|
+
// Mirrors executeWorkTask: an aggregate is never looked up itself, and is reported
|
|
162
|
+
// cached when all its dependencies were. What changed is in its dependencies.
|
|
163
|
+
if ((0, work_task_1.isAggregateTask)(item.data)) {
|
|
164
|
+
const causes = [];
|
|
165
|
+
for (const dep of item.deps) {
|
|
166
|
+
const depExplanation = await explainTask(dep, defaultCacheMethod, environment, memo, visiting);
|
|
167
|
+
if (depExplanation.status !== 'hit') {
|
|
168
|
+
causes.push({ kind: 'dependency-changed', identifier: dep.name });
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
const status = causes.length === 0 ? 'hit' : 'miss';
|
|
172
|
+
const explanation = { taskId: item.id(), taskName: item.name, status, causes };
|
|
173
|
+
memo.set(item.id(), explanation);
|
|
174
|
+
visiting.delete(item.id());
|
|
175
|
+
return explanation;
|
|
176
|
+
}
|
|
160
177
|
const runtimeStateKey = await safeCurrentStateKey(item, environment);
|
|
161
178
|
const hasEntry = await safeHas(item, stateKey, environment);
|
|
162
179
|
const predictedHit = runtimeStateKey === stateKey || hasEntry;
|
package/dist/cli.js
CHANGED
|
@@ -79,7 +79,9 @@ class Cli {
|
|
|
79
79
|
explain: options?.explain ?? false,
|
|
80
80
|
cacheReadOnly: options?.cacheReadOnly ?? false,
|
|
81
81
|
timeout: options?.timeout ?? null,
|
|
82
|
+
maxTimeout: options?.maxTimeout ?? null,
|
|
82
83
|
skipDeps: options?.skipDeps ?? true,
|
|
84
|
+
restore: options?.restore ?? true,
|
|
83
85
|
wait: options?.wait ?? 'ready',
|
|
84
86
|
resourceCheck: options?.resourceCheck ?? true,
|
|
85
87
|
network: options?.network ?? null,
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! tailwindcss v4.3.5 | MIT License | https://tailwindcss.com */
|
|
2
|
+
@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:block))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-divide-y-reverse:0;--tw-border-style:solid;--tw-font-weight:initial;--tw-tracking:initial;--tw-ordinal:initial;--tw-slashed-zero:initial;--tw-numeric-figure:initial;--tw-numeric-spacing:initial;--tw-numeric-fraction:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-leading:initial}}}@layer theme{:root,:host{--font-sans:-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";--font-mono:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;--color-red-50:oklch(97.1% .013 17.38);--color-red-300:oklch(80.8% .114 19.571);--color-red-400:oklch(70.4% .191 22.216);--color-red-600:oklch(57.7% .245 27.325);--color-red-700:oklch(50.5% .213 27.518);--color-red-900:oklch(39.6% .141 25.723);--color-red-950:oklch(25.8% .092 26.042);--color-amber-50:oklch(98.7% .022 95.277);--color-amber-300:oklch(87.9% .169 91.605);--color-amber-400:oklch(82.8% .189 84.429);--color-amber-500:oklch(76.9% .188 70.08);--color-amber-600:oklch(66.6% .179 58.318);--color-amber-700:oklch(55.5% .163 48.998);--color-amber-950:oklch(27.9% .077 45.635);--color-emerald-50:oklch(97.9% .021 166.113);--color-emerald-300:oklch(84.5% .143 164.978);--color-emerald-400:oklch(76.5% .177 163.223);--color-emerald-500:oklch(69.6% .17 162.48);--color-emerald-600:oklch(59.6% .145 163.225);--color-emerald-700:oklch(50.8% .118 165.612);--color-emerald-950:oklch(26.2% .051 172.552);--color-sky-50:oklch(97.7% .013 236.62);--color-sky-300:oklch(82.8% .111 230.318);--color-sky-600:oklch(58.8% .158 241.966);--color-sky-700:oklch(50% .134 242.749);--color-sky-950:oklch(29.3% .066 243.157);--color-stone-50:oklch(98.5% .001 106.423);--color-stone-100:oklch(97% .001 106.424);--color-stone-200:oklch(92.3% .003 48.717);--color-stone-300:oklch(86.9% .005 56.366);--color-stone-400:oklch(70.9% .01 56.259);--color-stone-500:oklch(55.3% .013 58.071);--color-stone-600:oklch(44.4% .011 73.639);--color-stone-700:oklch(37.4% .01 67.558);--color-stone-800:oklch(26.8% .007 34.298);--color-stone-900:oklch(21.6% .006 56.043);--color-stone-950:oklch(14.7% .004 49.25);--color-white:#fff;--spacing:.25rem;--container-xs:20rem;--container-sm:24rem;--container-6xl:72rem;--text-xs:.75rem;--text-xs--line-height:calc(1 / .75);--text-sm:.875rem;--text-sm--line-height:calc(1.25 / .875);--text-base:1rem;--text-base--line-height:calc(1.5 / 1);--text-2xl:1.5rem;--text-2xl--line-height:calc(2 / 1.5);--font-weight-normal:400;--font-weight-medium:500;--font-weight-semibold:600;--tracking-tight:-.025em;--leading-relaxed:1.625;--radius-md:.375rem;--radius-lg:.5rem;--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring:where(:not(iframe)){outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab, red, red)){::placeholder{color:color-mix(in oklab, currentcolor 50%, transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}html{--lightningcss-light:initial;--lightningcss-dark: ;color-scheme:light dark;scrollbar-gutter:stable}@media (prefers-color-scheme:dark){html{--lightningcss-light: ;--lightningcss-dark:initial}}body{background-color:var(--color-stone-50);color:var(--color-stone-900);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}@media (prefers-color-scheme:dark){body{background-color:var(--color-stone-950);color:var(--color-stone-100)}}}@layer components{.link{color:var(--color-emerald-700);text-underline-offset:2px}@media (hover:hover){.link:hover{text-decoration-line:underline}}@media (prefers-color-scheme:dark){.link{color:var(--color-emerald-400)}}.log{border-radius:var(--radius-lg);background-color:var(--color-stone-950);padding:calc(var(--spacing) * 3);font-family:var(--font-mono);font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height));--tw-leading:var(--leading-relaxed);line-height:var(--leading-relaxed);white-space:pre;color:var(--color-stone-200);overflow-x:auto}@media (prefers-color-scheme:dark){.log{border-style:var(--tw-border-style);border-width:1px;border-color:var(--color-stone-800)}}}@layer utilities{.visible{visibility:visible}.absolute{position:absolute}.relative{position:relative}.inset-y-0{inset-block:0}.left-0{left:0}.order-last{order:9999}.container{width:100%}@media (width>=40rem){.container{max-width:40rem}}@media (width>=48rem){.container{max-width:48rem}}@media (width>=64rem){.container{max-width:64rem}}@media (width>=80rem){.container{max-width:80rem}}@media (width>=96rem){.container{max-width:96rem}}.mx-auto{margin-inline:auto}.my-1{margin-block:var(--spacing)}.my-2{margin-block:calc(var(--spacing) * 2)}.mt-1{margin-top:var(--spacing)}.mt-2{margin-top:calc(var(--spacing) * 2)}.mr-1{margin-right:var(--spacing)}.mb-1{margin-bottom:var(--spacing)}.mb-2{margin-bottom:calc(var(--spacing) * 2)}.mb-3{margin-bottom:calc(var(--spacing) * 3)}.mb-4{margin-bottom:calc(var(--spacing) * 4)}.mb-6{margin-bottom:calc(var(--spacing) * 6)}.mb-8{margin-bottom:calc(var(--spacing) * 8)}.ml-1{margin-left:var(--spacing)}.ml-2{margin-left:calc(var(--spacing) * 2)}.ml-auto{margin-left:auto}.contents{display:contents}.flex{display:flex}.grid{display:grid}.inline{display:inline}.inline-block{display:inline-block}.table{display:table}.h-2{height:calc(var(--spacing) * 2)}.h-5{height:calc(var(--spacing) * 5)}.min-h-20{min-height:calc(var(--spacing) * 20)}.min-h-screen{min-height:100vh}.w-5{width:calc(var(--spacing) * 5)}.w-full{width:100%}.max-w-6xl{max-width:var(--container-6xl)}.min-w-0{min-width:0}.flex-1{flex:1}.cursor-pointer{cursor:pointer}.list-disc{list-style-type:disc}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-\[max-content_1fr\]{grid-template-columns:max-content 1fr}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-baseline{align-items:baseline}.items-center{align-items:center}.justify-between{justify-content:space-between}.gap-1{gap:var(--spacing)}.gap-2{gap:calc(var(--spacing) * 2)}.gap-3{gap:calc(var(--spacing) * 3)}.gap-4{gap:calc(var(--spacing) * 4)}.gap-x-2{column-gap:calc(var(--spacing) * 2)}.gap-x-3{column-gap:calc(var(--spacing) * 3)}.gap-x-4{column-gap:calc(var(--spacing) * 4)}.gap-x-6{column-gap:calc(var(--spacing) * 6)}.gap-y-1{row-gap:var(--spacing)}.gap-y-1\.5{row-gap:calc(var(--spacing) * 1.5)}.gap-y-2{row-gap:calc(var(--spacing) * 2)}:where(.divide-y>:not(:last-child)){--tw-divide-y-reverse:0;border-bottom-style:var(--tw-border-style);border-top-style:var(--tw-border-style);border-top-width:calc(1px * var(--tw-divide-y-reverse));border-bottom-width:calc(1px * calc(1 - var(--tw-divide-y-reverse)))}:where(.divide-stone-100>:not(:last-child)){border-color:var(--color-stone-100)}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.rounded-full{border-radius:2147483647px}.rounded-lg{border-radius:var(--radius-lg)}.rounded-md{border-radius:var(--radius-md)}.border{border-style:var(--tw-border-style);border-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-b-2{border-bottom-style:var(--tw-border-style);border-bottom-width:2px}.border-dashed{--tw-border-style:dashed;border-style:dashed}.border-amber-500{border-color:var(--color-amber-500)}.border-amber-600\/40{border-color:#dd740066}@supports (color:color-mix(in lab, red, red)){.border-amber-600\/40{border-color:color-mix(in oklab, var(--color-amber-600) 40%, transparent)}}.border-emerald-600{border-color:var(--color-emerald-600)}.border-emerald-600\/40{border-color:#00976766}@supports (color:color-mix(in lab, red, red)){.border-emerald-600\/40{border-color:color-mix(in oklab, var(--color-emerald-600) 40%, transparent)}}.border-emerald-700{border-color:var(--color-emerald-700)}.border-red-300{border-color:var(--color-red-300)}.border-red-600\/40{border-color:#e4001466}@supports (color:color-mix(in lab, red, red)){.border-red-600\/40{border-color:color-mix(in oklab, var(--color-red-600) 40%, transparent)}}.border-sky-600\/40{border-color:#0084cc66}@supports (color:color-mix(in lab, red, red)){.border-sky-600\/40{border-color:color-mix(in oklab, var(--color-sky-600) 40%, transparent)}}.border-stone-200{border-color:var(--color-stone-200)}.border-stone-300{border-color:var(--color-stone-300)}.border-transparent{border-color:#0000}.bg-amber-50{background-color:var(--color-amber-50)}.bg-amber-500{background-color:var(--color-amber-500)}.bg-amber-700{background-color:var(--color-amber-700)}.bg-emerald-50{background-color:var(--color-emerald-50)}.bg-emerald-600{background-color:var(--color-emerald-600)}.bg-emerald-600\/30{background-color:#0097674d}@supports (color:color-mix(in lab, red, red)){.bg-emerald-600\/30{background-color:color-mix(in oklab, var(--color-emerald-600) 30%, transparent)}}.bg-red-50{background-color:var(--color-red-50)}.bg-sky-50{background-color:var(--color-sky-50)}.bg-stone-200{background-color:var(--color-stone-200)}.bg-white{background-color:var(--color-white)}.p-3{padding:calc(var(--spacing) * 3)}.p-4{padding:calc(var(--spacing) * 4)}.px-1\.5{padding-inline:calc(var(--spacing) * 1.5)}.px-2{padding-inline:calc(var(--spacing) * 2)}.px-3{padding-inline:calc(var(--spacing) * 3)}.px-4{padding-inline:calc(var(--spacing) * 4)}.py-1{padding-block:var(--spacing)}.py-2{padding-block:calc(var(--spacing) * 2)}.py-3{padding-block:calc(var(--spacing) * 3)}.py-6{padding-block:calc(var(--spacing) * 6)}.py-px{padding-block:1px}.pl-5{padding-left:calc(var(--spacing) * 5)}.text-left{text-align:left}.text-right{text-align:right}.align-top{vertical-align:top}.font-mono{font-family:var(--font-mono)}.text-2xl{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}.text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.text-\[0\.7rem\]{font-size:.7rem}.text-\[0\.85em\]{font-size:.85em}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-normal{--tw-font-weight:var(--font-weight-normal);font-weight:var(--font-weight-normal)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-tight{--tw-tracking:var(--tracking-tight);letter-spacing:var(--tracking-tight)}.break-words{overflow-wrap:break-word}.break-all{word-break:break-all}.whitespace-nowrap{white-space:nowrap}.whitespace-pre-wrap{white-space:pre-wrap}.text-amber-600{color:var(--color-amber-600)}.text-amber-700{color:var(--color-amber-700)}.text-emerald-700{color:var(--color-emerald-700)}.text-red-300{color:var(--color-red-300)}.text-red-700{color:var(--color-red-700)}.text-sky-700{color:var(--color-sky-700)}.text-stone-400{color:var(--color-stone-400)}.text-stone-500{color:var(--color-stone-500)}.text-stone-600{color:var(--color-stone-600)}.text-stone-900{color:var(--color-stone-900)}.text-white{color:var(--color-white)}.tabular-nums{--tw-numeric-spacing:tabular-nums;font-variant-numeric:var(--tw-ordinal, ) var(--tw-slashed-zero, ) var(--tw-numeric-figure, ) var(--tw-numeric-spacing, ) var(--tw-numeric-fraction, )}.shadow-xs{--tw-shadow:0 1px 2px 0 var(--tw-shadow-color,#0000000d);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}@media (hover:hover){.hover\:bg-emerald-700:hover{background-color:var(--color-emerald-700)}.hover\:bg-red-50:hover{background-color:var(--color-red-50)}.hover\:bg-stone-50:hover{background-color:var(--color-stone-50)}.hover\:text-stone-900:hover{color:var(--color-stone-900)}.hover\:underline:hover{text-decoration-line:underline}}.disabled\:opacity-50:disabled{opacity:.5}@media (width>=40rem){.sm\:max-w-sm{max-width:var(--container-sm)}.sm\:max-w-xs{max-width:var(--container-xs)}.sm\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}}@media (width>=48rem){.md\:order-none{order:0}.md\:w-auto{width:auto}.md\:flex-1{flex:1}}@media (width>=64rem){.lg\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.lg\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}}@media (width>=80rem){.xl\:grid-cols-5{grid-template-columns:repeat(5,minmax(0,1fr))}}@media (prefers-color-scheme:dark){:where(.dark\:divide-stone-800>:not(:last-child)){border-color:var(--color-stone-800)}.dark\:border-emerald-500{border-color:var(--color-emerald-500)}.dark\:border-red-900{border-color:var(--color-red-900)}.dark\:border-stone-700{border-color:var(--color-stone-700)}.dark\:border-stone-800{border-color:var(--color-stone-800)}.dark\:bg-amber-950{background-color:var(--color-amber-950)}.dark\:bg-emerald-400\/30{background-color:#00d2944d}@supports (color:color-mix(in lab, red, red)){.dark\:bg-emerald-400\/30{background-color:color-mix(in oklab, var(--color-emerald-400) 30%, transparent)}}.dark\:bg-emerald-500{background-color:var(--color-emerald-500)}.dark\:bg-emerald-950{background-color:var(--color-emerald-950)}.dark\:bg-red-950{background-color:var(--color-red-950)}.dark\:bg-sky-950{background-color:var(--color-sky-950)}.dark\:bg-stone-800{background-color:var(--color-stone-800)}.dark\:bg-stone-900{background-color:var(--color-stone-900)}.dark\:text-amber-300{color:var(--color-amber-300)}.dark\:text-amber-400{color:var(--color-amber-400)}.dark\:text-emerald-300{color:var(--color-emerald-300)}.dark\:text-emerald-400{color:var(--color-emerald-400)}.dark\:text-red-300{color:var(--color-red-300)}.dark\:text-red-400{color:var(--color-red-400)}.dark\:text-sky-300{color:var(--color-sky-300)}.dark\:text-stone-300{color:var(--color-stone-300)}.dark\:text-stone-400{color:var(--color-stone-400)}.dark\:text-stone-500{color:var(--color-stone-500)}.dark\:text-white{color:var(--color-white)}@media (hover:hover){.dark\:hover\:bg-red-950:hover{background-color:var(--color-red-950)}.dark\:hover\:bg-stone-800:hover{background-color:var(--color-stone-800)}.dark\:hover\:text-white:hover{color:var(--color-white)}}}}@property --tw-divide-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-ordinal{syntax:"*";inherits:false}@property --tw-slashed-zero{syntax:"*";inherits:false}@property --tw-numeric-figure{syntax:"*";inherits:false}@property --tw-numeric-spacing{syntax:"*";inherits:false}@property --tw-numeric-fraction{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-leading{syntax:"*";inherits:false}
|