@isomorph.ai/cli 0.2.2-rc.1 → 0.2.2

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.
@@ -1 +1 @@
1
- export const CLI_VERSION = "0.2.2-rc.1";
1
+ export const CLI_VERSION = "0.2.2";
@@ -118,7 +118,11 @@ function safeSourcePath(path) {
118
118
  function toBytes(value) { return typeof value === "string" ? new TextEncoder().encode(value) : value; }
119
119
  function bytesToBase64(bytes) { return Buffer.from(bytes).toString("base64"); }
120
120
  function base64ToBytes(value) {
121
- if (!/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(value))
121
+ // Length-multiple-of-four plus a single character class: the same language as
122
+ // the padded-quartet grammar, checked without a quantified group. V8 backtracks
123
+ // per quartet of a grouped quantifier, so the grammar form overflowed the stack
124
+ // on any file over ~3 MB (a 42 MB SQLite file shipped inside an app package).
125
+ if (value.length % 4 !== 0 || !/^[A-Za-z0-9+/]*={0,2}$/.test(value))
122
126
  throw new Error("SOURCE_ARCHIVE_INVALID: file is not valid base64.");
123
127
  return new Uint8Array(Buffer.from(value, "base64"));
124
128
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@isomorph.ai/cli",
3
- "version": "0.2.2-rc.1",
3
+ "version": "0.2.2",
4
4
  "description": "Isomorph development kit CLI",
5
5
  "type": "module",
6
6
  "bin": {