@tinycloud/operations 0.2.1 → 0.3.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/artifacts.cjs +3 -1
- package/dist/artifacts.cjs.map +1 -1
- package/dist/artifacts.d.cts +1 -1
- package/dist/artifacts.d.ts +1 -1
- package/dist/artifacts.js +4 -2
- package/dist/artifacts.js.map +1 -1
- package/dist/cli-runtime.cjs +27 -3
- package/dist/cli-runtime.cjs.map +1 -1
- package/dist/cli-runtime.d.cts +1 -1
- package/dist/cli-runtime.d.ts +1 -1
- package/dist/cli-runtime.js +28 -4
- package/dist/cli-runtime.js.map +1 -1
- package/dist/{contract-OnWT3OXa.d.cts → contract-xMIIMtpF.d.cts} +6 -0
- package/dist/{contract-OnWT3OXa.d.ts → contract-xMIIMtpF.d.ts} +6 -0
- package/dist/index.cjs +34 -11
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +35 -12
- package/dist/index.js.map +1 -1
- package/dist/profile.cjs +3 -1
- package/dist/profile.cjs.map +1 -1
- package/dist/profile.d.cts +1 -1
- package/dist/profile.d.ts +1 -1
- package/dist/profile.js +4 -2
- package/dist/profile.js.map +1 -1
- package/dist/state.cjs +12 -1
- package/dist/state.cjs.map +1 -1
- package/dist/state.d.cts +3 -1
- package/dist/state.d.ts +3 -1
- package/dist/state.js +12 -2
- package/dist/state.js.map +1 -1
- package/package.json +1 -1
package/dist/artifacts.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { PermissionEntry } from '@tinycloud/sdk-core';
|
|
2
2
|
import { z } from 'zod';
|
|
3
|
-
import { T as TinyCloudPosture, O as OperationOperatorType } from './contract-
|
|
3
|
+
import { T as TinyCloudPosture, O as OperationOperatorType } from './contract-xMIIMtpF.cjs';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* A capability in the canonical form persisted in a v1 request artifact.
|
package/dist/artifacts.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { PermissionEntry } from '@tinycloud/sdk-core';
|
|
2
2
|
import { z } from 'zod';
|
|
3
|
-
import { T as TinyCloudPosture, O as OperationOperatorType } from './contract-
|
|
3
|
+
import { T as TinyCloudPosture, O as OperationOperatorType } from './contract-xMIIMtpF.js';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* A capability in the canonical form persisted in a v1 request artifact.
|
package/dist/artifacts.js
CHANGED
|
@@ -6592,6 +6592,7 @@ function canonicalizeCaveats(caveats) {
|
|
|
6592
6592
|
|
|
6593
6593
|
// src/state.ts
|
|
6594
6594
|
import { randomUUID } from "crypto";
|
|
6595
|
+
import { AsyncLocalStorage } from "async_hooks";
|
|
6595
6596
|
import {
|
|
6596
6597
|
mkdir,
|
|
6597
6598
|
readFile,
|
|
@@ -6601,12 +6602,13 @@ import {
|
|
|
6601
6602
|
writeFile
|
|
6602
6603
|
} from "fs/promises";
|
|
6603
6604
|
import { homedir } from "os";
|
|
6604
|
-
import { basename, dirname, join, relative, resolve } from "path";
|
|
6605
|
+
import { basename, dirname, isAbsolute, join, relative, resolve } from "path";
|
|
6605
6606
|
var DEFAULT_LOCK_TIMEOUT_MS = 2e3;
|
|
6606
6607
|
var DEFAULT_LOCK_RETRY_MS = 25;
|
|
6607
6608
|
var DEFAULT_STALE_LOCK_MS = 3e4;
|
|
6608
6609
|
var TEST_LOCK_CONTENTION_SIGNAL_PATH = "TC_TEST_PROFILE_LOCK_CONTENTION_SIGNAL_PATH";
|
|
6609
6610
|
var TEST_LOCK_RECOVERY_BARRIER_DIR = "TC_TEST_PROFILE_LOCK_RECOVERY_BARRIER_DIR";
|
|
6611
|
+
var invocationStateRoot = new AsyncLocalStorage();
|
|
6610
6612
|
var ProfileLockTimeoutError = class extends Error {
|
|
6611
6613
|
constructor(profile, timeoutMs) {
|
|
6612
6614
|
super(`Timed out waiting for the profile lock for "${profile}" after ${timeoutMs}ms.`);
|
|
@@ -6615,7 +6617,7 @@ var ProfileLockTimeoutError = class extends Error {
|
|
|
6615
6617
|
}
|
|
6616
6618
|
};
|
|
6617
6619
|
function tinycloudHomePath() {
|
|
6618
|
-
const home = process.env.TC_HOME ?? process.env.HOME ?? process.env.USERPROFILE ?? homedir();
|
|
6620
|
+
const home = invocationStateRoot.getStore() ?? process.env.TC_HOME ?? process.env.HOME ?? process.env.USERPROFILE ?? homedir();
|
|
6619
6621
|
return join(home, ".tinycloud");
|
|
6620
6622
|
}
|
|
6621
6623
|
function profilesPath() {
|