cloudcannon-jekyll-bookshop 2.0.0.pre.beta.17 → 2.0.0.pre.beta.21

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: 65331904195b9d0c856bde43bd0d5d8c7006b97983971c905989b7597d2202a4
4
- data.tar.gz: 42735502591b811d5d3eb861c71a70e916cac222bb648b16bb1c6555388a96ff
3
+ metadata.gz: 40203118764c4c3b59a2e73b75a519884b31a47ec09cd1913c14c599712d5104
4
+ data.tar.gz: b281f99ac1d9c14a13b94155e8a6edc7a35e5f9f5e3ece296fa1f19856dee9ce
5
5
  SHA512:
6
- metadata.gz: 8cfec536e64eaf0e70ea34b23a8fc3893b817434dbddbc6f6f1d7fffd25fe1064e933fe79b44e16a72b8c1622d4356c81032a05189ed2e0a7364639a00d41def
7
- data.tar.gz: caaf618954e697b1a64a32df0c27d0f4326d5d03942228204fe9731d1eda2b8b675dcde1854d04d59ca5834cb0e18e13b20d5681597ffeae4630e01511ec953e
6
+ metadata.gz: a20fbe1d813a810194c5414d73d8afb85fbe1042d48aeef324133df0d1bed3c97269ab8439203db6a079160f894aeb59fbbbab67c93b81780c2d05b02b0fedf8
7
+ data.tar.gz: ed6fd5e2de09222b25ef7133a98c1cbbfe9d1359d5e6a7d4b82d609d2e6e349133674cf1bd66018b18298cf5c2c2902d4f348b0cf10c97adb4bdce3ab19374f3
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- cloudcannon-jekyll-bookshop (2.0.0.pre.beta.17)
4
+ cloudcannon-jekyll-bookshop (2.0.0.pre.beta.21)
5
5
  dry-inflector (>= 0.1, < 1.0)
6
6
  jekyll (>= 3.7, < 5.0)
7
7
  node-runner (>= 1.0, < 2.0)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module CloudCannonJekyllBookshop
4
- VERSION = "2.0.0.pre.beta.17"
4
+ VERSION = "2.0.0.pre.beta.21"
5
5
  end
@@ -50,7 +50,7 @@ const TransformComponent = (path, component) => {
50
50
  // Recursive function for processing the [props] section of a bookshop component spec,
51
51
  // and populating sub-structures, comments, select data, et cetera.
52
52
  const TransformComponentProps = (props, structure, value_context) => {
53
- ["_select_data","_array_structures","_comments","value"].forEach(k => {
53
+ ["_select_data","_array_structures","_comments","_instance_values","value"].forEach(k => {
54
54
  structure[k] = structure[k] || {};
55
55
  });
56
56
 
@@ -93,6 +93,12 @@ const TransformObject = (key, obj, structure, value_context) => {
93
93
  structure["_comments"][key] = comment;
94
94
  }
95
95
 
96
+ if (Object.hasOwnProperty.call(obj, "instance")) {
97
+ value_context[key] = null;
98
+ structure["_instance_values"][key] = obj["instance"]
99
+ return
100
+ }
101
+
96
102
  if (Object.hasOwnProperty.call(obj, "select")) {
97
103
  value_context[key] = obj["default"] ?? null;
98
104
  structure["_select_data"][pluralize(key)] = obj["select"]
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bookshop/cloudcannon-structures",
3
- "version": "2.0.0-beta.17",
3
+ "version": "2.0.0-beta.21",
4
4
  "description": "Convert a Bookshop object into a CloudCannon structure",
5
5
  "main": "main.js",
6
6
  "scripts": {
@@ -16,7 +16,7 @@
16
16
  "access": "public"
17
17
  },
18
18
  "devDependencies": {
19
- "@bookshop/toml-narrator": "2.0.0-beta.17",
19
+ "@bookshop/toml-narrator": "2.0.0-beta.21",
20
20
  "@ltd/j-toml": "^1.12.2",
21
21
  "ava": "^3.15.0",
22
22
  "nyc": "^15.1.0",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bookshop/toml-narrator",
3
- "version": "2.0.0-beta.17",
3
+ "version": "2.0.0-beta.21",
4
4
  "description": "Rewrite Bookshop TOML files to preserve comments",
5
5
  "main": "main.js",
6
6
  "scripts": {
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cloudcannon-jekyll-bookshop
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0.pre.beta.17
4
+ version: 2.0.0.pre.beta.21
5
5
  platform: ruby
6
6
  authors:
7
7
  - Liam Bigelow
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-08-10 00:00:00.000000000 Z
11
+ date: 2021-08-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll