turbo_boost-commands 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of turbo_boost-commands might be problematic. Click here for more details.

@@ -16,7 +16,7 @@ import uuids from './uuids'
16
16
  function buildCommandPayload (id, element) {
17
17
  return {
18
18
  id, // uniquely identifies the command
19
- name: element.dataset.command,
19
+ name: element.getAttribute(schema.commandAttribute),
20
20
  elementId: element.id.length > 0 ? element.id : null,
21
21
  elementAttributes: elements.buildAttributePayload(element),
22
22
  startedAt: new Date().getTime()
@@ -32,7 +32,7 @@ function invokeCommand (event) {
32
32
  if (!element) return
33
33
  if (!delegates.isRegisteredForElement(event.type, element)) return
34
34
 
35
- const commandId = `command-${uuids.v4()}`
35
+ const commandId = `turbo-command-${uuids.v4()}`
36
36
  let driver = drivers.find(element)
37
37
  let payload = {
38
38
  ...buildCommandPayload(commandId, element),
@@ -1,7 +1,7 @@
1
1
  const schema = {
2
2
  frameAttribute: 'data-turbo-frame',
3
3
  methodAttribute: 'data-turbo-method',
4
- commandAttribute: 'data-command'
4
+ commandAttribute: 'data-turbo-command'
5
5
  }
6
6
 
7
7
  export default { ...schema }
data/fly.toml CHANGED
@@ -1,11 +1,13 @@
1
- # fly.toml file generated for turbo-boost-commands on 2022-09-19T05:16:01-06:00
1
+ # fly.toml file generated for turboboost-commands on 2022-12-23T12:55:35-07:00
2
2
 
3
- app = "turbo-boost-commands"
3
+ app = "turboboost-commands"
4
4
  kill_signal = "SIGINT"
5
5
  kill_timeout = 5
6
6
  processes = []
7
7
 
8
8
  [env]
9
+ # Must match the proxy config in the smallteam-tech/proxy repo
10
+ RAILS_RELATIVE_URL_ROOT = "/@turbo-boost/commands"
9
11
 
10
12
  [experimental]
11
13
  allowed_public_ports = []
@@ -72,6 +72,7 @@ class TurboBoost::Commands::Runner
72
72
 
73
73
  def command_name
74
74
  return nil unless command_requested?
75
+ # binding.pry
75
76
  command_params[:name]
76
77
  end
77
78
 
@@ -2,6 +2,6 @@
2
2
 
3
3
  module TurboBoost
4
4
  module Commands
5
- VERSION = "0.0.1"
5
+ VERSION = "0.0.2"
6
6
  end
7
7
  end
data/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "@turbo-boost/commands",
3
- "version": "0.0.0",
3
+ "version": "0.0.1",
4
4
  "description": "Commands to help you build robust reactive applications with Rails & Hotwire.",
5
5
  "main": "app/javascript/index.js",
6
6
  "repository": "https://github.com/hopsoft/turbo_boost-commands",
7
7
  "author": "Nate Hopkins (hopsoft) <natehop@gmail.com>",
8
8
  "license": "MIT",
9
9
  "dependencies": {
10
- "@turbo-boost/streams": ">= 0.0.1"
10
+ "@turbo-boost/streams": ">= 0.0.2"
11
11
  },
12
12
  "peerDependencies": {
13
13
  "@hotwired/turbo-rails": ">= 7.2.0"