Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion docs/03.reference/02.tags/ldap/_attributes/timeout.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
Specifies the maximum amount of time, in milliseconds, to wait for LDAP processing. Defaults to 60000 ms (60 seconds).

This was previously in seconds in Lucee 5, changed to match ACF since Lucee 6.0.0.170

6 changes: 5 additions & 1 deletion docs/03.reference/02.tags/pdf/_attributes/action.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
- addWatermark
- deletePages
- extractText
- extractBookmarks
- getInfo
- merge
- open
Expand All @@ -14,4 +15,7 @@
- thumbnail
- write

**Note:** action "thumbnail" was implemented from PDF Extension version - 1.1.0.8
**Note:**

- The `thumbnail` action was implemented in PDF Extension version 1.1.0.8.
- The `extractBookmarks` action was implemented in PDF Extension version 1.2.0.11-SNAPSHOT.
10 changes: 10 additions & 0 deletions docs/recipes/ast.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ ast = astUtil.astFromPath("/test1.cfm");
```

This approach is particularly useful when:

- Building extensions or plugins
- Creating development tools
- Performing batch analysis of multiple files
Expand All @@ -102,6 +103,7 @@ This approach is particularly useful when:
The returned AST uses neutral, language-agnostic node types that follow ESTree conventions:

### Root Structure

```cfml
{
"type": "Program", // Root AST node
Expand All @@ -115,13 +117,15 @@ The returned AST uses neutral, language-agnostic node types that follow ESTree c
### Common Node Types

**Expressions:**

- `BinaryExpression` - Operations like `x + y`, `a && b`
- `UnaryExpression` - Operations like `!condition`, `-number`
- `CallExpression` - Function calls like `myFunction(arg1, arg2)`
- `MemberExpression` - Property access like `obj.property`
- `ConditionalExpression` - Ternary operator `condition ? true : false`

**Literals:**

- `StringLiteral` - String values like `"hello"`
- `NumberLiteral` - Numeric values like `42`, `3.14`
- `BooleanLiteral` - Boolean values `true`, `false`
Expand All @@ -130,6 +134,7 @@ The returned AST uses neutral, language-agnostic node types that follow ESTree c
- `ObjectExpression` - Struct literals like `{name: "value"}`

**Statements:**

- `IfStatement` - Conditional statements
- `ForStatement` - Traditional for loops
- `WhileStatement` - While loops
Expand All @@ -138,6 +143,7 @@ The returned AST uses neutral, language-agnostic node types that follow ESTree c
- `FunctionDeclaration` - Function definitions

**CFML-Specific:**

- `CFMLTag` - CFML tags like `<cfquery>`, `<cfloop>`
- `ClosureExpression` - Anonymous functions
- `LambdaExpression` - Arrow functions
Expand Down Expand Up @@ -187,16 +193,19 @@ if (ast.type == "Program" && arrayLen(ast.body) > 0) {
The AST functionality integrates well with various development scenarios:

### IDE Extensions

- Use AST for syntax highlighting
- Implement intelligent autocomplete
- Build refactoring tools

### Static Analysis Tools

- Detect code smells and anti-patterns
- Enforce coding standards
- Calculate complexity metrics

### Documentation Generators

- Extract function signatures and comments
- Generate API documentation automatically
- Create dependency graphs
Expand All @@ -208,6 +217,7 @@ A complete working example is available as a Docker setup:
**Repository**: [https://github.com/lucee/lucee-docs/tree/master/examples/docker/ast](https://github.com/lucee/lucee-docs/tree/master/examples/docker/ast)

The demo includes:

- Docker Compose configuration with Lucee 7.0.0.299-SNAPSHOT
- Example templates demonstrating both built-in functions and Java class usage
- Ready-to-run environment for testing AST functionality
Expand Down
5 changes: 3 additions & 2 deletions docs/recipes/java-scripting.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ For developers using AI assistance or requiring structured technical data, see t
**[Java Scripting Technical Spec](https://github.com/lucee/lucee-docs/blob/master/docs/technical-specs/java-scripting.yaml)**

This YAML document contains pure technical facts optimized for:

- AI systems generating code implementations
- Quick reference lookup of engine names, dependencies, and system properties
- Tool consumption and automated integration
Expand All @@ -57,6 +58,7 @@ This YAML document contains pure technical facts optimized for:
### Adding Lucee to Your Project

#### Maven Dependencies

```xml
<dependencies>
<!-- Lucee Core -->
Expand All @@ -76,6 +78,7 @@ This YAML document contains pure technical facts optimized for:
```

#### Gradle Dependencies

```gradle
dependencies {
implementation 'org.lucee:lucee:6.0.0.677-SNAPSHOT'
Expand Down Expand Up @@ -458,8 +461,6 @@ spec:
restartPolicy: Never
```



## Advanced Integration Scenarios

### AWS Lambda Integration
Expand Down
26 changes: 13 additions & 13 deletions docs/recipes/migrate.from.classic-to-modern-local-scope.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ Modern mode offers several advantages:

Consider this component when running in Classic mode:

```javascript
```cfml
component {
function createToken(id) {
token = createUUID(); // Stored in variables scope
Expand Down Expand Up @@ -76,13 +76,13 @@ Or:

### 3. Application Level (Application.cfc)

```javascript
```cfml
this.localMode = "modern"; // or "classic"
```

### 4. Function Level

```javascript
```cfml
function test() localMode="modern" {
// Function body
}
Expand Down Expand Up @@ -134,25 +134,25 @@ Variable Scope Cascading Write Detected: The variable [token] is being implicitl

For each occurrence, decide whether to:

1. **Add explicit variables scope** (if the variable should remain in the component's variables scope):
1. **Add explicit `variables` scope** (if the variable should remain in the component's variables scope):

```javascript
variables.token = createUUID();
```
```cfml
variables.token = createUUID();
```

2. **Add explicit local scope** (if the variable should be function-local):
2. **Add explicit `local` scope** (if the variable should be function-local):

```javascript
local.token = createUUID();
```
```cfml
local.token = createUUID();
```

### Common Patterns Requiring Attention

#### Component Properties

Properties meant to be stored at the component level need an explicit variables scope:

```javascript
```cfml
// Before
function init(datasourceName) {
datasourceName = arguments.datasourceName;
Expand All @@ -168,7 +168,7 @@ function init(datasourceName) {

Variables that should be local to a function call:

```javascript
```cfml
// Before
function processItems(items) {
result = [];
Expand Down
18 changes: 9 additions & 9 deletions docs/technical-specs/ast.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ builtin_functions:
keywords: ["ast", "transform", "compile"]
signature: "struct astFromPath(any path)"
return_type: "struct"

astFromString:
function_name: "astFromString"
function_name: "astFromString"
class: "lucee.runtime.functions.ast.AstFromString"
keywords: ["ast", "transform", "compile"]
signature: "struct astFromString(string cfmlCode)"
Expand All @@ -28,14 +28,14 @@ supported_input_types:
path_parameter:
- "String (relative/absolute path)"
- "java.io.File"
- "lucee.commons.io.res.Resource"
- "lucee.commons.io.res.Resource"
- "File stream (from fileOpen())"
string_parameter:
- "String containing CFML code"

file_extensions:
template: "cfm"
component: "cfc"
component: "cfc"
script: "cfml"

ast_standard:
Expand All @@ -48,7 +48,7 @@ root_node:
properties:
- "type: string"
- "start: position_struct"
- "end: position_struct"
- "end: position_struct"
- "sourceType: string"
- "body: array"

Expand All @@ -70,15 +70,15 @@ core_node_types:
- "ElvisExpression"
- "ClosureExpression"
- "LambdaExpression"

literals:
- "StringLiteral"
- "NumberLiteral"
- "BooleanLiteral"
- "NullLiteral"
- "ArrayExpression"
- "ObjectExpression"

statements:
- "ExpressionStatement"
- "IfStatement"
Expand All @@ -95,7 +95,7 @@ core_node_types:
- "BlockStatement"
- "FunctionDeclaration"
- "VariableDeclaration"

cfml_specific:
- "CFMLTag"
- "Parameter"
Expand Down Expand Up @@ -180,4 +180,4 @@ cast_expression_structure:

output_format:
structure: "Nested Lucee Struct"
encoding: "UTF-8"
encoding: "UTF-8"
6 changes: 3 additions & 3 deletions docs/technical-specs/java-scripting.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ engine_discovery:
primary_name: "CFML"
aliases: ["CFM"]
engine_name: "Lucee"
mime_types:
mime_types:
- "text/cfml"
- "application/cfml"

Expand Down Expand Up @@ -45,7 +45,7 @@ ant_integration:
</script>

system_properties:
cli_call:
cli_call:
name: "lucee.cli.call"
value: "true"
description: "Set automatically for CLI usage"
Expand All @@ -69,4 +69,4 @@ implementation_details:
servlet_context: "Creates ServletContext/ServletConfig for standalone operation"
working_directory: "Directory where java command was called from"
dialects: ["script", "tag"]
default_dialect: "script"
default_dialect: "script"
2 changes: 1 addition & 1 deletion examples/docker/ast/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ services:
volumes:
- "./www:/var/www"
ports:
- 8888:8888
- 8888:8888
5 changes: 5 additions & 0 deletions examples/docker/ast/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,13 @@ This Docker setup demonstrates Lucee's Abstract Syntax Tree (AST) functionality
## Quick Start

1. Start the container:

```bash
docker compose up -d
```

2. Open your browser:

```
http://localhost:8888
```
Expand All @@ -19,15 +21,18 @@ http://localhost:8888
The demo shows two ways to generate AST from CFML code:

### Built-in Functions

- `astFromPath()` - Parse CFML files into AST
- `astFromString()` - Parse CFML code strings into AST

### Java Class Integration

- `lucee.runtime.util.AstUtil` - Direct Java class access for advanced usage

## Example Output

The AST is returned as a structured representation using neutral node types following ESTree conventions:

- `BinaryExpression`, `StringLiteral`, `NumberLiteral`
- `IfStatement`, `ForStatement`, `FunctionDeclaration`
- CFML-specific nodes like `CFMLTag`
Expand Down
2 changes: 1 addition & 1 deletion examples/docker/couchbase/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ services:
- couchbase_data:/opt/couchbase/var

volumes:
couchbase_data:
couchbase_data:
9 changes: 7 additions & 2 deletions examples/docker/couchbase/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,22 @@ This Docker setup demonstrates how to integrate Couchbase as a cache provider wi
## Quick Start

1. Start the containers:

```bash
docker compose up -d
```

2. Set up Couchbase (one-time setup):
- Open http://localhost:8091 in your browser

- Open [http://localhost:8091](http://localhost:8091) in your browser
- Click "Setup New Cluster"
- Set name: `couchbase`
- Set username: `Administrator`, password: `password`
- Accept default settings and finish setup
- Go to "Buckets" and create a new bucket named `default`

3. Open the Lucee demo:

```
http://localhost:8888
```
Expand All @@ -27,24 +30,26 @@ http://localhost:8888
The demo shows Lucee's integration with Couchbase as a cache provider:

### Cache Configuration

- Couchbase configured as a named cache in Lucee
- Connection via Docker network using service discovery
- JSON transcoder for cross-platform compatibility

### Cache Functions

- `cacheGetProperties()` - Inspect cache configuration and status
- Full Lucee cache API available: `cachePut()`, `cacheGet()`, `cacheRemove()`, etc.

## Configuration Details

The Couchbase cache is configured in `lucee-config.json` with:

- **Connection**: `couchbase://couchbase` (Docker service name)
- **Authentication**: Administrator/password
- **Default Bucket**: `default`
- **Transcoder**: JSON (for interoperability)
- **Auto-creation**: Enabled for buckets, scopes, and collections


## File Structure

```
Expand Down