-
Notifications
You must be signed in to change notification settings - Fork 0
Add Springboard docs CLI and jamapp support infrastructure #71
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
base: vk/6c2d-vk-wrapper-app
Are you sure you want to change the base?
Changes from 5 commits
900da7a
24883d9
4e02efa
e0366d8
5786193
48723f5
51fe57e
c6b22d8
ac6c546
76d916a
b2a694f
1543cb5
2335c8e
b3b9628
6a8c1c4
c44e8be
98cb178
8fb45c6
1616cba
b7b6ea0
94e21c4
6db3543
32c43a1
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| registry=http://localhost:4873/ | ||
| //localhost:4873/:_authToken=fake | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
This root Useful? React with 👍 / 👎. |
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -50,6 +50,22 @@ | |
| "types": "./dist/modules/midi_files/midi_file_parser/midi_file_parser.d.ts", | ||
| "import": "./dist/modules/midi_files/midi_file_parser/midi_file_parser.js" | ||
| }, | ||
| "./modules/midi_files/midi_files_module": { | ||
| "types": "./dist/modules/midi_files/midi_files_module.d.ts", | ||
| "import": "./dist/modules/midi_files/midi_files_module.js" | ||
| }, | ||
| "./modules/io/io_dependencies": { | ||
| "types": "./dist/modules/io/io_dependencies_types.d.ts", | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
The Useful? React with 👍 / 👎. |
||
| "node": { | ||
| "import": "./dist/modules/io/io_dependencies.node.js" | ||
| }, | ||
| "browser": { | ||
| "import": "./dist/modules/io/io_dependencies.browser.js" | ||
| }, | ||
| "default": { | ||
| "import": "./dist/modules/io/io_dependencies.js" | ||
| } | ||
| }, | ||
| "./modules/macro_module/registered_macro_types": { | ||
| "types": "./dist/modules/macro_module/registered_macro_types.d.ts", | ||
| "import": "./dist/modules/macro_module/registered_macro_types.js" | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| import {BrowserQwertyService} from '@jamtools/core/services/browser/browser_qwerty_service'; | ||
| import {BrowserMidiService} from '@jamtools/core/services/browser/browser_midi_service'; | ||
| import type {IoDeps} from './io_dependencies_types'; | ||
|
|
||
| export const createIoDependencies = async (): Promise<IoDeps> => { | ||
| const qwerty = new BrowserQwertyService(document); | ||
| const midi = new BrowserMidiService(); | ||
| return { | ||
| qwerty, | ||
| midi, | ||
| }; | ||
| }; |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| import {NodeQwertyService} from '@jamtools/core/services/node/node_qwerty_service'; | ||
| import {NodeMidiService} from '@jamtools/core/services/node/node_midi_service'; | ||
| import {MockMidiService} from '@jamtools/core/test/services/mock_midi_service'; | ||
| import {MockQwertyService} from '@jamtools/core/test/services/mock_qwerty_service'; | ||
| import type {IoDeps} from './io_dependencies_types'; | ||
|
|
||
| export const createIoDependencies = async (): Promise<IoDeps> => { | ||
| if (process.env.DISABLE_IO === 'true') { | ||
| return { | ||
| qwerty: new MockQwertyService(), | ||
| midi: new MockMidiService(), | ||
| }; | ||
| } | ||
|
|
||
| const qwerty = new NodeQwertyService(); | ||
| const midi = new NodeMidiService(); | ||
| return { | ||
| qwerty, | ||
| midi, | ||
| }; | ||
| }; |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| import {MockMidiService} from '@jamtools/core/test/services/mock_midi_service'; | ||
| import {MockQwertyService} from '@jamtools/core/test/services/mock_qwerty_service'; | ||
| import type {IoDeps} from './io_dependencies_types'; | ||
|
|
||
| // Default implementation for testing | ||
| export const createIoDependencies = async (): Promise<IoDeps> => { | ||
| return { | ||
| qwerty: new MockQwertyService(), | ||
| midi: new MockMidiService(), | ||
| }; | ||
| }; |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| import {MidiService, QwertyService} from '@jamtools/core/types/io_types'; | ||
|
|
||
| export type IoDeps = { | ||
| midi: MidiService; | ||
| qwerty: QwertyService; | ||
| } | ||
|
|
||
| export type CreateIoDependencies = () => Promise<IoDeps>; |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -7,60 +7,18 @@ import springboard from 'springboard'; | |
| import {StateSupervisor} from 'springboard/services/states/shared_state_service'; | ||
| import {ModuleAPI} from 'springboard/engine/module_api'; | ||
| import {MidiEvent} from '@jamtools/core/modules/macro_module/macro_module_types'; | ||
| import {MockMidiService} from '@jamtools/core/test/services/mock_midi_service'; | ||
| import {MockQwertyService} from '@jamtools/core/test/services/mock_qwerty_service'; | ||
|
|
||
| import {MidiService, QwertyService} from '@jamtools/core/types/io_types'; | ||
| import type {IoDeps, CreateIoDependencies} from './io_dependencies_types'; | ||
| import {createIoDependencies as defaultCreateIoDependencies} from './io_dependencies'; | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Useful? React with 👍 / 👎.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
@codex Are you sure this is true? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Because Useful? React with 👍 / 👎. |
||
|
|
||
| type IoDeps = { | ||
| midi: MidiService; | ||
| qwerty: QwertyService; | ||
| } | ||
|
|
||
| let createIoDependencies = async (): Promise<IoDeps> => { | ||
| return { | ||
| qwerty: new MockQwertyService(), | ||
| midi: new MockMidiService(), | ||
| }; | ||
| }; | ||
|
|
||
| // @platform "browser" | ||
| createIoDependencies = async () => { | ||
| const {BrowserQwertyService} = await import('@jamtools/core/services/browser/browser_qwerty_service'); | ||
| const {BrowserMidiService} = await import('@jamtools/core/services/browser/browser_midi_service'); | ||
|
|
||
| const qwerty = new BrowserQwertyService(document); | ||
| const midi = new BrowserMidiService(); | ||
| return { | ||
| qwerty, | ||
| midi, | ||
| }; | ||
| }; | ||
| // @platform end | ||
|
|
||
| // @platform "node" | ||
| createIoDependencies = async () => { | ||
| if (process.env.DISABLE_IO === 'true') { | ||
| return { | ||
| qwerty: new MockQwertyService(), | ||
| midi: new MockMidiService(), | ||
| }; | ||
| } | ||
|
|
||
| const {NodeQwertyService} = await import('@jamtools/core/services/node/node_qwerty_service'); | ||
| const {NodeMidiService} = await import('@jamtools/core/services/node/node_midi_service'); | ||
|
|
||
| const qwerty = new NodeQwertyService(); | ||
| const midi = new NodeMidiService(); | ||
| return { | ||
| qwerty, | ||
| midi, | ||
| }; | ||
| // Wrapper object to allow mutation for testing | ||
| const ioDepsConfig = { | ||
| createIoDependencies: defaultCreateIoDependencies | ||
| }; | ||
| // @platform end | ||
|
|
||
| export const setIoDependencyCreator = (func: typeof createIoDependencies) => { | ||
| createIoDependencies = func; | ||
| export const setIoDependencyCreator = (func: CreateIoDependencies) => { | ||
| // This is used for testing to override the platform-specific implementation | ||
| ioDepsConfig.createIoDependencies = func; | ||
| }; | ||
|
|
||
| type IoState = { | ||
|
|
@@ -120,7 +78,7 @@ export class IoModule implements Module<IoState> { | |
| }; | ||
|
|
||
| initialize = async (moduleAPI: ModuleAPI) => { | ||
| this.ioDeps = await createIoDependencies(); | ||
| this.ioDeps = await ioDepsConfig.createIoDependencies(); | ||
|
|
||
| this.qwertyInputSubject = this.ioDeps.qwerty.onInputEvent; | ||
| this.midiInputSubject = this.ioDeps.midi.onInputEvent; | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| # export BASE_PATH="/var/lib/docker/volumes/dowo0cwkww0swc0kg0wgw44k_vibe-kanban-worktrees/_data/e1e4-copy-jamtools-fe/springboard/verdaccio" | ||
| # VERDACCIO_CONFIG_PATH="$BASE_PATH/config" \ | ||
| # VERDACCIO_STORAGE_PATH="$BASE_PATH/storage" \ | ||
| # VERDACCIO_PLUGINS_PATH="$BASE_PATH/plugins" \ | ||
| # docker compose up | ||
|
|
||
| echo "registry=http://localhost:4873/" >> ../.npmrc | ||
| echo "//localhost:4873/:_authToken=fake" >> ../.npmrc | ||
|
|
||
| npx verdaccio --config ./config/config.yaml | ||
|
|
||
| # curl -L -o $HOME/bin/jq https://github.com/jqlang/jq/releases/latest/download/jq-linux64 | ||
| # chmod +x "$HOME/bin/jq" | ||
| # export PATH=$PATH:$HOME/bin | ||
|
|
||
| # export npm_config__authToken=fake | ||
| # export npm_config_registry=http://localhost:4873/ | ||
| # ./scripts/run-all-folders.sh 0.0.1-dev-jamapp-3 | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Committing a root
.npmrcwithregistry=http://localhost:4873/forces all package installs/publishes in this repo to use a local Verdaccio instance. In normal developer/CI environments where Verdaccio is not running, dependency resolution will fail outright, making the repository unusable without extra local setup.Useful? React with 👍 / 👎.