@semiont/cli 0.4.4 → 0.4.5

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.
Files changed (2) hide show
  1. package/dist/cli.mjs +21 -35
  2. package/package.json +7 -7
package/dist/cli.mjs CHANGED
@@ -8183,8 +8183,6 @@ var init_frontend_start = __esm({
8183
8183
  metadata: { serviceType: "frontend", port }
8184
8184
  };
8185
8185
  }
8186
- const jwtSecret = readSecret("JWT_SECRET");
8187
- if (!jwtSecret) throw new Error(`JWT_SECRET not found in ${getSecretsFilePath()} \u2014 run: semiont provision`);
8188
8186
  const envConfig = service.environmentConfig;
8189
8187
  const backendService = envConfig.services["backend"];
8190
8188
  const backendUrl = `http://127.0.0.1:${backendService.port}`;
@@ -8197,14 +8195,12 @@ var init_frontend_start = __esm({
8197
8195
  ...Object.fromEntries(Object.entries(process.env).filter(([, v]) => v !== void 0)),
8198
8196
  NODE_ENV: envConfig.env?.NODE_ENV ?? "development",
8199
8197
  PORT: port.toString(),
8200
- NEXTAUTH_URL: frontendUrl,
8201
8198
  SERVER_API_URL: backendUrl,
8202
8199
  NEXT_PUBLIC_SITE_NAME: config.siteName,
8203
8200
  NEXT_PUBLIC_BASE_URL: frontendUrl,
8204
8201
  NEXT_PUBLIC_OAUTH_ALLOWED_DOMAINS: oauthAllowedDomains.join(","),
8205
8202
  NEXT_PUBLIC_ALLOWED_ORIGINS: allowedOrigins.join(","),
8206
- LOG_DIR: logsDir,
8207
- NEXTAUTH_SECRET: jwtSecret
8203
+ LOG_DIR: logsDir
8208
8204
  };
8209
8205
  const nextPublicVars = Object.keys(env).filter((k) => k.startsWith("NEXT_PUBLIC_"));
8210
8206
  if (!service.quiet) {
@@ -8339,8 +8335,7 @@ var init_frontend_start = __esm({
8339
8335
  checks.push({ name: "frontend-npm-package", pass: false, message: "@semiont/frontend not installed \u2014 run: semiont provision" });
8340
8336
  }
8341
8337
  checks.push(
8342
- checkFileExists(project.frontendLogsDir, "frontend logs dir (run: semiont provision)"),
8343
- checkJwtSecretExists()
8338
+ checkFileExists(project.frontendLogsDir, "frontend logs dir (run: semiont provision)")
8344
8339
  );
8345
8340
  return preflightFromChecks(checks);
8346
8341
  };
@@ -8861,7 +8856,7 @@ var init_backend_provision = __esm({
8861
8856
  init_cli_logger();
8862
8857
  init_backend_paths();
8863
8858
  init_preflight_utils();
8864
- SEMIONT_VERSION = "0.4.4";
8859
+ SEMIONT_VERSION = "0.4.5";
8865
8860
  provisionBackendService = async (context) => {
8866
8861
  const { service, options } = context;
8867
8862
  const projectRoot = service.projectRoot;
@@ -9003,7 +8998,6 @@ var init_backend_provision = __esm({
9003
8998
  // src/platforms/posix/handlers/frontend-provision.ts
9004
8999
  import * as fs22 from "fs";
9005
9000
  import * as path19 from "path";
9006
- import * as crypto2 from "crypto";
9007
9001
  import { execFileSync as execFileSync11 } from "child_process";
9008
9002
  import { SemiontProject as SemiontProject10 } from "@semiont/core/node";
9009
9003
  var SEMIONT_VERSION2, provisionFrontendService, preflightFrontendProvision, frontendProvisionDescriptor;
@@ -9013,9 +9007,9 @@ var init_frontend_provision = __esm({
9013
9007
  init_cli_logger();
9014
9008
  init_frontend_paths();
9015
9009
  init_preflight_utils();
9016
- SEMIONT_VERSION2 = "0.4.4";
9010
+ SEMIONT_VERSION2 = "0.4.5";
9017
9011
  provisionFrontendService = async (context) => {
9018
- const { service, options } = context;
9012
+ const { service } = context;
9019
9013
  const projectRoot = service.projectRoot;
9020
9014
  const packageSpec = `@semiont/frontend@${SEMIONT_VERSION2}`;
9021
9015
  if (!service.quiet) {
@@ -9055,14 +9049,6 @@ var init_frontend_provision = __esm({
9055
9049
  if (!service.quiet) {
9056
9050
  printInfo(`Created runtime directories in: ${project.frontendLogsDir}`);
9057
9051
  }
9058
- let nextAuthSecret = options.rotateSecret ? void 0 : readSecret("JWT_SECRET");
9059
- if (!nextAuthSecret) {
9060
- nextAuthSecret = crypto2.randomBytes(32).toString("base64");
9061
- writeSecret("JWT_SECRET", nextAuthSecret);
9062
- printInfo(options.rotateSecret ? "Generated new JWT_SECRET (--rotate-secret)" : "Generated new JWT_SECRET");
9063
- } else {
9064
- printInfo("Using existing JWT_SECRET from secrets file");
9065
- }
9066
9052
  if (!service.quiet) {
9067
9053
  printInfo("Using pre-built npm package \u2014 skipping install, build, and workspace steps");
9068
9054
  }
@@ -19490,13 +19476,13 @@ var uuid4;
19490
19476
  var init_uuid = __esm({
19491
19477
  "node_modules/@anthropic-ai/sdk/internal/utils/uuid.mjs"() {
19492
19478
  uuid4 = function() {
19493
- const { crypto: crypto4 } = globalThis;
19494
- if (crypto4?.randomUUID) {
19495
- uuid4 = crypto4.randomUUID.bind(crypto4);
19496
- return crypto4.randomUUID();
19479
+ const { crypto: crypto3 } = globalThis;
19480
+ if (crypto3?.randomUUID) {
19481
+ uuid4 = crypto3.randomUUID.bind(crypto3);
19482
+ return crypto3.randomUUID();
19497
19483
  }
19498
19484
  const u8 = new Uint8Array(1);
19499
- const randomByte = crypto4 ? () => crypto4.getRandomValues(u8)[0] : () => Math.random() * 255 & 255;
19485
+ const randomByte = crypto3 ? () => crypto3.getRandomValues(u8)[0] : () => Math.random() * 255 & 255;
19500
19486
  return "10000000-1000-4000-8000-100000000000".replace(/[018]/g, (c) => (+c ^ randomByte() & 15 >> +c / 4).toString(16));
19501
19487
  };
19502
19488
  }
@@ -27043,7 +27029,7 @@ var require_package = __commonJS({
27043
27029
  "package.json"(exports, module) {
27044
27030
  module.exports = {
27045
27031
  name: "@semiont/cli",
27046
- version: "0.4.4",
27032
+ version: "0.4.5",
27047
27033
  description: "Semiont CLI - Unified environment management tool",
27048
27034
  _comment: "AWS SDK dependencies (@aws-sdk/*) are only used by platforms/aws",
27049
27035
  type: "module",
@@ -27107,12 +27093,12 @@ var require_package = __commonJS({
27107
27093
  "@aws-sdk/client-secrets-manager": "^3.600.0",
27108
27094
  "@aws-sdk/client-sts": "^3.859.0",
27109
27095
  "@aws-sdk/client-wafv2": "^3.859.0",
27110
- "@semiont/api-client": "^0.4.4",
27111
- "@semiont/content": "^0.4.4",
27112
- "@semiont/core": "^0.4.4",
27113
- "@semiont/event-sourcing": "^0.4.4",
27114
- "@semiont/graph": "^0.4.4",
27115
- "@semiont/make-meaning": "^0.4.4",
27096
+ "@semiont/api-client": "^0.4.5",
27097
+ "@semiont/content": "^0.4.5",
27098
+ "@semiont/core": "^0.4.5",
27099
+ "@semiont/event-sourcing": "^0.4.5",
27100
+ "@semiont/graph": "^0.4.5",
27101
+ "@semiont/make-meaning": "^0.4.5",
27116
27102
  arg: "^5.0.2",
27117
27103
  argon2: "^0.44.0",
27118
27104
  express: "^5.2.1",
@@ -27744,7 +27730,7 @@ var provisionCommand = new CommandBuilder().name("provision").description("Provi
27744
27730
  },
27745
27731
  "--rotate-secret": {
27746
27732
  type: "boolean",
27747
- description: "Force generation of a new shared secret for frontend/backend (JWT_SECRET / NEXTAUTH_SECRET). Has no effect on other services. Warns if the peer service will be left out of sync.",
27733
+ description: "Force generation of a new JWT_SECRET. Has no effect on other services. Warns if the peer service will be left out of sync.",
27748
27734
  default: false
27749
27735
  }
27750
27736
  },
@@ -28158,7 +28144,7 @@ init_command_definition();
28158
28144
  init_base_options_schema();
28159
28145
  init_cli_logger();
28160
28146
  init_config_loader();
28161
- import * as crypto3 from "crypto";
28147
+ import * as crypto2 from "crypto";
28162
28148
  import * as argon2 from "argon2";
28163
28149
  import * as path36 from "path";
28164
28150
  import { createRequire as createRequire3 } from "module";
@@ -28217,7 +28203,7 @@ function extractDomain(email) {
28217
28203
  return parts[1];
28218
28204
  }
28219
28205
  function generatePassword() {
28220
- return crypto3.randomBytes(12).toString("base64");
28206
+ return crypto2.randomBytes(12).toString("base64");
28221
28207
  }
28222
28208
  async function useradd(options) {
28223
28209
  const startTime = Date.now();
@@ -32322,7 +32308,7 @@ async function generateGlobalHelp() {
32322
32308
  }
32323
32309
 
32324
32310
  // src/cli.ts
32325
- var VERSION2 = "0.4.4";
32311
+ var VERSION2 = "0.4.5";
32326
32312
  function printVersion() {
32327
32313
  console.log(`Semiont CLI v${VERSION2}`);
32328
32314
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@semiont/cli",
3
- "version": "0.4.4",
3
+ "version": "0.4.5",
4
4
  "description": "Semiont CLI - Unified environment management tool",
5
5
  "_comment": "AWS SDK dependencies (@aws-sdk/*) are only used by platforms/aws",
6
6
  "type": "module",
@@ -64,12 +64,12 @@
64
64
  "@aws-sdk/client-secrets-manager": "^3.600.0",
65
65
  "@aws-sdk/client-sts": "^3.859.0",
66
66
  "@aws-sdk/client-wafv2": "^3.859.0",
67
- "@semiont/api-client": "0.4.4",
68
- "@semiont/content": "0.4.4",
69
- "@semiont/core": "0.4.4",
70
- "@semiont/event-sourcing": "0.4.4",
71
- "@semiont/graph": "0.4.4",
72
- "@semiont/make-meaning": "0.4.4",
67
+ "@semiont/api-client": "0.4.5",
68
+ "@semiont/content": "0.4.5",
69
+ "@semiont/core": "0.4.5",
70
+ "@semiont/event-sourcing": "0.4.5",
71
+ "@semiont/graph": "0.4.5",
72
+ "@semiont/make-meaning": "0.4.5",
73
73
  "arg": "^5.0.2",
74
74
  "argon2": "^0.44.0",
75
75
  "express": "^5.2.1",