@mcpher/gas-fakes 1.2.12 → 1.2.13

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/README.RU.md CHANGED
@@ -358,4 +358,9 @@ const getParentsIterator = ({
358
358
  - [How to allow access to sensitive scopes with Application Default Credentials](https://ramblings.mcpher.com/how-to-allow-access-to-sensitive-scopes-with-application-default-credentials/)
359
359
  - [Supercharge Your Google Apps Script Caching with GasFlexCache](https://ramblings.mcpher.com/supercharge-your-google-apps-script-caching-with-gasflexcache/)
360
360
  - [Fake-Sandbox for Google Apps Script: Granular controls.](https://ramblings.mcpher.com/fake-sandbox-for-google-apps-script-granular-controls/)
361
- - [A Fake-Sandbox for Google Apps Script: Securely Executing Code Generated by Gemini CLI](https://ramblings.mcpher.com/gas-fakes-sandbox/)
361
+ - [A Fake-Sandbox for Google Apps Script: Securely Executing Code Generated by Gemini CLI](https://ramblings.mcpher.com/gas-fakes-sandbox/)
362
+ - [Bridging the Gap: Seamless Integration for Local Google Apps Script Development](https://medium.com/@tanaike/bridging-the-gap-seamless-integration-for-local-google-apps-script-development-9b9b973aeb02)
363
+ - [Next-Level Google Apps Script Development](https://medium.com/google-cloud/next-level-google-apps-script-development-654be5153912)
364
+ - [Secure and Streamlined Google Apps Script Development with gas-fakes CLI and Gemini CLI Extension](https://medium.com/google-cloud/secure-and-streamlined-google-apps-script-development-with-gas-fakes-cli-and-gemini-cli-extension-67bbce80e2c8)
365
+ - [Secure and Conversational Google Workspace Automation: Integrating Gemini CLI with a gas-fakes MCP Server](https://medium.com/google-cloud/secure-and-conversational-google-workspace-automation-integrating-gemini-cli-with-a-gas-fakes-mcp-0a5341559865)
366
+ - [A Fake-Sandbox for Google Apps Script: A Feasibility Study on Securely Executing Code Generated by Gemini CL](https://medium.com/google-cloud/a-fake-sandbox-for-google-apps-script-a-feasibility-study-on-securely-executing-code-generated-by-cc985ce5dae3)
package/README.md CHANGED
@@ -177,4 +177,9 @@ As I mentioned earlier, to take this further, I'm going to need a lot of help to
177
177
  - [How to allow access to sensitive scopes with Application Default Credentials](https://ramblings.mcpher.com/how-to-allow-access-to-sensitive-scopes-with-application-default-credentials/)
178
178
  - [Supercharge Your Google Apps Script Caching with GasFlexCache](https://ramblings.mcpher.com/supercharge-your-google-apps-script-caching-with-gasflexcache/)
179
179
  - [Fake-Sandbox for Google Apps Script: Granular controls.](https://ramblings.mcpher.com/fake-sandbox-for-google-apps-script-granular-controls/)
180
- - [A Fake-Sandbox for Google Apps Script: Securely Executing Code Generated by Gemini CLI](https://ramblings.mcpher.com/gas-fakes-sandbox/)
180
+ - [A Fake-Sandbox for Google Apps Script: Securely Executing Code Generated by Gemini CLI](https://ramblings.mcpher.com/gas-fakes-sandbox/)
181
+ - [Bridging the Gap: Seamless Integration for Local Google Apps Script Development](https://medium.com/@tanaike/bridging-the-gap-seamless-integration-for-local-google-apps-script-development-9b9b973aeb02)
182
+ - [Next-Level Google Apps Script Development](https://medium.com/google-cloud/next-level-google-apps-script-development-654be5153912)
183
+ - [Secure and Streamlined Google Apps Script Development with gas-fakes CLI and Gemini CLI Extension](https://medium.com/google-cloud/secure-and-streamlined-google-apps-script-development-with-gas-fakes-cli-and-gemini-cli-extension-67bbce80e2c8)
184
+ - [Secure and Conversational Google Workspace Automation: Integrating Gemini CLI with a gas-fakes MCP Server](https://medium.com/google-cloud/secure-and-conversational-google-workspace-automation-integrating-gemini-cli-with-a-gas-fakes-mcp-0a5341559865)
185
+ - [A Fake-Sandbox for Google Apps Script: A Feasibility Study on Securely Executing Code Generated by Gemini CL](https://medium.com/google-cloud/a-fake-sandbox-for-google-apps-script-a-feasibility-study-on-securely-executing-code-generated-by-cc985ce5dae3)
package/exgcp.sh CHANGED
@@ -20,7 +20,7 @@ fi
20
20
  GCP_PROJECT_ID_VALUE=$(grep -E '^GCP_PROJECT_ID=' "$ENV_FILE" | cut -d '=' -f2 | tr -d '"\r')
21
21
  GEMINI_API_KEY_VALUE=$(grep -E '^GEMINI_API_KEY=' "$ENV_FILE" | cut -d '=' -f2 | tr -d '"\r')
22
22
  GEMINI_MODEL_VALUE=$(grep -E '^GEMINI_MODEL=' "$ENV_FILE" | cut -d '=' -f2 | tr -d '"\r')
23
-
23
+ OMDB_API_KEY_VALUE=$(grep -E '^OMDB_API_KEY=' "$ENV_FILE" | cut -d '=' -f2 | tr -d '"\r')
24
24
  # Check if a value was extracted
25
25
  if [ -z "$GCP_PROJECT_ID_VALUE" ]; then
26
26
  echo "Error: GCP_PROJECT_ID not found or is empty in $ENV_FILE."
@@ -34,6 +34,13 @@ else
34
34
  export GEMINI_API_KEY="$GEMINI_API_KEY_VALUE"
35
35
  fi
36
36
 
37
+ if [ -z "OMDB_API_KEY_VALUE" ]; then
38
+ echo "OMDB_API_KEY not found or is empty in $ENV_FILE."
39
+ else
40
+ echo "exported: OMDB_API_KEY"
41
+ export OMDB_API_KEY="$OMDB_API_KEY_VALUE"
42
+ fi
43
+
37
44
  if [ -z "GEMINI_MODEL_VALUE" ]; then
38
45
  echo "GEMINI_MODEL not found or is empty in $ENV_FILE."
39
46
  else
package/gas-fakes.js CHANGED
@@ -15,16 +15,16 @@ import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js"
15
15
  import { z } from "zod";
16
16
 
17
17
  // sync the version with gas fakes code since they share a package.json
18
- import { createRequire } from 'node:module';
18
+ import { createRequire } from "node:module";
19
19
  const require = createRequire(import.meta.url);
20
- const pjson = require('./package.json');
20
+ const pjson = require("./package.json");
21
21
  const VERSION = pjson.version;
22
22
 
23
23
  // -----------------------------------------------------------------------------
24
24
  // CONSTANTS & UTILITIES
25
25
  // -----------------------------------------------------------------------------
26
26
 
27
- const CLI_VERSION = "0.0.7";
27
+ const CLI_VERSION = "0.0.8";
28
28
  const MCP_VERSION = "0.0.3";
29
29
  const execAsync = promisify(exec);
30
30
 
@@ -186,7 +186,11 @@ async function executeGasScript(options) {
186
186
  args,
187
187
  } = options;
188
188
 
189
- const scriptText = filename ? fs.readFileSync(filename, "utf8") : script;
189
+ let scriptText = filename ? fs.readFileSync(filename, "utf8") : script;
190
+
191
+ if (scriptText) {
192
+ scriptText = scriptText.replace(/\\\s*?\n/g, "\n");
193
+ }
190
194
 
191
195
  const { mainScript, gasScript } = generateExecutionScript({
192
196
  scriptText: normalizeScriptNewlines(scriptText),
@@ -487,7 +491,10 @@ async function main() {
487
491
  if (options.args) {
488
492
  try {
489
493
  args = JSON.parse(
490
- options.args.replace(/\n/g, "\\n").replace(/\r/g, "\\r")
494
+ options.args
495
+ .replace(/\\\s*?\n/g, "\\n")
496
+ .replace(/\n/g, "\\n")
497
+ .replace(/\r/g, "\\r")
491
498
  );
492
499
  } catch (err) {
493
500
  console.error("Error: Invalid JSON provided to --args option.");
package/package.json CHANGED
@@ -37,7 +37,7 @@
37
37
  },
38
38
  "name": "@mcpher/gas-fakes",
39
39
  "author": "bruce mcpherson",
40
- "version": "1.2.12",
40
+ "version": "1.2.13",
41
41
  "license": "MIT",
42
42
  "main": "main.js",
43
43
  "description": "A proof of concept implementation of Apps Script Environment on Node",