@thinair/factory 0.1.164 → 0.1.170

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 (2) hide show
  1. package/domain/step.ts +13 -0
  2. package/package.json +1 -1
package/domain/step.ts CHANGED
@@ -19,6 +19,19 @@ import { Context, Effect, Schema } from "effect";
19
19
  export const Tree = Schema.Struct({ path: Schema.String, commit: Schema.String });
20
20
  export type Tree = typeof Tree.Type;
21
21
 
22
+ /**
23
+ * How far a checkout still landing has got, as the plane answers a caller that takes it (`progress`): the plane goes on
24
+ * with it apart from the call, and the next call joins it. `received` of `size` bundle bytes are on the machine.
25
+ */
26
+ export const CheckoutLanding = Schema.TaggedStruct("Landing", {
27
+ stage: Schema.Literals(["bundling", "sending", "checking-out"]),
28
+ received: Schema.Int.check(Schema.isGreaterThanOrEqualTo(0)), size: Schema.Int.check(Schema.isGreaterThanOrEqualTo(0)),
29
+ });
30
+ export type CheckoutLanding = typeof CheckoutLanding.Type;
31
+ /** A checkout call's answer: its tree, or, for a caller that takes it, how far it has got. */
32
+ export const CheckoutAnswer = Schema.Union([Tree, CheckoutLanding]);
33
+ export type CheckoutAnswer = typeof CheckoutAnswer.Type;
34
+
22
35
  /** What a command did: plain data, no methods. */
23
36
  export const Ran = Schema.Struct({
24
37
  exit: Schema.Int,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thinair/factory",
3
- "version": "0.1.164",
3
+ "version": "0.1.170",
4
4
  "description": "The Thinair factory SDK: the language a factory's code is written in, and the loader that checks it.",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",