@pgpmjs/core 7.0.0 → 7.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/bundle/apply.d.ts +93 -0
- package/bundle/apply.js +137 -0
- package/bundle/index.d.ts +12 -0
- package/bundle/index.js +31 -0
- package/core/class/pgpm.d.ts +2 -2
- package/core/class/pgpm.js +6 -6
- package/esm/bundle/apply.js +131 -0
- package/esm/bundle/index.js +15 -0
- package/esm/core/class/pgpm.js +6 -6
- package/esm/index.js +7 -3
- package/esm/migrate/client.js +1 -1
- package/esm/migrate/utils/hash.js +3 -6
- package/esm/modules/modules.js +1 -1
- package/esm/packaging/package.js +40 -24
- package/esm/rebundle/index.js +4 -0
- package/esm/rebundle/module.js +111 -0
- package/esm/rebundle/rebundle.js +170 -0
- package/esm/rebundle/workspace.js +170 -0
- package/esm/refactor/rename.js +5 -27
- package/esm/resolution/deps.js +2 -2
- package/esm/resolution/resolve.js +2 -2
- package/esm/slice/slice.js +1 -1
- package/esm/workspace/minimal.js +73 -0
- package/index.d.ts +6 -2
- package/index.js +8 -4
- package/migrate/client.js +1 -1
- package/migrate/utils/hash.d.ts +2 -4
- package/migrate/utils/hash.js +4 -8
- package/modules/modules.d.ts +1 -1
- package/modules/modules.js +1 -1
- package/package.json +4 -2
- package/packaging/package.d.ts +23 -1
- package/packaging/package.js +42 -25
- package/rebundle/index.d.ts +4 -0
- package/{files/sql-scripts → rebundle}/index.js +4 -2
- package/rebundle/module.d.ts +23 -0
- package/rebundle/module.js +116 -0
- package/rebundle/rebundle.d.ts +26 -0
- package/rebundle/rebundle.js +175 -0
- package/rebundle/types.d.ts +185 -0
- package/rebundle/workspace.d.ts +15 -0
- package/rebundle/workspace.js +173 -0
- package/refactor/rename.d.ts +2 -8
- package/refactor/rename.js +6 -29
- package/resolution/deps.d.ts +1 -1
- package/resolution/deps.js +2 -2
- package/resolution/resolve.js +2 -2
- package/slice/slice.d.ts +1 -1
- package/slice/slice.js +1 -1
- package/slice/types.d.ts +1 -1
- package/workspace/minimal.d.ts +64 -0
- package/workspace/minimal.js +82 -0
- package/esm/files/extension/index.js +0 -3
- package/esm/files/extension/reader.js +0 -79
- package/esm/files/extension/writer.js +0 -99
- package/esm/files/index.js +0 -6
- package/esm/files/plan/generator.js +0 -82
- package/esm/files/plan/index.js +0 -5
- package/esm/files/plan/parser.js +0 -297
- package/esm/files/plan/validators.js +0 -181
- package/esm/files/plan/writer.js +0 -142
- package/esm/files/sql/header.js +0 -259
- package/esm/files/sql/index.js +0 -2
- package/esm/files/sql/writer.js +0 -107
- package/esm/files/sql-scripts/index.js +0 -2
- package/esm/files/sql-scripts/reader.js +0 -19
- package/esm/files/types/index.js +0 -1
- package/esm/utils/author.js +0 -11
- package/files/extension/index.d.ts +0 -2
- package/files/extension/index.js +0 -19
- package/files/extension/reader.d.ts +0 -24
- package/files/extension/reader.js +0 -86
- package/files/extension/writer.d.ts +0 -48
- package/files/extension/writer.js +0 -107
- package/files/index.d.ts +0 -5
- package/files/index.js +0 -22
- package/files/plan/generator.d.ts +0 -23
- package/files/plan/generator.js +0 -90
- package/files/plan/index.d.ts +0 -4
- package/files/plan/index.js +0 -21
- package/files/plan/parser.d.ts +0 -28
- package/files/plan/parser.js +0 -304
- package/files/plan/validators.d.ts +0 -52
- package/files/plan/validators.js +0 -187
- package/files/plan/writer.d.ts +0 -27
- package/files/plan/writer.js +0 -152
- package/files/sql/header.d.ts +0 -114
- package/files/sql/header.js +0 -266
- package/files/sql/index.d.ts +0 -2
- package/files/sql/index.js +0 -18
- package/files/sql/writer.d.ts +0 -12
- package/files/sql/writer.js +0 -114
- package/files/sql-scripts/index.d.ts +0 -1
- package/files/sql-scripts/reader.d.ts +0 -8
- package/files/sql-scripts/reader.js +0 -23
- package/files/types/index.d.ts +0 -46
- package/files/types/index.js +0 -17
- package/files/types/package.d.ts +0 -20
- package/utils/author.d.ts +0 -5
- package/utils/author.js +0 -14
- /package/esm/{files/types/package.js → rebundle/types.js} +0 -0
- /package/{files/types/package.js → rebundle/types.js} +0 -0
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Read a SQL script file, return empty string if not found
|
|
3
|
-
*/
|
|
4
|
-
export declare function readScript(basePath: string, scriptType: string, changeName: string): string;
|
|
5
|
-
/**
|
|
6
|
-
* Check if a script file exists
|
|
7
|
-
*/
|
|
8
|
-
export declare function scriptExists(basePath: string, scriptType: string, changeName: string): boolean;
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.readScript = readScript;
|
|
4
|
-
exports.scriptExists = scriptExists;
|
|
5
|
-
const fs_1 = require("fs");
|
|
6
|
-
const path_1 = require("path");
|
|
7
|
-
/**
|
|
8
|
-
* Read a SQL script file, return empty string if not found
|
|
9
|
-
*/
|
|
10
|
-
function readScript(basePath, scriptType, changeName) {
|
|
11
|
-
const scriptPath = (0, path_1.join)(basePath, scriptType, `${changeName}.sql`);
|
|
12
|
-
if (!(0, fs_1.existsSync)(scriptPath)) {
|
|
13
|
-
return '';
|
|
14
|
-
}
|
|
15
|
-
return (0, fs_1.readFileSync)(scriptPath, 'utf-8');
|
|
16
|
-
}
|
|
17
|
-
/**
|
|
18
|
-
* Check if a script file exists
|
|
19
|
-
*/
|
|
20
|
-
function scriptExists(basePath, scriptType, changeName) {
|
|
21
|
-
const scriptPath = (0, path_1.join)(basePath, scriptType, `${changeName}.sql`);
|
|
22
|
-
return (0, fs_1.existsSync)(scriptPath);
|
|
23
|
-
}
|
package/files/types/index.d.ts
DELETED
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
export * from './package';
|
|
2
|
-
export interface Change {
|
|
3
|
-
name: string;
|
|
4
|
-
dependencies: string[];
|
|
5
|
-
timestamp?: string;
|
|
6
|
-
planner?: string;
|
|
7
|
-
email?: string;
|
|
8
|
-
comment?: string;
|
|
9
|
-
}
|
|
10
|
-
export interface PlanFile {
|
|
11
|
-
package: string;
|
|
12
|
-
uri?: string;
|
|
13
|
-
changes: Change[];
|
|
14
|
-
}
|
|
15
|
-
export interface Tag {
|
|
16
|
-
name: string;
|
|
17
|
-
change: string;
|
|
18
|
-
timestamp?: string;
|
|
19
|
-
planner?: string;
|
|
20
|
-
email?: string;
|
|
21
|
-
comment?: string;
|
|
22
|
-
}
|
|
23
|
-
export interface ExtendedPlanFile extends PlanFile {
|
|
24
|
-
tags: Tag[];
|
|
25
|
-
}
|
|
26
|
-
export interface ParseError {
|
|
27
|
-
line: number;
|
|
28
|
-
message: string;
|
|
29
|
-
}
|
|
30
|
-
export interface ParseResult<T> {
|
|
31
|
-
data?: T;
|
|
32
|
-
errors: ParseError[];
|
|
33
|
-
}
|
|
34
|
-
export interface ResolvedReference {
|
|
35
|
-
type: 'change' | 'tag' | 'sha1' | 'relative';
|
|
36
|
-
target: string;
|
|
37
|
-
resolved?: string;
|
|
38
|
-
}
|
|
39
|
-
export interface PgpmRow {
|
|
40
|
-
deploy: string;
|
|
41
|
-
revert?: string;
|
|
42
|
-
verify?: string;
|
|
43
|
-
content: string;
|
|
44
|
-
deps?: string[];
|
|
45
|
-
name?: string;
|
|
46
|
-
}
|
package/files/types/index.js
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./package"), exports);
|
package/files/types/package.d.ts
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
export interface PackageAnalysisIssue {
|
|
2
|
-
code: string;
|
|
3
|
-
message: string;
|
|
4
|
-
file?: string;
|
|
5
|
-
fixable?: boolean;
|
|
6
|
-
}
|
|
7
|
-
export interface PackageAnalysisResult {
|
|
8
|
-
ok: boolean;
|
|
9
|
-
name: string;
|
|
10
|
-
path: string;
|
|
11
|
-
issues: PackageAnalysisIssue[];
|
|
12
|
-
}
|
|
13
|
-
export interface RenameOptions {
|
|
14
|
-
dryRun?: boolean;
|
|
15
|
-
syncPackageJsonName?: boolean;
|
|
16
|
-
}
|
|
17
|
-
export interface RenameResult {
|
|
18
|
-
changed: string[];
|
|
19
|
-
warnings: string[];
|
|
20
|
-
}
|
package/utils/author.d.ts
DELETED
package/utils/author.js
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.parseAuthor = parseAuthor;
|
|
4
|
-
function parseAuthor(author) {
|
|
5
|
-
const trimmed = (author || '').trim();
|
|
6
|
-
const match = trimmed.match(/^(.+?)\s*<([^>]+)>$/);
|
|
7
|
-
if (match) {
|
|
8
|
-
return {
|
|
9
|
-
fullName: match[1].trim(),
|
|
10
|
-
email: match[2].trim()
|
|
11
|
-
};
|
|
12
|
-
}
|
|
13
|
-
return { fullName: trimmed };
|
|
14
|
-
}
|
|
File without changes
|
|
File without changes
|