baraqex 1.0.21 → 1.0.22

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/bin/baraqex.js CHANGED
@@ -325,98 +325,9 @@ async function chooseTemplate() {
325
325
 
326
326
  // Create default templates if they don't exist
327
327
  async function createDefaultTemplates(templatesPath) {
328
- const templates = {
329
- 'basic-app': {
330
- 'package.json': {
331
- name: 'baraqex-basic-app',
332
- version: '1.0.0',
333
- scripts: {
334
- dev: 'baraqex dev',
335
- build: 'baraqex build',
336
- start: 'baraqex start'
337
- },
338
- dependencies: {
339
- baraqex: '^1.0.0'
340
- }
341
- },
342
- 'src/App.jsx': `import { jsx, useState } from 'baraqex';
343
-
344
- export default function App() {
345
- const [count, setCount] = useState(0);
346
-
347
- return (
348
- <div>
349
- <h1>Welcome to Baraqex!</h1>
350
- <p>Count: {count}</p>
351
- <button onClick={() => setCount(count + 1)}>
352
- Increment
353
- </button>
354
- </div>
355
- );
356
- }`,
357
- 'public/index.html': `<!DOCTYPE html>
358
- <html lang="en">
359
- <head>
360
- <meta charset="UTF-8">
361
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
362
- <title>Baraqex App</title>
363
- </head>
364
- <body>
365
- <div id="root"></div>
366
- <script src="/src/App.jsx" type="module"></script>
367
- </body>
368
- </html>`
369
- },
370
- 'fullstack-app': {
371
- 'package.json': {
372
- name: 'baraqex-fullstack-app',
373
- version: '1.0.0',
374
- scripts: {
375
- dev: 'baraqex dev',
376
- build: 'baraqex build',
377
- start: 'baraqex start',
378
- test: 'baraqex test'
379
- },
380
- dependencies: {
381
- baraqex: '^1.0.0'
382
- }
383
- },
384
- 'src/pages/index.jsx': `import { jsx } from 'baraqex';
385
-
386
- export default function HomePage(props) {
387
- return (
388
- <html>
389
- <head>
390
- <title>Baraqex Fullstack App</title>
391
- </head>
392
- <body>
393
- <h1>Welcome to Baraqex!</h1>
394
- <p>Server time: {props.api.serverTime}</p>
395
- </body>
396
- </html>
397
- );
398
- }`,
399
- 'src/api/hello.js': `export async function get(req, res) {
400
- res.json({ message: 'Hello from Baraqex API!' });
401
- }`
402
- }
403
- };
404
-
405
- for (const [templateName, files] of Object.entries(templates)) {
406
- const templatePath = path.join(templatesPath, templateName);
407
- await fs.ensureDir(templatePath);
408
-
409
- for (const [filePath, content] of Object.entries(files)) {
410
- const fullPath = path.join(templatePath, filePath);
411
- await fs.ensureDir(path.dirname(fullPath));
412
-
413
- if (typeof content === 'object') {
414
- await fs.writeJson(fullPath, content, { spaces: 2 });
415
- } else {
416
- await fs.writeFile(fullPath, content);
417
- }
418
- }
419
- }
328
+ // Templates are now created as actual directories and files
329
+ // This function can be simplified since templates exist
330
+ console.log('Templates already exist in the templates directory');
420
331
  }
421
332
 
422
333
  // Create a new project with enhanced visuals and status updates
package/dist/index.d.ts CHANGED
@@ -6,4 +6,5 @@ export { renderToString as baraqexRenderToString, hydrate as baraqexHydrate } fr
6
6
  export { requestLogger, errorHandler, notFoundHandler, rateLimit } from './server/middleware.js';
7
7
  export { loadGoWasm, callWasmFunction, isWasmReady, getWasmFunctions, useGoWasm } from './wasm.js';
8
8
  export type { GoWasmOptions, GoWasmInstance } from './wasm.js';
9
+ export { Server as BaraqexServer } from './server/index.js';
9
10
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,cAAc,kBAAkB,CAAC;AAKjC,OAAO,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AACjG,OAAO,EACL,aAAa,EACb,aAAa,EACb,UAAU,EACV,aAAa,EACb,WAAW,EACX,SAAS,EACT,cAAc,EACd,kBAAkB,EAClB,kBAAkB,EAClB,gBAAgB,EAChB,eAAe,EACf,aAAa,EACb,YAAY,EACb,MAAM,mBAAmB,CAAC;AAG3B,YAAY,EAAE,YAAY,EAAE,IAAI,EAAE,QAAQ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AmB,CAAA"}
package/dist/index.js CHANGED
@@ -10,5 +10,6 @@ export { renderToString as baraqexRenderToString, hydrate as baraqexHydrate } fr
10
10
  export { requestLogger, errorHandler, notFoundHandler, rateLimit } from './server/middleware.js';
11
11
  // Export WASM functionality (browser-only functions)
12
12
  export { loadGoWasm, callWasmFunction, isWasmReady, getWasmFunctions, useGoWasm } from './wasm.js';
13
+ export { Server as BaraqexServer } from './server/index.js';
13
14
  console.log('Baraqex - powered by Frontend Hamroun Framework with additional utilities');
14
15
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,6CAA6C;AAC7C,cAAc,kBAAkB,CAAC;AAEjC,2CAA2C;AAE3C,gEAAgE;AAChE,OAAO,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AACjG,OAAO,EACL,aAAa,EACb,aAAa,EACb,UAAU,EACV,aAAa,EACb,WAAW,EACX,SAAS,EACT,cAAc,EACd,kBAAkB,EAClB,kBAAkB,EAClB,gBAAgB,EAChB,eAAe,EACf,aAAa,EACb,YAAY,EACb,MAAM,mBAAmB,CAAC;AAK3B,mCAAmC;AACnC,OAAO,EAAE,cAAc,IAAI,qBAAqB,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAE1G,8BAA8B;AAC9B,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,eAAe,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAEjG,qDAAqD;AACrD,OAAO,EAAE,UAAU,EAAE,gBAAgB,EAAE,WAAW,EAAE,gBAAgB,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAGnG,OAAO,CAAC,GAAG,CAAC,2EAA2E,CAAC,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,6CAA6C;AAC7C,cAAc,kBAAkB,CAAC;AAEjC,2CAA2C;AAE3C,gEAAgE;AAChE,OAAO,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AACjG,OAAO,EACL,aAAa,EACb,aAAa,EACb,UAAU,EACV,aAAa,EACb,WAAW,EACX,SAAS,EACT,cAAc,EACd,kBAAkB,EAClB,kBAAkB,EAClB,gBAAgB,EAChB,eAAe,EACf,aAAa,EACb,YAAY,EACb,MAAM,mBAAmB,CAAC;AAK3B,mCAAmC;AACnC,OAAO,EAAE,cAAc,IAAI,qBAAqB,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAE1G,8BAA8B;AAC9B,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,eAAe,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAEjG,qDAAqD;AACrD,OAAO,EAAE,UAAU,EAAE,gBAAgB,EAAE,WAAW,EAAE,gBAAgB,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAEnG,OAAO,EAAE,MAAM,IAAI,aAAa,EAAE,MAAM,mBAAmB,CAAA;AAE3D,OAAO,CAAC,GAAG,CAAC,2EAA2E,CAAC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "baraqex",
3
- "version": "1.0.21",
3
+ "version": "1.0.22",
4
4
  "description": "A wrapper package for frontend-hamroun framework",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",