@modootoday/envs 0.1.0 → 0.1.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.
@@ -263,6 +263,9 @@ function printHelp(ui, commands, notImplemented) {
263
263
  }
264
264
  }
265
265
 
266
+ // src/cli/version.ts
267
+ var VERSION = true ? "0.1.1" : "0.0.0-source";
268
+
266
269
  // src/commands/add.ts
267
270
  import { existsSync as existsSync2, readFileSync as readFileSync2 } from "fs";
268
271
 
@@ -4160,17 +4163,17 @@ var report2 = (ui, error) => {
4160
4163
  async function list({ ui, env }) {
4161
4164
  const who = await account(await access(env));
4162
4165
  ui.heading(who.userId);
4163
- if (!who.teamManagement) {
4164
- ui.warn(
4165
- "team sharing is not on this plan",
4166
- "invites will be refused; see envs.build for the plan that carries it"
4167
- );
4168
- }
4169
4166
  if (who.members.length === 0) ui.info("shared with", "nobody yet");
4170
4167
  else ui.table(who.members.map((member) => [member, "member"]));
4171
4168
  if (who.teams.length > 0) {
4172
4169
  ui.table(who.teams.map((owner) => [owner, "you are a member"]));
4173
4170
  }
4171
+ if (!who.teamManagement) {
4172
+ ui.warn(
4173
+ "inviting others needs the paid plan",
4174
+ who.teams.length > 0 ? "catalogs shared with you keep working; see envs.build" : "see envs.build for the plan that carries it"
4175
+ );
4176
+ }
4174
4177
  return 0;
4175
4178
  }
4176
4179
  async function invite({ ui, env }) {
@@ -4536,6 +4539,11 @@ function dispatch(argv, options = {}) {
4536
4539
  printHelp(ui, COMMANDS, PLANNED);
4537
4540
  return 2;
4538
4541
  }
4542
+ if (verb === "--version" || verb === "-v" || verb === "version") {
4543
+ ui.data(`${VERSION}
4544
+ `);
4545
+ return 0;
4546
+ }
4539
4547
  if (verb === "--help" || verb === "-h" || verb === "help") {
4540
4548
  const named = COMMANDS.find((command2) => command2.name === rest[0]);
4541
4549
  if (named) printCommandHelp(ui, named);
package/dist/cli.js CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  dispatch
4
- } from "./chunk-47XO3SDE.js";
4
+ } from "./chunk-NQHT5UCU.js";
5
5
  import "./chunk-STHFIZRP.js";
6
6
 
7
7
  // src/cli.ts
package/dist/index.cjs CHANGED
@@ -1573,6 +1573,9 @@ function printHelp(ui, commands, notImplemented) {
1573
1573
  }
1574
1574
  }
1575
1575
 
1576
+ // src/cli/version.ts
1577
+ var VERSION = true ? "0.1.1" : "0.0.0-source";
1578
+
1576
1579
  // src/commands/add.ts
1577
1580
  var import_node_fs5 = require("fs");
1578
1581
 
@@ -5437,17 +5440,17 @@ var report2 = (ui, error) => {
5437
5440
  async function list({ ui, env }) {
5438
5441
  const who = await account(await access(env));
5439
5442
  ui.heading(who.userId);
5440
- if (!who.teamManagement) {
5441
- ui.warn(
5442
- "team sharing is not on this plan",
5443
- "invites will be refused; see envs.build for the plan that carries it"
5444
- );
5445
- }
5446
5443
  if (who.members.length === 0) ui.info("shared with", "nobody yet");
5447
5444
  else ui.table(who.members.map((member) => [member, "member"]));
5448
5445
  if (who.teams.length > 0) {
5449
5446
  ui.table(who.teams.map((owner) => [owner, "you are a member"]));
5450
5447
  }
5448
+ if (!who.teamManagement) {
5449
+ ui.warn(
5450
+ "inviting others needs the paid plan",
5451
+ who.teams.length > 0 ? "catalogs shared with you keep working; see envs.build" : "see envs.build for the plan that carries it"
5452
+ );
5453
+ }
5451
5454
  return 0;
5452
5455
  }
5453
5456
  async function invite({ ui, env }) {
@@ -5813,6 +5816,11 @@ function dispatch(argv, options = {}) {
5813
5816
  printHelp(ui, COMMANDS, PLANNED);
5814
5817
  return 2;
5815
5818
  }
5819
+ if (verb === "--version" || verb === "-v" || verb === "version") {
5820
+ ui.data(`${VERSION}
5821
+ `);
5822
+ return 0;
5823
+ }
5816
5824
  if (verb === "--help" || verb === "-h" || verb === "help") {
5817
5825
  const named = COMMANDS.find((command2) => command2.name === rest[0]);
5818
5826
  if (named) printCommandHelp(ui, named);
package/dist/index.js CHANGED
@@ -5,7 +5,7 @@ import {
5
5
  csvField,
6
6
  dispatch,
7
7
  exportValues
8
- } from "./chunk-47XO3SDE.js";
8
+ } from "./chunk-NQHT5UCU.js";
9
9
  import {
10
10
  CatalogVersionError,
11
11
  ConflictError,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@modootoday/envs",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "license": "Elastic-2.0",
5
5
  "author": "modootoday",
6
6
  "description": "Environment values in an encrypted catalog rather than scattered files — provenance, releases, rollback and a strict .env format gate. dotenv-compatible surface.",
@@ -38,7 +38,8 @@
38
38
  "site:deployed": "node scripts/check-deployed.mjs",
39
39
  "typecheck": "tsc --noEmit --incremental --tsBuildInfoFile ./dist/.tsbuildinfo",
40
40
  "clean": "node -e \"require('node:fs').rmSync('dist',{recursive:true,force:true})\"",
41
- "prepack": "npm run build && npm run typecheck && npm test"
41
+ "prepack": "npm run build && node scripts/check-version.mjs && npm run typecheck && npm test",
42
+ "version:check": "node scripts/check-version.mjs"
42
43
  },
43
44
  "dependencies": {},
44
45
  "devDependencies": {