@positronic/cli 0.0.3 → 0.0.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.
Files changed (81) hide show
  1. package/dist/src/commands/helpers.js +57 -27
  2. package/dist/types/commands/helpers.d.ts.map +1 -1
  3. package/package.json +5 -1
  4. package/dist/src/commands/brain.test.js +0 -2936
  5. package/dist/src/commands/helpers.test.js +0 -832
  6. package/dist/src/commands/project.test.js +0 -1201
  7. package/dist/src/commands/resources.test.js +0 -2511
  8. package/dist/src/commands/schedule.test.js +0 -1235
  9. package/dist/src/commands/secret.test.d.js +0 -1
  10. package/dist/src/commands/secret.test.js +0 -761
  11. package/dist/src/commands/server.test.js +0 -1237
  12. package/dist/src/commands/test-utils.js +0 -737
  13. package/dist/src/components/secret-sync.js +0 -303
  14. package/dist/src/test/mock-api-client.js +0 -371
  15. package/dist/src/test/test-dev-server.js +0 -1376
  16. package/dist/types/commands/test-utils.d.ts +0 -45
  17. package/dist/types/commands/test-utils.d.ts.map +0 -1
  18. package/dist/types/components/secret-sync.d.ts +0 -9
  19. package/dist/types/components/secret-sync.d.ts.map +0 -1
  20. package/dist/types/test/mock-api-client.d.ts +0 -25
  21. package/dist/types/test/mock-api-client.d.ts.map +0 -1
  22. package/dist/types/test/test-dev-server.d.ts +0 -129
  23. package/dist/types/test/test-dev-server.d.ts.map +0 -1
  24. package/src/cli.ts +0 -997
  25. package/src/commands/backend.ts +0 -63
  26. package/src/commands/brain.test.ts +0 -1004
  27. package/src/commands/brain.ts +0 -215
  28. package/src/commands/helpers.test.ts +0 -487
  29. package/src/commands/helpers.ts +0 -870
  30. package/src/commands/project-config-manager.ts +0 -152
  31. package/src/commands/project.test.ts +0 -502
  32. package/src/commands/project.ts +0 -109
  33. package/src/commands/resources.test.ts +0 -1052
  34. package/src/commands/resources.ts +0 -97
  35. package/src/commands/schedule.test.ts +0 -481
  36. package/src/commands/schedule.ts +0 -65
  37. package/src/commands/secret.test.ts +0 -210
  38. package/src/commands/secret.ts +0 -50
  39. package/src/commands/server.test.ts +0 -493
  40. package/src/commands/server.ts +0 -353
  41. package/src/commands/test-utils.ts +0 -324
  42. package/src/components/brain-history.tsx +0 -198
  43. package/src/components/brain-list.tsx +0 -105
  44. package/src/components/brain-rerun.tsx +0 -111
  45. package/src/components/brain-show.tsx +0 -92
  46. package/src/components/error.tsx +0 -24
  47. package/src/components/project-add.tsx +0 -59
  48. package/src/components/project-create.tsx +0 -83
  49. package/src/components/project-list.tsx +0 -83
  50. package/src/components/project-remove.tsx +0 -55
  51. package/src/components/project-select.tsx +0 -200
  52. package/src/components/project-show.tsx +0 -58
  53. package/src/components/resource-clear.tsx +0 -127
  54. package/src/components/resource-delete.tsx +0 -160
  55. package/src/components/resource-list.tsx +0 -177
  56. package/src/components/resource-sync.tsx +0 -170
  57. package/src/components/resource-types.tsx +0 -55
  58. package/src/components/resource-upload.tsx +0 -182
  59. package/src/components/schedule-create.tsx +0 -90
  60. package/src/components/schedule-delete.tsx +0 -116
  61. package/src/components/schedule-list.tsx +0 -186
  62. package/src/components/schedule-runs.tsx +0 -151
  63. package/src/components/secret-bulk.tsx +0 -79
  64. package/src/components/secret-create.tsx +0 -49
  65. package/src/components/secret-delete.tsx +0 -41
  66. package/src/components/secret-list.tsx +0 -41
  67. package/src/components/watch.tsx +0 -155
  68. package/src/hooks/useApi.ts +0 -183
  69. package/src/positronic.ts +0 -40
  70. package/src/test/data/resources/config.json +0 -1
  71. package/src/test/data/resources/data/config.json +0 -1
  72. package/src/test/data/resources/data/logo.png +0 -2
  73. package/src/test/data/resources/docs/api.md +0 -3
  74. package/src/test/data/resources/docs/readme.md +0 -3
  75. package/src/test/data/resources/example.md +0 -3
  76. package/src/test/data/resources/file with spaces.txt +0 -1
  77. package/src/test/data/resources/readme.md +0 -3
  78. package/src/test/data/resources/test.txt +0 -1
  79. package/src/test/mock-api-client.ts +0 -145
  80. package/src/test/test-dev-server.ts +0 -1003
  81. package/tsconfig.json +0 -11
