@terraforge/terraform 0.0.11 → 0.0.12

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/dist/index.d.mts CHANGED
@@ -107,7 +107,6 @@ declare class Stack extends Group {
107
107
  readonly app: App;
108
108
  readonly dependencies: Set<Stack>;
109
109
  constructor(app: App, name: string);
110
- dependsOn(...stacks: Stack[]): this;
111
110
  }
112
111
  //#endregion
113
112
  //#region ../core/src/meta.d.ts
@@ -115,7 +114,7 @@ type Tag = 'resource' | 'data';
115
114
  type State = Record<string, any>;
116
115
  type Config = {
117
116
  /** Specify additional explicit dependencies in addition to the ones in the dependency graph. */
118
- dependsOn?: Resource[];
117
+ dependsOn?: Array<Resource | DataSource>;
119
118
  /** Pass an ID of an explicitly configured provider, instead of using the default provider. */
120
119
  provider?: string;
121
120
  };
package/dist/index.mjs CHANGED
@@ -301,12 +301,17 @@ var TerraformProvider = class {
301
301
  //#endregion
302
302
  //#region src/plugin/diagnostic.ts
303
303
  var DiagnosticsError = class extends Error {
304
- diagnostics;
305
304
  constructor(diagnostics) {
306
- super(diagnostics[0]?.summary ?? "Diagnostic error");
305
+ super(formatDiagnosticErrorMessage(diagnostics));
307
306
  this.diagnostics = diagnostics;
308
307
  }
309
308
  };
309
+ const formatDiagnosticErrorMessage = (diagnostics) => {
310
+ if (diagnostics.length === 0) return "Unknown diagnostic error";
311
+ const diagnostic = diagnostics[0];
312
+ if (diagnostic.detail) return `${diagnostic.summary}\n${diagnostic.detail}`;
313
+ return diagnostic.summary;
314
+ };
310
315
  const throwDiagnosticError = (response) => {
311
316
  return new DiagnosticsError(response.diagnostics.map((item) => ({
312
317
  severity: item.severity === 1 ? "error" : "warning",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@terraforge/terraform",
3
- "version": "0.0.11",
3
+ "version": "0.0.12",
4
4
  "type": "module",
5
5
  "repository": {
6
6
  "type": "git",
@@ -26,7 +26,7 @@
26
26
  "test": "bun test"
27
27
  },
28
28
  "peerDependencies": {
29
- "@terraforge/core": "0.0.10"
29
+ "@terraforge/core": "0.0.11"
30
30
  },
31
31
  "dependencies": {
32
32
  "@grpc/grpc-js": "1.12.6",