meadow 1.1.1 → 2.0.1

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.
Files changed (86) hide show
  1. package/.config/code-server/config.yaml +4 -0
  2. package/.config/configstore/update-notifier-npm-check-updates.json +4 -0
  3. package/.config/configstore/update-notifier-npm.json +4 -0
  4. package/.config/luxury-extras/.vscode/launch.json +46 -0
  5. package/.config/luxury-extras/Dockerfile +32 -0
  6. package/.config/luxury-extras/MySQL/Dockerfile +51 -0
  7. package/.config/luxury-extras/MySQL/MySQL-Laden-Entry.sh +17 -0
  8. package/.config/luxury-extras/MySQL/MySQL-Security.sql +5 -0
  9. package/.config/luxury-extras/model/ddl/BookStore.ddl +66 -0
  10. package/.config/luxury-extras/model/documentation/Dictionary.md +18 -0
  11. package/.config/luxury-extras/model/documentation/Model-Author.md +20 -0
  12. package/.config/luxury-extras/model/documentation/Model-Book.md +26 -0
  13. package/.config/luxury-extras/model/documentation/Model-BookAuthorJoin.md +14 -0
  14. package/.config/luxury-extras/model/documentation/Model-BookPrice.md +25 -0
  15. package/.config/luxury-extras/model/documentation/Model-Review.md +22 -0
  16. package/.config/luxury-extras/model/documentation/ModelChangeTracking.md +17 -0
  17. package/.config/luxury-extras/model/documentation/README.md +1 -0
  18. package/.config/luxury-extras/model/documentation/diagram/README.md +1 -0
  19. package/.config/luxury-extras/model/documentation/diagram/Stricture_Output.dot +13 -0
  20. package/.config/luxury-extras/model/documentation/diagram/Stricture_Output.png +0 -0
  21. package/.config/luxury-extras/model/generated_diagram/README.md +1 -0
  22. package/.config/luxury-extras/model/generated_diagram/Stricture_Output.dot +13 -0
  23. package/.config/luxury-extras/model/generated_diagram/Stricture_Output.png +0 -0
  24. package/.config/luxury-extras/model/generated_documentation/Dictionary.md +18 -0
  25. package/.config/luxury-extras/model/generated_documentation/Model-Author.md +20 -0
  26. package/.config/luxury-extras/model/generated_documentation/Model-Book.md +26 -0
  27. package/.config/luxury-extras/model/generated_documentation/Model-BookAuthorJoin.md +14 -0
  28. package/.config/luxury-extras/model/generated_documentation/Model-BookPrice.md +25 -0
  29. package/.config/luxury-extras/model/generated_documentation/Model-Review.md +22 -0
  30. package/.config/luxury-extras/model/generated_documentation/ModelChangeTracking.md +17 -0
  31. package/.config/luxury-extras/model/generated_documentation/README.md +1 -0
  32. package/.config/luxury-extras/model/json_schema/BookStore-Extended.json +915 -0
  33. package/.config/luxury-extras/model/json_schema/BookStore-PICT.json +1 -0
  34. package/.config/luxury-extras/model/json_schema/BookStore.json +280 -0
  35. package/.config/luxury-extras/model/json_schema/README.md +1 -0
  36. package/.config/luxury-extras/model/json_schema_entities/BookStore-MeadowSchema-Author.json +220 -0
  37. package/.config/luxury-extras/model/json_schema_entities/BookStore-MeadowSchema-Book.json +268 -0
  38. package/.config/luxury-extras/model/json_schema_entities/BookStore-MeadowSchema-BookAuthorJoin.json +172 -0
  39. package/.config/luxury-extras/model/json_schema_entities/BookStore-MeadowSchema-BookPrice.json +260 -0
  40. package/.config/luxury-extras/model/json_schema_entities/BookStore-MeadowSchema-Review.json +236 -0
  41. package/.config/luxury-extras/model/json_schema_entities/README.md +1 -0
  42. package/.config/luxury-extras/model/json_schema_model/BookStore-Extended.json +915 -0
  43. package/.config/luxury-extras/model/json_schema_model/BookStore-PICT.json +1 -0
  44. package/.config/luxury-extras/model/json_schema_model/BookStore.json +280 -0
  45. package/.config/luxury-extras/model/json_schema_model/README.md +1 -0
  46. package/.config/luxury-extras/model/manual_scripts/DropTables.sql +5 -0
  47. package/.config/luxury-extras/model/manual_scripts/README.md +2 -0
  48. package/.config/luxury-extras/model/meadow_schema/BookStore-MeadowSchema-Author.json +220 -0
  49. package/.config/luxury-extras/model/meadow_schema/BookStore-MeadowSchema-Book.json +268 -0
  50. package/.config/luxury-extras/model/meadow_schema/BookStore-MeadowSchema-BookAuthorJoin.json +172 -0
  51. package/.config/luxury-extras/model/meadow_schema/BookStore-MeadowSchema-BookPrice.json +260 -0
  52. package/.config/luxury-extras/model/meadow_schema/BookStore-MeadowSchema-Review.json +236 -0
  53. package/.config/luxury-extras/model/meadow_schema/README.md +1 -0
  54. package/.config/luxury-extras/model/mysql_create/BookStore-CreateDatabase.mysql.sql +116 -0
  55. package/.config/luxury-extras/model/mysql_create/README.md +1 -0
  56. package/.config/luxury-extras/model/sql_create/BookStore-CreateDatabase.mysql.sql +116 -0
  57. package/.config/luxury-extras/model/sql_create/README.md +1 -0
  58. package/.vscode/launch.json +46 -0
  59. package/Dockerfile_LUXURYCode +65 -0
  60. package/README.md +19 -5
  61. package/debug/Harness.js +69 -84
  62. package/dist/meadow.js +1669 -0
  63. package/dist/meadow.min.js +65 -0
  64. package/dist/meadow.min.js.map +1 -0
  65. package/gulpfile.js +83 -0
  66. package/package.json +42 -20
  67. package/source/Meadow-Browser-Shim.js +14 -0
  68. package/source/{Meadow-PackageLoader.js → Meadow-PackageFileLoader.js} +3 -3
  69. package/source/Meadow-PackageObjectLoader.js +62 -0
  70. package/source/Meadow.js +21 -3
  71. package/source/behaviors/Meadow-Count.js +2 -2
  72. package/source/behaviors/Meadow-Create.js +3 -4
  73. package/source/behaviors/Meadow-Delete.js +2 -2
  74. package/source/behaviors/Meadow-Read.js +5 -4
  75. package/source/behaviors/Meadow-Reads.js +4 -3
  76. package/source/behaviors/Meadow-Undelete.js +42 -0
  77. package/source/behaviors/Meadow-Update.js +2 -2
  78. package/source/providers/Meadow-Provider-ALASQL.js +33 -0
  79. package/source/providers/Meadow-Provider-MeadowEndpoints.js +3 -4
  80. package/source/providers/Meadow-Provider-MySQL.js +40 -0
  81. package/source/providers/Meadow-Provider-None.js +8 -0
  82. package/test/Meadow-Provider-ALASQL.js +38 -14
  83. package/test/Meadow-Provider-MeadowEndpoints_tests.js +2 -819
  84. package/test/Meadow-Provider-MySQL_tests.js +49 -13
  85. package/test/Meadow-Provider-None_tests.js +19 -16
  86. package/test/Meadow_tests.js +59 -2
