-
Notifications
You must be signed in to change notification settings - Fork 69
[native_assets_cli] Hook schemas #2064
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
# CI for the native_* packages. | ||
# | ||
# Combined into a single workflow so that deps are configured and installed once. | ||
|
||
name: hook | ||
permissions: read-all | ||
|
||
on: | ||
pull_request: | ||
# No `branches:` to enable stacked PRs on GitHub. | ||
paths: | ||
- ".github/workflows/hook.yaml" | ||
- "pkgs/hook/**" | ||
- "pkgs/code_assets/**" | ||
- "pkgs/data_assets/**" | ||
push: | ||
branches: [main] | ||
paths: | ||
- ".github/workflows/native.yaml" | ||
- "pkgs/hook/**" | ||
- "pkgs/code_assets/**" | ||
- "pkgs/data_assets/**" | ||
schedule: | ||
- cron: "0 0 * * 0" # weekly | ||
|
||
jobs: | ||
build: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [ubuntu, windows] | ||
sdk: [dev] | ||
package: [hook, code_assets, data_assets] | ||
|
||
runs-on: ${{ matrix.os }}-latest | ||
|
||
defaults: | ||
run: | ||
working-directory: pkgs/${{ matrix.package }} | ||
|
||
steps: | ||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 | ||
|
||
- uses: dart-lang/setup-dart@e630b99d28a3b71860378cafdc2a067c71107f94 | ||
with: | ||
sdk: ${{ matrix.sdk }} | ||
|
||
- run: dart pub get | ||
|
||
- run: dart analyze --fatal-infos | ||
|
||
- run: dart format --output=none --set-exit-if-changed . | ||
|
||
- run: dart test | ||
|
||
- run: | | ||
dart tool/normalize.dart | ||
git diff --exit-code | ||
working-directory: pkgs/${{ matrix.package }}/ | ||
if: ${{ matrix.package == 'hook' && matrix.sdk == 'dev' }} | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
include: package:dart_flutter_team_lints/analysis_options.yaml | ||
|
||
analyzer: | ||
errors: | ||
todo: ignore | ||
language: | ||
strict-casts: true | ||
strict-inference: true | ||
strict-raw-types: true | ||
|
||
linter: | ||
rules: | ||
- dangling_library_doc_comments | ||
- prefer_const_declarations | ||
- prefer_expression_function_bodies | ||
- prefer_final_in_for_each | ||
- prefer_final_locals |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
These schemas document the protocol for build and link hooks with code assets. | ||
|
||
* If you are a hook author, you should likely be using a hook-helper-package | ||
Dart API (such as `package:native_toolchain_c`) instead of directly consuming | ||
and producing JSON. | ||
* If you are a hook-helper-package author, you should likely be using a | ||
hook-helper-package's Dart API (such as `package:native_assets_cli`) which | ||
abstracts away from syntactic changes. If you do want to directly interact | ||
with the JSON, you can find the relevant schemas in [hook/](hook/). | ||
* If you are an SDK author, you should likely be using the SDK helper package | ||
(`package:native_assets_builder`) which abstracts away from syntactic changes. | ||
If you do want to directly interact with the JSON, you can find the relevant | ||
schemas in [sdk/](sdk/). | ||
dcharkes marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
These schemas are an extension of the base protocol: | ||
|
||
* [`package:hook`/doc/schema](../../../hook/doc/schema/) | ||
dcharkes marked this conversation as resolved.
Show resolved
Hide resolved
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"$schema": "https://json-schema.org/draft-07/schema#", | ||
"title": "package:code_assets party:hook BuildInput", | ||
"allOf": [ | ||
{ | ||
"$ref": "shared_definitions.schema.json#/definitions/BuildInput" | ||
} | ||
] | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"$schema": "https://json-schema.org/draft-07/schema#", | ||
"title": "package:code_assets party:hook BuildOutput", | ||
"allOf": [ | ||
{ | ||
"$ref": "shared_definitions.schema.json#/definitions/BuildOutput" | ||
} | ||
] | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"$schema": "https://json-schema.org/draft-07/schema#", | ||
"title": "package:code_assets party:hook LinkInput", | ||
"allOf": [ | ||
{ | ||
"$ref": "shared_definitions.schema.json#/definitions/LinkInput" | ||
} | ||
] | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"$schema": "https://json-schema.org/draft-07/schema#", | ||
"title": "package:code_assets party:hook LinkOutput", | ||
"allOf": [ | ||
{ | ||
"$ref": "shared_definitions.schema.json#/definitions/LinkOutput" | ||
} | ||
] | ||
} |
86 changes: 86 additions & 0 deletions
86
pkgs/code_assets/doc/schema/hook/shared_definitions.schema.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
{ | ||
"$schema": "https://json-schema.org/draft-07/schema#", | ||
"title": "package:code_assets party:hook shared definitions", | ||
"allOf": [ | ||
{ | ||
"$ref": "../../../../hook/doc/schema/hook/shared_definitions.schema.json" | ||
}, | ||
{ | ||
"$ref": "../shared/shared_definitions.schema.json#" | ||
} | ||
], | ||
"definitions": { | ||
"BuildInput": { | ||
"allOf": [ | ||
{ | ||
"$ref": "#/definitions/HookInput" | ||
}, | ||
{ | ||
"$ref": "../../../../hook/doc/schema/hook/shared_definitions.schema.json#/definitions/BuildInput" | ||
}, | ||
{ | ||
"$ref": "../shared/shared_definitions.schema.json#/definitions/BuildInput" | ||
} | ||
] | ||
}, | ||
"BuildOutput": { | ||
"allOf": [ | ||
{ | ||
"$ref": "#/definitions/HookOutput" | ||
}, | ||
{ | ||
"$ref": "../../../../hook/doc/schema/hook/shared_definitions.schema.json#/definitions/BuildOutput" | ||
}, | ||
{ | ||
"$ref": "../shared/shared_definitions.schema.json#/definitions/BuildOutput" | ||
} | ||
] | ||
}, | ||
"HookInput": { | ||
"allOf": [ | ||
{ | ||
"$ref": "../../../../hook/doc/schema/hook/shared_definitions.schema.json#/definitions/HookInput" | ||
}, | ||
{ | ||
"$ref": "../shared/shared_definitions.schema.json#/definitions/HookInput" | ||
} | ||
] | ||
}, | ||
"HookOutput": { | ||
"allOf": [ | ||
{ | ||
"$ref": "../../../../hook/doc/schema/hook/shared_definitions.schema.json#/definitions/HookOutput" | ||
}, | ||
{ | ||
"$ref": "../shared/shared_definitions.schema.json#/definitions/HookOutput" | ||
} | ||
] | ||
}, | ||
"LinkInput": { | ||
"allOf": [ | ||
{ | ||
"$ref": "#/definitions/HookInput" | ||
}, | ||
{ | ||
"$ref": "../../../../hook/doc/schema/hook/shared_definitions.schema.json#/definitions/LinkInput" | ||
}, | ||
{ | ||
"$ref": "../shared/shared_definitions.schema.json#/definitions/LinkInput" | ||
} | ||
] | ||
}, | ||
"LinkOutput": { | ||
"allOf": [ | ||
{ | ||
"$ref": "#/definitions/HookOutput" | ||
}, | ||
{ | ||
"$ref": "../../../../hook/doc/schema/hook/shared_definitions.schema.json#/definitions/LinkOutput" | ||
}, | ||
{ | ||
"$ref": "../shared/shared_definitions.schema.json#/definitions/LinkOutput" | ||
} | ||
] | ||
} | ||
} | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
dcharkes marked this conversation as resolved.
Show resolved
Hide resolved
|
||
"$schema": "https://json-schema.org/draft-07/schema#", | ||
"title": "package:code_assets party:sdk BuildInput", | ||
"allOf": [ | ||
{ | ||
"$ref": "shared_definitions.schema.json#/definitions/BuildInput" | ||
} | ||
] | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"$schema": "https://json-schema.org/draft-07/schema#", | ||
"title": "package:code_assets party:sdk BuildOutput", | ||
"allOf": [ | ||
{ | ||
"$ref": "shared_definitions.schema.json#/definitions/BuildOutput" | ||
} | ||
] | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"$schema": "https://json-schema.org/draft-07/schema#", | ||
"title": "package:code_assets party:sdk LinkInput", | ||
"allOf": [ | ||
{ | ||
"$ref": "shared_definitions.schema.json#/definitions/LinkInput" | ||
} | ||
] | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"$schema": "https://json-schema.org/draft-07/schema#", | ||
"title": "package:code_assets party:sdk LinkOutput", | ||
"allOf": [ | ||
{ | ||
"$ref": "shared_definitions.schema.json#/definitions/LinkOutput" | ||
} | ||
] | ||
} |
86 changes: 86 additions & 0 deletions
86
pkgs/code_assets/doc/schema/sdk/shared_definitions.schema.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
{ | ||
"$schema": "https://json-schema.org/draft-07/schema#", | ||
"title": "package:code_assets party:sdk shared definitions", | ||
"allOf": [ | ||
{ | ||
"$ref": "../../../../hook/doc/schema/sdk/shared_definitions.schema.json" | ||
}, | ||
{ | ||
"$ref": "../shared/shared_definitions.schema.json#" | ||
} | ||
], | ||
"definitions": { | ||
"BuildInput": { | ||
"allOf": [ | ||
{ | ||
"$ref": "#/definitions/HookInput" | ||
}, | ||
{ | ||
"$ref": "../../../../hook/doc/schema/sdk/shared_definitions.schema.json#/definitions/BuildInput" | ||
}, | ||
{ | ||
"$ref": "../shared/shared_definitions.schema.json#/definitions/BuildInput" | ||
} | ||
] | ||
}, | ||
"BuildOutput": { | ||
"allOf": [ | ||
{ | ||
"$ref": "#/definitions/HookOutput" | ||
}, | ||
{ | ||
"$ref": "../../../../hook/doc/schema/sdk/shared_definitions.schema.json#/definitions/BuildOutput" | ||
}, | ||
{ | ||
"$ref": "../shared/shared_definitions.schema.json#/definitions/BuildOutput" | ||
} | ||
] | ||
}, | ||
"HookInput": { | ||
"allOf": [ | ||
{ | ||
"$ref": "../../../../hook/doc/schema/sdk/shared_definitions.schema.json#/definitions/HookInput" | ||
}, | ||
{ | ||
"$ref": "../shared/shared_definitions.schema.json#/definitions/HookInput" | ||
} | ||
] | ||
}, | ||
"HookOutput": { | ||
"allOf": [ | ||
{ | ||
"$ref": "../../../../hook/doc/schema/sdk/shared_definitions.schema.json#/definitions/HookOutput" | ||
}, | ||
{ | ||
"$ref": "../shared/shared_definitions.schema.json#/definitions/HookOutput" | ||
} | ||
] | ||
}, | ||
"LinkInput": { | ||
"allOf": [ | ||
{ | ||
"$ref": "#/definitions/HookInput" | ||
}, | ||
{ | ||
"$ref": "../../../../hook/doc/schema/sdk/shared_definitions.schema.json#/definitions/LinkInput" | ||
}, | ||
{ | ||
"$ref": "../shared/shared_definitions.schema.json#/definitions/LinkInput" | ||
} | ||
] | ||
}, | ||
"LinkOutput": { | ||
"allOf": [ | ||
{ | ||
"$ref": "#/definitions/HookOutput" | ||
}, | ||
{ | ||
"$ref": "../../../../hook/doc/schema/sdk/shared_definitions.schema.json#/definitions/LinkOutput" | ||
}, | ||
{ | ||
"$ref": "../shared/shared_definitions.schema.json#/definitions/LinkOutput" | ||
} | ||
] | ||
} | ||
} | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.