alinea 1.6.1 → 1.6.2

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.
@@ -1,5 +1,5 @@
1
1
  {
2
- "_id": "373yWLU9KFZpAOuYXOfaRVWYAMP",
2
+ "_id": "38IS1tizQCRGMEB4x75OGoOLPLx",
3
3
  "_type": "Page",
4
4
  "_index": "a0",
5
5
  "_seeded": "welcome.json",
package/dist/LICENSES.md CHANGED
@@ -2,11 +2,11 @@ This file contains the licenses of the bundled modules in this distribution.
2
2
 
3
3
  ===
4
4
 
5
- # rado@1.0.15 (MIT)
5
+ # react-query@3.39.3 (MIT)
6
6
 
7
7
  MIT License
8
8
 
9
- Copyright (c) 2024 Ben Merckx
9
+ Copyright (c) 2019 Tanner Linsley
10
10
 
11
11
  Permission is hereby granted, free of charge, to any person obtaining a copy
12
12
  of this software and associated documentation files (the "Software"), to deal
@@ -26,13 +26,14 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
26
26
  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
27
27
  SOFTWARE.
28
28
 
29
+
29
30
  ===
30
31
 
31
- # react-query@3.39.3 (MIT)
32
+ # rado@1.0.15 (MIT)
32
33
 
33
34
  MIT License
34
35
 
35
- Copyright (c) 2019 Tanner Linsley
36
+ Copyright (c) 2024 Ben Merckx
36
37
 
37
38
  Permission is hereby granted, free of charge, to any person obtaining a copy
38
39
  of this software and associated documentation files (the "Software"), to deal
@@ -52,7 +53,6 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
52
53
  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
53
54
  SOFTWARE.
54
55
 
55
-
56
56
  ===
57
57
 
58
58
  # @headlessui/react@2.2.0 (MIT)
@@ -146,6 +146,23 @@ THIS IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRE
146
146
  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
147
147
 
148
148
 
149
+ ===
150
+
151
+ # domhandler@5.0.3 (BSD-2-Clause)
152
+
153
+ Copyright (c) Felix Böhm
154
+ All rights reserved.
155
+
156
+ Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
157
+
158
+ Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
159
+
160
+ Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
161
+
162
+ THIS IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS,
163
+ EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
164
+
165
+
149
166
  ===
150
167
 
151
168
  # @popperjs/core@2.11.8 (MIT)
@@ -172,23 +189,6 @@ IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
172
189
  CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
173
190
 
174
191
 
175
- ===
176
-
177
- # domhandler@5.0.3 (BSD-2-Clause)
178
-
179
- Copyright (c) Felix Böhm
180
- All rights reserved.
181
-
182
- Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
183
-
184
- Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
185
-
186
- Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
187
-
188
- THIS IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS,
189
- EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
190
-
191
-
192
192
  ===
193
193
 
194
194
  # entities@4.5.0 (BSD-2-Clause)
@@ -208,11 +208,11 @@ EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
208
208
 
209
209
  ===
210
210
 
211
- # @badgateway/oauth2-client@3.2.0 (MIT)
211
+ # prop-types@15.8.1 (MIT)
212
212
 
213
213
  MIT License
214
214
 
215
- Copyright (c) 2019-2023 Evert Pot
215
+ Copyright (c) 2013-present, Facebook, Inc.
216
216
 
217
217
  Permission is hereby granted, free of charge, to any person obtaining a copy
218
218
  of this software and associated documentation files (the "Software"), to deal
@@ -442,11 +442,11 @@ SOFTWARE.
442
442
 
443
443
  ===
444
444
 
445
- # prop-types@15.8.1 (MIT)
445
+ # @badgateway/oauth2-client@3.2.0 (MIT)
446
446
 
447
447
  MIT License
448
448
 
449
- Copyright (c) 2013-present, Facebook, Inc.
449
+ Copyright (c) 2019-2023 Evert Pot
450
450
 
451
451
  Permission is hereby granted, free of charge, to any person obtaining a copy
452
452
  of this software and associated documentation files (the "Software"), to deal
@@ -467,23 +467,6 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
467
467
  SOFTWARE.
468
468
 
469
469
 
470
- ===
471
-
472
- # dom-serializer@2.0.0 (MIT)
473
-
474
- License
475
-
476
- (The MIT License)
477
-
478
- Copyright (c) 2014 The cheeriojs contributors
479
-
480
- Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
481
-
482
- The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
483
-
484
- THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
485
-
486
-
487
470
  ===
488
471
 
489
472
  # react-is@16.13.1 (MIT)
@@ -511,6 +494,23 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
511
494
  SOFTWARE.
512
495
 
513
496
 
497
+ ===
498
+
499
+ # dom-serializer@2.0.0 (MIT)
500
+
501
+ License
502
+
503
+ (The MIT License)
504
+
505
+ Copyright (c) 2014 The cheeriojs contributors
506
+
507
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
508
+
509
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
510
+
511
+ THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
512
+
513
+
514
514
  ===
515
515
 
516
516
  # @headless-tree/core@0.0.15 (MIT)
@@ -1612,33 +1612,6 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1612
1612
  See the License for the specific language governing permissions and
1613
1613
  limitations under the License.
1614
1614
 
1615
- ===
1616
-
1617
- # @tanstack/virtual-core@3.10.6 (MIT)
1618
-
1619
- MIT License
1620
-
1621
- Copyright (c) 2021-present Tanner Linsley
1622
-
1623
- Permission is hereby granted, free of charge, to any person obtaining a copy
1624
- of this software and associated documentation files (the "Software"), to deal
1625
- in the Software without restriction, including without limitation the rights
1626
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
1627
- copies of the Software, and to permit persons to whom the Software is
1628
- furnished to do so, subject to the following conditions:
1629
-
1630
- The above copyright notice and this permission notice shall be included in all
1631
- copies or substantial portions of the Software.
1632
-
1633
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
1634
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
1635
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
1636
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
1637
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
1638
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
1639
- SOFTWARE.
1640
-
1641
-
1642
1615
  ===
1643
1616
 
1644
1617
  # @react-stately/utils@3.10.5 (Apache-2.0)
@@ -1844,3 +1817,30 @@ SOFTWARE.
1844
1817
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1845
1818
  See the License for the specific language governing permissions and
1846
1819
  limitations under the License.
1820
+
1821
+
1822
+ ===
1823
+
1824
+ # @tanstack/virtual-core@3.10.6 (MIT)
1825
+
1826
+ MIT License
1827
+
1828
+ Copyright (c) 2021-present Tanner Linsley
1829
+
1830
+ Permission is hereby granted, free of charge, to any person obtaining a copy
1831
+ of this software and associated documentation files (the "Software"), to deal
1832
+ in the Software without restriction, including without limitation the rights
1833
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
1834
+ copies of the Software, and to permit persons to whom the Software is
1835
+ furnished to do so, subject to the following conditions:
1836
+
1837
+ The above copyright notice and this permission notice shall be included in all
1838
+ copies or substantial portions of the Software.
1839
+
1840
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
1841
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
1842
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
1843
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
1844
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
1845
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
1846
+ SOFTWARE.
@@ -2,7 +2,7 @@
2
2
  var package_default = {
3
3
  bin: "./dist/cli.js",
4
4
  name: "alinea",
5
- version: "1.6.1",
5
+ version: "1.6.2",
6
6
  description: "Headless git-based CMS",
7
7
  repository: {
8
8
  type: "git",
package/dist/cli/Serve.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  package_default
3
- } from "../chunks/chunk-FYKOIMF4.js";
3
+ } from "../chunks/chunk-HELH3PKC.js";
4
4
  import "../chunks/chunk-NZLE2WMY.js";
5
5
 
6
6
  // src/cli/Serve.ts
package/dist/cli/bin.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  package_default
3
- } from "../chunks/chunk-FYKOIMF4.js";
3
+ } from "../chunks/chunk-HELH3PKC.js";
4
4
  import "../chunks/chunk-NZLE2WMY.js";
