@spinnaker/core 2025.4.2 → 2026.0.1

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.
@@ -8,6 +8,7 @@ export declare class PipelineConfigService {
8
8
  private static configViewStateCache;
9
9
  private static buildViewStateCacheKey;
10
10
  static getPipelinesForApplication(applicationName: string): PromiseLike<IPipeline[]>;
11
+ static getPipelineForApplication(applicationName: string, pipelineName: string): PromiseLike<IPipeline>;
11
12
  static getStrategiesForApplication(applicationName: string): PromiseLike<IPipeline[]>;
12
13
  static getHistory(id: string, isStrategy: boolean, count?: number): PromiseLike<IPipeline[]>;
13
14
  static deletePipeline(applicationName: string, pipeline: IPipeline, pipelineName: string): PromiseLike<void>;
@@ -10,7 +10,16 @@ export interface IPipelineTriggerTemplateState {
10
10
  export declare class PipelineTriggerTemplate extends React.Component<ITriggerTemplateComponentProps, IPipelineTriggerTemplateState> {
11
11
  static formatLabel(trigger: IPipelineTrigger): PromiseLike<string>;
12
12
  constructor(props: ITriggerTemplateComponentProps);
13
+ /**
14
+ * Fetches available executions for the source pipeline and sets up form state.
15
+ * @param command - Use when calling from componentWillReceiveProps to avoid stale props.
16
+ */
13
17
  private initialize;
18
+ /**
19
+ * Only re-initialize when trigger.pipeline changes (user selects different source pipeline).
20
+ * Formik creates new command object references on every keystroke; comparing object
21
+ * references would reset the dropdown on any form field change.
22
+ */
14
23
  componentWillReceiveProps(nextProps: ITriggerTemplateComponentProps): void;
15
24
  componentDidMount(): void;
16
25
  private executionLoadSuccess;
package/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "url": "https://github.com/spinnaker/spinnaker.git"
6
6
  },
7
7
  "license": "Apache-2.0",
8
- "version": "2025.4.2",
8
+ "version": "2026.0.1",
9
9
  "module": "dist/index.js",
10
10
  "typings": "dist/index.d.ts",
11
11
  "publishConfig": {
@@ -59,7 +59,7 @@
59
59
  "jquery-textcomplete": "1.6.1",
60
60
  "js-worker-search": "npm:js-worker-search-uuid-fix@^1.4.2",
61
61
  "js-yaml": "3.13.1",
62
- "lodash": "4.17.21",
62
+ "lodash": "4.17.23",
63
63
  "lodash-decorators": "4.5.0",
64
64
  "luxon": "1.23.0",
65
65
  "memoize-one": "6.0.0",
@@ -128,5 +128,5 @@
128
128
  "shx": "0.3.3",
129
129
  "typescript": "5.0.4"
130
130
  },
131
- "gitHead": "a7388ff26519c47068b13e21458b8471ff1f74c0"
131
+ "gitHead": "230864a7fc8b5dfb38edb1164c7719671f7b4fa3"
132
132
  }
@@ -142,6 +142,24 @@ describe('PipelineConfigService', () => {
142
142
  });
143
143
  });
144
144
 
145
+ describe('getPipeline', () => {
146
+ it('makes correct get pipeline request', async () => {
147
+ const http = mockHttpClient();
148
+ const pipeline: IPipeline = buildPipeline({});
149
+
150
+ let result: IPipeline = null;
151
+ http.expectGET('/applications/foo/pipelineConfigs/bar%20name').respond(200, pipeline);
152
+
153
+ PipelineConfigService.getPipelineForApplication('foo', 'bar name').then((pipelines: IPipeline) => {
154
+ result = pipelines;
155
+ });
156
+
157
+ $scope.$digest();
158
+ await http.flush();
159
+ expect(result).toEqual(pipeline);
160
+ });
161
+ });
162
+
145
163
  describe('stage dependencies', () => {
146
164
  let a: IStage, b: IStage, c: IStage, d: IStage;
147
165
  let pipeline: IPipeline;
@@ -30,6 +30,10 @@ export class PipelineConfigService {
30
30
  });
31
31
  }
32
32
 
33
+ public static getPipelineForApplication(applicationName: string, pipelineName: string): PromiseLike<IPipeline> {
34
+ return REST('/applications').path(applicationName, 'pipelineConfigs', pipelineName).get();
35
+ }
36
+
33
37
  public static getStrategiesForApplication(applicationName: string): PromiseLike<IPipeline[]> {
34
38
  return REST('/applications')
35
39
  .path(applicationName, 'strategyConfigs')