utopia 3.0.6 → 3.0.7
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 +4 -4
- checksums.yaml.gz.sig +0 -0
- data/bake/utopia/server.rb +1 -1
- data/bake/utopia/static.rb +1 -1
- data/bake/utopia.rb +1 -1
- data/context/index.yaml +2 -0
- data/context/integrating-with-javascript.md +8 -8
- data/lib/utopia/content/builder.rb +1 -1
- data/lib/utopia/content/document.rb +1 -1
- data/lib/utopia/content/link.rb +1 -1
- data/lib/utopia/content/response.rb +1 -1
- data/lib/utopia/content.rb +1 -1
- data/lib/utopia/controller/actions.rb +1 -1
- data/lib/utopia/controller/base.rb +1 -1
- data/lib/utopia/controller/respond.rb +1 -1
- data/lib/utopia/controller/responder.rb +1 -1
- data/lib/utopia/controller/result.rb +1 -1
- data/lib/utopia/controller/variables.rb +1 -1
- data/lib/utopia/controller.rb +1 -1
- data/lib/utopia/extensions/array_split.rb +1 -1
- data/lib/utopia/extensions/date_comparisons.rb +1 -1
- data/lib/utopia/import_map.rb +4 -4
- data/lib/utopia/localization/resolver.rb +1 -1
- data/lib/utopia/localization.rb +1 -1
- data/lib/utopia/path/matcher.rb +1 -1
- data/lib/utopia/session/serialization.rb +1 -1
- data/lib/utopia/session.rb +1 -1
- data/lib/utopia/shell.rb +1 -1
- data/lib/utopia/static.rb +1 -1
- data/lib/utopia/version.rb +1 -1
- data/lib/utopia.rb +1 -1
- data/readme.md +11 -7
- data/releases.md +6 -0
- data/setup/site/bake.rb +1 -1
- data/setup/site/config/application.rb +4 -0
- data/setup/site/config/serve.rb +1 -1
- data/setup/site/fixtures/website.rb +1 -1
- data/setup/site/gems.rb +1 -1
- data.tar.gz.sig +2 -1
- metadata +17 -15
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: dad6b7c394da35c51fd5041dd39f5caae69b81b2f847777ceee2f4685f7190ec
|
|
4
|
+
data.tar.gz: 0243d583b140c45fa0d954ce7579d6538872cf77b744909039bba4bb6a91b462
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: d448efb2345156f1bf0a748418b7f4fafac043c0ec23abafc17e415ae3b3fc2d5828f87c1317955c1cabfc07516b9390273e8963b20fd50fa39073e6ab283155
|
|
7
|
+
data.tar.gz: 6a1085fcdd2286734d12c915d7459d738a26b0ba7ae3470573a7e9356977dfc8439a8d3d368b8aaf4b137eda3401035fd71ad20f6c238b15f530b886e05ad734
|
checksums.yaml.gz.sig
CHANGED
|
Binary file
|
data/bake/utopia/server.rb
CHANGED
data/bake/utopia/static.rb
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
3
|
# Released under the MIT License.
|
|
4
|
-
# Copyright, 2017-
|
|
4
|
+
# Copyright, 2017-2026, by Samuel Williams.
|
|
5
5
|
|
|
6
6
|
# Generate a static copy of the application.
|
|
7
7
|
# @parameter output_path [String] The output path for the generated site.
|
data/bake/utopia.rb
CHANGED
data/context/index.yaml
CHANGED
|
@@ -3,6 +3,8 @@
|
|
|
3
3
|
---
|
|
4
4
|
description: Utopia is a framework for building dynamic content-driven websites.
|
|
5
5
|
metadata:
|
|
6
|
+
bug_tracker_uri: https://github.com/socketry/utopia/issues
|
|
7
|
+
changelog_uri: https://github.com/socketry/utopia/blob/main/releases.md
|
|
6
8
|
documentation_uri: https://socketry.github.io/utopia/
|
|
7
9
|
funding_uri: https://github.com/sponsors/ioquatix/
|
|
8
10
|
source_code_uri: https://github.com/socketry/utopia.git
|
|
@@ -8,7 +8,7 @@ Import maps provide a modern way to manage JavaScript module dependencies. Utopi
|
|
|
8
8
|
|
|
9
9
|
### Installing JavaScript Libraries
|
|
10
10
|
|
|
11
|
-
Declare browser libraries as production dependencies in `package.json`. The `
|
|
11
|
+
Declare browser libraries as production dependencies in `package.json`. The `web-packages.packages` section selects the files that should be served and assigns their browser import names:
|
|
12
12
|
|
|
13
13
|
```json
|
|
14
14
|
{
|
|
@@ -16,7 +16,7 @@ Declare browser libraries as production dependencies in `package.json`. The `bak
|
|
|
16
16
|
"dependencies": {
|
|
17
17
|
"@socketry/syntax": "^0.6.1"
|
|
18
18
|
},
|
|
19
|
-
"
|
|
19
|
+
"web-packages": {
|
|
20
20
|
"packages": {
|
|
21
21
|
"@socketry/syntax": {
|
|
22
22
|
"include": [
|
|
@@ -34,8 +34,8 @@ Declare browser libraries as production dependencies in `package.json`. The `bak
|
|
|
34
34
|
Install the dependencies using the configured package manager, then generate the browser-facing package projection:
|
|
35
35
|
|
|
36
36
|
```bash
|
|
37
|
-
$ bundle exec bake
|
|
38
|
-
$ bundle exec bake
|
|
37
|
+
$ bundle exec bake web:packages:install
|
|
38
|
+
$ bundle exec bake web:packages:update
|
|
39
39
|
```
|
|
40
40
|
|
|
41
41
|
This installs dependencies into `node_modules/` and copies only the selected browser files into `public/_components/`. Treat both directories as generated projections rather than authored source.
|
|
@@ -43,8 +43,8 @@ This installs dependencies into `node_modules/` and copies only the selected bro
|
|
|
43
43
|
Use an immutable installation and verify the checked-in projection in CI:
|
|
44
44
|
|
|
45
45
|
```bash
|
|
46
|
-
$ bundle exec bake
|
|
47
|
-
$ bundle exec bake
|
|
46
|
+
$ bundle exec bake web:packages:install frozen=true
|
|
47
|
+
$ bundle exec bake web:packages:check
|
|
48
48
|
```
|
|
49
49
|
|
|
50
50
|
### Creating the Import Map
|
|
@@ -96,9 +96,9 @@ Once the import map is set up, you can import and use the library in your script
|
|
|
96
96
|
</script>
|
|
97
97
|
```
|
|
98
98
|
|
|
99
|
-
Inspect the generated import map with `bundle exec bake
|
|
99
|
+
Inspect the generated import map with `bundle exec bake web:packages:import_map:show` when debugging package resolution.
|
|
100
100
|
|
|
101
|
-
See the [
|
|
101
|
+
See the [Web Packages documentation](https://socketry.github.io/web-packages/) for workspace packages, package selection, and alternative package managers.
|
|
102
102
|
|
|
103
103
|
### Advanced Import Map Features
|
|
104
104
|
|
data/lib/utopia/content/link.rb
CHANGED
data/lib/utopia/content.rb
CHANGED
data/lib/utopia/controller.rb
CHANGED
data/lib/utopia/import_map.rb
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
3
|
# Released under the MIT License.
|
|
4
|
-
# Copyright, 2025, by Samuel Williams.
|
|
4
|
+
# Copyright, 2025-2026, by Samuel Williams.
|
|
5
5
|
|
|
6
6
|
require "json"
|
|
7
7
|
require "xrb"
|
|
8
8
|
require "protocol/url"
|
|
9
|
-
require "
|
|
9
|
+
require "web/packages/manifest"
|
|
10
10
|
|
|
11
11
|
module Utopia
|
|
12
12
|
# Represents an import map for JavaScript modules with support for URI and relative path resolution.
|
|
@@ -56,11 +56,11 @@ module Utopia
|
|
|
56
56
|
#
|
|
57
57
|
# puts page_map.to_html
|
|
58
58
|
class ImportMap
|
|
59
|
-
# Load the import mappings from a
|
|
59
|
+
# Load the import mappings from a Web Packages static projection manifest.
|
|
60
60
|
# @parameter root [String | Pathname] The static package output directory.
|
|
61
61
|
# @returns [ImportMap] A frozen import map using the manifest's public base URL.
|
|
62
62
|
def self.load_manifest(root)
|
|
63
|
-
manifest =
|
|
63
|
+
manifest = Web::Packages::Manifest.load(root)
|
|
64
64
|
base = Protocol::URL[manifest.data.fetch("base")]
|
|
65
65
|
imports = manifest.import_map.fetch("imports").transform_values do |value|
|
|
66
66
|
Protocol::URL[value].relative_to(base).to_s
|
data/lib/utopia/localization.rb
CHANGED
data/lib/utopia/path/matcher.rb
CHANGED
data/lib/utopia/session.rb
CHANGED
data/lib/utopia/shell.rb
CHANGED
data/lib/utopia/static.rb
CHANGED
data/lib/utopia/version.rb
CHANGED
data/lib/utopia.rb
CHANGED
data/readme.md
CHANGED
|
@@ -31,6 +31,10 @@ Please see the [project documentation](https://socketry.github.io/utopia/) for m
|
|
|
31
31
|
|
|
32
32
|
Please see the [project releases](https://socketry.github.io/utopia/releases/index) for all releases.
|
|
33
33
|
|
|
34
|
+
### v3.0.7
|
|
35
|
+
|
|
36
|
+
- [Web Packages](https://socketry.github.io/utopia/releases/index#web-packages)
|
|
37
|
+
|
|
34
38
|
### v3.0.6
|
|
35
39
|
|
|
36
40
|
- [JavaScript Packages](https://socketry.github.io/utopia/releases/index#javascript-packages)
|
|
@@ -94,26 +98,26 @@ The 3.0.x series is considered a development release while the protocol HTTP app
|
|
|
94
98
|
|
|
95
99
|
We welcome contributions to this project.
|
|
96
100
|
|
|
97
|
-
1. Fork
|
|
101
|
+
1. Fork the repository.
|
|
98
102
|
2. Create your feature branch (`git checkout -b my-new-feature`).
|
|
99
|
-
3. Commit your changes (`git commit -am 'Add some feature'`).
|
|
103
|
+
3. Commit your changes (`git commit -am 'Add some feature.'`).
|
|
100
104
|
4. Push to the branch (`git push origin my-new-feature`).
|
|
101
|
-
5. Create new
|
|
105
|
+
5. Create a new pull request.
|
|
102
106
|
|
|
103
107
|
### Running Tests
|
|
104
108
|
|
|
105
109
|
To run the test suite:
|
|
106
110
|
|
|
107
|
-
```
|
|
108
|
-
bundle exec sus
|
|
111
|
+
``` bash
|
|
112
|
+
$ bundle exec sus
|
|
109
113
|
```
|
|
110
114
|
|
|
111
115
|
### Making Releases
|
|
112
116
|
|
|
113
117
|
To make a new release:
|
|
114
118
|
|
|
115
|
-
```
|
|
116
|
-
bundle exec bake gem:release:patch # or minor or major
|
|
119
|
+
``` bash
|
|
120
|
+
$ bundle exec bake gem:release:patch # or minor or major
|
|
117
121
|
```
|
|
118
122
|
|
|
119
123
|
### Developer Certificate of Origin
|
data/releases.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# Releases
|
|
2
2
|
|
|
3
|
+
## v3.0.7
|
|
4
|
+
|
|
5
|
+
### Web Packages
|
|
6
|
+
|
|
7
|
+
Utopia now uses `web-packages` v0.2 after the project was renamed from `bake-node`. Applications should use the `web-packages` key in `package.json` and invoke package management through the `web:packages` Bake namespace. The generated `.manifest.json` format remains compatible.
|
|
8
|
+
|
|
3
9
|
## v3.0.6
|
|
4
10
|
|
|
5
11
|
### JavaScript Packages
|
data/setup/site/bake.rb
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
3
|
# Released under the MIT License.
|
|
4
|
-
# Copyright, 2020-
|
|
4
|
+
# Copyright, 2020-2026, by Samuel Williams.
|
|
5
5
|
|
|
6
6
|
def deploy
|
|
7
7
|
# This task is typiclly run after the site is updated but before the server is restarted.
|
data/setup/site/config/serve.rb
CHANGED
data/setup/site/gems.rb
CHANGED
data.tar.gz.sig
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
�u��<�W���ݎ��XBD,����'����^��~)�u�9DvYq���N1WZ*��(��Vv�E2�pv"��^2�Έ�"<�I�xܐ4ŏe��f��o�״��h��u�0��yH��%SC.�����㨺QW�Ńj�3�Z�#�Z|K7z��=B�˝�;ܜA-���;������5By����5��$���^h:�;��"q����8�Q�kk��U�*@rsz.개8��=�G�͑D��:��8�|&���[ҏ����.b�ѿ-�(���A���A)ϧwD�'#���@��cn���>��W�(
|
|
2
|
+
��- ~���c���q�IZ�Q�Ń֘n��}X
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: utopia
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 3.0.
|
|
4
|
+
version: 3.0.7
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Samuel Williams
|
|
@@ -57,20 +57,6 @@ dependencies:
|
|
|
57
57
|
- - "~>"
|
|
58
58
|
- !ruby/object:Gem::Version
|
|
59
59
|
version: '0.20'
|
|
60
|
-
- !ruby/object:Gem::Dependency
|
|
61
|
-
name: bake-node
|
|
62
|
-
requirement: !ruby/object:Gem::Requirement
|
|
63
|
-
requirements:
|
|
64
|
-
- - ">="
|
|
65
|
-
- !ruby/object:Gem::Version
|
|
66
|
-
version: '0'
|
|
67
|
-
type: :runtime
|
|
68
|
-
prerelease: false
|
|
69
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
70
|
-
requirements:
|
|
71
|
-
- - ">="
|
|
72
|
-
- !ruby/object:Gem::Version
|
|
73
|
-
version: '0'
|
|
74
60
|
- !ruby/object:Gem::Dependency
|
|
75
61
|
name: concurrent-ruby
|
|
76
62
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -267,6 +253,20 @@ dependencies:
|
|
|
267
253
|
- - "~>"
|
|
268
254
|
- !ruby/object:Gem::Version
|
|
269
255
|
version: '0.1'
|
|
256
|
+
- !ruby/object:Gem::Dependency
|
|
257
|
+
name: web-packages
|
|
258
|
+
requirement: !ruby/object:Gem::Requirement
|
|
259
|
+
requirements:
|
|
260
|
+
- - "~>"
|
|
261
|
+
- !ruby/object:Gem::Version
|
|
262
|
+
version: '0.2'
|
|
263
|
+
type: :runtime
|
|
264
|
+
prerelease: false
|
|
265
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
266
|
+
requirements:
|
|
267
|
+
- - "~>"
|
|
268
|
+
- !ruby/object:Gem::Version
|
|
269
|
+
version: '0.2'
|
|
270
270
|
- !ruby/object:Gem::Dependency
|
|
271
271
|
name: xrb
|
|
272
272
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -393,6 +393,8 @@ homepage: https://github.com/socketry/utopia
|
|
|
393
393
|
licenses:
|
|
394
394
|
- MIT
|
|
395
395
|
metadata:
|
|
396
|
+
bug_tracker_uri: https://github.com/socketry/utopia/issues
|
|
397
|
+
changelog_uri: https://github.com/socketry/utopia/blob/main/releases.md
|
|
396
398
|
documentation_uri: https://socketry.github.io/utopia/
|
|
397
399
|
funding_uri: https://github.com/sponsors/ioquatix/
|
|
398
400
|
source_code_uri: https://github.com/socketry/utopia.git
|
metadata.gz.sig
CHANGED
|
Binary file
|