5
5
 
6
6
  // node_modules/mri/lib/index.mjs
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  package_default
3
- } from "../chunks/chunk-FYKOIMF4.js";
3
+ } from "../chunks/chunk-HELH3PKC.js";
4
4
  import "../chunks/chunk-NZLE2WMY.js";
5
5
 
6
6
  // src/cloud/CloudRemote.ts
@@ -2096,12 +2096,14 @@ var EntryGraph = class _EntryGraph {
2096
2096
  for (const entry of found) {
2097
2097
  if (!this.#search.has(entry.filePath)) this.#updateSearch(entry);
2098
2098
  }
2099
- return this.#search.search(search, {
2099
+ const results = this.#search.search(search, {
2100
2100
  prefix: true,
2101
2101
  fuzzy: 0.1,
2102
2102
  boost: { title: 2 },
2103
2103
  filter: (result) => found.has(result.entry)
2104
2104
  }).map((result) => result.entry);
2105
+ yield* results;
2106
+ return;
2105
2107
  }
2106
2108
  for (const node of filter.nodes ?? this.nodes) {
2107
2109
  if (filter.node && !filter.node(node)) continue;
@@ -214,7 +214,18 @@ var EntryTransaction = class {
214
214
  },
215
215
  status
216
216
  );
217
- const path = slugify(data.path ?? entry.data.path ?? entry.path);
217
+ const desiredPath = slugify(
218
+ data.path ?? entry.data.path ?? entry.path
219
+ );
220
+ const lockPath = entry.status !== "published" && !entry.main;
221
+ const path = lockPath ? entry.path : this.#getAvailablePath({
222
+ id,
223
+ path: desiredPath,
224
+ parentId: entry.parentId,
225
+ root: entry.root,
226
+ workspace: entry.workspace,
227
+ locale
228
+ });
218
229
  this.#checks.push([entry.filePath, entry.fileHash]);
