🚀 Socket Launch Week Day 5:Introducing Repository Access Permissions and Custom Roles.Learn more
Sign In

@uniformdev/assets

Package Overview
Dependencies
Maintainers
8
Versions
722
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@uniformdev/assets - npm Package Compare versions

Comparing version
20.50.2-alpha.149
to
20.50.2-alpha.167
+24
-2
dist/index.esm.js

@@ -19,4 +19,18 @@ // src/AssetClient.ts

}
async upsert(options) {
/**
* Fetches a list of assets
*/
async list(options = {}) {
const { projectId } = this.options;
const { filters, ...params } = options;
const rewrittenFilters = rewriteFiltersForApi(filters);
const fetchUri = this.createUrl(ASSET_BASE_PATH, {
...params,
projectId,
...rewrittenFilters
});
return this.apiClient(fetchUri);
}
async save(options) {
const { projectId } = this.options;
const fetchUri = this.createUrl(ASSET_BASE_PATH);

@@ -29,3 +43,7 @@ await this.apiClient(fetchUri, {

}
async delete(options) {
/** @deprecated Use {@link save} instead. */
async upsert(options) {
return this.save(options);
}
async remove(options) {
const { projectId } = this.options;

@@ -39,2 +57,6 @@ const fetchUri = this.createUrl(ASSET_BASE_PATH);

}
/** @deprecated Use {@link remove} instead. */
async delete(options) {
return this.remove(options);
}
};

@@ -41,0 +63,0 @@ var UncachedAssetClient = class extends AssetClient {

@@ -21,4 +21,4 @@ "use strict";

// src/index.ts
var src_exports = {};
__export(src_exports, {
var index_exports = {};
__export(index_exports, {
AssetClient: () => AssetClient,

@@ -31,3 +31,3 @@ UncachedAssetClient: () => UncachedAssetClient,

});
module.exports = __toCommonJS(src_exports);
module.exports = __toCommonJS(index_exports);

@@ -52,4 +52,18 @@ // src/AssetClient.ts

}
async upsert(options) {
/**
* Fetches a list of assets
*/
async list(options = {}) {
const { projectId } = this.options;
const { filters, ...params } = options;
const rewrittenFilters = (0, import_api.rewriteFiltersForApi)(filters);
const fetchUri = this.createUrl(ASSET_BASE_PATH, {
...params,
projectId,
...rewrittenFilters
});
return this.apiClient(fetchUri);
}
async save(options) {
const { projectId } = this.options;
const fetchUri = this.createUrl(ASSET_BASE_PATH);

@@ -62,3 +76,7 @@ await this.apiClient(fetchUri, {

}
async delete(options) {
/** @deprecated Use {@link save} instead. */
async upsert(options) {
return this.save(options);
}
async remove(options) {
const { projectId } = this.options;

@@ -72,2 +90,6 @@ const fetchUri = this.createUrl(ASSET_BASE_PATH);

}
/** @deprecated Use {@link remove} instead. */
async delete(options) {
return this.remove(options);
}
};

@@ -74,0 +96,0 @@ var UncachedAssetClient = class extends AssetClient {

@@ -19,4 +19,18 @@ // src/AssetClient.ts

}
async upsert(options) {
/**
* Fetches a list of assets
*/
async list(options = {}) {
const { projectId } = this.options;
const { filters, ...params } = options;
const rewrittenFilters = rewriteFiltersForApi(filters);
const fetchUri = this.createUrl(ASSET_BASE_PATH, {
...params,
projectId,
...rewrittenFilters
});
return this.apiClient(fetchUri);
}
async save(options) {
const { projectId } = this.options;
const fetchUri = this.createUrl(ASSET_BASE_PATH);

@@ -29,3 +43,7 @@ await this.apiClient(fetchUri, {

}
async delete(options) {
/** @deprecated Use {@link save} instead. */
async upsert(options) {
return this.save(options);
}
async remove(options) {
const { projectId } = this.options;

@@ -39,2 +57,6 @@ const fetchUri = this.createUrl(ASSET_BASE_PATH);

}
/** @deprecated Use {@link remove} instead. */
async delete(options) {
return this.remove(options);
}
};

@@ -41,0 +63,0 @@ var UncachedAssetClient = class extends AssetClient {

+4
-4
{
"name": "@uniformdev/assets",
"version": "20.50.2-alpha.149+913f0b7b57",
"version": "20.50.2-alpha.167+74e60d5bb7",
"description": "Uniform Assets",

@@ -39,4 +39,4 @@ "license": "SEE LICENSE IN LICENSE.txt",

"dependencies": {
"@uniformdev/context": "20.50.2-alpha.149+913f0b7b57",
"@uniformdev/files": "20.50.2-alpha.149+913f0b7b57"
"@uniformdev/context": "20.50.2-alpha.167+74e60d5bb7",
"@uniformdev/files": "20.50.2-alpha.167+74e60d5bb7"
},

@@ -46,3 +46,3 @@ "devDependencies": {

},
"gitHead": "913f0b7b57295ca79575810663c56a7a5deea9e4"
"gitHead": "74e60d5bb79fe1c4d446e4d3e6edf9f08850be4f"
}

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display