@sphereon/ssi-sdk.data-store 0.36.1-next.129 → 0.36.1-next.150
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 +391 -102
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +13 -2
- package/dist/index.d.ts +13 -2
- package/dist/index.js +393 -102
- 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/contact/ContactStore.ts +37 -2
- package/src/entities/contact/OpenIdConfigEntity.ts +2 -2
- package/src/index.ts +12 -0
- package/src/migrations/generic/15-AddServiceMetadata.ts +66 -0
- package/src/migrations/generic/16-MakeOpenIdClientSecretNullable.ts +62 -0
- package/src/migrations/generic/index.ts +17 -0
- package/src/migrations/index.ts +4 -0
- package/src/migrations/postgres/1764000000001-AddServiceMetadata.ts +44 -0
- package/src/migrations/postgres/1767000000001-MakeOpenIdClientSecretNullable.ts +32 -0
- package/src/migrations/sqlite/1764000000002-AddServiceMetadata.ts +41 -0
- package/src/migrations/sqlite/1767000000002-MakeOpenIdClientSecretNullable.ts +22 -0
- package/src/utils/presentationDefinition/MappingUtils.ts +5 -2
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,
|
|
@@ -153,6 +158,7 @@ __export(index_exports, {
|
|
|
153
158
|
textAttributesEntityFrom: () => textAttributesEntityFrom
|
|
154
159
|
});
|
|
155
160
|
module.exports = __toCommonJS(index_exports);
|
|
161
|
+
var import_data_store2 = require("@veramo/data-store");
|
|
156
162
|
|
|
157
163
|
// src/entities/contact/BaseConfigEntity.ts
|
|
158
164
|
var import_typeorm12 = require("typeorm");
|
|
@@ -1894,7 +1900,7 @@ _ts_decorate16([
|
|
|
1894
1900
|
(0, import_typeorm15.Column)("varchar", {
|
|
1895
1901
|
name: "client_secret",
|
|
1896
1902
|
length: 255,
|
|
1897
|
-
nullable:
|
|
1903
|
+
nullable: true
|
|
1898
1904
|
}),
|
|
1899
1905
|
_ts_metadata15("design:type", String)
|
|
1900
1906
|
], OpenIdConfigEntity.prototype, "clientSecret", void 0);
|
|
@@ -5108,10 +5114,54 @@ var ContactStore = class extends import_ssi_sdk25.AbstractContactStore {
|
|
|
5108
5114
|
return Promise.reject(Error(`Connection type ${identity.connection.type}, does not match for provided config`));
|
|
5109
5115
|
}
|
|
5110
5116
|
}
|
|
5111
|
-
const
|
|
5117
|
+
const identityRepository = (await this.dbConnection).getRepository(IdentityEntity);
|
|
5118
|
+
const correlationIdentifierRepository = (await this.dbConnection).getRepository(CorrelationIdentifierEntity);
|
|
5119
|
+
const existingCorrelationIdentifier = await correlationIdentifierRepository.findOne({
|
|
5120
|
+
where: {
|
|
5121
|
+
correlationId: identity.identifier.correlationId
|
|
5122
|
+
}
|
|
5123
|
+
});
|
|
5124
|
+
if (existingCorrelationIdentifier) {
|
|
5125
|
+
const existingIdentity = await identityRepository.findOne({
|
|
5126
|
+
where: {
|
|
5127
|
+
identifier: {
|
|
5128
|
+
id: existingCorrelationIdentifier.id
|
|
5129
|
+
}
|
|
5130
|
+
}
|
|
5131
|
+
});
|
|
5132
|
+
if (existingIdentity) {
|
|
5133
|
+
debug("Identity with same correlationId already exists, returning existing identity", identity.identifier.correlationId);
|
|
5134
|
+
return identityFrom(existingIdentity);
|
|
5135
|
+
}
|
|
5136
|
+
}
|
|
5137
|
+
const existingAlias = await identityRepository.findOne({
|
|
5138
|
+
where: {
|
|
5139
|
+
alias: identity.alias
|
|
5140
|
+
}
|
|
5141
|
+
});
|
|
5142
|
+
let uniqueAlias = identity.alias;
|
|
5143
|
+
if (existingAlias) {
|
|
5144
|
+
let counter = 1;
|
|
5145
|
+
while (await identityRepository.findOne({
|
|
5146
|
+
where: {
|
|
5147
|
+
alias: `${identity.alias}_${counter}`
|
|
5148
|
+
}
|
|
5149
|
+
})) {
|
|
5150
|
+
counter++;
|
|
5151
|
+
}
|
|
5152
|
+
uniqueAlias = `${identity.alias}_${counter}`;
|
|
5153
|
+
debug("Alias collision detected, using unique alias", {
|
|
5154
|
+
original: identity.alias,
|
|
5155
|
+
unique: uniqueAlias
|
|
5156
|
+
});
|
|
5157
|
+
}
|
|
5158
|
+
const identityEntity = identityEntityFrom({
|
|
5159
|
+
...identity,
|
|
5160
|
+
alias: uniqueAlias
|
|
5161
|
+
});
|
|
5112
5162
|
identityEntity.party = party;
|
|
5113
5163
|
debug("Adding identity", identity);
|
|
5114
|
-
const result = await
|
|
5164
|
+
const result = await identityRepository.save(identityEntity, {
|
|
5115
5165
|
transaction: true
|
|
5116
5166
|
});
|
|
5117
5167
|
return identityFrom(result);
|
|
@@ -7063,8 +7113,9 @@ var import_debug7 = __toESM(require("debug"), 1);
|
|
|
7063
7113
|
var import_typeorm40 = require("typeorm");
|
|
7064
7114
|
|
|
7065
7115
|
// src/utils/presentationDefinition/MappingUtils.ts
|
|
7066
|
-
var
|
|
7116
|
+
var blakejs = __toESM(require("blakejs"), 1);
|
|
7067
7117
|
var import_dcql = require("dcql");
|
|
7118
|
+
var blake = blakejs.default ?? blakejs;
|
|
7068
7119
|
var dcqlQueryItemFrom = /* @__PURE__ */ __name((entity) => {
|
|
7069
7120
|
const result = {
|
|
7070
7121
|
id: entity.id,
|
|
@@ -7097,7 +7148,7 @@ var dcqlQueryEntityItemFrom = /* @__PURE__ */ __name((item) => {
|
|
|
7097
7148
|
return entity;
|
|
7098
7149
|
}, "dcqlQueryEntityItemFrom");
|
|
7099
7150
|
function hashPayload(payload) {
|
|
7100
|
-
return
|
|
7151
|
+
return blake.blake2bHex(JSON.stringify(payload));
|
|
7101
7152
|
}
|
|
7102
7153
|
__name(hashPayload, "hashPayload");
|
|
7103
7154
|
function isPresentationDefinitionEqual(base, compare) {
|
|
@@ -7270,6 +7321,9 @@ var cleanFilter = /* @__PURE__ */ __name((filter) => {
|
|
|
7270
7321
|
});
|
|
7271
7322
|
}, "cleanFilter");
|
|
7272
7323
|
|
|
7324
|
+
// src/migrations/generic/index.ts
|
|
7325
|
+
var import_data_store = require("@veramo/data-store");
|
|
7326
|
+
|
|
7273
7327
|
// src/migrations/generic/1-CreateContacts.ts
|
|
7274
7328
|
var import_debug8 = __toESM(require("debug"), 1);
|
|
7275
7329
|
|
|
@@ -8468,32 +8522,254 @@ var AddBrandingState1766000000000 = class {
|
|
|
8468
8522
|
}
|
|
8469
8523
|
};
|
|
8470
8524
|
|
|
8471
|
-
// src/migrations/generic/
|
|
8525
|
+
// src/migrations/generic/15-AddServiceMetadata.ts
|
|
8526
|
+
var import_debug17 = __toESM(require("debug"), 1);
|
|
8527
|
+
|
|
8528
|
+
// src/migrations/postgres/1764000000001-AddServiceMetadata.ts
|
|
8472
8529
|
var import_debug15 = __toESM(require("debug"), 1);
|
|
8473
8530
|
var debug15 = (0, import_debug15.default)("sphereon:ssi-sdk:migrations");
|
|
8531
|
+
var AddServiceMetadata1764000000001 = class {
|
|
8532
|
+
static {
|
|
8533
|
+
__name(this, "AddServiceMetadata1764000000001");
|
|
8534
|
+
}
|
|
8535
|
+
name = "AddServiceMetadata1764000000001";
|
|
8536
|
+
async up(queryRunner) {
|
|
8537
|
+
const table = await queryRunner.getTable("service");
|
|
8538
|
+
if (!table) {
|
|
8539
|
+
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.");
|
|
8540
|
+
console.warn("[SSI-SDK Migration] AddServiceMetadata: Skipping - service table does not exist (Veramo DID Manager not in use)");
|
|
8541
|
+
return;
|
|
8542
|
+
}
|
|
8543
|
+
await queryRunner.query(`
|
|
8544
|
+
ALTER TABLE "service"
|
|
8545
|
+
ADD COLUMN IF NOT EXISTS "metadata" jsonb
|
|
8546
|
+
`);
|
|
8547
|
+
debug15("AddServiceMetadata: Added metadata column to service table");
|
|
8548
|
+
}
|
|
8549
|
+
async down(queryRunner) {
|
|
8550
|
+
const table = await queryRunner.getTable("service");
|
|
8551
|
+
if (!table) {
|
|
8552
|
+
return;
|
|
8553
|
+
}
|
|
8554
|
+
await queryRunner.query(`
|
|
8555
|
+
ALTER TABLE "service"
|
|
8556
|
+
DROP COLUMN IF EXISTS "metadata"
|
|
8557
|
+
`);
|
|
8558
|
+
}
|
|
8559
|
+
};
|
|
8560
|
+
|
|
8561
|
+
// src/migrations/sqlite/1764000000002-AddServiceMetadata.ts
|
|
8562
|
+
var import_debug16 = __toESM(require("debug"), 1);
|
|
8563
|
+
var debug16 = (0, import_debug16.default)("sphereon:ssi-sdk:migrations");
|
|
8564
|
+
var AddServiceMetadata1764000000002 = class {
|
|
8565
|
+
static {
|
|
8566
|
+
__name(this, "AddServiceMetadata1764000000002");
|
|
8567
|
+
}
|
|
8568
|
+
name = "AddServiceMetadata1764000000002";
|
|
8569
|
+
async up(queryRunner) {
|
|
8570
|
+
const table = await queryRunner.getTable("service");
|
|
8571
|
+
if (!table) {
|
|
8572
|
+
debug16("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.");
|
|
8573
|
+
console.warn("[SSI-SDK Migration] AddServiceMetadata: Skipping - service table does not exist (Veramo DID Manager not in use)");
|
|
8574
|
+
return;
|
|
8575
|
+
}
|
|
8576
|
+
const hasMetadataColumn = table.columns.some((col) => col.name === "metadata");
|
|
8577
|
+
if (!hasMetadataColumn) {
|
|
8578
|
+
await queryRunner.query(`
|
|
8579
|
+
ALTER TABLE "service"
|
|
8580
|
+
ADD COLUMN "metadata" text
|
|
8581
|
+
`);
|
|
8582
|
+
debug16("AddServiceMetadata: Added metadata column to service table");
|
|
8583
|
+
}
|
|
8584
|
+
}
|
|
8585
|
+
async down(queryRunner) {
|
|
8586
|
+
}
|
|
8587
|
+
};
|
|
8588
|
+
|
|
8589
|
+
// src/migrations/generic/15-AddServiceMetadata.ts
|
|
8590
|
+
var debug17 = (0, import_debug17.default)("sphereon:ssi-sdk:migrations");
|
|
8591
|
+
var AddServiceMetadata1764000000000 = class {
|
|
8592
|
+
static {
|
|
8593
|
+
__name(this, "AddServiceMetadata1764000000000");
|
|
8594
|
+
}
|
|
8595
|
+
name = "AddServiceMetadata1764000000000";
|
|
8596
|
+
async up(queryRunner) {
|
|
8597
|
+
debug17("migration: adding metadata column to service table");
|
|
8598
|
+
const dbType = queryRunner.connection.driver.options.type;
|
|
8599
|
+
switch (dbType) {
|
|
8600
|
+
case "postgres": {
|
|
8601
|
+
debug17("using postgres migration file for AddServiceMetadata");
|
|
8602
|
+
const mig = new AddServiceMetadata1764000000001();
|
|
8603
|
+
await mig.up(queryRunner);
|
|
8604
|
+
debug17("Postgres migration statements for AddServiceMetadata executed");
|
|
8605
|
+
return;
|
|
8606
|
+
}
|
|
8607
|
+
case "sqlite":
|
|
8608
|
+
case "expo":
|
|
8609
|
+
case "react-native": {
|
|
8610
|
+
debug17("using sqlite/react-native migration file for AddServiceMetadata");
|
|
8611
|
+
const mig = new AddServiceMetadata1764000000002();
|
|
8612
|
+
await mig.up(queryRunner);
|
|
8613
|
+
debug17("SQLite migration statements for AddServiceMetadata executed");
|
|
8614
|
+
return;
|
|
8615
|
+
}
|
|
8616
|
+
default:
|
|
8617
|
+
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`);
|
|
8618
|
+
}
|
|
8619
|
+
}
|
|
8620
|
+
async down(queryRunner) {
|
|
8621
|
+
debug17("migration: reverting metadata column from service table");
|
|
8622
|
+
const dbType = queryRunner.connection.driver.options.type;
|
|
8623
|
+
switch (dbType) {
|
|
8624
|
+
case "postgres": {
|
|
8625
|
+
debug17("using postgres migration file for AddServiceMetadata");
|
|
8626
|
+
const mig = new AddServiceMetadata1764000000001();
|
|
8627
|
+
await mig.down(queryRunner);
|
|
8628
|
+
debug17("Postgres migration statements for AddServiceMetadata reverted");
|
|
8629
|
+
return;
|
|
8630
|
+
}
|
|
8631
|
+
case "sqlite":
|
|
8632
|
+
case "expo":
|
|
8633
|
+
case "react-native": {
|
|
8634
|
+
debug17("using sqlite/react-native migration file for AddServiceMetadata");
|
|
8635
|
+
const mig = new AddServiceMetadata1764000000002();
|
|
8636
|
+
await mig.down(queryRunner);
|
|
8637
|
+
debug17("SQLite migration statements for AddServiceMetadata reverted");
|
|
8638
|
+
return;
|
|
8639
|
+
}
|
|
8640
|
+
default:
|
|
8641
|
+
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`);
|
|
8642
|
+
}
|
|
8643
|
+
}
|
|
8644
|
+
};
|
|
8645
|
+
|
|
8646
|
+
// src/migrations/generic/16-MakeOpenIdClientSecretNullable.ts
|
|
8647
|
+
var import_debug20 = __toESM(require("debug"), 1);
|
|
8648
|
+
|
|
8649
|
+
// src/migrations/postgres/1767000000001-MakeOpenIdClientSecretNullable.ts
|
|
8650
|
+
var import_debug18 = __toESM(require("debug"), 1);
|
|
8651
|
+
var debug18 = (0, import_debug18.default)("sphereon:ssi-sdk:migrations");
|
|
8652
|
+
var MakeOpenIdClientSecretNullable1767000000001 = class {
|
|
8653
|
+
static {
|
|
8654
|
+
__name(this, "MakeOpenIdClientSecretNullable1767000000001");
|
|
8655
|
+
}
|
|
8656
|
+
name = "MakeOpenIdClientSecretNullable1767000000001";
|
|
8657
|
+
async up(queryRunner) {
|
|
8658
|
+
const table = await queryRunner.getTable("BaseConfig");
|
|
8659
|
+
if (!table) {
|
|
8660
|
+
debug18("MakeOpenIdClientSecretNullable: Skipping migration - BaseConfig table does not exist");
|
|
8661
|
+
return;
|
|
8662
|
+
}
|
|
8663
|
+
const column = table.columns.find((col) => col.name === "client_secret");
|
|
8664
|
+
if (column && !column.isNullable) {
|
|
8665
|
+
await queryRunner.query(`ALTER TABLE "BaseConfig" ALTER COLUMN "client_secret" DROP NOT NULL`);
|
|
8666
|
+
debug18("MakeOpenIdClientSecretNullable: Made client_secret nullable");
|
|
8667
|
+
}
|
|
8668
|
+
}
|
|
8669
|
+
async down(queryRunner) {
|
|
8670
|
+
const table = await queryRunner.getTable("BaseConfig");
|
|
8671
|
+
if (!table) {
|
|
8672
|
+
return;
|
|
8673
|
+
}
|
|
8674
|
+
await queryRunner.query(`UPDATE "BaseConfig" SET "client_secret" = '' WHERE "client_secret" IS NULL`);
|
|
8675
|
+
await queryRunner.query(`ALTER TABLE "BaseConfig" ALTER COLUMN "client_secret" SET NOT NULL`);
|
|
8676
|
+
}
|
|
8677
|
+
};
|
|
8678
|
+
|
|
8679
|
+
// src/migrations/sqlite/1767000000002-MakeOpenIdClientSecretNullable.ts
|
|
8680
|
+
var import_debug19 = __toESM(require("debug"), 1);
|
|
8681
|
+
var debug19 = (0, import_debug19.default)("sphereon:ssi-sdk:migrations");
|
|
8682
|
+
var MakeOpenIdClientSecretNullable1767000000002 = class {
|
|
8683
|
+
static {
|
|
8684
|
+
__name(this, "MakeOpenIdClientSecretNullable1767000000002");
|
|
8685
|
+
}
|
|
8686
|
+
name = "MakeOpenIdClientSecretNullable1767000000002";
|
|
8687
|
+
async up(queryRunner) {
|
|
8688
|
+
debug19("MakeOpenIdClientSecretNullable: SQLite does not support ALTER COLUMN, no action needed for nullable change");
|
|
8689
|
+
}
|
|
8690
|
+
async down(queryRunner) {
|
|
8691
|
+
}
|
|
8692
|
+
};
|
|
8693
|
+
|
|
8694
|
+
// src/migrations/generic/16-MakeOpenIdClientSecretNullable.ts
|
|
8695
|
+
var debug20 = (0, import_debug20.default)("sphereon:ssi-sdk:migrations");
|
|
8696
|
+
var MakeOpenIdClientSecretNullable1767000000000 = class {
|
|
8697
|
+
static {
|
|
8698
|
+
__name(this, "MakeOpenIdClientSecretNullable1767000000000");
|
|
8699
|
+
}
|
|
8700
|
+
name = "MakeOpenIdClientSecretNullable1767000000000";
|
|
8701
|
+
async up(queryRunner) {
|
|
8702
|
+
debug20("migration: making client_secret nullable in BaseConfig table");
|
|
8703
|
+
const dbType = queryRunner.connection.driver.options.type;
|
|
8704
|
+
switch (dbType) {
|
|
8705
|
+
case "postgres": {
|
|
8706
|
+
debug20("using postgres migration file for MakeOpenIdClientSecretNullable");
|
|
8707
|
+
const mig = new MakeOpenIdClientSecretNullable1767000000001();
|
|
8708
|
+
await mig.up(queryRunner);
|
|
8709
|
+
debug20("Postgres migration statements for MakeOpenIdClientSecretNullable executed");
|
|
8710
|
+
return;
|
|
8711
|
+
}
|
|
8712
|
+
case "sqlite":
|
|
8713
|
+
case "expo":
|
|
8714
|
+
case "react-native": {
|
|
8715
|
+
debug20("using sqlite/react-native migration file for MakeOpenIdClientSecretNullable");
|
|
8716
|
+
const mig = new MakeOpenIdClientSecretNullable1767000000002();
|
|
8717
|
+
await mig.up(queryRunner);
|
|
8718
|
+
debug20("SQLite migration statements for MakeOpenIdClientSecretNullable executed");
|
|
8719
|
+
return;
|
|
8720
|
+
}
|
|
8721
|
+
default:
|
|
8722
|
+
return Promise.reject(`Migrations are currently only supported for sqlite, react-native, expo, and postgres for MakeOpenIdClientSecretNullable. Was ${dbType}. Please run your database without migrations and with 'migrationsRun: false' and 'synchronize: true' for now`);
|
|
8723
|
+
}
|
|
8724
|
+
}
|
|
8725
|
+
async down(queryRunner) {
|
|
8726
|
+
debug20("migration: reverting client_secret nullable in BaseConfig table");
|
|
8727
|
+
const dbType = queryRunner.connection.driver.options.type;
|
|
8728
|
+
switch (dbType) {
|
|
8729
|
+
case "postgres": {
|
|
8730
|
+
const mig = new MakeOpenIdClientSecretNullable1767000000001();
|
|
8731
|
+
await mig.down(queryRunner);
|
|
8732
|
+
return;
|
|
8733
|
+
}
|
|
8734
|
+
case "sqlite":
|
|
8735
|
+
case "expo":
|
|
8736
|
+
case "react-native": {
|
|
8737
|
+
const mig = new MakeOpenIdClientSecretNullable1767000000002();
|
|
8738
|
+
await mig.down(queryRunner);
|
|
8739
|
+
return;
|
|
8740
|
+
}
|
|
8741
|
+
default:
|
|
8742
|
+
return Promise.reject(`Migrations are currently only supported for sqlite, react-native, expo, and postgres for MakeOpenIdClientSecretNullable. Was ${dbType}. Please run your database without migrations and with 'migrationsRun: false' and 'synchronize: true' for now`);
|
|
8743
|
+
}
|
|
8744
|
+
}
|
|
8745
|
+
};
|
|
8746
|
+
|
|
8747
|
+
// src/migrations/generic/2-CreateIssuanceBranding.ts
|
|
8748
|
+
var import_debug21 = __toESM(require("debug"), 1);
|
|
8749
|
+
var debug21 = (0, import_debug21.default)("sphereon:ssi-sdk:migrations");
|
|
8474
8750
|
var CreateIssuanceBranding1659463079429 = class {
|
|
8475
8751
|
static {
|
|
8476
8752
|
__name(this, "CreateIssuanceBranding1659463079429");
|
|
8477
8753
|
}
|
|
8478
8754
|
name = "CreateIssuanceBranding1659463079429";
|
|
8479
8755
|
async up(queryRunner) {
|
|
8480
|
-
|
|
8756
|
+
debug21("migration: creating issuance branding tables");
|
|
8481
8757
|
const dbType = queryRunner.connection.driver.options.type;
|
|
8482
8758
|
switch (dbType) {
|
|
8483
8759
|
case "postgres": {
|
|
8484
|
-
|
|
8760
|
+
debug21("using postgres migration file");
|
|
8485
8761
|
const mig = new CreateIssuanceBranding1685628974232();
|
|
8486
8762
|
await mig.up(queryRunner);
|
|
8487
|
-
|
|
8763
|
+
debug21("Migration statements executed");
|
|
8488
8764
|
return;
|
|
8489
8765
|
}
|
|
8490
8766
|
case "sqlite":
|
|
8491
8767
|
case "expo":
|
|
8492
8768
|
case "react-native": {
|
|
8493
|
-
|
|
8769
|
+
debug21("using sqlite/react-native migration file");
|
|
8494
8770
|
const mig = new CreateIssuanceBranding1685628973231();
|
|
8495
8771
|
await mig.up(queryRunner);
|
|
8496
|
-
|
|
8772
|
+
debug21("Migration statements executed");
|
|
8497
8773
|
return;
|
|
8498
8774
|
}
|
|
8499
8775
|
default:
|
|
@@ -8501,23 +8777,23 @@ var CreateIssuanceBranding1659463079429 = class {
|
|
|
8501
8777
|
}
|
|
8502
8778
|
}
|
|
8503
8779
|
async down(queryRunner) {
|
|
8504
|
-
|
|
8780
|
+
debug21("migration: reverting issuance branding tables");
|
|
8505
8781
|
const dbType = queryRunner.connection.driver.options.type;
|
|
8506
8782
|
switch (dbType) {
|
|
8507
8783
|
case "postgres": {
|
|
8508
|
-
|
|
8784
|
+
debug21("using postgres migration file");
|
|
8509
8785
|
const mig = new CreateIssuanceBranding1685628974232();
|
|
8510
8786
|
await mig.down(queryRunner);
|
|
8511
|
-
|
|
8787
|
+
debug21("Migration statements executed");
|
|
8512
8788
|
return;
|
|
8513
8789
|
}
|
|
8514
8790
|
case "sqlite":
|
|
8515
8791
|
case "expo":
|
|
8516
8792
|
case "react-native": {
|
|
8517
|
-
|
|
8793
|
+
debug21("using sqlite/react-native migration file");
|
|
8518
8794
|
const mig = new CreateIssuanceBranding1685628973231();
|
|
8519
8795
|
await mig.down(queryRunner);
|
|
8520
|
-
|
|
8796
|
+
debug21("Migration statements executed");
|
|
8521
8797
|
return;
|
|
8522
8798
|
}
|
|
8523
8799
|
default:
|
|
@@ -8527,7 +8803,7 @@ var CreateIssuanceBranding1659463079429 = class {
|
|
|
8527
8803
|
};
|
|
8528
8804
|
|
|
8529
8805
|
// src/migrations/generic/3-CreateContacts.ts
|
|
8530
|
-
var
|
|
8806
|
+
var import_debug22 = __toESM(require("debug"), 1);
|
|
8531
8807
|
|
|
8532
8808
|
// src/migrations/postgres/1690925872592-CreateContacts.ts
|
|
8533
8809
|
var import_ssi_sdk33 = require("@sphereon/ssi-sdk.core");
|
|
@@ -8748,30 +9024,30 @@ var CreateContacts1690925872693 = class {
|
|
|
8748
9024
|
};
|
|
8749
9025
|
|
|
8750
9026
|
// src/migrations/generic/3-CreateContacts.ts
|
|
8751
|
-
var
|
|
9027
|
+
var debug22 = (0, import_debug22.default)("sphereon:ssi-sdk:migrations");
|
|
8752
9028
|
var CreateContacts1690925872318 = class {
|
|
8753
9029
|
static {
|
|
8754
9030
|
__name(this, "CreateContacts1690925872318");
|
|
8755
9031
|
}
|
|
8756
9032
|
name = "CreateContacts1690925872318";
|
|
8757
9033
|
async up(queryRunner) {
|
|
8758
|
-
|
|
9034
|
+
debug22("migration: creating contacts tables");
|
|
8759
9035
|
const dbType = queryRunner.connection.driver.options.type;
|
|
8760
9036
|
switch (dbType) {
|
|
8761
9037
|
case "postgres": {
|
|
8762
|
-
|
|
9038
|
+
debug22("using postgres migration file");
|
|
8763
9039
|
const mig = new CreateContacts1690925872592();
|
|
8764
9040
|
await mig.up(queryRunner);
|
|
8765
|
-
|
|
9041
|
+
debug22("Migration statements executed");
|
|
8766
9042
|
return;
|
|
8767
9043
|
}
|
|
8768
9044
|
case "sqlite":
|
|
8769
9045
|
case "expo":
|
|
8770
9046
|
case "react-native": {
|
|
8771
|
-
|
|
9047
|
+
debug22("using sqlite/react-native migration file");
|
|
8772
9048
|
const mig = new CreateContacts1690925872693();
|
|
8773
9049
|
await mig.up(queryRunner);
|
|
8774
|
-
|
|
9050
|
+
debug22("Migration statements executed");
|
|
8775
9051
|
return;
|
|
8776
9052
|
}
|
|
8777
9053
|
default:
|
|
@@ -8779,23 +9055,23 @@ var CreateContacts1690925872318 = class {
|
|
|
8779
9055
|
}
|
|
8780
9056
|
}
|
|
8781
9057
|
async down(queryRunner) {
|
|
8782
|
-
|
|
9058
|
+
debug22("migration: reverting contacts tables");
|
|
8783
9059
|
const dbType = queryRunner.connection.driver.options.type;
|
|
8784
9060
|
switch (dbType) {
|
|
8785
9061
|
case "postgres": {
|
|
8786
|
-
|
|
9062
|
+
debug22("using postgres migration file");
|
|
8787
9063
|
const mig = new CreateContacts1690925872592();
|
|
8788
9064
|
await mig.down(queryRunner);
|
|
8789
|
-
|
|
9065
|
+
debug22("Migration statements executed");
|
|
8790
9066
|
return;
|
|
8791
9067
|
}
|
|
8792
9068
|
case "sqlite":
|
|
8793
9069
|
case "expo":
|
|
8794
9070
|
case "react-native": {
|
|
8795
|
-
|
|
9071
|
+
debug22("using sqlite/react-native migration file");
|
|
8796
9072
|
const mig = new CreateContacts1690925872693();
|
|
8797
9073
|
await mig.down(queryRunner);
|
|
8798
|
-
|
|
9074
|
+
debug22("Migration statements executed");
|
|
8799
9075
|
return;
|
|
8800
9076
|
}
|
|
8801
9077
|
default:
|
|
@@ -8805,7 +9081,7 @@ var CreateContacts1690925872318 = class {
|
|
|
8805
9081
|
};
|
|
8806
9082
|
|
|
8807
9083
|
// src/migrations/generic/4-CreateStatusList.ts
|
|
8808
|
-
var
|
|
9084
|
+
var import_debug23 = __toESM(require("debug"), 1);
|
|
8809
9085
|
|
|
8810
9086
|
// src/migrations/postgres/1693866470001-CreateStatusList.ts
|
|
8811
9087
|
var CreateStatusList1693866470001 = class {
|
|
@@ -9011,53 +9287,53 @@ var UpdateStatusList1737110469000 = class {
|
|
|
9011
9287
|
};
|
|
9012
9288
|
|
|
9013
9289
|
// src/migrations/generic/4-CreateStatusList.ts
|
|
9014
|
-
var
|
|
9290
|
+
var debug23 = (0, import_debug23.default)("sphereon:ssi-sdk:migrations");
|
|
9015
9291
|
var CreateStatusList1693866470000 = class {
|
|
9016
9292
|
static {
|
|
9017
9293
|
__name(this, "CreateStatusList1693866470000");
|
|
9018
9294
|
}
|
|
9019
9295
|
name = "CreateStatusList1693866470000";
|
|
9020
9296
|
async up(queryRunner) {
|
|
9021
|
-
|
|
9297
|
+
debug23("migration: creating issuance branding tables");
|
|
9022
9298
|
const dbType = queryRunner.connection.driver.options.type;
|
|
9023
9299
|
if (dbType === "postgres") {
|
|
9024
|
-
|
|
9300
|
+
debug23("using postgres migration files");
|
|
9025
9301
|
const createMig = new CreateStatusList1693866470001();
|
|
9026
9302
|
await createMig.up(queryRunner);
|
|
9027
9303
|
const updateMig = new UpdateStatusList1737110469001();
|
|
9028
9304
|
const up = await updateMig.up(queryRunner);
|
|
9029
|
-
|
|
9305
|
+
debug23("Migration statements executed");
|
|
9030
9306
|
return up;
|
|
9031
9307
|
} else if (dbType === "sqlite" || dbType === "react-native" || dbType === "expo") {
|
|
9032
|
-
|
|
9308
|
+
debug23("using sqlite/react-native migration files");
|
|
9033
9309
|
const createMig = new CreateStatusList1693866470002();
|
|
9034
9310
|
await createMig.up(queryRunner);
|
|
9035
9311
|
const updateMig = new UpdateStatusList1737110469000();
|
|
9036
9312
|
const up = await updateMig.up(queryRunner);
|
|
9037
|
-
|
|
9313
|
+
debug23("Migration statements executed");
|
|
9038
9314
|
return up;
|
|
9039
9315
|
} else {
|
|
9040
9316
|
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`);
|
|
9041
9317
|
}
|
|
9042
9318
|
}
|
|
9043
9319
|
async down(queryRunner) {
|
|
9044
|
-
|
|
9320
|
+
debug23("migration: reverting issuance branding tables");
|
|
9045
9321
|
const dbType = queryRunner.connection.driver.options.type;
|
|
9046
9322
|
if (dbType === "postgres") {
|
|
9047
|
-
|
|
9323
|
+
debug23("using postgres migration files");
|
|
9048
9324
|
const updateMig = new UpdateStatusList1737110469001();
|
|
9049
9325
|
await updateMig.down(queryRunner);
|
|
9050
9326
|
const createMig = new CreateStatusList1693866470001();
|
|
9051
9327
|
const down = await createMig.down(queryRunner);
|
|
9052
|
-
|
|
9328
|
+
debug23("Migration statements executed");
|
|
9053
9329
|
return down;
|
|
9054
9330
|
} else if (dbType === "sqlite" || dbType === "react-native" || dbType === "expo") {
|
|
9055
|
-
|
|
9331
|
+
debug23("using sqlite/react-native migration files");
|
|
9056
9332
|
const updateMig = new UpdateStatusList1737110469000();
|
|
9057
9333
|
await updateMig.down(queryRunner);
|
|
9058
9334
|
const createMig = new CreateStatusList1693866470002();
|
|
9059
9335
|
const down = await createMig.down(queryRunner);
|
|
9060
|
-
|
|
9336
|
+
debug23("Migration statements executed");
|
|
9061
9337
|
return down;
|
|
9062
9338
|
} else {
|
|
9063
9339
|
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`);
|
|
@@ -9066,7 +9342,7 @@ var CreateStatusList1693866470000 = class {
|
|
|
9066
9342
|
};
|
|
9067
9343
|
|
|
9068
9344
|
// src/migrations/generic/5-CreateAuditEvents.ts
|
|
9069
|
-
var
|
|
9345
|
+
var import_debug24 = __toESM(require("debug"), 1);
|
|
9070
9346
|
|
|
9071
9347
|
// src/migrations/postgres/1701634812183-CreateAuditEvents.ts
|
|
9072
9348
|
var CreateAuditEvents1701634812183 = class {
|
|
@@ -9165,30 +9441,30 @@ var CreateAuditEvents1701634819487 = class {
|
|
|
9165
9441
|
};
|
|
9166
9442
|
|
|
9167
9443
|
// src/migrations/generic/5-CreateAuditEvents.ts
|
|
9168
|
-
var
|
|
9444
|
+
var debug24 = (0, import_debug24.default)("sphereon:ssi-sdk:migrations");
|
|
9169
9445
|
var CreateAuditEvents1701635835330 = class {
|
|
9170
9446
|
static {
|
|
9171
9447
|
__name(this, "CreateAuditEvents1701635835330");
|
|
9172
9448
|
}
|
|
9173
9449
|
name = "CreateAuditEvents1701635835330";
|
|
9174
9450
|
async up(queryRunner) {
|
|
9175
|
-
|
|
9451
|
+
debug24("migration: creating audit events tables");
|
|
9176
9452
|
const dbType = queryRunner.connection.driver.options.type;
|
|
9177
9453
|
switch (dbType) {
|
|
9178
9454
|
case "postgres": {
|
|
9179
|
-
|
|
9455
|
+
debug24("using postgres migration file");
|
|
9180
9456
|
const mig = new CreateAuditEvents1701634812183();
|
|
9181
9457
|
await mig.up(queryRunner);
|
|
9182
|
-
|
|
9458
|
+
debug24("Migration statements executed");
|
|
9183
9459
|
return;
|
|
9184
9460
|
}
|
|
9185
9461
|
case "sqlite":
|
|
9186
9462
|
case "expo":
|
|
9187
9463
|
case "react-native": {
|
|
9188
|
-
|
|
9464
|
+
debug24("using sqlite/react-native migration file");
|
|
9189
9465
|
const mig = new CreateAuditEvents1701634819487();
|
|
9190
9466
|
await mig.up(queryRunner);
|
|
9191
|
-
|
|
9467
|
+
debug24("Migration statements executed");
|
|
9192
9468
|
return;
|
|
9193
9469
|
}
|
|
9194
9470
|
default:
|
|
@@ -9196,23 +9472,23 @@ var CreateAuditEvents1701635835330 = class {
|
|
|
9196
9472
|
}
|
|
9197
9473
|
}
|
|
9198
9474
|
async down(queryRunner) {
|
|
9199
|
-
|
|
9475
|
+
debug24("migration: reverting audit events tables");
|
|
9200
9476
|
const dbType = queryRunner.connection.driver.options.type;
|
|
9201
9477
|
switch (dbType) {
|
|
9202
9478
|
case "postgres": {
|
|
9203
|
-
|
|
9479
|
+
debug24("using postgres migration file");
|
|
9204
9480
|
const mig = new CreateAuditEvents1701634812183();
|
|
9205
9481
|
await mig.down(queryRunner);
|
|
9206
|
-
|
|
9482
|
+
debug24("Migration statements executed");
|
|
9207
9483
|
return;
|
|
9208
9484
|
}
|
|
9209
9485
|
case "sqlite":
|
|
9210
9486
|
case "expo":
|
|
9211
9487
|
case "react-native": {
|
|
9212
|
-
|
|
9488
|
+
debug24("using sqlite/react-native migration file");
|
|
9213
9489
|
const mig = new CreateAuditEvents1701634819487();
|
|
9214
9490
|
await mig.down(queryRunner);
|
|
9215
|
-
|
|
9491
|
+
debug24("Migration statements executed");
|
|
9216
9492
|
return;
|
|
9217
9493
|
}
|
|
9218
9494
|
default:
|
|
@@ -9222,7 +9498,7 @@ var CreateAuditEvents1701635835330 = class {
|
|
|
9222
9498
|
};
|
|
9223
9499
|
|
|
9224
9500
|
// src/migrations/generic/6-CreateDigitalCredential.ts
|
|
9225
|
-
var
|
|
9501
|
+
var import_debug25 = __toESM(require("debug"), 1);
|
|
9226
9502
|
|
|
9227
9503
|
// src/migrations/postgres/1708525189001-CreateDigitalCredential.ts
|
|
9228
9504
|
var CreateDigitalCredential1708525189001 = class {
|
|
@@ -9330,30 +9606,30 @@ var CreateDigitalCredential1708525189002 = class {
|
|
|
9330
9606
|
};
|
|
9331
9607
|
|
|
9332
9608
|
// src/migrations/generic/6-CreateDigitalCredential.ts
|
|
9333
|
-
var
|
|
9609
|
+
var debug25 = (0, import_debug25.default)("sphereon:ssi-sdk:migrations");
|
|
9334
9610
|
var CreateDigitalCredential1708525189000 = class {
|
|
9335
9611
|
static {
|
|
9336
9612
|
__name(this, "CreateDigitalCredential1708525189000");
|
|
9337
9613
|
}
|
|
9338
9614
|
name = "CreateDigitalCredential1708525189000";
|
|
9339
9615
|
async up(queryRunner) {
|
|
9340
|
-
|
|
9616
|
+
debug25("migration: creating DigitalCredential tables");
|
|
9341
9617
|
const dbType = queryRunner.connection.driver.options.type;
|
|
9342
9618
|
switch (dbType) {
|
|
9343
9619
|
case "postgres": {
|
|
9344
|
-
|
|
9620
|
+
debug25("using postgres migration file for DigitalCredential");
|
|
9345
9621
|
const mig = new CreateDigitalCredential1708525189001();
|
|
9346
9622
|
await mig.up(queryRunner);
|
|
9347
|
-
|
|
9623
|
+
debug25("Postgres Migration statements for DigitalCredential executed");
|
|
9348
9624
|
return;
|
|
9349
9625
|
}
|
|
9350
9626
|
case "sqlite":
|
|
9351
9627
|
case "expo":
|
|
9352
9628
|
case "react-native": {
|
|
9353
|
-
|
|
9629
|
+
debug25("using sqlite/react-native migration file for DigitalCredential");
|
|
9354
9630
|
const mig = new CreateDigitalCredential1708525189002();
|
|
9355
9631
|
await mig.up(queryRunner);
|
|
9356
|
-
|
|
9632
|
+
debug25("SQLite Migration statements for DigitalCredential executed");
|
|
9357
9633
|
return;
|
|
9358
9634
|
}
|
|
9359
9635
|
default:
|
|
@@ -9361,23 +9637,23 @@ var CreateDigitalCredential1708525189000 = class {
|
|
|
9361
9637
|
}
|
|
9362
9638
|
}
|
|
9363
9639
|
async down(queryRunner) {
|
|
9364
|
-
|
|
9640
|
+
debug25("migration: reverting DigitalCredential tables");
|
|
9365
9641
|
const dbType = queryRunner.connection.driver.options.type;
|
|
9366
9642
|
switch (dbType) {
|
|
9367
9643
|
case "postgres": {
|
|
9368
|
-
|
|
9644
|
+
debug25("using postgres migration file for DigitalCredential");
|
|
9369
9645
|
const mig = new CreateDigitalCredential1708525189001();
|
|
9370
9646
|
await mig.down(queryRunner);
|
|
9371
|
-
|
|
9647
|
+
debug25("Postgres Migration statements for DigitalCredential reverted");
|
|
9372
9648
|
return;
|
|
9373
9649
|
}
|
|
9374
9650
|
case "sqlite":
|
|
9375
9651
|
case "expo":
|
|
9376
9652
|
case "react-native": {
|
|
9377
|
-
|
|
9653
|
+
debug25("using sqlite/react-native migration file for DigitalCredential");
|
|
9378
9654
|
const mig = new CreateDigitalCredential1708525189002();
|
|
9379
9655
|
await mig.down(queryRunner);
|
|
9380
|
-
|
|
9656
|
+
debug25("SQLite Migration statements for DigitalCredential reverted");
|
|
9381
9657
|
return;
|
|
9382
9658
|
}
|
|
9383
9659
|
default:
|
|
@@ -9387,7 +9663,7 @@ var CreateDigitalCredential1708525189000 = class {
|
|
|
9387
9663
|
};
|
|
9388
9664
|
|
|
9389
9665
|
// src/migrations/generic/7-CreateMachineStateStore.ts
|
|
9390
|
-
var
|
|
9666
|
+
var import_debug26 = __toESM(require("debug"), 1);
|
|
9391
9667
|
|
|
9392
9668
|
// src/migrations/postgres/1708797018115-CreateMachineStateStore.ts
|
|
9393
9669
|
var CreateMachineStateStore1708797018115 = class {
|
|
@@ -9449,30 +9725,30 @@ var CreateMachineStateStore1708796002272 = class {
|
|
|
9449
9725
|
};
|
|
9450
9726
|
|
|
9451
9727
|
// src/migrations/generic/7-CreateMachineStateStore.ts
|
|
9452
|
-
var
|
|
9728
|
+
var debug26 = (0, import_debug26.default)("sphereon:ssi-sdk:migrations");
|
|
9453
9729
|
var CreateMachineStateStore1708098041262 = class {
|
|
9454
9730
|
static {
|
|
9455
9731
|
__name(this, "CreateMachineStateStore1708098041262");
|
|
9456
9732
|
}
|
|
9457
9733
|
name = "CreateMachineStateStore1708098041262";
|
|
9458
9734
|
async up(queryRunner) {
|
|
9459
|
-
|
|
9735
|
+
debug26("migration: creating machine state tables");
|
|
9460
9736
|
const dbType = queryRunner.connection.driver.options.type;
|
|
9461
9737
|
switch (dbType) {
|
|
9462
9738
|
case "postgres": {
|
|
9463
|
-
|
|
9739
|
+
debug26("using postgres migration file");
|
|
9464
9740
|
const mig = new CreateMachineStateStore1708797018115();
|
|
9465
9741
|
await mig.up(queryRunner);
|
|
9466
|
-
|
|
9742
|
+
debug26("Migration statements executed");
|
|
9467
9743
|
return;
|
|
9468
9744
|
}
|
|
9469
9745
|
case "sqlite":
|
|
9470
9746
|
case "expo":
|
|
9471
9747
|
case "react-native": {
|
|
9472
|
-
|
|
9748
|
+
debug26("using sqlite/react-native migration file");
|
|
9473
9749
|
const mig = new CreateMachineStateStore1708796002272();
|
|
9474
9750
|
await mig.up(queryRunner);
|
|
9475
|
-
|
|
9751
|
+
debug26("Migration statements executed");
|
|
9476
9752
|
return;
|
|
9477
9753
|
}
|
|
9478
9754
|
default:
|
|
@@ -9480,23 +9756,23 @@ var CreateMachineStateStore1708098041262 = class {
|
|
|
9480
9756
|
}
|
|
9481
9757
|
}
|
|
9482
9758
|
async down(queryRunner) {
|
|
9483
|
-
|
|
9759
|
+
debug26("migration: reverting machine state tables");
|
|
9484
9760
|
const dbType = queryRunner.connection.driver.options.type;
|
|
9485
9761
|
switch (dbType) {
|
|
9486
9762
|
case "postgres": {
|
|
9487
|
-
|
|
9763
|
+
debug26("using postgres migration file");
|
|
9488
9764
|
const mig = new CreateMachineStateStore1708797018115();
|
|
9489
9765
|
await mig.down(queryRunner);
|
|
9490
|
-
|
|
9766
|
+
debug26("Migration statements executed");
|
|
9491
9767
|
return;
|
|
9492
9768
|
}
|
|
9493
9769
|
case "sqlite":
|
|
9494
9770
|
case "expo":
|
|
9495
9771
|
case "react-native": {
|
|
9496
|
-
|
|
9772
|
+
debug26("using sqlite/react-native migration file");
|
|
9497
9773
|
const mig = new CreateMachineStateStore1708796002272();
|
|
9498
9774
|
await mig.down(queryRunner);
|
|
9499
|
-
|
|
9775
|
+
debug26("Migration statements executed");
|
|
9500
9776
|
return;
|
|
9501
9777
|
}
|
|
9502
9778
|
default:
|
|
@@ -9506,7 +9782,7 @@ var CreateMachineStateStore1708098041262 = class {
|
|
|
9506
9782
|
};
|
|
9507
9783
|
|
|
9508
9784
|
// src/migrations/generic/8-CreateContacts.ts
|
|
9509
|
-
var
|
|
9785
|
+
var import_debug27 = __toESM(require("debug"), 1);
|
|
9510
9786
|
|
|
9511
9787
|
// src/migrations/postgres/1710438363001-CreateContacts.ts
|
|
9512
9788
|
var CreateContacts1710438363001 = class {
|
|
@@ -9620,30 +9896,30 @@ var CreateContacts1710438363002 = class {
|
|
|
9620
9896
|
};
|
|
9621
9897
|
|
|
9622
9898
|
// src/migrations/generic/8-CreateContacts.ts
|
|
9623
|
-
var
|
|
9899
|
+
var debug27 = (0, import_debug27.default)("sphereon:ssi-sdk:migrations");
|
|
9624
9900
|
var CreateContacts1708525189000 = class {
|
|
9625
9901
|
static {
|
|
9626
9902
|
__name(this, "CreateContacts1708525189000");
|
|
9627
9903
|
}
|
|
9628
9904
|
name = "CreateContacts1708525189000";
|
|
9629
9905
|
async up(queryRunner) {
|
|
9630
|
-
|
|
9906
|
+
debug27("migration: updating contact tables");
|
|
9631
9907
|
const dbType = queryRunner.connection.driver.options.type;
|
|
9632
9908
|
switch (dbType) {
|
|
9633
9909
|
case "postgres": {
|
|
9634
|
-
|
|
9910
|
+
debug27("using postgres migration file");
|
|
9635
9911
|
const mig = new CreateContacts1710438363001();
|
|
9636
9912
|
await mig.up(queryRunner);
|
|
9637
|
-
|
|
9913
|
+
debug27("Migration statements executed");
|
|
9638
9914
|
return;
|
|
9639
9915
|
}
|
|
9640
9916
|
case "sqlite":
|
|
9641
9917
|
case "expo":
|
|
9642
9918
|
case "react-native": {
|
|
9643
|
-
|
|
9919
|
+
debug27("using sqlite/react-native migration file");
|
|
9644
9920
|
const mig = new CreateContacts1710438363002();
|
|
9645
9921
|
await mig.up(queryRunner);
|
|
9646
|
-
|
|
9922
|
+
debug27("Migration statements executed");
|
|
9647
9923
|
return;
|
|
9648
9924
|
}
|
|
9649
9925
|
default:
|
|
@@ -9651,23 +9927,23 @@ var CreateContacts1708525189000 = class {
|
|
|
9651
9927
|
}
|
|
9652
9928
|
}
|
|
9653
9929
|
async down(queryRunner) {
|
|
9654
|
-
|
|
9930
|
+
debug27("migration: reverting machine state tables");
|
|
9655
9931
|
const dbType = queryRunner.connection.driver.options.type;
|
|
9656
9932
|
switch (dbType) {
|
|
9657
9933
|
case "postgres": {
|
|
9658
|
-
|
|
9934
|
+
debug27("using postgres migration file");
|
|
9659
9935
|
const mig = new CreateContacts1710438363001();
|
|
9660
9936
|
await mig.down(queryRunner);
|
|
9661
|
-
|
|
9937
|
+
debug27("Migration statements executed");
|
|
9662
9938
|
return;
|
|
9663
9939
|
}
|
|
9664
9940
|
case "sqlite":
|
|
9665
9941
|
case "expo":
|
|
9666
9942
|
case "react-native": {
|
|
9667
|
-
|
|
9943
|
+
debug27("using sqlite/react-native migration file");
|
|
9668
9944
|
const mig = new CreateContacts1710438363002();
|
|
9669
9945
|
await mig.down(queryRunner);
|
|
9670
|
-
|
|
9946
|
+
debug27("Migration statements executed");
|
|
9671
9947
|
return;
|
|
9672
9948
|
}
|
|
9673
9949
|
default:
|
|
@@ -9677,7 +9953,7 @@ var CreateContacts1708525189000 = class {
|
|
|
9677
9953
|
};
|
|
9678
9954
|
|
|
9679
9955
|
// src/migrations/generic/9-CreateContacts.ts
|
|
9680
|
-
var
|
|
9956
|
+
var import_debug28 = __toESM(require("debug"), 1);
|
|
9681
9957
|
|
|
9682
9958
|
// src/migrations/postgres/1715761125001-CreateContacts.ts
|
|
9683
9959
|
var CreateContacts1715761125001 = class {
|
|
@@ -9789,30 +10065,30 @@ var CreateContacts1715761125002 = class {
|
|
|
9789
10065
|
};
|
|
9790
10066
|
|
|
9791
10067
|
// src/migrations/generic/9-CreateContacts.ts
|
|
9792
|
-
var
|
|
10068
|
+
var debug28 = (0, import_debug28.default)("sphereon:ssi-sdk:migrations");
|
|
9793
10069
|
var CreateContacts1715761125000 = class {
|
|
9794
10070
|
static {
|
|
9795
10071
|
__name(this, "CreateContacts1715761125000");
|
|
9796
10072
|
}
|
|
9797
10073
|
name = "CreateContacts1715761125000";
|
|
9798
10074
|
async up(queryRunner) {
|
|
9799
|
-
|
|
10075
|
+
debug28("migration: updating contact tables");
|
|
9800
10076
|
const dbType = queryRunner.connection.driver.options.type;
|
|
9801
10077
|
switch (dbType) {
|
|
9802
10078
|
case "postgres": {
|
|
9803
|
-
|
|
10079
|
+
debug28("using postgres migration file");
|
|
9804
10080
|
const mig = new CreateContacts1715761125001();
|
|
9805
10081
|
await mig.up(queryRunner);
|
|
9806
|
-
|
|
10082
|
+
debug28("Migration statements executed");
|
|
9807
10083
|
return;
|
|
9808
10084
|
}
|
|
9809
10085
|
case "sqlite":
|
|
9810
10086
|
case "expo":
|
|
9811
10087
|
case "react-native": {
|
|
9812
|
-
|
|
10088
|
+
debug28("using sqlite/react-native migration file");
|
|
9813
10089
|
const mig = new CreateContacts1715761125002();
|
|
9814
10090
|
await mig.up(queryRunner);
|
|
9815
|
-
|
|
10091
|
+
debug28("Migration statements executed");
|
|
9816
10092
|
return;
|
|
9817
10093
|
}
|
|
9818
10094
|
default:
|
|
@@ -9820,23 +10096,23 @@ var CreateContacts1715761125000 = class {
|
|
|
9820
10096
|
}
|
|
9821
10097
|
}
|
|
9822
10098
|
async down(queryRunner) {
|
|
9823
|
-
|
|
10099
|
+
debug28("migration: reverting machine state tables");
|
|
9824
10100
|
const dbType = queryRunner.connection.driver.options.type;
|
|
9825
10101
|
switch (dbType) {
|
|
9826
10102
|
case "postgres": {
|
|
9827
|
-
|
|
10103
|
+
debug28("using postgres migration file");
|
|
9828
10104
|
const mig = new CreateContacts1715761125001();
|
|
9829
10105
|
await mig.down(queryRunner);
|
|
9830
|
-
|
|
10106
|
+
debug28("Migration statements executed");
|
|
9831
10107
|
return;
|
|
9832
10108
|
}
|
|
9833
10109
|
case "sqlite":
|
|
9834
10110
|
case "expo":
|
|
9835
10111
|
case "react-native": {
|
|
9836
|
-
|
|
10112
|
+
debug28("using sqlite/react-native migration file");
|
|
9837
10113
|
const mig = new CreateContacts1715761125002();
|
|
9838
10114
|
await mig.down(queryRunner);
|
|
9839
|
-
|
|
10115
|
+
debug28("Migration statements executed");
|
|
9840
10116
|
return;
|
|
9841
10117
|
}
|
|
9842
10118
|
default:
|
|
@@ -9850,7 +10126,8 @@ var DataStoreContactMigrations = [
|
|
|
9850
10126
|
CreateContacts1659463079429,
|
|
9851
10127
|
CreateContacts1690925872318,
|
|
9852
10128
|
CreateContacts1708525189000,
|
|
9853
|
-
CreateContacts1715761125000
|
|
10129
|
+
CreateContacts1715761125000,
|
|
10130
|
+
MakeOpenIdClientSecretNullable1767000000000
|
|
9854
10131
|
];
|
|
9855
10132
|
var DataStoreIssuanceBrandingMigrations = [
|
|
9856
10133
|
CreateIssuanceBranding1659463079429,
|
|
@@ -9876,6 +10153,9 @@ var DataStorePresentationDefinitionMigrations = [
|
|
|
9876
10153
|
CreatePresentationDefinitions1716533767523,
|
|
9877
10154
|
CreateDcqlQueryItem1726617600000
|
|
9878
10155
|
];
|
|
10156
|
+
var DataStoreServiceMigrations = [
|
|
10157
|
+
AddServiceMetadata1764000000000
|
|
10158
|
+
];
|
|
9879
10159
|
var DataStoreMigrations = [
|
|
9880
10160
|
...DataStoreContactMigrations,
|
|
9881
10161
|
...DataStoreIssuanceBrandingMigrations,
|
|
@@ -9883,7 +10163,12 @@ var DataStoreMigrations = [
|
|
|
9883
10163
|
...DataStoreEventLoggerMigrations,
|
|
9884
10164
|
...DataStoreDigitalCredentialMigrations,
|
|
9885
10165
|
...DataStoreMachineStateMigrations,
|
|
9886
|
-
...DataStorePresentationDefinitionMigrations
|
|
10166
|
+
...DataStorePresentationDefinitionMigrations,
|
|
10167
|
+
...DataStoreServiceMigrations
|
|
10168
|
+
];
|
|
10169
|
+
var DataStoreMigrationsWithVeramo = [
|
|
10170
|
+
...import_data_store.migrations,
|
|
10171
|
+
...DataStoreMigrations
|
|
9887
10172
|
];
|
|
9888
10173
|
|
|
9889
10174
|
// src/utils/digitalCredential/MappingUtils.ts
|
|
@@ -10114,4 +10399,8 @@ var DataStoreEntities = [
|
|
|
10114
10399
|
...DataStoreMachineStateEntities,
|
|
10115
10400
|
...DataStorePresentationDefinitionEntities
|
|
10116
10401
|
];
|
|
10402
|
+
var DataStoreEntitiesWithVeramo = [
|
|
10403
|
+
...import_data_store2.Entities,
|
|
10404
|
+
...DataStoreEntities
|
|
10405
|
+
];
|
|
10117
10406
|
//# sourceMappingURL=index.cjs.map
|