219
230
  const childrenDir = paths.join(entry.parentDir, path);
220
231
  const filePath = `${childrenDir}${entry.status === "published" ? "" : `.${entry.status}`}.json`;
@@ -31,13 +31,12 @@ var visibleTypesAtom = atom((get) => {
31
31
  const { schema } = get(configAtom);
32
32
  return entries(schema).filter(([_, type]) => !Type.isHidden(type)).map(([name]) => name);
33
33
  });
34
- async function getHasChildren(graph, locale, workspace, root, parentId, visibleTypes) {
34
+ async function getHasChildren(graph, workspace, root, parentId, visibleTypes) {
35
35
  return Boolean(
36
36
  await graph.first({
37
37
  workspace,
38
38
  root,
39
39
  parentId,
40
- locale,
41
40
  filter: {
42
41
  _type: { in: visibleTypes }
43
42
  },
@@ -153,7 +152,6 @@ var loaderAtom = atom((get) => {
153
152
  );
154
153
  const hasChildren = typeConfig.contains ? await getHasChildren(
155
154
  graph,
156
- locale,
157
155
  row.data.workspace,
158
156
  row.data.root,
159
157
  row.id,
@@ -29,7 +29,9 @@ var Page = Config.document("Type", {
29
29
  Field.tab("Tab 2", {
30
30
  fields: {
31
31
  name: Field.text("Name"),
32
- name2: Field.text("Name")
32
+ name2: Field.text("Name", {
33
+ searchable: true
34
+ })
33
35
  }
34
36
  })
35
37
  )
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "bin": "./dist/cli.js",
3
3
  "name": "alinea",
4
- "version": "1.6.1",
4
+ "version": "1.6.2",
5
5
  "description": "Headless git-based CMS",
6
6
  "repository": {
7
7
  "type": "git",