@contentauth/c2pa-node 0.7.0 → 0.8.0

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/Cargo.toml CHANGED
@@ -30,7 +30,7 @@ reqwest = { version = "0.12.2", default-features = false, features = [
30
30
  ] }
31
31
  serde = { version = "1.0.203", features = ["derive"] }
32
32
  serde_bytes = "0.11.15"
33
- serde_json = "1.0.145"
33
+ serde_json = "1.0.150"
34
34
  toml = "0.8"
35
35
  thiserror = "1.0.61"
36
36
  tokio = { version = "1.43.0", features = ["rt-multi-thread"] }
package/dist/index.node CHANGED
Binary file
package/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "url": "git+https://github.com/contentauth/c2pa-js.git",
6
6
  "directory": "packages/c2pa-node"
7
7
  },
8
- "version": "0.7.0",
8
+ "version": "0.8.0",
9
9
  "description": "Node.js bindings for C2PA",
10
10
  "main": "dist/index.js",
11
11
  "type": "module",
@@ -25,6 +25,10 @@ const { promisify } = require('node:util');
25
25
  const pExec = promisify(exec);
26
26
 
27
27
  async function isInPnpmWorkspace(startDir) {
28
+ if (startDir.split(path.sep).includes('node_modules')) {
29
+ return false;
30
+ }
31
+
28
32
  let dir = path.dirname(startDir);
29
33
  while (true) {
30
34
  const parent = path.dirname(dir);
@@ -324,11 +324,17 @@ impl NeonBuilder {
324
324
  let promise = cx
325
325
  .task(move || {
326
326
  let source_stream = source.into_read_stream()?;
327
- let builder = if let Some(context) = context_opt {
327
+ let mut builder = if let Some(context) = context_opt {
328
328
  Builder::from_context(context).with_archive(source_stream)?
329
329
  } else {
330
330
  Builder::default().with_archive(source_stream)?
331
331
  };
332
+ // The ARCHIVE_METADATA assertion is merely working-store bookkeeping
333
+ // used to reconstruct a builder from an archive.
334
+ builder
335
+ .definition
336
+ .assertions
337
+ .retain(|a| a.label != c2pa::assertions::labels::ARCHIVE_METADATA);
332
338
  Ok(builder)
333
339
  })
334
340
  .promise(