jitsu-cli 1.10.4 → 2.14.0-beta.5

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,23 +1,41 @@
1
1
  {
2
2
  "name": "jitsu-cli",
3
- "version": "1.10.4",
3
+ "version": "2.14.0-beta.5",
4
4
  "description": "",
5
5
  "author": "Jitsu Dev Team <dev@jitsu.com>",
6
6
  "publishConfig": {
7
7
  "access": "public"
8
8
  },
9
- "bin": "./bin/jitsu-cli",
9
+ "bin": {
10
+ "jitsu-cli": "./bin/jitsu-cli"
11
+ },
10
12
  "license": "MIT",
11
13
  "private": false,
14
+ "scripts": {
15
+ "clean": "rm -rf ./dist",
16
+ "typecheck": "tsc --noEmit",
17
+ "build": "tsc -p . && webpack",
18
+ "run": "pnpm build && node dist/main.js",
19
+ "login": "pnpm build && node dist/main.js login",
20
+ "init child": "pnpm build && node dist/main.js init",
21
+ "build child": "pnpm build && node dist/main.js build",
22
+ "run child": "pnpm build && node dist/main.js run -e ./data/page.json",
23
+ "test child": "pnpm build && node dist/main.js test",
24
+ "deploy child": "pnpm build && node dist/main.js deploy"
25
+ },
12
26
  "dependencies": {
13
27
  "figlet": "^1.6.0",
14
28
  "jest-cli": "^29.7.0",
15
- "tslib": "^2.6.3",
16
- "typescript": "^5.6.3"
29
+ "tslib": "catalog:",
30
+ "typescript": "catalog:"
17
31
  },
18
32
  "devDependencies": {
19
- "@babel/preset-env": "^7.23.2",
20
- "@babel/preset-typescript": "^7.23.2",
33
+ "@swc-node/register": "catalog:",
34
+ "swc-loader": "catalog:",
35
+ "@swc/core": "catalog:",
36
+ "@jitsu/common-config": "workspace:*",
37
+ "@jitsu/functions-lib": "workspace:*",
38
+ "@jitsu/protocols": "workspace:*",
21
39
  "@rollup/plugin-commonjs": "^28.0.2",
22
40
  "@rollup/plugin-json": "^6.0.0",
23
41
  "@rollup/plugin-node-resolve": "^16.0.0",
@@ -27,12 +45,11 @@
27
45
  "@types/commander": "^2.12.2",
28
46
  "@types/express": "^4.17.21",
29
47
  "@types/inquirer": "^9.0.3",
30
- "@types/jest": "^29.5.5",
31
- "@types/lodash": "^4.14.198",
32
- "@types/node": "^18.15.3",
48
+ "@types/lodash": "catalog:",
49
+ "@types/node": "catalog:",
50
+ "@vitest/ui": "catalog:",
33
51
  "@types/webpack": "^5.28.5",
34
52
  "@webpack-cli/generators": "^3.0.7",
35
- "babel-loader": "^9.1.3",
36
53
  "chalk": "^5.3.0",
37
54
  "commander": "^11.0.0",
38
55
  "cross-fetch": "^4.0.0",
@@ -41,31 +58,17 @@
41
58
  "inquirer": "^9.2.11",
42
59
  "jest": "^29.7.0",
43
60
  "json5": "^2.2.3",
44
- "lodash": "^4.17.21",
61
+ "juava": "workspace:*",
62
+ "lodash": "catalog:",
45
63
  "node-fetch": "^3.3.2",
46
64
  "node-loader": "^2.0.0",
47
65
  "prismjs": "^1.30.0",
48
66
  "rollup": "^3.29.5",
49
67
  "semver": "^7.5.4",
50
- "ts-jest": "^29.1.1",
51
68
  "ts-loader": "^9.5.1",
52
- "ts-node": "^10.9.2",
53
- "webpack": "^5.99.5",
54
- "webpack-cli": "^6.0.1",
55
- "@jitsu/functions-lib": "1.10.4",
56
- "juava": "1.10.4",
57
- "@jitsu/protocols": "1.10.4"
58
- },
59
- "scripts": {
60
- "clean": "rm -rf ./dist",
61
- "compile": "tsc -p . ",
62
- "build": "pnpm compile && webpack",
63
- "run": "pnpm build && node dist/main.js",
64
- "login": "pnpm build && node dist/main.js login",
65
- "init child": "pnpm build && node dist/main.js init",
66
- "build child": "pnpm build && node dist/main.js build",
67
- "run child": "pnpm build && node dist/main.js run -e ./data/page.json",
68
- "test child": "pnpm build && node dist/main.js test",
69
- "deploy child": "pnpm build && node dist/main.js deploy"
69
+ "ts-node": "catalog:",
70
+ "vitest": "catalog:",
71
+ "webpack": "catalog:",
72
+ "webpack-cli": "catalog:"
70
73
  }
71
- }
74
+ }
@@ -128,7 +128,6 @@ function checkTypescript(projectDir: string): string[] | void {
128
128
  console.info(`No ${b("tsconfig.json")} file found in ${b(projectDir)}. Assuming JavaScript project`);
129
129
  return;
130
130
  }
