@webiny/project-server-template 6.6.0-alpha.0

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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) Webiny
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,11 @@
1
+ # @webiny/project-server-template
2
+
3
+ > [!NOTE]
4
+ > This package is part of the [Webiny](https://www.webiny.com) monorepo.
5
+ > It’s **included in every Webiny project by default** and is not meant to be used as a standalone package.
6
+
7
+ πŸ“˜ **Documentation:** [https://www.webiny.com/docs](https://www.webiny.com/docs)
8
+
9
+ ---
10
+
11
+ _This README file is automatically generated during the publish process._
package/package.json ADDED
@@ -0,0 +1,24 @@
1
+ {
2
+ "name": "@webiny/project-server-template",
3
+ "version": "6.6.0-alpha.0",
4
+ "type": "module",
5
+ "repository": {
6
+ "type": "git",
7
+ "url": "https://github.com/webiny/webiny-js.git"
8
+ },
9
+ "description": "A Webiny self-hosted (server) project template.",
10
+ "license": "MIT",
11
+ "dependencies": {
12
+ "@webiny/api-event-handler-server-sql": "6.6.0-alpha.0",
13
+ "@webiny/app": "6.6.0-alpha.0",
14
+ "@webiny/app-serverless-cms": "6.6.0-alpha.0",
15
+ "@webiny/build-tools": "6.6.0-alpha.0",
16
+ "@webiny/project": "6.6.0-alpha.0",
17
+ "@webiny/project-server": "6.6.0-alpha.0",
18
+ "@webiny/project-template-base": "6.6.0-alpha.0",
19
+ "react": "18.3.1"
20
+ },
21
+ "publishConfig": {
22
+ "access": "public"
23
+ }
24
+ }
@@ -0,0 +1,6 @@
1
+ // Import admin app styles (admin-ui theme + Tailwind design system + lexical).
2
+ @use "~@webiny/app-serverless-cms/styles.scss" as *;
3
+
4
+ body {
5
+ margin: 0;
6
+ }
@@ -0,0 +1,13 @@
1
+ import React from "react";
2
+ import { Admin } from "@webiny/app-serverless-cms";
3
+ import { Extensions } from "./Extensions";
4
+
5
+ import "./App.scss";
6
+
7
+ export const App = () => {
8
+ return (
9
+ <Admin>
10
+ <Extensions />
11
+ </Admin>
12
+ );
13
+ };
@@ -0,0 +1,7 @@
1
+ // This file is automatically updated by Webiny.
2
+ // Learn more about extensions: https://webiny.link/extensions
3
+ import React from "react";
4
+
5
+ export const Extensions = () => {
6
+ return <></>;
7
+ };
@@ -0,0 +1,8 @@
1
+ import React from "react";
2
+ {GLOBAL_CSS}
3
+
4
+ import { App } from "./App";
5
+
6
+ import { renderApp } from "@webiny/app";
7
+
8
+ renderApp(<App />);
@@ -0,0 +1,6 @@
1
+ {
2
+ "extends": "../../../../tsconfig.json",
3
+ "compilerOptions": {
4
+ "composite": false
5
+ }
6
+ }
@@ -0,0 +1,3 @@
1
+ import { createAdminAppConfig } from "@webiny/project-server/apps/index.js";
2
+
3
+ export default createAdminAppConfig();
@@ -0,0 +1,22 @@
1
+ {
2
+ "name": "api-graphql",
3
+ "version": "0.1.0",
4
+ "type": "module",
5
+ "scripts": {},
6
+ "dependencies": {
7
+ "@webiny/api-event-handler-server-sql": "latest",
8
+ "@webiny/api-aco": "latest",
9
+ "@webiny/api-core": "latest",
10
+ "@webiny/api-file-manager": "latest",
11
+ "@webiny/api-headless-cms": "latest",
12
+ "@webiny/api-headless-cms-aco": "latest",
13
+ "@webiny/api-mailer": "latest",
14
+ "@webiny/api-record-locking": "latest",
15
+ "@webiny/api-website-builder": "latest",
16
+ "@webiny/api-websockets": "latest",
17
+ "@webiny/api-workflows": "latest",
18
+ "@webiny/build-tools": "latest",
19
+ "better-sqlite3": "13.0.1",
20
+ "knex": "^3.3.0"
21
+ }
22
+ }
@@ -0,0 +1,7 @@
1
+ // This file is automatically updated by Webiny.
2
+ // Learn more about extensions: https://webiny.link/extensions
3
+
4
+ // oxlint-disable-next-line typescript/no-unused-vars
5
+ import { registerExtension } from "@webiny/project/utils/registerExtension.js";
6
+
7
+ export const extensions = () => [];
@@ -0,0 +1,21 @@
1
+ /**
2
+ * DI-native API GraphQL handler β€” self-hosted Node server hosting type (SQL storage).
3
+ *
4
+ * The composition root lives in @webiny/api-event-handler-server-sql (`createSqlApiHandler`) β€”
5
+ * the same shared, transport-agnostic request stack the AWS handler uses, over the Node HTTP server
6
+ * transport, with the self-hosted JWT identity provider. This file only supplies project-specific
7
+ * extensions + the SQL (Knex) connection.
8
+ *
9
+ * The connection factory below is generated at build time from the DB infra extension
10
+ * (`<Infra.Sqlite>` / `<Infra.Postgres>`) in webiny.config.tsx β€” see GenerateApiDbConnection, which
11
+ * decorates the workspace build. It replaces the `__WEBINY_DB_FACTORY__` import with the chosen
12
+ * factory, rewriting the specifier to that factory's own module path so only the selected driver is
13
+ * traced into the bundle (the other database driver and its native binary stay out of the deploy
14
+ * artifact). The placeholder imports the real package here so the template parses, lints, and passes
15
+ * dependency checks before substitution.
16
+ */
17
+ import { createSqlApiHandler } from "@webiny/api-event-handler-server-sql";
18
+ import { __WEBINY_DB_FACTORY__ } from "@webiny/api-event-handler-server-sql";
19
+ import { extensions } from "./extensions";
20
+
21
+ export const handler = createSqlApiHandler({ extensions, knex: __WEBINY_DB_FACTORY__() });
@@ -0,0 +1,6 @@
1
+ {
2
+ "extends": "../../../../../tsconfig.json",
3
+ "compilerOptions": {
4
+ "composite": false
5
+ }
6
+ }
@@ -0,0 +1,8 @@
1
+ import { createBuildFunction, createWatchFunction } from "@webiny/build-tools";
2
+
3
+ export default {
4
+ commands: {
5
+ build: createBuildFunction({ cwd: import.meta.dirname }),
6
+ watch: createWatchFunction({ cwd: import.meta.dirname })
7
+ }
8
+ };
@@ -0,0 +1,20 @@
1
+ import React from "react";
2
+ import { ProjectServer } from "@webiny/project-server/extensions/ProjectServer.js";
3
+ import { DefaultExtensions } from "@webiny/project-template-base";
4
+ import { Extensions as WebinyConfigTsx } from "../../webiny.config.js";
5
+
6
+ /**
7
+ * Server hosting-type project composition. Mirrors the AWS hosting type's base config, but renders the
8
+ * hosting-agnostic `<ProjectServer />` (build/watch hooks only) instead of `<ProjectAws />` β€” there
9
+ * is no Pulumi, no stack output, no `deploy`, and no deploy environments in the self-hosted hosting type.
10
+ * The self-hosted IdP and any other extensions come in via the user's `webiny.config.tsx`.
11
+ */
12
+ export const Extensions = () => {
13
+ return (
14
+ <>
15
+ <ProjectServer />
16
+ <DefaultExtensions />
17
+ <WebinyConfigTsx />
18
+ </>
19
+ );
20
+ };