@superblocksteam/shared 0.9602.1 → 0.9603.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.
Files changed (85) hide show
  1. package/dist/types/codeSecurity/index.d.ts +38 -0
  2. package/dist/types/codeSecurity/index.d.ts.map +1 -0
  3. package/dist/types/codeSecurity/index.js +10 -0
  4. package/dist/types/codeSecurity/index.js.map +1 -0
  5. package/dist/types/deployment/deployQueueStatus.d.ts +31 -0
  6. package/dist/types/deployment/deployQueueStatus.d.ts.map +1 -1
  7. package/dist/types/deployment/index.d.ts +1 -1
  8. package/dist/types/deployment/index.d.ts.map +1 -1
  9. package/dist/types/deployment/index.js.map +1 -1
  10. package/dist/types/index.d.ts +8 -5
  11. package/dist/types/index.d.ts.map +1 -1
  12. package/dist/types/index.js +8 -5
  13. package/dist/types/index.js.map +1 -1
  14. package/dist/types/pagination/index.d.ts +7 -0
  15. package/dist/types/pagination/index.d.ts.map +1 -0
  16. package/dist/types/pagination/index.js +3 -0
  17. package/dist/types/pagination/index.js.map +1 -0
  18. package/dist/types/publishPipeline/index.d.ts +78 -0
  19. package/dist/types/publishPipeline/index.d.ts.map +1 -0
  20. package/dist/types/publishPipeline/index.js +56 -0
  21. package/dist/types/publishPipeline/index.js.map +1 -0
  22. package/dist/types/publishPipeline/plan.d.ts +18 -0
  23. package/dist/types/publishPipeline/plan.d.ts.map +1 -0
  24. package/dist/types/publishPipeline/plan.js +110 -0
  25. package/dist/types/publishPipeline/plan.js.map +1 -0
  26. package/dist/types/publishPipeline/plan.test.d.ts +2 -0
  27. package/dist/types/publishPipeline/plan.test.d.ts.map +1 -0
  28. package/dist/types/publishPipeline/plan.test.js +181 -0
  29. package/dist/types/publishPipeline/plan.test.js.map +1 -0
  30. package/dist/types/publishPipeline/stepIds.test.d.ts +2 -0
  31. package/dist/types/publishPipeline/stepIds.test.d.ts.map +1 -0
  32. package/dist/types/publishPipeline/stepIds.test.js +34 -0
  33. package/dist/types/publishPipeline/stepIds.test.js.map +1 -0
  34. package/dist/types/rbac/index.d.ts +2 -2
  35. package/dist/types/rbac/index.d.ts.map +1 -1
  36. package/dist/types/rbac/index.js +2 -2
  37. package/dist/types/rbac/index.js.map +1 -1
  38. package/dist-esm/types/codeSecurity/index.d.ts +38 -0
  39. package/dist-esm/types/codeSecurity/index.d.ts.map +1 -0
  40. package/dist-esm/types/codeSecurity/index.js +7 -0
  41. package/dist-esm/types/codeSecurity/index.js.map +1 -0
  42. package/dist-esm/types/deployment/deployQueueStatus.d.ts +31 -0
  43. package/dist-esm/types/deployment/deployQueueStatus.d.ts.map +1 -1
  44. package/dist-esm/types/deployment/index.d.ts +1 -1
  45. package/dist-esm/types/deployment/index.d.ts.map +1 -1
  46. package/dist-esm/types/deployment/index.js.map +1 -1
  47. package/dist-esm/types/index.d.ts +8 -5
  48. package/dist-esm/types/index.d.ts.map +1 -1
  49. package/dist-esm/types/index.js +8 -5
  50. package/dist-esm/types/index.js.map +1 -1
  51. package/dist-esm/types/pagination/index.d.ts +7 -0
  52. package/dist-esm/types/pagination/index.d.ts.map +1 -0
  53. package/dist-esm/types/pagination/index.js +2 -0
  54. package/dist-esm/types/pagination/index.js.map +1 -0
  55. package/dist-esm/types/publishPipeline/index.d.ts +78 -0
  56. package/dist-esm/types/publishPipeline/index.d.ts.map +1 -0
  57. package/dist-esm/types/publishPipeline/index.js +39 -0
  58. package/dist-esm/types/publishPipeline/index.js.map +1 -0
  59. package/dist-esm/types/publishPipeline/plan.d.ts +18 -0
  60. package/dist-esm/types/publishPipeline/plan.d.ts.map +1 -0
  61. package/dist-esm/types/publishPipeline/plan.js +104 -0
  62. package/dist-esm/types/publishPipeline/plan.js.map +1 -0
  63. package/dist-esm/types/publishPipeline/plan.test.d.ts +2 -0
  64. package/dist-esm/types/publishPipeline/plan.test.d.ts.map +1 -0
  65. package/dist-esm/types/publishPipeline/plan.test.js +179 -0
  66. package/dist-esm/types/publishPipeline/plan.test.js.map +1 -0
  67. package/dist-esm/types/publishPipeline/stepIds.test.d.ts +2 -0
  68. package/dist-esm/types/publishPipeline/stepIds.test.d.ts.map +1 -0
  69. package/dist-esm/types/publishPipeline/stepIds.test.js +32 -0
  70. package/dist-esm/types/publishPipeline/stepIds.test.js.map +1 -0
  71. package/dist-esm/types/rbac/index.d.ts +2 -2
  72. package/dist-esm/types/rbac/index.d.ts.map +1 -1
  73. package/dist-esm/types/rbac/index.js +2 -2
  74. package/dist-esm/types/rbac/index.js.map +1 -1
  75. package/package.json +1 -1
  76. package/src/types/codeSecurity/index.ts +51 -0
  77. package/src/types/deployment/deployQueueStatus.ts +35 -0
  78. package/src/types/deployment/index.ts +8 -1
  79. package/src/types/index.ts +8 -5
  80. package/src/types/pagination/index.ts +7 -0
  81. package/src/types/publishPipeline/index.ts +104 -0
  82. package/src/types/publishPipeline/plan.test.ts +200 -0
  83. package/src/types/publishPipeline/plan.ts +114 -0
  84. package/src/types/publishPipeline/stepIds.test.ts +35 -0
  85. package/src/types/rbac/index.ts +2 -2
