dobo 1.0.12 → 1.0.14
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/bajo/init.js +2 -2
- package/bajo/method/attachment/copy-uploaded.js +2 -2
- package/bajo/method/attachment/create.js +2 -2
- package/bajo/method/attachment/remove.js +1 -1
- package/bajo/method/get-schema.js +1 -1
- package/bajo/method/model/exists.js +1 -1
- package/bajo/method/prep-pagination.js +1 -1
- package/bajo/method/record/create.js +1 -1
- package/bajo/method/record/remove.js +1 -1
- package/bajo/method/record/update.js +1 -1
- package/bajo/method/sanitize/date.js +1 -1
- package/bajo/method/stat/histogram.js +1 -1
- package/bajo/method/validate.js +1 -1
- package/bajo/start.js +1 -1
- package/bajoCli/applet/connection.js +4 -4
- package/bajoCli/applet/lib/post-process.js +5 -5
- package/bajoCli/applet/model-clear.js +1 -1
- package/bajoCli/applet/model-rebuild.js +14 -14
- package/bajoCli/applet/record-create.js +6 -6
- package/bajoCli/applet/record-find.js +3 -3
- package/bajoCli/applet/record-get.js +1 -1
- package/bajoCli/applet/record-remove.js +1 -1
- package/bajoCli/applet/record-update.js +8 -8
- package/bajoCli/applet/schema.js +4 -4
- package/bajoCli/applet/stat-count.js +3 -3
- package/bajoI18N/resource/en-US.json +157 -27
- package/bajoI18N/resource/id.json +125 -75
- package/lib/add-fixtures.js +5 -5
- package/lib/build-bulk-action.js +2 -2
- package/lib/check-unique.js +2 -2
- package/lib/collect-connections.js +2 -2
- package/lib/collect-drivers.js +3 -3
- package/lib/collect-feature.js +3 -3
- package/lib/collect-schemas.js +3 -3
- package/lib/generic-prop-sanitizer.js +2 -9
- package/lib/mem-db/instantiate.js +1 -1
- package/lib/mem-db/method/record/create.js +1 -1
- package/lib/mem-db/method/record/get.js +1 -1
- package/lib/mem-db/start.js +2 -2
- package/lib/resolve-method.js +2 -2
- package/lib/sanitize-schema.js +5 -5
- package/package.json +1 -1
|
@@ -1,4 +1,122 @@
|
|
|
1
1
|
{
|
|
2
|
+
"isConnected%s%s": "[%s] '%s' is connected",
|
|
3
|
+
"errorOn%s%s": "[%s] Error on '%s': %s",
|
|
4
|
+
"isDestroyed%s%s": "[%s] '%s' is destroyed",
|
|
5
|
+
"loadedSchemas%s": "[%s] Loaded schemas: %s",
|
|
6
|
+
"loadSchema%s%s%d": "[%s] Load schema: %s (%d)",
|
|
7
|
+
"loadedConns%s%s": "[%s] Loaded connections: %s",
|
|
8
|
+
"unsupportedPropTypeIn%s%s": "Unsupported property type '%s' in '%s'",
|
|
9
|
+
"noSchemaFound": "No schema found!",
|
|
10
|
+
"enterSchemaName": "Enter schema name, separated by space:",
|
|
11
|
+
"noSchemaMatched": "No schema matched",
|
|
12
|
+
"schema%d": "Schema (%d)",
|
|
13
|
+
"schemasWillBeRebuiltContinue": "The above mentioned schema(s) will be rebuilt as model. Continue?",
|
|
14
|
+
"rebuilding%s": "Rebuilding '%s'...",
|
|
15
|
+
"noDbConn%s%s": "No DB connection '%s' for '%s'. Aborted!",
|
|
16
|
+
"errorDroppingModel%s%s": "Error dropping model '%s': %s",
|
|
17
|
+
"modelExistsNeedForce%s": "Model '%s' exists already. Can't rebuild without --force",
|
|
18
|
+
"modelCreated%s": "Model '%s' successfully created",
|
|
19
|
+
"modelCreatedWithFixture%s%s%s": "Model '%s' successfully created, with fixture: added %s, rejected: %s",
|
|
20
|
+
"errorCreatingModel%s%s": "Error creating model '%s': %s",
|
|
21
|
+
"modelDropped%s": "Model '%s' successfully dropped",
|
|
22
|
+
"memoryDbSkipped%s%s": "DB '%s' for '%s' is a memory DB, skipped",
|
|
23
|
+
"modelBuiltOnthefly%s%s%s": "[%s] Model '%s@%s' successfully built on the fly",
|
|
24
|
+
"unableToBuildModel%s%s%s": "Unable to re-build model '%s' in '%s': %s",
|
|
25
|
+
"unknownSchema%s": "Unknown schema '%s'",
|
|
26
|
+
"payloadMustBeJson": "Payload must be a valid JSON",
|
|
27
|
+
"selectSchema": "Please select a schema:",
|
|
28
|
+
"enterJsonPayload": "Enter JSON payload:",
|
|
29
|
+
"payloadRequired": "Payload is required",
|
|
30
|
+
"invalidPayloadSyntax": "Invalid payload syntax",
|
|
31
|
+
"creatingRecord": "Creating record",
|
|
32
|
+
"enterRecordId:": "Enter record ID:",
|
|
33
|
+
"idIsRequired": "ID is required",
|
|
34
|
+
"gettingRecord": "Getting record",
|
|
35
|
+
"removingRecord": "Deleting record",
|
|
36
|
+
"cantFindSchema%s": "Can't find schema named %s",
|
|
37
|
+
"cantFind%s%s": "Can't find %s named %s",
|
|
38
|
+
"recordNotFound%s%s": "Record '%s@%s' not found",
|
|
39
|
+
"invalidSchema%s": "Invalid schema '%s'",
|
|
40
|
+
"noPropsFoundOnSchema%s": "Schema '%s' doesn't have any property at all",
|
|
41
|
+
"fieldIdReserved%s": "Field 'id@%s' is a reserved column and should not added manually",
|
|
42
|
+
"missingPropType%s%s": "Property type for '%s@%s' is missing",
|
|
43
|
+
"unsupportedPropType%s%s%s": "Unsupported property type '%s@%s' in '%s'",
|
|
44
|
+
"unknownConn%s%s": "Unknown connection '%s@%s'",
|
|
45
|
+
"fieldIsRequired%s%s": "Column '%s@%s' is required",
|
|
46
|
+
"keyIsRequired%s": "Key '%s' is required",
|
|
47
|
+
"enterQueryIfAny": "Please enter your query (if any):",
|
|
48
|
+
"findingRecords": "Finding records",
|
|
49
|
+
"recordExists%s%s": "Record '%s@%s' exists already",
|
|
50
|
+
"fieldGroupAggregateMissing": "Field to group aggregate is missing",
|
|
51
|
+
"fieldCalcAggregateMissing": "Field to calculate aggregate is missing",
|
|
52
|
+
"baseFieldForHistogramMissing": "Base field for histogram must be provided",
|
|
53
|
+
"unknownBaseFieldForHistogram%s": "Unknown base field for histogram '%s'",
|
|
54
|
+
"fieldTypeMustBeDatetime%s%s": "Field type '%s@%s' must be a datetime field",
|
|
55
|
+
"groupFieldToAggregateMissing": "Group field to aggregate is missing",
|
|
56
|
+
"unknownGroupField%s%s": "Unknown group field '%s@%s'",
|
|
57
|
+
"grupFieldMustBeNumber": "Group field must be of type integer, smallint or float",
|
|
58
|
+
"unsupportedAggregateType%s": "Unsupported aggregate type: '%s'",
|
|
59
|
+
"keyIsRequired%s%s": "'%s@%s' key is required",
|
|
60
|
+
"fulltextNeedIntegerId%s%s": "Full text index need integer type primary id in '%s@%s'",
|
|
61
|
+
"unsupportedAggregate%s": "Unsupported aggregate '%s'",
|
|
62
|
+
"unsupportedAllowedChoices%s%s%s%s%s": "Unsupported %s '%s' for '%s@%s'. Allowed choices: %s",
|
|
63
|
+
"methodIsDisabled%s%s": "Method '%s@%s' is disabled",
|
|
64
|
+
"invalidModelForPersistence%s": "Invalid model for persistence: %s",
|
|
65
|
+
"cantLoad%s%s": "Can't load %s: %s",
|
|
66
|
+
"noRecordFound": "No record found",
|
|
67
|
+
"recordsFound%d": "%d record(s) found",
|
|
68
|
+
"add": "Add",
|
|
69
|
+
"edit": "Edit",
|
|
70
|
+
"delete": "Delete",
|
|
71
|
+
"export": "Export",
|
|
72
|
+
"query": "Query",
|
|
73
|
+
"queryBuilder": "Query Builder",
|
|
74
|
+
"list": "List",
|
|
75
|
+
"submitQuery": "Submit Query",
|
|
76
|
+
"dataExport": "Data Export",
|
|
77
|
+
"recordCreated": "Record successfully created",
|
|
78
|
+
"recordRemoved": "Record successfully removed",
|
|
79
|
+
"recordUpdated": "Record successfully updated",
|
|
80
|
+
"attachmentUploaded": "Attachment successfully uploaded",
|
|
81
|
+
"attachmentRemoved": "Attachment successfully removed",
|
|
82
|
+
"unknownModelSchema%s": "Unknown model/schema '%s'",
|
|
83
|
+
"sortOnUnindexedField%s%s": "Sort on unindexed field: '%s@%s'",
|
|
84
|
+
"modelNotExists%s": "Model '%s' doesn't exist yet. Please do model rebuild first",
|
|
85
|
+
"invalidDate": "Invalid date",
|
|
86
|
+
"histogramTypeMusBe%s": "Histogram type must be one of these: %s",
|
|
87
|
+
"methodUnsupported%s%s": "Method '%s@%s' is unsupported",
|
|
88
|
+
"uniqueConstraintError": "Unique constraint error",
|
|
89
|
+
"taskMustHaveModel%s": "Task must have %s model",
|
|
90
|
+
"driverNotInstalled%s": "Problem with '%s' driver file. Not installed yet?",
|
|
91
|
+
"generalDbError": "General Database Error",
|
|
92
|
+
"dbConstrainError": "Database Constraint Error",
|
|
93
|
+
"onlySupportThese%s": "Only support one of these: %s",
|
|
94
|
+
"isMissing%s": "%s is missing",
|
|
95
|
+
"notFound%s": "No %s found!",
|
|
96
|
+
"clientInstanceNotConnected%s": "Client instance not connected '%s@%s'. Skipped!",
|
|
97
|
+
"proxiedConnBound%s": "'%s' is bound to a proxied connection, skipped!'",
|
|
98
|
+
"addingMemoryPersistenceIgnored": "'%s' is a memory persistence model. Adding records from fixture is ignored!",
|
|
99
|
+
"onlyOneConnType%s": "There could only be one connection type '%s'",
|
|
100
|
+
"mustValidDbType": "Connection must have a valid DB type",
|
|
101
|
+
"unsupportedDbType%s": "Unsupported DB type '%s'",
|
|
102
|
+
"driverMustProvideDbType": "A DB driver must provide at least one database type",
|
|
103
|
+
"driverMustHaveName": "A DB driver must have a driver name",
|
|
104
|
+
"dbTypeAlreadySupportedByDriver%s%s": "Database type '%s' already supported by driver '%s'",
|
|
105
|
+
"featureNotAsync%s": "Feature '%s' should be an async function",
|
|
106
|
+
"unsupportedIndexType%s%s%s%s": "Unsupported index type %s for '%s@%s'. Allowed choices: %s",
|
|
107
|
+
"unknownFeature%s%s": "'Unknown feature '%s@%s'",
|
|
108
|
+
"onlyAccepFields%s%s": "Only accept array of field names or single string of field name '%s@%s'",
|
|
109
|
+
"invalidFieldName%s%s": "Invalid field name '%s@%s'",
|
|
110
|
+
"error%s": "Error: %s",
|
|
111
|
+
"succeedFailSkip%d%d%d": "Done! Succeded: %d, failed: %s, skipped: %d",
|
|
112
|
+
"chooseConn": "Please choose a connection:",
|
|
113
|
+
"sureContinue": "Are you sure to continue?",
|
|
114
|
+
"loadingDbFeature": "Loading DB feature",
|
|
115
|
+
"totalLoadedFeatures%d": "Total loaded features: %d",
|
|
116
|
+
"loadingDbSchemas": "Loading DB schemas",
|
|
117
|
+
"addingFixtureToMemDb": "Adding fixture for memory database",
|
|
118
|
+
"recordsAdded%s%d%d": "%s: %d of %d records added",
|
|
119
|
+
"driverInstantiated%s%s": "- Driver '%s:%s' instantiated",
|
|
2
120
|
"field": {
|
|
3
121
|
"id": "ID",
|
|
4
122
|
"code": "Kode",
|
|
@@ -52,34 +170,46 @@
|
|
|
52
170
|
"token": "Token",
|
|
53
171
|
"field": "Field",
|
|
54
172
|
"agree": "Agreement",
|
|
55
|
-
"method": "Metode"
|
|
173
|
+
"method": "Metode",
|
|
174
|
+
"masterId": "Master ID",
|
|
175
|
+
"details": "Details",
|
|
176
|
+
"qty": "QTY",
|
|
177
|
+
"link": "Link",
|
|
178
|
+
"amount": "Amount",
|
|
179
|
+
"cycle": "Cycle",
|
|
180
|
+
"default": "Default"
|
|
56
181
|
},
|
|
182
|
+
"validationError": "Kesalahan Validasi",
|
|
57
183
|
"validation": {
|
|
58
|
-
"any
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
"string
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
184
|
+
"any": {
|
|
185
|
+
"required": "Required",
|
|
186
|
+
"only": "Must match with {{ref}}"
|
|
187
|
+
},
|
|
188
|
+
"string": {
|
|
189
|
+
"alphanum": "Must only contain alpha-numeric characters",
|
|
190
|
+
"base": "Must be a string",
|
|
191
|
+
"base64": "Must be a valid base64 string",
|
|
192
|
+
"creditCard": "Must be a credit card",
|
|
193
|
+
"dataUri": "Must be a valid dataUri string",
|
|
194
|
+
"domain": "Must contain a valid domain name",
|
|
195
|
+
"email": "Must be a valid email",
|
|
196
|
+
"empty": "Required",
|
|
197
|
+
"guid": "Must be a valid GUID",
|
|
198
|
+
"hex": "Must only contain hexadecimal characters",
|
|
199
|
+
"hexAlign": "Hex decoded representation must be byte aligned",
|
|
200
|
+
"hostname": "Must be a valid hostname",
|
|
201
|
+
"ip": "must be a valid ip address with a {{cidr}} CIDR",
|
|
202
|
+
"ipVersion": "Must be a valid ip address of one of the following versions {{version}} with a {{cidr}} CIDR",
|
|
203
|
+
"isoDate": "Must be in iso format",
|
|
204
|
+
"isoDuration": "Must be a valid ISO 8601 duration",
|
|
205
|
+
"length": "Length must be {{limit}} characters long",
|
|
206
|
+
"lowercase": "Must only contain lowercase characters",
|
|
207
|
+
"max": "Length must be less than or equal to {{limit}} characters long",
|
|
208
|
+
"min": "Length must be at least {{limit}} characters long",
|
|
209
|
+
"token": "Must only contain alpha-numeric and underscore characters",
|
|
210
|
+
"trim": "Must not have leading or trailing whitespace",
|
|
211
|
+
"uri": "Must be a valid uri",
|
|
212
|
+
"uppercase": "Must only contain uppercase characters"
|
|
213
|
+
}
|
|
84
214
|
}
|
|
85
215
|
}
|
|
@@ -1,77 +1,120 @@
|
|
|
1
1
|
{
|
|
2
|
-
"
|
|
3
|
-
"
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
"
|
|
7
|
-
"
|
|
8
|
-
"
|
|
9
|
-
"
|
|
10
|
-
"
|
|
11
|
-
"
|
|
12
|
-
"
|
|
13
|
-
"
|
|
14
|
-
"
|
|
15
|
-
"
|
|
16
|
-
"
|
|
17
|
-
"
|
|
18
|
-
"
|
|
19
|
-
"
|
|
20
|
-
"
|
|
21
|
-
"
|
|
22
|
-
"
|
|
23
|
-
"
|
|
24
|
-
"
|
|
25
|
-
"
|
|
26
|
-
"
|
|
27
|
-
"
|
|
28
|
-
"
|
|
29
|
-
"
|
|
30
|
-
"
|
|
31
|
-
"
|
|
32
|
-
"
|
|
33
|
-
"
|
|
34
|
-
"
|
|
35
|
-
"
|
|
36
|
-
"
|
|
37
|
-
"
|
|
38
|
-
"
|
|
39
|
-
"
|
|
40
|
-
"
|
|
41
|
-
"
|
|
42
|
-
"
|
|
43
|
-
"
|
|
44
|
-
"
|
|
45
|
-
"
|
|
46
|
-
"
|
|
47
|
-
"
|
|
48
|
-
"
|
|
49
|
-
"
|
|
50
|
-
"
|
|
51
|
-
"
|
|
52
|
-
"
|
|
53
|
-
"
|
|
54
|
-
"
|
|
55
|
-
"
|
|
56
|
-
"
|
|
57
|
-
"
|
|
58
|
-
"
|
|
59
|
-
"
|
|
60
|
-
"
|
|
61
|
-
"
|
|
62
|
-
"
|
|
63
|
-
"
|
|
64
|
-
"
|
|
65
|
-
"%d
|
|
66
|
-
"
|
|
67
|
-
"
|
|
68
|
-
"
|
|
69
|
-
"
|
|
70
|
-
"
|
|
71
|
-
"
|
|
72
|
-
"
|
|
73
|
-
"
|
|
74
|
-
"
|
|
2
|
+
"isConnected%s%s": "[%s] '%s' telah tersambung",
|
|
3
|
+
"errorOn%s%s": "[%s] Kesalahan pada '%s': %s",
|
|
4
|
+
"isDestroyed%s%s": "[%s] '%s' telah dimusnahkan",
|
|
5
|
+
"loadedSchemas%s": "[%s] Skema termuat: %s",
|
|
6
|
+
"loadSchema%s%s%d": "[%s] Muat skema: %s (%d)",
|
|
7
|
+
"loadedConns%s%s": "[%s] Koneksi termuat: %s",
|
|
8
|
+
"unsupportedPropTypeIn%s%s": "Tipe properti '%s' di '%s' tidak didukung",
|
|
9
|
+
"noSchemaFound": "Tidak ditemukan skema!",
|
|
10
|
+
"enterSchemaName": "Masukkan nama skema, dipisah dengan spasi:",
|
|
11
|
+
"noSchemaMatched": "Tidak ditemukan skema yang cocok",
|
|
12
|
+
"schema%d": "Skema (%d)",
|
|
13
|
+
"schemasWillBeRebuiltContinue": "Semua skema tersebut diatas akan dibuat ulang sebagai model. Anda yakin?",
|
|
14
|
+
"rebuilding%s": "Pembuatan ulang '%s'...",
|
|
15
|
+
"noDbConn%s%s": "Tidak ada koneksi database '%s' untuk '%s'. Batalkan!",
|
|
16
|
+
"errorDroppingModel%s%s": "Gagal menghapus model '%s': %s",
|
|
17
|
+
"modelExistsNeedForce%s": "Model '%s' telah ada. Tidak dilakukan pembuatan ulang tanpa --force",
|
|
18
|
+
"modelCreated%s": "Model '%s' sukses dibuat",
|
|
19
|
+
"errorCreatingModel%s%s": "Gagal membuat model '%s': %s",
|
|
20
|
+
"modelDropped%s": "Model '%s' sukses dihapus",
|
|
21
|
+
"memoryDbSkipped%s%s": "Db '%s' untuk '%s' adalah database memori, lewati",
|
|
22
|
+
"modelBuiltOnthefly%s%s%s": "[%s] Model '%s@%s' sukses dibuat ulang on the fly",
|
|
23
|
+
"unableToBuildModel%s%s%s": "Gagal membuat ulang model '%s' di '%s': %s",
|
|
24
|
+
"unknownSchema%s": "Skema '%s' tidak dikenal",
|
|
25
|
+
"payloadMustBeJson": "Data harus berupa obyek JSON yang valid",
|
|
26
|
+
"selectSchema": "Silahkan masukkan sebuah skema:",
|
|
27
|
+
"enterJsonPayload": "Masukkan data JSON:",
|
|
28
|
+
"payloadRequired": "Data harus diisi",
|
|
29
|
+
"invalidPayloadSyntax": "Sintak data tidak valid",
|
|
30
|
+
"creatingRecord": "Pembuatan data",
|
|
31
|
+
"enterRecordId:": "Masukkan ID data:",
|
|
32
|
+
"idIsRequired": "ID harus diisi",
|
|
33
|
+
"gettingRecord": "Mengambil data",
|
|
34
|
+
"removingRecord": "Menghapus data",
|
|
35
|
+
"cantFindSchema%s": "Tidak bisa menemukan skema dengan nama %s",
|
|
36
|
+
"recordNotFound%s%s": "Data '%s@%s' tidak ditemukan",
|
|
37
|
+
"invalidSchema%s": "Skema '%s' tidak valid",
|
|
38
|
+
"noPropsFoundOnSchema%s": "Skema '%s' tidak memiliki properti sama sekali",
|
|
39
|
+
"fieldIdReserved%s": "Kolom 'id@%s' adalah kolom ter-reservasi dan seharusnya tidak ditambahkan secara manual",
|
|
40
|
+
"missingPropType%s%s": "Tipe properti untuk '%s@%s' tidak ditemukan",
|
|
41
|
+
"unsupportedPropType%s%s%s": "Tipe properti '%s@%s' di '%s' tidak didukung",
|
|
42
|
+
"unknownConn%s%s": "Koneksi '%s@%s' tidak dikenal",
|
|
43
|
+
"fieldIsRequired%s%s": "Kolom '%s@%s' harus diisi",
|
|
44
|
+
"keyIsRequired%s": "Kunci '%s' harus diisi",
|
|
45
|
+
"enterQueryIfAny": "Silahkan masukkan kueri (jika ada):",
|
|
46
|
+
"findingRecords": "Temukan data",
|
|
47
|
+
"recordExists%s%s": "Data '%s@%s' sudah ada",
|
|
48
|
+
"fieldGroupAggregateMissing": "Field to group aggregate is missing",
|
|
49
|
+
"fieldCalcAggregateMissing": "Field to calculate aggregate is missing",
|
|
50
|
+
"baseFieldForHistogramMissing": "Base field for histogram must be provided",
|
|
51
|
+
"unknownBaseFieldForHistogram%s": "Unknown base field for histogram '%s'",
|
|
52
|
+
"fieldTypeMustBeDatetime%s%s": "Field type '%s@%s' must be a datetime field",
|
|
53
|
+
"groupFieldToAggregateMissing": "Group field to aggregate is missing",
|
|
54
|
+
"unknownGroupField%s%s": "Unknown group field '%s@%s'",
|
|
55
|
+
"grupFieldMustBeNumber": "Group field must be of type integer, smallint or float",
|
|
56
|
+
"unsupportedAggregateType%s": "Unsupported aggregate type: '%s'",
|
|
57
|
+
"keyIsRequired%s%s": "'%s@%s' key is required",
|
|
58
|
+
"fulltextNeedIntegerId%s%s": "Full text index need integer type primary id in '%s@%s'",
|
|
59
|
+
"unsupportedAggregate%s": "Unsupported aggregate '%s'",
|
|
60
|
+
"unsupportedAllowedChoices%s%s%s%s%s": "Unsupported %s '%s' for '%s@%s'. Allowed choices: %s",
|
|
61
|
+
"methodIsDisabled%s%sMethod": "Metode '%s@%s' dinonaktifkan",
|
|
62
|
+
"invalidModelForPersistence%s": "Model untuk penyimpanan tidak valid: %s",
|
|
63
|
+
"cantLoad%s%s": "Tidak bisa memuat %s: %s",
|
|
64
|
+
"noRecordFound": "Tidak ditemukan data",
|
|
65
|
+
"recordsFound%d": "Ditemukan %d data",
|
|
66
|
+
"add": "Tambah",
|
|
67
|
+
"edit": "Ubah",
|
|
68
|
+
"delete": "Hapus",
|
|
69
|
+
"export": "Ekspor",
|
|
70
|
+
"query": "Kueri",
|
|
71
|
+
"queryBuilder": "Pembuat Kueri",
|
|
72
|
+
"list": "Daftar",
|
|
73
|
+
"submitQuery": "Kirim Kueri",
|
|
74
|
+
"dataExport": "Ekspor Data",
|
|
75
|
+
"recordCreated": "Record successfully created",
|
|
76
|
+
"recordRemoved": "Record successfully removed",
|
|
77
|
+
"recordUpdated": "Record successfully updated",
|
|
78
|
+
"attachmentUploaded": "Attachment successfully uploaded",
|
|
79
|
+
"attachmentRemoved": "Attachment successfully removed",
|
|
80
|
+
"unknownModelSchema%s": "Unknown model/schema '%s'",
|
|
81
|
+
"sortOnUnindexedField%s%s": "Sort on unindexed field: '%s@%s'",
|
|
82
|
+
"modelNotExists%s": "Model '%s' doesn't exist yet. Please do model rebuild first",
|
|
83
|
+
"invalidDate": "Invalid date",
|
|
84
|
+
"histogramTypeMusBe%s": "Histogram type must be one of these: %s",
|
|
85
|
+
"methodUnsupported%s%s": "Method '%s@%s' is unsupported",
|
|
86
|
+
"uniqueConstraintError": "Unique constraint error",
|
|
87
|
+
"taskMustHaveModel%s": "Task must have %s model",
|
|
88
|
+
"driverNotInstalled%s": "Problem with '%s' driver file. Not installed yet?",
|
|
89
|
+
"generalDbError": "General Database Error",
|
|
90
|
+
"dbConstrainError": "Database Constraint Error",
|
|
91
|
+
"onlySupportThese%s": "Only support one of these: %s",
|
|
92
|
+
"isMissing%s": "%s is missing",
|
|
93
|
+
"notFound%s": "No %s found!",
|
|
94
|
+
"clientInstanceNotConnected%s": "Client instance not connected '%s@%s'. Skipped!",
|
|
95
|
+
"proxiedConnBound%s": "'%s' is bound to a proxied connection, skipped!'",
|
|
96
|
+
"addingMemoryPersistenceIgnored": "'%s' is a memory persistence model. Adding records from fixture is ignored!",
|
|
97
|
+
"onlyOneConnType%s": "There could only be one connection type '%s'",
|
|
98
|
+
"mustValidDbType": "Connection must have a valid DB type",
|
|
99
|
+
"unsupportedDbType%s": "Unsupported DB type '%s'",
|
|
100
|
+
"driverMustProvideDbType": "A DB driver must provide at least one database type",
|
|
101
|
+
"driverMustHaveName": "A DB driver must have a driver name",
|
|
102
|
+
"dbTypeAlreadySupportedByDriver%s%s": "Database type '%s' already supported by driver '%s'",
|
|
103
|
+
"featureNotAsync%s": "Feature '%s' should be an async function",
|
|
104
|
+
"unsupportedIndexType%s%s%s%s": "Unsupported index type %s for '%s@%s'. Allowed choices: %s",
|
|
105
|
+
"unknownFeature%s%s": "'Unknown feature '%s@%s'",
|
|
106
|
+
"onlyAccepFields%s%s": "Only accept array of field names or single string of field name '%s@%s'",
|
|
107
|
+
"invalidFieldName%s%s": "Invalid field name '%s@%s'",
|
|
108
|
+
"error%s": "Error: %s",
|
|
109
|
+
"succeedFailSkip%d%d%d": "Done! Succeded: %d, failed: %s, skipped: %d",
|
|
110
|
+
"chooseConn": "Please choose a connection:",
|
|
111
|
+
"sureContinue": "Are you sure to continue?",
|
|
112
|
+
"loadingDbFeature": "Loading DB feature",
|
|
113
|
+
"totalLoadedFeatures%d": "Total loaded features: %d",
|
|
114
|
+
"loadingDbSchemas": "Loading DB schemas",
|
|
115
|
+
"addingFixtureToMemDb": "Adding fixture for memory database",
|
|
116
|
+
"recordsAdded%s%d%d": "%s: %d of %d records added",
|
|
117
|
+
"driverInstantiated%s%s": "- Driver '%s:%s' instantiated",
|
|
75
118
|
"field": {
|
|
76
119
|
"id": "ID",
|
|
77
120
|
"code": "Kode",
|
|
@@ -125,9 +168,16 @@
|
|
|
125
168
|
"token": "Token",
|
|
126
169
|
"field": "Field",
|
|
127
170
|
"agree": "Persetujuan",
|
|
128
|
-
"method": "Metode"
|
|
171
|
+
"method": "Metode",
|
|
172
|
+
"masterId": "ID Master",
|
|
173
|
+
"details": "Detil",
|
|
174
|
+
"qty": "JML",
|
|
175
|
+
"link": "Tautan",
|
|
176
|
+
"amount": "Nilai",
|
|
177
|
+
"cycle": "Cycle",
|
|
178
|
+
"default": "Default"
|
|
129
179
|
},
|
|
130
|
-
"
|
|
180
|
+
"validationError": "Kesalahan Validasi",
|
|
131
181
|
"validation": {
|
|
132
182
|
"any": {
|
|
133
183
|
"required": "Harus diisi/dipilih",
|
package/lib/add-fixtures.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import path from 'path'
|
|
2
2
|
|
|
3
3
|
async function addFixture (name, { spinner } = {}) {
|
|
4
|
-
const { resolvePath, readConfig, eachPlugins
|
|
4
|
+
const { resolvePath, readConfig, eachPlugins } = this.app.bajo
|
|
5
5
|
const { isEmpty, isArray } = this.app.bajo.lib._
|
|
6
6
|
const { schema, connection } = this.getInfo(name)
|
|
7
7
|
if (connection.proxy) {
|
|
8
|
-
this.log.warn('
|
|
8
|
+
this.log.warn('proxiedConnBound%s', schema.name)
|
|
9
9
|
return
|
|
10
10
|
}
|
|
11
11
|
const result = { success: 0, failed: 0 }
|
|
@@ -15,7 +15,8 @@ async function addFixture (name, { spinner } = {}) {
|
|
|
15
15
|
let items = await readConfig(pattern, { ns: schema.ns, ignoreError: true })
|
|
16
16
|
if (isEmpty(items)) items = []
|
|
17
17
|
// override
|
|
18
|
-
const overrides = await readConfig(`${
|
|
18
|
+
const overrides = await readConfig(`${this.app.main.dir.pkg}/dobo/override/${schema.ns}/fixture/${base}.*`, { ns: this.name, ignoreError: true })
|
|
19
|
+
|
|
19
20
|
if (isArray(overrides) && !isEmpty(overrides)) items = overrides
|
|
20
21
|
// extend
|
|
21
22
|
await eachPlugins(async function ({ dir, ns }) {
|
|
@@ -38,12 +39,11 @@ async function addFixture (name, { spinner } = {}) {
|
|
|
38
39
|
}
|
|
39
40
|
await this.recordCreate(schema.name, item, { force: true })
|
|
40
41
|
result.success++
|
|
41
|
-
if (spinner) spinner.setText('%s
|
|
42
|
+
if (spinner) spinner.setText('recordsAdded%s%d%d', schema.name, result.success, items.length)
|
|
42
43
|
} catch (err) {
|
|
43
44
|
console.log(err)
|
|
44
45
|
err.model = schema.name
|
|
45
46
|
if (this.app.bajo.applet) this.print.fail(this.validationErrorMessage(err))
|
|
46
|
-
// else this.log.error('Add fixture \'%s@%s\' error: %s', schema.name, schema.connection, err.message)
|
|
47
47
|
result.failed++
|
|
48
48
|
}
|
|
49
49
|
}
|
package/lib/build-bulk-action.js
CHANGED
|
@@ -2,9 +2,9 @@ async function buildBulkAction (name, action, options = {}) {
|
|
|
2
2
|
const { fs, importModule } = this.app.bajo
|
|
3
3
|
const { camelCase } = this.app.bajo.lib._
|
|
4
4
|
const { schema, driver, connection } = await this.getInfo(name)
|
|
5
|
-
if (!options.force && (schema.disabled ?? []).includes(action)) throw this.error('
|
|
5
|
+
if (!options.force && (schema.disabled ?? []).includes(action)) throw this.error('methodIsDisabled%s%s', camelCase('bulk ' + action), name)
|
|
6
6
|
const file = `${driver.plugin}:/${this.name}/method/bulk/${action}.js`
|
|
7
|
-
if (!fs.existsSync(file)) throw this.error('
|
|
7
|
+
if (!fs.existsSync(file)) throw this.error('methodUnsupported%s%s', camelCase('bulk ' + action), name)
|
|
8
8
|
const handler = await importModule(file)
|
|
9
9
|
return { handler, schema, driver, connection }
|
|
10
10
|
}
|
package/lib/check-unique.js
CHANGED
|
@@ -11,8 +11,8 @@ async function checkUnique ({ schema, body, id }) {
|
|
|
11
11
|
const query = set({}, s, body[s])
|
|
12
12
|
const resp = await this.recordFind(schema.name, { query, limit: 1 }, opts)
|
|
13
13
|
if (resp.length !== 0) {
|
|
14
|
-
const details = [{ field: s, error: '
|
|
15
|
-
throw this.error('
|
|
14
|
+
const details = [{ field: s, error: 'uniqueConstraintError', value: id }]
|
|
15
|
+
throw this.error('uniqueConstraintError', { details })
|
|
16
16
|
}
|
|
17
17
|
}
|
|
18
18
|
const multis = filter(schema.indexes, i => i.type === 'unique')
|
|
@@ -6,10 +6,10 @@ async function collectConnections ({ item, index, options }) {
|
|
|
6
6
|
const conn = item
|
|
7
7
|
const { importModule, breakNsPath } = this.app.bajo
|
|
8
8
|
const { has, find } = this.app.bajo.lib._
|
|
9
|
-
if (!has(conn, 'type')) this.fatal('
|
|
9
|
+
if (!has(conn, 'type')) this.fatal('mustValidDbType')
|
|
10
10
|
const { ns, path: type } = breakNsPath(conn.type)
|
|
11
11
|
const driver = find(this.drivers, { ns, type })
|
|
12
|
-
if (!driver) this.fatal('
|
|
12
|
+
if (!driver) this.fatal('unsupportedDbType%s', conn.type)
|
|
13
13
|
let file = `${ns}:/${this.name}/lib/${type}/conn-sanitizer.js`
|
|
14
14
|
if (conn.type === 'dobo:memory') file = `${ns}:/lib/mem-db/conn-sanitizer.js`
|
|
15
15
|
if (driver.provider) file = `${driver.provider}:/${ns}/lib/${type}/conn-sanitizer.js`
|
package/lib/collect-drivers.js
CHANGED
|
@@ -14,15 +14,15 @@ async function collectDrivers () {
|
|
|
14
14
|
await runHook(`${this.name}:beforeCollectDrivers`)
|
|
15
15
|
await eachPlugins(async function ({ file, ns }) {
|
|
16
16
|
const info = await readConfig(file, { ns })
|
|
17
|
-
if (!info.type) this.fatal('
|
|
18
|
-
if (!info.driver) this.fatal('
|
|
17
|
+
if (!info.type) this.fatal('driverMustProvideDbType')
|
|
18
|
+
if (!info.driver) this.fatal('driverMustHaveName')
|
|
19
19
|
if (isString(info.type)) info.type = [info.type]
|
|
20
20
|
if (!info.idField) info.idField = cloneDeep(me.config.default.idField)
|
|
21
21
|
info.idField.name = 'id'
|
|
22
22
|
for (const t of info.type) {
|
|
23
23
|
const [type, provider] = t.split('@')
|
|
24
24
|
const exists = find(me.drivers, { type, ns })
|
|
25
|
-
if (exists) this.fatal('
|
|
25
|
+
if (exists) this.fatal('dbTypeAlreadySupportedByDriver%s%s', type, info.driver)
|
|
26
26
|
const driver = pick(find(me.app[ns].drivers, { name: type }) ?? {}, ['dialect', 'idField', 'lowerCaseColl', 'returning'])
|
|
27
27
|
const ext = {
|
|
28
28
|
type,
|
package/lib/collect-feature.js
CHANGED
|
@@ -8,7 +8,7 @@ async function handler ({ file, alias, ns }) {
|
|
|
8
8
|
let name = camelCase(path.basename(file, '.js'))
|
|
9
9
|
if (ns !== me.name) name = `${ns}.${name}`
|
|
10
10
|
const mod = await importModule(file)
|
|
11
|
-
if (!isFunction(mod)) this.fatal('
|
|
11
|
+
if (!isFunction(mod)) this.fatal('featureNotAsync%s', name)
|
|
12
12
|
me.feature[name] = mod
|
|
13
13
|
me.log.trace('- %s', name)
|
|
14
14
|
}
|
|
@@ -16,9 +16,9 @@ async function handler ({ file, alias, ns }) {
|
|
|
16
16
|
async function collectFeature () {
|
|
17
17
|
const { eachPlugins } = this.app.bajo
|
|
18
18
|
this.feature = {}
|
|
19
|
-
this.log.trace('
|
|
19
|
+
this.log.trace('loadingDbFeature')
|
|
20
20
|
await eachPlugins(handler, { glob: 'feature/*.js', prefix: this.name })
|
|
21
|
-
this.log.debug('
|
|
21
|
+
this.log.debug('totalLoadedFeatures%d', Object.keys(this.feature).length)
|
|
22
22
|
}
|
|
23
23
|
|
|
24
24
|
export default collectFeature
|
package/lib/collect-schemas.js
CHANGED
|
@@ -9,7 +9,7 @@ async function handler ({ file, alias, ns }) {
|
|
|
9
9
|
const base = path.basename(file, path.extname(file))
|
|
10
10
|
const defName = pascalCase(`${alias} ${base}`)
|
|
11
11
|
const mod = await readConfig(file, { ns, ignoreError: true })
|
|
12
|
-
if (!isPlainObject(mod)) this.fatal('
|
|
12
|
+
if (!isPlainObject(mod)) this.fatal('invalidSchema%s', defName)
|
|
13
13
|
const forcedConn = get(this, `app.${ns}.config.dobo.schemaConnection.${base}`)
|
|
14
14
|
if (forcedConn) mod.connection = forcedConn
|
|
15
15
|
if (!mod.connection) mod.connection = 'default'
|
|
@@ -30,7 +30,7 @@ async function handler ({ file, alias, ns }) {
|
|
|
30
30
|
})
|
|
31
31
|
}
|
|
32
32
|
mod.feature = feats
|
|
33
|
-
if ((mod.properties ?? []).length === 0) this.fatal('
|
|
33
|
+
if ((mod.properties ?? []).length === 0) this.fatal('noPropsFoundOnSchema%s', mod.name)
|
|
34
34
|
// schema extender
|
|
35
35
|
await eachPlugins(async function (opts) {
|
|
36
36
|
const glob = `${opts.dir}/dobo/extend/${mod.ns}/schema/${base}.*`
|
|
@@ -71,7 +71,7 @@ async function collectSchemas () {
|
|
|
71
71
|
const { eachPlugins } = this.app.bajo
|
|
72
72
|
const { isEmpty } = this.app.bajo.lib._
|
|
73
73
|
const result = await eachPlugins(handler, { glob: 'schema/*.*', prefix: this.name })
|
|
74
|
-
if (isEmpty(result)) this.log.warn('
|
|
74
|
+
if (isEmpty(result)) this.log.warn('notFound%s', this.print.write('schema'))
|
|
75
75
|
else await sanitizeSchema.call(this, result)
|
|
76
76
|
}
|
|
77
77
|
|
|
@@ -5,11 +5,6 @@ async function genericPropSanitizer ({ prop, schema, driver }) {
|
|
|
5
5
|
const { has, get, each } = this.app.bajo.lib._
|
|
6
6
|
const def = this.propType[prop.type]
|
|
7
7
|
// detect from drivers
|
|
8
|
-
/*
|
|
9
|
-
if (prop.name === 'id' && ['smallint', 'integer'].includes(prop.type) && driver.driver !== 'knex') {
|
|
10
|
-
fatal('Integer types of ID only supported by knex driver')
|
|
11
|
-
}
|
|
12
|
-
*/
|
|
13
8
|
if (prop.type === 'string') {
|
|
14
9
|
def.minLength = prop.minLength ?? 0
|
|
15
10
|
def.maxLength = prop.maxLength ?? 255
|
|
@@ -25,13 +20,11 @@ async function genericPropSanitizer ({ prop, schema, driver }) {
|
|
|
25
20
|
}
|
|
26
21
|
prop[p] = get(prop, p, get(this.config, `default.property.${prop.type}.${p}`, def[p]))
|
|
27
22
|
if (def.choices && !def.choices.includes(prop[p])) {
|
|
28
|
-
this.fatal('
|
|
29
|
-
p, prop[p], prop.name, schema.name, join(def.choices))
|
|
23
|
+
this.fatal('unsupportedAllowedChoices%s%s%s%s%s', p, prop[p], prop.name, schema.name, join(def.choices))
|
|
30
24
|
}
|
|
31
25
|
})
|
|
32
26
|
if (prop.index && !indexTypes.includes(prop.index.type)) {
|
|
33
|
-
this.fatal('
|
|
34
|
-
prop.index.type, prop.name, schema.name, join(indexTypes))
|
|
27
|
+
this.fatal('unsupportedIndexType%s%s%s%s', prop.index.type, prop.name, schema.name, join(indexTypes))
|
|
35
28
|
}
|
|
36
29
|
}
|
|
37
30
|
|
|
@@ -24,7 +24,7 @@ async function instantiate ({ connection, schemas, noRebuild }) {
|
|
|
24
24
|
const data = fs.readFileSync(file, 'utf8')
|
|
25
25
|
this.memDb.storage[schema.name] = JSON.parse(data)
|
|
26
26
|
} catch (err) {
|
|
27
|
-
this.fatal('
|
|
27
|
+
this.fatal('cantLoad%s%s', schema.name, err.message)
|
|
28
28
|
}
|
|
29
29
|
}
|
|
30
30
|
setInterval(() => {
|
|
@@ -3,7 +3,7 @@ import getRecord from './get.js'
|
|
|
3
3
|
async function create ({ schema, body, options = {} }) {
|
|
4
4
|
const { noResult } = options
|
|
5
5
|
const exist = await getRecord.call(this, { schema, id: body.id, options: { thrownNotFound: false } })
|
|
6
|
-
if (exist.data) throw this.error('
|
|
6
|
+
if (exist.data) throw this.error('recordExists%s%s', body.id, schema.name)
|
|
7
7
|
this.memDb.storage[schema.name].push(body)
|
|
8
8
|
if (noResult) return
|
|
9
9
|
return { data: body }
|