@squidcloud/cli 1.0.468 → 1.0.470

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/index.js +50 -8
  2. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -31687,7 +31687,7 @@ module.exports = function toBuffer(data, encoding) {
31687
31687
  "use strict";
31688
31688
 
31689
31689
  Object.defineProperty(exports, "__esModule", ({ value: true }));
31690
- exports.OPEN_AI_CREATE_SPEECH_FORMATS = exports.AI_AUDIO_CREATE_SPEECH_MODEL_NAMES = exports.AI_AUDIO_TRANSCRIPTION_MODEL_NAMES = exports.AI_IMAGE_MODEL_NAMES = exports.FLUX_MODEL_NAMES = exports.STABLE_DIFFUSION_MODEL_NAMES = exports.OPENAI_AUDIO_MODEL_NAMES = exports.OPENAI_AUDIO_CREATE_SPEECH_MODEL_NAMES = exports.OPENAI_AUDIO_TRANSCRIPTION_MODEL_NAMES = exports.OPENAI_IMAGE_MODEL_NAMES = exports.AI_EMBEDDINGS_MODEL_NAMES = exports.BEDROCK_EMBEDDING_MODEL_NAMES = exports.VOYAGE_EMBEDDING_MODEL_NAMES = exports.OPENAI_EMBEDDINGS_MODEL_NAMES = exports.VENDOR_AI_CHAT_MODEL_NAMES = exports.ANTHROPIC_CHAT_MODEL_NAMES = exports.GROK_CHAT_MODEL_NAMES = exports.GEMINI_CHAT_MODEL_NAMES = exports.OPENAI_CHAT_MODEL_NAMES = exports.AI_PROVIDER_TYPES = exports.RERANK_PROVIDERS = void 0;
31690
+ exports.AI_MODEL_SOURCES = exports.OPEN_AI_CREATE_SPEECH_FORMATS = exports.AI_AUDIO_CREATE_SPEECH_MODEL_NAMES = exports.AI_AUDIO_TRANSCRIPTION_MODEL_NAMES = exports.AI_IMAGE_MODEL_NAMES = exports.FLUX_MODEL_NAMES = exports.STABLE_DIFFUSION_MODEL_NAMES = exports.OPENAI_AUDIO_MODEL_NAMES = exports.OPENAI_AUDIO_CREATE_SPEECH_MODEL_NAMES = exports.OPENAI_AUDIO_TRANSCRIPTION_MODEL_NAMES = exports.OPENAI_IMAGE_MODEL_NAMES = exports.AI_EMBEDDINGS_MODEL_NAMES = exports.BEDROCK_EMBEDDING_MODEL_NAMES = exports.VOYAGE_EMBEDDING_MODEL_NAMES = exports.OPENAI_EMBEDDINGS_MODEL_NAMES = exports.VENDOR_AI_CHAT_MODEL_NAMES = exports.ANTHROPIC_CHAT_MODEL_NAMES = exports.GROK_CHAT_MODEL_NAMES = exports.GEMINI_CHAT_MODEL_NAMES = exports.OPENAI_CHAT_MODEL_NAMES = exports.AI_PROVIDER_TYPES = exports.RERANK_PROVIDERS = void 0;
31691
31691
  exports.isVendorAiChatModelName = isVendorAiChatModelName;
31692
31692
  exports.isAiEmbeddingsModelName = isAiEmbeddingsModelName;
31693
31693
  exports.isIntegrationEmbeddingModelSpec = isIntegrationEmbeddingModelSpec;
@@ -31701,6 +31701,7 @@ exports.AI_PROVIDER_TYPES = [
31701
31701
  'anthropic',
31702
31702
  'bedrock',
31703
31703
  'claude-code',
31704
+ 'codex',
31704
31705
  'cohere',
31705
31706
  'flux',
31706
31707
  'gemini',
@@ -31844,6 +31845,11 @@ exports.AI_AUDIO_CREATE_SPEECH_MODEL_NAMES = [...exports.OPENAI_AUDIO_CREATE_SPE
31844
31845
  * @category AI
31845
31846
  */
31846
31847
  exports.OPEN_AI_CREATE_SPEECH_FORMATS = ['mp3', 'opus', 'aac', 'flac', 'wav', 'pcm'];
31848
+ /**
31849
+ * Where a chat model offered to an app comes from. See {@link ModelIdSpec.source}.
31850
+ * @category AI
31851
+ */
31852
+ exports.AI_MODEL_SOURCES = ['vendor', 'connector', 'custom'];
31847
31853
  /**
31848
31854
  * Type guard to check if a model selection is integration-based.
31849
31855
  * @category AI
@@ -32442,6 +32448,7 @@ function getLogPrefixString() {
32442
32448
 
32443
32449
  Object.defineProperty(exports, "__esModule", ({ value: true }));
32444
32450
  exports.KOTLIN_CONTROLLERS = void 0;
32451
+ exports.isKotlinPath = isKotlinPath;
32445
32452
  exports.getEnvironmentPrefix = getEnvironmentPrefix;
32446
32453
  exports.getApplicationUrl = getApplicationUrl;
32447
32454
  exports.KOTLIN_CONTROLLERS = [
@@ -32452,10 +32459,25 @@ exports.KOTLIN_CONTROLLERS = [
32452
32459
  'native-query',
32453
32460
  'query',
32454
32461
  'queue',
32455
- 'secret',
32456
- 'ws',
32457
32462
  'notification',
32463
+ // Note: WebSocket routing is path-specific and handled separately in `isKotlinPath` below.
32464
+ // /ws/general, /ws/localdev → TypeScript core (port 8000)
32465
+ // /ws/squidlet → Kotlin core (port 8001) — internal RPC for SquidletService
32458
32466
  ];
32467
+ /**
32468
+ * Returns true if the given path is served by Kotlin core in local dev (port 8001).
32469
+ * Encodes the WebSocket split: `/ws/squidlet` stays on Kotlin while other `/ws/*` paths
32470
+ * (general, localdev) are owned by the TypeScript core after the migration.
32471
+ */
32472
+ function isKotlinPath(path) {
32473
+ const cleaned = path.replace(/^\/+/, '');
32474
+ const segments = cleaned.split('/');
32475
+ const first = segments[0] || '';
32476
+ if (first === 'ws') {
32477
+ return segments[1] === 'squidlet';
32478
+ }
32479
+ return exports.KOTLIN_CONTROLLERS.includes(first);
32480
+ }
32459
32481
  function getEnvironmentPrefix(shard, region, cloudId, stage) {
32460
32482
  if (region === 'local') {
32461
32483
  return 'local';
@@ -32479,7 +32501,17 @@ function getApplicationUrl(environmentPrefix, appId, path, appIdPlaceholder, env
32479
32501
  let port = '';
32480
32502
  if (isLocal(environmentPrefix)) {
32481
32503
  protocol = 'http';
32482
- port = exports.KOTLIN_CONTROLLERS.includes(path.replace(/^\//, '').split('/')[0] || '') || forceKotlin ? '8001' : '8000';
32504
+ port = forceKotlin || isKotlinPath(path) ? '8001' : '8000';
32505
+ // Test-only override for `/ws/general` during the WS migration. Lets e2e specs run the same
32506
+ // test body against both the Kotlin (8001) and TS (8000) WS servers via describe.each (see
32507
+ // squid-e2e WS_TARGETS pattern). Scoped to `/ws/general` so it cannot accidentally reroute
32508
+ // `/ws/squidlet` (Kotlin-only) or `/ws/localdev` (TS-only) during a test run.
32509
+ if (typeof process !== 'undefined') {
32510
+ const wsForcePort = forceKotlin ? undefined : process.env['SQUID_LOCAL_WS_FORCE_PORT'];
32511
+ if (wsForcePort && path.replace(/^\/+/, '').startsWith('ws/general')) {
32512
+ port = wsForcePort;
32513
+ }
32514
+ }
32483
32515
  if (isAndroid(environmentPrefix)) {
32484
32516
  host = '10.0.2.2';
32485
32517
  }
@@ -33845,8 +33877,14 @@ function run() {
33845
33877
  yargs_1.default.parse();
33846
33878
  }
33847
33879
  function setupStartCommand(yargs) {
33848
- yargs.command('start', 'Starts the local development server', () => void 0, async () => {
33849
- await (0, start_1.start)();
33880
+ yargs.command('start', 'Starts the local development server', yargs => {
33881
+ yargs.option('printBundle', {
33882
+ type: 'boolean',
33883
+ description: 'Print the full application bundle data on startup, not just the webhooks',
33884
+ default: false,
33885
+ });
33886
+ }, async (argv) => {
33887
+ await (0, start_1.start)({ printBundle: !!argv.printBundle });
33850
33888
  });
33851
33889
  }
33852
33890
  function setupDeployCommand(yargs) {
@@ -34325,9 +34363,13 @@ const logging_1 = __webpack_require__(443);
34325
34363
  const process_utils_1 = __webpack_require__(8251);
34326
34364
  const validate_1 = __webpack_require__(2246);
34327
34365
  const version_check_1 = __webpack_require__(4827);
34328
- async function start() {
34366
+ async function start(options = {}) {
34329
34367
  const projectInfo = await (0, validate_1.validateSquidProject)();
34330
34368
  const versionCheckPromise = (0, version_check_1.checkCliVersion)(cliPackageJson.version);
34369
+ // Propagate to the spawned local-backend process, which inherits process.env.
34370
+ if (options.printBundle) {
34371
+ process.env['SQUID_PRINT_BUNDLE'] = 'true';
34372
+ }
34331
34373
  console.log((0, logging_1.primary)('Please note:'), 'to debug your application, you need to run the "start" npm script in your IDE in debug mode');
34332
34374
  await (0, version_check_1.displayVersionWarningIfOutdated)(versionCheckPromise);
34333
34375
  (0, update_skills_1.displaySkillsWarningIfOutdated)();
@@ -39366,7 +39408,7 @@ module.exports = /*#__PURE__*/JSON.parse('{"name":"seek-bzip","version":"1.0.6",
39366
39408
  (module) {
39367
39409
 
39368
39410
  "use strict";
39369
- module.exports = /*#__PURE__*/JSON.parse('{"name":"@squidcloud/cli","version":"1.0.468","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.468","adm-zip":"^0.5.16","copy-webpack-plugin":"^14.0.0","decompress":"^4.2.1","logpipes":"^1.11.0","nodemon":"^3.1.9","terser-webpack-plugin":"^5.5.0","ts-loader":"^9.5.1","ts-node":"^10.9.2","tsconfig-paths":"^4.2.0","tsconfig-paths-webpack-plugin":"^4.1.0","webpack":"^5.106.2","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"}}');
39411
+ module.exports = /*#__PURE__*/JSON.parse('{"name":"@squidcloud/cli","version":"1.0.470","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.470","adm-zip":"^0.5.16","copy-webpack-plugin":"^14.0.0","decompress":"^4.2.1","logpipes":"^1.11.0","nodemon":"^3.1.9","terser-webpack-plugin":"^5.5.0","ts-loader":"^9.5.1","ts-node":"^10.9.2","tsconfig-paths":"^4.2.0","tsconfig-paths-webpack-plugin":"^4.1.0","webpack":"^5.106.2","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"}}');
39370
39412
 
39371
39413
  /***/ }
39372
39414
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@squidcloud/cli",
3
- "version": "1.0.468",
3
+ "version": "1.0.470",
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.468",
31
+ "@squidcloud/local-backend": "^1.0.470",
32
32
  "adm-zip": "^0.5.16",
33
33
  "copy-webpack-plugin": "^14.0.0",
34
34
  "decompress": "^4.2.1",