@shipfox/api-definitions 10.2.0 → 11.0.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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@shipfox/api-definitions",
3
3
  "license": "MIT",
4
- "version": "10.2.0",
4
+ "version": "11.0.0",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "git+https://github.com/ShipfoxHQ/shipfox.git",
@@ -27,13 +27,13 @@
27
27
  "yaml": "^2.8.3",
28
28
  "zod": "^4.4.3",
29
29
  "@shipfox/api-agent-dto": "10.0.0",
30
- "@shipfox/api-auth-context": "10.2.0",
31
- "@shipfox/api-definitions-dto": "10.0.0",
30
+ "@shipfox/api-auth-context": "11.0.0",
31
+ "@shipfox/api-definitions-dto": "11.0.0",
32
32
  "@shipfox/api-integration-core-dto": "9.0.2",
33
33
  "@shipfox/api-projects-dto": "10.1.0",
34
34
  "@shipfox/api-secrets-dto": "9.0.2",
35
35
  "@shipfox/config": "1.2.4",
36
- "@shipfox/expression": "1.2.0",
36
+ "@shipfox/expression": "1.2.1",
37
37
  "@shipfox/inter-module": "0.2.2",
38
38
  "@shipfox/node-drizzle": "0.3.4",
39
39
  "@shipfox/node-fastify": "0.4.0",
@@ -1954,6 +1954,33 @@ describe('normalizeWorkflowDocument', () => {
1954
1954
  });
1955
1955
  });
1956
1956
 
1957
+ it('allows integer equality literals for number step outputs in gate success expressions', () => {
1958
+ const document: WorkflowDocument = {
1959
+ name: 'number output equality',
1960
+ jobs: {
1961
+ build: {
1962
+ steps: [
1963
+ {
1964
+ key: 'collect',
1965
+ run: 'npm run collect',
1966
+ outputs: {issue_number: {type: 'number'}},
1967
+ gate: {success: 'step.outputs.issue_number == 1'},
1968
+ },
1969
+ ],
1970
+ },
1971
+ },
1972
+ };
1973
+
1974
+ const model = normalizeWorkflowDocument(document);
1975
+
1976
+ expect(model.jobs[0]?.steps[0]?.gate?.success).toEqual({
1977
+ language: 'cel',
1978
+ source: 'step.outputs.issue_number == 1',
1979
+ check: 'typed',
1980
+ resultType: 'bool',
1981
+ });
1982
+ });
1983
+
1957
1984
  it('rejects untrusted step outputs in trusted-only run fields', () => {
1958
1985
  const document: WorkflowDocument = {
1959
1986
  name: 'untrusted step output',
@@ -27,7 +27,7 @@ describe('POST /api/definitions', () => {
27
27
  buildUserContext({
28
28
  userId: crypto.randomUUID(),
29
29
  email: 'user@example.com',
30
- memberships: [{workspaceId, role: 'admin'}],
30
+ memberships: [{workspaceId, role: 'admin', workspaceStatus: 'active'}],
31
31
  }),
32
32
  );
33
33
  done();
@@ -92,7 +92,7 @@ jobs:
92
92
  buildUserContext({
93
93
  userId: crypto.randomUUID(),
94
94
  email: 'user@example.com',
95
- memberships: [{workspaceId, role: 'admin'}],
95
+ memberships: [{workspaceId, role: 'admin', workspaceStatus: 'active'}],
96
96
  }),
97
97
  );
98
98
  done();
@@ -165,7 +165,7 @@ jobs:
165
165
  buildUserContext({
166
166
  userId: crypto.randomUUID(),
167
167
  email: 'user@example.com',
168
- memberships: [{workspaceId, role: 'admin'}],
168
+ memberships: [{workspaceId, role: 'admin', workspaceStatus: 'active'}],
169
169
  }),
170
170
  );
171
171
  done();
@@ -37,7 +37,7 @@ describe('GET /api/definitions/:id', () => {
37
37
  buildUserContext({
38
38
  userId: crypto.randomUUID(),
39
39
  email: 'user@example.com',
40
- memberships: [{workspaceId, role: 'admin'}],
40
+ memberships: [{workspaceId, role: 'admin', workspaceStatus: 'active'}],
41
41
  }),
42
42
  );
43
43
  done();
@@ -46,7 +46,7 @@ describe('GET /api/definitions', () => {
46
46
  buildUserContext({
47
47
  userId: crypto.randomUUID(),
48
48
  email: 'user@example.com',
49
- memberships: [{workspaceId, role: 'admin'}],
49
+ memberships: [{workspaceId, role: 'admin', workspaceStatus: 'active'}],
50
50
  }),
51
51
  );
52
52
  done();