plutonium 0.34.0 → 0.34.1

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 38de4c2a97493b6e03b185ab05f6c6990df33ad210d89612ce98ef392e6c0ae1
4
- data.tar.gz: 1de78573407b4032d3f41fc249765028b24d8204f79d68816c4571ac55edf314
3
+ metadata.gz: 928572413dcc6ef2e0d2e7ad258ccd1728d1d6ace9ae921abe6ae9eba89733f3
4
+ data.tar.gz: f94b0167a48c070d0425d5d1f42364d03786a83834b1071f791b70dfb72db421
5
5
  SHA512:
6
- metadata.gz: e5f97caf77d2dce2a6c8f3ac2735974a244b1387ab015ecf73ff27210bc7eb74a8c05971145f628c99cb481e55383ee8f62f42a41ac2f372597e9b3e43e4a1c5
7
- data.tar.gz: 104fd85f23d698fdbbc6bbda701a5a22912516877761471028c93050260853f0a96461d0d80f609b0142f01155b6b5928b4403d654579baeaa9119b08258e1c8
6
+ metadata.gz: be38ab566496a59200dbb0dfe728ae85dc7c3d9fdbfb031b7501e9ac96b4fe69139618c7077fb7ea363aafa59388aee89681903d9c4223611044c59101ab17b6
7
+ data.tar.gz: a1d51393fe914ddecb1b339c36a0a2d4fd8f69cc995291e4d383fdeeae815419ce1f564854e3b4aace31d119ca1eddaa687ed7d87fce7e30b1fa8db07f98ae4d
@@ -91,13 +91,13 @@ rails g pu:res:conn Post --dest=admin_portal
91
91
  Resources must be connected to a portal to be accessible:
92
92
 
93
93
  ```bash
94
- rails g pu:res:conn Post --portal AdminPortal
94
+ rails g pu:res:conn Post --dest=admin_portal
95
95
  ```
96
96
 
97
97
  This:
98
- - Registers the resource in the portal
99
- - Creates a route
100
- - Optionally creates portal-specific definition override
98
+ - Registers the resource in portal routes
99
+ - Creates portal-specific controller
100
+ - Creates portal-specific policy with attribute permissions
101
101
 
102
102
  See `connect-resource` skill for details.
103
103
 
@@ -253,8 +253,8 @@ end
253
253
 
254
254
  ## Workflow Summary
255
255
 
256
- 1. **Generate** - `rails g pu:res:scaffold Model attributes...`
257
- 2. **Connect** - `rails g pu:res:conn Model --portal PortalName`
256
+ 1. **Generate** - `rails g pu:res:scaffold Model attributes... --dest=main_app`
257
+ 2. **Connect** - `rails g pu:res:conn Model --dest=portal_name`
258
258
  3. **Customize** - Edit definition/policy as needed (model rarely needs changes)
259
259
  4. **Override per portal** - Create portal-specific definitions when needed
260
260
 
data/CHANGELOG.md CHANGED
@@ -1,3 +1,9 @@
1
+ ## [0.34.1] - 2026-01-18
2
+
3
+ ### 🐛 Bug Fixes
4
+
5
+ - *(release)* Check npm auth early in release workflow
6
+ - *(docs)* Correct generator flags to use --dest instead of --portal/--package
1
7
  ## [0.34.0] - 2026-01-18
2
8
 
3
9
  ### 🚀 Features
@@ -51,7 +51,7 @@ end
51
51
  ### Adding Resources to a Feature Package
52
52
 
53
53
  ```bash
54
- rails generate pu:res:scaffold Post title:string body:text --package blogging
54
+ rails generate pu:res:scaffold Post title:string body:text --dest=blogging
55
55
  ```
56
56
 
57
57
  Resources are namespaced under the package:
@@ -126,13 +126,13 @@ end
126
126
  ### Connecting Resources to Portals
127
127
 
128
128
  ```bash
129
- rails generate pu:res:conn Post --package blogging --portal admin
129
+ rails generate pu:res:conn Blogging::Post --dest=admin_portal
130
130
  ```
131
131
 
132
132
  This:
