forest-cli 3.3.0 → 3.4.0
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.
|
@@ -11,7 +11,7 @@ APPLICATION_PORT={{ appPort }}
|
|
|
11
11
|
|
|
12
12
|
DATABASE_URL={{ dbUrl }}
|
|
13
13
|
DATABASE_SSL={{ dbSsl }}
|
|
14
|
-
# This should be true in production environment.
|
|
14
|
+
# This should be true in production environment. When false, it allows to bypass SSL certificate verification.
|
|
15
15
|
DATABASE_REJECT_UNAUTHORIZED=false
|
|
16
16
|
{{#if dbSchema }}
|
|
17
17
|
DATABASE_SCHEMA={{ dbSchema }}
|
|
@@ -23,14 +23,9 @@ if (process.env.DATABASE_SSL && JSON.parse(process.env.DATABASE_SSL.toLowerCase(
|
|
|
23
23
|
trustServerCertificate: !rejectUnauthorized,
|
|
24
24
|
};
|
|
25
25
|
{{else if isMariaDB}}
|
|
26
|
-
dialectOptions.ssl =
|
|
26
|
+
dialectOptions.ssl = rejectUnauthorized ? true: { rejectUnauthorized };
|
|
27
27
|
{{else}}
|
|
28
|
-
dialectOptions.ssl =
|
|
29
|
-
? {
|
|
30
|
-
require: true,
|
|
31
|
-
rejectUnauthorized,
|
|
32
|
-
}
|
|
33
|
-
: true;
|
|
28
|
+
dialectOptions.ssl = rejectUnauthorized ? true : { require: true, rejectUnauthorized };
|
|
34
29
|
{{/if}}
|
|
35
30
|
}
|
|
36
31
|
{{/unless}}
|
|
@@ -40,36 +35,78 @@ if (process.env.DATABASE_SSL && JSON.parse(process.env.DATABASE_SSL.toLowerCase(
|
|
|
40
35
|
* @type {import('@forestadmin/agent').Agent<import('./typings').Schema>}
|
|
41
36
|
*/
|
|
42
37
|
const agent = createAgent({
|
|
38
|
+
// Security tokens
|
|
43
39
|
authSecret: process.env.FOREST_AUTH_SECRET,
|
|
44
40
|
envSecret: process.env.FOREST_ENV_SECRET,
|
|
45
|
-
isProduction: process.env.NODE_ENV === 'production',
|
|
46
41
|
{{#if forestServerUrl}}
|
|
47
42
|
forestServerUrl: process.env.FOREST_SERVER_URL,
|
|
48
43
|
{{/if}}
|
|
44
|
+
|
|
45
|
+
// Make sure to set NODE_ENV to 'production' when you deploy your project
|
|
46
|
+
isProduction: process.env.NODE_ENV === 'production',
|
|
47
|
+
|
|
49
48
|
// Autocompletion of collection names and fields
|
|
50
49
|
typingsPath: './typings.ts',
|
|
51
50
|
typingsMaxDepth: 5,
|
|
52
|
-
})
|
|
53
|
-
|
|
51
|
+
});
|
|
52
|
+
|
|
53
|
+
// Connect your datasources
|
|
54
|
+
// All options are documented at https://docs.forestadmin.com/developer-guide-agents-nodejs/data-sources/connection
|
|
54
55
|
{{#if isMongoose}}
|
|
55
|
-
|
|
56
|
+
agent.addDataSource(createMongooseDataSource(connection, { flattenMode: 'auto' }));
|
|
56
57
|
{{else}}
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
58
|
+
agent.addDataSource(
|
|
59
|
+
createSqlDataSource({
|
|
60
|
+
uri: process.env.DATABASE_URL,
|
|
60
61
|
{{#if dbSchema}}
|
|
61
|
-
|
|
62
|
+
schema: process.env.DATABASE_SCHEMA,
|
|
62
63
|
{{/if}}
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
64
|
+
dialectOptions,
|
|
65
|
+
}),
|
|
66
|
+
);
|
|
66
67
|
{{/if}}
|
|
67
68
|
|
|
68
69
|
// Add customizations here.
|
|
69
|
-
//
|
|
70
|
+
// For instance, you can code custom actions, charts, create new fields or relationships, load plugins.
|
|
71
|
+
// As your project grows, you will need to split it into multiple files!
|
|
72
|
+
//
|
|
73
|
+
// Here is some code to get your started
|
|
74
|
+
//
|
|
75
|
+
// agent.customizeCollection('products', collection => {
|
|
76
|
+
// // Actions are documented here:
|
|
77
|
+
// // https://docs.forestadmin.com/developer-guide-agents-nodejs/agent-customization/actions
|
|
78
|
+
// collection.addAction('Order new batch from supplier', {
|
|
79
|
+
// scope: 'Single', // This action can be triggered product by product
|
|
80
|
+
// form: [{ label: 'Quantity', type: 'Number', isRequired: true }],
|
|
81
|
+
// execute: async (context, resultBuilder) => {
|
|
82
|
+
// const product = await context.getRecord(['id', 'name'])
|
|
83
|
+
// const quantity = context.formValues['Quantity'];
|
|
84
|
+
|
|
85
|
+
// // ... Perform work here ...
|
|
86
|
+
|
|
87
|
+
// return resultBuilder.success(`Your order for a batch of ${quantity} '${product.name}' was sent`);
|
|
88
|
+
// }
|
|
89
|
+
// });
|
|
90
|
+
|
|
91
|
+
// // Search customization is documented here:
|
|
92
|
+
// // https://docs.forestadmin.com/developer-guide-agents-nodejs/agent-customization/search
|
|
93
|
+
// collection.replaceSearch(searchString => {
|
|
94
|
+
// // user has typed a product id, let's only that column
|
|
95
|
+
// if (searchString.match(/^prdid[\d]{8}/$))
|
|
96
|
+
// return { field: 'id', operator: 'Equal', value: searchString };
|
|
97
|
+
|
|
98
|
+
// // Otherwise assume that user wants to search for a product by name
|
|
99
|
+
// return { field: 'name', operator: 'Contains', value: searchString };
|
|
100
|
+
// });
|
|
101
|
+
// });
|
|
102
|
+
|
|
103
|
+
// Expose an HTTP endpoint.
|
|
104
|
+
agent.mountOnStandaloneServer(Number(process.env.APPLICATION_PORT));
|
|
70
105
|
|
|
71
|
-
agent
|
|
72
|
-
|
|
73
|
-
.
|
|
74
|
-
|
|
75
|
-
.
|
|
106
|
+
// Start the agent.
|
|
107
|
+
agent.start().catch(error => {
|
|
108
|
+
console.error('\x1b[31merror:\x1b[0m Forest Admin agent failed to start\n');
|
|
109
|
+
console.error('');
|
|
110
|
+
console.error(error.stack);
|
|
111
|
+
process.exit(1);
|
|
112
|
+
});
|
package/oclif.manifest.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":"3.3.0","commands":{"branch":{"id":"branch","description":"Create a new branch or list your existing branches.","pluginName":"forest-cli","pluginType":"core","aliases":["branches"],"flags":{"projectId":{"name":"projectId","type":"option","description":"The id of the project to create a branch in."},"delete":{"name":"delete","type":"boolean","char":"d","description":"Delete the branch.","allowNo":false},"force":{"name":"force","type":"boolean","description":"When deleting a branch, skip confirmation.","allowNo":false},"help":{"name":"help","type":"boolean","description":"Display usage information.","allowNo":false},"format":{"name":"format","type":"option","char":"format","description":"Output format.","options":["table","json"],"default":"table"},"origin":{"name":"origin","type":"option","char":"o","description":"Set the origin of the created branch."}},"args":[{"name":"BRANCH_NAME","description":"The name of the branch to create.","required":false}]},"deploy":{"id":"deploy","description":"Deploy layout changes of the current branch to the reference one.","pluginName":"forest-cli","pluginType":"core","aliases":["environments:deploy"],"flags":{"help":{"name":"help","type":"boolean","description":"Display usage information.","allowNo":false},"force":{"name":"force","type":"boolean","char":"f","description":"Skip deploy confirmation.","allowNo":false},"projectId":{"name":"projectId","type":"option","char":"p","description":"The id of the project you want to deploy.","default":null}},"args":[]},"environments":{"id":"environments","description":"Manage environments.","pluginName":"forest-cli","pluginType":"core","aliases":["environments:list"],"flags":{"projectId":{"name":"projectId","type":"option","char":"p","description":"Forest project ID.","default":null},"format":{"name":"format","type":"option","char":"format","description":"Ouput format.","options":["table","json"],"default":"table"}},"args":[]},"init":{"id":"init","description":"Set up your development environment in your current folder.","pluginName":"forest-cli","pluginType":"core","aliases":["environments:init"],"flags":{"projectId":{"name":"projectId","type":"option","char":"p","description":"The id of the project you want to init."}},"args":[]},"login":{"id":"login","description":"Sign in with an existing account.","pluginName":"forest-cli","pluginType":"core","aliases":[],"flags":{"email":{"name":"email","type":"option","char":"e","description":"Your Forest Admin account email."},"password":{"name":"password","type":"option","char":"P","description":"Your Forest Admin account password (ignored if token is set)."},"token":{"name":"token","type":"option","char":"t","description":"Your Forest Admin account token (replaces password)."}},"args":[]},"logout":{"id":"logout","description":"Sign out of your account.","pluginName":"forest-cli","pluginType":"core","aliases":[],"flags":{},"args":[]},"projects":{"id":"projects","description":"Manage projects.","pluginName":"forest-cli","pluginType":"core","aliases":["projects:list"],"flags":{"format":{"name":"format","type":"option","char":"format","description":"Ouput format.","options":["table","json"],"default":"table"}},"args":[]},"push":{"id":"push","description":"Push layout changes of your current branch to the branch origin.","pluginName":"forest-cli","pluginType":"core","aliases":["branches:push"],"flags":{"force":{"name":"force","type":"boolean","description":"Skip push changes confirmation.","allowNo":false},"help":{"name":"help","type":"boolean","description":"Display usage information.","allowNo":false},"projectId":{"name":"projectId","type":"option","char":"p","description":"The id of the project to work on.","default":null}},"args":[]},"set-origin":{"id":"set-origin","description":"Set an environment as your branch's origin. Your branch will build on top of that environment's layout.","pluginName":"forest-cli","pluginType":"core","aliases":["branches:origin"],"flags":{"help":{"name":"help","type":"boolean","description":"Display usage information.","allowNo":false}},"args":[{"name":"ENVIRONMENT_NAME","description":"The environment to set as origin.","required":false}]},"switch":{"id":"switch","description":"Switch to another branch in your local development environment.","pluginName":"forest-cli","pluginType":"core","aliases":["branch:switch"],"flags":{"help":{"name":"help","type":"boolean","description":"Display usage information.","allowNo":false}},"args":[{"name":"BRANCH_NAME","description":"The name of the local branch to set as current.","required":false}]},"user":{"id":"user","description":"Display the current logged in user.","pluginName":"forest-cli","pluginType":"core","aliases":[],"flags":{},"args":[]},"environments:copy-layout":{"id":"environments:copy-layout","description":"Copy the layout from one environment to another.","pluginName":"forest-cli","pluginType":"core","aliases":[],"flags":{"projectId":{"name":"projectId","type":"option","char":"p","description":"Forest project ID.","default":null},"force":{"name":"force","type":"boolean","char":"force","description":"Force copy.","allowNo":false}},"args":[{"name":"fromEnvironment","description":"Source environment ID.","required":true},{"name":"toEnvironment","description":"Target environment ID.","required":true}]},"environments:create":{"id":"environments:create","description":"Create a new environment.","pluginName":"forest-cli","pluginType":"core","aliases":[],"flags":{"projectId":{"name":"projectId","type":"option","char":"p","description":"Forest project ID.","default":null},"name":{"name":"name","type":"option","char":"n","description":"Environment name.","required":true},"url":{"name":"url","type":"option","char":"u","description":"Application URL.","required":true},"format":{"name":"format","type":"option","char":"format","description":"Ouput format.","options":["table","json"],"default":"table"}},"args":[]},"environments:delete":{"id":"environments:delete","description":"Delete an environment.","pluginName":"forest-cli","pluginType":"core","aliases":[],"flags":{"force":{"name":"force","type":"boolean","char":"force","description":"Force delete.","allowNo":false}},"args":[{"name":"environmentId","description":"ID of an environment.","required":true}]},"environments:get":{"id":"environments:get","description":"Get the configuration of an environment.","pluginName":"forest-cli","pluginType":"core","aliases":[],"flags":{"format":{"name":"format","type":"option","char":"format","description":"Output format.","options":["table","json"],"default":"table"}},"args":[{"name":"environmentId","description":"ID of an environment.","required":true}]},"environments:reset":{"id":"environments:reset","description":"Reset a remote environment by removing all layout changes","pluginName":"forest-cli","pluginType":"core","aliases":[],"flags":{"environment":{"name":"environment","type":"option","char":"e","description":"The remote environment name to reset."},"force":{"name":"force","type":"boolean","description":"Skip reset changes confirmation.","allowNo":false},"projectId":{"name":"projectId","type":"option","char":"p","description":"The id of the project to work on.","default":null}},"args":[]},"environments:update":{"id":"environments:update","description":"Update an environment.","pluginName":"forest-cli","pluginType":"core","aliases":[],"flags":{"environmentId":{"name":"environmentId","type":"option","char":"e","description":"The forest environment ID to update.","required":true},"name":{"name":"name","type":"option","char":"n","description":"To update the environment name.","required":false},"url":{"name":"url","type":"option","char":"u","description":"To update the application URL.","required":false}},"args":[]},"projects:create":{"id":"projects:create","description":"Create a new Forest Admin project.","pluginName":"forest-cli","pluginType":"core","aliases":[],"flags":{"applicationHost":{"name":"applicationHost","type":"option","char":"H","description":"Hostname of your admin backend application.","required":false},"applicationPort":{"name":"applicationPort","type":"option","char":"P","description":"Port of your admin backend application.","required":false},"databaseConnectionURL":{"name":"databaseConnectionURL","type":"option","char":"c","description":"Enter the database credentials with a connection URL.","required":false},"databaseName":{"name":"databaseName","type":"option","char":"n","description":"Enter your database name.","required":false},"databaseHost":{"name":"databaseHost","type":"option","char":"h","description":"Enter your database host.","required":false},"databasePort":{"name":"databasePort","type":"option","char":"p","description":"Enter your database port.","required":false},"databaseUser":{"name":"databaseUser","type":"option","char":"u","description":"Enter your database user.","required":false},"databasePassword":{"name":"databasePassword","type":"option","description":"Enter your database password.","required":false},"databaseSSL":{"name":"databaseSSL","type":"boolean","description":"Use SSL for database connection.","required":false,"allowNo":false},"databaseDialect":{"name":"databaseDialect","type":"option","char":"d","description":"Enter your database dialect.","required":false,"options":["mongodb","mssql","mysql","postgres"]},"databaseSchema":{"name":"databaseSchema","type":"option","char":"s","description":"Enter your database schema.","required":false},"mongoDBSRV":{"name":"mongoDBSRV","type":"boolean","description":"Use SRV DNS record for mongoDB connection.","required":false,"allowNo":false}},"args":[{"name":"applicationName","description":"Name of the project to create.","required":true}]},"projects:get":{"id":"projects:get","description":"Get the configuration of a project.","pluginName":"forest-cli","pluginType":"core","aliases":[],"flags":{"format":{"name":"format","type":"option","char":"f","description":"Ouput format.","options":["table","json"],"default":"table"}},"args":[{"name":"projectId","description":"ID of a project.","required":true}]},"schema:apply":{"id":"schema:apply","description":"Apply the current schema of your repository to the specified environment (using your \".forestadmin-schema.json\" file).","pluginName":"forest-cli","pluginType":"core","aliases":[],"flags":{"secret":{"name":"secret","type":"option","char":"s","description":"Environment secret of the project (FOREST_ENV_SECRET).","required":false}},"args":[]},"schema:diff":{"id":"schema:diff","description":"Allow to compare two environment schemas","pluginName":"forest-cli","pluginType":"core","aliases":[],"flags":{"help":{"name":"help","type":"boolean","description":"Display usage information.","allowNo":false}},"args":[{"name":"environmentIdFrom","description":"ID of an environment to compare.","required":true},{"name":"environmentIdTo","description":"ID of an environment to compare.","required":true}]},"schema:update":{"id":"schema:update","description":"Refresh your schema by generating files that do not currently exist.","pluginName":"forest-cli","pluginType":"core","aliases":[],"flags":{"config":{"name":"config","type":"option","char":"c","description":"Database configuration file to use.","required":false,"default":"config/databases.js"},"outputDirectory":{"name":"outputDirectory","type":"option","char":"o","description":"Output directory where to generate new files.","required":false}},"args":[]},"projects:create:nosql":{"id":"projects:create:nosql","description":"Create a new Forest Admin project.","pluginName":"forest-cli","pluginType":"core","aliases":[],"flags":{"applicationHost":{"name":"applicationHost","type":"option","char":"H","description":"Hostname of your admin backend application.","required":false},"applicationPort":{"name":"applicationPort","type":"option","char":"P","description":"Port of your admin backend application.","required":false},"databaseConnectionURL":{"name":"databaseConnectionURL","type":"option","char":"c","description":"Enter the database credentials with a connection URL.","required":false},"databaseName":{"name":"databaseName","type":"option","char":"n","description":"Enter your database name.","required":false},"databaseHost":{"name":"databaseHost","type":"option","char":"h","description":"Enter your database host.","required":false},"databasePort":{"name":"databasePort","type":"option","char":"p","description":"Enter your database port.","required":false},"databaseUser":{"name":"databaseUser","type":"option","char":"u","description":"Enter your database user.","required":false},"databasePassword":{"name":"databasePassword","type":"option","description":"Enter your database password.","required":false},"databaseSSL":{"name":"databaseSSL","type":"boolean","description":"Use SSL for database connection.","required":false,"allowNo":false},"mongoDBSRV":{"name":"mongoDBSRV","type":"boolean","description":"Use SRV DNS record for mongoDB connection.","required":false,"allowNo":false},"language":{"name":"language","type":"option","char":"l","description":"In which language would you like to generate your sources?","required":false,"options":["javascript","typescript"]}},"args":[{"name":"applicationName","description":"Name of the project to create.","required":true}]},"projects:create:sql":{"id":"projects:create:sql","description":"Create a new Forest Admin project.","pluginName":"forest-cli","pluginType":"core","aliases":[],"flags":{"applicationHost":{"name":"applicationHost","type":"option","char":"H","description":"Hostname of your admin backend application.","required":false},"applicationPort":{"name":"applicationPort","type":"option","char":"P","description":"Port of your admin backend application.","required":false},"databaseConnectionURL":{"name":"databaseConnectionURL","type":"option","char":"c","description":"Enter the database credentials with a connection URL.","required":false},"databaseName":{"name":"databaseName","type":"option","char":"n","description":"Enter your database name.","required":false},"databaseHost":{"name":"databaseHost","type":"option","char":"h","description":"Enter your database host.","required":false},"databasePort":{"name":"databasePort","type":"option","char":"p","description":"Enter your database port.","required":false},"databaseUser":{"name":"databaseUser","type":"option","char":"u","description":"Enter your database user.","required":false},"databasePassword":{"name":"databasePassword","type":"option","description":"Enter your database password.","required":false},"databaseSSL":{"name":"databaseSSL","type":"boolean","description":"Use SSL for database connection.","required":false,"allowNo":false},"databaseDialect":{"name":"databaseDialect","type":"option","char":"d","description":"Enter your database dialect.","required":false,"options":["mssql","mysql","postgres"]},"databaseSchema":{"name":"databaseSchema","type":"option","char":"s","description":"Enter your database schema.","required":false},"language":{"name":"language","type":"option","char":"l","description":"Choose the language you want to use for your project.","required":false,"options":["javascript","typescript"]}},"args":[{"name":"applicationName","description":"Name of the project to create.","required":true}]}}}
|
|
1
|
+
{"version":"3.4.0","commands":{"branch":{"id":"branch","description":"Create a new branch or list your existing branches.","pluginName":"forest-cli","pluginType":"core","aliases":["branches"],"flags":{"projectId":{"name":"projectId","type":"option","description":"The id of the project to create a branch in."},"delete":{"name":"delete","type":"boolean","char":"d","description":"Delete the branch.","allowNo":false},"force":{"name":"force","type":"boolean","description":"When deleting a branch, skip confirmation.","allowNo":false},"help":{"name":"help","type":"boolean","description":"Display usage information.","allowNo":false},"format":{"name":"format","type":"option","char":"format","description":"Output format.","options":["table","json"],"default":"table"},"origin":{"name":"origin","type":"option","char":"o","description":"Set the origin of the created branch."}},"args":[{"name":"BRANCH_NAME","description":"The name of the branch to create.","required":false}]},"deploy":{"id":"deploy","description":"Deploy layout changes of the current branch to the reference one.","pluginName":"forest-cli","pluginType":"core","aliases":["environments:deploy"],"flags":{"help":{"name":"help","type":"boolean","description":"Display usage information.","allowNo":false},"force":{"name":"force","type":"boolean","char":"f","description":"Skip deploy confirmation.","allowNo":false},"projectId":{"name":"projectId","type":"option","char":"p","description":"The id of the project you want to deploy.","default":null}},"args":[]},"environments":{"id":"environments","description":"Manage environments.","pluginName":"forest-cli","pluginType":"core","aliases":["environments:list"],"flags":{"projectId":{"name":"projectId","type":"option","char":"p","description":"Forest project ID.","default":null},"format":{"name":"format","type":"option","char":"format","description":"Ouput format.","options":["table","json"],"default":"table"}},"args":[]},"init":{"id":"init","description":"Set up your development environment in your current folder.","pluginName":"forest-cli","pluginType":"core","aliases":["environments:init"],"flags":{"projectId":{"name":"projectId","type":"option","char":"p","description":"The id of the project you want to init."}},"args":[]},"login":{"id":"login","description":"Sign in with an existing account.","pluginName":"forest-cli","pluginType":"core","aliases":[],"flags":{"email":{"name":"email","type":"option","char":"e","description":"Your Forest Admin account email."},"password":{"name":"password","type":"option","char":"P","description":"Your Forest Admin account password (ignored if token is set)."},"token":{"name":"token","type":"option","char":"t","description":"Your Forest Admin account token (replaces password)."}},"args":[]},"logout":{"id":"logout","description":"Sign out of your account.","pluginName":"forest-cli","pluginType":"core","aliases":[],"flags":{},"args":[]},"projects":{"id":"projects","description":"Manage projects.","pluginName":"forest-cli","pluginType":"core","aliases":["projects:list"],"flags":{"format":{"name":"format","type":"option","char":"format","description":"Ouput format.","options":["table","json"],"default":"table"}},"args":[]},"push":{"id":"push","description":"Push layout changes of your current branch to the branch origin.","pluginName":"forest-cli","pluginType":"core","aliases":["branches:push"],"flags":{"force":{"name":"force","type":"boolean","description":"Skip push changes confirmation.","allowNo":false},"help":{"name":"help","type":"boolean","description":"Display usage information.","allowNo":false},"projectId":{"name":"projectId","type":"option","char":"p","description":"The id of the project to work on.","default":null}},"args":[]},"set-origin":{"id":"set-origin","description":"Set an environment as your branch's origin. Your branch will build on top of that environment's layout.","pluginName":"forest-cli","pluginType":"core","aliases":["branches:origin"],"flags":{"help":{"name":"help","type":"boolean","description":"Display usage information.","allowNo":false}},"args":[{"name":"ENVIRONMENT_NAME","description":"The environment to set as origin.","required":false}]},"switch":{"id":"switch","description":"Switch to another branch in your local development environment.","pluginName":"forest-cli","pluginType":"core","aliases":["branch:switch"],"flags":{"help":{"name":"help","type":"boolean","description":"Display usage information.","allowNo":false}},"args":[{"name":"BRANCH_NAME","description":"The name of the local branch to set as current.","required":false}]},"user":{"id":"user","description":"Display the current logged in user.","pluginName":"forest-cli","pluginType":"core","aliases":[],"flags":{},"args":[]},"environments:copy-layout":{"id":"environments:copy-layout","description":"Copy the layout from one environment to another.","pluginName":"forest-cli","pluginType":"core","aliases":[],"flags":{"projectId":{"name":"projectId","type":"option","char":"p","description":"Forest project ID.","default":null},"force":{"name":"force","type":"boolean","char":"force","description":"Force copy.","allowNo":false}},"args":[{"name":"fromEnvironment","description":"Source environment ID.","required":true},{"name":"toEnvironment","description":"Target environment ID.","required":true}]},"environments:create":{"id":"environments:create","description":"Create a new environment.","pluginName":"forest-cli","pluginType":"core","aliases":[],"flags":{"projectId":{"name":"projectId","type":"option","char":"p","description":"Forest project ID.","default":null},"name":{"name":"name","type":"option","char":"n","description":"Environment name.","required":true},"url":{"name":"url","type":"option","char":"u","description":"Application URL.","required":true},"format":{"name":"format","type":"option","char":"format","description":"Ouput format.","options":["table","json"],"default":"table"}},"args":[]},"environments:delete":{"id":"environments:delete","description":"Delete an environment.","pluginName":"forest-cli","pluginType":"core","aliases":[],"flags":{"force":{"name":"force","type":"boolean","char":"force","description":"Force delete.","allowNo":false}},"args":[{"name":"environmentId","description":"ID of an environment.","required":true}]},"environments:get":{"id":"environments:get","description":"Get the configuration of an environment.","pluginName":"forest-cli","pluginType":"core","aliases":[],"flags":{"format":{"name":"format","type":"option","char":"format","description":"Output format.","options":["table","json"],"default":"table"}},"args":[{"name":"environmentId","description":"ID of an environment.","required":true}]},"environments:reset":{"id":"environments:reset","description":"Reset a remote environment by removing all layout changes","pluginName":"forest-cli","pluginType":"core","aliases":[],"flags":{"environment":{"name":"environment","type":"option","char":"e","description":"The remote environment name to reset."},"force":{"name":"force","type":"boolean","description":"Skip reset changes confirmation.","allowNo":false},"projectId":{"name":"projectId","type":"option","char":"p","description":"The id of the project to work on.","default":null}},"args":[]},"environments:update":{"id":"environments:update","description":"Update an environment.","pluginName":"forest-cli","pluginType":"core","aliases":[],"flags":{"environmentId":{"name":"environmentId","type":"option","char":"e","description":"The forest environment ID to update.","required":true},"name":{"name":"name","type":"option","char":"n","description":"To update the environment name.","required":false},"url":{"name":"url","type":"option","char":"u","description":"To update the application URL.","required":false}},"args":[]},"projects:create":{"id":"projects:create","description":"Create a new Forest Admin project.","pluginName":"forest-cli","pluginType":"core","aliases":[],"flags":{"applicationHost":{"name":"applicationHost","type":"option","char":"H","description":"Hostname of your admin backend application.","required":false},"applicationPort":{"name":"applicationPort","type":"option","char":"P","description":"Port of your admin backend application.","required":false},"databaseConnectionURL":{"name":"databaseConnectionURL","type":"option","char":"c","description":"Enter the database credentials with a connection URL.","required":false},"databaseName":{"name":"databaseName","type":"option","char":"n","description":"Enter your database name.","required":false},"databaseHost":{"name":"databaseHost","type":"option","char":"h","description":"Enter your database host.","required":false},"databasePort":{"name":"databasePort","type":"option","char":"p","description":"Enter your database port.","required":false},"databaseUser":{"name":"databaseUser","type":"option","char":"u","description":"Enter your database user.","required":false},"databasePassword":{"name":"databasePassword","type":"option","description":"Enter your database password.","required":false},"databaseSSL":{"name":"databaseSSL","type":"boolean","description":"Use SSL for database connection.","required":false,"allowNo":false},"databaseDialect":{"name":"databaseDialect","type":"option","char":"d","description":"Enter your database dialect.","required":false,"options":["mongodb","mssql","mysql","postgres"]},"databaseSchema":{"name":"databaseSchema","type":"option","char":"s","description":"Enter your database schema.","required":false},"mongoDBSRV":{"name":"mongoDBSRV","type":"boolean","description":"Use SRV DNS record for mongoDB connection.","required":false,"allowNo":false}},"args":[{"name":"applicationName","description":"Name of the project to create.","required":true}]},"projects:get":{"id":"projects:get","description":"Get the configuration of a project.","pluginName":"forest-cli","pluginType":"core","aliases":[],"flags":{"format":{"name":"format","type":"option","char":"f","description":"Ouput format.","options":["table","json"],"default":"table"}},"args":[{"name":"projectId","description":"ID of a project.","required":true}]},"schema:apply":{"id":"schema:apply","description":"Apply the current schema of your repository to the specified environment (using your \".forestadmin-schema.json\" file).","pluginName":"forest-cli","pluginType":"core","aliases":[],"flags":{"secret":{"name":"secret","type":"option","char":"s","description":"Environment secret of the project (FOREST_ENV_SECRET).","required":false}},"args":[]},"schema:diff":{"id":"schema:diff","description":"Allow to compare two environment schemas","pluginName":"forest-cli","pluginType":"core","aliases":[],"flags":{"help":{"name":"help","type":"boolean","description":"Display usage information.","allowNo":false}},"args":[{"name":"environmentIdFrom","description":"ID of an environment to compare.","required":true},{"name":"environmentIdTo","description":"ID of an environment to compare.","required":true}]},"schema:update":{"id":"schema:update","description":"Refresh your schema by generating files that do not currently exist.","pluginName":"forest-cli","pluginType":"core","aliases":[],"flags":{"config":{"name":"config","type":"option","char":"c","description":"Database configuration file to use.","required":false,"default":"config/databases.js"},"outputDirectory":{"name":"outputDirectory","type":"option","char":"o","description":"Output directory where to generate new files.","required":false}},"args":[]},"projects:create:nosql":{"id":"projects:create:nosql","description":"Create a new Forest Admin project.","pluginName":"forest-cli","pluginType":"core","aliases":[],"flags":{"applicationHost":{"name":"applicationHost","type":"option","char":"H","description":"Hostname of your admin backend application.","required":false},"applicationPort":{"name":"applicationPort","type":"option","char":"P","description":"Port of your admin backend application.","required":false},"databaseConnectionURL":{"name":"databaseConnectionURL","type":"option","char":"c","description":"Enter the database credentials with a connection URL.","required":false},"databaseName":{"name":"databaseName","type":"option","char":"n","description":"Enter your database name.","required":false},"databaseHost":{"name":"databaseHost","type":"option","char":"h","description":"Enter your database host.","required":false},"databasePort":{"name":"databasePort","type":"option","char":"p","description":"Enter your database port.","required":false},"databaseUser":{"name":"databaseUser","type":"option","char":"u","description":"Enter your database user.","required":false},"databasePassword":{"name":"databasePassword","type":"option","description":"Enter your database password.","required":false},"databaseSSL":{"name":"databaseSSL","type":"boolean","description":"Use SSL for database connection.","required":false,"allowNo":false},"mongoDBSRV":{"name":"mongoDBSRV","type":"boolean","description":"Use SRV DNS record for mongoDB connection.","required":false,"allowNo":false},"language":{"name":"language","type":"option","char":"l","description":"In which language would you like to generate your sources?","required":false,"options":["javascript","typescript"]}},"args":[{"name":"applicationName","description":"Name of the project to create.","required":true}]},"projects:create:sql":{"id":"projects:create:sql","description":"Create a new Forest Admin project.","pluginName":"forest-cli","pluginType":"core","aliases":[],"flags":{"applicationHost":{"name":"applicationHost","type":"option","char":"H","description":"Hostname of your admin backend application.","required":false},"applicationPort":{"name":"applicationPort","type":"option","char":"P","description":"Port of your admin backend application.","required":false},"databaseConnectionURL":{"name":"databaseConnectionURL","type":"option","char":"c","description":"Enter the database credentials with a connection URL.","required":false},"databaseName":{"name":"databaseName","type":"option","char":"n","description":"Enter your database name.","required":false},"databaseHost":{"name":"databaseHost","type":"option","char":"h","description":"Enter your database host.","required":false},"databasePort":{"name":"databasePort","type":"option","char":"p","description":"Enter your database port.","required":false},"databaseUser":{"name":"databaseUser","type":"option","char":"u","description":"Enter your database user.","required":false},"databasePassword":{"name":"databasePassword","type":"option","description":"Enter your database password.","required":false},"databaseSSL":{"name":"databaseSSL","type":"boolean","description":"Use SSL for database connection.","required":false,"allowNo":false},"databaseDialect":{"name":"databaseDialect","type":"option","char":"d","description":"Enter your database dialect.","required":false,"options":["mssql","mysql","postgres"]},"databaseSchema":{"name":"databaseSchema","type":"option","char":"s","description":"Enter your database schema.","required":false},"language":{"name":"language","type":"option","char":"l","description":"Choose the language you want to use for your project.","required":false,"options":["javascript","typescript"]}},"args":[{"name":"applicationName","description":"Name of the project to create.","required":true}]}}}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "forest-cli",
|
|
3
3
|
"description": "The Lumberjacks' toolbelt is the Forest CLI which makes easy to manage your back office application directly from the terminal.",
|
|
4
|
-
"version": "3.
|
|
4
|
+
"version": "3.4.0",
|
|
5
5
|
"author": "Sandro Munda",
|
|
6
6
|
"contributors": [
|
|
7
7
|
"Arnaud Valensi <arnaud.valensi@gmail.com>",
|