@tinycloud/operations 0.3.3 → 0.3.4-beta.1
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/artifacts.cjs +9 -4
- package/dist/artifacts.cjs.map +1 -1
- package/dist/artifacts.js +9 -4
- package/dist/artifacts.js.map +1 -1
- package/dist/cli-runtime.cjs +9 -4
- package/dist/cli-runtime.cjs.map +1 -1
- package/dist/cli-runtime.js +9 -4
- package/dist/cli-runtime.js.map +1 -1
- package/dist/index.cjs +9 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +9 -4
- package/dist/index.js.map +1 -1
- package/dist/profile.cjs.map +1 -1
- package/dist/profile.js.map +1 -1
- package/dist/state.cjs +9 -4
- package/dist/state.cjs.map +1 -1
- package/dist/state.js +9 -4
- package/dist/state.js.map +1 -1
- package/package.json +3 -3
package/dist/artifacts.js
CHANGED
|
@@ -7066,9 +7066,12 @@ async function acquireProfileLock(profile, options) {
|
|
|
7066
7066
|
const staleAfterMs = options.staleAfterMs ?? DEFAULT_STALE_LOCK_MS;
|
|
7067
7067
|
const startedAt = Date.now();
|
|
7068
7068
|
const lockPath = profileLockPath(profile);
|
|
7069
|
-
|
|
7070
|
-
|
|
7071
|
-
|
|
7069
|
+
const directory = profilePath(profile);
|
|
7070
|
+
await mkdir(directory, { recursive: true, mode: PRIVATE_DIR_MODE });
|
|
7071
|
+
for (const path of [tinycloudHomePath(), profilesPath(), directory]) {
|
|
7072
|
+
await chmod(path, PRIVATE_DIR_MODE).catch((error) => {
|
|
7073
|
+
if (path !== directory || !isErrno(error, "ENOENT")) throw error;
|
|
7074
|
+
});
|
|
7072
7075
|
}
|
|
7073
7076
|
while (true) {
|
|
7074
7077
|
const token = randomUUID();
|
|
@@ -7091,7 +7094,9 @@ async function publishProfileLock(profile, lockPath, token) {
|
|
|
7091
7094
|
await mkdir(lockPath, { mode: PRIVATE_DIR_MODE });
|
|
7092
7095
|
} catch (error) {
|
|
7093
7096
|
if (isErrno(error, "EEXIST")) return false;
|
|
7094
|
-
throw error;
|
|
7097
|
+
if (!isErrno(error, "ENOENT")) throw error;
|
|
7098
|
+
await mkdir(profilePath(profile), { recursive: true, mode: PRIVATE_DIR_MODE });
|
|
7099
|
+
return false;
|
|
7095
7100
|
}
|
|
7096
7101
|
await waitForTestBarrier(TEST_LOCK_PUBLISH_BARRIER_DIR, profile);
|
|
7097
7102
|
const staged = join(dirname(lockPath), `.lock-owner-${token}.tmp`);
|