cngkit 1.1.9 → 1.1.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/dist/{chunk-OKKJBRUU.js → chunk-KOLBFZYI.js} +3 -3
- package/dist/{chunk-CHSTTMTO.js → chunk-MZCCGZH6.js} +2 -2
- package/dist/{chunk-575IBOIA.js → chunk-W7JC55HV.js} +2 -2
- package/dist/chunk-W7JC55HV.js.map +1 -0
- package/dist/{chunk-LWZPSJVC.js → chunk-XYBOQGDA.js} +2 -2
- package/dist/cli.js +1 -1
- package/dist/commands/coderoom/join.js +3 -3
- package/dist/commands/coderoom/share.js +3 -3
- package/dist/commands/knowledges/audiences.js +3 -3
- package/dist/commands/knowledges/files.js +3 -3
- package/dist/commands/knowledges/glob.js +3 -3
- package/dist/commands/knowledges/grep.js +3 -3
- package/dist/commands/knowledges/list.js +3 -3
- package/dist/commands/knowledges/read.js +3 -3
- package/dist/commands/knowledges/search.js +3 -3
- package/dist/commands/knowledges/status.js +3 -3
- package/dist/commands/login.js +1 -1
- package/package.json +2 -1
- package/scripts/deploy.sh +65 -0
- package/scripts/smoke-docker.sh +19 -0
- package/dist/chunk-575IBOIA.js.map +0 -1
- /package/dist/{chunk-OKKJBRUU.js.map → chunk-KOLBFZYI.js.map} +0 -0
- /package/dist/{chunk-CHSTTMTO.js.map → chunk-MZCCGZH6.js.map} +0 -0
- /package/dist/{chunk-LWZPSJVC.js.map → chunk-XYBOQGDA.js.map} +0 -0
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
readBackendHealth
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-MZCCGZH6.js";
|
|
4
4
|
import {
|
|
5
5
|
createPeerId,
|
|
6
6
|
createRoomCode,
|
|
7
7
|
resolveApiBaseUrl
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-W7JC55HV.js";
|
|
9
9
|
|
|
10
10
|
// src/features/coderoom/run-coderoom-command.ts
|
|
11
11
|
import process2 from "process";
|
|
@@ -412,4 +412,4 @@ export {
|
|
|
412
412
|
runShareCommand,
|
|
413
413
|
runJoinCommand
|
|
414
414
|
};
|
|
415
|
-
//# sourceMappingURL=chunk-
|
|
415
|
+
//# sourceMappingURL=chunk-KOLBFZYI.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
resolveApiBaseUrl
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-W7JC55HV.js";
|
|
4
4
|
import {
|
|
5
5
|
__export
|
|
6
6
|
} from "./chunk-PZ5AY32C.js";
|
|
@@ -3231,4 +3231,4 @@ export {
|
|
|
3231
3231
|
createCngApiClient,
|
|
3232
3232
|
readBackendHealth
|
|
3233
3233
|
};
|
|
3234
|
-
//# sourceMappingURL=chunk-
|
|
3234
|
+
//# sourceMappingURL=chunk-MZCCGZH6.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// src/shared/config.ts
|
|
2
2
|
import { randomBytes, randomUUID } from "crypto";
|
|
3
3
|
import process from "process";
|
|
4
|
-
var packageVersion = "1.1.
|
|
4
|
+
var packageVersion = "1.1.10";
|
|
5
5
|
var defaultApiBaseUrl = "https://curly.ng";
|
|
6
6
|
function resolveApiBaseUrl(options) {
|
|
7
7
|
return options.apiBaseUrl ?? process.env.CNGKIT_API_BASE_URL ?? defaultApiBaseUrl;
|
|
@@ -19,4 +19,4 @@ export {
|
|
|
19
19
|
createRoomCode,
|
|
20
20
|
createPeerId
|
|
21
21
|
};
|
|
22
|
-
//# sourceMappingURL=chunk-
|
|
22
|
+
//# sourceMappingURL=chunk-W7JC55HV.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/shared/config.ts"],"sourcesContent":["import { randomBytes, randomUUID } from \"node:crypto\";\nimport process from \"node:process\";\n\nexport const packageVersion = \"1.1.10\";\nexport const defaultApiBaseUrl = \"https://curly.ng\";\n\nexport type GlobalCommandOptions = {\n apiBaseUrl?: string;\n};\n\nexport function resolveApiBaseUrl(options: GlobalCommandOptions): string {\n return options.apiBaseUrl ?? process.env.CNGKIT_API_BASE_URL ?? defaultApiBaseUrl;\n}\n\nexport function createRoomCode(): string {\n return randomBytes(4).toString(\"hex\").toUpperCase();\n}\n\nexport function createPeerId(): string {\n return randomUUID();\n}\n"],"mappings":";AAAA,SAAS,aAAa,kBAAkB;AACxC,OAAO,aAAa;AAEb,IAAM,iBAAiB;AACvB,IAAM,oBAAoB;AAM1B,SAAS,kBAAkB,SAAuC;AACvE,SAAO,QAAQ,cAAc,QAAQ,IAAI,uBAAuB;AAClE;AAEO,SAAS,iBAAyB;AACvC,SAAO,YAAY,CAAC,EAAE,SAAS,KAAK,EAAE,YAAY;AACpD;AAEO,SAAS,eAAuB;AACrC,SAAO,WAAW;AACpB;","names":[]}
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
} from "./chunk-QZEB4VMX.js";
|
|
7
7
|
import {
|
|
8
8
|
createCngApiClient
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-MZCCGZH6.js";
|
|
10
10
|
|
|
11
11
|
// src/features/knowledges/knowledges-api.ts
|
|
12
12
|
function createKnowledgesApi(options) {
|
|
@@ -316,4 +316,4 @@ export {
|
|
|
316
316
|
runKnowGrepCommand,
|
|
317
317
|
runKnowGlobCommand
|
|
318
318
|
};
|
|
319
|
-
//# sourceMappingURL=chunk-
|
|
319
|
+
//# sourceMappingURL=chunk-XYBOQGDA.js.map
|
package/dist/cli.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
runJoinCommand
|
|
3
|
-
} from "../../chunk-
|
|
4
|
-
import "../../chunk-
|
|
5
|
-
import "../../chunk-
|
|
3
|
+
} from "../../chunk-KOLBFZYI.js";
|
|
4
|
+
import "../../chunk-MZCCGZH6.js";
|
|
5
|
+
import "../../chunk-W7JC55HV.js";
|
|
6
6
|
import {
|
|
7
7
|
GlobalOptionsSchema,
|
|
8
8
|
RequiredRoomCodeArgsSchema
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
runShareCommand
|
|
3
|
-
} from "../../chunk-
|
|
4
|
-
import "../../chunk-
|
|
5
|
-
import "../../chunk-
|
|
3
|
+
} from "../../chunk-KOLBFZYI.js";
|
|
4
|
+
import "../../chunk-MZCCGZH6.js";
|
|
5
|
+
import "../../chunk-W7JC55HV.js";
|
|
6
6
|
import {
|
|
7
7
|
GlobalOptionsSchema,
|
|
8
8
|
OptionalRoomCodeArgsSchema
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
runKnowAudiencesCommand
|
|
3
|
-
} from "../../chunk-
|
|
3
|
+
} from "../../chunk-XYBOQGDA.js";
|
|
4
4
|
import "../../chunk-QZEB4VMX.js";
|
|
5
5
|
import "../../chunk-WPBMAXXM.js";
|
|
6
|
-
import "../../chunk-
|
|
7
|
-
import "../../chunk-
|
|
6
|
+
import "../../chunk-MZCCGZH6.js";
|
|
7
|
+
import "../../chunk-W7JC55HV.js";
|
|
8
8
|
import {
|
|
9
9
|
JsonOutputOptionsSchema
|
|
10
10
|
} from "../../chunk-MLKBG5YJ.js";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
runKnowFilesCommand
|
|
3
|
-
} from "../../chunk-
|
|
3
|
+
} from "../../chunk-XYBOQGDA.js";
|
|
4
4
|
import "../../chunk-QZEB4VMX.js";
|
|
5
5
|
import "../../chunk-WPBMAXXM.js";
|
|
6
|
-
import "../../chunk-
|
|
7
|
-
import "../../chunk-
|
|
6
|
+
import "../../chunk-MZCCGZH6.js";
|
|
7
|
+
import "../../chunk-W7JC55HV.js";
|
|
8
8
|
import {
|
|
9
9
|
JsonOutputOptionsSchema,
|
|
10
10
|
OptionalQueryArgsSchema
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
runKnowGlobCommand
|
|
3
|
-
} from "../../chunk-
|
|
3
|
+
} from "../../chunk-XYBOQGDA.js";
|
|
4
4
|
import "../../chunk-QZEB4VMX.js";
|
|
5
5
|
import "../../chunk-WPBMAXXM.js";
|
|
6
|
-
import "../../chunk-
|
|
7
|
-
import "../../chunk-
|
|
6
|
+
import "../../chunk-MZCCGZH6.js";
|
|
7
|
+
import "../../chunk-W7JC55HV.js";
|
|
8
8
|
import {
|
|
9
9
|
LimitOptionsSchema,
|
|
10
10
|
OptionalGlobPatternArgsSchema
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
runKnowGrepCommand
|
|
3
|
-
} from "../../chunk-
|
|
3
|
+
} from "../../chunk-XYBOQGDA.js";
|
|
4
4
|
import "../../chunk-QZEB4VMX.js";
|
|
5
5
|
import "../../chunk-WPBMAXXM.js";
|
|
6
|
-
import "../../chunk-
|
|
7
|
-
import "../../chunk-
|
|
6
|
+
import "../../chunk-MZCCGZH6.js";
|
|
7
|
+
import "../../chunk-W7JC55HV.js";
|
|
8
8
|
import {
|
|
9
9
|
LimitOptionsSchema,
|
|
10
10
|
RequiredPatternArgsSchema
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
runKnowListCommand
|
|
3
|
-
} from "../../chunk-
|
|
3
|
+
} from "../../chunk-XYBOQGDA.js";
|
|
4
4
|
import "../../chunk-QZEB4VMX.js";
|
|
5
5
|
import "../../chunk-WPBMAXXM.js";
|
|
6
|
-
import "../../chunk-
|
|
7
|
-
import "../../chunk-
|
|
6
|
+
import "../../chunk-MZCCGZH6.js";
|
|
7
|
+
import "../../chunk-W7JC55HV.js";
|
|
8
8
|
import {
|
|
9
9
|
LimitOptionsSchema,
|
|
10
10
|
OptionalQueryArgsSchema
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
runKnowReadCommand
|
|
3
|
-
} from "../../chunk-
|
|
3
|
+
} from "../../chunk-XYBOQGDA.js";
|
|
4
4
|
import "../../chunk-QZEB4VMX.js";
|
|
5
5
|
import "../../chunk-WPBMAXXM.js";
|
|
6
|
-
import "../../chunk-
|
|
7
|
-
import "../../chunk-
|
|
6
|
+
import "../../chunk-MZCCGZH6.js";
|
|
7
|
+
import "../../chunk-W7JC55HV.js";
|
|
8
8
|
import {
|
|
9
9
|
JsonOutputOptionsSchema,
|
|
10
10
|
RequiredFilePathArgsSchema
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
runKnowSearchCommand
|
|
3
|
-
} from "../../chunk-
|
|
3
|
+
} from "../../chunk-XYBOQGDA.js";
|
|
4
4
|
import "../../chunk-QZEB4VMX.js";
|
|
5
5
|
import "../../chunk-WPBMAXXM.js";
|
|
6
|
-
import "../../chunk-
|
|
7
|
-
import "../../chunk-
|
|
6
|
+
import "../../chunk-MZCCGZH6.js";
|
|
7
|
+
import "../../chunk-W7JC55HV.js";
|
|
8
8
|
import {
|
|
9
9
|
LimitOptionsSchema,
|
|
10
10
|
RequiredQueryArgsSchema
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
runKnowStatusCommand
|
|
3
|
-
} from "../../chunk-
|
|
3
|
+
} from "../../chunk-XYBOQGDA.js";
|
|
4
4
|
import "../../chunk-QZEB4VMX.js";
|
|
5
5
|
import "../../chunk-WPBMAXXM.js";
|
|
6
|
-
import "../../chunk-
|
|
7
|
-
import "../../chunk-
|
|
6
|
+
import "../../chunk-MZCCGZH6.js";
|
|
7
|
+
import "../../chunk-W7JC55HV.js";
|
|
8
8
|
import {
|
|
9
9
|
JsonOutputOptionsSchema
|
|
10
10
|
} from "../../chunk-MLKBG5YJ.js";
|
package/dist/commands/login.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cngkit",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.10",
|
|
4
4
|
"description": "Opinionated Curly.ng CLI kit for Coderoom collaboration and website tooling.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
},
|
|
9
9
|
"files": [
|
|
10
10
|
"dist",
|
|
11
|
+
"scripts/*.sh",
|
|
11
12
|
"LICENSE",
|
|
12
13
|
"README.md"
|
|
13
14
|
],
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
set -euo pipefail
|
|
3
|
+
|
|
4
|
+
cd "$(dirname "${BASH_SOURCE[0]}")/.."
|
|
5
|
+
|
|
6
|
+
package_name="$(node -p "require('./package.json').name")"
|
|
7
|
+
package_version="$(node -p "require('./package.json').version")"
|
|
8
|
+
publish_log="$(mktemp)"
|
|
9
|
+
|
|
10
|
+
cleanup() {
|
|
11
|
+
rm -f "$publish_log"
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
wait_for_latest_version() {
|
|
15
|
+
for attempt in {1..10}; do
|
|
16
|
+
latest_version="$(npm view "${package_name}" version --json | tr -d '"')"
|
|
17
|
+
if [ "$latest_version" = "$package_version" ]; then
|
|
18
|
+
return 0
|
|
19
|
+
fi
|
|
20
|
+
|
|
21
|
+
echo "npm latest is ${latest_version}, waiting for ${package_version} (${attempt}/10)"
|
|
22
|
+
sleep 3
|
|
23
|
+
done
|
|
24
|
+
|
|
25
|
+
echo "npm latest is ${latest_version}, expected ${package_version}" >&2
|
|
26
|
+
return 1
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
trap cleanup EXIT
|
|
30
|
+
|
|
31
|
+
echo "Deploying ${package_name}@${package_version}"
|
|
32
|
+
|
|
33
|
+
pnpm run typecheck
|
|
34
|
+
pnpm run lint
|
|
35
|
+
pnpm run build
|
|
36
|
+
pnpm run smoke
|
|
37
|
+
npm pack --json --dry-run >/dev/null
|
|
38
|
+
|
|
39
|
+
if npm publish --access public 2>&1 | tee "$publish_log"; then
|
|
40
|
+
echo "Published ${package_name}@${package_version}"
|
|
41
|
+
elif grep -q "previously published versions" "$publish_log"; then
|
|
42
|
+
registry_version="$(npm view "${package_name}@${package_version}" version --json 2>/dev/null | tr -d '"')"
|
|
43
|
+
if [ "$registry_version" != "$package_version" ]; then
|
|
44
|
+
echo "Publish failed and registry does not have ${package_name}@${package_version}" >&2
|
|
45
|
+
exit 1
|
|
46
|
+
fi
|
|
47
|
+
echo "${package_name}@${package_version} is already present on npm; continuing with install verification"
|
|
48
|
+
else
|
|
49
|
+
echo "Publish failed" >&2
|
|
50
|
+
exit 1
|
|
51
|
+
fi
|
|
52
|
+
|
|
53
|
+
wait_for_latest_version
|
|
54
|
+
|
|
55
|
+
npm install -g "${package_name}@latest"
|
|
56
|
+
|
|
57
|
+
installed_version="$(cngkit --version)"
|
|
58
|
+
if [ "$installed_version" != "$package_version" ]; then
|
|
59
|
+
echo "Global cngkit is ${installed_version}, expected ${package_version}" >&2
|
|
60
|
+
exit 1
|
|
61
|
+
fi
|
|
62
|
+
|
|
63
|
+
npx --yes "${package_name}@latest" --version
|
|
64
|
+
|
|
65
|
+
echo "Deployed and installed ${package_name}@${package_version}"
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
set -euo pipefail
|
|
3
|
+
|
|
4
|
+
package_version="$(node -p 'require("./package.json").version')"
|
|
5
|
+
package_file="cngkit-${package_version}.tgz"
|
|
6
|
+
package_path="/tmp/${package_file}"
|
|
7
|
+
|
|
8
|
+
pnpm run build
|
|
9
|
+
npm pack --pack-destination /tmp
|
|
10
|
+
|
|
11
|
+
cleanup() {
|
|
12
|
+
rm -f "${package_path}"
|
|
13
|
+
}
|
|
14
|
+
trap cleanup EXIT
|
|
15
|
+
|
|
16
|
+
docker run --rm \
|
|
17
|
+
-v /tmp:/pkg \
|
|
18
|
+
node:22-alpine \
|
|
19
|
+
sh -lc "node --version && npm --version && npx --yes --package /pkg/${package_file} cngkit --version && npx --yes --package /pkg/${package_file} cngkit coderoom --api-base-url https://curly.ng --help"
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/shared/config.ts"],"sourcesContent":["import { randomBytes, randomUUID } from \"node:crypto\";\nimport process from \"node:process\";\n\nexport const packageVersion = \"1.1.9\";\nexport const defaultApiBaseUrl = \"https://curly.ng\";\n\nexport type GlobalCommandOptions = {\n apiBaseUrl?: string;\n};\n\nexport function resolveApiBaseUrl(options: GlobalCommandOptions): string {\n return options.apiBaseUrl ?? process.env.CNGKIT_API_BASE_URL ?? defaultApiBaseUrl;\n}\n\nexport function createRoomCode(): string {\n return randomBytes(4).toString(\"hex\").toUpperCase();\n}\n\nexport function createPeerId(): string {\n return randomUUID();\n}\n"],"mappings":";AAAA,SAAS,aAAa,kBAAkB;AACxC,OAAO,aAAa;AAEb,IAAM,iBAAiB;AACvB,IAAM,oBAAoB;AAM1B,SAAS,kBAAkB,SAAuC;AACvE,SAAO,QAAQ,cAAc,QAAQ,IAAI,uBAAuB;AAClE;AAEO,SAAS,iBAAyB;AACvC,SAAO,YAAY,CAAC,EAAE,SAAS,KAAK,EAAE,YAAY;AACpD;AAEO,SAAS,eAAuB;AACrC,SAAO,WAAW;AACpB;","names":[]}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|