fable 3.0.46 → 3.0.48
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/Dockerfile_LUXURYCode +4 -5
- package/dist/fable.compatible.js +9 -3
- package/dist/fable.compatible.min.js +2 -2
- package/dist/fable.compatible.min.js.map +1 -1
- package/dist/fable.js +9 -3
- package/dist/fable.min.js +2 -2
- package/dist/fable.min.js.map +1 -1
- package/package.json +4 -3
- 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/Fable-ServiceManager.js +19 -0
- package/source/services/Fable-Service-Operation-DefaultSettings.js +1 -1
- package/source/services/Fable-Service-Operation.js +4 -11
- package/test/FableServiceManager_tests.js +3 -0
- 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
|
@@ -1,88 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Test Harness
|
|
3
|
-
*
|
|
4
|
-
* @license MIT
|
|
5
|
-
*
|
|
6
|
-
* @author Steven Velozo <steven@velozo.com>
|
|
7
|
-
*/
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
////////// Code can go here for easy debugging //////////
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
const tmpApplicationSettings = (
|
|
15
|
-
{
|
|
16
|
-
Product: 'MockEndpointServer',
|
|
17
|
-
ProductVersion: '0.0.0',
|
|
18
|
-
|
|
19
|
-
"UnauthorizedRequestDelay": 100,
|
|
20
|
-
|
|
21
|
-
APIServerPort: 8086,
|
|
22
|
-
|
|
23
|
-
MySQL:
|
|
24
|
-
{
|
|
25
|
-
// This is queued up for Travis defaults.
|
|
26
|
-
Server: "localhost",
|
|
27
|
-
Port: 3306,
|
|
28
|
-
User: "root",
|
|
29
|
-
Password: "123456789",
|
|
30
|
-
// Password: "",
|
|
31
|
-
Database: "FableTest",
|
|
32
|
-
ConnectionPoolLimit: 20
|
|
33
|
-
}
|
|
34
|
-
});
|
|
35
|
-
|
|
36
|
-
// Construct a fable.
|
|
37
|
-
const _Fable = new libFable(tmpApplicationSettings);
|
|
38
|
-
// Connect to SQL, put the connection in the magic location
|
|
39
|
-
_Fable.MeadowMySQLConnectionPool = libMySQL.createPool
|
|
40
|
-
(
|
|
41
|
-
{
|
|
42
|
-
connectionLimit: _Fable.settings.MySQL.ConnectionPoolLimit,
|
|
43
|
-
host: _Fable.settings.MySQL.Server,
|
|
44
|
-
port: _Fable.settings.MySQL.Port,
|
|
45
|
-
user: _Fable.settings.MySQL.User,
|
|
46
|
-
password: _Fable.settings.MySQL.Password,
|
|
47
|
-
database: _Fable.settings.MySQL.Database,
|
|
48
|
-
namedPlaceholders: true
|
|
49
|
-
}
|
|
50
|
-
);
|
|
51
|
-
|
|
52
|
-
// Load up a Meadow (pointing at the Animal database)
|
|
53
|
-
const _AnimalSchema = require('../test/Animal.json');
|
|
54
|
-
const _Meadow = libMeadow.new(_Fable, 'FableTest')
|
|
55
|
-
.setProvider('MySQL')
|
|
56
|
-
.setSchema(_AnimalSchema.Schema)
|
|
57
|
-
.setJsonSchema(_AnimalSchema.JsonSchema)
|
|
58
|
-
.setDefaultIdentifier(_AnimalSchema.DefaultIdentifier)
|
|
59
|
-
.setDefault(_AnimalSchema.DefaultObject);
|
|
60
|
-
|
|
61
|
-
// Instantiate the meadow endpoints with the DAL object constructed above
|
|
62
|
-
const _MeadowEndpoints = new libMeadowEndpoints(_Meadow);
|
|
63
|
-
|
|
64
|
-
// Instantiate the service server, using restify
|
|
65
|
-
const _Orator = new libOrator(_Fable, libOratorServiceServerRestify);
|
|
66
|
-
// Prepare the service server for mapping endpoints
|
|
67
|
-
_Orator.initializeServiceServer();
|
|
68
|
-
|
|
69
|
-
_MeadowEndpoints.controller.BehaviorInjection.setBehavior('Schema-PreOperation',
|
|
70
|
-
function (pRequest, pRequestState, fCallback)
|
|
71
|
-
{
|
|
72
|
-
this.log.info('I have access to state!', pRequestState);
|
|
73
|
-
return fCallback();
|
|
74
|
-
});
|
|
75
|
-
|
|
76
|
-
_MeadowEndpoints.controller.BehaviorInjection.setBehavior('Schema-PostOperation',
|
|
77
|
-
function (pRequest, pRequestState, fCallback)
|
|
78
|
-
{
|
|
79
|
-
pRequestState.JSONSchema.PLOT = `GODZILLA WILL EAT YOUR SOUL!`;
|
|
80
|
-
this.log.info('I can also mutate state before sending!', pRequestState);
|
|
81
|
-
return fCallback();
|
|
82
|
-
});
|
|
83
|
-
|
|
84
|
-
// Wire the endpoints up
|
|
85
|
-
_MeadowEndpoints.connectRoutes(_Orator.serviceServer);
|
|
86
|
-
|
|
87
|
-
// Now start the web server.
|
|
88
|
-
_Orator.startWebServer(_HarnessBehavior);
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|