Compare commits

...

10 commits

Author SHA1 Message Date
Loren Norman
d01c11e44a bump snapshots after remote fix
Some checks failed
Build Docs and Deploy to Pages / build (push) Has been cancelled
Build Docs and Deploy to Pages / Deploy (push) Has been cancelled
2025-07-18 16:39:57 -04:00
Loren Norman
0011c05844
Merge pull request #2 from adafruit/fix-non-block-edit-links
Update config.js - point to main branch for docs pages edit links
2025-07-18 16:06:44 -04:00
Tyeth Gundry
23e1b1e4e1
Update config.js - point to main branch for docs pages edit links 2025-07-18 20:46:58 +01:00
Loren Norman
5ab740e9ac change sandbox icon 2025-07-18 15:38:45 -04:00
Loren Norman
1ea092635d
fix description key name 2025-07-18 15:37:07 -04:00
Loren Norman
5de95e226f build from main 2025-07-18 15:30:36 -04:00
Loren Norman
f79bc858b8 autobuild docs site when main changes 2025-07-18 15:29:39 -04:00
Loren Norman
2845533271 fix test 2025-07-18 15:28:39 -04:00
Loren Norman
e4ddf9999e bump snapshots to include help url 2025-07-18 15:25:02 -04:00
Loren Norman
cca6e61578 update name and repo everywhere 2025-07-18 15:23:11 -04:00
9 changed files with 144 additions and 80 deletions

View file

@ -4,7 +4,7 @@ name: Build Docs and Deploy to Pages
on:
workflow_dispatch:
push:
branches: ["docs"]
branches: ["main"]
# later: auto-build on version tags
@ -28,7 +28,6 @@ jobs:
uses: actions/checkout@v4
with:
fetch-depth: 0 # required for VitePress lastUpdated support
ref: docs
- name: Setup Node
uses: actions/setup-node@v4

View file

@ -61,7 +61,7 @@ jobs:
branchPrefix: ${{ matrix.branch != 'main' && matrix.branch || '' }}
run: |
npm ci
npm run build -- --base /blockly-tool/${branchPrefix}
npm run build -- --base /io-actions/${branchPrefix}
- name: Upload artifact
uses: actions/upload-artifact@v4

View file

