zrb 0.0.50__py3-none-any.whl → 0.0.52__py3-none-any.whl

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 (63) hide show
  1. zrb/action/runner.py +15 -3
  2. zrb/builtin/generator/docker_compose_task/template/_automate/snake_task_name.py +1 -1
  3. zrb/builtin/generator/fastapp/add.py +3 -2
  4. zrb/builtin/generator/fastapp/template/_automate/snake_app_name/frontend.py +17 -2
  5. zrb/builtin/generator/fastapp/template/src/kebab-app-name/src/.gitignore +2 -1
  6. zrb/builtin/generator/fastapp/template/src/kebab-app-name/src/Dockerfile +1 -1
  7. zrb/builtin/generator/fastapp/template/src/kebab-app-name/src/config.py +3 -0
  8. zrb/builtin/generator/fastapp/template/src/kebab-app-name/src/core/messagebus/rabbitmq/consumer.py +4 -1
  9. zrb/builtin/generator/fastapp/template/src/kebab-app-name/src/frontend/.gitignore +2 -2
  10. zrb/builtin/generator/fastapp/template/src/kebab-app-name/src/frontend/package-lock.json +197 -115
  11. zrb/builtin/generator/fastapp/template/src/kebab-app-name/src/frontend/package.json +7 -1
  12. zrb/builtin/generator/fastapp/template/src/kebab-app-name/src/frontend/src/app.html +1 -1
  13. zrb/builtin/generator/fastapp/template/src/kebab-app-name/src/frontend/src/lib/auth/auth.ts +83 -0
  14. zrb/builtin/generator/fastapp/template/src/kebab-app-name/src/frontend/src/lib/auth/store.ts +4 -0
  15. zrb/builtin/generator/fastapp/template/src/kebab-app-name/src/frontend/src/lib/auth/type.ts +10 -0
  16. zrb/builtin/generator/fastapp/template/src/kebab-app-name/src/frontend/src/lib/components/navigation/Menu.svelte +20 -0
  17. zrb/builtin/generator/fastapp/template/src/kebab-app-name/src/frontend/src/lib/components/navigation/Navigation.svelte +77 -0
  18. zrb/builtin/generator/fastapp/template/src/kebab-app-name/src/frontend/src/lib/components/navigation/type.ts +6 -0
  19. zrb/builtin/generator/fastapp/template/src/kebab-app-name/src/frontend/src/lib/config/config.ts +4 -0
  20. zrb/builtin/generator/fastapp/template/src/kebab-app-name/src/frontend/src/lib/config/navData.ts +25 -0
  21. zrb/builtin/generator/fastapp/template/src/kebab-app-name/src/frontend/src/lib/cookie/cookie.ts +19 -0
  22. zrb/builtin/generator/fastapp/template/src/kebab-app-name/src/frontend/src/routes/+layout.svelte +9 -6
  23. zrb/builtin/generator/fastapp/template/src/kebab-app-name/src/frontend/src/routes/greetings/[slug]/+page.js +4 -4
  24. zrb/builtin/generator/fastapp/template/src/kebab-app-name/src/frontend/src/routes/greetings/[slug]/+page.svelte +3 -7
  25. zrb/builtin/generator/fastapp/template/src/kebab-app-name/src/frontend/src/routes/sample/+page.svelte +37 -0
  26. zrb/builtin/generator/fastapp/template/src/kebab-app-name/src/frontend/src/routes/sample/delete/[id]/+page.svelte +1 -0
  27. zrb/builtin/generator/fastapp/template/src/kebab-app-name/src/frontend/static/favicon.png +0 -0
  28. zrb/builtin/generator/fastapp/template/src/kebab-app-name/src/frontend/static/logo.png +0 -0
  29. zrb/builtin/generator/fastapp/template/src/kebab-app-name/src/frontend/tailwind.config.js +1 -1
  30. zrb/builtin/generator/fastapp/template/src/kebab-app-name/src/module/auth/api.py +1 -1
  31. zrb/builtin/generator/fastapp/template/src/kebab-app-name/src/module/auth/component/authorizer.py +1 -1
  32. zrb/builtin/generator/fastapp/template/src/kebab-app-name/src/module/auth/component/token_scheme.py +1 -1
  33. zrb/builtin/generator/fastapp/template/src/kebab-app-name/src/module/auth/core/authorizer/authorizer.py +1 -1
  34. zrb/builtin/generator/fastapp/template/src/kebab-app-name/src/module/auth/core/authorizer/rpc_authorizer.py +9 -5
  35. zrb/builtin/generator/fastapp/template/src/kebab-app-name/src/module/auth/core/token_scheme/oauth2_bearer_token_scheme.py +1 -1
  36. zrb/builtin/generator/fastapp/template/src/kebab-app-name/src/module/auth/entity/user/api.py +32 -8
  37. zrb/builtin/generator/fastapp/template/src/kebab-app-name/src/module/auth/entity/user/model.py +60 -52
  38. zrb/builtin/generator/fastapp/template/src/kebab-app-name/src/module/auth/entity/user/rpc.py +23 -8
  39. zrb/builtin/generator/fastapp/template/src/kebab-app-name/src/module/auth/schema/request.py +10 -0
  40. zrb/builtin/generator/fastapp/template/src/kebab-app-name/src/template.env +4 -0
  41. zrb/builtin/generator/fastapp/template/src/kebab-app-name/test/auth/test_group_crud.py +3 -3
  42. zrb/builtin/generator/fastapp/template/src/kebab-app-name/test/auth/test_permission_crud.py +3 -3
  43. zrb/builtin/generator/fastapp/template/src/kebab-app-name/test/auth/test_user_crud.py +3 -3
  44. zrb/builtin/generator/fastapp/template/src/kebab-app-name/test/auth/test_user_login.py +12 -12
  45. zrb/builtin/generator/fastapp_crud/add.py +86 -5
  46. zrb/builtin/generator/fastapp_crud/nodejs/codemod/.gitignore +1 -0
  47. zrb/builtin/generator/fastapp_crud/nodejs/codemod/package-lock.json +317 -0
  48. zrb/builtin/generator/fastapp_crud/nodejs/codemod/package.json +18 -0
  49. zrb/builtin/generator/fastapp_crud/nodejs/codemod/src/addNav.ts +38 -0
  50. zrb/builtin/generator/fastapp_crud/nodejs/codemod/tsconfig.json +109 -0
  51. zrb/builtin/generator/fastapp_crud/template/src/kebab-app-name/test/snake_module_name/test_snake_entity_name.py +3 -3
  52. zrb/builtin/generator/project/template/.gitignore +1 -1
  53. zrb/builtin/generator/simple_python_app/template/src/kebab-app-name/src/.gitignore +1 -1
  54. zrb/task/base_task.py +3 -1
  55. zrb-0.0.52.dist-info/METADATA +605 -0
  56. {zrb-0.0.50.dist-info → zrb-0.0.52.dist-info}/RECORD +60 -44
  57. zrb/builtin/generator/fastapp/template/src/kebab-app-name/src/frontend/src/lib/components/Navigation.svelte +0 -24
  58. zrb/builtin/generator/fastapp/template/src/kebab-app-name/src/frontend/src/lib/data/navData.json +0 -5
  59. zrb-0.0.50.dist-info/METADATA +0 -450
  60. /zrb/builtin/generator/{fastapp/template/src/kebab-app-name/src/frontend/src/routes/greetings/[slug]/page.js → fastapp_crud/nodejs/codemod/src/fastapp/src/frontend/src/lib/config/navData.ts} +0 -0
  61. {zrb-0.0.50.dist-info → zrb-0.0.52.dist-info}/LICENSE +0 -0
  62. {zrb-0.0.50.dist-info → zrb-0.0.52.dist-info}/WHEEL +0 -0
  63. {zrb-0.0.50.dist-info → zrb-0.0.52.dist-info}/entry_points.txt +0 -0
