@fnet/cli 0.2.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.
Files changed (133) hide show
  1. package/dist/fbin/index.js +2 -0
  2. package/dist/fnet/index.-SGbq2cI.js +1 -0
  3. package/dist/fnet/index.B0TQiWy6.js +1 -0
  4. package/dist/fnet/index.B5XE4ChJ.js +1 -0
  5. package/dist/fnet/index.Bft2w7m3.js +1 -0
  6. package/dist/fnet/index.BuYxdKtK.js +1 -0
  7. package/dist/fnet/index.C2S9JYhS.js +1 -0
  8. package/dist/fnet/index.C7saWH6d.js +1 -0
  9. package/dist/fnet/index.CDct_kkF.js +1 -0
  10. package/dist/fnet/index.CMC8mlye.js +1 -0
  11. package/dist/fnet/index.CmMM-Ek9.js +1 -0
  12. package/dist/fnet/index.CuMyez3E.js +1 -0
  13. package/dist/fnet/index.CzAV0S36.js +1 -0
  14. package/dist/fnet/index.D2N9YZmA.js +1 -0
  15. package/dist/fnet/index.D3p7pncT.js +1 -0
  16. package/dist/fnet/index.DG8TqL-1.js +1 -0
  17. package/dist/fnet/index.DI3yyTtl.js +1 -0
  18. package/dist/fnet/index.DWpw12No.js +1 -0
  19. package/dist/fnet/index.DrwlOzAe.js +1 -0
  20. package/dist/fnet/index.Q-CYRcna.js +1 -0
  21. package/dist/fnet/index.W6RYgypK.js +1 -0
  22. package/dist/fnet/index.js +2 -0
  23. package/dist/fnet/index.rSKuKke7.js +1 -0
  24. package/dist/fnet/index.xd8c7XMr.js +1 -0
  25. package/dist/fnode/index.-SGbq2cI.js +1 -0
  26. package/dist/fnode/index.1IxoA5DY.js +1 -0
  27. package/dist/fnode/index.B5XE4ChJ.js +1 -0
  28. package/dist/fnode/index.Bft2w7m3.js +1 -0
  29. package/dist/fnode/index.BuYxdKtK.js +1 -0
  30. package/dist/fnode/index.C2S9JYhS.js +1 -0
  31. package/dist/fnode/index.C7saWH6d.js +1 -0
  32. package/dist/fnode/index.CDct_kkF.js +1 -0
  33. package/dist/fnode/index.CJ4EhqPO.js +1 -0
  34. package/dist/fnode/index.CMC8mlye.js +1 -0
  35. package/dist/fnode/index.CmMM-Ek9.js +1 -0
  36. package/dist/fnode/index.CuMyez3E.js +1 -0
  37. package/dist/fnode/index.CzAV0S36.js +1 -0
  38. package/dist/fnode/index.D2N9YZmA.js +1 -0
  39. package/dist/fnode/index.D3p7pncT.js +1 -0
  40. package/dist/fnode/index.DG8TqL-1.js +1 -0
  41. package/dist/fnode/index.DI3yyTtl.js +1 -0
  42. package/dist/fnode/index.DWpw12No.js +1 -0
  43. package/dist/fnode/index.DrwlOzAe.js +1 -0
  44. package/dist/fnode/index.N_a5FdgA.js +1 -0
  45. package/dist/fnode/index.Q-CYRcna.js +1 -0
  46. package/dist/fnode/index.UNoFg95r.js +1 -0
  47. package/dist/fnode/index.W6RYgypK.js +1 -0
  48. package/dist/fnode/index.js +2 -0
  49. package/dist/fnode/index.tq-9YxMP.js +1 -0
  50. package/dist/fnode/index.xd8c7XMr.js +1 -0
  51. package/dist/frun/index.js +2 -0
  52. package/dist/fservice/index.js +2 -0
  53. package/package.json +89 -0
  54. package/readme.md +251 -0
  55. package/template/fnet/core/assert.js +6 -0
  56. package/template/fnet/core/message.js +3 -0
  57. package/template/fnet/core/object.js +47 -0
  58. package/template/fnet/core/print.js +1 -0
  59. package/template/fnet/core/sleep.js +5 -0
  60. package/template/fnet/node/.gitignore.njk +9 -0
  61. package/template/fnet/node/build.js.njk +153 -0
  62. package/template/fnet/node/package.json.njk +118 -0
  63. package/template/fnet/node/readme.md.njk +21 -0
  64. package/template/fnet/node/rollup.config.mjs.njk +498 -0
  65. package/template/fnet/node/src/app/index.html.njk +67 -0
  66. package/template/fnet/node/src/app/index.js.njk +36 -0
  67. package/template/fnet/node/src/cli/index.js.njk +319 -0
  68. package/template/fnet/node/src/default/blocks/assign.js.njk +53 -0
  69. package/template/fnet/node/src/default/blocks/call.js.njk +156 -0
  70. package/template/fnet/node/src/default/blocks/for.js.njk +87 -0
  71. package/template/fnet/node/src/default/blocks/form.js.njk +69 -0
  72. package/template/fnet/node/src/default/blocks/modules.js.njk +57 -0
  73. package/template/fnet/node/src/default/blocks/new.js.njk +87 -0
  74. package/template/fnet/node/src/default/blocks/next.js.njk +37 -0
  75. package/template/fnet/node/src/default/blocks/output.js.njk +53 -0
  76. package/template/fnet/node/src/default/blocks/raise.js.njk +31 -0
  77. package/template/fnet/node/src/default/blocks/return.js.njk +33 -0
  78. package/template/fnet/node/src/default/blocks/signal.js.njk +37 -0
  79. package/template/fnet/node/src/default/blocks/steps.js.njk +63 -0
  80. package/template/fnet/node/src/default/blocks/switch.js.njk +79 -0
  81. package/template/fnet/node/src/default/blocks/tryexcept.js.njk +74 -0
  82. package/template/fnet/node/src/default/blocks/wait.js.njk +34 -0
  83. package/template/fnet/node/src/default/engine.js.njk +79 -0
  84. package/template/fnet/node/src/default/input.args.js.njk +122 -0
  85. package/template/fnet/node/src/default/macros/block-assign.js.njk +3 -0
  86. package/template/fnet/node/src/default/macros/block-body-header.js.njk +7 -0
  87. package/template/fnet/node/src/default/macros/block-entry-args.js.njk +2 -0
  88. package/template/fnet/node/src/default/macros/block-footer.js.njk +3 -0
  89. package/template/fnet/node/src/default/macros/block-header.js.njk +14 -0
  90. package/template/fnet/node/src/default/macros/block-library-header.js.njk +43 -0
  91. package/template/fnet/node/src/default/macros/block-modules-header.js.njk +8 -0
  92. package/template/fnet/node/src/default/macros/block-modules.js.njk +29 -0
  93. package/template/fnet/node/src/default/macros/block-next-header.js.njk +6 -0
  94. package/template/fnet/node/src/default/macros/block-next.js.njk +21 -0
  95. package/template/fnet/node/src/default/macros/block-run-footer.js.njk +7 -0
  96. package/template/fnet/node/src/default/macros/block-run-form.js.njk +32 -0
  97. package/template/fnet/node/src/default/macros/block-run-header.js.njk +31 -0
  98. package/template/fnet/node/src/default/macros/block-signal.js.njk +3 -0
  99. package/template/fnet/node/src/default/macros/page.js.njk +8 -0
  100. package/template/fnet/node/src/default/macros/workflow-header.js.njk +7 -0
  101. package/template/fnet/node/src/default/workflow.js.njk +123 -0
  102. package/template/fnet/node/tsconfig.json.njk +16 -0
  103. package/template/fnet/project/.gitignore.njk +7 -0
  104. package/template/fnet/project/.vscode/launch.json.njk +41 -0
  105. package/template/fnet/project/.vscode/tasks.json.njk +46 -0
  106. package/template/fnet/project/fnet/flows.yaml.njk +4 -0
  107. package/template/fnet/project/fnet/targets.yaml.njk +7 -0
  108. package/template/fnet/project/fnet.yaml.njk +3 -0
  109. package/template/fnode/node/.gitignore.njk +9 -0
  110. package/template/fnode/node/build.js.njk +149 -0
  111. package/template/fnode/node/package.json.njk +120 -0
  112. package/template/fnode/node/readme.md.njk +21 -0
  113. package/template/fnode/node/rollup.config.mjs.njk +498 -0
  114. package/template/fnode/node/src/app/index-js-with-react-host.njk +50 -0
  115. package/template/fnode/node/src/app/index-js-without-react-host.njk +23 -0
  116. package/template/fnode/node/src/app/index.html.njk +67 -0
  117. package/template/fnode/node/src/app/index.js.njk +9 -0
  118. package/template/fnode/node/src/cli/index.js.njk +403 -0
  119. package/template/fnode/node/src/default/engine.js.njk +17 -0
  120. package/template/fnode/node/src/default/input.args.js.njk +122 -0
  121. package/template/fnode/node/tsconfig.json.njk +16 -0
  122. package/template/fnode/project/.gitignore.njk +11 -0
  123. package/template/fnode/project/.vscode/launch.json.njk +78 -0
  124. package/template/fnode/project/.vscode/tasks.json.njk +46 -0
  125. package/template/fnode/project/fnet/targets.yaml.njk +25 -0
  126. package/template/fnode/project/fnode.yaml.njk +12 -0
  127. package/template/fnode/python/.gitignore.njk +7 -0
  128. package/template/fnode/python/package.json.njk +4 -0
  129. package/template/fnode/python/pyproject.toml.njk +3 -0
  130. package/template/fnode/python/readme.md.njk +12 -0
  131. package/template/fnode/python/setup.py.njk +19 -0
  132. package/template/fnode/python/src/cli/index.py.njk +25 -0
  133. package/template/schemas/to-npm.yaml +14 -0
