@ms-cloudpack/api-server 0.8.0 → 0.10.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/lib/apis/addPackageOverride.d.ts +85 -96
- package/lib/apis/addPackageOverride.d.ts.map +1 -1
- package/lib/apis/addPackageOverride.js +21 -10
- package/lib/apis/addPackageOverride.js.map +1 -1
- package/lib/apis/getData.d.ts +66 -0
- package/lib/apis/getData.d.ts.map +1 -0
- package/lib/apis/getData.js +11 -0
- package/lib/apis/getData.js.map +1 -0
- package/lib/apis/getSessionId.d.ts +54 -0
- package/lib/apis/getSessionId.d.ts.map +1 -0
- package/lib/apis/getSessionId.js +8 -0
- package/lib/apis/getSessionId.js.map +1 -0
- package/lib/apis/index.d.ts +10 -0
- package/lib/apis/index.d.ts.map +1 -0
- package/lib/apis/index.js +10 -0
- package/lib/apis/index.js.map +1 -0
- package/lib/apis/onDataChanged.d.ts +69 -0
- package/lib/apis/onDataChanged.d.ts.map +1 -0
- package/lib/apis/onDataChanged.js +20 -0
- package/lib/apis/onDataChanged.js.map +1 -0
- package/lib/apis/openCodeEditor.d.ts +69 -96
- package/lib/apis/openCodeEditor.d.ts.map +1 -1
- package/lib/apis/openCodeEditor.js +9 -8
- package/lib/apis/openCodeEditor.js.map +1 -1
- package/lib/apis/openConfigEditor.d.ts +39 -86
- package/lib/apis/openConfigEditor.d.ts.map +1 -1
- package/lib/apis/openConfigEditor.js +6 -2
- package/lib/apis/openConfigEditor.js.map +1 -1
- package/lib/apis/openFilePath.d.ts +50 -92
- package/lib/apis/openFilePath.d.ts.map +1 -1
- package/lib/apis/openFilePath.js +9 -8
- package/lib/apis/openFilePath.js.map +1 -1
- package/lib/apis/reportMetric.d.ts +55 -93
- package/lib/apis/reportMetric.d.ts.map +1 -1
- package/lib/apis/reportMetric.js +7 -6
- package/lib/apis/reportMetric.js.map +1 -1
- package/lib/apis/validatePackageOverride.d.ts +73 -98
- package/lib/apis/validatePackageOverride.d.ts.map +1 -1
- package/lib/apis/validatePackageOverride.js +11 -8
- package/lib/apis/validatePackageOverride.js.map +1 -1
- package/lib/index.d.ts +2 -2
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +2 -2
- package/lib/index.js.map +1 -1
- package/lib/trpc/common.d.ts +68 -0
- package/lib/trpc/common.d.ts.map +1 -0
- package/lib/{trpc.js → trpc/common.js} +2 -2
- package/lib/trpc/common.js.map +1 -0
- package/lib/trpc/connectBusToClient.d.ts +8 -0
- package/lib/trpc/connectBusToClient.d.ts.map +1 -0
- package/lib/trpc/connectBusToClient.js +28 -0
- package/lib/trpc/connectBusToClient.js.map +1 -0
- package/lib/trpc/createAppRouter.d.ts +453 -0
- package/lib/trpc/createAppRouter.d.ts.map +1 -0
- package/lib/trpc/createAppRouter.js +9 -0
- package/lib/trpc/createAppRouter.js.map +1 -0
- package/lib/trpc/createCloudpackClient.d.ts +13 -0
- package/lib/trpc/createCloudpackClient.d.ts.map +1 -0
- package/lib/trpc/createCloudpackClient.js +53 -0
- package/lib/trpc/createCloudpackClient.js.map +1 -0
- package/lib/trpc/createCloudpackServer.d.ts +63 -0
- package/lib/trpc/createCloudpackServer.d.ts.map +1 -0
- package/lib/trpc/createCloudpackServer.js +52 -0
- package/lib/trpc/createCloudpackServer.js.map +1 -0
- package/lib/trpc/createContextFactory.d.ts +32 -0
- package/lib/trpc/createContextFactory.d.ts.map +1 -0
- package/lib/{createContextFactory.js → trpc/createContextFactory.js} +8 -15
- package/lib/trpc/createContextFactory.js.map +1 -0
- package/lib/trpc/createRouterFromApis.d.ts +26 -0
- package/lib/trpc/createRouterFromApis.d.ts.map +1 -0
- package/lib/trpc/createRouterFromApis.js +9 -0
- package/lib/trpc/createRouterFromApis.js.map +1 -0
- package/lib/{trpc-adapters → trpc}/httpAdapter.d.ts +10 -5
- package/lib/trpc/httpAdapter.d.ts.map +1 -0
- package/lib/trpc/httpAdapter.js +59 -0
- package/lib/trpc/httpAdapter.js.map +1 -0
- package/lib/tsdoc-metadata.json +1 -1
- package/lib/utilities/ignoreSelfSignedCertErrors.d.ts +5 -0
- package/lib/utilities/ignoreSelfSignedCertErrors.d.ts.map +1 -0
- package/lib/utilities/ignoreSelfSignedCertErrors.js +15 -0
- package/lib/utilities/ignoreSelfSignedCertErrors.js.map +1 -0
- package/package.json +2 -1
- package/lib/apis/bus.d.ts +0 -103
- package/lib/apis/bus.d.ts.map +0 -1
- package/lib/apis/bus.js +0 -23
- package/lib/apis/bus.js.map +0 -1
- package/lib/apis/restartAllTasks.d.ts +0 -93
- package/lib/apis/restartAllTasks.d.ts.map +0 -1
- package/lib/apis/restartAllTasks.js +0 -18
- package/lib/apis/restartAllTasks.js.map +0 -1
- package/lib/apis/restartTask.d.ts +0 -99
- package/lib/apis/restartTask.d.ts.map +0 -1
- package/lib/apis/restartTask.js +0 -14
- package/lib/apis/restartTask.js.map +0 -1
- package/lib/appRouter.d.ts +0 -924
- package/lib/appRouter.d.ts.map +0 -1
- package/lib/appRouter.js +0 -22
- package/lib/appRouter.js.map +0 -1
- package/lib/createCloudpackClient.d.ts +0 -17
- package/lib/createCloudpackClient.d.ts.map +0 -1
- package/lib/createCloudpackClient.js +0 -57
- package/lib/createCloudpackClient.js.map +0 -1
- package/lib/createCloudpackServer.d.ts +0 -49
- package/lib/createCloudpackServer.d.ts.map +0 -1
- package/lib/createCloudpackServer.js +0 -26
- package/lib/createCloudpackServer.js.map +0 -1
- package/lib/createCloudpackWebClient.d.ts +0 -2
- package/lib/createCloudpackWebClient.d.ts.map +0 -1
- package/lib/createCloudpackWebClient.js +0 -9
- package/lib/createCloudpackWebClient.js.map +0 -1
- package/lib/createContextFactory.d.ts +0 -58
- package/lib/createContextFactory.d.ts.map +0 -1
- package/lib/createContextFactory.js.map +0 -1
- package/lib/trpc-adapters/httpAdapter.d.ts.map +0 -1
- package/lib/trpc-adapters/httpAdapter.js +0 -37
- package/lib/trpc-adapters/httpAdapter.js.map +0 -1
- package/lib/trpc-adapters/httpsAdapter.d.ts +0 -1
- package/lib/trpc-adapters/httpsAdapter.d.ts.map +0 -1
- package/lib/trpc-adapters/httpsAdapter.js +0 -2
- package/lib/trpc-adapters/httpsAdapter.js.map +0 -1
- package/lib/trpc.d.ts +0 -143
- package/lib/trpc.d.ts.map +0 -1
- package/lib/trpc.js.map +0 -1
|
@@ -1,103 +1,76 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
declare const openCodeEditorInput: z.ZodObject<{
|
|
3
|
+
rootPath: z.ZodString;
|
|
4
|
+
relativePath: z.ZodOptional<z.ZodString>;
|
|
5
|
+
line: z.ZodOptional<z.ZodNumber>;
|
|
6
|
+
column: z.ZodOptional<z.ZodNumber>;
|
|
7
|
+
}, "strip", z.ZodTypeAny, {
|
|
8
|
+
rootPath: string;
|
|
9
|
+
relativePath?: string | undefined;
|
|
10
|
+
line?: number | undefined;
|
|
11
|
+
column?: number | undefined;
|
|
12
|
+
}, {
|
|
13
|
+
rootPath: string;
|
|
14
|
+
relativePath?: string | undefined;
|
|
15
|
+
line?: number | undefined;
|
|
16
|
+
column?: number | undefined;
|
|
17
|
+
}>;
|
|
18
|
+
export declare function openCodeEditor({ input: { rootPath, relativePath, line, column }, }: {
|
|
19
|
+
input: z.infer<typeof openCodeEditorInput>;
|
|
20
|
+
}): Promise<void>;
|
|
21
|
+
export declare namespace openCodeEditor {
|
|
22
|
+
var procedure: import("@trpc/server").BuildProcedure<"mutation", {
|
|
23
|
+
_config: import("@trpc/server").RootConfig<{
|
|
24
|
+
ctx: {
|
|
25
|
+
session: import("../index.js").Session;
|
|
26
|
+
bus: import("@ms-cloudpack/data-bus").DataBus;
|
|
27
|
+
rootSpan: import("@opentelemetry/api").Span | undefined;
|
|
28
|
+
reporter: import("@ms-cloudpack/task-reporter").TaskReporter;
|
|
29
|
+
watcher: {
|
|
30
|
+
watch({ path, watchPaths, }: {
|
|
31
|
+
path: string;
|
|
32
|
+
watchPaths?: string[] | undefined;
|
|
33
|
+
}, onPackageChanged: () => void): () => Promise<void>;
|
|
34
|
+
unwatchAll(): Promise<void>;
|
|
35
|
+
};
|
|
36
|
+
packages: import("@ms-cloudpack/bundler-types").PackageDefinitionsCache;
|
|
37
|
+
dispose(): Promise<void>;
|
|
38
|
+
};
|
|
39
|
+
meta: object;
|
|
40
|
+
errorShape: import("@trpc/server").DefaultErrorShape;
|
|
41
|
+
transformer: import("@trpc/server").DefaultDataTransformer;
|
|
42
|
+
}>;
|
|
43
|
+
_meta: object;
|
|
44
|
+
_ctx_out: {
|
|
4
45
|
session: import("../index.js").Session;
|
|
5
46
|
bus: import("@ms-cloudpack/data-bus").DataBus;
|
|
6
|
-
allTasks: Map<string, {
|
|
7
|
-
id: string;
|
|
8
|
-
startTime: number;
|
|
9
|
-
status?: "pending" | "complete" | undefined;
|
|
10
|
-
name?: string | undefined;
|
|
11
|
-
inputPath?: string | undefined;
|
|
12
|
-
outputPath?: string | undefined;
|
|
13
|
-
timings?: {
|
|
14
|
-
name: string;
|
|
15
|
-
start: number;
|
|
16
|
-
end?: number | undefined;
|
|
17
|
-
threwException?: boolean | undefined;
|
|
18
|
-
}[] | undefined;
|
|
19
|
-
durationMilliseconds?: number | undefined;
|
|
20
|
-
lastUpdated?: number | undefined;
|
|
21
|
-
errors?: {
|
|
22
|
-
message: string;
|
|
23
|
-
pluginName: string;
|
|
24
|
-
stack: string;
|
|
25
|
-
fileLocation: string;
|
|
26
|
-
lineNumber: number;
|
|
27
|
-
columnNumber: number;
|
|
28
|
-
}[] | undefined;
|
|
29
|
-
warnings?: {
|
|
30
|
-
message: string;
|
|
31
|
-
pluginName: string;
|
|
32
|
-
stack: string;
|
|
33
|
-
fileLocation: string;
|
|
34
|
-
lineNumber: number;
|
|
35
|
-
columnNumber: number;
|
|
36
|
-
}[] | undefined;
|
|
37
|
-
}>;
|
|
38
|
-
taskRunner: import("../utilities/TaskRunner.js").TaskRunner;
|
|
39
47
|
rootSpan: import("@opentelemetry/api").Span | undefined;
|
|
40
48
|
reporter: import("@ms-cloudpack/task-reporter").TaskReporter;
|
|
49
|
+
watcher: {
|
|
50
|
+
watch({ path, watchPaths, }: {
|
|
51
|
+
path: string;
|
|
52
|
+
watchPaths?: string[] | undefined;
|
|
53
|
+
}, onPackageChanged: () => void): () => Promise<void>;
|
|
54
|
+
unwatchAll(): Promise<void>;
|
|
55
|
+
};
|
|
41
56
|
packages: import("@ms-cloudpack/bundler-types").PackageDefinitionsCache;
|
|
57
|
+
dispose(): Promise<void>;
|
|
42
58
|
};
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
start: number;
|
|
61
|
-
end?: number | undefined;
|
|
62
|
-
threwException?: boolean | undefined;
|
|
63
|
-
}[] | undefined;
|
|
64
|
-
durationMilliseconds?: number | undefined;
|
|
65
|
-
lastUpdated?: number | undefined;
|
|
66
|
-
errors?: {
|
|
67
|
-
message: string;
|
|
68
|
-
pluginName: string;
|
|
69
|
-
stack: string;
|
|
70
|
-
fileLocation: string;
|
|
71
|
-
lineNumber: number;
|
|
72
|
-
columnNumber: number;
|
|
73
|
-
}[] | undefined;
|
|
74
|
-
warnings?: {
|
|
75
|
-
message: string;
|
|
76
|
-
pluginName: string;
|
|
77
|
-
stack: string;
|
|
78
|
-
fileLocation: string;
|
|
79
|
-
lineNumber: number;
|
|
80
|
-
columnNumber: number;
|
|
81
|
-
}[] | undefined;
|
|
82
|
-
}>;
|
|
83
|
-
taskRunner: import("../utilities/TaskRunner.js").TaskRunner;
|
|
84
|
-
rootSpan: import("@opentelemetry/api").Span | undefined;
|
|
85
|
-
reporter: import("@ms-cloudpack/task-reporter").TaskReporter;
|
|
86
|
-
packages: import("@ms-cloudpack/bundler-types").PackageDefinitionsCache;
|
|
87
|
-
};
|
|
88
|
-
_input_in: {
|
|
89
|
-
rootPath: string;
|
|
90
|
-
relativePath: string;
|
|
91
|
-
line?: number | undefined;
|
|
92
|
-
column?: number | undefined;
|
|
93
|
-
};
|
|
94
|
-
_input_out: {
|
|
95
|
-
rootPath: string;
|
|
96
|
-
relativePath: string;
|
|
97
|
-
line?: number | undefined;
|
|
98
|
-
column?: number | undefined;
|
|
99
|
-
};
|
|
100
|
-
_output_in: typeof import("@trpc/server").unsetMarker;
|
|
101
|
-
_output_out: typeof import("@trpc/server").unsetMarker;
|
|
102
|
-
}, void>;
|
|
59
|
+
_input_in: {
|
|
60
|
+
rootPath: string;
|
|
61
|
+
relativePath?: string | undefined;
|
|
62
|
+
line?: number | undefined;
|
|
63
|
+
column?: number | undefined;
|
|
64
|
+
};
|
|
65
|
+
_input_out: {
|
|
66
|
+
rootPath: string;
|
|
67
|
+
relativePath?: string | undefined;
|
|
68
|
+
line?: number | undefined;
|
|
69
|
+
column?: number | undefined;
|
|
70
|
+
};
|
|
71
|
+
_output_in: typeof import("@trpc/server").unsetMarker;
|
|
72
|
+
_output_out: typeof import("@trpc/server").unsetMarker;
|
|
73
|
+
}, void>;
|
|
74
|
+
}
|
|
75
|
+
export {};
|
|
103
76
|
//# sourceMappingURL=openCodeEditor.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"openCodeEditor.d.ts","sourceRoot":"","sources":["../../src/apis/openCodeEditor.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"openCodeEditor.d.ts","sourceRoot":"","sources":["../../src/apis/openCodeEditor.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAOxB,QAAA,MAAM,mBAAmB;;;;;;;;;;;;;;;EAKvB,CAAC;AAEH,wBAAsB,cAAc,CAAC,EACnC,KAAK,EAAE,EAAE,QAAQ,EAAE,YAAY,EAAE,IAAI,EAAE,MAAM,EAAE,GAChD,EAAE;IACD,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;CAC5C,iBAMA;yBAVqB,cAAc"}
|
|
@@ -1,19 +1,20 @@
|
|
|
1
|
-
import { publicProcedure } from '../trpc.js';
|
|
1
|
+
import { publicProcedure } from '../trpc/common.js';
|
|
2
2
|
import { z } from 'zod';
|
|
3
3
|
import { join } from 'path';
|
|
4
4
|
import { exec as execCallback } from 'child_process';
|
|
5
5
|
import { promisify } from 'util';
|
|
6
6
|
const exec = promisify(execCallback);
|
|
7
|
-
|
|
8
|
-
.input(z.object({
|
|
7
|
+
const openCodeEditorInput = z.object({
|
|
9
8
|
rootPath: z.string(),
|
|
10
|
-
relativePath: z.string(),
|
|
9
|
+
relativePath: z.string().optional(),
|
|
11
10
|
line: z.number().optional(),
|
|
12
11
|
column: z.number().optional(),
|
|
13
|
-
})
|
|
14
|
-
|
|
15
|
-
const fullPath = join(rootPath, relativePath);
|
|
12
|
+
});
|
|
13
|
+
export async function openCodeEditor({ input: { rootPath, relativePath, line, column }, }) {
|
|
14
|
+
const fullPath = join(rootPath, relativePath || '');
|
|
16
15
|
console.log(`Opening VSCode with path: ${fullPath}`);
|
|
17
16
|
await exec(`code --goto ${fullPath}:${line}:${column}`, { cwd: process.cwd() });
|
|
18
|
-
}
|
|
17
|
+
}
|
|
18
|
+
// Attach a trpc procedure to the function.
|
|
19
|
+
openCodeEditor.procedure = publicProcedure.input(openCodeEditorInput).mutation(openCodeEditor);
|
|
19
20
|
//# sourceMappingURL=openCodeEditor.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"openCodeEditor.js","sourceRoot":"","sources":["../../src/apis/openCodeEditor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"openCodeEditor.js","sourceRoot":"","sources":["../../src/apis/openCodeEditor.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,IAAI,IAAI,YAAY,EAAE,MAAM,eAAe,CAAC;AACrD,OAAO,EAAE,SAAS,EAAE,MAAM,MAAM,CAAC;AAEjC,MAAM,IAAI,GAAG,SAAS,CAAC,YAAY,CAAC,CAAC;AAErC,MAAM,mBAAmB,GAAG,CAAC,CAAC,MAAM,CAAC;IACnC,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE;IACpB,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACnC,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC3B,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CAC9B,CAAC,CAAC;AAEH,MAAM,CAAC,KAAK,UAAU,cAAc,CAAC,EACnC,KAAK,EAAE,EAAE,QAAQ,EAAE,YAAY,EAAE,IAAI,EAAE,MAAM,EAAE,GAGhD;IACC,MAAM,QAAQ,GAAG,IAAI,CAAC,QAAQ,EAAE,YAAY,IAAI,EAAE,CAAC,CAAC;IAEpD,OAAO,CAAC,GAAG,CAAC,6BAA6B,QAAQ,EAAE,CAAC,CAAC;IAErD,MAAM,IAAI,CAAC,eAAe,QAAQ,IAAI,IAAI,IAAI,MAAM,EAAE,EAAE,EAAE,GAAG,EAAE,OAAO,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC;AAClF,CAAC;AAED,2CAA2C;AAC3C,cAAc,CAAC,SAAS,GAAG,eAAe,CAAC,KAAK,CAAC,mBAAmB,CAAC,CAAC,QAAQ,CAAC,cAAc,CAAC,CAAC","sourcesContent":["import { publicProcedure } from '../trpc/common.js';\nimport { z } from 'zod';\nimport { join } from 'path';\nimport { exec as execCallback } from 'child_process';\nimport { promisify } from 'util';\n\nconst exec = promisify(execCallback);\n\nconst openCodeEditorInput = z.object({\n rootPath: z.string(),\n relativePath: z.string().optional(),\n line: z.number().optional(),\n column: z.number().optional(),\n});\n\nexport async function openCodeEditor({\n input: { rootPath, relativePath, line, column },\n}: {\n input: z.infer<typeof openCodeEditorInput>;\n}) {\n const fullPath = join(rootPath, relativePath || '');\n\n console.log(`Opening VSCode with path: ${fullPath}`);\n\n await exec(`code --goto ${fullPath}:${line}:${column}`, { cwd: process.cwd() });\n}\n\n// Attach a trpc procedure to the function.\nopenCodeEditor.procedure = publicProcedure.input(openCodeEditorInput).mutation(openCodeEditor);\n"]}
|
|
@@ -1,93 +1,46 @@
|
|
|
1
|
-
export declare
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
export declare function openConfigEditor(): Promise<void>;
|
|
2
|
+
export declare namespace openConfigEditor {
|
|
3
|
+
var procedure: import("@trpc/server").BuildProcedure<"mutation", {
|
|
4
|
+
_config: import("@trpc/server").RootConfig<{
|
|
5
|
+
ctx: {
|
|
6
|
+
session: import("../index.js").Session;
|
|
7
|
+
bus: import("@ms-cloudpack/data-bus").DataBus;
|
|
8
|
+
rootSpan: import("@opentelemetry/api").Span | undefined;
|
|
9
|
+
reporter: import("@ms-cloudpack/task-reporter").TaskReporter;
|
|
10
|
+
watcher: {
|
|
11
|
+
watch({ path, watchPaths, }: {
|
|
12
|
+
path: string;
|
|
13
|
+
watchPaths?: string[] | undefined;
|
|
14
|
+
}, onPackageChanged: () => void): () => Promise<void>;
|
|
15
|
+
unwatchAll(): Promise<void>;
|
|
16
|
+
};
|
|
17
|
+
packages: import("@ms-cloudpack/bundler-types").PackageDefinitionsCache;
|
|
18
|
+
dispose(): Promise<void>;
|
|
19
|
+
};
|
|
20
|
+
meta: object;
|
|
21
|
+
errorShape: import("@trpc/server").DefaultErrorShape;
|
|
22
|
+
transformer: import("@trpc/server").DefaultDataTransformer;
|
|
23
|
+
}>;
|
|
24
|
+
_ctx_out: {
|
|
4
25
|
session: import("../index.js").Session;
|
|
5
26
|
bus: import("@ms-cloudpack/data-bus").DataBus;
|
|
6
|
-
allTasks: Map<string, {
|
|
7
|
-
id: string;
|
|
8
|
-
startTime: number;
|
|
9
|
-
status?: "pending" | "complete" | undefined;
|
|
10
|
-
name?: string | undefined;
|
|
11
|
-
inputPath?: string | undefined;
|
|
12
|
-
outputPath?: string | undefined;
|
|
13
|
-
timings?: {
|
|
14
|
-
name: string;
|
|
15
|
-
start: number;
|
|
16
|
-
end?: number | undefined;
|
|
17
|
-
threwException?: boolean | undefined;
|
|
18
|
-
}[] | undefined;
|
|
19
|
-
durationMilliseconds?: number | undefined;
|
|
20
|
-
lastUpdated?: number | undefined;
|
|
21
|
-
errors?: {
|
|
22
|
-
message: string;
|
|
23
|
-
pluginName: string;
|
|
24
|
-
stack: string;
|
|
25
|
-
fileLocation: string;
|
|
26
|
-
lineNumber: number;
|
|
27
|
-
columnNumber: number;
|
|
28
|
-
}[] | undefined;
|
|
29
|
-
warnings?: {
|
|
30
|
-
message: string;
|
|
31
|
-
pluginName: string;
|
|
32
|
-
stack: string;
|
|
33
|
-
fileLocation: string;
|
|
34
|
-
lineNumber: number;
|
|
35
|
-
columnNumber: number;
|
|
36
|
-
}[] | undefined;
|
|
37
|
-
}>;
|
|
38
|
-
taskRunner: import("../utilities/TaskRunner.js").TaskRunner;
|
|
39
27
|
rootSpan: import("@opentelemetry/api").Span | undefined;
|
|
40
28
|
reporter: import("@ms-cloudpack/task-reporter").TaskReporter;
|
|
29
|
+
watcher: {
|
|
30
|
+
watch({ path, watchPaths, }: {
|
|
31
|
+
path: string;
|
|
32
|
+
watchPaths?: string[] | undefined;
|
|
33
|
+
}, onPackageChanged: () => void): () => Promise<void>;
|
|
34
|
+
unwatchAll(): Promise<void>;
|
|
35
|
+
};
|
|
41
36
|
packages: import("@ms-cloudpack/bundler-types").PackageDefinitionsCache;
|
|
37
|
+
dispose(): Promise<void>;
|
|
42
38
|
};
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
allTasks: Map<string, {
|
|
51
|
-
id: string;
|
|
52
|
-
startTime: number;
|
|
53
|
-
status?: "pending" | "complete" | undefined;
|
|
54
|
-
name?: string | undefined;
|
|
55
|
-
inputPath?: string | undefined;
|
|
56
|
-
outputPath?: string | undefined;
|
|
57
|
-
timings?: {
|
|
58
|
-
name: string;
|
|
59
|
-
start: number;
|
|
60
|
-
end?: number | undefined;
|
|
61
|
-
threwException?: boolean | undefined;
|
|
62
|
-
}[] | undefined;
|
|
63
|
-
durationMilliseconds?: number | undefined;
|
|
64
|
-
lastUpdated?: number | undefined;
|
|
65
|
-
errors?: {
|
|
66
|
-
message: string;
|
|
67
|
-
pluginName: string;
|
|
68
|
-
stack: string;
|
|
69
|
-
fileLocation: string;
|
|
70
|
-
lineNumber: number;
|
|
71
|
-
columnNumber: number;
|
|
72
|
-
}[] | undefined;
|
|
73
|
-
warnings?: {
|
|
74
|
-
message: string;
|
|
75
|
-
pluginName: string;
|
|
76
|
-
stack: string;
|
|
77
|
-
fileLocation: string;
|
|
78
|
-
lineNumber: number;
|
|
79
|
-
columnNumber: number;
|
|
80
|
-
}[] | undefined;
|
|
81
|
-
}>;
|
|
82
|
-
taskRunner: import("../utilities/TaskRunner.js").TaskRunner;
|
|
83
|
-
rootSpan: import("@opentelemetry/api").Span | undefined;
|
|
84
|
-
reporter: import("@ms-cloudpack/task-reporter").TaskReporter;
|
|
85
|
-
packages: import("@ms-cloudpack/bundler-types").PackageDefinitionsCache;
|
|
86
|
-
};
|
|
87
|
-
_input_in: typeof import("@trpc/server").unsetMarker;
|
|
88
|
-
_input_out: typeof import("@trpc/server").unsetMarker;
|
|
89
|
-
_output_in: typeof import("@trpc/server").unsetMarker;
|
|
90
|
-
_output_out: typeof import("@trpc/server").unsetMarker;
|
|
91
|
-
_meta: object;
|
|
92
|
-
}, void>;
|
|
39
|
+
_input_in: typeof import("@trpc/server").unsetMarker;
|
|
40
|
+
_input_out: typeof import("@trpc/server").unsetMarker;
|
|
41
|
+
_output_in: typeof import("@trpc/server").unsetMarker;
|
|
42
|
+
_output_out: typeof import("@trpc/server").unsetMarker;
|
|
43
|
+
_meta: object;
|
|
44
|
+
}, void>;
|
|
45
|
+
}
|
|
93
46
|
//# sourceMappingURL=openConfigEditor.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"openConfigEditor.d.ts","sourceRoot":"","sources":["../../src/apis/openConfigEditor.ts"],"names":[],"mappings":"AAGA,
|
|
1
|
+
{"version":3,"file":"openConfigEditor.d.ts","sourceRoot":"","sources":["../../src/apis/openConfigEditor.ts"],"names":[],"mappings":"AAGA,wBAAsB,gBAAgB,kBAErC;yBAFqB,gBAAgB"}
|
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
import { publicProcedure } from '../trpc.js';
|
|
1
|
+
import { publicProcedure } from '../trpc/common.js';
|
|
2
2
|
import { editCloudpackConfig } from '../utilities/editCloudpackConfig.js';
|
|
3
|
-
export
|
|
3
|
+
export async function openConfigEditor() {
|
|
4
|
+
await editCloudpackConfig();
|
|
5
|
+
}
|
|
6
|
+
// Attach a trpc procedure to the function.
|
|
7
|
+
openConfigEditor.procedure = publicProcedure.mutation(openConfigEditor);
|
|
4
8
|
//# sourceMappingURL=openConfigEditor.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"openConfigEditor.js","sourceRoot":"","sources":["../../src/apis/openConfigEditor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"openConfigEditor.js","sourceRoot":"","sources":["../../src/apis/openConfigEditor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,mBAAmB,EAAE,MAAM,qCAAqC,CAAC;AAE1E,MAAM,CAAC,KAAK,UAAU,gBAAgB;IACpC,MAAM,mBAAmB,EAAE,CAAC;AAC9B,CAAC;AAED,2CAA2C;AAC3C,gBAAgB,CAAC,SAAS,GAAG,eAAe,CAAC,QAAQ,CAAC,gBAAgB,CAAC,CAAC","sourcesContent":["import { publicProcedure } from '../trpc/common.js';\nimport { editCloudpackConfig } from '../utilities/editCloudpackConfig.js';\n\nexport async function openConfigEditor() {\n await editCloudpackConfig();\n}\n\n// Attach a trpc procedure to the function.\nopenConfigEditor.procedure = publicProcedure.mutation(openConfigEditor);\n"]}
|
|
@@ -1,99 +1,57 @@
|
|
|
1
|
-
export declare
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
export declare function openFilePath({ input: { rootPath, relativePath }, }: {
|
|
2
|
+
input: {
|
|
3
|
+
rootPath: string;
|
|
4
|
+
relativePath?: string;
|
|
5
|
+
};
|
|
6
|
+
}): Promise<void>;
|
|
7
|
+
export declare namespace openFilePath {
|
|
8
|
+
var procedure: import("@trpc/server").BuildProcedure<"mutation", {
|
|
9
|
+
_config: import("@trpc/server").RootConfig<{
|
|
10
|
+
ctx: {
|
|
11
|
+
session: import("../index.js").Session;
|
|
12
|
+
bus: import("@ms-cloudpack/data-bus").DataBus;
|
|
13
|
+
rootSpan: import("@opentelemetry/api").Span | undefined;
|
|
14
|
+
reporter: import("@ms-cloudpack/task-reporter").TaskReporter;
|
|
15
|
+
watcher: {
|
|
16
|
+
watch({ path, watchPaths, }: {
|
|
17
|
+
path: string;
|
|
18
|
+
watchPaths?: string[] | undefined;
|
|
19
|
+
}, onPackageChanged: () => void): () => Promise<void>;
|
|
20
|
+
unwatchAll(): Promise<void>;
|
|
21
|
+
};
|
|
22
|
+
packages: import("@ms-cloudpack/bundler-types").PackageDefinitionsCache;
|
|
23
|
+
dispose(): Promise<void>;
|
|
24
|
+
};
|
|
25
|
+
meta: object;
|
|
26
|
+
errorShape: import("@trpc/server").DefaultErrorShape;
|
|
27
|
+
transformer: import("@trpc/server").DefaultDataTransformer;
|
|
28
|
+
}>;
|
|
29
|
+
_meta: object;
|
|
30
|
+
_ctx_out: {
|
|
4
31
|
session: import("../index.js").Session;
|
|
5
32
|
bus: import("@ms-cloudpack/data-bus").DataBus;
|
|
6
|
-
allTasks: Map<string, {
|
|
7
|
-
id: string;
|
|
8
|
-
startTime: number;
|
|
9
|
-
status?: "pending" | "complete" | undefined;
|
|
10
|
-
name?: string | undefined;
|
|
11
|
-
inputPath?: string | undefined;
|
|
12
|
-
outputPath?: string | undefined;
|
|
13
|
-
timings?: {
|
|
14
|
-
name: string;
|
|
15
|
-
start: number;
|
|
16
|
-
end?: number | undefined;
|
|
17
|
-
threwException?: boolean | undefined;
|
|
18
|
-
}[] | undefined;
|
|
19
|
-
durationMilliseconds?: number | undefined;
|
|
20
|
-
lastUpdated?: number | undefined;
|
|
21
|
-
errors?: {
|
|
22
|
-
message: string;
|
|
23
|
-
pluginName: string;
|
|
24
|
-
stack: string;
|
|
25
|
-
fileLocation: string;
|
|
26
|
-
lineNumber: number;
|
|
27
|
-
columnNumber: number;
|
|
28
|
-
}[] | undefined;
|
|
29
|
-
warnings?: {
|
|
30
|
-
message: string;
|
|
31
|
-
pluginName: string;
|
|
32
|
-
stack: string;
|
|
33
|
-
fileLocation: string;
|
|
34
|
-
lineNumber: number;
|
|
35
|
-
columnNumber: number;
|
|
36
|
-
}[] | undefined;
|
|
37
|
-
}>;
|
|
38
|
-
taskRunner: import("../utilities/TaskRunner.js").TaskRunner;
|
|
39
33
|
rootSpan: import("@opentelemetry/api").Span | undefined;
|
|
40
34
|
reporter: import("@ms-cloudpack/task-reporter").TaskReporter;
|
|
35
|
+
watcher: {
|
|
36
|
+
watch({ path, watchPaths, }: {
|
|
37
|
+
path: string;
|
|
38
|
+
watchPaths?: string[] | undefined;
|
|
39
|
+
}, onPackageChanged: () => void): () => Promise<void>;
|
|
40
|
+
unwatchAll(): Promise<void>;
|
|
41
|
+
};
|
|
41
42
|
packages: import("@ms-cloudpack/bundler-types").PackageDefinitionsCache;
|
|
43
|
+
dispose(): Promise<void>;
|
|
42
44
|
};
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
name?: string | undefined;
|
|
56
|
-
inputPath?: string | undefined;
|
|
57
|
-
outputPath?: string | undefined;
|
|
58
|
-
timings?: {
|
|
59
|
-
name: string;
|
|
60
|
-
start: number;
|
|
61
|
-
end?: number | undefined;
|
|
62
|
-
threwException?: boolean | undefined;
|
|
63
|
-
}[] | undefined;
|
|
64
|
-
durationMilliseconds?: number | undefined;
|
|
65
|
-
lastUpdated?: number | undefined;
|
|
66
|
-
errors?: {
|
|
67
|
-
message: string;
|
|
68
|
-
pluginName: string;
|
|
69
|
-
stack: string;
|
|
70
|
-
fileLocation: string;
|
|
71
|
-
lineNumber: number;
|
|
72
|
-
columnNumber: number;
|
|
73
|
-
}[] | undefined;
|
|
74
|
-
warnings?: {
|
|
75
|
-
message: string;
|
|
76
|
-
pluginName: string;
|
|
77
|
-
stack: string;
|
|
78
|
-
fileLocation: string;
|
|
79
|
-
lineNumber: number;
|
|
80
|
-
columnNumber: number;
|
|
81
|
-
}[] | undefined;
|
|
82
|
-
}>;
|
|
83
|
-
taskRunner: import("../utilities/TaskRunner.js").TaskRunner;
|
|
84
|
-
rootSpan: import("@opentelemetry/api").Span | undefined;
|
|
85
|
-
reporter: import("@ms-cloudpack/task-reporter").TaskReporter;
|
|
86
|
-
packages: import("@ms-cloudpack/bundler-types").PackageDefinitionsCache;
|
|
87
|
-
};
|
|
88
|
-
_input_in: {
|
|
89
|
-
rootPath: string;
|
|
90
|
-
relativePath: string;
|
|
91
|
-
};
|
|
92
|
-
_input_out: {
|
|
93
|
-
rootPath: string;
|
|
94
|
-
relativePath: string;
|
|
95
|
-
};
|
|
96
|
-
_output_in: typeof import("@trpc/server").unsetMarker;
|
|
97
|
-
_output_out: typeof import("@trpc/server").unsetMarker;
|
|
98
|
-
}, void>;
|
|
45
|
+
_input_in: {
|
|
46
|
+
rootPath: string;
|
|
47
|
+
relativePath?: string | undefined;
|
|
48
|
+
};
|
|
49
|
+
_input_out: {
|
|
50
|
+
rootPath: string;
|
|
51
|
+
relativePath?: string | undefined;
|
|
52
|
+
};
|
|
53
|
+
_output_in: typeof import("@trpc/server").unsetMarker;
|
|
54
|
+
_output_out: typeof import("@trpc/server").unsetMarker;
|
|
55
|
+
}, void>;
|
|
56
|
+
}
|
|
99
57
|
//# sourceMappingURL=openFilePath.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"openFilePath.d.ts","sourceRoot":"","sources":["../../src/apis/openFilePath.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"openFilePath.d.ts","sourceRoot":"","sources":["../../src/apis/openFilePath.ts"],"names":[],"mappings":"AAcA,wBAAsB,YAAY,CAAC,EACjC,KAAK,EAAE,EAAE,QAAQ,EAAE,YAAY,EAAE,GAClC,EAAE;IACD,KAAK,EAAE;QACL,QAAQ,EAAE,MAAM,CAAC;QACjB,YAAY,CAAC,EAAE,MAAM,CAAC;KACvB,CAAC;CACH,iBAOA;yBAdqB,YAAY"}
|
package/lib/apis/openFilePath.js
CHANGED
|
@@ -1,19 +1,20 @@
|
|
|
1
|
-
import { publicProcedure } from '../trpc.js';
|
|
1
|
+
import { publicProcedure } from '../trpc/common.js';
|
|
2
2
|
import { z } from 'zod';
|
|
3
3
|
import { join } from 'path';
|
|
4
4
|
import { platform } from 'os';
|
|
5
5
|
import { exec as execCallback } from 'child_process';
|
|
6
6
|
import { promisify } from 'util';
|
|
7
7
|
const exec = promisify(execCallback);
|
|
8
|
-
|
|
9
|
-
.input(z.object({
|
|
8
|
+
const openFilePathInput = z.object({
|
|
10
9
|
rootPath: z.string(),
|
|
11
|
-
relativePath: z.string(),
|
|
12
|
-
})
|
|
13
|
-
|
|
14
|
-
const fullPath = join(rootPath, relativePath);
|
|
10
|
+
relativePath: z.string().optional(),
|
|
11
|
+
});
|
|
12
|
+
export async function openFilePath({ input: { rootPath, relativePath }, }) {
|
|
13
|
+
const fullPath = join(rootPath, relativePath || '');
|
|
15
14
|
console.log(`Opening path: ${fullPath}`);
|
|
16
15
|
const openCommand = platform() == 'win32' ? 'start' : 'open';
|
|
17
16
|
await exec(`${openCommand} ${fullPath}`, { cwd: process.cwd() });
|
|
18
|
-
}
|
|
17
|
+
}
|
|
18
|
+
// Attach a trpc procedure to the function.
|
|
19
|
+
openFilePath.procedure = publicProcedure.input(openFilePathInput).mutation(openFilePath);
|
|
19
20
|
//# sourceMappingURL=openFilePath.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"openFilePath.js","sourceRoot":"","sources":["../../src/apis/openFilePath.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,
|
|
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,OAAO,EAAE,SAAS,EAAE,MAAM,MAAM,CAAC;AAEjC,MAAM,IAAI,GAAG,SAAS,CAAC,YAAY,CAAC,CAAC;AAErC,MAAM,iBAAiB,GAAG,CAAC,CAAC,MAAM,CAAC;IACjC,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE;IACpB,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CACpC,CAAC,CAAC;AAEH,MAAM,CAAC,KAAK,UAAU,YAAY,CAAC,EACjC,KAAK,EAAE,EAAE,QAAQ,EAAE,YAAY,EAAE,GAMlC;IACC,MAAM,QAAQ,GAAG,IAAI,CAAC,QAAQ,EAAE,YAAY,IAAI,EAAE,CAAC,CAAC;IAEpD,OAAO,CAAC,GAAG,CAAC,iBAAiB,QAAQ,EAAE,CAAC,CAAC;IACzC,MAAM,WAAW,GAAG,QAAQ,EAAE,IAAI,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC;IAE7D,MAAM,IAAI,CAAC,GAAG,WAAW,IAAI,QAAQ,EAAE,EAAE,EAAE,GAAG,EAAE,OAAO,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC;AACnE,CAAC;AAED,2CAA2C;AAC3C,YAAY,CAAC,SAAS,GAAG,eAAe,CAAC,KAAK,CAAC,iBAAiB,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';\n\nconst exec = promisify(execCallback);\n\nconst openFilePathInput = z.object({\n rootPath: z.string(),\n relativePath: z.string().optional(),\n});\n\nexport async function openFilePath({\n input: { rootPath, relativePath },\n}: {\n input: {\n rootPath: string;\n relativePath?: string;\n };\n}) {\n const fullPath = join(rootPath, relativePath || '');\n\n console.log(`Opening path: ${fullPath}`);\n const openCommand = platform() == 'win32' ? 'start' : 'open';\n\n await exec(`${openCommand} ${fullPath}`, { cwd: process.cwd() });\n}\n\n// Attach a trpc procedure to the function.\nopenFilePath.procedure = publicProcedure.input(openFilePathInput).mutation(openFilePath);\n"]}
|