@mark1russell7/stack-tofu 0.1.3 → 0.2.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.
package/README.md CHANGED
@@ -73,7 +73,7 @@ const layer: TofuLayer = {
73
73
  | `values` | The arguments of the resource. |
74
74
  | `cost` | The planned cost of the resource in a month. It is the standing price. The cost that grows with the use is not in it. |
75
75
  | `keep` | `true`: the resource holds data or a name that must stay. |
76
- | `ignore` | The attributes whose changes outside the files are permitted. |
76
+ | `ignore` | The attributes whose changes outside the files are permitted. A path can name one key of a map in quotes, for example `metadata["ssh-keys"]`. |
77
77
  | `import` | The id of an object that exists at the provider. The files import the object as this resource. |
78
78
 
79
79
  | Field of a provider configuration | What it is |
@@ -117,7 +117,62 @@ renderValue({ name: "a ${literal} text", disk: { $ref: "example_disk.cloud-host.
117
117
  // => { name: "a $${literal} text", disk: "${example_disk.cloud-host.id}", token: "${var.example_token}" }
118
118
  ```
119
119
 
120
- A key that starts with `$` has no other use. The gate refuses an object with such a key that is not one of the two forms.
120
+ A key that starts with `$` has no other use. The gate refuses an object with such a key that is not one of the two forms. A resource of a group also has the parameter form, `{ "$param": "zone" }`.
121
+
122
+ ## Groups of resources
123
+
124
+ A group is one record for some resources that go together, for example a server, its disk and its firewall. A copy makes the resources of a group for one part. Thus a second host is one copy, not a second list of resources.
125
+
126
+ ```ts
127
+ import type { TofuLayer } from "@mark1russell7/stack-tofu";
128
+
129
+ const hosts: TofuLayer = {
130
+ schema: "tofu/1",
131
+ providers: [
132
+ { name: "example", source: "example-org/example", part: "cloud-account" },
133
+ { name: "example", alias: "east", source: "example-org/example", part: "cloud-account" },
134
+ ],
135
+ resources: [],
136
+ groups: [
137
+ {
138
+ name: "host",
139
+ params: [{ name: "zone" }, { name: "size", default: "small" }],
140
+ resources: [
141
+ { name: "disk", type: "example_disk", values: { zone: { $param: "zone" } }, cost: 1, keep: true },
142
+ { name: "server", type: "example_server", values: { size: { $param: "size" }, disk: { $ref: "example_disk.disk.id" } }, cost: 6 },
143
+ ],
144
+ },
145
+ ],
146
+ copies: [
147
+ { part: "cloud-host", group: "host", name: "west", values: { zone: "west" } },
148
+ { part: "cloud-host-2", group: "host", name: "east", values: { zone: "east", size: "large" }, providers: ["example.east"] },
149
+ ],
150
+ };
151
+ // The copy "west" makes example_disk.west_disk and example_server.west_server. Its server reads example_disk.west_disk.id.
152
+ ```
153
+
154
+ | Field of a group | What it is |
155
+ | --- | --- |
156
+ | `name` | The name of the group. |
157
+ | `params` | The parameters. Each one has a `name`, and it can have a `default` and a `description`. |
158
+ | `resources` | The resources. Each one has a local `name` and a `type`. It has the other fields of a resource, but not `part` and `import`. |
159
+
160
+ | Field of a copy | What it is |
161
+ | --- | --- |
162
+ | `part` | The `id` of the part that the resources of the copy make. |
163
+ | `group` | The name of the group. |
164
+ | `name` | The name of the copy. The default comes from the `id` of the part. |
165
+ | `values` | The value of each parameter. A parameter with a default can have no value here. |
166
+ | `providers` | Provider configurations, for example `example.east`. Each one replaces the configuration of the group with the same provider name. |
167
+
168
+ - The name of a resource of a copy is the name of the copy, `_` and the local name.
169
+ - A parameter form becomes the value of the copy, or the default of the parameter. The value itself does not change.
170
+ - A reference to a local address of the group, for example `example_disk.disk.id`, reads the resource of the same copy.
171
+ - A reference to a different address reads a resource of the layer, for example a network for each copy.
172
+
173
+ `layerResources(layer)` gives the resources of the layer and then the resources of each copy. The gate, the cost of each account, the queries and the generator read the resources through it. Thus a copy counts against the hard limit of its account, and its resources wait for the needs of its part.
174
+
175
+ A group with no copy makes no resource. Thus a group can hold a host for a later day, with no cost.
121
176
 
122
177
  ## The sequence of the resources
123
178
 
@@ -184,8 +239,18 @@ checkTofu(SAMPLE_TOFU, SAMPLE_STACK).map((fault) => fault.code);
184
239
  | `cost-over` | The planned cost of an account is more than its hard limit. |
185
240
  | `provider-need` | A warning: the part of a resource does not need the part of its provider configuration. |
186
241
  | `variable-unused` | A warning: no value reads a variable. |
187
-
188
- A fault has the address of its record in the field `at`, and the `id` of the part of the stack in the field `part`.
242
+ | `group-form` | The name of a group, of a parameter or of a copy does not have the form of a name, or a group has no resource. |
243
+ | `group-duplicate` | Two groups, two parameters of a group, two local addresses of a group or two copies have one name. |
244
+ | `group-shadow` | A local address of a group is the address of a resource of the layer. |
245
+ | `group-none` | A copy names a group that the layer does not have. |
246
+ | `param-none` | A parameter form names a parameter that its group does not have. |
247
+ | `param-missing` | A copy gives no value for a parameter with no default. |
248
+ | `param-unknown` | A copy gives a value for a parameter that its group does not have. |
249
+ | `copy-provider` | A configuration of a copy replaces no configuration of its group, or two of them have one provider name. |
250
+ | `group-unused` | A warning: no copy names a group. |
251
+ | `param-unused` | A warning: no resource of a group reads a parameter. |
252
+
253
+ A fault has the address of its record in the field `at`, and the `id` of the part of the stack in the field `part`. The address of a group is `group.<name>`, and that of a copy is `copy.<name>`. A fault of a resource of a copy has the address of that resource.
189
254
 
190
255
  The gate does not examine the stack. `checkStack` of the core does, and the generator uses the two functions.
191
256
 
@@ -361,6 +426,8 @@ The format `tofu/1` has resources, provider configurations, variables, one backe
361
426
  - The meta-arguments `count` and `for_each`, and provisioners.
362
427
  - A default value of a variable.
363
428
 
429
+ A group and its copies do the work of a module and of `for_each` in the records. The files have each resource of each copy, so a plan and a state name each one.
430
+
364
431
  A plan with a data source or a module gives the fault `plan-unknown`.
365
432
 
366
433
  ## The resources of some owners
@@ -369,11 +436,11 @@ A plan with a data source or a module gives the fault `plan-unknown`.
369
436
 
370
437
  - The resources, the provider configurations and the variables are in the order of the fragments.
371
438
  - A resource address in two or more fragments is a fault. Equal resources give the fault too.
372
- - The same rule holds for the address of a provider configuration and for the name of a variable.
439
+ - The same rule holds for the address of a provider configuration and for the name of a variable, a group or a copy.
373
440
  - The layer has one `version`. A fragment with a different value is a fault.
374
441
  - The state has one place. Thus a `backend` in two or more fragments is a fault.
375
442
 
376
- A resource of one fragment can use a provider configuration or a variable of a different fragment.
443
+ A resource of one fragment can use a provider configuration or a variable of a different fragment. A copy can name a group of a different fragment.
377
444
 
378
445
  ```ts
379
446
  import { joinTofu } from "@mark1russell7/stack-tofu";
package/build/add-on.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { o as TofuOptions } from "./check-COlnfceW.js";
2
- import { o as TofuLayer } from "./layer-MFHgwWfO.js";
1
+ import { o as TofuOptions } from "./check-B-gwXACy.js";
2
+ import { u as TofuLayer } from "./layer-Cz0jBEel.js";
3
3
  import { StackJoiner } from "@mark1russell7/system-stack";
4
4
  /**
5
5
  * This function gives the OpenTofu add-on for a check with the budgets of the accounts.
package/build/add-on.js CHANGED
@@ -1,5 +1,5 @@
1
- import { a as checkTofu, t as joinTofu } from "./join-1KKMeraY.js";
2
- import { n as TOFU_SCHEMA } from "./layer-C9IpaDIx.js";
1
+ import { a as checkTofu, t as joinTofu } from "./join-Ba3zzNsN.js";
2
+ import { n as TOFU_SCHEMA } from "./layer-CS1ZZFFP.js";
3
3
  import { parseTofu } from "./schema.js";
4
4
  // src/add-on.ts
5
5
  /**
@@ -1,4 +1,4 @@
1
- import { o as TofuLayer } from "./layer-MFHgwWfO.js";
1
+ import { u as TofuLayer } from "./layer-Cz0jBEel.js";
2
2
  import { Fault, Stack } from "@mark1russell7/system-stack";
3
3
  import { Expr, Result, Space } from "@mark1russell7/vex";
4
4
  /**
@@ -69,7 +69,7 @@ declare function accountStates(layer: TofuLayer, budgets?: readonly Budget[]): A
69
69
  /** This function gives the planned cost of a layer in a month: the sum of the planned costs of its accounts. */
70
70
  declare function plannedTotal(layer: TofuLayer): number;
71
71
  /** These are the codes of the faults of an OpenTofu layer. */
72
- declare const TOFU_CODES: readonly ["version", "backend", "variable-form", "variable-duplicate", "provider-form", "provider-duplicate", "provider-source", "provider-part", "provider-value", "resource-form", "resource-duplicate", "resource-part", "provider-none", "ignore-form", "value-name", "value-meta", "value-form", "value-number", "ref-none", "var-none", "cycle", "cost-amount", "cost-none", "cost-builtin", "budget-duplicate", "budget-amount", "budget-none", "limit-none", "cost-over", "provider-need", "variable-unused"];
72
+ declare const TOFU_CODES: readonly ["version", "backend", "variable-form", "variable-duplicate", "provider-form", "provider-duplicate", "provider-source", "provider-part", "provider-value", "resource-form", "resource-duplicate", "resource-part", "provider-none", "ignore-form", "value-name", "value-meta", "value-form", "value-number", "ref-none", "var-none", "cycle", "cost-amount", "cost-none", "cost-builtin", "budget-duplicate", "budget-amount", "budget-none", "limit-none", "cost-over", "provider-need", "variable-unused", "group-form", "group-duplicate", "group-shadow", "group-none", "param-none", "param-missing", "param-unknown", "copy-provider", "group-unused", "param-unused"];
73
73
  /** A code of a fault of an OpenTofu layer. */
74
74
  type TofuCode = (typeof TOFU_CODES)[number];
75
75
  /**
@@ -143,12 +143,18 @@ declare const PROVIDER_META: readonly string[];
143
143
  * - `limit-none`: the resources of an account have a planned cost above 0, and the account has no hard limit.
144
144
  * - `cost-over`: the planned cost of an account is more than its hard limit.
145
145
  *
146
+ * The groups and the copies, as errors: `group-form`, `group-duplicate`, `group-shadow`, `group-none`, `param-none`,
147
+ * `param-missing`, `param-unknown` and `copy-provider`. `groupFaults` tells each one. The gate also examines each resource of
148
+ * each copy as a resource, so a fault of a resource of a group comes at each copy.
149
+ *
146
150
  * The warnings:
147
151
  * - `provider-need`: the part of a resource does not need the part of its provider configuration. The stack does not show that dependence.
148
152
  * - `variable-unused`: no value reads a variable.
153
+ * - `group-unused`: no copy names a group.
154
+ * - `param-unused`: no resource of a group reads a parameter.
149
155
  *
150
156
  * The gate does not examine the stack: `checkStack` of the core does. The function is pure.
151
157
  */
152
158
  declare function checkTofu(layer: TofuLayer, stack: Stack, options?: TofuOptions): TofuFault[];
153
159
  export { resourceKey as C, plannedTotal as S, accountStates as _, TofuFault as a, evaluateCost as b, AccountState as c, PLANNED as d, PLANNED_OVER as f, accountKey as g, UNKNOWN_COSTS as h, TofuCode as i, Budget as l, PLANNED_TOTAL as m, RESOURCE_META as n, TofuOptions as o, PLANNED_ROOM as p, TOFU_CODES as r, checkTofu as s, PROVIDER_META as t, COST_LAYER_KEY as u, budgetsByPart as v, isZeroOrMore as x, costSpace as y };
154
- //# sourceMappingURL=check-COlnfceW.d.ts.map
160
+ //# sourceMappingURL=check-B-gwXACy.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"check-COlnfceW.d.ts","names":[],"sources":["../src/cost.ts","../src/check.ts"],"mappings":";;;;;;;UAYiB;;WAEN;;WAEA;;;cAIE;;iBAGG,WAAW;;iBAKX,YAAY;;iBAKZ,aAAa;;iBAKb,cAAc,kBAAkB,WAAW,YAAY;;cAU1D,SAAS;;cAMT,eAAe;;cAGf,cAAc;;cAGd,cAAc;;cAGd,eAAe;;;;;;;;;;;iBAYZ,UAAU,OAAO,WAAW,mBAAkB,WAAgB;;;;;iBAwB9D,aAAa,SAAS,MAAM,MAAM,OAAO,cAAc;;UAUtD;;WAEN;;WAEA;;WAEA;;WAEA;;WAEA;;WAEA;;WAEA;;;iBAIK,cAAc,OAAO,WAAW,mBAAkB,WAAgB;;iBA4BlE,aAAa,OAAO;;cCjJvB;;KAmED,mBAAmB;;;;;;;;;;;UAYd,kBAAkB;WACxB,MAAM;;WAEN;;;UAIM;;;;;WAKN,mBAAmB;;WAEnB;;;cAIE;;cAGA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAuDG,UAAU,OAAO,WAAW,OAAO,OAAO,UAAS,cAAmB"}
1
+ {"version":3,"file":"check-B-gwXACy.d.ts","names":[],"sources":["../src/cost.ts","../src/check.ts"],"mappings":";;;;;;;UAYiB;;WAEN;;WAEA;;;cAIE;;iBAGG,WAAW;;iBAKX,YAAY;;iBAKZ,aAAa;;iBAKb,cAAc,kBAAkB,WAAW,YAAY;;cAU1D,SAAS;;cAMT,eAAe;;cAGf,cAAc;;cAGd,cAAc;;cAGd,eAAe;;;;;;;;;;;iBAYZ,UAAU,OAAO,WAAW,mBAAkB,WAAgB;;;;;iBAwB9D,aAAa,SAAS,MAAM,MAAM,OAAO,cAAc;;UAUtD;;WAEN;;WAEA;;WAEA;;WAEA;;WAEA;;WAEA;;WAEA;;;iBAIK,cAAc,OAAO,WAAW,mBAAkB,WAAgB;;iBA4BlE,aAAa,OAAO;;cChJvB;;KAuFD,mBAAmB;;;;;;;;;;;UAYd,kBAAkB;WACxB,MAAM;;WAEN;;;UAIM;;;;;WAKN,mBAAmB;;WAEnB;;;cAIE;;cAGA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBA6DG,UAAU,OAAO,WAAW,OAAO,OAAO,UAAS,cAAmB"}
package/build/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
- import { _ as typeProvider, a as TOFU_SCHEMA, c as TofuValue, d as VariableType, f as isBuiltin, g as resourceProvider, h as resourceName, i as Resource, l as VARIABLE_TYPES, m as resourceAddress, n as Backend, o as TofuLayer, p as providerAddress, r as Provider, s as TofuObject, t as BUILTIN_PROVIDER, u as Variable } from "./layer-MFHgwWfO.js";
2
- import { C as resourceKey, S as plannedTotal, _ as accountStates, a as TofuFault, b as evaluateCost, c as AccountState, d as PLANNED, f as PLANNED_OVER, g as accountKey, h as UNKNOWN_COSTS, i as TofuCode, l as Budget, m as PLANNED_TOTAL, n as RESOURCE_META, o as TofuOptions, p as PLANNED_ROOM, r as TOFU_CODES, s as checkTofu, t as PROVIDER_META, u as COST_LAYER_KEY, v as budgetsByPart, x as isZeroOrMore, y as costSpace } from "./check-COlnfceW.js";
3
- import { a as PlanOptions, i as PlanFault, n as PlanChange, o as TofuPlan, r as PlanCode, s as checkPlan, t as PLAN_CODES } from "./plan-B4mHDZjK.js";
1
+ import { C as typeProvider, S as resourceProvider, _ as isBuiltin, a as GroupParam, b as resourceAddress, c as Resource, d as TofuObject, f as TofuValue, g as copyName, h as VariableType, i as Group, l as TOFU_SCHEMA, m as Variable, n as Backend, o as GroupResource, p as VARIABLE_TYPES, r as Copy, s as Provider, t as BUILTIN_PROVIDER, u as TofuLayer, v as partName, x as resourceName, y as providerAddress } from "./layer-Cz0jBEel.js";
2
+ import { C as resourceKey, S as plannedTotal, _ as accountStates, a as TofuFault, b as evaluateCost, c as AccountState, d as PLANNED, f as PLANNED_OVER, g as accountKey, h as UNKNOWN_COSTS, i as TofuCode, l as Budget, m as PLANNED_TOTAL, n as RESOURCE_META, o as TofuOptions, p as PLANNED_ROOM, r as TOFU_CODES, s as checkTofu, t as PROVIDER_META, u as COST_LAYER_KEY, v as budgetsByPart, x as isZeroOrMore, y as costSpace } from "./check-B-gwXACy.js";
3
+ import { a as PlanOptions, i as PlanFault, n as PlanChange, o as TofuPlan, r as PlanCode, s as checkPlan, t as PLAN_CODES } from "./plan-D04Q_k6n.js";
4
4
  import { Fault, LayerParse, LayerPiece, Stack } from "@mark1russell7/system-stack";
5
5
  /** The form of the type of a resource and of the type of a backend. */
6
6
  export declare const TYPE_FORM: RegExp;
@@ -8,7 +8,10 @@ export declare const TYPE_FORM: RegExp;
8
8
  export declare const PROVIDER_FORM: RegExp;
9
9
  /** The form of a name in the files: the name of a resource, of a variable, of an alias and of an argument. */
10
10
  export declare const NAME_FORM: RegExp;
11
- /** The form of a path of attributes, for example `network[0].address`. */
11
+ /**
12
+ * The form of a path of attributes, for example `network[0].address` or `metadata["ssh-keys"]`. A key of a map in quotes has
13
+ * letters, digits and the characters `_ . : / -` only. Thus a path holds no template sequence and no quote of its own.
14
+ */
12
15
  export declare const PATH_FORM: RegExp;
13
16
  /** The form of the address of a provider in a registry: two or three words with `/` between them. */
14
17
  export declare const SOURCE_FORM: RegExp;
@@ -34,6 +37,8 @@ export declare function isForm(value: TofuObject): boolean;
34
37
  export declare function refOf(value: TofuObject): string | undefined;
35
38
  /** This function gives the name of a correct variable form, `{ "$var": "name" }`. */
36
39
  export declare function varOf(value: TofuObject): string | undefined;
40
+ /** This function gives the name of a correct parameter form, `{ "$param": "name" }`. Only a resource of a group can have one. */
41
+ export declare function paramOf(value: TofuObject): string | undefined;
37
42
  /**
38
43
  * This function escapes the template sequences of a text. OpenTofu then reads the text as it is in the record.
39
44
  * `$${` is the escape of `${`, and `%%{` is the escape of `%{`.
@@ -70,7 +75,45 @@ export interface ValueUses {
70
75
  export declare function valueUses(value: TofuValue): ValueUses;
71
76
  /** This function gives a place in a value as a text, for example `disk.0.size`. The place of the value is `(the value)`. */
72
77
  export declare function pathText(path: ValuePath): string;
73
- /** This function gives the first resource of each address of a layer, in the sequence of the records. */
78
+ /** This function gives the local address of a resource of a group: its type, a point and its local name. */
79
+ export declare function localAddress(resource: GroupResource): string;
80
+ /** This function gives the name in the files of a resource of a copy: the name of the copy, `_` and the local name. */
81
+ export declare function copyResourceName(copy: Copy, resource: GroupResource): string;
82
+ /**
83
+ * This function gives the resources of the copies of a layer, in the sequence of the copies and of the resources of each group.
84
+ *
85
+ * - A resource of a copy makes the part of the copy. Its name is the name of the copy, `_` and its local name.
86
+ * - A parameter form becomes the value of the copy, or the default of the parameter.
87
+ * - A reference to a local address of the group reads the resource of the same copy.
88
+ * - A configuration of the copy replaces the configuration of the same provider name.
89
+ *
90
+ * A copy whose group the layer does not have, or that gives no value for a parameter with no default, makes no resource.
91
+ * For two groups with one name, the copies use the first one. The gate `checkTofu` gives a fault for each such record.
92
+ */
93
+ export declare function copyResources(layer: TofuLayer): Resource[];
94
+ /** This function gives each resource of a layer: the resources of the field `resources`, and then the resources of the copies. */
95
+ export declare function layerResources(layer: TofuLayer): readonly Resource[];
96
+ /**
97
+ * This function gives the faults of the groups and of the copies of a layer. `checkTofu` gives them with its other faults.
98
+ * The resources of the copies get the faults of each resource there: the gate examines them as resources.
99
+ *
100
+ * The errors:
101
+ * - `group-form`: the name of a group, of a parameter or of a copy does not have the form of a name. Or a group has no resource.
102
+ * - `group-duplicate`: two groups, two parameters of a group, two resources of a group with one local address, or two copies have one name.
103
+ * - `group-shadow`: a local address of a group is the address of a resource of the layer. A reference in the group then reads the copy.
104
+ * - `group-none`: a copy names a group that the layer does not have.
105
+ * - `param-none`: a parameter form of a group names a parameter that the group does not have.
106
+ * - `param-missing`: a copy gives no value for a parameter with no default.
107
+ * - `param-unknown`: a copy gives a value for a parameter that the group does not have.
108
+ * - `copy-provider`: a configuration of a copy replaces no configuration of the group, or two of them have one provider name.
109
+ * A configuration that the layer does not have gives `provider-none` at each resource of the copy.
110
+ *
111
+ * The warnings:
112
+ * - `group-unused`: no copy names a group.
113
+ * - `param-unused`: no resource of a group reads a parameter.
114
+ */
115
+ export declare function groupFaults(layer: TofuLayer): TofuFault[];
116
+ /** This function gives the first resource of each address of a layer, in the sequence of the records. The resources of the copies come last. */
74
117
  export declare function firstResources(layer: TofuLayer): readonly Resource[];
75
118
  /**
76
119
  * This function gives the addresses of the resources of each part, by the `id` of the part.
@@ -108,12 +151,13 @@ export declare function resourceCycles(layer: TofuLayer, stack: Stack): string[]
108
151
  *
109
152
  * - The resources, the provider configurations and the variables are in the order of the fragments.
110
153
  * - A resource address in two or more fragments is a fault, also when the resources are equal.
111
- * - The same rule holds for the address of a provider configuration and for the name of a variable.
154
+ * - The same rule holds for the address of a provider configuration, the name of a variable, of a group and of a copy.
112
155
  * - The layer has one version of OpenTofu. A fragment with a different value is a fault.
113
156
  * - The state has one place. Thus a backend in two or more fragments is a fault, also when the backends are equal.
114
157
  *
115
158
  * A resource of one fragment can use a provider configuration or a variable of a different fragment.
116
- * The joined layer has the field `providers` or `variables` when a fragment has it. The function is pure, and it
159
+ * A copy of one fragment can name a group of a different fragment.
160
+ * The joined layer has the field `providers`, `variables`, `groups` or `copies` when a fragment has it. The function is pure, and it
117
161
  * changes no layer. The gate `checkTofu` examines the joined layer afterward.
118
162
  *
119
163
  * @param pieces - The layers, with the name of the fragment of each one, in the order of the fragments.
@@ -167,5 +211,5 @@ export declare const SAMPLE_BUDGETS: readonly Budget[];
167
211
  * The gate of a plan passes for it.
168
212
  */
169
213
  export declare const SAMPLE_PLAN: TofuPlan;
170
- export { AccountState, BUILTIN_PROVIDER, Backend, Budget, COST_LAYER_KEY, PLANNED, PLANNED_OVER, PLANNED_ROOM, PLANNED_TOTAL, PLAN_CODES, PROVIDER_META, PlanChange, PlanCode, PlanFault, PlanOptions, Provider, RESOURCE_META, Resource, TOFU_CODES, TOFU_SCHEMA, TofuCode, TofuFault, TofuLayer, TofuObject, TofuOptions, TofuPlan, TofuValue, UNKNOWN_COSTS, VARIABLE_TYPES, Variable, VariableType, accountKey, accountStates, budgetsByPart, checkPlan, checkTofu, costSpace, evaluateCost, isBuiltin, isZeroOrMore, plannedTotal, providerAddress, resourceAddress, resourceKey, resourceName, resourceProvider, typeProvider };
214
+ export { AccountState, BUILTIN_PROVIDER, Backend, Budget, COST_LAYER_KEY, Copy, Group, GroupParam, GroupResource, PLANNED, PLANNED_OVER, PLANNED_ROOM, PLANNED_TOTAL, PLAN_CODES, PROVIDER_META, PlanChange, PlanCode, PlanFault, PlanOptions, Provider, RESOURCE_META, Resource, TOFU_CODES, TOFU_SCHEMA, TofuCode, TofuFault, TofuLayer, TofuObject, TofuOptions, TofuPlan, TofuValue, UNKNOWN_COSTS, VARIABLE_TYPES, Variable, VariableType, accountKey, accountStates, budgetsByPart, checkPlan, checkTofu, copyName, costSpace, evaluateCost, isBuiltin, isZeroOrMore, partName, plannedTotal, providerAddress, resourceAddress, resourceKey, resourceName, resourceProvider, typeProvider };
171
215
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","names":[],"sources":["../src/values.ts","../src/queries.ts","../src/join.ts","../src/generate.ts","../src/sample.ts"],"mappings":";;;;;qBAMa,WAAW;;qBAGX,eAAe;;qBAGf,WAAW;;qBAGX,WAAW;;qBAGX,aAAa;;qBAGb,cAAc;;iBAGV;WACN;WACA;;;;;;wBAOK,SAAS,cAAc;;wBAUvB,OAAO,OAAO,YAAY,kBAAkB;;wBAK5C,SAAS,OAAO,YAAY,SAAS;;wBAKrC,OAAO,OAAO;;wBAYd,MAAM,OAAO;;wBAMb,MAAM,OAAO;;;;;wBASb,eAAe;;;;;;;;;wBAaf,YAAY,OAAO,YAAY;;YAYnC;;iBAGK;WACN;WACA,MAAM;WACN;;;iBAIM;WACN,MAAM;WACN;;;iBAIM;WACN,gBAAgB;WAChB,kBAAkB;;;wBAIb,UAAU,OAAO,YAAY;;wBA8B7B,SAAS,MAAM;;wBCpJf,eAAe,OAAO,qBAAqB;;;;;wBAc3C,gBAAgB,OAAO,YAAY;;;;;wBAenC,aAAa,UAAU;;;;;wBAoCvB,YAAY,OAAO,OAAO,eAAe;;;;;;;;;;wBAazC,UAAU,OAAO,WAAW,OAAO,QAAQ;;;;;;wBAoB3C,eAAe,OAAO,WAAW,OAAO;;;;;;;;;;;;;;;;;wBCtFxC,SAAS,iBAAiB,WAAW,eAAe,WAAW;;qBCXlE;;qBAGA;;YAGD,eAAe;;;;;YAMf;WAAuB;WAAmB,UAAU;WAAuB,iBAAiB;;WAAuB;WAAoB,iBAAiB;;;;;;;;;;;;;wBAqHpJ,aAAa,OAAO,WAAW,OAAO,OAAO,UAAS,cAAmB;;wBAOzE,aAAa,UAAU;;;;;qBC1I1B,aAAa;;;;;qBAwBb,yBAAyB;;;;;qBAMzB,aAAa"}
1
+ {"version":3,"file":"index.d.ts","names":[],"sources":["../src/values.ts","../src/groups.ts","../src/queries.ts","../src/join.ts","../src/generate.ts","../src/sample.ts"],"mappings":";;;;;qBAMa,WAAW;;qBAGX,eAAe;;qBAGf,WAAW;;;;;qBAMX,WAAW;;qBAGX,aAAa;;qBAGb,cAAc;;iBAGV;WACN;WACA;;;;;;wBAOK,SAAS,cAAc;;wBAUvB,OAAO,OAAO,YAAY,kBAAkB;;wBAK5C,SAAS,OAAO,YAAY,SAAS;;wBAKrC,OAAO,OAAO;;wBAYd,MAAM,OAAO;;wBAMb,MAAM,OAAO;;wBAMb,QAAQ,OAAO;;;;;wBASf,eAAe;;;;;;;;;wBAaf,YAAY,OAAO,YAAY;;YAYnC;;iBAGK;WACN;WACA,MAAM;WACN;;;iBAIM;WACN,MAAM;WACN;;;iBAIM;WACN,gBAAgB;WAChB,kBAAkB;;;wBAIb,UAAU,OAAO,YAAY;;wBA8B7B,SAAS,MAAM;;wBClJf,aAAa,UAAU;;wBAKvB,iBAAiB,MAAM,MAAM,UAAU;;;;;;;;;;;;wBAoEvC,cAAc,OAAO,YAAY;;wBAyBjC,eAAe,OAAO,qBAAqB;;;;;;;;;;;;;;;;;;;;wBAqD3C,YAAY,OAAO,YAAY;;wBCjK/B,eAAe,OAAO,qBAAqB;;;;;wBAc3C,gBAAgB,OAAO,YAAY;;;;;wBAenC,aAAa,UAAU;;;;;wBAoCvB,YAAY,OAAO,OAAO,eAAe;;;;;;;;;;wBAazC,UAAU,OAAO,WAAW,OAAO,QAAQ;;;;;;wBAoB3C,eAAe,OAAO,WAAW,OAAO;;;;;;;;;;;;;;;;;;wBCtFxC,SAAS,iBAAiB,WAAW,eAAe,WAAW;;qBCZlE;;qBAGA;;YAGD,eAAe;;;;;YAMf;WAAuB;WAAmB,UAAU;WAAuB,iBAAiB;;WAAuB;WAAoB,iBAAiB;;;;;;;;;;;;;wBAqHpJ,aAAa,OAAO,WAAW,OAAO,OAAO,UAAS,cAAmB;;wBAOzE,aAAa,UAAU;;;;;qBC1I1B,aAAa;;;;;qBAwBb,yBAAyB;;;;;qBAMzB,aAAa"}
package/build/index.js CHANGED
@@ -1,5 +1,5 @@
1
- import { a as providerAddress, c as resourceProvider, i as isBuiltin, l as typeProvider, n as TOFU_SCHEMA, o as resourceAddress, r as VARIABLE_TYPES, s as resourceName, t as BUILTIN_PROVIDER } from "./layer-C9IpaDIx.js";
2
- import { A as TYPE_FORM, B as valueUses, C as resourceCycles, D as PATH_FORM, E as NAME_FORM, F as isObject, I as pathText, L as refOf, M as escapeTemplate, N as isForm, O as PROVIDER_FORM, P as isList, R as refParts, S as neededParts, T as resourcesByPart, V as varOf, _ as isZeroOrMore, a as checkTofu, b as dependsOn, c as PLANNED_OVER, d as UNKNOWN_COSTS, f as accountKey, g as evaluateCost, h as costSpace, i as TOFU_CODES, j as VERSION_FORM, k as SOURCE_FORM, l as PLANNED_ROOM, m as budgetsByPart, n as PROVIDER_META, o as COST_LAYER_KEY, p as accountStates, r as RESOURCE_META, s as PLANNED, t as joinTofu, u as PLANNED_TOTAL, v as plannedTotal, w as resourceRefs, x as firstResources, y as resourceKey, z as renderValue } from "./join-1KKMeraY.js";
1
+ import { a as isBuiltin, c as resourceAddress, d as typeProvider, i as copyName, l as resourceName, n as TOFU_SCHEMA, o as partName, r as VARIABLE_TYPES, s as providerAddress, t as BUILTIN_PROVIDER, u as resourceProvider } from "./layer-CS1ZZFFP.js";
2
+ import { A as localAddress, B as isObject, C as resourceCycles, D as copyResources, E as copyResourceName, F as TYPE_FORM, G as renderValue, H as pathText, I as VERSION_FORM, K as valueUses, L as escapeTemplate, M as PATH_FORM, N as PROVIDER_FORM, O as groupFaults, P as SOURCE_FORM, R as isForm, S as neededParts, T as resourcesByPart, U as refOf, V as paramOf, W as refParts, _ as isZeroOrMore, a as checkTofu, b as dependsOn, c as PLANNED_OVER, d as UNKNOWN_COSTS, f as accountKey, g as evaluateCost, h as costSpace, i as TOFU_CODES, j as NAME_FORM, k as layerResources, l as PLANNED_ROOM, m as budgetsByPart, n as PROVIDER_META, o as COST_LAYER_KEY, p as accountStates, q as varOf, r as RESOURCE_META, s as PLANNED, t as joinTofu, u as PLANNED_TOTAL, v as plannedTotal, w as resourceRefs, x as firstResources, y as resourceKey, z as isList } from "./join-Ba3zzNsN.js";
3
3
  import { checkStack } from "@mark1russell7/system-stack";
4
4
  // src/generate.ts
5
5
  /** The name of the file of a document. OpenTofu reads each file with the end `.tf.json` as its JSON syntax. */
@@ -292,6 +292,6 @@ const SAMPLE_PLAN = {
292
292
  }
293
293
  ]
294
294
  };
295
- export { BUILTIN_PROVIDER, COST_LAYER_KEY, DOCUMENT_COMMENT, DOCUMENT_FILE, NAME_FORM, PATH_FORM, PLANNED, PLANNED_OVER, PLANNED_ROOM, PLANNED_TOTAL, PLAN_CODES, PROVIDER_FORM, PROVIDER_META, RESOURCE_META, SAMPLE_BUDGETS, SAMPLE_PLAN, SAMPLE_TOFU, SOURCE_FORM, TOFU_CODES, TOFU_SCHEMA, TYPE_FORM, UNKNOWN_COSTS, VARIABLE_TYPES, VERSION_FORM, accountKey, accountStates, budgetsByPart, checkPlan, checkTofu, costSpace, dependsOn, documentText, escapeTemplate, evaluateCost, firstResources, generateTofu, isBuiltin, isForm, isList, isObject, isZeroOrMore, joinTofu, neededParts, pathText, plannedTotal, providerAddress, refOf, refParts, renderValue, resourceAddress, resourceCycles, resourceKey, resourceName, resourceProvider, resourceRefs, resourcesByPart, typeProvider, valueUses, varOf };
295
+ export { BUILTIN_PROVIDER, COST_LAYER_KEY, DOCUMENT_COMMENT, DOCUMENT_FILE, NAME_FORM, PATH_FORM, PLANNED, PLANNED_OVER, PLANNED_ROOM, PLANNED_TOTAL, PLAN_CODES, PROVIDER_FORM, PROVIDER_META, RESOURCE_META, SAMPLE_BUDGETS, SAMPLE_PLAN, SAMPLE_TOFU, SOURCE_FORM, TOFU_CODES, TOFU_SCHEMA, TYPE_FORM, UNKNOWN_COSTS, VARIABLE_TYPES, VERSION_FORM, accountKey, accountStates, budgetsByPart, checkPlan, checkTofu, copyName, copyResourceName, copyResources, costSpace, dependsOn, documentText, escapeTemplate, evaluateCost, firstResources, generateTofu, groupFaults, isBuiltin, isForm, isList, isObject, isZeroOrMore, joinTofu, layerResources, localAddress, neededParts, paramOf, partName, pathText, plannedTotal, providerAddress, refOf, refParts, renderValue, resourceAddress, resourceCycles, resourceKey, resourceName, resourceProvider, resourceRefs, resourcesByPart, typeProvider, valueUses, varOf };
296
296
 
297
297
  //# sourceMappingURL=index.js.map