@@ -0,0 +1,317 @@
1
+ {
2
+ "name": "codemod",
3
+ "version": "1.0.0",
4
+ "lockfileVersion": 3,
5
+ "requires": true,
6
+ "packages": {
7
+ "": {
8
+ "name": "codemod",
9
+ "version": "1.0.0",
10
+ "license": "ISC",
11
+ "dependencies": {
12
+ "ts-morph": "^18.0.0"
13
+ },
14
+ "devDependencies": {
15
+ "@types/node": "^20.1.1",
16
+ "typescript": "^5.0.4"
17
+ }
18
+ },
19
+ "node_modules/@nodelib/fs.scandir": {
20
+ "version": "2.1.5",
21
+ "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz",
22
+ "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==",
23
+ "dependencies": {
24
+ "@nodelib/fs.stat": "2.0.5",
25
+ "run-parallel": "^1.1.9"
26
+ },
27
+ "engines": {
28
+ "node": ">= 8"
29
+ }
30
+ },
31
+ "node_modules/@nodelib/fs.stat": {
32
+ "version": "2.0.5",
33
+ "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz",
34
+ "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==",
35
+ "engines": {
36
+ "node": ">= 8"
37
+ }
38
+ },
39
+ "node_modules/@nodelib/fs.walk": {
40
+ "version": "1.2.8",
41
+ "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz",
42
+ "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==",
43
+ "dependencies": {
44
+ "@nodelib/fs.scandir": "2.1.5",
45
+ "fastq": "^1.6.0"
46
+ },
47
+ "engines": {
48
+ "node": ">= 8"
49
+ }
50
+ },
51
+ "node_modules/@ts-morph/common": {
52
+ "version": "0.19.0",
53
+ "resolved": "https://registry.npmjs.org/@ts-morph/common/-/common-0.19.0.tgz",
54
+ "integrity": "sha512-Unz/WHmd4pGax91rdIKWi51wnVUW11QttMEPpBiBgIewnc9UQIX7UDLxr5vRlqeByXCwhkF6VabSsI0raWcyAQ==",
55
+ "dependencies": {
56
+ "fast-glob": "^3.2.12",
57
+ "minimatch": "^7.4.3",
58
+ "mkdirp": "^2.1.6",
59
+ "path-browserify": "^1.0.1"
60
+ }
61
+ },
62
+ "node_modules/@types/node": {
63
+ "version": "20.1.1",
64
+ "resolved": "https://registry.npmjs.org/@types/node/-/node-20.1.1.tgz",
65
+ "integrity": "sha512-uKBEevTNb+l6/aCQaKVnUModfEMjAl98lw2Si9P5y4hLu9tm6AlX2ZIoXZX6Wh9lJueYPrGPKk5WMCNHg/u6/A==",
66
+ "dev": true
67
+ },
68
+ "node_modules/balanced-match": {
69
+ "version": "1.0.2",
70
+ "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz",
71
+ "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw=="
72
+ },
73
+ "node_modules/brace-expansion": {
74
+ "version": "2.0.1",
75
+ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz",
76
+ "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==",
77
+ "dependencies": {
78
+ "balanced-match": "^1.0.0"
79
+ }
80
+ },
81
+ "node_modules/braces": {
82
+ "version": "3.0.2",
83
+ "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz",
84
+ "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==",
85
+ "dependencies": {
86
+ "fill-range": "^7.0.1"
87
+ },
88
+ "engines": {
89
+ "node": ">=8"
90
+ }
91
+ },
92
+ "node_modules/code-block-writer": {
93
+ "version": "12.0.0",
94
+ "resolved": "https://registry.npmjs.org/code-block-writer/-/code-block-writer-12.0.0.tgz",
95
+ "integrity": "sha512-q4dMFMlXtKR3XNBHyMHt/3pwYNA69EDk00lloMOaaUMKPUXBw6lpXtbu3MMVG6/uOihGnRDOlkyqsONEUj60+w=="
96
+ },
97
+ "node_modules/fast-glob": {
98
+ "version": "3.2.12",
99
+ "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.12.tgz",
100
+ "integrity": "sha512-DVj4CQIYYow0BlaelwK1pHl5n5cRSJfM60UA0zK891sVInoPri2Ekj7+e1CT3/3qxXenpI+nBBmQAcJPJgaj4w==",
101
+ "dependencies": {
102
+ "@nodelib/fs.stat": "^2.0.2",
103
+ "@nodelib/fs.walk": "^1.2.3",
104
+ "glob-parent": "^5.1.2",
105
+ "merge2": "^1.3.0",
106
+ "micromatch": "^4.0.4"
107
+ },
108
+ "engines": {
109
+ "node": ">=8.6.0"
110
+ }
111
+ },
112
+ "node_modules/fastq": {
113
+ "version": "1.15.0",
114
+ "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.15.0.tgz",
115
+ "integrity": "sha512-wBrocU2LCXXa+lWBt8RoIRD89Fi8OdABODa/kEnyeyjS5aZO5/GNvI5sEINADqP/h8M29UHTHUb53sUu5Ihqdw==",
116
+ "dependencies": {
117
+ "reusify": "^1.0.4"
118
+ }
119
+ },
120
+ "node_modules/fill-range": {
121
+ "version": "7.0.1",
122
+ "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz",
123
+ "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==",
124
+ "dependencies": {
125
+ "to-regex-range": "^5.0.1"
126
+ },
127
+ "engines": {
128
+ "node": ">=8"
129
+ }
130
+ },
131
+ "node_modules/glob-parent": {
132
+ "version": "5.1.2",
133
+ "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz",
134
+ "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==",
135
+ "dependencies": {
136
+ "is-glob": "^4.0.1"
137
+ },
138
+ "engines": {
139
+ "node": ">= 6"
140
+ }
141
+ },
142
+ "node_modules/is-extglob": {
143
+ "version": "2.1.1",
144
+ "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz",
145
+ "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==",
146
+ "engines": {
147
+ "node": ">=0.10.0"
148
+ }
149
+ },
150
+ "node_modules/is-glob": {
151
+ "version": "4.0.3",
152
+ "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz",
153
+ "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==",
154
+ "dependencies": {
155
+ "is-extglob": "^2.1.1"
156
+ },
157
+ "engines": {
158
+ "node": ">=0.10.0"
159
+ }
160
+ },
161
+ "node_modules/is-number": {
162
+ "version": "7.0.0",
163
+ "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz",
164
+ "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==",
165
+ "engines": {
166
+ "node": ">=0.12.0"
167
+ }
168
+ },
169
+ "node_modules/merge2": {
170
+ "version": "1.4.1",
171
+ "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz",
172
+ "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==",
173
+ "engines": {
174
+ "node": ">= 8"
175
+ }
176
+ },
177
+ "node_modules/micromatch": {
178
+ "version": "4.0.5",
179
+ "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz",
180
+ "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==",
181
+ "dependencies": {
182
+ "braces": "^3.0.2",
183
+ "picomatch": "^2.3.1"
184
+ },
185
+ "engines": {
186
+ "node": ">=8.6"
187
+ }
188
+ },
189
+ "node_modules/minimatch": {
190
+ "version": "7.4.6",
191
+ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-7.4.6.tgz",
192
+ "integrity": "sha512-sBz8G/YjVniEz6lKPNpKxXwazJe4c19fEfV2GDMX6AjFz+MX9uDWIZW8XreVhkFW3fkIdTv/gxWr/Kks5FFAVw==",
193
+ "dependencies": {
194
+ "brace-expansion": "^2.0.1"
195
+ },
196
+ "engines": {
197
+ "node": ">=10"
198
+ },
199
+ "funding": {
200
+ "url": "https://github.com/sponsors/isaacs"
201
+ }
202
+ },
203
+ "node_modules/mkdirp": {
204
+ "version": "2.1.6",
205
+ "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-2.1.6.tgz",
206
+ "integrity": "sha512-+hEnITedc8LAtIP9u3HJDFIdcLV2vXP33sqLLIzkv1Db1zO/1OxbvYf0Y1OC/S/Qo5dxHXepofhmxL02PsKe+A==",
207
+ "bin": {
208
+ "mkdirp": "dist/cjs/src/bin.js"
209
+ },
210
+ "engines": {
211
+ "node": ">=10"
212
+ },
213
+ "funding": {
214
+ "url": "https://github.com/sponsors/isaacs"
215
+ }
216
+ },
217
+ "node_modules/path-browserify": {
218
+ "version": "1.0.1",
219
+ "resolved": "https://registry.npmjs.org/path-browserify/-/path-browserify-1.0.1.tgz",
220
+ "integrity": "sha512-b7uo2UCUOYZcnF/3ID0lulOJi/bafxa1xPe7ZPsammBSpjSWQkjNxlt635YGS2MiR9GjvuXCtz2emr3jbsz98g=="
221
+ },
222
+ "node_modules/picomatch": {
223
+ "version": "2.3.1",
224
+ "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz",
225
+ "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==",
226
+ "engines": {
227
+ "node": ">=8.6"
228
+ },
229
+ "funding": {
230
+ "url": "https://github.com/sponsors/jonschlinkert"
231
+ }
232
+ },
233
+ "node_modules/queue-microtask": {
234
+ "version": "1.2.3",
235
+ "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz",
236
+ "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==",
237
+ "funding": [
238
+ {
239
+ "type": "github",
240
+ "url": "https://github.com/sponsors/feross"
241
+ },
242
+ {
243
+ "type": "patreon",
244
+ "url": "https://www.patreon.com/feross"
245
+ },
246
+ {
247
+ "type": "consulting",
248
+ "url": "https://feross.org/support"
249
+ }
250
+ ]
251
+ },
252
+ "node_modules/reusify": {
253
+ "version": "1.0.4",
254
+ "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz",
255
+ "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==",
256
+ "engines": {
257
+ "iojs": ">=1.0.0",
258
+ "node": ">=0.10.0"
259
+ }
260
+ },
261
+ "node_modules/run-parallel": {
262
+ "version": "1.2.0",
263
+ "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz",
264
+ "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==",
265
+ "funding": [
266
+ {
267
+ "type": "github",
268
+ "url": "https://github.com/sponsors/feross"
269
+ },
270
+ {
271
+ "type": "patreon",
272
+ "url": "https://www.patreon.com/feross"
273
+ },
274
+ {
275
+ "type": "consulting",
276
+ "url": "https://feross.org/support"
277
+ }
278
+ ],
279
+ "dependencies": {
280
+ "queue-microtask": "^1.2.2"
281
+ }
282
+ },
283
+ "node_modules/to-regex-range": {
284
+ "version": "5.0.1",
285
+ "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz",
286
+ "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==",
287
+ "dependencies": {
288
+ "is-number": "^7.0.0"
289
+ },
290
+ "engines": {
291
+ "node": ">=8.0"
292
+ }
293
+ },
294
+ "node_modules/ts-morph": {
295
+ "version": "18.0.0",
296
+ "resolved": "https://registry.npmjs.org/ts-morph/-/ts-morph-18.0.0.tgz",
297
+ "integrity": "sha512-Kg5u0mk19PIIe4islUI/HWRvm9bC1lHejK4S0oh1zaZ77TMZAEmQC0sHQYiu2RgCQFZKXz1fMVi/7nOOeirznA==",
298
+ "dependencies": {
299
+ "@ts-morph/common": "~0.19.0",
300
+ "code-block-writer": "^12.0.0"
301
+ }
302
+ },
303
+ "node_modules/typescript": {
304
+ "version": "5.0.4",
305
+ "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.0.4.tgz",
306
+ "integrity": "sha512-cW9T5W9xY37cc+jfEnaUvX91foxtHkza3Nw3wkoF4sSlKn0MONdkdEndig/qPBWXNkmplh3NzayQzCiHM4/hqw==",
307
+ "dev": true,
308
+ "bin": {
309
+ "tsc": "bin/tsc",
310
+ "tsserver": "bin/tsserver"
311
+ },
312
+ "engines": {
313
+ "node": ">=12.20"
314
+ }
315
+ }
316
+ }
317
+ }
@@ -0,0 +1,18 @@
1
+ {
2
+ "name": "codemod",
3
+ "version": "1.0.0",
4
+ "description": "Modifying typescript code",
5
+ "main": "dist/index.js",
6
+ "scripts": {
7
+ "test": "echo \"Error: no test specified\" && exit 1"
8
+ },
9
+ "author": "",
10
+ "license": "ISC",
11
+ "devDependencies": {
12
+ "@types/node": "^20.1.1",
13
+ "typescript": "^5.0.4"
14
+ },
15
+ "dependencies": {
16
+ "ts-morph": "^18.0.0"
17
+ }
18
+ }
@@ -0,0 +1,38 @@
1
+ import { readFileSync, writeFileSync } from "fs";
2
+ import { ts, Project } from "ts-morph";
3
+
4
+ function appendNavigation(fileName: string, varName: string, title: string, url: string, permission: string) {
5
+ const project = new Project();
6
+ const content = readFileSync(fileName).toString();
7
+ const sourceFile = project.createSourceFile('navigation.ts', content);
8
+
9
+ sourceFile.transform(traversal => {
10
+ const node = traversal.visitChildren();
11
+ if (ts.isVariableDeclaration(node) && node.name.getText() === varName) {
12
+ const arrayLiteral = traversal.factory.createArrayLiteralExpression([
13
+ ...(node.initializer as ts.ArrayLiteralExpression)?.elements ?? [],
14
+ traversal.factory.createIdentifier(
15
+ `{title: "${title}", url: "${url}", permission: "${permission}"}`
16
+ )
17
+ ]);
18
+ return traversal.factory.updateVariableDeclaration(
19
+ node,
20
+ node.name,
21
+ node.exclamationToken,
22
+ node.type,
23
+ arrayLiteral
24
+ );
25
+ }
26
+ return node;
27
+ });
28
+
29
+ const modifiedContent = sourceFile.getText();
30
+ writeFileSync(fileName, modifiedContent);
31
+ }
32
+
33
+ const fileName = process.argv[2];
34
+ const varName = process.argv[3];
35
+ const title = process.argv[4];
36
+ const url = process.argv[5];
37
+ const permission = process.argv[6];
38
+ appendNavigation(fileName, varName, title, url, permission);
@@ -0,0 +1,109 @@
1
+ {
2
+ "compilerOptions": {
3
+ /* Visit https://aka.ms/tsconfig to read more about this file */
4
+
5
+ /* Projects */
6
+ // "incremental": true, /* Save .tsbuildinfo files to allow for incremental compilation of projects. */
7
+ // "composite": true, /* Enable constraints that allow a TypeScript project to be used with project references. */
8
+ // "tsBuildInfoFile": "./.tsbuildinfo", /* Specify the path to .tsbuildinfo incremental compilation file. */
9
+ // "disableSourceOfProjectReferenceRedirect": true, /* Disable preferring source files instead of declaration files when referencing composite projects. */
10
+ // "disableSolutionSearching": true, /* Opt a project out of multi-project reference checking when editing. */
11
+ // "disableReferencedProjectLoad": true, /* Reduce the number of projects loaded automatically by TypeScript. */
12
+
13
+ /* Language and Environment */
14
+ "target": "es2016", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */
15
+ // "lib": [], /* Specify a set of bundled library declaration files that describe the target runtime environment. */
16
+ // "jsx": "preserve", /* Specify what JSX code is generated. */
17
+ // "experimentalDecorators": true, /* Enable experimental support for legacy experimental decorators. */
18
+ // "emitDecoratorMetadata": true, /* Emit design-type metadata for decorated declarations in source files. */
19
+ // "jsxFactory": "", /* Specify the JSX factory function used when targeting React JSX emit, e.g. 'React.createElement' or 'h'. */
20
+ // "jsxFragmentFactory": "", /* Specify the JSX Fragment reference used for fragments when targeting React JSX emit e.g. 'React.Fragment' or 'Fragment'. */
21
+ // "jsxImportSource": "", /* Specify module specifier used to import the JSX factory functions when using 'jsx: react-jsx*'. */
22
+ // "reactNamespace": "", /* Specify the object invoked for 'createElement'. This only applies when targeting 'react' JSX emit. */
23
+ // "noLib": true, /* Disable including any library files, including the default lib.d.ts. */
24
+ // "useDefineForClassFields": true, /* Emit ECMAScript-standard-compliant class fields. */
25
+ // "moduleDetection": "auto", /* Control what method is used to detect module-format JS files. */
26
+
27
+ /* Modules */
28
+ "module": "commonjs", /* Specify what module code is generated. */
29
+ // "rootDir": "./", /* Specify the root folder within your source files. */
30
+ // "moduleResolution": "node10", /* Specify how TypeScript looks up a file from a given module specifier. */
31
+ // "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */
32
+ // "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */
33
+ // "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */
34
+ // "typeRoots": [], /* Specify multiple folders that act like './node_modules/@types'. */
35
+ // "types": [], /* Specify type package names to be included without being referenced in a source file. */
36
+ // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */
37
+ // "moduleSuffixes": [], /* List of file name suffixes to search when resolving a module. */
38
+ // "allowImportingTsExtensions": true, /* Allow imports to include TypeScript file extensions. Requires '--moduleResolution bundler' and either '--noEmit' or '--emitDeclarationOnly' to be set. */
39
+ // "resolvePackageJsonExports": true, /* Use the package.json 'exports' field when resolving package imports. */
40
+ // "resolvePackageJsonImports": true, /* Use the package.json 'imports' field when resolving imports. */
41
+ // "customConditions": [], /* Conditions to set in addition to the resolver-specific defaults when resolving imports. */
42
+ // "resolveJsonModule": true, /* Enable importing .json files. */
43
+ // "allowArbitraryExtensions": true, /* Enable importing files with any extension, provided a declaration file is present. */
44
+ // "noResolve": true, /* Disallow 'import's, 'require's or '<reference>'s from expanding the number of files TypeScript should add to a project. */
45
+
46
+ /* JavaScript Support */
47
+ // "allowJs": true, /* Allow JavaScript files to be a part of your program. Use the 'checkJS' option to get errors from these files. */
48
+ // "checkJs": true, /* Enable error reporting in type-checked JavaScript files. */
49
+ // "maxNodeModuleJsDepth": 1, /* Specify the maximum folder depth used for checking JavaScript files from 'node_modules'. Only applicable with 'allowJs'. */
50
+
51
+ /* Emit */
52
+ // "declaration": true, /* Generate .d.ts files from TypeScript and JavaScript files in your project. */
53
+ // "declarationMap": true, /* Create sourcemaps for d.ts files. */
54
+ // "emitDeclarationOnly": true, /* Only output d.ts files and not JavaScript files. */
55
+ // "sourceMap": true, /* Create source map files for emitted JavaScript files. */
56
+ // "inlineSourceMap": true, /* Include sourcemap files inside the emitted JavaScript. */
57
+ // "outFile": "./", /* Specify a file that bundles all outputs into one JavaScript file. If 'declaration' is true, also designates a file that bundles all .d.ts output. */
58
+ "outDir": "./dist", /* Specify an output folder for all emitted files. */
59
+ // "removeComments": true, /* Disable emitting comments. */
60
+ // "noEmit": true, /* Disable emitting files from a compilation. */
61
+ // "importHelpers": true, /* Allow importing helper functions from tslib once per project, instead of including them per-file. */
62
+ // "importsNotUsedAsValues": "remove", /* Specify emit/checking behavior for imports that are only used for types. */
63
+ // "downlevelIteration": true, /* Emit more compliant, but verbose and less performant JavaScript for iteration. */
64
+ // "sourceRoot": "", /* Specify the root path for debuggers to find the reference source code. */
65
+ // "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */
66
+ // "inlineSources": true, /* Include source code in the sourcemaps inside the emitted JavaScript. */
67
+ // "emitBOM": true, /* Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files. */
68
+ // "newLine": "crlf", /* Set the newline character for emitting files. */
69
+ // "stripInternal": true, /* Disable emitting declarations that have '@internal' in their JSDoc comments. */
70
+ // "noEmitHelpers": true, /* Disable generating custom helper functions like '__extends' in compiled output. */
71
+ // "noEmitOnError": true, /* Disable emitting files if any type checking errors are reported. */
72
+ // "preserveConstEnums": true, /* Disable erasing 'const enum' declarations in generated code. */
73
+ // "declarationDir": "./", /* Specify the output directory for generated declaration files. */
74
+ // "preserveValueImports": true, /* Preserve unused imported values in the JavaScript output that would otherwise be removed. */
75
+
76
+ /* Interop Constraints */
77
+ // "isolatedModules": true, /* Ensure that each file can be safely transpiled without relying on other imports. */
78
+ // "verbatimModuleSyntax": true, /* Do not transform or elide any imports or exports not marked as type-only, ensuring they are written in the output file's format based on the 'module' setting. */
79
+ // "allowSyntheticDefaultImports": true, /* Allow 'import x from y' when a module doesn't have a default export. */
80
+ "esModuleInterop": true, /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */
81
+ // "preserveSymlinks": true, /* Disable resolving symlinks to their realpath. This correlates to the same flag in node. */
82
+ "forceConsistentCasingInFileNames": true, /* Ensure that casing is correct in imports. */
83
+
84
+ /* Type Checking */
85
+ "strict": true, /* Enable all strict type-checking options. */
86
+ // "noImplicitAny": true, /* Enable error reporting for expressions and declarations with an implied 'any' type. */
87
+ // "strictNullChecks": true, /* When type checking, take into account 'null' and 'undefined'. */
88
+ // "strictFunctionTypes": true, /* When assigning functions, check to ensure parameters and the return values are subtype-compatible. */
89
+ // "strictBindCallApply": true, /* Check that the arguments for 'bind', 'call', and 'apply' methods match the original function. */
90
+ // "strictPropertyInitialization": true, /* Check for class properties that are declared but not set in the constructor. */
91
+ // "noImplicitThis": true, /* Enable error reporting when 'this' is given the type 'any'. */
92
+ // "useUnknownInCatchVariables": true, /* Default catch clause variables as 'unknown' instead of 'any'. */
93
+ // "alwaysStrict": true, /* Ensure 'use strict' is always emitted. */
94
+ // "noUnusedLocals": true, /* Enable error reporting when local variables aren't read. */
95
+ // "noUnusedParameters": true, /* Raise an error when a function parameter isn't read. */
96
+ // "exactOptionalPropertyTypes": true, /* Interpret optional property types as written, rather than adding 'undefined'. */
97
+ // "noImplicitReturns": true, /* Enable error reporting for codepaths that do not explicitly return in a function. */
98
+ // "noFallthroughCasesInSwitch": true, /* Enable error reporting for fallthrough cases in switch statements. */
99
+ // "noUncheckedIndexedAccess": true, /* Add 'undefined' to a type when accessed using an index. */
100
+ // "noImplicitOverride": true, /* Ensure overriding members in derived classes are marked with an override modifier. */
101
+ // "noPropertyAccessFromIndexSignature": true, /* Enforces using indexed accessors for keys declared using an indexed type. */
102
+ // "allowUnusedLabels": true, /* Disable error reporting for unused labels. */
103
+ // "allowUnreachableCode": true, /* Disable error reporting for unreachable code. */
104
+
105
+ /* Completeness */
106
+ // "skipDefaultLibCheck": true, /* Skip type checking .d.ts files that are included with TypeScript. */
107
+ "skipLibCheck": true /* Skip type checking all .d.ts files. */
108
+ }
109
+ }
@@ -24,7 +24,7 @@ async def test_insert_snake_entity_name_and_get_success(
24
24
  async for client in test_client_generator:
25
25
  # login
26
26
  login_admin_response = await client.post(
27
- '/api/v1/login',
27
+ '/api/v1/auth/login',
28
28
  json={
29
29
  'identity': app_auth_admin_username,
30
30
  'password': app_auth_admin_password
@@ -86,7 +86,7 @@ async def test_update_snake_entity_name_and_get_success(
86
86
  async for client in test_client_generator:
87
87
  # login
88
88
  login_admin_response = await client.post(
89
- '/api/v1/login',
89
+ '/api/v1/auth/login',
90
90
  json={
91
91
  'identity': app_auth_admin_username,
92
92
  'password': app_auth_admin_password,
@@ -164,7 +164,7 @@ async def test_delete_snake_entity_name_and_get_success(
164
164
  async for client in test_client_generator:
165
165
  # login
166
166
  login_admin_response = await client.post(
167
- '/api/v1/login',
167
+ '/api/v1/auth/login',
168
168
  json={
169
169
  'identity': app_auth_admin_username,
170
170
  'password': app_auth_admin_password
@@ -1,3 +1,3 @@
1
1
  __pycache__
2
2
  venv
3
- .env
3
+ /.env
@@ -1,3 +1,3 @@
1
- .env
1
+ /.env
2
2
  __pycache__
3
3
  venv
zrb/task/base_task.py CHANGED
@@ -22,6 +22,7 @@ from ..helper.string.conversion import (
22
22
  )
23
23
  from ..helper.map.conversion import to_str as str_map_to_str
24
24
  from ..helper.string.jinja import is_probably_jinja
25
+ from ..config.config import show_advertisement
25
26
 
26
27
  import asyncio
27
28
  import copy
@@ -661,7 +662,8 @@ class BaseTask(TaskModel):
661
662
  self.end_timer()
662
663
  self.log_info('Task is ready')
663
664
  if show_info:
664
- get_advertisement(advertisements).show()
665
+ if show_advertisement:
666
+ get_advertisement(advertisements).show()
665
667
  self.show_done_info()
666
668
  self.show_run_command()
667
669
  return True