@sphereon/ssi-sdk.data-store 0.36.1-next.152 → 0.36.1-next.155
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 +215 -96
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +215 -96
- package/dist/index.js.map +1 -1
- package/package.json +8 -8
- package/src/entities/issuanceBranding/CredentialClaimsEntity.ts +3 -0
- package/src/migrations/generic/17-AddCredentialClaimOrder.ts +64 -0
- package/src/migrations/generic/index.ts +2 -0
- package/src/migrations/postgres/1768000000000-AddCredentialClaimOrder.ts +13 -0
- package/src/migrations/sqlite/1768000000000-AddCredentialClaimOrder.ts +34 -0
- package/src/utils/issuanceBranding/MappingUtils.ts +2 -0
package/dist/index.cjs
CHANGED
|
@@ -3069,6 +3069,7 @@ var CredentialClaimsEntity = class extends import_typeorm24.BaseEntity {
|
|
|
3069
3069
|
id;
|
|
3070
3070
|
key;
|
|
3071
3071
|
name;
|
|
3072
|
+
order;
|
|
3072
3073
|
credentialLocaleBranding;
|
|
3073
3074
|
async validate() {
|
|
3074
3075
|
const validation = await (0, import_class_validator16.validate)(this);
|
|
@@ -3106,6 +3107,13 @@ _ts_decorate25([
|
|
|
3106
3107
|
}),
|
|
3107
3108
|
_ts_metadata24("design:type", String)
|
|
3108
3109
|
], CredentialClaimsEntity.prototype, "name", void 0);
|
|
3110
|
+
_ts_decorate25([
|
|
3111
|
+
(0, import_typeorm24.Column)("integer", {
|
|
3112
|
+
name: "order",
|
|
3113
|
+
nullable: true
|
|
3114
|
+
}),
|
|
3115
|
+
_ts_metadata24("design:type", Number)
|
|
3116
|
+
], CredentialClaimsEntity.prototype, "order", void 0);
|
|
3109
3117
|
_ts_decorate25([
|
|
3110
3118
|
(0, import_typeorm24.ManyToOne)(() => CredentialLocaleBrandingEntity, (credentialLocaleBranding) => credentialLocaleBranding.claims, {
|
|
3111
3119
|
cascade: [
|
|
@@ -5865,7 +5873,10 @@ var credentialLocaleBrandingFromEntity = /* @__PURE__ */ __name((localeBranding)
|
|
|
5865
5873
|
claims: localeBranding.claims ? localeBranding.claims.map((claim) => ({
|
|
5866
5874
|
id: claim.id,
|
|
5867
5875
|
key: claim.key,
|
|
5868
|
-
name: claim.name
|
|
5876
|
+
name: claim.name,
|
|
5877
|
+
...claim.order != null && {
|
|
5878
|
+
order: claim.order
|
|
5879
|
+
}
|
|
5869
5880
|
})) : void 0
|
|
5870
5881
|
};
|
|
5871
5882
|
return replaceNullWithUndefined(result);
|
|
@@ -5938,6 +5949,7 @@ var credentialClaimsEntityFrom = /* @__PURE__ */ __name((args) => {
|
|
|
5938
5949
|
const credentialClaimsEntity = new CredentialClaimsEntity();
|
|
5939
5950
|
credentialClaimsEntity.key = args.key;
|
|
5940
5951
|
credentialClaimsEntity.name = args.name;
|
|
5952
|
+
credentialClaimsEntity.order = args.order;
|
|
5941
5953
|
return credentialClaimsEntity;
|
|
5942
5954
|
}, "credentialClaimsEntityFrom");
|
|
5943
5955
|
|
|
@@ -8744,21 +8756,69 @@ var MakeOpenIdClientSecretNullable1767000000000 = class {
|
|
|
8744
8756
|
}
|
|
8745
8757
|
};
|
|
8746
8758
|
|
|
8747
|
-
// src/migrations/generic/
|
|
8759
|
+
// src/migrations/generic/17-AddCredentialClaimOrder.ts
|
|
8748
8760
|
var import_debug21 = __toESM(require("debug"), 1);
|
|
8761
|
+
|
|
8762
|
+
// src/migrations/postgres/1768000000000-AddCredentialClaimOrder.ts
|
|
8763
|
+
var AddCredentialClaimOrderPostgres1768000000000 = class {
|
|
8764
|
+
static {
|
|
8765
|
+
__name(this, "AddCredentialClaimOrderPostgres1768000000000");
|
|
8766
|
+
}
|
|
8767
|
+
name = "AddCredentialClaimOrder1768000000000";
|
|
8768
|
+
async up(queryRunner) {
|
|
8769
|
+
await queryRunner.query(`ALTER TABLE "CredentialClaims" ADD "order" integer`);
|
|
8770
|
+
}
|
|
8771
|
+
async down(queryRunner) {
|
|
8772
|
+
await queryRunner.query(`ALTER TABLE "CredentialClaims" DROP COLUMN "order"`);
|
|
8773
|
+
}
|
|
8774
|
+
};
|
|
8775
|
+
|
|
8776
|
+
// src/migrations/sqlite/1768000000000-AddCredentialClaimOrder.ts
|
|
8777
|
+
var AddCredentialClaimOrderSqlite1768000000000 = class {
|
|
8778
|
+
static {
|
|
8779
|
+
__name(this, "AddCredentialClaimOrderSqlite1768000000000");
|
|
8780
|
+
}
|
|
8781
|
+
name = "AddCredentialClaimOrder1768000000000";
|
|
8782
|
+
async up(queryRunner) {
|
|
8783
|
+
await queryRunner.query(`ALTER TABLE "CredentialClaims" ADD COLUMN "order" integer`);
|
|
8784
|
+
}
|
|
8785
|
+
async down(queryRunner) {
|
|
8786
|
+
await queryRunner.query(`PRAGMA foreign_keys = OFF`);
|
|
8787
|
+
await queryRunner.query(`
|
|
8788
|
+
CREATE TABLE "CredentialClaims_old" (
|
|
8789
|
+
"id" varchar PRIMARY KEY NOT NULL,
|
|
8790
|
+
"key" varchar(255) NOT NULL,
|
|
8791
|
+
"name" varchar(255) NOT NULL,
|
|
8792
|
+
"credentialLocaleBrandingId" varchar,
|
|
8793
|
+
CONSTRAINT "FK_CredentialClaims_credentialLocaleBrandingId" FOREIGN KEY ("credentialLocaleBrandingId") REFERENCES "BaseLocaleBranding" ("id") ON DELETE CASCADE ON UPDATE NO ACTION
|
|
8794
|
+
)
|
|
8795
|
+
`);
|
|
8796
|
+
await queryRunner.query(`
|
|
8797
|
+
INSERT INTO "CredentialClaims_old" ("id", "key", "name", "credentialLocaleBrandingId")
|
|
8798
|
+
SELECT "id", "key", "name", "credentialLocaleBrandingId"
|
|
8799
|
+
FROM "CredentialClaims"
|
|
8800
|
+
`);
|
|
8801
|
+
await queryRunner.query(`DROP TABLE "CredentialClaims"`);
|
|
8802
|
+
await queryRunner.query(`ALTER TABLE "CredentialClaims_old" RENAME TO "CredentialClaims"`);
|
|
8803
|
+
await queryRunner.query(`CREATE UNIQUE INDEX "IDX_CredentialClaimsEntity_credentialLocaleBranding_locale" ON "CredentialClaims" ("credentialLocaleBrandingId", "key")`);
|
|
8804
|
+
await queryRunner.query(`PRAGMA foreign_keys = ON`);
|
|
8805
|
+
}
|
|
8806
|
+
};
|
|
8807
|
+
|
|
8808
|
+
// src/migrations/generic/17-AddCredentialClaimOrder.ts
|
|
8749
8809
|
var debug21 = (0, import_debug21.default)("sphereon:ssi-sdk:migrations");
|
|
8750
|
-
var
|
|
8810
|
+
var AddCredentialClaimOrder1768000000000 = class {
|
|
8751
8811
|
static {
|
|
8752
|
-
__name(this, "
|
|
8812
|
+
__name(this, "AddCredentialClaimOrder1768000000000");
|
|
8753
8813
|
}
|
|
8754
|
-
name = "
|
|
8814
|
+
name = "AddCredentialClaimOrder1768000000000";
|
|
8755
8815
|
async up(queryRunner) {
|
|
8756
|
-
debug21("migration:
|
|
8816
|
+
debug21("migration: adding credential claim order column");
|
|
8757
8817
|
const dbType = queryRunner.connection.driver.options.type;
|
|
8758
8818
|
switch (dbType) {
|
|
8759
8819
|
case "postgres": {
|
|
8760
8820
|
debug21("using postgres migration file");
|
|
8761
|
-
const mig = new
|
|
8821
|
+
const mig = new AddCredentialClaimOrderPostgres1768000000000();
|
|
8762
8822
|
await mig.up(queryRunner);
|
|
8763
8823
|
debug21("Migration statements executed");
|
|
8764
8824
|
return;
|
|
@@ -8767,7 +8827,7 @@ var CreateIssuanceBranding1659463079429 = class {
|
|
|
8767
8827
|
case "expo":
|
|
8768
8828
|
case "react-native": {
|
|
8769
8829
|
debug21("using sqlite/react-native migration file");
|
|
8770
|
-
const mig = new
|
|
8830
|
+
const mig = new AddCredentialClaimOrderSqlite1768000000000();
|
|
8771
8831
|
await mig.up(queryRunner);
|
|
8772
8832
|
debug21("Migration statements executed");
|
|
8773
8833
|
return;
|
|
@@ -8777,12 +8837,12 @@ var CreateIssuanceBranding1659463079429 = class {
|
|
|
8777
8837
|
}
|
|
8778
8838
|
}
|
|
8779
8839
|
async down(queryRunner) {
|
|
8780
|
-
debug21("migration:
|
|
8840
|
+
debug21("migration: removing credential claim order column");
|
|
8781
8841
|
const dbType = queryRunner.connection.driver.options.type;
|
|
8782
8842
|
switch (dbType) {
|
|
8783
8843
|
case "postgres": {
|
|
8784
8844
|
debug21("using postgres migration file");
|
|
8785
|
-
const mig = new
|
|
8845
|
+
const mig = new AddCredentialClaimOrderPostgres1768000000000();
|
|
8786
8846
|
await mig.down(queryRunner);
|
|
8787
8847
|
debug21("Migration statements executed");
|
|
8788
8848
|
return;
|
|
@@ -8791,7 +8851,7 @@ var CreateIssuanceBranding1659463079429 = class {
|
|
|
8791
8851
|
case "expo":
|
|
8792
8852
|
case "react-native": {
|
|
8793
8853
|
debug21("using sqlite/react-native migration file");
|
|
8794
|
-
const mig = new
|
|
8854
|
+
const mig = new AddCredentialClaimOrderSqlite1768000000000();
|
|
8795
8855
|
await mig.down(queryRunner);
|
|
8796
8856
|
debug21("Migration statements executed");
|
|
8797
8857
|
return;
|
|
@@ -8802,8 +8862,66 @@ var CreateIssuanceBranding1659463079429 = class {
|
|
|
8802
8862
|
}
|
|
8803
8863
|
};
|
|
8804
8864
|
|
|
8805
|
-
// src/migrations/generic/
|
|
8865
|
+
// src/migrations/generic/2-CreateIssuanceBranding.ts
|
|
8806
8866
|
var import_debug22 = __toESM(require("debug"), 1);
|
|
8867
|
+
var debug22 = (0, import_debug22.default)("sphereon:ssi-sdk:migrations");
|
|
8868
|
+
var CreateIssuanceBranding1659463079429 = class {
|
|
8869
|
+
static {
|
|
8870
|
+
__name(this, "CreateIssuanceBranding1659463079429");
|
|
8871
|
+
}
|
|
8872
|
+
name = "CreateIssuanceBranding1659463079429";
|
|
8873
|
+
async up(queryRunner) {
|
|
8874
|
+
debug22("migration: creating issuance branding tables");
|
|
8875
|
+
const dbType = queryRunner.connection.driver.options.type;
|
|
8876
|
+
switch (dbType) {
|
|
8877
|
+
case "postgres": {
|
|
8878
|
+
debug22("using postgres migration file");
|
|
8879
|
+
const mig = new CreateIssuanceBranding1685628974232();
|
|
8880
|
+
await mig.up(queryRunner);
|
|
8881
|
+
debug22("Migration statements executed");
|
|
8882
|
+
return;
|
|
8883
|
+
}
|
|
8884
|
+
case "sqlite":
|
|
8885
|
+
case "expo":
|
|
8886
|
+
case "react-native": {
|
|
8887
|
+
debug22("using sqlite/react-native migration file");
|
|
8888
|
+
const mig = new CreateIssuanceBranding1685628973231();
|
|
8889
|
+
await mig.up(queryRunner);
|
|
8890
|
+
debug22("Migration statements executed");
|
|
8891
|
+
return;
|
|
8892
|
+
}
|
|
8893
|
+
default:
|
|
8894
|
+
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`);
|
|
8895
|
+
}
|
|
8896
|
+
}
|
|
8897
|
+
async down(queryRunner) {
|
|
8898
|
+
debug22("migration: reverting issuance branding tables");
|
|
8899
|
+
const dbType = queryRunner.connection.driver.options.type;
|
|
8900
|
+
switch (dbType) {
|
|
8901
|
+
case "postgres": {
|
|
8902
|
+
debug22("using postgres migration file");
|
|
8903
|
+
const mig = new CreateIssuanceBranding1685628974232();
|
|
8904
|
+
await mig.down(queryRunner);
|
|
8905
|
+
debug22("Migration statements executed");
|
|
8906
|
+
return;
|
|
8907
|
+
}
|
|
8908
|
+
case "sqlite":
|
|
8909
|
+
case "expo":
|
|
8910
|
+
case "react-native": {
|
|
8911
|
+
debug22("using sqlite/react-native migration file");
|
|
8912
|
+
const mig = new CreateIssuanceBranding1685628973231();
|
|
8913
|
+
await mig.down(queryRunner);
|
|
8914
|
+
debug22("Migration statements executed");
|
|
8915
|
+
return;
|
|
8916
|
+
}
|
|
8917
|
+
default:
|
|
8918
|
+
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`);
|
|
8919
|
+
}
|
|
8920
|
+
}
|
|
8921
|
+
};
|
|
8922
|
+
|
|
8923
|
+
// src/migrations/generic/3-CreateContacts.ts
|
|
8924
|
+
var import_debug23 = __toESM(require("debug"), 1);
|
|
8807
8925
|
|
|
8808
8926
|
// src/migrations/postgres/1690925872592-CreateContacts.ts
|
|
8809
8927
|
var import_ssi_sdk33 = require("@sphereon/ssi-sdk.core");
|
|
@@ -9024,30 +9142,30 @@ var CreateContacts1690925872693 = class {
|
|
|
9024
9142
|
};
|
|
9025
9143
|
|
|
9026
9144
|
// src/migrations/generic/3-CreateContacts.ts
|
|
9027
|
-
var
|
|
9145
|
+
var debug23 = (0, import_debug23.default)("sphereon:ssi-sdk:migrations");
|
|
9028
9146
|
var CreateContacts1690925872318 = class {
|
|
9029
9147
|
static {
|
|
9030
9148
|
__name(this, "CreateContacts1690925872318");
|
|
9031
9149
|
}
|
|
9032
9150
|
name = "CreateContacts1690925872318";
|
|
9033
9151
|
async up(queryRunner) {
|
|
9034
|
-
|
|
9152
|
+
debug23("migration: creating contacts tables");
|
|
9035
9153
|
const dbType = queryRunner.connection.driver.options.type;
|
|
9036
9154
|
switch (dbType) {
|
|
9037
9155
|
case "postgres": {
|
|
9038
|
-
|
|
9156
|
+
debug23("using postgres migration file");
|
|
9039
9157
|
const mig = new CreateContacts1690925872592();
|
|
9040
9158
|
await mig.up(queryRunner);
|
|
9041
|
-
|
|
9159
|
+
debug23("Migration statements executed");
|
|
9042
9160
|
return;
|
|
9043
9161
|
}
|
|
9044
9162
|
case "sqlite":
|
|
9045
9163
|
case "expo":
|
|
9046
9164
|
case "react-native": {
|
|
9047
|
-
|
|
9165
|
+
debug23("using sqlite/react-native migration file");
|
|
9048
9166
|
const mig = new CreateContacts1690925872693();
|
|
9049
9167
|
await mig.up(queryRunner);
|
|
9050
|
-
|
|
9168
|
+
debug23("Migration statements executed");
|
|
9051
9169
|
return;
|
|
9052
9170
|
}
|
|
9053
9171
|
default:
|
|
@@ -9055,23 +9173,23 @@ var CreateContacts1690925872318 = class {
|
|
|
9055
9173
|
}
|
|
9056
9174
|
}
|
|
9057
9175
|
async down(queryRunner) {
|
|
9058
|
-
|
|
9176
|
+
debug23("migration: reverting contacts tables");
|
|
9059
9177
|
const dbType = queryRunner.connection.driver.options.type;
|
|
9060
9178
|
switch (dbType) {
|
|
9061
9179
|
case "postgres": {
|
|
9062
|
-
|
|
9180
|
+
debug23("using postgres migration file");
|
|
9063
9181
|
const mig = new CreateContacts1690925872592();
|
|
9064
9182
|
await mig.down(queryRunner);
|
|
9065
|
-
|
|
9183
|
+
debug23("Migration statements executed");
|
|
9066
9184
|
return;
|
|
9067
9185
|
}
|
|
9068
9186
|
case "sqlite":
|
|
9069
9187
|
case "expo":
|
|
9070
9188
|
case "react-native": {
|
|
9071
|
-
|
|
9189
|
+
debug23("using sqlite/react-native migration file");
|
|
9072
9190
|
const mig = new CreateContacts1690925872693();
|
|
9073
9191
|
await mig.down(queryRunner);
|
|
9074
|
-
|
|
9192
|
+
debug23("Migration statements executed");
|
|
9075
9193
|
return;
|
|
9076
9194
|
}
|
|
9077
9195
|
default:
|
|
@@ -9081,7 +9199,7 @@ var CreateContacts1690925872318 = class {
|
|
|
9081
9199
|
};
|
|
9082
9200
|
|
|
9083
9201
|
// src/migrations/generic/4-CreateStatusList.ts
|
|
9084
|
-
var
|
|
9202
|
+
var import_debug24 = __toESM(require("debug"), 1);
|
|
9085
9203
|
|
|
9086
9204
|
// src/migrations/postgres/1693866470001-CreateStatusList.ts
|
|
9087
9205
|
var CreateStatusList1693866470001 = class {
|
|
@@ -9287,53 +9405,53 @@ var UpdateStatusList1737110469000 = class {
|
|
|
9287
9405
|
};
|
|
9288
9406
|
|
|
9289
9407
|
// src/migrations/generic/4-CreateStatusList.ts
|
|
9290
|
-
var
|
|
9408
|
+
var debug24 = (0, import_debug24.default)("sphereon:ssi-sdk:migrations");
|
|
9291
9409
|
var CreateStatusList1693866470000 = class {
|
|
9292
9410
|
static {
|
|
9293
9411
|
__name(this, "CreateStatusList1693866470000");
|
|
9294
9412
|
}
|
|
9295
9413
|
name = "CreateStatusList1693866470000";
|
|
9296
9414
|
async up(queryRunner) {
|
|
9297
|
-
|
|
9415
|
+
debug24("migration: creating issuance branding tables");
|
|
9298
9416
|
const dbType = queryRunner.connection.driver.options.type;
|
|
9299
9417
|
if (dbType === "postgres") {
|
|
9300
|
-
|
|
9418
|
+
debug24("using postgres migration files");
|
|
9301
9419
|
const createMig = new CreateStatusList1693866470001();
|
|
9302
9420
|
await createMig.up(queryRunner);
|
|
9303
9421
|
const updateMig = new UpdateStatusList1737110469001();
|
|
9304
9422
|
const up = await updateMig.up(queryRunner);
|
|
9305
|
-
|
|
9423
|
+
debug24("Migration statements executed");
|
|
9306
9424
|
return up;
|
|
9307
9425
|
} else if (dbType === "sqlite" || dbType === "react-native" || dbType === "expo") {
|
|
9308
|
-
|
|
9426
|
+
debug24("using sqlite/react-native migration files");
|
|
9309
9427
|
const createMig = new CreateStatusList1693866470002();
|
|
9310
9428
|
await createMig.up(queryRunner);
|
|
9311
9429
|
const updateMig = new UpdateStatusList1737110469000();
|
|
9312
9430
|
const up = await updateMig.up(queryRunner);
|
|
9313
|
-
|
|
9431
|
+
debug24("Migration statements executed");
|
|
9314
9432
|
return up;
|
|
9315
9433
|
} else {
|
|
9316
9434
|
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`);
|
|
9317
9435
|
}
|
|
9318
9436
|
}
|
|
9319
9437
|
async down(queryRunner) {
|
|
9320
|
-
|
|
9438
|
+
debug24("migration: reverting issuance branding tables");
|
|
9321
9439
|
const dbType = queryRunner.connection.driver.options.type;
|
|
9322
9440
|
if (dbType === "postgres") {
|
|
9323
|
-
|
|
9441
|
+
debug24("using postgres migration files");
|
|
9324
9442
|
const updateMig = new UpdateStatusList1737110469001();
|
|
9325
9443
|
await updateMig.down(queryRunner);
|
|
9326
9444
|
const createMig = new CreateStatusList1693866470001();
|
|
9327
9445
|
const down = await createMig.down(queryRunner);
|
|
9328
|
-
|
|
9446
|
+
debug24("Migration statements executed");
|
|
9329
9447
|
return down;
|
|
9330
9448
|
} else if (dbType === "sqlite" || dbType === "react-native" || dbType === "expo") {
|
|
9331
|
-
|
|
9449
|
+
debug24("using sqlite/react-native migration files");
|
|
9332
9450
|
const updateMig = new UpdateStatusList1737110469000();
|
|
9333
9451
|
await updateMig.down(queryRunner);
|
|
9334
9452
|
const createMig = new CreateStatusList1693866470002();
|
|
9335
9453
|
const down = await createMig.down(queryRunner);
|
|
9336
|
-
|
|
9454
|
+
debug24("Migration statements executed");
|
|
9337
9455
|
return down;
|
|
9338
9456
|
} else {
|
|
9339
9457
|
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`);
|
|
@@ -9342,7 +9460,7 @@ var CreateStatusList1693866470000 = class {
|
|
|
9342
9460
|
};
|
|
9343
9461
|
|
|
9344
9462
|
// src/migrations/generic/5-CreateAuditEvents.ts
|
|
9345
|
-
var
|
|
9463
|
+
var import_debug25 = __toESM(require("debug"), 1);
|
|
9346
9464
|
|
|
9347
9465
|
// src/migrations/postgres/1701634812183-CreateAuditEvents.ts
|
|
9348
9466
|
var CreateAuditEvents1701634812183 = class {
|
|
@@ -9441,30 +9559,30 @@ var CreateAuditEvents1701634819487 = class {
|
|
|
9441
9559
|
};
|
|
9442
9560
|
|
|
9443
9561
|
// src/migrations/generic/5-CreateAuditEvents.ts
|
|
9444
|
-
var
|
|
9562
|
+
var debug25 = (0, import_debug25.default)("sphereon:ssi-sdk:migrations");
|
|
9445
9563
|
var CreateAuditEvents1701635835330 = class {
|
|
9446
9564
|
static {
|
|
9447
9565
|
__name(this, "CreateAuditEvents1701635835330");
|
|
9448
9566
|
}
|
|
9449
9567
|
name = "CreateAuditEvents1701635835330";
|
|
9450
9568
|
async up(queryRunner) {
|
|
9451
|
-
|
|
9569
|
+
debug25("migration: creating audit events tables");
|
|
9452
9570
|
const dbType = queryRunner.connection.driver.options.type;
|
|
9453
9571
|
switch (dbType) {
|
|
9454
9572
|
case "postgres": {
|
|
9455
|
-
|
|
9573
|
+
debug25("using postgres migration file");
|
|
9456
9574
|
const mig = new CreateAuditEvents1701634812183();
|
|
9457
9575
|
await mig.up(queryRunner);
|
|
9458
|
-
|
|
9576
|
+
debug25("Migration statements executed");
|
|
9459
9577
|
return;
|
|
9460
9578
|
}
|
|
9461
9579
|
case "sqlite":
|
|
9462
9580
|
case "expo":
|
|
9463
9581
|
case "react-native": {
|
|
9464
|
-
|
|
9582
|
+
debug25("using sqlite/react-native migration file");
|
|
9465
9583
|
const mig = new CreateAuditEvents1701634819487();
|
|
9466
9584
|
await mig.up(queryRunner);
|
|
9467
|
-
|
|
9585
|
+
debug25("Migration statements executed");
|
|
9468
9586
|
return;
|
|
9469
9587
|
}
|
|
9470
9588
|
default:
|
|
@@ -9472,23 +9590,23 @@ var CreateAuditEvents1701635835330 = class {
|
|
|
9472
9590
|
}
|
|
9473
9591
|
}
|
|
9474
9592
|
async down(queryRunner) {
|
|
9475
|
-
|
|
9593
|
+
debug25("migration: reverting audit events tables");
|
|
9476
9594
|
const dbType = queryRunner.connection.driver.options.type;
|
|
9477
9595
|
switch (dbType) {
|
|
9478
9596
|
case "postgres": {
|
|
9479
|
-
|
|
9597
|
+
debug25("using postgres migration file");
|
|
9480
9598
|
const mig = new CreateAuditEvents1701634812183();
|
|
9481
9599
|
await mig.down(queryRunner);
|
|
9482
|
-
|
|
9600
|
+
debug25("Migration statements executed");
|
|
9483
9601
|
return;
|
|
9484
9602
|
}
|
|
9485
9603
|
case "sqlite":
|
|
9486
9604
|
case "expo":
|
|
9487
9605
|
case "react-native": {
|
|
9488
|
-
|
|
9606
|
+
debug25("using sqlite/react-native migration file");
|
|
9489
9607
|
const mig = new CreateAuditEvents1701634819487();
|
|
9490
9608
|
await mig.down(queryRunner);
|
|
9491
|
-
|
|
9609
|
+
debug25("Migration statements executed");
|
|
9492
9610
|
return;
|
|
9493
9611
|
}
|
|
9494
9612
|
default:
|
|
@@ -9498,7 +9616,7 @@ var CreateAuditEvents1701635835330 = class {
|
|
|
9498
9616
|
};
|
|
9499
9617
|
|
|
9500
9618
|
// src/migrations/generic/6-CreateDigitalCredential.ts
|
|
9501
|
-
var
|
|
9619
|
+
var import_debug26 = __toESM(require("debug"), 1);
|
|
9502
9620
|
|
|
9503
9621
|
// src/migrations/postgres/1708525189001-CreateDigitalCredential.ts
|
|
9504
9622
|
var CreateDigitalCredential1708525189001 = class {
|
|
@@ -9606,30 +9724,30 @@ var CreateDigitalCredential1708525189002 = class {
|
|
|
9606
9724
|
};
|
|
9607
9725
|
|
|
9608
9726
|
// src/migrations/generic/6-CreateDigitalCredential.ts
|
|
9609
|
-
var
|
|
9727
|
+
var debug26 = (0, import_debug26.default)("sphereon:ssi-sdk:migrations");
|
|
9610
9728
|
var CreateDigitalCredential1708525189000 = class {
|
|
9611
9729
|
static {
|
|
9612
9730
|
__name(this, "CreateDigitalCredential1708525189000");
|
|
9613
9731
|
}
|
|
9614
9732
|
name = "CreateDigitalCredential1708525189000";
|
|
9615
9733
|
async up(queryRunner) {
|
|
9616
|
-
|
|
9734
|
+
debug26("migration: creating DigitalCredential tables");
|
|
9617
9735
|
const dbType = queryRunner.connection.driver.options.type;
|
|
9618
9736
|
switch (dbType) {
|
|
9619
9737
|
case "postgres": {
|
|
9620
|
-
|
|
9738
|
+
debug26("using postgres migration file for DigitalCredential");
|
|
9621
9739
|
const mig = new CreateDigitalCredential1708525189001();
|
|
9622
9740
|
await mig.up(queryRunner);
|
|
9623
|
-
|
|
9741
|
+
debug26("Postgres Migration statements for DigitalCredential executed");
|
|
9624
9742
|
return;
|
|
9625
9743
|
}
|
|
9626
9744
|
case "sqlite":
|
|
9627
9745
|
case "expo":
|
|
9628
9746
|
case "react-native": {
|
|
9629
|
-
|
|
9747
|
+
debug26("using sqlite/react-native migration file for DigitalCredential");
|
|
9630
9748
|
const mig = new CreateDigitalCredential1708525189002();
|
|
9631
9749
|
await mig.up(queryRunner);
|
|
9632
|
-
|
|
9750
|
+
debug26("SQLite Migration statements for DigitalCredential executed");
|
|
9633
9751
|
return;
|
|
9634
9752
|
}
|
|
9635
9753
|
default:
|
|
@@ -9637,23 +9755,23 @@ var CreateDigitalCredential1708525189000 = class {
|
|
|
9637
9755
|
}
|
|
9638
9756
|
}
|
|
9639
9757
|
async down(queryRunner) {
|
|
9640
|
-
|
|
9758
|
+
debug26("migration: reverting DigitalCredential tables");
|
|
9641
9759
|
const dbType = queryRunner.connection.driver.options.type;
|
|
9642
9760
|
switch (dbType) {
|
|
9643
9761
|
case "postgres": {
|
|
9644
|
-
|
|
9762
|
+
debug26("using postgres migration file for DigitalCredential");
|
|
9645
9763
|
const mig = new CreateDigitalCredential1708525189001();
|
|
9646
9764
|
await mig.down(queryRunner);
|
|
9647
|
-
|
|
9765
|
+
debug26("Postgres Migration statements for DigitalCredential reverted");
|
|
9648
9766
|
return;
|
|
9649
9767
|
}
|
|
9650
9768
|
case "sqlite":
|
|
9651
9769
|
case "expo":
|
|
9652
9770
|
case "react-native": {
|
|
9653
|
-
|
|
9771
|
+
debug26("using sqlite/react-native migration file for DigitalCredential");
|
|
9654
9772
|
const mig = new CreateDigitalCredential1708525189002();
|
|
9655
9773
|
await mig.down(queryRunner);
|
|
9656
|
-
|
|
9774
|
+
debug26("SQLite Migration statements for DigitalCredential reverted");
|
|
9657
9775
|
return;
|
|
9658
9776
|
}
|
|
9659
9777
|
default:
|
|
@@ -9663,7 +9781,7 @@ var CreateDigitalCredential1708525189000 = class {
|
|
|
9663
9781
|
};
|
|
9664
9782
|
|
|
9665
9783
|
// src/migrations/generic/7-CreateMachineStateStore.ts
|
|
9666
|
-
var
|
|
9784
|
+
var import_debug27 = __toESM(require("debug"), 1);
|
|
9667
9785
|
|
|
9668
9786
|
// src/migrations/postgres/1708797018115-CreateMachineStateStore.ts
|
|
9669
9787
|
var CreateMachineStateStore1708797018115 = class {
|
|
@@ -9725,30 +9843,30 @@ var CreateMachineStateStore1708796002272 = class {
|
|
|
9725
9843
|
};
|
|
9726
9844
|
|
|
9727
9845
|
// src/migrations/generic/7-CreateMachineStateStore.ts
|
|
9728
|
-
var
|
|
9846
|
+
var debug27 = (0, import_debug27.default)("sphereon:ssi-sdk:migrations");
|
|
9729
9847
|
var CreateMachineStateStore1708098041262 = class {
|
|
9730
9848
|
static {
|
|
9731
9849
|
__name(this, "CreateMachineStateStore1708098041262");
|
|
9732
9850
|
}
|
|
9733
9851
|
name = "CreateMachineStateStore1708098041262";
|
|
9734
9852
|
async up(queryRunner) {
|
|
9735
|
-
|
|
9853
|
+
debug27("migration: creating machine state tables");
|
|
9736
9854
|
const dbType = queryRunner.connection.driver.options.type;
|
|
9737
9855
|
switch (dbType) {
|
|
9738
9856
|
case "postgres": {
|
|
9739
|
-
|
|
9857
|
+
debug27("using postgres migration file");
|
|
9740
9858
|
const mig = new CreateMachineStateStore1708797018115();
|
|
9741
9859
|
await mig.up(queryRunner);
|
|
9742
|
-
|
|
9860
|
+
debug27("Migration statements executed");
|
|
9743
9861
|
return;
|
|
9744
9862
|
}
|
|
9745
9863
|
case "sqlite":
|
|
9746
9864
|
case "expo":
|
|
9747
9865
|
case "react-native": {
|
|
9748
|
-
|
|
9866
|
+
debug27("using sqlite/react-native migration file");
|
|
9749
9867
|
const mig = new CreateMachineStateStore1708796002272();
|
|
9750
9868
|
await mig.up(queryRunner);
|
|
9751
|
-
|
|
9869
|
+
debug27("Migration statements executed");
|
|
9752
9870
|
return;
|
|
9753
9871
|
}
|
|
9754
9872
|
default:
|
|
@@ -9756,23 +9874,23 @@ var CreateMachineStateStore1708098041262 = class {
|
|
|
9756
9874
|
}
|
|
9757
9875
|
}
|
|
9758
9876
|
async down(queryRunner) {
|
|
9759
|
-
|
|
9877
|
+
debug27("migration: reverting machine state tables");
|
|
9760
9878
|
const dbType = queryRunner.connection.driver.options.type;
|
|
9761
9879
|
switch (dbType) {
|
|
9762
9880
|
case "postgres": {
|
|
9763
|
-
|
|
9881
|
+
debug27("using postgres migration file");
|
|
9764
9882
|
const mig = new CreateMachineStateStore1708797018115();
|
|
9765
9883
|
await mig.down(queryRunner);
|
|
9766
|
-
|
|
9884
|
+
debug27("Migration statements executed");
|
|
9767
9885
|
return;
|
|
9768
9886
|
}
|
|
9769
9887
|
case "sqlite":
|
|
9770
9888
|
case "expo":
|
|
9771
9889
|
case "react-native": {
|
|
9772
|
-
|
|
9890
|
+
debug27("using sqlite/react-native migration file");
|
|
9773
9891
|
const mig = new CreateMachineStateStore1708796002272();
|
|
9774
9892
|
await mig.down(queryRunner);
|
|
9775
|
-
|
|
9893
|
+
debug27("Migration statements executed");
|
|
9776
9894
|
return;
|
|
9777
9895
|
}
|
|
9778
9896
|
default:
|
|
@@ -9782,7 +9900,7 @@ var CreateMachineStateStore1708098041262 = class {
|
|
|
9782
9900
|
};
|
|
9783
9901
|
|
|
9784
9902
|
// src/migrations/generic/8-CreateContacts.ts
|
|
9785
|
-
var
|
|
9903
|
+
var import_debug28 = __toESM(require("debug"), 1);
|
|
9786
9904
|
|
|
9787
9905
|
// src/migrations/postgres/1710438363001-CreateContacts.ts
|
|
9788
9906
|
var CreateContacts1710438363001 = class {
|
|
@@ -9896,30 +10014,30 @@ var CreateContacts1710438363002 = class {
|
|
|
9896
10014
|
};
|
|
9897
10015
|
|
|
9898
10016
|
// src/migrations/generic/8-CreateContacts.ts
|
|
9899
|
-
var
|
|
10017
|
+
var debug28 = (0, import_debug28.default)("sphereon:ssi-sdk:migrations");
|
|
9900
10018
|
var CreateContacts1708525189000 = class {
|
|
9901
10019
|
static {
|
|
9902
10020
|
__name(this, "CreateContacts1708525189000");
|
|
9903
10021
|
}
|
|
9904
10022
|
name = "CreateContacts1708525189000";
|
|
9905
10023
|
async up(queryRunner) {
|
|
9906
|
-
|
|
10024
|
+
debug28("migration: updating contact tables");
|
|
9907
10025
|
const dbType = queryRunner.connection.driver.options.type;
|
|
9908
10026
|
switch (dbType) {
|
|
9909
10027
|
case "postgres": {
|
|
9910
|
-
|
|
10028
|
+
debug28("using postgres migration file");
|
|
9911
10029
|
const mig = new CreateContacts1710438363001();
|
|
9912
10030
|
await mig.up(queryRunner);
|
|
9913
|
-
|
|
10031
|
+
debug28("Migration statements executed");
|
|
9914
10032
|
return;
|
|
9915
10033
|
}
|
|
9916
10034
|
case "sqlite":
|
|
9917
10035
|
case "expo":
|
|
9918
10036
|
case "react-native": {
|
|
9919
|
-
|
|
10037
|
+
debug28("using sqlite/react-native migration file");
|
|
9920
10038
|
const mig = new CreateContacts1710438363002();
|
|
9921
10039
|
await mig.up(queryRunner);
|
|
9922
|
-
|
|
10040
|
+
debug28("Migration statements executed");
|
|
9923
10041
|
return;
|
|
9924
10042
|
}
|
|
9925
10043
|
default:
|
|
@@ -9927,23 +10045,23 @@ var CreateContacts1708525189000 = class {
|
|
|
9927
10045
|
}
|
|
9928
10046
|
}
|
|
9929
10047
|
async down(queryRunner) {
|
|
9930
|
-
|
|
10048
|
+
debug28("migration: reverting machine state tables");
|
|
9931
10049
|
const dbType = queryRunner.connection.driver.options.type;
|
|
9932
10050
|
switch (dbType) {
|
|
9933
10051
|
case "postgres": {
|
|
9934
|
-
|
|
10052
|
+
debug28("using postgres migration file");
|
|
9935
10053
|
const mig = new CreateContacts1710438363001();
|
|
9936
10054
|
await mig.down(queryRunner);
|
|
9937
|
-
|
|
10055
|
+
debug28("Migration statements executed");
|
|
9938
10056
|
return;
|
|
9939
10057
|
}
|
|
9940
10058
|
case "sqlite":
|
|
9941
10059
|
case "expo":
|
|
9942
10060
|
case "react-native": {
|
|
9943
|
-
|
|
10061
|
+
debug28("using sqlite/react-native migration file");
|
|
9944
10062
|
const mig = new CreateContacts1710438363002();
|
|
9945
10063
|
await mig.down(queryRunner);
|
|
9946
|
-
|
|
10064
|
+
debug28("Migration statements executed");
|
|
9947
10065
|
return;
|
|
9948
10066
|
}
|
|
9949
10067
|
default:
|
|
@@ -9953,7 +10071,7 @@ var CreateContacts1708525189000 = class {
|
|
|
9953
10071
|
};
|
|
9954
10072
|
|
|
9955
10073
|
// src/migrations/generic/9-CreateContacts.ts
|
|
9956
|
-
var
|
|
10074
|
+
var import_debug29 = __toESM(require("debug"), 1);
|
|
9957
10075
|
|
|
9958
10076
|
// src/migrations/postgres/1715761125001-CreateContacts.ts
|
|
9959
10077
|
var CreateContacts1715761125001 = class {
|
|
@@ -10065,30 +10183,30 @@ var CreateContacts1715761125002 = class {
|
|
|
10065
10183
|
};
|
|
10066
10184
|
|
|
10067
10185
|
// src/migrations/generic/9-CreateContacts.ts
|
|
10068
|
-
var
|
|
10186
|
+
var debug29 = (0, import_debug29.default)("sphereon:ssi-sdk:migrations");
|
|
10069
10187
|
var CreateContacts1715761125000 = class {
|
|
10070
10188
|
static {
|
|
10071
10189
|
__name(this, "CreateContacts1715761125000");
|
|
10072
10190
|
}
|
|
10073
10191
|
name = "CreateContacts1715761125000";
|
|
10074
10192
|
async up(queryRunner) {
|
|
10075
|
-
|
|
10193
|
+
debug29("migration: updating contact tables");
|
|
10076
10194
|
const dbType = queryRunner.connection.driver.options.type;
|
|
10077
10195
|
switch (dbType) {
|
|
10078
10196
|
case "postgres": {
|
|
10079
|
-
|
|
10197
|
+
debug29("using postgres migration file");
|
|
10080
10198
|
const mig = new CreateContacts1715761125001();
|
|
10081
10199
|
await mig.up(queryRunner);
|
|
10082
|
-
|
|
10200
|
+
debug29("Migration statements executed");
|
|
10083
10201
|
return;
|
|
10084
10202
|
}
|
|
10085
10203
|
case "sqlite":
|
|
10086
10204
|
case "expo":
|
|
10087
10205
|
case "react-native": {
|
|
10088
|
-
|
|
10206
|
+
debug29("using sqlite/react-native migration file");
|
|
10089
10207
|
const mig = new CreateContacts1715761125002();
|
|
10090
10208
|
await mig.up(queryRunner);
|
|
10091
|
-
|
|
10209
|
+
debug29("Migration statements executed");
|
|
10092
10210
|
return;
|
|
10093
10211
|
}
|
|
10094
10212
|
default:
|
|
@@ -10096,23 +10214,23 @@ var CreateContacts1715761125000 = class {
|
|
|
10096
10214
|
}
|
|
10097
10215
|
}
|
|
10098
10216
|
async down(queryRunner) {
|
|
10099
|
-
|
|
10217
|
+
debug29("migration: reverting machine state tables");
|
|
10100
10218
|
const dbType = queryRunner.connection.driver.options.type;
|
|
10101
10219
|
switch (dbType) {
|
|
10102
10220
|
case "postgres": {
|
|
10103
|
-
|
|
10221
|
+
debug29("using postgres migration file");
|
|
10104
10222
|
const mig = new CreateContacts1715761125001();
|
|
10105
10223
|
await mig.down(queryRunner);
|
|
10106
|
-
|
|
10224
|
+
debug29("Migration statements executed");
|
|
10107
10225
|
return;
|
|
10108
10226
|
}
|
|
10109
10227
|
case "sqlite":
|
|
10110
10228
|
case "expo":
|
|
10111
10229
|
case "react-native": {
|
|
10112
|
-
|
|
10230
|
+
debug29("using sqlite/react-native migration file");
|
|
10113
10231
|
const mig = new CreateContacts1715761125002();
|
|
10114
10232
|
await mig.down(queryRunner);
|
|
10115
|
-
|
|
10233
|
+
debug29("Migration statements executed");
|
|
10116
10234
|
return;
|
|
10117
10235
|
}
|
|
10118
10236
|
default:
|
|
@@ -10132,7 +10250,8 @@ var DataStoreContactMigrations = [
|
|
|
10132
10250
|
var DataStoreIssuanceBrandingMigrations = [
|
|
10133
10251
|
CreateIssuanceBranding1659463079429,
|
|
10134
10252
|
FixCredentialClaimsReferencesUuid1741895822987,
|
|
10135
|
-
AddBrandingState1766000000000
|
|
10253
|
+
AddBrandingState1766000000000,
|
|
10254
|
+
AddCredentialClaimOrder1768000000000
|
|
10136
10255
|
];
|
|
10137
10256
|
var DataStoreStatusListMigrations = [
|
|
10138
10257
|
CreateStatusList1693866470000,
|