@tinycloud/operations 0.3.4-beta.0 → 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.d.cts +30 -30
- package/dist/artifacts.d.ts +30 -30
- 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 +1 -1
package/dist/cli-runtime.cjs
CHANGED
|
@@ -7220,9 +7220,12 @@ async function acquireProfileLock(profile, options) {
|
|
|
7220
7220
|
const staleAfterMs = options.staleAfterMs ?? DEFAULT_STALE_LOCK_MS;
|
|
7221
7221
|
const startedAt = Date.now();
|
|
7222
7222
|
const lockPath = profileLockPath(profile);
|
|
7223
|
-
|
|
7224
|
-
|
|
7225
|
-
|
|
7223
|
+
const directory = profilePath(profile);
|
|
7224
|
+
await (0, import_promises.mkdir)(directory, { recursive: true, mode: PRIVATE_DIR_MODE });
|
|
7225
|
+
for (const path of [tinycloudHomePath(), profilesPath(), directory]) {
|
|
7226
|
+
await (0, import_promises.chmod)(path, PRIVATE_DIR_MODE).catch((error) => {
|
|
7227
|
+
if (path !== directory || !isErrno(error, "ENOENT")) throw error;
|
|
7228
|
+
});
|
|
7226
7229
|
}
|
|
7227
7230
|
while (true) {
|
|
7228
7231
|
const token = (0, import_node_crypto.randomUUID)();
|
|
@@ -7245,7 +7248,9 @@ async function publishProfileLock(profile, lockPath, token) {
|
|
|
7245
7248
|
await (0, import_promises.mkdir)(lockPath, { mode: PRIVATE_DIR_MODE });
|
|
7246
7249
|
} catch (error) {
|
|
7247
7250
|
if (isErrno(error, "EEXIST")) return false;
|
|
7248
|
-
throw error;
|
|
7251
|
+
if (!isErrno(error, "ENOENT")) throw error;
|
|
7252
|
+
await (0, import_promises.mkdir)(profilePath(profile), { recursive: true, mode: PRIVATE_DIR_MODE });
|
|
7253
|
+
return false;
|
|
7249
7254
|
}
|
|
7250
7255
|
await waitForTestBarrier(TEST_LOCK_PUBLISH_BARRIER_DIR, profile);
|
|
7251
7256
|
const staged = (0, import_node_path.join)((0, import_node_path.dirname)(lockPath), `.lock-owner-${token}.tmp`);
|