packtory 0.0.21 → 0.0.23
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-emitter/emitter.d.ts.map +1 -1
- package/bundle-emitter/emitter.js +2 -2
- package/bundle-emitter/emitter.js.map +1 -1
- package/bundle-emitter/publish-error/auto-mode-error-matching.js +6 -7
- package/bundle-emitter/publish-error/auto-mode-error-matching.js.map +1 -1
- package/bundle-emitter/publish-error/file-mode-error-matching.js +16 -10
- package/bundle-emitter/publish-error/file-mode-error-matching.js.map +1 -1
- package/bundle-emitter/publish-error/publish-error-messages.js +15 -27
- package/bundle-emitter/publish-error/publish-error-messages.js.map +1 -1
- package/bundle-emitter/registry/metadata-auth-retry.js +5 -6
- package/bundle-emitter/registry/metadata-auth-retry.js.map +1 -1
- package/bundle-emitter/registry/oidc-token-exchange.js +6 -14
- package/bundle-emitter/registry/oidc-token-exchange.js.map +1 -1
- package/bundle-emitter/registry/package-metadata-fetcher.js +12 -17
- package/bundle-emitter/registry/package-metadata-fetcher.js.map +1 -1
- package/bundle-emitter/registry/publish-settings-bridge.js +8 -12
- package/bundle-emitter/registry/publish-settings-bridge.js.map +1 -1
- package/bundle-emitter/registry/registry-auth-config.js +22 -26
- package/bundle-emitter/registry/registry-auth-config.js.map +1 -1
- package/bundle-emitter/registry/registry-client.d.ts +1 -1
- package/bundle-emitter/registry/registry-client.d.ts.map +1 -1
- package/bundle-emitter/registry/registry-client.js +13 -6
- package/bundle-emitter/registry/registry-client.js.map +1 -1
- package/bundle-emitter/registry/registry-package-path.js +4 -0
- package/bundle-emitter/registry/registry-package-path.js.map +1 -0
- package/bundle-emitter/repository-coherence.js +17 -23
- package/bundle-emitter/repository-coherence.js.map +1 -1
- package/bundle-emitter/repository-url-normalizer.js +5 -8
- package/bundle-emitter/repository-url-normalizer.js.map +1 -1
- package/checks/rules/duplicate-messages.js +7 -10
- package/checks/rules/duplicate-messages.js.map +1 -1
- package/checks/rules/no-unused-bundle-dependencies.js +10 -13
- package/checks/rules/no-unused-bundle-dependencies.js.map +1 -1
- package/common/bundled-dependency-groups.js +28 -0
- package/common/bundled-dependency-groups.js.map +1 -0
- package/common/package-layout.js +49 -0
- package/common/package-layout.js.map +1 -0
- package/common/package-name-map.js +8 -0
- package/common/package-name-map.js.map +1 -0
- package/common/worklist.js +23 -0
- package/common/worklist.js.map +1 -0
- package/config/config.d.ts +1 -1
- package/config/config.d.ts.map +1 -1
- package/config/dependency-existence-validation.js +15 -17
- package/config/dependency-existence-validation.js.map +1 -1
- package/config/package-config.d.ts.map +1 -1
- package/config/package-config.js +2 -6
- package/config/package-config.js.map +1 -1
- package/config/publish-settings.d.ts.map +1 -1
- package/config/publish-settings.report.js +8 -7
- package/config/publish-settings.report.js.map +1 -1
- package/config/registry-settings.d.ts.map +1 -1
- package/config/root-config-validation.js +86 -81
- package/config/root-config-validation.js.map +1 -1
- package/dead-code-eliminator/cross-bundle/bundle-index.js +0 -3
- package/dead-code-eliminator/cross-bundle/bundle-index.js.map +1 -1
- package/dead-code-eliminator/cross-bundle/import-export-walker.js +4 -2
- package/dead-code-eliminator/cross-bundle/import-export-walker.js.map +1 -1
- package/dead-code-eliminator/eliminator.js.map +1 -1
- package/dead-code-eliminator/imported-expression-origin.js +28 -32
- package/dead-code-eliminator/imported-expression-origin.js.map +1 -1
- package/dead-code-eliminator/pure-expression.js +53 -64
- package/dead-code-eliminator/pure-expression.js.map +1 -1
- package/dead-code-eliminator/reachability/bfs-closure.js +31 -24
- package/dead-code-eliminator/reachability/bfs-closure.js.map +1 -1
- package/dead-code-eliminator/side-effect-classifier.js +2 -2
- package/dead-code-eliminator/side-effect-classifier.js.map +1 -1
- package/dead-code-eliminator/statement-classifiers.js +4 -5
- package/dead-code-eliminator/statement-classifiers.js.map +1 -1
- package/dead-code-eliminator/syntax-kind-sets.js +24 -65
- package/dead-code-eliminator/syntax-kind-sets.js.map +1 -1
- package/dependency-scanner/node-modules-manifest-synthesizer.js +3 -6
- package/dependency-scanner/node-modules-manifest-synthesizer.js.map +1 -1
- package/dependency-scanner/package-owned-asset-file-path.js +2 -13
- package/dependency-scanner/package-owned-asset-file-path.js.map +1 -1
- package/dependency-scanner/scanner.js +39 -29
- package/dependency-scanner/scanner.js.map +1 -1
- package/dependency-scanner/source-file-references.d.ts.map +1 -1
- package/dependency-scanner/source-file-references.js +75 -79
- package/dependency-scanner/source-file-references.js.map +1 -1
- package/dependency-scanner/typescript-project-analyzer.d.ts.map +1 -1
- package/dependency-scanner/typescript-project-analyzer.js +2 -1
- package/dependency-scanner/typescript-project-analyzer.js.map +1 -1
- package/dependency-scanner/virtual-package-json-host.js +2 -1
- package/dependency-scanner/virtual-package-json-host.js.map +1 -1
- package/directed-graph/graph.js +38 -64
- package/directed-graph/graph.js.map +1 -1
- package/file-manager/compare.js +7 -3
- package/file-manager/compare.js.map +1 -1
- package/file-manager/file-description-by-path.js +8 -0
- package/file-manager/file-description-by-path.js.map +1 -0
- package/npm-oidc-id-token-resolver.js +17 -14
- package/npm-oidc-id-token-resolver.js.map +1 -1
- package/package-surface/implicit-bin.js +9 -6
- package/package-surface/implicit-bin.js.map +1 -1
- package/package-surface/package-json-export.js +4 -3
- package/package-surface/package-json-export.js.map +1 -1
- package/package-surface/package-shape.js +4 -3
- package/package-surface/package-shape.js.map +1 -1
- package/package-surface/package-surface-index.js +136 -0
- package/package-surface/package-surface-index.js.map +1 -0
- package/package-surface/public-specifiers.js +3 -12
- package/package-surface/public-specifiers.js.map +1 -1
- package/package-surface/root-registry.js +10 -20
- package/package-surface/root-registry.js.map +1 -1
- package/package-surface/specifier-syntax.js +0 -19
- package/package-surface/specifier-syntax.js.map +1 -1
- package/package-surface/substitution-exports.js +59 -35
- package/package-surface/substitution-exports.js.map +1 -1
- package/package-surface/surface.js +0 -3
- package/package-surface/surface.js.map +1 -1
- package/package.json +16 -4
- package/packtory/options/bundle-dependency-resolution.js +6 -8
- package/packtory/options/bundle-dependency-resolution.js.map +1 -1
- package/packtory/options/version-trigger.js.map +1 -1
- package/packtory/package-processor-publish.d.ts +2 -1
- package/packtory/package-processor-publish.d.ts.map +1 -1
- package/packtory/package-processor-publish.js +19 -13
- package/packtory/package-processor-publish.js.map +1 -1
- package/packtory/packtory-pack.js +129 -141
- package/packtory/packtory-pack.js.map +1 -1
- package/packtory/packtory-release-analysis.js +8 -16
- package/packtory/packtory-release-analysis.js.map +1 -1
- package/packtory/packtory-results.d.ts +26 -11
- package/packtory/packtory-results.d.ts.map +1 -1
- package/packtory/packtory-results.js +27 -5
- package/packtory/packtory-results.js.map +1 -1
- package/packtory/packtory.js +65 -49
- package/packtory/packtory.js.map +1 -1
- package/packtory/partial-result.js +26 -0
- package/packtory/partial-result.js.map +1 -0
- package/packtory/published-release-state.d.ts +9 -0
- package/packtory/published-release-state.d.ts.map +1 -0
- package/packtory/published-release-state.js +12 -0
- package/packtory/published-release-state.js.map +1 -0
- package/packtory/release-analysis.js +77 -79
- package/packtory/release-analysis.js.map +1 -1
- package/packtory/resolved-package.js +6 -6
- package/packtory/resolved-package.js.map +1 -1
- package/packtory/scheduler.d.ts +1 -0
- package/packtory/scheduler.d.ts.map +1 -1
- package/packtory/scheduler.js +70 -52
- package/packtory/scheduler.js.map +1 -1
- package/packtory/stages/publish-stage.js +11 -6
- package/packtory/stages/publish-stage.js.map +1 -1
- package/packtory/stages/release-diff-stage.js +11 -10
- package/packtory/stages/release-diff-stage.js.map +1 -1
- package/report/aggregator/package-report-materialization.js +35 -22
- package/report/aggregator/package-report-materialization.js.map +1 -1
- package/report/config-redactor.js +5 -4
- package/report/config-redactor.js.map +1 -1
- package/report/inspectors/inspect-artifact-sizes.js +7 -3
- package/report/inspectors/inspect-artifact-sizes.js.map +1 -1
- package/report/inspectors/inspect-scan-results.js +8 -2
- package/report/inspectors/inspect-scan-results.js.map +1 -1
- package/report/preview/preview-document-diff.d.ts +6 -1
- package/report/preview/preview-document-diff.d.ts.map +1 -1
- package/report/preview/preview-document-diff.js +8 -3
- package/report/preview/preview-document-diff.js.map +1 -1
- package/report/release-diff/file-set-diff.d.ts +14 -4
- package/report/release-diff/file-set-diff.d.ts.map +1 -1
- package/report/release-diff/file-set-diff.js +28 -28
- package/report/release-diff/file-set-diff.js.map +1 -1
- package/report/release-diff/release-version-transition.js +6 -4
- package/report/release-diff/release-version-transition.js.map +1 -1
- package/resource-resolver/content.js +5 -3
- package/resource-resolver/content.js.map +1 -1
- package/sbom/license-resolver.js +3 -3
- package/sbom/license-resolver.js.map +1 -1
- package/sbom/sbom-builder.js +1 -8
- package/sbom/sbom-builder.js.map +1 -1
- package/sbom/sbom-file.d.ts.map +1 -1
- package/sbom/sbom-file.js +7 -4
- package/sbom/sbom-file.js.map +1 -1
- package/sbom/sbom-serializer.js +10 -6
- package/sbom/sbom-serializer.js.map +1 -1
- package/sbom.cdx.json +22 -5
- package/vendor-materializer/vendor-materializer.d.ts.map +1 -1
- package/vendor-materializer/vendor-materializer.js +99 -123
- package/vendor-materializer/vendor-materializer.js.map +1 -1
- package/version-manager/dependencies/bundle-dependency-grouping.js +18 -14
- package/version-manager/dependencies/bundle-dependency-grouping.js.map +1 -1
- package/version-manager/imports/versioned-bundle-imports.js +15 -12
- package/version-manager/imports/versioned-bundle-imports.js.map +1 -1
- package/version-manager/manager.d.ts.map +1 -1
- package/version-manager/manager.js +19 -24
- package/version-manager/manager.js.map +1 -1
- package/version-manager/manifest/builder.js +3 -3
- package/version-manager/manifest/builder.js.map +1 -1
- package/version-manager/optional-bundle-fields.js +2 -5
- package/version-manager/optional-bundle-fields.js.map +1 -1
- package/version-manager/representative-root.js +7 -27
- package/version-manager/representative-root.js.map +1 -1
- package/version-manager/specifier-classifier.js +13 -10
- package/version-manager/specifier-classifier.js.map +1 -1
- package/version-manager/specifier-errors.js +17 -6
- package/version-manager/specifier-errors.js.map +1 -1
- package/package-surface/explicit-specifier-build.js +0 -28
- package/package-surface/explicit-specifier-build.js.map +0 -1
- package/package-surface/explicit-specifier-resolve.js +0 -17
- package/package-surface/explicit-specifier-resolve.js.map +0 -1
- package/package-surface/implicit-specifier-build.js +0 -26
- package/package-surface/implicit-specifier-build.js.map +0 -1
- package/package-surface/implicit-specifier-resolve.js +0 -17
- package/package-surface/implicit-specifier-resolve.js.map +0 -1
|
@@ -10,29 +10,36 @@ export type UnsatisfiedPeerDependency = {
|
|
|
10
10
|
readonly packageName: string;
|
|
11
11
|
readonly peer: string;
|
|
12
12
|
};
|
|
13
|
+
export declare const packPackageFailureType: {
|
|
14
|
+
readonly bundleDependenciesUnsupported: "bundle-dependencies-unsupported";
|
|
15
|
+
readonly packageNotFound: "package-not-found";
|
|
16
|
+
readonly peerDependenciesUnsatisfied: "peer-dependencies-unsatisfied";
|
|
17
|
+
readonly vendorInvalidDependencyName: "vendor-invalid-dependency-name";
|
|
18
|
+
readonly vendorSymlinkTargetOutsidePackage: "vendor-symlink-target-outside-package";
|
|
19
|
+
};
|
|
13
20
|
type PeerDependenciesUnsatisfiedFailure = {
|
|
14
|
-
readonly type:
|
|
21
|
+
readonly type: typeof packPackageFailureType.peerDependenciesUnsatisfied;
|
|
15
22
|
readonly packageName: string;
|
|
16
23
|
readonly items: readonly UnsatisfiedPeerDependency[];
|
|
17
24
|
};
|
|
18
25
|
type VendorSymlinkOutsidePackageFailure = {
|
|
19
|
-
readonly type:
|
|
26
|
+
readonly type: typeof packPackageFailureType.vendorSymlinkTargetOutsidePackage;
|
|
20
27
|
readonly packageName: string;
|
|
21
28
|
readonly vendoredPackageName: string;
|
|
22
29
|
readonly entryRelativePath: string;
|
|
23
30
|
readonly resolvedTargetPath: string;
|
|
24
31
|
};
|
|
25
32
|
type VendorInvalidDependencyNameFailure = {
|
|
26
|
-
readonly type:
|
|
33
|
+
readonly type: typeof packPackageFailureType.vendorInvalidDependencyName;
|
|
27
34
|
readonly packageName: string;
|
|
28
35
|
readonly sourcePackageName: string | undefined;
|
|
29
36
|
readonly invalidDependencyName: string;
|
|
30
37
|
};
|
|
31
38
|
export type PackPackageFailure = PeerDependenciesUnsatisfiedFailure | VendorInvalidDependencyNameFailure | VendorSymlinkOutsidePackageFailure | {
|
|
32
|
-
readonly type:
|
|
39
|
+
readonly type: typeof packPackageFailureType.bundleDependenciesUnsupported;
|
|
33
40
|
readonly packageName: string;
|
|
34
41
|
} | {
|
|
35
|
-
readonly type:
|
|
42
|
+
readonly type: typeof packPackageFailureType.packageNotFound;
|
|
36
43
|
readonly packageName: string;
|
|
37
44
|
};
|
|
38
45
|
export type BuildAndPublishAllOptions = {
|
|
@@ -43,6 +50,14 @@ export type ResolveAndLinkAllOptions = {
|
|
|
43
50
|
readonly collectReport?: boolean;
|
|
44
51
|
};
|
|
45
52
|
export type BuildReport = ReportBuildReport;
|
|
53
|
+
export declare const configErrorType = "config";
|
|
54
|
+
export declare const partialFailureType = "partial";
|
|
55
|
+
export declare const releaseAnalysisClassification: {
|
|
56
|
+
readonly dependencyOnly: "dependency-only";
|
|
57
|
+
readonly firstPublish: "first-publish";
|
|
58
|
+
readonly substantive: "substantive";
|
|
59
|
+
readonly unchanged: "unchanged";
|
|
60
|
+
};
|
|
46
61
|
export type PublishAllOutcome = {
|
|
47
62
|
readonly result: PublishAllResult;
|
|
48
63
|
readonly getReport: () => BuildReport | undefined;
|
|
@@ -52,28 +67,28 @@ export type ResolveAndLinkAllOutcome = {
|
|
|
52
67
|
readonly getReport: () => BuildReport | undefined;
|
|
53
68
|
};
|
|
54
69
|
export type ConfigError = {
|
|
55
|
-
type:
|
|
70
|
+
type: typeof configErrorType;
|
|
56
71
|
issues: readonly string[];
|
|
57
72
|
};
|
|
58
73
|
export type PublishFailure = CheckError | ConfigError | (PartialError<BuildAndPublishResult> & {
|
|
59
|
-
type:
|
|
74
|
+
type: typeof partialFailureType;
|
|
60
75
|
});
|
|
61
76
|
export type PublishAllResult = Result<readonly BuildAndPublishResult[], PublishFailure>;
|
|
62
77
|
export type PartialErrorResult = {
|
|
63
|
-
type:
|
|
78
|
+
type: typeof partialFailureType;
|
|
64
79
|
error: PartialError<ResolvedPackage>;
|
|
65
80
|
};
|
|
66
81
|
export type ResolveAndLinkFailure = CheckError | ConfigError | PartialErrorResult;
|
|
67
82
|
export type ResolveAndLinkAllResult = Result<readonly ResolvedPackage[], ResolveAndLinkFailure>;
|
|
68
83
|
export type ReleaseDiffFailure = CheckError | ConfigError | (PartialError<PackageReleaseDiff> & {
|
|
69
|
-
type:
|
|
84
|
+
type: typeof partialFailureType;
|
|
70
85
|
});
|
|
71
86
|
export type ReleaseDiffAllResult = Result<readonly PackageReleaseDiff[], ReleaseDiffFailure>;
|
|
72
87
|
export type ReleaseDiffAllOutcome = {
|
|
73
88
|
readonly result: ReleaseDiffAllResult;
|
|
74
89
|
readonly getReport: () => BuildReport;
|
|
75
90
|
};
|
|
76
|
-
export type PackageReleaseAnalysisClassification =
|
|
91
|
+
export type PackageReleaseAnalysisClassification = (typeof releaseAnalysisClassification)[keyof typeof releaseAnalysisClassification];
|
|
77
92
|
export type PackageReleaseAnalysis = {
|
|
78
93
|
readonly classification: PackageReleaseAnalysisClassification;
|
|
79
94
|
readonly latestPublishedAt?: Date | undefined;
|
|
@@ -86,7 +101,7 @@ export type ReleaseAnalysis = {
|
|
|
86
101
|
readonly packageAnalyses: readonly PackageReleaseAnalysis[];
|
|
87
102
|
};
|
|
88
103
|
export type ReleaseAnalysisFailure = CheckError | ConfigError | (PartialError<PackageReleaseAnalysis> & {
|
|
89
|
-
type:
|
|
104
|
+
type: typeof partialFailureType;
|
|
90
105
|
});
|
|
91
106
|
export type ReleaseAnalysisResult = Result<ReleaseAnalysis, ReleaseAnalysisFailure>;
|
|
92
107
|
export type ReleaseAnalysisOutcome = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"packtory-results.d.ts","sourceRoot":"","sources":["../../../../source/packtory/packtory-results.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,WAAW;AACvC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iCAAiC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,UAAU,CAAC;IAC5B,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,kBAAkB,EAAE,OAAO,CAAC;CACxC;AAED,MAAM,MAAM,WAAW,GAAG,UAAU,GAAG,WAAW,GAAG,kBAAkB,GAAG,kBAAkB;AAE5F,MAAM,MAAM,UAAU,GAAG,MAAM,CAAC,SAAS,EAAE,WAAW,CAAC;AAEvD,MAAM,MAAM,WAAW,GAAG;IACtB,QAAQ,CAAC,MAAM,EAAE,UAAU,CAAC;CAC/B"}
|
|
@@ -1,5 +1,27 @@
|
|
|
1
|
+
export const packPackageFailureType = {
|
|
2
|
+
bundleDependenciesUnsupported: 'bundle-dependencies-unsupported',
|
|
3
|
+
packageNotFound: 'package-not-found',
|
|
4
|
+
peerDependenciesUnsatisfied: 'peer-dependencies-unsatisfied',
|
|
5
|
+
vendorInvalidDependencyName: 'vendor-invalid-dependency-name',
|
|
6
|
+
vendorSymlinkTargetOutsidePackage: 'vendor-symlink-target-outside-package'
|
|
7
|
+
};
|
|
8
|
+
export const checksErrorType = 'checks';
|
|
9
|
+
export const configErrorType = 'config';
|
|
10
|
+
export const partialFailureType = 'partial';
|
|
11
|
+
export const previewResultType = {
|
|
12
|
+
checks: checksErrorType,
|
|
13
|
+
config: configErrorType,
|
|
14
|
+
partial: partialFailureType,
|
|
15
|
+
success: 'success'
|
|
16
|
+
};
|
|
17
|
+
export const releaseAnalysisClassification = {
|
|
18
|
+
dependencyOnly: 'dependency-only',
|
|
19
|
+
firstPublish: 'first-publish',
|
|
20
|
+
substantive: 'substantive',
|
|
21
|
+
unchanged: 'unchanged'
|
|
22
|
+
};
|
|
1
23
|
export function configError(issues) {
|
|
2
|
-
return { type:
|
|
24
|
+
return { type: configErrorType, issues };
|
|
3
25
|
}
|
|
4
26
|
export function createPublishAllOutcome(result, getReport) {
|
|
5
27
|
return { result, getReport };
|
|
@@ -8,10 +30,10 @@ export function createResolveAndLinkAllOutcome(result, getReport) {
|
|
|
8
30
|
return { result, getReport };
|
|
9
31
|
}
|
|
10
32
|
export function publishPartialFailure(error) {
|
|
11
|
-
return { type:
|
|
33
|
+
return { type: partialFailureType, ...error };
|
|
12
34
|
}
|
|
13
35
|
export function resolvePartialFailure(error) {
|
|
14
|
-
return { type:
|
|
36
|
+
return { type: partialFailureType, error };
|
|
15
37
|
}
|
|
16
38
|
export function createReleaseDiffAllOutcome(result, getReport) {
|
|
17
39
|
return { result, getReport };
|
|
@@ -20,10 +42,10 @@ export function createReleaseAnalysisOutcome(result, getReport) {
|
|
|
20
42
|
return { result, getReport };
|
|
21
43
|
}
|
|
22
44
|
export function releaseDiffPartialFailure(error) {
|
|
23
|
-
return { type:
|
|
45
|
+
return { type: partialFailureType, ...error };
|
|
24
46
|
}
|
|
25
47
|
export function releaseAnalysisPartialFailure(error) {
|
|
26
|
-
return { type:
|
|
48
|
+
return { type: partialFailureType, ...error };
|
|
27
49
|
}
|
|
28
50
|
export function createPackOutcome(result) {
|
|
29
51
|
return { result };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"packtory-results.js","sourceRoot":"","sources":["../../../../source/packtory/packtory-results.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"packtory-results.js","sourceRoot":"","sources":["../../../../source/packtory/packtory-results.ts"],"names":[],"mappings":"AAcA,MAAM,CAAC,MAAM,sBAAsB,GAAG;IAClC,6BAA6B,EAAE,iCAAiC;IAChE,eAAe,EAAE,mBAAmB;IACpC,2BAA2B,EAAE,+BAA+B;IAC5D,2BAA2B,EAAE,gCAAgC;IAC7D,iCAAiC,EAAE,uCAAuC;CACpE,CAAC;AAyCX,MAAM,CAAC,MAAM,eAAe,GAAG,QAAQ,CAAC;AACxC,MAAM,CAAC,MAAM,eAAe,GAAG,QAAQ,CAAC;AACxC,MAAM,CAAC,MAAM,kBAAkB,GAAG,SAAS,CAAC;AAC5C,MAAM,CAAC,MAA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6B,CAAC,KAA2C;IACrF,OAAO,EAAE,IAAI,EAAE,kBAAkB,EAAE,GAAG,KAAK,EAAE,CAAC;AAClD,CAAC;AAkBD,MAAM,UAAU,iBAAiB,CAAC,MAAkB;IAChD,OAAO,EAAE,MAAM,EAAE,CAAC;AACtB,CAAC"}
|
package/packtory/packtory.js
CHANGED
|
@@ -20,40 +20,52 @@ function createValidatedRunners(dependencies) {
|
|
|
20
20
|
export function createPacktory(dependencies) {
|
|
21
21
|
const { progressBroadcaster } = dependencies;
|
|
22
22
|
const { resolveAndLinkAllValidated, runBuildAndPublishValidated, diffAgainstLatestPublishedValidated, analyzeReleaseAgainstLatestPublishedValidated, runPackValidated } = createValidatedRunners(dependencies);
|
|
23
|
-
async function
|
|
24
|
-
const reporting =
|
|
23
|
+
async function runReportedOperation(args) {
|
|
24
|
+
const reporting = args.attachReporting();
|
|
25
25
|
try {
|
|
26
|
-
const validation =
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
if (result.isErr) {
|
|
32
|
-
return createResolveAndLinkAllOutcome(Result.err(result.error), reporting.getReport);
|
|
33
|
-
}
|
|
34
|
-
return createResolveAndLinkAllOutcome(Result.ok(result.value), reporting.getReport);
|
|
26
|
+
const validation = args.validate(args.config);
|
|
27
|
+
const result = validation.isErr
|
|
28
|
+
? args.createValidationErrorResult(validation.error)
|
|
29
|
+
: await args.runValidated(validation.value);
|
|
30
|
+
return args.createOutcome(result, reporting.getReport);
|
|
35
31
|
}
|
|
36
32
|
finally {
|
|
37
33
|
reporting.dispose();
|
|
38
34
|
}
|
|
39
35
|
}
|
|
36
|
+
async function resolveAndLinkAllPublic(config, options) {
|
|
37
|
+
return runReportedOperation({
|
|
38
|
+
config,
|
|
39
|
+
attachReporting() {
|
|
40
|
+
return maybeAttachAggregator(progressBroadcaster, options?.collectReport);
|
|
41
|
+
},
|
|
42
|
+
validate: validateConfigWithoutRegistry,
|
|
43
|
+
runValidated: resolveAndLinkAllValidated,
|
|
44
|
+
createValidationErrorResult(issues) {
|
|
45
|
+
return Result.err(configError(issues));
|
|
46
|
+
},
|
|
47
|
+
createOutcome: createResolveAndLinkAllOutcome
|
|
48
|
+
});
|
|
49
|
+
}
|
|
40
50
|
async function runBuildAndPublish(validated, options) {
|
|
41
51
|
emitEffectiveConfigPerPackage(progressBroadcaster, validated.packtoryConfig);
|
|
42
52
|
return runBuildAndPublishValidated(validated, options, resolveAndLinkAllValidated);
|
|
43
53
|
}
|
|
44
54
|
async function buildAndPublishAllPublic(config, options) {
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
55
|
+
return runReportedOperation({
|
|
56
|
+
config,
|
|
57
|
+
attachReporting() {
|
|
58
|
+
return maybeAttachAggregator(progressBroadcaster, options.collectReport);
|
|
59
|
+
},
|
|
60
|
+
validate: validateConfig,
|
|
61
|
+
async runValidated(validated) {
|
|
62
|
+
return runBuildAndPublish(validated, options);
|
|
63
|
+
},
|
|
64
|
+
createValidationErrorResult(issues) {
|
|
65
|
+
return Result.err(configError(issues));
|
|
66
|
+
},
|
|
67
|
+
createOutcome: createPublishAllOutcome
|
|
68
|
+
});
|
|
57
69
|
}
|
|
58
70
|
async function packPackagePublic(config, options) {
|
|
59
71
|
const validation = validateConfigWithoutRegistry(config);
|
|
@@ -64,34 +76,38 @@ export function createPacktory(dependencies) {
|
|
|
64
76
|
return createPackOutcome(result);
|
|
65
77
|
}
|
|
66
78
|
async function diffAgainstLatestPublishedPublic(config) {
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
79
|
+
return runReportedOperation({
|
|
80
|
+
config,
|
|
81
|
+
attachReporting() {
|
|
82
|
+
return attachAggregator(progressBroadcaster);
|
|
83
|
+
},
|
|
84
|
+
validate: validateConfig,
|
|
85
|
+
async runValidated(validated) {
|
|
86
|
+
emitEffectiveConfigPerPackage(progressBroadcaster, validated.packtoryConfig);
|
|
87
|
+
return diffAgainstLatestPublishedValidated(validated, resolveAndLinkAllValidated);
|
|
88
|
+
},
|
|
89
|
+
createValidationErrorResult(issues) {
|
|
90
|
+
return Result.err(configError(issues));
|
|
91
|
+
},
|
|
92
|
+
createOutcome: createReleaseDiffAllOutcome
|
|
93
|
+
});
|
|
80
94
|
}
|
|
81
95
|
async function analyzeReleaseAgainstLatestPublishedPublic(config) {
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
96
|
+
return runReportedOperation({
|
|
97
|
+
config,
|
|
98
|
+
attachReporting() {
|
|
99
|
+
return attachAggregator(progressBroadcaster);
|
|
100
|
+
},
|
|
101
|
+
validate: validateConfig,
|
|
102
|
+
async runValidated(validated) {
|
|
103
|
+
emitEffectiveConfigPerPackage(progressBroadcaster, validated.packtoryConfig);
|
|
104
|
+
return analyzeReleaseAgainstLatestPublishedValidated(validated, resolveAndLinkAllValidated);
|
|
105
|
+
},
|
|
106
|
+
createValidationErrorResult(issues) {
|
|
107
|
+
return Result.err(configError(issues));
|
|
108
|
+
},
|
|
109
|
+
createOutcome: createReleaseAnalysisOutcome
|
|
110
|
+
});
|
|
95
111
|
}
|
|
96
112
|
return {
|
|
97
113
|
analyzeReleaseAgainstLatestPublished: analyzeReleaseAgainstLatestPublishedPublic,
|
package/packtory/packtory.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"packtory.js","sourceRoot":"","sources":["../../../../source/packtory/packtory.ts"],"names":[],"mappings":"AAAA,iMAAiM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B,EAAE,SAAS,CAAC,cAAc,CAAC,CAAC;gBAC7E,OAAO,6CAA6C,CAAC,SAAS,EAAE,0BAA0B,CAAC,CAAC;YAChG,CAAC;YACD,2BAA2B,CAAC,MAAM;gBAC9B,OAAO,MAAM,CAAC,GAAG,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC,CAAC;YAC3C,CAAC;YACD,aAAa,EAAE,4BAA4B;SAC9C,CAAC,CAAC;IACP,CAAC;IAED,OAAO;QACH,oCAAoC,EAAE,0CAA0C;QAChF,kBAAkB,EAAE,wBAAwB;QAC5C,0BAA0B,EAAE,gCAAgC;QAC5D,iBAAiB,EAAE,uBAAuB;QAC1C,WAAW,EAAE,iBAAiB;KACjC,CAAC;AACN,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { partialFailureType } from "./packtory-results.js";
|
|
2
|
+
function isPartialSuccessLike(value) {
|
|
3
|
+
return typeof value === 'object' && value !== null && 'succeeded' in value && 'failures' in value;
|
|
4
|
+
}
|
|
5
|
+
export function succeededResultsFrom(result) {
|
|
6
|
+
if (result.isOk) {
|
|
7
|
+
return result.value;
|
|
8
|
+
}
|
|
9
|
+
return isPartialSuccessLike(result.error) ? result.error.succeeded : [];
|
|
10
|
+
}
|
|
11
|
+
export function isSuccessOrPartialSuccess(result) {
|
|
12
|
+
return result.isOk || succeededResultsFrom(result).length > 0;
|
|
13
|
+
}
|
|
14
|
+
export function partialFailureMessages(error) {
|
|
15
|
+
return error.failures.map((failure) => {
|
|
16
|
+
return failure.message;
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
export function mapResolvePartialFailure(error) {
|
|
20
|
+
return {
|
|
21
|
+
type: partialFailureType,
|
|
22
|
+
succeeded: [],
|
|
23
|
+
failures: error.error.failures
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
//# sourceMappingURL=partial-result.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"partial-result.js","sourceRoot":"","sources":["../../../../source/packtory/partial-result.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAA2B,MAAM,uBAAuB,CAAC;AAMpF,SAAS,oBAAoB,CAAI,KAAc;IAC3C,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,IAAI,WAAW,IAAI,KAAK,IAAI,UAAU,IAAI,KAAK,CAAC;AACtG,CAAC;AAED,MAAM,UAAU,oBAAoB,CAAc,MAAsC;IACpF,IAAI,MAAM,CAAC,IAAI,EAAE,CAAC;QACd,OAAO,MAAM,CAAC,KAAK,CAAC;IACxB,CAAC;IAED,OAAO,oBAAoB,CAAI,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC;AAC/E,CAAC;AAED,MAAM,UAAU,yBAAyB,CAAc,MAAsC;IACzF,OAAO,MAAM,CAAC,IAAI,IAAI,oBAAoB,CAAC,MAAM,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC;AAClE,CAAC;AAED,MAAM,UAAU,sBAAsB,CAAI,KAAsB;IAC5D,OAAO,KAAK,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE;QAClC,OAAO,OAAO,CAAC,OAAO,CAAC;IAC3B,CAAC,CAAC,CAAC;AACP,CAAC;AAED,MAAM,UAAU,wBAAwB,CAAI,KAAyB;IACjE,OAAO;QACH,IAAI,EAAE,kBAAkB;QACxB,SAAS,EAAE,EAAE;QACb,QAAQ,EAAE,KAAK,CAAC,KAAK,CAAC,QAAQ;KACjC,CAAC;AACN,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { PublishedReleaseArtifacts } from '../bundle-emitter/fetch-published-artifacts.ts';
|
|
2
|
+
export declare const publishedReleaseStatus: {
|
|
3
|
+
readonly alreadyPublished: "already-published";
|
|
4
|
+
readonly initialVersion: "initial-version";
|
|
5
|
+
readonly newVersion: "new-version";
|
|
6
|
+
};
|
|
7
|
+
export type PublishedReleaseStatus = (typeof publishedReleaseStatus)[keyof typeof publishedReleaseStatus];
|
|
8
|
+
export {};
|
|
9
|
+
//# sourceMappingURL=published-release-state.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"published-release-state.d.ts","sourceRoot":"","sources":["../../../../source/packtory/published-release-state.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,gDAAgD;AAE/F,eAAO,MAAM,sBAAsB;;;;CAIzB;AAEV,MAAM,MAAM,sBAAsB,GAAG,CAAC,OAAO,sBAAsB,CAAC,CAAC,MAAM,OAAO,sBAAsB,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export const publishedReleaseStatus = {
|
|
2
|
+
alreadyPublished: 'already-published',
|
|
3
|
+
initialVersion: 'initial-version',
|
|
4
|
+
newVersion: 'new-version'
|
|
5
|
+
};
|
|
6
|
+
export function wasAlreadyPublished(buildResult) {
|
|
7
|
+
return buildResult.status === publishedReleaseStatus.alreadyPublished;
|
|
8
|
+
}
|
|
9
|
+
export function publishedReleaseArtifactsOf(buildResult) {
|
|
10
|
+
return buildResult.previousReleaseArtifacts.isJust ? buildResult.previousReleaseArtifacts.value : undefined;
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=published-release-state.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"published-release-state.js","sourceRoot":"","sources":["../../../../source/packtory/published-release-state.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,sBAAsB,GAAG;IAClC,gBAAgB,EAAE,mBAAmB;IACrC,cAAc,EAAE,iBAAiB;IACjC,UAAU,EAAE,aAAa;CACnB,CAAC;AAWX,MAAM,UAAU,mBAAmB,CAAC,WAA0C;IAC1E,OAAO,WAAW,CAAC,MAAM,KAAK,sBAAsB,CAAC,gBAAgB,CAAC;AAC1E,CAAC;AAED,MAAM,UAAU,2BAA2B,CACvC,WAA0C;IAE1C,OAAO,WAAW,CAAC,wBAAwB,CAAC,MAAM,CAAC,CAAC,CAAC,WAAW,CAAC,wBAAwB,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC;AAChH,CAAC"}
|