@o3co/ts.hocon 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/ISSUE_TEMPLATE/bug_report.md +29 -0
- package/.github/ISSUE_TEMPLATE/feature_request.md +23 -0
- package/.github/pull_request_template.md +17 -0
- package/.github/workflows/lint.yml +33 -0
- package/.github/workflows/release.yml +41 -0
- package/.github/workflows/test.yml +53 -0
- package/CHANGELOG.md +22 -0
- package/CONTRIBUTING.md +62 -0
- package/LICENSE +202 -0
- package/README.ja.md +195 -0
- package/README.md +195 -0
- package/SECURITY.md +20 -0
- package/docs/superpowers/plans/2026-03-20-ts-hocon.md +2412 -0
- package/docs/superpowers/specs/2026-03-20-ts-hocon-design.md +368 -0
- package/package.json +44 -0
- package/src/config.ts +108 -0
- package/src/errors.ts +34 -0
- package/src/index.ts +5 -0
- package/src/internal/lexer/lexer.ts +168 -0
- package/src/internal/lexer/token.ts +20 -0
- package/src/internal/parser/ast.ts +17 -0
- package/src/internal/parser/parser.ts +229 -0
- package/src/internal/resolver/resolver.ts +428 -0
- package/src/parse.ts +79 -0
- package/src/value.ts +5 -0
- package/src/zod.ts +12 -0
- package/tests/config.test.ts +100 -0
- package/tests/errors.test.ts +43 -0
- package/tests/lexer.test.ts +141 -0
- package/tests/lightbend/lightbend.test.ts +39 -0
- package/tests/lightbend/testdata/a_1.conf +1 -0
- package/tests/lightbend/testdata/b_2.conf +1 -0
- package/tests/lightbend/testdata/beanconfig/beanconfig01.conf +131 -0
- package/tests/lightbend/testdata/bom.conf +2 -0
- package/tests/lightbend/testdata/cycle.conf +1 -0
- package/tests/lightbend/testdata/env-variables.conf +16 -0
- package/tests/lightbend/testdata/equiv01/comments.conf +45 -0
- package/tests/lightbend/testdata/equiv01/equals.conf +41 -0
- package/tests/lightbend/testdata/equiv01/no-commas.conf +55 -0
- package/tests/lightbend/testdata/equiv01/no-root-braces.conf +40 -0
- package/tests/lightbend/testdata/equiv01/no-whitespace.json +1 -0
- package/tests/lightbend/testdata/equiv01/omit-colons.conf +44 -0
- package/tests/lightbend/testdata/equiv01/original.json +41 -0
- package/tests/lightbend/testdata/equiv01/path-keys.conf +29 -0
- package/tests/lightbend/testdata/equiv01/properties-style.conf +37 -0
- package/tests/lightbend/testdata/equiv01/substitutions.conf +41 -0
- package/tests/lightbend/testdata/equiv01/unquoted.conf +41 -0
- package/tests/lightbend/testdata/equiv02/original.json +17 -0
- package/tests/lightbend/testdata/equiv02/path-keys-weird-whitespace.conf +32 -0
- package/tests/lightbend/testdata/equiv02/path-keys.conf +9 -0
- package/tests/lightbend/testdata/equiv03/includes.conf +7 -0
- package/tests/lightbend/testdata/equiv03/letters/a.conf +6 -0
- package/tests/lightbend/testdata/equiv03/letters/b.json +3 -0
- package/tests/lightbend/testdata/equiv03/letters/c.conf +2 -0
- package/tests/lightbend/testdata/equiv03/letters/c.properties +1 -0
- package/tests/lightbend/testdata/equiv03/letters/numbers/1.conf +1 -0
- package/tests/lightbend/testdata/equiv03/letters/numbers/2.properties +1 -0
- package/tests/lightbend/testdata/equiv03/original.json +15 -0
- package/tests/lightbend/testdata/equiv03/root/foo.conf +1 -0
- package/tests/lightbend/testdata/equiv04/missing-substitutions.conf +4 -0
- package/tests/lightbend/testdata/equiv04/original.json +3 -0
- package/tests/lightbend/testdata/equiv05/original.json +16 -0
- package/tests/lightbend/testdata/equiv05/triple-quotes.conf +20 -0
- package/tests/lightbend/testdata/file-include.conf +5 -0
- package/tests/lightbend/testdata/include-from-list.conf +5 -0
- package/tests/lightbend/testdata/onclasspath.conf +2 -0
- package/tests/lightbend/testdata/subdir/bar-file.conf +1 -0
- package/tests/lightbend/testdata/subdir/bar.conf +1 -0
- package/tests/lightbend/testdata/subdir/baz.conf +1 -0
- package/tests/lightbend/testdata/subdir/foo.conf +5 -0
- package/tests/lightbend/testdata/test01.conf +96 -0
- package/tests/lightbend/testdata/test01.json +4 -0
- package/tests/lightbend/testdata/test01.properties +5 -0
- package/tests/lightbend/testdata/test02.conf +13 -0
- package/tests/lightbend/testdata/test03-included.conf +9 -0
- package/tests/lightbend/testdata/test03.conf +36 -0
- package/tests/lightbend/testdata/test04.conf +305 -0
- package/tests/lightbend/testdata/test05.conf +154 -0
- package/tests/lightbend/testdata/test06.conf +14 -0
- package/tests/lightbend/testdata/test07.conf +4 -0
- package/tests/lightbend/testdata/test08.conf +6 -0
- package/tests/lightbend/testdata/test09.conf +17 -0
- package/tests/lightbend/testdata/test10.conf +11 -0
- package/tests/lightbend/testdata/test11.conf +7 -0
- package/tests/lightbend/testdata/test12.conf +43 -0
- package/tests/lightbend/testdata/test13-application-override-substitutions.conf +1 -0
- package/tests/lightbend/testdata/test13-reference-bad-substitutions.conf +1 -0
- package/tests/lightbend/testdata/test13-reference-with-substitutions.conf +2 -0
- package/tests/lightbend/testdata/validate-invalid.conf +30 -0
- package/tests/lightbend/testdata/validate-reference.conf +32 -0
- package/tests/parse.test.ts +44 -0
- package/tests/parser.test.ts +154 -0
- package/tests/resolver.test.ts +159 -0
- package/tests/zod.test.ts +57 -0
- package/tsconfig.json +16 -0
- package/tsup.config.ts +12 -0
- package/vitest.config.ts +7 -0
|
@@ -0,0 +1,305 @@
|
|
|
1
|
+
# This is an unmodified akka-reference.conf, except for this
|
|
2
|
+
# comment and quoting one key that contained slashes.
|
|
3
|
+
# Note: the outer akka{} would not be used in the usual setup
|
|
4
|
+
# with this config lib.
|
|
5
|
+
|
|
6
|
+
##############################
|
|
7
|
+
# Akka Reference Config File #
|
|
8
|
+
##############################
|
|
9
|
+
|
|
10
|
+
# This the reference config file has all the default settings.
|
|
11
|
+
# All these could be removed with no visible effect.
|
|
12
|
+
# Modify as needed.
|
|
13
|
+
# This file is imported in the 'akka.conf' file. Make your edits/overrides there.
|
|
14
|
+
|
|
15
|
+
akka {
|
|
16
|
+
version = "2.0-SNAPSHOT" # Akka version, checked against the runtime version of Akka.
|
|
17
|
+
|
|
18
|
+
enabled-modules = [] # Comma separated list of the enabled modules. Options: ["cluster", "camel", "http"]
|
|
19
|
+
|
|
20
|
+
time-unit = "seconds" # Time unit for all timeout properties throughout the config
|
|
21
|
+
|
|
22
|
+
event-handlers = ["akka.event.Logging$DefaultLogger"] # Event handlers to register at boot time (Logging$DefaultLogger logs to STDOUT)
|
|
23
|
+
loglevel = "WARNING" # Options: ERROR, WARNING, INFO, DEBUG
|
|
24
|
+
# this level is used by the configured loggers (see "event-handlers") as soon
|
|
25
|
+
# as they have been started; before that, see "stdout-loglevel"
|
|
26
|
+
stdout-loglevel = "WARNING" # Loglevel for the very basic logger activated during AkkaApplication startup
|
|
27
|
+
|
|
28
|
+
event-handler-dispatcher {
|
|
29
|
+
type = "Dispatcher" # Must be one of the following
|
|
30
|
+
# Dispatcher, (BalancingDispatcher, only valid when all actors using it are of the same type),
|
|
31
|
+
# A FQCN to a class inheriting MessageDispatcherConfigurator with a no-arg visible constructor
|
|
32
|
+
name = "EventHandlerDispatcher" # Optional, will be a generated UUID if omitted
|
|
33
|
+
keep-alive-time = 60 # Keep alive time for threads
|
|
34
|
+
core-pool-size = 1 # No of core threads
|
|
35
|
+
max-pool-size = 8 # Max no of threads
|
|
36
|
+
executor-bounds = -1 # Makes the Executor bounded, -1 is unbounded
|
|
37
|
+
task-queue-size = -1 # Specifies the bounded capacity of the task queue (< 1 == unbounded)
|
|
38
|
+
task-queue-type = "linked" # Specifies which type of task queue will be used, can be "array" or "linked" (default)
|
|
39
|
+
allow-core-timeout = on # Allow core threads to time out
|
|
40
|
+
rejection-policy = "caller-runs" # abort, caller-runs, discard-oldest, discard
|
|
41
|
+
throughput = 5 # Throughput for Dispatcher, set to 1 for complete fairness
|
|
42
|
+
throughput-deadline-time = -1 # Throughput deadline for Dispatcher, set to 0 or negative for no deadline
|
|
43
|
+
mailbox-capacity = -1 # If negative (or zero) then an unbounded mailbox is used (default)
|
|
44
|
+
# If positive then a bounded mailbox is used and the capacity is set using the property
|
|
45
|
+
# NOTE: setting a mailbox to 'blocking' can be a bit dangerous, could lead to deadlock, use with care
|
|
46
|
+
# The following are only used for Dispatcher and only if mailbox-capacity > 0
|
|
47
|
+
mailbox-push-timeout-time = 10 # Specifies the timeout to add a new message to a mailbox that is full - negative number means infinite timeout
|
|
48
|
+
# (in unit defined by the time-unit property)
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
# These boot classes are loaded (and created) automatically when the Akka Microkernel boots up
|
|
52
|
+
# Can be used to bootstrap your application(s)
|
|
53
|
+
# Should be the FQN (Fully Qualified Name) of the boot class which needs to have a default constructor
|
|
54
|
+
# boot = ["sample.camel.Boot",
|
|
55
|
+
# "sample.rest.java.Boot",
|
|
56
|
+
# "sample.rest.scala.Boot",
|
|
57
|
+
# "sample.security.Boot"]
|
|
58
|
+
boot = []
|
|
59
|
+
|
|
60
|
+
actor {
|
|
61
|
+
timeout = 5 # Default timeout for Future based invocations
|
|
62
|
+
# - Actor: ask && ?
|
|
63
|
+
# - UntypedActor: ask
|
|
64
|
+
# - TypedActor: methods with non-void return type
|
|
65
|
+
serialize-messages = off # Does a deep clone of (non-primitive) messages to ensure immutability
|
|
66
|
+
throughput = 5 # Default throughput for all Dispatcher, set to 1 for complete fairness
|
|
67
|
+
throughput-deadline-time = -1 # Default throughput deadline for all Dispatcher, set to 0 or negative for no deadline
|
|
68
|
+
dispatcher-shutdown-timeout = 1 # Using the akka.time-unit, how long dispatchers by default will wait for new actors until they shut down
|
|
69
|
+
|
|
70
|
+
deployment {
|
|
71
|
+
|
|
72
|
+
"/app/service-ping" { # deployment id pattern
|
|
73
|
+
|
|
74
|
+
router = "round-robin" # routing (load-balance) scheme to use
|
|
75
|
+
# available: "direct", "round-robin", "random", "scatter-gather"
|
|
76
|
+
# "least-cpu", "least-ram", "least-messages"
|
|
77
|
+
# or: fully qualified class name of the router class
|
|
78
|
+
# default is "direct";
|
|
79
|
+
# if 'replication' is used then the only available router is "direct"
|
|
80
|
+
|
|
81
|
+
nr-of-instances = 3 # number of actor instances in the cluster
|
|
82
|
+
# available: positive integer (1-N) or the string "auto" for auto-scaling
|
|
83
|
+
# default is '1'
|
|
84
|
+
# if the "direct" router is used then this element is ignored (always '1')
|
|
85
|
+
|
|
86
|
+
#create-as {
|
|
87
|
+
# class = "com.biz.app.MyActor" # FIXME document 'create-as'
|
|
88
|
+
#}
|
|
89
|
+
|
|
90
|
+
remote {
|
|
91
|
+
nodes = ["wallace:2552", "gromit:2552"] # A list of hostnames and ports for instantiating the remote actor instances
|
|
92
|
+
# The format should be on "hostname:port", where:
|
|
93
|
+
# - hostname can be either hostname or IP address the remote actor should connect to
|
|
94
|
+
# - port should be the port for the remote server on the other node
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
#cluster { # defines the actor as a clustered actor
|
|
98
|
+
# default (if omitted) is local non-clustered actor
|
|
99
|
+
|
|
100
|
+
# preferred-nodes = ["node:node1"] # a list of preferred nodes for instantiating the actor instances on
|
|
101
|
+
# defined as node name
|
|
102
|
+
# available: "node:<node name>"
|
|
103
|
+
|
|
104
|
+
|
|
105
|
+
# replication { # use replication or not? only makes sense for a stateful actor
|
|
106
|
+
|
|
107
|
+
# FIXME should we have this config option here? If so, implement it all through.
|
|
108
|
+
# serialize-mailbox = off # should the actor mailbox be part of the serialized snapshot?
|
|
109
|
+
# default is 'off'
|
|
110
|
+
|
|
111
|
+
# storage = "transaction-log" # storage model for replication
|
|
112
|
+
# available: "transaction-log" and "data-grid"
|
|
113
|
+
# default is "transaction-log"
|
|
114
|
+
|
|
115
|
+
# strategy = "write-through" # guaranteees for replication
|
|
116
|
+
# available: "write-through" and "write-behind"
|
|
117
|
+
# default is "write-through"
|
|
118
|
+
|
|
119
|
+
# }
|
|
120
|
+
#}
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
default-dispatcher {
|
|
125
|
+
type = "Dispatcher" # Must be one of the following
|
|
126
|
+
# Dispatcher, (BalancingDispatcher, only valid when all actors using it are of the same type),
|
|
127
|
+
# A FQCN to a class inheriting MessageDispatcherConfigurator with a no-arg visible constructor
|
|
128
|
+
name = "MyDispatcher" # Optional, will be a generated UUID if omitted
|
|
129
|
+
keep-alive-time = 60 # Keep alive time for threads
|
|
130
|
+
core-pool-size-factor = 8.0 # No of core threads ... ceil(available processors * factor)
|
|
131
|
+
max-pool-size-factor = 8.0 # Max no of threads ... ceil(available processors * factor)
|
|
132
|
+
executor-bounds = -1 # Makes the Executor bounded, -1 is unbounded
|
|
133
|
+
task-queue-size = -1 # Specifies the bounded capacity of the task queue (< 1 == unbounded)
|
|
134
|
+
task-queue-type = "linked" # Specifies which type of task queue will be used, can be "array" or "linked" (default)
|
|
135
|
+
allow-core-timeout = on # Allow core threads to time out
|
|
136
|
+
rejection-policy = "caller-runs" # abort, caller-runs, discard-oldest, discard
|
|
137
|
+
throughput = 5 # Throughput for Dispatcher, set to 1 for complete fairness
|
|
138
|
+
throughput-deadline-time = -1 # Throughput deadline for Dispatcher, set to 0 or negative for no deadline
|
|
139
|
+
mailbox-capacity = -1 # If negative (or zero) then an unbounded mailbox is used (default)
|
|
140
|
+
# If positive then a bounded mailbox is used and the capacity is set using the property
|
|
141
|
+
# NOTE: setting a mailbox to 'blocking' can be a bit dangerous, could lead to deadlock, use with care
|
|
142
|
+
# The following are only used for Dispatcher and only if mailbox-capacity > 0
|
|
143
|
+
mailbox-push-timeout-time = 10 # Specifies the timeout to add a new message to a mailbox that is full - negative number means infinite timeout
|
|
144
|
+
# (in unit defined by the time-unit property)
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
debug {
|
|
148
|
+
receive = off # enable function of Actor.loggable(), which is to log any received message at DEBUG level
|
|
149
|
+
autoreceive = off # enable DEBUG logging of all AutoReceiveMessages (Kill, PoisonPill and the like)
|
|
150
|
+
lifecycle = off # enable DEBUG logging of actor lifecycle changes
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
mailbox {
|
|
154
|
+
|
|
155
|
+
file-based {
|
|
156
|
+
directory-path = "./_mb"
|
|
157
|
+
max-items = 2147483647
|
|
158
|
+
max-size = 2147483647
|
|
159
|
+
max-items = 2147483647
|
|
160
|
+
max-age = 0
|
|
161
|
+
max-journal-size = 16777216 # 16 * 1024 * 1024
|
|
162
|
+
max-memory-size = 134217728 # 128 * 1024 * 1024
|
|
163
|
+
max-journal-overflow = 10
|
|
164
|
+
max-journal-size-absolute = 9223372036854775807
|
|
165
|
+
discard-old-when-full = on
|
|
166
|
+
keep-journal = on
|
|
167
|
+
sync-journal = off
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
redis {
|
|
171
|
+
hostname = "127.0.0.1"
|
|
172
|
+
port = 6379
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
mongodb {
|
|
176
|
+
# Any specified collection name will be used as a prefix for collections that use durable mongo mailboxes
|
|
177
|
+
uri = "mongodb://localhost/akka.mailbox" # Follow Mongo URI Spec - https://docs.mongodb.com/manual/reference/connection-string/
|
|
178
|
+
|
|
179
|
+
# Configurable timeouts for certain ops
|
|
180
|
+
timeout {
|
|
181
|
+
read = 3000 # number of milliseconds to wait for a read to succeed before timing out the future
|
|
182
|
+
write = 3000 # number of milliseconds to wait for a write to succeed before timing out the future
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
zookeeper {
|
|
187
|
+
server-addresses = "localhost:2181"
|
|
188
|
+
session-timeout = 60
|
|
189
|
+
connection-timeout = 60
|
|
190
|
+
blocking-queue = on
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
beanstalk {
|
|
194
|
+
hostname = "127.0.0.1"
|
|
195
|
+
port = 11300
|
|
196
|
+
reconnect-window = 5
|
|
197
|
+
message-submit-delay = 0
|
|
198
|
+
message-submit-timeout = 5
|
|
199
|
+
message-time-to-live = 120
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
# Entries for pluggable serializers and their bindings. If a binding for a specific class is not found,
|
|
204
|
+
# then the default serializer (Java serialization) is used.
|
|
205
|
+
#
|
|
206
|
+
# serializers {
|
|
207
|
+
# java = "akka.serialization.JavaSerializer"
|
|
208
|
+
# proto = "akka.testing.ProtobufSerializer"
|
|
209
|
+
# sjson = "akka.testing.SJSONSerializer"
|
|
210
|
+
# default = "akka.serialization.JavaSerializer"
|
|
211
|
+
# }
|
|
212
|
+
|
|
213
|
+
# serialization-bindings {
|
|
214
|
+
# java = ["akka.serialization.SerializeSpec$Address",
|
|
215
|
+
# "akka.serialization.MyJavaSerializableActor",
|
|
216
|
+
# "akka.serialization.MyStatelessActorWithMessagesInMailbox",
|
|
217
|
+
# "akka.serialization.MyActorWithProtobufMessagesInMailbox"]
|
|
218
|
+
# sjson = ["akka.serialization.SerializeSpec$Person"]
|
|
219
|
+
# proto = ["com.google.protobuf.Message",
|
|
220
|
+
# "akka.actor.ProtobufProtocol$MyMessage"]
|
|
221
|
+
# }
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
remote {
|
|
225
|
+
# FIXME rename to transport
|
|
226
|
+
layer = "akka.cluster.netty.NettyRemoteSupport"
|
|
227
|
+
|
|
228
|
+
secure-cookie = "" # Generate your own with '$AKKA_HOME/scripts/generate_config_with_secure_cookie.sh'
|
|
229
|
+
# or using 'akka.util.Crypt.generateSecureCookie'
|
|
230
|
+
|
|
231
|
+
remote-daemon-ack-timeout = 30 # Timeout for ACK of cluster operations, lik checking actor out etc.
|
|
232
|
+
|
|
233
|
+
use-passive-connections = on # Reuse inbound connections for outbound messages
|
|
234
|
+
|
|
235
|
+
failure-detector { # accrual failure detection config
|
|
236
|
+
threshold = 8 # defines the failure detector threshold
|
|
237
|
+
# A low threshold is prone to generate many wrong suspicions but ensures a
|
|
238
|
+
# quick detection in the event of a real crash. Conversely, a high threshold
|
|
239
|
+
# generates fewer mistakes but needs more time to detect actual crashes
|
|
240
|
+
max-sample-size = 1000
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
server {
|
|
244
|
+
port = 2552 # The default remote server port clients should connect to. Default is 2552 (AKKA)
|
|
245
|
+
message-frame-size = 1048576 # Increase this if you want to be able to send messages with large payloads
|
|
246
|
+
connection-timeout = 120 # Length in time-unit
|
|
247
|
+
require-cookie = off # Should the remote server require that it peers share the same secure-cookie (defined in the 'remote' section)?
|
|
248
|
+
untrusted-mode = off # Enable untrusted mode for full security of server managed actors, allows untrusted clients to connect.
|
|
249
|
+
backlog = 4096 # Sets the size of the connection backlog
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
client {
|
|
253
|
+
buffering {
|
|
254
|
+
retry-message-send-on-failure = false # Should message buffering on remote client error be used (buffer flushed on successful reconnect)
|
|
255
|
+
capacity = -1 # If negative (or zero) then an unbounded mailbox is used (default)
|
|
256
|
+
# If positive then a bounded mailbox is used and the capacity is set using the property
|
|
257
|
+
}
|
|
258
|
+
reconnect-delay = 5
|
|
259
|
+
read-timeout = 3600
|
|
260
|
+
message-frame-size = 1048576
|
|
261
|
+
reap-futures-delay = 5
|
|
262
|
+
reconnection-time-window = 600 # Maximum time window that a client should try to reconnect for
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
cluster {
|
|
267
|
+
name = "test-cluster"
|
|
268
|
+
zookeeper-server-addresses = "localhost:2181" # comma-separated list of '<hostname>:<port>' elements
|
|
269
|
+
max-time-to-wait-until-connected = 30
|
|
270
|
+
session-timeout = 60
|
|
271
|
+
connection-timeout = 60
|
|
272
|
+
include-ref-node-in-replica-set = on # Can a replica be instantiated on the same node as the cluster reference to the actor
|
|
273
|
+
# Default: on
|
|
274
|
+
log-directory = "_akka_cluster" # Where ZooKeeper should store the logs and data files
|
|
275
|
+
|
|
276
|
+
replication {
|
|
277
|
+
digest-type = "MAC" # Options: CRC32 (cheap & unsafe), MAC (expensive & secure using password)
|
|
278
|
+
password = "secret" # FIXME: store open in file?
|
|
279
|
+
ensemble-size = 3
|
|
280
|
+
quorum-size = 2
|
|
281
|
+
snapshot-frequency = 1000 # The number of messages that should be logged between every actor snapshot
|
|
282
|
+
timeout = 30 # Timeout for asyncronous (write-behind) operations
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
stm {
|
|
287
|
+
fair = on # Should global transactions be fair or non-fair (non fair yield better performance)
|
|
288
|
+
max-retries = 1000
|
|
289
|
+
timeout = 5 # Default timeout for blocking transactions and transaction set (in unit defined by
|
|
290
|
+
# the time-unit property)
|
|
291
|
+
write-skew = true
|
|
292
|
+
blocking-allowed = false
|
|
293
|
+
interruptible = false
|
|
294
|
+
speculative = true
|
|
295
|
+
quick-release = true
|
|
296
|
+
propagation = "requires"
|
|
297
|
+
trace-level = "none"
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
test {
|
|
301
|
+
timefactor = "1.0" # factor by which to scale timeouts during tests, e.g. to account for shared build system load
|
|
302
|
+
filter-leeway = 3 # time-units EventFilter.intercept waits after the block is finished until all required messages are received
|
|
303
|
+
single-expect-default = 3 # time-units to wait in expectMsg and friends outside of within() block by default
|
|
304
|
+
}
|
|
305
|
+
}
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
# This is the main configuration file for the application.
|
|
2
|
+
# ~~~~~
|
|
3
|
+
application.name=Yet Another Blog Engine
|
|
4
|
+
|
|
5
|
+
# Configuration of the blog engine
|
|
6
|
+
# ~~~~~
|
|
7
|
+
blog.title=Yet another blog
|
|
8
|
+
blog.baseline=We will write about nothing
|
|
9
|
+
|
|
10
|
+
# Application mode
|
|
11
|
+
# ~~~~~
|
|
12
|
+
# Set to dev to enable instant reloading and other development help.
|
|
13
|
+
# Otherwise set to prod.
|
|
14
|
+
application.mode=dev
|
|
15
|
+
%prod.application.mode=prod
|
|
16
|
+
|
|
17
|
+
# Secret key
|
|
18
|
+
# ~~~~~
|
|
19
|
+
# The secret key is used to secure cryptographics functions
|
|
20
|
+
# If you deploy your application to several instances be sure to use the same key !
|
|
21
|
+
application.secret=s1kwayg211q9v4387pvarbmyqnht7hrl54d34lsz0yh9btb117br293a25trz31o
|
|
22
|
+
|
|
23
|
+
# Additional modules
|
|
24
|
+
# ~~~~~
|
|
25
|
+
# A module is another play! application. Add a line for each module you want
|
|
26
|
+
# to add to your application. Modules path are either absolutes or relative to
|
|
27
|
+
# the application root.
|
|
28
|
+
|
|
29
|
+
# Import the crud module
|
|
30
|
+
module.crud=${?play.path}/modules/crud
|
|
31
|
+
|
|
32
|
+
# Import the secure module
|
|
33
|
+
module.secure=${?play.path}/modules/secure
|
|
34
|
+
|
|
35
|
+
# Import the cobertura module in test mode
|
|
36
|
+
#%test.module.cobertura=${play.path}/modules/cobertura
|
|
37
|
+
|
|
38
|
+
# i18n
|
|
39
|
+
# ~~~~~
|
|
40
|
+
# Define locales used by your application.
|
|
41
|
+
# You can then place localized messages in conf/messages.{locale} files
|
|
42
|
+
# application.langs=fr,en,ja
|
|
43
|
+
|
|
44
|
+
# Server configuration
|
|
45
|
+
# ~~~~~
|
|
46
|
+
# If you need to change the HTTP port, uncomment this (default is set to 9000)
|
|
47
|
+
# http.port=9000
|
|
48
|
+
#
|
|
49
|
+
# By default the server listen for HTTP on the wilcard address.
|
|
50
|
+
# You can restrict this.
|
|
51
|
+
# http.address=127.0.0.1
|
|
52
|
+
|
|
53
|
+
# Session configuration
|
|
54
|
+
# ~~~~~~~~~~~~~~~~~~~~~~
|
|
55
|
+
# By default, session will be written to the transient PLAY_SESSION cookie.
|
|
56
|
+
# application.session.cookie=PLAY
|
|
57
|
+
# application.session.maxAge=1h
|
|
58
|
+
|
|
59
|
+
# JPDA configuration
|
|
60
|
+
# ~~~~~
|
|
61
|
+
# Define which port is used by JPDA when application is in debug mode (default is set to 8000)
|
|
62
|
+
# jpda.port=8000
|
|
63
|
+
|
|
64
|
+
# Log level
|
|
65
|
+
# ~~~~~
|
|
66
|
+
# Specify log level for your application.
|
|
67
|
+
# If you want a very customized log, create a log4j.properties file in the conf directory
|
|
68
|
+
application.log=INFO
|
|
69
|
+
|
|
70
|
+
# Database configuration
|
|
71
|
+
# ~~~~~
|
|
72
|
+
# Enable a database engine if needed.
|
|
73
|
+
#
|
|
74
|
+
# To quickly set up a development database, use either:
|
|
75
|
+
# - mem : for a transient in memory database (H2 in memory)
|
|
76
|
+
# - fs : for a simple file written database (H2 file stored)
|
|
77
|
+
db=mem
|
|
78
|
+
#
|
|
79
|
+
# To connect to a local MySQL5 database, use:
|
|
80
|
+
# db=mysql:user:pwd@database_name
|
|
81
|
+
#
|
|
82
|
+
# If you need a full JDBC configuration use the following :
|
|
83
|
+
# db.url=jdbc:postgresql:database_name
|
|
84
|
+
# db.driver=org.postgresql.Driver
|
|
85
|
+
# db.user=root
|
|
86
|
+
# db.pass=secret
|
|
87
|
+
#
|
|
88
|
+
# Connections pool configuration :
|
|
89
|
+
# db.pool.timeout=1000
|
|
90
|
+
# db.pool.maxSize=30
|
|
91
|
+
# db.pool.minSize=10
|
|
92
|
+
#
|
|
93
|
+
# If you want to reuse an existing Datasource from your application server, use:
|
|
94
|
+
# db=java:/comp/env/jdbc/myDatasource
|
|
95
|
+
|
|
96
|
+
# JPA Configuration (Hibernate)
|
|
97
|
+
# ~~~~~
|
|
98
|
+
#
|
|
99
|
+
# Specify the custom JPA dialect to use here (default to guess):
|
|
100
|
+
# jpa.dialect=org.hibernate.dialect.PostgreSQLDialect
|
|
101
|
+
#
|
|
102
|
+
# Specify the ddl generation pattern to use (default to update, set to none to disable it):
|
|
103
|
+
jpa.ddl=update
|
|
104
|
+
#
|
|
105
|
+
# Debug SQL statements (logged using DEBUG level):
|
|
106
|
+
# jpa.debugSQL=true
|
|
107
|
+
#
|
|
108
|
+
# You can even specify additional hibernate properties here:
|
|
109
|
+
# hibernate.use_sql_comments=true
|
|
110
|
+
# ...
|
|
111
|
+
|
|
112
|
+
# Memcached configuration
|
|
113
|
+
# ~~~~~
|
|
114
|
+
# Enable memcached if needed. Otherwise a local cache is used.
|
|
115
|
+
# memcached=enabled
|
|
116
|
+
#
|
|
117
|
+
# Specify memcached host (default to 127.0.0.1:11211)
|
|
118
|
+
# memcached.host=127.0.0.1:11211
|
|
119
|
+
#
|
|
120
|
+
# Or you can specify multiple host to build a distributed cache
|
|
121
|
+
# memcached.1.host=127.0.0.1:11211
|
|
122
|
+
# memcached.2.host=127.0.0.1:11212
|
|
123
|
+
|
|
124
|
+
# Mail configuration
|
|
125
|
+
# ~~~~~
|
|
126
|
+
# Default is to use a mock Mailer
|
|
127
|
+
mail.smtp=mock
|
|
128
|
+
|
|
129
|
+
# Or, specify mail host configuration
|
|
130
|
+
# mail.smtp.host=127.0.0.1
|
|
131
|
+
# mail.smtp.user=admin
|
|
132
|
+
# mail.smtp.pass=
|
|
133
|
+
# mail.smtp.channel=ssl
|
|
134
|
+
|
|
135
|
+
# Execution pool
|
|
136
|
+
# ~~~~~
|
|
137
|
+
# Default to 1 thread in DEV mode or nb processors + 1 threads in PROD mode.
|
|
138
|
+
# Try to keep a low as possible. 1 thread will serialize all requests (very usefull for debugging purpose)
|
|
139
|
+
# play.pool=3
|
|
140
|
+
|
|
141
|
+
# Open file from errors pages
|
|
142
|
+
# ~~~~~
|
|
143
|
+
# If your text editor supports to open files using URL, Play! will link
|
|
144
|
+
# error pages to files dynamically
|
|
145
|
+
#
|
|
146
|
+
# Example, for textmate:
|
|
147
|
+
# play.editor=txmt://open?url=file://%s&line=%s
|
|
148
|
+
|
|
149
|
+
# Testing. Set up a custom configuration for test mode
|
|
150
|
+
# ~~~~~
|
|
151
|
+
%test.application.mode=dev
|
|
152
|
+
%test.db=mem
|
|
153
|
+
%test.jpa.ddl=create-drop
|
|
154
|
+
%test.mail.smtp=mock
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
// This file is testing ConfigDelayedMergeObject and ConfigDelayedMerge
|
|
2
|
+
|
|
3
|
+
x={ q : 10 }
|
|
4
|
+
y=5
|
|
5
|
+
|
|
6
|
+
a=1
|
|
7
|
+
a.q.r.s=${b}
|
|
8
|
+
a=${y}
|
|
9
|
+
a=${x}
|
|
10
|
+
a={ c : 3 }
|
|
11
|
+
|
|
12
|
+
b=${x}
|
|
13
|
+
b=${y}
|
|
14
|
+
|
|
15
|
+
// nesting ConfigDelayed inside another one
|
|
16
|
+
c=${x}
|
|
17
|
+
c={ d : 600, e : ${a}, f : ${b} }
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
// this checks sorting map keys, where keys that look like numbers are treated differently
|
|
2
|
+
// specifically tests very long numbers which fit neither in an Integer nor in a Long
|
|
3
|
+
|
|
4
|
+
"10" = "42"
|
|
5
|
+
sth = 42
|
|
6
|
+
"1" = "42"
|
|
7
|
+
"12" = "42"
|
|
8
|
+
"123" = "42"
|
|
9
|
+
"1234" = "42"
|
|
10
|
+
"12345" = "42"
|
|
11
|
+
"123456" = "42"
|
|
12
|
+
"1234567" = "42"
|
|
13
|
+
"12345678" = "42"
|
|
14
|
+
"123456789" = "42"
|
|
15
|
+
"1234567890" = "42"
|
|
16
|
+
"12345678901" = "42"
|
|
17
|
+
"123456789012" = "42"
|
|
18
|
+
"1234567890123" = "42"
|
|
19
|
+
"12345678901234" = "42"
|
|
20
|
+
"123456789012345" = "42"
|
|
21
|
+
"1234567890123456" = "42"
|
|
22
|
+
"12345678901234567" = "42"
|
|
23
|
+
"123456789012345678" = "42"
|
|
24
|
+
"1234567890123456789" = "42"
|
|
25
|
+
"12345678901234567891" = "42"
|
|
26
|
+
"123456789012345678912" = "42"
|
|
27
|
+
"1234567890123456789123" = "42"
|
|
28
|
+
"12345678901234567891234" = "42"
|
|
29
|
+
"123456789012345678912345" = "42"
|
|
30
|
+
"1234567890123456789123456" = "42"
|
|
31
|
+
"12345678901234567891234567" = "42"
|
|
32
|
+
"123456789012345678912345678" = "42"
|
|
33
|
+
"1234567890123456789123456789" = "42"
|
|
34
|
+
"12345678901234567891234567890" = "42"
|
|
35
|
+
"123456789012345678912345678901" = "42"
|
|
36
|
+
"1234567890123456789123456789012" = "42"
|
|
37
|
+
"12345678901234567891234567890123" = "42"
|
|
38
|
+
"123456789012345678912345678901234" = "42"
|
|
39
|
+
"1234567890123456789123456789012345" = "42"
|
|
40
|
+
"12345678901234567891234567890123456" = "42"
|
|
41
|
+
"123456789012345678912345678901234567" = "42"
|
|
42
|
+
"1234567890123456789123456789012345678" = "42"
|
|
43
|
+
"12345678901234567891234567890123456789" = "42"
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
b = "overridden"
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
a = ${b}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
string1="a string"
|
|
2
|
+
string2=107
|
|
3
|
+
string3={ a : b }
|
|
4
|
+
string4=[]
|
|
5
|
+
int1=203
|
|
6
|
+
int2="foo"
|
|
7
|
+
int3={ q : s }
|
|
8
|
+
float1="the string"
|
|
9
|
+
float2=false
|
|
10
|
+
float3=[ 4, 5, 6 ]
|
|
11
|
+
bool1=709
|
|
12
|
+
bool2="string!"
|
|
13
|
+
bool3={}
|
|
14
|
+
null1=10000
|
|
15
|
+
null2="hello world"
|
|
16
|
+
null3=true
|
|
17
|
+
object1={ z : s }
|
|
18
|
+
object2=[]
|
|
19
|
+
object3=12345
|
|
20
|
+
array1=[1,2,"foo"]
|
|
21
|
+
array2=[7,8,9]
|
|
22
|
+
array3=[{ n : m }, 10]
|
|
23
|
+
array4=[42, 43]
|
|
24
|
+
array5=64
|
|
25
|
+
emptyArray1=[1,2,3]
|
|
26
|
+
emptyArray2=["a","b","c"]
|
|
27
|
+
|
|
28
|
+
a.b.c.d.e.f.g = 100
|
|
29
|
+
a.b.c.d.e.f.h = "foo"
|
|
30
|
+
a.b.c.d.e.f.i = []
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
string1="foo"
|
|
2
|
+
string2="bar"
|
|
3
|
+
string3="baz"
|
|
4
|
+
string4="hello"
|
|
5
|
+
int1=10
|
|
6
|
+
int2=11
|
|
7
|
+
int3=12
|
|
8
|
+
float1=3.14
|
|
9
|
+
float2=3.2
|
|
10
|
+
float3=3.3
|
|
11
|
+
bool1=true
|
|
12
|
+
bool2=false
|
|
13
|
+
bool3=true
|
|
14
|
+
null1=null
|
|
15
|
+
null2=null
|
|
16
|
+
null3=null
|
|
17
|
+
object1={ a : b }
|
|
18
|
+
object2={ c : d }
|
|
19
|
+
object3={ e : f }
|
|
20
|
+
array1=[1,2,3]
|
|
21
|
+
array2=[a,b,c]
|
|
22
|
+
array3=[true, true, false]
|
|
23
|
+
array4=[{}, {}]
|
|
24
|
+
array5=[]
|
|
25
|
+
emptyArray1=[]
|
|
26
|
+
emptyArray2=[]
|
|
27
|
+
willBeMissing=90009
|
|
28
|
+
|
|
29
|
+
a.b.c.d.e.f.g = true
|
|
30
|
+
a.b.c.d.e.f.h = true
|
|
31
|
+
a.b.c.d.e.f.i = true
|
|
32
|
+
a.b.c.d.e.f.j = true
|