@@ -0,0 +1,38 @@
1
+ export type Ecosystem = 'npm';
2
+ export type VulnerabilitySource = 'osv';
3
+ export type AdvisoryKind = 'vulnerability' | 'malware';
4
+ export declare const SEVERITY_LEVELS: readonly ["none", "low", "medium", "high", "critical", "unknown"];
5
+ export type SeverityLevel = (typeof SEVERITY_LEVELS)[number];
6
+ export type DependencyScanStatus = 'clear' | 'needs_review' | 'unresolved';
7
+ export interface AdvisoryDetail {
8
+ advisoryId: string;
9
+ source: VulnerabilitySource;
10
+ kind: AdvisoryKind;
11
+ severity: SeverityLevel;
12
+ summary: string | null;
13
+ packageName: string;
14
+ currentVersion: string;
15
+ fixedVersion: string | null;
16
+ lowConfidence: boolean;
17
+ }
18
+ export interface PerAppVuln {
19
+ appId: string;
20
+ name: string;
21
+ owner: string | null;
22
+ published: boolean;
23
+ visibility: 'private' | 'public';
24
+ status: DependencyScanStatus;
25
+ totalCount: number;
26
+ topSeverity: SeverityLevel | null;
27
+ severityCounts: Partial<Record<SeverityLevel, number>>;
28
+ advisories: AdvisoryDetail[];
29
+ lowConfidence: boolean;
30
+ canDeploy: boolean;
31
+ }
32
+ export interface DependencyScanSummary {
33
+ overallSeverityCounts: Partial<Record<SeverityLevel, number>>;
34
+ publishedPublicWithVulns: number;
35
+ publishedWithVulns: number;
36
+ totalProjects: number;
37
+ }
38
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/types/codeSecurity/index.ts"],"names":[],"mappings":"AAIA,MAAM,MAAM,SAAS,GAAG,KAAK,CAAC;AAC9B,MAAM,MAAM,mBAAmB,GAAG,KAAK,CAAC;AACxC,MAAM,MAAM,YAAY,GAAG,eAAe,GAAG,SAAS,CAAC;AAIvD,eAAO,MAAM,eAAe,mEAAoE,CAAC;AACjG,MAAM,MAAM,aAAa,GAAG,CAAC,OAAO,eAAe,CAAC,CAAC,MAAM,CAAC,CAAC;AAG7D,MAAM,MAAM,oBAAoB,GAAG,OAAO,GAAG,cAAc,GAAG,YAAY,CAAC;AAE3E,MAAM,WAAW,cAAc;IAC7B,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,mBAAmB,CAAC;IAC5B,IAAI,EAAE,YAAY,CAAC;IACnB,QAAQ,EAAE,aAAa,CAAC;IACxB,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,WAAW,EAAE,MAAM,CAAC;IACpB,cAAc,EAAE,MAAM,CAAC;IACvB,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,aAAa,EAAE,OAAO,CAAC;CACxB;AAED,MAAM,WAAW,UAAU;IACzB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,SAAS,EAAE,OAAO,CAAC;IACnB,UAAU,EAAE,SAAS,GAAG,QAAQ,CAAC;IACjC,MAAM,EAAE,oBAAoB,CAAC;IAC7B,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,aAAa,GAAG,IAAI,CAAC;IAClC,cAAc,EAAE,OAAO,CAAC,MAAM,CAAC,aAAa,EAAE,MAAM,CAAC,CAAC,CAAC;IACvD,UAAU,EAAE,cAAc,EAAE,CAAC;IAC7B,aAAa,EAAE,OAAO,CAAC;IAGvB,SAAS,EAAE,OAAO,CAAC;CACpB;AAED,MAAM,WAAW,qBAAqB;IACpC,qBAAqB,EAAE,OAAO,CAAC,MAAM,CAAC,aAAa,EAAE,MAAM,CAAC,CAAC,CAAC;IAC9D,wBAAwB,EAAE,MAAM,CAAC;IACjC,kBAAkB,EAAE,MAAM,CAAC;IAC3B,aAAa,EAAE,MAAM,CAAC;CACvB"}
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ // Wire contract for the code-security dependency-scan endpoints, shared by the
3
+ // server handlers and the UI so the two can't drift. The taxonomy below is
4
+ // mirrored by the PackageVulnerability DB entity (its columns import these).
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.SEVERITY_LEVELS = void 0;
7
+ // Qualitative bands, ascending, then `unknown` (no scorable CVSS vector and no
8
+ // qualitative rating). Doubles as the runtime allowlist for untrusted severity input.
9
+ exports.SEVERITY_LEVELS = ['none', 'low', 'medium', 'high', 'critical', 'unknown'];
10
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/types/codeSecurity/index.ts"],"names":[],"mappings":";AAAA,+EAA+E;AAC/E,2EAA2E;AAC3E,6EAA6E;;;AAM7E,+EAA+E;AAC/E,sFAAsF;AACzE,QAAA,eAAe,GAAG,CAAC,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,EAAE,UAAU,EAAE,SAAS,CAAU,CAAC"}
@@ -8,4 +8,35 @@ export declare enum DeployQueueStatus {
8
8
  }
