@produtype/core 0.2.1 → 0.2.2

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/cli.js CHANGED
@@ -45,6 +45,7 @@ const buildPlan_1 = require("./planner/buildPlan");
45
45
  const markdownPlan_1 = require("./planner/markdownPlan");
46
46
  const jsonPlan_1 = require("./planner/jsonPlan");
47
47
  const pathUtils_1 = require("./utils/pathUtils");
48
+ const version_1 = require("./version");
48
49
  const allowedProfiles = ['observed-only', 'static-site', 'internal-tool', 'b2c-app', 'b2b-saas', 'ai-saas', 'marketplace', 'auto'];
49
50
  const maturityOrder = ['prototype', 'early', 'partial', 'production_ready'];
50
51
  function normalizeProfile(profile) {
@@ -195,7 +196,7 @@ async function runCli(argv = process.argv) {
195
196
  program
196
197
  .name('prodkit')
197
198
  .description('Analyze web application repositories for production-readiness and remediation planning.')
198
- .version('0.2.0');
199
+ .version(version_1.PRODKit_VERSION);
199
200
  program
200
201
  .command('analyze')
201
202
  .argument('<path-to-project>', 'Path to target repository')
package/dist/version.d.ts CHANGED
@@ -1 +1 @@
1
- export declare const PRODKit_VERSION = "0.2.0";
1
+ export declare const PRODKit_VERSION: string;
package/dist/version.js CHANGED
@@ -1,4 +1,61 @@
1
1
  "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
2
35
  Object.defineProperty(exports, "__esModule", { value: true });
3
36
  exports.PRODKit_VERSION = void 0;
4
- exports.PRODKit_VERSION = '0.2.0';
37
+ const fs_1 = require("fs");
38
+ const path = __importStar(require("path"));
39
+ /**
40
+ * Read the version from the manifest instead of hard-coding it.
41
+ *
42
+ * This string is stamped into every report and into the MCP handshake, so a
43
+ * constant that has to be edited in step with `npm version` drifts silently:
44
+ * 0.2.1 shipped to npm still telling users it was 0.2.0. The manifest sits one
45
+ * directory above both the compiled file (dist/version.js) and the source file
46
+ * (src/version.ts), so the same relative path works in a build, in a test run,
47
+ * and in an installed package.
48
+ */
49
+ function readVersion() {
50
+ try {
51
+ const parsed = JSON.parse((0, fs_1.readFileSync)(path.resolve(__dirname, '..', 'package.json'), 'utf8'));
52
+ if (parsed && typeof parsed === 'object' && typeof parsed.version === 'string') {
53
+ return parsed.version;
54
+ }
55
+ }
56
+ catch {
57
+ // Fall through: a missing or unreadable manifest must not stop an analysis.
58
+ }
59
+ return '0.0.0-unknown';
60
+ }
61
+ exports.PRODKit_VERSION = readVersion();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@produtype/core",
3
- "version": "0.2.1",
3
+ "version": "0.2.2",
4
4
  "description": "Deterministic CLI and library that analyzes a web application repository and reports how far it is from production-ready for the kind of product it is meant to be.",
5
5
  "license": "MIT",
6
6
  "bin": {
@@ -87,5 +87,8 @@
87
87
  "author": "Denis Billi",
88
88
  "publishConfig": {
89
89
  "access": "public"
90
+ },
91
+ "directories": {
92
+ "test": "tests"
90
93
  }
91
94
  }