@m14i/sith 1.9.1 → 1.10.0

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 CHANGED
@@ -43342,6 +43342,7 @@ __nccwpck_require__.a(module, async (__webpack_handle_async_dependencies__, __we
43342
43342
  /* harmony import */ var path__WEBPACK_IMPORTED_MODULE_3__ = __nccwpck_require__(6928);
43343
43343
  /* harmony import */ var path__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__nccwpck_require__.n(path__WEBPACK_IMPORTED_MODULE_3__);
43344
43344
  /* harmony import */ var update_notifier__WEBPACK_IMPORTED_MODULE_5__ = __nccwpck_require__(6213);
43345
+ /* harmony import */ var chalk__WEBPACK_IMPORTED_MODULE_6__ = __nccwpck_require__(9611);
43345
43346
  /* harmony import */ var _commands_docker_js__WEBPACK_IMPORTED_MODULE_4__ = __nccwpck_require__(5515);
43346
43347
  var __webpack_async_dependencies__ = __webpack_handle_async_dependencies__([_commands_docker_js__WEBPACK_IMPORTED_MODULE_4__]);
43347
43348
  _commands_docker_js__WEBPACK_IMPORTED_MODULE_4__ = (__webpack_async_dependencies__.then ? (await __webpack_async_dependencies__)() : __webpack_async_dependencies__)[0];
@@ -43351,6 +43352,7 @@ _commands_docker_js__WEBPACK_IMPORTED_MODULE_4__ = (__webpack_async_dependencies
43351
43352
 
43352
43353
 
43353
43354
 
43355
+
43354
43356
  // Import package.json for version and update checks
43355
43357
  const __filename = (0,url__WEBPACK_IMPORTED_MODULE_2__.fileURLToPath)(import.meta.url);
43356
43358
  const __dirname = (0,path__WEBPACK_IMPORTED_MODULE_3__.dirname)(__filename);
@@ -43358,8 +43360,29 @@ const pkg = JSON.parse((0,fs__WEBPACK_IMPORTED_MODULE_1__.readFileSync)(__nccwpc
43358
43360
  const PROGRAM_NAME = 'sith';
43359
43361
  const PROGRAM_VERSION = pkg.version;
43360
43362
  const PROGRAM_DESCRIPTION = 'Turn your context to the dark side. Standardize and share your OpenCode setup with a fully dockerized environment, designed for seamless collaboration and CI integration.';
43361
- // Check for updates
43362
- (0,update_notifier__WEBPACK_IMPORTED_MODULE_5__/* ["default"] */ .A)({ pkg }).notify();
43363
+ // Check for updates (automatic background check)
43364
+ const notifier = (0,update_notifier__WEBPACK_IMPORTED_MODULE_5__/* ["default"] */ .A)({ pkg });
43365
+ notifier.notify();
43366
+ async function checkForUpdates() {
43367
+ console.log(chalk__WEBPACK_IMPORTED_MODULE_6__/* ["default"] */ .Ay.cyan('Checking for updates...'));
43368
+ // Force update check by setting updateCheckInterval to 0
43369
+ const notifier = (0,update_notifier__WEBPACK_IMPORTED_MODULE_5__/* ["default"] */ .A)({
43370
+ pkg,
43371
+ updateCheckInterval: 0
43372
+ });
43373
+ // Fetch the latest version
43374
+ await notifier.fetchInfo();
43375
+ const update = notifier.update;
43376
+ if (update && update.latest !== pkg.version) {
43377
+ console.log();
43378
+ console.log(chalk__WEBPACK_IMPORTED_MODULE_6__/* ["default"] */ .Ay.green(`Update available: ${chalk__WEBPACK_IMPORTED_MODULE_6__/* ["default"] */ .Ay.dim(pkg.version)} → ${chalk__WEBPACK_IMPORTED_MODULE_6__/* ["default"] */ .Ay.bold(update.latest)}`));
43379
+ console.log(chalk__WEBPACK_IMPORTED_MODULE_6__/* ["default"] */ .Ay.cyan(`Run ${chalk__WEBPACK_IMPORTED_MODULE_6__/* ["default"] */ .Ay.bold(`npm install -g ${pkg.name}`)} to update`));
43380
+ console.log();
43381
+ }
43382
+ else {
43383
+ console.log(chalk__WEBPACK_IMPORTED_MODULE_6__/* ["default"] */ .Ay.green(`✓ You're on the latest version (${pkg.version})`));
43384
+ }
43385
+ }
43363
43386
  function createProgram() {
43364
43387
  const program = new commander__WEBPACK_IMPORTED_MODULE_0__/* .Command */ .uB();
43365
43388
  program
@@ -43368,11 +43391,15 @@ function createProgram() {
43368
43391
  .version(PROGRAM_VERSION)
43369
43392
  .option('--pull', 'Pull prebuilt Docker image (recommended)')
43370
43393
  .option('--build', 'Build the Docker image from scratch')
43371
- .option('--it', 'Launch interactive shell in Docker container');
43394
+ .option('--it', 'Launch interactive shell in Docker container')
43395
+ .option('--update', 'Check for updates');
43372
43396
  // Default action - show interactive menu or run shell with --it
43373
43397
  program
43374
43398
  .action(async (options) => {
43375
- if (options.it) {
43399
+ if (options.update) {
43400
+ await checkForUpdates();
43401
+ }
43402
+ else if (options.it) {
43376
43403
  await (0,_commands_docker_js__WEBPACK_IMPORTED_MODULE_4__/* .runShellDirect */ .l)();
43377
43404
  }
43378
43405
  else {
package/dist/package.json CHANGED
@@ -1 +1 @@
1
- {"name":"@m14i/sith","version":"1.9.1","description":"Turn your context to the dark side. Standardize and share your OpenCode setup with a fully dockerized environment, designed for seamless collaboration and CI integration.","type":"module","repository":{"type":"git","url":"https://github.com/MerzoukeMansouri/sith.git"},"bin":{"sith":"./dist/index.js"},"scripts":{"build":"ncc build src/index.ts -o dist && rm -rf dist/assets && cp -r assets dist/","dev":"tsx src/index.ts","dev:build":"pnpm build && node dist/index.js","dev:shell":"pnpm build && node dist/index.js shell","typecheck":"tsc --noEmit","clean":"rm -rf dist","prepublishOnly":"pnpm build"},"files":["dist","assets","docker"],"keywords":["opencode","docker","ci","automation","cli","nix"],"author":"","license":"MIT","dependencies":{"@inquirer/prompts":"^5.0.0","chalk":"^5.3.0","commander":"^12.1.0","execa":"^9.0.0","ink":"^7.0.3","react":"^19.2.6","update-notifier":"^7.3.1"},"devDependencies":{"@semantic-release/changelog":"^6.0.3","@semantic-release/git":"^10.0.1","@semantic-release/github":"^11.0.1","@semantic-release/npm":"^12.0.1","@types/node":"^20.12.7","@types/react":"^19.2.14","@types/update-notifier":"^6.0.8","@vercel/ncc":"^0.38.1","semantic-release":"^24.2.0","tsx":"^4.7.2","typescript":"^5.4.5"},"engines":{"node":">=18"}}
1
+ {"name":"@m14i/sith","version":"1.10.0","description":"Turn your context to the dark side. Standardize and share your OpenCode setup with a fully dockerized environment, designed for seamless collaboration and CI integration.","type":"module","repository":{"type":"git","url":"https://github.com/MerzoukeMansouri/sith.git"},"bin":{"sith":"./dist/index.js"},"scripts":{"build":"ncc build src/index.ts -o dist && rm -rf dist/assets && cp -r assets dist/","dev":"tsx src/index.ts","dev:build":"pnpm build && node dist/index.js","dev:shell":"pnpm build && node dist/index.js shell","typecheck":"tsc --noEmit","clean":"rm -rf dist","prepublishOnly":"pnpm build"},"files":["dist","assets","docker"],"keywords":["opencode","docker","ci","automation","cli","nix"],"author":"","license":"MIT","dependencies":{"@inquirer/prompts":"^5.0.0","chalk":"^5.3.0","commander":"^12.1.0","execa":"^9.0.0","ink":"^7.0.3","react":"^19.2.6","update-notifier":"^7.3.1"},"devDependencies":{"@semantic-release/changelog":"^6.0.3","@semantic-release/git":"^10.0.1","@semantic-release/github":"^11.0.1","@semantic-release/npm":"^12.0.1","@types/node":"^20.12.7","@types/react":"^19.2.14","@types/update-notifier":"^6.0.8","@vercel/ncc":"^0.38.1","semantic-release":"^24.2.0","tsx":"^4.7.2","typescript":"^5.4.5"},"engines":{"node":">=18"}}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@m14i/sith",
3
- "version": "1.9.1",
3
+ "version": "1.10.0",
4
4
  "description": "Turn your context to the dark side. Standardize and share your OpenCode setup with a fully dockerized environment, designed for seamless collaboration and CI integration.",
5
5
  "type": "module",
6
6
  "repository": {