create-sip 1.4.3 → 1.4.5

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.
@@ -300,10 +300,24 @@ node op make/seeder employee
300
300
  ```javascript
301
301
 
302
302
  async function up({context: QueryInterface}) {
303
- await QueryInterface.bulkInsert('employees', [
304
- { id: 1, name: 'Joe Kitin' },
305
- { id: 2, name: 'Peter Fall' }
306
- ]);
303
+ if(db.Employee) {
304
+ await db.Employee.bulkCreate([
305
+ { id: 1, name: "John Smith" },
306
+ { id: 2, name: "Alice Johnson" }
307
+ ]);
308
+ }else {
309
+ const now = new Date()
310
+ await QueryInterface.bulkInsert('things', [
311
+ {
312
+ id: 1, name: "John Smith",
313
+ createdAt: now, updatedAt: now
314
+ },
315
+ {
316
+ id: 2, name: "Alice Johnson",
317
+ createdAt: now, updatedAt: now
318
+ }
319
+ ]);
320
+ }
307
321
  }
308
322
 
309
323
  async function down({context: QueryInterface}) {
package/expressapi/op CHANGED
@@ -330,7 +330,7 @@ DB_HOST=127.0.0.1
330
330
  DB_NAME=
331
331
  DB_USER=
332
332
  DB_PASS=
333
- DB_PATH=:memory:
333
+ DB_STORAGE=database.sqlite
334
334
  `
335
335
  const destinationFileName = '.env'
336
336
  if(await startCheckIfFileExists(destinationFileName)) {
@@ -87,6 +87,7 @@
87
87
  "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.3.tgz",
88
88
  "integrity": "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==",
89
89
  "license": "MIT",
90
+ "peer": true,
90
91
  "engines": {
91
92
  "node": ">=12"
92
93
  },
@@ -238,6 +239,7 @@
238
239
  "resolved": "https://registry.npmjs.org/@noble/ciphers/-/ciphers-1.3.0.tgz",
239
240
  "integrity": "sha512-2I0gnIVPtfnMw9ee9h1dJG7tp81+8Ob3OJb3Mv37rx5L40/b0i7djjCVvGOVqc9AEIQyvyu1i6ypKdFw8R8gQw==",
240
241
  "license": "MIT",
242
+ "peer": true,
241
243
  "engines": {
242
244
  "node": "^14.21.3 || >=16"
243
245
  },
@@ -608,6 +610,7 @@
608
610
  "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.13.0.tgz",
609
611
  "integrity": "sha512-PRA911Blj99jR5RMeTunVbNXMF6Lp4vZXnk5GQjcnUWUTsrXtekg/pnmFFI2u/I36Y/2bITGS30GZCXei6uNkA==",
610
612
  "license": "MIT",
613
+ "peer": true,
611
614
  "dependencies": {
612
615
  "fast-deep-equal": "^3.1.3",
613
616
  "json-schema-traverse": "^1.0.0",
@@ -1,8 +1,16 @@
1
+ import db from '../../app/models/modrels.js';
1
2
 
2
3
  async function up({context: QueryInterface}) {
3
- await QueryInterface.bulkInsert('things', [
4
+ if(db.Employee) {
5
+ await db.Employee.bulkCreate([
6
+
7
+ ]);
8
+ }else {
9
+ const now = new Date()
10
+ await QueryInterface.bulkInsert('things', [
4
11
 
5
- ]);
12
+ ]);
13
+ }
6
14
  }
7
15
 
8
16
  async function down({context: QueryInterface}) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-sip",
3
- "version": "1.4.3",
3
+ "version": "1.4.5",
4
4
  "main": "index.js",
5
5
  "bin": {
6
6
  "create-sip": "create-sip.js"