Skip to content

Commit af64f00

Browse files
committed
Merge branch 'development'
2 parents 9af9403 + 7c5ce07 commit af64f00

File tree

12 files changed

+9684
-7526
lines changed

12 files changed

+9684
-7526
lines changed

box.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name":"ColdBox Debugger",
33
"author":"Ortus Solutions <info@ortussolutions.com",
44
"location":"https://downloads.ortussolutions.com/ortussolutions/coldbox-modules/cbdebugger/@build.version@/cbdebugger-@build.version@.zip",
5-
"version":"3.3.2",
5+
"version":"3.4.0",
66
"slug":"cbdebugger",
77
"type":"modules",
88
"homepage":"https://github.com/coldbox-modules/cbdebugger",

changelog.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,19 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
----
99

10+
## [3.4.0] => 2022-JUN-27
11+
12+
### Added
13+
14+
* Upgraded entire front end build process to ColdBox Elixir v4
15+
* Upgraded to Node 16 for all front end processes
16+
17+
### Fixed
18+
19+
* If the cbdebugger was embedded within an app already using Alpine, it will fail. Now it will leach on to the running Alpine app.
20+
21+
----
22+
1023
## [3.3.2] => 2022-MAY-02
1124

1225
### Fixed

helpers/Mixins.cfm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
* @labelHash The timer label hash to stop
4040
*/
4141
function stopCBTimer( required labelHash ){
42-
return variables.wirebox.getInstance( "Timer@cbdebugger" ).stop( arguments.label );
42+
return variables.wirebox.getInstance( "Timer@cbdebugger" ).stop( arguments.labelHash );
4343
}
4444
4545
/**
@@ -79,4 +79,4 @@
7979
return getCBDebugger().pushTracer( argumentCollection=arguments );
8080
}
8181
82-
</cfscript>
82+
</cfscript>

package-lock.json

Lines changed: 9609 additions & 7482 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 9 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,24 @@
11
{
22
"private": true,
33
"devDependencies": {
4+
"@babel/eslint-parser": "^7.18.2",
45
"@babel/preset-env": "^7.16.11",
5-
"autoprefixer": "^9.7.6",
6-
"babel-eslint": "^10.0.1",
7-
"coldbox-elixir": "^3.0.0",
8-
"copy-webpack-plugin": "^6.4.1",
9-
"css-loader": "^3.5.3",
6+
"coldbox-elixir": "^4.0.0",
7+
"copy-webpack-plugin": "^10.2.4",
108
"eslint": "^7.21.0",
119
"eslint-config-prettier": "^8.1.0",
12-
"eslint-loader": "^4.0.2",
13-
"eslint-plugin-vue": "^7.6.0",
14-
"expose-loader": "^1.0.0",
15-
"node-sass": "^4.14.1",
16-
"postcss-loader": "^3.0.0",
17-
"sass-loader": "^10.0.0",
18-
"style-loader": "^1.2.1"
10+
"eslint-webpack-plugin": "^3.2.0",
11+
"sass": "^1.53.0",
12+
"sass-loader": "^13.0.2",
13+
"webpack-cli": "^4.10.0"
1914
},
2015
"dependencies": {
2116
"@alpinejs/morph": "^3.9.6",
2217
"alpinejs": "^3.9.6"
2318
},
2419
"scripts": {
25-
"dev": "cross-env NODE_ENV=development webpack --env.NODE_ENV=development --hide-modules",
26-
"dev:analyze": "cross-env NODE_ENV=development WEBPACK_ANALYZER=true webpack --env.NODE_ENV=development --hide-modules",
20+
"dev": "webpack --node-env development",
2721
"watch": "npm run dev -- --watch",
28-
"prod": "cross-env NODE_ENV=production webpack -p --env.NODE_ENV=production --hide-modules"
22+
"prod": "webpack --node-env production"
2923
}
3024
}

readme.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
# Welcome To The ColdBox Debugger Module
44

5-
The ColdBox Debugger module is a light-weight performance monitor and profiling tool for ColdBox applications. It can generate a nice debugging panel on every rendered page or a dedicated visualizer to make your ColdBox application development nicer, funer and greater! Yes, funer is a word!
5+
The ColdBox Debugger module is a light-weight performance monitor and profiling tool for ColdBox applications. It can generate a nice debugging panel on every rendered page or a dedicated visualizer to make your ColdBox application development nicer, funner and greater! Yes, funner is a word!
66

77
<p align="center">
88
<img src="https://raw.githubusercontent.com/coldbox-modules/cbdebugger/development/test-harness/includes/images/debugger-visualizer.png">
@@ -35,7 +35,7 @@ The ColdBox debugger is a light-weigth performance monitor and profiler for your
3535
- Tap into LogBox via our Tracer messages and discover logging on a per request basis
3636
- Profile execution and results of **ANY** model object
3737
- Profile execution of **ANY** ColdBox interception point
38-
- Custom Timer helpers for adding timing methods and annotations anywhere in -our code
38+
- Custom Timer helpers for adding timing methods and annotations anywhere in your code
3939
- Profile your production or development apps with ease
4040
- Track ColdBox modules and lifecycles
4141
- Highly configurable
@@ -82,7 +82,7 @@ This will activate the debugger in your application and render out at the end of
8282

8383
## Settings
8484

85-
The debugger is highly configurable and we have tons of settings to assist you in your development adventures and also in your performance tuning adventures. Please note that the more collectors you activate, the **slower** your application can become. By default we have pre-selected defaults which add neglible performance to your applications.
85+
The debugger is highly configurable and we have tons of settings to assist you in your development adventures and also in your performance tuning. Please note that the more collectors you activate, the **slower** your application can become. By default we have pre-selected defaults which add neglible performance to your applications.
8686

8787
Open your `config/coldbox.cfc` configuration object and add into the `moduleSettings` the `cbDebugger` key with the following options:
8888

@@ -98,8 +98,8 @@ moduleSettings = {
9898
debugMode : true,
9999
// The URL password to use to activate it on demand
100100
debugPassword : "cb:null",
101-
// This flag enables/disables the end of request debugger panel docked to the bottem of the page.
102-
// If you disable i, then the only way to visualize the debugger is via the `/cbdebugger` endpoint
101+
// This flag enables/disables the end of request debugger panel docked to the bottom of the page.
102+
// If you disable it, then the only way to visualize the debugger is via the `/cbdebugger` endpoint
103103
requestPanelDock : true,
104104
// Request Tracker Options
105105
requestTracker : {

resources/assets/js/cbdebugger.js

Lines changed: 23 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,35 @@
1-
import Alpine from "alpinejs";
2-
// Load Plugins
3-
// Using common js due to NOT being on webpack5, the esm was giving us issues
4-
// Once we update to elixir 4, try it again
5-
import morph from "@alpinejs/morph/dist/module.cjs";
1+
import cbAlpine from "alpinejs";
2+
63
// Load Custom Components
74
import ModulesPanel from "./components/ModulesPanel";
85
import RequestTrackerPanel from "./components/RequestTrackerPanel";
96

10-
// For easy referencing
11-
window.Alpine = Alpine;
12-
13-
// Register Plugins
14-
Alpine.plugin( morph );
15-
16-
// Register Components
17-
Alpine.data( "modulesPanel", ModulesPanel );
18-
Alpine.data( "requestTrackerPanel", RequestTrackerPanel );
19-
20-
// Startup your engines!!!!!!!!
21-
Alpine.start();
22-
237
// Init the coldbox debugger module
248
window.coldboxDebugger = ( () => {
9+
10+
/**
11+
* Listen to alpine startup to load cbDebugger components
12+
*/
13+
document.addEventListener('alpine:init', () => {
14+
// Register Components so our prefixed alpine version can read it.
15+
window.Alpine.data( "cbdModulesPanel", ModulesPanel );
16+
window.Alpine.data( "cbdRequestTrackerPanel", RequestTrackerPanel );
17+
//console.log( "Registering cbDebugger Alpine Components!" );
18+
});
19+
2520
/**
26-
* Listen to dom load and attach
21+
* Listen to DOM to see if we load our Alpine or use a version of Alpine
2722
*/
2823
window.addEventListener( "load", ( event ) => {
24+
// Verify if alpine is already loaded in the window
25+
if( !window.hasOwnProperty( "Alpine" ) ){
26+
window.Alpine = cbAlpine;
27+
// Startup your engines!!!!!!!!
28+
window.Alpine.start();
29+
//console.log( "Alpine not loaded, loading it!" );
30+
} else {
31+
console.log( "Alpine already loaded, cbDebugger will use it!" );
32+
}
2933
console.log( "ColdBox Debugger Loaded!" );
3034
} );
3135

test-harness/handlers/Main.cfc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,10 @@ component {
9292
log.info( "in the index event firing" );
9393
}
9494

95+
function embedded( event, rc, prc ){
96+
event.setView( "main/embedded" ).setLayout( "Embedded" );
97+
}
98+
9599
any function noDebugger( event, rc, prc ){
96100
hideDebugger();
97101
event.renderData( data = "<h1>Hello</h1>" );

test-harness/layouts/Embedded.cfm

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<cfoutput>
2+
<html>
3+
<head>
4+
<script defer src="https://unpkg.com/alpinejs@3.x.x/dist/cdn.min.js"></script>
5+
</head>
6+
<body>
7+
#renderView()#
8+
</body>
9+
</html>
10+
</cfoutput>
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<cfoutput>
2+
<h1>Embedded</h1>
3+
4+
<h1 x-data="{ message: 'I ❤️ Alpine' }" x-text="message"></h1>
5+
6+
</cfoutput>

0 commit comments

Comments
 (0)