@mochabug/adaptkit 0.1.0-alpha.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.
package/LICENSE.txt ADDED
@@ -0,0 +1,12 @@
1
+ Copyright (c) 2023 mochabug AB. All rights reserved.
2
+
3
+
4
+ Licensed under the Apache License, Version 2.0 (the "License"); you may not use
5
+ this file except in compliance with the License. You may obtain a copy of the
6
+ License at http://www.apache.org/licenses/LICENSE-2.0
7
+ THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
8
+ KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
9
+ WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
10
+ MERCHANTABLITY OR NON-INFRINGEMENT.
11
+ See the Apache Version 2.0 License for specific language governing permissions
12
+ and limitations under the License.
package/README.md ADDED
@@ -0,0 +1,74 @@
1
+ # @mochabug/adaptkit 🍄: The Magical CLI for Mochabug Adapt Plugin Development!
2
+
3
+ Welcome to **@mochabug/adaptkit**! 🍄 Prepare to embark on a whimsical adventure filled with creativity and efficiency! @mochabug/adaptkit is a powerful CLI tool designed to help you *effortlessly* develop and manage plugins for the Mochabug Adapt platform. With @mochabug/adaptkit, you can:
4
+
5
+ - 🌈 Create enchanting template projects for plugin development
6
+ - 🧙‍♂️ Emulate your plugins in a cloud environment with just a flick of your wand
7
+ - 🧚 Add and modify vertices to your plugin project with ease
8
+ - 🌟 Automagically handle tedious tasks that often bog down software development
9
+
10
+ ## Magical Vertices: Your Plugin Building Blocks 🔮
11
+
12
+ Vertices, also known as tasks, are the building blocks of your plugins. Each plugin consists of one or more vertices. A vertex in @mochabug/adaptkit consists of two parts: an Executor and an optional Configurator.
13
+
14
+ - **Executor**: A mandatory part that performs tasks. It can have different types:
15
+ - **Action**: Performs tasks without interacting with external systems
16
+ - **Cron Trigger**: Triggers actions at specified intervals, like clockwork
17
+ - **External Trigger**: Activates tasks from an external endpoint, bringing the magic to the outside world
18
+ - **Browser**: Runs tasks within a browser, where requests end up on the external endpoint
19
+
20
+ - **Configurator**: An optional part that customizes the behavior of the executor. Configurators interact with users on the Mochabug Adapt platform, making them "external" by nature.
21
+
22
+ ## Getting Started 🚀
23
+
24
+ To start your magical journey with @mochabug/adaptkit, install the package using the following incantation:
25
+
26
+ ```bash
27
+ npm install -g @mochabug/adaptkit
28
+ ```
29
+
30
+ ## Usage 🪄
31
+
32
+ With @mochabug/adaptkit installed, you can now wield your newfound powers to develop and manage your plugin projects! Here's a guide to help you harness the magic:
33
+
34
+ 1. **Create a template project for plugin development**
35
+
36
+ ```bash
37
+ adaptkit --init
38
+ ```
39
+
40
+ This command generates a `manifest.json` file, Executor and Configurator templates, and .cue schema files with information about your plugin.
41
+
42
+ 2. **Emulate your plugins in the cloud environment**
43
+
44
+ ```bash
45
+ adaptkit --emulate
46
+ ```
47
+
48
+ Test your plugin's sorcery in a controlled environment by emulating its behavior in the cloud.
49
+
50
+ 3. **Add and modify vertices**
51
+
52
+ ```bash
53
+ adaptkit --add-vertex [vertexType] [vertexName]
54
+ ```
55
+
56
+ Easily add or modify vertices to your plugin project by specifying the vertex type and name.
57
+
58
+ 4. **Publish your plugin to the Mochabug Adapt platform**
59
+
60
+ ```bash
61
+ adaptkit --publish
62
+ ```
63
+
64
+ Share your magical creation with the world by publishing your plugin to the Mochabug Adapt platform.
65
+
66
+ ## Documentation 📚
67
+
68
+ For a more comprehensive spellbook on how to use @mochabug/adaptkit and unlock the full potential of our captivating plugin system for Mochabug Adapt, visit our [documentation](https://adaptkit-docs.example.com).
69
+
70
+ ## Contribute 🤝
71
+
72
+ Svampinizer is a collaborative, open-source project, and we welcome your contributions! If you have an idea for a feature, a bug report, or would like to help with documentation, please [open an issue](https://github.com/mochabug/adaptkit/issues) or [submit a pull request](https://github.com/mochabug/svampinizer/pulls).
73
+
74
+ ## A Magical Journey Awaits! 🍄
@@ -0,0 +1,46 @@
1
+ import type { RpcTransport } from "@protobuf-ts/runtime-rpc";
2
+ import type { ServiceInfo } from "@protobuf-ts/runtime-rpc";
3
+ import type { UploadPluginResponse } from "./plugins";
4
+ import type { UploadPluginRequest } from "./plugins";
5
+ import type { ClientStreamingCall } from "@protobuf-ts/runtime-rpc";
6
+ import type { RpcOptions } from "@protobuf-ts/runtime-rpc";
7
+ /**
8
+ * PluginService provides a service for uploading a plugin.
9
+ *
10
+ * @generated from protobuf service adapt.apis.plugins.v1.PluginService
11
+ */
12
+ export interface IPluginServiceClient {
13
+ /**
14
+ * UploadPlugin is a streaming RPC method that allows uploading a plugin in
15
+ * chunks. The client can send multiple UploadPluginRequest messages, and the
16
+ * server will respond with a single UploadPluginResponse after processing all
17
+ * requests.
18
+ *
19
+ * @generated from protobuf rpc: UploadPlugin(stream adapt.apis.plugins.v1.UploadPluginRequest) returns (adapt.apis.plugins.v1.UploadPluginResponse);
20
+ */
21
+ uploadPlugin(options?: RpcOptions): ClientStreamingCall<UploadPluginRequest, UploadPluginResponse>;
22
+ }
23
+ /**
24
+ * PluginService provides a service for uploading a plugin.
25
+ *
26
+ * @generated from protobuf service adapt.apis.plugins.v1.PluginService
27
+ */
28
+ export declare class PluginServiceClient implements IPluginServiceClient, ServiceInfo {
29
+ private readonly _transport;
30
+ typeName: string;
31
+ methods: import("@protobuf-ts/runtime-rpc").MethodInfo<any, any>[];
32
+ options: {
33
+ [extensionName: string]: import("@protobuf-ts/runtime").JsonValue;
34
+ };
35
+ constructor(_transport: RpcTransport);
36
+ /**
37
+ * UploadPlugin is a streaming RPC method that allows uploading a plugin in
38
+ * chunks. The client can send multiple UploadPluginRequest messages, and the
39
+ * server will respond with a single UploadPluginResponse after processing all
40
+ * requests.
41
+ *
42
+ * @generated from protobuf rpc: UploadPlugin(stream adapt.apis.plugins.v1.UploadPluginRequest) returns (adapt.apis.plugins.v1.UploadPluginResponse);
43
+ */
44
+ uploadPlugin(options?: RpcOptions): ClientStreamingCall<UploadPluginRequest, UploadPluginResponse>;
45
+ }
46
+ //# sourceMappingURL=plugins.client.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plugins.client.d.ts","sourceRoot":"","sources":["../../../../../../src/gen/adapt/apis/plugins/v1/plugins.client.ts"],"names":[],"mappings":"AAkBA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAC7D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAG5D,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,WAAW,CAAC;AACtD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,WAAW,CAAC;AACrD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AACpE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAC3D;;;;GAIG;AACH,MAAM,WAAW,oBAAoB;IACjC;;;;;;;OAOG;IACH,YAAY,CAAC,OAAO,CAAC,EAAE,UAAU,GAAG,mBAAmB,CAAC,mBAAmB,EAAE,oBAAoB,CAAC,CAAC;CACtG;AACD;;;;GAIG;AACH,qBAAa,mBAAoB,YAAW,oBAAoB,EAAE,WAAW;IAI7D,OAAO,CAAC,QAAQ,CAAC,UAAU;IAHvC,QAAQ,SAA0B;IAClC,OAAO,4DAAyB;IAChC,OAAO;;MAAyB;gBACH,UAAU,EAAE,YAAY;IAErD;;;;;;;OAOG;IACH,YAAY,CAAC,OAAO,CAAC,EAAE,UAAU,GAAG,mBAAmB,CAAC,mBAAmB,EAAE,oBAAoB,CAAC;CAIrG"}