@squidcloud/cli 1.0.451 → 1.0.453

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
@@ -32401,6 +32401,8 @@ async function startPython() {
32401
32401
  // Resolve local-backend path (realpathSync handles symlinks from npm link)
32402
32402
  const modulePath = await (0, resolve_1.findModulePath)('@squidcloud/local-backend');
32403
32403
  let localBackendDir;
32404
+ // This Dev Mode is referring to running using the internal codebase's CLI, as a Squid engineer.
32405
+ // It is NOT referring to Squid local development.
32404
32406
  const isDevMode = __filename.endsWith('.ts');
32405
32407
  if (isDevMode) {
32406
32408
  localBackendDir = path_1.default.resolve(__dirname, '../../local-backend');
@@ -32412,17 +32414,24 @@ async function startPython() {
32412
32414
  else {
32413
32415
  (0, process_utils_1.exitWithError)(validate_1.INVALID_PROJECT_ERROR);
32414
32416
  }
32415
- const tsconfigPath = path_1.default.resolve(localBackendDir, 'tsconfig.json');
32416
32417
  const mainPath = isDevMode ? path_1.default.resolve(localBackendDir, 'src/main.ts') : path_1.default.resolve(localBackendDir, 'main.js');
32417
32418
  // Python requirements are installed by the local-backend process (with --target for isolation).
32418
32419
  // No global pip install needed here.
32419
32420
  const envVars = {
32420
32421
  SQUID_BACKEND_PATH: backendPath,
32421
- TS_NODE_PROJECT: tsconfigPath,
32422
32422
  };
32423
32423
  try {
32424
32424
  await fs.access(mainPath);
32425
- await (0, shell_runner_1.runInShell)(`npx nodemon --watch ./src --watch ./.env --ignore __python_deps__ --ext py,ts,js,json --quiet --exec node -r ts-node/register -r tsconfig-paths/register "${mainPath}"`, true, backendPath, envVars);
32425
+ if (isDevMode) {
32426
+ // Dev mode: run TypeScript source with ts-node
32427
+ const tsconfigPath = path_1.default.resolve(localBackendDir, 'tsconfig.json');
32428
+ envVars['TS_NODE_PROJECT'] = tsconfigPath;
32429
+ await (0, shell_runner_1.runInShell)(`npx nodemon --watch ./src --watch ./.env --ignore __python_deps__ --ext py,ts,js,json --quiet --exec node -r ts-node/register -r tsconfig-paths/register "${mainPath}"`, true, backendPath, envVars);
32430
+ }
32431
+ else {
32432
+ // Published package: main.js is already compiled, no ts-node needed
32433
+ await (0, shell_runner_1.runInShell)(`npx nodemon --watch ./src --watch ./.env --ignore __python_deps__ --ext py,ts,js,json --quiet --exec node "${mainPath}"`, true, backendPath, envVars);
32434
+ }
32426
32435
  }
32427
32436
  catch (_) {
32428
32437
  (0, process_utils_1.exitWithError)(validate_1.INVALID_PROJECT_ERROR);
@@ -37337,7 +37346,7 @@ module.exports = /*#__PURE__*/JSON.parse('{"name":"seek-bzip","version":"1.0.6",
37337
37346
  (module) {
37338
37347
 
37339
37348
  "use strict";
37340
- module.exports = /*#__PURE__*/JSON.parse('{"name":"@squidcloud/cli","version":"1.0.451","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.451","adm-zip":"^0.5.16","copy-webpack-plugin":"^12.0.2","decompress":"^4.2.1","logpipes":"^1.11.0","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"}}');
37349
+ module.exports = /*#__PURE__*/JSON.parse('{"name":"@squidcloud/cli","version":"1.0.453","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.453","adm-zip":"^0.5.16","copy-webpack-plugin":"^12.0.2","decompress":"^4.2.1","logpipes":"^1.11.0","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"}}');
37341
37350
 
37342
37351
  /***/ }
37343
37352
 
@@ -84,8 +84,8 @@ const docRef = collection.doc({ id1: 'part1' }); // id2 generated on insert
84
84
  ## CRUD Operations
85
85
 
86
86
  ```typescript
87
- // Insert
88
- await userDoc.insert({ name: 'John', email: 'john@example.com' });
87
+ // Upsert (insert or update if the document already exists)
88
+ await userDoc.upsert({ name: 'John', email: 'john@example.com' });
89
89
 
90
90
  // Update (partial)
91
91
  await userDoc.update({ name: 'Jane' });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@squidcloud/cli",
3
- "version": "1.0.451",
3
+ "version": "1.0.453",
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.451",
31
+ "@squidcloud/local-backend": "^1.0.453",
32
32
  "adm-zip": "^0.5.16",
33
33
  "copy-webpack-plugin": "^12.0.2",
34
34
  "decompress": "^4.2.1",