@@ -0,0 +1,25 @@
1
+ {% if runtime ==='node' %}
2
+ npm-default:
3
+ type: npm
4
+ enabled: false
5
+ version: "{{npm.version or "0.1.0"}}"
6
+ params:
7
+ # bin: some-bin-name
8
+ name: "{{npm.name or "@fnet/"+name}}"
9
+ {% elif runtime==='bun' %}
10
+ npm-default:
11
+ type: npm
12
+ enabled: false
13
+ version: "{{npm.version or "0.1.0"}}"
14
+ params:
15
+ # bin: some-bin-name
16
+ name: "{{npm.name or "@fnet/"+name}}"
17
+ {% elif runtime==='python' %}
18
+ pypi-default:
19
+ type: pypi
20
+ enabled: false
21
+ version: "{{pip.version or "0.1.0"}}"
22
+ params:
23
+ # bin: some-bin-name
24
+ name: "{{pip.name or "@fnet/"+name}}"
25
+ {% endif %}
@@ -0,0 +1,12 @@
1
+ name: {{name}}
2
+
3
+ {% if runtime === 'node' %}
4
+ features:
5
+ s::runtime.type: node
6
+ {% elif runtime === 'python' %}
7
+ features:
8
+ s::runtime.type: python
9
+ {% elif runtime === 'bun' %}
10
+ features:
11
+ s::runtime.type: bun
12
+ {% endif %}
@@ -0,0 +1,7 @@
1
+ __pycache__/
2
+ .DS_Store
3
+ .fnet
4
+ .out
5
+ .package
6
+ .vscode
7
+ .output
@@ -0,0 +1,4 @@
1
+ {
2
+ "name": "{{params.package_name}}",
3
+ "scripts":{{params.scripts | safe}}
4
+ }
@@ -0,0 +1,3 @@
1
+ [build-system]
2
+ requires = ["setuptools", "wheel"]
3
+ build-backend = "setuptools.build_meta"
@@ -0,0 +1,12 @@
1
+ {{content | safe}}
2
+
3
+ {% if howto %}
4
+ {{howto | safe}}
5
+ {% endif %}
6
+
7
+ {% if input %}
8
+ # Input Schema
9
+ ```yaml
10
+ {{ input | safe}}
11
+ ```
12
+ {% endif %}
@@ -0,0 +1,19 @@
1
+ from setuptools import setup, find_packages
2
+
3
+ setup(
4
+ name="{{params.package_name}}",
5
+ version="{{params.version}}",
6
+ packages=["default","cli"],
7
+ package_dir={"default": "./src/default", "cli": "./src/cli"},
8
+ entry_points={
9
+ "console_scripts": [
10
+ "{{params.bin_name}}=cli:main",
11
+ ],
12
+ },
13
+ python_requires="{{params.python_requires | default('>=3.12') | safe}}",
14
+ install_requires=[
15
+ {% for dep in params.dependencies %}
16
+ "{{dep.package}}" {% if not loop.last%},{%endif%}
17
+ {% endfor %}
18
+ ],
19
+ )
@@ -0,0 +1,25 @@
1
+ {% if atom.doc.features.cli.enabled===true %}
2
+ from default.index import default
3
+ import argparse
4
+ def main():
5
+ # Create an argument parser to handle command-line input
6
+ parser = argparse.ArgumentParser(description="{{atom.doc.name}}")
7
+
8
+ # Parse known and unknown arguments. We only need unknown arguments here.
9
+ _, unknown_args = parser.parse_known_args()
10
+
11
+ # Convert unknown arguments into a kwargs dictionary
12
+ kwargs = {}
13
+ for i in range(0, len(unknown_args), 2):
14
+ key = unknown_args[i].lstrip("--") # Remove the leading "--" from the argument name
15
+ value = unknown_args[i + 1] if i + 1 < len(unknown_args) else None # Handle key-value pairs
16
+ kwargs[key] = value # Add the key-value pair to the kwargs dictionary
17
+
18
+ # Pass the kwargs to the default function
19
+ result=default(**kwargs)
20
+ print(result) # Print the result as a string
21
+
22
+ # Entry point for the script
23
+ if __name__ == "__main__":
24
+ main()
25
+ {% endif %}
@@ -0,0 +1,14 @@
1
+ $schema: "https://json-schema.org/draft/2020-12/schema"
2
+ type: object
3
+ properties:
4
+ env:
5
+ type: object
6
+ description: "Environment configuration"
7
+ properties:
8
+ NPM_TOKEN:
9
+ type: string
10
+ description: "A secure authentication token used by npm to authenticate and publish packages. Ensure that this token has the appropriate permissions for your project and repository."
11
+ required:
12
+ - NPM_TOKEN
13
+ required:
14
+ - env