@plone/aurora 1.0.0-alpha.27 → 1.0.0-alpha.28
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/catalog.json +73 -0
- package/dist/preset.d.ts +25 -0
- package/dist/preset.js +14 -0
- package/dist/registry-publicui.config.d.ts +8 -0
- package/dist/registry-publicui.config.js +14 -0
- package/dist/registry.config.d.ts +16 -0
- package/dist/registry.config.js +17 -0
- package/dist/routes.d.ts +25 -0
- package/dist/routes.js +23 -0
- package/dist/vite.d.ts +24 -0
- package/dist/vite.js +135 -0
- package/package.json +93 -47
- package/pnpmfile.cjs +20 -0
- package/server.js +2 -1
- package/{app → src/app}/config/index.ts +1 -2
- package/{app → src/app}/config/server.server.ts +2 -4
- package/{app → src/app}/entry.client.tsx +1 -0
- package/{app → src/app}/entry.server.tsx +2 -1
- package/{app → src/app}/i18next.server.test.ts +48 -1
- package/{app → src/app}/i18next.server.ts +22 -14
- package/{app → src/app}/middleware.server.test.ts +0 -68
- package/{app → src/app}/middleware.server.ts +32 -40
- package/src/app/root.server.ts +124 -0
- package/{app → src/app}/root.test.tsx +36 -7
- package/src/app/root.tsx +101 -0
- package/.release-it.json +0 -32
- package/.stylelintrc +0 -8
- package/CHANGELOG.md +0 -456
- package/Makefile +0 -82
- package/acceptance/tests/anonymous-401-redirect.test.ts +0 -75
- package/acceptance/tests/basic.test.ts +0 -14
- package/acceptance/tests/hydration.test.ts +0 -106
- package/acceptance/tests/multilingual-root-redirect.test.ts +0 -45
- package/app/root.tsx +0 -191
- package/app/routes.ts +0 -20
- package/news/.gitkeep +0 -0
- package/public/favicon.ico +0 -0
- package/public/icon.svg +0 -13
- package/react-router.config.ts +0 -11
- package/registry-publicui.config.ts +0 -11
- package/registry.config.ts +0 -16
- package/tests/setup.ts +0 -6
- package/tests/testHelpers.tsx +0 -29
- package/towncrier.toml +0 -33
- package/tsconfig.json +0 -35
- package/vite.config.ts +0 -120
- package/vitest.config.ts +0 -32
- /package/{app → src/app}/config/index.test.ts +0 -0
- /package/{app → src/app}/config/server/content-migrations.server.test.ts +0 -0
- /package/{app → src/app}/config/server/content-migrations.server.ts +0 -0
- /package/{app → src/app}/config/server/migrations.server.ts +0 -0
- /package/{app → src/app}/config/server.server.test.ts +0 -0
- /package/{app → src/app}/config/types.ts +0 -0
- /package/{app → src/app}/i18n.ts +0 -0
- /package/{app → src/app}/okroute.test.tsx +0 -0
- /package/{app → src/app}/okroute.tsx +0 -0
- /package/{app → src/app}/reset-fetcher.test.tsx +0 -0
- /package/{app → src/app}/reset-fetcher.tsx +0 -0
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
{
|
|
2
|
+
"@axe-core/playwright": "^4.12.1",
|
|
3
|
+
"@internationalized/date": "^3.12.4",
|
|
4
|
+
"@platejs/playwright": "53.0.0",
|
|
5
|
+
"@playwright/test": "^1.60.0",
|
|
6
|
+
"@plone/agave": "1.0.0-alpha.11",
|
|
7
|
+
"@plone/aurora": "1.0.0-alpha.28",
|
|
8
|
+
"@plone/blocks": "1.0.0-alpha.21",
|
|
9
|
+
"@plone/client": "2.0.0-alpha.12",
|
|
10
|
+
"@plone/cmsui": "1.0.0-alpha.20",
|
|
11
|
+
"@plone/components": "5.0.0-alpha.8",
|
|
12
|
+
"@plone/contents": "1.0.0-alpha.7",
|
|
13
|
+
"@plone/controlpanels": "1.0.0-alpha.4",
|
|
14
|
+
"@plone/devtools": "1.0.0-alpha.1",
|
|
15
|
+
"@plone/helpers": "2.0.0-alpha.12",
|
|
16
|
+
"@plone/icons": "1.0.0-alpha.4",
|
|
17
|
+
"@plone/layout": "1.0.0-alpha.20",
|
|
18
|
+
"@plone/plate": "1.0.0-alpha.30",
|
|
19
|
+
"@plone/publicui": "1.0.0-alpha.13",
|
|
20
|
+
"@plone/quanta": "1.0.0-alpha.7",
|
|
21
|
+
"@plone/react-router": "2.0.0-alpha.10",
|
|
22
|
+
"@plone/registry": "4.0.0-alpha.10",
|
|
23
|
+
"@plone/scripts": "4.0.0-alpha.0",
|
|
24
|
+
"@plone/theming": "1.0.0-alpha.11",
|
|
25
|
+
"@plone/types": "3.0.0-alpha.12",
|
|
26
|
+
"@react-aria/utils": "^3.34.1",
|
|
27
|
+
"@react-router/dev": "8.5.0",
|
|
28
|
+
"@react-router/express": "8.5.0",
|
|
29
|
+
"@react-router/node": "8.5.0",
|
|
30
|
+
"@react-router/serve": "8.5.0",
|
|
31
|
+
"@react-spectrum/utils": "^3.13.1",
|
|
32
|
+
"@react-types/shared": "^3.37.0",
|
|
33
|
+
"@tailwindcss/postcss": "4.2.2",
|
|
34
|
+
"@tailwindcss/vite": "^4.2.2",
|
|
35
|
+
"@tanstack/react-query": "^5.59.0",
|
|
36
|
+
"@testing-library/jest-dom": "^6.9.1",
|
|
37
|
+
"@testing-library/react": "^16.3.0",
|
|
38
|
+
"@types/node": "^26",
|
|
39
|
+
"@types/react": "^19.2.0",
|
|
40
|
+
"@types/react-dom": "^19.2.0",
|
|
41
|
+
"@vitejs/plugin-react": "^6.0.1",
|
|
42
|
+
"@vitest/coverage-v8": "^4.1.4",
|
|
43
|
+
"axe-core": "^4.11.0",
|
|
44
|
+
"eslint": "^9.20.1",
|
|
45
|
+
"eslint-config-prettier": "^10.0.1",
|
|
46
|
+
"eslint-plugin-jsx-a11y": "^6.10.2",
|
|
47
|
+
"eslint-plugin-react": "^7.37.4",
|
|
48
|
+
"eslint-plugin-react-hooks": "^5.0.1",
|
|
49
|
+
"globals": "^16.0.0",
|
|
50
|
+
"i18next": "^26.3.6",
|
|
51
|
+
"playwright": "^1.60.0",
|
|
52
|
+
"prettier": "^3.9.6",
|
|
53
|
+
"react": "^19.2.7",
|
|
54
|
+
"react-aria": "^3.53.1",
|
|
55
|
+
"react-aria-components": "^1.22.1",
|
|
56
|
+
"react-dom": "^19.2.7",
|
|
57
|
+
"react-i18next": "^15.4.1",
|
|
58
|
+
"react-router": "8.5.0",
|
|
59
|
+
"react-stately": "^3.51.0",
|
|
60
|
+
"release-it": "^19.0.5",
|
|
61
|
+
"stylelint": "^16.14.1",
|
|
62
|
+
"stylelint-config-idiomatic-order": "10.0.0",
|
|
63
|
+
"stylelint-prettier": "5.0.3",
|
|
64
|
+
"tailwind-merge": "^3.5.0",
|
|
65
|
+
"tailwind-variants": "^3.2.2",
|
|
66
|
+
"tailwindcss": "^4.2.2",
|
|
67
|
+
"tailwindcss-react-aria-components": "^2.2.0",
|
|
68
|
+
"tsup": "^8.5.0",
|
|
69
|
+
"typescript": "^5.9.2",
|
|
70
|
+
"typescript-eslint": "^8.41.0",
|
|
71
|
+
"vite": "^8.0.8",
|
|
72
|
+
"vitest": "^4.1.0"
|
|
73
|
+
}
|
package/dist/preset.d.ts
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { Preset } from '@react-router/dev/config';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* The React Router preset of a Plone Aurora app. Add it to the app's
|
|
5
|
+
* `react-router.config.ts`:
|
|
6
|
+
*
|
|
7
|
+
* ```ts
|
|
8
|
+
* import type { Config } from '@react-router/dev/config';
|
|
9
|
+
* import { ploneAurora } from '@plone/aurora/preset';
|
|
10
|
+
*
|
|
11
|
+
* export default {
|
|
12
|
+
* ssr: true,
|
|
13
|
+
* presets: [ploneAurora()],
|
|
14
|
+
* } satisfies Config;
|
|
15
|
+
* ```
|
|
16
|
+
*
|
|
17
|
+
* Before React Router evaluates the app's `routes.ts`, it generates the files
|
|
18
|
+
* of the Plone registry in the app's `.plone` folder, including the routes
|
|
19
|
+
* that the add-ons register. So `react-router dev`, `react-router build` and
|
|
20
|
+
* `react-router typegen` work on their own, without running `init-loaders`
|
|
21
|
+
* first.
|
|
22
|
+
*/
|
|
23
|
+
declare function ploneAurora(): Preset;
|
|
24
|
+
|
|
25
|
+
export { ploneAurora };
|
package/dist/preset.js
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
// src/preset.ts
|
|
2
|
+
import { initPloneRegistryLoaders } from "@plone/registry/init-loaders";
|
|
3
|
+
function ploneAurora() {
|
|
4
|
+
return {
|
|
5
|
+
name: "@plone/aurora",
|
|
6
|
+
async reactRouterConfig() {
|
|
7
|
+
await initPloneRegistryLoaders();
|
|
8
|
+
return {};
|
|
9
|
+
}
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
export {
|
|
13
|
+
ploneAurora
|
|
14
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The add-ons of a Plone Aurora app, with the public UI and the CMS UI. An app
|
|
3
|
+
* or an add-on repository extends this list in its `registry.config.ts`:
|
|
4
|
+
*
|
|
5
|
+
* ```ts
|
|
6
|
+
* import { addons } from '@plone/aurora/registry.config';
|
|
7
|
+
*
|
|
8
|
+
* addons.push('my-add-on');
|
|
9
|
+
*
|
|
10
|
+
* export { addons };
|
|
11
|
+
* ```
|
|
12
|
+
*/
|
|
13
|
+
declare const addons: string[];
|
|
14
|
+
declare const theme = "";
|
|
15
|
+
|
|
16
|
+
export { addons, theme };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
// src/registry.config.ts
|
|
2
|
+
var addons = [
|
|
3
|
+
"@plone/theming",
|
|
4
|
+
"@plone/plate",
|
|
5
|
+
"@plone/blocks",
|
|
6
|
+
"@plone/layout",
|
|
7
|
+
"@plone/cmsui",
|
|
8
|
+
"@plone/publicui",
|
|
9
|
+
"@plone/contents",
|
|
10
|
+
"@plone/controlpanels",
|
|
11
|
+
"@plone/agave"
|
|
12
|
+
];
|
|
13
|
+
var theme = "";
|
|
14
|
+
export {
|
|
15
|
+
addons,
|
|
16
|
+
theme
|
|
17
|
+
};
|
package/dist/routes.d.ts
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { RouteConfigEntry } from '@react-router/dev/routes';
|
|
2
|
+
export { getAddonRoutesConfig } from '@plone/react-router/routes';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* The routes of Plone Aurora itself, for the app's `routes.ts`:
|
|
6
|
+
*
|
|
7
|
+
* ```ts
|
|
8
|
+
* import type { RouteConfig } from '@react-router/dev/routes';
|
|
9
|
+
* import { auroraRoutes, getAddonRoutesConfig } from '@plone/aurora/routes';
|
|
10
|
+
*
|
|
11
|
+
* export default [
|
|
12
|
+
* ...auroraRoutes(),
|
|
13
|
+
* ...getAddonRoutesConfig(),
|
|
14
|
+
* ] satisfies RouteConfig;
|
|
15
|
+
* ```
|
|
16
|
+
*
|
|
17
|
+
* - `ok`: a health check, which answers without the backend.
|
|
18
|
+
* - `@reset-fetcher`: the route that resets a fetcher's data.
|
|
19
|
+
*
|
|
20
|
+
* `getAddonRoutesConfig()` is re-exported from `@plone/react-router/routes`,
|
|
21
|
+
* so that the app's `routes.ts` only imports `@plone/aurora`.
|
|
22
|
+
*/
|
|
23
|
+
declare function auroraRoutes(): RouteConfigEntry[];
|
|
24
|
+
|
|
25
|
+
export { auroraRoutes };
|
package/dist/routes.js
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
// src/routes.ts
|
|
2
|
+
import path from "path";
|
|
3
|
+
import { fileURLToPath } from "url";
|
|
4
|
+
import { route } from "@react-router/dev/routes";
|
|
5
|
+
import { getAddonRoutesConfig } from "@plone/react-router/routes";
|
|
6
|
+
var appDir = path.resolve(
|
|
7
|
+
path.dirname(fileURLToPath(import.meta.url)),
|
|
8
|
+
"..",
|
|
9
|
+
"src",
|
|
10
|
+
"app"
|
|
11
|
+
);
|
|
12
|
+
function auroraRoutes() {
|
|
13
|
+
return [
|
|
14
|
+
route("ok", path.join(appDir, "okroute.tsx"), { id: "ok" }),
|
|
15
|
+
route("@reset-fetcher", path.join(appDir, "reset-fetcher.tsx"), {
|
|
16
|
+
id: "reset-fetcher"
|
|
17
|
+
})
|
|
18
|
+
];
|
|
19
|
+
}
|
|
20
|
+
export {
|
|
21
|
+
auroraRoutes,
|
|
22
|
+
getAddonRoutesConfig
|
|
23
|
+
};
|
package/dist/vite.d.ts
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { PluginOption } from 'vite';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* The Vite plugins and configuration of a Plone Aurora app. Add it to the
|
|
5
|
+
* app's `vite.config.ts`, before React Router's plugin:
|
|
6
|
+
*
|
|
7
|
+
* ```ts
|
|
8
|
+
* import { reactRouter } from '@react-router/dev/vite';
|
|
9
|
+
* import { PloneAuroraVitePlugin } from '@plone/aurora/vite';
|
|
10
|
+
* import { defineConfig } from 'vite';
|
|
11
|
+
*
|
|
12
|
+
* export default defineConfig({
|
|
13
|
+
* plugins: [PloneAuroraVitePlugin(), reactRouter()],
|
|
14
|
+
* });
|
|
15
|
+
* ```
|
|
16
|
+
*
|
|
17
|
+
* It includes the Plone registry plugin, which loads the app's add-ons and
|
|
18
|
+
* applies their `vite.extend` files, Tailwind, the React Compiler, SVG
|
|
19
|
+
* imports as components, and the Plone devtools in development (set
|
|
20
|
+
* `PLONE_DEVTOOLS=false` to turn them off).
|
|
21
|
+
*/
|
|
22
|
+
declare function PloneAuroraVitePlugin(): PluginOption[];
|
|
23
|
+
|
|
24
|
+
export { PloneAuroraVitePlugin };
|
package/dist/vite.js
ADDED
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
// src/vite.ts
|
|
2
|
+
import fs from "fs";
|
|
3
|
+
import { createRequire } from "module";
|
|
4
|
+
import path from "path";
|
|
5
|
+
import { fileURLToPath } from "url";
|
|
6
|
+
import tailwindcss from "@tailwindcss/vite";
|
|
7
|
+
import babel from "vite-plugin-babel";
|
|
8
|
+
import devtoolsJson from "vite-plugin-devtools-json";
|
|
9
|
+
import { PloneDevtoolsVitePlugin } from "@plone/devtools/vite";
|
|
10
|
+
import { PloneSVGRVitePlugin } from "@plone/icons/vite-plugin-svgr";
|
|
11
|
+
import { PloneRegistryVitePlugin } from "@plone/registry/vite-plugin";
|
|
12
|
+
var require2 = createRequire(import.meta.url);
|
|
13
|
+
var packageDir = fs.realpathSync(
|
|
14
|
+
path.resolve(path.dirname(fileURLToPath(import.meta.url)), "..")
|
|
15
|
+
);
|
|
16
|
+
function ploneAuroraConfig() {
|
|
17
|
+
return {
|
|
18
|
+
name: "plone-aurora:config",
|
|
19
|
+
config: () => ({
|
|
20
|
+
optimizeDeps: {
|
|
21
|
+
// Server-only deps that Vite would otherwise still pick up for the
|
|
22
|
+
// client bundle — keep in sync with ssr.optimizeDeps.include below
|
|
23
|
+
exclude: [
|
|
24
|
+
// Ships the source of the app's root, entries and middleware, like
|
|
25
|
+
// the add-ons: Vite compiles it with the app instead.
|
|
26
|
+
"@plone/aurora",
|
|
27
|
+
"i18next-fs-backend",
|
|
28
|
+
"i18next-fs-backend/cjs",
|
|
29
|
+
"remix-i18next"
|
|
30
|
+
],
|
|
31
|
+
include: [
|
|
32
|
+
// The i18n libraries of the app
|
|
33
|
+
"i18next",
|
|
34
|
+
"i18next-browser-languagedetector",
|
|
35
|
+
"i18next-http-backend",
|
|
36
|
+
"react-i18next",
|
|
37
|
+
// Injected by babel-plugin-react-compiler, not in any package.json
|
|
38
|
+
"react/compiler-runtime",
|
|
39
|
+
// @plone/components, @plone/icons, @plone/quanta and @plone/helpers are
|
|
40
|
+
// not registered add-ons, so their deps can't be declared in
|
|
41
|
+
// vite.extend.js — list them here
|
|
42
|
+
"@plone/components > clsx",
|
|
43
|
+
"@plone/components > react-aria",
|
|
44
|
+
"@plone/components > react-aria-components",
|
|
45
|
+
"@plone/icons > @react-aria/utils",
|
|
46
|
+
"@plone/icons > @react-spectrum/utils",
|
|
47
|
+
"@plone/icons > clsx",
|
|
48
|
+
"@plone/icons > tailwind-variants",
|
|
49
|
+
"@plone/quanta > @internationalized/date",
|
|
50
|
+
"@plone/quanta > clsx",
|
|
51
|
+
"@plone/quanta > react-aria-components",
|
|
52
|
+
"@plone/quanta > react-aria-components/DropZone",
|
|
53
|
+
"@plone/quanta > react-aria-components/Form",
|
|
54
|
+
"@plone/quanta > react-aria-components/Group",
|
|
55
|
+
"@plone/quanta > react-aria-components/Modal",
|
|
56
|
+
"@plone/quanta > react-aria-components/Table",
|
|
57
|
+
"@plone/quanta > react-aria-components/Tooltip",
|
|
58
|
+
"@plone/quanta > react-aria-components/composeRenderProps",
|
|
59
|
+
"@plone/quanta > tailwind-merge",
|
|
60
|
+
"@plone/quanta > tailwind-variants",
|
|
61
|
+
"@plone/quanta > usehooks-ts",
|
|
62
|
+
"@plone/helpers > jotai",
|
|
63
|
+
"@plone/helpers > jotai/utils",
|
|
64
|
+
"@plone/helpers > jotai/vanilla",
|
|
65
|
+
"@plone/helpers > jotai-optics"
|
|
66
|
+
]
|
|
67
|
+
},
|
|
68
|
+
ssr: {
|
|
69
|
+
// Bundle every Plone package into the server build, as Vite does in
|
|
70
|
+
// the monorepo, where they're linked. Otherwise Vite leaves out the
|
|
71
|
+
// ones it can resolve from the app, and Node.js loads them with their
|
|
72
|
+
// own copy of `@plone/registry`, which has no configuration.
|
|
73
|
+
noExternal: [/^@plone\//],
|
|
74
|
+
optimizeDeps: {
|
|
75
|
+
exclude: ["@plone/aurora"],
|
|
76
|
+
include: ["i18next-fs-backend/cjs", "isbot", "remix-i18next"]
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
})
|
|
80
|
+
};
|
|
81
|
+
}
|
|
82
|
+
function packageName(entry) {
|
|
83
|
+
const parts = entry.split(">")[0].trim().split("/");
|
|
84
|
+
return parts[0].startsWith("@") ? parts.slice(0, 2).join("/") : parts[0];
|
|
85
|
+
}
|
|
86
|
+
function canResolve(name, dir) {
|
|
87
|
+
for (let current = dir; ; current = path.dirname(current)) {
|
|
88
|
+
if (fs.existsSync(path.join(current, "node_modules", name))) return true;
|
|
89
|
+
if (path.dirname(current) === current) return false;
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
function ploneAuroraOptimizeDeps() {
|
|
93
|
+
return {
|
|
94
|
+
name: "plone-aurora:optimize-deps",
|
|
95
|
+
enforce: "post",
|
|
96
|
+
config(config) {
|
|
97
|
+
const root = path.resolve(config.root || process.cwd());
|
|
98
|
+
const prefix = (entries) => entries?.map((entry) => {
|
|
99
|
+
const name = packageName(entry);
|
|
100
|
+
return name !== "@plone/aurora" && !canResolve(name, root) && canResolve(name, packageDir) ? `@plone/aurora > ${entry}` : entry;
|
|
101
|
+
});
|
|
102
|
+
if (config.optimizeDeps?.include) {
|
|
103
|
+
config.optimizeDeps.include = prefix(config.optimizeDeps.include);
|
|
104
|
+
}
|
|
105
|
+
if (config.ssr?.optimizeDeps?.include) {
|
|
106
|
+
config.ssr.optimizeDeps.include = prefix(
|
|
107
|
+
config.ssr.optimizeDeps.include
|
|
108
|
+
);
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
};
|
|
112
|
+
}
|
|
113
|
+
function PloneAuroraVitePlugin() {
|
|
114
|
+
return [
|
|
115
|
+
// Development only. Set PLONE_DEVTOOLS=false to turn it off.
|
|
116
|
+
...PloneDevtoolsVitePlugin(),
|
|
117
|
+
PloneSVGRVitePlugin(),
|
|
118
|
+
PloneRegistryVitePlugin(),
|
|
119
|
+
tailwindcss(),
|
|
120
|
+
babel({
|
|
121
|
+
include: /\.tsx?$/,
|
|
122
|
+
exclude: /node_modules/,
|
|
123
|
+
babelConfig: {
|
|
124
|
+
presets: [require2.resolve("@babel/preset-typescript")],
|
|
125
|
+
plugins: [require2.resolve("babel-plugin-react-compiler")]
|
|
126
|
+
}
|
|
127
|
+
}),
|
|
128
|
+
devtoolsJson(),
|
|
129
|
+
ploneAuroraConfig(),
|
|
130
|
+
ploneAuroraOptimizeDeps()
|
|
131
|
+
];
|
|
132
|
+
}
|
|
133
|
+
export {
|
|
134
|
+
PloneAuroraVitePlugin
|
|
135
|
+
};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@plone/aurora",
|
|
3
|
-
"description": "Plone Aurora is the next-generation frontend for Plone CMS",
|
|
4
|
-
"version": "1.0.0-alpha.
|
|
3
|
+
"description": "Plone Aurora is the next-generation frontend for Plone CMS: the framework that Plone Aurora apps are built on",
|
|
4
|
+
"version": "1.0.0-alpha.28",
|
|
5
5
|
"maintainers": [
|
|
6
6
|
{
|
|
7
7
|
"name": "Plone Foundation",
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"repository": {
|
|
14
14
|
"type": "git",
|
|
15
15
|
"url": "https://github.com/plone/aurora.git",
|
|
16
|
-
"directory": "
|
|
16
|
+
"directory": "packages/aurora"
|
|
17
17
|
},
|
|
18
18
|
"bugs": {
|
|
19
19
|
"url": "https://github.com/plone/aurora/issues"
|
|
@@ -26,30 +26,87 @@
|
|
|
26
26
|
"frontend",
|
|
27
27
|
"framework"
|
|
28
28
|
],
|
|
29
|
-
"sideEffects": false,
|
|
30
29
|
"publishConfig": {
|
|
31
30
|
"access": "public"
|
|
32
31
|
},
|
|
33
32
|
"type": "module",
|
|
33
|
+
"sideEffects": [
|
|
34
|
+
"./src/app/entry.client.tsx",
|
|
35
|
+
"./server.js"
|
|
36
|
+
],
|
|
37
|
+
"files": [
|
|
38
|
+
"dist",
|
|
39
|
+
"src/app",
|
|
40
|
+
"server.js",
|
|
41
|
+
"pnpmfile.cjs",
|
|
42
|
+
"README.md"
|
|
43
|
+
],
|
|
44
|
+
"exports": {
|
|
45
|
+
"./package.json": "./package.json",
|
|
46
|
+
"./app/root": "./src/app/root.tsx",
|
|
47
|
+
"./app/root.server": "./src/app/root.server.ts",
|
|
48
|
+
"./app/entry.client": "./src/app/entry.client.tsx",
|
|
49
|
+
"./app/entry.server": "./src/app/entry.server.tsx",
|
|
50
|
+
"./app/middleware.server": "./src/app/middleware.server.ts",
|
|
51
|
+
"./app/i18next.server": "./src/app/i18next.server.ts",
|
|
52
|
+
"./preset": {
|
|
53
|
+
"types": "./dist/preset.d.ts",
|
|
54
|
+
"import": "./dist/preset.js"
|
|
55
|
+
},
|
|
56
|
+
"./registry.config": {
|
|
57
|
+
"types": "./dist/registry.config.d.ts",
|
|
58
|
+
"import": "./dist/registry.config.js",
|
|
59
|
+
"default": "./dist/registry.config.js"
|
|
60
|
+
},
|
|
61
|
+
"./registry-publicui.config": {
|
|
62
|
+
"types": "./dist/registry-publicui.config.d.ts",
|
|
63
|
+
"import": "./dist/registry-publicui.config.js",
|
|
64
|
+
"default": "./dist/registry-publicui.config.js"
|
|
65
|
+
},
|
|
66
|
+
"./vite": {
|
|
67
|
+
"types": "./dist/vite.d.ts",
|
|
68
|
+
"import": "./dist/vite.js"
|
|
69
|
+
},
|
|
70
|
+
"./routes": {
|
|
71
|
+
"types": "./dist/routes.d.ts",
|
|
72
|
+
"import": "./dist/routes.js"
|
|
73
|
+
},
|
|
74
|
+
"./server": "./server.js",
|
|
75
|
+
"./pnpmfile.cjs": "./pnpmfile.cjs",
|
|
76
|
+
"./catalog.json": "./dist/catalog.json"
|
|
77
|
+
},
|
|
78
|
+
"peerDependencies": {
|
|
79
|
+
"@react-router/dev": "^8.0.0",
|
|
80
|
+
"react": "^19.0.0",
|
|
81
|
+
"react-dom": "^19.0.0",
|
|
82
|
+
"react-router": "^8.0.0",
|
|
83
|
+
"vite": "^8.0.0"
|
|
84
|
+
},
|
|
34
85
|
"dependencies": {
|
|
35
|
-
"@
|
|
36
|
-
"@
|
|
86
|
+
"@babel/core": "^7.28.5",
|
|
87
|
+
"@babel/preset-typescript": "^7.27.1",
|
|
88
|
+
"@plone/agave": "1.0.0-alpha.11",
|
|
89
|
+
"@plone/blocks": "1.0.0-alpha.21",
|
|
37
90
|
"@plone/client": "2.0.0-alpha.12",
|
|
38
|
-
"@plone/cmsui": "1.0.0-alpha.
|
|
39
|
-
"@plone/components": "5.0.0-alpha.
|
|
40
|
-
"@plone/
|
|
41
|
-
"@plone/
|
|
42
|
-
"@plone/
|
|
91
|
+
"@plone/cmsui": "1.0.0-alpha.20",
|
|
92
|
+
"@plone/components": "5.0.0-alpha.8",
|
|
93
|
+
"@plone/contents": "1.0.0-alpha.7",
|
|
94
|
+
"@plone/controlpanels": "1.0.0-alpha.4",
|
|
95
|
+
"@plone/devtools": "1.0.0-alpha.1",
|
|
43
96
|
"@plone/helpers": "2.0.0-alpha.12",
|
|
44
|
-
"@plone/
|
|
45
|
-
"@plone/
|
|
46
|
-
"@plone/
|
|
47
|
-
"@plone/
|
|
48
|
-
"@plone/
|
|
49
|
-
"@plone/
|
|
50
|
-
"@plone/
|
|
51
|
-
"@
|
|
97
|
+
"@plone/icons": "1.0.0-alpha.4",
|
|
98
|
+
"@plone/layout": "1.0.0-alpha.20",
|
|
99
|
+
"@plone/plate": "1.0.0-alpha.30",
|
|
100
|
+
"@plone/publicui": "1.0.0-alpha.13",
|
|
101
|
+
"@plone/quanta": "1.0.0-alpha.7",
|
|
102
|
+
"@plone/react-router": "2.0.0-alpha.10",
|
|
103
|
+
"@plone/registry": "4.0.0-alpha.10",
|
|
104
|
+
"@plone/theming": "1.0.0-alpha.11",
|
|
105
|
+
"@plone/types": "3.0.0-alpha.12",
|
|
52
106
|
"@react-router/express": "8.5.0",
|
|
107
|
+
"@react-router/node": "8.5.0",
|
|
108
|
+
"@tailwindcss/vite": "^4.2.2",
|
|
109
|
+
"babel-plugin-react-compiler": "1.0.0",
|
|
53
110
|
"compression": "^1.8.1",
|
|
54
111
|
"express": "^5.2.1",
|
|
55
112
|
"i18next": "^26.3.6",
|
|
@@ -59,54 +116,43 @@
|
|
|
59
116
|
"isbot": "^5.1.27",
|
|
60
117
|
"jwt-decode": "^4.0.0",
|
|
61
118
|
"morgan": "^1.10.1",
|
|
62
|
-
"react": "^19.2.7",
|
|
63
|
-
"react-dom": "^19.2.7",
|
|
64
119
|
"react-i18next": "^15.4.1",
|
|
65
|
-
"
|
|
66
|
-
"
|
|
120
|
+
"remix-i18next": "^8.0.0",
|
|
121
|
+
"vite-plugin-babel": "1.7.3",
|
|
122
|
+
"vite-plugin-devtools-json": "^1.0.0"
|
|
67
123
|
},
|
|
68
124
|
"devDependencies": {
|
|
69
|
-
"@babel/core": "^7.28.5",
|
|
70
|
-
"@babel/preset-typescript": "^7.27.1",
|
|
71
|
-
"@plone/devtools": "1.0.0-alpha.0",
|
|
72
|
-
"@plone/test-addon": "1.0.0",
|
|
73
|
-
"@plone/types": "3.0.0-alpha.11",
|
|
74
125
|
"@react-router/dev": "8.5.0",
|
|
75
|
-
"@tailwindcss/vite": "^4.2.2",
|
|
76
126
|
"@testing-library/jest-dom": "^6.6.3",
|
|
77
127
|
"@testing-library/react": "^16.2.0",
|
|
78
128
|
"@types/node": "^26",
|
|
79
129
|
"@types/react": "^19.2.0",
|
|
80
130
|
"@types/react-dom": "^19.2.0",
|
|
81
131
|
"@vitest/coverage-v8": "^4.1.4",
|
|
82
|
-
"
|
|
132
|
+
"react": "^19.2.7",
|
|
133
|
+
"react-dom": "^19.2.7",
|
|
134
|
+
"react-router": "8.5.0",
|
|
83
135
|
"release-it": "^19.0.5",
|
|
84
|
-
"
|
|
136
|
+
"tsconfig": "0.0.0",
|
|
137
|
+
"tsup": "^8.5.0",
|
|
85
138
|
"typescript": "^5.9.2",
|
|
86
139
|
"vite": "^8.0.8",
|
|
87
|
-
"vite-plugin-babel": "1.7.3",
|
|
88
|
-
"vite-plugin-devtools-json": "^1.0.0",
|
|
89
140
|
"vitest": "^4.1.0"
|
|
90
141
|
},
|
|
91
142
|
"engines": {
|
|
92
143
|
"node": ">=22.22.0"
|
|
93
144
|
},
|
|
145
|
+
"bin": {
|
|
146
|
+
"plone-aurora-serve": "./server.js"
|
|
147
|
+
},
|
|
94
148
|
"scripts": {
|
|
95
|
-
"
|
|
96
|
-
"
|
|
97
|
-
"
|
|
98
|
-
"
|
|
99
|
-
"
|
|
100
|
-
"build:publicui": "REGISTRYCONFIG=registry-publicui.config.ts pnpm exec init-loaders && react-router build",
|
|
101
|
-
"start:prod": "node server.js ./build/server/index.js",
|
|
102
|
-
"check:ts": "react-router typegen && tsc",
|
|
103
|
-
"typecheck": "react-router typegen && tsc",
|
|
104
|
-
"typegen": "react-router typegen",
|
|
149
|
+
"build": "tsup && node build-catalog.mjs",
|
|
150
|
+
"build:force": "tsup && node build-catalog.mjs",
|
|
151
|
+
"dev": "tsup --watch",
|
|
152
|
+
"check:ts": "tsc --project tsconfig.json",
|
|
153
|
+
"test": "vitest",
|
|
105
154
|
"release": "GITHUB_TOKEN=${GITHUB_TOKEN:-$(gh auth token)} release-it",
|
|
106
155
|
"release-alpha": "GITHUB_TOKEN=${GITHUB_TOKEN:-$(gh auth token)} release-it --preRelease=alpha",
|
|
107
|
-
"
|
|
108
|
-
"lint:fix": "eslint --max-warnings=0 './**/*.{js,jsx,ts,tsx}' --fix --no-error-on-unmatched-pattern",
|
|
109
|
-
"stylelint:fix": "sh -c 'if [ -f .stylelintrc ] || [ -f .stylelintrc.json ] || [ -f .stylelintrc.js ] || [ -f .stylelintrc.cjs ] || [ -f stylelint.config.js ] || [ -f stylelint.config.cjs ] || [ -f stylelint.config.mjs ]; then stylelint '''./**/*.{css,scss,less}''' --fix --allow-empty-input; else echo \"No local stylelint config, skipping\"; fi'",
|
|
110
|
-
"format": "pnpm prettier:fix && pnpm lint:fix && pnpm stylelint:fix"
|
|
156
|
+
"dry-release": "GITHUB_TOKEN=${GITHUB_TOKEN:-$(gh auth token)} release-it --dry-run"
|
|
111
157
|
}
|
|
112
158
|
}
|
package/pnpmfile.cjs
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
// The pnpm catalog of Plone Aurora, for the projects that add `@plone/aurora`
|
|
2
|
+
// to the `configDependencies` of their `pnpm-workspace.yaml`. pnpm installs
|
|
3
|
+
// config dependencies before it loads the hooks, so a project's `.pnpmfile.cjs`
|
|
4
|
+
// can load this file:
|
|
5
|
+
//
|
|
6
|
+
// module.exports = require('./node_modules/.pnpm-config/@plone/aurora/pnpmfile.cjs');
|
|
7
|
+
//
|
|
8
|
+
// The project then uses `catalog:` for the packages that it shares with Plone
|
|
9
|
+
// Aurora. A version in the project's own `catalog` wins over this one.
|
|
10
|
+
const catalog = require('./dist/catalog.json');
|
|
11
|
+
|
|
12
|
+
module.exports = {
|
|
13
|
+
hooks: {
|
|
14
|
+
updateConfig(config) {
|
|
15
|
+
config.catalogs ??= {};
|
|
16
|
+
config.catalogs.default = { ...catalog, ...config.catalogs.default };
|
|
17
|
+
return config;
|
|
18
|
+
},
|
|
19
|
+
},
|
|
20
|
+
};
|
package/server.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
1
2
|
/* eslint-disable no-console */
|
|
2
3
|
// The production server. It does what `react-router-serve` does (compression,
|
|
3
4
|
// static assets, request logging and the React Router request handler), and
|
|
@@ -10,7 +11,7 @@
|
|
|
10
11
|
// Trusting the proxy makes the request URL match what the browser sees, for any
|
|
11
12
|
// host the site is served on, with nothing to configure per deployment.
|
|
12
13
|
//
|
|
13
|
-
// Usage:
|
|
14
|
+
// Usage: plone-aurora-serve <server-build-path>, or `node server.js` in the app.
|
|
14
15
|
//
|
|
15
16
|
// Environment:
|
|
16
17
|
// - `PORT` and `HOST`: where to listen (default `3000` on all interfaces).
|
|
@@ -2,8 +2,7 @@
|
|
|
2
2
|
* This is the client side config entry point
|
|
3
3
|
*/
|
|
4
4
|
import config from '@plone/registry';
|
|
5
|
-
|
|
6
|
-
import applyAddonConfiguration from '../../.plone/registry.loader';
|
|
5
|
+
import applyAddonConfiguration from '@plone/registry/addons-loader';
|
|
7
6
|
|
|
8
7
|
export default function install() {
|
|
9
8
|
config.settings.defaultLanguage = 'en';
|
|
@@ -3,10 +3,8 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import config from '@plone/registry';
|
|
5
5
|
import PloneClient from '@plone/client';
|
|
6
|
-
|
|
7
|
-
import
|
|
8
|
-
// eslint-disable-next-line import/no-unresolved
|
|
9
|
-
import applyServerAddonConfiguration from '../../.plone/registry.loader.server';
|
|
6
|
+
import applyAddonConfiguration from '@plone/registry/addons-loader';
|
|
7
|
+
import applyServerAddonConfiguration from '@plone/registry/addons-loader-server';
|
|
10
8
|
|
|
11
9
|
import type { ContentExpander, ListingBlockFormData } from '@plone/types';
|
|
12
10
|
import type { LoaderUtilityArgs } from './types';
|
|
@@ -15,6 +15,7 @@ async function hydrate() {
|
|
|
15
15
|
// The Plone devtools, in development only (see `@plone/devtools/vite`).
|
|
16
16
|
let instrumentations: ClientInstrumentation[] | undefined;
|
|
17
17
|
if (import.meta.env.DEV && import.meta.env.PLONE_DEVTOOLS) {
|
|
18
|
+
// eslint-disable-next-line import/no-extraneous-dependencies -- development only, removed from production builds
|
|
18
19
|
const devtools = await import('@plone/devtools/client');
|
|
19
20
|
// Mounts outside the app's tree, once React has hydrated `<html>`.
|
|
20
21
|
devtools.mountPloneDevtools();
|