@bitblit/ratchet-node-only 4.0.1-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/bin/cli.js +10 -0
- package/lib/build/ratchet-node-only-info.d.ts +5 -0
- package/lib/ci/apply-ci-env-variables-to-files.d.ts +7 -0
- package/lib/ci/apply-ci-env-variables-to-files.spec.d.ts +1 -0
- package/lib/ci/ci-run-information-util.d.ts +8 -0
- package/lib/ci/ci-run-information.d.ts +9 -0
- package/lib/cli/abstract-ratchet-cli-handler.d.ts +6 -0
- package/lib/cli/cli-ratchet.d.ts +6 -0
- package/lib/cli/ratchet-cli-handler.d.ts +6 -0
- package/lib/csv/csv-ratchet.d.ts +27 -0
- package/lib/csv/csv-ratchet.spec.d.ts +4 -0
- package/lib/files/files-to-static-class.d.ts +4 -0
- package/lib/files/files-to-static-class.spec.d.ts +1 -0
- package/lib/index.d.ts +11 -0
- package/lib/index.mjs +3 -0
- package/lib/index.mjs.map +1 -0
- package/lib/third-party/git/git-ratchet.d.ts +26 -0
- package/lib/third-party/git/git-ratchet.spec.d.ts +1 -0
- package/lib/third-party/slack/publish-ci-release-to-slack.d.ts +5 -0
- package/lib/third-party/slack/publish-ci-release-to-slack.spec.d.ts +1 -0
- package/package.json +83 -0
package/bin/cli.js
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { RatchetCliHandler } from '../lib/index.mjs';
|
|
3
|
+
|
|
4
|
+
try {
|
|
5
|
+
//const RatchetCliHandler = await import('../dist/cli-bootstrap/ratchet-cli-handler.js');
|
|
6
|
+
await new RatchetCliHandler().findAndExecuteHandler();
|
|
7
|
+
} catch (err) {
|
|
8
|
+
console.error('Error : %s', err);
|
|
9
|
+
process.exit(-1);
|
|
10
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { CiRunInformation } from './ci-run-information.js';
|
|
2
|
+
export declare class ApplyCiEnvVariablesToFiles {
|
|
3
|
+
static process(fileNames: string[], cfg: CiRunInformation, buildFinder?: string, branchFinder?: string, hashFinder?: string, tagFinder?: string, timeFinder?: string): Promise<number>;
|
|
4
|
+
static extractFileNames(): string[];
|
|
5
|
+
static extractVariableConfig(inName: string): CiRunInformation;
|
|
6
|
+
static runFromCliArgs(args: string[]): Promise<number>;
|
|
7
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { CiRunInformation } from './ci-run-information.js';
|
|
2
|
+
export declare class CiRunInformationUtil {
|
|
3
|
+
static readonly DEFAULT_TIME_FORMAT: string;
|
|
4
|
+
static readonly DEFAULT_TIME_ZONE: string;
|
|
5
|
+
static createTestingCiRunInformation(timezone?: string): CiRunInformation;
|
|
6
|
+
static createDefaultCircleCiRunInformation(timezone?: string): CiRunInformation;
|
|
7
|
+
static createDefaultGithubActionsRunInformation(timezone?: string): CiRunInformation;
|
|
8
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { BuildInformation } from '@bitblit/ratchet-common';
|
|
2
|
+
import { AbstractRatchetCliHandler } from './abstract-ratchet-cli-handler.js';
|
|
3
|
+
export declare class RatchetCliHandler extends AbstractRatchetCliHandler {
|
|
4
|
+
fetchHandlerMap(): Record<string, any>;
|
|
5
|
+
fetchVersionInfo(): BuildInformation;
|
|
6
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
import { Options as ParseOptions } from 'csv-parse';
|
|
3
|
+
import { Options } from 'csv-stringify';
|
|
4
|
+
import { Subject } from 'rxjs';
|
|
5
|
+
import { Readable, Writable } from 'stream';
|
|
6
|
+
export declare class CsvRatchet {
|
|
7
|
+
static defaultParseOptions(): ParseOptions;
|
|
8
|
+
static defaultStringifyOptions(): Options;
|
|
9
|
+
static stringParse<T>(input: string, pf: ParseFunction<T>, opts?: ParseOptions): Promise<T[]>;
|
|
10
|
+
static streamParse<T>(readStream: Readable, pf: ParseFunction<T>, opts?: ParseOptions): Promise<T[]>;
|
|
11
|
+
static fileParse<T>(filename: string, pf: ParseFunction<T>): Promise<T[]>;
|
|
12
|
+
static generateCsvData(objectsToConvert: any[], opts?: Options): Promise<string>;
|
|
13
|
+
static generateComparison(file1: string, file2: string, keyField: string): Promise<ComparisonResults>;
|
|
14
|
+
static streamObjectsToCsv<T>(srcSubject: Subject<T>, output: Writable, inOpts?: Options): Promise<number>;
|
|
15
|
+
static defaultParseFunction<T>(row: any): T;
|
|
16
|
+
}
|
|
17
|
+
interface ParseFunction<T> {
|
|
18
|
+
(row: any): T;
|
|
19
|
+
}
|
|
20
|
+
export interface ComparisonResults {
|
|
21
|
+
file1OnlyKeys: string[];
|
|
22
|
+
file2OnlyKeys: string[];
|
|
23
|
+
bothFilesKeys: string[];
|
|
24
|
+
file1Data: Map<string, any>;
|
|
25
|
+
file2Data: Map<string, any>;
|
|
26
|
+
}
|
|
27
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/lib/index.d.ts
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export * from './build/ratchet-node-only-info.js';
|
|
2
|
+
export * from './ci/apply-ci-env-variables-to-files.js';
|
|
3
|
+
export * from './ci/ci-run-information-util.js';
|
|
4
|
+
export * from './ci/ci-run-information.js';
|
|
5
|
+
export * from './cli/abstract-ratchet-cli-handler.js';
|
|
6
|
+
export * from './cli/cli-ratchet.js';
|
|
7
|
+
export * from './cli/ratchet-cli-handler.js';
|
|
8
|
+
export * from './csv/csv-ratchet.js';
|
|
9
|
+
export * from './files/files-to-static-class.js';
|
|
10
|
+
export * from './third-party/git/git-ratchet.js';
|
|
11
|
+
export * from './third-party/slack/publish-ci-release-to-slack.js';
|