@intuned/runtime-dev 1.0.6-cli.8.3.1 → 1.0.6-cli.8.3.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.
package/bin/cli-build ADDED
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env node
2
+
3
+ require("../dist/commands/cli-build/cli-build.js");
package/bin/run-api ADDED
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env node
2
+
3
+ require("../dist/commands/run-api-cli/run-api.js");
@@ -8,7 +8,7 @@ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e
8
8
  _dotenv.default.config({
9
9
  path: `.env`
10
10
  });
11
- _commander.program.name("intuned-build-project").description("Build your current Inuned project").action(async () => {
11
+ _commander.program.name("intuned-build-project").description("Build your current Intuned project").action(async () => {
12
12
  try {
13
13
  await (0, _utils.runBuild)();
14
14
  } catch (error) {
@@ -37,7 +37,7 @@ _commander.program.description("Deploy an Intuned project to be public").argumen
37
37
  if (!deployDone) {
38
38
  throw new Error(`Project not deployed: ${deployErrorMessage}`);
39
39
  }
40
- const url = process.env.DOMAIN || `https://app.intuned.io`;
40
+ const url = process.env.INTUNED_API_DEV_DOMAIN || `https://app.intuned.io`;
41
41
  console.log(_chalk.default.green(`\n✅ Project "${_projectName}" deployed successfully!` + `\n\nYou can check your project on the platform: ${_chalk.default.bold(`${url}/projects/${projectId}/details`)}\n`));
42
42
  } catch (error) {
43
43
  console.error(_chalk.default.red(`\n${error.message}`));
@@ -117,7 +117,7 @@ async function deployProject(projectName, auth) {
117
117
  workspaceId,
118
118
  apiKey
119
119
  } = auth;
120
- const baseUrl = process.env.DOMAIN || `https://app.intuned.io`;
120
+ const baseUrl = process.env.INTUNED_API_DEV_DOMAIN || `https://app.intuned.io`;
121
121
  const url = `${baseUrl}/api/v1/workspace/${workspaceId}/projects/create`;
122
122
  const headers = {
123
123
  "x-api-key": apiKey,
@@ -125,6 +125,11 @@ async function deployProject(projectName, auth) {
125
125
  };
126
126
  const projectPath = process.cwd();
127
127
  const codeTree = await convertProjectToCodeTree(projectPath);
128
+ codeTree["tsconfig.json"] = {
129
+ file: {
130
+ contents: JSON.stringify(_constants.tsConfigCli, null, 2)
131
+ }
132
+ };
128
133
  const deployProjectPayload = {
129
134
  name: projectName,
130
135
  codeTree,
@@ -287,7 +292,7 @@ const validateIntunedProject = async () => {
287
292
  exports.validateIntunedProject = validateIntunedProject;
288
293
  const checkIntunedProjectDeployStatus = async (workspaceId, projectName, apiKey) => {
289
294
  try {
290
- const baseUrl = process.env.DOMAIN || `https://app.intuned.io`;
295
+ const baseUrl = process.env.INTUNED_API_DEV_DOMAIN || `https://app.intuned.io`;
291
296
  const url = `${baseUrl}/api/v1/workspace/${workspaceId}/projects/create/${projectName}/result`;
292
297
  const headers = {
293
298
  "x-api-key": apiKey,
@@ -329,7 +334,7 @@ const runBuild = async () => {
329
334
  if (await fs.exists(distPath)) {
330
335
  await fs.remove(distPath);
331
336
  }
332
- const buildCommand = "npx tsc";
337
+ const buildCommand = "tsc";
333
338
  try {
334
339
  await execPromise(buildCommand, {
335
340
  cwd: currentProjectDirectory
@@ -77,7 +77,7 @@ function getAuthCredentials(options) {
77
77
  });
78
78
  }
79
79
  if (missingAuth.length) {
80
- throw new Error("Authentication details are required. Please provide them via command line options or environment variables.");
80
+ throw new Error(`Authentication failed: Missing ${missingAuth.join(" and ")}.\n\n` + `To fix this issue:\n\n` + `1. For workspaceId:\n` + ` - Add it to your intuned.json file under the "workspaceId" property\n` + ` - OR provide via command line: --workspace-id YOUR_WORKSPACE_ID\n` + ` - See how to get your workspaceId: https://docs.intunedhq.com/docs/guides/platform/how-to-get-a-workspace-id\n\n` + `2. For API key:\n` + ` - Include in your .env file INTUNED_API_KEY=your_api_key_here \n` + ` - OR provide via command line: --api-key YOUR_API_KEY\n\n` + `Run commands from the project root directory where intuned.json is located.`);
81
81
  }
82
82
  return {
83
83
  workspaceId,
@@ -144,7 +144,7 @@ async function scaffoldProject(templateId, isTargetDirectoryEmpty) {
144
144
  }));
145
145
  }
146
146
  async function fetchProjectTemplate(templateId) {
147
- const baseUrl = process.env.DOMAIN || `https://app.intuned.io`;
147
+ const baseUrl = process.env.INTUNED_API_DEV_DOMAIN || `https://app.intuned.io`;
148
148
  const url = `${baseUrl}/api/templates/${templateId}`;
149
149
  const response = await fetch(url);
150
150
  if (!response.ok) {
@@ -1 +1 @@
1
- export declare const cliReadme = "# Intuned CLI\n\n## Usage Instructions\n\nThe Intuned CLI exposes a variaty of commands to develop and create your Intuned projects locally:\n\n### Init a project\n\n`npx -p @intuned/runtime intuned-init`\n\n### Artifacts provided\n\n- `./intuned.json`: Intuned project configuration file\n- `./api`: Folder containing the API files\n- `./parameters`: Folder containing the parameters files, used for API parameters injection\n- `./output`: Folder containing the output files generated by the APIs\n\n### Note:\n\n- You can use either `yarn` or `npm run` to run and execute the commands\n\n### Keys,Environment Variables and Settings\n\n- workspaceId: Your Intuned workspace ID, either provided via command line or Intuned.json setting -> (`workspaceId`)\n- projectName: The name of your Intuned project, either provided via command line or Intuned.json setting -> (`projectName`)\n- INTUNED_API_KEY: Your Intuned API key, either provided via command line or environment variable\n\n### Running the APIs through development\n\n`yarn run-api` <api-name>\n\n- Options:\n - -i, --parameters-file <file>: JSON file containing API parameters\n - -s, --store-results: Store the results of the running API inside the output directory:\n - ./output/[runId]/results.json\n - ./output/[runId]/extendedPayloads.json\n\n### Building the intuned project\n\n`yarn cli-build`\n\n### Deploying the project\n\n`yarn deploy` <project-name>\n\n- <project-name>: Optional project name that overrides the one on the intuned.json file\n- Options (optinal):\n - --workspace-id: Overrides the workspace id specified in the intuned.json file setting\n - --api-key: Overrides the api key provided by the environment var.\n\n### General Notes:\n\n- You can interact with your Intuned project within the platform when deploying it\n- All commands above should be runned from the root location of the project (from where you runned and created the project through `intuned-init` command)\n- Verify you're in the correct location by confirming the presence of package.json and intuned.json files\n- Running commands from subdirectories may result in errors or unexpected behavior";
1
+ export declare const cliReadme = "# Intuned CLI\n## Introduction\nThe Intuned CLI exposes a variaty of commands to develop your Intuned projects locally\n\n## Development Commands\n\n### Initialize a Project\n`npx -p @intuned/runtime init`\n\n### Run an API\n`yarn run-api <api-name>`\n\nOptions:\n- `-i, --parameters-file file-path`: JSON file containing API parameters\n- `-s, --store-results`: Store the results in `./output/[runId]/results.json` and `./output/[runId]/extendedPayloads.json`\n\n### Build a Project\n`yarn cli-build`\n\n### Deploy a Project\n`yarn deploy <project-name>`\n\n- `project-name`: Optional name that overrides the one in intuned.json\n- Options:\n - `--workspace-id`: Overrides the workspace ID in intuned.json\n - `--api-key`: Overrides the API key from environment variables\n\n## Configuration\n\n### Environment Variables and Settings\n- `workspaceId`: Your Intuned workspace ID ([How to get your workspaceId](https://docs.intunedhq.com/docs/guides/platform/how-to-get-a-workspace-id))\n - Set in `intuned.json` file under the `workspaceId` property\n - Or provide via CLI with `--workspace-id` flag during deployment\n \n- `projectName`: The name of your Intuned project\n - Set in `intuned.json` file under the `projectName` property\n - Or override via command line when deploying with `yarn deploy my-project-name`\n \n- `INTUNED_API_KEY`: Your Intuned API key\n - Set as an environment variable: `export INTUNED_API_KEY=your_api_key_here`\n - Or include in your .env file for development\n - Or provide via CLI with `--api-key` flag during deployment\n\n## Project Structure\n\n### Generated Artifacts\n- `./intuned.json`: Project configuration file\n- `./api`: Folder containing API implementation files\n- `./parameters`: Folder for API parameters injection\n- `./output`: Folder containing generated output files\n\n### Notes\n- You can use either `yarn` or `npm run` to execute commands\n- All commands must be run from the project root directory\n- Verify you're in the correct location by confirming the presence of package.json and intuned.json\n- Running commands from subdirectories may result in errors\n- You can manage your deployed projects through the Intuned platform\n- WARNING: \u26A0\uFE0F Changes to TS Config may break some Intuned functionalities\n";
@@ -5,58 +5,61 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.cliReadme = void 0;
7
7
  const cliReadme = exports.cliReadme = `# Intuned CLI
8
+ ## Introduction
9
+ The Intuned CLI exposes a variaty of commands to develop your Intuned projects locally
8
10
 
9
- ## Usage Instructions
11
+ ## Development Commands
10
12
 
11
- The Intuned CLI exposes a variaty of commands to develop and create your Intuned projects locally:
13
+ ### Initialize a Project
14
+ \`npx -p @intuned/runtime init\`
12
15
 
13
- ### Init a project
16
+ ### Run an API
17
+ \`yarn run-api <api-name>\`
14
18
 
15
- \`npx -p @intuned/runtime intuned-init\`
16
-
17
- ### Artifacts provided
18
-
19
- - \`./intuned.json\`: Intuned project configuration file
20
- - \`./api\`: Folder containing the API files
21
- - \`./parameters\`: Folder containing the parameters files, used for API parameters injection
22
- - \`./output\`: Folder containing the output files generated by the APIs
23
-
24
- ### Note:
25
-
26
- - You can use either \`yarn\` or \`npm run\` to run and execute the commands
27
-
28
- ### Keys,Environment Variables and Settings
29
-
30
- - workspaceId: Your Intuned workspace ID, either provided via command line or Intuned.json setting -> (\`workspaceId\`)
31
- - projectName: The name of your Intuned project, either provided via command line or Intuned.json setting -> (\`projectName\`)
32
- - INTUNED_API_KEY: Your Intuned API key, either provided via command line or environment variable
33
-
34
- ### Running the APIs through development
35
-
36
- \`yarn run-api\` <api-name>
37
-
38
- - Options:
39
- - -i, --parameters-file <file>: JSON file containing API parameters
40
- - -s, --store-results: Store the results of the running API inside the output directory:
41
- - ./output/[runId]/results.json
42
- - ./output/[runId]/extendedPayloads.json
43
-
44
- ### Building the intuned project
19
+ Options:
20
+ - \`-i, --parameters-file file-path\`: JSON file containing API parameters
21
+ - \`-s, --store-results\`: Store the results in \`./output/[runId]/results.json\` and \`./output/[runId]/extendedPayloads.json\`
45
22
 
23
+ ### Build a Project
46
24
  \`yarn cli-build\`
47
25
 
48
- ### Deploying the project
49
-
50
- \`yarn deploy\` <project-name>
26
+ ### Deploy a Project
27
+ \`yarn deploy <project-name>\`
51
28
 
52
- - <project-name>: Optional project name that overrides the one on the intuned.json file
53
- - Options (optinal):
54
- - --workspace-id: Overrides the workspace id specified in the intuned.json file setting
55
- - --api-key: Overrides the api key provided by the environment var.
56
-
57
- ### General Notes:
58
-
59
- - You can interact with your Intuned project within the platform when deploying it
60
- - All commands above should be runned from the root location of the project (from where you runned and created the project through \`intuned-init\` command)
61
- - Verify you're in the correct location by confirming the presence of package.json and intuned.json files
62
- - Running commands from subdirectories may result in errors or unexpected behavior`;
29
+ - \`project-name\`: Optional name that overrides the one in intuned.json
30
+ - Options:
31
+ - \`--workspace-id\`: Overrides the workspace ID in intuned.json
32
+ - \`--api-key\`: Overrides the API key from environment variables
33
+
34
+ ## Configuration
35
+
36
+ ### Environment Variables and Settings
37
+ - \`workspaceId\`: Your Intuned workspace ID ([How to get your workspaceId](https://docs.intunedhq.com/docs/guides/platform/how-to-get-a-workspace-id))
38
+ - Set in \`intuned.json\` file under the \`workspaceId\` property
39
+ - Or provide via CLI with \`--workspace-id\` flag during deployment
40
+
41
+ - \`projectName\`: The name of your Intuned project
42
+ - Set in \`intuned.json\` file under the \`projectName\` property
43
+ - Or override via command line when deploying with \`yarn deploy my-project-name\`
44
+
45
+ - \`INTUNED_API_KEY\`: Your Intuned API key
46
+ - Set as an environment variable: \`export INTUNED_API_KEY=your_api_key_here\`
47
+ - Or include in your .env file for development
48
+ - Or provide via CLI with \`--api-key\` flag during deployment
49
+
50
+ ## Project Structure
51
+
52
+ ### Generated Artifacts
53
+ - \`./intuned.json\`: Project configuration file
54
+ - \`./api\`: Folder containing API implementation files
55
+ - \`./parameters\`: Folder for API parameters injection
56
+ - \`./output\`: Folder containing generated output files
57
+
58
+ ### Notes
59
+ - You can use either \`yarn\` or \`npm run\` to execute commands
60
+ - All commands must be run from the project root directory
61
+ - Verify you're in the correct location by confirming the presence of package.json and intuned.json
62
+ - Running commands from subdirectories may result in errors
63
+ - You can manage your deployed projects through the Intuned platform
64
+ - WARNING: ⚠️ Changes to TS Config may break some Intuned functionalities
65
+ `;
@@ -4,4 +4,4 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.templateIds = void 0;
7
- const templateIds = exports.templateIds = ["default", "empty", "linkedin-recorder", "api-auth-sessions", "nested-scheduling", "ai-extractors", "npm-auth-sessions", "python-empty"];
7
+ const templateIds = exports.templateIds = ["default", "empty", "linkedin-recorder", "api-auth-sessions", "nested-scheduling", "ai-extractors", "npm-auth-sessions"];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@intuned/runtime-dev",
3
- "version": "1.0.6-cli.8.3.1",
3
+ "version": "1.0.6-cli.8.3.4",
4
4
  "description": "Intuned runtime",
5
5
  "exports": {
6
6
  ".": "./dist/index.js",
@@ -50,10 +50,10 @@
50
50
  "intuned-browser-start": "./bin/intuned-browser-start",
51
51
  "intuned-browser-save-state": "./bin/intuned-browser-save-state",
52
52
  "intuned-ts-check": "./bin/intuned-ts-check",
53
- "intuned-init": "./bin/intuned-init",
54
- "intuned-run": "./bin/intuned-run",
55
- "intuned-deploy": "./bin/intuned-deploy",
56
- "intuned-build-project": "./bin/intuned-build-project"
53
+ "init": "./bin/init",
54
+ "run-api": "./bin/run-api",
55
+ "deploy": "./bin/deploy",
56
+ "cli-build": "./bin/cli-build"
57
57
  },
58
58
  "dependencies": {
59
59
  "@babel/plugin-syntax-dynamic-import": "^7.8.3",
@@ -70,7 +70,7 @@
70
70
  "applicationinsights": "^2.9.2",
71
71
  "async-retry": "^1.3.3",
72
72
  "babel-plugin-dynamic-import-node": "^2.3.3",
73
- "boxen": "^8.0.1",
73
+ "boxen": "8.0.1",
74
74
  "chalk": "^4.1.2",
75
75
  "commander": "^11.0.0",
76
76
  "cross-fetch": "^4.0.0",
@@ -81,11 +81,11 @@
81
81
  "fs-extra": "^11.3.0",
82
82
  "https-proxy-agent": "^7.0.5",
83
83
  "image-size": "^1.1.1",
84
- "inquirer": "^12.6.0",
84
+ "inquirer": "12.6.0",
85
85
  "jsonwebtoken": "^9.0.2",
86
86
  "lodash": "^4.17.21",
87
87
  "milliparsec": "^2.3.0",
88
- "minimatch": "^10.0.1",
88
+ "minimatch": "10.0.1",
89
89
  "ms": "^2.1.3",
90
90
  "nanoid": "3",
91
91
  "neverthrow": "^6.1.0",
@@ -142,3 +142,4 @@
142
142
  "@intuned/runtime": "*"
143
143
  }
144
144
  }
145
+
@@ -1,3 +0,0 @@
1
- #!/usr/bin/env node
2
-
3
- require("../dist/commands/intuned-build-project/intuned-build-project.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");
File without changes
File without changes