jitsu-cli 1.10.4 → 2.14.0-beta.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/compiled/package.json +20 -17
- package/compiled/src/commands/build.js +41 -45
- package/compiled/src/commands/deploy.js +41 -45
- package/compiled/src/commands/init.js +17 -21
- package/compiled/src/commands/login.js +24 -27
- package/compiled/src/commands/shared.js +12 -17
- package/compiled/src/commands/test.js +7 -10
- package/compiled/src/commands/whoami.js +8 -12
- package/compiled/src/index.js +20 -23
- package/compiled/src/lib/chalk-code-highlight.js +15 -20
- package/compiled/src/lib/compiled-function.js +9 -13
- package/compiled/src/lib/indent.js +3 -8
- package/compiled/src/lib/template.js +7 -11
- package/compiled/src/lib/version.js +13 -20
- package/compiled/src/templates/functions.js +13 -18
- package/dist/140.js +3 -3
- package/dist/main.js +84596 -78688
- package/dist/main.js.map +1 -1
- package/package.json +34 -31
- package/src/commands/build.ts +1 -1
- package/src/commands/login.ts +3 -1
- package/tsconfig.json +2 -19
- package/{webpack.config.js → webpack.config.cjs} +5 -1
- package/.turbo/turbo-build.log +0 -28
- package/.turbo/turbo-clean.log +0 -5
- package/LICENSE +0 -21
- package/babel.config.cjs +0 -4
- package/dist/233.js +0 -4890
- package/dist/233.js.map +0 -1
- package/dist/445e7f36f8a19c2bf682.js +0 -900
package/package.json
CHANGED
|
@@ -1,23 +1,41 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "jitsu-cli",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.14.0-beta.4",
|
|
4
4
|
"description": "",
|
|
5
5
|
"author": "Jitsu Dev Team <dev@jitsu.com>",
|
|
6
6
|
"publishConfig": {
|
|
7
7
|
"access": "public"
|
|
8
8
|
},
|
|
9
|
-
"bin":
|
|
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": "
|
|
16
|
-
"typescript": "
|
|
29
|
+
"tslib": "catalog:",
|
|
30
|
+
"typescript": "catalog:"
|
|
17
31
|
},
|
|
18
32
|
"devDependencies": {
|
|
19
|
-
"@
|
|
20
|
-
"
|
|
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/
|
|
31
|
-
"@types/
|
|
32
|
-
"@
|
|
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
|
-
"
|
|
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": "
|
|
53
|
-
"
|
|
54
|
-
"webpack
|
|
55
|
-
"
|
|
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
|
+
}
|
package/src/commands/build.ts
CHANGED
|
@@ -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:
|
package/src/commands/login.ts
CHANGED
|
@@ -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
|
|
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: "
|
|
32
|
+
loader: "swc-loader",
|
|
33
|
+
options: {
|
|
34
|
+
configFile: path.resolve(__dirname, "../../libs/common-config/swc.config.json"),
|
|
35
|
+
},
|
|
32
36
|
},
|
|
33
37
|
},
|
|
34
38
|
{
|
package/.turbo/turbo-build.log
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
jitsu-cli:build: cache hit, replaying output [2mdcca113b76fcc4b6[0m
|
|
2
|
-
[32mjitsu-cli:build: [0m
|
|
3
|
-
[32mjitsu-cli:build: [0m> jitsu-cli@0.0.0 build /Users/ildarnurislamov/Projects/newjitsu/cli/jitsu-cli
|
|
4
|
-
[32mjitsu-cli:build: [0m> pnpm compile && webpack
|
|
5
|
-
[32mjitsu-cli:build: [0m
|
|
6
|
-
[32mjitsu-cli:build: [0m
|
|
7
|
-
[32mjitsu-cli:build: [0m> jitsu-cli@0.0.0 compile /Users/ildarnurislamov/Projects/newjitsu/cli/jitsu-cli
|
|
8
|
-
[32mjitsu-cli:build: [0m> tsc -p .
|
|
9
|
-
[32mjitsu-cli:build: [0m
|
|
10
|
-
[32mjitsu-cli:build: [0masset main.js 3.45 MiB [emitted] (name: main) 1 related asset
|
|
11
|
-
[32mjitsu-cli:build: [0masset 233.js 130 KiB [emitted] (id hint: vendors) 1 related asset
|
|
12
|
-
[32mjitsu-cli:build: [0masset 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
|
-
[32mjitsu-cli:build: [0masset 140.js 10 KiB [emitted] 1 related asset
|
|
14
|
-
[32mjitsu-cli:build: [0morphan modules 574 KiB [orphan] 100 modules
|
|
15
|
-
[32mjitsu-cli:build: [0mruntime modules 3.62 KiB 10 modules
|
|
16
|
-
[32mjitsu-cli:build: [0mcacheable modules 2.84 MiB (javascript) 37.3 KiB (asset)
|
|
17
|
-
[32mjitsu-cli:build: [0m javascript modules 2.49 MiB 428 modules
|
|
18
|
-
[32mjitsu-cli:build: [0m json modules 363 KiB
|
|
19
|
-
[32mjitsu-cli:build: [0m modules by path ../../node_modules/.pnpm/iconv-lite@0.4.24/node_modules/iconv-lite/ 86.7 KiB
|
|
20
|
-
[32mjitsu-cli:build: [0m ../../node_modules/.pnpm/iconv-lite@0.4.24/node_modules/iconv-lite/encodings/tab...(truncated) 8.78 KiB [built] [code generated]
|
|
21
|
-
[32mjitsu-cli:build: [0m + 7 modules
|
|
22
|
-
[32mjitsu-cli:build: [0m + 4 modules
|
|
23
|
-
[32mjitsu-cli:build: [0m ../../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
|
-
[32mjitsu-cli:build: [0moptional modules 84 bytes [optional]
|
|
25
|
-
[32mjitsu-cli:build: [0m external "worker_threads" 42 bytes [optional] [built] [code generated]
|
|
26
|
-
[32mjitsu-cli:build: [0m external "node:stream/web" 42 bytes [optional] [built] [code generated]
|
|
27
|
-
[32mjitsu-cli:build: [0m+ 26 modules
|
|
28
|
-
[32mjitsu-cli:build: [0mwebpack 5.99.5 compiled successfully in 4904 ms
|
package/.turbo/turbo-clean.log
DELETED
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