chore: Delete unused app/util/plugin-generation directory (#26966)

These plop templates are no longer used, and are very likely stale.
This commit is contained in:
Shrikant Sharat Kandula 2023-09-05 14:48:55 +05:30 committed by GitHub
parent fc2d03f94d
commit 3fc007649e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
13 changed files with 0 additions and 2795 deletions

View File

@ -1 +0,0 @@
node_modules/

File diff suppressed because it is too large Load Diff

View File

@ -1,15 +0,0 @@
{
"name": "converted",
"version": "1.0.0",
"description": "",
"author": "",
"license": "ISC",
"dependencies": {
"color-convert": "2.0.1",
"has-flag": "4.0.0",
"is-buffer": "1.1.6",
"isarray": "1.0.0",
"picomatch": "2.3.0",
"plop": "2.7.4"
}
}

View File

@ -1,20 +0,0 @@
@ChangeSet(order = "1000", id = "add-{{pascalCase name}}-plugin", author = "")
public void add{{pascalCase name}}Plugin(MongockTemplate mongoTemplate) {
Plugin plugin = new Plugin();
plugin.setName("{{pascalCase name}}");
plugin.setType(PluginType.DB);
plugin.setPackageName("{{dashCase name}}");
plugin.setUiComponent("DbEditorForm");
plugin.setDatasourceComponent("AutoForm");
plugin.setResponseType(Plugin.ResponseType.TABLE);
plugin.setIconLocation("https://assets.appsmith.com/{{pascalCase name}}.png");
plugin.setDocumentationLink("https://docs.appsmith.com/datasource-reference/querying-{{dashCase name}}");
plugin.setDefaultInstall(false);
try {
mongoTemplate.insert(plugin);
} catch (DuplicateKeyException e) {
log.warn(plugin.getPackageName() + " already present in database.");
}
}
}

View File

@ -1,16 +0,0 @@
{
"editor": [
{
"sectionName": "",
"id": 1,
"children": [
{
"label": "",
"internalLabel": "Query",
"configProperty": "actionConfiguration.body",
"controlType": "QUERY_DYNAMIC_TEXT"
}
]
}
]
}

View File

@ -1,58 +0,0 @@
{
"form": [
{
"sectionName": "Connection",
"id": 1,
"children": [
{
"sectionName": null,
"children": [
{
"label": "Host address",
"configProperty": "datasourceConfiguration.endpoints[*].host",
"controlType": "KEYVALUE_ARRAY",
"validationMessage": "Please enter a valid host",
"validationRegex": "^((?![/:]).)*$"
},
{
"label": "Port",
"configProperty": "datasourceConfiguration.endpoints[*].port",
"dataType": "NUMBER",
"controlType": "KEYVALUE_ARRAY"
}
]
},
{
"label": "Database name",
"configProperty": "datasourceConfiguration.authentication.databaseName",
"controlType": "INPUT_TEXT"
}
]
},
{
"sectionName": "Authentication",
"id": 2,
"children": [
{
"sectionName": null,
"children": [
{
"label": "Username",
"configProperty": "datasourceConfiguration.authentication.username",
"controlType": "INPUT_TEXT",
"placeholderText": "Username"
},
{
"label": "Password",
"configProperty": "datasourceConfiguration.authentication.password",
"dataType": "PASSWORD",
"controlType": "INPUT_TEXT",
"placeholderText": "Password",
"encrypted": true
}
]
}
]
}
]
}

View File

@ -1,4 +0,0 @@
{
"label" : "Methods on {{entityName}}",
"data" : "aye!"
}

View File

@ -1,5 +0,0 @@
plugin.id={{dashCase name}}
plugin.class=com.external.plugins.{{pascalCase name}}
plugin.version=1.0-SNAPSHOT
plugin.provider={{email}}
plugin.dependencies=

View File

