@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 +21 -0
- package/README.md +11 -0
- package/package.json +24 -0
- package/template/appTemplates/admin/src/App.scss +6 -0
- package/template/appTemplates/admin/src/App.tsx +13 -0
- package/template/appTemplates/admin/src/Extensions.tsx +7 -0
- package/template/appTemplates/admin/src/index.tsx +8 -0
- package/template/appTemplates/admin/tsconfig.json +6 -0
- package/template/appTemplates/admin/webiny.config.ts +3 -0
- package/template/appTemplates/api/graphql/package.json +22 -0
- package/template/appTemplates/api/graphql/src/extensions.ts +7 -0
- package/template/appTemplates/api/graphql/src/index.ts +21 -0
- package/template/appTemplates/api/graphql/tsconfig.json +6 -0
- package/template/appTemplates/api/graphql/webiny.config.ts +8 -0
- package/template/webiny.config.base.tsx +20 -0
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,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,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
|
+
};
|