9
9
  /** Status returned by the deploy-status polling endpoint. "none" means no queue entry exists. */
10
10
  export type DeployStatusResponseStatus = 'none' | DeployQueueStatus;
11
+ /**
12
+ * Identifies a sub-stage of the native-DB publish lifecycle that the UI
13
+ * surfaces independently of the overall deploy queue status. `provisioning`
14
+ * tracks `ensure_database` work; `migrating` tracks `migrate_schema` work.
15
+ */
16
+ export type LifecycleStageKind = 'provisioning' | 'migrating';
17
+ /**
18
+ * Aggregated state of a lifecycle stage across all prod bindings for a
19
+ * commit. Worst-case wins (any failed → failed, any in_progress →
20
+ * in_progress, all complete → complete, otherwise pending).
21
+ */
22
+ export type LifecycleStageState = 'pending' | 'in_progress' | 'complete' | 'failed';
23
+ export interface LifecycleStageProgress {
24
+ kind: LifecycleStageKind;
25
+ state: LifecycleStageState;
26
+ errorCode?: string;
27
+ errorMessage?: string;
28
+ }
29
+ /**
30
+ * Native-DB lifecycle progress for a publish. Sent alongside the deploy
31
+ * queue status so the UI can render provisioning and migration steps.
32
+ * Omitted from responses when no native-DB requirements exist for the commit.
33
+ *
34
+ * `stages` lists only lifecycle work queued for THIS commit — republishes
35
+ * that reuse an already-provisioned / already-migrated DB may return
36
+ * `hasNativeDb: true` with an empty `stages` array.
37
+ */
38
+ export interface DeployLifecycleProgress {
39
+ hasNativeDb: boolean;
40
+ stages: LifecycleStageProgress[];
41
+ }
11
42
  //# sourceMappingURL=deployQueueStatus.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"deployQueueStatus.d.ts","sourceRoot":"","sources":["../../../src/types/deployment/deployQueueStatus.ts"],"names":[],"mappings":"AAAA,oBAAY,iBAAiB;IAC3B,MAAM,WAAW;IACjB,SAAS,cAAc;IACvB,QAAQ,aAAa;IACrB,MAAM,WAAW;IACjB,iGAAiG;IACjG,YAAY,iBAAiB;CAC9B;AAED,iGAAiG;AACjG,MAAM,MAAM,0BAA0B,GAAG,MAAM,GAAG,iBAAiB,CAAC"}
1
+ {"version":3,"file":"deployQueueStatus.d.ts","sourceRoot":"","sources":["../../../src/types/deployment/deployQueueStatus.ts"],"names":[],"mappings":"AAAA,oBAAY,iBAAiB;IAC3B,MAAM,WAAW;IACjB,SAAS,cAAc;IACvB,QAAQ,aAAa;IACrB,MAAM,WAAW;IACjB,iGAAiG;IACjG,YAAY,iBAAiB;CAC9B;AAED,iGAAiG;AACjG,MAAM,MAAM,0BAA0B,GAAG,MAAM,GAAG,iBAAiB,CAAC;AAEpE;;;;GAIG;AACH,MAAM,MAAM,kBAAkB,GAAG,cAAc,GAAG,WAAW,CAAC;AAE9D;;;;GAIG;AACH,MAAM,MAAM,mBAAmB,GAAG,SAAS,GAAG,aAAa,GAAG,UAAU,GAAG,QAAQ,CAAC;AAEpF,MAAM,WAAW,sBAAsB;IACrC,IAAI,EAAE,kBAAkB,CAAC;IACzB,KAAK,EAAE,mBAAmB,CAAC;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED;;;;;;;;GAQG;AACH,MAAM,WAAW,uBAAuB;IACtC,WAAW,EAAE,OAAO,CAAC;IACrB,MAAM,EAAE,sBAAsB,EAAE,CAAC;CAClC"}
@@ -1,4 +1,4 @@
1
- export { DeployQueueStatus, type DeployStatusResponseStatus } from './deployQueueStatus.js';
1
+ export { DeployQueueStatus, type DeployLifecycleProgress, type DeployStatusResponseStatus, type LifecycleStageKind, type LifecycleStageProgress, type LifecycleStageState } from './deployQueueStatus.js';
2
2
  export interface DeploymentDto {
3
3
  commitId: string | null;
4
4
  previousCommitId?: string | null;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/types/deployment/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,KAAK,0BAA0B,EAAE,MAAM,wBAAwB,CAAC;AAE5F,MAAM,WAAW,aAAa;IAC5B,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,gBAAgB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACjC,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE;QACR,EAAE,EAAE,MAAM,CAAC;QACX,KAAK,EAAE,MAAM,CAAC;QACd,IAAI,EAAE,MAAM,CAAC;KACd,CAAC;IACF,YAAY,EAAE,MAAM,CAAC;IACrB,aAAa,EAAE,MAAM,CAAC;IACtB,cAAc,EAAE,MAAM,CAAC;IACvB,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAChC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/types/deployment/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,iBAAiB,EACjB,KAAK,uBAAuB,EAC5B,KAAK,0BAA0B,EAC/B,KAAK,kBAAkB,EACvB,KAAK,sBAAsB,EAC3B,KAAK,mBAAmB,EACzB,MAAM,wBAAwB,CAAC;AAEhC,MAAM,WAAW,aAAa;IAC5B,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,gBAAgB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACjC,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE;QACR,EAAE,EAAE,MAAM,CAAC;QACX,KAAK,EAAE,MAAM,CAAC;QACd,IAAI,EAAE,MAAM,CAAC;KACd,CAAC;IACF,YAAY,EAAE,MAAM,CAAC;IACrB,aAAa,EAAE,MAAM,CAAC;IACtB,cAAc,EAAE,MAAM,CAAC;IACvB,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAChC"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/types/deployment/index.ts"],"names":[],"mappings":";;;AAAA,+DAA4F;AAAnF,yHAAA,iBAAiB,OAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/types/deployment/index.ts"],"names":[],"mappings":";;;AAAA,+DAOgC;AAN9B,yHAAA,iBAAiB,OAAA"}
