godspeedsystems / godspeed-cli Goto Github PK
View Code? Open in Web Editor NEWGodspeed Framework CLI
Home Page: https://godspeed.systems
License: Other
Godspeed Framework CLI
Home Page: https://godspeed.systems
License: Other
Refers to this issue
Allowing multiple eventsources in a single event definition should allow to run gen-graphql-schema or another eventsource specific command in future, like gen-crud-api (which could generate events not just in http or graphql but http & graphwl)
Whenever a new version of CLI is available, it automatically asks for update.
npm install -g @godspeedsystems/cli
on terminal.godspeed create <projectName>
to create a new godspeed project.[ ] java based micro-service
[ ] NodeJS based micro-service
Choose one, then it will take you to pre-requisites of installing respective runtime with assistance.
4. Ask user to select plugin to be installed in the project. or show user to generate a project from a pre created recipe.
5. Start creating project and on completion, show instructions to navigate and start the project in development mode.
6. Demonstration of godspeed CLI commands to manage the project.
godspeed install plugin <pluginName>
godspeed start
godspeed build
godspeed setup devcontainer
godspeed deploy
godspeed setup observability
godspeed generate test
godspeed generate crud-api
godspeed generate helm-charts
godspeed generate ui
godspeed update ui
godspeed create <project name>
--from-template
option]{
"meta": {
"createTimestamp": "",
"lastUpdateTimestamp": "",
"cliVersionWhileCreation": "",
"cliVersionWhileLastUpdate": ""
},
"projectName": "",
"mongodb": {
"dataBaseName": "",
"clusterMode": true
},
"postgresql": {
"databaseName": "",
"databasePort": ""
},
"kafka": {},
"elasticgraph": {},
"redis": {},
"servicePort": ""
}
When Prisma schema has a non nullable field which does not have a default
setting either, the required property is not being set in the definitions. This means that the required validations of the framework are being bypassed.
Prisma schema
model User {
id Int @id @default(autoincrement()) ///This should not be in required
email String @unique ///This should be in required
password String ///@encrypted ///This should be in required
name String? ///This should not be in required
loanApplications LoanApplication[]
}
Generated definition of the user
User:
type: object
properties:
email:
type: string
password:
type: string
name:
type: string
nullable: true
@default
and if it does not have ?
then it must be included in the required
attribute of definition generatedUser:
type: object
required: ['email', 'password']
properties:
email:
type: string
password:
type: string
name:
type: string
nullable: true
If developer wants to exclude mongo, postgres, kafka, elaticsearch while godspeed update.
Whenever a new version is released, a release note or anything to publish changes in the latest version.
CLI Version: 2.9.1
Linux
godspeed devops-plugin remove
is not working correctly. it is not removing any devops-plugin.
$ godspeed devops-plugin remove
,_, ╔════════════════════════════════════╗
(o,o) ║ Welcome to Godspeed ║
({___}) ║ World's First Meta Framework ║
" " ╚════════════════════════════════════╝
$
It should give the list of plugins to remove then remove the selected plugin.
Facing error in executing any cli command once OTEL_ENABLED flag is set to true in the project.
It should work properly without any error.
$ godspeed otel enable
,_, ╔════════════════════════════════════╗
(o,o) ║ Welcome to Godspeed ║
({___}) ║ World's First Meta Framework ║
" " ╚════════════════════════════════════╝
otel installed successfully!
Observability has been enabled
.env
file of project.OTEL_ENABLED=true
godspeed
cli command again in the project.$ godspeed
{"Body":"OTEL_ENABLED is set, unable to initialize opentelemetry tracing.","Timestamp":"undefined000000","SeverityNumber":17,"SeverityText":"ERROR","Resource":{"service.name":"unknown_service:node"},"Attributes":{}}
{"Body":"Cannot find module '@godspeedsystems/tracing'\nRequire stack:\n- /home/gurjot/data/cli-test/godspeed-cli/node_modules/@godspeedsystems/core/dist/godspeed.js\n- /home/gurjot/data/cli-test/godspeed-cli/lib/utils/index.js\n- /home/gurjot/data/cli-test/godspeed-cli/lib/commands/create/index.js\n- /home/gurjot/data/cli-test/godspeed-cli/lib/index.js","Timestamp":"undefined000000","SeverityNumber":17,"SeverityText":"ERROR","Resource":{"service.name":"unknown_service:node"},"Attributes":{"err":{"type":"Error","message":"Cannot find module '@godspeedsystems/tracing'\nRequire stack:\n- /home/gurjot/data/cli-test/godspeed-cli/node_modules/@godspeedsystems/core/dist/godspeed.js\n- /home/gurjot/data/cli-test/godspeed-cli/lib/utils/index.js\n- /home/gurjot/data/cli-test/godspeed-cli/lib/commands/create/index.js\n- /home/gurjot/data/cli-test/godspeed-cli/lib/index.js","stack":"Error: Cannot find module '@godspeedsystems/tracing'\nRequire stack:\n- /home/gurjot/data/cli-test/godspeed-cli/node_modules/@godspeedsystems/core/dist/godspeed.js\n- /home/gurjot/data/cli-test/godspeed-cli/lib/utils/index.js\n- /home/gurjot/data/cli-test/godspeed-cli/lib/commands/create/index.js\n- /home/gurjot/data/cli-test/godspeed-cli/lib/index.js\n at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)\n at Function.Module._load (node:internal/modules/cjs/loader:778:27)\n at Module.require (node:internal/modules/cjs/loader:1005:19)\n at require (node:internal/modules/cjs/helpers:102:18)\n at Object.<anonymous> (/home/gurjot/data/cli-test/godspeed-cli/node_modules/@godspeedsystems/core/dist/godspeed.js:184:9)\n at Module._compile (node:internal/modules/cjs/loader:1103:14)\n at Object.Module._extensions..js (node:internal/modules/cjs/loader:1157:10)\n at Module.load (node:internal/modules/cjs/loader:981:32)\n at Function.Module._load (node:internal/modules/cjs/loader:822:12)\n at Module.require (node:internal/modules/cjs/loader:1005:19)\n at require (node:internal/modules/cjs/helpers:102:18)\n at Object.<anonymous> (/home/gurjot/data/cli-test/godspeed-cli/lib/utils/index.js:20:16)\n at Module._compile (node:internal/modules/cjs/loader:1103:14)\n at Object.Module._extensions..js (node:internal/modules/cjs/loader:1157:10)\n at Module.load (node:internal/modules/cjs/loader:981:32)\n at Function.Module._load (node:internal/modules/cjs/loader:822:12)\n at Module.require (node:internal/modules/cjs/loader:1005:19)\n at require (node:internal/modules/cjs/helpers:102:18)\n at Object.<anonymous> (/home/gurjot/data/cli-test/godspeed-cli/lib/commands/create/index.js:15:17)\n at Module._compile (node:internal/modules/cjs/loader:1103:14)\n at Object.Module._extensions..js (node:internal/modules/cjs/loader:1157:10)\n at Module.load (node:internal/modules/cjs/loader:981:32)\n at Function.Module._load (node:internal/modules/cjs/loader:822:12)\n at Module.require (node:internal/modules/cjs/loader:1005:19)\n at require (node:internal/modules/cjs/helpers:102:18)\n at Object.<anonymous> (/home/gurjot/data/cli-test/godspeed-cli/lib/index.js:34:33)\n at Module._compile (node:internal/modules/cjs/loader:1103:14)\n at Object.Module._extensions..js (node:internal/modules/cjs/loader:1157:10)\n at Module.load (node:internal/modules/cjs/loader:981:32)\n at Function.Module._load (node:internal/modules/cjs/loader:822:12)\n at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:77:12)\n at node:internal/main/run_main_module:17:47","code":"MODULE_NOT_FOUND","requireStack":["/home/gurjot/data/cli-test/godspeed-cli/node_modules/@godspeedsystems/core/dist/godspeed.js","/home/gurjot/data/cli-test/godspeed-cli/lib/utils/index.js","/home/gurjot/data/cli-test/godspeed-cli/lib/commands/create/index.js","/home/gurjot/data/cli-test/godspeed-cli/lib/index.js"]}}}
IMO we have two options to solve this issue:
@godspeedsystems/tracing
in the godspeed-cli. Then all the opentelemetry packages would always get installed with godspeed CLI installation.@godspeedsystems/core
package dependency from godspeed-cli
I am writing this document to discuss the the godspeed CLI v2
with the team.
godspeed CLI v2
requires a discussion?godspeed CLI
is the entry for a developer to use our framework. And during the lifecycle of complete development it will be used most of the times. So there are few things we need to consider while evolving this specific piece of software. There are some non negotiable feature it should eventually have.
Proposed API for v2:
The new godspeed CLI v2
will have below top level commands.
# create new project with interactive mode
godspeed create <project name>
# create godspeed project from a template
godspeed create <project name> --from-template=postgres-backend-with-redis-cache
# create new project and dry run the whole process
godspeed create < project name> --dry-run
# update existing project, default mode is interactive
godspeed update
# update gs-node-service version
godspeed update version
# delete an existing godspeed project, dry run the whole process
godspeed delete <project name> --dry-run
# delete the current project
godspeed delete .
# validate all building blocks of framework in the project
godspeed validate all
# validate all events
godspeed validate events
# validate workflows
godspeed validate workflows
# build godspeed artifact (used only from inside from the container)
godspeed build
# clean the build artifact (used only from inside from the container)
godspeed clean
# start the current project's development server
godspeed dev
# any kind of auto generation goes inside this
# crud-api
godspeed generate crud-api
# generate test
godspeed generate test-suite
There are few steps need to be taken to gracefully migrate @mindgrep/godspeed
to @ godspeedsystems/godspeed
. This documentation is result of discussion with @pankajmaurya @arunsingh and @ashutoshmindgrep.
Step 1: Release a new version on old Godspeed CLI @mindgrep/godspeed
with below features.
SOON TO BE DEPRECATED
and deadline for deprication, when user runs any godspeed command.Step 2:
@godspeedsystems/godspeed
with old projects.@godspeedsystems/godspeed
.Old package and repos should be under maintenance until we reach the deprecation deadline.
Once we hit the deadline, We can take measures like deleting Mindgreppers/gs_project_template
repo, Whick will force break the old CLI. and a message will be printed with the steps to remote old package and install new one.
[ ] Spec
`$ godspeed create test_no -n _ _ __ _ ___ __| | ___ _ __ ___ ___ __| | / _ | / _ \ / | / _| | ' \ / _ \ / _ \ / _ |
| (| | | () | | (| | __ \ | |) | | __/ | __/ | (| |
_, | _/ _,| |/ | ./ _| _| _,|
|/ ||
projectDir: /home/gurjot/cli-test/test_no projectTemplateDir undefined
project created
node:fs:1722
handleErrorFromBinding(ctx);
^
Error: EISDIR: illegal operation on a directory, unlink '/home/gurjot/cli-test/test_no/src/functions/com'
at Object.unlinkSync (node:fs:1722:3)
at /usr/lib/node_modules/@mindgrep/godspeed/lib/index.js:84:126
at Array.map ()
at GSCreate (/usr/lib/node_modules/@mindgrep/godspeed/lib/index.js:84:102)
at processTicksAndRejections (node:internal/process/task_queues:96:5) {
errno: -21,
syscall: 'unlink',
code: 'EISDIR',
path: '/home/gurjot/cli-test/test_no/src/functions/com'
}
`
$ godspeed create test_kafka _ _ __ _ ___ __| | ___ _ __ ___ ___ __| | / _
| / _ \ / | / __| | '_ \ / _ \ / _ \ / _
|
| (| | | () | | (| | __ \ | |) | | __/ | __/ | (| |
_, | ___/ _,| |/ | ./ _| _| _,|
|__/ ||
projectDir: /home/gurjot/cli-test/test_kafka projectTemplateDir undefined
project created
Do you need mongodb? [y/n] [default: n] n
Do you need postgresdb? [y/n] [default: n]
Do you need kafka? [y/n] [default: n] y
Do you need elastisearch? [y/n] [default: n]
Please enter host port on which you want to run your service [default: 3000]
Fetching release version information...
Please select release version of gs_service from the available list:
latest
1.0.0
1.0.1
1.0.10
1.0.11
1.0.12
1.0.13
1.0.2
1.0.3
1.0.4
1.0.5
1.0.6
1.0.7
1.0.8
1.0.9
base
dev
v1.0.13
Enter your version [default: latest]
Selected version latest
The Compose file './docker-compose.yml' is invalid because:
services.node.depends_on contains an invalid type, it should be an array, or an object
Error in "docker-compose down": undefined
Setting uid/gid 1001
The Compose file './docker-compose.yml' is invalid because:
services.node.depends_on contains an invalid type, it should be an array, or an object
Error in building container: undefined
The Compose file './docker-compose.yml' is invalid because:
services.node.depends_on contains an invalid type, it should be an array, or an object
Error in "docker-compose stop": undefined
godspeed create test_kafka is done.
`
Whenever a new version of CLI is available, it automatically asks for update.
The command godspeed otel enable
is not working.
On running the command the output came:
On running godspeed serve got this error.
{"Body":"OTEL_ENABLED is set, unable to initialize opentelemetry tracing.","Timestamp":"2024-03-15T15:30:28.146Z000000","SeverityNumber":17,"SeverityText":"ERROR","Resource":{"service.name":"unknown_service:node","env":"production"},"Attributes":{}}
{"Body":"Cannot find module '@godspeedsystems/tracing'\nRequire stack:\n- /home/ayushghai/godspeed/gs-plugins/plugins/axios-as-datasource/node_modules/@godspeedsystems/core/dist/godspeed.js\n- /home/ayushghai/godspeed/gs-plugins/plugins/axios-as-datasource/dist/index.js\n- /home/ayushghai/godspeed/projects/gs-node-templates/LOS/dist/datasources/types/axios.js\n- /home/ayushghai/godspeed/gs-node-service/dist/core/datasourceLoader.js\n- /home/ayushghai/godspeed/gs-node-service/dist/godspeed.js\n- /home/ayushghai/godspeed/projects/gs-node-templates/LOS/dist/index.js","Timestamp":"2024-03-15T15:30:28.148Z000000","SeverityNumber":17,"SeverityText":"ERROR","Resource":{"service.name":"unknown_service:node","env":"production"},"Attributes":{"err":{"type":"Error","message":"Cannot find module '@godspeedsystems/tracing'\nRequire stack:\n- /home/ayushghai/godspeed/gs-plugins/plugins/axios-as-datasource/node_modules/@godspeedsystems/core/dist/godspeed.js\n- /home/ayushghai/godspeed/gs-plugins/plugins/axios-as-datasource/dist/index.js\n- /home/ayushghai/godspeed/projects/gs-node-templates/LOS/dist/datasources/types/axios.js\n- /home/ayushghai/godspeed/gs-node-service/dist/core/datasourceLoader.js\n- /home/ayushghai/godspeed/gs-node-service/dist/godspeed.js\n- /home/ayushghai/godspeed/projects/gs-node-templates/LOS/dist/index.js","stack":"Error: Cannot find module '@godspeedsystems/tracing'\nRequire stack:\n- /home/ayushghai/godspeed/gs-plugins/plugins/axios-as-datasource/node_modules/@godspeedsystems/core/dist/godspeed.js\n- /home/ayushghai/godspeed/gs-plugins/plugins/axios-as-datasource/dist/index.js\n- /home/ayushghai/godspeed/projects/gs-node-templates/LOS/dist/datasources/types/axios.js\n- /home/ayushghai/godspeed/gs-node-service/dist/core/datasourceLoader.js\n- /home/ayushghai/godspeed/gs-node-service/dist/godspeed.js\n- /home/ayushghai/godspeed/projects/gs-node-templates/LOS/dist/index.js\n at Module._resolveFilename (node:internal/modules/cjs/loader:1143:15)\n at Module._load (node:internal/modules/cjs/loader:984:27)\n at Module.require (node:internal/modules/cjs/loader:1234:19)\n at Hook._require.Module.require (/home/ayushghai/godspeed/projects/gs-node-templates/LOS/node_modules/require-in-the-middle/index.js:167:34)\n at Hook._require.Module.require (/home/ayushghai/godspeed/projects/gs-node-templates/LOS/node_modules/require-in-the-middle/index.js:167:34)\n at Hook._require.Module.require (/home/ayushghai/godspeed/projects/gs-node-templates/LOS/node_modules/require-in-the-middle/index.js:167:34)\n at require (node:internal/modules/helpers:176:18)\n at Object.<anonymous> (/home/ayushghai/godspeed/gs-plugins/plugins/axios-as-datasource/node_modules/@godspeedsystems/core/dist/godspeed.js:184:9)\n at Module._compile (node:internal/modules/cjs/loader:1375:14)\n at Module._extensions..js (node:internal/modules/cjs/loader:1434:10)\n at Module.load (node:internal/modules/cjs/loader:1206:32)\n at Module._load (node:internal/modules/cjs/loader:1022:12)\n at Module.require (node:internal/modules/cjs/loader:1234:19)\n at Hook._require.Module.require (/home/ayushghai/godspeed/projects/gs-node-templates/LOS/node_modules/require-in-the-middle/index.js:188:39)\n at Hook._require.Module.require (/home/ayushghai/godspeed/projects/gs-node-templates/LOS/node_modules/require-in-the-middle/index.js:188:39)\n at Hook._require.Module.require (/home/ayushghai/godspeed/projects/gs-node-templates/LOS/node_modules/require-in-the-middle/index.js:188:39)\n at require (node:internal/modules/helpers:176:18)\n at Object.<anonymous> (/home/ayushghai/godspeed/gs-plugins/plugins/axios-as-datasource/dist/index.js:27:16)\n at Module._compile (node:internal/modules/cjs/loader:1375:14)\n at Module._extensions..js (node:internal/modules/cjs/loader:1434:10)\n at Module.load (node:internal/modules/cjs/loader:1206:32)\n at Module._load (node:internal/modules/cjs/loader:1022:12)\n at Module.require (node:internal/modules/cjs/loader:1234:19)\n at Hook._require.Module.require (/home/ayushghai/godspeed/projects/gs-node-templates/LOS/node_modules/require-in-the-middle/index.js:188:39)\n at Hook._require.Module.require (/home/ayushghai/godspeed/projects/gs-node-templates/LOS/node_modules/require-in-the-middle/index.js:188:39)\n at Hook._require.Module.require (/home/ayushghai/godspeed/projects/gs-node-templates/LOS/node_modules/require-in-the-middle/index.js:188:39)\n at require (node:internal/modules/helpers:176:18)\n at Object.<anonymous> (/home/ayushghai/godspeed/projects/gs-node-templates/LOS/dist/datasources/types/axios.js:11:35)\n at Module._compile (node:internal/modules/cjs/loader:1375:14)\n at Module._extensions..js (node:internal/modules/cjs/loader:1434:10)\n at Module.load (node:internal/modules/cjs/loader:1206:32)\n at Module._load (node:internal/modules/cjs/loader:1022:12)\n at Module.require (node:internal/modules/cjs/loader:1234:19)\n at Hook._require.Module.require (/home/ayushghai/godspeed/projects/gs-node-templates/LOS/node_modules/require-in-the-middle/index.js:188:39)\n at Hook._require.Module.require (/home/ayushghai/godspeed/projects/gs-node-templates/LOS/node_modules/require-in-the-middle/index.js:188:39)\n at Hook._require.Module.require (/home/ayushghai/godspeed/projects/gs-node-templates/LOS/node_modules/require-in-the-middle/index.js:188:39)\n at require (node:internal/modules/helpers:176:18)\n at /home/ayushghai/godspeed/gs-node-service/dist/core/datasourceLoader.js:218:149\n at process.processTicksAndRejections (node:internal/process/task_queues:95:5)","code":"MODULE_NOT_FOUND","requireStack":["/home/ayushghai/godspeed/gs-plugins/plugins/axios-as-datasource/node_modules/@godspeedsystems/core/dist/godspeed.js","/home/ayushghai/godspeed/gs-plugins/plugins/axios-as-datasource/dist/index.js","/home/ayushghai/godspeed/projects/gs-node-templates/LOS/dist/datasources/types/axios.js","/home/ayushghai/godspeed/gs-node-service/dist/core/datasourceLoader.js","/home/ayushghai/godspeed/gs-node-service/dist/godspeed.js","/home/ayushghai/godspeed/projects/gs-node-templates/LOS/dist/index.js"]}}}
[nodemon] app crashed - waiting for file changes before starting...
CLI Version: 2.9.1
Linux
godspeed commands serve
, preview
and build
don't pick up NODE_ENV variable specified by the user. If we specify NODE_ENV either in .env file or directly export in the terminal, it is always setting NODE_ENV to 'production'.
NODE_ENV set by the user should not be overridden.
In the index.ts
, NODE_ENV is specified and overriding the user specified env variable. This is the sample of build command. Same kind of changes are needed in all the three commands.
program
.command("build")
.description("build the godspeed project. create a production build.")
.action(async (options) => {
if (await isAGodspeedProject()) {
spawnSync("npm", ["run", "build"], {
stdio: "inherit",
env: {
...process.env,
NODE_ENV: "production",
},
});
}
});
Step 1: Install Godspeed CLI
# Install the Godspeed CLI globally
npm install -g @godspeedsystems/cli
This package will install "Godspeed" on your machine.
Step 2: Create a New Godspeed Project
# Create a new Godspeed project
godspeed create <projectName>
Choose one of the following options to proceed, and it will guide you through the prerequisites:
Step 3: Initialize Project
If you choose a Greenfield project:
Step 4: Event Handling
Implement HTTP and Kafka event handling:
HTTP events:
# HTTP Event Handling
'http.post./set-redis':
fn: set-redis
body:
content:
application/json:
schema:
type: object
properties:
name:
type: string
required: ['name']
responses:
200:
content:
application/json:
schema:
type: object
properties:
name:
type: string
Kafka events:
# Kafka Event Handling
kafka.kafka_topic.kafka_groupId:
id: kafka__consumer
fn: kafka_con
body:
description: The body of the query
content:
application/json:
schema:
type: string
Step 5: Data Validation
Implement validation for request body, parameters, and response.
Step 6: Workflow Setup
Define your project workflow, including tasks such as:
id: hello_world_function
summary: Call an API and transform the
tasks:
- id: transform_fn_step1
description: add a message property
fn: com.gs.switch
value: <% inputs.body.name %>
cases:
'ashutosh':
- id: case_ashutosh
fn: com.gs.return
args: |
<% return { name: "Hello Ashutosh!" } %>
'shubham':
- id: case_shubham
fn: com.gs.return
args: |
<% return { name: "Hello Shubham!" } %>
Step 7: JavaScript Integration
- id: step1
description: upload documents
fn: com.gs.http
args:
datasource: httpbin
params:
data: |
<js% {
[inputs.body.entity_type + 'id']: inputs.body.entity_id,
_.omit(inputs.body, ['entity_type', 'entity_id'])}
%>
Step 8: CRUD API Generation
# Generate CRUD APIs
godspeed generate crud-api
Step 9: Front-end Generation
Generate the front-end components as needed for your project.
# Generate UI components
godspeed generate ui
Step 10: Argo CD Installation
Install Godspeed's Argo CD plugin for continuous deployment.
Step 11: Deployment
Use Godspeed to deploy your project using Argo CD or other deployment tools.
Test godspeed update
Remove dev
command from options of Godspeed command utility because now it is replaced by serve.
Currently this feature is not functional, while creating a project or import a template into existing project.
There will be a command to import template from github repo or local project
Developer can import from github repo with subfolder [optional] or he can import from a local file system
Dev can do this while creating a project [add to existing command to create project]
godspeed create <project_name> --from-template <path_to_github_repo>::<sub_folder_path>
[p2]
godspeed create <project_name> --from-template <path_to_local_fs>
godspeed create <project_name> --from-template <path_to_github_repo>
[p2]
Dev can add to an existing project
godspeed template add <path_to_github_repo>::<sub_folder_path>
[p2]
godspeed template add <path_to_github_repo>
[p2]
godspeed template add <path_to_fs_folder>
Error in "docker compose down": spawn docker compose ENOENT
@sundar-godspeed Please create a video where we demonstrate how to add Google Oauth2 in an express eventsource in Godspeed.
We already have a helm file for a godspeed service. To confirm with @avtar-mindgrep and copy that to newly created project.
Similar issue in gs-plugins repo.
Developer often need to reuse existing code and configs. This way companies developer and reuse their infra. This infra could be docker files, helm charts, plugins (datasource, eventsource), sample code, project scaffoldings, READMEs, whole projects itself or anything under the sun.
Currently there is now way for a developer to import files from another folder (a remote git repository, or a local folder). This is useful when importing sample code and configs from a Godspeed plugin, project template or a starter scaffolding.
. The developer should be able to pick up and choose what it wants to use in the project.
For ex. a kafka plugin could have sample docker-compose, .env , config, src, docs, README.md, tsconfig.json, a docs/swagger.json etc. Developer may choose to import selected files and configs.
Developer may choose to do this during plugin installation process or anytime after it is installed.
src/{events,functions,mappings}, config/{default,custom-environment-variables}
extract
, async function merge(src: Path, dest: Path, exportConfig: Path | JSON): GSStatus {}
exportConfig
will be a yaml/json file path or a JSON itself). Define a json format in which the importing logic from the source folder is defined (for ex. which files, folder to import. whether to import in append mode or overwrite mode. Can set merge policy per file or for the whole folder. Default merge mode is append mode (in case the file exists in destination folder).defaults:
mergePolicy: 'append' # <MergePolicy can be append or overwrite. Default value of this default mergePolicy is append. This applies at a file level.
imports: # Each array item is either a string or a kay value pair
# {[key:String]: <MergePolicy | undefined>} Each entry (as you would express in Typescript)
- .env: append # can leave value as append, overwrrite or undefined.
# If you leave undefined default merge policy
# will get executed
- config: overwrite # path can be a folder or a file
- src/datasources/types/kafka.ts # use default defaults.mergePolicy
- src/eventsources/types/kafka.ts # use default defaults.mergePolicy
- src/events/kafka/helloworld.ts # use default defaults.mergePolicy
- src/functions/kafka/ts/helloworld.ts # use default defaults.mergePolicy
- src/functions/kafka/yaml/helloworld.yaml # use default defaults.mergePolicy
exports file
. This can be done before, during or after the plugin install process (Go back to the 1st point of this list).The schema of responses is incorrect as per swagger 3.0 spec when we generate CRUD apis using CLI.
it is like this
responses:
content:
'204':
application/json:
schema:
type: object
it should be like this
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"type": "array"
}
}
}
}
}
Basically, when we execute godspeed update, the image is getting pulled but the code doesn't get reflected in the container. If we check docker images
on macOS then it's showing the older images only.
Seems like, the pulled image is not loaded in the system and not reflected in the container also.
This is working fine on Ubuntu, only observed on MacOS for now.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.