plutonium 0.10.1 → 0.10.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (44) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +2 -0
  3. data/app/assets/javascripts/turbo/index.js +1 -1
  4. data/app/views/application/_resource_header.html.erb +12 -12
  5. data/app/views/layouts/resource.html.erb +1 -0
  6. data/app/views/layouts/rodauth.html.erb +4 -4
  7. data/app/views/resource/_nav_user.html.erb +1 -1
  8. data/app/views/resource/index.rabl +1 -1
  9. data/brakeman.ignore +1 -1
  10. data/config/initializers/rabl.rb +2 -0
  11. data/css.manifest +1 -1
  12. data/js.manifest +2 -2
  13. data/lib/generators/pu/core/install/templates/config/initializers/plutonium.rb +0 -3
  14. data/lib/generators/pu/gen/pug/pug_generator.rb +6 -0
  15. data/lib/generators/pu/gen/pug/templates/pug.rb.tt +1 -1
  16. data/lib/generators/pu/pkg/app/templates/config/routes.rb.tt +3 -3
  17. data/lib/plutonium/config.rb +0 -11
  18. data/lib/plutonium/core/autodiscovery/input_discoverer.rb +1 -1
  19. data/lib/plutonium/core/autodiscovery/renderer_discoverer.rb +1 -1
  20. data/lib/plutonium/core/controllers/base.rb +13 -3
  21. data/lib/plutonium/core/controllers/queryable.rb +3 -1
  22. data/lib/plutonium/pkg/app.rb +6 -0
  23. data/lib/plutonium/railtie.rb +15 -0
  24. data/lib/plutonium/reloader.rb +99 -0
  25. data/lib/plutonium/resource/controller.rb +61 -22
  26. data/lib/plutonium/resource/policy.rb +56 -9
  27. data/lib/plutonium/resource/presenter.rb +44 -12
  28. data/lib/plutonium/resource/query_object.rb +186 -73
  29. data/lib/plutonium/resource/record.rb +213 -119
  30. data/lib/plutonium/rodauth/controller_methods.rb +7 -0
  31. data/lib/plutonium/version.rb +1 -1
  32. data/lib/plutonium.rb +50 -12
  33. data/package-lock.json +174 -0
  34. data/package.json +2 -0
  35. data/public/plutonium-assets/plutonium-app-6WILQCTT.js +39 -0
  36. data/public/plutonium-assets/plutonium-app-6WILQCTT.js.map +7 -0
  37. data/public/plutonium-assets/plutonium-logo-original.png +0 -0
  38. data/public/plutonium-assets/plutonium-logo-white.png +0 -0
  39. data/public/plutonium-assets/plutonium-logo.png +0 -0
  40. data/public/plutonium-assets/plutonium.2d4f0c333cd000051d3b.css +3424 -0
  41. data/public/plutonium-assets/plutonium.ico +0 -0
  42. metadata +10 -4
  43. data/lib/plutonium/reactor/core.rb +0 -78
  44. data/public/plutonium-assets/logo.png +0 -0
data/package-lock.json CHANGED
@@ -9,6 +9,7 @@
9
9
  "@hotwired/turbo": "^8.0.4",
10
10
  "@tailwindcss/forms": "^0.5.7",
11
11
  "autoprefixer": "^10.4.18",
12
+ "concurrently": "^8.2.2",
12
13
  "esbuild": "^0.20.1",
13
14
  "esbuild-plugin-manifest": "^1.0.3",
14
15
  "flowbite": "^2.3.0",
@@ -31,6 +32,18 @@
31
32
  "url": "https://github.com/sponsors/sindresorhus"
32
33
  }
33
34
  },
35
+ "node_modules/@babel/runtime": {
36
+ "version": "7.24.5",
37
+ "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.24.5.tgz",
38
+ "integrity": "sha512-Nms86NXrsaeU9vbBJKni6gXiEXZ4CVpYVzEjDH9Sb8vmZ3UljyA1GSOJl/6LGPO8EHLuSF9H+IxNXHPX8QHJ4g==",
39
+ "dev": true,
40
+ "dependencies": {
41
+ "regenerator-runtime": "^0.14.0"
42
+ },
43
+ "engines": {
44
+ "node": ">=6.9.0"
45
+ }
46
+ },
34
47
  "node_modules/@esbuild/aix-ppc64": {
35
48
  "version": "0.20.1",
36
49
  "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.20.1.tgz",
@@ -741,6 +754,49 @@
741
754
  }
