@effected/cli 0.30.0 → 0.31.0

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.
@@ -29,7 +29,8 @@ var BuildFailedError = class extends Schema.TaggedError()("BuildFailedError", {
29
29
  */
30
30
  var PackageConfigError = class extends Schema.TaggedError()("PackageConfigError", { message: Schema.String }) {};
31
31
  /**
32
- * A file the build needs could not be read or written. Exit `3`, the infrastructure tier.
32
+ * A file the build needs could not be read or written, or another build of the same package held its lock for the
33
+ * whole wait. Exit `3`, the infrastructure tier.
33
34
  *
34
35
  * @public
35
36
  */
@@ -1,7 +1,7 @@
1
1
  import { IssuesDoc } from "../../render/IssuesDoc.js";
2
2
  import { resolveFormat } from "../schema/execute.js";
3
3
  import { BuildFailedError, PackageConfigError, PackageRunError } from "./errors.js";
4
- import { Console, Effect, Schema } from "effect";
4
+ import { Console, Effect, Option, Schema } from "effect";
5
5
  import { CliRuntime, Doc } from "@effected/cli-kit";
6
6
  import { StepSummary } from "@effected/engine/schema";
7
7
  import { Audience } from "@effected/env";
@@ -23,15 +23,24 @@ const execute = Effect.fn("effected.package.execute")(function* (input, deps) {
23
23
  const audience = yield* Audience;
24
24
  const { BuildRun, BuildRunResult, renderCiAnnotations } = yield* Effect.promise(() => import("@effected/engine/build"));
25
25
  const refused = (error) => Effect.fail(CliRuntime.reported(new PackageConfigError({ message: error.message }), 2));
26
+ const infrastructure = (error) => Effect.fail(CliRuntime.reported(new PackageRunError({ message: error.message }), 3));
27
+ const onProgress = (event) => event._tag === "Waiting" ? Console.error(Option.match(event.holder, {
28
+ onNone: () => `waiting for another build of this package (${event.lockPath})`,
29
+ onSome: (holder) => `waiting for another build of this package: process ${holder.pid}, building ${holder.cwd} since ${holder.startedAt} (${event.lockPath})`
30
+ })) : Effect.void;
26
31
  const result = yield* BuildRun.run({
27
32
  noExe: input.noExe,
28
33
  verbose: input.verbose
29
- }, deps).pipe(Effect.catchTags({
34
+ }, {
35
+ ...deps,
36
+ onProgress
37
+ }).pipe(Effect.catchTags({
30
38
  EffectedConfigError: refused,
31
39
  PluginLoadError: refused,
32
40
  NotAPackageError: refused,
33
41
  ConfigValidationError: refused,
34
- PlatformError: (error) => Effect.fail(CliRuntime.reported(new PackageRunError({ message: error.message }), 3))
42
+ BuildLockTimeoutError: infrastructure,
43
+ PlatformError: infrastructure
35
44
  }));
36
45
  const { issues } = result;
37
46
  if (format === "json") {
package/index.d.ts CHANGED
@@ -1,7 +1,11 @@
1
+ /**
2
+ * The `effected` command's tree and version. The runnable program is the
3
+ * `./main` entrypoint.
4
+ *
5
+ * @packageDocumentation
6
+ */
1
7
  import { Schema } from "effect";
2
8
  import { ActionRunDeps, BuildRunDeps } from "@effected/engine/build";
3
- import "@effected/env";
4
- import "effect/cli";
5
9
  import { SchemaRunDeps } from "@effected/engine/schema";
6
10
  declare const ActionBuildFailedError_base: Schema.Class<ActionBuildFailedError, Schema.TaggedStruct<"ActionBuildFailedError", {
7
11
  /** How many validation errors there were. */
@@ -98,7 +102,8 @@ declare const PackageRunError_base: Schema.Class<PackageRunError, Schema.TaggedS
98
102
  readonly message: Schema.String;
99
103
  }>, import("effect/Cause").YieldableError>;
100
104
  /**
101
- * A file the build needs could not be read or written. Exit `3`, the infrastructure tier.
105
+ * A file the build needs could not be read or written, or another build of the same package held its lock for the
106
+ * whole wait. Exit `3`, the infrastructure tier.
102
107
  *
103
108
  * @public
104
109
  */
package/main.d.ts CHANGED
@@ -1,8 +1,11 @@
1
+ /**
2
+ * The assembled `effected` program.
3
+ *
4
+ * @packageDocumentation
5
+ */
1
6
  import { Distribution } from "@effected/kit";
2
7
  import { Layer } from "effect";
3
- import "effect/cli";
4
8
  import { ActionRunDeps, BuildRunDeps } from "@effected/engine/build";
5
- import "@effected/env";
6
9
  import { SchemaRunDeps } from "@effected/engine/schema";
7
10
  /**
8
11
  * What `effected action` is given by the process boundary. `main` reads `cwd` and `ci`, and nothing else reads the
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@effected/cli",
3
- "version": "0.30.0",
3
+ "version": "0.31.0",
4
4
  "private": false,
5
5
  "description": "The effected command: the tool's command tree on the kit's front-end runtime",
6
6
  "keywords": [
@@ -43,12 +43,12 @@
43
43
  },
44
44
  "dependencies": {
45
45
  "@effect/platform-node": "4.1.3",
46
- "@effected/cli-kit": "^0.28.0",
47
- "@effected/engine": "0.16.0",
46
+ "@effected/cli-kit": "^0.28.1",
47
+ "@effected/engine": "0.17.0",
48
48
  "@effected/env": "^0.12.0",
49
49
  "@effected/glob": "^0.21.0",
50
50
  "@effected/kit": "^0.14.0",
51
- "@effected/walker": "^0.27.0",
51
+ "@effected/walker": "^0.28.0",
52
52
  "effect": "4.1.3",
53
53
  "ink": "^8.0.0",
54
54
  "react": "^19.3.0"
package/version.js CHANGED
@@ -6,6 +6,6 @@
6
6
  *
7
7
  * @public
8
8
  */
9
- const CLI_VERSION = "0.30.0";
9
+ const CLI_VERSION = "0.31.0";
10
10
 
11
11
  export { CLI_VERSION };