@terraforge/terraform 0.0.12 → 0.0.13
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.mjs +9 -5
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -309,7 +309,7 @@ var DiagnosticsError = class extends Error {
|
|
|
309
309
|
const formatDiagnosticErrorMessage = (diagnostics) => {
|
|
310
310
|
if (diagnostics.length === 0) return "Unknown diagnostic error";
|
|
311
311
|
const diagnostic = diagnostics[0];
|
|
312
|
-
if (diagnostic.detail) return `${diagnostic.summary}\n${diagnostic.detail}`;
|
|
312
|
+
if (diagnostic.detail) return `${diagnostic.summary}\n\n${diagnostic.detail}`;
|
|
313
313
|
return diagnostic.summary;
|
|
314
314
|
};
|
|
315
315
|
const throwDiagnosticError = (response) => {
|
|
@@ -2349,8 +2349,10 @@ const createTerraformProxy = (props) => {
|
|
|
2349
2349
|
const type = snakeCase([props.namespace, ...ns].join("_"));
|
|
2350
2350
|
const meta = createMeta("resource", `terraform:${props.namespace}:${config?.provider ?? "default"}`, parent, type, id, input, config);
|
|
2351
2351
|
const resource = createResourceProxy((key) => {
|
|
2352
|
-
if (typeof key === "string")
|
|
2353
|
-
|
|
2352
|
+
if (typeof key === "string") {
|
|
2353
|
+
if (key === "urn") return meta.urn;
|
|
2354
|
+
return meta.output((data) => data[key]);
|
|
2355
|
+
} else if (key === nodeMetaSymbol) return meta;
|
|
2354
2356
|
});
|
|
2355
2357
|
parent.add(resource);
|
|
2356
2358
|
return resource;
|
|
@@ -2359,8 +2361,10 @@ const createTerraformProxy = (props) => {
|
|
|
2359
2361
|
const type = snakeCase([props.namespace, ...ns].join("_"));
|
|
2360
2362
|
const meta = createMeta("data", `terraform:${props.namespace}:${config?.provider ?? "default"}`, parent, type, id, input, config);
|
|
2361
2363
|
const dataSource = createResourceProxy((key) => {
|
|
2362
|
-
if (typeof key === "string")
|
|
2363
|
-
|
|
2364
|
+
if (typeof key === "string") {
|
|
2365
|
+
if (key === "urn") return meta.urn;
|
|
2366
|
+
return meta.output((data) => data[key]);
|
|
2367
|
+
} else if (key === nodeMetaSymbol) return meta;
|
|
2364
2368
|
});
|
|
2365
2369
|
parent.add(dataSource);
|
|
2366
2370
|
return dataSource;
|