@squidcloud/cli 1.0.417 → 1.0.419

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/dist/index.js CHANGED
@@ -577,6 +577,13 @@ exports.requirePath = void 0;
577
577
  exports.findModulePath = findModulePath;
578
578
  const enhanced_resolve_1 = __importDefault(__webpack_require__(4506));
579
579
  const path_1 = __importDefault(__webpack_require__(6928));
580
+ /**
581
+ * Finds the resolved path of a given module by searching upward through directory tree.
582
+ *
583
+ * @param moduleName - The name of the module to find (e.g., '@squidcloud/local-backend')
584
+ * @param startDir - The directory to start searching from (defaults to process.cwd())
585
+ * @returns Promise resolving to the absolute path of the module, or null if not found
586
+ */
580
587
  async function findModulePath(moduleName, startDir = process.cwd()) {
581
588
  const directoriesToSearch = new Set([startDir, process.cwd(), __dirname]);
582
589
  // Try each directory in order
@@ -607,6 +614,12 @@ async function findModulePath(moduleName, startDir = process.cwd()) {
607
614
  }
608
615
  return null;
609
616
  }
617
+ /**
618
+ * Requires a module file, handling both Node.js and webpack environments.
619
+ *
620
+ * @param file - The path to the module file to require
621
+ * @returns The exported module content
622
+ */
610
623
  const requirePath = (file) => {
611
624
  return false ? 0 : require(file);
612
625
  };
