@staticforge/iac 0.0.0-stage → 0.1.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/LICENSE +21 -0
- package/README.md +6 -2
- package/dist/.tsbuildinfo +1 -0
- package/dist/download.d.ts +23 -0
- package/dist/download.d.ts.map +1 -0
- package/dist/download.js +105 -0
- package/dist/download.js.map +1 -0
- package/dist/engine.d.ts +40 -0
- package/dist/engine.d.ts.map +1 -0
- package/dist/engine.js +131 -0
- package/dist/engine.js.map +1 -0
- package/dist/index.d.ts +8 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +8 -0
- package/dist/index.js.map +1 -0
- package/dist/operations.d.ts +78 -0
- package/dist/operations.d.ts.map +1 -0
- package/dist/operations.js +185 -0
- package/dist/operations.js.map +1 -0
- package/dist/provision.d.ts +128 -0
- package/dist/provision.d.ts.map +1 -0
- package/dist/provision.js +314 -0
- package/dist/provision.js.map +1 -0
- package/dist/runner.d.ts +47 -0
- package/dist/runner.d.ts.map +1 -0
- package/dist/runner.js +151 -0
- package/dist/runner.js.map +1 -0
- package/dist/spec.d.ts +87 -0
- package/dist/spec.d.ts.map +1 -0
- package/dist/spec.js +13 -0
- package/dist/spec.js.map +1 -0
- package/dist/tar.d.ts +6 -0
- package/dist/tar.d.ts.map +1 -0
- package/dist/tar.js +41 -0
- package/dist/tar.js.map +1 -0
- package/dist/workspace.d.ts +28 -0
- package/dist/workspace.d.ts.map +1 -0
- package/dist/workspace.js +114 -0
- package/dist/workspace.js.map +1 -0
- package/package.json +39 -3
package/dist/spec.js
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/** `iac.name`, or the host of site.baseUrl as a resource-name-safe slug. */
|
|
2
|
+
export function projectName(config) {
|
|
3
|
+
if (config.iac.name !== undefined)
|
|
4
|
+
return config.iac.name;
|
|
5
|
+
const host = new URL(config.site.baseUrl).hostname.toLowerCase();
|
|
6
|
+
const slug = host
|
|
7
|
+
.replace(/[^a-z0-9]+/g, '-')
|
|
8
|
+
.replace(/^-+|-+$/g, '')
|
|
9
|
+
.slice(0, 40)
|
|
10
|
+
.replace(/-+$/, '');
|
|
11
|
+
return /^[a-z]/.test(slug) ? slug : `s-${slug}`.slice(0, 40);
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=spec.js.map
|
package/dist/spec.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"spec.js","sourceRoot":"","sources":["../src/spec.ts"],"names":[],"mappings":"AAwFA,4EAA4E;AAC5E,MAAM,UAAU,WAAW,CAAC,MAAoB;IAC9C,IAAI,MAAM,CAAC,GAAG,CAAC,IAAI,KAAK,SAAS;QAAE,OAAO,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC;IAC1D,MAAM,IAAI,GAAG,IAAI,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,QAAQ,CAAC,WAAW,EAAE,CAAC;IACjE,MAAM,IAAI,GAAG,IAAI;SACd,OAAO,CAAC,aAAa,EAAE,GAAG,CAAC;SAC3B,OAAO,CAAC,UAAU,EAAE,EAAE,CAAC;SACvB,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC;SACZ,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;IACtB,OAAO,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,IAAI,EAAE,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;AAC/D,CAAC"}
|
package/dist/tar.d.ts
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Extract one regular file from a gzipped tar archive (ustar or GNU, as
|
|
3
|
+
* produced by OpenTofu's release builds). Returns undefined when absent.
|
|
4
|
+
*/
|
|
5
|
+
export declare function extractFromTarGz(archive: Buffer, name: string): Buffer | undefined;
|
|
6
|
+
//# sourceMappingURL=tar.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tar.d.ts","sourceRoot":"","sources":["../src/tar.ts"],"names":[],"mappings":"AAeA;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAwBlF"}
|
package/dist/tar.js
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { gunzipSync } from 'node:zlib';
|
|
2
|
+
const BLOCK = 512;
|
|
3
|
+
function field(header, offset, length) {
|
|
4
|
+
const raw = header.subarray(offset, offset + length);
|
|
5
|
+
const end = raw.indexOf(0);
|
|
6
|
+
return raw.subarray(0, end === -1 ? length : end).toString('utf8');
|
|
7
|
+
}
|
|
8
|
+
function octal(header, offset, length) {
|
|
9
|
+
const text = field(header, offset, length).trim();
|
|
10
|
+
return text === '' ? 0 : Number.parseInt(text, 8);
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Extract one regular file from a gzipped tar archive (ustar or GNU, as
|
|
14
|
+
* produced by OpenTofu's release builds). Returns undefined when absent.
|
|
15
|
+
*/
|
|
16
|
+
export function extractFromTarGz(archive, name) {
|
|
17
|
+
const tar = gunzipSync(archive);
|
|
18
|
+
let longName;
|
|
19
|
+
for (let offset = 0; offset + BLOCK <= tar.length;) {
|
|
20
|
+
const header = tar.subarray(offset, offset + BLOCK);
|
|
21
|
+
if (header.every((byte) => byte === 0))
|
|
22
|
+
break;
|
|
23
|
+
const size = octal(header, 124, 12);
|
|
24
|
+
const type = String.fromCharCode(header[156] ?? 0);
|
|
25
|
+
const prefix = field(header, 345, 155);
|
|
26
|
+
const entryName = longName ?? (prefix !== '' ? `${prefix}/` : '') + field(header, 0, 100);
|
|
27
|
+
const dataStart = offset + BLOCK;
|
|
28
|
+
offset = dataStart + Math.ceil(size / BLOCK) * BLOCK;
|
|
29
|
+
longName = undefined;
|
|
30
|
+
if (type === 'L') {
|
|
31
|
+
// GNU long name: the data block holds the next entry's name.
|
|
32
|
+
longName = field(tar.subarray(dataStart, dataStart + size), 0, size);
|
|
33
|
+
continue;
|
|
34
|
+
}
|
|
35
|
+
if ((type === '0' || type === '\0') && entryName.replace(/^\.\//, '') === name) {
|
|
36
|
+
return Buffer.from(tar.subarray(dataStart, dataStart + size));
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
return undefined;
|
|
40
|
+
}
|
|
41
|
+
//# sourceMappingURL=tar.js.map
|
package/dist/tar.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tar.js","sourceRoot":"","sources":["../src/tar.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAEvC,MAAM,KAAK,GAAG,GAAG,CAAC;AAElB,SAAS,KAAK,CAAC,MAAc,EAAE,MAAc,EAAE,MAAc;IAC3D,MAAM,GAAG,GAAG,MAAM,CAAC,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,CAAC;IACrD,MAAM,GAAG,GAAG,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;IAC3B,OAAO,GAAG,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;AACrE,CAAC;AAED,SAAS,KAAK,CAAC,MAAc,EAAE,MAAc,EAAE,MAAc;IAC3D,MAAM,IAAI,GAAG,KAAK,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC,IAAI,EAAE,CAAC;IAClD,OAAO,IAAI,KAAK,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC;AACpD,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,gBAAgB,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,CAAC,IAAI,KAAK,GAAG,IAAI,IAAI,KAAK,IAAI,CAAC,IAAI,SAAS,CAAC,OAAO,CAAC,OAAO,EAAE,EAAE,CAAC,KAAK,IAAI,EAAE,CAAC;YAC/E,OAAO,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,SAAS,EAAE,SAAS,GAAG,IAAI,CAAC,CAAC,CAAC;QAChE,CAAC;IACH,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { IacSpec } from './spec.js';
|
|
2
|
+
/** Root of the generated workspaces inside a project. */
|
|
3
|
+
export declare const IAC_DIR: string;
|
|
4
|
+
/** `.sforge/iac/<target>/` of a project. */
|
|
5
|
+
export declare function workspaceDir(rootDir: string, name: string): string;
|
|
6
|
+
/** User-supplied HCL merged into a target's workspace (`infra/<target>/*.tf`). */
|
|
7
|
+
export declare function extraHclDir(rootDir: string, targetName: string): string;
|
|
8
|
+
export interface WriteWorkspaceOptions {
|
|
9
|
+
dir: string;
|
|
10
|
+
spec: IacSpec;
|
|
11
|
+
/** Copy the module into `modules/<name>/` instead of referencing the packaged copy. */
|
|
12
|
+
vendor?: boolean;
|
|
13
|
+
/** Directory of extra `.tf` / `.tf.json` files to merge into the workspace. */
|
|
14
|
+
extraDir?: string;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Write the root workspace for a spec:
|
|
18
|
+
* - `main.tf.json`: required providers, provider configs, a module block that
|
|
19
|
+
* passes every input from a root variable, and the re-exported outputs;
|
|
20
|
+
* - `backend.tf.json` (absent for local state);
|
|
21
|
+
* - `terraform.tfvars.json`: the module inputs;
|
|
22
|
+
* - `.gitignore`: keeps `.terraform/`, plans and local state out of git.
|
|
23
|
+
* The `.terraform.lock.hcl` written by `init` is meant to be committed.
|
|
24
|
+
*
|
|
25
|
+
* @returns The files written, relative to the workspace.
|
|
26
|
+
*/
|
|
27
|
+
export declare function writeWorkspace(options: WriteWorkspaceOptions): string[];
|
|
28
|
+
//# sourceMappingURL=workspace.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workspace.d.ts","sourceRoot":"","sources":["../src/workspace.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEzC,yDAAyD;AACzD,eAAO,MAAM,OAAO,QAAyB,CAAC;AAE9C,4CAA4C;AAC5C,wBAAgB,YAAY,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAElE;AAED,kFAAkF;AAClF,wBAAgB,WAAW,CAAC,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,MAAM,CAEvE;AAQD,MAAM,WAAW,qBAAqB;IACpC,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,OAAO,CAAC;IACd,uFAAuF;IACvF,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,+EAA+E;IAC/E,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAUD;;;;;;;;;;GAUG;AACH,wBAAgB,cAAc,CAAC,OAAO,EAAE,qBAAqB,GAAG,MAAM,EAAE,CAuFvE"}
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
import { cpSync, existsSync, mkdirSync, readdirSync, rmSync, statSync, writeFileSync, } from 'node:fs';
|
|
2
|
+
import { basename, join, relative, sep } from 'node:path';
|
|
3
|
+
import { MIN_ENGINE_VERSION } from './engine.js';
|
|
4
|
+
/** Root of the generated workspaces inside a project. */
|
|
5
|
+
export const IAC_DIR = join('.sforge', 'iac');
|
|
6
|
+
/** `.sforge/iac/<target>/` of a project. */
|
|
7
|
+
export function workspaceDir(rootDir, name) {
|
|
8
|
+
return join(rootDir, IAC_DIR, name);
|
|
9
|
+
}
|
|
10
|
+
/** User-supplied HCL merged into a target's workspace (`infra/<target>/*.tf`). */
|
|
11
|
+
export function extraHclDir(rootDir, targetName) {
|
|
12
|
+
return join(rootDir, 'infra', targetName);
|
|
13
|
+
}
|
|
14
|
+
const GENERATED_NOTE = 'Generated by staticforge; rewritten before every run. Add your own .tf files to infra/<target>/.';
|
|
15
|
+
/** Prefix of files copied from infra/<target>/, so they can be replaced on the next run. */
|
|
16
|
+
const EXTRA_PREFIX = 'infra_';
|
|
17
|
+
function toPosix(path) {
|
|
18
|
+
return path.split(sep).join('/');
|
|
19
|
+
}
|
|
20
|
+
function writeJson(path, value) {
|
|
21
|
+
writeFileSync(path, `${JSON.stringify(value, null, 2)}\n`);
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Write the root workspace for a spec:
|
|
25
|
+
* - `main.tf.json`: required providers, provider configs, a module block that
|
|
26
|
+
* passes every input from a root variable, and the re-exported outputs;
|
|
27
|
+
* - `backend.tf.json` (absent for local state);
|
|
28
|
+
* - `terraform.tfvars.json`: the module inputs;
|
|
29
|
+
* - `.gitignore`: keeps `.terraform/`, plans and local state out of git.
|
|
30
|
+
* The `.terraform.lock.hcl` written by `init` is meant to be committed.
|
|
31
|
+
*
|
|
32
|
+
* @returns The files written, relative to the workspace.
|
|
33
|
+
*/
|
|
34
|
+
export function writeWorkspace(options) {
|
|
35
|
+
const { dir, spec } = options;
|
|
36
|
+
mkdirSync(dir, { recursive: true });
|
|
37
|
+
const written = [];
|
|
38
|
+
let source;
|
|
39
|
+
const vendored = join(dir, 'modules', spec.module.name);
|
|
40
|
+
rmSync(vendored, { recursive: true, force: true });
|
|
41
|
+
if (options.vendor) {
|
|
42
|
+
cpSync(spec.module.dir, vendored, {
|
|
43
|
+
recursive: true,
|
|
44
|
+
filter: (path) => !/[\\/](\.terraform|tests)([\\/]|$)/.test(path.slice(spec.module.dir.length)),
|
|
45
|
+
});
|
|
46
|
+
source = `./modules/${spec.module.name}`;
|
|
47
|
+
}
|
|
48
|
+
else {
|
|
49
|
+
const rel = toPosix(relative(dir, spec.module.dir));
|
|
50
|
+
source = rel.startsWith('.') ? rel : `./${rel}`;
|
|
51
|
+
}
|
|
52
|
+
const inputs = Object.keys(spec.module.inputs).sort();
|
|
53
|
+
const main = {
|
|
54
|
+
'//': GENERATED_NOTE,
|
|
55
|
+
terraform: {
|
|
56
|
+
required_version: `>= ${MIN_ENGINE_VERSION}`,
|
|
57
|
+
required_providers: spec.requiredProviders,
|
|
58
|
+
},
|
|
59
|
+
provider: spec.providers,
|
|
60
|
+
variable: Object.fromEntries(inputs.map((name) => [name, {}])),
|
|
61
|
+
module: {
|
|
62
|
+
[spec.module.name]: {
|
|
63
|
+
source,
|
|
64
|
+
...(spec.module.providers && { providers: spec.module.providers }),
|
|
65
|
+
...Object.fromEntries(inputs.map((name) => [name, `\${var.${name}}`])),
|
|
66
|
+
},
|
|
67
|
+
},
|
|
68
|
+
...(spec.outputs.length > 0 && {
|
|
69
|
+
output: Object.fromEntries(spec.outputs.map((name) => [name, { value: `\${module.${spec.module.name}.${name}}` }])),
|
|
70
|
+
}),
|
|
71
|
+
};
|
|
72
|
+
writeJson(join(dir, 'main.tf.json'), main);
|
|
73
|
+
written.push('main.tf.json');
|
|
74
|
+
const backendFile = join(dir, 'backend.tf.json');
|
|
75
|
+
if (spec.backend.type === 'local') {
|
|
76
|
+
rmSync(backendFile, { force: true });
|
|
77
|
+
}
|
|
78
|
+
else {
|
|
79
|
+
writeJson(backendFile, {
|
|
80
|
+
'//': GENERATED_NOTE,
|
|
81
|
+
terraform: { backend: { [spec.backend.type]: spec.backend.config } },
|
|
82
|
+
});
|
|
83
|
+
written.push('backend.tf.json');
|
|
84
|
+
}
|
|
85
|
+
writeJson(join(dir, 'terraform.tfvars.json'), spec.module.inputs);
|
|
86
|
+
written.push('terraform.tfvars.json');
|
|
87
|
+
// Without vendoring, main.tf.json holds a path into node_modules that differs per machine.
|
|
88
|
+
writeFileSync(join(dir, '.gitignore'), [
|
|
89
|
+
`# ${GENERATED_NOTE}`,
|
|
90
|
+
'/.terraform/',
|
|
91
|
+
'/tfplan',
|
|
92
|
+
'/terraform.tfstate',
|
|
93
|
+
'/terraform.tfstate.*',
|
|
94
|
+
...(options.vendor ? [] : ['/main.tf.json']),
|
|
95
|
+
'',
|
|
96
|
+
].join('\n'));
|
|
97
|
+
written.push('.gitignore');
|
|
98
|
+
for (const name of readdirSync(dir)) {
|
|
99
|
+
if (name.startsWith(EXTRA_PREFIX))
|
|
100
|
+
rmSync(join(dir, name), { force: true });
|
|
101
|
+
}
|
|
102
|
+
if (options.extraDir !== undefined && existsSync(options.extraDir)) {
|
|
103
|
+
for (const name of readdirSync(options.extraDir).sort()) {
|
|
104
|
+
const path = join(options.extraDir, name);
|
|
105
|
+
if (!/\.tf(\.json)?$/.test(name) || !statSync(path).isFile())
|
|
106
|
+
continue;
|
|
107
|
+
const copy = `${EXTRA_PREFIX}${basename(name)}`;
|
|
108
|
+
cpSync(path, join(dir, copy));
|
|
109
|
+
written.push(copy);
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
return written;
|
|
113
|
+
}
|
|
114
|
+
//# sourceMappingURL=workspace.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workspace.js","sourceRoot":"","sources":["../src/workspace.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,MAAM,EACN,UAAU,EACV,SAAS,EACT,WAAW,EACX,MAAM,EACN,QAAQ,EACR,aAAa,GACd,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,QAAQ,EAAE,GAAG,EAAE,MAAM,WAAW,CAAC;AAC1D,OAAO,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAGjD,yDAAyD;AACzD,MAAM,CAAC,MAAM,OAAO,GAAG,IAAI,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC;AAE9C,4CAA4C;AAC5C,MAAM,UAAU,YAAY,CAAC,OAAe,EAAE,IAAY;IACxD,OAAO,IAAI,CAAC,OAAO,EAAE,OAAO,EAAE,IAAI,CAAC,CAAC;AACtC,CAAC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
|
+
"description": "OpenTofu/Terraform engine resolution, workspace generation and runner for staticforge",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"staticforge",
|
|
7
|
+
"opentofu",
|
|
8
|
+
"terraform",
|
|
9
|
+
"infrastructure-as-code"
|
|
10
|
+
],
|
|
11
|
+
"homepage": "https://github.com/elchanio-76/sforge#readme",
|
|
12
|
+
"bugs": {
|
|
13
|
+
"url": "https://github.com/elchanio-76/sforge/issues"
|
|
14
|
+
},
|
|
15
|
+
"repository": {
|
|
16
|
+
"type": "git",
|
|
17
|
+
"url": "git+https://github.com/elchanio-76/sforge.git",
|
|
18
|
+
"directory": "packages/providers/iac"
|
|
19
|
+
},
|
|
20
|
+
"license": "MIT",
|
|
21
|
+
"author": "Eleftherios Chaniotakis",
|
|
22
|
+
"type": "module",
|
|
23
|
+
"exports": {
|
|
24
|
+
".": {
|
|
25
|
+
"@staticforge/source": "./src/index.ts",
|
|
26
|
+
"types": "./dist/index.d.ts",
|
|
27
|
+
"default": "./dist/index.js"
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
"files": [
|
|
31
|
+
"dist"
|
|
32
|
+
],
|
|
33
|
+
"engines": {
|
|
34
|
+
"node": "^22.22.0 || >=24.8.0"
|
|
35
|
+
},
|
|
36
|
+
"publishConfig": {
|
|
37
|
+
"access": "public"
|
|
38
|
+
},
|
|
39
|
+
"dependencies": {
|
|
40
|
+
"@staticforge/core": "0.1.0"
|
|
41
|
+
}
|
|
6
42
|
}
|