better-result-cf-workflows 0.0.0-stage → 0.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.
- package/.forgejo/workflows/lint_test.yaml +27 -0
- package/.forgejo/workflows/main.yaml +13 -0
- package/.forgejo/workflows/pr.yaml +8 -0
- package/.husky/pre-commit +1 -0
- package/.oxfmtrc.json +6 -0
- package/.oxlintrc.json +29 -0
- package/.vscode/settings.json +3 -0
- package/CONTRIBUTING.md +14 -0
- package/LICENSE +674 -0
- package/README.md +100 -2
- package/package.json +53 -3
- package/pnpm-workspace.yaml +3 -0
- package/src/codec.ts +191 -0
- package/src/index.ts +19 -0
- package/src/step/compat.ts +70 -0
- package/src/step/do.ts +124 -0
- package/src/step/index.ts +36 -0
- package/src/step/wait-for-event.ts +27 -0
- package/src/wf-class.ts +73 -0
- package/tests/translation.test.ts +72 -0
- package/tests/tsconfig.json +7 -0
- package/tests/utils.ts +23 -0
- package/tests/wf-class.test.ts +105 -0
- package/tests/worker-configuration.d.ts +16564 -0
- package/tests/workflows.ts +56 -0
- package/tests/wrangler.test.jsonc +12 -0
- package/tsconfig.json +16 -0
- package/tsconfig.tsbuildinfo +1 -0
- package/vitest.config.ts +21 -0
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
on:
|
|
2
|
+
workflow_call:
|
|
3
|
+
inputs:
|
|
4
|
+
runs-on:
|
|
5
|
+
type: string
|
|
6
|
+
|
|
7
|
+
jobs:
|
|
8
|
+
test:
|
|
9
|
+
runs-on: ${{ inputs.runs-on }}
|
|
10
|
+
steps:
|
|
11
|
+
- uses: https://code.forgejo.org/actions/checkout@v7
|
|
12
|
+
- uses: https://github.com/pnpm/setup@v3
|
|
13
|
+
with:
|
|
14
|
+
runtime: "node@26"
|
|
15
|
+
cache: true
|
|
16
|
+
- name: "Test!!!!!"
|
|
17
|
+
run: pnpm test
|
|
18
|
+
lint:
|
|
19
|
+
runs-on: ${{ inputs.runs-on }}
|
|
20
|
+
steps:
|
|
21
|
+
- uses: https://code.forgejo.org/actions/checkout@v7
|
|
22
|
+
- uses: https://github.com/pnpm/setup@v3
|
|
23
|
+
with:
|
|
24
|
+
runtime: "node@26"
|
|
25
|
+
cache: true
|
|
26
|
+
- name: "Lint!!"
|
|
27
|
+
run: pnpm lint:check
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
on:
|
|
2
|
+
push:
|
|
3
|
+
branches: [main]
|
|
4
|
+
|
|
5
|
+
jobs:
|
|
6
|
+
lint_test:
|
|
7
|
+
uses: ./.forgejo/workflows/lint_test.yaml
|
|
8
|
+
with:
|
|
9
|
+
# it is interesting... I would have though -tiny is enough,
|
|
10
|
+
# however I believe that -tiny was actually too small for a simple lint & test
|
|
11
|
+
# I can't tell if thats a really poor reflection on go's part,
|
|
12
|
+
# or if codeberg-tiny is truly so tiny that it can't run test & lint
|
|
13
|
+
runs-on: codeberg-small
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
pnpm lint-staged
|
package/.oxfmtrc.json
ADDED
package/.oxlintrc.json
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "./node_modules/oxlint/configuration_schema.json",
|
|
3
|
+
"jsPlugins": [
|
|
4
|
+
{
|
|
5
|
+
"name": "simple-header",
|
|
6
|
+
"specifier": "eslint-plugin-simple-header"
|
|
7
|
+
}
|
|
8
|
+
],
|
|
9
|
+
"rules": {
|
|
10
|
+
"typescript/explicit-function-return-type": [
|
|
11
|
+
"error",
|
|
12
|
+
{
|
|
13
|
+
"allowIIFEs": true
|
|
14
|
+
}
|
|
15
|
+
],
|
|
16
|
+
"require-yield": "off",
|
|
17
|
+
"simple-header/header": [
|
|
18
|
+
"error",
|
|
19
|
+
{
|
|
20
|
+
"text": [
|
|
21
|
+
"This file is part of better-result-cf-workflows.",
|
|
22
|
+
"better-result-cf-workflows is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.",
|
|
23
|
+
"better-result-cf-workflows is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.",
|
|
24
|
+
"You should have received a copy of the GNU General Public License along with better-result-cf-workflows. If not, see <https://www.gnu.org/licenses/>."
|
|
25
|
+
]
|
|
26
|
+
}
|
|
27
|
+
]
|
|
28
|
+
}
|
|
29
|
+
}
|
package/CONTRIBUTING.md
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# Contributing
|
|
2
|
+
|
|
3
|
+
This project is managed by [pnpm](https://pnpm.io/). When opening a PR
|
|
4
|
+
|
|
5
|
+
## PR Requirements
|
|
6
|
+
|
|
7
|
+
- Please keep PRs small
|
|
8
|
+
- For any new bug fix, you need a test.
|
|
9
|
+
- Try to ensure forward compatibility with CF Workflows
|
|
10
|
+
- For new features, please have an accepted issue first!
|
|
11
|
+
|
|
12
|
+
## AI Use
|
|
13
|
+
|
|
14
|
+
No AI was used in any of this code. However, that does not mean AI contributing will be automatically rejected - I can't tell with 100% accuracy if something is or is not AI. The only exception is if a PR was clearly vibe coded, or it is actual slop. I will reject those, even if the features are "useful"
|