@ -1,129 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.external.plugins</groupId>
<artifactId>{{camelCase name}}</artifactId>
<version>1.0-SNAPSHOT</version>
<name>{{camelCase name}}</name>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<java.version>11</java.version>
<maven.compiler.source>${java.version}</maven.compiler.source>
<maven.compiler.target>${java.version}</maven.compiler.target>
<plugin.id>{{dashCase name}}</plugin.id>
<plugin.class>com.external.plugins.{{pascalCase name}}</plugin.class>
<plugin.version>1.0-SNAPSHOT</plugin.version>
<plugin.provider>tech@appsmith.com</plugin.provider>
<plugin.dependencies/>
</properties>
<dependencies>
<dependency>
<groupId>org.pf4j</groupId>
<artifactId>pf4j-spring</artifactId>
<version>0.7.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.appsmith</groupId>
<artifactId>interfaces</artifactId>
<version>1.0-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.18.8</version>
<scope>provided</scope>
</dependency>
<!-- Test Dependencies -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.13.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.projectreactor</groupId>
<artifactId>reactor-test</artifactId>
<version>3.2.11.RELEASE</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<version>3.1.0</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.2.4</version>
<configuration>
<minimizeJar>false</minimizeJar>
<transformers>
<transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
<manifestEntries>
<Plugin-Id>${plugin.id}</Plugin-Id>
<Plugin-Class>${plugin.class}</Plugin-Class>
<Plugin-Version>${plugin.version}</Plugin-Version>
<Plugin-Provider>${plugin.provider}</Plugin-Provider>
</manifestEntries>
</transformer>
</transformers>
<filters>
<filter>
<artifact>*:*</artifact>
<excludes>
<exclude>META-INF/*.SF</exclude>
<exclude>META-INF/*.DSA</exclude>
<exclude>META-INF/*.RSA</exclude>
</excludes>
</filter>
</filters>
</configuration>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<id>copy-dependencies</id>
<phase>package</phase>
<goals>
<goal>copy-dependencies</goal>
</goals>
<configuration>
<includeScope>runtime</includeScope>
<outputDirectory>${project.build.directory}/lib</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>

View File

@ -1,56 +0,0 @@
package com.external.plugins;
import com.appsmith.external.exceptions.pluginExceptions.AppsmithPluginError;
import com.appsmith.external.exceptions.pluginExceptions.AppsmithPluginException;
import com.appsmith.external.models.ActionConfiguration;
import com.appsmith.external.models.ActionExecutionResult;
import com.appsmith.external.models.DatasourceConfiguration;
import com.appsmith.external.models.DatasourceStructure;
import com.appsmith.external.models.DatasourceTestResult;
import com.appsmith.external.plugins.BasePlugin;
import com.appsmith.external.plugins.PluginExecutor;
import org.pf4j.Extension;
import org.pf4j.PluginWrapper;
import reactor.core.publisher.Mono;
import java.util.Set;
public class {{pascalCase name}} extends BasePlugin {
public {{pascalCase name}}(PluginWrapper wrapper) {
super(wrapper);
}
@Extension
public static class {{pascalCase name}}Executor implements PluginExecutor<C> {
@Override
public Mono<ActionExecutionResult> execute(C connection, DatasourceConfiguration datasourceConfiguration, ActionConfiguration actionConfiguration) {
return Mono.error(new AppsmithPluginException(AppsmithPluginError.PLUGIN_ERROR, "Please implement"));
}
@Override
public Mono datasourceCreate(DatasourceConfiguration datasourceConfiguration) {
return Mono.error(new AppsmithPluginException(AppsmithPluginError.PLUGIN_ERROR, "Please implement"));
}
@Override
public void datasourceDestroy(C connection) {
throw new AppsmithPluginException(AppsmithPluginError.PLUGIN_ERROR, "Please implement");
}
@Override
public Set<String> validateDatasource(DatasourceConfiguration datasourceConfiguration) {
throw new AppsmithPluginException(AppsmithPluginError.PLUGIN_ERROR, "Please implement");
}
@Override
public Mono<DatasourceTestResult> testDatasource(DatasourceConfiguration datasourceConfiguration) {
return Mono.error(new AppsmithPluginException(AppsmithPluginError.PLUGIN_ERROR, "Please implement"));
}
@Override
public Mono<DatasourceStructure> getStructure(C connection, DatasourceConfiguration datasourceConfiguration) {
return Mono.error(new AppsmithPluginException(AppsmithPluginError.PLUGIN_ERROR, "Please implement"));
}
}
}

View File

@ -1,8 +0,0 @@
package com.external.plugins;
public class {{pascalCase name}}Test {
@Test
public void test() {
assertTrue(Boolean.FALSE));
}
}

View File

@ -1,3 +0,0 @@
<module>{{camelCase name}}</module>
</modules>
</project>

View File

@ -1,107 +0,0 @@
// The following code takes prompt input and generates all the required files.
module.exports = function (plop) {
plop.setGenerator('plugin', {
prompts: [
// {
// type: 'list',
// name: 'pluginType',
// message: 'Enter the type of plugin you wish to contribute',
// choices: ['SQL', 'NoSQL', 'File Storage', 'SAAS']
// },
{
type: 'input',
name: 'name',
message: 'Integration Name here: '
// },
// {
// type: 'list',
// name: 'entityName',
// message: 'Enter the name of the entity in the plugin, you want to query',
// choices: ['Table', 'Row', 'Bucket', 'File', 'Collection']
},
{
type: 'input',
name: 'email',
message: 'Please enter your email here: ',
default: 'tech@appsmith.com'
}
],
actions: function(data) {
var actions = [];
// if (data.pluginType && data.name && data.entityName) {
if (data.name) {
actions.push(
{
type: 'add',
path: '../../server/appsmith-plugins/{{camelCase name}}/src/main/java/com.external.plugins/{{pascalCase name}}.java',
templateFile: 'plop-templates/pluginJava.hbs'
}
);
actions.push(
{
type: 'add',
path: '../../server/appsmith-plugins/{{camelCase name}}/src/test/java/com.external.plugins/{{pascalCase name}}Test.java',
templateFile: 'plop-templates/pluginTest.hbs'
}
);
actions.push(
{
type: 'add',
path: '../../server/appsmith-plugins/{{pascalCase name}}/plugin.properties',
templateFile: 'plop-templates/plugin-iml.hbs'
}
);
actions.push(
{
type: 'add',
path: '../../server/appsmith-plugins/{{pascalCase name}}/pom.xml',
templateFile: 'plop-templates/plugin-pom.hbs'
}
);
actions.push(
{
type: 'add',
path: '../../server/appsmith-plugins/{{camelCase name}}/src/main/resources/editor.json',
templateFile: 'plop-templates/editor-json.hbs'
}
);
actions.push(
{
type: 'add',
path: '../../server/appsmith-plugins/{{camelCase name}}/src/main/resources/form.json',
templateFile: 'plop-templates/form-json.hbs'
}
);
actions.push(
{
type: 'modify',
pattern :/<\/modules>\n<\/project>/,
path: '../../server/appsmith-plugins/pom.xml',
templateFile: 'plop-templates/super-plugins-pom.hbs'
}
);
actions.push(
{
type: 'modify',
pattern :/}[\n]*$/,
path: '../../server/appsmith-server/src/main/java/com/appsmith/server/migrations/DatabaseChangelog.java',
templateFile: 'plop-templates/database-changelog.hbs'
}
);
}
return actions;
}
});
};