@nzz/q-cli 2.2.1 → 2.2.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.
|
@@ -32,26 +32,23 @@ function newCustomCode(command) {
|
|
|
32
32
|
// Initialize git repository to pull the skeletons/custom-code-project content into a separate directory
|
|
33
33
|
console.log('Initializing git repository...');
|
|
34
34
|
execSync('git init');
|
|
35
|
-
execSync('git remote add origin
|
|
35
|
+
execSync('git remote add origin git@github.com:nzz-pt/Q.git');
|
|
36
36
|
// Enable sparse checkout and pull the content from remote
|
|
37
37
|
console.log(`Sparse checkout ${skeletonCustomCodeDir}...`);
|
|
38
38
|
execSync('git sparse-checkout init --cone');
|
|
39
39
|
execSync(`git sparse-checkout set ${skeletonCustomCodeDir}`);
|
|
40
40
|
console.log('Pulling content from remote...');
|
|
41
41
|
execSync('git pull origin main');
|
|
42
|
-
// Remove all files, except the skeletons directory
|
|
42
|
+
// Remove all files, except the skeletons directory.
|
|
43
|
+
// Use rmSync (not stat+unlink): cone sparse-checkout also pulls monorepo root
|
|
44
|
+
// files, including CLAUDE.md → AGENTS.md. Deleting AGENTS.md first would make
|
|
45
|
+
// CLAUDE.md a dangling symlink; statSync follows it and throws ENOENT.
|
|
43
46
|
console.log('Cleaning up...');
|
|
44
47
|
const cwdFiles = fs.readdirSync(process.cwd());
|
|
45
48
|
for (const file of cwdFiles) {
|
|
46
49
|
if (file === skeletonDir)
|
|
47
50
|
continue; // Skip the skeletons directory
|
|
48
|
-
|
|
49
|
-
if (fs.statSync(filePath).isDirectory()) {
|
|
50
|
-
fs.rmSync(filePath, { recursive: true, force: true });
|
|
51
|
-
}
|
|
52
|
-
else {
|
|
53
|
-
fs.unlinkSync(filePath);
|
|
54
|
-
}
|
|
51
|
+
fs.rmSync(path.join(process.cwd(), file), { recursive: true, force: true });
|
|
55
52
|
}
|
|
56
53
|
// Copy the skeletons/custom-code-project content to the root
|
|
57
54
|
const cwdSkeletonCustomCodeDir = path.join(process.cwd(), skeletonCustomCodeDir);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nzz/q-cli",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.5",
|
|
4
4
|
"description": "",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./src/index.ts",
|
|
@@ -15,30 +15,31 @@
|
|
|
15
15
|
"copy-assets": "cp -R src/assets dist/",
|
|
16
16
|
"create-custom-code-item": "tsx ./src/index.ts create-custom-code-item -e local -c ./tests/q.config.json -t 'TEST CUSTOM CODE ITEM'",
|
|
17
17
|
"update-item": "tsx ./src/index.ts update-item -e local -c ./tests/q.config.json",
|
|
18
|
-
"new-custom-code": "tsx ./src/index.ts new-custom-code
|
|
18
|
+
"new-custom-code": "tsx ./src/index.ts new-custom-code my-custom-code-project",
|
|
19
19
|
"test": "vitest",
|
|
20
20
|
"test:run": "vitest run",
|
|
21
21
|
"test:coverage": "vitest run --coverage",
|
|
22
|
-
"eslint": "TIMING=1 eslint
|
|
22
|
+
"eslint": "TIMING=1 eslint .",
|
|
23
23
|
"lint:all": "run-s -c tscheck lint svelte-check",
|
|
24
24
|
"tscheck": "tsc --noEmit"
|
|
25
25
|
},
|
|
26
26
|
"author": "",
|
|
27
27
|
"license": "MIT",
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@1password/op-js": "
|
|
29
|
+
"@1password/op-js": "catalog:",
|
|
30
30
|
"ajv": "^8.17.1",
|
|
31
31
|
"commander": "^13.1.0",
|
|
32
|
-
"form-data": "
|
|
32
|
+
"form-data": "catalog:",
|
|
33
33
|
"node-fetch": "^3.3.2"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
36
|
"@repo/types-custom-code": "workspace:^",
|
|
37
37
|
"@repo/types-db": "workspace:^",
|
|
38
38
|
"@repo/types-files": "workspace:^",
|
|
39
|
-
"@vitest/coverage-v8": "
|
|
39
|
+
"@vitest/coverage-v8": "catalog:",
|
|
40
40
|
"delivery-server": "workspace:*",
|
|
41
|
-
"
|
|
42
|
-
"
|
|
41
|
+
"eslint-config-custom": "workspace:*",
|
|
42
|
+
"typescript": "catalog:",
|
|
43
|
+
"vitest": "catalog:"
|
|
43
44
|
}
|
|
44
45
|
}
|