@@ -6,6 +6,7 @@ export * from './audit/index.js';
6
6
  export * from './auth/index.js';
7
7
  export * from './billing/index.js';
8
8
  export * from './ai/index.js';
9
+ export * from './codeSecurity/index.js';
9
10
  export * from './commit/index.js';
10
11
  export * from './branch/index.js';
11
12
  export * from './common/index.js';
@@ -22,23 +23,25 @@ export * from './lock/index.js';
22
23
  export * from './observability/index.js';
23
24
  export * from './organization/index.js';
24
25
  export * from './page/index.js';
26
+ export * from './pagination/index.js';
25
27
  export * from './policyGate/index.js';
26
28
  export * from './plugin/index.js';
27
29
  export * from './profile/index.js';
30
+ export * from './publishPipeline/index.js';
28
31
  export * from './rbac/index.js';
32
+ export * from './remoteCommit/index.js';
33
+ export * from './repoConnection/index.js';
34
+ export * from './repository/index.js';
29
35
  export * from './response/index.js';
30
36
  export * from './reviewPolicy/index.js';
31
- export * from './remoteCommit/index.js';
32
37
  export * from './scim/index.js';
33
38
  export * from './signingKeyRotationJob/index.js';
39
+ export * from './template/index.js';
40
+ export * from './uiBlock/index.js';
34
41
  export * from './user/index.js';
35
42
  export * from './userToken/index.js';
36
43
  export * from './version/index.js';
37
- export * from './repoConnection/index.js';
38
- export * from './repository/index.js';
39
44
  export * from './git/index.js';
40
- export * from './template/index.js';
41
45
  export * from './metadata/index.js';
42
46
  export * from './resource/index.js';
43
- export * from './uiBlock/index.js';
44
47
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,wBAAwB,CAAC;AACvC,cAAc,kBAAkB,CAAC;AACjC,cAAc,iBAAiB,CAAC;AAChC,cAAc,oBAAoB,CAAC;AACnC,cAAc,eAAe,CAAC;AAC9B,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,wBAAwB,CAAC;AACvC,cAAc,uBAAuB,CAAC;AACtC,cAAc,yBAAyB,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BAAyB,CAAC;AACxC,cAAc,uBAAuB,CAAC;AACtC,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC;AACjC,cAAc,iBAAiB,CAAC;AAChC,cAAc,wBAAwB,CAAC;AACvC,cAAc,iBAAiB,CAAC;AAChC,cAAc,0BAA0B,CAAC;AACzC,cAAc,yBAAyB,CAAC;AACxC,cAAc,iBAAiB,CAAC;AAChC,cAAc,uBAAuB,CAAC;AACtC,cAAc,uBAAuB,CAAC;AACtC,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC;AACnC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,iBAAiB,CAAC;AAChC,cAAc,yBAAyB,CAAC;AACxC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,uBAAuB,CAAC;AACtC,cAAc,qBAAqB,CAAC;AACpC,cAAc,yBAAyB,CAAC;AACxC,cAAc,iBAAiB,CAAC;AAChC,cAAc,kCAAkC,CAAC;AACjD,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC;AACnC,cAAc,iBAAiB,CAAC;AAChC,cAAc,sBAAsB,CAAC;AACrC,cAAc,oBAAoB,CAAC;AACnC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,qBAAqB,CAAC;AACpC,cAAc,qBAAqB,CAAC"}
@@ -22,6 +22,7 @@ __exportStar(require("./audit/index.js"), exports);
22
22
  __exportStar(require("./auth/index.js"), exports);
23
23
  __exportStar(require("./billing/index.js"), exports);
24
24
  __exportStar(require("./ai/index.js"), exports);
25
+ __exportStar(require("./codeSecurity/index.js"), exports);
25
26
  __exportStar(require("./commit/index.js"), exports);
26
27
  __exportStar(require("./branch/index.js"), exports);
27
28
  __exportStar(require("./common/index.js"), exports);
@@ -38,23 +39,25 @@ __exportStar(require("./lock/index.js"), exports);
38
39
  __exportStar(require("./observability/index.js"), exports);
39
40
  __exportStar(require("./organization/index.js"), exports);
40
41
  __exportStar(require("./page/index.js"), exports);
42
+ __exportStar(require("./pagination/index.js"), exports);
41
43
  __exportStar(require("./policyGate/index.js"), exports);
42
44
  __exportStar(require("./plugin/index.js"), exports);