@@ -0,0 +1,236 @@
1
+ {
2
+ "Scope": "Review",
3
+ "DefaultIdentifier": "IDReviews",
4
+ "Domain": "Default",
5
+ "Schema": [
6
+ {
7
+ "Column": "IDReviews",
8
+ "Type": "AutoIdentity"
9
+ },
10
+ {
11
+ "Column": "GUIDReviews",
12
+ "Type": "AutoGUID"
13
+ },
14
+ {
15
+ "Column": "CreateDate",
16
+ "Type": "CreateDate"
17
+ },
18
+ {
19
+ "Column": "CreatingIDUser",
20
+ "Type": "CreateIDUser"
21
+ },
22
+ {
23
+ "Column": "UpdateDate",
24
+ "Type": "UpdateDate"
25
+ },
26
+ {
27
+ "Column": "UpdatingIDUser",
28
+ "Type": "UpdateIDUser"
29
+ },
30
+ {
31
+ "Column": "Deleted",
32
+ "Type": "Deleted"
33
+ },
34
+ {
35
+ "Column": "DeleteDate",
36
+ "Type": "DeleteDate"
37
+ },
38
+ {
39
+ "Column": "DeletingIDUser",
40
+ "Type": "DeleteIDUser"
41
+ },
42
+ {
43
+ "Column": "Text",
44
+ "Type": "String"
45
+ },
46
+ {
47
+ "Column": "Rating",
48
+ "Type": "Integer"
49
+ },
50
+ {
51
+ "Column": "IDBook",
52
+ "Type": "Integer"
53
+ }
54
+ ],
55
+ "DefaultObject": {
56
+ "IDReviews": 0,
57
+ "GUIDReviews": "0x0000000000000000",
58
+ "CreateDate": null,
59
+ "CreatingIDUser": 0,
60
+ "UpdateDate": null,
61
+ "UpdatingIDUser": 0,
62
+ "Deleted": false,
63
+ "DeleteDate": null,
64
+ "DeletingIDUser": 0,
65
+ "Text": "",
66
+ "Rating": 0,
67
+ "IDBook": 0
68
+ },
69
+ "JsonSchema": {
70
+ "title": "Review",
71
+ "type": "object",
72
+ "properties": {
73
+ "IDReviews": {
74
+ "type": "integer"
75
+ },
76
+ "GUIDReviews": {
77
+ "type": "string"
78
+ },
79
+ "CreateDate": {
80
+ "type": "string"
81
+ },
82
+ "CreatingIDUser": {
83
+ "type": "integer"
84
+ },
85
+ "UpdateDate": {
86
+ "type": "string"
87
+ },
88
+ "UpdatingIDUser": {
89
+ "type": "integer"
90
+ },
91
+ "Deleted": {
92
+ "type": "boolean"
93
+ },
94
+ "DeleteDate": {
95
+ "type": "string"
96
+ },
97
+ "DeletingIDUser": {
98
+ "type": "integer"
99
+ },
100
+ "Text": {
101
+ "type": "string"
102
+ },
103
+ "Rating": {
104
+ "type": "integer"
105
+ },
106
+ "IDBook": {
107
+ "type": "integer"
108
+ }
109
+ },
110
+ "required": [
111
+ "IDReviews"
112
+ ]
113
+ },
114
+ "Authorization": {
115
+ "__DefaultAPISecurity": {
116
+ "Create": "Deny",
117
+ "Read": "Deny",
118
+ "Reads": "Deny",
119
+ "ReadsBy": "Deny",
120
+ "ReadMax": "Deny",
121
+ "ReadSelectList": "Deny",
122
+ "Update": "Deny",
123
+ "Delete": "Deny",
124
+ "Count": "Deny",
125
+ "CountBy": "Deny",
126
+ "Schema": "Deny",
127
+ "Validate": "Deny",
128
+ "New": "Deny"
129
+ },
130
+ "Unauthenticated": {
131
+ "Create": "Deny",
132
+ "Read": "Deny",
133
+ "Reads": "Deny",
134
+ "ReadsBy": "Deny",
135
+ "ReadMax": "Deny",
136
+ "ReadSelectList": "Deny",
137
+ "Update": "Deny",
138
+ "Delete": "Deny",
139
+ "Count": "Deny",
140
+ "CountBy": "Deny",
141
+ "Schema": "Deny",
142
+ "Validate": "Deny",
143
+ "New": "Deny"
144
+ },
145
+ "Readonly": {
146
+ "Create": "Deny",
147
+ "Read": "Allow",
148
+ "Reads": "Allow",
149
+ "ReadsBy": "Allow",
150
+ "ReadMax": "Allow",
151
+ "ReadSelectList": "Allow",
152
+ "Update": "Deny",
153
+ "Delete": "Deny",
154
+ "Count": "Allow",
155
+ "CountBy": "Allow",
156
+ "Schema": "Allow",
157
+ "Validate": "Allow",
158
+ "New": "Deny"
159
+ },
160
+ "User": {
161
+ "Create": "Allow",
162
+ "Read": "MyCustomer",
163
+ "Reads": "MyCustomer",
164
+ "ReadsBy": "MyCustomer",
165
+ "ReadMax": "MyCustomer",
166
+ "ReadSelectList": "MyCustomer",
167
+ "Update": "Mine",
168
+ "Delete": "Mine",
169
+ "Count": "MyCustomer",
170
+ "CountBy": "MyCustomer",
171
+ "Schema": "MyCustomer",
172
+ "Validate": "MyCustomer",
173
+ "New": "MyCustomer"
174
+ },
175
+ "Manager": {
176
+ "Create": "Allow",
177
+ "Read": "MyCustomer",
178
+ "Reads": "MyCustomer",
179
+ "ReadsBy": "MyCustomer",
180
+ "ReadMax": "MyCustomer",
181
+ "ReadSelectList": "MyCustomer",
182
+ "Update": "Mine",
183
+ "Delete": "Mine",
184
+ "Count": "MyCustomer",
185
+ "CountBy": "MyCustomer",
186
+ "Schema": "MyCustomer",
187
+ "Validate": "MyCustomer",
188
+ "New": "MyCustomer"
189
+ },
190
+ "Director": {
191
+ "Create": "Allow",
192
+ "Read": "MyCustomer",
193
+ "Reads": "MyCustomer",
194
+ "ReadsBy": "MyCustomer",
195
+ "ReadMax": "MyCustomer",
196
+ "ReadSelectList": "MyCustomer",
197
+ "Update": "MyCustomer",
198
+ "Delete": "MyCustomer",
199
+ "Count": "MyCustomer",
200
+ "CountBy": "MyCustomer",
201
+ "Schema": "MyCustomer",
202
+ "Validate": "MyCustomer",
203
+ "New": "MyCustomer"
204
+ },
205
+ "Executive": {
206
+ "Create": "Allow",
207
+ "Read": "MyCustomer",
208
+ "Reads": "MyCustomer",
209
+ "ReadsBy": "MyCustomer",
210
+ "ReadMax": "MyCustomer",
211
+ "ReadSelectList": "MyCustomer",
212
+ "Update": "MyCustomer",
213
+ "Delete": "MyCustomer",
214
+ "Count": "MyCustomer",
215
+ "CountBy": "MyCustomer",
216
+ "Schema": "MyCustomer",
217
+ "Validate": "MyCustomer",
218
+ "New": "MyCustomer"
219
+ },
220
+ "Administrator": {
221
+ "Create": "Allow",
222
+ "Read": "Allow",
223
+ "Reads": "Allow",
224
+ "ReadsBy": "Allow",
225
+ "ReadMax": "Allow",
226
+ "ReadSelectList": "Allow",
227
+ "Update": "Allow",
228
+ "Delete": "Allow",
229
+ "Count": "Allow",
230
+ "CountBy": "Allow",
231
+ "Schema": "Allow",
232
+ "Validate": "Allow",
233
+ "New": "Allow"
234
+ }
235
+ }
236
+ }
@@ -0,0 +1 @@
1
+ This is where the meadow schema for each table of the data model will generate.
@@ -0,0 +1,116 @@
1
+ -- Data Model -- Generated 2022-03-29T11:36:36.684Z
2
+
3
+ -- This script creates the following tables:
4
+ -- Table ----------------------------------------- Column Count ----------------
5
+ -- Book 16
6
+ -- BookAuthorJoin 4
7
+ -- Author 10
8
+ -- BookPrice 15
9
+ -- Review 12
10
+
11
+
12
+
13
+ -- [ Book ]
14
+ CREATE TABLE IF NOT EXISTS
15
+ Book
16
+ (
17
+ IDBook INT UNSIGNED NOT NULL AUTO_INCREMENT,
18
+ GUIDBook CHAR(36) NOT NULL DEFAULT '00000000-0000-0000-0000-000000000000',
19
+ CreateDate DATETIME,
20
+ CreatingIDUser INT NOT NULL DEFAULT '0',
21
+ UpdateDate DATETIME,
22
+ UpdatingIDUser INT NOT NULL DEFAULT '0',
23
+ Deleted TINYINT NOT NULL DEFAULT '0',
24
+ DeleteDate DATETIME,
25
+ DeletingIDUser INT NOT NULL DEFAULT '0',
26
+ Title CHAR(200) NOT NULL DEFAULT '',
27
+ Type CHAR(32) NOT NULL DEFAULT '',
28
+ Genre CHAR(128) NOT NULL DEFAULT '',
29
+ ISBN CHAR(64) NOT NULL DEFAULT '',
30
+ Language CHAR(12) NOT NULL DEFAULT '',
31
+ ImageURL CHAR(254) NOT NULL DEFAULT '',
32
+ PublicationYear INT NOT NULL DEFAULT '0',
33
+
34
+ PRIMARY KEY (IDBook)
35
+ ) DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
36
+
37
+
38
+
39
+ -- [ BookAuthorJoin ]
40
+ CREATE TABLE IF NOT EXISTS
41
+ BookAuthorJoin
42
+ (
43
+ IDBookAuthorJoin INT UNSIGNED NOT NULL AUTO_INCREMENT,
44
+ GUIDBookAuthorJoin CHAR(36) NOT NULL DEFAULT '00000000-0000-0000-0000-000000000000',
45
+ IDBook INT NOT NULL DEFAULT '0',
46
+ IDAuthor INT NOT NULL DEFAULT '0',
47
+
48
+ PRIMARY KEY (IDBookAuthorJoin)
49
+ ) DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
50
+
51
+
52
+
53
+ -- [ Author ]
54
+ CREATE TABLE IF NOT EXISTS
55
+ Author
56
+ (
57
+ IDAuthor INT UNSIGNED NOT NULL AUTO_INCREMENT,
58
+ GUIDAuthor CHAR(36) NOT NULL DEFAULT '00000000-0000-0000-0000-000000000000',
59
+ CreateDate DATETIME,
60
+ CreatingIDUser INT NOT NULL DEFAULT '0',
61
+ UpdateDate DATETIME,
62
+ UpdatingIDUser INT NOT NULL DEFAULT '0',
63
+ Deleted TINYINT NOT NULL DEFAULT '0',
64
+ DeleteDate DATETIME,
65
+ DeletingIDUser INT NOT NULL DEFAULT '0',
66
+ Name CHAR(200) NOT NULL DEFAULT '',
67
+
68
+ PRIMARY KEY (IDAuthor)
69
+ ) DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
70
+
71
+
72
+
73
+ -- [ BookPrice ]
74
+ CREATE TABLE IF NOT EXISTS
75
+ BookPrice
76
+ (
77
+ IDBookPrice INT UNSIGNED NOT NULL AUTO_INCREMENT,
78
+ GUIDBookPrice CHAR(36) NOT NULL DEFAULT '00000000-0000-0000-0000-000000000000',
79
+ CreateDate DATETIME,
80
+ CreatingIDUser INT NOT NULL DEFAULT '0',
81
+ UpdateDate DATETIME,
82
+ UpdatingIDUser INT NOT NULL DEFAULT '0',
83
+ Deleted TINYINT NOT NULL DEFAULT '0',
84
+ DeleteDate DATETIME,
85
+ DeletingIDUser INT NOT NULL DEFAULT '0',
86
+ Price DECIMAL(8,2),
87
+ StartDate DATETIME,
88
+ EndDate DATETIME,
89
+ Discountable TINYINT NOT NULL DEFAULT '0',
90
+ CouponCode CHAR(16) NOT NULL DEFAULT '',
91
+ IDBook INT NOT NULL DEFAULT '0',
92
+
93
+ PRIMARY KEY (IDBookPrice)
94
+ ) DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
95
+
96
+
97
+
98
+ -- [ Review ]
99
+ CREATE TABLE IF NOT EXISTS
100
+ Review
101
+ (
102
+ IDReviews INT UNSIGNED NOT NULL AUTO_INCREMENT,
103
+ GUIDReviews CHAR(36) NOT NULL DEFAULT '00000000-0000-0000-0000-000000000000',
104
+ CreateDate DATETIME,
105
+ CreatingIDUser INT NOT NULL DEFAULT '0',
106
+ UpdateDate DATETIME,
107
+ UpdatingIDUser INT NOT NULL DEFAULT '0',
108
+ Deleted TINYINT NOT NULL DEFAULT '0',
109
+ DeleteDate DATETIME,
110
+ DeletingIDUser INT NOT NULL DEFAULT '0',
111
+ Text TEXT,
112
+ Rating INT NOT NULL DEFAULT '0',
113
+ IDBook INT NOT NULL DEFAULT '0',
114
+
115
+ PRIMARY KEY (IDReviews)
116
+ ) DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
@@ -0,0 +1 @@
1
+ This is where the MYSQL Create statement for the data model will generate.
@@ -0,0 +1,116 @@
1
+ -- Data Model -- Generated 2022-03-29T11:36:36.684Z
2
+
3
+ -- This script creates the following tables:
4
+ -- Table ----------------------------------------- Column Count ----------------
5
+ -- Book 16
6
+ -- BookAuthorJoin 4
7
+ -- Author 10
8
+ -- BookPrice 15
9
+ -- Review 12
10
+
11
+
12
+
13
+ -- [ Book ]
14
+ CREATE TABLE IF NOT EXISTS
15
+ Book
16
+ (
17
+ IDBook INT UNSIGNED NOT NULL AUTO_INCREMENT,
18
+ GUIDBook CHAR(36) NOT NULL DEFAULT '00000000-0000-0000-0000-000000000000',
19
+ CreateDate DATETIME,
20
+ CreatingIDUser INT NOT NULL DEFAULT '0',
21
+ UpdateDate DATETIME,
22
+ UpdatingIDUser INT NOT NULL DEFAULT '0',
23
+ Deleted TINYINT NOT NULL DEFAULT '0',
24
+ DeleteDate DATETIME,
25
+ DeletingIDUser INT NOT NULL DEFAULT '0',
26
+ Title CHAR(200) NOT NULL DEFAULT '',
27
+ Type CHAR(32) NOT NULL DEFAULT '',
28
+ Genre CHAR(128) NOT NULL DEFAULT '',
29
+ ISBN CHAR(64) NOT NULL DEFAULT '',
30
+ Language CHAR(12) NOT NULL DEFAULT '',
31
+ ImageURL CHAR(254) NOT NULL DEFAULT '',
32
+ PublicationYear INT NOT NULL DEFAULT '0',
33
+
34
+ PRIMARY KEY (IDBook)
35
+ ) DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
36
+
37
+
38
+
39
+ -- [ BookAuthorJoin ]
40
+ CREATE TABLE IF NOT EXISTS
41
+ BookAuthorJoin
42
+ (
43
+ IDBookAuthorJoin INT UNSIGNED NOT NULL AUTO_INCREMENT,
44
+ GUIDBookAuthorJoin CHAR(36) NOT NULL DEFAULT '00000000-0000-0000-0000-000000000000',
45
+ IDBook INT NOT NULL DEFAULT '0',
46
+ IDAuthor INT NOT NULL DEFAULT '0',
47
+
48
+ PRIMARY KEY (IDBookAuthorJoin)
49
+ ) DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
50
+
51
+
52
+
53
+ -- [ Author ]
54
+ CREATE TABLE IF NOT EXISTS
55
+ Author
56
+ (
57
+ IDAuthor INT UNSIGNED NOT NULL AUTO_INCREMENT,
58
+ GUIDAuthor CHAR(36) NOT NULL DEFAULT '00000000-0000-0000-0000-000000000000',
59
+ CreateDate DATETIME,
60
+ CreatingIDUser INT NOT NULL DEFAULT '0',
61
+ UpdateDate DATETIME,
62
+ UpdatingIDUser INT NOT NULL DEFAULT '0',
63
+ Deleted TINYINT NOT NULL DEFAULT '0',
64
+ DeleteDate DATETIME,
65
+ DeletingIDUser INT NOT NULL DEFAULT '0',
66
+ Name CHAR(200) NOT NULL DEFAULT '',
67
+
68
+ PRIMARY KEY (IDAuthor)
69
+ ) DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
70
+
71
+
72
+
73
+ -- [ BookPrice ]
74
+ CREATE TABLE IF NOT EXISTS
75
+ BookPrice
76
+ (
77
+ IDBookPrice INT UNSIGNED NOT NULL AUTO_INCREMENT,
78
+ GUIDBookPrice CHAR(36) NOT NULL DEFAULT '00000000-0000-0000-0000-000000000000',
79
+ CreateDate DATETIME,
80
+ CreatingIDUser INT NOT NULL DEFAULT '0',
81
+ UpdateDate DATETIME,
82
+ UpdatingIDUser INT NOT NULL DEFAULT '0',
83
+ Deleted TINYINT NOT NULL DEFAULT '0',
84
+ DeleteDate DATETIME,
85
+ DeletingIDUser INT NOT NULL DEFAULT '0',
86
+ Price DECIMAL(8,2),
87
+ StartDate DATETIME,
88
+ EndDate DATETIME,
89
+ Discountable TINYINT NOT NULL DEFAULT '0',
90
+ CouponCode CHAR(16) NOT NULL DEFAULT '',
91
+ IDBook INT NOT NULL DEFAULT '0',
92
+
93
+ PRIMARY KEY (IDBookPrice)
94
+ ) DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
95
+
96
+
97
+
98
+ -- [ Review ]
99
+ CREATE TABLE IF NOT EXISTS
100
+ Review
101
+ (
102
+ IDReviews INT UNSIGNED NOT NULL AUTO_INCREMENT,
103
+ GUIDReviews CHAR(36) NOT NULL DEFAULT '00000000-0000-0000-0000-000000000000',
104
+ CreateDate DATETIME,
105
+ CreatingIDUser INT NOT NULL DEFAULT '0',
106
+ UpdateDate DATETIME,
107
+ UpdatingIDUser INT NOT NULL DEFAULT '0',
108
+ Deleted TINYINT NOT NULL DEFAULT '0',
109
+ DeleteDate DATETIME,
110
+ DeletingIDUser INT NOT NULL DEFAULT '0',
111
+ Text TEXT,
112
+ Rating INT NOT NULL DEFAULT '0',
113
+ IDBook INT NOT NULL DEFAULT '0',
114
+
115
+ PRIMARY KEY (IDReviews)
116
+ ) DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
@@ -0,0 +1 @@
1
+ This is where the MYSQL Create statement for the data model will generate.
@@ -0,0 +1,46 @@
1
+ {
2
+ // Use IntelliSense to learn about possible attributes.
3
+ // Hover to view descriptions of existing attributes.
4
+ // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5
+ "version": "0.2.0",
6
+ "configurations": [
7
+ {
8
+ "name": "Launch Debug Harness",
9
+ "type": "pwa-node",
10
+ "request": "launch",
11
+ "outputCapture": "std",
12
+ "skipFiles": [
13
+ "<node_internals>/**"
14
+ ],
15
+ "program": "${workspaceFolder}/debug/Harness.js",
16
+ "presentation": {
17
+ "hidden": false,
18
+ "group": "",
19
+ "order": 1
20
+ }
21
+ },
22
+ {
23
+ "name": "Mocha Tests",
24
+ "args": [
25
+ "-u",
26
+ "tdd",
27
+ "--timeout",
28
+ "999999",
29
+ "--colors",
30
+ "${workspaceFolder}/test"
31
+ ],
32
+ "internalConsoleOptions": "openOnSessionStart",
33
+ "program": "${workspaceFolder}/node_modules/mocha/bin/_mocha",
34
+ "request": "launch",
35
+ "skipFiles": [
36
+ "<node_internals>/**"
37
+ ],
38
+ "type": "pwa-node",
39
+ "presentation": {
40
+ "hidden": false,
41
+ "group": "",
42
+ "order": 2
43
+ }
44
+ }
45
+ ]
46
+ }
@@ -0,0 +1,65 @@
1
+ # Use the codercom/code-server image
2
+ FROM codercom/code-server:latest
3
+ MAINTAINER steven velozo
4
+
5
+ VOLUME /home/coder/.config
6
+ VOLUME /home/coder/.vscode
7
+
8
+ RUN echo "...installing debian dependencies..."
9
+ RUN sudo apt update
10
+ RUN sudo apt install vim curl tmux -y
11
+ RUN sudo apt install default-mysql-server default-mysql-client -y
12
+ # RUN sudo apt install sysv-rc-conf -y
13
+
14
+ RUN echo "Building RETOLD development image..."
15
+
16
+ RUN echo "...configuring mariadb (mysql) server..."
17
+ RUN sudo sed -i "s|bind-address|#bind-address|g" /etc/mysql/mariadb.conf.d/50-server.cnf
18
+ ADD ./.config/luxury-extras/MySQL/MySQL-Security.sql /home/coder/MySQL-Configure-Security.sql
19
+ ADD ./.config/luxury-extras/MySQL/MySQL-Laden-Entry.sh /usr/bin/MySQL-Laden-Entry.sh
20
+ RUN sudo chmod +x /usr/bin/MySQL-Laden-Entry.sh
21
+ RUN ( sudo mysqld_safe --skip-grant-tables --skip-networking & ) && sleep 5 && mysql -u root < /home/coder/MySQL-Configure-Security.sql
22
+
23
+ # Enable MariaDB even without systemd
24
+ # RUN sudo sysv-rc-conf --level 0123456S mariadb on
25
+
26
+ # Import the initial database
27
+ RUN sudo service mariadb restart && sleep 5 && mysql -u root -p"123456789" -e "CREATE DATABASE FableTest;"
28
+
29
+ RUN echo "...installing vscode extensions..."
30
+ RUN code-server --install-extension rangav.vscode-thunder-client \
31
+ code-server --install-extension hbenl.vscode-mocha-test-adapter \
32
+ code-server --install-extension hbenl.vscode-test-explorer \
33
+ code-server --install-extension hbenl.test-adapter-converter \
34
+ code-server --install-extension cweijan.vscode-mysql-client2 \
35
+ code-server --install-extension daylerees.rainglow \
36
+ code-server --install-extension oderwat.indent-rainbow \
37
+ code-server --install-extension evan-buss.font-switcher \
38
+ code-server --install-extension vscode-icons-team.vscode-icons \
39
+ code-server --install-extension bengreenier.vscode-node-readme \
40
+ code-server --install-extension bierner.color-info \
41
+ code-server --install-extension dbaeumer.vscode-eslint \
42
+ code-server --install-extension PKief.material-icon-theme
43
+
44
+ SHELL ["/bin/bash", "-c"]
45
+ USER coder
46
+
47
+ # Copy any default configs for the coding environment we want (e.g. dark theme)
48
+ # COPY ./.config/.default_home/ /home/coder/
49
+
50
+ RUN echo "...mapping library specific volumes..."
51
+ # Volume mappings for code
52
+ VOLUME /home/coder/meadow
53
+
54
+ RUN echo "...installing node version manager..."
55
+ # Because there is a .bashrc chicken/egg problem, we will create one here to simulate logging in. This is not great.
56
+ RUN touch ~/.bashrc && chmod +x ~/.bashrc
57
+ RUN curl https://raw.githubusercontent.com/creationix/nvm/master/install.sh | bash
58
+
59
+ RUN echo "...installing node version 14 as the default..."
60
+ RUN . ~/.nvm/nvm.sh && source ~/.bashrc && nvm install 14
61
+ RUN . ~/.nvm/nvm.sh && source ~/.bashrc && nvm alias default 14
62
+
63
+ WORKDIR /home/coder/meadow
64
+
65
+ ENTRYPOINT ["/usr/bin/MySQL-Laden-Entry.sh"]
package/README.md CHANGED
@@ -3,11 +3,6 @@ Meadow
3
3
 
