@getxflow/cli 0.9.0 → 0.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.
@@ -1,34 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- const strict_1 = __importDefault(require("node:assert/strict"));
7
- const node_test_1 = require("node:test");
8
- const update_1 = require("./update");
9
- /**
10
- * The price of a mistake here is npm running over a pnpm or bun installation, which
11
- * leaves two copies and a user who cannot tell which one answers. Path shapes only,
12
- * the rest of the command is a run, not a rule.
13
- */
14
- (0, node_test_1.test)('a global npm prefix is an ordinary install', () => {
15
- strict_1.default.equal((0, update_1.classifyPath)('C:\\Users\\me\\AppData\\Roaming\\npm\\node_modules\\@getxflow\\cli\\dist'), 'node_modules');
16
- strict_1.default.equal((0, update_1.classifyPath)('/usr/local/lib/node_modules/@getxflow/cli/dist'), 'node_modules');
17
- strict_1.default.equal((0, update_1.classifyPath)('/home/me/.npm-global/lib/node_modules/@getxflow/cli/dist'), 'node_modules');
18
- });
19
- (0, node_test_1.test)('npm as a path segment is not pnpm', () => {
20
- strict_1.default.notEqual((0, update_1.classifyPath)('C:\\Users\\me\\AppData\\Roaming\\npm\\node_modules\\@getxflow\\cli\\dist'), 'pnpm');
21
- });
22
- (0, node_test_1.test)('other package managers are recognized by their own folders', () => {
23
- strict_1.default.equal((0, update_1.classifyPath)('/home/me/.local/share/pnpm/global/5/node_modules/@getxflow/cli/dist'), 'pnpm');
24
- strict_1.default.equal((0, update_1.classifyPath)('/home/me/project/node_modules/.pnpm/@getxflow+cli@0.6.0/node_modules/@getxflow/cli/dist'), 'pnpm');
25
- strict_1.default.equal((0, update_1.classifyPath)('/home/me/.bun/install/global/node_modules/@getxflow/cli/dist'), 'bun');
26
- strict_1.default.equal((0, update_1.classifyPath)('/home/me/project/.yarn/cache/@getxflow-cli/dist'), 'yarn');
27
- });
28
- (0, node_test_1.test)('an npx run is a cached copy, not an installation', () => {
29
- strict_1.default.equal((0, update_1.classifyPath)('/home/me/.npm/_npx/8f1a2b/node_modules/@getxflow/cli/dist'), 'npx');
30
- });
31
- (0, node_test_1.test)('without node_modules the code runs from a checkout', () => {
32
- strict_1.default.equal((0, update_1.classifyPath)('C:\\cursor\\xflow 2.0\\cli\\dist'), 'checkout');
33
- strict_1.default.equal((0, update_1.classifyPath)('/home/me/xflow/cli/src'), 'checkout');
34
- });
@@ -1,25 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- const node_test_1 = require("node:test");
7
- const strict_1 = __importDefault(require("node:assert/strict"));
8
- const limits_1 = require("./limits");
9
- (0, node_test_1.test)('a counted limit reads as a tally', () => {
10
- const line = (0, limits_1.limitLine)({ code: 'limit_functions', used: 29, limit: 29 });
11
- strict_1.default.equal(line, 'Plan limit: cloud functions, 29 of 29 used. Repeating the same command will not help.');
12
- });
13
- (0, node_test_1.test)('an interval reads as a frequency, not as a tally', () => {
14
- const line = (0, limits_1.limitLine)({ code: 'limit_schedule_interval', used: 5, limit: 60 });
15
- strict_1.default.match(line, /every 5 min against a 60 min minimum/);
16
- strict_1.default.doesNotMatch(line, /used/);
17
- });
18
- (0, node_test_1.test)('a refusal without numbers stays a plain sentence', () => {
19
- const line = (0, limits_1.limitLine)({ code: 'plan_no_schedules' });
20
- strict_1.default.equal(line, 'Plan limit: schedules. Repeating the same command will not help.');
21
- });
22
- (0, node_test_1.test)('an unknown code falls back to the code itself', () => {
23
- const line = (0, limits_1.limitLine)({ code: 'limit_unheard_of' });
24
- strict_1.default.match(line, /Plan limit: limit_unheard_of\./);
25
- });