Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -182,3 +182,4 @@ plugins/javy_chainlink_sdk/target/
pkg

.turbo
.deps/
9 changes: 8 additions & 1 deletion packages/cre-sdk/buf.gen.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ inputs:
- ../../submodules/chainlink-protos/cre/capabilities/internal/nodeaction/v1
- ../../submodules/chainlink-protos/cre/capabilities/networking/confidentialhttp/v1alpha
- ../../submodules/chainlink-protos/cre/capabilities/networking/http/v1alpha
- ../../submodules/chainlink-protos/cre/capabilities/scheduler/cron/v1
- ../../submodules/chainlink-protos/cre/sdk/v1alpha
- ../../submodules/chainlink-protos/cre/tools/generator/v1alpha
- ../../submodules/chainlink-protos/cre/values/v1
Expand All @@ -38,6 +37,14 @@ inputs:
- ../../submodules/chainlink-protos/workflows/workflows/v2/workflow_user_metric.proto
- ../../submodules/chainlink-protos/workflows/workflows/v2/cre_info.proto
- ../../submodules/chainlink-protos/workflows/workflows/v2/workflow_key.proto
# The cron capability owns its protos in the capabilities repo, which protofetch fetches at the revision
# protofetch.lock pins: this branch, capabilities-development, generates from its development protos at the root
# of what is fetched, which tag fields and methods with the feature they belong to, and the feature protos they
# import; main, from its releases in the production directory, at their versioned path, which never change.
- directory: ../../.deps
paths:
- ../../.deps/trigger.proto
- ../../.deps/capability/feature/feature.proto
# Trimmed copies of protos the SDK decodes internally (e.g. capabilities registry configs).
- directory: proto

