@infracraft/pulumi 1.16.6 → 1.16.7
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/hash.cjs +84 -11
- package/dist/hash.cjs.map +1 -1
- package/dist/hash.d.cts +14 -1
- package/dist/hash.d.cts.map +1 -1
- package/dist/hash.d.mts +14 -1
- package/dist/hash.d.mts.map +1 -1
- package/dist/hash.mjs +84 -12
- package/dist/hash.mjs.map +1 -1
- package/package.json +1 -1
package/dist/hash.cjs
CHANGED
|
@@ -29,22 +29,95 @@ function hash(input, options) {
|
|
|
29
29
|
}
|
|
30
30
|
const ignore = options?.ignore ?? DEFAULT_IGNORE;
|
|
31
31
|
const digest = node_crypto.createHash("sha256");
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
32
|
+
hashDirInto(digest, input, ignore);
|
|
33
|
+
return digest.digest("hex");
|
|
34
|
+
}
|
|
35
|
+
/** Recursively folds a directory's file names + contents into `digest`. */
|
|
36
|
+
function hashDirInto(digest, currentPath, ignore) {
|
|
37
|
+
const entries = node_fs.readdirSync(currentPath, { withFileTypes: true });
|
|
38
|
+
for (const entry of entries.sort((a, b) => a.name.localeCompare(b.name))) {
|
|
39
|
+
if (ignore.has(entry.name)) continue;
|
|
40
|
+
const fullPath = node_path.join(currentPath, entry.name);
|
|
41
|
+
if (entry.isDirectory()) hashDirInto(digest, fullPath, ignore);
|
|
42
|
+
else if (entry.isFile()) {
|
|
43
|
+
digest.update(entry.name);
|
|
44
|
+
digest.update(node_fs.readFileSync(fullPath));
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
function readWorkspacePackage(directory) {
|
|
49
|
+
try {
|
|
50
|
+
return JSON.parse(node_fs.readFileSync(node_path.join(directory, "package.json"), "utf8"));
|
|
51
|
+
} catch {
|
|
52
|
+
return;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Indexes every workspace package by its `package.json` `name` -> directory, by
|
|
57
|
+
* scanning `apps/*` and `packages/*`. Robust to a package whose directory name
|
|
58
|
+
* differs from its published name.
|
|
59
|
+
*/
|
|
60
|
+
function buildWorkspaceIndex(monorepoRoot) {
|
|
61
|
+
const index = /* @__PURE__ */ new Map();
|
|
62
|
+
for (const group of ["apps", "packages"]) {
|
|
63
|
+
const base = node_path.join(monorepoRoot, group);
|
|
64
|
+
let entries;
|
|
65
|
+
try {
|
|
66
|
+
entries = node_fs.readdirSync(base, { withFileTypes: true });
|
|
67
|
+
} catch {
|
|
68
|
+
continue;
|
|
42
69
|
}
|
|
70
|
+
for (const entry of entries) {
|
|
71
|
+
if (!entry.isDirectory()) continue;
|
|
72
|
+
const directory = node_path.join(base, entry.name);
|
|
73
|
+
const pkg = readWorkspacePackage(directory);
|
|
74
|
+
if (pkg?.name) index.set(pkg.name, directory);
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
return index;
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* Hashes an app's source AND every workspace package it depends on
|
|
81
|
+
* (transitively), for use as a redeploy trigger. Resolving the dependency
|
|
82
|
+
* closure from each `package.json` means a change to a shared `packages/*` an
|
|
83
|
+
* app depends on correctly retriggers that app's deploy — and adding a new app
|
|
84
|
+
* needs no hand-maintained list of which packages to hash.
|
|
85
|
+
*
|
|
86
|
+
* @param monorepoRoot Absolute repo root (holds `apps/` and `packages/`).
|
|
87
|
+
* @param appDirectory The app to hash, relative to the root (e.g. `apps/mesh`).
|
|
88
|
+
* @example
|
|
89
|
+
* triggers: [hashApp(monorepoRoot, "apps/mesh"), hash(env)]
|
|
90
|
+
*/
|
|
91
|
+
function hashApp(monorepoRoot, appDirectory, options) {
|
|
92
|
+
const ignore = options?.ignore ?? DEFAULT_IGNORE;
|
|
93
|
+
const index = buildWorkspaceIndex(monorepoRoot);
|
|
94
|
+
const start = node_path.join(monorepoRoot, appDirectory);
|
|
95
|
+
const visited = /* @__PURE__ */ new Set();
|
|
96
|
+
const queue = [start];
|
|
97
|
+
while (queue.length > 0) {
|
|
98
|
+
const directory = queue.pop();
|
|
99
|
+
if (!directory || visited.has(directory)) continue;
|
|
100
|
+
visited.add(directory);
|
|
101
|
+
const pkg = readWorkspacePackage(directory);
|
|
102
|
+
if (!pkg) continue;
|
|
103
|
+
const deps = {
|
|
104
|
+
...pkg.dependencies,
|
|
105
|
+
...pkg.devDependencies
|
|
106
|
+
};
|
|
107
|
+
for (const depName of Object.keys(deps)) {
|
|
108
|
+
const depDirectory = index.get(depName);
|
|
109
|
+
if (depDirectory && !visited.has(depDirectory)) queue.push(depDirectory);
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
const digest = node_crypto.createHash("sha256");
|
|
113
|
+
for (const directory of [...visited].sort()) {
|
|
114
|
+
digest.update(`\0${node_path.relative(monorepoRoot, directory)}\0`);
|
|
115
|
+
hashDirInto(digest, directory, ignore);
|
|
43
116
|
}
|
|
44
|
-
walk(input);
|
|
45
117
|
return digest.digest("hex");
|
|
46
118
|
}
|
|
47
119
|
|
|
48
120
|
//#endregion
|
|
49
121
|
exports.hash = hash;
|
|
122
|
+
exports.hashApp = hashApp;
|
|
50
123
|
//# sourceMappingURL=hash.cjs.map
|
package/dist/hash.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hash.cjs","names":["pulumi","crypto","fs","path"],"sources":["../src/hash.ts"],"sourcesContent":["import * as crypto from \"node:crypto\";\nimport * as fs from \"node:fs\";\nimport * as path from \"node:path\";\nimport * as pulumi from \"@pulumi/pulumi\";\n\nconst DEFAULT_IGNORE = new Set([\n\t\"node_modules\",\n\t\"dist\",\n\t\".turbo\",\n\t\".next\",\n\t\".git\",\n\t\".vercel\",\n]);\n\ninterface HashOptions {\n\tignore?: Set<string>;\n}\n\n/**\n * Produces a stable SHA-256 hex digest for use as a resource/deploy trigger,\n * from either a source directory or an environment map.\n *\n * - **Directory** (`string`): recursively hashes file names + contents (build\n * and VCS directories skipped). Synchronous — returns a plain `string`.\n * - **Env map** (`Record<string, Input<string>>`): resolves the values, sorts\n * by key, and hashes them into a single non-secret `Output<string>`. Passing\n * secret `Output`s straight into a dynamic resource's inputs intermittently\n * races Pulumi's gRPC secret serialization (`Unexpected struct type`, issue\n * #16041) — the reason such deploys otherwise need `--parallel 1`. Collapsing\n * the env to one `unsecret` digest keeps the trigger moving on any change\n * while carrying no secret, so deploys are safe to (re)create at full\n * parallelism. Exposing the digest is safe: it is a one-way hash of\n * high-entropy secrets.\n *\n * @param input A source directory path, or a map of env var name to value.\n * @param options Directory mode only: `ignore` overrides the default skip set.\n * @returns `string` for a directory, `Output<string>` for an env map.\n * @example\n * triggers: [hash(appDir), hash(env)]\n */\nexport function hash(directory: string, options?: HashOptions): string;\nexport function hash(\n\tenv: Record<string, pulumi.Input<string>>,\n): pulumi.Output<string>;\nexport function hash(\n\tinput: string | Record<string, pulumi.Input<string>>,\n\toptions?: HashOptions,\n): string | pulumi.Output<string> {\n\tif (typeof input !== \"string\") {\n\t\tconst keys = Object.keys(input).sort();\n\n\t\treturn pulumi.unsecret(\n\t\t\tpulumi.all(keys.map((key) => input[key])).apply((values) => {\n\t\t\t\tconst digest = crypto.createHash(\"sha256\");\n\n\t\t\t\tfor (const [index, key] of keys.entries()) {\n\t\t\t\t\tdigest.update(`${key}=${values[index]}\\0`);\n\t\t\t\t}\n\n\t\t\t\treturn digest.digest(\"hex\");\n\t\t\t}),\n\t\t);\n\t}\n\n\tconst ignore = options?.ignore ?? DEFAULT_IGNORE;\n\tconst digest = crypto.createHash(\"sha256\");\n\n\
|
|
1
|
+
{"version":3,"file":"hash.cjs","names":["pulumi","crypto","fs","path"],"sources":["../src/hash.ts"],"sourcesContent":["import * as crypto from \"node:crypto\";\nimport * as fs from \"node:fs\";\nimport * as path from \"node:path\";\nimport * as pulumi from \"@pulumi/pulumi\";\n\nconst DEFAULT_IGNORE = new Set([\n\t\"node_modules\",\n\t\"dist\",\n\t\".turbo\",\n\t\".next\",\n\t\".git\",\n\t\".vercel\",\n]);\n\ninterface HashOptions {\n\tignore?: Set<string>;\n}\n\n/**\n * Produces a stable SHA-256 hex digest for use as a resource/deploy trigger,\n * from either a source directory or an environment map.\n *\n * - **Directory** (`string`): recursively hashes file names + contents (build\n * and VCS directories skipped). Synchronous — returns a plain `string`.\n * - **Env map** (`Record<string, Input<string>>`): resolves the values, sorts\n * by key, and hashes them into a single non-secret `Output<string>`. Passing\n * secret `Output`s straight into a dynamic resource's inputs intermittently\n * races Pulumi's gRPC secret serialization (`Unexpected struct type`, issue\n * #16041) — the reason such deploys otherwise need `--parallel 1`. Collapsing\n * the env to one `unsecret` digest keeps the trigger moving on any change\n * while carrying no secret, so deploys are safe to (re)create at full\n * parallelism. Exposing the digest is safe: it is a one-way hash of\n * high-entropy secrets.\n *\n * @param input A source directory path, or a map of env var name to value.\n * @param options Directory mode only: `ignore` overrides the default skip set.\n * @returns `string` for a directory, `Output<string>` for an env map.\n * @example\n * triggers: [hash(appDir), hash(env)]\n */\nexport function hash(directory: string, options?: HashOptions): string;\nexport function hash(\n\tenv: Record<string, pulumi.Input<string>>,\n): pulumi.Output<string>;\nexport function hash(\n\tinput: string | Record<string, pulumi.Input<string>>,\n\toptions?: HashOptions,\n): string | pulumi.Output<string> {\n\tif (typeof input !== \"string\") {\n\t\tconst keys = Object.keys(input).sort();\n\n\t\treturn pulumi.unsecret(\n\t\t\tpulumi.all(keys.map((key) => input[key])).apply((values) => {\n\t\t\t\tconst digest = crypto.createHash(\"sha256\");\n\n\t\t\t\tfor (const [index, key] of keys.entries()) {\n\t\t\t\t\tdigest.update(`${key}=${values[index]}\\0`);\n\t\t\t\t}\n\n\t\t\t\treturn digest.digest(\"hex\");\n\t\t\t}),\n\t\t);\n\t}\n\n\tconst ignore = options?.ignore ?? DEFAULT_IGNORE;\n\tconst digest = crypto.createHash(\"sha256\");\n\n\thashDirInto(digest, input, ignore);\n\n\treturn digest.digest(\"hex\");\n}\n\n/** Recursively folds a directory's file names + contents into `digest`. */\nfunction hashDirInto(\n\tdigest: crypto.Hash,\n\tcurrentPath: string,\n\tignore: Set<string>,\n): void {\n\tconst entries = fs.readdirSync(currentPath, { withFileTypes: true });\n\n\tfor (const entry of entries.sort((a, b) => a.name.localeCompare(b.name))) {\n\t\tif (ignore.has(entry.name)) {\n\t\t\tcontinue;\n\t\t}\n\n\t\tconst fullPath = path.join(currentPath, entry.name);\n\n\t\tif (entry.isDirectory()) {\n\t\t\thashDirInto(digest, fullPath, ignore);\n\t\t} else if (entry.isFile()) {\n\t\t\tdigest.update(entry.name);\n\t\t\tdigest.update(fs.readFileSync(fullPath));\n\t\t}\n\t}\n}\n\ninterface WorkspacePackage {\n\tname?: string;\n\tdependencies?: Record<string, string>;\n\tdevDependencies?: Record<string, string>;\n}\n\nfunction readWorkspacePackage(directory: string): WorkspacePackage | undefined {\n\ttry {\n\t\treturn JSON.parse(\n\t\t\tfs.readFileSync(path.join(directory, \"package.json\"), \"utf8\"),\n\t\t) as WorkspacePackage;\n\t} catch {\n\t\treturn undefined;\n\t}\n}\n\n/**\n * Indexes every workspace package by its `package.json` `name` -> directory, by\n * scanning `apps/*` and `packages/*`. Robust to a package whose directory name\n * differs from its published name.\n */\nfunction buildWorkspaceIndex(monorepoRoot: string): Map<string, string> {\n\tconst index = new Map<string, string>();\n\n\tfor (const group of [\"apps\", \"packages\"]) {\n\t\tconst base = path.join(monorepoRoot, group);\n\n\t\tlet entries: fs.Dirent[];\n\n\t\ttry {\n\t\t\tentries = fs.readdirSync(base, { withFileTypes: true });\n\t\t} catch {\n\t\t\tcontinue;\n\t\t}\n\n\t\tfor (const entry of entries) {\n\t\t\tif (!entry.isDirectory()) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tconst directory = path.join(base, entry.name);\n\t\t\tconst pkg = readWorkspacePackage(directory);\n\n\t\t\tif (pkg?.name) {\n\t\t\t\tindex.set(pkg.name, directory);\n\t\t\t}\n\t\t}\n\t}\n\n\treturn index;\n}\n\n/**\n * Hashes an app's source AND every workspace package it depends on\n * (transitively), for use as a redeploy trigger. Resolving the dependency\n * closure from each `package.json` means a change to a shared `packages/*` an\n * app depends on correctly retriggers that app's deploy — and adding a new app\n * needs no hand-maintained list of which packages to hash.\n *\n * @param monorepoRoot Absolute repo root (holds `apps/` and `packages/`).\n * @param appDirectory The app to hash, relative to the root (e.g. `apps/mesh`).\n * @example\n * triggers: [hashApp(monorepoRoot, \"apps/mesh\"), hash(env)]\n */\nexport function hashApp(\n\tmonorepoRoot: string,\n\tappDirectory: string,\n\toptions?: HashOptions,\n): string {\n\tconst ignore = options?.ignore ?? DEFAULT_IGNORE;\n\tconst index = buildWorkspaceIndex(monorepoRoot);\n\n\tconst start = path.join(monorepoRoot, appDirectory);\n\tconst visited = new Set<string>();\n\tconst queue = [start];\n\n\twhile (queue.length > 0) {\n\t\tconst directory = queue.pop();\n\n\t\tif (!directory || visited.has(directory)) {\n\t\t\tcontinue;\n\t\t}\n\n\t\tvisited.add(directory);\n\n\t\tconst pkg = readWorkspacePackage(directory);\n\n\t\tif (!pkg) {\n\t\t\tcontinue;\n\t\t}\n\n\t\tconst deps = { ...pkg.dependencies, ...pkg.devDependencies };\n\n\t\tfor (const depName of Object.keys(deps)) {\n\t\t\tconst depDirectory = index.get(depName);\n\n\t\t\t// Only workspace packages are in the index — external deps are ignored.\n\t\t\tif (depDirectory && !visited.has(depDirectory)) {\n\t\t\t\tqueue.push(depDirectory);\n\t\t\t}\n\t\t}\n\t}\n\n\tconst digest = crypto.createHash(\"sha256\");\n\n\t// Sort by directory so the digest is independent of traversal order; include\n\t// the relative path so moving content between packages changes the hash.\n\tfor (const directory of [...visited].sort()) {\n\t\tdigest.update(`\\0${path.relative(monorepoRoot, directory)}\\0`);\n\t\thashDirInto(digest, directory, ignore);\n\t}\n\n\treturn digest.digest(\"hex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AO,EAAE,KAAK,GAAG;EAC5C,OAAO,OAAO,KAAKE,UAAK,SAAS,cAAc,SAAS,EAAE,GAAG;EAC7D,YAAY,QAAQ,WAAW,MAAM;CACtC;CAEA,OAAO,OAAO,OAAO,KAAK;AAC3B"}
|
package/dist/hash.d.cts
CHANGED
|
@@ -29,6 +29,19 @@ interface HashOptions {
|
|
|
29
29
|
*/
|
|
30
30
|
declare function hash(directory: string, options?: HashOptions): string;
|
|
31
31
|
declare function hash(env: Record<string, pulumi.Input<string>>): pulumi.Output<string>;
|
|
32
|
+
/**
|
|
33
|
+
* Hashes an app's source AND every workspace package it depends on
|
|
34
|
+
* (transitively), for use as a redeploy trigger. Resolving the dependency
|
|
35
|
+
* closure from each `package.json` means a change to a shared `packages/*` an
|
|
36
|
+
* app depends on correctly retriggers that app's deploy — and adding a new app
|
|
37
|
+
* needs no hand-maintained list of which packages to hash.
|
|
38
|
+
*
|
|
39
|
+
* @param monorepoRoot Absolute repo root (holds `apps/` and `packages/`).
|
|
40
|
+
* @param appDirectory The app to hash, relative to the root (e.g. `apps/mesh`).
|
|
41
|
+
* @example
|
|
42
|
+
* triggers: [hashApp(monorepoRoot, "apps/mesh"), hash(env)]
|
|
43
|
+
*/
|
|
44
|
+
declare function hashApp(monorepoRoot: string, appDirectory: string, options?: HashOptions): string;
|
|
32
45
|
//#endregion
|
|
33
|
-
export { hash };
|
|
46
|
+
export { hash, hashApp };
|
|
34
47
|
//# sourceMappingURL=hash.d.cts.map
|
package/dist/hash.d.cts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hash.d.cts","names":[],"sources":["../src/hash.ts"],"mappings":";;;;UAcU,WAAA;EACT,MAAA,GAAS,GAAG;AAAA;AAZ4B;;;;AAY5B;AAyBb;;;;;;;;AAA6D;AAC7D;;;;;;;;AAtCyC,iBAqCzB,IAAA,CAAK,SAAA,UAAmB,OAAA,GAAU,WAAW;AAAA,iBAC7C,IAAA,CACf,GAAA,EAAK,MAAA,SAAe,MAAA,CAAO,KAAA,YACzB,MAAA,CAAO,MAAA"}
|
|
1
|
+
{"version":3,"file":"hash.d.cts","names":[],"sources":["../src/hash.ts"],"mappings":";;;;UAcU,WAAA;EACT,MAAA,GAAS,GAAG;AAAA;AAZ4B;;;;AAY5B;AAyBb;;;;;;;;AAA6D;AAC7D;;;;;;;;AAtCyC,iBAqCzB,IAAA,CAAK,SAAA,UAAmB,OAAA,GAAU,WAAW;AAAA,iBAC7C,IAAA,CACf,GAAA,EAAK,MAAA,SAAe,MAAA,CAAO,KAAA,YACzB,MAAA,CAAO,MAAA;;;;;;AAAM;AAqHhB;;;;;;iBAAgB,OAAA,CACf,YAAA,UACA,YAAA,UACA,OAAA,GAAU,WAAW"}
|
package/dist/hash.d.mts
CHANGED
|
@@ -29,6 +29,19 @@ interface HashOptions {
|
|
|
29
29
|
*/
|
|
30
30
|
declare function hash(directory: string, options?: HashOptions): string;
|
|
31
31
|
declare function hash(env: Record<string, pulumi.Input<string>>): pulumi.Output<string>;
|
|
32
|
+
/**
|
|
33
|
+
* Hashes an app's source AND every workspace package it depends on
|
|
34
|
+
* (transitively), for use as a redeploy trigger. Resolving the dependency
|
|
35
|
+
* closure from each `package.json` means a change to a shared `packages/*` an
|
|
36
|
+
* app depends on correctly retriggers that app's deploy — and adding a new app
|
|
37
|
+
* needs no hand-maintained list of which packages to hash.
|
|
38
|
+
*
|
|
39
|
+
* @param monorepoRoot Absolute repo root (holds `apps/` and `packages/`).
|
|
40
|
+
* @param appDirectory The app to hash, relative to the root (e.g. `apps/mesh`).
|
|
41
|
+
* @example
|
|
42
|
+
* triggers: [hashApp(monorepoRoot, "apps/mesh"), hash(env)]
|
|
43
|
+
*/
|
|
44
|
+
declare function hashApp(monorepoRoot: string, appDirectory: string, options?: HashOptions): string;
|
|
32
45
|
//#endregion
|
|
33
|
-
export { hash };
|
|
46
|
+
export { hash, hashApp };
|
|
34
47
|
//# sourceMappingURL=hash.d.mts.map
|
package/dist/hash.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hash.d.mts","names":[],"sources":["../src/hash.ts"],"mappings":";;;;UAcU,WAAA;EACT,MAAA,GAAS,GAAG;AAAA;AAZ4B;;;;AAY5B;AAyBb;;;;;;;;AAA6D;AAC7D;;;;;;;;AAtCyC,iBAqCzB,IAAA,CAAK,SAAA,UAAmB,OAAA,GAAU,WAAW;AAAA,iBAC7C,IAAA,CACf,GAAA,EAAK,MAAA,SAAe,MAAA,CAAO,KAAA,YACzB,MAAA,CAAO,MAAA"}
|
|
1
|
+
{"version":3,"file":"hash.d.mts","names":[],"sources":["../src/hash.ts"],"mappings":";;;;UAcU,WAAA;EACT,MAAA,GAAS,GAAG;AAAA;AAZ4B;;;;AAY5B;AAyBb;;;;;;;;AAA6D;AAC7D;;;;;;;;AAtCyC,iBAqCzB,IAAA,CAAK,SAAA,UAAmB,OAAA,GAAU,WAAW;AAAA,iBAC7C,IAAA,CACf,GAAA,EAAK,MAAA,SAAe,MAAA,CAAO,KAAA,YACzB,MAAA,CAAO,MAAA;;;;;;AAAM;AAqHhB;;;;;;iBAAgB,OAAA,CACf,YAAA,UACA,YAAA,UACA,OAAA,GAAU,WAAW"}
|
package/dist/hash.mjs
CHANGED
|
@@ -24,22 +24,94 @@ function hash(input, options) {
|
|
|
24
24
|
}
|
|
25
25
|
const ignore = options?.ignore ?? DEFAULT_IGNORE;
|
|
26
26
|
const digest = crypto.createHash("sha256");
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
27
|
+
hashDirInto(digest, input, ignore);
|
|
28
|
+
return digest.digest("hex");
|
|
29
|
+
}
|
|
30
|
+
/** Recursively folds a directory's file names + contents into `digest`. */
|
|
31
|
+
function hashDirInto(digest, currentPath, ignore) {
|
|
32
|
+
const entries = fs.readdirSync(currentPath, { withFileTypes: true });
|
|
33
|
+
for (const entry of entries.sort((a, b) => a.name.localeCompare(b.name))) {
|
|
34
|
+
if (ignore.has(entry.name)) continue;
|
|
35
|
+
const fullPath = path.join(currentPath, entry.name);
|
|
36
|
+
if (entry.isDirectory()) hashDirInto(digest, fullPath, ignore);
|
|
37
|
+
else if (entry.isFile()) {
|
|
38
|
+
digest.update(entry.name);
|
|
39
|
+
digest.update(fs.readFileSync(fullPath));
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
function readWorkspacePackage(directory) {
|
|
44
|
+
try {
|
|
45
|
+
return JSON.parse(fs.readFileSync(path.join(directory, "package.json"), "utf8"));
|
|
46
|
+
} catch {
|
|
47
|
+
return;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Indexes every workspace package by its `package.json` `name` -> directory, by
|
|
52
|
+
* scanning `apps/*` and `packages/*`. Robust to a package whose directory name
|
|
53
|
+
* differs from its published name.
|
|
54
|
+
*/
|
|
55
|
+
function buildWorkspaceIndex(monorepoRoot) {
|
|
56
|
+
const index = /* @__PURE__ */ new Map();
|
|
57
|
+
for (const group of ["apps", "packages"]) {
|
|
58
|
+
const base = path.join(monorepoRoot, group);
|
|
59
|
+
let entries;
|
|
60
|
+
try {
|
|
61
|
+
entries = fs.readdirSync(base, { withFileTypes: true });
|
|
62
|
+
} catch {
|
|
63
|
+
continue;
|
|
37
64
|
}
|
|
65
|
+
for (const entry of entries) {
|
|
66
|
+
if (!entry.isDirectory()) continue;
|
|
67
|
+
const directory = path.join(base, entry.name);
|
|
68
|
+
const pkg = readWorkspacePackage(directory);
|
|
69
|
+
if (pkg?.name) index.set(pkg.name, directory);
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
return index;
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Hashes an app's source AND every workspace package it depends on
|
|
76
|
+
* (transitively), for use as a redeploy trigger. Resolving the dependency
|
|
77
|
+
* closure from each `package.json` means a change to a shared `packages/*` an
|
|
78
|
+
* app depends on correctly retriggers that app's deploy — and adding a new app
|
|
79
|
+
* needs no hand-maintained list of which packages to hash.
|
|
80
|
+
*
|
|
81
|
+
* @param monorepoRoot Absolute repo root (holds `apps/` and `packages/`).
|
|
82
|
+
* @param appDirectory The app to hash, relative to the root (e.g. `apps/mesh`).
|
|
83
|
+
* @example
|
|
84
|
+
* triggers: [hashApp(monorepoRoot, "apps/mesh"), hash(env)]
|
|
85
|
+
*/
|
|
86
|
+
function hashApp(monorepoRoot, appDirectory, options) {
|
|
87
|
+
const ignore = options?.ignore ?? DEFAULT_IGNORE;
|
|
88
|
+
const index = buildWorkspaceIndex(monorepoRoot);
|
|
89
|
+
const start = path.join(monorepoRoot, appDirectory);
|
|
90
|
+
const visited = /* @__PURE__ */ new Set();
|
|
91
|
+
const queue = [start];
|
|
92
|
+
while (queue.length > 0) {
|
|
93
|
+
const directory = queue.pop();
|
|
94
|
+
if (!directory || visited.has(directory)) continue;
|
|
95
|
+
visited.add(directory);
|
|
96
|
+
const pkg = readWorkspacePackage(directory);
|
|
97
|
+
if (!pkg) continue;
|
|
98
|
+
const deps = {
|
|
99
|
+
...pkg.dependencies,
|
|
100
|
+
...pkg.devDependencies
|
|
101
|
+
};
|
|
102
|
+
for (const depName of Object.keys(deps)) {
|
|
103
|
+
const depDirectory = index.get(depName);
|
|
104
|
+
if (depDirectory && !visited.has(depDirectory)) queue.push(depDirectory);
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
const digest = crypto.createHash("sha256");
|
|
108
|
+
for (const directory of [...visited].sort()) {
|
|
109
|
+
digest.update(`\0${path.relative(monorepoRoot, directory)}\0`);
|
|
110
|
+
hashDirInto(digest, directory, ignore);
|
|
38
111
|
}
|
|
39
|
-
walk(input);
|
|
40
112
|
return digest.digest("hex");
|
|
41
113
|
}
|
|
42
114
|
|
|
43
115
|
//#endregion
|
|
44
|
-
export { hash };
|
|
116
|
+
export { hash, hashApp };
|
|
45
117
|
//# sourceMappingURL=hash.mjs.map
|
package/dist/hash.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hash.mjs","names":[],"sources":["../src/hash.ts"],"sourcesContent":["import * as crypto from \"node:crypto\";\nimport * as fs from \"node:fs\";\nimport * as path from \"node:path\";\nimport * as pulumi from \"@pulumi/pulumi\";\n\nconst DEFAULT_IGNORE = new Set([\n\t\"node_modules\",\n\t\"dist\",\n\t\".turbo\",\n\t\".next\",\n\t\".git\",\n\t\".vercel\",\n]);\n\ninterface HashOptions {\n\tignore?: Set<string>;\n}\n\n/**\n * Produces a stable SHA-256 hex digest for use as a resource/deploy trigger,\n * from either a source directory or an environment map.\n *\n * - **Directory** (`string`): recursively hashes file names + contents (build\n * and VCS directories skipped). Synchronous — returns a plain `string`.\n * - **Env map** (`Record<string, Input<string>>`): resolves the values, sorts\n * by key, and hashes them into a single non-secret `Output<string>`. Passing\n * secret `Output`s straight into a dynamic resource's inputs intermittently\n * races Pulumi's gRPC secret serialization (`Unexpected struct type`, issue\n * #16041) — the reason such deploys otherwise need `--parallel 1`. Collapsing\n * the env to one `unsecret` digest keeps the trigger moving on any change\n * while carrying no secret, so deploys are safe to (re)create at full\n * parallelism. Exposing the digest is safe: it is a one-way hash of\n * high-entropy secrets.\n *\n * @param input A source directory path, or a map of env var name to value.\n * @param options Directory mode only: `ignore` overrides the default skip set.\n * @returns `string` for a directory, `Output<string>` for an env map.\n * @example\n * triggers: [hash(appDir), hash(env)]\n */\nexport function hash(directory: string, options?: HashOptions): string;\nexport function hash(\n\tenv: Record<string, pulumi.Input<string>>,\n): pulumi.Output<string>;\nexport function hash(\n\tinput: string | Record<string, pulumi.Input<string>>,\n\toptions?: HashOptions,\n): string | pulumi.Output<string> {\n\tif (typeof input !== \"string\") {\n\t\tconst keys = Object.keys(input).sort();\n\n\t\treturn pulumi.unsecret(\n\t\t\tpulumi.all(keys.map((key) => input[key])).apply((values) => {\n\t\t\t\tconst digest = crypto.createHash(\"sha256\");\n\n\t\t\t\tfor (const [index, key] of keys.entries()) {\n\t\t\t\t\tdigest.update(`${key}=${values[index]}\\0`);\n\t\t\t\t}\n\n\t\t\t\treturn digest.digest(\"hex\");\n\t\t\t}),\n\t\t);\n\t}\n\n\tconst ignore = options?.ignore ?? DEFAULT_IGNORE;\n\tconst digest = crypto.createHash(\"sha256\");\n\n\
|
|
1
|
+
{"version":3,"file":"hash.mjs","names":[],"sources":["../src/hash.ts"],"sourcesContent":["import * as crypto from \"node:crypto\";\nimport * as fs from \"node:fs\";\nimport * as path from \"node:path\";\nimport * as pulumi from \"@pulumi/pulumi\";\n\nconst DEFAULT_IGNORE = new Set([\n\t\"node_modules\",\n\t\"dist\",\n\t\".turbo\",\n\t\".next\",\n\t\".git\",\n\t\".vercel\",\n]);\n\ninterface HashOptions {\n\tignore?: Set<string>;\n}\n\n/**\n * Produces a stable SHA-256 hex digest for use as a resource/deploy trigger,\n * from either a source directory or an environment map.\n *\n * - **Directory** (`string`): recursively hashes file names + contents (build\n * and VCS directories skipped). Synchronous — returns a plain `string`.\n * - **Env map** (`Record<string, Input<string>>`): resolves the values, sorts\n * by key, and hashes them into a single non-secret `Output<string>`. Passing\n * secret `Output`s straight into a dynamic resource's inputs intermittently\n * races Pulumi's gRPC secret serialization (`Unexpected struct type`, issue\n * #16041) — the reason such deploys otherwise need `--parallel 1`. Collapsing\n * the env to one `unsecret` digest keeps the trigger moving on any change\n * while carrying no secret, so deploys are safe to (re)create at full\n * parallelism. Exposing the digest is safe: it is a one-way hash of\n * high-entropy secrets.\n *\n * @param input A source directory path, or a map of env var name to value.\n * @param options Directory mode only: `ignore` overrides the default skip set.\n * @returns `string` for a directory, `Output<string>` for an env map.\n * @example\n * triggers: [hash(appDir), hash(env)]\n */\nexport function hash(directory: string, options?: HashOptions): string;\nexport function hash(\n\tenv: Record<string, pulumi.Input<string>>,\n): pulumi.Output<string>;\nexport function hash(\n\tinput: string | Record<string, pulumi.Input<string>>,\n\toptions?: HashOptions,\n): string | pulumi.Output<string> {\n\tif (typeof input !== \"string\") {\n\t\tconst keys = Object.keys(input).sort();\n\n\t\treturn pulumi.unsecret(\n\t\t\tpulumi.all(keys.map((key) => input[key])).apply((values) => {\n\t\t\t\tconst digest = crypto.createHash(\"sha256\");\n\n\t\t\t\tfor (const [index, key] of keys.entries()) {\n\t\t\t\t\tdigest.update(`${key}=${values[index]}\\0`);\n\t\t\t\t}\n\n\t\t\t\treturn digest.digest(\"hex\");\n\t\t\t}),\n\t\t);\n\t}\n\n\tconst ignore = options?.ignore ?? DEFAULT_IGNORE;\n\tconst digest = crypto.createHash(\"sha256\");\n\n\thashDirInto(digest, input, ignore);\n\n\treturn digest.digest(\"hex\");\n}\n\n/** Recursively folds a directory's file names + contents into `digest`. */\nfunction hashDirInto(\n\tdigest: crypto.Hash,\n\tcurrentPath: string,\n\tignore: Set<string>,\n): void {\n\tconst entries = fs.readdirSync(currentPath, { withFileTypes: true });\n\n\tfor (const entry of entries.sort((a, b) => a.name.localeCompare(b.name))) {\n\t\tif (ignore.has(entry.name)) {\n\t\t\tcontinue;\n\t\t}\n\n\t\tconst fullPath = path.join(currentPath, entry.name);\n\n\t\tif (entry.isDirectory()) {\n\t\t\thashDirInto(digest, fullPath, ignore);\n\t\t} else if (entry.isFile()) {\n\t\t\tdigest.update(entry.name);\n\t\t\tdigest.update(fs.readFileSync(fullPath));\n\t\t}\n\t}\n}\n\ninterface WorkspacePackage {\n\tname?: string;\n\tdependencies?: Record<string, string>;\n\tdevDependencies?: Record<string, string>;\n}\n\nfunction readWorkspacePackage(directory: string): WorkspacePackage | undefined {\n\ttry {\n\t\treturn JSON.parse(\n\t\t\tfs.readFileSync(path.join(directory, \"package.json\"), \"utf8\"),\n\t\t) as WorkspacePackage;\n\t} catch {\n\t\treturn undefined;\n\t}\n}\n\n/**\n * Indexes every workspace package by its `package.json` `name` -> directory, by\n * scanning `apps/*` and `packages/*`. Robust to a package whose directory name\n * differs from its published name.\n */\nfunction buildWorkspaceIndex(monorepoRoot: string): Map<string, string> {\n\tconst index = new Map<string, string>();\n\n\tfor (const group of [\"apps\", \"packages\"]) {\n\t\tconst base = path.join(monorepoRoot, group);\n\n\t\tlet entries: fs.Dirent[];\n\n\t\ttry {\n\t\t\tentries = fs.readdirSync(base, { withFileTypes: true });\n\t\t} catch {\n\t\t\tcontinue;\n\t\t}\n\n\t\tfor (const entry of entries) {\n\t\t\tif (!entry.isDirectory()) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tconst directory = path.join(base, entry.name);\n\t\t\tconst pkg = readWorkspacePackage(directory);\n\n\t\t\tif (pkg?.name) {\n\t\t\t\tindex.set(pkg.name, directory);\n\t\t\t}\n\t\t}\n\t}\n\n\treturn index;\n}\n\n/**\n * Hashes an app's source AND every workspace package it depends on\n * (transitively), for use as a redeploy trigger. Resolving the dependency\n * closure from each `package.json` means a change to a shared `packages/*` an\n * app depends on correctly retriggers that app's deploy — and adding a new app\n * needs no hand-maintained list of which packages to hash.\n *\n * @param monorepoRoot Absolute repo root (holds `apps/` and `packages/`).\n * @param appDirectory The app to hash, relative to the root (e.g. `apps/mesh`).\n * @example\n * triggers: [hashApp(monorepoRoot, \"apps/mesh\"), hash(env)]\n */\nexport function hashApp(\n\tmonorepoRoot: string,\n\tappDirectory: string,\n\toptions?: HashOptions,\n): string {\n\tconst ignore = options?.ignore ?? DEFAULT_IGNORE;\n\tconst index = buildWorkspaceIndex(monorepoRoot);\n\n\tconst start = path.join(monorepoRoot, appDirectory);\n\tconst visited = new Set<string>();\n\tconst queue = [start];\n\n\twhile (queue.length > 0) {\n\t\tconst directory = queue.pop();\n\n\t\tif (!directory || visited.has(directory)) {\n\t\t\tcontinue;\n\t\t}\n\n\t\tvisited.add(directory);\n\n\t\tconst pkg = readWorkspacePackage(directory);\n\n\t\tif (!pkg) {\n\t\t\tcontinue;\n\t\t}\n\n\t\tconst deps = { ...pkg.dependencies, ...pkg.devDependencies };\n\n\t\tfor (const depName of Object.keys(deps)) {\n\t\t\tconst depDirectory = index.get(depName);\n\n\t\t\t// Only workspace packages are in the index — external deps are ignored.\n\t\t\tif (depDirectory && !visited.has(depDirectory)) {\n\t\t\t\tqueue.push(depDirectory);\n\t\t\t}\n\t\t}\n\t}\n\n\tconst digest = crypto.createHash(\"sha256\");\n\n\t// Sort by directory so the digest is independent of traversal order; include\n\t// the relative path so moving content between packages changes the hash.\n\tfor (const directory of [...visited].sort()) {\n\t\tdigest.update(`\\0${path.relative(monorepoRoot, directory)}\\0`);\n\t\thashDirInto(digest, directory, ignore);\n\t}\n\n\treturn digest.digest(\"hex\");\n}\n"],"mappings":";;;;;;;AAKA,MAAM,iBAAiB,IAAI,IAAI;CAC9B;CACA;CACA;CACA;CACA;CACA;AACD,CAAC;AAgCD,SAAgB,KACf,OACA,SACiC;CACjC,IAAI,OAAO,UAAU,UAAU;EAC9B,MAAM,OAAO,OAAO,KAAK,KAAK,EAAE,KAAK;EAErC,OAAO,OAAO,SACb,OAAO,IAAI,KAAK,KAAK,QAAQ,MAAM,IAAI,CAAC,EAAE,OAAO,WAAW;GAC3D,MAAM,SAAS,OAAO,WAAW,QAAQ;GAEzC,KAAK,MAAM,CAAC,OAAO,QAAQ,KAAK,QAAQ,GACvC,OAAO,OAAO,GAAG,IAAI,GAAG,OAAO,OAAO,GAAG;GAG1C,OAAO,OAAO,OAAO,KAAK;EAC3B,CAAC,CACF;CACD;CAEA,MAAM,SAAS,SAAS,UAAU;CAClC,MAAM,SAAS,OAAO,WAAW,QAAQ;CAEzC,YAAY,QAAQ,OAAO,MAAM;CAEjC,OAAO,OAAO,OAAO,KAAK;AAC3B;;AAGA,SAAS,YACR,QACA,aACA,QACO;CACP,MAAM,UAAU,GAAG,YAAY,aAAa,EAAE,eAAe,KAAK,CAAC;CAEnE,KAAK,MAAM,SAAS,QAAQ,MAAM,GAAG,MAAM,EAAE,KAAK,cAAc,EAAE,IAAI,CAAC,GAAG;EACzE,IAAI,OAAO,IAAI,MAAM,IAAI,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