@datacamp/learn-vm-scripts 0.0.1-rc.0 → 0.0.1-rc.10

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/package.json CHANGED
@@ -1,30 +1,34 @@
1
1
  {
2
2
  "name": "@datacamp/learn-vm-scripts",
3
- "version": "0.0.1-rc.0",
3
+ "version": "0.0.1-rc.10",
4
4
  "repository": "git@github.com:datacamp-engineering/learn-vm-scripts.git",
5
5
  "description": "Scripts used by VMs in learn.",
6
- "main": "./dist/index.js",
6
+ "main": "./dist/index.cjs",
7
+ "files": [
8
+ "dist"
9
+ ],
7
10
  "bin": {
8
- "vm-scripts": "./dist/index.js"
11
+ "vm-scripts": "./dist/index.cjs"
9
12
  },
10
13
  "type": "module",
11
14
  "scripts": {
12
- "build": "tsc",
15
+ "build": "esbuild src/index.ts --bundle --platform=node --outfile=dist/index.cjs",
13
16
  "dev": "NODE_ENV=development yarn build && yarn cli",
14
17
  "lint": "eslint --ext ts .",
15
18
  "deduplicate": "yarn-deduplicate",
16
- "cli": "node dist/index.js"
19
+ "cli": "node dist/index.cjs",
20
+ "test": "vitest"
17
21
  },
18
22
  "keywords": [],
19
23
  "author": "Content Platform <content-platform@datacamp.com>",
20
24
  "license": "UNLICENSED",
21
25
  "dependencies": {
22
26
  "chalk": "^5.3.0",
23
- "dotenv": "^16.4.5",
24
27
  "eslint-plugin-prettier": "^5.2.1",
25
- "ora": "5.4.1",
28
+ "ora": "8.0.1",
26
29
  "puppeteer-core": "^22.14.0",
27
- "yargs": "^17.7.2"
30
+ "yargs": "^17.7.2",
31
+ "zod": "^3.23.8"
28
32
  },
29
33
  "devDependencies": {
30
34
  "@datacamp/eslint-config": "^7.1.0",
@@ -34,6 +38,7 @@
34
38
  "@types/yargs": "^17.0.32",
35
39
  "@typescript-eslint/eslint-plugin": "^7.17.0",
36
40
  "@typescript-eslint/parser": "^7.17.0",
41
+ "esbuild": "^0.23.0",
37
42
  "eslint": "^8.32.0",
38
43
  "eslint-config-prettier": "^9.1.0",
39
44
  "eslint-plugin-jest": "^28.6.0",
@@ -42,6 +47,7 @@
42
47
  "ts-node": "^10.9.2",
43
48
  "ts-node-dev": "^2.0.0",
44
49
  "typescript": "^5.5.4",
50
+ "vitest": "^2.0.5",
45
51
  "yarn-deduplicate": "^6.0.2"
46
52
  }
47
53
  }
package/dist/index.js DELETED
@@ -1,38 +0,0 @@
1
- import chalk from 'chalk';
2
- import yargs from 'yargs';
3
- import { loginToAWS } from './awsLogin.js';
4
- import { loginToAzure } from './azureLogin.js';
5
- import { loginToDatabricks } from './databricksLogin.js';
6
- const argv = yargs(process.argv.slice(2))
7
- .options({
8
- password: { demandOption: true, type: 'string' },
9
- url: { demandOption: true, type: 'string' },
10
- username: { demandOption: true, type: 'string' },
11
- })
12
- .parseSync();
13
- (async () => {
14
- const { url } = argv;
15
- const { username } = argv;
16
- const { password } = argv;
17
- console.log(chalk.blue(`Logging in to: ${url}`));
18
- try {
19
- if (url.includes('aws.amazon.com')) {
20
- await loginToAWS(url, username, password);
21
- }
22
- else if (url.includes('portal.azure.com')) {
23
- await loginToAzure(url, username, password);
24
- }
25
- else if (url.includes('databricks')) {
26
- await loginToDatabricks(url, username, password);
27
- }
28
- else {
29
- console.error(chalk.red('Unsupported URL'));
30
- }
31
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
32
- }
33
- catch (error) {
34
- console.error(chalk.red(`Error: ${error.message}`));
35
- }
36
- await new Promise(() => { });
37
- })();
38
- //# sourceMappingURL=index.js.map