Skip to content

Commit c3cd4fd

Browse files
committed
feat: review comments (indent 3 spaces, test adjustments)
1 parent 5d8b2b2 commit c3cd4fd

File tree

8 files changed

+406
-403
lines changed

8 files changed

+406
-403
lines changed

templates/mle-ts-sample/.env.example

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ DB_PASSWORD=<%= connectionPassword %>
55
# Connection string to your Autonomous Database/
66
# Oracle Database instance
77
CONNECT_STRING=<%= connectionString %>
8+
# Oracle MLE Module name
89
MLE_MODULE=
910
# Optional HTTP Proxy Settings
1011
# HTTPS_PROXY=

templates/mle-ts-sample/.env.example.wallet

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ DB_PASSWORD=<%= connectionPassword %>
88
# Connection string to your Autonomous Database/
99
# Oracle Database instance
1010
CONNECT_STRING=<%= connectionString %>
11+
# Oracle MLE Module name
1112
MLE_MODULE=
1213
# Optional HTTP Proxy Settings
1314
# HTTPS_PROXY=

templates/mle-ts-sample/README.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -68,13 +68,13 @@ Use the `@create-database-app` command as described in the [top-level readme](ht
6868
```
6969
? What would you like your application's name to be? demo
7070
? Which template would you like to use for your project?
71-
node-angular
72-
node-react-todo
73-
ords-remix-jwt-sample
71+
node-angular
72+
node-react-todo
73+
ords-remix-jwt-sample
7474
❯ mle-ts-sample
75-
node-vanilla
76-
node-react
77-
node-vue
75+
node-vanilla
76+
node-react
77+
node-vue
7878
(Use arrow keys to reveal more choices)
7979
This creates an empty project with MLE and Oracle database connection starter code.
8080
```
@@ -166,10 +166,10 @@ The following SQL code demonstrates how to invoke the MLE module function `newUs
166166
```sql
167167
-- Create the user_package package
168168
CREATE OR REPLACE PACKAGE user_package AS
169-
FUNCTION newUserFunc(name IN VARCHAR2) RETURN NUMBER;
170-
FUNCTION getUser(id IN NUMBER) RETURN VARCHAR2;
171-
PROCEDURE updateUser(id IN NUMBER, name IN VARCHAR2);
172-
PROCEDURE deleteUser(id IN NUMBER);
169+
FUNCTION newUserFunc(name IN VARCHAR2) RETURN NUMBER;
170+
FUNCTION getUser(id IN NUMBER) RETURN VARCHAR2;
171+
PROCEDURE updateUser(id IN NUMBER, name IN VARCHAR2);
172+
PROCEDURE deleteUser(id IN NUMBER);
173173
END user_package;
174174

175175
CREATE OR REPLACE PACKAGE BODY user_package AS
@@ -236,8 +236,8 @@ Assuming you REST-enabled your schema, and created an ORDS handler for MLE/JavaS
236236

237237
```bash
238238
curl -X POST "https://yourserver.com/ords/mle/todo/create" \
239-
-H "Content-Type: application/json" \
240-
-d '{"todo_text": "Buy groceries", "user_id": "user123", "category": "personal"}'
239+
-H "Content-Type: application/json" \
240+
-d '{"todo_text": "Buy groceries", "user_id": "user123", "category": "personal"}'
241241
```
242242

243243
## Clean Up

templates/mle-ts-sample/deploy.mjs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,18 +22,18 @@ const envFilePath = path.resolve(__dirname, '.env');
2222
function updateEnvVariable(key, value) {
2323
// Read the existing .env file
2424
const envData = fs.readFileSync(envFilePath, 'utf-8');
25-
25+
2626
// Check if the variable already exists
2727
const regex = new RegExp(`^${key}=.*`, 'm');
2828
if (regex.test(envData)) {
29-
// Update existing variable
30-
const updatedData = envData.replace(regex, `${key}=${value}`);
31-
fs.writeFileSync(envFilePath, updatedData, 'utf-8');
32-
console.log(`Updated ${key} in .env file`);
29+
// Update existing variable
30+
const updatedData = envData.replace(regex, `${key}=${value}`);
31+
fs.writeFileSync(envFilePath, updatedData, 'utf-8');
32+
console.log(`Updated ${key} in .env file`);
3333
} else {
34-
// Add new variable if not present
35-
fs.appendFileSync(envFilePath, `\n${key}=${value}`, 'utf-8');
36-
console.log(`Added new variable ${key} to .env file`);
34+
// Add new variable if not present
35+
fs.appendFileSync(envFilePath, `\n${key}=${value}`, 'utf-8');
36+
console.log(`Added new variable ${key} to .env file`);
3737
}
3838
}
3939

templates/mle-ts-sample/package.json

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
{
2-
"name": "mleapp",
3-
"version": "1.0.0",
4-
"devDependencies": {
5-
"mle-js": "^23.7.0",
6-
"typescript": "^5.7.3",
7-
"esbuild": "0.25.1",
8-
"oracledb": "^6.7.1",
9-
"vitest": "^3.1.2"
10-
},
11-
"scripts": {
12-
"build": "esbuild src/index.ts --bundle --minify=false --platform=neutral --format=esm --outfile=dist/index.js",
13-
"deploy": "node deploy.mjs",
14-
"initdb": "node utils/db.mjs utils/database/initdb.sql",
15-
"cleandb": "node utils/db.mjs utils/database/cleanup.sql",
16-
"test": "vitest"
17-
}
2+
"name": "mleapp",
3+
"version": "1.0.0",
4+
"devDependencies": {
5+
"mle-js": "^23.7.0",
6+
"typescript": "^5.7.3",
7+
"esbuild": "0.25.1",
8+
"oracledb": "^6.7.1",
9+
"vitest": "^3.1.2"
10+
},
11+
"scripts": {
12+
"build": "esbuild src/index.ts --bundle --minify=false --platform=neutral --format=esm --outfile=dist/index.js",
13+
"deploy": "node deploy.mjs",
14+
"initdb": "node utils/db.mjs utils/database/initdb.sql",
15+
"cleandb": "node utils/db.mjs utils/database/cleanup.sql",
16+
"test": "vitest"
17+
}
1818
}

0 commit comments

Comments
 (0)