Expand Down
3 changes: 2 additions & 1 deletion packages/cre-sdk/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,8 @@
"format": "biome format --write ${BIOME_PATHS:-.}",
"full-checks": "bun generate:sdk && bun run build && bun typecheck && bun check && bun test && bun test:standard",
"generate:chain-selectors": "bun scripts/run.ts generate-chain-selectors && BIOME_PATHS=\"src/generated\" bun check",
"generate:proto": "bun x @bufbuild/buf generate && BIOME_PATHS=\"src/generated\" bun check",
"fetch:protos": "../../scripts/fetch-protos.sh",
"generate:proto": "bun run fetch:protos && bun x @bufbuild/buf generate && BIOME_PATHS=\"src/generated\" bun check",
"generate:sdk": "bun generate:proto && bun generate:chain-selectors && bun scripts/run generate-sdks && BIOME_PATHS=\"src/generated src/generated-sdk src/sdk/test/generated\" bun check",
"lint": "biome lint --write",
"prepublishOnly": "bun typecheck && bun check && bun test && bun test:standard",
Expand Down
8 changes: 3 additions & 5 deletions packages/cre-sdk/scripts/src/generate-sdks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { file_capabilities_internal_nodeaction_v1_node_action } from '@cre/gener
import { file_capabilities_networking_confidentialhttp_v1alpha_client } from '@cre/generated/capabilities/networking/confidentialhttp/v1alpha/client_pb'
import { file_capabilities_networking_http_v1alpha_client } from '@cre/generated/capabilities/networking/http/v1alpha/client_pb'
import { file_capabilities_networking_http_v1alpha_trigger } from '@cre/generated/capabilities/networking/http/v1alpha/trigger_pb'
import { file_capabilities_scheduler_cron_v1_trigger } from '@cre/generated/capabilities/scheduler/cron/v1/trigger_pb'
import { file_trigger } from '@cre/generated/trigger_pb'
import {
type GeneratedMockExport,
generateMocks,
Expand Down Expand Up @@ -91,10 +91,8 @@ export const main = () => {
...generateMocks(file_capabilities_networking_http_v1alpha_trigger, TEST_GENERATED_DIR),
)

generateSdk(file_capabilities_scheduler_cron_v1_trigger, './src/generated-sdk')
allMockExports.push(
...generateMocks(file_capabilities_scheduler_cron_v1_trigger, TEST_GENERATED_DIR),
)
generateSdk(file_trigger, './src/generated-sdk')
allMockExports.push(...generateMocks(file_trigger, TEST_GENERATED_DIR))

generateSdk(file_capabilities_networking_confidentialhttp_v1alpha_client, './src/generated-sdk')
allMockExports.push(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,9 @@ import {
type Config,
type ConfigJson,
ConfigSchema,
type LegacyPayload,
LegacyPayloadSchema,
type Payload,
PayloadSchema,
} from '@cre/generated/capabilities/scheduler/cron/v1/trigger_pb'
} from '@cre/generated/trigger_pb'
import type { Trigger } from '@cre/sdk/utils/triggers/trigger-interface'
import type { NoExcess } from '@cre/sdk/utils/types/no-excess'

Expand Down

This file was deleted.

75 changes: 75 additions & 0 deletions packages/cre-sdk/src/generated/capability/feature/feature_pb.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
// @generated by protoc-gen-es v2.6.3 with parameter "target=ts,import_extension=none,json_types=true,keep_empty_files=false"
// @generated from file capability/feature/feature.proto (package cre.feature.v1, syntax proto3)
/* eslint-disable */

import type { GenExtension, GenFile } from '@bufbuild/protobuf/codegenv2'
import { extDesc, fileDesc } from '@bufbuild/protobuf/codegenv2'
import type {
EnumValueOptions,
FieldOptions,
FileOptions,
MethodOptions,
} from '@bufbuild/protobuf/wkt'
import { file_google_protobuf_descriptor } from '@bufbuild/protobuf/wkt'

/**
* Describes the file capability/feature/feature.proto.
*/
export const file_capability_feature_feature: GenFile =
/*@__PURE__*/
fileDesc(
'CiBjYXBhYmlsaXR5L2ZlYXR1cmUvZmVhdHVyZS5wcm90bxIOY3JlLmZlYXR1cmUudjE6NQoFZmllbGQSHS5nb29nbGUucHJvdG9idWYuRmllbGRPcHRpb25zGLSHAyABKAlSBWZpZWxkOjgKBm1ldGhvZBIeLmdvb2dsZS5wcm90b2J1Zi5NZXRob2RPcHRpb25zGLWHAyABKAlSBm1ldGhvZDo5CgV2YWx1ZRIhLmdvb2dsZS5wcm90b2J1Zi5FbnVtVmFsdWVPcHRpb25zGLeHAyABKAlSBXZhbHVlOjoKCHJlbGVhc2VkEhwuZ29vZ2xlLnByb3RvYnVmLkZpbGVPcHRpb25zGLaHAyADKAlSCHJlbGVhc2VkOj8KC2luX3Byb2dyZXNzEhwuZ29vZ2xlLnByb3RvYnVmLkZpbGVPcHRpb25zGLiHAyADKAlSCmluUHJvZ3Jlc3NCvgEKEmNvbS5jcmUuZmVhdHVyZS52MUIMRmVhdHVyZVByb3RvUAFaQGdpdGh1Yi5jb20vc21hcnRjb250cmFjdGtpdC9jYXBhYmlsaXRpZXMvbGlicy9jYXBhYmlsaXR5L2ZlYXR1cmWiAgNDRliqAg5DcmUuRmVhdHVyZS5WMcoCDkNyZVxGZWF0dXJlXFYx4gIaQ3JlXEZlYXR1cmVcVjFcR1BCTWV0YWRhdGHqAhBDcmU6OkZlYXR1cmU6OlYxYgZwcm90bzM',
[file_google_protobuf_descriptor],
)

/**
* field is the feature a field belongs to.
*
* 50000-99999 is the range for custom options.
*
* @generated from extension: string field = 50100;
*/
export const field: GenExtension<FieldOptions, string> =
/*@__PURE__*/
extDesc(file_capability_feature_feature, 0)

/**
* method is the feature a method belongs to.
*
* @generated from extension: string method = 50101;
*/
export const method: GenExtension<MethodOptions, string> =
/*@__PURE__*/
extDesc(file_capability_feature_feature, 1)

/**
* value is the feature an enum value belongs to. A released enum's first value, which must be zero, must be
* released with it.
*
* @generated from extension: string value = 50103;
*/
export const value: GenExtension<EnumValueOptions, string> =
/*@__PURE__*/
extDesc(file_capability_feature_feature, 2)

/**
* released are the capability's released features, one option for each, in one file of the capability:
*
* option (cre.feature.v1.released) = "launch";
*
* @generated from extension: repeated string released = 50102;
*/
export const released: GenExtension<FileOptions, string[]> =
/*@__PURE__*/
extDesc(file_capability_feature_feature, 3)

/**
* in_progress are the capability's features that aren't released yet, one option for each, in the same file:
*
* option (cre.feature.v1.in_progress) = "timezones";
*
* @generated from extension: repeated string in_progress = 50104;
*/
export const in_progress: GenExtension<FileOptions, string[]> =
/*@__PURE__*/
extDesc(file_capability_feature_feature, 4)
Loading