Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@dfinity/assets

Package Overview
Dependencies
Maintainers
0
Versions
44
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@dfinity/assets - npm Package Compare versions

Comparing version 2.1.0 to 2.1.1

3

lib/cjs/canisters/assets_idl.js

@@ -8,5 +8,7 @@ "use strict";

const Key = IDL.Text;
const HeaderField = IDL.Tuple(IDL.Text, IDL.Text);
const CreateAssetArguments = IDL.Record({
key: Key,
content_type: IDL.Text,
headers: IDL.Opt(IDL.Vec(HeaderField)),
});

@@ -32,3 +34,2 @@ const UnsetAssetContentArguments = IDL.Record({

});
const HeaderField = IDL.Tuple(IDL.Text, IDL.Text);
const HttpRequest = IDL.Record({

@@ -35,0 +36,0 @@ url: IDL.Text,

@@ -19,2 +19,3 @@ import type { Principal } from '@dfinity/principal';

content_type: string;
headers: [] | [Array<HeaderField>];
}

@@ -21,0 +22,0 @@ export interface DeleteAssetArguments {

@@ -36,2 +36,7 @@ import { ActorConfig, ActorSubclass } from '@dfinity/agent';

/**
* Custom headers to be sent with the asset
* @default []
*/
headers?: Array<[string, string]>;
/**
* Content encoding

@@ -38,0 +43,0 @@ * @default 'identity'

@@ -215,5 +215,6 @@ "use strict";

await readable.close();
const headers = (config === null || config === void 0 ? void 0 : config.headers) ? [config.headers] : [];
return [
{
CreateAsset: { key, content_type: (_a = config === null || config === void 0 ? void 0 : config.contentType) !== null && _a !== void 0 ? _a : readable.contentType },
CreateAsset: { key, content_type: (_a = config === null || config === void 0 ? void 0 : config.contentType) !== null && _a !== void 0 ? _a : readable.contentType, headers },
},

@@ -220,0 +221,0 @@ {

@@ -5,5 +5,7 @@ export const idlFactory = ({ IDL }) => {

const Key = IDL.Text;
const HeaderField = IDL.Tuple(IDL.Text, IDL.Text);
const CreateAssetArguments = IDL.Record({
key: Key,
content_type: IDL.Text,
headers: IDL.Opt(IDL.Vec(HeaderField)),
});

@@ -29,3 +31,2 @@ const UnsetAssetContentArguments = IDL.Record({

});
const HeaderField = IDL.Tuple(IDL.Text, IDL.Text);
const HttpRequest = IDL.Record({

@@ -32,0 +33,0 @@ url: IDL.Text,

@@ -19,2 +19,3 @@ import type { Principal } from '@dfinity/principal';

content_type: string;
headers: [] | [Array<HeaderField>];
}

@@ -21,0 +22,0 @@ export interface DeleteAssetArguments {

@@ -36,2 +36,7 @@ import { ActorConfig, ActorSubclass } from '@dfinity/agent';

/**
* Custom headers to be sent with the asset
* @default []
*/
headers?: Array<[string, string]>;
/**
* Content encoding

@@ -38,0 +43,0 @@ * @default 'identity'

@@ -185,5 +185,6 @@ var __rest = (this && this.__rest) || function (s, e) {

await readable.close();
const headers = (config === null || config === void 0 ? void 0 : config.headers) ? [config.headers] : [];
return [
{
CreateAsset: { key, content_type: (_a = config === null || config === void 0 ? void 0 : config.contentType) !== null && _a !== void 0 ? _a : readable.contentType },
CreateAsset: { key, content_type: (_a = config === null || config === void 0 ? void 0 : config.contentType) !== null && _a !== void 0 ? _a : readable.contentType, headers },
},

@@ -190,0 +191,0 @@ {

{
"name": "@dfinity/assets",
"version": "2.1.0",
"version": "2.1.1",
"author": "DFINITY Stiftung <sdk@dfinity.org>",

@@ -52,4 +52,4 @@ "license": "Apache-2.0",

"peerDependencies": {
"@dfinity/agent": "^2.1.0",
"@dfinity/principal": "^2.1.0",
"@dfinity/agent": "^2.1.1",
"@dfinity/principal": "^2.1.1",
"@noble/hashes": "^1.3.1"

@@ -56,0 +56,0 @@ },

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc