@bitblit/ratchet-aws 4.0.354-alpha → 4.0.355-alpha
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/lib/index.mjs +1 -1
- package/lib/types.d.ts +815 -0
- package/package.json +6 -6
- package/lib/batch/aws-batch-background-processor.d.ts +0 -8
- package/lib/batch/aws-batch-background-processor.spec.d.ts +0 -1
- package/lib/batch/aws-batch-ratchet.d.ts +0 -13
- package/lib/batch/aws-batch-ratchet.spec.d.ts +0 -1
- package/lib/build/ratchet-aws-info.d.ts +0 -5
- package/lib/cache/dynamo-db-storage-provider.d.ts +0 -25
- package/lib/cache/s3-storage-provider.d.ts +0 -14
- package/lib/cache/simple-cache-object-wrapper.d.ts +0 -7
- package/lib/cache/simple-cache-read-options.d.ts +0 -5
- package/lib/cache/simple-cache-storage-provider.d.ts +0 -8
- package/lib/cache/simple-cache.d.ts +0 -14
- package/lib/cache/simple-cache.spec.d.ts +0 -1
- package/lib/cloudwatch/cloud-watch-log-group-ratchet.d.ts +0 -10
- package/lib/cloudwatch/cloud-watch-log-group-ratchet.spec.d.ts +0 -1
- package/lib/cloudwatch/cloud-watch-logs-ratchet.d.ts +0 -15
- package/lib/cloudwatch/cloud-watch-logs-ratchet.spec.d.ts +0 -1
- package/lib/cloudwatch/cloud-watch-metrics-ratchet.d.ts +0 -10
- package/lib/cloudwatch/cloud-watch-metrics-ratchet.spec.d.ts +0 -1
- package/lib/daemon/daemon-like.d.ts +0 -17
- package/lib/daemon/daemon-process-create-options.d.ts +0 -7
- package/lib/daemon/daemon-process-state-public-token.d.ts +0 -4
- package/lib/daemon/daemon-process-state.d.ts +0 -13
- package/lib/daemon/daemon-stream-data-options.d.ts +0 -5
- package/lib/daemon/daemon-util.d.ts +0 -19
- package/lib/daemon/daemon-util.spec.d.ts +0 -4
- package/lib/daemon/daemon.d.ts +0 -33
- package/lib/dao/prototype-dao-config.d.ts +0 -8
- package/lib/dao/prototype-dao-db.d.ts +0 -4
- package/lib/dao/prototype-dao-provider.d.ts +0 -5
- package/lib/dao/prototype-dao.d.ts +0 -15
- package/lib/dao/prototype-dao.spec.d.ts +0 -8
- package/lib/dao/s3-prototype-dao-provider.d.ts +0 -10
- package/lib/dao/s3-simple-dao.d.ts +0 -15
- package/lib/dao/simple-dao-item.d.ts +0 -5
- package/lib/dynamodb/dynamo-ratchet-like.d.ts +0 -25
- package/lib/dynamodb/dynamo-ratchet.d.ts +0 -34
- package/lib/dynamodb/dynamo-ratchet.spec.d.ts +0 -1
- package/lib/dynamodb/dynamo-table-ratchet.d.ts +0 -13
- package/lib/dynamodb/dynamo-table-ratchet.spec.d.ts +0 -1
- package/lib/dynamodb/hash-spreader.d.ts +0 -15
- package/lib/dynamodb/hash-spreader.spec.d.ts +0 -1
- package/lib/ec2/ec2-ratchet.d.ts +0 -16
- package/lib/ec2/ec2-ratchet.spec.d.ts +0 -1
- package/lib/ecr/ecr-unused-image-cleaner-options.d.ts +0 -7
- package/lib/ecr/ecr-unused-image-cleaner-output.d.ts +0 -7
- package/lib/ecr/ecr-unused-image-cleaner-repository-output.d.ts +0 -8
- package/lib/ecr/ecr-unused-image-cleaner.d.ts +0 -18
- package/lib/ecr/ecr-unused-image-cleaner.spec.d.ts +0 -1
- package/lib/ecr/retained-image-descriptor.d.ts +0 -6
- package/lib/ecr/retained-image-reason.d.ts +0 -4
- package/lib/ecr/used-image-finder.d.ts +0 -3
- package/lib/ecr/used-image-finders/aws-batch-used-image-finder.d.ts +0 -8
- package/lib/ecr/used-image-finders/lambda-used-image-finder.d.ts +0 -8
- package/lib/environment/cascade-environment-service-provider.d.ts +0 -6
- package/lib/environment/env-var-environment-service-provider.d.ts +0 -6
- package/lib/environment/environment-service-config.d.ts +0 -4
- package/lib/environment/environment-service-provider.d.ts +0 -3
- package/lib/environment/environment-service.d.ts +0 -11
- package/lib/environment/environment-service.spec.d.ts +0 -1
- package/lib/environment/fixed-environment-service-provider.d.ts +0 -7
- package/lib/environment/s3-environment-service-provider.d.ts +0 -15
- package/lib/environment/ssm-environment-service-provider.d.ts +0 -8
- package/lib/expiring-code/dynamo-expiring-code-provider.d.ts +0 -12
- package/lib/expiring-code/expiring-code-params.d.ts +0 -7
- package/lib/expiring-code/expiring-code-provider.d.ts +0 -5
- package/lib/expiring-code/expiring-code-ratchet.d.ts +0 -10
- package/lib/expiring-code/expiring-code-ratchet.spec.d.ts +0 -1
- package/lib/expiring-code/expiring-code.d.ts +0 -6
- package/lib/expiring-code/s3-expiring-code-provider.d.ts +0 -17
- package/lib/expiring-code/s3-expiring-code-provider.spec.d.ts +0 -1
- package/lib/iam/aws-credentials-ratchet.d.ts +0 -4
- package/lib/index.d.ts +0 -77
- package/lib/index.mjs.map +0 -1
- package/lib/lambda/lambda-event-detector.d.ts +0 -15
- package/lib/lambda/lambda-event-type-guards.d.ts +0 -11
- package/lib/model/cloud-watch-metrics-minute-level-dynamo-count-request.d.ts +0 -12
- package/lib/model/dynamo-count-result.d.ts +0 -5
- package/lib/route53/route-53-ratchet.d.ts +0 -8
- package/lib/runtime-parameter/cached-stored-runtime-parameter.d.ts +0 -4
- package/lib/runtime-parameter/dynamo-runtime-parameter-provider.d.ts +0 -11
- package/lib/runtime-parameter/dynamo-runtime-parameter-provider.spec.d.ts +0 -1
- package/lib/runtime-parameter/global-variable-override-runtime-parameter-provider.d.ts +0 -17
- package/lib/runtime-parameter/global-variable-override-runtime-parameter-provider.spec.d.ts +0 -1
- package/lib/runtime-parameter/memory-runtime-parameter-provider.d.ts +0 -9
- package/lib/runtime-parameter/runtime-parameter-provider.d.ts +0 -6
- package/lib/runtime-parameter/runtime-parameter-ratchet.d.ts +0 -15
- package/lib/runtime-parameter/runtime-parameter-ratchet.spec.d.ts +0 -1
- package/lib/runtime-parameter/stored-runtime-parameter.d.ts +0 -6
- package/lib/s3/expanded-file-children.d.ts +0 -5
- package/lib/s3/s3-cache-ratchet-like.d.ts +0 -26
- package/lib/s3/s3-cache-ratchet.d.ts +0 -35
- package/lib/s3/s3-cache-ratchet.spec.d.ts +0 -1
- package/lib/s3/s3-location-sync-ratchet.d.ts +0 -21
- package/lib/s3/s3-ratchet.d.ts +0 -5
- package/lib/s3/s3-ratchet.spec.d.ts +0 -1
- package/lib/ses/ses-mail-sending-provider.d.ts +0 -14
- package/lib/sns/sns-ratchet.d.ts +0 -9
- package/lib/sns/sns-ratchet.spec.d.ts +0 -1
- package/lib/sync-lock/dynamo-db-sync-lock.d.ts +0 -10
- package/lib/sync-lock/dynamo-db-sync-lock.spec.d.ts +0 -1
- package/lib/sync-lock/memory-sync-lock.d.ts +0 -8
- package/lib/sync-lock/sync-lock-provider.d.ts +0 -5
package/package.json
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bitblit/ratchet-aws",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.355-alpha",
|
|
4
4
|
"description": "Common tools for use with AWS browser and node",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"type": "module",
|
|
7
7
|
"module": "./lib/index.mjs",
|
|
8
|
-
"types": "./lib/
|
|
8
|
+
"types": "./lib/types.d.ts",
|
|
9
9
|
"files": [
|
|
10
10
|
"lib/**",
|
|
11
11
|
"bin/**"
|
|
12
12
|
],
|
|
13
13
|
"exports": {
|
|
14
14
|
".": {
|
|
15
|
-
"types": "./lib/
|
|
15
|
+
"types": "./lib/types.d.ts",
|
|
16
16
|
"import": "./lib/index.mjs"
|
|
17
17
|
}
|
|
18
18
|
},
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
},
|
|
53
53
|
"license": "Apache-2.0",
|
|
54
54
|
"dependencies": {
|
|
55
|
-
"@bitblit/ratchet-common": "4.0.
|
|
55
|
+
"@bitblit/ratchet-common": "4.0.355-alpha"
|
|
56
56
|
},
|
|
57
57
|
"optionalDependencies": {
|
|
58
58
|
"@aws-sdk/client-athena": "3.572.0",
|
|
@@ -98,7 +98,7 @@
|
|
|
98
98
|
"@aws-sdk/lib-storage": "^3.572.0",
|
|
99
99
|
"@aws-sdk/s3-request-presigner": "^3.572.0",
|
|
100
100
|
"@aws-sdk/types": "^3.535.0",
|
|
101
|
-
"@bitblit/ratchet-common": "4.0.
|
|
101
|
+
"@bitblit/ratchet-common": "4.0.355-alpha",
|
|
102
102
|
"@smithy/abort-controller": "^2.2.0",
|
|
103
103
|
"@smithy/smithy-client": "^2.5.1",
|
|
104
104
|
"@smithy/util-waiter": "^2.2.0"
|
|
@@ -172,7 +172,7 @@
|
|
|
172
172
|
}
|
|
173
173
|
},
|
|
174
174
|
"devDependencies": {
|
|
175
|
-
"@bitblit/ratchet-node-only": "4.0.
|
|
175
|
+
"@bitblit/ratchet-node-only": "4.0.355-alpha",
|
|
176
176
|
"@types/aws-lambda": "8.10.137",
|
|
177
177
|
"aws-sdk-client-mock": "4.0.0"
|
|
178
178
|
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { SubmitJobCommandOutput } from '@aws-sdk/client-batch';
|
|
2
|
-
import { AwsBatchRatchet } from './aws-batch-ratchet.js';
|
|
3
|
-
export declare class AwsBatchBackgroundProcessor {
|
|
4
|
-
private batchRatchet;
|
|
5
|
-
private validTaskNames?;
|
|
6
|
-
constructor(batchRatchet: AwsBatchRatchet, validTaskNames?: string[]);
|
|
7
|
-
scheduleBackgroundTask(taskName: string, data?: Record<string, any>, meta?: Record<string, any>): Promise<SubmitJobCommandOutput>;
|
|
8
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { BatchClient, JobStatus, JobSummary, SubmitJobCommandInput, SubmitJobCommandOutput } from '@aws-sdk/client-batch';
|
|
2
|
-
export declare class AwsBatchRatchet {
|
|
3
|
-
private _batchClient;
|
|
4
|
-
private _defaultQueueName?;
|
|
5
|
-
private _defaultJobDefinition?;
|
|
6
|
-
constructor(_batchClient: BatchClient, _defaultQueueName?: string, _defaultJobDefinition?: string);
|
|
7
|
-
get batchClient(): BatchClient;
|
|
8
|
-
get defaultQueueName(): string;
|
|
9
|
-
get defaultJobDefinition(): string;
|
|
10
|
-
scheduleJob(options: SubmitJobCommandInput): Promise<SubmitJobCommandOutput>;
|
|
11
|
-
jobCountInState(jobStatus: JobStatus, queueName?: string): Promise<number>;
|
|
12
|
-
listJobs(queueName?: string, jobStatus?: JobStatus): Promise<JobSummary[]>;
|
|
13
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { SimpleCacheObjectWrapper } from './simple-cache-object-wrapper.js';
|
|
2
|
-
import { SimpleCacheStorageProvider } from './simple-cache-storage-provider.js';
|
|
3
|
-
import { DynamoRatchet } from '../dynamodb/dynamo-ratchet.js';
|
|
4
|
-
export declare class DynamoDbStorageProvider implements SimpleCacheStorageProvider {
|
|
5
|
-
private dynamo;
|
|
6
|
-
private opts;
|
|
7
|
-
constructor(dynamo: DynamoRatchet, opts: DynamoDbSimpleCacheOptions);
|
|
8
|
-
static createDefaultOptions(): DynamoDbSimpleCacheOptions;
|
|
9
|
-
createKeyObject(cacheKey: string): any;
|
|
10
|
-
cleanDynamoFieldsFromObjectInPlace(rval: any): void;
|
|
11
|
-
extractKeysFromObject(rval: SimpleCacheObjectWrapper<any>): any;
|
|
12
|
-
readFromCache<T>(cacheKey: string): Promise<SimpleCacheObjectWrapper<T>>;
|
|
13
|
-
storeInCache<T>(value: SimpleCacheObjectWrapper<T>): Promise<boolean>;
|
|
14
|
-
removeFromCache(cacheKey: string): Promise<void>;
|
|
15
|
-
clearCache(): Promise<number>;
|
|
16
|
-
readAll(): Promise<SimpleCacheObjectWrapper<any>[]>;
|
|
17
|
-
}
|
|
18
|
-
export interface DynamoDbSimpleCacheOptions {
|
|
19
|
-
tableName: string;
|
|
20
|
-
useRangeKeys: boolean;
|
|
21
|
-
hashKeyName: string;
|
|
22
|
-
rangeKeyName?: string;
|
|
23
|
-
hashKeyValue?: string;
|
|
24
|
-
dynamoExpiresColumnName?: string;
|
|
25
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { SimpleCacheObjectWrapper } from './simple-cache-object-wrapper.js';
|
|
2
|
-
import { SimpleCacheStorageProvider } from './simple-cache-storage-provider.js';
|
|
3
|
-
import { S3CacheRatchetLike } from '../s3/s3-cache-ratchet-like.js';
|
|
4
|
-
export declare class S3StorageProvider implements SimpleCacheStorageProvider {
|
|
5
|
-
private s3CacheRatchet;
|
|
6
|
-
private prefix;
|
|
7
|
-
constructor(s3CacheRatchet: S3CacheRatchetLike, prefix: string);
|
|
8
|
-
keyToPath(cacheKey: string): string;
|
|
9
|
-
readFromCache<T>(cacheKey: string): Promise<SimpleCacheObjectWrapper<T>>;
|
|
10
|
-
storeInCache<T>(value: SimpleCacheObjectWrapper<T>): Promise<boolean>;
|
|
11
|
-
removeFromCache(cacheKey: string): Promise<void>;
|
|
12
|
-
clearCache(): Promise<number>;
|
|
13
|
-
readAll(): Promise<SimpleCacheObjectWrapper<any>[]>;
|
|
14
|
-
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { SimpleCacheObjectWrapper } from './simple-cache-object-wrapper.js';
|
|
2
|
-
export interface SimpleCacheStorageProvider {
|
|
3
|
-
readFromCache<T>(cacheKey: string): Promise<SimpleCacheObjectWrapper<T>>;
|
|
4
|
-
storeInCache<T>(value: SimpleCacheObjectWrapper<T>): Promise<boolean>;
|
|
5
|
-
removeFromCache(cacheKey: string): Promise<void>;
|
|
6
|
-
clearCache(): Promise<number>;
|
|
7
|
-
readAll(): Promise<SimpleCacheObjectWrapper<any>[]>;
|
|
8
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { SimpleCacheStorageProvider } from './simple-cache-storage-provider.js';
|
|
2
|
-
import { SimpleCacheObjectWrapper } from './simple-cache-object-wrapper.js';
|
|
3
|
-
import { SimpleCacheReadOptions } from './simple-cache-read-options.js';
|
|
4
|
-
export declare class SimpleCache {
|
|
5
|
-
private provider;
|
|
6
|
-
private defaultTimeToLiveMS;
|
|
7
|
-
constructor(provider: SimpleCacheStorageProvider, defaultTimeToLiveMS?: number);
|
|
8
|
-
createDefaultReadOptions(): SimpleCacheReadOptions;
|
|
9
|
-
fetchWrapper<T>(cacheKey: string, producer: () => Promise<T>, opts?: SimpleCacheReadOptions): Promise<SimpleCacheObjectWrapper<T>>;
|
|
10
|
-
fetch<T>(cacheKey: string, producer: () => Promise<T>, opts?: SimpleCacheReadOptions): Promise<T>;
|
|
11
|
-
removeFromCache<T>(cacheKey: string, returnOldValue?: boolean): Promise<SimpleCacheObjectWrapper<T>>;
|
|
12
|
-
clearCache(): Promise<number>;
|
|
13
|
-
readAll(): Promise<SimpleCacheObjectWrapper<any>[]>;
|
|
14
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { CloudWatchLogsClient, FilteredLogEvent, LogStream } from '@aws-sdk/client-cloudwatch-logs';
|
|
2
|
-
export declare class CloudWatchLogGroupRatchet {
|
|
3
|
-
private logGroup;
|
|
4
|
-
private awsCWLogs;
|
|
5
|
-
constructor(logGroup: string, awsCWLogs?: CloudWatchLogsClient);
|
|
6
|
-
get cloudWatchLogsClient(): CloudWatchLogsClient;
|
|
7
|
-
readLogStreams(startTimestamp?: number, endTimestamp?: number): Promise<LogStream[]>;
|
|
8
|
-
readLogStreamNames(startTimestamp?: number, endTimestamp?: number): Promise<string[]>;
|
|
9
|
-
readEvents(filter: string, startTimestamp?: number, endTimestamp?: number, sortEvents?: boolean, maxEvents?: number): Promise<FilteredLogEvent[]>;
|
|
10
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { CloudWatchLogsClient, GetQueryResultsCommandOutput, LogGroup, LogStream, StartQueryCommandInput, StopQueryCommandOutput } from '@aws-sdk/client-cloudwatch-logs';
|
|
2
|
-
export declare class CloudWatchLogsRatchet {
|
|
3
|
-
private static readonly MAX_DELETE_RETRIES;
|
|
4
|
-
private cwLogs;
|
|
5
|
-
constructor(cloudwatchLogs?: CloudWatchLogsClient);
|
|
6
|
-
get cloudWatchLogsClient(): CloudWatchLogsClient;
|
|
7
|
-
removeEmptyOrOldLogStreams(logGroupName: string, maxToRemove?: number, oldestEventEpochMS?: number): Promise<LogStream[]>;
|
|
8
|
-
findOldestEventTimestampInGroup(logGroupName: string): Promise<number>;
|
|
9
|
-
findStreamWithOldestEventInGroup(logGroupName: string): Promise<LogStream>;
|
|
10
|
-
findLogGroups(prefix: string): Promise<LogGroup[]>;
|
|
11
|
-
removeLogGroups(groups: LogGroup[]): Promise<boolean[]>;
|
|
12
|
-
removeLogGroupsWithPrefix(prefix: string): Promise<boolean[]>;
|
|
13
|
-
fullyExecuteInsightsQuery(sqr: StartQueryCommandInput): Promise<GetQueryResultsCommandOutput>;
|
|
14
|
-
abortInsightsQuery(queryId: string): Promise<StopQueryCommandOutput>;
|
|
15
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { CloudWatchClient, StandardUnit } from '@aws-sdk/client-cloudwatch';
|
|
2
|
-
import { KeyValue } from '@bitblit/ratchet-common';
|
|
3
|
-
import { CloudWatchMetricsMinuteLevelDynamoCountRequest } from '../model/cloud-watch-metrics-minute-level-dynamo-count-request.js';
|
|
4
|
-
export declare class CloudWatchMetricsRatchet {
|
|
5
|
-
private cw;
|
|
6
|
-
constructor(cloudWatch?: CloudWatchClient);
|
|
7
|
-
get cloudWatchClient(): CloudWatchClient;
|
|
8
|
-
writeSingleMetric(namespace: string, metric: string, dims: KeyValue<any>[], unit: StandardUnit, value: number, timestampDate?: Date, highResolution?: boolean): Promise<any>;
|
|
9
|
-
writeDynamoCountAsMinuteLevelMetric(req: CloudWatchMetricsMinuteLevelDynamoCountRequest): Promise<number>;
|
|
10
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
|
-
import { DaemonProcessState } from './daemon-process-state.js';
|
|
3
|
-
import { DaemonProcessCreateOptions } from './daemon-process-create-options.js';
|
|
4
|
-
export interface DaemonLike {
|
|
5
|
-
get defaultGroup(): string;
|
|
6
|
-
keyToPublicToken(key: string, expirationSeconds: number): Promise<string>;
|
|
7
|
-
start(options: DaemonProcessCreateOptions): Promise<DaemonProcessState>;
|
|
8
|
-
clean(group?: string, olderThanSeconds?: number): Promise<DaemonProcessState[]>;
|
|
9
|
-
listKeys(group?: string): Promise<string[]>;
|
|
10
|
-
list(group?: string): Promise<DaemonProcessState[]>;
|
|
11
|
-
updateMessage(id: string, newMessage: string): Promise<DaemonProcessState>;
|
|
12
|
-
statFromPublicToken(publicToken: string): Promise<DaemonProcessState>;
|
|
13
|
-
stat(key: string): Promise<DaemonProcessState>;
|
|
14
|
-
abort(id: string): Promise<DaemonProcessState>;
|
|
15
|
-
error(id: string, error: string): Promise<DaemonProcessState>;
|
|
16
|
-
finalize(id: string, contents: Buffer): Promise<DaemonProcessState>;
|
|
17
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
export interface DaemonProcessState {
|
|
2
|
-
id: string;
|
|
3
|
-
title: string;
|
|
4
|
-
targetFileName: string;
|
|
5
|
-
lastUpdatedEpochMS: number;
|
|
6
|
-
lastUpdatedMessage: string;
|
|
7
|
-
startedEpochMS: number;
|
|
8
|
-
completedEpochMS: number;
|
|
9
|
-
meta: any;
|
|
10
|
-
error: string;
|
|
11
|
-
link: string;
|
|
12
|
-
contentType: string;
|
|
13
|
-
}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
|
-
/// <reference types="node" />
|
|
3
|
-
import { DaemonProcessState } from './daemon-process-state.js';
|
|
4
|
-
import { DaemonProcessCreateOptions } from './daemon-process-create-options.js';
|
|
5
|
-
import { Readable } from 'stream';
|
|
6
|
-
import { S3CacheRatchetLike } from '../s3/s3-cache-ratchet-like.js';
|
|
7
|
-
import { DaemonStreamDataOptions } from './daemon-stream-data-options.js';
|
|
8
|
-
export declare class DaemonUtil {
|
|
9
|
-
static DEFAULT_CONTENT: Buffer;
|
|
10
|
-
static DAEMON_METADATA_KEY: string;
|
|
11
|
-
static start(cache: S3CacheRatchetLike, id: string, s3Key: string, options: DaemonProcessCreateOptions): Promise<DaemonProcessState>;
|
|
12
|
-
static writeState(cache: S3CacheRatchetLike, s3Key: string, newState: DaemonProcessState, contents: Uint8Array): Promise<DaemonProcessState>;
|
|
13
|
-
static streamDataAndFinish(cache: S3CacheRatchetLike, s3Key: string, data: Readable, options?: DaemonStreamDataOptions): Promise<DaemonProcessState>;
|
|
14
|
-
static updateMessage(cache: S3CacheRatchetLike, s3Key: string, newMessage: string): Promise<DaemonProcessState>;
|
|
15
|
-
static stat(s3Cache: S3CacheRatchetLike, path: string): Promise<DaemonProcessState>;
|
|
16
|
-
static abort(s3Cache: S3CacheRatchetLike, path: string): Promise<DaemonProcessState>;
|
|
17
|
-
static error(s3Cache: S3CacheRatchetLike, path: string, error: string): Promise<DaemonProcessState>;
|
|
18
|
-
static finalize(s3Cache: S3CacheRatchetLike, path: string, contents: Buffer): Promise<DaemonProcessState>;
|
|
19
|
-
}
|
package/lib/daemon/daemon.d.ts
DELETED
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
|
-
import { JwtRatchetLike } from '@bitblit/ratchet-common';
|
|
3
|
-
import { DaemonProcessState } from './daemon-process-state.js';
|
|
4
|
-
import { DaemonProcessCreateOptions } from './daemon-process-create-options.js';
|
|
5
|
-
import { DaemonLike } from './daemon-like.js';
|
|
6
|
-
import { S3Client } from '@aws-sdk/client-s3';
|
|
7
|
-
export declare class Daemon implements DaemonLike {
|
|
8
|
-
private s3;
|
|
9
|
-
private bucket;
|
|
10
|
-
private prefix;
|
|
11
|
-
private _defaultGroup;
|
|
12
|
-
private jwtRatchet?;
|
|
13
|
-
static DEFAULT_DEFAULT_GROUP: string;
|
|
14
|
-
private cache;
|
|
15
|
-
constructor(s3: S3Client, bucket: string, prefix?: string, _defaultGroup?: string, jwtRatchet?: JwtRatchetLike);
|
|
16
|
-
get defaultGroup(): string;
|
|
17
|
-
keyToPublicToken(key: string, expirationSeconds: number): Promise<string>;
|
|
18
|
-
private keyToPath;
|
|
19
|
-
private pathToKey;
|
|
20
|
-
private generatePath;
|
|
21
|
-
private generatePrefix;
|
|
22
|
-
start(options: DaemonProcessCreateOptions): Promise<DaemonProcessState>;
|
|
23
|
-
private writeState;
|
|
24
|
-
clean(group?: string, olderThanSeconds?: number): Promise<DaemonProcessState[]>;
|
|
25
|
-
listKeys(group?: string): Promise<string[]>;
|
|
26
|
-
list(group?: string): Promise<DaemonProcessState[]>;
|
|
27
|
-
updateMessage(id: string, newMessage: string): Promise<DaemonProcessState>;
|
|
28
|
-
stat(key: string): Promise<DaemonProcessState>;
|
|
29
|
-
statFromPublicToken(publicToken: string): Promise<DaemonProcessState>;
|
|
30
|
-
abort(id: string): Promise<DaemonProcessState>;
|
|
31
|
-
error(id: string, error: string): Promise<DaemonProcessState>;
|
|
32
|
-
finalize(id: string, contents: Buffer): Promise<DaemonProcessState>;
|
|
33
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { PrototypeDaoProvider } from './prototype-dao-provider.js';
|
|
2
|
-
import { PrototypeDaoConfig } from './prototype-dao-config.js';
|
|
3
|
-
export declare class PrototypeDao<T> {
|
|
4
|
-
private provider;
|
|
5
|
-
private cfg;
|
|
6
|
-
static defaultDaoConfig(): PrototypeDaoConfig;
|
|
7
|
-
constructor(provider: PrototypeDaoProvider<T>, cfg?: PrototypeDaoConfig);
|
|
8
|
-
fetchAll(): Promise<T[]>;
|
|
9
|
-
resetDatabase(): Promise<void>;
|
|
10
|
-
removeItems(guids: string[]): Promise<T[]>;
|
|
11
|
-
store(value: T): Promise<T>;
|
|
12
|
-
fetchById(guid: string): Promise<T>;
|
|
13
|
-
searchByField<R>(fieldDotPath: string, fieldValue: R): Promise<T[]>;
|
|
14
|
-
searchByFieldMap(input: Record<string, any>): Promise<T[]>;
|
|
15
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { PrototypeDaoProvider } from './prototype-dao-provider.js';
|
|
2
|
-
import { PrototypeDaoDb } from './prototype-dao-db.js';
|
|
3
|
-
import { S3CacheRatchetLike } from '../s3/s3-cache-ratchet-like.js';
|
|
4
|
-
export declare class S3PrototypeDaoProvider<T> implements PrototypeDaoProvider<T> {
|
|
5
|
-
private s3CacheRatchet;
|
|
6
|
-
private keyName;
|
|
7
|
-
constructor(s3CacheRatchet: S3CacheRatchetLike, keyName: string);
|
|
8
|
-
storeDatabase(inDb: PrototypeDaoDb<T>): Promise<boolean>;
|
|
9
|
-
loadDatabase(): Promise<PrototypeDaoDb<T>>;
|
|
10
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { SimpleDaoItem } from './simple-dao-item.js';
|
|
2
|
-
import { S3CacheRatchetLike } from '../s3/s3-cache-ratchet-like.js';
|
|
3
|
-
export declare class S3SimpleDao<T extends SimpleDaoItem> {
|
|
4
|
-
private cache;
|
|
5
|
-
private prefix?;
|
|
6
|
-
constructor(cache: S3CacheRatchetLike, prefix?: string);
|
|
7
|
-
buildPathPrefix(path: string): string;
|
|
8
|
-
buildFullPath(id: string, path?: string): string;
|
|
9
|
-
exists(id: string, path?: string): Promise<boolean>;
|
|
10
|
-
fetch(id: string, path?: string): Promise<T>;
|
|
11
|
-
store(item: T, path?: string): Promise<T>;
|
|
12
|
-
listItems(path?: string): Promise<string[]>;
|
|
13
|
-
fetchItemsInPath(path?: string): Promise<T[]>;
|
|
14
|
-
delete(id: string, path?: string): Promise<boolean>;
|
|
15
|
-
}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { DynamoCountResult } from '../model/dynamo-count-result.js';
|
|
2
|
-
import { DynamoDBDocumentClient } from '@aws-sdk/lib-dynamodb';
|
|
3
|
-
import { DeleteCommandOutput, PutCommandOutput, QueryCommandInput, ScanCommandInput } from '@aws-sdk/lib-dynamodb';
|
|
4
|
-
export interface DynamoRatchetLike {
|
|
5
|
-
getDDB(): DynamoDBDocumentClient;
|
|
6
|
-
tableIsEmpty(tableName: string): Promise<boolean>;
|
|
7
|
-
throughputSafeScanOrQuery<T, R>(proc: (T: any) => Promise<R>, input: T, maxTries?: number, inCurrentTry?: number): Promise<R>;
|
|
8
|
-
fullyExecuteQueryCount(qry: QueryCommandInput, delayMS?: number): Promise<DynamoCountResult>;
|
|
9
|
-
fullyExecuteQuery<T>(qry: QueryCommandInput, delayMS?: number, softLimit?: number): Promise<T[]>;
|
|
10
|
-
fullyExecuteProcessOverQuery<T>(qry: QueryCommandInput, proc: (val: T) => Promise<void>, delayMS?: number, softLimit?: number): Promise<number>;
|
|
11
|
-
fullyExecuteScanCount(scan: ScanCommandInput, delayMS?: number): Promise<DynamoCountResult>;
|
|
12
|
-
fullyExecuteScan<T>(scan: ScanCommandInput, delayMS?: number, softLimit?: number): Promise<T[]>;
|
|
13
|
-
fullyExecuteProcessOverScan<T>(scan: ScanCommandInput, proc: (val: T) => Promise<void>, delayMS?: number, softLimit?: number): Promise<number>;
|
|
14
|
-
writeAllInBatches<T>(tableName: string, elements: T[], batchSize: number): Promise<number>;
|
|
15
|
-
fetchFullObjectsMatchingKeysOnlyIndexQuery<T>(qry: QueryCommandInput, keyNames: string[], batchSize?: number): Promise<T[]>;
|
|
16
|
-
fetchAllInBatches<T>(tableName: string, inKeys: any[], batchSize: number): Promise<T[]>;
|
|
17
|
-
deleteAllInBatches(tableName: string, keys: any[], batchSize: number): Promise<number>;
|
|
18
|
-
simplePut(tableName: string, value: any, autoRetryCount?: number): Promise<PutCommandOutput>;
|
|
19
|
-
simplePutOnlyIfFieldIsNullOrUndefined(tableName: string, value: any, fieldName: string): Promise<boolean>;
|
|
20
|
-
simplePutWithCollisionAvoidance<T>(tableName: string, value: T, keyNames: string[], adjustFunction: (val: T) => T, maxAdjusts?: number, autoRetryCount?: number): Promise<T>;
|
|
21
|
-
simpleGet<T>(tableName: string, keys: any, autoRetryCount?: number): Promise<T>;
|
|
22
|
-
simpleGetWithCounterDecrement<T>(tableName: string, keys: any, counterAttributeName: string, deleteOnZero: boolean, autoRetryCount?: number): Promise<T>;
|
|
23
|
-
simpleDelete(tableName: string, keys: any): Promise<DeleteCommandOutput>;
|
|
24
|
-
atomicCounter(tableName: string, keys: any, counterFieldName: string, increment?: number): Promise<number>;
|
|
25
|
-
}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { DeleteCommandOutput, DynamoDBDocumentClient, PutCommandOutput, QueryCommandInput, QueryCommandOutput, ScanCommandInput, ScanCommandOutput } from '@aws-sdk/lib-dynamodb';
|
|
2
|
-
import { DynamoCountResult } from '../model/dynamo-count-result.js';
|
|
3
|
-
import { DynamoRatchetLike } from './dynamo-ratchet-like.js';
|
|
4
|
-
export declare class DynamoRatchet implements DynamoRatchetLike {
|
|
5
|
-
private awsDDB;
|
|
6
|
-
constructor(awsDDB: DynamoDBDocumentClient);
|
|
7
|
-
get dynamoDBDocumentClient(): DynamoDBDocumentClient;
|
|
8
|
-
getDDB(): DynamoDBDocumentClient;
|
|
9
|
-
tableIsEmpty(tableName: string): Promise<boolean>;
|
|
10
|
-
scanPromise(input: ScanCommandInput): Promise<ScanCommandOutput>;
|
|
11
|
-
queryPromise(input: QueryCommandInput): Promise<QueryCommandOutput>;
|
|
12
|
-
throughputSafeScanOrQuery<T, R>(proc: (T: any) => Promise<R>, input: T, maxTries?: number, inCurrentTry?: number): Promise<R>;
|
|
13
|
-
fullyExecuteQueryCount(qry: QueryCommandInput, delayMS?: number): Promise<DynamoCountResult>;
|
|
14
|
-
fullyExecuteQuery<T>(qry: QueryCommandInput, delayMS?: number, softLimit?: number): Promise<T[]>;
|
|
15
|
-
fullyExecuteProcessOverQuery<T>(qry: QueryCommandInput, proc: (val: T) => Promise<void>, delayMS?: number, softLimit?: number): Promise<number>;
|
|
16
|
-
fullyExecuteScanCount(scan: ScanCommandInput, delayMS?: number): Promise<DynamoCountResult>;
|
|
17
|
-
fullyExecuteScan<T>(scan: ScanCommandInput, delayMS?: number, softLimit?: number): Promise<T[]>;
|
|
18
|
-
fullyExecuteProcessOverScan<T>(scan: ScanCommandInput, proc: (val: T) => Promise<void>, delayMS?: number, softLimit?: number): Promise<number>;
|
|
19
|
-
writeAllInBatches<T>(tableName: string, elements: T[], batchSize: number): Promise<number>;
|
|
20
|
-
fetchFullObjectsMatchingKeysOnlyIndexQuery<T>(qry: QueryCommandInput, keyNames: string[], batchSize?: number): Promise<T[]>;
|
|
21
|
-
fetchAllInBatches<T>(tableName: string, inKeys: Record<string, any>[], batchSize: number): Promise<T[]>;
|
|
22
|
-
deleteAllInBatches(tableName: string, keys: Record<string, any>[], batchSize: number): Promise<number>;
|
|
23
|
-
simplePut(tableName: string, value: Record<string, any>, autoRetryCount?: number): Promise<PutCommandOutput>;
|
|
24
|
-
simplePutOnlyIfFieldIsNullOrUndefined(tableName: string, value: Record<string, any>, fieldName: string): Promise<boolean>;
|
|
25
|
-
simplePutWithCollisionAvoidance<T>(tableName: string, value: T, keyNames: string[], adjustFunction: (val: T) => T, maxAdjusts?: number, autoRetryCount?: number): Promise<T>;
|
|
26
|
-
simpleGet<T>(tableName: string, keys: Record<string, any>, autoRetryCount?: number): Promise<T>;
|
|
27
|
-
static objectIsErrorWithProvisionedThroughputExceededExceptionCode(err: Record<string, any>): boolean;
|
|
28
|
-
simpleGetWithCounterDecrement<T>(tableName: string, keys: Record<string, any>, counterAttributeName: string, deleteOnZero: boolean, autoRetryCount?: number): Promise<T>;
|
|
29
|
-
simpleDelete(tableName: string, keys: Record<string, any>): Promise<DeleteCommandOutput>;
|
|
30
|
-
atomicCounter(tableName: string, keys: Record<string, any>, counterFieldName: string, increment?: number): Promise<number>;
|
|
31
|
-
static cleanObject(ob: Record<string, any>): void;
|
|
32
|
-
static stripToKeysOnly(input: Record<string, any>, keysNames: string[]): Record<string, any>;
|
|
33
|
-
static stripAllToKeysOnly(input: Record<string, any>[], keys: string[]): Record<string, any>[];
|
|
34
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { CreateTableCommandInput, CreateTableCommandOutput, DeleteTableCommandOutput, DescribeTableCommandOutput, DynamoDBClient } from '@aws-sdk/client-dynamodb';
|
|
2
|
-
export declare class DynamoTableRatchet {
|
|
3
|
-
private awsDDB;
|
|
4
|
-
constructor(awsDDB: DynamoDBClient);
|
|
5
|
-
deleteTable(tableName: string, waitForDelete?: boolean): Promise<DeleteTableCommandOutput>;
|
|
6
|
-
createTable(input: CreateTableCommandInput, waitForReady?: boolean, replaceIfExists?: boolean): Promise<CreateTableCommandOutput>;
|
|
7
|
-
waitForTableReady(tableName: string): Promise<boolean>;
|
|
8
|
-
waitForTableDelete(tableName: string): Promise<void>;
|
|
9
|
-
tableExists(tableName: string): Promise<boolean>;
|
|
10
|
-
listAllTables(): Promise<string[]>;
|
|
11
|
-
safeDescribeTable(tableName: string): Promise<DescribeTableCommandOutput>;
|
|
12
|
-
copyTable(srcTableName: string, dstTableName: string, overrides?: CreateTableCommandInput, copyData?: boolean): Promise<CreateTableCommandOutput>;
|
|
13
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
export declare class HashSpreader {
|
|
2
|
-
private spots;
|
|
3
|
-
private buckets;
|
|
4
|
-
private separator;
|
|
5
|
-
private alphabet;
|
|
6
|
-
private _allSlots;
|
|
7
|
-
constructor(spots?: number, buckets?: number, separator?: string, alphabet?: string);
|
|
8
|
-
get allBuckets(): string[];
|
|
9
|
-
get randomBucket(): string;
|
|
10
|
-
allSpreadValues(input: string): string[];
|
|
11
|
-
allSpreadValuesForArray(inputs: string[]): string[];
|
|
12
|
-
addSpreader(input: string): string;
|
|
13
|
-
extractBucket(input: string): string;
|
|
14
|
-
removeBucket(input: string): string;
|
|
15
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/lib/ec2/ec2-ratchet.d.ts
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { EC2Client, Instance } from '@aws-sdk/client-ec2';
|
|
2
|
-
import { EC2InstanceConnectClient, SendSSHPublicKeyCommandOutput } from '@aws-sdk/client-ec2-instance-connect';
|
|
3
|
-
export declare class Ec2Ratchet {
|
|
4
|
-
private region;
|
|
5
|
-
private availabilityZone;
|
|
6
|
-
private ec2;
|
|
7
|
-
private ec2InstanceConnect;
|
|
8
|
-
constructor(region?: string, availabilityZone?: string);
|
|
9
|
-
get eC2Client(): EC2Client;
|
|
10
|
-
get eC2InstanceConnectClient(): EC2InstanceConnectClient;
|
|
11
|
-
stopInstance(instanceId: string, maxWaitForShutdownMS?: number): Promise<boolean>;
|
|
12
|
-
launchInstance(instanceId: string, maxWaitForStartupMS?: number): Promise<boolean>;
|
|
13
|
-
describeInstance(instanceId: string): Promise<Instance>;
|
|
14
|
-
listAllInstances(instanceIds?: string[]): Promise<Instance[]>;
|
|
15
|
-
sendPublicKeyToEc2Instance(instanceId: string, publicKeyString: string, instanceOsUser?: string): Promise<SendSSHPublicKeyCommandOutput>;
|
|
16
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { EcrUnusedImageCleanerRepositoryOutput } from './ecr-unused-image-cleaner-repository-output';
|
|
2
|
-
import { EcrUnusedImageCleanerOptions } from './ecr-unused-image-cleaner-options';
|
|
3
|
-
export interface EcrUnusedImageCleanerOutput {
|
|
4
|
-
registryId: string;
|
|
5
|
-
repositories: EcrUnusedImageCleanerRepositoryOutput[];
|
|
6
|
-
options: EcrUnusedImageCleanerOptions;
|
|
7
|
-
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { ImageDetail, Repository } from '@aws-sdk/client-ecr';
|
|
2
|
-
import { RetainedImageDescriptor } from './retained-image-descriptor';
|
|
3
|
-
export interface EcrUnusedImageCleanerRepositoryOutput {
|
|
4
|
-
repository: Repository;
|
|
5
|
-
purged: ImageDetail[];
|
|
6
|
-
retained: RetainedImageDescriptor[];
|
|
7
|
-
totalBytesRecovered: number;
|
|
8
|
-
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { ECRClient, ImageDetail, Repository } from '@aws-sdk/client-ecr';
|
|
2
|
-
import { EcrUnusedImageCleanerOptions } from './ecr-unused-image-cleaner-options';
|
|
3
|
-
import { UsedImageFinder } from './used-image-finder';
|
|
4
|
-
import { EcrUnusedImageCleanerRepositoryOutput } from './ecr-unused-image-cleaner-repository-output';
|
|
5
|
-
import { EcrUnusedImageCleanerOutput } from './ecr-unused-image-cleaner-output';
|
|
6
|
-
export declare class EcrUnusedImageCleaner {
|
|
7
|
-
private ecr;
|
|
8
|
-
private static readonly ECR_IMAGE_MINIMUM_AGE_DAYS;
|
|
9
|
-
private static readonly ECR_REPOSITORY_MINIMUM_IMAGE_COUNT;
|
|
10
|
-
constructor(ecr: ECRClient);
|
|
11
|
-
findAllUsedImages(finders: UsedImageFinder[]): Promise<string[]>;
|
|
12
|
-
performCleaning(opts: EcrUnusedImageCleanerOptions): Promise<EcrUnusedImageCleanerOutput>;
|
|
13
|
-
cleanRepository(repo: Repository, usedImageTags: string[], opts: EcrUnusedImageCleanerOptions): Promise<EcrUnusedImageCleanerRepositoryOutput>;
|
|
14
|
-
fetchAllImageDescriptors(repo: Repository): Promise<ImageDetail[]>;
|
|
15
|
-
fetchAllRepositoryDescriptors(registryId: string): Promise<Repository[]>;
|
|
16
|
-
fetchAllRepositoryNames(registryId: string): Promise<string[]>;
|
|
17
|
-
private fetchRegistryId;
|
|
18
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|