Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ jobs:
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- run: npm i
- run: npm i --no-save aws-sdk@^2
- run: npm i --no-save @aws-sdk/client-lambda@^3 @aws-sdk/client-cloudformation@^3 @aws-sdk/client-dynamodb@^3 @aws-sdk/client-firehose@^3 @aws-sdk/client-kinesis@^3 @aws-sdk/client-s3@^3 @aws-sdk/client-secrets-manager@^3 @aws-sdk/client-sts@^3 @aws-sdk/credential-providers@^3 @aws-sdk/lib-dynamodb@^3 @aws-sdk/lib-storage@^3 @aws-sdk/node-http-handler@^3
- run: npm i --no-save @aws-sdk/client-lambda@^3 @aws-sdk/client-cloudformation@^3 @aws-sdk/client-dynamodb@^3 @aws-sdk/client-firehose@^3 @aws-sdk/client-kinesis@^3 @aws-sdk/client-s3@^3 @aws-sdk/client-secrets-manager@^3 @aws-sdk/client-sts@^3 @aws-sdk/credential-providers@^3 @aws-sdk/lib-dynamodb@^3 @aws-sdk/lib-storage@^3 @aws-sdk/types
- run: npm i
- run: npm run compile --if-present
- run: npm run coverage-all --if-present
- uses: actions/upload-artifact@v3
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ jobs:
with:
node-version: 16
registry-url: https://registry.npmjs.org/
- run: npm ci
- run: npm i --no-save aws-sdk@^2
- run: npm i --no-save @aws-sdk/client-lambda@^3 @aws-sdk/client-cloudformation@^3 @aws-sdk/client-dynamodb@^3 @aws-sdk/client-firehose@^3 @aws-sdk/client-kinesis@^3 @aws-sdk/client-s3@^3 @aws-sdk/client-secrets-manager@^3 @aws-sdk/client-sts@^3 @aws-sdk/credential-providers@^3 @aws-sdk/lib-dynamodb@^3 @aws-sdk/lib-storage@^3 @aws-sdk/node-http-handler@^3
- run: npm i --no-save @aws-sdk/client-lambda@^3 @aws-sdk/client-cloudformation@^3 @aws-sdk/client-dynamodb@^3 @aws-sdk/client-firehose@^3 @aws-sdk/client-kinesis@^3 @aws-sdk/client-s3@^3 @aws-sdk/client-secrets-manager@^3 @aws-sdk/client-sts@^3 @aws-sdk/credential-providers@^3 @aws-sdk/lib-dynamodb@^3 @aws-sdk/lib-storage@^3 @aws-sdk/types
- run: npm ci
- run: npm run compile --if-present
- run: npm run coverage-all

Expand Down
2 changes: 1 addition & 1 deletion index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import { Kinesis, KinesisClientConfig } from "@aws-sdk/client-kinesis";
import { Firehose, FirehoseClientConfig } from "@aws-sdk/client-firehose";
import { CloudFormation } from "@aws-sdk/client-cloudformation";
import { DynamoDBClientConfig } from "@aws-sdk/client-dynamodb";
import { NodeHttpHandlerOptions } from "@aws-sdk/node-http-handler";
import { NodeHttpHandlerOptions } from "@smithy/node-http-handler";
import https from "https";
export * from "./lib/types";

Expand Down
2 changes: 1 addition & 1 deletion lib/DynamodbFetcher.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { BatchOptions, JoinExternalFetcher } from "./types";
import { promisify } from "util";
import { DynamoDBClient } from "@aws-sdk/client-dynamodb";
import { BatchGetCommandInput, DynamoDBDocument } from "@aws-sdk/lib-dynamodb";
import { NodeHttpHandler } from '@aws-sdk/node-http-handler';
import { NodeHttpHandler } from '@smithy/node-http-handler';
export class DynamodbFetcher<T, R> implements JoinExternalFetcher<T, R> {
tableName: string;
ddb: DynamoDBDocument;
Expand Down
2 changes: 1 addition & 1 deletion lib/dynamodb.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
const { promisify } = require("util");
const { DynamoDBClient } = require("@aws-sdk/client-dynamodb");
const { DynamoDBDocument } = require("@aws-sdk/lib-dynamodb");
const { NodeHttpHandler } = require('@aws-sdk/node-http-handler');
const { NodeHttpHandler } = require('@smithy/node-http-handler');

var https = require("https");
let extend = require("extend");
Expand Down
13 changes: 9 additions & 4 deletions lib/stream/helper/parser-util.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/* eslint-disable @typescript-eslint/ban-ts-comment */
import { FastJson } from "fast-json";
import { Node } from "fast-json/dist/Node";
import { FastJsonOptions } from "fast-json/dist/types";

export interface FastJsonEvent {
__unparsed_value__: string;
Expand All @@ -26,9 +27,14 @@ export interface FastJsonEnhanced extends FastJson {
}

// Overriding a private function to add isString feature.
//@ts-ignore
export class FastJsonPlus extends FastJson implements FastJsonEnhanced {

constructor(opts?: FastJsonOptions) {
super(opts);

// Override the private function with our own local wrapper
this["emitPrimitiveOrString"] = this._emitPrimitiveOrString;
}
currentObj: any;
isLastPrimitiveAString: boolean = false;
parse(input: string) {
Expand Down Expand Up @@ -76,10 +82,9 @@ export class FastJsonPlus extends FastJson implements FastJsonEnhanced {
}

// Override private function to determine if the last permitive is a string or not
emitPrimitiveOrString(data, start, end) {
private _emitPrimitiveOrString(data, start, end) {
this.isLastPrimitiveAString = data[start - 1] == '"' && data[end] == '"';
// @ts-ignore
return super.emitPrimitiveOrString(data, start, end);
return super["emitPrimitiveOrString"](data, start, end);
}
}

Expand Down
2 changes: 1 addition & 1 deletion lib/stream/leo-stream.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const { Kinesis } = require("@aws-sdk/client-kinesis");
const { Firehose } = require("@aws-sdk/client-firehose");
const { S3 } = require("@aws-sdk/client-s3");
const { Upload } = require("@aws-sdk/lib-storage");
const { NodeHttpHandler } = require('@aws-sdk/node-http-handler');
const { NodeHttpHandler } = require('@smithy/node-http-handler');

var https = require("https");
var PassThrough = require('stream').PassThrough;
Expand Down
2 changes: 1 addition & 1 deletion lib/streams.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ var zlib = require("zlib");
var fastCsv = require("fast-csv");
var write = require("./flushwrite.js");
const { S3 } = require("@aws-sdk/client-s3");
const { NodeHttpHandler } = require('@aws-sdk/node-http-handler');
const { NodeHttpHandler } = require('@smithy/node-http-handler');

var https = require("https");
var PassThrough = require('stream').PassThrough;
Expand Down
Loading
Loading