@membranehq/cli 0.1.1

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 (80) hide show
  1. package/.turbo/turbo-build.log +9 -0
  2. package/CHANGELOG.md +7 -0
  3. package/README.md +54 -0
  4. package/dist/index.d.ts +1 -0
  5. package/dist/index.js +335 -0
  6. package/package.json +46 -0
  7. package/scripts/add-shebang.sh +6 -0
  8. package/scripts/prepare-package-json.ts +29 -0
  9. package/src/agent.tsx +50 -0
  10. package/src/cli.ts +72 -0
  11. package/src/commands/open.command.ts +51 -0
  12. package/src/commands/pull.command.ts +75 -0
  13. package/src/commands/push.command.ts +79 -0
  14. package/src/commands/test.command.ts +99 -0
  15. package/src/components/AddMcpServerScreen.tsx +215 -0
  16. package/src/components/AgentStatus.tsx +15 -0
  17. package/src/components/Main.tsx +64 -0
  18. package/src/components/OverviewSection.tsx +24 -0
  19. package/src/components/PersonalAccessTokenInput.tsx +56 -0
  20. package/src/components/RecentChanges.tsx +65 -0
  21. package/src/components/SelectWorkspace.tsx +112 -0
  22. package/src/components/Setup.tsx +121 -0
  23. package/src/components/WorkspaceStatus.tsx +61 -0
  24. package/src/contexts/FileWatcherContext.tsx +81 -0
  25. package/src/index.ts +27 -0
  26. package/src/legacy/commands/pullWorkspace.ts +70 -0
  27. package/src/legacy/commands/pushWorkspace.ts +246 -0
  28. package/src/legacy/integrationElements.ts +78 -0
  29. package/src/legacy/push/types.ts +17 -0
  30. package/src/legacy/reader/index.ts +113 -0
  31. package/src/legacy/types.ts +17 -0
  32. package/src/legacy/util.ts +149 -0
  33. package/src/legacy/workspace-elements/connectors.ts +397 -0
  34. package/src/legacy/workspace-elements/index.ts +27 -0
  35. package/src/legacy/workspace-tools/commands/pullWorkspace.ts +70 -0
  36. package/src/legacy/workspace-tools/integrationElements.ts +78 -0
  37. package/src/legacy/workspace-tools/util.ts +149 -0
  38. package/src/mcp/server-status.ts +27 -0
  39. package/src/mcp/server.ts +36 -0
  40. package/src/mcp/tools/getTestAccessToken.ts +32 -0
  41. package/src/modules/api/account-api-client.ts +89 -0
  42. package/src/modules/api/index.ts +3 -0
  43. package/src/modules/api/membrane-api-client.ts +116 -0
  44. package/src/modules/api/workspace-api-client.ts +11 -0
  45. package/src/modules/config/cwd-context.tsx +11 -0
  46. package/src/modules/config/project/getAgentVersion.ts +16 -0
  47. package/src/modules/config/project/index.ts +8 -0
  48. package/src/modules/config/project/paths.ts +25 -0
  49. package/src/modules/config/project/readProjectConfig.ts +27 -0
  50. package/src/modules/config/project/useProjectConfig.tsx +103 -0
  51. package/src/modules/config/system/index.ts +35 -0
  52. package/src/modules/file-watcher/index.ts +166 -0
  53. package/src/modules/file-watcher/types.ts +14 -0
  54. package/src/modules/setup/steps.ts +9 -0
  55. package/src/modules/setup/useSetup.ts +16 -0
  56. package/src/modules/status/useStatus.ts +16 -0
  57. package/src/modules/workspace-element-service/constants.ts +121 -0
  58. package/src/modules/workspace-element-service/getTypeAndKeyFromPath.ts +69 -0
  59. package/src/modules/workspace-element-service/index.ts +304 -0
  60. package/src/testing/environment.ts +172 -0
  61. package/src/testing/runners/base.runner.ts +27 -0
  62. package/src/testing/runners/test.runner.ts +123 -0
  63. package/src/testing/scripts/generate-test-report.ts +757 -0
  64. package/src/testing/test-suites/base.ts +92 -0
  65. package/src/testing/test-suites/data-collection.ts +128 -0
  66. package/src/testing/testers/base.ts +115 -0
  67. package/src/testing/testers/create.ts +273 -0
  68. package/src/testing/testers/delete.ts +155 -0
  69. package/src/testing/testers/find-by-id.ts +135 -0
  70. package/src/testing/testers/list.ts +110 -0
  71. package/src/testing/testers/match.ts +149 -0
  72. package/src/testing/testers/search.ts +148 -0
  73. package/src/testing/testers/spec.ts +30 -0
  74. package/src/testing/testers/update.ts +284 -0
  75. package/src/utils/auth.ts +19 -0
  76. package/src/utils/constants.ts +27 -0
  77. package/src/utils/fields.ts +83 -0
  78. package/src/utils/logger.ts +106 -0
  79. package/src/utils/templating.ts +50 -0
  80. package/tsconfig.json +21 -0
