@intuned/runtime-dev 1.3.18-interface.12 → 1.3.18-interface.2
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/.babelrc +21 -0
- package/.eslintignore +10 -0
- package/.eslintrc.js +39 -0
- package/InterfaceTemplate/__utils.ts +61 -0
- package/InterfaceTemplate/index.playwright.ts +6 -0
- package/WebTemplate.zip +0 -0
- package/api/sample.ts +4 -0
- package/package.json +18 -76
- package/template.tsconfig.json +11 -0
- package/tsconfig.eslint.json +5 -0
- package/tsconfig.json +25 -0
- package/typedoc.json +49 -0
- package/dist/commands/api/run.d.ts +0 -8
- package/dist/commands/api/run.js +0 -2094
- package/dist/commands/auth-sessions/load.d.ts +0 -1
- package/dist/commands/auth-sessions/load.js +0 -1559
- package/dist/commands/auth-sessions/run-check.d.ts +0 -1
- package/dist/commands/auth-sessions/run-check.js +0 -1964
- package/dist/commands/auth-sessions/run-create.d.ts +0 -1
- package/dist/commands/auth-sessions/run-create.js +0 -1968
- package/dist/commands/browser/save-state.d.ts +0 -1
- package/dist/commands/browser/save-state.js +0 -108
- package/dist/commands/browser/start-browser.d.ts +0 -1
- package/dist/commands/browser/start-browser.js +0 -67
- package/dist/commands/build.d.ts +0 -2
- package/dist/commands/build.js +0 -203
- package/dist/commands/common/tsNodeImport.d.ts +0 -5
- package/dist/commands/common/tsNodeImport.js +0 -82
- package/dist/commands/get-headless-user-agent.d.ts +0 -2
- package/dist/commands/get-headless-user-agent.js +0 -354
- package/dist/commands/interface/run.d.ts +0 -3
- package/dist/commands/interface/run.js +0 -2084
- package/dist/commands/intuned-cli/main.d.ts +0 -2
- package/dist/commands/intuned-cli/main.js +0 -5403
- package/dist/commands/ts-check.d.ts +0 -1
- package/dist/commands/ts-check.js +0 -158
- package/dist/common/assets/browser_scripts.js +0 -2580
- package/dist/common/asyncLocalStorage/index.d.ts +0 -17
- package/dist/common/asyncLocalStorage/index.js +0 -41
- package/dist/common/binStartupScript.d.ts +0 -2
- package/dist/common/binStartupScript.js +0 -152
- package/dist/common/cleanEnvironmentVariables.d.ts +0 -3
- package/dist/common/cleanEnvironmentVariables.js +0 -38
- package/dist/common/constants.d.ts +0 -13
- package/dist/common/constants.js +0 -59
- package/dist/common/contextStorageStateHelpers.d.ts +0 -24
- package/dist/common/contextStorageStateHelpers.js +0 -108
- package/dist/common/jwtTokenManager.d.ts +0 -19
- package/dist/common/jwtTokenManager.js +0 -180
- package/dist/common/runApi/index.d.ts +0 -11
- package/dist/common/runApi/index.js +0 -1873
- package/dist/common/settingsSchema.d.ts +0 -540
- package/dist/common/settingsSchema.js +0 -92
- package/dist/common/telemetry.d.ts +0 -6
- package/dist/common/telemetry.js +0 -63
- package/dist/export.d-BAUMB-lG.d.ts +0 -140
- package/dist/index.d.ts +0 -6
- package/dist/index.js +0 -808
- package/dist/runtime/index.d.ts +0 -168
- package/dist/runtime/index.js +0 -801
|
@@ -1 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
@@ -1,158 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
var __create = Object.create;
|
|
3
|
-
var __defProp = Object.defineProperty;
|
|
4
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
-
var __copyProps = (to, from, except, desc) => {
|
|
9
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
10
|
-
for (let key of __getOwnPropNames(from))
|
|
11
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
12
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
13
|
-
}
|
|
14
|
-
return to;
|
|
15
|
-
};
|
|
16
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
17
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
18
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
19
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
20
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
21
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
22
|
-
mod
|
|
23
|
-
));
|
|
24
|
-
|
|
25
|
-
// src/commands/ts-check.ts
|
|
26
|
-
var ts = __toESM(require("typescript"));
|
|
27
|
-
var import_commander = require("commander");
|
|
28
|
-
var fs3 = __toESM(require("fs-extra"));
|
|
29
|
-
var path3 = __toESM(require("path"));
|
|
30
|
-
|
|
31
|
-
// src/commands/common/utils/template.ts
|
|
32
|
-
var fs2 = __toESM(require("fs-extra"));
|
|
33
|
-
var path2 = __toESM(require("path"));
|
|
34
|
-
|
|
35
|
-
// src/commands/common/utils/fileUtils.ts
|
|
36
|
-
var path = __toESM(require("path"));
|
|
37
|
-
var fs = __toESM(require("fs-extra"));
|
|
38
|
-
var import_dotenv = __toESM(require("dotenv"));
|
|
39
|
-
import_dotenv.default.config();
|
|
40
|
-
function getFullPathInProject(...paths) {
|
|
41
|
-
return path.resolve(process.cwd(), process.env.ROOT || "./", ...paths);
|
|
42
|
-
}
|
|
43
|
-
async function listProjectFilesAndFolders() {
|
|
44
|
-
const projectPath = path.resolve(process.cwd(), process.env.ROOT || "./");
|
|
45
|
-
try {
|
|
46
|
-
const files = await fs.readdir(projectPath, { withFileTypes: true });
|
|
47
|
-
return files.map((file) => ({
|
|
48
|
-
type: file.isDirectory() ? "Folder" : "File",
|
|
49
|
-
fullPath: path.join(projectPath, file.name),
|
|
50
|
-
name: file.name
|
|
51
|
-
}));
|
|
52
|
-
} catch (err) {
|
|
53
|
-
console.error("Error reading the directory:", err);
|
|
54
|
-
throw err;
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
// src/commands/common/utils/template.ts
|
|
59
|
-
var moveTemplateFiles = async (templateName) => {
|
|
60
|
-
await fs2.remove("./intuned");
|
|
61
|
-
await fs2.ensureDir("./intuned");
|
|
62
|
-
const currentFileLocation = path2.resolve(
|
|
63
|
-
__dirname,
|
|
64
|
-
"..",
|
|
65
|
-
"..",
|
|
66
|
-
"..",
|
|
67
|
-
"..",
|
|
68
|
-
templateName
|
|
69
|
-
);
|
|
70
|
-
await fs2.copy(`${currentFileLocation}`, `./intuned/${templateName}`, {
|
|
71
|
-
filter: (src, _) => {
|
|
72
|
-
if (src.includes(".d.ts")) {
|
|
73
|
-
return false;
|
|
74
|
-
}
|
|
75
|
-
return true;
|
|
76
|
-
}
|
|
77
|
-
});
|
|
78
|
-
const filesAndFolders = await listProjectFilesAndFolders();
|
|
79
|
-
const pathsIgnoreList = [
|
|
80
|
-
getFullPathInProject("intuned"),
|
|
81
|
-
getFullPathInProject("node_modules"),
|
|
82
|
-
getFullPathInProject("package.json"),
|
|
83
|
-
getFullPathInProject("yarn.lock"),
|
|
84
|
-
getFullPathInProject(".env")
|
|
85
|
-
];
|
|
86
|
-
const filesToCopy = filesAndFolders.filter(
|
|
87
|
-
(file) => !pathsIgnoreList.includes(file.fullPath)
|
|
88
|
-
);
|
|
89
|
-
for (const file of filesToCopy) {
|
|
90
|
-
await fs2.copy(file.fullPath, `./intuned/${templateName}/${file.name}`);
|
|
91
|
-
}
|
|
92
|
-
};
|
|
93
|
-
|
|
94
|
-
// src/commands/ts-check.ts
|
|
95
|
-
import_commander.program.description("Check TypeScript types in the project").option("-t, --template <type>", "template to use", "InterfaceTemplate").allowUnknownOption().action(async ({ template }) => {
|
|
96
|
-
await moveTemplateFiles(template);
|
|
97
|
-
const templateTsConfig = path3.resolve(
|
|
98
|
-
__dirname,
|
|
99
|
-
"..",
|
|
100
|
-
"..",
|
|
101
|
-
"template.tsconfig.json"
|
|
102
|
-
);
|
|
103
|
-
await fs3.copy(templateTsConfig, `./intuned/${template}/tsconfig.json`);
|
|
104
|
-
checkTypes(template);
|
|
105
|
-
});
|
|
106
|
-
function checkTypes(template) {
|
|
107
|
-
const configPath = ts.findConfigFile(
|
|
108
|
-
`./intuned/${template}`,
|
|
109
|
-
ts.sys.fileExists,
|
|
110
|
-
"tsconfig.json"
|
|
111
|
-
);
|
|
112
|
-
if (!configPath) {
|
|
113
|
-
console.error("Could not find a valid 'tsconfig.json'.");
|
|
114
|
-
process.exit(1);
|
|
115
|
-
}
|
|
116
|
-
const readConfigResult = ts.readConfigFile(configPath, ts.sys.readFile);
|
|
117
|
-
const config = readConfigResult.config;
|
|
118
|
-
const parseConfigHost = {
|
|
119
|
-
useCaseSensitiveFileNames: ts.sys.useCaseSensitiveFileNames,
|
|
120
|
-
readDirectory: ts.sys.readDirectory,
|
|
121
|
-
fileExists: ts.sys.fileExists,
|
|
122
|
-
readFile: ts.sys.readFile
|
|
123
|
-
};
|
|
124
|
-
const parsed = ts.parseJsonConfigFileContent(
|
|
125
|
-
config,
|
|
126
|
-
parseConfigHost,
|
|
127
|
-
"./intuned"
|
|
128
|
-
);
|
|
129
|
-
const program2 = ts.createProgram(parsed.fileNames, parsed.options);
|
|
130
|
-
const emitResult = program2.emit();
|
|
131
|
-
const allDiagnostics = ts.getPreEmitDiagnostics(program2).concat(emitResult.diagnostics);
|
|
132
|
-
allDiagnostics.forEach((diagnostic) => {
|
|
133
|
-
if (diagnostic.file) {
|
|
134
|
-
const { line, character } = ts.getLineAndCharacterOfPosition(
|
|
135
|
-
diagnostic.file,
|
|
136
|
-
diagnostic.start
|
|
137
|
-
);
|
|
138
|
-
const message = ts.flattenDiagnosticMessageText(
|
|
139
|
-
diagnostic.messageText,
|
|
140
|
-
"\n"
|
|
141
|
-
);
|
|
142
|
-
console.log(
|
|
143
|
-
`${diagnostic.file.fileName} (${line + 1},${character + 1}): ${message}`
|
|
144
|
-
);
|
|
145
|
-
} else {
|
|
146
|
-
console.log(
|
|
147
|
-
ts.flattenDiagnosticMessageText(diagnostic.messageText, "\n")
|
|
148
|
-
);
|
|
149
|
-
}
|
|
150
|
-
});
|
|
151
|
-
if (allDiagnostics.length === 0) {
|
|
152
|
-
console.log("\u2728 TypeScript type checking passed without errors.");
|
|
153
|
-
} else {
|
|
154
|
-
console.error("Errors found during TypeScript type checking.");
|
|
155
|
-
process.exit(1);
|
|
156
|
-
}
|
|
157
|
-
}
|
|
158
|
-
import_commander.program.parse(process.argv);
|