@intuned/runtime-dev 1.3.18-interface.1 → 1.3.18-interface.11

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.
Files changed (40) hide show
  1. package/dist/commands/common/tsNodeImport.d.ts +5 -0
  2. package/dist/commands/common/tsNodeImport.js +82 -0
  3. package/dist/commands/interface/run.d.ts +3 -0
  4. package/dist/commands/interface/run.js +2084 -0
  5. package/dist/common/assets/browser_scripts.js +2580 -0
  6. package/dist/common/asyncLocalStorage/index.d.ts +17 -0
  7. package/dist/common/asyncLocalStorage/index.js +41 -0
  8. package/dist/common/binStartupScript.d.ts +2 -0
  9. package/dist/common/binStartupScript.js +152 -0
  10. package/dist/common/cleanEnvironmentVariables.d.ts +3 -0
  11. package/dist/common/cleanEnvironmentVariables.js +38 -0
  12. package/dist/common/constants.d.ts +13 -0
  13. package/dist/common/constants.js +59 -0
  14. package/dist/common/contextStorageStateHelpers.d.ts +24 -0
  15. package/dist/common/contextStorageStateHelpers.js +108 -0
  16. package/dist/common/jwtTokenManager.d.ts +19 -0
  17. package/dist/common/jwtTokenManager.js +180 -0
  18. package/dist/common/runApi/index.d.ts +11 -0
  19. package/dist/common/runApi/index.js +1873 -0
  20. package/dist/common/settingsSchema.d.ts +540 -0
  21. package/dist/common/settingsSchema.js +92 -0
  22. package/dist/common/telemetry.d.ts +6 -0
  23. package/dist/common/telemetry.js +63 -0
  24. package/dist/export.d-BAUMB-lG.d.ts +140 -0
  25. package/dist/index.d.ts +6 -0
  26. package/dist/index.js +808 -0
  27. package/dist/runtime/index.d.ts +168 -0
  28. package/dist/runtime/index.js +801 -0
  29. package/package.json +63 -18
  30. package/.babelrc +0 -21
  31. package/.eslintignore +0 -10
  32. package/.eslintrc.js +0 -39
  33. package/InterfaceTemplate/__utils.ts +0 -61
  34. package/InterfaceTemplate/index.playwright.ts +0 -6
  35. package/WebTemplate.zip +0 -0
  36. package/api/sample.ts +0 -4
  37. package/template.tsconfig.json +0 -11
  38. package/tsconfig.eslint.json +0 -5
  39. package/tsconfig.json +0 -25
  40. package/typedoc.json +0 -49
