create-wirejs-app 2.0.172 → 2.0.173
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/package.json
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AuthenticationService, Endpoint } from 'wirejs-resources';
|
|
1
|
+
import { AuthenticationService, Endpoint, GoogleOIDCProvider } from 'wirejs-resources';
|
|
2
2
|
import { Chat } from './apps/chat.js';
|
|
3
3
|
import { Todos } from './apps/todos.js';
|
|
4
4
|
import { Wiki } from './apps/wiki.js';
|
|
@@ -11,7 +11,9 @@ export type * from './apps/todos.js';
|
|
|
11
11
|
export type * from './apps/store.js';
|
|
12
12
|
export type * from './apps/admin.js';
|
|
13
13
|
|
|
14
|
-
const authService = new AuthenticationService('app', 'core-users'
|
|
14
|
+
const authService = new AuthenticationService('app', 'core-users', {
|
|
15
|
+
oidcProviders: [ GoogleOIDCProvider ]
|
|
16
|
+
});
|
|
15
17
|
|
|
16
18
|
export const auth = authService.buildApi();
|
|
17
19
|
export const chat = Chat(auth);
|
|
@@ -11,15 +11,15 @@
|
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"dompurify": "^3.2.3",
|
|
13
13
|
"marked": "^15.0.6",
|
|
14
|
+
"wirejs-components": "^0.1.111",
|
|
14
15
|
"wirejs-dom": "^1.0.44",
|
|
15
|
-
"wirejs-
|
|
16
|
-
"wirejs-
|
|
17
|
-
"wirejs-
|
|
18
|
-
"wirejs-web-worker": "^1.0.64"
|
|
16
|
+
"wirejs-module-payments-stripe": "^0.1.62",
|
|
17
|
+
"wirejs-resources": "^0.1.168",
|
|
18
|
+
"wirejs-web-worker": "^1.0.65"
|
|
19
19
|
},
|
|
20
20
|
"devDependencies": {
|
|
21
|
-
"
|
|
22
|
-
"
|
|
21
|
+
"typescript": "^5.7.3",
|
|
22
|
+
"wirejs-scripts": "^3.0.166"
|
|
23
23
|
},
|
|
24
24
|
"scripts": {
|
|
25
25
|
"prebuild": "npm run prebuild --workspaces --if-present",
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { html, list, node, text, hydrate } from 'wirejs-dom/v2';
|
|
2
|
+
import { AuthenticatedContent } from 'wirejs-components';
|
|
2
3
|
import { Main } from '../layouts/main.js';
|
|
3
4
|
import { admin, Endpoint, Setting, SystemAttribute } from 'internal-api';
|
|
4
5
|
|
|
@@ -154,14 +155,15 @@ function Admin() {
|
|
|
154
155
|
|
|
155
156
|
async function App() {
|
|
156
157
|
const self = html`<div id='app'>
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
158
|
+
${await AuthenticatedContent({
|
|
159
|
+
authenticated: async () => {
|
|
160
|
+
return (await admin.isAdmin(null)) ?
|
|
161
|
+
html`<div><p>Your <b>are</b> an admin.</p>${Admin()}</div>`
|
|
162
|
+
: html`<p>You are <b>NOT</b> an admin.</p>`
|
|
163
|
+
},
|
|
164
|
+
unauthenticated: () => html`<p>You are not signed in.</p>`,
|
|
165
|
+
})}
|
|
166
|
+
</div>`;
|
|
165
167
|
return self;
|
|
166
168
|
}
|
|
167
169
|
|