Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
ce88822
feat: allow running workflows using cli command
Niraj-Kamdar Jun 8, 2022
ebd2fe5
fix: template and cli tests
Niraj-Kamdar Jun 9, 2022
8f59388
chore: fix typo
Niraj-Kamdar Jun 9, 2022
dda1fa1
Merge remote-tracking branch 'upstream/prealpha-dev' into nk/cli-work…
Niraj-Kamdar Jun 10, 2022
e4eab34
chore: fix merge issues
Niraj-Kamdar Jun 10, 2022
cb95372
feat(cli): add support for output validation for workflows
Niraj-Kamdar Jun 10, 2022
552584f
fix(cli): no-command help test
Niraj-Kamdar Jun 10, 2022
aa68c1d
fix(templates): assemblyscript example template
Niraj-Kamdar Jun 10, 2022
79f3167
fix(cli): tests
Niraj-Kamdar Jun 10, 2022
095f39a
debug(cli): cue validator
Niraj-Kamdar Jun 13, 2022
89394e3
fix(templates): recipe tests
Niraj-Kamdar Jun 13, 2022
0b2dd51
fix(cli): tempdir not set issue
Niraj-Kamdar Jun 13, 2022
a8a557f
chore: fix typo in package.json
Niraj-Kamdar Jun 13, 2022
9c22c9d
chore: update with latest changes
cbrzn Jun 15, 2022
366fc4f
refactor: remove debugging logs
Niraj-Kamdar Jun 17, 2022
3af35e1
Merge remote-tracking branch 'upstream/prealpha-dev' into nk/cli-work…
Niraj-Kamdar Jun 17, 2022
bdf0676
Merge remote-tracking branch 'upstream/prealpha-dev' into nk/cli-work…
Niraj-Kamdar Jun 18, 2022
dc1eff0
fix: issues
Niraj-Kamdar Jun 20, 2022
ea2b462
chore: update yarn.lock
Niraj-Kamdar Jun 20, 2022
fa13c36
chore: rename web3api to polywrap
Niraj-Kamdar Jun 20, 2022
a283fbe
fix: cli test
cbrzn Jun 20, 2022
64cb025
fix: issues
Niraj-Kamdar Jun 20, 2022
0eee7bc
Merge remote-tracking branch 'upstream/nk/cli-workflow' into nk/cli-w…
Niraj-Kamdar Jun 20, 2022
4f8cfb3
fix: tests
Niraj-Kamdar Jun 20, 2022
4cfd849
Update packages/cli/lang/en.json
Niraj-Kamdar Jun 20, 2022
2ee1b14
Update packages/cli/lang/es.json
Niraj-Kamdar Jun 20, 2022
fbaf3ec
fix: issues
Niraj-Kamdar Jun 20, 2022
ffeb53e
Merge remote-tracking branch 'upstream/nk/cli-workflow' into nk/cli-w…
Niraj-Kamdar Jun 20, 2022
ddcd98e
fix: tests
Niraj-Kamdar Jun 20, 2022
caceabf
Merge branch 'prealpha-dev' into nk/cli-workflow
dOrgJelli Jun 23, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .github/workflows/js-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,16 @@ jobs:
with:
node-version: '${{ steps.nvm.outputs.NVMRC }}'

- uses: actions/setup-go@v3
with:
go-version: '^1.13.1'

- name: Install cue lang
run: go install cuelang.org/go/cmd/cue@latest

- name: Check if cue is installed
run: cue version

- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
Expand Down
83 changes: 45 additions & 38 deletions packages/cli/lang/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,6 @@
"commands_create_options_o": "Output directory for the new project",
"commands_create_options_o_path": "path",
"commands_create_options_projectName": "project-name",
"commands_query_options_recipeScript": "Path to recipe script",
"commands_create_overwritePrompt": "Do you want to overwrite this directory?",
"commands_create_overwriting": "Overwriting {dir}...",
"commands_create_readyApp": "You are ready to build an app using Polywrap",
Expand Down Expand Up @@ -140,43 +139,51 @@
"commands_plugin_options_path": "path",
"commands_plugin_options_publish": "Output path for the built schema and manifest (default: {default})",
"commands_plugin_options_codegen": "Output directory for the generated types (default: {default})",
"commands_query_options_configPath": "config-path",
"commands_query_options_outputFilePath": "output-file-path",
"commands_query_options_config": "Add custom configuration to the PolywrapClient",
"commands_query_options_outputFile": "Output file path for the query result",
"commands_query_options_quiet": "Suppress output",
"commands_query_error_outputFileMissing": "{option} option missing {argument} argument",
"commands_query_error_clientConfigMissingPath": "{option} option missing {argument} argument",
"commands_query_error_clientConfigModuleMissingExport": "Custom client config module missing named export 'getClientConfig' at {module}",
"commands_query_error_clientConfigInvalidFileExt": "Custom client config file: {module} must be a JS/TS file",
"commands_query_error_clientConfigNotObject": "Custom client config must be an object",
"commands_query_error_redirectsExportNotArray": "Exported redirects must be an array",
"commands_query_error_redirectsItemNotValid": "Redirect at index {index} must be an object with properties 'from' and 'to'",
"commands_query_error_redirectsItemFromNotString": "Redirect property 'from' at index {index} must be a valid wrap:// URI string",
"commands_query_error_redirectsItemToNotStringOrObject": "Redirect property 'to' at index {index} must be a valid wrap:// URI string, or a plugin",
"commands_query_error_redirectsItemToNotValidPlugin": "Redirect property 'to' at index {index} must be a valid plugin instance",
"commands_query_error_pluginsExportNotArray": "Exported plugins must be an array",
"commands_query_error_pluginsItemNotObject": "Plugin at index {index} must be an object with properties 'uri' and 'plugin'",
"commands_query_error_pluginsItemUriNotString": "Plugin property 'uri' at index {index} must be a valid wrap:// URI string",
"commands_query_error_pluginsItemPluginNotObject": "Plugin property 'plugin' at index {index} must be an object with properties 'factory' and 'manifest'",
"commands_query_error_pluginsItemPluginFactoryNotFunction": "Plugin property 'plugin.factory' at index {index} must be a function",
"commands_query_error_pluginsItemPluginManifestNotObject": "Plugin property 'plugin.manifest' at index {index} must be an object",
"commands_query_error_interfacesExportNotArray": "Exported interfaces must be an array",
"commands_query_error_interfacesItemNotObject": "Interface at index {index} must be an object with properties 'interface' and 'implementations'",
"commands_query_error_interfacesItemInterfaceNotString": "Interface property 'interface' at index {index} must be a valid wrap:// URI string",
"commands_query_error_interfacesItemImplementationsNotArray": "Interface property 'implementations' at index {index} must be an array",
"commands_query_error_interfacesItemImplementationsEmpty": "Interface property 'implementations' at index {index} must not be an empty array",
"commands_query_error_interfacesItemImplementationsItemNotString": "Implementation at index ({index}, {implementationIndex}) must be a valid wrap:// URI string",
"commands_query_error_envsExportNotArray": "Exported envs must be an array",
"commands_query_error_envsItemNotObject": "Env at index {index} must be an object with properties 'uri' and optional properties 'common', 'query', and 'mutation'",
"commands_query_error_envsItemUriNotString": "Env property 'uri' at index {index} must be a valid wrap:// URI string",
"commands_query_error_envsItemModuleNotObject": "Env property 'module' at index {index} must be an object",
"commands_query_description": "Query wrappers using recipe scripts",
"commands_query_error_missingScript": "Required argument {script} is missing",
"commands_query_error_noWrapper": "Wrapper needs to be initialized",
"commands_query_error_readFail": "Failed to read query {query}",
"commands_query_error_noRecipeScriptFound": "Recipe script not found at path: {path}",
"commands_query_error_noTestEnvFound": "polywrap test-env not found, please run 'polywrap infra up --modules=eth-ens-ipfs'",
"commands_run_options_workflow": "workflow",
"commands_run_options_workflowScript": "Path to workflow script",
"commands_run_options_configPath": "config-path",
"commands_run_options_outputFilePath": "output-file-path",
"commands_run_options_config": "Add custom configuration to the PolywrapClient",
"commands_run_options_validateScript": "Validate the output of the workflow jobs",
"commands_run_options_validate": "cue-file",
"commands_run_options_outputFile": "Output file path for the workflow result",
"commands_run_options_quiet": "Suppress output",
"commands_run_options_jobIds": "jobs",
"commands_run_options_jobs": "Specify ids of jobs that you want to run",
"commands_run_error_validatorNotFound": "validate script not found at: {path}",
"commands_run_error_outputFileMissing": "{option} option missing {argument} argument",
"commands_run_error_clientConfigMissingPath": "{option} option missing {argument} argument",
"commands_run_error_clientConfigModuleMissingExport": "Custom client config module missing named export 'getClientConfig' at {module}",
"commands_run_error_clientConfigInvalidFileExt": "Custom client config file: {module} must be a JS/TS file",
"commands_run_error_clientConfigNotObject": "Custom client config must be an object",
"commands_run_error_redirectsExportNotArray": "Exported redirects must be an array",
"commands_run_error_redirectsItemNotValid": "Redirect at index {index} must be an object with properties 'from' and 'to'",
"commands_run_error_redirectsItemFromNotString": "Redirect property 'from' at index {index} must be a valid wrap:// URI string",
"commands_run_error_redirectsItemToNotStringOrObject": "Redirect property 'to' at index {index} must be a valid wrap:// URI string, or a plugin",
"commands_run_error_redirectsItemToNotValidPlugin": "Redirect property 'to' at index {index} must be a valid plugin instance",
"commands_run_error_pluginsExportNotArray": "Exported plugins must be an array",
"commands_run_error_pluginsItemNotObject": "Plugin at index {index} must be an object with properties 'uri' and 'plugin'",
"commands_run_error_pluginsItemUriNotString": "Plugin property 'uri' at index {index} must be a valid wrap:// URI string",
"commands_run_error_pluginsItemPluginNotObject": "Plugin property 'plugin' at index {index} must be an object with properties 'factory' and 'manifest'",
"commands_run_error_pluginsItemPluginFactoryNotFunction": "Plugin property 'plugin.factory' at index {index} must be a function",
"commands_run_error_pluginsItemPluginManifestNotObject": "Plugin property 'plugin.manifest' at index {index} must be an object",
"commands_run_error_interfacesExportNotArray": "Exported interfaces must be an array",
"commands_run_error_interfacesItemNotObject": "Interface at index {index} must be an object with properties 'interface' and 'implementations'",
"commands_run_error_interfacesItemInterfaceNotString": "Interface property 'interface' at index {index} must be a valid wrap:// URI string",
"commands_run_error_interfacesItemImplementationsNotArray": "Interface property 'implementations' at index {index} must be an array",
"commands_run_error_interfacesItemImplementationsEmpty": "Interface property 'implementations' at index {index} must not be an empty array",
"commands_run_error_interfacesItemImplementationsItemNotString": "Implementation at index ({index}, {implementationIndex}) must be a valid wrap:// URI string",
"commands_run_error_envsExportNotArray": "Exported envs must be an array",
"commands_run_error_envsItemNotObject": "Env at index {index} must be an object with properties 'uri'",
"commands_run_error_envsItemUriNotString": "Env property 'uri' at index {index} must be a valid wrap:// URI string",
"commands_run_error_envsItemModuleNotObject": "Env property 'env' at index {index} must be an object",
"commands_run_description": "Runs workflow script",
"commands_run_error_missingScript": "Required argument {script} is missing",
"commands_run_error_noApi": "API needs to be initialized",
"commands_run_error_readFail": "Failed to read query {query}",
"commands_run_error_unsupportedOutputFileExt": "Unsupported outputFile extention: ${outputFileExt}",
"commands_run_error_noWorkflowScriptFound": "Workflow script not found at path: {path}",
"commands_run_error_noTestEnvFound": "polywrap test-env not found, please run 'polywrap infra up --modules=eth-ens-ipfs'",
"commands_testEnv_description": "Manage a test environment for Polywrap",
"commands_testEnv_error_never": "This should never happen...",
"commands_testEnv_error_noCommand": "No command given",
Expand Down
84 changes: 45 additions & 39 deletions packages/cli/lang/es.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

