@sphereon/ssi-sdk.data-store 0.36.1-feature.integration.fides.88 → 0.36.1-feature.vdx24.einvoice.inbox.127
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/dist/index.cjs +238 -96
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +12 -1
- package/dist/index.d.ts +12 -1
- package/dist/index.js +240 -96
- package/dist/index.js.map +1 -1
- package/package.json +9 -8
- package/src/__tests__/contact.entities.test.ts +3 -3
- package/src/__tests__/contact.store.test.ts +3 -3
- package/src/__tests__/issuanceBranding.entities.test.ts +4 -4
- package/src/__tests__/issuanceBranding.store.test.ts +4 -4
- package/src/index.ts +12 -0
- package/src/migrations/generic/15-AddServiceMetadata.ts +66 -0
- package/src/migrations/generic/index.ts +15 -0
- package/src/migrations/index.ts +4 -0
- package/src/migrations/postgres/1764000000001-AddServiceMetadata.ts +44 -0
- package/src/migrations/sqlite/1764000000002-AddServiceMetadata.ts +41 -0
package/dist/index.cjs
CHANGED
|
@@ -51,6 +51,7 @@ __export(index_exports, {
|
|
|
51
51
|
DataStoreDigitalCredentialEntities: () => DataStoreDigitalCredentialEntities,
|
|
52
52
|
DataStoreDigitalCredentialMigrations: () => DataStoreDigitalCredentialMigrations,
|
|
53
53
|
DataStoreEntities: () => DataStoreEntities,
|
|
54
|
+
DataStoreEntitiesWithVeramo: () => DataStoreEntitiesWithVeramo,
|
|
54
55
|
DataStoreEventLoggerEntities: () => DataStoreEventLoggerEntities,
|
|
55
56
|
DataStoreEventLoggerMigrations: () => DataStoreEventLoggerMigrations,
|
|
56
57
|
DataStoreIssuanceBrandingEntities: () => DataStoreIssuanceBrandingEntities,
|
|
@@ -58,9 +59,11 @@ __export(index_exports, {
|
|
|
58
59
|
DataStoreMachineStateEntities: () => DataStoreMachineStateEntities,
|
|
59
60
|
DataStoreMachineStateMigrations: () => DataStoreMachineStateMigrations,
|
|
60
61
|
DataStoreMigrations: () => DataStoreMigrations,
|
|
62
|
+
DataStoreMigrationsWithVeramo: () => DataStoreMigrationsWithVeramo,
|
|
61
63
|
DataStoreOid4vcStateEntities: () => DataStoreOid4vcStateEntities,
|
|
62
64
|
DataStorePresentationDefinitionEntities: () => DataStorePresentationDefinitionEntities,
|
|
63
65
|
DataStorePresentationDefinitionMigrations: () => DataStorePresentationDefinitionMigrations,
|
|
66
|
+
DataStoreServiceMigrations: () => DataStoreServiceMigrations,
|
|
64
67
|
DataStoreStatusListEntities: () => DataStoreStatusListEntities,
|
|
65
68
|
DataStoreStatusListMigrations: () => DataStoreStatusListMigrations,
|
|
66
69
|
DcqlQueryItemEntity: () => DcqlQueryItemEntity,
|
|
@@ -89,6 +92,8 @@ __export(index_exports, {
|
|
|
89
92
|
StatusListEntryEntity: () => StatusListEntryEntity,
|
|
90
93
|
StatusListStore: () => StatusListStore,
|
|
91
94
|
TextAttributesEntity: () => TextAttributesEntity,
|
|
95
|
+
VeramoDataStoreEntities: () => import_data_store.Entities,
|
|
96
|
+
VeramoDataStoreMigrations: () => import_data_store.migrations,
|
|
92
97
|
activityEventEntityFrom: () => activityEventEntityFrom,
|
|
93
98
|
activityEventFrom: () => activityEventFrom,
|
|
94
99
|
auditEventEntityFrom: () => auditEventEntityFrom,
|
|
@@ -152,6 +157,7 @@ __export(index_exports, {
|
|
|
152
157
|
textAttributesEntityFrom: () => textAttributesEntityFrom
|
|
153
158
|
});
|
|
154
159
|
module.exports = __toCommonJS(index_exports);
|
|
160
|
+
var import_data_store2 = require("@veramo/data-store");
|
|
155
161
|
|
|
156
162
|
// src/entities/contact/BaseConfigEntity.ts
|
|
157
163
|
var import_typeorm12 = require("typeorm");
|
|
@@ -7046,6 +7052,9 @@ var cleanFilter = /* @__PURE__ */ __name((filter) => {
|
|
|
7046
7052
|
});
|
|
7047
7053
|
}, "cleanFilter");
|
|
7048
7054
|
|
|
7055
|
+
// src/migrations/generic/index.ts
|
|
7056
|
+
var import_data_store = require("@veramo/data-store");
|
|
7057
|
+
|
|
7049
7058
|
// src/migrations/generic/1-CreateContacts.ts
|
|
7050
7059
|
var import_debug8 = __toESM(require("debug"), 1);
|
|
7051
7060
|
|
|
@@ -8094,32 +8103,153 @@ var AddLinkedVpFields1763387280000 = class {
|
|
|
8094
8103
|
}
|
|
8095
8104
|
};
|
|
8096
8105
|
|
|
8097
|
-
// src/migrations/generic/
|
|
8106
|
+
// src/migrations/generic/15-AddServiceMetadata.ts
|
|
8107
|
+
var import_debug16 = __toESM(require("debug"), 1);
|
|
8108
|
+
|
|
8109
|
+
// src/migrations/postgres/1764000000001-AddServiceMetadata.ts
|
|
8098
8110
|
var import_debug14 = __toESM(require("debug"), 1);
|
|
8099
8111
|
var debug14 = (0, import_debug14.default)("sphereon:ssi-sdk:migrations");
|
|
8112
|
+
var AddServiceMetadata1764000000001 = class {
|
|
8113
|
+
static {
|
|
8114
|
+
__name(this, "AddServiceMetadata1764000000001");
|
|
8115
|
+
}
|
|
8116
|
+
name = "AddServiceMetadata1764000000001";
|
|
8117
|
+
async up(queryRunner) {
|
|
8118
|
+
const table = await queryRunner.getTable("service");
|
|
8119
|
+
if (!table) {
|
|
8120
|
+
debug14("AddServiceMetadata: Skipping migration - service table does not exist. This is expected if Veramo DID Manager is not being used. If you need service metadata support, ensure Veramo migrations run before SSI-SDK migrations.");
|
|
8121
|
+
console.warn("[SSI-SDK Migration] AddServiceMetadata: Skipping - service table does not exist (Veramo DID Manager not in use)");
|
|
8122
|
+
return;
|
|
8123
|
+
}
|
|
8124
|
+
await queryRunner.query(`
|
|
8125
|
+
ALTER TABLE "service"
|
|
8126
|
+
ADD COLUMN IF NOT EXISTS "metadata" jsonb
|
|
8127
|
+
`);
|
|
8128
|
+
debug14("AddServiceMetadata: Added metadata column to service table");
|
|
8129
|
+
}
|
|
8130
|
+
async down(queryRunner) {
|
|
8131
|
+
const table = await queryRunner.getTable("service");
|
|
8132
|
+
if (!table) {
|
|
8133
|
+
return;
|
|
8134
|
+
}
|
|
8135
|
+
await queryRunner.query(`
|
|
8136
|
+
ALTER TABLE "service"
|
|
8137
|
+
DROP COLUMN IF EXISTS "metadata"
|
|
8138
|
+
`);
|
|
8139
|
+
}
|
|
8140
|
+
};
|
|
8141
|
+
|
|
8142
|
+
// src/migrations/sqlite/1764000000002-AddServiceMetadata.ts
|
|
8143
|
+
var import_debug15 = __toESM(require("debug"), 1);
|
|
8144
|
+
var debug15 = (0, import_debug15.default)("sphereon:ssi-sdk:migrations");
|
|
8145
|
+
var AddServiceMetadata1764000000002 = class {
|
|
8146
|
+
static {
|
|
8147
|
+
__name(this, "AddServiceMetadata1764000000002");
|
|
8148
|
+
}
|
|
8149
|
+
name = "AddServiceMetadata1764000000002";
|
|
8150
|
+
async up(queryRunner) {
|
|
8151
|
+
const table = await queryRunner.getTable("service");
|
|
8152
|
+
if (!table) {
|
|
8153
|
+
debug15("AddServiceMetadata: Skipping migration - service table does not exist. This is expected if Veramo DID Manager is not being used. If you need service metadata support, ensure Veramo migrations run before SSI-SDK migrations.");
|
|
8154
|
+
console.warn("[SSI-SDK Migration] AddServiceMetadata: Skipping - service table does not exist (Veramo DID Manager not in use)");
|
|
8155
|
+
return;
|
|
8156
|
+
}
|
|
8157
|
+
const hasMetadataColumn = table.columns.some((col) => col.name === "metadata");
|
|
8158
|
+
if (!hasMetadataColumn) {
|
|
8159
|
+
await queryRunner.query(`
|
|
8160
|
+
ALTER TABLE "service"
|
|
8161
|
+
ADD COLUMN "metadata" text
|
|
8162
|
+
`);
|
|
8163
|
+
debug15("AddServiceMetadata: Added metadata column to service table");
|
|
8164
|
+
}
|
|
8165
|
+
}
|
|
8166
|
+
async down(queryRunner) {
|
|
8167
|
+
}
|
|
8168
|
+
};
|
|
8169
|
+
|
|
8170
|
+
// src/migrations/generic/15-AddServiceMetadata.ts
|
|
8171
|
+
var debug16 = (0, import_debug16.default)("sphereon:ssi-sdk:migrations");
|
|
8172
|
+
var AddServiceMetadata1764000000000 = class {
|
|
8173
|
+
static {
|
|
8174
|
+
__name(this, "AddServiceMetadata1764000000000");
|
|
8175
|
+
}
|
|
8176
|
+
name = "AddServiceMetadata1764000000000";
|
|
8177
|
+
async up(queryRunner) {
|
|
8178
|
+
debug16("migration: adding metadata column to service table");
|
|
8179
|
+
const dbType = queryRunner.connection.driver.options.type;
|
|
8180
|
+
switch (dbType) {
|
|
8181
|
+
case "postgres": {
|
|
8182
|
+
debug16("using postgres migration file for AddServiceMetadata");
|
|
8183
|
+
const mig = new AddServiceMetadata1764000000001();
|
|
8184
|
+
await mig.up(queryRunner);
|
|
8185
|
+
debug16("Postgres migration statements for AddServiceMetadata executed");
|
|
8186
|
+
return;
|
|
8187
|
+
}
|
|
8188
|
+
case "sqlite":
|
|
8189
|
+
case "expo":
|
|
8190
|
+
case "react-native": {
|
|
8191
|
+
debug16("using sqlite/react-native migration file for AddServiceMetadata");
|
|
8192
|
+
const mig = new AddServiceMetadata1764000000002();
|
|
8193
|
+
await mig.up(queryRunner);
|
|
8194
|
+
debug16("SQLite migration statements for AddServiceMetadata executed");
|
|
8195
|
+
return;
|
|
8196
|
+
}
|
|
8197
|
+
default:
|
|
8198
|
+
return Promise.reject(`Migrations are currently only supported for sqlite, react-native, expo, and postgres for AddServiceMetadata. Was ${dbType}. Please run your database without migrations and with 'migrationsRun: false' and 'synchronize: true' for now`);
|
|
8199
|
+
}
|
|
8200
|
+
}
|
|
8201
|
+
async down(queryRunner) {
|
|
8202
|
+
debug16("migration: reverting metadata column from service table");
|
|
8203
|
+
const dbType = queryRunner.connection.driver.options.type;
|
|
8204
|
+
switch (dbType) {
|
|
8205
|
+
case "postgres": {
|
|
8206
|
+
debug16("using postgres migration file for AddServiceMetadata");
|
|
8207
|
+
const mig = new AddServiceMetadata1764000000001();
|
|
8208
|
+
await mig.down(queryRunner);
|
|
8209
|
+
debug16("Postgres migration statements for AddServiceMetadata reverted");
|
|
8210
|
+
return;
|
|
8211
|
+
}
|
|
8212
|
+
case "sqlite":
|
|
8213
|
+
case "expo":
|
|
8214
|
+
case "react-native": {
|
|
8215
|
+
debug16("using sqlite/react-native migration file for AddServiceMetadata");
|
|
8216
|
+
const mig = new AddServiceMetadata1764000000002();
|
|
8217
|
+
await mig.down(queryRunner);
|
|
8218
|
+
debug16("SQLite migration statements for AddServiceMetadata reverted");
|
|
8219
|
+
return;
|
|
8220
|
+
}
|
|
8221
|
+
default:
|
|
8222
|
+
return Promise.reject(`Migrations are currently only supported for sqlite, react-native, expo, and postgres for AddServiceMetadata. Was ${dbType}. Please run your database without migrations and with 'migrationsRun: false' and 'synchronize: true' for now`);
|
|
8223
|
+
}
|
|
8224
|
+
}
|
|
8225
|
+
};
|
|
8226
|
+
|
|
8227
|
+
// src/migrations/generic/2-CreateIssuanceBranding.ts
|
|
8228
|
+
var import_debug17 = __toESM(require("debug"), 1);
|
|
8229
|
+
var debug17 = (0, import_debug17.default)("sphereon:ssi-sdk:migrations");
|
|
8100
8230
|
var CreateIssuanceBranding1659463079429 = class {
|
|
8101
8231
|
static {
|
|
8102
8232
|
__name(this, "CreateIssuanceBranding1659463079429");
|
|
8103
8233
|
}
|
|
8104
8234
|
name = "CreateIssuanceBranding1659463079429";
|
|
8105
8235
|
async up(queryRunner) {
|
|
8106
|
-
|
|
8236
|
+
debug17("migration: creating issuance branding tables");
|
|
8107
8237
|
const dbType = queryRunner.connection.driver.options.type;
|
|
8108
8238
|
switch (dbType) {
|
|
8109
8239
|
case "postgres": {
|
|
8110
|
-
|
|
8240
|
+
debug17("using postgres migration file");
|
|
8111
8241
|
const mig = new CreateIssuanceBranding1685628974232();
|
|
8112
8242
|
await mig.up(queryRunner);
|
|
8113
|
-
|
|
8243
|
+
debug17("Migration statements executed");
|
|
8114
8244
|
return;
|
|
8115
8245
|
}
|
|
8116
8246
|
case "sqlite":
|
|
8117
8247
|
case "expo":
|
|
8118
8248
|
case "react-native": {
|
|
8119
|
-
|
|
8249
|
+
debug17("using sqlite/react-native migration file");
|
|
8120
8250
|
const mig = new CreateIssuanceBranding1685628973231();
|
|
8121
8251
|
await mig.up(queryRunner);
|
|
8122
|
-
|
|
8252
|
+
debug17("Migration statements executed");
|
|
8123
8253
|
return;
|
|
8124
8254
|
}
|
|
8125
8255
|
default:
|
|
@@ -8127,23 +8257,23 @@ var CreateIssuanceBranding1659463079429 = class {
|
|
|
8127
8257
|
}
|
|
8128
8258
|
}
|
|
8129
8259
|
async down(queryRunner) {
|
|
8130
|
-
|
|
8260
|
+
debug17("migration: reverting issuance branding tables");
|
|
8131
8261
|
const dbType = queryRunner.connection.driver.options.type;
|
|
8132
8262
|
switch (dbType) {
|
|
8133
8263
|
case "postgres": {
|
|
8134
|
-
|
|
8264
|
+
debug17("using postgres migration file");
|
|
8135
8265
|
const mig = new CreateIssuanceBranding1685628974232();
|
|
8136
8266
|
await mig.down(queryRunner);
|
|
8137
|
-
|
|
8267
|
+
debug17("Migration statements executed");
|
|
8138
8268
|
return;
|
|
8139
8269
|
}
|
|
8140
8270
|
case "sqlite":
|
|
8141
8271
|
case "expo":
|
|
8142
8272
|
case "react-native": {
|
|
8143
|
-
|
|
8273
|
+
debug17("using sqlite/react-native migration file");
|
|
8144
8274
|
const mig = new CreateIssuanceBranding1685628973231();
|
|
8145
8275
|
await mig.down(queryRunner);
|
|
8146
|
-
|
|
8276
|
+
debug17("Migration statements executed");
|
|
8147
8277
|
return;
|
|
8148
8278
|
}
|
|
8149
8279
|
default:
|
|
@@ -8153,7 +8283,7 @@ var CreateIssuanceBranding1659463079429 = class {
|
|
|
8153
8283
|
};
|
|
8154
8284
|
|
|
8155
8285
|
// src/migrations/generic/3-CreateContacts.ts
|
|
8156
|
-
var
|
|
8286
|
+
var import_debug18 = __toESM(require("debug"), 1);
|
|
8157
8287
|
|
|
8158
8288
|
// src/migrations/postgres/1690925872592-CreateContacts.ts
|
|
8159
8289
|
var import_ssi_sdk33 = require("@sphereon/ssi-sdk.core");
|
|
@@ -8374,30 +8504,30 @@ var CreateContacts1690925872693 = class {
|
|
|
8374
8504
|
};
|
|
8375
8505
|
|
|
8376
8506
|
// src/migrations/generic/3-CreateContacts.ts
|
|
8377
|
-
var
|
|
8507
|
+
var debug18 = (0, import_debug18.default)("sphereon:ssi-sdk:migrations");
|
|
8378
8508
|
var CreateContacts1690925872318 = class {
|
|
8379
8509
|
static {
|
|
8380
8510
|
__name(this, "CreateContacts1690925872318");
|
|
8381
8511
|
}
|
|
8382
8512
|
name = "CreateContacts1690925872318";
|
|
8383
8513
|
async up(queryRunner) {
|
|
8384
|
-
|
|
8514
|
+
debug18("migration: creating contacts tables");
|
|
8385
8515
|
const dbType = queryRunner.connection.driver.options.type;
|
|
8386
8516
|
switch (dbType) {
|
|
8387
8517
|
case "postgres": {
|
|
8388
|
-
|
|
8518
|
+
debug18("using postgres migration file");
|
|
8389
8519
|
const mig = new CreateContacts1690925872592();
|
|
8390
8520
|
await mig.up(queryRunner);
|
|
8391
|
-
|
|
8521
|
+
debug18("Migration statements executed");
|
|
8392
8522
|
return;
|
|
8393
8523
|
}
|
|
8394
8524
|
case "sqlite":
|
|
8395
8525
|
case "expo":
|
|
8396
8526
|
case "react-native": {
|
|
8397
|
-
|
|
8527
|
+
debug18("using sqlite/react-native migration file");
|
|
8398
8528
|
const mig = new CreateContacts1690925872693();
|
|
8399
8529
|
await mig.up(queryRunner);
|
|
8400
|
-
|
|
8530
|
+
debug18("Migration statements executed");
|
|
8401
8531
|
return;
|
|
8402
8532
|
}
|
|
8403
8533
|
default:
|
|
@@ -8405,23 +8535,23 @@ var CreateContacts1690925872318 = class {
|
|
|
8405
8535
|
}
|
|
8406
8536
|
}
|
|
8407
8537
|
async down(queryRunner) {
|
|
8408
|
-
|
|
8538
|
+
debug18("migration: reverting contacts tables");
|
|
8409
8539
|
const dbType = queryRunner.connection.driver.options.type;
|
|
8410
8540
|
switch (dbType) {
|
|
8411
8541
|
case "postgres": {
|
|
8412
|
-
|
|
8542
|
+
debug18("using postgres migration file");
|
|
8413
8543
|
const mig = new CreateContacts1690925872592();
|
|
8414
8544
|
await mig.down(queryRunner);
|
|
8415
|
-
|
|
8545
|
+
debug18("Migration statements executed");
|
|
8416
8546
|
return;
|
|
8417
8547
|
}
|
|
8418
8548
|
case "sqlite":
|
|
8419
8549
|
case "expo":
|
|
8420
8550
|
case "react-native": {
|
|
8421
|
-
|
|
8551
|
+
debug18("using sqlite/react-native migration file");
|
|
8422
8552
|
const mig = new CreateContacts1690925872693();
|
|
8423
8553
|
await mig.down(queryRunner);
|
|
8424
|
-
|
|
8554
|
+
debug18("Migration statements executed");
|
|
8425
8555
|
return;
|
|
8426
8556
|
}
|
|
8427
8557
|
default:
|
|
@@ -8431,7 +8561,7 @@ var CreateContacts1690925872318 = class {
|
|
|
8431
8561
|
};
|
|
8432
8562
|
|
|
8433
8563
|
// src/migrations/generic/4-CreateStatusList.ts
|
|
8434
|
-
var
|
|
8564
|
+
var import_debug19 = __toESM(require("debug"), 1);
|
|
8435
8565
|
|
|
8436
8566
|
// src/migrations/postgres/1693866470001-CreateStatusList.ts
|
|
8437
8567
|
var CreateStatusList1693866470001 = class {
|
|
@@ -8637,53 +8767,53 @@ var UpdateStatusList1737110469000 = class {
|
|
|
8637
8767
|
};
|
|
8638
8768
|
|
|
8639
8769
|
// src/migrations/generic/4-CreateStatusList.ts
|
|
8640
|
-
var
|
|
8770
|
+
var debug19 = (0, import_debug19.default)("sphereon:ssi-sdk:migrations");
|
|
8641
8771
|
var CreateStatusList1693866470000 = class {
|
|
8642
8772
|
static {
|
|
8643
8773
|
__name(this, "CreateStatusList1693866470000");
|
|
8644
8774
|
}
|
|
8645
8775
|
name = "CreateStatusList1693866470000";
|
|
8646
8776
|
async up(queryRunner) {
|
|
8647
|
-
|
|
8777
|
+
debug19("migration: creating issuance branding tables");
|
|
8648
8778
|
const dbType = queryRunner.connection.driver.options.type;
|
|
8649
8779
|
if (dbType === "postgres") {
|
|
8650
|
-
|
|
8780
|
+
debug19("using postgres migration files");
|
|
8651
8781
|
const createMig = new CreateStatusList1693866470001();
|
|
8652
8782
|
await createMig.up(queryRunner);
|
|
8653
8783
|
const updateMig = new UpdateStatusList1737110469001();
|
|
8654
8784
|
const up = await updateMig.up(queryRunner);
|
|
8655
|
-
|
|
8785
|
+
debug19("Migration statements executed");
|
|
8656
8786
|
return up;
|
|
8657
8787
|
} else if (dbType === "sqlite" || dbType === "react-native" || dbType === "expo") {
|
|
8658
|
-
|
|
8788
|
+
debug19("using sqlite/react-native migration files");
|
|
8659
8789
|
const createMig = new CreateStatusList1693866470002();
|
|
8660
8790
|
await createMig.up(queryRunner);
|
|
8661
8791
|
const updateMig = new UpdateStatusList1737110469000();
|
|
8662
8792
|
const up = await updateMig.up(queryRunner);
|
|
8663
|
-
|
|
8793
|
+
debug19("Migration statements executed");
|
|
8664
8794
|
return up;
|
|
8665
8795
|
} else {
|
|
8666
8796
|
return Promise.reject(`Migrations are currently only supported for sqlite, react-native, expo and postgres. Was ${dbType}. Please run your database without migrations and with 'migrationsRun: false' and 'synchronize: true' for now`);
|
|
8667
8797
|
}
|
|
8668
8798
|
}
|
|
8669
8799
|
async down(queryRunner) {
|
|
8670
|
-
|
|
8800
|
+
debug19("migration: reverting issuance branding tables");
|
|
8671
8801
|
const dbType = queryRunner.connection.driver.options.type;
|
|
8672
8802
|
if (dbType === "postgres") {
|
|
8673
|
-
|
|
8803
|
+
debug19("using postgres migration files");
|
|
8674
8804
|
const updateMig = new UpdateStatusList1737110469001();
|
|
8675
8805
|
await updateMig.down(queryRunner);
|
|
8676
8806
|
const createMig = new CreateStatusList1693866470001();
|
|
8677
8807
|
const down = await createMig.down(queryRunner);
|
|
8678
|
-
|
|
8808
|
+
debug19("Migration statements executed");
|
|
8679
8809
|
return down;
|
|
8680
8810
|
} else if (dbType === "sqlite" || dbType === "react-native" || dbType === "expo") {
|
|
8681
|
-
|
|
8811
|
+
debug19("using sqlite/react-native migration files");
|
|
8682
8812
|
const updateMig = new UpdateStatusList1737110469000();
|
|
8683
8813
|
await updateMig.down(queryRunner);
|
|
8684
8814
|
const createMig = new CreateStatusList1693866470002();
|
|
8685
8815
|
const down = await createMig.down(queryRunner);
|
|
8686
|
-
|
|
8816
|
+
debug19("Migration statements executed");
|
|
8687
8817
|
return down;
|
|
8688
8818
|
} else {
|
|
8689
8819
|
return Promise.reject(`Migrations are currently only supported for sqlite, react-native, expo and postgres. Was ${dbType}. Please run your database without migrations and with 'migrationsRun: false' and 'synchronize: true' for now`);
|
|
@@ -8692,7 +8822,7 @@ var CreateStatusList1693866470000 = class {
|
|
|
8692
8822
|
};
|
|
8693
8823
|
|
|
8694
8824
|
// src/migrations/generic/5-CreateAuditEvents.ts
|
|
8695
|
-
var
|
|
8825
|
+
var import_debug20 = __toESM(require("debug"), 1);
|
|
8696
8826
|
|
|
8697
8827
|
// src/migrations/postgres/1701634812183-CreateAuditEvents.ts
|
|
8698
8828
|
var CreateAuditEvents1701634812183 = class {
|
|
@@ -8791,30 +8921,30 @@ var CreateAuditEvents1701634819487 = class {
|
|
|
8791
8921
|
};
|
|
8792
8922
|
|
|
8793
8923
|
// src/migrations/generic/5-CreateAuditEvents.ts
|
|
8794
|
-
var
|
|
8924
|
+
var debug20 = (0, import_debug20.default)("sphereon:ssi-sdk:migrations");
|
|
8795
8925
|
var CreateAuditEvents1701635835330 = class {
|
|
8796
8926
|
static {
|
|
8797
8927
|
__name(this, "CreateAuditEvents1701635835330");
|
|
8798
8928
|
}
|
|
8799
8929
|
name = "CreateAuditEvents1701635835330";
|
|
8800
8930
|
async up(queryRunner) {
|
|
8801
|
-
|
|
8931
|
+
debug20("migration: creating audit events tables");
|
|
8802
8932
|
const dbType = queryRunner.connection.driver.options.type;
|
|
8803
8933
|
switch (dbType) {
|
|
8804
8934
|
case "postgres": {
|
|
8805
|
-
|
|
8935
|
+
debug20("using postgres migration file");
|
|
8806
8936
|
const mig = new CreateAuditEvents1701634812183();
|
|
8807
8937
|
await mig.up(queryRunner);
|
|
8808
|
-
|
|
8938
|
+
debug20("Migration statements executed");
|
|
8809
8939
|
return;
|
|
8810
8940
|
}
|
|
8811
8941
|
case "sqlite":
|
|
8812
8942
|
case "expo":
|
|
8813
8943
|
case "react-native": {
|
|
8814
|
-
|
|
8944
|
+
debug20("using sqlite/react-native migration file");
|
|
8815
8945
|
const mig = new CreateAuditEvents1701634819487();
|
|
8816
8946
|
await mig.up(queryRunner);
|
|
8817
|
-
|
|
8947
|
+
debug20("Migration statements executed");
|
|
8818
8948
|
return;
|
|
8819
8949
|
}
|
|
8820
8950
|
default:
|
|
@@ -8822,23 +8952,23 @@ var CreateAuditEvents1701635835330 = class {
|
|
|
8822
8952
|
}
|
|
8823
8953
|
}
|
|
8824
8954
|
async down(queryRunner) {
|
|
8825
|
-
|
|
8955
|
+
debug20("migration: reverting audit events tables");
|
|
8826
8956
|
const dbType = queryRunner.connection.driver.options.type;
|
|
8827
8957
|
switch (dbType) {
|
|
8828
8958
|
case "postgres": {
|
|
8829
|
-
|
|
8959
|
+
debug20("using postgres migration file");
|
|
8830
8960
|
const mig = new CreateAuditEvents1701634812183();
|
|
8831
8961
|
await mig.down(queryRunner);
|
|
8832
|
-
|
|
8962
|
+
debug20("Migration statements executed");
|
|
8833
8963
|
return;
|
|
8834
8964
|
}
|
|
8835
8965
|
case "sqlite":
|
|
8836
8966
|
case "expo":
|
|
8837
8967
|
case "react-native": {
|
|
8838
|
-
|
|
8968
|
+
debug20("using sqlite/react-native migration file");
|
|
8839
8969
|
const mig = new CreateAuditEvents1701634819487();
|
|
8840
8970
|
await mig.down(queryRunner);
|
|
8841
|
-
|
|
8971
|
+
debug20("Migration statements executed");
|
|
8842
8972
|
return;
|
|
8843
8973
|
}
|
|
8844
8974
|
default:
|
|
@@ -8848,7 +8978,7 @@ var CreateAuditEvents1701635835330 = class {
|
|
|
8848
8978
|
};
|
|
8849
8979
|
|
|
8850
8980
|
// src/migrations/generic/6-CreateDigitalCredential.ts
|
|
8851
|
-
var
|
|
8981
|
+
var import_debug21 = __toESM(require("debug"), 1);
|
|
8852
8982
|
|
|
8853
8983
|
// src/migrations/postgres/1708525189001-CreateDigitalCredential.ts
|
|
8854
8984
|
var CreateDigitalCredential1708525189001 = class {
|
|
@@ -8956,30 +9086,30 @@ var CreateDigitalCredential1708525189002 = class {
|
|
|
8956
9086
|
};
|
|
8957
9087
|
|
|
8958
9088
|
// src/migrations/generic/6-CreateDigitalCredential.ts
|
|
8959
|
-
var
|
|
9089
|
+
var debug21 = (0, import_debug21.default)("sphereon:ssi-sdk:migrations");
|
|
8960
9090
|
var CreateDigitalCredential1708525189000 = class {
|
|
8961
9091
|
static {
|
|
8962
9092
|
__name(this, "CreateDigitalCredential1708525189000");
|
|
8963
9093
|
}
|
|
8964
9094
|
name = "CreateDigitalCredential1708525189000";
|
|
8965
9095
|
async up(queryRunner) {
|
|
8966
|
-
|
|
9096
|
+
debug21("migration: creating DigitalCredential tables");
|
|
8967
9097
|
const dbType = queryRunner.connection.driver.options.type;
|
|
8968
9098
|
switch (dbType) {
|
|
8969
9099
|
case "postgres": {
|
|
8970
|
-
|
|
9100
|
+
debug21("using postgres migration file for DigitalCredential");
|
|
8971
9101
|
const mig = new CreateDigitalCredential1708525189001();
|
|
8972
9102
|
await mig.up(queryRunner);
|
|
8973
|
-
|
|
9103
|
+
debug21("Postgres Migration statements for DigitalCredential executed");
|
|
8974
9104
|
return;
|
|
8975
9105
|
}
|
|
8976
9106
|
case "sqlite":
|
|
8977
9107
|
case "expo":
|
|
8978
9108
|
case "react-native": {
|
|
8979
|
-
|
|
9109
|
+
debug21("using sqlite/react-native migration file for DigitalCredential");
|
|
8980
9110
|
const mig = new CreateDigitalCredential1708525189002();
|
|
8981
9111
|
await mig.up(queryRunner);
|
|
8982
|
-
|
|
9112
|
+
debug21("SQLite Migration statements for DigitalCredential executed");
|
|
8983
9113
|
return;
|
|
8984
9114
|
}
|
|
8985
9115
|
default:
|
|
@@ -8987,23 +9117,23 @@ var CreateDigitalCredential1708525189000 = class {
|
|
|
8987
9117
|
}
|
|
8988
9118
|
}
|
|
8989
9119
|
async down(queryRunner) {
|
|
8990
|
-
|
|
9120
|
+
debug21("migration: reverting DigitalCredential tables");
|
|
8991
9121
|
const dbType = queryRunner.connection.driver.options.type;
|
|
8992
9122
|
switch (dbType) {
|
|
8993
9123
|
case "postgres": {
|
|
8994
|
-
|
|
9124
|
+
debug21("using postgres migration file for DigitalCredential");
|
|
8995
9125
|
const mig = new CreateDigitalCredential1708525189001();
|
|
8996
9126
|
await mig.down(queryRunner);
|
|
8997
|
-
|
|
9127
|
+
debug21("Postgres Migration statements for DigitalCredential reverted");
|
|
8998
9128
|
return;
|
|
8999
9129
|
}
|
|
9000
9130
|
case "sqlite":
|
|
9001
9131
|
case "expo":
|
|
9002
9132
|
case "react-native": {
|
|
9003
|
-
|
|
9133
|
+
debug21("using sqlite/react-native migration file for DigitalCredential");
|
|
9004
9134
|
const mig = new CreateDigitalCredential1708525189002();
|
|
9005
9135
|
await mig.down(queryRunner);
|
|
9006
|
-
|
|
9136
|
+
debug21("SQLite Migration statements for DigitalCredential reverted");
|
|
9007
9137
|
return;
|
|
9008
9138
|
}
|
|
9009
9139
|
default:
|
|
@@ -9013,7 +9143,7 @@ var CreateDigitalCredential1708525189000 = class {
|
|
|
9013
9143
|
};
|
|
9014
9144
|
|
|
9015
9145
|
// src/migrations/generic/7-CreateMachineStateStore.ts
|
|
9016
|
-
var
|
|
9146
|
+
var import_debug22 = __toESM(require("debug"), 1);
|
|
9017
9147
|
|
|
9018
9148
|
// src/migrations/postgres/1708797018115-CreateMachineStateStore.ts
|
|
9019
9149
|
var CreateMachineStateStore1708797018115 = class {
|
|
@@ -9075,30 +9205,30 @@ var CreateMachineStateStore1708796002272 = class {
|
|
|
9075
9205
|
};
|
|
9076
9206
|
|
|
9077
9207
|
// src/migrations/generic/7-CreateMachineStateStore.ts
|
|
9078
|
-
var
|
|
9208
|
+
var debug22 = (0, import_debug22.default)("sphereon:ssi-sdk:migrations");
|
|
9079
9209
|
var CreateMachineStateStore1708098041262 = class {
|
|
9080
9210
|
static {
|
|
9081
9211
|
__name(this, "CreateMachineStateStore1708098041262");
|
|
9082
9212
|
}
|
|
9083
9213
|
name = "CreateMachineStateStore1708098041262";
|
|
9084
9214
|
async up(queryRunner) {
|
|
9085
|
-
|
|
9215
|
+
debug22("migration: creating machine state tables");
|
|
9086
9216
|
const dbType = queryRunner.connection.driver.options.type;
|
|
9087
9217
|
switch (dbType) {
|
|
9088
9218
|
case "postgres": {
|
|
9089
|
-
|
|
9219
|
+
debug22("using postgres migration file");
|
|
9090
9220
|
const mig = new CreateMachineStateStore1708797018115();
|
|
9091
9221
|
await mig.up(queryRunner);
|
|
9092
|
-
|
|
9222
|
+
debug22("Migration statements executed");
|
|
9093
9223
|
return;
|
|
9094
9224
|
}
|
|
9095
9225
|
case "sqlite":
|
|
9096
9226
|
case "expo":
|
|
9097
9227
|
case "react-native": {
|
|
9098
|
-
|
|
9228
|
+
debug22("using sqlite/react-native migration file");
|
|
9099
9229
|
const mig = new CreateMachineStateStore1708796002272();
|
|
9100
9230
|
await mig.up(queryRunner);
|
|
9101
|
-
|
|
9231
|
+
debug22("Migration statements executed");
|
|
9102
9232
|
return;
|
|
9103
9233
|
}
|
|
9104
9234
|
default:
|
|
@@ -9106,23 +9236,23 @@ var CreateMachineStateStore1708098041262 = class {
|
|
|
9106
9236
|
}
|
|
9107
9237
|
}
|
|
9108
9238
|
async down(queryRunner) {
|
|
9109
|
-
|
|
9239
|
+
debug22("migration: reverting machine state tables");
|
|
9110
9240
|
const dbType = queryRunner.connection.driver.options.type;
|
|
9111
9241
|
switch (dbType) {
|
|
9112
9242
|
case "postgres": {
|
|
9113
|
-
|
|
9243
|
+
debug22("using postgres migration file");
|
|
9114
9244
|
const mig = new CreateMachineStateStore1708797018115();
|
|
9115
9245
|
await mig.down(queryRunner);
|
|
9116
|
-
|
|
9246
|
+
debug22("Migration statements executed");
|
|
9117
9247
|
return;
|
|
9118
9248
|
}
|
|
9119
9249
|
case "sqlite":
|
|
9120
9250
|
case "expo":
|
|
9121
9251
|
case "react-native": {
|
|
9122
|
-
|
|
9252
|
+
debug22("using sqlite/react-native migration file");
|
|
9123
9253
|
const mig = new CreateMachineStateStore1708796002272();
|
|
9124
9254
|
await mig.down(queryRunner);
|
|
9125
|
-
|
|
9255
|
+
debug22("Migration statements executed");
|
|
9126
9256
|
return;
|
|
9127
9257
|
}
|
|
9128
9258
|
default:
|
|
@@ -9132,7 +9262,7 @@ var CreateMachineStateStore1708098041262 = class {
|
|
|
9132
9262
|
};
|
|
9133
9263
|
|
|
9134
9264
|
// src/migrations/generic/8-CreateContacts.ts
|
|
9135
|
-
var
|
|
9265
|
+
var import_debug23 = __toESM(require("debug"), 1);
|
|
9136
9266
|
|
|
9137
9267
|
// src/migrations/postgres/1710438363001-CreateContacts.ts
|
|
9138
9268
|
var CreateContacts1710438363001 = class {
|
|
@@ -9246,30 +9376,30 @@ var CreateContacts1710438363002 = class {
|
|
|
9246
9376
|
};
|
|
9247
9377
|
|
|
9248
9378
|
// src/migrations/generic/8-CreateContacts.ts
|
|
9249
|
-
var
|
|
9379
|
+
var debug23 = (0, import_debug23.default)("sphereon:ssi-sdk:migrations");
|
|
9250
9380
|
var CreateContacts1708525189000 = class {
|
|
9251
9381
|
static {
|
|
9252
9382
|
__name(this, "CreateContacts1708525189000");
|
|
9253
9383
|
}
|
|
9254
9384
|
name = "CreateContacts1708525189000";
|
|
9255
9385
|
async up(queryRunner) {
|
|
9256
|
-
|
|
9386
|
+
debug23("migration: updating contact tables");
|
|
9257
9387
|
const dbType = queryRunner.connection.driver.options.type;
|
|
9258
9388
|
switch (dbType) {
|
|
9259
9389
|
case "postgres": {
|
|
9260
|
-
|
|
9390
|
+
debug23("using postgres migration file");
|
|
9261
9391
|
const mig = new CreateContacts1710438363001();
|
|
9262
9392
|
await mig.up(queryRunner);
|
|
9263
|
-
|
|
9393
|
+
debug23("Migration statements executed");
|
|
9264
9394
|
return;
|
|
9265
9395
|
}
|
|
9266
9396
|
case "sqlite":
|
|
9267
9397
|
case "expo":
|
|
9268
9398
|
case "react-native": {
|
|
9269
|
-
|
|
9399
|
+
debug23("using sqlite/react-native migration file");
|
|
9270
9400
|
const mig = new CreateContacts1710438363002();
|
|
9271
9401
|
await mig.up(queryRunner);
|
|
9272
|
-
|
|
9402
|
+
debug23("Migration statements executed");
|
|
9273
9403
|
return;
|
|
9274
9404
|
}
|
|
9275
9405
|
default:
|
|
@@ -9277,23 +9407,23 @@ var CreateContacts1708525189000 = class {
|
|
|
9277
9407
|
}
|
|
9278
9408
|
}
|
|
9279
9409
|
async down(queryRunner) {
|
|
9280
|
-
|
|
9410
|
+
debug23("migration: reverting machine state tables");
|
|
9281
9411
|
const dbType = queryRunner.connection.driver.options.type;
|
|
9282
9412
|
switch (dbType) {
|
|
9283
9413
|
case "postgres": {
|
|
9284
|
-
|
|
9414
|
+
debug23("using postgres migration file");
|
|
9285
9415
|
const mig = new CreateContacts1710438363001();
|
|
9286
9416
|
await mig.down(queryRunner);
|
|
9287
|
-
|
|
9417
|
+
debug23("Migration statements executed");
|
|
9288
9418
|
return;
|
|
9289
9419
|
}
|
|
9290
9420
|
case "sqlite":
|
|
9291
9421
|
case "expo":
|
|
9292
9422
|
case "react-native": {
|
|
9293
|
-
|
|
9423
|
+
debug23("using sqlite/react-native migration file");
|
|
9294
9424
|
const mig = new CreateContacts1710438363002();
|
|
9295
9425
|
await mig.down(queryRunner);
|
|
9296
|
-
|
|
9426
|
+
debug23("Migration statements executed");
|
|
9297
9427
|
return;
|
|
9298
9428
|
}
|
|
9299
9429
|
default:
|
|
@@ -9303,7 +9433,7 @@ var CreateContacts1708525189000 = class {
|
|
|
9303
9433
|
};
|
|
9304
9434
|
|
|
9305
9435
|
// src/migrations/generic/9-CreateContacts.ts
|
|
9306
|
-
var
|
|
9436
|
+
var import_debug24 = __toESM(require("debug"), 1);
|
|
9307
9437
|
|
|
9308
9438
|
// src/migrations/postgres/1715761125001-CreateContacts.ts
|
|
9309
9439
|
var CreateContacts1715761125001 = class {
|
|
@@ -9415,30 +9545,30 @@ var CreateContacts1715761125002 = class {
|
|
|
9415
9545
|
};
|
|
9416
9546
|
|
|
9417
9547
|
// src/migrations/generic/9-CreateContacts.ts
|
|
9418
|
-
var
|
|
9548
|
+
var debug24 = (0, import_debug24.default)("sphereon:ssi-sdk:migrations");
|
|
9419
9549
|
var CreateContacts1715761125000 = class {
|
|
9420
9550
|
static {
|
|
9421
9551
|
__name(this, "CreateContacts1715761125000");
|
|
9422
9552
|
}
|
|
9423
9553
|
name = "CreateContacts1715761125000";
|
|
9424
9554
|
async up(queryRunner) {
|
|
9425
|
-
|
|
9555
|
+
debug24("migration: updating contact tables");
|
|
9426
9556
|
const dbType = queryRunner.connection.driver.options.type;
|
|
9427
9557
|
switch (dbType) {
|
|
9428
9558
|
case "postgres": {
|
|
9429
|
-
|
|
9559
|
+
debug24("using postgres migration file");
|
|
9430
9560
|
const mig = new CreateContacts1715761125001();
|
|
9431
9561
|
await mig.up(queryRunner);
|
|
9432
|
-
|
|
9562
|
+
debug24("Migration statements executed");
|
|
9433
9563
|
return;
|
|
9434
9564
|
}
|
|
9435
9565
|
case "sqlite":
|
|
9436
9566
|
case "expo":
|
|
9437
9567
|
case "react-native": {
|
|
9438
|
-
|
|
9568
|
+
debug24("using sqlite/react-native migration file");
|
|
9439
9569
|
const mig = new CreateContacts1715761125002();
|
|
9440
9570
|
await mig.up(queryRunner);
|
|
9441
|
-
|
|
9571
|
+
debug24("Migration statements executed");
|
|
9442
9572
|
return;
|
|
9443
9573
|
}
|
|
9444
9574
|
default:
|
|
@@ -9446,23 +9576,23 @@ var CreateContacts1715761125000 = class {
|
|
|
9446
9576
|
}
|
|
9447
9577
|
}
|
|
9448
9578
|
async down(queryRunner) {
|
|
9449
|
-
|
|
9579
|
+
debug24("migration: reverting machine state tables");
|
|
9450
9580
|
const dbType = queryRunner.connection.driver.options.type;
|
|
9451
9581
|
switch (dbType) {
|
|
9452
9582
|
case "postgres": {
|
|
9453
|
-
|
|
9583
|
+
debug24("using postgres migration file");
|
|
9454
9584
|
const mig = new CreateContacts1715761125001();
|
|
9455
9585
|
await mig.down(queryRunner);
|
|
9456
|
-
|
|
9586
|
+
debug24("Migration statements executed");
|
|
9457
9587
|
return;
|
|
9458
9588
|
}
|
|
9459
9589
|
case "sqlite":
|
|
9460
9590
|
case "expo":
|
|
9461
9591
|
case "react-native": {
|
|
9462
|
-
|
|
9592
|
+
debug24("using sqlite/react-native migration file");
|
|
9463
9593
|
const mig = new CreateContacts1715761125002();
|
|
9464
9594
|
await mig.down(queryRunner);
|
|
9465
|
-
|
|
9595
|
+
debug24("Migration statements executed");
|
|
9466
9596
|
return;
|
|
9467
9597
|
}
|
|
9468
9598
|
default:
|
|
@@ -9501,6 +9631,9 @@ var DataStorePresentationDefinitionMigrations = [
|
|
|
9501
9631
|
CreatePresentationDefinitions1716533767523,
|
|
9502
9632
|
CreateDcqlQueryItem1726617600000
|
|
9503
9633
|
];
|
|
9634
|
+
var DataStoreServiceMigrations = [
|
|
9635
|
+
AddServiceMetadata1764000000000
|
|
9636
|
+
];
|
|
9504
9637
|
var DataStoreMigrations = [
|
|
9505
9638
|
...DataStoreContactMigrations,
|
|
9506
9639
|
...DataStoreIssuanceBrandingMigrations,
|
|
@@ -9508,7 +9641,12 @@ var DataStoreMigrations = [
|
|
|
9508
9641
|
...DataStoreEventLoggerMigrations,
|
|
9509
9642
|
...DataStoreDigitalCredentialMigrations,
|
|
9510
9643
|
...DataStoreMachineStateMigrations,
|
|
9511
|
-
...DataStorePresentationDefinitionMigrations
|
|
9644
|
+
...DataStorePresentationDefinitionMigrations,
|
|
9645
|
+
...DataStoreServiceMigrations
|
|
9646
|
+
];
|
|
9647
|
+
var DataStoreMigrationsWithVeramo = [
|
|
9648
|
+
...import_data_store.migrations,
|
|
9649
|
+
...DataStoreMigrations
|
|
9512
9650
|
];
|
|
9513
9651
|
|
|
9514
9652
|
// src/utils/digitalCredential/MappingUtils.ts
|
|
@@ -9739,4 +9877,8 @@ var DataStoreEntities = [
|
|
|
9739
9877
|
...DataStoreMachineStateEntities,
|
|
9740
9878
|
...DataStorePresentationDefinitionEntities
|
|
9741
9879
|
];
|
|
9880
|
+
var DataStoreEntitiesWithVeramo = [
|
|
9881
|
+
...import_data_store2.Entities,
|
|
9882
|
+
...DataStoreEntities
|
|
9883
|
+
];
|
|
9742
9884
|
//# sourceMappingURL=index.cjs.map
|