133
- 1. Creates portal-specific routes
134
- 2. Optionally creates portal-specific controller
135
- 3. Registers the resource with the portal
133
+ 1. Registers the resource in portal routes
134
+ 2. Creates portal-specific controller
135
+ 3. Creates portal-specific policy with attribute permissions
136
136
 
137
137
  ## Multiple Portals
138
138
 
@@ -112,7 +112,7 @@ end
112
112
  Resources must be registered with a portal to be accessible:
113
113
 
114
114
  ```bash
115
- rails generate pu:res:conn Post --portal admin
115
+ rails generate pu:res:conn Post --dest=admin_portal
116
116
  ```
117
117
 
118
118
  Or manually in routes:
@@ -120,7 +120,7 @@ Or manually in routes:
120
120
  ```ruby
121
121
  # packages/admin_portal/config/routes.rb
122
122
  AdminPortal::Engine.routes.draw do
123
- resources :posts
123
+ register_resource ::Post
124
124
  end
125
125
  ```
126
126
 
@@ -389,17 +389,16 @@ end
389
389
  ```bash
390
390
  # Generate the structure
391
391
  rails generate pu:pkg:package blogging
392
- rails generate pu:res:scaffold Post title:string slug:string body:text published:boolean --package blogging
393
- rails generate pu:res:scaffold Comment body:text approved:boolean post:belongs_to --package blogging
394
- rails generate pu:res:scaffold Category name:string slug:string --package blogging
392
+ rails generate pu:res:scaffold Post title:string slug:string body:text published:boolean --dest=blogging
393
+ rails generate pu:res:scaffold Comment body:text approved:boolean post:belongs_to --dest=blogging
394
+ rails generate pu:res:scaffold Category name:string slug:string --dest=blogging
395
395
 
396
396
  # Create portals
397
397
  rails generate pu:pkg:portal admin
398
398
  rails generate pu:pkg:portal public
399
399
 
400
- # Connect resources
401
- rails generate pu:res:conn Post --package blogging --portal admin
402
- rails generate pu:res:conn Comment --package blogging --portal admin --parent post
400
+ # Connect resources to portal
401
+ rails generate pu:res:conn Blogging::Post Blogging::Comment Blogging::Category --dest=admin_portal
403
402
 
404
403
  rails db:migrate
405
404
  ```
@@ -461,12 +461,12 @@ rails generate pu:pkg:package billing
461
461
  rails generate pu:pkg:portal app
462
462
 
463
463
  # Generate models
464
- rails generate pu:res:scaffold Organization name:string slug:string --package core
465
- rails generate pu:res:scaffold Membership role:string organization:belongs_to user:belongs_to --package core
466
- rails generate pu:res:scaffold Project name:string organization:belongs_to --package projects
464
+ rails generate pu:res:scaffold Organization name:string slug:string --dest=core
465
+ rails generate pu:res:scaffold Membership role:string organization:belongs_to user:belongs_to --dest=core
466
+ rails generate pu:res:scaffold Project name:string organization:belongs_to --dest=projects
467
467
 
468
468
  # Connect to portal
469
- rails generate pu:res:conn Project --package projects --portal app
469
+ rails generate pu:res:conn Projects::Project --dest=app_portal
470
470
 
471
471
  rails db:migrate
472
472
  ```
@@ -24,7 +24,8 @@ Before you begin, make sure you have:
24
24
  If you're starting fresh, use our application template:
25
25
 
26
26
  ```bash
27
- rails new myapp -m https://radioactive-labs.github.io/plutonium-core/templates/plutonium.rb
27
+ rails new myapp -a propshaft -j esbuild -c tailwind \
28
+ -m https://radioactive-labs.github.io/plutonium-core/templates/plutonium.rb
28
29
  ```
29
30
 
30
31
  This creates a fully configured Plutonium application with authentication ready to go.
@@ -7,7 +7,8 @@ This guide covers installing Plutonium in both new and existing Rails applicatio
7
7
  The fastest way to get started is with our application template:
8
8
 
9
9
  ```bash
