@customyai/cli 0.6.0 → 0.7.1

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/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # @customyai/cli
2
2
 
3
+ ## 0.7.1
4
+
5
+ ### Patch Changes
6
+
7
+ - Licence: this package is now distributed under a proprietary licence (all rights reserved). Use requires a written agreement with Customy. Earlier versions keep the licence they were published with (MIT).
8
+ - Dependencias actualizadas:
9
+ - @customyai/provisioning@0.1.2
10
+
11
+ ## 0.7.0
12
+
13
+ ### Minor Changes
14
+
15
+ - Environment discovery without hand-written ids: `createCustomy` resolves the Access URL, the Workspace environment and the project from `CUSTOMY_ACCESS_URL` (falls back to `CUSTOMY_ISSUER`), `CUSTOMY_WORKSPACE_ENVIRONMENT_ID` and `CUSTOMY_PROJECT_ID` (explicit option, then variable, then what `discoverApplication` found), `issuer` is now optional, and `customy.apps` fills `organizationId`, `projectId` and `accessEnvironmentId` the same way. `readCustomyEnvironment` is exported. Typed capability values: `customy apps codegen` also writes `CustomyCapabilityValues` (and `capabilityValues` in `CustomyAppTypes`), and `typedCapability` narrows the `value` of a check; existing code keeps compiling. `createFakeAccess` simulates sessions (`sessions.create/get/revoke`) and discovery (`application()`, `environment()`).
16
+
3
17
  ## 0.6.0
4
18
 
5
19
  ### Minor Changes
package/LICENSE CHANGED
@@ -1,21 +1,7 @@
1
- MIT License
1
+ Copyright (c) 2026 Customy. All rights reserved.
2
2
 
3
- Copyright (c) 2026 Customy
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
3
+ This software is proprietary. It is distributed so that Customy products and
4
+ parties that hold a written agreement with Customy can install it. Its
5
+ availability on any package registry or source repository grants no licence to
6
+ use, copy, modify, merge, publish, distribute, sublicense or sell it. Any use
7
+ outside such an agreement is prohibited.
package/dist/bin.cjs CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  'use strict';
3
3
 
4
- var chunk6S5U7ZKO_cjs = require('./chunk-6S5U7ZKO.cjs');
4
+ var chunk6KGKN5HN_cjs = require('./chunk-6KGKN5HN.cjs');
5
5
  var promises = require('readline/promises');
6
6
 
7
7
  async function prompt(question) {
@@ -12,7 +12,7 @@ async function prompt(question) {
12
12
  rl.close();
13
13
  }
14
14
  }