742
755
  ]
743
756
  },
757
+ "node_modules/chalk": {
758
+ "version": "4.1.2",
759
+ "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
760
+ "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
761
+ "dev": true,
762
+ "dependencies": {
763
+ "ansi-styles": "^4.1.0",
764
+ "supports-color": "^7.1.0"
765
+ },
766
+ "engines": {
767
+ "node": ">=10"
768
+ },
769
+ "funding": {
770
+ "url": "https://github.com/chalk/chalk?sponsor=1"
771
+ }
772
+ },
773
+ "node_modules/chalk/node_modules/ansi-styles": {
774
+ "version": "4.3.0",
775
+ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
776
+ "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
777
+ "dev": true,
778
+ "dependencies": {
779
+ "color-convert": "^2.0.1"
780
+ },
781
+ "engines": {
782
+ "node": ">=8"
783
+ },
784
+ "funding": {
785
+ "url": "https://github.com/chalk/ansi-styles?sponsor=1"
786
+ }
787
+ },
788
+ "node_modules/chalk/node_modules/supports-color": {
789
+ "version": "7.2.0",
790
+ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
791
+ "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
792
+ "dev": true,
793
+ "dependencies": {
794
+ "has-flag": "^4.0.0"
795
+ },
796
+ "engines": {
797
+ "node": ">=8"
798
+ }
799
+ },
744
800
  "node_modules/chokidar": {
745
801
  "version": "3.6.0",
746
802
  "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.6.0.tgz",
@@ -891,6 +947,33 @@
891
947
  "node": ">= 6"
892
948
  }
893
949
  },
950
+ "node_modules/concurrently": {
951
+ "version": "8.2.2",
952
+ "resolved": "https://registry.npmjs.org/concurrently/-/concurrently-8.2.2.tgz",
953
+ "integrity": "sha512-1dP4gpXFhei8IOtlXRE/T/4H88ElHgTiUzh71YUmtjTEHMSRS2Z/fgOxHSxxusGHogsRfxNq1vyAwxSC+EVyDg==",
954
+ "dev": true,
955
+ "dependencies": {
956
+ "chalk": "^4.1.2",
957
+ "date-fns": "^2.30.0",
958
+ "lodash": "^4.17.21",
959
+ "rxjs": "^7.8.1",
960
+ "shell-quote": "^1.8.1",
961
+ "spawn-command": "0.0.2",
962
+ "supports-color": "^8.1.1",
963
+ "tree-kill": "^1.2.2",
964
+ "yargs": "^17.7.2"
965
+ },
966
+ "bin": {
967
+ "conc": "dist/bin/concurrently.js",
968
+ "concurrently": "dist/bin/concurrently.js"
969
+ },
970
+ "engines": {
971
+ "node": "^14.13.0 || >=16.0.0"
972
+ },
973
+ "funding": {
974
+ "url": "https://github.com/open-cli-tools/concurrently?sponsor=1"
975
+ }
976
+ },
894
977
  "node_modules/cross-spawn": {
895
978
  "version": "7.0.3",
896
979
  "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz",
@@ -917,6 +1000,22 @@
917
1000
  "node": ">=4"
918
1001
  }
919
1002
  },
