@jeffusion/bungee-types 5.24.2 → 5.25.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/dist/daemon-file.d.ts +2 -0
- package/dist/daemon-file.js +5 -0
- package/package.json +1 -1
package/dist/daemon-file.d.ts
CHANGED
|
@@ -43,6 +43,8 @@ export type DaemonFileOptions = {
|
|
|
43
43
|
export declare function formatDaemonFileAclError(error: unknown): string | null;
|
|
44
44
|
/** @internal source-test probe; not re-exported from the package root. */
|
|
45
45
|
export declare function __testSelectWindowsAclExecutable(environment: NodeJS.ProcessEnv): string;
|
|
46
|
+
/** Restrict a newly created private file before writing any secret bytes. */
|
|
47
|
+
export declare function secureWindowsOwnerOnlyFileAcl(path: string, adapter?: WindowsAclAdapter): Promise<void>;
|
|
46
48
|
/** Read-only validation: untrusted input files must never have their ACL repaired. */
|
|
47
49
|
export declare function assertWindowsOwnerOnlyFileAcl(path: string, adapter?: WindowsAclAdapter): Promise<void>;
|
|
48
50
|
/** @internal source-test probe; not re-exported from the package root. */
|
package/dist/daemon-file.js
CHANGED
|
@@ -717,6 +717,11 @@ function defaultWindowsAclAdapter(deadlineMs = WINDOWS_ACL_DEADLINE_MS) {
|
|
|
717
717
|
},
|
|
718
718
|
};
|
|
719
719
|
}
|
|
720
|
+
/** Restrict a newly created private file before writing any secret bytes. */
|
|
721
|
+
export async function secureWindowsOwnerOnlyFileAcl(path, adapter = defaultWindowsAclAdapter()) {
|
|
722
|
+
await ensureWindowsAcl(path, adapter, 'file');
|
|
723
|
+
await assertWindowsOwnerOnlyFileAcl(path, adapter);
|
|
724
|
+
}
|
|
720
725
|
/** Read-only validation: untrusted input files must never have their ACL repaired. */
|
|
721
726
|
export async function assertWindowsOwnerOnlyFileAcl(path, adapter = defaultWindowsAclAdapter()) {
|
|
722
727
|
const snapshot = await adapter.read(path);
|