@pikku/core 0.12.126 → 0.12.127

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/CHANGELOG.md CHANGED
@@ -1,3 +1,10 @@
1
+ ## 0.12.127
2
+
3
+ ### Patch Changes
4
+
5
+ - f02585e: `pikku audit` tags every advisory and update with `dependencyType: 'prod' | 'dev'`, walking `bun.lock` from each workspace's runtime dependencies without descending into peers or build tools (vite, esbuild, babel, the TanStack Start plugin, the pikku CLI). The console's security view counts only production advisories and folds dev-only ones into a collapsed section.
6
+ - 5586749: A suspended workflow's pause step now reads as `running` while the run waits, and only becomes `succeeded` when the run resumes past it — previously it was marked succeeded the moment the run paused.
7
+
1
8
  ## 0.12.126
2
9
 
3
10
  ### Patch Changes
@@ -318,6 +318,8 @@ export type CommonWireMeta = {
318
318
  */
319
319
  export type SecuritySeverity = 'critical' | 'high' | 'moderate' | 'low' | 'info';
320
320
  export type SecurityUpdateLevel = 'major' | 'minor' | 'patch' | 'unknown';
321
+ /** `dev` = only reachable through devDependencies or build tooling, so never shipped. */
322
+ export type SecurityDependencyType = 'prod' | 'dev';
321
323
  export interface SecurityAuditIssue {
322
324
  package: string;
323
325
  severity: SecuritySeverity;
@@ -328,12 +330,14 @@ export interface SecurityAuditIssue {
328
330
  cwe: string[];
329
331
  cvssScore: number | null;
330
332
  recommendedVersion: string | null;
333
+ dependencyType?: SecurityDependencyType;
331
334
  }
332
335
  export interface SecurityAuditUpdate {
333
336
  package: string;
334
337
  current: string;
335
338
  latest: string;
336
339
  level: SecurityUpdateLevel;
340
+ dependencyType?: SecurityDependencyType;
337
341
  }
338
342
  export interface SecurityAuditSummary {
339
343
  totalIssues: number;
@@ -1,2 +1,2 @@
1
- export type { AuthInstance, CommonWireMeta, CoreConfig, CoreServices, CoreSingletonServices, CoreUserSession, CreateConfig, CreateSingletonServices, CreateWireServices, GetCredential, PikkuWire, PikkuWiringTypes, PostgresConfig, SecretlessServices, SecurityAuditIssue, SecurityAuditReport, SecurityAuditSummary, SecurityAuditUpdate, SecuritySeverity, SecurityUpdateLevel, ServerLifecycle, WireServices, } from './core.types.js';
1
+ export type { AuthInstance, CommonWireMeta, CoreConfig, CoreServices, CoreSingletonServices, CoreUserSession, CreateConfig, CreateSingletonServices, CreateWireServices, GetCredential, PikkuWire, PikkuWiringTypes, PostgresConfig, SecretlessServices, SecurityAuditIssue, SecurityAuditReport, SecurityAuditSummary, SecurityAuditUpdate, SecuritySeverity, SecurityUpdateLevel, SecurityDependencyType, ServerLifecycle, WireServices, } from './core.types.js';
2
2
  export type * from './state.types.js';
@@ -6,7 +6,7 @@ export type SuspendStore = Pick<ApprovalStore, 'getStepState' | 'insertStepState
6
6
  /**
7
7
  * Record a suspension point and unwind the run.
8
8
  *
9
- * A suspension that has already succeeded returns instead of throwing, so a
10
- * replay walks past a gate the run has already passed through.
9
+ * The gate stays `running` while the run waits, so it reads as in progress; the
10
+ * replay that follows a resume settles it and walks past.
11
11
  */
12
12
  export declare const recordSuspension: (store: SuspendStore, runId: string, reason: string, stepName: string, fromStepName: string | undefined) => Promise<void>;
@@ -4,8 +4,8 @@ export const suspendStepNameFor = (reason) => `__workflow_suspend:${reason}`;
4
4
  /**
5
5
  * Record a suspension point and unwind the run.
6
6
  *
7
- * A suspension that has already succeeded returns instead of throwing, so a
8
- * replay walks past a gate the run has already passed through.
7
+ * The gate stays `running` while the run waits, so it reads as in progress; the
8
+ * replay that follows a resume settles it and walks past.
9
9
  */
10
10
  export const recordSuspension = async (store, runId, reason, stepName, fromStepName) => {
11
11
  const insert = () => store.insertStepState(runId, stepName, 'pikkuWorkflowSuspend', { reason }, undefined, fromStepName);
@@ -22,12 +22,10 @@ export const recordSuspension = async (store, runId, reason, stepName, fromStepN
22
22
  if (stepState.status === 'succeeded') {
23
23
  return;
24
24
  }
25
- if (stepState.status === 'pending') {
26
- await store.setStepRunning(stepState.stepId);
25
+ if (stepState.status === 'running') {
26
+ await store.setStepResult(stepState.stepId, { reason });
27
+ return;
27
28
  }
28
- await store.setStepResult(stepState.stepId, {
29
- reason,
30
- suspendedAt: new Date().toISOString(),
31
- });
29
+ await store.setStepRunning(stepState.stepId);
32
30
  throw new WorkflowSuspendedException(runId, reason);
33
31
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pikku/core",
3
- "version": "0.12.126",
3
+ "version": "0.12.127",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/pikkujs/pikku.git",