@donezone/cli 0.1.32 → 0.1.35

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.
Binary file
Binary file
Binary file
package/dist/index.js CHANGED
@@ -27318,6 +27318,23 @@ import { createHash } from "node:crypto";
27318
27318
  import { readFileSync, existsSync } from "node:fs";
27319
27319
  import { fileURLToPath } from "node:url";
27320
27320
  import { resolve } from "node:path";
27321
+ function resolveArtifactsDir() {
27322
+ const override = process.env.DONE_ARTIFACTS_DIR;
27323
+ const moduleDir = fileURLToPath(new URL("./", import.meta.url));
27324
+ const candidates = [
27325
+ override ? resolve(override) : null,
27326
+ resolve(moduleDir, "../artifacts"),
27327
+ resolve(moduleDir, "../../artifacts"),
27328
+ resolve(moduleDir, "../../../artifacts"),
27329
+ resolve(process.cwd(), "artifacts")
27330
+ ].filter(Boolean);
27331
+ for (const dir of candidates) {
27332
+ if (existsSync(dir)) {
27333
+ return dir;
27334
+ }
27335
+ }
27336
+ throw new Error(`Artifact directory not found. Checked: ${candidates.join(", ")}`);
27337
+ }
27321
27338
  function readArtifactFromDisk(name) {
27322
27339
  const filename = ARTIFACT_FILES[name];
27323
27340
  const artifactPath = resolve(ARTIFACTS_DIR, filename);
@@ -27339,7 +27356,7 @@ var ARTIFACT_FILES = {
27339
27356
  done_auth_router: "done_auth_router.wasm",
27340
27357
  done_sock_puppet: "done_sock_puppet.wasm"
27341
27358
  };
27342
- var ARTIFACTS_DIR = resolve(fileURLToPath(new URL("../../../", import.meta.url)), "artifacts");
27359
+ var ARTIFACTS_DIR = resolveArtifactsDir();
27343
27360
  var cache = new Map;
27344
27361
 
27345
27362
  // ../done-local-chain/src/batteries.ts
@@ -30927,8 +30944,9 @@ function FromArray7(schema, references, value) {
30927
30944
  if (IsDefined(schema.maxItems) && !(value.length <= schema.maxItems)) {
30928
30945
  return false;
30929
30946
  }
30930
- if (!value.every((value2) => Visit5(schema.items, references, value2))) {
30931
- return false;
30947
+ for (const element of value) {
30948
+ if (!Visit5(schema.items, references, element))
30949
+ return false;
30932
30950
  }
30933
30951
  if (schema.uniqueItems === true && !function() {
30934
30952
  const set = new Set;
@@ -34101,7 +34119,7 @@ var TypeCompiler;
34101
34119
  if (IsNumber2(schema.minItems))
34102
34120
  yield `${value}.length >= ${schema.minItems}`;
34103
34121
  const elementExpression = CreateExpression(schema.items, references, "value");
34104
- yield `${value}.every((${parameter}) => ${elementExpression})`;
34122
+ yield `((array) => { for(const ${parameter} of array) if(!(${elementExpression})) { return false }; return true; })(${value})`;
34105
34123
  if (IsSchema2(schema.contains) || IsNumber2(schema.minContains) || IsNumber2(schema.maxContains)) {
34106
34124
  const containsSchema = IsSchema2(schema.contains) ? schema.contains : Never();
34107
34125
  const checkExpression = CreateExpression(containsSchema, references, "value");
package/package.json CHANGED
@@ -1,16 +1,18 @@
1
1
  {
2
2
  "name": "@donezone/cli",
3
- "version": "0.1.32",
3
+ "version": "0.1.35",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "bin": {
7
7
  "done": "dist/index.js"
8
8
  },
9
9
  "files": [
10
- "dist"
10
+ "dist",
11
+ "artifacts"
11
12
  ],
12
13
  "scripts": {
13
- "prebuild": "bun run build:deps",
14
+ "prebuild": "bun run copy-artifacts && bun run build:deps",
15
+ "copy-artifacts": "node ./scripts/copy-artifacts.mjs",
14
16
  "build:deps": "bun run --cwd ../done-local-chain build && bun run --cwd ../done-events-local build",
15
17
  "build": "mkdir -p dist && bun build ./src/index.ts --target node --external fsevents --outfile dist/index.js && chmod +x dist/index.js",
16
18
  "typecheck": "tsc -p tsconfig.json --noEmit",