1003
+ "node_modules/date-fns": {
1004
+ "version": "2.30.0",
1005
+ "resolved": "https://registry.npmjs.org/date-fns/-/date-fns-2.30.0.tgz",
1006
+ "integrity": "sha512-fnULvOpxnC5/Vg3NCiWelDsLiUc9bRwAPs/+LfTLNvetFCtCTN+yQz15C/fs4AwX1R9K5GLtLfn8QW+dWisaAw==",
1007
+ "dev": true,
1008
+ "dependencies": {
1009
+ "@babel/runtime": "^7.21.0"
1010
+ },
1011
+ "engines": {
1012
+ "node": ">=0.11"
1013
+ },
1014
+ "funding": {
1015
+ "type": "opencollective",
1016
+ "url": "https://opencollective.com/date-fns"
1017
+ }
1018
+ },
920
1019
  "node_modules/dependency-graph": {
921
1020
  "version": "0.11.0",
922
1021
  "resolved": "https://registry.npmjs.org/dependency-graph/-/dependency-graph-0.11.0.tgz",
@@ -1221,6 +1320,15 @@
1221
1320
  "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==",
1222
1321
  "dev": true
1223
1322
  },
1323
+ "node_modules/has-flag": {
1324
+ "version": "4.0.0",
1325
+ "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
1326
+ "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
1327
+ "dev": true,
1328
+ "engines": {
1329
+ "node": ">=8"
1330
+ }
1331
+ },
1224
1332
  "node_modules/hasown": {
1225
1333
  "version": "2.0.1",
1226
1334
  "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.1.tgz",
@@ -1365,6 +1473,12 @@
1365
1473
  "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==",
1366
1474
  "dev": true
1367
1475
  },
1476
+ "node_modules/lodash": {
1477
+ "version": "4.17.21",
1478
+ "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz",
1479
+ "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==",
1480
+ "dev": true
1481
+ },
1368
1482
  "node_modules/lodash.debounce": {
1369
1483
  "version": "4.0.8",
1370
1484
  "resolved": "https://registry.npmjs.org/lodash.debounce/-/lodash.debounce-4.0.8.tgz",
@@ -1933,6 +2047,12 @@
1933
2047
  "node": ">=8.10.0"
1934
2048
  }
1935
2049
  },
2050
+ "node_modules/regenerator-runtime": {
2051
+ "version": "0.14.1",
2052
+ "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.14.1.tgz",
2053
+ "integrity": "sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw==",
2054
+ "dev": true
2055
+ },
1936
2056
  "node_modules/require-directory": {
1937
2057
  "version": "2.1.1",
1938
2058
  "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz",
@@ -2001,6 +2121,15 @@
2001
2121
  "queue-microtask": "^1.2.2"
2002
2122
  }
2003
2123
  },
2124
+ "node_modules/rxjs": {
2125
+ "version": "7.8.1",
2126
+ "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.8.1.tgz",
2127
+ "integrity": "sha512-AA3TVj+0A2iuIoQkWEK/tqFjBq2j+6PO6Y0zJcvzLAFhEFIO3HL0vls9hWLncZbAAbK0mar7oZ4V079I/qPMxg==",
2128
+ "dev": true,
2129
+ "dependencies": {
2130
+ "tslib": "^2.1.0"
2131
+ }
2132
+ },
2004
2133
  "node_modules/shebang-command": {
2005
2134
  "version": "2.0.0",
2006
2135
  "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz",
@@ -2022,6 +2151,15 @@
2022
2151
  "node": ">=8"
2023
2152
  }
2024
2153
  },
2154
+ "node_modules/shell-quote": {
2155
+ "version": "1.8.1",
2156
+ "resolved": "https://registry.npmjs.org/shell-quote/-/shell-quote-1.8.1.tgz",
2157
+ "integrity": "sha512-6j1W9l1iAs/4xYBI1SYOVZyFcCis9b4KCLQ8fgAGG07QvzaRLVVRQvAy85yNmmZSjYjg4MWh4gNvlPujU/5LpA==",
2158
+ "dev": true,
2159
+ "funding": {
2160
+ "url": "https://github.com/sponsors/ljharb"
2161
+ }
2162
+ },
2025
2163
  "node_modules/signal-exit": {
2026
2164
  "version": "4.1.0",
2027
2165
  "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz",
@@ -2055,6 +2193,12 @@
2055
2193
  "node": ">=0.10.0"
2056
2194
  }
2057
2195
  },
