@intuned/runtime-dev 1.3.24-socket.0 → 1.3.25-sm.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/commands/api/run.js +2 -2
- package/dist/commands/auth-sessions/load.js +1 -1
- package/dist/commands/auth-sessions/run-check.js +1 -1
- package/dist/commands/auth-sessions/run-create.js +1 -1
- package/dist/commands/build.js +3 -2
- package/dist/common/intunedJson.d.ts +0 -22
- package/dist/common/intunedJson.js +1 -3
- package/dist/common/jwtTokenManager.js +2 -2
- package/dist/vendor/runtime-interface.js +5 -3
- package/package.json +1 -1
- package/.claude/settings.local.json +0 -7
package/dist/commands/api/run.js
CHANGED
|
@@ -31,12 +31,12 @@ async function executeCLI(apiName, mode, inputData, options) {
|
|
|
31
31
|
const settings = await (0, _settings.getSettings)();
|
|
32
32
|
if (settings.authSessions.enabled) {
|
|
33
33
|
if (!options.authSessionPath) {
|
|
34
|
-
throw new Error("AuthSessions are enabled but no AuthSession provided.\n" + "Please provide --auth-session-path option.\n" + "See https://
|
|
34
|
+
throw new Error("AuthSessions are enabled but no AuthSession provided.\n" + "Please provide --auth-session-path option.\n" + "See https://intunedhq.com/docs/main/05-references/cli/dev for more information.");
|
|
35
35
|
}
|
|
36
36
|
authSessionPathToUse = options.authSessionPath;
|
|
37
37
|
} else {
|
|
38
38
|
if (options.authSessionPath) {
|
|
39
|
-
throw new Error("Authentication is not enabled but AuthSession was provided.\n" + "Enable AuthSessions in Intuned.json to use this feature.\n" + "See https://
|
|
39
|
+
throw new Error("Authentication is not enabled but AuthSession was provided.\n" + "Enable AuthSessions in Intuned.json to use this feature.\n" + "See https://intunedhq.com/docs/main/05-references/cli/dev for more information.");
|
|
40
40
|
}
|
|
41
41
|
}
|
|
42
42
|
const runApiResult = await (0, _runApi.runApi)({
|
|
@@ -16,7 +16,7 @@ _commander.program.description("load AuthSession to browser").option("--cdpAddre
|
|
|
16
16
|
}) => {
|
|
17
17
|
const setting = await (0, _settings.getSettings)();
|
|
18
18
|
if (!setting.authSessions.enabled) {
|
|
19
|
-
throw new Error("Authentication required but not configured.\n" + "Enable AuthSessions in Intuned.json to use this feature.\n" + "See https://
|
|
19
|
+
throw new Error("Authentication required but not configured.\n" + "Enable AuthSessions in Intuned.json to use this feature.\n" + "See https://intunedhq.com/docs/main/05-references/cli/dev for more information.");
|
|
20
20
|
}
|
|
21
21
|
await (0, _playwrightContext.withPlaywrightContext)({
|
|
22
22
|
cdpAddress
|
|
@@ -26,7 +26,7 @@ _commander.program.description("run AuthSession check").option("--cdpAddress <cd
|
|
|
26
26
|
}) => {
|
|
27
27
|
const setting = await (0, _settings.getSettings)();
|
|
28
28
|
if (!setting.authSessions.enabled) {
|
|
29
|
-
throw new Error("Authentication required but not configured.\n" + "Enable AuthSessions in Intuned.json to use this feature.\n" + "See https://
|
|
29
|
+
throw new Error("Authentication required but not configured.\n" + "Enable AuthSessions in Intuned.json to use this feature.\n" + "See https://intunedhq.com/docs/main/05-references/cli/dev for more information.");
|
|
30
30
|
}
|
|
31
31
|
const checkFilePath = (0, _fileUtils.getFullPathInProject)(_constants.AUTH_SESSIONS_FOLDER_NAME, "check");
|
|
32
32
|
if (!fs.exists(checkFilePath)) {
|
|
@@ -34,7 +34,7 @@ _commander.program.description("run AuthSession create").option("--cdpAddress <c
|
|
|
34
34
|
}
|
|
35
35
|
const setting = await (0, _settings.getSettings)();
|
|
36
36
|
if (!setting.authSessions.enabled) {
|
|
37
|
-
throw new Error("Authentication required but not configured.\n" + "Enable AuthSessions in Intuned.json to use this feature.\n" + "See https://
|
|
37
|
+
throw new Error("Authentication required but not configured.\n" + "Enable AuthSessions in Intuned.json to use this feature.\n" + "See https://intunedhq.com/docs/main/05-references/cli/dev for more information.");
|
|
38
38
|
}
|
|
39
39
|
const createFilePath = (0, _fileUtils.getFullPathInProject)(_constants.AUTH_SESSIONS_FOLDER_NAME, "create.ts");
|
|
40
40
|
if (!fs.exists(createFilePath)) {
|
package/dist/commands/build.js
CHANGED
|
@@ -47,7 +47,7 @@ async function build(outfile, mode, template) {
|
|
|
47
47
|
include: ["node_modules/**", `intuned/${template}/**`, "dist", "../typescript-runtime/**"],
|
|
48
48
|
extensions: [".js"],
|
|
49
49
|
ignoreGlobal: false,
|
|
50
|
-
sourceMap:
|
|
50
|
+
sourceMap: true,
|
|
51
51
|
dynamicRequireTargets: ["api/**/*.js", "auth-sessions/**/*.js"],
|
|
52
52
|
requireReturnsDefault: "auto",
|
|
53
53
|
transformMixedEsModules: true
|
|
@@ -68,7 +68,8 @@ async function build(outfile, mode, template) {
|
|
|
68
68
|
await bundle.write({
|
|
69
69
|
format: "cjs",
|
|
70
70
|
file: outfile,
|
|
71
|
-
inlineDynamicImports: true
|
|
71
|
+
inlineDynamicImports: true,
|
|
72
|
+
sourcemap: "inline"
|
|
72
73
|
});
|
|
73
74
|
console.log(`✨ Build succeeded: ${outfile}`);
|
|
74
75
|
} catch (error) {
|
|
@@ -4,17 +4,11 @@ export declare const intunedJsonSchema: z.ZodIntersection<z.ZodObject<{
|
|
|
4
4
|
projectName: z.ZodOptional<z.ZodString>;
|
|
5
5
|
workspaceId: z.ZodOptional<z.ZodString>;
|
|
6
6
|
metadata: z.ZodCatch<z.ZodOptional<z.ZodObject<{
|
|
7
|
-
defaultJobInput: z.ZodCatch<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>>;
|
|
8
7
|
defaultRunPlaygroundInput: z.ZodCatch<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>>;
|
|
9
|
-
testAuthSessionInput: z.ZodCatch<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>>;
|
|
10
8
|
}, "strip", z.ZodTypeAny, {
|
|
11
|
-
defaultJobInput?: Record<string, any> | undefined;
|
|
12
9
|
defaultRunPlaygroundInput?: Record<string, any> | undefined;
|
|
13
|
-
testAuthSessionInput?: Record<string, any> | undefined;
|
|
14
10
|
}, {
|
|
15
|
-
defaultJobInput?: unknown;
|
|
16
11
|
defaultRunPlaygroundInput?: unknown;
|
|
17
|
-
testAuthSessionInput?: unknown;
|
|
18
12
|
}>>>;
|
|
19
13
|
browserSize: z.ZodCatch<z.ZodOptional<z.ZodObject<{
|
|
20
14
|
width: z.ZodNumber;
|
|
@@ -37,17 +31,11 @@ export declare const intunedJsonSchema: z.ZodIntersection<z.ZodObject<{
|
|
|
37
31
|
projectName: z.ZodOptional<z.ZodString>;
|
|
38
32
|
workspaceId: z.ZodOptional<z.ZodString>;
|
|
39
33
|
metadata: z.ZodCatch<z.ZodOptional<z.ZodObject<{
|
|
40
|
-
defaultJobInput: z.ZodCatch<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>>;
|
|
41
34
|
defaultRunPlaygroundInput: z.ZodCatch<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>>;
|
|
42
|
-
testAuthSessionInput: z.ZodCatch<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>>;
|
|
43
35
|
}, "strip", z.ZodTypeAny, {
|
|
44
|
-
defaultJobInput?: Record<string, any> | undefined;
|
|
45
36
|
defaultRunPlaygroundInput?: Record<string, any> | undefined;
|
|
46
|
-
testAuthSessionInput?: Record<string, any> | undefined;
|
|
47
37
|
}, {
|
|
48
|
-
defaultJobInput?: unknown;
|
|
49
38
|
defaultRunPlaygroundInput?: unknown;
|
|
50
|
-
testAuthSessionInput?: unknown;
|
|
51
39
|
}>>>;
|
|
52
40
|
browserSize: z.ZodCatch<z.ZodOptional<z.ZodObject<{
|
|
53
41
|
width: z.ZodNumber;
|
|
@@ -70,17 +58,11 @@ export declare const intunedJsonSchema: z.ZodIntersection<z.ZodObject<{
|
|
|
70
58
|
projectName: z.ZodOptional<z.ZodString>;
|
|
71
59
|
workspaceId: z.ZodOptional<z.ZodString>;
|
|
72
60
|
metadata: z.ZodCatch<z.ZodOptional<z.ZodObject<{
|
|
73
|
-
defaultJobInput: z.ZodCatch<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>>;
|
|
74
61
|
defaultRunPlaygroundInput: z.ZodCatch<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>>;
|
|
75
|
-
testAuthSessionInput: z.ZodCatch<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>>;
|
|
76
62
|
}, "strip", z.ZodTypeAny, {
|
|
77
|
-
defaultJobInput?: Record<string, any> | undefined;
|
|
78
63
|
defaultRunPlaygroundInput?: Record<string, any> | undefined;
|
|
79
|
-
testAuthSessionInput?: Record<string, any> | undefined;
|
|
80
64
|
}, {
|
|
81
|
-
defaultJobInput?: unknown;
|
|
82
65
|
defaultRunPlaygroundInput?: unknown;
|
|
83
|
-
testAuthSessionInput?: unknown;
|
|
84
66
|
}>>>;
|
|
85
67
|
browserSize: z.ZodCatch<z.ZodOptional<z.ZodObject<{
|
|
86
68
|
width: z.ZodNumber;
|
|
@@ -192,9 +174,7 @@ export declare function loadIntunedJson(): Promise<Err<never, string> | Ok<{
|
|
|
192
174
|
workspaceId?: string | undefined;
|
|
193
175
|
projectName?: string | undefined;
|
|
194
176
|
metadata?: {
|
|
195
|
-
defaultJobInput?: Record<string, any> | undefined;
|
|
196
177
|
defaultRunPlaygroundInput?: Record<string, any> | undefined;
|
|
197
|
-
testAuthSessionInput?: Record<string, any> | undefined;
|
|
198
178
|
} | undefined;
|
|
199
179
|
browserSize?: {
|
|
200
180
|
width: number;
|
|
@@ -235,9 +215,7 @@ export declare function loadIntunedJsonSync(): Err<never, string> | Ok<{
|
|
|
235
215
|
workspaceId?: string | undefined;
|
|
236
216
|
projectName?: string | undefined;
|
|
237
217
|
metadata?: {
|
|
238
|
-
defaultJobInput?: Record<string, any> | undefined;
|
|
239
218
|
defaultRunPlaygroundInput?: Record<string, any> | undefined;
|
|
240
|
-
testAuthSessionInput?: Record<string, any> | undefined;
|
|
241
219
|
} | undefined;
|
|
242
220
|
browserSize?: {
|
|
243
221
|
width: number;
|
|
@@ -24,9 +24,7 @@ const intunedJsonSchema = exports.intunedJsonSchema = _zod.z.object({
|
|
|
24
24
|
projectName: _zod.z.string().optional(),
|
|
25
25
|
workspaceId: _zod.z.string().optional(),
|
|
26
26
|
metadata: _zod.z.object({
|
|
27
|
-
|
|
28
|
-
defaultRunPlaygroundInput: _zod.z.record(_zod.z.any()).optional().catch(undefined),
|
|
29
|
-
testAuthSessionInput: _zod.z.record(_zod.z.any()).optional().catch(undefined)
|
|
27
|
+
defaultRunPlaygroundInput: _zod.z.record(_zod.z.any()).optional().catch(undefined)
|
|
30
28
|
}).optional().catch(undefined),
|
|
31
29
|
browserSize: _zod.z.object({
|
|
32
30
|
width: _zod.z.number().int().min(200).max(3840),
|
|
@@ -80,7 +80,7 @@ class JwtTokenManager {
|
|
|
80
80
|
headers
|
|
81
81
|
});
|
|
82
82
|
if (result.status === 401 && process.env[_constants.CLI_ENV_VAR_KEY] === "true") {
|
|
83
|
-
console.warn("Unauthorized backend function call - make sure to provision your project to Intuned to set up the correct API credentials.\n" + "Run 'intuned provision' or see https://
|
|
83
|
+
console.warn("Unauthorized backend function call - make sure to provision your project to Intuned to set up the correct API credentials.\n" + "Run 'intuned provision' or see https://intunedhq.com/docs/main/05-references/cli#provision-project for more information.");
|
|
84
84
|
}
|
|
85
85
|
return result;
|
|
86
86
|
}
|
|
@@ -101,7 +101,7 @@ class JwtTokenManager {
|
|
|
101
101
|
return `${domain}/api/${workspaceId}/functions/${projectId}`;
|
|
102
102
|
} catch (e) {
|
|
103
103
|
if (process.env[_constants.CLI_ENV_VAR_KEY] === "true") {
|
|
104
|
-
throw new Error(`API credentials not set - make sure to provision your project to Intuned to set up the correct API credentials.\n` + `Run 'intuned provision' or see https://
|
|
104
|
+
throw new Error(`API credentials not set - make sure to provision your project to Intuned to set up the correct API credentials.\n` + `Run 'intuned provision' or see https://intunedhq.com/docs/main/05-references/cli#provision-project for more information.\n` + `Original error: ${e.message}`);
|
|
105
105
|
}
|
|
106
106
|
}
|
|
107
107
|
}
|
|
@@ -31,7 +31,7 @@ var require_errors = __commonJS({
|
|
|
31
31
|
"../packages/runtime-interface/dist/errors.js"(exports2) {
|
|
32
32
|
"use strict";
|
|
33
33
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
34
|
-
exports2.ResultTooBigError = exports2.InternalInvalidInputError = exports2.AutomationError = exports2.MaxLevelsExceededError = exports2.AuthCheckFailedError = exports2.AuthCheckNotFoundError = exports2.AuthRequiredError = exports2.AbortedError = exports2.InvalidCheckError = exports2.InvalidApiError = exports2.ApiNotFoundError = exports2.RunAutomationError = exports2.runAutomationErrorCodes = exports2.resultTooBigErrorCode = exports2.internalInvalidInputErrorCode = exports2.automationError = exports2.maxLevelsExceededErrorCode = exports2.authCheckFailedErrorCode = exports2.authCheckNotFoundErrorCode = exports2.authRequiredErrorCode = exports2.abortedErrorCode = exports2.invalidCheckErrorCode = exports2.invalidApiErrorCode = exports2.apiNotFoundErrorCode = void 0;
|
|
34
|
+
exports2.ResultTooBigError = exports2.InternalInvalidInputError = exports2.AutomationError = exports2.MaxLevelsExceededError = exports2.AuthCheckFailedError = exports2.AuthCheckNotFoundError = exports2.AuthRequiredError = exports2.AbortedError = exports2.InvalidCheckError = exports2.InvalidApiError = exports2.ApiNotFoundError = exports2.RunAutomationError = exports2.runAutomationErrorCodes = exports2.runtimeErrorCode = exports2.resultTooBigErrorCode = exports2.internalInvalidInputErrorCode = exports2.automationError = exports2.maxLevelsExceededErrorCode = exports2.authCheckFailedErrorCode = exports2.authCheckNotFoundErrorCode = exports2.authRequiredErrorCode = exports2.abortedErrorCode = exports2.invalidCheckErrorCode = exports2.invalidApiErrorCode = exports2.apiNotFoundErrorCode = void 0;
|
|
35
35
|
exports2.apiNotFoundErrorCode = "APINotFoundError";
|
|
36
36
|
exports2.invalidApiErrorCode = "InvalidAPIError";
|
|
37
37
|
exports2.invalidCheckErrorCode = "InvalidCheckError";
|
|
@@ -43,6 +43,7 @@ var require_errors = __commonJS({
|
|
|
43
43
|
exports2.automationError = "AutomationError";
|
|
44
44
|
exports2.internalInvalidInputErrorCode = "InternalInvalidInputError";
|
|
45
45
|
exports2.resultTooBigErrorCode = "ResultTooBigError";
|
|
46
|
+
exports2.runtimeErrorCode = "RuntimeError";
|
|
46
47
|
exports2.runAutomationErrorCodes = [
|
|
47
48
|
exports2.apiNotFoundErrorCode,
|
|
48
49
|
exports2.invalidApiErrorCode,
|
|
@@ -54,7 +55,8 @@ var require_errors = __commonJS({
|
|
|
54
55
|
exports2.maxLevelsExceededErrorCode,
|
|
55
56
|
exports2.automationError,
|
|
56
57
|
exports2.internalInvalidInputErrorCode,
|
|
57
|
-
exports2.resultTooBigErrorCode
|
|
58
|
+
exports2.resultTooBigErrorCode,
|
|
59
|
+
exports2.runtimeErrorCode
|
|
58
60
|
];
|
|
59
61
|
var RunAutomationError = class {
|
|
60
62
|
constructor(code, message) {
|
|
@@ -430,7 +432,7 @@ var require_interfaceClient = __commonJS({
|
|
|
430
432
|
constructor(filePath) {
|
|
431
433
|
this.fileStream = fs.createReadStream(filePath, { encoding: "utf-8" });
|
|
432
434
|
}
|
|
433
|
-
sendJSON(data) {
|
|
435
|
+
async sendJSON(data) {
|
|
434
436
|
console.log("Sending message", data);
|
|
435
437
|
}
|
|
436
438
|
async *receiveJSON() {
|
package/package.json
CHANGED