package/package.json CHANGED
@@ -1,25 +1,68 @@
1
1
  {
2
2
  "name": "@intuned/runtime-dev",
3
- "version": "1.3.18-interface.1",
3
+ "version": "1.3.18-interface.11",
4
4
  "description": "Intuned runtime",
5
+ "packageManager": "yarn@4.12.0",
6
+ "main": "./dist/index.js",
7
+ "types": "./dist/index.d.ts",
5
8
  "exports": {
6
- ".": "./dist/index.js",
7
- "./dist/runtime": "./dist/runtime/index.js",
8
- "./dist/common/runApi": "./dist/common/runApi/index.js",
9
- "./dist/common/settingsSchema": "./dist/common/settingsSchema.js",
10
- "./dist/common/contextStorageStateHelpers": "./dist/common/contextStorageStateHelpers.js",
11
- "./dist/common/telemetry": "./dist/common/telemetry.js",
12
- "./dist/common/jwtTokenManager": "./dist/common/jwtTokenManager.js",
13
- "./dist/common/asyncLocalStorage": "./dist/common/asyncLocalStorage/index.js",
14
- "./dist/common/cleanEnvironmentVariables": "./dist/common/cleanEnvironmentVariables.js",
15
- "./dist/common/constants": "./dist/common/constants.js",
16
- "./dist/commands/interface/run": "./dist/commands/interface/run.js",
17
- "./interface": "./dist/commands/interface/index.js",
18
- "./dist/commands/intuned-run/intuned-run": "./dist/commands/intuned-run/intuned-run.js",
19
- "./dist/common/binStartupScript": "./dist/common/binStartupScript.js",
20
- "./dist/commands/common/utils/interfaceClient": "./dist/commands/common/utils/interfaceClient.js"
9
+ ".": {
10
+ "types": "./dist/index.d.ts",
11
+ "require": "./dist/index.js"
12
+ },
13
+ "./dist/runtime": {
14
+ "types": "./dist/runtime/index.d.ts",
15
+ "require": "./dist/runtime/index.js"
16
+ },
17
+ "./dist/common/runApi": {
18
+ "types": "./dist/common/runApi/index.d.ts",
19
+ "require": "./dist/common/runApi/index.js"
20
+ },
21
+ "./dist/common/settingsSchema": {
22
+ "types": "./dist/common/settingsSchema.d.ts",
23
+ "require": "./dist/common/settingsSchema.js"
24
+ },
25
+ "./dist/common/contextStorageStateHelpers": {
26
+ "types": "./dist/common/contextStorageStateHelpers.d.ts",
27
+ "require": "./dist/common/contextStorageStateHelpers.js"
28
+ },
29
+ "./dist/common/telemetry": {
30
+ "types": "./dist/common/telemetry.d.ts",
31
+ "require": "./dist/common/telemetry.js"
32
+ },
33
+ "./dist/common/jwtTokenManager": {
34
+ "types": "./dist/common/jwtTokenManager.d.ts",
35
+ "require": "./dist/common/jwtTokenManager.js"
36
+ },
37
+ "./dist/common/asyncLocalStorage": {
38
+ "types": "./dist/common/asyncLocalStorage/index.d.ts",
39
+ "require": "./dist/common/asyncLocalStorage/index.js"
40
+ },
41
+ "./dist/common/cleanEnvironmentVariables": {
42
+ "types": "./dist/common/cleanEnvironmentVariables.d.ts",
43
+ "require": "./dist/common/cleanEnvironmentVariables.js"
44
+ },
45
+ "./dist/common/constants": {
46
+ "types": "./dist/common/constants.d.ts",
47
+ "require": "./dist/common/constants.js"
48
+ },
49
+ "./dist/commands/interface/run": {
50
+ "types": "./dist/commands/interface/run.d.ts",
51
+ "require": "./dist/commands/interface/run.js"
52
+ },
53
+ "./dist/common/binStartupScript": {
54
+ "types": "./dist/common/binStartupScript.d.ts",
55
+ "require": "./dist/common/binStartupScript.js"
56
+ },
57
+ "./dist/commands/common/tsNodeImport": {
58
+ "types": "./dist/commands/common/tsNodeImport.d.ts",
59
+ "require": "./dist/commands/common/tsNodeImport.js"
60
+ }
21
61
  },
22
- "types": "./dist/index.d.ts",
62
+ "files": [
63
+ "dist",
64
+ "bin"
65
+ ],
23
66
  "author": "Intuned Team",
24
67
  "license": "Elastic-2.0",
25
68
  "scripts": {
@@ -33,7 +76,7 @@
33
76
  "intuned-ts-check": "yarn prepublishOnly && vite-node ./src/commands/ts-check.ts",
34
77
  "intuned": "vite-node ./src/commands/intuned-cli/main.ts",
35
78
  "intuned-get-headless-user-agent": "vite-node ./src/commands/get-headless-user-agent.ts",
36
- "build": "rm -rf dist && tsc -p tsconfig.json && yarn copy-dts && babel src --out-dir dist --extensions '.ts' && cp -r ./src/common/assets dist/common/assets",
79
+ "build": "rm -rf ./dist && tsup && cp -r ./src/common/assets dist/common/assets",
37
80
  "test": "vitest run",
38
81
  "test:watch": "vitest",
39
82
  "e2e": "yarn playwright test --config ./playwright.config.ts",
@@ -108,6 +151,7 @@
108
151
  "@babel/plugin-transform-export-namespace-from": "^7.24.1",
109
152
  "@babel/preset-env": "^7.23.7",
110
153
  "@babel/preset-typescript": "^7.23.3",
154
+ "@intuned/runtime-interface": "0.0.1",
111
155
  "@jest/globals": "^29.6.2",
112
156
  "@ngneat/falso": "^7.2.0",
113
157
  "@types/jest": "^29.5.3",
@@ -130,6 +174,7 @@
130
174
  "eslint-plugin-prettier": "^4.2.1",
131
175
  "msw": "^2.1.2",
132
176
  "playwright": "^1.55.0",
177
+ "tsup": "^8.3.5",
133
178
  "typedoc": "^0.25.13",
134
179
  "typedoc-plugin-frontmatter": "^1.0.0",
135
180
  "typedoc-plugin-markdown": "^4.0.2",
package/.babelrc DELETED
@@ -1,21 +0,0 @@
1
- {
2
- "presets": [
3
- [
4
- "@babel/preset-env",
5
- {
6
- "targets": {
7
- "chrome": 130,
8
- "node": "20"
9
- },
10
- "modules": "commonjs"
11
- }
12
- ],
13
- "@babel/preset-typescript"
14
- ],
15
- "plugins": [
16
- "babel-plugin-macros",
17
- "@babel/plugin-transform-export-namespace-from"
18
- ],
19
- "sourceMaps": false,
20
- "comments": false
21
- }
package/.eslintignore DELETED
@@ -1,10 +0,0 @@
1
- node_modules
2
- dist
3
- .eslintrc.js
4
- *.test.ts
5
- *.js
6
- types-package
7
- vite.config.ts
8
- reports
9
- intuned
10
- **/*.d.ts
package/.eslintrc.js DELETED
@@ -1,39 +0,0 @@
1
- module.exports = {
2
- root: true,
3
- parser: "@typescript-eslint/parser",
4
- parserOptions: {
5
- project: "./tsconfig.eslint.json",
6
- tsconfigRootDir: __dirname,
7
- },
8
- plugins: ["@typescript-eslint", "deprecation", "prettier"],
9
- ignorePatterns: ["src/common/browserScripts/rollup.config.mjs"],
10
- extends: [
11
- "eslint:recommended",
12
- "plugin:@typescript-eslint/eslint-recommended",
13
- "plugin:@typescript-eslint/recommended",
14
- ],
15
- rules: {
16
- "@next/next/no-html-link-for-pages": 0,
17
- "prettier/prettier": "error",
18
-
19
- // recommended for safety
20
- "@typescript-eslint/no-floating-promises": "error", // forgetting to await Activities and Workflow APIs is bad
21
- "deprecation/deprecation": "warn",
22
-
23
- // code style preference
24
- "object-shorthand": ["warn", "always"],
25
-
26
- // relaxed rules, for convenience
27
- "@typescript-eslint/no-unused-vars": [
28
- "warn",
29
- {
30
- argsIgnorePattern: "^_",
31
- varsIgnorePattern: "^_",
32
- },
33
- ],
34
- "@typescript-eslint/no-explicit-any": "off",
35
- "@typescript-eslint/no-empty-interface": "off",
36
- "@typescript-eslint/ban-ts-comment": "warn",
37
- "no-empty": "warn",
38
- },
39
- };
@@ -1,61 +0,0 @@
1
- import type { ImportFunction } from "@intuned/runtime/dist/common/runApi";
2
- import { err, ok } from "neverthrow";
3
-
4
- export const importModule: ImportFunction = async (path: string) => {
5
- const [folderName, ...functionNameParts] = path.split("/");
6
- const functionNameDepth = functionNameParts.length;
7
-
8
- // string literals should be inline
9
- // currently we support only 5 levels of depth
10
- // rollup dynamic import does not support multiple levels of dynamic imports so we need to specify the possible paths explicitly
11
- let imported: any = undefined;
12
- try {
13
- switch (functionNameDepth) {
14
- case 1:
15
- imported = await import(`./${folderName}/${functionNameParts[0]}.ts`);
16
- break;
17
- case 2:
18
- imported = await import(
19
- `./${folderName}/${functionNameParts[0]}/${functionNameParts[1]}.ts`
20
- );
21
- break;
22
- case 3:
23
- imported = await import(
24
- `./${folderName}/${functionNameParts[0]}/${functionNameParts[1]}/${functionNameParts[2]}.ts`
25
- );
26
- break;
27
- case 4:
28
- imported = await import(
29
- `./${folderName}/${functionNameParts[0]}/${functionNameParts[1]}/${functionNameParts[2]}/${functionNameParts[3]}.ts`
30
- );
31
- break;
32
- case 5:
33
- imported = await import(
34
- `./${folderName}/${functionNameParts[0]}/${functionNameParts[1]}/${functionNameParts[2]}/${functionNameParts[3]}/${functionNameParts[4]}.ts`
35
- );
36
- break;
37
- default:
38
- return err({
39
- type: "other",
40
- error: new Error(
41
- `intuned supports maximum 5 levels of depth in the api folder`
42
- ),
43
- });
44
- }
45
- return ok(imported);
46
- } catch (e: any) {
47
- if (
48
- "message" in e &&
49
- typeof e.message === "string" &&
50
- e.message.includes("Unknown variable dynamic import")
51
- ) {
52
- return err({
53
- type: "not_found",
54
- });
55
- }
56
- return err({
57
- type: "other",
58
- error: e,
59
- });
60
- }
61
- };
@@ -1,6 +0,0 @@
1
- require("@intuned/runtime/dist/common/binStartupScript");
2
- import { runAutomationCLI } from "@intuned/runtime/dist/commands/interface/run";
3
-
4
- import { importModule } from "./__utils";
5
-
6
- runAutomationCLI(importModule);
package/WebTemplate.zip DELETED
Binary file
package/api/sample.ts DELETED
@@ -1,4 +0,0 @@
1
- export default async function handler(_, page) {
2
- await page.goto("https://wikipedia.org/wiki/Special:Random");
3
- return { title: await page.title() };
4
- }
@@ -1,11 +0,0 @@
1
- {
2
- "compilerOptions": {
3
- "target": "ES2021",
4
- "lib": ["dom", "es2021"],
5
- "resolveJsonModule": true,
6
- "esModuleInterop": true,
7
- "moduleResolution": "bundler",
8
- "module": "esnext",
9
- "skipLibCheck": true
10
- }
11
- }
@@ -1,5 +0,0 @@
1
- {
2
- "extends": "./tsconfig.json",
3
- "include": ["**/*.ts", "**/*.d.ts"],
4
- "exclude": ["node_modules"]
5
- }
package/tsconfig.json DELETED
@@ -1,25 +0,0 @@
1
- {
2
- "compilerOptions": {
3
- "target": "es2021",
4
- "module": "esnext",
5
- "esModuleInterop": true,
6
- "moduleResolution": "bundler",
7
- "resolveJsonModule": true,
8
- "outDir": "./dist",
9
- "strict": false,
10
- "strictNullChecks": true,
11
- "rootDir": "./src",
12
- "sourceMap": false,
13
- "declaration": true,
14
- "emitDeclarationOnly": false,
15
- "skipLibCheck": true,
16
- "types": ["vitest/globals"]
17
- },
18
- "include": [
19
- "src/**/*.ts",
20
- "src/**/*.d.ts",
21
- "types-package/noEmpty.ts",
22
- "src/assets/**/*"
23
- ],
24
- "exclude": ["node_modules", "**/*.test.ts", "**/__tests__/*"]
25
- }
package/typedoc.json DELETED
@@ -1,49 +0,0 @@
1
- {
2
- // base config
3
- "out": "docs/content",
4
- "tsconfig": "./types-package/tsconfig.json",
5
- "entryPoints": ["./types-package/ai-extractors/index.d.ts"],
6
-
7
- // specific inclusions and exclusions
8
- // "excludeProtected": true,
9
- // "excludeNotDocumented": true,
10
-
11
- "exclude": [
12
- "./src.ts/_admin/**/*",
13
- "./src.ts/_tests/**/*",
14
- "./src.ts/testcases/**/*"
15
- ],
16
-
17
- // plugins
18
- "plugin": [
19
- // "./plugins/reorderSections.mjs",
20
- "typedoc-plugin-remove-references", // remove additional references that clutter documentation
21
- "typedoc-plugin-markdown", // generate markdown files
22
- "typedoc-plugin-frontmatter", // add frontmatter to markdown files, prereq for the below custom plugin
23
- "./docs/plugins/typedoc-plugin-mintlify-frontmatter.mjs", // formats frontmatter to match mintlify
24
- "./docs/plugins/typedoc-plugin-navigation-output.mjs" // formats navigation to match mintlify
25
- ],
26
-
27
- // formatting + mintlify compatibility
28
- "fileExtension": ".mdx", // use mdx files for mintlfiy compatibility
29
- "entryFileName": "index.mdx", // rename entry from "README.md" to "index.mdx"
30
- "hidePageHeader": true, // hide page header, conflicts with mintlify
31
- "hidePageTitle": true, // hide page title, conflicts with mintlify
32
- "hideBreadcrumbs": true, // hide breadcrumbs, conflicts with mintlify
33
- "useCodeBlocks": true, // makes API definitions more readable
34
-
35
- "expandObjects": false,
36
- // "parametersFormat": "table", // readability
37
- // "propertiesFormat": "table", // readability
38
- "navigation": {
39
- "includeCategories": true,
40
- "includeGroups": false
41
- },
42
- "disableSources": true,
43
- "hideParameterTypesInTitle": false,
44
- // "membersWithOwnFile": ["Class", "Enum", "Interface", "Function"],
45
- // "hideParameterTypesInTitle": true,
46
- "readme": "none",
47
- "githubPages": false,
48
- "excludeExternals": true
49
- }