alinea 1.7.0-preview.2 → 1.7.0-preview.4
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.
- package/dist/.init/content/pages/welcome.json +1 -1
- package/dist/LICENSES.md +68 -68
- package/dist/adapter/next/with-alinea.js +2 -2
- package/dist/backend/resolver/ParsePreview.d.ts +1 -1
- package/dist/backend/resolver/ParsePreview.js +10 -2
- package/dist/bundled.d.ts +8 -3
- package/dist/chunks/{chunk-PGFXEUMB.js → chunk-KOHVBHWW.js} +1 -1
- package/dist/cli/Serve.js +1 -1
- package/dist/cli/bin.js +1 -1
- package/dist/cloud/CloudRemote.js +1 -1
- package/dist/core/util/EntryFilenames.d.ts +1 -2
- package/dist/core/util/EntryFilenames.js +11 -6
- package/dist/core/util/EntryFilenames.test.d.ts +1 -0
- package/dist/next.cjs +2 -2
- package/package.json +1 -1
package/dist/LICENSES.md
CHANGED
|
@@ -28,11 +28,11 @@ SOFTWARE.
|
|
|
28
28
|
|
|
29
29
|
===
|
|
30
30
|
|
|
31
|
-
#
|
|
31
|
+
# @headlessui/react@2.2.0 (MIT)
|
|
32
32
|
|
|
33
|
-
|
|
33
|
+
MIT License
|
|
34
34
|
|
|
35
|
-
Copyright (c)
|
|
35
|
+
Copyright (c) 2020 Tailwind Labs
|
|
36
36
|
|
|
37
37
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
38
38
|
of this software and associated documentation files (the "Software"), to deal
|
|
@@ -52,37 +52,13 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
|
52
52
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
53
53
|
SOFTWARE.
|
|
54
54
|
|
|
55
|
-
|
|
56
|
-
===
|
|
57
|
-
|
|
58
|
-
# htmlparser2@9.1.0 (MIT)
|
|
59
|
-
|
|
60
|
-
Copyright 2010, 2011, Chris Winberry <chris@winberry.net>. All rights reserved.
|
|
61
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
62
|
-
of this software and associated documentation files (the "Software"), to
|
|
63
|
-
deal in the Software without restriction, including without limitation the
|
|
64
|
-
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
|
65
|
-
sell copies of the Software, and to permit persons to whom the Software is
|
|
66
|
-
furnished to do so, subject to the following conditions:
|
|
67
|
-
|
|
68
|
-
The above copyright notice and this permission notice shall be included in
|
|
69
|
-
all copies or substantial portions of the Software.
|
|
70
|
-
|
|
71
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
72
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
73
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
74
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
75
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
76
|
-
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
|
77
|
-
IN THE SOFTWARE.
|
|
78
|
-
|
|
79
55
|
===
|
|
80
56
|
|
|
81
|
-
#
|
|
57
|
+
# react-query@3.39.3 (MIT)
|
|
82
58
|
|
|
83
59
|
MIT License
|
|
84
60
|
|
|
85
|
-
Copyright (c)
|
|
61
|
+
Copyright (c) 2019 Tanner Linsley
|
|
86
62
|
|
|
87
63
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
88
64
|
of this software and associated documentation files (the "Software"), to deal
|
|
@@ -102,13 +78,14 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
|
102
78
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
103
79
|
SOFTWARE.
|
|
104
80
|
|
|
81
|
+
|
|
105
82
|
===
|
|
106
83
|
|
|
107
|
-
#
|
|
84
|
+
# lib0@0.2.88 (MIT)
|
|
108
85
|
|
|
109
|
-
MIT License
|
|
86
|
+
The MIT License (MIT)
|
|
110
87
|
|
|
111
|
-
Copyright (c) 2019
|
|
88
|
+
Copyright (c) 2019 Kevin Jahns <kevin.jahns@protonmail.com>.
|
|
112
89
|
|
|
113
90
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
114
91
|
of this software and associated documentation files (the "Software"), to deal
|
|
@@ -129,6 +106,29 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
|
129
106
|
SOFTWARE.
|
|
130
107
|
|
|
131
108
|
|
|
109
|
+
===
|
|
110
|
+
|
|
111
|
+
# htmlparser2@9.1.0 (MIT)
|
|
112
|
+
|
|
113
|
+
Copyright 2010, 2011, Chris Winberry <chris@winberry.net>. All rights reserved.
|
|
114
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
115
|
+
of this software and associated documentation files (the "Software"), to
|
|
116
|
+
deal in the Software without restriction, including without limitation the
|
|
117
|
+
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
|
118
|
+
sell copies of the Software, and to permit persons to whom the Software is
|
|
119
|
+
furnished to do so, subject to the following conditions:
|
|
120
|
+
|
|
121
|
+
The above copyright notice and this permission notice shall be included in
|
|
122
|
+
all copies or substantial portions of the Software.
|
|
123
|
+
|
|
124
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
125
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
126
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
127
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
128
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
129
|
+
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
|
130
|
+
IN THE SOFTWARE.
|
|
131
|
+
|
|
132
132
|
===
|
|
133
133
|
|
|
134
134
|
# domhandler@5.0.3 (BSD-2-Clause)
|
|
@@ -148,7 +148,7 @@ EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
|
148
148
|
|
|
149
149
|
===
|
|
150
150
|
|
|
151
|
-
#
|
|
151
|
+
# domutils@3.1.0 (BSD-2-Clause)
|
|
152
152
|
|
|
153
153
|
Copyright (c) Felix Böhm
|
|
154
154
|
All rights reserved.
|
|
@@ -165,7 +165,7 @@ EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
|
165
165
|
|
|
166
166
|
===
|
|
167
167
|
|
|
168
|
-
#
|
|
168
|
+
# entities@4.5.0 (BSD-2-Clause)
|
|
169
169
|
|
|
170
170
|
Copyright (c) Felix Böhm
|
|
171
171
|
All rights reserved.
|
|
@@ -233,33 +233,6 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
|
233
233
|
SOFTWARE.
|
|
234
234
|
|
|
235
235
|
|
|
236
|
-
===
|
|
237
|
-
|
|
238
|
-
# prop-types@15.8.1 (MIT)
|
|
239
|
-
|
|
240
|
-
MIT License
|
|
241
|
-
|
|
242
|
-
Copyright (c) 2013-present, Facebook, Inc.
|
|
243
|
-
|
|
244
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
245
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
246
|
-
in the Software without restriction, including without limitation the rights
|
|
247
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
248
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
249
|
-
furnished to do so, subject to the following conditions:
|
|
250
|
-
|
|
251
|
-
The above copyright notice and this permission notice shall be included in all
|
|
252
|
-
copies or substantial portions of the Software.
|
|
253
|
-
|
|
254
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
255
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
256
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
257
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
258
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
259
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
260
|
-
SOFTWARE.
|
|
261
|
-
|
|
262
|
-
|
|
263
236
|
===
|
|
264
237
|
|
|
265
238
|
# @juggle/resize-observer@3.4.0 (Apache-2.0)
|
|
@@ -469,11 +442,11 @@ SOFTWARE.
|
|
|
469
442
|
|
|
470
443
|
===
|
|
471
444
|
|
|
472
|
-
#
|
|
445
|
+
# prop-types@15.8.1 (MIT)
|
|
473
446
|
|
|
474
447
|
MIT License
|
|
475
448
|
|
|
476
|
-
Copyright (c) Facebook, Inc.
|
|
449
|
+
Copyright (c) 2013-present, Facebook, Inc.
|
|
477
450
|
|
|
478
451
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
479
452
|
of this software and associated documentation files (the "Software"), to deal
|
|
@@ -513,15 +486,30 @@ THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
|
|
|
513
486
|
|
|
514
487
|
===
|
|
515
488
|
|
|
516
|
-
#
|
|
489
|
+
# react-is@16.13.1 (MIT)
|
|
517
490
|
|
|
518
|
-
MIT
|
|
491
|
+
MIT License
|
|
519
492
|
|
|
520
|
-
|
|
493
|
+
Copyright (c) Facebook, Inc. and its affiliates.
|
|
521
494
|
|
|
522
|
-
|
|
495
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
496
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
497
|
+
in the Software without restriction, including without limitation the rights
|
|
498
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
499
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
500
|
+
furnished to do so, subject to the following conditions:
|
|
501
|
+
|
|
502
|
+
The above copyright notice and this permission notice shall be included in all
|
|
503
|
+
copies or substantial portions of the Software.
|
|
504
|
+
|
|
505
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
506
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
507
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
508
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
509
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
510
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
511
|
+
SOFTWARE.
|
|
523
512
|
|
|
524
|
-
MIT
|
|
525
513
|
|
|
526
514
|
===
|
|
527
515
|
|
|
@@ -550,6 +538,18 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
|
550
538
|
SOFTWARE.
|
|
551
539
|
|
|
552
540
|
|
|
541
|
+
===
|
|
542
|
+
|
|
543
|
+
# @headless-tree/core@0.0.15 (MIT)
|
|
544
|
+
|
|
545
|
+
MIT
|
|
546
|
+
|
|
547
|
+
===
|
|
548
|
+
|
|
549
|
+
# @headless-tree/react@0.0.15 (MIT)
|
|
550
|
+
|
|
551
|
+
MIT
|
|
552
|
+
|
|
553
553
|
===
|
|
554
554
|
|
|
555
555
|
# @babel/runtime@7.25.4 (MIT)
|
|
@@ -95,8 +95,8 @@ function createRewrites(config, adminPath) {
|
|
|
95
95
|
const nextHost = process.env.__NEXT_PRIVATE_HOST;
|
|
96
96
|
const origin = nextOrigin ?? (nextHost ? `http://${nextHost}` : null);
|
|
97
97
|
const location = origin ? new URL(adminPath, origin).href : adminPath;
|
|
98
|
-
if (isDev && !process.env.
|
|
99
|
-
process.env.
|
|
98
|
+
if (isDev && !process.env.__NEXT_PRIVATE_ALINEA_REPORTED) {
|
|
99
|
+
process.env.__NEXT_PRIVATE_ALINEA_REPORTED = "true";
|
|
100
100
|
console.log(`
|
|
101
101
|
${cyan(bold("\u0251 Alinea CMS"))}: ${location}
|
|
102
102
|
`);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { PreviewRequest } from 'alinea/core/Preview';
|
|
2
1
|
import type { LocalDB } from 'alinea/core/db/LocalDB';
|
|
2
|
+
import type { PreviewRequest } from 'alinea/core/Preview';
|
|
3
3
|
export declare function createPreviewParser(local: LocalDB): {
|
|
4
4
|
parse(preview: PreviewRequest, sync: () => Promise<unknown>): Promise<PreviewRequest | undefined>;
|
|
5
5
|
};
|
|
@@ -25,9 +25,17 @@ function createPreviewParser(local) {
|
|
|
25
25
|
});
|
|
26
26
|
if (!entry) return;
|
|
27
27
|
const baseText = decoder.decode(
|
|
28
|
-
JsonLoader.format(
|
|
28
|
+
JsonLoader.format(
|
|
29
|
+
local.config.schema,
|
|
30
|
+
createRecord(entry, entry.status)
|
|
31
|
+
)
|
|
29
32
|
);
|
|
30
|
-
|
|
33
|
+
let updatedText;
|
|
34
|
+
try {
|
|
35
|
+
updatedText = await applyFilePatch(baseText, payload.patch);
|
|
36
|
+
} catch {
|
|
37
|
+
return;
|
|
38
|
+
}
|
|
31
39
|
const { data } = parseRecord(JSON.parse(updatedText));
|
|
32
40
|
const { rowHash: _rowHash, fileHash: _fileHash, ...withoutHashes } = entry;
|
|
33
41
|
const patched = await createEntryRow(
|
package/dist/bundled.d.ts
CHANGED
|
@@ -377,8 +377,8 @@ declare module 'alinea/backend/Previews' {
|
|
|
377
377
|
|
|
378
378
|
declare module 'alinea/backend/resolver/ParsePreview' {
|
|
379
379
|
|
|
380
|
-
import type { PreviewRequest } from 'alinea/core/Preview';
|
|
381
380
|
import type { LocalDB } from 'alinea/core/db/LocalDB';
|
|
381
|
+
import type { PreviewRequest } from 'alinea/core/Preview';
|
|
382
382
|
export function createPreviewParser(local: LocalDB): {
|
|
383
383
|
parse(preview: PreviewRequest, sync: () => Promise<unknown>): Promise<PreviewRequest | undefined>;
|
|
384
384
|
};
|
|
@@ -4442,8 +4442,7 @@ declare module 'alinea/core/util/Encoding' {
|
|
|
4442
4442
|
declare module 'alinea/core/util/EntryFilenames' {
|
|
4443
4443
|
|
|
4444
4444
|
import type { Config } from 'alinea/core/Config';
|
|
4445
|
-
import { type EntryStatus } from 'alinea/core/Entry';
|
|
4446
|
-
import { type Entry } from 'alinea/core/Entry';
|
|
4445
|
+
import { type Entry, type EntryStatus } from 'alinea/core/Entry';
|
|
4447
4446
|
import type { EntryUrlMeta, Type } from 'alinea/core/Type';
|
|
4448
4447
|
export function workspaceMediaDir(config: Config, workspace: string): string;
|
|
4449
4448
|
export function entryInfo(fileName: string): [name: string, status: EntryStatus];
|
|
@@ -4476,6 +4475,12 @@ declare module 'alinea/core/util/EntryFilenames' {
|
|
|
4476
4475
|
|
|
4477
4476
|
}
|
|
4478
4477
|
|
|
4478
|
+
declare module 'alinea/core/util/EntryFilenames.test' {
|
|
4479
|
+
|
|
4480
|
+
export {};
|
|
4481
|
+
|
|
4482
|
+
}
|
|
4483
|
+
|
|
4479
4484
|
declare module 'alinea/core/util/EntryRows' {
|
|
4480
4485
|
|
|
4481
4486
|
import type { Config } from 'alinea/core/Config';
|
package/dist/cli/Serve.js
CHANGED
package/dist/cli/bin.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import type { Config } from '../Config.js';
|
|
2
|
-
import { type EntryStatus } from '../Entry.js';
|
|
3
|
-
import { type Entry } from '../Entry.js';
|
|
2
|
+
import { type Entry, type EntryStatus } from '../Entry.js';
|
|
4
3
|
import type { EntryUrlMeta, Type } from '../Type.js';
|
|
5
4
|
export declare function workspaceMediaDir(config: Config, workspace: string): string;
|
|
6
5
|
export declare function entryInfo(fileName: string): [name: string, status: EntryStatus];
|
|
@@ -2,8 +2,10 @@ import "../../chunks/chunk-NZLE2WMY.js";
|
|
|
2
2
|
|
|
3
3
|
// src/core/util/EntryFilenames.ts
|
|
4
4
|
import * as paths from "alinea/core/util/Paths";
|
|
5
|
-
import {
|
|
6
|
-
|
|
5
|
+
import {
|
|
6
|
+
ALT_STATUS,
|
|
7
|
+
entryStatuses
|
|
8
|
+
} from "../Entry.js";
|
|
7
9
|
import { getRoot, getType } from "../Internal.js";
|
|
8
10
|
import { Workspace } from "../Workspace.js";
|
|
9
11
|
import { join } from "./Paths.js";
|
|
@@ -36,16 +38,19 @@ function entryFilepath(config, entry, parentPaths) {
|
|
|
36
38
|
throw new Error(`Entry has unknown phase: ${status}`);
|
|
37
39
|
const statusSegment = status === "published" ? "" : `.${status}`;
|
|
38
40
|
const location = `${entryChildrenDir(config, entry, parentPaths) + statusSegment}.json`.toLowerCase();
|
|
39
|
-
|
|
41
|
+
const workspace = config.workspaces[entry.workspace];
|
|
42
|
+
if (!workspace)
|
|
43
|
+
throw new Error(`Workspace "${entry.workspace}" does not exist`);
|
|
44
|
+
const root = Workspace.roots(workspace)[entry.root];
|
|
45
|
+
if (!root) throw new Error(`Root "${entry.root}" does not exist`);
|
|
46
|
+
return join(entry.root, location);
|
|
40
47
|
}
|
|
41
48
|
function entryFileName(config, entry, parentPaths) {
|
|
42
49
|
const workspace = config.workspaces[entry.workspace];
|
|
43
50
|
if (!workspace)
|
|
44
51
|
throw new Error(`Workspace "${entry.workspace}" does not exist`);
|
|
45
52
|
const { source: contentDir } = Workspace.data(workspace);
|
|
46
|
-
|
|
47
|
-
if (!root) throw new Error(`Root "${entry.root}" does not exist`);
|
|
48
|
-
return join(contentDir, entry.root, entryFilepath(config, entry, parentPaths));
|
|
53
|
+
return join(contentDir, entryFilepath(config, entry, parentPaths));
|
|
49
54
|
}
|
|
50
55
|
function entryFile(config, entry) {
|
|
51
56
|
const workspace = config.workspaces[entry.workspace];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/next.cjs
CHANGED
|
@@ -118,8 +118,8 @@ function createRewrites(config, adminPath) {
|
|
|
118
118
|
const nextHost = process.env.__NEXT_PRIVATE_HOST;
|
|
119
119
|
const origin = nextOrigin ?? (nextHost ? `http://${nextHost}` : null);
|
|
120
120
|
const location = origin ? new URL(adminPath, origin).href : adminPath;
|
|
121
|
-
if (isDev && !process.env.
|
|
122
|
-
process.env.
|
|
121
|
+
if (isDev && !process.env.__NEXT_PRIVATE_ALINEA_REPORTED) {
|
|
122
|
+
process.env.__NEXT_PRIVATE_ALINEA_REPORTED = "true";
|
|
123
123
|
console.log(`
|
|
124
124
|
${(0, import_Report.cyan)((0, import_Report.bold)("\u0251 Alinea CMS"))}: ${location}
|
|
125
125
|
`);
|