@lumiflora/fsdk 0.1.4 → 0.1.5

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 (2) hide show
  1. package/dist/index.js +4 -4
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import path from 'path';
3
3
  import { fileURLToPath } from 'url';
4
- import { createRequire } from 'module';
4
+ import fs from 'fs';
5
5
  import cac from 'cac';
6
6
  import { logger, enableDebugMode, resolveCwd } from './utils/index.js';
7
7
  import { configLoader, pluginSystem } from './core/index.js';
@@ -12,9 +12,9 @@ import { createApp, addPage, addComponent, addStore, syncTemplate, validate, pre
12
12
  const cliEntryPath = fileURLToPath(import.meta.url);
13
13
  const cliRoot = path.dirname(path.dirname(cliEntryPath));
14
14
  global.__cliRoot = cliRoot;
15
- // Create require for reading package.json in ES module
16
- const require = createRequire(import.meta.url);
17
- const pkg = require('../../package.json');
15
+ // Read package.json to get version
16
+ const pkgPath = path.join(cliRoot, 'package.json');
17
+ const pkg = JSON.parse(fs.readFileSync(pkgPath, 'utf-8'));
18
18
  const cli = cac('fsdk');
19
19
  cli
20
20
  .version(pkg.version)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lumiflora/fsdk",
3
- "version": "0.1.4",
3
+ "version": "0.1.5",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "bin": {