10
- rails new myapp -m https://radioactive-labs.github.io/plutonium-core/templates/plutonium.rb
10
+ rails new myapp -a propshaft -j esbuild -c tailwind \
11
+ -m https://radioactive-labs.github.io/plutonium-core/templates/plutonium.rb
11
12
  ```
12
13
 
13
14
  This template:
@@ -7,7 +7,8 @@ In this chapter, you'll create a new Plutonium application and explore its struc
7
7
  Open your terminal and run:
8
8
 
9
9
  ```bash
10
- rails new blog -m https://radioactive-labs.github.io/plutonium-core/templates/plutonium.rb
10
+ rails new blog -a propshaft -j esbuild -c tailwind \
11
+ -m https://radioactive-labs.github.io/plutonium-core/templates/plutonium.rb
11
12
  ```
12
13
 
13
14
  This creates a new Rails application with Plutonium pre-configured.
@@ -19,7 +19,8 @@ Plutonium uses [Rodauth](http://rodauth.jeremyevans.net/) via [rodauth-rails](ht
19
19
  The Plutonium template installs Rodauth automatically:
20
20
 
21
21
  ```bash
22
- rails new myapp -m https://radioactive-labs.github.io/plutonium-core/templates/plutonium.rb
22
+ rails new myapp -a propshaft -j esbuild -c tailwind \
23
+ -m https://radioactive-labs.github.io/plutonium-core/templates/plutonium.rb
23
24
  ```
24
25
 
25
26
  ### Existing Applications
data/docs/index.md CHANGED
@@ -45,13 +45,14 @@ Building admin panels, dashboards, and internal tools in Rails often means:
45
45
 
46
46
  ```bash
47
47
  # Create a new Plutonium app
48
- rails new myapp -m https://radioactive-labs.github.io/plutonium-core/templates/plutonium.rb
48
+ rails new myapp -a propshaft -j esbuild -c tailwind \
49
+ -m https://radioactive-labs.github.io/plutonium-core/templates/plutonium.rb
49
50
 
50
51
  # Generate a resource
51
52
  rails g pu:res:scaffold Post title:string body:text published:boolean
52
53
 
53
54
  # Connect it to a portal
54
- rails g pu:res:conn Post --portal AdminPortal
55
+ rails g pu:res:conn Post --dest=admin_portal
55
56
 
56
57
  # Done. Full CRUD with auth, policies, and UI.
57
58
  ```
@@ -381,7 +381,8 @@ rails generate pu:eject:shell
381
381
 
382
382
  ```bash
383
383
  # Create Rails app with Plutonium template
384
- rails new myapp -m https://radioactive-labs.github.io/plutonium-core/templates/plutonium.rb
384
+ rails new myapp -a propshaft -j esbuild -c tailwind \
385
+ -m https://radioactive-labs.github.io/plutonium-core/templates/plutonium.rb
385
386
 
386
387
  # Or add to existing app
387
388
  rails generate pu:core:install
@@ -1,5 +1,5 @@
1
1
  module Plutonium
2
- VERSION = "0.34.0"
2
+ VERSION = "0.34.1"
3
3
  NEXT_MAJOR_VERSION = VERSION.split(".").tap { |v|
4
4
  v[1] = v[1].to_i + 1
5
5
  v[2] = 0
@@ -162,6 +162,13 @@ namespace :release do
162
162
 
163
163
  puts "Starting release workflow for v#{version}..."
164
164
 
165
+ # Check npm authentication early
166
+ unless system("npm whoami > /dev/null 2>&1")
167
+ puts "Error: You are not logged in to npm. Please run: npm login"
168
+ exit 1
169
+ end
170
+ puts "✓ npm authenticated as: #{`npm whoami`.strip}"
171
+
165
172
  # Check for uncommitted changes
166
173
  unless `git status --porcelain`.strip.empty?
167
174
  puts "Error: You have uncommitted changes. Please commit or stash them first."
data/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@radioactive-labs/plutonium",
3
- "version": "0.34.0",
3
+ "version": "0.34.1",
4
4
  "description": "Core assets for the Plutonium gem",
5
5
  "type": "module",
6
6
  "main": "src/js/core.js",
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: plutonium
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.34.0
4
+ version: 0.34.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stefan Froelich