tapflow 0.1.0 → 0.2.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/bin/postinstall.js +37 -0
- package/bin/tapflow.js +36 -1
- package/dist/index.js +6 -1
- package/dist/index.js.map +1 -1
- package/package.json +7 -6
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { readFileSync } from 'fs'
|
|
3
|
+
import { fileURLToPath } from 'url'
|
|
4
|
+
import { dirname, join } from 'path'
|
|
5
|
+
|
|
6
|
+
try {
|
|
7
|
+
if (!process.stdout.isTTY) process.exit(0)
|
|
8
|
+
if (process.env.CI) process.exit(0)
|
|
9
|
+
if (process.env.npm_config_global !== 'true') process.exit(0)
|
|
10
|
+
|
|
11
|
+
const __dirname = dirname(fileURLToPath(import.meta.url))
|
|
12
|
+
const { version } = JSON.parse(readFileSync(join(__dirname, '..', 'package.json'), 'utf-8'))
|
|
13
|
+
|
|
14
|
+
const R = '\x1b[0m'
|
|
15
|
+
const BOLD = '\x1b[1m'
|
|
16
|
+
const DIM = '\x1b[2m'
|
|
17
|
+
const GREEN = '\x1b[32m'
|
|
18
|
+
|
|
19
|
+
const title = `tapflow v${version} installed successfully`
|
|
20
|
+
const width = Math.max(title.length + 5, 50)
|
|
21
|
+
const bar = '─'.repeat(width)
|
|
22
|
+
|
|
23
|
+
console.log()
|
|
24
|
+
console.log(`${GREEN}${BOLD} ┌${bar}┐${R}`)
|
|
25
|
+
console.log(`${GREEN}${BOLD} │ ✓ ${title.padEnd(width - 5)}│${R}`)
|
|
26
|
+
console.log(`${GREEN}${BOLD} └${bar}┘${R}`)
|
|
27
|
+
console.log()
|
|
28
|
+
console.log(`${DIM} Next steps:${R}`)
|
|
29
|
+
console.log(`${DIM} tapflow doctor check system prerequisites${R}`)
|
|
30
|
+
console.log(`${DIM} tapflow init create your first admin account${R}`)
|
|
31
|
+
console.log(`${DIM} tapflow start start relay + agent${R}`)
|
|
32
|
+
console.log()
|
|
33
|
+
console.log(`${DIM} Docs: https://github.com/jo-duchan/tapflow${R}`)
|
|
34
|
+
console.log()
|
|
35
|
+
} catch {
|
|
36
|
+
process.exit(0)
|
|
37
|
+
}
|
package/bin/tapflow.js
CHANGED
|
@@ -1,2 +1,37 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import '
|
|
2
|
+
import { readFileSync } from 'fs'
|
|
3
|
+
import { fileURLToPath } from 'url'
|
|
4
|
+
import { dirname, join } from 'path'
|
|
5
|
+
|
|
6
|
+
const __dirname = dirname(fileURLToPath(import.meta.url))
|
|
7
|
+
const { version } = JSON.parse(readFileSync(join(__dirname, '..', 'package.json'), 'utf-8'))
|
|
8
|
+
|
|
9
|
+
if (process.argv.slice(2).length === 0) {
|
|
10
|
+
const R = '\x1b[0m'
|
|
11
|
+
const BOLD = '\x1b[1m'
|
|
12
|
+
const DIM = '\x1b[2m'
|
|
13
|
+
const GREEN = '\x1b[32m'
|
|
14
|
+
|
|
15
|
+
const title = `TAPFLOW v${version}`
|
|
16
|
+
const width = Math.max(title.length + 5, 50)
|
|
17
|
+
const bar = '─'.repeat(width)
|
|
18
|
+
|
|
19
|
+
console.log()
|
|
20
|
+
console.log(`${GREEN}${BOLD} ┌${bar}┐${R}`)
|
|
21
|
+
console.log(`${GREEN}${BOLD} │ ✓ ${title.padEnd(width - 5)}│${R}`)
|
|
22
|
+
console.log(`${GREEN}${BOLD} └${bar}┘${R}`)
|
|
23
|
+
console.log()
|
|
24
|
+
console.log(`${DIM} Self-hosted iOS/Android simulator streaming for QA teams.${R}`)
|
|
25
|
+
console.log()
|
|
26
|
+
console.log(`${DIM} Commands:${R}`)
|
|
27
|
+
console.log(`${DIM} tapflow doctor check system prerequisites${R}`)
|
|
28
|
+
console.log(`${DIM} tapflow init create your first admin account${R}`)
|
|
29
|
+
console.log(`${DIM} tapflow start start relay + agent locally${R}`)
|
|
30
|
+
console.log(`${DIM} tapflow --help show all commands${R}`)
|
|
31
|
+
console.log()
|
|
32
|
+
console.log(`${DIM} Docs: https://github.com/jo-duchan/tapflow${R}`)
|
|
33
|
+
console.log()
|
|
34
|
+
process.exit(0)
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
await import('../dist/index.js')
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,9 @@
|
|
|
1
|
+
import { readFileSync } from 'fs';
|
|
2
|
+
import { fileURLToPath } from 'url';
|
|
3
|
+
import { dirname, join } from 'path';
|
|
1
4
|
import { cac } from 'cac';
|
|
5
|
+
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
6
|
+
const { version } = JSON.parse(readFileSync(join(__dirname, '..', 'package.json'), 'utf-8'));
|
|
2
7
|
import { cmdInit } from './commands/init.js';
|
|
3
8
|
import { cmdDoctor } from './commands/doctor.js';
|
|
4
9
|
import { cmdDevices } from './commands/devices.js';
|
|
@@ -65,6 +70,6 @@ cli
|
|
|
65
70
|
.option('--lines <n>', 'Number of lines to show (default: 100)', { default: 100 })
|
|
66
71
|
.action((opts) => cmdLogs(opts));
|
|
67
72
|
cli.help();
|
|
68
|
-
cli.version(
|
|
73
|
+
cli.version(version);
|
|
69
74
|
cli.parse();
|
|
70
75
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAA;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,IAAI,CAAA;AACjC,OAAO,EAAE,aAAa,EAAE,MAAM,KAAK,CAAA;AACnC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAA;AACpC,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAA;AAEzB,MAAM,SAA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CAAC,CAAC,UAAkB,EAAE,IAA+E,EAAE,EAAE;IAC9G,IAAI,UAAU,KAAK,OAAO;QAAE,OAAO,aAAa,CAAC,IAAI,CAAC,CAAA;IACtD,OAAO,CAAC,KAAK,CAAC,6BAA6B,UAAU,EAAE,CAAC,CAAA;IACxD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;AACjB,CAAC,CAAC,CAAA;AAEJ,GAAG;KACA,OAAO,CAAC,OAAO,EAAE,0BAA0B,CAAC;KAC5C,MAAM,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE,CAAC,CAAA;AAE3B,GAAG;KACA,OAAO,CAAC,QAAQ,EAAE,qDAAqD,CAAC;KACxE,MAAM,CAAC,eAAe,EAAE,0CAA0C,CAAC;KACnE,MAAM,CAAC,CAAC,IAAwB,EAAE,EAAE,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAA;AAExD,GAAG;KACA,OAAO,CAAC,MAAM,EAAE,+BAA+B,CAAC;KAChD,MAAM,CAAC,eAAe,EAAE,4CAA4C,CAAC;KACrE,MAAM,CAAC,aAAa,EAAE,wCAAwC,EAAE,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC;KACjF,MAAM,CAAC,CAAC,IAAwC,EAAE,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAA;AAEtE,GAAG,CAAC,IAAI,EAAE,CAAA;AACV,GAAG,CAAC,OAAO,CAAC,OAAO,CAAC,CAAA;AACpB,GAAG,CAAC,KAAK,EAAE,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tapflow",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"description": "Self-hosted iOS/Android simulator streaming for QA teams",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ios",
|
|
@@ -46,10 +46,10 @@
|
|
|
46
46
|
"cac": "^6.7.14",
|
|
47
47
|
"ws": "^8.0.0",
|
|
48
48
|
"zod": "^4.4.3",
|
|
49
|
-
"@tapflowio/agent-core": "0.
|
|
50
|
-
"@tapflowio/android-agent": "0.
|
|
51
|
-
"@tapflowio/ios-agent": "0.
|
|
52
|
-
"@tapflowio/relay": "0.
|
|
49
|
+
"@tapflowio/agent-core": "0.2.0",
|
|
50
|
+
"@tapflowio/android-agent": "0.2.0",
|
|
51
|
+
"@tapflowio/ios-agent": "0.2.0",
|
|
52
|
+
"@tapflowio/relay": "0.2.0"
|
|
53
53
|
},
|
|
54
54
|
"devDependencies": {
|
|
55
55
|
"@types/node": "^20.0.0",
|
|
@@ -63,6 +63,7 @@
|
|
|
63
63
|
"typecheck": "tsc --noEmit",
|
|
64
64
|
"dev": "tsx src/index.ts",
|
|
65
65
|
"test": "vitest run",
|
|
66
|
-
"lint": "eslint src"
|
|
66
|
+
"lint": "eslint src",
|
|
67
|
+
"postinstall": "node bin/postinstall.js"
|
|
67
68
|
}
|
|
68
69
|
}
|