43
45
  __exportStar(require("./profile/index.js"), exports);
46
+ __exportStar(require("./publishPipeline/index.js"), exports);
44
47
  __exportStar(require("./rbac/index.js"), exports);
48
+ __exportStar(require("./remoteCommit/index.js"), exports);
49
+ __exportStar(require("./repoConnection/index.js"), exports);
50
+ __exportStar(require("./repository/index.js"), exports);
45
51
  __exportStar(require("./response/index.js"), exports);
46
52
  __exportStar(require("./reviewPolicy/index.js"), exports);
47
- __exportStar(require("./remoteCommit/index.js"), exports);
48
53
  __exportStar(require("./scim/index.js"), exports);
49
54
  __exportStar(require("./signingKeyRotationJob/index.js"), exports);
55
+ __exportStar(require("./template/index.js"), exports);
56
+ __exportStar(require("./uiBlock/index.js"), exports);
50
57
  __exportStar(require("./user/index.js"), exports);
51
58
  __exportStar(require("./userToken/index.js"), exports);
52
59
  __exportStar(require("./version/index.js"), exports);
53
- __exportStar(require("./repoConnection/index.js"), exports);
54
- __exportStar(require("./repository/index.js"), exports);
55
60
  __exportStar(require("./git/index.js"), exports);
56
- __exportStar(require("./template/index.js"), exports);
57
61
  __exportStar(require("./metadata/index.js"), exports);
58
62
  __exportStar(require("./resource/index.js"), exports);
