@hintergrund/worker 0.1.0 → 0.1.1
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/index.js +2 -2
- package/dist/lib/config.js +3 -3
- package/dist/middleware/auth.js +2 -2
- package/package.json +31 -31
package/dist/index.js
CHANGED
|
@@ -3,7 +3,7 @@ import { cors } from 'hono/cors';
|
|
|
3
3
|
import cmsRoutes from './api/cms/routes';
|
|
4
4
|
import newsletterRoutes from './api/newsletter/routes';
|
|
5
5
|
import shopRoutes from './api/shop/routes';
|
|
6
|
-
import builderRoutes from './api/builder/routes';
|
|
6
|
+
// import builderRoutes from './api/builder/routes';
|
|
7
7
|
import { authMiddleware } from './middleware/auth';
|
|
8
8
|
import { getTemplate } from './lib/template';
|
|
9
9
|
export function createApp() {
|
|
@@ -19,7 +19,7 @@ export function createApp() {
|
|
|
19
19
|
// Mount shop routes under /api/shop
|
|
20
20
|
app.route('/api/shop', shopRoutes);
|
|
21
21
|
// Mount builder routes under /api/builder
|
|
22
|
-
app.route('/api/builder', builderRoutes);
|
|
22
|
+
// app.route('/api/builder', builderRoutes);
|
|
23
23
|
// Admin main page (protected)
|
|
24
24
|
app.get('/admin', async (c) => {
|
|
25
25
|
// Check authentication
|
package/dist/lib/config.js
CHANGED
|
@@ -103,7 +103,7 @@ function loadFromEnvVars(env) {
|
|
|
103
103
|
};
|
|
104
104
|
}
|
|
105
105
|
// Load Builder module config (auto-detect based on required vars)
|
|
106
|
-
const builderMissing = getMissingVars(env, BUILDER_REQUIRED_VARS);
|
|
106
|
+
/* const builderMissing = getMissingVars(env, BUILDER_REQUIRED_VARS);
|
|
107
107
|
if (builderMissing.length === 0) {
|
|
108
108
|
config.builder = {
|
|
109
109
|
enabled: true,
|
|
@@ -112,7 +112,7 @@ function loadFromEnvVars(env) {
|
|
|
112
112
|
templateRepo: env.HG_BUILDER_TEMPLATE_REPO || 'hintergrund-cloud/demo-shop',
|
|
113
113
|
gitBranch: env.HG_BUILDER_GIT_BRANCH || 'main',
|
|
114
114
|
};
|
|
115
|
-
}
|
|
115
|
+
} */
|
|
116
116
|
return config;
|
|
117
117
|
}
|
|
118
118
|
/**
|
|
@@ -123,7 +123,7 @@ export function getAdminConfig(appConfig) {
|
|
|
123
123
|
cms: appConfig.cms?.enabled ?? false,
|
|
124
124
|
newsletter: appConfig.newsletter?.enabled ?? false,
|
|
125
125
|
shop: appConfig.shop?.enabled ?? false,
|
|
126
|
-
builder: appConfig.builder?.enabled ?? false,
|
|
126
|
+
builder: false, // appConfig.builder?.enabled ?? false,
|
|
127
127
|
loginMethod: appConfig.global.auth?.loginMethod ?? 'password',
|
|
128
128
|
userGroups: appConfig.global.auth?.userGroups?.map(g => g.name),
|
|
129
129
|
};
|
package/dist/middleware/auth.js
CHANGED
|
@@ -14,9 +14,9 @@ function getModuleFromPath(pathname) {
|
|
|
14
14
|
if (pathname.includes('/api/admin/shop')) {
|
|
15
15
|
return 'shop';
|
|
16
16
|
}
|
|
17
|
-
if (pathname.includes('/api/admin/builder')) {
|
|
17
|
+
/* if (pathname.includes('/api/admin/builder')) {
|
|
18
18
|
return 'builder';
|
|
19
|
-
}
|
|
19
|
+
} */
|
|
20
20
|
return null;
|
|
21
21
|
}
|
|
22
22
|
/**
|
package/package.json
CHANGED
|
@@ -1,32 +1,32 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
}
|
|
2
|
+
"name": "@hintergrund/worker",
|
|
3
|
+
"version": "0.1.1",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"main": "./dist/index.js",
|
|
6
|
+
"types": "./dist/index.d.ts",
|
|
7
|
+
"exports": {
|
|
8
|
+
".": {
|
|
9
|
+
"types": "./dist/index.d.ts",
|
|
10
|
+
"import": "./dist/index.js"
|
|
11
|
+
}
|
|
12
|
+
},
|
|
13
|
+
"scripts": {
|
|
14
|
+
"build": "tsc",
|
|
15
|
+
"dev": "tsc --watch"
|
|
16
|
+
},
|
|
17
|
+
"files": [
|
|
18
|
+
"dist"
|
|
19
|
+
],
|
|
20
|
+
"devDependencies": {
|
|
21
|
+
"@cloudflare/workers-types": "^4.20250111.0",
|
|
22
|
+
"concurrently": "^9.2.1",
|
|
23
|
+
"typescript": "^5.5.2"
|
|
24
|
+
},
|
|
25
|
+
"dependencies": {
|
|
26
|
+
"@hintergrund/shared": "workspace:*",
|
|
27
|
+
"@octokit/rest": "^22.0.0",
|
|
28
|
+
"cookie": "^1.0.2",
|
|
29
|
+
"hono": "^4.10.2",
|
|
30
|
+
"stripe": "^17.5.0"
|
|
31
|
+
}
|
|
32
|
+
}
|