contensis-cli 1.7.0 → 1.7.1-beta.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/esbuild.config.js CHANGED
@@ -1,3 +1,4 @@
1
+ const fs = require('fs');
1
2
  const { rimraf } = require('rimraf');
2
3
  const esbuild = require('esbuild');
3
4
  const chalk = require('chalk');
@@ -5,6 +6,12 @@ const { globPlugin } = require('esbuild-plugin-glob');
5
6
  const { nodeExternalsPlugin } = require('esbuild-node-externals');
6
7
  const { replaceTscAliasPaths } = require('tsc-alias');
7
8
 
9
+ // embed the current package version into the build
10
+ // (package.json is the single source of truth; this used to be a `prebuild`
11
+ // npm lifecycle script, which lerna/yarn builds never fire - see release 1.7.0)
12
+ const { version } = require('./package.json');
13
+ fs.writeFileSync('./src/version.ts', `export const LIB_VERSION = ${JSON.stringify(version)};\n`);
14
+
8
15
  const completed = `${chalk.green('[contensis-cli]')} Build successful 👍\n`;
9
16
 
10
17
  console.time(completed);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "contensis-cli",
3
- "version": "1.7.0",
3
+ "version": "1.7.1-beta.0",
4
4
  "description": "A fully featured Contensis command line interface with a shell UI provides simple and intuitive ways to manage or profile your content in any NodeJS terminal.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -16,7 +16,6 @@
16
16
  "prestart": "npm run build",
17
17
  "start": "npm run cli",
18
18
  "dev:shell": "npm run prestart && nodemon --watch dist --inspect=9229 ./dist/shell.js",
19
- "prebuild": "node -p \"'export const LIB_VERSION = ' + JSON.stringify(require('./package.json').version) + ';'\" > src/version.ts",
20
19
  "build": "node esbuild.config.js",
21
20
  "build:watch": "node esbuild.config.js --watch",
22
21
  "cli": "node --inspect=9229 ./cli.js",
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const LIB_VERSION = "1.6.1-beta.25";
1
+ export const LIB_VERSION = "1.7.1-beta.0";