@jackwener/opencli 1.7.9 → 1.7.11

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.
Files changed (43) hide show
  1. package/README.md +3 -3
  2. package/README.zh-CN.md +3 -3
  3. package/cli-manifest.json +60 -1
  4. package/clis/instagram/collection-create.js +57 -0
  5. package/clis/instagram/collection-delete.js +91 -0
  6. package/clis/instagram/saved.js +21 -7
  7. package/dist/src/adapter-shadow.d.ts +11 -0
  8. package/dist/src/adapter-shadow.js +72 -0
  9. package/dist/src/adapter-shadow.test.d.ts +1 -0
  10. package/dist/src/adapter-shadow.test.js +49 -0
  11. package/dist/src/browser/base-page.d.ts +6 -2
  12. package/dist/src/browser/base-page.js +88 -6
  13. package/dist/src/browser/base-page.test.js +61 -1
  14. package/dist/src/browser/bridge.d.ts +0 -2
  15. package/dist/src/browser/bridge.js +4 -32
  16. package/dist/src/browser/cdp.js +48 -0
  17. package/dist/src/browser/cdp.test.js +23 -0
  18. package/dist/src/browser/daemon-lifecycle.d.ts +23 -0
  19. package/dist/src/browser/daemon-lifecycle.js +67 -0
  20. package/dist/src/browser/daemon-version.d.ts +4 -0
  21. package/dist/src/browser/daemon-version.js +12 -0
  22. package/dist/src/browser/dom-helpers.d.ts +1 -1
  23. package/dist/src/browser/dom-helpers.js +15 -3
  24. package/dist/src/browser/page.js +1 -1
  25. package/dist/src/browser/target-resolver.d.ts +8 -0
  26. package/dist/src/browser/target-resolver.js +75 -0
  27. package/dist/src/browser/verify-fixture.d.ts +1 -0
  28. package/dist/src/browser/verify-fixture.js +18 -0
  29. package/dist/src/browser/verify-fixture.test.js +16 -1
  30. package/dist/src/build-manifest.d.ts +68 -33
  31. package/dist/src/build-manifest.js +175 -29
  32. package/dist/src/build-manifest.test.js +75 -1
  33. package/dist/src/cli.js +25 -10
  34. package/dist/src/cli.test.js +153 -1
  35. package/dist/src/commands/daemon.d.ts +2 -0
  36. package/dist/src/commands/daemon.js +36 -1
  37. package/dist/src/commands/daemon.test.js +103 -2
  38. package/dist/src/doctor.d.ts +3 -0
  39. package/dist/src/doctor.js +27 -20
  40. package/dist/src/doctor.test.js +71 -1
  41. package/dist/src/manifest-types.d.ts +39 -0
  42. package/dist/src/manifest-types.js +9 -0
  43. package/package.json +2 -2
@@ -0,0 +1,39 @@
1
+ /**
2
+ * Shared manifest types — kept in their own module so both runtime code
3
+ * (discovery.ts) and the build-time compiler (build-manifest.ts) can
4
+ * import them without pulling each other in. This is what lets us
5
+ * exclude `src/build-manifest.ts` from `tsc`'s emit set: the only thing
6
+ * runtime code needs from build-manifest is the `ManifestEntry` type,
7
+ * and that lives here.
8
+ */
9
+ export interface ManifestEntry {
10
+ site: string;
11
+ name: string;
12
+ aliases?: string[];
13
+ description: string;
14
+ domain?: string;
15
+ strategy: string;
16
+ browser: boolean;
17
+ args: Array<{
18
+ name: string;
19
+ type?: string;
20
+ default?: unknown;
21
+ required?: boolean;
22
+ valueRequired?: boolean;
23
+ positional?: boolean;
24
+ help?: string;
25
+ choices?: string[];
26
+ }>;
27
+ columns?: string[];
28
+ pipeline?: Record<string, unknown>[];
29
+ timeout?: number;
30
+ deprecated?: boolean | string;
31
+ replacedBy?: string;
32
+ type: 'js';
33
+ /** Relative path from clis/ dir, e.g. 'bilibili/search.js' */
34
+ modulePath?: string;
35
+ /** Relative path to the source file from clis/ dir (e.g. 'site/cmd.js') */
36
+ sourceFile?: string;
37
+ /** Pre-navigation control — see CliCommand.navigateBefore */
38
+ navigateBefore?: boolean | string;
39
+ }
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Shared manifest types — kept in their own module so both runtime code
3
+ * (discovery.ts) and the build-time compiler (build-manifest.ts) can
4
+ * import them without pulling each other in. This is what lets us
5
+ * exclude `src/build-manifest.ts` from `tsc`'s emit set: the only thing
6
+ * runtime code needs from build-manifest is the `ManifestEntry` type,
7
+ * and that lives here.
8
+ */
9
+ export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jackwener/opencli",
3
- "version": "1.7.9",
3
+ "version": "1.7.11",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -42,7 +42,7 @@
42
42
  "dev": "tsx src/main.ts",
43
43
  "dev:bun": "bun src/main.ts",
44
44
  "build": "npm run clean-dist && tsc && npm run copy-yaml && npm run build-manifest",
45
- "build-manifest": "node dist/src/build-manifest.js",
45
+ "build-manifest": "tsx src/build-manifest.ts",
46
46
  "clean-dist": "node scripts/clean-dist.cjs",
47
47
  "copy-yaml": "node scripts/copy-yaml.cjs",
48
48
  "start": "node dist/src/main.js",