131
- console.log(`Checking TypeScript files in ${b(projectDir)}`);
132
131
  let compilerOptions: ts.CompilerOptions = {};
133
132
  let filenames: string[] = [];
134
133
  const tsconfig = ts.readConfigFile(tsconfigPath, ts.sys.readFile);
@@ -137,6 +136,7 @@ function checkTypescript(projectDir: string): string[] | void {
137
136
  typeRoots: [path.resolve(projectDir, "node_modules", "@types")],
138
137
  checkJs: true,
139
138
  allowJs: true,
139
+ skipLibCheck: true,
140
140
  noEmit: true,
141
141
  esModuleInterop: typeof compilerOptions.esModuleInterop !== "undefined" ? compilerOptions.esModuleInterop : true,
142
142
  moduleResolution:
@@ -35,7 +35,9 @@ export async function logout({ force }: { force?: boolean }) {
35
35
  }
36
36
 
37
37
  export async function login({ host, apikey, force }: { host: string; apikey?: string; force?: boolean }) {
38
- const jitsuFile = `${homedir()}/.jitsu/jitsu-cli.json`;
38
+ const jitsuDir = `${homedir()}/.jitsu`;
39
+ fs.mkdirSync(jitsuDir, { recursive: true });
40
+ const jitsuFile = `${jitsuDir}/jitsu-cli.json`;
39
41
  if (fs.existsSync(jitsuFile) && !force) {
40
42
  const loginInfo = JSON.parse(readFileSync(jitsuFile, { encoding: "utf-8" }));
41
43
  console.error(
package/tsconfig.json CHANGED
@@ -1,26 +1,9 @@
1
1
  {
2
+ "extends": "@jitsu/common-config/tsconfig.json",
2
3
  "compilerOptions": {
3
4
  "outDir": "./compiled",
4
- "rootDir": ".",
5
- "noImplicitAny": false,
6
- "allowSyntheticDefaultImports": true,
7
- "importHelpers": true,
8
- "removeComments": true,
9
- "target": "ES2021",
10
- "module": "commonjs",
11
- "lib": [
12
- "dom","esnext"
13
- ],
14
- "allowJs": true,
15
- "strict": true,
16
- "esModuleInterop": true,
17
- "moduleResolution": "node",
18
- "resolveJsonModule": true,
19
- "skipLibCheck": true
5
+ "rootDir": "."
20
6
  },
21
- "exclude": [
22
- "node_modules"
23
- ],
24
7
  "include": [
25
8
  "src/**/*"
26
9
  ]
@@ -27,8 +27,12 @@ const config = {
27
27
  rules: [
28
28
  {
29
29
  test: /\.(ts|tsx)$/i,
30
+ exclude: /node_modules/,
30
31
  use: {
31
- loader: "babel-loader",
32
+ loader: "swc-loader",
33
+ options: {
34
+ configFile: path.resolve(__dirname, "../../libs/common-config/swc.config.json"),
35
+ },
32
36
  },
33
37
  },
34
38
  {
@@ -1,28 +0,0 @@
1
- jitsu-cli:build: cache hit, replaying output dcca113b76fcc4b6
2
- jitsu-cli:build: 
3
- jitsu-cli:build: > jitsu-cli@0.0.0 build /Users/ildarnurislamov/Projects/newjitsu/cli/jitsu-cli
4
- jitsu-cli:build: > pnpm compile && webpack
5
- jitsu-cli:build: 
6
- jitsu-cli:build: 
7
- jitsu-cli:build: > jitsu-cli@0.0.0 compile /Users/ildarnurislamov/Projects/newjitsu/cli/jitsu-cli
8
- jitsu-cli:build: > tsc -p .
9
- jitsu-cli:build: 
10
- jitsu-cli:build: asset main.js 3.45 MiB [emitted] (name: main) 1 related asset
11
- jitsu-cli:build: asset 233.js 130 KiB [emitted] (id hint: vendors) 1 related asset
12
- jitsu-cli:build: asset 445e7f36f8a19c2bf682.js 37.3 KiB [emitted] [immutable] [from: ../../node_modules/.pnpm/@rollup+plugin-typescript@11.1.6_rollup@3.29.5_tslib@2.8.0_typescript@5.6.3/node_modules/@rollup/plugin-typescript/dist/es/index.js] (auxiliary name: main)
13
- jitsu-cli:build: asset 140.js 10 KiB [emitted] 1 related asset
14
- jitsu-cli:build: orphan modules 574 KiB [orphan] 100 modules
15
- jitsu-cli:build: runtime modules 3.62 KiB 10 modules
16
- jitsu-cli:build: cacheable modules 2.84 MiB (javascript) 37.3 KiB (asset)
17
- jitsu-cli:build:  javascript modules 2.49 MiB 428 modules
18
- jitsu-cli:build:  json modules 363 KiB
19
- jitsu-cli:build:  modules by path ../../node_modules/.pnpm/iconv-lite@0.4.24/node_modules/iconv-lite/ 86.7 KiB
20
- jitsu-cli:build:  ../../node_modules/.pnpm/iconv-lite@0.4.24/node_modules/iconv-lite/encodings/tab...(truncated) 8.78 KiB [built] [code generated]
21
- jitsu-cli:build:  + 7 modules
22
- jitsu-cli:build:  + 4 modules
23
- jitsu-cli:build:  ../../node_modules/.pnpm/@rollup+plugin-typescript@11.1.6_rollup@3.29.5_tslib@2....(truncated) 37.3 KiB (asset) 42 bytes (javascript) [built] [code generated]
24
- jitsu-cli:build: optional modules 84 bytes [optional]
25
- jitsu-cli:build:  external "worker_threads" 42 bytes [optional] [built] [code generated]
26
- jitsu-cli:build:  external "node:stream/web" 42 bytes [optional] [built] [code generated]
27
- jitsu-cli:build: + 26 modules
28
- jitsu-cli:build: webpack 5.99.5 compiled successfully in 4904 ms
@@ -1,5 +0,0 @@
1
- jitsu-cli:clean: cache hit, replaying output fc669d593044a2dc
2
- jitsu-cli:clean: 
3
- jitsu-cli:clean: > jitsu-cli@0.0.0 clean /Users/ildarnurislamov/Projects/newjitsu/cli/jitsu-cli
4
- jitsu-cli:clean: > rm -rf ./dist
5
- jitsu-cli:clean: 
package/LICENSE DELETED
@@ -1,21 +0,0 @@
1
- MIT License
2
-
3
- Copyright (c) 2021 Jitsu Labs, Inc
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
package/babel.config.cjs DELETED
@@ -1,4 +0,0 @@
1
- module.exports = {
2
- presets: ["@babel/preset-env", "@babel/preset-typescript"],
3
- plugins: [],
4
- };