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

@aws-amplify/amplify-appsync-simulator

Package Overview
Dependencies
Maintainers
10
Versions
255
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@aws-amplify/amplify-appsync-simulator - npm Package Compare versions

Comparing version 2.6.2 to 2.7.0-beta.0

lib/velocity/util/elasticsearch-helper.d.ts

4

lib/data-loader/opensearch/index.d.ts
import { AmplifyAppSyncSimulatorDataLoader } from '..';
export declare class OpenSearchDataLoader implements AmplifyAppSyncSimulatorDataLoader {
load(request: any): any;
private _config;
constructor(_config: any);
load(payload: any, extraData: any): Promise<any>;
}
//# sourceMappingURL=index.d.ts.map
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.OpenSearchDataLoader = void 0;
const amplify_cli_core_1 = require("amplify-cli-core");
const amplify_prompts_1 = require("amplify-prompts");
class OpenSearchDataLoader {
load(request) {
console.error('@searchable mocking is not supported.');
return null;
constructor(_config) {
this._config = _config;
}
async load(payload, extraData) {
var _a;
try {
if ((_a = process === null || process === void 0 ? void 0 : process.platform) === null || _a === void 0 ? void 0 : _a.startsWith('win')) {
return null;
}
return await this._config.invoke(payload);
}
catch (e) {
amplify_prompts_1.printer.info('Opensearch Data source failed with the following error:' + (e === null || e === void 0 ? void 0 : e.message));
throw new amplify_cli_core_1.AmplifyFault('MockProcessFault', {
message: 'Failed to load data from Opensearch data source',
link: amplify_cli_core_1.AMPLIFY_SUPPORT_DOCS.CLI_GRAPHQL_TROUBLESHOOTING.url
}, e);
}
}
}
exports.OpenSearchDataLoader = OpenSearchDataLoader;
//# sourceMappingURL=index.js.map

@@ -19,3 +19,3 @@ export declare const generalUtils: {

isNull(value: any): boolean;
isNullOrEmpty(value: any): boolean;
isNullOrEmpty(value: any): any;
isNullOrBlank(value: any): any;

@@ -22,0 +22,0 @@ defaultIfNull(value: any, defaultValue?: string): any;

@@ -13,2 +13,4 @@ "use strict";

const map_1 = require("../value-mapper/map");
const integer_1 = require("../value-mapper/integer");
const decimal_1 = require("../value-mapper/decimal");
exports.generalUtils = {

@@ -85,2 +87,8 @@ errors: [],

}
if (value instanceof integer_1.JavaInteger) {
return this.isNull(value === null || value === void 0 ? void 0 : value.value);
}
if (value instanceof decimal_1.JavaDecimal) {
return this.isNull(value === null || value === void 0 ? void 0 : value.value);
}
return !!value;

@@ -87,0 +95,0 @@ },

@@ -55,2 +55,3 @@ export { TemplateSentError, Unauthorized, ValidateError } from './errors';

toDynamoDBFilterExpression: (filter: any) => string;
toElasticsearchQueryDSL: (filter: any) => string;
};

@@ -109,3 +110,3 @@ now: Date;

isNull(value: any): boolean;
isNullOrEmpty(value: any): boolean;
isNullOrEmpty(value: any): any;
isNullOrBlank(value: any): any;

@@ -112,0 +113,0 @@ defaultIfNull(value: any, defaultValue?: string): any;

export declare const transformUtils: {
toDynamoDBConditionExpression: (condition: any) => string;
toDynamoDBFilterExpression: (filter: any) => string;
toElasticsearchQueryDSL: (filter: any) => string;
};
//# sourceMappingURL=index.d.ts.map
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.transformUtils = void 0;
const dynamodb_filter_1 = require("./dynamodb-filter");
const elasticsearch_helper_1 = __importDefault(require("../elasticsearch-helper"));
const amplify_prompts_1 = require("amplify-prompts");
exports.transformUtils = {

@@ -21,3 +26,17 @@ toDynamoDBConditionExpression: condition => {

},
toElasticsearchQueryDSL: filter => {
const elasticsearchHelper = new elasticsearch_helper_1.default();
if (!filter) {
return null;
}
try {
const queryDSL = elasticsearchHelper.getQueryDSL(filter.toJSON());
return JSON.stringify(queryDSL);
}
catch (err) {
amplify_prompts_1.printer.error("Error when constructing the Elasticsearch Query DSL using the model transform utils. {}");
return null;
}
}
};
//# sourceMappingURL=index.js.map
{
"name": "@aws-amplify/amplify-appsync-simulator",
"version": "2.6.2",
"version": "2.7.0-beta.0",
"description": "An AppSync Simulator to test AppSync API.",

@@ -34,4 +34,6 @@ "repository": {

"@graphql-tools/utils": "^8.5.1",
"amplify-cli-core": "4.0.0-beta.0",
"amplify-prompts": "2.6.2-beta.0",
"amplify-velocity-template": "1.4.8",
"aws-sdk": "^2.1169.0",
"aws-sdk": "^2.1233.0",
"chalk": "^4.1.1",

@@ -59,3 +61,3 @@ "cors": "^2.8.5",

"devDependencies": {
"@aws-amplify/amplify-graphiql-explorer": "2.5.0",
"@aws-amplify/amplify-graphiql-explorer": "2.5.2-beta.0",
"@types/cors": "^2.8.6",

@@ -88,3 +90,3 @@ "@types/express": "^4.17.3",

},
"gitHead": "c4f1e5f3b3dc4e92ccc4561610fa00beac7b3a1f"
"gitHead": "435d9a4301fde0ea13358e7c1608a895955f84a1"
}
{
"files": {
"main.css": "/static/css/main.46c28e48.css",
"main.js": "/static/js/main.8d09b04f.js",
"static/js/329.f683e17c.chunk.js": "/static/js/329.f683e17c.chunk.js",
"main.css": "/static/css/main.e5e5286c.css",
"main.js": "/static/js/main.fc84a3d4.js",
"static/js/921.7ccc0c31.chunk.js": "/static/js/921.7ccc0c31.chunk.js",
"static/media/brand-icons.svg": "/static/media/brand-icons.6729d29753e000c17489.svg",

@@ -23,10 +23,10 @@ "static/media/icons.svg": "/static/media/icons.62d9dae4e0040e81c980.svg",

"index.html": "/index.html",
"main.46c28e48.css.map": "/static/css/main.46c28e48.css.map",
"main.8d09b04f.js.map": "/static/js/main.8d09b04f.js.map",
"329.f683e17c.chunk.js.map": "/static/js/329.f683e17c.chunk.js.map"
"main.e5e5286c.css.map": "/static/css/main.e5e5286c.css.map",
"main.fc84a3d4.js.map": "/static/js/main.fc84a3d4.js.map",
"921.7ccc0c31.chunk.js.map": "/static/js/921.7ccc0c31.chunk.js.map"
},
"entrypoints": [
"static/css/main.46c28e48.css",
"static/js/main.8d09b04f.js"
"static/css/main.e5e5286c.css",
"static/js/main.fc84a3d4.js"
]
}

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

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

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