@hahnpro/flow-cli 2025.10.1 → 2025.10.3

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/main.js +9 -8
  2. package/package.json +3 -3
package/main.js CHANGED
@@ -1,16 +1,12 @@
1
1
  #!/usr/bin/env node
2
- var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
3
- get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
4
- }) : x)(function(x) {
5
- if (typeof require !== "undefined") return require.apply(this, arguments);
6
- throw Error('Dynamic require of "' + x + '" is not supported');
7
- });
8
2
 
9
3
  // lib/flow-cli/src/main.ts
10
4
  import "reflect-metadata";
11
5
  import "dotenv/config";
12
6
  import fs2 from "node:fs";
7
+ import { createRequire } from "node:module";
13
8
  import path3 from "node:path";
9
+ import url2 from "node:url";
14
10
  import archiver from "archiver";
15
11
  import Axios from "axios";
16
12
  import { Command } from "commander";
@@ -23,6 +19,7 @@ import ora from "ora";
23
19
 
24
20
  // lib/flow-cli/src/auth.ts
25
21
  import path2 from "node:path";
22
+ import url from "node:url";
26
23
  import express from "express";
27
24
  import getPort from "get-port";
28
25
  import { HttpsProxyAgent } from "https-proxy-agent";
@@ -234,6 +231,7 @@ var CLIENT_ID = process.env.CLIENT_ID || process.env.API_USER || "flow-cli";
234
231
  var CLIENT_SECRET = process.env.CLIENT_SECRET || process.env.API_KEY;
235
232
  var REALM = process.env.REALM;
236
233
  var BUFFER = 120;
234
+ var __dirname = path2.dirname(url.fileURLToPath(import.meta.url));
237
235
  var viewsPath = path2.join(__dirname, "views");
238
236
  var server = null;
239
237
  nconf.file({ file: path2.join(__dirname, "config") });
@@ -350,8 +348,11 @@ function checkEnvironment(values) {
350
348
  }
351
349
 
352
350
  // lib/flow-cli/src/main.ts
351
+ var require2 = createRequire(import.meta.url);
353
352
  var BASE_URL2 = process.env.BASE_URL || process.env.PLATFORM_URL;
354
353
  var BUILD_DIR = process.env.BUILD_DIR || "dist";
354
+ var __filename = url2.fileURLToPath(import.meta.url);
355
+ var __dirname2 = path3.dirname(__filename);
355
356
  var axios = Axios.create();
356
357
  if (process.env.https_proxy || process.env.http_proxy) {
357
358
  const httpsAgent = new HttpsProxyAgent2(process.env.https_proxy || process.env.http_proxy);
@@ -359,7 +360,7 @@ if (process.env.https_proxy || process.env.http_proxy) {
359
360
  }
360
361
  var apiToken;
361
362
  var projectsRoot = "modules";
362
- var packageJson = JSON.parse(fs2.readFileSync(path3.join(__dirname, "..", "package.json")).toString());
363
+ var packageJson = JSON.parse(fs2.readFileSync(path3.join(__dirname2, "package.json")).toString());
363
364
  var CMD = {
364
365
  AUDIT: "audit",
365
366
  BUILD: "build",
@@ -803,7 +804,7 @@ async function publishModule(project, baseUrl = BASE_URL2) {
803
804
  });
804
805
  }
805
806
  async function validateModule(project) {
806
- const module = __require(project.dist);
807
+ const module = require2(project.dist);
807
808
  const moduleName = Reflect.getMetadata("module:name", module.default);
808
809
  const moduleDeclarations = Reflect.getMetadata("module:declarations", module.default);
809
810
  const functionFqns = [];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hahnpro/flow-cli",
3
- "version": "2025.10.1",
3
+ "version": "2025.10.3",
4
4
  "description": "CLI for managing Flow Modules",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -21,12 +21,12 @@
21
21
  "dependencies": {
22
22
  "@types/nconf": "0.10.7",
23
23
  "archiver": "7.0.1",
24
- "axios": "1.12.2",
24
+ "axios": "1.13.1",
25
25
  "chalk": "5.6.2",
26
26
  "class-transformer": "0.5.1",
27
27
  "class-validator": "0.14.2",
28
28
  "class-validator-jsonschema": "5.1.0",
29
- "commander": "14.0.1",
29
+ "commander": "14.0.2",
30
30
  "copyfiles": "2.4.1",
31
31
  "dotenv": "17.2.3",
32
32
  "ejs": "3.1.10",