@ -4,7 +4,7 @@ export default {
name: "Set Feed Value",
inputsInline: true,
colour: 300,
descritpion: "Publish the specified data point to the specified Feed.",
description: "Publish the specified data point to the specified Feed.",
mixins: ['replaceDropdownOptions'],
extensions: ['populateFeedDropdown'],

View file

@ -2,7 +2,7 @@ import { defineConfig } from 'vitepress'
import blocksSidebar from '../blocks/_blocks_sidebar.json'
const REPO = 'https://github.com/lorennorman/blockly-tool'
const REPO = 'https://github.com/adafruit/io-actions'
// https://vitepress.dev/reference/site-config
export default defineConfig({
@ -13,7 +13,7 @@ export default defineConfig({
['link', { rel: 'icon', href: "data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 100 100%22><text y=%22.9em%22 font-size=%2290%22>🧩</text></svg>" }]
],
base: "/blockly-tool/",
base: "/io-actions/",
lastUpdated: true,
@ -31,15 +31,15 @@ export default defineConfig({
// docs come from the js, md is not the true source
const jsPath = filePath.replace(/.md$/, '.js')
// and we want to link to the main branch, not docs
return `https://github.com/lorennorman/blockly-tool/edit/main/app/${jsPath}`
return `https://github.com/adafruit/io-actions/edit/main/app/${jsPath}`
}
return `https://github.com/lorennorman/blockly-tool/edit/docs/docs/${filePath}`
return `https://github.com/adafruit/io-actions/edit/main/docs/${filePath}`
}
},
nav: [
{ text: '🪏', link: '/sandbox' },
{ text: '🧩', link: '/sandbox' },
{ text: 'Home', link: '/' },
{ text: 'Getting Started', link: '/getting-started' },
{ text: 'The Blocks', link: '/block-index' },

4
package-lock.json generated
View file

@ -1,11 +1,11 @@
{
"name": "blockly-tool",
"name": "io-actions",
"version": "1.0.0",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "blockly-tool",
"name": "io-actions",
"version": "1.0.0",
"dependencies": {
"@blockly/theme-modern": "^5.0.5",

View file

@ -1,5 +1,5 @@
{
"name": "blockly-tool",
"name": "io-actions",
"version": "1.0.0",
"description": "A Blockly tooling project",
"type": "module",

View file

@ -1,5 +1,4 @@
# todo:
- io-actions repo, gh:p deploy
- purge legacy converters:
- ...
- block generator
@ -8,6 +7,8 @@
- bailouts for:
- blockly json
- docs markdown
- dev server
- clean gh:a, ensure tests run correctly
### Action Specification

View file

@ -1,10 +1,15 @@
const processHelp = definition => {
// TODO: rely on project configuration for docs site location
const
docsBlocksRoot = "https://adafruit.github.io/io-actions/blocks",
thisBlockPredicate = definition.definitionPath.slice(0, -3)
const
// TODO: rely on project configuration for docs site location
DOCS_BLOCKS_ROOT = "https://adafruit.github.io/io-actions/blocks",
return { helpUrl: `${docsBlocksRoot}/${thisBlockPredicate}` }
}
processHelp = definition => {
if (!definition.definitionPath) { return {} }
const thisBlockPredicate = definition.definitionPath.slice(0, -3)
return {
helpUrl: `${DOCS_BLOCKS_ROOT}/${thisBlockPredicate}`
}
}
export default processHelp

View file

@ -28,7 +28,8 @@ exports[`Block Snapshots > Blockly JSON > action_email 1`] = `
"name": "BODY",
"align": "RIGHT"
}
]
],
"helpUrl": "https://adafruit.github.io/io-actions/blocks/action/email"
}
`;
@ -47,7 +48,8 @@ exports[`Block Snapshots > Blockly JSON > action_log 1`] = `
"name": "EXPRESSION",
"align": "RIGHT"
}
]
],
"helpUrl": "https://adafruit.github.io/io-actions/blocks/action/log"
}
`;
@ -81,7 +83,8 @@ exports[`Block Snapshots > Blockly JSON > action_publish 1`] = `
"name": "FEED",
"align": "RIGHT"
}
]
],
"helpUrl": "https://adafruit.github.io/io-actions/blocks/action/publish"
}
`;
@ -130,7 +133,8 @@ exports[`Block Snapshots > Blockly JSON > action_root 1`] = `
"align": "RIGHT"
}
],
"mutator": "action_root"
"mutator": "action_root",
"helpUrl": "https://adafruit.github.io/io-actions/blocks/root/root"
}
`;
@ -156,7 +160,8 @@ exports[`Block Snapshots > Blockly JSON > action_sms 1`] = `
"name": "BODY",
"align": "RIGHT"
}
]
],
"helpUrl": "https://adafruit.github.io/io-actions/blocks/action/sms"
}
`;
@ -202,7 +207,8 @@ exports[`Block Snapshots > Blockly JSON > action_webhook 1`] = `
"name": "BODY",
"align": "RIGHT"
}
]
],
"helpUrl": "https://adafruit.github.io/io-actions/blocks/action/webhook"
}
`;
@ -220,7 +226,8 @@ exports[`Block Snapshots > Blockly JSON > all_days 1`] = `
"align": "RIGHT"
}
],
"mutator": "all_days"
"mutator": "all_days",
"helpUrl": "https://adafruit.github.io/io-actions/blocks/triggers/schedule/day/all_days"
}
`;
@ -238,7 +245,8 @@ exports[`Block Snapshots > Blockly JSON > all_hours 1`] = `
"align": "RIGHT"
}
],
"mutator": "all_hours"
"mutator": "all_hours",
"helpUrl": "https://adafruit.github.io/io-actions/blocks/triggers/schedule/hour/all_hours"
}
`;
@ -256,7 +264,8 @@ exports[`Block Snapshots > Blockly JSON > all_minutes 1`] = `
"align": "RIGHT"
}
],
"mutator": "all_minutes"
"mutator": "all_minutes",
"helpUrl": "https://adafruit.github.io/io-actions/blocks/triggers/schedule/minute/all_minutes"
}
`;
@ -274,7 +283,8 @@ exports[`Block Snapshots > Blockly JSON > all_months 1`] = `
"align": "RIGHT"
}
],
"mutator": "all_months"
"mutator": "all_months",
"helpUrl": "https://adafruit.github.io/io-actions/blocks/triggers/schedule/month/all_months"
}
`;
@ -292,7 +302,8 @@ exports[`Block Snapshots > Blockly JSON > day_settings 1`] = `
"check": "cron_day",
"align": "RIGHT"
}
]
],
"helpUrl": "https://adafruit.github.io/io-actions/blocks/triggers/schedule/day/day_settings"
}
`;
@ -352,7 +363,8 @@ exports[`Block Snapshots > Blockly JSON > days_of_week 1`] = `
"align": "CENTRE"
}
],
"mutator": "days_of_week"
"mutator": "days_of_week",
"helpUrl": "https://adafruit.github.io/io-actions/blocks/triggers/schedule/day/days_of_week"
}
`;
@ -369,7 +381,8 @@ exports[`Block Snapshots > Blockly JSON > delay_days 1`] = `
"type": "input_dummy",
"align": "RIGHT"
}
]
],
"helpUrl": "https://adafruit.github.io/io-actions/blocks/root/action_settings/delay_days"
}
`;
@ -484,7 +497,8 @@ exports[`Block Snapshots > Blockly JSON > delay_hours 1`] = `
"type": "input_dummy",
"align": "RIGHT"
}
]
],
"helpUrl": "https://adafruit.github.io/io-actions/blocks/root/action_settings/delay_hours"
}
`;
@ -743,7 +757,8 @@ exports[`Block Snapshots > Blockly JSON > delay_minutes 1`] = `
"type": "input_dummy",
"align": "RIGHT"
}
]
],
"helpUrl": "https://adafruit.github.io/io-actions/blocks/root/action_settings/delay_minutes"
}
`;
@ -760,7 +775,8 @@ exports[`Block Snapshots > Blockly JSON > delay_none 1`] = `
"type": "input_dummy",
"align": "RIGHT"
}
]
],
"helpUrl": "https://adafruit.github.io/io-actions/blocks/root/action_settings/delay_none"
}
`;
@ -1019,7 +1035,8 @@ exports[`Block Snapshots > Blockly JSON > delay_seconds 1`] = `
"type": "input_dummy",
"align": "RIGHT"
}
]
],
"helpUrl": "https://adafruit.github.io/io-actions/blocks/root/action_settings/delay_seconds"
}
`;
@ -1072,7 +1089,8 @@ exports[`Block Snapshots > Blockly JSON > delay_settings 1`] = `
"type": "input_dummy",
"align": "RIGHT"
}
]
],
"helpUrl": "https://adafruit.github.io/io-actions/blocks/root/action_settings/delay_settings"
}
`;
@ -1384,7 +1402,8 @@ exports[`Block Snapshots > Blockly JSON > every_days_between 1`] = `
"align": "RIGHT"
}
],
"mutator": "every_days_between"
"mutator": "every_days_between",
"helpUrl": "https://adafruit.github.io/io-actions/blocks/triggers/schedule/day/every_days_between"
}
`;
@ -1640,7 +1659,8 @@ exports[`Block Snapshots > Blockly JSON > every_hours_between 1`] = `
"align": "RIGHT"
}
],
"mutator": "every_hours_between"
"mutator": "every_hours_between",
"helpUrl": "https://adafruit.github.io/io-actions/blocks/triggers/schedule/hour/every_hours_between"
}
`;
@ -2200,7 +2220,8 @@ exports[`Block Snapshots > Blockly JSON > every_minutes_between 1`] = `
"align": "RIGHT"
}
],
"mutator": "every_minutes_between"
"mutator": "every_minutes_between",
"helpUrl": "https://adafruit.github.io/io-actions/blocks/triggers/schedule/minute/every_minutes_between"
}
`;
@ -2352,7 +2373,8 @@ exports[`Block Snapshots > Blockly JSON > every_months_between 1`] = `
"align": "RIGHT"
}
],
"mutator": "every_months_between"
"mutator": "every_months_between",
"helpUrl": "https://adafruit.github.io/io-actions/blocks/triggers/schedule/month/every_months_between"
}
`;
@ -2383,7 +2405,8 @@ exports[`Block Snapshots > Blockly JSON > feed_get_value 1`] = `
"extensions": [
"replaceDropdownOptions",
"populateFeedDropdown"
]
],
"helpUrl": "https://adafruit.github.io/io-actions/blocks/feed/get_value"
}
`;
@ -2414,7 +2437,8 @@ exports[`Block Snapshots > Blockly JSON > feed_selector 1`] = `
"extensions": [
"replaceDropdownOptions",
"populateFeedDropdown"
]
],
"helpUrl": "https://adafruit.github.io/io-actions/blocks/feed/selector"
}
`;
@ -2423,7 +2447,7 @@ exports[`Block Snapshots > Blockly JSON > feed_set_value 1`] = `
"inputsInline": true,
"type": "feed_set_value",
"colour": 300,
"tooltip": "",
"tooltip": "Publish the specified data point to the specified Feed.",
"nextStatement": "expression",
"previousStatement": "expression",
"message0": "Set %1 to: %2",
@ -2447,7 +2471,8 @@ exports[`Block Snapshots > Blockly JSON > feed_set_value 1`] = `
"extensions": [
"replaceDropdownOptions",
"populateFeedDropdown"
]
],
"helpUrl": "https://adafruit.github.io/io-actions/blocks/feed/set_value"
}
`;
@ -2465,7 +2490,8 @@ exports[`Block Snapshots > Blockly JSON > hour_settings 1`] = `
"check": "cron_hour",
"align": "RIGHT"
}
]
],
"helpUrl": "https://adafruit.github.io/io-actions/blocks/triggers/schedule/hour/hour_settings"
}
`;
@ -2509,7 +2535,8 @@ exports[`Block Snapshots > Blockly JSON > io_controls_if 1`] = `
"align": "RIGHT"
}
],
"mutator": "io_controls_if"
"mutator": "io_controls_if",
"helpUrl": "https://adafruit.github.io/io-actions/blocks/controls/if"
}
`;
@ -2540,7 +2567,8 @@ exports[`Block Snapshots > Blockly JSON > io_logic_boolean 1`] = `
"type": "input_dummy",
"align": "RIGHT"
}
]
],
"helpUrl": "https://adafruit.github.io/io-actions/blocks/logic/boolean"
}
`;
@ -2596,7 +2624,8 @@ exports[`Block Snapshots > Blockly JSON > io_logic_compare 1`] = `
"name": "B",
"align": "RIGHT"
}
]
],
"helpUrl": "https://adafruit.github.io/io-actions/blocks/math/compare"
}
`;
@ -2614,7 +2643,8 @@ exports[`Block Snapshots > Blockly JSON > io_logic_negate 1`] = `
"name": "EXPRESSION",
"align": "RIGHT"
}
]
],
"helpUrl": "https://adafruit.github.io/io-actions/blocks/logic/negate"
}
`;
@ -2654,7 +2684,8 @@ exports[`Block Snapshots > Blockly JSON > io_logic_operation 1`] = `
"name": "B",
"align": "RIGHT"
}
]
],
"helpUrl": "https://adafruit.github.io/io-actions/blocks/logic/operation"
}
`;
@ -2706,7 +2737,8 @@ exports[`Block Snapshots > Blockly JSON > io_math_arithmetic 1`] = `
"name": "B",
"align": "RIGHT"
}
]
],
"helpUrl": "https://adafruit.github.io/io-actions/blocks/math/arithmetic"
}
`;
@ -2733,7 +2765,8 @@ exports[`Block Snapshots > Blockly JSON > io_math_constrain 1`] = `
"check": "range",
"align": "RIGHT"
}
]
],
"helpUrl": "https://adafruit.github.io/io-actions/blocks/math/constrain"
}
`;
@ -2758,7 +2791,8 @@ exports[`Block Snapshots > Blockly JSON > io_math_number 1`] = `
],
"extensions": [
"validateNumbers"
]
],
"helpUrl": "https://adafruit.github.io/io-actions/blocks/math/number"
}
`;
@ -2794,7 +2828,8 @@ exports[`Block Snapshots > Blockly JSON > io_math_round 1`] = `
"name": "VALUE",
"align": "RIGHT"
}
]
],
"helpUrl": "https://adafruit.github.io/io-actions/blocks/math/round"
}
`;
@ -2816,7 +2851,8 @@ exports[`Block Snapshots > Blockly JSON > io_text 1`] = `
"type": "input_dummy",
"align": "RIGHT"
}
]
],
"helpUrl": "https://adafruit.github.io/io-actions/blocks/text/text"
}
`;
@ -2842,7 +2878,8 @@ exports[`Block Snapshots > Blockly JSON > io_text_join 1`] = `
"name": "B",
"align": "RIGHT"
}
]
],
"helpUrl": "https://adafruit.github.io/io-actions/blocks/text/join"
}
`;
@ -2864,7 +2901,8 @@ exports[`Block Snapshots > Blockly JSON > io_text_multiline 1`] = `
"type": "input_dummy",
"align": "RIGHT"
}
]
],
"helpUrl": "https://adafruit.github.io/io-actions/blocks/text/text_multiline"
}
`;
@ -2885,7 +2923,8 @@ exports[`Block Snapshots > Blockly JSON > io_variables_get 1`] = `
"type": "input_dummy",
"align": "RIGHT"
}
]
],
"helpUrl": "https://adafruit.github.io/io-actions/blocks/variables/get"
}
`;
@ -2908,7 +2947,8 @@ exports[`Block Snapshots > Blockly JSON > io_variables_set 1`] = `
"name": "VALUE",
"align": "RIGHT"
}
]
],
"helpUrl": "https://adafruit.github.io/io-actions/blocks/variables/set"
}
`;
@ -2940,7 +2980,8 @@ exports[`Block Snapshots > Blockly JSON > matcher_boolean_operation 1`] = `
"name": "B",
"align": "RIGHT"
}
]
],
"helpUrl": "https://adafruit.github.io/io-actions/blocks/matchers/matcher_boolean_operation"
}
`;
@ -2988,7 +3029,8 @@ exports[`Block Snapshots > Blockly JSON > matcher_compare 1`] = `
"name": "B",
"align": "RIGHT"
}
]
],
"helpUrl": "https://adafruit.github.io/io-actions/blocks/matchers/matcher_compare"
}
`;
@ -3024,7 +3066,8 @@ exports[`Block Snapshots > Blockly JSON > matcher_text_compare 1`] = `
"name": "B",
"align": "RIGHT"
}
]
],
"helpUrl": "https://adafruit.github.io/io-actions/blocks/matchers/matcher_text_compare"
}
`;
@ -3067,7 +3110,8 @@ exports[`Block Snapshots > Blockly JSON > math_map 1`] = `
"check": "range",
"align": "RIGHT"
}
]
],
"helpUrl": "https://adafruit.github.io/io-actions/blocks/math/map"
}
`;
@ -3100,7 +3144,8 @@ exports[`Block Snapshots > Blockly JSON > math_range 1`] = `
"type": "input_dummy",
"align": "RIGHT"
}
]
],
"helpUrl": "https://adafruit.github.io/io-actions/blocks/math/range"
}
`;
@ -3118,7 +3163,8 @@ exports[`Block Snapshots > Blockly JSON > minute_settings 1`] = `
"check": "cron_minute",
"align": "RIGHT"
}
]
],
"helpUrl": "https://adafruit.github.io/io-actions/blocks/triggers/schedule/minute/minute_settings"
}
`;
@ -3136,7 +3182,8 @@ exports[`Block Snapshots > Blockly JSON > month_settings 1`] = `
"check": "cron_month",
"align": "RIGHT"
}
]
],
"helpUrl": "https://adafruit.github.io/io-actions/blocks/triggers/schedule/month/month_settings"
}
`;
@ -3190,7 +3237,8 @@ exports[`Block Snapshots > Blockly JSON > on_schedule 1`] = `
"check": "cron_minute",
"align": "RIGHT"
}
]
],
"helpUrl": "https://adafruit.github.io/io-actions/blocks/triggers/on_schedule"
}
`;
@ -3338,7 +3386,8 @@ exports[`Block Snapshots > Blockly JSON > one_day 1`] = `
"align": "RIGHT"
}
],
"mutator": "one_day"
"mutator": "one_day",
"helpUrl": "https://adafruit.github.io/io-actions/blocks/triggers/schedule/day/one_day"
}
`;
@ -3458,7 +3507,8 @@ exports[`Block Snapshots > Blockly JSON > one_hour 1`] = `
"align": "RIGHT"
}
],
"mutator": "one_hour"
"mutator": "one_hour",
"helpUrl": "https://adafruit.github.io/io-actions/blocks/triggers/schedule/hour/one_hour"
}
`;
@ -3722,7 +3772,8 @@ exports[`Block Snapshots > Blockly JSON > one_minute 1`] = `
"align": "RIGHT"
}
],
"mutator": "one_minute"
"mutator": "one_minute",
"helpUrl": "https://adafruit.github.io/io-actions/blocks/triggers/schedule/minute/one_minute"
}
`;
@ -3794,7 +3845,8 @@ exports[`Block Snapshots > Blockly JSON > one_month 1`] = `
"align": "RIGHT"
}
],
"mutator": "one_month"
"mutator": "one_month",
"helpUrl": "https://adafruit.github.io/io-actions/blocks/triggers/schedule/month/one_month"
}
`;
@ -3886,7 +3938,8 @@ exports[`Block Snapshots > Blockly JSON > some_months 1`] = `
"align": "CENTRE"
}
],
"mutator": "some_months"
"mutator": "some_months",
"helpUrl": "https://adafruit.github.io/io-actions/blocks/triggers/schedule/month/some_months"
}
`;
@ -3930,7 +3983,8 @@ exports[`Block Snapshots > Blockly JSON > text_compare 1`] = `
"name": "B",
"align": "RIGHT"
}
]
],
"helpUrl": "https://adafruit.github.io/io-actions/blocks/text/compare"
}
`;
@ -3948,7 +4002,8 @@ exports[`Block Snapshots > Blockly JSON > text_template 1`] = `
"name": "TEMPLATE",
"align": "RIGHT"
}
]
],
"helpUrl": "https://adafruit.github.io/io-actions/blocks/text/template"
}
`;
@ -4100,7 +4155,8 @@ exports[`Block Snapshots > Blockly JSON > weather 1`] = `
"replaceDropdownOptions",
"weatherMixin",
"prepareWeather"
]
],
"helpUrl": "https://adafruit.github.io/io-actions/blocks/power_ups/weather"
}
`;
@ -4132,7 +4188,8 @@ exports[`Block Snapshots > Blockly JSON > when_data 1`] = `
"extensions": [
"replaceDropdownOptions",
"populateFeedDropdown"
]
],
"helpUrl": "https://adafruit.github.io/io-actions/blocks/triggers/when_data"
}
`;
@ -4166,7 +4223,8 @@ exports[`Block Snapshots > Blockly JSON > when_data_matching 1`] = `
"extensions": [
"replaceDropdownOptions",
"populateFeedDropdown"
]
],
"helpUrl": "https://adafruit.github.io/io-actions/blocks/triggers/when_data_matching"
}
`;
@ -4222,6 +4280,7 @@ exports[`Block Snapshots > Blockly JSON > when_data_matching_state 1`] = `
"extensions": [
"replaceDropdownOptions",
"populateFeedDropdown"
]
],
"helpUrl": "https://adafruit.github.io/io-actions/blocks/triggers/when_data_matching_state"
}
`;