odac 1.4.11 → 1.4.13
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/CHANGELOG.md +28 -0
- package/client/odac.js +22 -18
- package/docs/ai/skills/backend/config.md +21 -1
- package/docs/ai/skills/backend/database.md +40 -0
- package/docs/backend/03-config/00-configuration-overview.md +12 -6
- package/docs/backend/03-config/01-database-connection.md +41 -4
- package/docs/backend/03-config/04-environment-variables.md +3 -2
- package/docs/backend/08-database/01-getting-started.md +11 -0
- package/docs/backend/10-authentication/04-odac-register-forms.md +7 -4
- package/docs/backend/10-authentication/06-odac-login-forms.md +7 -4
- package/package.json +1 -1
- package/src/Database/Migration.js +32 -11
- package/src/Mail.js +61 -0
- package/src/Route/Cron.js +10 -0
- package/src/Route.js +1 -0
- package/src/View/Form.js +314 -514
- package/src/View.js +8 -5
package/src/View.js
CHANGED
|
@@ -443,12 +443,7 @@ class View {
|
|
|
443
443
|
content = this.#parseOdacTag(content)
|
|
444
444
|
content = content.replace(/`/g, '\\\\`').replace(/\$\{/g, '\\\\${')
|
|
445
445
|
|
|
446
|
-
jsBlocks.forEach((jsContent, index) => {
|
|
447
|
-
content = content.replace(`___ODAC_JS_BLOCK_${index}___`, jsContent)
|
|
448
|
-
})
|
|
449
|
-
|
|
450
446
|
let result = 'html += `\n' + content + '\n`'
|
|
451
|
-
content = content.split('\n')
|
|
452
447
|
for (let key in this.#functions) {
|
|
453
448
|
let att = ''
|
|
454
449
|
let func = this.#functions[key]
|
|
@@ -517,6 +512,14 @@ class View {
|
|
|
517
512
|
}
|
|
518
513
|
}
|
|
519
514
|
}
|
|
515
|
+
|
|
516
|
+
// Restore <script:odac> JS bodies after function processing so the regex
|
|
517
|
+
// pipeline above never sees user JS as template syntax. Use a function
|
|
518
|
+
// replacer to keep $-sequences in the JS literal (e.g. $$, $&) intact.
|
|
519
|
+
jsBlocks.forEach((jsContent, index) => {
|
|
520
|
+
result = result.replace(`___ODAC_JS_BLOCK_${index}___`, () => jsContent)
|
|
521
|
+
})
|
|
522
|
+
|
|
520
523
|
let cache = `${nodeCrypto.createHash('md5').update(file).digest('hex')}`
|
|
521
524
|
await fsPromises.mkdir(CACHE_DIR, {recursive: true})
|
|
522
525
|
await fsPromises.writeFile(
|