viur-framework / viur-cli Goto Github PK
View Code? Open in Web Editor NEWCommand-line interface for managing and developing ViUR
License: MIT License
Command-line interface for managing and developing ViUR
License: MIT License
Remove viur flare command and encapsule logic behind a tool
The Repository https://github.com/phorward/viur-tools contains further tools which could be implemented into viur-cli as well.
viur-cli import
command for that?viur-cli 2to3
command?The other tools like updatedb.sh, copyblobs.py or copydb.py are only relevant to ViUR2 and should be ignored.
viur-cli import
command and sub-commands, providing general export tooling for ViUR databases, kinds or specific entities, with the following features:
The features from csvimport.py are necessary, e.g. looking up for keys or codes, replacing values etc. (logics-expressions).
Hello!
I'm currently experimenting with Google Cloud Shell and tried to run a viur cloud setup gcloud
command in my home folder, with a fake project.json
and no deploy folder.
$ viur cloud setup gcloud
Enter PROJECT_ID: xxx-viur3
Check if user is authorized with gcloud....
Operation "operations/acat.p2-799407658776-5713ecae-5dde-4a55-b286-26f9ab92b842" finished successfully.
Operation "operations/acf.p2-799407658776-fbf62221-ce5e-4f8b-a10b-4e2555e5b9b5" finished successfully.
Operation "operations/acat.p2-799407658776-3f617a3e-55aa-4092-97c0-23d40dba8aaf" finished successfully.
Operation "operations/acf.p2-799407658776-1bf01b22-97a1-4745-b735-d1237862a742" finished successfully.
Operation "operations/acf.p2-799407658776-6756081d-adac-4c44-a0db-973e9554a6ad" finished successfully.
Operation "operations/acf.p2-799407658776-8da2776e-f8f0-4194-94f0-86aa6d6e6acf" finished successfully.
Operation "operations/acat.p2-799407658776-e34a8bae-8f06-417c-9eb9-542858c30dce" finished successfully.
/bin/sh: line 1: cd: deploy: No such file or directory
Error executing command: Command 'cd deploy && gcloud app deploy -q --project=xxx-viur3 cron.yaml' returned non-zero exit status 1.
/bin/sh: line 1: cd: deploy: No such file or directory
Error executing command: Command 'cd deploy && gcloud app deploy -q --project=xxx-viur3 queue.yaml' returned non-zero exit status 1.
/bin/sh: line 1: cd: deploy: No such file or directory
Error executing command: Command 'cd deploy && gcloud app deploy -q --project=xxx-viur3 index.yaml' returned non-zero exit status 1.
Check if app engine default credentials are set...
INFO: All done!
You should now be able to run your project locally with
viur run
At the first run, it might happen that some functions are
causing error 500 because indexes are not immediately
served. Therefore, maybe wait a few minutes.
Have a nice day.
This result is confusing. Generally, the workflow should in this case be something like viur init
to initialize a new, empty base-project. viur cloud setup gcloud
should fail immediatelly when there is no deploy folder, with a hint that viur init
should be executed first.
and please don't use these fixed versions. At least at patch level it should be relaxed.
I recommend to use ~=
like app-server~=0.9.9
In the past 2 years, a lot of Dialogues have changed to obscurity.
We should revisit them before deploying v2.0.0
If you insert an index into index.yaml
which already exists there, the duplicate should be removed instead of sorting it twice in a row.
A question to the scriptor-development: When I do viur install scriptor
it now creates a deploy in deploy/scriptor, where a scriptor and a static is inside.
The installation of viur-cli
fails with python 3.10
.
$ python -m pip install viur-cli
Defaulting to user installation because normal site-packages is not writeable
Collecting viur-cli
Using cached viur_cli-0.6.1-py3-none-any.whl (16 kB)
Requirement already satisfied: watchgod==0.7 in /home/sven/.local/lib/python3.10/site-packages (from viur-cli) (0.7)
Requirement already satisfied: pipfile-requirements==0.3.0 in /home/sven/.local/lib/python3.10/site-packages (from viur-cli) (0.3.0)
Requirement already satisfied: click==8.0.3 in /home/sven/.local/lib/python3.10/site-packages (from viur-cli) (8.0.3)
Using cached viur_cli-0.6-py3-none-any.whl (16 kB)
Using cached viur_cli-0.5.5-py3-none-any.whl (14 kB)
Using cached viur_cli-0.5.1-py3-none-any.whl (12 kB)
ERROR: Cannot install viur-cli==0.5.1, viur-cli==0.5.5, viur-cli==0.6 and viur-cli==0.6.1 because these package versions have conflicting dependencies.
The conflict is caused by:
viur-cli 0.6.1 depends on python-minifier==2.4.2
viur-cli 0.6 depends on python-minifier==2.4.2
viur-cli 0.5.5 depends on python-minifier==2.4.2
viur-cli 0.5.1 depends on python-minifier==2.4.2
To fix this you could try to:
1. loosen the range of package versions you've specified
2. remove package versions to allow pip attempt to solve the dependency conflict
ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/user_guide/#fixing-conflicting-dependencies
The support for python 3.10 in the dependency python-minfier
was added in 2.5.0. I think an upgrade should solve this issue?
My machine runs with:
$ uname -a
Linux se-pc 5.10.89-1-MANJARO #1 SMP PREEMPT Wed Dec 29 18:09:17 UTC 2021 x86_64 GNU/Linux
$ python -V
Python 3.10.1
$ python -m pip -V
pip 21.3.1 from /usr/lib/python3.10/site-packages/pip (python 3.10)
Install viur-cli
with the --no-deps
flag:
python -m pip install viur-cli --no-deps
and the dependencies manually.
For the first deployment of a ViUR project
It is obsolete
I want to deploy my app under a different version name I would like to adjust with a variable that can be set by command-line.
In project.json
, I've got a configuration
"develop": {
"application_name": "xxx",
"version": "$(year)-$(month)-$(day)-$(user)"
}
now, let's assume I call viur deploy app develop --ext test
, then the generated version name should be 2023-11-16-neo-test
, but when I omit the --ext
, it shall just be 2023-11-16-neo
, as it is the case now.
Seperate builds and packages in project.json so the package module does not interfere with custom builds.
Example:
{
"default": {
"application_name": "",
"builds": {
"app": {
"command": "build",
"kind": "npm",
"source": "app"
},
"pyodide": {
"clean": "rm -rf ./deploy/pyodide",
"command": "python sources/viur-vi/vi/flare/tools/get-pyodide.py -t deploy/pyodide/",
"kind": "exec"
},
"vi": {
"clean": "rm -rf ./deploy/vi",
"command": "python sources/viur-vi/vi/flare/tools/flare.py -s sources/viur-vi/vi -t deploy/legacy-vi",
"kind": "package"
}
},
"packages": {
"admin": "4.1.5",
"scriptor": "2.1.2",
"core": "3.6.0b3"
},
"distribution_folder": "./deploy",
"sources_folder": "./sources",
"version": "$(year)-$(month)-$(day)-$(user)",
"vue": {}
},
"format": "2.0.0",
"live": {
"application_name": ""
}
}
register your apps and use the viur build app command
It should be considered to rename the command line tool viur-cli
to just viur
, as this makes the entire tool more integrative with ViUR itself (to make it a part of ViUR).
This tool can be used for sorting the deploy/index.yaml
file which is present in every ViUR project:
#!/usr/bin/python
import yaml
import logging
from typing import Union
def sort_yaml_file(file_name: str, dst_file_name: Union[str, None] = None):
if not dst_file_name:
dst_file_name = file_name
with open(file_name, "r") as source_file:
data = yaml.safe_load(source_file)
if not ("indexes" in data):
logging.error(f"There is no indexes main in file {file_name}")
return
data["indexes"] = sorted(data["indexes"], key=lambda k: k["kind"] if isinstance(k, dict) and "kind" in k else k)
with open(dst_file_name, "a+") as dst_file:
dst_file.seek(0)
dst_file.truncate()
dst_file.write(
yaml.dump(data).replace("- kind: ", "\n- kind: ")
)
logging.info(f"Successfully sorted the yaml file {file_name} into {dst_file_name}")
if __name__ == "__main__":
logging.getLogger().setLevel(logging.INFO)
try:
sort_yaml_file("index.yaml")
except FileNotFoundError:
logging.error("index.yaml not present!")
It should be integrated into viur-cli, or probably app_server.
After an update of the viur-cli on the first start of the program it would be nice, to see the recent release Notes.
When I try to update a pipenv with viur-cli==1.1.1 to Python 3.12, I'm getting dependency mismatch:
CRITICAL:pipenv.patched.pip._internal.resolution.resolvelib.factory:Ignored the following versions that require a different python version: 1.0.0 Requires-Python >=2.6, !=3.0.*, !=3.1.*, !=3.2.*, <3.8; 1.1.0 Requires-Python >=2.6, !=3.0.*, !=3.1.*, !=3.2.*, <3.8; 2.0.0 Requires-Python >=2.6, !=3.0.*, !=3.1.*, !=3.2.*, <3.8; 2.1.0 Requires-Python >=2.6, !=3.0.*, !=3.1.*, !=3.2.*, <3.8; 2.1.1 Requires-Python >=2.6, !=3.0.*, !=3.1.*, !=3.2.*, <3.8; 2.1.2 Requires-Python >=2.6, !=3.0.*, !=3.1.*, !=3.2.*, <3.8; 2.2.1 Requires-Python >=2.6, !=3.0.*, !=3.1.*, !=3.2.*, <3.9; 2.3.0 Requires-Python >=2.6, !=3.0.*, !=3.1.*, !=3.2.*, <3.9; 2.3.1 Requires-Python >=2.6, !=3.0.*, !=3.1.*, !=3.2.*, <3.9; 2.3.2 Requires-Python >=2.6, !=3.0.*, !=3.1.*, !=3.2.*, <3.9; 2.4.0 Requires-Python >=2.6, !=3.0.*, !=3.1.*, !=3.2.*, <3.10; 2.4.1 Requires-Python >=2.6, !=3.0.*, !=3.1.*, !=3.2.*, <3.10; 2.4.2 Requires-Python >=2.7, !=3.0.*, !=3.1.*, !=3.2.*, <3.10; 2.5.0 Requires-Python >=2.7, !=3.0.*, !=3.1.*, !=3.2.*, <3.11; 2.6.0 Requires-Python >=2.7, !=3.0.*, !=3.1.*, !=3.2.*, <3.11; 2.7.0 Requires-Python >=2.7, !=3.0.*, !=3.1.*, !=3.2.*, <3.12; 2.8.0 Requires-Python >=2.7, !=3.0.*, !=3.1.*, !=3.2.*, <3.12; 2.8.1 Requires-Python >=2.7, !=3.0.*, !=3.1.*, !=3.2.*, <3.12; 2.9.0 Requires-Python >=2.7, !=3.0.*, !=3.1.*, !=3.2.*, <3.12
CRITICAL:pipenv.patched.pip._internal.resolution.resolvelib.factory:Could not find a version that satisfies the requirement python-minifier==2.9.0 (from viur-cli) (from versions: none)
[ResolutionFailure]: File "/usr/lib/python3.11/site-packages/pipenv/resolver.py", line 645, in _main
[ResolutionFailure]: resolve_packages(
[ResolutionFailure]: File "/usr/lib/python3.11/site-packages/pipenv/resolver.py", line 612, in resolve_packages
[ResolutionFailure]: results, resolver = resolve(
[ResolutionFailure]: ^^^^^^^^
[ResolutionFailure]: File "/usr/lib/python3.11/site-packages/pipenv/resolver.py", line 592, in resolve
[ResolutionFailure]: return resolve_deps(
[ResolutionFailure]: ^^^^^^^^^^^^^
[ResolutionFailure]: File "/usr/lib/python3.11/site-packages/pipenv/utils/resolver.py", line 908, in resolve_deps
[ResolutionFailure]: results, hashes, internal_resolver = actually_resolve_deps(
[ResolutionFailure]: ^^^^^^^^^^^^^^^^^^^^^^
[ResolutionFailure]: File "/usr/lib/python3.11/site-packages/pipenv/utils/resolver.py", line 681, in actually_resolve_deps
[ResolutionFailure]: resolver.resolve()
[ResolutionFailure]: File "/usr/lib/python3.11/site-packages/pipenv/utils/resolver.py", line 442, in resolve
[ResolutionFailure]: raise ResolutionFailure(message=str(e))
[pipenv.exceptions.ResolutionFailure]: Warning: Your dependencies could not be resolved. You likely have a mismatch in your sub-dependencies.
You can use $ pipenv run pip install <requirement_name> to bypass this mechanism, then run $ pipenv graph to inspect the versions actually installed in the virtualenv.
Hint: try $ pipenv lock --pre if it is a pre-release dependency.
ERROR: No matching distribution found for python-minifier==2.9.0
Traceback (most recent call last):
File "/usr/bin/pipenv", line 8, in <module>
sys.exit(cli())
^^^^^
File "/usr/lib/python3.11/site-packages/pipenv/vendor/click/core.py", line 1157, in __call__
return self.main(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/pipenv/cli/options.py", line 58, in main
return super().main(*args, **kwargs, windows_expand_args=False)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/pipenv/vendor/click/core.py", line 1078, in main
rv = self.invoke(ctx)
^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/pipenv/vendor/click/core.py", line 1688, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/pipenv/vendor/click/core.py", line 1434, in invoke
return ctx.invoke(self.callback, **ctx.params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/pipenv/vendor/click/core.py", line 783, in invoke
return __callback(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/pipenv/vendor/click/decorators.py", line 92, in new_func
return ctx.invoke(f, obj, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/pipenv/vendor/click/core.py", line 783, in invoke
return __callback(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/pipenv/vendor/click/decorators.py", line 33, in new_func
return f(get_current_context(), *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/pipenv/cli/command.py", line 546, in update
do_update(
File "/usr/lib/python3.11/site-packages/pipenv/routines/update.py", line 59, in do_update
do_lock(
File "/usr/lib/python3.11/site-packages/pipenv/routines/lock.py", line 65, in do_lock
venv_resolve_deps(
File "/usr/lib/python3.11/site-packages/pipenv/utils/resolver.py", line 849, in venv_resolve_deps
c = resolve(cmd, st, project=project)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/pipenv/utils/resolver.py", line 718, in resolve
raise RuntimeError("Failed to lock Pipfile.lock!")
RuntimeError: Failed to lock Pipfile.lock!
As python-minifier was a depenceny of the already removed flare.py, this must be removed as well from the package.
After upgrading ViUR-cli to 1.0.3 and running it for the first time, I was very confused and had no idea how to answer these questions:
$ viur run develop
viur-cli tries to find npm applications
Do you want to add / to your apps? [y/N]: y
name []: sources
command [build]:
Do you want to add /viur-scriptor/ to your apps? [y/N]: y
name [scriptor]:
command [build]:
Do you want to add /viur-scriptor/src/usepython/ to your apps? [y/N]: y
name [scriptor_usepython]:
command [build]:
/
?I got this stacktrace after installing viur-cli in a fresh python310 env:
$ viur
Traceback (most recent call last):
File "/home/sven/.local/bin/viur", line 5, in <module>
from viur_cli import cli
File "/home/sven/.local/lib/python3.10/site-packages/viur_cli/__init__.py", line 10, in <module>
from .scriptor import script
File "/home/sven/.local/lib/python3.10/site-packages/viur_cli/scriptor/__init__.py", line 1, in <module>
from .cli import script
File "/home/sven/.local/lib/python3.10/site-packages/viur_cli/scriptor/cli.py", line 3, in <module>
import requests
ModuleNotFoundError: No module named 'requests'
I think requests
is missing here?
Lines 22 to 27 in 3393e54
the CLI should habe a function to check for exposed functions and other vulnerabilitys
This would be nice to update all ViUR dependencies at once (viur-core
, vi-admin
) and runs the necessary migration scripts.
The interactive prompts are annoying and sometimes disturb development flow. I always have to answer these two stupid and annoying questions... I just want to avoid it.
Now:
$ viur deploy app live
✔ No vulnerabilities found.
Do you want to regenerate the requirements.txt located in the ./deploy? [y/N]:
Services to deploy:
descriptor: [/home/neo/xxx/yyy/deploy/app.yaml]
source: [/home/neo/xxx/yyy/deploy]
target project: [yyy]
target service: [default]
target version: [2023-11-22-neo]
target url: [http://2023-11-22-neo.yyy.ey.r.appspot.com]
target service account: [[email protected]]
(add --promote if you also want to make this service available from
[http://yyy.ey.r.appspot.com])
Do you want to continue (Y/n)?
Wish:
$ viur deploy app live -y
✔ No vulnerabilities found.
requirements.txt successfully generated
Services to deploy:
descriptor: [/home/neo/xxx/yyy/deploy/app.yaml]
source: [/home/neo/xxx/yyy/deploy]
target project: [yyy]
target service: [default]
target version: [2023-11-22-neo]
target url: [http://2023-11-22-neo.yyy.ey.r.appspot.com]
target service account: [[email protected]]
(add --promote if you also want to make this service available from
[http://yyy.ey.r.appspot.com])
Beginning deployment of service [default]...
╔════════════════════════════════════════════════════════════╗
╠═ Uploading 12 files to Google Cloud Storage ═╣
╚════════════════════════════════════════════════════════════╝
File upload done.
Updating service [default]...done.
Deployed service [default] to [http://2023-11-22-neo.yyy.ey.r.appspot.com]
You can stream logs from the command line by running:
$ gcloud app logs tail -s default
To view your application in the web browser run:
$ gcloud app browse --project=yyy
Note: The parameter can also be other than -y
, I just want this feature.
create export a datastore into a gcloud bucket
Add a Webinterface to manage your projects
Here is a traceback:
$ viur script push
There is no file named importer.py. Create it? [y/N]: y
Push scripts/importer.py
There is no file named exporter.py. Create it? [y/N]: y
Push scripts/exporter.py
There is no folder named importable/. Create it? [y/N]: y
Push scripts/importable
There is no file named importable/impexp.py. Create it? [y/N]: y
Traceback (most recent call last):
File "/home/user/.local/share/virtualenvs/project-viur3-s2IdUEXK/lib/python3.10/site-packages/viur_cli/scriptor/cli.py", line 220, in main
entry = await anext(tree.list(_type, {"path": file}))
File "/home/user/.local/share/virtualenvs/project-viur3-s2IdUEXK/lib/python3.10/site-packages/viur_cli/scriptor/scriptor/viur.py", line 195, in __anext__
return await self.__anext__()
File "/home/user/.local/share/virtualenvs/project-viur3-s2IdUEXK/lib/python3.10/site-packages/viur_cli/scriptor/scriptor/viur.py", line 178, in __anext__
raise StopAsyncIteration
StopAsyncIteration
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/user/.local/share/virtualenvs/project-viur3-s2IdUEXK/bin/viur", line 8, in <module>
sys.exit(cli())
File "/home/user/.local/share/virtualenvs/project-viur3-s2IdUEXK/lib/python3.10/site-packages/click/core.py", line 1130, in __call__
return self.main(*args, **kwargs)
File "/home/user/.local/share/virtualenvs/project-viur3-s2IdUEXK/lib/python3.10/site-packages/click/core.py", line 1055, in main
rv = self.invoke(ctx)
File "/home/user/.local/share/virtualenvs/project-viur3-s2IdUEXK/lib/python3.10/site-packages/click/core.py", line 1657, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/home/user/.local/share/virtualenvs/project-viur3-s2IdUEXK/lib/python3.10/site-packages/click/core.py", line 1657, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/home/user/.local/share/virtualenvs/project-viur3-s2IdUEXK/lib/python3.10/site-packages/click/core.py", line 1404, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/user/.local/share/virtualenvs/project-viur3-s2IdUEXK/lib/python3.10/site-packages/click/core.py", line 760, in invoke
return __callback(*args, **kwargs)
File "/home/user/.local/share/virtualenvs/project-viur3-s2IdUEXK/lib/python3.10/site-packages/click/decorators.py", line 26, in new_func
return f(get_current_context(), *args, **kwargs)
File "/home/user/.local/share/virtualenvs/project-viur3-s2IdUEXK/lib/python3.10/site-packages/viur_cli/scriptor/cli.py", line 289, in push
asyncio.new_event_loop().run_until_complete(main())
File "/usr/lib/python3.10/asyncio/base_events.py", line 649, in run_until_complete
return future.result()
File "/home/user/.local/share/virtualenvs/project-viur3-s2IdUEXK/lib/python3.10/site-packages/viur_cli/scriptor/cli.py", line 255, in main
parent_entry = await anext(tree.list("node", {"path": parent}))
File "/home/user/.local/share/virtualenvs/project-viur3-s2IdUEXK/lib/python3.10/site-packages/viur_cli/scriptor/scriptor/viur.py", line 195, in __anext__
return await self.__anext__()
File "/home/user/.local/share/virtualenvs/project-viur3-s2IdUEXK/lib/python3.10/site-packages/viur_cli/scriptor/scriptor/viur.py", line 178, in __anext__
raise StopAsyncIteration
StopAsyncIteration
Instead of creating separate commands viur flare
and viur vue
for building apps created with a specific solution, a general viur build
command should be provided.
viur build
- builds all apps in debug modeviur build myapp
- build myapp in debug modeviur build --release
- build all apps in release modeviur build myapp --release
- build myapp in release modeviur build myapp --watch
- build myapp and run in watch modeThis is how the configuration in project.json
might look like:
{
"default": {
"distribution_folder": "./deploy",
"builds": { // <-- previously was "flare" or "vue"
"myapp": {
"source": "./sources/myapp",
"target": "./deploy/myapp"
},
"vi": {
"source": "./sources/vi/vi",
"target": "./deploy/vi"
}
},
"sources_folder": "./sources"
},
"develop": {
"application_name": "myproject",
"version": "dev"
}
}
Every app now contains a viur-build.json
that is located in the source-folder specified in project.json
.
Simplest configuration:
{
"kind": "flare" // <-- or "vue", or "flutter"...
}
Specifying the "kind" selects a default-setting in viur-cli for building this app with the specified target-folders and modes. Here, the use of variables might be useful, to construct user-defined built commands. The variables should be a union of the project-specific global config and the app-specific config.
The default-settings can be put into a dict like this:
# default-settings and builders, defined in viur-cli somewhere...
app_builders = {
"flare": {
# on this level, either lists for commands or just strings for one command should be possible
"preprocess": ["get-pyodide.py -t ${distribution_folder}/pyodide"],
"release": "${flare-py} -s ${source} -t ${target} -ncz",
"debug": "${flare-py} -s ${source} -t ${target}",
"watch": "${flare-py} -s ${source} -t ${target} -w",
"postprocess": []
},
"vue": {
# ...
},
"flutter": {
# ...
}
}
Configuration can override default-settings, e.g. like so
{
"kind": "flare",
"postprocess": ["${DEFAULT}, "${source}/update-version.py > ${target}/src/__version__.py",
"debug": "${flare-py} -s ${source} -t ${target} -c" // <-- this flare app should always be compiled in debug mode
}
}
In case the $(user)
variable contains a username with upper-case letters, the deployment fails.
The version string should generally be converted to lower-case order.
cant use viur-cli with python 3.12
viur-cli export
command and sub-commands, providing general export tooling for ViUR databases, kinds or specific entities, with the following features:
For the tools especially for JSON and CSV export should, it should be considered to use the MEX language integrated into a Mausbrand customer project as domain specific language to describe tabular output formats with conditional output and other tools.
while deploying the Tool should prompt us to build a new Version.
It is obsolete.
The version numbers in project.json
are always stored in different ways:
{
"default": {
"core": "3.1.1", // <-- here it is without v
"distribution_folder": "./deploy",
"format": "1.0.0", // <-- here it is without v
"pyodide": "v0.19.1", // <-- here it is with v..
"sources_folder": "./sources",
"vi": "v3.0.20" // <-- here it is with v...
}
}
Occasionally, when editing settings in project.json
, this happens:
--- a/project.json
+++ b/project.json
@@ -34,4 +34,4 @@
"application_name": "myapp-viur3",
"version": "$(year)-$(month)-$(day)-$(user)"
}
-}
\ No newline at end of file
+}
A solution for this would be to simply append an \n
each time the file is being stored by viur-cli
.
A .viurrc
in the user's home directory might provide the following features
gcloud -q
-option) on all gcloud calls from viur-coreThis issue is an idea for a module crawler that could be part of viur-cli and performs the following tasks:
/vi/config
*) here, a given way must be followed. Maybe grab one item and try to edit it, without any values (amend feature), no data should really be changed
restructure init and project commands
It would be nice to support this command:
f"gcloud datastore indexes cleanup deploy/index.yaml --project={project_conf['application_name']}"
It is a little bit useless that project.json
contains version numbers of admin and scriptor, but these version don't have any further usage.
Therefore, it would be nice to have a way to install the specific versions that are specified in project.json
, also to guarantee reproducable builds for specific versions.
My recommendation would be, that calling viur install
without any additional parameters checks project.json
for versions of admin and scriptor, and installs the specific version. In case there is no entry for scriptor or admin, the specific tool should NOT be installed.
This step can also be part of #80, as it is required for deploying a working version of something.
We want to change the workflow, so we don not need to create a new project json from scratch.
The check function needs to also consider the npm audit fix command
Copy a bucket into an existing other bucket
Cloud functions are used in different Mausbrand projects to provide dedicated, secure functionality for specific things.
A nice enhancement for viur-cli would be to manage these cloud functions as well.
This issue is a collection currently resolved in several scripts, which should be merged into viur-cli under a uniform interface / command, e.h. viur-cli maintain
.
viur-cli setup all
should perform the operations from viur-gcloud-setup.sh
viur-cli setup index
for index.yaml sorting and deployment (see #2 as well, maybe can be integrated with this)viur-cli setup queue
for queue.yaml deploymentviur-cli setup cron
for cron.yaml deploymentviur-cli setup cicd
for setting-up and update CI/CD workflowsA 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.