cloudcannon-jekyll-bookshop 2.0.0.pre.beta.18 → 2.0.0.pre.beta.22

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: 8d8b097d456a707095c4dd45d7f2f98f18743a6746f732679a76e667a1bedd05
4
- data.tar.gz: a5990b96ae7356b5311ebe3fa5bac743b53585be475a1a953c6c1e6d28e53d96
3
+ metadata.gz: 55a666a51a16753d22bb4175afa04773d487e060fe5053f005e87341358bdb9b
4
+ data.tar.gz: 39a7df084498100518726eb3b7b3d72109b7544143d68c571fb8908db7c840a4
5
5
  SHA512:
6
- metadata.gz: 37fca6948cdfefa5f7d7dd6e9bcce3d4c43f00a5107c560b321ab63a13c7e83f8d86e2855bca383ce1a249c07c6b2df5962ca7711b6c3c0c034c0dc042a4aeb9
7
- data.tar.gz: 288f3218fa26de1d2aed96f8d297ceee831cdaa3d16e81fbe757d8bfdb99cade2b78ffcc1deaabc73f20f96e3f4af17a69a697e7f3229ab8dcfe62724b22357f
6
+ metadata.gz: 909a97edf0f97e948c9a1bc4466c0ed97aafec94fdbd17789c4fa897a2c315167875a6e87dce974dcea2058a2275205d0ea44e50a5a4580a3a5a6dae8507d910
7
+ data.tar.gz: 05df2f005ba1cfcf1f16cc746643ed6136554ec8ad0fae98afa89934aa190fe338a985af5be6a83ba7306ec7876227d4719b0f81abf8345b791b47d9d0d466f0
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.18)
4
+ cloudcannon-jekyll-bookshop (2.0.0.pre.beta.22)
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.18"
4
+ VERSION = "2.0.0.pre.beta.22"
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.18",
3
+ "version": "2.0.0-beta.22",
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.18",
19
+ "@bookshop/toml-narrator": "2.0.0-beta.22",
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.18",
3
+ "version": "2.0.0-beta.22",
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.18
4
+ version: 2.0.0.pre.beta.22
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