@nextcli/cli 0.0.0-stage → 0.1.0
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/LICENSE +201 -0
- package/NOTICE +24 -0
- package/README.md +128 -2
- package/dist/cn.js +3 -0
- package/dist/index.js +6651 -0
- package/dist/index.js.map +4 -0
- package/dist/xhr-sync-worker.js +59 -0
- package/package.json +144 -4
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
const util = require("util");
|
|
3
|
+
const { JSDOM } = require("../../../..");
|
|
4
|
+
const { READY_STATES } = require("./xhr-utils");
|
|
5
|
+
const idlUtils = require("../generated/utils");
|
|
6
|
+
const tough = require("tough-cookie");
|
|
7
|
+
|
|
8
|
+
const dom = new JSDOM();
|
|
9
|
+
const xhr = new dom.window.XMLHttpRequest();
|
|
10
|
+
const xhrImpl = idlUtils.implForWrapper(xhr);
|
|
11
|
+
|
|
12
|
+
const chunks = [];
|
|
13
|
+
|
|
14
|
+
process.stdin.on("data", chunk => {
|
|
15
|
+
chunks.push(chunk);
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
process.stdin.on("end", () => {
|
|
19
|
+
const buffer = Buffer.concat(chunks);
|
|
20
|
+
|
|
21
|
+
const flag = JSON.parse(buffer.toString());
|
|
22
|
+
if (flag.body && flag.body.type === "Buffer" && flag.body.data) {
|
|
23
|
+
flag.body = Buffer.from(flag.body.data);
|
|
24
|
+
}
|
|
25
|
+
if (flag.cookieJar) {
|
|
26
|
+
flag.cookieJar = tough.CookieJar.fromJSON(flag.cookieJar);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
flag.synchronous = false;
|
|
30
|
+
Object.assign(xhrImpl.flag, flag);
|
|
31
|
+
const { properties } = xhrImpl;
|
|
32
|
+
xhrImpl.readyState = READY_STATES.OPENED;
|
|
33
|
+
try {
|
|
34
|
+
xhr.addEventListener("loadend", () => {
|
|
35
|
+
if (properties.error) {
|
|
36
|
+
properties.error = properties.error.stack || util.inspect(properties.error);
|
|
37
|
+
}
|
|
38
|
+
process.stdout.write(JSON.stringify({
|
|
39
|
+
responseURL: xhrImpl.responseURL,
|
|
40
|
+
status: xhrImpl.status,
|
|
41
|
+
statusText: xhrImpl.statusText,
|
|
42
|
+
properties
|
|
43
|
+
}), () => {
|
|
44
|
+
process.exit(0);
|
|
45
|
+
});
|
|
46
|
+
}, false);
|
|
47
|
+
xhr.send(flag.body);
|
|
48
|
+
} catch (error) {
|
|
49
|
+
properties.error += error.stack || util.inspect(error);
|
|
50
|
+
process.stdout.write(JSON.stringify({
|
|
51
|
+
responseURL: xhrImpl.responseURL,
|
|
52
|
+
status: xhrImpl.status,
|
|
53
|
+
statusText: xhrImpl.statusText,
|
|
54
|
+
properties
|
|
55
|
+
}), () => {
|
|
56
|
+
process.exit(0);
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,146 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nextcli/cli",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "NextCLI CLI",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"types": "dist/index.d.ts",
|
|
7
|
+
"type": "module",
|
|
8
|
+
"bin": {
|
|
9
|
+
"cn": "dist/cn.js"
|
|
10
|
+
},
|
|
11
|
+
"scripts": {
|
|
12
|
+
"test": "vitest run",
|
|
13
|
+
"test:watch": "vitest watch",
|
|
14
|
+
"test:ui": "vitest --ui",
|
|
15
|
+
"test:e2e": "vitest run --config vitest.e2e.config.ts",
|
|
16
|
+
"test:smoke": "node smoke-test.mjs",
|
|
17
|
+
"test:smoke-api": "vitest run --config vitest.smoke-api.config.ts",
|
|
18
|
+
"build:tsc": "tsc -p tsconfig.build.json",
|
|
19
|
+
"build:local-deps": "cd ../../packages/config-types && npm i && npm run build && cd ../fetch && npm i && npm run build && cd ../llm-info && npm i && npm run build && cd ../terminal-security && npm i && npm run build && cd ../config-yaml && npm i && npm run build && cd ../openai-adapters && npm i && npm run build && cd ../../core && npm i && npm run build && cd ../extensions/cli && npm i",
|
|
20
|
+
"build:validate": "node validate-aliases.mjs",
|
|
21
|
+
"build:bundle": "node build.mjs",
|
|
22
|
+
"build": "npm run build:validate && npm run build:bundle",
|
|
23
|
+
"start": "node dist/cn.js",
|
|
24
|
+
"dev": "tsx src/index.ts",
|
|
25
|
+
"repomix:sdk": "npx repomix node_modules/@continuedev/sdk --ignore **/api,cli-repomix.xml -o sdk-repomix.xml",
|
|
26
|
+
"repomix:cli": "npx repomix --ignore sdk-repomix.xml -o cli-repomix.xml",
|
|
27
|
+
"lint": "tsc --noEmit && eslint .",
|
|
28
|
+
"lint:fix": "eslint . --fix",
|
|
29
|
+
"format": "prettier --write .",
|
|
30
|
+
"format:check": "prettier --check .",
|
|
31
|
+
"typecheck": "tsc --noEmit",
|
|
32
|
+
"watch:logs": "touch ~/.continue/logs/cn.log && tail -f ~/.continue/logs/cn.log",
|
|
33
|
+
"prepack": "npm run build"
|
|
34
|
+
},
|
|
35
|
+
"author": "NextCLI",
|
|
36
|
+
"license": "Apache-2.0",
|
|
37
|
+
"repository": {
|
|
38
|
+
"type": "git",
|
|
39
|
+
"url": "https://github.com/nextcli-dev/nextcli.git"
|
|
40
|
+
},
|
|
41
|
+
"bugs": {
|
|
42
|
+
"url": "https://github.com/nextcli-dev/nextcli/issues"
|
|
43
|
+
},
|
|
44
|
+
"homepage": "https://nextcli.dev",
|
|
45
|
+
"files": [
|
|
46
|
+
"dist",
|
|
47
|
+
"!dist/meta.json",
|
|
48
|
+
"README.md",
|
|
49
|
+
"LICENSE",
|
|
50
|
+
"NOTICE"
|
|
51
|
+
],
|
|
52
|
+
"publishConfig": {
|
|
53
|
+
"access": "public",
|
|
54
|
+
"provenance": true
|
|
55
|
+
},
|
|
56
|
+
"devDependencies": {
|
|
57
|
+
"@nextcli/config-yaml": "file:../../packages/config-yaml",
|
|
58
|
+
"@nextcli/openai-adapters": "file:../../packages/openai-adapters",
|
|
59
|
+
"@continuedev/sdk": "^0.0.13",
|
|
60
|
+
"@continuedev/terminal-security": "file:../../packages/terminal-security",
|
|
61
|
+
"@modelcontextprotocol/sdk": "^1.24.0",
|
|
62
|
+
"@opentelemetry/api": "^1.9.0",
|
|
63
|
+
"@opentelemetry/exporter-metrics-otlp-grpc": "^0.203.0",
|
|
64
|
+
"@opentelemetry/exporter-metrics-otlp-http": "^0.203.0",
|
|
65
|
+
"@opentelemetry/instrumentation-fs": "^0.23.0",
|
|
66
|
+
"@opentelemetry/instrumentation-http": "^0.203.0",
|
|
67
|
+
"@opentelemetry/resources": "^2.0.1",
|
|
68
|
+
"@opentelemetry/sdk-node": "^0.203.0",
|
|
69
|
+
"@opentelemetry/semantic-conventions": "^1.36.0",
|
|
70
|
+
"@testing-library/react": "^16.3.0",
|
|
71
|
+
"@types/date-fns": "^2.5.3",
|
|
72
|
+
"@types/diff": "^7.0.2",
|
|
73
|
+
"@types/express": "^5.0.3",
|
|
74
|
+
"@types/glob": "^8.1.0",
|
|
75
|
+
"@types/ignore-walk": "^4.0.3",
|
|
76
|
+
"@types/ink-testing-library": "^1.0.4",
|
|
77
|
+
"@types/jszip": "^3.4.0",
|
|
78
|
+
"@types/nock": "^10.0.3",
|
|
79
|
+
"@types/react": "^19.1.8",
|
|
80
|
+
"@types/shell-quote": "^1.7.5",
|
|
81
|
+
"@types/supertest": "^6.0.3",
|
|
82
|
+
"@types/turndown": "^5.0.5",
|
|
83
|
+
"@types/uuid": "^10.0.0",
|
|
84
|
+
"@typescript-eslint/eslint-plugin": "^8.39.0",
|
|
85
|
+
"@typescript-eslint/parser": "^8.39.0",
|
|
86
|
+
"@vitest/ui": "^3.2.4",
|
|
87
|
+
"@workos-inc/node": "^7.45.0",
|
|
88
|
+
"chalk": "^5.4.1",
|
|
89
|
+
"clipboardy": "^4.0.0",
|
|
90
|
+
"commander": "^14.0.0",
|
|
91
|
+
"core": "file:../../core",
|
|
92
|
+
"cross-env": "^7.0.3",
|
|
93
|
+
"date-fns": "^4.1.0",
|
|
94
|
+
"diff": "^8.0.4",
|
|
95
|
+
"dotenv": "^16.5.0",
|
|
96
|
+
"esbuild": "^0.25.9",
|
|
97
|
+
"eslint": "^9.32.0",
|
|
98
|
+
"eslint-import-resolver-typescript": "^4.4.4",
|
|
99
|
+
"eslint-plugin-import": "^2.32.0",
|
|
100
|
+
"eslint-plugin-unused-imports": "^4.1.4",
|
|
101
|
+
"execa": "^9.6.0",
|
|
102
|
+
"express": "^5.1.0",
|
|
103
|
+
"fdir": "^6.4.2",
|
|
104
|
+
"find-up": "^8.0.0",
|
|
105
|
+
"fzf": "^0.5.2",
|
|
106
|
+
"glob": "^11.0.3",
|
|
107
|
+
"gpt-tokenizer": "^3.0.1",
|
|
108
|
+
"gradient-string": "^3.0.0",
|
|
109
|
+
"happy-dom": "^20.0.0",
|
|
110
|
+
"ignore": "^7.0.5",
|
|
111
|
+
"ignore-walk": "^7.0.0",
|
|
112
|
+
"ink": "^6.1.0",
|
|
113
|
+
"ink-testing-library": "^4.0.0",
|
|
114
|
+
"js-yaml": "^4.1.1",
|
|
115
|
+
"jsdom": "^26.1.0",
|
|
116
|
+
"jszip": "^3.10.1",
|
|
117
|
+
"lowlight": "^3.3.0",
|
|
118
|
+
"minimatch": "^10.0.3",
|
|
119
|
+
"nock": "^14.0.5",
|
|
120
|
+
"node-fetch": "^3.3.2",
|
|
121
|
+
"node-machine-id": "^1.1.12",
|
|
122
|
+
"open": "^10.1.0",
|
|
123
|
+
"prettier": "^3.6.2",
|
|
124
|
+
"prettier-plugin-tailwindcss": "^0.6.14",
|
|
125
|
+
"react": "^19.1.0",
|
|
126
|
+
"shell-quote": "^1.8.3",
|
|
127
|
+
"supertest": "^7.1.3",
|
|
128
|
+
"swr": "^2.3.4",
|
|
129
|
+
"ts-node": "^10.9.2",
|
|
130
|
+
"tsx": "^4.20.3",
|
|
131
|
+
"turndown": "^7.2.0",
|
|
132
|
+
"typescript": "^5.8.3",
|
|
133
|
+
"uuid": "^9.0.1",
|
|
134
|
+
"vitest": "^3.2.4",
|
|
135
|
+
"winston": "^3.17.0",
|
|
136
|
+
"yaml": "^2.8.0"
|
|
137
|
+
},
|
|
138
|
+
"engines": {
|
|
139
|
+
"node": ">=18"
|
|
140
|
+
},
|
|
141
|
+
"overrides": {
|
|
142
|
+
"minimatch@<9.0.7": "^9.0.7",
|
|
143
|
+
"qs": "^6.14.2",
|
|
144
|
+
"picomatch": "^4.0.2"
|
|
145
|
+
}
|
|
146
|
+
}
|