fable 3.0.45 → 3.0.47
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/.browserslistrc +1 -1
- package/.config/configstore/update-notifier-npm.json +1 -1
- package/.config/vscode-sqltools/runningInfo.json +1 -1
- package/Dockerfile_LUXURYCode +4 -5
- package/dist/fable.compatible.js +277 -4005
- package/dist/fable.compatible.min.js +18 -30
- package/dist/fable.compatible.min.js.map +1 -1
- package/dist/fable.js +208 -3936
- package/dist/fable.min.js +18 -30
- package/dist/fable.min.js.map +1 -1
- package/gulpfile-config.json +2 -2
- package/package.json +7 -7
- package/retold-harness/bookstore-serve-api.js +41 -0
- package/retold-harness/configuration-bookstore-serve-api.js +30 -0
- package/retold-harness/model/manual_scripts/MySQL-Laden-Entry.sh +17 -0
- package/retold-harness/model/manual_scripts/my.cnf +4 -0
- package/retold-harness/model/sql_create/BookStore-DeleteAndRepopulateTables.sql +194 -0
- package/retold-harness/model/sql_create/MySQL-Security.sql +5 -0
- package/source/services/Fable-Service-MetaTemplate/MetaTemplate-StringParser.js +281 -0
- package/source/services/Fable-Service-MetaTemplate/MetaTemplate-WordTree.js +97 -0
- package/source/services/Fable-Service-MetaTemplate.js +20 -6
- package/source/services/Fable-Service-Operation-DefaultSettings.js +1 -1
- package/source/services/Fable-Service-Operation.js +4 -11
- package/test/MetaTemplating_tests.js +241 -29
- package/test/RestClient_test.js +1 -1
- package/retold-harness/Bookstore-Import-Books.sh +0 -4
- package/retold-harness/bookstore-configuration.json +0 -28
- package/retold-harness/bookstore-import-books-run.js +0 -9
- package/retold-harness/bookstore-import-books.js +0 -214
- package/retold-harness/bookstore-serve-meadow-endpoint-apis-IPC.js +0 -137
- package/retold-harness/bookstore-serve-meadow-endpoint-apis-run.js +0 -6
- package/retold-harness/bookstore-serve-meadow-endpoint-apis.js +0 -129
- package/retold-harness/data/books.csv +0 -10001
- package/retold-harness/model/json_schema/README.md +0 -1
- package/retold-harness/package.json +0 -22
- package/retold-harness/test_old/Tests.js +0 -3243
- package/retold-harness/test_old/untitled.js +0 -88
- /package/retold-harness/{MySQL-Laden-Entry.sh → docker_scripts/MySQL-Laden-Entry.sh} +0 -0
- /package/retold-harness/model/{json_schema/BookStore-Extended.json → Model-Extended.json} +0 -0
- /package/retold-harness/model/{json_schema/BookStore-PICT.json → Model-PICT.json} +0 -0
- /package/retold-harness/model/{json_schema/BookStore.json → Model.json} +0 -0
- /package/retold-harness/{bookstore-api-endpoint-exercises.paw → model/bookstore-api-endpoint-exercises.paw} +0 -0
- /package/retold-harness/{MySQL-Security.sql → model/manual_scripts/MySQL-Security.sql} +0 -0
- /package/retold-harness/model/{meadow_schema/BookStore-MeadowSchema-Author.json → meadow/Model-MeadowSchema-Author.json} +0 -0
- /package/retold-harness/model/{meadow_schema/BookStore-MeadowSchema-Book.json → meadow/Model-MeadowSchema-Book.json} +0 -0
- /package/retold-harness/model/{meadow_schema/BookStore-MeadowSchema-BookAuthorJoin.json → meadow/Model-MeadowSchema-BookAuthorJoin.json} +0 -0
- /package/retold-harness/model/{meadow_schema/BookStore-MeadowSchema-BookPrice.json → meadow/Model-MeadowSchema-BookPrice.json} +0 -0
- /package/retold-harness/model/{meadow_schema/BookStore-MeadowSchema-Review.json → meadow/Model-MeadowSchema-Review.json} +0 -0
- /package/retold-harness/model/{meadow_schema → meadow}/README.md +0 -0
package/gulpfile-config.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "fable",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.47",
|
|
4
4
|
"description": "An entity behavior management and API bundling library.",
|
|
5
5
|
"main": "source/Fable.js",
|
|
6
6
|
"scripts": {
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
"build": "./node_modules/.bin/gulp build",
|
|
11
11
|
"build-compatible": "GULP_CUSTOM_BUILD_TARGET=compatible ./node_modules/.bin/gulp build",
|
|
12
12
|
"docker-dev-build": "docker build ./ -f Dockerfile_LUXURYCode -t retold/fable:local",
|
|
13
|
-
"docker-dev-run": "docker run -it -d --name retold-fable-dev -p 30001:8080 -p
|
|
13
|
+
"docker-dev-run": "docker run -it -d --name retold-fable-dev -p 30001:8080 -p 38086:8086 -v \"$PWD/.config:/home/coder/.config\" -v \"$PWD:/home/coder/fable\" -u \"$(id -u):$(id -g)\" -e \"DOCKER_USER=$USER\" retold/fable:local",
|
|
14
14
|
"docker-dev-shell": "docker exec -it retold-fable-dev /bin/bash"
|
|
15
15
|
},
|
|
16
16
|
"mocha": {
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
},
|
|
51
51
|
"homepage": "https://github.com/stevenvelozo/fable",
|
|
52
52
|
"devDependencies": {
|
|
53
|
-
"@babel/core": "^7.21.
|
|
53
|
+
"@babel/core": "^7.21.8",
|
|
54
54
|
"@babel/preset-env": "^7.21.5",
|
|
55
55
|
"browserify": "^17.0.0",
|
|
56
56
|
"chai": "4.3.7",
|
|
@@ -62,20 +62,20 @@
|
|
|
62
62
|
"gulp-util": "^3.0.8",
|
|
63
63
|
"mocha": "10.2.0",
|
|
64
64
|
"nyc": "^15.1.0",
|
|
65
|
+
"retold-data-service": "^1.0.3",
|
|
65
66
|
"vinyl-buffer": "^1.0.1",
|
|
66
67
|
"vinyl-source-stream": "^2.0.0"
|
|
67
68
|
},
|
|
68
69
|
"dependencies": {
|
|
69
70
|
"async.eachlimit": "^0.5.2",
|
|
70
71
|
"async.waterfall": "^0.5.2",
|
|
71
|
-
"cachetrax": "^1.0.
|
|
72
|
+
"cachetrax": "^1.0.3",
|
|
72
73
|
"data-arithmatic": "^1.0.7",
|
|
73
74
|
"fable-log": "^3.0.10",
|
|
74
|
-
"fable-serviceproviderbase": "^3.0.
|
|
75
|
-
"fable-settings": "^3.0.
|
|
75
|
+
"fable-serviceproviderbase": "^3.0.5",
|
|
76
|
+
"fable-settings": "^3.0.6",
|
|
76
77
|
"fable-uuid": "^3.0.5",
|
|
77
78
|
"manyfest": "^1.0.24",
|
|
78
|
-
"precedent": "^1.0.13",
|
|
79
79
|
"simple-get": "^4.0.1"
|
|
80
80
|
}
|
|
81
81
|
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
const _Settings = require('./configuration-bookstore-serve-api.js');
|
|
2
|
+
|
|
3
|
+
const libFable = require('fable');
|
|
4
|
+
|
|
5
|
+
_Fable = new libFable(_Settings);
|
|
6
|
+
_Fable.serviceManager.addServiceType('RetoldDataService', require('retold-data-service'));
|
|
7
|
+
// The RetoldDataService defaults to process.cwd() but we want to run this from wherever.
|
|
8
|
+
_Fable.serviceManager.instantiateServiceProvider('RetoldDataService',
|
|
9
|
+
{
|
|
10
|
+
"FullMeadowSchemaPath": `${__dirname}/model/`,
|
|
11
|
+
"DALMeadowSchemaPath": `${__dirname}/model/meadow/`
|
|
12
|
+
});
|
|
13
|
+
|
|
14
|
+
_Fable.MeadowEndpoints.Book.controller.BehaviorInjection.setBehavior('Read-PostOperation',
|
|
15
|
+
(pRequest, pRequestState, fComplete) =>
|
|
16
|
+
{
|
|
17
|
+
// Get the join records
|
|
18
|
+
_Fable.DAL.BookAuthorJoin.doReads(_Fable.DAL.BookAuthorJoin.query.addFilter('IDBook', pRequestState.Record.IDBook),
|
|
19
|
+
(pJoinReadError, pJoinReadQuery, pJoinRecords)=>
|
|
20
|
+
{
|
|
21
|
+
let tmpAuthorList = [];
|
|
22
|
+
for (let j = 0; j < pJoinRecords.length; j++)
|
|
23
|
+
{
|
|
24
|
+
tmpAuthorList.push(pJoinRecords[j].IDAuthor);
|
|
25
|
+
}
|
|
26
|
+
if (tmpAuthorList.length < 1)
|
|
27
|
+
{
|
|
28
|
+
pRequestState.Record.Authors = [];
|
|
29
|
+
return fComplete();
|
|
30
|
+
}
|
|
31
|
+
else
|
|
32
|
+
{
|
|
33
|
+
_Fable.DAL.Author.doReads(_Fable.DAL.Author.query.addFilter('IDAuthor', tmpAuthorList, 'IN'),
|
|
34
|
+
(pReadsError, pReadsQuery, pAuthors)=>
|
|
35
|
+
{
|
|
36
|
+
pRequestState.Record.Authors = pAuthors;
|
|
37
|
+
return fComplete();
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
});
|
|
41
|
+
});
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
module.exports = (
|
|
2
|
+
{
|
|
3
|
+
"Product": "MeadowEndpointsTestBookStore",
|
|
4
|
+
"ProductVersion": "1.0.0",
|
|
5
|
+
|
|
6
|
+
"UUID":
|
|
7
|
+
{
|
|
8
|
+
"DataCenter": 0,
|
|
9
|
+
"Worker": 0
|
|
10
|
+
},
|
|
11
|
+
"LogStreams":
|
|
12
|
+
[
|
|
13
|
+
{
|
|
14
|
+
"streamtype": "console"
|
|
15
|
+
}
|
|
16
|
+
],
|
|
17
|
+
|
|
18
|
+
"APIServerPort": 8086,
|
|
19
|
+
|
|
20
|
+
"MySQL":
|
|
21
|
+
{
|
|
22
|
+
"Server": "127.0.0.1",
|
|
23
|
+
"Port": 3306,
|
|
24
|
+
"User": "root",
|
|
25
|
+
"Password": "123456789",
|
|
26
|
+
"Database": "bookstore",
|
|
27
|
+
"ConnectionPoolLimit": 20
|
|
28
|
+
},
|
|
29
|
+
"MeadowConnectionMySQLAutoConnect": true
|
|
30
|
+
});
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
|
|
3
|
+
trap 'kill -TERM $PID' TERM INT
|
|
4
|
+
|
|
5
|
+
/usr/bin/entrypoint.sh --bind-addr "0.0.0.0:8080" . &
|
|
6
|
+
|
|
7
|
+
PID=$!
|
|
8
|
+
|
|
9
|
+
sleep 2
|
|
10
|
+
|
|
11
|
+
sudo service mariadb restart
|
|
12
|
+
|
|
13
|
+
wait $PID
|
|
14
|
+
trap - TERM INT
|
|
15
|
+
wait $PID
|
|
16
|
+
EXIT_STATUS=$?
|
|
17
|
+
echo "Service exited with status ${EXIT_STATUS}"
|