@@ -0,0 +1,9 @@
1
+
2
+ > @membranehq/cli@0.1.1 build
3
+ > pkgroll --clean-dist --minify && ./scripts/add-shebang.sh
4
+
5
+ Recommendation: "@types/js-yaml" is externalized because "js-yaml" is in "dependencies". Place "@types/js-yaml" in "dependencies" as well so users don't have missing types.
6
+ Recommendation: "@types/lodash" is externalized because "lodash" is in "dependencies". Place "@types/lodash" in "dependencies" as well so users don't have missing types.
7
+ Recommendation: "@types/react" is externalized because "react" is in "dependencies". Place "@types/react" in "dependencies" as well so users don't have missing types.
8
+ Generated an empty chunk: "index".
9
+ Circular dependency: src/modules/config/project/useProjectConfig.tsx -> src/modules/config/project/readProjectConfig.ts -> src/modules/config/project/useProjectConfig.tsx
package/CHANGELOG.md ADDED
@@ -0,0 +1,7 @@
1
+ # @membranehq/cli
2
+
3
+ ## 0.1.1
4
+
5
+ ### Patch Changes
6
+
7
+ - by @bratchenko - Initial release of the new CLI
package/README.md ADDED
@@ -0,0 +1,54 @@
1
+ # Membrane CLI
2
+
3
+ A command-line interface for working with Membrane in your local development environment.
4
+
5
+ ## Installation
6
+ ```bash
7
+ npm install -g @membranehq/cli
8
+ # or
9
+ yarn global add @membranehq/cli
10
+ # or
11
+ bun install -g @membranehq/cli
12
+ # or
13
+ pnpm install -g @membranehq/cli
14
+
15
+ ```
16
+
17
+ ## Quick Start
18
+
19
+ Run `membrane` in your project directory to go through the setup process and get started.
20
+
21
+ It will ask you to authenticate in the Membrane Console and select a remote workspace you want to work with.
22
+
23
+ It will create the `membrane.config.yml` file that will contain your workspace credentials.
24
+
25
+ ## Commands Reference
26
+ ```bash
27
+ # View membrane help
28
+ membrane --help
29
+ # View membrane <command> help
30
+ membrane <command> --help
31
+
32
+ # Check CLI version
33
+ membrane --version
34
+ ```
35
+
36
+ ## Configuration
37
+ The CLI uses a configuration file at `membrane.config.yml`:
38
+
39
+ ```yaml
40
+ workspaceKey: <your-workspace-key>
41
+ workspaceSecret: <your-workspace-secret>
42
+ apiUri: https://api.integration.app # Set it to work with a self-hosted version of Membrane
43
+ testCustomerId: test-customer # Internal id of the customer to be used for testing integrations.
44
+ ```
45
+
46
+ ## Version Control
47
+
48
+ `membrane.config.yml` contains secrets. You should exclude it from version control.
49
+
50
+ `membrane` folder can and should be stored in version control to keep your integration configurations versioned.
51
+
52
+ ## License
53
+
54
+ MIT
@@ -0,0 +1 @@
1
+ #!/usr/bin/env node