@@ -2961,6 +2974,9 @@ class TsoaUtils {
2961
2974
  if (!supportsDefault && specName === 'default') {
2962
2975
  continue;
2963
2976
  }
2977
+ if (verbose) {
2978
+ console.log(`Processing config file: ${file}`);
2979
+ }
2964
2980
  // Use native join to create the folder.
2965
2981
  const outputDir = path.join('dist', specName);
2966
2982
  if (!fs.existsSync(outputDir)) {
@@ -2992,6 +3008,33 @@ class TsoaUtils {
2992
3008
  config.routes = config.routes || {};
2993
3009
  config.spec.outputDirectory = outputDir;
2994
3010
  config.routes.routesDir = outputDir;
3011
+ // Fix middlewareTemplate path when using fallback from local-backend
3012
+ if (config.routes.middlewareTemplate && !path.isAbsolute(file)) {
3013
+ const localBackendModule = await (0, resolve_1.findModulePath)('@squidcloud/local-backend');
3014
+ if (verbose) {
3015
+ console.log(`File being processed: ${file}`);
3016
+ console.log(`Local backend module: ${localBackendModule}`);
3017
+ console.log(`Original middlewareTemplate: ${config.routes.middlewareTemplate}`);
3018
+ }
3019
+ if (localBackendModule) {
3020
+ // Check if the file is from the local-backend package (it would contain node_modules/@squidcloud/local-backend)
3021
+ if (file.includes('@squidcloud/local-backend') && file.includes('tsoa.json')) {
3022
+ // Find package root (the module path points to index.js)
3023
+ // Example module path: .../node_modules/@squidcloud/local-backend/dist/local-backend/src/index.js
3024
+ // Next, we need to go up 4 levels (dist/local-backend/src/index.js) to reach: 'local-backend' root dir.
3025
+ const packageRoot = path.resolve(localBackendModule, '..', '..', '..', '..');
3026
+ // Rewrite the middlewareTemplate path to be relative to the current working directory.
3027
+ const templatePath = path.resolve(packageRoot, 'dist/local-backend/openapi-template.hbs');
3028
+ // Calculate relative path from current working directory (which might be backend/ or test-tsoa/backend/)
3029
+ config.routes.middlewareTemplate = path.relative(process.cwd(), templatePath);
3030
+ if (verbose) {
3031
+ console.log(`Rewritten middlewareTemplate path to: ${config.routes.middlewareTemplate}`);
3032
+ console.log(`Template absolute path: ${templatePath}`);
3033
+ console.log(`Package root: ${packageRoot}`);
3034
+ }
3035
+ }
3036
+ }
3037
+ }
2995
3038
  // Use a relative path for the temporary config file.
2996
3039
  const tempConfigPath = `temp-tsoa-config-${specName}.json`;
2997
3040
  try {
@@ -11394,6 +11437,7 @@ exports.CONNECTOR_IDS = [
11394
11437
  'salesforce',
11395
11438
  'servicenow',
11396
11439
  'slack',
11440
+ 'teams',
11397
11441
  'zendesk',
11398
11442
  ];
11399
11443
  /** A file inside a connector package that contains package metadata. */
@@ -14187,7 +14231,7 @@ function setupDeployCommand(yargs) {
14187
14231
  (0, process_utils_1.exitWithError)('Must provide an API key');
14188
14232
  const appRegion = geAppRegionFromCommandOrEnv(argv.region);
14189
14233
  const consoleRegion = geConsoleRegionFromCommandOrEnv(argv.consoleRegion) || getConsoleRegionFromAppRegion(appRegion);
14190
- (0, deploy_1.deploy)(consoleRegion, appId, bundlePath, apiKey, !!argv.verbose, argv.direct, isUserSpecifiedPath, !!argv.skipBuild, internalApiKey, environmentId).then();
14234
+ void (0, deploy_1.deploy)(consoleRegion, appId, bundlePath, apiKey, !!argv.verbose, argv.direct, isUserSpecifiedPath, !!argv.skipBuild, internalApiKey, environmentId);
14191
14235
  });
14192
14236
  }
14193
14237
  function setupUndeployCommand(yargs) {
@@ -14208,7 +14252,7 @@ function setupUndeployCommand(yargs) {
14208
14252
  const environmentId = getEnvironmentIdFromCommandOrEnv(argv.environmentId);
14209
14253
  const region = geAppRegionFromCommandOrEnv(undefined);
14210
14254
  const consoleRegion = geConsoleRegionFromCommandOrEnv(argv.consoleRegion) || getConsoleRegionFromAppRegion(region);
14211
- (0, undeploy_1.undeploy)(consoleRegion, appId, apiKey, environmentId).then();
14255
+ void (0, undeploy_1.undeploy)(consoleRegion, appId, apiKey, environmentId);
14212
14256
  });
14213
14257
  }
14214
14258
  function setupInitEnvCommand(yargs) {
@@ -23431,7 +23475,8 @@ exports.INTEGRATION_TYPES = [
23431
23475
  'mcp',
23432
23476
  'a2a',
23433
23477
  'legend',
23434
- 'ollama',
23478
+ 'teams',
23479
+ 'openai_compatible',
23435
23480
  ];
23436
23481
  /**
23437
23482
  * @category Database
@@ -25073,6 +25118,7 @@ exports.OPENAI_CHAT_MODEL_NAMES = [
25073
25118
  'gpt-5',
25074
25119
  'gpt-5-mini',
25075
25120
  'gpt-5-nano',
25121
+ 'gpt-5.1',
25076
25122
  'gpt-4.1',
25077
25123
  'gpt-4.1-mini',
25078
25124
  'gpt-4.1-nano',
@@ -30556,7 +30602,7 @@ function exitWithError(...messages) {
30556
30602
  /***/ ((module) => {
30557
30603
 
30558
30604
  "use strict";
30559
- module.exports = /*#__PURE__*/JSON.parse('{"name":"@squidcloud/cli","version":"1.0.417","description":"The Squid CLI","main":"dist/index.js","scripts":{"start":"node dist/index.js","start-ts":"ts-node -r tsconfig-paths/register src/index.ts","prebuild":"rimraf dist","build":"webpack --mode=production","build:dev":"webpack --mode=development","lint":"eslint","link":"npm run build && chmod 755 dist/index.js && npm link","watch":"webpack --watch","deploy":"npm run build && npm pack --silent | xargs -I {} mv {} package.tgz && npm install -g package.tgz && rm -rf package.tgz","publish:public":"npm run build && npm publish --access public"},"files":["dist/**/*"],"bin":{"squid":"dist/index.js"},"keywords":[],"author":"","license":"ISC","engines":{"node":">=18.0.0"},"dependencies":{"@squidcloud/local-backend":"^1.0.417","adm-zip":"^0.5.16","copy-webpack-plugin":"^12.0.2","decompress":"^4.2.1","nodemon":"^3.1.9","terser-webpack-plugin":"^5.3.10","ts-loader":"^9.5.1","ts-node":"^10.9.2","tsconfig-paths":"^4.2.0","tsconfig-paths-webpack-plugin":"^4.1.0","webpack":"^5.101.3","zip-webpack-plugin":"^4.0.1"},"devDependencies":{"@types/adm-zip":"^0.5.7","@types/decompress":"^4.2.7","@types/node":"^20.19.9","terminal-link":"^3.0.0"}}');
30605
+ module.exports = /*#__PURE__*/JSON.parse('{"name":"@squidcloud/cli","version":"1.0.419","description":"The Squid CLI","main":"dist/index.js","scripts":{"start":"node dist/index.js","start-ts":"ts-node -r tsconfig-paths/register src/index.ts","prebuild":"rimraf dist","build":"webpack --mode=production","build:dev":"webpack --mode=development","lint":"eslint","link":"npm run build && chmod 755 dist/index.js && npm link","watch":"webpack --watch","deploy":"npm run build && npm pack --silent | xargs -I {} mv {} package.tgz && npm install -g package.tgz && rm -rf package.tgz","publish:public":"npm run build && npm publish --access public"},"files":["dist/**/*"],"bin":{"squid":"dist/index.js"},"keywords":[],"author":"","license":"ISC","engines":{"node":">=18.0.0"},"dependencies":{"@squidcloud/local-backend":"^1.0.419","adm-zip":"^0.5.16","copy-webpack-plugin":"^12.0.2","decompress":"^4.2.1","nodemon":"^3.1.9","terser-webpack-plugin":"^5.3.10","ts-loader":"^9.5.1","ts-node":"^10.9.2","tsconfig-paths":"^4.2.0","tsconfig-paths-webpack-plugin":"^4.1.0","webpack":"^5.101.3","zip-webpack-plugin":"^4.0.1"},"devDependencies":{"@types/adm-zip":"^0.5.7","@types/decompress":"^4.2.7","@types/node":"^20.19.9","terminal-link":"^3.0.0"}}');
30560
30606
 
30561
30607
  /***/ }),
30562
30608
 
@@ -31038,7 +31084,7 @@ async function build({ verbose, dev, skipVersionCheck }) {
31038
31084
  }
31039
31085
  await fs_1.promises.mkdir(distPath);
31040
31086
  const isSquidConnector = (0, process_env_utils_1.isEnvVarTruthy)('SQUID_CONNECTOR');
31041
- const openApiSpecAndControllers = await tsoa_utils_1.TsoaUtils.generateAllSpecs(false, !isSquidConnector);
31087
+ const openApiSpecAndControllers = await tsoa_utils_1.TsoaUtils.generateAllSpecs(verbose, !isSquidConnector);
31042
31088
  await fs_1.promises.writeFile(path_1.default.join(distPath, '', 'openapi-spec-and-controllers.json'), JSON.stringify(openApiSpecAndControllers));
31043
31089
  const isUserConfigMode = fsSync.existsSync(resolve_2.USER_WEBPACK_CONFIG_PATH);
31044
31090
  const webpackConfigPath = isUserConfigMode ? resolve_2.USER_WEBPACK_CONFIG_PATH : resolve_2.BUILT_IN_WEBPACK_CONFIG_PATH;
@@ -1250,7 +1250,8 @@ const chatObs = agent.chat('What is your return policy?', {
1250
1250
  executionPlanOptions: {
1251
1251
  enabled: true, // Agent plans which resources to use
1252
1252
  model: 'gpt-4o',
1253
- reasoningEffort: 'high'
1253
+ reasoningEffort: 'high',
1254
+ allowClarificationQuestions: false // Allow agent to ask follow-up questions (default: false)
1254
1255
  },
1255
1256
  agentContext: { userId: '123', role: 'admin' }, // Global context passed to all functions
1256
1257
  includeMetadata: false // Include context metadata in response
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@squidcloud/cli",
3
- "version": "1.0.417",
3
+ "version": "1.0.419",
4
4
  "description": "The Squid CLI",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {
@@ -28,7 +28,7 @@
28
28
  "node": ">=18.0.0"
29
29
  },
30
30
  "dependencies": {
31
- "@squidcloud/local-backend": "^1.0.417",
31
+ "@squidcloud/local-backend": "^1.0.419",
32
32
  "adm-zip": "^0.5.16",
33
33
  "copy-webpack-plugin": "^12.0.2",
34
34
  "decompress": "^4.2.1",