@pgpmjs/import 0.1.1 → 0.3.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 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.1.1",
3
+ "version": "0.3.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",
@@ -42,9 +42,9 @@
42
42
  "makage": "^0.3.0"
43
43
  },
44
44
  "dependencies": {
45
- "@pgpmjs/ast": "^0.10.3",
46
- "@pgpmjs/naming-spec": "^0.1.2",
47
- "@pgpmjs/transform": "^0.19.0"
45
+ "@pgpmjs/ast": "^0.11.0",
46
+ "@pgpmjs/naming-spec": "^0.3.0",
47
+ "@pgpmjs/transform": "^0.21.0"
48
48
  },
49
- "gitHead": "c20b6be96b39bf71c0e2df0f4b51e05deacd006b"
49
+ "gitHead": "d508453a32a2f1d70ff6916871046615226e6f33"
50
50
  }