@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.cjs
CHANGED
|
@@ -7079,9 +7079,12 @@ async function acquireProfileLock(profile, options) {
|
|
|
7079
7079
|
const staleAfterMs = options.staleAfterMs ?? DEFAULT_STALE_LOCK_MS;
|
|
7080
7080
|
const startedAt = Date.now();
|
|
7081
7081
|
const lockPath = profileLockPath(profile);
|
|
7082
|
-
|
|
7083
|
-
|
|
7084
|
-
|
|
7082
|
+
const directory = profilePath(profile);
|
|
7083
|
+
await (0, import_promises.mkdir)(directory, { recursive: true, mode: PRIVATE_DIR_MODE });
|
|
7084
|
+
for (const path of [tinycloudHomePath(), profilesPath(), directory]) {
|
|
7085
|
+
await (0, import_promises.chmod)(path, PRIVATE_DIR_MODE).catch((error) => {
|
|
7086
|
+
if (path !== directory || !isErrno(error, "ENOENT")) throw error;
|
|
7087
|
+
});
|
|
7085
7088
|
}
|
|
7086
7089
|
while (true) {
|
|
7087
7090
|
const token = (0, import_node_crypto.randomUUID)();
|
|
@@ -7104,7 +7107,9 @@ async function publishProfileLock(profile, lockPath, token) {
|
|
|
7104
7107
|
await (0, import_promises.mkdir)(lockPath, { mode: PRIVATE_DIR_MODE });
|
|
7105
7108
|
} catch (error) {
|
|
7106
7109
|
if (isErrno(error, "EEXIST")) return false;
|
|
7107
|
-
throw error;
|
|
7110
|
+
if (!isErrno(error, "ENOENT")) throw error;
|
|
7111
|
+
await (0, import_promises.mkdir)(profilePath(profile), { recursive: true, mode: PRIVATE_DIR_MODE });
|
|
7112
|
+
return false;
|
|
7108
7113
|
}
|
|
7109
7114
|
await waitForTestBarrier(TEST_LOCK_PUBLISH_BARRIER_DIR, profile);
|
|
7110
7115
|
const staged = (0, import_node_path.join)((0, import_node_path.dirname)(lockPath), `.lock-owner-${token}.tmp`);
|