15
- chunk6S5U7ZKO_cjs.runCli(process.argv.slice(2), {
15
+ chunk6KGKN5HN_cjs.runCli(process.argv.slice(2), {
16
16
  cwd: process.cwd(),
17
17
  env: process.env,
18
18
  out: (line) => console.log(line),
package/dist/bin.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { runCli } from './chunk-L2FCAP2K.mjs';
2
+ import { runCli } from './chunk-KDUW3KTG.mjs';
3
3
  import { createInterface } from 'readline/promises';
4
4
 
5
5
  async function prompt(question) {
@@ -57,6 +57,11 @@ function generateAppTypes(manifest) {
57
57
  "};",
58
58
  "",
59
59
  `export type CustomyCapability = ${union(manifest.capabilities.map((capability) => capability.lookupKey))};`,
60
+ "",
61
+ "/** Valor que devuelve cada capability: `boolean`, `number` (medida) o `unknown` (configuraci\xF3n). */",
62
+ `export type CustomyCapabilityValues = {
63
+ ${manifest.capabilities.map((capability) => ` ${literal(capability.lookupKey)}: ${capability.type === "boolean" ? "boolean" : capability.type === "metered" ? "number" : "unknown"};`).join("\n")}
64
+ };`,
60
65
  `export type CustomyPlan = ${union(manifest.plans.map((plan2) => plan2.code))};`,
61
66
  `export type CustomyMeter = ${union(manifest.meters.map((meter) => meter.code))};`,
62
67
  "",
@@ -74,6 +79,7 @@ ${roles.map((role) => ` ${literal(role.key)}: ${literal(role.permissions)},`).j
74
79
  " events: CustomyEventProperties;",
75
80
  " meters: CustomyMeter;",
76
81
  " capabilities: CustomyCapability;",
82
+ " capabilityValues: CustomyCapabilityValues;",
77
83
  " roles: CustomyRole;",
78
84
  " permissions: CustomyPermission;",
79
85
  "};",
@@ -51,6 +51,11 @@ function generateAppTypes(manifest) {
51
51
  "};",
52
52
  "",
53
53
  `export type CustomyCapability = ${union(manifest.capabilities.map((capability) => capability.lookupKey))};`,
54
+ "",
55
+ "/** Valor que devuelve cada capability: `boolean`, `number` (medida) o `unknown` (configuraci\xF3n). */",
56
+ `export type CustomyCapabilityValues = {
57
+ ${manifest.capabilities.map((capability) => ` ${literal(capability.lookupKey)}: ${capability.type === "boolean" ? "boolean" : capability.type === "metered" ? "number" : "unknown"};`).join("\n")}
58
+ };`,
54
59
  `export type CustomyPlan = ${union(manifest.plans.map((plan2) => plan2.code))};`,
55
60
  `export type CustomyMeter = ${union(manifest.meters.map((meter) => meter.code))};`,
56
61
  "",
@@ -68,6 +73,7 @@ ${roles.map((role) => ` ${literal(role.key)}: ${literal(role.permissions)},`).j
68
73
  " events: CustomyEventProperties;",
69
74
  " meters: CustomyMeter;",
70
75
  " capabilities: CustomyCapability;",
76
+ " capabilityValues: CustomyCapabilityValues;",
71
77
  " roles: CustomyRole;",
72
78
  " permissions: CustomyPermission;",
73
79
  "};",
package/dist/index.cjs CHANGED
@@ -1,46 +1,46 @@
1
1
  'use strict';
2
2
 
3
- var chunk6S5U7ZKO_cjs = require('./chunk-6S5U7ZKO.cjs');
3
+ var chunk6KGKN5HN_cjs = require('./chunk-6KGKN5HN.cjs');
4
4
 
5
5
 
6
6
 
7
7
  Object.defineProperty(exports, "EXPERIMENTS_EXIT_CODES", {
8
8
  enumerable: true,
9
- get: function () { return chunk6S5U7ZKO_cjs.EXPERIMENTS_EXIT; }
9
+ get: function () { return chunk6KGKN5HN_cjs.EXPERIMENTS_EXIT; }
10
10
  });
11
11
  Object.defineProperty(exports, "PROVISIONING_EXIT_CODES", {
12
12
  enumerable: true,
13
- get: function () { return chunk6S5U7ZKO_cjs.EXIT; }
13
+ get: function () { return chunk6KGKN5HN_cjs.EXIT; }
14
14
  });
15
15
  Object.defineProperty(exports, "SyncError", {
16
16
  enumerable: true,
17
- get: function () { return chunk6S5U7ZKO_cjs.SyncError; }
17
+ get: function () { return chunk6KGKN5HN_cjs.SyncError; }
18
18
  });
19
19
  Object.defineProperty(exports, "generateAppTypes", {
20
20
  enumerable: true,
21
- get: function () { return chunk6S5U7ZKO_cjs.generateAppTypes; }
21
+ get: function () { return chunk6KGKN5HN_cjs.generateAppTypes; }
22
22
  });
23
23
  Object.defineProperty(exports, "runCli", {
24
24
  enumerable: true,
25
- get: function () { return chunk6S5U7ZKO_cjs.runCli; }
25
+ get: function () { return chunk6KGKN5HN_cjs.runCli; }
26
26
  });
27
27
  Object.defineProperty(exports, "runExperimentsCli", {
28
28
  enumerable: true,
29
- get: function () { return chunk6S5U7ZKO_cjs.runExperimentsCli; }
29
+ get: function () { return chunk6KGKN5HN_cjs.runExperimentsCli; }
30
30
  });
31
31
  Object.defineProperty(exports, "runProvisioningCli", {
32
32
  enumerable: true,
33
- get: function () { return chunk6S5U7ZKO_cjs.runProvisioningCli; }
33
+ get: function () { return chunk6KGKN5HN_cjs.runProvisioningCli; }
34
34
  });
35
35
  Object.defineProperty(exports, "schemaToType", {
36
36
  enumerable: true,
37
- get: function () { return chunk6S5U7ZKO_cjs.schemaToType; }
37
+ get: function () { return chunk6KGKN5HN_cjs.schemaToType; }
38
38
  });
39
39
  Object.defineProperty(exports, "syncApp", {
40
40
  enumerable: true,
41
- get: function () { return chunk6S5U7ZKO_cjs.syncApp; }
41
+ get: function () { return chunk6KGKN5HN_cjs.syncApp; }
42
42
  });
43
43
  Object.defineProperty(exports, "validateManifest", {
44
44
  enumerable: true,
45
- get: function () { return chunk6S5U7ZKO_cjs.validateManifest; }
45
+ get: function () { return chunk6KGKN5HN_cjs.validateManifest; }
46
46
  });
package/dist/index.mjs CHANGED
@@ -1 +1 @@
1
- export { EXPERIMENTS_EXIT as EXPERIMENTS_EXIT_CODES, EXIT as PROVISIONING_EXIT_CODES, SyncError, generateAppTypes, runCli, runExperimentsCli, runProvisioningCli, schemaToType, syncApp, validateManifest } from './chunk-L2FCAP2K.mjs';
1
+ export { EXPERIMENTS_EXIT as EXPERIMENTS_EXIT_CODES, EXIT as PROVISIONING_EXIT_CODES, SyncError, generateAppTypes, runCli, runExperimentsCli, runProvisioningCli, schemaToType, syncApp, validateManifest } from './chunk-KDUW3KTG.mjs';
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "@customyai/cli",
3
- "version": "0.6.0",
3
+ "version": "0.7.1",
4
4
  "description": "Customy CLI: validate, type and sync customy.app.json (customy apps ...) and provision TEST users (customy users | audit | policy | whoami). Also usable as a library.",
5
- "license": "MIT",
5
+ "license": "UNLICENSED",
6
6
  "author": "Customy <hello@customy.ai>",
7
7
  "repository": {
8
8
  "type": "git",
@@ -56,7 +56,7 @@
56
56
  "test": "vitest run"
57
57
  },
58
58
  "dependencies": {
59
- "@customyai/provisioning": "^0.1.1",
59
+ "@customyai/provisioning": "^0.1.2",
60
60
  "zod": "^3.23.8"
61
61
  },
62
62
  "devDependencies": {