59
- __exportStar(require("./uiBlock/index.js"), exports);
60
63
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,mDAAiC;AACjC,iDAA+B;AAC/B,iDAA+B;AAC/B,yDAAuC;AACvC,mDAAiC;AACjC,kDAAgC;AAChC,qDAAmC;AACnC,gDAA8B;AAC9B,oDAAkC;AAClC,oDAAkC;AAClC,oDAAkC;AAClC,yDAAuC;AACvC,wDAAsC;AACtC,0DAAwC;AACxC,wDAAsC;AACtC,mDAAiC;AACjC,oDAAkC;AAClC,mDAAiC;AACjC,kDAAgC;AAChC,yDAAuC;AACvC,kDAAgC;AAChC,2DAAyC;AACzC,0DAAwC;AACxC,kDAAgC;AAChC,wDAAsC;AACtC,oDAAkC;AAClC,qDAAmC;AACnC,kDAAgC;AAChC,sDAAoC;AACpC,0DAAwC;AACxC,0DAAwC;AACxC,kDAAgC;AAChC,mEAAiD;AACjD,kDAAgC;AAChC,uDAAqC;AACrC,qDAAmC;AACnC,4DAA0C;AAC1C,wDAAsC;AACtC,iDAA+B;AAC/B,sDAAoC;AACpC,sDAAoC;AACpC,sDAAoC;AACpC,qDAAmC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,mDAAiC;AACjC,iDAA+B;AAC/B,iDAA+B;AAC/B,yDAAuC;AACvC,mDAAiC;AACjC,kDAAgC;AAChC,qDAAmC;AACnC,gDAA8B;AAC9B,0DAAwC;AACxC,oDAAkC;AAClC,oDAAkC;AAClC,oDAAkC;AAClC,yDAAuC;AACvC,wDAAsC;AACtC,0DAAwC;AACxC,wDAAsC;AACtC,mDAAiC;AACjC,oDAAkC;AAClC,mDAAiC;AACjC,kDAAgC;AAChC,yDAAuC;AACvC,kDAAgC;AAChC,2DAAyC;AACzC,0DAAwC;AACxC,kDAAgC;AAChC,wDAAsC;AACtC,wDAAsC;AACtC,oDAAkC;AAClC,qDAAmC;AACnC,6DAA2C;AAC3C,kDAAgC;AAChC,0DAAwC;AACxC,4DAA0C;AAC1C,wDAAsC;AACtC,sDAAoC;AACpC,0DAAwC;AACxC,kDAAgC;AAChC,mEAAiD;AACjD,sDAAoC;AACpC,qDAAmC;AACnC,kDAAgC;AAChC,uDAAqC;AACrC,qDAAmC;AACnC,iDAA+B;AAC/B,sDAAoC;AACpC,sDAAoC"}
@@ -0,0 +1,7 @@
1
+ export interface Pagination<T> {
2
+ items: T[];
3
+ total: number;
4
+ limit: number;
5
+ offset: number;
6
+ }
7
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/types/pagination/index.ts"],"names":[],"mappings":"AACA,MAAM,WAAW,UAAU,CAAC,CAAC;IAC3B,KAAK,EAAE,CAAC,EAAE,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CAChB"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/types/pagination/index.ts"],"names":[],"mappings":""}
@@ -0,0 +1,78 @@
1
+ /**
2
+ * Shared contract for the publish pipeline: one ordered list of steps the
3
+ * server computes for the UI status poll (GET publish-pipeline). Domains
4
+ * project into these types; rich payloads ride in opaque `detail` and are only
5
+ * read by that domain's UI renderer.
6
+ *
7
+ * Status-only — it does not start execution and does not gate deploy.
8
+ * Mutations (publish-readiness/start, POST deployments) start work and keep
9
+ * their own authoritative checks (build, policy, database lifecycle reconcile);
10
+ * this plan only reflects progress for the rail.
11
+ */
12
+ /** Which domain owns a step. Extend as new gates are added. */
13
+ export type PublishStepKind = 'build' | 'database_migration' | 'database_provisioning' | 'policy_gates' | 'publish';
14
+ /**
15
+ * Domain-agnostic status. Ordered here by roll-up precedence (worst first).
16
+ * `blocked` means this step's own check failed (remediation). Waiting on an
17
+ * earlier step is `pending` with optional `blockedBy`.
18
+ * `skipped` is a visible N/A row (e.g. Build when the app has no native-git remote).
19
+ */
20
+ export type PublishStepStatus = 'failed' | 'blocked' | 'action_required' | 'stale' | 'in_progress' | 'pending' | 'advisory' | 'passed' | 'skipped';
21
+ export type BuildPublishStepDetail = {
22
+ buildStatus: string | null;
23
+ error?: string;
24
+ };
25
+ export type PublishDeployStepDetail = {
26
+ error?: string;
27
+ isLive?: boolean;
28
+ queueStatus: string;
29
+ };
30
+ export type PublishStep = {
31
+ /** Stable unique id in the plan (a PublishStepId; typed as string so unknown ids still flow through). */
32
+ id: string;
33
+ kind: PublishStepKind;
34
+ status: PublishStepStatus;
35
+ /** Human label for the step row (server-derived). */
36
+ displayName: string;
37
+ /** Static help text under the display name (not an error). */
38
+ description?: string;
39
+ /** Short subtitle / one-line error. */
40
+ summary?: string;
41
+ /** When status is pending and waiting on earlier steps. */
42
+ blockedBy?: PublishStepKind[];
43
+ /** Machine code when blocked/failed (e.g. POLICY_GATE_BLOCKED). */
44
+ blockingReason?: string;
45
+ /** Opaque domain payload; generic pipeline must not read this. */
46
+ detail?: unknown;
47
+ };
48
+ export type PublishPlanTarget = {
49
+ applicationId: string;
50
+ commitId: string;
51
+ };
52
+ export type PublishPlan = {
53
+ status: PublishStepStatus;
54
+ steps: PublishStep[];
55
+ target: PublishPlanTarget;
56
+ };
57
+ /**
58
+ * Single source of truth for publish-plan step ids. These are wire values: the
59
+ * server emits them on each step and the UI matches on them to wire custom
60
+ * detail panels. Keys are lowerCamelCase; values are the lowercase snake_case
61
+ * wire literals. Add new steps here and they become available to both sides.
62
+ */
63
+ export declare const PublishStepId: {
64
+ readonly build: "build";
65
+ readonly databaseMigration: "database_migration";
66
+ readonly databaseProvisioning: "database_provisioning";
67
+ readonly policyGatesBeforeBuild: "policy_gates:before_build";
68
+ readonly policyGatesBeforeDeploy: "policy_gates:before_deploy";
69
+ readonly publish: "publish";
70
+ };
71
+ export type PublishStepId = (typeof PublishStepId)[keyof typeof PublishStepId];
72
+ /**
73
+ * Fixed spine order. Composer filters to steps that were emitted; order is always
74
+ * this sequence. Policy may emit before_build and/or before_deploy.
75
+ */
76
+ export declare const PUBLISH_STEP_SPINE: readonly PublishStepId[];
77
+ export * from './plan.js';
78
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/types/publishPipeline/index.ts"],"names":[],"mappings":"AA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AE,iBAAiB,CAAC;CAC3B,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,aAAa;;;;;;;CAOhB,CAAC;AAEX,MAAM,MAAM,aAAa,GAAG,CAAC,OAAO,aAAa,CAAC,CAAC,MAAM,OAAO,aAAa,CAAC,CAAC;AAE/E;;;GAGG;AACH,eAAO,MAAM,kBAAkB,EAAE,SAAS,aAAa,EAO7C,CAAC;AAEX,cAAc,WAAW,CAAC"}
@@ -0,0 +1,56 @@
1
+ "use strict";
2
+ /**
3
+ * Shared contract for the publish pipeline: one ordered list of steps the
4
+ * server computes for the UI status poll (GET publish-pipeline). Domains
5
+ * project into these types; rich payloads ride in opaque `detail` and are only
6
+ * read by that domain's UI renderer.
7
+ *
8
+ * Status-only — it does not start execution and does not gate deploy.
9
+ * Mutations (publish-readiness/start, POST deployments) start work and keep
10
+ * their own authoritative checks (build, policy, database lifecycle reconcile);
11
+ * this plan only reflects progress for the rail.
12
+ */
13
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
14
+ if (k2 === undefined) k2 = k;
15
+ var desc = Object.getOwnPropertyDescriptor(m, k);
16
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
17
+ desc = { enumerable: true, get: function() { return m[k]; } };
18
+ }
19
+ Object.defineProperty(o, k2, desc);
20
+ }) : (function(o, m, k, k2) {
21
+ if (k2 === undefined) k2 = k;
22
+ o[k2] = m[k];
23
+ }));
24
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
25
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
26
+ };
27
+ Object.defineProperty(exports, "__esModule", { value: true });
28
+ exports.PUBLISH_STEP_SPINE = exports.PublishStepId = void 0;
29
+ /**
30
+ * Single source of truth for publish-plan step ids. These are wire values: the
31
+ * server emits them on each step and the UI matches on them to wire custom
32
+ * detail panels. Keys are lowerCamelCase; values are the lowercase snake_case
33
+ * wire literals. Add new steps here and they become available to both sides.
34
+ */
35
+ exports.PublishStepId = {
36
+ build: 'build',
37
+ databaseMigration: 'database_migration',
38
+ databaseProvisioning: 'database_provisioning',
39
+ policyGatesBeforeBuild: 'policy_gates:before_build',
40
+ policyGatesBeforeDeploy: 'policy_gates:before_deploy',
41
+ publish: 'publish'
42
+ };
43
+ /**
44
+ * Fixed spine order. Composer filters to steps that were emitted; order is always
45
+ * this sequence. Policy may emit before_build and/or before_deploy.
46
+ */
47
+ exports.PUBLISH_STEP_SPINE = [
48
+ exports.PublishStepId.policyGatesBeforeBuild,
49
+ exports.PublishStepId.build,
50
+ exports.PublishStepId.policyGatesBeforeDeploy,
51
+ exports.PublishStepId.databaseProvisioning,
52
+ exports.PublishStepId.databaseMigration,
53
+ exports.PublishStepId.publish
54
+ ];
55
+ __exportStar(require("./plan.js"), exports);
56
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/types/publishPipeline/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;GAUG;;;;;;;;;;;;;;;;;AA+DH;;;;;GAKG;AACU,QAAA,aAAa,GAAG;IAC3B,KAAK,EAAE,OAAO;IACd,iBAAiB,EAAE,oBAAoB;IACvC,oBAAoB,EAAE,uBAAuB;IAC7C,sBAAsB,EAAE,2BAA2B;IACnD,uBAAuB,EAAE,4BAA4B;IACrD,OAAO,EAAE,SAAS;CACV,CAAC;AAIX;;;GAGG;AACU,QAAA,kBAAkB,GAA6B;IAC1D,qBAAa,CAAC,sBAAsB;IACpC,qBAAa,CAAC,KAAK;IACnB,qBAAa,CAAC,uBAAuB;IACrC,qBAAa,CAAC,oBAAoB;IAClC,qBAAa,CAAC,iBAAiB;IAC/B,qBAAa,CAAC,OAAO;CACb,CAAC;AAEX,4CAA0B"}
@@ -0,0 +1,18 @@
1
+ import type { PublishPlan, PublishPlanTarget, PublishStep, PublishStepStatus } from './index.js';
2
+ /** Collapse ordered steps into the single status shown on the plan. Empty = passed. */
3
+ export declare function rollUpPublishPlan(steps: PublishStep[]): PublishStepStatus;
4
+ /** Order steps by the fixed spine; unknown ids are appended in input order. */
5
+ export declare function orderPublishSteps(steps: PublishStep[]): PublishStep[];
6
+ /**
7
+ * For each step that is not yet clear, set `blockedBy` to kinds of earlier
8
+ * steps that are not clear and that actually gate it (concurrent steps such as
9
+ * build and policy gates do not gate each other). Premature `in_progress` (e.g.
10
+ * deploy already QUEUED while policy gates still run) is held as `pending` so
11
+ * the rail does not show "Publishing…" ahead of unfinished prerequisites. Failed
12
+ * and other terminal statuses are left alone. Clears blockedBy when the gating
13
+ * steps clear.
14
+ */
15
+ export declare function applyBlockedByEligibility(steps: PublishStep[]): PublishStep[];
16
+ /** Order, apply eligibility, roll up. */
17
+ export declare function buildPublishPlan(target: PublishPlanTarget, steps: PublishStep[]): PublishPlan;
18
+ //# sourceMappingURL=plan.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plan.d.ts","sourceRoot":"","sources":["../../../src/types/publishPipeline/plan.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,iBAAiB,EAAE,WAAW,EAAmB,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAkBlH,uFAAuF;AACvF,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,WAAW,EAAE,GAAG,iBAAiB,CAGzE;AAED,+EAA+E;AAC/E,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,WAAW,EAAE,GAAG,WAAW,EAAE,CAiBrE;AA6BD;;;;;;;;GAQG;AACH,wBAAgB,yBAAyB,CAAC,KAAK,EAAE,WAAW,EAAE,GAAG,WAAW,EAAE,CA2B7E;AAED,yCAAyC;AACzC,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,iBAAiB,EAAE,KAAK,EAAE,WAAW,EAAE,GAAG,WAAW,CAG7F"}
@@ -0,0 +1,110 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.rollUpPublishPlan = rollUpPublishPlan;
4
+ exports.orderPublishSteps = orderPublishSteps;
5
+ exports.applyBlockedByEligibility = applyBlockedByEligibility;
6
+ exports.buildPublishPlan = buildPublishPlan;
7
+ const index_js_1 = require("./index.js");
8
+ /** Worst-first. When summarizing many steps into one status, first match wins. */
9
+ const STATUS_PRECEDENCE = [
10
+ 'failed',
11
+ 'blocked',
12
+ 'action_required',
13
+ 'stale',
14
+ 'in_progress',
15
+ 'pending',
16
+ 'advisory',
17
+ 'passed',
18
+ 'skipped'
19
+ ];
20
+ const CLEAR_STATUSES = new Set(['passed', 'advisory', 'skipped']);
21
+ /** Collapse ordered steps into the single status shown on the plan. Empty = passed. */
22
+ function rollUpPublishPlan(steps) {
23
+ const present = new Set(steps.map((s) => s.status));
24
+ return STATUS_PRECEDENCE.find((s) => present.has(s)) ?? 'passed';
25
+ }
26
+ /** Order steps by the fixed spine; unknown ids are appended in input order. */
27
+ function orderPublishSteps(steps) {
28
+ const byId = new Map(steps.map((s) => [s.id, s]));
29
+ const ordered = [];
30
+ for (const id of index_js_1.PUBLISH_STEP_SPINE) {
31
+ const step = byId.get(id);
32
+ if (step) {
33
+ ordered.push(step);
34
+ byId.delete(id);
35
+ }
36
+ }
37
+ for (const step of steps) {
38
+ if (byId.has(step.id)) {
39
+ ordered.push(step);
40
+ byId.delete(step.id);
41
+ }
42
+ }
43
+ return ordered;
44
+ }
45
+ function isClear(status) {
46
+ return CLEAR_STATUSES.has(status);
47
+ }
48
+ /** Idle label when a step is held waiting on earlier work (not actively running). */
49
+ const PENDING_DISPLAY_NAMES = {
50
+ build: 'Build',
51
+ database_migration: 'Database migration',
52
+ database_provisioning: 'Database provisioning',
53
+ policy_gates: 'Policy Agents',
54
+ publish: 'Publish'
55
+ };
56
+ /**
57
+ * Kinds that execute concurrently and therefore must not appear as each other's
58
+ * prerequisite. The SABS build and the policy agents both key off the commit and
59
+ * run in parallel — policy agents analyze the committed code directly and do not
60
+ * wait for the build artifact — so neither should show "Waiting on" the other in
61
+ * the rail. They both still gate the final publish.
62
+ */
63
+ const CONCURRENT_KINDS = new Set(['build', 'policy_gates']);
64
+ /** An earlier unclear step gates a later step unless the two run concurrently. */
65
+ function earlierKindBlocks(earlier, current) {
66
+ return !(CONCURRENT_KINDS.has(earlier) && CONCURRENT_KINDS.has(current));
67
+ }
68
+ /**
69
+ * For each step that is not yet clear, set `blockedBy` to kinds of earlier
70
+ * steps that are not clear and that actually gate it (concurrent steps such as
71
+ * build and policy gates do not gate each other). Premature `in_progress` (e.g.
72
+ * deploy already QUEUED while policy gates still run) is held as `pending` so
73
+ * the rail does not show "Publishing…" ahead of unfinished prerequisites. Failed
74
+ * and other terminal statuses are left alone. Clears blockedBy when the gating
75
+ * steps clear.
76
+ */
77
+ function applyBlockedByEligibility(steps) {
78
+ // Kind set (not a list): multiple earlier steps can share a kind, but the
79
+ // rail waits on kinds — blockedBy must not repeat the same kind.
80
+ const unclearKinds = new Set();
81
+ return steps.map((step) => {
82
+ const blockers = [...unclearKinds].filter((kind) => earlierKindBlocks(kind, step.kind));
83
+ if (blockers.length > 0 && (step.status === 'pending' || step.status === 'in_progress')) {
84
+ const next = {
85
+ ...step,
86
+ status: 'pending',
87
+ blockedBy: blockers,
88
+ displayName: PENDING_DISPLAY_NAMES[step.kind]
89
+ };
90
+ unclearKinds.add(step.kind);
91
+ return next;
92
+ }
93
+ if (step.status === 'pending') {
94
+ const rest = { ...step };
95
+ delete rest.blockedBy;
96
+ unclearKinds.add(step.kind);
97
+ return rest;
98
+ }
99
+ if (!isClear(step.status)) {
100
+ unclearKinds.add(step.kind);
101
+ }
102
+ return step;
103
+ });
104
+ }
105
+ /** Order, apply eligibility, roll up. */
106
+ function buildPublishPlan(target, steps) {
107
+ const ordered = applyBlockedByEligibility(orderPublishSteps(steps));
108
+ return { status: rollUpPublishPlan(ordered), steps: ordered, target };
109
+ }
110
+ //# sourceMappingURL=plan.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plan.js","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C,MAAM,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,KAAK,SAAS,IAAI,IAAI,CAAC,MAAM,KAAK,aAAa,CAAC,EAAE,CAAC;YACxF,MAAM,IAAI,GAAgB;gBACxB,GAAG,IAAI;gBACP,MAAM,EAAE,SAAS;gBACjB,SAAS,EAAE,QAAQ;gBACnB,WAAW,EAAE,qBAAqB,CAAC,IAAI,CAAC,IAAI,CAAC;aAC9C,CAAC;YACF,YAAY,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YAC5B,OAAO,IAAI,CAAC;QACd,CAAC;QACD,IAAI,IAAI,CAAC,MAAM,KAAK,SAAS,EAAE,CAAC;YAC9B,MAAM,IAAI,GAAG,EAAE,GAAG,IAAI,EAAE,CAAC;YACzB,OAAO,IAAI,CAAC,SAAS,CAAC;YACtB,YAAY,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YAC5B,OAAO,IAAI,CAAC;QACd,CAAC;QACD,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC;YAC1B,YAAY,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAC9B,CAAC;QACD,OAAO,IAAI,CAAC;IACd,CAAC,CAAC,CAAC;AACL,CAAC;AAED,yCAAyC;AACzC,SAAgB,gBAAgB,CAAC,MAAyB,EAAE,KAAoB;IAC9E,MAAM,OAAO,GAAG,yBAAyB,CAAC,iBAAiB,CAAC,KAAK,CAAC,CAAC,CAAC;IACpE,OAAO,EAAE,MAAM,EAAE,iBAAiB,CAAC,OAAO,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,CAAC;AACxE,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=plan.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plan.test.d.ts","sourceRoot":"","sources":["../../../src/types/publishPipeline/plan.test.ts"],"names":[],"mappings":""}