4
4
  A Javascript Data Broker.
5
5
 
6
- [![Coverage Status](https://coveralls.io/repos/stevenvelozo/meadow/badge.svg?branch=master)](https://coveralls.io/r/stevenvelozo/meadow?branch=master)
7
- [![Build Status](https://travis-ci.org/stevenvelozo/meadow.svg?branch=master)](https://travis-ci.org/stevenvelozo/meadow)
8
- [![Dependency Status](https://david-dm.org/stevenvelozo/meadow.svg)](https://david-dm.org/stevenvelozo/meadow)
9
- [![devDependency Status](https://david-dm.org/stevenvelozo/meadow/dev-status.svg)](https://david-dm.org/stevenvelozo/meadow#info=devDependencies)
10
-
11
6
  Who doesn't love writing the same code over and over again? Good question. Anybody who doesn't probably wants something to do simple data access stuff. And some of the complicated interactions as well. Meadow aims to provide a simple “magic where you want it, programmability where you don't” pattern.
12
7
 
13
8
  ## Install
@@ -123,3 +118,22 @@ meadow.doRead(queryDescription,
123
118
  );
124
119
  ```
125
120
 
121
+
122
+ ### Docker Development Environment
123
+
124
+
125
+ 1. Run this command to build this image:
126
+ ```
127
+ docker build ./ -t retold/meadow:local
128
+ ```
129
+
130
+ 2. Run this command to build the local container:
131
+ ```
132
+ docker run -it --name meadow-dev -p 127.0.0.1:12342:8080 -v "$PWD/.config:/home/coder/.config" -v "$PWD:/home/coder/meadow" -u "$(id -u):$(id -g)" -e "DOCKER_USER=$USER" retold/meadow:local
133
+ ```
134
+
135
+ 3. Go to http://localhost:12342/ in a web browser
136
+
137
+ 4. The password is "retold"
138
+
139
+ 5. Right now you (may) need to delete the `node_modules` folders and regenerate it for Linux.