2196
+ "node_modules/spawn-command": {
2197
+ "version": "0.0.2",
2198
+ "resolved": "https://registry.npmjs.org/spawn-command/-/spawn-command-0.0.2.tgz",
2199
+ "integrity": "sha512-zC8zGoGkmc8J9ndvml8Xksr1Amk9qBujgbF0JAIWO7kXr43w0h/0GJNM/Vustixu+YE8N/MTrQ7N31FvHUACxQ==",
2200
+ "dev": true
2201
+ },
2058
2202
  "node_modules/string-width": {
2059
2203
  "version": "5.1.2",
2060
2204
  "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz",
@@ -2173,6 +2317,21 @@
2173
2317
  "node": ">=16 || 14 >=14.17"
2174
2318
  }
2175
2319
  },
2320
+ "node_modules/supports-color": {
2321
+ "version": "8.1.1",
2322
+ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz",
2323
+ "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==",
2324
+ "dev": true,
2325
+ "dependencies": {
2326
+ "has-flag": "^4.0.0"
2327
+ },
2328
+ "engines": {
2329
+ "node": ">=10"
2330
+ },
2331
+ "funding": {
2332
+ "url": "https://github.com/chalk/supports-color?sponsor=1"
2333
+ }
2334
+ },
2176
2335
  "node_modules/supports-preserve-symlinks-flag": {
2177
2336
  "version": "1.0.0",
2178
2337
  "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz",
@@ -2261,12 +2420,27 @@
2261
2420
  "node": ">=8.0"
2262
2421
  }
2263
2422
  },
2423
+ "node_modules/tree-kill": {
2424
+ "version": "1.2.2",
2425
+ "resolved": "https://registry.npmjs.org/tree-kill/-/tree-kill-1.2.2.tgz",
2426
+ "integrity": "sha512-L0Orpi8qGpRG//Nd+H90vFB+3iHnue1zSSGmNOOCh1GLJ7rUKVwV2HvijphGQS2UmhUZewS9VgvxYIdgr+fG1A==",
2427
+ "dev": true,
2428
+ "bin": {
2429
+ "tree-kill": "cli.js"
2430
+ }
2431
+ },
2264
2432
  "node_modules/ts-interface-checker": {
2265
2433
  "version": "0.1.13",
2266
2434
  "resolved": "https://registry.npmjs.org/ts-interface-checker/-/ts-interface-checker-0.1.13.tgz",
2267
2435
  "integrity": "sha512-Y/arvbn+rrz3JCKl9C4kVNfTfSm2/mEp5FSz5EsZSANGPSlQrpRI5M4PKF+mJnE52jOO90PnPSc3Ur3bTQw0gA==",
2268
2436
  "dev": true
2269
2437
  },
2438
+ "node_modules/tslib": {
2439
+ "version": "2.6.2",
2440
+ "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz",
2441
+ "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==",
2442
+ "dev": true
2443
+ },
2270
2444
  "node_modules/unicorn-magic": {
2271
2445
  "version": "0.1.0",
2272
2446
  "resolved": "https://registry.npmjs.org/unicorn-magic/-/unicorn-magic-0.1.0.tgz",
data/package.json CHANGED
@@ -4,6 +4,7 @@
4
4
  "@hotwired/turbo": "^8.0.4",
5
5
  "@tailwindcss/forms": "^0.5.7",
6
6
  "autoprefixer": "^10.4.18",
7
+ "concurrently": "^8.2.2",
7
8
  "esbuild": "^0.20.1",
8
9
  "esbuild-plugin-manifest": "^1.0.3",
9
10
  "flowbite": "^2.3.0",
@@ -14,6 +15,7 @@
14
15
  "tailwindcss": "^3.4.1"
15
16
  },
16
17
  "scripts": {
18
+ "dev": "concurrently \"npm run css:dev\" \"npm run js:dev\"",
17
19
  "css:dev": "postcss app/assets/stylesheets/plutonium.css -o public/plutonium-assets/build/plutonium-dev.css --watch",
18
20
  "js:dev": "node esbuild.config.js",
19
21
  "css:prod": "postcss app/assets/stylesheets/plutonium.css -o public/plutonium-assets/plutonium.css --prod",