@grupodiariodaregiao/bunstone 0.4.7 → 0.4.8

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.
Files changed (3) hide show
  1. package/bin/cli.ts +22 -12
  2. package/dist/index.js +36 -18
  3. package/package.json +1 -1
package/bin/cli.ts CHANGED
@@ -23,18 +23,6 @@ const THIN = "─".repeat(64);
23
23
  const args = Bun.argv.slice(2);
24
24
  const command = args[0];
25
25
 
26
- // ── Command dispatch ──────────────────────────────────────────────────────────
27
- if (command === "run") {
28
- await runCommand(args.slice(1));
29
- } else if (command === "exports") {
30
- await exportsCommand();
31
- } else if (command === "new" || (command && !args[1])) {
32
- await scaffold(command === "new" ? args[1] : command);
33
- } else {
34
- printHelp();
35
- process.exit(1);
36
- }
37
-
38
26
  // ─────────────────────────────────────────────────────────────────────────────
39
27
  // bunstone run [bun-flags...] <entrypoint>
40
28
  // ─────────────────────────────────────────────────────────────────────────────
@@ -535,3 +523,25 @@ ${cyan("Examples:")}
535
523
  bunstone run --watch src/main.ts
536
524
  `);
537
525
  }
526
+
527
+ async function main() {
528
+ if (command === "run") {
529
+ await runCommand(args.slice(1));
530
+ return;
531
+ }
532
+
533
+ if (command === "exports") {
534
+ await exportsCommand();
535
+ return;
536
+ }
537
+
538
+ if (command === "new" || (command && !args[1])) {
539
+ await scaffold(command === "new" ? args[1] : command);
540
+ return;
541
+ }
542
+
543
+ printHelp();
544
+ process.exit(1);
545
+ }
546
+
547
+ await main();
package/dist/index.js CHANGED
@@ -4,25 +4,43 @@ var __getProtoOf = Object.getPrototypeOf;
4
4
  var __defProp = Object.defineProperty;
5
5
  var __getOwnPropNames = Object.getOwnPropertyNames;
6
6
  var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ function __accessProp(key) {
8
+ return this[key];
9
+ }
10
+ var __toESMCache_node;
11
+ var __toESMCache_esm;
7
12
  var __toESM = (mod, isNodeMode, target) => {
13
+ var canCache = mod != null && typeof mod === "object";
14
+ if (canCache) {
15
+ var cache = isNodeMode ? __toESMCache_node ??= new WeakMap : __toESMCache_esm ??= new WeakMap;
16
+ var cached = cache.get(mod);
17
+ if (cached)
18
+ return cached;
19
+ }
8
20
  target = mod != null ? __create(__getProtoOf(mod)) : {};
9
21
  const to = isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target;
10
22
  for (let key of __getOwnPropNames(mod))
11
23
  if (!__hasOwnProp.call(to, key))
12
24
  __defProp(to, key, {
13
- get: () => mod[key],
25
+ get: __accessProp.bind(mod, key),
14
26
  enumerable: true
15
27
  });
28
+ if (canCache)
29
+ cache.set(mod, to);
16
30
  return to;
17
31
  };
18
32
  var __commonJS = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
33
+ var __returnValue = (v) => v;
34
+ function __exportSetter(name, newValue) {
35
+ this[name] = __returnValue.bind(null, newValue);
36
+ }
19
37
  var __export = (target, all) => {
20
38
  for (var name in all)
21
39
  __defProp(target, name, {
22
40
  get: all[name],
23
41
  enumerable: true,
24
42
  configurable: true,
25
- set: (newValue) => all[name] = () => newValue
43
+ set: __exportSetter.bind(all, name)
26
44
  });
27
45
  };
28
46
  var __legacyDecorateClassTS = function(decorators, target, key, desc) {
@@ -16746,7 +16764,7 @@ WD9f
16746
16764
 
16747
16765
  // node_modules/ioredis/built/utils/index.js
16748
16766
  var require_utils2 = __commonJS((exports) => {
16749
- var __dirname = "/home/filipi.oliveira@gdc.local/poc/diario-dip/node_modules/ioredis/built/utils";
16767
+ var __dirname = "/home/almir/projects/almir/bunstone/node_modules/ioredis/built/utils";
16750
16768
  Object.defineProperty(exports, "__esModule", { value: true });
16751
16769
  exports.noop = exports.defaults = exports.Debug = exports.getPackageMeta = exports.zipMap = exports.CONNECTION_CLOSED_ERROR_MSG = exports.shuffle = exports.sample = exports.resolveTLSProfile = exports.parseURL = exports.optimizeErrorStack = exports.toArg = exports.convertMapToArray = exports.convertObjectToArray = exports.timeout = exports.packObject = exports.isInt = exports.wrapMultiResult = exports.convertBufferToString = undefined;
16752
16770
  var fs_1 = __require("fs");
@@ -17032,7 +17050,7 @@ var require_argumentParsers = __commonJS((exports) => {
17032
17050
 
17033
17051
  // node_modules/ioredis/built/Command.js
17034
17052
  var require_Command = __commonJS((exports) => {
17035
- var __dirname = "/home/filipi.oliveira@gdc.local/poc/diario-dip/node_modules/ioredis/built";
17053
+ var __dirname = "/home/almir/projects/almir/bunstone/node_modules/ioredis/built";
17036
17054
  Object.defineProperty(exports, "__esModule", { value: true });
17037
17055
  var commands_1 = require_built();
17038
17056
  var calculateSlot = require_lib();
@@ -24996,7 +25014,7 @@ var require_node_gyp_build_optional_packages = __commonJS((exports, module) => {
24996
25014
 
24997
25015
  // node_modules/msgpackr-extract/index.js
24998
25016
  var require_msgpackr_extract = __commonJS((exports, module) => {
24999
- var __dirname = "/home/filipi.oliveira@gdc.local/poc/diario-dip/node_modules/msgpackr-extract";
25017
+ var __dirname = "/home/almir/projects/almir/bunstone/node_modules/msgpackr-extract";
25000
25018
  module.exports = require_node_gyp_build_optional_packages()(__dirname);
25001
25019
  });
25002
25020
 
@@ -31911,7 +31929,7 @@ var require_pattern_validation = __commonJS((exports) => {
31911
31929
 
31912
31930
  // node_modules/node-cron/dist/esm/tasks/background-scheduled-task/background-scheduled-task.js
31913
31931
  var require_background_scheduled_task = __commonJS((exports) => {
31914
- var __dirname = "/home/filipi.oliveira@gdc.local/poc/diario-dip/node_modules/node-cron/dist/esm/tasks/background-scheduled-task";
31932
+ var __dirname = "/home/almir/projects/almir/bunstone/node_modules/node-cron/dist/esm/tasks/background-scheduled-task";
31915
31933
  var __importDefault2 = exports && exports.__importDefault || function(mod) {
31916
31934
  return mod && mod.__esModule ? mod : { default: mod };
31917
31935
  };
@@ -32135,7 +32153,7 @@ var require_background_scheduled_task = __commonJS((exports) => {
32135
32153
 
32136
32154
  // node_modules/node-cron/dist/esm/node-cron.js
32137
32155
  var require_node_cron = __commonJS((exports) => {
32138
- var __filename = "/home/filipi.oliveira@gdc.local/poc/diario-dip/node_modules/node-cron/dist/esm/node-cron.js";
32156
+ var __filename = "/home/almir/projects/almir/bunstone/node_modules/node-cron/dist/esm/node-cron.js";
32139
32157
  var __importDefault2 = exports && exports.__importDefault || function(mod) {
32140
32158
  return mod && mod.__esModule ? mod : { default: mod };
32141
32159
  };
@@ -101416,14 +101434,9 @@ class WaitingError extends Error {
101416
101434
  Object.setPrototypeOf(this, new.target.prototype);
101417
101435
  }
101418
101436
  }
101419
- // node_modules/uuid/dist/esm/stringify.js
101420
- var byteToHex = [];
101421
- for (let i = 0;i < 256; ++i) {
101422
- byteToHex.push((i + 256).toString(16).slice(1));
101423
- }
101424
- function unsafeStringify(arr, offset = 0) {
101425
- return (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + "-" + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + "-" + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + "-" + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + "-" + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase();
101426
- }
101437
+ // node_modules/uuid/dist/esm/native.js
101438
+ import { randomUUID } from "crypto";
101439
+ var native_default = { randomUUID };
101427
101440
 
101428
101441
  // node_modules/uuid/dist/esm/rng.js
101429
101442
  import { randomFillSync } from "crypto";
@@ -101437,9 +101450,14 @@ function rng() {
101437
101450
  return rnds8Pool.slice(poolPtr, poolPtr += 16);
101438
101451
  }
101439
101452
 
101440
- // node_modules/uuid/dist/esm/native.js
101441
- import { randomUUID } from "crypto";
101442
- var native_default = { randomUUID };
101453
+ // node_modules/uuid/dist/esm/stringify.js
101454
+ var byteToHex = [];
101455
+ for (let i = 0;i < 256; ++i) {
101456
+ byteToHex.push((i + 256).toString(16).slice(1));
101457
+ }
101458
+ function unsafeStringify(arr, offset = 0) {
101459
+ return (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + "-" + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + "-" + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + "-" + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + "-" + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase();
101460
+ }
101443
101461
 
101444
101462
  // node_modules/uuid/dist/esm/v4.js
101445
101463
  function v4(options, buf, offset) {
package/package.json CHANGED
@@ -13,7 +13,7 @@
13
13
  "types": "./dist/*.d.ts"
14
14
  }
15
15
  },
16
- "version": "0.4.7",
16
+ "version": "0.4.8",
17
17
  "homepage": "https://bunstone.diario.one/",
18
18
  "repository": {
19
19
  "url": "https://github.com/diariodaregiao/bunstone.git",