@ms-cloudpack/api-server 0.44.2 → 0.44.3
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/lib/apis/openFilePath.d.ts.map +1 -1
- package/lib/apis/openFilePath.js +4 -2
- package/lib/apis/openFilePath.js.map +1 -1
- package/lib/index.d.ts +1 -0
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +1 -0
- package/lib/index.js.map +1 -1
- package/lib/utilities/getActiveSessionsPath.d.ts +5 -0
- package/lib/utilities/getActiveSessionsPath.d.ts.map +1 -0
- package/lib/utilities/getActiveSessionsPath.js +9 -0
- package/lib/utilities/getActiveSessionsPath.js.map +1 -0
- package/lib/utilities/getCachePath.d.ts +6 -0
- package/lib/utilities/getCachePath.d.ts.map +1 -1
- package/lib/utilities/getCachePath.js +6 -0
- package/lib/utilities/getCachePath.js.map +1 -1
- package/lib/utilities/getSessionPath.d.ts +3 -0
- package/lib/utilities/getSessionPath.d.ts.map +1 -1
- package/lib/utilities/getSessionPath.js +5 -2
- package/lib/utilities/getSessionPath.js.map +1 -1
- package/package.json +8 -8
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"openFilePath.d.ts","sourceRoot":"","sources":["../../src/apis/openFilePath.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAIvD,QAAA,MAAM,oBAAoB;;;;;;;;;EAGxB,CAAC;AACH,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAErE,wBAAsB,YAAY,CAAC,MAAM,EAAE,SAAS,CAAC,iBAAiB,EAAE,SAAS,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,
|
|
1
|
+
{"version":3,"file":"openFilePath.d.ts","sourceRoot":"","sources":["../../src/apis/openFilePath.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAIvD,QAAA,MAAM,oBAAoB;;;;;;;;;EAGxB,CAAC;AACH,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAErE,wBAAsB,YAAY,CAAC,MAAM,EAAE,SAAS,CAAC,iBAAiB,EAAE,SAAS,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,CAajG;yBAbqB,YAAY"}
|
package/lib/apis/openFilePath.js
CHANGED
|
@@ -13,8 +13,10 @@ export async function openFilePath(params) {
|
|
|
13
13
|
const { input: { rootPath, relativePath }, ctx: { session }, } = params;
|
|
14
14
|
const fullPath = join(rootPath, relativePath || '');
|
|
15
15
|
console.log(`Opening path: ${fullPath}`);
|
|
16
|
-
const
|
|
17
|
-
|
|
16
|
+
const win32 = platform() == 'win32';
|
|
17
|
+
const openCommand = win32 ? 'start' : 'open';
|
|
18
|
+
const shell = win32 ? 'powershell.exe' : undefined;
|
|
19
|
+
await exec(`${openCommand} ${fullPath}`, { cwd: session.appPath, shell });
|
|
18
20
|
}
|
|
19
21
|
// Attach a trpc procedure to the function.
|
|
20
22
|
openFilePath.procedure = publicProcedure.input(ZodOpenFilePathInput).mutation(openFilePath);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"openFilePath.js","sourceRoot":"","sources":["../../src/apis/openFilePath.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAC5B,OAAO,EAAE,QAAQ,EAAE,MAAM,IAAI,CAAC;AAC9B,OAAO,EAAE,IAAI,IAAI,YAAY,EAAE,MAAM,eAAe,CAAC;AACrD,OA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,KAAK,UAAU,YAAY,CAAC,MAA+C;IAChF,MAAM,EACJ,KAAK,EAAE,EAAE,QAAQ,EAAE,YAAY,EAAE,EACjC,GAAG,EAAE,EAAE,OAAO,EAAE,GACjB,GAAG,MAAM,CAAC;IACX,MAAM,QAAQ,GAAG,IAAI,CAAC,QAAQ,EAAE,YAAY,IAAI,EAAE,CAAC,CAAC;IAEpD,OAAO,CAAC,GAAG,CAAC,iBAAiB,QAAQ,EAAE,CAAC,CAAC;IACzC,MAAM,KAAK,GAAG,QAAQ,EAAE,IAAI,OAAO,CAAC;IACpC,MAAM,WAAW,GAAG,KAAK,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC;IAC7C,MAAM,KAAK,GAAG,KAAK,CAAC,CAAC,CAAC,gBAAgB,CAAC,CAAC,CAAC,SAAS,CAAC;IAEnD,MAAM,IAAI,CAAC,GAAG,WAAW,IAAI,QAAQ,EAAE,EAAE,EAAE,GAAG,EAAE,OAAO,CAAC,OAAO,EAAE,KAAK,EAAE,CAAC,CAAC;AAC5E,CAAC;AAED,2CAA2C;AAC3C,YAAY,CAAC,SAAS,GAAG,eAAe,CAAC,KAAK,CAAC,oBAAoB,CAAC,CAAC,QAAQ,CAAC,YAAY,CAAC,CAAC","sourcesContent":["import { publicProcedure } from '../trpc/common.js';\nimport { z } from 'zod';\nimport { join } from 'path';\nimport { platform } from 'os';\nimport { exec as execCallback } from 'child_process';\nimport { promisify } from 'util';\nimport type { ApiParams } from '../types/ApiParams.js';\n\nconst exec = promisify(execCallback);\n\nconst ZodOpenFilePathInput = z.object({\n rootPath: z.string(),\n relativePath: z.string().optional(),\n});\nexport type OpenFilePathInput = z.infer<typeof ZodOpenFilePathInput>;\n\nexport async function openFilePath(params: ApiParams<OpenFilePathInput, 'session'>): Promise<void> {\n const {\n input: { rootPath, relativePath },\n ctx: { session },\n } = params;\n const fullPath = join(rootPath, relativePath || '');\n\n console.log(`Opening path: ${fullPath}`);\n const win32 = platform() == 'win32';\n const openCommand = win32 ? 'start' : 'open';\n const shell = win32 ? 'powershell.exe' : undefined;\n\n await exec(`${openCommand} ${fullPath}`, { cwd: session.appPath, shell });\n}\n\n// Attach a trpc procedure to the function.\nopenFilePath.procedure = publicProcedure.input(ZodOpenFilePathInput).mutation(openFilePath);\n"]}
|
package/lib/index.d.ts
CHANGED
|
@@ -29,6 +29,7 @@ export { ZodTaskEndDescription } from './types/TaskEndDescription.js';
|
|
|
29
29
|
export { ZodTaskMessage } from './types/TaskMessage.js';
|
|
30
30
|
export { ZodTaskStartDescription } from './types/TaskStartDescription.js';
|
|
31
31
|
export { getCachePath, getLocalCachePath } from './utilities/getCachePath.js';
|
|
32
|
+
export { getActiveSessionsPath } from './utilities/getActiveSessionsPath.js';
|
|
32
33
|
export { getSessionPath } from './utilities/getSessionPath.js';
|
|
33
34
|
export { getConsumedDependencies } from './utilities/getConsumedDependencies.js';
|
|
34
35
|
export { getConsumedPaths } from './utilities/getConsumedPaths.js';
|
package/lib/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACtD,YAAY,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAClE,YAAY,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACxD,YAAY,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAClD,YAAY,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACtD,YAAY,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAC5C,YAAY,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAClE,YAAY,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AACxE,YAAY,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAC1D,YAAY,EAAE,WAAW,EAAE,M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AG9E,OAAO,EACL,kBAAkB,EAClB,oBAAoB,EACpB,OAAO,EACP,YAAY,EACZ,aAAa,EACb,cAAc,EACd,gBAAgB,EAChB,YAAY,EACZ,YAAY,EACZ,YAAY,EACZ,UAAU,EACV,uBAAuB,GACxB,MAAM,iBAAiB,CAAC"}
|
package/lib/index.js
CHANGED
|
@@ -7,6 +7,7 @@ export { ZodTaskEndDescription } from './types/TaskEndDescription.js';
|
|
|
7
7
|
export { ZodTaskMessage } from './types/TaskMessage.js';
|
|
8
8
|
export { ZodTaskStartDescription } from './types/TaskStartDescription.js';
|
|
9
9
|
export { getCachePath, getLocalCachePath } from './utilities/getCachePath.js';
|
|
10
|
+
export { getActiveSessionsPath } from './utilities/getActiveSessionsPath.js';
|
|
10
11
|
export { getSessionPath } from './utilities/getSessionPath.js';
|
|
11
12
|
export { getConsumedDependencies } from './utilities/getConsumedDependencies.js';
|
|
12
13
|
export { getConsumedPaths } from './utilities/getConsumedPaths.js';
|
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAiCA,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AACvD,OAAO,EAAE,iBAAiB,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAC1F,OAAO,EAAE,qBAAqB,EAAE,MAAM,iCAAiC,CAAC;AACxE,OAAO,EAAE,qBAAqB,EAAE,MAAM,iCAAiC,CAAC;AACxE,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAChE,OAAO,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAAC;AACtE,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,EAAE,uBAAuB,EAAE,MAAM,iCAAiC,CAAC;AAC1E,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAC9E,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAC/D,OAAO,EAAE,uBAAuB,EAAE,MAAM,wCAAwC,CAAC;AACjF,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AAEnE,YAAY;AACZ,OAAO,EAAE,uBAAuB,EAAE,MAAM,qCAAqC,CAAC;AAE9E,cAAc;AACd,OAAO,EACL,kBAAkB,EAClB,oBAAoB,EACpB,OAAO,EACP,YAAY,EACZ,aAAa,EACb,cAAc,EACd,gBAAgB,EAChB,YAAY,EACZ,YAAY,EACZ,YAAY,EACZ,UAAU,EACV,uBAAuB,GACxB,MAAM,iBAAiB,CAAC","sourcesContent":["export type { ApiServer } from './types/ApiServer.js';\nexport type { Context, PartialContext } from './types/Context.js';\nexport type { BundleInfo } from './types/BundleInfo.js';\nexport type { Session } from './types/Session.js';\nexport type { TaskStats } from './types/TaskStats.js';\nexport type { Task } from './types/Task.js';\nexport type { TaskDescription } from './types/TaskDescription.js';\nexport type { TaskEndDescription } from './types/TaskEndDescription.js';\nexport type { TaskMessage } from './types/TaskMessage.js';\nexport type { TaskOptions } from './types/TaskOptions.js';\nexport type { TaskStartDescription } from './types/TaskStartDescription.js';\nexport type { CloudpackServer } from './trpc/createCloudpackServer.js';\n\n// API types\nexport type { AddPackageOverrideInput } from './apis/addPackageOverride.js';\nexport type { OpenCodeEditorInput } from './apis/openCodeEditor.js';\nexport type { OpenFilePathInput } from './apis/openFilePath.js';\nexport type { ReportMetricInput } from './apis/reportMetric.js';\nexport type { ValidatePackageOverrideInput, ValidatePackageOverrideOutput } from './apis/validatePackageOverride.js';\nexport type { RestartTaskInput } from './apis/restartTask.js';\n\n// TODO: delete these type exports once API reporting of \"forgotten\" exports is enabled\n// (they're not used and don't really need to be visible in the API)\nexport type {\n EnsurePackageBundledContext,\n EnsurePackageBundledInput,\n EnsurePackageBundledOutput,\n EnsurePackageBundledResult,\n} from './apis/ensurePackageBundled.js';\nexport type { BundleRequest } from './types/BundleRequest.js';\nexport type { BundleTaskOptions } from './types/BundleTaskOptions.js';\nexport type { OverrideOptions } from './types/OverrideOptions.js';\n\nexport { TaskRunner } from './utilities/TaskRunner.js';\nexport { reloadCountSource, taskListSource, taskStatsSource } from './data/busSources.js';\nexport { createCloudpackClient } from './trpc/createCloudpackClient.js';\nexport { createCloudpackServer } from './trpc/createCloudpackServer.js';\nexport { ZodTaskDescription } from './types/TaskDescription.js';\nexport { ZodTaskEndDescription } from './types/TaskEndDescription.js';\nexport { ZodTaskMessage } from './types/TaskMessage.js';\nexport { ZodTaskStartDescription } from './types/TaskStartDescription.js';\nexport { getCachePath, getLocalCachePath } from './utilities/getCachePath.js';\nexport { getSessionPath } from './utilities/getSessionPath.js';\nexport { getConsumedDependencies } from './utilities/getConsumedDependencies.js';\nexport { getConsumedPaths } from './utilities/getConsumedPaths.js';\n\n// Utilities\nexport { createPartialApiContext } from './common/createPartialApiContext.js';\n\n// API methods\nexport {\n addPackageOverride,\n ensurePackageBundled,\n getData,\n getSessionId,\n onDataChanged,\n openCodeEditor,\n openConfigEditor,\n openFilePath,\n reportMetric,\n syncDownload,\n syncUpload,\n validatePackageOverride,\n} from './apis/index.js';\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAiCA,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AACvD,OAAO,EAAE,iBAAiB,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAC1F,OAAO,EAAE,qBAAqB,EAAE,MAAM,iCAAiC,CAAC;AACxE,OAAO,EAAE,qBAAqB,EAAE,MAAM,iCAAiC,CAAC;AACxE,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAChE,OAAO,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAAC;AACtE,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,EAAE,uBAAuB,EAAE,MAAM,iCAAiC,CAAC;AAC1E,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAC9E,OAAO,EAAE,qBAAqB,EAAE,MAAM,sCAAsC,CAAC;AAC7E,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAC/D,OAAO,EAAE,uBAAuB,EAAE,MAAM,wCAAwC,CAAC;AACjF,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AAEnE,YAAY;AACZ,OAAO,EAAE,uBAAuB,EAAE,MAAM,qCAAqC,CAAC;AAE9E,cAAc;AACd,OAAO,EACL,kBAAkB,EAClB,oBAAoB,EACpB,OAAO,EACP,YAAY,EACZ,aAAa,EACb,cAAc,EACd,gBAAgB,EAChB,YAAY,EACZ,YAAY,EACZ,YAAY,EACZ,UAAU,EACV,uBAAuB,GACxB,MAAM,iBAAiB,CAAC","sourcesContent":["export type { ApiServer } from './types/ApiServer.js';\nexport type { Context, PartialContext } from './types/Context.js';\nexport type { BundleInfo } from './types/BundleInfo.js';\nexport type { Session } from './types/Session.js';\nexport type { TaskStats } from './types/TaskStats.js';\nexport type { Task } from './types/Task.js';\nexport type { TaskDescription } from './types/TaskDescription.js';\nexport type { TaskEndDescription } from './types/TaskEndDescription.js';\nexport type { TaskMessage } from './types/TaskMessage.js';\nexport type { TaskOptions } from './types/TaskOptions.js';\nexport type { TaskStartDescription } from './types/TaskStartDescription.js';\nexport type { CloudpackServer } from './trpc/createCloudpackServer.js';\n\n// API types\nexport type { AddPackageOverrideInput } from './apis/addPackageOverride.js';\nexport type { OpenCodeEditorInput } from './apis/openCodeEditor.js';\nexport type { OpenFilePathInput } from './apis/openFilePath.js';\nexport type { ReportMetricInput } from './apis/reportMetric.js';\nexport type { ValidatePackageOverrideInput, ValidatePackageOverrideOutput } from './apis/validatePackageOverride.js';\nexport type { RestartTaskInput } from './apis/restartTask.js';\n\n// TODO: delete these type exports once API reporting of \"forgotten\" exports is enabled\n// (they're not used and don't really need to be visible in the API)\nexport type {\n EnsurePackageBundledContext,\n EnsurePackageBundledInput,\n EnsurePackageBundledOutput,\n EnsurePackageBundledResult,\n} from './apis/ensurePackageBundled.js';\nexport type { BundleRequest } from './types/BundleRequest.js';\nexport type { BundleTaskOptions } from './types/BundleTaskOptions.js';\nexport type { OverrideOptions } from './types/OverrideOptions.js';\n\nexport { TaskRunner } from './utilities/TaskRunner.js';\nexport { reloadCountSource, taskListSource, taskStatsSource } from './data/busSources.js';\nexport { createCloudpackClient } from './trpc/createCloudpackClient.js';\nexport { createCloudpackServer } from './trpc/createCloudpackServer.js';\nexport { ZodTaskDescription } from './types/TaskDescription.js';\nexport { ZodTaskEndDescription } from './types/TaskEndDescription.js';\nexport { ZodTaskMessage } from './types/TaskMessage.js';\nexport { ZodTaskStartDescription } from './types/TaskStartDescription.js';\nexport { getCachePath, getLocalCachePath } from './utilities/getCachePath.js';\nexport { getActiveSessionsPath } from './utilities/getActiveSessionsPath.js';\nexport { getSessionPath } from './utilities/getSessionPath.js';\nexport { getConsumedDependencies } from './utilities/getConsumedDependencies.js';\nexport { getConsumedPaths } from './utilities/getConsumedPaths.js';\n\n// Utilities\nexport { createPartialApiContext } from './common/createPartialApiContext.js';\n\n// API methods\nexport {\n addPackageOverride,\n ensurePackageBundled,\n getData,\n getSessionId,\n onDataChanged,\n openCodeEditor,\n openConfigEditor,\n openFilePath,\n reportMetric,\n syncDownload,\n syncUpload,\n validatePackageOverride,\n} from './apis/index.js';\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getActiveSessionsPath.d.ts","sourceRoot":"","sources":["../../src/utilities/getActiveSessionsPath.ts"],"names":[],"mappings":"AAGA;;GAEG;AACH,wBAAgB,qBAAqB,WAEpC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import path from 'path';
|
|
2
|
+
import { getCachePath } from './getCachePath.js';
|
|
3
|
+
/**
|
|
4
|
+
* Gets the path to the active sessions directory.
|
|
5
|
+
*/
|
|
6
|
+
export function getActiveSessionsPath() {
|
|
7
|
+
return path.join(getCachePath(), 'active-sessions');
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=getActiveSessionsPath.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getActiveSessionsPath.js","sourceRoot":"","sources":["../../src/utilities/getActiveSessionsPath.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAEjD;;GAEG;AACH,MAAM,UAAU,qBAAqB;IACnC,OAAO,IAAI,CAAC,IAAI,CAAC,YAAY,EAAE,EAAE,iBAAiB,CAAC,CAAC;AACtD,CAAC","sourcesContent":["import path from 'path';\nimport { getCachePath } from './getCachePath.js';\n\n/**\n * Gets the path to the active sessions directory.\n */\nexport function getActiveSessionsPath() {\n return path.join(getCachePath(), 'active-sessions');\n}\n"]}
|
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Gets the path to the cache directory.
|
|
3
|
+
*/
|
|
1
4
|
export declare function getCachePath(): string;
|
|
5
|
+
/**
|
|
6
|
+
* Gets the path to the app's local cache directory.
|
|
7
|
+
*/
|
|
2
8
|
export declare function getLocalCachePath(appPath: string): string;
|
|
3
9
|
//# sourceMappingURL=getCachePath.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getCachePath.d.ts","sourceRoot":"","sources":["../../src/utilities/getCachePath.ts"],"names":[],"mappings":"AAGA,wBAAgB,YAAY,WAE3B;AAED,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,MAAM,UAEhD"}
|
|
1
|
+
{"version":3,"file":"getCachePath.d.ts","sourceRoot":"","sources":["../../src/utilities/getCachePath.ts"],"names":[],"mappings":"AAGA;;GAEG;AACH,wBAAgB,YAAY,WAE3B;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,MAAM,UAEhD"}
|
|
@@ -1,8 +1,14 @@
|
|
|
1
1
|
import os from 'os';
|
|
2
2
|
import path from 'path';
|
|
3
|
+
/**
|
|
4
|
+
* Gets the path to the cache directory.
|
|
5
|
+
*/
|
|
3
6
|
export function getCachePath() {
|
|
4
7
|
return path.join(os.homedir(), '.cloudpack');
|
|
5
8
|
}
|
|
9
|
+
/**
|
|
10
|
+
* Gets the path to the app's local cache directory.
|
|
11
|
+
*/
|
|
6
12
|
export function getLocalCachePath(appPath) {
|
|
7
13
|
return path.join(appPath, 'node_modules', '.cache', 'cloudpack');
|
|
8
14
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getCachePath.js","sourceRoot":"","sources":["../../src/utilities/getCachePath.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,IAAI,CAAC;AACpB,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,MAAM,UAAU,YAAY;IAC1B,OAAO,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,OAAO,EAAE,EAAE,YAAY,CAAC,CAAC;AAC/C,CAAC;AAED,MAAM,UAAU,iBAAiB,CAAC,OAAe;IAC/C,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,cAAc,EAAE,QAAQ,EAAE,WAAW,CAAC,CAAC;AACnE,CAAC","sourcesContent":["import os from 'os';\nimport path from 'path';\n\nexport function getCachePath() {\n return path.join(os.homedir(), '.cloudpack');\n}\n\nexport function getLocalCachePath(appPath: string) {\n return path.join(appPath, 'node_modules', '.cache', 'cloudpack');\n}\n"]}
|
|
1
|
+
{"version":3,"file":"getCachePath.js","sourceRoot":"","sources":["../../src/utilities/getCachePath.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,IAAI,CAAC;AACpB,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB;;GAEG;AACH,MAAM,UAAU,YAAY;IAC1B,OAAO,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,OAAO,EAAE,EAAE,YAAY,CAAC,CAAC;AAC/C,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,iBAAiB,CAAC,OAAe;IAC/C,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,cAAc,EAAE,QAAQ,EAAE,WAAW,CAAC,CAAC;AACnE,CAAC","sourcesContent":["import os from 'os';\nimport path from 'path';\n\n/**\n * Gets the path to the cache directory.\n */\nexport function getCachePath() {\n return path.join(os.homedir(), '.cloudpack');\n}\n\n/**\n * Gets the path to the app's local cache directory.\n */\nexport function getLocalCachePath(appPath: string) {\n return path.join(appPath, 'node_modules', '.cache', 'cloudpack');\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getSessionPath.d.ts","sourceRoot":"","sources":["../../src/utilities/getSessionPath.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAEnD,wBAAgB,cAAc,CAAC,OAAO,EAAE,OAAO,UAE9C"}
|
|
1
|
+
{"version":3,"file":"getSessionPath.d.ts","sourceRoot":"","sources":["../../src/utilities/getSessionPath.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAEnD;;GAEG;AACH,wBAAgB,cAAc,CAAC,OAAO,EAAE,OAAO,UAE9C"}
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import path from 'path';
|
|
2
|
-
import {
|
|
2
|
+
import { getActiveSessionsPath } from './getActiveSessionsPath.js';
|
|
3
|
+
/**
|
|
4
|
+
* Gets the path to a session file.
|
|
5
|
+
*/
|
|
3
6
|
export function getSessionPath(session) {
|
|
4
|
-
return path.join(
|
|
7
|
+
return path.join(getActiveSessionsPath(), `${session.id}.json`);
|
|
5
8
|
}
|
|
6
9
|
//# sourceMappingURL=getSessionPath.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getSessionPath.js","sourceRoot":"","sources":["../../src/utilities/getSessionPath.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"getSessionPath.js","sourceRoot":"","sources":["../../src/utilities/getSessionPath.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AAGnE;;GAEG;AACH,MAAM,UAAU,cAAc,CAAC,OAAgB;IAC7C,OAAO,IAAI,CAAC,IAAI,CAAC,qBAAqB,EAAE,EAAE,GAAG,OAAO,CAAC,EAAE,OAAO,CAAC,CAAC;AAClE,CAAC","sourcesContent":["import path from 'path';\nimport { getActiveSessionsPath } from './getActiveSessionsPath.js';\nimport type { Session } from '../types/Session.js';\n\n/**\n * Gets the path to a session file.\n */\nexport function getSessionPath(session: Session) {\n return path.join(getActiveSessionsPath(), `${session.id}.json`);\n}\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ms-cloudpack/api-server",
|
|
3
|
-
"version": "0.44.
|
|
3
|
+
"version": "0.44.3",
|
|
4
4
|
"description": "An implementation of the API server that does interacts with a task scheduler.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -27,20 +27,20 @@
|
|
|
27
27
|
"@lage-run/logger": "^1.3.0",
|
|
28
28
|
"@lage-run/scheduler": "^1.2.1",
|
|
29
29
|
"@lage-run/target-graph": "^0.8.9",
|
|
30
|
-
"@ms-cloudpack/bundler": "^0.20.
|
|
30
|
+
"@ms-cloudpack/bundler": "^0.20.10",
|
|
31
31
|
"@ms-cloudpack/common-types": "^0.5.2",
|
|
32
|
-
"@ms-cloudpack/config": "^0.20.
|
|
32
|
+
"@ms-cloudpack/config": "^0.20.7",
|
|
33
33
|
"@ms-cloudpack/create-express-app": "^1.6.12",
|
|
34
34
|
"@ms-cloudpack/data-bus": "^0.4.2",
|
|
35
35
|
"@ms-cloudpack/file-watcher": "^0.1.2",
|
|
36
|
-
"@ms-cloudpack/import-map": "^0.5.
|
|
36
|
+
"@ms-cloudpack/import-map": "^0.5.3",
|
|
37
37
|
"@ms-cloudpack/json-utilities": "^0.1.4",
|
|
38
|
-
"@ms-cloudpack/package-hashes": "^0.5.
|
|
39
|
-
"@ms-cloudpack/package-utilities": "^7.4.
|
|
38
|
+
"@ms-cloudpack/package-hashes": "^0.5.18",
|
|
39
|
+
"@ms-cloudpack/package-utilities": "^7.4.6",
|
|
40
40
|
"@ms-cloudpack/path-string-parsing": "^1.2.2",
|
|
41
41
|
"@ms-cloudpack/path-utilities": "^2.7.9",
|
|
42
|
-
"@ms-cloudpack/remote-cache": "^0.7.
|
|
43
|
-
"@ms-cloudpack/task-reporter": "^0.14.
|
|
42
|
+
"@ms-cloudpack/remote-cache": "^0.7.5",
|
|
43
|
+
"@ms-cloudpack/task-reporter": "^0.14.1",
|
|
44
44
|
"@ms-cloudpack/telemetry": "^0.5.2",
|
|
45
45
|
"@trpc/client": "^10.45.0",
|
|
46
46
|
"@trpc/server": "^10.45.0",
|