@take-out/cli 0.6.22 → 0.7.0-1784497775575
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/README.md +3 -5
- package/dist/cjs/commands/docs.cjs +50 -176
- package/dist/cjs/commands/onboard.cjs +2 -2
- package/dist/cjs/commands/skills.cjs +3 -29
- package/dist/cjs/commands/sync.cjs +4 -15
- package/dist/esm/commands/docs.mjs +52 -177
- package/dist/esm/commands/docs.mjs.map +1 -1
- package/dist/esm/commands/onboard.mjs +2 -2
- package/dist/esm/commands/onboard.mjs.map +1 -1
- package/dist/esm/commands/skills.mjs +4 -29
- package/dist/esm/commands/skills.mjs.map +1 -1
- package/dist/esm/commands/sync.mjs +5 -15
- package/dist/esm/commands/sync.mjs.map +1 -1
- package/package.json +3 -4
- package/src/commands/docs.ts +53 -210
- package/src/commands/onboard.ts +2 -2
- package/src/commands/skills.ts +6 -34
- package/src/commands/sync.ts +6 -19
- package/types/commands/docs.d.ts +1 -1
- package/types/commands/docs.d.ts.map +1 -1
- package/types/commands/skills.d.ts.map +1 -1
- package/types/commands/sync.d.ts.map +1 -1
package/src/commands/sync.ts
CHANGED
|
@@ -5,8 +5,7 @@
|
|
|
5
5
|
import { execSync, spawn, spawnSync } from 'node:child_process'
|
|
6
6
|
import { existsSync, mkdtempSync, readFileSync, writeFileSync } from 'node:fs'
|
|
7
7
|
import { tmpdir } from 'node:os'
|
|
8
|
-
import {
|
|
9
|
-
import { fileURLToPath } from 'node:url'
|
|
8
|
+
import { join } from 'node:path'
|
|
10
9
|
|
|
11
10
|
import { defineCommand } from 'citty'
|
|
12
11
|
import pc from 'picocolors'
|
|
@@ -25,26 +24,14 @@ const UPSTREAM_REMOTE = 'takeout-upstream'
|
|
|
25
24
|
const TAKEOUT_FILE = '.takeout'
|
|
26
25
|
|
|
27
26
|
function getSyncPrompt(): string {
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
const currentDir = dirname(fileURLToPath(import.meta.url))
|
|
31
|
-
let monorepoRoot = currentDir
|
|
32
|
-
|
|
33
|
-
// go up directories until we find packages/docs/sync-prompt.md
|
|
34
|
-
while (monorepoRoot !== parse(monorepoRoot).root) {
|
|
35
|
-
const promptPath = join(monorepoRoot, 'packages', 'docs', 'sync-prompt.md')
|
|
36
|
-
if (existsSync(promptPath)) {
|
|
37
|
-
return readFileSync(promptPath, 'utf-8')
|
|
38
|
-
}
|
|
39
|
-
monorepoRoot = dirname(monorepoRoot)
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
throw new Error('Could not find sync-prompt.md in packages/docs')
|
|
43
|
-
} catch (error) {
|
|
27
|
+
const promptPath = join(process.cwd(), 'docs', 'upgrade.md')
|
|
28
|
+
if (!existsSync(promptPath)) {
|
|
44
29
|
throw new Error(
|
|
45
|
-
|
|
30
|
+
'Missing docs/upgrade.md. Copy it from https://github.com/tamagui/takeout2/blob/main/docs/upgrade.md and rerun `bun tko sync`.',
|
|
46
31
|
)
|
|
47
32
|
}
|
|
33
|
+
|
|
34
|
+
return readFileSync(promptPath, 'utf-8')
|
|
48
35
|
}
|
|
49
36
|
|
|
50
37
|
function checkToolAvailable(command: string): boolean {
|
package/types/commands/docs.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* docs command group - read the current repository's documentation
|
|
3
3
|
*/
|
|
4
4
|
export declare const docsCommand: import("citty").CommandDef<import("citty").ArgsDef>;
|
|
5
5
|
//# sourceMappingURL=docs.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"docs.d.ts","sourceRoot":"","sources":["../../src/commands/docs.ts"],"names":[],"mappings":"AAAA;;GAEG;
|
|
1
|
+
{"version":3,"file":"docs.d.ts","sourceRoot":"","sources":["../../src/commands/docs.ts"],"names":[],"mappings":"AAAA;;GAEG;AAuJH,eAAO,MAAM,WAAW,qDAUtB,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"skills.d.ts","sourceRoot":"","sources":["../../src/commands/skills.ts"],"names":[],"mappings":"AAAA;;GAEG;
|
|
1
|
+
{"version":3,"file":"skills.d.ts","sourceRoot":"","sources":["../../src/commands/skills.ts"],"names":[],"mappings":"AAAA;;GAEG;AA8QH,eAAO,MAAM,aAAa,qDAQxB,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sync.d.ts","sourceRoot":"","sources":["../../src/commands/sync.ts"],"names":[],"mappings":"AAAA;;GAEG;
|
|
1
|
+
{"version":3,"file":"sync.d.ts","sourceRoot":"","sources":["../../src/commands/sync.ts"],"names":[],"mappings":"AAAA;;GAEG;AAiFH,eAAO,MAAM,WAAW;;;;;;;;;;;EA2OtB,CAAA"}
|