@pgpmjs/import 0.1.1 → 0.2.0
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/esm/import.js +1 -1
- package/import.d.ts +3 -1
- package/import.js +1 -1
- package/package.json +4 -4
package/esm/import.js
CHANGED
|
@@ -408,7 +408,7 @@ export const importDumpRows = async (source, options = {}) => {
|
|
|
408
408
|
.join('\n\n');
|
|
409
409
|
const restructured = await restructureExportRows(program.trim()
|
|
410
410
|
? [{ name: 'import/dump', deploy: 'import/dump', deps: [], content: program }]
|
|
411
|
-
: [], granularity, { naming: style });
|
|
411
|
+
: [], granularity, { naming: style, changeGranularity: options.changeGranularity });
|
|
412
412
|
warnings.push(...restructured.warnings);
|
|
413
413
|
const rows = [];
|
|
414
414
|
if (miscTexts.length > 0) {
|
package/import.d.ts
CHANGED
|
@@ -21,12 +21,14 @@
|
|
|
21
21
|
*/
|
|
22
22
|
import { PgpmRow } from '@pgpmjs/ast';
|
|
23
23
|
import { PathStyle } from '@pgpmjs/naming-spec';
|
|
24
|
-
import { ExportGranularity } from '@pgpmjs/transform';
|
|
24
|
+
import { ChangeGranularity, ExportGranularity } from '@pgpmjs/transform';
|
|
25
25
|
import { DumpSource } from './dump-source';
|
|
26
26
|
export declare const MISC_CHANGE_PATH = "misc/statements";
|
|
27
27
|
export interface ImportDumpRowsOptions {
|
|
28
28
|
/** Granularity dial (default: `object`). */
|
|
29
29
|
granularity?: ExportGranularity;
|
|
30
|
+
/** Change-level distribution (default: `object`). */
|
|
31
|
+
changeGranularity?: ChangeGranularity;
|
|
30
32
|
/** Naming spec path style (default: `directory`). */
|
|
31
33
|
naming?: PathStyle;
|
|
32
34
|
/** Emit data statements (COPY blocks, INSERTs) as seed fixture changes. */
|
package/import.js
CHANGED
|
@@ -412,7 +412,7 @@ const importDumpRows = async (source, options = {}) => {
|
|
|
412
412
|
.join('\n\n');
|
|
413
413
|
const restructured = await (0, transform_1.restructureExportRows)(program.trim()
|
|
414
414
|
? [{ name: 'import/dump', deploy: 'import/dump', deps: [], content: program }]
|
|
415
|
-
: [], granularity, { naming: style });
|
|
415
|
+
: [], granularity, { naming: style, changeGranularity: options.changeGranularity });
|
|
416
416
|
warnings.push(...restructured.warnings);
|
|
417
417
|
const rows = [];
|
|
418
418
|
if (miscTexts.length > 0) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pgpmjs/import",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"author": "Constructive <developers@constructive.io>",
|
|
5
5
|
"description": "pgpm import — pgpm-itize arbitrary SQL dumps (pg_dump output, raw .sql) through the dials pipeline",
|
|
6
6
|
"main": "index.js",
|
|
@@ -43,8 +43,8 @@
|
|
|
43
43
|
},
|
|
44
44
|
"dependencies": {
|
|
45
45
|
"@pgpmjs/ast": "^0.10.3",
|
|
46
|
-
"@pgpmjs/naming-spec": "^0.
|
|
47
|
-
"@pgpmjs/transform": "^0.
|
|
46
|
+
"@pgpmjs/naming-spec": "^0.2.0",
|
|
47
|
+
"@pgpmjs/transform": "^0.20.0"
|
|
48
48
|
},
|
|
49
|
-
"gitHead": "
|
|
49
|
+
"gitHead": "e6a7a57f88c9deb2a4acecaba2451320d1be8203"
|
|
50
50
|
}
|