cloudcannon-jekyll-bookshop 2.0.0.pre.beta.16 → 2.0.0.pre.beta.20

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: 853fba18d002eb7f6a266953b2a9841fa5885aaf01b1ddb6e88d59f633b7d169
4
- data.tar.gz: 2457f328ea1c698aa83769ad7444d24a5710812ca64dc4656fb60ae4991a5c4c
3
+ metadata.gz: d3113cf47c9b9605b070fbe07e623341d8aff43837c2d6b893e6fd6ad8d8b88d
4
+ data.tar.gz: 6e191c1260a6831f834876bc7e3a8b1103850550b9d0dcc931772780365b9738
5
5
  SHA512:
6
- metadata.gz: 493ced2e0c342ea4673a2ab11e32ba296edccd586fbfd87722ca94ba5169f6beb9401ab479f801ed063b063a127cf275465cfdf9bbd3d25d8686ffda614ca242
7
- data.tar.gz: be2c07ba7415ac274855a8afe3993277a64c7c7ecfd160a19a0615a3484e38c35a53ad1c66c8b6f4c3c9947b5423184e1a382f1ed6a9820c1e3433f5f1c5f56b
6
+ metadata.gz: 42df5ca07d2e7801f75ebe612efce11bd0ba35a2f83445801b2af517ba3b573db8c17e3343fca48d57e5368680487199052101b2084908f1c9a667d64612e681
7
+ data.tar.gz: 501cb06b2c3f3579a486bc56260e7373202bd06e91a3c2002952475cfb456cb3e69a11c9c1530ef6636ded1e0cf0cba2b9e3b891868df3d6d83ba27c5be7a792
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.16)
4
+ cloudcannon-jekyll-bookshop (2.0.0.pre.beta.20)
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.16"
4
+ VERSION = "2.0.0.pre.beta.20"
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.16",
3
+ "version": "2.0.0-beta.20",
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.16",
19
+ "@bookshop/toml-narrator": "2.0.0-beta.20",
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.16",
3
+ "version": "2.0.0-beta.20",
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.16
4
+ version: 2.0.0.pre.beta.20
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-05 00:00:00.000000000 Z
11
+ date: 2021-08-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll