@intuned/runtime-dev 1.0.6-dev-1 → 1.0.6-dev.4

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.
@@ -10,7 +10,7 @@ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e
10
10
  _dotenv.default.config({
11
11
  path: `.env`
12
12
  });
13
- _commander.program.description("Deploy an Intuned project to be public").argument("[project-name]", "Name of the project to deploy").option("-w, --workspace-id <id>", "Your Intuned workspace ID").option("-k, --api-key <key>", "Your Intuned API key").action(async (projectName, options) => {
13
+ _commander.program.description("Deploy an Intuned project to be public").argument("[project-name]", "Name of the project to deploy").option("-w, --workspace-id <id>", "Your Intuned workspace ID").option("-k, --api-key <key>", "Your Intuned API key").action(async (projectName, options) => {
14
14
  try {
15
15
  if (!projectName) {
16
16
  throw new Error("Project name is required");
@@ -83,6 +83,11 @@ async function convertProjectToCodeTree(projectPath) {
83
83
  currentDir = path.dirname(currentDir);
84
84
  }
85
85
  }
86
+ if (!gitignoreFound) {
87
+ console.log(_chalk.default.yellow(".gitignore file not found. Using default exclusions only."));
88
+ } else {
89
+ console.log(_chalk.default.yellow("Using standard exclusions plus .gitignore patterns."));
90
+ }
86
91
  const filesToDeploy = listFilesNotIgnored(projectPath, ignorePatterns);
87
92
  let totalSize = 0;
88
93
  for (const file of filesToDeploy) {
@@ -138,8 +143,9 @@ async function convertProjectToCodeTree(projectPath) {
138
143
  }
139
144
  return tree;
140
145
  }
141
- console.log(_chalk.default.cyan("\nBuilding project..."));
146
+ console.log(_chalk.default.cyan("\nBuilding code tree..."));
142
147
  const tree = readDirectory(projectPath);
148
+ console.log(_chalk.default.green("Code tree generation complete!"));
143
149
  return tree;
144
150
  }
145
151
  async function deployProject(projectName, auth) {
@@ -184,6 +190,7 @@ const validateProjectName = projectName => {
184
190
  });
185
191
  const validation = nameSchema.safeParse(projectName);
186
192
  if (!validation.success) {
193
+ console.error(_chalk.default.red(validation.error.errors[0].message));
187
194
  return {
188
195
  isValid: false,
189
196
  errorMessage: validation.error.errors[0].message
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@intuned/runtime-dev",
3
- "version": "1.0.6-dev-1",
3
+ "version": "1.0.6-dev.4",
4
4
  "description": "Intuned runtime",
5
5
  "exports": {
6
6
  ".": "./dist/index.js",
@@ -48,10 +48,7 @@
48
48
  "intuned-build": "./bin/intuned-build",
49
49
  "intuned-browser-start": "./bin/intuned-browser-start",
50
50
  "intuned-browser-save-state": "./bin/intuned-browser-save-state",
51
- "intuned-ts-check": "./bin/intuned-ts-check",
52
- "intuned-init": "./bin/intuned-init",
53
- "intuned-run": "./bin/intuned-run",
54
- "intuned-deploy": "./bin/intuned-deploy"
51
+ "intuned-ts-check": "./bin/intuned-ts-check"
55
52
  },
56
53
  "dependencies": {
57
54
  "@babel/plugin-syntax-dynamic-import": "^7.8.3",
@@ -1,3 +0,0 @@
1
- #!/usr/bin/env node
2
-
3
- require("../dist/commands/deploy/deploy.js");
package/bin/intuned-init DELETED
@@ -1,3 +0,0 @@
1
- #!/usr/bin/env node
2
-
3
- require("../dist/commands/init/init.js");
package/bin/intuned-run DELETED
@@ -1,3 +0,0 @@
1
- #!/usr/bin/env node
2
-
3
- require("../dist/commands/intuned-run/intuned-run.js");
@@ -1,15 +0,0 @@
1
- {
2
- "apiAccess": {
3
- "enabled": true
4
- },
5
- "authSessions": {
6
- "enabled": false
7
- },
8
- "scale": {
9
- "machineCount": 1,
10
- "softLimit": 8,
11
- "hardLimit": 10,
12
- "memory": 2048,
13
- "cpus": 6
14
- }
15
- }
@@ -1,46 +0,0 @@
1
- import { BrowserContext, Page } from "playwright-core";
2
- import { extendPlaywrightPage } from "@intuned/sdk/playwright";
3
-
4
- interface Params {
5
- bookFullUrl: string;
6
- }
7
-
8
- export default async function handler(
9
- params: Params,
10
- _playwrightPage: Page,
11
- context: BrowserContext
12
- ) {
13
- const page = extendPlaywrightPage(_playwrightPage);
14
-
15
- console.log(params);
16
- // go to the url that is passed in the params
17
- await page.goto(params.bookFullUrl);
18
-
19
- // optimized extractor!
20
- // for more info checkout
21
- // https://docs.intunedhq.com/docs/data-extraction/web-data-extraction
22
- const result = await page.extractObjectOptimized({
23
- label: "book-deatils",
24
- entityName: "book_info",
25
- entitySchema: {
26
- type: "object",
27
- properties: {
28
- name: {
29
- type: "string",
30
- description: "book name",
31
- },
32
- upc: {
33
- type: "string",
34
- description: "upc of the book",
35
- },
36
- numberOfReviews: {
37
- type: "string",
38
- description: "Number of reviews on the book",
39
- },
40
- },
41
- required: ["name", "upc"],
42
- },
43
- });
44
-
45
- return result;
46
- }
@@ -1,68 +0,0 @@
1
- import { BrowserContext, Page } from "playwright-core";
2
- import { extendPlaywrightPage } from "@intuned/sdk/playwright";
3
- import { extendPayload } from "@intuned/sdk/runtime";
4
- import { AsyncLocalStorage } from "async_hooks";
5
-
6
- interface Params {
7
- // Add your params here
8
- }
9
-
10
- export default async function handler(
11
- params: Params,
12
- _playwrightPage: Page,
13
- context: BrowserContext
14
- ) {
15
- // extends playwright page with Intuned helpers.
16
- const page = extendPlaywrightPage(_playwrightPage);
17
-
18
- await page.goto("https://books.toscrape.com/");
19
-
20
- // optimized extractor!
21
- // for more info checkout
22
- // https://docs.intunedhq.com/docs/data-extraction/web-data-extraction
23
- const result = await page.extractArrayOptimized({
24
- itemEntityName: "book",
25
- label: "books-scraper",
26
- itemEntitySchema: {
27
- type: "object",
28
- properties: {
29
- name: {
30
- type: "string",
31
- description: "name of the book",
32
- primary: true,
33
- },
34
- bookUrl: {
35
- type: "string",
36
- description: "url of the book",
37
- },
38
- },
39
- required: ["name", "bookUrl"],
40
- },
41
- // you can change the model and strategy type,
42
- // for links, HTML is the right strategy to use
43
- strategy: {
44
- type: "HTML",
45
- model: "claude-3-sonnet",
46
- },
47
- });
48
-
49
- console.log(result);
50
-
51
- extendPayload({
52
- api: "book-details",
53
- parameters: {
54
- bookFullUrl: `${page.url()}${result[0].bookUrl}`,
55
- },
56
- });
57
-
58
- // // for each book on the main page, schedule api to get details
59
- // result.forEach((book) => {
60
- // // Extend job payload so it runs API `book-details` with provided params
61
- // extendPayload({
62
- // api: "book-details",
63
- // parameters: {
64
- // bookFullUrl: `${page.url()}${book.bookUrl}`,
65
- // },
66
- // });
67
- // });
68
- }
@@ -1,36 +0,0 @@
1
- {
2
- "name": "Nested-Scheduling",
3
- "version": "1.0.0",
4
- "description": "project uses nested scheduling feature",
5
- "tags": [
6
- "Scrapper"
7
- ],
8
- "main": "index.js",
9
- "scripts": {
10
- "dev:local": "intuned-api-run sample playwright -j '{}'",
11
- "dev": "intuned-api-run",
12
- "debug": "node --inspect-brk ./node_modules/.bin/intuned-api-run",
13
- "build": "intuned-build",
14
- "types-check": "intuned-ts-check",
15
- "pre-publish": "intuned-ts-check && intuned-build",
16
- "start": "node ./output/bundle_v2.js",
17
- "browser-save-state": "intuned-browser-save-state",
18
- "auth-session-check": "intuned-auth-session-check",
19
- "auth-session-create": "intuned-auth-session-create",
20
- "auth-session-refresh": "intuned-auth-session-refresh",
21
- "auth-session-load": "intuned-auth-session-load"
22
- },
23
- "author": "",
24
- "license": "ISC",
25
- "dependencies": {
26
- "@intuned/runtime": "1.0.5",
27
- "@intuned/sdk": "2.0.2",
28
- "@types/intuned__sdk": "npm:@intuned/sdk-types@2.0.2",
29
- "@types/node": "^20.10.3",
30
- "axios": "^1.9.0",
31
- "lodash": "^4.17.21",
32
- "playwright": "1.44.1",
33
- "playwright-core": "1.44.1",
34
- "ts-node": "^10.9.2"
35
- }
36
- }
@@ -1,3 +0,0 @@
1
- {
2
- "bookFullUrl": "https://books.toscrape.com/catalogue/mesaerion-the-best-science-fiction-stories-1800-1849_983/index.html"
3
- }