@@ -1,109 +0,0 @@
1
- import type { ArgumentsCamelCase } from 'yargs';
2
- import React from 'react';
3
- import { ProjectAdd } from '../components/project-add.js';
4
- import { ProjectList } from '../components/project-list.js';
5
- import { ProjectSelect } from '../components/project-select.js';
6
- import { ProjectShow } from '../components/project-show.js';
7
- import { ProjectCreate } from '../components/project-create.js';
8
- import { ProjectRemove } from '../components/project-remove.js';
9
-
10
- // Re-export types from project-config-manager for backward compatibility
11
- export type { Project, ProjectConfig } from './project-config-manager.js';
12
- // Import and re-export the class
13
- import { ProjectConfigManager } from './project-config-manager.js';
14
- export { ProjectConfigManager };
15
-
16
- // Original ProjectCommand arguments
17
- interface AddProjectArgs {
18
- name: string;
19
- url: string;
20
- }
21
-
22
- interface SelectProjectArgs {
23
- name?: string; // Optional because it can be interactive
24
- }
25
-
26
- interface CreateProjectArgs {
27
- name: string;
28
- }
29
-
30
- interface RemoveProjectArgs {
31
- name: string;
32
- }
33
-
34
- export class ProjectCommand {
35
- private projectConfig: ProjectConfigManager;
36
-
37
- constructor() {
38
- // Instantiate ProjectConfigManager with default home directory
39
- this.projectConfig = new ProjectConfigManager();
40
- }
41
-
42
- /**
43
- * Handles the 'positronic project add <name> --url <url>' command.
44
- * Adds a project configuration to the global store.
45
- */
46
- add({ name, url }: ArgumentsCamelCase<AddProjectArgs>): React.ReactElement {
47
- return React.createElement(ProjectAdd, {
48
- name,
49
- url,
50
- projectConfig: this.projectConfig,
51
- });
52
- }
53
-
54
- /**
55
- * Handles the 'positronic project list' command.
56
- * Lists configured remote projects (Global Mode) or shows current local project path (Local Dev Mode).
57
- */
58
- list(): React.ReactElement {
59
- return React.createElement(ProjectList, {
60
- projectConfig: this.projectConfig,
61
- });
62
- }
63
-
64
- /**
65
- * Handles the 'positronic project select [name]' command.
66
- * Selects the active remote project for subsequent commands.
67
- * Only available in Global Mode.
68
- */
69
- select({ name }: ArgumentsCamelCase<SelectProjectArgs>): React.ReactElement {
70
- return React.createElement(ProjectSelect, {
71
- name,
72
- projectConfig: this.projectConfig,
73
- });
74
- }
75
-
76
- /**
77
- * Handles the 'positronic project show' command.
78
- * Shows details of the active project (remote in Global Mode, local in Local Dev Mode).
79
- */
80
- show(): React.ReactElement {
81
- return React.createElement(ProjectShow, {
82
- projectConfig: this.projectConfig,
83
- });
84
- }
85
-
86
- /**
87
- * Handles the 'positronic project rm <name>' command.
88
- * Removes a project configuration from the global store.
89
- */
90
- remove({ name }: ArgumentsCamelCase<RemoveProjectArgs>): React.ReactElement {
91
- return React.createElement(ProjectRemove, {
92
- name,
93
- projectConfig: this.projectConfig,
94
- });
95
- }
96
-
97
- /**
98
- * Handles the 'positronic new <project-name>' command.
99
- * Creates a new project directory structure and populates it with template files.
100
- * Also sets up the .positronic server environment.
101
- */
102
- create({
103
- name: projectPathArg,
104
- }: ArgumentsCamelCase<CreateProjectArgs>): React.ReactElement {
105
- return React.createElement(ProjectCreate, {
106
- projectPathArg,
107
- });
108
- }
109
- }