@brightsideoy/kama 0.1.0-alpha.110 → 0.1.0-alpha.112
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/README.md +36 -15
- package/bin/cli.js +126 -75
- package/dist/assets/{index-42YPjwst.js → index-sepj3KuT.js} +1 -1
- package/dist/index.html +1 -1
- package/kama-worker/bundled-definitions.js +2394 -0
- package/kama-worker/bundled-definitions.ts +2395 -0
- package/package.json +1 -1
- package/scripts/bundle-definitions.js +10 -2
package/package.json
CHANGED
|
@@ -161,8 +161,16 @@ const outputContent = `// Auto-generated pre-bundled definitions for Kama Core E
|
|
|
161
161
|
export const BUNDLED_DEFINITIONS = ${JSON.stringify(bundled, null, 2)};
|
|
162
162
|
`;
|
|
163
163
|
|
|
164
|
-
// 🎯
|
|
164
|
+
// 🎯 Always ensure target worker directory exists before writing
|
|
165
|
+
const activeWorkerDir = path.resolve(process.cwd(), 'kama-worker');
|
|
166
|
+
if (!fs.existsSync(activeWorkerDir)) {
|
|
167
|
+
fs.mkdirSync(activeWorkerDir, { recursive: true });
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
// 🎯 Write to Kama worker directory as well as package locations
|
|
165
171
|
const targetDirs = [
|
|
172
|
+
activeWorkerDir,
|
|
173
|
+
path.resolve(process.cwd(), 'cms-worker'), // legacy fallback
|
|
166
174
|
path.resolve(packageRootDir, 'server/db'),
|
|
167
175
|
path.resolve(process.cwd(), 'node_modules/@brightsideoy/kama/server/db'),
|
|
168
176
|
path.resolve(process.cwd(), 'node_modules/@brightsideoy/kama/dist'),
|
|
@@ -173,7 +181,7 @@ for (const dir of targetDirs) {
|
|
|
173
181
|
if (fs.existsSync(dir)) {
|
|
174
182
|
const outputPath = path.resolve(dir, 'bundled-definitions.ts');
|
|
175
183
|
fs.writeFileSync(outputPath, outputContent, 'utf-8');
|
|
176
|
-
// Also write .js version for built packages
|
|
184
|
+
// Also write .js version for built packages / worker runtime imports
|
|
177
185
|
const jsOutputPath = path.resolve(dir, 'bundled-definitions.js');
|
|
178
186
|
fs.writeFileSync(jsOutputPath, `export const BUNDLED_DEFINITIONS = ${JSON.stringify(bundled, null, 2)};\n`, 'utf-8');
|
|
179
187
|
}
|