{
"commands_build_description": "Builds a wrapper",
"commands_build_error_manifestPathMissing": "{option} option missing {argument} argument",
Expand Down Expand Up @@ -103,7 +102,6 @@
"commands_create_options_o": "Output directory for the new project",
"commands_create_options_o_path": "path",
"commands_create_options_projectName": "project-name",
"commands_query_options_recipeScript": "Path to recipe script",
"commands_create_overwritePrompt": "Do you want to overwrite this directory?",
"commands_create_overwriting": "Overwriting {dir}...",
"commands_create_readyApp": "You are ready to build an app using Polywrap",
Expand Down Expand Up @@ -141,43 +139,51 @@
"commands_plugin_options_path": "path",
"commands_plugin_options_publish": "Output path for the built schema and manifest (default: {default})",
"commands_plugin_options_codegen": "Output directory for the generated types (default: {default})",
"commands_query_options_configPath": "config-path",
"commands_query_options_outputFilePath": "output-file-path",
"commands_query_options_config": "Add custom configuration to the PolywrapClient",
"commands_query_options_outputFile": "Output file path for the query result",
"commands_query_options_quiet": "Suppress output",
"commands_query_error_outputFileMissing": "{option} option missing {argument} argument",
"commands_query_error_clientConfigMissingPath": "{option} option missing {argument} argument",
"commands_query_error_clientConfigModuleMissingExport": "Custom client config module missing named export 'getClientConfig' at {module}",
"commands_query_error_clientConfigInvalidFileExt": "Custom client config file: {module} must be a JS/TS file",
"commands_query_error_clientConfigNotObject": "Custom client config must be an object",
"commands_query_error_redirectsExportNotArray": "Exported redirects must be an array",
"commands_query_error_redirectsItemNotValid": "Redirect at index {index} must be an object with properties 'from' and 'to'",
"commands_query_error_redirectsItemFromNotString": "Redirect property 'from' at index {index} must be a valid wrap:// URI string",
"commands_query_error_redirectsItemToNotStringOrObject": "Redirect property 'to' at index {index} must be a valid wrap:// URI string, or a plugin",
"commands_query_error_redirectsItemToNotValidPlugin": "Redirect property 'to' at index {index} must be a valid plugin instance",
"commands_query_error_pluginsExportNotArray": "Exported plugins must be an array",
"commands_query_error_pluginsItemNotObject": "Plugin at index {index} must be an object with properties 'uri' and 'plugin'",
"commands_query_error_pluginsItemUriNotString": "Plugin property 'uri' at index {index} must be a valid wrap:// URI string",
"commands_query_error_pluginsItemPluginNotObject": "Plugin property 'plugin' at index {index} must be an object with properties 'factory' and 'manifest'",
"commands_query_error_pluginsItemPluginFactoryNotFunction": "Plugin property 'plugin.factory' at index {index} must be a function",
"commands_query_error_pluginsItemPluginManifestNotObject": "Plugin property 'plugin.manifest' at index {index} must be an object",
"commands_query_error_interfacesExportNotArray": "Exported interfaces must be an array",
"commands_query_error_interfacesItemNotObject": "Interface at index {index} must be an object with properties 'interface' and 'implementations'",
"commands_query_error_interfacesItemInterfaceNotString": "Interface property 'interface' at index {index} must be a valid wrap:// URI string",
"commands_query_error_interfacesItemImplementationsNotArray": "Interface property 'implementations' at index {index} must be an array",
"commands_query_error_interfacesItemImplementationsEmpty": "Interface property 'implementations' at index {index} must not be an empty array",
"commands_query_error_interfacesItemImplementationsItemNotString": "Implementation at index ({index}, {implementationIndex}) must be a valid wrap:// URI string",
"commands_query_error_envsExportNotArray": "Exported envs must be an array",
"commands_query_error_envsItemNotObject": "Env at index {index} must be an object with properties 'uri'",
"commands_query_error_envsItemUriNotString": "Env property 'uri' at index {index} must be a valid wrap:// URI string",
"commands_query_error_envsItemModuleNotObject": "Env property 'common' at index {index} must be an object",
"commands_query_description": "Query wrappers using recipe scripts",
"commands_query_error_missingScript": "Required argument {script} is missing",
"commands_query_error_noWrapper": "Wrapper needs to be initialized",
"commands_query_error_readFail": "Failed to read query {query}",
"commands_query_error_noRecipeScriptFound": "Recipe script not found at path: {path}",
"commands_query_error_noTestEnvFound": "polywrap test-env not found, please run 'polywrap infra up --modules=eth-ens-ipfs'",
"commands_run_options_workflow": "workflow",
"commands_run_options_workflowScript": "Path to workflow script",
"commands_run_options_configPath": "config-path",
"commands_run_options_outputFilePath": "output-file-path",
"commands_run_options_config": "Add custom configuration to the PolywrapClient",
"commands_run_options_validateScript": "Validate the output of the workflow jobs",
"commands_run_options_validate": "cue-file",
"commands_run_options_outputFile": "Output file path for the workflow result",
"commands_run_options_quiet": "Suppress output",
"commands_run_options_jobIds": "jobs",
"commands_run_options_jobs": "Specify ids of jobs that you want to run",
"commands_run_error_validatorNotFound": "validate script not found at: {path}",
"commands_run_error_outputFileMissing": "{option} option missing {argument} argument",
"commands_run_error_clientConfigMissingPath": "{option} option missing {argument} argument",
"commands_run_error_clientConfigModuleMissingExport": "Custom client config module missing named export 'getClientConfig' at {module}",
"commands_run_error_clientConfigInvalidFileExt": "Custom client config file: {module} must be a JS/TS file",
"commands_run_error_clientConfigNotObject": "Custom client config must be an object",
"commands_run_error_redirectsExportNotArray": "Exported redirects must be an array",
"commands_run_error_redirectsItemNotValid": "Redirect at index {index} must be an object with properties 'from' and 'to'",
"commands_run_error_redirectsItemFromNotString": "Redirect property 'from' at index {index} must be a valid wrap:// URI string",
"commands_run_error_redirectsItemToNotStringOrObject": "Redirect property 'to' at index {index} must be a valid wrap:// URI string, or a plugin",
"commands_run_error_redirectsItemToNotValidPlugin": "Redirect property 'to' at index {index} must be a valid plugin instance",
"commands_run_error_pluginsExportNotArray": "Exported plugins must be an array",
"commands_run_error_pluginsItemNotObject": "Plugin at index {index} must be an object with properties 'uri' and 'plugin'",
"commands_run_error_pluginsItemUriNotString": "Plugin property 'uri' at index {index} must be a valid wrap:// URI string",
"commands_run_error_pluginsItemPluginNotObject": "Plugin property 'plugin' at index {index} must be an object with properties 'factory' and 'manifest'",
"commands_run_error_pluginsItemPluginFactoryNotFunction": "Plugin property 'plugin.factory' at index {index} must be a function",
"commands_run_error_pluginsItemPluginManifestNotObject": "Plugin property 'plugin.manifest' at index {index} must be an object",
"commands_run_error_interfacesExportNotArray": "Exported interfaces must be an array",
"commands_run_error_interfacesItemNotObject": "Interface at index {index} must be an object with properties 'interface' and 'implementations'",
"commands_run_error_interfacesItemInterfaceNotString": "Interface property 'interface' at index {index} must be a valid wrap:// URI string",
"commands_run_error_interfacesItemImplementationsNotArray": "Interface property 'implementations' at index {index} must be an array",
"commands_run_error_interfacesItemImplementationsEmpty": "Interface property 'implementations' at index {index} must not be an empty array",
"commands_run_error_interfacesItemImplementationsItemNotString": "Implementation at index ({index}, {implementationIndex}) must be a valid wrap:// URI string",
"commands_run_error_envsExportNotArray": "Exported envs must be an array",
"commands_run_error_envsItemNotObject": "Env at index {index} must be an object with properties 'uri'",
"commands_run_error_envsItemUriNotString": "Env property 'uri' at index {index} must be a valid wrap:// URI string",
"commands_run_error_envsItemModuleNotObject": "Env property 'env' at index {index} must be an object",
"commands_run_description": "Runs workflow script",
"commands_run_error_missingScript": "Required argument {script} is missing",
"commands_run_error_noApi": "API needs to be initialized",
"commands_run_error_readFail": "Failed to read query {query}",
"commands_run_error_unsupportedOutputFileExt": "Unsupported outputFile extention: ${outputFileExt}",
"commands_run_error_noWorkflowScriptFound": "Workflow script not found at path: {path}",
"commands_run_error_noTestEnvFound": "polywrap test-env not found, please run 'polywrap infra up --modules=eth-ens-ipfs'",
"commands_testEnv_description": "Manage a test environment for Polywrap",
"commands_testEnv_error_never": "This should never happen...",
"commands_testEnv_error_noCommand": "No command given",
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/src/__tests__/e2e/help.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ Commands:
create|c Create a new project with polywrap CLI
deploy|d [options] Deploys/Publishes a Polywrap
plugin|p Build/generate types for the plugin
query|q [options] <recipe> Query wrappers using recipe scripts
infra|i [options] <action> Manage infrastructure for your wrapper
run|r [options] <workflow> Runs workflow script
help [command] display help for command
`;

Expand Down
Loading